summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-01-16 20:54:48 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-01-17 08:45:38 +0100
commit767f6ee7be94158335cef55afd3708da2f871210 (patch)
treed4aef95a010a8295fbfae59cea95ac43e61fb879
parente3ccc09417731e61d3d35ed4cc1a7436e05f5325 (diff)
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 <vmiklos@collabora.com>
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx4
-rw-r--r--sw/source/filter/ww8/rtfexportfilter.hxx3
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.cxx8
3 files changed, 10 insertions, 5 deletions
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);