[Libreoffice-commits] .: sc/inc sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Tue Mar 1 19:50:25 PST 2011
sc/inc/externalrefmgr.hxx | 4 ++--
sc/source/core/tool/compiler.cxx | 22 +++++++++++-----------
sc/source/filter/inc/ftools.hxx | 4 +---
sc/source/filter/xml/xmlexprt.cxx | 4 ++--
sc/source/ui/docshell/externalrefmgr.cxx | 4 ++--
sc/source/ui/unoobj/linkuno.cxx | 2 +-
6 files changed, 19 insertions(+), 21 deletions(-)
New commits:
commit 315288c6c3cd53080e849e7544f9623888e81797
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Tue Mar 1 22:50:13 2011 -0500
Replaced String with rtl::OUString.
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index 1f155b2..2dee208 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -255,7 +255,7 @@ public:
bool isDocInitialized(sal_uInt16 nFileId);
void initializeDoc(sal_uInt16 nFileId, const ::std::vector<String>& rTabNames);
String getTableName(sal_uInt16 nFileId, size_t nCacheId) const;
- void getAllTableNames(sal_uInt16 nFileId, ::std::vector<String>& rTabNames) const;
+ void getAllTableNames(sal_uInt16 nFileId, ::std::vector<rtl::OUString>& rTabNames) const;
SCsTAB getTabSpan( sal_uInt16 nFileId, const String& rStartTabName, const String& rEndTabName ) const;
void getAllNumberFormats(::std::vector<sal_uInt32>& rNumFmts) const;
bool hasCacheTable(sal_uInt16 nFileId, const String& rTabName) const;
@@ -481,7 +481,7 @@ public:
The index in the returned vector corresponds to the table index used to
access the cache table, e.g. in getCacheTable().
*/
- void getAllCachedTableNames(sal_uInt16 nFileId, ::std::vector<String>& rTabNames) const;
+ void getAllCachedTableNames(sal_uInt16 nFileId, ::std::vector<rtl::OUString>& rTabNames) const;
/**
* Get the span (distance+sign(distance)) of two sheets of a specified
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index f262693..5ecd92d 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -695,15 +695,15 @@ static String lcl_makeExternalNameStr( const String& rFile, const String& rName,
return String( aBuf.makeStringAndClear());
}
-static bool lcl_getLastTabName( String& rTabName2, const String& rTabName1,
- const vector<String>& rTabNames, const ScComplexRefData& rRef )
+static bool lcl_getLastTabName( OUString& rTabName2, const OUString& rTabName1,
+ const vector<OUString>& rTabNames, const ScComplexRefData& rRef )
{
SCsTAB nTabSpan = rRef.Ref2.nTab - rRef.Ref1.nTab;
if (nTabSpan > 0)
{
size_t nCount = rTabNames.size();
- vector<String>::const_iterator itrBeg = rTabNames.begin(), itrEnd = rTabNames.end();
- vector<String>::const_iterator itr = ::std::find(itrBeg, itrEnd, rTabName1);
+ vector<OUString>::const_iterator itrBeg = rTabNames.begin(), itrEnd = rTabNames.end();
+ vector<OUString>::const_iterator itr = ::std::find(itrBeg, itrEnd, rTabName1);
if (itr == rTabNames.end())
{
rTabName2 = ScGlobal::GetRscString(STR_NO_REF_TABLE);
@@ -1033,12 +1033,12 @@ struct ConventionOOO_A1 : public Convention_A1
rBuffer.append(sal_Unicode(':'));
- String aLastTabName;
+ OUString aLastTabName;
bool bDisplayTabName = (aRef.Ref1.nTab != aRef.Ref2.nTab);
if (bDisplayTabName)
{
// Get the name of the last table.
- vector<String> aTabNames;
+ vector<OUString> aTabNames;
pRefMgr->getAllCachedTableNames(nFileId, aTabNames);
if (aTabNames.empty())
{
@@ -1246,11 +1246,11 @@ struct ConventionXL
rBuffer.append(sal_Unicode(']'));
}
- static void makeExternalTabNameRange( ::rtl::OUStringBuffer& rBuf, const String& rTabName,
- const vector<String>& rTabNames,
+ static void makeExternalTabNameRange( ::rtl::OUStringBuffer& rBuf, const OUString& rTabName,
+ const vector<OUString>& rTabNames,
const ScComplexRefData& rRef )
{
- String aLastTabName;
+ OUString aLastTabName;
if (!lcl_getLastTabName(aLastTabName, rTabName, rTabNames, rRef))
{
ScRangeStringConverter::AppendTableName(rBuf, aLastTabName);
@@ -1463,7 +1463,7 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL
if (!pFullName)
return;
- vector<String> aTabNames;
+ vector<OUString> aTabNames;
pRefMgr->getAllCachedTableNames(nFileId, aTabNames);
if (aTabNames.empty())
return;
@@ -1670,7 +1670,7 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL
if (!pFullName)
return;
- vector<String> aTabNames;
+ vector<OUString> aTabNames;
pRefMgr->getAllCachedTableNames(nFileId, aTabNames);
if (aTabNames.empty())
return;
diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx
index ef621bb..7c2c457 100644
--- a/sc/source/filter/inc/ftools.hxx
+++ b/sc/source/filter/inc/ftools.hxx
@@ -293,9 +293,7 @@ typedef ::std::vector< sal_Int16 > ScfInt16Vec;
typedef ::std::vector< sal_uInt16 > ScfUInt16Vec;
typedef ::std::vector< sal_Int32 > ScfInt32Vec;
typedef ::std::vector< sal_uInt32 > ScfUInt32Vec;
-typedef ::std::vector< sal_Int64 > ScfInt64Vec;
-typedef ::std::vector< sal_uInt64 > ScfUInt64Vec;
-typedef ::std::vector< String > ScfStringVec;
+typedef ::std::vector< ::rtl::OUString > ScfStringVec;
// ----------------------------------------------------------------------------
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 455c20e..77d20d6 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3790,12 +3790,12 @@ void ScXMLExport::WriteExternalRefCaches()
if (!pUrl)
continue;
- vector<String> aTabNames;
+ vector<OUString> aTabNames;
pRefMgr->getAllCachedTableNames(nFileId, aTabNames);
if (aTabNames.empty())
continue;
- for (vector<String>::const_iterator itr = aTabNames.begin(), itrEnd = aTabNames.end();
+ for (vector<OUString>::const_iterator itr = aTabNames.begin(), itrEnd = aTabNames.end();
itr != itrEnd; ++itr)
{
ScExternalRefCache::TableTypeRef pTable = pRefMgr->getCacheTable(nFileId, *itr, false);
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 8a32f95..75c1961 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -827,7 +827,7 @@ String ScExternalRefCache::getTableName(sal_uInt16 nFileId, size_t nCacheId) con
return EMPTY_STRING;
}
-void ScExternalRefCache::getAllTableNames(sal_uInt16 nFileId, vector<String>& rTabNames) const
+void ScExternalRefCache::getAllTableNames(sal_uInt16 nFileId, vector<OUString>& rTabNames) const
{
rTabNames.clear();
DocItem* pDoc = getDocItem(nFileId);
@@ -1507,7 +1507,7 @@ ScExternalRefManager::ApiGuard::~ApiGuard()
// ----------------------------------------------------------------------------
-void ScExternalRefManager::getAllCachedTableNames(sal_uInt16 nFileId, vector<String>& rTabNames) const
+void ScExternalRefManager::getAllCachedTableNames(sal_uInt16 nFileId, vector<OUString>& rTabNames) const
{
maRefCache.getAllTableNames(nFileId, rTabNames);
}
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index e40de0a..18e36a8 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -1636,7 +1636,7 @@ Sequence< OUString > SAL_CALL ScExternalDocLinkObj::getElementNames()
throw (RuntimeException)
{
SolarMutexGuard aGuard;
- vector<String> aTabNames;
+ vector<OUString> aTabNames;
mpRefMgr->getAllCachedTableNames(mnFileId, aTabNames);
size_t n = aTabNames.size();
Sequence<OUString> aSeq(n);
More information about the Libreoffice-commits
mailing list