[Libreoffice-commits] core.git: desktop/source editeng/source framework/source include/svtools svtools/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Sep 12 13:48:25 UTC 2020
desktop/source/lib/init.cxx | 2 +-
editeng/source/editeng/editview.cxx | 2 +-
framework/source/uielement/fontsizemenucontroller.cxx | 4 ++--
include/svtools/ctrltool.hxx | 11 +++++------
svtools/source/control/ctrlbox.cxx | 8 ++++----
svtools/source/control/ctrltool.cxx | 6 +++---
6 files changed, 16 insertions(+), 17 deletions(-)
New commits:
commit 9a8ae4a9566e23e1ca116c3c41f62995f8234c97
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Sep 11 14:33:50 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Sep 12 15:47:39 2020 +0200
replace sal_IntPtr with simple integer type
Change-Id: I5aaf606b684b69641a872b3405b4d4d378289ad4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102466
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index f28718093836..3d9c835a78da 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -4576,7 +4576,7 @@ static char* getFonts (const char* pCommand)
{
boost::property_tree::ptree aChildren;
const FontMetric& rFontMetric = pList->GetFontName(i);
- const sal_IntPtr* pAry = pList->GetSizeAry(rFontMetric);
+ const int* pAry = pList->GetSizeAry(rFontMetric);
sal_uInt16 nSizeCount = 0;
while (pAry[nSizeCount])
{
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 0bf2de883d46..b8e3a8a6e75b 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -1425,7 +1425,7 @@ bool EditView::ChangeFontSize( bool bGrow, SfxItemSet& rSet, const FontList* pFo
nHeight = OutputDevice::LogicToLogic(nHeight * 10, eUnit, MapUnit::MapPoint);
FontMetric aFontMetric = pFontList->Get( rFontItem.GetFamilyName(), rFontItem.GetStyleName() );
- const sal_IntPtr* pAry = pFontList->GetSizeAry( aFontMetric );
+ const int* pAry = pFontList->GetSizeAry( aFontMetric );
if( bGrow )
{
diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx
index 317df6b14033..9c746c911ad2 100644
--- a/framework/source/uielement/fontsizemenucontroller.cxx
+++ b/framework/source/uielement/fontsizemenucontroller.cxx
@@ -162,8 +162,8 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > co
// setup font size array
m_pHeightArray.reset();
- const sal_IntPtr* pTempAry;
- const sal_IntPtr* pAry = pFontList->GetSizeAry( aFontMetric );
+ const int* pTempAry;
+ const int* pAry = pFontList->GetSizeAry( aFontMetric );
sal_uInt16 nSizeCount = 0;
while ( pAry[nSizeCount] )
nSizeCount++;
diff --git a/include/svtools/ctrltool.hxx b/include/svtools/ctrltool.hxx
index 8b35c2a07d24..a5add537f415 100644
--- a/include/svtools/ctrltool.hxx
+++ b/include/svtools/ctrltool.hxx
@@ -117,7 +117,7 @@ FontList::GetStyleName()
--------------------------------------------------------------------------
-const sal_IntPtr* FontList::GetSizeAry( const FontMetric& rFontMetric ) const;
+const int* FontList::GetSizeAry( const FontMetric& rFontMetric ) const;
This method returns the available sizes for the given font.
If it is a scalable font, standard sizes are returned.
@@ -131,7 +131,7 @@ FontList.
class SVT_DLLPUBLIC FontList
{
private:
- static const sal_IntPtr aStdSizeAry[];
+ static const int aStdSizeAry[];
OUString maMapBoth;
OUString maMapPrinterOnly;
@@ -145,8 +145,7 @@ private:
OUString maBoldItalic;
OUString maBlack;
OUString maBlackItalic;
- mutable std::unique_ptr<sal_IntPtr[]>
- mpSizeAry;
+ mutable std::unique_ptr<int[]> mpSizeAry;
VclPtr<OutputDevice> mpDev;
VclPtr<OutputDevice> mpDev2;
std::vector<std::unique_ptr<ImplFontListNameInfo>> m_Entries;
@@ -187,8 +186,8 @@ public:
static sal_Handle GetNextFontMetric( sal_Handle hFontMetric );
static const FontMetric& GetFontMetric( sal_Handle hFontMetric );
- const sal_IntPtr* GetSizeAry( const FontMetric& rFontMetric ) const;
- static const sal_IntPtr* GetStdSizeAry() { return aStdSizeAry; }
+ const int* GetSizeAry( const FontMetric& rFontMetric ) const;
+ static const int* GetStdSizeAry() { return aStdSizeAry; }
private:
FontList( const FontList& ) = delete;
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 3c553f531556..b9d529fcf535 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -1089,8 +1089,8 @@ void FontSizeBox::Fill( const FontMetric* pFontMetric, const FontList* pList )
return;
// query font sizes
- const sal_IntPtr* pTempAry;
- const sal_IntPtr* pAry = nullptr;
+ const int* pTempAry;
+ const int* pAry = nullptr;
if( pFontMetric )
{
@@ -1130,8 +1130,8 @@ void FontSizeBox::Fill( const FontMetric* pFontMetric, const FontList* pList )
sal_uLong nCount = aFontSizeNames.Count();
for( sal_uLong i = 0; i < nCount; i++ )
{
- OUString aSizeName = aFontSizeNames.GetIndexName( i );
- sal_IntPtr nSize = aFontSizeNames.GetIndexSize( i );
+ OUString aSizeName = aFontSizeNames.GetIndexName( i );
+ int nSize = aFontSizeNames.GetIndexSize( i );
OUString sId(OUString::number(-nSize)); // mark as special
m_xComboBox->insert(nPos, aSizeName, &sId, nullptr, nullptr);
nPos++;
diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx
index 03599d2114a2..9dbd922ef186 100644
--- a/svtools/source/control/ctrltool.cxx
+++ b/svtools/source/control/ctrltool.cxx
@@ -35,7 +35,7 @@
#include <comphelper/lok.hxx>
// Standard fontsizes for scalable Fonts
-const sal_IntPtr FontList::aStdSizeAry[] =
+const int FontList::aStdSizeAry[] =
{
60,
70,
@@ -743,7 +743,7 @@ const FontMetric& FontList::GetFontMetric( sal_Handle hFontMetric )
return *pInfo;
}
-const sal_IntPtr* FontList::GetSizeAry( const FontMetric& rInfo ) const
+const int* FontList::GetSizeAry( const FontMetric& rInfo ) const
{
// first delete Size-Array
mpSizeAry.reset();
@@ -769,7 +769,7 @@ const sal_IntPtr* FontList::GetSizeAry( const FontMetric& rInfo ) const
int nRealCount = 0;
long nOldHeight = 0;
- mpSizeAry.reset(new sal_IntPtr[nDevSizeCount+1] );
+ mpSizeAry.reset(new int[nDevSizeCount+1] );
for (int i = 0; i < nDevSizeCount; ++i)
{
Size aSize = pDevice->GetDevFontSize( rInfo, i );
More information about the Libreoffice-commits
mailing list