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
5525ad36
Kaydet (Commit)
5525ad36
authored
May 13, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert FLOATWIN_TITLE constants to scoped enum
Change-Id: Iebd2eadfa375092a33d6de9d7f7964dba64f7d6b
üst
666f4285
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
22 deletions
+25
-22
floatwin.hxx
include/vcl/floatwin.hxx
+12
-9
floatwin.cxx
vcl/source/window/floatwin.cxx
+11
-11
scrwnd.cxx
vcl/source/window/scrwnd.cxx
+1
-1
window.cxx
vcl/source/window/window.cxx
+1
-1
No files found.
include/vcl/floatwin.hxx
Dosyayı görüntüle @
5525ad36
...
@@ -71,11 +71,14 @@ namespace o3tl
...
@@ -71,11 +71,14 @@ namespace o3tl
template
<>
struct
typed_flags
<
FloatWinPopupEndFlags
>
:
is_typed_flags
<
FloatWinPopupEndFlags
,
0x0f
>
{};
template
<>
struct
typed_flags
<
FloatWinPopupEndFlags
>
:
is_typed_flags
<
FloatWinPopupEndFlags
,
0x0f
>
{};
}
}
#define FLOATWIN_TITLE_NORMAL ((sal_uInt16)0x0001)
enum
class
FloatWinTitleType
#define FLOATWIN_TITLE_TEAROFF ((sal_uInt16)0x0002)
{
#define FLOATWIN_TITLE_POPUP ((sal_uInt16)0x0004)
Unknown
=
0
,
#define FLOATWIN_TITLE_NONE ((sal_uInt16)0x0008)
Normal
=
1
,
TearOff
=
2
,
Popup
=
3
,
NONE
=
4
,
};
enum
HitTest
enum
HitTest
{
{
...
@@ -96,8 +99,8 @@ private:
...
@@ -96,8 +99,8 @@ private:
Rectangle
maFloatRect
;
Rectangle
maFloatRect
;
ImplSVEvent
*
mnPostId
;
ImplSVEvent
*
mnPostId
;
FloatWinPopupFlags
mnPopupModeFlags
;
FloatWinPopupFlags
mnPopupModeFlags
;
sal_uInt16
mnTitle
;
FloatWinTitleType
mnTitle
;
sal_uInt16
mnOldTitle
;
FloatWinTitleType
mnOldTitle
;
bool
mbInPopupMode
;
bool
mbInPopupMode
;
bool
mbPopupMode
;
bool
mbPopupMode
;
bool
mbPopupModeCanceled
;
bool
mbPopupModeCanceled
;
...
@@ -147,8 +150,8 @@ public:
...
@@ -147,8 +150,8 @@ public:
virtual
void
PopupModeEnd
();
virtual
void
PopupModeEnd
();
void
SetTitleType
(
sal_uInt16
nTitle
);
void
SetTitleType
(
FloatWinTitleType
nTitle
);
sal_uInt16
GetTitleType
()
const
{
return
mnTitle
;
}
FloatWinTitleType
GetTitleType
()
const
{
return
mnTitle
;
}
void
StartPopupMode
(
const
Rectangle
&
rRect
,
FloatWinPopupFlags
nFlags
=
FloatWinPopupFlags
::
NONE
);
void
StartPopupMode
(
const
Rectangle
&
rRect
,
FloatWinPopupFlags
nFlags
=
FloatWinPopupFlags
::
NONE
);
void
StartPopupMode
(
ToolBox
*
pBox
,
FloatWinPopupFlags
nFlags
=
FloatWinPopupFlags
::
NONE
);
void
StartPopupMode
(
ToolBox
*
pBox
,
FloatWinPopupFlags
nFlags
=
FloatWinPopupFlags
::
NONE
);
...
...
vcl/source/window/floatwin.cxx
Dosyayı görüntüle @
5525ad36
...
@@ -121,7 +121,7 @@ void FloatingWindow::ImplInit( vcl::Window* pParent, WinBits nStyle )
...
@@ -121,7 +121,7 @@ void FloatingWindow::ImplInit( vcl::Window* pParent, WinBits nStyle )
mpNextFloat
=
NULL
;
mpNextFloat
=
NULL
;
mpFirstPopupModeWin
=
NULL
;
mpFirstPopupModeWin
=
NULL
;
mnPostId
=
0
;
mnPostId
=
0
;
mnTitle
=
(
nStyle
&
(
WB_MOVEABLE
|
WB_POPUP
))
?
F
LOATWIN_TITLE_NORMAL
:
FLOATWIN_TITLE_
NONE
;
mnTitle
=
(
nStyle
&
(
WB_MOVEABLE
|
WB_POPUP
))
?
F
loatWinTitleType
::
Normal
:
FloatWinTitleType
::
NONE
;
mnOldTitle
=
mnTitle
;
mnOldTitle
=
mnTitle
;
mnPopupModeFlags
=
FloatWinPopupFlags
::
NONE
;
mnPopupModeFlags
=
FloatWinPopupFlags
::
NONE
;
mbInPopupMode
=
false
;
mbInPopupMode
=
false
;
...
@@ -160,8 +160,8 @@ FloatingWindow::FloatingWindow(vcl::Window* pParent, const OString& rID, const O
...
@@ -160,8 +160,8 @@ FloatingWindow::FloatingWindow(vcl::Window* pParent, const OString& rID, const O
,
mpImplData
(
0
)
,
mpImplData
(
0
)
,
mnPostId
(
0
)
,
mnPostId
(
0
)
,
mnPopupModeFlags
(
FloatWinPopupFlags
::
NONE
)
,
mnPopupModeFlags
(
FloatWinPopupFlags
::
NONE
)
,
mnTitle
(
0
)
,
mnTitle
(
FloatWinTitleType
::
Unknown
)
,
mnOldTitle
(
0
)
,
mnOldTitle
(
FloatWinTitleType
::
Unknown
)
,
mbInPopupMode
(
false
)
,
mbInPopupMode
(
false
)
,
mbPopupMode
(
false
)
,
mbPopupMode
(
false
)
,
mbPopupModeCanceled
(
false
)
,
mbPopupModeCanceled
(
false
)
...
@@ -599,20 +599,20 @@ void FloatingWindow::PopupModeEnd()
...
@@ -599,20 +599,20 @@ void FloatingWindow::PopupModeEnd()
maPopupModeEndHdl
.
Call
(
this
);
maPopupModeEndHdl
.
Call
(
this
);
}
}
void
FloatingWindow
::
SetTitleType
(
sal_uInt16
nTitle
)
void
FloatingWindow
::
SetTitleType
(
FloatWinTitleType
nTitle
)
{
{
if
(
(
mnTitle
!=
nTitle
)
&&
mpWindowImpl
->
mpBorderWindow
)
if
(
(
mnTitle
!=
nTitle
)
&&
mpWindowImpl
->
mpBorderWindow
)
{
{
mnTitle
=
nTitle
;
mnTitle
=
nTitle
;
Size
aOutSize
=
GetOutputSizePixel
();
Size
aOutSize
=
GetOutputSizePixel
();
sal_uInt16
nTitleStyle
;
sal_uInt16
nTitleStyle
;
if
(
nTitle
==
F
LOATWIN_TITLE_NORMAL
)
if
(
nTitle
==
F
loatWinTitleType
::
Normal
)
nTitleStyle
=
BORDERWINDOW_TITLE_SMALL
;
nTitleStyle
=
BORDERWINDOW_TITLE_SMALL
;
else
if
(
nTitle
==
F
LOATWIN_TITLE_TEAROFF
)
else
if
(
nTitle
==
F
loatWinTitleType
::
TearOff
)
nTitleStyle
=
BORDERWINDOW_TITLE_TEAROFF
;
nTitleStyle
=
BORDERWINDOW_TITLE_TEAROFF
;
else
if
(
nTitle
==
F
LOATWIN_TITLE_POPUP
)
else
if
(
nTitle
==
F
loatWinTitleType
::
Popup
)
nTitleStyle
=
BORDERWINDOW_TITLE_POPUP
;
nTitleStyle
=
BORDERWINDOW_TITLE_POPUP
;
else
// nTitle == F
LOATWIN_TITLE_
NONE
else
// nTitle == F
loatWinTitleType::
NONE
nTitleStyle
=
BORDERWINDOW_TITLE_NONE
;
nTitleStyle
=
BORDERWINDOW_TITLE_NONE
;
static_cast
<
ImplBorderWindow
*>
(
mpWindowImpl
->
mpBorderWindow
.
get
())
->
SetTitleType
(
nTitleStyle
,
aOutSize
);
static_cast
<
ImplBorderWindow
*>
(
mpWindowImpl
->
mpBorderWindow
.
get
())
->
SetTitleType
(
nTitleStyle
,
aOutSize
);
static_cast
<
ImplBorderWindow
*>
(
mpWindowImpl
->
mpBorderWindow
.
get
())
->
GetBorder
(
mpWindowImpl
->
mnLeftBorder
,
mpWindowImpl
->
mnTopBorder
,
mpWindowImpl
->
mnRightBorder
,
mpWindowImpl
->
mnBottomBorder
);
static_cast
<
ImplBorderWindow
*>
(
mpWindowImpl
->
mpBorderWindow
.
get
())
->
GetBorder
(
mpWindowImpl
->
mnLeftBorder
,
mpWindowImpl
->
mnTopBorder
,
mpWindowImpl
->
mnRightBorder
,
mpWindowImpl
->
mnBottomBorder
);
...
@@ -631,11 +631,11 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, FloatWinPopupFlags
...
@@ -631,11 +631,11 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, FloatWinPopupFlags
// remove title
// remove title
mnOldTitle
=
mnTitle
;
mnOldTitle
=
mnTitle
;
if
(
(
mpWindowImpl
->
mnStyle
&
WB_POPUP
)
&&
!
GetText
().
isEmpty
()
)
if
(
(
mpWindowImpl
->
mnStyle
&
WB_POPUP
)
&&
!
GetText
().
isEmpty
()
)
SetTitleType
(
F
LOATWIN_TITLE_POPUP
);
SetTitleType
(
F
loatWinTitleType
::
Popup
);
else
if
(
nFlags
&
FloatWinPopupFlags
::
AllowTearOff
)
else
if
(
nFlags
&
FloatWinPopupFlags
::
AllowTearOff
)
SetTitleType
(
F
LOATWIN_TITLE_TEAROFF
);
SetTitleType
(
F
loatWinTitleType
::
TearOff
);
else
else
SetTitleType
(
F
LOATWIN_TITLE_
NONE
);
SetTitleType
(
F
loatWinTitleType
::
NONE
);
// avoid close on focus change for decorated floating windows only
// avoid close on focus change for decorated floating windows only
if
(
mpWindowImpl
->
mbFrame
&&
(
GetStyle
()
&
WB_MOVEABLE
)
)
if
(
mpWindowImpl
->
mbFrame
&&
(
GetStyle
()
&
WB_MOVEABLE
)
)
...
...
vcl/source/window/scrwnd.cxx
Dosyayı görüntüle @
5525ad36
...
@@ -57,7 +57,7 @@ ImplWheelWindow::ImplWheelWindow( vcl::Window* pParent ) :
...
@@ -57,7 +57,7 @@ ImplWheelWindow::ImplWheelWindow( vcl::Window* pParent ) :
mnMaxWidth
=
(
sal_uLong
)
(
0.4
*
hypot
(
(
double
)
aSize
.
Width
(),
aSize
.
Height
()
)
);
mnMaxWidth
=
(
sal_uLong
)
(
0.4
*
hypot
(
(
double
)
aSize
.
Width
(),
aSize
.
Height
()
)
);
// create wheel window
// create wheel window
SetTitleType
(
F
LOATWIN_TITLE_
NONE
);
SetTitleType
(
F
loatWinTitleType
::
NONE
);
ImplCreateImageList
();
ImplCreateImageList
();
ResMgr
*
pResMgr
=
ImplGetResMgr
();
ResMgr
*
pResMgr
=
ImplGetResMgr
();
Bitmap
aBmp
;
Bitmap
aBmp
;
...
...
vcl/source/window/window.cxx
Dosyayı görüntüle @
5525ad36
...
@@ -3689,7 +3689,7 @@ bool Window::HasActiveChildFrame()
...
@@ -3689,7 +3689,7 @@ bool Window::HasActiveChildFrame()
// but FloatingWindows carry this information in their TitleType...
// but FloatingWindows carry this information in their TitleType...
// TODO: avoid duplicate WinBits !!!
// TODO: avoid duplicate WinBits !!!
if
(
pChildFrame
&&
pChildFrame
->
ImplIsFloatingWindow
()
)
if
(
pChildFrame
&&
pChildFrame
->
ImplIsFloatingWindow
()
)
bDecorated
=
static_cast
<
FloatingWindow
*>
(
pChildFrame
)
->
GetTitleType
()
!=
F
LOATWIN_TITLE_
NONE
;
bDecorated
=
static_cast
<
FloatingWindow
*>
(
pChildFrame
)
->
GetTitleType
()
!=
F
loatWinTitleType
::
NONE
;
if
(
bDecorated
||
(
pFrameWin
->
mpWindowImpl
->
mnStyle
&
(
WB_MOVEABLE
|
WB_SIZEABLE
)
)
)
if
(
bDecorated
||
(
pFrameWin
->
mpWindowImpl
->
mnStyle
&
(
WB_MOVEABLE
|
WB_SIZEABLE
)
)
)
if
(
pChildFrame
&&
pChildFrame
->
IsVisible
()
&&
pChildFrame
->
IsActive
()
)
if
(
pChildFrame
&&
pChildFrame
->
IsVisible
()
&&
pChildFrame
->
IsActive
()
)
{
{
...
...
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