summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-09-07 13:10:40 +0200
committerNoel Grandin <noel@peralex.com>2016-09-08 09:23:40 +0200
commit847e004e65ec3c35acff607588d15cd75a84f121 (patch)
tree1b2ac62948c9ad15d2f231b56eb45ff341f572f7 /sw/source/filter
parent3cac15856ade9fce161a49212c9d1861741122a5 (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/filter')
-rw-r--r--sw/source/filter/basflt/fltshell.cxx12
-rw-r--r--sw/source/filter/basflt/shellio.cxx33
-rw-r--r--sw/source/filter/ww8/docxexport.cxx2
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx2
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx10
-rw-r--r--sw/source/filter/ww8/writerhelper.hxx2
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx18
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx8
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx4
-rw-r--r--sw/source/filter/xml/swxml.cxx20
-rw-r--r--sw/source/filter/xml/wrtxml.cxx20
-rw-r--r--sw/source/filter/xml/xmlexp.cxx12
-rw-r--r--sw/source/filter/xml/xmlimp.cxx10
-rw-r--r--sw/source/filter/xml/xmlimp.hxx2
-rw-r--r--sw/source/filter/xml/xmltexti.cxx2
-rw-r--r--sw/source/filter/xml/xmltexti.hxx2
17 files changed, 79 insertions, 82 deletions
diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx
index 31823fed0c5a..4f262bd6feaf 100644
--- a/sw/source/filter/basflt/fltshell.cxx
+++ b/sw/source/filter/basflt/fltshell.cxx
@@ -697,9 +697,9 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
{
if (rEntry.MakeRegion(pDoc, aRegion, true))
{
- pDoc->getIDocumentRedlineAccess().SetRedlineMode((RedlineMode_t)( nsRedlineMode_t::REDLINE_ON
- | nsRedlineMode_t::REDLINE_SHOW_INSERT
- | nsRedlineMode_t::REDLINE_SHOW_DELETE ));
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags( RedlineFlags::On
+ | RedlineFlags::ShowInsert
+ | RedlineFlags::ShowDelete );
SwFltRedline& rFltRedline = *static_cast<SwFltRedline*>(rEntry.pAttr);
if( USHRT_MAX != rFltRedline.nAutorNoPrev )
@@ -719,9 +719,9 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
nullptr
);
pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline(aData, aRegion), true );
- pDoc->getIDocumentRedlineAccess().SetRedlineMode((RedlineMode_t)( nsRedlineMode_t::REDLINE_NONE
- | nsRedlineMode_t::REDLINE_SHOW_INSERT
- | nsRedlineMode_t::REDLINE_SHOW_DELETE ));
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags( RedlineFlags::NONE
+ | RedlineFlags::ShowInsert
+ | RedlineFlags::ShowDelete );
}
}
break;
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index 001151de98d2..929c0f32cc97 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -134,8 +134,8 @@ sal_uLong SwReader::Read( const Reader& rOptions )
SwNodeIndex aSplitIdx( pDoc->GetNodes() );
- RedlineMode_t eOld = pDoc->getIDocumentRedlineAccess().GetRedlineMode();
- RedlineMode_t ePostReadRedlineMode( nsRedlineMode_t::REDLINE_IGNORE );
+ RedlineFlags eOld = pDoc->getIDocumentRedlineAccess().GetRedlineFlags();
+ RedlineFlags ePostReadRedlineFlags( RedlineFlags::Ignore );
// Array of FlyFormats
SwFrameFormatsV aFlyFrameArr;
@@ -147,7 +147,7 @@ sal_uLong SwReader::Read( const Reader& rOptions )
if( bSaveUndo )
pUndo = new SwUndoInsDoc( *pPam );
- pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE );
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::Ignore );
SwPaM* pUndoPam = nullptr;
if( bDocUndo || pCursor )
@@ -171,14 +171,14 @@ sal_uLong SwReader::Read( const Reader& rOptions )
sal_Int32 nEndContent = pCNd ? pCNd->Len() - nSttContent : 0;
SwNodeIndex aEndPos( pPam->GetPoint()->nNode, 1 );
- pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld );
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
nError = po->Read( *pDoc, GetBaseURL(), *pPam, aFileName );
// an ODF document may contain redline mode in settings.xml; save it!
- ePostReadRedlineMode = pDoc->getIDocumentRedlineAccess().GetRedlineMode();
+ ePostReadRedlineFlags = pDoc->getIDocumentRedlineAccess().GetRedlineFlags();
- pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE );
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::Ignore );
if( !IsError( nError )) // set the End position already
{
@@ -263,13 +263,13 @@ sal_uLong SwReader::Read( const Reader& rOptions )
{
if( bSaveUndo )
{
- pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld );
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
// UGLY: temp. enable undo
pDoc->GetIDocumentUndoRedo().DoUndo(true);
pDoc->GetIDocumentUndoRedo().AppendUndo(
new SwUndoInsLayFormat( pFrameFormat,0,0 ) );
pDoc->GetIDocumentUndoRedo().DoUndo(false);
- pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE );
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::Ignore );
}
if( pFrameFormat->HasWriterListeners() )
{
@@ -297,22 +297,22 @@ sal_uLong SwReader::Read( const Reader& rOptions )
if( !aFlyFrameArr.empty() )
aFlyFrameArr.clear();
- pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld );
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, *pUndoPam ), true);
else
pDoc->getIDocumentRedlineAccess().SplitRedline( *pUndoPam );
- pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE );
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::Ignore );
}
if( bSaveUndo )
{
- pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld );
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
pUndo->SetInsertRange( *pUndoPam, false );
// UGLY: temp. enable undo
pDoc->GetIDocumentUndoRedo().DoUndo(true);
pDoc->GetIDocumentUndoRedo().AppendUndo( pUndo );
pDoc->GetIDocumentUndoRedo().DoUndo(false);
- pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE );
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::Ignore );
}
delete pUndoPam;
@@ -353,9 +353,9 @@ sal_uLong SwReader::Read( const Reader& rOptions )
{
if( bSaveUndo )
{
- pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld );
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_INSDOKUMENT, nullptr );
- pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE );
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::Ignore );
}
}
@@ -370,13 +370,12 @@ sal_uLong SwReader::Read( const Reader& rOptions )
pDoc->getIDocumentLinksAdministration().UpdateLinks();
// not insert: set the redline mode read from settings.xml
- eOld = static_cast<RedlineMode_t>(
- ePostReadRedlineMode & ~nsRedlineMode_t::REDLINE_IGNORE);
+ eOld = ePostReadRedlineFlags & ~RedlineFlags::Ignore;
pDoc->getIDocumentFieldsAccess().SetFieldsDirty(false, nullptr, 0);
}
- pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld );
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
pDoc->SetOle2Link( aOLELink );
if( pCursor ) // das Doc ist jetzt modifiziert
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 89deee4b1909..e19cf1990ab2 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -430,7 +430,7 @@ void DocxExport::OutputDML(uno::Reference<drawing::XShape>& xShape)
void DocxExport::ExportDocument_Impl()
{
// Set the 'Track Revisions' flag in the settings structure
- m_aSettings.trackRevisions = 0 != ( nsRedlineMode_t::REDLINE_ON & m_nOrigRedlineMode );
+ m_aSettings.trackRevisions = bool( RedlineFlags::On & m_nOrigRedlineFlags );
InitStyles();
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 9189cf7a9279..1bb06580e788 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -610,7 +610,7 @@ void RtfExport::ExportDocument_Impl()
OutULong(pViewShell->GetViewOptions()->GetZoom());
}
// Record changes?
- if (nsRedlineMode_t::REDLINE_ON & m_nOrigRedlineMode)
+ if (RedlineFlags::On & m_nOrigRedlineFlags)
Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_REVISIONS);
// Mirror margins?
if ((nsUseOnPage::PD_MIRROR & m_pDoc->GetPageDesc(0).ReadUseOn()) == nsUseOnPage::PD_MIRROR)
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 0d40c37639de..54c04acdbbce 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -126,7 +126,7 @@ namespace
if (const SwPosition* pAnchor = rEntry.GetAnchor().GetContentAnchor())
{
- // the anchor position will be invalidated by SetRedlineMode
+ // the anchor position will be invalidated by SetRedlineFlags
// so set a dummy position and fix it in UpdateFramePositions
SwPosition const dummy(SwNodeIndex(
const_cast<SwNodes&>(pAnchor->nNode.GetNodes())));
@@ -760,8 +760,8 @@ namespace sw
(*aRegion.GetPoint() != *aRegion.GetMark())
)
{
- mrDoc.getIDocumentRedlineAccess().SetRedlineMode((RedlineMode_t)(nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_SHOW_INSERT |
- nsRedlineMode_t::REDLINE_SHOW_DELETE));
+ mrDoc.getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowInsert |
+ RedlineFlags::ShowDelete);
const SwFltRedline *pFltRedline = static_cast<const SwFltRedline*>
(pEntry->pAttr);
@@ -783,8 +783,8 @@ namespace sw
aRegion.DeleteMark();
*aRegion.GetPoint() = SwPosition(SwNodeIndex(mrDoc.GetNodes()));
mrDoc.getIDocumentRedlineAccess().AppendRedline(pNewRedline, true);
- mrDoc.getIDocumentRedlineAccess().SetRedlineMode((RedlineMode_t)(nsRedlineMode_t::REDLINE_NONE | nsRedlineMode_t::REDLINE_SHOW_INSERT |
- nsRedlineMode_t::REDLINE_SHOW_DELETE ));
+ mrDoc.getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::NONE | RedlineFlags::ShowInsert |
+ RedlineFlags::ShowDelete );
}
delete pEntry;
}
diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx
index 410a1c08be39..e1b73dfe8131 100644
--- a/sw/source/filter/ww8/writerhelper.hxx
+++ b/sw/source/filter/ww8/writerhelper.hxx
@@ -565,7 +565,7 @@ namespace sw
*/
ww8::Frames GetFrames(const SwDoc &rDoc, SwPaM *pPaM);
- /** fix up frame positions, must be called after SetRedlineMode */
+ /** fix up frame positions, must be called after SetRedlineFlags */
void UpdateFramePositions(ww8::Frames & rFrames);
/** Get the Frames anchored to a given node
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 3b23221a07f6..56fd6e85d64a 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3116,16 +3116,16 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
// #i81405# - Collect anchored objects before changing the redline mode.
m_aFrames = GetFrames( *m_pDoc, bWriteAll? nullptr : m_pOrigPam );
- m_nOrigRedlineMode = m_pDoc->getIDocumentRedlineAccess().GetRedlineMode();
+ m_nOrigRedlineFlags = m_pDoc->getIDocumentRedlineAccess().GetRedlineFlags();
if ( !m_pDoc->getIDocumentRedlineAccess().GetRedlineTable().empty() )
{
//restored to original state by SwWriter::Write
- m_pDoc->getIDocumentRedlineAccess().SetRedlineMode(m_nOrigRedlineMode |
- nsRedlineMode_t::REDLINE_SHOW_DELETE |
- nsRedlineMode_t::REDLINE_SHOW_INSERT);
+ m_pDoc->getIDocumentRedlineAccess().SetRedlineFlags(m_nOrigRedlineFlags |
+ RedlineFlags::ShowDelete |
+ RedlineFlags::ShowInsert);
}
- // fix the SwPositions in m_aFrames after SetRedlineMode
+ // fix the SwPositions in m_aFrames after SetRedlineFlags
UpdateFramePositions(m_aFrames);
m_aFontHelper.InitFontTable(*m_pDoc);
@@ -3149,7 +3149,7 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
*m_pOrigPam->GetPoint() = SwPosition(m_pDoc->GetNodes().GetEndOfContent());
*m_pCurPam = *m_pOrigPam;
- m_pDoc->getIDocumentRedlineAccess().SetRedlineMode(m_nOrigRedlineMode);
+ m_pDoc->getIDocumentRedlineAccess().SetRedlineFlags(m_nOrigRedlineFlags);
}
bool SwWW8Writer::InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec )
@@ -3288,8 +3288,8 @@ void WW8Export::ExportDocument_Impl()
m_pPiece = new WW8_WrPct( pFib->fcMin );
pDop = new WW8Dop;
- pDop->fRevMarking = 0 != ( nsRedlineMode_t::REDLINE_ON & m_nOrigRedlineMode );
- pDop->fRMView = 0 != ( nsRedlineMode_t::REDLINE_SHOW_DELETE & m_nOrigRedlineMode );
+ pDop->fRevMarking = bool( RedlineFlags::On & m_nOrigRedlineFlags );
+ pDop->fRMView = bool( RedlineFlags::ShowDelete & m_nOrigRedlineFlags );
pDop->fRMPrint = pDop->fRMView;
// set AutoHyphenation flag if found in default para style
@@ -3505,7 +3505,7 @@ MSWordExportBase::MSWordExportBase( SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM
, m_nLastFormatId(0)
, m_nUniqueList(0)
, m_nHdFtIndex(0)
- , m_nOrigRedlineMode(0)
+ , m_nOrigRedlineFlags(RedlineFlags::NONE)
, m_pAktPageDesc(nullptr)
, m_bPrevTextNodeIsEmpty(false)
, m_pPapPlc(nullptr)
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 3d568b7e5762..add0656e5a03 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -471,7 +471,7 @@ public:
sal_uInt16 m_nUniqueList; ///< current number for creating unique list names
unsigned int m_nHdFtIndex;
- RedlineMode_t m_nOrigRedlineMode; ///< Remember the original redline mode
+ RedlineFlags m_nOrigRedlineFlags; ///< Remember the original redline mode
public:
/* implicit bookmark vector containing pairs of node indexes and bookmark names */
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index f1b7c73ee2e8..88bcf07ab55a 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4981,7 +4981,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
SwNodeIndex aSttNdIdx( m_rDoc.GetNodes() );
SwRelNumRuleSpaces aRelNumRule(m_rDoc, m_bNewDoc);
- sal_uInt16 eMode = nsRedlineMode_t::REDLINE_SHOW_INSERT;
+ RedlineFlags eMode = RedlineFlags::ShowInsert;
m_pSprmParser = new wwSprmParser(m_pWwFib->GetFIBVersion());
@@ -5280,9 +5280,9 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
if (m_bNewDoc)
{
if( m_pWDop->fRevMarking )
- eMode |= nsRedlineMode_t::REDLINE_ON;
+ eMode |= RedlineFlags::On;
if( m_pWDop->fRMView )
- eMode |= nsRedlineMode_t::REDLINE_SHOW_DELETE;
+ eMode |= RedlineFlags::ShowDelete;
}
m_aInsertedTables.DelAndMakeTableFrames();
@@ -5410,7 +5410,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
// delete the pam before the call for hide all redlines (Bug 73683)
if (m_bNewDoc)
- m_rDoc.getIDocumentRedlineAccess().SetRedlineMode((RedlineMode_t)( eMode ));
+ m_rDoc.getIDocumentRedlineAccess().SetRedlineFlags(eMode);
UpdatePageDescs(m_rDoc, nPageDescOffset);
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index 99b46aba24fe..e24fe060632a 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -676,9 +676,9 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
}
// set redline mode (without doing the associated book-keeping)
- pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern(nsRedlineMode_t::REDLINE_ON);
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern(RedlineFlags::On);
pDoc->getIDocumentRedlineAccess().AppendRedline(pRedline, false);
- pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern(nsRedlineMode_t::REDLINE_NONE);
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern(RedlineFlags::NONE);
}
}
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index d7d066d9d71a..3275e37a7a5d 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -784,14 +784,14 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c
const OUString sRecordChanges("RecordChanges");
const OUString sRedlineProtectionKey("RedlineProtectionKey");
xInfoSet->setPropertyValue( sShowChanges,
- makeAny(IDocumentRedlineAccess::IsShowChanges(rDoc.getIDocumentRedlineAccess().GetRedlineMode())) );
+ makeAny(IDocumentRedlineAccess::IsShowChanges(rDoc.getIDocumentRedlineAccess().GetRedlineFlags())) );
xInfoSet->setPropertyValue( sRecordChanges,
- makeAny(IDocumentRedlineAccess::IsRedlineOn(rDoc.getIDocumentRedlineAccess().GetRedlineMode())) );
+ makeAny(IDocumentRedlineAccess::IsRedlineOn(rDoc.getIDocumentRedlineAccess().GetRedlineFlags())) );
xInfoSet->setPropertyValue( sRedlineProtectionKey,
makeAny(rDoc.getIDocumentRedlineAccess().GetRedlinePassword()) );
// force redline mode to "none"
- rDoc.getIDocumentRedlineAccess().SetRedlineMode_intern( nsRedlineMode_t::REDLINE_NONE );
+ rDoc.getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::NONE );
const bool bOASIS = ( SotStorage::GetVersion( xStorage ) > SOFFICE_FILEFORMAT_60 );
// #i28749# - set property <ShapePositionInHoriL2R>
@@ -909,21 +909,19 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c
rDoc.getIDocumentRedlineAccess().SetRedlinePassword( aKey );
// restore redline mode from import info property set
- sal_Int16 nRedlineMode = nsRedlineMode_t::REDLINE_SHOW_INSERT;
+ RedlineFlags nRedlineFlags = RedlineFlags::ShowInsert;
aAny = xInfoSet->getPropertyValue( sShowChanges );
if ( *o3tl::doAccess<bool>(aAny) )
- nRedlineMode |= nsRedlineMode_t::REDLINE_SHOW_DELETE;
+ nRedlineFlags |= RedlineFlags::ShowDelete;
aAny = xInfoSet->getPropertyValue( sRecordChanges );
if ( *o3tl::doAccess<bool>(aAny) || (aKey.getLength() > 0) )
- nRedlineMode |= nsRedlineMode_t::REDLINE_ON;
- else
- nRedlineMode |= nsRedlineMode_t::REDLINE_NONE;
+ nRedlineFlags |= RedlineFlags::On;
// ... restore redline mode
- // (First set bogus mode to make sure the mode in getIDocumentRedlineAccess().SetRedlineMode()
+ // (First set bogus mode to make sure the mode in getIDocumentRedlineAccess().SetRedlineFlags()
// is different from its previous mode.)
- rDoc.getIDocumentRedlineAccess().SetRedlineMode_intern((RedlineMode_t)( ~nRedlineMode ));
- rDoc.getIDocumentRedlineAccess().SetRedlineMode( (RedlineMode_t)( nRedlineMode ));
+ rDoc.getIDocumentRedlineAccess().SetRedlineFlags_intern( ~nRedlineFlags );
+ rDoc.getIDocumentRedlineAccess().SetRedlineFlags( nRedlineFlags );
lcl_EnsureValidPam( rPaM ); // move Pam into valid content
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index 64926cfbe805..3c15cc1e4f30 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -181,13 +181,13 @@ sal_uInt32 SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >&
// save show redline mode ...
const OUString sShowChanges("ShowChanges");
- sal_uInt16 nRedlineMode = pDoc->getIDocumentRedlineAccess().GetRedlineMode();
+ RedlineFlags nRedlineFlags = pDoc->getIDocumentRedlineAccess().GetRedlineFlags();
xInfoSet->setPropertyValue( sShowChanges,
- makeAny( IDocumentRedlineAccess::IsShowChanges( nRedlineMode ) ) );
+ makeAny( IDocumentRedlineAccess::IsShowChanges( nRedlineFlags ) ) );
// ... and hide redlines for export
- nRedlineMode &= ~nsRedlineMode_t::REDLINE_SHOW_MASK;
- nRedlineMode |= nsRedlineMode_t::REDLINE_SHOW_INSERT;
- pDoc->getIDocumentRedlineAccess().SetRedlineMode((RedlineMode_t)( nRedlineMode ));
+ nRedlineFlags &= ~RedlineFlags::ShowMask;
+ nRedlineFlags |= RedlineFlags::ShowInsert;
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags( nRedlineFlags );
// Set base URI
xInfoSet->setPropertyValue( "BaseURI", makeAny( GetBaseURL() ) );
@@ -400,12 +400,12 @@ sal_uInt32 SwXMLWriter::Write_( const uno::Reference < task::XStatusIndicator >&
// restore redline mode
aAny = xInfoSet->getPropertyValue( sShowChanges );
- nRedlineMode = pDoc->getIDocumentRedlineAccess().GetRedlineMode();
- nRedlineMode &= ~nsRedlineMode_t::REDLINE_SHOW_MASK;
- nRedlineMode |= nsRedlineMode_t::REDLINE_SHOW_INSERT;
+ nRedlineFlags = pDoc->getIDocumentRedlineAccess().GetRedlineFlags();
+ nRedlineFlags &= ~RedlineFlags::ShowMask;
+ nRedlineFlags |= RedlineFlags::ShowInsert;
if ( *o3tl::doAccess<bool>(aAny) )
- nRedlineMode |= nsRedlineMode_t::REDLINE_SHOW_DELETE;
- pDoc->getIDocumentRedlineAccess().SetRedlineMode((RedlineMode_t)( nRedlineMode ));
+ nRedlineFlags |= RedlineFlags::ShowDelete;
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags( nRedlineFlags );
if (xStatusIndicator.is())
{
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 55acbceee1c0..11e3de0c6cfd 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -284,14 +284,14 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
"ShowChanges" );
}
}
- sal_uInt16 nRedlineMode = 0;
- bSavedShowChanges = IDocumentRedlineAccess::IsShowChanges( pDoc->getIDocumentRedlineAccess().GetRedlineMode() );
+ RedlineFlags nRedlineFlags = RedlineFlags::NONE;
+ bSavedShowChanges = IDocumentRedlineAccess::IsShowChanges( pDoc->getIDocumentRedlineAccess().GetRedlineFlags() );
if( bSaveRedline )
{
// now save and switch redline mode
- nRedlineMode = pDoc->getIDocumentRedlineAccess().GetRedlineMode();
- pDoc->getIDocumentRedlineAccess().SetRedlineMode(
- (RedlineMode_t)(( nRedlineMode & nsRedlineMode_t::REDLINE_SHOW_MASK ) | nsRedlineType_t::REDLINE_INSERT ));
+ nRedlineFlags = pDoc->getIDocumentRedlineAccess().GetRedlineFlags();
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(
+ ( nRedlineFlags & RedlineFlags::ShowMask ) | RedlineFlags::ShowInsert );
}
sal_uInt32 nRet = SvXMLExport::exportDoc( eClass );
@@ -299,7 +299,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
// now we can restore the redline mode (if we changed it previously)
if( bSaveRedline )
{
- pDoc->getIDocumentRedlineAccess().SetRedlineMode( (RedlineMode_t)(nRedlineMode ));
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags( nRedlineFlags );
}
if( pGraphicResolver )
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index d0b30d969edc..b76d6788365f 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -411,7 +411,7 @@ SwXMLImport::SwXMLImport(
m_bBlock( false ),
m_bOrganizerMode( false ),
m_bInititedXForms( false ),
- m_bPreserveRedlineMode( true ),
+ m_bPreserveRedlineFlags( true ),
m_pDoc( nullptr )
{
InitItemImport();
@@ -979,7 +979,7 @@ XMLTextImportHelper* SwXMLImport::CreateTextImport()
IsInsertMode(),
IsStylesOnlyMode(),
IsBlockMode(), IsOrganizerMode(),
- m_bPreserveRedlineMode );
+ m_bPreserveRedlineFlags );
}
XMLShapeImportHelper* SwXMLImport::CreateShapeImport()
@@ -1479,16 +1479,16 @@ void SwXMLImport::initialize(
// delegate to super class
SvXMLImport::initialize(aArguments);
- // we are only looking for a PropertyValue "PreserveRedlineMode"
+ // we are only looking for a PropertyValue "PreserveRedlineFlags"
sal_Int32 nLength = aArguments.getLength();
for(sal_Int32 i = 0; i < nLength; i++)
{
beans::PropertyValue aValue;
if ( aArguments[i] >>= aValue )
{
- if (aValue.Name == "PreserveRedlineMode")
+ if (aValue.Name == "PreserveRedlineFlags")
{
- OSL_VERIFY( aValue.Value >>= m_bPreserveRedlineMode );
+ OSL_VERIFY( aValue.Value >>= m_bPreserveRedlineFlags );
}
continue;
}
diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx
index e8a7c252db67..4d202791a9d7 100644
--- a/sw/source/filter/xml/xmlimp.hxx
+++ b/sw/source/filter/xml/xmlimp.hxx
@@ -87,7 +87,7 @@ class SwXMLImport: public SvXMLImport
bool m_bBlock : 1; // Load text block
bool m_bOrganizerMode : 1;
bool m_bInititedXForms : 1;
- bool m_bPreserveRedlineMode;
+ bool m_bPreserveRedlineFlags;
SwDoc* m_pDoc; // cached for getDoc()
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index 7b9137948c9e..1fc18b2b599e 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -149,7 +149,7 @@ SwXMLTextImportHelper::SwXMLTextImportHelper(
const uno::Reference<XPropertySet> & rInfoSet,
bool bInsertM, bool bStylesOnlyM,
bool bBlockM, bool bOrganizerM,
- bool /*bPreserveRedlineMode*/ ) :
+ bool /*bPreserveRedlineFlags*/ ) :
XMLTextImportHelper( rModel, rImport, bInsertM, bStylesOnlyM, true/*bProgress*/,
bBlockM, bOrganizerM ),
pRedlineHelper( nullptr )
diff --git a/sw/source/filter/xml/xmltexti.hxx b/sw/source/filter/xml/xmltexti.hxx
index 5a8704e007d5..327bc42f4751 100644
--- a/sw/source/filter/xml/xmltexti.hxx
+++ b/sw/source/filter/xml/xmltexti.hxx
@@ -41,7 +41,7 @@ public:
const css::uno::Reference<css::beans::XPropertySet>& rInfoSet,
bool bInsertM, bool bStylesOnlyM,
bool bBlockM, bool bOrganizerM,
- bool bPreserveRedlineMode );
+ bool bPreserveRedlineFlags );
virtual ~SwXMLTextImportHelper();
virtual css::uno::Reference<css::beans::XPropertySet>