[Libreoffice-commits] core.git: Branch 'feature/slidehack' - 2 commits - sd/source

Michael Meeks michael.meeks at suse.com
Wed Apr 10 04:22:47 PDT 2013


 sd/source/ui/inc/SlideSorterChildWindow.hxx               |    3 
 sd/source/ui/inc/SlideSorterViewShell.hxx                 |   20 +
 sd/source/ui/inc/ViewShell.hxx                            |    3 
 sd/source/ui/slidesorter/shell/SlideSorter.cxx            |  130 ------------
 sd/source/ui/slidesorter/shell/SlideSorterChildWindow.cxx |    8 
 sd/source/ui/slidesorter/shell/SlideSorterService.cxx     |  144 --------------
 sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx   |  131 ++++++++++++
 sd/source/ui/slidesorter/view/SlideSorterView.cxx         |   11 +
 8 files changed, 164 insertions(+), 286 deletions(-)

New commits:
commit 306e688216c1399ca9807b4e6be3058745a4ddfa
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Wed Apr 10 12:21:24 2013 +0100

    initial, horrible attempt at slidejockey / search pane.
    
    Apparently integrating with the View is really not entirely trivial.
    
    Change-Id: Id9db5fdb69b17d26d3ade9e09714c2fd49d744bd

diff --git a/sd/source/ui/inc/SlideSorterViewShell.hxx b/sd/source/ui/inc/SlideSorterViewShell.hxx
index 656622f..17568b5 100644
--- a/sd/source/ui/inc/SlideSorterViewShell.hxx
+++ b/sd/source/ui/inc/SlideSorterViewShell.hxx
@@ -31,10 +31,15 @@ namespace sd { namespace slidesorter { namespace controller {
 class SlotManager;
 } } }
 
