diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-02-08 20:42:17 +0530 |
---|---|---|
committer | Pranav Kant <pranavk@collabora.co.uk> | 2017-02-16 10:05:28 +0530 |
commit | a29b0d68011f9e2be8eee466f3f9ccad283f274c (patch) | |
tree | 200ffc7dc1de67ecd7601ff5d932f6b7f97a567b | |
parent | c7b84ac9ea14e6c96165e3281c4bea422918c83f (diff) |
sc lok: Prevent showing comments if tiled annotations are off
Change-Id: I594b61e102c0ecacb169ee6064ba96d70c16ab42
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 671b40090149..dde081810341 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -19,6 +19,7 @@ #include "scitems.hxx" +#include <comphelper/lok.hxx> #include <sfx2/app.hxx> #include <editeng/editobj.hxx> #include <sfx2/linkmgr.hxx> @@ -1214,7 +1215,9 @@ bool ScDocFunc::ShowNote( const ScAddress& rPos, bool bShow ) { ScDocument& rDoc = rDocShell.GetDocument(); ScPostIt* pNote = rDoc.GetNote( rPos ); - if( !pNote || (bShow == pNote->IsCaptionShown()) ) return false; + if( !pNote || (bShow == pNote->IsCaptionShown()) || + (comphelper::LibreOfficeKit::isActive() && !comphelper::LibreOfficeKit::isTiledAnnotations()) ) + return false; // move the caption to internal or hidden layer and create undo action pNote->ShowCaption( rPos, bShow ); |