[Libreoffice-commits] .: 2 commits - extensions/source tools/source
Lionel Elie Mamane
lmamane at kemper.freedesktop.org
Mon Feb 13 08:58:47 PST 2012
extensions/source/abpilot/typeselectionpage.cxx | 12 +++++-------
tools/source/rc/resmgr.cxx | 17 ++++++++++++++---
2 files changed, 19 insertions(+), 10 deletions(-)
New commits:
commit bbeb0f7a82945e8d7b98e5d5da9f69dfc5c6fabe
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Mon Feb 13 17:53:19 2012 +0100
ResMgr::TestStack more robust
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index 8d83533..8af6da3 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -1012,18 +1012,29 @@ void ResMgr::TestStack( const Resource* pResObj )
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
+ int upperLimit = nCurStack;
+
+ if ( upperLimit < 0 )
+ {
+ OSL_FAIL( "resource stack underrun!" );
+ upperLimit = aStack.size() - 1;
+ }
+ else if ( upperLimit >= static_cast<int>(aStack.size()) )
+ {
+ OSL_FAIL( "stack occupation index > allocated stack size" );
+ upperLimit = aStack.size() - 1;
+ }
+
if ( DbgIsResource() )
{
- for( int i = 1; i <= nCurStack; ++i )
+ for( int i = 1; i <= upperLimit; ++i )
{
if ( aStack[i].pResObj == pResObj )
{
-#ifdef DBG_UTIL
RscError_Impl( "Resource not freed! ", this,
aStack[i].pResource->GetRT(),
aStack[i].pResource->GetId(),
aStack, i-1 );
-#endif
}
}
}
commit 8eb33ee13519bd3059cdb2019ef843fbb9a7fbd7
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Mon Feb 13 17:36:23 2012 +0100
fdo#43399 hidden radio button should also gets unset
diff --git a/extensions/source/abpilot/typeselectionpage.cxx b/extensions/source/abpilot/typeselectionpage.cxx
index 711159e..aee5219 100644
--- a/extensions/source/abpilot/typeselectionpage.cxx
+++ b/extensions/source/abpilot/typeselectionpage.cxx
@@ -110,9 +110,13 @@ namespace abp
m_aAllTypes.push_back( ButtonItem( &m_aOE, AST_OE, bWithMozilla && !bUnx ) );
m_aAllTypes.push_back( ButtonItem( &m_aOther, AST_OTHER, true ) );
- bool bFirstVisible = true;
Link aTypeSelectionHandler = LINK(this, TypeSelectionPage, OnTypeSelected );
const Size aSpacing( LogicToPixel( Size( 0, 3 ), MAP_APPFONT ) );
+ if ( ! m_aAllTypes.empty() )
+ {
+ ButtonItem aItem = m_aAllTypes[0];
+ aItem.m_pItem->SetStyle( aItem.m_pItem->GetStyle() | WB_GROUP );
+ }
for ( ::std::vector< ButtonItem >::const_iterator loop = m_aAllTypes.begin();
loop != m_aAllTypes.end(); ++loop )
{
@@ -125,12 +129,6 @@ namespace abp
aTopLeft.Y() += aItemSize.Height() + aSpacing.Height();
aItem.m_pItem->SetClickHdl( aTypeSelectionHandler );
aItem.m_pItem->Show();
-
- if ( bFirstVisible )
- {
- aItem.m_pItem->SetStyle( aItem.m_pItem->GetStyle() | WB_GROUP );
- bFirstVisible = false;
- }
}
}
}
More information about the Libreoffice-commits
mailing list