diff options
author | Caio B. Silva <caioboffo@gmail.com> | 2018-07-23 09:37:59 -0300 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-09-18 12:04:19 +0200 |
commit | a93c71a97975c0b3f8fceae86fa2bd598a9eae59 (patch) | |
tree | 1dad8928833bb7ff22f367a3d7fd5b5bad2bbcab /svtools | |
parent | c9afea8dad1cc5cfad3837a0a747a62496919af1 (diff) |
tdf#114441 Replacing sal_uLong with most appropriate integer types
Change-Id: I4ba636e9b882c0c0958420037768fd596fdecef9
Reviewed-on: https://gerrit.libreoffice.org/57845
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 10 | ||||
-rw-r--r-- | svtools/source/control/ctrltool.cxx | 20 |
2 files changed, 15 insertions, 15 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 6f1494d9c9d8..27b0dd71d304 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -747,10 +747,10 @@ void FontNameBox::Fill( const FontList* pList ) for ( sal_uInt16 i = 0; i < nFontCount; i++ ) { const FontMetric& rFontMetric = pList->GetFontName( i ); - sal_uLong nIndex = InsertEntry( rFontMetric.GetFamilyName() ); + sal_Int32 nIndex = InsertEntry( rFontMetric.GetFamilyName() ); if ( nIndex != LISTBOX_ERROR ) { - if ( nIndex < mpFontList->size() ) { + if ( nIndex < static_cast<sal_Int32>(mpFontList->size()) ) { ImplFontList::iterator it = mpFontList->begin(); ::std::advance( it, nIndex ); mpFontList->insert( it, rFontMetric ); @@ -1526,11 +1526,11 @@ void FontSizeBox::Fill( const FontMetric* pFontMetric, const FontList* pList ) if ( pAry == FontList::GetStdSizeAry() ) { // for scalable fonts all font size names - sal_uLong nCount = aFontSizeNames.Count(); - for( sal_uLong i = 0; i < nCount; i++ ) + sal_Int32 nCount = aFontSizeNames.Count(); + for( sal_Int32 i = 0; i < nCount; i++ ) { OUString aSizeName = aFontSizeNames.GetIndexName( i ); - sal_IntPtr nSize = aFontSizeNames.GetIndexSize( i ); + sal_Int32 nSize = aFontSizeNames.GetIndexSize( i ); ComboBox::InsertEntry( aSizeName, nPos ); ComboBox::SetEntryData( nPos, reinterpret_cast<void*>(-nSize) ); // mark as special nPos++; diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index 83e3897d9569..708f4ef8aa14 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -163,7 +163,7 @@ static OUString ImplMakeSearchStringFromName(const OUString& rStr) return ImplMakeSearchString(rStr.getToken( 0, ';' )); } -ImplFontListNameInfo* FontList::ImplFind(const OUString& rSearchName, sal_uLong* pIndex) const +ImplFontListNameInfo* FontList::ImplFind(const OUString& rSearchName, sal_uInt32* pIndex) const { // Append if there is no entry in the list or if the entry is larger // then the last one. We only compare to the last entry as the list of VCL @@ -172,7 +172,7 @@ ImplFontListNameInfo* FontList::ImplFind(const OUString& rSearchName, sal_uLong* if (m_Entries.empty()) { if ( pIndex ) - *pIndex = ULONG_MAX; + *pIndex = SAL_MAX_UINT32; return nullptr; } else @@ -182,7 +182,7 @@ ImplFontListNameInfo* FontList::ImplFind(const OUString& rSearchName, sal_uLong* if (nComp > 0) { if ( pIndex ) - *pIndex = ULONG_MAX; + *pIndex = SAL_MAX_UINT32; return nullptr; } else if (nComp == 0) @@ -261,7 +261,7 @@ void FontList::ImplInsertFonts(OutputDevice* pDevice, bool bInsertData) FontMetric aFontMetric = pDevice->GetDevFont( i ); OUString aSearchName(aFontMetric.GetFamilyName()); ImplFontListNameInfo* pData; - sal_uLong nIndex; + sal_uInt32 nIndex; aSearchName = ImplMakeSearchString(aSearchName); pData = ImplFind( aSearchName, &nIndex ); @@ -274,7 +274,7 @@ void FontList::ImplInsertFonts(OutputDevice* pDevice, bool bInsertData) pData->mpFirst = pNewInfo; pNewInfo->mpNext = nullptr; - if (nIndex < m_Entries.size()) + if (nIndex < static_cast<sal_uInt32>(m_Entries.size())) m_Entries.insert(m_Entries.begin()+nIndex, std::unique_ptr<ImplFontListNameInfo>(pData)); else @@ -784,7 +784,7 @@ const sal_IntPtr* FontList::GetSizeAry( const FontMetric& rInfo ) const struct ImplFSNameItem { - long mnSize; + sal_Int32 mnSize; const char* mszUtf8Name; }; @@ -828,7 +828,7 @@ FontSizeNames::FontSizeNames( LanguageType eLanguage ) } } -long FontSizeNames::Name2Size( const OUString& rName ) const +sal_Int32 FontSizeNames::Name2Size( const OUString& rName ) const { if ( mnElem ) { @@ -844,7 +844,7 @@ long FontSizeNames::Name2Size( const OUString& rName ) const return 0; } -OUString FontSizeNames::Size2Name( long nValue ) const +OUString FontSizeNames::Size2Name( sal_Int32 nValue ) const { OUString aStr; @@ -866,7 +866,7 @@ OUString FontSizeNames::Size2Name( long nValue ) const return aStr; } -OUString FontSizeNames::GetIndexName( sal_uLong nIndex ) const +OUString FontSizeNames::GetIndexName( sal_Int32 nIndex ) const { OUString aStr; @@ -876,7 +876,7 @@ OUString FontSizeNames::GetIndexName( sal_uLong nIndex ) const return aStr; } -long FontSizeNames::GetIndexSize( sal_uLong nIndex ) const +sal_Int32 FontSizeNames::GetIndexSize( sal_Int32 nIndex ) const { if ( nIndex >= mnElem ) return 0; |