+class Edit;
+class VclVBox;
+class VclHBox;
+class FixedText;
 
 namespace sd { namespace slidesorter {
 
 class SlideSorter;
+class SlideSorterContainer;
 
 class SlideSorterViewShell
     : public ViewShell
@@ -195,7 +200,7 @@ protected:
         ViewShellBase& rViewShellBase,
         ::Window* pParentWindow,
         FrameView* pFrameView);
-    void Initialize (void);
+    virtual void Initialize (void);
 
     /** This method overwrites the one from our base class:  We do our own
         scroll bar and the base class call is thus unnecessary.  It simply
@@ -211,11 +216,18 @@ class SlideJockeyViewShell
     : public SlideSorterViewShell
 {
     friend class controller::SlotManager;
+    ::std::auto_ptr<VclVBox> mpPaned;
+    ::std::auto_ptr<VclHBox> mpTopHBox;
+    ::std::auto_ptr<FixedText> mpLabel;
+    ::std::auto_ptr<Edit> mpSearchEdit;
+    ::std::auto_ptr<SlideSorterContainer> mpSorterContainer;
 
 public:
     TYPEINFO();
     SFX_DECL_INTERFACE(SD_IF_SDSLIDEJOCKEYVIEWSHELL)
 
+    virtual ~SlideJockeyViewShell();
+
     static ::boost::shared_ptr<SlideJockeyViewShell> Create(
         SfxViewFrame* pFrame,
         ViewShellBase& rViewShellBase,
@@ -223,6 +235,12 @@ public:
         FrameView* pFrameView,
         const bool bIsCenterPane);
 
+    /// Place and size our contents
+    virtual void ArrangeGUIElements (void);
+
+protected:
+    virtual void Initialize (void);
+
 private:
     SlideJockeyViewShell (
         SfxViewFrame* pFrame,
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index d2e3ce7..4444e59 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -62,6 +62,11 @@
 #include <cppuhelper/bootstrap.hxx>
 #include <comphelper/processfactory.hxx>
 
+// pieces for SlideJockeyView which doesn't truly belong here.
+#include <vcl/edit.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/layout.hxx>
+
 using namespace ::sd::slidesorter;
 #define SlideSorterViewShell
 #define SlideJockeyViewShell
@@ -688,9 +693,15 @@ SlideJockeyViewShell::SlideJockeyViewShell ( SfxViewFrame* _pFrame,
                                              FrameView* _pFrameView ) :
     SlideSorterViewShell( _pFrame, _rViewShellBase, _pParentWindow, _pFrameView )
 {
-    fprintf( stderr, "Create slide jockey\n" );
     meShellType = ST_JOCKEY_SORTER;
-    SetName (OUString("SlideJockeyViewShell"));
+    SetName(OUString("SlideJockeyViewShell"));
+}
+
+SlideJockeyViewShell::~SlideJockeyViewShell()
+{
+    // FIXME: need to delete this early - it holds references on random widgets.
+    mpSlideSorter.reset();
+    fprintf(stderr, "Delete slide jockey %p\n", this);
 }
 
 ::boost::shared_ptr<SlideJockeyViewShell> SlideJockeyViewShell::Create (
@@ -718,6 +729,122 @@ SlideJockeyViewShell::SlideJockeyViewShell ( SfxViewFrame* _pFrame,
     return pViewShell;
 }
 
+class SlideSorterContainer : public VclBin
+{
+public:
+    ::boost::shared_ptr<SlideSorter> mpSlideSorter;
+    Size maRequisition;
+
+    SlideSorterContainer( VclContainer *pParent, SlideJockeyViewShell *pShell )
+        : VclBin( pParent )
+    {
+        mpSlideSorter = SlideSorter::CreateSlideSorter( pShell->GetViewShellBase(), pShell, *pParent );
+        Show();
+        mpSlideSorter->GetContentWindow()->Show();
+    }
+    virtual void setAllocation(const Size& rAllocation)
+    {
+        fprintf(stderr, "setAllocation %d,%d %dx%d\n",
+                (int)GetPosPixel().X(), (int)GetPosPixel().Y(),
+                (int)rAllocation.Width(), (int)rAllocation.Height());
+
+        mpSlideSorter->ArrangeGUIElements(GetPosPixel(), rAllocation);
+
+        VclBin::setAllocation( rAllocation );
+    }
+    virtual Size calculateRequisition() const
+    {
+        return maRequisition;
+    }
+    void setRequisition(const Size &rSize)
+    {
+        maRequisition = rSize;
+        Resize();
+    }
+    virtual void Paint( const Rectangle& rRect )
+    { // for reasons unknown the background is not painted at all here [!]
+      // who should do that ?
+        fprintf(stderr,"SlideSortercontainer::Paint ...\n");
+        Erase();
+        VclBin::Paint( rRect );
+    }
+/*  virtual Window *get_child()
+    {
+       return mpSlideSorter->GetView().Show();
+    } */
+};
+
+void SlideJockeyViewShell::Initialize (void)
+{
+    fprintf( stderr, "Create custom slide jockey layout\n" );
+
+// FIXME: I need to write a layout enabled GtkPaned replacement
+//        using a splitter manually is just -too- bad ...
+
+    mpPaned.reset( new VclVBox( mpContentWindow.get(), true, 8 ) );
+    mpPaned->set_fill( true );
+    mpPaned->Show();
+
+    mpTopHBox.reset( new VclHBox( mpPaned.get(), false, 8 ) );
+    mpTopHBox->set_pack_type( VCL_PACK_START );
+    mpTopHBox->set_vexpand( false );
+    mpTopHBox->set_fill( false );
+    mpTopHBox->Show();
+    mpLabel.reset( new FixedText( mpTopHBox.get() ) );
+    mpLabel->SetText( "Search:" ); // FIXME: i18n ...
+    mpLabel->set_hexpand( false );
+    mpLabel->set_fill( true );
+    mpLabel->Show();
+    mpSearchEdit.reset( new Edit( mpTopHBox.get() ) );
+    mpSearchEdit->set_hexpand( true );
+    mpSearchEdit->SetPlaceholderText( "<enter slide search terms>" ); // FIXME: i18n ...
+    mpSearchEdit->Show();
+
+    mpSorterContainer.reset( new ::SlideSorterContainer( mpPaned.get(), this ) );
+    mpSorterContainer->set_vexpand( true );
+    mpSorterContainer->set_hexpand( true );
+    mpSorterContainer->set_fill( true );
+    mpSlideSorter = mpSorterContainer->mpSlideSorter;
+    mpView = &mpSlideSorter->GetView();
+
+    doShow();
+
+    SetPool( &GetDoc()->GetPool() );
+    SetUndoManager( GetDoc()->GetDocSh()->GetUndoManager() );
+
+    // For accessibility we have to shortly hide the content window.
+    // This triggers the construction of a new accessibility object for
+    // the new view shell.  (One is created earlier while the construtor
+    // of the base class is executed.  At that time the correct
+    // accessibility object can not be constructed.)
+    SharedSdWindow pWindow( mpSlideSorter->GetContentWindow() );
+    if ( pWindow )
+    {
+        pWindow->Hide();
+        pWindow->Show();
+    }
+}
+
+void SlideJockeyViewShell::ArrangeGUIElements (void)
+{
+    if (IsActive())
+    {
+        fprintf(stderr, "Arrange elements size %d %d\n",
+                (int) maViewSize.Width(), (int)maViewSize.Height() );
+
+        OSL_ASSERT(mpSlideSorter.get()!=NULL);
+
+        mpPaned->SetPosSizePixel(maViewPos, maViewSize);
+// FIXME: should trickle down the stack ...
+//        mpSorterContainer->setRequisition( maViewSize );
+//        mpSorterContainer->Resize();
+
+        mbIsArrangeGUIElementsPending = false;
+    }
+    else
+        mbIsArrangeGUIElementsPending = true;
+}
+
 } } // end of namespace ::sd::slidesorter
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index 622f96d..fecd7d7 100644
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -523,6 +523,9 @@ void SlideSorterView::DeterminePageObjectVisibilities (void)
         mbPageObjectVisibilitiesValid = true;
 
         Rectangle aViewArea (pWindow->PixelToLogic(Rectangle(Point(0,0),pWindow->GetSizePixel())));
