Kaydet (Commit) 23a83639 authored tarafından Tamás Zolnai's avatar Tamás Zolnai Kaydeden (comit) Tamás Zolnai

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.

Change-Id: Ib7801b81c95f3f505a06c00f749ba4ed5809bfe0
Reviewed-on: https://gerrit.libreoffice.org/47116Tested-by: 's avatarXisco Faulí <xiscofauli@libreoffice.org>
Reviewed-by: 's avatarTamás Zolnai <tamas.zolnai@collabora.com>
üst 7f15b7ae
......@@ -108,6 +108,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;
}
......
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