diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-25 15:00:10 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-02-26 07:43:13 +0000 |
commit | 30d8216ba3b471df7276abcd8c8744cd426e6967 (patch) | |
tree | 28b092f04e6e0674f783799c90c743c2f9224ee3 /vcl/unx/generic | |
parent | 2d162b1c70c1bc16d682b74ee1d0b13a9a80717d (diff) |
loplugin:unuseddefaultparam in vcl/
Change-Id: Ic09d160ed6e3cdcd95bc04844ee8f20cfcb286ec
Reviewed-on: https://gerrit.libreoffice.org/22698
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/unx/generic')
-rw-r--r-- | vcl/unx/generic/app/saldisp.cxx | 7 | ||||
-rw-r--r-- | vcl/unx/generic/app/wmadaptor.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/fontmanager/fontmanager.cxx | 13 | ||||
-rw-r--r-- | vcl/unx/generic/print/genprnpsp.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/generic/print/printerjob.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/generic/printer/ppdparser.cxx | 3 |
6 files changed, 16 insertions, 22 deletions
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index 07718e0ed313..1b02601215e9 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -2338,8 +2338,9 @@ Time SalDisplay::GetLastUserEventTime( bool i_bAlwaysReget ) const } bool SalDisplay::XIfEventWithTimeout( XEvent* o_pEvent, XPointer i_pPredicateData, - X_if_predicate i_pPredicate, long i_nTimeout ) const + X_if_predicate i_pPredicate ) const { + long nTimeout = 1000; /* #i99360# ugly workaround an X11 library bug this replaces the following call: XIfEvent( GetDisplay(), o_pEvent, i_pPredicate, i_pPredicateData ); @@ -2353,10 +2354,10 @@ bool SalDisplay::XIfEventWithTimeout( XEvent* o_pEvent, XPointer i_pPredicateDat aFD.fd = ConnectionNumber(GetDisplay()); aFD.events = POLLIN; aFD.revents = 0; - (void)poll(&aFD, 1, i_nTimeout); + (void)poll(&aFD, 1, nTimeout); if( ! XCheckIfEvent( GetDisplay(), o_pEvent, i_pPredicate, i_pPredicateData ) ) { - (void)poll(&aFD, 1, i_nTimeout); // try once more for a packet of events from the Xserver + (void)poll(&aFD, 1, nTimeout); // try once more for a packet of events from the Xserver if( ! XCheckIfEvent( GetDisplay(), o_pEvent, i_pPredicate, i_pPredicateData ) ) { bRet = false; diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx index 664ac6a69c42..08b92be459d4 100644 --- a/vcl/unx/generic/app/wmadaptor.cxx +++ b/vcl/unx/generic/app/wmadaptor.cxx @@ -2199,9 +2199,9 @@ int WMAdaptor::getWindowWorkArea( ::Window aWindow ) const * WMAdaptor::getCurrentWorkArea */ // fixme: multi screen case -void WMAdaptor::switchToWorkArea( int nWorkArea, bool bConsiderWM ) const +void WMAdaptor::switchToWorkArea( int nWorkArea ) const { - if( bConsiderWM && ! getWMshouldSwitchWorkspace() ) + if( ! getWMshouldSwitchWorkspace() ) return; if( m_aWMAtoms[ NET_CURRENT_DESKTOP ] ) diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx index 8089eaed1f53..2c5c7aad3911 100644 --- a/vcl/unx/generic/fontmanager/fontmanager.cxx +++ b/vcl/unx/generic/fontmanager/fontmanager.cxx @@ -1827,7 +1827,7 @@ bool PrintFontManager::isFontDownloadingAllowedForPrinting( fontID nFont ) const return bRet; } -bool PrintFontManager::getMetrics( fontID nFontID, const sal_Unicode* pString, int nLen, CharacterMetric* pArray, bool bVertical ) const +bool PrintFontManager::getMetrics( fontID nFontID, const sal_Unicode* pString, int nLen, CharacterMetric* pArray ) const { PrintFont* pFont = getFont( nFontID ); if( ! pFont ) @@ -1853,13 +1853,9 @@ bool PrintFontManager::getMetrics( fontID nFontID, const sal_Unicode* pString, i if( pFont->m_pMetrics ) { int effectiveCode = pString[i]; - effectiveCode |= bVertical ? 1 << 16 : 0; std::unordered_map< int, CharacterMetric >::const_iterator it = pFont->m_pMetrics->m_aMetrics.find( effectiveCode ); - // if no vertical metrics are available assume rotated horizontal metrics - if( bVertical && (it == pFont->m_pMetrics->m_aMetrics.end()) ) - it = pFont->m_pMetrics->m_aMetrics.find( pString[i] ); - // the character metrics are in it->second + // the character metrics are in it->second if( it != pFont->m_pMetrics->m_aMetrics.end() ) pArray[ i ] = it->second; } @@ -1923,8 +1919,7 @@ bool PrintFontManager::createFontSubset( const sal_GlyphId* pGlyphIds, const sal_uInt8* pNewEncoding, sal_Int32* pWidths, - int nGlyphs, - bool bVertical + int nGlyphs ) { PrintFont* pFont = getFont( nFont ); @@ -2043,7 +2038,7 @@ bool PrintFontManager::createFontSubset( TTSimpleGlyphMetrics* pMetrics = GetTTSimpleGlyphMetrics( pTTFont, pGID, nGlyphs, - bVertical ); + false/*bVertical*/ ); if( pMetrics ) { for( int i = 0; i < nGlyphs; i++ ) diff --git a/vcl/unx/generic/print/genprnpsp.cxx b/vcl/unx/generic/print/genprnpsp.cxx index 3c88aa9a9df6..45e3e16fa40e 100644 --- a/vcl/unx/generic/print/genprnpsp.cxx +++ b/vcl/unx/generic/print/genprnpsp.cxx @@ -251,7 +251,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData ) // Needs a cleaner abstraction ... #if defined( UNX ) -static bool passFileToCommandLine( const OUString& rFilename, const OUString& rCommandLine, bool bRemoveFile = true ) +static bool passFileToCommandLine( const OUString& rFilename, const OUString& rCommandLine ) { bool bSuccess = false; @@ -330,8 +330,7 @@ static bool passFileToCommandLine( const OUString& rFilename, const OUString& rC fprintf( stderr, "failed to fork\n" ); // clean up the mess - if( bRemoveFile ) - unlink( aFilename.getStr() ); + unlink( aFilename.getStr() ); return bSuccess; } diff --git a/vcl/unx/generic/print/printerjob.cxx b/vcl/unx/generic/print/printerjob.cxx index f740514c4013..9266c820a584 100644 --- a/vcl/unx/generic/print/printerjob.cxx +++ b/vcl/unx/generic/print/printerjob.cxx @@ -52,17 +52,15 @@ namespace psp { bool -AppendPS (FILE* pDst, osl::File* pSrc, unsigned char* pBuffer, - sal_uInt32 nBlockSize = nBLOCKSIZE) +AppendPS (FILE* pDst, osl::File* pSrc, unsigned char* pBuffer) { + sal_uInt32 nBlockSize = nBLOCKSIZE; if ((pDst == nullptr) || (pSrc == nullptr)) return false; if (pSrc->setPos(osl_Pos_Absolut, 0) != osl::FileBase::E_None) return false; - if (nBlockSize == 0) - nBlockSize = nBLOCKSIZE; if (pBuffer == nullptr) pBuffer = static_cast<unsigned char*>(alloca (nBlockSize)); diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index 6c7e795a8db7..a8eca2a3c57c 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -374,8 +374,9 @@ OString PPDDecompressStream::ReadLine() return o_rLine; } -static osl::FileBase::RC resolveLink( const OUString& i_rURL, OUString& o_rResolvedURL, OUString& o_rBaseName, osl::FileStatus::Type& o_rType, int nLinkLevel = 10 ) +static osl::FileBase::RC resolveLink( const OUString& i_rURL, OUString& o_rResolvedURL, OUString& o_rBaseName, osl::FileStatus::Type& o_rType) { + int nLinkLevel = 10; salhelper::LinkResolver aResolver(osl_FileStatus_Mask_FileName | osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileURL); |