Kaydet (Commit) 20b29033 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: tdf#121229 ignore internal children of VclScrolledWindow

Change-Id: Iecc474db8093520ba2d90aedfc5da66507f3033b
Reviewed-on: https://gerrit.libreoffice.org/63357
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 5a29e09b
...@@ -130,7 +130,9 @@ vcl::Window * nextLogicalChildOfParent(const vcl::Window *pTopLevel, const vcl:: ...@@ -130,7 +130,9 @@ vcl::Window * nextLogicalChildOfParent(const vcl::Window *pTopLevel, const vcl::
{ {
const vcl::Window *pLastChild = pChild; const vcl::Window *pLastChild = pChild;
if (isContainerWindow(*pChild)) if (pChild->GetType() == WindowType::SCROLLWINDOW)
pChild = static_cast<const VclScrolledWindow*>(pChild)->get_child();
else if (isContainerWindow(*pChild))
pChild = pChild->GetWindow(GetWindowType::FirstChild); pChild = pChild->GetWindow(GetWindowType::FirstChild);
else else
pChild = pChild->GetWindow(GetWindowType::Next); pChild = pChild->GetWindow(GetWindowType::Next);
...@@ -156,7 +158,9 @@ vcl::Window * prevLogicalChildOfParent(const vcl::Window *pTopLevel, const vcl:: ...@@ -156,7 +158,9 @@ vcl::Window * prevLogicalChildOfParent(const vcl::Window *pTopLevel, const vcl::
{ {
const vcl::Window *pLastChild = pChild; const vcl::Window *pLastChild = pChild;
if (isContainerWindow(*pChild)) if (pChild->GetType() == WindowType::SCROLLWINDOW)
pChild = static_cast<const VclScrolledWindow*>(pChild)->get_child();
else if (isContainerWindow(*pChild))
pChild = pChild->GetWindow(GetWindowType::LastChild); pChild = pChild->GetWindow(GetWindowType::LastChild);
else else
pChild = pChild->GetWindow(GetWindowType::Prev); pChild = pChild->GetWindow(GetWindowType::Prev);
......
...@@ -1578,9 +1578,9 @@ vcl::Window *VclFrame::get_label_widget() ...@@ -1578,9 +1578,9 @@ vcl::Window *VclFrame::get_label_widget()
const vcl::Window *VclFrame::get_child() const const vcl::Window *VclFrame::get_child() const
{ {
assert(GetChildCount() == 2);
//The child widget is the normally the last (of two) children //The child widget is the normally the last (of two) children
const WindowImpl* pWindowImpl = ImplGetWindowImpl(); const WindowImpl* pWindowImpl = ImplGetWindowImpl();
assert(GetChildCount() == 2 || pWindowImpl->mbInDispose);
if (!m_pLabel) if (!m_pLabel)
return pWindowImpl->mpLastChild; return pWindowImpl->mpLastChild;
if (pWindowImpl->mpFirstChild == pWindowImpl->mpLastChild) //only label exists if (pWindowImpl->mpFirstChild == pWindowImpl->mpLastChild) //only label exists
...@@ -1858,8 +1858,8 @@ IMPL_LINK_NOARG(VclScrolledWindow, ScrollBarHdl, ScrollBar*, void) ...@@ -1858,8 +1858,8 @@ IMPL_LINK_NOARG(VclScrolledWindow, ScrollBarHdl, ScrollBar*, void)
const vcl::Window *VclScrolledWindow::get_child() const const vcl::Window *VclScrolledWindow::get_child() const
{ {
assert(GetChildCount() == 4);
const WindowImpl* pWindowImpl = ImplGetWindowImpl(); const WindowImpl* pWindowImpl = ImplGetWindowImpl();
assert(GetChildCount() == 4 || pWindowImpl->mbInDispose);
return pWindowImpl->mpLastChild; return pWindowImpl->mpLastChild;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment