diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-05-17 08:23:43 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-05-17 10:22:08 +0200 |
commit | a13264fc7578cbd3267065f4992ded9f7558ec7a (patch) | |
tree | 331c78d28e885264e9dac66a7c6770bf6d2cd7a7 /sw/source/core/doc/docfly.cxx | |
parent | d07cc6706ef3b382fa16a104c97b69bc2d2365e5 (diff) |
sw floattable: disable chain UI if the frame is allowed to split already
This is similar to d9cd177b9b08d454882dd77ffeb825a184a1b540 (sw
floattable: disable UI if the frame is chained already, 2023-05-16), but
here the fly is split and we disallow chaining, not the other way
around.
Change-Id: I637d594d41ba9a80d58bc0bef37627d8104293ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151856
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/source/core/doc/docfly.cxx')
-rw-r--r-- | sw/source/core/doc/docfly.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx index 1d425e62f73d..3d94cffef514 100644 --- a/sw/source/core/doc/docfly.cxx +++ b/sw/source/core/doc/docfly.cxx @@ -62,6 +62,7 @@ #include <svx/xlnstit.hxx> #include <svx/xlnedit.hxx> #include <svx/xflhtit.hxx> +#include <formatflysplit.hxx> using namespace ::com::sun::star; @@ -995,6 +996,18 @@ SwChainRet SwDoc::Chainable( const SwFrameFormat &rSource, const SwFrameFormat & if( rChain.GetPrev() ) return SwChainRet::IS_IN_CHAIN; + // Split flys are incompatible with chaining. + const SwFormatFlySplit& rOldSplit = rSource.GetFlySplit(); + if (rOldSplit.GetValue()) + { + return SwChainRet::SOURCE_CHAINED; + } + const SwFormatFlySplit& rNewSplit = rDest.GetFlySplit(); + if (rNewSplit.GetValue()) + { + return SwChainRet::IS_IN_CHAIN; + } + // Target must be empty. const SwNodeIndex* pCntIdx = rDest.GetContent().GetContentIdx(); if( !pCntIdx ) |