20#ifndef INCLUDED_SW_SOURCE_FILTER_WW8_DOCXEXPORT_HXX
21#define INCLUDED_SW_SOURCE_FILTER_WW8_DOCXEXPORT_HXX
27#include <rtl/ustring.hxx>
44 namespace drawingml {
class DrawingML; }
45 namespace vml {
class VMLExport; }
49 namespace frame {
class XModel; }
50 namespace drawing {
class XShape; }
51 namespace awt {
class XControlModel; }
168 OString
AddRelation(
const OUString& rType, std::u16string_view rTarget );
179 sal_uInt8 nBreakCode,
bool bEvenAndOddHeaders )
override;
186 virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
override;
189 virtual void DoComboBox(
const OUString &rName,
190 const OUString &rHelp,
191 const OUString &ToolTip,
192 const OUString &rSelected,
193 const css::uno::Sequence<OUString> &rListItems)
override;
202 std::pair<OString,OString>
WriteActiveXObject(
const uno::Reference<css::drawing::XShape>& rxShape,
203 const uno::Reference<awt::XControlModel>& rxControlModel);
206 void OutputDML( css::uno::Reference< css::drawing::XShape >
const & xShape );
241 bool bExtraPageBreak =
false)
override;
298 std::shared_ptr<SwUnoCursor> & pCurrentPam,
SwPaM& rOriginalPam,
299 bool bDocm,
bool bTemplate);
313 const ::sax_fastparser::FSHelperPtr&
GetFS()
const {
return mpFS; }
The class that has handlers for various resource types when exporting as DOCX.
The physical access to the DOCX document (for writing).
The class that does all the actual DOCX export-related work.
virtual void SectionBreaksAndFrames(const SwTextNode &) override
virtual bool FieldsQuoted() const override
Determines if the import filter already quoted fields or not.
virtual void WriteNumbering() override
Write the numbering table.
rtl::Reference< sax_fastparser::FastAttributeList > MainXmlNamespaces()
All xml namespaces to be used at the top of any text .xml file (main doc, headers,...
virtual void AppendAnnotationMarks(const SwWW8AttrIter &rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen) override
sal_Int32 m_nFooters
Footer counter.
void WriteTheme()
Write word/theme/theme1.xml.
virtual MSWordSections & Sections() const override
Access to the sections/headers/footres.
virtual void OutputField(const SwField *pField, ww::eField eFieldType, const OUString &rFieldCmd, FieldFlags nMode=FieldFlags::All) override
Write the field.
void WritePostitFields()
Write comments.xml.
void SetFloatingTableFrame(const ww8::Frame *pF)
virtual bool DisallowInheritingOutlineNumbering(const SwFormat &rFormat) override
Return value indicates if an inherited outline numbering is suppressed.
const ww8::Frame * m_pFloatingTableFrame
Pointer to the Frame of a floating table it is nested in.
DocxExport(const DocxExport &)=delete
virtual void WriteChar(sal_Unicode) override
OString AddRelation(const OUString &rType, std::u16string_view rTarget)
Returns the relationd id.
std::pair< OString, OString > WriteActiveXObject(const uno::Reference< css::drawing::XShape > &rxShape, const uno::Reference< awt::XControlModel > &rxControlModel)
sal_Int32 WriteOutliner(const OutlinerParaObject &rOutliner, sal_uInt8 nTyp, bool bNeedsLastParaId)
virtual void PrepareNewPageDesc(const SfxItemSet *pSet, const SwNode &rNd, const SwFormatPageDesc *pNewPgDescFormat, const SwPageDesc *pNewPgDesc, bool bExtraPageBreak=false) override
Get ready for a new section.
virtual void AppendBookmark(const OUString &rName) override
DocxExport & operator=(const DocxExport &)=delete
void WriteProperties()
Write docProps/core.xml.
const ww8::Frame * GetFloatingTableFrame() const
virtual bool PreferPageBreakBefore() const override
If saving page break is preferred as a paragraph attribute (yes) or as a special character (no).
const ::sax_fastparser::FSHelperPtr & GetFS() const
virtual void AppendBookmarks(const SwTextNode &rNode, sal_Int32 nCurrentPos, sal_Int32 nLen, const SwRedlineData *pRedlineData=nullptr) override
const DocxExportFilter & GetFilter() const
std::vector< SdtData > m_SdtData
Storage for sdt data which need to be written to other XMLs.
void WriteSettings()
Write word/settings.xml.
virtual ErrCode ExportDocument_Impl() override
Format-dependent part of the actual export.
virtual void OutputOLENode(const SwOLENode &) override
Output SwOLENode.
bool m_bDocm
If the result will be a .docm file or not.
virtual void ExportGrfBullet(const SwTextNode &) override
virtual sal_uInt64 ReplaceCr(sal_uInt8 nChar) override
OString WriteOLEObject(SwOLEObj &rObject, OUString &io_rProgID)
sal_Int32 m_nHeadersFootersInSection
Footer and Header counter in Section properties.
void AddSdtData(const OUString &namespaces, const OUString &xpath, const OUString &data)
::sax_fastparser::FSHelperPtr m_pDocumentFS
Fast serializer for the document output.
std::unique_ptr< DocxSdrExport > m_pSdrExport
Exporter of drawings.
oox::vml::VMLExport & VMLExporter()
Reference to the VMLExport instance for the main document.
::sax_fastparser::FSHelperPtr mpFS
Fast serializer to output the data.
virtual void OutputGrfNode(const SwGrfNode &) override
Output SwGrfNode.
virtual void AppendSection(const SwPageDesc *pPageDesc, const SwSectionFormat *pFormat, sal_uLong nLnNum) override
DocxExportFilter & m_rFilter
Pointer to the filter that owns us.
void InitStyles()
Setup pStyles and write styles.xml.
void WriteMainText()
FIXME this is temporary, remotely reminding the method of the same name in WW8Export.
virtual void WriteHeadersFooters(sal_uInt8 nHeadFootFlags, const SwFrameFormat &rFormat, const SwFrameFormat &rLeftHeaderFormat, const SwFrameFormat &rLeftFooterFormat, const SwFrameFormat &rFirstPageFormat, sal_uInt8 nBreakCode, bool bEvenAndOddHeaders) override
Output the actual headers and footers.
std::unique_ptr< MSWordSections > m_pSections
Sections/headers/footers.
void WriteHeaderFooter(const SwFormat *pFormat, bool bHeader, const char *pType)
Write reference to a header/footer + the actual xml containing the text.
virtual void OutputLinkedOLE(const OUString &) override
virtual void DoFormText(const SwInputField *pField) override
bool const m_bTemplate
Export is done into template (.dotx)
virtual void WriteCR(ww8::WW8TableNodeInfoInner::Pointer_t) override
void WriteFootnotesEndnotes()
Write footnotes.xml and endnotes.xml.
std::unique_ptr< DocxAttributeOutput > m_pAttrOutput
Attribute output for document.
bool isMirroredMargin()
return true if Page Layout is set as Mirrored
virtual bool AddSectionBreaksForTOX() const override
Determines the Section Breaks are to be added for TOX Section.
sal_Int32 m_nOLEObjects
OLE objects counter.
virtual ~DocxExport() override
Destructor.
virtual void DoComboBox(const OUString &rName, const OUString &rHelp, const OUString &ToolTip, const OUString &rSelected, const css::uno::Sequence< OUString > &rListItems) override
virtual bool CollapseScriptsforWordOk(sal_uInt16 nScript, sal_uInt16 nWhich) override
Guess the script (asian/western).
virtual void WriteHyperlinkData(const ::sw::mark::IFieldmark &rFieldmark) override
virtual bool ignoreAttributeForStyleDefaults(sal_uInt16 nWhich) const override
Used to filter out attributes that can be e.g. written to .doc but not to .docx.
void WriteVBA()
Writes word/vbaProject.bin.
virtual void OutputEndNode(const SwEndNode &) override
Output SwEndNode.
void WriteFonts()
Write word/fontTable.xml.
size_t GetInfoID(const OUString sPersonalInfo) const
void WriteEmbeddings()
Write word/embeddings/Worksheet[n].xlsx.
DocxSdrExport & SdrExporter()
Reference to the DocxSdrExport instance for the main document.
std::unique_ptr< oox::vml::VMLExport > m_pVMLExport
Exporter of the VML shapes.
virtual AttributeOutputBase & AttrOutput() const override
Access to the attribute output class.
std::unique_ptr< SvtSecurityMapPersonalInfo > m_pAuthorIDs
Map authors to remove personal info.
std::unique_ptr< oox::drawingml::DrawingML > m_pDrawingML
Access to the DrawingML writer.
DocxAttributeOutput & DocxAttrOutput() const
Access to the derived attribute output class.
void SetFS(::sax_fastparser::FSHelperPtr const &mpFS)
void WriteDocVars(const sax_fastparser::FSHelperPtr &pFS)
Writes the <w:docVars> part of settings.xml.
virtual void WriteFormData(const ::sw::mark::IFieldmark &rFieldmark) override
Write the data of the form field.
virtual ExportFormat GetExportFormat() const override
void setDefaultTabStop(int stop)
Set the document default tab stop.
OString OutputChart(css::uno::Reference< css::frame::XModel > const &xModel, sal_Int32 nCount, ::sax_fastparser::FSHelperPtr const &m_pSerializer)
Returns the relationd id.
DocxSettingsData m_aSettings
DocxExportFilter & GetFilter()
DocxExport(DocxExportFilter &rFilter, SwDoc &rDocument, std::shared_ptr< SwUnoCursor > &pCurrentPam, SwPaM &rOriginalPam, bool bDocm, bool bTemplate)
Pass the pDocument, pCurrentPam and pOriginalPam to the base class.
sal_Int32 getWordCompatibilityModeFromGrabBag() const
sal_Int32 m_nHeaders
Header counter.
sal_Int32 m_nActiveXControls
ActiveX controls counter.
void OutputDML(css::uno::Reference< css::drawing::XShape > const &xShape)
Writes the shape using drawingML syntax.
void WriteCustomXml()
Write customXml/item[n].xml and customXml/itemProps[n].xml.
Handles DOCX export of drawings.
Base class for WW8Export and DocxExport.
Class to collect and output the sections/headers/footers.
Ends a section of nodes in the document model.
Base class of all fields.
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
Base class of the Writer document model elements.
PaM is Point and Mark: a selection of the document model.
SwTextNode is a paragraph in the document model.
Make exporting a Writer Frame easy.
std::shared_ptr< WW8TableNodeInfoInner > Pointer_t
#define SAL_WARN(area, stream)
std::shared_ptr< FastSerializerHelper > FSHelperPtr
Data to be written in the document settings part of the document.
bool evenAndOddHeaders
returns true if there are any non-default settings (i.e. something to write)
Data to keep and write to XMLs.