sw/qa/extras/layout/layout.cxx             |   10 ++++++----
 sw/qa/extras/ooxmlexport/ooxmlexport18.cxx |    2 +-
 sw/qa/extras/ooxmlexport/ooxmlexport3.cxx  |    3 ++-
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx   |    4 ++--
 sw/qa/extras/uiwriter/uiwriter4.cxx        |    6 +++---
 sw/qa/extras/uiwriter/uiwriter6.cxx        |    2 +-
 sw/qa/extras/uiwriter/uiwriter7.cxx        |    3 +--
 sw/qa/extras/ww8export/ww8export2.cxx      |    2 +-
 sw/qa/extras/ww8export/ww8export3.cxx      |    4 ++--
 sw/qa/extras/ww8export/ww8export4.cxx      |    8 ++++----
 sw/source/core/access/accportions.cxx      |    8 ++++----
 sw/source/core/access/accportions.hxx      |    4 ++--
 sw/source/core/inc/SwPortionHandler.hxx    |    4 +---
 sw/source/core/text/porfld.cxx             |    9 +--------
 sw/source/core/text/porlin.cxx             |    2 +-
 sw/source/core/text/porrst.cxx             |    2 +-
 sw/source/core/text/txtfrm.cxx             |    2 +-
 sw/source/core/text/xmldump.cxx            |   29 +----------------------------
 18 files changed, 35 insertions(+), 69 deletions(-)

New commits:
commit 251ba77f9aac0f1eacb0e1f02d34e9302024f1a9
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Wed Nov 16 20:03:10 2022 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Thu Nov 17 08:11:05 2022 +0100

    CppunitTest_sw_layoutwriter: use more SwParaPortion::dumpAsXml()
    
    See commit feeed3e762cf077fbd9cf48f82e949365108ccc1
    (CppunitTest_sw_layoutwriter: avoid some a11y-based layout testing,
    2022-04-07) for motivation.
    
    Change-Id: I3c5d53dc33112f7d8c46cf2baf35ba03ff7fa3fb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142790
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 180f9c604e06..a5f4c961a602 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -3795,14 +3795,16 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, TestTdf150616)
     CPPUNIT_ASSERT(pXmlDoc);
 
     // this one was 0 height
-    assertXPath(pXmlDoc, 
"/root/page[1]/body/tab[3]/row[2]/cell[2]/txt[2]/LineBreak", "Line",
-                "Important information here!");
+    assertXPath(pXmlDoc,
+                
"/root/page[1]/body/tab[3]/row[2]/cell[2]/txt[2]/SwParaPortion/SwLineLayout",
+                "portion", "Important information here!");
     assertXPath(pXmlDoc, 
"/root/page[1]/body/tab[3]/row[2]/cell[2]/txt[2]/infos/bounds", "height",
                 "253");
     assertXPath(pXmlDoc, 
"/root/page[1]/body/tab[3]/row[2]/cell[2]/txt[2]/infos/bounds", "top",
                 "7925");
-    assertXPath(pXmlDoc, 
"/root/page[1]/body/tab[3]/row[2]/cell[2]/txt[3]/LineBreak", "Line",
-                "xxx 111 ");
+    assertXPath(pXmlDoc,
+                
"/root/page[1]/body/tab[3]/row[2]/cell[2]/txt[3]/SwParaPortion/SwLineLayout",
+                "portion", "xxx 111 ");
     assertXPath(pXmlDoc, 
"/root/page[1]/body/tab[3]/row[2]/cell[2]/txt[3]/infos/bounds", "height",
                 "697");
     assertXPath(pXmlDoc, 
"/root/page[1]/body/tab[3]/row[2]/cell[2]/txt[3]/infos/bounds", "top",
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
index 6f76391d75dd..af42616d778d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
@@ -75,7 +75,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf147646, 
"tdf147646_mergedCellNumbering.docx")
     //Without the fix in place, it would have failed with
     //- Expected: 2.
     //- Actual  : 4.
