unusedcode.easy                                       |    4 
 writerfilter/Library_writerfilter.mk                  |    1 
 writerfilter/inc/resourcemodel/XPathLogger.hxx        |   56 -----------
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |    1 
 writerfilter/source/ooxml/OOXMLParserState.cxx        |    4 
 writerfilter/source/ooxml/OOXMLParserState.hxx        |    5 -
 writerfilter/source/resourcemodel/XPathLogger.cxx     |   88 ------------------
 7 files changed, 159 deletions(-)

New commits:
commit ec95abf2d8afeec38c9225ea49caa0e08d82b504
Author: Jan Holesovsky <ke...@collabora.com>
Date:   Tue Jun 17 08:26:59 2014 +0200

    writerfilter: Kill unused XPathLogger.
    
    Change-Id: I41f3f176316232e63a3f59717beafcb4094fc35a

diff --git a/unusedcode.easy b/unusedcode.easy
index a000178..ab59d9c 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -211,7 +211,3 @@ 
std::auto_ptr<formula::FormulaTokenArray>::auto_ptr(std::auto_ptr_ref<formula::F
 std::vector<rtl::Reference<oox::xls::(anonymous namespace)::WorkerThread>, 
std::allocator<rtl::Reference<oox::xls::(anonymous namespace)::WorkerThread> > 
>::reserve(unsigned long)
 utl::extractTime(com::sun::star::util::DateTime const&, 
com::sun::star::util::Time&)
 vcl::MapChar(vcl::_TrueTypeFont*, unsigned short, bool)
-writerfilter::XPathLogger::endElement()
-writerfilter::XPathLogger::getXPath() const
-writerfilter::XPathLogger::startElement(std::basic_string<char, 
std::char_traits<char>, std::allocator<char> >)
-writerfilter::ooxml::OOXMLParserState::getXPathLogger()
diff --git a/writerfilter/Library_writerfilter.mk 
b/writerfilter/Library_writerfilter.mk
index 7da82fe..e70214b 100644
--- a/writerfilter/Library_writerfilter.mk
+++ b/writerfilter/Library_writerfilter.mk
@@ -144,7 +144,6 @@ $(eval $(call 
gb_Library_add_exception_objects,writerfilter,\
     writerfilter/source/resourcemodel/LoggedResources \
     writerfilter/source/resourcemodel/ResourceModelHelper \
     writerfilter/source/resourcemodel/TagLogger \
-    writerfilter/source/resourcemodel/XPathLogger \
     writerfilter/source/resourcemodel/qnametostrcore \
     writerfilter/source/resourcemodel/util \
 ))
diff --git a/writerfilter/inc/resourcemodel/XPathLogger.hxx 
b/writerfilter/inc/resourcemodel/XPathLogger.hxx
deleted file mode 100644
index 57e8aeb..0000000
--- a/writerfilter/inc/resourcemodel/XPathLogger.hxx
+++ /dev/null
@@ -1,56 +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 INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_XPATHLOGGER_HXX
-#define INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_XPATHLOGGER_HXX
-
-#ifdef DEBUG_CONTEXT_HANDLER
-
-#include <stack>
-#include <string>
-#include <vector>
-#include <boost/shared_ptr.hpp>
-#include <boost/unordered_map.hpp>
-
-namespace writerfilter
-{
-
-class XPathLogger
-{
-    typedef boost::unordered_map<std::string, unsigned int> TokenMap_t;
-    typedef boost::shared_ptr<TokenMap_t> TokenMapPointer_t;
-
-    TokenMapPointer_t mp_tokenMap;
-    std::stack<TokenMapPointer_t> m_tokenMapStack;
-    std::vector<std::string> m_path;
-    std::string m_currentPath;
-
-    void updateCurrentPath();
-
-public:
-    explicit XPathLogger();
-    virtual ~XPathLogger();
-
-    std::string getXPath() const;
-    void startElement(std::string _token);
-    void endElement();
-};
-}
-
-#endif
-#endif // INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_XPATHLOGGER_HXX
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx 
b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 9fcc405..b752471 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/XPathLogger.hxx>
 #include <resourcemodel/util.hxx>
 #include <ooxml/resourceids.hxx>
 #include <oox/token/namespaces.hxx>
diff --git a/writerfilter/source/ooxml/OOXMLParserState.cxx 
b/writerfilter/source/ooxml/OOXMLParserState.cxx
index 130520d..87644aa 100644
--- a/writerfilter/source/ooxml/OOXMLParserState.cxx
+++ b/writerfilter/source/ooxml/OOXMLParserState.cxx
@@ -303,10 +303,6 @@ void OOXMLParserState::dumpXml( const 
TagLogger::Pointer_t& pLogger )
     pLogger->endElement();
  }
 
