summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-10 15:10:11 +0200
committerNoel Grandin <noel@peralex.com>2015-03-11 10:16:53 +0200
commit68c87b46fd26291463989d5bf751bc4cecf09b28 (patch)
treea416573cc62487ba2f419080a1186251ed887478 /sw/source
parent82c37453482e6b8bd6ab7b7e96b1257a1d5b0699 (diff)
convert SetAttrMode to enum class
Change-Id: If7dd0c49480756afb7d4eaaba597ecc305c35f64
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/crsr/crstrvl.cxx6
-rw-r--r--sw/source/core/crsr/findattr.cxx4
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx10
-rw-r--r--sw/source/core/doc/doc.cxx2
-rw-r--r--sw/source/core/doc/docfmt.cxx8
-rw-r--r--sw/source/core/doc/doclay.cxx4
-rw-r--r--sw/source/core/doc/docnum.cxx6
-rw-r--r--sw/source/core/doc/docredln.cxx6
-rw-r--r--sw/source/core/doc/docruby.cxx4
-rw-r--r--sw/source/core/doc/doctxm.cxx4
-rw-r--r--sw/source/core/doc/extinput.cxx2
-rw-r--r--sw/source/core/doc/textboxhelper.cxx2
-rw-r--r--sw/source/core/edit/autofmt.cxx2
-rw-r--r--sw/source/core/edit/edatmisc.cxx4
-rw-r--r--sw/source/core/edit/edfld.cxx4
-rw-r--r--sw/source/core/edit/edlingu.cxx4
-rw-r--r--sw/source/core/edit/edtox.cxx4
-rw-r--r--sw/source/core/frmedt/fedesc.cxx2
-rw-r--r--sw/source/core/frmedt/fews.cxx2
-rw-r--r--sw/source/core/inc/DocumentContentOperationsManager.hxx4
-rw-r--r--sw/source/core/tox/ToxTextGenerator.cxx2
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx26
-rw-r--r--sw/source/core/txtnode/thints.cxx34
-rw-r--r--sw/source/core/txtnode/txtedt.cxx4
-rw-r--r--sw/source/core/undo/rolbck.cxx10
-rw-r--r--sw/source/core/unocore/unofield.cxx6
-rw-r--r--sw/source/core/unocore/unoftn.cxx4
-rw-r--r--sw/source/core/unocore/unoidx.cxx6
-rw-r--r--sw/source/core/unocore/unoobj.cxx4
-rw-r--r--sw/source/core/unocore/unoobj2.cxx2
-rw-r--r--sw/source/core/unocore/unorefmk.cxx12
-rw-r--r--sw/source/core/unocore/unotbl.cxx4
-rw-r--r--sw/source/core/unocore/unotext.cxx2
-rw-r--r--sw/source/filter/ascii/parasc.cxx4
-rw-r--r--sw/source/filter/basflt/fltshell.cxx6
-rw-r--r--sw/source/filter/html/htmlfld.cxx4
-rw-r--r--sw/source/filter/html/htmlftn.cxx2
-rw-r--r--sw/source/filter/html/swhtml.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par.cxx16
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx50
-rw-r--r--sw/source/ui/misc/insfnote.cxx2
-rw-r--r--sw/source/uibase/app/docst.cxx2
-rw-r--r--sw/source/uibase/docvw/PageBreakWin.cxx2
-rw-r--r--sw/source/uibase/shells/textsh.cxx2
-rw-r--r--sw/source/uibase/shells/textsh1.cxx4
-rw-r--r--sw/source/uibase/shells/txtattr.cxx2
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx2
48 files changed, 155 insertions, 155 deletions
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index e11fdd2e9e6b..0d05960fb067 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -1888,7 +1888,7 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
{
*m_pCurCrsr->GetPoint() = aPos;
GetDoc()->getIDocumentContentOperations().InsertPoolItem( *m_pCurCrsr,
- SvxFmtBreakItem( SVX_BREAK_COLUMN_BEFORE, RES_BREAK ), 0);
+ SvxFmtBreakItem( SVX_BREAK_COLUMN_BEFORE, RES_BREAK ) );
}
}
@@ -1913,7 +1913,7 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
if( SVX_ADJUST_LEFT != rAdj.GetAdjust() )
aSet.Put( SvxAdjustItem( SVX_ADJUST_LEFT, RES_PARATR_ADJUST ) );
- GetDoc()->getIDocumentContentOperations().InsertItemSet( *m_pCurCrsr, aSet, 0 );
+ GetDoc()->getIDocumentContentOperations().InsertItemSet( *m_pCurCrsr, aSet );
}
else {
OSL_ENSURE( false, "No CntntNode" );
@@ -1947,7 +1947,7 @@ bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
default:
break;
}
- GetDoc()->getIDocumentContentOperations().InsertPoolItem( *m_pCurCrsr, aAdj, 0 );
+ GetDoc()->getIDocumentContentOperations().InsertPoolItem( *m_pCurCrsr, aAdj );
}
break;
}
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 1f23490c2a3d..cf399d5f55dd 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -1181,7 +1181,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
// they are not in ReplaceSet
if( !pSet->Count() )
{
- pCrsr->GetDoc()->getIDocumentContentOperations().InsertItemSet( *pCrsr, *pReplSet, 0 );
+ pCrsr->GetDoc()->getIDocumentContentOperations().InsertItemSet( *pCrsr, *pReplSet );
}
else
{
@@ -1202,7 +1202,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
pItem = aIter.NextItem();
}
aSet.Put( *pReplSet );
- pCrsr->GetDoc()->getIDocumentContentOperations().InsertItemSet( *pCrsr, aSet, 0 );
+ pCrsr->GetDoc()->getIDocumentContentOperations().InsertItemSet( *pCrsr, aSet );
}
return FIND_NO_RING;
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 9c1f701233fa..94a2e77cf501 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -1205,7 +1205,7 @@ namespace //local functions originally from docfmt.cxx
SwFmtPageDesc aNew( *pDesc );
// Tables now also know line breaks
- if( 0 == (nFlags & nsSetAttrMode::SETATTR_APICALL) &&
+ if( !(nFlags & SetAttrMode::APICALL) &&
0 != ( pTblNd = pNode->FindTableNode() ) )
{
SwTableNode* pCurTblNd = pTblNd;
@@ -1241,7 +1241,7 @@ namespace //local functions originally from docfmt.cxx
// Tables now also know line breaks
const SvxFmtBreakItem* pBreak;
- if( pNode && 0 == (nFlags & nsSetAttrMode::SETATTR_APICALL) &&
+ if( pNode && !(nFlags & SetAttrMode::APICALL) &&
0 != (pTblNd = pNode->FindTableNode() ) &&
SfxItemState::SET == pOtherSet->GetItemState( RES_BREAK,
false, reinterpret_cast<const SfxPoolItem**>(&pBreak) ) )
@@ -1329,7 +1329,7 @@ namespace //local functions originally from docfmt.cxx
// if the selection spans across the whole paragraph.
// These attributes are inserted as FormatAttributes and
// never override the TextAttributes!
- if( !(nFlags & nsSetAttrMode::SETATTR_DONTREPLACE ) &&
+ if( !(nFlags & SetAttrMode::DONTREPLACE ) &&
pTxtNd->HasHints() && !nMkPos && nPtPos == rStr.getLength())
{
SwIndex aSt( pTxtNd );
@@ -1490,7 +1490,7 @@ namespace //local functions originally from docfmt.cxx
/* Edit the fully selected Nodes. */
// Reset all attributes from the set!
- if( pCharSet && pCharSet->Count() && !( nsSetAttrMode::SETATTR_DONTREPLACE & nFlags ) )
+ if( pCharSet && pCharSet->Count() && !( SetAttrMode::DONTREPLACE & nFlags ) )
{
::sw::DocumentContentOperationsManager::ParaRstFmt aPara( pStt, pEnd, pHistory, 0, pCharSet );
pDoc->GetNodes().ForEach( aSt, aEnd, ::sw::DocumentContentOperationsManager::lcl_RstTxtAttr, &aPara );
@@ -3868,7 +3868,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
*aTmpRange.GetMark() = *aDelPam.GetPoint();
m_rDoc.RstTxtAttrs( aTmpRange );
- InsertItemSet( aTmpRange, aSet, 0 );
+ InsertItemSet( aTmpRange, aSet );
}
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 1a470e05d50c..2af2a44a89d3 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -592,7 +592,7 @@ static void lcl_FormatPostIt(
if (bNewPage)
{
- pIDCO->InsertPoolItem( aPam, SvxFmtBreakItem( SVX_BREAK_PAGE_AFTER, RES_BREAK ), 0 );
+ pIDCO->InsertPoolItem( aPam, SvxFmtBreakItem( SVX_BREAK_PAGE_AFTER, RES_BREAK ) );
pIDCO->SplitNode( *aPam.GetPoint(), false );
}
else if (!bIsFirstPostIt)
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index cfa65b85ed9f..a5d913844a9c 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -424,7 +424,7 @@ bool SwDoc::UpdateRsid( const SwPaM &rRg, const sal_Int32 nLen )
SfxItemSet aSet(GetAttrPool(), RES_CHRATR_RSID, RES_CHRATR_RSID);
aSet.Put(aRsid);
bool const bRet(pTxtNode->SetAttr(aSet, nStart,
- rRg.GetPoint()->nContent.GetIndex(), nsSetAttrMode::SETATTR_DEFAULT));
+ rRg.GetPoint()->nContent.GetIndex(), SetAttrMode::DEFAULT));
if (bRet && GetIDocumentUndoRedo().DoesUndo())
{
@@ -1784,7 +1784,7 @@ void SwDoc::SetTxtFmtCollByAutoFmt( const SwPosition& rPos, sal_uInt16 nPoolId,
{
aPam.SetMark();
aPam.GetMark()->nContent.Assign(pTNd, pTNd->GetTxt().getLength());
- getIDocumentContentOperations().InsertItemSet( aPam, *pSet, 0 );
+ getIDocumentContentOperations().InsertItemSet( aPam, *pSet );
}
}
@@ -1831,13 +1831,13 @@ void SwDoc::SetFmtItemByAutoFmt( const SwPaM& rPam, const SfxItemSet& rSet )
currentSet.Put(currentSet.Get(whichIds[i], true));
}
- getIDocumentContentOperations().InsertItemSet( rPam, rSet, nsSetAttrMode::SETATTR_DONTEXPAND );
+ getIDocumentContentOperations().InsertItemSet( rPam, rSet, SetAttrMode::DONTEXPAND );
// fdo#62536: DONTEXPAND does not work when there is already an AUTOFMT
// here, so insert the old attributes as an empty hint to stop expand
SwPaM endPam(*pTNd, nEnd);
endPam.SetMark();
- getIDocumentContentOperations().InsertItemSet(endPam, currentSet, nsSetAttrMode::SETATTR_DEFAULT);
+ getIDocumentContentOperations().InsertItemSet(endPam, currentSet, SetAttrMode::DEFAULT);
getIDocumentRedlineAccess().SetRedlineMode_intern( eOld );
}
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 2729862980bd..4071f9684b10 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -920,7 +920,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
{
SwFmtCharFmt aCharFmt( pCharFmt );
pNew->InsertItem( aCharFmt, 0,
- nSepIdx + 1, nsSetAttrMode::SETATTR_DONTEXPAND );
+ nSepIdx + 1, SetAttrMode::DONTEXPAND );
}
}
}
@@ -1212,7 +1212,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl,
{
SwFmtCharFmt aCharFmt( pCharFmt );
pNew->InsertItem( aCharFmt, 0, nSepIdx + 1,
- nsSetAttrMode::SETATTR_DONTEXPAND );
+ SetAttrMode::DONTEXPAND );
}
}
}
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 82143796112f..8f6c0d91baf8 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -880,7 +880,7 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
}
if (!sListId.isEmpty())
{
- getIDocumentContentOperations().InsertPoolItem( rPam, SfxStringItem( RES_PARATR_LIST_ID, sListId ), 0 );
+ getIDocumentContentOperations().InsertPoolItem( rPam, SfxStringItem( RES_PARATR_LIST_ID, sListId ) );
}
}
@@ -920,7 +920,7 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
if ( bSetItem )
{
- getIDocumentContentOperations().InsertPoolItem( rPam, SwNumRuleItem( pNewOrChangedNumRule->GetName() ), 0 );
+ getIDocumentContentOperations().InsertPoolItem( rPam, SwNumRuleItem( pNewOrChangedNumRule->GetName() ) );
}
if ( bResetIndentAttrs
@@ -946,7 +946,7 @@ void SwDoc::SetCounted(const SwPaM & rPam, bool bCounted)
}
else
{
- getIDocumentContentOperations().InsertPoolItem( rPam, SfxBoolItem( RES_PARATR_LIST_ISCOUNTED, false ), 0 );
+ getIDocumentContentOperations().InsertPoolItem( rPam, SfxBoolItem( RES_PARATR_LIST_ISCOUNTED, false ) );
}
}
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index ec1e7f963dfb..4c49adf91943 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -651,11 +651,11 @@ void SwRedlineExtraData_FmtColl::Reject( SwPaM& rPam ) const
// could have changed, but we don't touch these.
SfxItemSet aTmp( *pSet );
aTmp.Differentiate( *pTNd->GetpSwAttrSet() );
- pDoc->getIDocumentContentOperations().InsertItemSet( rPam, aTmp, 0 );
+ pDoc->getIDocumentContentOperations().InsertItemSet( rPam, aTmp );
}
else
{
- pDoc->getIDocumentContentOperations().InsertItemSet( rPam, *pSet, 0 );
+ pDoc->getIDocumentContentOperations().InsertItemSet( rPam, *pSet );
}
}
rPam.DeleteMark();
@@ -720,7 +720,7 @@ void SwRedlineExtraData_Format::Reject( SwPaM& rPam ) const
for( it = aWhichIds.begin(); it != aWhichIds.end(); ++it )
{
pDoc->getIDocumentContentOperations().InsertPoolItem( rPam, *GetDfltAttr( *it ),
- nsSetAttrMode::SETATTR_DONTEXPAND );
+ SetAttrMode::DONTEXPAND );
}
pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld );
diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx
index e2e676410500..6e3fb3d41489 100644
--- a/sw/source/core/doc/docruby.cxx
+++ b/sw/source/core/doc/docruby.cxx
@@ -127,7 +127,7 @@ sal_uInt16 SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
// set/reset the attribute
if( !pEntry->GetRubyAttr().GetText().isEmpty() )
{
- getIDocumentContentOperations().InsertPoolItem( aPam, pEntry->GetRubyAttr(), 0 );
+ getIDocumentContentOperations().InsertPoolItem( aPam, pEntry->GetRubyAttr() );
}
else
{
@@ -163,7 +163,7 @@ sal_uInt16 SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
aPam.SetMark();
aPam.GetMark()->nContent -= pEntry->GetText().getLength();
getIDocumentContentOperations().InsertPoolItem(
- aPam, pEntry->GetRubyAttr(), nsSetAttrMode::SETATTR_DONTEXPAND );
+ aPam, pEntry->GetRubyAttr(), SetAttrMode::DONTEXPAND );
}
else
break;
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index aa05171caf8c..3f3d3573c3c0 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1804,7 +1804,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
if(pPageNoCharFmt)
{
SwFmtCharFmt aCharFmt( pPageNoCharFmt );
- pNd->InsertItem(aCharFmt, nStartPos, nStartPos + aNumStr.getLength(), nsSetAttrMode::SETATTR_DONTEXPAND);
+ pNd->InsertItem(aCharFmt, nStartPos, nStartPos + aNumStr.getLength(), SetAttrMode::DONTEXPAND);
}
// The main entries should get their character style
@@ -1832,7 +1832,7 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
{
sal_Int32 nStartIdx = (*xCharStyleIdx)[j] + nOffset;
sal_Int32 nEndIdx = (*xCharStyleIdx)[j + 1] + nOffset;
- pNd->InsertItem(aCharFmt, nStartIdx, nEndIdx, nsSetAttrMode::SETATTR_DONTEXPAND);
+ pNd->InsertItem(aCharFmt, nStartIdx, nEndIdx, SetAttrMode::DONTEXPAND);
}
}
diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx
index c3bfa25a583f..ce348ef58442 100644
--- a/sw/source/core/doc/extinput.cxx
+++ b/sw/source/core/doc/extinput.cxx
@@ -81,7 +81,7 @@ SwExtTextInput::~SwExtTextInput()
if ( bLang )
{
SvxLanguageItem aLangItem( eInputLanguage, nWhich );
- pDoc->getIDocumentContentOperations().InsertPoolItem(*this, aLangItem, 0 );
+ pDoc->getIDocumentContentOperations().InsertPoolItem(*this, aLangItem );
}
}
rIdx = nSttCnt;
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index 28471b48ec7c..eb9ed84688ac 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -393,7 +393,7 @@ void SwTextBoxHelper::syncProperty(SwFrmFmt* pShape, const OUString& rPropertyNa
aPaM.GetMark()->nNode = *pMark;
aPaM.GetMark()->nContent.Assign(pMark, pMark->GetTxt().getLength());
SvxCharRotateItem aItem(900, false, RES_CHRATR_ROTATE);
- pFmt->GetDoc()->getIDocumentContentOperations().InsertPoolItem(aPaM, aItem, 0);
+ pFmt->GetDoc()->getIDocumentContentOperations().InsertPoolItem(aPaM, aItem);
}
}
}
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 622e62486aa3..b69d81f2c19e 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -575,7 +575,7 @@ bool SwAutoFormat::DoUnderline()
aBox.SetLine( &aLine, BOX_LINE_BOTTOM );
aBox.SetDistance( 42 ); // ~0,75 mm
aSet.Put(aBox);
- m_pDoc->getIDocumentContentOperations().InsertItemSet( m_aDelPam, aSet, 0 );
+ m_pDoc->getIDocumentContentOperations().InsertItemSet( m_aDelPam, aSet );
m_aDelPam.DeleteMark();
}
diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx
index 4b08a6214565..8a798195e6b0 100644
--- a/sw/source/core/edit/edatmisc.cxx
+++ b/sw/source/core/edit/edatmisc.cxx
@@ -95,7 +95,7 @@ const SfxPoolItem& SwEditShell::GetDefault( sal_uInt16 nFmtHint ) const
return GetDoc()->GetDefault( nFmtHint );
}
-void SwEditShell::SetAttrItem( const SfxPoolItem& rHint, sal_uInt16 nFlags )
+void SwEditShell::SetAttrItem( const SfxPoolItem& rHint, SetAttrMode nFlags )
{
SET_CURR_SHELL( this );
StartAllAction();
@@ -125,7 +125,7 @@ void SwEditShell::SetAttrItem( const SfxPoolItem& rHint, sal_uInt16 nFlags )
EndAllAction();
}
-void SwEditShell::SetAttrSet( const SfxItemSet& rSet, sal_uInt16 nFlags, SwPaM* pPaM )
+void SwEditShell::SetAttrSet( const SfxItemSet& rSet, SetAttrMode nFlags, SwPaM* pPaM )
{
SET_CURR_SHELL( this );
diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx
index 6d8360256969..6e05a4a53a16 100644
--- a/sw/source/core/edit/edfld.cxx
+++ b/sw/source/core/edit/edfld.cxx
@@ -201,8 +201,8 @@ void SwEditShell::Insert2(SwField& rFld, const bool bForceExpandHints)
SwFmtFld aFld( rFld );
const SetAttrMode nInsertFlags = (bForceExpandHints)
- ? nsSetAttrMode::SETATTR_FORCEHINTEXPAND
- : nsSetAttrMode::SETATTR_DEFAULT;
+ ? SetAttrMode::FORCEHINTEXPAND
+ : SetAttrMode::DEFAULT;
for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) // for each PaM
{
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 3809289d33af..926332708ba4 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -1172,13 +1172,13 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
mpDoc->getIDocumentContentOperations().DeleteAndJoin(*pCrsr);
// ... and apply language if necessary
if(aCurrentNewPortion->eLanguage != aCurrentOldPortion->eLanguage)
- SetAttrItem( SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId), nLangWhichId );
+ SetAttrItem( SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId) );
mpDoc->getIDocumentContentOperations().InsertString(*pCrsr, aCurrentNewPortion->sText);
}
else if(aCurrentNewPortion->eLanguage != aCurrentOldPortion->eLanguage)
{
// apply language
- SetAttrItem( SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId), nLangWhichId );
+ SetAttrItem( SvxLanguageItem(aCurrentNewPortion->eLanguage, nLangWhichId) );
}
else if( aCurrentNewPortion->bIgnoreThisError )
{
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index 591353bb079b..0fe3c0a1b9b6 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -67,12 +67,12 @@ void SwEditShell::Insert(const SwTOXMark& rMark)
if( bInsAtPos )
{
SwPaM aTmp( *pStt );
- GetDoc()->getIDocumentContentOperations().InsertPoolItem( aTmp, rMark, 0 );
+ GetDoc()->getIDocumentContentOperations().InsertPoolItem( aTmp, rMark );
}
else if( *pEnd != *pStt )
{
GetDoc()->getIDocumentContentOperations().InsertPoolItem(
- rPaM, rMark, nsSetAttrMode::SETATTR_DONTEXPAND );
+ rPaM, rMark, SetAttrMode::DONTEXPAND );
}
}
diff --git a/sw/source/core/frmedt/fedesc.cxx b/sw/source/core/frmedt/fedesc.cxx
index 67f786d461cd..2c0b31f51445 100644
--- a/sw/source/core/frmedt/fedesc.cxx
+++ b/sw/source/core/frmedt/fedesc.cxx
@@ -97,7 +97,7 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc )
else
{
SwPaM aPaM( *static_cast<const SwCntntFrm*>(pFlow)->GetNode() );
- GetDoc()->getIDocumentContentOperations().InsertPoolItem( aPaM, aNew, 0 );
+ GetDoc()->getIDocumentContentOperations().InsertPoolItem( aPaM, aNew );
}
EndAllActionAndCall();
}
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index fe86783dd7a0..dd9c2153a170 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -329,7 +329,7 @@ static void lcl_SetAPageOffset( sal_uInt16 nOffset, SwPageFrm* pPage, SwFEShell*
pThis->GetDoc()->SetAttr( aDesc, *pFrm->FindTabFrm()->GetFmt() );
else
{
- pThis->GetDoc()->getIDocumentContentOperations().InsertPoolItem( *pThis->GetCrsr(), aDesc, 0 );
+ pThis->GetDoc()->getIDocumentContentOperations().InsertPoolItem( *pThis->GetCrsr(), aDesc );
}
pThis->EndAllAction();
diff --git a/sw/source/core/inc/DocumentContentOperationsManager.hxx b/sw/source/core/inc/DocumentContentOperationsManager.hxx
index adf7498a0435..5adeaa9f5297 100644
--- a/sw/source/core/inc/DocumentContentOperationsManager.hxx
+++ b/sw/source/core/inc/DocumentContentOperationsManager.hxx
@@ -90,10 +90,10 @@ public:
// Add a para for the char attribute exp...
bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&,
- const sal_uInt16 nFlags,bool bExpandCharToPara=false) SAL_OVERRIDE;
+ const SetAttrMode nFlags = SetAttrMode::DEFAULT, bool bExpandCharToPara=false) SAL_OVERRIDE;
bool InsertItemSet (const SwPaM &rRg, const SfxItemSet&,
- const sal_uInt16 nFlags) SAL_OVERRIDE;
+ const SetAttrMode nFlags = SetAttrMode::DEFAULT) SAL_OVERRIDE;
void RemoveLeadingWhiteSpace(const SwPosition & rPos ) SAL_OVERRIDE;
diff --git a/sw/source/core/tox/ToxTextGenerator.cxx b/sw/source/core/tox/ToxTextGenerator.cxx
index eb4194a019ab..e3e10c185c12 100644
--- a/sw/source/core/tox/ToxTextGenerator.cxx
+++ b/sw/source/core/tox/ToxTextGenerator.cxx
@@ -252,7 +252,7 @@ ToxTextGenerator::GenerateText(SwDoc* pDoc, const std::vector<SwTOXSortTabBase*>
{
SwFmtCharFmt aFmt( pCharFmt );
pTOXNd->InsertItem( aFmt, nStartCharStyle,
- rTxt.getLength(), nsSetAttrMode::SETATTR_DONTEXPAND );
+ rTxt.getLength(), SetAttrMode::DONTEXPAND );
}
}
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 9a360fdc2983..0fbd0a573f08 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1596,7 +1596,7 @@ void SwTxtNode::CopyAttr( SwTxtNode *pDest, const sal_Int32 nTxtStartIdx,
{
// attribute in the area => copy
SwTxtAttr *const pNewHt =
- pDest->InsertItem( pHt->GetAttr(), nOldPos, nOldPos, nsSetAttrMode::SETATTR_IS_COPY);
+ pDest->InsertItem( pHt->GetAttr(), nOldPos, nOldPos, SetAttrMode::IS_COPY);
if ( pNewHt )
{
lcl_CopyHint( nWhich, pHt, pNewHt,
@@ -1608,7 +1608,7 @@ void SwTxtNode::CopyAttr( SwTxtNode *pDest, const sal_Int32 nTxtStartIdx,
: 0 == pOtherDoc->GetRefMark( pHt->GetRefMark().GetRefName() ) )
{
pDest->InsertItem(
- pHt->GetAttr(), nOldPos, nOldPos, nsSetAttrMode::SETATTR_IS_COPY);
+ pHt->GetAttr(), nOldPos, nOldPos, SetAttrMode::IS_COPY);
}
}
}
@@ -1853,7 +1853,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
pHt->GetAttr(),
nAttrStt - nDeletedDummyChars,
nAttrEnd - nDeletedDummyChars,
- nsSetAttrMode::SETATTR_NOTXTATRCHR | nsSetAttrMode::SETATTR_IS_COPY);
+ SetAttrMode::NOTXTATRCHR | SetAttrMode::IS_COPY);
if (pNewHt)
{
lcl_CopyHint( nWhich, pHt, pNewHt, pOtherDoc, pDest );
@@ -1877,7 +1877,7 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
// sich selbst passieren!!)
for ( size_t i = 0; i < aArr.size(); ++i )
{
- InsertHint( aArr[ i ], nsSetAttrMode::SETATTR_NOTXTATRCHR );
+ InsertHint( aArr[ i ], SetAttrMode::NOTXTATRCHR );
}
if( pDest->GetpSwpHints() )
@@ -1970,7 +1970,7 @@ OUString SwTxtNode::InsertText( const OUString & rStr, const SwIndex & rIdx,
{
bMergePortionsNeeded = true;
}
- InsertHint( pHt, nsSetAttrMode::SETATTR_NOHINTADJUST );
+ InsertHint( pHt, SetAttrMode::NOHINTADJUST );
}
// empty hints at insert position?
else if ( (nMode & IDocumentContentOperations::INS_EMPTYEXPAND)
@@ -1979,7 +1979,7 @@ OUString SwTxtNode::InsertText( const OUString & rStr, const SwIndex & rIdx,
pHt->GetStart() = pHt->GetStart() - nLen;
const size_t nAktLen = m_pSwpHints->Count();
m_pSwpHints->DeleteAtPos(i);
- InsertHint( pHt/* AUTOSTYLES:, nsSetAttrMode::SETATTR_NOHINTADJUST*/ );
+ InsertHint( pHt/* AUTOSTYLES:, SetAttrMode::NOHINTADJUST*/ );
if ( nAktLen > m_pSwpHints->Count() && i )
{
--i;
@@ -1999,7 +1999,7 @@ OUString SwTxtNode::InsertText( const OUString & rStr, const SwIndex & rIdx,
m_pSwpHints->DeleteAtPos(i);
pHt->GetStart() = pHt->GetStart() - nLen;
// no effect on format ignore flags here (para start)
- InsertHint( pHt, nsSetAttrMode::SETATTR_NOHINTADJUST );
+ InsertHint( pHt, SetAttrMode::NOHINTADJUST );
}
}
if (bMergePortionsNeeded)
@@ -2183,7 +2183,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
{
*pEndIdx = nDestStart + *pEndIdx;
}
- InsertHint( pNewHt, nsSetAttrMode::SETATTR_NOTXTATRCHR );
+ InsertHint( pNewHt, SetAttrMode::NOTXTATRCHR );
}
}
else
@@ -2302,8 +2302,8 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
: *pEndIdx - nTxtStartIdx );
}
pDest->InsertHint( pHt,
- nsSetAttrMode::SETATTR_NOTXTATRCHR
- | nsSetAttrMode::SETATTR_DONTREPLACE );
+ SetAttrMode::NOTXTATRCHR
+ | SetAttrMode::DONTREPLACE );
if ( GetDoc()->GetDocShell() )
{
GetDoc()->GetDocShell()->Broadcast( SfxSimpleHint(SFX_HINT_USER04));
@@ -2323,9 +2323,9 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
if ( pNewHt )
{
const bool bSuccess( pDest->InsertHint( pNewHt,
- nsSetAttrMode::SETATTR_NOTXTATRCHR
- | nsSetAttrMode::SETATTR_DONTREPLACE
- | nsSetAttrMode::SETATTR_IS_COPY) );
+ SetAttrMode::NOTXTATRCHR
+ | SetAttrMode::DONTREPLACE
+ | SetAttrMode::IS_COPY) );
if (bSuccess)
{
lcl_CopyHint( nWhich, pHt, pNewHt, pOtherDoc, pDest );
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index a22b7dcf9b4e..4ece3d2d4016 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -751,7 +751,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
// #i90311#
// Do not remove existing character format hint during XML import
if ( !rNode.GetDoc()->IsInXMLImport() &&
- ( !( nsSetAttrMode::SETATTR_DONTREPLACE & nMode ) ||
+ ( !( SetAttrMode::DONTREPLACE & nMode ) ||
bNoLengthAttribute ||
bSameCharFmt ) )
{
@@ -1231,7 +1231,7 @@ SwTxtAttr* SwTxtNode::InsertItem(
rAttr,
nStart,
nEnd,
- (nMode & nsSetAttrMode::SETATTR_IS_COPY) ? COPY : NEW,
+ (nMode & SetAttrMode::IS_COPY) ? COPY : NEW,
this );
if ( pNew )
@@ -1260,7 +1260,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
// translate from SetAttrMode to InsertMode (for hints with CH_TXTATR)
const enum IDocumentContentOperations::InsertFlags nInsertFlags =
- (nMode & nsSetAttrMode::SETATTR_FORCEHINTEXPAND)
+ (nMode & SetAttrMode::FORCEHINTEXPAND)
? static_cast<IDocumentContentOperations::InsertFlags>(
IDocumentContentOperations::INS_FORCEHINTEXPAND |
IDocumentContentOperations::INS_EMPTYEXPAND)
@@ -1271,14 +1271,14 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
const bool bDummyChar( pAttr->HasDummyChar() );
if (bDummyChar)
{
- sal_uInt16 nInsMode = nMode;
+ SetAttrMode nInsMode = nMode;
switch( pAttr->Which() )
{
case RES_TXTATR_FLYCNT:
{
SwTxtFlyCnt *pFly = static_cast<SwTxtFlyCnt *>(pAttr);
SwFrmFmt* pFmt = pAttr->GetFlyCnt().GetFrmFmt();
- if( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nInsMode) )
+ if( !(SetAttrMode::NOTXTATRCHR & nInsMode) )
{
// Wir muessen zuerst einfuegen, da in SetAnchor()
// dem FlyFrm GetStart() uebermittelt wird.
@@ -1301,7 +1301,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
DestroyAttr(pAttr);
return false; // text node full :(
}
- nInsMode |= nsSetAttrMode::SETATTR_NOTXTATRCHR;
+ nInsMode |= SetAttrMode::NOTXTATRCHR;
if (pAnchor &&
(FLY_AS_CHAR == pAnchor->GetAnchorId()) &&
@@ -1335,7 +1335,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
// Der Dtor des TxtHints loescht nicht das Zeichen.
// Wenn ein CH_TXTATR_.. vorliegt, dann muss man
// dieses explizit loeschen
- if( nsSetAttrMode::SETATTR_NOTXTATRCHR & nInsMode )
+ if( SetAttrMode::NOTXTATRCHR & nInsMode )
{
// loesche das Zeichen aus dem String !
OSL_ENSURE( ( CH_TXTATR_BREAKWORD ==
@@ -1371,7 +1371,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
// Der Dtor des TxtHints loescht nicht das Zeichen.
// Wenn ein CH_TXTATR_.. vorliegt, dann muss man
// dieses explizit loeschen
- if( nsSetAttrMode::SETATTR_NOTXTATRCHR & nInsMode )
+ if( SetAttrMode::NOTXTATRCHR & nInsMode )
{
// loesche das Zeichen aus dem String !
OSL_ENSURE( ( CH_TXTATR_BREAKWORD ==
@@ -1412,7 +1412,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
}
}
- if( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nInsMode) )
+ if( !(SetAttrMode::NOTXTATRCHR & nInsMode) )
{
// Wir muessen zuerst einfuegen, da sonst gleiche Indizes
// entstehen koennen und das Attribut im _SortArr_ am
@@ -1425,7 +1425,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
DestroyAttr(pAttr);
return false; // text node full :(
}
- nInsMode |= nsSetAttrMode::SETATTR_NOTXTATRCHR;
+ nInsMode |= SetAttrMode::NOTXTATRCHR;
}
// Wir tragen uns am FtnIdx-Array des Docs ein ...
@@ -1481,7 +1481,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
// eingefuegt, aStart muss danach um einen zurueckgesetzt werden.
// Wenn wir im SwTxtNode::Copy stehen, so wurde das Zeichen bereits
// mitkopiert. In solchem Fall ist SETATTR_NOTXTATRCHR angegeben worden.
- if( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nInsMode) )
+ if( !(SetAttrMode::NOTXTATRCHR & nInsMode) )
{
SwIndex aIdx( this, pAttr->GetStart() );
OUString const ins( InsertText(OUString(GetCharOfTxtAttr(*pAttr)),
@@ -1515,7 +1515,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
SwTxtInputFld* pTxtInputFld = dynamic_cast<SwTxtInputFld*>(pAttr);
if ( pTxtInputFld )
{
- if( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nMode) )
+ if( !(SetAttrMode::NOTXTATRCHR & nMode) )
{
SwIndex aIdx( this, pAttr->GetStart() );
InsertText( OUString(CH_TXT_ATR_INPUTFIELDSTART), aIdx, nInsertFlags );
@@ -1602,7 +1602,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
if ( !bRet )
{
if ( bDummyChar
- && !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nMode) )
+ && !(SetAttrMode::NOTXTATRCHR & nMode) )
{
// undo insertion of dummy character
// N.B. cannot insert the dummy character after inserting the hint,
@@ -1617,7 +1617,7 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
if ( bHasContent )
{
- if ( !(nsSetAttrMode::SETATTR_NOTXTATRCHR & nMode)
+ if ( !(SetAttrMode::NOTXTATRCHR & nMode)
&& (nEnd - nStart) > 0 )
{
SwIndex aIdx( this, nStart );
@@ -1866,7 +1866,7 @@ bool SwTxtNode::SetAttr(
// gesamter Bereich
if ( !nStt && (nEnd == m_Text.getLength()) &&
- !(nMode & nsSetAttrMode::SETATTR_NOFORMATATTR ) )
+ !(nMode & SetAttrMode::NOFORMATATTR ) )
{
// sind am Node schon Zeichenvorlagen gesetzt, muss man diese Attribute
// (rSet) immer als TextAttribute setzen, damit sie angezeigt werden.
@@ -3172,7 +3172,7 @@ bool SwpHints::TryInsertHint(
break;
}
- if( nsSetAttrMode::SETATTR_DONTEXPAND & nMode )
+ if( SetAttrMode::DONTEXPAND & nMode )
pHint->SetDontExpand( true );
// SwTxtAttrs ohne Ende werden sonderbehandelt:
@@ -3217,7 +3217,7 @@ bool SwpHints::TryInsertHint(
// I need this value later on for notification but the pointer may become invalid
const sal_Int32 nHintEnd = *pHtEnd;
- const bool bNoHintAdjustMode = (nsSetAttrMode::SETATTR_NOHINTADJUST & nMode);
+ const bool bNoHintAdjustMode = bool(SetAttrMode::NOHINTADJUST & nMode);
// handle nesting attributes: inserting may fail due to overlap!
if (pHint->IsNesting())
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index c40f1a603151..9f400fcc8d48 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -614,7 +614,7 @@ void SwTxtNode::RstTxtAttr(
// delay inserting the hints because it re-sorts the hints array
for (SwTxtAttr *const pNew : newAttributes)
{
- InsertHint(pNew, nsSetAttrMode::SETATTR_NOHINTADJUST);
+ InsertHint(pNew, SetAttrMode::NOHINTADJUST);
}
TryDeleteSwpHints();
@@ -1075,7 +1075,7 @@ void SwTxtNode::SetLanguageAndFont( const SwPaM &rPaM,
aSet.Put( aFontItem );
}
- GetDoc()->getIDocumentContentOperations().InsertItemSet( rPaM, aSet, 0 );
+ GetDoc()->getIDocumentContentOperations().InsertItemSet( rPaM, aSet );
// SetAttr( aSet ); <- Does not set language attribute of empty paragraphs correctly,
// <- because since there is no selection the flag to garbage
// <- collect all attributes is set, and therefore attributes spanned
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index cadf03ad4201..1c1a7fceebad 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -238,8 +238,8 @@ void SwHistorySetTxt::SetInDoc( SwDoc* pDoc, bool )
if ( pTxtNd )
{
SwTxtAttr *const pAttr = pTxtNd->InsertItem(*m_pAttr, m_nStart, m_nEnd,
- nsSetAttrMode::SETATTR_NOTXTATRCHR |
- nsSetAttrMode::SETATTR_NOHINTADJUST );
+ SetAttrMode::NOTXTATRCHR |
+ SetAttrMode::NOHINTADJUST );
// shouldn't be possible to hit any error/merging path from here
assert(pAttr);
if (m_bFormatIgnoreStart)
@@ -307,7 +307,7 @@ void SwHistorySetTxtFld::SetInDoc( SwDoc* pDoc, bool )
if ( pTxtNd )
{
pTxtNd->InsertItem( *m_pFld, m_nPos, m_nPos,
- nsSetAttrMode::SETATTR_NOTXTATRCHR );
+ SetAttrMode::NOTXTATRCHR );
}
}
@@ -334,7 +334,7 @@ void SwHistorySetRefMark::SetInDoc( SwDoc* pDoc, bool )
!pTxtNd->GetTxtAttrForCharAt( m_nStart, RES_TXTATR_REFMARK ) )
{
pTxtNd->InsertItem( aRefMark, m_nStart, m_nEnd,
- nsSetAttrMode::SETATTR_NOTXTATRCHR );
+ SetAttrMode::NOTXTATRCHR );
}
}
@@ -378,7 +378,7 @@ void SwHistorySetTOXMark::SetInDoc( SwDoc* pDoc, bool )
aNew.RegisterToTOXType( *pToxType );
pTxtNd->InsertItem( aNew, m_nStart, m_nEnd,
- nsSetAttrMode::SETATTR_NOTXTATRCHR );
+ SetAttrMode::NOTXTATRCHR );
}
bool SwHistorySetTOXMark::IsEqual( const SwTOXMark& rCmp ) const
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 723dfb3b1f55..75d59a8820e2 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -1952,8 +1952,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
: false );
const SetAttrMode nInsertFlags =
(bForceExpandHints)
- ? nsSetAttrMode::SETATTR_FORCEHINTEXPAND
- : nsSetAttrMode::SETATTR_DEFAULT;
+ ? SetAttrMode::FORCEHINTEXPAND
+ : SetAttrMode::DEFAULT;
if (*aPam.GetPoint() != *aPam.GetMark() &&
m_pImpl->m_nServiceId == SW_SERVICE_FIELDTYPE_ANNOTATION)
@@ -2021,7 +2021,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
SwFmtFld aFmtFld( *pPostItField );
delete pPostItField;
SwPaM aEnd( *aIntPam.End(), *aIntPam.End() );
- m_pImpl->m_pDoc->getIDocumentContentOperations().InsertPoolItem( aEnd, aFmtFld, nsSetAttrMode::SETATTR_DEFAULT );
+ m_pImpl->m_pDoc->getIDocumentContentOperations().InsertPoolItem( aEnd, aFmtFld, SetAttrMode::DEFAULT );
// delete former annotation
{
const SwTxtFld* pTxtFld = m_pImpl->m_pFmtFld->GetTxtFld();
diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx
index b0b750236448..20c86e227c5c 100644
--- a/sw/source/core/unocore/unoftn.cxx
+++ b/sw/source/core/unocore/unoftn.cxx
@@ -323,8 +323,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
dynamic_cast<SwXTextCursor*>(pCursor));
const bool bForceExpandHints( pTextCursor && pTextCursor->IsAtEndOfMeta() );
const SetAttrMode nInsertFlags = (bForceExpandHints)
- ? nsSetAttrMode::SETATTR_FORCEHINTEXPAND
- : nsSetAttrMode::SETATTR_DEFAULT;
+ ? SetAttrMode::FORCEHINTEXPAND
+ : SetAttrMode::DEFAULT;
pNewDoc->getIDocumentContentOperations().InsertPoolItem(aPam, aFootNote, nInsertFlags);
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index 4d2efa310470..cd8d6015a9c8 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -1981,9 +1981,9 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(
const bool bForceExpandHints( !bMark && pTextCursor && pTextCursor->IsAtEndOfMeta() );
const SetAttrMode nInsertFlags = (bForceExpandHints)
- ? ( nsSetAttrMode::SETATTR_FORCEHINTEXPAND
- | nsSetAttrMode::SETATTR_DONTEXPAND)
- : nsSetAttrMode::SETATTR_DONTEXPAND;
+ ? ( SetAttrMode::FORCEHINTEXPAND
+ | SetAttrMode::DONTEXPAND)
+ : SetAttrMode::DONTEXPAND;
::std::vector<SwTxtAttr *> oldMarks;
if (bMark)
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index fdaf53d41f6d..856f3a1218cf 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -390,8 +390,8 @@ lcl_setCharFmtSequence(SwPaM & rPam, uno::Any const& rValue)
// the first style should replace the current attributes,
// all other have to be added
SwUnoCursorHelper::SetCrsrAttr(rPam, aSet, (nStyle)
- ? nsSetAttrMode::SETATTR_DONTREPLACE
- : nsSetAttrMode::SETATTR_DEFAULT);
+ ? SetAttrMode::DONTREPLACE
+ : SetAttrMode::DEFAULT);
rPam.GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_START, NULL);
}
return true;
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index d018b198f183..2756143db2cc 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -307,7 +307,7 @@ void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam,
const SfxItemSet& rSet,
const SetAttrMode nAttrMode, const bool bTableMode)
{
- const SetAttrMode nFlags = nAttrMode | nsSetAttrMode::SETATTR_APICALL;
+ const SetAttrMode nFlags = nAttrMode | SetAttrMode::APICALL;
SwDoc* pDoc = rPam.GetDoc();
//StartEndAction
UnoActionContext aAction(pDoc);
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index 96a55a34dba4..442a65b584ec 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -211,9 +211,9 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
const bool bForceExpandHints( !bMark && pCursor && pCursor->IsAtEndOfMeta() );
const SetAttrMode nInsertFlags = (bForceExpandHints)
- ? ( nsSetAttrMode::SETATTR_FORCEHINTEXPAND
- | nsSetAttrMode::SETATTR_DONTEXPAND)
- : nsSetAttrMode::SETATTR_DONTEXPAND;
+ ? ( SetAttrMode::FORCEHINTEXPAND
+ | SetAttrMode::DONTEXPAND)
+ : SetAttrMode::DONTEXPAND;
::std::vector<SwTxtAttr *> oldMarks;
if (bMark)
@@ -1030,9 +1030,9 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
dynamic_cast<SwXTextCursor*>(pCursor));
const bool bForceExpandHints(pTextCursor && pTextCursor->IsAtEndOfMeta());
const SetAttrMode nInsertFlags( (bForceExpandHints)
- ? ( nsSetAttrMode::SETATTR_FORCEHINTEXPAND
- | nsSetAttrMode::SETATTR_DONTEXPAND)
- : nsSetAttrMode::SETATTR_DONTEXPAND );
+ ? ( SetAttrMode::FORCEHINTEXPAND
+ | SetAttrMode::DONTEXPAND)
+ : SetAttrMode::DONTEXPAND );
const ::boost::shared_ptr< ::sw::Meta> pMeta( (RES_TXTATR_META == i_nWhich)
? ::boost::shared_ptr< ::sw::Meta>( new ::sw::Meta() )
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index b8dc755181fe..75f2b0c773ad 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -1854,7 +1854,7 @@ void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName, const u
m_pPropSet->setPropertyValue(*pEntry, aValue, aItemSet);
}
SwUnoCursorHelper::SetCrsrAttr(rTblCrsr.GetSelRing(),
- aItemSet, nsSetAttrMode::SETATTR_DEFAULT, true);
+ aItemSet, SetAttrMode::DEFAULT, true);
}
}
}
@@ -4018,7 +4018,7 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName, const uno::An
m_pPropSet->setPropertyValue(*pEntry, aValue, aItemSet);
}
SwUnoCursorHelper::SetCrsrAttr(rCrsr.GetSelRing(),
- aItemSet, nsSetAttrMode::SETATTR_DEFAULT, true);
+ aItemSet, SetAttrMode::DEFAULT, true);
}
}
}
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 52e73c1645fe..a095d9cdfe94 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1403,7 +1403,7 @@ SwXText::insertTextPortion(
aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR);
SwUnoCursorHelper::SetPropertyValues(*pCursor, *pCursorPropSet,
rCharacterAndParagraphProperties,
- nsSetAttrMode::SETATTR_NOFORMATATTR);
+ SetAttrMode::NOFORMATATTR);
}
catch (const lang::IllegalArgumentException& rIllegal)
{
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx
index 079b7a711eef..a28ddbab27bf 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -231,7 +231,7 @@ sal_uLong SwASCIIParser::CallParser()
// !!!!!
OSL_ENSURE( false, "Have to change - hard attr. to para. style" );
- pDoc->getIDocumentContentOperations().InsertItemSet( *pInsPam, *pItemSet, 0 );
+ pDoc->getIDocumentContentOperations().InsertItemSet( *pInsPam, *pItemSet );
}
}
delete pItemSet, pItemSet = 0;
@@ -428,7 +428,7 @@ sal_uLong SwASCIIParser::ReadChars()
}
pDoc->getIDocumentContentOperations().SplitNode( *pPam->GetPoint(), false );
pDoc->getIDocumentContentOperations().InsertPoolItem(
- *pPam, SvxFmtBreakItem( SVX_BREAK_PAGE_BEFORE, RES_BREAK ), 0);
+ *pPam, SvxFmtBreakItem( SVX_BREAK_PAGE_BEFORE, RES_BREAK ) );
pLastStt = pStt;
nLineLen = 0;
bIns = false;
diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx
index 7c69f35243fd..8306fe63a386 100644
--- a/sw/source/filter/basflt/fltshell.cxx
+++ b/sw/source/filter/basflt/fltshell.cxx
@@ -570,7 +570,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
SwSetExpField aFld(static_cast<SwSetExpFieldType*>(pFT), pB->GetValSys());
aFld.SetSubType( nsSwExtendedSubType::SUB_INVISIBLE );
MakePoint(rEntry, pDoc, aRegion);
- pDoc->getIDocumentContentOperations().InsertPoolItem(aRegion, SwFmtFld(aFld), 0);
+ pDoc->getIDocumentContentOperations().InsertPoolItem(aRegion, SwFmtFld(aFld));
MoveAttrs( *(aRegion.GetPoint()) );
}
if ( ( !IsFlagSet(HYPO) || IsFlagSet(BOOK_AND_REF) ) &&
@@ -689,11 +689,11 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
nEnd = rEntry.GetEndCP();
if (rEntry.IsParaEnd())
{
- pDoc->getIDocumentContentOperations().InsertPoolItem(aRegion, *rEntry.pAttr, 0, true);
+ pDoc->getIDocumentContentOperations().InsertPoolItem(aRegion, *rEntry.pAttr, SetAttrMode::DEFAULT, true);
}
else
{
- pDoc->getIDocumentContentOperations().InsertPoolItem(aRegion, *rEntry.pAttr, 0);
+ pDoc->getIDocumentContentOperations().InsertPoolItem(aRegion, *rEntry.pAttr);
}
}
}
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index cd05e23afeee..9554ab84ba3b 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -529,7 +529,7 @@ void SwHTMLParser::NewField()
}
else
{
- pDoc->getIDocumentContentOperations().InsertPoolItem( *pPam, SwFmtFld(*pFld), 0 );
+ pDoc->getIDocumentContentOperations().InsertPoolItem( *pPam, SwFmtFld(*pFld) );
delete pFld;
}
bInField = true;
@@ -567,7 +567,7 @@ void SwHTMLParser::EndField()
break;
}
- pDoc->getIDocumentContentOperations().InsertPoolItem( *pPam, SwFmtFld(*pField), 0 );
+ pDoc->getIDocumentContentOperations().InsertPoolItem( *pPam, SwFmtFld(*pField) );
delete pField;
pField = 0;
}
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index 7931ab99c81d..975cb4216da1 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -204,7 +204,7 @@ void SwHTMLParser::FinishFootEndNote()
if( pFootEndNoteImpl->bFixed )
aFtn.SetNumStr( pFootEndNoteImpl->sContent );
- pDoc->getIDocumentContentOperations().InsertPoolItem( *pPam, aFtn, 0 );
+ pDoc->getIDocumentContentOperations().InsertPoolItem( *pPam, aFtn );
SwTxtFtn * const pTxtFtn = static_cast<SwTxtFtn *>(
pPam->GetNode().GetTxtNode()->GetTxtAttrForCharAt(
pPam->GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_FTN ) );
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index cf7490f17767..73f8732dfa8b 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -204,7 +204,7 @@ sal_uLong HTMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPam,
if( !rDoc.getIDocumentSettingAccess().get(IDocumentSettingAccess::HTML_MODE) )
{
rDoc.getIDocumentContentOperations().InsertPoolItem( rPam, SwFmtPageDesc(
- rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool( RES_POOLPAGE_HTML, false )), 0 );
+ rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool( RES_POOLPAGE_HTML, false )) );
}
}
@@ -1274,7 +1274,7 @@ void SwHTMLParser::NextToken( int nToken )
if( pPageDesc )
{
- pDoc->getIDocumentContentOperations().InsertPoolItem( *pPam, SwFmtPageDesc( pPageDesc ), 0 );
+ pDoc->getIDocumentContentOperations().InsertPoolItem( *pPam, SwFmtPageDesc( pPageDesc ) );
}
}
break;
@@ -2891,7 +2891,7 @@ void SwHTMLParser::_SetAttr( bool bChkEnd, bool bBeforeTable,
eJumpTo = JUMPTO_NONE;
}
- pDoc->getIDocumentContentOperations().InsertPoolItem( *pAttrPam, *pAttr->pItem, nsSetAttrMode::SETATTR_DONTREPLACE );
+ pDoc->getIDocumentContentOperations().InsertPoolItem( *pAttrPam, *pAttr->pItem, SetAttrMode::DONTREPLACE );
}
pAttrPam->DeleteMark();
@@ -2973,7 +2973,7 @@ void SwHTMLParser::_SetAttr( bool bChkEnd, bool bBeforeTable,
pAttrPam->Move( fnMoveBackward );
}
- pDoc->getIDocumentContentOperations().InsertPoolItem( *pAttrPam, *pAttr->pItem, 0 );
+ pDoc->getIDocumentContentOperations().InsertPoolItem( *pAttrPam, *pAttr->pItem );
aFields.pop_front();
delete pAttr;
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 58d1c79be674..ec49e488e918 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1506,7 +1506,7 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
}
else
{
- pDoc->getIDocumentContentOperations().InsertPoolItem(aRegion, *rEntry.pAttr, 0);
+ pDoc->getIDocumentContentOperations().InsertPoolItem(aRegion, *rEntry.pAttr);
}
}
}
@@ -1663,7 +1663,7 @@ void SwWW8FltRefStack::SetAttrInDoc(const SwPosition& rTmpPos,
}
}
- pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, *rEntry.pAttr, 0);
+ pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, *rEntry.pAttr);
MoveAttrs(*aPaM.GetPoint());
}
break;
@@ -2215,7 +2215,7 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes)
SwPaM aEnd(*pPaM->End(), *pPaM->End());
pCtrlStck->NewAttr(*aEnd.GetPoint(), SvxCharHiddenItem(false, RES_CHRATR_HIDDEN));
- rDoc.getIDocumentContentOperations().InsertPoolItem(aEnd, SwFmtFld(aPostIt), 0);
+ rDoc.getIDocumentContentOperations().InsertPoolItem(aEnd, SwFmtFld(aPostIt));
pCtrlStck->SetAttr(*aEnd.GetPoint(), RES_CHRATR_HIDDEN);
// If this is a range, make sure that it ends after the just inserted character, not before it.
pReffedStck->MoveAttrs(*aEnd.GetPoint());
@@ -3510,7 +3510,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
SwPageNumberField aFld(
static_cast<SwPageNumberFieldType*>(rDoc.getIDocumentFieldsAccess().GetSysFldType(
RES_PAGENUMBERFLD )), PG_RANDOM, SVX_NUM_ARABIC);
- rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld(aFld), 0);
+ rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld(aFld));
}
break;
case 0xe:
@@ -3523,7 +3523,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
SwCntntNode *pCntNd=pPaM->GetCntntNode();
if (pCntNd!=NULL && pCntNd->Len()>0) // if par is empty not break is needed
AppendTxtNode(*pPaM->GetPoint());
- rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK), 0);
+ rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK));
}
break;
case 0x7:
@@ -4087,7 +4087,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
AppendTxtNode(*pPaM->GetPoint());
}
rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM,
- SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK), 0);
+ SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK));
bFirstParaOfPage = true;
bPgSecBreak = false;
}
@@ -4348,7 +4348,7 @@ void GiveNodePageDesc(SwNodeIndex &rIdx, const SwFmtPageDesc &rPgDesc,
rIdx.GetNode().GetCntntNode(), 0);
SwPaM aPage(aPamStart);
- rDoc.getIDocumentContentOperations().InsertPoolItem(aPage, rPgDesc, 0);
+ rDoc.getIDocumentContentOperations().InsertPoolItem(aPage, rPgDesc);
}
}
@@ -4413,7 +4413,7 @@ void wwSectionManager::InsertSegments()
if ( aIter->maSep.bkc == 1 && aIter->maSep.ccolM1 > 0 )
{
SwPaM start( aIter->maStart );
- mrReader.rDoc.getIDocumentContentOperations().InsertPoolItem( start, SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK), 0);
+ mrReader.rDoc.getIDocumentContentOperations().InsertPoolItem( start, SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK));
continue;
}
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 71394d63ff3b..f8145e2951aa 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -134,7 +134,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, OUString& rStr )
aFld.SetHelp(aFormula.sHelp);
aFld.SetToolTip(aFormula.sToolTip);
- rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld(aFld), 0);
+ rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld(aFld));
return FLD_OK;
}
else
@@ -256,7 +256,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, OUString& rStr)
aFld.SetSelectedItem(aFormula.maListEntries[nIndex]);
}
- rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld(aFld), 0);
+ rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld(aFld));
return FLD_OK;
}
else
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index ebd094941768..5aba71dc0015 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -1063,7 +1063,7 @@ void SwWW8ImplReader::InsertTagField( const sal_uInt16 nId, const OUString& rTag
sal_uInt16 nSubType = ( SwFltGetFlag( nFieldFlags, SwFltControlStack::TAGS_VISIBLE ) ) ? 0 : nsSwExtendedSubType::SUB_INVISIBLE;
aFld.SetSubType(nSubType | nsSwGetSetExpType::GSE_STRING);
- rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
+ rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ) );
}
}
@@ -1120,7 +1120,7 @@ eF_ResT SwWW8ImplReader::Read_F_Input( WW8FieldDesc* pF, OUString& rStr )
{
SwInputField aFld( static_cast<SwInputFieldType*>(rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_INPUTFLD )),
aDef, aQ, INP_TXT, 0, false );
- rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
+ rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ) );
}
return FLD_OK;
@@ -1318,7 +1318,7 @@ eF_ResT SwWW8ImplReader::Read_F_InputVar( WW8FieldDesc* pF, OUString& rStr )
aFld.SetInputFlag(true);
aFld.SetPromptText( aQ );
- rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
+ rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ) );
pReffedStck->SetAttr(*pPaM->GetPoint(), RES_FLTR_BOOKMARK, true, nNo);
return FLD_OK;
@@ -1334,7 +1334,7 @@ eF_ResT SwWW8ImplReader::Read_F_ANumber( WW8FieldDesc*, OUString& rStr )
SwSetExpField aFld( static_cast<SwSetExpFieldType*>(pNumFldType), OUString(),
GetNumberPara( rStr ) );
aFld.SetValue( ++nFldNum );
- rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
+ rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ) );
return FLD_OK;
}
@@ -1411,7 +1411,7 @@ eF_ResT SwWW8ImplReader::Read_F_Seq( WW8FieldDesc*, OUString& rStr )
else if (!bCountOn)
aFld.SetFormula(aSequenceName);
- rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld(aFld), 0);
+ rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld(aFld));
return FLD_OK;
}
@@ -1532,7 +1532,7 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, OUString& rStr )
{
SwDocInfoField aFld( static_cast<SwDocInfoFieldType*>(
rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_DOCINFOFLD )), DI_CUSTOM|nReg, aDocProperty, GetFieldResult( pF ) );
- rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld(aFld), 0);
+ rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld(aFld));
return FLD_OK;
}
@@ -1641,7 +1641,7 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, OUString& rStr )
rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_DOCINFOFLD )), nSub|nReg, aData, nFormat );
if (bDateTime)
ForceFieldLanguage(aFld, nLang);
- rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld(aFld), 0);
+ rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld(aFld));
return FLD_OK;
}
@@ -1653,7 +1653,7 @@ eF_ResT SwWW8ImplReader::Read_F_Author( WW8FieldDesc*, OUString& )
SwDocInfoField aFld( static_cast<SwDocInfoFieldType*>(
rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_DOCINFOFLD )),
DI_CREATE|DI_SUB_AUTHOR, OUString() );
- rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
+ rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ) );
return FLD_OK;
}
@@ -1661,7 +1661,7 @@ eF_ResT SwWW8ImplReader::Read_F_TemplName( WW8FieldDesc*, OUString& )
{
SwTemplNameField aFld( static_cast<SwTemplNameFieldType*>(
rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_TEMPLNAMEFLD )), FF_NAME );
- rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
+ rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ) );
return FLD_OK;
}
@@ -1717,14 +1717,14 @@ eF_ResT SwWW8ImplReader::Read_F_DateTime( WW8FieldDesc*pF, OUString& rStr )
SwDateTimeField aFld(static_cast<SwDateTimeFieldType*>(
rDoc.getIDocumentFieldsAccess().GetSysFldType(RES_DATETIMEFLD )), DATEFLD, nFormat);
ForceFieldLanguage(aFld, nLang);
- rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
+ rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ) );
}
else if (nDT == css::util::NumberFormat::TIME)
{
SwDateTimeField aFld(static_cast<SwDateTimeFieldType*>(
rDoc.getIDocumentFieldsAccess().GetSysFldType(RES_DATETIMEFLD)), TIMEFLD, nFormat);
ForceFieldLanguage(aFld, nLang);
- rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
+ rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ) );
}
return FLD_OK;
@@ -1756,7 +1756,7 @@ eF_ResT SwWW8ImplReader::Read_F_FileName(WW8FieldDesc*, OUString &rStr)
SwFileNameField aFld(
static_cast<SwFileNameFieldType*>(rDoc.getIDocumentFieldsAccess().GetSysFldType(RES_FILENAMEFLD)), eType);
- rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld(aFld), 0);
+ rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld(aFld));
return FLD_OK;
}
@@ -1770,7 +1770,7 @@ eF_ResT SwWW8ImplReader::Read_F_Anz( WW8FieldDesc* pF, OUString& rStr )
SwDocStatField aFld( static_cast<SwDocStatFieldType*>(
rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_DOCSTATFLD )), nSub,
GetNumberPara( rStr ) );
- rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
+ rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ) );
return FLD_OK;
}
@@ -1781,7 +1781,7 @@ eF_ResT SwWW8ImplReader::Read_F_CurPage( WW8FieldDesc*, OUString& rStr )
rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_PAGENUMBERFLD )), PG_RANDOM,
GetNumberPara(rStr, true));
- rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
+ rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ) );
return FLD_OK;
}
@@ -1910,7 +1910,7 @@ eF_ResT SwWW8ImplReader::Read_F_Set( WW8FieldDesc* pF, OUString& rStr )
SwSetExpField aFld( static_cast<SwSetExpFieldType*>(pFT), sVal, ULONG_MAX );
aFld.SetSubType(nsSwExtendedSubType::SUB_INVISIBLE | nsSwGetSetExpType::GSE_STRING);
- rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
+ rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ) );
pReffedStck->SetAttr(*pPaM->GetPoint(), RES_FLTR_BOOKMARK, true, nNo);
@@ -1986,7 +1986,7 @@ eF_ResT SwWW8ImplReader::Read_F_Ref( WW8FieldDesc*, OUString& rStr )
}
else
{
- rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld(aFld), 0);
+ rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld(aFld));
}
return FLD_OK;
}
@@ -2108,7 +2108,7 @@ eF_ResT SwWW8ImplReader::Read_F_PgRef( WW8FieldDesc*, OUString& rStr )
}
SwGetRefField aFld( static_cast<SwGetRefFieldType*>(rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_GETREFFLD )),
sPageRefBookmarkName, REF_BOOKMARK, 0, REF_PAGE );
- rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
+ rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ) );
return FLD_OK;
}
@@ -2191,7 +2191,7 @@ eF_ResT SwWW8ImplReader::Read_F_Macro( WW8FieldDesc*, OUString& rStr)
if( !bApplyWingdings )
{
- rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
+ rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ) );
WW8_CP nOldCp = pPlcxMan->Where();
WW8_CP nCp = nOldCp + nOffset;
@@ -2223,7 +2223,7 @@ eF_ResT SwWW8ImplReader::Read_F_Macro( WW8FieldDesc*, OUString& rStr)
{
SetNewFontAttr( i, true, RES_CHRATR_FONT );
- rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
+ rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ) );
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_FONT );
ResetCharSetVars();
}
@@ -2435,7 +2435,7 @@ eF_ResT SwWW8ImplReader::Read_F_DBField( WW8FieldDesc* pF, OUString& rStr )
aFld.InitContent(aResult);
- rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld( aFld ), 0);
+ rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld( aFld ));
#endif
return FLD_OK;
}
@@ -2448,7 +2448,7 @@ eF_ResT SwWW8ImplReader::Read_F_DBNext( WW8FieldDesc*, OUString& )
SwFieldType* pFT = rDoc.getIDocumentFieldsAccess().InsertFldType( aN );
SwDBNextSetField aFld( static_cast<SwDBNextSetFieldType*>(pFT), OUString(), OUString(),
SwDBData() ); // Datenbank: Nichts
- rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
+ rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ) );
#endif
return FLD_OK;
}
@@ -2461,7 +2461,7 @@ eF_ResT SwWW8ImplReader::Read_F_DBNum( WW8FieldDesc*, OUString& )
SwFieldType* pFT = rDoc.getIDocumentFieldsAccess().InsertFldType( aN );
SwDBSetNumberField aFld( static_cast<SwDBSetNumberFieldType*>(pFT),
SwDBData() ); // Datenbank: Nichts
- rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
+ rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ) );
#endif
return FLD_OK;
}
@@ -2487,13 +2487,13 @@ eF_ResT SwWW8ImplReader::Read_F_Equation( WW8FieldDesc*, OUString& rStr )
{
SwInputField aFld( static_cast<SwInputFieldType*>(rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_INPUTFLD )),
aResult.sResult, aResult.sResult, INP_TXT, 0 );
- rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 ); // insert input field
+ rDoc.getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtFld( aFld ) ); // insert input field
}
else if (aResult.sType == "CombinedCharacters")
{
SwCombinedCharField aFld(static_cast<SwCombinedCharFieldType*>(
rDoc.getIDocumentFieldsAccess().GetSysFldType(RES_COMBINED_CHARS)), aResult.sType);
- rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld(aFld), 0);
+ rDoc.getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld(aFld));
}
}
else if ('*' == cChar)
@@ -3520,7 +3520,7 @@ static void lcl_ImportTox(SwDoc &rDoc, SwPaM &rPaM, const OUString &rStr, bool b
if (!sFldTxt.isEmpty())
{
aM.SetAlternativeText( sFldTxt );
- rDoc.getIDocumentContentOperations().InsertPoolItem( rPaM, aM, 0 );
+ rDoc.getIDocumentContentOperations().InsertPoolItem( rPaM, aM );
}
}
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index 2d6ba9e7afb0..fb45db53321d 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -67,7 +67,7 @@ void SwInsFootNoteDlg::Apply()
rFont.GetStyleName(), rFont.GetPitch(),
eCharSet, RES_CHRATR_FONT );
aSet.Put( aFont );
- rSh.SetAttrSet( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
+ rSh.SetAttrSet( aSet, SetAttrMode::DONTEXPAND );
rSh.ResetSelect(0, false);
rSh.Left(CRSR_SKIP_CHARS, false, 1, false );
}
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 07e380ade597..294c64dc0914 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -900,7 +900,7 @@ sal_uInt16 SwDocShell::ApplyStyles(const OUString &rName, sal_uInt16 nFamily,
{
SwFmtCharFmt aFmt(pStyle->GetCharFmt());
pSh->SetAttrItem( aFmt, (nMode & KEY_SHIFT) ?
- nsSetAttrMode::SETATTR_DONTREPLACE : nsSetAttrMode::SETATTR_DEFAULT );
+ SetAttrMode::DONTREPLACE : SetAttrMode::DEFAULT );
break;
}
case SFX_STYLE_FAMILY_PARA:
diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx
index c8b85747da61..2e7d98fd98a7 100644
--- a/sw/source/uibase/docvw/PageBreakWin.cxx
+++ b/sw/source/uibase/docvw/PageBreakWin.cxx
@@ -278,7 +278,7 @@ void SwPageBreakWin::Select( )
aSet.Put( SwFmtPageDesc( NULL ) );
SwPaM aPaM( *pNd );
- pNd->GetDoc()->getIDocumentContentOperations().InsertItemSet( aPaM, aSet, nsSetAttrMode::SETATTR_DEFAULT );
+ pNd->GetDoc()->getIDocumentContentOperations().InsertItemSet( aPaM, aSet, SetAttrMode::DEFAULT );
pNd->GetDoc()->GetIDocumentUndoRedo( ).EndUndo( UNDO_UI_DELETE_PAGE_BREAK, NULL );
}
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index 610952bdc42e..cfffbd48123b 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -1105,7 +1105,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
rSh.SetMark();
rSh.ExtendSelection( false, aChars.getLength() );
- rSh.SetAttrSet( aSet, nsSetAttrMode::SETATTR_DONTEXPAND | nsSetAttrMode::SETATTR_NOFORMATATTR );
+ rSh.SetAttrSet( aSet, SetAttrMode::DONTEXPAND | SetAttrMode::NOFORMATATTR );
if( !rSh.IsCrsrPtAtEnd() )
rSh.SwapPam();
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 0d3d360159dd..23da8b4fb443 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -439,7 +439,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
const SvxFontItem &rFont = static_cast<const SvxFontItem &>( aSet.Get( RES_CHRATR_FONT ));
SvxFontItem aFont( rFont.GetFamily(), pFont->GetValue(),
rFont.GetStyleName(), rFont.GetPitch(), RTL_TEXTENCODING_DONTKNOW, RES_CHRATR_FONT );
- rWrtSh.SetAttrSet( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
+ rWrtSh.SetAttrSet( aSet, SetAttrMode::DONTEXPAND );
rWrtSh.ResetSelect(0, false);
rWrtSh.EndSelect();
rWrtSh.GotoFtnTxt();
@@ -1036,7 +1036,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
if ( !static_cast<const SfxStringItem*>(pItem)->GetValue().isEmpty() )
rWrtSh.ReplaceDropTxt(static_cast<const SfxStringItem*>(pItem)->GetValue(), pPaM);
}
- rWrtSh.SetAttrSet( *pSet, 0, pPaM );
+ rWrtSh.SetAttrSet( *pSet, SetAttrMode::DEFAULT, pPaM );
rWrtSh.EndAction();
SwTxtFmtColl* pColl = rWrtSh.GetPaMTxtFmtColl( pPaM );
if(pColl && pColl->IsAutoUpdateFmt())
diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx
index 4588b2e24db0..49fc1741a7ce 100644
--- a/sw/source/uibase/shells/txtattr.cxx
+++ b/sw/source/uibase/shells/txtattr.cxx
@@ -261,7 +261,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
if( pColl )
pColl->SetFmtAttr( aAttrSet );
else
- rWrtSh.SetAttrSet( aAttrSet, 0, pPaM.get() );
+ rWrtSh.SetAttrSet( aAttrSet, SetAttrMode::DEFAULT, pPaM.get() );
}
}
rWrtSh.EndUndo( UNDO_INSATTR, NULL);
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 2267b09f07f9..8fdbd787de2e 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1566,7 +1566,7 @@ void SwWrtShell::AutoUpdatePara(SwTxtFmtColl* pColl, const SfxItemSet& rStyleSet
if(bReset)
{
ResetAttr( std::set<sal_uInt16>(), pCrsr );
- SetAttrSet(aCoreSet, 0, pCrsr);
+ SetAttrSet(aCoreSet, SetAttrMode::DEFAULT, pCrsr);
}
mpDoc->ChgFmt(*pColl, rStyleSet );
EndAction();