[Libreoffice-commits] .: 22 commits - desktop/scripts desktop/source dtrans/source filter/source framework/source l10ntools/inc l10ntools/source sal/osl sal/rtl sc/Library_scfilt.mk sc/source svl/qa svtools/source svx/source sw/source unotools/inc unotools/Package_inc.mk unotools/source unusedcode.easy xmlscript/source
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Mar 28 06:55:51 PDT 2012
desktop/scripts/soffice.sh | 3
desktop/source/deployment/registry/help/dp_help.cxx | 6
desktop/source/migration/migration.cxx | 36 ++--
dtrans/source/cnttype/mcnttype.cxx | 45 +++--
filter/source/placeware/Base64Codec.cxx | 63 -------
framework/source/classes/fwktabwindow.cxx | 14 -
l10ntools/inc/xmlparse.hxx | 8
l10ntools/source/xmlparse.cxx | 28 ---
sal/osl/unx/signal.c | 44 +++++
sal/rtl/source/alloc_arena.cxx | 15 -
sal/rtl/source/alloc_cache.cxx | 37 ----
sal/rtl/source/alloc_impl.hxx | 31 ---
sc/Library_scfilt.mk | 2
sc/source/filter/excel/excel.cxx | 63 -------
sc/source/filter/inc/addressconverter.hxx | 8
sc/source/filter/inc/biffoutputstream.hxx | 135 ----------------
sc/source/filter/inc/excelfilter.hxx | 19 --
sc/source/filter/inc/stylesbuffer.hxx | 3
sc/source/filter/inc/workbookhelper.hxx | 2
sc/source/filter/oox/addressconverter.cxx | 13 -
sc/source/filter/oox/biffhelper.cxx | 2
sc/source/filter/oox/biffoutputstream.cxx | 161 --------------------
sc/source/filter/oox/excelfilter.cxx | 69 --------
sc/source/filter/oox/ooxformulaparser.cxx | 122 ---------------
sc/source/filter/oox/stylesbuffer.cxx | 5
sc/source/filter/oox/workbookhelper.cxx | 22 --
svl/qa/unit/test_lngmisc.cxx | 16 -
svtools/source/config/extcolorcfg.cxx | 12 -
svtools/source/control/inettbc.cxx | 31 +--
svx/source/fmcomp/gridcell.cxx | 15 -
sw/source/core/layout/paintfrm.cxx | 4
unotools/Package_inc.mk | 2
unotools/inc/unotools/historyoptions_const.hxx | 56 ------
unotools/inc/unotools/useroptions_const.hxx | 22 --
unotools/source/config/historyoptions.cxx | 102 +++++++-----
unotools/source/config/lingucfg.cxx | 27 +--
unotools/source/config/useroptions.cxx | 132 +++++++++-------
unusedcode.easy | 2
xmlscript/source/xmllib_imexp/xmllib_export.cxx | 20 +-
39 files changed, 294 insertions(+), 1103 deletions(-)
New commits:
commit e320d81cd8b4dd1bd9b15892c616a99f48c93567
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 28 13:26:25 2012 +0100
stray debugging line
diff --git a/sal/osl/unx/signal.c b/sal/osl/unx/signal.c
index cd7b58b..57263c7 100644
--- a/sal/osl/unx/signal.c
+++ b/sal/osl/unx/signal.c
@@ -922,7 +922,6 @@ void CallSystemHandler(int Signal)
#if defined(HAVE_MEMCHECK_H)
static void DUMPCURRENTALLOCS()
{
- fprintf(stderr, "hello world\n");
VALGRIND_PRINTF( "=== start memcheck dump of active allocations ===\n" );
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
commit 38814653ba6b76a6d6b4603c037cb52e0be300e8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 28 12:30:11 2012 +0100
remove static OUStrings from static_initialization_and_destruction chain
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 66c51c3..f807ccc 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -92,9 +92,8 @@ using namespace ::com::sun::star::form;
using ::com::sun::star::util::XNumberFormatter;
namespace MouseWheelBehavior = ::com::sun::star::awt::MouseWheelBehavior;
-String INVALIDTEXT = String::CreateFromAscii("###");
-String OBJECTTEXT = String::CreateFromAscii("<OBJECT>");
- // TODO: resource
+const char INVALIDTEXT[] = "###";
+const char OBJECTTEXT[] = "<OBJECT>";
//==================================================================
//= helper
@@ -423,7 +422,7 @@ String DbGridColumn::GetCellText(const DbGridRow* pRow, const Reference< XNumber
return aText;
if (!pRow || !pRow->IsValid())
- aText = INVALIDTEXT;
+ aText = rtl::OUString(INVALIDTEXT);
else if (pRow->HasField(m_nFieldPos))
{
aText = GetCellText( pRow->GetField( m_nFieldPos ).getColumn(), xFormatter );
@@ -441,7 +440,7 @@ String DbGridColumn::GetCellText(const Reference< ::com::sun::star::sdb::XColumn
if (pTextCell)
aText = pTextCell->GetText(xField, xFormatter);
else if (m_bObject)
- aText = OBJECTTEXT;
+ aText = rtl::OUString(OBJECTTEXT);
}
return aText;
}
@@ -476,7 +475,7 @@ void DbGridColumn::Paint(OutputDevice& rDev,
if ( !bEnabled )
nStyle |= TEXT_DRAW_DISABLE;
- rDev.DrawText(rRect, INVALIDTEXT, nStyle);
+ rDev.DrawText(rRect, rtl::OUString(INVALIDTEXT), nStyle);
}
else if (m_bAutoValue && pRow->IsNew())
{
@@ -512,14 +511,14 @@ void DbGridColumn::Paint(OutputDevice& rDev,
if ( !bEnabled )
nStyle |= TEXT_DRAW_DISABLE;
- rDev.DrawText(rRect, INVALIDTEXT, nStyle);
+ rDev.DrawText(rRect, rtl::OUString(INVALIDTEXT), nStyle);
}
else if (pRow->HasField(m_nFieldPos) && m_bObject)
{
sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_CENTER;
if ( !bEnabled )
nStyle |= TEXT_DRAW_DISABLE;
- rDev.DrawText(rRect, OBJECTTEXT, nStyle);
+ rDev.DrawText(rRect, rtl::OUString(OBJECTTEXT), nStyle);
}
}
else if ( m_pCell->ISA( FmXFilterCell ) )
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx
index 866e142..5e60a3d 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -810,13 +810,12 @@ sal_Bool SvtLinguConfigItem::IsReadOnly( sal_Int32 nPropertyHandle ) const
static SvtLinguConfigItem *pCfgItem = 0;
static sal_Int32 nCfgItemRefCount = 0;
-static const rtl::OUString aG_SupportedDictionaryFormats(RTL_CONSTASCII_USTRINGPARAM("SupportedDictionaryFormats"));
-static const rtl::OUString aG_Dictionaries(RTL_CONSTASCII_USTRINGPARAM("Dictionaries"));
-static const rtl::OUString aG_Locations(RTL_CONSTASCII_USTRINGPARAM("Locations"));
-static const rtl::OUString aG_Format(RTL_CONSTASCII_USTRINGPARAM("Format"));
-static const rtl::OUString aG_Locales(RTL_CONSTASCII_USTRINGPARAM("Locales"));
-static const rtl::OUString aG_DisabledDictionaries(RTL_CONSTASCII_USTRINGPARAM("DisabledDictionaries"));
-static const rtl::OUString aG_LastActiveDictionaries(RTL_CONSTASCII_USTRINGPARAM("LastActiveDictionaries"));
+static const char aG_SupportedDictionaryFormats[] = "SupportedDictionaryFormats";
+static const char aG_Dictionaries[] = "Dictionaries";
+static const char aG_Locations[] = "Locations";
+static const char aG_Format[] = "Format";
+static const char aG_Locales[] = "Locales";
+static const char aG_DisabledDictionaries[] = "DisabledDictionaries";
SvtLinguConfig::SvtLinguConfig()
{
@@ -932,7 +931,7 @@ sal_Bool SvtLinguConfig::GetSupportedDictionaryFormatsFor(
xNA.set( xNA->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ServiceManager"))), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName( rSetName ), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName( rSetEntry ), uno::UNO_QUERY_THROW );
- if (xNA->getByName( aG_SupportedDictionaryFormats ) >>= rFormatList)
+ if (xNA->getByName( rtl::OUString(aG_SupportedDictionaryFormats) ) >>= rFormatList)
bSuccess = true;
DBG_ASSERT( rFormatList.getLength(), "supported dictionary format list is empty" );
}
@@ -1018,16 +1017,16 @@ sal_Bool SvtLinguConfig::GetDictionaryEntry(
{
uno::Reference< container::XNameAccess > xNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ServiceManager"))), uno::UNO_QUERY_THROW );
- xNA.set( xNA->getByName( aG_Dictionaries ), uno::UNO_QUERY_THROW );
+ xNA.set( xNA->getByName(rtl::OUString(aG_Dictionaries)), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName( rNodeName ), uno::UNO_QUERY_THROW );
// read group data...
uno::Sequence< rtl::OUString > aLocations;
rtl::OUString aFormatName;
uno::Sequence< rtl::OUString > aLocaleNames;
- bSuccess = (xNA->getByName( aG_Locations ) >>= aLocations) &&
- (xNA->getByName( aG_Format ) >>= aFormatName) &&
- (xNA->getByName( aG_Locales ) >>= aLocaleNames);
+ bSuccess = (xNA->getByName( rtl::OUString(aG_Locations) ) >>= aLocations) &&
+ (xNA->getByName( rtl::OUString(aG_Format) ) >>= aFormatName) &&
+ (xNA->getByName( rtl::OUString(aG_Locales) ) >>= aLocaleNames);
DBG_ASSERT( aLocations.getLength(), "Dictionary locations not set" );
DBG_ASSERT( !aFormatName.isEmpty(), "Dictionary format name not set" );
DBG_ASSERT( aLocaleNames.getLength(), "No locales set for the dictionary" );
@@ -1066,7 +1065,7 @@ uno::Sequence< rtl::OUString > SvtLinguConfig::GetDisabledDictionaries() const
{
uno::Reference< container::XNameAccess > xNA( GetMainUpdateAccess(), uno::UNO_QUERY_THROW );
xNA.set( xNA->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ServiceManager"))), uno::UNO_QUERY_THROW );
- xNA->getByName( aG_DisabledDictionaries ) >>= aResult;
+ xNA->getByName( rtl::OUString(aG_DisabledDictionaries) ) >>= aResult;
}
catch (uno::Exception &)
{
@@ -1084,7 +1083,7 @@ std::vector< SvtLinguConfigDictionaryEntry > SvtLinguConfig::GetActiveDictionari
try
{
uno::Sequence< rtl::OUString > aElementNames;
- GetElementNamesFor( aG_Dictionaries, aElementNames );
+ GetElementNamesFor( rtl::OUString(aG_Dictionaries), aElementNames );
sal_Int32 nLen = aElementNames.getLength();
const rtl::OUString *pElementNames = aElementNames.getConstArray();
diff --git a/xmlscript/source/xmllib_imexp/xmllib_export.cxx b/xmlscript/source/xmllib_imexp/xmllib_export.cxx
index 97f42c9..e20f335 100644
--- a/xmlscript/source/xmllib_imexp/xmllib_export.cxx
+++ b/xmlscript/source/xmllib_imexp/xmllib_export.cxx
@@ -38,8 +38,8 @@ using ::rtl::OUString;
namespace xmlscript
{
-static OUString aTrueStr ( RTL_CONSTASCII_USTRINGPARAM("true") );
-static OUString aFalseStr( RTL_CONSTASCII_USTRINGPARAM("false") );
+const char aTrueStr[] = "true";
+const char aFalseStr[] = "false";
//##################################################################################################
@@ -74,6 +74,9 @@ SAL_CALL exportLibraryContainer(
xOut->ignorableWhitespace( OUString() );
xOut->startElement( aLibrariesName, xAttributes );
+ rtl::OUString sTrueStr(aTrueStr);
+ rtl::OUString sFalseStr(aFalseStr);
+
int nLibCount = pLibArray->mnLibCount;
for( sal_Int32 i = 0 ; i < nLibCount ; i++ )
{
@@ -97,12 +100,12 @@ SAL_CALL exportLibraryContainer(
}
pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":link") ),
- rLib.bLink ? aTrueStr : aFalseStr );
+ rLib.bLink ? sTrueStr : sFalseStr );
if( rLib.bLink )
{
pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":readonly") ),
- rLib.bReadOnly ? aTrueStr : aFalseStr );
+ rLib.bReadOnly ? sTrueStr : sFalseStr );
}
pLibElement->dump( xOut.get() );
@@ -141,14 +144,17 @@ SAL_CALL exportLibrary(
pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":name") ),
rLib.aName );
+ rtl::OUString sTrueStr(aTrueStr);
+ rtl::OUString sFalseStr(aFalseStr);
+
pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":readonly") ),
- rLib.bReadOnly ? aTrueStr : aFalseStr );
+ rLib.bReadOnly ? sTrueStr : sFalseStr );
pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":passwordprotected") ),
- rLib.bPasswordProtected ? aTrueStr : aFalseStr );
+ rLib.bPasswordProtected ? sTrueStr : sFalseStr );
if( rLib.bPreload )
- pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":preload") ), aTrueStr );
+ pLibElement->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_LIBRARY_PREFIX ":preload") ), sTrueStr );
sal_Int32 nElementCount = rLib.aElementNames.getLength();
if( nElementCount )
commit d2ed905c85301e2124125ad7701ab85ced7e2bee
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 28 12:20:09 2012 +0100
when run under memcheck allow SIGUSR2 to dump current memory allocations
diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh
index 9a3f6f9..97a2be9 100755
--- a/desktop/scripts/soffice.sh
+++ b/desktop/scripts/soffice.sh
@@ -109,6 +109,7 @@ for arg in $@ $VALGRINDOPT ; do
fi
# finally set the valgrind check
VALGRINDCHECK="valgrind --tool=$VALGRIND --trace-children=yes $valgrind_skip --num-callers=50 --error-limit=no --error-exitcode=101"
+ echo "use kill -SIGUSR2 pid to dump traces of active allocations"
checks="c$checks"
if [ "$VALGRIND" = "memcheck" ] ; then
export G_SLICE=always-malloc
diff --git a/sal/osl/unx/signal.c b/sal/osl/unx/signal.c
index 71bd5fd..cd7b58b 100644
--- a/sal/osl/unx/signal.c
+++ b/sal/osl/unx/signal.c
@@ -87,6 +87,10 @@
#define MAX_PATH_LEN 2048
+#if defined(HAVE_MEMCHECK_H)
+#include <memcheck.h>
+#endif
+
typedef struct _oslSignalHandlerImpl
{
oslSignalHandlerFunction Handler;
@@ -260,8 +264,13 @@ static sal_Bool InitSignal()
sigfillset(&(act.sa_mask));
/* Initialize the rest of the signals */
- for (i = 0; i < NoSignals; i++)
+ for (i = 0; i < NoSignals; ++i)
{
+#if defined(HAVE_MEMCHECK_H)
+ if (Signals[i].Signal == SIGUSR2 && RUNNING_ON_VALGRIND)
+ Signals[i].Action = ACT_IGNORE;
+#endif
+
/* hack: stomcatd is attaching JavaVM wich dont work with an sigaction(SEGV) */
if ((bSetSEGVHandler || Signals[i].Signal != SIGSEGV)
&& (bSetWINCHHandler || Signals[i].Signal != SIGWINCH)
@@ -283,10 +292,12 @@ static sal_Bool InitSignal()
Signals[i].Handler = SIG_DFL;
}
else
+ {
if (sigaction(Signals[i].Signal, &act, &oact) == 0)
Signals[i].Handler = oact.sa_handler;
else
Signals[i].Handler = SIG_DFL;
+ }
}
}
}
@@ -908,6 +919,26 @@ void CallSystemHandler(int Signal)
}
}
+#if defined(HAVE_MEMCHECK_H)
+static void DUMPCURRENTALLOCS()
+{
+ fprintf(stderr, "hello world\n");
+ VALGRIND_PRINTF( "=== start memcheck dump of active allocations ===\n" );
+
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#endif
+
+ VALGRIND_DO_LEAK_CHECK;
+
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
+# pragma GCC diagnostic pop
+#endif
+
+ VALGRIND_PRINTF( "=== end memcheck dump of active allocations ===\n" );
+}
+#endif
/*****************************************************************************/
/* SignalHandlerFunction */
@@ -942,11 +973,19 @@ void SignalHandlerFunction(int Signal)
case SIGINT:
case SIGTERM:
- case SIGQUIT:
- case SIGHUP:
+ case SIGQUIT:
+ case SIGHUP:
Info.Signal = osl_Signal_Terminate;
break;
+#if defined(HAVE_MEMCHECK_H)
+ case SIGUSR2:
+ if (RUNNING_ON_VALGRIND)
+ DUMPCURRENTALLOCS();
+ Info.Signal = osl_Signal_System;
+ break;
+#endif
+
default:
Info.Signal = osl_Signal_System;
break;
commit f3876e3f4d2375e90112100de360da982ac2b8bb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 28 12:18:10 2012 +0100
these VALGRIND allocator annotations never worked for me, just busted memcheck
diff --git a/sal/rtl/source/alloc_arena.cxx b/sal/rtl/source/alloc_arena.cxx
index 639608c..1223e0e 100644
--- a/sal/rtl/source/alloc_arena.cxx
+++ b/sal/rtl/source/alloc_arena.cxx
@@ -922,7 +922,6 @@ try_alloc:
if (result != 0)
{
rtl_arena_type * arena = result;
- VALGRIND_CREATE_MEMPOOL(arena, 0, 0);
rtl_arena_constructor (arena);
if (!source_arena)
@@ -945,7 +944,6 @@ try_alloc:
{
rtl_arena_deactivate (arena);
rtl_arena_destructor (arena);
- VALGRIND_DESTROY_MEMPOOL(arena);
rtl_arena_free (gp_arena_arena, arena, size);
}
}
@@ -972,7 +970,6 @@ SAL_CALL rtl_arena_destroy (
{
rtl_arena_deactivate (arena);
rtl_arena_destructor (arena);
- VALGRIND_DESTROY_MEMPOOL(arena);
rtl_arena_free (gp_arena_arena, arena, sizeof(rtl_arena_type));
}
}
@@ -1033,10 +1030,6 @@ SAL_CALL rtl_arena_alloc (
rtl_arena_hash_insert (arena, segment);
- /* DEBUG ONLY: mark allocated, undefined */
- OSL_DEBUG_ONLY(memset((void*)(segment->m_addr), 0x77777777, segment->m_size));
- VALGRIND_MEMPOOL_ALLOC(arena, segment->m_addr, segment->m_size);
-
(*pSize) = segment->m_size;
addr = (void*)(segment->m_addr);
}
@@ -1086,11 +1079,6 @@ SAL_CALL rtl_arena_free (
{
rtl_arena_segment_type *next, *prev;
- /* DEBUG ONLY: mark unallocated, undefined */
- VALGRIND_MEMPOOL_FREE(arena, segment->m_addr);
- /* OSL_DEBUG_ONLY() */ RTL_VALGRIND_IGNORE_VAL VALGRIND_MAKE_MEM_UNDEFINED(segment->m_addr, segment->m_size);
- OSL_DEBUG_ONLY(memset((void*)(segment->m_addr), 0x33333333, segment->m_size));
-
/* coalesce w/ adjacent free segment(s) */
rtl_arena_segment_coalesce (arena, segment);
@@ -1266,7 +1254,6 @@ rtl_arena_init()
static rtl_arena_type g_machdep_arena;
assert(gp_machdep_arena == 0);
- VALGRIND_CREATE_MEMPOOL(&g_machdep_arena, 0, 0);
rtl_arena_constructor (&g_machdep_arena);
gp_machdep_arena = rtl_arena_activate (
@@ -1283,7 +1270,6 @@ rtl_arena_init()
static rtl_arena_type g_default_arena;
assert(gp_default_arena == 0);
- VALGRIND_CREATE_MEMPOOL(&g_default_arena, 0, 0);
rtl_arena_constructor (&g_default_arena);
gp_default_arena = rtl_arena_activate (
@@ -1302,7 +1288,6 @@ rtl_arena_init()
static rtl_arena_type g_arena_arena;
assert(gp_arena_arena == 0);
- VALGRIND_CREATE_MEMPOOL(&g_arena_arena, 0, 0);
rtl_arena_constructor (&g_arena_arena);
gp_arena_arena = rtl_arena_activate (
diff --git a/sal/rtl/source/alloc_cache.cxx b/sal/rtl/source/alloc_cache.cxx
index 102f772..e5352bb 100644
--- a/sal/rtl/source/alloc_cache.cxx
+++ b/sal/rtl/source/alloc_cache.cxx
@@ -483,11 +483,6 @@ rtl_cache_slab_alloc (
addr = (void*)rtl_cache_hash_insert (cache, bufctl);
else
addr = bufctl;
-
- /* DEBUG ONLY: mark allocated, undefined */
- /* OSL_DEBUG_ONLY() */ RTL_VALGRIND_IGNORE_VAL VALGRIND_MAKE_MEM_UNDEFINED(addr, cache->m_type_size);
- OSL_DEBUG_ONLY(memset(addr, 0x77777777, cache->m_type_size));
- VALGRIND_MEMPOOL_ALLOC(cache, addr, cache->m_type_size);
}
RTL_MEMORY_LOCK_RELEASE(&(cache->m_slab_lock));
@@ -510,11 +505,6 @@ rtl_cache_slab_free (
RTL_MEMORY_LOCK_ACQUIRE(&(cache->m_slab_lock));
- /* DEBUG ONLY: mark unallocated, undefined */
- VALGRIND_MEMPOOL_FREE(cache, addr);
- /* OSL_DEBUG_ONLY() */ RTL_VALGRIND_IGNORE_VAL VALGRIND_MAKE_MEM_UNDEFINED(addr, cache->m_type_size);
- OSL_DEBUG_ONLY(memset(addr, 0x33333333, cache->m_type_size));
-
/* determine slab from addr */
if (cache->m_features & RTL_CACHE_FEATURE_HASH)
{
@@ -611,13 +601,8 @@ rtl_cache_magazine_clear (
void * obj = mag->m_objects[mag->m_mag_used - 1];
mag->m_objects[mag->m_mag_used - 1] = 0;
- /* DEBUG ONLY: mark cached object allocated, undefined */
- VALGRIND_MEMPOOL_ALLOC(cache, obj, cache->m_type_size);
if (cache->m_destructor != 0)
{
- /* DEBUG ONLY: keep constructed object defined */
- RTL_VALGRIND_IGNORE_VAL VALGRIND_MAKE_MEM_DEFINED(obj, cache->m_type_size);
-
/* destruct object */
(cache->m_destructor)(obj, cache->m_userarg);
}
@@ -1107,7 +1092,6 @@ try_alloc:
if (result != 0)
{
rtl_cache_type * cache = result;
- VALGRIND_CREATE_MEMPOOL(cache, 0, 0);
(void) rtl_cache_constructor (cache);
if (!source)
@@ -1135,7 +1119,6 @@ try_alloc:
/* activation failed */
rtl_cache_deactivate (cache);
rtl_cache_destructor (cache);
- VALGRIND_DESTROY_MEMPOOL(cache);
rtl_arena_free (gp_cache_arena, cache, size);
}
}
@@ -1161,7 +1144,6 @@ void SAL_CALL rtl_cache_destroy (
{
rtl_cache_deactivate (cache);
rtl_cache_destructor (cache);
- VALGRIND_DESTROY_MEMPOOL(cache);
rtl_arena_free (gp_cache_arena, cache, sizeof(rtl_cache_type));
}
}
@@ -1204,14 +1186,6 @@ SAL_CALL rtl_cache_alloc (
if ((curr != 0) && (curr->m_mag_used > 0))
{
obj = curr->m_objects[--curr->m_mag_used];
-#if defined(HAVE_VALGRIND_MEMCHECK_H)
- VALGRIND_MEMPOOL_ALLOC(cache, obj, cache->m_type_size);
- if (cache->m_constructor != 0)
- {
- /* keep constructed object defined */
- RTL_VALGRIND_IGNORE_VAL VALGRIND_MAKE_MEM_DEFINED(obj, cache->m_type_size);
- }
-#endif /* HAVE_VALGRIND_MEMCHECK_H */
cache->m_cpu_stats.m_alloc += 1;
RTL_MEMORY_LOCK_RELEASE(&(cache->m_depot_lock));
@@ -1289,9 +1263,6 @@ SAL_CALL rtl_cache_free (
if ((curr != 0) && (curr->m_mag_used < curr->m_mag_size))
{
curr->m_objects[curr->m_mag_used++] = obj;
-#if defined(HAVE_VALGRIND_MEMCHECK_H)
- VALGRIND_MEMPOOL_FREE(cache, obj);
-#endif /* HAVE_VALGRIND_MEMCHECK_H */
cache->m_cpu_stats.m_free += 1;
RTL_MEMORY_LOCK_RELEASE(&(cache->m_depot_lock));
@@ -1604,7 +1575,6 @@ rtl_cache_init()
static rtl_cache_type g_cache_magazine_cache;
assert(gp_cache_magazine_cache == 0);
- VALGRIND_CREATE_MEMPOOL(&g_cache_magazine_cache, 0, 0);
(void) rtl_cache_constructor (&g_cache_magazine_cache);
gp_cache_magazine_cache = rtl_cache_activate (
@@ -1629,7 +1599,6 @@ rtl_cache_init()
static rtl_cache_type g_cache_slab_cache;
assert(gp_cache_slab_cache == 0);
- VALGRIND_CREATE_MEMPOOL(&g_cache_slab_cache, 0, 0);
(void) rtl_cache_constructor (&g_cache_slab_cache);
gp_cache_slab_cache = rtl_cache_activate (
@@ -1651,7 +1620,6 @@ rtl_cache_init()
static rtl_cache_type g_cache_bufctl_cache;
assert(gp_cache_bufctl_cache == 0);
- VALGRIND_CREATE_MEMPOOL(&g_cache_bufctl_cache, 0, 0);
(void) rtl_cache_constructor (&g_cache_bufctl_cache);
gp_cache_bufctl_cache = rtl_cache_activate (
@@ -1689,21 +1657,18 @@ rtl_cache_fini()
cache = gp_cache_bufctl_cache, gp_cache_bufctl_cache = 0;
rtl_cache_deactivate (cache);
rtl_cache_destructor (cache);
- VALGRIND_DESTROY_MEMPOOL(cache);
}
if (gp_cache_slab_cache != 0)
{
cache = gp_cache_slab_cache, gp_cache_slab_cache = 0;
rtl_cache_deactivate (cache);
rtl_cache_destructor (cache);
- VALGRIND_DESTROY_MEMPOOL(cache);
}
if (gp_cache_magazine_cache != 0)
{
cache = gp_cache_magazine_cache, gp_cache_magazine_cache = 0;
rtl_cache_deactivate (cache);
rtl_cache_destructor (cache);
- VALGRIND_DESTROY_MEMPOOL(cache);
}
if (gp_cache_arena != 0)
{
@@ -1735,6 +1700,4 @@ rtl_cache_fini()
// SAL_INFO("sal", "rtl_cache_fini completed");
}
-/* ================================================================= */
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/rtl/source/alloc_impl.hxx b/sal/rtl/source/alloc_impl.hxx
index 4452f19..4d6e27b 100644
--- a/sal/rtl/source/alloc_impl.hxx
+++ b/sal/rtl/source/alloc_impl.hxx
@@ -235,37 +235,6 @@ typedef CRITICAL_SECTION rtl_memory_lock_type;
#define RTL_CACHE_FLAG_NOMAGAZINE (1 << 13) /* w/o magazine layer */
#define RTL_CACHE_FLAG_QUANTUMCACHE (2 << 13) /* used as arena quantum cache */
-
-/** Valgrind support macros.
- */
-#if !defined(HAVE_MEMCHECK_H) || (OSL_DEBUG_LEVEL == 0)
-#if !defined(NVALGRIND)
-#define NVALGRIND 1
-#endif /* ! NVALGRIND */
-#endif /* ! HAVE_MEMCHECK_H || (OSL_DEBUG_LEVEL == 0) */
-
-#if defined(NVALGRIND)
-#define VALGRIND_MAKE_MEM_UNDEFINED(addr, size)
-#define VALGRIND_MAKE_MEM_DEFINED(addr, size)
-#define VALGRIND_MALLOCLIKE_BLOCK(addr, sizeB, rzB, is_zeroed)
-#define VALGRIND_FREELIKE_BLOCK(addr, rzB)
-#define VALGRIND_CREATE_MEMPOOL(pool, rzB, is_zeroed)
-#define VALGRIND_DESTROY_MEMPOOL(pool)
-#define VALGRIND_MEMPOOL_ALLOC(pool, addr, size)
-#define VALGRIND_MEMPOOL_FREE(pool, addr)
-#define RTL_VALGRIND_IGNORE_VAL
-#elif defined(HAVE_MEMCHECK_H)
-#include <memcheck.h>
-/* valgrind macros contain unused variables... */
-#define GCC_VERSION (__GNUC__ * 10000 \
- + __GNUC_MINOR__ * 100 \
- + __GNUC_PATCHLEVEL__)
-#if GCC_VERSION >= 40600 && !defined __clang__
-#pragma GCC diagnostic warning "-Wunused-but-set-variable"
-#endif
-#define RTL_VALGRIND_IGNORE_VAL (void)
-#endif /* NVALGRIND || HAVE_MEMCHECK_H */
-
typedef enum { AMode_CUSTOM, AMode_SYSTEM, AMode_UNSET } AllocMode;
extern AllocMode alloc_mode;
commit 043ddca9c563526f66d4afba0b052814a821f08f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 28 12:08:09 2012 +0100
drop unused global rtl::OUStrings
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index b4042ab..496d239 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -81,8 +81,6 @@ static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
static const char ITEM_DESCRIPTOR_CONTAINER[] = "ItemDescriptorContainer";
static const char ITEM_DESCRIPTOR_LABEL[] = "Label";
-static const ::rtl::OUString MENU_SUBMENU(RTL_CONSTASCII_USTRINGPARAM("..."));
-
static const char XDG_CONFIG_PART[] = "/.config";
::rtl::OUString retrieveLabelFromCommand(const ::rtl::OUString& sCommand, const ::rtl::OUString& sModuleIdentifier)
commit 8757c9c462ba690de60602404ef2e9e99702f0b4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 28 12:07:30 2012 +0100
remove static OUStrings from static_initialization_and_destruction chain
diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh
index 2d42613..9a3f6f9 100755
--- a/desktop/scripts/soffice.sh
+++ b/desktop/scripts/soffice.sh
@@ -108,7 +108,7 @@ for arg in $@ $VALGRINDOPT ; do
valgrind_skip='--trace-children-skip=*/java'
fi
# finally set the valgrind check
- VALGRINDCHECK="valgrind --tool=$VALGRIND --trace-children=yes $valgrind_skip --num-callers=50 --error-exitcode=101"
+ VALGRINDCHECK="valgrind --tool=$VALGRIND --trace-children=yes $valgrind_skip --num-callers=50 --error-limit=no --error-exitcode=101"
checks="c$checks"
if [ "$VALGRIND" = "memcheck" ] ; then
export G_SLICE=always-malloc
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index dd73e3a..b4042ab 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -77,14 +77,11 @@ using ::rtl::OString;
namespace desktop {
-static const ::rtl::OUString ITEM_DESCRIPTOR_COMMANDURL(RTL_CONSTASCII_USTRINGPARAM("CommandURL"));
-static const ::rtl::OUString ITEM_DESCRIPTOR_CONTAINER(RTL_CONSTASCII_USTRINGPARAM("ItemDescriptorContainer"));
-static const ::rtl::OUString ITEM_DESCRIPTOR_LABEL(RTL_CONSTASCII_USTRINGPARAM("Label"));
+static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
+static const char ITEM_DESCRIPTOR_CONTAINER[] = "ItemDescriptorContainer";
+static const char ITEM_DESCRIPTOR_LABEL[] = "Label";
-static const ::rtl::OUString MENU_SEPERATOR(RTL_CONSTASCII_USTRINGPARAM(" | "));
static const ::rtl::OUString MENU_SUBMENU(RTL_CONSTASCII_USTRINGPARAM("..."));
-static const ::rtl::OUString MIGRATION_STAMP_NAME(RTL_CONSTASCII_USTRINGPARAM("/MIGRATED"));
-
static const char XDG_CONFIG_PART[] = "/.config";
@@ -184,6 +181,7 @@ static const char XDG_CONFIG_PART[] = "/.config";
bool MigrationImpl::alreadyMigrated()
{
+ rtl::OUString MIGRATION_STAMP_NAME(RTL_CONSTASCII_USTRINGPARAM("/MIGRATED"));
rtl::OUString aStr = m_aInfo.userdata + MIGRATION_STAMP_NAME;
File aFile(aStr);
// create migration stamp, and/or check its existence
@@ -1069,6 +1067,8 @@ void MigrationImpl::compareOldAndNewConfig(const ::rtl::OUString& sParent,
const uno::Reference< container::XIndexContainer >& xIndexNew,
const ::rtl::OUString& sResourceURL)
{
+ const ::rtl::OUString MENU_SEPERATOR(RTL_CONSTASCII_USTRINGPARAM(" | "));
+
::std::vector< MigrationItem > vOldItems;
::std::vector< MigrationItem > vNewItems;
uno::Sequence< beans::PropertyValue > aProp;
@@ -1082,9 +1082,9 @@ void MigrationImpl::compareOldAndNewConfig(const ::rtl::OUString& sParent,
{
for(int i=0; i<aProp.getLength(); ++i)
{
- if (aProp[i].Name.equals(ITEM_DESCRIPTOR_COMMANDURL))
+ if (aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_COMMANDURL)))
aProp[i].Value >>= aMigrationItem.m_sCommandURL;
- else if (aProp[i].Name.equals(ITEM_DESCRIPTOR_CONTAINER))
+ else if (aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_CONTAINER)))
aProp[i].Value >>= aMigrationItem.m_xPopupMenu;
}
@@ -1100,9 +1100,9 @@ void MigrationImpl::compareOldAndNewConfig(const ::rtl::OUString& sParent,
{
for(int i=0; i<aProp.getLength(); ++i)
{
- if (aProp[i].Name.equals(ITEM_DESCRIPTOR_COMMANDURL))
+ if (aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_COMMANDURL)))
aProp[i].Value >>= aMigrationItem.m_sCommandURL;
- else if (aProp[i].Name.equals(ITEM_DESCRIPTOR_CONTAINER))
+ else if (aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_CONTAINER)))
aProp[i].Value >>= aMigrationItem.m_xPopupMenu;
}
@@ -1211,11 +1211,11 @@ void MigrationImpl::mergeOldToNewVersion(const uno::Reference< ui::XUIConfigurat
for (sal_Int32 j=0; j<aPropSeq.getLength(); ++j)
{
::rtl::OUString sPropName = aPropSeq[j].Name;
- if (sPropName.equals(ITEM_DESCRIPTOR_COMMANDURL))
+ if (sPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_COMMANDURL)))
aPropSeq[j].Value >>= sCommandURL;
- else if (sPropName.equals(ITEM_DESCRIPTOR_LABEL))
+ else if (sPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_LABEL)))
aPropSeq[j].Value >>= sLabel;
- else if (sPropName.equals(ITEM_DESCRIPTOR_CONTAINER))
+ else if (sPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_CONTAINER)))
aPropSeq[j].Value >>= xChild;
}
@@ -1232,11 +1232,11 @@ void MigrationImpl::mergeOldToNewVersion(const uno::Reference< ui::XUIConfigurat
{
uno::Sequence< beans::PropertyValue > aPropSeq(3);
- aPropSeq[0].Name = ITEM_DESCRIPTOR_COMMANDURL;
+ aPropSeq[0].Name = rtl::OUString(ITEM_DESCRIPTOR_COMMANDURL);
aPropSeq[0].Value <<= it->m_sCommandURL;
- aPropSeq[1].Name = ITEM_DESCRIPTOR_LABEL;
+ aPropSeq[1].Name = rtl::OUString(ITEM_DESCRIPTOR_LABEL);
aPropSeq[1].Value <<= retrieveLabelFromCommand(it->m_sCommandURL, sModuleIdentifier);
- aPropSeq[2].Name = ITEM_DESCRIPTOR_CONTAINER;
+ aPropSeq[2].Name = rtl::OUString(ITEM_DESCRIPTOR_CONTAINER);
aPropSeq[2].Value <<= it->m_xPopupMenu;
if (it->m_sPrevSibling.isEmpty())
@@ -1252,7 +1252,7 @@ void MigrationImpl::mergeOldToNewVersion(const uno::Reference< ui::XUIConfigurat
xTemp->getByIndex(i) >>= aTempPropSeq;
for (sal_Int32 j=0; j<aTempPropSeq.getLength(); ++j)
{
- if (aTempPropSeq[j].Name.equals(ITEM_DESCRIPTOR_COMMANDURL))
+ if (aTempPropSeq[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_COMMANDURL)))
{
aTempPropSeq[j].Value >>= sCmd;
break;
commit 3a5bc9c8795f72ed10599237d6cd0cfe6ca385a3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 28 12:01:19 2012 +0100
remove static OUStrings from static_initialization_and_destruction chain
diff --git a/unotools/source/config/historyoptions.cxx b/unotools/source/config/historyoptions.cxx
index 47a3cb0..2045074 100644
--- a/unotools/source/config/historyoptions.cxx
+++ b/unotools/source/config/historyoptions.cxx
@@ -68,21 +68,21 @@ namespace {
static const ::sal_Int32 s_nOffsetTitle = 2;
static const ::sal_Int32 s_nOffsetPassword = 3;
- static const ::rtl::OUString s_sCommonHistory(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common/History"));
- static const ::rtl::OUString s_sHistories(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Histories/Histories"));
- static const ::rtl::OUString s_sPickListSize(RTL_CONSTASCII_USTRINGPARAM("PickListSize"));
- static const ::rtl::OUString s_sURLHistorySize(RTL_CONSTASCII_USTRINGPARAM("Size"));
- static const ::rtl::OUString s_sHelpBookmarksSize(RTL_CONSTASCII_USTRINGPARAM("HelpBookmarkSize"));
- static const ::rtl::OUString s_sPickList(RTL_CONSTASCII_USTRINGPARAM("PickList"));
- static const ::rtl::OUString s_sURLHistory(RTL_CONSTASCII_USTRINGPARAM("URLHistory"));
- static const ::rtl::OUString s_sHelpBookmarks(RTL_CONSTASCII_USTRINGPARAM("HelpBookmarks"));
- static const ::rtl::OUString s_sItemList(RTL_CONSTASCII_USTRINGPARAM("ItemList"));
- static const ::rtl::OUString s_sOrderList(RTL_CONSTASCII_USTRINGPARAM("OrderList"));
- static const ::rtl::OUString s_sHistoryItemRef(RTL_CONSTASCII_USTRINGPARAM("HistoryItemRef"));
- static const ::rtl::OUString s_sURL(RTL_CONSTASCII_USTRINGPARAM("URL"));
- static const ::rtl::OUString s_sFilter(RTL_CONSTASCII_USTRINGPARAM("Filter"));
- static const ::rtl::OUString s_sTitle(RTL_CONSTASCII_USTRINGPARAM("Title"));
- static const ::rtl::OUString s_sPassword(RTL_CONSTASCII_USTRINGPARAM("Password"));
+ const char s_sCommonHistory[] = "org.openoffice.Office.Common/History";
+ const char s_sHistories[] = "org.openoffice.Office.Histories/Histories";
+ const char s_sPickListSize[] = "PickListSize";
+ const char s_sURLHistorySize[] = "Size";
+ const char s_sHelpBookmarksSize[] = "HelpBookmarkSize";
+ const char s_sPickList[] = "PickList";
+ const char s_sURLHistory[] = "URLHistory";
+ const char s_sHelpBookmarks[] = "HelpBookmarks";
+ const char s_sItemList[] = "ItemList";
+ const char s_sOrderList[] = "OrderList";
+ const char s_sHistoryItemRef[] = "HistoryItemRef";
+ const char s_sURL[] = "URL";
+ const char s_sFilter[] = "Filter";
+ const char s_sTitle[] = "Title";
+ const char s_sPassword[] = "Password";
}
struct IMPL_THistoryItem
@@ -150,14 +150,14 @@ SvtHistoryOptions_Impl::SvtHistoryOptions_Impl()
m_xCfg = Reference< css::container::XNameAccess > (
::comphelper::ConfigurationHelper::openConfig(
::comphelper::getProcessServiceFactory(),
- s_sHistories,
+ rtl::OUString(s_sHistories),
::comphelper::ConfigurationHelper::E_STANDARD),
css::uno::UNO_QUERY );
m_xCommonXCU = Reference< css::container::XNameAccess > (
::comphelper::ConfigurationHelper::openConfig(
::comphelper::getProcessServiceFactory(),
- s_sCommonHistory,
+ rtl::OUString(s_sCommonHistory),
::comphelper::ConfigurationHelper::E_STANDARD),
css::uno::UNO_QUERY );
}
@@ -195,15 +195,15 @@ sal_uInt32 SvtHistoryOptions_Impl::GetSize( EHistoryType eHistory )
switch( eHistory )
{
case ePICKLIST:
- xListAccess->getPropertyValue(s_sPickListSize) >>= nSize;
+ xListAccess->getPropertyValue(rtl::OUString(s_sPickListSize)) >>= nSize;
break;
case eHISTORY:
- xListAccess->getPropertyValue(s_sURLHistorySize) >>= nSize;
+ xListAccess->getPropertyValue(rtl::OUString(s_sURLHistorySize)) >>= nSize;
break;
case eHELPBOOKMARKS:
- xListAccess->getPropertyValue(s_sHelpBookmarksSize) >>= nSize;
+ xListAccess->getPropertyValue(rtl::OUString(s_sHelpBookmarksSize)) >>= nSize;
break;
default:
@@ -231,15 +231,15 @@ void SvtHistoryOptions_Impl::impl_truncateList ( EHistoryType eHistory, sal_uInt
switch( eHistory )
{
case ePICKLIST:
- m_xCfg->getByName(s_sPickList) >>= xList;
+ m_xCfg->getByName(rtl::OUString(s_sPickList)) >>= xList;
break;
case eHISTORY:
- m_xCfg->getByName(s_sURLHistory) >>= xList;
+ m_xCfg->getByName(rtl::OUString(s_sURLHistory)) >>= xList;
break;
case eHELPBOOKMARKS:
- m_xCfg->getByName(s_sHelpBookmarks) >>= xList;
+ m_xCfg->getByName(rtl::OUString(s_sHelpBookmarks)) >>= xList;
break;
default:
@@ -251,8 +251,8 @@ void SvtHistoryOptions_Impl::impl_truncateList ( EHistoryType eHistory, sal_uInt
if ( ! xList.is())
return;
- xList->getByName(s_sOrderList) >>= xOrderList;
- xList->getByName(s_sItemList) >>= xItemList;
+ xList->getByName(rtl::OUString(s_sOrderList)) >>= xOrderList;
+ xList->getByName(rtl::OUString(s_sItemList)) >>= xItemList;
const sal_uInt32 nLength = xOrderList->getElementNames().getLength();
if (nSize < nLength)
@@ -262,7 +262,7 @@ void SvtHistoryOptions_Impl::impl_truncateList ( EHistoryType eHistory, sal_uInt
::rtl::OUString sTmp;
const ::rtl::OUString sRemove = ::rtl::OUString::valueOf((sal_Int32)i);
xOrderList->getByName(sRemove) >>= xSet;
- xSet->getPropertyValue(s_sHistoryItemRef) >>= sTmp;
+ xSet->getPropertyValue(rtl::OUString(s_sHistoryItemRef)) >>= sTmp;
xItemList->removeByName(sTmp);
xOrderList->removeByName(sRemove);
}
@@ -292,19 +292,19 @@ void SvtHistoryOptions_Impl::Clear( EHistoryType eHistory )
{
case ePICKLIST:
{
- m_xCfg->getByName(s_sPickList) >>= xListAccess;
+ m_xCfg->getByName(rtl::OUString(s_sPickList)) >>= xListAccess;
break;
}
case eHISTORY:
{
- m_xCfg->getByName(s_sURLHistory) >>= xListAccess;
+ m_xCfg->getByName(rtl::OUString(s_sURLHistory)) >>= xListAccess;
break;
}
case eHELPBOOKMARKS:
{
- m_xCfg->getByName(s_sHelpBookmarks) >>= xListAccess;
+ m_xCfg->getByName(rtl::OUString(s_sHelpBookmarks)) >>= xListAccess;
break;
}
@@ -315,14 +315,14 @@ void SvtHistoryOptions_Impl::Clear( EHistoryType eHistory )
if (xListAccess.is())
{
// clear ItemList
- xListAccess->getByName(s_sItemList) >>= xNode ;
+ xListAccess->getByName(rtl::OUString(s_sItemList)) >>= xNode ;
lOrders = xNode->getElementNames();
const sal_Int32 nLength = lOrders.getLength();
for(sal_Int32 i=0; i<nLength; ++i)
xNode->removeByName(lOrders[i]);
// clear OrderList
- xListAccess->getByName(s_sOrderList) >>= xNode ;
+ xListAccess->getByName(rtl::OUString(s_sOrderList)) >>= xNode ;
lOrders = xNode->getElementNames();
for(sal_Int32 j=0; j<nLength; ++j)
xNode->removeByName(lOrders[j]);
@@ -364,19 +364,19 @@ Sequence< Sequence< PropertyValue > > SvtHistoryOptions_Impl::GetList( EHistoryT
{
case ePICKLIST:
{
- m_xCfg->getByName(s_sPickList) >>= xListAccess;
+ m_xCfg->getByName(rtl::OUString(s_sPickList)) >>= xListAccess;
break;
}
case eHISTORY:
{
- m_xCfg->getByName(s_sURLHistory) >>= xListAccess;
+ m_xCfg->getByName(rtl::OUString(s_sURLHistory)) >>= xListAccess;
break;
}
case eHELPBOOKMARKS:
{
- m_xCfg->getByName(s_sHelpBookmarks) >>= xListAccess;
+ m_xCfg->getByName(rtl::OUString(s_sHelpBookmarks)) >>= xListAccess;
break;
}
@@ -386,8 +386,8 @@ Sequence< Sequence< PropertyValue > > SvtHistoryOptions_Impl::GetList( EHistoryT
if (xListAccess.is())
{
- xListAccess->getByName(s_sItemList) >>= xItemList;
- xListAccess->getByName(s_sOrderList) >>= xOrderList;
+ xListAccess->getByName(rtl::OUString(s_sItemList)) >>= xItemList;
+ xListAccess->getByName(rtl::OUString(s_sOrderList)) >>= xOrderList;
const sal_Int32 nLength = xOrderList->getElementNames().getLength();
Sequence< Sequence< PropertyValue > > aRet(nLength);
@@ -396,13 +396,13 @@ Sequence< Sequence< PropertyValue > > SvtHistoryOptions_Impl::GetList( EHistoryT
{
::rtl::OUString sUrl;
xOrderList->getByName(::rtl::OUString::valueOf(nItem)) >>= xSet;
- xSet->getPropertyValue(s_sHistoryItemRef) >>= sUrl;
+ xSet->getPropertyValue(rtl::OUString(s_sHistoryItemRef)) >>= sUrl;
xItemList->getByName(sUrl) >>= xSet;
seqProperties[s_nOffsetURL ].Value <<= sUrl;
- xSet->getPropertyValue(s_sFilter) >>= seqProperties[s_nOffsetFilter ].Value;
- xSet->getPropertyValue(s_sTitle) >>= seqProperties[s_nOffsetTitle ].Value;
- xSet->getPropertyValue(s_sPassword) >>= seqProperties[s_nOffsetPassword ].Value;
+ xSet->getPropertyValue(rtl::OUString(s_sFilter)) >>= seqProperties[s_nOffsetFilter ].Value;
+ xSet->getPropertyValue(rtl::OUString(s_sTitle)) >>= seqProperties[s_nOffsetTitle ].Value;
+ xSet->getPropertyValue(rtl::OUString(s_sPassword)) >>= seqProperties[s_nOffsetPassword ].Value;
aRet[nItem] = seqProperties;
}
seqReturn = aRet;
@@ -435,19 +435,19 @@ void SvtHistoryOptions_Impl::AppendItem( EHistoryType eHistory ,
{
case ePICKLIST:
{
- m_xCfg->getByName(s_sPickList) >>= xListAccess;
+ m_xCfg->getByName(rtl::OUString(s_sPickList)) >>= xListAccess;
nMaxSize = GetSize(ePICKLIST);
}
break;
case eHISTORY:
{
- m_xCfg->getByName(s_sURLHistory) >>= xListAccess;
+ m_xCfg->getByName(rtl::OUString(s_sURLHistory)) >>= xListAccess;
nMaxSize = GetSize(eHISTORY);
}
break;
case eHELPBOOKMARKS:
{
- m_xCfg->getByName(s_sHelpBookmarks) >>= xListAccess;
+ m_xCfg->getByName(rtl::OUString(s_sHelpBookmarks)) >>= xListAccess;
nMaxSize = GetSize(eHELPBOOKMARKS);
}
break;
@@ -464,10 +464,11 @@ void SvtHistoryOptions_Impl::AppendItem( EHistoryType eHistory ,
try
{
- xListAccess->getByName(s_sItemList) >>= xItemList;
- xListAccess->getByName(s_sOrderList) >>= xOrderList;
+ xListAccess->getByName(rtl::OUString(s_sItemList)) >>= xItemList;
+ xListAccess->getByName(rtl::OUString(s_sOrderList)) >>= xOrderList;
sal_Int32 nLength = xOrderList->getElementNames().getLength();
+ rtl::OUString sHistoryItemRef(s_sHistoryItemRef);
// The item to be appended is already existing!
if (xItemList->hasByName(sURL))
{
@@ -475,13 +476,13 @@ void SvtHistoryOptions_Impl::AppendItem( EHistoryType eHistory ,
{
::rtl::OUString sTmp;
xOrderList->getByName(::rtl::OUString::valueOf(i)) >>= xSet;
- xSet->getPropertyValue(s_sHistoryItemRef) >>= sTmp;
+ xSet->getPropertyValue(sHistoryItemRef) >>= sTmp;
if(sURL == sTmp)
{
::rtl::OUString sFind;
xOrderList->getByName( ::rtl::OUString::valueOf(i) ) >>= xSet;
- xSet->getPropertyValue(s_sHistoryItemRef) >>= sFind;
+ xSet->getPropertyValue(sHistoryItemRef) >>= sFind;
for (sal_Int32 j=i-1; j>=0; --j)
{
css::uno::Reference< css::beans::XPropertySet > xPrevSet;
@@ -490,11 +491,11 @@ void SvtHistoryOptions_Impl::AppendItem( EHistoryType eHistory ,
xOrderList->getByName( ::rtl::OUString::valueOf(j) ) >>= xNextSet;
::rtl::OUString sTemp;
- xNextSet->getPropertyValue(s_sHistoryItemRef) >>= sTemp;
- xPrevSet->setPropertyValue(s_sHistoryItemRef, css::uno::makeAny(sTemp));
+ xNextSet->getPropertyValue(sHistoryItemRef) >>= sTemp;
+ xPrevSet->setPropertyValue(sHistoryItemRef, css::uno::makeAny(sTemp));
}
xOrderList->getByName( ::rtl::OUString::valueOf((sal_Int32)0) ) >>= xSet;
- xSet->setPropertyValue(s_sHistoryItemRef, css::uno::makeAny(sFind));
+ xSet->setPropertyValue(sHistoryItemRef, css::uno::makeAny(sFind));
::comphelper::ConfigurationHelper::flush(m_xCfg);
break;
@@ -515,7 +516,7 @@ void SvtHistoryOptions_Impl::AppendItem( EHistoryType eHistory ,
{
::rtl::OUString sRemove;
xOrderList->getByName(::rtl::OUString::valueOf(nLength-1)) >>= xSet;
- xSet->getPropertyValue(s_sHistoryItemRef) >>= sRemove;
+ xSet->getPropertyValue(sHistoryItemRef) >>= sRemove;
xItemList->removeByName(sRemove);
}
if ( nLength != nMaxSize )
@@ -530,20 +531,20 @@ void SvtHistoryOptions_Impl::AppendItem( EHistoryType eHistory ,
xOrderList->getByName( ::rtl::OUString::valueOf(j) ) >>= xPrevSet;
xOrderList->getByName( ::rtl::OUString::valueOf(j-1) ) >>= xNextSet;
::rtl::OUString sTemp;
- xNextSet->getPropertyValue(s_sHistoryItemRef) >>= sTemp;
- xPrevSet->setPropertyValue(s_sHistoryItemRef, css::uno::makeAny(sTemp));
+ xNextSet->getPropertyValue(sHistoryItemRef) >>= sTemp;
+ xPrevSet->setPropertyValue(sHistoryItemRef, css::uno::makeAny(sTemp));
}
xOrderList->getByName( ::rtl::OUString::valueOf((sal_Int32)0) ) >>= xSet;
- xSet->setPropertyValue(s_sHistoryItemRef, css::uno::makeAny(sURL));
+ xSet->setPropertyValue(sHistoryItemRef, css::uno::makeAny(sURL));
// Append the item to ItemList.
xFac = css::uno::Reference< css::lang::XSingleServiceFactory >(xItemList, css::uno::UNO_QUERY);
xInst = xFac->createInstance();
xItemList->insertByName(sURL, css::uno::makeAny(xInst));
xSet = css::uno::Reference< css::beans::XPropertySet >(xInst, css::uno::UNO_QUERY);
- xSet->setPropertyValue(s_sFilter, css::uno::makeAny(sFilter));
- xSet->setPropertyValue(s_sTitle, css::uno::makeAny(sTitle));
- xSet->setPropertyValue(s_sPassword, css::uno::makeAny(sPassword));
+ xSet->setPropertyValue(rtl::OUString(s_sFilter), css::uno::makeAny(sFilter));
+ xSet->setPropertyValue(rtl::OUString(s_sTitle), css::uno::makeAny(sTitle));
+ xSet->setPropertyValue(rtl::OUString(s_sPassword), css::uno::makeAny(sPassword));
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
commit 28ca0e3455149efc031df60cae60be7bf2976bb9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 28 11:56:59 2012 +0100
fold historyoptions_const.hxx into historyoptions.cxx
diff --git a/unotools/inc/unotools/historyoptions_const.hxx b/unotools/inc/unotools/historyoptions_const.hxx
deleted file mode 100644
index 577bf93..0000000
--- a/unotools/inc/unotools/historyoptions_const.hxx
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-
-#ifndef INCLUDE_CONFIGITEMS_HISTORYOPTIONS_CONST_HXX
-#define INCLUDE_CONFIGITEMS_HISTORYOPTIONS_CONST_HXX
-
-#include <rtl/ustring.hxx>
-
-namespace
-{
- static const ::rtl::OUString s_sCommonHistory(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common/History"));
- static const ::rtl::OUString s_sHistories(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Histories/Histories"));
- static const ::rtl::OUString s_sPickListSize(RTL_CONSTASCII_USTRINGPARAM("PickListSize"));
- static const ::rtl::OUString s_sURLHistorySize(RTL_CONSTASCII_USTRINGPARAM("Size"));
- static const ::rtl::OUString s_sHelpBookmarksSize(RTL_CONSTASCII_USTRINGPARAM("HelpBookmarkSize"));
- static const ::rtl::OUString s_sPickList(RTL_CONSTASCII_USTRINGPARAM("PickList"));
- static const ::rtl::OUString s_sURLHistory(RTL_CONSTASCII_USTRINGPARAM("URLHistory"));
- static const ::rtl::OUString s_sHelpBookmarks(RTL_CONSTASCII_USTRINGPARAM("HelpBookmarks"));
- static const ::rtl::OUString s_sItemList(RTL_CONSTASCII_USTRINGPARAM("ItemList"));
- static const ::rtl::OUString s_sOrderList(RTL_CONSTASCII_USTRINGPARAM("OrderList"));
- static const ::rtl::OUString s_sHistoryItemRef(RTL_CONSTASCII_USTRINGPARAM("HistoryItemRef"));
- static const ::rtl::OUString s_sURL(RTL_CONSTASCII_USTRINGPARAM("URL"));
- static const ::rtl::OUString s_sFilter(RTL_CONSTASCII_USTRINGPARAM("Filter"));
- static const ::rtl::OUString s_sTitle(RTL_CONSTASCII_USTRINGPARAM("Title"));
- static const ::rtl::OUString s_sPassword(RTL_CONSTASCII_USTRINGPARAM("Password"));
-}
-
-#endif // INCLUDE_CONFIGITEMS_HISTORYOPTIONS_CONST_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unotools/source/config/historyoptions.cxx b/unotools/source/config/historyoptions.cxx
index 57d490d..47a3cb0 100644
--- a/unotools/source/config/historyoptions.cxx
+++ b/unotools/source/config/historyoptions.cxx
@@ -28,7 +28,6 @@
#include <unotools/historyoptions.hxx>
-#include <unotools/historyoptions_const.hxx>
#include <unotools/configmgr.hxx>
#include <unotools/configitem.hxx>
#include <com/sun/star/uno/Any.hxx>
@@ -68,6 +67,22 @@ namespace {
static const ::sal_Int32 s_nOffsetFilter = 1;
static const ::sal_Int32 s_nOffsetTitle = 2;
static const ::sal_Int32 s_nOffsetPassword = 3;
+
+ static const ::rtl::OUString s_sCommonHistory(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common/History"));
+ static const ::rtl::OUString s_sHistories(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Histories/Histories"));
+ static const ::rtl::OUString s_sPickListSize(RTL_CONSTASCII_USTRINGPARAM("PickListSize"));
+ static const ::rtl::OUString s_sURLHistorySize(RTL_CONSTASCII_USTRINGPARAM("Size"));
+ static const ::rtl::OUString s_sHelpBookmarksSize(RTL_CONSTASCII_USTRINGPARAM("HelpBookmarkSize"));
+ static const ::rtl::OUString s_sPickList(RTL_CONSTASCII_USTRINGPARAM("PickList"));
+ static const ::rtl::OUString s_sURLHistory(RTL_CONSTASCII_USTRINGPARAM("URLHistory"));
+ static const ::rtl::OUString s_sHelpBookmarks(RTL_CONSTASCII_USTRINGPARAM("HelpBookmarks"));
+ static const ::rtl::OUString s_sItemList(RTL_CONSTASCII_USTRINGPARAM("ItemList"));
+ static const ::rtl::OUString s_sOrderList(RTL_CONSTASCII_USTRINGPARAM("OrderList"));
+ static const ::rtl::OUString s_sHistoryItemRef(RTL_CONSTASCII_USTRINGPARAM("HistoryItemRef"));
+ static const ::rtl::OUString s_sURL(RTL_CONSTASCII_USTRINGPARAM("URL"));
+ static const ::rtl::OUString s_sFilter(RTL_CONSTASCII_USTRINGPARAM("Filter"));
+ static const ::rtl::OUString s_sTitle(RTL_CONSTASCII_USTRINGPARAM("Title"));
+ static const ::rtl::OUString s_sPassword(RTL_CONSTASCII_USTRINGPARAM("Password"));
}
struct IMPL_THistoryItem
commit a320240389272f98b7be282a18e19e29c7b2392b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 28 11:55:42 2012 +0100
don't have to deliver historyoptions_const.hxx
diff --git a/unotools/Package_inc.mk b/unotools/Package_inc.mk
index a46b219..5925034 100644
--- a/unotools/Package_inc.mk
+++ b/unotools/Package_inc.mk
@@ -59,7 +59,6 @@ $(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/fontcfg.hxx,unotools
$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/fontcvt.hxx,unotools/fontcvt.hxx))
$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/fontdefs.hxx,unotools/fontdefs.hxx))
$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/fontoptions.hxx,unotools/fontoptions.hxx))
-$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/historyoptions_const.hxx,unotools/historyoptions_const.hxx))
$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/historyoptions.hxx,unotools/historyoptions.hxx))
$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/idhelper.hxx,unotools/idhelper.hxx))
$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/internaloptions.hxx,unotools/internaloptions.hxx))
commit 1594ed521299d14e8e5897212aa43aebbc02afdf
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 28 11:52:47 2012 +0100
remove static OUStrings from static_initialization_and_destruction chain
diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx
index ceb5311..f008fb2 100644
--- a/framework/source/classes/fwktabwindow.cxx
+++ b/framework/source/classes/fwktabwindow.cxx
@@ -50,9 +50,9 @@
#include <vcl/image.hxx>
#include <vcl/msgbox.hxx>
-const ::rtl::OUString SERVICENAME_WINPROVIDER(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.ContainerWindowProvider"));
-const ::rtl::OUString EXTERNAL_EVENT(RTL_CONSTASCII_USTRINGPARAM("external_event"));
-const ::rtl::OUString INITIALIZE_METHOD(RTL_CONSTASCII_USTRINGPARAM("initialize"));
+const char SERVICENAME_WINPROVIDER[] = "com.sun.star.awt.ContainerWindowProvider";
+const char EXTERNAL_EVENT[] = "external_event";
+const char INITIALIZE_METHOD[] = "initialize";
using namespace ::com::sun::star;
@@ -129,7 +129,7 @@ void FwkTabPage::CreateDialog()
}
}
- CallMethod( INITIALIZE_METHOD );
+ CallMethod( rtl::OUString(INITIALIZE_METHOD) );
}
catch ( const lang::IllegalArgumentException& )
{
@@ -150,7 +150,7 @@ sal_Bool FwkTabPage::CallMethod( const rtl::OUString& rMethod )
{
try
{
- bRet = m_xEventHdl->callHandlerMethod( m_xPage, uno::makeAny( rMethod ), EXTERNAL_EVENT );
+ bRet = m_xEventHdl->callHandlerMethod( m_xPage, uno::makeAny( rMethod ), rtl::OUString(EXTERNAL_EVENT) );
}
catch ( const uno::Exception& )
{
@@ -208,7 +208,7 @@ FwkTabWindow::FwkTabWindow( Window* pParent ) :
{
uno::Reference < lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
m_xWinProvider = uno::Reference < awt::XContainerWindowProvider >(
- xFactory->createInstance( SERVICENAME_WINPROVIDER ), uno::UNO_QUERY );
+ xFactory->createInstance( rtl::OUString(SERVICENAME_WINPROVIDER) ), uno::UNO_QUERY );
SetPaintTransparent(true);
commit 346a86afb3a323a34a31327aefe3b1b4b55256ed
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 28 11:52:14 2012 +0100
drop unused global rtl::OUStrings
diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx
index e46fc44..ceb5311 100644
--- a/framework/source/classes/fwktabwindow.cxx
+++ b/framework/source/classes/fwktabwindow.cxx
@@ -52,9 +52,7 @@
const ::rtl::OUString SERVICENAME_WINPROVIDER(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.ContainerWindowProvider"));
const ::rtl::OUString EXTERNAL_EVENT(RTL_CONSTASCII_USTRINGPARAM("external_event"));
-const ::rtl::OUString BACK_METHOD(RTL_CONSTASCII_USTRINGPARAM("back"));
const ::rtl::OUString INITIALIZE_METHOD(RTL_CONSTASCII_USTRINGPARAM("initialize"));
-const ::rtl::OUString OK_METHOD(RTL_CONSTASCII_USTRINGPARAM("ok"));
using namespace ::com::sun::star;
commit 96b3ab5dbaa51ca9c23914d9144bbe25887351f7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 28 11:50:19 2012 +0100
remove static OUStrings from static_initialization_and_destruction chain
diff --git a/dtrans/source/cnttype/mcnttype.cxx b/dtrans/source/cnttype/mcnttype.cxx
index 52fdbe6..14b2010 100644
--- a/dtrans/source/cnttype/mcnttype.cxx
+++ b/dtrans/source/cnttype/mcnttype.cxx
@@ -47,10 +47,10 @@ using ::rtl::OUString;
// constants
//------------------------------------------------------------------------
-const OUString TSPECIALS (RTL_CONSTASCII_USTRINGPARAM( "()<>@,;:\\\"/[]?=" ));
-const OUString TOKEN (RTL_CONSTASCII_USTRINGPARAM("!#$%&'*+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz{|}~."));
-const OUString SPACE (RTL_CONSTASCII_USTRINGPARAM(" "));
-const OUString SEMICOLON (RTL_CONSTASCII_USTRINGPARAM(";"));
+const char TSPECIALS[] = "()<>@,;:\\\"/[]?=";
+const char TOKEN[] = "!#$%&'*+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz{|}~.";
+const char SPACE[] = " ";
+const char SEMICOLON[] = ";";
//------------------------------------------------------------------------
// ctor
@@ -183,7 +183,7 @@ void SAL_CALL CMimeContentType::acceptSym( const OUString& pSymTlb )
void SAL_CALL CMimeContentType::skipSpaces( void )
{
- while ( SPACE == m_nxtSym )
+ while (m_nxtSym.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(SPACE)))
getSym( );
}
@@ -195,14 +195,16 @@ void SAL_CALL CMimeContentType::type( void )
{
skipSpaces( );
+ rtl::OUString sToken(TOKEN);
+
// check FIRST( type )
- if ( !isInRange( m_nxtSym, TOKEN ) )
+ if ( !isInRange( m_nxtSym, sToken ) )
throw IllegalArgumentException( );
// parse
while( !m_nxtSym.isEmpty( ) )
{
- if ( isInRange( m_nxtSym, TOKEN ) )
+ if ( isInRange( m_nxtSym, sToken ) )
m_MediaType += m_nxtSym;
else if ( isInRange( m_nxtSym, OUString(RTL_CONSTASCII_USTRINGPARAM("/ ")) ) )
break;
@@ -226,13 +228,15 @@ void SAL_CALL CMimeContentType::subtype( void )
{
skipSpaces( );
+ rtl::OUString sToken(TOKEN);
+
// check FIRST( subtype )
- if ( !isInRange( m_nxtSym, TOKEN ) )
+ if ( !isInRange( m_nxtSym, sToken ) )
throw IllegalArgumentException( );
while( !m_nxtSym.isEmpty( ) )
{
- if ( isInRange( m_nxtSym, TOKEN ) )
+ if ( isInRange( m_nxtSym, sToken ) )
m_MediaSubtype += m_nxtSym;
else if ( isInRange( m_nxtSym, OUString(RTL_CONSTASCII_USTRINGPARAM("; ")) ) )
break;
@@ -252,6 +256,7 @@ void SAL_CALL CMimeContentType::subtype( void )
void SAL_CALL CMimeContentType::trailer( void )
{
+ rtl::OUString sToken(TOKEN);
while( !m_nxtSym.isEmpty( ) )
{
if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM("(")) )
@@ -266,7 +271,7 @@ void SAL_CALL CMimeContentType::trailer( void )
getSym( );
skipSpaces( );
- if ( !isInRange( m_nxtSym, TOKEN ) )
+ if ( !isInRange( m_nxtSym, sToken ) )
throw IllegalArgumentException( );
OUString pname = pName( );
@@ -298,9 +303,10 @@ OUString SAL_CALL CMimeContentType::pName( )
{
OUString pname;
+ rtl::OUString sToken(TOKEN);
while( !m_nxtSym.isEmpty( ) )
{
- if ( isInRange( m_nxtSym, TOKEN ) )
+ if ( isInRange( m_nxtSym, sToken ) )
pname += m_nxtSym;
else if ( isInRange( m_nxtSym, OUString(RTL_CONSTASCII_USTRINGPARAM("= ")) ) )
break;
@@ -320,6 +326,7 @@ OUString SAL_CALL CMimeContentType::pValue( )
{
OUString pvalue;
+ rtl::OUString sToken(TOKEN);
// quoted pvalue
if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM( "\"" )) )
{
@@ -335,7 +342,7 @@ OUString SAL_CALL CMimeContentType::pValue( )
if ( pvalue.isEmpty( ) )
throw IllegalArgumentException( );
}
- else if ( isInRange( m_nxtSym, TOKEN ) ) // unquoted pvalue
+ else if ( isInRange( m_nxtSym, sToken ) ) // unquoted pvalue
{
pvalue = nonquotedPValue( );
}
@@ -358,9 +365,14 @@ OUString SAL_CALL CMimeContentType::quotedPValue( )
while ( !m_nxtSym.isEmpty( ) )
{
- if ( bAfterQuoteSign && ((m_nxtSym == SPACE)||(m_nxtSym == SEMICOLON) ) )
+ if ( bAfterQuoteSign && (
+ (m_nxtSym.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(SPACE))) ||
+ (m_nxtSym.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(SEMICOLON))))
+ )
+ {
break;
- else if ( isInRange( m_nxtSym, TOKEN + TSPECIALS + SPACE ) )
+ }
+ else if ( isInRange( m_nxtSym, rtl::OUString(TOKEN) + rtl::OUString(TSPECIALS) + rtl::OUString(SPACE) ) )
{
pvalue += m_nxtSym;
if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM( "\"" )) )
@@ -384,9 +396,10 @@ OUString SAL_CALL CMimeContentType::nonquotedPValue( )
{
OUString pvalue;
+ rtl::OUString sToken(TOKEN);
while ( !m_nxtSym.isEmpty( ) )
{
- if ( isInRange( m_nxtSym, TOKEN ) )
+ if ( isInRange( m_nxtSym, sToken ) )
pvalue += m_nxtSym;
else if ( isInRange( m_nxtSym, OUString(RTL_CONSTASCII_USTRINGPARAM("; ")) ) )
break;
@@ -406,7 +419,7 @@ void SAL_CALL CMimeContentType::comment( void )
{
while ( !m_nxtSym.isEmpty( ) )
{
- if ( isInRange( m_nxtSym, TOKEN + SPACE ) )
+ if ( isInRange( m_nxtSym, rtl::OUString(TOKEN) + rtl::OUString(SPACE) ) )
getSym( );
else if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM(")")) )
break;
commit 7b9462fad75914a8e0bd59f45e2b5b1e77286c60
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 28 11:42:08 2012 +0100
unused global rtl::OUStrings
diff --git a/filter/source/placeware/Base64Codec.cxx b/filter/source/placeware/Base64Codec.cxx
index 49cfcc0..99b93ed 100644
--- a/filter/source/placeware/Base64Codec.cxx
+++ b/filter/source/placeware/Base64Codec.cxx
@@ -140,67 +140,4 @@ void Base64Codec::encodeBase64(rtl::OUStringBuffer& aStrBuffer, const uno::Seque
}
}
-const rtl::OUString s2equal(RTL_CONSTASCII_USTRINGPARAM("=="));
-const rtl::OUString s1equal(RTL_CONSTASCII_USTRINGPARAM("="));
-#if 0
-void FourByteToThreeByte (sal_uInt8* pBuffer, sal_Int32& nLength, const sal_Int32 nStart, const rtl::OUString& sString)
-{
- nLength = 0;
- sal_Int32 nLen (sString.getLength());
-
- if (nLen != 4)
- {
- return;
- }
-
-
- if (sString.indexOf(s2equal) == 2)
- nLength = 1;
- else if (sString.indexOf(s1equal) == 3)
- nLength = 2;
- else
- nLength = 3;
-
- sal_Int32 nBinaer ((aBase64DecodeTable [sString [0]] << 18) +
- (aBase64DecodeTable [sString [1]] << 12) +
- (aBase64DecodeTable [sString [2]] << 6) +
- (aBase64DecodeTable [sString [3]]));
-
- sal_uInt8 OneByte = static_cast< sal_uInt8 >((nBinaer & 0xFF0000) >> 16);
- pBuffer[nStart + 0] = (sal_uInt8)OneByte;
-
- if (nLength == 1)
- return;
-
- OneByte = static_cast< sal_uInt8 >((nBinaer & 0xFF00) >> 8);
- pBuffer[nStart + 1] = (sal_uInt8)OneByte;
-
- if (nLength == 2)
- return;
-
- OneByte = static_cast< sal_uInt8 >(nBinaer & 0xFF);
- pBuffer[nStart + 2] = (sal_uInt8)OneByte;
-}
-
-void Base64Codec::decodeBase64(uno::Sequence< sal_uInt8 >& aBuffer, const rtl::OUString& sBuffer)
-{
- sal_Int32 nFirstLength((sBuffer.getLength() / 4) * 3);
- sal_uInt8* pBuffer = new sal_uInt8[nFirstLength];
- sal_Int32 nSecondLength(0);
- sal_Int32 nLength(0);
- sal_Int32 i = 0;
- sal_Int32 k = 0;
- while (i < sBuffer.getLength())
- {
- FourByteToThreeByte (pBuffer, nLength, k, sBuffer.copy(i, 4));
- nSecondLength += nLength;
- nLength = 0;
- i += 4;
- k += 3;
- }
- aBuffer = uno::Sequence<sal_uInt8>(pBuffer, nSecondLength);
- delete[] pBuffer;
-}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit ee8d062e0d71a622105840e8be6dc7cb14d16c3b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 28 11:40:49 2012 +0100
remove static OUStrings from static_initialization_and_destruction chain
diff --git a/unotools/source/config/useroptions.cxx b/unotools/source/config/useroptions.cxx
index d9eec2c..216aae2 100644
--- a/unotools/source/config/useroptions.cxx
+++ b/unotools/source/config/useroptions.cxx
@@ -60,25 +60,25 @@ namespace css = ::com::sun::star;
namespace
{
- static const ::rtl::OUString s_sData(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.UserProfile/Data"));
- static const ::rtl::OUString s_so(RTL_CONSTASCII_USTRINGPARAM("o")); // USER_OPT_COMPANY
- static const ::rtl::OUString s_sgivenname(RTL_CONSTASCII_USTRINGPARAM("givenname")); // USER_OPT_FIRSTNAME
- static const ::rtl::OUString s_ssn(RTL_CONSTASCII_USTRINGPARAM("sn")); // USER_OPT_LASTNAME
- static const ::rtl::OUString s_sinitials(RTL_CONSTASCII_USTRINGPARAM("initials")); // USER_OPT_ID
- static const ::rtl::OUString s_sstreet(RTL_CONSTASCII_USTRINGPARAM("street")); // USER_OPT_STREET
- static const ::rtl::OUString s_sl(RTL_CONSTASCII_USTRINGPARAM("l")); // USER_OPT_CITY
- static const ::rtl::OUString s_sst(RTL_CONSTASCII_USTRINGPARAM("st")); // USER_OPT_STATE
- static const ::rtl::OUString s_spostalcode(RTL_CONSTASCII_USTRINGPARAM("postalcode")); // USER_OPT_ZIP
- static const ::rtl::OUString s_sc(RTL_CONSTASCII_USTRINGPARAM("c")); // USER_OPT_COUNTRY
- static const ::rtl::OUString s_stitle(RTL_CONSTASCII_USTRINGPARAM("title")); // USER_OPT_TITLE
- static const ::rtl::OUString s_sposition(RTL_CONSTASCII_USTRINGPARAM("position")); // USER_OPT_POSITION
- static const ::rtl::OUString s_shomephone(RTL_CONSTASCII_USTRINGPARAM("homephone")); // USER_OPT_TELEPHONEHOME
- static const ::rtl::OUString s_stelephonenumber(RTL_CONSTASCII_USTRINGPARAM("telephonenumber")); // USER_OPT_TELEPHONEWORK
- static const ::rtl::OUString s_sfacsimiletelephonenumber(RTL_CONSTASCII_USTRINGPARAM("facsimiletelephonenumber")); // USER_OPT_FAX
- static const ::rtl::OUString s_smail(RTL_CONSTASCII_USTRINGPARAM("mail")); // USER_OPT_EMAIL
- static const ::rtl::OUString s_scustomernumber(RTL_CONSTASCII_USTRINGPARAM("customernumber")); // USER_OPT_CUSTOMERNUMBER
- static const ::rtl::OUString s_sfathersname(RTL_CONSTASCII_USTRINGPARAM("fathersname")); // USER_OPT_FATHERSNAME
- static const ::rtl::OUString s_sapartment(RTL_CONSTASCII_USTRINGPARAM("apartment")); // USER_OPT_APARTMENT
+ const char s_sData[] = "org.openoffice.UserProfile/Data";
+ const char s_so[] = "o"; // USER_OPT_COMPANY
+ const char s_sgivenname[] = "givenname"; // USER_OPT_FIRSTNAME
+ const char s_ssn[] = "sn"; // USER_OPT_LASTNAME
+ const char s_sinitials[] = "initials"; // USER_OPT_ID
+ const char s_sstreet[] = "street"; // USER_OPT_STREET
+ const char s_sl[] = "l"; // USER_OPT_CITY
+ const char s_sst[] = "st"; // USER_OPT_STATE
+ const char s_spostalcode[] = "postalcode"; // USER_OPT_ZIP
+ const char s_sc[] = "c"; // USER_OPT_COUNTRY
+ const char s_stitle[] = "title"; // USER_OPT_TITLE
+ const char s_sposition[] = "position"; // USER_OPT_POSITION
+ const char s_shomephone[] = "homephone"; // USER_OPT_TELEPHONEHOME
+ const char s_stelephonenumber[] = "telephonenumber"; // USER_OPT_TELEPHONEWORK
+ const char s_sfacsimiletelephonenumber[] = "facsimiletelephonenumber"; // USER_OPT_FAX
+ const char s_smail[] = "mail"; // USER_OPT_EMAIL
+ const char s_scustomernumber[] = "customernumber"; // USER_OPT_CUSTOMERNUMBER
+ const char s_sfathersname[] = "fathersname"; // USER_OPT_FATHERSNAME
+ const char s_sapartment[] = "apartment"; // USER_OPT_APARTMENT
}
// class SvtUserOptions_Impl ---------------------------------------------
@@ -202,7 +202,7 @@ SvtUserOptions_Impl::SvtUserOptions_Impl() :
m_xCfg = Reference< css::container::XNameAccess > (
::comphelper::ConfigurationHelper::openConfig(
::comphelper::getProcessServiceFactory(),
- s_sData,
+ rtl::OUString(s_sData),
::comphelper::ConfigurationHelper::E_STANDARD),
css::uno::UNO_QUERY );
@@ -236,7 +236,7 @@ SvtUserOptions_Impl::~SvtUserOptions_Impl()
try
{
if (m_xData.is())
- m_xData->getPropertyValue(s_so) >>= sCompany;
+ m_xData->getPropertyValue(rtl::OUString(s_so)) >>= sCompany;
}
catch ( const css::uno::Exception& ex )
{
@@ -253,7 +253,7 @@ SvtUserOptions_Impl::~SvtUserOptions_Impl()
try
{
if (m_xData.is())
- m_xData->getPropertyValue(s_sgivenname) >>= sFirstName;
+ m_xData->getPropertyValue(rtl::OUString(s_sgivenname)) >>= sFirstName;
}
catch ( const css::uno::Exception& ex )
{
@@ -270,7 +270,7 @@ SvtUserOptions_Impl::~SvtUserOptions_Impl()
try
{
if (m_xData.is())
- m_xData->getPropertyValue(s_ssn) >>= sLastName;
+ m_xData->getPropertyValue(rtl::OUString(s_ssn)) >>= sLastName;
}
catch ( const css::uno::Exception& ex )
{
@@ -287,7 +287,7 @@ SvtUserOptions_Impl::~SvtUserOptions_Impl()
try
{
if (m_xData.is())
- m_xData->getPropertyValue(s_sinitials) >>= sID;
+ m_xData->getPropertyValue(rtl::OUString(s_sinitials)) >>= sID;
}
catch ( const css::uno::Exception& ex )
{
@@ -304,7 +304,7 @@ SvtUserOptions_Impl::~SvtUserOptions_Impl()
try
{
if (m_xData.is())
- m_xData->getPropertyValue(s_sstreet) >>= sStreet;
+ m_xData->getPropertyValue(rtl::OUString(s_sstreet)) >>= sStreet;
}
catch ( const css::uno::Exception& ex )
{
@@ -321,7 +321,7 @@ SvtUserOptions_Impl::~SvtUserOptions_Impl()
try
{
if (m_xData.is())
- m_xData->getPropertyValue(s_sl) >>= sCity;
+ m_xData->getPropertyValue(rtl::OUString(s_sl)) >>= sCity;
}
catch ( const css::uno::Exception& ex )
{
@@ -338,7 +338,7 @@ SvtUserOptions_Impl::~SvtUserOptions_Impl()
try
{
if (m_xData.is())
- m_xData->getPropertyValue(s_sst) >>= sState;
+ m_xData->getPropertyValue(rtl::OUString(s_sst)) >>= sState;
}
catch ( const css::uno::Exception& ex )
{
@@ -355,7 +355,7 @@ SvtUserOptions_Impl::~SvtUserOptions_Impl()
try
{
if (m_xData.is())
- m_xData->getPropertyValue(s_spostalcode) >>= sZip;
+ m_xData->getPropertyValue(rtl::OUString(s_spostalcode)) >>= sZip;
}
catch ( const css::uno::Exception& ex )
{
@@ -372,7 +372,7 @@ SvtUserOptions_Impl::~SvtUserOptions_Impl()
try
{
if (m_xData.is())
- m_xData->getPropertyValue(s_sc) >>= sCountry;
+ m_xData->getPropertyValue(rtl::OUString(s_sc)) >>= sCountry;
}
catch ( const css::uno::Exception& ex )
{
@@ -389,7 +389,7 @@ SvtUserOptions_Impl::~SvtUserOptions_Impl()
try
{
if (m_xData.is())
- m_xData->getPropertyValue(s_sposition) >>= sPosition;
+ m_xData->getPropertyValue(rtl::OUString(s_sposition)) >>= sPosition;
}
catch ( const css::uno::Exception& ex )
{
@@ -406,7 +406,7 @@ SvtUserOptions_Impl::~SvtUserOptions_Impl()
try
{
if (m_xData.is())
- m_xData->getPropertyValue(s_stitle) >>= sTitle;
+ m_xData->getPropertyValue(rtl::OUString(s_stitle)) >>= sTitle;
}
catch ( const css::uno::Exception& ex )
{
@@ -423,7 +423,7 @@ SvtUserOptions_Impl::~SvtUserOptions_Impl()
try
{
if (m_xData.is())
- m_xData->getPropertyValue(s_shomephone) >>= sTelephoneHome;
+ m_xData->getPropertyValue(rtl::OUString(s_shomephone)) >>= sTelephoneHome;
}
catch ( const css::uno::Exception& ex )
{
@@ -440,7 +440,7 @@ SvtUserOptions_Impl::~SvtUserOptions_Impl()
try
{
if (m_xData.is())
- m_xData->getPropertyValue(s_stelephonenumber) >>= sTelephoneWork;
+ m_xData->getPropertyValue(rtl::OUString(s_stelephonenumber)) >>= sTelephoneWork;
}
catch ( const css::uno::Exception& ex )
{
@@ -457,7 +457,7 @@ SvtUserOptions_Impl::~SvtUserOptions_Impl()
try
{
if (m_xData.is())
- m_xData->getPropertyValue(s_sfacsimiletelephonenumber) >>= sFax;
+ m_xData->getPropertyValue(rtl::OUString(s_sfacsimiletelephonenumber)) >>= sFax;
}
catch ( const css::uno::Exception& ex )
{
@@ -474,7 +474,7 @@ SvtUserOptions_Impl::~SvtUserOptions_Impl()
try
{
if (m_xData.is())
- m_xData->getPropertyValue(s_smail) >>= sEmail;
+ m_xData->getPropertyValue(rtl::OUString(s_smail)) >>= sEmail;
}
catch ( const css::uno::Exception& ex )
{
@@ -491,7 +491,7 @@ SvtUserOptions_Impl::~SvtUserOptions_Impl()
try
{
if (m_xData.is())
- m_xData->getPropertyValue(s_scustomernumber) >>= sCustomerNumber;
+ m_xData->getPropertyValue(rtl::OUString(s_scustomernumber)) >>= sCustomerNumber;
}
catch ( const css::uno::Exception& ex )
{
@@ -508,7 +508,7 @@ SvtUserOptions_Impl::~SvtUserOptions_Impl()
try
{
if (m_xData.is())
- m_xData->getPropertyValue(s_sfathersname) >>= sFathersName;
+ m_xData->getPropertyValue(rtl::OUString(s_sfathersname)) >>= sFathersName;
}
catch ( const css::uno::Exception& ex )
{
@@ -525,7 +525,7 @@ SvtUserOptions_Impl::~SvtUserOptions_Impl()
try
{
if (m_xData.is())
- m_xData->getPropertyValue(s_sapartment) >>= sApartment;
+ m_xData->getPropertyValue(rtl::OUString(s_sapartment)) >>= sApartment;
}
catch ( const css::uno::Exception& ex )
{
@@ -540,7 +540,7 @@ void SvtUserOptions_Impl::SetCompany( const ::rtl::OUString& sCompany )
try
{
if (m_xData.is())
- m_xData->setPropertyValue(s_so, css::uno::makeAny(::rtl::OUString(sCompany)));
+ m_xData->setPropertyValue(rtl::OUString(s_so), css::uno::makeAny(::rtl::OUString(sCompany)));
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
catch ( const css::uno::Exception& ex)
@@ -554,7 +554,7 @@ void SvtUserOptions_Impl::SetFirstName( const ::rtl::OUString& sFirstName )
try
{
if (m_xData.is())
- m_xData->setPropertyValue(s_sgivenname, css::uno::makeAny(::rtl::OUString(sFirstName)));
+ m_xData->setPropertyValue(rtl::OUString(s_sgivenname), css::uno::makeAny(::rtl::OUString(sFirstName)));
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
catch ( const css::uno::Exception& ex)
@@ -568,7 +568,7 @@ void SvtUserOptions_Impl::SetLastName( const ::rtl::OUString& sLastName )
try
{
if (m_xData.is())
- m_xData->setPropertyValue(s_ssn, css::uno::makeAny(::rtl::OUString(sLastName)));
+ m_xData->setPropertyValue(rtl::OUString(s_ssn), css::uno::makeAny(::rtl::OUString(sLastName)));
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
catch ( const css::uno::Exception& ex)
@@ -581,7 +581,7 @@ void SvtUserOptions_Impl::SetID( const ::rtl::OUString& sID )
try
{
if (m_xData.is())
- m_xData->setPropertyValue(s_sinitials, css::uno::makeAny(::rtl::OUString(sID)));
+ m_xData->setPropertyValue(rtl::OUString(s_sinitials), css::uno::makeAny(::rtl::OUString(sID)));
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
catch ( const css::uno::Exception& ex)
@@ -595,7 +595,7 @@ void SvtUserOptions_Impl::SetStreet( const ::rtl::OUString& sStreet )
try
{
if (m_xData.is())
- m_xData->setPropertyValue(s_sstreet, css::uno::makeAny(::rtl::OUString(sStreet)));
+ m_xData->setPropertyValue(rtl::OUString(s_sstreet), css::uno::makeAny(::rtl::OUString(sStreet)));
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
catch ( const css::uno::Exception& ex)
@@ -609,7 +609,7 @@ void SvtUserOptions_Impl::SetCity( const ::rtl::OUString& sCity )
try
{
if (m_xData.is())
- m_xData->setPropertyValue(s_sl, css::uno::makeAny(::rtl::OUString(sCity)));
+ m_xData->setPropertyValue(rtl::OUString(s_sl), css::uno::makeAny(::rtl::OUString(sCity)));
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
catch ( const css::uno::Exception& ex)
@@ -623,7 +623,7 @@ void SvtUserOptions_Impl::SetState( const ::rtl::OUString& sState )
try
{
if (m_xData.is())
- m_xData->setPropertyValue(s_sst, css::uno::makeAny(::rtl::OUString(sState)));
+ m_xData->setPropertyValue(rtl::OUString(s_sst), css::uno::makeAny(::rtl::OUString(sState)));
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
catch ( const css::uno::Exception& ex)
@@ -637,7 +637,7 @@ void SvtUserOptions_Impl::SetZip( const ::rtl::OUString& sZip )
try
{
if (m_xData.is())
- m_xData->setPropertyValue(s_spostalcode, css::uno::makeAny(::rtl::OUString(sZip)));
+ m_xData->setPropertyValue(rtl::OUString(s_spostalcode), css::uno::makeAny(::rtl::OUString(sZip)));
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
catch ( const css::uno::Exception& ex)
@@ -651,7 +651,7 @@ void SvtUserOptions_Impl::SetCountry( const ::rtl::OUString& sCountry )
try
{
if (m_xData.is())
- m_xData->setPropertyValue(s_sc, css::uno::makeAny(::rtl::OUString(sCountry)));
+ m_xData->setPropertyValue(rtl::OUString(s_sc), css::uno::makeAny(::rtl::OUString(sCountry)));
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
catch ( const css::uno::Exception& ex)
@@ -665,7 +665,7 @@ void SvtUserOptions_Impl::SetPosition( const ::rtl::OUString& sPosition )
try
{
if (m_xData.is())
- m_xData->setPropertyValue(s_sposition, css::uno::makeAny(::rtl::OUString(sPosition)));
+ m_xData->setPropertyValue(rtl::OUString(s_sposition), css::uno::makeAny(::rtl::OUString(sPosition)));
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
catch ( const css::uno::Exception& ex)
@@ -679,7 +679,7 @@ void SvtUserOptions_Impl::SetTitle( const ::rtl::OUString& sTitle )
try
{
if (m_xData.is())
- m_xData->setPropertyValue(s_stitle, css::uno::makeAny(::rtl::OUString(sTitle)));
+ m_xData->setPropertyValue(rtl::OUString(s_stitle), css::uno::makeAny(::rtl::OUString(sTitle)));
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
catch ( const css::uno::Exception& ex)
@@ -693,7 +693,7 @@ void SvtUserOptions_Impl::SetTelephoneHome( const ::rtl::OUString& sTelephoneHom
try
{
if (m_xData.is())
- m_xData->setPropertyValue(s_shomephone, css::uno::makeAny(::rtl::OUString(sTelephoneHome)));
+ m_xData->setPropertyValue(rtl::OUString(s_shomephone), css::uno::makeAny(::rtl::OUString(sTelephoneHome)));
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
catch ( const css::uno::Exception& ex)
@@ -707,7 +707,7 @@ void SvtUserOptions_Impl::SetTelephoneWork( const ::rtl::OUString& sTelephoneWor
try
{
if (m_xData.is())
- m_xData->setPropertyValue(s_stelephonenumber, css::uno::makeAny(::rtl::OUString(sTelephoneWork)));
+ m_xData->setPropertyValue(rtl::OUString(s_stelephonenumber), css::uno::makeAny(::rtl::OUString(sTelephoneWork)));
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
catch ( const css::uno::Exception& ex)
@@ -721,7 +721,7 @@ void SvtUserOptions_Impl::SetFax( const ::rtl::OUString& sFax )
try
{
if (m_xData.is())
- m_xData->setPropertyValue(s_sfacsimiletelephonenumber, css::uno::makeAny(::rtl::OUString(sFax)));
+ m_xData->setPropertyValue(rtl::OUString(s_sfacsimiletelephonenumber), css::uno::makeAny(::rtl::OUString(sFax)));
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
catch ( const css::uno::Exception& ex)
@@ -735,7 +735,7 @@ void SvtUserOptions_Impl::SetEmail( const ::rtl::OUString& sEmail )
try
{
if (m_xData.is())
- m_xData->setPropertyValue(s_smail, css::uno::makeAny(::rtl::OUString(sEmail)));
+ m_xData->setPropertyValue(rtl::OUString(s_smail), css::uno::makeAny(::rtl::OUString(sEmail)));
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
catch ( const css::uno::Exception& ex)
@@ -749,7 +749,7 @@ void SvtUserOptions_Impl::SetCustomerNumber( const ::rtl::OUString& sCustomerNum
try
{
if (m_xData.is())
- m_xData->setPropertyValue(s_scustomernumber, css::uno::makeAny(::rtl::OUString(sCustomerNumber)));
+ m_xData->setPropertyValue(rtl::OUString(s_scustomernumber), css::uno::makeAny(::rtl::OUString(sCustomerNumber)));
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
catch ( const css::uno::Exception& ex)
@@ -763,7 +763,7 @@ void SvtUserOptions_Impl::SetFathersName( const ::rtl::OUString& sFathersName )
try
{
if (m_xData.is())
- m_xData->setPropertyValue(s_sfathersname, css::uno::makeAny(::rtl::OUString(sFathersName)));
+ m_xData->setPropertyValue(rtl::OUString(s_sfathersname), css::uno::makeAny(::rtl::OUString(sFathersName)));
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
catch ( const css::uno::Exception& ex)
@@ -777,7 +777,7 @@ void SvtUserOptions_Impl::SetApartment( const ::rtl::OUString& sApartment )
try
{
if (m_xData.is())
- m_xData->setPropertyValue(s_sapartment, css::uno::makeAny(::rtl::OUString(sApartment)));
+ m_xData->setPropertyValue(rtl::OUString(s_sapartment), css::uno::makeAny(::rtl::OUString(sApartment)));
::comphelper::ConfigurationHelper::flush(m_xCfg);
}
catch ( const css::uno::Exception& ex)
@@ -822,103 +822,103 @@ sal_Bool SvtUserOptions_Impl::IsTokenReadonly( sal_uInt16 nToken ) const
{
case USER_OPT_COMPANY:
{
- aProp = xInfo->getPropertyByName(s_so);
+ aProp = xInfo->getPropertyByName(rtl::OUString(s_so));
bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
break;
}
case USER_OPT_FIRSTNAME:
{
- aProp = xInfo->getPropertyByName(s_sgivenname);
+ aProp = xInfo->getPropertyByName(rtl::OUString(s_sgivenname));
bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
break;
}
case USER_OPT_LASTNAME:
{
- aProp = xInfo->getPropertyByName(s_ssn);
+ aProp = xInfo->getPropertyByName(rtl::OUString(s_ssn));
bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
break;
}
case USER_OPT_ID:
{
- aProp = xInfo->getPropertyByName(s_sinitials);
+ aProp = xInfo->getPropertyByName(rtl::OUString(s_sinitials));
bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
break;
}
case USER_OPT_STREET:
{
- aProp = xInfo->getPropertyByName(s_sstreet);
+ aProp = xInfo->getPropertyByName(rtl::OUString(s_sstreet));
bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
break;
}
case USER_OPT_CITY:
{
- aProp = xInfo->getPropertyByName(s_sl);
+ aProp = xInfo->getPropertyByName(rtl::OUString(s_sl));
bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
break;
}
case USER_OPT_STATE:
{
- aProp = xInfo->getPropertyByName(s_sst);
+ aProp = xInfo->getPropertyByName(rtl::OUString(s_sst));
bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
break;
}
case USER_OPT_ZIP:
{
- aProp = xInfo->getPropertyByName(s_spostalcode);
+ aProp = xInfo->getPropertyByName(rtl::OUString(s_spostalcode));
bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
break;
}
case USER_OPT_COUNTRY:
{
- aProp = xInfo->getPropertyByName(s_sc);
+ aProp = xInfo->getPropertyByName(rtl::OUString(s_sc));
bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
break;
}
case USER_OPT_POSITION:
{
- aProp = xInfo->getPropertyByName(s_sposition);
+ aProp = xInfo->getPropertyByName(rtl::OUString(s_sposition));
bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
break;
}
case USER_OPT_TITLE:
{
- aProp = xInfo->getPropertyByName(s_stitle);
+ aProp = xInfo->getPropertyByName(rtl::OUString(s_stitle));
bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
break;
}
case USER_OPT_TELEPHONEHOME:
{
- aProp = xInfo->getPropertyByName(s_shomephone);
+ aProp = xInfo->getPropertyByName(rtl::OUString(s_shomephone));
bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
break;
}
case USER_OPT_TELEPHONEWORK:
{
- aProp = xInfo->getPropertyByName(s_stelephonenumber);
+ aProp = xInfo->getPropertyByName(rtl::OUString(s_stelephonenumber));
bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
break;
}
case USER_OPT_FAX:
{
- aProp = xInfo->getPropertyByName(s_sfacsimiletelephonenumber);
+ aProp = xInfo->getPropertyByName(rtl::OUString(s_sfacsimiletelephonenumber));
bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
break;
}
case USER_OPT_EMAIL:
{
- aProp = xInfo->getPropertyByName(s_smail);
+ aProp = xInfo->getPropertyByName(rtl::OUString(s_smail));
bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
break;
}
case USER_OPT_FATHERSNAME:
{
- aProp = xInfo->getPropertyByName(s_sfathersname);
+ aProp = xInfo->getPropertyByName(rtl::OUString(s_sfathersname));
bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
break;
}
case USER_OPT_APARTMENT:
{
- aProp = xInfo->getPropertyByName(s_sapartment);
+ aProp = xInfo->getPropertyByName(rtl::OUString(s_sapartment));
bRet = ((aProp.Attributes & css::beans::PropertyAttribute::READONLY) == css::beans::PropertyAttribute::READONLY);
break;
}
commit 4be31cd9a2cda0a549137815c17c88abf1ff50d6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 28 11:35:55 2012 +0100
fold useroptions_const.hxx into useroptions.cxx
diff --git a/unotools/inc/unotools/useroptions_const.hxx b/unotools/inc/unotools/useroptions_const.hxx
index e71ef8f..d11d8a0 100644
--- a/unotools/inc/unotools/useroptions_const.hxx
+++ b/unotools/inc/unotools/useroptions_const.hxx
@@ -31,28 +31,6 @@
#include <rtl/ustring.hxx>
-namespace
-{
- static const ::rtl::OUString s_sData(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.UserProfile/Data"));
- static const ::rtl::OUString s_so(RTL_CONSTASCII_USTRINGPARAM("o")); // USER_OPT_COMPANY
- static const ::rtl::OUString s_sgivenname(RTL_CONSTASCII_USTRINGPARAM("givenname")); // USER_OPT_FIRSTNAME
- static const ::rtl::OUString s_ssn(RTL_CONSTASCII_USTRINGPARAM("sn")); // USER_OPT_LASTNAME
- static const ::rtl::OUString s_sinitials(RTL_CONSTASCII_USTRINGPARAM("initials")); // USER_OPT_ID
- static const ::rtl::OUString s_sstreet(RTL_CONSTASCII_USTRINGPARAM("street")); // USER_OPT_STREET
- static const ::rtl::OUString s_sl(RTL_CONSTASCII_USTRINGPARAM("l")); // USER_OPT_CITY
- static const ::rtl::OUString s_sst(RTL_CONSTASCII_USTRINGPARAM("st")); // USER_OPT_STATE
- static const ::rtl::OUString s_spostalcode(RTL_CONSTASCII_USTRINGPARAM("postalcode")); // USER_OPT_ZIP
- static const ::rtl::OUString s_sc(RTL_CONSTASCII_USTRINGPARAM("c")); // USER_OPT_COUNTRY
- static const ::rtl::OUString s_stitle(RTL_CONSTASCII_USTRINGPARAM("title")); // USER_OPT_TITLE
- static const ::rtl::OUString s_sposition(RTL_CONSTASCII_USTRINGPARAM("position")); // USER_OPT_POSITION
- static const ::rtl::OUString s_shomephone(RTL_CONSTASCII_USTRINGPARAM("homephone")); // USER_OPT_TELEPHONEHOME
- static const ::rtl::OUString s_stelephonenumber(RTL_CONSTASCII_USTRINGPARAM("telephonenumber")); // USER_OPT_TELEPHONEWORK
- static const ::rtl::OUString s_sfacsimiletelephonenumber(RTL_CONSTASCII_USTRINGPARAM("facsimiletelephonenumber")); // USER_OPT_FAX
- static const ::rtl::OUString s_smail(RTL_CONSTASCII_USTRINGPARAM("mail")); // USER_OPT_EMAIL
- static const ::rtl::OUString s_scustomernumber(RTL_CONSTASCII_USTRINGPARAM("customernumber")); // USER_OPT_CUSTOMERNUMBER
- static const ::rtl::OUString s_sfathersname(RTL_CONSTASCII_USTRINGPARAM("fathersname")); // USER_OPT_FATHERSNAME
- static const ::rtl::OUString s_sapartment(RTL_CONSTASCII_USTRINGPARAM("apartment")); // USER_OPT_APARTMENT
-}
#endif // INCLUDE_CONFIGITEMS_USEROPTIONS_CONST_HXX
diff --git a/unotools/source/config/useroptions.cxx b/unotools/source/config/useroptions.cxx
index 3802072..d9eec2c 100644
--- a/unotools/source/config/useroptions.cxx
+++ b/unotools/source/config/useroptions.cxx
@@ -28,7 +28,6 @@
#include <unotools/useroptions.hxx>
-#include <unotools/useroptions_const.hxx>
#include <unotools/configmgr.hxx>
#include <com/sun/star/uno/Any.hxx>
@@ -59,6 +58,29 @@ using ::rtl::OUString;
namespace css = ::com::sun::star;
+namespace
+{
+ static const ::rtl::OUString s_sData(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.UserProfile/Data"));
+ static const ::rtl::OUString s_so(RTL_CONSTASCII_USTRINGPARAM("o")); // USER_OPT_COMPANY
+ static const ::rtl::OUString s_sgivenname(RTL_CONSTASCII_USTRINGPARAM("givenname")); // USER_OPT_FIRSTNAME
+ static const ::rtl::OUString s_ssn(RTL_CONSTASCII_USTRINGPARAM("sn")); // USER_OPT_LASTNAME
+ static const ::rtl::OUString s_sinitials(RTL_CONSTASCII_USTRINGPARAM("initials")); // USER_OPT_ID
+ static const ::rtl::OUString s_sstreet(RTL_CONSTASCII_USTRINGPARAM("street")); // USER_OPT_STREET
+ static const ::rtl::OUString s_sl(RTL_CONSTASCII_USTRINGPARAM("l")); // USER_OPT_CITY
+ static const ::rtl::OUString s_sst(RTL_CONSTASCII_USTRINGPARAM("st")); // USER_OPT_STATE
+ static const ::rtl::OUString s_spostalcode(RTL_CONSTASCII_USTRINGPARAM("postalcode")); // USER_OPT_ZIP
+ static const ::rtl::OUString s_sc(RTL_CONSTASCII_USTRINGPARAM("c")); // USER_OPT_COUNTRY
+ static const ::rtl::OUString s_stitle(RTL_CONSTASCII_USTRINGPARAM("title")); // USER_OPT_TITLE
+ static const ::rtl::OUString s_sposition(RTL_CONSTASCII_USTRINGPARAM("position")); // USER_OPT_POSITION
+ static const ::rtl::OUString s_shomephone(RTL_CONSTASCII_USTRINGPARAM("homephone")); // USER_OPT_TELEPHONEHOME
+ static const ::rtl::OUString s_stelephonenumber(RTL_CONSTASCII_USTRINGPARAM("telephonenumber")); // USER_OPT_TELEPHONEWORK
+ static const ::rtl::OUString s_sfacsimiletelephonenumber(RTL_CONSTASCII_USTRINGPARAM("facsimiletelephonenumber")); // USER_OPT_FAX
+ static const ::rtl::OUString s_smail(RTL_CONSTASCII_USTRINGPARAM("mail")); // USER_OPT_EMAIL
+ static const ::rtl::OUString s_scustomernumber(RTL_CONSTASCII_USTRINGPARAM("customernumber")); // USER_OPT_CUSTOMERNUMBER
+ static const ::rtl::OUString s_sfathersname(RTL_CONSTASCII_USTRINGPARAM("fathersname")); // USER_OPT_FATHERSNAME
+ static const ::rtl::OUString s_sapartment(RTL_CONSTASCII_USTRINGPARAM("apartment")); // USER_OPT_APARTMENT
+}
+
// class SvtUserOptions_Impl ---------------------------------------------
class SvtUserOptions_Impl;
class SvtUserConfigChangeListener_Impl : public cppu::WeakImplHelper1
commit 382f43dd2eedfd6d1377af48980307edfe12cde6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 28 11:35:06 2012 +0100
don't need to export useroptions_const.hxx
diff --git a/unotools/Package_inc.mk b/unotools/Package_inc.mk
index 46cb143..a46b219 100644
--- a/unotools/Package_inc.mk
+++ b/unotools/Package_inc.mk
@@ -99,7 +99,6 @@ $(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/ucbhelper.hxx,unotoo
$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/ucblockbytes.hxx,unotools/ucblockbytes.hxx))
$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/ucbstreamhelper.hxx,unotools/ucbstreamhelper.hxx))
$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/unotoolsdllapi.h,unotools/unotoolsdllapi.h))
-$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/useroptions_const.hxx,unotools/useroptions_const.hxx))
$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/useroptions.hxx,unotools/useroptions.hxx))
$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/viewoptions.hxx,unotools/viewoptions.hxx))
$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/workingsetoptions.hxx,unotools/workingsetoptions.hxx))
commit 96433d351e5423a2ca189464f50179becd557d70
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 28 11:32:41 2012 +0100
remove static OUStrings from static_initialization_and_destruction chain
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index 4e8c93c..0a50839 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -384,9 +384,6 @@ beans::Optional< OUString > BackendImpl::PackageImpl::getRegistrationDataURL()
return beans::Optional<OUString>(true, OUString());
}
-static rtl::OUString aSlash(RTL_CONSTASCII_USTRINGPARAM("/"));
-static rtl::OUString aHelpStr(RTL_CONSTASCII_USTRINGPARAM("help"));
-
void BackendImpl::implProcessHelp(
PackageImpl * package, bool doRegisterPackage,
Reference<ucb::XCommandEnvironment> const & xCmdEnv)
@@ -445,6 +442,9 @@ void BackendImpl::implProcessHelp(
&langFolderContent,
langFolderDest, xCmdEnv);
+ const OUString aHelpStr(RTL_CONSTASCII_USTRINGPARAM("help"));
+ const OUString aSlash(RTL_CONSTASCII_USTRINGPARAM("/"));
+
rtl::OUString aJarFile(
makeURL(sHelpFolder, langFolderURLSegment + aSlash + aHelpStr +
OUSTR(".jar")));
commit c1110fc57e10ca1688193d09de8fa00f8b6d129e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 27 23:33:00 2012 +0100
BiffOutputRecordBuffer never constructed
diff --git a/sc/Library_scfilt.mk b/sc/Library_scfilt.mk
index 8f5370f..83ee7ad 100644
--- a/sc/Library_scfilt.mk
+++ b/sc/Library_scfilt.mk
@@ -167,7 +167,6 @@ $(eval $(call gb_Library_add_exception_objects,scfilt,\
sc/source/filter/oox/biffdetector \
sc/source/filter/oox/biffhelper \
sc/source/filter/oox/biffinputstream \
- sc/source/filter/oox/biffoutputstream \
sc/source/filter/oox/chartsheetfragment \
sc/source/filter/oox/commentsbuffer \
sc/source/filter/oox/commentsfragment \
diff --git a/sc/source/filter/inc/biffoutputstream.hxx b/sc/source/filter/inc/biffoutputstream.hxx
deleted file mode 100644
index 20e92ea..0000000
--- a/sc/source/filter/inc/biffoutputstream.hxx
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list