summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-09-26 16:56:31 +0200
committerAndras Timar <andras.timar@collabora.com>2017-09-28 16:41:01 +0200
commit5a1f4967f5819dea262498b87b0f9bbe5dcf69b4 (patch)
tree9ecd185a0bc5caccbcb241b89076054a5924dc7e /sw/source/uibase/app
parentcbdf020b558c217b9bcbb7396deb99f9dee71e3a (diff)
tdf#112574 sw: don't insert RES_ANCHOR into style item sets
Styles don't have anchors, only frames have anchors. When using "New Style from Selection", clear the RES_ANCHOR from the style item set. Also, don't insert it in SwFramePage::DeactivatePage(). This was always broken and reportedly crashes since commit e07feb9457f2ffb373ae69b73dda290140e4005f Change-Id: I9320dbbcae980dfa0b00459b8cd808553d1a04f4 (cherry picked from commit 17fe1e19e01f8b23bcd23cc7c1789e8f7064d06e) Reviewed-on: https://gerrit.libreoffice.org/42819 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 2f1ef1d7e3caa806e5f5abddb3ac3761538b935b)
Diffstat (limited to 'sw/source/uibase/app')
-rw-r--r--sw/source/uibase/app/docst.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index d9313fbe941f..7a749c1a5030 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -1235,6 +1235,7 @@ SfxStyleFamily SwDocShell::MakeByExample( const OUString &rName, SfxStyleFamily
SfxItemSet aSet(GetPool(), aFrameFormatSetRange );
pCurrWrtShell->GetFlyFrameAttr( aSet );
+ aSet.ClearItem(RES_ANCHOR); // tdf#112574 no anchor in styles
SwFrameFormat* pFFormat = pCurrWrtShell->GetSelectedFrameFormat();
pFrame->SetDerivedFrom( pFFormat );