[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - 2 commits - sw/source
Attila Bakos (NISZ) (via logerrit)
logerrit at kemper.freedesktop.org
Thu Dec 3 22:32:22 UTC 2020
sw/source/core/doc/textboxhelper.cxx | 17 +++++++----------
sw/source/core/frmedt/fecopy.cxx | 5 +++++
2 files changed, 12 insertions(+), 10 deletions(-)
New commits:
commit dc8b0ef9ddf52aac2e2188925d9273c202086834
Author: Attila Bakos (NISZ) <bakos.attilakaroly at nisz.hu>
AuthorDate: Wed Nov 25 14:06:49 2020 +0100
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Thu Dec 3 23:31:56 2020 +0100
tdf#135044 sw: fix Ctrl + drag textbox copy
Text content was missing in the new textbox
after Ctrl + drag and drop copying of a text box
with text content.
Change-Id: Ib93096df0028ee0e02c73804c1518aec4490b57f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106585
Tested-by: László Németh <nemeth at numbertext.org>
Reviewed-by: László Németh <nemeth at numbertext.org>
(cherry picked from commit 64819ab91555b5afe360cf25aba6431546c4d905)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107107
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index bad9f4a671cb..51d21db7e678 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -400,6 +400,11 @@ bool SwFEShell::CopyDrawSel( SwFEShell& rDestShell, const Point& rSttPt,
if (SwDrawFrameFormat *pDrawFormat = dynamic_cast<SwDrawFrameFormat*>(pFormat))
pDrawFormat->PosAttrSet();
}
+ if (SwTextBoxHelper::getOtherTextBoxFormat(pFormat, RES_DRAWFRMFMT))
+ {
+ SwTextBoxHelper::syncFlyFrameAttr(*pFormat, pFormat->GetAttrSet());
+ }
+
if( bSelectInsert )
pDestDrwView->MarkObj( pNew, pDestPgView );
}
commit 12637d0ddecd9c70c7255f76ff5e3b8651ae273e
Author: Attila Bakos (NISZ) <bakos.attilakaroly at nisz.hu>
AuthorDate: Tue Nov 24 15:49:41 2020 +0100
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Thu Dec 3 23:31:48 2020 +0100
tdf#137802 sw: fix crash of textbox anchored to page
This is a regression from commit
a7bd634371285dbdceaf775dc31b6b586c7ca02f
(tdf#137802 tdf#84691 sw: sync anchoring of
textbox with UNO), where synching didn't
remove the anchoring setting.
Steps for reproducing:
1. In an empty document add a new paragraph so that you have two.
2. Insert – Shape – Basic Shapes – Rectangle and place it to the
center of page to have it anchored to the second empty paragraph.
3. Right click on the shape – Add Text Box
4. Right click on the shape – Position and Size
5. Set Anchor as To page
6. Delete the second paragraph that the shape was anchored
7. Click on the shape and press Delete
Change-Id: I67f076bb9fc26cf47185aa21a84371dd85c6e3ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106531
Tested-by: László Németh <nemeth at numbertext.org>
Reviewed-by: László Németh <nemeth at numbertext.org>
(cherry picked from commit 918608006728cc753dc12a1b1499172dabe15376)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107109
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index 14fa5932bf51..fdc5488893d3 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -828,17 +828,14 @@ void SwTextBoxHelper::syncFlyFrameAttr(SwFrameFormat& rShape, SfxItemSet const&
const SfxPoolItem* pItem = aIter.GetCurItem();
const RndStdIds aAnchId = rShape.GetAnchor().GetAnchorId();
- if ((aAnchId == RndStdIds::FLY_AT_PAGE && rShape.GetAnchor().GetPageNum() != 0)
- || ((aAnchId == RndStdIds::FLY_AT_PARA || aAnchId == RndStdIds::FLY_AT_CHAR)
- && rShape.GetAnchor().GetContentAnchor()))
+ if (aAnchId == RndStdIds::FLY_AT_PAGE && rShape.GetAnchor().GetPageNum() != 0)
{
- SwFormatAnchor aNewAnch = pFormat->GetAnchor();
- if (rShape.GetAnchor().GetContentAnchor())
- aNewAnch.SetAnchor(rShape.GetAnchor().GetContentAnchor());
- if (rShape.GetAnchor().GetPageNum() > 0)
- aNewAnch.SetPageNum(rShape.GetAnchor().GetPageNum());
- aNewAnch.SetType(rShape.GetAnchor().GetAnchorId());
- aTextBoxSet.Put(aNewAnch);
+ aTextBoxSet.Put(SwFormatAnchor(RndStdIds::FLY_AT_PAGE, rShape.GetAnchor().GetPageNum()));
+ }
+ if ((aAnchId == RndStdIds::FLY_AT_PARA || aAnchId == RndStdIds::FLY_AT_CHAR)
+ && rShape.GetAnchor().GetContentAnchor())
+ {
+ aTextBoxSet.Put(rShape.GetAnchor());
}
do
{
More information about the Libreoffice-commits
mailing list