summaryrefslogtreecommitdiff
path: root/desktop/source/so_comp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source/so_comp')
-rw-r--r--desktop/source/so_comp/evaluation.cxx11
-rw-r--r--desktop/source/so_comp/evaluation.hxx3
-rw-r--r--desktop/source/so_comp/oemjob.cxx57
-rw-r--r--desktop/source/so_comp/oemjob.hxx3
-rw-r--r--desktop/source/so_comp/services.cxx20
5 files changed, 53 insertions, 41 deletions
diff --git a/desktop/source/so_comp/evaluation.cxx b/desktop/source/so_comp/evaluation.cxx
index afeadb5f3c..c55b94596b 100644
--- a/desktop/source/so_comp/evaluation.cxx
+++ b/desktop/source/so_comp/evaluation.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,7 +67,7 @@ const char* SOEvaluation::serviceName = "com.sun.star.office.Evaluation";
OUString SOEvaluation::GetImplementationName()
{
- return OUString( RTL_CONSTASCII_USTRINGPARAM( implementationName));
+ return OUString::createFromAscii(implementationName);
}
Sequence< OUString > SOEvaluation::GetSupportedServiceNames()
@@ -144,13 +145,13 @@ rtl::OUString SAL_CALL SOEvaluation::getExactName( const rtl::OUString& rApproxi
for (int i=0; i<aSeq.getLength(); i++ )
{
NamedValue& rValue = aSeq[i];
- if ( rValue.Name.equalsAscii("expired") )
+ if ( rValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("expired")) )
rValue.Value >>= bExpired;
- else if (rValue.Name.equalsAscii("title") )
+ else if (rValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("title")) )
rValue.Value >>= aEval;
}
// append eval string to title
- aTitle += OUString::createFromAscii(" ") + aEval;
+ aTitle += OUString(RTL_CONSTASCII_USTRINGPARAM(" ")) + aEval;
if ( bExpired )
throw RuntimeException();
}
@@ -203,3 +204,5 @@ throw ( RuntimeException )
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/so_comp/evaluation.hxx b/desktop/source/so_comp/evaluation.hxx
index 9ef4b71baa..a34cc65253 100644
--- a/desktop/source/so_comp/evaluation.hxx
+++ b/desktop/source/so_comp/evaluation.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -90,3 +91,5 @@ public:
};
}
#endif // _SOCOMP_EVALUATION_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/so_comp/oemjob.cxx b/desktop/source/so_comp/oemjob.cxx
index 21b78b5923..64767d180d 100644
--- a/desktop/source/so_comp/oemjob.cxx
+++ b/desktop/source/so_comp/oemjob.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,14 +68,14 @@ const char* OEMPreloadJob::serviceName = "com.sun.star.office.OEMPreloadJob";
OUString OEMPreloadJob::GetImplementationName()
{
- return OUString( RTL_CONSTASCII_USTRINGPARAM( implementationName));
+ return OUString::createFromAscii(implementationName);
}
Sequence< OUString > OEMPreloadJob::GetSupportedServiceNames()
{
sal_Int32 nSize = (sizeof( interfaces ) / sizeof( const char *)) - 1;
Sequence< OUString > aResult( nSize );
-
+
for( sal_Int32 i = 0; i < nSize; i++ )
aResult[i] = OUString::createFromAscii( interfaces[i] );
return aResult;
@@ -88,7 +89,7 @@ Reference< XInterface > SAL_CALL OEMPreloadJob::CreateInstance(
return (XComponent*) ( new OEMPreloadJob( rSMgr ) );
}
-OEMPreloadJob::OEMPreloadJob( const Reference< XMultiServiceFactory >& xFactory ) :
+OEMPreloadJob::OEMPreloadJob( const Reference< XMultiServiceFactory >& xFactory ) :
m_aListeners( m_aMutex ),
m_xServiceManager( xFactory )
{
@@ -117,24 +118,24 @@ void SAL_CALL OEMPreloadJob::removeEventListener( const Reference< XEventListene
}
// XServiceInfo
-::rtl::OUString SAL_CALL OEMPreloadJob::getImplementationName()
+::rtl::OUString SAL_CALL OEMPreloadJob::getImplementationName()
throw ( RuntimeException )
{
return OEMPreloadJob::GetImplementationName();
}
-sal_Bool SAL_CALL OEMPreloadJob::supportsService( const ::rtl::OUString& rServiceName )
+sal_Bool SAL_CALL OEMPreloadJob::supportsService( const ::rtl::OUString& rServiceName )
throw ( RuntimeException )
{
sal_Int32 nSize = sizeof( interfaces ) / sizeof( const char *);
-
+
for( sal_Int32 i = 0; i < nSize; i++ )
if ( rServiceName.equalsAscii( interfaces[i] ))
return sal_True;
return sal_False;
}
-Sequence< ::rtl::OUString > SAL_CALL OEMPreloadJob::getSupportedServiceNames()
+Sequence< ::rtl::OUString > SAL_CALL OEMPreloadJob::getSupportedServiceNames()
throw ( RuntimeException )
{
return OEMPreloadJob::GetSupportedServiceNames();
@@ -150,7 +151,7 @@ throw ( RuntimeException )
{
// create OEM preload service dialog
Reference <XExecutableDialog> xDialog( m_xServiceManager->createInstance(
- OUString::createFromAscii("org.openoffice.comp.preload.OEMPreloadWizard")),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.preload.OEMPreloadWizard"))),
UNO_QUERY );
if ( xDialog.is() ){
// execute OEM preload dialog and check return value
@@ -160,11 +161,11 @@ throw ( RuntimeException )
bCont = sal_True;
disableOEMPreloadFlag();
} else {
- // user declined...
+ // user declined...
// terminate.
/*
Reference< XDesktop > xDesktop( m_xServiceManager->createInstance(
- OUString::createFromAscii("com.sun.star.frame.Desktop")),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop"))),
UNO_QUERY );
xDesktop->terminate();
*/
@@ -175,18 +176,18 @@ throw ( RuntimeException )
Reference<XModel> rModel;
Reference<XCloseable> rClose;
for (int i=0; i<args.getLength(); i++)
- {
- if (args[i].Name.equalsAscii("EnvType"))
+ {
+ if (args[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EnvType")))
args[i].Value >>= aEnvType;
- else if (args[i].Name.equalsAscii("Frame")) {
+ else if (args[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Frame"))) {
args[i].Value >>= rFrame;
rClose = Reference<XCloseable>(rFrame, UNO_QUERY);
}
- else if (args[i].Name.equalsAscii("Model")) {
+ else if (args[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Model"))) {
args[i].Value >>= rModel;
rClose = Reference<XCloseable>(rModel, UNO_QUERY);
- }
- }
+ }
+ }
if (rClose.is()) rClose->close(sal_True);
*/
bCont = sal_False;
@@ -195,10 +196,10 @@ throw ( RuntimeException )
} else {
// don't try again
bCont = sal_True;
- }
+ }
/*
- NamedValue nv;
- nv.Name = OUString::createFromAscii("Deactivate");
+ NamedValue nv;
+ nv.Name = OUString(RTL_CONSTASCII_USTRINGPARAM("Deactivate"));
nv.Value <<= bDeactivate;
Sequence<NamedValue> s(1);
s[0] = nv;
@@ -208,32 +209,30 @@ throw ( RuntimeException )
return r;
}
-
static sal_Bool existsURL( OUString const& _sURL )
{
using namespace osl;
DirectoryItem aDirItem;
-
+
if (_sURL.getLength() != 0)
return ( DirectoryItem::get( _sURL, aDirItem ) == DirectoryItem::E_None );
-
+
return sal_False;
}
-
// locate soffice.ini/.rc file
static OUString locateIniFile()
{
OUString aUserDataPath;
OUString aSofficeIniFileURL;
-
+
// Retrieve the default file URL for the soffice.ini/rc
Bootstrap().getIniName( aSofficeIniFileURL );
if ( utl::Bootstrap::locateUserData( aUserDataPath ) == utl::Bootstrap::PATH_EXISTS )
{
const char CONFIG_DIR[] = "/config";
-
+
sal_Int32 nIndex = aSofficeIniFileURL.lastIndexOf( '/');
if ( nIndex > 0 )
{
@@ -242,11 +241,11 @@ static OUString locateIniFile()
aBuffer.appendAscii( CONFIG_DIR );
aBuffer.append( aSofficeIniFileURL.copy( nIndex ));
aUserSofficeIniFileURL = aBuffer.makeStringAndClear();
-
+
if ( existsURL( aUserSofficeIniFileURL ))
return aUserSofficeIniFileURL;
}
- }
+ }
// Fallback try to use the soffice.ini/rc from program folder
return aSofficeIniFileURL;
}
@@ -269,7 +268,7 @@ void OEMPreloadJob::disableOEMPreloadFlag()
{
OUString aSofficeIniFileURL = locateIniFile();
if ( aSofficeIniFileURL.getLength() > 0 )
- {
+ {
Config aConfig(aSofficeIniFileURL);
aConfig.SetGroup( OEM_PRELOAD_SECTION );
aConfig.WriteKey( OEM_PRELOAD, STR_FALSE );
@@ -278,3 +277,5 @@ void OEMPreloadJob::disableOEMPreloadFlag()
}
} // namespace desktop
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/so_comp/oemjob.hxx b/desktop/source/so_comp/oemjob.hxx
index 973cae36df..26c1f0943d 100644
--- a/desktop/source/so_comp/oemjob.hxx
+++ b/desktop/source/so_comp/oemjob.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -90,3 +91,5 @@ public:
}
#endif // _SOCOMP_OEMJOB_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/so_comp/services.cxx b/desktop/source/so_comp/services.cxx
index 8a5e561444..7bd2e60822 100644
--- a/desktop/source/so_comp/services.cxx
+++ b/desktop/source/so_comp/services.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,7 +59,7 @@ static const char* pServices[] =
static const char* pImplementations[] =
{
SOEvaluation::implementationName,
- OEMPreloadJob::implementationName,
+ OEMPreloadJob::implementationName,
NULL
};
@@ -71,13 +72,12 @@ static const fProvider pInstanceProviders[] =
NULL
};
-
static const char** pSupportedServices[] =
{
SOEvaluation::interfaces,
OEMPreloadJob::interfaces,
NULL
-};
+};
static Sequence<OUString>
getSupportedServiceNames(int p) {
@@ -88,13 +88,13 @@ getSupportedServiceNames(int p) {
aSeq[i] = OUString::createFromAscii(names[i]);
}
return aSeq;
-}
+}
extern "C"
{
-void SAL_CALL
+void SAL_CALL
component_getImplementationEnvironment(
- const sal_Char** ppEnvironmentTypeName,
+ const sal_Char** ppEnvironmentTypeName,
uno_Environment**)
{
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
@@ -110,11 +110,11 @@ component_getFactory(
if ( pImplementationName && pServiceManager )
{
Reference< XSingleServiceFactory > xFactory;
- Reference< XMultiServiceFactory > xServiceManager(
+ Reference< XMultiServiceFactory > xServiceManager(
reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
-
+
// search implementation
- for (int i = 0; (pImplementations[i]!=NULL); i++) {
+ for (int i = 0; (pImplementations[i]!=NULL); i++) {
if ( strcmp(pImplementations[i], pImplementationName ) == 0 ) {
// found implementation
xFactory = Reference<XSingleServiceFactory>(cppu::createSingleFactory(
@@ -132,3 +132,5 @@ component_getFactory(
return NULL;
}
} // extern "C"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */