Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
7ee228a1
Kaydet (Commit)
7ee228a1
authored
Tem 31, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
svtools: replace boost::function with std::function
Change-Id: Ic60190814a19e03341de3678f35c4ac69624ca4c
üst
819fd244
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
filechangedchecker.hxx
include/svtools/filechangedchecker.hxx
+6
-3
filechangedchecker.cxx
svtools/source/misc/filechangedchecker.cxx
+6
-5
No files found.
include/svtools/filechangedchecker.hxx
Dosyayı görüntüle @
7ee228a1
...
@@ -11,11 +11,13 @@
...
@@ -11,11 +11,13 @@
#define INCLUDED_SVTOOLS_FILECHANGEDCHECKER_HXX
#define INCLUDED_SVTOOLS_FILECHANGEDCHECKER_HXX
#include <svtools/svtdllapi.h>
#include <svtools/svtdllapi.h>
#include <boost/function.hpp>
#include <osl/file.hxx>
#include <osl/file.hxx>
#include <vcl/timer.hxx>
#include <vcl/timer.hxx>
#include <vcl/idle.hxx>
#include <vcl/idle.hxx>
#include <functional>
/** Periodically checks if a file has been modified
/** Periodically checks if a file has been modified
Instances of this class setup a vcl timer to occasionally wake up
Instances of this class setup a vcl timer to occasionally wake up
...
@@ -27,7 +29,7 @@ private:
...
@@ -27,7 +29,7 @@ private:
Idle
mIdle
;
Idle
mIdle
;
OUString
mFileName
;
OUString
mFileName
;
TimeValue
mLastModTime
;
TimeValue
mLastModTime
;
::
boost
::
function0
<
void
>
mpCallback
;
::
std
::
function
<
void
()
>
mpCallback
;
bool
SVT_DLLPRIVATE
getCurrentModTime
(
TimeValue
&
o_rValue
)
const
;
bool
SVT_DLLPRIVATE
getCurrentModTime
(
TimeValue
&
o_rValue
)
const
;
DECL_LINK_TYPED
(
TimerHandler
,
Idle
*
,
void
);
DECL_LINK_TYPED
(
TimerHandler
,
Idle
*
,
void
);
...
@@ -35,7 +37,8 @@ private:
...
@@ -35,7 +37,8 @@ private:
public
:
public
:
void
resetTimer
();
void
resetTimer
();
bool
hasFileChanged
();
bool
hasFileChanged
();
FileChangedChecker
(
const
OUString
&
rFilename
,
const
::
boost
::
function0
<
void
>&
rCallback
);
FileChangedChecker
(
const
OUString
&
rFilename
,
const
::
std
::
function
<
void
()
>&
rCallback
);
};
};
#endif
#endif
svtools/source/misc/filechangedchecker.cxx
Dosyayı görüntüle @
7ee228a1
...
@@ -11,11 +11,12 @@
...
@@ -11,11 +11,12 @@
#include <svtools/filechangedchecker.hxx>
#include <svtools/filechangedchecker.hxx>
FileChangedChecker
::
FileChangedChecker
(
const
OUString
&
rFilename
,
const
::
boost
::
function0
<
void
>&
rCallback
)
:
FileChangedChecker
::
FileChangedChecker
(
const
OUString
&
rFilename
,
mIdle
(),
const
::
std
::
function
<
void
()
>&
rCallback
)
mFileName
(
rFilename
),
:
mIdle
()
mLastModTime
(),
,
mFileName
(
rFilename
)
mpCallback
(
rCallback
)
,
mLastModTime
()
,
mpCallback
(
rCallback
)
{
{
// Get the curren last file modified Status
// Get the curren last file modified Status
getCurrentModTime
(
mLastModTime
);
getCurrentModTime
(
mLastModTime
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment