summaryrefslogtreecommitdiff
path: root/cppuhelper/test
diff options
context:
space:
mode:
Diffstat (limited to 'cppuhelper/test')
-rw-r--r--cppuhelper/test/bootstrap/TestEnv.cxx6
-rw-r--r--cppuhelper/test/bootstrap/bootstrap.test.cxx46
-rw-r--r--cppuhelper/test/cfg_data/instance/uno/components.xml16
-rw-r--r--cppuhelper/test/cfg_test.cxx22
-rw-r--r--cppuhelper/test/helpertest.idl4
-rw-r--r--cppuhelper/test/loader/loader.test.cxx22
-rw-r--r--cppuhelper/test/testcmp/TestComponent.cxx34
-rw-r--r--cppuhelper/test/testcmp/TestComponent.hxx2
-rw-r--r--cppuhelper/test/testcontainer.cxx18
-rw-r--r--cppuhelper/test/testdefaultbootstrapping.cxx4
-rw-r--r--cppuhelper/test/testdefaultbootstrapping.pl20
-rw-r--r--cppuhelper/test/testhelper.cxx8
-rw-r--r--cppuhelper/test/testhelper.hxx2
-rw-r--r--cppuhelper/test/testidlclass.cxx8
-rw-r--r--cppuhelper/test/testimplhelper.cxx38
-rw-r--r--cppuhelper/test/testlib/UNO.pm6
-rw-r--r--cppuhelper/test/testlib/defbootstrap_lib.cxx4
-rw-r--r--cppuhelper/test/testpropshlp.cxx370
-rw-r--r--cppuhelper/test/testproptyphlp.cxx2
19 files changed, 316 insertions, 316 deletions
diff --git a/cppuhelper/test/bootstrap/TestEnv.cxx b/cppuhelper/test/bootstrap/TestEnv.cxx
index 578378ee2898..90e4bb65b9e6 100644
--- a/cppuhelper/test/bootstrap/TestEnv.cxx
+++ b/cppuhelper/test/bootstrap/TestEnv.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,7 +47,7 @@
#endif
-class SAL_DLLPRIVATE TestEnv : public cppu::Enterable
+class SAL_DLLPRIVATE TestEnv : public cppu::Enterable
{
int m_inCount;
@@ -96,7 +96,7 @@ void TestEnv::v_enter(void)
{
++ m_inCount;
}
-
+
void TestEnv::v_leave(void)
{
-- m_inCount;
diff --git a/cppuhelper/test/bootstrap/bootstrap.test.cxx b/cppuhelper/test/bootstrap/bootstrap.test.cxx
index b0eadb6946a1..5aa09b704680 100644
--- a/cppuhelper/test/bootstrap/bootstrap.test.cxx
+++ b/cppuhelper/test/bootstrap/bootstrap.test.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,7 +55,7 @@ using namespace com::sun::star;
static rtl::OUString s_comment;
static bool s_check_object_is_in(void * pObject)
-{
+{
uno::Environment currentEnv(uno::Environment::getCurrent());
rtl_uString * pOId = NULL;
@@ -65,7 +65,7 @@ static bool s_check_object_is_in(void * pObject)
uno::TypeDescription typeDescription(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface")));
void * pRegisteredObject = NULL;
- currentEnv.get()->pExtEnv->getRegisteredInterface(currentEnv.get()->pExtEnv,
+ currentEnv.get()->pExtEnv->getRegisteredInterface(currentEnv.get()->pExtEnv,
&pRegisteredObject,
pOId,
(typelib_InterfaceTypeDescription *)typeDescription.get());
@@ -81,10 +81,10 @@ static bool s_check_object_is_in(void * pObject)
return result;
}
-static void s_test__loadSharedLibComponentFactory(rtl::OUString const & clientPurpose,
- rtl::OUString const & servicePurpose)
+static void s_test__loadSharedLibComponentFactory(rtl::OUString const & clientPurpose,
+ rtl::OUString const & servicePurpose)
{
- cppu::EnvGuard envGuard(uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))
+ cppu::EnvGuard envGuard(uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))
+ clientPurpose, NULL));
if (clientPurpose.getLength() && !envGuard.is())
{
@@ -110,13 +110,13 @@ static void s_test__loadSharedLibComponentFactory(rtl::OUString const & clientPu
uno::Reference<registry::XRegistryKey>()
)
);
-
+
if (!xItf.is())
{
s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tgot no object - FAILURE\n"));
return;
}
-
+
if (!clientPurpose.equals(servicePurpose) && !s_check_object_is_in(xItf.get()))
{
s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tcouldn't find object in current purpose \""));
@@ -132,22 +132,22 @@ static void s_test__loadSharedLibComponentFactory(rtl::OUString const & clientPu
}
}
-static void s_test__loadSharedLibComponentFactory__free_free()
+static void s_test__loadSharedLibComponentFactory__free_free()
{
s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__loadSharedLibComponentFactory__free_free\n"));
s_test__loadSharedLibComponentFactory(rtl::OUString(), rtl::OUString());
}
-static void s_test__loadSharedLibComponentFactory__free_purpose()
+static void s_test__loadSharedLibComponentFactory__free_purpose()
{
s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__loadSharedLibComponentFactory__free_purpose\n"));
- s_test__loadSharedLibComponentFactory(rtl::OUString(),
+ s_test__loadSharedLibComponentFactory(rtl::OUString(),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":testenv")));
}
-static void s_test__loadSharedLibComponentFactory__purpose_free()
+static void s_test__loadSharedLibComponentFactory__purpose_free()
{
s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__loadSharedLibComponentFactory__purpose_free\n"));
@@ -155,11 +155,11 @@ static void s_test__loadSharedLibComponentFactory__purpose_free()
rtl::OUString());
}
-static void s_test__loadSharedLibComponentFactory__purpose_purpose()
+static void s_test__loadSharedLibComponentFactory__purpose_purpose()
{
s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__loadSharedLibComponentFactory__purpose_purpose\n"));
- s_test__loadSharedLibComponentFactory(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":testenv")),
+ s_test__loadSharedLibComponentFactory(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":testenv")),
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":testenv")));
}
@@ -192,7 +192,7 @@ static rtl::OUString s_getSDrive(void)
static void s_test__createSimpleRegistry(rtl::OUString const & clientPurpose)
{
- cppu::EnvGuard envGuard(uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))
+ cppu::EnvGuard envGuard(uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))
+ clientPurpose, NULL));
if (clientPurpose.getLength() && !envGuard.is())
{
@@ -211,7 +211,7 @@ static void s_test__createSimpleRegistry(rtl::OUString const & clientPurpose)
s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tgot no object - FAILURE\n"));
return;
}
-
+
if (clientPurpose.getLength() != 0 && !s_check_object_is_in(registry.get()))
{
s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tcouldn't find object in current purpose \""));
@@ -237,7 +237,7 @@ static void s_test__createSimpleRegistry__purpose(void)
static void s_test__bootstrap_InitialComponentContext(rtl::OUString const & clientPurpose)
{
- cppu::EnvGuard envGuard(uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))
+ cppu::EnvGuard envGuard(uno::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))
+ clientPurpose, NULL));
if (clientPurpose.getLength() && !envGuard.is())
{
@@ -259,7 +259,7 @@ static void s_test__bootstrap_InitialComponentContext(rtl::OUString const & clie
s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tgot no object - FAILURE\n"));
return;
}
-
+
if (clientPurpose.getLength() != 0 && !s_check_object_is_in(xContext.get()))
{
s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\t\tcouldn't find object in current purpose \""));
@@ -305,16 +305,16 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(/*argc*/, argv)
s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS PASSED\n"));
ret = 0;
}
- else
+ else
{
s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS _NOT_ PASSED\n"));
ret = -1;
}
- std::cerr
- << argv[0]
- << std::endl
- << rtl::OUStringToOString(s_comment, RTL_TEXTENCODING_ASCII_US).getStr()
+ std::cerr
+ << argv[0]
+ << std::endl
+ << rtl::OUStringToOString(s_comment, RTL_TEXTENCODING_ASCII_US).getStr()
<< std::endl;
return ret;
diff --git a/cppuhelper/test/cfg_data/instance/uno/components.xml b/cppuhelper/test/cfg_data/instance/uno/components.xml
index b0ea5ce3b291..83305fca1273 100644
--- a/cppuhelper/test/cfg_data/instance/uno/components.xml
+++ b/cppuhelper/test/cfg_data/instance/uno/components.xml
@@ -5,7 +5,7 @@
xmlns:cfg="http://openoffice.org/2000/registry/instance"
xmlns="http://openoffice.org/2000/uno/Components">
-
+
<services cfg:type="set" cfg:element-type="service">
<service cfg:name="com.sun.star.script.Converter">
@@ -13,7 +13,7 @@
com.sun.star.comp.stoc.TypeConverter
</available-implementations>
</service>
-
+
<service cfg:name="com.sun.star.bootstrap.TestComponent0">
<available-implementations cfg:type="string" cfg:derivedBy="list">
com.sun.star.comp.bootstrap.TestComponent0
@@ -23,7 +23,7 @@
<cfg:any cfg:name="serviceprop1" cfg:type="string">value of serviceprop1</cfg:any>
</context-properties>
</service>
-
+
</services>
@@ -34,7 +34,7 @@
<url cfg:type="string">tcv.dll</url>
<supported-services cfg:type="string" cfg:derivedBy="list">com.sun.star.script.Converter</supported-services>
</implementation>
-
+
<implementation cfg:name="com.sun.star.comp.bootstrap.TestComponent0">
<activator cfg:type="string">com.sun.star.loader.SharedLibrary</activator>
<url cfg:type="string">cfg_test.dll</url>
@@ -44,7 +44,7 @@
<cfg:any cfg:name="implprop1" cfg:type="string">value of implprop1</cfg:any>
</context-properties>
</implementation>
-
+
</implementations>
@@ -53,7 +53,7 @@
<singleton cfg:name="com.sun.star.script.theConverter">
<used-service cfg:type="string">com.sun.star.script.Converter</used-service>
</singleton>
-
+
<singleton cfg:name="com.sun.star.bootstrap.theTestComponent0">
<used-service cfg:type="string">com.sun.star.bootstrap.TestComponent0</used-service>
<initial-arguments cfg:type="set" cfg:element-type="cfg:any">
@@ -62,14 +62,14 @@
<cfg:any cfg:name="2" cfg:type="string">third argument</cfg:any>
</initial-arguments>
</singleton>
-
+
</singletons>
<global-context-properties cfg:type="set" cfg:element-type="cfg:any">
<cfg:any cfg:name="TestValue" cfg:type="int">5</cfg:any>
-
+
</global-context-properties>
diff --git a/cppuhelper/test/cfg_test.cxx b/cppuhelper/test/cfg_test.cxx
index 2a0671867157..53345815f186 100644
--- a/cppuhelper/test/cfg_test.cxx
+++ b/cppuhelper/test/cfg_test.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -90,13 +90,13 @@ class ServiceImpl0
: public WeakImplHelper2< lang::XServiceInfo, lang::XInitialization >
{
Reference< XComponentContext > m_xContext;
-
+
public:
ServiceImpl0( Reference< XComponentContext > const & xContext ) SAL_THROW( () );
// XInitialization
virtual void SAL_CALL initialize( const Sequence< Any >& rArgs ) throw (Exception, RuntimeException);
-
+
// XServiceInfo
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (RuntimeException);
virtual OUString SAL_CALL getImplementationName() throw (RuntimeException);
@@ -108,7 +108,7 @@ ServiceImpl0::ServiceImpl0( Reference< XComponentContext > const & xContext ) SA
{
sal_Int32 n;
OUString val;
-
+
// service properties
OSL_VERIFY( m_xContext->getValueByName(
OUSTR("/services/com.sun.star.bootstrap.TestComponent0/context-properties/serviceprop0") ) >>= n );
@@ -173,7 +173,7 @@ public:
inline ServiceImpl1( Reference< XComponentContext > const & xContext ) SAL_THROW( () )
: ServiceImpl0( xContext )
{}
-
+
// XServiceInfo
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (RuntimeException);
virtual OUString SAL_CALL getImplementationName() throw (RuntimeException);
@@ -259,19 +259,19 @@ SAL_IMPLEMENT_MAIN()
{
Reference< XComponentContext > xContext( defaultBootstrap_InitialComponentContext() );
Reference< lang::XMultiComponentFactory > xMgr( xContext->getServiceManager() );
-
+
// show what is in context
xContext->getValueByName( OUSTR("dump_maps") );
-
+
sal_Int32 n;
OSL_VERIFY( xContext->getValueByName( OUSTR("/global-context-properties/TestValue") ) >>= n );
::fprintf( stderr, "> n=%d\n", n );
-
+
Reference< XInterface > x;
OSL_VERIFY( !(xContext->getValueByName( OUSTR("/singletons/my_converter") ) >>= x) );
OSL_VERIFY( xContext->getValueByName( OUSTR("/singletons/com.sun.star.script.theConverter") ) >>= x );
OSL_VERIFY( xContext->getValueByName( OUSTR("/singletons/com.sun.star.bootstrap.theTestComponent0") ) >>= x );
-
+
::fprintf( stderr, "> registering service...\n", n );
#if defined(SAL_W32) || defined(SAL_OS2)
OUString libName( OUSTR("cfg_test.dll") );
@@ -284,10 +284,10 @@ SAL_IMPLEMENT_MAIN()
xImplReg->registerImplementation(
OUSTR("com.sun.star.loader.SharedLibrary"), libName,
Reference< registry::XSimpleRegistry >() );
-
+
OSL_VERIFY( (x = xMgr->createInstanceWithContext( OUSTR("com.sun.star.bootstrap.TestComponent0"), xContext )).is() );
OSL_VERIFY( (x = xMgr->createInstanceWithContext( OUSTR("com.sun.star.bootstrap.TestComponent1"), xContext )).is() );
-
+
Reference< lang::XComponent > xComp( xContext, UNO_QUERY );
if (xComp.is())
{
diff --git a/cppuhelper/test/helpertest.idl b/cppuhelper/test/helpertest.idl
index e78629ab5313..daa69656f4ef 100644
--- a/cppuhelper/test/helpertest.idl
+++ b/cppuhelper/test/helpertest.idl
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,7 +33,7 @@
module test
{
-
+
interface A : com::sun::star::uno::XInterface
{
string a();
diff --git a/cppuhelper/test/loader/loader.test.cxx b/cppuhelper/test/loader/loader.test.cxx
index 53d5d96ac175..34846197d030 100644
--- a/cppuhelper/test/loader/loader.test.cxx
+++ b/cppuhelper/test/loader/loader.test.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -83,12 +83,12 @@ public:
-static rtl::OUString s_test__cppu_loadSharedLibComponentFactory(char const * pServicePurpose)
+static rtl::OUString s_test__cppu_loadSharedLibComponentFactory(char const * pServicePurpose)
{
rtl::OUString result;
- rtl::OUString servicePurpose = rtl::OUString(pServicePurpose,
- rtl_str_getLength(pServicePurpose),
+ rtl::OUString servicePurpose = rtl::OUString(pServicePurpose,
+ rtl_str_getLength(pServicePurpose),
RTL_TEXTENCODING_ASCII_US);
result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__cppu_loadSharedLibComponentFactory "));
@@ -110,7 +110,7 @@ static rtl::OUString s_test__cppu_loadSharedLibComponentFactory(char const * pSe
if (envDcp_purpose == servicePurpose)
result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("passed\n"));
- else
+ else
{
result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILED - got: \""));
result += envDcp_purpose;
@@ -126,12 +126,12 @@ static rtl::OUString s_test__cppu_loadSharedLibComponentFactory(char const * pSe
return result;
}
-static rtl::OUString s_test__cppu_writeSharedLibComponentInfo(char const * pServicePurpose)
+static rtl::OUString s_test__cppu_writeSharedLibComponentInfo(char const * pServicePurpose)
{
rtl::OUString result;
- rtl::OUString servicePurpose = rtl::OUString(pServicePurpose,
- rtl_str_getLength(pServicePurpose),
+ rtl::OUString servicePurpose = rtl::OUString(pServicePurpose,
+ rtl_str_getLength(pServicePurpose),
RTL_TEXTENCODING_ASCII_US);
result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\ts_test__cppu_writeSharedLibComponentInfo "));
@@ -157,7 +157,7 @@ static rtl::OUString s_test__cppu_writeSharedLibComponentInfo(char const * pServ
if (envDcp_purpose == servicePurpose)
result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("passed\n"));
- else
+ else
{
result += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILED - got: \""));
result += envDcp_purpose;
@@ -190,11 +190,11 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(/*argc*/, argv)
message += s_test__cppu_writeSharedLibComponentInfo(":unsafe");
message += s_test__cppu_writeSharedLibComponentInfo(":affine");
message += s_test__cppu_writeSharedLibComponentInfo("");
-
+
if (message.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILED"))) == -1)
message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS PASSED\n"));
- else
+ else
{
message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS _NOT_ PASSED\n"));
result = -1;
diff --git a/cppuhelper/test/testcmp/TestComponent.cxx b/cppuhelper/test/testcmp/TestComponent.cxx
index 83bdac1a47a2..b8858f3329bd 100644
--- a/cppuhelper/test/testcmp/TestComponent.cxx
+++ b/cppuhelper/test/testcmp/TestComponent.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -84,12 +84,12 @@ public:
uno::Any SAL_CALL queryInterface(uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException);
void SAL_CALL release() throw ();
void SAL_CALL acquire() throw ();
-
+
// lang::XServiceInfo
virtual rtl::OUString SAL_CALL getImplementationName() throw (uno::RuntimeException);
virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName)
throw (uno::RuntimeException);
- virtual uno::Sequence<rtl::OUString> SAL_CALL getSupportedServiceNames()
+ virtual uno::Sequence<rtl::OUString> SAL_CALL getSupportedServiceNames()
throw (uno::RuntimeException);
protected:
@@ -133,25 +133,25 @@ TestComponent::~TestComponent()
LOG_LIFECYCLE_TestComponent_emit(fprintf(stderr, "LIFE: %s -> %p\n", "TestComponent::~TestComponent", this));
}
-rtl::OUString SAL_CALL TestComponent::getImplementationName()
+rtl::OUString SAL_CALL TestComponent::getImplementationName()
throw (uno::RuntimeException)
{
return m_implName;
}
-void SAL_CALL TestComponent::acquire() throw ()
+void SAL_CALL TestComponent::acquire() throw ()
{
- cppu::WeakImplHelper1<lang::XServiceInfo>::acquire();
-}
+ cppu::WeakImplHelper1<lang::XServiceInfo>::acquire();
+}
-void SAL_CALL TestComponent::release() throw ()
+void SAL_CALL TestComponent::release() throw ()
{
- cppu::WeakImplHelper1<lang::XServiceInfo>::release();
-}
+ cppu::WeakImplHelper1<lang::XServiceInfo>::release();
+}
uno::Any SAL_CALL TestComponent::queryInterface(uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException)
{
- return cppu::WeakImplHelper1<lang::XServiceInfo>::queryInterface(rType);
+ return cppu::WeakImplHelper1<lang::XServiceInfo>::queryInterface(rType);
}
sal_Bool SAL_CALL TestComponent::supportsService(rtl::OUString const & ServiceName)
@@ -168,14 +168,14 @@ sal_Bool SAL_CALL TestComponent::supportsService(rtl::OUString const & ServiceNa
return false;
}
-uno::Sequence<rtl::OUString> SAL_CALL TestComponent::getSupportedServiceNames()
+uno::Sequence<rtl::OUString> SAL_CALL TestComponent::getSupportedServiceNames()
throw (uno::RuntimeException)
{
return getSupportedServiceNames_Static();
}
extern "C" sal_Bool SAL_CALL component_writeInfo(
- void * /*serviceManager*/,
+ void * /*serviceManager*/,
void * /*registryKey*/
)
{
@@ -185,8 +185,8 @@ extern "C" sal_Bool SAL_CALL component_writeInfo(
}
extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
- char const * pImplName,
- void * /*serviceManager*/,
+ char const * pImplName,
+ void * /*serviceManager*/,
void * /*registryKey*/
)
{
@@ -213,7 +213,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
}
extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironmentExt(
- sal_Char const ** envTypeName,
+ sal_Char const ** envTypeName,
uno_Environment ** /*ppEnv*/,
sal_Char const * pImplName,
uno_Environment * /*pSrcEnv*/
@@ -227,7 +227,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnviro
purpose = rtl::OUStringToOString(cppu::EnvDcp::getPurpose(uImplName), RTL_TEXTENCODING_ASCII_US);
}
- if (!purpose.getLength())
+ if (!purpose.getLength())
{
char * pPurpose = getenv("TestComponent.uno");
if (pPurpose)
diff --git a/cppuhelper/test/testcmp/TestComponent.hxx b/cppuhelper/test/testcmp/TestComponent.hxx
index 7499628148f4..92824bd8acb6 100644
--- a/cppuhelper/test/testcmp/TestComponent.hxx
+++ b/cppuhelper/test/testcmp/TestComponent.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/cppuhelper/test/testcontainer.cxx b/cppuhelper/test/testcontainer.cxx
index 1dc37b61c596..ccf9aeda31a7 100644
--- a/cppuhelper/test/testcontainer.cxx
+++ b/cppuhelper/test/testcontainer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,8 +49,8 @@ class TestListener : public WeakImplHelper1< XVetoableChangeListener >
{
}
-
- virtual void SAL_CALL vetoableChange( const ::com::sun::star::beans::PropertyChangeEvent& /*aEvent*/ )
+
+ virtual void SAL_CALL vetoableChange( const ::com::sun::star::beans::PropertyChangeEvent& /*aEvent*/ )
throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException)
{
@@ -68,7 +68,7 @@ void test_interfacecontainer()
Reference< XVetoableChangeListener > r1 = new TestListener();
Reference< XVetoableChangeListener > r2 = new TestListener();
Reference< XVetoableChangeListener > r3 = new TestListener();
-
+
helper.addInterface( r1 );
helper.addInterface( r2 );
helper.addInterface( r3 );
@@ -82,7 +82,7 @@ void test_interfacecontainer()
Reference< XVetoableChangeListener > r1 = new TestListener();
Reference< XVetoableChangeListener > r2 = new TestListener();
Reference< XVetoableChangeListener > r3 = new TestListener();
-
+
helper.addInterface( r1 );
helper.addInterface( r2 );
helper.addInterface( r3 );
@@ -91,7 +91,7 @@ void test_interfacecontainer()
while( iterator.hasMoreElements() )
((XVetoableChangeListener*)iterator.next())->vetoableChange( PropertyChangeEvent() );
-
+
helper.disposeAndClear( EventObject() );
}
@@ -101,7 +101,7 @@ void test_interfacecontainer()
Reference< XVetoableChangeListener > r1 = new TestListener();
Reference< XVetoableChangeListener > r2 = new TestListener();
Reference< XVetoableChangeListener > r3 = new TestListener();
-
+
helper.addInterface( r1 );
helper.addInterface( r2 );
helper.addInterface( r3 );
@@ -125,7 +125,7 @@ void test_interfacecontainer()
Reference< XVetoableChangeListener > r1 = new TestListener();
Reference< XVetoableChangeListener > r2 = new TestListener();
Reference< XVetoableChangeListener > r3 = new TestListener();
-
+
helper.addInterface( r1 );
helper.addInterface( r2 );
helper.addInterface( r3 );
@@ -148,7 +148,7 @@ void test_interfacecontainer()
OSL_ASSERT( r != r1 && ( r == r2 || r == r3 ) );
}
}
-
+
helper.disposeAndClear( EventObject() );
}
}
diff --git a/cppuhelper/test/testdefaultbootstrapping.cxx b/cppuhelper/test/testdefaultbootstrapping.cxx
index fce0a1242a82..52f1c96af619 100644
--- a/cppuhelper/test/testdefaultbootstrapping.cxx
+++ b/cppuhelper/test/testdefaultbootstrapping.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,7 +59,7 @@ SAL_IMPLEMENT_MAIN()
OUString arg;
rtl_getAppCommandArg(i, &arg.pData);
- if (arg.getLength())
+ if (arg.getLength())
{
Reference<XInterface> xInterface = smgr->createInstance(arg);
OString tmp = OUStringToOString(arg, RTL_TEXTENCODING_ASCII_US);
diff --git a/cppuhelper/test/testdefaultbootstrapping.pl b/cppuhelper/test/testdefaultbootstrapping.pl
index c1756e908529..b96ed5c49bcb 100644
--- a/cppuhelper/test/testdefaultbootstrapping.pl
+++ b/cppuhelper/test/testdefaultbootstrapping.pl
@@ -4,7 +4,7 @@ eval 'exec perl -wS $0 ${1+"$@"}'
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -58,7 +58,7 @@ else {
sub extendProgName($) {
my $_extension = shift;
my $_result;
-
+
if ($ENV{GUI} eq "WNT") {
$_result = $progname . $_extension;
}
@@ -91,7 +91,7 @@ sub testForServices($$$) {
my $_testexe = shift;
-# my $_rc = system 'echo', $_testexe, @{$_services}, $_pars;
+# my $_rc = system 'echo', $_testexe, @{$_services}, $_pars;
my $_rc = system $_testexe, @{$_services}, $_pars;
return $_rc >> 8;
@@ -102,7 +102,7 @@ sub registerService($$){
my $service_lib = shift;
my $rdb_name = shift;
-# system 'echo', "regcomp -register -r " . $rdb_name . " -c $service_lib";
+# system 'echo', "regcomp -register -r " . $rdb_name . " -c $service_lib";
my $rc = system "regcomp -register -r " . $rdb_name . " -c $service_lib";
@@ -131,21 +131,21 @@ sub registerServices() {
$comment = $comment . "\tcouldn't unregister service " . $service . "\n";
$state = 0;
}
-
-
+
+
# register the service and ensure that it is reachable
$rc = registerService($services{$service}, $service . '.rdb');
if(!$rc) {
$comment = $comment . "\tcouldn't register service " . $service . "\n";
$state = 0;
}
-
+
$rc = testForServices([$service], "-env:UNO_SERVICES=" . $service . ".rdb", $testexe);
if(!$rc) {
$comment = $comment . "\tcouldn't reach service " . $service . "\n";
$state = 0;
}
-
+
# memorize all services
if (length($allservices_rdbs)) {
$allservices_rdbs = $allservices_rdbs . " ";
@@ -169,7 +169,7 @@ sub testBeneathExe() {
my $service = 'com.sun.star.reflection.CoreReflection';
my $_testexe;
- my @_exes = (extendProgName(".exe"),
+ my @_exes = (extendProgName(".exe"),
extendProgName(".Exe"),
extendProgName(".bin"),
extendProgName(".Bin"));
@@ -243,7 +243,7 @@ sub testAllAvailable() {
# test that all services are reachable through different rdbs
# change the directory to ensure, that all paths become expanded
chdir "..";
-
+
$rc = testForServices(\@allservices, "-env:UNO_SERVICES=" . $allservices_rdbs, $testexe);
if (!$rc) {
$comment = $comment . "\tmulti rdb test not passed\n";
diff --git a/cppuhelper/test/testhelper.cxx b/cppuhelper/test/testhelper.cxx
index 623585299c76..faa83b92fb24 100644
--- a/cppuhelper/test/testhelper.cxx
+++ b/cppuhelper/test/testhelper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -77,14 +77,14 @@ SAL_IMPLEMENT_MAIN()
Reference< beans::XPropertySet >(
xContext->getServiceManager(), UNO_QUERY )->getPropertyValue(
OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) ) != xInitialContext );
-
+
Reference< XMultiServiceFactory > x( xMgr, UNO_QUERY );
test_ImplHelper( x );
testPropertyTypeHelper();
testidlclass( x );
test_PropertySetHelper();
test_interfacecontainer();
-
+
OSL_VERIFY( xContext->getValueByName(
OUString( RTL_CONSTASCII_USTRINGPARAM("bla, bla") ) ) == (sal_Int32)5 );
OSL_VERIFY( ! xInitialContext->getValueByName(
@@ -99,7 +99,7 @@ SAL_IMPLEMENT_MAIN()
OString cstr_msg( OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) );
OSL_ENSURE( ! "exception occured: ", cstr_msg.getStr() );
}
-
+
printf( "Test finished\n" );
return 0;
}
diff --git a/cppuhelper/test/testhelper.hxx b/cppuhelper/test/testhelper.hxx
index a164c1c6b9f4..c40d738d83ba 100644
--- a/cppuhelper/test/testhelper.hxx
+++ b/cppuhelper/test/testhelper.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/cppuhelper/test/testidlclass.cxx b/cppuhelper/test/testidlclass.cxx
index 48ee84ed9101..fca2a64089f8 100644
--- a/cppuhelper/test/testidlclass.cxx
+++ b/cppuhelper/test/testidlclass.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -101,11 +101,11 @@ void testidlclass( const Reference < XMultiServiceFactory > &rSMgr)
//TODO !
// one idl class for one interface
// this test fails, if core reflection fails !
-// OSL_ASSERT( 1 == seqIdlClass.getLength() );
-// Reference < XIdlClass > rIdlInterface = seqIdlClass.getArray()[0];
+// OSL_ASSERT( 1 == seqIdlClass.getLength() );
+// Reference < XIdlClass > rIdlInterface = seqIdlClass.getArray()[0];
// check for IdlClass interface returned by Core Reflection
-// OSL_ASSERT( rIdlInterface.is() );
+// OSL_ASSERT( rIdlInterface.is() );
diff --git a/cppuhelper/test/testimplhelper.cxx b/cppuhelper/test/testimplhelper.cxx
index b3c2638739c3..703c44ebebbb 100644
--- a/cppuhelper/test/testimplhelper.cxx
+++ b/cppuhelper/test/testimplhelper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -91,7 +91,7 @@ using namespace com::sun::star::uno;
struct TestImpl : public ImplHelper4< CA, DBA, FE, G >
{
sal_Int32 nRef;
-
+
virtual ~TestImpl()
{ OSL_TRACE( "> TestImpl dtor called... <\n" ); }
@@ -101,7 +101,7 @@ struct TestImpl : public ImplHelper4< CA, DBA, FE, G >
{ ++nRef; }
virtual void SAL_CALL release( ) throw()
{ if (! --nRef) delete this; }
-
+
// A
virtual OUString SAL_CALL a() throw(RuntimeException)
{ return OUString( RTL_CONSTASCII_USTRINGPARAM("a") ); }
@@ -130,7 +130,7 @@ struct TestWeakAggImpl : public WeakAggImplHelper4< CA, DBA, FE, G >
{
virtual ~TestWeakAggImpl()
{ OSL_TRACE( "> TestWeakAggImpl dtor called... <\n" ); }
-
+
// A
virtual OUString SAL_CALL a() throw(RuntimeException)
{ return OUString( RTL_CONSTASCII_USTRINGPARAM("a") ); }
@@ -161,7 +161,7 @@ struct TestWeakImpl : public WeakImplHelper4< CA, DBA, FE, G >
virtual ~TestWeakImpl()
{ OSL_TRACE( "> TestWeakImpl dtor called... <\n" ); }
-
+
// A
virtual OUString SAL_CALL a() throw(RuntimeException)
{ return OUString( RTL_CONSTASCII_USTRINGPARAM("a") ); }
@@ -210,7 +210,7 @@ struct TestWeakComponentImpl : public WeakComponentImplHelper4< CA, DBA, FE, G >
void SAL_CALL disposing()
{ OSL_TRACE( "> TestWeakComponentImpl disposing called... <\n" ); }
-
+
// A
virtual OUString SAL_CALL a() throw(RuntimeException)
{ return OUString( RTL_CONSTASCII_USTRINGPARAM("a") ); }
@@ -246,7 +246,7 @@ struct TestWeakAggComponentImpl : public WeakAggComponentImplHelper4< CA, DBA, F
void SAL_CALL disposing()
{ OSL_TRACE( "> TestWeakAggComponentImpl disposing called... <\n" ); }
-
+
// A
virtual OUString SAL_CALL a() throw(RuntimeException)
{ return OUString( RTL_CONSTASCII_USTRINGPARAM("a") ); }
@@ -295,7 +295,7 @@ struct TestImplInh : public ImplInheritanceHelper2< TestWeakImpl, H, I >
virtual ~TestImplInh()
{ OSL_TRACE( "> TestWeakImplInh dtor called... <\n" ); }
-
+
// H
virtual OUString SAL_CALL h() throw(RuntimeException)
{ return OUString( RTL_CONSTASCII_USTRINGPARAM("h") ); }
@@ -309,7 +309,7 @@ struct TestAggImplInh : public AggImplInheritanceHelper2< TestWeakAggImpl, H, I
{
virtual ~TestAggImplInh()
{ OSL_TRACE( "> TestAggImplInh dtor called... <\n" ); }
-
+
// H
virtual OUString SAL_CALL h() throw(RuntimeException)
{ return OUString( RTL_CONSTASCII_USTRINGPARAM("h2") ); }
@@ -348,7 +348,7 @@ static void dotest( const Reference< XInterface > & xOriginal )
{
::fprintf( stderr, n < 15 ? "%x " : "%x \n", id[ n ] );
}
-
+
Reference< A > xa( xOriginal, UNO_QUERY );
OSL_ENSURE( xa->a().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("a") ), "### A failed!" );
Reference< BA > xba( xa, UNO_QUERY );
@@ -372,14 +372,14 @@ static void dotest( const Reference< XInterface > & xOriginal )
// type provider
Reference< lang::XTypeProvider > xProv( xg, UNO_QUERY );
Sequence< Type > aTypes( xProv->getTypes() );
-
+
// CA, DBA, FE, G, XTypeProvider
OSL_ASSERT( isIn( aTypes, "test.CA" ) );
OSL_ASSERT( isIn( aTypes, "test.DBA" ) );
OSL_ASSERT( isIn( aTypes, "test.FE") );
OSL_ASSERT( isIn( aTypes, "test.G") );
OSL_ASSERT( isIn( aTypes, "com.sun.star.lang.XTypeProvider") );
-
+
Reference< XWeak > xWeak( xg, UNO_QUERY );
if (xWeak.is())
{
@@ -390,7 +390,7 @@ static void dotest( const Reference< XInterface > & xOriginal )
{
OSL_ASSERT( isIn( aTypes, "com.sun.star.lang.XComponent") );
}
-
+
Reference< XAggregation > xAgg( xg, UNO_QUERY );
if (xAgg.is())
{
@@ -406,7 +406,7 @@ static void dotest( const Reference< XInterface > & xOriginal )
{
OSL_ASSERT( isIn( aTypes, "test.I") );
}
-
+
OSL_ENSURE( xg == xOriginal, "### root!" );
}
@@ -455,7 +455,7 @@ void test_ImplHelper( const Reference< lang::XMultiServiceFactory > & /*xSF*/ )
xTP3->getImplementationId() != xTP5->getImplementationId() &&
xTP4->getImplementationId() != xTP5->getImplementationId() );
//
-
+
dotest( xImpl );
dotest( xWeakImpl );
dotest( xWeakAggImpl );
@@ -469,7 +469,7 @@ void test_ImplHelper( const Reference< lang::XMultiServiceFactory > & /*xSF*/ )
Reference< I > xI( xH, UNO_QUERY );
OSL_ASSERT( xH->h().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("h") ) );
OSL_ASSERT( xI->i().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("i") ) );
-
+
xWeakAggImpl = (OWeakObject *)new TestAggImplInh();
Reference< lang::XTypeProvider > xTP7( xWeakAggImpl, UNO_QUERY );
dotest( xWeakAggImpl );
@@ -506,7 +506,7 @@ void test_ImplHelper( const Reference< lang::XMultiServiceFactory > & /*xSF*/ )
{
Any a( getCaughtException() );
OSL_ASSERT( a == exc );
-
+
try
{
throwException( a );
@@ -514,7 +514,7 @@ void test_ImplHelper( const Reference< lang::XMultiServiceFactory > & /*xSF*/ )
catch (lang::IllegalAccessException & e)
{
OSL_ASSERT( exc.Message == e.Message && exc.Context == e.Context );
-
+
try
{
throw_one( exc );
@@ -538,7 +538,7 @@ void test_ImplHelper( const Reference< lang::XMultiServiceFactory > & /*xSF*/ )
}
}
OSL_ASSERT( exc_succ );
-
+
try
{
throwException( makeAny( RuntimeException(
diff --git a/cppuhelper/test/testlib/UNO.pm b/cppuhelper/test/testlib/UNO.pm
index 052a9ea986d3..0bc7b27fc86a 100644
--- a/cppuhelper/test/testlib/UNO.pm
+++ b/cppuhelper/test/testlib/UNO.pm
@@ -13,17 +13,17 @@ our @ISA = qw(Exporter DynaLoader);
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.
-# This allows declaration use UNO ':all';
+# This allows declaration use UNO ':all';
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
# will save memory.
our %EXPORT_TAGS = ( 'all' => [ qw(
-
+
) ] );
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
our @EXPORT = qw(
-
+
);
our $VERSION = '0.01';
diff --git a/cppuhelper/test/testlib/defbootstrap_lib.cxx b/cppuhelper/test/testlib/defbootstrap_lib.cxx
index 64c28766a5f3..22a4c5d865a4 100644
--- a/cppuhelper/test/testlib/defbootstrap_lib.cxx
+++ b/cppuhelper/test/testlib/defbootstrap_lib.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -94,7 +94,7 @@ XS(XS_UNO_tryService)
Perl_croak(aTHX_ "Usage: UNO::tryService(input)");
{
const char * input = (const char *)SvPV(ST(0),PL_na);
- int RETVAL;
+ int RETVAL;
dXSTARG;
RETVAL = tryService(input);
diff --git a/cppuhelper/test/testpropshlp.cxx b/cppuhelper/test/testpropshlp.cxx
index 94b1401e35e7..ebea7d09289d 100644
--- a/cppuhelper/test/testpropshlp.cxx
+++ b/cppuhelper/test/testpropshlp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -68,17 +68,17 @@ static Property * getPropertyTable1()
if( ! pTable ) {
static Property aTable[] =
{
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("a") ), 0, getCppuType( (OUString *)0) ,
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("a") ), 0, getCppuType( (OUString *)0) ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), //OUString
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("b") ), 1, getCppuCharType( ) ,
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("b") ), 1, getCppuCharType( ) ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), //Char
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("c") ), 2, getCppuType( (sal_Int32*)0) ,
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("c") ), 2, getCppuType( (sal_Int32*)0) ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), //sal_Int32
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("d") ), 5, getCppuType( (double*)0) ,
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("d") ), 5, getCppuType( (double*)0) ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), //double
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("e") ), 7, getCppuBooleanType() ,
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("e") ), 7, getCppuBooleanType() ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), //BOOL
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("f") ), 8, getCppuType( (Any*)0) ,
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("f") ), 8, getCppuType( (Any*)0) ,
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ) //Any
};
pTable = aTable;
@@ -97,18 +97,18 @@ static Property * getPropertyTable2()
if( ! pTable ) {
static Property aTable[] =
{
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("f") ), 8, getCppuType( (Any *)0) ,
- PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // Any
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("b") ), 1, getCppuCharType( ),
- PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // Char
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("a") ), 0, getCppuType( (OUString*)0),
- PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // OUString
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("d") ), 5, getCppuType( (double*)0) ,
- PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // Double
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("c") ), 2, getCppuType( (sal_Int32*)0),
- PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // sal_Int32
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("e") ), 7, getCppuBooleanType() ,
- PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ) // Bool
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("f") ), 8, getCppuType( (Any *)0) ,
+ PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // Any
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("b") ), 1, getCppuCharType( ),
+ PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // Char
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("a") ), 0, getCppuType( (OUString*)0),
+ PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // OUString
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("d") ), 5, getCppuType( (double*)0) ,
+ PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // Double
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("c") ), 2, getCppuType( (sal_Int32*)0),
+ PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // sal_Int32
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("e") ), 7, getCppuBooleanType() ,
+ PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ) // Bool
};
pTable = aTable;
}
@@ -125,12 +125,12 @@ static Property * getPropertyTable3()
if( ! pTable ) {
static Property aTable[] =
{
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("b") ), 1, getCppuCharType( ),
- PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // Char
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("f") ), 8, getCppuType( (Any *)0) ,
- PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // any
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("a") ), 0, getCppuType( (OUString*)0),
- PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ) // OUString
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("b") ), 1, getCppuCharType( ),
+ PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // Char
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("f") ), 8, getCppuType( (Any *)0) ,
+ PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // any
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("a") ), 0, getCppuType( (OUString*)0),
+ PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ) // OUString
};
pTable = aTable;
}
@@ -148,12 +148,12 @@ static Property * getPropertyTable4()
if( ! pTable ) {
static Property aTable[] =
{
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("a") ), 0, getCppuType( (OUString*)0),
- PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // OUString
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("b") ), 1, getCppuCharType( ),
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("a") ), 0, getCppuType( (OUString*)0),
+ PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // OUString
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("b") ), 1, getCppuCharType( ),
PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ), // Char
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("f") ), 2, getCppuType( (Any *)0) ,
- PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ) // Any
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("f") ), 2, getCppuType( (Any *)0) ,
+ PropertyAttribute::READONLY | PropertyAttribute::MAYBEVOID ) // Any
};
pTable = aTable;
}
@@ -181,9 +181,9 @@ void test_PropertyArrayHelper()
OSL_ENSURE( 6 == aProps.getLength(), "getProperties() gives not all properties" );
for( int i = 0; i < 6; i++ )
{
- OSL_ENSURE( pP[i].Name == getPropertyTable1()[i].Name , "Name not correct" );
- OSL_ENSURE( pP[i].Handle == getPropertyTable1()[i].Handle, "Handle not correct" );
- OSL_ENSURE( pP[i].Attributes == getPropertyTable1()[i].Attributes, "Attributes not correct" );
+ OSL_ENSURE( pP[i].Name == getPropertyTable1()[i].Name , "Name not correct" );
+ OSL_ENSURE( pP[i].Handle == getPropertyTable1()[i].Handle, "Handle not correct" );
+ OSL_ENSURE( pP[i].Attributes == getPropertyTable1()[i].Attributes, "Attributes not correct" );
OSL_ENSURE( pP[i].Type == getPropertyTable1()[i].Type, "Type not correct" );
}
}
@@ -258,14 +258,14 @@ void test_PropertyArrayHelper()
sal_Int32 Handle = a1.getHandleByName( OUString( RTL_CONSTASCII_USTRINGPARAM("asdaf") ) );
OSL_ENSURE( Handle == -1, "Handle not correct" );
}
-
+
// Test fillPropertyMembersByHandle
{
OPropertyArrayHelper a1( getPropertyTable1(), 6 );
int i;
for( i = 0; i < 6; i++ )
{
- sal_Int16 nAttributes;
+ sal_Int16 nAttributes;
OUString aPropName;
sal_Bool b = a1.fillPropertyMembersByHandle( &aPropName, &nAttributes, getPropertyTable1()[i].Handle );
OSL_ENSURE( b, "fillPropertyMembersByHandle: handle not found" );
@@ -277,7 +277,7 @@ void test_PropertyArrayHelper()
OPropertyArrayHelper a4( getPropertyTable4(), 3 );
for( i = 0; i < 3; i++ )
{
- sal_Int16 nAttributes;
+ sal_Int16 nAttributes;
OUString aPropName;
sal_Bool b = a1.fillPropertyMembersByHandle( &aPropName, &nAttributes, getPropertyTable4()[i].Handle );
OSL_ENSURE( b, "fillPropertyMembersByHandle: handle not found" );
@@ -310,28 +310,28 @@ void test_PropertyArrayHelper()
//----------------------------------------------------
-// test_OPropertySetHelper
+// test_OPropertySetHelper
//----------------------------------------------------
struct MutexContainer
{
Mutex aMutex;
};
-class test_OPropertySetHelper :
+class test_OPropertySetHelper :
public MutexContainer,
- public OBroadcastHelper ,
+ public OBroadcastHelper ,
public OPropertySetHelper,
public OWeakObject
{
public:
- test_OPropertySetHelper( Property * p, sal_Int32 n )
- : MutexContainer()
+ test_OPropertySetHelper( Property * p, sal_Int32 n )
+ : MutexContainer()
, OBroadcastHelper( ((MutexContainer *)this)->aMutex )
-// , OPropertySetHelper( *SAL_STATIC_CAST(OBroadcastHelper *,this))
- // MSCI 4 bug ! :
- // OBroadcastHelper == OBroadcastHelperVar<OMultiTypeInterfaceContainerHelper>
- , OPropertySetHelper(
- *SAL_STATIC_CAST(OBroadcastHelper *,this))
+// , OPropertySetHelper( *SAL_STATIC_CAST(OBroadcastHelper *,this))
+ // MSCI 4 bug ! :
+ // OBroadcastHelper == OBroadcastHelperVar<OMultiTypeInterfaceContainerHelper>
+ , OPropertySetHelper(
+ *SAL_STATIC_CAST(OBroadcastHelper *,this))
, bBOOL( sal_False )
, nINT16( 0 )
, nINT32( 0 )
@@ -339,7 +339,7 @@ public:
, nPropCount( n )
{
}
-
+
~test_OPropertySetHelper()
{
@@ -362,7 +362,7 @@ public:
disposing();
EventObject aEvt;
aEvt.Source = Reference < XInterface > ( SAL_STATIC_CAST( OWeakObject * ,this) );
-
+
rBHelper.aLC.disposeAndClear( aEvt );
rBHelper.bDisposed = sal_True;
rBHelper.bInDispose = sal_False;
@@ -370,14 +370,14 @@ public:
}
// XInterface
- Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(RuntimeException)
- {
+ Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(RuntimeException)
+ {
Any aRet( OPropertySetHelper::queryInterface( rType ) );
return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ));
}
- void SAL_CALL acquire() throw()
+ void SAL_CALL acquire() throw()
{ OWeakObject::acquire(); }
- void SAL_CALL release() throw()
+ void SAL_CALL release() throw()
{ OWeakObject::release(); }
// XPropertySet
@@ -385,15 +385,15 @@ public:
using OPropertySetHelper::getFastPropertyValue;
- sal_Bool bBOOL;
- sal_Int16 nINT16;
- sal_Int32 nINT32;
+ sal_Bool bBOOL;
+ sal_Int16 nINT16;
+ sal_Int32 nINT32;
Property * pBasicProps;
- sal_Int32 nPropCount;
+ sal_Int32 nPropCount;
protected:
IPropertyArrayHelper & SAL_CALL getInfoHelper() throw(RuntimeException);
sal_Bool SAL_CALL convertFastPropertyValue(
- Any & rConvertedValue, Any & rOldValue,
+ Any & rConvertedValue, Any & rOldValue,
sal_Int32 nHandle, const Any& rValue )
throw(IllegalArgumentException);
void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw(RuntimeException);
@@ -404,12 +404,12 @@ protected:
//------ The Properties of this implementation -------------------------
//----------------------------------------------------------------------
// Id must be the index into the array
-#define PROPERTY_BOOL 0
-#define PROPERTY_INT16 1
-#define PROPERTY_INT32 2
+#define PROPERTY_BOOL 0
+#define PROPERTY_INT16 1
+#define PROPERTY_INT32 2
// Max number of properties
-#define PROPERTY_COUNT 4
+#define PROPERTY_COUNT 4
// Names of Properties
/**
* All Properties of this implementation. Must be sorted by name.
@@ -424,11 +424,11 @@ Property * getBasicProps()
static Property aBasicProps[PROPERTY_COUNT] =
{
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") ) , PROPERTY_BOOL , getCppuBooleanType(), PropertyAttribute::READONLY ),
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ) , PROPERTY_INT16,
- getCppuType( (sal_Int16*)0 ), PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED ),
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") ) , PROPERTY_INT32, getCppuType( (sal_Int32*)0 ), PropertyAttribute::BOUND ),
- Property( OUString( RTL_CONSTASCII_USTRINGPARAM("TEST") ) , 55 , getCppuType( (sal_Int32*)0), PropertyAttribute::BOUND )
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") ) , PROPERTY_BOOL , getCppuBooleanType(), PropertyAttribute::READONLY ),
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ) , PROPERTY_INT16,
+ getCppuType( (sal_Int16*)0 ), PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED ),
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") ) , PROPERTY_INT32, getCppuType( (sal_Int32*)0 ), PropertyAttribute::BOUND ),
+ Property( OUString( RTL_CONSTASCII_USTRINGPARAM("TEST") ) , 55 , getCppuType( (sal_Int32*)0), PropertyAttribute::BOUND )
};
pTable = aBasicProps;
}
@@ -438,17 +438,17 @@ Property * getBasicProps()
//----------------------------------------------------
-// test_OPropertySetHelper_Listener
+// test_OPropertySetHelper_Listener
//----------------------------------------------------
class test_OPropertySetHelper_Listener
: public WeakImplHelper3< XPropertyChangeListener, XPropertiesChangeListener, XVetoableChangeListener >
{
public:
- sal_Int32 nDisposing;
- Mutex aMutex;
- Any * pExceptedListenerValues;
- sal_Int32 nCount;
- sal_Int32 nCurrent;
+ sal_Int32 nDisposing;
+ Mutex aMutex;
+ Any * pExceptedListenerValues;
+ sal_Int32 nCount;
+ sal_Int32 nCurrent;
test_OPropertySetHelper_Listener( Any * p = 0, sal_Int32 n = 0 )
: nDisposing( 0 )
@@ -460,19 +460,19 @@ public:
~test_OPropertySetHelper_Listener()
{
}
-
- sal_Int32 getRefCount()
+
+ sal_Int32 getRefCount()
{ return m_refCount; }
// XEventListener
- void SAL_CALL disposing(const EventObject& /*evt*/) throw ( RuntimeException)
+ void SAL_CALL disposing(const EventObject& /*evt*/) throw ( RuntimeException)
{
MutexGuard aGuard( aMutex );
nDisposing++;
}
// XPropertyChangeListener
- void SAL_CALL propertyChange(const PropertyChangeEvent& evt) throw (RuntimeException)
+ void SAL_CALL propertyChange(const PropertyChangeEvent& evt) throw (RuntimeException)
{
if( !pExceptedListenerValues )
return;
@@ -483,7 +483,7 @@ public:
{
case PROPERTY_BOOL:
{
- OSL_ENSURE( sal_False , "PropertySetHelper: BOOL cannot change" );
+ OSL_ENSURE( sal_False , "PropertySetHelper: BOOL cannot change" );
OSL_ENSURE( evt.PropertyName == OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") ), "PropertySetHelper: wrong name" );
}
break;
@@ -491,35 +491,35 @@ public:
case PROPERTY_INT16:
{
OSL_ENSURE( evt.PropertyName == OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), "PropertySetHelper: wrong name" );
-
+
OSL_ENSURE( pExceptedListenerValues[nCurrent].getValueType().getTypeClass() == TypeClass_SHORT ,
"PropertySetHelper: wrong data type" );
-
+
sal_Int16 nInt16, nOldInt16;
- pExceptedListenerValues[nCurrent] >>= nInt16;
- evt.OldValue >>= nOldInt16;
+ pExceptedListenerValues[nCurrent] >>= nInt16;
+ evt.OldValue >>= nOldInt16;
OSL_ENSURE( nInt16 == nOldInt16, "PropertySetHelper: wrong old value" );
-
+
pExceptedListenerValues[nCurrent+1] >>= nInt16;
- evt.NewValue >>= nOldInt16;
- OSL_ENSURE( nInt16 == nOldInt16 , "PropertySetHelper: wrong new value" );
+ evt.NewValue >>= nOldInt16;
+ OSL_ENSURE( nInt16 == nOldInt16 , "PropertySetHelper: wrong new value" );
}
break;
case PROPERTY_INT32:
{
OSL_ENSURE( evt.PropertyName == OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") ), "PropertySetHelper: wrong name" );
-
- sal_Int32 nInt32,nOldInt32;
-
+
+ sal_Int32 nInt32,nOldInt32;
+
pExceptedListenerValues[nCurrent] >>= nInt32;
evt.OldValue >>= nOldInt32;
- OSL_ENSURE( nInt32 == nOldInt32 , "PropertySetHelper: wrong old value" );
-
+ OSL_ENSURE( nInt32 == nOldInt32 , "PropertySetHelper: wrong old value" );
+
pExceptedListenerValues[nCurrent+1] >>= nInt32;
evt.NewValue >>= nOldInt32;
- OSL_ENSURE( nInt32 == nOldInt32 , "PropertySetHelper: wrong new value" );
+ OSL_ENSURE( nInt32 == nOldInt32 , "PropertySetHelper: wrong new value" );
}
break;
@@ -541,7 +541,7 @@ public:
{
case PROPERTY_BOOL:
{
- OSL_ENSURE( sal_False , "PropertySetHelper: BOOL cannot change" );
+ OSL_ENSURE( sal_False , "PropertySetHelper: BOOL cannot change" );
OSL_ENSURE( evt.PropertyName == OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") ), "PropertySetHelper: wrong name" );
}
break;
@@ -549,17 +549,17 @@ public:
case PROPERTY_INT16:
{
OSL_ENSURE( evt.PropertyName == OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), "PropertySetHelper: wrong name" );
-
+
sal_Int16 nInt16, nOldInt16;
- pExceptedListenerValues[nCurrent] >>= nInt16;
- evt.OldValue >>= nOldInt16;
-
+ pExceptedListenerValues[nCurrent] >>= nInt16;
+ evt.OldValue >>= nOldInt16;
+
OSL_ENSURE( nInt16 == nOldInt16,"PropertySetHelper: wrong old value" );
-
- pExceptedListenerValues[nCurrent+1] >>= nInt16;
- evt.NewValue >>= nOldInt16;
- OSL_ENSURE( nInt16 == nOldInt16 , "PropertySetHelper: wrong new value" );
-
+
+ pExceptedListenerValues[nCurrent+1] >>= nInt16;
+ evt.NewValue >>= nOldInt16;
+ OSL_ENSURE( nInt16 == nOldInt16 , "PropertySetHelper: wrong new value" );
+
if( nOldInt16 == 100 )
{
nCurrent += 2;
@@ -571,12 +571,12 @@ public:
case PROPERTY_INT32:
{
OSL_ENSURE( evt.PropertyName == OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") ), "PropertySetHelper: wrong name" );
-
- sal_Int32 nInt32,nOldInt32;
+
+ sal_Int32 nInt32,nOldInt32;
pExceptedListenerValues[nCurrent] >>= nInt32;
evt.OldValue >>= nOldInt32;
OSL_ENSURE( nInt32 == nOldInt32 , "PropertySetHelper: wrong old value" );
-
+
pExceptedListenerValues[nCurrent+1] >>= nInt32;
evt.NewValue >>= nOldInt32;
OSL_ENSURE( nInt32 == nOldInt32 , "PropertySetHelper: wrong new value" );
@@ -614,13 +614,13 @@ public:
OSL_ENSURE( evt.PropertyName == OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), "PropertySetHelper: wrong name" );
sal_Int16 nInt16, nOldInt16;
- pExceptedListenerValues[nCurrent] >>= nInt16;
- evt.OldValue >>= nOldInt16;
+ pExceptedListenerValues[nCurrent] >>= nInt16;
+ evt.OldValue >>= nOldInt16;
OSL_ENSURE( nInt16 == nOldInt16 , "PropertySetHelper: wrong old value" );
+
-
- pExceptedListenerValues[nCurrent+1] >>= nInt16;
- evt.NewValue >>= nOldInt16;
+ pExceptedListenerValues[nCurrent+1] >>= nInt16;
+ evt.NewValue >>= nOldInt16;
OSL_ENSURE( nInt16 == nOldInt16 , "PropertySetHelper: wrong new value" );
}
break;
@@ -629,15 +629,15 @@ public:
{
OSL_ENSURE( evt.PropertyName == OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") ), "PropertySetHelper: wrong name" );
-
- sal_Int32 nInt32,nOldInt32;
+
+ sal_Int32 nInt32,nOldInt32;
pExceptedListenerValues[nCurrent] >>= nInt32;
evt.OldValue >>= nOldInt32;
OSL_ENSURE( nInt32 == nOldInt32 , "PropertySetHelper: wrong old value" );
-
+
pExceptedListenerValues[nCurrent+1] >>= nInt32;
evt.NewValue >>= nOldInt32;
- OSL_ENSURE( nInt32 == nOldInt32 , "PropertySetHelper: wrong new value" );
+ OSL_ENSURE( nInt32 == nOldInt32 , "PropertySetHelper: wrong new value" );
}
break;
@@ -671,9 +671,9 @@ Reference < XPropertySetInfo > test_OPropertySetHelper::getPropertySetInfo()
// Return sal_True, value changed
sal_Bool test_OPropertySetHelper::convertFastPropertyValue
(
- Any & rConvertedValue,
- Any & rOldValue,
- sal_Int32 nHandle,
+ Any & rConvertedValue,
+ Any & rOldValue,
+ sal_Int32 nHandle,
const Any& rValue
)throw(IllegalArgumentException)
{
@@ -684,8 +684,8 @@ sal_Bool test_OPropertySetHelper::convertFastPropertyValue
sal_Bool b;
convertPropertyValue( b , rValue );
if( b != bBOOL )
- {
-
+ {
+
rConvertedValue.setValue( &b , ::getCppuBooleanType() );
rOldValue.setValue( & bBOOL , ::getCppuBooleanType() );
return sal_True;
@@ -698,11 +698,11 @@ sal_Bool test_OPropertySetHelper::convertFastPropertyValue
{
sal_Int16 n16;
convertPropertyValue( n16 , rValue );
-
+
if( n16 != nINT16 )
{
- rConvertedValue <<= n16;
- rOldValue <<= nINT16;
+ rConvertedValue <<= n16;
+ rOldValue <<= nINT16;
return sal_True;
}
else
@@ -716,7 +716,7 @@ sal_Bool test_OPropertySetHelper::convertFastPropertyValue
if( n32 != nINT32 )
{
rConvertedValue <<= n32;
- rOldValue <<= nINT32;
+ rOldValue <<= nINT32;
return sal_True;
}
else
@@ -729,12 +729,12 @@ sal_Bool test_OPropertySetHelper::convertFastPropertyValue
}
}
-/**
+/**
* only set the value.
*/
void test_OPropertySetHelper::setFastPropertyValue_NoBroadcast
(
- sal_Int32 nHandle,
+ sal_Int32 nHandle,
const Any& rValue
)throw(RuntimeException)
{
@@ -802,24 +802,24 @@ void test_PropertySetHelper()
// first test getBasicProps() Handles are { 0, 1, 2 }
xPS = pPS = new test_OPropertySetHelper( getBasicProps(), PROPERTY_COUNT - z );
xPS_L = static_cast< XPropertyChangeListener * >( pPS_L = new test_OPropertySetHelper_Listener() );
-
+
// Test queryInterface
Reference < XPropertySet > rProp( xPS , UNO_QUERY );
OSL_ENSURE( rProp.is() , "PropertySetHelper: XPropertySet nor supported" );
-
+
Reference < XMultiPropertySet > rMulti( xPS , UNO_QUERY );
OSL_ENSURE( rMulti.is() , "PropertySetHelper: XMultiPropertySet nor supported" );
-
+
Reference < XFastPropertySet > rFast( xPS , UNO_QUERY );
OSL_ENSURE( rFast.is() , "PropertySetHelper: XFastPropertySet nor supported" );
x = Reference < XInterface > ();
-
+
// Test add-remove listener
{
- Reference < XPropertiesChangeListener > x1( xPS_L, UNO_QUERY );
- Reference < XVetoableChangeListener > x2( xPS_L, UNO_QUERY );
-
+ Reference < XPropertiesChangeListener > x1( xPS_L, UNO_QUERY );
+ Reference < XVetoableChangeListener > x2( xPS_L, UNO_QUERY );
+
xPS->addPropertyChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), xPS_L );
Sequence<OUString> szPN( 3 );
szPN.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") );
@@ -830,7 +830,7 @@ void test_PropertySetHelper()
szPN = Sequence<OUString>();
pPS->addPropertiesChangeListener( szPN, x1 );
pPS->addVetoableChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), x2 );
-
+
xPS->removePropertyChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), xPS_L );
pPS->removePropertiesChangeListener( x1 );
pPS->removePropertiesChangeListener( x1 );
@@ -844,9 +844,9 @@ void test_PropertySetHelper()
}
catch( UnknownPropertyException & /*e*/ )
{
-
+
}
-
+
try
{
xPS->addVetoableChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("Does not exist") ), x2 );
@@ -854,17 +854,17 @@ void test_PropertySetHelper()
}
catch( UnknownPropertyException & /*e*/ )
{
-
+
}
-
+
}
OSL_ENSURE( pPS_L->getRefCount() == 1, "PropertySetHelper: wrong reference count" );
-
+
// Test disposing
{
Reference < XPropertiesChangeListener > x1( xPS_L, UNO_QUERY );
- Reference < XVetoableChangeListener > x2( xPS_L, UNO_QUERY );
-
+ Reference < XVetoableChangeListener > x2( xPS_L, UNO_QUERY );
+
xPS->addPropertyChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), xPS_L );
Sequence<OUString> szPN( 2 );
szPN.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") );
@@ -875,11 +875,11 @@ void test_PropertySetHelper()
pPS->addVetoableChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), x2 );
pPS->dispose();
}
- OSL_ENSURE( pPS_L->nDisposing == 4 , "PropertySetHelper: wrong disposing count" );
- OSL_ENSURE( pPS_L->getRefCount() == 1 , "PropertySetHelper: wrong reference count" );
+ OSL_ENSURE( pPS_L->nDisposing == 4 , "PropertySetHelper: wrong disposing count" );
+ OSL_ENSURE( pPS_L->getRefCount() == 1 , "PropertySetHelper: wrong reference count" );
pPS_L->nDisposing = 0;
xPS = pPS = new test_OPropertySetHelper( getBasicProps(), PROPERTY_COUNT - z );
-
+
// Test set- and get- (Fast) propertyValue
{
// set read only property
@@ -909,7 +909,7 @@ void test_PropertySetHelper()
catch( PropertyVetoException & /*e*/ )
{
}
-
+
// set unknown property
try
{
@@ -934,7 +934,7 @@ void test_PropertySetHelper()
catch( UnknownPropertyException & /*e*/ )
{
}
-
+
// get unknown property
try
{
@@ -945,8 +945,8 @@ void test_PropertySetHelper()
catch( UnknownPropertyException & /*e*/ )
{
}
-
- try
+
+ try
{
Any aBool;
aBool = ((XFastPropertySet *)pPS)->getFastPropertyValue( 3 );
@@ -955,7 +955,7 @@ void test_PropertySetHelper()
catch( UnknownPropertyException & /*e*/ )
{
}
-
+
// set property with invalid type
try
{
@@ -976,7 +976,7 @@ void test_PropertySetHelper()
catch( IllegalArgumentException & /*e*/ )
{
}
-
+
// narrowing conversion is not allowed!
try
{
@@ -1001,7 +1001,7 @@ void test_PropertySetHelper()
{
}
-
+
Any aValue;
aValue = xPS->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") ) );
sal_Bool b = *( (sal_Bool*)aValue.getValue());
@@ -1010,7 +1010,7 @@ void test_PropertySetHelper()
b = *((sal_Bool*)aValue.getValue());
OSL_ENSURE( !b, "PropertySetHelper: wrong BOOL value" );
-
+
sal_Int16 n16;
aValue <<=(sal_Int16)22;
xPS->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), aValue );
@@ -1023,7 +1023,7 @@ void test_PropertySetHelper()
aValue = ((XFastPropertySet *)pPS)->getFastPropertyValue( PROPERTY_INT16 );
aValue >>= n16;
OSL_ENSURE( 44 == n16, "PropertySetHelper: wrong INT16 value" );
-
+
// widening conversion
aValue <<= (sal_Int16)55;
xPS->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") ), aValue );
@@ -1036,28 +1036,28 @@ void test_PropertySetHelper()
aValue = ((XFastPropertySet *)pPS)->getFastPropertyValue( PROPERTY_INT32 );
aValue >>= n32;
OSL_ENSURE( 66 == n32, "PropertySetHelper: wrong INT32 value" );
-
+
Sequence< OUString >valueNames = Sequence<OUString>( 3 );
valueNames.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") );
valueNames.getArray()[1] = OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") );
valueNames.getArray()[2] = OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") );
Sequence< Any > aValues = pPS->getPropertyValues( valueNames );
-
+
b = *((sal_Bool*)aValues.getConstArray()[0].getValue());
aValues.getConstArray()[1] >>= n16;
aValues.getConstArray()[2] >>= n32;
-
+
OSL_ENSURE( !b, "PropertySetHelper: wrong BOOL value" );
OSL_ENSURE( 44 == n16, "PropertySetHelper: wrong INT16 value" );
OSL_ENSURE( 66 == n32, "PropertySetHelper: wrong INT32 value" );
}
pPS->nINT32 = 0;
pPS->nINT16 = 0;
-
+
// Test add-remove listener
{
Reference < XVetoableChangeListener > x2( xPS_L, UNO_QUERY );
-
+
xPS->addPropertyChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), xPS_L );
pPS->addVetoableChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), x2 );
@@ -1067,17 +1067,17 @@ void test_PropertySetHelper()
pPS_L->pExceptedListenerValues = aSeq.getArray();
- pPS_L->pExceptedListenerValues[0] <<= (sal_Int16) 0; // old value vetoable
- pPS_L->pExceptedListenerValues[1] <<= (sal_Int16) 22; // new value vetoable
- pPS_L->pExceptedListenerValues[2] <<= (sal_Int16) 0; // old value bound
- pPS_L->pExceptedListenerValues[3] <<= (sal_Int16) 22; // new value bound
- pPS_L->pExceptedListenerValues[4] <<= (sal_Int16) 22; // old value vetoable
- pPS_L->pExceptedListenerValues[5] <<= (sal_Int16) 44; // new value vetoable
- pPS_L->pExceptedListenerValues[6] <<= (sal_Int16) 22; // old value bound
- pPS_L->pExceptedListenerValues[7] <<= (sal_Int16) 44; // new value bound
- pPS_L->pExceptedListenerValues[8] <<= (sal_Int16) 44; // old value vetoable
- pPS_L->pExceptedListenerValues[9] <<= (sal_Int16) 100; // new value vetoable exception
-
+ pPS_L->pExceptedListenerValues[0] <<= (sal_Int16) 0; // old value vetoable
+ pPS_L->pExceptedListenerValues[1] <<= (sal_Int16) 22; // new value vetoable
+ pPS_L->pExceptedListenerValues[2] <<= (sal_Int16) 0; // old value bound
+ pPS_L->pExceptedListenerValues[3] <<= (sal_Int16) 22; // new value bound
+ pPS_L->pExceptedListenerValues[4] <<= (sal_Int16) 22; // old value vetoable
+ pPS_L->pExceptedListenerValues[5] <<= (sal_Int16) 44; // new value vetoable
+ pPS_L->pExceptedListenerValues[6] <<= (sal_Int16) 22; // old value bound
+ pPS_L->pExceptedListenerValues[7] <<= (sal_Int16) 44; // new value bound
+ pPS_L->pExceptedListenerValues[8] <<= (sal_Int16) 44; // old value vetoable
+ pPS_L->pExceptedListenerValues[9] <<= (sal_Int16) 100; // new value vetoable exception
+
Any aValue;
aValue <<= (sal_Int16)22;
xPS->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), aValue );
@@ -1103,12 +1103,12 @@ void test_PropertySetHelper()
xPS->removePropertyChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), xPS_L );
pPS->removeVetoableChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ), x2 );
}
-
+
// Test multi property set listener
{
Reference < XPropertiesChangeListener > x1( xPS_L, UNO_QUERY );
Reference < XVetoableChangeListener > x2( xPS_L, UNO_QUERY );
-
+
pPS->addVetoableChangeListener( OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") ) , x2 );
Sequence<OUString> szPN( 4 );
szPN.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("BOOL") );
@@ -1116,19 +1116,19 @@ void test_PropertySetHelper()
szPN.getArray()[2] = OUString( RTL_CONSTASCII_USTRINGPARAM("Does not exist") ); // must ne ignored by the addPropertiesChangeListener method
szPN.getArray()[3] = OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") );
pPS->addPropertiesChangeListener( szPN, x1 );
-
+
pPS_L->nCount = 6;
Sequence< Any > aSeq( pPS_L->nCount );
pPS_L->nCurrent = 0;
pPS_L->pExceptedListenerValues = aSeq.getArray();
- pPS_L->pExceptedListenerValues[0] <<= (sal_Int16) 0; // old value vetoable
- pPS_L->pExceptedListenerValues[1] <<= (sal_Int16 ) 22; // new value vetoable
+ pPS_L->pExceptedListenerValues[0] <<= (sal_Int16) 0; // old value vetoable
+ pPS_L->pExceptedListenerValues[1] <<= (sal_Int16 ) 22; // new value vetoable
// INT32 is not constrained
- pPS_L->pExceptedListenerValues[2] <<= (sal_Int16) 0; // old value bound
- pPS_L->pExceptedListenerValues[3] <<= (sal_Int16) 22; // new value bound
- pPS_L->pExceptedListenerValues[4] <<= (sal_Int32) 0; // old value bound
- pPS_L->pExceptedListenerValues[5] <<= (sal_Int32) 44; // new value bound
-
+ pPS_L->pExceptedListenerValues[2] <<= (sal_Int16) 0; // old value bound
+ pPS_L->pExceptedListenerValues[3] <<= (sal_Int16) 22; // new value bound
+ pPS_L->pExceptedListenerValues[4] <<= (sal_Int32) 0; // old value bound
+ pPS_L->pExceptedListenerValues[5] <<= (sal_Int32) 44; // new value bound
+
szPN = Sequence<OUString>( 2 );
szPN.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") );
szPN.getArray()[1] = OUString( RTL_CONSTASCII_USTRINGPARAM("INT32") );
@@ -1137,7 +1137,7 @@ void test_PropertySetHelper()
aValues.getArray()[1] <<= (sal_Int16) 44;
pPS->setPropertyValues( szPN, aValues );
OSL_ENSURE( pPS_L->nCount == pPS_L->nCurrent, "not all listeners called" );
-
+
//firePropertiesChangeEvent
pPS->nINT16 = 8;
pPS->nINT32 = 5;
@@ -1149,20 +1149,20 @@ void test_PropertySetHelper()
pPS_L->pExceptedListenerValues[3] <<= (sal_Int32) 5; // new value
pPS->firePropertiesChangeEvent( szPN, pPS_L );
OSL_ENSURE( pPS_L->nCount == pPS_L->nCurrent, "not all listeners called" );
-
-
- //vetoable exception with multible
+
+
+ //vetoable exception with multible
szPN.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") );
szPN.getArray()[1] = OUString( RTL_CONSTASCII_USTRINGPARAM("INT16") );
pPS->nINT32 = 0;
pPS->nINT16 = 0;
pPS_L->nCount = 4;
pPS_L->nCurrent = 0;
- pPS_L->pExceptedListenerValues[0] <<= (sal_Int16) 0; // old value vetoable
- pPS_L->pExceptedListenerValues[1] <<= (sal_Int16) 44; // new value vetoable
- pPS_L->pExceptedListenerValues[2] <<= (sal_Int16) 0; // old value vetoable
- pPS_L->pExceptedListenerValues[3] <<= (sal_Int16) 100; // new value vetoable
-
+ pPS_L->pExceptedListenerValues[0] <<= (sal_Int16) 0; // old value vetoable
+ pPS_L->pExceptedListenerValues[1] <<= (sal_Int16) 44; // new value vetoable
+ pPS_L->pExceptedListenerValues[2] <<= (sal_Int16) 0; // old value vetoable
+ pPS_L->pExceptedListenerValues[3] <<= (sal_Int16) 100; // new value vetoable
+
try
{
aValues.getArray()[0] <<= (sal_Int16)44;
diff --git a/cppuhelper/test/testproptyphlp.cxx b/cppuhelper/test/testproptyphlp.cxx
index d913c7879b60..852fa33ba09f 100644
--- a/cppuhelper/test/testproptyphlp.cxx
+++ b/cppuhelper/test/testproptyphlp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite