sw/source/filter/ww8/rtfexport.cxx       |    4 ++--
 sw/source/filter/ww8/rtfexportfilter.hxx |    3 ++-
 sw/source/filter/ww8/rtfsdrexport.cxx    |    8 ++++++--
 3 files changed, 10 insertions(+), 5 deletions(-)

New commits:
commit 767f6ee7be94158335cef55afd3708da2f871210
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Wed Jan 16 20:54:48 2019 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Thu Jan 17 08:45:38 2019 +0100

    sw: make members of RtfExportFilter private
    
    - also use std::make_unique
    - also avoid multiple declarations in a single statement
    
    Change-Id: Ib5429730fcf14131b7b68628a8724a812dcc018f
    Reviewed-on: https://gerrit.libreoffice.org/66479
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/source/filter/ww8/rtfexport.cxx 
b/sw/source/filter/ww8/rtfexport.cxx
index 4e8b344c30df..451f09a611b8 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -692,7 +692,7 @@ ErrCode RtfExport::ExportDocument_Impl()
     // Font table
     WriteFonts();
 
-    m_pStyles.reset(new MSWordStyles(*this));
+    m_pStyles = std::make_unique<MSWordStyles>(*this);
     // Color and stylesheet table
     WriteStyles();
 
@@ -1057,7 +1057,7 @@ RtfExport::RtfExport(RtfExportFilter* pFilter, SwDoc* 
pDocument, SwPaM* pCurrent
     m_pSdrExport = o3tl::make_unique<RtfSdrExport>(*this);
 
     if (!m_pWriter)
-        m_pWriter = &m_pFilter->m_aWriter;
+        m_pWriter = &m_pFilter->GetWriter();
 }
 
 RtfExport::~RtfExport() = default;
diff --git a/sw/source/filter/ww8/rtfexportfilter.hxx 
b/sw/source/filter/ww8/rtfexportfilter.hxx
index 34cf5985c34b..b7603c1de732 100644
--- a/sw/source/filter/ww8/rtfexportfilter.hxx
+++ b/sw/source/filter/ww8/rtfexportfilter.hxx
@@ -52,6 +52,7 @@ class RtfExportFilter final
 {
     css::uno::Reference<css::uno::XComponentContext> m_xCtx;
     css::uno::Reference<css::lang::XComponent> m_xSrcDoc;
+    RtfWriter m_aWriter;
 
 public:
     explicit RtfExportFilter(css::uno::Reference<css::uno::XComponentContext> 
xCtx);
@@ -66,7 +67,7 @@ public:
     void SAL_CALL
     setSourceDocument(const css::uno::Reference<css::lang::XComponent>& xDoc) 
override;
 
-    RtfWriter m_aWriter;
+    Writer& GetWriter() { return m_aWriter; }
 };
 
 #endif // INCLUDED_SW_SOURCE_FILTER_WW8_RTFEXPORTFILTER_HXX
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx 
b/sw/source/filter/ww8/rtfsdrexport.cxx
index a6175b642970..9684964386da 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -220,7 +220,8 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, 
const tools::Rectangl
             case ESCHER_Prop_geoLeft:
             case ESCHER_Prop_geoTop:
             {
-                sal_uInt32 nLeft = 0, nTop = 0;
+                sal_uInt32 nLeft = 0;
+                sal_uInt32 nTop = 0;
 
                 if (nId == ESCHER_Prop_geoLeft)
                 {
@@ -243,7 +244,10 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, 
const tools::Rectangl
             case ESCHER_Prop_geoRight:
             case ESCHER_Prop_geoBottom:
             {
-                sal_uInt32 nLeft = 0, nRight = 0, nTop = 0, nBottom = 0;
+                sal_uInt32 nLeft = 0;
+                sal_uInt32 nRight = 0;
+                sal_uInt32 nTop = 0;
+                sal_uInt32 nBottom = 0;
                 rProps.GetOpt(ESCHER_Prop_geoLeft, nLeft);
                 rProps.GetOpt(ESCHER_Prop_geoTop, nTop);
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to