diff options
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 11 | ||||
-rw-r--r-- | filter/source/msfilter/eschesdo.cxx | 14 | ||||
-rw-r--r-- | filter/source/msfilter/eschesdo.hxx | 4 | ||||
-rw-r--r-- | include/filter/msfilter/escherex.hxx | 8 | ||||
-rw-r--r-- | include/oox/export/vmlexport.hxx | 2 | ||||
-rw-r--r-- | oox/source/export/vmlexport.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 2 |
7 files changed, 25 insertions, 20 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 4f94859c0139..1f41f2bd9b20 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1429,7 +1429,7 @@ sal_Bool EscherPropertyContainer::CreateEmbeddedHatchProperties( const ::com::su sal_Bool EscherPropertyContainer::CreateGraphicProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet, const OUString& rSource, const sal_Bool bCreateFillBitmap, const sal_Bool bCreateCroppingAttributes, - const sal_Bool bFillBitmapModeAllowed ) + const sal_Bool bFillBitmapModeAllowed, const sal_Bool bOOxmlExport ) { sal_Bool bRetValue = sal_False; sal_Bool bCreateFillStyles = sal_False; @@ -1743,7 +1743,7 @@ sal_Bool EscherPropertyContainer::CreateGraphicProperties( SvMemoryStream aMemStrm; Rectangle aRect; - if ( aProvider.GetBlibID( aMemStrm, aUniqueId, aRect, NULL, pGraphicAttr ) ) + if ( aProvider.GetBlibID( aMemStrm, aUniqueId, aRect, NULL, pGraphicAttr, bOOxmlExport ) ) { // grab BLIP from stream and insert directly as complex property // ownership of stream memory goes to complex property @@ -4231,7 +4231,8 @@ sal_Bool EscherGraphicProvider::GetPrefSize( const sal_uInt32 nBlibId, Size& rPr } sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OString& rId, - const Rectangle& /* rBoundRect */, const com::sun::star::awt::Rectangle* pVisArea, const GraphicAttr* pGraphicAttr ) + const Rectangle& /* rBoundRect */, const com::sun::star::awt::Rectangle* pVisArea, + const GraphicAttr* pGraphicAttr, const sal_Bool bOOxmlExport ) { sal_uInt32 nBlibId = 0; GraphicObject aGraphicObject( rId ); @@ -4367,7 +4368,9 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin else if ( eBlibType == PEG ) rPicOutStrm << (sal_uInt16)0x0505; } - if ( ( eBlibType == PEG ) || ( eBlibType == PNG ) ) + // #69607 do not compress WMF files if we are in OOXML export + if ( ( eBlibType == PEG ) || ( eBlibType == PNG ) || + ( ( ( eBlibType == WMF ) || ( eBlibType == EMF ) ) && bOOxmlExport ) ) { nExtra = 17; p_EscherBlibEntry->mnSizeExtra = nExtra + 8; diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index ca78c698322f..16311df438e3 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -173,7 +173,7 @@ void ImplEESdrWriter::MapRect(ImplEESdrObject& /* rObj */ ) sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, EscherSolverContainer& rSolverContainer, - ImplEESdrPageType ePageType ) + ImplEESdrPageType ePageType, const sal_Bool bOOxmlExport ) { sal_uInt32 nShapeID = 0; sal_uInt16 nShapeType = 0; @@ -209,7 +209,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, ImplEESdrObject aObj( *this, *(Reference< XShape >*) xXIndexAccess->getByIndex( n ).getValue() ); if( aObj.IsValid() ) - ImplWriteShape( aObj, rSolverContainer, ePageType ); + ImplWriteShape( aObj, rSolverContainer, ePageType, bOOxmlExport ); } mpEscherEx->LeaveGroup(); } @@ -551,7 +551,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, else { ADD_SHAPE( ESCHER_ShpInst_PictureFrame, 0xa00 ); - if ( aPropOpt.CreateGraphicProperties( rObj.mXPropSet, "GraphicURL", sal_False, sal_True ) ) + if ( aPropOpt.CreateGraphicProperties( rObj.mXPropSet, "GraphicURL", sal_False, sal_True, sal_True, bOOxmlExport ) ) aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x800080 ); } } @@ -934,10 +934,10 @@ void ImplEscherExSdr::ImplWriteCurrentPage() } -sal_uInt32 ImplEscherExSdr::ImplWriteTheShape( ImplEESdrObject& rObj ) +sal_uInt32 ImplEscherExSdr::ImplWriteTheShape( ImplEESdrObject& rObj , bool ooxmlExport ) { DBG_ASSERT( mpSolverContainer, "ImplEscherExSdr::ImplWriteShape: no SolverContainer" ); - return ImplWriteShape( rObj, *mpSolverContainer, NORMAL ); + return ImplWriteShape( rObj, *mpSolverContainer, NORMAL, ooxmlExport ); } @@ -953,11 +953,11 @@ void EscherEx::AddUnoShapes( const Reference< XShapes >& rxShapes ) mpImplEscherExSdr->ImplWriteCurrentPage(); } -sal_uInt32 EscherEx::AddSdrObject( const SdrObject& rObj ) +sal_uInt32 EscherEx::AddSdrObject( const SdrObject& rObj, bool ooxmlExport ) { ImplEESdrObject aObj( *mpImplEscherExSdr, rObj, mbOOXML ); if( aObj.IsValid() ) - return mpImplEscherExSdr->ImplWriteTheShape( aObj ); + return mpImplEscherExSdr->ImplWriteTheShape( aObj, ooxmlExport ); return 0; } diff --git a/filter/source/msfilter/eschesdo.hxx b/filter/source/msfilter/eschesdo.hxx index 9d90e6a709e1..53f5705cb958 100644 --- a/filter/source/msfilter/eschesdo.hxx +++ b/filter/source/msfilter/eschesdo.hxx @@ -152,7 +152,7 @@ protected: sal_uInt32 ImplWriteShape( ImplEESdrObject& rObj, EscherSolverContainer& rSolver, - ImplEESdrPageType ePageType ); // returns ShapeID + ImplEESdrPageType ePageType, const sal_Bool bOOxmlExport = false ); // returns ShapeID void ImplFlipBoundingBox( ImplEESdrObject& rObj, EscherPropertyContainer& rPropOpt ); sal_Bool ImplGetText( ImplEESdrObject& rObj ); @@ -191,7 +191,7 @@ public: bool ImplInitUnoShapes( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes ); void ImplWriteCurrentPage(); - sal_uInt32 ImplWriteTheShape( ImplEESdrObject& rObj ); + sal_uInt32 ImplWriteTheShape( ImplEESdrObject& rObj, bool ooxmlExport = false ); void ImplExitPage(); void ImplFlushSolverContainer(); diff --git a/include/filter/msfilter/escherex.hxx b/include/filter/msfilter/escherex.hxx index 5cc33c6111d7..e24996cd9521 100644 --- a/include/filter/msfilter/escherex.hxx +++ b/include/filter/msfilter/escherex.hxx @@ -1095,7 +1095,8 @@ public: const OString& rGraphicId, const Rectangle& rBoundRect, const com::sun::star::awt::Rectangle* pVisArea = NULL, - const GraphicAttr* pGrafikAttr = NULL + const GraphicAttr* pGrafikAttr = NULL, + const sal_Bool ooxmlExport = false ); sal_Bool HasGraphics() const { return mnBlibEntrys != 0; }; @@ -1259,7 +1260,8 @@ public: const OUString& rSource, const sal_Bool bCreateFillBitmap, const sal_Bool bCreateCroppingAttributes = sal_False, - const sal_Bool bFillBitmapModeAllowed = sal_True + const sal_Bool bFillBitmapModeAllowed = sal_True, + const sal_Bool bOOxmlExport = false ); sal_Bool CreateBlipPropertiesforOLEControl( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape); @@ -1682,7 +1684,7 @@ public: void AddUnoShapes( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes ); /// returns the ShapeID - sal_uInt32 AddSdrObject( const SdrObject& rObj ); + sal_uInt32 AddSdrObject( const SdrObject& rObj, bool ooxmlExport = false ); /// If objects are written through AddSdrObject the /// SolverContainer has to be written, and maybe some diff --git a/include/oox/export/vmlexport.hxx b/include/oox/export/vmlexport.hxx index 8121e3bcca46..876ff7ba9b66 100644 --- a/include/oox/export/vmlexport.hxx +++ b/include/oox/export/vmlexport.hxx @@ -88,7 +88,7 @@ public: /// Call this when you need to export the object as VML. sal_uInt32 AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri = -1, sal_Int16 eVOri = -1, sal_Int16 eHRel = -1, - sal_Int16 eVRel = -1, const Point* pNdTopLeft = 0 ); + sal_Int16 eVRel = -1, const Point* pNdTopLeft = 0, const sal_Bool bOOxmlExport = false ); protected: /// Add an attribute to the generated <v:shape/> element. diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx index 842ad27e3d80..c594cd5cc2b3 100644 --- a/oox/source/export/vmlexport.cxx +++ b/oox/source/export/vmlexport.cxx @@ -1050,7 +1050,7 @@ void VMLExport::EndShape( sal_Int32 nShapeElement ) } } -sal_uInt32 VMLExport::AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri, sal_Int16 eVOri, sal_Int16 eHRel, sal_Int16 eVRel, const Point* pNdTopLeft ) +sal_uInt32 VMLExport::AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri, sal_Int16 eVOri, sal_Int16 eHRel, sal_Int16 eVRel, const Point* pNdTopLeft, const sal_Bool bOOxmlExport ) { m_pSdrObject = &rObj; m_eHOri = eHOri; @@ -1058,7 +1058,7 @@ sal_uInt32 VMLExport::AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri, sal_ m_eHRel = eHRel; m_eVRel = eVRel; m_pNdTopLeft = pNdTopLeft; - return EscherEx::AddSdrObject(rObj); + return EscherEx::AddSdrObject(rObj, bOOxmlExport); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index f4aefbba5880..68967175dc85 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -3490,7 +3490,7 @@ void DocxAttributeOutput::WriteVMLDrawing( const SdrObject* sdrObj, const SwFrmF m_rExport.VMLExporter().AddSdrObject( *(sdrObj), rHoriOri.GetHoriOrient(), rVertOri.GetVertOrient(), rHoriOri.GetRelationOrient(), - rVertOri.GetRelationOrient(), (&rNdTopLeft) ); + rVertOri.GetRelationOrient(), (&rNdTopLeft), true ); m_pSerializer->endElementNS( XML_w, XML_pict ); if ( bSwapInPage ) |