Avoid reserved identifiers

Change-Id: I175de0aa53559fb092644d18e05e2d890fe05fca
This commit is contained in:
Stephan Bergmann
2016-04-12 08:13:18 +02:00
parent 703d4020d4
commit 2d42a1bcf6
7 changed files with 44 additions and 44 deletions

View File

@@ -123,7 +123,7 @@ bool isSubSet(const css::uno::Any& aSubSet,
if (!aT1.equals(aT2)) if (!aT1.equals(aT2))
{ {
_FILTER_CONFIG_LOG_("isSubSet() ... types of any values are different => return FALSE\n") FILTER_CONFIG_LOG_("isSubSet() ... types of any values are different => return FALSE\n")
return false; return false;
} }
@@ -143,7 +143,7 @@ bool isSubSet(const css::uno::Any& aSubSet,
case css::uno::TypeClass_DOUBLE : case css::uno::TypeClass_DOUBLE :
{ {
bool bIs = (aSubSet == aSet); bool bIs = (aSubSet == aSet);
_FILTER_CONFIG_LOG_1_("isSubSet() ... check for atomic types => return %s\n", bIs ? "TRUE" : "FALSE") FILTER_CONFIG_LOG_1_("isSubSet() ... check for atomic types => return %s\n", bIs ? "TRUE" : "FALSE")
return bIs; return bIs;
} }
@@ -159,7 +159,7 @@ bool isSubSet(const css::uno::Any& aSubSet,
) )
{ {
bool bIs = (v1.equals(v2)); bool bIs = (v1.equals(v2));
_FILTER_CONFIG_LOG_1_("isSubSet() ... check for string types => return %s\n", bIs ? "TRUE" : "FALSE") FILTER_CONFIG_LOG_1_("isSubSet() ... check for string types => return %s\n", bIs ? "TRUE" : "FALSE")
return bIs; return bIs;
} }
} }
@@ -177,7 +177,7 @@ bool isSubSet(const css::uno::Any& aSubSet,
) )
{ {
bool bIs = (isSubSet(v1, v2)); bool bIs = (isSubSet(v1, v2));
_FILTER_CONFIG_LOG_1_("isSubSet() ... check for packed any types => return %s\n", bIs ? "TRUE" : "FALSE") FILTER_CONFIG_LOG_1_("isSubSet() ... check for packed any types => return %s\n", bIs ? "TRUE" : "FALSE")
return bIs; return bIs;
} }
} }
@@ -198,7 +198,7 @@ bool isSubSet(const css::uno::Any& aSubSet,
(p1.Name.equals(p2.Name) ) && (p1.Name.equals(p2.Name) ) &&
(isSubSet(p1.Value, p2.Value)) (isSubSet(p1.Value, p2.Value))
); );
_FILTER_CONFIG_LOG_1_("isSubSet() ... check for structured types [PropertyValue] => return %s\n", bIs ? "TRUE" : "FALSE") FILTER_CONFIG_LOG_1_("isSubSet() ... check for structured types [PropertyValue] => return %s\n", bIs ? "TRUE" : "FALSE")
return bIs; return bIs;
} }
@@ -214,7 +214,7 @@ bool isSubSet(const css::uno::Any& aSubSet,
(n1.Name.equals(n2.Name) ) && (n1.Name.equals(n2.Name) ) &&
(isSubSet(n1.Value, n2.Value)) (isSubSet(n1.Value, n2.Value))
); );
_FILTER_CONFIG_LOG_1_("isSubSet() ... check for structured types [NamedValue] => return %s\n", bIs ? "TRUE" : "FALSE") FILTER_CONFIG_LOG_1_("isSubSet() ... check for structured types [NamedValue] => return %s\n", bIs ? "TRUE" : "FALSE")
return bIs; return bIs;
} }
} }
@@ -240,12 +240,12 @@ bool isSubSet(const css::uno::Any& aSubSet,
{ {
if (::std::find(stl_s2.begin(), stl_s2.end(), *it1) == stl_s2.end()) 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)) FILTER_CONFIG_LOG_1_("isSubSet() ... check for list types [OUString] ... didn't found \"%s\" => return FALSE\n", _FILTER_CONFIG_TO_ASCII_(*it1))
return false; 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_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") FILTER_CONFIG_LOG_("isSubSet() ... check for list types [OUString] => return TRUE\n")
return true; return true;
} }
@@ -267,17 +267,17 @@ bool isSubSet(const css::uno::Any& aSubSet,
::comphelper::SequenceAsHashMap::const_iterator it2 = stl_p2.find(it1->first); ::comphelper::SequenceAsHashMap::const_iterator it2 = stl_p2.find(it1->first);
if (it2 == stl_p2.end()) 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)) 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; return false;
} }
if (!isSubSet(it1->second, it2->second)) 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)) 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; 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_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") FILTER_CONFIG_LOG_("isSubSet() ... check for list types [PropertyValue] => return TRUE\n")
return true; return true;
} }
@@ -299,17 +299,17 @@ bool isSubSet(const css::uno::Any& aSubSet,
::comphelper::SequenceAsHashMap::const_iterator it2 = stl_n2.find(it1->first); ::comphelper::SequenceAsHashMap::const_iterator it2 = stl_n2.find(it1->first);
if (it2 == stl_n2.end()) 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)) 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; return false;
} }
if (!isSubSet(it1->second, it2->second)) 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)) 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; 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_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") FILTER_CONFIG_LOG_("isSubSet() ... check for list types [NamedValue] => return TRUE\n")
return true; return true;
} }
} }
@@ -332,14 +332,14 @@ bool CacheItem::haveProps(const CacheItem& lProps) const
const_iterator pItThis = this->find(pIt->first); const_iterator pItThis = this->find(pIt->first);
if (pItThis == this->end()) if (pItThis == this->end())
{ {
_FILTER_CONFIG_LOG_1_("CacheItem::haveProps() ... didn't found \"%s\" => return FALSE\n", _FILTER_CONFIG_TO_ASCII_(pIt->first)) FILTER_CONFIG_LOG_1_("CacheItem::haveProps() ... didn't found \"%s\" => return FALSE\n", _FILTER_CONFIG_TO_ASCII_(pIt->first))
return false; return false;
} }
// ii) one item does not have the right value => return false // ii) one item does not have the right value => return false
if (!isSubSet(pIt->second, pItThis->second)) 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)) FILTER_CONFIG_LOG_1_("CacheItem::haveProps() ... item \"%s\" has different value => return FALSE\n", _FILTER_CONFIG_TO_ASCII_(pIt->first))
return false; return false;
} }
} }
@@ -347,7 +347,7 @@ bool CacheItem::haveProps(const CacheItem& lProps) const
// this method was not breaked before => // this method was not breaked before =>
// the given property set seems to match with our // the given property set seems to match with our
// own properties in its minimum => return TRUE // own properties in its minimum => return TRUE
_FILTER_CONFIG_LOG_("CacheItem::haveProps() ... => return TRUE\n") FILTER_CONFIG_LOG_("CacheItem::haveProps() ... => return TRUE\n")
return true; return true;
} }
@@ -365,7 +365,7 @@ bool CacheItem::dontHaveProps(const CacheItem& lProps) const
const_iterator pItThis = this->find(pIt->first); const_iterator pItThis = this->find(pIt->first);
if (pItThis == this->end()) if (pItThis == this->end())
{ {
_FILTER_CONFIG_LOG_1_("CacheItem::dontHaveProps() ... not found \"%s\" => continue loop!\n", _FILTER_CONFIG_TO_ASCII_(pIt->first)) FILTER_CONFIG_LOG_1_("CacheItem::dontHaveProps() ... not found \"%s\" => continue loop!\n", _FILTER_CONFIG_TO_ASCII_(pIt->first))
continue; continue;
} }
@@ -374,7 +374,7 @@ bool CacheItem::dontHaveProps(const CacheItem& lProps) const
// But we checked for "don't have it" here. // But we checked for "don't have it" here.
if (isSubSet(pIt->second, pItThis->second)) 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)) FILTER_CONFIG_LOG_1_("CacheItem::dontHaveProps() ... item \"%s\" has same value => return FALSE!\n", _FILTER_CONFIG_TO_ASCII_(pIt->first))
return false; return false;
} }
} }
@@ -382,7 +382,7 @@ bool CacheItem::dontHaveProps(const CacheItem& lProps) const
// this method was not breaked before => // this method was not breaked before =>
// That means: this item has no matching property // That means: this item has no matching property
// of the given set. It "don't have" it ... => return true. // of the given set. It "don't have" it ... => return true.
_FILTER_CONFIG_LOG_("CacheItem::dontHaveProps() ... => return TRUE\n") FILTER_CONFIG_LOG_("CacheItem::dontHaveProps() ... => return TRUE\n")
return true; return true;
} }

