diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-01-28 13:31:52 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-01-28 16:43:05 +0100 |
commit | 552361aaad740e55fcfa7993b4111aba354f863f (patch) | |
tree | 404e58340d40ca54a9485c5a5f7f52ed1e00f5d3 /sw/source/uibase/wrtsh | |
parent | 13ebef097dbbf1e8663bcb3649daba4ee8295a40 (diff) |
sw: add AnchorType parameter to .uno:Paste
Which allows not hardcoding as-char for LOK.
Change-Id: I3b2987abbaf1f259c614b7b2a8709f15048d362d
Diffstat (limited to 'sw/source/uibase/wrtsh')
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh1.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index aa4324e2315b..b03c8926bdec 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -241,7 +241,7 @@ void SwWrtShell::Insert( const OUString &rStr ) void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter, const Graphic &rGrf, SwFlyFrameAttrMgr *pFrameMgr, - bool bRule ) + bool bRule, sal_uInt16 nAnchorType ) { ResetCursorStack(); if ( !CanInsert() ) @@ -277,9 +277,9 @@ void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter, // These must be removed explicitly for the optimal size. pFrameMgr->DelAttr(RES_FRM_SIZE); - if (comphelper::LibreOfficeKit::isActive()) - // LOK: anchor inserted images as-char by default. - pFrameMgr->SetAnchor(FLY_AS_CHAR); + if (nAnchorType != 0) + // Something other than at-para was requested. + pFrameMgr->SetAnchor(static_cast<RndStdIds>(nAnchorType)); } else { |