diff options
Diffstat (limited to 'sfx2/source/dialog/taskpane.cxx')
-rwxr-xr-x[-rw-r--r--] | sfx2/source/dialog/taskpane.cxx | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx index d1de5e0aec68..4d88ad76a500 100644..100755 --- a/sfx2/source/dialog/taskpane.cxx +++ b/sfx2/source/dialog/taskpane.cxx @@ -61,7 +61,7 @@ #include <vcl/menu.hxx> #include <vcl/svapp.hxx> #include <toolkit/helper/vclunohelper.hxx> - +#include <tools/urlobj.hxx> #include <boost/noncopyable.hpp> //...................................................................................................................... @@ -244,7 +244,7 @@ namespace sfx2 SFX_IMPL_DOCKINGWINDOW( TaskPaneWrapper, SID_TASKPANE ); //------------------------------------------------------------------------------------------------------------------ - TaskPaneWrapper::TaskPaneWrapper( Window* i_pParent, USHORT i_nId, SfxBindings* i_pBindings, SfxChildWinInfo* i_pInfo ) + TaskPaneWrapper::TaskPaneWrapper( Window* i_pParent, sal_uInt16 i_nId, SfxBindings* i_pBindings, SfxChildWinInfo* i_pInfo ) :SfxChildWindow( i_pParent, i_nId ) { pWindow = new TaskPaneDockingWindow( i_pBindings, *this, i_pParent, @@ -255,7 +255,7 @@ namespace sfx2 pWindow->SetOutputSizePixel( Size( 300, 450 ) ); dynamic_cast< SfxDockingWindow* >( pWindow )->Initialize( i_pInfo ); - SetHideNotDelete( TRUE ); + SetHideNotDelete( sal_True ); pWindow->Show(); } @@ -310,7 +310,7 @@ namespace sfx2 virtual ::rtl::OUString GetDisplayName() const; virtual Image GetImage() const; - virtual SmartId GetHelpID() const; + virtual rtl::OString GetHelpID() const; virtual void Activate( Window& i_rParentWindow ); virtual void Deactivate(); virtual void SetSizePixel( const Size& i_rPanelWindowSize ); @@ -409,10 +409,19 @@ namespace sfx2 return m_aPanelImage; } + static rtl::OString lcl_getHelpId( const ::rtl::OUString& _rHelpURL ) + { + INetURLObject aHID( _rHelpURL ); + if ( aHID.GetProtocol() == INET_PROT_HID ) + return rtl::OUStringToOString( aHID.GetURLPath(), RTL_TEXTENCODING_UTF8 ); + else + return rtl::OUStringToOString( _rHelpURL, RTL_TEXTENCODING_UTF8 ); + } + //------------------------------------------------------------------------------------------------------------------ - SmartId CustomToolPanel::GetHelpID() const + rtl::OString CustomToolPanel::GetHelpID() const { - return SmartId( m_aPanelHelpURL ); + return lcl_getHelpId( m_aPanelHelpURL ); } //------------------------------------------------------------------------------------------------------------------ @@ -914,7 +923,7 @@ namespace sfx2 ModuleTaskPane& m_rTaskPane; TitledDockingWindow& m_rDockingWindow; - USHORT m_nViewMenuID; + sal_uInt16 m_nViewMenuID; PanelSelectorLayout m_eCurrentLayout; PanelDescriptors m_aPanelRepository; bool m_bTogglingPanelVisibility; @@ -1033,11 +1042,11 @@ namespace sfx2 switch ( i_pMenu->GetCurItemId() ) { case MID_UNLOCK_TASK_PANEL: - m_rDockingWindow.SetFloatingMode( TRUE ); + m_rDockingWindow.SetFloatingMode( sal_True ); break; case MID_LOCK_TASK_PANEL: - m_rDockingWindow.SetFloatingMode( FALSE ); + m_rDockingWindow.SetFloatingMode( sal_False ); break; case MID_LAYOUT_DRAWERS: @@ -1224,7 +1233,7 @@ namespace sfx2 // Add one entry for every tool panel element to individually make // them visible or hide them. - USHORT nIndex = MID_FIRST_PANEL; + sal_uInt16 nIndex = MID_FIRST_PANEL; for ( size_t i=0; i<m_aPanelRepository.size(); ++i, ++nIndex ) { const PanelDescriptor& rPanelDesc( m_aPanelRepository[i] ); @@ -1254,7 +1263,7 @@ namespace sfx2 String( SfxResId( STR_SFX_UNDOCK ) ) ); - pMenu->RemoveDisabledEntries( FALSE, FALSE ); + pMenu->RemoveDisabledEntries( sal_False, sal_False ); return pMenu; } |