[Libreoffice-commits] core.git: sw/source

Justin Luth (via logerrit) logerrit at kemper.freedesktop.org
Mon Sep 6 12:24:23 UTC 2021


 sw/source/filter/xml/xmlimp.cxx |   29 +----------------------------
 1 file changed, 1 insertion(+), 28 deletions(-)

New commits:
commit 328975ad14a8dbf5a86aacd0b0552b49b77746f4
Author:     Justin Luth <justin_luth at sil.org>
AuthorDate: Mon Sep 6 10:28:44 2021 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Sep 6 14:23:49 2021 +0200

    ODT xmlimport: No need to specify the default value for settings
    
    sw/source/core/doc/DocumentSettingManager.cxx initializes
    mbClippedPictures(false),
    mbUnbreakableNumberings(false),
    mbBackgroundParaOverDrawings(false),
    mbTabOverMargin(false),
    so no need to "force" these to false if the setting
    does not exist in the document.
    
    That's just confusing because this is in a section of variables
    that have adjusted LO's native behaviour over time.
    However, these settings are not a native behaviour change,
    just a Word compat change, which is solely handled
    in the doc/writerfilter import filters.
    
    Change-Id: I9fc0ec89c601fbe518ec1515c7091d7820dde4df
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121716
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index cf402e4f3ab6..7391ab83ebfb 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -769,7 +769,7 @@ void SwXMLImport::endDocument()
                     pPos->nContent.Assign( pNextNd, 0 );
                     pPaM->SetMark(); pPaM->DeleteMark();
                     pNextNd->JoinPrev();
-                    
+
                     // Remove line break that has been inserted by the import,
                     // but only if one has been inserted and
                     // no endNode found to avoid removing section
@@ -1307,10 +1307,6 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
     bool bUnixForceZeroExtLeading = false;
     bool bSmallCapsPercentage66 = false;
     bool bTabOverflow = false;
-    bool bUnbreakableNumberings = false;
-    bool bClippedPictures = false;
-    bool bBackgroundParaOverDrawings = false;
-    bool bTabOverMargin = false;
     bool bTabOverMarginValue = false;
     bool bPropLineSpacingShrinksFirstLine = false;
     bool bSubtractFlysAnchoredAtFlys = false;
@@ -1397,15 +1393,8 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
                     bSmallCapsPercentage66 = true;
                 else if ( rValue.Name == "TabOverflow" )
                     bTabOverflow = true;
-                else if ( rValue.Name == "UnbreakableNumberings" )
-                    bUnbreakableNumberings = true;
-                else if ( rValue.Name == "ClippedPictures" )
-                    bClippedPictures = true;
-                else if ( rValue.Name == "BackgroundParaOverDrawings" )
-                    bBackgroundParaOverDrawings = true;
                 else if ( rValue.Name == "TabOverMargin" )
                 {
-                    bTabOverMargin = true;
                     rValue.Value >>= bTabOverMarginValue;
                 }
                 else if ( rValue.Name == "PropLineSpacingShrinksFirstLine" )
@@ -1560,22 +1549,6 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
         xProps->setPropertyValue( "TabOverflow", makeAny( false ) );
     }
 
-    if ( !bUnbreakableNumberings )
-    {
-        xProps->setPropertyValue( "UnbreakableNumberings", makeAny( false ) );
-    }
-
-    if ( !bClippedPictures )
-    {
-        xProps->setPropertyValue( "ClippedPictures", makeAny( false ) );
-    }
-
-    if ( !bBackgroundParaOverDrawings )
-        xProps->setPropertyValue("BackgroundParaOverDrawings", makeAny( false ) );
-
-    if ( !bTabOverMargin )
-        xProps->setPropertyValue("TabOverMargin", makeAny( false ) );
-
     if (bTabOverMarginValue)
         // Let TabOverMargin imply the new default for
         // PrinterIndependentLayout, knowing the first is set by Word import


More information about the Libreoffice-commits mailing list