summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/contentindex.hxx17
-rw-r--r--sw/inc/ndtxt.hxx3
2 files changed, 17 insertions, 3 deletions
diff --git a/sw/inc/contentindex.hxx b/sw/inc/contentindex.hxx
index 00337570ecb5..c05845b378c7 100644
--- a/sw/inc/contentindex.hxx
+++ b/sw/inc/contentindex.hxx
@@ -21,6 +21,8 @@
#include <sal/types.h>
#include "swdllapi.h"
+#include <o3tl/typed_flags_set.hxx>
+
#include <iostream>
class SwContentNode;
@@ -112,9 +114,17 @@ class SAL_WARN_UNUSED SwContentIndexReg
const SwContentIndex * m_pFirst;
const SwContentIndex * m_pLast;
+public:
+ enum class UpdateMode {
+ Default = 0,
+ Negative = (1<<0),
+ Delete = (1<<1),
+ Replace = (1<<2),
+ };
+
protected:
virtual void Update( SwContentIndex const & rPos, const sal_Int32 nChangeLen,
- const bool bNegative = false, const bool bDelete = false );
+ UpdateMode eMode);
bool HasAnyIndex() const { return nullptr != m_pFirst; }
@@ -126,6 +136,11 @@ public:
const SwContentIndex* GetFirstIndex() const { return m_pFirst; }
};
+namespace o3tl
+{
+ template<> struct typed_flags<SwContentIndexReg::UpdateMode> : is_typed_flags<SwContentIndexReg::UpdateMode, 0x07> {};
+}
+
#ifndef DBG_UTIL
inline sal_Int32 SwContentIndex::operator++()
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 5b71bfd3d593..9a5aa068ade6 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -763,8 +763,7 @@ public:
virtual void Update(
SwContentIndex const & rPos,
const sal_Int32 nChangeLen,
- const bool bNegative = false,
- const bool bDelete = false ) override;
+ UpdateMode eMode) override;
/// change text to Upper/Lower/Hiragana/Katakana/...
void TransliterateText( utl::TransliterationWrapper& rTrans,