summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-07-08 07:55:09 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-07-08 07:56:20 +0200
commitaf4121416c8f4c88385765ec16a7569104ed2714 (patch)
tree9b5a0f9af8747bed16a205cb13e5f88fb2cb6ca5 /writerfilter
parent799cc41b53a59c543408fa5370e107c2c57a2904 (diff)
writerfilter: remove not needed TableDataHandler interface
Only DomainMapperTableHandler implemented it, and all clients can use that directly, no need for this abstraction here. Change-Id: I800b9eddcfddee643c725c29d9f15db3c9aab02c
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.hxx42
-rw-r--r--writerfilter/source/dmapper/TableManager.cxx3
-rw-r--r--writerfilter/source/dmapper/TableManager.hxx58
3 files changed, 39 insertions, 64 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx
index bec48a323705..6fe306e7cc10 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx
@@ -60,7 +60,8 @@ struct HorizontallyMergedCell
}
};
-class DomainMapperTableHandler : public TableDataHandler
+/// Class to handle events generated by TableManager::resolveCurrentTable().
+class DomainMapperTableHandler
{
css::uno::Reference<css::text::XTextAppendAndConvert> m_xText;
DomainMapper_Impl& m_rDMapper_Impl;
@@ -92,13 +93,38 @@ public:
DomainMapper_Impl& rDMapper_Impl);
virtual ~DomainMapperTableHandler();
- virtual void startTable(unsigned int nRows, unsigned int nDepth,
- TablePropertyMapPtr pProps) SAL_OVERRIDE;
- virtual void endTable(unsigned int nestedTableLevel) SAL_OVERRIDE;
- virtual void startRow(unsigned int nCells, TablePropertyMapPtr pProps) SAL_OVERRIDE;
- virtual void endRow() SAL_OVERRIDE;
- virtual void startCell(const css::uno::Reference< css::text::XTextRange > & start, TablePropertyMapPtr pProps) SAL_OVERRIDE;
- virtual void endCell(const css::uno::Reference< css::text::XTextRange > & end) SAL_OVERRIDE;
+ /**
+ Handle start of table.
+
+ @param nRows number of rows in the table
+ @param nDepth depth of the table in surrounding table hierarchy
+ @param pProps properties of the table
+ */
+ void startTable(unsigned int nRows, unsigned int nDepth, TablePropertyMapPtr pProps);
+ /// Handle end of table.
+ void endTable(unsigned int nestedTableLevel);
+ /**
+ Handle start of row.
+
+ @param nCols number of columns in the table
+ @param pProps properties of the row
+ */
+ void startRow(unsigned int nCells, TablePropertyMapPtr pProps);
+ /// Handle end of row.
+ void endRow();
+ /**
+ Handle start of cell.
+
+ @param rT start handle of the cell
+ @param pProps properties of the cell
+ */
+ void startCell(const css::uno::Reference< css::text::XTextRange > & start, TablePropertyMapPtr pProps);
+ /**
+ Handle end of cell.
+
+ @param rT end handle of cell
+ */
+ void endCell(const css::uno::Reference< css::text::XTextRange > & end);
css::uno::Reference< css::text::XTextRange >& getTable() { return m_xTableRange; };
void setHadFootOrEndnote(bool bHadFootOrEndnote);
diff --git a/writerfilter/source/dmapper/TableManager.cxx b/writerfilter/source/dmapper/TableManager.cxx
index 4f8595a0ab10..be5a618ffe50 100644
--- a/writerfilter/source/dmapper/TableManager.cxx
+++ b/writerfilter/source/dmapper/TableManager.cxx
@@ -18,6 +18,7 @@
*/
#include <TableManager.hxx>
+#include <DomainMapperTableHandler.hxx>
#include <util.hxx>
namespace writerfilter
@@ -408,7 +409,7 @@ void TableManager::handle(const css::uno::Reference<css::text::XTextRange>& rHan
setHandle(rHandle);
}
-void TableManager::setHandler(TableDataHandler::Pointer_t pTableDataHandler)
+void TableManager::setHandler(std::shared_ptr<DomainMapperTableHandler> pTableDataHandler)
{
mpTableDataHandler = pTableDataHandler;
}
diff --git a/writerfilter/source/dmapper/TableManager.hxx b/writerfilter/source/dmapper/TableManager.hxx
index 3d44e24c9a6a..0f203a1ca9d2 100644
--- a/writerfilter/source/dmapper/TableManager.hxx
+++ b/writerfilter/source/dmapper/TableManager.hxx
@@ -37,59 +37,7 @@ namespace writerfilter
namespace dmapper
{
-/**
- Class to handle events generated by TableManager::resolveCurrentTable
- */
-class TableDataHandler
-{
-public:
- typedef std::shared_ptr<TableDataHandler> Pointer_t;
-
- /**
- Handle start of table.
-
- @param nRows number of rows in the table
- @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, TablePropertyMapPtr pProps) = 0;
-
- /**
- Handle end of table.
- */
- virtual void endTable(unsigned int nestedTableLevel) = 0;
-
- /**
- Handle start of row.
-
- @param nCols number of columns in the table
- @param pProps properties of the row
- */
- virtual void startRow(unsigned int nCols, TablePropertyMapPtr pProps) = 0;
-
- /**
- Handle end of row.
- */
- virtual void endRow() = 0;
-
- /**
- Handle start of cell.
-
- @param rT start handle of the cell
- @param pProps properties of the cell
- */
- 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 css::uno::Reference<css::text::XTextRange>& xTextRange) = 0;
-
-protected:
- ~TableDataHandler() {}
-};
+class DomainMapperTableHandler;
/**
The table manager.
@@ -403,7 +351,7 @@ private:
/**
handler for resolveCurrentTable
*/
- TableDataHandler::Pointer_t mpTableDataHandler;
+ std::shared_ptr<DomainMapperTableHandler> mpTableDataHandler;
/**
Set flag which indicates the current handle is in a cell.
@@ -493,7 +441,7 @@ public:
@param pTableDataHandler the handler
*/
- void setHandler(TableDataHandler::Pointer_t pTableDataHandler);
+ void setHandler(std::shared_ptr<DomainMapperTableHandler> pTableDataHandler);
/**
Set the current handle.