vcl/inc/vcl/wrkwin.hxx       |   24 +++++++++++++-----------
 vcl/source/window/wrkwin.cxx |   16 ++++++++++------
 2 files changed, 23 insertions(+), 17 deletions(-)

New commits:
commit 6c3c48f1c8d672fa9e8800ae9d03aa51f4f258d7
Author: Luboš Luňák <l.lu...@suse.cz>
Date:   Mon Nov 26 14:54:34 2012 +0100

    make presentation spanning all screens work (bnc#758138)
    
    This reverts an API "improvement" from 
6ee5dfa150d408179e20a5525ff7ec46649e0e58
    that tried to use -1 as the current screen/display but failed. The check
    for nDisplayScreen being in range broke all-screens (which is
    represented as last_screen+1 value, which is broken in its own way, as e.g.
    the screen count can change). The same way -1 as the default value is 
broken,
    as everywhere else invalid invalid screen number means spanning all screens.
    The extra overloads without a default value should take care of that.
    
    Conflicts:
        vcl/source/window/wrkwin.cxx
    
    Change-Id: Ie118038eacacebc007c25860732d5904ad0de2b9
    Signed-off-by: Thorsten Behrens <tbehr...@suse.com>

diff --git a/vcl/inc/vcl/wrkwin.hxx b/vcl/inc/vcl/wrkwin.hxx
index c9a3da9..d29a178 100644
--- a/vcl/inc/vcl/wrkwin.hxx
+++ b/vcl/inc/vcl/wrkwin.hxx
@@ -80,21 +80,23 @@ public:
 
     virtual sal_Bool    Close();
 
-    /** The default value of nDisplayScreen = -1 means "don't care" and
-        allows to backends to use any screen they like (most probably
-        the current one).
-
-        NOTE: The default value cannot be 0, because 0 is a legitimate
-        Display Screen number.
-     */
-    void            ShowFullScreenMode( sal_Bool bFullScreenMode = sal_True,
-                                        sal_Int32 nDisplayScreen = -1 );
+    void            ShowFullScreenMode( sal_Bool bFullScreenMode,
+                                        sal_Int32 nDisplayScreen );
+    /**
+     @overload Calls ShowFullScreenMode( bFullScreenMode, GetScreenNumber()).
+    */
+    void            ShowFullScreenMode( sal_Bool bFullScreenMode = sal_True );
     void            EndFullScreenMode() { ShowFullScreenMode( sal_False ); }
     sal_Bool        IsFullScreenMode() const { return mbFullScreenMode; }
 
+    void            StartPresentationMode( sal_Bool   bPresentation,
+                                           sal_uInt16 nFlags,
+                                           sal_Int32  nDisplayScreen );
+    /**
+     @overload Calls StartPresentationMode( bFullScreenMode, nFlags, 
GetScreenNumber()).
+    */
     void            StartPresentationMode( sal_Bool   bPresentation = sal_True,
-                                           sal_uInt16 nFlags = 0,
-                                           sal_Int32  nDisplayScreen = 0 );
+                                           sal_uInt16 nFlags = 0 );
     void            EndPresentationMode() {  StartPresentationMode( sal_False 
); }
     sal_Bool        IsPresentationMode() const { return mbPresentationMode; }
 
diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx
index a4f79d2..df595a3 100644
--- a/vcl/source/window/wrkwin.cxx
+++ b/vcl/source/window/wrkwin.cxx
@@ -183,17 +183,16 @@ WorkWindow::~WorkWindow()
 
 // -----------------------------------------------------------------------
 
+void WorkWindow::ShowFullScreenMode( sal_Bool bFullScreenMode )
+{
+    return ShowFullScreenMode( bFullScreenMode, GetScreenNumber());
+}
+
 void WorkWindow::ShowFullScreenMode( sal_Bool bFullScreenMode, sal_Int32 
nDisplayScreen )
 {
     if ( !mbFullScreenMode == !bFullScreenMode )
         return;
 
-    if( (nDisplayScreen < 0)
-    || (nDisplayScreen >= 
static_cast<sal_Int32>(Application::GetScreenCount()) ) )
-    {
-        nDisplayScreen = GetScreenNumber();
-    }
-
     mbFullScreenMode = bFullScreenMode != 0;
     if ( !mbSysChild )
     {
@@ -216,6 +215,11 @@ void WorkWindow::ShowFullScreenMode( sal_Bool 
bFullScreenMode, sal_Int32 nDispla
 
 // -----------------------------------------------------------------------
 
+void WorkWindow::StartPresentationMode( sal_Bool bPresentation, sal_uInt16 
nFlags )
+{
+    return StartPresentationMode( bPresentation, nFlags, GetScreenNumber());
+}
+
 void WorkWindow::StartPresentationMode( sal_Bool bPresentation, sal_uInt16 
nFlags, sal_Int32 nDisplayScreen )
 {
     if ( !bPresentation == !mbPresentationMode )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to