[Libreoffice-commits] core.git: 2 commits - writerfilter/inc writerfilter/Library_writerfilter.mk writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Thu Apr 3 11:37:31 PDT 2014


 writerfilter/Library_writerfilter.mk                   |    1 
 writerfilter/inc/WriterFilterDllApi.hxx                |    6 
 writerfilter/inc/dmapper/DomainMapper.hxx              |    2 
 writerfilter/inc/ooxml/OOXMLDocument.hxx               |    6 
 writerfilter/inc/resourcemodel/Protocol.hxx            |   93 -------
 writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx |    8 
 writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx     |   11 
 writerfilter/source/resourcemodel/Protocol.cxx         |  209 -----------------
 8 files changed, 4 insertions(+), 332 deletions(-)

New commits:
commit 0695236cd7347134e53c81cf15f38b61ffe13255
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Apr 3 20:28:13 2014 +0200

    writerfilter: DEBUG_PROTOCOL is never defined
    
    Change-Id: I0f6de2041237282c770bd3926140836008d7d12b

diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk
index 7003132..7da82fe 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 a4fa4f7..0000000
--- 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 4ac9f80..41c9ed9 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 5d97521..b558773 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 c85a758..0000000
--- 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: */
commit 338f0eb554594b2a5da3a1a60cd620c5e49b0fa5
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Apr 3 20:20:05 2014 +0200

    writerfilter: unused WRITERFILTER_OOXML_DLLPUBLIC
    
    Change-Id: I3f14017d6816d59b951c947827ca9497f2cd97fc

diff --git a/writerfilter/inc/WriterFilterDllApi.hxx b/writerfilter/inc/WriterFilterDllApi.hxx
index 62c5e22..df89c70 100644
--- a/writerfilter/inc/WriterFilterDllApi.hxx
+++ b/writerfilter/inc/WriterFilterDllApi.hxx
@@ -28,12 +28,6 @@
 #define WRITERFILTER_DOCTOK_DLLPUBLIC  SAL_DLLPUBLIC_IMPORT
 #endif
 
-#if defined(WRITERFILTER_OOXML_DLLIMPLEMENTATION)
-#define WRITERFILTER_OOXML_DLLPUBLIC  SAL_DLLPUBLIC_EXPORT
-#else
-#define WRITERFILTER_OOXML_DLLPUBLIC  SAL_DLLPUBLIC_IMPORT
-#endif
-
 #if defined(WRITERFILTER_RTFTOK_DLLIMPLEMENTATION)
 #define WRITERFILTER_RTFTOK_DLLPUBLIC  SAL_DLLPUBLIC_EXPORT
 #else
diff --git a/writerfilter/inc/dmapper/DomainMapper.hxx b/writerfilter/inc/dmapper/DomainMapper.hxx
index f0a6430..c820d16 100644
--- a/writerfilter/inc/dmapper/DomainMapper.hxx
+++ b/writerfilter/inc/dmapper/DomainMapper.hxx
@@ -71,7 +71,7 @@ enum SourceDocumentType
     DOCUMENT_OOXML,
     DOCUMENT_RTF
 };
-class WRITERFILTER_OOXML_DLLPUBLIC DomainMapper : public LoggedProperties, public LoggedTable,
+class DomainMapper : public LoggedProperties, public LoggedTable,
                     public BinaryObj, public LoggedStream
 {
     DomainMapper_Impl   *m_pImpl;
diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx
index 73a62fe..7aead9e 100644
--- a/writerfilter/inc/ooxml/OOXMLDocument.hxx
+++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx
@@ -73,7 +73,7 @@ namespace ooxml
 
 using namespace com::sun::star;
 
-class WRITERFILTER_OOXML_DLLPUBLIC OOXMLStream
+class OOXMLStream
 {
 public:
     enum StreamType_t { UNKNOWN, DOCUMENT, STYLES, WEBSETTINGS, FONTTABLE, NUMBERING,
@@ -117,7 +117,7 @@ public:
 
 };
 
-class WRITERFILTER_OOXML_DLLPUBLIC OOXMLDocument : public writerfilter::Reference<Stream>
+class OOXMLDocument : public writerfilter::Reference<Stream>
 {
 public:
     /**
@@ -253,7 +253,7 @@ public:
 };
 
 
-class WRITERFILTER_OOXML_DLLPUBLIC OOXMLDocumentFactory
+class OOXMLDocumentFactory
 {
 public:
     static OOXMLStream::Pointer_t


More information about the Libreoffice-commits mailing list