[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - include/vcl svx/source vcl/source
Caolán McNamara
caolanm at redhat.com
Mon Apr 13 00:26:48 PDT 2015
include/vcl/window.hxx | 4 +++-
svx/source/sidebar/PanelLayout.cxx | 1 +
vcl/source/window/syswin.cxx | 4 +---
vcl/source/window/window2.cxx | 13 ++++++++++---
4 files changed, 15 insertions(+), 7 deletions(-)
New commits:
commit b440ea2e0141f2ae394bf93ddf87923190f4ef6b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Apr 9 14:43:09 2015 +0100
Resolves: tdf#90384 queue_resize needs to Invalidate the optimal cache size
but the PanelLayout didn't
(cherry picked from commit b39a6449d5debc7cdf55c3f967b441f3de4d50f3)
Conflicts:
svx/source/sidebar/PanelLayout.cxx
vcl/source/window/dockwin.cxx
vcl/source/window/syswin.cxx
Change-Id: I38a8975f1488fa2a2ffe91b66745e1a1c6c48a28
Reviewed-on: https://gerrit.libreoffice.org/15215
Tested-by: David Tardon <dtardon at redhat.com>
Reviewed-by: David Tardon <dtardon at redhat.com>
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 7e09b26..ce43cd4 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1192,9 +1192,11 @@ protected:
* the preferred widget size.
*
* Use get_preferred_size to retrieve this value
- * mediated via height and width requests
+ * cached and mediated via height and width requests
*/
virtual Size GetOptimalSize() const;
+ /// clear OptimalSize cache
+ void InvalidateSizeCache();
private:
SAL_DLLPRIVATE bool ImplIsAccessibleCandidate() const;
diff --git a/svx/source/sidebar/PanelLayout.cxx b/svx/source/sidebar/PanelLayout.cxx
index 08256d1..b55b5da 100644
--- a/svx/source/sidebar/PanelLayout.cxx
+++ b/svx/source/sidebar/PanelLayout.cxx
@@ -51,6 +51,7 @@ void PanelLayout::queue_resize(StateChangedType /*eReason*/)
return;
if (!isLayoutEnabled(this))
return;
+ InvalidateSizeCache();
m_aPanelLayoutTimer.Start();
}
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 6ecf711..f694081 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -994,9 +994,7 @@ void SystemWindow::queue_resize(StateChangedType /*eReason*/)
return;
if (!isLayoutEnabled())
return;
- WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
- pWindowImpl->mnOptimalWidthCache = -1;
- pWindowImpl->mnOptimalHeightCache = -1;
+ InvalidateSizeCache();
maLayoutTimer.Start();
}
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 8fe7d9d..e4388d8 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1427,16 +1427,23 @@ namespace
}
}
+void Window::InvalidateSizeCache()
+{
+ WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
+ pWindowImpl->mnOptimalWidthCache = -1;
+ pWindowImpl->mnOptimalHeightCache = -1;
+}
+
void Window::queue_resize(StateChangedType eReason)
{
bool bSomeoneCares = queue_ungrouped_resize(this);
- WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
if (eReason != StateChangedType::VISIBLE)
{
- pWindowImpl->mnOptimalWidthCache = -1;
- pWindowImpl->mnOptimalHeightCache = -1;
+ InvalidateSizeCache();
}
+
+ WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
if (pWindowImpl->m_xSizeGroup && pWindowImpl->m_xSizeGroup->get_mode() != VCL_SIZE_GROUP_NONE)
{
std::set<vcl::Window*> &rWindows = pWindowImpl->m_xSizeGroup->get_widgets();
More information about the Libreoffice-commits
mailing list