diff options
30 files changed, 170 insertions, 170 deletions
diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx index 6b5b43d0c891..c836d7646114 100644 --- a/chart2/source/tools/AxisHelper.cxx +++ b/chart2/source/tools/AxisHelper.cxx @@ -1161,8 +1161,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 5f5abd19c191..d9b1bf064cdf 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 922513a99e8d..ac21fa4c809f 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -1658,11 +1658,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 2d8a9dcc093a..a56333bc7775 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -236,7 +236,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 67d365cb2126..7a9a21758764 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(); std::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 std::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 std::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 std::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 c499552d3074..b60c4959ce7c 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -1701,13 +1701,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)); } @@ -2824,13 +2824,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)); } @@ -2859,7 +2859,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); @@ -2885,7 +2885,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); @@ -2981,7 +2981,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); @@ -3138,7 +3138,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); } @@ -3149,7 +3149,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); } @@ -3185,7 +3185,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")); @@ -3200,7 +3200,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 ); @@ -3213,7 +3213,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); } @@ -3998,7 +3998,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; @@ -4331,7 +4331,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; @@ -5246,7 +5246,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(); @@ -5280,12 +5280,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 b3b81b8c37ae..8cd867a89c1a 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -683,9 +683,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 4561ff07a8f9..7c4f73867d31 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -2674,7 +2674,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 7e29c9b7ded9..8212bc25241a 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -1615,7 +1615,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())); @@ -1625,7 +1625,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, @@ -1797,7 +1797,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())); @@ -1805,7 +1805,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 ff64c1491382..d86ace8bba4b 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -315,11 +315,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 @@ -330,7 +330,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 { @@ -1142,7 +1142,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 @@ -1163,8 +1163,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 e456900f78cf..18595a164d8d 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -657,7 +657,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 cfa140a58817..0c7810f058f4 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -1439,15 +1439,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 86892a84dc00..f966da56d26e 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -125,7 +125,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 c7adfe787f8a..bfa7ea8829d3 100644 --- a/xmloff/source/chart/PropertyMaps.cxx +++ b/xmloff/source/chart/PropertyMaps.cxx @@ -424,8 +424,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 )); @@ -476,7 +476,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; @@ -488,9 +488,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 c77f99beb1d9..49cd2dbb9945 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -285,8 +285,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()) @@ -307,8 +307,8 @@ css::chart2::RelativePosition lcl_getCustomLabelPosition(sal_Int32 nDataPointInd if (!rSeries.is()) return chart2::RelativePosition(); - 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 chart2::RelativePosition(); if (Reference<beans::XPropertySet> xLabels = rSeries->getDataPointByIndex(nDataPointIndex); xLabels.is()) @@ -1197,8 +1197,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() ) @@ -1214,7 +1214,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); @@ -1370,7 +1370,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument > Reference< beans::XPropertySet > xProp( rChartDoc->getLegend(), uno::UNO_QUERY ); if( xProp.is()) { - const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); // export legend anchor position try @@ -1387,7 +1387,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument > // export legend overlay try { - if (nCurrentODFVersion > SvtSaveOptions::ODFVER_012) + if (nCurrentODFVersion > SvtSaveOptions::ODFSVER_012) { Any aAny( xProp->getPropertyValue("Overlay")); if(aAny.get<bool>()) @@ -1404,7 +1404,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument > addPosition( xLegendShape ); // export legend size - if( xLegendShape.is() && nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 ) + if (xLegendShape.is() && nCurrentODFVersion >= SvtSaveOptions::ODFSVER_012) { try { @@ -1419,7 +1419,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( @@ -2105,8 +2105,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 ); @@ -2225,8 +2225,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() ); @@ -2298,8 +2298,8 @@ void SchXMLExportHelper_Impl::exportAxis( // get property states for autostyles if( rAxisProps.is() && mxExpPropMapper.is() ) { - const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFDefaultVersion()); - if (nCurrentODFVersion > SvtSaveOptions::ODFVER_012 && eDimension == XML_X) + const SvtSaveOptions::ODFSaneDefaultVersion nCurrentODFVersion(SvtSaveOptions().GetODFSaneDefaultVersion()); + if (nCurrentODFVersion > SvtSaveOptions::ODFSVER_012 && eDimension == XML_X) { chart2::ScaleData aScaleData(rChart2Axis->getScaleData()); bool bShiftedCatPos = aScaleData.ShiftedCategoryPosition; @@ -2664,8 +2664,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 ); @@ -2697,8 +2697,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 )//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 { if (xPropSet.is()) { @@ -2868,8 +2868,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 ); @@ -2961,8 +2961,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; } @@ -3037,10 +3037,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()) @@ -3095,7 +3095,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 ); } @@ -3251,8 +3251,8 @@ void SchXMLExportHelper_Impl::exportDataPoints( xSeriesProperties->getPropertyValue("AttributedDataPoints") >>= aDataPointSeq; xSeriesProperties->getPropertyValue("VaryColorsByPoint") >>= bVaryColorsByPoint; - 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 xSeriesProperties->getPropertyValue("DeletedLegendEntries") >>= deletedLegendEntriesSeq; } @@ -3304,8 +3304,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 ); @@ -3366,8 +3366,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 ); @@ -3588,7 +3588,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 6184fe2680c1..b22b7b58b5c4 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -353,7 +353,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); @@ -1005,7 +1005,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()); @@ -1013,7 +1013,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 @@ -1024,7 +1024,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); @@ -1203,9 +1203,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; } @@ -2322,9 +2322,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); } @@ -2338,9 +2338,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, @@ -2389,9 +2389,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 16c593b7a87b..fdeb89059d02 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.cxx @@ -1176,8 +1176,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 03c769cce1a4..2432d0756c07 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 370bfcf3e44f..f75e334a246c 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 } @@ -2408,7 +2408,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape( } { - if (GetExport().getDefaultVersion() > SvtSaveOptions::ODFVER_012) + if (GetExport().getSaneDefaultVersion() > SvtSaveOptions::ODFSVER_012) { if (sOutMimeType.isEmpty()) { @@ -2456,7 +2456,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); @@ -2475,7 +2475,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); @@ -4116,7 +4116,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 ); } @@ -4579,7 +4579,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; } @@ -4835,7 +4835,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 7db579e23608..7a07e732626d 100644 --- a/xmloff/source/style/XMLPageExport.cxx +++ b/xmloff/source/style/XMLPageExport.cxx @@ -241,8 +241,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 127526346695..32c8be5408e6 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -231,7 +231,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 cec29f36374c..80f90fdf9edb 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 eede84316e92..b6a99a179b4b 100644 --- a/xmloff/source/style/xmlnume.cxx +++ b/xmloff/source/style/xmlnume.cxx @@ -614,15 +614,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; } @@ -736,18 +736,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 680368de6a00..d17266d5f15a 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -1699,7 +1699,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 ff084a9185b0..e69e6e11487a 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -397,7 +397,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, @@ -1180,7 +1180,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 @@ -1310,7 +1310,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 @@ -1330,8 +1330,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 ca4cc01901d5..b6876a1e63c5 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 4aa66869a9f8..a3de06e07939 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -922,8 +922,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 ) @@ -964,7 +964,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 @@ -983,7 +983,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 @@ -1014,7 +1014,7 @@ void XMLTextParagraphExport::exportListChange( else { if ( bExportODF && - eODFDefaultVersion >= SvtSaveOptions::ODFVER_012 && + eODFDefaultVersion >= SvtSaveOptions::ODFSVER_012 && !sListId.isEmpty() ) { GetExport().AddAttribute( XML_NAMESPACE_TEXT, @@ -1182,7 +1182,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 ) ) @@ -2244,7 +2244,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()) @@ -2310,7 +2310,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, @@ -2346,7 +2346,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()) @@ -3160,7 +3160,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()) { @@ -3208,7 +3208,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()) { @@ -3785,9 +3785,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; } |