sw/qa/core/text/data/Broken indent demo.odt    |binary
 sw/qa/core/text/data/tdf156146.fodt            |  281 +++++++++++++++++++++++++
 sw/qa/core/text/text.cxx                       |   62 +++++
 sw/qa/extras/odfexport/odfexport2.cxx          |    6 
 sw/source/core/text/inftxt.hxx                 |    6 
 sw/source/core/text/itratr.hxx                 |    2 
 sw/source/core/text/itrtxt.hxx                 |    2 
 sw/source/filter/html/htmlctxt.cxx             |    3 
 xmloff/source/text/XMLTextListBlockContext.hxx |    1 
 xmloff/source/text/txtimp.cxx                  |   64 -----
 10 files changed, 355 insertions(+), 72 deletions(-)

New commits:
commit f0e6d005ab94e536461a4396f265f8850393c3c4
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Fri Apr 19 18:04:47 2024 +0200
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Thu May 2 01:20:06 2024 +0200

    tdf#114287 tdf#159366 xmloff: ODF import: revert text:list override
    
    This reverts commit ade0a153f453500f15343380ac937252992733e0 "tdf#114287
    xmloff: ODF import: fix text:list override of list style" and subsequent
    commits 7cf5faec6fdbc27dd77d2d36fb2ff205322cba0d and
    1b2a6b98291cf8b7022951be19b915fe2a9e18e6.
    
    It turns out that there is actually a paragraph in ODF 1.2 and later
    that gives paragraph's indent priority over the list style's, which i
    unfortunately missed when investigating the above issues:
    
      17.20  <style:list-level-label-alignment>
      ...
    
      The fo:text-indent and fo:margin-left attributes are evaluated only
      for paragraphs inside list items whose paragraph styles do not specify
      them. If one of the two properties, or both, are specified by the
      paragraph style, the text indent and/or left margin are taken from the
      paragraph style. In this case the paragraph style's properties are
      used to determine the indent and margin for the text lines and thus
      also the alignment position.
    
    This is usually interpreted as "on the same level", so applying a
    list-style at a paragraph style overrides the indents inherited from a
    parent paragraph style, but if the style then specifies its own indents
    that overrides the list style's indents.
    
    Furthermore it turns out that Google Docs now imports this bugdoc the
    same way as LO 7.5 does; unclear if that changed recently (it shows
    it like Word does in the preview, but like LO 7.5 does after opening it).
    
    This means the way MS Word imports the bugdoc, which remains unchanged,
    now looks like a bug and we should not change LO to be compatible with
    it (when the same structure is created in Word, storing to ODF and
    loading again, it looks different too).
    
    Change-Id: I0c65bde38de9e6fcbccec55899c60c3245adb5ba
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166309
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    Tested-by: Jenkins
    (cherry picked from commit 546741148863ae0b2a25cc994a7323c8113cb573)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166716
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/qa/extras/odfexport/odfexport2.cxx 
b/sw/qa/extras/odfexport/odfexport2.cxx
index 8654a494b4b3..53c32bdf4045 100644
--- a/sw/qa/extras/odfexport/odfexport2.cxx
+++ b/sw/qa/extras/odfexport/odfexport2.cxx
@@ -941,9 +941,9 @@ DECLARE_ODFEXPORT_TEST(testTdf114287, "tdf114287.odt")
     xmlDocUniquePtr pXmlDoc = parseLayoutDump();
     assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/infos/prtBounds"_ostr, 
"left"_ostr, "2268");
     assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/infos/prtBounds"_ostr, 
"right"_ostr, "11339");
-    // the problem was that the list style name of the list must override the
-    // paragraph style even though it's the same list style
-    assertXPath(pXmlDoc, "/root/page[1]/body/txt[9]/infos/prtBounds"_ostr, 
"left"_ostr, "357");
+    // the list style name of the list is the same as the list style name of 
the
+    // paragraph, but in any case the margins of the paragraph take precedence
+    assertXPath(pXmlDoc, "/root/page[1]/body/txt[9]/infos/prtBounds"_ostr, 
"left"_ostr, "2268");
     assertXPath(pXmlDoc, "/root/page[1]/body/txt[9]/infos/prtBounds"_ostr, 
"right"_ostr, "11339");
     assertXPath(pXmlDoc, "/root/page[1]/body/txt[16]/infos/prtBounds"_ostr, 
"left"_ostr, "357");
     assertXPath(pXmlDoc, "/root/page[1]/body/txt[16]/infos/prtBounds"_ostr, 
"right"_ostr, "11339");
diff --git a/xmloff/source/text/XMLTextListBlockContext.hxx 
b/xmloff/source/text/XMLTextListBlockContext.hxx
index 4b18d625cc36..a529afd1e476 100644
--- a/xmloff/source/text/XMLTextListBlockContext.hxx
+++ b/xmloff/source/text/XMLTextListBlockContext.hxx
@@ -66,7 +66,6 @@ public:
     void ResetRestartNumbering() { mbRestartNumbering = false; }
 
     /// does this list have (possibly inherited from parent) list-style-name?
