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
5ccf6718
Kaydet (Commit)
5ccf6718
authored
May 20, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
cleanup code
Change-Id: I0fdcb3d179d87ae202199d2eb904e701bad45ab1
üst
9c869aec
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
37 deletions
+37
-37
button.cxx
vcl/source/control/button.cxx
+0
-0
spinbtn.cxx
vcl/source/control/spinbtn.cxx
+37
-37
spinfld.cxx
vcl/source/control/spinfld.cxx
+0
-0
No files found.
vcl/source/control/button.cxx
Dosyayı görüntüle @
5ccf6718
This diff is collapsed.
Click to expand it.
vcl/source/control/spinbtn.cxx
Dosyayı görüntüle @
5ccf6718
...
...
@@ -35,12 +35,12 @@ void SpinButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
mnValue
=
0
;
mnValueStep
=
1
;
maRepeatTimer
.
SetTimeout
(
GetSettings
().
GetMouseSettings
().
GetButtonStartRepeat
()
);
maRepeatTimer
.
SetTimeoutHdl
(
LINK
(
this
,
SpinButton
,
ImplTimeout
)
);
maRepeatTimer
.
SetTimeout
(
GetSettings
().
GetMouseSettings
().
GetButtonStartRepeat
()
);
maRepeatTimer
.
SetTimeoutHdl
(
LINK
(
this
,
SpinButton
,
ImplTimeout
)
);
mbRepeat
=
0
!=
(
nStyle
&
WB_REPEAT
);
mbRepeat
=
0
!=
(
nStyle
&
WB_REPEAT
);
if
(
nStyle
&
WB_HSCROLL
)
if
(
nStyle
&
WB_HSCROLL
)
mbHorz
=
true
;
else
mbHorz
=
false
;
...
...
@@ -49,22 +49,22 @@ void SpinButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
}
SpinButton
::
SpinButton
(
vcl
::
Window
*
pParent
,
WinBits
nStyle
)
:
Control
(
WINDOW_SPINBUTTON
)
,
mbUpperIsFocused
(
false
)
:
Control
(
WINDOW_SPINBUTTON
)
,
mbUpperIsFocused
(
false
)
{
ImplInit
(
pParent
,
nStyle
);
ImplInit
(
pParent
,
nStyle
);
}
IMPL_LINK_TYPED
(
SpinButton
,
ImplTimeout
,
Timer
*
,
pTimer
,
void
)
IMPL_LINK_TYPED
(
SpinButton
,
ImplTimeout
,
Timer
*
,
pTimer
,
void
)
{
if
(
pTimer
->
GetTimeout
()
==
GetSettings
().
GetMouseSettings
().
GetButtonStartRepeat
()
)
if
(
pTimer
->
GetTimeout
()
==
GetSettings
().
GetMouseSettings
().
GetButtonStartRepeat
()
)
{
pTimer
->
SetTimeout
(
GetSettings
().
GetMouseSettings
().
GetButtonRepeat
()
);
pTimer
->
Start
();
}
else
{
if
(
mbInitialUp
)
if
(
mbInitialUp
)
Up
();
else
Down
();
...
...
@@ -73,57 +73,57 @@ IMPL_LINK_TYPED( SpinButton, ImplTimeout, Timer*, pTimer, void )
void
SpinButton
::
Up
()
{
if
(
ImplIsUpperEnabled
()
)
if
(
ImplIsUpperEnabled
()
)
{
mnValue
+=
mnValueStep
;
StateChanged
(
StateChangedType
::
Data
);
StateChanged
(
StateChangedType
::
Data
);
ImplMoveFocus
(
true
);
ImplMoveFocus
(
true
);
}
ImplCallEventListenersAndHandler
(
VCLEVENT_SPINBUTTON_UP
,
maUpHdlLink
,
this
);
ImplCallEventListenersAndHandler
(
VCLEVENT_SPINBUTTON_UP
,
maUpHdlLink
,
this
);
}
void
SpinButton
::
Down
()
{
if
(
ImplIsLowerEnabled
()
)
if
(
ImplIsLowerEnabled
()
)
{
mnValue
-=
mnValueStep
;
StateChanged
(
StateChangedType
::
Data
);
StateChanged
(
StateChangedType
::
Data
);
ImplMoveFocus
(
false
);
ImplMoveFocus
(
false
);
}
ImplCallEventListenersAndHandler
(
VCLEVENT_SPINBUTTON_DOWN
,
maDownHdlLink
,
this
);
ImplCallEventListenersAndHandler
(
VCLEVENT_SPINBUTTON_DOWN
,
maDownHdlLink
,
this
);
}
void
SpinButton
::
Resize
()
{
Control
::
Resize
();
Size
aSize
(
GetOutputSizePixel
()
);
Size
aSize
(
GetOutputSizePixel
()
);
Point
aTmpPoint
;
Rectangle
aRect
(
aTmpPoint
,
aSize
);
if
(
mbHorz
)
Rectangle
aRect
(
aTmpPoint
,
aSize
);
if
(
mbHorz
)
{
maLowerRect
=
Rectangle
(
0
,
0
,
aSize
.
Width
()
/
2
,
aSize
.
Height
()
-
1
);
maUpperRect
=
Rectangle
(
maLowerRect
.
TopRight
(),
aRect
.
BottomRight
()
);
maLowerRect
=
Rectangle
(
0
,
0
,
aSize
.
Width
()
/
2
,
aSize
.
Height
()
-
1
);
maUpperRect
=
Rectangle
(
maLowerRect
.
TopRight
(),
aRect
.
BottomRight
()
);
}
else
{
maUpperRect
=
Rectangle
(
0
,
0
,
aSize
.
Width
()
-
1
,
aSize
.
Height
()
/
2
);
maLowerRect
=
Rectangle
(
maUpperRect
.
BottomLeft
(),
aRect
.
BottomRight
()
);
maUpperRect
=
Rectangle
(
0
,
0
,
aSize
.
Width
()
-
1
,
aSize
.
Height
()
/
2
);
maLowerRect
=
Rectangle
(
maUpperRect
.
BottomLeft
(),
aRect
.
BottomRight
()
);
}
ImplCalcFocusRect
(
ImplIsUpperEnabled
()
||
!
ImplIsLowerEnabled
()
);
ImplCalcFocusRect
(
ImplIsUpperEnabled
()
||
!
ImplIsLowerEnabled
()
);
Invalidate
();
}
void
SpinButton
::
Draw
(
OutputDevice
*
pDev
,
const
Point
&
rPos
,
const
Size
&
rSize
,
sal_uLong
nFlags
)
void
SpinButton
::
Draw
(
OutputDevice
*
pDev
,
const
Point
&
rPos
,
const
Size
&
rSize
,
sal_uLong
nFlags
)
{
Point
aPos
=
pDev
->
LogicToPixel
(
rPos
);
Size
aSize
=
pDev
->
LogicToPixel
(
rSize
);
Point
aPos
=
pDev
->
LogicToPixel
(
rPos
);
Size
aSize
=
pDev
->
LogicToPixel
(
rSize
);
pDev
->
Push
();
pDev
->
SetMapMode
();
...
...
@@ -440,30 +440,30 @@ bool SpinButton::PreNotify( NotifyEvent& rNEvt )
{
const
MouseEvent
*
pMouseEvt
=
NULL
;
if
(
(
rNEvt
.
GetType
()
==
MouseNotifyEvent
::
MOUSEMOVE
)
&&
(
pMouseEvt
=
rNEvt
.
GetMouseEvent
())
!=
NULL
)
if
((
rNEvt
.
GetType
()
==
MouseNotifyEvent
::
MOUSEMOVE
)
&&
(
pMouseEvt
=
rNEvt
.
GetMouseEvent
())
!=
NULL
)
{
if
(
!
pMouseEvt
->
GetButtons
()
&&
!
pMouseEvt
->
IsSynthetic
()
&&
!
pMouseEvt
->
IsModifierChanged
()
)
if
(
!
pMouseEvt
->
GetButtons
()
&&
!
pMouseEvt
->
IsSynthetic
()
&&
!
pMouseEvt
->
IsModifierChanged
()
)
{
// trigger redraw if mouse over state has changed
if
(
IsNativeControlSupported
(
CTRL_SPINBOX
,
PART_ENTIRE_CONTROL
)
||
if
(
IsNativeControlSupported
(
CTRL_SPINBOX
,
PART_ENTIRE_CONTROL
)
||
IsNativeControlSupported
(
CTRL_SPINBOX
,
PART_ALL_BUTTONS
)
)
{
Rectangle
*
pRect
=
ImplFindPartRect
(
GetPointerPosPixel
()
);
Rectangle
*
pLastRect
=
ImplFindPartRect
(
GetLastPointerPosPixel
()
);
if
(
pRect
!=
pLastRect
||
(
pMouseEvt
->
IsLeaveWindow
()
||
pMouseEvt
->
IsEnterWindow
())
)
if
(
pRect
!=
pLastRect
||
(
pMouseEvt
->
IsLeaveWindow
()
||
pMouseEvt
->
IsEnterWindow
())
)
{
vcl
::
Region
aRgn
(
GetActiveClipRegion
()
);
if
(
pLastRect
)
vcl
::
Region
aRgn
(
GetActiveClipRegion
()
);
if
(
pLastRect
)
{
SetClipRegion
(
vcl
::
Region
(
*
pLastRect
));
Invalidate
(
*
pLastRect
);
SetClipRegion
(
aRgn
);
}
if
(
pRect
)
if
(
pRect
)
{
SetClipRegion
(
vcl
::
Region
(
*
pRect
));
Invalidate
(
*
pRect
);
SetClipRegion
(
aRgn
);
SetClipRegion
(
aRgn
);
}
}
}
...
...
vcl/source/control/spinfld.cxx
Dosyayı görüntüle @
5ccf6718
This diff is collapsed.
Click to expand it.
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