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

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: 's avatarMiklos Vajna <vmiklos@collabora.com>
üst e3ccc094
...@@ -692,7 +692,7 @@ ErrCode RtfExport::ExportDocument_Impl() ...@@ -692,7 +692,7 @@ ErrCode RtfExport::ExportDocument_Impl()
// Font table // Font table
WriteFonts(); WriteFonts();
m_pStyles.reset(new MSWordStyles(*this)); m_pStyles = std::make_unique<MSWordStyles>(*this);
// Color and stylesheet table // Color and stylesheet table
WriteStyles(); WriteStyles();
...@@ -1057,7 +1057,7 @@ RtfExport::RtfExport(RtfExportFilter* pFilter, SwDoc* pDocument, SwPaM* pCurrent ...@@ -1057,7 +1057,7 @@ RtfExport::RtfExport(RtfExportFilter* pFilter, SwDoc* pDocument, SwPaM* pCurrent
m_pSdrExport = o3tl::make_unique<RtfSdrExport>(*this); m_pSdrExport = o3tl::make_unique<RtfSdrExport>(*this);
if (!m_pWriter) if (!m_pWriter)
m_pWriter = &m_pFilter->m_aWriter; m_pWriter = &m_pFilter->GetWriter();
} }
RtfExport::~RtfExport() = default; RtfExport::~RtfExport() = default;
......
...@@ -52,6 +52,7 @@ class RtfExportFilter final ...@@ -52,6 +52,7 @@ class RtfExportFilter final
{ {
css::uno::Reference<css::uno::XComponentContext> m_xCtx; css::uno::Reference<css::uno::XComponentContext> m_xCtx;
css::uno::Reference<css::lang::XComponent> m_xSrcDoc; css::uno::Reference<css::lang::XComponent> m_xSrcDoc;
RtfWriter m_aWriter;
public: public:
explicit RtfExportFilter(css::uno::Reference<css::uno::XComponentContext> xCtx); explicit RtfExportFilter(css::uno::Reference<css::uno::XComponentContext> xCtx);
...@@ -66,7 +67,7 @@ public: ...@@ -66,7 +67,7 @@ public:
void SAL_CALL void SAL_CALL
setSourceDocument(const css::uno::Reference<css::lang::XComponent>& xDoc) override; 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 #endif // INCLUDED_SW_SOURCE_FILTER_WW8_RTFEXPORTFILTER_HXX
......
...@@ -220,7 +220,8 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const tools::Rectangl ...@@ -220,7 +220,8 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const tools::Rectangl
case ESCHER_Prop_geoLeft: case ESCHER_Prop_geoLeft:
case ESCHER_Prop_geoTop: case ESCHER_Prop_geoTop:
{ {
sal_uInt32 nLeft = 0, nTop = 0; sal_uInt32 nLeft = 0;
sal_uInt32 nTop = 0;
if (nId == ESCHER_Prop_geoLeft) if (nId == ESCHER_Prop_geoLeft)
{ {
...@@ -243,7 +244,10 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const tools::Rectangl ...@@ -243,7 +244,10 @@ void RtfSdrExport::Commit(EscherPropertyContainer& rProps, const tools::Rectangl
case ESCHER_Prop_geoRight: case ESCHER_Prop_geoRight:
case ESCHER_Prop_geoBottom: 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_geoLeft, nLeft);
rProps.GetOpt(ESCHER_Prop_geoTop, nTop); rProps.GetOpt(ESCHER_Prop_geoTop, nTop);
......
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