+        fprintf(stderr ,"SlideSorterView::DeterminePageObjectvisi %ld,%ld %ldx%ld\n",
+                aViewArea.getX(), aViewArea.getY(),
+                aViewArea.getWidth(), aViewArea.getHeight());
         const Range aRange (mpLayouter->GetRangeOfVisiblePageObjects(aViewArea));
         const Range aUnion(
             ::std::min(maVisiblePageRange.Min(), aRange.Min()),
@@ -757,9 +760,16 @@ void SlideSorterView::Paint (
     OutputDevice& rDevice,
     const Rectangle& rRepaintArea)
 {
+    fprintf(stderr ,"SlideSorterView::Paint %ld,%ld %ldx%ld\n",
+            rRepaintArea.getX(), rRepaintArea.getY(),
+            rRepaintArea.getWidth(), rRepaintArea.getHeight());
+
     if ( ! mpPageObjectPainter)
         if ( ! GetPageObjectPainter())
+        {
+            fprintf(stderr, "bail early !\n");
             return;
+        }
 
     // Update the page visibilities when they have been invalidated.
     if ( ! mbPageObjectVisibilitiesValid)
@@ -774,6 +784,7 @@ void SlideSorterView::Paint (
     // Paint all page objects that are fully or partially inside the
     // repaint region.
     const Range aRange (mpLayouter->GetRangeOfVisiblePageObjects(rRepaintArea));
+    fprintf(stderr, "Visible slides are: %d -> %d\n", (int) aRange.Min(), (int)aRange.Max());
     for (sal_Int32 nIndex=aRange.Min(); nIndex<=aRange.Max(); ++nIndex)
     {
         model::SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nIndex));
commit cfcb6b9c762a7043ecc79b49a835a14f45980de8
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Tue Apr 9 16:11:41 2013 +0100

    more excessive whitespace redux.
    
    Change-Id: If7b03e5894b6ee8afbef756d866c0f605bb846ef

diff --git a/sd/source/ui/inc/SlideSorterChildWindow.hxx b/sd/source/ui/inc/SlideSorterChildWindow.hxx
index f691644..3ee58ab 100644
--- a/sd/source/ui/inc/SlideSorterChildWindow.hxx
+++ b/sd/source/ui/inc/SlideSorterChildWindow.hxx
@@ -38,8 +38,7 @@ public:
         sal_uInt16,
         SfxBindings*,
         SfxChildWinInfo*);
-
-    virtual ~SlideSorterChildWindow (void);
+    virtual ~SlideSorterChildWindow () {}
 
     SFX_DECL_CHILDWINDOW (SlideBrowserChildWindow);
 };
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index 67c7e8a..2ee52b6 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -587,9 +587,6 @@ private:
     void SetupRulers (void);
 };
 
-
-
-
 ::Window* ViewShell::GetParentWindow (void) const
 {
     return mpParentWindow;
diff --git a/sd/source/ui/slidesorter/shell/SlideSorter.cxx b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
index 791f9eb..7d46053 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorter.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
@@ -69,9 +69,6 @@ private:
 };
 }
 
-
-
-
 //===== SlideSorter ===========================================================
 
 ::boost::shared_ptr<SlideSorter> SlideSorter::CreateSlideSorter(
@@ -92,9 +89,6 @@ private:
     return pSlideSorter;
 }
 
-
-
-
 ::boost::shared_ptr<SlideSorter> SlideSorter::CreateSlideSorter (
     ViewShellBase& rBase,
     ViewShell* pViewShell,
@@ -109,9 +103,6 @@ private:
     return pSlideSorter;
 }
 
