diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-02-04 16:19:02 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-02-05 09:06:17 +0100 |
commit | bd978e93fa0422384ace346665f532b2a714f423 (patch) | |
tree | 1a99ac50af98081569d6f05b78b49a86806dacc1 /sw/inc/IDocumentContentOperations.hxx | |
parent | cee1568e8915e479732687a7aa3faa639955596d (diff) |
sw: convert CopyRange boolean parameters to enum
Change-Id: Ic65753e1c6f5ef45494c1925cf2a5427427e5fe7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87985
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/inc/IDocumentContentOperations.hxx')
-rw-r--r-- | sw/inc/IDocumentContentOperations.hxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx index b6857c346a33..14724eae3731 100644 --- a/sw/inc/IDocumentContentOperations.hxx +++ b/sw/inc/IDocumentContentOperations.hxx @@ -69,6 +69,19 @@ namespace o3tl template<> struct typed_flags<SwInsertFlags> : is_typed_flags<SwInsertFlags, 0x07> {}; } +enum class SwCopyFlags +{ + Default = 0, + CopyAll = (1<<0), ///< copy break attributes even when source is single node + CheckPosInFly = (1<<1), ///< check if target position is in fly anchored at source range + IsMoveToFly = (1<<2), ///< MakeFlyAndMove + // TODO: mbCopyIsMove? mbIsRedlineMove? +}; +namespace o3tl +{ + template<> struct typed_flags<SwCopyFlags> : is_typed_flags<SwCopyFlags, 0x07> {}; +} + /** Text operation/manipulation interface */ class IDocumentContentOperations @@ -104,12 +117,13 @@ public: @param rPos The target copy destination - @param bCheckPos + @param flags + SwCopyFlags::CheckPos: If this function should check if rPos is in a fly frame anchored in rPam. If false, then no such check will be performed, and it is assumed that the caller took care of verifying this constraint already. */ - virtual bool CopyRange(SwPaM& rPam, SwPosition& rPos, const bool bCopyAll, bool bCheckPos, bool bCopyText ) const = 0; + virtual bool CopyRange(SwPaM& rPam, SwPosition& rPos, SwCopyFlags flags) const = 0; /** Delete section containing the node. */ |