summaryrefslogtreecommitdiff
path: root/sw/source/uibase/utlui/uitool.cxx
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2014-06-28 10:01:51 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2014-06-28 11:17:56 +0200
commitddd86d9ee9562ef781133abd0e6f5281d480a657 (patch)
treec500025ebfa0917f3370f171c26d34ad830b694e /sw/source/uibase/utlui/uitool.cxx
parent4ad08a7008dbf8e2161249c95ce51c56e31ccee6 (diff)
sal_uInt16: constify and avoid unneed cast
Change-Id: I78fe90f24805c5bca3548cf4c005d2c44574aa5c
Diffstat (limited to 'sw/source/uibase/utlui/uitool.cxx')
-rw-r--r--sw/source/uibase/utlui/uitool.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx
index b3e62598e4f0..678ef993c463 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -259,7 +259,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
{
const SvxPageItem& rPageItem = (const SvxPageItem&)rSet.Get(SID_ATTR_PAGE);
- sal_uInt16 nUse = (sal_uInt16)rPageItem.GetPageUsage();
+ const sal_uInt16 nUse = rPageItem.GetPageUsage();
if(nUse)
rPageDesc.SetUseOn( lcl_convertUseFromSvx((UseOnPage) nUse) );
rPageDesc.SetLandscape(rPageItem.IsLandscape());
@@ -380,7 +380,8 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
SwTxtFmtColl* pColl = rDoc.FindTxtFmtCollByName( rColl );
if( !pColl )
{
- sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( rColl, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
+ const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(
+ rColl, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
if( USHRT_MAX != nId )
pColl = rDoc.GetTxtCollFromPool( nId );
else
@@ -781,7 +782,7 @@ void SetApplyCharUnit(bool bApplyChar, bool bWeb)
bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, sal_uInt16 nId )
{
bool bRet = false;
- sal_uInt16 nItemCount = rMenu.GetItemCount();
+ const sal_uInt16 nItemCount = rMenu.GetItemCount();
OUString sCommand;
for( sal_uInt16 nItem = 0; nItem < nItemCount; ++nItem)
{