diff options
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/inc/taskpane/PanelId.hxx | 13 | ||||
-rwxr-xr-x | sd/source/ui/toolpanel/ToolPanelViewShell.cxx | 18 |
2 files changed, 24 insertions, 7 deletions
diff --git a/sd/source/ui/inc/taskpane/PanelId.hxx b/sd/source/ui/inc/taskpane/PanelId.hxx index 43018f11f177..565745f97140 100644 --- a/sd/source/ui/inc/taskpane/PanelId.hxx +++ b/sd/source/ui/inc/taskpane/PanelId.hxx @@ -44,12 +44,13 @@ namespace sd { namespace toolpanel */ enum PanelId { - PID_UNKNOWN = 0, - PID_MASTER_PAGES = 1, - PID_LAYOUT = 2, - PID_TABLE_DESIGN = 3, - PID_CUSTOM_ANIMATION = 4, - PID_SLIDE_TRANSITION = 5 + PID_MASTER_PAGES = 0, + PID_LAYOUT = 1, + PID_TABLE_DESIGN = 2, + PID_CUSTOM_ANIMATION = 3, + PID_SLIDE_TRANSITION = 4, + + PID_UNKNOWN = 5 }; PanelId GetStandardPanelId( const ::rtl::OUString& i_rTaskPanelResourceURL ); diff --git a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx index 336ef3b6622c..204559043647 100755 --- a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx +++ b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx @@ -211,6 +211,7 @@ private: */ class ToolPanelViewShell_Impl :public ::boost::noncopyable ,public ::svt::IToolPanelDeckListener + ,public ::sfx2::IToolPanelCompare { public: static const size_t mnInvalidId = static_cast< size_t >( -1 ); @@ -259,6 +260,9 @@ private: virtual void LayouterChanged( const ::svt::PDeckLayouter& i_rNewLayouter ); virtual void Dying(); + // IToolPanelCompare overridables + virtual short compareToolPanelsURLs( const ::rtl::OUString& i_rLHS, const ::rtl::OUString& i_rRHS ) const; + private: struct InitialPanel { @@ -735,7 +739,7 @@ void ToolPanelViewShell::DeactivatePanel( const ::rtl::OUString& i_rPanelResourc // --------------------------------------------------------------------------------------------------------------------- ToolPanelViewShell_Impl::ToolPanelViewShell_Impl( ToolPanelViewShell& i_rPanelViewShell, ::Window& i_rPanelDeckParent ) :m_rPanelViewShell( i_rPanelViewShell ) - ,m_pTaskPane( new ::sfx2::ModuleTaskPane( i_rPanelDeckParent, i_rPanelViewShell.GetViewShellBase().GetViewFrame()->GetFrame()->GetFrameInterface() ) ) + ,m_pTaskPane( new ::sfx2::ModuleTaskPane( i_rPanelDeckParent, i_rPanelViewShell.GetViewShellBase().GetViewFrame()->GetFrame()->GetFrameInterface(), *this ) ) ,m_bInitialized( false ) { const String sPaneTitle( SdResId( STR_RIGHT_PANE_TITLE ) ); @@ -831,6 +835,18 @@ void ToolPanelViewShell_Impl::Dying() } // --------------------------------------------------------------------------------------------------------------------- +short ToolPanelViewShell_Impl::compareToolPanelsURLs( const ::rtl::OUString& i_rLHS, const ::rtl::OUString& i_rRHS ) const +{ + const PanelId eLHS( GetStandardPanelId( i_rLHS, true ) ); + const PanelId eRHS( GetStandardPanelId( i_rRHS, true ) ); + if ( eLHS < eRHS ) + return -1; + if ( eLHS == eRHS ) + return 0; + return 1; +} + +// --------------------------------------------------------------------------------------------------------------------- void ToolPanelViewShell_Impl::ConnectToDockingWindow() { m_pTaskPaneController.reset(); |