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 | |
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')
-rw-r--r-- | vcl/inc/listbox.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/printdlg.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/salgdi.hxx | 8 | ||||
-rw-r--r-- | vcl/inc/sallayout.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/unx/fontmanager.hxx | 5 | ||||
-rw-r--r-- | vcl/inc/unx/saldisp.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/unx/wmadaptor.hxx | 3 | ||||
-rw-r--r-- | vcl/source/control/imp_listbox.cxx | 8 | ||||
-rw-r--r-- | vcl/source/fontsubset/cff.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 38 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.hxx | 13 | ||||
-rw-r--r-- | vcl/source/gdi/salgdilayout.cxx | 78 | ||||
-rw-r--r-- | vcl/source/outdev/font.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/printdlg.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 7 | ||||
-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 | ||||
-rw-r--r-- | vcl/workben/outdevgrind.cxx | 3 |
22 files changed, 86 insertions, 133 deletions
diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx index f316e8f7501d..66dac44e5949 100644 --- a/vcl/inc/listbox.hxx +++ b/vcl/inc/listbox.hxx @@ -248,7 +248,7 @@ protected: bool SelectEntries( sal_Int32 nSelect, LB_EVENT_TYPE eLET, bool bShift = false, bool bCtrl = false, bool bSelectPosChange = false ); void ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32 nPos, bool bErase = false, bool bLayout = false); - void ImplDoPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect, bool bLayout = false); + void ImplDoPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect); void ImplCalcMetrics(); void ImplUpdateEntryMetrics( ImplEntryType& rEntry ); void ImplCallSelect(); diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx index 8c59965392a7..410257fbe6b5 100644 --- a/vcl/inc/printdlg.hxx +++ b/vcl/inc/printdlg.hxx @@ -274,7 +274,7 @@ namespace vcl virtual ~PrintProgressDialog(); virtual void dispose() override; bool isCanceled() const { return mbCanceled; } - void setProgress( int i_nCurrent, int i_nMax = -1 ); + void setProgress( int i_nCurrent ); void tick(); void reset(); }; diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx index 1ded1a70941b..451be62e2924 100644 --- a/vcl/inc/salgdi.hxx +++ b/vcl/inc/salgdi.hxx @@ -230,12 +230,12 @@ public: SalLayoutFlags GetLayout() { return m_nLayout; } void SetLayout( SalLayoutFlags aLayout ) { m_nLayout = aLayout;} - void mirror( long& nX, const OutputDevice *pOutDev, bool bBack = false ) const; + void mirror( long& nX, const OutputDevice *pOutDev ) const; void mirror( long& nX, long& nWidth, const OutputDevice *pOutDev, bool bBack = false ) const; - bool mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack = false ) const; + bool mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev ) const; void mirror( Rectangle& rRect, const OutputDevice*, bool bBack = false ) const; - void mirror( vcl::Region& rRgn, const OutputDevice *pOutDev, bool bBack = false ) const; - void mirror( ImplControlValue&, const OutputDevice*, bool bBack = false ) const; + void mirror( vcl::Region& rRgn, const OutputDevice *pOutDev ) const; + void mirror( ImplControlValue&, const OutputDevice* ) const; basegfx::B2DPoint mirror( const basegfx::B2DPoint& i_rPoint, const OutputDevice *pOutDev, bool bBack = false ) const; basegfx::B2DPolygon mirror( const basegfx::B2DPolygon& i_rPoly, const OutputDevice *pOutDev, bool bBack = false ) const; basegfx::B2DPolyPolygon mirror( const basegfx::B2DPolyPolygon& i_rPoly, const OutputDevice *pOutDev, bool bBack = false ) const; diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx index f27834f7b647..daae365e065c 100644 --- a/vcl/inc/sallayout.hxx +++ b/vcl/inc/sallayout.hxx @@ -251,7 +251,7 @@ public: virtual void AdjustLayout( ImplLayoutArgs& ) override; virtual void InitFont() const override; - void SetIncomplete(bool bIncomplete = true); + void SetIncomplete(bool bIncomplete); protected: virtual ~MultiSalLayout(); diff --git a/vcl/inc/unx/fontmanager.hxx b/vcl/inc/unx/fontmanager.hxx index 1ffe504f6700..99aae21e189e 100644 --- a/vcl/inc/unx/fontmanager.hxx +++ b/vcl/inc/unx/fontmanager.hxx @@ -412,7 +412,7 @@ public: bool getMetrics( fontID nFontID, sal_Unicode minCharacter, sal_Unicode maxCharacter, CharacterMetric* pArray, bool bVertical = false ) const; // get metrics for an array of sal_Unicode characters // the user is responsible to allocate pArray large enough - bool getMetrics( fontID nFontID, const sal_Unicode* pString, int nLen, CharacterMetric* pArray, bool bVertical = false ) const; + bool getMetrics( fontID nFontID, const sal_Unicode* pString, int nLen, CharacterMetric* pArray ) const; // get encoding vector of font, currently only for Type1 fonts // returns NULL if encoding vector is empty or font is not type1; @@ -454,8 +454,7 @@ public: const sal_GlyphId* pGlyphIDs, const sal_uInt8* pNewEncoding, sal_Int32* pWidths, - int nGlyphs, - bool bVertical = false + int nGlyphs ); void getGlyphWidths( fontID nFont, bool bVertical, diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx index 68492542ff4c..daf25a5f3817 100644 --- a/vcl/inc/unx/saldisp.hxx +++ b/vcl/inc/unx/saldisp.hxx @@ -338,7 +338,7 @@ public: sal_uLong GetMaxRequestSize() const { return nMaxRequestSize_; } Time GetLastUserEventTime( bool bAlwaysReget = false ) const; - bool XIfEventWithTimeout( XEvent*, XPointer, X_if_predicate, long i_nTimeout = 1000 ) const; + bool XIfEventWithTimeout( XEvent*, XPointer, X_if_predicate ) const; SalXLib* GetXLib() const { return pXLib_; } SalI18N_InputMethod* GetInputMethod() const { return mpInputMethod; } diff --git a/vcl/inc/unx/wmadaptor.hxx b/vcl/inc/unx/wmadaptor.hxx index de3354955c2b..177ca34780a1 100644 --- a/vcl/inc/unx/wmadaptor.hxx +++ b/vcl/inc/unx/wmadaptor.hxx @@ -200,9 +200,8 @@ public: /* * attempt to switch the desktop to a certain workarea (ie. virtual desktops) - * if bConsiderWM is true, then on some WMs the call will not result in any action */ - void switchToWorkArea( int nWorkArea, bool bConsiderWM = true ) const; + void switchToWorkArea( int nWorkArea ) const; /* * sets window title diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index f1fa9a23a219..e17ba0d3dcea 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -1874,12 +1874,12 @@ void ImplListBoxWindow::FillLayoutData() const const_cast<ImplListBoxWindow*>(this)->Invalidate(Rectangle(Point(0, 0), GetOutputSize())); } -void ImplListBoxWindow::ImplDoPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect, bool bLayout) +void ImplListBoxWindow::ImplDoPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) { sal_Int32 nCount = mpEntryList->GetEntryCount(); bool bShowFocusRect = mbHasFocusRect; - if (mbHasFocusRect && !bLayout) + if (mbHasFocusRect) ImplHideFocusRect(); long nY = 0; // + mnBorder; @@ -1891,7 +1891,7 @@ void ImplListBoxWindow::ImplDoPaint(vcl::RenderContext& rRenderContext, const Re if (nY + pEntry->mnHeight >= rRect.Top() && nY <= rRect.Bottom() + mnMaxHeight) { - ImplPaint(rRenderContext, i, false, bLayout); + ImplPaint(rRenderContext, i); } nY += pEntry->mnHeight; } @@ -1900,7 +1900,7 @@ void ImplListBoxWindow::ImplDoPaint(vcl::RenderContext& rRenderContext, const Re maFocusRect.SetPos(Point(0, nHeightDiff)); Size aSz(maFocusRect.GetWidth(), mpEntryList->GetEntryHeight(mnCurrentPos)); maFocusRect.SetSize(aSz); - if (HasFocus() && bShowFocusRect && !bLayout) + if (HasFocus() && bShowFocusRect) ImplShowFocusRect(); } diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index 7370733883f7..6ea7268318a4 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -1841,9 +1841,9 @@ void Type1Emitter::emitAllCrypted() // #i110387# quick-and-dirty double->ascii conversion // needed because sprintf/ecvt/etc. alone are too localized (LC_NUMERIC) // also strip off trailing zeros in fraction while we are at it -inline int dbl2str( char* pOut, double fVal, int nPrecision=6) +inline int dbl2str( char* pOut, double fVal) { - const int nLen = psp::getValueOfDouble( pOut, fVal, nPrecision); + const int nLen = psp::getValueOfDouble( pOut, fVal, 6); return nLen; } diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 3ad54a518a01..69111345ac11 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -838,14 +838,14 @@ void PDFWriterImpl::createWidgetFieldName( sal_Int32 i_nWidgetIndex, const PDFWr m_aWidgets[i_nWidgetIndex].m_aName = aPartialName; } -static void appendFixedInt( sal_Int32 nValue, OStringBuffer& rBuffer, sal_Int32 nPrecision = nLog10Divisor ) +static void appendFixedInt( sal_Int32 nValue, OStringBuffer& rBuffer ) { if( nValue < 0 ) { rBuffer.append( '-' ); nValue = -nValue; } - sal_Int32 nFactor = 1, nDiv = nPrecision; + sal_Int32 nFactor = 1, nDiv = nLog10Divisor; while( nDiv-- ) nFactor *= 10; @@ -972,7 +972,7 @@ public: void translate( double tx, double ty ); void invert(); - void append( PDFWriterImpl::PDFPage& rPage, OStringBuffer& rBuffer, Point* pBack = nullptr ); + void append( PDFWriterImpl::PDFPage& rPage, OStringBuffer& rBuffer ); Point transform( const Point& rPoint ) const; }; @@ -1076,7 +1076,7 @@ void Matrix3::invert() set( fn ); } -void Matrix3::append( PDFWriterImpl::PDFPage& rPage, OStringBuffer& rBuffer, Point* pBack ) +void Matrix3::append( PDFWriterImpl::PDFPage& rPage, OStringBuffer& rBuffer ) { appendDouble( f[0], rBuffer ); rBuffer.append( ' ' ); @@ -1086,7 +1086,7 @@ void Matrix3::append( PDFWriterImpl::PDFPage& rPage, OStringBuffer& rBuffer, Poi rBuffer.append( ' ' ); appendDouble( f[3], rBuffer ); rBuffer.append( ' ' ); - rPage.appendPoint( Point( (long)f[4], (long)f[5] ), rBuffer, false, pBack ); + rPage.appendPoint( Point( (long)f[4], (long)f[5] ), rBuffer ); } static void appendResourceMap( OStringBuffer& rBuf, const char* pPrefix, const PDFWriterImpl::ResourceMap& rList ) @@ -1580,18 +1580,18 @@ void PDFWriterImpl::PDFPage::appendPolygon( const basegfx::B2DPolygon& rPoly, OS } } -void PDFWriterImpl::PDFPage::appendPolyPolygon( const tools::PolyPolygon& rPolyPoly, OStringBuffer& rBuffer, bool bClose ) const +void PDFWriterImpl::PDFPage::appendPolyPolygon( const tools::PolyPolygon& rPolyPoly, OStringBuffer& rBuffer ) const { sal_uInt16 nPolygons = rPolyPoly.Count(); for( sal_uInt16 n = 0; n < nPolygons; n++ ) - appendPolygon( rPolyPoly[n], rBuffer, bClose ); + appendPolygon( rPolyPoly[n], rBuffer ); } -void PDFWriterImpl::PDFPage::appendPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPoly, OStringBuffer& rBuffer, bool bClose ) const +void PDFWriterImpl::PDFPage::appendPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPoly, OStringBuffer& rBuffer ) const { sal_uInt32 nPolygons = rPolyPoly.count(); for( sal_uInt32 n = 0; n < nPolygons; n++ ) - appendPolygon( rPolyPoly.getB2DPolygon( n ), rBuffer, bClose ); + appendPolygon( rPolyPoly.getB2DPolygon( n ), rBuffer ); } void PDFWriterImpl::PDFPage::appendMappedLength( sal_Int32 nLength, OStringBuffer& rBuffer, bool bVertical, sal_Int32* pOutLength ) const @@ -9263,7 +9263,7 @@ void PDFWriterImpl::drawText( const Point& rPos, const OUString& rText, sal_Int3 } } -void PDFWriterImpl::drawTextArray( const Point& rPos, const OUString& rText, const long* pDXArray, sal_Int32 nIndex, sal_Int32 nLen, bool bTextLines ) +void PDFWriterImpl::drawTextArray( const Point& rPos, const OUString& rText, const long* pDXArray, sal_Int32 nIndex, sal_Int32 nLen ) { MARK( "drawText with array" ); @@ -9274,12 +9274,12 @@ void PDFWriterImpl::drawTextArray( const Point& rPos, const OUString& rText, con SalLayout* pLayout = m_pReferenceDevice->ImplLayout( rText, nIndex, nLen, rPos, 0, pDXArray ); if( pLayout ) { - drawLayout( *pLayout, rText, bTextLines ); + drawLayout( *pLayout, rText, true ); pLayout->Release(); } } -void PDFWriterImpl::drawStretchText( const Point& rPos, sal_uLong nWidth, const OUString& rText, sal_Int32 nIndex, sal_Int32 nLen, bool bTextLines ) +void PDFWriterImpl::drawStretchText( const Point& rPos, sal_uLong nWidth, const OUString& rText, sal_Int32 nIndex, sal_Int32 nLen ) { MARK( "drawStretchText" ); @@ -9290,12 +9290,12 @@ void PDFWriterImpl::drawStretchText( const Point& rPos, sal_uLong nWidth, const SalLayout* pLayout = m_pReferenceDevice->ImplLayout( rText, nIndex, nLen, rPos, nWidth ); if( pLayout ) { - drawLayout( *pLayout, rText, bTextLines ); + drawLayout( *pLayout, rText, true ); pLayout->Release(); } } -void PDFWriterImpl::drawText( const Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle, bool bTextLines ) +void PDFWriterImpl::drawText( const Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle ) { long nWidth = rRect.GetWidth(); long nHeight = rRect.GetHeight(); @@ -9376,7 +9376,7 @@ void PDFWriterImpl::drawText( const Rectangle& rRect, const OUString& rOrigStr, aPos.X() += (nWidth-pLineInfo->GetWidth())/2; sal_Int32 nIndex = pLineInfo->GetIndex(); sal_Int32 nLineLen = pLineInfo->GetLen(); - drawText( aPos, aStr, nIndex, nLineLen, bTextLines ); + drawText( aPos, aStr, nIndex, nLineLen ); // mnemonics should not appear in documents, // if the need arises, put them in here aPos.Y() += nTextHeight; @@ -9385,7 +9385,7 @@ void PDFWriterImpl::drawText( const Rectangle& rRect, const OUString& rOrigStr, // output last line left adjusted since it was shortened if (!aLastLine.isEmpty()) - drawText( aPos, aLastLine, 0, aLastLine.getLength(), bTextLines ); + drawText( aPos, aLastLine, 0, aLastLine.getLength() ); } } else @@ -9418,7 +9418,7 @@ void PDFWriterImpl::drawText( const Rectangle& rRect, const OUString& rOrigStr, // mnemonics should be inserted here if the need arises // draw the actual text - drawText( aPos, aStr, 0, aStr.getLength(), bTextLines ); + drawText( aPos, aStr, 0, aStr.getLength() ); } // reset clip region to original value @@ -11563,7 +11563,7 @@ void PDFWriterImpl::drawBitmap( const Point& rDestPoint, const Size& rDestSize, writeBuffer( aLine.getStr(), aLine.getLength() ); } -const PDFWriterImpl::BitmapEmit& PDFWriterImpl::createBitmapEmit( const BitmapEx& i_rBitmap, bool bDrawMask ) +const PDFWriterImpl::BitmapEmit& PDFWriterImpl::createBitmapEmit( const BitmapEx& i_rBitmap ) { BitmapEx aBitmap( i_rBitmap ); if( m_aContext.ColorMode == PDFWriter::DrawGreyscale ) @@ -11600,7 +11600,7 @@ const PDFWriterImpl::BitmapEmit& PDFWriterImpl::createBitmapEmit( const BitmapEx m_aBitmaps.front().m_aID = aID; m_aBitmaps.front().m_aBitmap = aBitmap; m_aBitmaps.front().m_nObject = createObject(); - m_aBitmaps.front().m_bDrawMask = bDrawMask; + m_aBitmaps.front().m_bDrawMask = false; it = m_aBitmaps.begin(); } diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index b8c8bf92e321..d0817a124111 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -151,9 +151,9 @@ public: // appends a polygon optionally closing it void appendPolygon( const basegfx::B2DPolygon& rPoly, OStringBuffer& rBuffer, bool bClose = true ) const; // appends a polypolygon optionally closing the subpaths - void appendPolyPolygon( const tools::PolyPolygon& rPolyPoly, OStringBuffer& rBuffer, bool bClose = true ) const; + void appendPolyPolygon( const tools::PolyPolygon& rPolyPoly, OStringBuffer& rBuffer ) const; // appends a polypolygon optionally closing the subpaths - void appendPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPoly, OStringBuffer& rBuffer, bool bClose = true ) const; + void appendPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPoly, OStringBuffer& rBuffer ) const; // converts a length (either vertical or horizontal; this // can be important if the source MapMode is not // symmetrical) to page length and appends it to the buffer @@ -818,7 +818,7 @@ i12626 /* tries to find the bitmap by its id and returns its emit data if exists, else creates a new emit data block */ - const BitmapEmit& createBitmapEmit( const BitmapEx& rBitmapEx, bool bDrawMask = false ); + const BitmapEmit& createBitmapEmit( const BitmapEx& rBitmapEx ); /* writes the Do operation inside the content stream */ void drawBitmap( const Point& rDestPt, const Size& rDestSize, const BitmapEmit& rBitmap, const Color& rFillColor ); @@ -1153,11 +1153,10 @@ public: /* actual drawing functions */ void drawText( const Point& rPos, const OUString& rText, sal_Int32 nIndex, sal_Int32 nLen, bool bTextLines = true ); - void drawTextArray( const Point& rPos, const OUString& rText, const long* pDXArray, sal_Int32 nIndex, sal_Int32 nLen, bool bTextLines = true ); + void drawTextArray( const Point& rPos, const OUString& rText, const long* pDXArray, sal_Int32 nIndex, sal_Int32 nLen ); void drawStretchText( const Point& rPos, sal_uLong nWidth, const OUString& rText, - sal_Int32 nIndex, sal_Int32 nLen, - bool bTextLines = true ); - void drawText( const Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle, bool bTextLines = true ); + sal_Int32 nIndex, sal_Int32 nLen ); + void drawText( const Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle ); void drawTextLine( const Point& rPos, long nWidth, FontStrikeout eStrikeout, FontLineStyle eUnderline, FontLineStyle eOverline, bool bUnderlineAbove ); void drawWaveTextLine( OStringBuffer& aLine, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove ); void drawStraightTextLine( OStringBuffer& aLine, long nWidth, FontLineStyle eTextLine, Color aColor, bool bIsAbove ); diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 7506b9e01d00..13c8a1514b34 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -71,7 +71,7 @@ bool SalGraphics::drawTransformedBitmap( return false; } -void SalGraphics::mirror( long& x, const OutputDevice *pOutDev, bool bBack ) const +void SalGraphics::mirror( long& x, const OutputDevice *pOutDev ) const { long w; if( pOutDev && pOutDev->GetOutDevType() == OUTDEV_VIRDEV ) @@ -88,18 +88,12 @@ void SalGraphics::mirror( long& x, const OutputDevice *pOutDev, bool bBack ) con if( (m_nLayout & SalLayoutFlags::BiDiRtl) ) { long devX = w-pOutDevRef->GetOutputWidthPixel()-pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX - if( bBack ) - x = x - devX + pOutDevRef->GetOutOffXPixel(); - else - x = devX + (x - pOutDevRef->GetOutOffXPixel()); + x = devX + (x - pOutDevRef->GetOutOffXPixel()); } else { long devX = pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX - if( bBack ) - x = devX + (pOutDevRef->GetOutputWidthPixel() + devX) - (x + 1); - else - x = pOutDevRef->GetOutputWidthPixel() - (x - devX) + pOutDevRef->GetOutOffXPixel() - 1; + x = pOutDevRef->GetOutputWidthPixel() - (x - devX) + pOutDevRef->GetOutOffXPixel() - 1; } } else if( (m_nLayout & SalLayoutFlags::BiDiRtl) ) @@ -144,7 +138,7 @@ void SalGraphics::mirror( long& x, long& nWidth, const OutputDevice *pOutDev, bo } } -bool SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack ) const +bool SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev ) const { long w; if( pOutDev && pOutDev->GetOutDevType() == OUTDEV_VIRDEV ) @@ -163,49 +157,19 @@ bool SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint * if( (m_nLayout & SalLayoutFlags::BiDiRtl) ) { long devX = w-pOutDevRef->GetOutputWidthPixel()-pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX - if( bBack ) + for( i=0, j=nPoints-1; i<nPoints; i++,j-- ) { - for( i=0, j=nPoints-1; i<nPoints; i++,j-- ) - { - //long x = w-1-pPtAry[i].mnX; - //pPtAry2[j].mnX = devX + ( pOutDevRef->mnOutWidth - 1 - (x - devX) ); - pPtAry2[j].mnX = pOutDevRef->GetOutOffXPixel() + (pPtAry[i].mnX - devX); - pPtAry2[j].mnY = pPtAry[i].mnY; - } - } - else - { - for( i=0, j=nPoints-1; i<nPoints; i++,j-- ) - { - //long x = w-1-pPtAry[i].mnX; - //pPtAry2[j].mnX = devX + ( pOutDevRef->mnOutWidth - 1 - (x - devX) ); - pPtAry2[j].mnX = devX + (pPtAry[i].mnX - pOutDevRef->GetOutOffXPixel()); - pPtAry2[j].mnY = pPtAry[i].mnY; - } + pPtAry2[j].mnX = devX + (pPtAry[i].mnX - pOutDevRef->GetOutOffXPixel()); + pPtAry2[j].mnY = pPtAry[i].mnY; } } else { long devX = pOutDevRef->GetOutOffXPixel(); // re-mirrored mnOutOffX - if( bBack ) - { - for( i=0, j=nPoints-1; i<nPoints; i++,j-- ) - { - //long x = w-1-pPtAry[i].mnX; - //pPtAry2[j].mnX = devX + ( pOutDevRef->mnOutWidth - 1 - (x - devX) ); - pPtAry2[j].mnX = pPtAry[i].mnX - pOutDevRef->GetOutputWidthPixel() + devX - pOutDevRef->GetOutOffXPixel() + 1; - pPtAry2[j].mnY = pPtAry[i].mnY; - } - } - else + for( i=0, j=nPoints-1; i<nPoints; i++,j-- ) { - for( i=0, j=nPoints-1; i<nPoints; i++,j-- ) - { - //long x = w-1-pPtAry[i].mnX; - //pPtAry2[j].mnX = devX + ( pOutDevRef->mnOutWidth - 1 - (x - devX) ); - pPtAry2[j].mnX = pOutDevRef->GetOutputWidthPixel() - (pPtAry[i].mnX - devX) + pOutDevRef->GetOutOffXPixel() - 1; - pPtAry2[j].mnY = pPtAry[i].mnY; - } + pPtAry2[j].mnX = pOutDevRef->GetOutputWidthPixel() - (pPtAry[i].mnX - devX) + pOutDevRef->GetOutOffXPixel() - 1; + pPtAry2[j].mnY = pPtAry[i].mnY; } } } @@ -223,11 +187,11 @@ bool SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint * return false; } -void SalGraphics::mirror( vcl::Region& rRgn, const OutputDevice *pOutDev, bool bBack ) const +void SalGraphics::mirror( vcl::Region& rRgn, const OutputDevice *pOutDev ) const { if( rRgn.HasPolyPolygonOrB2DPolyPolygon() ) { - const basegfx::B2DPolyPolygon aPolyPoly(mirror(rRgn.GetAsB2DPolyPolygon(), pOutDev, bBack)); + const basegfx::B2DPolyPolygon aPolyPoly(mirror(rRgn.GetAsB2DPolyPolygon(), pOutDev)); rRgn = vcl::Region(aPolyPoly); } @@ -239,7 +203,7 @@ void SalGraphics::mirror( vcl::Region& rRgn, const OutputDevice *pOutDev, bool b for(RectangleVector::iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter) { - mirror(*aRectIter, pOutDev, bBack); + mirror(*aRectIter, pOutDev); rRgn.Union(*aRectIter); } @@ -660,36 +624,36 @@ bool SalGraphics::HitTestNativeControl( ControlType nType, ControlPart nPart, co return hitTestNativeControl( nType, nPart, rControlRegion, aPos, rIsInside ); } -void SalGraphics::mirror( ImplControlValue& rVal, const OutputDevice* pOutDev, bool bBack ) const +void SalGraphics::mirror( ImplControlValue& rVal, const OutputDevice* pOutDev ) const { switch( rVal.getType() ) { case CTRL_SLIDER: { SliderValue* pSlVal = static_cast<SliderValue*>(&rVal); - mirror(pSlVal->maThumbRect,pOutDev,bBack); + mirror(pSlVal->maThumbRect,pOutDev); } break; case CTRL_SCROLLBAR: { ScrollbarValue* pScVal = static_cast<ScrollbarValue*>(&rVal); - mirror(pScVal->maThumbRect,pOutDev,bBack); - mirror(pScVal->maButton1Rect,pOutDev,bBack); - mirror(pScVal->maButton2Rect,pOutDev,bBack); + mirror(pScVal->maThumbRect,pOutDev); + mirror(pScVal->maButton1Rect,pOutDev); + mirror(pScVal->maButton2Rect,pOutDev); } break; case CTRL_SPINBOX: case CTRL_SPINBUTTONS: { SpinbuttonValue* pSpVal = static_cast<SpinbuttonValue*>(&rVal); - mirror(pSpVal->maUpperRect,pOutDev,bBack); - mirror(pSpVal->maLowerRect,pOutDev,bBack); + mirror(pSpVal->maUpperRect,pOutDev); + mirror(pSpVal->maLowerRect,pOutDev); } break; case CTRL_TOOLBAR: { ToolbarValue* pTVal = static_cast<ToolbarValue*>(&rVal); - mirror(pTVal->maGripRect,pOutDev,bBack); + mirror(pTVal->maGripRect,pOutDev); } break; } diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 9129ded50e9c..751900d218e8 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -1419,7 +1419,7 @@ SalLayout* OutputDevice::ImplGlyphFallbackLayout( SalLayout* pSalLayout, ImplLay pMultiSalLayout->AddFallback( *pFallback, rLayoutArgs.maRuns, aFontSelData.mpFontData ); if (nFallbackLevel == MAX_FALLBACK-1) - pMultiSalLayout->SetIncomplete(); + pMultiSalLayout->SetIncomplete(true); } mpFontCache->Release( pFallbackFont ); diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index a50978665cf6..28c739f999c4 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -1950,11 +1950,9 @@ IMPL_LINK_TYPED( PrintProgressDialog, ClickHdl, Button*, pButton, void ) mbCanceled = true; } -void PrintProgressDialog::setProgress( int i_nCurrent, int i_nMax ) +void PrintProgressDialog::setProgress( int i_nCurrent ) { mnCur = i_nCurrent; - if( i_nMax != -1 ) - mnMax = i_nMax; if( mnMax < 1 ) mnMax = 1; diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 2dbad9063798..048ef506be10 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -127,7 +127,7 @@ public: ToolBox* FindToolBox( const Rectangle& rRect ); void StartDragging( ToolBox* pDragBox, const Point& rPos, const Rectangle& rRect, sal_uInt16 nLineMode, - bool bResizeItem, void* pData = nullptr ); + bool bResizeItem ); void Dragging( const Point& rPos ); void EndDragging( bool bOK = true ); void HideDragRect() { if ( mbShowDragRect ) mpDragBox->HideTracking(); } @@ -1177,8 +1177,7 @@ ToolBox* ImplTBDragMgr::FindToolBox( const Rectangle& rRect ) void ImplTBDragMgr::StartDragging( ToolBox* pToolBox, const Point& rPos, const Rectangle& rRect, - sal_uInt16 nDragLineMode, bool bResizeItem, - void* pData ) + sal_uInt16 nDragLineMode, bool bResizeItem ) { mpDragBox = pToolBox; pToolBox->CaptureMouse(); @@ -1192,7 +1191,7 @@ void ImplTBDragMgr::StartDragging( ToolBox* pToolBox, } else { - mpCustomizeData = pData; + mpCustomizeData = nullptr; mbResizeMode = bResizeItem; pToolBox->Activate(); pToolBox->mnCurItemId = pToolBox->mnConfigItem; 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); diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx index 03e2af70377e..f28241096737 100644 --- a/vcl/workben/outdevgrind.cxx +++ b/vcl/workben/outdevgrind.cxx @@ -765,8 +765,9 @@ void grindFunc( OutputDevice& rTarget, /** Call OutputDevice render methods repeatedly, and output elapsed time to stdout */ -void outDevGrind(vcl::RenderContext& rTarget, sal_Int32 nTurns = 100) +void outDevGrind(vcl::RenderContext& rTarget) { + sal_Int32 nTurns = 100; // TODO(F1): also profile pure complex clip setup times! // State: fill/line color, draw mode, w/o clip, rect clip, complex clip |