[Libreoffice-commits] core.git: cui/source sc/source sfx2/source toolkit/source vcl/inc vcl/osx vcl/source vcl/unx vcl/win
Matteo Casalin
matteo.casalin at yahoo.com
Sun Feb 5 20:42:49 UTC 2017
cui/source/tabpages/page.cxx | 2 +-
sc/source/ui/unoobj/styleuno.cxx | 2 +-
sfx2/source/doc/printhelper.cxx | 2 +-
toolkit/source/awt/vclxprinter.cxx | 2 +-
vcl/inc/osx/salprn.h | 4 ++--
vcl/inc/salprn.hxx | 4 ++--
vcl/inc/unx/genprn.h | 4 ++--
vcl/inc/win/salprn.h | 4 ++--
vcl/osx/salprn.cxx | 4 ++--
vcl/source/gdi/print.cxx | 2 +-
vcl/source/gdi/print3.cxx | 2 +-
vcl/unx/generic/print/genprnpsp.cxx | 6 +++---
vcl/win/gdi/salprn.cxx | 4 ++--
13 files changed, 21 insertions(+), 21 deletions(-)
New commits:
commit c6f32df907983092cdb9f40c7c7ad0552caf41c3
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Sun Feb 5 21:43:59 2017 +0100
sal_uIntPtr to sal_uInt16
Change-Id: If463ae457f53a0a8b12cc0748afbc654f54ae3c3
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 95125e2..fd4065f 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -928,7 +928,7 @@ IMPL_LINK_NOARG(SvxPageDescPage, PaperBinHdl_Impl, Control&, void)
m_pPaperTrayBox->SetEntryData( nEntryPos,
reinterpret_cast<void*>((sal_uLong)PAPERBIN_PRINTER_SETTINGS) );
OUString aPaperBin( EditResId( RID_SVXSTR_PAPERBIN ) );
- sal_uInt16 nBinCount = mpDefPrinter->GetPaperBinCount();
+ const sal_uInt16 nBinCount = mpDefPrinter->GetPaperBinCount();
for ( sal_uInt16 i = 0; i < nBinCount; ++i )
{
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 1b27d6f..a7a28f5 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -1655,7 +1655,7 @@ void ScStyleObj::setPropertyValue_Impl( const OUString& rPropertyName, const Sfx
Printer* pPrinter = pDocShell->GetPrinter();
if (pPrinter)
{
- sal_uInt16 nCount = pPrinter->GetPaperBinCount();
+ const sal_uInt16 nCount = pPrinter->GetPaperBinCount();
for (sal_uInt16 i=0; i<nCount; i++)
if ( aName == pPrinter->GetPaperBinName(i) )
{
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index 4af6b2e..c9dbf27e 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -416,7 +416,7 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue >
OUString aTmp;
if ( !( rProp.Value >>= aTmp ) )
throw css::lang::IllegalArgumentException();
- sal_uInt16 nCount = pPrinter->GetPaperBinCount();
+ const sal_uInt16 nCount = pPrinter->GetPaperBinCount();
for (sal_uInt16 nBin=0; nBin<nCount; nBin++)
{
OUString aName( pPrinter->GetPaperBinName(nBin) );
diff --git a/toolkit/source/awt/vclxprinter.cxx b/toolkit/source/awt/vclxprinter.cxx
index e3e95bf..d89c32d 100644
--- a/toolkit/source/awt/vclxprinter.cxx
+++ b/toolkit/source/awt/vclxprinter.cxx
@@ -211,7 +211,7 @@ css::uno::Sequence< OUString > VCLXPrinterPropertySet::getFormDescriptions( )
{
::osl::MutexGuard aGuard( Mutex );
- sal_uInt16 nPaperBinCount = GetPrinter()->GetPaperBinCount();
+ const sal_uInt16 nPaperBinCount = GetPrinter()->GetPaperBinCount();
css::uno::Sequence< OUString > aDescriptions( nPaperBinCount );
for ( sal_uInt16 n = 0; n < nPaperBinCount; n++ )
{
diff --git a/vcl/inc/osx/salprn.h b/vcl/inc/osx/salprn.h
index f47a32b..78afec3 100644
--- a/vcl/inc/osx/salprn.h
+++ b/vcl/inc/osx/salprn.h
@@ -76,8 +76,8 @@ class AquaSalInfoPrinter : public SalInfoPrinter
long& o_rPageOffX, long& o_rPageOffY,
long& o_rPageWidth, long& o_rPageHeight ) override;
virtual sal_uInt32 GetCapabilities( const ImplJobSetup* i_pSetupData, PrinterCapType i_nType ) override;
- virtual sal_uLong GetPaperBinCount( const ImplJobSetup* i_pSetupData ) override;
- virtual OUString GetPaperBinName( const ImplJobSetup* i_pSetupData, sal_uLong i_nPaperBin ) override;
+ virtual sal_uInt16 GetPaperBinCount( const ImplJobSetup* i_pSetupData ) override;
+ virtual OUString GetPaperBinName( const ImplJobSetup* i_pSetupData, sal_uInt16 i_nPaperBin ) override;
virtual void InitPaperFormats( const ImplJobSetup* i_pSetupData ) override;
virtual int GetLandscapeAngle( const ImplJobSetup* i_pSetupData ) override;
diff --git a/vcl/inc/salprn.hxx b/vcl/inc/salprn.hxx
index e11eaff..083adfb 100644
--- a/vcl/inc/salprn.hxx
+++ b/vcl/inc/salprn.hxx
@@ -75,8 +75,8 @@ public:
long& rPageOffX, long& rPageOffY,
long& rPageWidth, long& rPageHeight ) = 0;
virtual sal_uInt32 GetCapabilities( const ImplJobSetup* pSetupData, PrinterCapType nType ) = 0;
- virtual sal_uLong GetPaperBinCount( const ImplJobSetup* pSetupData ) = 0;
- virtual OUString GetPaperBinName( const ImplJobSetup* pSetupData, sal_uLong nPaperBin ) = 0;
+ virtual sal_uInt16 GetPaperBinCount( const ImplJobSetup* pSetupData ) = 0;
+ virtual OUString GetPaperBinName( const ImplJobSetup* pSetupData, sal_uInt16 nPaperBin ) = 0;
// fills m_aPaperFormats and sets m_bPapersInit to true
virtual void InitPaperFormats( const ImplJobSetup* pSetupData ) = 0;
// returns angle that a landscape page will be turned counterclockwise wrt to portrait
diff --git a/vcl/inc/unx/genprn.h b/vcl/inc/unx/genprn.h
index e6561e4..66d411f 100644
--- a/vcl/inc/unx/genprn.h
+++ b/vcl/inc/unx/genprn.h
@@ -48,8 +48,8 @@ public:
long& rPageOffX, long& rPageOffY,
long& rPageWidth, long& rPageHeight ) override;
virtual sal_uInt32 GetCapabilities( const ImplJobSetup* pSetupData, PrinterCapType nType ) override;
- virtual sal_uIntPtr GetPaperBinCount( const ImplJobSetup* pSetupData ) override;
- virtual OUString GetPaperBinName( const ImplJobSetup* pSetupData, sal_uIntPtr nPaperBin ) override;
+ virtual sal_uInt16 GetPaperBinCount( const ImplJobSetup* pSetupData ) override;
+ virtual OUString GetPaperBinName( const ImplJobSetup* pSetupData, sal_uInt16 nPaperBin ) override;
virtual void InitPaperFormats( const ImplJobSetup* pSetupData ) override;
virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData ) override;
};
diff --git a/vcl/inc/win/salprn.h b/vcl/inc/win/salprn.h
index cfb01c3..a483e25 100644
--- a/vcl/inc/win/salprn.h
+++ b/vcl/inc/win/salprn.h
@@ -63,8 +63,8 @@ public:
long& rPageOffX, long& rPageOffY,
long& rPageWidth, long& rPageHeight ) override;
virtual sal_uInt32 GetCapabilities( const ImplJobSetup* pSetupData, PrinterCapType nType ) override;
- virtual sal_uIntPtr GetPaperBinCount( const ImplJobSetup* pSetupData ) override;
- virtual OUString GetPaperBinName( const ImplJobSetup* pSetupData, sal_uIntPtr nPaperBin ) override;
+ virtual sal_uInt16 GetPaperBinCount( const ImplJobSetup* pSetupData ) override;
+ virtual OUString GetPaperBinName( const ImplJobSetup* pSetupData, sal_uInt16 nPaperBin ) override;
virtual void InitPaperFormats( const ImplJobSetup* pSetupData ) override;
virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData ) override;
};
diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx
index 4eba68e..562e4d0 100644
--- a/vcl/osx/salprn.cxx
+++ b/vcl/osx/salprn.cxx
@@ -259,12 +259,12 @@ bool AquaSalInfoPrinter::SetData( JobSetFlags i_nFlags, ImplJobSetup* io_pSetupD
return mpPrintInfo != nil;
}
-sal_uLong AquaSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* )
+sal_uInt16 AquaSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* )
{
return 0;
}
-OUString AquaSalInfoPrinter::GetPaperBinName( const ImplJobSetup*, sal_uLong )
+OUString AquaSalInfoPrinter::GetPaperBinName( const ImplJobSetup*, sal_uInt16 )
{
return OUString();
}
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 50bc4ad..74fff85 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1596,7 +1596,7 @@ sal_uInt16 Printer::GetPaperBinCount() const
if ( IsDisplayPrinter() )
return 0;
- return (sal_uInt16)mpInfoPrinter->GetPaperBinCount( &maJobSetup.ImplGetConstData() );
+ return mpInfoPrinter->GetPaperBinCount( &maJobSetup.ImplGetConstData() );
}
OUString Printer::GetPaperBinName( sal_uInt16 nPaperBin ) const
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 9417bd1..f522859 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -880,7 +880,7 @@ PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( cons
{
sal_Int32 nBin = -1;
i_rProps[ nProperty ].Value >>= nBin;
- if( nBin >= 0 && nBin < mxPrinter->GetPaperBinCount() )
+ if( nBin >= 0 && nBin < static_cast<sal_Int32>(mxPrinter->GetPaperBinCount()) )
nPaperBin = nBin;
}
}
diff --git a/vcl/unx/generic/print/genprnpsp.cxx b/vcl/unx/generic/print/genprnpsp.cxx
index 13e0a0b..8de6d42 100644
--- a/vcl/unx/generic/print/genprnpsp.cxx
+++ b/vcl/unx/generic/print/genprnpsp.cxx
@@ -741,7 +741,7 @@ void PspSalInfoPrinter::GetPageInfo(
}
}
-sal_uLong PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup )
+sal_uInt16 PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup )
{
if( ! pJobSetup )
return 0;
@@ -753,7 +753,7 @@ sal_uLong PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup )
return pKey ? pKey->countValues() : 0;
}
-OUString PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, sal_uLong nPaperBin )
+OUString PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, sal_uInt16 nPaperBin )
{
JobData aData;
JobData::constructFromStreamBuffer( pJobSetup->GetDriverData(), pJobSetup->GetDriverDataLen(), aData );
@@ -762,7 +762,7 @@ OUString PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, sal_
if( aData.m_pParser )
{
const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( OUString("InputSlot") ): nullptr;
- if( ! pKey || nPaperBin >= (sal_uLong)pKey->countValues() )
+ if( ! pKey || nPaperBin >= (sal_uInt16)pKey->countValues() )
aRet = aData.m_pParser->getDefaultInputSlot();
else
{
diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index 60b5320..f2f25d6 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -1207,7 +1207,7 @@ bool WinSalInfoPrinter::SetData( JobSetFlags nFlags, ImplJobSetup* pSetupData )
return FALSE;
}
-sal_uLong WinSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pSetupData )
+sal_uInt16 WinSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pSetupData )
{
DWORD nRet = ImplDeviceCaps( this, DC_BINS, nullptr, pSetupData );
if ( nRet && (nRet != GDI_ERROR) )
@@ -1216,7 +1216,7 @@ sal_uLong WinSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pSetupData )
return 0;
}
-OUString WinSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pSetupData, sal_uLong nPaperBin )
+OUString WinSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pSetupData, sal_uInt16 nPaperBin )
{
OUString aPaperBinName;
More information about the Libreoffice-commits
mailing list