Kaydet (Commit) 548517c1 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

merge vosremoval-timer.diff

üst d57d662a
...@@ -395,8 +395,7 @@ ...@@ -395,8 +395,7 @@
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <rtl/uuid.h> #include <rtl/uuid.h>
#include "unotools/configitem.hxx" #include <salhelper/timer.hxx>
#include "unotools/configmgr.hxx"
#include <sot/clsids.hxx> #include <sot/clsids.hxx>
...@@ -419,13 +418,13 @@ ...@@ -419,13 +418,13 @@
#include <unotools/numberformatcodewrapper.hxx> #include <unotools/numberformatcodewrapper.hxx>
#include <unotools/processfactory.hxx> #include <unotools/processfactory.hxx>
#include <vos/mutex.hxx> #include <vos/mutex.hxx>
#include <vos/process.hxx> #include <vos/process.hxx>
#include <vos/ref.hxx> #include <vos/ref.hxx>
#include <vos/refernce.hxx> #include <vos/refernce.hxx>
#include <vos/security.hxx> #include <vos/security.hxx>
#include <vos/thread.hxx> #include <vos/thread.hxx>
#include <vos/timer.hxx>
//---MARKER--- //---MARKER---
......
...@@ -395,8 +395,7 @@ ...@@ -395,8 +395,7 @@
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <rtl/uuid.h> #include <rtl/uuid.h>
#include "unotools/configitem.hxx" #include <salhelper/timer.hxx>
#include "unotools/configmgr.hxx"
#include <sot/clsids.hxx> #include <sot/clsids.hxx>
...@@ -428,7 +427,6 @@ ...@@ -428,7 +427,6 @@
#include <vos/process.hxx> #include <vos/process.hxx>
#include <vos/ref.hxx> #include <vos/ref.hxx>
#include <vos/refernce.hxx> #include <vos/refernce.hxx>
#include <vos/timer.hxx>
//---MARKER--- //---MARKER---
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
#include <tools/config.hxx> #include <tools/config.hxx>
#include <osl/mutex.hxx> #include <osl/mutex.hxx>
#include <osl/conditn.hxx> #include <osl/conditn.hxx>
#include <vos/timer.hxx> #include <salhelper/timer.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <vcl/sound.hxx> #include <vcl/sound.hxx>
#include <unotools/ucbhelper.hxx> #include <unotools/ucbhelper.hxx>
...@@ -90,7 +90,6 @@ using namespace ::com::sun::star::beans; ...@@ -90,7 +90,6 @@ using namespace ::com::sun::star::beans;
using namespace ::comphelper; using namespace ::comphelper;
using ::svt::SortingData_Impl; using ::svt::SortingData_Impl;
using ::svt::FolderDescriptor; using ::svt::FolderDescriptor;
using ::vos::TTimeValue;
using ::rtl::OUString; using ::rtl::OUString;
#define ALL_FILES_FILTER "*.*" #define ALL_FILES_FILTER "*.*"
...@@ -120,7 +119,7 @@ namespace ...@@ -120,7 +119,7 @@ namespace
//==================================================================== //====================================================================
//= CallbackTimer //= CallbackTimer
//==================================================================== //====================================================================
class CallbackTimer : public ::vos::OTimer class CallbackTimer : public ::salhelper::Timer
{ {
protected: protected:
ITimeoutHandler* m_pTimeoutHandler; ITimeoutHandler* m_pTimeoutHandler;
...@@ -534,7 +533,7 @@ protected: ...@@ -534,7 +533,7 @@ protected:
m_pContentEnumerator; m_pContentEnumerator;
Link m_aCurrentAsyncActionHandler; Link m_aCurrentAsyncActionHandler;
::osl::Condition m_aAsyncActionFinished; ::osl::Condition m_aAsyncActionFinished;
::rtl::Reference< ::vos::OTimer > m_pCancelAsyncTimer; ::rtl::Reference< ::salhelper::Timer > m_pCancelAsyncTimer;
::svt::EnumerationResult m_eAsyncActionResult; ::svt::EnumerationResult m_eAsyncActionResult;
bool m_bRunningAsyncAction; bool m_bRunningAsyncAction;
bool m_bAsyncActionCancelled; bool m_bAsyncActionCancelled;
...@@ -2019,7 +2018,7 @@ FileViewResult SvtFileView_Impl::GetFolderContent_Impl( ...@@ -2019,7 +2018,7 @@ FileViewResult SvtFileView_Impl::GetFolderContent_Impl(
"SvtFileView_Impl::GetFolderContent_Impl: invalid maximum timeout!" ); "SvtFileView_Impl::GetFolderContent_Impl: invalid maximum timeout!" );
if ( nMaxTimeout <= nMinTimeout ) if ( nMaxTimeout <= nMinTimeout )
nMaxTimeout = nMinTimeout + 5000; nMaxTimeout = nMinTimeout + 5000;
m_pCancelAsyncTimer->setRemainingTime( TTimeValue( nMaxTimeout - nMinTimeout ) ); m_pCancelAsyncTimer->setRemainingTime( salhelper::TTimeValue( nMaxTimeout - nMinTimeout ) );
// we already waited for nMinTimeout milliseconds, so take this into account // we already waited for nMinTimeout milliseconds, so take this into account
m_pCancelAsyncTimer->start(); m_pCancelAsyncTimer->start();
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove // MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svtools.hxx" #include "precompiled_svtools.hxx"
#include <vos/timer.hxx> #include <salhelper/timer.hxx>
#include <tools/debug.hxx> #include <tools/debug.hxx>
#include <vcl/outdev.hxx> #include <vcl/outdev.hxx>
#include <tools/poly.hxx> #include <tools/poly.hxx>
...@@ -410,7 +410,7 @@ class GraphicDisplayCacheEntry ...@@ -410,7 +410,7 @@ class GraphicDisplayCacheEntry
{ {
private: private:
::vos::TTimeValue maReleaseTime; ::salhelper::TTimeValue maReleaseTime;
const GraphicCacheEntry* mpRefCacheEntry; const GraphicCacheEntry* mpRefCacheEntry;
GDIMetaFile* mpMtf; GDIMetaFile* mpMtf;
BitmapEx* mpBmpEx; BitmapEx* mpBmpEx;
...@@ -463,8 +463,8 @@ public: ...@@ -463,8 +463,8 @@ public:
ULONG GetOutDevDrawMode() const { return mnOutDevDrawMode; } ULONG GetOutDevDrawMode() const { return mnOutDevDrawMode; }
USHORT GetOutDevBitCount() const { return mnOutDevBitCount; } USHORT GetOutDevBitCount() const { return mnOutDevBitCount; }
void SetReleaseTime( const ::vos::TTimeValue& rReleaseTime ) { maReleaseTime = rReleaseTime; } void SetReleaseTime( const ::salhelper::TTimeValue& rReleaseTime ) { maReleaseTime = rReleaseTime; }
const ::vos::TTimeValue& GetReleaseTime() const { return maReleaseTime; } const ::salhelper::TTimeValue& GetReleaseTime() const { return maReleaseTime; }
BOOL Matches( OutputDevice* pOut, const Point& /*rPtPixel*/, const Size& rSzPixel, BOOL Matches( OutputDevice* pOut, const Point& /*rPtPixel*/, const Size& rSzPixel,
const GraphicCacheEntry* pCacheEntry, const GraphicAttr& rAttr ) const const GraphicCacheEntry* pCacheEntry, const GraphicAttr& rAttr ) const
...@@ -802,12 +802,12 @@ void GraphicCache::SetCacheTimeout( ULONG nTimeoutSeconds ) ...@@ -802,12 +802,12 @@ void GraphicCache::SetCacheTimeout( ULONG nTimeoutSeconds )
if( mnReleaseTimeoutSeconds != nTimeoutSeconds ) if( mnReleaseTimeoutSeconds != nTimeoutSeconds )
{ {
GraphicDisplayCacheEntry* pDisplayEntry = (GraphicDisplayCacheEntry*) maDisplayCache.First(); GraphicDisplayCacheEntry* pDisplayEntry = (GraphicDisplayCacheEntry*) maDisplayCache.First();
::vos::TTimeValue aReleaseTime; ::salhelper::TTimeValue aReleaseTime;
if( ( mnReleaseTimeoutSeconds = nTimeoutSeconds ) != 0 ) if( ( mnReleaseTimeoutSeconds = nTimeoutSeconds ) != 0 )
{ {
osl_getSystemTime( &aReleaseTime ); osl_getSystemTime( &aReleaseTime );
aReleaseTime.addTime( ::vos::TTimeValue( nTimeoutSeconds, 0 ) ); aReleaseTime.addTime( ::salhelper::TTimeValue( nTimeoutSeconds, 0 ) );
} }
while( pDisplayEntry ) while( pDisplayEntry )
...@@ -898,10 +898,10 @@ BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, ...@@ -898,10 +898,10 @@ BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt,
if( GetCacheTimeout() ) if( GetCacheTimeout() )
{ {
::vos::TTimeValue aReleaseTime; ::salhelper::TTimeValue aReleaseTime;
osl_getSystemTime( &aReleaseTime ); osl_getSystemTime( &aReleaseTime );
aReleaseTime.addTime( ::vos::TTimeValue( GetCacheTimeout(), 0 ) ); aReleaseTime.addTime( ::salhelper::TTimeValue( GetCacheTimeout(), 0 ) );
pNewEntry->SetReleaseTime( aReleaseTime ); pNewEntry->SetReleaseTime( aReleaseTime );
} }
...@@ -932,10 +932,10 @@ BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, ...@@ -932,10 +932,10 @@ BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt,
if( GetCacheTimeout() ) if( GetCacheTimeout() )
{ {
::vos::TTimeValue aReleaseTime; ::salhelper::TTimeValue aReleaseTime;
osl_getSystemTime( &aReleaseTime ); osl_getSystemTime( &aReleaseTime );
aReleaseTime.addTime( ::vos::TTimeValue( GetCacheTimeout(), 0 ) ); aReleaseTime.addTime( ::salhelper::TTimeValue( GetCacheTimeout(), 0 ) );
pNewEntry->SetReleaseTime( aReleaseTime ); pNewEntry->SetReleaseTime( aReleaseTime );
} }
...@@ -962,7 +962,7 @@ BOOL GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, co ...@@ -962,7 +962,7 @@ BOOL GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, co
{ {
if( pDisplayCacheEntry->Matches( pOut, aPtPixel, aSzPixel, pCacheEntry, rAttr ) ) if( pDisplayCacheEntry->Matches( pOut, aPtPixel, aSzPixel, pCacheEntry, rAttr ) )
{ {
::vos::TTimeValue aReleaseTime; ::salhelper::TTimeValue aReleaseTime;
// put found object at last used position // put found object at last used position
maDisplayCache.Insert( maDisplayCache.Remove( pDisplayCacheEntry ), LIST_APPEND ); maDisplayCache.Insert( maDisplayCache.Remove( pDisplayCacheEntry ), LIST_APPEND );
...@@ -970,7 +970,7 @@ BOOL GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, co ...@@ -970,7 +970,7 @@ BOOL GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, co
if( GetCacheTimeout() ) if( GetCacheTimeout() )
{ {
osl_getSystemTime( &aReleaseTime ); osl_getSystemTime( &aReleaseTime );
aReleaseTime.addTime( ::vos::TTimeValue( GetCacheTimeout(), 0 ) ); aReleaseTime.addTime( ::salhelper::TTimeValue( GetCacheTimeout(), 0 ) );
} }
pDisplayCacheEntry->SetReleaseTime( aReleaseTime ); pDisplayCacheEntry->SetReleaseTime( aReleaseTime );
...@@ -1037,14 +1037,14 @@ IMPL_LINK( GraphicCache, ReleaseTimeoutHdl, Timer*, pTimer ) ...@@ -1037,14 +1037,14 @@ IMPL_LINK( GraphicCache, ReleaseTimeoutHdl, Timer*, pTimer )
{ {
pTimer->Stop(); pTimer->Stop();
::vos::TTimeValue aCurTime; ::salhelper::TTimeValue aCurTime;
GraphicDisplayCacheEntry* pDisplayEntry = (GraphicDisplayCacheEntry*) maDisplayCache.First(); GraphicDisplayCacheEntry* pDisplayEntry = (GraphicDisplayCacheEntry*) maDisplayCache.First();
osl_getSystemTime( &aCurTime ); osl_getSystemTime( &aCurTime );
while( pDisplayEntry ) while( pDisplayEntry )
{ {
const ::vos::TTimeValue& rReleaseTime = pDisplayEntry->GetReleaseTime(); const ::salhelper::TTimeValue& rReleaseTime = pDisplayEntry->GetReleaseTime();
if( !rReleaseTime.isEmpty() && ( rReleaseTime < aCurTime ) ) if( !rReleaseTime.isEmpty() && ( rReleaseTime < aCurTime ) )
{ {
......
...@@ -122,6 +122,7 @@ SHL1STDLIBS+= \ ...@@ -122,6 +122,7 @@ SHL1STDLIBS+= \
$(CPPULIB) \ $(CPPULIB) \
$(VOSLIB) \ $(VOSLIB) \
$(SALLIB) \ $(SALLIB) \
$(SALHELPERLIB) \
$(ICUUCLIB) \ $(ICUUCLIB) \
$(JVMFWKLIB) \ $(JVMFWKLIB) \
$(BASEGFXLIB) $(BASEGFXLIB)
......
...@@ -82,13 +82,14 @@ ...@@ -82,13 +82,14 @@
#include "rtl/ustring.h" #include "rtl/ustring.h"
#include "rtl/ustring.hxx" #include "rtl/ustring.hxx"
#include "salhelper/timer.hxx"
#include "sys/stat.h" #include "sys/stat.h"
#include "sys/types.h" #include "sys/types.h"
#include "vos/macros.hxx" #include "vos/macros.hxx"
#include "vos/mutex.hxx" #include "vos/mutex.hxx"
#include "vos/process.hxx" #include "vos/process.hxx"
#include "vos/timer.hxx"
//---MARKER--- //---MARKER---
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment