[Libreoffice-commits] .: 3 commits - svtools/source vcl/source
Caolán McNamara
caolan at kemper.freedesktop.org
Mon May 23 01:06:26 PDT 2011
svtools/source/config/helpopt.cxx | 8 +++++---
svtools/source/contnr/treelist.cxx | 10 +++++-----
vcl/source/window/printdlg.cxx | 6 +++++-
3 files changed, 15 insertions(+), 9 deletions(-)
New commits:
commit cfe95e4e37562a086af6a2c388340731a9ba665e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon May 23 09:05:45 2011 +0100
WaE: build without warnings
diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx
index f5b2dfd..ae304e9 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -179,12 +179,12 @@ SvListEntry* SvTreeEntryList::operator[]( size_t i )
size_t SvTreeEntryList::GetPos( SvListEntry* pItem )
{
- for ( size_t i = 0, n = aTreeEntryList.size(); i < n; ++i ) {
- if ( aTreeEntryList[ i ] == pItem ) {
+ for ( size_t i = 0, n = aTreeEntryList.size(); i < n; ++i )
+ {
+ if ( aTreeEntryList[ i ] == pItem )
return i;
- }
}
- return NULL;
+ return 0;
}
void SvTreeEntryList::push_back( SvListEntry* pItem )
@@ -586,7 +586,7 @@ SvTreeEntryList* SvTreeList::CloneChilds( SvTreeEntryList* pChilds,
SvListEntry* pNewParent,
sal_uLong& nCloneCount ) const
{
- DBG_ASSERT(pChilds->Count(),"Childs?");
+ DBG_ASSERT(!pChilds->empty(),"Childs?");
SvTreeEntryList* pClonedChilds = new SvTreeEntryList;
for ( size_t i = 0, n = pChilds->size(); i < n; ++i )
{
commit a9f1f445e37bdb19bba52eb542ff0363f5a71ae0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun May 22 21:57:07 2011 +0100
fix indent and reduce spew
diff --git a/svtools/source/config/helpopt.cxx b/svtools/source/config/helpopt.cxx
index 9500e09..2e7d29f 100644
--- a/svtools/source/config/helpopt.cxx
+++ b/svtools/source/config/helpopt.cxx
@@ -202,7 +202,9 @@ void SvtHelpOptions_Impl::Load(const uno::Sequence< ::rtl::OUString>& rProperty
{
for ( int nProp = 0; nProp < rPropertyNames.getLength(); nProp++ )
{
- DBG_ASSERT( pValues[nProp].hasValue(), "property value missing" );
+#if OSL_DEBUG_LEVEL > 1
+ OSL_ASSERT( pValues[nProp].hasValue(), "property value missing" );
+#endif
if ( pValues[nProp].hasValue() )
{
sal_Bool bTmp = sal_Bool();
@@ -264,8 +266,8 @@ void SvtHelpOptions_Impl::Load(const uno::Sequence< ::rtl::OUString>& rProperty
}
else
{
- DBG_ERRORFILE( "Wrong Type!" );
- }
+ DBG_ERRORFILE( "Wrong Type!" );
+ }
}
}
if ( IsHelpTips() != Help::IsQuickHelpEnabled() )
commit 7013e8af149d2abedfff281b740bdb42268daed3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 20 22:19:29 2011 +0100
output unsupported property name
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 75628c0..6067d59 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -1534,7 +1534,11 @@ void PrintDialog::setupOptionalUI()
}
else
{
- OSL_FAIL( "Unsupported UI option" );
+ rtl::OStringBuffer sMessage;
+ sMessage.append(RTL_CONSTASCII_STRINGPARAM("Unsupported UI option: \""));
+ sMessage.append(rtl::OUStringToOString(aCtrlType, RTL_TEXTENCODING_UTF8));
+ sMessage.append('"');
+ OSL_FAIL( sMessage.getStr() );
}
pCurColumn = pSaveCurColumn;
More information about the Libreoffice-commits
mailing list