diff options
author | Noel Grandin <noel@peralex.com> | 2016-09-07 13:10:40 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-09-08 09:23:40 +0200 |
commit | 847e004e65ec3c35acff607588d15cd75a84f121 (patch) | |
tree | 1b2ac62948c9ad15d2f231b56eb45ff341f572f7 /sw/source/core/docnode | |
parent | 3cac15856ade9fce161a49212c9d1861741122a5 (diff) |
convert nsRedlineMode_t to typed_flags
including fixing a bug in SwXMLExport::exportDoc where it was ORing with
a constant from a different type: nsRedlineType_t::REDLINE_INSERT
Change-Id: I2bb154c9a35d106e64fd1a8b6e928d0384c9fafe
Diffstat (limited to 'sw/source/core/docnode')
-rw-r--r-- | sw/source/core/docnode/ndsect.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/docnode/ndtbl.cxx | 18 | ||||
-rw-r--r-- | sw/source/core/docnode/section.cxx | 10 |
3 files changed, 17 insertions, 17 deletions
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 306f15e23114..774f783057a3 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -198,8 +198,8 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData, SwSectionNode* pNewSectNode = nullptr; - RedlineMode_t eOld = getIDocumentRedlineAccess().GetRedlineMode(); - getIDocumentRedlineAccess().SetRedlineMode_intern( (RedlineMode_t)((eOld & ~nsRedlineMode_t::REDLINE_SHOW_MASK) | nsRedlineMode_t::REDLINE_IGNORE)); + RedlineFlags eOld = getIDocumentRedlineAccess().GetRedlineFlags(); + getIDocumentRedlineAccess().SetRedlineFlags_intern( (eOld & ~RedlineFlags::ShowMask) | RedlineFlags::Ignore ); if( rRange.HasMark() ) { @@ -320,7 +320,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData, pNewSectNode->CheckSectionCondColl(); //FEATURE::CONDCOLL - getIDocumentRedlineAccess().SetRedlineMode_intern( eOld ); + getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld ); // To-Do - add 'SwExtraRedlineTable' also ? if( getIDocumentRedlineAccess().IsRedlineOn() || (!getIDocumentRedlineAccess().IsIgnoreRedline() && !getIDocumentRedlineAccess().GetRedlineTable().empty() )) diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 6fad99458f86..1c1d2ac53b4d 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -2255,8 +2255,8 @@ sal_uInt16 SwDoc::MergeTable( SwPaM& rPam ) // #i33394# GetIDocumentUndoRedo().StartUndo( UNDO_TABLE_MERGE, nullptr ); - RedlineMode_t eOld = getIDocumentRedlineAccess().GetRedlineMode(); - getIDocumentRedlineAccess().SetRedlineMode_intern((RedlineMode_t)(eOld | nsRedlineMode_t::REDLINE_IGNORE)); + RedlineFlags eOld = getIDocumentRedlineAccess().GetRedlineFlags(); + getIDocumentRedlineAccess().SetRedlineFlags_intern(eOld | RedlineFlags::Ignore); SwUndoTableMerge *const pUndo( (GetIDocumentUndoRedo().DoesUndo()) ? new SwUndoTableMerge( rPam ) @@ -2269,7 +2269,7 @@ sal_uInt16 SwDoc::MergeTable( SwPaM& rPam ) if( !rTable.PrepareMerge( rPam, aBoxes, aMerged, &pMergeBox, pUndo ) ) { // No cells found to merge - getIDocumentRedlineAccess().SetRedlineMode_intern( eOld ); + getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld ); if( pUndo ) { delete pUndo; @@ -2334,7 +2334,7 @@ sal_uInt16 SwDoc::MergeTable( SwPaM& rPam ) rPam.Move(); ::ClearFEShellTabCols(); - getIDocumentRedlineAccess().SetRedlineMode_intern( eOld ); + getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld ); } GetIDocumentUndoRedo().EndUndo( UNDO_TABLE_MERGE, nullptr ); return nRet; @@ -4333,11 +4333,11 @@ bool SwDoc::InsCopyOfTable( SwPosition& rInsPos, const SwSelBoxes& rBoxes, } else { - RedlineMode_t eOld = getIDocumentRedlineAccess().GetRedlineMode(); + RedlineFlags eOld = getIDocumentRedlineAccess().GetRedlineFlags(); if( getIDocumentRedlineAccess().IsRedlineOn() ) - getIDocumentRedlineAccess().SetRedlineMode( (RedlineMode_t)(nsRedlineMode_t::REDLINE_ON | - nsRedlineMode_t::REDLINE_SHOW_INSERT | - nsRedlineMode_t::REDLINE_SHOW_DELETE)); + getIDocumentRedlineAccess().SetRedlineFlags( RedlineFlags::On | + RedlineFlags::ShowInsert | + RedlineFlags::ShowDelete ); SwUndoTableCpyTable* pUndo = nullptr; if (bUndo) @@ -4431,7 +4431,7 @@ bool SwDoc::InsCopyOfTable( SwPosition& rInsPos, const SwSelBoxes& rBoxes, rInsPos.nNode = *pSttNd; rInsPos.nContent.Assign( GetNodes().GoNext( &rInsPos.nNode ), 0 ); } - getIDocumentRedlineAccess().SetRedlineMode( eOld ); + getIDocumentRedlineAccess().SetRedlineFlags( eOld ); } if( bRet ) diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 5aa3b5c3c49d..b44a2636178a 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -1260,7 +1260,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) sfx2::LinkManager::GetDisplayNames( this, nullptr, &sFileName, &sRange, &sFilter ); - RedlineMode_t eOldRedlineMode = nsRedlineMode_t::REDLINE_NONE; + RedlineFlags eOldRedlineFlags = RedlineFlags::NONE; SfxObjectShellRef xDocSh; SfxObjectShellLock xLockRef; int nRet; @@ -1277,8 +1277,8 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) if( nRet ) { SwDoc* pSrcDoc = static_cast<SwDocShell*>(&xDocSh)->GetDoc(); - eOldRedlineMode = pSrcDoc->getIDocumentRedlineAccess().GetRedlineMode(); - pSrcDoc->getIDocumentRedlineAccess().SetRedlineMode( nsRedlineMode_t::REDLINE_SHOW_INSERT ); + eOldRedlineFlags = pSrcDoc->getIDocumentRedlineAccess().GetRedlineFlags(); + pSrcDoc->getIDocumentRedlineAccess().SetRedlineFlags( RedlineFlags::ShowInsert ); } } @@ -1390,8 +1390,8 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) if( 2 == nRet ) xDocSh->DoClose(); else if( static_cast<SwDocShell*>(&xDocSh)->GetDoc() ) - static_cast<SwDocShell*>(&xDocSh)->GetDoc()->getIDocumentRedlineAccess().SetRedlineMode( - eOldRedlineMode ); + static_cast<SwDocShell*>(&xDocSh)->GetDoc()->getIDocumentRedlineAccess().SetRedlineFlags( + eOldRedlineFlags ); } } break; |