Blob Blame History Raw
From f8533123802c5a709280dd06b4452d00a11c71b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Wed, 3 Dec 2014 10:49:15 +0000
Subject: [PATCH] Related: fdo#78151 only make outline, title and subtitle
 read-only

Change-Id: Ic62291a61f6f4c055255f644df5f5e02fe6d0801
---
 sd/source/ui/view/sdview.cxx | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 9b93c8c..1eb87b5 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -738,8 +738,22 @@ bool View::SdrBeginTextEdit(
         }
     }
 
-    if (bMasterPage && bReturn)
-        maMasterViewFilter.Start(pOutl);
+    if (bMasterPage && bReturn && pOutl)
+    {
+        const SdrTextObj* pTextObj = pOutl->GetTextObj();
+        const SdPage* pSdPage = pTextObj ? static_cast<const SdPage*>(pTextObj->GetPage()) : NULL;
+        const PresObjKind eKind = pSdPage ? pSdPage->GetPresObjKind(const_cast<SdrTextObj*>(pTextObj)) : PRESOBJ_NONE;
+        switch (eKind)
+        {
+            case PRESOBJ_TITLE:
+            case PRESOBJ_OUTLINE:
+            case PRESOBJ_TEXT:
+                maMasterViewFilter.Start(pOutl);
+                break;
+            default:
+                break;
+        }
+    }
 
     return bReturn;
 }
-- 
1.9.3