include/xmloff/xmlexp.hxx                                  |    5 +--
 officecfg/registry/data/org/openoffice/Office/Common.xcu   |    5 ---
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |    8 -----
 sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx     |    6 ----
 sw/source/filter/xml/xmlexpit.cxx                          |   10 +------
 xmloff/source/core/xmlexp.cxx                              |   15 ----------
 xmloff/source/draw/animationexport.cxx                     |   18 ++-----------
 xmloff/source/draw/shapeexport.cxx                         |    8 +----
 xmloff/source/text/txtflde.cxx                             |    9 +-----
 9 files changed, 13 insertions(+), 71 deletions(-)

New commits:
commit d6c7fbe28aca170e804c4ebe7c1101bb3345c2c2
Author:     Michael Stahl <michael.st...@cib.de>
AuthorDate: Wed May 20 14:23:51 2020 +0200
Commit:     Michael Stahl <michael.st...@cib.de>
CommitDate: Fri May 22 11:17:45 2020 +0200

    [API CHANGE] officecfg,xmloff: remove SaveBackwardCompatibleODF
    
    org.openoffice.Office.Common.Save.Document.SaveBackwardCompatibleODF
    was added in 2007 and apparently enables storing invalid ODF (or OOoXML)
    to workaround bugs in OOo <= 2.3; nobody should need it in this day and
    age, and the OOoXML export has been removed anyway.
    
    bce5e157785745a6729db62b15fb98bc396cddee    2007
    c7a3859693971bf7103bfb0d05d64712e724fa37    2007
    7477a65e09b20917adf025550c550f8822b508ee    2007
    77baabe992c77018a0467ffec8f9482f8d76b66b    2007
    575222083e058a740f5ad69e14e18622c3d4f7af    2007
    66b908b45cde78af020b35e817e67bc40b8493f0    2007
    
    Change-Id: Ib3f730c7c9ac6fbbbbae9fb4a42c1bd65f6c93df
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94571
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@cib.de>

diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx
index f20409ad90c0..963bd3148cfc 100644
--- a/include/xmloff/xmlexp.hxx
+++ b/include/xmloff/xmlexp.hxx
@@ -98,13 +98,12 @@ enum class SvXMLExportFlags {
     FONTDECLS                = 0x0080,
     EMBEDDED                 = 0x0100,
     PRETTY                   = 0x0400,
-    SAVEBACKWARDCOMPATIBLE   = 0x0800,
     OASIS                    = 0x8000,
-    ALL                      = 0x0dff
+    ALL                      = 0x05ff
 };
 namespace o3tl
 {
-    template<> struct typed_flags<SvXMLExportFlags> : 
is_typed_flags<SvXMLExportFlags, 0x8dff> {};
+    template<> struct typed_flags<SvXMLExportFlags> : 
is_typed_flags<SvXMLExportFlags, 0x85ff> {};
 }
 
 class XMLOFF_DLLPUBLIC SvXMLExport : public cppu::WeakImplHelper<
diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu 
b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index c790dc874c6c..9fcf3d7bc0af 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -505,11 +505,6 @@
     </prop>
   </node>
   <node oor:name="Save">
-    <node oor:name="Document">
-      <prop oor:name="SaveBackwardCompatibleODF" oor:type="xs:boolean">
-        <value>false</value>
-      </prop>
-    </node>
     <node oor:name="ODF">
       <prop oor:name="DefaultVersion" oor:type="xs:short">
         <value>3</value>
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index bbd4b89c176c..71abd8a438cb 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -2374,14 +2374,6 @@
           </info>
           <value>false</value>
         </prop>
-        <prop oor:name="SaveBackwardCompatibleODF" oor:type="xs:boolean" 
oor:nillable="false">
-          <info>
-            <desc>If the  value is "true", then the ODF that is saved by
-            OpenOffice.org will be backward compatible to previous minor
-            versions.</desc>
-          </info>
-          <value>true</value>
-        </prop>
         <prop oor:name="LoadPrinter" oor:type="xs:boolean" 
oor:nillable="false">
           <!-- UIHints: Tools - Options - Load/Save - General - Load - Load
                printer settings with the document -->
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx 
b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
index 4502e7ec699f..1efca32d0efe 100644
--- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
@@ -169,12 +169,8 @@ void ScChangeTrackingExportHelper::WriteDepending(const 
ScChangeAction* pDependA
     sal_uInt32 nActionNumber(pDependAction->GetActionNumber());
     rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_ID, 
GetChangeID(nActionNumber));
 
