Kaydet (Commit) c0d5d26a authored tarafından Miklos Vajna's avatar Miklos Vajna

DocxAttributeOutput: factor out writeVMLTextFrame() into DocxSdrExport

Given that DocxSdrExport doesn't know DocxAttributeOutput this requires
also moving a number of data members into that class, which is probably
also a good thing.

Change-Id: I7e9c7def505e11e5e27a2bf86544d2b66d9b3f86
üst 9ca4e6e1
...@@ -389,8 +389,6 @@ private: ...@@ -389,8 +389,6 @@ private:
/// checks whether the current component is a diagram /// checks whether the current component is a diagram
bool IsDiagram (const SdrObject* sdrObject); bool IsDiagram (const SdrObject* sdrObject);
/// Writes text frame in VML format.
void WriteVMLTextFrame(sw::Frame* pParentFrame);
/// Writes text frame in DML format. /// Writes text frame in DML format.
void WriteDMLTextFrame(sw::Frame* pParentFrame); void WriteDMLTextFrame(sw::Frame* pParentFrame);
...@@ -680,19 +678,12 @@ private: ...@@ -680,19 +678,12 @@ private:
::sax_fastparser::FastAttributeList *m_pSectionSpacingAttrList; ::sax_fastparser::FastAttributeList *m_pSectionSpacingAttrList;
::sax_fastparser::FastAttributeList *m_pParagraphSpacingAttrList; ::sax_fastparser::FastAttributeList *m_pParagraphSpacingAttrList;
::sax_fastparser::FastAttributeList *m_pHyperlinkAttrList; ::sax_fastparser::FastAttributeList *m_pHyperlinkAttrList;
::sax_fastparser::FastAttributeList *m_pFlyAttrList;
/// Attributes of <wps:bodyPr>, used during DML export of text frames. /// Attributes of <wps:bodyPr>, used during DML export of text frames.
::sax_fastparser::FastAttributeList *m_pBodyPrAttrList; ::sax_fastparser::FastAttributeList *m_pBodyPrAttrList;
::sax_fastparser::FastAttributeList *m_pFlyFillAttrList;
::sax_fastparser::FastAttributeList *m_pFlyWrapAttrList;
/// Attributes of the next v:textbox element.
::sax_fastparser::FastAttributeList *m_pTextboxAttrList;
/// Attributes of the run color /// Attributes of the run color
::sax_fastparser::FastAttributeList *m_pColorAttrList; ::sax_fastparser::FastAttributeList *m_pColorAttrList;
/// Attributes of the paragraph background /// Attributes of the paragraph background
::sax_fastparser::FastAttributeList *m_pBackgroundAttrList; ::sax_fastparser::FastAttributeList *m_pBackgroundAttrList;
/// When exporting fly frames, this holds the real size of the frame.
const Size* m_pFlyFrameSize;
::docx::FootnotesList *m_pFootnotesList; ::docx::FootnotesList *m_pFootnotesList;
::docx::FootnotesList *m_pEndnotesList; ::docx::FootnotesList *m_pEndnotesList;
...@@ -746,9 +737,7 @@ private: ...@@ -746,9 +737,7 @@ private:
DocxColBreakStatus m_nColBreakStatus; DocxColBreakStatus m_nColBreakStatus;
std::vector<sw::Frame> m_aParentFrames; std::vector<sw::Frame> m_aParentFrames;
bool m_bTextFrameSyntax;
bool m_bDMLTextFrameSyntax; bool m_bDMLTextFrameSyntax;
OStringBuffer m_aTextFrameStyle;
// close of hyperlink needed // close of hyperlink needed
bool m_closeHyperlinkInThisRun; bool m_closeHyperlinkInThisRun;
bool m_closeHyperlinkInPreviousRun; bool m_closeHyperlinkInPreviousRun;
...@@ -809,8 +798,6 @@ private: ...@@ -809,8 +798,6 @@ private:
/// Is fake rotation detected, so rotation with 90 degrees should be ignored in this cell? /// Is fake rotation detected, so rotation with 90 degrees should be ignored in this cell?
bool m_bBtLr; bool m_bBtLr;
/// Same, but for textframe rotation.
bool m_bFrameBtLr;
PageMargins m_pageMargins; PageMargins m_pageMargins;
......
...@@ -24,10 +24,25 @@ class Size; ...@@ -24,10 +24,25 @@ class Size;
class Point; class Point;
class SdrObject; class SdrObject;
namespace sw
{
class Frame;
}
class SwFrmFmt; class SwFrmFmt;
class SwNode;
class DocxExport; class DocxExport;
/// Helper class, so that the DocxExport::RestoreData() call will always happen.
class ExportDataSaveRestore
{
private:
DocxExport& m_rExport;
public:
ExportDataSaveRestore(DocxExport& rExport, sal_uLong nStt, sal_uLong nEnd, sw::Frame* pParentFrame);
~ExportDataSaveRestore();
};
/// Handles DOCX export of drawings. /// Handles DOCX export of drawings.
class DocxSdrExport class DocxSdrExport
{ {
...@@ -38,6 +53,20 @@ public: ...@@ -38,6 +53,20 @@ public:
~DocxSdrExport(); ~DocxSdrExport();
void setSerializer(sax_fastparser::FSHelperPtr pSerializer); void setSerializer(sax_fastparser::FSHelperPtr pSerializer);
/// When exporting fly frames, this holds the real size of the frame.
const Size* getFlyFrameSize();
bool getTextFrameSyntax();
sax_fastparser::FastAttributeList*& getFlyAttrList();
void setFlyAttrList(sax_fastparser::FastAttributeList* pAttrList);
/// Attributes of the next v:textbox element.
sax_fastparser::FastAttributeList* getTextboxAttrList();
OStringBuffer& getTextFrameStyle();
/// Same, as DocxAttributeOutput::m_bBtLr, but for textframe rotation.
bool getFrameBtLr();
void setFrameBtLr(bool bFrameBtLr);
sax_fastparser::FastAttributeList*& getFlyFillAttrList();
sax_fastparser::FastAttributeList* getFlyWrapAttrList();
void setFlyWrapAttrList(sax_fastparser::FastAttributeList* pAttrList);
void startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rSize); void startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rSize);
void endDMLAnchorInline(const SwFrmFmt* pFrmFmt); void endDMLAnchorInline(const SwFrmFmt* pFrmFmt);
...@@ -49,6 +78,10 @@ public: ...@@ -49,6 +78,10 @@ public:
void writeDiagram(const SdrObject* sdrObject, const Size& size); void writeDiagram(const SdrObject* sdrObject, const Size& size);
/// Write <a:effectLst>, the effect list. /// Write <a:effectLst>, the effect list.
void writeDMLEffectLst(const SwFrmFmt& rFrmFmt); void writeDMLEffectLst(const SwFrmFmt& rFrmFmt);
/// Writes text frame in VML format.
void writeVMLTextFrame(sw::Frame* pParentFrame);
/// Undo the text direction mangling done by the frame btLr handler in writerfilter::dmapper::DomainMapper::lcl_startCharacterGroup()
bool checkFrameBtlr(SwNode* pStartNode, sax_fastparser::FastAttributeList* pTextboxAttrList = 0, sax_fastparser::FastAttributeList* pBodyPrAttrList = 0);
}; };
#endif // INCLUDED_SW_SOURCE_FILTER_WW8_DOCXSDREXPORT_HXX #endif // INCLUDED_SW_SOURCE_FILTER_WW8_DOCXSDREXPORT_HXX
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment