[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sc/source

Michael Meeks michael at kemper.freedesktop.org
Tue May 31 03:49:02 PDT 2011


 sc/source/ui/view/tabcont.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit dbabcc82389f4a443334e03dd92331840b7597c8
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue May 31 05:35:42 2011 +0200

    fix for fdo#37772: Insert sheets in a protected spreadsheet document

diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index c080b64..c46bf6a 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -183,6 +183,8 @@ void ScTabControl::MouseButtonUp( const MouseEvent& rMEvt )
     {
         // Insert a new sheet at the right end, with default name.
         ScDocument* pDoc = pViewData->GetDocument();
+        if (!pDoc->IsDocEditable())
+            return;
         String aName;
         pDoc->CreateValidTabName(aName);
         SCTAB nTabCount = pDoc->GetTableCount();


More information about the Libreoffice-commits mailing list