LibreOffice Module xmloff (master) 1
|
This class handles the export of redline portions. More...
#include <XMLRedlineExport.hxx>
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 (std::u16string_view sApiName) |
convert the change type from API to XML names More... | |
void | WriteComment (std::u16string_view 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 |
SvXMLExport & | rExport |
ChangesMapType | aChangeMap |
ChangesVectorType * | pCurrentChangesList |
map of recorded changes More... | |
This class handles the export of redline portions.
It is to be called from XMLTextParagraphExport.
Definition at line 52 of file XMLRedlineExport.hxx.
|
explicit |
Definition at line 67 of file XMLRedlineExport.cxx.
XMLRedlineExport::~XMLRedlineExport | ( | ) |
Definition at line 77 of file XMLRedlineExport.cxx.
|
private |
convert the change type from API to XML names
Definition at line 399 of file XMLRedlineExport.cxx.
References sDeletion, sFormatChange, sInsertion, and u.
Referenced by ExportChangedRegion().
void XMLRedlineExport::ExportChange | ( | const css::uno::Reference< css::beans::XPropertySet > & | rPropSet, |
bool | bAutoStyle | ||
) |
export a change
rPropSet | PropertySet of RedlinePortion |
Definition at line 82 of file XMLRedlineExport.cxx.
References ExportChangeAutoStyle(), ExportChangeInline(), and pCurrentChangesList.
|
private |
export the auto styles used in this change
rPropSet | PropertySet of RedlinePortion |
Definition at line 241 of file XMLRedlineExport.cxx.
References Any, SvXMLExport::GetTextParagraphExport(), pCurrentChangesList, and rExport.
Referenced by ExportChange(), and ExportChangesListAutoStyles().
|
private |
export the changed-region element
Definition at line 335 of file XMLRedlineExport.cxx.
References SvXMLExport::AddAttribute(), SvXMLExport::AddAttributeIdLegacy(), Any, ConvertTypeName(), ExportChangeInfo(), GetRedlineID(), SvXMLExport::GetTextParagraphExport(), rExport, sType, xmloff::token::XML_CHANGED_REGION, xmloff::token::XML_FALSE, xmloff::token::XML_INSERTION, xmloff::token::XML_MERGE_LAST_PARAGRAPH, and XML_NAMESPACE_TEXT.
Referenced by ExportChangesListElements().
|
private |
export a change-info element (from a PropertySet)
Referenced by ExportChangedRegion().
|
private |
export a change-info element (from PropertyValues)
|
private |
export the change mark contained in the text body
rPropSet | PropertySet of RedlinePortion |
Definition at line 304 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 105 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)
|
private |
export the auto styles needed by the changes list
Definition at line 267 of file XMLRedlineExport.cxx.
References Any, DBG_ASSERT, ExportChangeAutoStyle(), SvXMLExport::GetModel(), and rExport.
Referenced by ExportChangesList().
|
private |
export the changes list (<text:tracked-changes>)
Definition at line 180 of file XMLRedlineExport.cxx.
References SvXMLExport::AddAttribute(), Any, DBG_ASSERT, ExportChangedRegion(), SvXMLExport::GetModel(), rExport, xmloff::token::XML_FALSE, XML_NAMESPACE_TEXT, xmloff::token::XML_TRACK_CHANGES, xmloff::token::XML_TRACKED_CHANGES, and xmloff::token::XML_TRUE.
Referenced by ExportChangesList().
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
rContent | XTextContent; 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
rSection | XTextSection; must also be an XPropertySet |
|
staticprivate |
Get ID string!
Create a Redline-ID.
Definition at line 424 of file XMLRedlineExport.cxx.
References Any.
Referenced by ExportChangedRegion(), and ExportChangeInline().
void XMLRedlineExport::SetCurrentXText | ( | ) |
Do not record changes.
Same as SetCurrentXText(Reference<XText>) with empty argument.
Definition at line 174 of file XMLRedlineExport.cxx.
References pCurrentChangesList.
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
|
private |
write a comment string as sequence of <text:p> elements
Definition at line 628 of file XMLRedlineExport.cxx.
References SvXMLExport::Characters(), SvXMLTokenEnumerator::getNextToken(), rExport, XML_NAMESPACE_TEXT, and xmloff::token::XML_P.
|
private |
Definition at line 69 of file XMLRedlineExport.hxx.
|
private |
map of recorded changes
list of current changes; is NULL or points to member of aChangeMap
Definition at line 72 of file XMLRedlineExport.hxx.
Referenced by ExportChange(), ExportChangeAutoStyle(), and SetCurrentXText().
|
private |
Definition at line 58 of file XMLRedlineExport.hxx.
Referenced by ExportChangeAutoStyle(), ExportChangedRegion(), ExportChangeInline(), ExportChangesListAutoStyles(), ExportChangesListElements(), and WriteComment().
|
private |
Definition at line 54 of file XMLRedlineExport.hxx.
Referenced by ConvertTypeName().
|
private |
Definition at line 55 of file XMLRedlineExport.hxx.
Referenced by ConvertTypeName().
|
private |
Definition at line 56 of file XMLRedlineExport.hxx.
Referenced by ConvertTypeName().