summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2021-03-31 09:21:45 +0200
committerAndras Timar <andras.timar@collabora.com>2021-04-06 13:56:28 +0200
commit62f927465a51c9366789f870dc59faef4cd6b977 (patch)
treea1cd5b762932a7e8dd40f5dd3eea2b54249f1f5d /filter
parent17be30744b0d5528ac062b580d3e6bde23a1e313 (diff)
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_luth@sil.org> (cherry picked from commit a3c5c0f7ce73001adab7475fde1f8ffec4eef48b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113484 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/eschesdo.cxx20
-rw-r--r--filter/source/msfilter/eschesdo.hxx4
2 files changed, 12 insertions, 12 deletions
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index 24f47d62909f..4972bcaef6c6 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -421,8 +421,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"))
@@ -834,7 +834,7 @@ void ImplEESdrWriter::ImplInitPageValues()
}
void ImplEESdrWriter::ImplWritePage(
- EscherSolverContainer& rSolverContainer )
+ EscherSolverContainer& rSolverContainer, bool ooxmlExport )
{
ImplInitPageValues();
@@ -845,7 +845,7 @@ void ImplEESdrWriter::ImplWritePage(
mXShapes->getByIndex( n )) );
if( aObj.IsValid() )
{
- ImplWriteShape( aObj, rSolverContainer, true );
+ ImplWriteShape( aObj, rSolverContainer, ooxmlExport );
}
}
}
@@ -924,10 +924,10 @@ void ImplEESdrWriter::ImplFlushSolverContainer()
}
}
-void ImplEESdrWriter::ImplWriteCurrentPage()
+void ImplEESdrWriter::ImplWriteCurrentPage(bool ooxmlExport)
{
assert(mpSolverContainer && "ImplEESdrWriter::ImplWriteCurrentPage: no SolverContainer");
- ImplWritePage( *mpSolverContainer );
+ ImplWritePage( *mpSolverContainer, ooxmlExport );
ImplExitPage();
}
@@ -937,16 +937,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 fc1522c79dca..d2ea3d52b235 100644
--- a/filter/source/msfilter/eschesdo.hxx
+++ b/filter/source/msfilter/eschesdo.hxx
@@ -113,7 +113,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
@@ -133,7 +133,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();
};