summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Nathansen <marsianer@gmail.com>2016-08-12 13:04:19 +0200
committerOliver Specht <oliver.specht@cib.de>2016-08-17 18:00:25 +0000
commite879ddeda3d81ec95022142f7d4e514bfec8b123 (patch)
tree1f00c08814b66d247039720057654666f2555526
parent2a871f0f24de805d8d11ae75a896004a5e522b8e (diff)
Resolves: tdf#101245 doc(x) protected areas not protected with disabled cursor
Protected areas of imported doc(x) documents are now protected even when the “enable cursor” option is disabled: It is still possible to set the cursor into the protected area, but the text is not editable anymore. Change-Id: If45dfc82fb7cc70e0a6569a9d735eafcafda9bc2 Reviewed-on: https://gerrit.libreoffice.org/28075 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
-rw-r--r--sw/source/core/crsr/crsrsh.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 509f3bf56a69..5b6edb7ebdde 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -67,6 +67,7 @@
#include <sfx2/lokhelper.hxx>
#include <comphelper/string.hxx>
#include <PostItMgr.hxx>
+#include <DocumentSettingManager.hxx>
using namespace com::sun::star;
using namespace util;
@@ -3044,7 +3045,9 @@ bool SwCursorShell::HasReadonlySel(bool bAnnotationMode) const
{
bool bRet = false;
// If protected area is to be ignored, then selections are never read-only.
- if ((IsReadOnlyAvailable() || GetViewOptions()->IsFormView()) && !GetViewOptions()->IsIgnoreProtectedArea())
+ if ((IsReadOnlyAvailable() || GetViewOptions()->IsFormView() ||
+ GetDoc()->GetDocumentSettingManager().get( DocumentSettingId::PROTECT_FORM )) &&
+ !GetViewOptions()->IsIgnoreProtectedArea())
{
if ( m_pTableCursor != nullptr )
{