[Libreoffice-commits] core.git: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Dec 19 08:14:57 UTC 2018


 sw/source/filter/ww8/rtfattributeoutput.cxx |    2 +-
 sw/source/filter/ww8/rtfattributeoutput.hxx |   16 ++++++++++------
 sw/source/filter/ww8/rtfexport.cxx          |    6 +++---
 3 files changed, 14 insertions(+), 10 deletions(-)

New commits:
commit 65e7c9884da4d49fe6e9792ced1bd94c87e80ebc
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue Dec 18 21:17:40 2018 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Dec 19 09:14:33 2018 +0100

    sw RtfAttributeOutput: make members private
    
    Change-Id: I417dd9352ad0b076b5c0c554b9d7dd3fe3c08fb7
    Reviewed-on: https://gerrit.libreoffice.org/65374
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index d309364f3f1f..dd5ccc9e9de2 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -3594,6 +3594,7 @@ bool RtfAttributeOutput::PlaceholderField(const SwField* pField)
 
 RtfAttributeOutput::RtfAttributeOutput(RtfExport& rExport)
     : m_rExport(rExport)
+    , m_pPrevPageDesc(nullptr)
     , m_nStyleId(0)
     , m_nListId(0)
     , m_nNextAnnotationMarkId(0)
@@ -3614,7 +3615,6 @@ RtfAttributeOutput::RtfAttributeOutput(RtfExport& rExport)
     , m_nParaBeforeSpacing(0)
     , m_bParaAfterAutoSpacing(false)
     , m_nParaAfterSpacing(0)
-    , m_pPrevPageDesc(nullptr)
 {
 }
 
diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx
index 13c54e387f5e..af740f23725e 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.hxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.hxx
@@ -451,10 +451,15 @@ protected:
     bool DropdownField(const SwField* pField) override;
     bool PlaceholderField(const SwField* pField) override;
 
+private:
     /// Reference to the export, where to get the data from
     RtfExport& m_rExport;
 
-private:
+    OStringBuffer m_aTabStop;
+
+    /// Access to the page style of the previous paragraph.
+    const SwPageDesc* m_pPrevPageDesc;
+
     /// Output graphic fly frames.
     void FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat, const SwGrfNode* pGrfNode);
     void FlyFrameOLE(const SwFlyFrameFormat* pFlyFrameFormat, SwOLENode& rOLENode,
@@ -619,11 +624,6 @@ public:
     /// Return the right export class.
     MSWordExportBase& GetExport() override;
 
-    OStringBuffer m_aTabStop;
-
-    /// Access to the page style of the previous paragraph.
-    const SwPageDesc* m_pPrevPageDesc;
-
     // These are used by wwFont::WriteRtf()
     /// Start the font.
     void StartFont(const OUString& rFamilyName) const;
@@ -647,6 +647,10 @@ public:
 
     /// Handles just the {\shptxt ...} part of a shape export.
     void writeTextFrame(const ww8::Frame& rFrame, bool bTextBox = false);
+
+    OStringBuffer& GetTabStop() { return m_aTabStop; }
+
+    const SwPageDesc* GetPrevPageDesc() const { return m_pPrevPageDesc; }
 };
 
 #endif // INCLUDED_SW_SOURCE_FILTER_WW8_RTFATTRIBUTEOUTPUT_HXX
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index fdfd30e89de3..6d095309d73f 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -706,7 +706,7 @@ ErrCode RtfExport::ExportDocument_Impl()
     WriteUserProps();
     // Default TabSize
     Strm()
-        .WriteCharPtr(m_pAttrOutput->m_aTabStop.makeStringAndClear().getStr())
+        .WriteCharPtr(m_pAttrOutput->GetTabStop().makeStringAndClear().getStr())
         .WriteCharPtr(SAL_NEWLINE_STRING);
 
     // Automatic hyphenation: it's a global setting in Word, it's a paragraph setting in Writer.
@@ -966,8 +966,8 @@ void RtfExport::PrepareNewPageDesc(const SfxItemSet* pSet, const SwNode& rNd,
         m_pSections->AppendSection(pNewPgDesc, rNd, pFormat, nLnNm);
 
     // Don't insert a page break, when we're changing page style just because the next page has to be a different one.
-    if (!m_pAttrOutput->m_pPrevPageDesc
-        || m_pAttrOutput->m_pPrevPageDesc->GetFollow() != pNewPgDesc)
+    if (!m_pAttrOutput->GetPrevPageDesc()
+        || m_pAttrOutput->GetPrevPageDesc()->GetFollow() != pNewPgDesc)
         AttrOutput().SectionBreak(msword::PageBreak, m_pSections->CurrentSectionInfo());
 }
 


More information about the Libreoffice-commits mailing list