LibreOffice Module sw (master)  1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
RtfExport Class Reference

The class that does all the actual RTF export-related work. More...

#include <rtfexport.hxx>

Inheritance diagram for RtfExport:
[legend]
Collaboration diagram for RtfExport:
[legend]

Public Member Functions

AttributeOutputBaseAttrOutput () const override
 Access to the attribute output class. More...
 
MSWordSectionsSections () const override
 Access to the sections/headers/footres. More...
 
RtfSdrExportSdrExporter () const
 Access to the Rtf Sdr exporter. More...
 
bool SupportsOneColumnBreak () const override
 Determines if column break with one column should be exported or not. More...
 
bool FieldsQuoted () const override
 Determines if the import filter already quoted fields or not. More...
 
bool AddSectionBreaksForTOX () const override
 Determines the Section Breaks are to be added for TOX Section. More...
 
bool PreferPageBreakBefore () const override
 If saving page break is preferred as a paragraph attribute (yes) or as a special character (no). More...
 
bool CollapseScriptsforWordOk (sal_uInt16 nScript, sal_uInt16 nWhich) override
 Guess the script (asian/western). More...
 
void AppendBookmarks (const SwTextNode &rNode, sal_Int32 nCurrentPos, sal_Int32 nLen) override
 
void AppendBookmark (const OUString &rName) override
 
void AppendAnnotationMarks (const SwWW8AttrIter &rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen) override
 
void ExportGrfBullet (const SwTextNode &rNd) override
 
void WriteCR (ww8::WW8TableNodeInfoInner::Pointer_t) override
 
void WriteChar (sal_Unicode c) override
 
void WriteNumbering () override
 Write the numbering table. More...
 
void WriteRevTab ()
 Write the revision table. More...
 
void WriteHeadersFooters (sal_uInt8 nHeadFootFlags, const SwFrameFormat &rFormat, const SwFrameFormat &rLeftFormat, const SwFrameFormat &rFirstPageFormat, sal_uInt8 nBreakCode) override
 Output the actual headers and footers. More...
 
void OutputField (const SwField *pField, ww::eField eFieldType, const OUString &rFieldCmd, FieldFlags nMode=FieldFlags::All) override
 Write the field. More...
 
void WriteFormData (const ::sw::mark::IFieldmark &rFieldmark) override
 Write the data of the form field. More...
 
void WriteHyperlinkData (const ::sw::mark::IFieldmark &rFieldmark) override
 
void DoComboBox (const OUString &rName, const OUString &rHelp, const OUString &ToolTip, const OUString &rSelected, css::uno::Sequence< OUString > &rListItems) override
 
void DoFormText (const SwInputField *pField) override
 
sal_uLong ReplaceCr (sal_uInt8 nChar) override
 
ExportFormat GetExportFormat () const override
 
 RtfExport (RtfExportFilter *pFilter, SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM *pOriginalPam, Writer *pWriter, bool bOutOutlineOnly=false)
 Pass the pDocument, pCurrentPam and pOriginalPam to the base class. More...
 
 RtfExport (const RtfExport &)=delete
 
RtfExportoperator= (const RtfExport &)=delete
 
 ~RtfExport () override
 Destructor. More...
 
rtl_TextEncoding GetDefaultEncoding () const
 
void SetCurrentEncoding (rtl_TextEncoding eCurrentEncoding)
 
rtl_TextEncoding GetCurrentEncoding () const
 
void SetRTFFlySyntax (bool bRTFFlySyntax)
 
bool GetRTFFlySyntax () const
 
sal_uLong GetCurrentNodeIndex () const
 
SvStreamStrm ()
 
void setStream ()
 From now on, let Strm() return a memory stream, not a real one. More...
 
OString getStream ()
 Get the contents of the memory stream as a string. More...
 
void resetStream ()
 Return back to the real stream. More...
 
SvStreamOutULong (sal_uLong nVal)
 
SvStreamOutLong (long nVal)
 
void OutUnicode (const sal_Char *pToken, const OUString &rContent, bool bUpr=false)
 
void OutDateTime (const sal_Char *pStr, const css::util::DateTime &rDT)
 
void OutPageDescription (const SwPageDesc &rPgDsc, bool bCheckForFirstPage)
 
sal_uInt16 GetColor (const Color &rColor) const
 
void InsColor (const Color &rCol)
 
void InsColorLine (const SvxBoxItem &rBox)
 
void OutColorTable ()
 
sal_uInt16 GetRedline (const OUString &rAuthor)
 
const OUString * GetRedline (sal_uInt16 nId)
 
void InsStyle (sal_uInt16 nId, const OString &rStyle)
 
OString * GetStyle (sal_uInt16 nId)
 
const SfxItemSetGetFirstPageItemSet ()
 
- Public Member Functions inherited from MSWordExportBase
ErrCode ExportDocument (bool bWriteAll)
 The main function to export the document. More...
 
void WriteText ()
 Iterate through the nodes and call the appropriate OutputNode() on them. More...
 
bool IsInTable () const
 Return whether currently exported node is in table. More...
 
void WriteSpecialText (sal_uLong nStart, sal_uLong nEnd, sal_uInt8 nTTyp)
 Set the pCurPam appropriately and call WriteText(). More...
 
void ExportPoolItemsToCHP (ww8::PoolItems &rItems, sal_uInt16 nScript, const SvxFontItem *pFont, bool bWriteCombChars=false)
 Export the pool items to attributes (through an attribute output class). More...
 
sal_uInt16 GetId (const SwNumRule &rNumRule)
 Return the numeric id of the numbering rule. More...
 
sal_uInt16 GetId (const SwTextFormatColl &rColl) const
 Return the numeric id of the style. More...
 
sal_uInt16 GetId (const SwCharFormat *pFormat) const
 Return the numeric id of the style. More...
 
