summaryrefslogtreecommitdiff
path: root/sw/source/uibase/frmdlg/frmmgr.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-07-04 15:50:31 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-07-04 16:40:51 +0200
commit4f40bf6a79de6d60da0a5090cdfeda6242e889f0 (patch)
tree3ae655257328ca70c26debbacbdc183f80f93185 /sw/source/uibase/frmdlg/frmmgr.cxx
parentad8f4c4432e0c5c052b6f87977d1ad8663debe09 (diff)
sw: insert image: set anchor to as-char by default
See the mailing list thread at https://www.mail-archive.com/search?l=mid&q=999e55c8-5d15-1014-e6f9-9f3d19d003af@collabora.com (minutes of ESC call ..., 2019-05-09) for motivation, this is meant to improve Word compatibility, by not defaulting to the at-paragraph anchor type, which is unavailable in Word. See tdf#45778 and tdf#87720 for related bugs. Change-Id: I2699ce04dce02e8436dc3af3b2cc8778f8dc476c Reviewed-on: https://gerrit.libreoffice.org/75091 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/source/uibase/frmdlg/frmmgr.cxx')
-rw-r--r--sw/source/uibase/frmdlg/frmmgr.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx
index 5dbca0fcfe59..2c2205b1597c 100644
--- a/sw/source/uibase/frmdlg/frmmgr.cxx
+++ b/sw/source/uibase/frmdlg/frmmgr.cxx
@@ -85,6 +85,11 @@ SwFlyFrameAttrMgr::SwFlyFrameAttrMgr( bool bNew, SwWrtShell* pSh, Frmmgr_Type nT
m_aSet.Put( SwFormatFrameSize( ATT_MIN_SIZE, DFLT_WIDTH, DFLT_HEIGHT ));
if ( 0 != ::GetHtmlMode(pSh->GetView().GetDocShell()) )
m_aSet.Put( SwFormatHoriOrient( 0, text::HoriOrientation::LEFT, text::RelOrientation::PRINT_AREA ) );
+
+ if (nType == Frmmgr_Type::GRF || nType == Frmmgr_Type::OLE)
+ {
+ m_aSet.Put(SwFormatAnchor(RndStdIds::FLY_AS_CHAR));
+ }
}
else if ( nType == Frmmgr_Type::NONE )
{