summaryrefslogtreecommitdiff
path: root/sc/source/core/inc/interpre.hxx
diff options
context:
space:
mode:
authorWinfried Donkers <winfrieddonkers@libreoffice.org>2014-04-04 13:56:07 +0200
committerEike Rathke <erack@redhat.com>2014-04-09 15:54:28 +0000
commit8facc14e88251d9356995d9e8e213084212e88a5 (patch)
tree9b80f813bfe48c6b3e36168f3b2aadfb48a2ce61 /sc/source/core/inc/interpre.hxx
parentb818619266e794ad5eadb7f859c3016b377f5bd3 (diff)
fdo#73147 improve function code for speed
Change-Id: I8862c1aaf245796a475ce52bec6c8e9a32862bbd Reviewed-on: https://gerrit.libreoffice.org/8841 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source/core/inc/interpre.hxx')
-rw-r--r--sc/source/core/inc/interpre.hxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index e0e36edc87ca..7f2eb64ae737 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -590,8 +590,9 @@ void ScGetDay();
void ScGetDayOfWeek();
void ScGetWeekOfYear();
void ScEasterSunday();
-sal_uInt16 GetWeekendAndHolidayMasks( const sal_uInt8 nParamCount, const Date& rNullDate,
+sal_uInt16 GetWeekendAndHolidayMasks( const sal_uInt8 nParamCount, const sal_uInt32 nNullDate,
::std::vector<double>& rSortArray, OUString& rWeekendDays, bool bWeekendMask[ 7 ] );
+inline sal_Int16 GetDayOfWeek( sal_Int32 n );
void ScNetWorkdays_MS();
void ScWorkday_MS();
void ScGetHour();
@@ -946,6 +947,11 @@ inline double ScInterpreter::div( const double& fNumerator, const double& fDenom
CreateDoubleError( errDivisionByZero);
}
+inline sal_Int16 ScInterpreter::GetDayOfWeek( sal_Int32 n )
+{ // monday = 0, ..., sunday = 6
+ return static_cast< sal_Int16 >( ( n - 1 ) % 7 );
+}
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */