diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-12-06 11:44:13 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-12-06 11:44:13 +0100 |
commit | 5123bb6194f6c3b94abc2494768dd676de38ad3e (patch) | |
tree | 0eead6ba42bbef60d309765321f7055f1ca7238a /writerfilter | |
parent | 1903912d21e713d42f1343be00f70df810a427ee (diff) |
No need to have TableDataHandler as a template
Change-Id: If19feb011db4027bae6f0c59b48967657c36b7a8
Diffstat (limited to 'writerfilter')
4 files changed, 10 insertions, 17 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx index bd716741515f..f02ec9639615 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx @@ -28,8 +28,7 @@ namespace writerfilter { namespace dmapper { -typedef ::com::sun::star::text::XTextRange TextRange_t; -typedef ::com::sun::star::uno::Reference< TextRange_t > Handle_t; +typedef css::uno::Reference< css::text::XTextRange > Handle_t; typedef ::com::sun::star::uno::Sequence< Handle_t> CellSequence_t; typedef boost::shared_ptr<CellSequence_t> CellSequencePointer_t; typedef ::com::sun::star::uno::Sequence< CellSequence_t > RowSequence_t; @@ -66,7 +65,7 @@ struct HorizontallyMergedCell } }; -class DomainMapperTableHandler : public TableDataHandler<Handle_t , TablePropertyMapPtr > +class DomainMapperTableHandler : public TableDataHandler { TextReference_t m_xText; DomainMapper_Impl& m_rDMapper_Impl; diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 01e7577866e5..11e58cd9ff1f 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -309,7 +309,6 @@ class DomainMapper; class DomainMapper_Impl { public: - typedef TableDataHandler< ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >, TablePropertyMapPtr > TableDataHandler_t; typedef std::map < OUString, BookmarkInsertPosition > BookmarkMap_t; private: @@ -359,7 +358,7 @@ private: // TableManagers are stacked: one for each stream to avoid any confusion std::stack< boost::shared_ptr< DomainMapperTableManager > > m_aTableManagers; - TableDataHandler_t::Pointer_t m_pTableHandler; + TableDataHandler::Pointer_t m_pTableHandler; //each context needs a stack of currently used attributes PropertyStack m_aPropertyStacks[NUMBER_OF_CONTEXTS]; diff --git a/writerfilter/source/dmapper/TableManager.cxx b/writerfilter/source/dmapper/TableManager.cxx index a7b727517afa..dff29f8212d4 100644 --- a/writerfilter/source/dmapper/TableManager.cxx +++ b/writerfilter/source/dmapper/TableManager.cxx @@ -433,7 +433,7 @@ void TableManager::handle(const css::uno::Reference<css::text::XTextRange>& rHan setHandle(rHandle); } -void TableManager::setHandler(TableDataHandler<css::uno::Reference<css::text::XTextRange>, TablePropertyMapPtr>::Pointer_t pTableDataHandler) +void TableManager::setHandler(TableDataHandler::Pointer_t pTableDataHandler) { mpTableDataHandler = pTableDataHandler; } diff --git a/writerfilter/source/dmapper/TableManager.hxx b/writerfilter/source/dmapper/TableManager.hxx index b635a254efb8..59f2d7bc8fbc 100644 --- a/writerfilter/source/dmapper/TableManager.hxx +++ b/writerfilter/source/dmapper/TableManager.hxx @@ -41,7 +41,6 @@ namespace dmapper /** Class to handle events generated by TableManager::resolveCurrentTable */ -template <typename T, typename PropertiesPointer> class TableDataHandler { public: @@ -54,8 +53,7 @@ public: @param nDepth depth of the table in surrounding table hierarchy @param pProps properties of the table */ - virtual void startTable(unsigned int nRows, unsigned int nDepth, - PropertiesPointer pProps) = 0; + virtual void startTable(unsigned int nRows, unsigned int nDepth, TablePropertyMapPtr pProps) = 0; /** Handle end of table. @@ -68,8 +66,7 @@ public: @param nCols number of columns in the table @param pProps properties of the row */ - virtual void startRow(unsigned int nCols, - PropertiesPointer pProps) = 0; + virtual void startRow(unsigned int nCols, TablePropertyMapPtr pProps) = 0; /** Handle end of row. @@ -82,14 +79,14 @@ public: @param rT start handle of the cell @param pProps properties of the cell */ - virtual void startCell(const T & rT, PropertiesPointer pProps) = 0; + virtual void startCell(const css::uno::Reference<css::text::XTextRange>& xTextRange, TablePropertyMapPtr pProps) = 0; /** Handle end of cell. @param rT end handle of cell */ - virtual void endCell(const T & rT) = 0; + virtual void endCell(const css::uno::Reference<css::text::XTextRange>& xTextRange) = 0; protected: ~TableDataHandler() {} @@ -408,12 +405,10 @@ private: RowData::Pointer_t mpUnfinishedRow; bool mbKeepUnfinishedRow; - typedef TableDataHandler<css::uno::Reference<css::text::XTextRange>, TablePropertyMapPtr>::Pointer_t TableDataHandlerPointer_t; - /** handler for resolveCurrentTable */ - TableDataHandlerPointer_t mpTableDataHandler; + TableDataHandler::Pointer_t mpTableDataHandler; /** Set flag which indicates the current handle is in a cell. @@ -503,7 +498,7 @@ public: @param pTableDataHandler the handler */ - void setHandler(TableDataHandlerPointer_t pTableDataHandler); + void setHandler(TableDataHandler::Pointer_t pTableDataHandler); /** Set the current handle. |