vcl/source/window/layout.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
New commits: commit 8f30d9a19ad4a49be59b5da1fad0e9d7efcbed24 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Sep 26 00:11:12 2012 +0100 fix getNonLayout[Real]Parent helpers Change-Id: Idae11802aaeb3d9192cdf7fe8fae61788bbb9b5b diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 8666ef5..2fa259b 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1074,15 +1074,23 @@ Size getLegacyBestSizeForChildren(const Window &rWindow) Window* getNonLayoutParent(Window *pWindow) { - while (pWindow && pWindow->GetType() == WINDOW_CONTAINER) + while (pWindow) + { pWindow = pWindow->GetParent(); + if (!pWindow || pWindow->GetType() != WINDOW_CONTAINER) + break; + } return pWindow; } Window* getNonLayoutRealParent(Window *pWindow) { - while (pWindow && pWindow->GetType() == WINDOW_CONTAINER) + while (pWindow) + { pWindow = pWindow->ImplGetParent(); + if (!pWindow || pWindow->GetType() != WINDOW_CONTAINER) + break; + } return pWindow; }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits