LibreOffice Module xmloff (master)  1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
XMLRedlineExport Class Reference

This class handles the export of redline portions. More...

#include <XMLRedlineExport.hxx>

Collaboration diagram for XMLRedlineExport:
[legend]

Public Member Functions

 XMLRedlineExport (SvXMLExport &rExp)
 
 ~XMLRedlineExport ()
 
void ExportChange (const css::uno::Reference< css::beans::XPropertySet > &rPropSet, bool bAutoStyle)
 export a change More...
 
void ExportChangesList (bool bAutoStyles)
 export the list of changes (complete list minus recorded changed) More...
 
void ExportChangesList (const css::uno::Reference< css::text::XText > &rText, bool bAutoStyles)
 export the list of changes (recorded changes for this XText only) More...
 
void SetCurrentXText (const css::uno::Reference< css::text::XText > &rText)
 set the current XText for which changes should be recorded. More...
 
void SetCurrentXText ()
 Do not record changes. More...
 
void ExportStartOrEndRedline (const css::uno::Reference< css::beans::XPropertySet > &rPropSet, bool bStart)
 export redline marks which start or end at start nodes, i.e. More...
 
void ExportStartOrEndRedline (const css::uno::Reference< css::text::XTextContent > &rContent, bool bStart)
 start or end of text entity (e.g. paragraph)? More...
 
void ExportStartOrEndRedline (const css::uno::Reference< css::text::XTextSection > &rSection, bool bStart)
 convenience method, calls XPropertySet-version of this method More...
 

Private Member Functions

void ExportChangeInline (const css::uno::Reference< css::beans::XPropertySet > &rPropSet)
 export the change mark contained in the text body More...
 
void ExportChangeAutoStyle (const css::uno::Reference< css::beans::XPropertySet > &rPropSet)
 export the auto styles used in this change More...
 
void ExportChangesListElements ()
 export the changes list (<text:tracked-changes>) More...
 
void ExportChangesListAutoStyles ()
 export the auto styles needed by the changes list More...
 
void ExportChangedRegion (const css::uno::Reference< css::beans::XPropertySet > &rPropSet)
 export the changed-region element More...
 
void ExportChangeInfo (const css::uno::Reference< css::beans::XPropertySet > &rPropSet)
 export a change-info element (from a PropertySet) More...
 
void ExportChangeInfo (const css::uno::Sequence< css::beans::PropertyValue > &rValues)
 export a change-info element (from PropertyValues) More...
 
OUString const & ConvertTypeName (const OUString &sApiName)
 convert the change type from API to XML names More...
 
void WriteComment (const OUString &rComment)
 write a comment string as sequence of <text:p> elements More...
 

Static Private Member Functions

static OUString GetRedlineID (const css::uno::Reference< css::beans::XPropertySet > &rPropSet)
 Get ID string! More...
 

Private Attributes

const OUString sDeletion
 
const OUString sFormatChange
 
const OUString sInsertion
 
SvXMLExportrExport
 
ChangesMapType aChangeMap
 
ChangesVectorTypepCurrentChangesList
 map of recorded changes More...
 

Detailed Description

This class handles the export of redline portions.

It is to be called from XMLTextParagraphExport.

Definition at line 53 of file XMLRedlineExport.hxx.

Constructor & Destructor Documentation

XMLRedlineExport::XMLRedlineExport ( SvXMLExport rExp)
explicit

Definition at line 64 of file XMLRedlineExport.cxx.

XMLRedlineExport::~XMLRedlineExport ( )

Definition at line 74 of file XMLRedlineExport.cxx.

Member Function Documentation

OUString const & XMLRedlineExport::ConvertTypeName ( const OUString &  sApiName)
private

convert the change type from API to XML names

Definition at line 397 of file XMLRedlineExport.cxx.

References sDeletion, sFormatChange, and sInsertion.

Referenced by ExportChangedRegion().

void XMLRedlineExport::ExportChange ( const css::uno::Reference< css::beans::XPropertySet > &  rPropSet,
bool  bAutoStyle 
)

export a change

Parameters
rPropSetPropertySet of RedlinePortion

Definition at line 79 of file XMLRedlineExport.cxx.

References ExportChangeAutoStyle(), ExportChangeInline(), and pCurrentChangesList.

void XMLRedlineExport::ExportChangeAutoStyle ( const css::uno::Reference< css::beans::XPropertySet > &  rPropSet)
private

export the auto styles used in this change

Parameters
rPropSetPropertySet of RedlinePortion

Definition at line 239 of file XMLRedlineExport.cxx.

References Any, SvXMLExport::GetTextParagraphExport(), pCurrentChangesList, and rExport.

Referenced by ExportChange(), and ExportChangesListAutoStyles().

void XMLRedlineExport::ExportChangedRegion ( const css::uno::Reference< css::beans::XPropertySet > &  rPropSet)
private
void XMLRedlineExport::ExportChangeInfo ( const css::uno::Reference< css::beans::XPropertySet > &  rPropSet)
private

export a change-info element (from a PropertySet)

Referenced by ExportChangedRegion().

void XMLRedlineExport::ExportChangeInfo ( const css::uno::Sequence< css::beans::PropertyValue > &  rValues)
private

export a change-info element (from PropertyValues)

void XMLRedlineExport::ExportChangeInline ( const css::uno::Reference< css::beans::XPropertySet > &  rPropSet)
private

export the change mark contained in the text body

Parameters
rPropSetPropertySet of RedlinePortion

Definition at line 302 of file XMLRedlineExport.cxx.

References SvXMLExport::AddAttribute(), Any, GetRedlineID(), rExport, xmloff::token::XML_CHANGE, xmloff::token::XML_CHANGE_END, xmloff::token::XML_CHANGE_ID, xmloff::token::XML_CHANGE_START, XML_NAMESPACE_TEXT, and xmloff::token::XML_TOKEN_INVALID.

Referenced by ExportChange().

void XMLRedlineExport::ExportChangesList ( bool  bAutoStyles)

export the list of changes (complete list minus recorded changed)

Definition at line 102 of file XMLRedlineExport.cxx.

References ExportChangesListAutoStyles(), and ExportChangesListElements().

void XMLRedlineExport::ExportChangesList ( const css::uno::Reference< css::text::XText > &  rText,
bool  bAutoStyles 
)

export the list of changes (recorded changes for this XText only)

void XMLRedlineExport::ExportChangesListAutoStyles ( )
private

export the auto styles needed by the changes list

Definition at line 265 of file XMLRedlineExport.cxx.

References Any, DBG_ASSERT, ExportChangeAutoStyle(), SvXMLExport::GetModel(), and rExport.

Referenced by ExportChangesList().

void XMLRedlineExport::ExportChangesListElements ( )
private
void XMLRedlineExport::ExportStartOrEndRedline ( const css::uno::Reference< css::beans::XPropertySet > &  rPropSet,
bool  bStart 
)

export redline marks which start or end at start nodes, i.e.

that include the complete paragraph/table/section

void XMLRedlineExport::ExportStartOrEndRedline ( const css::uno::Reference< css::text::XTextContent > &  rContent,
bool  bStart 
)

start or end of text entity (e.g. paragraph)?

convenience method, calls XPropertySet-version of this method

Parameters
rContentXTextContent; must also be an XPropertySet
void XMLRedlineExport::ExportStartOrEndRedline ( const css::uno::Reference< css::text::XTextSection > &  rSection,
bool  bStart 
)

convenience method, calls XPropertySet-version of this method

Parameters
rSectionXTextSection; must also be an XPropertySet
OUString XMLRedlineExport::GetRedlineID ( const css::uno::Reference< css::beans::XPropertySet > &  rPropSet)
staticprivate

Get ID string!

Create a Redline-ID.

Definition at line 422 of file XMLRedlineExport.cxx.

References Any.

Referenced by ExportChangedRegion(), and ExportChangeInline().

void XMLRedlineExport::SetCurrentXText ( const css::uno::Reference< css::text::XText > &  rText)

set the current XText for which changes should be recorded.

An empty XText means: don't record changes

void XMLRedlineExport::SetCurrentXText ( )

Do not record changes.

Same as SetCurrentXText(Reference<XText>) with empty argument.

Definition at line 172 of file XMLRedlineExport.cxx.

References pCurrentChangesList.

void XMLRedlineExport::WriteComment ( const OUString &  rComment)
private

write a comment string as sequence of <text:p> elements

Definition at line 608 of file XMLRedlineExport.cxx.

References SvXMLExport::Characters(), SvXMLTokenEnumerator::getNextToken(), rExport, XML_NAMESPACE_TEXT, and xmloff::token::XML_P.

Member Data Documentation

ChangesMapType XMLRedlineExport::aChangeMap
private

Definition at line 70 of file XMLRedlineExport.hxx.

ChangesVectorType* XMLRedlineExport::pCurrentChangesList
private

map of recorded changes

list of current changes; is NULL or points to member of aChangeMap

Definition at line 73 of file XMLRedlineExport.hxx.

Referenced by ExportChange(), ExportChangeAutoStyle(), and SetCurrentXText().

SvXMLExport& XMLRedlineExport::rExport
private
const OUString XMLRedlineExport::sDeletion
private

Definition at line 55 of file XMLRedlineExport.hxx.

Referenced by ConvertTypeName().

const OUString XMLRedlineExport::sFormatChange
private

Definition at line 56 of file XMLRedlineExport.hxx.

Referenced by ConvertTypeName().

const OUString XMLRedlineExport::sInsertion
private

Definition at line 57 of file XMLRedlineExport.hxx.

Referenced by ConvertTypeName().


The documentation for this class was generated from the following files: