diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-03-31 15:03:04 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-03-31 15:25:11 +0100 |
commit | 54f8ed8b8386c03922e7a98e0125309eca264d04 (patch) | |
tree | b24c8f5d26a3370e7de94153665fece431f10c85 | |
parent | f4b7338f989bd5f7e934c4dc38045e812eb3d59f (diff) |
const these up
Change-Id: If79187b8e2624da132ed47f5baf374211cc6e449
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 6 | ||||
-rw-r--r-- | svx/source/sidebar/nbdtmg.cxx | 31 |
2 files changed, 7 insertions, 30 deletions
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 4516054ff2c8..794e012f230f 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -157,7 +157,7 @@ static bool lcl_IsNumFmtSet(SvxNumRule* pNum, sal_uInt16 nLevelMask) return bRet; } -static vcl::Font& lcl_GetDefaultBulletFont() +static const vcl::Font& lcl_GetDefaultBulletFont() { static bool bInit = false; static vcl::Font aDefBulletFont("OpenSymbol", "", Size(0, 14)); @@ -490,7 +490,7 @@ IMPL_LINK_NOARG(SvxBulletPickTabPage, NumSelectHdl_Impl, ValueSet*, void) bPreset = false; bModified = true; sal_Unicode cChar = aBulletTypes[m_pExamplesVS->GetSelectItemId() - 1]; - vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); + const vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) @@ -695,7 +695,7 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, void) SvxNumSettingsArr_Impl& rItemArr = aNumSettingsArrays[m_pExamplesVS->GetSelectItemId() - 1]; - vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); + const vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); SvxNumSettings_Impl* pLevelSettings = nullptr; for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index 170032fea9a5..318ebb4dcbd9 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -63,7 +63,7 @@ using namespace com::sun::star::style; namespace svx { namespace sidebar { -vcl::Font& lcl_GetDefaultBulletFont() +const vcl::Font& lcl_GetDefaultBulletFont() { static bool bInit = false; static vcl::Font aDefBulletFont("OpenSymbol", "", Size(0, 14)); @@ -260,7 +260,7 @@ BulletsTypeMgr& BulletsTypeMgr::GetInstance() void BulletsTypeMgr::Init() { - vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); + const vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); for (sal_uInt16 i=0;i<DEFAULT_BULLET_TYPES;i++) { @@ -374,32 +374,9 @@ void BulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI void BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool /*isDefault*/, bool isResetSize) { - //if ( mLevel == (sal_uInt16)0xFFFF ) - // return sal_False; - - sal_Unicode cChar; - //sal_uInt16 nLength = 0; - /*if( AllSettings::GetLayoutRTL() ) - { - nLength = sizeof(aDynamicRTLBulletTypes)/sizeof(sal_Unicode); - - if ( nIndex >= nLength ) - return sal_False; - - cChar = aDynamicRTLBulletTypes[nIndex]; - }else - { - nLength = sizeof(aDynamicBulletTypes)/sizeof(sal_Unicode); - - if ( nIndex >= nLength ) - return sal_False; - - cChar = aDynamicBulletTypes[nIndex]; - }*/ if ( nIndex >= DEFAULT_BULLET_TYPES ) return; - cChar = pActualBullets[nIndex]->cBulletChar; - //vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); + sal_Unicode cChar = pActualBullets[nIndex]->cBulletChar; vcl::Font rActBulletFont = pActualBullets[nIndex]->aFont; sal_uInt16 nMask = 1; @@ -863,7 +840,7 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 break; SvxNumberFormat aFmt(aNum.GetLevel(i)); - vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); + const vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); if (pLevelSettings->nNumberType !=aFmt.GetNumberingType()) isResetSize=true; aFmt.SetNumberingType( pLevelSettings->nNumberType ); sal_uInt16 nUpperLevelOrChar = (sal_uInt16)pLevelSettings->nParentNumbering; |