summaryrefslogtreecommitdiff
path: root/sw/source/core/draw/dview.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/draw/dview.cxx')
-rw-r--r--sw/source/core/draw/dview.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index f7242d1d8132..441b474c6b27 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -32,6 +32,7 @@
#include <editeng/protitem.hxx>
#include <svx/svdpagv.hxx>
#include <svx/fmmodel.hxx>
+#include <sot/exchange.hxx>
#include "swtypes.hxx"
#include "pagefrm.hxx"
@@ -991,6 +992,14 @@ void SwDrawView::CheckPossibilities()
bSzProtect |= ( embed::EmbedMisc::EMBED_NEVERRESIZE & xObj->getStatus( embed::Aspects::MSOLE_CONTENT ) ) ? TRUE : FALSE;
// <--
+
+ // #i972: protect position if it is a Math object anchored 'as char' and baseline alignment is activated
+ SwDoc* pDoc = Imp().GetShell()->GetDoc();
+ const bool bProtectMathPos = SotExchange::IsMath( xObj->getClassID() )
+ && FLY_AS_CHAR == pFly->GetFmt()->GetAnchor().GetAnchorId()
+ && pDoc->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT );
+ if (bProtectMathPos)
+ bMoveProtect = true;
}
}
}
@@ -1112,4 +1121,3 @@ const SdrMarkList& SwDrawView::GetMarkedObjectList() const
-