diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-09-22 09:19:09 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2016-09-26 12:29:57 +0000 |
commit | 6de338782529f65e3adb945a5e48cc6eb4f60603 (patch) | |
tree | a0c11c3cadadbf135f0dedc675602917845c9b6b | |
parent | a498e734f0954f401f430fd04c38e16ec7072489 (diff) |
Resolves: tdf#100670 Crash in: sfx2::sidebar::Panel::SetExpanded(bool)
partial backport of
commit e964c55f463c5b9daeb41dbed6c330b40911c313
Author: Caolán McNamara <caolanm@redhat.com>
Date: Fri Jan 29 18:52:34 2016 +0000
implement missing FID_FUNCTION_BOX GetState
since it was turned into a sidebar thing
exact how-to-reproduce of tdf#102045 is currently avoided because of...
commit e1e61bf5e5f368fc1ea579f8ae5eec9faafbd599
Author: Caolán McNamara <caolanm@redhat.com>
Date: Fri Jun 3 11:06:22 2016 +0100
Resolves: tdf#88396 switching to sidebar panel will toggle it *off*...
if its already visible.
Change-Id: I17827488e49338a77ae55ba32a06415067123be8
Reviewed-on: https://gerrit.libreoffice.org/29170
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r-- | sfx2/source/sidebar/Sidebar.cxx | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/sfx2/source/sidebar/Sidebar.cxx b/sfx2/source/sidebar/Sidebar.cxx index 02a17f43b8be..2fa29f4a6788 100644 --- a/sfx2/source/sidebar/Sidebar.cxx +++ b/sfx2/source/sidebar/Sidebar.cxx @@ -30,19 +30,21 @@ void Sidebar::ShowPanel ( const css::uno::Reference<frame::XFrame>& rxFrame) { SidebarController* pController = SidebarController::GetSidebarControllerForFrame(rxFrame); + if (!pController) + return; std::shared_ptr<PanelDescriptor> xPanelDescriptor = pController->GetResourceManager()->GetPanelDescriptor(rsPanelId); - if (pController && xPanelDescriptor) - { - // This should be a lot more sophisticated: - // - Make the deck switching asynchronous - // - Make sure to use a context that really shows the panel + if (!xPanelDescriptor) + return; + + // This should be a lot more sophisticated: + // - Make the deck switching asynchronous + // - Make sure to use a context that really shows the panel - // All that is not necessary for the current use cases so lets - // keep it simple for the time being. - pController->OpenThenSwitchToDeck(xPanelDescriptor->msDeckId); - } + // All that is not necessary for the current use cases so lets + // keep it simple for the time being. + pController->OpenThenSwitchToDeck(xPanelDescriptor->msDeckId); } void Sidebar::TogglePanel ( |