Kaydet (Commit) a208d965 authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: include the height of SwNumberPortions in layout dump

Change-Id: I7c7d78c212683e47f726fc91d59c9c495b78641e
üst c3f2401d
......@@ -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_uInt16 nLength, const String& rText, sal_uInt16 nType, sal_Int32 /*nHeight*/)
{
OSL_ENSURE( nModelPosition >= 0, "illegal position" );
OSL_ENSURE( (nModelPosition + nLength) <= pTxtNode->GetTxt().Len(),
......
......@@ -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);
virtual void Special(sal_uInt16 nLength, const String& rText, sal_uInt16 nType, sal_Int32 nHeight = 0);
virtual void LineBreak();
virtual void Skip(sal_uInt16 nLength);
virtual void Finish();
......
......@@ -66,7 +66,8 @@ public:
virtual void Special(
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_uInt16 nType, /// type of this portion
sal_Int32 nHeight = 0 /// font height of the painted text
) = 0;
/** line break. This method is called whenever a line break in the
......
......@@ -471,7 +471,10 @@ sal_Bool SwFldPortion::GetExpTxt( const SwTxtSizeInfo &rInf, XubString &rTxt ) c
void SwFldPortion::HandlePortion( SwPortionHandler& rPH ) const
{
rPH.Special( GetLen(), aExpand, GetWhichPor() );
sal_Int32 nH = 0;
if (pFnt)
nH = pFnt->GetSize(pFnt->GetActual()).Height();
rPH.Special( GetLen(), aExpand, GetWhichPor(), nH );
}
/*************************************************************************
......
......@@ -153,10 +153,13 @@ 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( sal_uInt16 nLength,
const String & rText,
sal_uInt16 nType )
sal_uInt16 nType,
sal_Int32 nHeight = 0 )
{
xmlTextWriterStartElement( writer, BAD_CAST( "Special" ) );
xmlTextWriterWriteFormatAttribute( writer,
......@@ -171,6 +174,9 @@ class XmlPortionDumper:public SwPortionHandler
xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "rText" ),
"%s", sText8.getStr( ) );
if (nHeight > 0)
xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("nHeight"), "%i", (int)nHeight);
xmlTextWriterEndElement( writer );
ofs += nLength;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment