diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-02-24 18:06:08 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-02-24 18:14:32 +0100 |
commit | 6c7b85c2001edacd4f722a8cc87ad9df0385f94b (patch) | |
tree | 2c0a062a38969b53e7a9ae3eac51f92dfcb88702 /vcl/source/window/syswin.cxx | |
parent | 18a0d519440b42cd90c628730b2e404b4203e8eb (diff) |
Avoid bad downcasts to VclBox
At least in CppunitTest_smoektest there is a case where
SystemWindow::setOptimalLayoutSize tries to downcast a VclGrid as a VclBox
(stack top below), and that even appears to be unnecessary as the only place
that requires the downcast is the Dialog::settingOptimalLayoutSize override. So
maybe it is guaranteed that GetWindow(WINDOW_FIRSTCHILD) is a VclBox if this is
a Dialog, but need not be the case if this is not a Dialog? Or the real bug is
elsewhere...
SystemWindow::setOptimalLayoutSize()
SystemWindow::DoInitialLayout()
FloatingWindow::StateChanged(StateChangedType)
SfxFloatingWindow::StateChanged(StateChangedType)
SmToolBoxWindow::StateChanged(StateChangedType)
vcl::Window::ImplCallInitShow()
vcl::Window::Show(bool, unsigned short)
SfxChildWindow::Show(unsigned short)
SfxWorkWindow::HidePopups_Impl(bool, bool, unsigned short)
SfxDispatcher::DoActivate_Impl(bool, SfxViewFrame*)
SfxViewFrame::DoActivate(bool, SfxViewFrame*)
SfxApplication::SetViewFrame_Impl(SfxViewFrame*)
SfxViewFrame::SetViewFrame(SfxViewFrame*)
SfxViewFrame::MakeActive_Impl(bool)
SfxBaseController::ConnectSfxFrame_Impl(SfxBaseController::ConnectSfxFrame)
SfxBaseController::attachFrame(com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&)
(anonymous namespace)::SfxFrameLoader_Impl::impl_createDocumentView(com::sun::star::uno::Reference<com::sun::star::frame::XModel2> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, comphelper::NamedValueCollection const&, rtl::OUString const&)
(anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&)
framework::LoadEnv::impl_loadContent()
framework::LoadEnv::startLoading()
framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)
...
Change-Id: I786ad451fdf73eca22860695a614ee5b889a83cd
Diffstat (limited to 'vcl/source/window/syswin.cxx')
-rw-r--r-- | vcl/source/window/syswin.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 6b799065e4b6..5c953f3df449 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -1065,7 +1065,7 @@ OUString SystemWindow::GetText() const return Window::GetText(); } -void SystemWindow::settingOptimalLayoutSize(VclBox* /*pBox*/) +void SystemWindow::settingOptimalLayoutSize(Window* /*pBox*/) { } @@ -1074,7 +1074,7 @@ void SystemWindow::setOptimalLayoutSize() maLayoutIdle.Stop(); //resize SystemWindow to fit requisition on initial show - VclBox *pBox = static_cast<VclBox*>(GetWindow(WINDOW_FIRSTCHILD)); + Window *pBox = GetWindow(WINDOW_FIRSTCHILD); settingOptimalLayoutSize(pBox); |