You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ms...@apache.org on 2021/04/07 21:27:15 UTC
[openoffice] branch trunk updated: Fixed links to Wiki,
removed whitespace
This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push:
new 3ba931c Fixed links to Wiki, removed whitespace
3ba931c is described below
commit 3ba931c7b289231465bd294c78fdff3ecdd8cb31
Author: mseidel <ms...@apache.org>
AuthorDate: Wed Apr 7 23:26:42 2021 +0200
Fixed links to Wiki, removed whitespace
---
.../Addons/ProtocolHandlerAddon_cpp/component.cxx | 29 +++++++--------
.../JavaComponent/TestServiceProvider.java | 18 +++++-----
.../AsciiFilter/AsciiReplaceFilter.java | 3 +-
.../java/MinimalComponent/MinimalComponent.java | 41 +++++++++++-----------
4 files changed, 47 insertions(+), 44 deletions(-)
diff --git a/main/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx b/main/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx
index f0895bf..3aa6dd3 100644
--- a/main/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx
+++ b/main/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -33,13 +33,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 ####################################################################################
@@ -63,7 +63,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnviron
*/
// This method not longer necessary since OOo 3.4 where the component registration was
// was changed to passive component registration. For more details see
-// http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+// https://wiki.openoffice.org/wiki/Passive_Component_Registration
//
// extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(void * pServiceManager, void * pRegistryKey)
// {
@@ -76,13 +76,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnviron
// 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 &)
@@ -99,12 +99,12 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnviron
* @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" SAL_DLLPUBLIC_EXPORT 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(
@@ -112,13 +112,14 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const sal_C
OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) ),
Addon_createInstance,
Addon_getSupportedServiceNames() ) );
-
+
if (xFactory.is())
{
xFactory->acquire();
pRet = xFactory.get();
}
}
-
+
return pRet;
-}
+}
+
diff --git a/main/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java b/main/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
index fb1a4ca..a4f3e34 100644
--- a/main/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
+++ b/main/odk/examples/DevelopersGuide/Components/JavaComponent/TestServiceProvider.java
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,19 +7,20 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
+
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.lang.XSingleServiceFactory;
import com.sun.star.registry.XRegistryKey;
@@ -38,17 +39,17 @@ 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;
}
-
+
// This method not longer necessary since OOo 3.4 where the component registration
// was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+ // https://wiki.openoffice.org/wiki/Passive_Component_Registration
// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey){
// boolean bregA= FactoryHelper.writeRegistryServiceInfo(
@@ -58,7 +59,6 @@ public class TestServiceProvider
// TestComponentB.class.getName(),
// TestComponentB.__serviceName, regKey);
// return bregA && bregB;
-// }
+// }
}
-
diff --git a/main/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java b/main/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java
index 659d514..282b2ac 100644
--- a/main/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java
+++ b/main/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java
@@ -723,4 +723,5 @@ public class AsciiReplaceFilter
// _AsciiReplaceFilter.m_serviceNames,
// xRegistryKey );
// }
-}
+}
+
diff --git a/main/odk/examples/java/MinimalComponent/MinimalComponent.java b/main/odk/examples/java/MinimalComponent/MinimalComponent.java
index 9a4ecdd..5f75acb 100644
--- a/main/odk/examples/java/MinimalComponent/MinimalComponent.java
+++ b/main/odk/examples/java/MinimalComponent/MinimalComponent.java
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -48,7 +48,7 @@ public class MinimalComponent {
*/
static private final String __serviceName =
"org.openoffice.MinimalComponent";
-
+
/** The initial component contextr, that gives access to
* the service manager, supported singletons, ...
* It's often later used
@@ -59,7 +59,7 @@ public class MinimalComponent {
* 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.
@@ -67,13 +67,13 @@ public class MinimalComponent {
public _MinimalComponent(XComponentContext xCompContext) {
try {
m_cmpCtx = xCompContext;
- m_xMCF = m_cmpCtx.getServiceManager();
+ m_xMCF = m_cmpCtx.getServiceManager();
}
catch( Exception e ) {
e.printStackTrace();
}
}
-
+
/** 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
@@ -84,11 +84,11 @@ public class MinimalComponent {
public void initialize( Object[] object )
throws com.sun.star.uno.Exception {
/* The component describes what arguments its expected and in which
- * order!At this point you can read the objects and can intialize
+ * order!At this point you can read the objects and can initialize
* your component using these objects.
*/
}
-
+
/** This method returns an array of all supported service names.
* @return Array of supported service names.
*/
@@ -97,14 +97,14 @@ public class MinimalComponent {
}
/** This method is a simple helper function to used in the
- * static component initialisation functions as well as in
+ * static component initialization functions as well as in
* getSupportedServiceNames.
*/
public static String[] getServiceNames() {
String[] sSupportedServiceNames = { __serviceName };
return sSupportedServiceNames;
}
-
+
/** This method returns true, if the given service will be
* supported by the component.
* @param sServiceName Service name.
@@ -113,16 +113,16 @@ public class MinimalComponent {
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 _MinimalComponent.class.getName();
- }
+ return _MinimalComponent.class.getName();
+ }
}
-
-
+
+
/**
* Gives a factory for creating the service.
* This method is called by the <code>JavaLoader</code>
@@ -136,11 +136,11 @@ public class MinimalComponent {
public static XSingleComponentFactory __getComponentFactory(String sImplName)
{
XSingleComponentFactory xFactory = null;
-
+
if ( sImplName.equals( _MinimalComponent.class.getName() ) )
xFactory = Factory.createComponentFactory(_MinimalComponent.class,
_MinimalComponent.getServiceNames());
-
+
return xFactory;
}
@@ -154,7 +154,7 @@ public class MinimalComponent {
*/
// This method not longer necessary since OOo 3.4 where the component registration
// was changed to passive component registration. For more details see
- // http://wiki.services.openoffice.org/wiki/Passive_Component_Registration
+ // https://wiki.openoffice.org/wiki/Passive_Component_Registration
// public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
// return Factory.writeRegistryServiceInfo(_MinimalComponent.class.getName(),
@@ -162,3 +162,4 @@ public class MinimalComponent {
// regKey);
// }
}
+