summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/IDocumentRedlineAccess.hxx62
-rw-r--r--sw/inc/docary.hxx7
-rw-r--r--sw/inc/redline.hxx24
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx2
-rw-r--r--sw/qa/extras/uiwriter/uiwriter2.cxx2
-rw-r--r--sw/source/core/access/accpara.cxx7
-rw-r--r--sw/source/core/access/parachangetrackinginfo.cxx8
-rw-r--r--sw/source/core/crsr/crstrvl.cxx2
-rw-r--r--sw/source/core/crsr/findtxt.cxx2
-rw-r--r--sw/source/core/crsr/swcrsr.cxx4
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx36
-rw-r--r--sw/source/core/doc/DocumentFieldsManager.cxx2
-rw-r--r--sw/source/core/doc/DocumentRedlineManager.cxx80
-rw-r--r--sw/source/core/doc/doccomp.cxx18
-rw-r--r--sw/source/core/doc/docfmt.cxx4
-rw-r--r--sw/source/core/doc/docnum.cxx14
-rw-r--r--sw/source/core/doc/docredln.cxx66
-rw-r--r--sw/source/core/doc/docsort.cxx10
-rw-r--r--sw/source/core/doc/doctxm.cxx2
-rw-r--r--sw/source/core/doc/ftnidx.cxx2
-rw-r--r--sw/source/core/doc/tblrwcl.cxx6
-rw-r--r--sw/source/core/docnode/ndsect.cxx2
-rw-r--r--sw/source/core/docnode/ndtbl.cxx4
-rw-r--r--sw/source/core/edit/autofmt.cxx2
-rw-r--r--sw/source/core/edit/edatmisc.cxx2
-rw-r--r--sw/source/core/edit/edfcol.cxx2
-rw-r--r--sw/source/core/edit/edlingu.cxx4
-rw-r--r--sw/source/core/fields/postithelper.cxx4
-rw-r--r--sw/source/core/inc/DocumentRedlineManager.hxx6
-rw-r--r--sw/source/core/layout/frmtool.cxx2
-rw-r--r--sw/source/core/layout/ssfrm.cxx2
-rw-r--r--sw/source/core/layout/wsfrm.cxx4
-rw-r--r--sw/source/core/table/swtable.cxx4
-rw-r--r--sw/source/core/text/frmform.cxx2
-rw-r--r--sw/source/core/text/frmpaint.cxx4
-rw-r--r--sw/source/core/text/porlay.cxx4
-rw-r--r--sw/source/core/text/porrst.cxx2
-rw-r--r--sw/source/core/text/redlnitr.cxx28
-rw-r--r--sw/source/core/text/redlnitr.hxx2
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx4
-rw-r--r--sw/source/core/txtnode/txtedt.cxx4
-rw-r--r--sw/source/core/undo/unattr.cxx8
-rw-r--r--sw/source/core/undo/undel.cxx4
-rw-r--r--sw/source/core/undo/undobj.cxx6
-rw-r--r--sw/source/core/undo/unins.cxx10
-rw-r--r--sw/source/core/undo/unovwr.cxx6
-rw-r--r--sw/source/core/undo/unredln.cxx18
-rw-r--r--sw/source/core/undo/unsect.cxx4
-rw-r--r--sw/source/core/undo/unspnd.cxx4
-rw-r--r--sw/source/core/undo/untbl.cxx12
-rw-r--r--sw/source/core/undo/untblk.cxx4
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx26
-rw-r--r--sw/source/core/unocore/unoredline.cxx6
-rw-r--r--sw/source/filter/ascii/ascatr.cxx4
-rw-r--r--sw/source/filter/basflt/shellio.cxx2
-rw-r--r--sw/source/filter/inc/fltshell.hxx8
-rw-r--r--sw/source/filter/inc/msfilter.hxx4
-rw-r--r--sw/source/filter/ww8/attributeoutputbase.hxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx46
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx4
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx8
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx26
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.hxx2
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx12
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx18
-rw-r--r--sw/source/uibase/docvw/edtwin2.cxx21
-rw-r--r--sw/source/uibase/inc/redlndlg.hxx2
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx65
-rw-r--r--sw/source/uibase/shells/textfld.cxx12
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx2
72 files changed, 400 insertions, 398 deletions
diff --git a/sw/inc/IDocumentRedlineAccess.hxx b/sw/inc/IDocumentRedlineAccess.hxx
index df2091ce6009..7592de03411d 100644
--- a/sw/inc/IDocumentRedlineAccess.hxx
+++ b/sw/inc/IDocumentRedlineAccess.hxx
@@ -60,40 +60,36 @@ namespace o3tl
template<> struct typed_flags<RedlineFlags> : is_typed_flags<RedlineFlags, 0x533> {};
}
-typedef sal_uInt16 RedlineType_t;
-namespace nsRedlineType_t
+enum class RedlineType : sal_uInt16
{
// Range of RedlineTypes is 0 to 127.
- const RedlineType_t REDLINE_INSERT = 0x0;// Content has been inserted.
- const RedlineType_t REDLINE_DELETE = 0x1;// Content has been deleted.
- const RedlineType_t REDLINE_FORMAT = 0x2;// Attributes have been applied.
- const RedlineType_t REDLINE_TABLE = 0x3;// Table structure has been altered.
- const RedlineType_t REDLINE_FMTCOLL = 0x4;// Style has been altered (Autoformat!).
- const RedlineType_t REDLINE_PARAGRAPH_FORMAT = 0x5;// Paragraph attributes have been changed.
- const RedlineType_t REDLINE_TABLE_ROW_INSERT = 0x6;// Table row has been inserted.
- const RedlineType_t REDLINE_TABLE_ROW_DELETE = 0x7;// Table row has been deleted.
- const RedlineType_t REDLINE_TABLE_CELL_INSERT = 0x8;// Table cell has been inserted.
- const RedlineType_t REDLINE_TABLE_CELL_DELETE = 0x9;// Table cell has been deleted.
-
- // When larger than 128, flags can be inserted.
- const RedlineType_t REDLINE_NO_FLAG_MASK = 0x7F;
- const RedlineType_t REDLINE_FORM_AUTOFMT = 0x80;// Can be a flag in RedlineType.
-
- inline OUString SwRedlineTypeToOUString(RedlineType_t eType)
+ Insert = 0x0,// Content has been inserted.
+ Delete = 0x1,// Content has been deleted.
+ Format = 0x2,// Attributes have been applied.
+ Table = 0x3,// Table structure has been altered.
+ FmtColl = 0x4,// Style has been altered (Autoformat!).
+ ParagraphFormat = 0x5,// Paragraph attributes have been changed.
+ TableRowInsert = 0x6,// Table row has been inserted.
+ TableRowDelete = 0x7,// Table row has been deleted.
+ TableCellInsert = 0x8,// Table cell has been inserted.
+ TableCellDelete = 0x9,// Table cell has been deleted.
+ Any = USHRT_MAX // special value to indicate any redline type in some method calls
+};
+inline OUString SwRedlineTypeToOUString(RedlineType eType)
+{
+ OUString sRet;
+ switch(eType)
{
- OUString sRet;
- switch(eType & nsRedlineType_t::REDLINE_NO_FLAG_MASK)
- {
- case nsRedlineType_t::REDLINE_INSERT: sRet = "Insert"; break;
- case nsRedlineType_t::REDLINE_DELETE: sRet = "Delete"; break;
- case nsRedlineType_t::REDLINE_FORMAT: sRet = "Format"; break;
- case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT: sRet = "ParagraphFormat"; break;
- case nsRedlineType_t::REDLINE_TABLE: sRet = "TextTable"; break;
- case nsRedlineType_t::REDLINE_FMTCOLL:sRet = "Style"; break;
- }
- return sRet;
+ case RedlineType::Insert: sRet = "Insert"; break;
+ case RedlineType::Delete: sRet = "Delete"; break;
+ case RedlineType::Format: sRet = "Format"; break;
+ case RedlineType::ParagraphFormat: sRet = "ParagraphFormat"; break;
+ case RedlineType::Table: sRet = "TextTable"; break;
+ case RedlineType::FmtColl:sRet = "Style"; break;
+ default: break;
}
-}
+ return sRet;
+};
class IDocumentRedlineAccess
{
@@ -177,16 +173,16 @@ public:
virtual bool DeleteRedline(
/*[in]*/const SwPaM& rPam,
/*[in]*/bool bSaveInUndo,
- /*[in]*/sal_uInt16 nDelType) = 0;
+ /*[in]*/RedlineType nDelType) = 0;
virtual bool DeleteRedline(
/*[in]*/const SwStartNode& rSection,
/*[in]*/bool bSaveInUndo,
- /*[in]*/sal_uInt16 nDelType) = 0;
+ /*[in]*/RedlineType nDelType) = 0;
virtual SwRedlineTable::size_type GetRedlinePos(
/*[in]*/const SwNode& rNode,
- /*[in]*/sal_uInt16 nType) const = 0;
+ /*[in]*/RedlineType nType) const = 0;
virtual void CompressRedlines() = 0;
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
index d0fda5beefa8..6eaaf14b3941 100644
--- a/sw/inc/docary.hxx
+++ b/sw/inc/docary.hxx
@@ -44,6 +44,7 @@ class SwTable;
class SwTableLine;
class SwTableBox;
struct SwPosition;
+enum class RedlineType : sal_uInt16;
/** provides some methods for generic operations on lists that contain SwFormat* subclasses. */
class SwFormatsBase
@@ -396,9 +397,9 @@ public:
sal_uInt16 GetSize() const { return m_aExtraRedlines.size(); }
SwExtraRedline* GetRedline( sal_uInt16 uIndex ) const { return m_aExtraRedlines.operator[]( uIndex ); }
- SW_DLLPUBLIC bool DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rTable, bool bSaveInUndo, sal_uInt16 nRedlineTypeToDelete );
- bool DeleteTableRowRedline ( SwDoc* pDoc, const SwTableLine& rTableLine, bool bSaveInUndo, sal_uInt16 nRedlineTypeToDelete );
- bool DeleteTableCellRedline( SwDoc* pDoc, const SwTableBox& rTableBox, bool bSaveInUndo, sal_uInt16 nRedlineTypeToDelete );
+ SW_DLLPUBLIC bool DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rTable, bool bSaveInUndo, RedlineType nRedlineTypeToDelete );
+ bool DeleteTableRowRedline ( SwDoc* pDoc, const SwTableLine& rTableLine, bool bSaveInUndo, RedlineType nRedlineTypeToDelete );
+ bool DeleteTableCellRedline( SwDoc* pDoc, const SwTableBox& rTableBox, bool bSaveInUndo, RedlineType nRedlineTypeToDelete );
};
typedef std::vector<SwOLENode*> SwOLENodes;
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index 030e160c6dfe..5cf4cba8dd08 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -111,16 +111,17 @@ class SW_DLLPUBLIC SwRedlineData
OUString m_sComment;
DateTime m_aStamp;
- RedlineType_t m_eType;
+ RedlineType m_eType;
+ bool m_bAutoFormat;
std::size_t const m_nAuthor;
sal_uInt16 m_nSeqNo;
public:
- SwRedlineData( RedlineType_t eT, std::size_t nAut );
+ SwRedlineData( RedlineType eT, std::size_t nAut );
SwRedlineData( const SwRedlineData& rCpy, bool bCpyNext = true );
// For sw3io: pNext/pExtraData are taken over.
- SwRedlineData( RedlineType_t eT, std::size_t nAut, const DateTime& rDT,
+ SwRedlineData( RedlineType eT, std::size_t nAut, const DateTime& rDT,
const OUString& rCmnt, SwRedlineData* pNxt );
~SwRedlineData();
@@ -129,6 +130,7 @@ public:
{
return m_nAuthor == rCmp.m_nAuthor &&
m_eType == rCmp.m_eType &&
+ m_bAutoFormat == rCmp.m_bAutoFormat &&
m_sComment == rCmp.m_sComment &&
(( !m_pNext && !rCmp.m_pNext ) ||
( m_pNext && rCmp.m_pNext && *m_pNext == *rCmp.m_pNext )) &&
@@ -139,8 +141,7 @@ public:
bool operator!=( const SwRedlineData& rCmp ) const
{ return !operator==( rCmp ); }
- RedlineType_t GetType() const
- { return static_cast<RedlineType_t>(m_eType & nsRedlineType_t::REDLINE_NO_FLAG_MASK); }
+ RedlineType GetType() const { return m_eType; }
std::size_t GetAuthor() const { return m_nAuthor; }
const OUString& GetComment() const { return m_sComment; }
@@ -150,8 +151,8 @@ public:
void SetComment( const OUString& rS ) { m_sComment = rS; }
void SetTimeStamp( const DateTime& rDT ) { m_aStamp = rDT; }
- void SetAutoFormatFlag()
- { m_eType = static_cast<RedlineType_t>(m_eType | nsRedlineType_t::REDLINE_FORM_AUTOFMT); }
+ void SetAutoFormat() { m_bAutoFormat = true; }
+ bool IsAutoFormat() const { return m_bAutoFormat; }
bool CanCombine( const SwRedlineData& rCmp ) const;
// ExtraData gets copied, the pointer is therefore not taken over by
@@ -186,7 +187,7 @@ class SW_DLLPUBLIC SwRangeRedline : public SwPaM
public:
static sal_uInt32 m_nLastId;
- SwRangeRedline( RedlineType_t eType, const SwPaM& rPam );
+ SwRangeRedline( RedlineType eType, const SwPaM& rPam );
SwRangeRedline( const SwRedlineData& rData, const SwPaM& rPam );
SwRangeRedline( const SwRedlineData& rData, const SwPosition& rPos );
// For sw3io: pData is taken over!
@@ -215,15 +216,14 @@ public:
const SwRedlineData& GetRedlineData(sal_uInt16 nPos = 0) const;
bool operator!=( const SwRedlineData& rCmp ) const
{ return *m_pRedlineData != rCmp; }
- void SetAutoFormatFlag() { m_pRedlineData->SetAutoFormatFlag(); }
+ void SetAutoFormat() { m_pRedlineData->SetAutoFormat(); }
+ bool IsAutoFormat() const { return m_pRedlineData->IsAutoFormat(); }
sal_uInt16 GetStackCount() const;
std::size_t GetAuthor( sal_uInt16 nPos = 0) const;
OUString const & GetAuthorString( sal_uInt16 nPos = 0 ) const;
const DateTime& GetTimeStamp( sal_uInt16 nPos = 0) const;
- RedlineType_t GetRealType( sal_uInt16 nPos = 0 ) const;
- RedlineType_t GetType( sal_uInt16 nPos = 0) const
- { return static_cast<RedlineType_t>(GetRealType( nPos ) & nsRedlineType_t::REDLINE_NO_FLAG_MASK); }
+ RedlineType GetType( sal_uInt16 nPos = 0 ) const;
const OUString& GetComment( sal_uInt16 nPos = 0 ) const;
void SetComment( const OUString& rS ) { m_pRedlineData->SetComment( rS ); }
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index a5f874f8b964..1e117ce3996d 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -1952,7 +1952,7 @@ void SwUiWriterTest::testDeleteTableRedlines()
SwUnoCursorHelper::makeTableCellRedline((*const_cast<SwTableBox*>(rTable.GetTableBox("C1"))), "TableCellInsert", aDescriptor);
IDocumentRedlineAccess& rIDRA = pDoc->getIDocumentRedlineAccess();
SwExtraRedlineTable& rExtras = rIDRA.GetExtraRedlineTable();
- rExtras.DeleteAllTableRedlines(pDoc, rTable, false, sal_uInt16(USHRT_MAX));
+ rExtras.DeleteAllTableRedlines(pDoc, rTable, false, RedlineType::Any);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(0), rExtras.GetSize());
}
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 4df901c34608..7bf5df086ab5 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -314,7 +314,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf109376_redline)
IDocumentRedlineAccess& rIDRA(pDoc->getIDocumentRedlineAccess());
rIDRA.SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowInsert | RedlineFlags::ShowDelete);
- rIDRA.AppendRedline(new SwRangeRedline(nsRedlineType_t::REDLINE_DELETE, pam), true);
+ rIDRA.AppendRedline(new SwRangeRedline(RedlineType::Delete, pam), true);
// this used to assert/crash with m_pAnchoredFlys mismatch because the
// fly was not deleted but its anchor was moved to the SwTableNode
rIDRA.AcceptAllRedline(true);
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 32bf6cb8b6dc..dc87d1ebe943 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1863,15 +1863,16 @@ void SwAccessibleParagraph::_correctValues( const sal_Int32 nIndex,
{
switch( pRedline->GetType())
{
- case nsRedlineType_t::REDLINE_INSERT:
+ case RedlineType::Insert:
aChangeAttr = pOpt->GetInsertAuthorAttr();
break;
- case nsRedlineType_t::REDLINE_DELETE:
+ case RedlineType::Delete:
aChangeAttr = pOpt->GetDeletedAuthorAttr();
break;
- case nsRedlineType_t::REDLINE_FORMAT:
+ case RedlineType::Format:
aChangeAttr = pOpt->GetFormatAuthorAttr();
break;
+ default: break;
}
}
switch( aChangeAttr.m_nItemId )
diff --git a/sw/source/core/access/parachangetrackinginfo.cxx b/sw/source/core/access/parachangetrackinginfo.cxx
index b8544b891f78..8ddeee61a344 100644
--- a/sw/source/core/access/parachangetrackinginfo.cxx
+++ b/sw/source/core/access/parachangetrackinginfo.cxx
@@ -61,7 +61,7 @@ namespace {
}
const SwRedlineTable::size_type nIdxOfFirstRedlineForTextNode =
- rIDocChangeTrack.GetRedlinePos( rTextNode, USHRT_MAX );
+ rIDocChangeTrack.GetRedlinePos( rTextNode, RedlineType::Any );
if ( nIdxOfFirstRedlineForTextNode == SwRedlineTable::npos )
{
// nothing to do --> empty change track text markup lists.
@@ -105,17 +105,17 @@ namespace {
SwWrongList* pMarkupList( nullptr );
switch ( pActRedline->GetType() )
{
- case nsRedlineType_t::REDLINE_INSERT:
+ case RedlineType::Insert:
{
pMarkupList = opChangeTrackInsertionTextMarkupList.get();
}
break;
- case nsRedlineType_t::REDLINE_DELETE:
+ case RedlineType::Delete:
{
pMarkupList = opChangeTrackDeletionTextMarkupList.get();
}
break;
- case nsRedlineType_t::REDLINE_FORMAT:
+ case RedlineType::Format:
{
pMarkupList = opChangeTrackFormatChangeTextMarkupList.get();
}
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index a593db4de4bd..9c0d9c130150 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -2250,7 +2250,7 @@ const SwRangeRedline* SwCursorShell::GotoRedline_( SwRedlineTable::size_type nAr
if( pFnd && bSelect )
{
m_pCurrentCursor->SetMark();
- if( nsRedlineType_t::REDLINE_FMTCOLL == pFnd->GetType() )
+ if( RedlineType::FmtColl == pFnd->GetType() )
{
pCNd = pIdx->GetNode().GetContentNode();
m_pCurrentCursor->GetPoint()->nContent.Assign( pCNd, pCNd->Len() );
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 8503a98c17c2..def2a7529d72 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -1069,7 +1069,7 @@ bool ReplaceImpl(
++tmp;
continue;
}
- if (pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE)
+ if (pRedline->GetType() == RedlineType::Delete)
{
assert(*pRedline->Start() != *pRedline->End());
// search in hidden layout can't overlap redlines
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index cd58106998bc..5509b9f33027 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1504,14 +1504,14 @@ static OUString lcl_MaskDeletedRedlines( const SwTextNode* pTextNd )
const bool bShowChg = IDocumentRedlineAccess::IsShowChanges( rDoc.getIDocumentRedlineAccess().GetRedlineFlags() );
if ( bShowChg )
{
- SwRedlineTable::size_type nAct = rDoc.getIDocumentRedlineAccess().GetRedlinePos( *pTextNd, USHRT_MAX );
+ SwRedlineTable::size_type nAct = rDoc.getIDocumentRedlineAccess().GetRedlinePos( *pTextNd, RedlineType::Any );
for ( ; nAct < rDoc.getIDocumentRedlineAccess().GetRedlineTable().size(); nAct++ )
{
const SwRangeRedline* pRed = rDoc.getIDocumentRedlineAccess().GetRedlineTable()[ nAct ];
if ( pRed->Start()->nNode > pTextNd->GetIndex() )
break;
- if( nsRedlineType_t::REDLINE_DELETE == pRed->GetType() )
+ if( RedlineType::Delete == pRed->GetType() )
{
sal_Int32 nStart, nEnd;
pRed->CalcStartEnd( pTextNd->GetIndex(), nStart, nEnd );
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 1fe99be1dd2a..7e2d3e415148 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -336,7 +336,7 @@ namespace
for( ; n < rTable.size(); ++n )
{
const SwRangeRedline* pRedl = rTable[ n ];
- if( nsRedlineType_t::REDLINE_DELETE == pRedl->GetType() && pRedl->IsVisible() )
+ if( RedlineType::Delete == pRedl->GetType() && pRedl->IsVisible() )
{
const SwPosition *pRStt = pRedl->Start(), *pREnd = pRedl->End();
@@ -823,7 +823,7 @@ namespace
{
rSvRedLine.SetPos( nInsPos );
pDoc->getIDocumentRedlineAccess().AppendRedline( rSvRedLine.pRedl, true );
- if (rSvRedLine.pRedl->GetType() == nsRedlineType_t::REDLINE_DELETE)
+ if (rSvRedLine.pRedl->GetType() == RedlineType::Delete)
{
UpdateFramesForAddDeleteRedline(*pDoc, *rSvRedLine.pRedl);
}
@@ -1245,7 +1245,7 @@ namespace //local functions originally from docfmt.cxx
pUndo->SaveRedlineData( aPam, true );
if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
- pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
+ pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Insert, aPam ), true);
else
pDoc->getIDocumentRedlineAccess().SplitRedline( aPam );
}
@@ -1289,7 +1289,7 @@ namespace //local functions originally from docfmt.cxx
if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
pDoc->getIDocumentRedlineAccess().AppendRedline(
new SwRangeRedline(
- bTextIns ? nsRedlineType_t::REDLINE_INSERT : nsRedlineType_t::REDLINE_FORMAT, aPam ),
+ bTextIns ? RedlineType::Insert : RedlineType::Format, aPam ),
true);
else if( bTextIns )
pDoc->getIDocumentRedlineAccess().SplitRedline( aPam );
@@ -1483,7 +1483,7 @@ namespace //local functions originally from docfmt.cxx
if( pUndo )
pUndo->SaveRedlineData( aPam, false );
- pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_FORMAT, aPam ), true);
+ pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Format, aPam ), true);
}
}
if( pOtherSet && pOtherSet->Count() )
@@ -1505,7 +1505,7 @@ namespace //local functions originally from docfmt.cxx
{
if( pUndo )
pUndo->SaveRedlineData( rRg, false );
- pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_FORMAT, rRg ), true);
+ pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Format, rRg ), true);
}
/* now if range */
@@ -1841,7 +1841,7 @@ DocumentContentOperationsManager::CopyRange( SwPaM& rPam, SwPosition& rPos, cons
if( pRedlineRange )
{
if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
- pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, *pRedlineRange ), true);
+ pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Insert, *pRedlineRange ), true);
else
pDoc->getIDocumentRedlineAccess().SplitRedline( *pRedlineRange );
delete pRedlineRange;
@@ -1862,7 +1862,7 @@ void DocumentContentOperationsManager::DeleteSection( SwNode *pNode )
// delete all Flys, Bookmarks, ...
DelFlyInRange( aSttIdx, aEndIdx );
- m_rDoc.getIDocumentRedlineAccess().DeleteRedline( *pSttNd, true, USHRT_MAX );
+ m_rDoc.getIDocumentRedlineAccess().DeleteRedline( *pSttNd, true, RedlineType::Any );
DelBookmarks(aSttIdx, aEndIdx);
{
@@ -2340,7 +2340,7 @@ bool DocumentContentOperationsManager::MoveNodeRange( SwNodeRange& rRange, SwNod
// Find all RedLines that end at the InsPos.
// These have to be moved back to the "old" position after the Move.
- SwRedlineTable::size_type nRedlPos = m_rDoc.getIDocumentRedlineAccess().GetRedlinePos( rPos.GetNode(), USHRT_MAX );
+ SwRedlineTable::size_type nRedlPos = m_rDoc.getIDocumentRedlineAccess().GetRedlinePos( rPos.GetNode(), RedlineType::Any );
if( SwRedlineTable::npos != nRedlPos )
{
const SwPosition *pRStt, *pREnd;
@@ -2554,14 +2554,14 @@ bool DocumentContentOperationsManager::Overwrite( const SwPaM &rRg, const OUStri
!m_rDoc.getIDocumentRedlineAccess().IsIgnoreRedline() && !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty())
{
SwPaM aPam(rPt.nNode, nActualStart, rPt.nNode, rPt.nContent.GetIndex());
- m_rDoc.getIDocumentRedlineAccess().DeleteRedline( aPam, true, USHRT_MAX );
+ m_rDoc.getIDocumentRedlineAccess().DeleteRedline( aPam, true, RedlineType::Any );
}
else if( m_rDoc.getIDocumentRedlineAccess().IsRedlineOn() )
{
// FIXME: this redline is WRONG: there is no DELETE, and the skipped
// characters are also included in aPam
SwPaM aPam(rPt.nNode, nActualStart, rPt.nNode, rPt.nContent.GetIndex());
- m_rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
+ m_rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Insert, aPam ), true);
}
m_rDoc.getIDocumentState().SetModified();
@@ -2661,7 +2661,7 @@ bool DocumentContentOperationsManager::InsertString( const SwPaM &rRg, const OUS
if( m_rDoc.getIDocumentRedlineAccess().IsRedlineOn() )
{
m_rDoc.getIDocumentRedlineAccess().AppendRedline(
- new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
+ new SwRangeRedline( RedlineType::Insert, aPam ), true);
}
else
{
@@ -3079,7 +3079,7 @@ bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool b
if (m_rDoc.getIDocumentRedlineAccess().IsRedlineOn())
{
m_rDoc.getIDocumentRedlineAccess().AppendRedline(
- new SwRangeRedline(nsRedlineType_t::REDLINE_INSERT, aPam), true);
+ new SwRangeRedline(RedlineType::Insert, aPam), true);
}
else
{
@@ -3123,7 +3123,7 @@ bool DocumentContentOperationsManager::AppendTextNode( SwPosition& rPos )
aPam.SetMark();
aPam.Move( fnMoveBackward );
if( m_rDoc.getIDocumentRedlineAccess().IsRedlineOn() )
- m_rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
+ m_rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Insert, aPam ), true);
else
m_rDoc.getIDocumentRedlineAccess().SplitRedline( aPam );
}
@@ -3697,7 +3697,7 @@ bool DocumentContentOperationsManager::DeleteAndJoinWithRedlineImpl( SwPaM & rPa
std::vector<SwRangeRedline*> redlines;
{
- auto pRedline(std::make_unique<SwRangeRedline>(nsRedlineType_t::REDLINE_DELETE, rPam));
+ auto pRedline(std::make_unique<SwRangeRedline>(RedlineType::Delete, rPam));
if (pRedline->HasValidRange())
{
redlines.push_back(pRedline.release());
@@ -3934,7 +3934,7 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam)
}
if( !m_rDoc.getIDocumentRedlineAccess().IsIgnoreRedline() && !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty() )
- m_rDoc.getIDocumentRedlineAccess().DeleteRedline( rPam, true, USHRT_MAX );
+ m_rDoc.getIDocumentRedlineAccess().DeleteRedline( rPam, true, RedlineType::Any );
// Delete and move all "Flys at the paragraph", which are within the Selection
DelFlyInRange(rPam.GetMark()->nNode, rPam.GetPoint()->nNode);
@@ -4166,7 +4166,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
m_rDoc.GetIDocumentUndoRedo().AppendUndo(
std::make_unique<SwUndoRedlineDelete>( aDelPam, SwUndoId::REPLACE ));
}
- m_rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_DELETE, aDelPam ), true);
+ m_rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Delete, aDelPam ), true);
*rPam.GetMark() = *aDelPam.GetMark();
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
@@ -4203,7 +4203,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
"invalid range: Point and Mark on different nodes" );
if( !m_rDoc.getIDocumentRedlineAccess().IsIgnoreRedline() && !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty() )
- m_rDoc.getIDocumentRedlineAccess().DeleteRedline( aDelPam, true, USHRT_MAX );
+ m_rDoc.getIDocumentRedlineAccess().DeleteRedline( aDelPam, true, RedlineType::Any );
SwUndoReplace* pUndoRpl = nullptr;
bool const bDoesUndo = m_rDoc.GetIDocumentUndoRedo().DoesUndo();
diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx
index c9c1d34157b8..c66b4ddd22a1 100644
--- a/sw/source/core/doc/DocumentFieldsManager.cxx
+++ b/sw/source/core/doc/DocumentFieldsManager.cxx
@@ -70,7 +70,7 @@ namespace sw
rTextField.GetStart());
SwRangeRedline const*const pRedline(rIDRA.GetRedline(pos, &tmp));
return (pRedline
- && pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE
+ && pRedline->GetType() == RedlineType::Delete
&& *pRedline->GetPoint() != *pRedline->GetMark());
}
}
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index ed2ac2d9cbe3..47fc8db4db05 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -313,8 +313,8 @@ namespace
switch( pRedl->GetType() )
{
- case nsRedlineType_t::REDLINE_INSERT:
- case nsRedlineType_t::REDLINE_FORMAT:
+ case RedlineType::Insert:
+ case RedlineType::Format:
{
bool bCheck = false, bReplace = false;
switch( eCmp )
@@ -363,7 +363,7 @@ namespace
}
}
break;
- case nsRedlineType_t::REDLINE_DELETE:
+ case RedlineType::Delete:
{
SwDoc& rDoc = *pRedl->GetDoc();
const SwPosition *pDelStt = nullptr, *pDelEnd = nullptr;
@@ -440,11 +440,11 @@ namespace
}
break;
- case nsRedlineType_t::REDLINE_FMTCOLL:
+ case RedlineType::FmtColl:
rArr.DeleteAndDestroy( rPos-- );
break;
- case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT:
+ case RedlineType::ParagraphFormat:
rArr.DeleteAndDestroy( rPos-- );
break;
@@ -475,7 +475,7 @@ namespace
switch( pRedl->GetType() )
{
- case nsRedlineType_t::REDLINE_INSERT:
+ case RedlineType::Insert:
{
const SwPosition *pDelStt = nullptr, *pDelEnd = nullptr;
bool bDelRedl = false;
@@ -551,7 +551,7 @@ namespace
delete pRedl;
}
break;
- case nsRedlineType_t::REDLINE_DELETE:
+ case RedlineType::Delete:
{
SwRangeRedline* pNew = nullptr;
bool bCheck = false, bReplace = false;
@@ -645,8 +645,8 @@ namespace
}
break;
- case nsRedlineType_t::REDLINE_FORMAT:
- case nsRedlineType_t::REDLINE_FMTCOLL:
+ case RedlineType::Format:
+ case RedlineType::FmtColl:
{
if( pRedl->GetExtraData() )
pRedl->GetExtraData()->Reject( *pRedl );
@@ -656,7 +656,7 @@ namespace
// original state of the text (FIXME if the original text
// has already contained direct text formatting: unfortunately
// ODF 1.2 doesn't support rejection of format-only changes)
- if ( pRedl->GetType() == nsRedlineType_t::REDLINE_FORMAT )
+ if ( pRedl->GetType() == RedlineType::Format )
{
SwPaM aPam( *(pRedl->Start()), *(pRedl->End()) );
rArr.DeleteAndDestroy( rPos-- );
@@ -710,7 +710,7 @@ namespace
{
if( *pTmp->End() <= *pEnd )
{
- if( (m > 0 || nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT == pTmp->GetType()) &&
+ if( (m > 0 || RedlineType::ParagraphFormat == pTmp->GetType()) &&
(*fn_AcceptReject)( rArr, o, bCallDelete, nullptr, nullptr ))
{
bHasParagraphFormatChange = true;
@@ -722,7 +722,7 @@ namespace
if( *pTmp->Start() < *pEnd )
{
// Only revoke the partial selection
- if( (m > 0 || nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT == pTmp->GetType()) &&
+ if( (m > 0 || RedlineType::ParagraphFormat == pTmp->GetType()) &&
(*fn_AcceptReject)( rArr, o, bCallDelete, pStt, pEnd ))
{
bHasParagraphFormatChange = true;
@@ -1001,7 +1001,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
if( m_rDoc.IsAutoFormatRedline() )
{
- pNewRedl->SetAutoFormatFlag();
+ pNewRedl->SetAutoFormat();
if( mpAutoFormatRedlnComment && !mpAutoFormatRedlnComment->isEmpty() )
{
pNewRedl->SetComment( *mpAutoFormatRedlnComment );
@@ -1082,10 +1082,10 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
switch( pNewRedl->GetType() )
{
- case nsRedlineType_t::REDLINE_INSERT:
+ case RedlineType::Insert:
switch( pRedl->GetType() )
{
- case nsRedlineType_t::REDLINE_INSERT:
+ case RedlineType::Insert:
if( pRedl->IsOwnRedline( *pNewRedl ) )
{
bool bDelete = false;
@@ -1222,7 +1222,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
}
}
break;
- case nsRedlineType_t::REDLINE_DELETE:
+ case RedlineType::Delete:
if( SwComparePosition::Inside == eCmpPos )
{
// split up
@@ -1276,7 +1276,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
pNewRedl->SetStart( *pREnd );
}
break;
- case nsRedlineType_t::REDLINE_FORMAT:
+ case RedlineType::Format:
switch( eCmpPos )
{
case SwComparePosition::OverlapBefore:
@@ -1333,10 +1333,10 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
}
break;
- case nsRedlineType_t::REDLINE_DELETE:
+ case RedlineType::Delete:
switch( pRedl->GetType() )
{
- case nsRedlineType_t::REDLINE_DELETE:
+ case RedlineType::Delete:
switch( eCmpPos )
{
case SwComparePosition::Outside:
@@ -1436,7 +1436,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
}
break;
- case nsRedlineType_t::REDLINE_INSERT:
+ case RedlineType::Insert:
{
// b62341295: Do not throw away redlines
// even if they are not allowed to be combined
@@ -1709,7 +1709,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
}
break;
- case nsRedlineType_t::REDLINE_FORMAT:
+ case RedlineType::Format:
switch( eCmpPos )
{
case SwComparePosition::OverlapBefore:
@@ -1762,11 +1762,11 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
}
break;
- case nsRedlineType_t::REDLINE_FORMAT:
+ case RedlineType::Format:
switch( pRedl->GetType() )
{
- case nsRedlineType_t::REDLINE_INSERT:
- case nsRedlineType_t::REDLINE_DELETE:
+ case RedlineType::Insert:
+ case RedlineType::Delete:
switch( eCmpPos )
{
case SwComparePosition::OverlapBefore:
@@ -1805,7 +1805,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
break;
}
break;
- case nsRedlineType_t::REDLINE_FORMAT:
+ case RedlineType::Format:
switch( eCmpPos )
{
case SwComparePosition::Outside:
@@ -1905,7 +1905,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
}
break;
- case nsRedlineType_t::REDLINE_FMTCOLL:
+ case RedlineType::FmtColl:
// How should we behave here?
// insert as is
break;
@@ -1924,7 +1924,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
}
else
{
- if ( bCallDelete && nsRedlineType_t::REDLINE_DELETE == pNewRedl->GetType() )
+ if ( bCallDelete && RedlineType::Delete == pNewRedl->GetType() )
{
if ( pStt->nContent == 0 )
{
@@ -1974,7 +1974,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall
}
else
{
- if( bCallDelete && nsRedlineType_t::REDLINE_DELETE == pNewRedl->GetType() )
+ if( bCallDelete && RedlineType::Delete == pNewRedl->GetType() )
{
RedlineFlags eOld = meRedlineFlags;
// Set to NONE, so that the Delete::Redo merges the Redline data correctly!
@@ -2015,7 +2015,7 @@ bool DocumentRedlineManager::AppendTableRowRedline( SwTableRowRedline* pNewRedl,
{
// TO DO - equivalent for 'SwTableRowRedline'
/*
- if( bCallDelete && nsRedlineType_t::REDLINE_DELETE == pNewRedl->GetType() )
+ if( bCallDelete && RedlineType::Delete == pNewRedl->GetType() )
{
RedlineFlags eOld = meRedlineFlags;
// Set to NONE, so that the Delete::Redo merges the Redline data correctly!
@@ -2057,7 +2057,7 @@ bool DocumentRedlineManager::AppendTableCellRedline( SwTableCellRedline* pNewRed
{
// TO DO - equivalent for 'SwTableCellRedline'
/*
- if( bCallDelete && nsRedlineType_t::REDLINE_DELETE == pNewRedl->GetType() )
+ if( bCallDelete && RedlineType::Delete == pNewRedl->GetType() )
{
RedlineFlags eOld = meRedlineFlags;
// Set to NONE, so that the Delete::Redo merges the Redline data correctly!
@@ -2184,7 +2184,7 @@ bool DocumentRedlineManager::SplitRedline( const SwPaM& rRange )
}
bool DocumentRedlineManager::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo,
- sal_uInt16 nDelType )
+ RedlineType nDelType )
{
if( !rRange.HasMark() || *rRange.GetMark() == *rRange.GetPoint() )
return false;
@@ -2208,7 +2208,7 @@ bool DocumentRedlineManager::DeleteRedline( const SwPaM& rRange, bool bSaveInUnd
for( ; n < mpRedlineTable->size() ; ++n )
{
SwRangeRedline* pRedl = (*mpRedlineTable)[ n ];
- if( USHRT_MAX != nDelType && nDelType != pRedl->GetType() )
+ if( RedlineType::Any != nDelType && nDelType != pRedl->GetType() )
continue;
SwPosition* pRStt = pRedl->Start(),
@@ -2303,13 +2303,13 @@ bool DocumentRedlineManager::DeleteRedline( const SwPaM& rRange, bool bSaveInUnd
}
bool DocumentRedlineManager::DeleteRedline( const SwStartNode& rNode, bool bSaveInUndo,
- sal_uInt16 nDelType )
+ RedlineType nDelType )
{
SwPaM aTemp(*rNode.EndOfSectionNode(), rNode);
return DeleteRedline(aTemp, bSaveInUndo, nDelType);
}
-SwRedlineTable::size_type DocumentRedlineManager::GetRedlinePos( const SwNode& rNd, sal_uInt16 nType ) const
+SwRedlineTable::size_type DocumentRedlineManager::GetRedlinePos( const SwNode& rNd, RedlineType nType ) const
{
const sal_uLong nNdIdx = rNd.GetIndex();
for( SwRedlineTable::size_type n = 0; n < mpRedlineTable->size() ; ++n )
@@ -2319,7 +2319,7 @@ SwRedlineTable::size_type DocumentRedlineManager::GetRedlinePos( const SwNode& r
nMk = pTmp->GetMark()->nNode.GetIndex();
if( nPt < nMk ) { long nTmp = nMk; nMk = nPt; nPt = nTmp; }
- if( ( USHRT_MAX == nType || nType == pTmp->GetType()) &&
+ if( ( RedlineType::Any == nType || nType == pTmp->GetType()) &&
nMk <= nNdIdx && nNdIdx <= nPt )
return n;
@@ -2360,18 +2360,18 @@ const SwRangeRedline* DocumentRedlineManager::GetRedline( const SwPosition& rPos
// show insert change first.
// since the redlines are sorted by position, only check the redline
// before and after the current redline
- if( nsRedlineType_t::REDLINE_FORMAT == pRedl->GetType() )
+ if( RedlineType::Format == pRedl->GetType() )
{
if( nM && rPos >= *(*mpRedlineTable)[ nM - 1 ]->Start() &&
rPos <= *(*mpRedlineTable)[ nM - 1 ]->End() &&
- ( nsRedlineType_t::REDLINE_INSERT == (*mpRedlineTable)[ nM - 1 ]->GetType() ) )
+ ( RedlineType::Insert == (*mpRedlineTable)[ nM - 1 ]->GetType() ) )
{
--nM;
pRedl = (*mpRedlineTable)[ nM ];
}
else if( ( nM + 1 ) <= nO && rPos >= *(*mpRedlineTable)[ nM + 1 ]->Start() &&
rPos <= *(*mpRedlineTable)[ nM + 1 ]->End() &&
- ( nsRedlineType_t::REDLINE_INSERT == (*mpRedlineTable)[ nM + 1 ]->GetType() ) )
+ ( RedlineType::Insert == (*mpRedlineTable)[ nM + 1 ]->GetType() ) )
{
++nM;
pRedl = (*mpRedlineTable)[ nM ];
@@ -2534,7 +2534,7 @@ void DocumentRedlineManager::AcceptRedlineParagraphFormatting( const SwPaM &rPam
nMk = pTmp->GetMark()->nNode.GetIndex();
if( nPt < nMk ) { long nTmp = nMk; nMk = nPt; nPt = nTmp; }
- if( nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT == pTmp->GetType() &&
+ if( RedlineType::ParagraphFormat == pTmp->GetType() &&
( (nSttIdx <= nMk && nMk <= nEndIdx) || (nSttIdx <= nPt && nPt <= nEndIdx) ) )
AcceptRedline( n, false );
@@ -3025,7 +3025,7 @@ void DocumentRedlineManager::FinalizeImport()
for( SwRedlineTable::size_type n = 0; n < mpRedlineTable->size(); ++n )
{
SwRangeRedline* pRedl = (*mpRedlineTable)[ n ];
- if ( nsRedlineType_t::REDLINE_DELETE == pRedl->GetType() )
+ if ( RedlineType::Delete == pRedl->GetType() )
{
const SwPosition* pStt = pRedl->Start(),
* pEnd = pStt == pRedl->GetPoint()
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index e46f0d9aa5f7..4d40ae43ae33 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -1643,7 +1643,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo )
if( pTmp )
{
- SwRedlineData aRedlnData( nsRedlineType_t::REDLINE_DELETE, nAuthor, aTimeStamp,
+ SwRedlineData aRedlnData( RedlineType::Delete, nAuthor, aTimeStamp,
OUString(), nullptr );
do {
// #i65201#: Expand again, see comment above.
@@ -1674,7 +1674,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo )
}
}
- rDoc.getIDocumentRedlineAccess().DeleteRedline( *pTmp, false, USHRT_MAX );
+ rDoc.getIDocumentRedlineAccess().DeleteRedline( *pTmp, false, RedlineType::Any );
if (rDoc.GetIDocumentUndoRedo().DoesUndo())
{
@@ -1717,7 +1717,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo )
}
}
} while( pInsRing.get() != ( pTmp = pTmp->GetNext()) );
- SwRedlineData aRedlnData( nsRedlineType_t::REDLINE_INSERT, nAuthor, aTimeStamp,
+ SwRedlineData aRedlnData( RedlineType::Insert, nAuthor, aTimeStamp,
OUString(), nullptr );
// combine consecutive
@@ -1903,7 +1903,7 @@ SaveMergeRedline::SaveMergeRedline( const SwNode& rDstNd,
aPos.nContent.Assign( const_cast<SwContentNode*>(static_cast<const SwContentNode*>(&rDstNd)), pStt->nContent.GetIndex() );
pDestRedl = new SwRangeRedline( rSrcRedl.GetRedlineData(), aPos );
- if( nsRedlineType_t::REDLINE_DELETE == pDestRedl->GetType() )
+ if( RedlineType::Delete == pDestRedl->GetType() )
{
// mark the area as deleted
const SwPosition* pEnd = pStt == rSrcRedl.GetPoint()
@@ -1923,7 +1923,7 @@ sal_uInt16 SaveMergeRedline::InsertRedline(SwPaM* pLastDestRedline)
sal_uInt16 nIns = 0;
SwDoc* pDoc = pDestRedl->GetDoc();
- if( nsRedlineType_t::REDLINE_INSERT == pDestRedl->GetType() )
+ if( RedlineType::Insert == pDestRedl->GetType() )
{
// the part was inserted so copy it from the SourceDoc
::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
@@ -1968,8 +1968,8 @@ sal_uInt16 SaveMergeRedline::InsertRedline(SwPaM* pLastDestRedline)
SwPosition* pRStt = pRedl->Start(),
* pREnd = pRStt == pRedl->GetPoint() ? pRedl->GetMark()
: pRedl->GetPoint();
- if( nsRedlineType_t::REDLINE_DELETE == pRedl->GetType() ||
- nsRedlineType_t::REDLINE_INSERT == pRedl->GetType() )
+ if( RedlineType::Delete == pRedl->GetType() ||
+ RedlineType::Insert == pRedl->GetType() )
{
SwComparePosition eCmpPos = ComparePosition( *pDStt, *pDEnd, *pRStt, *pREnd );
switch( eCmpPos )
@@ -2087,9 +2087,9 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
for(const SwRangeRedline* pRedl : rSrcRedlTable)
{
sal_uLong nNd = pRedl->GetPoint()->nNode.GetIndex();
- RedlineType_t eType = pRedl->GetType();
+ RedlineType eType = pRedl->GetType();
if( nEndOfExtra < nNd &&
- ( nsRedlineType_t::REDLINE_INSERT == eType || nsRedlineType_t::REDLINE_DELETE == eType ))
+ ( RedlineType::Insert == eType || RedlineType::Delete == eType ))
{
const SwNode* pDstNd = GetNodes()[
nMyEndOfExtra + nNd - nEndOfExtra ];
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 392bb4fc5008..5bd36426a600 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1781,7 +1781,7 @@ void SwDoc::SetTextFormatCollByAutoFormat( const SwPosition& rPos, sal_uInt16 nP
{
// create the redline object
const SwTextFormatColl& rColl = *pTNd->GetTextColl();
- SwRangeRedline* pRedl = new SwRangeRedline( nsRedlineType_t::REDLINE_FMTCOLL, aPam );
+ SwRangeRedline* pRedl = new SwRangeRedline( RedlineType::FmtColl, aPam );
pRedl->SetMark();
// Only those items that are not set by the Set again in the Node
@@ -1828,7 +1828,7 @@ void SwDoc::SetFormatItemByAutoFormat( const SwPaM& rPam, const SfxItemSet& rSet
if (mbIsAutoFormatRedline)
{
// create the redline object
- SwRangeRedline* pRedl = new SwRangeRedline( nsRedlineType_t::REDLINE_FORMAT, rPam );
+ SwRangeRedline* pRedl = new SwRangeRedline( RedlineType::Format, rPam );
if( !pRedl->HasMark() )
pRedl->SetMark();
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index ad013e8c5744..8138a5197bdd 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -2044,7 +2044,7 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, long const nOffset,
// Test for Redlining - Can the Selection be moved at all, actually?
if( !getIDocumentRedlineAccess().IsIgnoreRedline() )
{
- SwRedlineTable::size_type nRedlPos = getIDocumentRedlineAccess().GetRedlinePos( pStt->nNode.GetNode(), nsRedlineType_t::REDLINE_DELETE );
+ SwRedlineTable::size_type nRedlPos = getIDocumentRedlineAccess().GetRedlinePos( pStt->nNode.GetNode(), RedlineType::Delete );
if( SwRedlineTable::npos != nRedlPos )
{
SwPosition aStPos( *pStt ), aEndPos( *pEnd );
@@ -2057,7 +2057,7 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, long const nOffset,
for( ; nRedlPos < getIDocumentRedlineAccess().GetRedlineTable().size(); ++nRedlPos )
{
const SwRangeRedline* pTmp = getIDocumentRedlineAccess().GetRedlineTable()[ nRedlPos ];
- if( !bCheckDel || nsRedlineType_t::REDLINE_DELETE == pTmp->GetType() )
+ if( !bCheckDel || RedlineType::Delete == pTmp->GetType() )
{
const SwPosition *pRStt = pTmp->Start(), *pREnd = pTmp->End();
switch( ComparePosition( *pRStt, *pREnd, aStPos, aEndPos ))
@@ -2101,12 +2101,12 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, long const nOffset,
if( getIDocumentRedlineAccess().IsRedlineOn() )
{
// If the range is completely in the own Redline, we can move it!
- SwRedlineTable::size_type nRedlPos = getIDocumentRedlineAccess().GetRedlinePos( pStt->nNode.GetNode(), nsRedlineType_t::REDLINE_INSERT );
+ SwRedlineTable::size_type nRedlPos = getIDocumentRedlineAccess().GetRedlinePos( pStt->nNode.GetNode(), RedlineType::Insert );
if( SwRedlineTable::npos != nRedlPos )
{
SwRangeRedline* pTmp = getIDocumentRedlineAccess().GetRedlineTable()[ nRedlPos ];
const SwPosition *pRStt = pTmp->Start(), *pREnd = pTmp->End();
- SwRangeRedline aTmpRedl( nsRedlineType_t::REDLINE_INSERT, rPam );
+ SwRangeRedline aTmpRedl( RedlineType::Insert, rPam );
const SwContentNode* pCEndNd = pEnd->nNode.GetNode().GetContentNode();
// Is completely in the range and is the own Redline too?
if( aTmpRedl.IsOwnRedline( *pTmp ) &&
@@ -2198,7 +2198,7 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, long const nOffset,
{
break;
}
- if (pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE)
+ if (pRedline->GetType() == RedlineType::Delete)
{
assert(*aPam.Start() <= *pRedline->Start()); // caller's fault
SwRangeRedline* pNewRedline;
@@ -2211,7 +2211,7 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, long const nOffset,
pam.GetMark()->nNode += nCurrentOffset;
pam.GetMark()->nContent.Assign(pam.GetMark()->nNode.GetNode().GetContentNode(), pam.GetMark()->nContent.GetIndex());
- pNewRedline = new SwRangeRedline( nsRedlineType_t::REDLINE_DELETE, pam );
+ pNewRedline = new SwRangeRedline( RedlineType::Delete, pam );
}
// note: effectively this will DeleteAndJoin the pam!
getIDocumentRedlineAccess().AppendRedline(pNewRedline, true);
@@ -2272,7 +2272,7 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, long const nOffset,
std::make_unique<SwUndoRedlineDelete>(aPam, SwUndoId::DELETE));
}
- SwRangeRedline* pNewRedline = new SwRangeRedline( nsRedlineType_t::REDLINE_DELETE, aPam );
+ SwRangeRedline* pNewRedline = new SwRangeRedline( RedlineType::Delete, aPam );
// prevent assertion from aPam's target being deleted
// (Alternatively, one could just let aPam go out of scope, but
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 986b48e48de2..6a1183a832cc 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -134,7 +134,7 @@ static bool CheckPosition( const SwPosition* pStt, const SwPosition* pEnd )
}
#endif
-bool SwExtraRedlineTable::DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rTable, bool bSaveInUndo, sal_uInt16 nRedlineTypeToDelete )
+bool SwExtraRedlineTable::DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rTable, bool bSaveInUndo, RedlineType nRedlineTypeToDelete )
{
bool bChg = false;
@@ -164,10 +164,10 @@ bool SwExtraRedlineTable::DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rT
{
// Redline for this table
const SwRedlineData& aRedlineData = pTableCellRedline->GetRedlineData();
- const RedlineType_t nRedlineType = aRedlineData.GetType();
+ const RedlineType nRedlineType = aRedlineData.GetType();
// Check if this redline object type should be deleted
- if (USHRT_MAX == nRedlineTypeToDelete || nRedlineTypeToDelete == nRedlineType)
+ if (RedlineType::Any == nRedlineTypeToDelete || nRedlineTypeToDelete == nRedlineType)
{
DeleteAndDestroy( nCurRedlinePos );
@@ -188,10 +188,10 @@ bool SwExtraRedlineTable::DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rT
{
// Redline for this table
const SwRedlineData& aRedlineData = pTableRowRedline->GetRedlineData();
- const RedlineType_t nRedlineType = aRedlineData.GetType();
+ const RedlineType nRedlineType = aRedlineData.GetType();
// Check if this redline object type should be deleted
- if (USHRT_MAX == nRedlineTypeToDelete || nRedlineTypeToDelete == nRedlineType)
+ if (RedlineType::Any == nRedlineTypeToDelete || nRedlineTypeToDelete == nRedlineType)
{
DeleteAndDestroy( nCurRedlinePos );
@@ -210,7 +210,7 @@ bool SwExtraRedlineTable::DeleteAllTableRedlines( SwDoc* pDoc, const SwTable& rT
return bChg;
}
-bool SwExtraRedlineTable::DeleteTableRowRedline( SwDoc* pDoc, const SwTableLine& rTableLine, bool bSaveInUndo, sal_uInt16 nRedlineTypeToDelete )
+bool SwExtraRedlineTable::DeleteTableRowRedline( SwDoc* pDoc, const SwTableLine& rTableLine, bool bSaveInUndo, RedlineType nRedlineTypeToDelete )
{
bool bChg = false;
@@ -237,10 +237,10 @@ bool SwExtraRedlineTable::DeleteTableRowRedline( SwDoc* pDoc, const SwTableLine&
{
// Redline for this table row
const SwRedlineData& aRedlineData = pTableRowRedline->GetRedlineData();
- const RedlineType_t nRedlineType = aRedlineData.GetType();
+ const RedlineType nRedlineType = aRedlineData.GetType();
// Check if this redline object type should be deleted
- if( USHRT_MAX != nRedlineTypeToDelete && nRedlineTypeToDelete != nRedlineType )
+ if( RedlineType::Any != nRedlineTypeToDelete && nRedlineTypeToDelete != nRedlineType )
continue;
DeleteAndDestroy( nCurRedlinePos );
@@ -254,7 +254,7 @@ bool SwExtraRedlineTable::DeleteTableRowRedline( SwDoc* pDoc, const SwTableLine&
return bChg;
}
-bool SwExtraRedlineTable::DeleteTableCellRedline( SwDoc* pDoc, const SwTableBox& rTableBox, bool bSaveInUndo, sal_uInt16 nRedlineTypeToDelete )
+bool SwExtraRedlineTable::DeleteTableCellRedline( SwDoc* pDoc, const SwTableBox& rTableBox, bool bSaveInUndo, RedlineType nRedlineTypeToDelete )
{
bool bChg = false;
@@ -281,10 +281,10 @@ bool SwExtraRedlineTable::DeleteTableCellRedline( SwDoc* pDoc, const SwTableBox&
{
// Redline for this table cell
const SwRedlineData& aRedlineData = pTableCellRedline->GetRedlineData();
- const RedlineType_t nRedlineType = aRedlineData.GetType();
+ const RedlineType nRedlineType = aRedlineData.GetType();
// Check if this redline object type should be deleted
- if( USHRT_MAX != nRedlineTypeToDelete && nRedlineTypeToDelete != nRedlineType )
+ if( RedlineType::Any != nRedlineTypeToDelete && nRedlineTypeToDelete != nRedlineType )
continue;
DeleteAndDestroy( nCurRedlinePos );
@@ -362,7 +362,7 @@ void SwRedlineTable::LOKRedlineNotification(RedlineNotification nType, SwRangeRe
(nType == RedlineNotification::Modify ? "Modify" : "???"))));
aRedline.put("index", pRedline->GetId());
aRedline.put("author", pRedline->GetAuthorString(1).toUtf8().getStr());
- aRedline.put("type", nsRedlineType_t::SwRedlineTypeToOUString(pRedline->GetRedlineData().GetType()).toUtf8().getStr());
+ aRedline.put("type", SwRedlineTypeToOUString(pRedline->GetRedlineData().GetType()).toUtf8().getStr());
aRedline.put("comment", pRedline->GetRedlineData().GetComment().toUtf8().getStr());
aRedline.put("description", pRedline->GetDescr().toUtf8().getStr());
OUString sDateTime = utl::toISO8601(pRedline->GetRedlineData().GetTimeStamp().GetUNODateTime());
@@ -935,7 +935,7 @@ bool SwRedlineExtraData_FormattingChanges::operator == ( const SwRedlineExtraDat
return false;
}
-SwRedlineData::SwRedlineData( RedlineType_t eT, std::size_t nAut )
+SwRedlineData::SwRedlineData( RedlineType eT, std::size_t nAut )
: m_pNext( nullptr ), m_pExtraData( nullptr ),
m_aStamp( DateTime::SYSTEM ),
m_eType( eT ), m_nAuthor( nAut ), m_nSeqNo( 0 )
@@ -957,7 +957,7 @@ SwRedlineData::SwRedlineData(
}
// For sw3io: We now own pNext!
-SwRedlineData::SwRedlineData(RedlineType_t eT, std::size_t nAut, const DateTime& rDT,
+SwRedlineData::SwRedlineData(RedlineType eT, std::size_t nAut, const DateTime& rDT,
const OUString& rCmnt, SwRedlineData *pNxt)
: m_pNext(pNxt), m_pExtraData(nullptr), m_sComment(rCmnt), m_aStamp(rDT),
m_eType(eT), m_nAuthor(nAut), m_nSeqNo(0)
@@ -1017,12 +1017,12 @@ static const char* STR_REDLINE_ARY[] =
OUString SwRedlineData::GetDescr() const
{
- return SwResId(STR_REDLINE_ARY[GetType()]);
+ return SwResId(STR_REDLINE_ARY[static_cast<int>(GetType())]);
}
sal_uInt32 SwRangeRedline::m_nLastId = 1;
-SwRangeRedline::SwRangeRedline(RedlineType_t eTyp, const SwPaM& rPam )
+SwRangeRedline::SwRangeRedline(RedlineType eTyp, const SwPaM& rPam )
: SwPaM( *rPam.GetMark(), *rPam.GetPoint() ),
m_pRedlineData( new SwRedlineData( eTyp, GetDoc()->getIDocumentRedlineAccess().GetRedlineAuthor() ) ),
m_pContentSect( nullptr ),
@@ -1162,18 +1162,18 @@ void SwRangeRedline::Show(sal_uInt16 nLoop, size_t nMyPos)
switch( GetType() )
{
- case nsRedlineType_t::REDLINE_INSERT: // Content has been inserted
+ case RedlineType::Insert: // Content has been inserted
m_bIsVisible = true;
MoveFromSection(nMyPos);
break;
- case nsRedlineType_t::REDLINE_DELETE: // Content has been deleted
+ case RedlineType::Delete: // Content has been deleted
m_bIsVisible = true;
MoveFromSection(nMyPos);
break;
- case nsRedlineType_t::REDLINE_FORMAT: // Attributes have been applied
- case nsRedlineType_t::REDLINE_TABLE: // Table structure has been modified
+ case RedlineType::Format: // Attributes have been applied
+ case RedlineType::Table: // Table structure has been modified
InvalidateRange(Invalidation::Add);
break;
default:
@@ -1192,13 +1192,13 @@ void SwRangeRedline::Hide(sal_uInt16 nLoop, size_t nMyPos)
switch( GetType() )
{
- case nsRedlineType_t::REDLINE_INSERT: // Content has been inserted
+ case RedlineType::Insert: // Content has been inserted
m_bIsVisible = true;
if( 1 <= nLoop )
MoveFromSection(nMyPos);
break;
- case nsRedlineType_t::REDLINE_DELETE: // Content has been deleted
+ case RedlineType::Delete: // Content has been deleted
m_bIsVisible = false;
switch( nLoop )
{
@@ -1208,8 +1208,8 @@ void SwRangeRedline::Hide(sal_uInt16 nLoop, size_t nMyPos)
}
break;
- case nsRedlineType_t::REDLINE_FORMAT: // Attributes have been applied
- case nsRedlineType_t::REDLINE_TABLE: // Table structure has been modified
+ case RedlineType::Format: // Attributes have been applied
+ case RedlineType::Table: // Table structure has been modified
if( 1 <= nLoop )
InvalidateRange(Invalidation::Remove);
break;
@@ -1234,7 +1234,7 @@ void SwRangeRedline::ShowOriginal(sal_uInt16 nLoop, size_t nMyPos)
switch( pCur->m_eType )
{
- case nsRedlineType_t::REDLINE_INSERT: // Content has been inserted
+ case RedlineType::Insert: // Content has been inserted
m_bIsVisible = false;
switch( nLoop )
{
@@ -1244,14 +1244,14 @@ void SwRangeRedline::ShowOriginal(sal_uInt16 nLoop, size_t nMyPos)
}
break;
- case nsRedlineType_t::REDLINE_DELETE: // Content has been deleted
+ case RedlineType::Delete: // Content has been deleted
m_bIsVisible = true;
if( 1 <= nLoop )
MoveFromSection(nMyPos);
break;
- case nsRedlineType_t::REDLINE_FORMAT: // Attributes have been applied
- case nsRedlineType_t::REDLINE_TABLE: // Table structure has been modified
+ case RedlineType::Format: // Attributes have been applied
+ case RedlineType::Table: // Table structure has been modified
if( 1 <= nLoop )
InvalidateRange(Invalidation::Remove);
break;
@@ -1292,7 +1292,7 @@ void SwRangeRedline::InvalidateRange(Invalidation const eWhy)
pNd->ModifyNotification(&aHt, &aHt);
// SwUpdateAttr must be handled first, otherwise indexes are off
- if (GetType() == nsRedlineType_t::REDLINE_DELETE)
+ if (GetType() == RedlineType::Delete)
{
sal_Int32 const nStart(n == nSttNd ? nSttCnt : 0);
sal_Int32 const nLen((n == nEndNd ? nEndCnt : pNd->GetText().getLength()) - nStart);
@@ -1776,7 +1776,7 @@ const DateTime& SwRangeRedline::GetTimeStamp( sal_uInt16 nPos ) const
return GetRedlineData(nPos).m_aStamp;
}
-RedlineType_t SwRangeRedline::GetRealType( sal_uInt16 nPos ) const
+RedlineType SwRangeRedline::GetType( sal_uInt16 nPos ) const
{
return GetRedlineData(nPos).m_eType;
}
@@ -1870,13 +1870,13 @@ void SwRangeRedline::dumpAsXml(xmlTextWriterPtr pWriter) const
OString sRedlineType;
switch (GetType())
{
- case nsRedlineType_t::REDLINE_INSERT:
+ case RedlineType::Insert:
sRedlineType = "REDLINE_INSERT";
break;
- case nsRedlineType_t::REDLINE_DELETE:
+ case RedlineType::Delete:
sRedlineType = "REDLINE_DELETE";
break;
- case nsRedlineType_t::REDLINE_FORMAT:
+ case RedlineType::Format:
sRedlineType = "REDLINE_FORMAT";
break;
default:
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 1be8ffa88358..20e956187aed 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -346,7 +346,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
GetNodes().Copy_( aRg, aEndIdx );
// range is new from pEnd->nNode+1 to aEndIdx
- getIDocumentRedlineAccess().DeleteRedline( *pRedlPam, true, USHRT_MAX );
+ getIDocumentRedlineAccess().DeleteRedline( *pRedlPam, true, RedlineType::Any );
pRedlPam->GetMark()->nNode.Assign( pEnd->nNode.GetNode(), 1 );
pCNd = pRedlPam->GetContentNode( false );
@@ -368,7 +368,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
}
else
{
- getIDocumentRedlineAccess().DeleteRedline( *pRedlPam, true, USHRT_MAX );
+ getIDocumentRedlineAccess().DeleteRedline( *pRedlPam, true, RedlineType::Any );
delete pRedlPam;
pRedlPam = nullptr;
}
@@ -434,7 +434,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
// the copied range is deleted
SwRangeRedline *const pDeleteRedline(
- new SwRangeRedline( nsRedlineType_t::REDLINE_DELETE, *pRedlPam ));
+ new SwRangeRedline( RedlineType::Delete, *pRedlPam ));
// pRedlPam points to nodes that may be deleted (hidden) by
// AppendRedline, so adjust it beforehand to prevent ASSERT
@@ -445,7 +445,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
getIDocumentRedlineAccess().AppendRedline(pDeleteRedline, true);
// the sorted range is inserted
- getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, *pRedlPam ), true);
+ getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Insert, *pRedlPam ), true);
if( pRedlUndo )
{
@@ -491,7 +491,7 @@ bool SwDoc::SortTable(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
return false;
if( !getIDocumentRedlineAccess().IsIgnoreRedline() && !getIDocumentRedlineAccess().GetRedlineTable().empty() )
- getIDocumentRedlineAccess().DeleteRedline( *pTableNd, true, USHRT_MAX );
+ getIDocumentRedlineAccess().DeleteRedline( *pTableNd, true, RedlineType::Any );
FndLines_t::size_type nStart = 0;
if( pTableNd->GetTable().GetRowsToRepeat() > 0 && rOpt.eDirection == SRT_ROWS )
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 13ca079c2804..9a01f4da776c 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -916,7 +916,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
SwUndoUpdateIndex * pUndo(nullptr);
{
- pDoc->getIDocumentRedlineAccess().DeleteRedline( *pSectNd, true, USHRT_MAX );
+ pDoc->getIDocumentRedlineAccess().DeleteRedline( *pSectNd, true, RedlineType::Any );
SwNodeIndex aSttIdx( *pSectNd, +1 );
SwNodeIndex aEndIdx( *pSectNd->EndOfSectionNode() );
diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx
index 41831272a534..37ac0e0286d5 100644
--- a/sw/source/core/doc/ftnidx.cxx
+++ b/sw/source/core/doc/ftnidx.cxx
@@ -42,7 +42,7 @@ bool IsFootnoteDeleted(IDocumentRedlineAccess const& rIDRA,
rTextFootnote.GetStart());
SwRangeRedline const*const pRedline(rIDRA.GetRedline(pos, &tmp));
return (pRedline
- && pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE
+ && pRedline->GetType() == RedlineType::Delete
&& *pRedline->GetPoint() != *pRedline->GetMark());
}
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index b414d65847f7..1084e4c77475 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -718,7 +718,7 @@ void DeleteBox_( SwTable& rTable, SwTableBox* pBox, SwUndo* pUndo,
// Before deleting the 'Table Box' from memory - delete any redlines attached to it
if ( rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().HasExtraRedlineTable() )
- rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteTableCellRedline( rTable.GetFrameFormat()->GetDoc(), *(rTableBoxes[nDelPos]), true, USHRT_MAX );
+ rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteTableCellRedline( rTable.GetFrameFormat()->GetDoc(), *(rTableBoxes[nDelPos]), true, RedlineType::Any );
delete rTableBoxes[nDelPos];
rTableBoxes.erase( rTableBoxes.begin() + nDelPos );
@@ -771,7 +771,7 @@ void DeleteBox_( SwTable& rTable, SwTableBox* pBox, SwUndo* pUndo,
SwTableLine* pTabLineToDelete = rTable.GetTabLines()[ nDelPos ];
// Before deleting the 'Table Line' from memory - delete any redlines attached to it
if ( rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().HasExtraRedlineTable() )
- rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteTableRowRedline( rTable.GetFrameFormat()->GetDoc(), *pTabLineToDelete, true, USHRT_MAX );
+ rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteTableRowRedline( rTable.GetFrameFormat()->GetDoc(), *pTabLineToDelete, true, RedlineType::Any );
delete pTabLineToDelete;
rTable.GetTabLines().erase( rTable.GetTabLines().begin() + nDelPos );
break; // we cannot delete more
@@ -786,7 +786,7 @@ void DeleteBox_( SwTable& rTable, SwTableBox* pBox, SwUndo* pUndo,
SwTableLine* pTabLineToDelete = pBox->GetTabLines()[ nDelPos ];
// Before deleting the 'Table Line' from memory - delete any redlines attached to it
if ( rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().HasExtraRedlineTable() )
- rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteTableRowRedline( rTable.GetFrameFormat()->GetDoc(), *pTabLineToDelete, true, USHRT_MAX );
+ rTable.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteTableRowRedline( rTable.GetFrameFormat()->GetDoc(), *pTabLineToDelete, true, RedlineType::Any );
delete pTabLineToDelete;
pBox->GetTabLines().erase( pBox->GetTabLines().begin() + nDelPos );
} while( pBox->GetTabLines().empty() );
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index 16c26f4befa1..641c074c618c 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -329,7 +329,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
SwPaM aPam( *pNewSectNode->EndOfSectionNode(), *pNewSectNode, 1 );
if( getIDocumentRedlineAccess().IsRedlineOn() )
{
- getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
+ getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Insert, aPam ), true);
}
else
{
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index b86b2f52d9f2..e71fb003bf9f 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -547,7 +547,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts,
{
SwPaM aPam( *pTableNd->EndOfSectionNode(), *pTableNd, 1 );
if( getIDocumentRedlineAccess().IsRedlineOn() )
- getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
+ getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Insert, aPam ), true);
else
getIDocumentRedlineAccess().SplitRedline( aPam );
}
@@ -2472,7 +2472,7 @@ void SwTableNode::RemoveRedlines()
{
SwTable& rTable = GetTable();
if ( pDoc->getIDocumentRedlineAccess().HasExtraRedlineTable() )
- pDoc->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteAllTableRedlines( pDoc, rTable, true, USHRT_MAX );
+ pDoc->getIDocumentRedlineAccess().GetExtraRedlineTable().DeleteAllTableRedlines( pDoc, rTable, true, RedlineType::Any );
}
}
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index f39616624c36..c2fbfef86d82 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -1147,7 +1147,7 @@ bool GetRanges(std::vector<std::shared_ptr<SwUnoCursor>> & rRanges,
{
continue;
}
- if (pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE)
+ if (pRedline->GetType() == RedlineType::Delete)
{
assert(*pRedline->Start() != *pRedline->End());
isNoRedline = false;
diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx
index 41ea8139b11a..8375bddaf445 100644
--- a/sw/source/core/edit/edatmisc.cxx
+++ b/sw/source/core/edit/edatmisc.cxx
@@ -102,7 +102,7 @@ static void lcl_disableShowChangesIfNeeded( SwDoc *const pDoc, const SwNode& rNo
{
if ( IDocumentRedlineAccess::IsShowChanges(eRedlMode) &&
// is there redlining at beginning of the position (possible redline block before the modified node)
- pDoc->getIDocumentRedlineAccess().GetRedlinePos( rNode, USHRT_MAX ) <
+ pDoc->getIDocumentRedlineAccess().GetRedlinePos( rNode, RedlineType::Any ) <
pDoc->getIDocumentRedlineAccess().GetRedlineTable().size() )
{
eRedlMode = RedlineFlags::ShowInsert | RedlineFlags::Ignore;
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index ab31bef2be55..4df464ee49ed 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -2206,7 +2206,7 @@ void SwEditShell::SetTextFormatColl(SwTextFormatColl *pFormat,
// ie. in all directly preceding deleted paragraphs at the actual cursor positions
if ( IDocumentRedlineAccess::IsShowChanges(eRedlMode) &&
// is there redlining at beginning of the position (possible redline block before the modified node)
- GetDoc()->getIDocumentRedlineAccess().GetRedlinePos( (*rPaM.Start()).nNode.GetNode(), USHRT_MAX ) <
+ GetDoc()->getIDocumentRedlineAccess().GetRedlinePos( (*rPaM.Start()).nNode.GetNode(), RedlineType::Any ) <
GetDoc()->getIDocumentRedlineAccess().GetRedlineTable().size() )
{
eRedlMode = RedlineFlags::ShowInsert | RedlineFlags::Ignore;
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index c533e8013575..335041745d0b 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -1228,7 +1228,7 @@ static SpellContentPositions lcl_CollectDeletedRedlines(SwEditShell const * pSh)
const SwPosition* pStartPos = pCursor->Start();
const SwTextNode* pTextNode = pCursor->GetNode().GetTextNode();
- SwRedlineTable::size_type nAct = pDoc->getIDocumentRedlineAccess().GetRedlinePos( *pTextNode, USHRT_MAX );
+ SwRedlineTable::size_type nAct = pDoc->getIDocumentRedlineAccess().GetRedlinePos( *pTextNode, RedlineType::Any );
const sal_Int32 nStartIndex = pStartPos->nContent.GetIndex();
for ( ; nAct < pDoc->getIDocumentRedlineAccess().GetRedlineTable().size(); nAct++ )
{
@@ -1237,7 +1237,7 @@ static SpellContentPositions lcl_CollectDeletedRedlines(SwEditShell const * pSh)
if ( pRed->Start()->nNode > pTextNode->GetIndex() )
break;
- if( nsRedlineType_t::REDLINE_DELETE == pRed->GetType() )
+ if( RedlineType::Delete == pRed->GetType() )
{
sal_Int32 nStart_, nEnd_;
pRed->CalcStartEnd( pTextNode->GetIndex(), nStart_, nEnd_ );
diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx
index 8b276678a3d7..dde8d8dcaecf 100644
--- a/sw/source/core/fields/postithelper.cxx
+++ b/sw/source/core/fields/postithelper.cxx
@@ -89,9 +89,9 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos(
const SwRangeRedline* pRedline = rIDRA.GetRedline( rAnchorPos, nullptr );
if( pRedline )
{
- if( nsRedlineType_t::REDLINE_INSERT == pRedline->GetType() )
+ if( RedlineType::Insert == pRedline->GetType() )
aRet = INSERTED;
- else if( nsRedlineType_t::REDLINE_DELETE == pRedline->GetType() )
+ else if( RedlineType::Delete == pRedline->GetType() )
aRet = DELETED;
o_rInfo.mRedlineAuthor = pRedline->GetAuthor();
}
diff --git a/sw/source/core/inc/DocumentRedlineManager.hxx b/sw/source/core/inc/DocumentRedlineManager.hxx
index 56ff92942de9..dd64f5511d12 100644
--- a/sw/source/core/inc/DocumentRedlineManager.hxx
+++ b/sw/source/core/inc/DocumentRedlineManager.hxx
@@ -65,16 +65,16 @@ public:
virtual bool DeleteRedline(
/*[in]*/const SwPaM& rPam,
/*[in]*/bool bSaveInUndo,
- /*[in]*/sal_uInt16 nDelType) override;
+ /*[in]*/RedlineType nDelType) override;
virtual bool DeleteRedline(
/*[in]*/const SwStartNode& rSection,
/*[in]*/bool bSaveInUndo,
- /*[in]*/sal_uInt16 nDelType) override;
+ /*[in]*/RedlineType nDelType) override;
virtual SwRedlineTable::size_type GetRedlinePos(
/*[in]*/const SwNode& rNode,
- /*[in]*/sal_uInt16 nType) const override;
+ /*[in]*/RedlineType nType) const override;
virtual void CompressRedlines() override;
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 2cfab46f988a..0526dfe5b2bd 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1465,7 +1465,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc,
// pathology: redline that starts on a TableNode; cannot
// be created in UI but by import filters...
if (pRedline
- && pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE
+ && pRedline->GetType() == RedlineType::Delete
&& &pRedline->Start()->nNode.GetNode() == pNd)
{
SAL_WARN("sw.pageframe", "skipping table frame creation on bizarre redline");
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 4e80de512c8b..55b9dfe32e4e 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -451,7 +451,7 @@ void SwTextFrame::RegisterToNode(SwTextNode & rNode, bool const isForceNodeAsFir
{ // nothing registered here, in particular no redlines
assert(m_pMergedPara->pFirstNode->GetIndex() + 1 == rNode.GetIndex());
assert(rNode.GetDoc()->getIDocumentRedlineAccess().GetRedlinePos(
- *m_pMergedPara->pFirstNode, USHRT_MAX) == SwRedlineTable::npos);
+ *m_pMergedPara->pFirstNode, RedlineType::Any) == SwRedlineTable::npos);
}
assert(&rNode != GetDep());
assert(!m_pMergedPara
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index b6014ddbd18c..c3e751f3b6f2 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -4395,7 +4395,7 @@ static void UnHideRedlines(SwRootFrame & rLayout,
// pathology: redline that starts on a TableNode; cannot
// be created in UI but by import filters...
if (pRedline
- && pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE
+ && pRedline->GetType() == RedlineType::Delete
&& &pRedline->Start()->nNode.GetNode() == &rNode)
{
for (sal_uLong j = rNode.GetIndex(); j <= rNode.EndOfSectionIndex(); ++j)
@@ -4544,7 +4544,7 @@ void SwRootFrame::SetHideRedlines(bool const bHideRedlines)
for (auto const pRedline : rDoc.getIDocumentRedlineAccess().GetRedlineTable())
{ // DELETE are handled by the code above; for other types, need to
// trigger repaint of text frames to add/remove the redline color font
- if (pRedline->GetType() != nsRedlineType_t::REDLINE_DELETE)
+ if (pRedline->GetType() != RedlineType::Delete)
{
pRedline->InvalidateRange(SwRangeRedline::Invalidation::Add);
}
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 337d712d95db..f550aed40da8 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -2036,7 +2036,7 @@ void ChgTextToNum( SwTableBox& rBox, const OUString& rText, const Color* pCol,
if( !pDoc->getIDocumentRedlineAccess().IsIgnoreRedline() && !pDoc->getIDocumentRedlineAccess().GetRedlineTable().empty() )
{
SwPaM aTemp(*pTNd, 0, *pTNd, rOrig.getLength());
- pDoc->getIDocumentRedlineAccess().DeleteRedline(aTemp, true, USHRT_MAX);
+ pDoc->getIDocumentRedlineAccess().DeleteRedline(aTemp, true, RedlineType::Any);
}
// preserve comments inside of the number by deleting number portions starting from the back
@@ -2061,7 +2061,7 @@ void ChgTextToNum( SwTableBox& rBox, const OUString& rText, const Color* pCol,
if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
{
SwPaM aTemp(*pTNd, 0, *pTNd, rText.getLength());
- pDoc->getIDocumentRedlineAccess().AppendRedline(new SwRangeRedline(nsRedlineType_t::REDLINE_INSERT, aTemp), true);
+ pDoc->getIDocumentRedlineAccess().AppendRedline(new SwRangeRedline(RedlineType::Insert, aTemp), true);
}
}
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 70db09b052bb..3c018f0a702c 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -355,7 +355,7 @@ void SwTextFrame::MakePos()
{
pRedln->MaybeNotifyRedlinePositionModification(getFrameArea().Top());
if (GetMergedPara()
- && pRedln->GetType() == nsRedlineType_t::REDLINE_DELETE
+ && pRedln->GetType() == RedlineType::Delete
&& pRedln->GetPoint()->nNode != pRedln->GetMark()->nNode)
{
pTextNode = pRedln->End()->nNode.GetNode().GetTextNode();
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 99e34f9673a6..e52f220ffbf2 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -389,7 +389,7 @@ void SwTextFrame::PaintExtraData( const SwRect &rRect ) const
else
{
if (!GetMergedPara() &&
- SwRedlineTable::npos == rIDRA.GetRedlinePos(*GetTextNodeFirst(), USHRT_MAX))
+ SwRedlineTable::npos == rIDRA.GetRedlinePos(*GetTextNodeFirst(), RedlineType::Any))
{
bRedLine = false;
}
@@ -484,7 +484,7 @@ bool SwTextFrame::PaintEmpty( const SwRect &rRect, bool bCheck ) const
if (IDocumentRedlineAccess::IsShowChanges(rIDRA.GetRedlineFlags())
&& !getRootFrame()->IsHideRedlines())
{
- const SwRedlineTable::size_type nRedlPos = rIDRA.GetRedlinePos( rTextNode, USHRT_MAX );
+ const SwRedlineTable::size_type nRedlPos = rIDRA.GetRedlinePos( rTextNode, RedlineType::Any );
if( SwRedlineTable::npos != nRedlPos )
{
SwAttrHandler aAttrHandler;
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 46b3c60c8aa1..eea5dbd4a622 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -2306,7 +2306,7 @@ void SwScriptInfo::selectRedLineDeleted(const SwTextNode& rNode, MultiSelection
const IDocumentRedlineAccess& rIDRA = rNode.getIDocumentRedlineAccess();
if ( IDocumentRedlineAccess::IsShowChanges( rIDRA.GetRedlineFlags() ) )
{
- SwRedlineTable::size_type nAct = rIDRA.GetRedlinePos( rNode, USHRT_MAX );
+ SwRedlineTable::size_type nAct = rIDRA.GetRedlinePos( rNode, RedlineType::Any );
for ( ; nAct < rIDRA.GetRedlineTable().size(); nAct++ )
{
@@ -2315,7 +2315,7 @@ void SwScriptInfo::selectRedLineDeleted(const SwTextNode& rNode, MultiSelection
if (pRed->Start()->nNode > rNode.GetIndex())
break;
- if (pRed->GetType() != nsRedlineType_t::REDLINE_DELETE)
+ if (pRed->GetType() != RedlineType::Delete)
continue;
sal_Int32 nRedlStart;
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 8ea644532112..3ae4b9623978 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -252,7 +252,7 @@ SwTwips SwTextFrame::EmptyHeight() const
if (IDocumentRedlineAccess::IsShowChanges(rIDRA.GetRedlineFlags())
&& !getRootFrame()->IsHideRedlines())
{
- const SwRedlineTable::size_type nRedlPos = rIDRA.GetRedlinePos( rTextNode, USHRT_MAX );
+ const SwRedlineTable::size_type nRedlPos = rIDRA.GetRedlinePos( rTextNode, RedlineType::Any );
if( SwRedlineTable::npos != nRedlPos )
{
SwAttrHandler aAttrHandler;
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index e98240098786..6133b08ce1bb 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -68,7 +68,7 @@ CheckParaRedlineMerge(SwTextFrame & rFrame, SwTextNode & rTextNode,
SwTextNode * pParaPropsNode(nullptr);
SwTextNode * pNode(&rTextNode);
sal_Int32 nLastEnd(0);
- for (auto i = rIDRA.GetRedlinePos(rTextNode, USHRT_MAX);
+ for (auto i = rIDRA.GetRedlinePos(rTextNode, RedlineType::Any);
i < rIDRA.GetRedlineTable().size(); ++i)
{
SwRangeRedline const*const pRed = rIDRA.GetRedlineTable()[i];
@@ -76,7 +76,7 @@ CheckParaRedlineMerge(SwTextFrame & rFrame, SwTextNode & rTextNode,
if (pNode->GetIndex() < pRed->Start()->nNode.GetIndex())
break;
- if (pRed->GetType() != nsRedlineType_t::REDLINE_DELETE)
+ if (pRed->GetType() != RedlineType::Delete)
continue;
SwPosition const*const pStart(pRed->Start());
@@ -445,7 +445,7 @@ void SwAttrIter::CtorInitAttrIter(SwTextNode & rTextNode,
&& pRootFrame && !pRootFrame->IsHideRedlines();
if (pExtInp || m_pMergedPara || bShow)
{
- SwRedlineTable::size_type nRedlPos = rIDRA.GetRedlinePos( rTextNode, USHRT_MAX );
+ SwRedlineTable::size_type nRedlPos = rIDRA.GetRedlinePos( rTextNode, RedlineType::Any );
if (SwRedlineTable::npos == nRedlPos && m_pMergedPara)
{
SwTextNode const* pNode(&rTextNode);
@@ -454,7 +454,7 @@ void SwAttrIter::CtorInitAttrIter(SwTextNode & rTextNode,
if (rExtent.pNode != pNode)
{
pNode = rExtent.pNode;
- nRedlPos = rIDRA.GetRedlinePos(*pNode, USHRT_MAX);
+ nRedlPos = rIDRA.GetRedlinePos(*pNode, RedlineType::Any);
if (SwRedlineTable::npos != nRedlPos)
break;
}
@@ -635,7 +635,7 @@ short SwRedlineItr::Seek(SwFont& rFnt,
SwRangeRedline const*const pRedline(
m_rDoc.getIDocumentRedlineAccess().GetRedlineTable()[m_nAct]);
SwPosition const*const pStart(pRedline->Start());
- if (pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE
+ if (pRedline->GetType() == RedlineType::Delete
&& (nNode < pStart->nNode.GetIndex()
|| (nNode == pStart->nNode.GetIndex()
&& nNew <= pStart->nContent.GetIndex())))
@@ -650,18 +650,18 @@ short SwRedlineItr::Seek(SwFont& rFnt,
return nRet + EnterExtend(rFnt, nNode, nNew);
}
-void SwRedlineItr::FillHints( std::size_t nAuthor, RedlineType_t eType )
+void SwRedlineItr::FillHints( std::size_t nAuthor, RedlineType eType )
{
switch ( eType )
{
- case nsRedlineType_t::REDLINE_INSERT:
+ case RedlineType::Insert:
SW_MOD()->GetInsertAuthorAttr(nAuthor, *m_pSet);
break;
- case nsRedlineType_t::REDLINE_DELETE:
+ case RedlineType::Delete:
SW_MOD()->GetDeletedAuthorAttr(nAuthor, *m_pSet);
break;
- case nsRedlineType_t::REDLINE_FORMAT:
- case nsRedlineType_t::REDLINE_FMTCOLL:
+ case RedlineType::Format:
+ case RedlineType::FmtColl:
SW_MOD()->GetFormatAuthorAttr(nAuthor, *m_pSet);
break;
default:
@@ -730,7 +730,7 @@ SwRedlineItr::GetNextRedln(sal_Int32 nNext, SwTextNode const*const pNode,
m_rDoc.getIDocumentRedlineAccess().GetRedlineTable()[rAct]);
pRedline->CalcStartEnd(pNode->GetIndex(), nStart, nEnd);
if (m_eMode != Mode::Hide
- || pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE)
+ || pRedline->GetType() == RedlineType::Delete)
{
break;
}
@@ -757,8 +757,8 @@ SwRedlineItr::GetNextRedln(sal_Int32 nNext, SwTextNode const*const pNode,
assert(m_eMode == Mode::Hide);
SwRangeRedline const* pRedline(
m_rDoc.getIDocumentRedlineAccess().GetRedlineTable()[rAct]);
- assert(pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE); //?
- if (pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE)
+ assert(pRedline->GetType() == RedlineType::Delete); //?
+ if (pRedline->GetType() == RedlineType::Delete)
{
nNext = nStart;
size_t nSkipped(1); // (consecutive) candidates to be skipped
@@ -772,7 +772,7 @@ SwRedlineItr::GetNextRedln(sal_Int32 nNext, SwTextNode const*const pNode,
break; // done for now
}
else if (*pNext->Start() == *pRedline->End() &&
- pNext->GetType() == nsRedlineType_t::REDLINE_DELETE)
+ pNext->GetType() == RedlineType::Delete)
{
// consecutive delete - continue
pRedline = pNext;
diff --git a/sw/source/core/text/redlnitr.hxx b/sw/source/core/text/redlnitr.hxx
index 0d6d365e9637..6fc39e14f240 100644
--- a/sw/source/core/text/redlnitr.hxx
+++ b/sw/source/core/text/redlnitr.hxx
@@ -89,7 +89,7 @@ private:
void Clear_( SwFont* pFnt );
bool ChkSpecialUnderline_() const;
- void FillHints( std::size_t nAuthor, RedlineType_t eType );
+ void FillHints( std::size_t nAuthor, RedlineType eType );
short EnterExtend(SwFont& rFnt, sal_uLong const nNode, sal_Int32 const nNew)
{
if (m_pExt) return m_pExt->Enter(rFnt, nNode, nNew);
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index ff94c1848b1b..532dec392920 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -3614,7 +3614,7 @@ OUString SwTextNode::GetRedlineText() const
{
std::vector<sal_Int32> aRedlArr;
const SwDoc* pDoc = GetDoc();
- SwRedlineTable::size_type nRedlPos = pDoc->getIDocumentRedlineAccess().GetRedlinePos( *this, nsRedlineType_t::REDLINE_DELETE );
+ SwRedlineTable::size_type nRedlPos = pDoc->getIDocumentRedlineAccess().GetRedlinePos( *this, RedlineType::Delete );
if( SwRedlineTable::npos != nRedlPos )
{
// some redline-delete object exists for the node
@@ -3622,7 +3622,7 @@ OUString SwTextNode::GetRedlineText() const
for( ; nRedlPos < pDoc->getIDocumentRedlineAccess().GetRedlineTable().size() ; ++nRedlPos )
{
const SwRangeRedline* pTmp = pDoc->getIDocumentRedlineAccess().GetRedlineTable()[ nRedlPos ];
- if( nsRedlineType_t::REDLINE_DELETE == pTmp->GetType() )
+ if( RedlineType::Delete == pTmp->GetType() )
{
const SwPosition *pRStt = pTmp->Start(), *pREnd = pTmp->End();
if( pRStt->nNode < nNdIdx )
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index c4dd0d09805c..d00dbf9c5358 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -149,14 +149,14 @@ lcl_MaskRedlines( const SwTextNode& rNode, OUStringBuffer& rText,
const SwDoc& rDoc = *rNode.GetDoc();
- for ( SwRedlineTable::size_type nAct = rDoc.getIDocumentRedlineAccess().GetRedlinePos( rNode, USHRT_MAX ); nAct < rDoc.getIDocumentRedlineAccess().GetRedlineTable().size(); ++nAct )
+ for ( SwRedlineTable::size_type nAct = rDoc.getIDocumentRedlineAccess().GetRedlinePos( rNode, RedlineType::Any ); nAct < rDoc.getIDocumentRedlineAccess().GetRedlineTable().size(); ++nAct )
{
const SwRangeRedline* pRed = rDoc.getIDocumentRedlineAccess().GetRedlineTable()[ nAct ];
if ( pRed->Start()->nNode > rNode.GetIndex() )
break;
- if( nsRedlineType_t::REDLINE_DELETE == pRed->GetType() )
+ if( RedlineType::Delete == pRed->GetType() )
{
sal_Int32 nRedlineEnd;
sal_Int32 nRedlineStart;
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index 86cf73bef4c3..ff54f61ca06c 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -693,8 +693,8 @@ void SwUndoAttr::SaveRedlineData( const SwPaM& rPam, bool bIsContent )
SwDoc* pDoc = rPam.GetDoc();
if ( pDoc->getIDocumentRedlineAccess().IsRedlineOn() ) {
m_pRedlineData.reset( new SwRedlineData( bIsContent
- ? nsRedlineType_t::REDLINE_INSERT
- : nsRedlineType_t::REDLINE_FORMAT,
+ ? RedlineType::Insert
+ : RedlineType::Format,
pDoc->getIDocumentRedlineAccess().GetRedlineAuthor() ) );
}
@@ -722,11 +722,11 @@ void SwUndoAttr::UndoImpl(::sw::UndoRedoContext & rContext)
aPam.GetPoint()->nContent.Assign( aPam.GetContentNode(), nSttContent );
aPam.SetMark();
++aPam.GetPoint()->nContent;
- pDoc->getIDocumentRedlineAccess().DeleteRedline(aPam, false, USHRT_MAX);
+ pDoc->getIDocumentRedlineAccess().DeleteRedline(aPam, false, RedlineType::Any);
} else {
// remove all format redlines, will be recreated if needed
SetPaM(aPam);
- pDoc->getIDocumentRedlineAccess().DeleteRedline(aPam, false, nsRedlineType_t::REDLINE_FORMAT);
+ pDoc->getIDocumentRedlineAccess().DeleteRedline(aPam, false, RedlineType::Format);
if (m_pRedlineSaveData)
{
SetSaveData( *pDoc, *m_pRedlineSaveData );
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index daa062536d88..a53458952594 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -80,7 +80,7 @@ static SwTextNode * FindFirstAndNextNode(SwDoc & rDoc, SwUndRng const& rRange,
if (rRedline.nSttNode <= rRange.nSttNode
&& rRedline.nSttNode < rRange.nEndNode
&& rRange.nEndNode <= rRedline.nEndNode
- && rRedline.GetType() == nsRedlineType_t::REDLINE_DELETE)
+ && rRedline.GetType() == RedlineType::Delete)
{
nEndOfRedline = rRedline.nEndNode;
o_rpFirstMergedDeletedTextNode = rDoc.GetNodes()[rRedline.nSttNode]->GetTextNode();
@@ -573,7 +573,7 @@ bool SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
if( !bOk )
return false;
- pDoc->getIDocumentRedlineAccess().DeleteRedline( rDelPam, false, USHRT_MAX );
+ pDoc->getIDocumentRedlineAccess().DeleteRedline( rDelPam, false, RedlineType::Any );
}
// Both 'deletes' can be consolidated, so 'move' the related character
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 7e9c54ae2bc5..1d9facd95822 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -1364,7 +1364,7 @@ void SwRedlineSaveData::RedlineToDoc( SwPaM const & rPam )
// First, delete the "old" so that in an Append no unexpected things will
// happen, e.g. a delete in an insert. In the latter case the just restored
// content will be deleted and not the one you originally wanted.
- rDoc.getIDocumentRedlineAccess().DeleteRedline( *pRedl, false, USHRT_MAX );
+ rDoc.getIDocumentRedlineAccess().DeleteRedline( *pRedl, false, RedlineType::Any );
RedlineFlags eOld = rDoc.getIDocumentRedlineAccess().GetRedlineFlags();
rDoc.getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld | RedlineFlags::DontCombineRedlines );
@@ -1408,7 +1408,7 @@ bool SwUndo::FillSaveData(
}
if( !rSData.empty() && bDelRange )
{
- rRange.GetDoc()->getIDocumentRedlineAccess().DeleteRedline( rRange, false, USHRT_MAX );
+ rRange.GetDoc()->getIDocumentRedlineAccess().DeleteRedline( rRange, false, RedlineType::Any );
}
return !rSData.empty();
}
@@ -1426,7 +1426,7 @@ bool SwUndo::FillSaveDataForFormat(
for ( ; n < rTable.size(); ++n )
{
SwRangeRedline* pRedl = rTable[n];
- if ( nsRedlineType_t::REDLINE_FORMAT == pRedl->GetType() )
+ if ( RedlineType::Format == pRedl->GetType() )
{
const SwComparePosition eCmpPos = ComparePosition( *pStt, *pEnd, *pRedl->Start(), *pRedl->End() );
if ( eCmpPos != SwComparePosition::Before
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 5b429992bbb5..63ed58035aac 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -93,7 +93,7 @@ void SwUndoInsert::Init(const SwNodeIndex & rNd)
pDoc = rNd.GetNode().GetDoc();
if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
{
- pRedlData.reset( new SwRedlineData( nsRedlineType_t::REDLINE_INSERT,
+ pRedlData.reset( new SwRedlineData( RedlineType::Insert,
pDoc->getIDocumentRedlineAccess().GetRedlineAuthor() ) );
SetRedlineFlags( pDoc->getIDocumentRedlineAccess().GetRedlineFlags() );
}
@@ -165,7 +165,7 @@ bool SwUndoInsert::CanGrouping( const SwPosition& rPos )
const SwRedlineTable& rTable = rDoc.getIDocumentRedlineAccess().GetRedlineTable();
if( !rTable.empty() )
{
- SwRedlineData aRData( nsRedlineType_t::REDLINE_INSERT, rDoc.getIDocumentRedlineAccess().GetRedlineAuthor() );
+ SwRedlineData aRData( RedlineType::Insert, rDoc.getIDocumentRedlineAccess().GetRedlineAuthor() );
const SwIndexReg* pIReg = rPos.nContent.GetIdxReg();
for(SwRangeRedline* pRedl : rTable)
{
@@ -219,7 +219,7 @@ void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & rContext)
pPam->SetMark();
pPam->Move( fnMoveBackward );
pPam->Exchange();
- pTmpDoc->getIDocumentRedlineAccess().DeleteRedline( *pPam, true, USHRT_MAX );
+ pTmpDoc->getIDocumentRedlineAccess().DeleteRedline( *pPam, true, RedlineType::Any );
}
pPam->DeleteMark();
pTmpDoc->getIDocumentContentOperations().DelFullPara( *pPam );
@@ -242,7 +242,7 @@ void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & rContext)
{
aPaM.GetPoint()->nContent -= nLen;
if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() ))
- pTmpDoc->getIDocumentRedlineAccess().DeleteRedline( aPaM, true, USHRT_MAX );
+ pTmpDoc->getIDocumentRedlineAccess().DeleteRedline( aPaM, true, RedlineType::Any );
if (m_bWithRsid)
{
// RSID was added: remove any CHARFMT/AUTOFMT that may be
@@ -263,7 +263,7 @@ void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & rContext)
{
aPaM.Move(fnMoveBackward);
if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() ))
- pTmpDoc->getIDocumentRedlineAccess().DeleteRedline( aPaM, true, USHRT_MAX );
+ pTmpDoc->getIDocumentRedlineAccess().DeleteRedline( aPaM, true, RedlineType::Any );
RemoveIdxFromRange( aPaM, false );
}
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index c19b6cf0242d..bf64fc3fca5f 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -61,7 +61,7 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos,
}
if (nSttContent < nTextNdLen)
{
- pDoc->getIDocumentRedlineAccess().DeleteRedline(aPam, false, USHRT_MAX);
+ pDoc->getIDocumentRedlineAccess().DeleteRedline(aPam, false, RedlineType::Any);
}
}
@@ -140,7 +140,7 @@ bool SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
if( !bOk )
return false;
- pDoc->getIDocumentRedlineAccess().DeleteRedline( aPam, false, USHRT_MAX );
+ pDoc->getIDocumentRedlineAccess().DeleteRedline( aPam, false, RedlineType::Any );
}
// both 'overwrites' can be combined so 'move' the corresponding character
@@ -273,7 +273,7 @@ void SwUndoOverwrite::RedoImpl(::sw::UndoRedoContext & rContext)
rIdx.Assign( pTextNd, nSttContent );
pCurrentPam->SetMark();
pCurrentPam->GetMark()->nContent += aDelStr.getLength();
- pDoc->getIDocumentRedlineAccess().DeleteRedline( *pCurrentPam, false, USHRT_MAX );
+ pDoc->getIDocumentRedlineAccess().DeleteRedline( *pCurrentPam, false, RedlineType::Any );
pCurrentPam->DeleteMark();
}
rIdx.Assign( pTextNd, !aDelStr.isEmpty() ? nSttContent+1 : nSttContent );
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index e5b48e5fa363..59be96d9d2dd 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -48,7 +48,7 @@ SwUndoRedline::SwUndoRedline( SwUndoId nUsrId, const SwPaM& rRange )
{
case SwUndoId::DELETE:
case SwUndoId::REPLACE:
- mpRedlData.reset( new SwRedlineData( nsRedlineType_t::REDLINE_DELETE, rDoc.getIDocumentRedlineAccess().GetRedlineAuthor() ) );
+ mpRedlData.reset( new SwRedlineData( RedlineType::Delete, rDoc.getIDocumentRedlineAccess().GetRedlineAuthor() ) );
break;
default:
;
@@ -150,7 +150,7 @@ void SwUndoRedline::UndoRedlineImpl(SwDoc &, SwPaM &)
// default: remove redlines
void SwUndoRedline::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
{
- rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, USHRT_MAX);
+ rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, RedlineType::Any);
}
SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUsrId )
@@ -196,7 +196,7 @@ void SwUndoRedlineDelete::SetRedlineText(const OUString & rText)
void SwUndoRedlineDelete::UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
{
- rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, USHRT_MAX);
+ rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, RedlineType::Any);
}
void SwUndoRedlineDelete::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
@@ -272,7 +272,7 @@ void SwUndoRedlineSort::UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
// 'insert' Redline object. The former is located directly after the latter.
SwRedlineTable::size_type nFnd = rDoc.getIDocumentRedlineAccess().GetRedlinePos(
*rDoc.GetNodes()[ nSttNode + 1 ],
- nsRedlineType_t::REDLINE_INSERT );
+ RedlineType::Insert );
OSL_ENSURE( SwRedlineTable::npos != nFnd && nFnd+1 < rDoc.getIDocumentRedlineAccess().GetRedlineTable().size(),
"could not find an Insert object" );
++nFnd;
@@ -285,7 +285,7 @@ void SwUndoRedlineSort::UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
aTmp.SetMark();
aTmp.GetPoint()->nNode = nSaveEndNode;
aTmp.GetPoint()->nContent.Assign( aTmp.GetContentNode(), nSaveEndContent );
- rDoc.getIDocumentRedlineAccess().DeleteRedline( aTmp, true, USHRT_MAX );
+ rDoc.getIDocumentRedlineAccess().DeleteRedline( aTmp, true, RedlineType::Any );
}
rDoc.getIDocumentContentOperations().DelFullPara(rPam);
@@ -387,7 +387,7 @@ SwUndoCompDoc::SwUndoCompDoc( const SwPaM& rRg, bool bIns )
SwDoc* pDoc = rRg.GetDoc();
if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
{
- RedlineType_t eTyp = bInsert ? nsRedlineType_t::REDLINE_INSERT : nsRedlineType_t::REDLINE_DELETE;
+ RedlineType eTyp = bInsert ? RedlineType::Insert : RedlineType::Delete;
pRedlData.reset( new SwRedlineData( eTyp, pDoc->getIDocumentRedlineAccess().GetRedlineAuthor() ) );
SetRedlineFlags( pDoc->getIDocumentRedlineAccess().GetRedlineFlags() );
}
@@ -396,7 +396,7 @@ SwUndoCompDoc::SwUndoCompDoc( const SwPaM& rRg, bool bIns )
SwUndoCompDoc::SwUndoCompDoc( const SwRangeRedline& rRedl )
: SwUndo( SwUndoId::COMPAREDOC, rRedl.GetDoc() ), SwUndRng( rRedl ),
// for MergeDoc the corresponding inverse is needed
- bInsert( nsRedlineType_t::REDLINE_DELETE == rRedl.GetType() )
+ bInsert( RedlineType::Delete == rRedl.GetType() )
{
SwDoc* pDoc = rRedl.GetDoc();
if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
@@ -431,7 +431,7 @@ void SwUndoCompDoc::UndoImpl(::sw::UndoRedoContext & rContext)
RedlineFlags eOld = rDoc.getIDocumentRedlineAccess().GetRedlineFlags();
rDoc.getIDocumentRedlineAccess().SetRedlineFlags_intern(( eOld & ~RedlineFlags::Ignore) | RedlineFlags::On);
- rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, USHRT_MAX);
+ rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, RedlineType::Any);
rDoc.getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
@@ -475,7 +475,7 @@ void SwUndoCompDoc::UndoImpl(::sw::UndoRedoContext & rContext)
{
if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() ))
{
- rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, USHRT_MAX);
+ rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, RedlineType::Any);
if( pRedlSaveData )
SetSaveData(rDoc, *pRedlSaveData);
diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx
index ef84c67a138f..f6bd82bb959f 100644
--- a/sw/source/core/undo/unsect.cxx
+++ b/sw/source/core/undo/unsect.cxx
@@ -92,7 +92,7 @@ SwUndoInsSection::SwUndoInsSection(
SwDoc& rDoc = *rPam.GetDoc();
if( rDoc.getIDocumentRedlineAccess().IsRedlineOn() )
{
- m_pRedlData.reset(new SwRedlineData( nsRedlineType_t::REDLINE_INSERT,
+ m_pRedlData.reset(new SwRedlineData( RedlineType::Insert,
rDoc.getIDocumentRedlineAccess().GetRedlineAuthor() ));
SetRedlineFlags( rDoc.getIDocumentRedlineAccess().GetRedlineFlags() );
}
@@ -133,7 +133,7 @@ void SwUndoInsSection::UndoImpl(::sw::UndoRedoContext & rContext)
OSL_ENSURE( pNd, "where is my SectionNode?" );
if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() ))
- rDoc.getIDocumentRedlineAccess().DeleteRedline( *pNd, true, USHRT_MAX );
+ rDoc.getIDocumentRedlineAccess().DeleteRedline( *pNd, true, RedlineType::Any );
// no selection?
SwNodeIndex aIdx( *pNd );
diff --git a/sw/source/core/undo/unspnd.cxx b/sw/source/core/undo/unspnd.cxx
index cab7026483d6..81997ed164d8 100644
--- a/sw/source/core/undo/unspnd.cxx
+++ b/sw/source/core/undo/unspnd.cxx
@@ -57,7 +57,7 @@ SwUndoSplitNode::SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos,
// consider Redline
if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
{
- pRedlData.reset( new SwRedlineData( nsRedlineType_t::REDLINE_INSERT, pDoc->getIDocumentRedlineAccess().GetRedlineAuthor() ) );
+ pRedlData.reset( new SwRedlineData( RedlineType::Insert, pDoc->getIDocumentRedlineAccess().GetRedlineAuthor() ) );
SetRedlineFlags( pDoc->getIDocumentRedlineAccess().GetRedlineFlags() );
}
@@ -122,7 +122,7 @@ void SwUndoSplitNode::UndoImpl(::sw::UndoRedoContext & rContext)
++rPam.GetMark()->nNode;
rPam.GetMark()->nContent.Assign( rPam.GetMark()->
nNode.GetNode().GetContentNode(), 0 );
- pDoc->getIDocumentRedlineAccess().DeleteRedline( rPam, true, USHRT_MAX );
+ pDoc->getIDocumentRedlineAccess().DeleteRedline( rPam, true, RedlineType::Any );
rPam.DeleteMark();
}
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 2caf8836d338..026aa6f8dea4 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -235,7 +235,7 @@ SwUndoInsTable::SwUndoInsTable( const SwPosition& rPos, sal_uInt16 nCl, sal_uInt
SwDoc& rDoc = *rPos.nNode.GetNode().GetDoc();
if( rDoc.getIDocumentRedlineAccess().IsRedlineOn() )
{
- pRedlData.reset( new SwRedlineData( nsRedlineType_t::REDLINE_INSERT, rDoc.getIDocumentRedlineAccess().GetRedlineAuthor() ) );
+ pRedlData.reset( new SwRedlineData( RedlineType::Insert, rDoc.getIDocumentRedlineAccess().GetRedlineAuthor() ) );
SetRedlineFlags( rDoc.getIDocumentRedlineAccess().GetRedlineFlags() );
}
@@ -260,7 +260,7 @@ void SwUndoInsTable::UndoImpl(::sw::UndoRedoContext & rContext)
pTableNd->DelFrames();
if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() ))
- rDoc.getIDocumentRedlineAccess().DeleteRedline( *pTableNd, true, USHRT_MAX );
+ rDoc.getIDocumentRedlineAccess().DeleteRedline( *pTableNd, true, RedlineType::Any );
RemoveIdxFromSection( rDoc, nSttNode );
// move hard page breaks into next node
@@ -2153,7 +2153,7 @@ void SwUndoTableNumFormat::UndoImpl(::sw::UndoRedoContext & rContext)
// the same here.
if( pTextNd->GetText() != m_aStr )
{
- rDoc.getIDocumentRedlineAccess().DeleteRedline( *( pBox->GetSttNd() ), false, USHRT_MAX );
+ rDoc.getIDocumentRedlineAccess().DeleteRedline( *( pBox->GetSttNd() ), false, RedlineType::Any );
SwIndex aIdx( pTextNd, 0 );
if( !m_aStr.isEmpty() )
@@ -2399,7 +2399,7 @@ void SwUndoTableCpyTable::UndoImpl(::sw::UndoRedoContext & rContext)
*aPam.GetPoint() = SwPosition( aTmpIdx );
}
}
- rDoc.getIDocumentRedlineAccess().DeleteRedline( aPam, true, USHRT_MAX );
+ rDoc.getIDocumentRedlineAccess().DeleteRedline( aPam, true, RedlineType::Any );
if( pEntry->pUndo )
{
@@ -2675,7 +2675,7 @@ std::unique_ptr<SwUndo> SwUndoTableCpyTable::PrepareRedline( SwDoc* pDoc, const
{ // If the old (deleted) part is not empty, here we are...
SwPaM aDeletePam( aDeleteStart, aCellEnd );
pUndo = std::make_unique<SwUndoRedlineDelete>( aDeletePam, SwUndoId::DELETE );
- pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_DELETE, aDeletePam ), true );
+ pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Delete, aDeletePam ), true );
}
else if( !rJoin ) // If the old part is empty and joined, we are finished
{ // if it is not joined, we have to delete this empty paragraph
@@ -2691,7 +2691,7 @@ std::unique_ptr<SwUndo> SwUndoTableCpyTable::PrepareRedline( SwDoc* pDoc, const
if( aCellStart != aInsertEnd ) // An empty insertion will not been marked
{
SwPaM aTmpPam( aCellStart, aInsertEnd );
- pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, aTmpPam ), true );
+ pDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Insert, aTmpPam ), true );
}
pDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index 5a347704333e..47465620b882 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -73,7 +73,7 @@ SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& rPam )
// consider Redline
if( pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
{
- pRedlData.reset( new SwRedlineData( nsRedlineType_t::REDLINE_INSERT, pDoc->getIDocumentRedlineAccess().GetRedlineAuthor() ) );
+ pRedlData.reset( new SwRedlineData( RedlineType::Insert, pDoc->getIDocumentRedlineAccess().GetRedlineAuthor() ) );
SetRedlineFlags( pDoc->getIDocumentRedlineAccess().GetRedlineFlags() );
}
}
@@ -186,7 +186,7 @@ void SwUndoInserts::UndoImpl(::sw::UndoRedoContext & rContext)
SwPaM& rPam = AddUndoRedoPaM(rContext);
if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() ))
- rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, USHRT_MAX);
+ rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, RedlineType::Any);
// if Point and Mark are different text nodes so a JoinNext has to be done
bool bJoinNext = nSttNode != nEndNode &&
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 6b6c063d114b..0b8a3d8fadb9 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -1167,17 +1167,17 @@ void makeRedline( SwPaM const & rPaM,
{
IDocumentRedlineAccess* pRedlineAccess = &rPaM.GetDoc()->getIDocumentRedlineAccess();
- RedlineType_t eType;
+ RedlineType eType;
if ( rRedlineType == "Insert" )
- eType = nsRedlineType_t::REDLINE_INSERT;
+ eType = RedlineType::Insert;
else if ( rRedlineType == "Delete" )
- eType = nsRedlineType_t::REDLINE_DELETE;
+ eType = RedlineType::Delete;
else if ( rRedlineType == "Format" )
- eType = nsRedlineType_t::REDLINE_FORMAT;
+ eType = RedlineType::Format;
else if ( rRedlineType == "TextTable" )
- eType = nsRedlineType_t::REDLINE_TABLE;
+ eType = RedlineType::Table;
else if ( rRedlineType == "ParagraphFormat" )
- eType = nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT;
+ eType = RedlineType::ParagraphFormat;
else
throw lang::IllegalArgumentException();
@@ -1208,7 +1208,7 @@ void makeRedline( SwPaM const & rPaM,
{
int nMap = 0;
// Make sure that paragraph format gets its own map, otherwise e.g. fill attributes are not preserved.
- if (eType == nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT)
+ if (eType == RedlineType::ParagraphFormat)
nMap = PROPERTY_MAP_PARAGRAPH;
else
nMap = PROPERTY_MAP_TEXTPORTION_EXTENSIONS;
@@ -1279,14 +1279,14 @@ void makeTableRowRedline( SwTableLine& rTableLine,
{
IDocumentRedlineAccess* pRedlineAccess = &rTableLine.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess();
- RedlineType_t eType;
+ RedlineType eType;
if ( rRedlineType == "TableRowInsert" )
{
- eType = nsRedlineType_t::REDLINE_TABLE_ROW_INSERT;
+ eType = RedlineType::TableRowInsert;
}
else if ( rRedlineType == "TableRowDelete" )
{
- eType = nsRedlineType_t::REDLINE_TABLE_ROW_DELETE;
+ eType = RedlineType::TableRowDelete;
}
else
{
@@ -1328,14 +1328,14 @@ void makeTableCellRedline( SwTableBox& rTableBox,
{
IDocumentRedlineAccess* pRedlineAccess = &rTableBox.GetFrameFormat()->GetDoc()->getIDocumentRedlineAccess();
- RedlineType_t eType;
+ RedlineType eType;
if ( rRedlineType == "TableCellInsert" )
{
- eType = nsRedlineType_t::REDLINE_TABLE_CELL_INSERT;
+ eType = RedlineType::TableCellInsert;
}
else if ( rRedlineType == "TableCellDelete" )
{
- eType = nsRedlineType_t::REDLINE_TABLE_CELL_DELETE;
+ eType = RedlineType::TableCellDelete;
}
else
{
diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx
index ef8226d511b4..517548579d26 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -195,7 +195,7 @@ static uno::Sequence<beans::PropertyValue> lcl_GetSuccessorProperties(const SwRa
pValues[2].Name = UNO_NAME_REDLINE_COMMENT;
pValues[2].Value <<= pNext->GetComment();
pValues[3].Name = UNO_NAME_REDLINE_TYPE;
- pValues[3].Value <<= nsRedlineType_t::SwRedlineTypeToOUString(pNext->GetType());
+ pValues[3].Value <<= SwRedlineTypeToOUString(pNext->GetType());
}
return aValues;
}
@@ -264,7 +264,7 @@ uno::Any SwXRedlinePortion::GetPropertyValue( const OUString& rPropertyName, co
aRet <<= const_cast<SwRangeRedline&>(rRedline).GetDescr();
else if(rPropertyName == UNO_NAME_REDLINE_TYPE)
{
- aRet <<= nsRedlineType_t::SwRedlineTypeToOUString(rRedline.GetType());
+ aRet <<= SwRedlineTypeToOUString(rRedline.GetType());
}
else if(rPropertyName == UNO_NAME_REDLINE_SUCCESSOR_DATA)
{
@@ -304,7 +304,7 @@ uno::Sequence< beans::PropertyValue > SwXRedlinePortion::CreateRedlineProperties
pRet[nPropIdx].Name = UNO_NAME_REDLINE_DESCRIPTION;
pRet[nPropIdx++].Value <<= const_cast<SwRangeRedline&>(rRedline).GetDescr();
pRet[nPropIdx].Name = UNO_NAME_REDLINE_TYPE;
- pRet[nPropIdx++].Value <<= nsRedlineType_t::SwRedlineTypeToOUString(rRedline.GetType());
+ pRet[nPropIdx++].Value <<= SwRedlineTypeToOUString(rRedline.GetType());
pRet[nPropIdx].Name = UNO_NAME_REDLINE_IDENTIFIER;
pRet[nPropIdx++].Value <<= OUString::number(
sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(&rRedline) ) );
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx
index ddcc22637923..5058b45c5c00 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -180,7 +180,7 @@ public:
: m_rNode(rNode)
, m_rIDRA(rNode.GetDoc()->getIDocumentRedlineAccess())
, m_nextRedline(rWriter.m_bHideDeleteRedlines
- ? m_rIDRA.GetRedlinePos(m_rNode, nsRedlineType_t::REDLINE_DELETE)
+ ? m_rIDRA.GetRedlinePos(m_rNode, RedlineType::Delete)
: SwRedlineTable::npos)
{
}
@@ -203,7 +203,7 @@ public:
for ( ; m_nextRedline < m_rIDRA.GetRedlineTable().size(); ++m_nextRedline)
{
SwRangeRedline const*const pRedline(m_rIDRA.GetRedlineTable()[m_nextRedline]);
- if (pRedline->GetType() != nsRedlineType_t::REDLINE_DELETE)
+ if (pRedline->GetType() != RedlineType::Delete)
{
continue;
}
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index b8596debc8ee..6fc17d4f9858 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -310,7 +310,7 @@ ErrCode SwReader::Read( const Reader& rOptions )
mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
if( mxDoc->getIDocumentRedlineAccess().IsRedlineOn() )
- mxDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, *pUndoPam ), true);
+ mxDoc->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Insert, *pUndoPam ), true);
else
mxDoc->getIDocumentRedlineAccess().SplitRedline( *pUndoPam );
mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( RedlineFlags::Ignore );
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
index ae7fbe949ba0..47c1aedab650 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -217,18 +217,18 @@ class SW_DLLPUBLIC SwFltRedline : public SfxPoolItem
public:
DateTime const aStamp;
DateTime const aStampPrev;
- RedlineType_t const eType;
- RedlineType_t const eTypePrev;
+ RedlineType const eType;
+ RedlineType const eTypePrev;
std::size_t const nAutorNo;
std::size_t const nAutorNoPrev;
static constexpr auto NoPrevAuthor
= std::numeric_limits<std::size_t>::max();
- SwFltRedline(RedlineType_t eType_,
+ SwFltRedline(RedlineType eType_,
std::size_t nAutorNo_,
const DateTime& rStamp_,
- RedlineType_t eTypePrev_ = nsRedlineType_t::REDLINE_INSERT,
+ RedlineType eTypePrev_ = RedlineType::Insert,
std::size_t nAutorNoPrev_ = NoPrevAuthor)
: SfxPoolItem(RES_FLTR_REDLINE), aStamp(rStamp_),
aStampPrev( DateTime::EMPTY ),
diff --git a/sw/source/filter/inc/msfilter.hxx b/sw/source/filter/inc/msfilter.hxx
index 82cae2073536..f36c78fb3d58 100644
--- a/sw/source/filter/inc/msfilter.hxx
+++ b/sw/source/filter/inc/msfilter.hxx
@@ -302,8 +302,8 @@ namespace sw
explicit RedlineStack(SwDoc &rDoc) : mrDoc(rDoc) {}
void MoveAttrs(const SwPosition& rPos);
void open(const SwPosition& rPos, const SfxPoolItem& rAttr);
- bool close(const SwPosition& rPos, RedlineType_t eType);
- void close(const SwPosition& rPos, RedlineType_t eType,
+ bool close(const SwPosition& rPos, RedlineType eType);
+ void close(const SwPosition& rPos, RedlineType eType,
WW8TabDesc* pTabDesc );
void closeall(const SwPosition& rPos);
~RedlineStack();
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index 214befe3428f..2439cfabf5f8 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -665,7 +665,7 @@ public:
virtual void BulletDefinition(int /*nId*/, const Graphic& /*rGraphic*/, Size /*aSize*/) {}
// Returns whether or not the 'SwTextNode' has a paragraph marker inserted \ deleted (using 'track changes')
- const SwRedlineData* GetParagraphMarkerRedline( const SwTextNode& rNode, RedlineType_t aRedlineType );
+ const SwRedlineData* GetParagraphMarkerRedline( const SwTextNode& rNode, RedlineType aRedlineType );
};
class WW8Ruby
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index f47d539ddfb5..6e7fa0632e0d 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2635,7 +2635,7 @@ void DocxAttributeOutput::RunText( const OUString& rText, rtl_TextEncoding /*eCh
// the text run is usually XML_t, with the exception of the deleted text
sal_Int32 nTextToken = XML_t;
- if ( m_pRedlineData && m_pRedlineData->GetType() == nsRedlineType_t::REDLINE_DELETE )
+ if ( m_pRedlineData && m_pRedlineData->GetType() == RedlineType::Delete )
nTextToken = XML_delText;
sal_Unicode prevUnicode = *pBegin;
@@ -2876,13 +2876,13 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData)
switch( pRedlineData->GetType() )
{
- case nsRedlineType_t::REDLINE_INSERT:
+ case RedlineType::Insert:
break;
- case nsRedlineType_t::REDLINE_DELETE:
+ case RedlineType::Delete:
break;
- case nsRedlineType_t::REDLINE_FORMAT:
+ case RedlineType::Format:
m_pSerializer->startElementNS( XML_w, XML_rPrChange,
FSNS( XML_w, XML_id ), aId,
FSNS( XML_w, XML_author ), aAuthor,
@@ -2940,7 +2940,7 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData)
m_pSerializer->endElementNS( XML_w, XML_rPrChange );
break;
- case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT:
+ case RedlineType::ParagraphFormat:
m_pSerializer->startElementNS( XML_w, XML_pPrChange,
FSNS( XML_w, XML_id ), aId,
FSNS( XML_w, XML_author ), aAuthor,
@@ -2993,7 +2993,7 @@ void DocxAttributeOutput::Redline( const SwRedlineData* pRedlineData)
break;
default:
- SAL_WARN("sw.ww8", "Unhandled redline type for export " << pRedlineData->GetType());
+ SAL_WARN("sw.ww8", "Unhandled redline type for export " << SwRedlineTypeToOUString(pRedlineData->GetType()));
break;
}
}
@@ -3017,21 +3017,21 @@ void DocxAttributeOutput::StartRedline( const SwRedlineData * pRedlineData )
switch ( pRedlineData->GetType() )
{
- case nsRedlineType_t::REDLINE_INSERT:
+ case RedlineType::Insert:
m_pSerializer->startElementNS( XML_w, XML_ins,
FSNS( XML_w, XML_id ), aId,
FSNS( XML_w, XML_author ), aAuthor,
FSNS( XML_w, XML_date ), aDate );
break;
- case nsRedlineType_t::REDLINE_DELETE:
+ case RedlineType::Delete:
m_pSerializer->startElementNS( XML_w, XML_del,
FSNS( XML_w, XML_id ), aId,
FSNS( XML_w, XML_author ), aAuthor,
FSNS( XML_w, XML_date ), aDate );
break;
- case nsRedlineType_t::REDLINE_FORMAT:
+ case RedlineType::Format:
SAL_INFO("sw.ww8", "TODO DocxAttributeOutput::StartRedline()" );
break;
default:
@@ -3046,15 +3046,15 @@ void DocxAttributeOutput::EndRedline( const SwRedlineData * pRedlineData )
switch ( pRedlineData->GetType() )
{
- case nsRedlineType_t::REDLINE_INSERT:
+ case RedlineType::Insert:
m_pSerializer->endElementNS( XML_w, XML_ins );
break;
- case nsRedlineType_t::REDLINE_DELETE:
+ case RedlineType::Delete:
m_pSerializer->endElementNS( XML_w, XML_del );
break;
- case nsRedlineType_t::REDLINE_FORMAT:
+ case RedlineType::Format:
SAL_INFO("sw.ww8", "TODO DocxAttributeOutput::EndRedline()" );
break;
default:
@@ -4096,11 +4096,11 @@ void DocxAttributeOutput::TableRowRedline( ww8::WW8TableNodeInfoInner::Pointer_t
{
// Redline for this table row
const SwRedlineData& aRedlineData = pTableRowRedline->GetRedlineData();
- sal_uInt16 nRedlineType = aRedlineData.GetType();
+ RedlineType nRedlineType = aRedlineData.GetType();
switch (nRedlineType)
{
- case nsRedlineType_t::REDLINE_TABLE_ROW_INSERT:
- case nsRedlineType_t::REDLINE_TABLE_ROW_DELETE:
+ case RedlineType::TableRowInsert:
+ case RedlineType::TableRowDelete:
{
OString aId( OString::number( m_nRedlineId++ ) );
const OUString &rAuthor( SW_MOD()->GetRedlineAuthor( aRedlineData.GetAuthor() ) );
@@ -4108,18 +4108,19 @@ void DocxAttributeOutput::TableRowRedline( ww8::WW8TableNodeInfoInner::Pointer_t
OString aDate( DateTimeToOString( aRedlineData.GetTimeStamp() ) );
- if (nRedlineType == nsRedlineType_t::REDLINE_TABLE_ROW_INSERT)
+ if (nRedlineType == RedlineType::TableRowInsert)
m_pSerializer->singleElementNS( XML_w, XML_ins,
FSNS( XML_w, XML_id ), aId,
FSNS( XML_w, XML_author ), aAuthor,
FSNS( XML_w, XML_date ), aDate );
- else if (nRedlineType == nsRedlineType_t::REDLINE_TABLE_ROW_DELETE)
+ else if (nRedlineType == RedlineType::TableRowDelete)
m_pSerializer->singleElementNS( XML_w, XML_del,
FSNS( XML_w, XML_id ), aId,
FSNS( XML_w, XML_author ), aAuthor,
FSNS( XML_w, XML_date ), aDate );
}
break;
+ default: break;
}
}
}
@@ -4139,11 +4140,11 @@ void DocxAttributeOutput::TableCellRedline( ww8::WW8TableNodeInfoInner::Pointer_
{
// Redline for this table cell
const SwRedlineData& aRedlineData = pTableCellRedline->GetRedlineData();
- sal_uInt16 nRedlineType = aRedlineData.GetType();
+ RedlineType nRedlineType = aRedlineData.GetType();
switch (nRedlineType)
{
- case nsRedlineType_t::REDLINE_TABLE_CELL_INSERT:
- case nsRedlineType_t::REDLINE_TABLE_CELL_DELETE:
+ case RedlineType::TableCellInsert:
+ case RedlineType::TableCellDelete:
{
OString aId( OString::number( m_nRedlineId++ ) );
const OUString &rAuthor( SW_MOD()->GetRedlineAuthor( aRedlineData.GetAuthor() ) );
@@ -4151,18 +4152,19 @@ void DocxAttributeOutput::TableCellRedline( ww8::WW8TableNodeInfoInner::Pointer_
OString aDate( DateTimeToOString( aRedlineData.GetTimeStamp() ) );
- if (nRedlineType == nsRedlineType_t::REDLINE_TABLE_CELL_INSERT)
+ if (nRedlineType == RedlineType::TableCellInsert)
m_pSerializer->singleElementNS( XML_w, XML_cellIns,
FSNS( XML_w, XML_id ), aId,
FSNS( XML_w, XML_author ), aAuthor,
FSNS( XML_w, XML_date ), aDate );
- else if (nRedlineType == nsRedlineType_t::REDLINE_TABLE_CELL_DELETE)
+ else if (nRedlineType == RedlineType::TableCellDelete)
m_pSerializer->singleElementNS( XML_w, XML_cellDel,
FSNS( XML_w, XML_id ), aId,
FSNS( XML_w, XML_author ), aAuthor,
FSNS( XML_w, XML_date ), aDate );
}
break;
+ default: break;
}
}
}
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 138f9466123c..aa26ec93a772 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -569,7 +569,7 @@ void RtfAttributeOutput::Redline(const SwRedlineData* pRedline)
if (!pRedline)
return;
- if (pRedline->GetType() == nsRedlineType_t::REDLINE_INSERT)
+ if (pRedline->GetType() == RedlineType::Insert)
{
m_aRun->append(OOO_STRING_SVTOOLS_RTF_REVISED);
m_aRun->append(OOO_STRING_SVTOOLS_RTF_REVAUTH);
@@ -577,7 +577,7 @@ void RtfAttributeOutput::Redline(const SwRedlineData* pRedline)
m_rExport.GetRedline(SW_MOD()->GetRedlineAuthor(pRedline->GetAuthor()))));
m_aRun->append(OOO_STRING_SVTOOLS_RTF_REVDTTM);
}
- else if (pRedline->GetType() == nsRedlineType_t::REDLINE_DELETE)
+ else if (pRedline->GetType() == RedlineType::Delete)
{
m_aRun->append(OOO_STRING_SVTOOLS_RTF_DELETED);
m_aRun->append(OOO_STRING_SVTOOLS_RTF_REVAUTHDEL);
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 4bb3a1e370d5..eb46cfb1463c 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -689,9 +689,9 @@ namespace sw
class SameOpenRedlineType
{
private:
- RedlineType_t const meType;
+ RedlineType const meType;
public:
- explicit SameOpenRedlineType(RedlineType_t eType) : meType(eType) {}
+ explicit SameOpenRedlineType(RedlineType eType) : meType(eType) {}
bool operator()(const std::unique_ptr<SwFltStackEntry> & pEntry) const
{
const SwFltRedline *pTest = static_cast<const SwFltRedline *>
@@ -700,7 +700,7 @@ namespace sw
}
};
- bool RedlineStack::close(const SwPosition& rPos, RedlineType_t eType)
+ bool RedlineStack::close(const SwPosition& rPos, RedlineType eType)
{
//Search from end for same type
auto aResult = std::find_if(maStack.rbegin(), maStack.rend(),
@@ -820,7 +820,7 @@ namespace sw
//Return the earlier time, if two have the same time, prioritize
//inserts over deletes
if (pOne->aStamp == pTwo->aStamp)
- return (pOne->eType == nsRedlineType_t::REDLINE_INSERT && pTwo->eType != nsRedlineType_t::REDLINE_INSERT);
+ return (pOne->eType == RedlineType::Insert && pTwo->eType != RedlineType::Insert);
else
return (pOne->aStamp < pTwo->aStamp);
}
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index e5b8ece72dc5..c059b151a1dd 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -1442,7 +1442,7 @@ const SwRedlineData* SwWW8AttrIter::GetParagraphLevelRedline( )
// Maybe add here a check that also the start & end of the redline is the entire paragraph
// Only return if this is a paragraph formatting redline
- if (pRedl->GetType() == nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT)
+ if (pRedl->GetType() == RedlineType::ParagraphFormat)
{
// write data of this redline
pCurRedline = pRedl;
@@ -1462,9 +1462,9 @@ const SwRedlineData* SwWW8AttrIter::GetRunLevelRedline( sal_Int32 nPos )
{
switch( pCurRedline->GetType() )
{
- case nsRedlineType_t::REDLINE_INSERT:
- case nsRedlineType_t::REDLINE_DELETE:
- case nsRedlineType_t::REDLINE_FORMAT:
+ case RedlineType::Insert:
+ case RedlineType::Delete:
+ case RedlineType::Format:
// write data of this redline
return &( pCurRedline->GetRedlineData() );
break;
@@ -1496,9 +1496,9 @@ const SwRedlineData* SwWW8AttrIter::GetRunLevelRedline( sal_Int32 nPos )
{
switch( pRedl->GetType() )
{
- case nsRedlineType_t::REDLINE_INSERT:
- case nsRedlineType_t::REDLINE_DELETE:
- case nsRedlineType_t::REDLINE_FORMAT:
+ case RedlineType::Insert:
+ case RedlineType::Delete:
+ case RedlineType::Format:
// write data of this redline
pCurRedline = pRedl;
return &( pCurRedline->GetRedlineData() );
@@ -1748,7 +1748,7 @@ static SwTextFormatColl& lcl_getFormatCollection( MSWordExportBase& rExport, con
? pRedl->GetMark()
: pRedl->GetPoint();
// Looking for deletions, which ends in current pTextNode
- if( nsRedlineType_t::REDLINE_DELETE == pRedl->GetRedlineData().GetType() &&
+ if( RedlineType::Delete == pRedl->GetRedlineData().GetType() &&
pEnd->nNode == *pTextNode && pStt->nNode != *pTextNode &&
pStt->nNode.GetNode().IsTextNode() )
{
@@ -2967,8 +2967,8 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode )
{
aParagraphMarkerProperties.Put(*rNode.GetpSwAttrSet());
}
- const SwRedlineData* pRedlineParagraphMarkerDelete = AttrOutput().GetParagraphMarkerRedline( rNode, nsRedlineType_t::REDLINE_DELETE );
- const SwRedlineData* pRedlineParagraphMarkerInsert = AttrOutput().GetParagraphMarkerRedline( rNode, nsRedlineType_t::REDLINE_INSERT );
+ const SwRedlineData* pRedlineParagraphMarkerDelete = AttrOutput().GetParagraphMarkerRedline( rNode, RedlineType::Delete );
+ const SwRedlineData* pRedlineParagraphMarkerInsert = AttrOutput().GetParagraphMarkerRedline( rNode, RedlineType::Insert );
const SwRedlineData* pParagraphRedlineData = aAttrIter.GetParagraphLevelRedline( );
AttrOutput().EndParagraphProperties(aParagraphMarkerProperties, pParagraphRedlineData, pRedlineParagraphMarkerDelete, pRedlineParagraphMarkerInsert);
@@ -3297,15 +3297,15 @@ void WW8AttributeOutput::Redline( const SwRedlineData* pRedline )
const sal_uInt16* pSprmIds = nullptr;
switch( pRedline->GetType() )
{
- case nsRedlineType_t::REDLINE_INSERT:
+ case RedlineType::Insert:
pSprmIds = insSprmIds;
break;
- case nsRedlineType_t::REDLINE_DELETE:
+ case RedlineType::Delete:
pSprmIds = delSprmIds;
break;
- case nsRedlineType_t::REDLINE_FORMAT:
+ case RedlineType::Format:
m_rWW8Export.InsUInt16( NS_sprm::sprmCPropRMark90 );
m_rWW8Export.pO->push_back( 7 ); // len
m_rWW8Export.pO->push_back( 1 );
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 710e3bf6e86e..ae95c7a13d76 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -5463,7 +5463,7 @@ void AttributeOutputBase::FormatCharBorder( const SvxBoxItem& rBox )
* - Start = the last character of the current paragraph
* - End = the first character of the next paragraph
*/
-const SwRedlineData* AttributeOutputBase::GetParagraphMarkerRedline( const SwTextNode& rNode, RedlineType_t aRedlineType)
+const SwRedlineData* AttributeOutputBase::GetParagraphMarkerRedline( const SwTextNode& rNode, RedlineType aRedlineType)
{
// ToDo : this is not the most ideal ... should start maybe from 'nCurRedlinePos'
for(SwRangeRedline* pRedl : GetExport().m_pDoc->getIDocumentRedlineAccess().GetRedlineTable())
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index f7be682a8d1c..6909a70c8847 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1778,7 +1778,7 @@ public: // really private, but can only be done public
// Revision Marks ( == Redlining )
// insert or delete content (change char attributes resp.)
- void Read_CRevisionMark(RedlineType_t eType, const sal_uInt8* pData, short nLen);
+ void Read_CRevisionMark(RedlineType eType, const sal_uInt8* pData, short nLen);
// insert new content
void Read_CFRMark(sal_uInt16 , const sal_uInt8* pData, short nLen);
// delete old content
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 65c116c672eb..15ba8ae2d95c 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -97,7 +97,7 @@ WW8TabBandDesc::~WW8TabBandDesc()
}
void sw::util::RedlineStack::close( const SwPosition& rPos,
- RedlineType_t eType, WW8TabDesc* pTabDesc )
+ RedlineType eType, WW8TabDesc* pTabDesc )
{
// If the redline type is not found in the redline stack, we have to check if there has been
// a tabledesc and to check its saved redline stack, too. (#136939, #i68139)
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index c18db3e366bf..6beddecc3691 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -477,7 +477,7 @@ void SwWW8ImplReader::ReadRevMarkAuthorStrTabl( SvStream& rStrm,
Revision Marks ( == Redlining )
*/
// insert or delete content (change char attributes resp.)
-void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
+void SwWW8ImplReader::Read_CRevisionMark(RedlineType eType,
const sal_uInt8* pData, short nLen )
{
// there *must* be a SprmCIbstRMark[Del] and a SprmCDttmRMark[Del]
@@ -486,7 +486,7 @@ void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
return;
const sal_uInt8* pSprmCIbstRMark;
const sal_uInt8* pSprmCDttmRMark;
- if( nsRedlineType_t::REDLINE_FORMAT == eType )
+ if( RedlineType::Format == eType )
{
pSprmCIbstRMark = nLen >= 3 ? pData+1 : nullptr;
pSprmCDttmRMark = nLen >= 7 ? pData+3 : nullptr;
@@ -498,7 +498,7 @@ void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
* list" variant of HasCharSprm and take the last one as the true one.
*/
std::vector<SprmResult> aResult;
- bool bIns = (nsRedlineType_t::REDLINE_INSERT == eType);
+ bool bIns = (RedlineType::Insert == eType);
if( m_bVer67 )
{
m_xPlcxMan->HasCharSprm(69, aResult);
@@ -534,13 +534,13 @@ void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
// insert new content
void SwWW8ImplReader::Read_CFRMark(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
- Read_CRevisionMark( nsRedlineType_t::REDLINE_INSERT, pData, nLen );
+ Read_CRevisionMark( RedlineType::Insert, pData, nLen );
}
// delete old content
void SwWW8ImplReader::Read_CFRMarkDel(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
- Read_CRevisionMark( nsRedlineType_t::REDLINE_DELETE, pData, nLen );
+ Read_CRevisionMark( RedlineType::Delete, pData, nLen );
}
// change properties of content ( == char formatting)
@@ -550,7 +550,7 @@ void SwWW8ImplReader::Read_CPropRMark(sal_uInt16 , const sal_uInt8* pData, short
// 1 byte - chp.fPropRMark
// 2 bytes - chp.ibstPropRMark
// 4 bytes - chp.dttmPropRMark;
- Read_CRevisionMark( nsRedlineType_t::REDLINE_FORMAT, pData, nLen );
+ Read_CRevisionMark( RedlineType::Format, pData, nLen );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index 692f00a3a607..d093c607ae57 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -184,7 +184,7 @@ public:
~RedlineInfo();
// redline type (insert, delete, ...)
- RedlineType_t eType;
+ RedlineType eType;
// info fields:
OUString sAuthor; // change author string
@@ -211,7 +211,7 @@ public:
};
RedlineInfo::RedlineInfo() :
- eType(nsRedlineType_t::REDLINE_INSERT),
+ eType(RedlineType::Insert),
sAuthor(),
sComment(),
aDateTime(),
@@ -388,18 +388,18 @@ void XMLRedlineImportHelper::Add(
// 3b) attach to existing redline
// ad 1)
- RedlineType_t eType;
+ RedlineType eType;
if (rType == m_sInsertion)
{
- eType = nsRedlineType_t::REDLINE_INSERT;
+ eType = RedlineType::Insert;
}
else if (rType == m_sDeletion)
{
- eType = nsRedlineType_t::REDLINE_DELETE;
+ eType = RedlineType::Delete;
}
else if (rType == m_sFormatChange)
{
- eType = nsRedlineType_t::REDLINE_FORMAT;
+ eType = RedlineType::Format;
}
else
{
@@ -631,7 +631,7 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
{
// ignore redline (e.g. file loaded in insert mode):
// delete 'deleted' redlines and forget about the whole thing
- if (nsRedlineType_t::REDLINE_DELETE == pRedlineInfo->eType)
+ if (RedlineType::Delete == pRedlineInfo->eType)
{
pDoc->getIDocumentContentOperations().DeleteRange(aPaM);
// And what about the "deleted nodes"?
@@ -709,8 +709,8 @@ SwRedlineData* XMLRedlineImportHelper::ConvertRedline(
// ( check presence and sanity of hierarchical redline info )
SwRedlineData* pNext = nullptr;
if ( (nullptr != pRedlineInfo->pNextRedline) &&
- (nsRedlineType_t::REDLINE_DELETE == pRedlineInfo->eType) &&
- (nsRedlineType_t::REDLINE_INSERT == pRedlineInfo->pNextRedline->eType) )
+ (RedlineType::Delete == pRedlineInfo->eType) &&
+ (RedlineType::Insert == pRedlineInfo->pNextRedline->eType) )
{
pNext = ConvertRedline(pRedlineInfo->pNextRedline, pDoc);
}
diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx
index 616f7c120ee4..f17b255a4b39 100644
--- a/sw/source/uibase/docvw/edtwin2.cxx
+++ b/sw/source/uibase/docvw/edtwin2.cxx
@@ -69,16 +69,17 @@ static OUString lcl_GetRedlineHelp( const SwRangeRedline& rRedl, bool bBalloon )
const char* pResId = nullptr;
switch( rRedl.GetType() )
{
- case nsRedlineType_t::REDLINE_INSERT: pResId = STR_REDLINE_INSERT; break;
- case nsRedlineType_t::REDLINE_DELETE: pResId = STR_REDLINE_DELETE; break;
- case nsRedlineType_t::REDLINE_FORMAT: pResId = STR_REDLINE_FORMAT; break;
- case nsRedlineType_t::REDLINE_TABLE: pResId = STR_REDLINE_TABLE; break;
- case nsRedlineType_t::REDLINE_FMTCOLL: pResId = STR_REDLINE_FMTCOLL; break;
- case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT: pResId = STR_REDLINE_PARAGRAPH_FORMAT; break;
- case nsRedlineType_t::REDLINE_TABLE_ROW_INSERT: pResId = STR_REDLINE_TABLE_ROW_INSERT; break;
- case nsRedlineType_t::REDLINE_TABLE_ROW_DELETE: pResId = STR_REDLINE_TABLE_ROW_DELETE; break;
- case nsRedlineType_t::REDLINE_TABLE_CELL_INSERT: pResId = STR_REDLINE_TABLE_CELL_INSERT; break;
- case nsRedlineType_t::REDLINE_TABLE_CELL_DELETE: pResId = STR_REDLINE_TABLE_CELL_DELETE; break;
+ case RedlineType::Insert: pResId = STR_REDLINE_INSERT; break;
+ case RedlineType::Delete: pResId = STR_REDLINE_DELETE; break;
+ case RedlineType::Format: pResId = STR_REDLINE_FORMAT; break;
+ case RedlineType::Table: pResId = STR_REDLINE_TABLE; break;
+ case RedlineType::FmtColl: pResId = STR_REDLINE_FMTCOLL; break;
+ case RedlineType::ParagraphFormat: pResId = STR_REDLINE_PARAGRAPH_FORMAT; break;
+ case RedlineType::TableRowInsert: pResId = STR_REDLINE_TABLE_ROW_INSERT; break;
+ case RedlineType::TableRowDelete: pResId = STR_REDLINE_TABLE_ROW_DELETE; break;
+ case RedlineType::TableCellInsert: pResId = STR_REDLINE_TABLE_CELL_INSERT; break;
+ case RedlineType::TableCellDelete: pResId = STR_REDLINE_TABLE_CELL_DELETE; break;
+ default: break;
}
OUStringBuffer sBuf;
diff --git a/sw/source/uibase/inc/redlndlg.hxx b/sw/source/uibase/inc/redlndlg.hxx
index dd74d1f13ecd..615f69789cc4 100644
--- a/sw/source/uibase/inc/redlndlg.hxx
+++ b/sw/source/uibase/inc/redlndlg.hxx
@@ -93,7 +93,7 @@ class SW_DLLPUBLIC SwRedlineAcceptDlg final
DECL_DLLPRIVATE_LINK( CommandHdl, const CommandEvent&, bool );
SAL_DLLPRIVATE SwRedlineTable::size_type CalcDiff(SwRedlineTable::size_type nStart, bool bChild);
- SAL_DLLPRIVATE void InsertChildren(SwRedlineDataParent *pParent, const SwRangeRedline& rRedln, const sal_uInt16 nAutoFormat);
+ SAL_DLLPRIVATE void InsertChildren(SwRedlineDataParent *pParent, const SwRangeRedline& rRedln, bool bHasRedlineAutoFormat);
SAL_DLLPRIVATE void InsertParents(SwRedlineTable::size_type nStart, SwRedlineTable::size_type nEnd = SwRedlineTable::npos);
SAL_DLLPRIVATE void RemoveParents(SwRedlineTable::size_type nStart, SwRedlineTable::size_type nEnd);
SAL_DLLPRIVATE void InitAuthors();
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index 30493a522cbf..d00013e8f4fb 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -254,7 +254,7 @@ void SwRedlineAcceptDlg::InitAuthors()
{
const SwRangeRedline& rRedln = pSh->GetRedline(i);
- if( m_bOnlyFormatedRedlines && nsRedlineType_t::REDLINE_FORMAT != rRedln.GetType() )
+ if( m_bOnlyFormatedRedlines && RedlineType::Format != rRedln.GetType() )
m_bOnlyFormatedRedlines = false;
aStrings.push_back(rRedln.GetAuthorString());
@@ -286,7 +286,7 @@ void SwRedlineAcceptDlg::InitAuthors()
{
const SwRangeRedline& rRedln = pSh->GetRedline( nPos );
- bIsNotFormated |= nsRedlineType_t::REDLINE_FORMAT != rRedln.GetType();
+ bIsNotFormated |= RedlineType::Format != rRedln.GetType();
}
return false;
});
@@ -304,12 +304,13 @@ OUString SwRedlineAcceptDlg::GetActionImage(const SwRangeRedline& rRedln, sal_uI
{
switch (rRedln.GetType(nStack))
{
- case nsRedlineType_t::REDLINE_INSERT: return BMP_REDLINE_INSERTED;
- case nsRedlineType_t::REDLINE_DELETE: return BMP_REDLINE_DELETED;
- case nsRedlineType_t::REDLINE_FORMAT: return BMP_REDLINE_FORMATTED;
- case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT: return BMP_REDLINE_FORMATTED;
- case nsRedlineType_t::REDLINE_TABLE: return BMP_REDLINE_TABLECHG;
- case nsRedlineType_t::REDLINE_FMTCOLL: return BMP_REDLINE_FMTCOLLSET;
+ case RedlineType::Insert: return BMP_REDLINE_INSERTED;
+ case RedlineType::Delete: return BMP_REDLINE_DELETED;
+ case RedlineType::Format: return BMP_REDLINE_FORMATTED;
+ case RedlineType::ParagraphFormat: return BMP_REDLINE_FORMATTED;
+ case RedlineType::Table: return BMP_REDLINE_TABLECHG;
+ case RedlineType::FmtColl: return BMP_REDLINE_FMTCOLLSET;
+ default: break;
}
return OUString();
@@ -319,12 +320,12 @@ OUString SwRedlineAcceptDlg::GetActionText(const SwRangeRedline& rRedln, sal_uIn
{
switch( rRedln.GetType(nStack) )
{
- case nsRedlineType_t::REDLINE_INSERT: return m_sInserted;
- case nsRedlineType_t::REDLINE_DELETE: return m_sDeleted;
- case nsRedlineType_t::REDLINE_FORMAT: return m_sFormated;
- case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT: return m_sFormated;
- case nsRedlineType_t::REDLINE_TABLE: return m_sTableChgd;
- case nsRedlineType_t::REDLINE_FMTCOLL: return m_sFormatCollSet;
+ case RedlineType::Insert: return m_sInserted;
+ case RedlineType::Delete: return m_sDeleted;
+ case RedlineType::Format: return m_sFormated;
+ case RedlineType::ParagraphFormat: return m_sFormated;
+ case RedlineType::Table: return m_sTableChgd;
+ case RedlineType::FmtColl: return m_sFormatCollSet;
default:;//prevent warning
}
@@ -445,7 +446,7 @@ SwRedlineTable::size_type SwRedlineAcceptDlg::CalcDiff(SwRedlineTable::size_type
rTreeView.freeze();
SwView *pView = ::GetActiveView();
SwWrtShell* pSh = pView->GetWrtShellPtr();
- sal_uInt16 nAutoFormat = HasRedlineAutoFormat() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0;
+ bool bHasRedlineAutoFormat = HasRedlineAutoFormat();
SwRedlineDataParent *const pParent = m_RedlineParents[nStart].get();
const SwRangeRedline& rRedln = pSh->GetRedline(nStart);
@@ -471,7 +472,7 @@ SwRedlineTable::size_type SwRedlineAcceptDlg::CalcDiff(SwRedlineTable::size_type
pParent->pNext = nullptr;
// insert new children
- InsertChildren(pParent, rRedln, nAutoFormat);
+ InsertChildren(pParent, rRedln, bHasRedlineAutoFormat);
rTreeView.thaw();
return nStart;
@@ -510,18 +511,18 @@ SwRedlineTable::size_type SwRedlineAcceptDlg::CalcDiff(SwRedlineTable::size_type
return SwRedlineTable::npos;
}
-void SwRedlineAcceptDlg::InsertChildren(SwRedlineDataParent *pParent, const SwRangeRedline& rRedln, const sal_uInt16 nAutoFormat)
+void SwRedlineAcceptDlg::InsertChildren(SwRedlineDataParent *pParent, const SwRangeRedline& rRedln, bool bHasRedlineAutoFormat)
{
SwRedlineDataChild *pLastRedlineChild = nullptr;
const SwRedlineData *pRedlineData = &rRedln.GetRedlineData();
- bool bAutoFormat = (rRedln.GetRealType() & nAutoFormat) != 0;
+ bool bAutoFormatRedline = rRedln.IsAutoFormat();
weld::TreeView& rTreeView = m_pTable->GetWidget();
OUString sAction = GetActionText(rRedln);
bool bValidParent = m_sFilterAction.isEmpty() || m_sFilterAction == sAction;
bValidParent = bValidParent && m_pTable->IsValidEntry(rRedln.GetAuthorString(), rRedln.GetTimeStamp(), rRedln.GetComment());
- if (nAutoFormat)
+ if (bHasRedlineAutoFormat)
{
if (pParent->pData->GetSeqNo())
@@ -539,7 +540,7 @@ void SwRedlineAcceptDlg::InsertChildren(SwRedlineDataParent *pParent, const SwRa
return;
}
}
- bValidParent = bValidParent && bAutoFormat;
+ bValidParent = bValidParent && bAutoFormatRedline;
}
bool bValidTree = bValidParent;
@@ -559,8 +560,8 @@ void SwRedlineAcceptDlg::InsertChildren(SwRedlineDataParent *pParent, const SwRa
sAction = GetActionText(rRedln, nStack);
bool bValidChild = m_sFilterAction.isEmpty() || m_sFilterAction == sAction;
bValidChild = bValidChild && m_pTable->IsValidEntry(rRedln.GetAuthorString(nStack), rRedln.GetTimeStamp(nStack), rRedln.GetComment());
- if (nAutoFormat)
- bValidChild = bValidChild && bAutoFormat;
+ if (bHasRedlineAutoFormat)
+ bValidChild = bValidChild && bAutoFormatRedline;
bValidTree |= bValidChild;
if (bValidChild)
@@ -602,7 +603,7 @@ void SwRedlineAcceptDlg::InsertChildren(SwRedlineDataParent *pParent, const SwRa
{
rTreeView.remove(*pParent->xTLBParent);
pParent->xTLBParent.reset();
- if (nAutoFormat)
+ if (bHasRedlineAutoFormat)
m_aUsedSeqNo.erase(pParent);
}
}
@@ -687,7 +688,7 @@ void SwRedlineAcceptDlg::InsertParents(SwRedlineTable::size_type nStart, SwRedli
{
SwView *pView = ::GetActiveView();
SwWrtShell* pSh = pView->GetWrtShellPtr();
- sal_uInt16 nAutoFormat = HasRedlineAutoFormat() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0;
+ bool bHasRedlineAutoFormat = HasRedlineAutoFormat();
SwRedlineTable::size_type nCount = pSh->GetRedlineCount();
nEnd = std::min(nEnd, (nCount - 1)); // also treats nEnd=SwRedlineTable::npos (until the end)
@@ -756,7 +757,7 @@ void SwRedlineAcceptDlg::InsertParents(SwRedlineTable::size_type nStart, SwRedli
pRedlineParent->xTLBParent = std::move(xParent);
- InsertChildren(pRedlineParent, rRedln, nAutoFormat);
+ InsertChildren(pRedlineParent, rRedln, bHasRedlineAutoFormat);
}
rTreeView.thaw();
}
@@ -795,7 +796,7 @@ void SwRedlineAcceptDlg::CallAcceptReject( bool bSelect, bool bAccept )
SwRedlineTable::size_type nPosition = GetRedlinePos(rEntry);
const SwRangeRedline& rRedln = pSh->GetRedline(nPosition);
- if( nsRedlineType_t::REDLINE_FORMAT == rRedln.GetType() )
+ if( RedlineType::Format == rRedln.GetType() )
bIsNotFormatted = false;
}
@@ -962,7 +963,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, GotoHdl, Timer *, void)
{
const SwRangeRedline& rRedln = pSh->GetRedline( nPos );
- bIsNotFormated |= nsRedlineType_t::REDLINE_FORMAT != rRedln.GetType();
+ bIsNotFormated |= RedlineType::Format != rRedln.GetType();
if (pSh->GotoRedline(nPos, true))
{
@@ -1068,17 +1069,17 @@ IMPL_LINK(SwRedlineAcceptDlg, CommandHdl, const CommandEvent&, rCEvt, bool)
const char* pResId = nullptr;
switch( rRedline.GetType() )
{
- case nsRedlineType_t::REDLINE_INSERT:
+ case RedlineType::Insert:
pResId = STR_REDLINE_INSERTED;
break;
- case nsRedlineType_t::REDLINE_DELETE:
+ case RedlineType::Delete:
pResId = STR_REDLINE_DELETED;
break;
- case nsRedlineType_t::REDLINE_FORMAT:
- case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT:
+ case RedlineType::Format:
+ case RedlineType::ParagraphFormat:
pResId = STR_REDLINE_FORMATTED;
break;
- case nsRedlineType_t::REDLINE_TABLE:
+ case RedlineType::Table:
pResId = STR_REDLINE_TABLECHG;
break;
default:;//prevent warning
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index 0f02926035a5..a71969f6acfb 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -87,20 +87,20 @@ static OUString lcl_BuildTitleWithRedline( const SwRangeRedline *pRedline )
const char* pResId = nullptr;
switch( pRedline->GetType() )
{
- case nsRedlineType_t::REDLINE_INSERT:
+ case RedlineType::Insert:
pResId = STR_REDLINE_INSERTED;
break;
- case nsRedlineType_t::REDLINE_DELETE:
+ case RedlineType::Delete:
pResId = STR_REDLINE_DELETED;
break;
- case nsRedlineType_t::REDLINE_FORMAT:
- case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT:
+ case RedlineType::Format:
+ case RedlineType::ParagraphFormat:
pResId = STR_REDLINE_FORMATTED;
break;
- case nsRedlineType_t::REDLINE_TABLE:
+ case RedlineType::Table:
pResId = STR_REDLINE_TABLECHG;
break;
- case nsRedlineType_t::REDLINE_FMTCOLL:
+ case RedlineType::FmtColl:
pResId = STR_REDLINE_FMTCOLLSET;
break;
default:
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 28b3958fc55f..28851886ded5 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3306,7 +3306,7 @@ OUString SwXTextDocument::getTrackedChanges()
boost::property_tree::ptree aTrackedChange;
aTrackedChange.put("index", rRedlineTable[i]->GetId());
aTrackedChange.put("author", rRedlineTable[i]->GetAuthorString(1).toUtf8().getStr());
- aTrackedChange.put("type", nsRedlineType_t::SwRedlineTypeToOUString(
+ aTrackedChange.put("type", SwRedlineTypeToOUString(
rRedlineTable[i]->GetRedlineData().GetType())
.toUtf8()
.getStr());