[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sfx2/source
Tamás Zolnai
tamas.zolnai at collabora.com
Wed Jan 3 15:56:04 UTC 2018
sfx2/source/sidebar/UnoPanels.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 6cc44459833deec6a54a0ed8b0572d345d3e7425
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
Date: Thu Dec 28 18:02:57 2017 +0100
tdf#104870 - Impress crashes switching views in read-only mode
We need to check read only mode similar to SidebarController::CreatePanels()
method. Otherwise SfxUnoPanels::getByName() creates an invalid panel.
Reviewed-on: https://gerrit.libreoffice.org/47116
Tested-by: Xisco Faulí <xiscofauli at libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
(cherry picked from commit 23a83639f5a06708074b13bc13ea4f6f819f55f0)
Change-Id: Ib7801b81c95f3f505a06c00f749ba4ed5809bfe0
Reviewed-on: https://gerrit.libreoffice.org/47144
Tested-by: Xisco Faulí <xiscofauli at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sfx2/source/sidebar/UnoPanels.cxx b/sfx2/source/sidebar/UnoPanels.cxx
index 257c75cea4bc..98708d9cf658 100644
--- a/sfx2/source/sidebar/UnoPanels.cxx
+++ b/sfx2/source/sidebar/UnoPanels.cxx
@@ -114,6 +114,9 @@ sal_Bool SAL_CALL SfxUnoPanels::hasByName( const OUString& aName )
iPanel(aPanels.begin()), iEnd(aPanels.end());
iPanel!=iEnd; ++iPanel)
{
+ // Determine if the panel can be displayed.
+ if(pSidebarController->IsDocumentReadOnly() && !iPanel->mbShowForReadOnlyDocuments)
+ continue;
if (iPanel->msId == aName)
return true;
}
More information about the Libreoffice-commits
mailing list