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
382b0132
Kaydet (Commit)
382b0132
authored
Ock 08, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Some ConfigurationProvider -> theDefaultProvider simplifications
Change-Id: I7c25cd94f8a1ca339f7423c26f21f13c7a68906d
üst
b45e8153
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
26 additions
and
35 deletions
+26
-35
dp_descriptioninfoset.cxx
desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+6
-9
AcceleratorsConfigurationTest.java
...a/complex/accelerators/AcceleratorsConfigurationTest.java
+3
-1
AutoSave.java
framework/qa/complex/framework/autosave/AutoSave.java
+1
-1
ConfigHelper.java
framework/qa/complex/framework/autosave/ConfigHelper.java
+3
-5
LibreLogo.py
librelogo/source/LibreLogo/LibreLogo.py
+1
-1
ResourceManager.java
...src/com/sun/star/comp/Calc/NLPSolver/ResourceManager.java
+3
-4
UnoDialogSample.java
odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
+2
-3
DisableCommandsTest.java
...sGuide/OfficeDev/DisableCommands/DisableCommandsTest.java
+2
-5
OwnEmbeddedObject.java
.../java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java
+2
-4
javavm.cxx
stoc/source/javavm/javavm.cxx
+3
-2
No files found.
desktop/source/deployment/misc/dp_descriptioninfoset.cxx
Dosyayı görüntüle @
382b0132
...
...
@@ -27,6 +27,7 @@
#include "comphelper/makesequence.hxx"
#include "comphelper/processfactory.hxx"
#include "boost/optional.hpp"
#include "com/sun/star/configuration/theDefaultProvider.hpp"
#include "com/sun/star/container/XNameAccess.hpp"
#include "com/sun/star/beans/Optional.hpp"
#include "com/sun/star/beans/PropertyValue.hpp"
...
...
@@ -374,12 +375,6 @@ void DescriptionInfoset::checkBlacklist() const
if
(
currentversion
.
getLength
()
==
0
)
return
;
// nothing to check
css
::
uno
::
Reference
<
css
::
lang
::
XMultiComponentFactory
>
manager
(
m_context
->
getServiceManager
(),
css
::
uno
::
UNO_QUERY_THROW
);
css
::
uno
::
Reference
<
css
::
lang
::
XMultiServiceFactory
>
provider
(
manager
->
createInstanceWithContext
(
"com.sun.star.configuration.ConfigurationProvider"
,
m_context
),
css
::
uno
::
UNO_QUERY_THROW
);
css
::
uno
::
Sequence
<
css
::
uno
::
Any
>
args
=
css
::
uno
::
Sequence
<
css
::
uno
::
Any
>
(
1
);
css
::
beans
::
PropertyValue
prop
;
prop
.
Name
=
"nodepath"
;
...
...
@@ -387,8 +382,10 @@ void DescriptionInfoset::checkBlacklist() const
args
[
0
]
<<=
prop
;
css
::
uno
::
Reference
<
css
::
container
::
XNameAccess
>
blacklist
(
provider
->
createInstanceWithArguments
(
"com.sun.star.configuration.ConfigurationAccess"
,
args
),
css
::
uno
::
UNO_QUERY_THROW
);
(
css
::
configuration
::
theDefaultProvider
::
get
(
m_context
)
->
createInstanceWithArguments
(
"com.sun.star.configuration.ConfigurationAccess"
,
args
)),
css
::
uno
::
UNO_QUERY_THROW
);
// check first if a blacklist entry is available
if
(
blacklist
.
is
()
&&
blacklist
->
hasByName
(
*
id
))
{
...
...
@@ -412,7 +409,7 @@ void DescriptionInfoset::checkBlacklist() const
OString
xmlDependencies
=
OUStringToOString
(
udeps
,
RTL_TEXTENCODING_UNICODE
);
css
::
uno
::
Reference
<
css
::
xml
::
dom
::
XDocumentBuilder
>
docbuilder
(
m
anager
->
createInstanceWithContext
(
"com.sun.star.xml.dom.DocumentBuilder"
,
m_context
),
m
_context
->
getServiceManager
()
->
createInstanceWithContext
(
"com.sun.star.xml.dom.DocumentBuilder"
,
m_context
),
css
::
uno
::
UNO_QUERY_THROW
);
css
::
uno
::
Sequence
<
sal_Int8
>
byteSeq
((
const
sal_Int8
*
)
xmlDependencies
.
getStr
(),
xmlDependencies
.
getLength
());
...
...
framework/qa/complex/accelerators/AcceleratorsConfigurationTest.java
Dosyayı görüntüle @
382b0132
...
...
@@ -21,6 +21,7 @@ package complex.accelerators;
import
com.sun.star.awt.KeyEvent
;
import
com.sun.star.beans.PropertyValue
;
import
com.sun.star.beans.XPropertySet
;
import
com.sun.star.configuration.theDefaultProvider
;
import
com.sun.star.container.XNameAccess
;
import
com.sun.star.embed.XStorage
;
import
com.sun.star.embed.XTransactedObject
;
...
...
@@ -750,7 +751,8 @@ public class AcceleratorsConfigurationTest
boolean
bReadOnly
)
throws
java
.
lang
.
Exception
{
XMultiServiceFactory
xConfigRoot
=
UnoRuntime
.
queryInterface
(
XMultiServiceFactory
.
class
,
xSMGR
.
createInstance
(
"com.sun.star.configuration.ConfigurationProvider"
));
XMultiServiceFactory
xConfigRoot
=
theDefaultProvider
.
get
(
connection
.
getComponentContext
());
PropertyValue
[]
lParams
=
new
PropertyValue
[
2
];
lParams
[
0
]
=
new
PropertyValue
();
...
...
framework/qa/complex/framework/autosave/AutoSave.java
Dosyayı görüntüle @
382b0132
...
...
@@ -208,7 +208,7 @@ public class AutoSave
// prepare AutoSave
// make sure it will be started every 1 min
ConfigHelper
aConfig
=
new
ConfigHelper
(
m_xSMGR
,
"org.openoffice.Office.Recovery"
,
false
);
ConfigHelper
aConfig
=
new
ConfigHelper
(
connection
.
getComponentContext
()
,
"org.openoffice.Office.Recovery"
,
false
);
aConfig
.
writeRelativeKey
(
"AutoSave"
,
"Enabled"
,
Boolean
.
TRUE
);
aConfig
.
writeRelativeKey
(
"AutoSave"
,
"TimeIntervall"
,
new
Integer
(
1
));
// 1 min
aConfig
.
flush
();
...
...
framework/qa/complex/framework/autosave/ConfigHelper.java
Dosyayı görüntüle @
382b0132
...
...
@@ -20,24 +20,22 @@ package complex.framework.autosave;
import
com.sun.star.uno.*
;
import
com.sun.star.lang.*
;
import
com.sun.star.configuration.theDefaultProvider
;
import
com.sun.star.container.*
;
import
com.sun.star.beans.*
;
import
com.sun.star.util.*
;
class
ConfigHelper
{
private
XMultiServiceFactory
m_xSMGR
=
null
;
private
XHierarchicalNameAccess
m_xConfig
=
null
;
//-----------------------------------------------
public
ConfigHelper
(
X
MultiServiceFactory
xSMGR
,
public
ConfigHelper
(
X
ComponentContext
context
,
String
sConfigPath
,
boolean
bReadOnly
)
throws
com
.
sun
.
star
.
uno
.
Exception
{
m_xSMGR
=
xSMGR
;
XMultiServiceFactory
xConfigRoot
=
UnoRuntime
.
queryInterface
(
XMultiServiceFactory
.
class
,
m_xSMGR
.
createInstance
(
"com.sun.star.configuration.ConfigurationProvider"
));
XMultiServiceFactory
xConfigRoot
=
theDefaultProvider
.
get
(
context
);
PropertyValue
[]
lParams
=
new
PropertyValue
[
1
];
lParams
[
0
]
=
new
PropertyValue
();
...
...
librelogo/source/LibreLogo/LibreLogo.py
Dosyayı görüntüle @
382b0132
...
...
@@ -141,7 +141,7 @@ def __getprop__(name, value):
p
,
p
.
Name
,
p
.
Value
=
__property__
(),
name
,
value
return
p
__uilocale__
=
uno
.
getComponentContext
()
.
ServiceManager
.
createInstance
(
"com.sun.star.configuration.Configuration
Provider"
)
.
\
__uilocale__
=
uno
.
getComponentContext
()
.
getValueByName
(
"/singletons/com.sun.star.configuration.theDefault
Provider"
)
.
\
createInstanceWithArguments
(
"com.sun.star.configuration.ConfigurationAccess"
,
\
(
__getprop__
(
"nodepath"
,
"/org.openoffice.Setup/L10N"
),))
.
getByName
(
"ooLocale"
)
+
'-'
# handle missing Country of locale 'eo'
...
...
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/ResourceManager.java
Dosyayı görüntüle @
382b0132
...
...
@@ -30,6 +30,7 @@ package com.sun.star.comp.Calc.NLPSolver;
import
com.sun.star.beans.PropertyState
;
import
com.sun.star.beans.PropertyValue
;
import
com.sun.star.beans.XPropertySet
;
import
com.sun.star.configuration.theDefaultProvider
;
import
com.sun.star.deployment.PackageInformationProvider
;
import
com.sun.star.deployment.XPackageInformationProvider
;
import
com.sun.star.lang.Locale
;
...
...
@@ -60,8 +61,7 @@ public class ResourceManager {
m_resourceBaseUrl
=
m_oxtRoot
+
relativeResourceBaseUrl
;
try
{
XMultiServiceFactory
xConfig
=
UnoRuntime
.
queryInterface
(
XMultiServiceFactory
.
class
,
m_context
.
getServiceManager
().
createInstanceWithContext
(
"com.sun.star.configuration.ConfigurationProvider"
,
m_context
));
XMultiServiceFactory
xConfig
=
theDefaultProvider
.
get
(
m_context
);
Object
[]
args
=
new
Object
[
1
];
args
[
0
]
=
new
PropertyValue
(
"nodepath"
,
0
,
"/org.openoffice.Setup/L10N"
,
PropertyState
.
DIRECT_VALUE
);
...
...
@@ -95,4 +95,4 @@ public class ResourceManager {
}
}
}
\ No newline at end of file
}
odk/examples/DevelopersGuide/GUI/UnoDialogSample.java
Dosyayı görüntüle @
382b0132
...
...
@@ -76,6 +76,7 @@ import com.sun.star.awt.XWindowPeer;
import
com.sun.star.beans.PropertyValue
;
import
com.sun.star.beans.XMultiPropertySet
;
import
com.sun.star.beans.XPropertySet
;
import
com.sun.star.configuration.theDefaultProvider
;
import
com.sun.star.container.XIndexContainer
;
import
com.sun.star.container.XNameAccess
;
import
com.sun.star.container.XNameContainer
;
...
...
@@ -193,13 +194,11 @@ public class UnoDialogSample implements XTextListener, XSpinListener, XActionLis
*/
public
XNameAccess
getRegistryKeyContent
(
String
_sKeyName
){
try
{
Object
oConfigProvider
;
PropertyValue
[]
aNodePath
=
new
PropertyValue
[
1
];
oConfigProvider
=
m_xMCF
.
createInstanceWithContext
(
"com.sun.star.configuration.ConfigurationProvider"
,
this
.
m_xContext
);
XMultiServiceFactory
xMSFConfig
=
theDefaultProvider
.
get
(
m_xContext
);
aNodePath
[
0
]
=
new
PropertyValue
();
aNodePath
[
0
].
Name
=
"nodepath"
;
aNodePath
[
0
].
Value
=
_sKeyName
;
XMultiServiceFactory
xMSFConfig
=
UnoRuntime
.
queryInterface
(
XMultiServiceFactory
.
class
,
oConfigProvider
);
Object
oNode
=
xMSFConfig
.
createInstanceWithArguments
(
"com.sun.star.configuration.ConfigurationAccess"
,
aNodePath
);
XNameAccess
xNameAccess
=
UnoRuntime
.
queryInterface
(
XNameAccess
.
class
,
oNode
);
return
xNameAccess
;
...
...
odk/examples/DevelopersGuide/OfficeDev/DisableCommands/DisableCommandsTest.java
Dosyayı görüntüle @
382b0132
...
...
@@ -32,6 +32,7 @@
*
*************************************************************************/
import
com.sun.star.configuration.theDefaultProvider
;
import
com.sun.star.uno.UnoRuntime
;
import
com.sun.star.uno.XComponentContext
;
import
com.sun.star.lang.XMultiComponentFactory
;
...
...
@@ -79,11 +80,7 @@ public class DisableCommandsTest extends java.lang.Object {
xTransformer
=
UnoRuntime
.
queryInterface
(
com
.
sun
.
star
.
util
.
XURLTransformer
.
class
,
transformer
);
Object
configProvider
=
xRemoteServiceManager
.
createInstanceWithContext
(
"com.sun.star.configuration.ConfigurationProvider"
,
xRemoteContext
);
xConfigProvider
=
UnoRuntime
.
queryInterface
(
com
.
sun
.
star
.
lang
.
XMultiServiceFactory
.
class
,
configProvider
);
xConfigProvider
=
theDefaultProvider
.
get
(
xRemoteContext
);
// create a new test document
Object
oDesktop
=
xRemoteServiceManager
.
createInstanceWithContext
(
...
...
odk/examples/java/EmbedDocument/EmbeddedObject/OwnEmbeddedObject.java
Dosyayı görüntüle @
382b0132
...
...
@@ -20,6 +20,7 @@ import java.awt.Dimension;
import
java.util.ArrayList
;
import
com.sun.star.beans.XPropertySet
;
import
com.sun.star.configuration.theDefaultProvider
;
import
com.sun.star.container.XNameAccess
;
import
com.sun.star.embed.VisualRepresentation
;
import
com.sun.star.embed.XStorage
;
...
...
@@ -29,7 +30,6 @@ import com.sun.star.io.XOutputStream;
import
com.sun.star.io.XStream
;
import
com.sun.star.io.XTruncate
;
import
com.sun.star.lang.XComponent
;
import
com.sun.star.lang.XMultiComponentFactory
;
import
com.sun.star.lang.XMultiServiceFactory
;
import
com.sun.star.lib.uno.helper.WeakBase
;
import
com.sun.star.uno.AnyConverter
;
...
...
@@ -987,9 +987,7 @@ public final class OwnEmbeddedObject extends WeakBase
{
try
{
XMultiComponentFactory
xFactory
=
m_xContext
.
getServiceManager
();
Object
obj
=
xFactory
.
createInstanceWithContext
(
"com.sun.star.configuration.ConfigurationProvider"
,
m_xContext
);
XMultiServiceFactory
xConfProvider
=
UnoRuntime
.
queryInterface
(
XMultiServiceFactory
.
class
,
obj
);
XMultiServiceFactory
xConfProvider
=
theDefaultProvider
.
get
(
m_xContext
);
if
(
xConfProvider
==
null
)
throw
new
com
.
sun
.
star
.
uno
.
RuntimeException
();
...
...
stoc/source/javavm/javavm.cxx
Dosyayı görüntüle @
382b0132
...
...
@@ -1334,8 +1334,9 @@ void JavaVirtualMachine::registerConfigChangesListener()
try
{
css
::
uno
::
Reference
<
css
::
lang
::
XMultiServiceFactory
>
xConfigProvider
(
m_xContext
->
getServiceManager
()
->
createInstanceWithContext
(
OUString
(
"com.sun.star.configuration.ConfigurationProvider"
),
m_xContext
),
css
::
uno
::
UNO_QUERY
);
m_xContext
->
getValueByName
(
"/singletons/com.sun.star.configuration.theDefaultProvider"
),
css
::
uno
::
UNO_QUERY
);
if
(
xConfigProvider
.
is
())
{
...
...
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