diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2017-07-01 20:30:43 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-07-11 20:19:25 +0200 |
commit | 91ca088171d58339715358b8a47f7adc491ba7fa (patch) | |
tree | 0773078d1653904e6dbd3230af577692b0ff16a7 /writerfilter/source | |
parent | tdf#108544 edit in window (XLSX inside DOCX) (diff) | |
download | core-91ca088171d58339715358b8a47f7adc491ba7fa.tar.gz core-91ca088171d58339715358b8a47f7adc491ba7fa.zip |
tdf#108545 show an icon (DOCX inside DOCX)
If DrawAspect is equal "Icon", show an icon not document preview
Document is opened in the separate window, not in-place.
Change-Id: I3a8d81e7340b29d247f8ac440c06b0420bb65644
Reviewed-on: https://gerrit.libreoffice.org/39440
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/39716
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerfilter/source')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 | ||||
-rw-r--r-- | writerfilter/source/dmapper/OLEHandler.cxx | 5 | ||||
-rw-r--r-- | writerfilter/source/dmapper/OLEHandler.hxx | 2 |
3 files changed, 11 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 4cb55513eacb..1e646350cfcd 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1418,6 +1418,10 @@ void DomainMapper_Impl::appendOLE( const OUString& rStreamName, const OLEHandler else xOLEProperties->setPropertyValue("CLSID", uno::makeAny(OUString(aCLSID))); + OUString aDrawAspect = pOLEHandler->GetDrawAspect(); + if(!aDrawAspect.isEmpty()) + xOLEProperties->setPropertyValue("DrawAspect", uno::makeAny(aDrawAspect)); + awt::Size aSize = pOLEHandler->getSize(); if( !aSize.Width ) aSize.Width = 1000; diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx index 317fe5c80239..6dbe0aae2f87 100644 --- a/writerfilter/source/dmapper/OLEHandler.cxx +++ b/writerfilter/source/dmapper/OLEHandler.cxx @@ -251,6 +251,11 @@ OUString OLEHandler::getCLSID(const uno::Reference<uno::XComponentContext>& xCom return aRet; } +OUString OLEHandler::GetDrawAspect() const +{ + return m_sDrawAspect; +} + OUString OLEHandler::copyOLEOStream( uno::Reference<text::XTextDocument> const& xTextDocument) { diff --git a/writerfilter/source/dmapper/OLEHandler.hxx b/writerfilter/source/dmapper/OLEHandler.hxx index 2f99de501e5f..b71f51adcc88 100644 --- a/writerfilter/source/dmapper/OLEHandler.hxx +++ b/writerfilter/source/dmapper/OLEHandler.hxx @@ -92,6 +92,8 @@ public: /// Get the CLSID of the OLE object, in case we can find one based on m_sProgId. OUString getCLSID(const css::uno::Reference<css::uno::XComponentContext>& xComponentContext) const; + OUString GetDrawAspect() const; + OUString copyOLEOStream(css::uno::Reference<css::text::XTextDocument> const& xTextDocument); const css::awt::Size& getSize() const { return m_aShapeSize; } |