diff options
author | Xiaofei Zhang <Zhangxiaofei@openoffice.org> | 2010-11-10 13:50:33 +0800 |
---|---|---|
committer | Xiaofei Zhang <Zhangxiaofei@openoffice.org> | 2010-11-10 13:50:33 +0800 |
commit | 3491b4ac4fe34cacea5f4d0a4594d4a88cbbe7b2 (patch) | |
tree | 8dc60b794b88dd87c965d149c93fa3ac81e3096c /svtools/source/control/headbar.cxx | |
parent | 66e7dc1197e76e686ba731382d032a9a72849959 (diff) | |
parent | 95f71183414a50d12cd4bbacf47d711672e63268 (diff) |
removetooltypes01: #i112600# resync to DEV300_m92; remove tooltypes from xmloff, linguistic, vcl, svtools, accessibility, fpicker, uui and framework
Diffstat (limited to 'svtools/source/control/headbar.cxx')
-rwxr-xr-x | svtools/source/control/headbar.cxx | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index ba4ca513dd3d..f4da39f60096 100755 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -53,7 +53,7 @@ struct ImplHeadItem sal_uInt16 mnId; HeaderBarItemBits mnBits; long mnSize; - sal_uIntPtr mnHelpId; + rtl::OString maHelpId; Image maImage; XubString maOutText; XubString maText; @@ -1132,13 +1132,13 @@ void HeaderBar::RequestHelp( const HelpEvent& rHEvt ) } else if ( rHEvt.GetMode() & HELPMODE_EXTENDED ) { - sal_uIntPtr nHelpId = GetHelpId( nItemId ); - if ( nHelpId ) + rtl::OUString aHelpId( rtl::OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) ); + if ( aHelpId.getLength() ) { // Wenn eine Hilfe existiert, dann ausloesen Help* pHelp = Application::GetHelp(); if ( pHelp ) - pHelp->Start( nHelpId, this ); + pHelp->Start( aHelpId, this ); return; } } @@ -1266,7 +1266,6 @@ void HeaderBar::InsertItem( sal_uInt16 nItemId, const XubString& rText, pItem->mnId = nItemId; pItem->mnBits = nBits; pItem->mnSize = nSize; - pItem->mnHelpId = 0; pItem->maText = rText; pItem->mpUserData = 0; mpItemList->Insert( pItem, nPos ); @@ -1291,7 +1290,6 @@ void HeaderBar::InsertItem( sal_uInt16 nItemId, pItem->mnId = nItemId; pItem->mnBits = nBits; pItem->mnSize = nSize; - pItem->mnHelpId = 0; pItem->maImage = rImage; pItem->maText = rText; pItem->mpUserData = 0; @@ -1563,11 +1561,11 @@ XubString HeaderBar::GetHelpText( sal_uInt16 nItemId ) const if ( nPos != HEADERBAR_ITEM_NOTFOUND ) { ImplHeadItem* pItem = mpItemList->GetObject( nPos ); - if ( !pItem->maHelpText.Len() && pItem->mnHelpId ) + if ( !pItem->maHelpText.Len() && pItem->maHelpId.getLength() ) { Help* pHelp = Application::GetHelp(); if ( pHelp ) - pItem->maHelpText = pHelp->GetHelpText( pItem->mnHelpId, this ); + pItem->maHelpText = pHelp->GetHelpText( rtl::OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this ); } return pItem->maHelpText; @@ -1578,22 +1576,22 @@ XubString HeaderBar::GetHelpText( sal_uInt16 nItemId ) const // ----------------------------------------------------------------------- -void HeaderBar::SetHelpId( sal_uInt16 nItemId, sal_uIntPtr nHelpId ) +void HeaderBar::SetHelpId( sal_uInt16 nItemId, const rtl::OString& rHelpId ) { sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != HEADERBAR_ITEM_NOTFOUND ) - mpItemList->GetObject( nPos )->mnHelpId = nHelpId; + mpItemList->GetObject( nPos )->maHelpId = rHelpId; } // ----------------------------------------------------------------------- -sal_uIntPtr HeaderBar::GetHelpId( sal_uInt16 nItemId ) const +rtl::OString HeaderBar::GetHelpId( sal_uInt16 nItemId ) const { sal_uInt16 nPos = GetItemPos( nItemId ); + rtl::OString aRet; if ( nPos != HEADERBAR_ITEM_NOTFOUND ) - return mpItemList->GetObject( nPos )->mnHelpId; - else - return 0; + aRet = mpItemList->GetObject( nPos )->maHelpId; + return aRet; } // ----------------------------------------------------------------------- |