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
99648095
Kaydet (Commit)
99648095
authored
Kas 18, 2015
tarafından
Samuel Mehrbrodt
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ToolBox: Remove unused methods
Change-Id: Ic56cf27c61a904278770f0617d827e574d1eae68
üst
229fc164
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
148 deletions
+0
-148
toolbox.hxx
include/vcl/toolbox.hxx
+0
-3
toolbox.cxx
vcl/source/window/toolbox.cxx
+0
-55
toolbox2.cxx
vcl/source/window/toolbox2.cxx
+0
-90
No files found.
include/vcl/toolbox.hxx
Dosyayı görüntüle @
99648095
...
...
@@ -190,7 +190,6 @@ private:
SAL_DLLPRIVATE
void
ImplInit
(
vcl
::
Window
*
pParent
,
WinBits
nStyle
);
using
DockingWindow
::
ImplInitSettings
;
SAL_DLLPRIVATE
void
ImplInitSettings
(
bool
bFont
,
bool
bForeground
,
bool
bBackground
);
SAL_DLLPRIVATE
void
ImplLoadRes
(
const
ResId
&
rResId
);
SAL_DLLPRIVATE
ImplToolItem
*
ImplGetItem
(
sal_uInt16
nId
)
const
;
SAL_DLLPRIVATE
bool
ImplCalcItem
();
SAL_DLLPRIVATE
sal_uInt16
ImplCalcBreaks
(
long
nWidth
,
long
*
pMaxLineWidth
,
bool
bCalcHorz
);
...
...
@@ -312,8 +311,6 @@ public:
virtual
void
Resizing
(
Size
&
rSize
)
override
;
virtual
Size
GetOptimalSize
()
const
override
;
void
InsertItem
(
const
ResId
&
rResId
,
sal_uInt16
nPos
=
TOOLBOX_APPEND
);
/// Insert a command (like '.uno:Save').
virtual
void
InsertItem
(
const
OUString
&
rCommand
,
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
rFrame
,
...
...
vcl/source/window/toolbox.cxx
Dosyayı görüntüle @
99648095
...
...
@@ -1540,61 +1540,6 @@ void ToolBox::ImplInitSettings(bool bFont, bool bForeground, bool bBackground)
}
}
void
ToolBox
::
ImplLoadRes
(
const
ResId
&
rResId
)
{
ResMgr
*
pMgr
=
rResId
.
GetResMgr
();
if
(
!
pMgr
)
return
;
DockingWindow
::
ImplLoadRes
(
rResId
);
sal_uLong
nObjMask
;
nObjMask
=
ReadLongRes
();
if
(
nObjMask
&
RSC_TOOLBOX_BUTTONTYPE
)
SetButtonType
(
(
ButtonType
)
ReadLongRes
()
);
if
(
nObjMask
&
RSC_TOOLBOX_ALIGN
)
SetAlign
(
(
WindowAlign
)
ReadLongRes
()
);
if
(
nObjMask
&
RSC_TOOLBOX_LINECOUNT
)
SetLineCount
(
sal
::
static_int_cast
<
sal_uInt16
>
(
ReadLongRes
())
);
if
(
nObjMask
&
RSC_TOOLBOX_CUSTOMIZE
)
{
bool
bCust
=
ReadShortRes
();
EnableCustomize
(
bCust
);
}
if
(
nObjMask
&
RSC_TOOLBOX_MENUSTRINGS
)
{
bool
bCust
=
ReadShortRes
();
EnableMenuStrings
(
bCust
);
}
if
(
nObjMask
&
RSC_TOOLBOX_FLOATLINES
)
SetFloatingLines
(
ReadShortRes
()
);
if
(
nObjMask
&
RSC_TOOLBOX_ITEMIMAGELIST
)
{
maImageList
=
ImageList
(
ResId
(
static_cast
<
RSHEADER_TYPE
*>
(
GetClassRes
()),
*
pMgr
)
);
IncrementRes
(
GetObjSizeRes
(
static_cast
<
RSHEADER_TYPE
*>
(
GetClassRes
())
)
);
}
if
(
nObjMask
&
RSC_TOOLBOX_ITEMLIST
)
{
sal_uLong
nEle
=
ReadLongRes
();
// insert item
for
(
sal_uLong
i
=
0
;
i
<
nEle
;
i
++
)
{
InsertItem
(
ResId
(
static_cast
<
RSHEADER_TYPE
*>
(
GetClassRes
()),
*
pMgr
)
);
IncrementRes
(
GetObjSizeRes
(
static_cast
<
RSHEADER_TYPE
*>
(
GetClassRes
())
)
);
}
}
}
ToolBox
::
ToolBox
(
vcl
::
Window
*
pParent
,
WinBits
nStyle
)
:
DockingWindow
(
WINDOW_TOOLBOX
)
{
...
...
vcl/source/window/toolbox2.cxx
Dosyayı görüntüle @
99648095
...
...
@@ -448,96 +448,6 @@ void ToolBox::Select()
pWrapper
->
GetFloatingWindow
()
->
EndPopupMode
();
}
void
ToolBox
::
InsertItem
(
const
ResId
&
rResId
,
sal_uInt16
nPos
)
{
sal_uLong
nObjMask
;
bool
bImage
=
false
;
// has image
// create item
ImplToolItem
aItem
;
GetRes
(
rResId
.
SetRT
(
RSC_TOOLBOXITEM
)
);
nObjMask
=
ReadLongRes
();
if
(
nObjMask
&
RSC_TOOLBOXITEM_ID
)
aItem
.
mnId
=
sal
::
static_int_cast
<
sal_uInt16
>
(
ReadLongRes
());
else
aItem
.
mnId
=
1
;
if
(
nObjMask
&
RSC_TOOLBOXITEM_TYPE
)
aItem
.
meType
=
(
ToolBoxItemType
)
ReadLongRes
();
if
(
nObjMask
&
RSC_TOOLBOXITEM_STATUS
)
aItem
.
mnBits
=
(
ToolBoxItemBits
)
ReadLongRes
();
if
(
nObjMask
&
RSC_TOOLBOXITEM_HELPID
)
aItem
.
maHelpId
=
ReadByteStringRes
();
if
(
nObjMask
&
RSC_TOOLBOXITEM_TEXT
)
{
aItem
.
maText
=
ReadStringRes
();
aItem
.
maText
=
ImplConvertMenuString
(
aItem
.
maText
);
}
if
(
nObjMask
&
RSC_TOOLBOXITEM_HELPTEXT
)
aItem
.
maHelpText
=
ReadStringRes
();
if
(
nObjMask
&
RSC_TOOLBOXITEM_BITMAP
)
{
Bitmap
aBmp
=
Bitmap
(
ResId
(
static_cast
<
RSHEADER_TYPE
*>
(
GetClassRes
()),
*
rResId
.
GetResMgr
()
)
);
IncrementRes
(
GetObjSizeRes
(
static_cast
<
RSHEADER_TYPE
*>
(
GetClassRes
())
)
);
aItem
.
maImage
=
Image
(
aBmp
,
IMAGE_STDBTN_COLOR
);
bImage
=
true
;
}
if
(
nObjMask
&
RSC_TOOLBOXITEM_IMAGE
)
{
aItem
.
maImage
=
Image
(
ResId
(
static_cast
<
RSHEADER_TYPE
*>
(
GetClassRes
()),
*
rResId
.
GetResMgr
()
)
);
IncrementRes
(
GetObjSizeRes
(
static_cast
<
RSHEADER_TYPE
*>
(
GetClassRes
())
)
);
bImage
=
true
;
}
if
(
nObjMask
&
RSC_TOOLBOXITEM_DISABLE
)
aItem
.
mbEnabled
=
ReadShortRes
()
==
0
;
if
(
nObjMask
&
RSC_TOOLBOXITEM_STATE
)
aItem
.
meState
=
(
TriState
)
ReadLongRes
();
if
(
nObjMask
&
RSC_TOOLBOXITEM_HIDE
)
aItem
.
mbVisible
=
ReadShortRes
()
==
0
;
if
(
nObjMask
&
RSC_TOOLBOXITEM_COMMAND
)
aItem
.
maCommandStr
=
ReadStringRes
();
// if no image is loaded, try to load one from the image list
if
(
!
bImage
&&
aItem
.
mnId
)
aItem
.
maImage
=
maImageList
.
GetImage
(
aItem
.
mnId
);
// if this is a ButtonItem, check ID
bool
bNewCalc
;
if
(
aItem
.
meType
!=
ToolBoxItemType
::
BUTTON
)
{
bNewCalc
=
false
;
aItem
.
mnId
=
0
;
}
else
{
bNewCalc
=
true
;
DBG_ASSERT
(
aItem
.
mnId
,
"ToolBox::InsertItem(): ItemId == 0"
);
DBG_ASSERT
(
GetItemPos
(
aItem
.
mnId
)
==
TOOLBOX_ITEM_NOTFOUND
,
"ToolBox::InsertItem(): ItemId already exists"
);
}
// create item and add to list
mpData
->
m_aItems
.
insert
(
(
nPos
<
mpData
->
m_aItems
.
size
())
?
mpData
->
m_aItems
.
begin
()
+
nPos
:
mpData
->
m_aItems
.
end
(),
aItem
);
mpData
->
ImplClearLayoutData
();
// recalculate ToolBox and redraw
ImplInvalidate
(
bNewCalc
);
// Notify
sal_uInt16
nNewPos
=
sal
::
static_int_cast
<
sal_uInt16
>
((
nPos
==
TOOLBOX_APPEND
)
?
(
mpData
->
m_aItems
.
size
()
-
1
)
:
nPos
);
CallEventListeners
(
VCLEVENT_TOOLBOX_ITEMADDED
,
reinterpret_cast
<
void
*
>
(
nNewPos
)
);
}
void
ToolBox
::
InsertItem
(
sal_uInt16
nItemId
,
const
Image
&
rImage
,
ToolBoxItemBits
nBits
,
sal_uInt16
nPos
)
{
...
...
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