summaryrefslogtreecommitdiff
path: root/odk/examples/DevelopersGuide/Components
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:19:40 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:19:40 +0200
commit566a5bcb2039dbe6db6b9696449c6f5fe142c763 (patch)
tree2012c7ad41c5058904ba05848e17d1e248f7559d /odk/examples/DevelopersGuide/Components
parentcbb79e541cd2aa1f56cf7fbefcf8d0ce9c8db664 (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
split repo tag: sdk_libreoffice-3.3.0.4
Diffstat (limited to 'odk/examples/DevelopersGuide/Components')
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Addons.xcu46
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx4
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.hxx6
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx22
-rw-r--r--odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java64
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/TestCppComponent.cxx6
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx8
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx10
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/some.idl6
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/SomethingA.idl16
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/SomethingB.idl16
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentA.java10
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentB.java10
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/TestJavaComponent.java44
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java10
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/XSomethingA.idl22
-rw-r--r--odk/examples/DevelopersGuide/Components/JavaComponent/XSomethingB.idl22
-rw-r--r--odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.idl18
-rw-r--r--odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java28
-rw-r--r--odk/examples/DevelopersGuide/Components/SimpleLicense/description.xml2
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java48
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Thumbs.java14
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/ImageShrink.idl4
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/XImageShrink.idl6
-rw-r--r--odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/XImageShrinkFilter.idl4
-rw-r--r--odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java50
-rw-r--r--odk/examples/DevelopersGuide/Components/dialogcomponent/TestDialogHandler.idl8
-rw-r--r--odk/examples/DevelopersGuide/Components/dialogcomponent/XTestDialogHandler.idl22
28 files changed, 263 insertions, 263 deletions
diff --git a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Addons.xcu b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Addons.xcu
index d3d8d7411ed2..b97762510429 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Addons.xcu
+++ b/odk/examples/DevelopersGuide/Components/Addons/JobsAddon/Addons.xcu
@@ -1,22 +1,22 @@
<?xml version='1.0' encoding='UTF-8'?>
<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Addons" oor:package="org.openoffice.Office">
<node oor:name="AddonUI">
-
+
<node oor:name="AddonMenu">
-
+
<node oor:name="myAsyncJobAlias" oor:op="replace">
-
+
<prop oor:name="URL" oor:type="xs:string">
-
+
<value>vnd.sun.star.job:alias=AsyncJob</value>
-
+
</prop>
-
+
<prop oor:name="ImageIdentifier" oor:type="xs:string">
<value>private:image/3216</value>
-
+
</prop>
-
+
<prop oor:name="Title" oor:type="xs:string">
<!-- The x-no-translate entry is a marker to prevent l10n tooling from translation. It it is not necessary. -->
<value xml:lang="x-no-translate"></value>
@@ -27,20 +27,20 @@
<value>_self</value>
</prop>
</node>
-
+
<node oor:name="myAsyncJobEvent" oor:op="replace">
-
+
<prop oor:name="URL" oor:type="xs:string">
-
+
<value>vnd.sun.star.job:event=onMyOwnJobEvent</value>
-
+
</prop>
-
+
<prop oor:name="ImageIdentifier" oor:type="xs:string">
<value>private:image/3216</value>
-
+
</prop>
-
+
<prop oor:name="Title" oor:type="xs:string">
<!-- The x-no-translate entry is a marker to prevent l10n tooling from translation. It it is not necessary. -->
<value xml:lang="x-no-translate"></value>
@@ -51,20 +51,20 @@
<value>_self</value>
</prop>
</node>
-
+
<node oor:name="myAsyncJobService" oor:op="replace">
-
+
<prop oor:name="URL" oor:type="xs:string">
-
+
<value>vnd.sun.star.job:service=com.sun.star.comp.framework.java.services.AsyncJob</value>
-
+
</prop>
-
+
<prop oor:name="ImageIdentifier" oor:type="xs:string">
<value>private:image/3216</value>
-
+
</prop>
-
+
<prop oor:name="Title" oor:type="xs:string">
<!-- The x-no-translate entry is a marker to prevent l10n tooling from translation. It it is not necessary. -->
<value xml:lang="x-no-translate"></value>
@@ -74,7 +74,7 @@
<prop oor:name="Target" oor:type="xs:string">
<value>_self</value>
</prop>
- </node>
+ </node>
</node>
</node>
</oor:component-data>
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx
index dbf2d548d7f3..de478e6711f6 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx
+++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx
@@ -3,7 +3,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.
*
@@ -30,7 +30,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.
- *
+ *
*************************************************************************/
#include <addon.hxx>
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.hxx b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.hxx
index f2e4a0f4a08e..63f90f2312d2 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.hxx
+++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.hxx
@@ -3,7 +3,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.
*
@@ -30,7 +30,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.
- *
+ *
*************************************************************************/
#ifndef _Addon_HXX
@@ -80,7 +80,7 @@ public:
// XDispatchProvider
virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >
- SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL,
+ SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL,
const ::rtl::OUString& sTargetFrameName, sal_Int32 nSearchFlags )
throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence < ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > >
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx
index 19553b282926..3f8596026f7d 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx
+++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx
@@ -3,7 +3,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.
*
@@ -30,7 +30,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.
- *
+ *
*************************************************************************/
#include <stdio.h>
@@ -45,13 +45,13 @@
// include our specific addon header to get access to functions and definitions
#include <addon.hxx>
-
+
using namespace ::rtl;
using namespace ::osl;
using namespace ::cppu;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
+using namespace ::com::sun::star::registry;
//##################################################################################################
//#### EXPORTED ####################################################################################
@@ -84,13 +84,13 @@ extern "C" sal_Bool SAL_CALL component_writeInfo(void * pServiceManager, void *
Reference< XRegistryKey > xNewKey(
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
OUString( RTL_CONSTASCII_USTRINGPARAM("/" IMPLEMENTATION_NAME "/UNO/SERVICES") ) ) );
-
+
const Sequence< OUString > & rSNL =
Addon_getSupportedServiceNames();
const OUString * pArray = rSNL.getConstArray();
for ( sal_Int32 nPos = rSNL.getLength(); nPos--; )
xNewKey->createKey( pArray[nPos] );
-
+
return sal_True;
}
catch (InvalidRegistryException &)
@@ -107,12 +107,12 @@ extern "C" sal_Bool SAL_CALL component_writeInfo(void * pServiceManager, void *
* @param pImplName name of implementation
* @param pServiceManager a service manager, need for component creation
* @param pRegistryKey the registry key for this component, need for persistent data
- * @return a component factory
+ * @return a component factory
*/
extern "C" void * SAL_CALL component_getFactory(const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey)
{
void * pRet = 0;
-
+
if (rtl_str_compare( pImplName, IMPLEMENTATION_NAME ) == 0)
{
Reference< XSingleServiceFactory > xFactory( createSingleFactory(
@@ -120,15 +120,15 @@ extern "C" void * SAL_CALL component_getFactory(const sal_Char * pImplName, void
OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) ),
Addon_createInstance,
Addon_getSupportedServiceNames() ) );
-
+
if (xFactory.is())
{
xFactory->acquire();
pRet = xFactory.get();
}
}
-
+
return pRet;
-}
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
index ad3b0efe8747..2844d25e3def 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.java
+++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java/ProtocolHandlerAddon.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.XComponentContext;
@@ -42,12 +42,12 @@ import com.sun.star.lang.XInitialization;
import com.sun.star.lang.XTypeProvider;
import com.sun.star.lang.XServiceInfo;
import com.sun.star.uno.Type;
-import com.sun.star.frame.XStatusListener;
-import com.sun.star.frame.XDispatchProvider;
-import com.sun.star.frame.XDispatch;
-import com.sun.star.frame.XModel;
-import com.sun.star.frame.XFrame;
-import com.sun.star.frame.DispatchDescriptor;
+import com.sun.star.frame.XStatusListener;
+import com.sun.star.frame.XDispatchProvider;
+import com.sun.star.frame.XDispatch;
+import com.sun.star.frame.XModel;
+import com.sun.star.frame.XFrame;
+import com.sun.star.frame.DispatchDescriptor;
import com.sun.star.awt.XToolkit;
import com.sun.star.awt.XWindowPeer;
import com.sun.star.awt.XMessageBox;
@@ -62,14 +62,14 @@ public class ProtocolHandlerAddon {
*/
public static class ProtocolHandlerAddonImpl extends WeakBase implements
XDispatchProvider,
- XDispatch,
+ XDispatch,
XInitialization,
XServiceInfo {
/** The service name, that must be used to get an instance of this service.
*/
static private final String[] m_serviceNames = { "com.sun.star.frame.ProtocolHandler" };
-
+
/** The component context, that gives access to the service manager and all registered services.
*/
private XComponentContext m_xCmpCtx;
@@ -83,7 +83,7 @@ public class ProtocolHandlerAddon {
private XFrame m_xFrame;
private XStatusListener m_xStatusListener;
-
+
/** The constructor of the inner class has a XMultiServiceFactory parameter.
* @param xmultiservicefactoryInitialization A special service factory
* could be introduced while initializing.
@@ -91,7 +91,7 @@ public class ProtocolHandlerAddon {
public ProtocolHandlerAddonImpl( XComponentContext xComponentContext ) {
m_xCmpCtx = xComponentContext;
}
-
+
/** This method is a member of the interface for initializing an object
* directly after its creation.
* @param object This array of arbitrary objects will be passed to the
@@ -114,7 +114,7 @@ public class ProtocolHandlerAddon {
m_xCmpCtx.getServiceManager().createInstanceWithContext("com.sun.star.awt.Toolkit",
m_xCmpCtx));
}
-
+
/** This method returns an array of all supported service names.
* @return Array of supported service names.
*/
@@ -125,7 +125,7 @@ public class ProtocolHandlerAddon {
public static String[] getServiceNames() {
return m_serviceNames;
}
-
+
/** This method returns true, if the given service will be
* supported by the component.
* @param stringService Service name.
@@ -133,22 +133,22 @@ public class ProtocolHandlerAddon {
*/
public boolean supportsService( String sService ) {
int len = m_serviceNames.length;
-
+
for( int i=0; i < len; i++) {
if ( sService.equals( m_serviceNames[i] ) )
return true;
}
-
+
return false;
}
-
+
/** Return the class name of the component.
* @return Class name of the component.
*/
public String getImplementationName() {
return ProtocolHandlerAddonImpl.class.getName();
}
-
+
// XDispatchProvider
public XDispatch queryDispatch( /*IN*/com.sun.star.util.URL aURL,
/*IN*/String sTargetFrameName,
@@ -164,23 +164,23 @@ public class ProtocolHandlerAddon {
}
return xRet;
}
-
+
public XDispatch[] queryDispatches( /*IN*/DispatchDescriptor[] seqDescripts ) {
int nCount = seqDescripts.length;
XDispatch[] lDispatcher = new XDispatch[nCount];
-
+
for( int i=0; i<nCount; ++i )
lDispatcher[i] = queryDispatch( seqDescripts[i].FeatureURL,
seqDescripts[i].FrameName,
seqDescripts[i].SearchFlags );
-
- return lDispatcher;
+
+ return lDispatcher;
}
// XDispatch
public void dispatch( /*IN*/com.sun.star.util.URL aURL,
/*IN*/com.sun.star.beans.PropertyValue[] aArguments ) {
-
+
if ( aURL.Protocol.compareTo("org.openoffice.Office.addon.example:") == 0 )
{
if ( aURL.Path.compareTo( "Function1" ) == 0 )
@@ -197,11 +197,11 @@ public class ProtocolHandlerAddon {
}
}
}
-
+
public void addStatusListener( /*IN*/XStatusListener xControl,
/*IN*/com.sun.star.util.URL aURL ) {
}
-
+
public void removeStatusListener( /*IN*/XStatusListener xControl,
/*IN*/com.sun.star.util.URL aURL ) {
}
@@ -221,7 +221,7 @@ public class ProtocolHandlerAddon {
aDescriptor.WindowAttributes = WindowAttribute.BORDER |
WindowAttribute.MOVEABLE |
WindowAttribute.CLOSEABLE;
-
+
XWindowPeer xPeer = m_xToolkit.createWindow( aDescriptor );
if ( null != xPeer ) {
XMessageBox xMsgBox = (XMessageBox)UnoRuntime.queryInterface(
@@ -235,12 +235,12 @@ public class ProtocolHandlerAddon {
}
}
} catch ( com.sun.star.uno.Exception e) {
- // do your error handling
+ // do your error handling
}
}
}
-
-
+
+
/** Gives a factory for creating the service.
* This method is called by the <code>JavaLoader</code>
* <p>
@@ -256,14 +256,14 @@ public class ProtocolHandlerAddon {
*/
public static XSingleComponentFactory __getComponentFactory( String sImplementationName ) {
XSingleComponentFactory xFactory = null;
-
+
if ( sImplementationName.equals( ProtocolHandlerAddonImpl.class.getName() ) )
xFactory = Factory.createComponentFactory(ProtocolHandlerAddonImpl.class,
ProtocolHandlerAddonImpl.getServiceNames());
-
+
return xFactory;
}
-
+
/** Writes the service information into the given registry key.
* This method is called by the <code>JavaLoader</code>.
* @return returns true if the operation succeeded
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/TestCppComponent.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/TestCppComponent.cxx
index c377cdb1ebb7..31436a26e7ed 100644
--- a/odk/examples/DevelopersGuide/Components/CppComponent/TestCppComponent.cxx
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/TestCppComponent.cxx
@@ -3,7 +3,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.
*
@@ -30,7 +30,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.
- *
+ *
*************************************************************************/
#include <stdio.h>
@@ -52,7 +52,7 @@ SAL_IMPLEMENT_MAIN()
try
{
// get the remote office component context
- Reference< XComponentContext > xContext( ::cppu::bootstrap() );
+ Reference< XComponentContext > xContext( ::cppu::bootstrap() );
fprintf(stdout, "\nconnected to a running office...\n");
// create a new instance of MyService1
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
index 23c2cd4a38c9..a6933ce63304 100644
--- a/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
@@ -3,7 +3,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.
*
@@ -30,7 +30,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.
- *
+ *
*************************************************************************/
#include <osl/interlck.h>
@@ -63,7 +63,7 @@ OUString SAL_CALL getImplementationName_MyService1Impl()
"my_module.my_sc_implementation.MyService1") );
}
-
+
class MyService1Impl
: public ::my_module::XSomething
, public lang::XServiceInfo
@@ -81,7 +81,7 @@ public:
{}
virtual ~MyService1Impl() {}
-
+
// XInterface
virtual Any SAL_CALL queryInterface( Type const & type )
throw (RuntimeException);
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
index 81401ede482b..5ed74abbc710 100644
--- a/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
@@ -3,7 +3,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.
*
@@ -30,7 +30,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.
- *
+ *
*************************************************************************/
#include <cppuhelper/implbase3.hxx> // "3" implementing three interfaces
@@ -56,7 +56,7 @@ extern OUString SAL_CALL getImplementationName_MyService1Impl();
extern Reference< XInterface > SAL_CALL create_MyService1Impl(
Reference< XComponentContext > const & xContext )
SAL_THROW( () );
-
+
static Sequence< OUString > getSupportedServiceNames_MyService2Impl()
{
Sequence<OUString> names(1);
@@ -69,7 +69,7 @@ static OUString getImplementationName_MyService2Impl()
return OUString( RTL_CONSTASCII_USTRINGPARAM(
"my_module.my_sc_implementation.MyService2") );
}
-
+
class MyService2Impl : public ::cppu::WeakImplHelper3<
::my_module::XSomething, lang::XServiceInfo, lang::XInitialization >
{
@@ -86,7 +86,7 @@ public:
// focus on three given interfaces,
// no need to implement XInterface, XTypeProvider, XWeak
-
+
// XInitialization will be called upon
// createInstanceWithArguments[AndContext]()
virtual void SAL_CALL initialize( Sequence< Any > const & args )
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/some.idl b/odk/examples/DevelopersGuide/Components/CppComponent/some.idl
index 342f03560a93..d08cc64318c6 100644
--- a/odk/examples/DevelopersGuide/Components/CppComponent/some.idl
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/some.idl
@@ -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.
- *
+ *
*************************************************************************/
#include <com/sun/star/uno/XInterface.idl>
@@ -46,7 +46,7 @@ module my_module
service MyService1 : XSomething;
- service MyService2 : XSomething
+ service MyService2 : XSomething
{
create([in]string sArgument)
raises (::com::sun::star::lang::IllegalArgumentException);
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/SomethingA.idl b/odk/examples/DevelopersGuide/Components/JavaComponent/SomethingA.idl
index a98a3047dba6..769a03e58852 100644
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/SomethingA.idl
+++ b/odk/examples/DevelopersGuide/Components/JavaComponent/SomethingA.idl
@@ -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,18 +29,18 @@
* 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.
- *
+ *
*************************************************************************/
#ifndef INCLUDED_COM_SUN_STAR_TEST_SOMETHINGA_IDL
#define INCLUDED_COM_SUN_STAR_TEST_SOMETHINGA_IDL
-
+
#include <XSomethingA.idl>
module com { module sun { module star { module test {
service SomethingA: XSomethingA;
-}; }; }; };
-
-#endif
-
-
+}; }; }; };
+
+#endif
+
+
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/SomethingB.idl b/odk/examples/DevelopersGuide/Components/JavaComponent/SomethingB.idl
index 0281ba751794..0a6bd9444fa9 100644
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/SomethingB.idl
+++ b/odk/examples/DevelopersGuide/Components/JavaComponent/SomethingB.idl
@@ -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,18 +29,18 @@
* 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.
- *
+ *
*************************************************************************/
#ifndef INCLUDED_COM_SUN_STAR_TEST_SOMETHINGB_IDL
#define INCLUDED_COM_SUN_STAR_TEST_SOMETHINGB_IDL
-#include <XSomethingB.idl>
+#include <XSomethingB.idl>
module com { module sun { module star { module test {
service SomethingB : XSomethingB;
-}; }; }; };
-
-#endif
-
-
+}; }; }; };
+
+#endif
+
+
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentA.java b/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentA.java
index 540328e2bff2..ed81b0f707cc 100644
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentA.java
+++ b/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentA.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.lang.XMultiServiceFactory;
import com.sun.star.lib.uno.helper.WeakBase;
@@ -42,7 +42,7 @@ public class TestComponentA extends WeakBase implements XServiceInfo, XSomething
static final String __serviceName= "com.sun.star.test.SomethingA";
static byte[] _implementationId;
-
+
public TestComponentA() {
}
@@ -57,7 +57,7 @@ public class TestComponentA extends WeakBase implements XServiceInfo, XSomething
}
// XServiceInfo
public boolean supportsService( /*IN*/String serviceName ) {
- if ( serviceName.equals( __serviceName))
+ if ( serviceName.equals( __serviceName))
return true;
return false;
}
@@ -67,5 +67,5 @@ public class TestComponentA extends WeakBase implements XServiceInfo, XSomething
retValue[0]= __serviceName;
return retValue;
}
-
+
}
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentB.java b/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentB.java
index 006cdceedb2c..848c9b45795d 100644
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentB.java
+++ b/odk/examples/DevelopersGuide/Components/JavaComponent/TestComponentB.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.XComponentContext;
import com.sun.star.lang.XTypeProvider;
@@ -51,7 +51,7 @@ public class TestComponentB implements XTypeProvider, XServiceInfo, XSomethingB
this.context= context;
this.args= args;
}
-
+
// XSomethingB
public String methodTwo(String val) {
if (args.length > 0 && args[0] instanceof String )
@@ -87,7 +87,7 @@ public class TestComponentB implements XTypeProvider, XServiceInfo, XSomethingB
// XServiceInfo
public boolean supportsService( /*IN*/String serviceName ) {
- if ( serviceName.equals( __serviceName))
+ if ( serviceName.equals( __serviceName))
return true;
return false;
}
@@ -96,5 +96,5 @@ public class TestComponentB implements XTypeProvider, XServiceInfo, XSomethingB
String[] retValue= new String[0];
retValue[0]= __serviceName;
return retValue;
- }
+ }
}
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/TestJavaComponent.java b/odk/examples/DevelopersGuide/Components/JavaComponent/TestJavaComponent.java
index ab07ccc4564e..50fff36ba0b1 100644
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/TestJavaComponent.java
+++ b/odk/examples/DevelopersGuide/Components/JavaComponent/TestJavaComponent.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.XComponentContext;
import com.sun.star.comp.helper.Bootstrap;
@@ -43,13 +43,13 @@ import com.sun.star.container.XSet;
// sample starbasic code, you can execute it after you have connected to the office.
// Sub Main
-// o = createUnoService( "com.sun.star.test.SomethingB" )
-// msgbox o.methodOne( "from the office !" )
+// o = createUnoService( "com.sun.star.test.SomethingB" )
+// msgbox o.methodOne( "from the office !" )
// End Sub
public class TestJavaComponent
{
-
+
public static void insertIntoServiceManager(
XMultiComponentFactory serviceManager, Object singleFactory )
throws com.sun.star.uno.Exception
@@ -64,14 +64,14 @@ public class TestJavaComponent
{
XSet set = (XSet ) UnoRuntime.queryInterface( XSet.class, serviceManager );
set.remove( singleFactory );
-
+
}
-
+
public static void main(String[] args) throws java.lang.Exception
{
try {
boolean bLocal = false;
-
+
XMultiComponentFactory xUsedServiceManager = null;
XComponentContext xUsedComponentContext = null;
@@ -79,22 +79,22 @@ public class TestJavaComponent
{
XComponentContext xLocalComponentContext =
Bootstrap.createInitialComponentContext( null );
-
+
// initial serviceManager
XMultiComponentFactory xLocalServiceManager =
xLocalComponentContext.getServiceManager();
-
+
bLocal = true;
xUsedServiceManager = xLocalServiceManager;
xUsedComponentContext = xLocalComponentContext;
-
+
System.out.println( "Using local servicemanager" );
- } else {
+ } else {
// get the remote office component context
xUsedComponentContext =
com.sun.star.comp.helper.Bootstrap.bootstrap();
System.out.println("Connected to a running office ...");
-
+
xUsedServiceManager = xUsedComponentContext.getServiceManager();
System.out.println( "Using remote servicemanager" );
}
@@ -102,7 +102,7 @@ public class TestJavaComponent
if ( xUsedServiceManager == null )
{
System.out.println( "ERROR: no service manager" );
- System.exit(0);
+ System.exit(0);
}
Object factory = new Object();
@@ -111,23 +111,23 @@ public class TestJavaComponent
// retrieve the factory for the component implementation
factory = TestServiceProvider.__getServiceFactory(
"TestComponentB", null, null);
-
+
// insert the factory into the local servicemanager
// From now on, the service can be instantiated !
insertIntoServiceManager( xUsedServiceManager, factory );
- }
-
+ }
+
XSomethingB xSomethingB = SomethingB.create(xUsedComponentContext);
-
+
// and call the test method.
String s= xSomethingB.methodTwo("Hello World!");
System.out.println(s);
-
+
if ( bLocal )
{
- // remove it again from the servicemanager,
+ // remove it again from the servicemanager,
removeFromServiceManager( xUsedServiceManager, factory );
- }
+ }
}
catch ( Exception e )
@@ -138,6 +138,6 @@ public class TestJavaComponent
}
// quit, even when a remote bridge is running
- System.exit(0);
+ System.exit(0);
}
}
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java b/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
index dee8899510e4..1653a76594bf 100644
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
+++ b/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.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.lang.XMultiServiceFactory;
import com.sun.star.lang.XSingleServiceFactory;
@@ -49,14 +49,14 @@ public class TestServiceProvider
if (implName.equals( TestComponentA.class.getName()) )
xSingleServiceFactory = FactoryHelper.getServiceFactory(
TestComponentA.class, TestComponentA.__serviceName,
- multiFactory, regKey);
+ multiFactory, regKey);
else if (implName.equals(TestComponentB.class.getName()))
xSingleServiceFactory= FactoryHelper.getServiceFactory(
TestComponentB.class, TestComponentB.__serviceName,
multiFactory, regKey);
return xSingleServiceFactory;
}
-
+
public static boolean __writeRegistryServiceInfo(XRegistryKey regKey){
boolean bregA= FactoryHelper.writeRegistryServiceInfo(
TestComponentA.class.getName(),
@@ -65,7 +65,7 @@ public class TestServiceProvider
TestComponentB.class.getName(),
TestComponentB.__serviceName, regKey);
return bregA && bregB;
- }
+ }
}
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/XSomethingA.idl b/odk/examples/DevelopersGuide/Components/JavaComponent/XSomethingA.idl
index f353cd3c7d98..15096be85138 100644
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/XSomethingA.idl
+++ b/odk/examples/DevelopersGuide/Components/JavaComponent/XSomethingA.idl
@@ -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,20 +29,20 @@
* 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.
- *
+ *
*************************************************************************/
#ifndef INCLUDED_COM_SUN_STAR_TEST_XSOMETHINGA_IDL
#define INCLUDED_COM_SUN_STAR_TEST_XSOMETHINGA_IDL
-
-#include <com/sun/star/uno/XInterface.idl>
+
+#include <com/sun/star/uno/XInterface.idl>
module com { module sun { module star { module test {
- interface XSomethingA {
+ interface XSomethingA {
string methodOne([in]string value);
- };
-}; }; }; };
-
-#endif
-
-
+ };
+}; }; }; };
+
+#endif
+
+
diff --git a/odk/examples/DevelopersGuide/Components/JavaComponent/XSomethingB.idl b/odk/examples/DevelopersGuide/Components/JavaComponent/XSomethingB.idl
index a06532c3ad48..c328bafd2e1e 100644
--- a/odk/examples/DevelopersGuide/Components/JavaComponent/XSomethingB.idl
+++ b/odk/examples/DevelopersGuide/Components/JavaComponent/XSomethingB.idl
@@ -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,20 +29,20 @@
* 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.
- *
+ *
*************************************************************************/
#ifndef INCLUDED_COM_SUN_STAR_TEST_XSOMETHINGB_IDL
#define INCLUDED_COM_SUN_STAR_TEST_XSOMETHINGB_IDL
-
-#include <com/sun/star/uno/XInterface.idl>
+
+#include <com/sun/star/uno/XInterface.idl>
module com { module sun { module star { module test {
- interface XSomethingB {
+ interface XSomethingB {
string methodTwo([in]string value);
- };
-}; }; }; };
-
-#endif
-
-
+ };
+}; }; }; };
+
+#endif
+
+
diff --git a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.idl b/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.idl
index f93cb2279358..6f42dd8e0b02 100644
--- a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.idl
+++ b/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.idl
@@ -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,22 +29,22 @@
* 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.
- *
+ *
*************************************************************************/
-#ifndef _org_openoffice_LicenseTest_idl_
-#define _org_openoffice_LicenseTest_idl_
-
-#include <com/sun/star/lang/XServiceInfo.idl>
-
+#ifndef _org_openoffice_LicenseTest_idl_
+#define _org_openoffice_LicenseTest_idl_
+
+#include <com/sun/star/lang/XServiceInfo.idl>
+
// org
module org {
// openoffice
module openoffice {
// example service, XServiceInfo is implemented here for demonstration
- // issues. XServiceInfo must be implemented by all components.
+ // issues. XServiceInfo must be implemented by all components.
service LicenseTest: ::com::sun::star::lang::XServiceInfo;
};
};
-#endif
+#endif
diff --git a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java b/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java
index 211638c46c58..37ad00c593a6 100644
--- a/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.java
+++ b/odk/examples/DevelopersGuide/Components/SimpleLicense/LicenseTest.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.lib.uno.helper.Factory;
@@ -59,7 +59,7 @@ public class LicenseTest {
*/
static private final String __serviceName =
"org.openoffice.LicenseTest";
-
+
/** The initial component contextr, that gives access to
* the service manager, supported singletons, ...
* It's often later used
@@ -70,7 +70,7 @@ public class LicenseTest {
* It's often later used
*/
private XMultiComponentFactory m_xMCF;
-
+
/** The constructor of the inner class has a XMultiServiceFactory parameter.
* @param xmultiservicefactoryInitialization A special service factory
* could be introduced while initializing.
@@ -78,13 +78,13 @@ public class LicenseTest {
public _LicenseTest(XComponentContext xCompContext) {
try {
m_cmpCtx = xCompContext;
- m_xMCF = m_cmpCtx.getServiceManager();
+ m_xMCF = m_cmpCtx.getServiceManager();
}
catch( Exception e ) {
e.printStackTrace();
}
}
-
+
/** This method returns an array of all supported service names.
* @return Array of supported service names.
*/
@@ -100,7 +100,7 @@ public class LicenseTest {
String[] sSupportedServiceNames = { __serviceName };
return sSupportedServiceNames;
}
-
+
/** This method returns true, if the given service will be
* supported by the component.
* @param sServiceName Service name.
@@ -109,16 +109,16 @@ public class LicenseTest {
public boolean supportsService( String sServiceName ) {
return sServiceName.equals( __serviceName );
}
-
+
/** Return the class name of the component.
* @return Class name of the component.
*/
public String getImplementationName() {
return _LicenseTest.class.getName();
- }
+ }
}
-
-
+
+
/**
* Gives a factory for creating the service.
* This method is called by the <code>JavaLoader</code>
@@ -132,11 +132,11 @@ public class LicenseTest {
public static XSingleComponentFactory __getComponentFactory(String sImplName)
{
XSingleComponentFactory xFactory = null;
-
+
if ( sImplName.equals( _LicenseTest.class.getName() ) )
xFactory = Factory.createComponentFactory(_LicenseTest.class,
_LicenseTest.getServiceNames());
-
+
return xFactory;
}
@@ -167,5 +167,5 @@ public class LicenseTest {
* your component using these objects.
*/
}
-
+
}
diff --git a/odk/examples/DevelopersGuide/Components/SimpleLicense/description.xml b/odk/examples/DevelopersGuide/Components/SimpleLicense/description.xml
index aa465ab8d288..aef2e4d71970 100644
--- a/odk/examples/DevelopersGuide/Components/SimpleLicense/description.xml
+++ b/odk/examples/DevelopersGuide/Components/SimpleLicense/description.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="http://openoffice.org/extensions/description/2006"
xmlns:xlink="http://www.w3.org/1999/xlink">
-
+
<registration>
<simple-license accept-by="admin" default-license-id="de">
<license-text xlink:href="registration/license_de.txt" lang="de" license-id="de" />
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java
index 7fe4307d8a80..8a5f13a38a15 100644
--- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.java
+++ b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/ImageShrink.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.
- *
+ *
*************************************************************************/
package org.openoffice.comp.test;
@@ -53,13 +53,13 @@ import com.sun.star.registry.XRegistryKey;
import com.sun.star.comp.loader.FactoryHelper;
import com.sun.star.lib.uno.helper.WeakBase;
-public class ImageShrink extends WeakBase
+public class ImageShrink extends WeakBase
implements com.sun.star.lang.XServiceInfo,
org.openoffice.test.XImageShrinkFilter {
com.sun.star.uno.XComponentContext xComponentContext = null;
-
+
// maintain a static implementation id for all instances of ImageShrink
// initialized by the first call to getImplementationId()
static byte[] _implementationId;
@@ -67,8 +67,8 @@ public class ImageShrink extends WeakBase
// hold the service name in a private static member variable of the class
protected static final String __serviceName = "org.openoffice.test.ImageShrink";
-
-
+
+
String destDir = "";
String sourceDir = "";
boolean cancel = false;
@@ -83,7 +83,7 @@ public class ImageShrink extends WeakBase
public static XSingleServiceFactory __getServiceFactory(String implName,
XMultiServiceFactory multiFactory,
com.sun.star.registry.XRegistryKey regKey) {
-
+
com.sun.star.lang.XSingleServiceFactory xSingleServiceFactory = null;
if (implName.equals( ImageShrink.class.getName()) )
xSingleServiceFactory = FactoryHelper.getServiceFactory( ImageShrink.class,
@@ -92,25 +92,25 @@ public class ImageShrink extends WeakBase
regKey);
return xSingleServiceFactory;
- }
+ }
public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
//System.out.println(ImageShrink.class.getName());
return FactoryHelper.writeRegistryServiceInfo( ImageShrink.class.getName(),
__serviceName,
regKey);
- }
-
+ }
+
// XFilter implementation (a sub-interface of XImageShrinkFilter)
public void cancel() {
cancel = true;
}
-
+
public boolean filter(com.sun.star.beans.PropertyValue[] propertyValue) {
- // while cancel = false,
- // scale images found in sourceDir according to dimension and
- // write them to destDir, using the image file format given in
-
-
+ // while cancel = false,
+ // scale images found in sourceDir according to dimension and
+ // write them to destDir, using the image file format given in
+
+
// []propertyValue
return true;
}
@@ -119,23 +119,23 @@ public class ImageShrink extends WeakBase
public String getDestinationDirectory() {
return destDir;
}
-
+
public com.sun.star.awt.Size getDimension() {
return dimension;
}
-
+
public String getSourceDirectory() {
return sourceDir;
}
-
+
public void setDestinationDirectory(String str) {
destDir = str;
}
-
+
public void setDimension(com.sun.star.awt.Size size) {
dimension = size;
}
-
+
public void setSourceDirectory(String str) {
sourceDir = str;
}
@@ -146,13 +146,13 @@ public class ImageShrink extends WeakBase
}
public boolean supportsService(String serviceName) {
- if ( serviceName.equals( __serviceName))
+ if ( serviceName.equals( __serviceName))
return true;
return false;
}
public String[] getSupportedServiceNames( ) {
return new String[] { __serviceName };
- }
-
+ }
+
}
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Thumbs.java b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Thumbs.java
index 3ef79b89e9c0..7dbc23fc9f68 100644
--- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Thumbs.java
+++ b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/comp/test/Thumbs.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.
- *
+ *
*************************************************************************/
package org.openoffice.comp.test;
@@ -41,7 +41,7 @@ import com.sun.star.uno.UnoRuntime;
* Note: the image shrink functionality is not implemented
*/
public class Thumbs {
-
+
/**
* @param args the command line arguments
*/
@@ -57,13 +57,13 @@ public class Thumbs {
// new ImageShrink object
org.openoffice.test.XImageShrinkFilter xImageShrinkFilter =
org.openoffice.test.ImageShrink.create(xRemoteContext);
-
+
System.out.println("ImageShrink component succesfully instantiated");
- java.io.File f = new java.io.File(".");
- System.out.println("set SourceDrectory ...");
+ java.io.File f = new java.io.File(".");
+ System.out.println("set SourceDrectory ...");
xImageShrinkFilter.setSourceDirectory(f.getCanonicalPath());
-
+
System.out.println("source Directory = "
+ xImageShrinkFilter.getSourceDirectory());
}
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/ImageShrink.idl b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/ImageShrink.idl
index b891982f5133..56f89f0ea42c 100644
--- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/ImageShrink.idl
+++ b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/ImageShrink.idl
@@ -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.
- *
+ *
*************************************************************************/
#ifndef _org_openoffice_test_ImageShrink_idl_
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/XImageShrink.idl b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/XImageShrink.idl
index 361e9914e10e..8b00132112a5 100644
--- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/XImageShrink.idl
+++ b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/XImageShrink.idl
@@ -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.
- *
+ *
*************************************************************************/
#ifndef _org_openoffice_test_XImageShrink_idl_
@@ -41,7 +41,7 @@
module org { module openoffice { module test {
interface XImageShrink {
-
+
[attribute] string SourceDirectory;
[attribute] string DestinationDirectory;
[attribute] com::sun::star::awt::Size Dimension;
diff --git a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/XImageShrinkFilter.idl b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/XImageShrinkFilter.idl
index 18a59aa667c4..23bbacb23f49 100644
--- a/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/XImageShrinkFilter.idl
+++ b/odk/examples/DevelopersGuide/Components/Thumbs/org/openoffice/test/XImageShrinkFilter.idl
@@ -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.
- *
+ *
*************************************************************************/
#ifndef _org_openoffice_test_XImageShrinkFilter_idl_
diff --git a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java
index f7ad9ad4b7c8..ba5c168672b6 100644
--- a/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.java
+++ b/odk/examples/DevelopersGuide/Components/dialogcomponent/DialogComponent.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,11 +29,11 @@
* 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.Type;
-import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
import com.sun.star.registry.XRegistryKey;
import com.sun.star.lang.XTypeProvider;
@@ -61,7 +61,7 @@ import com.sun.star.awt.WindowAttribute;
import com.sun.star.awt.WindowClass;
import com.sun.star.awt.WindowDescriptor;
import com.sun.star.awt.Rectangle;
-
+
import com.sun.star.test.XTestDialogHandler;
// DialogComponent implements all necessary interfaces self, this is only
@@ -69,15 +69,15 @@ import com.sun.star.test.XTestDialogHandler;
// ComponentBase, see implementation of TestComponentA.
public class DialogComponent {
- // public static class _DialogComponent extends WeakBase
+ // public static class _DialogComponent extends WeakBase
public static class _DialogComponent
implements XTypeProvider, XServiceInfo, XTestDialogHandler, XDialogEventHandler {
static final String __serviceName= "com.sun.star.test.TestDialogHandler";
-
+
static byte[] _implementationId;
private XComponentContext m_xCmpCtx;
-
+
private XFrame m_xFrame;
private XToolkit m_xToolkit;
@@ -89,17 +89,17 @@ public class DialogComponent {
m_xToolkit = (XToolkit) UnoRuntime.queryInterface(
XToolkit.class,
m_xCmpCtx.getServiceManager().createInstanceWithContext("com.sun.star.awt.Toolkit",
- m_xCmpCtx));
+ m_xCmpCtx));
}
catch (Exception e) {
e.printStackTrace();
}
}
-
+
// XTestDialogHandler
public String createDialog( String DialogURL, XModel xModel, XFrame xFrame ) {
m_xFrame = xFrame;
-
+
try {
XMultiComponentFactory xMCF = m_xCmpCtx.getServiceManager();
Object obj;
@@ -108,7 +108,7 @@ public class DialogComponent {
if( xModel != null ) {
Object[] args = new Object[1];
args[0] = xModel;
-
+
obj = xMCF.createInstanceWithArgumentsAndContext(
"com.sun.star.awt.DialogProvider2", args, m_xCmpCtx );
}
@@ -119,7 +119,7 @@ public class DialogComponent {
XDialogProvider2 xDialogProvider = (XDialogProvider2)
UnoRuntime.queryInterface( XDialogProvider2.class, obj );
-
+
XDialog xDialog = xDialogProvider.createDialogWithHandler( DialogURL, this );
if( xDialog != null )
xDialog.execute();
@@ -129,13 +129,13 @@ public class DialogComponent {
}
return "Created dialog \"" + DialogURL + "\"";
}
-
+
public void copyText( XDialog xDialog, Object aEventObject ) {
XControlContainer xControlContainer = (XControlContainer)UnoRuntime.queryInterface(
XControlContainer.class, xDialog );
String aTextPropertyStr = "Text";
String aText = "";
- XControl xTextField1Control = xControlContainer.getControl( "TextField1" );
+ XControl xTextField1Control = xControlContainer.getControl( "TextField1" );
XControlModel xControlModel1 = xTextField1Control.getModel();
XPropertySet xPropertySet1 = (XPropertySet)UnoRuntime.queryInterface(
XPropertySet.class, xControlModel1 );
@@ -146,8 +146,8 @@ public class DialogComponent {
catch (Exception e) {
e.printStackTrace();
}
-
- XControl xTextField2Control = xControlContainer.getControl( "TextField2" );
+
+ XControl xTextField2Control = xControlContainer.getControl( "TextField2" );
XControlModel xControlModel2 = xTextField2Control.getModel();
XPropertySet xPropertySet2 = (XPropertySet)UnoRuntime.queryInterface(
XPropertySet.class, xControlModel2 );
@@ -165,7 +165,7 @@ public class DialogComponent {
public void handleEvent() {
showMessageBox( "DialogComponent", "handleEvent() called" );
}
-
+
public void handleEventWithArguments( XDialog xDialog, Object aEventObject ) {
showMessageBox( "DialogComponent", "handleEventWithArguments() called\n\n" +
"Event Object = " + aEventObject );
@@ -236,7 +236,7 @@ public class DialogComponent {
String[] sSupportedServiceNames = { __serviceName };
return sSupportedServiceNames;
}
-
+
//XServiceInfo
public String[] getSupportedServiceNames() {
return getServiceNames();
@@ -246,12 +246,12 @@ public class DialogComponent {
public boolean supportsService( String sServiceName ) {
return sServiceName.equals( __serviceName );
}
-
+
//XServiceInfo
public String getImplementationName() {
// return DialogComponent.class.getName();
return _DialogComponent.class.getName();
- }
+ }
public void showMessageBox(String sTitle, String sMessage) {
try {
@@ -268,7 +268,7 @@ public class DialogComponent {
aDescriptor.WindowAttributes = WindowAttribute.BORDER |
WindowAttribute.MOVEABLE |
WindowAttribute.CLOSEABLE;
-
+
XWindowPeer xPeer = m_xToolkit.createWindow( aDescriptor );
if ( null != xPeer ) {
XMessageBox xMsgBox = (XMessageBox)UnoRuntime.queryInterface(
@@ -282,9 +282,9 @@ public class DialogComponent {
}
}
} catch ( com.sun.star.uno.Exception e) {
- // do your error handling
+ // do your error handling
}
- }
+ }
}
/**
@@ -300,11 +300,11 @@ public class DialogComponent {
public static XSingleComponentFactory __getComponentFactory(String sImplName)
{
XSingleComponentFactory xFactory = null;
-
+
if ( sImplName.equals( _DialogComponent.class.getName() ) )
xFactory = Factory.createComponentFactory(_DialogComponent.class,
_DialogComponent.getServiceNames());
-
+
return xFactory;
}
diff --git a/odk/examples/DevelopersGuide/Components/dialogcomponent/TestDialogHandler.idl b/odk/examples/DevelopersGuide/Components/dialogcomponent/TestDialogHandler.idl
index 7196b173b4fa..b465d8c6da11 100644
--- a/odk/examples/DevelopersGuide/Components/dialogcomponent/TestDialogHandler.idl
+++ b/odk/examples/DevelopersGuide/Components/dialogcomponent/TestDialogHandler.idl
@@ -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.
- *
+ *
*************************************************************************/
#ifndef INCLUDED_COM_SUN_STAR_TEST_TESTDIALOGHANDLER_IDL
#define INCLUDED_COM_SUN_STAR_TEST_TESTDIALOGHANDLER_IDL
@@ -43,5 +43,5 @@ module com { module sun { module star { module test {
#endif
-
-
+
+
diff --git a/odk/examples/DevelopersGuide/Components/dialogcomponent/XTestDialogHandler.idl b/odk/examples/DevelopersGuide/Components/dialogcomponent/XTestDialogHandler.idl
index aa968917d5c9..5952d314ec8d 100644
--- a/odk/examples/DevelopersGuide/Components/dialogcomponent/XTestDialogHandler.idl
+++ b/odk/examples/DevelopersGuide/Components/dialogcomponent/XTestDialogHandler.idl
@@ -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,25 +29,25 @@
* 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.
- *
+ *
*************************************************************************/
#ifndef INCLUDED_COM_SUN_STAR_TEST_XTESTDIALOGHANDLER_IDL
#define INCLUDED_COM_SUN_STAR_TEST_XTESTDIALOGHANDLER_IDL
-
-#include <com/sun/star/uno/XInterface.idl>
-#include <com/sun/star/awt/XDialog.idl>
+
+#include <com/sun/star/uno/XInterface.idl>
+#include <com/sun/star/awt/XDialog.idl>
#include <com/sun/star/frame/XModel.idl>
#include <com/sun/star/frame/XFrame.idl>
module com { module sun { module star { module test {
- interface XTestDialogHandler {
+ interface XTestDialogHandler {
string createDialog( [in] string DialogURL, [in] ::com::sun::star::frame::XModel xModel,
[in] ::com::sun::star::frame::XFrame xFrame );
void copyText( [in] ::com::sun::star::awt::XDialog xDialog, [in] any aEventObject );
- void handleEvent();
- void handleEventWithArguments( [in] ::com::sun::star::awt::XDialog xDialog, [in] any aEventObject );
- };
-}; }; }; };
-
+ void handleEvent();
+ void handleEventWithArguments( [in] ::com::sun::star::awt::XDialog xDialog, [in] any aEventObject );
+ };
+}; }; }; };
+
#endif