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
dde79dd5
Kaydet (Commit)
dde79dd5
authored
Mar 29, 2016
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Rename OfficeIPCThread to RequestHandler
Change-Id: I2076d903e83a0b8eb3aa0ce2413630e2c5415b15
üst
a91272a6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
49 deletions
+49
-49
deletedspecial.cxx
compilerplugins/clang/store/deletedspecial.cxx
+2
-2
app.cxx
desktop/source/app/app.cxx
+23
-23
dispatchwatcher.cxx
desktop/source/app/dispatchwatcher.cxx
+5
-5
officeipcthread.cxx
desktop/source/app/officeipcthread.cxx
+0
-0
officeipcthread.hxx
desktop/source/app/officeipcthread.hxx
+9
-9
init.cxx
desktop/source/lib/init.cxx
+8
-8
desktop.cxx
framework/source/services/desktop.cxx
+2
-2
No files found.
compilerplugins/clang/store/deletedspecial.cxx
Dosyayı görüntüle @
dde79dd5
...
...
@@ -112,8 +112,8 @@ bool DeletedSpecial::VisitCXXMethodDecl(CXXMethodDecl const * decl) {
||
whitelist
(
decl
,
"SwLineInfo"
,
"sw/source/core/text/inftxt.hxx"
)
||
whitelist
(
decl
,
"XRenderPeer"
,
"vcl/unx/generic/gdi/xrender_peer.hxx"
)
||
whitelist
(
decl
,
"desktop::DispatchWatcher"
,
"desktop/source/app/dispatchwatcher.hxx"
)
||
whitelist
(
decl
,
"desktop::
OfficeIPCThread
"
,
"desktop/source/app/officeipcthread.hxx"
)
||
whitelist
(
decl
,
"desktop::
OfficeIPCThread
"
,
"desktop/source/lib/../app/officeipcthread.hxx"
)
||
whitelist
(
decl
,
"desktop::
RequestHandler
"
,
"desktop/source/app/officeipcthread.hxx"
)
||
whitelist
(
decl
,
"desktop::
RequestHandler
"
,
"desktop/source/lib/../app/officeipcthread.hxx"
)
||
whitelist
(
decl
,
"sd::DiscoveryService"
,
"sd/source/ui/remotecontrol/DiscoveryService.hxx"
)
||
whitelist
(
decl
,
"sd::IconCache"
,
"sd/source/ui/inc/tools/IconCache.hxx"
)
||
whitelist
(
decl
,
"sd::RemoteServer"
,
"sd/source/ui/inc/RemoteServer.hxx"
)
...
...
desktop/source/app/app.cxx
Dosyayı görüntüle @
dde79dd5
...
...
@@ -199,7 +199,7 @@ namespace {
// removed cache data is recreated.
//
// Multiple instances of soffice.bin can execute this code in parallel for a
// single UserInstallation, as it is called before
OfficeIPCThread
is set up.
// single UserInstallation, as it is called before
RequestHandler
is set up.
// Therefore, any errors here only lead to SAL_WARNs.
//
// At least in theory, this function could be removed again once no
...
...
@@ -576,8 +576,8 @@ void Desktop::Init()
const
CommandLineArgs
&
rCmdLineArgs
=
GetCommandLineArgs
();
// start ipc thread only for non-remote offices
OfficeIPCThread
::
Status
aStatus
=
OfficeIPCThread
::
EnableOfficeIPCThread
();
if
(
aStatus
==
OfficeIPCThread
::
IPC_STATUS_PIPE_ERROR
)
RequestHandler
::
Status
aStatus
=
RequestHandler
::
Enable
();
if
(
aStatus
==
RequestHandler
::
IPC_STATUS_PIPE_ERROR
)
{
#if HAVE_FEATURE_MACOSX_SANDBOX
// In a sandboxed LO, on 10.8.2 at least, creating the
...
...
@@ -599,11 +599,11 @@ void Desktop::Init()
SetBootstrapError
(
BE_PATHINFO_MISSING
,
OUString
()
);
#endif
}
else
if
(
aStatus
==
OfficeIPCThread
::
IPC_STATUS_BOOTSTRAP_ERROR
)
else
if
(
aStatus
==
RequestHandler
::
IPC_STATUS_BOOTSTRAP_ERROR
)
{
SetBootstrapError
(
BE_PATHINFO_MISSING
,
OUString
()
);
}
else
if
(
aStatus
==
OfficeIPCThread
::
IPC_STATUS_2ND_OFFICE
)
else
if
(
aStatus
==
RequestHandler
::
IPC_STATUS_2ND_OFFICE
)
{
// 2nd office startup should terminate after sending cmdlineargs through pipe
SetBootstrapStatus
(
BS_TERMINATE
);
...
...
@@ -612,7 +612,7 @@ void Desktop::Init()
||
rCmdLineArgs
.
IsHelp
()
||
rCmdLineArgs
.
IsVersion
()
)
{
// disable IPC thread in an instance that is just showing a help message
OfficeIPCThread
::
DisableOfficeIPCThread
();
RequestHandler
::
Disable
();
}
pSignalHandler
=
osl_addSignalHandler
(
SalMainPipeExchangeSignal_impl
,
nullptr
);
}
...
...
@@ -641,7 +641,7 @@ void Desktop::DeInit()
// clear lockfile
m_xLockfile
.
reset
();
OfficeIPCThread
::
DisableOfficeIPCThread
();
RequestHandler
::
Disable
();
if
(
pSignalHandler
)
osl_removeSignalHandler
(
pSignalHandler
);
}
catch
(
const
RuntimeException
&
)
{
...
...
@@ -677,9 +677,9 @@ bool Desktop::QueryExit()
FlushConfiguration
();
try
{
// it is no problem to call
DisableOfficeIPCThread
() more than once
// it is no problem to call
RequestHandler::Disable
() more than once
// it also looks to be threadsafe
OfficeIPCThread
::
DisableOfficeIPCThread
();
RequestHandler
::
Disable
();
}
catch
(
const
RuntimeException
&
)
{
...
...
@@ -1154,7 +1154,7 @@ namespace {
void
restartOnMac
(
bool
passArguments
)
{
#if defined MACOSX
OfficeIPCThread
::
DisableOfficeIPCThread
();
RequestHandler
::
Disable
();
#if HAVE_FEATURE_MACOSX_SANDBOX
(
void
)
passArguments
;
// avoid warnings
ResMgr
*
resMgr
=
Desktop
::
GetDesktopResManager
();
...
...
@@ -1279,7 +1279,7 @@ void Desktop::Exception(sal_uInt16 nError)
if
(
bRestart
)
{
OfficeIPCThread
::
DisableOfficeIPCThread
();
RequestHandler
::
Disable
();
if
(
pSignalHandler
)
osl_removeSignalHandler
(
pSignalHandler
);
...
...
@@ -1613,7 +1613,7 @@ int Desktop::Main()
try
{
if
(
xDesktop
.
is
()
)
xDesktop
->
addTerminateListener
(
new
OfficeIPCThread
Controller
);
xDesktop
->
addTerminateListener
(
new
RequestHandler
Controller
);
SetSplashScreenProgress
(
100
);
}
catch
(
const
css
::
uno
::
Exception
&
e
)
...
...
@@ -1659,27 +1659,27 @@ int Desktop::Main()
}
catch
(
const
css
::
document
::
CorruptedFilterConfigurationException
&
exFilterCfg
)
{
OfficeIPCThread
::
SetDowning
();
RequestHandler
::
SetDowning
();
FatalError
(
MakeStartupErrorMessage
(
exFilterCfg
.
Message
)
);
}
catch
(
const
css
::
configuration
::
CorruptedConfigurationException
&
exAnyCfg
)
{
OfficeIPCThread
::
SetDowning
();
RequestHandler
::
SetDowning
();
FatalError
(
MakeStartupErrorMessage
(
exAnyCfg
.
Message
)
);
}
catch
(
const
css
::
uno
::
Exception
&
exUNO
)
{
OfficeIPCThread
::
SetDowning
();
RequestHandler
::
SetDowning
();
FatalError
(
exUNO
.
Message
);
}
catch
(
const
std
::
exception
&
exSTD
)
{
OfficeIPCThread
::
SetDowning
();
RequestHandler
::
SetDowning
();
FatalError
(
OUString
::
createFromAscii
(
exSTD
.
what
()));
}
catch
(
...)
{
OfficeIPCThread
::
SetDowning
();
RequestHandler
::
SetDowning
();
FatalError
(
"Caught Unknown Exception: Aborting!"
);
}
}
...
...
@@ -1943,7 +1943,7 @@ IMPL_LINK_NOARG_TYPED(Desktop, OpenClients_Impl, void*, void)
try
{
OpenClients
();
OfficeIPCThread
::
SetReady
();
RequestHandler
::
SetReady
();
CloseSplashScreen
();
CheckFirstRun
(
);
...
...
@@ -2351,7 +2351,7 @@ void Desktop::OpenClients()
CrashReporter
::
writeCommonInfo
();
#endif
OfficeIPCThread
::
EnableRequests
();
RequestHandler
::
EnableRequests
();
ProcessDocumentsRequest
aRequest
(
rArgs
.
getCwdUrl
());
aRequest
.
aOpenList
=
rArgs
.
GetOpenList
();
...
...
@@ -2407,7 +2407,7 @@ void Desktop::OpenClients()
}
// Process request
if
(
OfficeIPCThread
::
ExecuteCmdLineRequests
(
aRequest
,
false
)
)
if
(
RequestHandler
::
ExecuteCmdLineRequests
(
aRequest
,
false
)
)
{
// Don't do anything if we have successfully called terminate at desktop:
return
;
...
...
@@ -2481,7 +2481,7 @@ void Desktop::OpenDefault()
ProcessDocumentsRequest
aRequest
(
rArgs
.
getCwdUrl
());
aRequest
.
aOpenList
.
push_back
(
aName
);
OfficeIPCThread
::
ExecuteCmdLineRequests
(
aRequest
,
false
);
RequestHandler
::
ExecuteCmdLineRequests
(
aRequest
,
false
);
}
...
...
@@ -2604,7 +2604,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
std
::
vector
<
OUString
>
const
&
data
(
rAppEvent
.
GetStringsData
());
docsRequest
.
aOpenList
.
insert
(
docsRequest
.
aOpenList
.
end
(),
data
.
begin
(),
data
.
end
());
OfficeIPCThread
::
ExecuteCmdLineRequests
(
docsRequest
,
false
);
RequestHandler
::
ExecuteCmdLineRequests
(
docsRequest
,
false
);
}
}
break
;
...
...
@@ -2621,7 +2621,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
std
::
vector
<
OUString
>
const
&
data
(
rAppEvent
.
GetStringsData
());
docsRequest
.
aPrintList
.
insert
(
docsRequest
.
aPrintList
.
end
(),
data
.
begin
(),
data
.
end
());
OfficeIPCThread
::
ExecuteCmdLineRequests
(
docsRequest
,
false
);
RequestHandler
::
ExecuteCmdLineRequests
(
docsRequest
,
false
);
}
}
break
;
...
...
desktop/source/app/dispatchwatcher.cxx
Dosyayı görüntüle @
dde79dd5
...
...
@@ -201,7 +201,7 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest
{
bSetInputFilter
=
true
;
aForcedInputFilter
=
aDispatchRequest
.
aURL
;
OfficeIPCThread
::
RequestsCompleted
();
RequestHandler
::
RequestsCompleted
();
continue
;
}
...
...
@@ -438,7 +438,7 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest
aDispatchRequest
.
aRequestType
==
REQUEST_FORCENEW
)
{
// request is completed
OfficeIPCThread
::
RequestsCompleted
();
RequestHandler
::
RequestsCompleted
();
}
else
if
(
aDispatchRequest
.
aRequestType
==
REQUEST_PRINT
||
aDispatchRequest
.
aRequestType
==
REQUEST_PRINTTO
||
...
...
@@ -662,7 +662,7 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest
}
// request is completed
OfficeIPCThread
::
RequestsCompleted
();
RequestHandler
::
RequestsCompleted
();
}
}
}
...
...
@@ -727,8 +727,8 @@ void SAL_CALL DispatchWatcher::dispatchFinished( const DispatchResultEvent& ) th
osl
::
ClearableMutexGuard
aGuard
(
m_mutex
);
sal_Int16
nCount
=
--
m_nRequestCount
;
aGuard
.
clear
();
OfficeIPCThread
::
RequestsCompleted
();
if
(
!
nCount
&&
!
OfficeIPCThread
::
AreRequestsPending
()
)
RequestHandler
::
RequestsCompleted
();
if
(
!
nCount
&&
!
RequestHandler
::
AreRequestsPending
()
)
{
// We have to check if we have an open task otherwise we have to shutdown the office.
Reference
<
XDesktop2
>
xDesktop
=
css
::
frame
::
Desktop
::
create
(
::
comphelper
::
getProcessComponentContext
()
);
...
...
desktop/source/app/officeipcthread.cxx
Dosyayı görüntüle @
dde79dd5
This diff is collapsed.
Click to expand it.
desktop/source/app/officeipcthread.hxx
Dosyayı görüntüle @
dde79dd5
...
...
@@ -69,12 +69,12 @@ struct ProcessDocumentsRequest
class
DispatchWatcher
;
class
PipeReaderThread
;
class
OfficeIPCThread
:
public
salhelper
::
SimpleReferenceObject
class
RequestHandler
:
public
salhelper
::
SimpleReferenceObject
{
friend
PipeReaderThread
;
private
:
static
rtl
::
Reference
<
OfficeIPCThread
>
pGlobalOfficeIPCThread
;
static
rtl
::
Reference
<
RequestHandler
>
pGlobal
;
enum
class
State
{
Starting
,
RequestsEnabled
,
Downing
};
...
...
@@ -93,9 +93,9 @@ class OfficeIPCThread: public salhelper::SimpleReferenceObject
static
::
osl
::
Mutex
&
GetMutex
();
OfficeIPCThread
();
RequestHandler
();
virtual
~
OfficeIPCThread
();
virtual
~
RequestHandler
();
public
:
enum
Status
...
...
@@ -115,8 +115,8 @@ class OfficeIPCThread: public salhelper::SimpleReferenceObject
ProcessDocumentsRequest
&
,
bool
noTerminate
);
// return sal_False if second office
static
Status
Enable
OfficeIPCThread
();
static
void
Disable
OfficeIPCThread
(
bool
join
=
true
);
static
Status
Enable
();
static
void
Disable
(
bool
join
=
true
);
// start dispatching events...
static
void
SetReady
();
static
void
WaitForReady
();
...
...
@@ -126,13 +126,13 @@ class OfficeIPCThread: public salhelper::SimpleReferenceObject
};
class
OfficeIPCThread
Controller
:
public
::
cppu
::
WeakImplHelper
<
class
RequestHandler
Controller
:
public
::
cppu
::
WeakImplHelper
<
css
::
lang
::
XServiceInfo
,
css
::
frame
::
XTerminateListener
>
{
public
:
OfficeIPCThread
Controller
()
{}
virtual
~
OfficeIPCThread
Controller
()
{}
RequestHandler
Controller
()
{}
virtual
~
RequestHandler
Controller
()
{}
// XServiceInfo
virtual
OUString
SAL_CALL
getImplementationName
()
...
...
desktop/source/lib/init.cxx
Dosyayı görüntüle @
dde79dd5
...
...
@@ -1921,7 +1921,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
}
// This is horrible crack. I really would want to go back to simply just call
// InitVCL() here. The
OfficeIPCThread
thing is just horrible.
// InitVCL() here. The
RequestHandler
thing is just horrible.
// We could use InitVCL() here -- and used to before using soffice_main,
// however that now deals with the initialisation for us (and it's not
...
...
@@ -1934,25 +1934,25 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
// functions depend on VCL being ready -- the deadlocks would happen
// if you try to use loadDocument too early.
// The
OfficeIPCThread
is specifically set to be ready when all the other
// The
RequestHandler
is specifically set to be ready when all the other
// init in Desktop::Main (run from soffice_main) is done. We can "enable"
// the Thread from wherever (it's done again in Desktop::Main), and can
// then use it to wait until we're definitely ready to continue.
if
(
eStage
!=
PRE_INIT
)
{
SAL_INFO
(
"lok"
,
"Enabling
OfficeIPCThread
"
);
OfficeIPCThread
::
EnableOfficeIPCThread
();
SAL_INFO
(
"lok"
,
"Enabling
RequestHandler
"
);
RequestHandler
::
Enable
();
SAL_INFO
(
"lok"
,
"Starting soffice_main"
);
pLib
->
maThread
=
osl_createThread
(
lo_startmain
,
nullptr
);
SAL_INFO
(
"lok"
,
"Waiting for
OfficeIPCThread
"
);
OfficeIPCThread
::
WaitForReady
();
SAL_INFO
(
"lok"
,
"
OfficeIPCThread
ready -- continuing"
);
SAL_INFO
(
"lok"
,
"Waiting for
RequestHandler
"
);
RequestHandler
::
WaitForReady
();
SAL_INFO
(
"lok"
,
"
RequestHandler
ready -- continuing"
);
// If the Thread has been disabled again that indicates that a
// restart is required (or in any case we don't have a useable
// process around).
if
(
!
OfficeIPCThread
::
IsEnabled
())
if
(
!
RequestHandler
::
IsEnabled
())
{
fprintf
(
stderr
,
"LOK init failed -- restart required
\n
"
);
return
false
;
...
...
framework/source/services/desktop.cxx
Dosyayı görüntüle @
dde79dd5
...
...
@@ -385,7 +385,7 @@ void SAL_CALL Desktop::addTerminateListener( const css::uno::Reference< css::fra
m_xSfxTerminator
=
xListener
;
return
;
}
if
(
sImplementationName
==
"com.sun.star.comp.
OfficeIPCThread
Controller"
)
if
(
sImplementationName
==
"com.sun.star.comp.
RequestHandler
Controller"
)
{
m_xPipeTerminator
=
xListener
;
return
;
...
...
@@ -424,7 +424,7 @@ void SAL_CALL Desktop::removeTerminateListener( const css::uno::Reference< css::
return
;
}
if
(
sImplementationName
==
"com.sun.star.comp.
OfficeIPCThread
Controller"
)
if
(
sImplementationName
==
"com.sun.star.comp.
RequestHandler
Controller"
)
{
m_xPipeTerminator
.
clear
();
return
;
...
...
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