summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-03-04 19:25:02 -0500
committerKohei Yoshida <kyoshida@novell.com>2011-03-05 15:21:07 -0500
commit9b6c3f27f441099a4d07f8ecc3845e3fde46e992 (patch)
treed188ad0f516850bffca1785f043a75544ad54a68 /sc
parent0df4b4a86073690ea9013645a39631289ea609a5 (diff)
Identified and tagged all places where I need to modify.
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/rangenam.hxx4
-rw-r--r--sc/source/core/data/documen2.cxx9
-rw-r--r--sc/source/core/data/documen3.cxx4
-rw-r--r--sc/source/core/data/document.cxx11
-rw-r--r--sc/source/core/tool/rangenam.cxx14
-rw-r--r--sc/source/core/tool/rangeutl.cxx3
-rw-r--r--sc/source/filter/excel/xename.cxx3
-rw-r--r--sc/source/ui/app/inputwin.cxx3
-rw-r--r--sc/source/ui/dbgui/consdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx3
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx4
-rw-r--r--sc/source/ui/docshell/docfunc.cxx5
-rw-r--r--sc/source/ui/miscdlgs/namepast.cxx3
-rw-r--r--sc/source/ui/namedlg/namedlg.cxx3
-rw-r--r--sc/source/ui/navipi/content.cxx3
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx6
-rw-r--r--sc/source/ui/undo/undoblk3.cxx3
-rw-r--r--sc/source/ui/unoobj/nameuno.cxx10
-rw-r--r--sc/source/ui/vba/vbarange.cxx3
-rw-r--r--sc/source/ui/view/cellsh1.cxx3
-rw-r--r--sc/source/ui/view/dbfunc3.cxx4
21 files changed, 74 insertions, 29 deletions
diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx
index 995d664ff108..40b0b82aa634 100644
--- a/sc/inc/rangenam.hxx
+++ b/sc/inc/rangenam.hxx
@@ -209,12 +209,10 @@ public:
SC_DLLPUBLIC ScRangeData* FindIndex(size_t i);
sal_uInt16 GetSharedMaxIndex();
void SetSharedMaxIndex(sal_uInt16 nInd);
- SC_DLLPUBLIC size_t GetCount() const;
SC_DLLPUBLIC size_t size() const;
+ bool empty() const;
SC_DLLPUBLIC bool Insert(ScRangeData* p);
- void AtFree(size_t i);
void erase(const ScRangeData& r);
- void FreeAll();
void clear();
SC_DLLPUBLIC ScRangeData* At(size_t i);
bool operator== (const ScRangeName& r) const;
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index a0caf210f2db..eedbd5434e0d 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -963,7 +963,7 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
if ( !bResultsOnly )
{
BOOL bNamesLost = FALSE;
- USHORT nSrcRangeNames = pSrcDoc->pRangeName->GetCount();
+ size_t nSrcRangeNames = pSrcDoc->pRangeName->size();
// array containing range names which might need update of indices
ScRangeData** pSrcRangeNames = nSrcRangeNames ? new ScRangeData* [nSrcRangeNames] : NULL;
// the index mapping thereof
@@ -974,7 +974,7 @@ ULONG ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
std::set<USHORT> aUsedNames;
pSrcDoc->pTab[nSrcPos]->FindRangeNamesInUse( 0, 0, MAXCOL, MAXROW, aUsedNames );
- for (USHORT i = 0; i < nSrcRangeNames; i++) //! DB-Bereiche Pivot-Bereiche auch !!!
+ for (size_t i = 0; i < nSrcRangeNames; i++) //! DB-Bereiche Pivot-Bereiche auch !!!
{
ScRangeData* pSrcData = (*pSrcDoc->pRangeName)[i];
USHORT nOldIndex = pSrcData->GetIndex();
@@ -1129,7 +1129,9 @@ void ScDocument::SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const USHORT nErr
void ScDocument::EraseNonUsedSharedNames(USHORT nLevel)
{
- for (USHORT i = 0; i < pRangeName->GetCount(); i++)
+#if NEW_RANGE_NAME
+#else
+ for (size_t i = 0; i < pRangeName->size(); i++)
{
ScRangeData* pRangeData = (*pRangeName)[i];
if (pRangeData && pRangeData->HasType(RT_SHARED))
@@ -1153,6 +1155,7 @@ void ScDocument::EraseNonUsedSharedNames(USHORT nLevel)
}
}
}
+#endif
}
// ----------------------------------------------------------------------------
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 446389379b46..9ee61b635f8b 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -1403,8 +1403,8 @@ BOOL ScDocument::GetFormulaEntries( TypedScStrCollection& rStrings )
if ( pRangeName )
{
- sal_uInt16 nRangeCount = pRangeName->GetCount();
- for ( sal_uInt16 i = 0; i < nRangeCount; i++ )
+ size_t nRangeCount = pRangeName->size();
+ for ( size_t i = 0; i < nRangeCount; i++ )
{
ScRangeData* pData = (*pRangeName)[i];
if (pData)
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 04954ab66d51..c7afd2682b39 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -1706,7 +1706,9 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsL
// Bereiche uebernehmen
- pTransClip->pRangeName->FreeAll();
+ pTransClip->pRangeName->clear();
+#if NEW_RANGE_NAME
+#else
for (USHORT i = 0; i < pRangeName->GetCount(); i++) //! DB-Bereiche Pivot-Bereiche auch !!!
{
USHORT nIndex = ((ScRangeData*)((*pRangeName)[i]))->GetIndex();
@@ -1716,6 +1718,7 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsL
else
pData->SetIndex(nIndex);
}
+#endif
// The data
@@ -1763,6 +1766,8 @@ void ScDocument::TransposeClip( ScDocument* pTransClip, USHORT nFlags, BOOL bAsL
void ScDocument::CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, const ScMarkData* pMarks, bool bAllTabs)
{
+#if NEW_RANGE_NAME
+#else
std::set<USHORT> aUsedNames; // indexes of named ranges that are used in the copied cells
for (SCTAB i = 0; i <= MAXTAB; ++i)
if (pTab[i] && pClipDoc->pTab[i])
@@ -1785,10 +1790,13 @@ void ScDocument::CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClip
pData->SetIndex(nIndex);
}
}
+#endif
}
void ScDocument::CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, SCTAB nTab)
{
+#if NEW_RANGE_NAME
+#else
// Indexes of named ranges that are used in the copied cells
std::set<USHORT> aUsedNames;
if ( pTab[nTab] && pClipDoc->pTab[nTab] )
@@ -1810,6 +1818,7 @@ void ScDocument::CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClip
pData->SetIndex(nIndex);
}
}
+#endif
}
ScDocument::NumFmtMergeHandler::NumFmtMergeHandler(ScDocument* pDoc, ScDocument* pSrcDoc) :
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index 2214c0bc56e5..900f328f7854 100644
--- a/sc/source/core/tool/rangenam.cxx
+++ b/sc/source/core/tool/rangenam.cxx
@@ -782,14 +782,14 @@ void ScRangeName::SetSharedMaxIndex(sal_uInt16 nInd)
mnSharedMaxIndex = nInd;
}
-size_t ScRangeName::GetCount() const
+size_t ScRangeName::size() const
{
return maData.size();
}
-size_t ScRangeName::size() const
+bool ScRangeName::empty() const
{
- return maData.size();
+ return maData.empty();
}
bool ScRangeName::Insert(ScRangeData* p)
@@ -801,14 +801,6 @@ bool ScRangeName::Insert(ScRangeData* p)
return r.second;
}
-void ScRangeName::AtFree(size_t i)
-{
-}
-
-void ScRangeName::FreeAll()
-{
-}
-
void ScRangeName::erase(const ScRangeData& r)
{
maData.erase(r);
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index 2857d170089d..bc6ad2cd366f 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -1049,6 +1049,8 @@ BOOL ScAreaNameIterator::Next( String& rName, ScRange& rRange )
{
for (;;)
{
+#if NEW_RANGE_NAME
+#else
if ( bFirstPass ) // erst Bereichsnamen
{
if ( pRangeName && nPos < pRangeName->GetCount() )
@@ -1066,6 +1068,7 @@ BOOL ScAreaNameIterator::Next( String& rName, ScRange& rRange )
nPos = 0;
}
}
+#endif
if ( !bFirstPass ) // dann DB-Bereiche
{
if ( pDBCollection && nPos < pDBCollection->GetCount() )
diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx
index 24f49bf46d0f..33c917271358 100644
--- a/sc/source/filter/excel/xename.cxx
+++ b/sc/source/filter/excel/xename.cxx
@@ -671,6 +671,8 @@ void XclExpNameManagerImpl::CreateBuiltInNames()
void XclExpNameManagerImpl::CreateUserNames()
{
+#if NEW_RANGE_NAME
+#else
const ScRangeName& rNamedRanges = GetNamedRanges();
for( USHORT nNameIdx = 0, nNameCount = rNamedRanges.GetCount(); nNameIdx < nNameCount; ++nNameIdx )
{
@@ -680,6 +682,7 @@ void XclExpNameManagerImpl::CreateUserNames()
if( pRangeData && !pRangeData->HasType( RT_SHARED ) && !FindNameIdx( maNameMap, pRangeData->GetIndex() ) )
CreateName( *pRangeData );
}
+#endif
}
void XclExpNameManagerImpl::CreateDatabaseNames()
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index b0625bc439df..6842e43d28dc 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1411,6 +1411,8 @@ void ScPosWnd::FillRangeNames()
// per Hand sortieren, weil Funktionen nicht sortiert werden:
ScRangeName* pRangeNames = pDoc->GetRangeName();
+#if NEW_RANGE_NAME
+#else
USHORT nCount = pRangeNames->GetCount();
if ( nCount > 0 )
{
@@ -1445,6 +1447,7 @@ void ScPosWnd::FillRangeNames()
delete [] ppSortArray;
}
}
+#endif
}
SetText(aPosStr);
}
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx
index 22dc1827e3f9..b6d7f2430091 100644
--- a/sc/source/ui/dbgui/consdlg.cxx
+++ b/sc/source/ui/dbgui/consdlg.cxx
@@ -222,7 +222,7 @@ void ScConsolidateDlg::Init()
ScRangeName* pRangeNames = pDoc->GetRangeName();
ScDBCollection* pDbNames = pDoc->GetDBCollection();
- const USHORT nRangeCount = pRangeNames ? pRangeNames->GetCount() : 0;
+ const USHORT nRangeCount = pRangeNames ? pRangeNames->size() : 0;
const USHORT nDbCount = pDbNames ? pDbNames ->GetCount() : 0;
nAreaDataCount = nRangeCount+nDbCount;
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index 1bb7211e44d0..0defb836d5eb 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -150,6 +150,8 @@ void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet )
if(pDoc->GetChangeTrack()!=NULL) aBtnCopyResult.Disable();
ScRangeName* pRangeNames = pDoc->GetRangeName();
+#if NEW_RANGE_NAME
+#else
const USHORT nCount = pRangeNames ? pRangeNames->GetCount() : 0;
/*
@@ -182,6 +184,7 @@ void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet )
}
}
}
+#endif
// is there a stored source range?
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 0dec37d1e581..96228b2256f3 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -326,7 +326,7 @@ BOOL ScDBDocFunc::RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi )
// DB- und andere Bereiche
ScRangeName* pDocRange = pDoc->GetRangeName();
- if (pDocRange->GetCount())
+ if (!pDocRange->empty())
pUndoRange = new ScRangeName( *pDocRange );
ScDBCollection* pDocDB = pDoc->GetDBCollection();
if (pDocDB->GetCount())
@@ -1078,7 +1078,7 @@ BOOL ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
// DB- und andere Bereiche
ScRangeName* pDocRange = pDoc->GetRangeName();
- if (pDocRange->GetCount())
+ if (!pDocRange->empty())
pUndoRange = new ScRangeName( *pDocRange );
ScDBCollection* pDocDB = pDoc->GetDBCollection();
if (pDocDB->GetCount())
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 66b2a5b6d853..ea2722675ee8 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -4690,15 +4690,18 @@ BOOL ScDocFunc::InsertNameList( const ScAddress& rStartPos, BOOL bApi )
ScDocument* pUndoDoc = NULL;
ScRangeName* pList = pDoc->GetRangeName();
- USHORT nCount = pList->GetCount();
USHORT nValidCount = 0;
USHORT i;
+ USHORT nCount = pList->size();
+#if NEW_RANGE_NAME
+#else
for (i=0; i<nCount; i++)
{
ScRangeData* pData = (*pList)[i];
if ( !pData->HasType( RT_DATABASE ) && !pData->HasType( RT_SHARED ) )
++nValidCount;
}
+#endif
if (nValidCount)
{
diff --git a/sc/source/ui/miscdlgs/namepast.cxx b/sc/source/ui/miscdlgs/namepast.cxx
index ef573132e6a9..e9c2bb416051 100644
--- a/sc/source/ui/miscdlgs/namepast.cxx
+++ b/sc/source/ui/miscdlgs/namepast.cxx
@@ -60,6 +60,8 @@ ScNamePasteDlg::ScNamePasteDlg( Window * pParent, const ScRangeName* pList, BOOL
aNameList.SetSelectHdl( LINK( this,ScNamePasteDlg,ListSelHdl) );
aNameList.SetDoubleClickHdl( LINK( this,ScNamePasteDlg,ListDblClickHdl) );
+#if NEW_RANGE_NAME
+#else
USHORT nCnt = pList->GetCount();
String aText;
@@ -77,6 +79,7 @@ ScNamePasteDlg::ScNamePasteDlg( Window * pParent, const ScRangeName* pList, BOOL
}
}
}
+#endif
ListSelHdl( &aNameList );
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index 2d303f1ce615..7af7ef822ca3 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -314,6 +314,8 @@ void ScNameDlg::UpdateChecks()
void ScNameDlg::UpdateNames()
{
+#if NEW_RANGE_NAME
+#else
USHORT nRangeCount = aLocalRangeName.GetCount();
aEdName.SetUpdateMode( FALSE );
@@ -352,6 +354,7 @@ void ScNameDlg::UpdateNames()
aEdName.SetUpdateMode( TRUE );
aEdName.SetTopEntry(nNamePos);
aEdName.Invalidate();
+#endif
}
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index e6fe9aae19fc..d5f2d97544ee 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -666,6 +666,8 @@ void ScContentTree::GetAreaNames()
return;
ScRangeName* pRangeNames = pDoc->GetRangeName();
+#if NEW_RANGE_NAME
+#else
USHORT nCount = pRangeNames->GetCount();
if ( nCount > 0 )
{
@@ -700,6 +702,7 @@ void ScContentTree::GetAreaNames()
delete [] ppSortArray;
}
}
+#endif
}
void ScContentTree::GetDbNames()
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index 5a489825aad7..5dae698b21b4 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -467,8 +467,9 @@ void ScPrintAreasDlg::Impl_FillLists()
// Ranges holen und in ListBoxen merken
//------------------------------------------------------
ScRangeName* pRangeNames = pDoc->GetRangeName();
- const USHORT nCount = pRangeNames ? pRangeNames->GetCount() : 0;
-
+ size_t nCount = pRangeNames ? pRangeNames->size() : 0;
+#if NEW_RANGE_NAME
+#else
if ( nCount > 0 )
{
String aName;
@@ -516,6 +517,7 @@ void ScPrintAreasDlg::Impl_FillLists()
}
}
}
+#endif
}
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 905008c41da4..dc351ab7569c 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -694,6 +694,8 @@ void ScUndoAutoFill::Undo()
aName += '_';
ScRangeName* pRangeName = pDoc->GetRangeName();
BOOL bHasFound = FALSE;
+#if NEW_RANGE_NAME
+#else
for (USHORT i = 0; i < pRangeName->GetCount(); i++)
{
ScRangeData* pRangeData = (*pRangeName)[i];
@@ -708,6 +710,7 @@ void ScUndoAutoFill::Undo()
}
}
}
+#endif
if (bHasFound)
pRangeName->SetSharedMaxIndex(pRangeName->GetSharedMaxIndex()-1);
diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx
index 7ed1fc49c84f..f77c9e6c900f 100644
--- a/sc/source/ui/unoobj/nameuno.cxx
+++ b/sc/source/ui/unoobj/nameuno.cxx
@@ -526,6 +526,8 @@ ScNamedRangeObj* ScNamedRangesObj::GetObjectByIndex_Impl(sal_uInt16 nIndex)
ScRangeName* pNames = pDocShell->GetDocument()->GetRangeName();
if (pNames)
{
+#if NEW_RANGE_NAME
+#else
sal_uInt16 nCount = pNames->GetCount();
sal_uInt16 nPos = 0;
for (sal_uInt16 i=0; i<nCount; i++)
@@ -538,6 +540,7 @@ ScNamedRangeObj* ScNamedRangesObj::GetObjectByIndex_Impl(sal_uInt16 nIndex)
++nPos;
}
}
+#endif
}
}
return NULL;
@@ -677,10 +680,13 @@ sal_Int32 SAL_CALL ScNamedRangesObj::getCount() throw(uno::RuntimeException)
ScRangeName* pNames = pDocShell->GetDocument()->GetRangeName();
if (pNames)
{
+#if NEW_RANGE_NAME
+#else
sal_uInt16 nCount = pNames->GetCount();
for (sal_uInt16 i=0; i<nCount; i++)
if (lcl_UserVisibleName( (*pNames)[i] )) // interne weglassen
++nRet;
+#endif
}
}
return nRet;
@@ -769,7 +775,8 @@ uno::Sequence<rtl::OUString> SAL_CALL ScNamedRangesObj::getElementNames()
long nVisCount = getCount(); // Namen mit lcl_UserVisibleName
uno::Sequence<rtl::OUString> aSeq(nVisCount);
rtl::OUString* pAry = aSeq.getArray();
-
+#if NEW_RANGE_NAME
+#else
sal_uInt16 nCount = pNames->GetCount();
sal_uInt16 nVisPos = 0;
for (sal_uInt16 i=0; i<nCount; i++)
@@ -778,6 +785,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScNamedRangesObj::getElementNames()
if ( lcl_UserVisibleName(pData) )
pAry[nVisPos++] = pData->GetName();
}
+#endif
return aSeq;
}
}
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 3373aa5ffb07..b3c498d41e37 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -6016,6 +6016,8 @@ uno::Any SAL_CALL ScVbaRange::AdvancedFilter( sal_Int32 Action, const uno::Any&
{
// Get Excel BuiltIn Filter Criteria.
ScRangeName* pRangeNames = pDoc->GetRangeName();
+#if NEW_RANGE_NAME
+#else
const USHORT nCount = pRangeNames ? pRangeNames->GetCount() : 0;
for ( USHORT index = 0; index < nCount; index++ )
{
@@ -6026,6 +6028,7 @@ uno::Any SAL_CALL ScVbaRange::AdvancedFilter( sal_Int32 Action, const uno::Any&
break;
}
}
+#endif
aCriteriaRange = aBuiltInCriteria.Len() > 0 ? uno::makeAny( rtl::OUString( aBuiltInCriteria ) ) : aCriteriaRange;
}
if ( aCriteriaRange.hasValue() )
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index ae20a8fdb942..cd080d49802f 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2161,6 +2161,8 @@ void ScCellShell::ExecuteDataPilotDialog()
ScRangeName* pRangeName = pDoc->GetRangeName();
if (pRangeName)
{
+#if NEW_RANGE_NAME
+#else
USHORT n = pRangeName->GetCount();
for (USHORT i = 0; i < n; ++i)
{
@@ -2171,6 +2173,7 @@ void ScCellShell::ExecuteDataPilotDialog()
pTypeDlg->AppendNamedRange(p->GetName());
}
+#endif
}
DBG_ASSERT(pTypeDlg, "Dialog create fail!");
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index b0bba34e007d..cc4efa6f416b 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -487,7 +487,7 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord,
// DB- und andere Bereiche
ScRangeName* pDocRange = pDoc->GetRangeName();
- if (pDocRange->GetCount())
+ if (!pDocRange->empty())
pUndoRange = new ScRangeName( *pDocRange );
ScDBCollection* pDocDB = pDoc->GetDBCollection();
if (pDocDB->GetCount())
@@ -2229,7 +2229,7 @@ void ScDBFunc::RepeatDB( BOOL bRecord )
// DB- und andere Bereiche
ScRangeName* pDocRange = pDoc->GetRangeName();
- if (pDocRange->GetCount())
+ if (!pDocRange->empty())
pUndoRange = new ScRangeName( *pDocRange );
ScDBCollection* pDocDB = pDoc->GetDBCollection();
if (pDocDB->GetCount())