sal_uInt16 GetId (const SwTOXType &rTOXType)
 
sal_uInt16 GetId (const SvxFontItem &rFont)
 Return the numeric id of the font (and add it to the font list if needed) More...
 
void GetId (const wwFont &rFont)
 
const SfxPoolItemGetItem (sal_uInt16 nWhich) const
 
template<class T >
const T & GetItem (TypedWhichId< T > nWhich) const
 
bool HasRefToObject (sal_uInt16 nTyp, const OUString *pName, sal_uInt16 nSeqNo)
 Find the reference. More...
 
void OutputItemSet (const SfxItemSet &rSet, bool bPapFormat, bool bChpFormat, sal_uInt16 nScript, bool bExportParentItemSet)
 Use OutputItem() on an item set according to the parameters. More...
 
SvxFrameDirection GetDefaultFrameDirection () const
 
SvxFrameDirection TrueFrameDirection (const SwFrameFormat &rFlyFormat) const
 Right to left? More...
 
SvxFrameDirection GetCurrentPageDirection () const
 Right to left? More...
 
sal_uInt16 DuplicateNumRule (const SwNumRule *pRule, sal_uInt8 nLevel, sal_uInt16 nVal)
 In case of numbering restart. More...
 
virtual bool ignoreAttributeForStyleDefaults (sal_uInt16) const
 Used to filter out attributes that can be e.g. written to .doc but not to .docx. More...
 
virtual bool AllowPostponedTextInTable () const
 Text in tables can be postponed except for .doc. More...
 
virtual void AppendSmartTags (SwTextNode &)
 
void OutputFormat (const SwFormat &rFormat, bool bPapFormat, bool bChpFormat, bool bFlyFormat=false)
 Output attributes. More...
 
const SfxItemSetGetCurItemSet () const
 Getter for pISet. More...
 
void SetCurItemSet (const SfxItemSet *pS)
 Setter for pISet. More...
 
virtual void SaveData (sal_uLong nStt, sal_uLong nEnd)
 Remember some of the members so that we can recurse in WriteText(). More...
 
virtual void RestoreData ()
 Restore what was saved in SaveData(). More...
 
bool OutputFollowPageDesc (const SfxItemSet *pSet, const SwTextNode *pNd)
 The return value indicates, if a follow page desc is written. More...
 
void WriteHeaderFooterText (const SwFormat &rFormat, bool bHeader)
 Write header/footer text. More...
 
void OutputSectionBreaks (const SfxItemSet *pSet, const SwNode &rNd, bool isCellOpen=false, bool isTextNodeEmpty=false)
 Start new section. More...
 
void SectionProperties (const WW8_SepInfo &rSectionInfo, WW8_PdAttrDesc *pA=nullptr)
 Write section properties. More...
 
void NumberingDefinitions ()
 Write static data of SwNumRule - LSTF. More...
 
void AbstractNumberingDefinitions ()
 Write all Levels for all SwNumRules - LVLF. More...
 
void SubstituteBullet (OUString &rNumStr, rtl_TextEncoding &rChrSet, OUString &rFontName) const
 
virtual void SetupSectionPositions (WW8_PdAttrDesc *)
 Setup the pA's info. More...
 
void SetHdFtPageRoot (const SwTextNode *pNd)
 Top node of host page when in header/footer. More...
 
const SwTextNodeGetHdFtPageRoot () const
 Top node of host page when in header/footer. More...
 
bool GetNumberFormat (const SwField &rField, OUString &rStr)
 
const SfxPoolItemHasItem (sal_uInt16 nWhich) const
 
int GetGrfIndex (const SvxBrushItem &rBrush)
 Returns the index of a picture bullet, used in numberings. More...
 
 MSWordExportBase (SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM *pOriginalPam)
 
virtual ~MSWordExportBase ()
 

Protected Member Functions

ErrCode ExportDocument_Impl () override
 Format-dependent part of the actual export. More...
 
void SectionBreaksAndFrames (const SwTextNode &) override
 
void PrepareNewPageDesc (const SfxItemSet *pSet, const SwNode &rNd, const SwFormatPageDesc *pNewPgDescFormat, const SwPageDesc *pNewPgDesc) override
 Get ready for a new section. More...
 
bool DisallowInheritingOutlineNumbering (const SwFormat &rFormat) override
 Return value indicates if an inherited outline numbering is suppressed. More...
 
void OutputTextNode (SwTextNode &rNode) override
 Output SwTextNode is depending on outline export mode. More...
 
void OutputEndNode (const SwEndNode &rEndNode) override
 Output SwEndNode. More...
 
void OutputGrfNode (const SwGrfNode &rGrfNode) override
 Output SwGrfNode. More...
 
void OutputOLENode (const SwOLENode &rOLENode) override
 Output SwOLENode. More...
 
void OutputLinkedOLE (const OUString &rLink) override
 
void AppendSection (const SwPageDesc *pPageDesc, const SwSectionFormat *pFormat, sal_uLong nLnNum) override
 
- Protected Member Functions inherited from MSWordExportBase
sal_Int32 GetNextPos (SwWW8AttrIter const *pAttrIter, const SwTextNode &rNode, sal_Int32 nCurrentPos)
 Get the next position in the text node to output. More...
 
void UpdatePosition (SwWW8AttrIter *pAttrIter, sal_Int32 nCurrentPos)
 Update the information for GetNextPos(). More...
 
void GatherChapterFields ()
 Setup the chapter fields (maChapterFieldLocs). More...
 
void AddLinkTarget (const OUString &rURL)
 
void CollectOutlineBookmarks (const SwDoc &rDoc)
 
bool SetCurrentPageDescFromNode (const SwNode &rNd)
 
bool ContentContainsChapterField (const SwFormatContent &rContent) const
 
bool FormatHdFtContainsChapterField (const SwFrameFormat &rFormat) const
 
void OutputStartNode (const SwStartNode &)
 Output SwStartNode. More...
 
void OutputSectionNode (const SwSectionNode &)
 Output SwSectionNode. More...
 
void OutputContentNode (SwContentNode &)
 Call the right (virtual) function according to the type of the item. More...
 
bool NearestBookmark (sal_Int32 &rNearest, const sal_Int32 nCurrentPos, bool bNextPositionOnly)
 Find the nearest bookmark from the current position. More...
 
void GetSortedBookmarks (const SwTextNode &rNd, sal_Int32 nCurrentPos, sal_Int32 nLen)
 
bool GetBookmarks (const SwTextNode &rNd, sal_Int32 nStt, sal_Int32 nEnd, IMarkVector &rArr)
 
void NearestAnnotationMark (sal_Int32 &rNearest, const sal_Int32 nCurrentPos, bool bNextPositionOnly)
 Find the nearest annotation mark from the current position. More...
 
void GetSortedAnnotationMarks (const SwWW8AttrIter &rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen)
 
bool GetAnnotationMarks (const SwWW8AttrIter &rAttrs, sal_Int32 nStt, sal_Int32 nEnd, IMarkVector &rArr)
 
const NfKeywordTableGetNfKeywordTable ()
 
void SetCurPam (sal_uLong nStt, sal_uLong nEnd)
 
std::shared_ptr< SvxBrushItemgetBackground ()
 Get background color of the document, if there is one. More...
 
int CollectGrfsOfBullets ()
 Populates m_vecBulletPic with all the bullet graphics used by numberings. More...
 
void BulletDefinitions ()
 Write the numbering picture bullets. More...
 
bool NeedSectionBreak (const SwNode &rNd) const
 
bool NeedTextNodeSplit (const SwTextNode &rNd, SwSoftPageBreakList &pList) const
 

Private Member Functions

void WriteFonts ()
 
void WriteStyles ()
 
void WriteFootnoteSettings ()
 
void WriteMainText ()
 
void WriteInfo ()
 
void WriteUserPropType (int nType)
 Writes a single user property type. More...
 
void WriteUserPropValue (const OUString &rValue)
 Writes a single user property value. More...
 
void WriteUserProps ()
 Writes the userprops group: user defined document properties. More...
 
void WritePageDescTable ()
 Writes the writer-specific group. More...
 
void BuildNumbering ()
 This is necessary to have the numbering table ready before the main text is being processed. More...
 
void WriteHeaderFooter (const SfxPoolItem &rItem, bool bHeader)
 
void WriteHeaderFooter (const SwFrameFormat &rFormat, bool bHeader, const sal_Char *pStr, bool bTitlepg=false)
 

Private Attributes

RtfExportFilterm_pFilter
 Pointer to the filter that owns us. More...
 
Writerm_pWriter
 
std::unique_ptr< RtfAttributeOutputm_pAttrOutput
 Attribute output for document. More...
 
MSWordSectionsm_pSections
 Sections/headers/footers. More...
 
std::unique_ptr< RtfSdrExportm_pSdrExport
 
bool const m_bOutOutlineOnly
 
rtl_TextEncoding m_eDefaultEncoding
 
rtl_TextEncoding m_eCurrentEncoding
 
bool m_bRTFFlySyntax
 This is used by OutputFlyFrame_Impl() to control the written syntax. More...
 
sal_uLong m_nCurrentNodeIndex
 Index of the current SwTextNode, if any. More...
 
RtfColorTable m_aColTable
 
std::map< sal_uInt16, OString > m_aStyTable
 
std::map< OUString, sal_uInt16 > m_aRedlineTable
 
std::unique_ptr< SvMemoryStreamm_pStream
 If set, then Strm() returns this tream, instead of m_pWriter's stream. More...
 
const SfxItemSetm_pFirstPageItemSet = nullptr
 Item set of the first page during export of a follow page format. More...
 

Additional Inherited Members

- Public Types inherited from MSWordExportBase
enum  ExportFormat {
  DOC = 0,
  RTF = 1,
  DOCX = 2
}
 
typedef std::vector< ::sw::mark::IMark * > IMarkVector
 Used to split the runs according to the bookmarks start and ends. More...
 
- Static Public Member Functions inherited from MSWordExportBase
static OUString GetBookmarkName (sal_uInt16 nTyp, const OUString *pName, sal_uInt16 nSeqNo)
 Find the bookmark name. More...
 
static const SwSectionFormatGetSectionFormat (const SwNode &rNd)
 Format of the section. More...
 
static sal_uLong GetSectionLineNo (const SfxItemSet *pSet, const SwNode &rNd)
 Line number of the section start. More...
 
static bool NoPageBreakSection (const SfxItemSet *pSet)
 
static void CorrectTabStopInSet (SfxItemSet &rSet, sal_Int32 nAbsLeft)
 
- Public Attributes inherited from MSWordExportBase
wwFontHelper m_aFontHelper
 
std::vector< sal_uLongm_aChapterFieldLocs
 
OUString const m_aMainStg
 
std::vector< const SwTOXType * > m_aTOXArr
 
const SfxItemSetm_pISet
 
WW8_WrPctm_pPiece
 
std::unique_ptr< SwNumRuleTablem_pUsedNumTable
 
const SwTextNodem_pTopNodeOfHdFtPage
 Top node of host page when in hd/ft. More...
 
std::map< sal_uInt16, sal_uInt16 > m_aRuleDuplicates
 
std::stack< sal_Int32 > m_aCurrentCharPropStarts
 To remember the position in a run. More...
 
WW8_WrtBookmarksm_pBkmks
 
WW8_WrtRedlineAuthorm_pRedlAuthors
 
std::shared_ptr< NfKeywordTablem_pKeyMap
 
std::unique_ptr< SvxMSExportOLEObjectsm_pOLEExp
 
std::unique_ptr< SwMSConvertControlsm_pOCXExp
 
WW8OleMap m_aOleMap
 
ww8::WW8TableInfo::Pointer_t m_pTableInfo
 
sal_uInt16 m_nCharFormatStart
 
sal_uInt16 m_nFormatCollStart
 
sal_uInt16 m_nStyleBeforeFly
 style number of the node More...
 
sal_uInt16 m_nLastFormatId
 Style of last TextNode in normal range. More...
 
sal_uInt16 m_nUniqueList
 current number for creating unique list names More...
 
unsigned int m_nHdFtIndex
 
RedlineFlags m_nOrigRedlineFlags
 Remember the original redline mode. More...
 
bool m_bOrigShowChanges
 Remember the original Show Changes mode. More...
 
std::vector< aBookmarkPairm_aImplicitBookmarks
 
ww8::Frames m_aFrames
 
const SwPageDescm_pCurrentPageDesc
 
bool m_bPrevTextNodeIsEmpty
 
bool m_bFirstTOCNodeWithSection
 
std::unique_ptr< WW8_WrPlcPnm_pPapPlc
 
std::unique_ptr< WW8_WrPlcPnm_pChpPlc
 
MSWordAttrIterm_pChpIter
 
std::unique_ptr< MSWordStylesm_pStyles
 
WW8_WrPlcAnnotationsm_pAtn
 
std::unique_ptr< WW8_WrtFactoidsm_pFactoids
 
WW8_WrPlcTextBoxesm_pTextBxs
 
WW8_WrPlcTextBoxesm_pHFTextBxs
 
std::map< OUString, LinkedTextboxInfom_aLinkedTextboxesHelper
 
bool m_bLinkedTextboxesHelperInitialized = false
 
sal_Int32 m_nLinkedTextboxesChainId =0
 
const ww8::Framem_pParentFrame
 
Pointm_pFlyOffset
 
RndStdIds m_eNewAnchorType
 
std::unique_ptr< WW8_WrPlcFieldm_pFieldMain
 
std::unique_ptr< WW8_WrPlcFieldm_pFieldHdFt
 
std::unique_ptr< WW8_WrPlcFieldm_pFieldFootnote
 
std::unique_ptr< WW8_WrPlcFieldm_pFieldEdn
 
std::unique_ptr< WW8_WrPlcFieldm_pFieldAtn
 
std::unique_ptr< WW8_WrPlcFieldm_pFieldTextBxs
 
std::unique_ptr< WW8_WrPlcFieldm_pFieldHFTextBxs
 
std::unique_ptr< WW8_WrMagicTablem_pMagicTable
 
std::unique_ptr< SwWW8WrGrfm_pGrf
 
const SwAttrSetm_pStyAttr
 
const SwModifym_pOutFormatNode
 
const SwFormatm_pCurrentStyle
 
MainTextPlcDrawObjm_pSdrObjs
 
HdFtPlcDrawObjm_pHFSdrObjs
 
SwEscherExm_pEscher
 
sal_uInt8 m_nTextTyp
 
bool m_bStyDef: 1
 
bool m_bBreakBefore: 1
 
bool m_bOutKF: 1
 
bool m_bOutFlyFrameAttrs: 1
 
bool m_bOutPageDescs: 1
 PageDescs (section properties) are being written. More...
 
bool m_bOutFirstPage: 1
 
bool m_bOutTable: 1
 
bool m_bOutGrf: 1
 
bool m_bInWriteEscher: 1
 
bool m_bStartTOX: 1
 
bool m_bInWriteTOX: 1
 
bool m_bFootnoteAtTextEnd: 1
 
bool m_bEndAtTextEnd: 1
 
bool m_bHasHdr: 1
 
bool m_bHasFtr: 1
 
bool m_bSubstituteBullets: 1
 
bool m_bTabInTOC: 1
 
bool m_bHideTabLeaderAndPageNumbers: 1
 
bool m_bExportModeRTF
 
bool m_bFontSizeWritten
 Is font size written already as part of the current character properties? More...
 
bool m_bAddFootnoteTab
 
SwDocm_pDoc
 
sal_uLong m_nCurStart
 
sal_uLong m_nCurEnd
 
SwPaMm_pCurPam
 
SwPaMm_pOrigPam
 
std::stack< MSWordSaveDatam_aSaveData
 Stack to remember the nesting (see MSWordSaveData for more) More...
 
IMarkVector m_rSortedBookmarksStart
 
IMarkVector m_rSortedBookmarksEnd
 
IMarkVector m_rSortedAnnotationMarksStart
 
IMarkVector m_rSortedAnnotationMarksEnd
 
- Static Protected Member Functions inherited from MSWordExportBase
static void UpdateTocSectionNodeProperties (const SwSectionNode &rSectionNode)
 
- Protected Attributes inherited from MSWordExportBase
std::vector< const Graphic * > m_vecBulletPic
 Vector to record all the graphics of bullets. More...
 

Detailed Description

The class that does all the actual RTF export-related work.

Definition at line 36 of file rtfexport.hxx.

Constructor & Destructor Documentation

RtfExport::RtfExport ( RtfExportFilter pFilter,
SwDoc pDocument,
SwPaM pCurrentPam,
SwPaM pOriginalPam,
Writer pWriter,
bool  bOutOutlineOnly = false 
)
RtfExport::RtfExport ( const RtfExport )
delete
RtfExport::~RtfExport ( )
overridedefault

Destructor.

Member Function Documentation

bool RtfExport::AddSectionBreaksForTOX ( ) const
inlineoverridevirtual

Determines the Section Breaks are to be added for TOX Section.

Implements MSWordExportBase.

Definition at line 65 of file rtfexport.hxx.

void RtfExport::AppendAnnotationMarks ( const SwWW8AttrIter rAttrs,
sal_Int32  nCurrentPos,
sal_Int32  nLen 
)
overridevirtual

Implements MSWordExportBase.

Definition at line 153 of file rtfexport.cxx.

References MSWordExportBase::GetAnnotationMarks(), and m_pAttrOutput.

void RtfExport::AppendBookmark ( const OUString &  rName)
overridevirtual

Implements MSWordExportBase.

Definition at line 142 of file rtfexport.cxx.

References m_pAttrOutput.

void RtfExport::AppendBookmarks ( const SwTextNode rNode,
sal_Int32  nCurrentPos,
sal_Int32  nLen 
)
overridevirtual

Implements MSWordExportBase.

Definition at line 118 of file rtfexport.cxx.

References MSWordExportBase::GetBookmarks(), and m_pAttrOutput.

void RtfExport::AppendSection ( const SwPageDesc pPageDesc,
const SwSectionFormat pFormat,
sal_uLong  nLnNum 
)
overrideprotectedvirtual
AttributeOutputBase & RtfExport::AttrOutput ( ) const
overridevirtual

Access to the attribute output class.

Implements MSWordExportBase.

Definition at line 78 of file rtfexport.cxx.

References m_pAttrOutput.

Referenced by AppendSection(), ExportDocument_Impl(), OutPageDescription(), OutputEndNode(), and PrepareNewPageDesc().

void RtfExport::BuildNumbering ( )
private

This is necessary to have the numbering table ready before the main text is being processed.

Definition at line 206 of file rtfexport.cxx.

References MSWordExportBase::GetId(), SwDoc::GetNumRuleTable(), SwDoc::GetOutlineNumRule(), IsExportNumRule(), SwDoc::IsUsed(), MSWordExportBase::m_pDoc, and SwVectorModifyBase< Value >::size().

Referenced by ExportDocument_Impl().

bool RtfExport::CollapseScriptsforWordOk ( sal_uInt16  nScript,
sal_uInt16  nWhich 
)
overridevirtual
bool RtfExport::DisallowInheritingOutlineNumbering ( const SwFormat rFormat)
overrideprotectedvirtual

Return value indicates if an inherited outline numbering is suppressed.

Implements MSWordExportBase.

Definition at line 983 of file rtfexport.cxx.

References SwFormat::DerivedFrom(), SwFormat::GetItemState(), OOO_STRING_SVTOOLS_RTF_LEVEL, RES_PARATR_NUMRULE, Strm(), SvStream::WriteCharPtr(), and SvStream::WriteInt32().

void RtfExport::DoComboBox ( const OUString &  rName,
const OUString &  rHelp,
const OUString &  ToolTip,
const OUString &  rSelected,
css::uno::Sequence< OUString > &  rListItems 
)
overridevirtual

Implements MSWordExportBase.

Definition at line 331 of file rtfexport.cxx.

void RtfExport::DoFormText ( const SwInputField pField)
overridevirtual
ErrCode RtfExport::ExportDocument_Impl ( )
overrideprotectedvirtual

Format-dependent part of the actual export.

Implements MSWordExportBase.

Definition at line 683 of file rtfexport.cxx.

