summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r--sw/source/filter/ww8/attributeoutputbase.hxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx2
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx12
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.hxx5
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx7
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx2
-rw-r--r--sw/source/filter/ww8/ww8attributeoutput.hxx2
8 files changed, 21 insertions, 13 deletions
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index 4b08cbfa13c6..c257a02582ef 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -159,7 +159,7 @@ public:
virtual void EmptyParagraph() = 0;
/// Start of the text run.
- virtual void StartRun( const SwRedlineData* pRedlineData ) = 0;
+ virtual void StartRun( const SwRedlineData* pRedlineData, bool bSingleEmptyRun = false ) = 0;
/// End of the text run.
virtual void EndRun() = 0;
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 0ea06b7b3527..f8615c68376e 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -499,7 +499,7 @@ void DocxAttributeOutput::EndParagraphProperties()
m_pSerializer->mergeTopMarks( sax_fastparser::MERGE_MARKS_PREPEND );
}
-void DocxAttributeOutput::StartRun( const SwRedlineData* pRedlineData )
+void DocxAttributeOutput::StartRun( const SwRedlineData* pRedlineData, bool /*bSingleEmptyRun*/ )
{
// if there is some redlining in the document, output it
StartRedline( pRedlineData );
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index 79c8b026ae42..12a87d457fcf 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -90,7 +90,7 @@ public:
virtual void EndParagraphProperties();
/// Start of the text run.
- virtual void StartRun( const SwRedlineData* pRedlineData );
+ virtual void StartRun( const SwRedlineData* pRedlineData, bool bSingleEmptyRun = false );
/// End of the text run.
virtual void EndRun();
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 5019a404f8b0..0c3533b88c85 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -374,11 +374,13 @@ void RtfAttributeOutput::EndParagraphProperties()
m_rExport.Strm() << m_aStyles.makeStringAndClear().getStr();
}
-void RtfAttributeOutput::StartRun( const SwRedlineData* pRedlineData )
+void RtfAttributeOutput::StartRun( const SwRedlineData* pRedlineData, bool bSingleEmptyRun )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
- m_aRun.append('{');
+ m_bSingleEmptyRun = bSingleEmptyRun;
+ if (!m_bSingleEmptyRun)
+ m_aRun.append('{');
// if there is some redlining in the document, output it
Redline( pRedlineData );
@@ -391,7 +393,8 @@ void RtfAttributeOutput::EndRun()
OSL_TRACE("%s", OSL_THIS_FUNC);
m_aRun.append(m_rExport.sNewLine);
m_aRun.append(m_aRunText.makeStringAndClear());
- m_aRun.append('}');
+ if (!m_bSingleEmptyRun)
+ m_aRun.append('}');
}
void RtfAttributeOutput::StartRunProperties()
@@ -3020,7 +3023,8 @@ RtfAttributeOutput::RtfAttributeOutput( RtfExport &rExport )
m_bWroteCellInfo( false ),
m_bHadFieldResult( false ),
m_bTableRowEnded( false ),
- m_aCells()
+ m_aCells(),
+ m_bSingleEmptyRun(false)
{
OSL_TRACE("%s", OSL_THIS_FUNC);
}
diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx
index eea4b8c70d59..406f0639adeb 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.hxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.hxx
@@ -63,7 +63,7 @@ public:
virtual void EndParagraphProperties();
/// Start of the text run.
- virtual void StartRun( const SwRedlineData* pRedlineData );
+ virtual void StartRun( const SwRedlineData* pRedlineData, bool bSingleEmptyRun = false );
/// End of the text run.
virtual void EndRun();
@@ -539,6 +539,9 @@ private:
/// Number of cells from the table definition, by depth.
std::map<sal_uInt32,sal_uInt32> m_aCells;
+
+ /// If we're in a paragraph that has a single empty run only.
+ bool m_bSingleEmptyRun;
public:
RtfAttributeOutput( RtfExport &rExport );
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 95895e82f3aa..50e6c60c0248 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -1810,12 +1810,13 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
do {
const SwRedlineData* pRedlineData = aAttrIter.GetRedline( nAktPos );
- AttrOutput().StartRun( pRedlineData );
+ xub_StrLen nNextAttr = GetNextPos( &aAttrIter, rNode, nAktPos );
+ // Is this the only run in this paragraph and it's empty?
+ bool bSingleEmptyRun = nAktPos == 0 && nNextAttr == 0;
+ AttrOutput().StartRun( pRedlineData, bSingleEmptyRun );
if( nTxtTyp == TXT_FTN || nTxtTyp == TXT_EDN )
AttrOutput().FootnoteEndnoteRefTag();
- xub_StrLen nNextAttr = GetNextPos( &aAttrIter, rNode, nAktPos );
-
if( nNextAttr > nEnd )
nNextAttr = nEnd;
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 79deb333a8fc..fd269dee9b4f 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -972,7 +972,7 @@ void WW8AttributeOutput::StartRunProperties()
}
-void WW8AttributeOutput::StartRun( const SwRedlineData* pRedlineData )
+void WW8AttributeOutput::StartRun( const SwRedlineData* pRedlineData, bool /*bSingleEmptyRun*/ )
{
if (pRedlineData)
{
diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx
index fa9c1703e3b7..f32a038eedc6 100644
--- a/sw/source/filter/ww8/ww8attributeoutput.hxx
+++ b/sw/source/filter/ww8/ww8attributeoutput.hxx
@@ -55,7 +55,7 @@ public:
/// Start of the text run.
///
- virtual void StartRun( const SwRedlineData* pRedlineData );
+ virtual void StartRun( const SwRedlineData* pRedlineData, bool bSingleEmptyRun = false );
/// End of the text run.
///