summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorSerge Krot <Serge.Krot@cib.de>2020-05-13 22:52:52 +0200
committerAndras Timar <andras.timar@collabora.com>2020-06-11 13:16:50 +0200
commit1c59f8f696e845705641e420013f62a3dc1ab07c (patch)
tree7ef55137017fa5e85b2130026c0f2c4b9bd3932b /filter
parent32da039326b6707ae4ad66300467b991f5880888 (diff)
tdf#106181 XLSX export: output form controls
Prepared general algorithm to ouput form controls into XLSX. For now only CHECKBOX is supported with a possibility to link withem to any worksheet/cell. Change-Id: Ide8739d81ffb755aeae074c4ebecf24251383e34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94161 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit fd238380ae7820f12ac1f7c52d0f7180a93f3ba3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94835
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/eschesdo.cxx23
1 files changed, 11 insertions, 12 deletions
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index b145cbef20c8..70212ea7c662 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -417,11 +417,16 @@ 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() && xPropInfo->hasPropertyByName("AnchorType") && bOOxmlExport)
+ if (xPropInfo.is())
{
- text::TextContentAnchorType eAnchorType;
- xPropSet->getPropertyValue("AnchorType") >>= eAnchorType;
- bool bInline = eAnchorType == text::TextContentAnchorType_AS_CHARACTER;
+ bool bInline = false;
+ if (xPropInfo->hasPropertyByName("AnchorType"))
+ {
+ text::TextContentAnchorType eAnchorType;
+ xPropSet->getPropertyValue("AnchorType") >>= eAnchorType;
+ bInline = eAnchorType == text::TextContentAnchorType_AS_CHARACTER;
+ }
+
mpEscherEx->OpenContainer( ESCHER_SpContainer );
if(bInline)
{
@@ -828,20 +833,14 @@ void ImplEESdrWriter::ImplWritePage(
{
ImplInitPageValues();
- sal_uInt32 nLastPer = 0, nShapes = mXShapes->getCount();
+ const sal_uInt32 nShapes = mXShapes->getCount();
for( sal_uInt32 n = 0; n < nShapes; ++n )
{
- sal_uInt32 nPer = ( 5 * n ) / nShapes;
- if( nPer != nLastPer )
- {
- nLastPer = nPer;
- }
-
ImplEESdrObject aObj( *this, *o3tl::doAccess<Reference<XShape>>(
mXShapes->getByIndex( n )) );
if( aObj.IsValid() )
{
- ImplWriteShape( aObj, rSolverContainer );
+ ImplWriteShape( aObj, rSolverContainer, true );
}
}
}