summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8
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/ww8
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/ww8')
-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
7 files changed, 22 insertions, 22 deletions
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);