References SwEndNoteInfo::aFormat, AttrOutput(), BuildNumbering(), MSWordSections::CurrentSectionInfo(), SwFootnoteInfo::eNum, SwFootnoteInfo::ePos, ERRCODE_NONE, SwDoc::FindPageDesc(), FTNNUM_DOC, FTNNUM_PAGE, FTNPOS_CHAPTER, SfxItemSet::Get(), IDocumentSettingAccess::get(), SwDoc::GetAttrPool(), SwFormat::GetAttrSet(), SwNode::GetContentNode(), IDocumentLayoutAccess::GetCurrentViewShell(), SfxItemPool::GetDefaultItem(), SwDoc::GetEndNoteInfo(), SwNodes::GetEndOfExtras(), SwDoc::GetFootnoteInfo(), SwSection::GetFormat(), SwTable::GetFrameFormat(), SwFormat::GetFrameSize(), SvxSizeItem::GetHeight(), wwFontHelper::GetId(), SwDoc::getIDocumentLayoutAccess(), SwDoc::getIDocumentSettingAccess(), SwDoc::getIDocumentStylePoolAccess(), SwNode::GetIndex(), SwFormat::GetItemState(), SfxItemPool::GetItemSurrogates(), SwPageDesc::GetLandscape(), SvxLRSpaceItem::GetLeft(), SwDoc::GetLineNumberInfo(), SvxULSpaceItem::GetLower(), SwFormat::GetLRSpace(), SwPageDesc::GetMaster(), SwPageDesc::GetName(), SwDoc::GetNodes(), SvxNumberType::GetNumberingType(), SwFormatPageDesc::GetPageDesc(), SwDoc::GetPageDesc(), SwDoc::GetPageDescCnt(), SvxPaperInfo::GetPaperSize(), SvxLRSpaceItem::GetRight(), SwSectionNode::GetSection(), SwNode::GetSectionNode(), SwContentNode::GetSwAttrSet(), SwTableNode::GetTable(), SwNode::GetTableNode(), IDocumentStylePoolAccess::GetTextCollFromPool(), SwFormat::GetULSpace(), SvxULSpaceItem::GetUpper(), SvxSizeItem::GetWidth(), Size::Height(), SwNode::IsContentNode(), IsHyphen(), SwLineNumberInfo::IsPaintLineNumbers(), SwNode::IsSectionNode(), SwNode::IsTableNode(), LO_STRING_SVTOOLS_RTF_HTMAUTSP, LONG_MAX, MSWordExportBase::m_aFontHelper, MSWordExportBase::m_nOrigRedlineFlags, m_pAttrOutput, MSWordExportBase::m_pCurrentPageDesc, MSWordExportBase::m_pDoc, m_pSections, MSWordExportBase::m_pStyles, Mirror, SwEndNoteInfo::nFootnoteOffset, On, OOO_STRING_SVTOOLS_RTF_AENDDOC, OOO_STRING_SVTOOLS_RTF_AFTNNALC, OOO_STRING_SVTOOLS_RTF_AFTNNAR, OOO_STRING_SVTOOLS_RTF_AFTNNAUC, OOO_STRING_SVTOOLS_RTF_AFTNNCHI, OOO_STRING_SVTOOLS_RTF_AFTNNRLC, OOO_STRING_SVTOOLS_RTF_AFTNNRUC, OOO_STRING_SVTOOLS_RTF_AFTNRSTCONT, OOO_STRING_SVTOOLS_RTF_AFTNSTART, OOO_STRING_SVTOOLS_RTF_ANSI, OOO_STRING_SVTOOLS_RTF_DEFF, OOO_STRING_SVTOOLS_RTF_ENDDOC, OOO_STRING_SVTOOLS_RTF_FORMPROT, OOO_STRING_SVTOOLS_RTF_FORMSHADE, OOO_STRING_SVTOOLS_RTF_FTNBJ, OOO_STRING_SVTOOLS_RTF_FTNNALC, OOO_STRING_SVTOOLS_RTF_FTNNAR, OOO_STRING_SVTOOLS_RTF_FTNNAUC, OOO_STRING_SVTOOLS_RTF_FTNNCHI, OOO_STRING_SVTOOLS_RTF_FTNNRLC, OOO_STRING_SVTOOLS_RTF_FTNNRUC, OOO_STRING_SVTOOLS_RTF_FTNRESTART, OOO_STRING_SVTOOLS_RTF_FTNRSTCONT, OOO_STRING_SVTOOLS_RTF_FTNRSTPG, OOO_STRING_SVTOOLS_RTF_FTNSTART, OOO_STRING_SVTOOLS_RTF_HYPHAUTO, OOO_STRING_SVTOOLS_RTF_IGNORE, OOO_STRING_SVTOOLS_RTF_LANDSCAPE, OOO_STRING_SVTOOLS_RTF_MARGB, OOO_STRING_SVTOOLS_RTF_MARGL, OOO_STRING_SVTOOLS_RTF_MARGMIRROR, OOO_STRING_SVTOOLS_RTF_MARGR, OOO_STRING_SVTOOLS_RTF_MARGT, OOO_STRING_SVTOOLS_RTF_PAPERH, OOO_STRING_SVTOOLS_RTF_PAPERW, OOO_STRING_SVTOOLS_RTF_PGDSCNO, OOO_STRING_SVTOOLS_RTF_REVISIONS, OOO_STRING_SVTOOLS_RTF_RTF, OOO_STRING_SVTOOLS_RTF_SBKNONE, OOO_STRING_SVTOOLS_RTF_SECTD, OOO_STRING_SVTOOLS_RTF_SECTUNLOCKED, OOO_STRING_SVTOOLS_RTF_VIEWSCALE, OutLong(), OutPageDescription(), OutULong(), PAPER_A4, PARA_SPACE_MAX, SwPageDesc::ReadUseOn(), RES_CHRATR_FONT, RES_PAGEDESC, RES_PARATR_HYPHENZONE, RES_POOLCOLL_STANDARD, RES_PROTECT, SAL_NEWLINE_STRING, AttributeOutputBase::SectionLineNumbering(), Strm(), SVX_NUM_CHAR_SPECIAL, SVX_NUM_CHARS_LOWER_LETTER, SVX_NUM_CHARS_LOWER_LETTER_N, SVX_NUM_CHARS_UPPER_LETTER, SVX_NUM_CHARS_UPPER_LETTER_N, SVX_NUM_ROMAN_LOWER, SVX_NUM_ROMAN_UPPER, Size::Width(), SvStream::WriteChar(), SvStream::WriteCharPtr(), WriteFonts(), WriteFootnoteSettings(), WriteInfo(), WriteMainText(), WriteNumbering(), WritePageDescTable(), WriteRevTab(), WriteStyles(), and WriteUserProps().

void RtfExport::ExportGrfBullet ( const SwTextNode rNd)
overridevirtual

Implements MSWordExportBase.

Definition at line 179 of file rtfexport.cxx.

bool RtfExport::FieldsQuoted ( ) const
inlineoverridevirtual

Determines if the import filter already quoted fields or not.

Implements MSWordExportBase.

Definition at line 63 of file rtfexport.hxx.

sal_uInt16 RtfExport::GetColor ( const Color rColor) const

Definition at line 1121 of file rtfexport.cxx.

References Color::GetBlue(), Color::GetGreen(), Color::GetRed(), m_aColTable, and SAL_INFO.

Referenced by OutTBLBorderLine().

rtl_TextEncoding RtfExport::GetCurrentEncoding ( ) const
inline
sal_uLong RtfExport::GetCurrentNodeIndex ( ) const
inline

Definition at line 179 of file rtfexport.hxx.

References m_nCurrentNodeIndex.

rtl_TextEncoding RtfExport::GetDefaultEncoding ( ) const
inline

Definition at line 171 of file rtfexport.hxx.

References m_eDefaultEncoding.

Referenced by RtfAttributeOutput::EndFont().

ExportFormat RtfExport::GetExportFormat ( ) const
inlineoverridevirtual

Implements MSWordExportBase.

Definition at line 117 of file rtfexport.hxx.

const SfxItemSet* RtfExport::GetFirstPageItemSet ( )
inline

Definition at line 203 of file rtfexport.hxx.

References m_pFirstPageItemSet.

sal_uInt16 RtfExport::GetRedline ( const OUString &  rAuthor)

