summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-07-28 16:08:26 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2013-08-02 11:35:57 +0000
commited904af8665f6f7590fedd4ad608018f78c686c1 (patch)
tree2590bb19a2621feed3b2b490a91342a382621d0a /xmloff
parent784cfa382be438240dfc936b7551c5012aada9ae (diff)
fdo#67235 adapt form control code to time nanosecond API change
Conflicts: offapi/type_reference/offapi.rdb Change-Id: If68ecf0691919d71d06d7b97d46db115013f9805 Reviewed-on: https://gerrit.libreoffice.org/5149 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/forms/handler/vcl_time_handler.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/xmloff/source/forms/handler/vcl_time_handler.cxx b/xmloff/source/forms/handler/vcl_time_handler.cxx
index c73392f75a14..b50806018661 100644
--- a/xmloff/source/forms/handler/vcl_time_handler.cxx
+++ b/xmloff/source/forms/handler/vcl_time_handler.cxx
@@ -56,7 +56,7 @@ namespace xmloff
//------------------------------------------------------------------------------------------------------------------
OUString VCLTimeHandler::getAttributeValue( const Any& i_propertyValue ) const
{
- sal_Int32 nVCLTime(0);
+ sal_Int64 nVCLTime(0);
OSL_VERIFY( i_propertyValue >>= nVCLTime );
::Time aVCLTime( nVCLTime );
@@ -74,7 +74,7 @@ namespace xmloff
//------------------------------------------------------------------------------------------------------------------
bool VCLTimeHandler::getPropertyValues( const OUString i_attributeValue, PropertyValues& o_propertyValues ) const
{
- sal_Int32 nVCLTime(0);
+ sal_Int64 nVCLTime(0);
Duration aDuration;
if (::sax::Converter::convertDuration( aDuration, i_attributeValue ))
@@ -86,11 +86,13 @@ namespace xmloff
else
{
// compatibility format, before we wrote those values in XML-schema compatible form
- if (!::sax::Converter::convertNumber(nVCLTime, i_attributeValue))
+ if (!::sax::Converter::convertNumber64(nVCLTime, i_attributeValue))
{
OSL_ENSURE( false, "VCLTimeHandler::getPropertyValues: unknown time format (no XML-schema time, no legacy integer)!" );
return false;
}
+ // legacy integer was in centiseconds
+ nVCLTime *= ::Time::nanoPerCenti;
}
const Any aPropertyValue( makeAny( nVCLTime ) );