[Libreoffice-commits] .: 6 commits - svtools/source unotools/source
Caolán McNamara
caolan at kemper.freedesktop.org
Mon Jun 13 06:28:44 PDT 2011
svtools/source/config/miscopt.cxx | 10 +---
unotools/source/config/internaloptions.cxx | 54 ++++++-------------------
unotools/source/config/localisationoptions.cxx | 7 +--
unotools/source/config/pathoptions.cxx | 2
unotools/source/config/syslocaleoptions.cxx | 2
unotools/source/config/undoopt.cxx | 1
6 files changed, 22 insertions(+), 54 deletions(-)
New commits:
commit 58ec15e4f536f35b99c22785b8a3c2104f1b1eff
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 13 14:09:27 2011 +0100
quieten this down a bit
diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx
index cc3e022..22b821d 100644
--- a/svtools/source/config/miscopt.cxx
+++ b/svtools/source/config/miscopt.cxx
@@ -345,9 +345,8 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl()
sal_Int32 nPropertyCount = seqValues.getLength();
for( sal_Int32 nProperty=0; nProperty<nPropertyCount; ++nProperty )
{
- // Safe impossible cases.
- // Check any for valid value.
- DBG_ASSERT( !(seqValues[nProperty].hasValue()==sal_False), "SvtSecurityOptions_Impl::SvtSecurityOptions_Impl()\nInvalid property value detected!\n" );
+ if (seqValues[nProperty].hasValue()==sal_False)
+ continue;
switch( nProperty )
{
case PROPERTYHANDLE_PLUGINSENABLED :
@@ -496,9 +495,8 @@ void SvtMiscOptions_Impl::Load( const Sequence< OUString >& rPropertyNames )
sal_Int32 nPropertyCount = seqValues.getLength();
for( sal_Int32 nProperty=0; nProperty<nPropertyCount; ++nProperty )
{
- // Safe impossible cases.
- // Check any for valid value.
- DBG_ASSERT( !(seqValues[nProperty].hasValue()==sal_False), "SvtSecurityOptions_Impl::SvtSecurityOptions_Impl()\nInvalid property value detected!\n" );
+ if (seqValues[nProperty].hasValue()==sal_False)
+ continue;
switch( lcl_MapPropertyName(rPropertyNames[nProperty], aInternalPropertyNames) )
{
case PROPERTYHANDLE_PLUGINSENABLED : {
commit 3bf3424fe9e12fa621551d0d3f6b6f7e1f304832
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 13 13:38:34 2011 +0100
cut down on the noise
diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx
index d2ea6d7..76247f5 100644
--- a/unotools/source/config/pathoptions.cxx
+++ b/unotools/source/config/pathoptions.cxx
@@ -536,7 +536,7 @@ SvtPathOptions_Impl::SvtPathOptions_Impl() :
}
else
{
- DBG_ERRORFILE( "wrong any type" );
+ DBG_ASSERT(!aLocale.hasValue(), "wrong any type");
m_aLocale.Language = OStringToOUString(OString("en"), RTL_TEXTENCODING_UTF8);
m_aLocale.Country = OStringToOUString(OString("US"), RTL_TEXTENCODING_UTF8);
m_aLocale.Variant = OStringToOUString(OString(""), RTL_TEXTENCODING_UTF8);
diff --git a/unotools/source/config/undoopt.cxx b/unotools/source/config/undoopt.cxx
index fc7878f..884c093 100644
--- a/unotools/source/config/undoopt.cxx
+++ b/unotools/source/config/undoopt.cxx
@@ -120,7 +120,6 @@ void SvtUndoOptions_Impl::Load()
{
for ( int nProp = 0; nProp < m_aPropertyNames.getLength(); nProp++ )
{
- DBG_ASSERT( pValues[nProp].hasValue(), "property value missing" );
if ( pValues[nProp].hasValue() )
{
switch ( nProp )
commit f3ff5f1138c0c5f90ee998409b24350d5c88ac06
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 13 13:20:49 2011 +0100
only want to know if the type changes
diff --git a/unotools/source/config/internaloptions.cxx b/unotools/source/config/internaloptions.cxx
index 0398d49..0a2bfac 100644
--- a/unotools/source/config/internaloptions.cxx
+++ b/unotools/source/config/internaloptions.cxx
@@ -262,14 +262,14 @@ SvtInternalOptions_Impl::SvtInternalOptions_Impl()
// Init baseclasses first
: ConfigItem ( ROOTNODE_INTERNAL, CONFIG_MODE_IMMEDIATE_UPDATE )
// Init member then.
- , m_bRemoveMenuEntryClose ( sal_False )
- , m_bRemoveMenuEntryBackToWebtop ( sal_False )
- , m_bRemoveMenuEntryNewWebtop ( sal_False )
- , m_bRemoveMenuEntryLogout ( sal_False )
- , m_bSlotCFG ( DEFAULT_SLOTCFG )
- , m_bSendCrashMail ( DEFAULT_SENDCRASHMAIL )
- , m_bUseMailUI ( DEFAULT_USEMAILUI )
- , m_aCurrentTempURL ( DEFAULT_CURRENTTEMPURL )
+ , m_bRemoveMenuEntryClose(sal_False)
+ , m_bRemoveMenuEntryBackToWebtop(sal_False)
+ , m_bRemoveMenuEntryNewWebtop(sal_False)
+ , m_bRemoveMenuEntryLogout(sal_False)
+ , m_bSlotCFG(DEFAULT_SLOTCFG)
+ , m_bSendCrashMail(DEFAULT_SENDCRASHMAIL)
+ , m_bUseMailUI(DEFAULT_USEMAILUI)
+ , m_aCurrentTempURL(DEFAULT_CURRENTTEMPURL)
{
// Use our list of configuration keys to get his values.
// structure of internal section: (first 2 entries are fixed - all other are member of a set!)
@@ -291,12 +291,12 @@ SvtInternalOptions_Impl::SvtInternalOptions_Impl()
DBG_ASSERT( !(seqNames.getLength()!=seqValues.getLength()), "SvtInternalOptions_Impl::SvtInternalOptions_Impl()\nI miss some values of configuration keys!\n" );
// Read fixed values first!
- DBG_ASSERT(!(seqValues[FIXPROPERTYHANDLE_SLOTCFG].getValueTypeClass()!=TypeClass_BOOLEAN) , "SvtInternalOptions_Impl::SvtInternalOptions_Impl()\nWho has changed the value type of \"Office.Common\\Internal\\Slot\"?" );
- DBG_ASSERT(!(seqValues[FIXPROPERTYHANDLE_SENDCRASHMAIL].getValueTypeClass()!=TypeClass_BOOLEAN) , "SvtInternalOptions_Impl::SvtInternalOptions_Impl()\nWho has changed the value type of \"Office.Common\\Internal\\SendCrashMail\"?" );
- seqValues[FIXPROPERTYHANDLE_SLOTCFG ] >>= m_bSlotCFG ;
- seqValues[FIXPROPERTYHANDLE_SENDCRASHMAIL ] >>= m_bSendCrashMail ;
- seqValues[FIXPROPERTYHANDLE_USEMAILUI ] >>= m_bUseMailUI ;
- seqValues[FIXPROPERTYHANDLE_CURRENTTEMPURL ] >>= m_aCurrentTempURL ;
+ DBG_ASSERT(!seqValues[FIXPROPERTYHANDLE_SLOTCFG].hasValue() || (seqValues[FIXPROPERTYHANDLE_SLOTCFG].getValueTypeClass() == TypeClass_BOOLEAN), "SvtInternalOptions_Impl::SvtInternalOptions_Impl()\nWho has changed the value type of \"Office.Common\\Internal\\Slot\"?");
+ DBG_ASSERT(!seqValues[FIXPROPERTYHANDLE_SENDCRASHMAIL].hasValue() || !(seqValues[FIXPROPERTYHANDLE_SENDCRASHMAIL].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtInternalOptions_Impl::SvtInternalOptions_Impl()\nWho has changed the value type of \"Office.Common\\Internal\\SendCrashMail\"?");
+ seqValues[FIXPROPERTYHANDLE_SLOTCFG] >>= m_bSlotCFG;
+ seqValues[FIXPROPERTYHANDLE_SENDCRASHMAIL] >>= m_bSendCrashMail;
+ seqValues[FIXPROPERTYHANDLE_USEMAILUI] >>= m_bUseMailUI;
+ seqValues[FIXPROPERTYHANDLE_CURRENTTEMPURL] >>= m_aCurrentTempURL;
}
//*****************************************************************************************************************
commit 2423ee21333b6e4051875cde535dddea15c04d4f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 13 13:17:37 2011 +0100
ditch old commented out stuff
diff --git a/unotools/source/config/internaloptions.cxx b/unotools/source/config/internaloptions.cxx
index 86d6ea3..0398d49 100644
--- a/unotools/source/config/internaloptions.cxx
+++ b/unotools/source/config/internaloptions.cxx
@@ -297,32 +297,6 @@ SvtInternalOptions_Impl::SvtInternalOptions_Impl()
seqValues[FIXPROPERTYHANDLE_SENDCRASHMAIL ] >>= m_bSendCrashMail ;
seqValues[FIXPROPERTYHANDLE_USEMAILUI ] >>= m_bUseMailUI ;
seqValues[FIXPROPERTYHANDLE_CURRENTTEMPURL ] >>= m_aCurrentTempURL ;
-// seqValues[FIXPROPERTYHANDLE_REMOVEMENUENTRYCLOSE ] >>= m_bRemoveMenuEntryClose ;
-// seqValues[FIXPROPERTYHANDLE_REMOVEMENUENTRYBACKTOWEBTOP ] >>= m_bRemoveMenuEntryBackToWebtop ;
-// seqValues[FIXPROPERTYHANDLE_REMOVEMENUENTRYNEWWEBTOP ] >>= m_bRemoveMenuEntryNewWebtop ;
-// seqValues[FIXPROPERTYHANDLE_REMOVEMENUENTRYLOGOUT ] >>= m_bRemoveMenuEntryLogout ;
-/*
- // Read dynamical set "RecoveryList" then.
- // 3 subkeys for every item!
- // Attention: Start at next element after last fixed entry! We must ignore "Slot" and "SendCrashMail" ...
- tIMPL_RecoveryEntry aEntry;
- sal_uInt32 nCount = seqValues.getLength() ;
- sal_uInt32 nPosition = FIXPROPERTYCOUNT ;
-
- while( nPosition<nCount )
- {
- seqValues[nPosition] >>= aEntry.sURL ;
- ++nPosition;
- seqValues[nPosition] >>= aEntry.sFilter ;
- ++nPosition;
- seqValues[nPosition] >>= aEntry.sTempName ;
- ++nPosition;
- m_aRecoveryList.push_front( aEntry );
- }
-*/
- // We don't need any notifications here.
- // "Slot" and "SendCrashMail" are readonly(!) and our recovery list should not modified during runtime - it's used
- // by our crash guard only ... otherwise we have a big problem.
}
//*****************************************************************************************************************
commit 1b5ca93dad3cf9b09af17412ab1562c3b88d0057
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 13 13:16:38 2011 +0100
handle missing values gracefully
diff --git a/unotools/source/config/localisationoptions.cxx b/unotools/source/config/localisationoptions.cxx
index a8f1bf8..3afc667 100644
--- a/unotools/source/config/localisationoptions.cxx
+++ b/unotools/source/config/localisationoptions.cxx
@@ -194,13 +194,12 @@ SvtLocalisationOptions_Impl::SvtLocalisationOptions_Impl()
// Follow assignment use order of values in relation to our list of key names!
DBG_ASSERT( !(seqNames.getLength()!=seqValues.getLength()), "SvtLocalisationOptions_Impl::SvtLocalisationOptions_Impl()\nI miss some values of configuration keys!\n" );
- // Copy values from list in right order to ouer internal member.
+ // Copy values from list in right order to our internal member.
sal_Int32 nPropertyCount = seqValues.getLength();
for( sal_Int32 nProperty=0; nProperty<nPropertyCount; ++nProperty )
{
- // Safe impossible cases.
- // Check any for valid value.
- DBG_ASSERT( !(seqValues[nProperty].hasValue()==sal_False), "SvtLocalisationOptions_Impl::SvtLocalisationOptions_Impl()\nInvalid property value detected!\n" );
+ if (!seqValues[nProperty].hasValue())
+ continue;
switch( nProperty )
{
case PROPERTYHANDLE_AUTOMNEMONIC : {
commit 2919c5b9b217834497a401624ceb4c3cb90cfb64
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 13 13:15:05 2011 +0100
spare us the extra warnings
diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx
index e92f8af..5abeca2 100644
--- a/unotools/source/config/syslocaleoptions.cxx
+++ b/unotools/source/config/syslocaleoptions.cxx
@@ -183,7 +183,6 @@ SvtSysLocaleOptions_Impl::SvtSysLocaleOptions_Impl()
{
for ( sal_Int32 nProp = 0; nProp < aNames.getLength(); nProp++ )
{
- DBG_ASSERT( pValues[nProp].hasValue(), "property value missing" );
if ( pValues[nProp].hasValue() )
{
switch ( nProp )
@@ -242,7 +241,6 @@ SvtSysLocaleOptions_Impl::SvtSysLocaleOptions_Impl()
}
}
}
-// UpdateMiscSettings_Impl();
EnableNotification( aNames );
}
More information about the Libreoffice-commits
mailing list