summaryrefslogtreecommitdiff
path: root/sw/source/core/frmedt
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-08-15 15:59:56 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-08-15 16:48:58 +0200
commitc7307c77254557646f33017af915f6808a861e29 (patch)
treebd4ca78aa7bd07c7cfaa5072a62d59cf790ff5b9 /sw/source/core/frmedt
parent0606ab6a73d5d9e3fd9f7b20f77a2532f2478194 (diff)
fdo#82191 sw::DocumentLayoutManager: copy textbox content of draw formats
The SwFmtCntnt, i.e. the content of the draw format was already copied, but that's only a pointer to the real content: instead duplicate the real contents on copy&paste, that's how we copy fly frames as well. Change-Id: I42475e356aaa1c54c08fb23a6a395d1726e5f33e
Diffstat (limited to 'sw/source/core/frmedt')
-rw-r--r--sw/source/core/frmedt/fecopy.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 261f49236e55..6bdf41fc9f6e 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -75,6 +75,7 @@
#include <docsh.hxx>
#include <pagedesc.hxx>
#include <mvsave.hxx>
+#include <textboxhelper.hxx>
#include <vcl/virdev.hxx>
#include <svx/svdundo.hxx>
@@ -884,6 +885,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames )
if( !Imp()->GetDrawView() )
MakeDrawView();
+ std::set<const SwFrmFmt*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pClpDoc);
for ( sal_uInt16 i = 0; i < pClpDoc->GetSpzFrmFmts()->size(); ++i )
{
bool bInsWithFmt = true;
@@ -953,6 +955,10 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames )
continue;
}
+ // Ignore TextBoxes, they are already handled in sw::DocumentLayoutManager::CopyLayoutFmt().
+ if (aTextBoxes.find(&rCpyFmt) != aTextBoxes.end())
+ continue;
+
aAnchor.SetAnchor( pPos );
}
else if ( FLY_AT_PAGE == aAnchor.GetAnchorId() )