[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - sw/source
Martin Nathansen
marsianer at gmail.com
Tue Sep 26 09:20:40 UTC 2017
sw/source/core/crsr/crsrsh.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 51b1b726803d3ac5f1ab8c2efcdc22a281f787bb
Author: Martin Nathansen <marsianer at gmail.com>
Date: Fri Aug 12 13:04:19 2016 +0200
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 at libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht at cib.de>
(cherry picked from commit e879ddeda3d81ec95022142f7d4e514bfec8b123)
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 47415ca3bc14..acad695be6f7 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -66,6 +66,7 @@
#include <comphelper/lok.hxx>
#include <comphelper/string.hxx>
#include <PostItMgr.hxx>
+#include <DocumentSettingManager.hxx>
using namespace com::sun::star;
using namespace util;
@@ -3053,7 +3054,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 )
{
More information about the Libreoffice-commits
mailing list