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
2ebfe6fd
Kaydet (Commit)
2ebfe6fd
authored
Nis 25, 2012
tarafından
Noel Grandin
Kaydeden (comit)
Michael Stahl
Nis 25, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert SV_DECL_PTRARR_DEL(SwEntryLst) to boost::ptr_vector
üst
362b4e9b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
15 deletions
+14
-15
swlbox.cxx
sw/source/ui/cctrl/swlbox.cxx
+12
-14
swlbox.hxx
sw/source/ui/inc/swlbox.hxx
+2
-1
No files found.
sw/source/ui/cctrl/swlbox.cxx
Dosyayı görüntüle @
2ebfe6fd
...
...
@@ -36,8 +36,6 @@
using
namespace
nsSwComboBoxStyle
;
SV_IMPL_PTRARR
(
SwEntryLst
,
SwBoxEntry
*
)
// Description: ListboxElement
SwBoxEntry
::
SwBoxEntry
()
:
bModified
(
sal_False
),
...
...
@@ -70,8 +68,8 @@ SwComboBox::SwComboBox(Window* pParent, const ResId& rId, sal_uInt16 nStyleBits
sal_uInt16
nSize
=
GetEntryCount
();
for
(
sal_uInt16
i
=
0
;
i
<
nSize
;
++
i
)
{
const
SwBoxEntry
*
pTmp
=
new
SwBoxEntry
(
ComboBox
::
GetEntry
(
i
),
i
);
aEntryLst
.
Insert
(
pTmp
,
aEntryLst
.
Count
()
);
SwBoxEntry
*
pTmp
=
new
SwBoxEntry
(
ComboBox
::
GetEntry
(
i
),
i
);
aEntryLst
.
push_back
(
pTmp
);
}
}
...
...
@@ -87,12 +85,12 @@ void SwComboBox::InsertEntry(const SwBoxEntry& rEntry)
void
SwComboBox
::
RemoveEntry
(
sal_uInt16
nPos
)
{
if
(
nPos
>=
aEntryLst
.
Count
())
if
(
nPos
>=
aEntryLst
.
size
())
return
;
// Remove old element
SwBoxEntry
*
pEntry
=
aEntryLst
[
nPos
];
aEntryLst
.
Remove
(
nPos
,
1
);
SwBoxEntry
*
pEntry
=
&
aEntryLst
[
nPos
];
aEntryLst
.
erase
(
aEntryLst
.
begin
()
+
nPos
);
ComboBox
::
RemoveEntry
(
nPos
);
// Don't add new entries to the list
...
...
@@ -100,7 +98,7 @@ void SwComboBox::RemoveEntry(sal_uInt16 nPos)
return
;
// add to DelEntryLst
aDelEntryLst
.
C40_INSERT
(
SwBoxEntry
,
pEntry
,
aDelEntryLst
.
Count
()
);
aDelEntryLst
.
push_back
(
pEntry
);
}
sal_uInt16
SwComboBox
::
GetEntryPos
(
const
SwBoxEntry
&
rEntry
)
const
...
...
@@ -110,21 +108,21 @@ sal_uInt16 SwComboBox::GetEntryPos(const SwBoxEntry& rEntry) const
const
SwBoxEntry
&
SwComboBox
::
GetEntry
(
sal_uInt16
nPos
)
const
{
if
(
nPos
<
aEntryLst
.
Count
())
return
*
aEntryLst
[
nPos
];
if
(
nPos
<
aEntryLst
.
size
())
return
aEntryLst
[
nPos
];
return
aDefault
;
}
sal_uInt16
SwComboBox
::
GetRemovedCount
()
const
{
return
aDelEntryLst
.
Count
();
return
aDelEntryLst
.
size
();
}
const
SwBoxEntry
&
SwComboBox
::
GetRemovedEntry
(
sal_uInt16
nPos
)
const
{
if
(
nPos
<
aDelEntryLst
.
Count
())
return
*
aDelEntryLst
[
nPos
];
if
(
nPos
<
aDelEntryLst
.
size
())
return
aDelEntryLst
[
nPos
];
return
aDefault
;
}
...
...
@@ -133,7 +131,7 @@ void SwComboBox::InsertSorted(SwBoxEntry* pEntry)
{
ComboBox
::
InsertEntry
(
pEntry
->
aName
);
sal_uInt16
nPos
=
ComboBox
::
GetEntryPos
(
pEntry
->
aName
);
aEntryLst
.
C40_INSERT
(
SwBoxEntry
,
pEntry
,
nPos
);
aEntryLst
.
insert
(
aEntryLst
.
begin
()
+
nPos
,
pEntry
);
}
void
SwComboBox
::
KeyInput
(
const
KeyEvent
&
rKEvt
)
...
...
sw/source/ui/inc/swlbox.hxx
Dosyayı görüntüle @
2ebfe6fd
...
...
@@ -34,11 +34,12 @@
#include <vcl/combobox.hxx>
#include "swdllapi.h"
#include <boost/ptr_container/ptr_vector.hpp>
class
SwBoxEntry
;
class
Window
;
SV_DECL_PTRARR_DEL
(
SwEntryLst
,
SwBoxEntry
*
,
10
)
typedef
boost
::
ptr_vector
<
SwBoxEntry
>
SwEntryLst
;
/*--------------------------------------------------------------------
Description: SwBoxEntry
...
...
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