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
fedf965c
Kaydet (Commit)
fedf965c
authored
Eki 06, 2015
tarafından
Maxim Monastirsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Related: tdf#91097 Support of enum commands in MenuBarManager
Change-Id: Id7fe3075c21030e050c26aaf7ec068935f275b44
üst
3080e4c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
19 deletions
+36
-19
menubarmanager.cxx
framework/source/uielement/menubarmanager.cxx
+36
-19
No files found.
framework/source/uielement/menubarmanager.cxx
Dosyayı görüntüle @
fedf965c
...
...
@@ -77,6 +77,7 @@
#include <svtools/miscopt.hxx>
#include <uielement/menubarmerger.hxx>
#include <boost/noncopyable.hpp>
#include <tools/urlobj.hxx>
// Be careful removing this "bad" construct. There are serious problems
// with #define STRICT and including windows.h. Changing this needs some
...
...
@@ -437,29 +438,45 @@ throw ( RuntimeException, std::exception )
}
else
if
(
Event
.
State
>>=
aItemText
)
{
// Replacement for place holders
if
(
aItemText
.
startsWith
(
"($1)"
)
)
INetURLObject
aURL
(
aFeatureURL
);
OUString
aEnumPart
=
aURL
.
GetURLPath
().
getToken
(
1
,
'.'
);
if
(
!
aEnumPart
.
isEmpty
()
&&
aURL
.
GetProtocol
()
==
INetProtocol
::
Uno
)
{
OUString
aTmp
(
FWK_RESSTR
(
STR_UPDATEDOC
));
aTmp
+=
" "
;
aTmp
+=
aItemText
.
copy
(
4
);
aItemText
=
aTmp
;
// Checkmark or RadioButton
m_pVCLMenu
->
ShowItem
(
pMenuItemHandler
->
nItemId
);
m_pVCLMenu
->
CheckItem
(
pMenuItemHandler
->
nItemId
,
(
aItemText
==
aEnumPart
)
?
true
:
false
);
MenuItemBits
nBits
=
m_pVCLMenu
->
GetItemBits
(
pMenuItemHandler
->
nItemId
);
//If not already designated RadioButton set as CheckMark
if
(
!
(
nBits
&
MenuItemBits
::
RADIOCHECK
))
m_pVCLMenu
->
SetItemBits
(
pMenuItemHandler
->
nItemId
,
nBits
|
MenuItemBits
::
CHECKABLE
);
}
else
if
(
aItemText
.
startsWith
(
"($2)"
)
)
{
OUString
aTmp
(
FWK_RESSTR
(
STR_CLOSEDOC_ANDRETURN
));
aTmp
+=
aItemText
.
copy
(
4
);
aItemText
=
aTmp
;
}
else
if
(
aItemText
.
startsWith
(
"($3)"
)
)
else
{
OUString
aTmp
(
FWK_RESSTR
(
STR_SAVECOPYDOC
));
aTmp
+=
aItemText
.
copy
(
4
);
aItemText
=
aTmp
;
}
// Replacement for place holders
if
(
aItemText
.
startsWith
(
"($1)"
)
)
{
OUString
aTmp
(
FWK_RESSTR
(
STR_UPDATEDOC
));
aTmp
+=
" "
;
aTmp
+=
aItemText
.
copy
(
4
);
aItemText
=
aTmp
;
}
else
if
(
aItemText
.
startsWith
(
"($2)"
)
)
{
OUString
aTmp
(
FWK_RESSTR
(
STR_CLOSEDOC_ANDRETURN
));
aTmp
+=
aItemText
.
copy
(
4
);
aItemText
=
aTmp
;
}
else
if
(
aItemText
.
startsWith
(
"($3)"
)
)
{
OUString
aTmp
(
FWK_RESSTR
(
STR_SAVECOPYDOC
));
aTmp
+=
aItemText
.
copy
(
4
);
aItemText
=
aTmp
;
}
m_pVCLMenu
->
ShowItem
(
pMenuItemHandler
->
nItemId
);
m_pVCLMenu
->
SetItemText
(
pMenuItemHandler
->
nItemId
,
aItemText
);
m_pVCLMenu
->
ShowItem
(
pMenuItemHandler
->
nItemId
);
m_pVCLMenu
->
SetItemText
(
pMenuItemHandler
->
nItemId
,
aItemText
);
}
}
else
if
(
Event
.
State
>>=
aVisibilityStatus
)
{
...
...
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