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
a989a0b1
Kaydet (Commit)
a989a0b1
authored
Kas 04, 2016
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fold ColorListBox and ColorLB together
Change-Id: I485109acd7cd4d6c2dc53e29f4b01bfc202a38f3
üst
760a198e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
47 deletions
+38
-47
dlgctrl.hxx
include/svx/dlgctrl.hxx
+25
-34
dlgctrl.cxx
svx/source/dialog/dlgctrl.cxx
+13
-13
No files found.
include/svx/dlgctrl.hxx
Dosyayı görüntüle @
a989a0b1
...
...
@@ -207,7 +207,7 @@ public:
/************************************************************************/
class
SAL_WARN_UNUSED
SVX_DLLPUBLIC
ColorL
istBox
:
public
ListBox
class
SAL_WARN_UNUSED
SVX_DLLPUBLIC
ColorL
B
:
public
ListBox
{
ImpColorList
*
pColorList
;
// separate liste, in case of user data are required from outside
Size
aImageSize
;
...
...
@@ -217,9 +217,9 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC ColorListBox : public ListBox
SVT_DLLPRIVATE
void
ImplDestroyColorEntries
();
public
:
ColorL
istBox
(
vcl
::
Window
*
pParent
,
ColorL
B
(
vcl
::
Window
*
pParent
,
WinBits
nWinStyle
=
WB_BORDER
);
virtual
~
ColorL
istBox
()
override
;
virtual
~
ColorL
B
()
override
;
virtual
void
dispose
()
override
;
virtual
void
UserDraw
(
const
UserDrawEvent
&
rUDEvt
)
override
;
...
...
@@ -233,7 +233,7 @@ public:
using
ListBox
::
RemoveEntry
;
void
RemoveEntry
(
sal_Int32
nPos
);
void
Clear
();
void
CopyEntries
(
const
ColorL
istBox
&
rBox
);
void
CopyEntries
(
const
ColorL
B
&
rBox
);
using
ListBox
::
GetEntryPos
;
sal_Int32
GetEntryPos
(
const
Color
&
rColor
)
const
;
...
...
@@ -241,8 +241,23 @@ public:
void
SelectEntry
(
const
OUString
&
rStr
)
{
ListBox
::
SelectEntry
(
rStr
);
}
void
SelectEntry
(
const
Color
&
rColor
);
Color
GetSelectEntryColor
()
const
;
void
SelectEntry
(
const
Color
&
rColor
)
{
sal_Int32
nPos
=
GetEntryPos
(
rColor
);
if
(
nPos
!=
LISTBOX_ENTRY_NOTFOUND
)
ListBox
::
SelectEntryPos
(
nPos
);
}
Color
GetSelectEntryColor
()
const
{
sal_Int32
nPos
=
GetSelectEntryPos
();
Color
aColor
;
if
(
nPos
!=
LISTBOX_ENTRY_NOTFOUND
)
aColor
=
GetEntryColor
(
nPos
);
return
aColor
;
}
using
ListBox
::
IsEntrySelected
;
bool
IsEntrySelected
(
const
Color
&
rColor
)
const
...
...
@@ -254,38 +269,14 @@ public:
return
false
;
}
private
:
ColorListBox
(
const
ColorListBox
&
)
=
delete
;
ColorListBox
&
operator
=
(
const
ColorListBox
&
)
=
delete
;
};
inline
void
ColorListBox
::
SelectEntry
(
const
Color
&
rColor
)
{
sal_Int32
nPos
=
GetEntryPos
(
rColor
);
if
(
nPos
!=
LISTBOX_ENTRY_NOTFOUND
)
ListBox
::
SelectEntryPos
(
nPos
);
}
inline
Color
ColorListBox
::
GetSelectEntryColor
()
const
{
sal_Int32
nPos
=
GetSelectEntryPos
();
Color
aColor
;
if
(
nPos
!=
LISTBOX_ENTRY_NOTFOUND
)
aColor
=
GetEntryColor
(
nPos
);
return
aColor
;
}
class
SAL_WARN_UNUSED
SVX_DLLPUBLIC
ColorLB
:
public
ColorListBox
{
public
:
ColorLB
(
vcl
::
Window
*
pParent
,
WinBits
aWB
)
:
ColorListBox
(
pParent
,
aWB
)
{}
void
Fill
(
const
XColorListRef
&
pTab
);
void
Append
(
const
XColorEntry
&
rEntry
);
void
Modify
(
const
XColorEntry
&
rEntry
,
sal_Int32
nPos
);
private
:
ColorLB
(
const
ColorLB
&
)
=
delete
;
ColorLB
&
operator
=
(
const
ColorLB
&
)
=
delete
;
};
/************************************************************************/
...
...
svx/source/dialog/dlgctrl.cxx
Dosyayı görüntüle @
a989a0b1
...
...
@@ -1127,7 +1127,7 @@ public:
explicit
ImplColorListData
(
const
Color
&
rColor
)
:
aColor
(
rColor
)
{
bColor
=
true
;
}
};
void
ColorL
istBox
::
ImplInit
()
void
ColorL
B
::
ImplInit
()
{
pColorList
=
new
ImpColorList
();
...
...
@@ -1137,26 +1137,26 @@ void ColorListBox::ImplInit()
SetUserItemSize
(
aImageSize
);
}
void
ColorL
istBox
::
ImplDestroyColorEntries
()
void
ColorL
B
::
ImplDestroyColorEntries
()
{
for
(
size_t
n
=
pColorList
->
size
();
n
;
)
delete
(
*
pColorList
)[
--
n
];
pColorList
->
clear
();
}
ColorL
istBox
::
ColorListBox
(
vcl
::
Window
*
pParent
,
WinBits
nWinStyle
)
:
ColorL
B
::
ColorLB
(
vcl
::
Window
*
pParent
,
WinBits
nWinStyle
)
:
ListBox
(
pParent
,
nWinStyle
)
{
ImplInit
();
SetEdgeBlending
(
true
);
}
ColorL
istBox
::~
ColorListBox
()
ColorL
B
::~
ColorLB
()
{
disposeOnce
();
}
void
ColorL
istBox
::
dispose
()
void
ColorL
B
::
dispose
()
{
if
(
pColorList
)
{
...
...
@@ -1167,7 +1167,7 @@ void ColorListBox::dispose()
ListBox
::
dispose
();
}
sal_Int32
ColorL
istBox
::
InsertEntry
(
const
OUString
&
rStr
,
sal_Int32
nPos
)
sal_Int32
ColorL
B
::
InsertEntry
(
const
OUString
&
rStr
,
sal_Int32
nPos
)
{
nPos
=
ListBox
::
InsertEntry
(
rStr
,
nPos
);
if
(
nPos
!=
LISTBOX_ERROR
)
...
...
@@ -1188,7 +1188,7 @@ sal_Int32 ColorListBox::InsertEntry( const OUString& rStr, sal_Int32 nPos )
return
nPos
;
}
sal_Int32
ColorL
istBox
::
InsertEntry
(
const
Color
&
rColor
,
const
OUString
&
rStr
,
sal_Int32
ColorL
B
::
InsertEntry
(
const
Color
&
rColor
,
const
OUString
&
rStr
,
sal_Int32
nPos
)
{
nPos
=
ListBox
::
InsertEntry
(
rStr
,
nPos
);
...
...
@@ -1210,7 +1210,7 @@ sal_Int32 ColorListBox::InsertEntry( const Color& rColor, const OUString& rStr,
return
nPos
;
}
void
ColorL
istBox
::
RemoveEntry
(
sal_Int32
nPos
)
void
ColorL
B
::
RemoveEntry
(
sal_Int32
nPos
)
{
ListBox
::
RemoveEntry
(
nPos
);
if
(
0
<=
nPos
&&
static_cast
<
size_t
>
(
nPos
)
<
pColorList
->
size
()
)
...
...
@@ -1222,13 +1222,13 @@ void ColorListBox::RemoveEntry( sal_Int32 nPos )
}
}
void
ColorL
istBox
::
Clear
()
void
ColorL
B
::
Clear
()
{
ImplDestroyColorEntries
();
ListBox
::
Clear
();
}
void
ColorL
istBox
::
CopyEntries
(
const
ColorListBox
&
rBox
)
void
ColorL
B
::
CopyEntries
(
const
ColorLB
&
rBox
)
{
// Liste leeren
ImplDestroyColorEntries
();
...
...
@@ -1255,7 +1255,7 @@ void ColorListBox::CopyEntries( const ColorListBox& rBox )
}
}
sal_Int32
ColorL
istBox
::
GetEntryPos
(
const
Color
&
rColor
)
const
sal_Int32
ColorL
B
::
GetEntryPos
(
const
Color
&
rColor
)
const
{
for
(
sal_Int32
n
=
(
sal_Int32
)
pColorList
->
size
();
n
;
)
{
...
...
@@ -1266,7 +1266,7 @@ sal_Int32 ColorListBox::GetEntryPos( const Color& rColor ) const
return
LISTBOX_ENTRY_NOTFOUND
;
}
Color
ColorL
istBox
::
GetEntryColor
(
sal_Int32
nPos
)
const
Color
ColorL
B
::
GetEntryColor
(
sal_Int32
nPos
)
const
{
Color
aColor
;
ImplColorListData
*
pData
=
(
0
<=
nPos
&&
static_cast
<
size_t
>
(
nPos
)
<
pColorList
->
size
()
)
?
...
...
@@ -1276,7 +1276,7 @@ Color ColorListBox::GetEntryColor( sal_Int32 nPos ) const
return
aColor
;
}
void
ColorL
istBox
::
UserDraw
(
const
UserDrawEvent
&
rUDEvt
)
void
ColorL
B
::
UserDraw
(
const
UserDrawEvent
&
rUDEvt
)
{
size_t
nPos
=
rUDEvt
.
GetItemId
();
ImplColorListData
*
pData
=
(
nPos
<
pColorList
->
size
()
)
?
(
*
pColorList
)[
nPos
]
:
nullptr
;
...
...
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