From 4f40bf6a79de6d60da0a5090cdfeda6242e889f0 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 4 Jul 2019 15:50:31 +0200 Subject: 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 Tested-by: Jenkins --- sw/source/uibase/frmdlg/frmmgr.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sw/source/uibase/frmdlg/frmmgr.cxx') 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 ) { -- cgit