summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2014-07-23 21:07:58 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2014-07-26 14:25:25 +0200
commit597759aab8e093c6c816da1ef334cfc70a56b70a (patch)
tree60d3107d13155141c461f97e744bcecb3372c870 /sw
parent3e7004c3acb1807aa758d84f7b44ba867196b7b5 (diff)
sal_uInt16 to size_t
Change-Id: I9744f6b0607ff5f625746d2e69576843cefec2b1
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/dochdl/gloshdl.cxx6
-rw-r--r--sw/source/uibase/inc/gloslst.hxx12
-rw-r--r--sw/source/uibase/ribbar/workctrl.cxx8
-rw-r--r--sw/source/uibase/utlui/gloslst.cxx12
4 files changed, 19 insertions, 19 deletions
diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx
index 01b2070fedc2..9509fe3a35bb 100644
--- a/sw/source/uibase/dochdl/gloshdl.cxx
+++ b/sw/source/uibase/dochdl/gloshdl.cxx
@@ -409,15 +409,15 @@ bool SwGlossaryHdl::Expand( const OUString& rShortName,
{
const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore();
SwGlossaryList* pGlossaryList = ::GetGlossaryList();
- sal_uInt16 nGroupCount = pGlossaryList->GetGroupCount();
- for(sal_uInt16 i = 1; i <= nGroupCount; i++)
+ const size_t nGroupCount = pGlossaryList->GetGroupCount();
+ for(size_t i = 1; i <= nGroupCount; ++i)
{
OUString sTitle = pGlossaryList->GetGroupTitle(i - 1);
// get group name with path-extension
OUString sGroupName = pGlossaryList->GetGroupName(i - 1, false);
if(sGroupName == pGlossary->GetName())
continue;
- sal_uInt16 nBlockCount = pGlossaryList->GetBlockCount(i -1);
+ const sal_uInt16 nBlockCount = pGlossaryList->GetBlockCount(i -1);
if(nBlockCount)
{
for(sal_uInt16 j = 0; j < nBlockCount; j++)
diff --git a/sw/source/uibase/inc/gloslst.hxx b/sw/source/uibase/inc/gloslst.hxx
index 8bac07174418..5a24fe075652 100644
--- a/sw/source/uibase/inc/gloslst.hxx
+++ b/sw/source/uibase/inc/gloslst.hxx
@@ -62,13 +62,13 @@ public:
bool GetShortName(const OUString& rLongName,
OUString& rShortName, OUString& rGroupName );
- sal_uInt16 GetGroupCount();
- OUString GetGroupName(sal_uInt16 nPos, bool bNoPath = true);
- OUString GetGroupTitle(sal_uInt16 nPos);
+ size_t GetGroupCount();
+ OUString GetGroupName(size_t nPos, bool bNoPath = true);
+ OUString GetGroupTitle(size_t nPos);
- sal_uInt16 GetBlockCount(sal_uInt16 nGroup);
- OUString GetBlockLongName(sal_uInt16 nGroup, sal_uInt16 nBlock);
- OUString GetBlockShortName(sal_uInt16 nGroup, sal_uInt16 nBlock);
+ sal_uInt16 GetBlockCount(size_t nGroup);
+ OUString GetBlockLongName(size_t nGroup, sal_uInt16 nBlock);
+ OUString GetBlockShortName(size_t nGroup, sal_uInt16 nBlock);
void Update();
diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx
index 48a4e66efd29..6ec91a84f11b 100644
--- a/sw/source/uibase/ribbar/workctrl.cxx
+++ b/sw/source/uibase/ribbar/workctrl.cxx
@@ -189,14 +189,14 @@ SfxPopupWindow* SwTbxAutoTextCtrl::CreatePopupWindow()
pPopup = new PopupMenu;
SwGlossaryList* pGlossaryList = ::GetGlossaryList();
- sal_uInt16 nGroupCount = pGlossaryList->GetGroupCount();
- for(sal_uInt16 i = 1; i <= nGroupCount; i++)
+ const size_t nGroupCount = pGlossaryList->GetGroupCount();
+ for(size_t i = 1; i <= nGroupCount; ++i)
{
OUString sTitle = pGlossaryList->GetGroupTitle(i - 1);
- sal_uInt16 nBlockCount = pGlossaryList->GetBlockCount(i -1);
+ const sal_uInt16 nBlockCount = pGlossaryList->GetBlockCount(i -1);
if(nBlockCount)
{
- sal_uInt16 nIndex = 100 * (i);
+ sal_uInt16 nIndex = static_cast<sal_uInt16>(100*i);
// but insert without extension
pPopup->InsertItem( i, sTitle);
PopupMenu* pSub = new PopupMenu;
diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx
index ca09e9b35d72..4d03f584134f 100644
--- a/sw/source/uibase/utlui/gloslst.cxx
+++ b/sw/source/uibase/utlui/gloslst.cxx
@@ -165,14 +165,14 @@ bool SwGlossaryList::GetShortName(const OUString& rLongName,
return bRet;
}
-sal_uInt16 SwGlossaryList::GetGroupCount()
+size_t SwGlossaryList::GetGroupCount()
{
if(!bFilled)
Update();
return aGroupArr.size();
}
-OUString SwGlossaryList::GetGroupName(sal_uInt16 nPos, bool bNoPath)
+OUString SwGlossaryList::GetGroupName(size_t nPos, bool bNoPath)
{
OSL_ENSURE(aGroupArr.size() > nPos, "group not available");
if(nPos < aGroupArr.size())
@@ -186,7 +186,7 @@ OUString SwGlossaryList::GetGroupName(sal_uInt16 nPos, bool bNoPath)
return OUString();
}
-OUString SwGlossaryList::GetGroupTitle(sal_uInt16 nPos)
+OUString SwGlossaryList::GetGroupTitle(size_t nPos)
{
OSL_ENSURE(aGroupArr.size() > nPos, "group not available");
if(nPos < aGroupArr.size())
@@ -197,7 +197,7 @@ OUString SwGlossaryList::GetGroupTitle(sal_uInt16 nPos)
return OUString();
}
-sal_uInt16 SwGlossaryList::GetBlockCount(sal_uInt16 nGroup)
+sal_uInt16 SwGlossaryList::GetBlockCount(size_t nGroup)
{
OSL_ENSURE(aGroupArr.size() > nGroup, "group not available");
if(nGroup < aGroupArr.size())
@@ -208,7 +208,7 @@ sal_uInt16 SwGlossaryList::GetBlockCount(sal_uInt16 nGroup)
return 0;
}
-OUString SwGlossaryList::GetBlockLongName(sal_uInt16 nGroup, sal_uInt16 nBlock)
+OUString SwGlossaryList::GetBlockLongName(size_t nGroup, sal_uInt16 nBlock)
{
OSL_ENSURE(aGroupArr.size() > nGroup, "group not available");
if(nGroup < aGroupArr.size())
@@ -219,7 +219,7 @@ OUString SwGlossaryList::GetBlockLongName(sal_uInt16 nGroup, sal_uInt16 nBlock)
return OUString();
}
-OUString SwGlossaryList::GetBlockShortName(sal_uInt16 nGroup, sal_uInt16 nBlock)
+OUString SwGlossaryList::GetBlockShortName(size_t nGroup, sal_uInt16 nBlock)
{
OSL_ENSURE(aGroupArr.size() > nGroup, "group not available");
if(nGroup < aGroupArr.size())