-    // #i80033# save old "dependence" element if backward compatibility is 
requested,
-    // correct "dependency" element otherwise
-    const bool bSaveBackwardsCompatible = bool( rExport.getExportFlags() & 
SvXMLExportFlags::SAVEBACKWARDCOMPATIBLE );
     SvXMLElementExport aDependElem(rExport, XML_NAMESPACE_TABLE,
-        bSaveBackwardsCompatible ? XML_DEPENDENCE : XML_DEPENDENCY,
-        true, true);
+        XML_DEPENDENCY, true, true);
 }
 
 void ScChangeTrackingExportHelper::WriteDependings(const ScChangeAction* 
pAction)
diff --git a/sw/source/filter/xml/xmlexpit.cxx 
b/sw/source/filter/xml/xmlexpit.cxx
index 6e4a6913f7b0..bbb4e9830a97 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -104,7 +104,7 @@ void SvXMLExportItemMapper::exportXML( const SvXMLExport& 
rExport,
     }
 }
 
-void SvXMLExportItemMapper::exportXML( const SvXMLExport& rExport,
+void SvXMLExportItemMapper::exportXML(const SvXMLExport&,
                                  SvXMLAttributeList& rAttrList,
                                  const SfxPoolItem& rItem,
                                  const SvXMLItemMapEntry& rEntry,
@@ -120,13 +120,7 @@ void SvXMLExportItemMapper::exportXML( const SvXMLExport& 
rExport,
             bool bAddAttribute = true;
             if( rEntry.nNameSpace == XML_NAMESPACE_STYLE )
             {
-                if( !(rExport.getExportFlags() & 
SvXMLExportFlags::SAVEBACKWARDCOMPATIBLE ) ||
-                    !QueryXMLValue(rItem, aValue,
-                    static_cast< sal_uInt16 >( rEntry.nMemberId & 
MID_SW_FLAG_MASK ),
-                    rUnitConverter ) )
-                {
-                    bAddAttribute = false;
-                }
+                bAddAttribute = false;
             }
             else
             {
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 3d3e8d93f455..71a36957f9a5 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -256,7 +256,6 @@ public:
     OUString                                            msPackageURIScheme;
     // Written OpenDocument file format doesn't fit to the created text 
document (#i69627#)
     bool                                                
mbOutlineStyleAsNormalListStyle;
-    bool                                                
mbSaveBackwardCompatibleODF;
 
     uno::Reference< embed::XStorage >                   mxTargetStorage;
 
@@ -291,7 +290,6 @@ SvXMLExport_Impl::SvXMLExport_Impl()
 :    mxUriReferenceFactory( 
uri::UriReferenceFactory::create(comphelper::getProcessComponentContext()) ),
     // Written OpenDocument file format doesn't fit to the created text 
document (#i69627#)
     mbOutlineStyleAsNormalListStyle( false ),
-    mbSaveBackwardCompatibleODF( true ),
     mDepth( 0 ),
     mbExportTextNumberElement( false ),
     mbNullDateInitialized( false )
@@ -410,14 +408,6 @@ void SvXMLExport::InitCtor_()
 
     // Determine model type (#i51726#)
     DetermineModelType_();
-
-    // cl: but only if we do export to current oasis format, old openoffice 
format *must* always be compatible
-    if( getExportFlags() & SvXMLExportFlags::OASIS )
-    {
-        mpImpl->mbSaveBackwardCompatibleODF =
-            officecfg::Office::Common::Save::Document::
-            SaveBackwardCompatibleODF::get( 
comphelper::getProcessComponentContext() );
-    }
 }
 
 // Shapes in Writer cannot be named via context menu (#i51726#)
@@ -610,11 +600,6 @@ void SAL_CALL SvXMLExport::setSourceDocument( const 
uno::Reference< lang::XCompo
         }
     }
 
-    if ( mpImpl->mbSaveBackwardCompatibleODF )
-        mnExportFlags |= SvXMLExportFlags::SAVEBACKWARDCOMPATIBLE;
-    else
-        mnExportFlags &= ~SvXMLExportFlags::SAVEBACKWARDCOMPATIBLE;
-
     // namespaces for user defined attributes
     Reference< XMultiServiceFactory > xFactory( mxModel,    UNO_QUERY );
     if( xFactory.is() )
diff --git a/xmloff/source/draw/animationexport.cxx 
b/xmloff/source/draw/animationexport.cxx
index 62ac3818766b..7aa293e75716 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -1015,20 +1015,10 @@ void AnimationsExporterImpl::exportContainer( const 
Reference< XTimeContainer >&
             double fTemp = xIter->getIterateInterval();
             if( fTemp )
             {
-                if( !( mxExport->getExportFlags() & 
SvXMLExportFlags::SAVEBACKWARDCOMPATIBLE ) )
-                {
-                    // issue 146582
-                    OUStringBuffer buf;
-                    ::sax::Converter::convertDuration(buf, fTemp / (24*60*60));
-                    mxExport->AddAttribute( XML_NAMESPACE_ANIMATION,
-                            XML_ITERATE_INTERVAL, buf.makeStringAndClear());
-                }
-                else
-                {
-                    sTmp.append( fTemp );
-                    sTmp.append( 's' );
-                    mxExport->AddAttribute( XML_NAMESPACE_ANIMATION, 
XML_ITERATE_INTERVAL, sTmp.makeStringAndClear() );
-                }
+                OUStringBuffer buf;
+                ::sax::Converter::convertDuration(buf, fTemp / (24*60*60));
+                mxExport->AddAttribute( XML_NAMESPACE_ANIMATION,
+                        XML_ITERATE_INTERVAL, buf.makeStringAndClear());
             }
         }
 
diff --git a/xmloff/source/draw/shapeexport.cxx 
b/xmloff/source/draw/shapeexport.cxx
index 6d8aba12022e..aeb12d61c1c8 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2351,9 +2351,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
     SvXMLElementExport aElem( mrExport, XML_NAMESPACE_DRAW,
                               XML_FRAME, bCreateNewline, true );
 
-    const bool bSaveBackwardsCompatible = bool( mrExport.getExportFlags() & 
SvXMLExportFlags::SAVEBACKWARDCOMPATIBLE );
-
-    if (!bIsEmptyPresObj || bSaveBackwardsCompatible)
+    if (!bIsEmptyPresObj)
     {
         uno::Reference<graphic::XGraphic> xGraphic;
         OUString sOutMimeType;
@@ -2866,9 +2864,7 @@ void XMLShapeExport::ImpExportOLE2Shape(
     SvXMLElementExport aElement( mrExport, XML_NAMESPACE_DRAW,
                               XML_FRAME, bCreateNewline, true );
 
-    const bool bSaveBackwardsCompatible = bool( mrExport.getExportFlags() & 
SvXMLExportFlags::SAVEBACKWARDCOMPATIBLE );
-
-    if( !bIsEmptyPresObj || bSaveBackwardsCompatible )
+    if (!bIsEmptyPresObj)
     {
         if (pAttrList)
         {
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 396e05075788..20f92eca2640 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -1125,14 +1125,12 @@ void XMLTextFieldExport::ExportFieldHelper(
                       GetStringProperty(gsPropertyContent, rPropSet));
         bool bCmd = GetBoolProperty(gsPropertyIsShowFormula, rPropSet);
         ProcessDisplay(true, bCmd);
-        // #i81766# for older versions export of the value-type
-        bool bExportValueType = !bCmd && ( GetExport().getExportFlags() & 
SvXMLExportFlags::SAVEBACKWARDCOMPATIBLE );
         // show style, unless name will be shown
         ProcessValueAndType(IsStringField(nToken, rPropSet),
                             GetIntProperty(gsPropertyNumberFormat, rPropSet),
                             "", "", 0.0, // values not used
                             false,
-                            bExportValueType,
+                            false,
                             !bCmd,
                             ! GetOptionalBoolProperty(
                                  gsPropertyIsFixedLanguage,
@@ -1360,10 +1358,7 @@ void XMLTextFieldExport::ExportFieldHelper(
                       sPresentation);
         sal_Int32 nDummy = 0; // MapPageNumberName need int
         ProcessString(XML_SELECT_PAGE, MapPageNumberName(rPropSet, nDummy));
-        if( !( GetExport().getExportFlags() & 
SvXMLExportFlags::SAVEBACKWARDCOMPATIBLE ) )
-            ExportElement(XML_PAGE_CONTINUATION, sPresentation);
-        else
-            ExportElement(XML_PAGE_CONTINUATION_STRING, sPresentation);
+        ExportElement(XML_PAGE_CONTINUATION, sPresentation);
         break;
     }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to