summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-03-07 19:50:57 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-03-08 13:17:12 +0100
commitbf42d2dc58bd80bf4bdf6ff2abb3cd4cb7fd733e (patch)
treef6e47c3fdf773290ad95e18cce6911d758305107 /sc
parentdf0644161bf9b8e476eb138726f38ba5f11b19b7 (diff)
some simplification in ScDocFunc::InsertTable
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/docshell/docfunc.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 4291ecec8d18..973968d21bb6 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2811,8 +2811,6 @@ sal_Bool ScDocFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool /* bApi
pUndoData = new ScRefUndoData( pDoc );
}
- rtl::OUString sCodeName;
- sal_Bool bHasCodeName = pDoc->GetCodeName( nTab, sCodeName );
if (pDoc->DeleteTab( nTab, pUndoDoc ))
{
if (bRecord)
@@ -2825,7 +2823,8 @@ sal_Bool ScDocFunc::DeleteTable( SCTAB nTab, sal_Bool bRecord, sal_Bool /* bApi
// Views updaten:
if( bVbaEnabled )
{
- if( bHasCodeName )
+ rtl::OUString sCodeName;
+ if( pDoc->GetCodeName( nTab, sCodeName ) )
{
VBA_DeleteModule( rDocShell, sCodeName );
}