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

fdo#49692 fix RTF export of empty paragraph numbering rules

When there is a numbering rule, the fallback text is constructed so that
whitespace separates the numbering and the paragraph text. When the
numbering is empty, we don't need that separator.

Change-Id: I17a11ddd73addc8c95a0c2b54402e6dd2705d094
üst 9980e69e
...@@ -2513,10 +2513,9 @@ void RtfAttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL ...@@ -2513,10 +2513,9 @@ void RtfAttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL
else else
sTxt = pTxtNd->GetNumString(); sTxt = pTxtNd->GetNumString();
m_aStyles.append(' ');
if (sTxt.Len()) if (sTxt.Len())
{ {
m_aStyles.append(' ');
m_aStyles.append(m_rExport.OutString(sTxt, m_rExport.eDefaultEncoding)); m_aStyles.append(m_rExport.OutString(sTxt, m_rExport.eDefaultEncoding));
} }
...@@ -2524,7 +2523,8 @@ void RtfAttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL ...@@ -2524,7 +2523,8 @@ void RtfAttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL
{ {
if( OUTLINE_RULE != pRule->GetRuleType() ) if( OUTLINE_RULE != pRule->GetRuleType() )
{ {
m_aStyles.append(OOO_STRING_SVTOOLS_RTF_TAB); if (sTxt.Len())
m_aStyles.append(OOO_STRING_SVTOOLS_RTF_TAB);
m_aStyles.append('}'); m_aStyles.append('}');
m_aStyles.append(OOO_STRING_SVTOOLS_RTF_ILVL); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_ILVL);
if( nLvl > 8 ) // RTF knows only 9 levels if( nLvl > 8 ) // RTF knows only 9 levels
......
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