summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2020-05-02 00:24:31 +0200
committerJulien Nabet <serval2412@yahoo.fr>2020-05-02 07:35:33 +0200
commit8729c9751253f955840cffd24e2e31b1535a095a (patch)
treeba12604bb75e052d5354c67f9e3dde4a1f970f45 /sw/source/uibase
parentb8fb7ecd9cdbe1898c41eaecd9894df8e8f01e25 (diff)
tdf#132603: fix crash when selecting part of a comment
See bt here: https://bugs.documentfoundation.org/attachment.cgi?id=160206 Regression from: https://cgit.freedesktop.org/libreoffice/core/commit/?id=65404e2c72ea2d5d3f6c074121005b8b9369e7fb author Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> 2020-04-08 08:54:21 +0200 committer Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> 2020-04-09 11:14:15 +0200 commit 65404e2c72ea2d5d3f6c074121005b8b9369e7fb (patch) tree 15eeeb5b634c461611893dbe3b49d689ef71f5c4 parent 40d83914d43f60a196dfabddea0b52e2046b333a (diff) Move is*Locked methods to object shell They depend on the model, not the view. Follow-up to 523922ee9d033fd304d2b50a72b76853ddcfbcdf Change-Id: I9267e856a0f0fb22778dcd95974bb4217fd3712f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93308 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/shells/annotsh.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index df50cb78163d..0c81d1d00009 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -963,7 +963,8 @@ void SwAnnotationShell::StateClpbrd(SfxItemSet &rSet)
}
case SID_COPY:
{
- if (!pOLV->HasSelection() || GetObjectShell()->isContentExtractionLocked())
+ SfxObjectShell* pObjectShell = GetObjectShell();
+ if (!pOLV->HasSelection() || (pObjectShell && pObjectShell->isContentExtractionLocked()) )
rSet.DisableItem( nWhich );
break;
}