summaryrefslogtreecommitdiffstats
path: root/vcl/source/window/dockwin.cxx
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2016-10-11 00:04:12 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2016-10-11 00:07:44 +0300
commitb197a47889a81b0181553a2a9c4db9683dd5d760 (patch)
treedae0ccd9926cf5bba4e83d025ed5be4634020260 /vcl/source/window/dockwin.cxx
parentMerge SystemWindow and FloatingWindow setPosSizeOnContainee methods (diff)
downloadcore-b197a47889a81b0181553a2a9c4db9683dd5d760.tar.gz
core-b197a47889a81b0181553a2a9c4db9683dd5d760.zip
Height and Width seem to be swapped here
when height takes left-right borders, and width top-bottom. And also - Why do we calculate the borders twice - as the call to CalcWindowSize does this again? Change-Id: I63a66939bd526a225ccac9bdd6262feba48da5c2
Diffstat (limited to 'vcl/source/window/dockwin.cxx')
-rw-r--r--vcl/source/window/dockwin.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index 8dff109b6b50..9a523c7a1311 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -1072,10 +1072,8 @@ Size DockingWindow::GetOptimalSize() const
sal_Int32 nBorderWidth = get_border_width();
- aSize.Height() += mpWindowImpl->mnLeftBorder + mpWindowImpl->mnRightBorder
- + 2*nBorderWidth;
- aSize.Width() += mpWindowImpl->mnTopBorder + mpWindowImpl->mnBottomBorder
- + 2*nBorderWidth;
+ aSize.Height() += 2 * nBorderWidth;
+ aSize.Width() += 2 * nBorderWidth;
return Window::CalcWindowSize(aSize);
}