From 8f254a45d78dee53764321244aca108e2a1d344c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 24 Apr 2017 12:54:28 +0200 Subject: loplugin:checkunusedparams in vcl Change-Id: I26661684e634aa15a18f78442de15c9db832f319 Reviewed-on: https://gerrit.libreoffice.org/36886 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/inc/brdwin.hxx | 4 +-- vcl/inc/printdlg.hxx | 2 +- vcl/inc/salgdi.hxx | 3 +-- vcl/inc/salobj.hxx | 4 +-- vcl/inc/salwtype.hxx | 3 +-- vcl/source/control/button.cxx | 45 ++++++++++++++++------------------ vcl/source/control/ctrl.cxx | 2 +- vcl/source/control/field.cxx | 30 +++++++++++------------ vcl/source/control/field2.cxx | 38 ++++++++++++++-------------- vcl/source/control/fixed.cxx | 7 +++--- vcl/source/control/group.cxx | 15 ++++++------ vcl/source/control/longcurr.cxx | 16 ++++++------ vcl/source/control/tabctrl.cxx | 25 +++++++++---------- vcl/source/edit/textdat2.hxx | 2 +- vcl/source/edit/textdata.cxx | 4 +-- vcl/source/edit/texteng.cxx | 31 ++++++++++++----------- vcl/source/edit/textview.cxx | 20 ++++++--------- vcl/source/edit/vclmedit.cxx | 18 +++++++------- vcl/source/filter/sgfbram.cxx | 8 +++--- vcl/source/filter/sgvmain.cxx | 4 +-- vcl/source/filter/sgvtext.cxx | 3 +-- vcl/source/filter/wmf/wmfwr.cxx | 4 +-- vcl/source/filter/wmf/wmfwr.hxx | 2 +- vcl/source/gdi/embeddedfontshelper.cxx | 2 +- vcl/source/gdi/pdfextoutdevdata.cxx | 10 +++----- vcl/source/gdi/pdfwriter_impl.cxx | 3 +-- vcl/source/gdi/salgdilayout.cxx | 2 +- vcl/source/outdev/font.cxx | 4 +-- vcl/source/outdev/gradient.cxx | 2 +- vcl/source/window/brdwin.cxx | 6 ++--- vcl/source/window/dialog.cxx | 2 +- vcl/source/window/menu.cxx | 2 +- vcl/source/window/printdlg.cxx | 4 +-- vcl/source/window/splitwin.cxx | 16 ++++++------ vcl/source/window/syschild.cxx | 3 +-- vcl/source/window/toolbox.cxx | 16 ++++++------ vcl/source/window/winproc.cxx | 6 ++--- vcl/unx/generic/window/salobj.cxx | 6 ++--- vcl/unx/gtk/gtkobject.cxx | 4 +-- vcl/unx/gtk3/gtk3gtkobject.cxx | 4 +-- vcl/win/window/salobj.cxx | 10 ++++---- 41 files changed, 184 insertions(+), 208 deletions(-) (limited to 'vcl') diff --git a/vcl/inc/brdwin.hxx b/vcl/inc/brdwin.hxx index 43341841a399..ab9c965202a9 100644 --- a/vcl/inc/brdwin.hxx +++ b/vcl/inc/brdwin.hxx @@ -138,7 +138,7 @@ public: void InvalidateBorder(); using Window::Draw; - void Draw( const tools::Rectangle& rRect, OutputDevice* pDev, const Point& rPos ); + void Draw( OutputDevice* pDev, const Point& rPos ); void SetDisplayActive( bool bActive ); void SetTitleType( BorderWindowTitleType nTitleType, const Size& rSize ); @@ -237,7 +237,7 @@ public: class ImplNoBorderWindowView : public ImplBorderWindowView { public: - ImplNoBorderWindowView( ImplBorderWindow* pBorderWindow ); + ImplNoBorderWindowView(); virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ) override; virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx index b8129dcd8b93..2371eaa5469b 100644 --- a/vcl/inc/printdlg.hxx +++ b/vcl/inc/printdlg.hxx @@ -215,7 +215,7 @@ namespace vcl void updateNup(); void updateNupFromPages(); void preparePreview( bool i_bPrintChanged = true, bool i_bMayUseCache = false ); - void setPreviewText( sal_Int32 ); + void setPreviewText(); void updatePrinterText(); void checkControlDependencies(); void checkOptionalControlDependencies(); diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx index e914b6493dff..e3892a381bed 100644 --- a/vcl/inc/salgdi.hxx +++ b/vcl/inc/salgdi.hxx @@ -268,8 +268,7 @@ public: bool DrawGradient( const tools::PolyPolygon& rPolyPoly, - const Gradient& rGradient, - OutputDevice* ); + const Gradient& rGradient ); // CopyArea --> No RasterOp, but ClipRegion diff --git a/vcl/inc/salobj.hxx b/vcl/inc/salobj.hxx index b1005fb87846..3d2105fcb008 100644 --- a/vcl/inc/salobj.hxx +++ b/vcl/inc/salobj.hxx @@ -52,8 +52,8 @@ public: void SetCallback( void* pInst, SALOBJECTPROC pProc ) { m_pInst = pInst; m_pCallback = pProc; } - void CallCallback( SalObjEvent nEvent, const void* pEvent ) - { if (m_pCallback) m_pCallback( m_pInst, this, nEvent, pEvent ); } + void CallCallback( SalObjEvent nEvent ) + { if (m_pCallback) m_pCallback( m_pInst, nEvent ); } void SetMouseTransparent( bool bMouseTransparent ) { m_bMouseTransparent = bMouseTransparent; } diff --git a/vcl/inc/salwtype.hxx b/vcl/inc/salwtype.hxx index 4b27a3e99c6b..316165f3d44c 100644 --- a/vcl/inc/salwtype.hxx +++ b/vcl/inc/salwtype.hxx @@ -224,8 +224,7 @@ enum class SalObjEvent { ToTop = 3 }; -typedef long (*SALOBJECTPROC)( void* pInst, SalObject* pObject, - SalObjEvent nEvent, const void* pEvent ); +typedef long (*SALOBJECTPROC)( void* pInst, SalObjEvent nEvent ); struct SalFrameState { diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 122a71ef55be..493c74e4532f 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -658,7 +658,7 @@ void PushButton::ImplInit( vcl::Window* pParent, WinBits nStyle ) if ( nStyle & WB_NOLIGHTBORDER ) ImplGetButtonState() |= DrawButtonFlags::NoLightBorder; - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); } WinBits PushButton::ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle ) @@ -692,10 +692,9 @@ const Color& PushButton::GetCanonicalTextColor( const StyleSettings& _rStyle ) c return _rStyle.GetButtonTextColor(); } -void PushButton::ImplInitSettings( bool bFont, - bool bForeground, bool bBackground ) +void PushButton::ImplInitSettings( bool bBackground ) { - Button::ImplInitSettings( bFont, bForeground ); + Button::ImplInitSettings(); if ( bBackground ) { @@ -1453,17 +1452,17 @@ void PushButton::StateChanged( StateChangedType nType ) else if ( (nType == StateChangedType::Zoom) || (nType == StateChangedType::ControlFont) ) { - ImplInitSettings( true, false, false ); + ImplInitSettings( false ); Invalidate(); } else if ( nType == StateChangedType::ControlForeground ) { - ImplInitSettings( false, true, false ); + ImplInitSettings( false ); Invalidate(); } else if ( nType == StateChangedType::ControlBackground ) { - ImplInitSettings( false, false, true ); + ImplInitSettings( true ); Invalidate(); } } @@ -1477,7 +1476,7 @@ void PushButton::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) ) { - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); Invalidate(); } } @@ -1835,7 +1834,7 @@ void RadioButton::ImplInit( vcl::Window* pParent, WinBits nStyle ) nStyle = ImplInitStyle(getPreviousSibling(pParent), nStyle); Button::ImplInit( pParent, nStyle, nullptr ); - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); } WinBits RadioButton::ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle ) @@ -1863,10 +1862,9 @@ const Color& RadioButton::GetCanonicalTextColor( const StyleSettings& _rStyle ) return _rStyle.GetRadioCheckTextColor(); } -void RadioButton::ImplInitSettings( bool bFont, - bool bForeground, bool bBackground ) +void RadioButton::ImplInitSettings( bool bBackground ) { - Button::ImplInitSettings( bFont, bForeground ); + Button::ImplInitSettings(); if ( bBackground ) { @@ -2557,17 +2555,17 @@ void RadioButton::StateChanged( StateChangedType nType ) else if ( (nType == StateChangedType::Zoom) || (nType == StateChangedType::ControlFont) ) { - ImplInitSettings( true, false, false ); + ImplInitSettings( false ); Invalidate(); } else if ( nType == StateChangedType::ControlForeground ) { - ImplInitSettings( false, true, false ); + ImplInitSettings( false ); Invalidate(); } else if ( nType == StateChangedType::ControlBackground ) { - ImplInitSettings( false, false, true ); + ImplInitSettings( true ); Invalidate(); } } @@ -2581,7 +2579,7 @@ void RadioButton::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) ) { - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); Invalidate(); } } @@ -2939,7 +2937,7 @@ void CheckBox::ImplInit( vcl::Window* pParent, WinBits nStyle ) nStyle = ImplInitStyle(getPreviousSibling(pParent), nStyle); Button::ImplInit( pParent, nStyle, nullptr ); - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); } WinBits CheckBox::ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle ) @@ -2962,10 +2960,9 @@ const Color& CheckBox::GetCanonicalTextColor( const StyleSettings& _rStyle ) con return _rStyle.GetRadioCheckTextColor(); } -void CheckBox::ImplInitSettings( bool bFont, - bool bForeground, bool bBackground ) +void CheckBox::ImplInitSettings( bool bBackground ) { - Button::ImplInitSettings( bFont, bForeground ); + Button::ImplInitSettings(); if ( bBackground ) { @@ -3479,17 +3476,17 @@ void CheckBox::StateChanged( StateChangedType nType ) else if ( (nType == StateChangedType::Zoom) || (nType == StateChangedType::ControlFont) ) { - ImplInitSettings( true, false, false ); + ImplInitSettings( false ); Invalidate(); } else if ( nType == StateChangedType::ControlForeground ) { - ImplInitSettings( false, true, false ); + ImplInitSettings( false ); Invalidate(); } else if ( nType == StateChangedType::ControlBackground ) { - ImplInitSettings( false, false, true ); + ImplInitSettings( true ); Invalidate(); } } @@ -3503,7 +3500,7 @@ void CheckBox::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) ) { - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); Invalidate(); } } diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index 8d94ebc26fce..3e4c0d56afb8 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -407,7 +407,7 @@ void Control::ApplySettings(vcl::RenderContext& rRenderContext) rRenderContext.SetTextFillColor(); } -void Control::ImplInitSettings(const bool, const bool) +void Control::ImplInitSettings() { ApplySettings(*this); } diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index a1c1ea8897b9..aa616ef50805 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -60,9 +60,9 @@ sal_Int64 ImplPower10( sal_uInt16 n ) return nValue; } -bool ImplNumericProcessKeyInput( Edit*, const KeyEvent& rKEvt, - bool bStrictFormat, bool bThousandSep, - const LocaleDataWrapper& rLocaleDataWrappper ) +bool ImplNumericProcessKeyInput( const KeyEvent& rKEvt, + bool bStrictFormat, bool bThousandSep, + const LocaleDataWrapper& rLocaleDataWrappper ) { if ( !bStrictFormat ) return false; @@ -775,7 +775,7 @@ bool NumericField::PreNotify( NotifyEvent& rNEvt ) { if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { - if ( ImplNumericProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), IsStrictFormat(), IsUseThousandSep(), ImplGetLocaleDataWrapper() ) ) + if ( ImplNumericProcessKeyInput( *rNEvt.GetKeyEvent(), IsStrictFormat(), IsUseThousandSep(), ImplGetLocaleDataWrapper() ) ) return true; } @@ -914,7 +914,7 @@ bool NumericBox::PreNotify( NotifyEvent& rNEvt ) { if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { - if ( ImplNumericProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), IsStrictFormat(), IsUseThousandSep(), ImplGetLocaleDataWrapper() ) ) + if ( ImplNumericProcessKeyInput( *rNEvt.GetKeyEvent(), IsStrictFormat(), IsUseThousandSep(), ImplGetLocaleDataWrapper() ) ) return true; } @@ -978,11 +978,11 @@ void NumericBox::InsertValue( sal_Int64 nValue, sal_Int32 nPos ) ComboBox::InsertEntry( CreateFieldText( nValue ), nPos ); } -static bool ImplMetricProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt, - bool, bool bUseThousandSep, const LocaleDataWrapper& rWrapper ) +static bool ImplMetricProcessKeyInput( const KeyEvent& rKEvt, + bool bUseThousandSep, const LocaleDataWrapper& rWrapper ) { // no meaningfull strict format; therefore allow all characters - return ImplNumericProcessKeyInput( pEdit, rKEvt, false, bUseThousandSep, rWrapper ); + return ImplNumericProcessKeyInput( rKEvt, false, bUseThousandSep, rWrapper ); } static OUString ImplMetricGetUnitText(const OUString& rStr) @@ -1595,7 +1595,7 @@ bool MetricField::PreNotify( NotifyEvent& rNEvt ) { if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { - if ( ImplMetricProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), IsStrictFormat(), IsUseThousandSep(), ImplGetLocaleDataWrapper() ) ) + if ( ImplMetricProcessKeyInput( *rNEvt.GetKeyEvent(), IsUseThousandSep(), ImplGetLocaleDataWrapper() ) ) return true; } @@ -1698,7 +1698,7 @@ bool MetricBox::PreNotify( NotifyEvent& rNEvt ) { if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { - if ( ImplMetricProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), IsStrictFormat(), IsUseThousandSep(), ImplGetLocaleDataWrapper() ) ) + if ( ImplMetricProcessKeyInput( *rNEvt.GetKeyEvent(), IsUseThousandSep(), ImplGetLocaleDataWrapper() ) ) return true; } @@ -1803,11 +1803,11 @@ sal_Int64 MetricBox::GetValue() const return GetValue( FUNIT_NONE ); } -static bool ImplCurrencyProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt, - bool, bool bUseThousandSep, const LocaleDataWrapper& rWrapper ) +static bool ImplCurrencyProcessKeyInput( const KeyEvent& rKEvt, + bool bUseThousandSep, const LocaleDataWrapper& rWrapper ) { // no strict format set; therefore allow all characters - return ImplNumericProcessKeyInput( pEdit, rKEvt, false, bUseThousandSep, rWrapper ); + return ImplNumericProcessKeyInput( rKEvt, false, bUseThousandSep, rWrapper ); } inline bool ImplCurrencyGetValue( const OUString& rStr, sal_Int64& rValue, @@ -1910,7 +1910,7 @@ bool CurrencyField::PreNotify( NotifyEvent& rNEvt ) { if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { - if ( ImplCurrencyProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), IsStrictFormat(), IsUseThousandSep(), ImplGetLocaleDataWrapper() ) ) + if ( ImplCurrencyProcessKeyInput( *rNEvt.GetKeyEvent(), IsUseThousandSep(), ImplGetLocaleDataWrapper() ) ) return true; } @@ -1994,7 +1994,7 @@ bool CurrencyBox::PreNotify( NotifyEvent& rNEvt ) { if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { - if ( ImplCurrencyProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), IsStrictFormat(), IsUseThousandSep(), ImplGetLocaleDataWrapper() ) ) + if ( ImplCurrencyProcessKeyInput( *rNEvt.GetKeyEvent(), IsUseThousandSep(), ImplGetLocaleDataWrapper() ) ) return true; } diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index da5a3aa97601..97afce44d12e 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -997,7 +997,7 @@ static OUString ImplGetDateSep( const LocaleDataWrapper& rLocaleDataWrapper, Ext return rLocaleDataWrapper.getDateSep(); } -static bool ImplDateProcessKeyInput( Edit*, const KeyEvent& rKEvt, ExtDateFieldFormat eFormat, +static bool ImplDateProcessKeyInput( const KeyEvent& rKEvt, ExtDateFieldFormat eFormat, const LocaleDataWrapper& rLocaleDataWrapper ) { sal_Unicode cChar = rKEvt.GetCharCode(); @@ -1012,8 +1012,7 @@ static bool ImplDateProcessKeyInput( Edit*, const KeyEvent& rKEvt, ExtDateFieldF } static bool ImplDateGetValue( const OUString& rStr, Date& rDate, ExtDateFieldFormat eDateOrder, - const LocaleDataWrapper& rLocaleDataWrapper, const CalendarWrapper& rCalendarWrapper, - const AllSettings& ) + const LocaleDataWrapper& rLocaleDataWrapper, const CalendarWrapper& rCalendarWrapper ) { sal_uInt16 nDay = 0; sal_uInt16 nMonth = 0; @@ -1121,10 +1120,10 @@ static bool ImplDateGetValue( const OUString& rStr, Date& rDate, ExtDateFieldFor return false; } -bool DateFormatter::ImplDateReformat( const OUString& rStr, OUString& rOutStr, const AllSettings& rSettings ) +bool DateFormatter::ImplDateReformat( const OUString& rStr, OUString& rOutStr ) { Date aDate( Date::EMPTY ); - if ( !ImplDateGetValue( rStr, aDate, GetExtDateFormat(true), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) ) + if ( !ImplDateGetValue( rStr, aDate, GetExtDateFormat(true), ImplGetLocaleDataWrapper(), GetCalendarWrapper() ) ) return true; Date aTempDate = aDate; @@ -1133,13 +1132,12 @@ bool DateFormatter::ImplDateReformat( const OUString& rStr, OUString& rOutStr, c else if ( aTempDate < GetMin() ) aTempDate = GetMin(); - rOutStr = ImplGetDateAsText( aTempDate, rSettings ); + rOutStr = ImplGetDateAsText( aTempDate ); return true; } -OUString DateFormatter::ImplGetDateAsText( const Date& rDate, - const AllSettings& ) const +OUString DateFormatter::ImplGetDateAsText( const Date& rDate ) const { bool bShowCentury = false; switch ( GetExtDateFormat() ) @@ -1582,7 +1580,7 @@ void DateFormatter::ImplSetUserDate( const Date& rNewDate, Selection* pNewSelect maLastDate = aNewDate; if ( GetField() ) - ImplSetText( ImplGetDateAsText( aNewDate, GetFieldSettings() ), pNewSelection ); + ImplSetText( ImplGetDateAsText( aNewDate ), pNewSelection ); } void DateFormatter::ImplNewFieldValue( const Date& rDate ) @@ -1620,7 +1618,7 @@ Date DateFormatter::GetDate() const if ( GetField() ) { - if ( ImplDateGetValue( GetField()->GetText(), aDate, GetExtDateFormat(true), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) ) + if ( ImplDateGetValue( GetField()->GetText(), aDate, GetExtDateFormat(true), ImplGetLocaleDataWrapper(), GetCalendarWrapper() ) ) { if ( aDate > maMax ) aDate = maMax; @@ -1665,7 +1663,7 @@ bool DateFormatter::IsEmptyDate() const else if ( !maLastDate.GetDate() ) { Date aDate( Date::EMPTY ); - bEmpty = !ImplDateGetValue( GetField()->GetText(), aDate, GetExtDateFormat(true), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ); + bEmpty = !ImplDateGetValue( GetField()->GetText(), aDate, GetExtDateFormat(true), ImplGetLocaleDataWrapper(), GetCalendarWrapper() ); } } return bEmpty; @@ -1680,14 +1678,14 @@ void DateFormatter::Reformat() return; OUString aStr; - bool bOK = ImplDateReformat( GetField()->GetText(), aStr, GetFieldSettings() ); + bool bOK = ImplDateReformat( GetField()->GetText(), aStr ); if( !bOK ) return; if ( !aStr.isEmpty() ) { ImplSetText( aStr ); - (void)ImplDateGetValue(aStr, maLastDate, GetExtDateFormat(true), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings()); + (void)ImplDateGetValue(aStr, maLastDate, GetExtDateFormat(true), ImplGetLocaleDataWrapper(), GetCalendarWrapper()); } else { @@ -1743,7 +1741,7 @@ bool DateField::PreNotify( NotifyEvent& rNEvt ) ( GetExtDateFormat() != ExtDateFieldFormat::SystemLong ) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { - if ( ImplDateProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), GetExtDateFormat( true ), ImplGetLocaleDataWrapper() ) ) + if ( ImplDateProcessKeyInput( *rNEvt.GetKeyEvent(), GetExtDateFormat( true ), ImplGetLocaleDataWrapper() ) ) return true; } @@ -1769,7 +1767,7 @@ bool DateField::EventNotify( NotifyEvent& rNEvt ) else { Date aDate( 0, 0, 0 ); - if ( ImplDateGetValue( GetText(), aDate, GetExtDateFormat(true), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) ) + if ( ImplDateGetValue( GetText(), aDate, GetExtDateFormat(true), ImplGetLocaleDataWrapper(), GetCalendarWrapper() ) ) // even with strict text analysis, our text is a valid date -> do a complete // reformat Reformat(); @@ -1848,7 +1846,7 @@ bool DateBox::PreNotify( NotifyEvent& rNEvt ) ( GetExtDateFormat() != ExtDateFieldFormat::SystemLong ) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { - if ( ImplDateProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), GetExtDateFormat( true ), ImplGetLocaleDataWrapper() ) ) + if ( ImplDateProcessKeyInput( *rNEvt.GetKeyEvent(), GetExtDateFormat( true ), ImplGetLocaleDataWrapper() ) ) return true; } @@ -1902,7 +1900,7 @@ void DateBox::ReformatAll() const sal_Int32 nEntryCount = GetEntryCount(); for ( sal_Int32 i=0; i < nEntryCount; ++i ) { - ImplDateReformat( GetEntry( i ), aStr, GetFieldSettings() ); + ImplDateReformat( GetEntry( i ), aStr ); RemoveEntryAt(i); InsertEntry( aStr, i ); } @@ -1910,7 +1908,7 @@ void DateBox::ReformatAll() SetUpdateMode( true ); } -static bool ImplTimeProcessKeyInput( Edit*, const KeyEvent& rKEvt, +static bool ImplTimeProcessKeyInput( const KeyEvent& rKEvt, bool bStrictFormat, bool bDuration, TimeFieldFormat eFormat, const LocaleDataWrapper& rLocaleDataWrapper ) @@ -2524,7 +2522,7 @@ bool TimeField::PreNotify( NotifyEvent& rNEvt ) { if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { - if ( ImplTimeProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), IsStrictFormat(), IsDuration(), GetFormat(), ImplGetLocaleDataWrapper() ) ) + if ( ImplTimeProcessKeyInput( *rNEvt.GetKeyEvent(), IsStrictFormat(), IsDuration(), GetFormat(), ImplGetLocaleDataWrapper() ) ) return true; } @@ -2641,7 +2639,7 @@ bool TimeBox::PreNotify( NotifyEvent& rNEvt ) { if ( (rNEvt.GetType() == MouseNotifyEvent::KEYINPUT) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { - if ( ImplTimeProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), IsStrictFormat(), IsDuration(), GetFormat(), ImplGetLocaleDataWrapper() ) ) + if ( ImplTimeProcessKeyInput( *rNEvt.GetKeyEvent(), IsStrictFormat(), IsDuration(), GetFormat(), ImplGetLocaleDataWrapper() ) ) return true; } diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index fa95ee3d2404..6722fd345de6 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -693,8 +693,7 @@ FixedBitmap::FixedBitmap( vcl::Window* pParent, WinBits nStyle ) : ImplInit( pParent, nStyle ); } -void FixedBitmap::ImplDraw( OutputDevice* pDev, DrawFlags /* nDrawFlags */, - const Point& rPos, const Size& rSize ) +void FixedBitmap::ImplDraw( OutputDevice* pDev, const Point& rPos, const Size& rSize ) { Bitmap* pBitmap = &maBitmap; @@ -736,7 +735,7 @@ void FixedBitmap::ApplySettings(vcl::RenderContext& rRenderContext) void FixedBitmap::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { - ImplDraw(&rRenderContext, DrawFlags::NONE, Point(), GetOutputSizePixel()); + ImplDraw(&rRenderContext, Point(), GetOutputSizePixel()); } void FixedBitmap::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, @@ -756,7 +755,7 @@ void FixedBitmap::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize aRect = aDecoView.DrawFrame( aRect, DrawFrameStyle::DoubleIn ); } pDev->IntersectClipRegion( aRect ); - ImplDraw( pDev, nFlags, aRect.TopLeft(), aRect.GetSize() ); + ImplDraw( pDev, aRect.TopLeft(), aRect.GetSize() ); pDev->Pop(); } diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx index dfcf58f75905..e23b836a846d 100644 --- a/vcl/source/control/group.cxx +++ b/vcl/source/control/group.cxx @@ -33,7 +33,7 @@ void GroupBox::ImplInit( vcl::Window* pParent, WinBits nStyle ) nStyle = ImplInitStyle( nStyle ); Control::ImplInit( pParent, nStyle, nullptr ); SetMouseTransparent( true ); - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); } WinBits GroupBox::ImplInitStyle( WinBits nStyle ) @@ -53,10 +53,9 @@ const Color& GroupBox::GetCanonicalTextColor( const StyleSettings& _rStyle ) con return _rStyle.GetGroupTextColor(); } -void GroupBox::ImplInitSettings( bool bFont, - bool bForeground, bool bBackground ) +void GroupBox::ImplInitSettings( bool bBackground ) { - Control::ImplInitSettings( bFont, bForeground ); + Control::ImplInitSettings(); if ( bBackground ) { @@ -238,17 +237,17 @@ void GroupBox::StateChanged( StateChangedType nType ) else if ( (nType == StateChangedType::Zoom) || (nType == StateChangedType::ControlFont) ) { - ImplInitSettings( true, false, false ); + ImplInitSettings( false ); Invalidate(); } else if ( nType == StateChangedType::ControlForeground ) { - ImplInitSettings( false, true, false ); + ImplInitSettings( false ); Invalidate(); } else if ( nType == StateChangedType::ControlBackground ) { - ImplInitSettings( false, false, true ); + ImplInitSettings( true ); Invalidate(); } } @@ -262,7 +261,7 @@ void GroupBox::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) ) { - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); Invalidate(); } } diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx index f2409df06848..04de31562e3d 100644 --- a/vcl/source/control/longcurr.cxx +++ b/vcl/source/control/longcurr.cxx @@ -93,9 +93,9 @@ OUString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const BigInt return aTemplate.makeStringAndClear(); } -bool ImplNumericProcessKeyInput( Edit*, const KeyEvent& rKEvt, - bool bStrictFormat, bool bThousandSep, - const LocaleDataWrapper& rLocaleDataWrapper ) +bool ImplNumericProcessKeyInput( const KeyEvent& rKEvt, + bool bStrictFormat, bool bThousandSep, + const LocaleDataWrapper& rLocaleDataWrapper ) { if ( !bStrictFormat ) return false; @@ -240,11 +240,11 @@ bool ImplNumericGetValue( const OUString& rStr, BigInt& rValue, return true; } -bool ImplLongCurrencyProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt, - bool, bool bUseThousandSep, const LocaleDataWrapper& rLocaleDataWrapper ) +bool ImplLongCurrencyProcessKeyInput( const KeyEvent& rKEvt, + bool bUseThousandSep, const LocaleDataWrapper& rLocaleDataWrapper ) { // There's no StrictFormat that makes sense here, thus allow all chars - return ImplNumericProcessKeyInput( pEdit, rKEvt, false, bUseThousandSep, rLocaleDataWrapper ); + return ImplNumericProcessKeyInput( rKEvt, false, bUseThousandSep, rLocaleDataWrapper ); } } // namespace @@ -451,7 +451,7 @@ bool LongCurrencyField::PreNotify( NotifyEvent& rNEvt ) { if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { - if ( ImplLongCurrencyProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), IsStrictFormat(), IsUseThousandSep(), GetLocaleDataWrapper() ) ) + if ( ImplLongCurrencyProcessKeyInput( *rNEvt.GetKeyEvent(), IsUseThousandSep(), GetLocaleDataWrapper() ) ) return true; } return SpinField::PreNotify( rNEvt ); @@ -525,7 +525,7 @@ bool LongCurrencyBox::PreNotify( NotifyEvent& rNEvt ) { if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT ) { - if ( ImplLongCurrencyProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), IsStrictFormat(), IsUseThousandSep(), GetLocaleDataWrapper() ) ) + if ( ImplLongCurrencyProcessKeyInput( *rNEvt.GetKeyEvent(), IsUseThousandSep(), GetLocaleDataWrapper() ) ) return true; } return ComboBox::PreNotify( rNEvt ); diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index d6e75ed387eb..98bd3f8a3f36 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -98,7 +98,7 @@ void TabControl::ImplInit( vcl::Window* pParent, WinBits nStyle ) mpTabCtrlData = new ImplTabCtrlData; mpTabCtrlData->mpListBox = nullptr; - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); if( (nStyle & WB_DROPDOWN) ) { @@ -127,10 +127,9 @@ const Color& TabControl::GetCanonicalTextColor( const StyleSettings& _rStyle ) c return _rStyle.GetTabTextColor(); } -void TabControl::ImplInitSettings( bool bFont, - bool bForeground, bool bBackground ) +void TabControl::ImplInitSettings( bool bBackground ) { - Control::ImplInitSettings( bFont, bForeground ); + Control::ImplInitSettings(); if ( bBackground ) { @@ -764,7 +763,7 @@ void TabControl::ImplShowFocus() } void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* pItem, const tools::Rectangle& rCurRect, - bool bFirstInGroup, bool bLastInGroup, bool /* bIsCurrentItem */ ) + bool bFirstInGroup, bool bLastInGroup ) { if (pItem->maRect.IsEmpty()) return; @@ -1209,7 +1208,7 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const tools::Rect if (!aClipRgn.IsEmpty()) { ImplDrawItem(rRenderContext, pItem, aCurRect, false/*bLayout*/, - pItem == pFirstTab, pItem == pLastTab); + pItem == pFirstTab); } } @@ -1228,7 +1227,7 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const tools::Rect if (!aClipRgn.IsEmpty()) { ImplDrawItem(rRenderContext, pCurItem, aCurRect, - pCurItem == pFirstTab, pCurItem == pLastTab, true); + pCurItem == pFirstTab, pCurItem == pLastTab); } } } @@ -1491,17 +1490,17 @@ void TabControl::StateChanged( StateChangedType nType ) else if ( (nType == StateChangedType::Zoom) || (nType == StateChangedType::ControlFont) ) { - ImplInitSettings( true, false, false ); + ImplInitSettings( false ); Invalidate(); } else if ( nType == StateChangedType::ControlForeground ) { - ImplInitSettings( false, true, false ); + ImplInitSettings( false ); Invalidate(); } else if ( nType == StateChangedType::ControlBackground ) { - ImplInitSettings( false, false, true ); + ImplInitSettings( true ); Invalidate(); } } @@ -1515,7 +1514,7 @@ void TabControl::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) ) { - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); Invalidate(); } } @@ -2717,7 +2716,7 @@ void NotebookbarTabControlBase::ImplPaint(vcl::RenderContext& rRenderContext, co if (!aClipRgn.IsEmpty()) { ImplDrawItem(rRenderContext, pItem, aCurRect, false/*bLayout*/, - pItem == pFirstTab, pItem == pLastTab); + pItem == pFirstTab); } } @@ -2736,7 +2735,7 @@ void NotebookbarTabControlBase::ImplPaint(vcl::RenderContext& rRenderContext, co if (!aClipRgn.IsEmpty()) { ImplDrawItem(rRenderContext, pCurItem, aCurRect, - pCurItem == pFirstTab, pCurItem == pLastTab, true); + pCurItem == pFirstTab, pCurItem == pLastTab); } } } diff --git a/vcl/source/edit/textdat2.hxx b/vcl/source/edit/textdat2.hxx index 96e0cec88111..d74541e7e75b 100644 --- a/vcl/source/edit/textdat2.hxx +++ b/vcl/source/edit/textdat2.hxx @@ -195,7 +195,7 @@ public: void SetValid() { mbInvalid = false; mbSimple = true;} void MarkInvalid( sal_Int32 nStart, sal_Int32 nDiff ); - void MarkSelectionInvalid( sal_Int32 nStart, sal_Int32 nEnd ); + void MarkSelectionInvalid( sal_Int32 nStart ); sal_Int32 GetInvalidPosStart() const { return mnInvalidPosStart; } sal_Int32 GetInvalidDiff() const { return mnInvalidDiff; } diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx index 0ab5d92d7c28..1024c360f1e2 100644 --- a/vcl/source/edit/textdata.cxx +++ b/vcl/source/edit/textdata.cxx @@ -195,17 +195,15 @@ void TEParaPortion::MarkInvalid( sal_Int32 nStart, sal_Int32 nDiff ) mbInvalid = true; } -void TEParaPortion::MarkSelectionInvalid( sal_Int32 nStart, sal_Int32 /*nEnd*/ ) +void TEParaPortion::MarkSelectionInvalid( sal_Int32 nStart ) { if ( !mbInvalid ) { mnInvalidPosStart = nStart; -// nInvalidPosEnd = nEnd; } else { mnInvalidPosStart = std::min( mnInvalidPosStart, nStart ); -// nInvalidPosEnd = pNode->Len(); } maWritingDirectionInfos.clear(); diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index b143b93835f9..cc50317037bc 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -520,7 +520,7 @@ TextPaM TextEngine::ImpConnectParagraphs( sal_uInt32 nLeft, sal_uInt32 nRight ) TextPaM aPaM = mpDoc->ConnectParagraphs( pLeft, pRight ); ImpParagraphRemoved( nRight ); - pLeftPortion->MarkSelectionInvalid( aPaM.GetIndex(), pLeft->GetText().getLength() ); + pLeftPortion->MarkSelectionInvalid( aPaM.GetIndex() ); mpTEParaPortions->Remove( nRight ); delete pRightPortion; @@ -565,7 +565,7 @@ TextPaM TextEngine::ImpDeleteText( const TextSelection& rSel ) ImpRemoveChars( aStartPaM, nChars ); TEParaPortion* pPortion = mpTEParaPortions->GetObject( nStartNode ); SAL_WARN_IF( !pPortion, "vcl", "ImpDeleteText(3): bad Index" ); - pPortion->MarkSelectionInvalid( aStartPaM.GetIndex(), pLeft->GetText().getLength() ); + pPortion->MarkSelectionInvalid( aStartPaM.GetIndex() ); } // the beginning of EndNodes.... @@ -578,7 +578,7 @@ TextPaM TextEngine::ImpDeleteText( const TextSelection& rSel ) ImpRemoveChars( aEndPaM, nChars ); TEParaPortion* pPortion = mpTEParaPortions->GetObject( nEndNode ); SAL_WARN_IF( !pPortion, "vcl", "ImpDeleteText(4): bad Index" ); - pPortion->MarkSelectionInvalid( 0, pPortion->GetNode()->GetText().getLength() ); + pPortion->MarkSelectionInvalid( 0 ); } // connect.... @@ -1028,7 +1028,7 @@ bool TextEngine::HasAttrib( sal_uInt16 nWhich ) const return bAttr; } -TextPaM TextEngine::GetPaM( const Point& rDocPos, bool bSmart ) +TextPaM TextEngine::GetPaM( const Point& rDocPos ) { SAL_WARN_IF( !GetUpdateMode(), "vcl", "GetPaM: GetUpdateMode()" ); @@ -1045,7 +1045,7 @@ TextPaM TextEngine::GetPaM( const Point& rDocPos, bool bSmart ) aPosInPara.Y() -= nY; TextPaM aPaM( nPortion, 0 ); - aPaM.GetIndex() = ImpFindIndex( nPortion, aPosInPara, bSmart ); + aPaM.GetIndex() = ImpFindIndex( nPortion, aPosInPara ); return aPaM; } } @@ -1056,7 +1056,7 @@ TextPaM TextEngine::GetPaM( const Point& rDocPos, bool bSmart ) return TextPaM( nLastNode, pLast->GetText().getLength() ); } -sal_Int32 TextEngine::ImpFindIndex( sal_uInt32 nPortion, const Point& rPosInPara, bool bSmart ) +sal_Int32 TextEngine::ImpFindIndex( sal_uInt32 nPortion, const Point& rPosInPara ) { SAL_WARN_IF( !IsFormatted(), "vcl", "GetPaM: Not formatted" ); TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPortion ); @@ -1079,7 +1079,7 @@ sal_Int32 TextEngine::ImpFindIndex( sal_uInt32 nPortion, const Point& rPosInPara assert(pLine && "ImpFindIndex: pLine ?"); - nCurIndex = GetCharPos( nPortion, nLine, rPosInPara.X(), bSmart ); + nCurIndex = GetCharPos( nPortion, nLine, rPosInPara.X() ); if ( nCurIndex && ( nCurIndex == pLine->GetEnd() ) && ( pLine != &( pPortion->GetLines().back() ) ) ) @@ -1091,7 +1091,7 @@ sal_Int32 TextEngine::ImpFindIndex( sal_uInt32 nPortion, const Point& rPosInPara return nCurIndex; } -sal_Int32 TextEngine::GetCharPos( sal_uInt32 nPortion, std::vector::size_type nLine, long nXPos, bool ) +sal_Int32 TextEngine::GetCharPos( sal_uInt32 nPortion, std::vector::size_type nLine, long nXPos ) { TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPortion ); @@ -1514,8 +1514,7 @@ void TextEngine::FormatFullDoc() for ( sal_uInt32 nPortion = 0; nPortion < mpTEParaPortions->Count(); ++nPortion ) { TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPortion ); - const sal_Int32 nLen = pTEParaPortion->GetNode()->GetText().getLength(); - pTEParaPortion->MarkSelectionInvalid( 0, nLen ); + pTEParaPortion->MarkSelectionInvalid( 0 ); } mbFormatted = false; FormatDoc(); @@ -1641,7 +1640,7 @@ void TextEngine::CreateAndInsertEmptyLine( sal_uInt32 nPara ) pTEParaPortion->GetLines().push_back( aTmpLine ); } -void TextEngine::ImpBreakLine( sal_uInt32 nPara, TextLine* pLine, TETextPortion*, sal_Int32 nPortionStart, long nRemainingWidth ) +void TextEngine::ImpBreakLine( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nPortionStart, long nRemainingWidth ) { TextNode* pNode = mpDoc->GetNodes()[ nPara ]; @@ -2268,7 +2267,7 @@ bool TextEngine::CreateLines( sal_uInt32 nPara ) { SAL_WARN_IF( (nPortionEnd-nPortionStart) != pPortion->GetLen(), "vcl", "CreateLines: There is a Portion after all?!" ); const long nRemainingWidth = mnMaxTextWidth - nTmpWidth; - ImpBreakLine( nPara, pLine, pPortion, nPortionStart, nRemainingWidth ); + ImpBreakLine( nPara, pLine, nPortionStart, nRemainingWidth ); } if ( ( ImpGetAlign() == TxtAlign::Center ) || ( ImpGetAlign() == TxtAlign::Right ) ) @@ -2549,7 +2548,7 @@ void TextEngine::RemoveAttribs( sal_uInt32 nPara ) pNode->GetCharAttribs().Clear(); TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara ); - pTEParaPortion->MarkSelectionInvalid( 0, pNode->GetText().getLength() ); + pTEParaPortion->MarkSelectionInvalid( 0 ); mbFormatted = false; @@ -2572,7 +2571,7 @@ void TextEngine::RemoveAttribs( sal_uInt32 nPara, sal_uInt16 nWhich ) rAttribs.RemoveAttrib( nAttr -1 ); } TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara ); - pTEParaPortion->MarkSelectionInvalid( 0, pNode->GetText().getLength() ); + pTEParaPortion->MarkSelectionInvalid( 0 ); mbFormatted = false; IdleFormatAndUpdate( nullptr, 0xFFFF ); } @@ -2596,7 +2595,7 @@ void TextEngine::RemoveAttrib( sal_uInt32 nPara, const TextCharAttrib& rAttrib ) } } TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara ); - pTEParaPortion->MarkSelectionInvalid( 0, pNode->GetText().getLength() ); + pTEParaPortion->MarkSelectionInvalid( 0 ); mbFormatted = false; FormatAndUpdate(); } @@ -2623,7 +2622,7 @@ void TextEngine::SetAttrib( const TextAttrib& rAttr, sal_uInt32 nPara, sal_Int32 nEnd = nMax; pNode->GetCharAttribs().InsertAttrib( new TextCharAttrib( rAttr, nStart, nEnd ) ); - pTEParaPortion->MarkSelectionInvalid( nStart, nEnd ); + pTEParaPortion->MarkSelectionInvalid( nStart ); mbFormatted = false; if ( bIdleFormatAndUpdate ) diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx index cff429cdb828..edcfac1f3a8e 100644 --- a/vcl/source/edit/textview.cxx +++ b/vcl/source/edit/textview.cxx @@ -434,20 +434,20 @@ void TextView::ImpSetSelection( const TextSelection& rSelection ) void TextView::ShowSelection() { - ImpShowHideSelection( true ); + ImpShowHideSelection(); } void TextView::HideSelection() { - ImpShowHideSelection( false ); + ImpShowHideSelection(); } void TextView::ShowSelection( const TextSelection& rRange ) { - ImpShowHideSelection( true, &rRange ); + ImpShowHideSelection( &rRange ); } -void TextView::ImpShowHideSelection(bool /*bShow*/, const TextSelection* pRange) +void TextView::ImpShowHideSelection(const TextSelection* pRange) { const TextSelection* pRangeOrSelection = pRange ? pRange : &mpImpl->maSelection; @@ -854,7 +854,7 @@ void TextView::Command( const CommandEvent& rCEvt ) if( mpImpl->mpTextEngine->mpIMEInfos ) { TEParaPortion* pPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( mpImpl->mpTextEngine->mpIMEInfos->aPos.GetPara() ); - pPortion->MarkSelectionInvalid( mpImpl->mpTextEngine->mpIMEInfos->aPos.GetIndex(), 0 ); + pPortion->MarkSelectionInvalid( mpImpl->mpTextEngine->mpIMEInfos->aPos.GetIndex() ); bool bInsertMode = !mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite; @@ -922,7 +922,7 @@ void TextView::Command( const CommandEvent& rCEvt ) } TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( mpImpl->mpTextEngine->mpIMEInfos->aPos.GetPara() ); - pPPortion->MarkSelectionInvalid( mpImpl->mpTextEngine->mpIMEInfos->aPos.GetIndex(), 0 ); + pPPortion->MarkSelectionInvalid( mpImpl->mpTextEngine->mpIMEInfos->aPos.GetIndex() ); mpImpl->mpTextEngine->FormatAndUpdate( this ); } @@ -1762,17 +1762,13 @@ bool TextView::SetCursorAtPoint( const Point& rPosPixel ) bool TextView::IsSelectionAtPoint( const Point& rPosPixel ) { -// if ( !Rectangle( Point(), mpImpl->mpWindow->GetOutputSizePixel() ).IsInside( rPosPixel ) && !mbInSelection ) -// return false; - Point aDocPos = GetDocPos( rPosPixel ); - TextPaM aPaM = mpImpl->mpTextEngine->GetPaM( aDocPos, false ); + TextPaM aPaM = mpImpl->mpTextEngine->GetPaM( aDocPos ); // For Hyperlinks D&D also start w/o a selection. // BeginDrag is only called, however, if IsSelectionAtPoint() // Problem: IsSelectionAtPoint is not called by Command() // if before MBDown returned false. - return ( IsInSelection( aPaM ) || - ( /* mpImpl->mpSelEngine->IsInCommand() && */ mpImpl->mpTextEngine->FindAttrib( aPaM, TEXTATTR_HYPERLINK ) ) ); + return IsInSelection( aPaM ) || mpImpl->mpTextEngine->FindAttrib( aPaM, TEXTATTR_HYPERLINK ); } bool TextView::IsInSelection( const TextPaM& rPaM ) diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index ff0c32dfa60f..72c2a38f72b3 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -947,7 +947,7 @@ VclMultiLineEdit::VclMultiLineEdit( vcl::Window* pParent, WinBits nWinStyle ) { SetType( WindowType::MULTILINEEDIT ); pImpVclMEdit = new ImpVclMEdit( this, nWinStyle ); - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); pUpdateDataTimer = nullptr; SetCompoundControl( true ); @@ -1034,7 +1034,7 @@ void VclMultiLineEdit::ApplySettings(vcl::RenderContext& rRenderContext) } } -void VclMultiLineEdit::ImplInitSettings(bool /*bFont*/, bool /*bForeground*/, bool bBackground) +void VclMultiLineEdit::ImplInitSettings(bool bBackground) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -1308,7 +1308,7 @@ void VclMultiLineEdit::StateChanged( StateChangedType nType ) if( nType == StateChangedType::Enable ) { pImpVclMEdit->Enable( IsEnabled() ); - ImplInitSettings( true, false, false ); + ImplInitSettings( false ); } else if( nType == StateChangedType::ReadOnly ) { @@ -1317,23 +1317,23 @@ void VclMultiLineEdit::StateChanged( StateChangedType nType ) else if ( nType == StateChangedType::Zoom ) { pImpVclMEdit->GetTextWindow()->SetZoom( GetZoom() ); - ImplInitSettings( true, false, false ); + ImplInitSettings( false ); Resize(); } else if ( nType == StateChangedType::ControlFont ) { - ImplInitSettings( true, false, false ); + ImplInitSettings( false ); Resize(); Invalidate(); } else if ( nType == StateChangedType::ControlForeground ) { - ImplInitSettings( false, true, false ); + ImplInitSettings( false ); Invalidate(); } else if ( nType == StateChangedType::ControlBackground ) { - ImplInitSettings( false, false, true ); + ImplInitSettings( true ); Invalidate(); } else if ( nType == StateChangedType::Style ) @@ -1361,7 +1361,7 @@ void VclMultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) { - ImplInitSettings( true, true, true ); + ImplInitSettings( true ); Resize(); Invalidate(); } @@ -1371,7 +1371,7 @@ void VclMultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt ) void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags ) { - ImplInitSettings(true, true, true); + ImplInitSettings(true); Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); diff --git a/vcl/source/filter/sgfbram.cxx b/vcl/source/filter/sgfbram.cxx index 5f9f6d551847..10bb23b2f886 100644 --- a/vcl/source/filter/sgfbram.cxx +++ b/vcl/source/filter/sgfbram.cxx @@ -185,7 +185,7 @@ sal_uInt8 PcxExpand::GetByte(SvStream& rInp) return Data; } -bool SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&) +bool SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead) { BmpFileHeader aBmpHead; BmpInfoHeader aBmpInfo; @@ -350,7 +350,7 @@ bool SgfBMapFilter(SvStream& rInp, SvStream& rOut) case SgfBitImag0: case SgfBitImag1: case SgfBitImag2: - case SgfBitImgMo: bRet=SgfFilterBMap(rInp,rOut,aHead,aEntr); break; + case SgfBitImgMo: bRet=SgfFilterBMap(rInp,rOut,aHead); break; } } } // while(nNext) @@ -386,7 +386,7 @@ Color Hpgl2SvFarbe( sal_uInt8 nFarb ) return aColor; } -bool SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMtf) +bool SgfFilterVect(SvStream& rInp, SgfHeader& rHead, GDIMetaFile& rMtf) { ScopedVclPtrInstance< VirtualDevice > aOutDev; SgfVector aVect; @@ -468,7 +468,7 @@ bool SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf) ReadSgfEntry( rInp, aEntr ); nNext=aEntr.GetOffset(); if (aEntr.Typ==aHead.Typ) { - bRet=SgfFilterVect(rInp,aHead,aEntr,rMtf); + bRet=SgfFilterVect(rInp,aHead,rMtf); } } // while(nNext) } diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx index 55ebb2ff9853..c7a8576f2890 100644 --- a/vcl/source/filter/sgvmain.cxx +++ b/vcl/source/filter/sgvmain.cxx @@ -859,7 +859,7 @@ void SkipObjkList(SvStream& rInp) } while (aObjk.Next!=0L && !rInp.GetError()); } -bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) +bool SgfFilterSDrw( SvStream& rInp, GDIMetaFile& rMtf ) { bool bRet = false; PageType aPage; @@ -929,7 +929,7 @@ bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, const INetURLObject& _aIni ReadSgfEntry( rInp, aEntr ); nNext=aEntr.GetOffset(); if (aEntr.Typ==aHead.Typ) { - bRet=SgfFilterSDrw( rInp,aHead,aEntr,rMtf ); + bRet=SgfFilterSDrw( rInp,rMtf ); } } // while(nNext) } diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx index 678b6a9bd689..0366ae7728f5 100644 --- a/vcl/source/filter/sgvtext.cxx +++ b/vcl/source/filter/sgvtext.cxx @@ -652,7 +652,6 @@ UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& A void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType& AktAtr, sal_uInt16 UmbWdt, sal_uInt16 AdjWdt, short* Line, sal_uInt16& nChars, - double, double, UCHAR* cLine, bool TextFit) { ScopedVclPtrInstance< VirtualDevice > vOut; @@ -931,7 +930,7 @@ void TextType::Draw(OutputDevice& rOut) do { T2=T1; Index2=Index1; - FormatLine(Buf,Index2,T,T2,xSize,xSAdj,xLine.get(),l,sn,cs,cLine.get(),LineFit); + FormatLine(Buf,Index2,T,T2,xSize,xSAdj,xLine.get(),l,cLine.get(),LineFit); Fehler=(Index2==Index1); if (!Fehler) { lc=GetLineFeed(Buf,Index1,T,T1,l,LF,MaxGrad); diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx index 7950f105ee20..23c0bb3a429d 100644 --- a/vcl/source/filter/wmf/wmfwr.cxx +++ b/vcl/source/filter/wmf/wmfwr.cxx @@ -1627,7 +1627,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) } } -void WMFWriter::WriteHeader( const GDIMetaFile &, bool bPlaceable ) +void WMFWriter::WriteHeader( bool bPlaceable ) { if( bPlaceable ) { @@ -1745,7 +1745,7 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream, CountActionsAndBitmaps(rMTF); - WriteHeader(rMTF,bPlaceable); + WriteHeader(bPlaceable); if( bEmbedEMF ) WriteEmbeddedEMF( rMTF ); WMFRecord_SetWindowOrg(Point(0,0)); diff --git a/vcl/source/filter/wmf/wmfwr.hxx b/vcl/source/filter/wmf/wmfwr.hxx index 8410275c5466..39474c94cc39 100644 --- a/vcl/source/filter/wmf/wmfwr.hxx +++ b/vcl/source/filter/wmf/wmfwr.hxx @@ -184,7 +184,7 @@ private: void HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon); void WriteRecords(const GDIMetaFile & rMTF); - void WriteHeader(const GDIMetaFile & rMTF, bool bPlaceable); + void WriteHeader(bool bPlaceable); void UpdateHeader(); void WriteEmbeddedEMF( const GDIMetaFile& rMTF ); diff --git a/vcl/source/gdi/embeddedfontshelper.cxx b/vcl/source/gdi/embeddedfontshelper.cxx index 8bea667b8c1b..1577ca45e0d4 100644 --- a/vcl/source/gdi/embeddedfontshelper.cxx +++ b/vcl/source/gdi/embeddedfontshelper.cxx @@ -209,7 +209,7 @@ bool EmbeddedFontsHelper::sufficientTTFRights( const void* data, long size, Font } OUString EmbeddedFontsHelper::fontFileUrl( const OUString& familyName, FontFamily family, FontItalic italic, - FontWeight weight, FontPitch pitch, rtl_TextEncoding, FontRights rights ) + FontWeight weight, FontPitch pitch, FontRights rights ) { OUString path = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap") "::UserInstallation}"; rtl::Bootstrap::expandMacros( path ); diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx index f97f4002c871..ccc242061fa4 100644 --- a/vcl/source/gdi/pdfextoutdevdata.cxx +++ b/vcl/source/gdi/pdfextoutdevdata.cxx @@ -404,15 +404,13 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc GfxLinkType eType = rGraphic.GetLink().GetType(); if ( eType == GfxLinkType::NativeJpg && mParaRects.size() >= 2 ) { - mbGroupIgnoreGDIMtfActions = - rOutDevData.HasAdequateCompression( - rGraphic, mParaRects[0], mParaRects[1]); + mbGroupIgnoreGDIMtfActions = rOutDevData.HasAdequateCompression(rGraphic); if ( !mbGroupIgnoreGDIMtfActions ) mCurrentGraphic = rGraphic; } else if ((eType == GfxLinkType::NativePng || eType == GfxLinkType::NativePdf) && mParaRects.size() >= 2) { - if ( rOutDevData.HasAdequateCompression(rGraphic, mParaRects[0], mParaRects[1]) || eType == GfxLinkType::NativePdf ) + if ( rOutDevData.HasAdequateCompression(rGraphic) || eType == GfxLinkType::NativePdf ) mCurrentGraphic = rGraphic; } } @@ -809,9 +807,7 @@ void PDFExtOutDevData::EndGroup( const Graphic& rGraphic, } // Avoids expensive de-compression and re-compression of large images. -bool PDFExtOutDevData::HasAdequateCompression( const Graphic &rGraphic, - const tools::Rectangle & /* rOutputRect */, - const tools::Rectangle & /* rVisibleOutputRect */ ) const +bool PDFExtOutDevData::HasAdequateCompression( const Graphic &rGraphic ) const { bool bReduceResolution = false; diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 491c6adb4c51..bf250518495c 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -8847,8 +8847,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool nEmphYOff, nEmphWidth, nEmphMark, - m_pReferenceDevice->ImplDevicePixelToLogicWidth(nEmphHeight), - m_pReferenceDevice->mpFontInstance->mnOrientation ); + m_pReferenceDevice->ImplDevicePixelToLogicWidth(nEmphHeight) ); if ( bEmphPolyLine ) { setLineColor( m_aCurrentPDFState.m_aFont.GetColor() ); diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 7a30d990ebbd..47825fa5620e 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -523,7 +523,7 @@ bool SalGraphics::DrawPolyLine( const basegfx::B2DPolygon& i_rPolygon, return bRet; } -bool SalGraphics::DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, OutputDevice* ) +bool SalGraphics::DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient ) { return drawGradient( rPolyPoly, rGradient ); } diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 554bec061e50..93e80855901c 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -290,7 +290,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo tools::Rectangle& rRect1, tools::Rectangle& rRect2, long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, - long nHeight, short /*nOrient*/ ) + long nHeight ) { static const PolyFlags aAccentPolyFlags[24] = { @@ -1261,7 +1261,7 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout ) aRect1, aRect2, nEmphasisYOff, nEmphasisWidth, nEmphasisMark, - nEmphasisHeight, mpFontInstance->mnOrientation ); + nEmphasisHeight ); if ( bPolyLine ) { diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx index 24e7e098f2e7..c522a8b0a086 100644 --- a/vcl/source/outdev/gradient.cxx +++ b/vcl/source/outdev/gradient.cxx @@ -109,7 +109,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly, InitClipRegion(); // try to draw gradient natively - bDrawn = mpGraphics->DrawGradient( aClixPolyPoly, aGradient, this ); + bDrawn = mpGraphics->DrawGradient( aClixPolyPoly, aGradient ); if( !bDrawn && !mbOutputClipped ) { diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index bd466a7004a8..ea117be234ac 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -366,7 +366,7 @@ long ImplBorderWindowView::ImplCalcTitleWidth( const ImplBorderFrameData* pData } -ImplNoBorderWindowView::ImplNoBorderWindowView( ImplBorderWindow* ) +ImplNoBorderWindowView::ImplNoBorderWindowView() { } @@ -1698,7 +1698,7 @@ void ImplBorderWindow::Paint( vcl::RenderContext& rRenderContext, const tools::R mpBorderView->DrawWindow(rRenderContext); } -void ImplBorderWindow::Draw( const tools::Rectangle&, OutputDevice* pOutDev, const Point& rPos ) +void ImplBorderWindow::Draw( OutputDevice* pOutDev, const Point& rPos ) { if (mpBorderView) mpBorderView->DrawWindow(*pOutDev, &rPos); @@ -1841,7 +1841,7 @@ void ImplBorderWindow::InitView() if( mbFrameBorder ) mpBorderView = new ImplStdBorderWindowView( this ); else - mpBorderView = new ImplNoBorderWindowView( this ); + mpBorderView = new ImplNoBorderWindowView; } else if ( !mbFrameBorder ) mpBorderView = new ImplSmallBorderWindowView( this ); diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 879526dcaa7f..a9bf23ff1dd6 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -1158,7 +1158,7 @@ void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dra aImplWin->SetDisplayActive( true ); aImplWin->InitView(); - aImplWin->Draw( tools::Rectangle( aPos, aSize ), pDev, aPos ); + aImplWin->Draw( pDev, aPos ); } pDev->Pop(); diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 02606828baa8..538ff1422366 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2627,7 +2627,7 @@ tools::Rectangle MenuBar::GetMenuBarButtonRectPixel( sal_uInt16 nId ) return pMenuWin ? pMenuWin->GetMenuBarButtonRectPixel(nId) : tools::Rectangle(); } -bool MenuBar::HandleMenuButtonEvent( Menu *, sal_uInt16 i_nButtonId ) +bool MenuBar::HandleMenuButtonEvent( sal_uInt16 i_nButtonId ) { MenuBarWindow* pMenuWin = getMenuBarWindow(); return pMenuWin && pMenuWin->HandleMenuButtonEvent(i_nButtonId); diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index dac298bc7c9d..0e70173de74c 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -1300,7 +1300,7 @@ void PrintDialog::updatePrinterText() } } -void PrintDialog::setPreviewText( sal_Int32 ) +void PrintDialog::setPreviewText() { OUString aNewText( searchAndReplace( maPageStr, "%n", 2, OUString::number( mnCachedPages ) ) ); mpNumPagesText->SetText( aNewText ); @@ -1317,7 +1317,7 @@ void PrintDialog::preparePreview( bool i_bNewPage, bool i_bMayUseCache ) if( mnCurPage < 0 ) mnCurPage = 0; - setPreviewText( mnCurPage ); + setPreviewText(); mpPageEdit->SetMin( 1 ); mpPageEdit->SetMax( nPages ); diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index 867a81529ec4..9d1c1a7af795 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -806,7 +806,7 @@ static void ImplCalcSet( ImplSplitSet* pSet, } void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, bool bHide, - bool bRows, bool /*bDown*/ ) + bool bRows ) { size_t nItems = pSet->mpItems.size(); std::vector< ImplSplitItem* >& rItems = pSet->mpItems; @@ -1107,7 +1107,7 @@ static void ImplDrawSplit(vcl::RenderContext& rRenderContext, ImplSplitSet* pSet sal_uInt16 SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos, long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos, - bool bRows, bool /*bDown*/ ) + bool bRows ) { if ( pSet->mpItems.empty() ) return 0; @@ -1241,7 +1241,7 @@ sal_uInt16 SplitWindow::ImplTestSplit( SplitWindow* pWindow, const Point& rPos, } return ImplTestSplit( pWindow->mpMainSet, rPos, rMouseOff, ppFoundSet, rFoundPos, - pWindow->mbHorz, !pWindow->mbBottomRight ); + pWindow->mbHorz ); } void SplitWindow::ImplDrawSplitTracking(const Point& rPos) @@ -1567,7 +1567,7 @@ void SplitWindow::ImplCalcLayout() // calculate sets recursive ImplCalcSet( mpMainSet, nL, nT, nW, nH, mbHorz, !mbBottomRight ); - ImplCalcSet2( this, mpMainSet, false, mbHorz, !mbBottomRight ); + ImplCalcSet2( this, mpMainSet, false, mbHorz ); mbCalc = false; } @@ -1686,7 +1686,7 @@ void SplitWindow::ImplGetFadeInRect( tools::Rectangle& rRect, bool bTest ) const rRect = aRect; } -void SplitWindow::ImplGetFadeOutRect( tools::Rectangle& rRect, bool ) const +void SplitWindow::ImplGetFadeOutRect( tools::Rectangle& rRect ) const { tools::Rectangle aRect; @@ -2050,7 +2050,7 @@ void SplitWindow::MouseButtonDown( const MouseEvent& rMEvt ) mbFadeNoButtonMode = false; - ImplGetFadeOutRect( aTestRect, true ); + ImplGetFadeOutRect( aTestRect ); if ( aTestRect.IsInside( aMousePosPixel ) ) { mbFadeOutDown = true; @@ -2159,7 +2159,7 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) else { tools::Rectangle aTestRect; - ImplGetFadeOutRect( aTestRect, true ); + ImplGetFadeOutRect( aTestRect ); bool bNewPressed = aTestRect.IsInside( aMousePosPixel ); if ( !bNewPressed ) { @@ -2335,7 +2335,7 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt ) nHelpResId = SV_HELPTEXT_FADEIN; else { - ImplGetFadeOutRect( aHelpRect, true ); + ImplGetFadeOutRect( aHelpRect ); if ( aHelpRect.IsInside( aMousePosPixel ) ) nHelpResId = SV_HELPTEXT_FADEOUT; } diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx index 9c24cf3c3358..9a975910eaa8 100644 --- a/vcl/source/window/syschild.cxx +++ b/vcl/source/window/syschild.cxx @@ -47,8 +47,7 @@ using namespace ::com::sun::star; -long ImplSysChildProc( void* pInst, SalObject* /* pObject */, - SalObjEvent nEvent, const void* /* pEvent */ ) +long ImplSysChildProc( void* pInst, SalObjEvent nEvent ) { VclPtr pWindow = static_cast(pInst); long nRet = 0; diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index ae8382beeab4..e6374e65f93b 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -304,7 +304,7 @@ void ToolBox::ImplDrawGrip(vcl::RenderContext& rRenderContext) } } -void ToolBox::ImplDrawGradientBackground(vcl::RenderContext& rRenderContext, ImplDockingWindowWrapper*) +void ToolBox::ImplDrawGradientBackground(vcl::RenderContext& rRenderContext) { // draw a nice gradient @@ -429,7 +429,7 @@ void ToolBox::ImplDrawGradientBackground(vcl::RenderContext& rRenderContext, Imp } -bool ToolBox::ImplDrawNativeBackground(vcl::RenderContext& rRenderContext, const vcl::Region& /*rRegion*/) +bool ToolBox::ImplDrawNativeBackground(vcl::RenderContext& rRenderContext) { // use NWF Point aPt; @@ -440,7 +440,7 @@ bool ToolBox::ImplDrawNativeBackground(vcl::RenderContext& rRenderContext, const aCtrlRegion, nState, ImplControlValue(), OUString() ); } -void ToolBox::ImplDrawTransparentBackground(vcl::RenderContext& /*rRenderContext*/, const vcl::Region &rRegion) +void ToolBox::ImplDrawTransparentBackground(const vcl::Region &rRegion) { // just invalidate to trigger paint of the parent const bool bOldPaintLock = mpData->mbIsPaintLocked; @@ -490,9 +490,9 @@ void ToolBox::ImplDrawBackground(vcl::RenderContext& rRenderContext, const tools { // no gradient for ordinary toolbars (not dockable) if( !IsBackground() && !IsInPaint() ) - ImplDrawTransparentBackground(rRenderContext, aPaintRegion); + ImplDrawTransparentBackground(aPaintRegion); else - ImplDrawConstantBackground(rRenderContext, aPaintRegion, bIsInPopupMode); + ImplDrawConstantBackground(rRenderContext, aPaintRegion, bIsInPopupMode); } else { @@ -501,7 +501,7 @@ void ToolBox::ImplDrawBackground(vcl::RenderContext& rRenderContext, const tools // so NWF is used here for floating toolbars only bool bNativeOk = false; if( ImplIsFloatingMode() && rRenderContext.IsNativeControlSupported( ControlType::Toolbar, ControlPart::Entire) ) - bNativeOk = ImplDrawNativeBackground(rRenderContext, aPaintRegion); + bNativeOk = ImplDrawNativeBackground(rRenderContext); if (!bNativeOk) { const StyleSettings rSetting = Application::GetSettings().GetStyleSettings(); @@ -510,10 +510,10 @@ void ToolBox::ImplDrawBackground(vcl::RenderContext& rRenderContext, const tools if (!IsBackground() || isHeader || isFooter) { if (!IsInPaint()) - ImplDrawTransparentBackground(rRenderContext, aPaintRegion); + ImplDrawTransparentBackground(aPaintRegion); } else - ImplDrawGradientBackground(rRenderContext, pWrapper); + ImplDrawGradientBackground(rRenderContext); } } diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 17ada9bc8752..2b7f3be487f6 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -1212,7 +1212,7 @@ static bool ImplHandleExtTextInput( vcl::Window* pWindow, return !ImplCallCommand( pChild, CommandEventId::ExtTextInput, &aData ); } -static bool ImplHandleEndExtTextInput( vcl::Window* /* pWindow */ ) +static bool ImplHandleEndExtTextInput() { ImplSVData* pSVData = ImplGetSVData(); vcl::Window* pChild = pSVData->maWinData.mpExtTextInputWin; @@ -2056,7 +2056,7 @@ static bool ImplHandleMenuEvent( vcl::Window* pWindow, SalMenuEvent* pEvent, Sal bRet = pMenuBar->HandleMenuHighlightEvent( static_cast(pEvent->mpMenu), pEvent->mnId ); break; case SalEvent::MenuButtonCommand: - bRet = pMenuBar->HandleMenuButtonEvent( static_cast(pEvent->mpMenu), pEvent->mnId ); + bRet = pMenuBar->HandleMenuButtonEvent( pEvent->mnId ); break; case SalEvent::MenuCommand: bRet = pMenuBar->HandleMenuCommandEvent( static_cast(pEvent->mpMenu), pEvent->mnId ); @@ -2513,7 +2513,7 @@ bool ImplWindowFrameProc( vcl::Window* _pWindow, SalEvent nEvent, const void* pE } break; case SalEvent::EndExtTextInput: - bRet = ImplHandleEndExtTextInput( pWindow ); + bRet = ImplHandleEndExtTextInput(); break; case SalEvent::ExtTextInputPos: ImplHandleSalExtTextInputPos( pWindow, const_cast(static_cast(pEvent)) ); diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx index 80c0726214c9..ab6460c53334 100644 --- a/vcl/unx/generic/window/salobj.cxx +++ b/vcl/unx/generic/window/salobj.cxx @@ -457,13 +457,13 @@ bool X11SalObject::Dispatch( XEvent* pEvent ) pObject->mbVisible = true; return true; case ButtonPress: - pObject->CallCallback( SalObjEvent::ToTop, nullptr ); + pObject->CallCallback( SalObjEvent::ToTop ); return true; case FocusIn: - pObject->CallCallback( SalObjEvent::GetFocus, nullptr ); + pObject->CallCallback( SalObjEvent::GetFocus ); return true; case FocusOut: - pObject->CallCallback( SalObjEvent::LoseFocus, nullptr ); + pObject->CallCallback( SalObjEvent::LoseFocus ); return true; default: break; } diff --git a/vcl/unx/gtk/gtkobject.cxx b/vcl/unx/gtk/gtkobject.cxx index 0717ffe8b8c2..f7c14d08bb9f 100644 --- a/vcl/unx/gtk/gtkobject.cxx +++ b/vcl/unx/gtk/gtkobject.cxx @@ -159,7 +159,7 @@ gboolean GtkSalObject::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointe if( pEvent->type == GDK_BUTTON_PRESS ) { - pThis->CallCallback( SalObjEvent::ToTop, nullptr ); + pThis->CallCallback( SalObjEvent::ToTop ); } return FALSE; @@ -169,7 +169,7 @@ gboolean GtkSalObject::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer { GtkSalObject* pThis = static_cast(object); - pThis->CallCallback( pEvent->in ? SalObjEvent::GetFocus : SalObjEvent::LoseFocus, nullptr ); + pThis->CallCallback( pEvent->in ? SalObjEvent::GetFocus : SalObjEvent::LoseFocus ); return FALSE; } diff --git a/vcl/unx/gtk3/gtk3gtkobject.cxx b/vcl/unx/gtk3/gtk3gtkobject.cxx index 4a8d0fdc28f3..a03ec854f05c 100644 --- a/vcl/unx/gtk3/gtk3gtkobject.cxx +++ b/vcl/unx/gtk3/gtk3gtkobject.cxx @@ -163,7 +163,7 @@ gboolean GtkSalObject::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointe if( pEvent->type == GDK_BUTTON_PRESS ) { - pThis->CallCallback( SalObjEvent::ToTop, nullptr ); + pThis->CallCallback( SalObjEvent::ToTop ); } return FALSE; @@ -173,7 +173,7 @@ gboolean GtkSalObject::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer { GtkSalObject* pThis = static_cast(object); - pThis->CallCallback( pEvent->in ? SalObjEvent::GetFocus : SalObjEvent::LoseFocus, nullptr ); + pThis->CallCallback( pEvent->in ? SalObjEvent::GetFocus : SalObjEvent::LoseFocus ); return FALSE; } diff --git a/vcl/win/window/salobj.cxx b/vcl/win/window/salobj.cxx index e7511d5eaf53..8ec1cd42770f 100644 --- a/vcl/win/window/salobj.cxx +++ b/vcl/win/window/salobj.cxx @@ -108,7 +108,7 @@ LRESULT CALLBACK SalSysMsgProc( int nCode, WPARAM wParam, LPARAM lParam ) pObject->mhLastFocusWnd = pData->hwnd; if ( ImplSalYieldMutexTryToAcquire() ) { - pObject->CallCallback( SalObjEvent::GetFocus, nullptr ); + pObject->CallCallback( SalObjEvent::GetFocus ); ImplSalYieldMutexRelease(); } else @@ -128,7 +128,7 @@ LRESULT CALLBACK SalSysMsgProc( int nCode, WPARAM wParam, LPARAM lParam ) { if ( ImplSalYieldMutexTryToAcquire() ) { - pObject->CallCallback( SalObjEvent::LoseFocus, nullptr ); + pObject->CallCallback( SalObjEvent::LoseFocus ); ImplSalYieldMutexRelease(); } else @@ -286,7 +286,7 @@ LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l ImplSalYieldMutexAcquireWithWait(); pSysObj = GetSalObjWindowPtr( hWnd ); if ( pSysObj && !pSysObj->IsMouseTransparent() ) - pSysObj->CallCallback( SalObjEvent::ToTop, nullptr ); + pSysObj->CallCallback( SalObjEvent::ToTop ); ImplSalYieldMutexRelease(); } } @@ -309,7 +309,7 @@ LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l if ( ImplSalYieldMutexTryToAcquire() ) { pSysObj = GetSalObjWindowPtr( hWnd ); - pSysObj->CallCallback( SalObjEvent::ToTop, nullptr ); + pSysObj->CallCallback( SalObjEvent::ToTop ); ImplSalYieldMutexRelease(); rDef = FALSE; } @@ -330,7 +330,7 @@ LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l nEvent = SalObjEvent::GetFocus; else nEvent = SalObjEvent::LoseFocus; - pSysObj->CallCallback( nEvent, nullptr ); + pSysObj->CallCallback( nEvent ); ImplSalYieldMutexRelease(); } else -- cgit