-XPathLogger & OOXMLParserState::getXPathLogger()
-{
-    return m_xPathLogger;
-}
 #endif
 
 }}
diff --git a/writerfilter/source/ooxml/OOXMLParserState.hxx 
b/writerfilter/source/ooxml/OOXMLParserState.hxx
index 9472945..0cafc11 100644
--- a/writerfilter/source/ooxml/OOXMLParserState.hxx
+++ b/writerfilter/source/ooxml/OOXMLParserState.hxx
@@ -25,7 +25,6 @@
 
 #if OSL_DEBUG_LEVEL > 1
 #include <resourcemodel/TagLogger.hxx>
-#include <resourcemodel/XPathLogger.hxx>
 #endif
 
 namespace writerfilter {
@@ -52,9 +51,6 @@ class OOXMLParserState
     bool savedInParagraphGroup;
     bool savedInCharacterGroup;
     bool savedLastParagraphInSection;
-#if OSL_DEBUG_LEVEL > 1
-    XPathLogger m_xPathLogger;
-#endif
 
 public:
     typedef boost::shared_ptr<OOXMLParserState> Pointer_t;
@@ -108,7 +104,6 @@ public:
 #if OSL_DEBUG_LEVEL > 1
 public:
     void dumpXml( const TagLogger::Pointer_t& pLogger );
-    XPathLogger & getXPathLogger();
 #endif
 
 };
diff --git a/writerfilter/source/resourcemodel/XPathLogger.cxx 
b/writerfilter/source/resourcemodel/XPathLogger.cxx
deleted file mode 100644
index 93297cb..0000000
--- a/writerfilter/source/resourcemodel/XPathLogger.cxx
+++ /dev/null
@@ -1,88 +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 .
- */
-
-#include <stdio.h>
-#include <resourcemodel/XPathLogger.hxx>
-
-#ifdef DEBUG_CONTEXT_HANDLER
-
-namespace writerfilter
-{
-XPathLogger::XPathLogger()
-: mp_tokenMap(new TokenMap_t)
-{
-}
-
-XPathLogger::~XPathLogger()
-{
-}
-
-std::string XPathLogger::getXPath() const
-{
-    return m_currentPath;
-}
-
-void XPathLogger::updateCurrentPath()
-{
-    m_currentPath = "";
-
-    for (std::vector<std::string>::const_iterator aIt = m_path.begin();
-         aIt != m_path.end();
-         ++aIt)
-    {
-        if (m_currentPath.size() > 0)
-            m_currentPath += "/";
-
-        m_currentPath += *aIt;
-    }
-}
-
-void XPathLogger::startElement(std::string _token)
-{
-    TokenMap_t::const_iterator aIt = mp_tokenMap->find(_token);
-
-    if (aIt == mp_tokenMap->end())
-        (*mp_tokenMap)[_token] = 1;
-    else
-        (*mp_tokenMap)[_token]++;
-
-    static char sBuffer[256];
-    snprintf(sBuffer, sizeof(sBuffer), "[%d]", (*mp_tokenMap)[_token]);
-    m_path.push_back(_token + sBuffer);
-
-    m_tokenMapStack.push(mp_tokenMap);
-    mp_tokenMap.reset(new TokenMap_t);
-
-    updateCurrentPath();
-}
-
-void XPathLogger::endElement()
-{
-    mp_tokenMap = m_tokenMapStack.top();
-    m_tokenMapStack.pop();
-    m_path.pop_back();
-
-    updateCurrentPath();
-}
-
-} // namespace writerfilter
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to