rpms/openoffice.org/F-13 openoffice.org.spec, 1.2175, 1.2176 workspace.writerfilter07.patch, 1.1, 1.2
Caolan McNamara
caolanm at fedoraproject.org
Sun Apr 25 17:25:51 UTC 2010
Author: caolanm
Update of /cvs/pkgs/rpms/openoffice.org/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv11605/F-13
Modified Files:
openoffice.org.spec workspace.writerfilter07.patch
Log Message:
Resolves: rhbz#583386 docx import crash (caolanm)
Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/F-13/openoffice.org.spec,v
retrieving revision 1.2175
retrieving revision 1.2176
diff -u -p -r1.2175 -r1.2176
--- openoffice.org.spec 17 Apr 2010 09:06:04 -0000 1.2175
+++ openoffice.org.spec 25 Apr 2010 17:25:51 -0000 1.2176
@@ -1,6 +1,6 @@
%define oootag OOO320
%define ooomilestone 12
-%define rh_rpm_release 16
+%define rh_rpm_release 17
# rhbz#465664 jar-repacking breaks help by reordering META-INF/MANIFEST.MF
%define __jar_repack %{nil}
@@ -1693,7 +1693,7 @@ cp -p %{SOURCE5} external/unowinreg/unow
%patch49 -p1 -b .ooo106502.svx.fixspelltimer.patch
%patch50 -p0 -b .ooo47279.sd.objectsave.safe.patch
%patch51 -p0 -b .workspace.sw33bf03.patch
-%patch52 -p1 -b .workspace.writerfilter07.patch
+%patch52 -p0 -b .workspace.writerfilter07.patch
%patch53 -p1 -b .ooo108246.svx.hide-sql-group-when-inactive.patch
%patch54 -p1 -b .workspace.sw33bf02.patch
%patch55 -p0 -b .ooo108330.embeddedobj.outplace.readonly.os.dispatch.patch
@@ -4201,6 +4201,9 @@ fi
%endif
%changelog
+* Sun Apr 25 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.0-12.17
+- Resolves: rhbz#583386 docx import crash
+
* Sat Apr 17 2010 Caolán McNamara <caolanm at redhat.com> - 1:3.2.0-12.16
- Resolves: rhbz#580596 rebuild with gcc-4.4.3-16.fc13
- add openoffice.org-3.3.0.ooo110747.plugin.patch
workspace.writerfilter07.patch:
inc/resourcemodel/Protocol.hxx | 98
inc/resourcemodel/TableData.hxx | 27
inc/resourcemodel/TableManager.hxx | 620
inc/resourcemodel/TagLogger.hxx | 4
inc/resourcemodel/WW8ResourceModel.hxx | 1
inc/resourcemodel/util.hxx | 3
prj/build.lst | 2
source/dmapper/BorderHandler.cxx | 19
source/dmapper/CellColorHandler.cxx | 8
source/dmapper/DomainMapper.cxx | 176
source/dmapper/DomainMapperTableHandler.cxx | 447
source/dmapper/DomainMapperTableHandler.hxx | 6
source/dmapper/DomainMapperTableManager.cxx | 110
source/dmapper/DomainMapperTableManager.hxx | 2
source/dmapper/DomainMapper_Impl.cxx | 51
source/dmapper/DomainMapper_Impl.cxx.workspace.writerfilter07.patch | 3722 --
source/dmapper/DomainMapper_Impl.hxx | 12
source/dmapper/FontTable.cxx | 19
source/dmapper/FontTable.hxx | 5
source/dmapper/GraphicImport.cxx | 860
source/dmapper/LFOTable.cxx | 427
source/dmapper/ListTable.cxx | 483
source/dmapper/PropertyIds.cxx | 1
source/dmapper/PropertyIds.hxx | 13
source/dmapper/PropertyMap.cxx | 57
source/dmapper/PropertyMap.hxx | 23
source/dmapper/PropertyMapHelper.cxx | 129
source/dmapper/PropertyMapHelper.hxx | 48
source/dmapper/SettingsTable.cxx | 233
source/dmapper/SettingsTable.hxx | 74
source/dmapper/StyleSheetTable.cxx | 627
source/dmapper/StyleSheetTable.hxx | 19
source/dmapper/TablePropertiesHandler.cxx | 28
source/dmapper/TblStylePrHandler.cxx | 18
source/dmapper/ThemeTable.cxx | 2
source/dmapper/dmapperLoggers.cxx | 39
source/dmapper/dmapperLoggers.hxx | 41
source/dmapper/makefile.mk | 26
source/doctok/WW8DocumentImpl.cxx | 42
source/doctok/WW8DocumentImpl.hxx | 10
source/doctok/WW8LFOLevel.cxx | 45
source/doctok/WW8LFOTable.cxx | 34
source/doctok/WW8ListTable.cxx | 22
source/doctok/WW8PropertySetImpl.cxx | 33
source/doctok/WW8PropertySetImpl.hxx | 3
source/doctok/WW8StructBase.cxx | 15
source/doctok/WW8Sttbf.cxx | 79
source/doctok/WW8Sttbf.hxx | 29
source/doctok/cleanupresources | 5
source/doctok/compactxmi.xsl | 262
source/doctok/makefile.mk | 16
source/doctok/resourceidmapper.xsl | 46
source/doctok/resourceidmapperback.xsl | 46
source/doctok/resources.xmi |15554 ++++++----
source/doctok/resources.xsl | 1
source/doctok/xmigen.el | 3
source/doctok/xmigen.xsl | 507
source/filter/ImportFilter.cxx | 4
source/ooxml/OOXMLDocumentImpl.cxx | 18
source/ooxml/OOXMLFactory.cxx | 333
source/ooxml/OOXMLFactory.hxx | 176
source/ooxml/OOXMLFastContextHandler.cxx | 516
source/ooxml/OOXMLFastContextHandler.hxx | 197
source/ooxml/OOXMLFastDocumentHandler.cxx | 14
source/ooxml/OOXMLFastDocumentHandler.hxx | 3
source/ooxml/OOXMLFastHelper.hxx | 53
source/ooxml/OOXMLParserState.cxx | 102
source/ooxml/OOXMLParserState.hxx | 14
source/ooxml/OOXMLPropertySetImpl.cxx | 44
source/ooxml/README.efforts | 131
source/ooxml/analyzemodel.xsl | 103
source/ooxml/analyzer.xsl | 46
source/ooxml/analyzestage2.xsl | 32
source/ooxml/analyzestage3.xsl | 40
source/ooxml/effort.xsl | 39
source/ooxml/efforts.sh | 3
source/ooxml/factory.xsl | 89
source/ooxml/factory_ns.xsl | 161
source/ooxml/factory_values.xsl | 100
source/ooxml/factoryimpl.xsl | 386
source/ooxml/factoryimpl_ns.xsl | 824
source/ooxml/factoryimpl_values.xsl | 98
source/ooxml/factoryinc.xsl | 112
source/ooxml/factorytools.xsl | 345
source/ooxml/fastresources.xsl | 116
source/ooxml/fastresources_.xsl | 99
source/ooxml/fastresources_dml-baseStylesheet.xsl | 98
source/ooxml/fastresources_dml-baseTypes.xsl | 98
source/ooxml/fastresources_dml-chartDrawing.xsl | 98
source/ooxml/fastresources_dml-documentProperties.xsl | 98
source/ooxml/fastresources_dml-graphicalObject.xsl | 98
source/ooxml/fastresources_dml-shape3DCamera.xsl | 98
source/ooxml/fastresources_dml-shape3DLighting.xsl | 98
source/ooxml/fastresources_dml-shape3DScene.xsl | 98
source/ooxml/fastresources_dml-shape3DStyles.xsl | 98
source/ooxml/fastresources_dml-shapeEffects.xsl | 98
source/ooxml/fastresources_dml-shapeGeometry.xsl | 98
source/ooxml/fastresources_dml-shapeLineProperties.xsl | 98
source/ooxml/fastresources_dml-shapeProperties.xsl | 98
source/ooxml/fastresources_dml-styleDefaults.xsl | 98
source/ooxml/fastresources_dml-stylesheet.xsl | 98
source/ooxml/fastresources_dml-textCharacter.xsl | 98
source/ooxml/fastresources_dml-wordprocessingDrawing.xsl | 98
source/ooxml/fastresources_shared-math.xsl | 98
source/ooxml/fastresources_shared-relationshipReference.xsl | 98
source/ooxml/fastresources_sml-customXmlMappings.xsl | 98
source/ooxml/fastresources_vml-main.xsl | 98
source/ooxml/fastresources_vml-officeDrawing.xsl | 98
source/ooxml/fastresources_vml-wordprocessingDrawing.xsl | 98
source/ooxml/fastresources_wml.xsl | 98
source/ooxml/fastresourcesimpl.xsl | 95
source/ooxml/fastresourcesimpl_dml-baseStylesheet.xsl | 93
source/ooxml/fastresourcesimpl_dml-baseTypes.xsl | 93
source/ooxml/fastresourcesimpl_dml-chartDrawing.xsl | 93
source/ooxml/fastresourcesimpl_dml-documentProperties.xsl | 93
source/ooxml/fastresourcesimpl_dml-graphicalObject.xsl | 93
source/ooxml/fastresourcesimpl_dml-shape3DCamera.xsl | 93
source/ooxml/fastresourcesimpl_dml-shape3DLighting.xsl | 93
source/ooxml/fastresourcesimpl_dml-shape3DScene.xsl | 93
source/ooxml/fastresourcesimpl_dml-shape3DStyles.xsl | 93
source/ooxml/fastresourcesimpl_dml-shapeEffects.xsl | 93
source/ooxml/fastresourcesimpl_dml-shapeGeometry.xsl | 93
source/ooxml/fastresourcesimpl_dml-shapeLineProperties.xsl | 93
source/ooxml/fastresourcesimpl_dml-styleDefaults.xsl | 93
source/ooxml/fastresourcesimpl_dml-stylesheet.xsl | 93
source/ooxml/fastresourcesimpl_dml-textCharacter.xsl | 93
source/ooxml/fastresourcesimpl_dml-wordprocessingDrawing.xsl | 94
source/ooxml/fastresourcesimpl_shared-math.xsl | 93
source/ooxml/fastresourcesimpl_shared-relationshipReference.xsl | 93
source/ooxml/fastresourcesimpl_sml-customXmlMappings.xsl | 93
source/ooxml/fastresourcesimpl_vml-main.xsl | 94
source/ooxml/fastresourcesimpl_vml-officeDrawing.xsl | 94
source/ooxml/fastresourcesimpl_vml-wordprocessingDrawing.xsl | 94
source/ooxml/fastresourcesimpl_wml.xsl | 94
source/ooxml/fasttokens.xsl | 20
source/ooxml/fasttokensimpl.xsl | 77
source/ooxml/gperffasttokenhandler.xsl | 26
source/ooxml/makefile.mk | 127
source/ooxml/model.xml | 4067 +-
source/ooxml/modelcleanup.xsl | 118
source/ooxml/modelpreprocess.xsl | 9
source/ooxml/namespace_preprocess.pl | 65
source/ooxml/namespaceids.xsl | 13
source/ooxml/nostatus.xsl | 20
source/ooxml/qnametostr.xsl | 61
source/ooxml/resourceids.xsl | 22
source/ooxml/resourcestools.xsl | 2338 -
source/ooxml/status.sh | 26
source/ooxml/todo.xsl | 29
source/ooxml/values.xsl | 88
source/ooxml/valuesimpl.xsl | 85
source/resourcemodel/Protocol.cxx | 216
source/resourcemodel/TagLogger.cxx | 45
source/resourcemodel/makefile.mk | 53
source/resourcemodel/namespace_preprocess.pl | 65
source/resourcemodel/setdebugflags | 3
source/resourcemodel/util.cxx | 24
unocomponent/debugservices/ooxml/OOXMLTestService.cxx | 12
158 files changed, 19526 insertions(+), 22104 deletions(-)
View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.1 -r 1.2 workspace.writerfilter07.patchIndex: workspace.writerfilter07.patch
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/F-13/workspace.writerfilter07.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- workspace.writerfilter07.patch 16 Feb 2010 10:50:41 -0000 1.1
+++ workspace.writerfilter07.patch 25 Apr 2010 17:25:51 -0000 1.2
@@ -1,7 +1,2022 @@
-diff -r aaadcca77f1f writerfilter/source/dmapper/DomainMapper_Impl.cxx
---- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx Sun Dec 20 20:17:35 2009 +0100
-+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx Mon Jan 04 07:43:33 2010 +0100
-@@ -2578,6 +2578,12 @@
+diff -rubN writerfilter/inc/resourcemodel/Protocol.hxx writerfilter/inc/resourcemodel/Protocol.hxx
+--- writerfilter/inc/resourcemodel/Protocol.hxx 1970-01-01 01:00:00.000000000 +0100
++++ writerfilter/inc/resourcemodel/Protocol.hxx 2010-04-21 21:03:34.000000000 +0100
+@@ -0,0 +1,98 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ * $Revision$
++ *
++ * This file is part of OpenOffice.org.
++ *
++ * OpenOffice.org is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License version 3
++ * only, as published by the Free Software Foundation.
++ *
++ * OpenOffice.org is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU Lesser General Public License version 3 for more details
++ * (a copy is included in the LICENSE file that accompanied this code).
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * version 3 along with OpenOffice.org. If not, see
++ * <http://www.openoffice.org/license.html>
++ * for a copy of the LGPLv3 License.
++ *
++ ************************************************************************/
++#ifndef INCLUDE_WRITERFILTER_PROTOCOL_HXX
++#define INCLUDE_WRITERFILTER_PROTOCOL_HXX
++
++#include <boost/shared_ptr.hpp>
++#include "WW8ResourceModel.hxx"
++#include "TagLogger.hxx"
++namespace writerfilter
++{
++
++class StreamProtocol : public Stream
++{
++ Stream * m_pStream;
++ TagLogger::Pointer_t m_pTagLogger;
++
++public:
++ typedef boost::shared_ptr<StreamProtocol> Pointer_t;
++
++ StreamProtocol(Stream * pStream, TagLogger::Pointer_t pTagLogger);
++ virtual ~StreamProtocol();
++
++ virtual void startSectionGroup();
++ virtual void endSectionGroup();
++ virtual void startParagraphGroup();
++ virtual void endParagraphGroup();
++ virtual void startCharacterGroup();
++ virtual void endCharacterGroup();
++ virtual void text(const sal_uInt8 * data, size_t len);
++ virtual void utext(const sal_uInt8 * data, size_t len);
++ virtual void props(writerfilter::Reference<Properties>::Pointer_t ref);
++ virtual void table(Id name,
++ writerfilter::Reference<Table>::Pointer_t ref);
++ virtual void substream(Id name,
++ writerfilter::Reference<Stream>::Pointer_t ref);
++ virtual void info(const string & rInfo);
++ virtual void startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape );
++ virtual void endShape();
++};
++
++class PropertiesProtocol : public Properties
++{
++ Properties * m_pProperties;
++ TagLogger::Pointer_t m_pTagLogger;
++
++public:
++ typedef boost::shared_ptr<PropertiesProtocol> Pointer_t;
++
++ PropertiesProtocol(Properties * pProperties, TagLogger::Pointer_t pTagLogger);
++ virtual ~PropertiesProtocol();
++
++ virtual void attribute(Id name, Value & val);
++ virtual void sprm(Sprm & sprm);
++};
++
++class TableProtocol : public Table
++{
++ Table * m_pTable;
++ TagLogger::Pointer_t m_pTagLogger;
++
++public:
++ typedef boost::shared_ptr<TableProtocol> Pointer_t;
++
++ TableProtocol(Table * pTable, TagLogger::Pointer_t pTagLogger);
++ virtual ~TableProtocol();
++
++ virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref);
++};
++
++}
++#endif // INCLUDE_WRITERFILTER_PROTOCOL_HXX
+diff -rubN writerfilter/inc/resourcemodel/TableData.hxx writerfilter/inc/resourcemodel/TableData.hxx
+--- writerfilter/inc/resourcemodel/TableData.hxx 2010-04-15 07:57:00.000000000 +0100
++++ writerfilter/inc/resourcemodel/TableData.hxx 2010-04-21 21:03:34.000000000 +0100
+@@ -208,6 +208,15 @@
+ }
+
+ /**
++ Add properties to the last cell of the row.
++ */
++ void insertCellProperties(PropertiesPointer pProps)
++ {
++ if (! mCells.empty())
++ mCells.back()->insertProperties(pProps);
++ }
++
++ /**
+ Return number of cells in the row.
+ */
+ unsigned int getCellCount()
+@@ -330,17 +339,35 @@
+ mpRow->addCell(start, pProps);
+ }
+
++ /**
++ End the current cell of the current row.
++
++ @parm end end handle of the cell
++ */
+ void endCell(const T & end)
+ {
+ mpRow->endCell(end);
+ }
+
++ /**
++ Return if the current cell of the current row is open.
++ */
+ bool isCellOpen() const
+ {
+ return mpRow->isCellOpen();
+ }
+
+ /**
++ Insert properties to the current cell of the current row.
++
++ @param pProps the properties to add
++ */
++ void insertCellProperties(PropertiesPointer pProps)
++ {
++ mpRow->insertCellProperties(pProps);
++ }
++
++ /**
+ Add properties to a cell of the current row.
+
+ @param i index of the cell
+diff -rubN writerfilter/inc/resourcemodel/TableManager.hxx writerfilter/inc/resourcemodel/TableManager.hxx
+--- writerfilter/inc/resourcemodel/TableManager.hxx 2010-04-15 07:57:00.000000000 +0100
++++ writerfilter/inc/resourcemodel/TableManager.hxx 2010-04-21 21:03:34.000000000 +0100
+@@ -42,6 +42,8 @@
+
+ #include <boost/shared_ptr.hpp>
+ #include <stack>
++#include "util.hxx"
++#include "TagLogger.hxx"
+
+ namespace writerfilter
+ {
+@@ -100,11 +102,6 @@
+ @param rT end handle of cell
+ */
+ virtual void endCell(const T & rT) = 0;
+-
+- virtual T* getTable( )
+- {
+- return NULL;
+- };
+ };
+
+ template <typename T, typename PropertiesPointer>
+@@ -118,59 +115,300 @@
+ */
+ class TableManager
+ {
+- typedef boost::shared_ptr<T> T_p;
++#ifdef DEBUG_TABLE
[...67939 lines suppressed...]
++}
++
++/*
++ TableProtocol
++ */
++
++TableProtocol::TableProtocol(Table * pTable, TagLogger::Pointer_t pTagLogger)
++: m_pTable(pTable), m_pTagLogger(pTagLogger)
++{
++}
++
++TableProtocol::~TableProtocol()
++{
++}
++
++void TableProtocol::entry(int pos,
++ writerfilter::Reference<Properties>::Pointer_t ref)
++{
++ m_pTagLogger->startElement("protocol-entry");
++ m_pTagLogger->attribute("pos", pos);
++ m_pTable->entry(pos, ref);
++ m_pTagLogger->endElement("protocol-entry");
++}
++
++}
+diff -rubN writerfilter/source/resourcemodel/setdebugflags writerfilter/source/resourcemodel/setdebugflags
+--- writerfilter/source/resourcemodel/setdebugflags 1970-01-01 01:00:00.000000000 +0100
++++ writerfilter/source/resourcemodel/setdebugflags 2010-04-21 21:03:35.000000000 +0100
+@@ -0,0 +1,3 @@
++#!/bin/tcsh
++
++setenv ENFCLAGS "-DDEBUG_ELEMENT -DDEBUG_ATTRIBUTES -DDEBUG_PROPERTIES -DDEBUG_CONTEXT_STACK -DDEBUG_CREATE -DDEBUG_DOMAINMAPPER"
+diff -rubN writerfilter/source/resourcemodel/TagLogger.cxx writerfilter/source/resourcemodel/TagLogger.cxx
+--- writerfilter/source/resourcemodel/TagLogger.cxx 2010-04-15 07:57:00.000000000 +0100
++++ writerfilter/source/resourcemodel/TagLogger.cxx 2010-04-21 21:03:35.000000000 +0100
+@@ -42,6 +42,20 @@
+ mAttrs.push_back(aAttr);
+ }
+
++ void XMLTag::addAttr(string sName, const ::rtl::OUString & sValue)
++ {
++ addAttr(sName,
++ OUStringToOString
++ (sValue, RTL_TEXTENCODING_ASCII_US).getStr());
++ }
++
++ void XMLTag::addAttr(string sName, sal_uInt32 nValue)
++ {
++ char buffer[256];
++ snprintf(buffer, sizeof(buffer), "%" SAL_PRIdINT32, nValue);
++ addAttr(sName, buffer);
++ }
++
+ void XMLTag::addTag(XMLTag::Pointer_t pTag)
+ {
+ if (pTag != XMLTag::Pointer_t())
+@@ -188,6 +202,7 @@
+ {
+ XMLTag::Pointer_t pTag(new XMLTag("root"));
+ mTags.push(pTag);
++ mpRoot = pTag;
+ }
+
+ void TagLogger::element(const string & name)
+@@ -210,7 +225,12 @@
+
+ void TagLogger::attribute(const string & name, const ::rtl::OUString & value)
+ {
+- attribute(name, OUStringToOString(value, RTL_TEXTENCODING_ASCII_US).getStr());
++ currentTag()->addAttr(name, value);
++ }
++
++ void TagLogger::attribute(const string & name, sal_uInt32 value)
++ {
++ currentTag()->addAttr(name, value);
+ }
+
+ void TagLogger::addTag(XMLTag::Pointer_t pTag)
+@@ -230,19 +250,18 @@
+
+ void TagLogger::endElement(const string & name)
+ {
+- string nameRemoved;
+- bool found = false;
+- do
+- {
+- nameRemoved = currentTag()->getTag();
+- mTags.pop();
++ string nameRemoved = currentTag()->getTag();
+
+ if (name == nameRemoved)
+- found = true;
+- else
+- found = false; // for debugging
++ mTags.pop();
++ else {
++ XMLTag::Pointer_t pTag(new XMLTag("end.mismatch"));
++ pTag->addAttr("name", name);
++ pTag->addAttr("top", nameRemoved);
++
++ currentTag()->addTag(pTag);
+ }
+- while (! found && ! mTags.empty());
++
+ }
+
+ void TagLogger::endDocument()
+@@ -252,7 +271,7 @@
+
+ ostream & TagLogger::output(ostream & o) const
+ {
+- return currentTag()->output(o);
++ return mpRoot->output(o);
+ }
+
+ void TagLogger::dump(const char * name)
+@@ -270,7 +289,7 @@
+
+ fileName += "/writerfilter.";
+ fileName += name;
+- fileName += ".tmp";
++ fileName += ".xml";
+
+ ofstream dumpStream(fileName.c_str());
+ aIt->second->output(dumpStream);
+diff -rubN writerfilter/source/resourcemodel/util.cxx writerfilter/source/resourcemodel/util.cxx
+--- writerfilter/source/resourcemodel/util.cxx 2010-04-15 07:57:00.000000000 +0100
++++ writerfilter/source/resourcemodel/util.cxx 2010-04-21 21:03:35.000000000 +0100
+@@ -37,6 +37,7 @@
+ #include <com/sun/star/text/TextContentAnchorType.hpp>
+ #include <resourcemodel/WW8ResourceModel.hxx>
+ #include <resourcemodel/TagLogger.hxx>
++#include <resourcemodel/util.hxx>
+
+ namespace writerfilter
+ {
+@@ -397,4 +398,27 @@
+ return result;
+ }
+
++ string toString(uno::Reference< text::XTextRange > textRange)
++ {
++ string result;
++
++ if (textRange.get())
++ {
++ rtl::OUString aOUStr = textRange->getString();
++ rtl::OString aOStr(aOUStr.getStr(), aOUStr.getLength(), RTL_TEXTENCODING_ASCII_US );
++
++ result = aOStr.getStr();
++ }
++ else
++ {
++ result="(nil)";
++ }
++
++ return result;
++ }
++
++ string toString(const string & rString)
++ {
++ return rString;
++ }
+ }
+diff -rubN writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.cxx writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.cxx
+--- writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.cxx 2010-04-15 07:57:00.000000000 +0100
++++ writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.cxx 2010-04-21 21:03:35.000000000 +0100
+@@ -64,6 +64,7 @@
+ #include <com/sun/star/text/XTextDocument.hpp>
+ #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+ #include <ooxml/OOXMLDocument.hxx>
++#include <resourcemodel/TagLogger.hxx>
+
+ #include <ctype.h>
+
+@@ -91,6 +92,12 @@
+ uno::Reference<lang::XMultiComponentFactory> xFactory(xContext->getServiceManager(), uno::UNO_QUERY_THROW );
+ if (::ucbhelper::ContentBroker::initialize(xServiceFactory, aUcbInitSequence))
+ {
++#ifdef DEBUG_ELEMENT
++ writerfilter::TagLogger::Pointer_t debugLogger
++ (writerfilter::TagLogger::getInstance("DEBUG"));
++ debugLogger->startDocument();
++#endif
++
+ rtl::OUString arg=aArguments[0];
+
+ ::comphelper::setProcessServiceFactory(xServiceFactory);
+@@ -136,6 +143,11 @@
+ Stream::Pointer_t pStream = createStreamHandler();
+ pDocument->resolve(*pStream);
+
++#ifdef DEBUG_ELEMENT
++ writerfilter::TagLogger::dump("DEBUG");
++ debugLogger->endDocument();
++#endif
++
+ ::ucbhelper::ContentBroker::deinitialize();
+ }
+ else
More information about the scm-commits
mailing list