Definition at line 1330 of file rtfexport.cxx.

References m_aRedlineTable, and nId.

Referenced by WriteRevTab().

const OUString * RtfExport::GetRedline ( sal_uInt16  nId)

Definition at line 1341 of file rtfexport.cxx.

References m_aRedlineTable.

bool RtfExport::GetRTFFlySyntax ( ) const
inline

Definition at line 178 of file rtfexport.hxx.

References m_bRTFFlySyntax.

OString RtfExport::getStream ( )

Get the contents of the memory stream as a string.

Definition at line 1078 of file rtfexport.cxx.

References m_pStream.

OString * RtfExport::GetStyle ( sal_uInt16  nId)

Definition at line 1322 of file rtfexport.cxx.

References m_aStyTable.

void RtfExport::InsColor ( const Color rCol)

Definition at line 1135 of file rtfexport.cxx.

References COL_AUTO(), and m_aColTable.

Referenced by InsColorLine(), and OutColorTable().

void RtfExport::InsColorLine ( const SvxBoxItem rBox)
void RtfExport::InsStyle ( sal_uInt16  nId,
const OString &  rStyle 
)

Definition at line 1317 of file rtfexport.cxx.

References m_aStyTable.

RtfExport& RtfExport::operator= ( const RtfExport )
delete
void RtfExport::OutColorTable ( )
void RtfExport::OutDateTime ( const sal_Char pStr,
const css::util::DateTime &  rDT 
)
SvStream & RtfExport::OutLong ( long  nVal)

Definition at line 1092 of file rtfexport.cxx.

References Writer::OutLong(), and Strm().

Referenced by ExportDocument_Impl().

void RtfExport::OutPageDescription ( const SwPageDesc rPgDsc,
bool  bCheckForFirstPage 
)
void RtfExport::OutputEndNode ( const SwEndNode rEndNode)
overrideprotectedvirtual
void RtfExport::OutputField ( const SwField pField,
ww::eField  eFieldType,
const OUString &  rFieldCmd,
FieldFlags  nMode = FieldFlags::All 
)
overridevirtual

Write the field.

Implements MSWordExportBase.

Definition at line 315 of file rtfexport.cxx.

References m_pAttrOutput.

void RtfExport::OutputGrfNode ( const SwGrfNode rGrfNode)
overrideprotectedvirtual

Output SwGrfNode.

Implements MSWordExportBase.

Definition at line 1012 of file rtfexport.cxx.

void RtfExport::OutputLinkedOLE ( const OUString &  rLink)
overrideprotectedvirtual

Implements MSWordExportBase.

Definition at line 1022 of file rtfexport.cxx.

void RtfExport::OutputOLENode ( const SwOLENode rOLENode)
overrideprotectedvirtual

Output SwOLENode.

Implements MSWordExportBase.

Definition at line 1017 of file rtfexport.cxx.

void RtfExport::OutputTextNode ( SwTextNode rNode)
overrideprotectedvirtual

Output SwTextNode is depending on outline export mode.

Reimplemented from MSWordExportBase.

Definition at line 1024 of file rtfexport.cxx.

References SwNode::GetIndex(), SwTextNode::IsOutline(), m_bOutOutlineOnly, m_nCurrentNodeIndex, and MSWordExportBase::OutputTextNode().

SvStream & RtfExport::OutULong ( sal_uLong  nVal)
void RtfExport::OutUnicode ( const sal_Char pToken,
const OUString &  rContent,
bool  bUpr = false 
)
bool RtfExport::PreferPageBreakBefore ( ) const
inlineoverridevirtual

If saving page break is preferred as a paragraph attribute (yes) or as a special character (no).

Implements MSWordExportBase.

Definition at line 67 of file rtfexport.hxx.

void RtfExport::PrepareNewPageDesc ( const SfxItemSet pSet,
const SwNode rNd,
const SwFormatPageDesc pNewPgDescFormat,
const SwPageDesc pNewPgDesc 
)
overrideprotectedvirtual
sal_uLong RtfExport::ReplaceCr ( sal_uInt8  nChar)
overridevirtual

Implements MSWordExportBase.

Definition at line 381 of file rtfexport.cxx.

void RtfExport::resetStream ( )

Return back to the real stream.

Definition at line 1088 of file rtfexport.cxx.

References m_pStream.

RtfSdrExport & RtfExport::SdrExporter ( ) const

Access to the Rtf Sdr exporter.

Definition at line 82 of file rtfexport.cxx.

References m_pSdrExport.

void RtfExport::SectionBreaksAndFrames ( const SwTextNode )
inlineoverrideprotectedvirtual

Implements MSWordExportBase.

Definition at line 123 of file rtfexport.hxx.

MSWordSections & RtfExport::Sections ( ) const
overridevirtual

Access to the sections/headers/footres.

Implements MSWordExportBase.

Definition at line 80 of file rtfexport.cxx.

References m_pSections.

void RtfExport::SetCurrentEncoding ( rtl_TextEncoding  eCurrentEncoding)
inline

Definition at line 172 of file rtfexport.hxx.

Referenced by RtfAttributeOutput::EndFont(), and RtfAttributeOutput::FontCharset().

void RtfExport::SetRTFFlySyntax ( bool  bRTFFlySyntax)
inline

Definition at line 177 of file rtfexport.hxx.

Referenced by RtfAttributeOutput::FlyFrameGraphic().

void RtfExport::setStream ( )

From now on, let Strm() return a memory stream, not a real one.

Definition at line 1076 of file rtfexport.cxx.

References m_pStream.

SvStream & RtfExport::Strm ( )
bool RtfExport::SupportsOneColumnBreak ( ) const
inlineoverridevirtual

Determines if column break with one column should be exported or not.

Implements MSWordExportBase.

Definition at line 61 of file rtfexport.hxx.

