summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2016-01-13 11:56:34 +0100
committerJan Holesovsky <kendy@collabora.com>2016-01-13 12:00:09 +0100
commitb550d3b10adf3a7f8c3013c231e8251059343c5e (patch)
treeaa9ee18a540a876b72f00a034929925661a324bc /sc
parentb908497aaff0ec48340f24df33182430b32a4023 (diff)
sc: Further .uno:Insert (inserting a new sheet) tweak.
Change-Id: I5437e173009be2b21594abfa133c1b48e53a2ff3
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/tabvwshf.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 2b838bf69b04..8ed4937c1f8c 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -192,8 +192,10 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
else
--nTabNr;
- if ( nTabNr <= nTabCount )
- bOk = InsertTable( aName, nTabNr );
+ if (nTabNr > nTabCount)
+ nTabNr = nTabCount;
+
+ bOk = InsertTable(aName, nTabNr);
}
if (bOk)