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-22 14:10:02 +0100 |
commit | dfab7782e1577ce40bab68330347edc48ff05389 (patch) | |
tree | be2d838f739c0cda5d777dc2b0280041d7b938aa /sw | |
parent | bb9b4aaf3dabe582a18e544d25b15aa2f8f3d78e (diff) |
crashreporting: disable load from template during print preview
Change-Id: Ifc60a01f0e5e1f6cdab3680e69202f98471c2a7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179089
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sw')
-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!"); |