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
fdbc6b76
Kaydet (Commit)
fdbc6b76
authored
Nis 26, 2012
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Do not accidentally instantiate other exts when removing exts at startup
üst
e613da16
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
11 deletions
+19
-11
dp_extensionmanager.cxx
desktop/source/deployment/manager/dp_extensionmanager.cxx
+5
-5
dp_manager.cxx
desktop/source/deployment/manager/dp_manager.cxx
+1
-1
dp_backend.cxx
desktop/source/deployment/registry/dp_backend.cxx
+2
-1
dp_backend.h
desktop/source/deployment/registry/inc/dp_backend.h
+1
-0
dp_package.cxx
desktop/source/deployment/registry/package/dp_package.cxx
+3
-2
dp_script.cxx
desktop/source/deployment/registry/script/dp_script.cxx
+2
-2
XPackage.idl
offapi/com/sun/star/deployment/XPackage.idl
+5
-0
No files found.
desktop/source/deployment/manager/dp_extensionmanager.cxx
Dosyayı görüntüle @
fdbc6b76
...
@@ -464,7 +464,7 @@ void ExtensionManager::activateExtension(
...
@@ -464,7 +464,7 @@ void ExtensionManager::activateExtension(
//Check if this is a disabled user extension,
//Check if this is a disabled user extension,
if
(
i
==
0
&&
bUserDisabled
)
if
(
i
==
0
&&
bUserDisabled
)
{
{
aExt
->
revokePackage
(
xAbortChannel
,
xCmdEnv
);
aExt
->
revokePackage
(
bStartup
,
xAbortChannel
,
xCmdEnv
);
continue
;
continue
;
}
}
...
@@ -473,7 +473,7 @@ void ExtensionManager::activateExtension(
...
@@ -473,7 +473,7 @@ void ExtensionManager::activateExtension(
//repositories with a lower priority
//repositories with a lower priority
if
(
bActive
)
if
(
bActive
)
{
{
aExt
->
revokePackage
(
xAbortChannel
,
xCmdEnv
);
aExt
->
revokePackage
(
bStartup
,
xAbortChannel
,
xCmdEnv
);
}
}
else
else
{
{
...
@@ -694,7 +694,7 @@ Reference<deploy::XPackage> ExtensionManager::addExtension(
...
@@ -694,7 +694,7 @@ Reference<deploy::XPackage> ExtensionManager::addExtension(
try
try
{
{
xOldExtension
->
revokePackage
(
xOldExtension
->
revokePackage
(
xAbortChannel
,
Reference
<
ucb
::
XCommandEnvironment
>
());
false
,
xAbortChannel
,
Reference
<
ucb
::
XCommandEnvironment
>
());
//save the old user extension in case the user aborts
//save the old user extension in case the user aborts
//store the extension in the tmp repository, this will overwrite
//store the extension in the tmp repository, this will overwrite
//xTmpPackage (same identifier). Do not let the user abort or
//xTmpPackage (same identifier). Do not let the user abort or
...
@@ -873,7 +873,7 @@ void ExtensionManager::removeExtension(
...
@@ -873,7 +873,7 @@ void ExtensionManager::removeExtension(
Reference
<
deploy
::
XPackage
>
xOldExtension
=
Reference
<
deploy
::
XPackage
>
xOldExtension
=
xPackageManager
->
getDeployedPackage
(
xPackageManager
->
getDeployedPackage
(
identifier
,
fileName
,
xCmdEnv
);
identifier
,
fileName
,
xCmdEnv
);
xOldExtension
->
revokePackage
(
xAbortChannel
,
xCmdEnv
);
xOldExtension
->
revokePackage
(
false
,
xAbortChannel
,
xCmdEnv
);
xPackageManager
->
removePackage
(
xPackageManager
->
removePackage
(
identifier
,
fileName
,
xAbortChannel
,
xCmdEnv
);
identifier
,
fileName
,
xAbortChannel
,
xCmdEnv
);
...
@@ -1024,7 +1024,7 @@ sal_Int32 ExtensionManager::checkPrerequisitesAndEnable(
...
@@ -1024,7 +1024,7 @@ sal_Int32 ExtensionManager::checkPrerequisitesAndEnable(
if
(
ret
)
if
(
ret
)
{
{
//There are some unfulfilled prerequisites, try to revoke
//There are some unfulfilled prerequisites, try to revoke
extension
->
revokePackage
(
xAbortChannel
,
xCmdEnv
);
extension
->
revokePackage
(
false
,
xAbortChannel
,
xCmdEnv
);
}
}
const
OUString
id
(
dp_misc
::
getIdentifier
(
extension
));
const
OUString
id
(
dp_misc
::
getIdentifier
(
extension
));
activateExtension
(
id
,
extension
->
getName
(),
activateExtension
(
id
,
extension
->
getName
(),
...
...
desktop/source/deployment/manager/dp_manager.cxx
Dosyayı görüntüle @
fdbc6b76
...
@@ -1322,7 +1322,7 @@ bool PackageManagerImpl::synchronizeRemovedExtensions(
...
@@ -1322,7 +1322,7 @@ bool PackageManagerImpl::synchronizeRemovedExtensions(
Reference
<
deployment
::
XPackage
>
xPackage
=
m_xRegistry
->
bindPackage
(
Reference
<
deployment
::
XPackage
>
xPackage
=
m_xRegistry
->
bindPackage
(
url
,
i
->
second
.
mediaType
,
true
,
i
->
first
,
xCmdEnv
);
url
,
i
->
second
.
mediaType
,
true
,
i
->
first
,
xCmdEnv
);
OSL_ASSERT
(
xPackage
.
is
());
//Even if the files are removed, we must get the object.
OSL_ASSERT
(
xPackage
.
is
());
//Even if the files are removed, we must get the object.
xPackage
->
revokePackage
(
xAbortChannel
,
xCmdEnv
);
xPackage
->
revokePackage
(
true
,
xAbortChannel
,
xCmdEnv
);
removePackage
(
xPackage
->
getIdentifier
().
Value
,
xPackage
->
getName
(),
removePackage
(
xPackage
->
getIdentifier
().
Value
,
xPackage
->
getName
(),
xAbortChannel
,
xCmdEnv
);
xAbortChannel
,
xCmdEnv
);
bModified
|=
true
;
bModified
|=
true
;
...
...
desktop/source/deployment/registry/dp_backend.cxx
Dosyayı görüntüle @
fdbc6b76
...
@@ -726,13 +726,14 @@ void Package::registerPackage(
...
@@ -726,13 +726,14 @@ void Package::registerPackage(
//______________________________________________________________________________
//______________________________________________________________________________
void
Package
::
revokePackage
(
void
Package
::
revokePackage
(
sal_Bool
startup
,
Reference
<
task
::
XAbortChannel
>
const
&
xAbortChannel
,
Reference
<
task
::
XAbortChannel
>
const
&
xAbortChannel
,
Reference
<
XCommandEnvironment
>
const
&
xCmdEnv
)
Reference
<
XCommandEnvironment
>
const
&
xCmdEnv
)
throw
(
deployment
::
DeploymentException
,
throw
(
deployment
::
DeploymentException
,
CommandFailedException
,
CommandAbortedException
,
CommandFailedException
,
CommandAbortedException
,
lang
::
IllegalArgumentException
,
RuntimeException
)
lang
::
IllegalArgumentException
,
RuntimeException
)
{
{
processPackage_impl
(
false
/* revoke */
,
false
,
xAbortChannel
,
xCmdEnv
);
processPackage_impl
(
false
/* revoke */
,
startup
,
xAbortChannel
,
xCmdEnv
);
}
}
...
...
desktop/source/deployment/registry/inc/dp_backend.h
Dosyayı görüntüle @
fdbc6b76
...
@@ -204,6 +204,7 @@ public:
...
@@ -204,6 +204,7 @@ public:
css
::
ucb
::
CommandAbortedException
,
css
::
ucb
::
CommandAbortedException
,
css
::
lang
::
IllegalArgumentException
,
css
::
uno
::
RuntimeException
);
css
::
lang
::
IllegalArgumentException
,
css
::
uno
::
RuntimeException
);
virtual
void
SAL_CALL
revokePackage
(
virtual
void
SAL_CALL
revokePackage
(
sal_Bool
startup
,
css
::
uno
::
Reference
<
css
::
task
::
XAbortChannel
>
const
&
xAbortChannel
,
css
::
uno
::
Reference
<
css
::
task
::
XAbortChannel
>
const
&
xAbortChannel
,
css
::
uno
::
Reference
<
css
::
ucb
::
XCommandEnvironment
>
const
&
xCmdEnv
)
css
::
uno
::
Reference
<
css
::
ucb
::
XCommandEnvironment
>
const
&
xCmdEnv
)
throw
(
css
::
deployment
::
DeploymentException
,
throw
(
css
::
deployment
::
DeploymentException
,
...
...
desktop/source/deployment/registry/package/dp_package.cxx
Dosyayı görüntüle @
fdbc6b76
...
@@ -909,7 +909,7 @@ void BackendImpl::PackageImpl::processPackage_(
...
@@ -909,7 +909,7 @@ void BackendImpl::PackageImpl::processPackage_(
{
{
try
{
try
{
bundle
[
pos
]
->
revokePackage
(
bundle
[
pos
]
->
revokePackage
(
xSubAbortChannel
,
xCmdEnv
);
startup
,
xSubAbortChannel
,
xCmdEnv
);
}
}
catch
(
const
Exception
&
)
catch
(
const
Exception
&
)
{
{
...
@@ -950,7 +950,8 @@ void BackendImpl::PackageImpl::processPackage_(
...
@@ -950,7 +950,8 @@ void BackendImpl::PackageImpl::processPackage_(
xPackage
->
createAbortChannel
()
);
xPackage
->
createAbortChannel
()
);
AbortChannel
::
Chain
chain
(
abortChannel
,
xSubAbortChannel
);
AbortChannel
::
Chain
chain
(
abortChannel
,
xSubAbortChannel
);
try
{
try
{
bundle
[
pos
]
->
revokePackage
(
xSubAbortChannel
,
xCmdEnv
);
bundle
[
pos
]
->
revokePackage
(
startup
,
xSubAbortChannel
,
xCmdEnv
);
}
}
catch
(
const
RuntimeException
&
)
{
catch
(
const
RuntimeException
&
)
{
throw
;
throw
;
...
...
desktop/source/deployment/registry/script/dp_script.cxx
Dosyayı görüntüle @
fdbc6b76
...
@@ -398,7 +398,7 @@ void BackendImpl::PackageImpl::processPackage_(
...
@@ -398,7 +398,7 @@ void BackendImpl::PackageImpl::processPackage_(
bool
bDialog
=
!
m_dialogURL
.
isEmpty
();
bool
bDialog
=
!
m_dialogURL
.
isEmpty
();
Reference
<
css
::
script
::
XLibraryContainer3
>
xDialogLibs
;
Reference
<
css
::
script
::
XLibraryContainer3
>
xDialogLibs
;
bool
bRunning
=
office_is_running
();
bool
bRunning
=
!
startup
&&
office_is_running
();
if
(
bRunning
)
if
(
bRunning
)
{
{
if
(
bScript
)
if
(
bScript
)
...
@@ -457,7 +457,7 @@ void BackendImpl::PackageImpl::processPackage_(
...
@@ -457,7 +457,7 @@ void BackendImpl::PackageImpl::processPackage_(
bDialogSuccess
=
lcl_maybeAddScript
(
bDialog
,
m_dialogName
,
m_dialogURL
,
xDialogLibs
);
bDialogSuccess
=
lcl_maybeAddScript
(
bDialog
,
m_dialogName
,
m_dialogURL
,
xDialogLibs
);
}
}
bool
bSuccess
=
bScript
||
bDialog
;
// Something must have happened
bool
bSuccess
=
bScript
||
bDialog
;
// Something must have happened
if
(
bRunning
&&
!
startup
)
if
(
bRunning
)
if
(
(
bScript
&&
!
bScriptSuccess
)
||
(
bDialog
&&
!
bDialogSuccess
)
)
if
(
(
bScript
&&
!
bScriptSuccess
)
||
(
bDialog
&&
!
bDialogSuccess
)
)
bSuccess
=
false
;
bSuccess
=
false
;
...
...
offapi/com/sun/star/deployment/XPackage.idl
Dosyayı görüntüle @
fdbc6b76
...
@@ -166,6 +166,10 @@ interface XPackage
...
@@ -166,6 +166,10 @@ interface XPackage
NEVER
call
this
directly
.
This
is
done
by
the
extension
manager
if
necessary
.
NEVER
call
this
directly
.
This
is
done
by
the
extension
manager
if
necessary
.
@
param
startup
indicates
that
registration
is
adapted
to
the
particular
startup
scenario
.
That
is
,
it
is
set
to
<
TRUE
/
>
,
when
called
from
<
member
>
XExtensionManager
::
synchronize
</
member
>
@
param
xAbortChannel
@
param
xAbortChannel
abort
channel
to
asynchronously
abort
the
registration
process
,
abort
channel
to
asynchronously
abort
the
registration
process
,
or
<
NULL
/
>
or
<
NULL
/
>
...
@@ -173,6 +177,7 @@ interface XPackage
...
@@ -173,6 +177,7 @@ interface XPackage
command
environment
for
error
and
progress
handling
command
environment
for
error
and
progress
handling
*/
*/
void
revokePackage
(
void
revokePackage
(
[
in
]
boolean
startup
,
[
in
]
com
::
sun
::
star
::
task
::
XAbortChannel
xAbortChannel
,
[
in
]
com
::
sun
::
star
::
task
::
XAbortChannel
xAbortChannel
,
[
in
]
com
::
sun
::
star
::
ucb
::
XCommandEnvironment
xCmdEnv
)
[
in
]
com
::
sun
::
star
::
ucb
::
XCommandEnvironment
xCmdEnv
)
raises
(
DeploymentException
,
raises
(
DeploymentException
,
...
...
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