writerfilter: Kill unused XPathLogger.
Change-Id: I41f3f176316232e63a3f59717beafcb4094fc35a
This commit is contained in:
parent
7c5580874c
commit
ec95abf2d8
@ -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()
|
||||
|
@ -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 \
|
||||
))
|
||||
|
@ -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
|
@ -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>
|
||||
|
@ -303,10 +303,6 @@ void OOXMLParserState::dumpXml( const TagLogger::Pointer_t& pLogger )
|
||||
pLogger->endElement();
|
||||
}
|
||||
|
||||
XPathLogger & OOXMLParserState::getXPathLogger()
|
||||
{
|
||||
return m_xPathLogger;
|
||||
}
|
||||
#endif
|
||||
|
||||
}}
|
||||
|
@ -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
|
||||
|
||||
};
|
||||
|
@ -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: */
|
Loading…
x
Reference in New Issue
Block a user