-
-
-
 SlideSorter::SlideSorter (
     ViewShell& rViewShell,
     const ::boost::shared_ptr<sd::Window>& rpContentWindow,
@@ -136,9 +127,6 @@ SlideSorter::SlideSorter (
 {
 }
 
-
-
-
 SlideSorter::SlideSorter (
     ViewShellBase& rBase,
     ViewShell* pViewShell,
@@ -161,9 +149,6 @@ SlideSorter::SlideSorter (
 {
 }
 
-
-
-
 void SlideSorter::Init (void)
 {
     if (mpViewShellBase != NULL)
@@ -208,9 +193,6 @@ void SlideSorter::Init (void)
     }
 }
 
-
-
-
 SlideSorter::~SlideSorter (void)
 {
     mbIsValid = false;
@@ -245,78 +227,50 @@ SlideSorter::~SlideSorter (void)
     mpContentWindow.reset();
 }
 
-
-
-
 bool SlideSorter::IsValid (void) const
 {
     return mbIsValid;
 }
 
-
-
-
 ::boost::shared_ptr<ScrollBar> SlideSorter::GetVerticalScrollBar (void) const
 {
     return mpVerticalScrollBar;
 }
 
-
-
-
-
 ::boost::shared_ptr<ScrollBar> SlideSorter::GetHorizontalScrollBar (void) const
 {
     return mpHorizontalScrollBar;
 }
 
-
-
-
 ::boost::shared_ptr<ScrollBarBox> SlideSorter::GetScrollBarFiller (void) const
 {
     return mpScrollBarBox;
 }
 
-
-
-
 model::SlideSorterModel& SlideSorter::GetModel (void) const
 {
     OSL_ASSERT(mpSlideSorterModel.get()!=NULL);
     return *mpSlideSorterModel;
 }
 
-
-
-
 view::SlideSorterView& SlideSorter::GetView (void) const
 {
     OSL_ASSERT(mpSlideSorterView.get()!=NULL);
     return *mpSlideSorterView;
 }
 
-
-
-
 controller::SlideSorterController& SlideSorter::GetController (void) const
 {
     OSL_ASSERT(mpSlideSorterController.get()!=NULL);
     return *mpSlideSorterController;
 }
 
-
-
-
 Reference<frame::XController> SlideSorter::GetXController (void) const
 {
     Reference<frame::XController> xController(mxControllerWeak);
     return xController;
 }
 
-
-
-
 void SlideSorter::Paint (const Rectangle& rRepaintArea)
 {
     GetController().Paint(
@@ -324,42 +278,27 @@ void SlideSorter::Paint (const Rectangle& rRepaintArea)
         GetContentWindow().get());
 }
 
-
-
-
 ::SharedSdWindow SlideSorter::GetContentWindow (void) const
 {
     return mpContentWindow;
 }
 
-
-
-
 ViewShellBase* SlideSorter::GetViewShellBase (void) const
 {
     return mpViewShellBase;
 }
 
-
-
-
 ViewShell* SlideSorter::GetViewShell (void) const
 {
     return mpViewShell;
 }
 
-
-
-
 void SlideSorter::SetupControls (::Window* )
 {
     GetVerticalScrollBar()->Show();
     mpSlideSorterController->GetScrollBarManager().LateInitialization();
 }
 
-
-
-
 void SlideSorter::SetupListeners (void)
 {
     SharedSdWindow pWindow (GetContentWindow());
@@ -387,9 +326,6 @@ void SlideSorter::SetupListeners (void)
     mpSlideSorterController->GetScrollBarManager().Connect();
 }
 
-
-
-
 void SlideSorter::ReleaseListeners (void)
 {
     mpSlideSorterController->GetScrollBarManager().Disconnect();
@@ -415,9 +351,6 @@ void SlideSorter::ReleaseListeners (void)
             WindowEventHandler));
 }
 
-
-
-
 void SlideSorter::CreateModelViewController (void)
 {
     mpSlideSorterModel.reset(CreateModel());
@@ -439,9 +372,6 @@ void SlideSorter::CreateModelViewController (void)
     mpSlideSorterView->Init();
 }
 
-
-
-
 model::SlideSorterModel* SlideSorter::CreateModel (void)
 {
     // Get pointers to the document.
@@ -456,17 +386,11 @@ model::SlideSorterModel* SlideSorter::CreateModel (void)
         return NULL;
 }
 
-
-
-
 view::SlideSorterView* SlideSorter::CreateView (void)
 {
     return new view::SlideSorterView (*this);
 }
 
-
-
-
 controller::SlideSorterController* SlideSorter::CreateController (void)
 {
     controller::SlideSorterController* pController
@@ -474,9 +398,6 @@ controller::SlideSorterController* SlideSorter::CreateController (void)
     return pController;
 }
 
-
-
-
 void SlideSorter::ArrangeGUIElements (
     const Point& rOffset,
     const Size& rSize)
@@ -501,9 +422,6 @@ void SlideSorter::ArrangeGUIElements (
     }
 }
 
-
-
-
 SvBorder SlideSorter::GetBorder (void)
 {
     SvBorder aBorder;
@@ -519,9 +437,6 @@ SvBorder SlideSorter::GetBorder (void)
     return aBorder;
 }
 
