summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-10-04 19:13:26 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-10-04 19:15:26 -0400
commit3ff650d5659ed050e33074355ee2384f1569b21e (patch)
tree32ffee5777a40bd95b1b2abca0e7d7d33d349943
parent200b4539677b51cb7161a5dd4697778dbfc693e3 (diff)
Rename StringPool to SharedStringPool because that's what it is.
Change-Id: I2fc3ce4f0c2291d402cb470346d5561373fb51e7
-rw-r--r--editeng/source/editeng/editobj.cxx20
-rw-r--r--editeng/source/editeng/editobj2.hxx14
-rw-r--r--include/editeng/editobj.hxx8
-rw-r--r--include/svl/sharedstringpool.hxx (renamed from include/svl/stringpool.hxx)6
-rw-r--r--sc/inc/document.hxx8
-rw-r--r--sc/inc/formulagroup.hxx4
-rw-r--r--sc/qa/unit/ucalc.cxx4
-rw-r--r--sc/source/core/data/column3.cxx2
-rw-r--r--sc/source/core/data/documen2.cxx8
-rw-r--r--sc/source/core/data/documentimport.cxx2
-rw-r--r--sc/source/core/tool/interpr1.cxx2
-rw-r--r--svl/Library_svl.mk2
-rw-r--r--svl/qa/unit/svl.cxx6
-rw-r--r--svl/source/misc/sharedstringpool.cxx (renamed from svl/source/misc/stringpool.cxx)20
14 files changed, 53 insertions, 53 deletions
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 4e6af473b38d..3a5d41c47257 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -44,7 +44,7 @@
#include <vcl/graph.hxx>
#include <svl/intitem.hxx>
-#include "svl/stringpool.hxx"
+#include "svl/sharedstringpool.hxx"
#include <unotools/fontcvt.hxx>
#include <tools/tenccvt.hxx>
@@ -149,17 +149,17 @@ ContentInfo::~ContentInfo()
aAttribs.clear();
}
-void ContentInfo::NormalizeString( svl::StringPool& rPool )
+void ContentInfo::NormalizeString( svl::SharedStringPool& rPool )
{
aText = OUString(rPool.intern(aText));
}
-sal_uIntPtr ContentInfo::GetStringID( const svl::StringPool& rPool ) const
+sal_uIntPtr ContentInfo::GetStringID( const svl::SharedStringPool& rPool ) const
{
return rPool.getIdentifier(aText);
}
-sal_uIntPtr ContentInfo::GetStringIDIgnoreCase( const svl::StringPool& rPool ) const
+sal_uIntPtr ContentInfo::GetStringIDIgnoreCase( const svl::SharedStringPool& rPool ) const
{
return rPool.getIdentifierIgnoreCase(aText);
}
@@ -332,17 +332,17 @@ editeng::FieldUpdater EditTextObject::GetFieldUpdater()
return mpImpl->GetFieldUpdater();
}
-void EditTextObject::NormalizeString( svl::StringPool& rPool )
+void EditTextObject::NormalizeString( svl::SharedStringPool& rPool )
{
mpImpl->NormalizeString(rPool);
}
-bool EditTextObject::GetStringIDs( const svl::StringPool& rPool, std::vector<sal_uIntPtr>& rIDs ) const
+bool EditTextObject::GetStringIDs( const svl::SharedStringPool& rPool, std::vector<sal_uIntPtr>& rIDs ) const
{
return mpImpl->GetStringIDs(rPool, rIDs);
}
-bool EditTextObject::GetStringIDsIgnoreCase( const svl::StringPool& rPool, std::vector<sal_uIntPtr>& rIDs ) const
+bool EditTextObject::GetStringIDsIgnoreCase( const svl::SharedStringPool& rPool, std::vector<sal_uIntPtr>& rIDs ) const
{
return mpImpl->GetStringIDsIgnoreCase(rPool, rIDs);
}
@@ -633,7 +633,7 @@ void EditTextObjectImpl::SetUserType( sal_uInt16 n )
nUserType = n;
}
-void EditTextObjectImpl::NormalizeString( svl::StringPool& rPool )
+void EditTextObjectImpl::NormalizeString( svl::SharedStringPool& rPool )
{
ContentInfosType::iterator it = aContents.begin(), itEnd = aContents.end();
for (; it != itEnd; ++it)
@@ -643,7 +643,7 @@ void EditTextObjectImpl::NormalizeString( svl::StringPool& rPool )
}
}
-bool EditTextObjectImpl::GetStringIDs( const svl::StringPool& rPool, std::vector<sal_uIntPtr>& rIDs ) const
+bool EditTextObjectImpl::GetStringIDs( const svl::SharedStringPool& rPool, std::vector<sal_uIntPtr>& rIDs ) const
{
std::vector<sal_uIntPtr> aIDs;
aIDs.reserve(aContents.size());
@@ -662,7 +662,7 @@ bool EditTextObjectImpl::GetStringIDs( const svl::StringPool& rPool, std::vector
return true;
}
-bool EditTextObjectImpl::GetStringIDsIgnoreCase( const svl::StringPool& rPool, std::vector<sal_uIntPtr>& rIDs ) const
+bool EditTextObjectImpl::GetStringIDsIgnoreCase( const svl::SharedStringPool& rPool, std::vector<sal_uIntPtr>& rIDs ) const
{
std::vector<sal_uIntPtr> aIDs;
aIDs.reserve(aContents.size());
diff --git a/editeng/source/editeng/editobj2.hxx b/editeng/source/editeng/editobj2.hxx
index d2118d79c318..20dafe929db5 100644
--- a/editeng/source/editeng/editobj2.hxx
+++ b/editeng/source/editeng/editobj2.hxx
@@ -37,7 +37,7 @@ struct Section;
namespace svl {
-class StringPool;
+class SharedStringPool;
}
@@ -142,9 +142,9 @@ private:
public:
~ContentInfo();
- void NormalizeString( svl::StringPool& rPool );
- sal_uIntPtr GetStringID( const svl::StringPool& rPool ) const;
- sal_uIntPtr GetStringIDIgnoreCase( const svl::StringPool& rPool ) const;
+ void NormalizeString( svl::SharedStringPool& rPool );
+ sal_uIntPtr GetStringID( const svl::SharedStringPool& rPool ) const;
+ sal_uIntPtr GetStringIDIgnoreCase( const svl::SharedStringPool& rPool ) const;
const XEditAttributesType& GetAttribs() const { return aAttribs; }
XEditAttributesType& GetAttribs() { return aAttribs; }
@@ -208,9 +208,9 @@ public:
sal_uInt16 GetUserType() const;
void SetUserType( sal_uInt16 n );
- void NormalizeString( svl::StringPool& rPool );
- bool GetStringIDs( const svl::StringPool& rPool, std::vector<sal_uIntPtr>& rIDs ) const;
- bool GetStringIDsIgnoreCase( const svl::StringPool& rPool, std::vector<sal_uIntPtr>& rIDs ) const;
+ void NormalizeString( svl::SharedStringPool& rPool );
+ bool GetStringIDs( const svl::SharedStringPool& rPool, std::vector<sal_uIntPtr>& rIDs ) const;
+ bool GetStringIDsIgnoreCase( const svl::SharedStringPool& rPool, std::vector<sal_uIntPtr>& rIDs ) const;
bool IsVertical() const;
void SetVertical( bool b );
diff --git a/include/editeng/editobj.hxx b/include/editeng/editobj.hxx
index 4751469c68ec..3d1cccaed7b0 100644
--- a/include/editeng/editobj.hxx
+++ b/include/editeng/editobj.hxx
@@ -51,7 +51,7 @@ struct Section;
namespace svl {
-class StringPool;
+class SharedStringPool;
}
@@ -83,10 +83,10 @@ public:
*
* @param rPool shared string pool.
*/
- void NormalizeString( svl::StringPool& rPool );
+ void NormalizeString( svl::SharedStringPool& rPool );
- bool GetStringIDs( const svl::StringPool& rPool, std::vector<sal_uIntPtr>& rIDs ) const;
- bool GetStringIDsIgnoreCase( const svl::StringPool& rPool, std::vector<sal_uIntPtr>& rIDs ) const;
+ bool GetStringIDs( const svl::SharedStringPool& rPool, std::vector<sal_uIntPtr>& rIDs ) const;
+ bool GetStringIDsIgnoreCase( const svl::SharedStringPool& rPool, std::vector<sal_uIntPtr>& rIDs ) const;
const SfxItemPool* GetPool() const;
sal_uInt16 GetUserType() const; // For OutlinerMode, it can however not save in compatible format
diff --git a/include/svl/stringpool.hxx b/include/svl/sharedstringpool.hxx
index fbcff1e58b7c..6793162059f8 100644
--- a/include/svl/stringpool.hxx
+++ b/include/svl/sharedstringpool.hxx
@@ -25,7 +25,7 @@ namespace svl {
* original-cased strings to upper-cased strings for case insensitive
* operations.
*/
-class SVL_DLLPUBLIC StringPool
+class SVL_DLLPUBLIC SharedStringPool
{
typedef boost::unordered_set<OUString, OUStringHash> StrHashType;
typedef std::pair<StrHashType::iterator, bool> InsertResultType;
@@ -38,8 +38,8 @@ class SVL_DLLPUBLIC StringPool
public:
- StringPool();
- StringPool( const CharClass* pCharClass );
+ SharedStringPool();
+ SharedStringPool( const CharClass* pCharClass );
/**
* Intern a string object into the shared string pool.
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 2ef6073a49b9..550f7b7dab2b 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -50,7 +50,7 @@
namespace editeng { class SvxBorderLine; }
namespace formula { struct VectorRefArray; }
-namespace svl { class StringPool; }
+namespace svl { class SharedStringPool; }
namespace sc {
struct FormulaGroupContext;
@@ -245,7 +245,7 @@ private:
rtl::Reference<ScPoolHelper> xPoolHelper;
- boost::scoped_ptr<svl::StringPool> mpCellStringPool;
+ boost::scoped_ptr<svl::SharedStringPool> mpCellStringPool;
SfxUndoManager* mpUndoManager;
ScFieldEditEngine* pEditEngine; // uses pEditPool from xPoolHelper
@@ -859,8 +859,8 @@ public:
*/
double* GetValueCell( const ScAddress& rPos );
- svl::StringPool& GetCellStringPool();
- const svl::StringPool& GetCellStringPool() const;
+ svl::SharedStringPool& GetCellStringPool();
+ const svl::SharedStringPool& GetCellStringPool() const;
sal_uIntPtr GetCellStringID( const ScAddress& rPos ) const;
sal_uIntPtr GetCellStringIDIgnoreCase( const ScAddress& rPos ) const;
diff --git a/sc/inc/formulagroup.hxx b/sc/inc/formulagroup.hxx
index a8d20bb9890a..fc3af2a543aa 100644
--- a/sc/inc/formulagroup.hxx
+++ b/sc/inc/formulagroup.hxx
@@ -14,7 +14,7 @@
#include "types.hxx"
#include "platforminfo.hxx"
-#include "svl/stringpool.hxx"
+#include "svl/sharedstringpool.hxx"
#include <vector>
#include <boost/noncopyable.hpp>
@@ -33,7 +33,7 @@ struct FormulaGroupContext : boost::noncopyable
typedef boost::ptr_vector<NumArrayType> NumArrayStoreType;
typedef boost::ptr_vector<StrArrayType> StrArrayStoreType;
- svl::StringPool maStrPool;
+ svl::SharedStringPool maStrPool;
NumArrayStoreType maNumArrays;
StrArrayStoreType maStrArrays;
};
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 3e7239efa870..eb61b906b657 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -65,7 +65,7 @@
#include <svx/svdocirc.hxx>
#include <svx/svdopath.hxx>
#include "svl/srchitem.hxx"
-#include "svl/stringpool.hxx"
+#include "svl/sharedstringpool.hxx"
#include <sfx2/docfile.hxx>
@@ -502,7 +502,7 @@ void Test::testCellStringPool()
CPPUNIT_ASSERT_MESSAGE("They must be equal when cases are ignored.", nId1 == nId2);
// Check the string counts after purging. Purging shouldn't remove any strings in this case.
- svl::StringPool& rPool = m_pDoc->GetCellStringPool();
+ svl::SharedStringPool& rPool = m_pDoc->GetCellStringPool();
rPool.purge();
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(4), rPool.getCount());
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), rPool.getCountIgnoreCase());
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 6c964ca060c6..c651cca987f7 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -57,7 +57,7 @@
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
#include <svl/broadcast.hxx>
-#include "svl/stringpool.hxx"
+#include "svl/sharedstringpool.hxx"
#include "editeng/editstat.hxx"
#include <cstdio>
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index ea00606ea08d..0fb675584cc9 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -35,7 +35,7 @@
#include <vcl/virdev.hxx>
#include <comphelper/processfactory.hxx>
#include <svl/PasswordHelper.hxx>
-#include "svl/stringpool.hxx"
+#include "svl/sharedstringpool.hxx"
#include <tools/tenccvt.hxx>
#include <tools/urlobj.hxx>
#include <rtl/crc.h>
@@ -119,7 +119,7 @@ private:
// STATIC DATA -----------------------------------------------------------
ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) :
- mpCellStringPool(new svl::StringPool(ScGlobal::pCharClass)),
+ mpCellStringPool(new svl::SharedStringPool(ScGlobal::pCharClass)),
mpUndoManager( NULL ),
pEditEngine( NULL ),
pNoteEngine( NULL ),
@@ -600,12 +600,12 @@ ScRefCellValue ScDocument::GetRefCellValue( const ScAddress& rPos )
return maTabs[rPos.Tab()]->GetRefCellValue(rPos.Col(), rPos.Row());
}
-svl::StringPool& ScDocument::GetCellStringPool()
+svl::SharedStringPool& ScDocument::GetCellStringPool()
{
return *mpCellStringPool;
}
-const svl::StringPool& ScDocument::GetCellStringPool() const
+const svl::SharedStringPool& ScDocument::GetCellStringPool() const
{
return *mpCellStringPool;
}
diff --git a/sc/source/core/data/documentimport.cxx b/sc/source/core/data/documentimport.cxx
index 4c9157d5a52b..4822557794f5 100644
--- a/sc/source/core/data/documentimport.cxx
+++ b/sc/source/core/data/documentimport.cxx
@@ -17,7 +17,7 @@
#include "mtvelements.hxx"
#include "tokenarray.hxx"
-#include "svl/stringpool.hxx"
+#include "svl/sharedstringpool.hxx"
struct ScDocumentImportImpl
{
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 7026a4656179..6bf009321801 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -60,7 +60,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
-#include "svl/stringpool.hxx"
+#include "svl/sharedstringpool.hxx"
#include <stdlib.h>
#include <string.h>
diff --git a/svl/Library_svl.mk b/svl/Library_svl.mk
index eddabf0a259d..dc2bf4134780 100644
--- a/svl/Library_svl.mk
+++ b/svl/Library_svl.mk
@@ -110,7 +110,7 @@ $(eval $(call gb_Library_add_exception_objects,svl,\
svl/source/misc/lockfilecommon \
svl/source/misc/ownlist \
svl/source/misc/sharecontrolfile \
- svl/source/misc/stringpool \
+ svl/source/misc/sharedstringpool \
svl/source/misc/strmadpt \
svl/source/misc/urihelper \
svl/source/notify/brdcst \
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index a34bb47caec7..fe987ec2d5e9 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -33,7 +33,7 @@
#include "svl/zforlist.hxx"
#include "svl/zformat.hxx"
-#include "svl/stringpool.hxx"
+#include "svl/sharedstringpool.hxx"
#include "unotools/syslocale.hxx"
#include <boost/scoped_ptr.hpp>
@@ -299,7 +299,7 @@ void Test::testNumberFormat()
void Test::testStringPool()
{
SvtSysLocale aSysLocale;
- svl::StringPool aPool(aSysLocale.GetCharClassPtr());
+ svl::SharedStringPool aPool(aSysLocale.GetCharClassPtr());
const rtl_uString* p1 = aPool.intern("Andy");
const rtl_uString* p2 = aPool.intern("Andy");
@@ -342,7 +342,7 @@ void Test::testStringPool()
void Test::testStringPoolPurge()
{
SvtSysLocale aSysLocale;
- svl::StringPool aPool(aSysLocale.GetCharClassPtr());
+ svl::SharedStringPool aPool(aSysLocale.GetCharClassPtr());
aPool.intern("Andy");
aPool.intern("andy");
aPool.intern("ANDY");
diff --git a/svl/source/misc/stringpool.cxx b/svl/source/misc/sharedstringpool.cxx
index 7ebc207b2907..805a6fc75576 100644
--- a/svl/source/misc/stringpool.cxx
+++ b/svl/source/misc/sharedstringpool.cxx
@@ -7,15 +7,15 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include "svl/stringpool.hxx"
+#include "svl/sharedstringpool.hxx"
#include "unotools/charclass.hxx"
namespace svl {
-StringPool::StringPool() : mpCharClass(NULL) {}
-StringPool::StringPool( const CharClass* pCharClass ) : mpCharClass(pCharClass) {}
+SharedStringPool::SharedStringPool() : mpCharClass(NULL) {}
+SharedStringPool::SharedStringPool( const CharClass* pCharClass ) : mpCharClass(pCharClass) {}
-rtl_uString* StringPool::intern( const OUString& rStr )
+rtl_uString* SharedStringPool::intern( const OUString& rStr )
{
InsertResultType aRes = findOrInsert(maStrPool, rStr);
if (aRes.first == maStrPool.end())
@@ -45,13 +45,13 @@ rtl_uString* StringPool::intern( const OUString& rStr )
return pOrig;
}
-sal_uIntPtr StringPool::getIdentifier( const OUString& rStr ) const
+sal_uIntPtr SharedStringPool::getIdentifier( const OUString& rStr ) const
{
StrHashType::const_iterator it = maStrPool.find(rStr);
return (it == maStrPool.end()) ? 0 : reinterpret_cast<sal_uIntPtr>(it->pData);
}
-sal_uIntPtr StringPool::getIdentifierIgnoreCase( const OUString& rStr ) const
+sal_uIntPtr SharedStringPool::getIdentifierIgnoreCase( const OUString& rStr ) const
{
StrHashType::const_iterator itOrig = maStrPool.find(rStr);
if (itOrig == maStrPool.end())
@@ -76,7 +76,7 @@ inline sal_Int32 getRefCount( const rtl_uString* p )
}
-void StringPool::purge()
+void SharedStringPool::purge()
{
StrHashType aNewStrPool;
StrHashType::iterator it = maStrPool.begin(), itEnd = maStrPool.end();
@@ -111,17 +111,17 @@ void StringPool::purge()
maStrPoolUpper.swap(aNewStrPool);
}
-size_t StringPool::getCount() const
+size_t SharedStringPool::getCount() const
{
return maStrPool.size();
}
-size_t StringPool::getCountIgnoreCase() const
+size_t SharedStringPool::getCountIgnoreCase() const
{
return maStrPoolUpper.size();
}
-StringPool::InsertResultType StringPool::findOrInsert( StrHashType& rPool, const OUString& rStr ) const
+SharedStringPool::InsertResultType SharedStringPool::findOrInsert( StrHashType& rPool, const OUString& rStr ) const
{
StrHashType::iterator it = rPool.find(rStr);
bool bInserted = false;