summaryrefslogtreecommitdiff
path: root/forms/source/xforms
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-09-28 15:49:26 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-10-01 07:34:23 +0000
commitfc04f76336fdf8c96e35382cdeb497e2f939705c (patch)
tree70c9bbd054a34a9bca9d22bb7afbb9c4349beff0 /forms/source/xforms
parenteb4811590c85895ce531674596bdd6afb3397725 (diff)
fdo#82577: Handle Time
Put the TOOLS Time class in the tools namespace. Avoids clash with the X11 Time typedef. Change-Id: Iac57d5aef35e81ace1ee0d5e6d76cb278f8ad866 Reviewed-on: https://gerrit.libreoffice.org/11684 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'forms/source/xforms')
-rw-r--r--forms/source/xforms/datatypes.cxx10
-rw-r--r--forms/source/xforms/xpathlib/xpathlib.cxx6
2 files changed, 8 insertions, 8 deletions
diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx
index 6c8d643ecd13..84d9eb9dabf7 100644
--- a/forms/source/xforms/datatypes.cxx
+++ b/forms/source/xforms/datatypes.cxx
@@ -804,11 +804,11 @@ namespace xforms
{
Any aTypedValue = Convert::get().toAny( value, getCppuType() );
- Time aValue;
+ css::util::Time aValue;
if ( !( aTypedValue >>= aValue ) )
return false;
- ::Time aToolsTime( aValue.Hours, aValue.Minutes, aValue.Seconds, aValue.NanoSeconds );
+ ::tools::Time aToolsTime( aValue.Hours, aValue.Minutes, aValue.Seconds, aValue.NanoSeconds );
// no loss/rounding; IEEE 754 double-precision floating-point
// has a mantissa of 53 bits; we need at the very most 50 bits:
// format of aToolsTime.GetTime() is (in decimal) hhmmssnnnnnnnnn
@@ -830,9 +830,9 @@ namespace xforms
void OTimeType::normalizeValue( const Any& _rValue, double& _rDoubleValue ) const
{
- Time aValue;
+ css::util::Time aValue;
OSL_VERIFY( _rValue >>= aValue );
- ::Time aToolsTime( aValue.Hours, aValue.Minutes, aValue.Seconds, aValue.NanoSeconds );
+ ::tools::Time aToolsTime( aValue.Hours, aValue.Minutes, aValue.Seconds, aValue.NanoSeconds );
_rDoubleValue = aToolsTime.GetTime();
}
@@ -855,7 +855,7 @@ namespace xforms
{
::DateTime aToolsValue(
::Date( _rValue.Day, _rValue.Month, _rValue.Year ),
- ::Time( _rValue.Hours, _rValue.Minutes, _rValue.Seconds, _rValue.NanoSeconds )
+ ::tools::Time( _rValue.Hours, _rValue.Minutes, _rValue.Seconds, _rValue.NanoSeconds )
);
double fValue = 0;
diff --git a/forms/source/xforms/xpathlib/xpathlib.cxx b/forms/source/xforms/xpathlib/xpathlib.cxx
index b20c2ab79597..776a264f9a88 100644
--- a/forms/source/xforms/xpathlib/xpathlib.cxx
+++ b/forms/source/xforms/xpathlib/xpathlib.cxx
@@ -233,7 +233,7 @@ void xforms_propertyFunction(xmlXPathParserContextPtr ctxt, int nargs)
xmlXPathReturnEmptyString(ctxt);
}
-// Date and Time Functions
+// Date and tools::Time Functions
static OString makeDateTimeString (const DateTime& aDateTime, bool bUTC = true)
{
@@ -277,7 +277,7 @@ void xforms_nowFunction(xmlXPathParserContextPtr ctxt, int /*nargs*/)
3.2.7.2 Canonical representation
The canonical representation for dateTime is defined by prohibiting certain options
from the Lexical representation (par.3.2.7.1). Specifically, either the time zone must
- be omitted or, if present, the time zone must be Coordinated Universal Time (UTC)
+ be omitted or, if present, the time zone must be Coordinated Universal tools::Time (UTC)
indicated by a "Z".
*/
DateTime aDateTime( DateTime::SYSTEM );
@@ -317,7 +317,7 @@ static bool parseDateTime(const OUString& aString, DateTime& aDateTime)
sal_Int32 nSecond = aTimeString.getToken(0, ':', nIndex).toInt32();
Date tmpDate((sal_uInt16)nDay, (sal_uInt16)nMonth, (sal_uInt16)nYear);
- Time tmpTime(nHour, nMinute, nSecond);
+ tools::Time tmpTime(nHour, nMinute, nSecond);
DateTime tmpDateTime(tmpDate, tmpTime);
if (aString.indexOf(aUTCString) < 0)
tmpDateTime.ConvertToUTC();