From 8ee52d72f57f70f791c79372a43ad6e5efd88c19 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 21 Dec 2015 10:59:06 +0200 Subject: [PATCH] loplugin:unusedfields writerfilter,writerperfect Change-Id: I8863fcdb0751d2f1becea5b2487d4070e4fd4195 --- writerfilter/source/dmapper/DomainMapper_Impl.hxx | 2 +- writerfilter/source/dmapper/SettingsTable.cxx | 11 ++++------- writerfilter/source/dmapper/SettingsTable.hxx | 2 +- writerfilter/source/dmapper/StyleSheetTable.cxx | 1 - writerfilter/source/dmapper/TableData.hxx | 5 ----- writerfilter/source/dmapper/TableManager.hxx | 5 ----- writerfilter/source/filter/WriterFilterDetection.cxx | 11 ++++------- writerperfect/inc/ImportFilter.hxx | 1 - writerperfect/qa/unit/WpftImportTestBase.hxx | 1 - .../source/writer/WordPerfectImportFilter.cxx | 8 ++++---- .../source/writer/WordPerfectImportFilter.hxx | 4 +--- 11 files changed, 15 insertions(+), 36 deletions(-) diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 14199bb4a78d..7aace410c990 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -593,7 +593,7 @@ public: SettingsTablePtr GetSettingsTable() { if( !m_pSettingsTable ) - m_pSettingsTable.reset( new SettingsTable( m_xTextFactory ) ); + m_pSettingsTable.reset( new SettingsTable ); return m_pSettingsTable; } diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx index 6aae48da4da1..7dbda3682011 100644 --- a/writerfilter/source/dmapper/SettingsTable.cxx +++ b/writerfilter/source/dmapper/SettingsTable.cxx @@ -41,8 +41,6 @@ namespace dmapper struct SettingsTable_Impl { - const uno::Reference< lang::XMultiServiceFactory > m_xTextFactory; - OUString m_sCharacterSpacing; OUString m_sDecimalSymbol; OUString m_sListSeparatorForFields; //2.15.1.56 listSeparator (List Separator for Field Code Evaluation) @@ -71,9 +69,8 @@ struct SettingsTable_Impl std::vector m_aCompatSettings; uno::Sequence m_pCurrentCompatSetting; - SettingsTable_Impl( const uno::Reference< lang::XMultiServiceFactory > & xTextFactory ) : - m_xTextFactory( xTextFactory ) - , m_nDefaultTabStop( 720 ) //default is 1/2 in + SettingsTable_Impl() : + m_nDefaultTabStop( 720 ) //default is 1/2 in , m_nHyphenationZone(0) , m_bNoPunctuationKerning(false) , m_doNotIncludeSubdocsInStats(false) @@ -97,10 +94,10 @@ struct SettingsTable_Impl }; -SettingsTable::SettingsTable(const uno::Reference< lang::XMultiServiceFactory > & xTextFactory) +SettingsTable::SettingsTable() : LoggedProperties("SettingsTable") , LoggedTable("SettingsTable") -, m_pImpl( new SettingsTable_Impl(xTextFactory) ) +, m_pImpl( new SettingsTable_Impl ) { } diff --git a/writerfilter/source/dmapper/SettingsTable.hxx b/writerfilter/source/dmapper/SettingsTable.hxx index 5a0d6886b4c0..813f8dddeae0 100644 --- a/writerfilter/source/dmapper/SettingsTable.hxx +++ b/writerfilter/source/dmapper/SettingsTable.hxx @@ -45,7 +45,7 @@ class SettingsTable : public LoggedProperties, public LoggedTable std::unique_ptr m_pImpl; public: - SettingsTable(const css::uno::Reference& xTextFactory); + SettingsTable(); virtual ~SettingsTable(); //returns default TabStop in 1/100th mm diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index a0e5922b7f15..e9b22182d04c 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -285,7 +285,6 @@ struct StyleSheetTable_Impl std::vector< StyleSheetEntryPtr > m_aStyleSheetEntries; StyleSheetEntryPtr m_pCurrentEntry; PropertyMapPtr m_pDefaultParaProps, m_pDefaultCharProps; - PropertyMapPtr m_pCurrentProps; StringPairMap_t m_aStyleNameMap; /// Style names which should not be used without a " (user)" suffix. std::set m_aReservedStyleNames; diff --git a/writerfilter/source/dmapper/TableData.hxx b/writerfilter/source/dmapper/TableData.hxx index b1b5c1827997..ff5f6aa7da11 100644 --- a/writerfilter/source/dmapper/TableData.hxx +++ b/writerfilter/source/dmapper/TableData.hxx @@ -244,11 +244,6 @@ class TableData typedef RowData::Pointer_t RowPointer_t; typedef ::std::vector Rows; - /** - the table properties - */ - TablePropertyMapPtr mpTableProps; - /** the data of the rows of the table */ diff --git a/writerfilter/source/dmapper/TableManager.hxx b/writerfilter/source/dmapper/TableManager.hxx index 2429f4d32bae..8f907cc35091 100644 --- a/writerfilter/source/dmapper/TableManager.hxx +++ b/writerfilter/source/dmapper/TableManager.hxx @@ -51,11 +51,6 @@ class TableManager { class TableManagerState { - /** - properties at the current point in document - */ - TablePropertyMapPtr mpProps; - /** properties of the current cell */ diff --git a/writerfilter/source/filter/WriterFilterDetection.cxx b/writerfilter/source/filter/WriterFilterDetection.cxx index 2624c06bd997..bf77004faa8e 100644 --- a/writerfilter/source/filter/WriterFilterDetection.cxx +++ b/writerfilter/source/filter/WriterFilterDetection.cxx @@ -33,10 +33,8 @@ class WriterFilterDetection : public cppu::WeakImplHelper lang::XServiceInfo > { - uno::Reference m_xContext; - public: - explicit WriterFilterDetection(const uno::Reference& rxContext); + explicit WriterFilterDetection(); virtual ~WriterFilterDetection(); //XExtendedFilterDetection @@ -50,8 +48,7 @@ public: uno::Sequence SAL_CALL WriterFilterDetection_getSupportedServiceNames() throw (uno::RuntimeException); -WriterFilterDetection::WriterFilterDetection(const uno::Reference& rxContext) - : m_xContext(rxContext) +WriterFilterDetection::WriterFilterDetection() { } @@ -135,9 +132,9 @@ uno::Sequence WriterFilterDetection::getSupportedServiceNames() throw return WriterFilterDetection_getSupportedServiceNames(); } -extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* SAL_CALL com_sun_star_comp_Writer_WriterFilterDetector_get_implementation(uno::XComponentContext* pComp, uno::Sequence const&) +extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* SAL_CALL com_sun_star_comp_Writer_WriterFilterDetector_get_implementation(uno::XComponentContext* /*pComp*/, uno::Sequence const&) { - return cppu::acquire(new WriterFilterDetection(pComp)); + return cppu::acquire(new WriterFilterDetection); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerperfect/inc/ImportFilter.hxx b/writerperfect/inc/ImportFilter.hxx index da4badf5a82b..9833edb013a2 100644 --- a/writerperfect/inc/ImportFilter.hxx +++ b/writerperfect/inc/ImportFilter.hxx @@ -180,7 +180,6 @@ private: css::uno::Reference< css::uno::XComponentContext > mxContext; css::uno::Reference< css::lang::XComponent > mxDoc; OUString msFilterName; - css::uno::Reference< css::xml::sax::XDocumentHandler > mxHandler; }; } diff --git a/writerperfect/qa/unit/WpftImportTestBase.hxx b/writerperfect/qa/unit/WpftImportTestBase.hxx index 7e2098773dd6..ce7017240a70 100644 --- a/writerperfect/qa/unit/WpftImportTestBase.hxx +++ b/writerperfect/qa/unit/WpftImportTestBase.hxx @@ -101,7 +101,6 @@ private: private: const rtl::OUString m_aFactoryURL; css::uno::Reference m_xDesktop; - css::uno::Reference m_xFileAccess; css::uno::Reference m_xFilter; css::uno::Reference m_xTypeMap; const WpftOptionalMap_t *m_pOptionalMap; diff --git a/writerperfect/source/writer/WordPerfectImportFilter.cxx b/writerperfect/source/writer/WordPerfectImportFilter.cxx index 585128a14da0..d7edfd6e8ae5 100644 --- a/writerperfect/source/writer/WordPerfectImportFilter.cxx +++ b/writerperfect/source/writer/WordPerfectImportFilter.cxx @@ -280,8 +280,8 @@ throw (RuntimeException, std::exception) } -WordPerfectImportFilterDialog::WordPerfectImportFilterDialog(const Reference< XComponentContext > &rContext) : - mxContext(rContext) {} +WordPerfectImportFilterDialog::WordPerfectImportFilterDialog() +{} WordPerfectImportFilterDialog::~WordPerfectImportFilterDialog() { @@ -385,10 +385,10 @@ throw (RuntimeException) return aRet; } -Reference< XInterface > SAL_CALL WordPerfectImportFilterDialog_createInstance(const Reference< XComponentContext > &rContext) +Reference< XInterface > SAL_CALL WordPerfectImportFilterDialog_createInstance(const Reference< XComponentContext > &) throw(Exception) { - return static_cast(new WordPerfectImportFilterDialog(rContext)); + return static_cast(new WordPerfectImportFilterDialog); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerperfect/source/writer/WordPerfectImportFilter.hxx b/writerperfect/source/writer/WordPerfectImportFilter.hxx index f9fa2a677e9f..749aaf56d453 100644 --- a/writerperfect/source/writer/WordPerfectImportFilter.hxx +++ b/writerperfect/source/writer/WordPerfectImportFilter.hxx @@ -38,7 +38,6 @@ protected: css::uno::Reference< css::uno::XComponentContext > mxContext; css::uno::Reference< css::lang::XComponent > mxDoc; OUString msFilterName; - css::uno::Reference< css::xml::sax::XDocumentHandler > mxHandler; bool SAL_CALL importImpl(const css::uno::Sequence< css::beans::PropertyValue > &aDescriptor) throw (css::uno::RuntimeException, std::exception); @@ -96,7 +95,6 @@ class WordPerfectImportFilterDialog : public cppu::WeakImplHelper < css::beans::XPropertyAccess > { - css::uno::Reference< css::uno::XComponentContext > mxContext; OUString msPassword; css::uno::Reference< css::io::XInputStream > mxInputStream; @@ -128,7 +126,7 @@ class WordPerfectImportFilterDialog : public cppu::WeakImplHelper < css::uno::RuntimeException, std::exception) override; public: - explicit WordPerfectImportFilterDialog(const css::uno::Reference< css::uno::XComponentContext > &rContext); + explicit WordPerfectImportFilterDialog(); };