diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-08-16 12:21:58 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-08-16 16:01:33 +0200 |
commit | 8f846dab6db8e912ccb87209d365f1e20d13d293 (patch) | |
tree | 677fd5ed3687e333cf28e8c14f28d686080c56c2 /sw | |
parent | 8a4c858d7a16be7ec4215d19652135bda782831a (diff) |
sw layout dump: include the height and width of SwFlyPortion
Change-Id: Ib47087a9dcb96779958edfc1a984cf38cabd1086
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/access/accportions.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/access/accportions.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/SwPortionHandler.hxx | 3 | ||||
-rw-r--r-- | sw/source/core/text/porlin.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/xmldump.cxx | 6 |
5 files changed, 10 insertions, 5 deletions
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx index a2b039d862f1..d802a2b86c6f 100644 --- a/sw/source/core/access/accportions.cxx +++ b/sw/source/core/access/accportions.cxx @@ -142,7 +142,7 @@ void SwAccessiblePortionData::Text(sal_uInt16 nLength, sal_uInt16 nType) } void SwAccessiblePortionData::Special( - sal_uInt16 nLength, const String& rText, sal_uInt16 nType, sal_Int32 /*nHeight*/) + sal_uInt16 nLength, const String& rText, sal_uInt16 nType, sal_Int32 /*nHeight*/, sal_Int32 /*nWidth*/) { OSL_ENSURE( nModelPosition >= 0, "illegal position" ); OSL_ENSURE( (nModelPosition + nLength) <= pTxtNode->GetTxt().Len(), diff --git a/sw/source/core/access/accportions.hxx b/sw/source/core/access/accportions.hxx index 4b7f19a409a6..ef9093b0bc21 100644 --- a/sw/source/core/access/accportions.hxx +++ b/sw/source/core/access/accportions.hxx @@ -95,7 +95,7 @@ public: // SwPortionHandler methods virtual void Text(sal_uInt16 nLength, sal_uInt16 nType); - virtual void Special(sal_uInt16 nLength, const String& rText, sal_uInt16 nType, sal_Int32 nHeight = 0); + virtual void Special(sal_uInt16 nLength, const String& rText, sal_uInt16 nType, sal_Int32 nHeight = 0, sal_Int32 nWidth = 0); virtual void LineBreak(); virtual void Skip(sal_uInt16 nLength); virtual void Finish(); diff --git a/sw/source/core/inc/SwPortionHandler.hxx b/sw/source/core/inc/SwPortionHandler.hxx index 5f81b9a6798b..d3a87790cb4e 100644 --- a/sw/source/core/inc/SwPortionHandler.hxx +++ b/sw/source/core/inc/SwPortionHandler.hxx @@ -67,7 +67,8 @@ public: sal_uInt16 nLength, /// length of this portion in the model string const String& rText, /// text which is painted on-screen sal_uInt16 nType, /// type of this portion - sal_Int32 nHeight = 0 /// font height of the painted text + sal_Int32 nHeight = 0, /// font height of the painted text + sal_Int32 nWidth = 0 /// width of this portion ) = 0; /** line break. This method is called whenever a line break in the diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx index c93c344e3a1a..a9406c81f0d3 100644 --- a/sw/source/core/text/porlin.cxx +++ b/sw/source/core/text/porlin.cxx @@ -395,7 +395,7 @@ sal_Bool SwLinePortion::GetExpTxt( const SwTxtSizeInfo &, XubString & ) const void SwLinePortion::HandlePortion( SwPortionHandler& rPH ) const { String aString; - rPH.Special( GetLen(), aString, GetWhichPor() ); + rPH.Special( GetLen(), aString, GetWhichPor(), Height(), Width() ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx index 6c99b429c590..38339d939518 100644 --- a/sw/source/core/text/xmldump.cxx +++ b/sw/source/core/text/xmldump.cxx @@ -160,7 +160,8 @@ class XmlPortionDumper:public SwPortionHandler virtual void Special( sal_uInt16 nLength, const String & rText, sal_uInt16 nType, - sal_Int32 nHeight = 0 ) + sal_Int32 nHeight, + sal_Int32 nWidth ) { xmlTextWriterStartElement( writer, BAD_CAST( "Special" ) ); xmlTextWriterWriteFormatAttribute( writer, @@ -178,6 +179,9 @@ class XmlPortionDumper:public SwPortionHandler if (nHeight > 0) xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("nHeight"), "%i", (int)nHeight); + if (nWidth > 0) + xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("nWidth"), "%i", (int)nWidth); + xmlTextWriterEndElement( writer ); ofs += nLength; } |