summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-08-07 22:09:06 +0200
committerMichael Stahl <mstahl@redhat.com>2013-08-08 23:25:28 +0200
commit03eb15938e04a8a28fc08ca7528b2f7068fe1c7a (patch)
tree64a56e0d605757410bed25ad88735f5ac4339e73 /toolkit
parentaf2d474ff9a91645043c1d4292891c313cceef5e (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 'toolkit')
-rw-r--r--toolkit/source/awt/vclxwindows.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 079b994e689b..3f72467606a3 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -4283,7 +4283,7 @@ void VCLXComboBox::removeItems( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::
if ( pBox )
{
for ( sal_uInt16 n = nCount; n; )
- pBox->RemoveEntry( nPos + (--n) );
+ pBox->RemoveEntryAt( nPos + (--n) );
}
}
@@ -4553,7 +4553,7 @@ void SAL_CALL VCLXComboBox::listItemInserted( const ItemListEvent& i_rEvent ) th
ENSURE_OR_RETURN_VOID( pComboBox, "VCLXComboBox::listItemInserted: no ComboBox?!" );
ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition <= sal_Int32( pComboBox->GetEntryCount() ) ),
"VCLXComboBox::listItemInserted: illegal (inconsistent) item position!" );
- pComboBox->InsertEntry(
+ pComboBox->InsertEntryWithImage(
i_rEvent.ItemText.IsPresent ? i_rEvent.ItemText.Value : OUString(),
i_rEvent.ItemImageURL.IsPresent ? lcl_getImageFromURL( i_rEvent.ItemImageURL.Value ) : Image(),
i_rEvent.ItemPosition );
@@ -4569,7 +4569,7 @@ void SAL_CALL VCLXComboBox::listItemRemoved( const ItemListEvent& i_rEvent ) thr
ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition < sal_Int32( pComboBox->GetEntryCount() ) ),
"VCLXComboBox::listItemRemoved: illegal (inconsistent) item position!" );
- pComboBox->RemoveEntry( i_rEvent.ItemPosition );
+ pComboBox->RemoveEntryAt( i_rEvent.ItemPosition );
}
void SAL_CALL VCLXComboBox::listItemModified( const ItemListEvent& i_rEvent ) throw (RuntimeException)
@@ -4587,8 +4587,8 @@ void SAL_CALL VCLXComboBox::listItemModified( const ItemListEvent& i_rEvent ) th
const OUString sNewText = i_rEvent.ItemText.IsPresent ? i_rEvent.ItemText.Value : OUString( pComboBox->GetEntry( i_rEvent.ItemPosition ) );
const Image aNewImage( i_rEvent.ItemImageURL.IsPresent ? lcl_getImageFromURL( i_rEvent.ItemImageURL.Value ) : pComboBox->GetEntryImage( i_rEvent.ItemPosition ) );
- pComboBox->RemoveEntry( i_rEvent.ItemPosition );
- pComboBox->InsertEntry( sNewText, aNewImage, i_rEvent.ItemPosition );
+ pComboBox->RemoveEntryAt( i_rEvent.ItemPosition );
+ pComboBox->InsertEntryWithImage(sNewText, aNewImage, i_rEvent.ItemPosition);
}
void SAL_CALL VCLXComboBox::allItemsRemoved( const EventObject& i_rEvent ) throw (RuntimeException)
@@ -4634,7 +4634,8 @@ void SAL_CALL VCLXComboBox::itemListChanged( const EventObject& i_rEvent ) throw
{
aLocalizationKey = xStringResourceResolver->resolveString(aLocalizationKey.copy( 1 ));
}
- pComboBox->InsertEntry( aLocalizationKey, lcl_getImageFromURL( aItems[i].Second ) );
+ pComboBox->InsertEntryWithImage(aLocalizationKey,
+ lcl_getImageFromURL(aItems[i].Second));
}
}
void SAL_CALL VCLXComboBox::disposing( const EventObject& i_rEvent ) throw (RuntimeException)