diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-01-28 13:31:52 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2016-06-19 17:07:12 +0200 |
commit | a61ca650e21de3bd896bc6f9abce1481425fb29a (patch) | |
tree | 57804233d967d145c029cde6b583a2f357343b05 /desktop/source | |
parent | 91a056e0f9279ac297cd9432e789c848b032b1fd (diff) |
sw: add AnchorType parameter to .uno:Paste
Which allows not hardcoding as-char for LOK.
(cherry picked from commit 552361aaad740e55fcfa7993b4111aba354f863f)
Change-Id: I3b2987abbaf1f259c614b7b2a8709f15048d362d
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/lib/init.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 7d078a30126c..410081b3d611 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -33,6 +33,7 @@ #include <comphelper/processfactory.hxx> #include <comphelper/string.hxx> #include <comphelper/scopeguard.hxx> +#include <comphelper/propertysequence.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/container/XNameAccess.hpp> @@ -50,6 +51,7 @@ #include <com/sun/star/container/XHierarchicalNameAccess.hpp> #include <com/sun/star/util/URLTransformer.hpp> #include <com/sun/star/datatransfer/clipboard/XClipboard.hpp> +#include <com/sun/star/text/TextContentAnchorType.hpp> #include <editeng/fontitem.hxx> #include <editeng/flstitem.hxx> @@ -1330,7 +1332,10 @@ static bool doc_paste(LibreOfficeKitDocument* pThis, const char* pMimeType, cons return false; } - uno::Sequence<beans::PropertyValue> aPropertyValues; + uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence( + { + {"AnchorType", uno::makeAny(static_cast<sal_uInt16>(text::TextContentAnchorType_AS_CHARACTER))}, + })); if (!comphelper::dispatchCommand(".uno:Paste", aPropertyValues)) { gImpl->maLastExceptionMsg = "Failed to dispatch the .uno: command"; |