diff options
-rw-r--r-- | desktop/qa/desktop_lib/test_desktop_lib.cxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh1.cxx | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 0d39f931ae69..b80dc0b4cc76 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -19,6 +19,7 @@ #ifdef WNT #include <prewin.h> #endif +#include <com/sun/star/text/TextContentAnchorType.hpp> #include <boost/property_tree/json_parser.hpp> #ifdef WNT #include <postwin.h> @@ -437,6 +438,10 @@ void DesktopLOKTest::testPasteWriterJPEG() // This was 0, JPEG was not handled as a format for clipboard paste. CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xDrawPage->getCount()); + uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY); + // This was text::TextContentAnchorType_AT_PARAGRAPH. + CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AS_CHARACTER, xShape->getPropertyValue("AnchorType").get<text::TextContentAnchorType>()); + comphelper::LibreOfficeKit::setActive(false); } diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 37f0553ab2a0..0a92d7014687 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -104,6 +104,7 @@ #include "PostItMgr.hxx" #include <sfx2/msgpool.hxx> #include <boost/scoped_ptr.hpp> +#include <comphelper/lok.hxx> using namespace sw::mark; using namespace com::sun::star; @@ -274,6 +275,10 @@ void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter, // because of the DEF-Framesize // These must be removed explicitly for the optimal size. pFrmMgr->DelAttr(RES_FRM_SIZE); + + if (comphelper::LibreOfficeKit::isActive()) + // LOK: anchor inserted images as-char by default. + pFrmMgr->SetAnchor(FLY_AS_CHAR); } else { |