From f80d46233150d36183ec3e03708f9f6290c8c339 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 28 Dec 2011 14:08:33 +0000 Subject: callcatcher: drop some unused methods --- comphelper/inc/comphelper/sequenceashashmap.hxx | 50 -------------- comphelper/source/misc/sequenceashashmap.cxx | 92 ------------------------- 2 files changed, 142 deletions(-) (limited to 'comphelper') diff --git a/comphelper/inc/comphelper/sequenceashashmap.hxx b/comphelper/inc/comphelper/sequenceashashmap.hxx index e809d6a78f78..2762d39156f8 100644 --- a/comphelper/inc/comphelper/sequenceashashmap.hxx +++ b/comphelper/inc/comphelper/sequenceashashmap.hxx @@ -45,15 +45,6 @@ #include #include "comphelper/comphelperdllapi.h" -// see method dbg_dumpToFile() below! -#if OSL_DEBUG_LEVEL > 1 - #ifndef _RTL_USTRBUF_HXX_ - #include - #endif - - #include -#endif - //_______________________________________________ // namespace @@ -202,24 +193,6 @@ class COMPHELPER_DLLPUBLIC SequenceAsHashMap : public SequenceAsHashMapBase */ const ::com::sun::star::uno::Any getAsConstAny(::sal_Bool bAsPropertyValue) const; - //--------------------------------------- - /** @short return this map instance as a - sequence< Any >, which can be - used in const environments only. - - @descr Its made const to prevent using of the - return value directly as an in/out parameter! - usage: myMethod(stlDequeAdapter.getAsAnyList()); - - @param bAsPropertyValue - switch between using of PropertyValue or NamedValue as - value type. - - @return A const sequence which elements of Any, which - contains all items of this map. - */ - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > getAsConstAnyList(::sal_Bool bAsPropertyValue) const; - //--------------------------------------- /** @short return this map instance to as a NamedValue sequence, which can be @@ -350,29 +323,6 @@ class COMPHELPER_DLLPUBLIC SequenceAsHashMap : public SequenceAsHashMapBase the map containing all items for the update. */ void update(const SequenceAsHashMap& rSource); - - //--------------------------------------- - /** @short can be used to generate a file dump of - the current content of this instance. - - @descr Because the content of STL container - cant be analyzed easy, such dump function - seem to be usefull. - Of course its available in debug versions - only. - - @param pFileName - a system file name. - (doesnt matter if relativ or absolute) - - @param pComment - used to mark the dump inside the same log file. - Can be usefull to analyze changes of this - hash map due to the parts of an operation. - */ - #if OSL_DEBUG_LEVEL > 1 - void dbg_dumpToFile(const char* pFileName, const char* pComment) const; - #endif }; } // namespace comphelper diff --git a/comphelper/source/misc/sequenceashashmap.cxx b/comphelper/source/misc/sequenceashashmap.cxx index de2715b33e45..9c7a4cd81a6e 100644 --- a/comphelper/source/misc/sequenceashashmap.cxx +++ b/comphelper/source/misc/sequenceashashmap.cxx @@ -242,41 +242,6 @@ const css::uno::Any SequenceAsHashMap::getAsConstAny(::sal_Bool bAsPropertyValue return aDestination; } -/*----------------------------------------------- - 30.07.2007 14:10 ------------------------------------------------*/ -const css::uno::Sequence< css::uno::Any > SequenceAsHashMap::getAsConstAnyList(::sal_Bool bAsPropertyValueList) const -{ - ::sal_Int32 i = 0; - ::sal_Int32 c = (::sal_Int32)size(); - css::uno::Sequence< css::uno::Any > lDestination(c); - css::uno::Any* pDestination = lDestination.getArray(); - - for (const_iterator pThis = begin(); - pThis != end() ; - ++pThis ) - { - if (bAsPropertyValueList) - { - css::beans::PropertyValue aProp; - aProp.Name = pThis->first; - aProp.Value = pThis->second; - pDestination[i] = css::uno::makeAny(aProp); - } - else - { - css::beans::NamedValue aProp; - aProp.Name = pThis->first; - aProp.Value = pThis->second; - pDestination[i] = css::uno::makeAny(aProp); - } - - ++i; - } - - return lDestination; -} - /*----------------------------------------------- 04.11.2003 08:30 -----------------------------------------------*/ @@ -339,63 +304,6 @@ void SequenceAsHashMap::update(const SequenceAsHashMap& rUpdate) } } -/*----------------------------------------------- - 04.11.2003 08:30 ------------------------------------------------*/ -#if OSL_DEBUG_LEVEL > 1 -void SequenceAsHashMap::dbg_dumpToFile(const char* pFileName, - const char* pComment ) const -{ - if (!pFileName || !pComment) - return; - - FILE* pFile = fopen(pFileName, "a"); - if (!pFile) - return; - - ::rtl::OUStringBuffer sBuffer(1000); - sBuffer.appendAscii("\n----------------------------------------\n"); - sBuffer.appendAscii(pComment ); - sBuffer.appendAscii("\n----------------------------------------\n"); - sal_Int32 i = 0; - for (const_iterator pIt = begin(); - pIt != end() ; - ++pIt ) - { - sBuffer.appendAscii("[" ); - sBuffer.append (i++ ); - sBuffer.appendAscii("] " ); - sBuffer.appendAscii("\"" ); - sBuffer.append (pIt->first); - sBuffer.appendAscii("\" = \"" ); - - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xv; - ::rtl::OUString sv; - sal_Int32 nv; - sal_Bool bv; - - if (pIt->second >>= sv) - sBuffer.append(sv); - else - if (pIt->second >>= nv) - sBuffer.append(nv); - else - if (pIt->second >>= bv) - sBuffer.appendAscii(bv ? "true" : "false"); - else - if (pIt->second >>= xv) - sBuffer.appendAscii(xv.is() ? "object" : "null"); - else - sBuffer.appendAscii("???"); - - sBuffer.appendAscii("\"\n"); - } - - fprintf(pFile, ::rtl::OUStringToOString(sBuffer.makeStringAndClear(), RTL_TEXTENCODING_UTF8).getStr()); - fclose(pFile); -} -#endif // OSL_DEBUG_LEVEL > 1 - } // namespace comphelper /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit