Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
1ea153bb
Kaydet (Commit)
1ea153bb
authored
Agu 29, 2015
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use better/auto int types, remove a couple of OUStrings copies
Change-Id: I911742bddba1dac2641d7d2ac1dad0ed195474dd
üst
58cfb9b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
vclxwindows.cxx
toolkit/source/awt/vclxwindows.cxx
+20
-20
No files found.
toolkit/source/awt/vclxwindows.cxx
Dosyayı görüntüle @
1ea153bb
...
@@ -1581,7 +1581,7 @@ void VCLXListBox::removeItems( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::s
...
@@ -1581,7 +1581,7 @@ void VCLXListBox::removeItems( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::s
VclPtr< ListBox > pBox = GetAs< ListBox >();
VclPtr< ListBox > pBox = GetAs< ListBox >();
if ( pBox )
if ( pBox )
{
{
for ( sal_
u
Int16 n = nCount; n; )
for ( sal_Int16 n = nCount; n; )
pBox->RemoveEntry( nPos + (--n) );
pBox->RemoveEntry( nPos + (--n) );
}
}
}
}
...
@@ -1613,12 +1613,12 @@ OUString VCLXListBox::getItem( sal_Int16 nPos ) throw(::com::sun::star::uno::Run
...
@@ -1613,12 +1613,12 @@ OUString VCLXListBox::getItem( sal_Int16 nPos ) throw(::com::sun::star::uno::Run
VclPtr< ListBox > pBox = GetAs< ListBox >();
VclPtr< ListBox > pBox = GetAs< ListBox >();
if ( pBox )
if ( pBox )
{
{
sal_uInt16 nEntries
= pBox->GetEntryCount();
auto n
= pBox->GetEntryCount();
aSeq = ::com::sun::star::uno::Sequence< OUString>( n
Entries
);
aSeq = ::com::sun::star::uno::Sequence< OUString>( n );
for ( sal_uInt16 n = nEntries; n;
)
while (n
)
{
{
--n;
--n;
aSeq.getArray()[n] =
OUString( pBox->GetEntry( n )
);
aSeq.getArray()[n] =
pBox->GetEntry( n
);
}
}
}
}
return aSeq;
return aSeq;
...
@@ -1639,9 +1639,9 @@ sal_Int16 VCLXListBox::getSelectedItemPos() throw(::com::sun::star::uno::Runtime
...
@@ -1639,9 +1639,9 @@ sal_Int16 VCLXListBox::getSelectedItemPos() throw(::com::sun::star::uno::Runtime
VclPtr< ListBox > pBox = GetAs< ListBox >();
VclPtr< ListBox > pBox = GetAs< ListBox >();
if ( pBox )
if ( pBox )
{
{
sal_uInt16
nSelEntries = pBox->GetSelectEntryCount();
const sal_Int32
nSelEntries = pBox->GetSelectEntryCount();
aSeq = ::com::sun::star::uno::Sequence<sal_Int16>( nSelEntries );
aSeq = ::com::sun::star::uno::Sequence<sal_Int16>( nSelEntries );
for ( sal_
uInt16 n = 0; n < nSelEntries; n++
)
for ( sal_
Int32 n = 0; n < nSelEntries; ++n
)
aSeq.getArray()[n] = pBox->GetSelectEntryPos( n );
aSeq.getArray()[n] = pBox->GetSelectEntryPos( n );
}
}
return aSeq;
return aSeq;
...
@@ -1666,10 +1666,10 @@ OUString VCLXListBox::getSelectedItem() throw(::com::sun::star::uno::RuntimeExce
...
@@ -1666,10 +1666,10 @@ OUString VCLXListBox::getSelectedItem() throw(::com::sun::star::uno::RuntimeExce
VclPtr< ListBox > pBox = GetAs< ListBox >();
VclPtr< ListBox > pBox = GetAs< ListBox >();
if ( pBox )
if ( pBox )
{
{
sal_uInt16
nSelEntries = pBox->GetSelectEntryCount();
const sal_Int32
nSelEntries = pBox->GetSelectEntryCount();
aSeq = ::com::sun::star::uno::Sequence< OUString>( nSelEntries );
aSeq = ::com::sun::star::uno::Sequence< OUString>( nSelEntries );
for ( sal_
uInt16 n = 0; n < nSelEntries; n++
)
for ( sal_
Int32 n = 0; n < nSelEntries; ++n
)
aSeq.getArray()[n] =
OUString( pBox->GetSelectEntry( n )
);
aSeq.getArray()[n] =
pBox->GetSelectEntry( n
);
}
}
return aSeq;
return aSeq;
}
}
...
@@ -1701,9 +1701,9 @@ void VCLXListBox::selectItemsPos( const ::com::sun::star::uno::Sequence<sal_Int1
...
@@ -1701,9 +1701,9 @@ void VCLXListBox::selectItemsPos( const ::com::sun::star::uno::Sequence<sal_Int1
if ( pBox )
if ( pBox )
{
{
bool bChanged = false;
bool bChanged = false;
for (
sal_uInt16 n = (sal_uInt16)
aPositions.getLength(); n; )
for (
auto n =
aPositions.getLength(); n; )
{
{
sal_uInt16 nPos = (sal_uInt16)
aPositions.getConstArray()[--n];
const auto nPos =
aPositions.getConstArray()[--n];
if ( pBox->IsEntryPosSelected( nPos ) != bool(bSelect) )
if ( pBox->IsEntryPosSelected( nPos ) != bool(bSelect) )
{
{
pBox->SelectEntryPos( nPos, bSelect );
pBox->SelectEntryPos( nPos, bSelect );
...
@@ -1891,7 +1891,7 @@ void VCLXListBox::setProperty( const OUString& PropertyName, const ::com::sun::s
...
@@ -1891,7 +1891,7 @@ void VCLXListBox::setProperty( const OUString& PropertyName, const ::com::sun::s
::com::sun::star::uno::Sequence<sal_Int16> aItems;
::com::sun::star::uno::Sequence<sal_Int16> aItems;
if ( Value >>= aItems )
if ( Value >>= aItems )
{
{
for (
sal_uInt16
n = pListBox->GetEntryCount(); n; )
for (
auto
n = pListBox->GetEntryCount(); n; )
pListBox->SelectEntryPos( --n, false );
pListBox->SelectEntryPos( --n, false );
if ( aItems.getLength() )
if ( aItems.getLength() )
...
@@ -1947,10 +1947,10 @@ void VCLXListBox::setProperty( const OUString& PropertyName, const ::com::sun::s
...
@@ -1947,10 +1947,10 @@ void VCLXListBox::setProperty( const OUString& PropertyName, const ::com::sun::s
break;
break;
case BASEPROPERTY_STRINGITEMLIST:
case BASEPROPERTY_STRINGITEMLIST:
{
{
sal_uInt16
nItems = pListBox->GetEntryCount();
const sal_Int32
nItems = pListBox->GetEntryCount();
::com::sun::star::uno::Sequence< OUString> aSeq( nItems );
::com::sun::star::uno::Sequence< OUString> aSeq( nItems );
OUString* pStrings = aSeq.getArray();
OUString* pStrings = aSeq.getArray();
for ( sal_
uInt16 n = 0; n < nItems; n++
)
for ( sal_
Int32 n = 0; n < nItems; ++n
)
pStrings[n] = pListBox->GetEntry( n );
pStrings[n] = pListBox->GetEntry( n );
aProp <<= aSeq;
aProp <<= aSeq;
...
@@ -4288,9 +4288,9 @@ OUString VCLXComboBox::getItem( sal_Int16 nPos ) throw(::com::sun::star::uno::Ru
...
@@ -4288,9 +4288,9 @@ OUString VCLXComboBox::getItem( sal_Int16 nPos ) throw(::com::sun::star::uno::Ru
VclPtr< ComboBox > pBox = GetAs< ComboBox >();
VclPtr< ComboBox > pBox = GetAs< ComboBox >();
if ( pBox )
if ( pBox )
{
{
sal_uInt16 nEntries
= pBox->GetEntryCount();
auto n
= pBox->GetEntryCount();
aSeq = ::com::sun::star::uno::Sequence< OUString>( n
Entries
);
aSeq = ::com::sun::star::uno::Sequence< OUString>( n );
for ( sal_uInt16 n = nEntries; n;
)
while ( n
)
{
{
--n;
--n;
aSeq.getArray()[n] = pBox->GetEntry( n );
aSeq.getArray()[n] = pBox->GetEntry( n );
...
@@ -4398,10 +4398,10 @@ void VCLXComboBox::setProperty( const OUString& PropertyName, const ::com::sun::
...
@@ -4398,10 +4398,10 @@ void VCLXComboBox::setProperty( const OUString& PropertyName, const ::com::sun::
break;
break;
case BASEPROPERTY_STRINGITEMLIST:
case BASEPROPERTY_STRINGITEMLIST:
{
{
sal_uInt16
nItems = pComboBox->GetEntryCount();
const sal_Int32
nItems = pComboBox->GetEntryCount();
::com::sun::star::uno::Sequence< OUString> aSeq( nItems );
::com::sun::star::uno::Sequence< OUString> aSeq( nItems );
OUString* pStrings = aSeq.getArray();
OUString* pStrings = aSeq.getArray();
for ( sal_
uInt16 n = 0; n < nItems; n++
)
for ( sal_
Int32 n = 0; n < nItems; ++n
)
pStrings[n] = pComboBox->GetEntry( n );
pStrings[n] = pComboBox->GetEntry( n );
aProp <<= aSeq;
aProp <<= aSeq;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment