sw/source/core/layout/objectformattertxtfrm.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
New commits: commit b3e210808247743c891350dded33eb6e186c1088 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Oct 30 11:55:36 2020 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Oct 30 18:00:37 2020 +0100 crashtesting: assert on undo creation on export of tdf105134-1.docx to pdf since... commit c9eb53f200225f2ee6ca695e1326843a487aee51 (HEAD, refs/bisect/bad) Date: Wed Oct 14 15:46:23 2020 +0200 tdf#135198 sw editing: text box fell out of its shape I don't think layout should add into the undo stack Change-Id: I92e154dbe2396ff4085fffd7e962e43d2c61c073 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105045 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx index 78498b9f6d3e..3836c138f79d 100644 --- a/sw/source/core/layout/objectformattertxtfrm.cxx +++ b/sw/source/core/layout/objectformattertxtfrm.cxx @@ -18,6 +18,7 @@ */ #include "objectformattertxtfrm.hxx" +#include <IDocumentUndoRedo.hxx> #include <sortedobjs.hxx> #include <rootfrm.hxx> #include <anchoredobject.hxx> @@ -354,10 +355,16 @@ bool SwObjectFormatterTextFrame::DoFormatObjs() SwFrameFormat& rFormat = pObj->GetFrameFormat(); if (SwTextBoxHelper::isTextBox(&rFormat, RES_DRAWFRMFMT)) { - SfxItemSet aSet(rFormat.GetDoc()->GetAttrPool(), - svl::Items<RES_VERT_ORIENT, RES_ANCHOR>{}); if (const SwPageFrame* pPageFrame = pObj->GetPageFrame()) { + SwDoc* pDoc = rFormat.GetDoc(); + + // avoid Undo creation, + ::sw::UndoGuard const ug(pDoc->GetIDocumentUndoRedo()); + + SfxItemSet aSet(pDoc->GetAttrPool(), + svl::Items<RES_VERT_ORIENT, RES_ANCHOR>{}); + const SwRect& rPageFrameArea = pPageFrame->getFrameArea(); aSet.Put(SwFormatVertOrient(pObj->GetObjRect().Top() - rPageFrameArea.Top(), text::VertOrientation::NONE, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits