summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-12-10 15:25:37 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2018-12-18 17:55:29 +0100
commit5e81b966778d82692b4763d892b457186a7f269d (patch)
tree21d412deb1ef1b51a535fedc197b01f7953a1136 /sw/inc
parent77e67e7cd2baeca13c357fbda4c44a90db23de11 (diff)
sw_redlinehide_4b: FindText() adapt the replace part as well
When redlining is enabled, the result will be a delete redline for the existing text, and an insert redline for the new text; that much is obious (and ReplaceRange can deal with a selection larger than one SwTextNode easily, since it mostly adds redlines). For the case when redlining is disabled, there are 2 options, and i don't really know which is preferrable from UX point of view: One approach is to reuse GetRanges() to ignore delete redlines in the replace range; move its declaration to different header. Another approach is to DeleteAndJoin() the existing delete redlines, which is the same as the previous model based Hide mode, which calls DeleteRedline() to remove the hidden redlines. Also change ChgAutoCorrWord() to call DeleteSelImpl() directly. Change-Id: I5974409d09eb39e04cc0b5dfc20d4db510e1cf58
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/crsrsh.hxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index fca0cc4f78f5..a5c8e1acc4d2 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -43,6 +43,7 @@
class SfxItemSet;
class SfxPoolItem;
class SwContentFrame;
+class SwUnoCursor;
class SwFormatField;
class SwTextFormatColl;
class SwTextINetFormat;
@@ -125,8 +126,19 @@ struct SwContentAtPos
const int CRSR_POSOLD = 0x01, // cursor stays at old position
CRSR_POSCHG = 0x02; // position changed by the layout
+namespace sw {
+
+bool ReplaceImpl(SwPaM & rCursor, OUString const& rReplacement,
+ bool const bRegExp, SwDoc & rDoc, SwRootFrame const*const pLayout);
+
/// Helperfunction to resolve backward references in regular expressions
-OUString *ReplaceBackReferences( const i18nutil::SearchOptions2& rSearchOpt, SwPaM* pPam );
+OUString *ReplaceBackReferences(const i18nutil::SearchOptions2& rSearchOpt,
+ SwPaM* pPam, SwRootFrame const* pLayout );
+
+bool GetRanges(std::vector<std::shared_ptr<SwUnoCursor>> & rRanges,
+ SwDoc & rDoc, SwPaM const& rDelPam);
+
+} // namespace sw
class SW_DLLPUBLIC SwCursorShell
: public SwViewShell