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
06a09dd0
Kaydet (Commit)
06a09dd0
authored
Haz 04, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Join FactoryLoader threads
Change-Id: I22b313a895057edebc8bee715813de908826763a
üst
b2725b7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
17 deletions
+25
-17
ReportDefinition.cxx
reportdesign/source/core/api/ReportDefinition.cxx
+25
-17
No files found.
reportdesign/source/core/api/ReportDefinition.cxx
Dosyayı görüntüle @
06a09dd0
...
...
@@ -16,6 +16,11 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <sal/config.h>
#include <vector>
#include "ReportDefinition.hxx"
#include "FixedLine.hxx"
...
...
@@ -104,7 +109,7 @@
#include <dbaccess/dbaundomanager.hxx>
#include <editeng/paperinf.hxx>
#include <framework/titlehelper.hxx>
#include <
osl
/thread.hxx>
#include <
salhelper
/thread.hxx>
#include <svl/itempool.hxx>
#include <svl/undo.hxx>
#include <svx/svdlayer.hxx>
...
...
@@ -470,25 +475,24 @@ uno::Sequence< uno::Any > SAL_CALL OStyle::getPropertyDefaults( const uno::Seque
namespace
{
class
FactoryLoader
:
public
::
osl
::
Thread
class
FactoryLoader
:
public
salhelper
::
Thread
{
OUString
m_sMimeType
;
uno
::
Reference
<
uno
::
XComponentContext
>
m_xContext
;
public
:
FactoryLoader
(
const
OUString
&
_sMimeType
,
uno
::
Reference
<
uno
::
XComponentContext
>
const
&
_xContext
)
:
m_sMimeType
(
_sMimeType
)
:
Thread
(
"FactoryLoader"
)
,
m_sMimeType
(
_sMimeType
)
,
m_xContext
(
_xContext
)
{}
pr
otected
:
pr
ivate
:
virtual
~
FactoryLoader
(){}
/// Working method which should be overridden.
virtual
void
SAL_CALL
run
()
SAL_OVERRIDE
;
virtual
void
SAL_CALL
onTerminated
()
SAL_OVERRIDE
;
};
virtual
void
execute
()
SAL_OVERRIDE
;
};
void
SAL_CALL
FactoryLoader
::
run
()
void
SAL_CALL
FactoryLoader
::
execute
()
{
try
{
...
...
@@ -528,10 +532,6 @@ namespace
DBG_UNHANDLED_EXCEPTION
();
}
}
void
SAL_CALL
FactoryLoader
::
onTerminated
()
{
delete
this
;
}
}
struct
OReportDefinitionImpl
...
...
@@ -573,6 +573,7 @@ struct OReportDefinitionImpl
m_pObjectContainer
;
::
boost
::
shared_ptr
<
rptui
::
OReportModel
>
m_pReportModel
;
::
rtl
::
Reference
<
::
dbaui
::
UndoManager
>
m_pUndoManager
;
std
::
vector
<
rtl
::
Reference
<
salhelper
::
Thread
>
>
m_aFactoryLoaders
;
OUString
m_sCaption
;
OUString
m_sCommand
;
OUString
m_sFilter
;
...
...
@@ -725,10 +726,8 @@ void OReportDefinition::init()
const
OUString
*
pEnd
=
pIter
+
aMimeTypes
.
getLength
();
for
(
;
pIter
!=
pEnd
;
++
pIter
)
{
FactoryLoader
*
pCreatorThread
=
new
FactoryLoader
(
*
pIter
,
m_aProps
->
m_xContext
);
pCreatorThread
->
createSuspended
();
pCreatorThread
->
setPriority
(
osl_Thread_PriorityBelowNormal
);
pCreatorThread
->
resume
();
m_pImpl
->
m_aFactoryLoaders
.
push_back
(
new
FactoryLoader
(
*
pIter
,
m_aProps
->
m_xContext
));
}
}
...
...
@@ -782,6 +781,7 @@ void SAL_CALL OReportDefinition::disposing()
m_pImpl
->
m_aStorageChangeListeners
.
disposeAndClear
(
aDisposeEvent
);
// SYNCHRONIZED --->
{
SolarMutexGuard
aSolarGuard
;
::
osl
::
ResettableMutexGuard
aGuard
(
m_aMutex
);
...
...
@@ -818,7 +818,15 @@ void SAL_CALL OReportDefinition::disposing()
m_pImpl
->
m_aArgs
.
realloc
(
0
);
m_pImpl
->
m_xTitleHelper
.
clear
();
m_pImpl
->
m_xNumberedControllers
.
clear
();
}
// <--- SYNCHRONIZED
for
(
std
::
vector
<
rtl
::
Reference
<
salhelper
::
Thread
>
>::
iterator
i
(
m_pImpl
->
m_aFactoryLoaders
.
begin
());
i
!=
m_pImpl
->
m_aFactoryLoaders
.
end
();
++
i
)
{
(
*
i
)
->
join
();
}
}
...
...
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