diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-07-04 16:38:40 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-07-04 21:19:29 +0200 |
commit | c52cb57cc893a6b42d77ceb4cf08a3816824ca4f (patch) | |
tree | 0c794608f771f27b25f4ffee863509a6b0718d55 /writerfilter | |
parent | 27df6cd7d168f637b9b642e826bed8f2e25cfb34 (diff) |
bnc#884615 VML import: import OLE objects in header with background wrapping
We already do this for drawingML shapes since commit
500343105707a9905f5198a4af6ad58fe307b7c2 (DOCX drawingML shape import:
always set Opaque, 2013-12-04), make the VML / OLE case behave the same
as well.
(cherry picked from commit 15c3a08b8b1e8060f9659c7bc98480a39d1802c5)
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
Change-Id: Ic22f1f3cfd325ccbbb9bd6fe9814553683e4de55
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/OLEHandler.cxx | 10 | ||||
-rw-r--r-- | writerfilter/source/dmapper/OLEHandler.hxx | 4 |
3 files changed, 12 insertions, 4 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index a824f6e48518..eb0fb89f8f98 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -3467,7 +3467,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps(); if( pProperties.get( ) ) { - OLEHandlerPtr pOLEHandler( new OLEHandler ); + OLEHandlerPtr pOLEHandler( new OLEHandler(*this) ); pProperties->resolve(*pOLEHandler); if ( pOLEHandler->isOLEObject( ) ) { diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx index 44e4f4baf875..1ace46dbb3fa 100644 --- a/writerfilter/source/dmapper/OLEHandler.cxx +++ b/writerfilter/source/dmapper/OLEHandler.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include <OLEHandler.hxx> +#include <dmapper/DomainMapper.hxx> #include <PropertyMap.hxx> #include "GraphicHelpers.hxx" @@ -45,11 +46,12 @@ namespace dmapper { using namespace ::com::sun::star; -OLEHandler::OLEHandler() : +OLEHandler::OLEHandler(DomainMapper& rDomainMapper) : LoggedProperties(dmapper_logger, "OLEHandler"), m_nDxaOrig(0), m_nDyaOrig(0), - m_nWrapMode(1) + m_nWrapMode(1), + m_rDomainMapper(rDomainMapper) { } @@ -104,6 +106,10 @@ void OLEHandler::lcl_attribute(Id rName, Value & rVal) try { + // Shapes in the header or footer should be in the background. + if (m_rDomainMapper.IsInHeaderFooter()) + xShapeProps->setPropertyValue("Opaque", uno::makeAny(false)); + m_aShapeSize = xTempShape->getSize(); m_aShapePosition = xTempShape->getPosition(); diff --git a/writerfilter/source/dmapper/OLEHandler.hxx b/writerfilter/source/dmapper/OLEHandler.hxx index 63e920781982..d7106b19e279 100644 --- a/writerfilter/source/dmapper/OLEHandler.hxx +++ b/writerfilter/source/dmapper/OLEHandler.hxx @@ -41,6 +41,7 @@ namespace com{ namespace sun{ namespace star{ namespace writerfilter { namespace dmapper { +class DomainMapper; /** Handler for OLE objects */ class WRITERFILTER_DLLPRIVATE OLEHandler : public LoggedProperties @@ -64,13 +65,14 @@ class WRITERFILTER_DLLPRIVATE OLEHandler : public LoggedProperties ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > m_xReplacement; ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xInputStream; + DomainMapper& m_rDomainMapper; // Properties virtual void lcl_attribute(Id Name, Value & val); virtual void lcl_sprm(Sprm & sprm); public: - OLEHandler(); + OLEHandler(DomainMapper& rDomainMapper); virtual ~OLEHandler(); inline ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > getShape( ) { return m_xShape; }; |