-    
CPPUNIT_ASSERT_EQUAL(OUString("2."),parseDump("/root/page/body/tab/row[4]/cell/txt/Special[@nType='PortionType::Number']","rText"));
+    
CPPUNIT_ASSERT_EQUAL(OUString("2."),parseDump("/root/page/body/tab/row[4]/cell/txt/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']","expand"));
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testTdf149551_mongolianVert)
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index f0c7703f6503..fe1aa44d75e7 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -1101,7 +1101,8 @@ CPPUNIT_TEST_FIXTURE(Test, testNumberingLevels)
     // Note: _Toc and _Ref hidden bookmarks are imported from OOXML as normal 
bookmarks.
     // Without hiding them from visible bookmarks (SwBookmarkPortion), this 
line would be
     // shown as "A.2.1 [[[[[.DESCRIPTION]]]] with XML layout dump "A.2.1 
#_Ref... Bookmark Start..."
-    assertXPath(pXmlDoc, "//body/txt[5]/LineBreak", "Line", "A.2.1 
.DESCRIPTION");
+    assertXPath(pXmlDoc, 
"//body/txt[5]/SwParaPortion/SwLineLayout/child::*[1]", "expand", "A.2.1 ");
+    assertXPath(pXmlDoc, 
"//body/txt[5]/SwParaPortion/SwLineLayout/child::*[2]", "portion", 
".DESCRIPTION");
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testVerticalBorders)
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 32a449a1259b..596067d61306 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -416,8 +416,8 @@ CPPUNIT_TEST_FIXTURE(Test, testN758883)
     assertXPath(pXmlDoc, 
"/root/page/body/txt/SwParaPortion/SwLineLayout/SwBookmarkPortion[2]", 
"height", "253");
 
     // tdf#150947 check a11y of the newly inserted bookmark portions
-    assertXPath(pXmlDoc, "/root/page/body/txt/Special[2]", "rText", 
"#BookmarkTest Bookmark Start");
-    assertXPath(pXmlDoc, "/root/page/body/txt/Special[3]", "rText", 
"#BookmarkTest Bookmark End");
+    assertXPath(pXmlDoc, 
"/root/page/body/txt/SwParaPortion/SwLineLayout/SwBookmarkPortion[1]", 
"colors", "#BookmarkTest Bookmark Start");
+    assertXPath(pXmlDoc, 
"/root/page/body/txt/SwParaPortion/SwLineLayout/SwBookmarkPortion[2]", 
"colors", "#BookmarkTest Bookmark End");
 
     /*
      * Next problem was that the page margin contained the width of the page 
border as well.
diff --git a/sw/qa/extras/uiwriter/uiwriter4.cxx 
b/sw/qa/extras/uiwriter/uiwriter4.cxx
index 9fa60eb4ceea..0463360d3a14 100644
--- a/sw/qa/extras/uiwriter/uiwriter4.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter4.cxx
@@ -1828,7 +1828,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, 
testTdf106701_tabOverMarginAutotab)
     sal_Int32 nRightMargin = getXPath(pXmlDoc, 
"//body/txt[1]/infos/prtBounds", "width").toInt32();
     // Automatic tabstops should never be affected by tabOverMargin 
compatibility
     // The 1st line's width previously was ~9506
-    sal_Int32 nWidth = getXPath(pXmlDoc, "//LineBreak[1]", "nWidth").toInt32();
+    sal_Int32 nWidth = getXPath(pXmlDoc, "//SwParaPortion/SwLineLayout[1]", 
"width").toInt32();
     CPPUNIT_ASSERT_MESSAGE("1st line's width is less than the right margin", 
nWidth < nRightMargin);
 }
 
@@ -1878,7 +1878,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf107362)
         = getXPath(pXmlDoc, "(//Text[@nType='PortionType::Text'])[1]", 
"nWidth").toInt32();
     sal_Int32 nWidth2
         = getXPath(pXmlDoc, "(//Text[@nType='PortionType::Text'])[2]", 
"nWidth").toInt32();
-    sal_Int32 nLineWidth = getXPath(pXmlDoc, "//LineBreak", 
"nWidth").toInt32();
+    sal_Int32 nLineWidth = getXPath(pXmlDoc, "//SwParaPortion/SwLineLayout", 
"width").toInt32();
     sal_Int32 nKernWidth = nLineWidth - nWidth1 - nWidth2;
     // Test only if fonts are available
     if (nWidth1 > 500 && nWidth2 > 200)
@@ -2085,7 +2085,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf58604)
     createSwDoc("tdf58604.odt");
     CPPUNIT_ASSERT_EQUAL(
         OUString("PortionType::Break"),
-        
parseDump("(/root/page/body/txt/LineBreak[1]/preceding::Text)[last()]", 
"nType"));
+        
parseDump("(/root/page/body/txt/SwParaPortion/SwLineLayout[1]/child::*)[last()]",
 "type"));
 #endif
 }
 
diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx 
b/sw/qa/extras/uiwriter/uiwriter6.cxx
index b9b17b863ca9..eac32ec1b233 100644
--- a/sw/qa/extras/uiwriter/uiwriter6.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter6.cxx
@@ -617,7 +617,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf112448)
 
     // check actual number of line breaks in the paragraph
     xmlDocUniquePtr pXmlDoc = parseLayoutDump();
-    assertXPath(pXmlDoc, "/root/page/body/txt/LineBreak", 2);
+    assertXPath(pXmlDoc, "/root/page/body/txt/SwParaPortion/SwLineLayout", 2);
 }
 
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf113790)
diff --git a/sw/qa/extras/uiwriter/uiwriter7.cxx 
b/sw/qa/extras/uiwriter/uiwriter7.cxx
index bef4be924ad9..e7c6f3f494bb 100644
--- a/sw/qa/extras/uiwriter/uiwriter7.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter7.cxx
@@ -2548,13 +2548,12 @@ public:
     }
 
     virtual void Special(TextFrameIndex nLength, const OUString& /*rText*/, 
PortionType nType,
-                         sal_Int32 /*nHeight*/, sal_Int32 /*nWidth*/,
                          const SwFont* /*pFont*/) override
     {
         mPortionItems.emplace_back("special", sal_Int32(nLength), nType);
     }
 
-    virtual void LineBreak(sal_Int32 /*nWidth*/) override
+    virtual void LineBreak() override
     {
         mPortionItems.emplace_back("line_break", 0, PortionType::NONE);
     }
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx 
b/sw/qa/extras/ww8export/ww8export2.cxx
index 2c013dee2ea3..f61d1ff4f115 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -122,7 +122,7 @@ DECLARE_WW8EXPORT_TEST(testTdf37153, 
"tdf37153_considerWrapOnObjPos.doc")
 
 DECLARE_WW8EXPORT_TEST(testTdf49102_mergedCellNumbering, 
"tdf49102_mergedCellNumbering.doc")
 {
-    CPPUNIT_ASSERT_EQUAL( OUString("2."), 
parseDump("/root/page/body/tab/row[4]/cell/txt/Special[@nType='PortionType::Number']",
 "rText") );
+    CPPUNIT_ASSERT_EQUAL( OUString("2."), 
parseDump("/root/page/body/tab/row[4]/cell/txt/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']",
 "expand") );
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testTdf55427_footnote2endnote)
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx 
b/sw/qa/extras/ww8export/ww8export3.cxx
index 2618308e744b..8f516e5b1984 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -679,9 +679,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf94009_zeroPgMargin)
 
 DECLARE_WW8EXPORT_TEST(testTdf108518_CRnumformatting, 
"tdf108518_CRnumformatting.doc")
 {
-    CPPUNIT_ASSERT_EQUAL(OUString("6.2.3."), 
parseDump("//body/txt[4]/Special[@nType='PortionType::Number']", "rText"));
+    CPPUNIT_ASSERT_EQUAL(OUString("6.2.3."), 
parseDump("//body/txt[4]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']",
 "expand"));
     //Without this fix in place, it would become 200 (and non-bold).
-    CPPUNIT_ASSERT_EQUAL(OUString("220"), 
parseDump("//body/txt[4]/Special[@nType='PortionType::Number']", "nHeight"));
+    CPPUNIT_ASSERT_EQUAL(OUString("220"), 
parseDump("//body/txt[4]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']",
 "font-height"));
 }
 
 DECLARE_WW8EXPORT_TEST(testTdf120711_joinedParagraphWithChangeTracking, 
"tdf120711.doc")
diff --git a/sw/qa/extras/ww8export/ww8export4.cxx 
b/sw/qa/extras/ww8export/ww8export4.cxx
index b8ee8c464c9a..f409c8e8dfa8 100644
--- a/sw/qa/extras/ww8export/ww8export4.cxx
+++ b/sw/qa/extras/ww8export/ww8export4.cxx
@@ -38,9 +38,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148360)
     const auto& pLayout = parseLayoutDump();
 
     // Ensure first element is a tab
