filter/source/config/cache/cacheitem.cxx | 23 ----------- filter/source/config/cache/constant.hxx | 2 - filter/source/config/cache/contenthandlerfactory.cxx | 3 - filter/source/config/cache/filtercache.cxx | 6 --- filter/source/config/cache/filterfactory.cxx | 2 - filter/source/config/cache/frameloaderfactory.cxx | 3 - filter/source/config/cache/macros.hxx | 38 ------------------- 7 files changed, 77 deletions(-)
New commits: commit c1629e680c62107df9582c1bd04c9e0c3273e726 Author: Jochen Nitschke <j.nitschke+loger...@ok.de> Date: Mon Aug 28 05:31:07 2017 +0200 filterconfig: drop unused debug macros logging functionality went in commit 0056fe28c7bd8e72cd5bdd335f098d00cd0d5d11 Date: Mon Feb 7 20:11:01 2011 +0100 Remove lots of dead code it was dead since initial commit in 2004 Change-Id: Idd4393854014e997e4e044dc75c16a76dae23e95 Reviewed-on: https://gerrit.libreoffice.org/41633 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/filter/source/config/cache/cacheitem.cxx b/filter/source/config/cache/cacheitem.cxx index ef117d22cb6f..8b6db4f5fe0b 100644 --- a/filter/source/config/cache/cacheitem.cxx +++ b/filter/source/config/cache/cacheitem.cxx @@ -19,7 +19,6 @@ #include "cacheitem.hxx" -#include "macros.hxx" #include "constant.hxx" #include <com/sun/star/uno/Sequence.h> @@ -123,7 +122,6 @@ bool isSubSet(const css::uno::Any& aSubSet, if (!aT1.equals(aT2)) { - FILTER_CONFIG_LOG_("isSubSet() ... types of any values are different => return FALSE\n") return false; } @@ -143,7 +141,6 @@ bool isSubSet(const css::uno::Any& aSubSet, case css::uno::TypeClass_DOUBLE : { bool bIs = (aSubSet == aSet); - FILTER_CONFIG_LOG_1_("isSubSet() ... check for atomic types => return %s\n", bIs ? "TRUE" : "FALSE") return bIs; } @@ -159,7 +156,6 @@ bool isSubSet(const css::uno::Any& aSubSet, ) { bool bIs = v1 == v2; - FILTER_CONFIG_LOG_1_("isSubSet() ... check for string types => return %s\n", bIs ? "TRUE" : "FALSE") return bIs; } } @@ -177,7 +173,6 @@ bool isSubSet(const css::uno::Any& aSubSet, ) { bool bIs = (p1.Name == p2.Name) && isSubSet(p1.Value, p2.Value); - FILTER_CONFIG_LOG_1_("isSubSet() ... check for structured types [PropertyValue] => return %s\n", bIs ? "TRUE" : "FALSE") return bIs; } @@ -190,7 +185,6 @@ bool isSubSet(const css::uno::Any& aSubSet, ) { bool bIs = (n1.Name == n2.Name) && isSubSet(n1.Value, n2.Value); - FILTER_CONFIG_LOG_1_("isSubSet() ... check for structured types [NamedValue] => return %s\n", bIs ? "TRUE" : "FALSE") return bIs; } } @@ -216,12 +210,9 @@ bool isSubSet(const css::uno::Any& aSubSet, { if (::std::find(stl_s2.begin(), stl_s2.end(), *it1) == stl_s2.end()) { - FILTER_CONFIG_LOG_1_("isSubSet() ... check for list types [OUString] ... didn't found \"%s\" => return FALSE\n", _FILTER_CONFIG_TO_ASCII_(*it1)) return false; } - FILTER_CONFIG_LOG_1_("isSubSet() ... check for list types [OUString] ... found \"%s\" => continue loop\n", _FILTER_CONFIG_TO_ASCII_(*it1)) } - FILTER_CONFIG_LOG_("isSubSet() ... check for list types [OUString] => return TRUE\n") return true; } @@ -243,17 +234,13 @@ bool isSubSet(const css::uno::Any& aSubSet, ::comphelper::SequenceAsHashMap::const_iterator it2 = stl_p2.find(it1->first); if (it2 == stl_p2.end()) { - FILTER_CONFIG_LOG_1_("isSubSet() ... check for list types [PropertyValue] ... didn't found \"%s\" => return FALSE\n", _FILTER_CONFIG_TO_ASCII_(it1->first)) return false; } if (!isSubSet(it1->second, it2->second)) { - FILTER_CONFIG_LOG_1_("isSubSet() ... check for list types [PropertyValue] ... found \"%s\" but has different value => return FALSE\n", _FILTER_CONFIG_TO_ASCII_(it1->first)) return false; } - FILTER_CONFIG_LOG_1_("isSubSet() ... check for list types [PropertyValue] ... found \"%s\" with right value => continue loop\n", _FILTER_CONFIG_TO_ASCII_(it1->first)) } - FILTER_CONFIG_LOG_("isSubSet() ... check for list types [PropertyValue] => return TRUE\n") return true; } @@ -275,17 +262,13 @@ bool isSubSet(const css::uno::Any& aSubSet, ::comphelper::SequenceAsHashMap::const_iterator it2 = stl_n2.find(it1->first); if (it2 == stl_n2.end()) { - FILTER_CONFIG_LOG_1_("isSubSet() ... check for list types [NamedValue] ... didn't found \"%s\" => return FALSE\n", _FILTER_CONFIG_TO_ASCII_(it1->first)) return false; } if (!isSubSet(it1->second, it2->second)) { - FILTER_CONFIG_LOG_1_("isSubSet() ... check for list types [NamedValue] ... found \"%s\" but has different value => return FALSE\n", _FILTER_CONFIG_TO_ASCII_(it1->first)) return false; } - FILTER_CONFIG_LOG_1_("isSubSet() ... check for list types [NamedValue] ... found \"%s\" with right value => continue loop\n", _FILTER_CONFIG_TO_ASCII_(it1->first)) } - FILTER_CONFIG_LOG_("isSubSet() ... check for list types [NamedValue] => return TRUE\n") return true; } } @@ -308,14 +291,12 @@ bool CacheItem::haveProps(const CacheItem& lProps) const const_iterator pItThis = find(pIt->first); if (pItThis == end()) { - FILTER_CONFIG_LOG_1_("CacheItem::haveProps() ... didn't found \"%s\" => return FALSE\n", _FILTER_CONFIG_TO_ASCII_(pIt->first)) return false; } // ii) one item does not have the right value => return false if (!isSubSet(pIt->second, pItThis->second)) { - FILTER_CONFIG_LOG_1_("CacheItem::haveProps() ... item \"%s\" has different value => return FALSE\n", _FILTER_CONFIG_TO_ASCII_(pIt->first)) return false; } } @@ -323,7 +304,6 @@ bool CacheItem::haveProps(const CacheItem& lProps) const // this method was not breaked before => // the given property set seems to match with our // own properties in its minimum => return TRUE - FILTER_CONFIG_LOG_("CacheItem::haveProps() ... => return TRUE\n") return true; } @@ -341,7 +321,6 @@ bool CacheItem::dontHaveProps(const CacheItem& lProps) const const_iterator pItThis = find(pIt->first); if (pItThis == end()) { - FILTER_CONFIG_LOG_1_("CacheItem::dontHaveProps() ... not found \"%s\" => continue loop!\n", _FILTER_CONFIG_TO_ASCII_(pIt->first)) continue; } @@ -350,7 +329,6 @@ bool CacheItem::dontHaveProps(const CacheItem& lProps) const // But we checked for "don't have it" here. if (isSubSet(pIt->second, pItThis->second)) { - FILTER_CONFIG_LOG_1_("CacheItem::dontHaveProps() ... item \"%s\" has same value => return FALSE!\n", _FILTER_CONFIG_TO_ASCII_(pIt->first)) return false; } } @@ -358,7 +336,6 @@ bool CacheItem::dontHaveProps(const CacheItem& lProps) const // this method was not breaked before => // That means: this item has no matching property // of the given set. It "don't have" it ... => return true. - FILTER_CONFIG_LOG_("CacheItem::dontHaveProps() ... => return TRUE\n") return true; } diff --git a/filter/source/config/cache/constant.hxx b/filter/source/config/cache/constant.hxx index 7e8cc0218a9a..da5c904dc984 100644 --- a/filter/source/config/cache/constant.hxx +++ b/filter/source/config/cache/constant.hxx @@ -19,8 +19,6 @@ #ifndef INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CONSTANT_HXX #define INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CONSTANT_HXX -#include "macros.hxx" - /* disable impl_loadOnDemand function of BaseContainer for certain functions, where it the feature "impl_loadItemOnDemand() of class FilterCache can be used instead of loadAll()!*/ diff --git a/filter/source/config/cache/contenthandlerfactory.cxx b/filter/source/config/cache/contenthandlerfactory.cxx index 8ab5279e7ccf..f43129405f55 100644 --- a/filter/source/config/cache/contenthandlerfactory.cxx +++ b/filter/source/config/cache/contenthandlerfactory.cxx @@ -20,7 +20,6 @@ #include "contenthandlerfactory.hxx" #include "querytokenizer.hxx" -#include "macros.hxx" #include "constant.hxx" #include "versions.hxx" @@ -76,8 +75,6 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL ContentHandlerFactory::crea if (!cache.hasItem(FilterCache::E_CONTENTHANDLER, sHandler) && cache.hasItem(FilterCache::E_TYPE, sHandler)) { - FILTER_CONFIG_LOG_("ContentHandlerFactory::createInstanceWithArguments() ... simulate old type search functionality!\n"); - css::uno::Sequence< OUString > lTypes { sHandler }; css::uno::Sequence< css::beans::NamedValue > lQuery { { PROPNAME_TYPES, css::uno::makeAny(lTypes) } }; diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx index 09a136af4120..79958452c0ce 100644 --- a/filter/source/config/cache/filtercache.cxx +++ b/filter/source/config/cache/filtercache.cxx @@ -20,7 +20,6 @@ #include <memory> #include "filtercache.hxx" -#include "macros.hxx" #include "constant.hxx" #include "cacheupdatelistener.hxx" @@ -224,7 +223,6 @@ void FilterCache::load(EFillState eRequired) impl_getDirectCFGValue(CFGDIRECTKEY_OFFICELOCALE) >>= m_sActLocale; if (m_sActLocale.isEmpty()) { - FILTER_CONFIG_LOG_1_("FilterCache::ctor() ... could not specify office locale => use default \"%s\"\n", _FILTER_CONFIG_TO_ASCII_(DEFAULT_OFFICELOCALE)); m_sActLocale = DEFAULT_OFFICELOCALE; } @@ -269,8 +267,6 @@ OUStringList FilterCache::getMatchingItemsByProps( EItemType eType , pIt != rList.end() ; ++pIt ) { - FILTER_CONFIG_LOG_1_("getMatchingProps for \"%s\" ...\n", - FILTER_CONFIG_TO_ASCII_(pIt->first)) if ( (pIt->second.haveProps(lIProps) ) && (pIt->second.dontHaveProps(lEProps)) @@ -1731,7 +1727,6 @@ CacheItemList::iterator FilterCache::impl_loadItemOnDemand( EItemType if (bItemInConfig) { (*pList)[sItem] = impl_loadItem(xSet, eType, sItem, E_READ_ALL); - FILTER_CONFIG_LOG_2_("impl_loadItemOnDemand(%d, \"%s\") ... OK", (int)eType, _FILTER_CONFIG_TO_ASCII_(sItem).getStr()) } else { @@ -2042,7 +2037,6 @@ void FilterCache::impl_interpretDataVal4Filter(const OUString& sValue, if (nOrder > 0) { SAL_WARN( "filter.config", "FilterCache::impl_interpretDataVal4Filter()\nCan not move Order value from filter to type on demand!"); - FILTER_CONFIG_LOG_2_("impl_interpretDataVal4Filter(%d, \"%s\") ... OK", (int)eType, _FILTER_CONFIG_TO_ASCII_(rItem).getStr()) } } break; diff --git a/filter/source/config/cache/filterfactory.cxx b/filter/source/config/cache/filterfactory.cxx index 604118e32d3d..cbfd0c1d9e2f 100644 --- a/filter/source/config/cache/filterfactory.cxx +++ b/filter/source/config/cache/filterfactory.cxx @@ -19,7 +19,6 @@ #include "filterfactory.hxx" -#include "macros.hxx" #include "constant.hxx" #include "versions.hxx" @@ -93,7 +92,6 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL FilterFactory::createInstan if (!cache.hasItem(FilterCache::E_FILTER, sFilter) && cache.hasItem(FilterCache::E_TYPE, sFilter)) { OSL_FAIL("Who use this deprecated functionality?"); - FILTER_CONFIG_LOG_("FilterFactory::createInstanceWithArguments() ... simulate old type search functionality!\n"); css::uno::Sequence< css::beans::NamedValue > lQuery { { PROPNAME_TYPE, css::uno::makeAny(sFilter) } }; diff --git a/filter/source/config/cache/frameloaderfactory.cxx b/filter/source/config/cache/frameloaderfactory.cxx index c8a6ac03b69c..3d1d5bb84d55 100644 --- a/filter/source/config/cache/frameloaderfactory.cxx +++ b/filter/source/config/cache/frameloaderfactory.cxx @@ -19,7 +19,6 @@ #include "frameloaderfactory.hxx" -#include "macros.hxx" #include "constant.hxx" #include "versions.hxx" @@ -73,8 +72,6 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL FrameLoaderFactory::createI if (!cache.hasItem(FilterCache::E_FRAMELOADER, sLoader) && cache.hasItem(FilterCache::E_TYPE, sLoader)) { - FILTER_CONFIG_LOG_("FrameLoaderFactory::createInstanceWithArguments() ... simulate old type search functionality!\n"); - css::uno::Sequence< OUString > lTypes { sLoader }; css::uno::Sequence< css::beans::NamedValue > lQuery { { PROPNAME_TYPES, css::uno::makeAny(lTypes) } }; diff --git a/filter/source/config/cache/macros.hxx b/filter/source/config/cache/macros.hxx deleted file mode 100644 index 5450f502375a..000000000000 --- a/filter/source/config/cache/macros.hxx +++ /dev/null @@ -1,38 +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_FILTER_SOURCE_CONFIG_CACHE_MACROS_HXX -#define INCLUDED_FILTER_SOURCE_CONFIG_CACHE_MACROS_HXX - -#include <rtl/ustring.hxx> - -#ifdef FILTER_CONFIG_TO_ASCII_ - #error "who already defined such macro :-(" -#endif - -#define FILTER_CONFIG_TO_ASCII_(UNICODE_STRING) \ - OUStringToOString(UNICODE_STRING, RTL_TEXTENCODING_UTF8).getStr() - -#define FILTER_CONFIG_LOG_(TEXT) -#define FILTER_CONFIG_LOG_1_(FORMAT, ARG1) -#define FILTER_CONFIG_LOG_2_(FORMAT, ARG1, ARG2) - -#endif // INCLUDED_FILTER_SOURCE_CONFIG_CACHE_MACROS_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits