summaryrefslogtreecommitdiffstats
path: root/svtools/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-03-29 18:14:00 +0200
committerMichael Stahl <mstahl@redhat.com>2012-04-02 23:15:20 +0200
commite5a916eeeed8e79a3d105040f3fb832134bf7b32 (patch)
tree64ae3ff9d126936a8b52fa1546667028f33593db /svtools/inc
parentConvert SV_PTRARRAY to ::std::deque (diff)
downloadcore-e5a916eeeed8e79a3d105040f3fb832134bf7b32.tar.gz
core-e5a916eeeed8e79a3d105040f3fb832134bf7b32.zip
Convert tools/table.hxx usage to std::set in Calendar class in svtools module
Also change the API slightly, removing GetSelectedData(int index) and replacing it with GetLastSelectedDate(), since the only usage of GetSelectedData in the codebase only needed to get the last date.
Diffstat (limited to 'svtools/inc')
-rw-r--r--svtools/inc/svtools/calendar.hxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/svtools/inc/svtools/calendar.hxx b/svtools/inc/svtools/calendar.hxx
index 4d099d401c6d..c9df5a175adf 100644
--- a/svtools/inc/svtools/calendar.hxx
+++ b/svtools/inc/svtools/calendar.hxx
@@ -36,8 +36,8 @@
#include <vcl/ctrl.hxx>
#include <vcl/timer.hxx>
#include <vcl/field.hxx>
+#include <set>
-class Table;
class MouseEvent;
class TrackingEvent;
class KeyEvent;
@@ -162,12 +162,15 @@ calls or by ending a selection.
// - Calendar -
// ------------
+typedef std::set<sal_uInt32> IntDateSet;
+
+
class SVT_DLLPUBLIC Calendar : public Control
{
private:
- Table* mpSelectTable;
- Table* mpOldSelectTable;
- Table* mpRestoreSelectTable;
+ IntDateSet* mpSelectTable;
+ IntDateSet* mpOldSelectTable;
+ IntDateSet* mpRestoreSelectTable;
XubString* mpDayText[31];
XubString maDayText;
XubString maWeekText;
@@ -250,7 +253,7 @@ private:
sal_uLong nToday = 0 );
SVT_DLLPRIVATE void ImplDraw( sal_Bool bPaint = sal_False );
SVT_DLLPRIVATE void ImplUpdateDate( const Date& rDate );
- SVT_DLLPRIVATE void ImplUpdateSelection( Table* pOld );
+ SVT_DLLPRIVATE void ImplUpdateSelection( IntDateSet* pOld );
SVT_DLLPRIVATE void ImplMouseSelect( const Date& rDate, sal_uInt16 nHitTest,
sal_Bool bMove, sal_Bool bExpand, sal_Bool bExtended );
SVT_DLLPRIVATE void ImplUpdate( sal_Bool bCalcNew = sal_False );
@@ -296,7 +299,8 @@ public:
void SelectDate( const Date& rDate, sal_Bool bSelect = sal_True );
void SetNoSelection();
sal_Bool IsDateSelected( const Date& rDate ) const;
- Date GetSelectDate( sal_uLong nIndex = 0 ) const;
+ Date GetFirstSelectedDate() const;
+ Date GetLastSelectedDate() const;
void EnableCallEverySelect( sal_Bool bEvery = sal_True ) { mbAllSel = bEvery; }
sal_Bool IsCallEverySelectEnabled() const { return mbAllSel; }