summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-04-03 20:28:13 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-04-03 20:35:29 +0200
commit0695236cd7347134e53c81cf15f38b61ffe13255 (patch)
tree04c2a42f6a292012a590611b254007d0fbcf323b
parent338f0eb554594b2a5da3a1a60cd620c5e49b0fa5 (diff)
writerfilter: DEBUG_PROTOCOL is never defined
Change-Id: I0f6de2041237282c770bd3926140836008d7d12b
-rw-r--r--writerfilter/Library_writerfilter.mk1
-rw-r--r--writerfilter/inc/resourcemodel/Protocol.hxx93
-rw-r--r--writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx8
-rw-r--r--writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx11
-rw-r--r--writerfilter/source/resourcemodel/Protocol.cxx209
5 files changed, 0 insertions, 322 deletions
diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk
index 700313275760..7da82fe96d07 100644
--- a/writerfilter/Library_writerfilter.mk
+++ b/writerfilter/Library_writerfilter.mk
@@ -142,7 +142,6 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\
writerfilter/source/ooxml/OOXMLStreamImpl \
writerfilter/source/resourcemodel/Fraction \
writerfilter/source/resourcemodel/LoggedResources \
- writerfilter/source/resourcemodel/Protocol \
writerfilter/source/resourcemodel/ResourceModelHelper \
writerfilter/source/resourcemodel/TagLogger \
writerfilter/source/resourcemodel/XPathLogger \
diff --git a/writerfilter/inc/resourcemodel/Protocol.hxx b/writerfilter/inc/resourcemodel/Protocol.hxx
deleted file mode 100644
index a4fa4f7f8b17..000000000000
--- a/writerfilter/inc/resourcemodel/Protocol.hxx
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDE_WRITERFILTER_PROTOCOL_HXX
-#define INCLUDE_WRITERFILTER_PROTOCOL_HXX
-
-#ifdef DEBUG_PROTOCOL
-
-#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 // DEBUG_PROTOCOL
-#endif // INCLUDE_WRITERFILTER_PROTOCOL_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
index 4ac9f8016faa..41c9ed923285 100644
--- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
@@ -21,7 +21,6 @@
#include <boost/shared_ptr.hpp>
#ifdef DEBUG_ELEMENT
#include "ooxmlLoggers.hxx"
-#include <resourcemodel/Protocol.hxx>
#endif
#include "OOXMLFastDocumentHandler.hxx"
#include "OOXMLFastContextHandler.hxx"
@@ -49,13 +48,6 @@ OOXMLFastDocumentHandler::OOXMLFastDocumentHandler(
, mnXNoteId( nXNoteId )
, mpContextHandler()
{
-#ifdef DEBUG_PROTOCOL
- if ( pStream )
- {
- mpTmpStream.reset( new StreamProtocol( pStream, debug_logger ) );
- mpStream = mpTmpStream.get();
- }
-#endif
}
// ::com::sun::star::xml::sax::XFastContextHandler:
diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
index 5d975218d7f3..b5587738462a 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
@@ -21,7 +21,6 @@
#include <stdio.h>
#include <iostream>
#include <resourcemodel/QNameToString.hxx>
-#include <resourcemodel/Protocol.hxx>
#include <com/sun/star/drawing/XShape.hpp>
#include <ooxml/OOXMLFastTokens.hxx>
#include "ooxmlLoggers.hxx"
@@ -152,13 +151,7 @@ Sprm * OOXMLPropertyImpl::clone()
void OOXMLPropertyImpl::resolve(writerfilter::Properties & rProperties)
{
writerfilter::Properties * pProperties = NULL;
-#ifdef DEBUG_PROTOCOL
- writerfilter::PropertiesProtocol::Pointer_t pProtocol
- (new writerfilter::PropertiesProtocol(&rProperties, debug_logger));
- pProperties = pProtocol.get();
-#else
pProperties = &rProperties;
-#endif
switch (meType)
{
@@ -759,11 +752,7 @@ OOXMLTableImpl::~OOXMLTableImpl()
void OOXMLTableImpl::resolve(Table & rTable)
{
-#ifdef DEBUG_PROTOCOL
- Table::Pointer_t pTable(new TableProtocol(&rTable, debug_logger));
-#else
Table * pTable = &rTable;
-#endif
int nPos = 0;
diff --git a/writerfilter/source/resourcemodel/Protocol.cxx b/writerfilter/source/resourcemodel/Protocol.cxx
deleted file mode 100644
index c85a75826e05..000000000000
--- a/writerfilter/source/resourcemodel/Protocol.cxx
+++ /dev/null
@@ -1,209 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifdef DEBUG_PROTOCOL
-#include <stdio.h>
-#include <rtl/ustrbuf.hxx>
-#include <resourcemodel/Protocol.hxx>
-#include <resourcemodel/WW8ResourceModel.hxx>
-#include <resourcemodel/QNameToString.hxx>
-namespace writerfilter
-{
-
-/*
- StreamProtocol
-*/
-
-StreamProtocol::StreamProtocol(Stream * pStream,
- TagLogger::Pointer_t pTagLogger)
- : m_pStream(pStream), m_pTagLogger(pTagLogger)
-{
-}
-
-StreamProtocol::~StreamProtocol()
-{
-}
-
-void StreamProtocol::startSectionGroup()
-{
- m_pTagLogger->element("protocol-startSectionGroup");
- m_pStream->startSectionGroup();
-}
-
-void StreamProtocol::endSectionGroup()
-{
- m_pTagLogger->element("protocol-endSectionGroup");
- m_pStream->endSectionGroup();
-}
-
-void StreamProtocol::startParagraphGroup()
-{
- m_pTagLogger->element("protocol-startParagraphGroup");
- m_pStream->startParagraphGroup();
-}
-
-void StreamProtocol::endParagraphGroup()
-{
- m_pTagLogger->element("protocol-endParagraphGroup");
- m_pStream->endParagraphGroup();
-}
-
-void StreamProtocol::startCharacterGroup()
-{
- m_pTagLogger->element("protocol-startCharacterGroup");
- m_pStream->startCharacterGroup();
-}
-
-void StreamProtocol::endCharacterGroup()
-{
- m_pTagLogger->element("protocol-endCharacterGroup");
- m_pStream->endCharacterGroup();
-}
-
-void StreamProtocol::text(const sal_uInt8 * data, size_t len)
-{
- OUString sText((const sal_Char*) data, len,
- RTL_TEXTENCODING_MS_1252);
- m_pTagLogger->startElement("protocol-text");
- m_pTagLogger->chars(sText);
- m_pTagLogger->endElement();
-
- m_pStream->text(data, len);
-}
-
-void StreamProtocol::utext(const sal_uInt8 * data, size_t len)
-{
- OUString sText;
- OUStringBuffer aBuffer = OUStringBuffer(len);
- aBuffer.append( (const sal_Unicode *) data, len);
- sText = aBuffer.makeStringAndClear();
-
- m_pTagLogger->startElement("protocol-utext");
- m_pTagLogger->chars(sText);
- m_pTagLogger->endElement();
-
- m_pStream->utext(data, len);
-}
-
-void StreamProtocol::props(writerfilter::Reference<Properties>::Pointer_t ref)
-{
- m_pTagLogger->startElement("protocol-props");
- m_pStream->props(ref);
- m_pTagLogger->endElement();
-}
-
-void StreamProtocol::table(Id name,
- writerfilter::Reference<Table>::Pointer_t ref)
-{
- m_pTagLogger->startElement("protocol-table");
- m_pTagLogger->attribute("name", (*QNameToString::Instance())(name));
- m_pStream->table(name, ref);
- m_pTagLogger->endElement();
-}
-
-void StreamProtocol::substream(Id name,
- writerfilter::Reference<Stream>::Pointer_t ref)
-{
- m_pTagLogger->startElement("protocol-substream");
- m_pTagLogger->attribute("name", (*QNameToString::Instance())(name));
-
- m_pStream->substream(name, ref);
- m_pTagLogger->endElement();
-}
-
-void StreamProtocol::info(const string & rInfo)
-{
- m_pStream->info(rInfo);
-}
-
-void StreamProtocol::startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape )
-{
- m_pTagLogger->element("protocol-startShape");
-
- m_pStream->startShape(xShape);
-}
-
-void StreamProtocol::endShape()
-{
- m_pTagLogger->element("protocol-endShape");
-
- m_pStream->endShape();
-}
-
-/*
- PropertiesProtocol
-*/
-
-PropertiesProtocol::PropertiesProtocol(Properties * pProperties,
- TagLogger::Pointer_t pTagLogger)
-: m_pProperties(pProperties), m_pTagLogger(pTagLogger)
-{
-}
-
-PropertiesProtocol::~PropertiesProtocol()
-{
-}
-
-void PropertiesProtocol::attribute(Id name, Value & val)
-{
- m_pTagLogger->startElement("protocol-attribute");
- m_pTagLogger->attribute("name", (*QNameToString::Instance())(name));
- m_pTagLogger->attribute("value", val.toString());
- m_pProperties->attribute(name, val);
- m_pTagLogger->endElement();
-}
-
-void PropertiesProtocol::sprm(Sprm & _sprm)
-{
- m_pTagLogger->startElement("protocol-sprm");
- static char sBuffer[256];
- snprintf(sBuffer, sizeof(sBuffer), "%04" SAL_PRIxUINT32, _sprm.getId());
- m_pTagLogger->attribute("id", sBuffer);
- m_pTagLogger->attribute("name", _sprm.getName());
- m_pTagLogger->chars(_sprm.toString());
- m_pProperties->sprm(_sprm);
- m_pTagLogger->endElement();
-}
-
-/*
- 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();
-}
-
-}
-#endif // DEBUG_PROTOCOL
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */