filter/source/msfilter/eschesdo.cxx | 20 ++++++++++---------- filter/source/msfilter/eschesdo.hxx | 4 ++-- include/filter/msfilter/escherex.hxx | 4 ++-- sc/source/filter/excel/xeescher.cxx | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-)
New commits: commit e5a17f9690cc775a84a4a7239179a1ad9c9cdf54 Author: Justin Luth <justin_l...@sil.org> AuthorDate: Wed Mar 31 09:21:45 2021 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Fri Apr 9 23:30:19 2021 +0200 tdf#139786 partial revert tdf#106181 XLSX export: output form controls Not every export is going to be to OOXML format, so don't just set ooxmlexport to true and remove the "if" clause (especially when leaving the comment that this is for DOCX only). This is a partial revert to 7.1 (and backported to 6.4.5) commit 577dd32b1c4eb0a4cff574fbabca987cb52b831b. Change-Id: If7ea32a236715ec779cac302773c4c9da19865a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113399 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_l...@sil.org> (cherry picked from commit a3c5c0f7ce73001adab7475fde1f8ffec4eef48b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113484 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> (cherry picked from commit 4d63b046679539c1e0f5a6f44e87c9420d679f5b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113640 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index 70212ea7c662..5939e975ced4 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -416,8 +416,8 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, { const Reference< XPropertySet > xPropSet = rObj.mXPropSet; const Reference<XPropertySetInfo> xPropInfo = xPropSet.is() ? xPropSet->getPropertySetInfo() : Reference<XPropertySetInfo>(); - // This code is expected to be called only for DOCX format. - if (xPropInfo.is()) + // This code is expected to be called only for DOCX/XLSX formats. + if (xPropInfo.is() && bOOxmlExport) { bool bInline = false; if (xPropInfo->hasPropertyByName("AnchorType")) @@ -829,7 +829,7 @@ void ImplEESdrWriter::ImplInitPageValues() } void ImplEESdrWriter::ImplWritePage( - EscherSolverContainer& rSolverContainer ) + EscherSolverContainer& rSolverContainer, bool ooxmlExport ) { ImplInitPageValues(); @@ -840,7 +840,7 @@ void ImplEESdrWriter::ImplWritePage( mXShapes->getByIndex( n )) ); if( aObj.IsValid() ) { - ImplWriteShape( aObj, rSolverContainer, true ); + ImplWriteShape( aObj, rSolverContainer, ooxmlExport ); } } } @@ -919,10 +919,10 @@ void ImplEESdrWriter::ImplFlushSolverContainer() } } -void ImplEESdrWriter::ImplWriteCurrentPage() +void ImplEESdrWriter::ImplWriteCurrentPage(bool ooxmlExport) { assert(mpSolverContainer && "ImplEESdrWriter::ImplWriteCurrentPage: no SolverContainer"); - ImplWritePage( *mpSolverContainer ); + ImplWritePage( *mpSolverContainer, ooxmlExport ); ImplExitPage(); } @@ -932,16 +932,16 @@ sal_uInt32 ImplEESdrWriter::ImplWriteTheShape( ImplEESdrObject& rObj , bool ooxm return ImplWriteShape( rObj, *mpSolverContainer, ooxmlExport ); } -void EscherEx::AddSdrPage( const SdrPage& rPage ) +void EscherEx::AddSdrPage( const SdrPage& rPage, bool ooxmlExport ) { if ( mpImplEESdrWriter->ImplInitPage( rPage ) ) - mpImplEESdrWriter->ImplWriteCurrentPage(); + mpImplEESdrWriter->ImplWriteCurrentPage(ooxmlExport); } -void EscherEx::AddUnoShapes( const Reference< XShapes >& rxShapes ) +void EscherEx::AddUnoShapes( const Reference< XShapes >& rxShapes, bool ooxmlExport ) { if ( mpImplEESdrWriter->ImplInitUnoShapes( rxShapes ) ) - mpImplEESdrWriter->ImplWriteCurrentPage(); + mpImplEESdrWriter->ImplWriteCurrentPage(ooxmlExport); } sal_uInt32 EscherEx::AddSdrObject( const SdrObject& rObj, bool ooxmlExport ) diff --git a/filter/source/msfilter/eschesdo.hxx b/filter/source/msfilter/eschesdo.hxx index 4602a320b557..c68895522200 100644 --- a/filter/source/msfilter/eschesdo.hxx +++ b/filter/source/msfilter/eschesdo.hxx @@ -116,7 +116,7 @@ class ImplEESdrWriter std::unique_ptr<EscherSolverContainer> mpSolverContainer; void ImplInitPageValues(); - void ImplWritePage( EscherSolverContainer& rSolver ); + void ImplWritePage( EscherSolverContainer& rSolver, bool ooxmlExport ); sal_uInt32 ImplWriteShape( ImplEESdrObject& rObj, EscherSolverContainer& rSolver, const bool bOOxmlExport = false ); // returns ShapeID @@ -136,7 +136,7 @@ public: EscherExHostAppData* ImplGetHostData() { return mpHostAppData; } bool ImplInitPage( const SdrPage& rPage ); bool ImplInitUnoShapes( const css::uno::Reference< css::drawing::XShapes >& rxShapes ); - void ImplWriteCurrentPage(); + void ImplWriteCurrentPage( bool ooxmlExport ); sal_uInt32 ImplWriteTheShape( ImplEESdrObject& rObj, bool ooxmlExport ); void ImplExitPage(); }; diff --git a/include/filter/msfilter/escherex.hxx b/include/filter/msfilter/escherex.hxx index 5a1bf293152c..1b111a252748 100644 --- a/include/filter/msfilter/escherex.hxx +++ b/include/filter/msfilter/escherex.hxx @@ -1159,8 +1159,8 @@ public: // ...Sdr... implemented in eschesdo.cxx - void AddSdrPage( const SdrPage& rPage ); - void AddUnoShapes( const css::uno::Reference< css::drawing::XShapes >& rxShapes ); + void AddSdrPage( const SdrPage& rPage, bool ooxmlExport = false ); + void AddUnoShapes( const css::uno::Reference< css::drawing::XShapes >& rxShapes, bool ooxmlExport = false ); /// returns the ShapeID sal_uInt32 AddSdrObject( const SdrObject& rObj, bool ooxmlExport = false ); diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index fc634e319549..86c4d1c5cde0 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -1803,7 +1803,7 @@ void XclExpObjectManager::StartSheet() std::shared_ptr< XclExpRecordBase > XclExpObjectManager::ProcessDrawing( const SdrPage* pSdrPage ) { if( pSdrPage ) - mxEscherEx->AddSdrPage( *pSdrPage ); + mxEscherEx->AddSdrPage( *pSdrPage, GetOutput() != EXC_OUTPUT_BINARY ); // the first dummy object may still be open OSL_ENSURE( mxEscherEx->GetGroupLevel() <= 1, "XclExpObjectManager::ProcessDrawing - still groups open?" ); while( mxEscherEx->GetGroupLevel() ) @@ -1815,7 +1815,7 @@ std::shared_ptr< XclExpRecordBase > XclExpObjectManager::ProcessDrawing( const S std::shared_ptr< XclExpRecordBase > XclExpObjectManager::ProcessDrawing( const Reference< XShapes >& rxShapes ) { if( rxShapes.is() ) - mxEscherEx->AddUnoShapes( rxShapes ); + mxEscherEx->AddUnoShapes( rxShapes, GetOutput() != EXC_OUTPUT_BINARY ); // the first dummy object may still be open OSL_ENSURE( mxEscherEx->GetGroupLevel() <= 1, "XclExpObjectManager::ProcessDrawing - still groups open?" ); while( mxEscherEx->GetGroupLevel() ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits