From 2b83e73fd7b059c4ad224e3163f9d57c6cc6e1c7 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 18 Apr 2017 17:13:03 +0100 Subject: remove freshly unused menu support from src files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I038711a0c4d440d452d5b2ae1bfcba5c9305815b Reviewed-on: https://gerrit.libreoffice.org/36646 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- tools/source/rc/rc.cxx | 9 ----- tools/source/rc/resmgr.cxx | 89 ---------------------------------------------- 2 files changed, 98 deletions(-) (limited to 'tools') diff --git a/tools/source/rc/rc.cxx b/tools/source/rc/rc.cxx index 2f0ea96a9986..2fb97564a298 100644 --- a/tools/source/rc/rc.cxx +++ b/tools/source/rc/rc.cxx @@ -24,15 +24,6 @@ #include #include -void Resource::GetRes( const ResId& rResId ) -{ - if( rResId.GetResMgr() ) - m_pResMgr = rResId.GetResMgr(); - assert(m_pResMgr); - m_pResMgr->GetResource( rResId, this ); - IncrementRes( sizeof( RSHEADER_TYPE ) ); -} - OUString ResId::toString() const { SetRT( RSC_STRING ); diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx index 646d12723976..db8f9c10e362 100644 --- a/tools/source/rc/resmgr.cxx +++ b/tools/source/rc/resmgr.cxx @@ -1083,40 +1083,6 @@ void ResMgr::PopContext( const Resource* pResObj ) } } -RSHEADER_TYPE* ResMgr::CreateBlock( const ResId& rId ) -{ - osl::Guard aGuard( getResMgrMutex() ); - - if( pFallbackResMgr ) - { - ResId aId( rId ); - aId.ClearResMgr(); - return pFallbackResMgr->CreateBlock( aId ); - } - - RSHEADER_TYPE* pHeader = nullptr; - if ( GetResource( rId ) ) - { - // Pointer is at the beginning of the resource, thus - // class pointer points to the header, and the remaining size - // equals to total size of allocated memory - pHeader = static_cast(rtl_allocateMemory( GetRemainSize() )); - memcpy( pHeader, GetClass(), GetRemainSize() ); - Increment( pHeader->GetLocalOff() ); //ans Ende setzen - if ( pHeader->GetLocalOff() != pHeader->GetGlobOff() ) - // Has sub-resources, thus release them as well - PopContext(); - } - - return pHeader; -} - -sal_Int16 ResMgr::GetShort( void const * pShort ) -{ - return ((*(static_cast(pShort) + 0) << 8) | - (*(static_cast(pShort) + 1) << 0) ); -} - sal_Int32 ResMgr::GetLong( void const * pLong ) { return ((*(static_cast(pLong) + 0) << 24) | @@ -1160,33 +1126,12 @@ sal_uInt32 ResMgr::GetString( OUString& rStr, const sal_uInt8* pStr ) return nRet; } -sal_uInt32 ResMgr::GetByteString( OString& rStr, const sal_uInt8* pStr ) -{ - sal_uInt32 nLen=0; - sal_uInt32 nRet = GetStringSize( pStr, nLen ); - rStr = OString( reinterpret_cast(pStr), nLen ); - return nRet; -} - sal_uInt32 ResMgr::GetStringSize( const sal_uInt8* pStr, sal_uInt32& nLen ) { nLen = static_cast< sal_uInt32 >( strlen( reinterpret_cast(pStr) ) ); return GetStringSize( nLen ); } -sal_uInt32 ResMgr::GetRemainSize() -{ - osl::Guard aGuard( getResMgrMutex() ); - - if( pFallbackResMgr ) - return pFallbackResMgr->GetRemainSize(); - - const ImpRCStack& rTop = aStack[nCurStack]; - return (sal_uInt32)(reinterpret_cast(rTop.pResource) + - rTop.pResource->GetLocalOff() - - reinterpret_cast(rTop.pClassRes)); -} - void* ResMgr::Increment( sal_uInt32 nSize ) { osl::Guard aGuard( getResMgrMutex() ); @@ -1306,18 +1251,6 @@ ResMgr* ResMgr::SearchCreateResMgr( return pImp ? new ResMgr( pImp ) : nullptr; } -sal_Int16 ResMgr::ReadShort() -{ - osl::Guard aGuard( getResMgrMutex() ); - - if( pFallbackResMgr ) - return pFallbackResMgr->ReadShort(); - - sal_Int16 n = GetShort( GetClass() ); - Increment( sizeof( sal_Int16 ) ); - return n; -} - sal_Int32 ResMgr::ReadLong() { osl::Guard aGuard( getResMgrMutex() ); @@ -1360,28 +1293,6 @@ OUString ResMgr::ReadString() return aRet; } -OString ResMgr::ReadByteString() -{ - osl::Guard aGuard( getResMgrMutex() ); - - if( pFallbackResMgr ) - return pFallbackResMgr->ReadByteString(); - - OString aRet; - - const ImpRCStack& rTop = aStack[nCurStack]; - if( (rTop.Flags & RCFlags::NOTFOUND) ) - { - #if OSL_DEBUG_LEVEL > 0 - aRet = OString( "" ); - #endif - } - else - Increment( GetByteString( aRet, static_cast(GetClass()) ) ); - - return aRet; -} - void ResMgr::SetReadStringHook( ResHookProc pProc ) { osl::Guard aGuard( getResMgrMutex() ); -- cgit