You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2013/03/19 17:40:33 UTC

svn commit: r1458395 - in /openoffice/branches/sidebar/main/sw/source/ui/sidebar: PagePropertyPanel.cxx PagePropertyPanel.hxx SwPanelFactory.cxx

Author: orw
Date: Tue Mar 19 16:40:32 2013
New Revision: 1458395

URL: http://svn.apache.org/r1458395
Log:
#121793# - class <sw::sidebar::PagePropertyPanel> - some clean-up of not needed stuff (e.g. context switch handling)

Modified:
    openoffice/branches/sidebar/main/sw/source/ui/sidebar/PagePropertyPanel.cxx
    openoffice/branches/sidebar/main/sw/source/ui/sidebar/PagePropertyPanel.hxx
    openoffice/branches/sidebar/main/sw/source/ui/sidebar/SwPanelFactory.cxx

Modified: openoffice/branches/sidebar/main/sw/source/ui/sidebar/PagePropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/ui/sidebar/PagePropertyPanel.cxx?rev=1458395&r1=1458394&r2=1458395&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/ui/sidebar/PagePropertyPanel.cxx (original)
+++ openoffice/branches/sidebar/main/sw/source/ui/sidebar/PagePropertyPanel.cxx Tue Mar 19 16:40:32 2013
@@ -48,29 +48,22 @@ namespace sw { namespace sidebar {
 
 PagePropertyPanel* PagePropertyPanel::Create (
     Window* pParent,
-    const cssu::Reference<css::frame::XFrame>& rxFrame,
     SfxBindings* pBindings)
 {
     if (pParent == NULL)
         throw ::com::sun::star::lang::IllegalArgumentException(A2S("no parent Window given to PagePropertyPanel::Create"), NULL, 0);
-    if ( ! rxFrame.is())
-        throw ::com::sun::star::lang::IllegalArgumentException(A2S("no XFrame given to PagePropertyPanel::Create"), NULL, 1);
     if (pBindings == NULL)
         throw ::com::sun::star::lang::IllegalArgumentException(A2S("no SfxBindings given to PagePropertyPanel::Create"), NULL, 2);
     
     return new PagePropertyPanel(
         pParent,
-        rxFrame,
         pBindings);
 }
 
 PagePropertyPanel::PagePropertyPanel(
             Window* pParent,
-            const cssu::Reference<css::frame::XFrame>& rxFrame,
             SfxBindings* pBindings)
     : Control(pParent, SW_RES(RID_PROPERTYPANEL_SWPAGE))
-    , mxFrame(rxFrame)
-    , maContext()
     , mpBindings(pBindings)
     // visible controls
     , maFtOrientation( this, SW_RES(FT_ORIENTATION) )
@@ -253,29 +246,6 @@ void PagePropertyPanel::Initialize()
 }
 
 
-void PagePropertyPanel::DataChanged( const DataChangedEvent& rEvent )
-{
-    // currently nothing special to do
-
-    // forward to base class
-    Control::DataChanged( rEvent );
-}
-
-
-void PagePropertyPanel::HandleContextChange( const ::sfx2::sidebar::EnumContext aContext)
-{
-    if (maContext == aContext)
-    {
-        // nothing to do.
-        return;
-    }
-
-    maContext = aContext;
-
-    // TODO: reactions on certain context switches
-}
-
-
 void PagePropertyPanel::ShowPageStyleFormatDialog( void )
 {
     mpBindings->GetDispatcher()->Execute( FN_FORMAT_PAGE_DLG, SFX_CALLMODE_ASYNCHRON );

Modified: openoffice/branches/sidebar/main/sw/source/ui/sidebar/PagePropertyPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/ui/sidebar/PagePropertyPanel.hxx?rev=1458395&r1=1458394&r2=1458395&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/ui/sidebar/PagePropertyPanel.hxx (original)
+++ openoffice/branches/sidebar/main/sw/source/ui/sidebar/PagePropertyPanel.hxx Tue Mar 19 16:40:32 2013
@@ -24,7 +24,6 @@
 
 #include <svx/sidebar/Popup.hxx>
 
-#include <sfx2/sidebar/IContextChangeReceiver.hxx>
 #include <sfx2/sidebar/ControllerItem.hxx>
 
 namespace svx { namespace sidebar {
@@ -45,7 +44,6 @@ namespace svx { namespace sidebar {
 #include <vcl/field.hxx>
 #include <svl/intitem.hxx>
 
-#include <com/sun/star/frame/XFrame.hpp>
 #include <boost/scoped_ptr.hpp>
 
 
@@ -56,27 +54,18 @@ namespace sw { namespace sidebar {
 
     class PagePropertyPanel 
         : public Control,
-          public ::sfx2::sidebar::IContextChangeReceiver,
           public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
     {
     public:
         static PagePropertyPanel* Create(
             Window* pParent,
-            const cssu::Reference<css::frame::XFrame>& rxFrame,
-            SfxBindings* pBindings);
-
-        // override Window::DataChanged(..) inherited via Control to react on certain changes
-        virtual void DataChanged( const DataChangedEvent& rEvent );
-
-        // interface of ::sfx2::sidebar::IContextChangeReceiver
-        virtual void HandleContextChange(
-            const ::sfx2::sidebar::EnumContext aContext);
+            SfxBindings* pBindings );
 
         // interface of ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
         virtual void NotifyItemUpdate(
             const sal_uInt16 nSId,
             const SfxItemState eState,
-            const SfxPoolItem* pState);
+            const SfxPoolItem* pState );
 
         // action on 'More Options' button in panel title
         void ShowPageStyleFormatDialog( void );
@@ -112,12 +101,9 @@ namespace sw { namespace sidebar {
     private:
         PagePropertyPanel(
             Window* pParent,
-            const cssu::Reference<css::frame::XFrame>& rxFrame,
-            SfxBindings* pBindings);
+            SfxBindings* pBindings );
         virtual ~PagePropertyPanel(void);
 
-        cssu::Reference<css::frame::XFrame> mxFrame;
-        ::sfx2::sidebar::EnumContext maContext;
         SfxBindings* mpBindings;
 
         // toolboxes - on click open corresponding popup

Modified: openoffice/branches/sidebar/main/sw/source/ui/sidebar/SwPanelFactory.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/ui/sidebar/SwPanelFactory.cxx?rev=1458395&r1=1458394&r2=1458395&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/ui/sidebar/SwPanelFactory.cxx (original)
+++ openoffice/branches/sidebar/main/sw/source/ui/sidebar/SwPanelFactory.cxx Tue Mar 19 16:40:32 2013
@@ -115,7 +115,7 @@ Reference<ui::XUIElement> SAL_CALL SwPan
 #define DoesResourceEndWith(s) rsResourceURL.endsWithAsciiL(s,strlen(s))
     if (DoesResourceEndWith("/PagePropertyPanel"))
     {
-        PagePropertyPanel* pPanel = PagePropertyPanel::Create( pParentWindow, xFrame, pBindings );
+        PagePropertyPanel* pPanel = PagePropertyPanel::Create( pParentWindow, pBindings );
         xElement = sfx2::sidebar::SidebarPanelBase::Create(
             rsResourceURL,
             xFrame,