summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-06-30 20:28:58 +0200
committerThomas Arnhold <thomas@arnhold.org>2013-06-30 20:28:58 +0200
commit504499ad9f17be5350b878fa99e814612eaffb5f (patch)
tree73137f9ab0b351c213d9a5d325a32fcf515e904c /tools
parentc84370cc7f31845daf084e2d701cb982f0fc19dc (diff)
resmgr: bInUse is useless
Change-Id: I619d5d1ff9f6242be652674e4df54ad5c5ddc017
Diffstat (limited to 'tools')
-rw-r--r--tools/source/rc/resmgr.cxx26
1 files changed, 9 insertions, 17 deletions
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index d734242ed5ec..e0c9f7271c7b 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -623,28 +623,20 @@ void InternalResMgr::FreeGlobalRes( void * pResHandle, void * pResource )
OUString GetTypeRes_Impl( const ResId& rTypeId )
{
- // Return on resource errors
- static int bInUse = false;
OUString aTypStr(OUString::number(rTypeId.GetId()));
- if ( !bInUse )
- {
- bInUse = true;
-
- ResId aResId( sal_uInt32(RSCVERSION_ID), *rTypeId.GetResMgr() );
- aResId.SetRT( RSC_VERSIONCONTROL );
+ ResId aResId( sal_uInt32(RSCVERSION_ID), *rTypeId.GetResMgr() );
+ aResId.SetRT( RSC_VERSIONCONTROL );
- if ( rTypeId.GetResMgr()->GetResource( aResId ) )
+ if ( rTypeId.GetResMgr()->GetResource( aResId ) )
+ {
+ rTypeId.SetRT( RSC_STRING );
+ if ( rTypeId.GetResMgr()->IsAvailable( rTypeId ) )
{
- rTypeId.SetRT( RSC_STRING );
- if ( rTypeId.GetResMgr()->IsAvailable( rTypeId ) )
- {
- aTypStr = rTypeId.toString();
- // Set class pointer to the end
- rTypeId.GetResMgr()->Increment( sizeof( RSHEADER_TYPE ) );
- }
+ aTypStr = rTypeId.toString();
+ // Set class pointer to the end
+ rTypeId.GetResMgr()->Increment( sizeof( RSHEADER_TYPE ) );
}
- bInUse = false;
}
return aTypStr;