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
36c98d7d
Kaydet (Commit)
36c98d7d
authored
Eyl 28, 2010
tarafından
Vladimir Glazunov
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
CWS-TOOLING: integrate CWS sb126
üst
3839427b
01efc734
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
133 deletions
+19
-133
ConfigExamples.java
odk/examples/DevelopersGuide/Config/ConfigExamples.java
+19
-98
idl_chapter_refs.txt
odk/pack/copying/idl_chapter_refs.txt
+0
-35
No files found.
odk/examples/DevelopersGuide/Config/ConfigExamples.java
Dosyayı görüntüle @
36c98d7d
...
@@ -78,7 +78,7 @@ import com.sun.star.util.ChangesEvent;
...
@@ -78,7 +78,7 @@ import com.sun.star.util.ChangesEvent;
/* These examples show how to use the following features of the Config API:
/* These examples show how to use the following features of the Config API:
o Accessing data
o Accessing data
o Updating data
synchronously and asynchronously
o Updating data
o Updating properties in groups
o Updating properties in groups
o Adding and removing items in sets
o Adding and removing items in sets
o Resetting data to their defaults
o Resetting data to their defaults
...
@@ -144,20 +144,6 @@ public class ConfigExamples
...
@@ -144,20 +144,6 @@ public class ConfigExamples
mxProvider
=
null
;
mxProvider
=
null
;
}
}
/** Run the examples with an AdministrationProvider
*/
public
void
runForAdmin
(
Object
[]
aAdminArgs
)
throws
com
.
sun
.
star
.
uno
.
Exception
{
mxProvider
=
createAdminProvider
(
aAdminArgs
);
runExamples
(
);
// this is not the default ConfigurationProvider, so we can dispose it
((
XComponent
)
UnoRuntime
.
queryInterface
(
XComponent
.
class
,
mxProvider
)).
dispose
();
mxProvider
=
null
;
}
/** Run the examples with a given ConfigurationProvider
/** Run the examples with a given ConfigurationProvider
*/
*/
public
void
runExamples
(
)
public
void
runExamples
(
)
...
@@ -170,11 +156,11 @@ public class ConfigExamples
...
@@ -170,11 +156,11 @@ public class ConfigExamples
browseDataExample
();
browseDataExample
();
updateGroup
Sync
Example
();
updateGroupExample
();
resetGroupExample
();
resetGroupExample
();
updateSet
Async
Example
();
updateSetExample
();
System
.
out
.
println
(
"\nAll Examples completed."
);
System
.
out
.
println
(
"\nAll Examples completed."
);
}
}
...
@@ -245,25 +231,6 @@ public class ConfigExamples
...
@@ -245,25 +231,6 @@ public class ConfigExamples
return
xProvider
;
return
xProvider
;
}
}
/** Create an administration provider
@param aAdminArguments
An array of extra arguments to be used to create the provider
*/
public
XMultiServiceFactory
createAdminProvider
(
Object
[]
aAdminArguments
)
throws
com
.
sun
.
star
.
uno
.
Exception
{
final
String
sAdminService
=
"com.sun.star.configuration.AdministrationProvider"
;
// create the provider and remember it as a XMultiServiceFactory
XMultiServiceFactory
xAdminProvider
=
(
XMultiServiceFactory
)
UnoRuntime
.
queryInterface
(
XMultiServiceFactory
.
class
,
mxServiceManager
.
createInstanceWithArgumentsAndContext
(
sAdminService
,
aAdminArguments
,
mxContext
));
return
xAdminProvider
;
}
/** Create a specified read-only configuration view
/** Create a specified read-only configuration view
*/
*/
public
Object
createConfigurationView
(
String
sPath
)
public
Object
createConfigurationView
(
String
sPath
)
...
@@ -288,7 +255,7 @@ public class ConfigExamples
...
@@ -288,7 +255,7 @@ public class ConfigExamples
return
xViewRoot
;
return
xViewRoot
;
}
}
/** Create a specified updatable configuration view
using default synchronicity
/** Create a specified updatable configuration view
*/
*/
Object
createUpdatableView
(
String
sPath
)
Object
createUpdatableView
(
String
sPath
)
throws
com
.
sun
.
star
.
uno
.
Exception
throws
com
.
sun
.
star
.
uno
.
Exception
...
@@ -312,36 +279,6 @@ public class ConfigExamples
...
@@ -312,36 +279,6 @@ public class ConfigExamples
return
xViewRoot
;
return
xViewRoot
;
}
}
/** Create a specified updatable configuration view
*/
Object
createUpdatableView
(
String
sPath
,
boolean
bAsync
)
throws
com
.
sun
.
star
.
uno
.
Exception
{
XMultiServiceFactory
xProvider
=
getProvider
();
// The service name: Need update access:
final
String
cUpdatableView
=
"com.sun.star.configuration.ConfigurationUpdateAccess"
;
// creation arguments: nodepath
com
.
sun
.
star
.
beans
.
PropertyValue
aPathArgument
=
new
com
.
sun
.
star
.
beans
.
PropertyValue
();
aPathArgument
.
Name
=
"nodepath"
;
aPathArgument
.
Value
=
sPath
;
// creation arguments: commit mode - write-through or write-back
com
.
sun
.
star
.
beans
.
PropertyValue
aModeArgument
=
new
com
.
sun
.
star
.
beans
.
PropertyValue
();
aModeArgument
.
Name
=
"lazywrite"
;
aModeArgument
.
Value
=
new
Boolean
(
bAsync
);
Object
[]
aArguments
=
new
Object
[
2
];
aArguments
[
0
]
=
aPathArgument
;
aArguments
[
1
]
=
aModeArgument
;
// create the view
Object
xViewRoot
=
xProvider
.
createInstanceWithArguments
(
cUpdatableView
,
aArguments
);
return
xViewRoot
;
}
/** This method demonstrates read access to data
/** This method demonstrates read access to data
*/
*/
protected
void
readDataExample
()
protected
void
readDataExample
()
...
@@ -374,13 +311,13 @@ public class ConfigExamples
...
@@ -374,13 +311,13 @@ public class ConfigExamples
}
}
}
}
/** This method demonstrates
synchronous
update access to group data
/** This method demonstrates update access to group data
*/
*/
protected
void
updateGroup
Sync
Example
()
protected
void
updateGroupExample
()
{
{
try
try
{
{
System
.
out
.
println
(
"\n--- starting example: update group data
synchronously
--------------"
);
System
.
out
.
println
(
"\n--- starting example: update group data --------------"
);
editGridOptions
(
);
editGridOptions
(
);
}
}
catch
(
Exception
e
)
catch
(
Exception
e
)
...
@@ -408,13 +345,13 @@ public class ConfigExamples
...
@@ -408,13 +345,13 @@ public class ConfigExamples
}
}
}
}
/** This method demonstrates
asynchronous
update access to set data
/** This method demonstrates update access to set data
*/
*/
protected
void
updateSet
Async
Example
()
protected
void
updateSetExample
()
{
{
try
try
{
{
System
.
out
.
println
(
"\n--- starting example: update set data
asynchronously
---------------"
);
System
.
out
.
println
(
"\n--- starting example: update set data ---------------"
);
storeSampleDataSource
(
);
storeSampleDataSource
(
);
}
}
catch
(
Exception
e
)
catch
(
Exception
e
)
...
@@ -639,8 +576,8 @@ public class ConfigExamples
...
@@ -639,8 +576,8 @@ public class ConfigExamples
// The path to the root element
// The path to the root element
final
String
cGridOptionsPath
=
"/org.openoffice.Office.Calc/Grid"
;
final
String
cGridOptionsPath
=
"/org.openoffice.Office.Calc/Grid"
;
// create the
SYNCHRONOUS view for better error handling
// create the
view
Object
xViewRoot
=
createUpdatableView
(
cGridOptionsPath
,
false
);
Object
xViewRoot
=
createUpdatableView
(
cGridOptionsPath
);
// the 'editor'
// the 'editor'
GridOptionsEditor
dialog
=
new
GridOptionsEditor
();
GridOptionsEditor
dialog
=
new
GridOptionsEditor
();
...
@@ -816,7 +753,7 @@ public class ConfigExamples
...
@@ -816,7 +753,7 @@ public class ConfigExamples
{
{
try
try
{
{
Object
xOtherViewRoot
=
createUpdatableView
(
xKey
,
false
);
Object
xOtherViewRoot
=
createUpdatableView
(
xKey
);
XNameReplace
aReplace
=
(
XNameReplace
)
UnoRuntime
.
queryInterface
(
XNameReplace
.
class
,
xOtherViewRoot
);
XNameReplace
aReplace
=
(
XNameReplace
)
UnoRuntime
.
queryInterface
(
XNameReplace
.
class
,
xOtherViewRoot
);
...
@@ -1002,9 +939,6 @@ public class ConfigExamples
...
@@ -1002,9 +939,6 @@ public class ConfigExamples
/** This method gets the DataSourceDescription for a data source.
/** This method gets the DataSourceDescription for a data source.
It either gets the existing entry or creates a new instance.
It either gets the existing entry or creates a new instance.
The method attempts to keep the view used as small as possible. In particular there
is no view created, that contains data for all data source that are registered.
*/
*/
Object
createDataSourceDescription
(
XMultiServiceFactory
xProvider
,
String
sDataSourceName
)
Object
createDataSourceDescription
(
XMultiServiceFactory
xProvider
,
String
sDataSourceName
)
throws
com
.
sun
.
star
.
uno
.
Exception
throws
com
.
sun
.
star
.
uno
.
Exception
...
@@ -1020,22 +954,10 @@ public class ConfigExamples
...
@@ -1020,22 +954,10 @@ public class ConfigExamples
aPathArgument
.
Name
=
"nodepath"
;
aPathArgument
.
Name
=
"nodepath"
;
aPathArgument
.
Value
=
cDataSourcesPath
;
aPathArgument
.
Value
=
cDataSourcesPath
;
// creation arguments: commit mode
Object
[]
aArguments
=
new
Object
[
1
];
com
.
sun
.
star
.
beans
.
PropertyValue
aModeArgument
=
new
com
.
sun
.
star
.
beans
.
PropertyValue
();
aModeArgument
.
Name
=
"lazywrite"
;
aModeArgument
.
Value
=
new
Boolean
(
true
);
// creation arguments: depth
com
.
sun
.
star
.
beans
.
PropertyValue
aDepthArgument
=
new
com
.
sun
.
star
.
beans
.
PropertyValue
();
aDepthArgument
.
Name
=
"depth"
;
aDepthArgument
.
Value
=
new
Integer
(
1
);
Object
[]
aArguments
=
new
Object
[
3
];
aArguments
[
0
]
=
aPathArgument
;
aArguments
[
0
]
=
aPathArgument
;
aArguments
[
1
]
=
aModeArgument
;
aArguments
[
2
]
=
aDepthArgument
;
// create the view
: asynchronously updatable, with depth 1
// create the view
Object
xViewRoot
=
Object
xViewRoot
=
xProvider
.
createInstanceWithArguments
(
cUpdatableView
,
aArguments
);
xProvider
.
createInstanceWithArguments
(
cUpdatableView
,
aArguments
);
...
@@ -1045,7 +967,7 @@ public class ConfigExamples
...
@@ -1045,7 +967,7 @@ public class ConfigExamples
Object
xDataSourceDescriptor
=
null
;
// the result
Object
xDataSourceDescriptor
=
null
;
// the result
if
(
xSetOfDataSources
.
hasByName
(
sDataSourceName
))
if
(
xSetOfDataSources
.
hasByName
(
sDataSourceName
))
{
{
// the element is there
, but it is loaded only with depth zero !
// the element is there
try
try
{
{
// the view should point to the element directly, so we need to extend the path
// the view should point to the element directly, so we need to extend the path
...
@@ -1057,12 +979,11 @@ public class ConfigExamples
...
@@ -1057,12 +979,11 @@ public class ConfigExamples
// use the name of the element now
// use the name of the element now
aPathArgument
.
Value
=
sElementPath
;
aPathArgument
.
Value
=
sElementPath
;
// create another view now
(without depth limit)
// create another view now
Object
[]
aDeepArguments
=
new
Object
[
2
];
Object
[]
aDeepArguments
=
new
Object
[
1
];
aDeepArguments
[
0
]
=
aPathArgument
;
aDeepArguments
[
0
]
=
aPathArgument
;
aDeepArguments
[
1
]
=
aModeArgument
;
// create the view
: asynchronously updatable, with unlimited depth
// create the view
xDataSourceDescriptor
=
xDataSourceDescriptor
=
xProvider
.
createInstanceWithArguments
(
cUpdatableView
,
aDeepArguments
);
xProvider
.
createInstanceWithArguments
(
cUpdatableView
,
aDeepArguments
);
...
...
odk/pack/copying/idl_chapter_refs.txt
Dosyayı görüntüle @
36c98d7d
...
@@ -2462,7 +2462,6 @@ LINK:Documentation/DevGuide/Config/Using_a_Data_Source
...
@@ -2462,7 +2462,6 @@ LINK:Documentation/DevGuide/Config/Using_a_Data_Source
DESCR:Config - Using a Data Source
DESCR:Config - Using a Data Source
REF:
REF:
com.sun.star.configuration.ConfigurationUpdateAccess
com.sun.star.configuration.ConfigurationUpdateAccess
com.sun.star.configuration.AdministrationProvider
com.sun.star.configuration.ConfigurationAccess
com.sun.star.configuration.ConfigurationAccess
TOPIC:
TOPIC:
...
@@ -2504,17 +2503,10 @@ com.sun.star.frame.XFrame
...
@@ -2504,17 +2503,10 @@ com.sun.star.frame.XFrame
LINK:Documentation/DevGuide/Config/Connecting_to_a_Data_Source
LINK:Documentation/DevGuide/Config/Connecting_to_a_Data_Source
DESCR:Config - Connecting to a Data Source
DESCR:Config - Connecting to a Data Source
REF:
REF:
com.sun.star.configuration.backend.LocalSingleBackend
com.sun.star.configuration.AdministrationProvider
com.sun.star.lang.XMultiServiceFactory
com.sun.star.lang.XMultiServiceFactory
com.sun.star.configuration.backend.SingleBackendAdapter
com.sun.star.configuration.backend.Backend
com.sun.star.configuration.backend.BackendAdapter
com.sun.star.configuration.ConfigurationProvider
com.sun.star.configuration.ConfigurationProvider
com.sun.star.configuration.backend.SingleBackend
com.sun.star.lang.ServiceManager
com.sun.star.lang.ServiceManager
TOPIC:
TOPIC:
com.sun.star.configuration.AdministrationProvider
com.sun.star.configuration.ConfigurationProvider
com.sun.star.configuration.ConfigurationProvider
LINK:Documentation/DevGuide/Spreadsheets/Creating_a_New_DataPilot_Table
LINK:Documentation/DevGuide/Spreadsheets/Creating_a_New_DataPilot_Table
...
@@ -2924,7 +2916,6 @@ LINK:Documentation/DevGuide/Config/Configuration_Data_Sources
...
@@ -2924,7 +2916,6 @@ LINK:Documentation/DevGuide/Config/Configuration_Data_Sources
DESCR:Config - Configuration Data Sources
DESCR:Config - Configuration Data Sources
REF:
REF:
com.sun.star.configuration.ConfigurationUpdateAccess
com.sun.star.configuration.ConfigurationUpdateAccess
com.sun.star.configuration.AdministrationProvider
com.sun.star.configuration.ConfigurationProvider
com.sun.star.configuration.ConfigurationProvider
com.sun.star.configuration.ConfigurationAccess
com.sun.star.configuration.ConfigurationAccess
TOPIC:
TOPIC:
...
@@ -5128,18 +5119,6 @@ com.sun.star.document.XExporter
...
@@ -5128,18 +5119,6 @@ com.sun.star.document.XExporter
TOPIC:
TOPIC:
com.sun.star.drawing.GraphicExportFilter
com.sun.star.drawing.GraphicExportFilter
LINK:Documentation/DevGuide/Config/Installing_a_Custom_Configuration_Schema
DESCR:Config - Installing a Custom Configuration Schema
REF:
com.sun.star.configuration.backend.MergeImporter
com.sun.star.configuration.backend.LocalDataImporter
com.sun.star.configuration.backend.CopyImporter
com.sun.star.configuration.ConfigurationProvider
TOPIC:
com.sun.star.configuration.backend.MergeImporter
com.sun.star.configuration.backend.LocalDataImporter
com.sun.star.configuration.backend.CopyImporter
LINK:Documentation/DevGuide/OfficeDev/Component/Getting_Frames%2C_Controllers_and_Models_from_Each_Other
LINK:Documentation/DevGuide/OfficeDev/Component/Getting_Frames%2C_Controllers_and_Models_from_Each_Other
DESCR:OfficeDev - Component - Getting Frames, Controllers and Models from Each Other
DESCR:OfficeDev - Component - Getting Frames, Controllers and Models from Each Other
REF:
REF:
...
@@ -5571,12 +5550,10 @@ LINK:Documentation/DevGuide/Config/Object_Model
...
@@ -5571,12 +5550,10 @@ LINK:Documentation/DevGuide/Config/Object_Model
DESCR:Config - Object Model
DESCR:Config - Object Model
REF:
REF:
com.sun.star.configuration.ConfigurationUpdateAccess
com.sun.star.configuration.ConfigurationUpdateAccess
com.sun.star.configuration.AdministrationProvider
com.sun.star.configuration.ConfigurationProvider
com.sun.star.configuration.ConfigurationProvider
com.sun.star.configuration.ConfigurationAccess
com.sun.star.configuration.ConfigurationAccess
TOPIC:
TOPIC:
com.sun.star.configuration.ConfigurationUpdateAccess
com.sun.star.configuration.ConfigurationUpdateAccess
com.sun.star.configuration.AdministrationProvider
com.sun.star.configuration.ConfigurationProvider
com.sun.star.configuration.ConfigurationProvider
com.sun.star.configuration.ConfigurationAccess
com.sun.star.configuration.ConfigurationAccess
...
@@ -7178,18 +7155,6 @@ com.sun.star.util.XModifiable
...
@@ -7178,18 +7155,6 @@ com.sun.star.util.XModifiable
com.sun.star.util.XCloseable
com.sun.star.util.XCloseable
TOPIC:
TOPIC:
LINK:Documentation/DevGuide/Config/Adding_a_Backend_Data_Store
DESCR:Config - Adding a Backend Data Store
REF:
com.sun.star.configuration.backend.SingleBackendAdapter
com.sun.star.configuration.backend.Backend
com.sun.star.configuration.ConfigurationProvider
com.sun.star.configuration.backend.BackendAdapter
com.sun.star.configuration.backend.SingleBackend
TOPIC:
com.sun.star.configuration.backend.Backend
com.sun.star.configuration.backend.SingleBackend
LINK:Documentation/DevGuide/Charts/Chart_Document_Controller
LINK:Documentation/DevGuide/Charts/Chart_Document_Controller
DESCR:Charts - Chart Document Controller
DESCR:Charts - Chart Document Controller
REF:
REF:
...
...
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