[ooo-build-commit] Branch 'ooo/OOO320' - sd/source

Jan Holesovsky kendy at kemper.freedesktop.org
Thu Dec 3 18:10:53 PST 2009


 sd/source/ui/slidesorter/controller/SlideSorterController.cxx |    2 
 sd/source/ui/slidesorter/controller/SlsFocusManager.cxx       |   31 +++++-----
 sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx   |   12 +++
 3 files changed, 29 insertions(+), 16 deletions(-)

New commits:
commit ec8f2b50f1646ade62eeb503e6d65a3bc06500f2
Author: Oliver Bolte <obo at openoffice.org>
Date:   Tue Dec 1 10:53:27 2009 +0000

    CWS-TOOLING: integrate CWS ooo32gsl07
    2009-11-24 09:00:19 +0100 hdu  r277603 : #i107076# device DPI also gets a maximum limit
    2009-11-23 11:43:01 +0100 hdu  r277593 : #i107076# device DPI now gets a minimum limit
    2009-11-20 16:41:39 +0100 hdu  r277582 : #ii107076# limit minimal device resolution
    2009-11-20 13:42:09 +0100 af  r277578 : #i107049# Do not scroll focus indicator into view when slide sorter is focused.
    2009-11-20 11:31:54 +0100 aw  r277576 : ooo32gsl07 #i106214# corrected MinAutoPaperSize for Cell BlockFormatting
    2009-11-20 10:28:09 +0100 hdu  r277573 : #i107006# text justification invalidates previous measurements of a layout

diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index c835575..26b66e6 100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -604,7 +604,7 @@ IMPL_LINK(SlideSorterController, WindowEventHandler, VclWindowEvent*, pEvent)
 
             case VCLEVENT_WINDOW_GETFOCUS:
                 if (pActiveWindow != NULL && pWindow == pActiveWindow)
-                    GetFocusManager().ShowFocus();
+                    GetFocusManager().ShowFocus(false);
                 break;
 
             case VCLEVENT_WINDOW_LOSEFOCUS:
diff --git a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
index 9cb8c7d..7e834de 100644
--- a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
@@ -133,17 +133,17 @@ void FocusManager::MoveFocus (FocusMoveDirection eDirection)
         }
 
         if (mbPageIsFocused)
-            ShowFocusIndicator(GetFocusedPageDescriptor());
+            ShowFocusIndicator(GetFocusedPageDescriptor(), true);
     }
 }
 
 
 
 
-void FocusManager::ShowFocus (void)
+void FocusManager::ShowFocus (const bool bScrollToFocus)
 {
     mbPageIsFocused = true;
-    ShowFocusIndicator(GetFocusedPageDescriptor());
+    ShowFocusIndicator(GetFocusedPageDescriptor(), bScrollToFocus);
 }
 
 
@@ -254,20 +254,25 @@ void FocusManager::HideFocusIndicator (const model::SharedPageDescriptor& rpDesc
 
 
 
-void FocusManager::ShowFocusIndicator (const model::SharedPageDescriptor& rpDescriptor)
+void FocusManager::ShowFocusIndicator (
+    const model::SharedPageDescriptor& rpDescriptor,
+    const bool bScrollToFocus)
 {
     if (rpDescriptor.get() != NULL)
     {
         rpDescriptor->SetFocus ();
-        
-        // Scroll the focused page object into the visible area and repaint
-        // it, so that the focus indicator becomes visible.
-        view::SlideSorterView& rView (mrSlideSorter.GetView());
-        mrSlideSorter.GetController().GetSelectionManager()->MakeRectangleVisible (
-            rView.GetPageBoundingBox (
-                GetFocusedPageDescriptor(),
-                view::SlideSorterView::CS_MODEL,
-                view::SlideSorterView::BBT_INFO));
+
+        if (bScrollToFocus)
+        {
+            // Scroll the focused page object into the visible area and repaint
+            // it, so that the focus indicator becomes visible.
+            view::SlideSorterView& rView (mrSlideSorter.GetView());
+            mrSlideSorter.GetController().GetSelectionManager()->MakeRectangleVisible (
+                rView.GetPageBoundingBox (
+                    GetFocusedPageDescriptor(),
+                    view::SlideSorterView::CS_MODEL,
+                    view::SlideSorterView::BBT_INFO));
+        }
 
         mrSlideSorter.GetView().RequestRepaint (rpDescriptor);
         NotifyFocusChangeListeners();
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx
index acc60b5..626fd50 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx
@@ -87,8 +87,11 @@ public:
     void MoveFocus (FocusMoveDirection eDirection);
 
     /** Show the focus indicator of the current slide.
+        @param bScrollToFocus
+            When <TRUE/> (the default) then the view is scrolled so that the
+            focus rectangle lies inside its visible area.
     */
-    void ShowFocus (void);
+    void ShowFocus (const bool bScrollToFocus = true);
 
     /** Hide the focus indicator.
     */
@@ -215,8 +218,13 @@ private:
         made visible.
         @param pDescriptor
             When NULL is given then the call is ignored.
+        @param bScrollToFocus
+            When <TRUE/> (the default) then the view is scrolled so that the
+            focus rectangle lies inside its visible area.
     */
-    void ShowFocusIndicator (const model::SharedPageDescriptor& rpDescriptor);
+    void ShowFocusIndicator (
+        const model::SharedPageDescriptor& rpDescriptor,
+        const bool bScrollToFocus);
 
     /** Call all currently registered listeners that a focus change has
         happended.  The focus may be hidden or shown or moved from one page


More information about the ooo-build-commit mailing list