diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-12-21 19:48:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-12-21 21:39:14 +0100 |
commit | 304df2a40a7e459c70e691a262f554c3c87c7838 (patch) | |
tree | 8b80d80b06f0493b46afc740a8bc6ff91c9fa24d | |
parent | bb7d4b92ebb0b5d55182d1fe97e7c5b39f1145ae (diff) |
crashreporting: disable load from template during print preview
libreoffice-25-2
Change-Id: Ifc60a01f0e5e1f6cdab3680e69202f98471c2a7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179090
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
-rw-r--r-- | sw/sdi/_docsh.sdi | 2 | ||||
-rw-r--r-- | sw/source/uibase/app/docsh.cxx | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/sw/sdi/_docsh.sdi b/sw/sdi/_docsh.sdi index 5a398feff6d8..d82819ef2d57 100644 --- a/sw/sdi/_docsh.sdi +++ b/sw/sdi/_docsh.sdi @@ -69,7 +69,7 @@ interface BaseTextDocument SID_TEMPLATE_LOAD [ ExecMethod = Execute ; - StateMethod = NoState ; + StateMethod = GetState; ] SID_GET_COLORLIST diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 4bbd44ce78b1..539d056eac6f 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -1128,6 +1128,12 @@ void SwDocShell::GetState(SfxItemSet& rSet) rSet.DisableItem(nWhich); } break; + case SID_TEMPLATE_LOAD: + // In the launched template dialog the subsequent "Load" button depends + // on m_pWrtShell existing + if (!m_pWrtShell) + rSet.DisableItem(nWhich); + break; default: OSL_ENSURE(false,"You cannot get here!"); |