diff options
author | Valentin Kettner <vakevk+libreoffice@gmail.com> | 2014-07-07 14:32:02 +0200 |
---|---|---|
committer | Valentin Kettner <vakevk+libreoffice@gmail.com> | 2014-07-15 15:44:04 +0200 |
commit | f634ec520fa9e8c3e7b1f0660c7a6561bdff2aaa (patch) | |
tree | b44c2d2d6f3d6ed4a48f5e98a737008950d82050 /sw/source/filter/ww1 | |
parent | 3fed83524dc33453f3ec25baa4a170bac51ab1e0 (diff) |
Refactored IDocumentContentOperations out of SwDoc.
Into the new class DocumentContentOperationsManager.
Made SwNodes in sw/inc/ndarr.hxx friend class to
DocumentContentOperationsManager so it can call DelNodes at end of
DocumentContentOperationsManager::DeleteSection .
Added DeleteAutoCorrExceptWord to SwDoc, its needed in the Manager.
Added a non const version of SwDoc::GetDfltGrfFmtColl() to SwDoc
because its needed in the Manager.
Made SwDoc a friend class to DocumentContentOperationsManager so it
can call SwDoc::checkRedlining and SwDocL::_MakeFlySection.
Moved SwDoc::CopyImpl_ , SwDoc::CopyWithFlyInFly and
SwDoc::CopyFlyInFlyImpl into the Manager.
Moved "struct ParaRstFmt" and "lcl_RstTxtAttr" from docfmt.cxx
in DocumentContentOperationsManager.hxx .
Change-Id: Icaab57f4a8c158a85e549ecb4aacc752bc95bbc9
Diffstat (limited to 'sw/source/filter/ww1')
-rw-r--r-- | sw/source/filter/ww1/fltshell.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx index 9d2cd5663a6f..a84907e1b83a 100644 --- a/sw/source/filter/ww1/fltshell.cxx +++ b/sw/source/filter/ww1/fltshell.cxx @@ -565,7 +565,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwSetExpField aFld((SwSetExpFieldType*)pFT, pB->GetValSys()); aFld.SetSubType( nsSwExtendedSubType::SUB_INVISIBLE ); MakePoint(rEntry, pDoc, aRegion); - pDoc->InsertPoolItem(aRegion, SwFmtFld(aFld), 0); + pDoc->getIDocumentContentOperations().InsertPoolItem(aRegion, SwFmtFld(aFld), 0); MoveAttrs( *(aRegion.GetPoint()) ); } if ( ( !IsFlagSet(HYPO) || IsFlagSet(BOOK_AND_REF) ) && @@ -685,11 +685,11 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, nEnd = rEntry.GetEndCP(); if (rEntry.IsParaEnd()) { - pDoc->InsertPoolItem(aRegion, *rEntry.pAttr, 0, true); + pDoc->getIDocumentContentOperations().InsertPoolItem(aRegion, *rEntry.pAttr, 0, true); } else { - pDoc->InsertPoolItem(aRegion, *rEntry.pAttr, 0); + pDoc->getIDocumentContentOperations().InsertPoolItem(aRegion, *rEntry.pAttr, 0); } } } @@ -1030,10 +1030,10 @@ SwFltShell::SwFltShell(SwDoc* pDoc, SwPaM& rPaM, const OUString& rBaseURL, bool const SwTxtNode* pSttNd = pPos->nNode.GetNode().GetTxtNode(); if (pPos->nContent.GetIndex() && !pSttNd->GetTxt().isEmpty()) // insert position not in empty line - pDoc->SplitNode( *pPos, false ); // make new line + pDoc->getIDocumentContentOperations().SplitNode( *pPos, false ); // make new line if (!pSttNd->GetTxt().isEmpty()) { // InsertPos not on empty line - pDoc->SplitNode( *pPos, false ); // new line + pDoc->getIDocumentContentOperations().SplitNode( *pPos, false ); // new line pPaM->Move( fnMoveBackward ); // go to empty line } @@ -1108,7 +1108,7 @@ SwFltShell::~SwFltShell() SwFltShell& SwFltShell::operator << ( const OUString& rStr ) { OSL_ENSURE(eSubMode != Style, "char insert while in style-mode"); - GetDoc().InsertString( *pPaM, rStr ); + GetDoc().getIDocumentContentOperations().InsertString( *pPaM, rStr ); return *this; } @@ -1145,7 +1145,7 @@ OUString SwFltShell::QuoteStr( const OUString& rIn ) SwFltShell& SwFltShell::operator << ( const sal_Unicode c ) { OSL_ENSURE( eSubMode != Style, "char insert while in style-mode"); - GetDoc().InsertString( *pPaM, OUString(c) ); + GetDoc().getIDocumentContentOperations().InsertString( *pPaM, OUString(c) ); return *this; } @@ -1161,26 +1161,26 @@ SwFltShell& SwFltShell::AddError( const sal_Char* pErr ) SwSetExpField aFld( (SwSetExpFieldType*)pFT, OUString::createFromAscii( pErr )); //, VVF_INVISIBLE - GetDoc().InsertPoolItem(*pPaM, SwFmtFld(aFld), 0); + GetDoc().getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld(aFld), 0); return *this; } SwFltShell& SwFltShell::operator << (Graphic& rGraphic) { // embedded image !! - GetDoc().Insert(*pPaM, OUString(), OUString(), &rGraphic, NULL, NULL, NULL); + GetDoc().getIDocumentContentOperations().Insert(*pPaM, OUString(), OUString(), &rGraphic, NULL, NULL, NULL); return *this; } void SwFltShell::NextParagraph() { - GetDoc().AppendTxtNode(*pPaM->GetPoint()); + GetDoc().getIDocumentContentOperations().AppendTxtNode(*pPaM->GetPoint()); } void SwFltShell::NextPage() { NextParagraph(); - GetDoc().InsertPoolItem(*pPaM, + GetDoc().getIDocumentContentOperations().InsertPoolItem(*pPaM, SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK), 0); } @@ -1272,7 +1272,7 @@ SwFltShell& SwFltShell::EndItem( sal_uInt16 nAttrId ) SwFltShell& SwFltShell::operator << (const SwField& rField) { - GetDoc().InsertPoolItem(*pPaM, SwFmtFld(rField), 0); + GetDoc().getIDocumentContentOperations().InsertPoolItem(*pPaM, SwFmtFld(rField), 0); return *this; } @@ -1996,7 +1996,7 @@ void SwFltShell::BeginFootnote() // be applied to PMW SwFmtFtn aFtn; - GetDoc().InsertPoolItem(*pPaM, aFtn, 0); + GetDoc().getIDocumentContentOperations().InsertPoolItem(*pPaM, aFtn, 0); OSL_ENSURE(pSavedPos == NULL, "SwFltShell"); pSavedPos = new SwPosition(*pPaM->GetPoint()); pPaM->Move(fnMoveBackward, fnGoCntnt); @@ -2093,7 +2093,7 @@ SwPageDesc* SwFltShell::MakePageDesc(SwPageDesc* pFirstPageDesc) } else { - GetDoc().InsertPoolItem( *pPaM, SwFmtPageDesc( pNewPD ), 0 ); + GetDoc().getIDocumentContentOperations().InsertPoolItem( *pPaM, SwFmtPageDesc( pNewPD ), 0 ); } pNewPD->WriteUseOn( // all pages (UseOnPage)(nsUseOnPage::PD_ALL | nsUseOnPage::PD_HEADERSHARE | nsUseOnPage::PD_FOOTERSHARE)); |