summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-05-10 16:41:54 +0200
committerAndras Timar <andras.timar@collabora.com>2021-05-21 13:31:47 +0200
commit80061a6f8265ae39fcf1d2e393fdbababb5456a4 (patch)
tree986c1cce889657fc5b91efd699784f87ebd650c0 /sc
parentc7404a537a0e59b7114095e2901c950f6f78f072 (diff)
tdf#138209 ODF export: work around forms problem in LO < 7.0
LO without commit 519d96fd8b83ef4c61576d87b58f97b7e6e6e3c6 makes a mess when storing form documents it has loaded from ODF 1.3 documents: the XML parts are stored as ODF 1.2, but the storage (and therefore manifest entry) keeps version 1.3. To avoid this, store form documents as ODF 1.2 extended by default. Unfortunately a bunch of ODF export code accesses the global SvtSaveOptions variable; with this version override, only SvXMLExport::getSaneDefaultVersion() must be used. Change-Id: I5fa8e286f5103c578ed0d93da07a8a6cbe2f0ddd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115357 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 16de54a5c47fbc4691ee099c1f7bb559a8fe11ac) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115390 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 71598827094e..0b060dc132e7 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -2001,7 +2001,7 @@ void ScXMLExport::AddStyleFromCells(const uno::Reference<beans::XPropertySet>& x
OUString sStyleName;
sal_Int32 nNumberFormat(-1);
sal_Int32 nValidationIndex(-1);
- std::vector< XMLPropertyState > aPropStates(xCellStylesExportPropertySetMapper->Filter( xProperties ));
+ std::vector<XMLPropertyState> aPropStates(xCellStylesExportPropertySetMapper->Filter(*this, xProperties));
std::vector< XMLPropertyState >::iterator aItr(aPropStates.begin());
std::vector< XMLPropertyState >::iterator aEndItr(aPropStates.end());
sal_Int32 nCount(0);
@@ -2135,7 +2135,7 @@ void ScXMLExport::AddStyleFromCells(const uno::Reference<beans::XPropertySet>& x
void ScXMLExport::AddStyleFromColumn(const uno::Reference<beans::XPropertySet>& xColumnProperties,
const OUString* pOldName, sal_Int32& rIndex, bool& rIsVisible)
{
- std::vector<XMLPropertyState> aPropStates(xColumnStylesExportPropertySetMapper->Filter(xColumnProperties));
+ std::vector<XMLPropertyState> aPropStates(xColumnStylesExportPropertySetMapper->Filter(*this, xColumnProperties));
if(aPropStates.empty())
return;
@@ -2172,7 +2172,7 @@ void ScXMLExport::AddStyleFromColumn(const uno::Reference<beans::XPropertySet>&
void ScXMLExport::AddStyleFromRow(const uno::Reference<beans::XPropertySet>& xRowProperties,
const OUString* pOldName, sal_Int32& rIndex)
{
- std::vector<XMLPropertyState> aPropStates(xRowStylesExportPropertySetMapper->Filter(xRowProperties));
+ std::vector<XMLPropertyState> aPropStates(xRowStylesExportPropertySetMapper->Filter(*this, xRowProperties));
if(aPropStates.empty())
return;
@@ -2320,7 +2320,7 @@ void ScXMLExport::collectAutoStyles()
uno::Reference<beans::XPropertySet> xTableProperties(xIndex->getByIndex(nTable), uno::UNO_QUERY);
if (xTableProperties.is())
{
- std::vector<XMLPropertyState> aPropStates(xTableStylesExportPropertySetMapper->Filter(xTableProperties));
+ std::vector<XMLPropertyState> aPropStates(xTableStylesExportPropertySetMapper->Filter(*this, xTableProperties));
OUString sName( rTableEntry.maName );
GetAutoStylePool()->AddNamed(sName, XmlStyleFamily::TABLE_TABLE, OUString(), aPropStates);
GetAutoStylePool()->RegisterName(XmlStyleFamily::TABLE_TABLE, sName);
@@ -2354,7 +2354,7 @@ void ScXMLExport::collectAutoStyles()
{
if ( !rNoteEntry.maStyleName.isEmpty() )
{
- std::vector<XMLPropertyState> aPropStates(xShapeMapper->Filter(xShapeProperties));
+ std::vector<XMLPropertyState> aPropStates(xShapeMapper->Filter(*this, xShapeProperties));
OUString sName( rNoteEntry.maStyleName );
GetAutoStylePool()->AddNamed(sName, XmlStyleFamily::SD_GRAPHICS_ID, OUString(), aPropStates);
GetAutoStylePool()->RegisterName(XmlStyleFamily::SD_GRAPHICS_ID, sName);
@@ -2362,7 +2362,7 @@ void ScXMLExport::collectAutoStyles()
if ( !rNoteEntry.maTextStyle.isEmpty() )
{
std::vector<XMLPropertyState> aPropStates(
- GetTextParagraphExport()->GetParagraphPropertyMapper()->Filter(xShapeProperties));
+ GetTextParagraphExport()->GetParagraphPropertyMapper()->Filter(*this, xShapeProperties));
OUString sName( rNoteEntry.maTextStyle );
GetAutoStylePool()->AddNamed(sName, XmlStyleFamily::TEXT_PARAGRAPH, OUString(), aPropStates);
GetAutoStylePool()->RegisterName(XmlStyleFamily::TEXT_PARAGRAPH, sName);
@@ -2394,7 +2394,7 @@ void ScXMLExport::collectAutoStyles()
lcl_GetEnumerated( xCellText, rNoteParaEntry.maSelection.nStartPara ), uno::UNO_QUERY );
if ( xParaProp.is() )
{
- std::vector<XMLPropertyState> aPropStates(xParaPropMapper->Filter(xParaProp));
+ std::vector<XMLPropertyState> aPropStates(xParaPropMapper->Filter(*this, xParaProp));
OUString sName( rNoteParaEntry.maName );
GetAutoStylePool()->AddNamed(sName, XmlStyleFamily::TEXT_PARAGRAPH, OUString(), aPropStates);
GetAutoStylePool()->RegisterName(XmlStyleFamily::TEXT_PARAGRAPH, sName);
@@ -2427,7 +2427,7 @@ void ScXMLExport::collectAutoStyles()
{
pCursor->SetSelection( rNoteTextEntry.maSelection );
- std::vector<XMLPropertyState> aPropStates(xTextPropMapper->Filter(xCursorProp));
+ std::vector<XMLPropertyState> aPropStates(xTextPropMapper->Filter(*this, xCursorProp));
OUString sName( rNoteTextEntry.maName );
GetAutoStylePool()->AddNamed(sName, XmlStyleFamily::TEXT_TEXT, OUString(), aPropStates);
GetAutoStylePool()->RegisterName(XmlStyleFamily::TEXT_TEXT, sName);
@@ -2468,7 +2468,7 @@ void ScXMLExport::collectAutoStyles()
continue;
pCursor->SetSelection( rTextEntry.maSelection );
- std::vector<XMLPropertyState> aPropStates(xTextPropMapper->Filter(xCursorProp));
+ std::vector<XMLPropertyState> aPropStates(xTextPropMapper->Filter(*this, xCursorProp));
OUString sName( rTextEntry.maName );
GetAutoStylePool()->AddNamed(sName, XmlStyleFamily::TEXT_TEXT, OUString(), aPropStates);
GetAutoStylePool()->RegisterName(XmlStyleFamily::TEXT_TEXT, sName);
@@ -2498,7 +2498,7 @@ void ScXMLExport::collectAutoStyles()
uno::Reference<beans::XPropertySet> xTableProperties(xTable, uno::UNO_QUERY);
if (xTableProperties.is())
{
- std::vector<XMLPropertyState> aPropStates(xTableStylesExportPropertySetMapper->Filter(xTableProperties));
+ std::vector<XMLPropertyState> aPropStates(xTableStylesExportPropertySetMapper->Filter(*this, xTableProperties));
if(!aPropStates.empty())
{
OUString sName;