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
8b960f0e
Kaydet (Commit)
8b960f0e
authored
Şub 23, 2012
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Adapted LateInitThread to safer-to-use salhelper::Thread
üst
d3f4ee2b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
89 deletions
+36
-89
Library_filterconfig.mk
filter/Library_filterconfig.mk
+1
-0
build.lst
filter/prj/build.lst
+1
-1
lateinitlistener.cxx
filter/source/config/cache/lateinitlistener.cxx
+9
-6
lateinitthread.cxx
filter/source/config/cache/lateinitthread.cxx
+12
-37
lateinitthread.hxx
filter/source/config/cache/lateinitthread.hxx
+13
-45
No files found.
filter/Library_filterconfig.mk
Dosyayı görüntüle @
8b960f0e
...
@@ -39,6 +39,7 @@ $(eval $(call gb_Library_add_linked_libs,filterconfig,\
...
@@ -39,6 +39,7 @@ $(eval $(call gb_Library_add_linked_libs,filterconfig,\
cppuhelper \
cppuhelper \
cppu \
cppu \
sal \
sal \
salhelper \
$(gb_STDLIBS) \
$(gb_STDLIBS) \
))
))
...
...
filter/prj/build.lst
Dosyayı görüntüle @
8b960f0e
fl filter : TRANSLATIONS:translations svtools unotools xmloff cppu tools cppuhelper sal svx javaunohelper XPDF:xpdf jvmaccess canvas SAXON:saxon LIBXSLT:libxslt basegfx package PYTHON:python NULL
fl filter : TRANSLATIONS:translations svtools unotools xmloff cppu tools cppuhelper sal s
alhelper s
vx javaunohelper XPDF:xpdf jvmaccess canvas SAXON:saxon LIBXSLT:libxslt basegfx package PYTHON:python NULL
fl filter\prj nmake - all fl_prj NULL
fl filter\prj nmake - all fl_prj NULL
filter/source/config/cache/lateinitlistener.cxx
Dosyayı görüntüle @
8b960f0e
...
@@ -26,14 +26,14 @@
...
@@ -26,14 +26,14 @@
*
*
************************************************************************/
************************************************************************/
#include "sal/config.h"
#include "rtl/ref.hxx"
#include "rtl/ustring.hxx"
#include "lateinitlistener.hxx"
#include "lateinitlistener.hxx"
#include "lateinitthread.hxx"
#include "lateinitthread.hxx"
//_______________________________________________
// includes
#include <rtl/ustring.hxx>
//_______________________________________________
//_______________________________________________
// namespace
// namespace
...
@@ -110,8 +110,11 @@ void SAL_CALL LateInitListener::notifyEvent(const css::document::EventObject& aE
...
@@ -110,8 +110,11 @@ void SAL_CALL LateInitListener::notifyEvent(const css::document::EventObject& aE
if
(
!
aEvent
.
EventName
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"OnCloseApp"
)))
if
(
!
aEvent
.
EventName
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"OnCloseApp"
)))
{
{
LateInitThread
*
pThread
=
new
LateInitThread
();
rtl
::
Reference
<
LateInitThread
>
(
new
LateInitThread
())
->
launch
();
pThread
->
create
();
//TODO: a protocol is missing how to join with the launched
// thread before exit(3), to ensure the thread is no longer
// relying on any infrastructure while that infrastructure is
// being shut down in atexit handlers
}
}
}
}
}
}
...
...
filter/source/config/cache/lateinitthread.cxx
Dosyayı görüntüle @
8b960f0e
...
@@ -26,40 +26,21 @@
...
@@ -26,40 +26,21 @@
*
*
************************************************************************/
************************************************************************/
#include "sal/config.h"
#include "lateinitthread.hxx"
#include "salhelper/singletonref.hxx"
//_______________________________________________
// includes
//_______________________________________________
// namespace
namespace
filter
{
namespace
config
{
namespace
css
=
::
com
::
sun
::
star
;
//_______________________________________________
// definitions
LateInitThread
::
LateInitThread
()
{
}
#include "filtercache.hxx"
#include "lateinitthread.hxx"
namespace
filter
{
namespace
config
{
LateInitThread
::~
LateInitThread
()
LateInitThread
::
LateInitThread
()
:
Thread
(
"lateinitthread"
)
{}
{
}
LateInitThread
::~
LateInitThread
()
{}
void
LateInitThread
::
execute
()
{
void
SAL_CALL
LateInitThread
::
run
()
// true => It indicates using of this method by this thread
{
// sal_True => It indicates using of this method by this thread
// The filter cache use this information to show an assertion
// The filter cache use this information to show an assertion
// for "optimization failure" in case the first calli of loadAll()
// for "optimization failure" in case the first calli of loadAll()
// was not this thread ...
// was not this thread ...
...
@@ -68,16 +49,10 @@ void SAL_CALL LateInitThread::run()
...
@@ -68,16 +49,10 @@ void SAL_CALL LateInitThread::run()
// May be they show the problem of a corrupted filter
// May be they show the problem of a corrupted filter
// configuration, which is handled inside our event loop or desktop.main()!
// configuration, which is handled inside our event loop or desktop.main()!
::
salhelper
::
SingletonRef
<
FilterCache
>
rCache
;
salhelper
::
SingletonRef
<
FilterCache
>
()
->
load
(
rCache
->
load
(
FilterCache
::
E_CONTAINS_ALL
,
sal_True
);
FilterCache
::
E_CONTAINS_ALL
,
true
);
}
void
SAL_CALL
LateInitThread
::
onTerminated
()
{
delete
this
;
}
}
}
// namespace config
}
}
}
// namespace filter
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
filter/source/config/cache/lateinitthread.hxx
Dosyayı görüntüle @
8b960f0e
...
@@ -26,26 +26,14 @@
...
@@ -26,26 +26,14 @@
*
*
************************************************************************/
************************************************************************/
#ifndef
__FILTER_CONFIG_LATEINITTHREAD_HXX_
#ifndef
INCLUDED_FILTER_SOURCE_CONFIG_CACHE_LATEINITTHREAD_HXX
#define
__FILTER_CONFIG_LATEINITTHREAD_HXX_
#define
INCLUDED_FILTER_SOURCE_CONFIG_CACHE_LATEINITTHREAD_HXX
//_______________________________________________
#include "sal/config.h"
// includes
#include "filtercache.hxx"
#include "salhelper/thread.hxx"
#include <salhelper/singletonref.hxx>
#include <osl/thread.hxx>
//_______________________________________________
namespace
filter
{
namespace
config
{
// namespace
namespace
filter
{
namespace
config
{
//_______________________________________________
// definitions
//_______________________________________________
/** @short implements a thread, which will update the
/** @short implements a thread, which will update the
global filter cache of an office, after its
global filter cache of an office, after its
...
@@ -57,38 +45,18 @@ namespace filter{
...
@@ -57,38 +45,18 @@ namespace filter{
@attention The filter cache will be blocked during this thrad runs!
@attention The filter cache will be blocked during this thrad runs!
*/
*/
class
LateInitThread
:
public
::
osl
::
Thread
class
LateInitThread
:
public
salhelper
::
Thread
{
{
public
:
//-------------------------------------------
LateInitThread
();
// native interface
public
:
//---------------------------------------
// ctor/dtor
/** @short initialize new instance of this class.
*/
LateInitThread
();
//---------------------------------------
/** @short standard dtor.
*/
virtual
~
LateInitThread
();
//---------------------------------------
/** @short thread function.
private
:
*/
virtual
~
LateInitThread
();
virtual
void
SAL_CALL
run
();
virtual
void
SAL_CALL
onTerminated
();
virtual
void
execute
();
};
};
}
// namespace config
}
}
}
// namespace filter
#endif
// __FILTER_CONFIG_LATEINITTHREAD_HXX_
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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