From a7528cd6f17ea5c5b29e7d607e54c62de0d9e7db Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 18 Nov 2019 13:50:32 +0100 Subject: sw: insert image: set anchor to at-char by default This changes the default set in commit 4f40bf6a79de6d60da0a5090cdfeda6242e889f0 (sw: insert image: set anchor to as-char by default, 2019-07-04), to have a better compromise, taking both Word defaults compatibility and usability into account. The problem is that users are used to just inserting an image and being able to drag it to its final location, which is broken with as-char anchoring. So default to at-char anchoring, this is still something that is fully interoperable to Word (unlike the old to-para anchoring), but allows the easier image move again. Change-Id: Ibc61ae167fc9e5cc31b04c83e854556309e27fd4 Reviewed-on: https://gerrit.libreoffice.org/83089 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- sw/qa/extras/unowriter/unowriter.cxx | 2 +- sw/source/uibase/frmdlg/frmmgr.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sw/qa/extras/unowriter/unowriter.cxx b/sw/qa/extras/unowriter/unowriter.cxx index f1b2b7671cdf..d44bee733ab6 100644 --- a/sw/qa/extras/unowriter/unowriter.cxx +++ b/sw/qa/extras/unowriter/unowriter.cxx @@ -533,7 +533,7 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testPasteListener) RndStdIds eFlyAnchor = pFlyFormat->GetAnchor().GetAnchorId(); // Without the working image listener in place, this test would have // failed, eFlyAnchor was FLY_AT_PARA. - CPPUNIT_ASSERT_EQUAL(RndStdIds::FLY_AS_CHAR, eFlyAnchor); + CPPUNIT_ASSERT_EQUAL(RndStdIds::FLY_AT_CHAR, eFlyAnchor); pTransfer->Cut(); pListener->GetString().clear(); diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx index 5894fa74daab..e09d42623ee1 100644 --- a/sw/source/uibase/frmdlg/frmmgr.cxx +++ b/sw/source/uibase/frmdlg/frmmgr.cxx @@ -88,7 +88,7 @@ SwFlyFrameAttrMgr::SwFlyFrameAttrMgr( bool bNew, SwWrtShell* pSh, Frmmgr_Type nT if (nType == Frmmgr_Type::GRF || nType == Frmmgr_Type::OLE) { - m_aSet.Put(SwFormatAnchor(RndStdIds::FLY_AS_CHAR)); + m_aSet.Put(SwFormatAnchor(RndStdIds::FLY_AT_CHAR)); } } else if ( nType == Frmmgr_Type::NONE ) -- cgit v1.2.3