View File

@@ -68,7 +68,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL ContentHandlerFactory::crea
OUString sRealHandler = sHandler; OUString sRealHandler = sHandler;
#ifdef _FILTER_CONFIG_MIGRATION_Q_ #ifdef FILTER_CONFIG_MIGRATION_Q_
/* -> TODO - HACK /* -> TODO - HACK
check if the given handler name really exists ... check if the given handler name really exists ...
@@ -80,7 +80,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL ContentHandlerFactory::crea
if (!cache.hasItem(FilterCache::E_CONTENTHANDLER, sHandler) && cache.hasItem(FilterCache::E_TYPE, sHandler)) if (!cache.hasItem(FilterCache::E_CONTENTHANDLER, sHandler) && cache.hasItem(FilterCache::E_TYPE, sHandler))
{ {
_FILTER_CONFIG_LOG_("ContentHandlerFactory::createInstanceWithArguments() ... simulate old type search functionality!\n"); FILTER_CONFIG_LOG_("ContentHandlerFactory::createInstanceWithArguments() ... simulate old type search functionality!\n");
css::uno::Sequence< OUString > lTypes { sHandler }; css::uno::Sequence< OUString > lTypes { sHandler };
@@ -102,7 +102,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL ContentHandlerFactory::crea
/* <- HACK */ /* <- HACK */
#endif // _FILTER_CONFIG_MIGRATION_Q_ #endif // FILTER_CONFIG_MIGRATION_Q_
// search handler on cache // search handler on cache
CacheItem aHandler = cache.getItem(FilterCache::E_CONTENTHANDLER, sRealHandler); CacheItem aHandler = cache.getItem(FilterCache::E_CONTENTHANDLER, sRealHandler);

View File

@@ -222,7 +222,7 @@ void FilterCache::load(EFillState eRequired)
impl_getDirectCFGValue(CFGDIRECTKEY_OFFICELOCALE) >>= m_sActLocale; impl_getDirectCFGValue(CFGDIRECTKEY_OFFICELOCALE) >>= m_sActLocale;
if (m_sActLocale.isEmpty()) 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)); 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; m_sActLocale = DEFAULT_OFFICELOCALE;
} }
@@ -270,8 +270,8 @@ OUStringList FilterCache::getMatchingItemsByProps( EItemType eType ,
pIt != rList.end() ; pIt != rList.end() ;
++pIt ) ++pIt )
{ {
_FILTER_CONFIG_LOG_1_("getMatchingProps for \"%s\" ...\n", FILTER_CONFIG_LOG_1_("getMatchingProps for \"%s\" ...\n",
_FILTER_CONFIG_TO_ASCII_(pIt->first)) FILTER_CONFIG_TO_ASCII_(pIt->first))
if ( if (
(pIt->second.haveProps(lIProps) ) && (pIt->second.haveProps(lIProps) ) &&
(pIt->second.dontHaveProps(lEProps)) (pIt->second.dontHaveProps(lEProps))
@@ -1560,7 +1560,7 @@ void FilterCache::impl_readPatchUINames(const css::uno::Reference< css::containe
OUString sMsg("Fallback scenario for filter or type '" + sName + "' and locale '" + OUString sMsg("Fallback scenario for filter or type '" + sName + "' and locale '" +
sActLocale + "' failed. Please check your filter configuration."); sActLocale + "' failed. Please check your filter configuration.");
OSL_FAIL(_FILTER_CONFIG_TO_ASCII_(sMsg)); OSL_FAIL(FILTER_CONFIG_TO_ASCII_(sMsg));
#endif #endif
return; return;
} }
@@ -1766,7 +1766,7 @@ CacheItemList::iterator FilterCache::impl_loadItemOnDemand( EItemType
if (bItemInConfig) if (bItemInConfig)
{ {
(*pList)[sItem] = impl_loadItem(xSet, eType, sItem, E_READ_ALL); (*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()) FILTER_CONFIG_LOG_2_("impl_loadItemOnDemand(%d, \"%s\") ... OK", (int)eType, _FILTER_CONFIG_TO_ASCII_(sItem).getStr())
} }
else else
{ {
@@ -2081,7 +2081,7 @@ void FilterCache::impl_interpretDataVal4Filter(const OUString& sValue,
if (nOrder > 0) if (nOrder > 0)
{ {
SAL_WARN( "filter.config", "FilterCache::impl_interpretDataVal4Filter()\nCan not move Order value from filter to type on demand!"); 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()) FILTER_CONFIG_LOG_2_("impl_interpretDataVal4Filter(%d, \"%s\") ... OK", (int)eType, _FILTER_CONFIG_TO_ASCII_(rItem).getStr())
} }
} }
break; break;

View File

@@ -84,7 +84,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL FilterFactory::createInstan
OUString sRealFilter = sFilter; OUString sRealFilter = sFilter;
#ifdef _FILTER_CONFIG_MIGRATION_Q_ #ifdef FILTER_CONFIG_MIGRATION_Q_
/* -> TODO - HACK /* -> TODO - HACK
check if the given filter name really exist ... check if the given filter name really exist ...
@@ -97,7 +97,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL FilterFactory::createInstan
if (!cache.hasItem(FilterCache::E_FILTER, sFilter) && cache.hasItem(FilterCache::E_TYPE, sFilter)) if (!cache.hasItem(FilterCache::E_FILTER, sFilter) && cache.hasItem(FilterCache::E_TYPE, sFilter))
{ {
OSL_FAIL("Who use this deprecated functionality?"); OSL_FAIL("Who use this deprecated functionality?");
_FILTER_CONFIG_LOG_("FilterFactory::createInstanceWithArguments() ... simulate old type search functionality!\n"); FILTER_CONFIG_LOG_("FilterFactory::createInstanceWithArguments() ... simulate old type search functionality!\n");
css::uno::Sequence< css::beans::NamedValue > lQuery { { PROPNAME_TYPE, css::uno::makeAny(sFilter) } }; css::uno::Sequence< css::beans::NamedValue > lQuery { { PROPNAME_TYPE, css::uno::makeAny(sFilter) } };
@@ -117,7 +117,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL FilterFactory::createInstan
/* <- HACK */ /* <- HACK */
#endif // _FILTER_CONFIG_MIGRATION_Q_ #endif // FILTER_CONFIG_MIGRATION_Q_
// search filter on cache // search filter on cache
CacheItem aFilter = cache.getItem(FilterCache::E_FILTER, sRealFilter); CacheItem aFilter = cache.getItem(FilterCache::E_FILTER, sRealFilter);

View File

@@ -65,7 +65,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL FrameLoaderFactory::createI
OUString sRealLoader = sLoader; OUString sRealLoader = sLoader;
#ifdef _FILTER_CONFIG_MIGRATION_Q_ #ifdef FILTER_CONFIG_MIGRATION_Q_
/* -> TODO - HACK /* -> TODO - HACK
check if the given loader name really exist ... check if the given loader name really exist ...
@@ -77,7 +77,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL FrameLoaderFactory::createI
if (!cache.hasItem(FilterCache::E_FRAMELOADER, sLoader) && cache.hasItem(FilterCache::E_TYPE, sLoader)) if (!cache.hasItem(FilterCache::E_FRAMELOADER, sLoader) && cache.hasItem(FilterCache::E_TYPE, sLoader))
{ {
_FILTER_CONFIG_LOG_("FrameLoaderFactory::createInstanceWithArguments() ... simulate old type search functionality!\n"); FILTER_CONFIG_LOG_("FrameLoaderFactory::createInstanceWithArguments() ... simulate old type search functionality!\n");
css::uno::Sequence< OUString > lTypes { sLoader }; css::uno::Sequence< OUString > lTypes { sLoader };
@@ -99,7 +99,7 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL FrameLoaderFactory::createI
/* <- HACK */ /* <- HACK */
#endif // _FILTER_CONFIG_MIGRATION_Q_ #endif // FILTER_CONFIG_MIGRATION_Q_
// search loader on cache // search loader on cache
CacheItem aLoader = cache.getItem(m_eType, sRealLoader); CacheItem aLoader = cache.getItem(m_eType, sRealLoader);

View File

@@ -22,16 +22,16 @@
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#ifdef _FILTER_CONFIG_TO_ASCII_ #ifdef FILTER_CONFIG_TO_ASCII_
#error "who already defined such macro :-(" #error "who already defined such macro :-("
#endif #endif
#define _FILTER_CONFIG_TO_ASCII_(UNICODE_STRING) \ #define FILTER_CONFIG_TO_ASCII_(UNICODE_STRING) \
OUStringToOString(UNICODE_STRING, RTL_TEXTENCODING_UTF8).getStr() OUStringToOString(UNICODE_STRING, RTL_TEXTENCODING_UTF8).getStr()
#define _FILTER_CONFIG_LOG_(TEXT) #define FILTER_CONFIG_LOG_(TEXT)
#define _FILTER_CONFIG_LOG_1_(FORMAT, ARG1) #define FILTER_CONFIG_LOG_1_(FORMAT, ARG1)
#define _FILTER_CONFIG_LOG_2_(FORMAT, ARG1, ARG2) #define FILTER_CONFIG_LOG_2_(FORMAT, ARG1, ARG2)
#endif // INCLUDED_FILTER_SOURCE_CONFIG_CACHE_MACROS_HXX #endif // INCLUDED_FILTER_SOURCE_CONFIG_CACHE_MACROS_HXX

View File

@@ -21,7 +21,7 @@
#define INCLUDED_FILTER_SOURCE_CONFIG_CACHE_VERSIONS_HXX #define INCLUDED_FILTER_SOURCE_CONFIG_CACHE_VERSIONS_HXX
#define _FILTER_CONFIG_MIGRATION_Q_ // useful for migration time, to support some old functionality temp. :-) #define FILTER_CONFIG_MIGRATION_Q_ // useful for migration time, to support some old functionality temp. :-)
#endif // INCLUDED_FILTER_SOURCE_CONFIG_CACHE_VERSIONS_HXX #endif // INCLUDED_FILTER_SOURCE_CONFIG_CACHE_VERSIONS_HXX