summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjp <jp@openoffice.org>2002-02-22 11:00:10 +0000
committerjp <jp@openoffice.org>2002-02-22 11:00:10 +0000
commitbe02b450a60d05890d2f76c9ee4dcebbd7b11bb8 (patch)
treef7ec68e5ed675eb5f22fcfb9747021732d510f5c
parent5ab77f67e7334124aafacc250eb9c90bdd43b571 (diff)
Task #96739#: Autocorrect - set item for all scripts
-rw-r--r--sw/inc/doc.hxx10
-rw-r--r--sw/inc/redline.hxx19
-rw-r--r--sw/source/core/doc/docfmt.cxx10
-rw-r--r--sw/source/core/doc/docredln.cxx47
-rw-r--r--sw/source/core/doc/poolfmt.cxx52
-rw-r--r--sw/source/core/edit/acorrect.cxx23
-rw-r--r--sw/source/core/edit/autofmt.cxx16
7 files changed, 116 insertions, 61 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 9110f70d08ee..3cb432753603 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: doc.hxx,v $
*
- * $Revision: 1.31 $
+ * $Revision: 1.32 $
*
- * last change: $Author: jp $ $Date: 2002-02-18 09:22:12 $
+ * last change: $Author: jp $ $Date: 2002-02-22 11:56:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -271,6 +271,10 @@ enum SwMoveFlags
#define SW_HYPH_ABORTED 2
#define SW_HYPH_CONTINUE 3
+// forward declartion
+void SetAllScriptItem( SfxItemSet& rSet, const SfxPoolItem& rItem );
+
+
class SwDoc
{
friend class SwReader; // fuers Undo von Insert(SwDoc)
@@ -1663,7 +1667,7 @@ public:
// fuer AutoFormat: mit Undo/Redlining - Behandlung
void SetTxtFmtCollByAutoFmt( const SwPosition& rPos, sal_uInt16 nPoolId,
const SfxItemSet* pSet = 0 );
- void SetFmtItemByAutoFmt( const SwPaM& rPam, const SfxPoolItem& );
+ void SetFmtItemByAutoFmt( const SwPaM& rPam, const SfxItemSet& );
// !!!NUR fuer die SW-Textblocks!! beachtet kein LAYOUT!!!
void ClearDoc(); // loescht den gesamten Inhalt.
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index 633c0ddbbbd0..20279d68d47d 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: redline.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: fme $ $Date: 2001-04-27 13:29:06 $
+ * last change: $Author: jp $ $Date: 2002-02-22 11:56:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -68,11 +68,14 @@
#include <tools/string.hxx>
#endif
+#define _SVSTDARR_USHORTS
+#include <svtools/svstdarr.hxx>
+
#ifndef _PAM_HXX
-#include "pam.hxx"
+#include <pam.hxx>
#endif
#ifndef _REDLENUM_HXX
-#include "redlenum.hxx" // enums
+#include <redlenum.hxx>
#endif
class SfxItemSet;
@@ -112,9 +115,13 @@ public:
class SwRedlineExtraData_Format : public SwRedlineExtraData
{
- USHORT nWhich;
+ SvUShorts aWhichIds;
+
+ SwRedlineExtraData_Format( const SwRedlineExtraData_Format& rCpy );
+
public:
- SwRedlineExtraData_Format( USHORT nWhich );
+ SwRedlineExtraData_Format( const SfxItemSet& rSet );
+ virtual ~SwRedlineExtraData_Format();
virtual SwRedlineExtraData* CreateNew() const;
virtual void Reject( SwPaM& rPam ) const;
virtual int operator == ( const SwRedlineExtraData& ) const;
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 4a8ce390c49c..385635f09bbe 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: docfmt.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: jp $ $Date: 2001-07-31 16:51:57 $
+ * last change: $Author: jp $ $Date: 2002-02-22 11:57:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -2204,7 +2204,7 @@ void SwDoc::SetTxtFmtCollByAutoFmt( const SwPosition& rPos, USHORT nPoolId,
}
}
-void SwDoc::SetFmtItemByAutoFmt( const SwPaM& rPam, const SfxPoolItem& rItem )
+void SwDoc::SetFmtItemByAutoFmt( const SwPaM& rPam, const SfxItemSet& rSet )
{
SwTxtNode* pTNd = rPam.GetPoint()->nNode.GetNode().GetTxtNode();
@@ -2219,7 +2219,7 @@ void SwDoc::SetFmtItemByAutoFmt( const SwPaM& rPam, const SfxPoolItem& rItem )
// interressant sind nur die Items, die vom Set NICHT wieder
// in den Node gesetzt werden. Also muss man die Differenz nehmen
- SwRedlineExtraData_Format aExtraData( rItem.Which() );
+ SwRedlineExtraData_Format aExtraData( rSet );
/*
if( pSet && pTNd->GetpSwAttrSet() )
@@ -2242,7 +2242,7 @@ void SwDoc::SetFmtItemByAutoFmt( const SwPaM& rPam, const SfxPoolItem& rItem )
SetRedlineMode_intern( eOld | REDLINE_IGNORE );
}
- Insert( rPam, rItem, SETATTR_DONTEXPAND );
+ Insert( rPam, rSet, SETATTR_DONTEXPAND );
SetRedlineMode_intern( eOld );
}
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index b44643a8c0c0..d9234b3fadd9 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: docredln.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: jp $ $Date: 2001-09-27 13:42:16 $
+ * last change: $Author: jp $ $Date: 2002-02-22 11:57:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -72,6 +72,9 @@
#ifndef _SHL_HXX
#include <tools/shl.hxx>
#endif
+#ifndef _SFX_ITEMITER_HXX //autogen
+#include <svtools/itemiter.hxx>
+#endif
#ifndef _SFXAPP_HXX //autogen
#include <sfx2/app.hxx>
#endif
@@ -2517,15 +2520,33 @@ void SwRedlineExtraData_FmtColl::SetItemSet( const SfxItemSet& rSet )
}
-SwRedlineExtraData_Format::SwRedlineExtraData_Format( USHORT nW )
- : nWhich( nW )
+SwRedlineExtraData_Format::SwRedlineExtraData_Format( const SfxItemSet& rSet )
+{
+ SfxItemIter aIter( rSet );
+ const SfxPoolItem* pItem = aIter.FirstItem();
+ while( TRUE )
+ {
+ aWhichIds.Insert( pItem->Which(), aWhichIds.Count() );
+ if( aIter.IsAtEnd() )
+ break;
+ pItem = aIter.NextItem();
+ }
+}
+
+SwRedlineExtraData_Format::SwRedlineExtraData_Format(
+ const SwRedlineExtraData_Format& rCpy )
+ : aWhichIds( (BYTE)rCpy.aWhichIds.Count() )
{
+ aWhichIds.Insert( &rCpy.aWhichIds, 0 );
}
+SwRedlineExtraData_Format::~SwRedlineExtraData_Format()
+{
+}
SwRedlineExtraData* SwRedlineExtraData_Format::CreateNew() const
{
- return new SwRedlineExtraData_Format( nWhich );
+ return new SwRedlineExtraData_Format( *this );
}
void SwRedlineExtraData_Format::Reject( SwPaM& rPam ) const
@@ -2536,14 +2557,26 @@ void SwRedlineExtraData_Format::Reject( SwPaM& rPam ) const
pDoc->SetRedlineMode_intern( eOld & ~(REDLINE_ON | REDLINE_IGNORE) );
// eigentlich muesste hier das Attribut zurueck gesetzt werden!!!
- pDoc->Insert( rPam, *GetDfltAttr( nWhich ), SETATTR_DONTEXPAND );
+ for( USHORT n = 0, nEnd = aWhichIds.Count(); n < nEnd; ++n )
+ pDoc->Insert( rPam, *GetDfltAttr( aWhichIds[ n ] ), SETATTR_DONTEXPAND );
pDoc->SetRedlineMode_intern( eOld );
}
int SwRedlineExtraData_Format::operator == ( const SwRedlineExtraData& rCmp ) const
{
- return nWhich == ((SwRedlineExtraData_Format&)rCmp).nWhich;
+ int nRet = 1;
+ USHORT n = 0, nEnd = aWhichIds.Count();
+ if( nEnd != ((SwRedlineExtraData_Format&)rCmp).aWhichIds.Count() )
+ nRet = 0;
+ else
+ for( ; n < nEnd; ++n )
+ if( ((SwRedlineExtraData_Format&)rCmp).aWhichIds[n] != aWhichIds[n])
+ {
+ nRet = 0;
+ break;
+ }
+ return nRet;
}
/* */
diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx
index 77a941d88980..14b1a59e6497 100644
--- a/sw/source/core/doc/poolfmt.cxx
+++ b/sw/source/core/doc/poolfmt.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: poolfmt.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: mtg $ $Date: 2001-10-24 17:21:04 $
+ * last change: $Author: jp $ $Date: 2002-02-22 11:57:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -251,7 +251,7 @@ long lcl_GetRightMargin( SwDoc& rDoc )
return nWidth - nLeft - nRight;
}
-void lcl_SetAllScriptItem( SfxItemSet& rSet, const SfxPoolItem& rItem )
+void SetAllScriptItem( SfxItemSet& rSet, const SfxPoolItem& rItem )
{
rSet.Put( rItem );
USHORT nWhCJK = 0, nWhCTL = 0;
@@ -336,16 +336,16 @@ void lcl_SetHeadline( SwDoc* pDoc, SwTxtFmtColl* pColl,
SfxItemSet& rSet,
USHORT nOutLvlBits, BYTE nLevel, BOOL bItalic )
{
- ::lcl_SetAllScriptItem( rSet, SvxWeightItem( WEIGHT_BOLD ) );
+ SetAllScriptItem( rSet, SvxWeightItem( WEIGHT_BOLD ) );
SvxFontHeightItem aHItem;
if( pDoc->IsHTMLMode() )
aHItem.SetHeight( aHeadlineSizes[ MAXLEVEL + nLevel ] );
else
aHItem.SetHeight( PT_14, aHeadlineSizes[ nLevel ] );
- ::lcl_SetAllScriptItem( rSet, aHItem );
+ SetAllScriptItem( rSet, aHItem );
if( bItalic && !pDoc->IsHTMLMode() )
- ::lcl_SetAllScriptItem( rSet, SvxPostureItem( ITALIC_NORMAL ) );
+ SetAllScriptItem( rSet, SvxPostureItem( ITALIC_NORMAL ) );
if( pDoc->IsHTMLMode() )
{
@@ -387,8 +387,8 @@ void lcl_SetRegister( SwDoc* pDoc, SfxItemSet& rSet, USHORT nFact,
rSet.Put( aLR );
if( bHeader )
{
- ::lcl_SetAllScriptItem( rSet, SvxWeightItem( WEIGHT_BOLD ) );
- ::lcl_SetAllScriptItem( rSet, SvxFontHeightItem( PT_16 ) );
+ SetAllScriptItem( rSet, SvxWeightItem( WEIGHT_BOLD ) );
+ SetAllScriptItem( rSet, SvxFontHeightItem( PT_16 ) );
}
if( bTab )
{
@@ -600,7 +600,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, String* pDesc,
RES_POOLCOLL_TEXT ));
aSet.Put( aUL );
- ::lcl_SetAllScriptItem( aSet, aFntSize );
+ SetAllScriptItem( aSet, aFntSize );
}
break;
@@ -674,9 +674,9 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, String* pDesc,
case RES_POOLCOLL_TABLE_HDLN:
{
- ::lcl_SetAllScriptItem( aSet, SvxWeightItem( WEIGHT_BOLD ) );
+ SetAllScriptItem( aSet, SvxWeightItem( WEIGHT_BOLD ) );
if( !IsHTMLMode() )
- ::lcl_SetAllScriptItem( aSet, SvxPostureItem( ITALIC_NORMAL ) );
+ SetAllScriptItem( aSet, SvxPostureItem( ITALIC_NORMAL ) );
aSet.Put( SvxAdjustItem( SVX_ADJUST_CENTER ) );
SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
aSet.Put( aLN );
@@ -689,7 +689,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, String* pDesc,
SvxLRSpaceItem aLR;
aLR.SetTxtFirstLineOfst( -(short)GetMetricVal( CM_05 ));
aLR.SetTxtLeft( GetMetricVal( CM_05 ));
- ::lcl_SetAllScriptItem( aSet, SvxFontHeightItem( PT_10 ) );
+ SetAllScriptItem( aSet, SvxFontHeightItem( PT_10 ) );
aSet.Put( aLR );
SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
aSet.Put( aLN );
@@ -700,8 +700,8 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, String* pDesc,
{
SvxULSpaceItem aUL; aUL.SetUpper( PT_6 ); aUL.SetLower( PT_6 );
aSet.Put( aUL );
- ::lcl_SetAllScriptItem( aSet, SvxPostureItem( ITALIC_NORMAL ) );
- ::lcl_SetAllScriptItem( aSet, SvxFontHeightItem( PT_10 ) );
+ SetAllScriptItem( aSet, SvxPostureItem( ITALIC_NORMAL ) );
+ SetAllScriptItem( aSet, SvxFontHeightItem( PT_10 ) );
SwFmtLineNumber aLN; aLN.SetCountLines( FALSE );
aSet.Put( aLN );
}
@@ -726,7 +726,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, String* pDesc,
case RES_POOLCOLL_SENDADRESS: // AbsenderAdresse
{
if( IsHTMLMode() )
- ::lcl_SetAllScriptItem( aSet, SvxPostureItem(ITALIC_NORMAL) );
+ SetAllScriptItem( aSet, SvxPostureItem(ITALIC_NORMAL) );
else
{
SvxULSpaceItem aUL; aUL.SetLower( PT_3 );
@@ -1049,8 +1049,8 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, String* pDesc,
case RES_POOLCOLL_DOC_TITEL: // Doc. Titel
{
- ::lcl_SetAllScriptItem( aSet, SvxWeightItem( WEIGHT_BOLD ) );
- ::lcl_SetAllScriptItem( aSet, SvxFontHeightItem( PT_18 ) );
+ SetAllScriptItem( aSet, SvxWeightItem( WEIGHT_BOLD ) );
+ SetAllScriptItem( aSet, SvxFontHeightItem( PT_18 ) );
aSet.Put( SvxAdjustItem( SVX_ADJUST_CENTER ) );
@@ -1062,8 +1062,8 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, String* pDesc,
case RES_POOLCOLL_DOC_SUBTITEL: // Doc. UnterTitel
{
- ::lcl_SetAllScriptItem( aSet, SvxPostureItem( ITALIC_NORMAL ));
- ::lcl_SetAllScriptItem( aSet, SvxFontHeightItem( PT_14 ));
+ SetAllScriptItem( aSet, SvxPostureItem( ITALIC_NORMAL ));
+ SetAllScriptItem( aSet, SvxFontHeightItem( PT_14 ));
aSet.Put( SvxAdjustItem( SVX_ADJUST_CENTER ));
@@ -1093,7 +1093,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, String* pDesc,
::lcl_SetDfltFont( DEFAULTFONT_FIXED, aSet );
// WORKAROUND: PRE auf 10pt setzten
- ::lcl_SetAllScriptItem( aSet, SvxFontHeightItem(PT_10) );
+ SetAllScriptItem( aSet, SvxFontHeightItem(PT_10) );
// WORKAROUND: PRE auf 10pt setzten
// der untere Absatz-Abstand wird explizit gesetzt (macht
@@ -1116,7 +1116,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, String* pDesc,
aBox.SetLine( &aNew, BOX_LINE_BOTTOM );
aSet.Put( aBox );
- ::lcl_SetAllScriptItem( aSet, SvxFontHeightItem(120) );
+ SetAllScriptItem( aSet, SvxFontHeightItem(120) );
SvxULSpaceItem aUL;
if( !pDesc )
@@ -1345,10 +1345,10 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId, String* pDesc,
case RES_POOLCHR_BUL_LEVEL: // Aufzaehlungszeichen
{
const Font& rBulletFont = SwNumRule::GetDefBulletFont();
- ::lcl_SetAllScriptItem( aSet, SvxFontItem( rBulletFont.GetFamily(),
+ SetAllScriptItem( aSet, SvxFontItem( rBulletFont.GetFamily(),
rBulletFont.GetName(), rBulletFont.GetStyleName(),
rBulletFont.GetPitch(), rBulletFont.GetCharSet() ));
- ::lcl_SetAllScriptItem( aSet, SvxFontHeightItem( PT_9 ));
+ SetAllScriptItem( aSet, SvxFontHeightItem( PT_9 ));
}
break;
@@ -1379,7 +1379,7 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId, String* pDesc,
{
long nH = ((SvxFontHeightItem*)GetDfltAttr(
RES_CHRATR_CJK_FONTSIZE ))->GetHeight() / 2;
- ::lcl_SetAllScriptItem( aSet, SvxFontHeightItem( nH ));
+ SetAllScriptItem( aSet, SvxFontHeightItem( nH ));
}
break;
@@ -1387,14 +1387,14 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId, String* pDesc,
case RES_POOLCHR_HTML_CITIATION:
case RES_POOLCHR_HTML_VARIABLE:
{
- ::lcl_SetAllScriptItem( aSet, SvxPostureItem( ITALIC_NORMAL ) );
+ SetAllScriptItem( aSet, SvxPostureItem( ITALIC_NORMAL ) );
}
break;
case RES_POOLCHR_IDX_MAIN_ENTRY:
case RES_POOLCHR_HTML_STRONG:
{
- ::lcl_SetAllScriptItem( aSet, SvxWeightItem( WEIGHT_BOLD ));
+ SetAllScriptItem( aSet, SvxWeightItem( WEIGHT_BOLD ));
}
break;
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index 318d3c4600ce..13aaecf3083b 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: acorrect.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: jp $ $Date: 2001-09-27 17:10:20 $
+ * last change: $Author: jp $ $Date: 2002-02-22 12:00:10 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -295,11 +295,16 @@ BOOL SwAutoCorrDoc::SetAttr( xub_StrLen nStt, xub_StrLen nEnd, USHORT nSlotId,
const SwNodeIndex& rNd = rCrsr.GetPoint()->nNode;
SwPaM aPam( rNd, nStt, rNd, nEnd );
- USHORT nWhich = rEditSh.GetDoc()->GetAttrPool().GetWhich( nSlotId, FALSE );
+ SfxItemPool& rPool = rEditSh.GetDoc()->GetAttrPool();
+ USHORT nWhich = rPool.GetWhich( nSlotId, FALSE );
if( nWhich )
{
rItem.SetWhich( nWhich );
- rEditSh.GetDoc()->SetFmtItemByAutoFmt( aPam, rItem );
+
+ SfxItemSet aSet( rPool, aCharFmtSetRange );
+ SetAllScriptItem( aSet, rItem );
+
+ rEditSh.GetDoc()->SetFmtItemByAutoFmt( aPam, aSet );
if( !nUndoId )
nUndoId = USHRT_MAX;
@@ -314,8 +319,10 @@ BOOL SwAutoCorrDoc::SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String&
const SwNodeIndex& rNd = rCrsr.GetPoint()->nNode;
SwPaM aPam( rNd, nStt, rNd, nEnd );
- rEditSh.GetDoc()->SetFmtItemByAutoFmt( aPam,
- SwFmtINetFmt( rURL, aEmptyStr ));
+ SfxItemSet aSet( rEditSh.GetDoc()->GetAttrPool(),
+ RES_TXTATR_INETFMT, RES_TXTATR_INETFMT );
+ aSet.Put( SwFmtINetFmt( rURL, aEmptyStr ));
+ rEditSh.GetDoc()->SetFmtItemByAutoFmt( aPam, aSet );
if( !nUndoId )
nUndoId = USHRT_MAX;
return TRUE;
@@ -371,7 +378,7 @@ BOOL SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPos,
LanguageType eLang = GetLanguage(nEndPos, FALSE);
if(LANGUAGE_SYSTEM == eLang)
- eLang = GetAppLanguage();
+ eLang = (LanguageType)GetAppLanguage();
//JP 22.04.99: Bug 63883 - Sonderbehandlung fuer Punkte.
BOOL bLastCharIsPoint = nEndPos < pTxtNd->GetTxt().Len() &&
@@ -503,7 +510,7 @@ LanguageType SwAutoCorrDoc::GetLanguage( xub_StrLen nPos, BOOL bPrevPara ) const
if( pNd )
eRet = pNd->GetLang( nPos, 0 );
if(LANGUAGE_SYSTEM == eRet)
- eRet = GetAppLanguage();
+ eRet = (LanguageType)GetAppLanguage();
return eRet;
}
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index a04b2156e0cd..2ce7cf89052e 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: autofmt.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: jp $ $Date: 2001-10-08 17:33:22 $
+ * last change: $Author: jp $ $Date: 2002-02-22 12:00:10 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1761,22 +1761,26 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel )
sChgStr.Insert( aFlags.cBullet, 0 );
pDoc->Insert( aDelPam, sChgStr );
+ SfxItemSet aSet( pDoc->GetAttrPool(), aTxtNodeSetRange );
if( bChgBullet )
{
aDelPam.GetPoint()->nContent = 0;
aDelPam.SetMark();
aDelPam.GetMark()->nContent = 1;
- SvxFontItem aFnt( aFlags.aBulletFont.GetFamily(),
+ SetAllScriptItem( aSet,
+ SvxFontItem( aFlags.aBulletFont.GetFamily(),
aFlags.aBulletFont.GetName(),
aFlags.aBulletFont.GetStyleName(),
aFlags.aBulletFont.GetPitch(),
- aFlags.aBulletFont.GetCharSet() );
- pDoc->SetFmtItemByAutoFmt( aDelPam, aFnt );
+ aFlags.aBulletFont.GetCharSet() ) );
+ pDoc->SetFmtItemByAutoFmt( aDelPam, aSet );
aDelPam.DeleteMark();
nAutoCorrPos = 2;
+ aSet.ClearItem();
}
SvxTabStopItem aTStops; aTStops.Insert( SvxTabStop( 0 ));
- pDoc->SetFmtItemByAutoFmt( aDelPam, aTStops );
+ aSet.Put( aTStops );
+ pDoc->SetFmtItemByAutoFmt( aDelPam, aSet );
}
}