void RtfExport::WriteChar ( sal_Unicode  c)
overridevirtual

Implements MSWordExportBase.

Definition at line 184 of file rtfexport.cxx.

Referenced by WriteInfo().

void RtfExport::WriteCR ( ww8::WW8TableNodeInfoInner::Pointer_t  )
inlineoverridevirtual

Implements MSWordExportBase.

Definition at line 83 of file rtfexport.hxx.

void RtfExport::WriteFonts ( )
private
void RtfExport::WriteFootnoteSettings ( )
private
void RtfExport::WriteFormData ( const ::sw::mark::IFieldmark rFieldmark)
overridevirtual

Write the data of the form field.

Implements MSWordExportBase.

Definition at line 321 of file rtfexport.cxx.

References SAL_INFO.

void RtfExport::WriteHeaderFooter ( const SfxPoolItem rItem,
bool  bHeader 
)
private
void RtfExport::WriteHeaderFooter ( const SwFrameFormat rFormat,
bool  bHeader,
const sal_Char pStr,
bool  bTitlepg = false 
)
private

Definition at line 1432 of file rtfexport.cxx.

References m_pAttrOutput, and SAL_INFO.

void RtfExport::WriteHeadersFooters ( sal_uInt8  nHeadFootFlags,
const SwFrameFormat rFormat,
const SwFrameFormat rLeftFormat,
const SwFrameFormat rFirstPageFormat,
sal_uInt8  nBreakCode 
)
overridevirtual
void RtfExport::WriteHyperlinkData ( const ::sw::mark::IFieldmark rFieldmark)
overridevirtual

Implements MSWordExportBase.

Definition at line 326 of file rtfexport.cxx.

References SAL_INFO.

void RtfExport::WriteInfo ( )
private
void RtfExport::WriteMainText ( )
private
void RtfExport::WriteNumbering ( )
overridevirtual
void RtfExport::WritePageDescTable ( )
private
void RtfExport::WriteRevTab ( )
void RtfExport::WriteStyles ( )
private

Definition at line 399 of file rtfexport.cxx.

References MSWordExportBase::m_pStyles, and SAL_INFO.

Referenced by ExportDocument_Impl().

void RtfExport::WriteUserProps ( )
private
void RtfExport::WriteUserPropType ( int  nType)
private

Writes a single user property type.

Definition at line 525 of file rtfexport.cxx.

References OOO_STRING_SVTOOLS_RTF_PROPTYPE, OutULong(), Strm(), and SvStream::WriteCharPtr().

Referenced by WriteUserProps().

void RtfExport::WriteUserPropValue ( const OUString &  rValue)
private

Writes a single user property value.

Definition at line 531 of file rtfexport.cxx.

References m_eDefaultEncoding, OOO_STRING_SVTOOLS_RTF_STATICVAL, msfilter::rtfutil::OutString(), Strm(), SvStream::WriteChar(), and SvStream::WriteCharPtr().

Referenced by WriteUserProps().

Member Data Documentation

RtfColorTable RtfExport::m_aColTable
private

Definition at line 225 of file rtfexport.hxx.

Referenced by GetColor(), InsColor(), and OutColorTable().

std::map<OUString, sal_uInt16> RtfExport::m_aRedlineTable
private

Definition at line 227 of file rtfexport.hxx.

Referenced by GetRedline(), and WriteRevTab().

std::map<sal_uInt16, OString> RtfExport::m_aStyTable
private

Definition at line 226 of file rtfexport.hxx.

Referenced by GetStyle(), and InsStyle().

bool const RtfExport::m_bOutOutlineOnly
private

Definition at line 49 of file rtfexport.hxx.

Referenced by OutputTextNode().

bool RtfExport::m_bRTFFlySyntax
private

This is used by OutputFlyFrame_Impl() to control the written syntax.

Definition at line 166 of file rtfexport.hxx.

Referenced by GetRTFFlySyntax().

rtl_TextEncoding RtfExport::m_eCurrentEncoding
private

Definition at line 164 of file rtfexport.hxx.

Referenced by GetCurrentEncoding(), and OutUnicode().

rtl_TextEncoding RtfExport::m_eDefaultEncoding
private
sal_uLong RtfExport::m_nCurrentNodeIndex
private

Index of the current SwTextNode, if any.

Definition at line 168 of file rtfexport.hxx.

Referenced by GetCurrentNodeIndex(), and OutputTextNode().

std::unique_ptr<RtfAttributeOutput> RtfExport::m_pAttrOutput
private
RtfExportFilter* RtfExport::m_pFilter
private

Pointer to the filter that owns us.

Definition at line 39 of file rtfexport.hxx.

Referenced by RtfExport().

const SfxItemSet* RtfExport::m_pFirstPageItemSet = nullptr
private

Item set of the first page during export of a follow page format.

Definition at line 231 of file rtfexport.hxx.

Referenced by GetFirstPageItemSet(), and OutPageDescription().

std::unique_ptr<RtfSdrExport> RtfExport::m_pSdrExport
private

Definition at line 48 of file rtfexport.hxx.

Referenced by RtfExport(), and SdrExporter().

MSWordSections* RtfExport::m_pSections
private

Sections/headers/footers.

Definition at line 46 of file rtfexport.hxx.

Referenced by AppendSection(), ExportDocument_Impl(), PrepareNewPageDesc(), and Sections().

std::unique_ptr<SvMemoryStream> RtfExport::m_pStream
private

If set, then Strm() returns this tream, instead of m_pWriter's stream.

Definition at line 229 of file rtfexport.hxx.

Referenced by getStream(), resetStream(), setStream(), and Strm().

Writer* RtfExport::m_pWriter
private

Definition at line 40 of file rtfexport.hxx.

Referenced by RtfExport(), Strm(), and WriteMainText().


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