diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-08-23 15:19:40 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-08-23 15:19:40 +0200 |
commit | 566a5bcb2039dbe6db6b9696449c6f5fe142c763 (patch) | |
tree | 2012c7ad41c5058904ba05848e17d1e248f7559d /odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java | |
parent | cbb79e541cd2aa1f56cf7fbefcf8d0ce9c8db664 (diff) |
recreated tag libreoffice-3.3.0.4 which had these commits:
commit f4a669793477ff9765085fff8ced14cbe8d7f159 (tag: refs/tags/libreoffice-3.3.0.4, refs/remotes/origin/libreoffice-3-3-0)
Author: Petr Mladek <pmladek@suse.cz>
Date: Tue Jan 18 19:01:21 2011 +0100
Version 3.3.0.4, tag libreoffice-3.3.0.4 (3.3-rc4)
commit c6241c81b61717941cf0a3e4a4188468ceddef07
Author: Petr Mladek <pmladek@suse.cz>
Date: Tue Jan 11 22:59:38 2011 +0100
Branch libreoffice-3-3-0
This is 'libreoffice-3-3-0' - the stable branch for the 3.3.0 release.
Only very safe changes, reviewed by three people are allowed.
If you want to commit more complicated fix for the next 3.3.x release,
please use the 'libreoffice-3-3' branch.
If you want to build something cool, unstable, and risky, use master.
Notes
Notes:
split repo tag: sdk_libreoffice-3.3.0.4
Diffstat (limited to 'odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java')
-rw-r--r-- | odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java b/odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java index 9aaeadc74f79..44d0a2c9c094 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java +++ b/odk/examples/DevelopersGuide/OfficeDev/PathSettings/PathSettingsTest.java @@ -2,7 +2,7 @@ * * The Contents of this file are made available subject to the terms of * the BSD license. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * All rights reserved. * @@ -29,7 +29,7 @@ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * *************************************************************************/ import com.sun.star.uno.UnoRuntime; @@ -46,7 +46,7 @@ import com.sun.star.beans.UnknownPropertyException; * path pathsettings servce. */ public class PathSettingsTest extends java.lang.Object { - + /* * List of pre-defined path variables supported by * the path settings service. @@ -77,28 +77,28 @@ public class PathSettingsTest extends java.lang.Object { "UserDictionary", "Work" }; - + /* * @param args the command line arguments */ public static void main(String[] args) { - + XComponentContext xRemoteContext = null; XMultiComponentFactory xRemoteServiceManager = null; XPropertySet xPathSettingsService = null; - + try { // get the remote office context. If necessary a new office // process is started xRemoteContext = com.sun.star.comp.helper.Bootstrap.bootstrap(); System.out.println("Connected to a running office ..."); xRemoteServiceManager = xRemoteContext.getServiceManager(); - + Object pathSubst = xRemoteServiceManager.createInstanceWithContext( "com.sun.star.comp.framework.PathSettings", xRemoteContext ); xPathSettingsService = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, pathSubst); - + /* Work with path settings */ workWithPathSettings( xPathSettingsService ); } @@ -120,12 +120,12 @@ public class PathSettingsTest extends java.lang.Object { for ( int i=0; i<predefinedPathProperties.length; i++ ) { try { /* Retrieve values for path properties from path settings - * service*/ - Object aValue = xPathSettingsService.getPropertyValue( + * service*/ + Object aValue = xPathSettingsService.getPropertyValue( predefinedPathProperties[i] ); - + // getPropertyValue returns an Object, you have to cast - // it to type that you need + // it to type that you need String aPath = (String)aValue; System.out.println( "Property="+ predefinedPathProperties[i] + " Path=" + aPath ); @@ -137,11 +137,11 @@ public class PathSettingsTest extends java.lang.Object { System.err.println( "WrappedTargetException has been thrown accessing "+predefinedPathProperties[i]); } } - + // Try to modfiy the work path property. After running this example - // you should see the new value of "My Documents" in the path options + // you should see the new value of "My Documents" in the path options // tab page, accessible via "Tools - Options - [Star|Open]Office - - // Paths". + // Paths". // If you want to revert the changes, you can also do it with the // path tab page. try { |