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
e746cf65
Kaydet (Commit)
e746cf65
authored
Kas 13, 2015
tarafından
Samuel Mehrbrodt
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Vcl: Add TooltipLabel to vcl buttons also
Change-Id: I332041e2d1d53f56cd38c1cd1ca325252535a53c
üst
617c72c1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
+14
-5
builder.hxx
include/vcl/builder.hxx
+3
-1
builder.cxx
vcl/source/window/builder.cxx
+8
-3
toolbox2.cxx
vcl/source/window/toolbox2.cxx
+3
-1
No files found.
include/vcl/builder.hxx
Dosyayı görüntüle @
e746cf65
...
@@ -107,7 +107,9 @@ public:
...
@@ -107,7 +107,9 @@ public:
static
void
reorderWithinParent
(
vcl
::
Window
&
rWindow
,
sal_uInt16
nNewPosition
);
static
void
reorderWithinParent
(
vcl
::
Window
&
rWindow
,
sal_uInt16
nNewPosition
);
/// Get label of the command (like of .uno:Save) from the description service
/// Get label of the command (like of .uno:Save) from the description service
static
OUString
getCommandLabel
(
const
OUString
&
rCommand
,
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
rContext
,
const
OUString
&
rModuleId
);
static
OUString
getCommandProperty
(
const
OUString
aProperty
,
const
OUString
&
rCommand
,
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
rContext
,
const
OUString
&
rModuleId
);
/// Get image of the command (like of .uno:Save) from the description service
/// Get image of the command (like of .uno:Save) from the description service
static
Image
getCommandImage
(
static
Image
getCommandImage
(
...
...
vcl/source/window/builder.cxx
Dosyayı görüntüle @
e746cf65
...
@@ -892,10 +892,14 @@ namespace
...
@@ -892,10 +892,14 @@ namespace
uno
::
Reference
<
frame
::
XModuleManager2
>
xModuleManager
(
frame
::
ModuleManager
::
create
(
xContext
));
uno
::
Reference
<
frame
::
XModuleManager2
>
xModuleManager
(
frame
::
ModuleManager
::
create
(
xContext
));
OUString
aModuleId
(
xModuleManager
->
identify
(
rFrame
));
OUString
aModuleId
(
xModuleManager
->
identify
(
rFrame
));
OUString
aLabel
(
VclBuilder
::
getCommand
Label
(
aCommand
,
xContext
,
aModuleId
));
OUString
aLabel
(
VclBuilder
::
getCommand
Property
(
"Label"
,
aCommand
,
xContext
,
aModuleId
));
if
(
!
aLabel
.
isEmpty
())
if
(
!
aLabel
.
isEmpty
())
pButton
->
SetText
(
aLabel
);
pButton
->
SetText
(
aLabel
);
OUString
aTooltip
(
VclBuilder
::
getCommandProperty
(
"Tooltip"
,
aCommand
,
xContext
,
aModuleId
));
if
(
!
aTooltip
.
isEmpty
())
pButton
->
SetQuickHelpText
(
aTooltip
);
Image
aImage
(
VclBuilder
::
getCommandImage
(
aCommand
,
/* bLarge = */
false
,
xContext
,
rFrame
,
aModuleId
));
Image
aImage
(
VclBuilder
::
getCommandImage
(
aCommand
,
/* bLarge = */
false
,
xContext
,
rFrame
,
aModuleId
));
pButton
->
SetModeImage
(
aImage
);
pButton
->
SetModeImage
(
aImage
);
...
@@ -2164,7 +2168,8 @@ void VclBuilder::reorderWithinParent(std::vector<vcl::Window*>& rChilds, bool bI
...
@@ -2164,7 +2168,8 @@ void VclBuilder::reorderWithinParent(std::vector<vcl::Window*>& rChilds, bool bI
}
}
}
}
OUString
VclBuilder
::
getCommandLabel
(
const
OUString
&
rCommand
,
const
uno
::
Reference
<
uno
::
XComponentContext
>&
rContext
,
const
OUString
&
rModuleId
)
OUString
VclBuilder
::
getCommandProperty
(
const
OUString
aProperty
,
const
OUString
&
rCommand
,
const
uno
::
Reference
<
uno
::
XComponentContext
>&
rContext
,
const
OUString
&
rModuleId
)
{
{
if
(
rCommand
.
isEmpty
())
if
(
rCommand
.
isEmpty
())
return
OUString
();
return
OUString
();
...
@@ -2181,7 +2186,7 @@ OUString VclBuilder::getCommandLabel(const OUString& rCommand, const uno::Refere
...
@@ -2181,7 +2186,7 @@ OUString VclBuilder::getCommandLabel(const OUString& rCommand, const uno::Refere
{
{
for
(
sal_Int32
i
=
0
;
i
<
aProperties
.
getLength
();
i
++
)
for
(
sal_Int32
i
=
0
;
i
<
aProperties
.
getLength
();
i
++
)
{
{
if
(
aProperties
[
i
].
Name
==
"Label"
)
if
(
aProperties
[
i
].
Name
==
aProperty
)
{
{
OUString
aLabel
;
OUString
aLabel
;
if
(
aProperties
[
i
].
Value
>>=
aLabel
)
if
(
aProperties
[
i
].
Value
>>=
aLabel
)
...
...
vcl/source/window/toolbox2.cxx
Dosyayı görüntüle @
e746cf65
...
@@ -606,7 +606,8 @@ void ToolBox::InsertItem(const OUString& rCommand, const uno::Reference<frame::X
...
@@ -606,7 +606,8 @@ void ToolBox::InsertItem(const OUString& rCommand, const uno::Reference<frame::X
uno
::
Reference
<
frame
::
XModuleManager2
>
xModuleManager
(
frame
::
ModuleManager
::
create
(
xContext
));
uno
::
Reference
<
frame
::
XModuleManager2
>
xModuleManager
(
frame
::
ModuleManager
::
create
(
xContext
));
OUString
aModuleId
(
xModuleManager
->
identify
(
rFrame
));
OUString
aModuleId
(
xModuleManager
->
identify
(
rFrame
));
OUString
aLabel
(
VclBuilder
::
getCommandLabel
(
rCommand
,
xContext
,
aModuleId
));
OUString
aLabel
(
VclBuilder
::
getCommandProperty
(
"Label"
,
rCommand
,
xContext
,
aModuleId
));
OUString
aTooltip
(
VclBuilder
::
getCommandProperty
(
"TooltipLabel"
,
rCommand
,
xContext
,
aModuleId
));
Image
aImage
(
VclBuilder
::
getCommandImage
(
rCommand
,
(
GetToolboxButtonSize
()
==
TOOLBOX_BUTTONSIZE_LARGE
),
xContext
,
rFrame
,
aModuleId
));
Image
aImage
(
VclBuilder
::
getCommandImage
(
rCommand
,
(
GetToolboxButtonSize
()
==
TOOLBOX_BUTTONSIZE_LARGE
),
xContext
,
rFrame
,
aModuleId
));
// let's invent an ItemId
// let's invent an ItemId
...
@@ -615,6 +616,7 @@ void ToolBox::InsertItem(const OUString& rCommand, const uno::Reference<frame::X
...
@@ -615,6 +616,7 @@ void ToolBox::InsertItem(const OUString& rCommand, const uno::Reference<frame::X
InsertItem
(
nItemId
,
aImage
,
aLabel
,
nBits
,
nPos
);
InsertItem
(
nItemId
,
aImage
,
aLabel
,
nBits
,
nPos
);
SetItemCommand
(
nItemId
,
rCommand
);
SetItemCommand
(
nItemId
,
rCommand
);
SetQuickHelpText
(
nItemId
,
aTooltip
);
// set the minimal size
// set the minimal size
ImplToolItem
*
pItem
=
ImplGetItem
(
nItemId
);
ImplToolItem
*
pItem
=
ImplGetItem
(
nItemId
);
...
...
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