-
-
-
 bool SlideSorter::RelocateToWindow (::Window* pParentWindow)
 {
    // Stop all animations for they have been started for the old window.
@@ -549,9 +464,6 @@ bool SlideSorter::RelocateToWindow (::Window* pParentWindow)
     return true;
 }
 
-
-
-
 void SlideSorter::SetCurrentFunction (const FunctionReference& rpFunction)
 {
     if (GetViewShell() != NULL)
@@ -567,27 +479,18 @@ void SlideSorter::SetCurrentFunction (const FunctionReference& rpFunction)
     }
 }
 
-
-
-
 ::boost::shared_ptr<controller::Properties> SlideSorter::GetProperties (void) const
 {
     OSL_ASSERT(mpProperties);
     return mpProperties;
 }
 
-
-
-
 ::boost::shared_ptr<view::Theme> SlideSorter::GetTheme (void) const
 {
     OSL_ASSERT(mpTheme);
     return mpTheme;
 }
 
-
-
-
 //===== ContentWindow =========================================================
 
 namespace {
@@ -603,91 +506,58 @@ ContentWindow::ContentWindow(
     SetStyle(GetStyle() | WB_NOPOINTERFOCUS);
 }
 
-
-
-
 ContentWindow::~ContentWindow (void)
 {
 }
 
-
-
-
 void ContentWindow::SetCurrentFunction (const FunctionReference& rpFunction)
 {
     mpCurrentFunction = rpFunction;
 }
 
-
-
-
 void ContentWindow::Paint (const Rectangle& rRect)
 {
     mrSlideSorter.Paint(rRect);
 }
 
-
-
-
 void ContentWindow::KeyInput (const KeyEvent& rEvent)
 {
     if (mpCurrentFunction.is())
         mpCurrentFunction->KeyInput(rEvent);
 }
 
-
-
-
 void ContentWindow::MouseMove (const MouseEvent& rEvent)
 {
     if (mpCurrentFunction.is())
         mpCurrentFunction->MouseMove(rEvent);
 }
 
-
-
-
 void ContentWindow::MouseButtonUp(const MouseEvent& rEvent)
 {
     if (mpCurrentFunction.is())
         mpCurrentFunction->MouseButtonUp(rEvent);
 }
 
-
-
-
 void ContentWindow::MouseButtonDown(const MouseEvent& rEvent)
 {
     if (mpCurrentFunction.is())
         mpCurrentFunction->MouseButtonDown(rEvent);
 }
 
-
-
-
 void ContentWindow::Command(const CommandEvent& rEvent)
 {
     if (mpCurrentFunction.is())
         mpCurrentFunction->Command(rEvent);
 }
 
-
-
-
 long ContentWindow::Notify (NotifyEvent& rEvent)
 {
     (void)rEvent;
     return 0;
 }
 
-
-
 } // end of anonymous namespace
 
-
-
-
-
 } } // end of namespace ::sd::slidesorter
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterChildWindow.cxx b/sd/source/ui/slidesorter/shell/SlideSorterChildWindow.cxx
index 25ece1f..7dcec17 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterChildWindow.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterChildWindow.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
 #include "SlideSorterChildWindow.hxx"
 
 #include "app.hrc"
@@ -44,13 +43,6 @@ SlideSorterChildWindow::SlideSorterChildWindow (
     //  SetHideNotDelete (sal_True);
 }
 
-
-
-
-SlideSorterChildWindow::~SlideSorterChildWindow (void)
-{}
-
-
 SFX_IMPL_DOCKINGWINDOW(SlideSorterChildWindow, SID_SLIDE_BROWSER)
 
 } } // end of namespace ::sd::slidesorter
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
index 5d95121..93982fe 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
 #include "SlideSorterService.hxx"
 #include "controller/SlideSorterController.hxx"
 #include "controller/SlsProperties.hxx"
@@ -53,9 +52,6 @@ namespace {
     };
 }
 
-
-
-
 //===== Service ===============================================================
 
 Reference<XInterface> SAL_CALL SlideSorterService_createInstance (
@@ -64,27 +60,18 @@ Reference<XInterface> SAL_CALL SlideSorterService_createInstance (
     return Reference<XInterface>(static_cast<drawing::XDrawView*>(new SlideSorterService(rxContext)));
 }
 
-
-
-
 OUString SlideSorterService_getImplementationName (void) throw(RuntimeException)
 {
     return OUString("com.sun.star.comp.Draw.SlideSorter");
 }
 
-
-
-
 Sequence<OUString> SAL_CALL SlideSorterService_getSupportedServiceNames (void)
     throw (RuntimeException)
 {
-    static const OUString sServiceName("com.sun.star.drawing.SlideSorter");
+    const OUString sServiceName("com.sun.star.drawing.SlideSorter");
     return Sequence<OUString>(&sServiceName, 1);
 }
 
-
-
-
 //===== SlideSorterService ==========================================================
 
 SlideSorterService::SlideSorterService (const Reference<XComponentContext>& rxContext)
@@ -95,16 +82,10 @@ SlideSorterService::SlideSorterService (const Reference<XComponentContext>& rxCo
     (void)rxContext;
 }
 
-
-
-
 SlideSorterService::~SlideSorterService (void)
 {
 }
 
-
-
-
 void SAL_CALL SlideSorterService::disposing (void)
 {
     mpSlideSorter.reset();
@@ -115,9 +96,6 @@ void SAL_CALL SlideSorterService::disposing (void)
     }
 }
 
