[Libreoffice-commits] core.git: 4 commits - dbaccess/uiconfig svtools/source vcl/source

Maxim Monastirsky momonasmon at gmail.com
Fri Sep 29 10:03:12 UTC 2017


 dbaccess/uiconfig/dbapp/menubar/menubar.xml  |    8 ++++----
 svtools/source/uno/popupwindowcontroller.cxx |    2 +-
 vcl/source/window/dockmgr.cxx                |   15 +++++++++++++--
 vcl/source/window/dockwin.cxx                |    8 ++++----
 4 files changed, 22 insertions(+), 11 deletions(-)

New commits:
commit 0582d54d89bc6b3f36eaac0768a97e82303a97ca
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Wed Sep 27 00:22:52 2017 +0300

    WB_MOVEABLE should not trigger tearoff mode
    
    As any .ui based docking window gets it unconditionally,
    see extractDeferredBits function in builder.cxx.
    
    Change-Id: I339a72989ad09d8ea7106f5690fc950ee7ba35da

diff --git a/svtools/source/uno/popupwindowcontroller.cxx b/svtools/source/uno/popupwindowcontroller.cxx
index 166a58d262ed..51f2b6e10f42 100644
--- a/svtools/source/uno/popupwindowcontroller.cxx
+++ b/svtools/source/uno/popupwindowcontroller.cxx
@@ -208,7 +208,7 @@ Reference< awt::XWindow > SAL_CALL PopupWindowController::createPopupWindow()
             else
                 nWinBits = pWin->GetStyle();
 
-            if ( nWinBits & ( WB_MOVEABLE | WB_SIZEABLE | WB_CLOSEABLE ) )
+            if ( nWinBits & ( WB_SIZEABLE | WB_CLOSEABLE ) )
                 eFloatFlags |= FloatWinPopupFlags::AllowTearOff;
 
             pWin->EnableDocking();
commit 8789bee5d2ab24fb68c66f2a493937a27b034af8
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Tue Sep 26 23:46:58 2017 +0300

    Improve the comment
    
    Change-Id: I131c3e584f4c30b075431a400f9ba6fd6dfa2f9a

diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index 64a6aa4673c1..2e442a815e05 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -996,8 +996,8 @@ void DockingWindow::setPosSizeOnContainee()
 {
     Size aSize = GetOutputSizePixel();
 
-    // Can't use get_border_width() here, because we don't want
-    // the border to be also visible to the floating window.
+    // Don't make the border width accessible via get_border_width(),
+    // otherwise the floating window will handle the border as well.
     sal_Int32 nBorderWidth = mpWindowImpl->mnBorderWidth;
 
     aSize.Width() -= 2 * nBorderWidth;
@@ -1015,8 +1015,8 @@ Size DockingWindow::GetOptimalSize() const
 
     Size aSize = VclContainer::getLayoutRequisition(*GetWindow(GetWindowType::FirstChild));
 
-    // Can't use get_border_width() here, because we don't want
-    // the border to be also visible to the floating window.
+    // Don't make the border width accessible via get_border_width(),
+    // otherwise the floating window will handle the border as well.
     sal_Int32 nBorderWidth = mpWindowImpl->mnBorderWidth;
 
     aSize.Height() += 2 * nBorderWidth;
commit 1450a8cb113f81a19b2b07a4ec7f2d436dabb9dc
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Tue Sep 26 23:31:58 2017 +0300

    Make sure GetText() is called at the right stage
    
    And document why (similar to DockingWindow::SetFloatingMode).
    
    Change-Id: Iefd7d756dfcdfc385344161862d7cc1e492e3711

diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 67569f773ee4..ef290c642ced 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -942,8 +942,13 @@ void ImplDockingWindowWrapper::ImplPreparePopupMode( FloatWinPopupFlags nFlags )
     else
         pWin = VclPtr<ImplPopupFloatWin>::Create( mpParent, bAllowTearOff );
     pWin->SetPopupModeEndHdl( LINK( this, ImplDockingWindowWrapper, PopupModeEnd ) );
-    pWin->SetText( GetWindow()->GetText() );
 
+    // At least for DockingWindow, GetText() has a side effect of setting deferred
+    // properties. This must be done before setting the border window (see below),
+    // so that the border width will end up in mpWindowImpl->mnBorderWidth, not in
+    // the border window (See DockingWindow::setPosSizeOnContainee() and
+    // DockingWindow::GetOptimalSize()).
+    pWin->SetText( GetWindow()->GetText() );
     pWin->SetOutputSizePixel( GetWindow()->GetSizePixel() );
 
     GetWindow()->mpWindowImpl->mpBorderWindow  = nullptr;
@@ -1073,6 +1078,13 @@ void ImplDockingWindowWrapper::SetFloatingMode( bool bFloatMode )
                                           : mnFloatBits,
                                          this );
 
+                // At least for DockingWindow, GetText() has a side effect of setting deferred
+                // properties. This must be done before setting the border window (see below),
+                // so that the border width will end up in mpWindowImpl->mnBorderWidth, not in
+                // the border window (See DockingWindow::setPosSizeOnContainee() and
+                // DockingWindow::GetOptimalSize()).
+                pWin->SetText( GetWindow()->GetText() );
+
                 GetWindow()->mpWindowImpl->mpBorderWindow  = nullptr;
                 GetWindow()->mpWindowImpl->mnLeftBorder    = 0;
                 GetWindow()->mpWindowImpl->mnTopBorder     = 0;
@@ -1089,7 +1101,6 @@ void ImplDockingWindowWrapper::SetFloatingMode( bool bFloatMode )
                 pWin->mpWindowImpl->mpClientWindow = mpDockingWindow;
                 GetWindow()->mpWindowImpl->mpRealParent = pRealParent;
 
-                pWin->SetText( GetWindow()->GetText() );
                 pWin->SetOutputSizePixel( GetWindow()->GetSizePixel() );
                 pWin->SetPosPixel( maFloatPos );
                 // pass on DockingData to FloatingWindow
commit b61e1c7351d2003fd7cf2f5aaad4b936c2a9bb6b
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Mon Sep 25 22:57:44 2017 +0300

    Remove empty menu labels
    
    Change-Id: Iea775fd3915c818c47cda88796f4eaa7c5254700

diff --git a/dbaccess/uiconfig/dbapp/menubar/menubar.xml b/dbaccess/uiconfig/dbapp/menubar/menubar.xml
index 27ddebe9634d..d57aa9ce21da 100644
--- a/dbaccess/uiconfig/dbapp/menubar/menubar.xml
+++ b/dbaccess/uiconfig/dbapp/menubar/menubar.xml
@@ -101,10 +101,10 @@
     </menu:menu>
     <menu:menu menu:id=".uno:InsertMenu">
         <menu:menupopup>
-            <menu:menuitem menu:id=".uno:DBNewForm" menu:label=""/>
-            <menu:menuitem menu:id=".uno:DBNewReport" menu:label=""/>
-            <menu:menuitem menu:id=".uno:DBNewQuery" menu:label=""/>
-            <menu:menuitem menu:id=".uno:DBNewQuerySql" menu:label=""/>
+            <menu:menuitem menu:id=".uno:DBNewForm"/>
+            <menu:menuitem menu:id=".uno:DBNewReport"/>
+            <menu:menuitem menu:id=".uno:DBNewQuery"/>
+            <menu:menuitem menu:id=".uno:DBNewQuerySql"/>
             <menu:menuseparator/>
             <menu:menuitem menu:id=".uno:DBNewTable"/>
             <menu:menuitem menu:id=".uno:DBNewView"/>


More information about the Libreoffice-commits mailing list