diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-01-13 14:36:27 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-01-13 14:55:11 +0100 |
commit | 6dc3dbcf91c2ac63651e0494951e090953c96cb5 (patch) | |
tree | 160a01de68dae39856cf19e876d34680e3f2659b /sc | |
parent | 93adda8562b09e14624e52a9bb3fd1e5f321789d (diff) |
Revert "sc: Make .uno:Insert (inserting a new sheet) always succeed."
This reverts commit b908497aaff0ec48340f24df33182430b32a4023.
Causes segfaults in various calc unit tests.
Change-Id: I6b986450fb32db094b1e1f6cbbca1b92f23e4873
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/document.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwshf.cxx | 12 |
2 files changed, 3 insertions, 14 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index e878815f4353..deaddf4fbd14 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -105,8 +105,6 @@ #include <memory> #include <boost/checked_delete.hpp> -#include <LibreOfficeKit/LibreOfficeKitEnums.h> - #include "mtvelements.hxx" using ::editeng::SvxBorderLine; @@ -568,9 +566,6 @@ bool ScDocument::InsertTab( aCxt.mnTabDeletedStart = nPos; aCxt.mnTabDeletedEnd = nPos; SetAllFormulasDirty(aCxt); - - if (GetDrawLayer()->isTiledRendering()) - GetDrawLayer()->libreOfficeKitCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, ""); } return bValid; diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index 2b838bf69b04..0f31469e1528 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -177,21 +177,15 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) bool bOk = false; const SfxPoolItem* pTabItem; const SfxPoolItem* pNameItem; + OUString aName; if ( pReqArgs->HasItem( FN_PARAM_1, &pTabItem ) && pReqArgs->HasItem( nSlot, &pNameItem ) ) { - OUString aName = static_cast<const SfxStringItem*>(pNameItem)->GetValue(); - pDoc->CreateValidTabName(aName); - // sheet number from basic: 1-based - // 0 is special, means adding at the end - nTabNr = static_cast<const SfxUInt16Item*>(pTabItem)->GetValue(); - if (nTabNr == 0) - nTabNr = nTabCount; - else - --nTabNr; + aName = static_cast<const SfxStringItem*>(pNameItem)->GetValue(); + nTabNr = static_cast<const SfxUInt16Item*>(pTabItem)->GetValue() - 1; if ( nTabNr <= nTabCount ) bOk = InsertTable( aName, nTabNr ); } |