diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-08-07 22:09:06 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-08-08 23:25:28 +0200 |
commit | 03eb15938e04a8a28fc08ca7528b2f7068fe1c7a (patch) | |
tree | 64a56e0d605757410bed25ad88735f5ac4339e73 /vcl/source/control | |
parent | af2d474ff9a91645043c1d4292891c313cceef5e (diff) |
vcl, sw: fix the inheritance of SwComboBox from ComboBox a bit
Remove the silly overloading, and introduce virtual methods.
Change-Id: If54a6a3fb7464283f80d3387ae23db234690f8a3
Diffstat (limited to 'vcl/source/control')
-rw-r--r-- | vcl/source/control/combobox.cxx | 10 | ||||
-rw-r--r-- | vcl/source/control/field.cxx | 8 | ||||
-rw-r--r-- | vcl/source/control/field2.cxx | 6 | ||||
-rw-r--r-- | vcl/source/control/longcurr.cxx | 2 |
4 files changed, 13 insertions, 13 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 77735c83bf48..b46213d0f1ec 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -921,7 +921,7 @@ void ComboBox::ImplUpdateFloatSelection() // ----------------------------------------------------------------------- -sal_uInt16 ComboBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos ) +sal_uInt16 ComboBox::InsertEntry(const OUString& rStr, sal_uInt16 const nPos) { sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr ); nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount()); @@ -931,24 +931,24 @@ sal_uInt16 ComboBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos ) // ----------------------------------------------------------------------- -sal_uInt16 ComboBox::InsertEntry( const OUString& rStr, const Image& rImage, sal_uInt16 nPos ) +void ComboBox::InsertEntryWithImage( + const OUString& rStr, const Image& rImage, sal_uInt16 const nPos) { sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr, rImage ); nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount()); CallEventListeners( VCLEVENT_COMBOBOX_ITEMADDED, (void*) sal_IntPtr(nRealPos) ); - return nRealPos; } // ----------------------------------------------------------------------- void ComboBox::RemoveEntry( const OUString& rStr ) { - RemoveEntry( GetEntryPos( rStr ) ); + RemoveEntryAt(GetEntryPos(rStr)); } // ----------------------------------------------------------------------- -void ComboBox::RemoveEntry( sal_uInt16 nPos ) +void ComboBox::RemoveEntryAt(sal_uInt16 const nPos) { mpImplLB->RemoveEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() ); CallEventListeners( VCLEVENT_COMBOBOX_ITEMREMOVED, (void*) sal_IntPtr(nPos) ); diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 32fda191be43..d7f35318fe48 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -283,7 +283,7 @@ static void ImplUpdateSeparators( const String& rOldDecSep, const String& rNewDe aText = pCombo->GetEntry( i ); void* pEntryData = pCombo->GetEntryData( i ); ImplUpdateSeparatorString( aText, rOldDecSep, rNewDecSep, rOldThSep, rNewThSep ); - pCombo->RemoveEntry( i ); + pCombo->RemoveEntryAt(i); pCombo->InsertEntry( aText, i ); pCombo->SetEntryData( i, pEntryData ); } @@ -1089,7 +1089,7 @@ void NumericBox::ReformatAll() for ( sal_uInt16 i=0; i < nEntryCount; i++ ) { ImplNumericReformat( GetEntry( i ), nValue, aStr ); - RemoveEntry( i ); + RemoveEntryAt(i); InsertEntry( aStr, i ); } NumericFormatter::Reformat(); @@ -2026,7 +2026,7 @@ void MetricBox::ReformatAll() for ( sal_uInt16 i=0; i < nEntryCount; i++ ) { ImplMetricReformat( GetEntry( i ), nValue, aStr ); - RemoveEntry( i ); + RemoveEntryAt(i); InsertEntry( aStr, i ); } MetricFormatter::Reformat(); @@ -2409,7 +2409,7 @@ void CurrencyBox::ReformatAll() for ( sal_uInt16 i=0; i < nEntryCount; i++ ) { ImplCurrencyReformat( GetEntry( i ), aStr ); - RemoveEntry( i ); + RemoveEntryAt(i); InsertEntry( aStr, i ); } CurrencyFormatter::Reformat(); diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index a7f2c444a3fe..7891e63f5917 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -983,7 +983,7 @@ void PatternBox::ReformatAll() for ( sal_uInt16 i=0; i < nEntryCount; i++ ) { aStr = ImplPatternReformat( GetEntry( i ), GetEditMask(), GetLiteralMask(), GetFormatFlags() ); - RemoveEntry( i ); + RemoveEntryAt(i); InsertEntry( aStr, i ); } PatternFormatter::Reformat(); @@ -2157,7 +2157,7 @@ void DateBox::ReformatAll() for ( sal_uInt16 i=0; i < nEntryCount; i++ ) { ImplDateReformat( GetEntry( i ), aStr, GetFieldSettings() ); - RemoveEntry( i ); + RemoveEntryAt(i); InsertEntry( aStr, i ); } DateFormatter::Reformat(); @@ -3155,7 +3155,7 @@ void TimeBox::ReformatAll() for ( sal_uInt16 i=0; i < nEntryCount; i++ ) { ImplTimeReformat( GetEntry( i ), aStr ); - RemoveEntry( i ); + RemoveEntryAt(i); InsertEntry( aStr, i ); } TimeFormatter::Reformat(); diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx index 14ace596fd02..f944fb2b5ec7 100644 --- a/vcl/source/control/longcurr.cxx +++ b/vcl/source/control/longcurr.cxx @@ -598,7 +598,7 @@ void LongCurrencyBox::ReformatAll() ImplLongCurrencyReformat( GetEntry( i ), mnMin, mnMax, GetDecimalDigits(), GetLocaleDataWrapper(), aStr, *this ); - RemoveEntry( i ); + RemoveEntryAt(i); InsertEntry( aStr, i ); } LongCurrencyFormatter::Reformat(); |