[Libreoffice-commits] core.git: writerfilter/inc writerfilter/Library_writerfilter.mk writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Sun Dec 7 09:21:00 PST 2014
writerfilter/Library_writerfilter.mk | 2
writerfilter/inc/resourcemodel/util.hxx | 34 --------
writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 5 -
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 1
writerfilter/source/dmapper/TableManager.cxx | 7 -
writerfilter/source/dmapper/TableManager.hxx | 1
writerfilter/source/dmapper/util.cxx | 58 +++++++++++++
writerfilter/source/dmapper/util.hxx | 36 ++++++++
writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 1
writerfilter/source/resourcemodel/TagLogger.cxx | 1
writerfilter/source/resourcemodel/util.cxx | 63 ---------------
11 files changed, 102 insertions(+), 107 deletions(-)
New commits:
commit 365116a45dd93372a382521747c6eca882306ef3
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Sun Dec 7 17:53:41 2014 +0100
writerfilter: util.hxx is used only inside dmapper
Change-Id: Ia3736c32c460b466649f10f4790c30d0d25f8c5e
diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk
index df2d1e1..8377e19 100644
--- a/writerfilter/Library_writerfilter.mk
+++ b/writerfilter/Library_writerfilter.mk
@@ -108,6 +108,7 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\
writerfilter/source/dmapper/TblStylePrHandler \
writerfilter/source/dmapper/ThemeTable \
writerfilter/source/dmapper/WrapPolygonHandler \
+ writerfilter/source/dmapper/util \
writerfilter/source/filter/ImportFilter \
writerfilter/source/filter/RtfFilter \
writerfilter/source/filter/WriterFilter \
@@ -125,7 +126,6 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\
writerfilter/source/resourcemodel/ResourceModelHelper \
writerfilter/source/resourcemodel/TagLogger \
writerfilter/source/resourcemodel/qnametostrcore \
- writerfilter/source/resourcemodel/util \
))
$(eval $(call gb_Library_add_generated_exception_objects,writerfilter,\
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index c1487b4..035b076 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -35,6 +35,7 @@
#include <dmapperLoggers.hxx>
#include <TablePositionHandler.hxx>
#include <ConversionHelper.hxx>
+#include <util.hxx>
#include <osl/diagnose.h>
#ifdef DEBUG_WRITERFILTER
@@ -1174,7 +1175,7 @@ void DomainMapperTableHandler::startCell(const Handle_t & start,
#ifdef DEBUG_WRITERFILTER
dmapper_logger->startElement("table.cell");
dmapper_logger->startElement("table.cell.start");
- dmapper_logger->chars(toString(start));
+ dmapper_logger->chars(XTextRangeToString(start));
dmapper_logger->endElement();
if (pProps.get())
pProps->printProperties();
@@ -1191,7 +1192,7 @@ void DomainMapperTableHandler::endCell(const Handle_t & end)
{
#ifdef DEBUG_WRITERFILTER
dmapper_logger->startElement("table.cell.end");
- dmapper_logger->chars(toString(end));
+ dmapper_logger->chars(XTextRangeToString(end));
dmapper_logger->endElement();
dmapper_logger->endElement();
#endif
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 1a1ccdc..ac7af0d 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -70,7 +70,6 @@
#ifdef DEBUG_WRITERFILTER
#include <resourcemodel/QNameToString.hxx>
-#include <resourcemodel/util.hxx>
#include <dmapperLoggers.hxx>
#endif
#include <oox/token/tokens.hxx>
diff --git a/writerfilter/source/dmapper/TableManager.cxx b/writerfilter/source/dmapper/TableManager.cxx
index dff29f8..920a07d 100644
--- a/writerfilter/source/dmapper/TableManager.cxx
+++ b/writerfilter/source/dmapper/TableManager.cxx
@@ -18,6 +18,7 @@
*/
#include <TableManager.hxx>
+#include <util.hxx>
namespace writerfilter
{
@@ -32,7 +33,7 @@ void TableManager::openCell(const css::uno::Reference<css::text::XTextRange>& rH
{
#ifdef DEBUG_WRITERFILTER
mpTableLogger->startElement("tablemanager.openCell");
- mpTableLogger->chars(toString(rHandle));
+ mpTableLogger->chars(XTextRangeToString(rHandle));
mpTableLogger->endElement();
#endif
@@ -205,7 +206,7 @@ void TableManager::closeCell(const css::uno::Reference<css::text::XTextRange>& r
{
#ifdef DEBUG_WRITERFILTER
mpTableLogger->startElement("tablemanager.closeCell");
- mpTableLogger->chars(toString(rHandle));
+ mpTableLogger->chars(XTextRangeToString(rHandle));
mpTableLogger->endElement();
#endif
@@ -425,7 +426,7 @@ void TableManager::handle(const css::uno::Reference<css::text::XTextRange>& rHan
if (mpTableLogger)
{
mpTableLogger->startElement("tablemanager.handle");
- mpTableLogger->chars(toString(rHandle));
+ mpTableLogger->chars(XTextRangeToString(rHandle));
mpTableLogger->endElement();
}
#endif
diff --git a/writerfilter/source/dmapper/TableManager.hxx b/writerfilter/source/dmapper/TableManager.hxx
index 59f2d7b..a01a3a3 100644
--- a/writerfilter/source/dmapper/TableManager.hxx
+++ b/writerfilter/source/dmapper/TableManager.hxx
@@ -26,7 +26,6 @@
#include <boost/shared_ptr.hpp>
#include <stack>
-#include <resourcemodel/util.hxx>
#include <resourcemodel/TagLogger.hxx>
#include <rtl/strbuf.hxx>
diff --git a/writerfilter/source/resourcemodel/util.cxx b/writerfilter/source/dmapper/util.cxx
similarity index 74%
rename from writerfilter/source/resourcemodel/util.cxx
rename to writerfilter/source/dmapper/util.cxx
index 5c1a1b1..f0df398 100644
--- a/writerfilter/source/resourcemodel/util.cxx
+++ b/writerfilter/source/dmapper/util.cxx
@@ -20,23 +20,16 @@
#include <stdlib.h>
#include <fstream>
#include <string>
-#include <com/sun/star/awt/Point.hpp>
-#include <com/sun/star/awt/Rectangle.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/drawing/BitmapMode.hpp>
-#include <com/sun/star/drawing/FillStyle.hpp>
-#include <com/sun/star/drawing/HomogenMatrix3.hpp>
-#include <com/sun/star/text/TextContentAnchorType.hpp>
-#include <resourcemodel/WW8ResourceModel.hxx>
-#include <resourcemodel/TagLogger.hxx>
-#include <resourcemodel/util.hxx>
+#include <util.hxx>
namespace writerfilter
{
+namespace dmapper
+{
using namespace com::sun::star;
using namespace std;
-string toString(uno::Reference< text::XTextRange > textRange)
+string XTextRangeToString(uno::Reference< text::XTextRange > textRange)
{
string result;
@@ -60,4 +53,6 @@ string toString(uno::Reference< text::XTextRange > textRange)
}
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/resourcemodel/util.hxx b/writerfilter/source/dmapper/util.hxx
similarity index 77%
rename from writerfilter/inc/resourcemodel/util.hxx
rename to writerfilter/source/dmapper/util.hxx
index 18e424f..29ef0de 100644
--- a/writerfilter/inc/resourcemodel/util.hxx
+++ b/writerfilter/source/dmapper/util.hxx
@@ -17,18 +17,20 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_UTIL_HXX
-#define INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_UTIL_HXX
+#ifndef INCLUDED_WRITERFILTER_SOURCE_DMAPPER_UTIL_HXX
+#define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_UTIL_HXX
-#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/text/XTextRange.hpp>
#include <string>
namespace writerfilter
{
- std::string toString(css::uno::Reference< css::text::XTextRange > textRange);
+namespace dmapper
+{
+ std::string XTextRangeToString(css::uno::Reference< css::text::XTextRange > textRange);
+}
}
-#endif // INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_UTIL_HXX
+#endif // INCLUDED_WRITERFILTER_SOURCE_DMAPPER_UTIL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 6f03fdc..30caf26 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -24,7 +24,6 @@
#include <com/sun/star/drawing/XShapes.hpp>
#include <com/sun/star/xml/sax/FastShapeContextHandler.hpp>
#include <resourcemodel/QNameToString.hxx>
-#include <resourcemodel/util.hxx>
#include <ooxml/resourceids.hxx>
#include <oox/token/namespaces.hxx>
#include <dmapper/DomainMapper.hxx>
diff --git a/writerfilter/source/resourcemodel/TagLogger.cxx b/writerfilter/source/resourcemodel/TagLogger.cxx
index 8008268..d10610c 100644
--- a/writerfilter/source/resourcemodel/TagLogger.cxx
+++ b/writerfilter/source/resourcemodel/TagLogger.cxx
@@ -20,7 +20,6 @@
#include <libxml/xmlstring.h>
#include <string.h>
#include <resourcemodel/TagLogger.hxx>
-#include <resourcemodel/util.hxx>
#include <resourcemodel/QNameToString.hxx>
#include <boost/unordered_map.hpp>
More information about the Libreoffice-commits
mailing list