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
fcc49e11
Kaydet (Commit)
fcc49e11
authored
Eyl 15, 2014
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
vcl menu: Make CloseStartedFrom() virtual to eliminate IsMenuBar() call.
Change-Id: Ifd89b7a9264075b166dd621fcb2c55225e25ea87
üst
11b6b13f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
25 deletions
+32
-25
menu.hxx
include/vcl/menu.hxx
+7
-1
menu.cxx
vcl/source/window/menu.cxx
+25
-24
No files found.
include/vcl/menu.hxx
Dosyayı görüntüle @
fcc49e11
...
...
@@ -187,7 +187,7 @@ protected:
SAL_DLLPRIVATE
void
ImplRemoveDel
(
ImplMenuDelData
&
rDel
);
/// Close the 'pStartedFrom' menu window.
SAL_DLLPRIVATE
void
CloseStartedFrom
()
;
virtual
void
CloseStartedFrom
()
=
0
;
/// Deactivate the MenuBarWindow.
SAL_DLLPRIVATE
sal_uLong
DeactivateMenuBar
(
sal_uLong
nFocusId
);
...
...
@@ -420,6 +420,9 @@ public:
virtual
bool
IsMenuBar
()
const
SAL_OVERRIDE
{
return
true
;
}
/// Close the 'pStartedFrom' menu window.
virtual
void
CloseStartedFrom
()
SAL_OVERRIDE
;
void
ShowCloseButton
(
bool
bShow
=
true
);
bool
HasCloseButton
()
const
{
return
mbCloseBtnVisible
;
}
bool
HasFloatButton
()
const
{
return
mbFloatBtnVisible
;
}
...
...
@@ -504,6 +507,9 @@ public:
virtual
bool
IsMenuBar
()
const
SAL_OVERRIDE
{
return
false
;
}
/// Close the 'pStartedFrom' menu window.
virtual
void
CloseStartedFrom
()
SAL_OVERRIDE
;
void
SetText
(
const
OUString
&
rTitle
)
{
aTitleText
=
rTitle
;
}
const
OUString
&
GetText
()
const
{
return
aTitleText
;
}
...
...
vcl/source/window/menu.cxx
Dosyayı görüntüle @
fcc49e11
...
...
@@ -2263,30 +2263,6 @@ bool Menu::HasValidEntries( bool bCheckPopups )
return
bValidEntries
;
}
void
Menu
::
CloseStartedFrom
()
{
// if the window was closed by TH, there is another menu
// which has this window as pActivePopup
if
(
!
pStartedFrom
)
return
;
// pWin from parent could be 0, if the list is
// cleaned from the start, now clean up the endpopup-events
if
(
pStartedFrom
->
IsMenuBar
())
{
MenuBarWindow
*
p
=
(
MenuBarWindow
*
)
pStartedFrom
->
ImplGetWindow
();
if
(
p
)
p
->
PopupClosed
(
this
);
}
else
{
MenuFloatingWindow
*
p
=
(
MenuFloatingWindow
*
)
pStartedFrom
->
ImplGetWindow
();
PopupMenu
*
pMenu
=
dynamic_cast
<
PopupMenu
*>
(
this
);
if
(
p
&&
pMenu
)
p
->
KillActivePopup
(
pMenu
);
}
}
sal_uLong
Menu
::
DeactivateMenuBar
(
sal_uLong
nFocusId
)
{
if
(
!
IsMenuBar
())
...
...
@@ -2491,6 +2467,18 @@ MenuBar::~MenuBar()
ImplDestroy
(
this
,
true
);
}
void
MenuBar
::
CloseStartedFrom
()
{
// if the window was closed by TH, there is another menu
// which has this window as pActivePopup
if
(
!
pStartedFrom
)
return
;
MenuBarWindow
*
p
=
(
MenuBarWindow
*
)
pStartedFrom
->
ImplGetWindow
();
if
(
p
)
p
->
PopupClosed
(
this
);
}
void
MenuBar
::
ShowCloseButton
(
bool
bShow
)
{
ShowButtons
(
bShow
,
mbFloatBtnVisible
,
mbHideBtnVisible
);
...
...
@@ -2717,6 +2705,19 @@ PopupMenu::~PopupMenu()
*
pRefAutoSubMenu
=
NULL
;
// #111060# avoid second delete in ~MenuItemData
}
void
PopupMenu
::
CloseStartedFrom
()
{
// if the window was closed by TH, there is another menu
// which has this window as pActivePopup
if
(
!
pStartedFrom
)
return
;
MenuFloatingWindow
*
p
=
(
MenuFloatingWindow
*
)
pStartedFrom
->
ImplGetWindow
();
PopupMenu
*
pMenu
=
dynamic_cast
<
PopupMenu
*>
(
this
);
if
(
p
&&
pMenu
)
p
->
KillActivePopup
(
pMenu
);
}
bool
PopupMenu
::
IsInExecute
()
{
return
GetActivePopupMenu
()
?
true
:
false
;
...
...
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