[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - include/vcl vcl/source

Caolán McNamara caolanm at redhat.com
Tue Feb 17 05:16:03 PST 2015


 include/vcl/floatwin.hxx       |    1 +
 include/vcl/syswin.hxx         |    2 +-
 vcl/source/window/floatwin.cxx |   12 ++++++++++++
 3 files changed, 14 insertions(+), 1 deletion(-)

New commits:
commit 2575d7cb9c514bee71520f795a9a2f148c1e02c3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Feb 13 16:42:19 2015 +0000

    Resolves: tdf#86159 floating windows have complicated borders
    
    take the border window dimensions into account on the
    layout size, but not the layout position
    
    (cherry picked from commit d1f38b47c29ef5e2db2cabeb657668637d97e13d)
    
    Conflicts:
    	include/vcl/syswin.hxx
    
    Change-Id: I9deb722933e325c92e93ae917fa8e34eaccfca2d
    Reviewed-on: https://gerrit.libreoffice.org/14480
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx
index 5ad30a7..079690e 100644
--- a/include/vcl/floatwin.hxx
+++ b/include/vcl/floatwin.hxx
@@ -94,6 +94,7 @@ private:
 
     SAL_DLLPRIVATE void    ImplCallPopupModeEnd();
     DECL_DLLPRIVATE_LINK(  ImplEndPopupModeHdl, void* );
+    virtual void setPosSizeOnContainee(Size aSize, VclContainer &rBox);
 
     // Copy assignment is forbidden and not implemented.
     SAL_DLLPRIVATE         FloatingWindow (const FloatingWindow &);
diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx
index 1f98a6b..f98ca8f 100644
--- a/include/vcl/syswin.hxx
+++ b/include/vcl/syswin.hxx
@@ -164,7 +164,7 @@ public:
 private:
     SAL_DLLPRIVATE void Init();
     SAL_DLLPRIVATE void ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, long i_nHeight, vcl::Window* i_pConfigureWin );
-    SAL_DLLPRIVATE void setPosSizeOnContainee(Size aSize, VclContainer &rBox);
+    virtual void setPosSizeOnContainee(Size aSize, VclContainer &rBox);
     DECL_DLLPRIVATE_LINK( ImplHandleLayoutTimerHdl, void* );
 
 protected:
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index ec8c6a5..6b35c88 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -22,6 +22,7 @@
 #include <window.h>
 #include <salframe.hxx>
 
+#include <vcl/layout.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/wrkwin.hxx>
 #include <vcl/event.hxx>
@@ -808,4 +809,15 @@ void FloatingWindow::AddPopupModeWindow( vcl::Window* pWindow )
     mpFirstPopupModeWin = pWindow;
 }
 
+void FloatingWindow::setPosSizeOnContainee(Size aSize, VclContainer &rBox)
+{
+    sal_Int32 nBorderWidth = get_border_width();
+
+    aSize.Width() -= mpWindowImpl->mnLeftBorder + mpWindowImpl->mnRightBorder + 2 * nBorderWidth;
+    aSize.Height() -= nBorderWidth + mpWindowImpl->mnTopBorder + mpWindowImpl->mnBottomBorder + 2 * nBorderWidth;
+
+    Point aPos(nBorderWidth, nBorderWidth);
+    VclContainer::setLayoutAllocation(rBox, aPos, aSize);
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list