-    bool HasListStyleName() { return !msListStyleName.isEmpty(); }
     const css::uno::Reference < css::container::XIndexReplace >& GetNumRules() 
const
         { return mxNumRules; }
 
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index d6e132323d34..56d21a5196f8 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -1004,45 +1004,6 @@ static bool lcl_HasListStyle( const OUString& sStyleName,
     return bRet;
 }
 
-namespace {
-
-auto IsPropertySet(uno::Reference<container::XNameContainer> const& 
rxParaStyles,
-        uno::Reference<beans::XPropertySet> const& rxPropSet,
-        OUString const& rProperty)
-{
-    uno::Reference<beans::XPropertyState> const xPropState(rxPropSet, 
uno::UNO_QUERY);
-    // note: this is true only if it is set in automatic style
-    if (xPropState->getPropertyState(rProperty) == 
beans::PropertyState_DIRECT_VALUE)
-    {
-        return true;
-    }
-    if (xPropState->getPropertyState("NumberingStyleName") == 
beans::PropertyState_DIRECT_VALUE)
-    {
-        return false; // tdf#159903 this overrides value in the parent style
-    }
-    // check if it is set by any parent common style
-    OUString style;
-    rxPropSet->getPropertyValue("ParaStyleName") >>= style;
-    while (!style.isEmpty() && rxParaStyles.is() && 
rxParaStyles->hasByName(style))
-    {
-        uno::Reference<style::XStyle> const 
xStyle(rxParaStyles->getByName(style), uno::UNO_QUERY);
-        assert(xStyle.is());
-        uno::Reference<beans::XPropertyState> const xStyleProps(xStyle, 
uno::UNO_QUERY);
-        if (xStyleProps->getPropertyState(rProperty) == 
beans::PropertyState_DIRECT_VALUE)
-        {
-            return true;
-        }
-        if (xStyleProps->getPropertyState("NumberingStyleName") == 
beans::PropertyState_DIRECT_VALUE)
-        {
-            return false; // tdf#159903 this overrides value in the parent 
style
-        }
-        style = xStyle->getParentStyle();
-    }
-    return false;
-};
-
-} // namespace
-
 OUString XMLTextImportHelper::SetStyleAndAttrs(
         SvXMLImport & rImport,
         const Reference < XTextCursor >& rCursor,
@@ -1126,17 +1087,8 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
         bool bNumberingIsNumber(true);
         // Assure that list style of automatic paragraph style is applied at 
paragraph. (#i101349#)
         bool bApplyNumRules(pStyle && pStyle->IsListStyleSet());
-        bool bApplyNumRulesFix(false);
 
         if (pListBlock) {
-            // the xNumRules is always created, even without a list-style-name
-            if (!bApplyNumRules
-                && (pListBlock->HasListStyleName()
-                    || (pListItem != nullptr && 
pListItem->HasNumRulesOverride())))
-            {
-                bApplyNumRules = true; // tdf#114287
-                bApplyNumRulesFix = 
rImport.isGeneratorVersionOlderThan(SvXMLImport::AOO_4x, SvXMLImport::LO_76);
-            }
 
             if (!pListItem) {
                 bNumberingIsNumber = false; // list-header
@@ -1168,7 +1120,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
 
         if (pListBlock || pNumberedParagraph)
         {
-            if (!bApplyNumRules || bApplyNumRulesFix)
+            if (!bApplyNumRules)
             {
                 bool bSameNumRules = xNewNumRules == xNumRules;
                 if( !bSameNumRules && xNewNumRules.is() && xNumRules.is() )
@@ -1192,14 +1144,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
                         }
                     }
                 }
-                if (!bApplyNumRules)
-                {
-                    bApplyNumRules = !bSameNumRules;
-                }
-                if (!bSameNumRules)
-                {
-                    bApplyNumRulesFix = false;
-                }
+                bApplyNumRules = !bSameNumRules;
             }
 
             if ( bApplyNumRules )
@@ -1213,19 +1158,6 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
                 {
                     xPropSet->setPropertyValue(
                         s_NumberingRules, Any(xNewNumRules) );
-                    if (bApplyNumRulesFix)
-                    {   // tdf#156146 override list margins for bug 
compatibility
-                        if (IsPropertySet(m_xImpl->m_xParaStyles, xPropSet, 
"ParaLeftMargin"))
-                        {
-                            uno::Any const 
left(xPropSet->getPropertyValue("ParaLeftMargin"));
-                            xPropSet->setPropertyValue("ParaLeftMargin", left);
-                        }
-                        if (IsPropertySet(m_xImpl->m_xParaStyles, xPropSet, 
"ParaFirstLineIndent"))
-                        {
-                            uno::Any const 
first(xPropSet->getPropertyValue("ParaFirstLineIndent"));
-                            xPropSet->setPropertyValue("ParaFirstLineIndent", 
first);
-                        }
-                    }
                 }
                 catch(const Exception&)
                 {
commit ab99df7044f9faa77cf0ed0d1241643e38aab6f5
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Thu Apr 18 18:23:29 2024 +0200
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Thu May 2 01:19:55 2024 +0200

    tdf#156146 tdf#159903 sw: add unit tests
    
    Unfortunately the actual computed margins are not stored in text
    formatting data structures so are only available directly from
    SwTextMargin.
    
    Change-Id: Ia7ce5e148194a55b5d9874ed112aaa977ed16c7b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166258
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    (cherry picked from commit 0c7ae3bd96130eaa400d55a3ba9bf1e2fe6600de)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166221
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/sw/qa/core/text/data/Broken indent demo.odt 
b/sw/qa/core/text/data/Broken indent demo.odt
new file mode 100644
index 000000000000..af5928bfa556
Binary files /dev/null and b/sw/qa/core/text/data/Broken indent demo.odt differ
diff --git a/sw/qa/core/text/data/tdf156146.fodt 
b/sw/qa/core/text/data/tdf156146.fodt
new file mode 100644
index 000000000000..1587cd945e49
--- /dev/null
+++ b/sw/qa/core/text/data/tdf156146.fodt
@@ -0,0 +1,281 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<office:document xmlns:css3t="http://www.w3.org/TR/css3-text/"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; xmlns:c
 alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:officeooo="http://openoffice.org/2009/office"; 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:
 meta:1.0" 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ 
<office:meta><meta:creation-date>2023-06-14T01:10:01.497511077</meta:creation-date><dc:date>2024-04-18T18:00:26.359273842</dc:date><meta:editing-duration>PT14M47S</meta:editing-duration><meta:editing-cycles>2</meta:editing-cycles><meta:generator>ZetaOffice/7.4.8.0.0$Linux_X86_64
 
LibreOffice_project/b82f1163cc2fc696cf86209d94d838d04998350f</meta:generator><meta:document-statistic
 meta:table-count="0" meta:image-count="0" meta:object-count="0" 
meta:page-count="1" meta:paragraph-count="1" meta:word-count="154" 
meta:character-count="806" 
meta:non-whitespace-character-count="653"/></office:meta>
+ <office:settings>
+  <config:config-item-set config:name="ooo:configuration-settings">
+   <config:config-item config:name="PrintProspect" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrintReversed" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrintSingleJobs" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrintLeftPages" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="PrintTables" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="PrintControls" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="PrintPageBackground" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="PrintDrawings" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="PrintBlackFonts" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrintAnnotationMode" 
config:type="short">0</config:config-item>
+   <config:config-item config:name="PrintTextPlaceholder" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="ProtectFields" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="ProtectBookmarks" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="EmptyDbFieldHidesPara" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="DisableOffPagePositioning" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="SubtractFlysAnchoredAtFlys" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PropLineSpacingShrinksFirstLine" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="ApplyParagraphMarkFormatToNumbering" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="GutterAtTop" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="EmbedSystemFonts" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="EmbedComplexScriptFonts" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="EmbedAsianScriptFonts" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="EmbedLatinScriptFonts" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="EmbedOnlyUsedFonts" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="WordLikeWrapForAsCharFlys" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="ContinuousEndnotes" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="EmbedFonts" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="ClippedPictures" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="FloattableNomargins" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="UnbreakableNumberings" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="HeaderSpacingBelowLastPara" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="AllowPrintJobCancel" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="UseOldPrinterMetrics" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="TabOverMargin" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="TabsRelativeToIndent" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="UseOldNumbering" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="InvertBorderSpacing" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrintPaperFromSetup" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="UpdateFromTemplate" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="CurrentDatabaseCommandType" 
config:type="int">0</config:config-item>
+   <config:config-item config:name="LinkUpdateMode" 
config:type="short">1</config:config-item>
+   <config:config-item config:name="AddParaSpacingToTableCells" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="FrameAutowidthWithMorePara" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="CurrentDatabaseCommand" 
config:type="string"/>
+   <config:config-item config:name="PrinterIndependentLayout" 
config:type="string">high-resolution</config:config-item>
+   <config:config-item config:name="ApplyUserData" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="PrintFaxName" config:type="string"/>
+   <config:config-item config:name="CurrentDatabaseDataSource" 
config:type="string"/>
+   <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="IsKernAsianPunctuation" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="SaveThumbnail" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="UseFormerTextWrapping" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="AutoFirstLineIndentDisregardLineSpace" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="AddExternalLeading" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="AddParaTableSpacing" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="StylesNoDefault" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="ChartAutoUpdate" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+   <config:config-item config:name="AddParaTableSpacingAtStart" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="Rsid" 
config:type="int">910346</config:config-item>
+   <config:config-item config:name="EmbeddedDatabaseName" 
config:type="string"/>
+   <config:config-item config:name="FieldAutoUpdate" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="OutlineLevelYieldsNumbering" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="FootnoteInColumnToPageEnd" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="AlignTabStopPosition" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="CharacterCompressionType" 
config:type="short">0</config:config-item>
+   <config:config-item config:name="PrinterName" config:type="string"/>
+   <config:config-item config:name="SaveGlobalDocumentLinks" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrinterPaperFromSetup" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="UseFormerLineSpacing" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="AddParaLineSpacingToTableCells" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="UseFormerObjectPositioning" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrintGraphics" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="ImagePreferredDPI" 
config:type="int">0</config:config-item>
+   <config:config-item config:name="SurroundTextWrapSmall" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="ConsiderTextWrapOnObjPos" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="MsWordCompTrailingBlanks" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="TabAtLeftIndentForParagraphsInList" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrintRightPages" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="TabOverSpacing" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="IgnoreFirstLineIndentInNumbering" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="NoNumberingShowFollowBy" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="RedlineProtectionKey" 
config:type="base64Binary"/>
+   <config:config-item config:name="DoNotJustifyLinesWithManualBreak" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrintProspectRTL" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="PrintEmptyPages" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="DoNotResetParaAttrsForNumFont" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="AddFrameOffsets" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="LoadReadonly" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="DoNotCaptureDrawObjsOnPage" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="AddVerticalFrameOffsets" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="UnxForceZeroExtLeading" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="IsLabelDocument" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="TableRowKeep" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="RsidRoot" 
config:type="int">811422</config:config-item>
+   <config:config-item config:name="PrintHiddenText" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="ProtectForm" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="MsWordCompMinLineHeightByFly" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="BackgroundParaOverDrawings" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="SaveVersionOnClose" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="MathBaselineAlignment" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="SmallCapsPercentage66" 
config:type="boolean">false</config:config-item>
+   <config:config-item config:name="CollapseEmptyCellPara" 
config:type="boolean">true</config:config-item>
+   <config:config-item config:name="TabOverflow" 
config:type="boolean">true</config:config-item>
+  </config:config-item-set>
+ </office:settings>
+ <office:font-face-decls>
+  <style:font-face style:name="Arial Unicode MS1" svg:font-family="'Arial 
Unicode MS'" style:font-family-generic="system" style:font-pitch="variable"/>
+  <style:font-face style:name="Liberation Serif" svg:font-family="'Liberation 
Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
+  <style:font-face style:name="SimSun" svg:font-family="SimSun" 
style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+  <style:default-style style:family="graphic">
+   <style:graphic-properties svg:stroke-color="#3465a4" 
draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" 
draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" 
draw:start-line-spacing-vertical="0.283cm" 
draw:end-line-spacing-horizontal="0.283cm" 
draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+   <style:paragraph-properties style:text-autospace="ideograph-alpha" 
style:line-break="strict" style:font-independent-line-spacing="false">
+    <style:tab-stops/>
+   </style:paragraph-properties>
+   <style:text-properties style:use-window-font-color="true" 
loext:opacity="0%" loext:color-lum-mod="100%" loext:color-lum-off="0%" 
style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" 
fo:country="US" style:letter-kerning="true" style:font-name-asian="SimSun" 
style:font-size-asian="10.5pt" style:language-asian="zh" 
style:country-asian="CN" style:font-name-complex="Arial Unicode MS1" 
style:font-size-complex="12pt" style:language-complex="hi" 
style:country-complex="IN"/>
+  </style:default-style>
+  <style:default-style style:family="paragraph">
+   <style:paragraph-properties fo:orphans="2" fo:widows="2" 
fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" 
style:punctuation-wrap="hanging" style:line-break="strict" 
style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+   <style:text-properties style:use-window-font-color="true" 
loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" 
fo:language="en" fo:country="US" style:letter-kerning="true" 
style:font-name-asian="SimSun" style:font-size-asian="10.5pt" 
style:language-asian="zh" style:country-asian="CN" 
style:font-name-complex="Arial Unicode MS1" style:font-size-complex="12pt" 
style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" 
fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" 
loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" 
loext:hyphenation-word-char-count="5" loext:hyphenation-zone="no-limit"/>
+  </style:default-style>
+  <style:default-style style:family="table">
+   <style:table-properties table:border-model="collapsing"/>
+  </style:default-style>
+  <style:default-style style:family="table-row">
+   <style:table-row-properties fo:keep-together="auto"/>
+  </style:default-style>
+  <style:style style:name="Standard" style:family="paragraph" 
style:class="text"/>
+  <style:style style:name="Numbered_20_paragraph" style:display-name="Numbered 
paragraph" style:family="paragraph" style:parent-style-name="Standard" 
style:default-outline-level="1" style:list-style-name="Numbering_20_123">
+   <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" 
fo:text-indent="0cm" style:auto-text-indent="false" text:number-lines="false" 
text:line-number="0"/>
+  </style:style>
+  <style:style style:name="Numbering_20_Symbols" style:display-name="Numbering 
Symbols" style:family="text"/>
+  <text:outline-style style:name="Outline">
+   <text:outline-level-style text:level="1" loext:num-list-format="%1%" 
style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="2" loext:num-list-format="%2%" 
style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="3" loext:num-list-format="%3%" 
style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="4" loext:num-list-format="%4%" 
style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="5" loext:num-list-format="%5%" 
style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="6" loext:num-list-format="%6%" 
style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="7" loext:num-list-format="%7%" 
style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="8" loext:num-list-format="%8%" 
style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="9" loext:num-list-format="%9%" 
style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="10" loext:num-list-format="%10%" 
style:num-format="">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+  </text:outline-style>
+  <text:list-style style:name="Numbering_20_123" style:display-name="Numbering 
123">
+   <text:list-level-style-number text:level="1" 
text:style-name="Numbering_20_Symbols" loext:num-list-format="%1%." 
style:num-suffix="." style:num-format="1">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" 
fo:text-indent="-0.7cm" fo:margin-left="1.33cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="2" 
text:style-name="Numbering_20_Symbols" loext:num-list-format="%2%." 
style:num-suffix="." style:num-format="1">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" 
text:list-tab-stop-position="1.401cm" fo:text-indent="-0.7cm" 
fo:margin-left="2.03cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="3" 
text:style-name="Numbering_20_Symbols" loext:num-list-format="%3%." 
style:num-suffix="." style:num-format="1">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" 
text:list-tab-stop-position="2.101cm" fo:text-indent="-0.7cm" 
fo:margin-left="2.731cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="4" 
text:style-name="Numbering_20_Symbols" loext:num-list-format="%4%." 
style:num-suffix="." style:num-format="1">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" 
text:list-tab-stop-position="2.801cm" fo:text-indent="-0.7cm" 
fo:margin-left="3.431cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="5" 
text:style-name="Numbering_20_Symbols" loext:num-list-format="%5%." 
style:num-suffix="." style:num-format="1">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" 
text:list-tab-stop-position="3.501cm" fo:text-indent="-0.7cm" 
fo:margin-left="4.131cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="6" 
text:style-name="Numbering_20_Symbols" loext:num-list-format="%6%." 
style:num-suffix="." style:num-format="1">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" 
text:list-tab-stop-position="4.2cm" fo:text-indent="-0.7cm" 
fo:margin-left="4.83cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="7" 
text:style-name="Numbering_20_Symbols" loext:num-list-format="%7%." 
style:num-suffix="." style:num-format="1">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" 
text:list-tab-stop-position="4.9cm" fo:text-indent="-0.7cm" 
fo:margin-left="5.53cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="8" 
text:style-name="Numbering_20_Symbols" loext:num-list-format="%8%." 
style:num-suffix="." style:num-format="1">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" 
text:list-tab-stop-position="5.6cm" fo:text-indent="-0.7cm" 
fo:margin-left="6.23cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="9" 
text:style-name="Numbering_20_Symbols" loext:num-list-format="%9%." 
style:num-suffix="." style:num-format="1">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" 
text:list-tab-stop-position="6.301cm" fo:text-indent="-0.7cm" 
fo:margin-left="6.93cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="10" 
text:style-name="Numbering_20_Symbols" loext:num-list-format="%10%." 
style:num-suffix="." style:num-format="1">
+    <style:list-level-properties 
text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" 
text:list-tab-stop-position="7.001cm" fo:text-indent="-0.7cm" 
fo:margin-left="7.631cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-number>
+  </text:list-style>
+  <text:notes-configuration text:note-class="footnote" style:num-format="1" 
text:start-value="0" text:footnotes-position="page" 
text:start-numbering-at="document"/>
+  <text:notes-configuration text:note-class="endnote" style:num-format="i" 
text:start-value="0"/>
+  <text:linenumbering-configuration text:number-lines="false" 
text:offset="0.499cm" style:num-format="1" text:number-position="left" 
text:increment="5"/>
+ </office:styles>
+ <office:automatic-styles>
+  <style:page-layout style:name="pm1">
+   <style:page-layout-properties fo:page-width="21.59cm" 
fo:page-height="27.94cm" style:num-format="1" 
style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" 
fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" 
style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" 
style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" 
style:layout-grid-mode="none" style:layout-grid-ruby-below="false" 
style:layout-grid-print="false" style:layout-grid-display="false" 
style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+    <style:footnote-sep style:width="0.018cm" 
style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" 
style:line-style="solid" style:adjustment="left" style:rel-width="25%" 
style:color="#000000"/>
+   </style:page-layout-properties>
+   <style:header-style/>
+   <style:footer-style/>
+  </style:page-layout>
+  <style:style style:name="dp1" style:family="drawing-page">
+   <style:drawing-page-properties draw:background-size="full"/>
+  </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+  <style:master-page style:name="Standard" style:page-layout-name="pm1" 
draw:style-name="dp1"/>
+  </office:master-styles>
+ <office:body>
+  <office:text>
+   <text:sequence-decls>
+    <text:sequence-decl text:display-outline-level="0" 
text:name="Illustration"/>
+    <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+    <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+    <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+    <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+   </text:sequence-decls>
+   <text:list text:style-name="Numbering_20_123">
+    <text:list-item>
+     <text:h text:style-name="Numbered_20_paragraph" text:outline-level="1">He 
heard quiet steps behind him. That didn't bode well. Who could be following him 
this late at night and in this deadbeat part of town? And at this particular 
moment, just after he pulled off the big time and was making off with the 
greenbacks. Was there another crook who'd had the same idea, and was now 
watching him and waiting for a chance to grab the fruit of his labor? Or did 
the steps behind him mean that one of many law officers in town was on to him 
and just waiting to pounce and snap those cuffs on his wrists? He nervously 
looked all around. Suddenly he saw the alley. Like lightning he darted off to 
the left and disappeared between the two warehouses almost falling over the 
trash can lying in the middle of the sidewalk. He tried to nervously tap his 
way along in the inky darkness and </text:h>
+    </text:list-item>
+   </text:list>
+  </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx
index 690fc333afb5..f18c4fd531f8 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -22,6 +22,7 @@
 #include <vcl/filter/PDFiumLibrary.hxx>
 #include <vcl/filter/pdfdocument.hxx>
 #include <comphelper/propertyvalue.hxx>
+#include <comphelper/sequenceashashmap.hxx>
 #include <editeng/fhgtitem.hxx>
 #include <editeng/wghtitem.hxx>
 
@@ -45,6 +46,8 @@
 #include <txatbase.hxx>
 #include <textcontentcontrol.hxx>
 #include <pagefrm.hxx>
+#include <inftxt.hxx>
+#include <itrtxt.hxx>
 
 /// Covers sw/source/core/text/ fixes.
 class SwCoreTextTest : public SwModelTestBase
@@ -116,6 +119,65 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, 
testLastBibliographyPdfExport)
     CPPUNIT_ASSERT(true);
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf156146)
+{
+    createSwDoc("tdf156146.fodt");
+
+    uno::Reference<container::XIndexAccess> const xLevels1(
+        getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(1), 
"NumberingRules"));
+    uno::Reference<container::XNamed> const xNum1(xLevels1, uno::UNO_QUERY);
+    ::comphelper::SequenceAsHashMap props1(xLevels1->getByIndex(0));
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(-700), 
props1["FirstLineIndent"].get<sal_Int32>());
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(1330), props1["IndentAt"].get<sal_Int32>());
+
+    // common style applies list-style-name and margin-left
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
+                         getProperty<sal_Int32>(getParagraph(1), 
"ParaFirstLineIndent"));
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getParagraph(1), 
"ParaLeftMargin"));
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getParagraph(1), 
"ParaRightMargin"));
+
+    SwTextFrame* const pFrame(dynamic_cast<SwTextFrame*>(
+        
static_cast<SwPageFrame*>(getSwDoc()->GetDocShell()->GetWrtShell()->GetLayout()->GetLower())
+            ->FindFirstBodyContent()));
+    CPPUNIT_ASSERT(pFrame);
+    // this appears to be the only way to get the actual computed margins
+    SwTextSizeInfo info(pFrame);
+    SwTextMargin tm(pFrame, &info);
+    // this was wrong, 357
+    CPPUNIT_ASSERT_EQUAL(SwTwips(0), tm.FirstLeft() - 
pFrame->getFrameArea().Left());
+    // this was wrong, 754
+    CPPUNIT_ASSERT_EQUAL(SwTwips(0), tm.Left() - 
pFrame->getFrameArea().Left());
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf159903)
+{
+    createSwDoc("Broken indent demo.odt");
+
+    uno::Reference<container::XIndexAccess> const xLevels1(
+        getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(1), 
"NumberingRules"));
+    uno::Reference<container::XNamed> const xNum1(xLevels1, uno::UNO_QUERY);
+    ::comphelper::SequenceAsHashMap props1(xLevels1->getByIndex(0));
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(-4001), 
props1["FirstLineIndent"].get<sal_Int32>());
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(4001), props1["IndentAt"].get<sal_Int32>());
+
+    // common style applies list-style-name, parent style margin-left
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
+                         getProperty<sal_Int32>(getParagraph(1), 
"ParaFirstLineIndent"));
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getParagraph(1), 
"ParaLeftMargin"));
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getParagraph(1), 
"ParaRightMargin"));
+
+    SwTextFrame* const pFrame(dynamic_cast<SwTextFrame*>(
+        
static_cast<SwPageFrame*>(getSwDoc()->GetDocShell()->GetWrtShell()->GetLayout()->GetLower())
+            ->FindFirstBodyContent()));
+    CPPUNIT_ASSERT(pFrame);
+    // this appears to be the only way to get the actual computed margins
+    SwTextSizeInfo info(pFrame);
+    SwTextMargin tm(pFrame, &info);
+    CPPUNIT_ASSERT_EQUAL(SwTwips(0), tm.FirstLeft() - 
pFrame->getFrameArea().Left());
+    // left was wrong, was same as first
+    CPPUNIT_ASSERT_EQUAL(SwTwips(2268), tm.Left() - 
pFrame->getFrameArea().Left());
+}
+
 CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf159336)
 {
     createSwDoc("tdf159336.odt");
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 2ddaee7b2e8f..cb11d02b1e8d 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -71,8 +71,8 @@ class SwLineInfo
     void CtorInitLineInfo( const SwAttrSet& rAttrSet,
                            const SwTextNode& rTextNode );
 
-    SwLineInfo();
-    ~SwLineInfo();
+    SW_DLLPUBLIC SwLineInfo();
+    SW_DLLPUBLIC ~SwLineInfo();
 public:
     // #i24363# tab stops relative to indent - returns the tab stop following 
nSearchPos or NULL
     const SvxTabStop* GetTabStop(const SwTwips nSearchPos, SwTwips& nRight) 
const;
@@ -183,7 +183,7 @@ public:
     SwTextSizeInfo( const SwTextSizeInfo &rInf );
     SwTextSizeInfo( const SwTextSizeInfo &rInf, const OUString* pText,
                    TextFrameIndex nIdx = TextFrameIndex(0) );
-    SwTextSizeInfo(SwTextFrame *pTextFrame, TextFrameIndex nIndex = 
TextFrameIndex(0));
+    SW_DLLPUBLIC SwTextSizeInfo(SwTextFrame *pTextFrame, TextFrameIndex nIndex 
= TextFrameIndex(0));
 
     // GetMultiAttr returns the text attribute of the multiportion,
     // if rPos is inside any multi-line part.
diff --git a/sw/source/core/text/itratr.hxx b/sw/source/core/text/itratr.hxx
index eb15400cf5d8..9a5f0b3f01cc 100644
--- a/sw/source/core/text/itratr.hxx
+++ b/sw/source/core/text/itratr.hxx
@@ -29,7 +29,7 @@ class SwRedlineItr;
 class SwViewShell;
 class SwTextFrame;
 
-class SwAttrIter
+class SW_DLLPUBLIC SwAttrIter
 {
     friend class SwFontSave;
 protected:
diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx
index 8db063d616e8..b5ea78369d5f 100644
--- a/sw/source/core/text/itrtxt.hxx
+++ b/sw/source/core/text/itrtxt.hxx
@@ -156,7 +156,7 @@ protected:
     // For FormatQuoVadis
     void Right( const SwTwips nNew ) { mnRight = nNew; }
 
-    void CtorInitTextMargin( SwTextFrame *pFrame, SwTextSizeInfo *pInf );
+    SW_DLLPUBLIC void CtorInitTextMargin( SwTextFrame *pFrame, SwTextSizeInfo 
*pInf );
     explicit SwTextMargin(SwTextNode const * pTextNode)
         : SwTextIter(pTextNode)
         , mnLeft(0)
commit 6739bc2f482b1373e6d3a1f0910171916b7eb224
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Thu Apr 18 13:00:04 2024 +0200
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Thu May 2 01:19:46 2024 +0200

    tdf#159903 xmloff: ODF import: fix bug in margin compatibility override
    
    The check for the property being set was wrong: the state in a parent
    style may be DIRECT_VALUE but a derived style may have a list style set,
    which effectively overrides the ParaLeftMargin and ParaFirstLineIndent.
    
    Fix this so that the compatibility override only happens when required.
    
    (regression from commit 7cf5faec6fdbc27dd77d2d36fb2ff205322cba0d)
    
    Change-Id: I6c8ca493df946afcb48a63c01c132620bcd7b390
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166257
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    (cherry picked from commit 1b2a6b98291cf8b7022951be19b915fe2a9e18e6)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166217
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index ac0e89474245..d6e132323d34 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -1016,6 +1016,10 @@ auto 
IsPropertySet(uno::Reference<container::XNameContainer> const& rxParaStyles
     {
         return true;
     }
+    if (xPropState->getPropertyState("NumberingStyleName") == 
beans::PropertyState_DIRECT_VALUE)
+    {
+        return false; // tdf#159903 this overrides value in the parent style
+    }
     // check if it is set by any parent common style
     OUString style;
     rxPropSet->getPropertyValue("ParaStyleName") >>= style;
@@ -1028,6 +1032,10 @@ auto 
IsPropertySet(uno::Reference<container::XNameContainer> const& rxParaStyles
         {
             return true;
         }
+        if (xStyleProps->getPropertyState("NumberingStyleName") == 
beans::PropertyState_DIRECT_VALUE)
+        {
+            return false; // tdf#159903 this overrides value in the parent 
style
+        }
         style = xStyle->getParentStyle();
     }
     return false;
commit bc712cf4e9b62a5c8d21bddc341f24faec0f84cf
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Thu Apr 25 18:20:20 2024 +0200
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Thu May 2 01:19:30 2024 +0200

    tdf#154581 tdf#157411 tdf#158549 sw: HTML import: fix SfxItemIter reuse
    
    This is obviously wrong, as ALG just pointed out: the aIter is at the
    end after the 1st loop, so the 2nd loop does nothing.
    Thx Gabor for checking all the reported bugs.
    
    (regression from commit db115bec9254417ef7a3faf687478fe5424ab378)
    
    Change-Id: Iae37b9ab5c630d0ee774f42c84d5e76349b92a90
    Tested-by: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166643
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    Tested-by: Jenkins
    (cherry picked from commit ac05822b8957d80018d3ce1cbf97cd9faa0dfe99)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166712
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/source/filter/html/htmlctxt.cxx 
b/sw/source/filter/html/htmlctxt.cxx
index 80245ba2ea6a..0e87b83644f8 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -656,7 +656,8 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
             }
 #endif
 
-    for (const SfxPoolItem* pItem = aIter.GetCurItem(); pItem; pItem = 
aIter.NextItem())
+    SfxItemIter aIter2(rItemSet);
+    for (const SfxPoolItem* pItem = aIter2.GetCurItem(); pItem; pItem = 
aIter2.NextItem())
     {
         HTMLAttr **ppAttr = nullptr;
 

Reply via email to