avmedia/source/framework/mediacontrol.cxx | 4 basic/source/comp/sbcomp.cxx | 6 basic/source/runtime/methods.cxx | 18 - basic/source/runtime/methods1.cxx | 2 basic/source/sbx/sbxdate.cxx | 2 connectivity/source/commontools/DateConversion.cxx | 2 connectivity/source/commontools/FValue.cxx | 20 +- connectivity/source/commontools/dbtools.cxx | 2 connectivity/source/drivers/ado/APreparedStatement.cxx | 2 connectivity/source/drivers/calc/CTable.cxx | 16 - connectivity/source/drivers/evoab2/NPreparedStatement.cxx | 2 connectivity/source/drivers/file/FDateFunctions.cxx | 2 connectivity/source/drivers/firebird/PreparedStatement.cxx | 2 connectivity/source/drivers/firebird/ResultSet.cxx | 2 connectivity/source/drivers/jdbc/ConnectionLog.cxx | 2 connectivity/source/drivers/kab/KPreparedStatement.cxx | 98 ++-------- connectivity/source/drivers/kab/KResultSet.cxx | 2 connectivity/source/drivers/macab/MacabPreparedStatement.cxx | 98 ++-------- connectivity/source/drivers/macab/MacabResultSet.cxx | 20 +- connectivity/source/drivers/mork/MPreparedStatement.cxx | 2 connectivity/source/drivers/mozab/MPreparedStatement.cxx | 2 connectivity/source/drivers/odbc/OPreparedStatement.cxx | 2 connectivity/source/drivers/odbc/OResultSet.cxx | 2 connectivity/source/parse/sqlnode.cxx | 4 cui/source/dialogs/postdlg.cxx | 2 cui/source/options/optmemory.cxx | 4 cui/source/options/optupdt.cxx | 4 editeng/source/items/flditem.cxx | 14 - editeng/source/misc/svxacorr.cxx | 26 +- editeng/source/uno/unofield.cxx | 8 extensions/source/propctrlr/standardcontrol.cxx | 2 extensions/source/propctrlr/usercontrol.cxx | 2 filter/source/msfilter/svdfppt.cxx | 4 filter/source/msfilter/util.cxx | 4 forms/source/component/DatabaseForm.cxx | 4 forms/source/component/EditBase.cxx | 4 forms/source/xforms/datatypes.cxx | 10 - forms/source/xforms/xpathlib/xpathlib.cxx | 6 fpicker/source/office/iodlg.cxx | 2 framework/source/services/autorecovery.cxx | 2 i18npool/source/calendar/calendar_gregorian.cxx | 2 i18npool/source/calendar/calendar_hijri.cxx | 4 include/editeng/flditem.hxx | 8 include/editeng/svxacorr.hxx | 2 include/postx.h | 1 include/prex.h | 3 include/svl/fstathelper.hxx | 4 include/svx/ctredlin.hxx | 12 - include/svx/galmisc.hxx | 4 include/tools/datetime.hxx | 14 - include/tools/time.hxx | 32 +-- include/unotools/datetime.hxx | 2 include/unotools/localedatawrapper.hxx | 6 include/vcl/field.hxx | 46 ++-- include/xmloff/xmluconv.hxx | 2 lotuswordpro/source/filter/xfilter/xftimestyle.cxx | 2 mysqlc/source/mysqlc_preparedstatement.cxx | 2 mysqlc/source/mysqlc_resultset.cxx | 6 odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.cxx | 2 odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx | 6 oox/source/drawingml/textfield.cxx | 8 oox/source/dump/dumperbase.cxx | 16 - reportdesign/source/filter/xml/xmlControlProperty.cxx | 2 reportdesign/source/ui/dlg/DateTime.cxx | 2 sal/workben/measure_oustrings.cxx | 2 salhelper/source/timer.cxx | 8 sc/inc/editutil.hxx | 2 sc/inc/externalrefmgr.hxx | 4 sc/source/core/data/dbdocutl.cxx | 16 - sc/source/core/data/documen8.cxx | 4 sc/source/core/data/dpobject.cxx | 16 - sc/source/core/tool/chgviset.cxx | 2 sc/source/core/tool/editutil.cxx | 2 sc/source/core/tool/interpr2.cxx | 20 +- sc/source/filter/excel/xipivot.cxx | 2 sc/source/filter/html/htmlexp.cxx | 2 sc/source/filter/oox/pivotcachebuffer.cxx | 2 sc/source/filter/oox/revisionfragment.cxx | 2 sc/source/filter/orcus/interface.cxx | 10 - sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx | 12 - sc/source/filter/xml/XMLConverter.cxx | 2 sc/source/ui/dbgui/scendlg.cxx | 2 sc/source/ui/docshell/externalrefmgr.cxx | 12 - sc/source/ui/inc/preview.hxx | 2 sc/source/ui/inc/printfun.hxx | 2 sc/source/ui/miscdlgs/highred.cxx | 4 sc/source/ui/miscdlgs/sharedocdlg.cxx | 4 sc/source/ui/unoobj/fielduno.cxx | 4 sc/source/ui/view/preview.cxx | 4 sc/source/ui/view/printfun.cxx | 4 sc/source/ui/view/viewfun6.cxx | 6 sc/workben/test.cxx | 12 - sd/source/filter/html/pubdlg.cxx | 2 sd/source/ui/annotations/annotationmanager.cxx | 2 sd/source/ui/app/sdmod2.cxx | 2 sd/source/ui/app/sdpopup.cxx | 2 sd/source/ui/dlg/animobjs.cxx | 24 +- sd/source/ui/dlg/dlgass.cxx | 4 sd/source/ui/dlg/headerfooterdlg.cxx | 2 sd/source/ui/dlg/present.cxx | 2 sd/source/ui/inc/animobjs.hxx | 2 sd/source/ui/slideshow/showwin.cxx | 6 sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx | 2 sd/source/ui/tools/TimerBasedTaskExecution.cxx | 4 sd/source/ui/unoidl/unomodel.cxx | 2 sd/source/ui/view/DocumentRenderer.cxx | 2 sd/source/ui/view/drviews2.cxx | 2 sd/source/ui/view/outlnvs2.cxx | 2 sfx2/source/dialog/dialoghelper.cxx | 2 sfx2/source/dialog/dinfdlg.cxx | 18 - sfx2/source/dialog/versdlg.cxx | 4 sfx2/source/doc/SfxDocumentMetaData.cxx | 4 sfx2/source/doc/docfile.cxx | 2 sfx2/source/doc/objcont.cxx | 12 - sfx2/source/doc/oleprops.cxx | 4 shell/source/win32/shlxthandler/util/iso8601_converter.cxx | 2 slideshow/source/engine/slideshowimpl.cxx | 6 svl/source/misc/fstathelper.cxx | 4 svtools/source/contnr/DocumentInfoPreview.cxx | 2 svtools/source/contnr/contentenumeration.cxx | 2 svtools/source/control/tabbar.cxx | 4 svtools/source/misc/templatefoldercache.cxx | 4 svtools/source/svhtml/parhtml.cxx | 2 svtools/source/table/cellvalueconversion.cxx | 4 svx/source/dialog/ctredlin.cxx | 22 +- svx/source/fmcomp/gridcell.cxx | 4 svx/source/form/fmobjfac.cxx | 2 svx/source/svdraw/svdpntv.cxx | 4 sw/inc/AnnotationWin.hxx | 2 sw/inc/SidebarWin.hxx | 2 sw/inc/docufld.hxx | 2 sw/inc/flddat.hxx | 4 sw/inc/shellio.hxx | 2 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx | 2 sw/source/core/doc/DocumentFieldsManager.cxx | 4 sw/source/core/doc/doccomp.cxx | 2 sw/source/core/doc/docdraw.cxx | 2 sw/source/core/doc/docglbl.cxx | 2 sw/source/core/fields/docufld.cxx | 10 - sw/source/core/fields/flddat.cxx | 6 sw/source/core/inc/swblocks.hxx | 2 sw/source/core/layout/layact.cxx | 2 sw/source/core/swg/swblocks.cxx | 4 sw/source/core/unocore/swunohelper.cxx | 2 sw/source/core/unocore/unocrsrhelper.cxx | 6 sw/source/filter/basflt/shellio.cxx | 6 sw/source/filter/html/htmlfld.cxx | 4 sw/source/filter/ww8/wrtww8.cxx | 6 sw/source/uibase/docvw/AnnotationWin.cxx | 2 sw/source/uibase/docvw/edtdd.cxx | 2 sw/source/uibase/docvw/srcedtw.cxx | 6 sw/source/uibase/fldui/fldmgr.cxx | 2 toolkit/source/controls/unocontrols.cxx | 2 tools/source/datetime/datetime.cxx | 32 +-- tools/source/datetime/datetimeutils.cxx | 2 tools/source/datetime/ttime.cxx | 58 +++-- tools/source/inet/inetmsg.cxx | 8 tools/source/rc/rc.cxx | 6 ucb/workben/ucb/ucbdemo.cxx | 8 unotest/source/cpp/filters-test.cxx | 2 unotools/source/i18n/localedatawrapper.cxx | 6 unotools/source/misc/datetime.cxx | 4 unotools/source/ucbhelper/tempfile.cxx | 2 unotools/source/ucbhelper/ucbhelper.cxx | 2 uui/source/iahndl-ssl.cxx | 4 vbahelper/source/vbahelper/vbaapplicationbase.cxx | 2 vcl/inc/unx/saldisp.hxx | 4 vcl/inc/unx/salframe.h | 2 vcl/source/app/dbggui.cxx | 4 vcl/source/app/help.cxx | 6 vcl/source/app/svapp.cxx | 2 vcl/source/app/timer.cxx | 8 vcl/source/control/field2.cxx | 70 +++---- vcl/source/window/builder.cxx | 6 vcl/source/window/debugevent.cxx | 2 vcl/source/window/dockmgr.cxx | 4 vcl/source/window/dockwin.cxx | 4 vcl/source/window/mouse.cxx | 2 vcl/source/window/scrwnd.cxx | 4 vcl/source/window/winproc.cxx | 16 - vcl/unx/generic/app/saldisp.cxx | 2 vcl/unx/generic/dtrans/X11_dndcontext.cxx | 6 vcl/unx/generic/dtrans/X11_dndcontext.hxx | 12 - vcl/unx/generic/dtrans/X11_selection.cxx | 14 - vcl/unx/generic/dtrans/X11_selection.hxx | 28 +- vcl/unx/generic/window/salframe.cxx | 4 vcl/win/source/app/salinst.cxx | 4 xmloff/source/core/xmluconv.cxx | 16 - xmloff/source/draw/propimp0.cxx | 6 xmloff/source/forms/elementexport.cxx | 2 xmloff/source/forms/handler/vcl_time_handler.cxx | 8 xmloff/source/forms/propertyexport.cxx | 16 - xmloff/source/forms/propertyimport.cxx | 16 - xmloff/source/text/txtlists.cxx | 2 xmlscript/source/xmldlg_imexp/xmldlg_export.cxx | 4 xmlscript/source/xmldlg_imexp/xmldlg_import.cxx | 2 xmlsecurity/inc/xmlsecurity/xmlsignaturehelper.hxx | 4 xmlsecurity/source/component/documentdigitalsignatures.cxx | 4 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 2 xmlsecurity/source/dialogs/resourcemanager.cxx | 2 xmlsecurity/source/helper/xmlsignaturehelper.cxx | 2 xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx | 4 xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx | 4 203 files changed, 676 insertions(+), 778 deletions(-)
New commits: commit fc04f76336fdf8c96e35382cdeb497e2f939705c Author: Noel Grandin <n...@peralex.com> Date: Sun Sep 28 15:49:26 2014 +0200 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 <noelgran...@gmail.com> Tested-by: Noel Grandin <noelgran...@gmail.com> diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index 2dc79fa..9551c70 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -411,9 +411,9 @@ void MediaControl::implUpdateTimeField( double fCurTime ) SvtSysLocale aSysLocale; const LocaleDataWrapper& rLocaleData = aSysLocale.GetLocaleData(); - aTimeString += rLocaleData.getDuration( Time( 0, 0, static_cast< sal_uInt32 >( floor( fCurTime ) ) ) ) + + aTimeString += rLocaleData.getDuration( tools::Time( 0, 0, static_cast< sal_uInt32 >( floor( fCurTime ) ) ) ) + " / " + - rLocaleData.getDuration( Time( 0, 0, static_cast< sal_uInt32 >( floor( maItem.getDuration() ) )) ); + rLocaleData.getDuration( tools::Time( 0, 0, static_cast< sal_uInt32 >( floor( maItem.getDuration() ) )) ); if( maTimeEdit.GetText() != aTimeString ) maTimeEdit.SetText( aTimeString ); diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx index 7e79bef3..8bb6718 100644 --- a/basic/source/comp/sbcomp.cxx +++ b/basic/source/comp/sbcomp.cxx @@ -382,7 +382,7 @@ void lcl_printTimeOutput( void ) { // Overall time output lcl_lineOut( "" ); - lcl_lineOut( "***** Time Output *****" ); + lcl_lineOut( "***** tools::Time Output *****" ); char TimeBuffer[500]; double dTotalTime = GpTimer->getElapsedTime() - GdStartTime; sprintf( TimeBuffer, "Total execution time = %f ms", dTotalTime*1000.0 ); @@ -606,7 +606,7 @@ void dbg_traceStep( SbModule* pModule, sal_uInt32 nPC, sal_Int32 nCallLvl ) { double dDiffTime = dCurTime - GdLastTime; GdLastTime = dCurTime; - sprintf( TimeBuffer, "\t\t// Time = %f ms / += %f ms", dCurTime*1000.0, dDiffTime*1000.0 ); + sprintf( TimeBuffer, "\t\t// tools::Time = %f ms / += %f ms", dCurTime*1000.0, dDiffTime*1000.0 ); } #endif @@ -802,7 +802,7 @@ void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, sal_Int32 nCallL char TimeBuffer[200]; if( GbTimerOn && bLeave ) { - sprintf( TimeBuffer, " // Execution Time = %f ms", dExecutionTime*1000.0 ); + sprintf( TimeBuffer, " // Execution tools::Time = %f ms", dExecutionTime*1000.0 ); pPostStr = TimeBuffer; } #endif diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 0d8ff64..5388094 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -2360,7 +2360,7 @@ RTLFUNC(Second) double Now_Impl() { Date aDate( Date::SYSTEM ); - Time aTime( Time::SYSTEM ); + tools::Time aTime( tools::Time::SYSTEM ); double aSerial = (double)GetDayDiff( aDate ); long nSeconds = aTime.GetHour(); nSeconds *= 3600; @@ -2388,7 +2388,7 @@ RTLFUNC(Time) if ( !bWrite ) { - Time aTime( Time::SYSTEM ); + tools::Time aTime( tools::Time::SYSTEM ); SbxVariable* pMeth = rPar.Get( 0 ); OUString aRes; if( pMeth->IsFixed() ) @@ -2442,7 +2442,7 @@ RTLFUNC(Timer) (void)pBasic; (void)bWrite; - Time aTime( Time::SYSTEM ); + tools::Time aTime( tools::Time::SYSTEM ); long nSeconds = aTime.GetHour(); nSeconds *= 3600; nSeconds += aTime.GetMin() * 60; @@ -3212,7 +3212,7 @@ RTLFUNC(FileDateTime) else { OUString aPath = rPar.Get(1)->GetOUString(); - Time aTime( Time::EMPTY ); + tools::Time aTime( tools::Time::EMPTY ); Date aDate( Date::EMPTY ); if( hasUno() ) { @@ -3222,7 +3222,7 @@ RTLFUNC(FileDateTime) try { util::DateTime aUnoDT = xSFI->getDateTimeModified( aPath ); - aTime = Time( aUnoDT.Hours, aUnoDT.Minutes, aUnoDT.Seconds, aUnoDT.NanoSeconds ); + aTime = tools::Time( aUnoDT.Hours, aUnoDT.Minutes, aUnoDT.Seconds, aUnoDT.NanoSeconds ); aDate = Date( aUnoDT.Day, aUnoDT.Month, aUnoDT.Year ); } catch(const Exception & ) @@ -3241,7 +3241,7 @@ RTLFUNC(FileDateTime) oslDateTime aDT; osl_getDateTimeFromTimeValue( &aTimeVal, &aDT ); - aTime = Time( aDT.Hours, aDT.Minutes, aDT.Seconds, aDT.NanoSeconds ); + aTime = tools::Time( aDT.Hours, aDT.Minutes, aDT.Seconds, aDT.NanoSeconds ); aDate = Date( aDT.Day, aDT.Month, aDT.Year ); } @@ -4954,11 +4954,11 @@ bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& double implTimeSerial( sal_Int16 nHours, sal_Int16 nMinutes, sal_Int16 nSeconds ) { return - static_cast<double>( nHours * ::Time::secondPerHour + - nMinutes * ::Time::secondPerMinute + + static_cast<double>( nHours * ::tools::Time::secondPerHour + + nMinutes * ::tools::Time::secondPerMinute + nSeconds) / - static_cast<double>( ::Time::secondPerDay ); + static_cast<double>( ::tools::Time::secondPerDay ); } bool implDateTimeSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 81ad39c6..43b4d01 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -1412,7 +1412,7 @@ RTLFUNC(GetSystemTicks) StarBASIC::Error( SbERR_BAD_ARGUMENT ); return; } - rPar.Get(0)->PutLong( Time::GetSystemTicks() ); + rPar.Get(0)->PutLong( tools::Time::GetSystemTicks() ); } RTLFUNC(GetPathSeparator) diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx index 5f0bcca..b2f5be0f 100644 --- a/basic/source/sbx/sbxdate.cxx +++ b/basic/source/sbx/sbxdate.cxx @@ -280,7 +280,7 @@ start: // if the whole-number part is 0, we want no year! if( n <= -1.0 || n >= 1.0 ) { - // Time only if != 00:00:00 + // tools::Time only if != 00:00:00 if( floor( n ) == n ) { switch( eDate ) diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx index 0e31e4f..24e41dd 100644 --- a/connectivity/source/commontools/DateConversion.cxx +++ b/connectivity/source/commontools/DateConversion.cxx @@ -173,7 +173,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool b } break; case DataType::TIME: { - Time aTime; + css::util::Time aTime; bool bOk = false; if (_rVal.getValueType().getTypeClass() == ::com::sun::star::uno::TypeClass_DOUBLE) { diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx index cd1365c..38626ba 100644 --- a/connectivity/source/commontools/FValue.cxx +++ b/connectivity/source/commontools/FValue.cxx @@ -293,7 +293,7 @@ void ORowSetValue::free() break; case DataType::TIME: delete (::com::sun::star::util::Time*)m_aValue.m_pValue; - TRACE_FREE( Time ) + TRACE_FREE( tools::Time ) m_aValue.m_pValue = NULL; break; case DataType::TIMESTAMP: @@ -369,7 +369,7 @@ ORowSetValue& ORowSetValue::operator=(const ORowSetValue& _rRH) break; case DataType::TIME: m_aValue.m_pValue = new Time(*(Time*)_rRH.m_aValue.m_pValue); - TRACE_ALLOC( Time ) + TRACE_ALLOC( tools::Time ) break; case DataType::TIMESTAMP: m_aValue.m_pValue = new DateTime(*(DateTime*)_rRH.m_aValue.m_pValue); @@ -512,7 +512,7 @@ ORowSetValue& ORowSetValue::operator=(const Date& _rRH) return *this; } -ORowSetValue& ORowSetValue::operator=(const Time& _rRH) +ORowSetValue& ORowSetValue::operator=(const css::util::Time& _rRH) { if(m_eTypeKind != DataType::TIME) free(); @@ -520,7 +520,7 @@ ORowSetValue& ORowSetValue::operator=(const Time& _rRH) if(m_bNull) { m_aValue.m_pValue = new Time(_rRH); - TRACE_ALLOC( Time ) + TRACE_ALLOC( tools::Time ) m_eTypeKind = DataType::TIME; m_bNull = false; } @@ -750,19 +750,19 @@ ORowSetValue& ORowSetValue::operator=(const Any& _rAny) } -bool operator==(const Date& _rLH,const Date& _rRH) +bool operator==(const Date& _rLH, const Date& _rRH) { return _rLH.Day == _rRH.Day && _rLH.Month == _rRH.Month && _rLH.Year == _rRH.Year; } -bool operator==(const Time& _rLH,const Time& _rRH) +bool operator==(const css::util::Time& _rLH, const css::util::Time& _rRH) { return _rLH.Minutes == _rRH.Minutes && _rLH.Hours == _rRH.Hours && _rLH.Seconds == _rRH.Seconds && _rLH.NanoSeconds == _rRH.NanoSeconds; } -bool operator==(const DateTime& _rLH,const DateTime& _rRH) +bool operator==(const DateTime& _rLH, const DateTime& _rRH) { return _rLH.Day == _rRH.Day && _rLH.Month == _rRH.Month && _rLH.Year == _rRH.Year && _rLH.Minutes == _rRH.Minutes && _rLH.Hours == _rRH.Hours && _rLH.Seconds == _rRH.Seconds && _rLH.NanoSeconds == _rRH.NanoSeconds; @@ -2153,7 +2153,7 @@ namespace detail virtual float getFloat() const = 0; virtual double getDouble() const = 0; virtual Date getDate() const = 0; - virtual Time getTime() const = 0; + virtual css::util::Time getTime() const = 0; virtual DateTime getTimestamp() const = 0; virtual Sequence< sal_Int8 > getBytes() const = 0; virtual Reference< XBlob > getBlob() const = 0; @@ -2183,7 +2183,7 @@ namespace detail virtual float getFloat() const SAL_OVERRIDE { return m_xRow->getFloat( m_nPos ); }; virtual double getDouble() const SAL_OVERRIDE { return m_xRow->getDouble( m_nPos ); }; virtual Date getDate() const SAL_OVERRIDE { return m_xRow->getDate( m_nPos ); }; - virtual Time getTime() const SAL_OVERRIDE { return m_xRow->getTime( m_nPos ); }; + virtual css::util::Time getTime() const SAL_OVERRIDE { return m_xRow->getTime( m_nPos ); }; virtual DateTime getTimestamp() const SAL_OVERRIDE { return m_xRow->getTimestamp( m_nPos ); }; virtual Sequence< sal_Int8 > getBytes() const SAL_OVERRIDE { return m_xRow->getBytes( m_nPos ); }; virtual Reference< XBlob > getBlob() const SAL_OVERRIDE { return m_xRow->getBlob( m_nPos ); }; @@ -2214,7 +2214,7 @@ namespace detail virtual float getFloat() const SAL_OVERRIDE { return m_xColumn->getFloat(); }; virtual double getDouble() const SAL_OVERRIDE { return m_xColumn->getDouble(); }; virtual Date getDate() const SAL_OVERRIDE { return m_xColumn->getDate(); }; - virtual Time getTime() const SAL_OVERRIDE { return m_xColumn->getTime(); }; + virtual css::util::Time getTime() const SAL_OVERRIDE { return m_xColumn->getTime(); }; virtual DateTime getTimestamp() const SAL_OVERRIDE { return m_xColumn->getTimestamp(); }; virtual Sequence< sal_Int8 > getBytes() const SAL_OVERRIDE { return m_xColumn->getBytes(); }; virtual Reference< XBlob > getBlob() const SAL_OVERRIDE { return m_xColumn->getBlob(); }; diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx index e1c2d5f..b385eb7 100644 --- a/connectivity/source/commontools/dbtools.cxx +++ b/connectivity/source/commontools/dbtools.cxx @@ -1080,7 +1080,7 @@ try if (hasProperty(sPropDefaultTime, xNewProps) && !bIsString) { // Completely analogous to time - Time aTime = DBTypeConversion::toTime(getDouble(aEffectiveDefault)); + css::util::Time aTime = DBTypeConversion::toTime(getDouble(aEffectiveDefault)); xNewProps->setPropertyValue(sPropDefaultTime, makeAny(aTime)); } diff --git a/connectivity/source/drivers/ado/APreparedStatement.cxx b/connectivity/source/drivers/ado/APreparedStatement.cxx index 12577df..c862d05 100644 --- a/connectivity/source/drivers/ado/APreparedStatement.cxx +++ b/connectivity/source/drivers/ado/APreparedStatement.cxx @@ -307,7 +307,7 @@ void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const Date& setParameter(parameterIndex,adDBDate,sizeof(x),x); } -void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const Time& x ) throw(SQLException, RuntimeException) +void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const css::util::Time& x ) throw(SQLException, RuntimeException) { setParameter(parameterIndex,adDBTime,sizeof(x),x); } diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index 1d6db8d..ee201ee 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -362,12 +362,12 @@ static void lcl_SetValue( ORowSetValue& rValue, const Reference<XSpreadsheet>& x { double fCellVal = xCell->getValue(); double fTime = fCellVal - rtl::math::approxFloor( fCellVal ); - sal_Int64 nIntTime = static_cast<sal_Int64>(rtl::math::round( fTime * static_cast<double>(::Time::nanoSecPerDay) )); - if ( nIntTime == ::Time::nanoSecPerDay) + sal_Int64 nIntTime = static_cast<sal_Int64>(rtl::math::round( fTime * static_cast<double>(::tools::Time::nanoSecPerDay) )); + if ( nIntTime == ::tools::Time::nanoSecPerDay) nIntTime = 0; // 23:59:59.9999999995 and above is 00:00:00.00 ::com::sun::star::util::Time aTime; - aTime.NanoSeconds = (sal_uInt32)( nIntTime % ::Time::nanoSecPerSec ); - nIntTime /= ::Time::nanoSecPerSec; + aTime.NanoSeconds = (sal_uInt32)( nIntTime % ::tools::Time::nanoSecPerSec ); + nIntTime /= ::tools::Time::nanoSecPerSec; aTime.Seconds = (sal_uInt16)( nIntTime % 60 ); nIntTime /= 60; aTime.Minutes = (sal_uInt16)( nIntTime % 60 ); @@ -386,8 +386,8 @@ static void lcl_SetValue( ORowSetValue& rValue, const Reference<XSpreadsheet>& x double fDays = ::rtl::math::approxFloor( fCellVal ); double fTime = fCellVal - fDays; long nIntDays = (long)fDays; - sal_Int64 nIntTime = ::rtl::math::round( fTime * static_cast<double>(::Time::nanoSecPerDay) ); - if ( nIntTime == ::Time::nanoSecPerDay ) + sal_Int64 nIntTime = ::rtl::math::round( fTime * static_cast<double>(::tools::Time::nanoSecPerDay) ); + if ( nIntTime == ::tools::Time::nanoSecPerDay ) { nIntTime = 0; // 23:59:59.9999999995 and above is 00:00:00.00 ++nIntDays; // (next day) @@ -395,8 +395,8 @@ static void lcl_SetValue( ORowSetValue& rValue, const Reference<XSpreadsheet>& x ::com::sun::star::util::DateTime aDateTime; - aDateTime.NanoSeconds = (sal_uInt16)( nIntTime % ::Time::nanoSecPerSec ); - nIntTime /= ::Time::nanoSecPerSec; + aDateTime.NanoSeconds = (sal_uInt16)( nIntTime % ::tools::Time::nanoSecPerSec ); + nIntTime /= ::tools::Time::nanoSecPerSec; aDateTime.Seconds = (sal_uInt16)( nIntTime % 60 ); nIntTime /= 60; aDateTime.Minutes = (sal_uInt16)( nIntTime % 60 ); diff --git a/connectivity/source/drivers/evoab2/NPreparedStatement.cxx b/connectivity/source/drivers/evoab2/NPreparedStatement.cxx index ece475a..7994275 100644 --- a/connectivity/source/drivers/evoab2/NPreparedStatement.cxx +++ b/connectivity/source/drivers/evoab2/NPreparedStatement.cxx @@ -187,7 +187,7 @@ void SAL_CALL OEvoabPreparedStatement::setDate( sal_Int32 /*parameterIndex*/, co } -void SAL_CALL OEvoabPreparedStatement::setTime( sal_Int32 /*parameterIndex*/, const Time& /*aVal*/ ) throw(SQLException, RuntimeException, std::exception) +void SAL_CALL OEvoabPreparedStatement::setTime( sal_Int32 /*parameterIndex*/, const css::util::Time& /*aVal*/ ) throw(SQLException, RuntimeException, std::exception) { ::dbtools::throwFunctionNotSupportedSQLException( "XParameters::setTime", *this ); } diff --git a/connectivity/source/drivers/file/FDateFunctions.cxx b/connectivity/source/drivers/file/FDateFunctions.cxx index f6bfca8..8e7e5f2 100644 --- a/connectivity/source/drivers/file/FDateFunctions.cxx +++ b/connectivity/source/drivers/file/FDateFunctions.cxx @@ -262,7 +262,7 @@ ORowSetValue OOp_CurTime::operate(const ::std::vector<ORowSetValue>& lhs) const if ( !lhs.empty() ) return ORowSetValue(); - Time aCurTime( Time::SYSTEM ); + tools::Time aCurTime( tools::Time::SYSTEM ); return ::com::sun::star::util::Time(aCurTime.GetNanoSec(), aCurTime.GetSec(), aCurTime.GetMin(), aCurTime.GetHour(), false); diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx index bd8fdaa..0654407 100644 --- a/connectivity/source/drivers/firebird/PreparedStatement.cxx +++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx @@ -401,7 +401,7 @@ void SAL_CALL OPreparedStatement::setDate(sal_Int32 nIndex, const Date& rDate) setValue< ISC_DATE >(nIndex, aISCDate, SQL_TYPE_DATE); } -void SAL_CALL OPreparedStatement::setTime( sal_Int32 nIndex, const Time& rTime) +void SAL_CALL OPreparedStatement::setTime( sal_Int32 nIndex, const css::util::Time& rTime) throw(SQLException, RuntimeException, std::exception) { struct tm aCTime; diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx index 6d702b2..caf5c7a 100644 --- a/connectivity/source/drivers/firebird/ResultSet.cxx +++ b/connectivity/source/drivers/firebird/ResultSet.cxx @@ -621,7 +621,7 @@ Date SAL_CALL OResultSet::getDate(sal_Int32 nIndex) Time SAL_CALL OResultSet::getTime(sal_Int32 nIndex) throw(SQLException, RuntimeException, std::exception) { - return safelyRetrieveValue< Time >(nIndex, SQL_TYPE_TIME); + return safelyRetrieveValue< css::util::Time >(nIndex, SQL_TYPE_TIME); } DateTime SAL_CALL OResultSet::getTimestamp(sal_Int32 nIndex) diff --git a/connectivity/source/drivers/jdbc/ConnectionLog.cxx b/connectivity/source/drivers/jdbc/ConnectionLog.cxx index e8eddc4..87f58b4 100644 --- a/connectivity/source/drivers/jdbc/ConnectionLog.cxx +++ b/connectivity/source/drivers/jdbc/ConnectionLog.cxx @@ -93,7 +93,7 @@ namespace comphelper { namespace log { namespace convert } - OUString convertLogArgToString( const Time& _rTime ) + OUString convertLogArgToString( const css::util::Time& _rTime ) { char buffer[ 30 ]; const size_t buffer_size = sizeof( buffer ); diff --git a/connectivity/source/drivers/kab/KPreparedStatement.cxx b/connectivity/source/drivers/kab/KPreparedStatement.cxx index 300bd26..6b1c9d7 100644 --- a/connectivity/source/drivers/kab/KPreparedStatement.cxx +++ b/connectivity/source/drivers/kab/KPreparedStatement.cxx @@ -189,66 +189,42 @@ void SAL_CALL KabPreparedStatement::setNull(sal_Int32 parameterIndex, sal_Int32) void SAL_CALL KabPreparedStatement::setObjectNull(sal_Int32, sal_Int32, const OUString&) throw(SQLException, RuntimeException, std::exception) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setObjectNull", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setObjectNull", NULL); } void SAL_CALL KabPreparedStatement::setBoolean(sal_Int32, sal_Bool) throw(SQLException, RuntimeException, std::exception) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setBoolean", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setBoolean", NULL); } void SAL_CALL KabPreparedStatement::setByte(sal_Int32, sal_Int8) throw(SQLException, RuntimeException, std::exception) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setByte", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setByte", NULL); } void SAL_CALL KabPreparedStatement::setShort(sal_Int32, sal_Int16) throw(SQLException, RuntimeException, std::exception) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setShort", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setShort", NULL); } void SAL_CALL KabPreparedStatement::setInt(sal_Int32, sal_Int32) throw(SQLException, RuntimeException, std::exception) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setInt", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setInt", NULL); } void SAL_CALL KabPreparedStatement::setLong(sal_Int32, sal_Int64) throw(SQLException, RuntimeException, std::exception) { - - - -::dbtools::throwFunctionNotSupportedSQLException("", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("", NULL); } void SAL_CALL KabPreparedStatement::setFloat(sal_Int32, float) throw(SQLException, RuntimeException, std::exception) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setFloat", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setFloat", NULL); } void SAL_CALL KabPreparedStatement::setDouble(sal_Int32, double) throw(SQLException, RuntimeException, std::exception) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setDouble", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setDouble", NULL); } void SAL_CALL KabPreparedStatement::setString(sal_Int32 parameterIndex, const OUString &x) throw(SQLException, RuntimeException, std::exception) @@ -263,50 +239,33 @@ void SAL_CALL KabPreparedStatement::setString(sal_Int32 parameterIndex, const OU void SAL_CALL KabPreparedStatement::setBytes(sal_Int32, const Sequence< sal_Int8 >&) throw(SQLException, RuntimeException, std::exception) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setBytes", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setBytes", NULL); } void SAL_CALL KabPreparedStatement::setDate(sal_Int32, const Date&) throw(SQLException, RuntimeException, std::exception) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setDate", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setDate", NULL); } -void SAL_CALL KabPreparedStatement::setTime(sal_Int32, const Time&) throw(SQLException, RuntimeException, std::exception) +void SAL_CALL KabPreparedStatement::setTime(sal_Int32, const css::util::Time&) throw(SQLException, RuntimeException, std::exception) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setTime", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setTime", NULL); } void SAL_CALL KabPreparedStatement::setTimestamp(sal_Int32, const DateTime&) throw(SQLException, RuntimeException, std::exception) { - - -::dbtools::throwFunctionNotSupportedSQLException("setTimestamp", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setTimestamp", NULL); } void SAL_CALL KabPreparedStatement::setBinaryStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException, std::exception) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setBinaryStream", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setBinaryStream", NULL); } void SAL_CALL KabPreparedStatement::setCharacterStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException, std::exception) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setCharacterStream", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setCharacterStream", NULL); } void SAL_CALL KabPreparedStatement::setObject(sal_Int32 parameterIndex, const Any& x) throw(SQLException, RuntimeException, std::exception) @@ -319,47 +278,32 @@ void SAL_CALL KabPreparedStatement::setObject(sal_Int32 parameterIndex, const An void SAL_CALL KabPreparedStatement::setObjectWithInfo(sal_Int32, const Any&, sal_Int32, sal_Int32) throw(SQLException, RuntimeException, std::exception) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setObjectWithInfo", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setObjectWithInfo", NULL); } void SAL_CALL KabPreparedStatement::setRef(sal_Int32, const Reference< XRef >&) throw(SQLException, RuntimeException, std::exception) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setRef", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setRef", NULL); } void SAL_CALL KabPreparedStatement::setBlob(sal_Int32, const Reference< XBlob >&) throw(SQLException, RuntimeException, std::exception) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setBlob", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setBlob", NULL); } void SAL_CALL KabPreparedStatement::setClob(sal_Int32, const Reference< XClob >&) throw(SQLException, RuntimeException, std::exception) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setClob", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setClob", NULL); } void SAL_CALL KabPreparedStatement::setArray(sal_Int32, const Reference< XArray >&) throw(SQLException, RuntimeException, std::exception) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setArray", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setArray", NULL); } void SAL_CALL KabPreparedStatement::clearParameters() throw(SQLException, RuntimeException, std::exception) { -::dbtools::throwFunctionNotSupportedSQLException("clearParameters", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("clearParameters", NULL); } void KabPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception, std::exception) diff --git a/connectivity/source/drivers/kab/KResultSet.cxx b/connectivity/source/drivers/kab/KResultSet.cxx index ab79cfc..8db816f 100644 --- a/connectivity/source/drivers/kab/KResultSet.cxx +++ b/connectivity/source/drivers/kab/KResultSet.cxx @@ -338,7 +338,7 @@ cssu::DateTime SAL_CALL KabResultSet::getTimestamp(sal_Int32 columnIndex) throw( nRet.Hours = nRevision.time().hour(); nRet.Minutes = nRevision.time().minute(); nRet.Seconds = nRevision.time().second(); - nRet.NanoSeconds = nRevision.time().msec() * ::Time::nanoPerMilli; + nRet.NanoSeconds = nRevision.time().msec() * ::tools::Time::nanoPerMilli; return nRet; } } diff --git a/connectivity/source/drivers/macab/MacabPreparedStatement.cxx b/connectivity/source/drivers/macab/MacabPreparedStatement.cxx index 71508ea..cdcb8f1 100644 --- a/connectivity/source/drivers/macab/MacabPreparedStatement.cxx +++ b/connectivity/source/drivers/macab/MacabPreparedStatement.cxx @@ -202,66 +202,42 @@ void SAL_CALL MacabPreparedStatement::setNull(sal_Int32 parameterIndex, sal_Int3 void SAL_CALL MacabPreparedStatement::setObjectNull(sal_Int32, sal_Int32, const OUString&) throw(SQLException, RuntimeException) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setObjectNull", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setObjectNull", NULL); } void SAL_CALL MacabPreparedStatement::setBoolean(sal_Int32, sal_Bool) throw(SQLException, RuntimeException) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setBoolean", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setBoolean", NULL); } void SAL_CALL MacabPreparedStatement::setByte(sal_Int32, sal_Int8) throw(SQLException, RuntimeException) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setByte", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setByte", NULL); } void SAL_CALL MacabPreparedStatement::setShort(sal_Int32, sal_Int16) throw(SQLException, RuntimeException) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setShort", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setShort", NULL); } void SAL_CALL MacabPreparedStatement::setInt(sal_Int32, sal_Int32) throw(SQLException, RuntimeException) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setInt", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setInt", NULL); } void SAL_CALL MacabPreparedStatement::setLong(sal_Int32, sal_Int64) throw(SQLException, RuntimeException) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setLong", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setLong", NULL); } void SAL_CALL MacabPreparedStatement::setFloat(sal_Int32, float) throw(SQLException, RuntimeException) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setFloat", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setFloat", NULL); } void SAL_CALL MacabPreparedStatement::setDouble(sal_Int32, double) throw(SQLException, RuntimeException) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setDouble", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setDouble", NULL); } void SAL_CALL MacabPreparedStatement::setString(sal_Int32 parameterIndex, const OUString &x) throw(SQLException, RuntimeException) @@ -276,50 +252,33 @@ void SAL_CALL MacabPreparedStatement::setString(sal_Int32 parameterIndex, const void SAL_CALL MacabPreparedStatement::setBytes(sal_Int32, const Sequence< sal_Int8 >&) throw(SQLException, RuntimeException) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setBytes", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setBytes", NULL); } void SAL_CALL MacabPreparedStatement::setDate(sal_Int32, const Date&) throw(SQLException, RuntimeException) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setDate", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setDate", NULL); } -void SAL_CALL MacabPreparedStatement::setTime(sal_Int32, const Time&) throw(SQLException, RuntimeException) +void SAL_CALL MacabPreparedStatement::setTime(sal_Int32, const css::util::Time&) throw(SQLException, RuntimeException) { - - -::dbtools::throwFunctionNotSupportedSQLException("setTime", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setTime", NULL); } void SAL_CALL MacabPreparedStatement::setTimestamp(sal_Int32, const DateTime&) throw(SQLException, RuntimeException) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setTimestamp", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setTimestamp", NULL); } void SAL_CALL MacabPreparedStatement::setBinaryStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setBinaryStream", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setBinaryStream", NULL); } void SAL_CALL MacabPreparedStatement::setCharacterStream(sal_Int32, const Reference< ::com::sun::star::io::XInputStream >&, sal_Int32) throw(SQLException, RuntimeException) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setCharacterStream", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setCharacterStream", NULL); } void SAL_CALL MacabPreparedStatement::setObject(sal_Int32 parameterIndex, const Any& x) throw(SQLException, RuntimeException) @@ -336,47 +295,32 @@ void SAL_CALL MacabPreparedStatement::setObject(sal_Int32 parameterIndex, const void SAL_CALL MacabPreparedStatement::setObjectWithInfo(sal_Int32, const Any&, sal_Int32, sal_Int32) throw(SQLException, RuntimeException) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setObjectWithInfo", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setObjectWithInfo", NULL); } void SAL_CALL MacabPreparedStatement::setRef(sal_Int32, const Reference< XRef >&) throw(SQLException, RuntimeException) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setRef", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setRef", NULL); } void SAL_CALL MacabPreparedStatement::setBlob(sal_Int32, const Reference< XBlob >&) throw(SQLException, RuntimeException) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setBlob", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setBlob", NULL); } void SAL_CALL MacabPreparedStatement::setClob(sal_Int32, const Reference< XClob >&) throw(SQLException, RuntimeException) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setClob", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setClob", NULL); } void SAL_CALL MacabPreparedStatement::setArray(sal_Int32, const Reference< XArray >&) throw(SQLException, RuntimeException) { - - - -::dbtools::throwFunctionNotSupportedSQLException("setArray", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("setArray", NULL); } void SAL_CALL MacabPreparedStatement::clearParameters() throw(SQLException, RuntimeException) { -::dbtools::throwFunctionNotSupportedSQLException("clearParameters", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("clearParameters", NULL); } void MacabPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception) diff --git a/connectivity/source/drivers/macab/MacabResultSet.cxx b/connectivity/source/drivers/macab/MacabResultSet.cxx index 17ea20c..35a8717 100644 --- a/connectivity/source/drivers/macab/MacabResultSet.cxx +++ b/connectivity/source/drivers/macab/MacabResultSet.cxx @@ -377,7 +377,7 @@ Sequence< sal_Int8 > SAL_CALL MacabResultSet::getBytes(sal_Int32) throw(SQLExcep ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); -::dbtools::throwFunctionNotSupportedSQLException("getBytes", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("getBytes", NULL); return Sequence< sal_Int8 >(); } @@ -387,7 +387,7 @@ Date SAL_CALL MacabResultSet::getDate(sal_Int32) throw(SQLException, RuntimeExce ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); -::dbtools::throwFunctionNotSupportedSQLException("getDate", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("getDate", NULL); Date aRet; return aRet; @@ -398,9 +398,9 @@ Time SAL_CALL MacabResultSet::getTime(sal_Int32) throw(SQLException, RuntimeExce ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); -::dbtools::throwFunctionNotSupportedSQLException("getTime", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("getTime", NULL); - Time nRet; + css::util::Time nRet; return nRet; } @@ -436,7 +436,7 @@ Reference< XInputStream > SAL_CALL MacabResultSet::getBinaryStream(sal_Int32) th ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); -::dbtools::throwFunctionNotSupportedSQLException("getBinaryStream", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("getBinaryStream", NULL); return NULL; } @@ -446,7 +446,7 @@ Reference< XInputStream > SAL_CALL MacabResultSet::getCharacterStream(sal_Int32) ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); -::dbtools::throwFunctionNotSupportedSQLException("getCharacterStream", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("getCharacterStream", NULL); return NULL; } @@ -456,7 +456,7 @@ Any SAL_CALL MacabResultSet::getObject(sal_Int32, const Reference< ::com::sun::s ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); -::dbtools::throwFunctionNotSupportedSQLException("getObject", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("getObject", NULL); return Any(); } @@ -466,7 +466,7 @@ Reference< XRef > SAL_CALL MacabResultSet::getRef(sal_Int32) throw(SQLException, ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); -::dbtools::throwFunctionNotSupportedSQLException("getRef", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("getRef", NULL); return NULL; } @@ -476,7 +476,7 @@ Reference< XBlob > SAL_CALL MacabResultSet::getBlob(sal_Int32) throw(SQLExceptio ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); -::dbtools::throwFunctionNotSupportedSQLException("getBlob", NULL); + ::dbtools::throwFunctionNotSupportedSQLException("getBlob", NULL); return NULL; } @@ -823,7 +823,7 @@ void SAL_CALL MacabResultSet::updateDate(sal_Int32, const Date&) throw(SQLExcept checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); } -void SAL_CALL MacabResultSet::updateTime(sal_Int32, const Time&) throw(SQLException, RuntimeException) +void SAL_CALL MacabResultSet::updateTime(sal_Int32, const css::util::Time&) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(MacabResultSet_BASE::rBHelper.bDisposed); diff --git a/connectivity/source/drivers/mork/MPreparedStatement.cxx b/connectivity/source/drivers/mork/MPreparedStatement.cxx index 7d96805..55fdee5 100644 --- a/connectivity/source/drivers/mork/MPreparedStatement.cxx +++ b/connectivity/source/drivers/mork/MPreparedStatement.cxx @@ -228,7 +228,7 @@ void SAL_CALL OPreparedStatement::setDate( sal_Int32 /*parameterIndex*/, const D -void SAL_CALL OPreparedStatement::setTime( sal_Int32 /*parameterIndex*/, const Time& /*aVal*/ ) throw(SQLException, RuntimeException, std::exception) +void SAL_CALL OPreparedStatement::setTime( sal_Int32 /*parameterIndex*/, const css::util::Time& /*aVal*/ ) throw(SQLException, RuntimeException, std::exception) { ::dbtools::throwFeatureNotImplementedSQLException( "XParameters::setTime", *this ); } diff --git a/connectivity/source/drivers/mozab/MPreparedStatement.cxx b/connectivity/source/drivers/mozab/MPreparedStatement.cxx index 0de6749..402c656 100644 --- a/connectivity/source/drivers/mozab/MPreparedStatement.cxx +++ b/connectivity/source/drivers/mozab/MPreparedStatement.cxx @@ -238,7 +238,7 @@ void SAL_CALL OPreparedStatement::setDate( sal_Int32 /*parameterIndex*/, const D -void SAL_CALL OPreparedStatement::setTime( sal_Int32 /*parameterIndex*/, const Time& /*aVal*/ ) throw(SQLException, RuntimeException) +void SAL_CALL OPreparedStatement::setTime( sal_Int32 /*parameterIndex*/, const css::util::Time& /*aVal*/ ) throw(SQLException, RuntimeException) { ::dbtools::throwFeatureNotImplementedSQLException( "XParameters::setTime", *this ); } diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx index 54f6a26..a99900e 100644 --- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx +++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx @@ -428,7 +428,7 @@ void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const Date& } -void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const Time& aVal ) throw(SQLException, RuntimeException, std::exception) +void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const css::util::Time& aVal ) throw(SQLException, RuntimeException, std::exception) { SQLULEN nColSize; if(aVal.NanoSeconds == 0) diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx index a407300..a53e945 100644 --- a/connectivity/source/drivers/odbc/OResultSet.cxx +++ b/connectivity/source/drivers/odbc/OResultSet.cxx @@ -1102,7 +1102,7 @@ void SAL_CALL OResultSet::updateDate( sal_Int32 columnIndex, const Date& x ) thr } -void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const Time& x ) throw(SQLException, RuntimeException, std::exception) +void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const css::util::Time& x ) throw(SQLException, RuntimeException, std::exception) { TIME_STRUCT aVal = OTools::TimeToOdbcTime(x); updateValue(columnIndex,SQL_TIME,&aVal); diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index c20ad86..6228095 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -252,7 +252,7 @@ OUString OSQLParseNode::convertDateTimeString(const SQLParseNodeParameter& rPara OUString OSQLParseNode::convertTimeString(const SQLParseNodeParameter& rParam, const OUString& rString) const { - Time aTime = DBTypeConversion::toTime(rString); + css::util::Time aTime = DBTypeConversion::toTime(rString); Reference< XNumberFormatsSupplier > xSupplier(rParam.xFormatter->getNumberFormatsSupplier()); Reference< XNumberFormatTypes > xTypes(xSupplier->getNumberFormats(), UNO_QUERY); @@ -1065,7 +1065,7 @@ OSQLParseNode* OSQLParser::buildNode_Date(const double& fValue, sal_Int32 nType) } case DataType::TIME: { - Time aTime = DBTypeConversion::toTime(fValue); + css::util::Time aTime = DBTypeConversion::toTime(fValue); OUString aString = DBTypeConversion::toTimeString(aTime); pDateNode->append(new OSQLInternalNode(aEmptyString, SQL_NODE_KEYWORD, SQL_TOKEN_T)); pDateNode->append(new OSQLInternalNode(aString, SQL_NODE_STRING)); diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx index 3bec42c..67eb4ca 100644 --- a/cui/source/dialogs/postdlg.cxx +++ b/cui/source/dialogs/postdlg.cxx @@ -182,7 +182,7 @@ IMPL_LINK_NOARG_INLINE_END(SvxPostItDialog, NextHdl) IMPL_LINK_NOARG(SvxPostItDialog, Stamp) { Date aDate( Date::SYSTEM ); - Time aTime( Time::SYSTEM ); + tools::Time aTime( tools::Time::SYSTEM ); OUString aTmp( SvtUserOptions().GetID() ); const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() ); OUString aStr( m_pEditED->GetText() ); diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx index 787cf6f..255356f 100644 --- a/cui/source/options/optmemory.cxx +++ b/cui/source/options/optmemory.cxx @@ -174,7 +174,7 @@ bool OfaMemoryOptionsPage::FillItemSet( SfxItemSet* rSet ) officecfg::Office::Common::Cache::GraphicManager::ObjectCacheSize::set( objectCacheSize, batch); - const Time aTime( m_pTfGraphicObjectTime->GetTime() ); + const tools::Time aTime( m_pTfGraphicObjectTime->GetTime() ); sal_Int32 objectReleaseTime = aTime.GetSec() + aTime.GetMin() * 60 + aTime.GetHour() * 3600; officecfg::Office::Common::Cache::GraphicManager::ObjectReleaseTime::set( @@ -227,7 +227,7 @@ void OfaMemoryOptionsPage::Reset( const SfxItemSet* rSet ) sal_Int32 nTime = officecfg::Office::Common::Cache::GraphicManager::ObjectReleaseTime:: get(); - Time aTime( (sal_uInt16)( nTime / 3600 ), (sal_uInt16)( ( nTime % 3600 ) / 60 ), (sal_uInt16)( ( nTime % 3600 ) % 60 ) ); + tools::Time aTime( (sal_uInt16)( nTime / 3600 ), (sal_uInt16)( ( nTime % 3600 ) / 60 ), (sal_uInt16)( ( nTime % 3600 ) % 60 ) ); m_pTfGraphicObjectTime->SetTime( aTime ); GraphicCacheConfigHdl(m_pNfGraphicCache); diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx index 702373b..3a7c6715 100644 --- a/cui/source/options/optupdt.cxx +++ b/cui/source/options/optupdt.cxx @@ -108,7 +108,7 @@ void SvxOnlineUpdateTabPage::UpdateLastCheckedText() oslDateTime lastCheckedDT; Date aDate( Date::EMPTY ); - Time aTime( Time::EMPTY ); + tools::Time aTime( tools::Time::EMPTY ); lastCheckedTV.Seconds = (sal_uInt32) lastChecked; osl_getLocalTimeFromSystemTime( &lastCheckedTV, &lastCheckedTV ); @@ -116,7 +116,7 @@ void SvxOnlineUpdateTabPage::UpdateLastCheckedText() if ( osl_getDateTimeFromTimeValue( &lastCheckedTV, &lastCheckedDT ) ) { aDate = Date( lastCheckedDT.Day, lastCheckedDT.Month, lastCheckedDT.Year ); - aTime = Time( lastCheckedDT.Hours, lastCheckedDT.Minutes ); + aTime = ::tools::Time( lastCheckedDT.Hours, lastCheckedDT.Minutes ); } LanguageType eUILang = Application::GetSettings().GetUILanguageTag().getLanguageType(); diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index a5a02ab..91da32d 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -81,7 +81,7 @@ SvxFieldData* SvxFieldData::Create(const uno::Reference<text::XTextContent>& xTe if (nFieldType != text::textfield::Type::TIME) { util::DateTime aDateTime = xPropSet->getPropertyValue(UNO_TC_PROP_DATE_TIME).get<util::DateTime>(); - Time aTime(aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.NanoSeconds); + tools::Time aTime(aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds, aDateTime.NanoSeconds); bool bIsFixed = false; xPropSet->getPropertyValue(UNO_TC_PROP_IS_FIXED) >>= bIsFixed; @@ -787,7 +787,7 @@ SV_IMPL_PERSIST1( SvxExtTimeField, SvxFieldData ); SvxExtTimeField::SvxExtTimeField() - : m_nFixTime( Time(Time::SYSTEM).GetTime() ) + : m_nFixTime( tools::Time(tools::Time::SYSTEM).GetTime() ) { eType = SVXTIMETYPE_VAR; eFormat = SVXTIMEFORMAT_STANDARD; @@ -795,7 +795,7 @@ SvxExtTimeField::SvxExtTimeField() -SvxExtTimeField::SvxExtTimeField( const Time& rTime, SvxTimeType eT, SvxTimeFormat eF ) +SvxExtTimeField::SvxExtTimeField( const tools::Time& rTime, SvxTimeType eT, SvxTimeFormat eF ) : m_nFixTime( rTime.GetTime() ) { eType = eT; @@ -849,15 +849,15 @@ void SvxExtTimeField::Save( SvPersistStream & rStm ) OUString SvxExtTimeField::GetFormatted( SvNumberFormatter& rFormatter, LanguageType eLang ) const { - Time aTime( Time::EMPTY ); + tools::Time aTime( tools::Time::EMPTY ); if ( eType == SVXTIMETYPE_FIX ) aTime.SetTime(m_nFixTime); else - aTime = Time( Time::SYSTEM ); // current time + aTime = tools::Time( tools::Time::SYSTEM ); // current time return GetFormatted( aTime, eFormat, rFormatter, eLang ); } -OUString SvxExtTimeField::GetFormatted( Time& aTime, SvxTimeFormat eFormat, SvNumberFormatter& rFormatter, LanguageType eLang ) +OUString SvxExtTimeField::GetFormatted( tools::Time& aTime, SvxTimeFormat eFormat, SvNumberFormatter& rFormatter, LanguageType eLang ) { switch( eFormat ) { @@ -1269,7 +1269,7 @@ void SvxDateTimeField::Save( SvPersistStream & /*rStm*/ ) SvxDateTimeField::SvxDateTimeField() {} OUString SvxDateTimeField::GetFormatted( - Date& rDate, Time& rTime, int eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage ) + Date& rDate, tools::Time& rTime, int eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage ) { OUString aRet; diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 191bbe8..967ae23 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -1551,7 +1551,7 @@ bool SvxAutoCorrect::CreateLanguageFile( const LanguageTag& rLanguageTag, bool b SvxAutoCorrectLanguageListsPtr pLists = 0; - Time nMinTime( 0, 2 ), nAktTime( Time::SYSTEM ), nLastCheckTime( Time::EMPTY ); + tools::Time nMinTime( 0, 2 ), nAktTime( tools::Time::SYSTEM ), nLastCheckTime( tools::Time::EMPTY ); std::map<LanguageTag, long>::iterator nFndPos = aLastFileTable.find(rLanguageTag); if(nFndPos != aLastFileTable.end() && @@ -1925,8 +1925,8 @@ SvxAutoCorrectLanguageLists::SvxAutoCorrectLanguageLists( : sShareAutoCorrFile( rShareAutoCorrectFile ), sUserAutoCorrFile( rUserAutoCorrectFile ), aModifiedDate( Date::EMPTY ), - aModifiedTime( Time::EMPTY ), - aLastCheckTime( Time::EMPTY ), + aModifiedTime( tools::Time::EMPTY ), + aLastCheckTime( tools::Time::EMPTY ), pCplStt_ExcptLst( 0 ), pWrdStt_ExcptLst( 0 ), pAutocorr_List( 0 ), @@ -1947,12 +1947,12 @@ bool SvxAutoCorrectLanguageLists::IsFileChanged_Imp() // Access the file system only every 2 minutes to check the date stamp bool bRet = false; - Time nMinTime( 0, 2 ); - Time nAktTime( Time::SYSTEM ); + tools::Time nMinTime( 0, 2 ); + tools::Time nAktTime( tools::Time::SYSTEM ); if( aLastCheckTime > nAktTime || // overflow? ( nAktTime -= aLastCheckTime ) > nMinTime ) // min time past { - Date aTstDate( Date::EMPTY ); Time aTstTime( Time::EMPTY ); + Date aTstDate( Date::EMPTY ); tools::Time aTstTime( tools::Time::EMPTY ); if( FStatHelper::GetModifiedDateTimeOfFile( sShareAutoCorrFile, &aTstDate, &aTstTime ) && ( aModifiedDate != aTstDate || aModifiedTime != aTstTime )) @@ -1967,7 +1967,7 @@ bool SvxAutoCorrectLanguageLists::IsFileChanged_Imp() delete pAutocorr_List, pAutocorr_List = 0; nFlags &= ~(CplSttLstLoad | WrdSttLstLoad | ChgWordLstLoad ); } - aLastCheckTime = Time( Time::SYSTEM ); + aLastCheckTime = tools::Time( tools::Time::SYSTEM ); } return bRet; } @@ -2038,7 +2038,7 @@ void SvxAutoCorrectLanguageLists::LoadXMLExceptList_Imp( // Set time stamp FStatHelper::GetModifiedDateTimeOfFile( sShareAutoCorrFile, &aModifiedDate, &aModifiedTime ); - aLastCheckTime = Time( Time::SYSTEM ); + aLastCheckTime = tools::Time( tools::Time::SYSTEM ); } } @@ -2138,7 +2138,7 @@ SvxAutocorrWordList* SvxAutoCorrectLanguageLists::LoadAutocorrWordList() // Set time stamp FStatHelper::GetModifiedDateTimeOfFile( sShareAutoCorrFile, &aModifiedDate, &aModifiedTime ); - aLastCheckTime = Time( Time::SYSTEM ); + aLastCheckTime = tools::Time( tools::Time::SYSTEM ); return pAutocorr_List; } @@ -2184,7 +2184,7 @@ bool SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const OUString& rNew) // Set time stamp FStatHelper::GetModifiedDateTimeOfFile( sUserAutoCorrFile, &aModifiedDate, &aModifiedTime ); - aLastCheckTime = Time( Time::SYSTEM ); + aLastCheckTime = tools::Time( tools::Time::SYSTEM ); aRet = true; } return aRet; @@ -2205,7 +2205,7 @@ bool SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const OUString& rNew) // Set time stamp FStatHelper::GetModifiedDateTimeOfFile( sUserAutoCorrFile, &aModifiedDate, &aModifiedTime ); - aLastCheckTime = Time( Time::SYSTEM ); + aLastCheckTime = tools::Time( tools::Time::SYSTEM ); aRet = true; } return aRet; @@ -2238,7 +2238,7 @@ void SvxAutoCorrectLanguageLists::SaveCplSttExceptList() // Set time stamp FStatHelper::GetModifiedDateTimeOfFile( sUserAutoCorrFile, &aModifiedDate, &aModifiedTime ); - aLastCheckTime = Time( Time::SYSTEM ); + aLastCheckTime = tools::Time( tools::Time::SYSTEM ); } void SvxAutoCorrectLanguageLists::SetCplSttExceptList( SvStringsISortDtor* pList ) @@ -2282,7 +2282,7 @@ void SvxAutoCorrectLanguageLists::SaveWrdSttExceptList() // Set time stamp FStatHelper::GetModifiedDateTimeOfFile( sUserAutoCorrFile, &aModifiedDate, &aModifiedTime ); - aLastCheckTime = Time( Time::SYSTEM ); + aLastCheckTime = tools::Time( tools::Time::SYSTEM ); } void SvxAutoCorrectLanguageLists::SetWrdSttExceptList( SvStringsISortDtor* pList ) diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx index e84482e..8d46c15 100644 --- a/editeng/source/uno/unofield.cxx +++ b/editeng/source/uno/unofield.cxx @@ -201,7 +201,7 @@ static util::DateTime getTime(sal_Int64 const nTime) util::DateTime aTime; memset( &aTime, 0, sizeof( util::DateTime ) ); - Time aTempTime( nTime ); + tools::Time aTempTime( nTime ); aTime.NanoSeconds = aTempTime.GetNanoSec(); aTime.Seconds = aTempTime.GetSec(); @@ -211,9 +211,9 @@ static util::DateTime getTime(sal_Int64 const nTime) return aTime; } -inline Time setTime( util::DateTime& rDate ) +inline tools::Time setTime( util::DateTime& rDate ) { - return Time( rDate.Hours, rDate.Minutes, rDate.Seconds, rDate.NanoSeconds ); + return tools::Time( rDate.Hours, rDate.Minutes, rDate.Seconds, rDate.NanoSeconds ); } @@ -398,7 +398,7 @@ SvxFieldData* SvxUnoTextField::CreateFieldData() const throw() { if( mnServiceId != text::textfield::Type::TIME && mnServiceId != text::textfield::Type::DATE ) { - Time aTime( setTime( mpImpl->maDateTime ) ); + tools::Time aTime( setTime( mpImpl->maDateTime ) ); pData = new SvxExtTimeField( aTime, mpImpl->mbBoolean1?SVXTIMETYPE_FIX:SVXTIMETYPE_VAR ); if( mpImpl->mnInt32 >= SVXTIMEFORMAT_APPDEFAULT && mpImpl->mnInt32 <= SVXTIMEFORMAT_AM_HMSH ) diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index cd98151..2e22d16 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -87,7 +87,7 @@ namespace pcr } else { - ::Time aTime( aUNOTime.Hours, aUNOTime.Minutes, aUNOTime.Seconds, aUNOTime.NanoSeconds ); + ::tools::Time aTime( aUNOTime.Hours, aUNOTime.Minutes, aUNOTime.Seconds, aUNOTime.NanoSeconds ); getTypedControlWindow()->SetTime( aTime ); } } diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx index 9007f57..ed2a27d 100644 --- a/extensions/source/propctrlr/usercontrol.cxx +++ b/extensions/source/propctrlr/usercontrol.cxx @@ -130,7 +130,7 @@ namespace pcr case NUMBERFORMAT_TIME: case NUMBERFORMAT_DATETIME: { - Time aCurrentTime( Time::SYSTEM ); + tools::Time aCurrentTime( tools::Time::SYSTEM ); nValue = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toTime(aCurrentTime.GetTime())); } break; diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 0d99c9d..a098b94 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -2661,7 +2661,7 @@ void ImportComment10( SvxMSDffManager& rMan, SvStream& rStCtrl, SdrPage* pPage, .ReadInt32( nPosX ) .ReadInt32( nPosY ); - aDateTime.NanoSeconds *= ::Time::nanoPerMilli; + aDateTime.NanoSeconds *= ::tools::Time::nanoPerMilli; } break; } @@ -6299,7 +6299,7 @@ void PPTFieldEntry::SetDateTime( sal_uInt32 nVal ) pField1 = new SvxFieldItem( SvxDateField( Date( Date::SYSTEM ), SVXDATETYPE_VAR, eDateFormat ), EE_FEATURE_FIELD ); if ( eTimeFormat != SVXTIMEFORMAT_APPDEFAULT ) { - SvxFieldItem* pFieldItem = new SvxFieldItem( SvxExtTimeField( Time( Time::SYSTEM ), SVXTIMETYPE_VAR, eTimeFormat ), EE_FEATURE_FIELD ); + SvxFieldItem* pFieldItem = new SvxFieldItem( SvxExtTimeField( tools::Time( tools::Time::SYSTEM ), SVXTIMETYPE_VAR, eTimeFormat ), EE_FEATURE_FIELD ); if ( pField1 ) pField2 = pFieldItem; else diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx index 9f3a640..8350a1a 100644 --- a/filter/source/msfilter/util.cxx +++ b/filter/source/msfilter/util.cxx @@ -64,7 +64,7 @@ DateTime DTTM2DateTime( long lDTTM ) Friday=5 Saturday=6) */ - DateTime aDateTime(Date( 0 ), Time( 0 )); + DateTime aDateTime(Date( 0 ), ::tools::Time( 0 )); if( lDTTM ) { sal_uInt16 lMin = (sal_uInt16)(lDTTM & 0x0000003F); @@ -76,7 +76,7 @@ DateTime DTTM2DateTime( long lDTTM ) sal_uInt16 lMon = (sal_uInt16)(lDTTM & 0x0000000F); lDTTM >>= 4; sal_uInt16 lYear= (sal_uInt16)(lDTTM & 0x000001FF) + 1900; - aDateTime = DateTime(Date(lDay, lMon, lYear), Time(lHour, lMin)); + aDateTime = DateTime(Date(lDay, lMon, lYear), tools::Time(lHour, lMin)); } return aDateTime; } diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 676fb18..26430aa 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -790,7 +790,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc } break; case FormComponentType::TIMEFIELD: { - // <name>=<value> // Value is a Time with the format HH:MM:SS + // <name>=<value> // Value is a tools::Time with the format HH:MM:SS // no value (NULL) means empty value if( hasProperty(PROPERTY_TIME, xComponentSet) ) { @@ -799,7 +799,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc sal_Int32 nInt32Val = 0; if (aVal >>= nInt32Val) { - ::Time aTime(nInt32Val); + ::tools::Time aTime(nInt32Val); OUStringBuffer aBuffer; appendDigits( aTime.GetHour(), 2, aBuffer ); aBuffer.append( '-' ); diff --git a/forms/source/component/EditBase.cxx b/forms/source/component/EditBase.cxx index 6b8ca64..e585853 100644 --- a/forms/source/component/EditBase.cxx +++ b/forms/source/component/EditBase.cxx @@ -127,7 +127,7 @@ void OEditBaseModel::write(const Reference<XObjectOutputStream>& _rxOutStream) t { util::Time aTime; OSL_VERIFY(m_aDefault >>= aTime); - _rxOutStream->writeHyper(::Time(aTime).GetTime()); + _rxOutStream->writeHyper(::tools::Time(aTime).GetTime()); } else if ((nAnyMask & DEFAULT_DATE) == DEFAULT_DATE) { @@ -193,7 +193,7 @@ void OEditBaseModel::read(const Reference<XObjectInputStream>& _rxInStream) thro } else if ((nAnyMask & DEFAULT_TIME) == DEFAULT_TIME) { - m_aDefault <<= ::Time(_rxInStream->readHyper()).GetUNOTime(); + m_aDefault <<= ::tools::Time(_rxInStream->readHyper()).GetUNOTime(); } else if ((nAnyMask & DEFAULT_DATE) == DEFAULT_DATE) { diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx index 6c8d643..84d9eb9 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 b20c2ab..776a264 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(); diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index 74b612f..183bddf 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -113,7 +113,7 @@ using namespace InternalFilePickerElementIds; #define GET_DECODED_NAME(aObj) \ aObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ) -// Time to wait while traveling in the filterbox until +// tools::Time to wait while traveling in the filterbox until // the browsebox gets filtered ( in ms). #define TRAVELFILTER_TIMEOUT 750 diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 8efe331..8c186c4 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -372,7 +372,7 @@ private: bool m_bListenForConfigChanges; /** @short specify the time intervall between two save actions. - @descr Time is measured in [min]. + @descr tools::Time is measured in [min]. */ sal_Int32 m_nAutoSaveTimeIntervall; diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx index ee90844..c09432d 100644 --- a/i18npool/source/calendar/calendar_gregorian.cxx +++ b/i18npool/source/calendar/calendar_gregorian.cxx @@ -646,7 +646,7 @@ void Calendar_gregorian::setValue() throw(RuntimeException) DUMP_ICU_CAL_MSG(("%s\n","setValue() after Zone/DST glitch resubmit")); DUMP_I18N_CAL_MSG(("%s\n","setValue() after Zone/DST glitch resubmit")); - // Time zone transition => resubmit. + // tools::Time zone transition => resubmit. // TZ=America/St_Johns date <= 1935-03-30 // -3:30:52 (!) instead of -3:30 // if first submission included time zone -3:30 that would be wrong. diff --git a/i18npool/source/calendar/calendar_hijri.cxx b/i18npool/source/calendar/calendar_hijri.cxx index a020041..b1381d8 100644 --- a/i18npool/source/calendar/calendar_hijri.cxx +++ b/i18npool/source/calendar/calendar_hijri.cxx @@ -115,7 +115,7 @@ Calendar_hijri::NewMoon(sal_Int32 n) { double jd, t, t2, t3, k, ma, sa, tf, xtra; k = n; - t = k/1236.85; // Time in Julian centuries from 1900 January 0.5 + t = k/1236.85; // tools::Time in Julian centuries from 1900 January 0.5 t2 = t * t; t3 = t2 * t; @@ -160,7 +160,7 @@ Calendar_hijri::NewMoon(sal_Int32 n) + 0.0010 * sin(tf - ma) + 0.0005 * sin(sa + 2 * ma); - // convert from Ephemeris Time (ET) to (approximate) Universal Time (UT) + // convert from Ephemeris tools::Time (ET) to (approximate) Universal tools::Time (UT) jd += xtra - (0.41 + 1.2053 * t + 0.4992 * t2)/1440; return (jd); diff --git a/include/editeng/flditem.hxx b/include/editeng/flditem.hxx index 532e30a..e35e503 100644 --- a/include/editeng/flditem.hxx +++ b/include/editeng/flditem.hxx @@ -276,12 +276,12 @@ private: public: SV_DECL_PERSIST1( SvxExtTimeField, SvxFieldData, com::sun::star::text::textfield::Type::EXTENDED_TIME ) SvxExtTimeField(); - explicit SvxExtTimeField( const Time& rTime, + explicit SvxExtTimeField( const tools::Time& rTime, SvxTimeType eType = SVXTIMETYPE_VAR, SvxTimeFormat eFormat = SVXTIMEFORMAT_STANDARD ); sal_Int64 GetFixTime() const { return m_nFixTime; } - void SetFixTime( const Time& rTime ) { m_nFixTime = rTime.GetTime(); } + void SetFixTime( const tools::Time& rTime ) { m_nFixTime = rTime.GetTime(); } SvxTimeType GetType() const { return eType; } void SetType( SvxTimeType eTp ) { eType = eTp; } @@ -292,7 +292,7 @@ public: // If eLanguage==LANGUAGE_DONTKNOW the language/country // used in number formatter initialization is taken. OUString GetFormatted( SvNumberFormatter& rFormatter, LanguageType eLanguage ) const; - static OUString GetFormatted( Time& rTime, SvxTimeFormat eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage ); + static OUString GetFormatted( tools::Time& rTime, SvxTimeFormat eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage ); virtual SvxFieldData* Clone() const SAL_OVERRIDE; virtual bool operator==( const SvxFieldData& ) const SAL_OVERRIDE; @@ -418,7 +418,7 @@ public: SV_DECL_PERSIST1( SvxDateTimeField, SvxFieldData, com::sun::star::text::textfield::Type::PRESENTATION_DATE_TIME ) SvxDateTimeField(); - static OUString GetFormatted( Date& rDate, Time& rTime, int eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage ); + static OUString GetFormatted( Date& rDate, tools::Time& rTime, int eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage ); virtual SvxFieldData* Clone() const SAL_OVERRIDE; virtual bool operator==( const SvxFieldData& ) const SAL_OVERRIDE; diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx index aff3c03..8ad8564 100644 --- a/include/editeng/svxacorr.hxx +++ b/include/editeng/svxacorr.hxx @@ -171,7 +171,7 @@ class EDITENG_DLLPUBLIC SvxAutoCorrectLanguageLists OUString sShareAutoCorrFile, sUserAutoCorrFile; // If the AutoCorr file is newer Date aModifiedDate; - Time aModifiedTime, aLastCheckTime; + tools::Time aModifiedTime, aLastCheckTime; SvStringsISortDtor* pCplStt_ExcptLst; SvStringsISortDtor* pWrdStt_ExcptLst; diff --git a/include/postx.h b/include/postx.h index 0952f7e..195786f 100644 --- a/include/postx.h +++ b/include/postx.h @@ -26,7 +26,6 @@ /* X Types */ #undef Icon -#undef Time #undef Min #undef Max diff --git a/include/prex.h b/include/prex.h index 7b1a357..a7db2bd 100644 --- a/include/prex.h +++ b/include/prex.h @@ -29,9 +29,6 @@ */ #define Icon HIDE_XLIB_Icon -/* Types from <X11/X.h> that clash, but we do use. */ -#define Time XLIB_Time - #if defined __cplusplus extern "C" { #endif diff --git a/include/svl/fstathelper.hxx b/include/svl/fstathelper.hxx index feb43ce..f6e4343 100644 --- a/include/svl/fstathelper.hxx +++ b/include/svl/fstathelper.hxx @@ -24,7 +24,7 @@ #include <svl/svldllapi.h> class Date; -class Time; +namespace tools { class Time; } namespace FStatHelper { @@ -39,7 +39,7 @@ namespace FStatHelper { @return it was be able to get the date/time stamp */ SVL_DLLPUBLIC bool GetModifiedDateTimeOfFile( const OUString& rURL, - Date* pDate, Time* pTime ); + Date* pDate, tools::Time* pTime ); /** Return if under the URL a document exist. This is only a wrapper for the UCB.IsContent. diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx index 6856961..eca260a 100644 --- a/include/svx/ctredlin.hxx +++ b/include/svx/ctredlin.hxx @@ -120,8 +120,8 @@ public: void SetDateTimeMode(sal_uInt16 nMode); void SetFirstDate(const Date&); void SetLastDate(const Date&); - void SetFirstTime(const Time&); - void SetLastTime(const Time&); + void SetFirstTime(const tools::Time&); + void SetLastTime(const tools::Time&); void SetFilterAuthor(bool bFlag=true); void SetAuthor(const OUString &); void SetFilterComment(bool bFlag=true); @@ -209,13 +209,13 @@ public: Date GetFirstDate() const; void SetFirstDate(const Date &aDate); - Time GetFirstTime() const; - void SetFirstTime(const Time &aTime); + tools::Time GetFirstTime() const; + void SetFirstTime(const tools::Time &aTime); Date GetLastDate() const; void SetLastDate(const Date &aDate); - Time GetLastTime() const; - void SetLastTime(const Time &aTime); + tools::Time GetLastTime() const; + void SetLastTime(const tools::Time &aTime); void SetDateMode(sal_uInt16 nMode); sal_uInt16 GetDateMode(); diff --git a/include/svx/galmisc.hxx b/include/svx/galmisc.hxx index 4feff17..5336de7 100644 --- a/include/svx/galmisc.hxx +++ b/include/svx/galmisc.hxx @@ -39,12 +39,12 @@ struct ExchangeData GalleryTheme* pTheme; OUString aEditedTitle; Date aThemeChangeDate; - Time aThemeChangeTime; + tools::Time aThemeChangeTime; ExchangeData() : pTheme(NULL) , aThemeChangeDate( Date::EMPTY ) - , aThemeChangeTime( Time::EMPTY ) + , aThemeChangeTime( tools::Time::EMPTY ) { } }; diff --git a/include/tools/datetime.hxx b/include/tools/datetime.hxx index c5e45ec..256bb72 100644 --- a/include/tools/datetime.hxx +++ b/include/tools/datetime.hxx @@ -23,7 +23,7 @@ #include <tools/date.hxx> #include <tools/time.hxx> -class TOOLS_DLLPUBLIC SAL_WARN_UNUSED DateTime : public Date, public Time +class TOOLS_DLLPUBLIC SAL_WARN_UNUSED DateTime : public Date, public tools::Time { public: enum DateTimeInitSystem @@ -42,8 +42,8 @@ public: DateTime( const DateTime& rDateTime ) : Date( rDateTime ), Time( rDateTime ) {} DateTime( const Date& rDate ) : Date( rDate ), Time(0) {} - DateTime( const Time& rTime ) : Date(0), Time( rTime ) {} - DateTime( const Date& rDate, const Time& rTime ) : + DateTime( const tools::Time& rTime ) : Date(0), Time( rTime ) {} + DateTime( const Date& rDate, const tools::Time& rTime ) : Date( rDate ), Time( rTime ) {} bool IsBetween( const DateTime& rFrom, @@ -79,16 +79,16 @@ public: DateTime& operator +=( double fTimeInDays ); DateTime& operator -=( double fTimeInDays ) { return operator+=( -fTimeInDays ); } - DateTime& operator +=( const Time& rTime ); - DateTime& operator -=( const Time& rTime ); + DateTime& operator +=( const tools::Time& rTime ); + DateTime& operator -=( const tools::Time& rTime ); TOOLS_DLLPUBLIC friend DateTime operator +( const DateTime& rDateTime, long nDays ); TOOLS_DLLPUBLIC friend DateTime operator -( const DateTime& rDateTime, long nDays ); TOOLS_DLLPUBLIC friend DateTime operator +( const DateTime& rDateTime, double fTimeInDays ); TOOLS_DLLPUBLIC friend DateTime operator -( const DateTime& rDateTime, double fTimeInDays ) { return operator+( rDateTime, -fTimeInDays ); } - TOOLS_DLLPUBLIC friend DateTime operator +( const DateTime& rDateTime, const Time& rTime ); - TOOLS_DLLPUBLIC friend DateTime operator -( const DateTime& rDateTime, const Time& rTime ); + TOOLS_DLLPUBLIC friend DateTime operator +( const DateTime& rDateTime, const tools::Time& rTime ); + TOOLS_DLLPUBLIC friend DateTime operator -( const DateTime& rDateTime, const tools::Time& rTime ); TOOLS_DLLPUBLIC friend double operator -( const DateTime& rDateTime1, const DateTime& rDateTime2 ); TOOLS_DLLPUBLIC friend long operator -( const DateTime& rDateTime, const Date& rDate ) { return (const Date&) rDateTime - rDate; } diff --git a/include/tools/time.hxx b/include/tools/time.hxx index ac259bc..cac4117 100644 --- a/include/tools/time.hxx +++ b/include/tools/time.hxx @@ -31,6 +31,8 @@ class ResId; 25 hours or 10 minus 20 seconds being (non-negative) 10 seconds. */ +namespace tools { + class TOOLS_DLLPUBLIC SAL_WARN_UNUSED Time { private: @@ -68,7 +70,7 @@ public: Time( TimeInitSystem ); Time( const ResId & rResId ); Time( sal_Int64 _nTime ) { Time::nTime = _nTime; } - Time( const Time& rTime ); + Time( const tools::Time& rTime ); Time( const ::com::sun::star::util::Time& rTime ); Time( sal_uInt32 nHour, sal_uInt32 nMin, sal_uInt32 nSec = 0, sal_uInt64 nNanoSec = 0 ); @@ -103,22 +105,22 @@ public: /// 12 hours == 0.5 days double GetTimeInDays() const; - bool IsBetween( const Time& rFrom, const Time& rTo ) const + bool IsBetween( const tools::Time& rFrom, const tools::Time& rTo ) const { return ((nTime >= rFrom.nTime) && (nTime <= rTo.nTime)); } - bool IsEqualIgnoreNanoSec( const Time& rTime ) const; + bool IsEqualIgnoreNanoSec( const tools::Time& rTime ) const; - bool operator ==( const Time& rTime ) const + bool operator ==( const tools::Time& rTime ) const { return (nTime == rTime.nTime); } - bool operator !=( const Time& rTime ) const + bool operator !=( const tools::Time& rTime ) const { return (nTime != rTime.nTime); } - bool operator >( const Time& rTime ) const + bool operator >( const tools::Time& rTime ) const { return (nTime > rTime.nTime); } - bool operator <( const Time& rTime ) const + bool operator <( const tools::Time& rTime ) const { return (nTime < rTime.nTime); } - bool operator >=( const Time& rTime ) const + bool operator >=( const tools::Time& rTime ) const { return (nTime >= rTime.nTime); } - bool operator <=( const Time& rTime ) const + bool operator <=( const tools::Time& rTime ) const { return (nTime <= rTime.nTime); } static Time GetUTCOffset(); @@ -127,15 +129,17 @@ public: void ConvertToUTC() { *this -= Time::GetUTCOffset(); } void ConvertToLocalTime() { *this += Time::GetUTCOffset(); } - Time& operator =( const Time& rTime ); + tools::Time& operator =( const tools::Time& rTime ); Time operator -() const { return Time( -nTime ); } - Time& operator +=( const Time& rTime ); - Time& operator -=( const Time& rTime ); - TOOLS_DLLPUBLIC friend Time operator +( const Time& rTime1, const Time& rTime2 ); - TOOLS_DLLPUBLIC friend Time operator -( const Time& rTime1, const Time& rTime2 ); + tools::Time& operator +=( const tools::Time& rTime ); + tools::Time& operator -=( const tools::Time& rTime ); + TOOLS_DLLPUBLIC friend Time operator +( const tools::Time& rTime1, const tools::Time& rTime2 ); + TOOLS_DLLPUBLIC friend Time operator -( const tools::Time& rTime1, const tools::Time& rTime2 ); }; +} /* namespace tools */ + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/unotools/datetime.hxx b/include/unotools/datetime.hxx index 306db28..c7de9ba 100644 --- a/include/unotools/datetime.hxx +++ b/include/unotools/datetime.hxx @@ -28,7 +28,7 @@ #include <com/sun/star/util/DateTime.hpp> class Date; -class Time; +namespace tools { class Time; } class DateTime; namespace utl diff --git a/include/unotools/localedatawrapper.hxx b/include/unotools/localedatawrapper.hxx index 15c9520..77e580f 100644 --- a/include/unotools/localedatawrapper.hxx +++ b/include/unotools/localedatawrapper.hxx @@ -36,7 +36,7 @@ namespace com { namespace sun { namespace star { } }}} class Date; -class Time; +namespace tools { class Time; } class CalendarWrapper; enum DateFormat { @@ -241,9 +241,9 @@ public: DateFormat getLongDateFormat() const; /// only numerical values of Gregorian calendar OUString getDate( const Date& rDate ) const; - OUString getTime( const Time& rTime, bool bSec = true, + OUString getTime( const tools::Time& rTime, bool bSec = true, bool b100Sec = false ) const; - OUString getDuration( const Time& rTime, + OUString getDuration( const tools::Time& rTime, bool bSec = true, bool b100Sec = false ) const; /** The CalendarWrapper already <b>MUST</b> diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx index 35648a8..f3d6c82 100644 --- a/include/vcl/field.hxx +++ b/include/vcl/field.hxx @@ -405,26 +405,26 @@ public: class VCL_DLLPUBLIC TimeFormatter : public FormatterBase { private: - Time maLastTime; - Time maMin; - Time maMax; - Time maCorrectedTime; + tools::Time maLastTime; + tools::Time maMin; + tools::Time maMax; + tools::Time maCorrectedTime; TimeFieldFormat meFormat; - sal_uInt16 mnTimeFormat; + sal_uInt16 mnTimeFormat; bool mbDuration; bool mbEnforceValidValue; SAL_DLLPRIVATE void ImplInit(); protected: - Time maFieldTime; + tools::Time maFieldTime; TimeFormatter(); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); SAL_DLLPRIVATE bool ImplTimeReformat( const OUString& rStr, OUString& rOutStr ); - SAL_DLLPRIVATE void ImplNewFieldValue( const Time& rTime ); - SAL_DLLPRIVATE void ImplSetUserTime( const Time& rNewTime, Selection* pNewSelection = NULL ); + SAL_DLLPRIVATE void ImplNewFieldValue( const tools::Time& rTime ); + SAL_DLLPRIVATE void ImplSetUserTime( const tools::Time& rNewTime, Selection* pNewSelection = NULL ); SAL_DLLPRIVATE bool ImplAllowMalformedInput() const; public: @@ -439,10 +439,10 @@ public: virtual void Reformat() SAL_OVERRIDE; virtual void ReformatAll() SAL_OVERRIDE; - void SetMin( const Time& rNewMin ); - const Time& GetMin() const { return maMin; } - void SetMax( const Time& rNewMax ); - const Time& GetMax() const { return maMax; } + void SetMin( const tools::Time& rNewMin ); + const tools::Time& GetMin() const { return maMin; } + void SetMax( const tools::Time& rNewMax ); + const tools::Time& GetMax() const { return maMax; } void SetTimeFormat( TimeFormat eNewFormat ); TimeFormat GetTimeFormat() const { return (TimeFormat)mnTimeFormat;} @@ -453,14 +453,14 @@ public: void SetDuration( bool mbDuration ); bool IsDuration() const { return mbDuration; } - void SetTime( const Time& rNewTime ); - void SetUserTime( const Time& rNewTime ); - Time GetTime() const; + void SetTime( const tools::Time& rNewTime ); + void SetUserTime( const tools::Time& rNewTime ); + tools::Time GetTime() const; void SetEmptyTime() { FormatterBase::SetEmptyFieldValue(); } bool IsEmptyTime() const { return FormatterBase::IsEmptyFieldValue(); } - Time GetCorrectedTime() const { return maCorrectedTime; } + tools::Time GetCorrectedTime() const { return maCorrectedTime; } - static Time GetInvalidTime() { return Time( 99, 99, 99 ); } + static tools::Time GetInvalidTime() { return tools::Time( 99, 99, 99 ); } /** enables or disables the enforcement of valid values @@ -662,8 +662,8 @@ public: class VCL_DLLPUBLIC TimeField : public SpinField, public TimeFormatter { private: - Time maFirst; - Time maLast; + tools::Time maFirst; + tools::Time maLast; protected: SAL_DLLPRIVATE void ImplTimeSpinArea( bool bUp ); @@ -685,10 +685,10 @@ public: virtual void First() SAL_OVERRIDE; virtual void Last() SAL_OVERRIDE; - void SetFirst( const Time& rNewFirst ) { maFirst = rNewFirst; } - Time GetFirst() const { return maFirst; } - void SetLast( const Time& rNewLast ) { maLast = rNewLast; } - Time GetLast() const { return maLast; } + void SetFirst( const tools::Time& rNewFirst ) { maFirst = rNewFirst; } + tools::Time GetFirst() const { return maFirst; } + void SetLast( const tools::Time& rNewLast ) { maLast = rNewLast; } + tools::Time GetLast() const { return maLast; } void SetExtFormat( ExtTimeFieldFormat eFormat ); }; diff --git a/include/xmloff/xmluconv.hxx b/include/xmloff/xmluconv.hxx index f41e0d3..32c3d13 100644 --- a/include/xmloff/xmluconv.hxx +++ b/include/xmloff/xmluconv.hxx @@ -44,7 +44,7 @@ // predeclarations -class Time; +namespace tools { class Time; } namespace com { namespace sun { namespace star { namespace util { struct DateTime; } diff --git a/lotuswordpro/source/filter/xfilter/xftimestyle.cxx b/lotuswordpro/source/filter/xfilter/xftimestyle.cxx index 04d12b6..188e94a 100644 --- a/lotuswordpro/source/filter/xfilter/xftimestyle.cxx +++ b/lotuswordpro/source/filter/xfilter/xftimestyle.cxx @@ -55,7 +55,7 @@ ************************************************************************/ /************************************************************************* * @file - * Time style. The TIme format for time field. + * tools::Time style. The TIme format for time field. ************************************************************************/ #include "xftimestyle.hxx" diff --git a/mysqlc/source/mysqlc_preparedstatement.cxx b/mysqlc/source/mysqlc_preparedstatement.cxx index 6ec219d..b3e0bbd 100644 --- a/mysqlc/source/mysqlc_preparedstatement.cxx +++ b/mysqlc/source/mysqlc_preparedstatement.cxx @@ -374,7 +374,7 @@ void SAL_CALL OPreparedStatement::setDate(sal_Int32 parameter, const Date& aData /* {{{ OPreparedStatement::setTime() -I- */ -void SAL_CALL OPreparedStatement::setTime(sal_Int32 parameter, const Time& aVal) +void SAL_CALL OPreparedStatement::setTime(sal_Int32 parameter, const tools::Time& aVal) throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("OPreparedStatement::setTime"); diff --git a/mysqlc/source/mysqlc_resultset.cxx b/mysqlc/source/mysqlc_resultset.cxx index 3541ec2..3291600 100644 --- a/mysqlc/source/mysqlc_resultset.cxx +++ b/mysqlc/source/mysqlc_resultset.cxx @@ -524,7 +524,7 @@ Time SAL_CALL OResultSet::getTime(sal_Int32 column) MutexGuard aGuard(m_aMutex); checkColumnIndex(column); - Time t; + tools::Time t; OUString timeString = getString(column); OUString token; sal_Int32 nIndex, i=0; @@ -562,7 +562,7 @@ DateTime SAL_CALL OResultSet::getTimestamp(sal_Int32 column) checkColumnIndex(column); DateTime dt; Date d = getDate(column); - Time t = getTime(column); + tools::Time t = getTime(column); dt.Year = d.Year; dt.Month = d.Month; @@ -1088,7 +1088,7 @@ void SAL_CALL OResultSet::updateDate(sal_Int32 column, const Date& /* x */) /* }}} */ /* {{{ OResultSet::updateTime() -U- */ -void SAL_CALL OResultSet::updateTime(sal_Int32 column, const Time& /* x */) +void SAL_CALL OResultSet::updateTime(sal_Int32 column, const tools::Time& /* x */) throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("OResultSet::updateTime"); diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.cxx index 1e9563a..1474d7a 100644 --- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.cxx +++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SPreparedStatement.cxx @@ -197,7 +197,7 @@ void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const Date& -void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const Time& aVal ) throw(SQLException, RuntimeException) +void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const css::util::Time& aVal ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx index ed34981..af8b5a0 100644 --- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx +++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx @@ -326,13 +326,13 @@ sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 columnIndex ) throw(SQLExcept } -Time SAL_CALL OResultSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) +css::util::Time SAL_CALL OResultSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException) { checkDisposed(OResultSet_BASE::rBHelper.bDisposed); ::osl::MutexGuard aGuard( m_aMutex ); - Time nRet; + css::util::Time nRet; return nRet; } @@ -657,7 +657,7 @@ void SAL_CALL OResultSet::updateDate( sal_Int32 columnIndex, const Date& x ) thr } -void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const Time& x ) throw(SQLException, RuntimeException) +void SAL_CALL OResultSet::updateTime( sal_Int32 columnIndex, const css::util::Time& x ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); diff --git a/oox/source/drawingml/textfield.cxx b/oox/source/drawingml/textfield.cxx index 2523156..b8a6f72 100644 --- a/oox/source/drawingml/textfield.cxx +++ b/oox/source/drawingml/textfield.cxx @@ -97,17 +97,17 @@ void lclCreateTextFields( std::list< Reference< XTextField > > & aFields, case 9: // DateTime dd/mm/yy H:MM:SS PM lclCreateTextFields( aFields, xModel, "datetime13" ); break; - case 10: // Time H:MM + case 10: // tools::Time H:MM bIsDate = false; break; - case 11: // Time H:MM:SS + case 11: // tools::Time H:MM:SS bIsDate = false; // this is the default format break; - case 12: // Time H:MM PM + case 12: // tools::Time H:MM PM bIsDate = false; break; - case 13: // Time H:MM:SS PM + case 13: // tools::Time H:MM:SS PM bIsDate = false; break; } diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx index 59711c0..1143e6a 100644 --- a/oox/source/dump/dumperbase.cxx +++ b/oox/source/dump/dumperbase.cxx @@ -2202,7 +2202,7 @@ util::DateTime InputObjectBase::dumpFileTime( const String& rName ) // file time is in 10^-7 seconds (100 nanoseconds), convert to nanoseconds nFileTime *= 100; // entire days - sal_Int64 nDays = nFileTime / sal_Int64( ::Time::nanoSecPerDay ); + sal_Int64 nDays = nFileTime / sal_Int64( ::tools::Time::nanoSecPerDay ); // number of entire years sal_Int64 nYears = (nDays - (nDays / (4 * 365)) + (nDays / (100 * 365)) - (nDays / (400 * 365))) / 365; // remaining days in the year @@ -2225,16 +2225,16 @@ util::DateTime InputObjectBase::dumpFileTime( const String& rName ) // the day aDateTime.Day = static_cast< sal_uInt16 >( nDaysInYear + 1 ); // number of nanoseconds in the day - sal_Int64 nTimeInDay = nFileTime % sal_Int64( ::Time::nanoSecPerDay ); + sal_Int64 nTimeInDay = nFileTime % sal_Int64( ::tools::Time::nanoSecPerDay ); // nanoseconds - aDateTime.NanoSeconds = static_cast< sal_uInt32 >( nTimeInDay % ::Time::nanoSecPerSec ); - nTimeInDay /= ::Time::nanoSecPerSec; + aDateTime.NanoSeconds = static_cast< sal_uInt32 >( nTimeInDay % ::tools::Time::nanoSecPerSec ); + nTimeInDay /= ::tools::Time::nanoSecPerSec; // seconds - aDateTime.Seconds = static_cast< sal_uInt16 >( nTimeInDay % ::Time::secondPerMinute ); - nTimeInDay /= ::Time::secondPerMinute; + aDateTime.Seconds = static_cast< sal_uInt16 >( nTimeInDay % ::tools::Time::secondPerMinute ); + nTimeInDay /= ::tools::Time::secondPerMinute; // minutes - aDateTime.Minutes = static_cast< sal_uInt16 >( nTimeInDay % ::Time::minutePerHour ); - nTimeInDay /= ::Time::minutePerHour; + aDateTime.Minutes = static_cast< sal_uInt16 >( nTimeInDay % ::tools::Time::minutePerHour ); + nTimeInDay /= ::tools::Time::minutePerHour; // hours aDateTime.Hours = static_cast< sal_uInt16 >( nTimeInDay ); diff --git a/reportdesign/source/filter/xml/xmlControlProperty.cxx b/reportdesign/source/filter/xml/xmlControlProperty.cxx index 942cf3f..8ac22eb 100644 --- a/reportdesign/source/filter/xml/xmlControlProperty.cxx +++ b/reportdesign/source/filter/xml/xmlControlProperty.cxx @@ -288,7 +288,7 @@ Any OXMLControlProperty::convertString(const ::com::sun::star::uno::Type& _rExpe case TYPE_TIME: { OSL_ENSURE(((sal_uInt32)nValue) == 0, - "OPropertyImport::convertString: a Time value with more than a fractional part?"); + "OPropertyImport::convertString: a tools::Time value with more than a fractional part?"); aReturn <<= implGetTime(nValue); } break; diff --git a/reportdesign/source/ui/dlg/DateTime.cxx b/reportdesign/source/ui/dlg/DateTime.cxx index 7de8782..e77d254 100644 --- a/reportdesign/source/ui/dlg/DateTime.cxx +++ b/reportdesign/source/ui/dlg/DateTime.cxx @@ -177,7 +177,7 @@ OUString ODateTimeDialog::getFormatStringByKey(::sal_Int32 _nNumberFormatKey,con double nValue = 0; if ( _bTime ) { - Time aCurrentTime( Time::SYSTEM ); + tools::Time aCurrentTime( tools::Time::SYSTEM ); nValue = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toTime(aCurrentTime.GetTime())); } else diff --git a/sal/workben/measure_oustrings.cxx b/sal/workben/measure_oustrings.cxx index 8372f49..0a4eb45 100644 --- a/sal/workben/measure_oustrings.cxx +++ b/sal/workben/measure_oustrings.cxx @@ -86,7 +86,7 @@ public: std::cout << "Unavailable" << std::endl; currenttest++; #ifndef HAVE_CALLGRIND - std::cout << " Elapsed Time is: " << m_nEndTime - m_nStartTime << "ms" << std::endl; + std::cout << " Elapsed tools::Time is: " << m_nEndTime - m_nStartTime << "ms" << std::endl; #endif } }; diff --git a/salhelper/source/timer.cxx b/salhelper/source/timer.cxx index 899d6c3..e4c34d8 100644 --- a/salhelper/source/timer.cxx +++ b/salhelper/source/timer.cxx @@ -87,16 +87,16 @@ Timer::Timer() { } -Timer::Timer( const TTimeValue& Time ) - : m_aTimeOut( Time ), +Timer::Timer( const TTimeValue& rTime ) + : m_aTimeOut( rTime ), m_aExpired( 0 ), m_aRepeatDelta( 0 ), m_pNext( NULL ) { } -Timer::Timer( const TTimeValue& Time, const TTimeValue& Repeat ) - : m_aTimeOut( Time ), +Timer::Timer( const TTimeValue& rTime, const TTimeValue& Repeat ) + : m_aTimeOut( rTime ), m_aExpired( 0 ), m_aRepeatDelta( Repeat ), m_pNext( NULL ) diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx index 4acb183..142650f 100644 --- a/sc/inc/editutil.hxx +++ b/sc/inc/editutil.hxx @@ -196,7 +196,7 @@ struct ScHeaderFieldData OUString aShortDocName; // pure file name OUString aTabName; Date aDate; - Time aTime; + tools::Time aTime; long nPageNo; long nTotalPages; SvxNumType eNumType; diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index 383186e..8a2d3a4 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -419,9 +419,9 @@ private: struct SrcShell { SfxObjectShellRef maShell; - Time maLastAccess; + tools::Time maLastAccess; - SrcShell() : maLastAccess( Time::SYSTEM ) {} + SrcShell() : maLastAccess( tools::Time::SYSTEM ) {} }; typedef ::boost::unordered_map<sal_uInt16, SrcShell> DocShellMap; diff --git a/sc/source/core/data/dbdocutl.cxx b/sc/source/core/data/dbdocutl.cxx index 66aa2e2..f99aaf0 100644 --- a/sc/source/core/data/dbdocutl.cxx +++ b/sc/source/core/data/dbdocutl.cxx @@ -105,10 +105,10 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB NUMBERFORMAT_TIME, ScGlobal::eLnge ); util::Time aTime = xRow->getTime(nRowPos); - nVal = aTime.Hours / static_cast<double>(::Time::hourPerDay) + - aTime.Minutes / static_cast<double>(::Time::minutePerDay) + - aTime.Seconds / static_cast<double>(::Time::secondPerDay) + - aTime.NanoSeconds / static_cast<double>(::Time::nanoSecPerDay); + nVal = aTime.Hours / static_cast<double>(::tools::Time::hourPerDay) + + aTime.Minutes / static_cast<double>(::tools::Time::minutePerDay) + + aTime.Seconds / static_cast<double>(::tools::Time::secondPerDay) + + aTime.NanoSeconds / static_cast<double>(::tools::Time::nanoSecPerDay); bEmptyFlag = xRow->wasNull(); bValue = true; } @@ -123,10 +123,10 @@ void ScDatabaseDocUtil::PutData( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB util::DateTime aStamp = xRow->getTimestamp(nRowPos); nVal = ( Date( aStamp.Day, aStamp.Month, aStamp.Year ) - *pFormTable->GetNullDate() ) + - aStamp.Hours / static_cast<double>(::Time::hourPerDay) + - aStamp.Minutes / static_cast<double>(::Time::minutePerDay) + - aStamp.Seconds / static_cast<double>(::Time::secondPerDay) + - aStamp.NanoSeconds / static_cast<double>(::Time::nanoSecPerDay); + aStamp.Hours / static_cast<double>(::tools::Time::hourPerDay) + + aStamp.Minutes / static_cast<double>(::tools::Time::minutePerDay) + + aStamp.Seconds / static_cast<double>(::tools::Time::secondPerDay) + + aStamp.NanoSeconds / static_cast<double>(::tools::Time::nanoSecPerDay); bEmptyFlag = xRow->wasNull(); bValue = true; } diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 88169a5..ddb8acd 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -474,7 +474,7 @@ public: IdleCalcTextWidthScope(ScDocument& rDoc, ScAddress& rCalcPos) : mrDoc(rDoc), mrCalcPos(rCalcPos), - mnStartTime(Time::GetSystemTicks()), + mnStartTime(tools::Time::GetSystemTicks()), mpStylePool(rDoc.GetStyleSheetPool()), mnOldSearchMask(mpStylePool->GetSearchMask()), ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits