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
27e8eb73
Kaydet (Commit)
27e8eb73
authored
Nis 07, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert SV_ITEMSTATE constants to SvItemState scoped enum
Change-Id: I7d7d516f37cbb5e28a842bbc6bff54916d450dbb
üst
90dc63a8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
63 additions
and
61 deletions
+63
-61
fontsubs.cxx
cui/source/options/fontsubs.cxx
+1
-1
optfltr.cxx
cui/source/options/optfltr.cxx
+2
-2
autocdlg.cxx
cui/source/tabpages/autocdlg.cxx
+1
-1
svlbitm.hxx
include/svtools/svlbitm.hxx
+31
-23
svlbitm.cxx
svtools/source/contnr/svlbitm.cxx
+25
-31
svtabbx.cxx
svtools/source/contnr/svtabbx.cxx
+2
-2
treelistbox.cxx
svtools/source/contnr/treelistbox.cxx
+1
-1
No files found.
cui/source/options/fontsubs.cxx
Dosyayı görüntüle @
27e8eb73
...
...
@@ -516,7 +516,7 @@ SvButtonState SvxFontSubstCheckListBox::GetCheckButtonState( SvTreeListEntry* pE
if
(
pItem
->
GetType
()
==
SV_ITEM_ID_LBOXBUTTON
)
{
sal_uInt16
nButtonFlags
=
pItem
->
GetButtonFlags
();
SvItemStateFlags
nButtonFlags
=
pItem
->
GetButtonFlags
();
eState
=
pCheckButtonData
->
ConvertToButtonState
(
nButtonFlags
);
}
...
...
cui/source/options/optfltr.cxx
Dosyayı görüntüle @
27e8eb73
...
...
@@ -214,7 +214,7 @@ bool OfaMSFilterTabPage2::FillItemSet( SfxItemSet* )
SvLBoxButton
*
pItem
=
static_cast
<
SvLBoxButton
*>
(
pEntry
->
GetItem
(
nCol
));
if
(
pItem
&&
pItem
->
GetType
()
==
SV_ITEM_ID_LBOXBUTTON
)
{
sal_uInt16
nButtonFlags
=
pItem
->
GetButtonFlags
();
SvItemStateFlags
nButtonFlags
=
pItem
->
GetButtonFlags
();
bCheck
=
SV_BUTTON_CHECKED
==
pCheckButtonData
->
ConvertToButtonState
(
nButtonFlags
);
...
...
@@ -397,7 +397,7 @@ SvButtonState OfaMSFilterTabPage2::MSFltrSimpleTable::GetCheckButtonState(
if
(
pItem
->
GetType
()
==
SV_ITEM_ID_LBOXBUTTON
)
{
sal_uInt16
nButtonFlags
=
pItem
->
GetButtonFlags
();
SvItemStateFlags
nButtonFlags
=
pItem
->
GetButtonFlags
();
eState
=
pCheckButtonData
->
ConvertToButtonState
(
nButtonFlags
);
}
...
...
cui/source/tabpages/autocdlg.cxx
Dosyayı görüntüle @
27e8eb73
...
...
@@ -791,7 +791,7 @@ SvButtonState OfaACorrCheckListBox::GetCheckButtonState( SvTreeListEntry* pEntry
if
(
pItem
->
GetType
()
==
SV_ITEM_ID_LBOXBUTTON
)
{
sal_uInt16
nButtonFlags
=
pItem
->
GetButtonFlags
();
SvItemStateFlags
nButtonFlags
=
pItem
->
GetButtonFlags
();
eState
=
pCheckButtonData
->
ConvertToButtonState
(
nButtonFlags
);
}
...
...
include/svtools/svlbitm.hxx
Dosyayı görüntüle @
27e8eb73
...
...
@@ -25,6 +25,7 @@
#include <tools/link.hxx>
#include <vcl/image.hxx>
#include <svtools/treelistbox.hxx>
#include <o3tl/typed_flags_set.hxx>
class
SvTreeListEntry
;
...
...
@@ -40,6 +41,19 @@ enum class SvBmp
STATICIMAGE
=
6
};
enum
class
SvItemStateFlags
{
NONE
=
0x00
,
UNCHECKED
=
0x01
,
CHECKED
=
0x02
,
TRISTATE
=
0x04
,
HILIGHTED
=
0x08
};
namespace
o3tl
{
template
<>
struct
typed_flags
<
SvItemStateFlags
>
:
is_typed_flags
<
SvItemStateFlags
,
0x0f
>
{};
}
struct
SvLBoxButtonData_Impl
;
class
SVT_DLLPUBLIC
SvLBoxButtonData
...
...
@@ -63,7 +77,7 @@ public:
~
SvLBoxButtonData
();
SvBmp
GetIndex
(
sal_uInt16
nItemState
);
SvBmp
GetIndex
(
SvItemStateFlags
nItemState
);
long
Width
();
long
Height
();
void
SetLink
(
const
Link
&
rLink
)
{
aLink
=
rLink
;
}
...
...
@@ -72,8 +86,8 @@ public:
// as buttons are not derived from LinkHdl
void
CallLink
();
void
StoreButtonState
(
SvTreeListEntry
*
pEntry
,
sal_uInt16
nItemFlags
);
SvButtonState
ConvertToButtonState
(
sal_uInt16
nItemFlags
)
const
;
void
StoreButtonState
(
SvTreeListEntry
*
pEntry
,
SvItemStateFlags
nItemFlags
);
SvButtonState
ConvertToButtonState
(
SvItemStateFlags
nItemFlags
)
const
;
SvButtonState
GetActButtonState
()
const
{
return
eState
;
}
...
...
@@ -126,18 +140,12 @@ public:
};
#define SV_ITEMSTATE_UNCHECKED 0x0001
#define SV_ITEMSTATE_CHECKED 0x0002
#define SV_ITEMSTATE_TRISTATE 0x0004
#define SV_ITEMSTATE_HILIGHTED 0x0008
#define SV_STATE_MASK 0xFFF8 // for deletion of UNCHECKED,CHECKED,TRISTATE
class
SVT_DLLPUBLIC
SvLBoxButton
:
public
SvLBoxItem
{
bool
isVis
;
SvLBoxButtonData
*
pData
;
SvLBoxButtonKind
eKind
;
sal_uInt16
nItemFlags
;
SvItemStateFlags
nItemFlags
;
void
ImplAdjustBoxSize
(
Size
&
io_rCtrlSize
,
ControlType
i_eType
,
vcl
::
Window
*
pParent
);
public
:
...
...
@@ -158,11 +166,11 @@ public:
const
Point
&
rPos
,
SvTreeListBox
&
rOutDev
,
const
SvViewDataEntry
*
pView
,
const
SvTreeListEntry
*
pEntry
)
SAL_OVERRIDE
;
virtual
SvLBoxItem
*
Create
()
const
SAL_OVERRIDE
;
virtual
void
Clone
(
SvLBoxItem
*
pSource
)
SAL_OVERRIDE
;
sal_uInt16
GetButtonFlags
()
const
{
return
nItemFlags
;
}
bool
IsStateChecked
()
const
{
return
(
nItemFlags
&
SV_ITEMSTATE_CHECKED
)
!=
0
;
}
bool
IsStateUnchecked
()
const
{
return
(
nItemFlags
&
SV_ITEMSTATE_UNCHECKED
)
!=
0
;
}
bool
IsStateTristate
()
const
{
return
(
nItemFlags
&
SV_ITEMSTATE_TRISTATE
)
!=
0
;
}
bool
IsStateHilighted
()
const
{
return
(
nItemFlags
&
SV_ITEMSTATE_HILIGHTED
)
!=
0
;
}
SvItemStateFlags
GetButtonFlags
()
const
{
return
nItemFlags
;
}
bool
IsStateChecked
()
const
{
return
bool
(
nItemFlags
&
SvItemStateFlags
::
CHECKED
)
;
}
bool
IsStateUnchecked
()
const
{
return
bool
(
nItemFlags
&
SvItemStateFlags
::
UNCHECKED
)
;
}
bool
IsStateTristate
()
const
{
return
bool
(
nItemFlags
&
SvItemStateFlags
::
TRISTATE
)
;
}
bool
IsStateHilighted
()
const
{
return
bool
(
nItemFlags
&
SvItemStateFlags
::
HILIGHTED
)
;
}
void
SetStateChecked
();
void
SetStateUnchecked
();
void
SetStateTristate
();
...
...
@@ -178,25 +186,25 @@ public:
inline
void
SvLBoxButton
::
SetStateChecked
()
{
nItemFlags
&=
S
V_STATE_MASK
;
nItemFlags
|=
S
V_ITEMSTATE_
CHECKED
;
nItemFlags
&=
S
vItemStateFlags
::
HILIGHTED
;
nItemFlags
|=
S
vItemStateFlags
::
CHECKED
;
}
inline
void
SvLBoxButton
::
SetStateUnchecked
()
{
nItemFlags
&=
S
V_STATE_MASK
;
nItemFlags
|=
S
V_ITEMSTATE_
UNCHECKED
;
nItemFlags
&=
S
vItemStateFlags
::
HILIGHTED
;
nItemFlags
|=
S
vItemStateFlags
::
UNCHECKED
;
}
inline
void
SvLBoxButton
::
SetStateTristate
()
{
nItemFlags
&=
S
V_STATE_MASK
;
nItemFlags
|=
S
V_ITEMSTATE_
TRISTATE
;
nItemFlags
&=
S
vItemStateFlags
::
HILIGHTED
;
nItemFlags
|=
S
vItemStateFlags
::
TRISTATE
;
}
inline
void
SvLBoxButton
::
SetStateHilighted
(
bool
bHilight
)
{
if
(
bHilight
)
nItemFlags
|=
S
V_ITEMSTATE_
HILIGHTED
;
nItemFlags
|=
S
vItemStateFlags
::
HILIGHTED
;
else
nItemFlags
&=
~
S
V_ITEMSTATE_
HILIGHTED
;
nItemFlags
&=
~
S
vItemStateFlags
::
HILIGHTED
;
}
...
...
svtools/source/contnr/svlbitm.cxx
Dosyayı görüntüle @
27e8eb73
...
...
@@ -76,27 +76,23 @@ void SvLBoxButtonData::CallLink()
aLink
.
Call
(
this
);
}
SvBmp
SvLBoxButtonData
::
GetIndex
(
sal_uInt16
nItemState
)
SvBmp
SvLBoxButtonData
::
GetIndex
(
SvItemStateFlags
nItemState
)
{
nItemState
&=
0x000F
;
SvBmp
nIdx
;
switch
(
nItemState
)
{
case
SV_ITEMSTATE_UNCHECKED
:
nIdx
=
SvBmp
::
UNCHECKED
;
break
;
case
SV_ITEMSTATE_CHECKED
:
nIdx
=
SvBmp
::
CHECKED
;
break
;
case
SV_ITEMSTATE_TRISTATE
:
nIdx
=
SvBmp
::
TRISTATE
;
break
;
case
SV_ITEMSTATE_UNCHECKED
|
SV_ITEMSTATE_HILIGHTED
:
nIdx
=
SvBmp
::
HIUNCHECKED
;
break
;
case
SV_ITEMSTATE_CHECKED
|
SV_ITEMSTATE_HILIGHTED
:
nIdx
=
SvBmp
::
HICHECKED
;
break
;
case
SV_ITEMSTATE_TRISTATE
|
SV_ITEMSTATE_HILIGHTED
:
nIdx
=
SvBmp
::
HITRISTATE
;
break
;
default
:
nIdx
=
SvBmp
::
UNCHECKED
;
}
if
(
nItemState
==
SvItemStateFlags
::
UNCHECKED
)
nIdx
=
SvBmp
::
UNCHECKED
;
else
if
(
nItemState
==
SvItemStateFlags
::
CHECKED
)
nIdx
=
SvBmp
::
CHECKED
;
else
if
(
nItemState
==
SvItemStateFlags
::
TRISTATE
)
nIdx
=
SvBmp
::
TRISTATE
;
else
if
(
nItemState
==
(
SvItemStateFlags
::
UNCHECKED
|
SvItemStateFlags
::
HILIGHTED
))
nIdx
=
SvBmp
::
HIUNCHECKED
;
else
if
(
nItemState
==
(
SvItemStateFlags
::
CHECKED
|
SvItemStateFlags
::
HILIGHTED
))
nIdx
=
SvBmp
::
HICHECKED
;
else
if
(
nItemState
==
(
SvItemStateFlags
::
TRISTATE
|
SvItemStateFlags
::
HILIGHTED
))
nIdx
=
SvBmp
::
HITRISTATE
;
else
nIdx
=
SvBmp
::
UNCHECKED
;
return
nIdx
;
}
...
...
@@ -109,26 +105,24 @@ void SvLBoxButtonData::SetWidthAndHeight()
}
void
SvLBoxButtonData
::
StoreButtonState
(
SvTreeListEntry
*
pActEntry
,
sal_uInt16
nItemFlags
)
void
SvLBoxButtonData
::
StoreButtonState
(
SvTreeListEntry
*
pActEntry
,
SvItemStateFlags
nItemFlags
)
{
pImpl
->
pEntry
=
pActEntry
;
eState
=
ConvertToButtonState
(
nItemFlags
);
}
SvButtonState
SvLBoxButtonData
::
ConvertToButtonState
(
sal_uInt16
nItemFlags
)
const
SvButtonState
SvLBoxButtonData
::
ConvertToButtonState
(
SvItemStateFlags
nItemFlags
)
const
{
nItemFlags
&=
(
S
V_ITEMSTATE_
UNCHECKED
|
S
V_ITEMSTATE_
CHECKED
|
S
V_ITEMSTATE_
TRISTATE
);
nItemFlags
&=
(
S
vItemStateFlags
::
UNCHECKED
|
S
vItemStateFlags
::
CHECKED
|
S
vItemStateFlags
::
TRISTATE
);
switch
(
nItemFlags
)
{
case
S
V_ITEMSTATE_
UNCHECKED
:
case
S
vItemStateFlags
:
:
UNCHECKED
:
return
SV_BUTTON_UNCHECKED
;
case
SV_ITEMSTATE_CHECKED
:
case
SvItemStateFlags
:
:
CHECKED
:
return
SV_BUTTON_CHECKED
;
case
SV_ITEMSTATE_TRISTATE
:
case
SvItemStateFlags
:
:
TRISTATE
:
return
SV_BUTTON_TRISTATE
;
default
:
return
SV_BUTTON_UNCHECKED
;
...
...
@@ -305,7 +299,7 @@ SvLBoxButton::SvLBoxButton( SvTreeListEntry* pEntry, SvLBoxButtonKind eTheKind,
,
isVis
(
true
)
,
pData
(
pBData
)
,
eKind
(
eTheKind
)
,
nItemFlags
(
0
)
,
nItemFlags
(
SvItemStateFlags
::
NONE
)
{
SetStateUnchecked
();
}
...
...
@@ -315,7 +309,7 @@ SvLBoxButton::SvLBoxButton()
,
isVis
(
false
)
,
pData
(
0
)
,
eKind
(
SvLBoxButtonKind_enabledCheckbox
)
,
nItemFlags
(
0
)
,
nItemFlags
(
SvItemStateFlags
::
NONE
)
{
SetStateUnchecked
();
}
...
...
svtools/source/contnr/svtabbx.cxx
Dosyayı görüntüle @
27e8eb73
...
...
@@ -554,7 +554,7 @@ bool SvHeaderTabListBox::IsItemChecked( SvTreeListEntry* pEntry, sal_uInt16 nCol
if
(
pItem
&&
pItem
->
GetType
()
==
SV_ITEM_ID_LBOXBUTTON
)
{
sal_uInt16
nButtonFlags
=
pItem
->
GetButtonFlags
();
SvItemStateFlags
nButtonFlags
=
pItem
->
GetButtonFlags
();
eState
=
pCheckButtonData
->
ConvertToButtonState
(
nButtonFlags
);
}
...
...
@@ -686,7 +686,7 @@ bool SvHeaderTabListBox::IsCellCheckBox( long _nRow, sal_uInt16 _nColumn, TriSta
if
(
pItem
&&
pItem
->
GetType
()
==
SV_ITEM_ID_LBOXBUTTON
)
{
bRet
=
true
;
_rState
=
(
(
pItem
->
GetButtonFlags
()
&
S
V_ITEMSTATE_UNCHECKED
)
==
0
)
_rState
=
(
(
pItem
->
GetButtonFlags
()
&
S
vItemStateFlags
::
UNCHECKED
)
==
SvItemStateFlags
::
NONE
)
?
TRISTATE_TRUE
:
TRISTATE_FALSE
;
}
}
...
...
svtools/source/contnr/treelistbox.cxx
Dosyayı görüntüle @
27e8eb73
...
...
@@ -2006,7 +2006,7 @@ SvButtonState SvTreeListBox::GetCheckButtonState( SvTreeListEntry* pEntry ) cons
SvLBoxButton
*
pItem
=
static_cast
<
SvLBoxButton
*>
(
pEntry
->
GetFirstItem
(
SV_ITEM_ID_LBOXBUTTON
));
if
(
!
pItem
)
return
SV_BUTTON_TRISTATE
;
sal_uInt16
nButtonFlags
=
pItem
->
GetButtonFlags
();
SvItemStateFlags
nButtonFlags
=
pItem
->
GetButtonFlags
();
eState
=
pCheckButtonData
->
ConvertToButtonState
(
nButtonFlags
);
}
return
eState
;
...
...
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