summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorOliver Specht <os@openoffice.org>2001-01-24 09:15:53 +0000
committerOliver Specht <os@openoffice.org>2001-01-24 09:15:53 +0000
commit4126fad52a8c186218f6573cfcc1facfdf2d1707 (patch)
tree355c097914e8f2f923dc15f6be594f7ddff25755 /sw/source
parent0b51afac55bfade8f732b1746c54ee1ed1d1d6e0 (diff)
#83097# redline attribute corrected
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/ui/config/modcfg.cxx55
-rw-r--r--sw/source/ui/config/optpage.cxx7
2 files changed, 52 insertions, 10 deletions
diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx
index af54e1c737e3..32021a658cfc 100644
--- a/sw/source/ui/config/modcfg.cxx
+++ b/sw/source/ui/config/modcfg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: modcfg.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: os $ $Date: 2001-01-22 09:04:09 $
+ * last change: $Author: os $ $Date: 2001-01-24 10:15:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -381,6 +381,29 @@ void SwRevisionConfig::Notify( const Sequence<OUString>& aPropertyNames)
/*-- 10.10.00 16:22:56---------------------------------------------------
-----------------------------------------------------------------------*/
+sal_Int32 lcl_ConvertAttrToCfg(const AuthorCharAttr& rAttr)
+{
+ sal_Int32 nRet = 0;
+ switch(rAttr.nItemId)
+ {
+ case SID_ATTR_CHAR_WEIGHT: nRet = 1; break;
+ case SID_ATTR_CHAR_POSTURE: nRet = 2; break;
+ case SID_ATTR_CHAR_UNDERLINE: nRet = UNDERLINE_SINGLE == rAttr.nAttr ? 3 : 4; break;
+ case SID_ATTR_CHAR_CASEMAP:
+ {
+ switch(rAttr.nAttr)
+ {
+ case SVX_CASEMAP_VERSALIEN : nRet = 5;break;
+ case SVX_CASEMAP_GEMEINE : nRet = 6;break;
+ case SVX_CASEMAP_KAPITAELCHEN: nRet = 7;break;
+ case SVX_CASEMAP_TITEL : nRet = 8;break;
+ }
+ }
+ case SID_ATTR_BRUSH : nRet = 9; break;
+ }
+ return nRet;
+}
+//-----------------------------------------------------------------------------
void SwRevisionConfig::Commit()
{
const Sequence<OUString>& aNames = GetPropertyNames();
@@ -394,11 +417,11 @@ void SwRevisionConfig::Commit()
sal_Int32 nVal = -1;
switch(nProp)
{
- case 0 : nVal = aInsertAttr.nAttr ; break;
+ case 0 : nVal = lcl_ConvertAttrToCfg(aInsertAttr); break;
case 1 : nVal = aInsertAttr.nColor ; break;
- case 2 : nVal = aDeletedAttr.nAttr ; break;
+ case 2 : nVal = lcl_ConvertAttrToCfg(aDeletedAttr); break;
case 3 : nVal = aDeletedAttr.nColor ; break;
- case 4 : nVal = aFormatAttr.nAttr ; break;
+ case 4 : nVal = lcl_ConvertAttrToCfg(aFormatAttr); break;
case 5 : nVal = aFormatAttr.nColor ; break;
case 6 : nVal = nMarkAlign ; break;
case 7 : nVal = aMarkColor.GetColor(); break;
@@ -410,6 +433,22 @@ void SwRevisionConfig::Commit()
/*-- 10.10.00 16:22:56---------------------------------------------------
-----------------------------------------------------------------------*/
+void lcl_ConvertCfgToAttr(sal_Int32 nVal, AuthorCharAttr& rAttr)
+{
+ rAttr.nItemId = rAttr.nAttr = 0;
+ switch(nVal)
+ {
+ case 1: rAttr.nItemId = SID_ATTR_CHAR_WEIGHT; rAttr.nAttr = WEIGHT_BOLD ; break;
+ case 2: rAttr.nItemId = SID_ATTR_CHAR_POSTURE; rAttr.nAttr = ITALIC_NORMAL ; break;
+ case 3: rAttr.nItemId = SID_ATTR_CHAR_UNDERLINE;rAttr.nAttr = UNDERLINE_SINGLE ; break;
+ case 4: rAttr.nItemId = SID_ATTR_CHAR_UNDERLINE;rAttr.nAttr = UNDERLINE_DOUBLE ; break;
+ case 5: rAttr.nItemId = SID_ATTR_CHAR_CASEMAP; rAttr.nAttr = SVX_CASEMAP_VERSALIEN ; break;
+ case 6: rAttr.nItemId = SID_ATTR_CHAR_CASEMAP; rAttr.nAttr = SVX_CASEMAP_GEMEINE ; break;
+ case 7: rAttr.nItemId = SID_ATTR_CHAR_CASEMAP; rAttr.nAttr = SVX_CASEMAP_KAPITAELCHEN ; break;
+ case 8: rAttr.nItemId = SID_ATTR_CHAR_CASEMAP; rAttr.nAttr = SVX_CASEMAP_TITEL ; break;
+ case 9: rAttr.nItemId = SID_ATTR_BRUSH; break;
+ }
+}
void SwRevisionConfig::Load()
{
const Sequence<OUString>& aNames = GetPropertyNames();
@@ -426,11 +465,11 @@ void SwRevisionConfig::Load()
pValues[nProp] >>= nVal;
switch(nProp)
{
- case 0 : aInsertAttr.nAttr = nVal; break;
+ case 0 : lcl_ConvertCfgToAttr(nVal, aInsertAttr); break;
case 1 : aInsertAttr.nColor = nVal; break;
- case 2 : aDeletedAttr.nAttr = nVal; break;
+ case 2 : lcl_ConvertCfgToAttr(nVal, aDeletedAttr); break;
case 3 : aDeletedAttr.nColor = nVal; break;
- case 4 : aFormatAttr.nAttr = nVal; break;
+ case 4 : lcl_ConvertCfgToAttr(nVal, aFormatAttr); break;
case 5 : aFormatAttr.nColor = nVal; break;
case 6 : nMarkAlign = nVal; break;
case 7 : aMarkColor.SetColor(nVal); break;
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 48f23bcb1c13..fe4810ba48cb 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: optpage.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: os $ $Date: 2000-11-28 08:58:58 $
+ * last change: $Author: os $ $Date: 2001-01-24 10:15:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1976,6 +1976,9 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& rSet )
// Attributlistboxen initialisieren
USHORT nNum = sizeof(aInsertAttr) / sizeof(CharAttr);
+ aInsertLB.SelectEntryPos(0);
+ aDeletedLB.SelectEntryPos(0);
+ aChangedLB.SelectEntryPos(0);
for (i = 0; i < nNum; i++)
{
aInsertLB.SetEntryData(i, &aInsertAttr[i]);