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
279c665a
Kaydet (Commit)
279c665a
authored
May 11, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
remove whitespace
Change-Id: I70ee031eb55d10aa47e24714b839f5eb4d9a3109
üst
25a0bd7b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
150 deletions
+0
-150
calendar.cxx
svtools/source/control/calendar.cxx
+0
-150
No files found.
svtools/source/control/calendar.cxx
Dosyayı görüntüle @
279c665a
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
*/
#include <rtl/strbuf.hxx>
#include <rtl/strbuf.hxx>
#include <vcl/svapp.hxx>
#include <vcl/svapp.hxx>
#include <vcl/help.hxx>
#include <vcl/help.hxx>
...
@@ -39,7 +38,6 @@
...
@@ -39,7 +38,6 @@
#include <svtools/calendar.hxx>
#include <svtools/calendar.hxx>
#include <boost/scoped_ptr.hpp>
#include <boost/scoped_ptr.hpp>
#define DAY_OFFX 4
#define DAY_OFFX 4
#define DAY_OFFY 2
#define DAY_OFFY 2
#define MONTH_BORDERX 4
#define MONTH_BORDERX 4
...
@@ -62,8 +60,6 @@
...
@@ -62,8 +60,6 @@
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
;
static
void
ImplCalendarSelectDate
(
IntDateSet
*
pTable
,
const
Date
&
rDate
,
bool
bSelect
)
static
void
ImplCalendarSelectDate
(
IntDateSet
*
pTable
,
const
Date
&
rDate
,
bool
bSelect
)
{
{
if
(
bSelect
)
if
(
bSelect
)
...
@@ -72,8 +68,6 @@ static void ImplCalendarSelectDate( IntDateSet* pTable, const Date& rDate, bool
...
@@ -72,8 +68,6 @@ static void ImplCalendarSelectDate( IntDateSet* pTable, const Date& rDate, bool
pTable
->
erase
(
rDate
.
GetDate
()
);
pTable
->
erase
(
rDate
.
GetDate
()
);
}
}
static
void
ImplCalendarSelectDateRange
(
IntDateSet
*
pTable
,
static
void
ImplCalendarSelectDateRange
(
IntDateSet
*
pTable
,
const
Date
&
rStartDate
,
const
Date
&
rStartDate
,
const
Date
&
rEndDate
,
const
Date
&
rEndDate
,
...
@@ -112,8 +106,6 @@ static void ImplCalendarSelectDateRange( IntDateSet* pTable,
...
@@ -112,8 +106,6 @@ static void ImplCalendarSelectDateRange( IntDateSet* pTable,
}
}
}
}
static
void
ImplCalendarUnSelectDateRange
(
IntDateSet
*
pTable
,
static
void
ImplCalendarUnSelectDateRange
(
IntDateSet
*
pTable
,
IntDateSet
*
pOldTable
,
IntDateSet
*
pOldTable
,
const
Date
&
rStartDate
,
const
Date
&
rStartDate
,
...
@@ -150,15 +142,11 @@ static void ImplCalendarUnSelectDateRange( IntDateSet* pTable,
...
@@ -150,15 +142,11 @@ static void ImplCalendarUnSelectDateRange( IntDateSet* pTable,
}
}
}
}
inline
void
ImplCalendarClearSelectDate
(
IntDateSet
*
pTable
)
inline
void
ImplCalendarClearSelectDate
(
IntDateSet
*
pTable
)
{
{
pTable
->
clear
();
pTable
->
clear
();
}
}
void
Calendar
::
ImplInit
(
WinBits
nWinStyle
)
void
Calendar
::
ImplInit
(
WinBits
nWinStyle
)
{
{
mpSelectTable
=
new
IntDateSet
;
mpSelectTable
=
new
IntDateSet
;
...
@@ -225,8 +213,6 @@ void Calendar::ImplInit( WinBits nWinStyle )
...
@@ -225,8 +213,6 @@ void Calendar::ImplInit( WinBits nWinStyle )
ImplInitSettings
();
ImplInitSettings
();
}
}
void
Calendar
::
ImplInitSettings
()
void
Calendar
::
ImplInitSettings
()
{
{
const
StyleSettings
&
rStyleSettings
=
GetSettings
().
GetStyleSettings
();
const
StyleSettings
&
rStyleSettings
=
GetSettings
().
GetStyleSettings
();
...
@@ -236,8 +222,6 @@ void Calendar::ImplInitSettings()
...
@@ -236,8 +222,6 @@ void Calendar::ImplInitSettings()
SetBackground
(
Wallpaper
(
rStyleSettings
.
GetFieldColor
()
)
);
SetBackground
(
Wallpaper
(
rStyleSettings
.
GetFieldColor
()
)
);
}
}
Calendar
::
Calendar
(
vcl
::
Window
*
pParent
,
WinBits
nWinStyle
)
:
Calendar
::
Calendar
(
vcl
::
Window
*
pParent
,
WinBits
nWinStyle
)
:
Control
(
pParent
,
nWinStyle
&
(
WB_TABSTOP
|
WB_GROUP
|
WB_BORDER
|
WB_3DLOOK
|
WB_RANGESELECT
|
WB_MULTISELECT
)
),
Control
(
pParent
,
nWinStyle
&
(
WB_TABSTOP
|
WB_GROUP
|
WB_BORDER
|
WB_3DLOOK
|
WB_RANGESELECT
|
WB_MULTISELECT
)
),
maCalendarWrapper
(
Application
::
GetAppLocaleDataWrapper
().
getComponentContext
()
),
maCalendarWrapper
(
Application
::
GetAppLocaleDataWrapper
().
getComponentContext
()
),
...
@@ -253,8 +237,6 @@ Calendar::Calendar( vcl::Window* pParent, WinBits nWinStyle ) :
...
@@ -253,8 +237,6 @@ Calendar::Calendar( vcl::Window* pParent, WinBits nWinStyle ) :
ImplInit
(
nWinStyle
);
ImplInit
(
nWinStyle
);
}
}
Calendar
::~
Calendar
()
Calendar
::~
Calendar
()
{
{
disposeOnce
();
disposeOnce
();
...
@@ -272,8 +254,6 @@ void Calendar::dispose()
...
@@ -272,8 +254,6 @@ void Calendar::dispose()
Control
::
dispose
();
Control
::
dispose
();
}
}
DayOfWeek
Calendar
::
ImplGetWeekStart
()
const
DayOfWeek
Calendar
::
ImplGetWeekStart
()
const
{
{
// Map i18n::Weekdays to Date DayOfWeek
// Map i18n::Weekdays to Date DayOfWeek
...
@@ -309,8 +289,6 @@ DayOfWeek Calendar::ImplGetWeekStart() const
...
@@ -309,8 +289,6 @@ DayOfWeek Calendar::ImplGetWeekStart() const
return
eDay
;
return
eDay
;
}
}
void
Calendar
::
ImplGetWeekFont
(
vcl
::
Font
&
rFont
)
const
void
Calendar
::
ImplGetWeekFont
(
vcl
::
Font
&
rFont
)
const
{
{
// weeknumber is displayed in WEEKNUMBER_HEIGHT%-Fontheight
// weeknumber is displayed in WEEKNUMBER_HEIGHT%-Fontheight
...
@@ -321,8 +299,6 @@ void Calendar::ImplGetWeekFont( vcl::Font& rFont ) const
...
@@ -321,8 +299,6 @@ void Calendar::ImplGetWeekFont( vcl::Font& rFont ) const
rFont
.
SetWeight
(
WEIGHT_NORMAL
);
rFont
.
SetWeight
(
WEIGHT_NORMAL
);
}
}
void
Calendar
::
ImplFormat
()
void
Calendar
::
ImplFormat
()
{
{
if
(
!
mbFormat
)
if
(
!
mbFormat
)
...
@@ -500,8 +476,6 @@ void Calendar::ImplFormat()
...
@@ -500,8 +476,6 @@ void Calendar::ImplFormat()
mbFormat
=
false
;
mbFormat
=
false
;
}
}
sal_uInt16
Calendar
::
ImplHitTest
(
const
Point
&
rPos
,
Date
&
rDate
)
const
sal_uInt16
Calendar
::
ImplHitTest
(
const
Point
&
rPos
,
Date
&
rDate
)
const
{
{
if
(
mbFormat
)
if
(
mbFormat
)
...
@@ -629,8 +603,6 @@ sal_uInt16 Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const
...
@@ -629,8 +603,6 @@ sal_uInt16 Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const
return
0
;
return
0
;
}
}
static
void
ImplDrawSpinArrow
(
OutputDevice
*
pDev
,
const
Rectangle
&
rRect
,
static
void
ImplDrawSpinArrow
(
OutputDevice
*
pDev
,
const
Rectangle
&
rRect
,
bool
bPrev
)
bool
bPrev
)
{
{
...
@@ -675,8 +647,6 @@ static void ImplDrawSpinArrow( OutputDevice* pDev, const Rectangle& rRect,
...
@@ -675,8 +647,6 @@ static void ImplDrawSpinArrow( OutputDevice* pDev, const Rectangle& rRect,
}
}
}
}
void
Calendar
::
ImplDrawSpin
(
bool
bDrawPrev
,
bool
bDrawNext
)
void
Calendar
::
ImplDrawSpin
(
bool
bDrawPrev
,
bool
bDrawNext
)
{
{
if
(
!
bDrawPrev
&&
!
bDrawNext
)
if
(
!
bDrawPrev
&&
!
bDrawNext
)
...
@@ -704,8 +674,6 @@ void Calendar::ImplDrawSpin( bool bDrawPrev, bool bDrawNext )
...
@@ -704,8 +674,6 @@ void Calendar::ImplDrawSpin( bool bDrawPrev, bool bDrawNext )
}
}
}
}
void
Calendar
::
ImplDrawDate
(
long
nX
,
long
nY
,
void
Calendar
::
ImplDrawDate
(
long
nX
,
long
nY
,
sal_uInt16
nDay
,
sal_uInt16
nMonth
,
sal_uInt16
nYear
,
sal_uInt16
nDay
,
sal_uInt16
nMonth
,
sal_uInt16
nYear
,
DayOfWeek
eDayOfWeek
,
DayOfWeek
eDayOfWeek
,
...
@@ -796,8 +764,6 @@ void Calendar::ImplDrawDate( long nX, long nY,
...
@@ -796,8 +764,6 @@ void Calendar::ImplDrawDate( long nX, long nY,
ImplInvertDropPos
();
ImplInvertDropPos
();
}
}
void
Calendar
::
ImplDraw
(
bool
bPaint
)
void
Calendar
::
ImplDraw
(
bool
bPaint
)
{
{
ImplFormat
();
ImplFormat
();
...
@@ -1038,8 +1004,6 @@ void Calendar::ImplDraw( bool bPaint )
...
@@ -1038,8 +1004,6 @@ void Calendar::ImplDraw( bool bPaint )
ImplDrawSpin
();
ImplDrawSpin
();
}
}
void
Calendar
::
ImplUpdateDate
(
const
Date
&
rDate
)
void
Calendar
::
ImplUpdateDate
(
const
Date
&
rDate
)
{
{
if
(
IsReallyVisible
()
&&
IsUpdateMode
()
)
if
(
IsReallyVisible
()
&&
IsUpdateMode
()
)
...
@@ -1055,8 +1019,6 @@ void Calendar::ImplUpdateDate( const Date& rDate )
...
@@ -1055,8 +1019,6 @@ void Calendar::ImplUpdateDate( const Date& rDate )
}
}
}
}
void
Calendar
::
ImplUpdateSelection
(
IntDateSet
*
pOld
)
void
Calendar
::
ImplUpdateSelection
(
IntDateSet
*
pOld
)
{
{
IntDateSet
*
pNew
=
mpSelectTable
;
IntDateSet
*
pNew
=
mpSelectTable
;
...
@@ -1082,8 +1044,6 @@ void Calendar::ImplUpdateSelection( IntDateSet* pOld )
...
@@ -1082,8 +1044,6 @@ void Calendar::ImplUpdateSelection( IntDateSet* pOld )
}
}
}
}
void
Calendar
::
ImplMouseSelect
(
const
Date
&
rDate
,
sal_uInt16
nHitTest
,
void
Calendar
::
ImplMouseSelect
(
const
Date
&
rDate
,
sal_uInt16
nHitTest
,
bool
bMove
,
bool
bExpand
,
bool
bExtended
)
bool
bMove
,
bool
bExpand
,
bool
bExtended
)
{
{
...
@@ -1194,8 +1154,6 @@ void Calendar::ImplMouseSelect( const Date& rDate, sal_uInt16 nHitTest,
...
@@ -1194,8 +1154,6 @@ void Calendar::ImplMouseSelect( const Date& rDate, sal_uInt16 nHitTest,
}
}
}
}
void
Calendar
::
ImplUpdate
(
bool
bCalcNew
)
void
Calendar
::
ImplUpdate
(
bool
bCalcNew
)
{
{
if
(
IsReallyVisible
()
&&
IsUpdateMode
()
)
if
(
IsReallyVisible
()
&&
IsUpdateMode
()
)
...
@@ -1220,8 +1178,6 @@ void Calendar::ImplUpdate( bool bCalcNew )
...
@@ -1220,8 +1178,6 @@ void Calendar::ImplUpdate( bool bCalcNew )
mbFormat
=
true
;
mbFormat
=
true
;
}
}
void
Calendar
::
ImplInvertDropPos
()
void
Calendar
::
ImplInvertDropPos
()
{
{
Rectangle
aRect
=
GetDateRect
(
maDropDate
);
//this is one Pixel to width and one to heigh
Rectangle
aRect
=
GetDateRect
(
maDropDate
);
//this is one Pixel to width and one to heigh
...
@@ -1230,8 +1186,6 @@ void Calendar::ImplInvertDropPos()
...
@@ -1230,8 +1186,6 @@ void Calendar::ImplInvertDropPos()
Invert
(
aRect
);
Invert
(
aRect
);
}
}
void
Calendar
::
ImplScroll
(
bool
bPrev
)
void
Calendar
::
ImplScroll
(
bool
bPrev
)
{
{
Date
aNewFirstMonth
=
GetFirstMonth
();
Date
aNewFirstMonth
=
GetFirstMonth
();
...
@@ -1247,8 +1201,6 @@ void Calendar::ImplScroll( bool bPrev )
...
@@ -1247,8 +1201,6 @@ void Calendar::ImplScroll( bool bPrev )
mbDirect
=
false
;
mbDirect
=
false
;
}
}
void
Calendar
::
ImplShowMenu
(
const
Point
&
rPos
,
const
Date
&
rDate
)
void
Calendar
::
ImplShowMenu
(
const
Point
&
rPos
,
const
Date
&
rDate
)
{
{
EndSelection
();
EndSelection
();
...
@@ -1312,8 +1264,6 @@ void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate )
...
@@ -1312,8 +1264,6 @@ void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate )
}
}
}
}
void
Calendar
::
ImplTracking
(
const
Point
&
rPos
,
bool
bRepeat
)
void
Calendar
::
ImplTracking
(
const
Point
&
rPos
,
bool
bRepeat
)
{
{
Date
aTempDate
=
maCurDate
;
Date
aTempDate
=
maCurDate
;
...
@@ -1335,8 +1285,6 @@ void Calendar::ImplTracking( const Point& rPos, bool bRepeat )
...
@@ -1335,8 +1285,6 @@ void Calendar::ImplTracking( const Point& rPos, bool bRepeat )
ImplMouseSelect
(
aTempDate
,
nHitTest
,
true
,
false
,
false
);
ImplMouseSelect
(
aTempDate
,
nHitTest
,
true
,
false
,
false
);
}
}
void
Calendar
::
ImplEndTracking
(
bool
bCancel
)
void
Calendar
::
ImplEndTracking
(
bool
bCancel
)
{
{
bool
bSelection
=
mbSelection
;
bool
bSelection
=
mbSelection
;
...
@@ -1402,8 +1350,6 @@ void Calendar::ImplEndTracking( bool bCancel )
...
@@ -1402,8 +1350,6 @@ void Calendar::ImplEndTracking( bool bCancel )
}
}
}
}
IMPL_LINK_NOARG_TYPED
(
Calendar
,
ScrollHdl
,
Timer
*
,
void
)
IMPL_LINK_NOARG_TYPED
(
Calendar
,
ScrollHdl
,
Timer
*
,
void
)
{
{
bool
bPrevIn
=
(
mnDragScrollHitTest
&
CALENDAR_HITTEST_PREV
)
!=
0
;
bool
bPrevIn
=
(
mnDragScrollHitTest
&
CALENDAR_HITTEST_PREV
)
!=
0
;
...
@@ -1416,8 +1362,6 @@ IMPL_LINK_NOARG_TYPED( Calendar, ScrollHdl, Timer*, void )
...
@@ -1416,8 +1362,6 @@ IMPL_LINK_NOARG_TYPED( Calendar, ScrollHdl, Timer*, void )
}
}
}
}
void
Calendar
::
MouseButtonDown
(
const
MouseEvent
&
rMEvt
)
void
Calendar
::
MouseButtonDown
(
const
MouseEvent
&
rMEvt
)
{
{
if
(
rMEvt
.
IsLeft
()
&&
!
mbMenuDown
)
if
(
rMEvt
.
IsLeft
()
&&
!
mbMenuDown
)
...
@@ -1479,8 +1423,6 @@ void Calendar::MouseButtonDown( const MouseEvent& rMEvt )
...
@@ -1479,8 +1423,6 @@ void Calendar::MouseButtonDown( const MouseEvent& rMEvt )
Control
::
MouseButtonDown
(
rMEvt
);
Control
::
MouseButtonDown
(
rMEvt
);
}
}
void
Calendar
::
MouseButtonUp
(
const
MouseEvent
&
rMEvt
)
void
Calendar
::
MouseButtonUp
(
const
MouseEvent
&
rMEvt
)
{
{
if
(
rMEvt
.
IsLeft
()
&&
mbSelection
)
if
(
rMEvt
.
IsLeft
()
&&
mbSelection
)
...
@@ -1489,8 +1431,6 @@ void Calendar::MouseButtonUp( const MouseEvent& rMEvt )
...
@@ -1489,8 +1431,6 @@ void Calendar::MouseButtonUp( const MouseEvent& rMEvt )
Control
::
MouseButtonUp
(
rMEvt
);
Control
::
MouseButtonUp
(
rMEvt
);
}
}
void
Calendar
::
MouseMove
(
const
MouseEvent
&
rMEvt
)
void
Calendar
::
MouseMove
(
const
MouseEvent
&
rMEvt
)
{
{
if
(
mbSelection
&&
rMEvt
.
GetButtons
()
)
if
(
mbSelection
&&
rMEvt
.
GetButtons
()
)
...
@@ -1499,8 +1439,6 @@ void Calendar::MouseMove( const MouseEvent& rMEvt )
...
@@ -1499,8 +1439,6 @@ void Calendar::MouseMove( const MouseEvent& rMEvt )
Control
::
MouseMove
(
rMEvt
);
Control
::
MouseMove
(
rMEvt
);
}
}
void
Calendar
::
Tracking
(
const
TrackingEvent
&
rTEvt
)
void
Calendar
::
Tracking
(
const
TrackingEvent
&
rTEvt
)
{
{
Point
aMousePos
=
rTEvt
.
GetMouseEvent
().
GetPosPixel
();
Point
aMousePos
=
rTEvt
.
GetMouseEvent
().
GetPosPixel
();
...
@@ -1511,8 +1449,6 @@ void Calendar::Tracking( const TrackingEvent& rTEvt )
...
@@ -1511,8 +1449,6 @@ void Calendar::Tracking( const TrackingEvent& rTEvt )
ImplTracking
(
aMousePos
,
rTEvt
.
IsTrackingRepeat
()
);
ImplTracking
(
aMousePos
,
rTEvt
.
IsTrackingRepeat
()
);
}
}
void
Calendar
::
KeyInput
(
const
KeyEvent
&
rKEvt
)
void
Calendar
::
KeyInput
(
const
KeyEvent
&
rKEvt
)
{
{
Date
aNewDate
=
maCurDate
;
Date
aNewDate
=
maCurDate
;
...
@@ -1628,39 +1564,29 @@ void Calendar::KeyInput( const KeyEvent& rKEvt )
...
@@ -1628,39 +1564,29 @@ void Calendar::KeyInput( const KeyEvent& rKEvt )
}
}
}
}
void
Calendar
::
Paint
(
vcl
::
RenderContext
&
/*rRenderContext*/
,
const
Rectangle
&
)
void
Calendar
::
Paint
(
vcl
::
RenderContext
&
/*rRenderContext*/
,
const
Rectangle
&
)
{
{
ImplDraw
(
true
);
ImplDraw
(
true
);
}
}
void
Calendar
::
GetFocus
()
void
Calendar
::
GetFocus
()
{
{
ImplUpdateDate
(
maCurDate
);
ImplUpdateDate
(
maCurDate
);
Control
::
GetFocus
();
Control
::
GetFocus
();
}
}
void
Calendar
::
LoseFocus
()
void
Calendar
::
LoseFocus
()
{
{
HideFocus
();
HideFocus
();
Control
::
LoseFocus
();
Control
::
LoseFocus
();
}
}
void
Calendar
::
Resize
()
void
Calendar
::
Resize
()
{
{
ImplUpdate
(
true
);
ImplUpdate
(
true
);
Control
::
Resize
();
Control
::
Resize
();
}
}
void
Calendar
::
RequestHelp
(
const
HelpEvent
&
rHEvt
)
void
Calendar
::
RequestHelp
(
const
HelpEvent
&
rHEvt
)
{
{
if
(
rHEvt
.
GetMode
()
&
(
HelpEventMode
::
QUICK
|
HelpEventMode
::
BALLOON
)
)
if
(
rHEvt
.
GetMode
()
&
(
HelpEventMode
::
QUICK
|
HelpEventMode
::
BALLOON
)
)
...
@@ -1708,8 +1634,6 @@ void Calendar::RequestHelp( const HelpEvent& rHEvt )
...
@@ -1708,8 +1634,6 @@ void Calendar::RequestHelp( const HelpEvent& rHEvt )
Control
::
RequestHelp
(
rHEvt
);
Control
::
RequestHelp
(
rHEvt
);
}
}
void
Calendar
::
Command
(
const
CommandEvent
&
rCEvt
)
void
Calendar
::
Command
(
const
CommandEvent
&
rCEvt
)
{
{
if
(
rCEvt
.
GetCommand
()
==
COMMAND_CONTEXTMENU
)
if
(
rCEvt
.
GetCommand
()
==
COMMAND_CONTEXTMENU
)
...
@@ -1755,8 +1679,6 @@ void Calendar::Command( const CommandEvent& rCEvt )
...
@@ -1755,8 +1679,6 @@ void Calendar::Command( const CommandEvent& rCEvt )
Control
::
Command
(
rCEvt
);
Control
::
Command
(
rCEvt
);
}
}
void
Calendar
::
StateChanged
(
StateChangedType
nType
)
void
Calendar
::
StateChanged
(
StateChangedType
nType
)
{
{
Control
::
StateChanged
(
nType
);
Control
::
StateChanged
(
nType
);
...
@@ -1765,8 +1687,6 @@ void Calendar::StateChanged( StateChangedType nType )
...
@@ -1765,8 +1687,6 @@ void Calendar::StateChanged( StateChangedType nType )
ImplFormat
();
ImplFormat
();
}
}
void
Calendar
::
DataChanged
(
const
DataChangedEvent
&
rDCEvt
)
void
Calendar
::
DataChanged
(
const
DataChangedEvent
&
rDCEvt
)
{
{
Control
::
DataChanged
(
rDCEvt
);
Control
::
DataChanged
(
rDCEvt
);
...
@@ -1781,43 +1701,31 @@ void Calendar::DataChanged( const DataChangedEvent& rDCEvt )
...
@@ -1781,43 +1701,31 @@ void Calendar::DataChanged( const DataChangedEvent& rDCEvt )
}
}
}
}
void
Calendar
::
SelectionChanging
()
void
Calendar
::
SelectionChanging
()
{
{
maSelectionChangingHdl
.
Call
(
this
);
maSelectionChangingHdl
.
Call
(
this
);
}
}
void
Calendar
::
DateRangeChanged
()
void
Calendar
::
DateRangeChanged
()
{
{
maDateRangeChangedHdl
.
Call
(
this
);
maDateRangeChangedHdl
.
Call
(
this
);
}
}
void
Calendar
::
RequestDateInfo
()
void
Calendar
::
RequestDateInfo
()
{
{
maRequestDateInfoHdl
.
Call
(
this
);
maRequestDateInfoHdl
.
Call
(
this
);
}
}
void
Calendar
::
DoubleClick
()
void
Calendar
::
DoubleClick
()
{
{
maDoubleClickHdl
.
Call
(
this
);
maDoubleClickHdl
.
Call
(
this
);
}
}
void
Calendar
::
Select
()
void
Calendar
::
Select
()
{
{
maSelectHdl
.
Call
(
this
);
maSelectHdl
.
Call
(
this
);
}
}
void
Calendar
::
SelectDate
(
const
Date
&
rDate
,
bool
bSelect
)
void
Calendar
::
SelectDate
(
const
Date
&
rDate
,
bool
bSelect
)
{
{
if
(
!
rDate
.
IsValidAndGregorian
()
)
if
(
!
rDate
.
IsValidAndGregorian
()
)
...
@@ -1834,8 +1742,6 @@ void Calendar::SelectDate( const Date& rDate, bool bSelect )
...
@@ -1834,8 +1742,6 @@ void Calendar::SelectDate( const Date& rDate, bool bSelect )
ImplUpdateSelection
(
pOldSel
.
get
()
);
ImplUpdateSelection
(
pOldSel
.
get
()
);
}
}
void
Calendar
::
SetNoSelection
()
void
Calendar
::
SetNoSelection
()
{
{
boost
::
scoped_ptr
<
IntDateSet
>
pOldSel
;
boost
::
scoped_ptr
<
IntDateSet
>
pOldSel
;
...
@@ -1849,15 +1755,11 @@ void Calendar::SetNoSelection()
...
@@ -1849,15 +1755,11 @@ void Calendar::SetNoSelection()
ImplUpdateSelection
(
pOldSel
.
get
()
);
ImplUpdateSelection
(
pOldSel
.
get
()
);
}
}
bool
Calendar
::
IsDateSelected
(
const
Date
&
rDate
)
const
bool
Calendar
::
IsDateSelected
(
const
Date
&
rDate
)
const
{
{
return
mpSelectTable
->
find
(
rDate
.
GetDate
()
)
!=
mpSelectTable
->
end
();
return
mpSelectTable
->
find
(
rDate
.
GetDate
()
)
!=
mpSelectTable
->
end
();
}
}
Date
Calendar
::
GetFirstSelectedDate
()
const
Date
Calendar
::
GetFirstSelectedDate
()
const
{
{
if
(
!
mpSelectTable
->
empty
()
)
if
(
!
mpSelectTable
->
empty
()
)
...
@@ -1869,8 +1771,6 @@ Date Calendar::GetFirstSelectedDate() const
...
@@ -1869,8 +1771,6 @@ Date Calendar::GetFirstSelectedDate() const
}
}
}
}
void
Calendar
::
SetCurDate
(
const
Date
&
rNewDate
)
void
Calendar
::
SetCurDate
(
const
Date
&
rNewDate
)
{
{
if
(
!
rNewDate
.
IsValidAndGregorian
()
)
if
(
!
rNewDate
.
IsValidAndGregorian
()
)
...
@@ -1927,8 +1827,6 @@ void Calendar::SetCurDate( const Date& rNewDate )
...
@@ -1927,8 +1827,6 @@ void Calendar::SetCurDate( const Date& rNewDate )
}
}
}
}
void
Calendar
::
SetFirstDate
(
const
Date
&
rNewFirstDate
)
void
Calendar
::
SetFirstDate
(
const
Date
&
rNewFirstDate
)
{
{
if
(
maFirstDate
!=
rNewFirstDate
)
if
(
maFirstDate
!=
rNewFirstDate
)
...
@@ -1939,8 +1837,6 @@ void Calendar::SetFirstDate( const Date& rNewFirstDate )
...
@@ -1939,8 +1837,6 @@ void Calendar::SetFirstDate( const Date& rNewFirstDate )
}
}
}
}
Date
Calendar
::
GetFirstMonth
()
const
Date
Calendar
::
GetFirstMonth
()
const
{
{
if
(
maFirstDate
.
GetDay
()
>
1
)
if
(
maFirstDate
.
GetDay
()
>
1
)
...
@@ -1954,8 +1850,6 @@ Date Calendar::GetFirstMonth() const
...
@@ -1954,8 +1850,6 @@ Date Calendar::GetFirstMonth() const
return
maFirstDate
;
return
maFirstDate
;
}
}
Date
Calendar
::
GetLastMonth
()
const
Date
Calendar
::
GetLastMonth
()
const
{
{
Date
aDate
=
GetFirstMonth
();
Date
aDate
=
GetFirstMonth
();
...
@@ -1966,8 +1860,6 @@ Date Calendar::GetLastMonth() const
...
@@ -1966,8 +1860,6 @@ Date Calendar::GetLastMonth() const
return
aDate
;
return
aDate
;
}
}
sal_uInt16
Calendar
::
GetMonthCount
()
const
sal_uInt16
Calendar
::
GetMonthCount
()
const
{
{
if
(
mbFormat
)
if
(
mbFormat
)
...
@@ -1976,8 +1868,6 @@ sal_uInt16 Calendar::GetMonthCount() const
...
@@ -1976,8 +1868,6 @@ sal_uInt16 Calendar::GetMonthCount() const
return
(
sal_uInt16
)(
mnMonthPerLine
*
mnLines
);
return
(
sal_uInt16
)(
mnMonthPerLine
*
mnLines
);
}
}
bool
Calendar
::
GetDate
(
const
Point
&
rPos
,
Date
&
rDate
)
const
bool
Calendar
::
GetDate
(
const
Point
&
rPos
,
Date
&
rDate
)
const
{
{
Date
aDate
=
maCurDate
;
Date
aDate
=
maCurDate
;
...
@@ -1991,8 +1881,6 @@ bool Calendar::GetDate( const Point& rPos, Date& rDate ) const
...
@@ -1991,8 +1881,6 @@ bool Calendar::GetDate( const Point& rPos, Date& rDate ) const
return
false
;
return
false
;
}
}
Rectangle
Calendar
::
GetDateRect
(
const
Date
&
rDate
)
const
Rectangle
Calendar
::
GetDateRect
(
const
Date
&
rDate
)
const
{
{
Rectangle
aRect
;
Rectangle
aRect
;
...
@@ -2093,8 +1981,6 @@ Rectangle Calendar::GetDateRect( const Date& rDate ) const
...
@@ -2093,8 +1981,6 @@ Rectangle Calendar::GetDateRect( const Date& rDate ) const
return
aRect
;
return
aRect
;
}
}
void
Calendar
::
StartSelection
()
void
Calendar
::
StartSelection
()
{
{
if
(
mpOldSelectTable
)
if
(
mpOldSelectTable
)
...
@@ -2105,8 +1991,6 @@ void Calendar::StartSelection()
...
@@ -2105,8 +1991,6 @@ void Calendar::StartSelection()
mbSelection
=
true
;
mbSelection
=
true
;
}
}
void
Calendar
::
EndSelection
()
void
Calendar
::
EndSelection
()
{
{
if
(
mbDrag
||
mbSpinDown
||
mbSelection
)
if
(
mbDrag
||
mbSpinDown
||
mbSelection
)
...
@@ -2123,8 +2007,6 @@ void Calendar::EndSelection()
...
@@ -2123,8 +2007,6 @@ void Calendar::EndSelection()
}
}
}
}
Size
Calendar
::
CalcWindowSizePixel
(
long
nCalcMonthPerLine
,
Size
Calendar
::
CalcWindowSizePixel
(
long
nCalcMonthPerLine
,
long
nCalcLines
)
const
long
nCalcLines
)
const
{
{
...
@@ -2174,8 +2056,6 @@ Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine,
...
@@ -2174,8 +2056,6 @@ Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine,
return
aSize
;
return
aSize
;
}
}
#define CALFIELD_EXTRA_BUTTON_WIDTH 14
#define CALFIELD_EXTRA_BUTTON_WIDTH 14
#define CALFIELD_EXTRA_BUTTON_HEIGHT 8
#define CALFIELD_EXTRA_BUTTON_HEIGHT 8
#define CALFIELD_SEP_X 6
#define CALFIELD_SEP_X 6
...
@@ -2183,8 +2063,6 @@ Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine,
...
@@ -2183,8 +2063,6 @@ Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine,
#define CALFIELD_BORDER_YTOP 4
#define CALFIELD_BORDER_YTOP 4
#define CALFIELD_BORDER_Y 5
#define CALFIELD_BORDER_Y 5
class
ImplCFieldFloatWin
:
public
FloatingWindow
class
ImplCFieldFloatWin
:
public
FloatingWindow
{
{
private
:
private
:
...
@@ -2208,8 +2086,6 @@ public:
...
@@ -2208,8 +2086,6 @@ public:
virtual
bool
Notify
(
NotifyEvent
&
rNEvt
)
SAL_OVERRIDE
;
virtual
bool
Notify
(
NotifyEvent
&
rNEvt
)
SAL_OVERRIDE
;
};
};
ImplCFieldFloatWin
::
ImplCFieldFloatWin
(
vcl
::
Window
*
pParent
)
:
ImplCFieldFloatWin
::
ImplCFieldFloatWin
(
vcl
::
Window
*
pParent
)
:
FloatingWindow
(
pParent
,
WB_BORDER
|
WB_SYSTEMWINDOW
|
WB_NOSHADOW
)
FloatingWindow
(
pParent
,
WB_BORDER
|
WB_SYSTEMWINDOW
|
WB_NOSHADOW
)
{
{
...
@@ -2219,8 +2095,6 @@ ImplCFieldFloatWin::ImplCFieldFloatWin( vcl::Window* pParent ) :
...
@@ -2219,8 +2095,6 @@ ImplCFieldFloatWin::ImplCFieldFloatWin( vcl::Window* pParent ) :
mpFixedLine
=
NULL
;
mpFixedLine
=
NULL
;
}
}
ImplCFieldFloatWin
::~
ImplCFieldFloatWin
()
ImplCFieldFloatWin
::~
ImplCFieldFloatWin
()
{
{
disposeOnce
();
disposeOnce
();
...
@@ -2235,8 +2109,6 @@ void ImplCFieldFloatWin::dispose()
...
@@ -2235,8 +2109,6 @@ void ImplCFieldFloatWin::dispose()
FloatingWindow
::
dispose
();
FloatingWindow
::
dispose
();
}
}
PushButton
*
ImplCFieldFloatWin
::
EnableTodayBtn
(
bool
bEnable
)
PushButton
*
ImplCFieldFloatWin
::
EnableTodayBtn
(
bool
bEnable
)
{
{
if
(
bEnable
)
if
(
bEnable
)
...
@@ -2263,8 +2135,6 @@ PushButton* ImplCFieldFloatWin::EnableTodayBtn( bool bEnable )
...
@@ -2263,8 +2135,6 @@ PushButton* ImplCFieldFloatWin::EnableTodayBtn( bool bEnable )
return
mpTodayBtn
;
return
mpTodayBtn
;
}
}
PushButton
*
ImplCFieldFloatWin
::
EnableNoneBtn
(
bool
bEnable
)
PushButton
*
ImplCFieldFloatWin
::
EnableNoneBtn
(
bool
bEnable
)
{
{
if
(
bEnable
)
if
(
bEnable
)
...
@@ -2291,8 +2161,6 @@ PushButton* ImplCFieldFloatWin::EnableNoneBtn( bool bEnable )
...
@@ -2291,8 +2161,6 @@ PushButton* ImplCFieldFloatWin::EnableNoneBtn( bool bEnable )
return
mpNoneBtn
;
return
mpNoneBtn
;
}
}
void
ImplCFieldFloatWin
::
ArrangeButtons
()
void
ImplCFieldFloatWin
::
ArrangeButtons
()
{
{
long
nBtnHeight
=
0
;
long
nBtnHeight
=
0
;
...
@@ -2353,8 +2221,6 @@ void ImplCFieldFloatWin::ArrangeButtons()
...
@@ -2353,8 +2221,6 @@ void ImplCFieldFloatWin::ArrangeButtons()
}
}
}
}
bool
ImplCFieldFloatWin
::
Notify
(
NotifyEvent
&
rNEvt
)
bool
ImplCFieldFloatWin
::
Notify
(
NotifyEvent
&
rNEvt
)
{
{
if
(
rNEvt
.
GetType
()
==
MouseNotifyEvent
::
KEYINPUT
)
if
(
rNEvt
.
GetType
()
==
MouseNotifyEvent
::
KEYINPUT
)
...
@@ -2394,8 +2260,6 @@ void CalendarField::dispose()
...
@@ -2394,8 +2260,6 @@ void CalendarField::dispose()
DateField
::
dispose
();
DateField
::
dispose
();
}
}
IMPL_LINK
(
CalendarField
,
ImplSelectHdl
,
Calendar
*
,
pCalendar
)
IMPL_LINK
(
CalendarField
,
ImplSelectHdl
,
Calendar
*
,
pCalendar
)
{
{
if
(
!
pCalendar
->
IsTravelSelect
()
)
if
(
!
pCalendar
->
IsTravelSelect
()
)
...
@@ -2415,8 +2279,6 @@ IMPL_LINK( CalendarField, ImplSelectHdl, Calendar*, pCalendar )
...
@@ -2415,8 +2279,6 @@ IMPL_LINK( CalendarField, ImplSelectHdl, Calendar*, pCalendar )
return
0
;
return
0
;
}
}
IMPL_LINK
(
CalendarField
,
ImplClickHdl
,
PushButton
*
,
pBtn
)
IMPL_LINK
(
CalendarField
,
ImplClickHdl
,
PushButton
*
,
pBtn
)
{
{
mpFloatWin
->
EndPopupMode
();
mpFloatWin
->
EndPopupMode
();
...
@@ -2447,8 +2309,6 @@ IMPL_LINK( CalendarField, ImplClickHdl, PushButton*, pBtn )
...
@@ -2447,8 +2309,6 @@ IMPL_LINK( CalendarField, ImplClickHdl, PushButton*, pBtn )
return
0
;
return
0
;
}
}
IMPL_LINK_NOARG
(
CalendarField
,
ImplPopupModeEndHdl
)
IMPL_LINK_NOARG
(
CalendarField
,
ImplPopupModeEndHdl
)
{
{
EndDropDown
();
EndDropDown
();
...
@@ -2457,15 +2317,11 @@ IMPL_LINK_NOARG(CalendarField, ImplPopupModeEndHdl)
...
@@ -2457,15 +2317,11 @@ IMPL_LINK_NOARG(CalendarField, ImplPopupModeEndHdl)
return
0
;
return
0
;
}
}
void
CalendarField
::
Select
()
void
CalendarField
::
Select
()
{
{
maSelectHdl
.
Call
(
this
);
maSelectHdl
.
Call
(
this
);
}
}
bool
CalendarField
::
ShowDropDown
(
bool
bShow
)
bool
CalendarField
::
ShowDropDown
(
bool
bShow
)
{
{
if
(
bShow
)
if
(
bShow
)
...
@@ -2514,15 +2370,11 @@ bool CalendarField::ShowDropDown( bool bShow )
...
@@ -2514,15 +2370,11 @@ bool CalendarField::ShowDropDown( bool bShow )
return
true
;
return
true
;
}
}
VclPtr
<
Calendar
>
CalendarField
::
CreateCalendar
(
vcl
::
Window
*
pParent
)
VclPtr
<
Calendar
>
CalendarField
::
CreateCalendar
(
vcl
::
Window
*
pParent
)
{
{
return
VclPtr
<
Calendar
>::
Create
(
pParent
,
mnCalendarStyle
|
WB_TABSTOP
);
return
VclPtr
<
Calendar
>::
Create
(
pParent
,
mnCalendarStyle
|
WB_TABSTOP
);
}
}
Calendar
*
CalendarField
::
GetCalendar
()
Calendar
*
CalendarField
::
GetCalendar
()
{
{
if
(
!
mpFloatWin
)
if
(
!
mpFloatWin
)
...
@@ -2537,8 +2389,6 @@ Calendar* CalendarField::GetCalendar()
...
@@ -2537,8 +2389,6 @@ Calendar* CalendarField::GetCalendar()
return
mpCalendar
;
return
mpCalendar
;
}
}
void
CalendarField
::
StateChanged
(
StateChangedType
nStateChange
)
void
CalendarField
::
StateChanged
(
StateChangedType
nStateChange
)
{
{
DateField
::
StateChanged
(
nStateChange
);
DateField
::
StateChanged
(
nStateChange
);
...
...
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