[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - chart2/source dbaccess/source reportdesign/source sc/source sd/source sfx2/source svx/source sw/source xmloff/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Mon Dec 21 17:42:50 UTC 2020
chart2/source/tools/AxisHelper.cxx | 4 -
chart2/source/tools/DiagramHelper.cxx | 4 -
dbaccess/source/core/dataaccess/databasedocument.cxx | 6 +-
reportdesign/source/filter/xml/xmlExport.cxx | 2
sc/source/filter/xml/XMLExportDataPilot.cxx | 14 ++--
sc/source/filter/xml/xmlexprt.cxx | 36 ++++++------
sd/source/ui/annotations/annotationmanager.cxx | 4 -
sfx2/source/dialog/filedlghelper.cxx | 2
sfx2/source/doc/objserv.cxx | 8 +-
sfx2/source/doc/objstor.cxx | 12 ++--
svx/source/xml/xmlgrhlp.cxx | 2
sw/source/core/doc/number.cxx | 8 +-
sw/source/filter/xml/xmlexp.cxx | 2
xmloff/source/chart/PropertyMaps.cxx | 10 +--
xmloff/source/chart/SchXMLExport.cxx | 56 +++++++++----------
xmloff/source/chart/SchXMLTools.cxx | 4 -
xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx | 4 -
xmloff/source/core/xmlexp.cxx | 32 +++++-----
xmloff/source/draw/sdpropls.cxx | 4 -
xmloff/source/draw/sdxmlexp.cxx | 6 +-
xmloff/source/draw/shapeexport.cxx | 16 ++---
xmloff/source/style/XMLPageExport.cxx | 4 -
xmloff/source/style/chrlohdl.cxx | 4 -
xmloff/source/style/styleexp.cxx | 2
xmloff/source/style/xmlexppr.cxx | 2
xmloff/source/style/xmlnume.cxx | 22 +++----
xmloff/source/style/xmlnumfe.cxx | 2
xmloff/source/text/XMLSectionExport.cxx | 10 +--
xmloff/source/text/txtflde.cxx | 16 ++---
xmloff/source/text/txtparae.cxx | 28 ++++-----
30 files changed, 163 insertions(+), 163 deletions(-)
New commits:
commit 88ac99d6afb1903c4f4a6a33b92fef461979703c
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Apr 21 18:57:52 2020 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Dec 21 18:42:11 2020 +0100
replace ODFDefaultVersion usage with ODFSaneDefaultVersion
Compare with ODFSVER_012 mostly works the same, except for places where
namespaces are defined where the ODFSVER_EXTENDED bit should be checked.
Conflicts:
sc/source/filter/xml/XMLExportDataPilot.cxx
xmloff/source/chart/SchXMLExport.cxx
Change-Id: I86469b763bc2f903632976bc9d6ec04d543d705e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108107
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx
index 25d481bff352..f3ededdaef34 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -1160,8 +1160,8 @@ Reference< XChartType > AxisHelper::getFirstChartTypeWithSeriesAttachedToAxisInd
bool AxisHelper::isAxisPositioningEnabled()
{
- const SvtSaveOptions::ODFDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFDefaultVersion() );
- return nCurrentVersion >= SvtSaveOptions::ODFVER_012;
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
+ return nCurrentVersion >= SvtSaveOptions::ODFSVER_012;
}
} //namespace chart
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index 14d8126625ae..59e7e8b7f725 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -1676,8 +1676,8 @@ bool DiagramHelper::switchDiagramPositioningToExcludingPositioning(
ChartModel& rModel, bool bResetModifiedState, bool bConvertAlsoFromAutoPositioning )
{
//return true if something was changed
- const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
- if( nCurrentODFVersion > SvtSaveOptions::ODFVER_012 )
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
+ if (SvtSaveOptions::ODFSVER_012 < nCurrentODFVersion)
{
uno::Reference< css::chart::XDiagramPositioning > xDiagramPositioning( rModel.getFirstDiagram(), uno::UNO_QUERY );
if( xDiagramPositioning.is() && ( bConvertAlsoFromAutoPositioning || !xDiagramPositioning->isAutomaticDiagramPositioning() )
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 554233d74f2a..9d4050736774 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -1672,11 +1672,11 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r
xProp->setPropertyValue( INFO_MEDIATYPE, makeAny( OUString(MIMETYPE_OASIS_OPENDOCUMENT_DATABASE_ASCII) ) );
OUString aVersion;
- SvtSaveOptions::ODFDefaultVersion const nDefVersion =
- aSaveOpt.GetODFDefaultVersion();
+ SvtSaveOptions::ODFSaneDefaultVersion const nDefVersion =
+ aSaveOpt.GetODFSaneDefaultVersion();
// older versions can not have this property set,
// it exists only starting from ODF1.2
- if (nDefVersion >= SvtSaveOptions::ODFVER_012)
+ if (nDefVersion >= SvtSaveOptions::ODFSVER_012)
aVersion = ODFVER_012_TEXT;
if (!aVersion.isEmpty())
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index 2f00950b265c..ea9909fe715f 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -243,7 +243,7 @@ ORptExport::ORptExport(const Reference< XComponentContext >& _rxContext, OUStrin
{
GetNamespaceMap_().Add( GetXMLToken(XML_NP_XHTML),GetXMLToken(XML_N_XHTML), XML_NAMESPACE_XHTML );
// loext, needed for paragraphs inside shapes
- if (getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
GetNamespaceMap_().Add(
GetXMLToken(XML_NP_LO_EXT), GetXMLToken(XML_N_LO_EXT),
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index fa88b9bd1966..48be7c33d907 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -432,7 +432,7 @@ void ScXMLExportDataPilot::WriteSubTotals(const ScDPSaveDimension* pDim)
{
sal_Int32 nSubTotalCount = pDim->GetSubTotalsCount();
boost::optional<OUString> pLayoutName;
- if (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (rExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
// Export display names only for 1.2 extended or later.
pLayoutName = pDim->GetSubtotalName();
@@ -464,7 +464,7 @@ void ScXMLExportDataPilot::WriteMembers(const ScDPSaveDimension* pDim)
{
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_NAME, rpMember->GetName());
- if (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (rExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
// Export display names only for ODF 1.2 extended or later.
const boost::optional<OUString> & pLayoutName = rpMember->GetLayoutName();
@@ -492,7 +492,7 @@ void ScXMLExportDataPilot::WriteLevels(const ScDPSaveDimension* pDim)
::sax::Converter::convertBool(sBuffer, pDim->GetShowEmpty());
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SHOW_EMPTY, sBuffer.makeStringAndClear());
}
- if (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (rExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
OUStringBuffer sBuffer;
::sax::Converter::convertBool(sBuffer, pDim->GetRepeatItemLabels());
@@ -675,7 +675,7 @@ void ScXMLExportDataPilot::WriteDimension(const ScDPSaveDimension* pDim, const S
{
OUString aSrcDimName = ScDPUtil::getSourceDimensionName(pDim->GetName());
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SOURCE_FIELD_NAME, aSrcDimName);
- if (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (rExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
// Export display names only for ODF 1.2 extended or later.
const boost::optional<OUString> & pLayoutName = pDim->GetLayoutName();
@@ -700,7 +700,7 @@ void ScXMLExportDataPilot::WriteDimension(const ScDPSaveDimension* pDim, const S
if (eOrientation == sheet::DataPilotFieldOrientation_PAGE)
{
- if (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (rExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
rExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_IGNORE_SELECTED_PAGE, "true");
}
@@ -813,7 +813,7 @@ void ScXMLExportDataPilot::WriteDataPilots()
// grand total elements.
const boost::optional<OUString> & pGrandTotalName = pDPSave->GetGrandTotalName();
- if (pGrandTotalName && rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (pGrandTotalName && rExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
// Use the new data-pilot-grand-total element.
if (bRowGrand && bColumnGrand)
@@ -832,7 +832,7 @@ void ScXMLExportDataPilot::WriteDataPilots()
{
const ScSheetSourceDesc* pSheetSource = (*pDPs)[i].GetSheetDesc();
- if (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (rExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
if (pSheetSource->HasRangeName())
rExport.AddAttribute(
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 2d16318bac7e..70ddf4de6e2d 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -1697,13 +1697,13 @@ void ScXMLExport::SetBodyAttributes()
if (!aBuffer.isEmpty())
{
AddAttribute(XML_NAMESPACE_TABLE, XML_PROTECTION_KEY, aBuffer.makeStringAndClear());
- if ( getDefaultVersion() >= SvtSaveOptions::ODFVER_012 )
+ if (getSaneDefaultVersion() >= SvtSaveOptions::ODFSVER_012)
{
if (eHashUsed == PASSHASH_XL)
{
AddAttribute(XML_NAMESPACE_TABLE, XML_PROTECTION_KEY_DIGEST_ALGORITHM,
ScPassHashHelper::getHashURI(PASSHASH_XL));
- if (getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
AddAttribute(XML_NAMESPACE_LO_EXT, XML_PROTECTION_KEY_DIGEST_ALGORITHM_2,
ScPassHashHelper::getHashURI(PASSHASH_SHA1));
}
@@ -2820,13 +2820,13 @@ void ScXMLExport::WriteTable(sal_Int32 nTable, const uno::Reference<sheet::XSpre
if (!aBuffer.isEmpty())
{
AddAttribute(XML_NAMESPACE_TABLE, XML_PROTECTION_KEY, aBuffer.makeStringAndClear());
- if ( getDefaultVersion() >= SvtSaveOptions::ODFVER_012 )
+ if (getSaneDefaultVersion() >= SvtSaveOptions::ODFSVER_012)
{
if (eHashUsed == PASSHASH_XL)
{
AddAttribute(XML_NAMESPACE_TABLE, XML_PROTECTION_KEY_DIGEST_ALGORITHM,
ScPassHashHelper::getHashURI(PASSHASH_XL));
- if (getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
AddAttribute(XML_NAMESPACE_LO_EXT, XML_PROTECTION_KEY_DIGEST_ALGORITHM_2,
ScPassHashHelper::getHashURI(PASSHASH_SHA1));
}
@@ -2855,7 +2855,7 @@ void ScXMLExport::WriteTable(sal_Int32 nTable, const uno::Reference<sheet::XSpre
AddAttribute( XML_NAMESPACE_TABLE, XML_PRINT, XML_FALSE);
SvXMLElementExport aElemT(*this, sElemTab, true, true);
- if (pProtect && pProtect->isProtected() && getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (pProtect && pProtect->isProtected() && getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
if (pProtect->isOptionEnabled(ScTableProtection::SELECT_LOCKED_CELLS))
AddAttribute(XML_NAMESPACE_LO_EXT, XML_SELECT_PROTECTED_CELLS, XML_TRUE);
@@ -2881,7 +2881,7 @@ void ScXMLExport::WriteTable(sal_Int32 nTable, const uno::Reference<sheet::XSpre
CheckAttrList();
if ( pDoc && pDoc->GetSheetEvents( static_cast<SCTAB>(nTable) ) &&
- getDefaultVersion() >= SvtSaveOptions::ODFVER_012 )
+ getSaneDefaultVersion() >= SvtSaveOptions::ODFSVER_012)
{
// store sheet events
uno::Reference<document::XEventsSupplier> xSupplier(xTable, uno::UNO_QUERY);
@@ -2977,7 +2977,7 @@ void ScXMLExport::WriteTable(sal_Int32 nTable, const uno::Reference<sheet::XSpre
WriteNamedRange(pRangeName);
}
- if(getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
//export new conditional format information
ExportConditionalFormat(nTable);
@@ -3134,7 +3134,7 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 nEqualCellCount)
{
GetNumberFormatAttributesExportHelper()->SetNumberFormatAttributes(
aCell.nNumberFormat, aCell.maBaseCell.mfValue);
- if( getDefaultVersion() > SvtSaveOptions::ODFVER_012 )
+ if (getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
GetNumberFormatAttributesExportHelper()->SetNumberFormatAttributes(
aCell.nNumberFormat, aCell.maBaseCell.mfValue, false, XML_NAMESPACE_CALC_EXT, false);
}
@@ -3145,7 +3145,7 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 nEqualCellCount)
OUString sCellString = aCell.maBaseCell.getString(pDoc);
GetNumberFormatAttributesExportHelper()->SetNumberFormatAttributes(
sCellString, sFormattedString);
- if( getDefaultVersion() > SvtSaveOptions::ODFVER_012 )
+ if (getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
GetNumberFormatAttributesExportHelper()->SetNumberFormatAttributes(
sCellString, sFormattedString, false, XML_NAMESPACE_CALC_EXT);
}
@@ -3181,7 +3181,7 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 nEqualCellCount)
{
AddAttribute(sAttrValueType, XML_STRING);
AddAttribute(sAttrStringValue, aCell.maBaseCell.getString(pDoc));
- if( getDefaultVersion() > SvtSaveOptions::ODFVER_012 )
+ if (getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
//export calcext:value-type="error"
AddAttribute(XML_NAMESPACE_CALC_EXT,XML_VALUE_TYPE, OUString("error"));
@@ -3196,7 +3196,7 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 nEqualCellCount)
{
GetNumberFormatAttributesExportHelper()->SetNumberFormatAttributes(
aCell.nNumberFormat, pDoc->GetValue(aCell.maCellAddress));
- if( getDefaultVersion() > SvtSaveOptions::ODFVER_012 )
+ if (getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
GetNumberFormatAttributesExportHelper()->SetNumberFormatAttributes(
aCell.nNumberFormat, pDoc->GetValue(aCell.maCellAddress), false, XML_NAMESPACE_CALC_EXT, false );
@@ -3209,7 +3209,7 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 nEqualCellCount)
{
AddAttribute(sAttrValueType, XML_STRING);
AddAttribute(sAttrStringValue, aCell.maBaseCell.getString(pDoc));
- if( getDefaultVersion() > SvtSaveOptions::ODFVER_012 )
+ if (getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
AddAttribute(XML_NAMESPACE_CALC_EXT,XML_VALUE_TYPE, XML_STRING);
}
@@ -3994,7 +3994,7 @@ void ScXMLExport::WriteExternalDataMapping()
if (!pDoc)
return;
- if (getDefaultVersion() <= SvtSaveOptions::ODFVER_012)
+ if (getSaneDefaultVersion() <= SvtSaveOptions::ODFSVER_012)
// Export this only for 1.2 extended and above.
return;
@@ -4327,7 +4327,7 @@ void ScXMLExport::WriteDataStream()
// Export this only in experimental mode.
return;
- if (getDefaultVersion() <= SvtSaveOptions::ODFVER_012)
+ if (getSaneDefaultVersion() <= SvtSaveOptions::ODFSVER_012)
// Export this only for 1.2 extended and above.
return;
@@ -5242,7 +5242,7 @@ ErrCode ScXMLExport::exportDoc( enum XMLTokenEnum eClass )
// sheet events use officeooo namespace
if( (getExportFlags() & SvXMLExportFlags::CONTENT) &&
- getDefaultVersion() >= SvtSaveOptions::ODFVER_012 )
+ getSaneDefaultVersion() >= SvtSaveOptions::ODFSVER_012)
{
bool bAnySheetEvents = false;
SCTAB nTabCount = pDoc->GetTableCount();
@@ -5276,12 +5276,12 @@ void SAL_CALL ScXMLExport::setSourceDocument( const uno::Reference<lang::XCompon
// Set the document's storage grammar corresponding to the ODF version that
// is to be written.
- SvtSaveOptions::ODFDefaultVersion meODFDefaultVersion = getDefaultVersion();
+ SvtSaveOptions::ODFSaneDefaultVersion meODFDefaultVersion = getSaneDefaultVersion();
switch (meODFDefaultVersion)
{
// ODF 1.0 and 1.1 use GRAM_PODF, everything later or unspecified GRAM_ODFF
- case SvtSaveOptions::ODFVER_010:
- case SvtSaveOptions::ODFVER_011:
+ case SvtSaveOptions::ODFSVER_010:
+ case SvtSaveOptions::ODFSVER_011:
pDoc->SetStorageGrammar( formula::FormulaGrammar::GRAM_PODF);
break;
default:
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 902bac125ce7..e15260ba081b 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -703,9 +703,9 @@ void AnnotationManagerImpl::GetAnnotationState(SfxItemSet& rSet)
const bool bReadOnly = mrBase.GetDocShell()->IsReadOnly();
const bool bWrongPageKind = (pCurrentPage == nullptr) || (pCurrentPage->GetPageKind() != PageKind::Standard);
- const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFSaneDefaultVersion() );
- if( bReadOnly || bWrongPageKind || (nCurrentODFVersion <= SvtSaveOptions::ODFVER_012) )
+ if (bReadOnly || bWrongPageKind || (nCurrentODFVersion <= SvtSaveOptions::ODFSVER_012))
rSet.DisableItem( SID_INSERT_POSTIT );
rSet.Put(SfxBoolItem(SID_TOGGLE_NOTES, mbShowAnnotations));
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 9063c33a09d1..59a983b27466 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -2681,7 +2681,7 @@ ErrCode RequestPassword(const std::shared_ptr<const SfxFilter>& pCurrentFilter,
OString const utf8Pwd(OUStringToOString(pPasswordRequest->getPassword(), RTL_TEXTENCODING_UTF8));
OString const utf8Ptm(OUStringToOString(pPasswordRequest->getPasswordToModify(), RTL_TEXTENCODING_UTF8));
if (!(52 <= utf8Pwd.getLength() && utf8Pwd.getLength() <= 55
- && SvtSaveOptions().GetODFDefaultVersion() < SvtSaveOptions::ODFVER_012)
+ && SvtSaveOptions().GetODFSaneDefaultVersion() < SvtSaveOptions::ODFSVER_012)
&& !(52 <= utf8Ptm.getLength() && utf8Ptm.getLength() <= 55))
{
break;
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index b7e8abdc823e..206efc5cf53d 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1746,7 +1746,7 @@ bool SfxObjectShell::PrepareForSigning(weld::Window* pDialogParent)
// the target ODF version on saving (only valid when signing ODF of course)
SvtSaveOptions aSaveOpt;
- SvtSaveOptions::ODFDefaultVersion nVersion = aSaveOpt.GetODFDefaultVersion();
+ SvtSaveOptions::ODFSaneDefaultVersion nVersion = aSaveOpt.GetODFSaneDefaultVersion();
// the document is not new and is not modified
OUString aODFVersion(comphelper::OStorageHelper::GetODFVersionFromStorage(GetStorage()));
@@ -1756,7 +1756,7 @@ bool SfxObjectShell::PrepareForSigning(weld::Window* pDialogParent)
{
// the document might need saving ( new, modified or in ODF1.1 format without signature )
- if ( nVersion >= SvtSaveOptions::ODFVER_012 )
+ if (nVersion >= SvtSaveOptions::ODFSVER_012)
{
OUString sQuestion(bHasSign ? SfxResId(STR_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN) : SfxResId(RID_SVXSTR_XMLSEC_QUERY_SAVEBEFORESIGN));
std::unique_ptr<weld::MessageDialog> xQuestion(Application::CreateMessageDialog(pDialogParent,
@@ -1928,7 +1928,7 @@ bool SfxObjectShell::SignDocumentContentUsingCertificate(const Reference<XCertif
// the target ODF version on saving (only valid when signing ODF of course)
SvtSaveOptions aSaveOpt;
- SvtSaveOptions::ODFDefaultVersion nVersion = aSaveOpt.GetODFDefaultVersion();
+ SvtSaveOptions::ODFSaneDefaultVersion nVersion = aSaveOpt.GetODFSaneDefaultVersion();
// the document is not new and is not modified
OUString aODFVersion(comphelper::OStorageHelper::GetODFVersionFromStorage(GetStorage()));
@@ -1936,7 +1936,7 @@ bool SfxObjectShell::SignDocumentContentUsingCertificate(const Reference<XCertif
if (IsModified() || !GetMedium() || GetMedium()->GetName().isEmpty()
|| (GetMedium()->GetFilter()->IsOwnFormat() && aODFVersion != ODFVER_012_TEXT && !bHasSign))
{
- if ( nVersion >= SvtSaveOptions::ODFVER_012 )
+ if (nVersion >= SvtSaveOptions::ODFSVER_012)
{
sal_uInt16 nId = SID_SAVEDOC;
if ( !GetMedium() || GetMedium()->GetName().isEmpty() )
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 9b5309eb6527..b8ed4797ff3a 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -337,11 +337,11 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto
const_cast<SfxObjectShell*>( this )->SetError(ERRCODE_IO_GENERAL);
}
- SvtSaveOptions::ODFDefaultVersion nDefVersion = SvtSaveOptions::ODFVER_012;
+ SvtSaveOptions::ODFSaneDefaultVersion nDefVersion = SvtSaveOptions::ODFSVER_012;
if (!utl::ConfigManager::IsFuzzing())
{
SvtSaveOptions aSaveOpt;
- nDefVersion = aSaveOpt.GetODFDefaultVersion();
+ nDefVersion = aSaveOpt.GetODFSaneDefaultVersion();
}
// the default values, that should be used for ODF1.1 and older formats
@@ -352,7 +352,7 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto
{ "ChecksumAlgorithm", css::uno::makeAny(xml::crypto::DigestID::SHA1_1K) }
};
- if ( nDefVersion >= SvtSaveOptions::ODFVER_012 )
+ if (nDefVersion >= SvtSaveOptions::ODFSVER_012)
{
try
{
@@ -1164,7 +1164,7 @@ bool SfxObjectShell::SaveTo_Impl
{
// check that the storage format stays the same
SvtSaveOptions aSaveOpt;
- SvtSaveOptions::ODFDefaultVersion nVersion = aSaveOpt.GetODFDefaultVersion();
+ SvtSaveOptions::ODFSaneDefaultVersion nVersion = aSaveOpt.GetODFSaneDefaultVersion();
OUString aODFVersion;
try
@@ -1185,8 +1185,8 @@ bool SfxObjectShell::SaveTo_Impl
// document, but technically this is not correct, so this prevents old
// signatures to be copied over to a version 1.2 document
bNoPreserveForOasis = (
- (aODFVersion == ODFVER_012_TEXT && nVersion < SvtSaveOptions::ODFVER_012) ||
- (aODFVersion.isEmpty() && nVersion >= SvtSaveOptions::ODFVER_012)
+ (aODFVersion == ODFVER_012_TEXT && nVersion < SvtSaveOptions::ODFSVER_012) ||
+ (aODFVersion.isEmpty() && nVersion >= SvtSaveOptions::ODFSVER_012)
);
}
}
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index a7e3a76edcc7..a4bdd60c97ac 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -663,7 +663,7 @@ OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::X
// into an svm. slight catch22 here, since strict ODF
// conformance _recommends_ svg - then again, most old
// ODF consumers are believed to be OOo
- if (SvtSaveOptions().GetODFDefaultVersion() <= SvtSaveOptions::ODFVER_012)
+ if (SvtSaveOptions().GetODFSaneDefaultVersion() <= SvtSaveOptions::ODFSVER_012)
{
bUseGfxLink = false;
aExtension = ".svm";
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index 37156ac40e83..f592be0c7d07 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -1477,15 +1477,15 @@ namespace numfunc
SvxNumberFormat::SvxNumPositionAndSpaceMode ePosAndSpaceMode;
SvtSaveOptions aSaveOptions;
- switch ( aSaveOptions.GetODFDefaultVersion() )
+ switch (aSaveOptions.GetODFSaneDefaultVersion())
{
- case SvtSaveOptions::ODFVER_010:
- case SvtSaveOptions::ODFVER_011:
+ case SvtSaveOptions::ODFSVER_010:
+ case SvtSaveOptions::ODFSVER_011:
{
ePosAndSpaceMode = SvxNumberFormat::LABEL_WIDTH_AND_POSITION;
}
break;
- default: // ODFVER_UNKNOWN or ODFVER_012
+ default: // >= ODFSVER_012
{
ePosAndSpaceMode = SvxNumberFormat::LABEL_ALIGNMENT;
}
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 28745ab2f023..366ee6547c5b 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -133,7 +133,7 @@ ErrCode SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
if( getExportFlags() & (SvXMLExportFlags::FONTDECLS|SvXMLExportFlags::STYLES|
SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT))
{
- if( getDefaultVersion() > SvtSaveOptions::ODFVER_012 )
+ if (getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
GetNamespaceMap_().Add(
GetXMLToken(XML_NP_OFFICE_EXT),
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index 521addbc1166..1538daff10b2 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -425,8 +425,8 @@ void XMLChartExportPropertyMapper::handleSpecialItem(
{
if( ( nValue & chart::ChartDataCaption::PERCENT ) == chart::ChartDataCaption::PERCENT )
{
- const SvtSaveOptions::ODFDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFDefaultVersion() );
- if( nCurrentVersion < SvtSaveOptions::ODFVER_012 )
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFSaneDefaultVersion() );
+ if (nCurrentVersion < SvtSaveOptions::ODFSVER_012)
sValueBuffer.append( GetXMLToken( XML_PERCENTAGE ));
else
sValueBuffer.append( GetXMLToken( XML_VALUE_AND_PERCENTAGE ));
@@ -477,7 +477,7 @@ void XMLChartExportPropertyMapper::handleSpecialItem(
break;
case XML_SCH_CONTEXT_SPECIAL_REGRESSION_TYPE:
{
- const SvtSaveOptions::ODFDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFDefaultVersion() );
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFSaneDefaultVersion() );
OUString aServiceName;
rProperty.maValue >>= aServiceName;
@@ -489,9 +489,9 @@ void XMLChartExportPropertyMapper::handleSpecialItem(
sValueBuffer.append( GetXMLToken( XML_EXPONENTIAL ));
else if (aServiceName == "com.sun.star.chart2.PotentialRegressionCurve")
sValueBuffer.append( GetXMLToken( XML_POWER ));
- else if (nCurrentVersion > SvtSaveOptions::ODFVER_012 && aServiceName == "com.sun.star.chart2.PolynomialRegressionCurve")
+ else if (nCurrentVersion > SvtSaveOptions::ODFSVER_012 && aServiceName == "com.sun.star.chart2.PolynomialRegressionCurve")
sValueBuffer.append( GetXMLToken( XML_POLYNOMIAL ));
- else if (nCurrentVersion > SvtSaveOptions::ODFVER_012 && aServiceName == "com.sun.star.chart2.MovingAverageRegressionCurve")
+ else if (nCurrentVersion > SvtSaveOptions::ODFSVER_012 && aServiceName == "com.sun.star.chart2.MovingAverageRegressionCurve")
sValueBuffer.append( GetXMLToken( XML_MOVING_AVERAGE ));
}
break;
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index efa8a6873973..b7046039e6b2 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -287,8 +287,8 @@ CustomLabelSeq lcl_getCustomLabelField(sal_Int32 nDataPointIndex,
if( !rSeries.is() )
return CustomLabelSeq();
- const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
- if( nCurrentODFVersion <= SvtSaveOptions::ODFVER_012 )//do not export to ODF 1.2 or older
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
+ if (nCurrentODFVersion <= SvtSaveOptions::ODFSVER_012) //do not export to ODF 1.2 or older
return CustomLabelSeq();
if(Reference<beans::XPropertySet> xLabels = rSeries->getDataPointByIndex(nDataPointIndex); xLabels.is())
@@ -1178,8 +1178,8 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >
if( bExportContent )
{
//export data provider in xlink:href attribute
- const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
- if( nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 )
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
+ if (nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012)
{
OUString aDataProviderURL( ".." );
if( xNewDoc->hasInternalDataProvider() )
@@ -1195,7 +1195,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >
}
Reference<chart2::data::XPivotTableDataProvider> xPivotTableDataProvider(xNewDoc->getDataProvider(), uno::UNO_QUERY);
- if (xPivotTableDataProvider.is() && nCurrentODFVersion > SvtSaveOptions::ODFVER_012)
+ if (xPivotTableDataProvider.is() && nCurrentODFVersion > SvtSaveOptions::ODFSVER_012)
{
OUString sPivotTableName = xPivotTableDataProvider->getPivotTableName();
mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_DATA_PILOT_SOURCE, sPivotTableName);
@@ -1368,8 +1368,8 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >
addPosition( xLegendShape );
// export legend size
- const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
- if( xLegendShape.is() && nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 )
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFSaneDefaultVersion() );
+ if( xLegendShape.is() && nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012 )
{
try
{
@@ -1384,7 +1384,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >
{
awt::Size aSize( xLegendShape->getSize() );
// tdf#131966: chart legend attributes width and height shouldn't be exported to ODF 1.2 (strict)
- if (nCurrentODFVersion > SvtSaveOptions::ODFVER_012)
+ if (nCurrentODFVersion > SvtSaveOptions::ODFSVER_012)
addSize( aSize, true );
OUStringBuffer aAspectRatioString;
::sax::Converter::convertDouble(
@@ -2070,8 +2070,8 @@ void SchXMLExportHelper_Impl::exportPlotArea(
void SchXMLExportHelper_Impl::exportCoordinateRegion( const uno::Reference< chart::XDiagram >& xDiagram )
{
- const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
- if( nCurrentODFVersion <= SvtSaveOptions::ODFVER_012 )//do not export to ODF 1.2 or older
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
+ if (nCurrentODFVersion <= SvtSaveOptions::ODFSVER_012) //do not export to ODF 1.2 or older
return;
Reference< chart::XDiagramPositioning > xDiaPos( xDiagram, uno::UNO_QUERY );
@@ -2190,8 +2190,8 @@ bool lcl_exportAxisType( const Reference< chart2::XAxis >& rChart2Axis, SvXMLExp
if( !rChart2Axis.is() )
return bExportDateScale;
- const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
- if( nCurrentODFVersion <= SvtSaveOptions::ODFVER_012 )//do not export to ODF 1.2 or older
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
+ if (nCurrentODFVersion <= SvtSaveOptions::ODFSVER_012) //do not export to ODF 1.2 or older
return bExportDateScale;
chart2::ScaleData aScale( rChart2Axis->getScaleData() );
@@ -2614,8 +2614,8 @@ void SchXMLExportHelper_Impl::exportSeries(
TOOLS_INFO_EXCEPTION("xmloff.chart", "Required property not found in DataRowProperties" );
}
- const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
- if( nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 )
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
+ if (nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012)
{
lcl_exportNumberFormat( "NumberFormat", xPropSet, mrExport );
lcl_exportNumberFormat( "PercentageNumberFormat", xPropSet, mrExport );
@@ -2647,8 +2647,8 @@ void SchXMLExportHelper_Impl::exportSeries(
// #i75297# allow empty series, export empty range to have all ranges on import
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, OUString());
- const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
- if( nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 )
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFSaneDefaultVersion() );
+ if( nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012 )
{
if (xPropSet.is())
{
@@ -2818,8 +2818,8 @@ void SchXMLExportHelper_Impl::exportSeries(
uno::Reference< beans::XPropertySet >( aSeriesSeq[nSeriesIdx], uno::UNO_QUERY ),
nSeriesLength, xNewDiagram, bExportContent );
- const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
- if( bExportContent && nCurrentODFVersion > SvtSaveOptions::ODFVER_012 )//do not export to ODF 1.2 or older
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
+ if (bExportContent && nCurrentODFVersion > SvtSaveOptions::ODFSVER_012) //do not export to ODF 1.2 or older
{
Sequence< OUString > aSupportedMappings = rChartType->getSupportedPropertyRoles();
exportPropertyMapping( xSource, aSupportedMappings );
@@ -2911,8 +2911,8 @@ void SchXMLExportHelper_Impl::exportRegressionCurve(
xEquationProperties->getPropertyValue( "ShowCorrelationCoefficient") >>= bShowRSquared;
bExportEquation = ( bShowEquation || bShowRSquared );
- const SvtSaveOptions::ODFDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFDefaultVersion() );
- if( nCurrentVersion < SvtSaveOptions::ODFVER_012 )
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
+ if (nCurrentVersion < SvtSaveOptions::ODFSVER_012)
{
bExportEquation=false;
}
@@ -2987,10 +2987,10 @@ void SchXMLExportHelper_Impl::exportErrorBar( const Reference<beans::XPropertySe
{
assert(mxExpPropMapper.is());
- const SvtSaveOptions::ODFDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFDefaultVersion() );
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
/// Don't export X ErrorBars for older ODF versions.
- if ( !bYError && nCurrentVersion < SvtSaveOptions::ODFVER_012 )
+ if (!bYError && nCurrentVersion < SvtSaveOptions::ODFSVER_012)
return;
if (xSeriesProp.is())
@@ -3045,7 +3045,7 @@ void SchXMLExportHelper_Impl::exportErrorBar( const Reference<beans::XPropertySe
// add style name attribute
AddAutoStyleAttribute( aPropertyStates );
- if( nCurrentVersion >= SvtSaveOptions::ODFVER_012 )
+ if (nCurrentVersion >= SvtSaveOptions::ODFSVER_012)
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_DIMENSION, bYError ? XML_Y : XML_X );//#i114149#
SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_ERROR_INDICATOR, true, true );
}
@@ -3249,8 +3249,8 @@ void SchXMLExportHelper_Impl::exportDataPoints(
SAL_WARN_IF( !xPropSet.is(), "xmloff.chart", "Pie Segments should have properties" );
if( xPropSet.is())
{
- const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
- if( nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 && bExportNumFmt )
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
+ if (nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012 && bExportNumFmt)
{
lcl_exportNumberFormat( "NumberFormat", xPropSet, mrExport );
lcl_exportNumberFormat( "PercentageNumberFormat", xPropSet, mrExport );
@@ -3311,8 +3311,8 @@ void SchXMLExportHelper_Impl::exportDataPoints(
}
if( xPropSet.is())
{
- const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
- if( nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 )
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
+ if (nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012)
{
lcl_exportNumberFormat( "NumberFormat", xPropSet, mrExport );
lcl_exportNumberFormat( "PercentageNumberFormat", xPropSet, mrExport );
@@ -3499,7 +3499,7 @@ SchXMLExport::SchXMLExport(const Reference<uno::XComponentContext>& xContext,
, maAutoStylePool(new SchXMLAutoStylePoolP(*this))
, maExportHelper(new SchXMLExportHelper(*this, *maAutoStylePool))
{
- if( getDefaultVersion() > SvtSaveOptions::ODFVER_012 )
+ if (getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
GetNamespaceMap_().Add( GetXMLToken(XML_NP_CHART_EXT), GetXMLToken(XML_N_CHART_EXT), XML_NAMESPACE_CHART_EXT);
}
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index 14eee9b365a0..f500ae82046a 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -609,8 +609,8 @@ void exportRangeToSomewhere( SvXMLExport& rExport, const OUString& rValue )
//#i113950# first the range was exported to attribute text:id, but that attribute does not allow arbitrary strings anymore within ODF 1.2
//as an alternative the range info is now saved into the description at an empty group element (not very nice, but ODF conform)
- const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
- if( nCurrentODFVersion == SvtSaveOptions::ODFVER_010 || nCurrentODFVersion == SvtSaveOptions::ODFVER_011 )
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
+ if (nCurrentODFVersion == SvtSaveOptions::ODFSVER_010 || nCurrentODFVersion == SvtSaveOptions::ODFSVER_011)
return;//svg:desc is not allowed at draw:g in ODF1.0; but as the ranges for error bars are anyhow not allowed within ODF1.0 nor ODF1.1 we do not need the information
SvXMLElementExport aEmptyShapeGroup( rExport, XML_NAMESPACE_DRAW,
diff --git a/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx b/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx
index 59fbc83c689a..0a14b506352a 100644
--- a/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx
+++ b/xmloff/source/chart/XMLErrorBarStylePropertyHdl.cxx
@@ -38,8 +38,8 @@ bool XMLErrorBarStylePropertyHdl::exportXML( OUString& rStrExpValue,
const uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const
{
uno::Any aValue(rValue);
- const SvtSaveOptions::ODFDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFDefaultVersion() );
- if( nCurrentVersion < SvtSaveOptions::ODFVER_012 )
+ const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion(SvtSaveOptions().GetODFSaneDefaultVersion());
+ if (nCurrentVersion < SvtSaveOptions::ODFSVER_012)
{
sal_Int32 nValue = 0;
if(rValue >>= nValue )
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index a314b6a39670..608c043f6117 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -344,7 +344,7 @@ void SvXMLExport::InitCtor_()
mpNamespaceMap->Add( GetXMLToken(XML_NP_OOOC), GetXMLToken(XML_N_OOOC), XML_NAMESPACE_OOOC );
mpNamespaceMap->Add( GetXMLToken(XML_NP_OF), GetXMLToken(XML_N_OF), XML_NAMESPACE_OF );
- if (getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
mpNamespaceMap->Add(
GetXMLToken(XML_NP_TABLE_EXT), GetXMLToken(XML_N_TABLE_EXT), XML_NAMESPACE_TABLE_EXT);
@@ -996,7 +996,7 @@ void SvXMLExport::AddLanguageTagAttributes( sal_uInt16 nPrefix, sal_uInt16 nPref
if (bWriteEmpty || !rLanguageTag.isSystemLocale())
{
AddAttribute( nPrefix, XML_LANGUAGE, rLanguageTag.getLanguage());
- if (rLanguageTag.hasScript() && getDefaultVersion() >= SvtSaveOptions::ODFVER_012)
+ if (rLanguageTag.hasScript() && getSaneDefaultVersion() >= SvtSaveOptions::ODFSVER_012)
AddAttribute( nPrefix, XML_SCRIPT, rLanguageTag.getScript());
if (bWriteEmpty || !rLanguageTag.getCountry().isEmpty())
AddAttribute( nPrefix, XML_COUNTRY, rLanguageTag.getCountry());
@@ -1004,7 +1004,7 @@ void SvXMLExport::AddLanguageTagAttributes( sal_uInt16 nPrefix, sal_uInt16 nPref
}
else
{
- if (getDefaultVersion() >= SvtSaveOptions::ODFVER_012)
+ if (getSaneDefaultVersion() >= SvtSaveOptions::ODFSVER_012)
AddAttribute( nPrefixRfc, XML_RFC_LANGUAGE_TAG, rLanguageTag.getBcp47());
// Also in case of non-pure-ISO tag store best matching fo: attributes
// for consumers not handling *:rfc-language-tag, ensuring that only
@@ -1015,7 +1015,7 @@ void SvXMLExport::AddLanguageTagAttributes( sal_uInt16 nPrefix, sal_uInt16 nPref
if (!aLanguage.isEmpty())
{
AddAttribute( nPrefix, XML_LANGUAGE, aLanguage);
- if (!aScript.isEmpty() && getDefaultVersion() >= SvtSaveOptions::ODFVER_012)
+ if (!aScript.isEmpty() && getSaneDefaultVersion() >= SvtSaveOptions::ODFSVER_012)
AddAttribute( nPrefix, XML_SCRIPT, aScript);
if (!aCountry.isEmpty())
AddAttribute( nPrefix, XML_COUNTRY, aCountry);
@@ -1194,9 +1194,9 @@ static void
lcl_AddGrddl(SvXMLExport const & rExport, const SvXMLExportFlags /*nExportMode*/)
{
// check version >= 1.2
- switch (rExport.getDefaultVersion()) {
- case SvtSaveOptions::ODFVER_011: // fall through
- case SvtSaveOptions::ODFVER_010: return;
+ switch (rExport.getSaneDefaultVersion()) {
+ case SvtSaveOptions::ODFSVER_011: // fall through
+ case SvtSaveOptions::ODFSVER_010: return;
default: break;
}
@@ -2313,9 +2313,9 @@ void
SvXMLExport::AddAttributeIdLegacy(
sal_uInt16 const nLegacyPrefix, OUString const& rValue)
{
- switch (getDefaultVersion()) {
- case SvtSaveOptions::ODFVER_011: // fall through
- case SvtSaveOptions::ODFVER_010: break;
+ switch (getSaneDefaultVersion()) {
+ case SvtSaveOptions::ODFSVER_011: // fall through
+ case SvtSaveOptions::ODFSVER_010: break;
default: // ODF 1.2: xml:id
AddAttribute(XML_NAMESPACE_XML, XML_ID, rValue);
}
@@ -2329,9 +2329,9 @@ void
SvXMLExport::AddAttributeXmlId(uno::Reference<uno::XInterface> const & i_xIfc)
{
// check version >= 1.2
- switch (getDefaultVersion()) {
- case SvtSaveOptions::ODFVER_011: // fall through
- case SvtSaveOptions::ODFVER_010: return;
+ switch (getSaneDefaultVersion()) {
+ case SvtSaveOptions::ODFSVER_011: // fall through
+ case SvtSaveOptions::ODFSVER_010: return;
default: break;
}
const uno::Reference<rdf::XMetadatable> xMeta(i_xIfc,
@@ -2380,9 +2380,9 @@ SvXMLExport::AddAttributesRDFa(
uno::Reference<text::XTextContent> const & i_xTextContent)
{
// check version >= 1.2
- switch (getDefaultVersion()) {
- case SvtSaveOptions::ODFVER_011: // fall through
- case SvtSaveOptions::ODFVER_010: return;
+ switch (getSaneDefaultVersion()) {
+ case SvtSaveOptions::ODFSVER_011: // fall through
+ case SvtSaveOptions::ODFSVER_010: return;
default: break;
}
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index 6a59ac6967e2..0b4f2cddc17e 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -1146,8 +1146,8 @@ const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nTy
if (mpExport
#if 1
// TODO: remove in a couple releases, when users have the import of style:shrink-to-fit
- && (mpExport->getDefaultVersion()
- <= SvtSaveOptions::ODFVER_012)
+ && (mpExport->getSaneDefaultVersion()
+ <= SvtSaveOptions::ODFSVER_012)
#endif
)
{
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 44c9afee02fd..4de4a36734c2 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -553,7 +553,7 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference< lang::XComponent
GetXMLToken(XML_N_ANIMATION),
XML_NAMESPACE_ANIMATION);
- if( getDefaultVersion() > SvtSaveOptions::ODFVER_012 )
+ if (getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
{
GetNamespaceMap_().Add(
GetXMLToken(XML_NP_OFFICE_EXT),
@@ -1996,7 +1996,7 @@ void SdXMLExport::ExportStyles_(bool bUsed)
GetShapeExport()->ExportGraphicDefaults();
// do not export in ODF 1.1 or older
- if( getDefaultVersion() >= SvtSaveOptions::ODFVER_012 )
+ if (getSaneDefaultVersion() >= SvtSaveOptions::ODFSVER_012)
GetShapeExport()->GetShapeTableExport()->exportTableStyles();
// write presentation styles
@@ -2500,7 +2500,7 @@ void SdXMLExport::collectAnnotationAutoStyles( const Reference<XDrawPage>& xDraw
void SdXMLExport::exportAnnotations( const Reference<XDrawPage>& xDrawPage )
{
// do not export in ODF 1.2 or older
- if( getDefaultVersion() <= SvtSaveOptions::ODFVER_012 )
+ if (getSaneDefaultVersion() <= SvtSaveOptions::ODFSVER_012)
return;
Reference< XAnnotationAccess > xAnnotationAccess( xDrawPage, UNO_QUERY );
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index ddd128d1d8b0..390202d2c3ed 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -728,7 +728,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
}
// export draw:display (do not export in ODF 1.2 or older)
- if( xSet.is() && ( mrExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) )
+ if (xSet.is() && (mrExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012))
{
if( aShapeInfo.meShapeType != XmlShapeTypeDrawPageShape && aShapeInfo.meShapeType != XmlShapeTypePresPageShape &&
aShapeInfo.meShapeType != XmlShapeTypeHandoutShape && aShapeInfo.meShapeType != XmlShapeTypeDrawChartShape )
@@ -1563,7 +1563,7 @@ void XMLShapeExport::ImpExportText( const uno::Reference< drawing::XShape >& xSh
{
if (eExtensionNS == TextPNS::EXTENSION)
{
- if (mrExport.getDefaultVersion() <= SvtSaveOptions::ODFVER_012)
+ if (mrExport.getSaneDefaultVersion() <= SvtSaveOptions::ODFSVER_012)
{
return; // do not export to ODF 1.1/1.2
}
@@ -2404,7 +2404,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
}
{
- if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
if (sOutMimeType.isEmpty())
{
@@ -2452,7 +2452,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
}
- if (!aMimeType.isEmpty() && GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (!aMimeType.isEmpty() && GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, "mime-type", aMimeType);
SvXMLElementExport aElement(mrExport, XML_NAMESPACE_DRAW, XML_IMAGE, true, true);
@@ -2471,7 +2471,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
ImpExportDescription( xShape ); // #i68101#
// Signature Line, QR Code - needs to be after the images!
- if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
ImpExportSignatureLine(xShape);
ImpExportQRCode(xShape);
@@ -4112,7 +4112,7 @@ static void ImpExportEnhancedPath( SvXMLExport& rExport,
}
aStr = aStrBuffer.makeStringAndClear();
rExport.AddAttribute( bExtended ? XML_NAMESPACE_DRAW_EXT : XML_NAMESPACE_DRAW, XML_ENHANCED_PATH, aStr );
- if ( !bExtended && bNeedExtended && (rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012) )
+ if (!bExtended && bNeedExtended && (rExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012))
ImpExportEnhancedPath( rExport, rCoordinates, rSegments, true );
}
@@ -4575,7 +4575,7 @@ static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Referenc
case EAS_SubViewSize:
{
// export draw:sub-view-size (do not export in ODF 1.2 or older)
- if (rExport.getDefaultVersion() <= SvtSaveOptions::ODFVER_012)
+ if (rExport.getSaneDefaultVersion() <= SvtSaveOptions::ODFSVER_012)
{
continue;
}
@@ -4831,7 +4831,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape
SvXMLElementExport aElement( mrExport, XML_NAMESPACE_DRAW, XML_FRAME, bCreateNewline, true );
// do not export in ODF 1.1 or older
- if( mrExport.getDefaultVersion() >= SvtSaveOptions::ODFVER_012 )
+ if (mrExport.getSaneDefaultVersion() >= SvtSaveOptions::ODFSVER_012)
{
if( !bIsEmptyPresObj )
{
diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx
index a9ec047d8f29..5b559e4d3b20 100644
--- a/xmloff/source/style/XMLPageExport.cxx
+++ b/xmloff/source/style/XMLPageExport.cxx
@@ -240,8 +240,8 @@ void XMLPageExport::exportDefaultStyle()
if( bExport )
{
- assert(GetExport().getDefaultVersion()
- >= SvtSaveOptions::ODFVER_012);
+ assert(GetExport().getSaneDefaultVersion()
+ >= SvtSaveOptions::ODFSVER_012);
//<style:default-page-layout>
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE,
diff --git a/xmloff/source/style/chrlohdl.cxx b/xmloff/source/style/chrlohdl.cxx
index c945b3f91d65..2834e519d122 100644
--- a/xmloff/source/style/chrlohdl.cxx
+++ b/xmloff/source/style/chrlohdl.cxx
@@ -233,7 +233,7 @@ bool XMLCharScriptHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue
if (!aLanguageTag.hasScript())
return false;
- if (SvtSaveOptions().GetODFDefaultVersion() < SvtSaveOptions::ODFVER_012)
+ if (SvtSaveOptions().GetODFSaneDefaultVersion() < SvtSaveOptions::ODFSVER_012)
return false;
OUString aLanguage, aCountry;
@@ -356,7 +356,7 @@ bool XMLCharRfcLanguageTagHdl::exportXML( OUString& rStrExpValue, const uno::Any
if (aLocale.Variant.isEmpty())
return false;
- if (SvtSaveOptions().GetODFDefaultVersion() < SvtSaveOptions::ODFVER_012)
+ if (SvtSaveOptions().GetODFSaneDefaultVersion() < SvtSaveOptions::ODFSVER_012)
return false;
rStrExpValue = aLocale.Variant;
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index d5569f633eec..ed07f7ca14d7 100644
--- a/xmloff/source/style/styleexp.cxx
+++ b/xmloff/source/style/styleexp.cxx
@@ -230,7 +230,7 @@ bool XMLStyleExport::exportStyle(
since ODF 1.2. Thus, suppress its export for former versions. (#i104889#)
*/
if ( ( GetExport().getExportFlags() & SvXMLExportFlags::OASIS ) &&
- GetExport().getDefaultVersion() >= SvtSaveOptions::ODFVER_012 )
+ GetExport().getSaneDefaultVersion() >= SvtSaveOptions::ODFSVER_012)
{
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
XML_DEFAULT_OUTLINE_LEVEL,
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index cd94fccae8dd..acae5a1ffa09 100644
--- a/xmloff/source/style/xmlexppr.cxx
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -789,7 +789,7 @@ void SvXMLExportPropertyMapper::exportXML(
aPropTokens[i].eToken == xmloff::token::XML_GRAPHIC_PROPERTIES)
{
nNamespace = XML_NAMESPACE_LO_EXT;
- if (rExport.getDefaultVersion() <= SvtSaveOptions::ODFVER_012)
+ if (rExport.getSaneDefaultVersion() <= SvtSaveOptions::ODFSVER_012)
{
continue; // don't write for ODF <= 1.2
}
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index 0f5a45dc40da..824fd6566c82 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -612,15 +612,15 @@ SvxXMLNumRuleExport::SvxXMLNumRuleExport( SvXMLExport& rExp ) :
// Let list style creation depend on Load/Save option "ODF format version" (#i89178#)
mbExportPositionAndSpaceModeLabelAlignment( true )
{
- switch ( GetExport().getDefaultVersion() )
+ switch (GetExport().getSaneDefaultVersion())
{
- case SvtSaveOptions::ODFVER_010:
- case SvtSaveOptions::ODFVER_011:
+ case SvtSaveOptions::ODFSVER_010:
+ case SvtSaveOptions::ODFSVER_011:
{
mbExportPositionAndSpaceModeLabelAlignment = false;
}
break;
- default: // ODFVER_UNKNOWN or ODFVER_012
+ default: // >= ODFSVER_012
{
mbExportPositionAndSpaceModeLabelAlignment = true;
}
@@ -734,18 +734,18 @@ void SvxXMLNumRuleExport::exportOutline()
xNumRulePropSet->getPropertyValue( sName ) >>= sOutlineStyleName;
}
}
- const SvtSaveOptions::ODFDefaultVersion nODFVersion =
- GetExport().getDefaultVersion();
- if ( ( nODFVersion == SvtSaveOptions::ODFVER_010 ||
- nODFVersion == SvtSaveOptions::ODFVER_011 ) &&
- GetExport().writeOutlineStyleAsNormalListStyle() )
+ const SvtSaveOptions::ODFSaneDefaultVersion nODFVersion =
+ GetExport().getSaneDefaultVersion();
+ if ((nODFVersion == SvtSaveOptions::ODFSVER_010 ||
+ nODFVersion == SvtSaveOptions::ODFSVER_011)
+ && GetExport().writeOutlineStyleAsNormalListStyle())
{
exportNumberingRule( sOutlineStyleName, false, xNumRule );
}
else
{
- if ( nODFVersion != SvtSaveOptions::ODFVER_010 &&
- nODFVersion != SvtSaveOptions::ODFVER_011 )
+ if (nODFVersion != SvtSaveOptions::ODFSVER_010 &&
+ nODFVersion != SvtSaveOptions::ODFSVER_011)
{
// style:name="..."
GetExport().CheckAttrList();
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index e5b367e1343e..69f09f555e38 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -1693,7 +1693,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
break;
case NF_SYMBOLTYPE_STAR :
// export only if ODF 1.2 extensions are enabled
- if( rExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012 )
+ if (rExport.getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
if ( pElemStr && pElemStr->getLength() > 1 )
WriteRepeatedElement_Impl( (*pElemStr)[1] );
diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx
index 2ae5b7520bde..62dd37f37a9f 100644
--- a/xmloff/source/text/XMLSectionExport.cxx
+++ b/xmloff/source/text/XMLSectionExport.cxx
@@ -398,7 +398,7 @@ void XMLSectionExport::ExportRegularSectionStart(
// in ODF 1.0/1.1 the algorithm was left unspecified so we can write anything
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_PROTECTION_KEY,
aBuffer.makeStringAndClear());
- if (aPassword.getLength() == 32 && GetExport().getDefaultVersion() >= SvtSaveOptions::ODFVER_012)
+ if (aPassword.getLength() == 32 && GetExport().getSaneDefaultVersion() >= SvtSaveOptions::ODFSVER_012)
{
// attribute exists in ODF 1.2 or later; default is SHA1 so no need to write that
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_PROTECTION_KEY_DIGEST_ALGORITHM,
@@ -1178,7 +1178,7 @@ void XMLSectionExport::ExportIndexTemplateElement(
bool bWithTabStopOK = false;
//i90246, the ODF version being written to is:
- const SvtSaveOptions::ODFDefaultVersion aODFVersion = rExport.getDefaultVersion();
+ const SvtSaveOptions::ODFSaneDefaultVersion aODFVersion = rExport.getSaneDefaultVersion();
//the above version cannot be used for old OOo (OOo 1.0) formats!
// token type
@@ -1308,7 +1308,7 @@ void XMLSectionExport::ExportIndexTemplateElement(
{
case TOK_TTYPE_HYPERLINK_START:
case TOK_TTYPE_HYPERLINK_END:
- if (SvtSaveOptions::ODFVER_012 < aODFVersion)
+ if (SvtSaveOptions::ODFSVER_012 < aODFVersion)
{
assert(eType == TEXT_SECTION_TYPE_ILLUSTRATION
|| eType == TEXT_SECTION_TYPE_OBJECT
@@ -1328,8 +1328,8 @@ void XMLSectionExport::ExportIndexTemplateElement(
//--->i90246
//check the ODF version being exported
- if( aODFVersion == SvtSaveOptions::ODFVER_011
- || aODFVersion == SvtSaveOptions::ODFVER_010)
+ if (aODFVersion == SvtSaveOptions::ODFSVER_011
+ || aODFVersion == SvtSaveOptions::ODFSVER_010)
{
bLevelOK = false;
if (TOK_TTYPE_CHAPTER_INFO == nTokenType)
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index a1c04371666f..76b08ddc61fe 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -1619,7 +1619,7 @@ void XMLTextFieldExport::ExportFieldHelper(
GetInt16Property(gsPropertySequenceNumber, rPropSet),
GetStringProperty(gsPropertySourceName, rPropSet) ) );
if (xPropSetInfo->hasPropertyByName(gsPropertyReferenceFieldLanguage) &&
- SvtSaveOptions().GetODFDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ SvtSaveOptions().GetODFSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
// export text:reference-language attribute, if not empty
ProcessString(XML_REFERENCE_LANGUAGE,
@@ -1641,7 +1641,7 @@ void XMLTextFieldExport::ExportFieldHelper(
ProcessString(XML_REF_NAME,
GetStringProperty(gsPropertySourceName, rPropSet));
if (xPropSetInfo->hasPropertyByName(gsPropertyReferenceFieldLanguage) &&
- SvtSaveOptions().GetODFDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ SvtSaveOptions().GetODFSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
// export text:reference-language attribute, if not empty
ProcessString(XML_REFERENCE_LANGUAGE,
@@ -1666,7 +1666,7 @@ void XMLTextFieldExport::ExportFieldHelper(
MakeFootnoteRefName(GetInt16Property(
gsPropertySequenceNumber, rPropSet)));
if (xPropSetInfo->hasPropertyByName(gsPropertyReferenceFieldLanguage) &&
- SvtSaveOptions().GetODFDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ SvtSaveOptions().GetODFSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
// export text:reference-language attribute, if not empty
ProcessString(XML_REFERENCE_LANGUAGE,
@@ -1694,7 +1694,7 @@ void XMLTextFieldExport::ExportFieldHelper(
case FIELD_ID_PAGENAME:
{
- if (SvtSaveOptions().GetODFDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (SvtSaveOptions().GetODFSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_LO_EXT, XML_PAGE_NAME, false, false );
GetExport().Characters( sPresentation );
@@ -1794,7 +1794,7 @@ void XMLTextFieldExport::ExportFieldHelper(
GetExport().Characters(aBuffer.makeStringAndClear());
}
- if (SvtSaveOptions().GetODFDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (SvtSaveOptions().GetODFSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
// initials
OUString aInitials( GetStringProperty(gsPropertyInitials, rPropSet) );
@@ -2312,9 +2312,9 @@ void XMLTextFieldExport::ExportMetaField(
{
bool doExport(!i_bAutoStyles); // do not export element if autostyles
// check version >= 1.2
- switch (GetExport().getDefaultVersion()) {
- case SvtSaveOptions::ODFVER_011: // fall through
- case SvtSaveOptions::ODFVER_010: doExport = false; break;
+ switch (GetExport().getSaneDefaultVersion()) {
+ case SvtSaveOptions::ODFSVER_011: // fall through
+ case SvtSaveOptions::ODFSVER_010: doExport = false; break;
default: break;
}
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 24b5a8f2cbae..c207d178618f 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -909,8 +909,8 @@ void XMLTextParagraphExport::exportListChange(
const bool bExportODF =
bool( GetExport().getExportFlags() & SvXMLExportFlags::OASIS );
- const SvtSaveOptions::ODFDefaultVersion eODFDefaultVersion =
- GetExport().getDefaultVersion();
+ const SvtSaveOptions::ODFSaneDefaultVersion eODFDefaultVersion =
+ GetExport().getSaneDefaultVersion();
// start a new list
if ( rNextInfo.GetLevel() > 0 )
@@ -951,7 +951,7 @@ void XMLTextParagraphExport::exportListChange(
if ( !mpTextListsHelper->IsListProcessed( sListId ) )
{
if ( bExportODF &&
- eODFDefaultVersion >= SvtSaveOptions::ODFVER_012 &&
+ eODFDefaultVersion >= SvtSaveOptions::ODFSVER_012 &&
!sListId.isEmpty() )
{
/* Property text:id at element <text:list> has to be
@@ -970,7 +970,7 @@ void XMLTextParagraphExport::exportListChange(
const OUString sNewListId(
mpTextListsHelper->GenerateNewListId() );
if ( bExportODF &&
- eODFDefaultVersion >= SvtSaveOptions::ODFVER_012 &&
+ eODFDefaultVersion >= SvtSaveOptions::ODFSVER_012 &&
!sListId.isEmpty() )
{
/* Property text:id at element <text:list> has to be
@@ -1001,7 +1001,7 @@ void XMLTextParagraphExport::exportListChange(
else
{
if ( bExportODF &&
- eODFDefaultVersion >= SvtSaveOptions::ODFVER_012 &&
+ eODFDefaultVersion >= SvtSaveOptions::ODFSVER_012 &&
!sListId.isEmpty() )
{
GetExport().AddAttribute( XML_NAMESPACE_TEXT,
@@ -1169,7 +1169,7 @@ void XMLTextParagraphExport::exportListChange(
aBuffer.makeStringAndClear() );
}
if ( ( GetExport().getExportFlags() & SvXMLExportFlags::OASIS ) &&
- GetExport().getDefaultVersion() >= SvtSaveOptions::ODFVER_012 )
+ GetExport().getSaneDefaultVersion() >= SvtSaveOptions::ODFSVER_012)
{
const OUString& sListStyleName( rNextInfo.GetNumRulesName() );
if ( !mpTextListsHelper->EqualsToTopListStyleOnStack( sListStyleName ) )
@@ -2231,7 +2231,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
/* As of now, textmarks are a proposed extension to the OpenDocument standard. */
if (!bAutoStyles)
{
- if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
Reference<XNamed> xBookmark(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY);
if (xBookmark.is())
@@ -2297,7 +2297,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
{
Reference< css::text::XFormField > xFormField(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY);
- if ( GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012 )
+ if (GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
SvXMLElementExport aElem( GetExport(), !bAutoStyles,
XML_NAMESPACE_FIELD, XML_FIELDMARK_END,
@@ -2333,7 +2333,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
{
if (!bAutoStyles)
{
- if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
Reference<XNamed> xBookmark(xPropSet->getPropertyValue(gsBookmark), UNO_QUERY);
if (xBookmark.is())
@@ -3147,7 +3147,7 @@ void XMLTextParagraphExport::_exportTextGraphic(
GetExport().AddAttribute( XML_NAMESPACE_DRAW, XML_FILTER_NAME,
sGrfFilter );
- if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
if (sOutMimeType.isEmpty())
{
@@ -3195,7 +3195,7 @@ void XMLTextParagraphExport::_exportTextGraphic(
GetExport().AddAttribute(XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD);
}
- if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012)
+ if (GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012)
{
if (sOutMimeType.isEmpty())
{
@@ -3778,9 +3778,9 @@ void XMLTextParagraphExport::exportMeta(
{
bool doExport(!i_bAutoStyles); // do not export element if autostyles
// check version >= 1.2
- switch (GetExport().getDefaultVersion()) {
- case SvtSaveOptions::ODFVER_011: // fall through
- case SvtSaveOptions::ODFVER_010: doExport = false; break;
+ switch (GetExport().getSaneDefaultVersion()) {
+ case SvtSaveOptions::ODFSVER_011: // fall through
+ case SvtSaveOptions::ODFSVER_010: doExport = false; break;
default: break;
}
More information about the Libreoffice-commits
mailing list