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
24181bfb
Kaydet (Commit)
24181bfb
authored
May 14, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert LISTBOX_ENTRY_FLAG constants to scoped enum
Change-Id: Id7ca4853094c214b464e2dee53b10558f1f5a3ba
üst
08a2c851
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
50 additions
and
41 deletions
+50
-41
SpellDialog.cxx
cui/source/dialogs/SpellDialog.cxx
+1
-1
numfmt.cxx
cui/source/tabpages/numfmt.cxx
+2
-2
lstbox.h
include/vcl/lstbox.h
+13
-4
lstbox.hxx
include/vcl/lstbox.hxx
+6
-6
CustomAnimationCreateDialog.cxx
sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+2
-2
ilstbox.hxx
vcl/inc/ilstbox.hxx
+9
-9
ilstbox.cxx
vcl/source/control/ilstbox.cxx
+14
-14
lstbox.cxx
vcl/source/control/lstbox.cxx
+2
-2
tabctrl.cxx
vcl/source/control/tabctrl.cxx
+1
-1
No files found.
cui/source/dialogs/SpellDialog.cxx
Dosyayı görüntüle @
24181bfb
...
@@ -359,7 +359,7 @@ void SpellDialog::UpdateBoxes_Impl()
...
@@ -359,7 +359,7 @@ void SpellDialog::UpdateBoxes_Impl()
if
(
LISTBOX_ENTRY_NOTFOUND
==
m_pSuggestionLB
->
GetEntryPos
(
aTmp
)
)
if
(
LISTBOX_ENTRY_NOTFOUND
==
m_pSuggestionLB
->
GetEntryPos
(
aTmp
)
)
{
{
m_pSuggestionLB
->
InsertEntry
(
aTmp
);
m_pSuggestionLB
->
InsertEntry
(
aTmp
);
m_pSuggestionLB
->
SetEntryFlags
(
m_pSuggestionLB
->
GetEntryCount
()
-
1
,
L
ISTBOX_ENTRY_FLAG_MULTILINE
);
m_pSuggestionLB
->
SetEntryFlags
(
m_pSuggestionLB
->
GetEntryCount
()
-
1
,
L
istBoxEntryFlags
::
MultiLine
);
}
}
}
}
if
(
!
nSize
)
if
(
!
nSize
)
...
...
cui/source/tabpages/numfmt.cxx
Dosyayı görüntüle @
24181bfb
...
@@ -557,7 +557,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet )
...
@@ -557,7 +557,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet )
sal_Int32
nPos
=
pNumFmtShell
->
GetCurrencySymbol
();
sal_Int32
nPos
=
pNumFmtShell
->
GetCurrencySymbol
();
if
(
nPos
==
0
)
if
(
nPos
==
0
)
// Enable "Automatically" if currently used so it is selectable.
// Enable "Automatically" if currently used so it is selectable.
m_pLbCurrency
->
SetEntryFlags
(
nPos
,
0
);
m_pLbCurrency
->
SetEntryFlags
(
nPos
,
ListBoxEntryFlags
::
NONE
);
m_pLbCurrency
->
SelectEntryPos
(
nPos
);
m_pLbCurrency
->
SelectEntryPos
(
nPos
);
}
}
...
@@ -1738,7 +1738,7 @@ void SvxNumberFormatTabPage::FillCurrencyBox()
...
@@ -1738,7 +1738,7 @@ void SvxNumberFormatTabPage::FillCurrencyBox()
// is selected, else if the to be disabled (first) entry was selected it
// is selected, else if the to be disabled (first) entry was selected it
// would be sticky when disabled and could not be deselected!
// would be sticky when disabled and could not be deselected!
m_pLbCurrency
->
SetNoSelection
();
m_pLbCurrency
->
SetNoSelection
();
m_pLbCurrency
->
SetEntryFlags
(
0
,
L
ISTBOX_ENTRY_FLAG_DISABLE_SELECTION
|
LISTBOX_ENTRY_FLAG_DRAW_DISABLED
);
m_pLbCurrency
->
SetEntryFlags
(
0
,
L
istBoxEntryFlags
::
DisableSelection
|
ListBoxEntryFlags
::
DrawDisabled
);
m_pLbCurrency
->
SelectEntryPos
(
nSelPos
);
m_pLbCurrency
->
SelectEntryPos
(
nSelPos
);
}
}
...
...
include/vcl/lstbox.h
Dosyayı görüntüle @
24181bfb
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#define INCLUDED_VCL_LSTBOX_H
#define INCLUDED_VCL_LSTBOX_H
#include <sal/types.h>
#include <sal/types.h>
#include <o3tl/typed_flags_set.hxx>
#define LISTBOX_APPEND (SAL_MAX_INT32)
#define LISTBOX_APPEND (SAL_MAX_INT32)
#define LISTBOX_ENTRY_NOTFOUND (SAL_MAX_INT32)
#define LISTBOX_ENTRY_NOTFOUND (SAL_MAX_INT32)
...
@@ -36,24 +37,32 @@
...
@@ -36,24 +37,32 @@
// !! to change the internal behaviour of the ListBox implementation !!
// !! to change the internal behaviour of the ListBox implementation !!
// !! for specific entries. !!
// !! for specific entries. !!
enum
class
ListBoxEntryFlags
{
NONE
=
0x0000
,
/** this flag disables a selection of an entry completely. It is not
/** this flag disables a selection of an entry completely. It is not
possible to select such entries either from the user interface
possible to select such entries either from the user interface
nor from the ListBox methods. Cursor traveling is handled correctly.
nor from the ListBox methods. Cursor traveling is handled correctly.
This flag can be used to add titles to a ListBox.
This flag can be used to add titles to a ListBox.
*/
*/
#define LISTBOX_ENTRY_FLAG_DISABLE_SELECTION 0x0000001
DisableSelection
=
0x0001
,
/** this flag can be used to make an entry multine capable
/** this flag can be used to make an entry multine capable
A normal entry is single line and will therefore be clipped
A normal entry is single line and will therefore be clipped
at the right listbox border. Setting this flag enables
at the right listbox border. Setting this flag enables
word breaks for the entry text.
word breaks for the entry text.
*/
*/
#define LISTBOX_ENTRY_FLAG_MULTILINE 0x0000002
MultiLine
=
0x0002
,
/** this flags lets the item be drawn disabled (e.g. in grey text)
/** this flags lets the item be drawn disabled (e.g. in grey text)
usage only guaranteed with L
ISTBOX_ENTRY_FLAG_DISABLE_SELECTION
usage only guaranteed with L
istBoxEntryFlags::DisableSelection
*/
*/
#define LISTBOX_ENTRY_FLAG_DRAW_DISABLED 0x0000004
DrawDisabled
=
0x0004
,
};
namespace
o3tl
{
template
<>
struct
typed_flags
<
ListBoxEntryFlags
>
:
is_typed_flags
<
ListBoxEntryFlags
,
0x0007
>
{};
}
#endif // INCLUDED_VCL_LSTBOX_H
#endif // INCLUDED_VCL_LSTBOX_H
...
...
include/vcl/lstbox.hxx
Dosyayı görüntüle @
24181bfb
...
@@ -145,21 +145,21 @@ public:
...
@@ -145,21 +145,21 @@ public:
void
*
GetSelectEntryData
()
const
{
return
GetEntryData
(
GetSelectEntryPos
());
}
void
*
GetSelectEntryData
()
const
{
return
GetEntryData
(
GetSelectEntryPos
());
}
/** this methods stores a combination of flags from the
/** this methods stores a combination of flags from the
L
ISTBOX_ENTRY_FLAG_
* defines at the given entry.
L
istBoxEntryFlags::
* defines at the given entry.
See description of the possible L
ISTBOX_ENTRY_FLAG_
* flags
See description of the possible L
istBoxEntryFlags::
* flags
for details.
for details.
Do not use these flags for user data as they are reserved
Do not use these flags for user data as they are reserved
to change the internal behaviour of the ListBox implementation
to change the internal behaviour of the ListBox implementation
for specific entries.
for specific entries.
*/
*/
void
SetEntryFlags
(
sal_Int32
nPos
,
long
nFlags
);
void
SetEntryFlags
(
sal_Int32
nPos
,
ListBoxEntryFlags
nFlags
);
/** this methods gets the current combination of flags from the
/** this methods gets the current combination of flags from the
L
ISTBOX_ENTRY_FLAG_
* defines from the given entry.
L
istBoxEntryFlags::
* defines from the given entry.
See description of the possible L
ISTBOX_ENTRY_FLAG_
* flags
See description of the possible L
istBoxEntryFlags::
* flags
for details.
for details.
*/
*/
long
GetEntryFlags
(
sal_Int32
nPos
)
const
;
ListBoxEntryFlags
GetEntryFlags
(
sal_Int32
nPos
)
const
;
void
SetTopEntry
(
sal_Int32
nPos
);
void
SetTopEntry
(
sal_Int32
nPos
);
sal_Int32
GetTopEntry
()
const
;
sal_Int32
GetTopEntry
()
const
;
...
...
sd/source/ui/animations/CustomAnimationCreateDialog.cxx
Dosyayı görüntüle @
24181bfb
...
@@ -100,7 +100,7 @@ sal_Int32 CategoryListBox::InsertCategory( const OUString& rStr, sal_Int32 nPo
...
@@ -100,7 +100,7 @@ sal_Int32 CategoryListBox::InsertCategory( const OUString& rStr, sal_Int32 nPo
{
{
sal_Int32
n
=
ListBox
::
InsertEntry
(
rStr
,
nPos
);
sal_Int32
n
=
ListBox
::
InsertEntry
(
rStr
,
nPos
);
if
(
n
!=
LISTBOX_ENTRY_NOTFOUND
)
if
(
n
!=
LISTBOX_ENTRY_NOTFOUND
)
ListBox
::
SetEntryFlags
(
n
,
ListBox
::
GetEntryFlags
(
n
)
|
L
ISTBOX_ENTRY_FLAG_DISABLE_SELECTION
);
ListBox
::
SetEntryFlags
(
n
,
ListBox
::
GetEntryFlags
(
n
)
|
L
istBoxEntryFlags
::
DisableSelection
);
return
n
;
return
n
;
}
}
...
@@ -109,7 +109,7 @@ void CategoryListBox::UserDraw( const UserDrawEvent& rUDEvt )
...
@@ -109,7 +109,7 @@ void CategoryListBox::UserDraw( const UserDrawEvent& rUDEvt )
{
{
const
sal_uInt16
nItem
=
rUDEvt
.
GetItemId
();
const
sal_uInt16
nItem
=
rUDEvt
.
GetItemId
();
if
(
ListBox
::
GetEntryFlags
(
nItem
)
&
L
ISTBOX_ENTRY_FLAG_DISABLE_SELECTION
)
if
(
ListBox
::
GetEntryFlags
(
nItem
)
&
L
istBoxEntryFlags
::
DisableSelection
)
{
{
Rectangle
aOutRect
(
rUDEvt
.
GetRect
()
);
Rectangle
aOutRect
(
rUDEvt
.
GetRect
()
);
OutputDevice
*
pDev
=
rUDEvt
.
GetDevice
();
OutputDevice
*
pDev
=
rUDEvt
.
GetDevice
();
...
...
vcl/inc/ilstbox.hxx
Dosyayı görüntüle @
24181bfb
...
@@ -52,13 +52,13 @@ struct ImplEntryType
...
@@ -52,13 +52,13 @@ struct ImplEntryType
Image
maImage
;
Image
maImage
;
void
*
mpUserData
;
void
*
mpUserData
;
bool
mbIsSelected
;
bool
mbIsSelected
;
long
mnFlags
;
ListBoxEntryFlags
mnFlags
;
long
mnHeight
;
long
mnHeight
;
ImplEntryType
(
const
OUString
&
rStr
,
const
Image
&
rImage
)
:
ImplEntryType
(
const
OUString
&
rStr
,
const
Image
&
rImage
)
:
maStr
(
rStr
),
maStr
(
rStr
),
maImage
(
rImage
),
maImage
(
rImage
),
mnFlags
(
0
),
mnFlags
(
ListBoxEntryFlags
::
NONE
),
mnHeight
(
0
)
mnHeight
(
0
)
{
{
mbIsSelected
=
false
;
mbIsSelected
=
false
;
...
@@ -67,7 +67,7 @@ struct ImplEntryType
...
@@ -67,7 +67,7 @@ struct ImplEntryType
ImplEntryType
(
const
OUString
&
rStr
)
:
ImplEntryType
(
const
OUString
&
rStr
)
:
maStr
(
rStr
),
maStr
(
rStr
),
mnFlags
(
0
),
mnFlags
(
ListBoxEntryFlags
::
NONE
),
mnHeight
(
0
)
mnHeight
(
0
)
{
{
mbIsSelected
=
false
;
mbIsSelected
=
false
;
...
@@ -76,7 +76,7 @@ struct ImplEntryType
...
@@ -76,7 +76,7 @@ struct ImplEntryType
ImplEntryType
(
const
Image
&
rImage
)
:
ImplEntryType
(
const
Image
&
rImage
)
:
maImage
(
rImage
),
maImage
(
rImage
),
mnFlags
(
0
),
mnFlags
(
ListBoxEntryFlags
::
NONE
),
mnHeight
(
0
)
mnHeight
(
0
)
{
{
mbIsSelected
=
false
;
mbIsSelected
=
false
;
...
@@ -138,8 +138,8 @@ public:
...
@@ -138,8 +138,8 @@ public:
void
SetEntryData
(
sal_Int32
nPos
,
void
*
pNewData
);
void
SetEntryData
(
sal_Int32
nPos
,
void
*
pNewData
);
void
*
GetEntryData
(
sal_Int32
nPos
)
const
;
void
*
GetEntryData
(
sal_Int32
nPos
)
const
;
void
SetEntryFlags
(
sal_Int32
nPos
,
long
nFlags
);
void
SetEntryFlags
(
sal_Int32
nPos
,
ListBoxEntryFlags
nFlags
);
long
GetEntryFlags
(
sal_Int32
nPos
)
const
;
ListBoxEntryFlags
GetEntryFlags
(
sal_Int32
nPos
)
const
;
void
SelectEntry
(
sal_Int32
nPos
,
bool
bSelect
);
void
SelectEntry
(
sal_Int32
nPos
,
bool
bSelect
);
...
@@ -164,7 +164,7 @@ public:
...
@@ -164,7 +164,7 @@ public:
sal_Int32
GetMaxMRUCount
()
const
{
return
mnMaxMRUCount
;
}
sal_Int32
GetMaxMRUCount
()
const
{
return
mnMaxMRUCount
;
}
/** An Entry is selectable if its mnFlags does not have the
/** An Entry is selectable if its mnFlags does not have the
L
ISTBOX_ENTRY_FLAG_DISABLE_SELECTION
flag set. */
L
istBoxEntryFlags::DisableSelection
flag set. */
bool
IsEntrySelectable
(
sal_Int32
nPos
)
const
;
bool
IsEntrySelectable
(
sal_Int32
nPos
)
const
;
/** @return the first entry found from the given position nPos that is selectable
/** @return the first entry found from the given position nPos that is selectable
...
@@ -277,7 +277,7 @@ public:
...
@@ -277,7 +277,7 @@ public:
void
ResetCurrentPos
()
{
mnCurrentPos
=
LISTBOX_ENTRY_NOTFOUND
;
}
void
ResetCurrentPos
()
{
mnCurrentPos
=
LISTBOX_ENTRY_NOTFOUND
;
}
sal_Int32
GetCurrentPos
()
const
{
return
mnCurrentPos
;
}
sal_Int32
GetCurrentPos
()
const
{
return
mnCurrentPos
;
}
sal_uInt16
GetDisplayLineCount
()
const
;
sal_uInt16
GetDisplayLineCount
()
const
;
void
SetEntryFlags
(
sal_Int32
nPos
,
long
nFlags
);
void
SetEntryFlags
(
sal_Int32
nPos
,
ListBoxEntryFlags
nFlags
);
void
DrawEntry
(
vcl
::
RenderContext
&
rRenderContext
,
sal_Int32
nPos
,
bool
bDrawImage
,
bool
bDrawText
,
bool
bDrawTextAtImagePos
=
false
,
bool
bLayout
=
false
);
void
DrawEntry
(
vcl
::
RenderContext
&
rRenderContext
,
sal_Int32
nPos
,
bool
bDrawImage
,
bool
bDrawText
,
bool
bDrawTextAtImagePos
=
false
,
bool
bLayout
=
false
);
...
@@ -428,7 +428,7 @@ public:
...
@@ -428,7 +428,7 @@ public:
void
SetEntryData
(
sal_Int32
nPos
,
void
*
pNewData
)
{
maLBWindow
->
GetEntryList
()
->
SetEntryData
(
nPos
,
pNewData
);
}
void
SetEntryData
(
sal_Int32
nPos
,
void
*
pNewData
)
{
maLBWindow
->
GetEntryList
()
->
SetEntryData
(
nPos
,
pNewData
);
}
void
Clear
();
void
Clear
();
void
SetEntryFlags
(
sal_Int32
nPos
,
long
nFlags
);
void
SetEntryFlags
(
sal_Int32
nPos
,
ListBoxEntryFlags
nFlags
);
void
SelectEntry
(
sal_Int32
nPos
,
bool
bSelect
);
void
SelectEntry
(
sal_Int32
nPos
,
bool
bSelect
);
void
SetNoSelection
();
void
SetNoSelection
();
...
...
vcl/source/control/ilstbox.cxx
Dosyayı görüntüle @
24181bfb
...
@@ -118,7 +118,7 @@ void ImplEntryList::SelectEntry( sal_Int32 nPos, bool bSelect )
...
@@ -118,7 +118,7 @@ void ImplEntryList::SelectEntry( sal_Int32 nPos, bool bSelect )
boost
::
ptr_vector
<
ImplEntryType
>::
iterator
iter
=
maEntries
.
begin
()
+
nPos
;
boost
::
ptr_vector
<
ImplEntryType
>::
iterator
iter
=
maEntries
.
begin
()
+
nPos
;
if
(
(
iter
->
mbIsSelected
!=
bSelect
)
&&
if
(
(
iter
->
mbIsSelected
!=
bSelect
)
&&
(
(
iter
->
mnFlags
&
L
ISTBOX_ENTRY_FLAG_DISABLE_SELECTION
)
==
0
)
)
(
(
iter
->
mnFlags
&
L
istBoxEntryFlags
::
DisableSelection
)
==
ListBoxEntryFlags
::
NONE
)
)
{
{
iter
->
mbIsSelected
=
bSelect
;
iter
->
mbIsSelected
=
bSelect
;
if
(
mbCallSelectionChangedHdl
)
if
(
mbCallSelectionChangedHdl
)
...
@@ -398,17 +398,17 @@ void* ImplEntryList::GetEntryData( sal_Int32 nPos ) const
...
@@ -398,17 +398,17 @@ void* ImplEntryList::GetEntryData( sal_Int32 nPos ) const
return
pImplEntry
?
pImplEntry
->
mpUserData
:
NULL
;
return
pImplEntry
?
pImplEntry
->
mpUserData
:
NULL
;
}
}
void
ImplEntryList
::
SetEntryFlags
(
sal_Int32
nPos
,
long
nFlags
)
void
ImplEntryList
::
SetEntryFlags
(
sal_Int32
nPos
,
ListBoxEntryFlags
nFlags
)
{
{
ImplEntryType
*
pImplEntry
=
GetEntry
(
nPos
);
ImplEntryType
*
pImplEntry
=
GetEntry
(
nPos
);
if
(
pImplEntry
)
if
(
pImplEntry
)
pImplEntry
->
mnFlags
=
nFlags
;
pImplEntry
->
mnFlags
=
nFlags
;
}
}
long
ImplEntryList
::
GetEntryFlags
(
sal_Int32
nPos
)
const
ListBoxEntryFlags
ImplEntryList
::
GetEntryFlags
(
sal_Int32
nPos
)
const
{
{
ImplEntryType
*
pImplEntry
=
GetEntry
(
nPos
);
ImplEntryType
*
pImplEntry
=
GetEntry
(
nPos
);
return
pImplEntry
?
pImplEntry
->
mnFlags
:
0
;
return
pImplEntry
?
pImplEntry
->
mnFlags
:
ListBoxEntryFlags
::
NONE
;
}
}
sal_Int32
ImplEntryList
::
GetSelectEntryCount
()
const
sal_Int32
ImplEntryList
::
GetSelectEntryCount
()
const
...
@@ -460,7 +460,7 @@ bool ImplEntryList::IsEntryPosSelected( sal_Int32 nIndex ) const
...
@@ -460,7 +460,7 @@ bool ImplEntryList::IsEntryPosSelected( sal_Int32 nIndex ) const
bool
ImplEntryList
::
IsEntrySelectable
(
sal_Int32
nPos
)
const
bool
ImplEntryList
::
IsEntrySelectable
(
sal_Int32
nPos
)
const
{
{
ImplEntryType
*
pImplEntry
=
GetEntry
(
nPos
);
ImplEntryType
*
pImplEntry
=
GetEntry
(
nPos
);
return
pImplEntry
==
nullptr
||
((
pImplEntry
->
mnFlags
&
L
ISTBOX_ENTRY_FLAG_DISABLE_SELECTION
)
==
0
);
return
pImplEntry
==
nullptr
||
((
pImplEntry
->
mnFlags
&
L
istBoxEntryFlags
::
DisableSelection
)
==
ListBoxEntryFlags
::
NONE
);
}
}
sal_Int32
ImplEntryList
::
FindFirstSelectable
(
sal_Int32
nPos
,
bool
bForward
/* = true */
)
sal_Int32
ImplEntryList
::
FindFirstSelectable
(
sal_Int32
nPos
,
bool
bForward
/* = true */
)
...
@@ -638,7 +638,7 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
...
@@ -638,7 +638,7 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
if
(
aMetrics
.
bText
)
if
(
aMetrics
.
bText
)
{
{
if
(
(
rEntry
.
mnFlags
&
L
ISTBOX_ENTRY_FLAG_MULTILINE
)
)
if
(
(
rEntry
.
mnFlags
&
L
istBoxEntryFlags
::
MultiLine
)
)
{
{
// multiline case
// multiline case
Size
aCurSize
(
PixelToLogic
(
GetSizePixel
()
)
);
Size
aCurSize
(
PixelToLogic
(
GetSizePixel
()
)
);
...
@@ -757,7 +757,7 @@ sal_Int32 ImplListBoxWindow::InsertEntry( sal_Int32 nPos, ImplEntryType* pNewEnt
...
@@ -757,7 +757,7 @@ sal_Int32 ImplListBoxWindow::InsertEntry( sal_Int32 nPos, ImplEntryType* pNewEnt
sal_Int32
nNewPos
=
mpEntryList
->
InsertEntry
(
nPos
,
pNewEntry
,
mbSort
);
sal_Int32
nNewPos
=
mpEntryList
->
InsertEntry
(
nPos
,
pNewEntry
,
mbSort
);
if
(
(
GetStyle
()
&
WB_WORDBREAK
)
)
if
(
(
GetStyle
()
&
WB_WORDBREAK
)
)
pNewEntry
->
mnFlags
|=
L
ISTBOX_ENTRY_FLAG_MULTILINE
;
pNewEntry
->
mnFlags
|=
L
istBoxEntryFlags
::
MultiLine
;
ImplUpdateEntryMetrics
(
*
pNewEntry
);
ImplUpdateEntryMetrics
(
*
pNewEntry
);
return
nNewPos
;
return
nNewPos
;
...
@@ -772,7 +772,7 @@ void ImplListBoxWindow::RemoveEntry( sal_Int32 nPos )
...
@@ -772,7 +772,7 @@ void ImplListBoxWindow::RemoveEntry( sal_Int32 nPos )
ImplCalcMetrics
();
ImplCalcMetrics
();
}
}
void
ImplListBoxWindow
::
SetEntryFlags
(
sal_Int32
nPos
,
long
nFlags
)
void
ImplListBoxWindow
::
SetEntryFlags
(
sal_Int32
nPos
,
ListBoxEntryFlags
nFlags
)
{
{
mpEntryList
->
SetEntryFlags
(
nPos
,
nFlags
);
mpEntryList
->
SetEntryFlags
(
nPos
,
nFlags
);
ImplEntryType
*
pEntry
=
mpEntryList
->
GetMutableEntryPtr
(
nPos
);
ImplEntryType
*
pEntry
=
mpEntryList
->
GetMutableEntryPtr
(
nPos
);
...
@@ -1825,7 +1825,7 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32
...
@@ -1825,7 +1825,7 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32
{
{
long
nMaxWidth
=
std
::
max
(
static_cast
<
long
>
(
mnMaxWidth
),
rRenderContext
.
GetOutputSizePixel
().
Width
()
-
2
*
mnBorder
);
long
nMaxWidth
=
std
::
max
(
static_cast
<
long
>
(
mnMaxWidth
),
rRenderContext
.
GetOutputSizePixel
().
Width
()
-
2
*
mnBorder
);
// a multiline entry should only be as wide a the window
// a multiline entry should only be as wide a the window
if
((
pEntry
->
mnFlags
&
L
ISTBOX_ENTRY_FLAG_MULTILINE
))
if
((
pEntry
->
mnFlags
&
L
istBoxEntryFlags
::
MultiLine
))
nMaxWidth
=
rRenderContext
.
GetOutputSizePixel
().
Width
()
-
2
*
mnBorder
;
nMaxWidth
=
rRenderContext
.
GetOutputSizePixel
().
Width
()
-
2
*
mnBorder
;
Rectangle
aTextRect
(
Point
(
mnBorder
-
mnLeft
,
nY
),
Rectangle
aTextRect
(
Point
(
mnBorder
-
mnLeft
,
nY
),
...
@@ -1850,9 +1850,9 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32
...
@@ -1850,9 +1850,9 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32
}
}
sal_uInt16
nDrawStyle
=
ImplGetTextStyle
();
sal_uInt16
nDrawStyle
=
ImplGetTextStyle
();
if
((
pEntry
->
mnFlags
&
L
ISTBOX_ENTRY_FLAG_MULTILINE
))
if
((
pEntry
->
mnFlags
&
L
istBoxEntryFlags
::
MultiLine
))
nDrawStyle
|=
MULTILINE_ENTRY_DRAW_FLAGS
;
nDrawStyle
|=
MULTILINE_ENTRY_DRAW_FLAGS
;
if
((
pEntry
->
mnFlags
&
L
ISTBOX_ENTRY_FLAG_DRAW_DISABLED
))
if
((
pEntry
->
mnFlags
&
L
istBoxEntryFlags
::
DrawDisabled
))
nDrawStyle
|=
TEXT_DRAW_DISABLE
;
nDrawStyle
|=
TEXT_DRAW_DISABLE
;
rRenderContext
.
DrawText
(
aTextRect
,
aStr
,
nDrawStyle
,
pVector
,
pDisplayText
);
rRenderContext
.
DrawText
(
aTextRect
,
aStr
,
nDrawStyle
,
pVector
,
pDisplayText
);
...
@@ -1920,7 +1920,7 @@ void ImplListBoxWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl
...
@@ -1920,7 +1920,7 @@ void ImplListBoxWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl
sal_uInt16
ImplListBoxWindow
::
GetDisplayLineCount
()
const
sal_uInt16
ImplListBoxWindow
::
GetDisplayLineCount
()
const
{
{
// FIXME: L
ISTBOX_ENTRY_FLAG_MULTILINE
// FIXME: L
istBoxEntryFlags::MultiLine
sal_Int32
nCount
=
mpEntryList
->
GetEntryCount
();
sal_Int32
nCount
=
mpEntryList
->
GetEntryCount
();
long
nHeight
=
GetOutputSizePixel
().
Height
();
// - mnMaxHeight + mnBorder;
long
nHeight
=
GetOutputSizePixel
().
Height
();
// - mnMaxHeight + mnBorder;
...
@@ -2050,7 +2050,7 @@ void ImplListBoxWindow::ScrollHorz( long n )
...
@@ -2050,7 +2050,7 @@ void ImplListBoxWindow::ScrollHorz( long n )
Size
ImplListBoxWindow
::
CalcSize
(
sal_Int32
nMaxLines
)
const
Size
ImplListBoxWindow
::
CalcSize
(
sal_Int32
nMaxLines
)
const
{
{
// FIXME: L
ISTBOX_ENTRY_FLAG_MULTILINE
// FIXME: L
istBoxEntryFlags::MultiLine
Size
aSz
;
Size
aSz
;
aSz
.
Height
()
=
nMaxLines
*
mnMaxHeight
;
aSz
.
Height
()
=
nMaxLines
*
mnMaxHeight
;
...
@@ -2225,7 +2225,7 @@ void ImplListBox::RemoveEntry( sal_Int32 nPos )
...
@@ -2225,7 +2225,7 @@ void ImplListBox::RemoveEntry( sal_Int32 nPos )
StateChanged
(
StateChangedType
::
Data
);
StateChanged
(
StateChangedType
::
Data
);
}
}
void
ImplListBox
::
SetEntryFlags
(
sal_Int32
nPos
,
long
nFlags
)
void
ImplListBox
::
SetEntryFlags
(
sal_Int32
nPos
,
ListBoxEntryFlags
nFlags
)
{
{
maLBWindow
->
SetEntryFlags
(
nPos
,
nFlags
);
maLBWindow
->
SetEntryFlags
(
nPos
,
nFlags
);
}
}
...
...
vcl/source/control/lstbox.cxx
Dosyayı görüntüle @
24181bfb
...
@@ -1130,12 +1130,12 @@ void* ListBox::GetEntryData( sal_Int32 nPos ) const
...
@@ -1130,12 +1130,12 @@ void* ListBox::GetEntryData( sal_Int32 nPos ) const
return
mpImplLB
->
GetEntryList
()
->
GetEntryData
(
nPos
+
mpImplLB
->
GetEntryList
()
->
GetMRUCount
()
);
return
mpImplLB
->
GetEntryList
()
->
GetEntryData
(
nPos
+
mpImplLB
->
GetEntryList
()
->
GetMRUCount
()
);
}
}
void
ListBox
::
SetEntryFlags
(
sal_Int32
nPos
,
long
nFlags
)
void
ListBox
::
SetEntryFlags
(
sal_Int32
nPos
,
ListBoxEntryFlags
nFlags
)
{
{
mpImplLB
->
SetEntryFlags
(
nPos
+
mpImplLB
->
GetEntryList
()
->
GetMRUCount
(),
nFlags
);
mpImplLB
->
SetEntryFlags
(
nPos
+
mpImplLB
->
GetEntryList
()
->
GetMRUCount
(),
nFlags
);
}
}
long
ListBox
::
GetEntryFlags
(
sal_Int32
nPos
)
const
ListBoxEntryFlags
ListBox
::
GetEntryFlags
(
sal_Int32
nPos
)
const
{
{
return
mpImplLB
->
GetEntryList
()
->
GetEntryFlags
(
nPos
+
mpImplLB
->
GetEntryList
()
->
GetMRUCount
()
);
return
mpImplLB
->
GetEntryList
()
->
GetEntryFlags
(
nPos
+
mpImplLB
->
GetEntryList
()
->
GetMRUCount
()
);
}
}
...
...
vcl/source/control/tabctrl.cxx
Dosyayı görüntüle @
24181bfb
...
@@ -1775,7 +1775,7 @@ void TabControl::EnablePage( sal_uInt16 i_nPageId, bool i_bEnable )
...
@@ -1775,7 +1775,7 @@ void TabControl::EnablePage( sal_uInt16 i_nPageId, bool i_bEnable )
mbFormat
=
true
;
mbFormat
=
true
;
if
(
mpTabCtrlData
->
mpListBox
)
if
(
mpTabCtrlData
->
mpListBox
)
mpTabCtrlData
->
mpListBox
->
SetEntryFlags
(
GetPagePos
(
i_nPageId
),
mpTabCtrlData
->
mpListBox
->
SetEntryFlags
(
GetPagePos
(
i_nPageId
),
i_bEnable
?
0
:
(
LISTBOX_ENTRY_FLAG_DISABLE_SELECTION
|
LISTBOX_ENTRY_FLAG_DRAW_DISABLED
)
);
i_bEnable
?
ListBoxEntryFlags
::
NONE
:
(
ListBoxEntryFlags
::
DisableSelection
|
ListBoxEntryFlags
::
DrawDisabled
)
);
if
(
pItem
->
mnId
==
mnCurPageId
)
if
(
pItem
->
mnId
==
mnCurPageId
)
{
{
// SetCurPageId will change to an enabled page
// SetCurPageId will change to an enabled page
...
...
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