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
91e66387
Kaydet (Commit)
91e66387
authored
Mar 20, 2017
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ofz#912 support avoiding config
Change-Id: I10bef028badc1a3d1d96adaa1757fa7d9c6d2dc8
üst
d66eeb50
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
37 deletions
+41
-37
filtercache.cxx
filter/source/config/cache/filtercache.cxx
+41
-37
No files found.
filter/source/config/cache/filtercache.cxx
Dosyayı görüntüle @
91e66387
...
...
@@ -45,6 +45,7 @@
#include <o3tl/make_unique.hxx>
#include <unotools/configmgr.hxx>
#include <unotools/configpaths.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/uri.hxx>
...
...
@@ -902,49 +903,52 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_createConfigAccess
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
xCfg
;
try
if
(
!
utl
::
ConfigManager
::
IsAvoidConfig
())
{
css
::
uno
::
Reference
<
css
::
lang
::
XMultiServiceFactory
>
xConfigProvider
(
css
::
configuration
::
theDefaultProvider
::
get
(
comphelper
::
getProcessComponentContext
()
)
);
try
{
css
::
uno
::
Reference
<
css
::
lang
::
XMultiServiceFactory
>
xConfigProvider
(
css
::
configuration
::
theDefaultProvider
::
get
(
comphelper
::
getProcessComponentContext
()
)
);
::
std
::
vector
<
css
::
uno
::
Any
>
lParams
;
css
::
beans
::
NamedValue
aParam
;
::
std
::
vector
<
css
::
uno
::
Any
>
lParams
;
css
::
beans
::
NamedValue
aParam
;
// set root path
aParam
.
Name
=
"nodepath"
;
aParam
.
Value
<<=
sRoot
;
lParams
.
push_back
(
css
::
uno
::
makeAny
(
aParam
));
// set root path
aParam
.
Name
=
"nodepath"
;
aParam
.
Value
<<=
sRoot
;
lParams
.
push_back
(
css
::
uno
::
makeAny
(
aParam
));
// enable "all locales mode" ... if required
if
(
bLocalesMode
)
// enable "all locales mode" ... if required
if
(
bLocalesMode
)
{
aParam
.
Name
=
"locale"
;
aParam
.
Value
<<=
OUString
(
"*"
);
lParams
.
push_back
(
css
::
uno
::
makeAny
(
aParam
));
}
// open it
if
(
bReadOnly
)
xCfg
=
xConfigProvider
->
createInstanceWithArguments
(
SERVICE_CONFIGURATIONACCESS
,
comphelper
::
containerToSequence
(
lParams
));
else
xCfg
=
xConfigProvider
->
createInstanceWithArguments
(
SERVICE_CONFIGURATIONUPDATEACCESS
,
comphelper
::
containerToSequence
(
lParams
));
// If configuration could not be opened ... but factory method does not throwed an exception
// trigger throwing of our own CorruptedFilterConfigurationException.
// Let message empty. The normal exception text show enough information to the user.
if
(
!
xCfg
.
is
())
throw
css
::
uno
::
Exception
(
"Got NULL reference on opening configuration file ... but no exception."
,
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
());
}
catch
(
const
css
::
uno
::
Exception
&
ex
)
{
aParam
.
Name
=
"locale"
;
aParam
.
Value
<<=
OUString
(
"*"
);
lParams
.
push_back
(
css
::
uno
::
makeAny
(
aParam
));
throw
css
::
document
::
CorruptedFilterConfigurationException
(
"filter configuration, caught: "
+
ex
.
Message
,
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
(),
ex
.
Message
);
}
// open it
if
(
bReadOnly
)
xCfg
=
xConfigProvider
->
createInstanceWithArguments
(
SERVICE_CONFIGURATIONACCESS
,
comphelper
::
containerToSequence
(
lParams
));
else
xCfg
=
xConfigProvider
->
createInstanceWithArguments
(
SERVICE_CONFIGURATIONUPDATEACCESS
,
comphelper
::
containerToSequence
(
lParams
));
// If configuration could not be opened ... but factory method does not throwed an exception
// trigger throwing of our own CorruptedFilterConfigurationException.
// Let message empty. The normal exception text show enough information to the user.
if
(
!
xCfg
.
is
())
throw
css
::
uno
::
Exception
(
"Got NULL reference on opening configuration file ... but no exception."
,
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
());
}
catch
(
const
css
::
uno
::
Exception
&
ex
)
{
throw
css
::
document
::
CorruptedFilterConfigurationException
(
"filter configuration, caught: "
+
ex
.
Message
,
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
(),
ex
.
Message
);
}
return
xCfg
;
...
...
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