From 397c5d17696194dff85b673ebafef94dc8017dae Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Wed, 22 Nov 2006 11:20:51 +0000 Subject: [PATCH] INTEGRATION: CWS scpivotcacheimport (1.83.6); FILE MERGED 2006/10/25 13:52:33 dr 1.83.6.2: #i70650# handle more special cases for cache fields 2006/10/20 13:45:47 dr 1.83.6.1: #i70650# import pivotcache from external pivottables into own sheet --- sc/source/filter/excel/impop.cxx | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index 236b068d9a4a..c1d7eab4116a 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -4,9 +4,9 @@ * * $RCSfile: impop.cxx,v $ * - * $Revision: 1.83 $ + * $Revision: 1.84 $ * - * last change: $Author: kz $ $Date: 2006-10-05 16:17:43 $ + * last change: $Author: vg $ $Date: 2006-11-22 12:20:51 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -712,33 +712,35 @@ void ImportExcel::Wsbool( void ) void ImportExcel::Boundsheet( void ) { - UINT16 nGrbit; + UINT16 nGrbit = 0; if( GetBiff() == EXC_BIFF5 ) { aIn.Ignore( 4 ); aIn >> nGrbit; } - else - nGrbit = 0x0000; String aName( aIn.ReadByteString( FALSE ) ); ScfTools::ConvertToScSheetName( aName ); *pExcRoot->pTabNameBuff << aName; - const SCTAB nTab = static_cast(nBdshtTab); - if( nTab > 0 ) + SCTAB nScTab = static_cast< SCTAB >( nBdshtTab ); + if( nScTab > 0 ) { - DBG_ASSERT( !pD->HasTable( nTab ), "*ImportExcel::Boundsheet(): Tabelle schon vorhanden!" ); - - pD->MakeTable( nTab ); + DBG_ASSERT( !pD->HasTable( nScTab ), "ImportExcel::Boundsheet - sheet exists already" ); + pD->MakeTable( nScTab ); } if( ( nGrbit & 0x0001 ) || ( nGrbit & 0x0002 ) ) - pD->SetVisible( nTab, FALSE ); + pD->SetVisible( nScTab, FALSE ); + + if( !pD->RenameTab( nScTab, aName ) ) + { + pD->CreateValidTabName( aName ); + pD->RenameTab( nScTab, aName ); + } - pD->RenameTab( nTab, aName ); nBdshtTab++; }