-
-
-
 //----- XInitialization -------------------------------------------------------
 
 void SAL_CALL SlideSorterService::initialize (const Sequence<Any>& rArguments)
@@ -168,9 +146,6 @@ void SAL_CALL SlideSorterService::initialize (const Sequence<Any>& rArguments)
     }
 }
 
-
-
-
 //----- XView -----------------------------------------------------------------
 
 Reference<XResourceId> SAL_CALL SlideSorterService::getResourceId (void)
@@ -179,18 +154,12 @@ Reference<XResourceId> SAL_CALL SlideSorterService::getResourceId (void)
     return mxViewId;
 }
 
-
-
-
 sal_Bool SAL_CALL SlideSorterService::isAnchorOnly (void)
     throw (RuntimeException)
 {
     return sal_False;
 }
 
-
-
-
 //----- XWindowListener -------------------------------------------------------
 
 void SAL_CALL SlideSorterService::windowResized (const awt::WindowEvent& rEvent)
@@ -202,19 +171,12 @@ void SAL_CALL SlideSorterService::windowResized (const awt::WindowEvent& rEvent)
     Resize();
 }
 
-
-
-
-
 void SAL_CALL SlideSorterService::windowMoved (const awt::WindowEvent& rEvent)
     throw (RuntimeException)
 {
     (void)rEvent;
 }
 
-
-
-
 void SAL_CALL SlideSorterService::windowShown (const lang::EventObject& rEvent)
     throw (RuntimeException)
 {
@@ -223,9 +185,6 @@ void SAL_CALL SlideSorterService::windowShown (const lang::EventObject& rEvent)
     Resize();
 }
 
-
-
-
 void SAL_CALL SlideSorterService::windowHidden (const lang::EventObject& rEvent)
     throw (RuntimeException)
 {
@@ -233,9 +192,6 @@ void SAL_CALL SlideSorterService::windowHidden (const lang::EventObject& rEvent)
     ThrowIfDisposed();
 }
 
-
-
-
 //----- lang::XEventListener --------------------------------------------------
 
 void SAL_CALL SlideSorterService::disposing (const lang::EventObject& rEvent)
@@ -245,9 +201,6 @@ void SAL_CALL SlideSorterService::disposing (const lang::EventObject& rEvent)
         mxParentWindow = NULL;
 }
 
-
-
-
 //----- XDrawView -------------------------------------------------------------
 
 void SAL_CALL SlideSorterService::setCurrentPage(const Reference<drawing::XDrawPage>& rxSlide)
@@ -259,9 +212,6 @@ void SAL_CALL SlideSorterService::setCurrentPage(const Reference<drawing::XDrawP
             mpSlideSorter->GetModel().GetIndex(rxSlide));
 }
 
-
-
-
 Reference<drawing::XDrawPage> SAL_CALL SlideSorterService::getCurrentPage (void)
     throw (RuntimeException)
 {
@@ -272,21 +222,14 @@ Reference<drawing::XDrawPage> SAL_CALL SlideSorterService::getCurrentPage (void)
         return NULL;
 }
 
-
-
-
 //----- attributes ------------------------------------------------------------
 
-
 Reference<container::XIndexAccess> SAL_CALL SlideSorterService::getDocumentSlides (void)
     throw (RuntimeException)
 {
     return mpSlideSorter->GetModel().GetDocumentSlides();
 }
 
-
-
-
 void SAL_CALL SlideSorterService::setDocumentSlides (
     const Reference<container::XIndexAccess >& rxSlides)
     throw (RuntimeException)
@@ -296,9 +239,6 @@ void SAL_CALL SlideSorterService::setDocumentSlides (
         mpSlideSorter->GetController().SetDocumentSlides(rxSlides);
 }
 
-
-
-
 sal_Bool SAL_CALL SlideSorterService::getIsHighlightCurrentSlide (void)
     throw (RuntimeException)
 {
@@ -309,9 +249,6 @@ sal_Bool SAL_CALL SlideSorterService::getIsHighlightCurrentSlide (void)
         return mpSlideSorter->GetProperties()->IsHighlightCurrentSlide();
 }
 
-
-
-
 void SAL_CALL SlideSorterService::setIsHighlightCurrentSlide (sal_Bool bValue)
     throw (RuntimeException)
 {
@@ -324,9 +261,6 @@ void SAL_CALL SlideSorterService::setIsHighlightCurrentSlide (sal_Bool bValue)
     }
 }
 
-
-
-
 sal_Bool SAL_CALL SlideSorterService::getIsShowSelection (void)
     throw (RuntimeException)
 {
@@ -337,9 +271,6 @@ sal_Bool SAL_CALL SlideSorterService::getIsShowSelection (void)
         return mpSlideSorter->GetProperties()->IsShowSelection();
 }
 
-
-
-
 void SAL_CALL SlideSorterService::setIsShowSelection (sal_Bool bValue)
     throw (RuntimeException)
 {
@@ -348,9 +279,6 @@ void SAL_CALL SlideSorterService::setIsShowSelection (sal_Bool bValue)
         mpSlideSorter->GetProperties()->SetShowSelection(bValue);
 }
 
-
-
-
 sal_Bool SAL_CALL SlideSorterService::getIsShowFocus (void)
     throw (RuntimeException)
 {
@@ -361,9 +289,6 @@ sal_Bool SAL_CALL SlideSorterService::getIsShowFocus (void)
         return mpSlideSorter->GetProperties()->IsShowFocus();
 }
 
-
-
-
 void SAL_CALL SlideSorterService::setIsShowFocus (sal_Bool bValue)
     throw (RuntimeException)
 {
@@ -372,9 +297,6 @@ void SAL_CALL SlideSorterService::setIsShowFocus (sal_Bool bValue)
         mpSlideSorter->GetProperties()->SetShowFocus(bValue);
 }
 
-
-
-
 sal_Bool SAL_CALL SlideSorterService::getIsCenterSelection (void)
     throw (RuntimeException)
 {
@@ -385,9 +307,6 @@ sal_Bool SAL_CALL SlideSorterService::getIsCenterSelection (void)
         return mpSlideSorter->GetProperties()->IsCenterSelection();
 }
 
-
-
-
 void SAL_CALL SlideSorterService::setIsCenterSelection (sal_Bool bValue)
     throw (RuntimeException)
 {
@@ -396,9 +315,6 @@ void SAL_CALL SlideSorterService::setIsCenterSelection (sal_Bool bValue)
         mpSlideSorter->GetProperties()->SetCenterSelection(bValue);
 }
 
-
-
-
 sal_Bool SAL_CALL SlideSorterService::getIsSuspendPreviewUpdatesDuringFullScreenPresentation (void)
     throw (RuntimeException)
 {
@@ -410,9 +326,6 @@ sal_Bool SAL_CALL SlideSorterService::getIsSuspendPreviewUpdatesDuringFullScreen
             ->IsSuspendPreviewUpdatesDuringFullScreenPresentation();
 }
 
-
-
-
 void SAL_CALL SlideSorterService::setIsSuspendPreviewUpdatesDuringFullScreenPresentation (
     sal_Bool bValue)
     throw (RuntimeException)
@@ -423,9 +336,6 @@ void SAL_CALL SlideSorterService::setIsSuspendPreviewUpdatesDuringFullScreenPres
             ->SetSuspendPreviewUpdatesDuringFullScreenPresentation(bValue);
 }
 
-
-
-
 sal_Bool SAL_CALL SlideSorterService::getIsOrientationVertical (void)
     throw (RuntimeException)
 {
@@ -436,9 +346,6 @@ sal_Bool SAL_CALL SlideSorterService::getIsOrientationVertical (void)
         return mpSlideSorter->GetView().GetOrientation() != Layouter::HORIZONTAL;
 }
 
-
-
-
 void SAL_CALL SlideSorterService::setIsOrientationVertical (sal_Bool bValue)
     throw (RuntimeException)
 {
@@ -449,9 +356,6 @@ void SAL_CALL SlideSorterService::setIsOrientationVertical (sal_Bool bValue)
             : Layouter::HORIZONTAL);
 }
 
-
-
-
 sal_Bool SAL_CALL SlideSorterService::getIsSmoothScrolling (void)
     throw (RuntimeException)
 {
@@ -462,9 +366,6 @@ sal_Bool SAL_CALL SlideSorterService::getIsSmoothScrolling (void)
         return mpSlideSorter->GetProperties()->IsSmoothSelectionScrolling();
 }
 
-
-
-
 void SAL_CALL SlideSorterService::setIsSmoothScrolling (sal_Bool bValue)
     throw (RuntimeException)
 {
@@ -473,9 +374,6 @@ void SAL_CALL SlideSorterService::setIsSmoothScrolling (sal_Bool bValue)
         mpSlideSorter->GetProperties()->SetSmoothSelectionScrolling(bValue);
 }
 
-
-
-
 util::Color SAL_CALL SlideSorterService::getBackgroundColor (void)
     throw (RuntimeException)
 {
@@ -487,9 +385,6 @@ util::Color SAL_CALL SlideSorterService::getBackgroundColor (void)
             mpSlideSorter->GetProperties()->GetBackgroundColor().GetColor());
 }
 
-
-
-
 void SAL_CALL SlideSorterService::setBackgroundColor (util::Color aBackgroundColor)
     throw (RuntimeException)
 {
@@ -498,9 +393,6 @@ void SAL_CALL SlideSorterService::setBackgroundColor (util::Color aBackgroundCol
         mpSlideSorter->GetProperties()->SetBackgroundColor(Color(aBackgroundColor));
 }
 
-
-
-
 util::Color SAL_CALL SlideSorterService::getTextColor (void)
     throw (css::uno::RuntimeException)
 {
@@ -512,9 +404,6 @@ util::Color SAL_CALL SlideSorterService::getTextColor (void)
             mpSlideSorter->GetProperties()->GetTextColor().GetColor());
 }
 
-
-
-
 void SAL_CALL SlideSorterService::setTextColor (util::Color aTextColor)
     throw (RuntimeException)
 {
@@ -523,9 +412,6 @@ void SAL_CALL SlideSorterService::setTextColor (util::Color aTextColor)
         mpSlideSorter->GetProperties()->SetTextColor(Color(aTextColor));
 }
 
-
-
-
 util::Color SAL_CALL SlideSorterService::getSelectionColor (void)
     throw (RuntimeException)
 {
@@ -537,9 +423,6 @@ util::Color SAL_CALL SlideSorterService::getSelectionColor (void)
             mpSlideSorter->GetProperties()->GetSelectionColor().GetColor());
 }
 
-
-
-
 void SAL_CALL SlideSorterService::setSelectionColor (util::Color aSelectionColor)
     throw (RuntimeException)
 {
@@ -548,9 +431,6 @@ void SAL_CALL SlideSorterService::setSelectionColor (util::Color aSelectionColor
         mpSlideSorter->GetProperties()->SetSelectionColor(Color(aSelectionColor));
 }
 
-
-
-
 util::Color SAL_CALL SlideSorterService::getHighlightColor (void)
     throw (RuntimeException)
 {
@@ -562,9 +442,6 @@ util::Color SAL_CALL SlideSorterService::getHighlightColor (void)
             mpSlideSorter->GetProperties()->GetHighlightColor().GetColor());
 }
 
-
-
-
 void SAL_CALL SlideSorterService::setHighlightColor (util::Color aHighlightColor)
     throw (RuntimeException)
 {
@@ -573,8 +450,6 @@ void SAL_CALL SlideSorterService::setHighlightColor (util::Color aHighlightColor
         mpSlideSorter->GetProperties()->SetHighlightColor(Color(aHighlightColor));
 }
 
-
-
 sal_Bool SAL_CALL SlideSorterService::getIsUIReadOnly (void)
     throw (RuntimeException)
 {
@@ -585,9 +460,6 @@ sal_Bool SAL_CALL SlideSorterService::getIsUIReadOnly (void)
         return mpSlideSorter->GetProperties()->IsUIReadOnly();
 }
 
-
-
-
 void SAL_CALL SlideSorterService::setIsUIReadOnly (sal_Bool bIsUIReadOnly)
     throw (RuntimeException)
 {
@@ -596,11 +468,6 @@ void SAL_CALL SlideSorterService::setIsUIReadOnly (sal_Bool bIsUIReadOnly)
         mpSlideSorter->GetProperties()->SetUIReadOnly(bIsUIReadOnly);
 }
 
-
-
-
-//-----------------------------------------------------------------------------
-
 void SlideSorterService::Resize (void)
 {
     if (mxParentWindow.is())
@@ -612,20 +479,17 @@ void SlideSorterService::Resize (void)
     }
 }
 
-
-
-
 void SlideSorterService::ThrowIfDisposed (void)
     throw (::com::sun::star::lang::DisposedException)
 {
-    if (SlideSorterServiceInterfaceBase::rBHelper.bDisposed || SlideSorterServiceInterfaceBase::rBHelper.bInDispose)
+    if (SlideSorterServiceInterfaceBase::rBHelper.bDisposed ||
+        SlideSorterServiceInterfaceBase::rBHelper.bInDispose)
     {
         throw lang::DisposedException ("SlideSorterService object has already been disposed",
-            static_cast<drawing::XDrawView*>(this));
+                                       static_cast<drawing::XDrawView*>(this));
     }
 }
 
-
 } } // end of namespace ::sd::presenter
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list