-    assertXPath(pLayout, "/root/page[1]/body/txt[1]/Text[1]", "nType", 
"PortionType::TabLeft");
+    assertXPath(pLayout, 
"/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout/child::*[1]", "type", 
"PortionType::TabLeft");
     // and only then goes content
-    assertXPath(pLayout, "/root/page[1]/body/txt[1]/Text[2]", "nType", 
"PortionType::Text");
+    assertXPath(pLayout, 
"/root/page[1]/body/txt[1]/SwParaPortion/SwLineLayout/child::*[2]", "type", 
"PortionType::Text");
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testTdf77964)
@@ -60,9 +60,9 @@ DECLARE_WW8EXPORT_TEST(testTdf150197_anlv2ListFormat, 
"tdf150197_anlv2ListFormat
 
 DECLARE_WW8EXPORT_TEST(testTdf117994_CRnumformatting, 
"tdf117994_CRnumformatting.doc")
 {
-    CPPUNIT_ASSERT_EQUAL(OUString("1."), 
parseDump("//body/txt[1]/Special[@nType='PortionType::Number']", "rText"));
+    CPPUNIT_ASSERT_EQUAL(OUString("1."), 
parseDump("//body/txt[1]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']",
 "expand"));
     //Without this fix in place, it would become 200 (and non-bold).
-    CPPUNIT_ASSERT_EQUAL(OUString("160"), 
parseDump("//body/txt[1]/Special[@nType='PortionType::Number']", "nHeight"));
+    CPPUNIT_ASSERT_EQUAL(OUString("160"), 
parseDump("//body/txt[1]/SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']",
 "font-height"));
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/access/accportions.cxx 
b/sw/source/core/access/accportions.cxx
index 7b00b56661c2..6117d7931f80 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -110,7 +110,7 @@ void SwAccessiblePortionData::Text(TextFrameIndex const 
nLength,
 
 void SwAccessiblePortionData::Special(
     TextFrameIndex const nLength, const OUString& rText, PortionType nType,
-    sal_Int32 /*nHeight*/, sal_Int32 /*nWidth*/, const SwFont* /*pFont*/)
+    const SwFont* /*pFont*/)
 {
     OSL_ENSURE(m_nViewPosition >= TextFrameIndex(0), "illegal position");
     OSL_ENSURE((m_nViewPosition + nLength) <= 
TextFrameIndex(m_pTextFrame->GetText().getLength()),
@@ -196,7 +196,7 @@ void SwAccessiblePortionData::Special(
     m_nViewPosition += nLength;
 }
 
-void SwAccessiblePortionData::LineBreak(sal_Int32 /*nWidth*/)
+void SwAccessiblePortionData::LineBreak()
 {
     OSL_ENSURE( !m_bFinished, "We are already done!" );
 
@@ -222,8 +222,8 @@ void SwAccessiblePortionData::Finish()
     // position before the end
     Special( TextFrameIndex(0), OUString(), POR_TERMINATE );
     Special( TextFrameIndex(0), OUString(), POR_TERMINATE );
-    LineBreak(0);
-    LineBreak(0);
+    LineBreak();
+    LineBreak();
 
     m_sAccessibleString = m_aBuffer.makeStringAndClear();
     m_bFinished = true;
diff --git a/sw/source/core/access/accportions.hxx 
b/sw/source/core/access/accportions.hxx
index 5598699a63d0..81eab54144dc 100644
--- a/sw/source/core/access/accportions.hxx
+++ b/sw/source/core/access/accportions.hxx
@@ -92,8 +92,8 @@ public:
 
     // SwPortionHandler methods
     virtual void Text(TextFrameIndex nLength, PortionType nType, sal_Int32 
nHeight = 0, sal_Int32 nWidth = 0) override;
-    virtual void Special(TextFrameIndex nLength, const OUString& rText, 
PortionType nType, sal_Int32 nHeight = 0, sal_Int32 nWidth = 0, const SwFont* 
pFont = nullptr) override;
-    virtual void LineBreak(sal_Int32 nWidth) override;
+    virtual void Special(TextFrameIndex nLength, const OUString& rText, 
PortionType nType, const SwFont* pFont = nullptr) override;
+    virtual void LineBreak() override;
     virtual void Skip(TextFrameIndex nLength) override;
     virtual void Finish() override;
 
diff --git a/sw/source/core/inc/SwPortionHandler.hxx 
b/sw/source/core/inc/SwPortionHandler.hxx
index c183781d8fea..5cffce8411ae 100644
--- a/sw/source/core/inc/SwPortionHandler.hxx
+++ b/sw/source/core/inc/SwPortionHandler.hxx
@@ -70,15 +70,13 @@ public:
         TextFrameIndex nLength, ///< length of this portion in the view string
         const OUString& rText, /// text which is painted on-screen
         PortionType nType,         /// type of this portion
-        sal_Int32 nHeight = 0,     /// font height of the painted text
-        sal_Int32 nWidth = 0,     /// width of this portion
         const SwFont* pFont = nullptr /// font of this portion
         ) = 0;
 
     /** line break. This method is called whenever a line break in the
      * layout occurs.
      */
-    virtual void LineBreak(sal_Int32 nWidth) = 0;
+    virtual void LineBreak() = 0;
 
     /** skip characters. The SwTextFrame may only display partially
      * display a certain paragraph (e.g. when the paragraph is split
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index e6063d48a08e..01a42cfc4e82 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -464,14 +464,7 @@ bool SwFieldPortion::GetExpText( const SwTextSizeInfo 
&rInf, OUString &rText ) c
 
 void SwFieldPortion::HandlePortion( SwPortionHandler& rPH ) const
 {
-    sal_Int32 nH = 0;
-    sal_Int32 nW = 0;
-    if (m_pFont)
-    {
-        nH = m_pFont->GetSize(m_pFont->GetActual()).Height();
-        nW = m_pFont->GetSize(m_pFont->GetActual()).Width();
-    }
-    rPH.Special( GetLen(), m_aExpand, GetWhichPor(), nH, nW, m_pFont.get() );
+    rPH.Special( GetLen(), m_aExpand, GetWhichPor(), m_pFont.get() );
 }
 
 void SwFieldPortion::dumpAsXml(xmlTextWriterPtr pWriter, const OUString& rText,
diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx
index d2e95e88249a..c7b6b17279b3 100644
--- a/sw/source/core/text/porlin.cxx
+++ b/sw/source/core/text/porlin.cxx
@@ -315,7 +315,7 @@ bool SwLinePortion::GetExpText( const SwTextSizeInfo &, 
OUString & ) const
 
 void SwLinePortion::HandlePortion( SwPortionHandler& rPH ) const
 {
-    rPH.Special( GetLen(), OUString(), GetWhichPor(), Height(), Width() );
+    rPH.Special( GetLen(), OUString(), GetWhichPor() );
 }
 
 void SwLinePortion::dumpAsXml(xmlTextWriterPtr pWriter, const OUString& rText, 
TextFrameIndex& nOffset) const
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index e5367ab42116..3a8dd51e014d 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -853,7 +853,7 @@ void SwBookmarkPortion::HandlePortion( SwPortionHandler& 
rPH ) const
         }
     }
 
-    rPH.Special( GetLen(), aStr.makeStringAndClear(), GetWhichPor(), Height(), 
Width() );
+    rPH.Special( GetLen(), aStr.makeStringAndClear(), GetWhichPor() );
 }
 
 void SwBookmarkPortion::dumpAsXml(xmlTextWriterPtr pWriter, const OUString& 
rText, TextFrameIndex& nOffset) const
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index ddd2ef9c0acf..4c483a82edf5 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -3958,7 +3958,7 @@ void SwTextFrame::VisitPortions( SwPortionHandler& rPH ) 
const
                 pPor = pPor->GetNextPortion();
             }
 
-            rPH.LineBreak(pLine->Width());
+            rPH.LineBreak();
             pLine = pLine->GetNext();
         }
     }
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index 4bb015c9111b..c5bf9fea53ef 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -208,31 +208,15 @@ class XmlPortionDumper:public SwPortionHandler
                 text which is painted on-screen
         @param nType
                 type of this portion
-        @param nHeight
-                font size of the painted text
       */
     virtual void Special( TextFrameIndex nLength,
                           const OUString & rText,
                           PortionType nType,
-                          sal_Int32 nHeight,
-                          sal_Int32 nWidth,
                           const SwFont* pFont ) override
     {
         (void)xmlTextWriterStartElement(m_Writer, BAD_CAST("Special"));
-        (void)xmlTextWriterWriteFormatAttribute(m_Writer, BAD_CAST("nLength"), 
"%i",
-                                                
static_cast<int>(static_cast<sal_Int32>(nLength)));
         (void)xmlTextWriterWriteFormatAttribute(m_Writer, BAD_CAST("nType"), 
"%s",
                                                 
sw::PortionTypeToString(nType));
-        OString sText8 = OUStringToOString( rText, RTL_TEXTENCODING_UTF8 );
-        (void)xmlTextWriterWriteFormatAttribute(m_Writer, BAD_CAST("rText"), 
"%s", sText8.getStr());
-
-        if (nHeight > 0)
-            (void)xmlTextWriterWriteFormatAttribute(m_Writer, 
BAD_CAST("nHeight"), "%i",
-                                                    static_cast<int>(nHeight));
-
-        if (nWidth > 0)
-            (void)xmlTextWriterWriteFormatAttribute(m_Writer, 
BAD_CAST("nWidth"), "%i",
-                                                    static_cast<int>(nWidth));
 
         if (pFont)
             pFont->dumpAsXml(m_Writer);
@@ -242,18 +226,9 @@ class XmlPortionDumper:public SwPortionHandler
         m_Ofs += nLength;
     }
 
-    virtual void LineBreak( sal_Int32 nWidth ) override
+    virtual void LineBreak() override
     {
         (void)xmlTextWriterStartElement(m_Writer, BAD_CAST("LineBreak"));
-        if (nWidth > 0)
-            (void)xmlTextWriterWriteFormatAttribute(m_Writer, 
BAD_CAST("nWidth"), "%i",
-                                                    static_cast<int>(nWidth));
-        if (!m_aLine.isEmpty())
-        {
-            (void)xmlTextWriterWriteAttribute(m_Writer, BAD_CAST("Line"),
-                                              
BAD_CAST(m_aLine.toUtf8().getStr()));
-            m_aLine.clear();
-        }
         (void)xmlTextWriterEndElement(m_Writer);
     }
 
@@ -264,8 +239,6 @@ class XmlPortionDumper:public SwPortionHandler
     virtual void Skip( TextFrameIndex nLength ) override
     {
         (void)xmlTextWriterStartElement(m_Writer, BAD_CAST("Skip"));
-        (void)xmlTextWriterWriteFormatAttribute(m_Writer, BAD_CAST("nLength"), 
"%i",
-                                                
static_cast<int>(static_cast<sal_Int32>(nLength)));
         (void)xmlTextWriterEndElement(m_Writer);
         m_Ofs += nLength;
     }

Reply via email to