summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/crsr/bookmrk.cxx9
-rw-r--r--sw/source/core/doc/docredln.cxx16
-rw-r--r--sw/source/core/docnode/nodedump.cxx30
3 files changed, 22 insertions, 33 deletions
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 7eae97787740..6a6f5f6ef45d 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -182,9 +182,12 @@ namespace sw { namespace mark
xmlTextWriterStartElement(pWriter, BAD_CAST("markPos"));
GetMarkPos().dumpAsXml(pWriter);
xmlTextWriterEndElement(pWriter);
- xmlTextWriterStartElement(pWriter, BAD_CAST("otherMarkPos"));
- GetOtherMarkPos().dumpAsXml(pWriter);
- xmlTextWriterEndElement(pWriter);
+ if (IsExpanded())
+ {
+ xmlTextWriterStartElement(pWriter, BAD_CAST("otherMarkPos"));
+ GetOtherMarkPos().dumpAsXml(pWriter);
+ xmlTextWriterEndElement(pWriter);
+ }
xmlTextWriterEndElement(pWriter);
}
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 21824512beb7..ec1e7f963dfb 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -76,6 +76,22 @@ SwExtraRedlineTbl::~SwExtraRedlineTbl()
DeleteAndDestroyAll();
}
+void SwExtraRedlineTbl::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("swExtraRedlineTbl"));
+ xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this);
+
+ for (sal_uInt16 nCurExtraRedlinePos = 0; nCurExtraRedlinePos < GetSize(); ++nCurExtraRedlinePos)
+ {
+ const SwExtraRedline* pExtraRedline = GetRedline(nCurExtraRedlinePos);
+ xmlTextWriterStartElement(pWriter, BAD_CAST("swExtraRedline"));
+ xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this);
+ xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("symbol"), "%s", BAD_CAST(typeid(*pExtraRedline).name()));
+ xmlTextWriterEndElement(pWriter);
+ }
+ xmlTextWriterEndElement(pWriter);
+}
+
#if OSL_DEBUG_LEVEL > 0
bool CheckPosition( const SwPosition* pStt, const SwPosition* pEnd )
{
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index 43f628a9a7d3..ad37ca1058ba 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -292,34 +292,4 @@ void SwTxtNode::dumpAsXml( xmlTextWriterPtr w ) const
writer.endElement();
}
-void SwExtraRedlineTbl::dumpAsXml( xmlTextWriterPtr w ) const
-{
- WriterHelper writer( w );
-
- writer.startElement( "swextraredlinetbl" );
- writer.writeFormatAttribute( "ptr", "%p", this );
-
- const SwExtraRedlineTbl& extraRedlineTbl = (*this);
-
- for( sal_uInt16 nCurExtraRedlinePos = 0; nCurExtraRedlinePos < GetSize(); ++nCurExtraRedlinePos )
- {
- const SwExtraRedline* pExtraRedline = extraRedlineTbl.GetRedline( nCurExtraRedlinePos );
-
- writer.startElement( "swextraredline" );
- {
- const SwTableRowRedline* pTableRowRedline = dynamic_cast<const SwTableRowRedline*>(pExtraRedline);
- const SwTableCellRedline* pTableCellRedline = dynamic_cast<const SwTableCellRedline*>(pExtraRedline);
- if (pTableRowRedline)
- writer.writeFormatAttribute( "extra_redline_type", "%s", BAD_CAST( "table row" ) );
- else if (pTableCellRedline)
- writer.writeFormatAttribute( "extra_redline_type", "%s", BAD_CAST( "table cell" ) );
- else
- writer.writeFormatAttribute( "extra_redline_type", "%s", BAD_CAST( "UNKNOWN" ) );
- }
- writer.endElement( ); // extra_redline_data
- }
-
- writer.endElement( ); // swextraredlinetbl
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */