sc/source/ui/condformat/condformatdlg.cxx | 47 +++++- sc/source/ui/condformat/condformatdlgentry.cxx | 6 sc/source/ui/inc/condformatdlg.hxx | 8 - sc/source/ui/inc/condformatdlgentry.hxx | 9 - sc/source/ui/inc/funcutl.hxx | 188 ------------------------- sc/source/ui/inc/parawin.hxx | 163 --------------------- sc/source/ui/view/tabcont.cxx | 3 7 files changed, 62 insertions(+), 362 deletions(-)
New commits: commit 549726ae15ec7bfa8381fe2ad0e8e4e13eec29af Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Wed Oct 10 03:18:30 2012 +0200 remove another unused header file Change-Id: I446664e9e7e938e093c1b2254f36752420a6b584 diff --git a/sc/source/ui/inc/funcutl.hxx b/sc/source/ui/inc/funcutl.hxx deleted file mode 100644 index e3c995b..0000000 --- a/sc/source/ui/inc/funcutl.hxx +++ /dev/null @@ -1,188 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef SC_FUNCUTL_HXX -#define SC_FUNCUTL_HXX - -#include <vcl/scrbar.hxx> -#include <vcl/fixed.hxx> -#include <svtools/svmedit.hxx> -#include "anyrefdg.hxx" // formula::RefButton - - -//============================================================================ -// class ValWnd - -class ValWnd : public Window -{ -public: - ValWnd( Window* pParent, const ResId& rId ); - - void SetValue( const String& rStrVal ); - -protected: - virtual void Paint( const Rectangle& rRect ); - -private: - String aStrValue; - Rectangle aRectOut; -}; - - -//============================================================================ -// class ScEditBox - -class ScEditBox : public Control -{ -private: - - MultiLineEdit* pMEdit; - Link aSelChangedLink; - Selection aOldSel; - sal_Bool bMouseFlag; - DECL_LINK( ChangedHdl, ScEditBox* ); - -protected: - - virtual long PreNotify( NotifyEvent& rNEvt ); - virtual void SelectionChanged(); - virtual void Resize(); - virtual void GetFocus(); - - -public: - ScEditBox( Window* pParent, const ResId& rResId ); - - ~ScEditBox(); - - MultiLineEdit* GetEdit() {return pMEdit;} - - void SetSelChangedHdl( const Link& rLink ) { aSelChangedLink = rLink; } - const Link& GetSelChangedHdl() const { return aSelChangedLink; } - - void UpdateOldSel(); -}; - - - -//============================================================================ -// class ArgEdit - -class ArgEdit : public formula::RefEdit -{ -public: - ArgEdit( Window* pParent, const ResId& rResId ); - - void Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit, - ScrollBar& rArgSlider, sal_uInt16 nArgCount ); - -protected: - virtual void KeyInput( const KeyEvent& rKEvt ); - -private: - ArgEdit* pEdPrev; - ArgEdit* pEdNext; - ScrollBar* pSlider; - sal_uInt16 nArgs; -}; - - -//============================================================================ -// class ArgInput - -class ArgInput -{ -private: - - Link aFxClickLink; - Link aRefClickLink; - Link aFxFocusLink; - Link aRefFocusLink; - Link aEdFocusLink; - Link aEdModifyLink; - - FixedText* pFtArg; - ImageButton* pBtnFx; - ArgEdit* pEdArg; - formula::RefButton* pRefBtn; - - DECL_LINK( FxBtnClickHdl, ImageButton* ); - DECL_LINK( RefBtnClickHdl,formula::RefButton* ); - DECL_LINK( FxBtnFocusHdl, ImageButton* ); - DECL_LINK( RefBtnFocusHdl,formula::RefButton* ); - DECL_LINK( EdFocusHdl, ArgEdit* ); - DECL_LINK( EdModifyHdl,ArgEdit* ); - -protected: - - virtual void FxClick(); - virtual void RefClick(); - virtual void FxFocus(); - virtual void RefFocus(); - virtual void EdFocus(); - virtual void EdModify(); - -public: - - ArgInput(); - - void InitArgInput ( FixedText* pftArg, - ImageButton* pbtnFx, - ArgEdit* pedArg, - formula::RefButton* prefBtn); - - void SetArgName(const String &aArg); - String GetArgName(); - void SetArgNameFont(const Font&); - - void SetArgVal(const String &aVal); - String GetArgVal(); - - void SetArgSelection (const Selection& rSel ); - - ArgEdit* GetArgEdPtr() {return pEdArg;} - - - void SetFxClickHdl( const Link& rLink ) { aFxClickLink = rLink; } - const Link& GetFxClickHdl() const { return aFxClickLink; } - - void SetRefClickHdl( const Link& rLink ) { aRefClickLink = rLink; } - const Link& GetRefClickHdl() const { return aRefClickLink; } - - void SetFxFocusHdl( const Link& rLink ) { aFxFocusLink = rLink; } - const Link& GetFxFocusHdl() const { return aFxFocusLink; } - - void SetRefFocusHdl( const Link& rLink ) { aRefFocusLink = rLink; } - const Link& GetRefFocusHdl() const { return aRefFocusLink; } - - void SetEdFocusHdl( const Link& rLink ) { aEdFocusLink = rLink; } - const Link& GetEdFocusHdl() const { return aEdFocusLink; } - - void SetEdModifyHdl( const Link& rLink ) { aEdModifyLink = rLink; } - const Link& GetEdModifyHdl() const { return aEdModifyLink; } - - void Hide(); - void Show(); - -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit a2cc01df8bc654b90bfeae62d581a0a0eadb2b6e Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Wed Oct 10 03:17:56 2012 +0200 remove unused header file Change-Id: I862311c2ee2b327a2542cd3161fc31e668b70c93 diff --git a/sc/source/ui/inc/parawin.hxx b/sc/source/ui/inc/parawin.hxx deleted file mode 100644 index 8179733..0000000 --- a/sc/source/ui/inc/parawin.hxx +++ /dev/null @@ -1,163 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef SC_PARAWIN_HXX -#define SC_PARAWIN_HXX - -#include "funcutl.hxx" -#include "global.hxx" // ScAddress -#include <svtools/stdctrl.hxx> -#include <vcl/lstbox.hxx> -#include <vcl/group.hxx> -#include <svtools/svmedit.hxx> -#include <vcl/tabpage.hxx> -#include <vcl/tabctrl.hxx> - -#include <vector> - -class ScFuncDesc; - -//============================================================================ -#define NOT_FOUND 0xffff -//============================================================================ - -class ScParaWin : public TabPage -{ -private: - - Link aScrollLink; - Link aFxLink; - Link aArgModifiedLink; - - ::std::vector<sal_uInt16> aVisibleArgMapping; - const ScFuncDesc* pFuncDesc; - ScAnyRefDlg* pMyParent; - sal_uInt16 nArgs; // unsuppressed arguments - Font aFntBold; - Font aFntLight; - - FixedInfo aFtEditDesc; - FixedText aFtArgName; - FixedInfo aFtArgDesc; - - ImageButton aBtnFx1; - FixedText aFtArg1; - ArgEdit aEdArg1; - formula::RefButton aRefBtn1; - ImageButton aBtnFx2; - FixedText aFtArg2; - ArgEdit aEdArg2; - formula::RefButton aRefBtn2; - ImageButton aBtnFx3; - FixedText aFtArg3; - ArgEdit aEdArg3; - formula::RefButton aRefBtn3; - ImageButton aBtnFx4; - FixedText aFtArg4; - ArgEdit aEdArg4; - formula::RefButton aRefBtn4; - ScrollBar aSlider; - sal_Bool bRefMode; - - sal_uInt16 nEdFocus; - sal_uInt16 nActiveLine; - - ArgInput aArgInput[4]; - String aDefaultString; - DECL_LINK( ScrollHdl, ScrollBar* ); - DECL_LINK( ModifyHdl, ArgInput* ); - DECL_LINK( GetEdFocusHdl, ArgInput* ); - DECL_LINK( GetFxFocusHdl, ArgInput* ); - DECL_LINK( GetFxHdl, ArgInput* ); - -protected: - - virtual void SliderMoved(); - virtual void ArgumentModified(); - virtual void FxClick(); - - void InitArgInput( sal_uInt16 nPos, FixedText& rFtArg, ImageButton& rBtnFx, - ArgEdit& rEdArg, formula::RefButton& rRefBtn); - - void DelParaArray(); - void SetArgumentDesc(const String& aText); - void SetArgumentText(const String& aText); - - - void SetArgName (sal_uInt16 no,const String &aArg); - void SetArgNameFont (sal_uInt16 no,const Font&); - void SetArgVal (sal_uInt16 no,const String &aArg); - - void HideParaLine(sal_uInt16 no); - void ShowParaLine(sal_uInt16 no); - void UpdateArgDesc( sal_uInt16 nArg ); - void UpdateArgInput( sal_uInt16 nOffset, sal_uInt16 i ); - -public: - ScParaWin(ScAnyRefDlg* pParent,Point aPos); - ~ScParaWin(); - - void SetFunctionDesc(const ScFuncDesc* pFDesc); - void SetArgumentOffset(sal_uInt16 nOffset); - void SetEditDesc(const String& aText); - void UpdateParas(); - void ClearAll(); - - sal_Bool IsRefMode() {return bRefMode;} - void SetRefMode(sal_Bool bFlag) {bRefMode=bFlag;} - - sal_uInt16 GetActiveLine(); - void SetActiveLine(sal_uInt16 no); - formula::RefEdit* GetActiveEdit(); - String GetActiveArgName(); - - String GetArgument(sal_uInt16 no); - void SetArgument(sal_uInt16 no, const String& aString); - void SetArgumentFonts(const Font&aBoldFont,const Font&aLightFont); - - void SetEdFocus(sal_uInt16 nEditLine); // Visable edit lines - sal_uInt16 GetSliderPos(); - void SetSliderPos(sal_uInt16 nSliderPos); - - void SetScrollHdl( const Link& rLink ) { aScrollLink = rLink; } - const Link& GetScrollHdl() const { return aScrollLink; } - - void SetArgModifiedHdl( const Link& rLink ) { aArgModifiedLink = rLink; } - const Link& GetArgModifiedHdl() const { return aArgModifiedLink; } - - void SetFxHdl( const Link& rLink ) { aFxLink = rLink; } - const Link& GetFxHdl() const { return aFxLink; } -}; - - - - - -#endif // SC_PARAWIN_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 6b74e2c69fd8c19f0eec6bb141f19e21c91a2076 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Wed Oct 10 02:34:01 2012 +0200 make also the condition edit fields ref input fields Change-Id: I1246d9ef7ef129901dbcdb92ae9b8fed171fb343 diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 332139e..21093fe 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -198,15 +198,24 @@ IMPL_LINK(ScCondFormatList, ColFormatTypeHdl, ListBox*, pBox) { case 0: if(itr->GetType() != condformat::entry::COLORSCALE2) + { maEntries.replace( itr, new ScColorScale2FrmtEntry( this, mpDoc, maPos ) ); + static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData(); + } break; case 1: if(itr->GetType() != condformat::entry::COLORSCALE3) + { maEntries.replace( itr, new ScColorScale3FrmtEntry( this, mpDoc, maPos ) ); + static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData(); + } break; case 2: if(itr->GetType() != condformat::entry::DATABAR) + { maEntries.replace( itr, new ScDataBarFrmtEntry( this, mpDoc, maPos ) ); + static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData(); + } break; default: break; @@ -232,14 +241,17 @@ IMPL_LINK(ScCondFormatList, TypeListHdl, ListBox*, pBox) { case 0: maEntries.replace( itr, new ScColorScale3FrmtEntry(this, mpDoc, maPos)); + static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData(); itr->SetActive(); break; case 1: maEntries.replace( itr, new ScConditionFrmtEntry(this, mpDoc, maPos)); + static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData(); itr->SetActive(); break; case 2: maEntries.replace( itr, new ScFormulaFrmtEntry(this, mpDoc, maPos)); + static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData(); itr->SetActive(); break; } @@ -255,6 +267,7 @@ IMPL_LINK_NOARG( ScCondFormatList, AddBtnHdl ) { itr->SetInactive(); } + static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData(); pNewEntry->SetActive(); RecalcAll(); return 0; @@ -270,6 +283,7 @@ IMPL_LINK_NOARG( ScCondFormatList, RemoveBtnHdl ) break; } } + static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData(); RecalcAll(); return 0; } @@ -280,6 +294,7 @@ IMPL_LINK( ScCondFormatList, EntrySelectHdl, ScCondFrmtEntry*, pEntry ) { itr->SetInactive(); } + static_cast<ScCondFormatDlg*>(GetParent())->InvalidateRefData(); pEntry->SetActive(); RecalcAll(); return 0; @@ -309,6 +324,7 @@ ScCondFormatDlg::ScCondFormatDlg(SfxBindings* pB, SfxChildWindow* pCW, Window* p maPos(rPos), mpDoc(pDoc), mpFormat(pFormat), + mpLastEdit(NULL), meType(eType) { rtl::OUStringBuffer aTitle( GetText() ); @@ -323,6 +339,7 @@ ScCondFormatDlg::ScCondFormatDlg(SfxBindings* pB, SfxChildWindow* pCW, Window* p maBtnOk.SetClickHdl( LINK( this, ScCondFormatDlg, OkBtnHdl ) ); maBtnCancel.SetClickHdl( LINK( this, ScCondFormatDlg, CancelBtnHdl ) ); maEdRange.SetGetFocusHdl( LINK( this, ScCondFormatDlg, RangeGetFocusHdl ) ); + maEdRange.SetLoseFocusHdl( LINK( this, ScCondFormatDlg, RangeLoseFocusHdl ) ); FreeResource(); maEdRange.SetText(aRangeString); @@ -334,7 +351,11 @@ ScCondFormatDlg::~ScCondFormatDlg() void ScCondFormatDlg::SetActive() { - maEdRange.GrabFocus(); + if(mpLastEdit) + mpLastEdit->GrabFocus(); + else + maEdRange.GrabFocus(); + RefInputDone(); } @@ -355,14 +376,18 @@ sal_Bool ScCondFormatDlg::IsRefInputMode() const void ScCondFormatDlg::SetReference(const ScRange& rRef, ScDocument*) { - if( maEdRange.IsEnabled() ) + formula::RefEdit* pEdit = mpLastEdit; + if(!mpLastEdit) + pEdit = &maEdRange; + + if( pEdit->IsEnabled() ) { if(rRef.aStart != rRef.aEnd) - RefInputStart(&maEdRange); + RefInputStart(pEdit); rtl::OUString aRefStr; rRef.Format( aRefStr, ABS_DREF, mpDoc, ScAddress::Details(mpDoc->GetAddressConvention(), 0, 0) ); - maEdRange.SetRefString( aRefStr ); + pEdit->SetRefString( aRefStr ); } } @@ -379,6 +404,11 @@ ScConditionalFormat* ScCondFormatDlg::GetConditionalFormat() const return pFormat; } +void ScCondFormatDlg::InvalidateRefData() +{ + mpLastEdit = NULL; +} + IMPL_LINK( ScCondFormatDlg, EdRangeModifyHdl, Edit*, pEdit ) { rtl::OUString aRangeStr = pEdit->GetText(); @@ -427,16 +457,21 @@ IMPL_LINK_NOARG( ScCondFormatDlg, OkBtnHdl ) IMPL_LINK_NOARG( ScCondFormatDlg, CancelBtnHdl ) { - Close(); return 0; } -IMPL_LINK_NOARG( ScCondFormatDlg, RangeGetFocusHdl ) +IMPL_LINK( ScCondFormatDlg, RangeGetFocusHdl, formula::RefEdit*, pEdit ) { + mpLastEdit = pEdit; return 0; } +IMPL_LINK_NOARG( ScCondFormatDlg, RangeLoseFocusHdl ) +{ + //mpLastEdit = NULL; + return 0; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 507a0ed..707462f 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -224,6 +224,10 @@ ScConditionFrmtEntry::ScConditionFrmtEntry( Window* pParent, ScDocument* pDoc, c void ScConditionFrmtEntry::Init() { maLbStyle.SetSeparatorPos(0); + maEdVal1.SetGetFocusHdl( LINK( GetParent()->GetParent(), ScCondFormatDlg, RangeGetFocusHdl ) ); + maEdVal2.SetGetFocusHdl( LINK( GetParent()->GetParent(), ScCondFormatDlg, RangeGetFocusHdl ) ); + maEdVal1.SetLoseFocusHdl( LINK( GetParent()->GetParent(), ScCondFormatDlg, RangeLoseFocusHdl ) ); + maEdVal2.SetLoseFocusHdl( LINK( GetParent()->GetParent(), ScCondFormatDlg, RangeLoseFocusHdl ) ); maEdVal1.SetStyle( maEdVal1.GetStyle() | WB_FORCECTRLBACKGROUND ); maEdVal2.SetStyle( maEdVal2.GetStyle() | WB_FORCECTRLBACKGROUND ); @@ -405,6 +409,8 @@ ScFormulaFrmtEntry::ScFormulaFrmtEntry( Window* pParent, ScDocument* pDoc, const void ScFormulaFrmtEntry::Init() { maLbStyle.SetSeparatorPos(0); + maEdFormula.SetGetFocusHdl( LINK( GetParent()->GetParent(), ScCondFormatDlg, RangeGetFocusHdl ) ); + maEdFormula.SetLoseFocusHdl( LINK( GetParent()->GetParent(), ScCondFormatDlg, RangeLoseFocusHdl ) ); SfxStyleSheetIterator aStyleIter( mpDoc->GetStyleSheetPool(), SFX_STYLE_FAMILY_PARA ); for ( SfxStyleSheetBase* pStyle = aStyleIter.First(); pStyle; pStyle = aStyleIter.Next() ) diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx index e91574b..3b3cfb3 100644 --- a/sc/source/ui/inc/condformatdlg.hxx +++ b/sc/source/ui/inc/condformatdlg.hxx @@ -114,12 +114,13 @@ private: const ScConditionalFormat* mpFormat; + formula::RefEdit* mpLastEdit; + condformat::dialog::ScCondFormatDialogType meType; DECL_LINK( EdRangeModifyHdl, Edit* ); DECL_LINK( OkBtnHdl, void* ); DECL_LINK( CancelBtnHdl, void* ); - DECL_LINK( RangeGetFocusHdl, void* ); virtual sal_Bool Close(); protected: @@ -138,6 +139,11 @@ public: virtual sal_Bool IsRefInputMode() const; virtual void SetActive(); virtual sal_Bool IsTableLocked() const { return sal_True; } + + void InvalidateRefData(); + + DECL_LINK( RangeGetFocusHdl, formula::RefEdit* ); + DECL_LINK( RangeLoseFocusHdl, void* ); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/condformatdlgentry.hxx b/sc/source/ui/inc/condformatdlgentry.hxx index b0051ad..f28a824 100644 --- a/sc/source/ui/inc/condformatdlgentry.hxx +++ b/sc/source/ui/inc/condformatdlgentry.hxx @@ -9,6 +9,7 @@ #include "colorscale.hxx" #include "conditio.hxx" +#include <formula/funcutl.hxx> namespace condformat { @@ -76,8 +77,8 @@ class ScConditionFrmtEntry : public ScCondFrmtEntry //cond format ui elements ListBox maLbCondType; - Edit maEdVal1; - Edit maEdVal2; + formula::RefEdit maEdVal1; + formula::RefEdit maEdVal2; FixedText maFtStyle; ListBox maLbStyle; SvxFontPrevWindow maWdPreview; @@ -87,6 +88,7 @@ class ScConditionFrmtEntry : public ScCondFrmtEntry void Init(); DECL_LINK( StyleSelectHdl, void* ); DECL_LINK( ConditionTypeSelectHdl, void* ); + public: ScConditionFrmtEntry( Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScCondFormatEntry* pFormatEntry = NULL ); @@ -102,12 +104,13 @@ class ScFormulaFrmtEntry : public ScCondFrmtEntry FixedText maFtStyle; ListBox maLbStyle; SvxFontPrevWindow maWdPreview; - Edit maEdFormula; + formula::RefEdit maEdFormula; ScFormatEntry* createFormulaEntry() const; void Init(); DECL_LINK( StyleSelectHdl, void* ); + public: ScFormulaFrmtEntry( Window* pParent, ScDocument* PDoc, const ScAddress& rPos, const ScCondFormatEntry* pFormatEntry = NULL ); commit da7edb8bd74eb3c42a4585254e5bb329905b56c8 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Tue Oct 9 11:17:25 2012 +0200 in ScAnyRefDlg + table locked, don't allow creating new sheets,fdo#55709 Change-Id: I8129b41288d20a0c2b6eac90ca5d25392fe0386f diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx index f086ad6..71fcf45 100644 --- a/sc/source/ui/view/tabcont.cxx +++ b/sc/source/ui/view/tabcont.cxx @@ -176,7 +176,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()) + ScModule* pScMod = SC_MOD(); + if (!pDoc->IsDocEditable() || pScMod->IsTableLocked()) return; rtl::OUString aName; pDoc->CreateValidTabName(aName); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits