summaryrefslogtreecommitdiff
path: root/extensions/test
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/test')
-rw-r--r--extensions/test/ole/AxTestComponents/AxTestComponents.cpp6
-rw-r--r--extensions/test/ole/AxTestComponents/AxTestComponents.idl32
-rw-r--r--extensions/test/ole/AxTestComponents/Basic.cpp44
-rw-r--r--extensions/test/ole/AxTestComponents/Basic.h8
-rw-r--r--extensions/test/ole/AxTestComponents/Foo.cpp2
-rw-r--r--extensions/test/ole/AxTestComponents/Foo.h6
-rw-r--r--extensions/test/ole/AxTestComponents/StdAfx.cpp2
-rw-r--r--extensions/test/ole/AxTestComponents/StdAfx.h2
-rw-r--r--extensions/test/ole/AxTestComponents/resource.h4
-rw-r--r--extensions/test/ole/EventListenerSample/EventListener/EventListener.cpp2
-rw-r--r--extensions/test/ole/EventListenerSample/EventListener/EvtListener.h2
-rw-r--r--extensions/test/ole/EventListenerSample/EventListener/resource.h2
-rw-r--r--extensions/test/ole/MfcControl/MfcControlCtl.cpp34
-rw-r--r--extensions/test/ole/MfcControl/MfcControlCtl.h2
-rw-r--r--extensions/test/ole/MfcControl/StdAfx.h10
-rw-r--r--extensions/test/ole/OleClient/axhost.cxx2
-rw-r--r--extensions/test/ole/OleClient/axhost.hxx4
-rw-r--r--extensions/test/ole/OleClient/clientTest.cxx178
-rw-r--r--extensions/test/ole/OleClient/funcs.cxx50
-rw-r--r--extensions/test/ole/OleConverterVar1/convTest.cxx140
-rw-r--r--extensions/test/ole/OleConverterVar1/smartarray.h112
-rw-r--r--extensions/test/ole/cpnt/cpnt.cxx324
-rw-r--r--extensions/test/ole/cppToUno/testcppuno.cxx26
-rw-r--r--extensions/test/ole/cpptest/cpptest.cxx8
-rw-r--r--extensions/test/ole/idl/oletest.idl26
-rw-r--r--extensions/test/ole/unloading/unloadTest.cxx28
-rw-r--r--extensions/test/ole/unoTocomCalls/Test/StdAfx.cpp6
-rw-r--r--extensions/test/ole/unoTocomCalls/Test/StdAfx.h4
-rw-r--r--extensions/test/ole/unoTocomCalls/Test/Test.cpp26
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.cpp48
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.h36
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.cpp6
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.h8
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.cpp2
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.h2
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.cpp4
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.idl16
-rw-r--r--extensions/test/ole/unoTocomCalls/XCallback_Impl/resource.h4
-rw-r--r--extensions/test/pgp/TestPGP.java34
-rw-r--r--extensions/test/sax/factory.hxx4
-rw-r--r--extensions/test/sax/testsax.cxx176
-rw-r--r--extensions/test/sax/testwriter.cxx106
-rw-r--r--extensions/test/stm/datatest.cxx502
-rw-r--r--extensions/test/stm/marktest.cxx92
-rw-r--r--extensions/test/stm/pipetest.cxx62
-rw-r--r--extensions/test/stm/testfactreg.cxx34
-rw-r--r--extensions/test/stm/testfactreg.hxx22
47 files changed, 1125 insertions, 1125 deletions
diff --git a/extensions/test/ole/AxTestComponents/AxTestComponents.cpp b/extensions/test/ole/AxTestComponents/AxTestComponents.cpp
index 283cffd5f0bc..7d82204aa917 100644
--- a/extensions/test/ole/AxTestComponents/AxTestComponents.cpp
+++ b/extensions/test/ole/AxTestComponents/AxTestComponents.cpp
@@ -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
@@ -28,7 +28,7 @@
// Note: Proxy/Stub Information
-// To build a separate proxy/stub DLL,
+// To build a separate proxy/stub DLL,
// run nmake -f AxTestComponentsps.mk in the project directory.
#include "stdafx.h"
@@ -96,6 +96,6 @@ STDAPI DllUnregisterServer(void)
}
-//VT_I4 size_t V_ERROR VARIANT VARIANT_FALSE CComVariant FADF_EMBEDDED
+//VT_I4 size_t V_ERROR VARIANT VARIANT_FALSE CComVariant FADF_EMBEDDED
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/test/ole/AxTestComponents/AxTestComponents.idl b/extensions/test/ole/AxTestComponents/AxTestComponents.idl
index 707d85f58941..ad8cca5d2928 100644
--- a/extensions/test/ole/AxTestComponents/AxTestComponents.idl
+++ b/extensions/test/ole/AxTestComponents/AxTestComponents.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
@@ -124,37 +124,37 @@ import "ocidl.idl";
[id(70), helpstring("method inMulDimArrayByte2")] HRESULT inMulDimArrayByte2([in] SAFEARRAY(unsigned char) val);
[id(71), helpstring("method outMore")] HRESULT outMore([out]long* val1, [out]long* val2);
- [id(72), helpstring("method optional1")]
+ [id(72), helpstring("method optional1")]
HRESULT optional1([in] long val1, [in, optional] VARIANT* val2);
- [id(73), helpstring("method optional2")]
+ [id(73), helpstring("method optional2")]
HRESULT optional2([out] long* val1, [out, optional] VARIANT* val2);
- [id(74), helpstring("method optional3")]
+ [id(74), helpstring("method optional3")]
HRESULT optional3([in, optional] VARIANT* val1, [in, optional] VARIANT* val2);
- [id(75), helpstring("method optional4")]
+ [id(75), helpstring("method optional4")]
HRESULT optional4([in, out, optional] VARIANT* val1, [in, out, optional] VARIANT* val2);
- [id(76), helpstring("method optional5")]
+ [id(76), helpstring("method optional5")]
HRESULT optional5([out, optional] VARIANT* val1, [out, optional] VARIANT* val2);
//midl creates for val4 a BSTR "4" as default value in the TLB. The midl complains
//but the error message seems to be not for this case.
//in defaultvalue2 val4 has an VT_I4 in the TLB. This must be a bug!
- [id(77), helpstring("method defaultvalue1")]
- HRESULT defaultvalue1([in, defaultvalue(1)] long val1,
+ [id(77), helpstring("method defaultvalue1")]
+ HRESULT defaultvalue1([in, defaultvalue(1)] long val1,
[in, defaultvalue(2)] double* val2,
// [in, defaultvalue(3)] VARIANT val3, //ok
[in, defaultvalue(4)] VARIANT* val4);
// bug im midl: when val3 and val4 are pointers then the generated header cretates
// for all params default values:
- //HRESULT STDMETHODCALLTYPE defaultvalue2(
+ //HRESULT STDMETHODCALLTYPE defaultvalue2(
// /* [defaultvalue][in] */ long *val1 = 10,
// /* [defaultvalue][in] */ double *val2 = 3.14,
// /* [defaultvalue][in] */ VARIANT *val3 = 10,
// /* [defaultvalue][in] */ VARIANT *val4 = 100) = 0;
- // And that does not compile.
- //Therefore we must not include the midl generated header, instead use
+ // And that does not compile.
+ //Therefore we must not include the midl generated header, instead use
// #import to create the interface header
- [id(78), helpstring("method defaultvalue2")]
- HRESULT defaultvalue2([in, out, defaultvalue(1)]long* val1,
+ [id(78), helpstring("method defaultvalue2")]
+ HRESULT defaultvalue2([in, out, defaultvalue(1)]long* val1,
[in, out, defaultvalue(2)] double* val2,
// [in, out, defaultvalue(3)] VARIANT *val3,
[in, out, defaultvalue(4)] VARIANT *val4);
@@ -164,7 +164,7 @@ import "ocidl.idl";
[id(80), helpstring("method varargfunc2")]
HRESULT varargfunc2([out] long* val1, [out] SAFEARRAY(VARIANT)* val2);
-
+
[id(86), helpstring("method inSequenceByteDim2")] HRESULT inSequenceByteDim2([in] SAFEARRAY(byte) val);
[id(87), helpstring("method inCurrency")] HRESULT inCurrency([in] CY val);
[id(88), helpstring("method outCurrency")] HRESULT outCurrency([out] CY* val);
@@ -195,9 +195,9 @@ import "ocidl.idl";
[propputref, id(107), helpstring("property prprefVariant")] HRESULT prprefVariant([in] VARIANT* newVal);
[propget, id(108), helpstring("property prprefDecimal")] HRESULT prprefDecimal([out, retval] DECIMAL* pVal);
[propputref, id(108), helpstring("property prprefDecimal")] HRESULT prprefDecimal([in] DECIMAL* newVal);
- [id(109), helpstring("method optional6")] HRESULT optional6([in,optional] VARIANT* val1,
+ [id(109), helpstring("method optional6")] HRESULT optional6([in,optional] VARIANT* val1,
[in,optional] VARIANT * val2, [in,optional] VARIANT* val3, [in,optional] VARIANT* val4);
- [id(110), helpstring("method optional7")] HRESULT optional7([out,optional] VARIANT* val1,
+ [id(110), helpstring("method optional7")] HRESULT optional7([out,optional] VARIANT* val1,
[out,optional] VARIANT * val2, [out,optional] VARIANT* val3, [out,optional] VARIANT* val4);
[propget, id(111), helpstring("property prpMultiArg1")] HRESULT prpMultiArg1([in,out,optional] VARIANT* val1, [in,out,optional] VARIANT* val2, [out, optional, retval] VARIANT* pVal);
diff --git a/extensions/test/ole/AxTestComponents/Basic.cpp b/extensions/test/ole/AxTestComponents/Basic.cpp
index 4fa950922801..fab6e68f59c0 100644
--- a/extensions/test/ole/AxTestComponents/Basic.cpp
+++ b/extensions/test/ole/AxTestComponents/Basic.cpp
@@ -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
@@ -32,7 +32,7 @@
/////////////////////////////////////////////////////////////////////////////
// CBasic
-CBasic::CBasic(): m_cPrpByte(0),m_nPrpShort(0),m_lPrpLong(0),m_fPrpFloat(0), m_dPrpDouble(0),m_PrpArray(0),
+CBasic::CBasic(): m_cPrpByte(0),m_nPrpShort(0),m_lPrpLong(0),m_fPrpFloat(0), m_dPrpDouble(0),m_PrpArray(0),
m_safearray(NULL), m_bool(VARIANT_FALSE),
m_arByte(0), m_arShort(0), m_arLong(0), m_arString(0), m_arVariant(0), m_arFloat(0),
m_arDouble(0), m_arObject(0), m_arByteDim2(0), m_date(0.), m_scode(0)
@@ -103,7 +103,7 @@ STDMETHODIMP CBasic::inDouble(double val)
STDMETHODIMP CBasic::inVariant(VARIANT val)
{
- m_var1 = val;
+ m_var1 = val;
return S_OK;
}
@@ -210,7 +210,7 @@ STDMETHODIMP CBasic::inoutArray(LPSAFEARRAY *val)
STDMETHODIMP CBasic::inoutObject(IDispatch **val)
{
- CComPtr<IDispatch> disp = *val;
+ CComPtr<IDispatch> disp = *val;
if (*val)
(*val)->Release();
*val = m_obj;
@@ -284,7 +284,7 @@ STDMETHODIMP CBasic::outObject(IDispatch* *val)
*val = m_obj;
if (m_obj)
(*val)->AddRef();
-
+
return S_OK;
}
@@ -439,7 +439,7 @@ STDMETHODIMP CBasic::put_prpObject(IDispatch *newVal)
return S_OK;
}
-STDMETHODIMP CBasic::mixed1(
+STDMETHODIMP CBasic::mixed1(
/* [out][in] */ unsigned char *aChar,
/* [out][in] */ float *aFloat,
/* [out][in] */ VARIANT *aVar)
@@ -537,13 +537,13 @@ void CBasic::printArray( LPSAFEARRAY val, BSTR message, VARTYPE type)
hr= SafeArrayGetLBound( val, 1, &lbound);
hr= SafeArrayGetUBound( val, 1, &ubound);
long length= ubound - lbound +1;
-
+
CComVariant varElement;
char buf[1024];
sprintf( buf,"%s", W2A(message));
for( long i= 0; i < length ; i++)
- {
+ {
char tmp[1024];
long data=0;
CComVariant var;
@@ -573,7 +573,7 @@ void CBasic::printArray( LPSAFEARRAY val, BSTR message, VARTYPE type)
sprintf( tmp, "%f \n", *(double*) &data);
break;
case VT_DISPATCH:
- // we assume the objects are instances of this component and have the
+ // we assume the objects are instances of this component and have the
// property prpString set.
hr= SafeArrayGetElement( val, &i, (void*)&data);
IDispatch* pdisp= ( IDispatch*) data;
@@ -590,8 +590,8 @@ void CBasic::printArray( LPSAFEARRAY val, BSTR message, VARTYPE type)
strcat( buf, tmp);
}
- MessageBox( NULL, _T(A2T(buf)), _T("AxTestComponents.Basic"), MB_OK);
-
+ MessageBox( NULL, _T(A2T(buf)), _T("AxTestComponents.Basic"), MB_OK);
+
}
// V_ERROR OLECHAR VARIANT VT_UI1
@@ -765,7 +765,7 @@ STDMETHODIMP CBasic::inMulDimArrayByte(LPSAFEARRAY val)
// 3-dimensionales array
STDMETHODIMP CBasic::inMulDimArrayByte2(LPSAFEARRAY val)
{
-
+
// TODO: Add your implementation code here
//printMulArray( val, VT_UI1);
return S_OK;
@@ -829,7 +829,7 @@ void CBasic::printMulArray( SAFEARRAY* val, VARTYPE type)
}
-
+
}
else if( dims == 3 )
{
@@ -921,12 +921,12 @@ STDMETHODIMP CBasic::optional3(/*[in, optional]*/ VARIANT* val1,/*[in, optional]
{
//if (val1->vt != VT_ERROR)
m_var1 = *val1;
-
+
//if (val2->vt != VT_ERROR)
m_var2 = *val2;
return S_OK;
}
-
+
STDMETHODIMP CBasic::optional4(/*[in, out, optional]*/ VARIANT* val1,
/*[in, out, optional]*/ VARIANT* val2)
{
@@ -967,7 +967,7 @@ STDMETHODIMP CBasic::defaultvalue1(/*[in, defaultvalue(10)]*/ long val1,
{
m_long = val1;
m_double = *val2;
-// m_var1 = val3;
+// m_var1 = val3;
m_var2 = *val4;
return S_OK;
}
@@ -979,17 +979,17 @@ STDMETHODIMP CBasic::defaultvalue2(/*[in, out, defaultvalue(10)]*/ long* val1,
HRESULT hr = S_OK;
long aLong = *val1;
double aDouble = *val2;
-// CComVariant var1(*val3);
+// CComVariant var1(*val3);
CComVariant var2(*val4);
*val1 = m_long;
*val2 = m_double;
//if (FAILED(hr = VariantCopy(val3, &m_var1)))
- // return hr;
+ // return hr;
if (FAILED(hr = VariantCopy(val4, &m_var2)))
return hr;
m_long = aLong;
m_double = aDouble;
-// m_var1 = var1;
+// m_var1 = var1;
m_var2 = var2;
return hr;
}
@@ -1006,7 +1006,7 @@ STDMETHODIMP CBasic::varargfunc1(/*[in]*/ long val1,/*[in]*/ LPSAFEARRAY val2)
if (FAILED(hr = SafeArrayCopy(val2, & m_safearray)))
{
if (hr != E_INVALIDARG)
- return hr;
+ return hr;
}
return S_OK;
}
@@ -1187,7 +1187,7 @@ STDMETHODIMP CBasic::get_prpRefLong(long* pVal)
STDMETHODIMP CBasic::putref_prpRefLong(long* newVal)
{
- m_long = * newVal;
+ m_long = * newVal;
return S_OK;
}
@@ -1242,7 +1242,7 @@ STDMETHODIMP CBasic::optional7(VARIANT* val1, VARIANT* val2, VARIANT* val3, VARI
return hr;
if (FAILED(hr = VariantCopy(val4, & m_var4)))
return hr;
-
+
return S_OK;
}
diff --git a/extensions/test/ole/AxTestComponents/Basic.h b/extensions/test/ole/AxTestComponents/Basic.h
index 08d63062f13b..eb67ce8bbb21 100644
--- a/extensions/test/ole/AxTestComponents/Basic.h
+++ b/extensions/test/ole/AxTestComponents/Basic.h
@@ -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
@@ -35,7 +35,7 @@
/////////////////////////////////////////////////////////////////////////////
// CBasic
-class ATL_NO_VTABLE CBasic :
+class ATL_NO_VTABLE CBasic :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CBasic, &CLSID_Basic>,
public IDispatchImpl<IBasic, &IID_IBasic, &LIBID_AXTESTCOMPONENTSLib>
@@ -54,7 +54,7 @@ public:
END_COM_MAP()
// IBasic
-public:
+public:
STDMETHOD(outMore)(/*[out]*/long* val1, /*[out]*/long* val2);
STDMETHOD(inMulDimArrayByte2)(LPSAFEARRAY val);
STDMETHOD(inMulDimArrayByte)(LPSAFEARRAY val);
@@ -83,7 +83,7 @@ public:
STDMETHOD(inSequenceShort)(LPSAFEARRAY ar);
STDMETHOD(inSequenceByte)(LPSAFEARRAY ar);
STDMETHOD(inSequenceLong)(LPSAFEARRAY ar);
- STDMETHOD(mixed1)(
+ STDMETHOD(mixed1)(
/* [out][in] */ unsigned char *aChar,
/* [out][in] */ float *aFloat,
/* [out][in] */ VARIANT *aVar);
diff --git a/extensions/test/ole/AxTestComponents/Foo.cpp b/extensions/test/ole/AxTestComponents/Foo.cpp
index 6d6ae3b7a0bd..6eacea7727be 100644
--- a/extensions/test/ole/AxTestComponents/Foo.cpp
+++ b/extensions/test/ole/AxTestComponents/Foo.cpp
@@ -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/extensions/test/ole/AxTestComponents/Foo.h b/extensions/test/ole/AxTestComponents/Foo.h
index 375d09878fa9..a4024ea01a7a 100644
--- a/extensions/test/ole/AxTestComponents/Foo.h
+++ b/extensions/test/ole/AxTestComponents/Foo.h
@@ -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
@@ -35,12 +35,12 @@
/////////////////////////////////////////////////////////////////////////////
// CBasic
-class ATL_NO_VTABLE CFoo :
+class ATL_NO_VTABLE CFoo :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CFoo, &CLSID_Foo>,
public IFoo
-// public IDispatchImpl<IFoo, &__uuidof(IFoo), &LIBID_AXTESTCOMPONENTSLib, /* wMajor = */ 1, /* wMinor = */ 0>
+// public IDispatchImpl<IFoo, &__uuidof(IFoo), &LIBID_AXTESTCOMPONENTSLib, /* wMajor = */ 1, /* wMinor = */ 0>
{
public:
CFoo();
diff --git a/extensions/test/ole/AxTestComponents/StdAfx.cpp b/extensions/test/ole/AxTestComponents/StdAfx.cpp
index 36dc86fc2eba..d881698b27d3 100644
--- a/extensions/test/ole/AxTestComponents/StdAfx.cpp
+++ b/extensions/test/ole/AxTestComponents/StdAfx.cpp
@@ -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/extensions/test/ole/AxTestComponents/StdAfx.h b/extensions/test/ole/AxTestComponents/StdAfx.h
index ab7782f42659..a46eeeb618af 100644
--- a/extensions/test/ole/AxTestComponents/StdAfx.h
+++ b/extensions/test/ole/AxTestComponents/StdAfx.h
@@ -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/extensions/test/ole/AxTestComponents/resource.h b/extensions/test/ole/AxTestComponents/resource.h
index a3c9b0c20f46..b926189183ec 100644
--- a/extensions/test/ole/AxTestComponents/resource.h
+++ b/extensions/test/ole/AxTestComponents/resource.h
@@ -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
@@ -34,7 +34,7 @@
//#define IDR_FOO 501
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 201
diff --git a/extensions/test/ole/EventListenerSample/EventListener/EventListener.cpp b/extensions/test/ole/EventListenerSample/EventListener/EventListener.cpp
index 768f9ec29b68..9512ec4c2372 100644
--- a/extensions/test/ole/EventListenerSample/EventListener/EventListener.cpp
+++ b/extensions/test/ole/EventListenerSample/EventListener/EventListener.cpp
@@ -3,7 +3,7 @@
// Note: Proxy/Stub Information
-// To build a separate proxy/stub DLL,
+// To build a separate proxy/stub DLL,
// run nmake -f EventListenerps.mk in the project directory.
#include "stdafx.h"
diff --git a/extensions/test/ole/EventListenerSample/EventListener/EvtListener.h b/extensions/test/ole/EventListenerSample/EventListener/EvtListener.h
index 24552b9a9641..2bc0a6a9aef9 100644
--- a/extensions/test/ole/EventListenerSample/EventListener/EvtListener.h
+++ b/extensions/test/ole/EventListenerSample/EventListener/EvtListener.h
@@ -8,7 +8,7 @@
/////////////////////////////////////////////////////////////////////////////
// CEvtListener
-class ATL_NO_VTABLE CEvtListener :
+class ATL_NO_VTABLE CEvtListener :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CEvtListener, &CLSID_EvtListener>,
public IDispatchImpl<IEvtListener, &IID_IEvtListener, &LIBID_EVENTLISTENERLib>
diff --git a/extensions/test/ole/EventListenerSample/EventListener/resource.h b/extensions/test/ole/EventListenerSample/EventListener/resource.h
index fef53bef1f1f..70bf51a6f1ff 100644
--- a/extensions/test/ole/EventListenerSample/EventListener/resource.h
+++ b/extensions/test/ole/EventListenerSample/EventListener/resource.h
@@ -7,7 +7,7 @@
#define IDR_EVTLISTENER 101
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 201
diff --git a/extensions/test/ole/MfcControl/MfcControlCtl.cpp b/extensions/test/ole/MfcControl/MfcControlCtl.cpp
index 9aab5e79a3ac..399fb5db95c2 100644
--- a/extensions/test/ole/MfcControl/MfcControlCtl.cpp
+++ b/extensions/test/ole/MfcControl/MfcControlCtl.cpp
@@ -196,7 +196,7 @@ void CMfcControlCtrl::OnResetState()
// CMfcControlCtrl message handlers
-short CMfcControlCtrl::inShort(short val)
+short CMfcControlCtrl::inShort(short val)
{
char buf[256];
sprintf( buf, "inByte: value= %d", val);
@@ -204,7 +204,7 @@ short CMfcControlCtrl::inShort(short val)
return val+1;
}
-long CMfcControlCtrl::inLong(long val)
+long CMfcControlCtrl::inLong(long val)
{
char buf[256];
sprintf( buf, "inLong: value= %d", val);
@@ -212,7 +212,7 @@ long CMfcControlCtrl::inLong(long val)
return val+1;
}
-BSTR CMfcControlCtrl::inString(BSTR* val)
+BSTR CMfcControlCtrl::inString(BSTR* val)
{
CString strResult;
strResult= *val;
@@ -223,7 +223,7 @@ BSTR CMfcControlCtrl::inString(BSTR* val)
return strResult.AllocSysString();
}
-float CMfcControlCtrl::inFloat(float val)
+float CMfcControlCtrl::inFloat(float val)
{
char buf[256];
sprintf( buf, "inFloat: value= %f", val);
@@ -231,7 +231,7 @@ float CMfcControlCtrl::inFloat(float val)
return val+1;
}
-double CMfcControlCtrl::inDouble(double val)
+double CMfcControlCtrl::inDouble(double val)
{
char buf[256];
sprintf( buf, "inDouble: value= %g", val);
@@ -239,7 +239,7 @@ double CMfcControlCtrl::inDouble(double val)
return val+1;
}
-VARIANT CMfcControlCtrl::inVariant(const VARIANT FAR& val)
+VARIANT CMfcControlCtrl::inVariant(const VARIANT FAR& val)
{
VARIANT vaResult;
VariantInit(&vaResult);
@@ -254,7 +254,7 @@ VARIANT CMfcControlCtrl::inVariant(const VARIANT FAR& val)
return _variant_t( L" a string from CMfcControlCtrl::inVariant");
}
-LPDISPATCH CMfcControlCtrl::inObject(LPDISPATCH val)
+LPDISPATCH CMfcControlCtrl::inObject(LPDISPATCH val)
{
char buf[256];
_bstr_t bstr;
@@ -278,47 +278,47 @@ LPDISPATCH CMfcControlCtrl::inObject(LPDISPATCH val)
}
-void CMfcControlCtrl::outShort(short* val)
+void CMfcControlCtrl::outShort(short* val)
{
*val= 123;
}
-void CMfcControlCtrl::outLong(long* val)
+void CMfcControlCtrl::outLong(long* val)
{
*val= 1234;
}
-void CMfcControlCtrl::outString(BSTR FAR* val)
+void CMfcControlCtrl::outString(BSTR FAR* val)
{
- *val= SysAllocString(L"A string from CMfcControlCtrl::outString ");
+ *val= SysAllocString(L"A string from CMfcControlCtrl::outString ");
}
-void CMfcControlCtrl::outFloat(float* val)
+void CMfcControlCtrl::outFloat(float* val)
{
*val= 3.14f;
}
-void CMfcControlCtrl::outDouble(double* val)
+void CMfcControlCtrl::outDouble(double* val)
{
*val= 3.145;
}
-void CMfcControlCtrl::outVariant(VARIANT FAR* val)
+void CMfcControlCtrl::outVariant(VARIANT FAR* val)
{
VariantInit( val);
val->vt= VT_BSTR;
val->bstrVal= SysAllocString( L"a string in a VARIANT");
}
-void CMfcControlCtrl::outObject(LPDISPATCH FAR* val)
+void CMfcControlCtrl::outObject(LPDISPATCH FAR* val)
{
//{BFE10EBE-8584-11D4-005004526AB4}
HRESULT hr= S_OK;
CLSID clsTestControl;
- hr= CLSIDFromProgID( L"AxTestComponents.Basic", &clsTestControl);
+ hr= CLSIDFromProgID( L"AxTestComponents.Basic", &clsTestControl);
IDispatch* pDisp= NULL;
- hr= CoCreateInstance( clsTestControl, NULL, CLSCTX_ALL, __uuidof(IDispatch), (void**)&pDisp);
+ hr= CoCreateInstance( clsTestControl, NULL, CLSCTX_ALL, __uuidof(IDispatch), (void**)&pDisp);
if( SUCCEEDED( hr) && val)
{
diff --git a/extensions/test/ole/MfcControl/MfcControlCtl.h b/extensions/test/ole/MfcControl/MfcControlCtl.h
index ea06425a3fcd..f6d4379658b9 100644
--- a/extensions/test/ole/MfcControl/MfcControlCtl.h
+++ b/extensions/test/ole/MfcControl/MfcControlCtl.h
@@ -35,7 +35,7 @@ protected:
DECLARE_OLECREATE_EX(CMfcControlCtrl) // Class factory and guid
DECLARE_OLETYPELIB(CMfcControlCtrl) // GetTypeInfo
DECLARE_PROPPAGEIDS(CMfcControlCtrl) // Property page IDs
- DECLARE_OLECTLTYPE(CMfcControlCtrl) // Type name and misc status
+ DECLARE_OLECTLTYPE(CMfcControlCtrl) // Type name and misc status
// Message maps
//{{AFX_MSG(CMfcControlCtrl)
diff --git a/extensions/test/ole/MfcControl/StdAfx.h b/extensions/test/ole/MfcControl/StdAfx.h
index b0a8f50346c7..4df599c412e3 100644
--- a/extensions/test/ole/MfcControl/StdAfx.h
+++ b/extensions/test/ole/MfcControl/StdAfx.h
@@ -10,19 +10,19 @@
// or project specific include files that are used frequently,
// but are changed infrequently
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
+#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxctl.h> // MFC support for ActiveX Controls
#include <afxext.h> // MFC extensions
-#include <afxdtctl.h> // MFC support for Internet Explorer 4 Comon Controls
+#include <afxdtctl.h> // MFC support for Internet Explorer 4 Comon Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
-#include <afxcmn.h> // MFC support for Windows Common Controls
+#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
// Delete the two includes below if you do not wish to use the MFC
// database classes
-#include <afxdb.h> // MFC database classes
-#include <afxdao.h> // MFC DAO database classes
+#include <afxdb.h> // MFC database classes
+#include <afxdao.h> // MFC DAO database classes
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
diff --git a/extensions/test/ole/OleClient/axhost.cxx b/extensions/test/ole/OleClient/axhost.cxx
index 5c96023af26c..93d5721b3b49 100644
--- a/extensions/test/ole/OleClient/axhost.cxx
+++ b/extensions/test/ole/OleClient/axhost.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
diff --git a/extensions/test/ole/OleClient/axhost.hxx b/extensions/test/ole/OleClient/axhost.hxx
index 9857eaa8e28d..88b870f849c5 100644
--- a/extensions/test/ole/OleClient/axhost.hxx
+++ b/extensions/test/ole/OleClient/axhost.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
@@ -35,7 +35,7 @@ extern CComModule _Module;
#include <atlhost.h>
-class HostWin: public CWindowImpl<HostWin, CWindow,
+class HostWin: public CWindowImpl<HostWin, CWindow,
CWinTraits< WS_CAPTION|WS_POPUPWINDOW|WS_VISIBLE, 0> >
{
CComBSTR controlName;
diff --git a/extensions/test/ole/OleClient/clientTest.cxx b/extensions/test/ole/OleClient/clientTest.cxx
index 684644e47cec..4a79eead82df 100644
--- a/extensions/test/ole/OleClient/clientTest.cxx
+++ b/extensions/test/ole/OleClient/clientTest.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
@@ -92,7 +92,7 @@ extern "C" int __cdecl main( int , char **)
return -1;
}
-
+
_Module.Init( ObjectMap, GetModuleHandle( NULL));
if( FAILED(hr=doTest()))
@@ -152,17 +152,17 @@ bool doParameterTest(const Reference<XInvocation> & inv)
Sequence<Any> seqNamed5(arArgs, 1);
arArgs[0] <<= arg2;
Sequence<Any> seqNamed6(arArgs, 1);
-
+
arArgs[0] <<= (sal_Int32) 123;
arArgs[1] <<= (sal_Int32) 456;
Sequence<Any> seqPositional(arArgs, 2);
arArgs[0] <<= (sal_Int32) 123;
Sequence<Any> seqPositional2(arArgs, 1);
-
+
arArgs[0] <<= Any();
arArgs[1] <<= Any();
Sequence<Any> seqPositional3(arArgs, 2);
-
+
arArgs[0] <<= (sal_Int32) 123;
arArgs[1] <<= SCode(DISP_E_PARAMNOTFOUND);
Sequence<Any> seqOutOpt1(arArgs, 2);
@@ -180,7 +180,7 @@ bool doParameterTest(const Reference<XInvocation> & inv)
arArgs1[2] <<= (sal_Int32) 0;
arArgs1[3] <<= (sal_Int32) 0;
Sequence<Any> seqMix0(arArgs1, 4);
-
+
arArgs1[0] <<= (sal_Int32) 123;
arArgs1[1] <<= (sal_Int32) 456;
arArgs1[2] <<= arg3;
@@ -215,7 +215,7 @@ bool doParameterTest(const Reference<XInvocation> & inv)
inv->invoke(OUString(L"optional5"), seqPositional, seqIndices, seqOut);
if ( ! checkOutArgs(seqOut, seqIndices, seqPositional))
return false;
-
+
//2 optional args, 1 provided
seqIndices.realloc(0);
seqOut.realloc(0);
@@ -241,7 +241,7 @@ bool doParameterTest(const Reference<XInvocation> & inv)
inv->invoke(OUString(L"optional5"), seqPositional3, seqIndices, seqOut);
if ( ! checkOutArgs(seqOut, seqIndices, seqOutOpt2))
return false;
-
+
//named args --------------------------------------------
// 2 named args, correct position
@@ -289,7 +289,7 @@ bool doParameterTest(const Reference<XInvocation> & inv)
inv->invoke(OUString(L"optional5"), seqNamed4, seqIndices, seqOut);
if ( ! checkOutArgs(seqOut, seqIndices, seqNamed2 ))
return false;
-
+
//2 args, 1 provided (correct order)
seqIndices.realloc(0);
@@ -351,8 +351,8 @@ bool doParameterTest(const Reference<XInvocation> & inv)
inv->invoke(OUString(L"optional7"), seqMix2Out, seqIndices, seqOut);
if ( ! checkOutArgs(seqOut, seqIndices, seqMix2Out))
return false;
-
-
+
+
return true;
}
bool doPropertyTest(const Reference<XInvocation> & inv)
@@ -379,7 +379,7 @@ bool doPropertyTest(const Reference<XInvocation> & inv)
Any inrefDecimal, outrefDecimal;
Any inParamsLong, outParamsLong;
Reference<XInterface> xintUnknown(getComObject(L"AxTestComponents.Foo"));
-
+
inBool <<= (sal_Bool) sal_True;
inv->setValue(OUString(L"prpBool"), inBool);
outBool = inv->getValue(OUString(L"prpBool"));
@@ -393,7 +393,7 @@ bool doPropertyTest(const Reference<XInvocation> & inv)
outShort = inv->getValue(OUString(L"prpShort"));
inLong <<= ( sal_Int32) 1234567;
- inv->setValue(OUString(L"prpLong"), inLong // TODO: Add your implementation code here
+ inv->setValue(OUString(L"prpLong"), inLong // TODO: Add your implementation code here
);
outLong = inv->getValue(OUString(L"prpLong"));
@@ -420,7 +420,7 @@ bool doPropertyTest(const Reference<XInvocation> & inv)
inUnknown <<= xintUnknown;
inv->setValue(OUString(L"prpUnknown"), inUnknown);
outUnknown = inv->getValue(OUString(L"prpUnknown"));
-
+
Currency cur(99999);
inCY <<= cur;
inv->setValue(OUString(L"prpCurrency"), inCY);
@@ -444,7 +444,7 @@ bool doPropertyTest(const Reference<XInvocation> & inv)
inrefLong <<= (sal_Int32) 123456;
inv->setValue(OUString(L"prprefLong"), inrefLong);
outrefLong = inv->getValue(OUString(L"prprefLong"));
-
+
inrefVariant <<= OUString(L"A string in an any");
inv->setValue(OUString(L"prprefVariant"), inrefVariant);
outrefVariant = inv->getValue(OUString(L"prprefVariant"));
@@ -456,7 +456,7 @@ bool doPropertyTest(const Reference<XInvocation> & inv)
if (inBool != outBool || inByte != outByte || inShort != outShort || inLong != outLong
|| inFloat != outFloat || inDouble != outDouble || inString != outString
- || inVariant != outVariant || inObject != outObject
+ || inVariant != outVariant || inObject != outObject
|| inUnknown != outUnknown || inCY != outCY
|| inDate != outDate || inDecimal != outDecimal || inSCode != outSCode
|| inrefLong != outrefLong ||inrefVariant != outrefVariant
@@ -486,7 +486,7 @@ bool doPropertyWithArgumentTest(const Reference<XInvocation> & inv)
Sequence<Any> seqMultiArgPut2(arMultiArgs, 2);
arMultiArgs[0] <<= NamedArgument(OUString(L"val2"), makeAny((sal_Int32) 1));
- arMultiArgs[1] <<= PropertyPutArgument(makeAny((sal_Int32) 3));
+ arMultiArgs[1] <<= PropertyPutArgument(makeAny((sal_Int32) 3));
Sequence<Any> seqMultiArgPut3(arMultiArgs, 2);
arMultiArgs[0] <<= NamedArgument(OUString(L"val2"), makeAny((sal_Int32) 1));
@@ -501,12 +501,12 @@ bool doPropertyWithArgumentTest(const Reference<XInvocation> & inv)
arMultiArgs[1] <<= makeAny((sal_Int32) 2);
Sequence<Any> seqMultiArgGet1(arMultiArgs, 2);
Sequence<Any> seqMultiArgGet2(arMultiArgs, 1);
-
+
arMultiArgs[0] <<= makeAny((sal_Int32) 0);
arMultiArgs[1] <<= PropertyPutArgument(makeAny((sal_Int32) 0));
Sequence<Any> seqMultiArgPut5(arMultiArgs, 2);
-
+
arMultiArgs[0] <<= makeAny((sal_Int32) 1);
arMultiArgs[1] <<= PropertyPutArgument(makeAny((sal_Int32) 2));
Sequence<Any> seqMultiArgPut6(arMultiArgs, 2);
@@ -518,7 +518,7 @@ bool doPropertyWithArgumentTest(const Reference<XInvocation> & inv)
arMultiArgs[0] = makeAny((sal_Int32) 0);
arMultiArgs[1] = makeAny((sal_Int32) 0);
Sequence<Any> seqMultiVoid2(arMultiArgs, 2);
-
+
//[propput, ...] HRESULT prpMultiArg1([in,out,optional] VARIANT* val1, [in,out,optional] VARIANT* val2, [in] VARIANT* newVal);
//[propget, ...] HRESULT prpMultiArg1([in,out,optional] VARIANT* val1, [in,out,optional] VARIANT* val2, [out, optional, retval] VARIANT* pVal);
seqIndices.realloc( 0);
@@ -552,7 +552,7 @@ bool doPropertyWithArgumentTest(const Reference<XInvocation> & inv)
arMultiArgs[0] = makeAny((sal_Int32) 1);
arMultiArgs[1] = makeAny((SCode(DISP_E_PARAMNOTFOUND)));
-
+
if (anyRet != ((PropertyPutArgument const *) seqMultiArgPut2[1].getValue())->Value
|| ! checkOutArgs(seqOut, seqIndices, Sequence<Any>(arMultiArgs, 2)))
{
@@ -617,7 +617,7 @@ bool doPropertyWithArgumentTest(const Reference<XInvocation> & inv)
if ( anyRet != ((PropertyPutArgument const*) seqMultiArgPut6[1].getValue())->Value
|| !checkOutArgs(seqOut, seqIndices, seqMultiArgGet2))
return false;
-
+
//hasProperty, hasMethod
if (inv->hasProperty(OUSTR("prpMultiArg1")))
@@ -631,7 +631,7 @@ bool doPropertyWithArgumentTest(const Reference<XInvocation> & inv)
if ( ! inv->hasMethod(OUSTR("inLong")))
return false;
- return true;
+ return true;
}
bool doSimpleTest(const Reference<XInvocation> & inv)
{
@@ -656,9 +656,9 @@ bool doSimpleTest(const Reference<XInvocation> & inv)
Any inrefVariant, outrefVariant;
Any inrefDecimal, outrefDecimal;
- Reference<XInterface> xIntFoo(getComObject(L"AxTestComponents.Foo"));
+ Reference<XInterface> xIntFoo(getComObject(L"AxTestComponents.Foo"));
//###################################################################################
- // in and out parameter
+ // in and out parameter
//###################################################################################
sal_Bool aBool = sal_True;
inBool.setValue(&aBool, getCppuBooleanType());
@@ -746,7 +746,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv)
seqOut.realloc(0);
inv->invoke(OUString(L"outDate"), Sequence< Any > (& outDate, 1), seqIndices, seqOut);
outDate <<= seqOut[0];
-
+
Decimal dec(3, 0, 0xffffffff, 0xffffffff, 0xfffffff0);
inDecimal <<= dec;
inv->invoke(OUString(L"inDecimal"), Sequence<Any>( & inDecimal, 1), seqIndices, seqOut);
@@ -765,12 +765,12 @@ bool doSimpleTest(const Reference<XInvocation> & inv)
if (inBool != outBool || inByte != outByte || inShort != outShort || inLong != outLong
|| inFloat != outFloat || inDouble != outDouble || inString != outString
- || inVariant != outVariant || inObject != outObject || inUnknown != outUnknown
+ || inVariant != outVariant || inObject != outObject || inUnknown != outUnknown
|| inCY != outCY
|| inDate != outDate || inDecimal != outDecimal || inSCode != outSCode)
return false;
//###################################################################################
- // in/out parameter
+ // in/out parameter
//###################################################################################
outBool = Any();
seqIndices.realloc( 0);
@@ -783,7 +783,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv)
seqOut.realloc(0);
inv->invoke(OUString(L"inoutByte"), Sequence< Any > ( & inByte, 1), seqIndices, seqOut);
outByte <<= seqOut[0];
-
+
outShort = Any();
seqIndices.realloc( 0);
seqOut.realloc(0);
@@ -801,7 +801,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv)
seqOut.realloc(0);
inv->invoke(OUString(L"inoutString"), Sequence< Any > ( & inString, 1), seqIndices, seqOut);
outString <<= seqOut[0];
-
+
outFloat = Any();
seqIndices.realloc( 0);
seqOut.realloc(0);
@@ -837,7 +837,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv)
seqOut.realloc(0);
inv->invoke(OUString(L"inoutDate"), Sequence< Any > ( & inDate, 1), seqIndices, seqOut);
outDate <<= seqOut[0];
-
+
outDecimal = Any();
seqIndices.realloc( 0);
seqOut.realloc(0);
@@ -857,7 +857,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv)
return false;
//###################################################################################
- // in byref parameters
+ // in byref parameters
//###################################################################################
inrefLong <<= (sal_Int32) 1234;
@@ -866,7 +866,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv)
seqOut.realloc(0);
inv->invoke(OUString(L"outLong"), Sequence< Any > (& outrefLong, 1), seqIndices, seqOut);
outrefLong <<= seqOut[0];
-
+
inrefVariant <<= OUString(L" A string in an any");
inv->invoke(OUString(L"inrefVariant"), Sequence< Any > ( & inrefVariant, 1), seqIndices, seqOut);
seqIndices.realloc( 0);
@@ -888,7 +888,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv)
//###################################################################################
- // mixed parameter
+ // mixed parameter
//###################################################################################
// mixed1
seqIndices.realloc( 0);
@@ -898,7 +898,7 @@ bool doSimpleTest(const Reference<XInvocation> & inv)
param[1] = inFloat;
param[2] = inVariant;
inv->invoke(OUString(L"mixed1"), Sequence< Any >(param, 3), seqIndices, seqOut);
-
+
if (seqOut.getLength() != 3 || inByte != seqOut[0] || inFloat != seqOut[1]
|| inVariant != seqOut[2])
return false;
@@ -911,7 +911,7 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv)
Sequence<sal_Int16> seqIndices;
Sequence<Any> seqOut;
Any voidAny;
- Any inArAny;
+ Any inArAny;
Any outArray;
Any inArBool, outArBool;
Any inArByte, outArByte;
@@ -935,7 +935,7 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv)
Sequence<Any> seq_1( arAnyStrTmp, 3);
inArAny <<= seq_1;
//###################################################################################
- // in, out Sequences
+ // in, out Sequences
//###################################################################################
//Test sequence containing Anys of Strings
inv->invoke(OUString(L"inArray"), Sequence< Any > ( & inArAny, 1), seqIndices, seqOut);
@@ -954,7 +954,7 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv)
sal_Int8 arByte[]={1,2,3};
Sequence<sal_Int8> seqByte(arByte, 3);
inArByte <<= seqByte;
- inv->invoke(OUString(L"inSequenceByte"),Sequence<Any>( & inArByte, 1), seqIndices, seqOut);
+ inv->invoke(OUString(L"inSequenceByte"),Sequence<Any>( & inArByte, 1), seqIndices, seqOut);
seqIndices.realloc(0);
seqOut.realloc(0);
inv->invoke(OUString(L"outSequenceByte"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut);
@@ -963,7 +963,7 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv)
sal_Int16 arShort[]={4,5,6};
Sequence<sal_Int16> seqShort(arShort, 3);
inArShort<<= seqShort;
- inv->invoke(OUString(L"inSequenceShort"),Sequence< Any >( & inArShort, 1), seqIndices, seqOut);
+ inv->invoke(OUString(L"inSequenceShort"),Sequence< Any >( & inArShort, 1), seqIndices, seqOut);
seqIndices.realloc(0);
seqOut.realloc(0);
inv->invoke(OUString(L"outSequenceShort"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut);
@@ -972,19 +972,19 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv)
sal_Int32 arLong[] = {7,8,9};
Sequence<sal_Int32> seqLong(arLong, 3);
inArLong <<= seqLong;
- inv->invoke(OUString(L"inSequenceLong"),Sequence< Any > ( & inArLong, 1), seqIndices, seqOut);
+ inv->invoke(OUString(L"inSequenceLong"),Sequence< Any > ( & inArLong, 1), seqIndices, seqOut);
seqIndices.realloc(0);
seqOut.realloc(0);
inv->invoke(OUString(L"outSequenceLong"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut);
outArLong <<= seqOut[0];
- inv->invoke(OUString(L"inSequenceLong"),Sequence< Any > ( & inArLong, 1), seqIndices, seqOut);
+ inv->invoke(OUString(L"inSequenceLong"),Sequence< Any > ( & inArLong, 1), seqIndices, seqOut);
seqIndices.realloc(0);
seqOut.realloc(0);
inv->invoke(OUString(L"outSequenceLong"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut);
outArLong <<= seqOut[0];
- inv->invoke( OUString(L"inSequenceString"),Sequence< Any > ( & inArString, 1), seqIndices, seqOut);
+ inv->invoke( OUString(L"inSequenceString"),Sequence< Any > ( & inArString, 1), seqIndices, seqOut);
seqIndices.realloc(0);
seqOut.realloc(0);
inv->invoke(OUString(L"outSequenceString"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut);
@@ -993,7 +993,7 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv)
float arFloat[]={3.14f, 31.4f, 314.f};
Sequence<float> seqFloat( arFloat, 3);
inArFloat <<= seqFloat;
- inv->invoke( OUString(L"inSequenceFloat"),Sequence< Any > ( & inArFloat, 1), seqIndices, seqOut);
+ inv->invoke( OUString(L"inSequenceFloat"),Sequence< Any > ( & inArFloat, 1), seqIndices, seqOut);
seqIndices.realloc(0);
seqOut.realloc(0);
inv->invoke(OUString(L"outSequenceFloat"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut);
@@ -1002,30 +1002,30 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv)
double arDouble[]={3.145, 31.45, 3145.};
Sequence<double> seqDouble( arDouble, 3);
inArDouble <<= seqDouble;
- inv->invoke(OUString(L"inSequenceDouble"),Sequence< Any >( & inArDouble, 1), seqIndices, seqOut);
+ inv->invoke(OUString(L"inSequenceDouble"),Sequence< Any >( & inArDouble, 1), seqIndices, seqOut);
seqIndices.realloc(0);
seqOut.realloc(0);
inv->invoke(OUString(L"outSequenceDouble"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut);
outArDouble <<= seqOut[0];
Sequence<Reference<XInvocation> > seqObj(2);
- seqObj[0]= getComObject(L"AxTestComponents.Basic");
- seqObj[1]= getComObject(L"AxTestComponents.Basic");
+ seqObj[0]= getComObject(L"AxTestComponents.Basic");
+ seqObj[1]= getComObject(L"AxTestComponents.Basic");
inArObject <<= seqObj;
- inv->invoke(OUString(L"inSequenceObject"),Sequence< Any >( & inArObject, 1), seqIndices, seqOut);
+ inv->invoke(OUString(L"inSequenceObject"),Sequence< Any >( & inArObject, 1), seqIndices, seqOut);
seqIndices.realloc(0);
seqOut.realloc(0);
inv->invoke(OUString(L"outSequenceObject"), Sequence< Any >( & voidAny, 1), seqIndices, seqOut);
outArObject <<= seqOut[0];
-
- if ( ! equalSequences(inArByte, outArByte) || ! equalSequences(inArShort, outArShort)
+
+ if ( ! equalSequences(inArByte, outArByte) || ! equalSequences(inArShort, outArShort)
|| ! equalSequences(inArLong, outArLong) || ! equalSequences(inArString, outArray)
|| ! equalSequences(inArFloat, outArFloat) || ! equalSequences(inArDouble, outArDouble)
|| ! equalSequences(inArString, outArString) || ! equalSequences(inArObject, outArObject))
return false;
//###################################################################################
- // in/out Sequences
+ // in/out Sequences
//###################################################################################
seqIndices.realloc(0);
seqOut.realloc(0);
@@ -1033,35 +1033,35 @@ bool doSimpleSequenceTest(const Reference<XInvocation> & inv)
inv->invoke(OUString(L"inoutArray"), Sequence< Any >( & inArString, 1), seqIndices, seqOut);
outArray <<= seqOut[0];
- inv->invoke(OUString(L"inoutSequenceByte"), Sequence<Any>( & inArByte, 1), seqIndices, seqOut);
+ inv->invoke(OUString(L"inoutSequenceByte"), Sequence<Any>( & inArByte, 1), seqIndices, seqOut);
inv->invoke(OUString(L"inoutSequenceByte"), Sequence<Any>( & inArByte, 1), seqIndices, seqOut);
outArByte <<= seqOut[0];
- inv->invoke(OUString(L"inoutSequenceShort"), Sequence<Any>( & inArShort, 1), seqIndices, seqOut);
+ inv->invoke(OUString(L"inoutSequenceShort"), Sequence<Any>( & inArShort, 1), seqIndices, seqOut);
inv->invoke(OUString(L"inoutSequenceShort"), Sequence<Any>( & inArShort, 1), seqIndices, seqOut);
outArShort <<= seqOut[0];
- inv->invoke(OUString(L"inoutSequenceLong"), Sequence<Any>( & inArLong, 1), seqIndices, seqOut);
+ inv->invoke(OUString(L"inoutSequenceLong"), Sequence<Any>( & inArLong, 1), seqIndices, seqOut);
inv->invoke(OUString(L"inoutSequenceLong"), Sequence< Any >( & inArLong, 1), seqIndices, seqOut);
outArLong <<= seqOut[0];
- inv->invoke(OUString(L"inoutSequenceString"), Sequence<Any>( & inArString, 1), seqIndices, seqOut);
+ inv->invoke(OUString(L"inoutSequenceString"), Sequence<Any>( & inArString, 1), seqIndices, seqOut);
inv->invoke(OUString(L"inoutSequenceString"), Sequence<Any>( & inArString, 1), seqIndices, seqOut);
outArString <<= seqOut[0];
- inv->invoke(OUString(L"inoutSequenceFloat"), Sequence<Any>( & inArFloat, 1), seqIndices, seqOut);
+ inv->invoke(OUString(L"inoutSequenceFloat"), Sequence<Any>( & inArFloat, 1), seqIndices, seqOut);
inv->invoke(OUString(L"inoutSequenceFloat"), Sequence<Any>( & inArFloat, 1), seqIndices, seqOut);
outArFloat <<= seqOut[0];
- inv->invoke(OUString(L"inoutSequenceDouble"), Sequence<Any>( & inArDouble, 1), seqIndices, seqOut);
+ inv->invoke(OUString(L"inoutSequenceDouble"), Sequence<Any>( & inArDouble, 1), seqIndices, seqOut);
inv->invoke(OUString(L"inoutSequenceDouble"), Sequence<Any>( & inArDouble, 1), seqIndices, seqOut);
outArDouble <<= seqOut[0];
- inv->invoke(OUString(L"inoutSequenceObject"), Sequence<Any>( & inArObject, 1), seqIndices, seqOut);
+ inv->invoke(OUString(L"inoutSequenceObject"), Sequence<Any>( & inArObject, 1), seqIndices, seqOut);
inv->invoke(OUString(L"inoutSequenceObject"), Sequence<Any>( & inArObject, 1), seqIndices, seqOut);
outArObject <<= seqOut[0];
- if ( ! equalSequences(inArByte, outArByte) || ! equalSequences(inArShort, outArShort)
+ if ( ! equalSequences(inArByte, outArByte) || ! equalSequences(inArShort, outArShort)
|| ! equalSequences(inArLong, outArLong) || ! equalSequences(inArString, outArray)
|| ! equalSequences(inArFloat, outArFloat) || ! equalSequences(inArDouble, outArDouble)
|| ! equalSequences(inArString, outArString) || ! equalSequences(inArObject, outArObject))
@@ -1082,7 +1082,7 @@ HRESULT doTest()
Sequence< sal_Int16> seqIndices;
Sequence<Any> seqOut;
-
+
Any aAny;
Any anyOut;
char buff[1024];
@@ -1097,9 +1097,9 @@ HRESULT doTest()
if (! doPropertyTest(inv))
{
fprintf(stdout, "### Test failed!\n");
- return E_FAIL;
+ return E_FAIL;
}
-
+
if ( ! doSimpleSequenceTest(inv))
{
fprintf(stdout, "### Test failed! \n");
@@ -1118,15 +1118,15 @@ HRESULT doTest()
return E_FAIL;
}
-
+
//
-// //###################################################################################
-// // in multi Sequences
-// //###################################################################################
-// // inMulDimArrayLong
+// //###################################################################################
+// // in multi Sequences
+// //###################################################################################
+// // inMulDimArrayLong
sal_Int32 arLongi[]={1,2,3};
sal_Int32 arLongi2[]={4,5,6,7};
sal_Int32 arLongi3[]={8,9,10,11,12};
@@ -1141,10 +1141,10 @@ HRESULT doTest()
seq2i[2]= seqLongi3;
seqAny<<= seq2i;
// dimension length 3,5
- inv->invoke( OUString(L"inMulDimArrayLong"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut);
-//
+ inv->invoke( OUString(L"inMulDimArrayLong"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut);
+//
//inMulDimArrayVariant
- inv->invoke( OUString(L"inMulDimArrayVariant"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut);
+ inv->invoke( OUString(L"inMulDimArrayVariant"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut);
//inMulDimArrayLong2
sal_Int32 arLongii1[]={1,2,3};
@@ -1167,12 +1167,12 @@ HRESULT doTest()
seq2ii2[0]= seqLongii4;
seq2ii2[1]= seqLongii5;
-
+
Sequence< Sequence< Sequence< sal_Int32> > > seq3ii(2);
seq3ii[0]=seq2ii;
seq3ii[1]=seq2ii2;
seqAny<<= seq3ii;
- inv->invoke( OUString(L"inMulDimArrayLong2"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut);
+ inv->invoke( OUString(L"inMulDimArrayLong2"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut);
// inMulDimArrayByte2
sal_Int8 arByteii1[]={1,2,3};
@@ -1195,27 +1195,27 @@ HRESULT doTest()
seq2Byteii2[0]= seqByteii4;
seq2Byteii2[1]= seqByteii5;
-
+
Sequence< Sequence< Sequence< sal_Int8> > > seq3Byteii(2);
seq3Byteii[0]=seq2Byteii;
seq3Byteii[1]=seq2Byteii2;
seqAny<<= seq3Byteii;
- inv->invoke( OUString(L"inMulDimArrayByte2"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut);
+ inv->invoke( OUString(L"inMulDimArrayByte2"),Sequence< Any > ( &seqAny, 1), seqIndices, seqOut);
//###################################################################################
//###################################################################################
//###################################################################################
- // Tests with a MFC ActiveX control, ( pure dispinterface)
+ // Tests with a MFC ActiveX control, ( pure dispinterface)
//###################################################################################
//###################################################################################
- // in parameter MFC ActiveX
+ // in parameter MFC ActiveX
//###################################################################################
// unsigned char is not supported by MFC
- // aAny <<= ( sal_Int8) 127;
- // invMfc->invoke( OUString(L"inByte"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut);
+ // aAny <<= ( sal_Int8) 127;
+ // invMfc->invoke( OUString(L"inByte"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut);
if ( ! invMfc.is())
return hr;
aAny <<= static_cast<sal_Int16>(-1);
@@ -1239,12 +1239,12 @@ HRESULT doTest()
aAny <<= OUString( L" A string in an any");
aAny=invMfc->invoke( OUString(L"inVariant"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut);
-
+
// Tests with Sequences later.
- // OUString arStr4[]= {L"string0", L"string1", L"string2"};
- // Sequence<OUString> seqStr4( arStr4, 3);
- // aAny <<= seqStr4;
- // invMfc->invoke( OUString(L"inArray"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut);
+ // OUString arStr4[]= {L"string0", L"string1", L"string2"};
+ // Sequence<OUString> seqStr4( arStr4, 3);
+ // aAny <<= seqStr4;
+ // invMfc->invoke( OUString(L"inArray"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut);
Reference < XInvocation > inv5= getComObject(L"AxTestComponents.Basic");
@@ -1254,11 +1254,11 @@ HRESULT doTest()
aAny <<= inv5;
aAny=invMfc->invoke( OUString(L"inObject"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut);
//
-// //###################################################################################
-// // out parameter MFC ActiveX
-// //###################################################################################
-//
-// // outShort
+// //###################################################################################
+// // out parameter MFC ActiveX
+// //###################################################################################
+//
+// // outShort
aAny= invMfc->invoke( OUString(L"outShort"), Sequence< Any > ( &aAny, 1), seqIndices, seqOut);
anyOut<<= seqOut[0];
sprintf(buff, "MFC outShort %d", *(sal_Int16*)anyOut.getValue());
@@ -1308,9 +1308,9 @@ HRESULT doTest()
//###################################################################################
- // Sequence parameter MFC ActiveX
+ // Sequence parameter MFC ActiveX
//###################################################################################
- // Sequences are not directly supported.
+ // Sequences are not directly supported.
delete pWin;
diff --git a/extensions/test/ole/OleClient/funcs.cxx b/extensions/test/ole/OleClient/funcs.cxx
index 231f5bc825db..665814341d3e 100644
--- a/extensions/test/ole/OleClient/funcs.cxx
+++ b/extensions/test/ole/OleClient/funcs.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
@@ -57,7 +57,7 @@ template< class T >
bool equalSequences(const Sequence<T>& seqIn, const Sequence<Any> & returned);
-Reference< XMultiServiceFactory > objectFactory;//
+Reference< XMultiServiceFactory > objectFactory;//
Reference<XMultiServiceFactory> getMultiServiceFactory()
@@ -76,10 +76,10 @@ Reference<XInvocation> getComObject( OUString progId)
{
HRESULT hr= S_OK;
Reference< XInvocation > ret;
-// Reference<XMultiServiceFactory> fac;
+// Reference<XMultiServiceFactory> fac;
if( ! objectFactory.is())
- { Reference<XMultiServiceFactory> mgr= getMultiServiceFactory();
- Reference<XInterface> xInt= mgr->createInstance(
+ { Reference<XMultiServiceFactory> mgr= getMultiServiceFactory();
+ Reference<XInterface> xInt= mgr->createInstance(
OUString(L"com.sun.star.bridge.oleautomation.Factory"));
objectFactory= Reference<XMultiServiceFactory>::query( xInt);
}
@@ -107,8 +107,8 @@ Reference<XInvocation> convertComObject( IUnknown* pUnk)
any <<= ( sal_uInt32)&var;
sal_uInt8 arId[16];
rtl_getGlobalProcessId( arId);
- Any target= xSuppl->createBridge( any, Sequence<sal_Int8>( (sal_Int8*)arId, 16), OLE, UNO );
-
+ Any target= xSuppl->createBridge( any, Sequence<sal_Int8>( (sal_Int8*)arId, 16), OLE, UNO );
+
Reference<XInvocation> ret;
target>>= ret;
return ret;
@@ -121,7 +121,7 @@ Reference<XInvocation> convertComObject( IUnknown* pUnk)
The number of items in value must be the
same as the number of provided parameter during the call on the method.
-
+
The parameter outArgs, indices correspond to the sequences which are
arguments to XInvocation::invoke
*/
@@ -169,7 +169,7 @@ bool checkOutArgs(const Sequence<Any> & outArgs,
return true;
}
-/* The returned sequence always contains Any elements
+/* The returned sequence always contains Any elements
*/
bool equalSequences(const Any& orig, const Any& returned)
{
@@ -180,13 +180,13 @@ bool equalSequences(const Any& orig, const Any& returned)
}
TypeDescription td(orig.getValueTypeRef());
typelib_IndirectTypeDescription * indirect_td = (typelib_IndirectTypeDescription *) td.get();
-
+
switch (indirect_td->pType->eTypeClass)
{
case TypeClass_CHAR:
{
Sequence<sal_Unicode> seq;
- orig >>= seq;
+ orig >>= seq;
Sequence<Any> seq2;
returned >>= seq2;
return equalSequences(seq, seq2);
@@ -194,7 +194,7 @@ bool equalSequences(const Any& orig, const Any& returned)
case TypeClass_BOOLEAN:
{
Sequence<sal_Bool> seq;
- orig >>= seq;
+ orig >>= seq;
Sequence<Any> seq2;
returned >>= seq2;
return equalSequences(seq, seq2);
@@ -202,7 +202,7 @@ bool equalSequences(const Any& orig, const Any& returned)
case TypeClass_BYTE:
{
Sequence<sal_Int8> seq;
- orig >>= seq;
+ orig >>= seq;
Sequence<Any> seq2;
returned >>= seq2;
return equalSequences(seq, seq2);
@@ -210,7 +210,7 @@ bool equalSequences(const Any& orig, const Any& returned)
case TypeClass_SHORT:
{
Sequence<sal_Int16> seq;
- orig >>= seq;
+ orig >>= seq;
Sequence<Any> seq2;
returned >>= seq2;
return equalSequences(seq, seq2);
@@ -218,7 +218,7 @@ bool equalSequences(const Any& orig, const Any& returned)
case TypeClass_LONG:
{
Sequence<sal_Int32> seq;
- orig >>= seq;
+ orig >>= seq;
Sequence<Any> seq2;
returned >>= seq2;
return equalSequences(seq, seq2);
@@ -226,7 +226,7 @@ bool equalSequences(const Any& orig, const Any& returned)
case TypeClass_FLOAT:
{
Sequence<float> seq;
- orig >>= seq;
+ orig >>= seq;
Sequence<Any> seq2;
returned >>= seq2;
return equalSequences(seq, seq2);
@@ -234,7 +234,7 @@ bool equalSequences(const Any& orig, const Any& returned)
case TypeClass_DOUBLE:
{
Sequence<double> seq;
- orig >>= seq;
+ orig >>= seq;
Sequence<Any> seq2;
returned >>= seq2;
return equalSequences(seq, seq2);
@@ -242,7 +242,7 @@ bool equalSequences(const Any& orig, const Any& returned)
case TypeClass_STRING:
{
Sequence<OUString> seq;
- orig >>= seq;
+ orig >>= seq;
Sequence<Any> seq2;
returned >>= seq2;
return equalSequences(seq, seq2);
@@ -250,7 +250,7 @@ bool equalSequences(const Any& orig, const Any& returned)
case TypeClass_ANY:
{
Sequence<Any> seq;
- orig >>= seq;
+ orig >>= seq;
Sequence<Any> seq2;
returned >>= seq2;
return equalSequences(seq, seq2);
@@ -258,7 +258,7 @@ bool equalSequences(const Any& orig, const Any& returned)
case TypeClass_SEQUENCE:
{
//Sequence<sal_Unicode> seq;
- //orig >>= seq;
+ //orig >>= seq;
//Sequence<Any> seq2;
//returned >>= seq2;
//return equalSequences(seq, seq2);
@@ -267,7 +267,7 @@ bool equalSequences(const Any& orig, const Any& returned)
case TypeClass_INTERFACE:
{
Sequence<Reference<XInvocation> > seq;
- orig >>= seq;
+ orig >>= seq;
Sequence<Any> seq2;
returned >>= seq2;
return equalSequences(seq, seq2);
@@ -292,16 +292,16 @@ bool equalSequences(const Sequence<T>& seqIn, const Sequence<Any> & seqOut)
if (anyIn != anyOut)
return false;
}
-
+
return true;
}
void printSequence( Sequence<Any>& val)
{
-// typelib_TypeDescription* desc;
-// val.getValueTypeDescription( &desc);
-// typelib_typedescription_release( desc);
+// typelib_TypeDescription* desc;
+// val.getValueTypeDescription( &desc);
+// typelib_typedescription_release( desc);
USES_CONVERSION;
char buff[1024];
diff --git a/extensions/test/ole/OleConverterVar1/convTest.cxx b/extensions/test/ole/OleConverterVar1/convTest.cxx
index 6cc6e47462ac..7e89e660d40b 100644
--- a/extensions/test/ole/OleConverterVar1/convTest.cxx
+++ b/extensions/test/ole/OleConverterVar1/convTest.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
@@ -81,7 +81,7 @@ int __cdecl _tmain( int argc, _TCHAR * argv[] )
return -1;
}
-
+
_Module.Init( ObjectMap, GetModuleHandle( NULL));
if( FAILED(hr=doTest()))
@@ -107,16 +107,16 @@ double _double[]= {12345, 1234.5, 123.45, 12.345, 1.2345};
CComVariant _variant[]= {L"variant 1", L"variant2", L"variant3"};
wchar_t _wchar[]= {L'1', L'2', L'3', L'A', L' '};
BSTR _bstr[]={L"Ich", L"bin", L"ein", L"Hamburger", L"Jung"};
-SmartArray<char> arByte( _c, 5, VT_I1);
-SmartArray< short> arShort( _short, 5, VT_I2);
+SmartArray<char> arByte( _c, 5, VT_I1);
+SmartArray< short> arShort( _short, 5, VT_I2);
//SmartArray< unsigned short> arUShort( _ushort, 5, VT_UI2);
-SmartArray< long> arLong( _long, 5, VT_I4);
-//SmartArray< unsigned long> arULong( _ulong, 5, VT_UI4);
-//SmartArray< float> arFloat( _float, 5, VT_R4 );
-SmartArray< double> arDouble( _double, 5, VT_R8 );
+SmartArray< long> arLong( _long, 5, VT_I4);
+//SmartArray< unsigned long> arULong( _ulong, 5, VT_UI4);
+//SmartArray< float> arFloat( _float, 5, VT_R4 );
+SmartArray< double> arDouble( _double, 5, VT_R8 );
//SmartArray< unsigned short> arWChar( _wchar, 5, VT_UI2 );
-SmartArray< wchar_t* > arString( _bstr, 5, VT_BSTR);
-SmartArray< VARIANT > arVariant( _variant, 3, VT_VARIANT);
+SmartArray< wchar_t* > arString( _bstr, 5, VT_BSTR);
+SmartArray< VARIANT > arVariant( _variant, 3, VT_VARIANT);
HRESULT doTest()
@@ -128,7 +128,7 @@ HRESULT doTest()
putenv("UNO_TYPES=types.rdb");
putenv("UNO_SERVICES=services.rdb");
Reference<XComponentContext> xContext = defaultBootstrap_InitialComponentContext();
-
+
Reference< XMultiComponentFactory > mgr = xContext->getServiceManager();//createRegistryServiceFactory( OUString(L"services.rdb"));
Reference< XInterface > xIntSupplier= mgr->createInstanceWithContext(
OUString(L"com.sun.star.bridge.OleBridgeSupplierVar1"), xContext);
@@ -139,12 +139,12 @@ HRESULT doTest()
any <<= xOletest;
sal_uInt8 arId[16];
rtl_getGlobalProcessId( arId);
- Any target= xSuppl->createBridge( any, Sequence<sal_Int8>( (sal_Int8*)arId, 16), UNO, OLE);
+ Any target= xSuppl->createBridge( any, Sequence<sal_Int8>( (sal_Int8*)arId, 16), UNO, OLE);
CComDispatchDriver oletest;
if (target.getValueTypeClass() == getCppuType((sal_uInt32*) 0).getTypeClass())
{
VARIANT* pVariant = *(VARIANT**)target.getValue();
-
+
oletest= pVariant->pdispVal;
VariantClear(pVariant);
@@ -156,22 +156,22 @@ HRESULT doTest()
CComVariant varParam2;
CComVariant varParam3;
CComVariant varParam4;
-
+
long value= 100;
varParam1.vt= VT_I1 | VT_BYREF;
varParam1.plVal= &value;
- // Testing the caching of DISPIDs and the process of aquiring member information
+ // Testing the caching of DISPIDs and the process of aquiring member information
// on demand in IDispatch::Invoke
// Step through the corresponding IDispatch implementation of the ole bridge
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodByte"), &varParam1, &varRet);
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodByte"), &varParam1, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodByte"), &varParam1, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodByte"), &varParam1, &varRet);
// Name ok but different case
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"Testinout_methodByte"), &varParam1, &varRet);
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"Testinout_methodByte"), &varParam1, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"Testinout_methodByte"), &varParam1, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"Testinout_methodByte"), &varParam1, &varRet);
// not existing member
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"Testinout"), &varParam1, &varRet);
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"Testinout"), &varParam1, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"Testinout"), &varParam1, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"Testinout"), &varParam1, &varRet);
// Property
varParam1.vt= VT_ARRAY | VT_I1;
@@ -222,14 +222,14 @@ HRESULT doTest()
LPOLESTR attrib= L"AttrByte";
hr = oletest.p->GetIDsOfNames(IID_NULL, &attrib, 1, LOCALE_USER_DEFAULT, &dispid);
-
+
hr = oletest.p->Invoke( dispid, IID_NULL, LOCALE_USER_DEFAULT,
DISPATCH_METHOD | DISPATCH_PROPERTYPUTREF, &params, &varRet, NULL, NULL);
hr = oletest.p->Invoke( dispid, IID_NULL, LOCALE_USER_DEFAULT,
DISPATCH_METHOD | DISPATCH_PROPERTYGET, &params, &varRet, NULL, NULL);
-
+
CComVariant varByteArray;
varByteArray.vt= VT_ARRAY | VT_I1;
@@ -269,36 +269,36 @@ HRESULT doTest()
CComVariant varUnkArray;
varUnkArray.vt= VT_ARRAY | VT_UNKNOWN;
varUnkArray.parray= (SAFEARRAY*)arUnknown;
-
+
// preparing out parameter;
char byteOut;
- CComVariant varOutByte; //###
+ CComVariant varOutByte; //###
varOutByte.vt= VT_BYREF | VT_UI1;
V_I1REF(&varOutByte)= &byteOut;
short shortOut;
- CComVariant varOutShort; //###
+ CComVariant varOutShort; //###
varOutShort.vt= VT_BYREF | VT_I2;
V_I2REF( &varOutShort)= &shortOut;
long longOut;
- CComVariant varOutLong; //###
+ CComVariant varOutLong; //###
varOutLong.vt= VT_BYREF | VT_I4;
V_I4REF( &varOutLong)= &longOut;
double doubleOut;
- CComVariant varOutDouble; //###
+ CComVariant varOutDouble; //###
varOutDouble.vt= VT_BYREF | VT_R8;
V_R8REF( &varOutDouble)= &doubleOut;
BSTR bstrOut= NULL;
- CComVariant varOutString; //###
+ CComVariant varOutString; //###
varOutString.vt= VT_BYREF | VT_BSTR;
V_BSTRREF(&varOutString)= &bstrOut;
CComVariant variantOut;
- CComVariant varOutAny; //###
+ CComVariant varOutAny; //###
varOutAny.vt= VT_BYREF | VT_VARIANT;
V_VARIANTREF(&varOutAny)= &variantOut;
CComPtr<IDispatch> dispOut;
CComVariant varOutXInterface; //###
- varOutXInterface.vt= VT_BYREF |VT_DISPATCH;
+ varOutXInterface.vt= VT_BYREF |VT_DISPATCH;
V_DISPATCHREF(&varOutXInterface)= &dispOut.p;
// In Parameter ( all of type Sequence ###########################################################
@@ -307,43 +307,43 @@ HRESULT doTest()
OutputDebugStringA("methodByte | Params: \n");
printVariant( varByteArray);
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodByte"), &varByteArray, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodByte"), &varByteArray, &varRet);
OutputDebugStringA("methodByte | return value \n");
printVariant( varRet);
OutputDebugStringA("methodShort | Params: \n");
printVariant( varShortArray);
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodShort"), &varShortArray, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodShort"), &varShortArray, &varRet);
OutputDebugStringA("methodShort | return value \n");
printVariant( varRet);
OutputDebugStringA("methodLong | Params: \n");
printVariant( varLongArray);
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodLong"), &varLongArray, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodLong"), &varLongArray, &varRet);
OutputDebugStringA("methodLong | return value \n");
printVariant( varRet);
OutputDebugStringA("methodDouble | Params: \n");
printVariant( varDoubleArray);
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodDouble"), &varDoubleArray, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodDouble"), &varDoubleArray, &varRet);
OutputDebugStringA("methodDouble | return value \n");
printVariant( varRet);
OutputDebugStringA("methodString | Params: \n");
printVariant( varStringArray);
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodString"), &varStringArray, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodString"), &varStringArray, &varRet);
OutputDebugStringA("methodString | return value \n");
printVariant( varRet);
OutputDebugStringA("methodAny | Params: \n");
printVariant( varArray);
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodAny"), &varArray, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodAny"), &varArray, &varRet);
OutputDebugStringA("methodAny | return value \n");
printVariant( varRet);
OutputDebugStringA("methodXInterface | Params: \n");
printVariant( varUnkArray);
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodXInterface"), &varUnkArray, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"methodXInterface"), &varUnkArray, &varRet);
OutputDebugStringA("methodAny | return value \n");
printVariant( varRet);
@@ -351,44 +351,44 @@ HRESULT doTest()
OutputDebugString( _T("Out parameter ###########################################\n\n"));
OutputDebugString(_T("testout_methodByte \n"));
- hr= oletest.InvokeN(static_cast<LPCOLESTR>(L"testout_methodByte"), &varOutByte, 1, &varRet);
+ hr= oletest.InvokeN(static_cast<LPCOLESTR>(L"testout_methodByte"), &varOutByte, 1, &varRet);
OutputDebugString(_T("testout_methodByte | out value: \n"));
printVariant( varOutByte);
OutputDebugString(_T("testout_methodShort \n"));
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodShort"), &varOutShort, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodShort"), &varOutShort, &varRet);
OutputDebugString(_T("testout_methodShort | out value: \n"));
printVariant( varOutShort);
OutputDebugString(_T("testout_methodLong \n"));
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodLong"), &varOutLong, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodLong"), &varOutLong, &varRet);
OutputDebugString(_T("testout_methodLong | out value: \n"));
printVariant( varOutLong);
OutputDebugString(_T("testout_methodDouble \n"));
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodDouble"), &varOutDouble, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodDouble"), &varOutDouble, &varRet);
OutputDebugString(_T("testout_methodDouble | out value: \n"));
printVariant( varOutDouble);
OutputDebugString(_T("testout_methodString \n"));
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodString"), &varOutString, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodString"), &varOutString, &varRet);
OutputDebugString(_T("testout_methodString | out value: \n"));
printVariant( varOutString);
OutputDebugString(_T("testout_methodAny \n"));
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodAny"), &varOutAny, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodAny"), &varOutAny, &varRet);
OutputDebugString(_T("methodAny | out value: \n"));
printVariant( varOutAny);
OutputDebugString(_T("testout_methodXInterface \n"));
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodXInterface"), &varOutXInterface, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testout_methodXInterface"), &varOutXInterface, &varRet);
OutputDebugString(_T("methodAny | out value: \n"));
printVariant( varOutXInterface);
CComDispatchDriver outDisp( *varOutXInterface.ppdispVal);
CComVariant varAttr3;
outDisp.GetPropertyByName(L"AttrAny2", &varAttr3);
ATLTRACE("property OleTest.AttrAny2: %s", W2T(varAttr3.bstrVal));
-
+
OutputDebugString(_T("testout_methodMulParams1 ( 2 out Parameter) \n"));
long longOut2=0;
CComVariant _params[2];
@@ -396,18 +396,18 @@ HRESULT doTest()
_params[0]= varOutLong;
_params[1].vt= VT_BYREF | VT_I4;
V_I4REF(& _params[1])= &longOut2;
- hr= oletest.InvokeN( static_cast<LPCOLESTR>(L"testout_methodMulParams1"), (VARIANT*)&_params, 2);
+ hr= oletest.InvokeN( static_cast<LPCOLESTR>(L"testout_methodMulParams1"), (VARIANT*)&_params, 2);
OutputDebugString(_T("testout_methodMulParams1 | out values: \n"));
printVariant( _params[1]);
printVariant( _params[0]);
-
+
OutputDebugString(_T("testout_methodMulParams2 ( 3 out Parameter) \n"));
CComVariant _params2[3];
_params2[2]= varOutLong;
_params2[1].vt= VT_BYREF | VT_I4;
V_I4REF(& _params2[1])= &longOut2;
_params2[0]= varOutString;
- hr= oletest.InvokeN( static_cast<LPCOLESTR>( L"testout_methodMulParams2"), (VARIANT*)&_params2, 3);
+ hr= oletest.InvokeN( static_cast<LPCOLESTR>( L"testout_methodMulParams2"), (VARIANT*)&_params2, 3);
OutputDebugString(_T("testout_methodMulParams2 | out values: \n"));
printVariant( _params2[2]);
printVariant( _params2[1]);
@@ -417,42 +417,42 @@ HRESULT doTest()
CComVariant _params3[2];
_params3[1]= CComBSTR(L" In string");
_params3[0]= varOutString;
- hr= oletest.InvokeN( static_cast<LPCOLESTR>( L"testout_methodMulParams3"), (VARIANT*)&_params3, 2);
+ hr= oletest.InvokeN( static_cast<LPCOLESTR>( L"testout_methodMulParams3"), (VARIANT*)&_params3, 2);
OutputDebugString(_T("testout_methodMulParams3 | out values: \n"));
printVariant( _params3[1]);
printVariant( _params3[0]);
-
+
//In Out Parameter ###########################################################################
OutputDebugString( _T("In Out parameter ###########################################\n\n"));
*V_I1REF(&varOutByte)= 5;
ATLTRACE(_T("testinout_methodByte | in value: %d \n"), *V_I1REF(&varOutByte));
- hr= oletest.InvokeN(static_cast<LPCOLESTR>(L"testinout_methodByte"), &varOutByte, 1, &varRet);
+ hr= oletest.InvokeN(static_cast<LPCOLESTR>(L"testinout_methodByte"), &varOutByte, 1, &varRet);
OutputDebugString(_T("testinout_methodByte | out value: \n"));
printVariant( varOutByte);
OutputDebugString(_T("testinout_methodShort | in value= 1000 \n"));
*V_UI2REF(&varOutShort)= 1000;
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodShort"), &varOutShort, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodShort"), &varOutShort, &varRet);
OutputDebugString(_T("testinout_methodShort | out value: \n"));
printVariant( varOutShort);
OutputDebugString(_T("testinout_methodLong | in value= 10000 \n"));
*V_UI4REF(&varOutLong)= 10000;
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodLong"), &varOutLong, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodLong"), &varOutLong, &varRet);
OutputDebugString(_T("testinout_methodLong | out value: \n"));
printVariant( varOutLong);
*V_R8REF(&varOutDouble)= 3.14;
ATLTRACE(_T("testinou_methodDouble in value: %f \n"),*V_R8REF(&varOutDouble));
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodDouble"), &varOutDouble, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodDouble"), &varOutDouble, &varRet);
OutputDebugString(_T("testinout_methodDouble | out value: \n"));
printVariant( varOutDouble);
SysFreeString( *V_BSTRREF(&varOutString));
*V_BSTRREF(&varOutString)= SysAllocString( L"this is a in string");
ATLTRACE(_T("testinout_methodString | value: %s \n"), W2T(*V_BSTRREF(&varOutString)));
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodString"), &varOutString, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodString"), &varOutString, &varRet);
OutputDebugString(_T("testinout_methodString | out value: \n"));
printVariant( varOutString);
@@ -461,7 +461,7 @@ HRESULT doTest()
outVar1.vt= VT_BYREF | VT_VARIANT;
outVar1.pvarVal= &var1;
ATLTRACE(_T("testinout_methodAny | parameter: %s\n"), W2T(var1.bstrVal));
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodAny"), &varOutAny, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodAny"), &varOutAny, &varRet);
OutputDebugString(_T("testinout_methodAny | out value: \n"));
printVariant( varOutAny);
@@ -472,7 +472,7 @@ HRESULT doTest()
(*varOutIFace.ppunkVal)->AddRef();
OutputDebugString(_T("testinout_methodXInterface | in value: \n"));
printVariant(varOutIFace);
- hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodXInterface"), &varOutIFace, &varRet);
+ hr= oletest.Invoke1(static_cast<LPCOLESTR>(L"testinout_methodXInterface"), &varOutIFace, &varRet);
OutputDebugString(_T("testinout_methodXInterface | out value: \n"));
printVariant( varOutIFace);
@@ -489,8 +489,8 @@ HRESULT doTest()
varRet.Clear();
hr= oletest.GetPropertyByName( static_cast<LPCOLESTR>(L"AttrByte"), &varRet);
printVariant( varRet);
-
-
+
+
return S_OK;
@@ -502,7 +502,7 @@ void printVariant( VARIANT & _var)
HRESULT hr;
USES_CONVERSION;
CComVariant var;
- hr= VariantCopyInd( &var, &_var);
+ hr= VariantCopyInd( &var, &_var);
if( var.vt & VT_ARRAY)
{
VARTYPE type= var.vt ^ VT_ARRAY;
@@ -522,7 +522,7 @@ void printVariant( VARIANT & _var)
OutputDebugString( _T("# Array \n"));
for( long i= 0; i < count; i++)
{
-// CComVariant variantValue;
+// CComVariant variantValue;
TCHAR *buf[256];
wsprintf( (TCHAR*)buf, _T("%d : "), i);
OutputDebugString( (TCHAR*)buf);
@@ -602,15 +602,15 @@ void printVariant( VARIANT & _var)
break;
case VT_I4: wsprintf( (TCHAR*)buf, _T(" VT_I4: %d \n"), V_I4( &var) );
break;
- case VT_R8:
+ case VT_R8:
{
+
+// int decimal, sign;
+// char *buffer;
+// int precision = 14;
+// double source = 3.1415926535;
-// int decimal, sign;
-// char *buffer;
-// int precision = 14;
-// double source = 3.1415926535;
-
-// buffer = _ecvt( V_R8(&var), precision, &decimal, &sign );
+// buffer = _ecvt( V_R8(&var), precision, &decimal, &sign );
sprintf( (TCHAR*)buf, _T(" VT_R8: %f \n"),V_R8( &var) );
break;
}
@@ -635,7 +635,7 @@ void printVariant( VARIANT & _var)
break;
}
-
+
case VT_BSTR:
{
diff --git a/extensions/test/ole/OleConverterVar1/smartarray.h b/extensions/test/ole/OleConverterVar1/smartarray.h
index 13b5337cd11e..f38c93d88cd2 100644
--- a/extensions/test/ole/OleConverterVar1/smartarray.h
+++ b/extensions/test/ole/OleConverterVar1/smartarray.h
@@ -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
@@ -42,14 +42,14 @@ public:
rgsabound[0].cElements= count;
rgsabound[0].lLbound= 0;
m_array= SafeArrayCreate( destVartype, 1, rgsabound);
- SafeArrayLock( m_array);
-
+ SafeArrayLock( m_array);
+
void* pData;
if( m_array && (SUCCEEDED( SafeArrayAccessData( m_array, (void**)&pData)) ) )
{
for( int i=0; i< count; i++)
- {
+ {
CComVariant varSource( parParams[i]);
switch (destVartype)
{
@@ -121,18 +121,18 @@ public:
VARIANT *pVariant= (VARIANT*)pData;
hr= VariantCopy( &pVariant[i], &varSource); break;
}
-// case VT_UNKNOWN:
-// {
-// long* pUnk= (long*)pData;
-// pUnk[i]= reinterpret_cast<long>(parParams[i]);
-// ((IUnknown*)pUnk[i])->AddRef(); break;
-// }
-// case VT_DISPATCH:
-// {
-// long* pDisp= (long*)pData;
-// pDisp[i]= (long)parParams[i];
-// ((IDispatch*)pDisp[i])->AddRef(); break;
-// }
+// case VT_UNKNOWN:
+// {
+// long* pUnk= (long*)pData;
+// pUnk[i]= reinterpret_cast<long>(parParams[i]);
+// ((IUnknown*)pUnk[i])->AddRef(); break;
+// }
+// case VT_DISPATCH:
+// {
+// long* pDisp= (long*)pData;
+// pDisp[i]= (long)parParams[i];
+// ((IDispatch*)pDisp[i])->AddRef(); break;
+// }
default:
hr= E_FAIL;
}
@@ -145,7 +145,7 @@ public:
}
SafeArrayUnaccessData( m_array);
}
- ~SmartArray(){
+ ~SmartArray(){
SafeArrayUnlock( m_array);
SafeArrayDestroy( m_array );
}
@@ -162,44 +162,44 @@ class SmartArray<IUnknown*>
SAFEARRAY *m_array;
public:
- SmartArray( sourceType * parParams, int count, VARTYPE destVartype);
-// {
-// ATLTRACE("SmartArray<IUnknown>");
-// HRESULT hr= S_OK;
-// SAFEARRAYBOUND rgsabound[1];
-// rgsabound[0].cElements= count;
-// rgsabound[0].lLbound= 0;
-// m_array= SafeArrayCreateVector( VT_UNKNOWN, 0, count);
-// SafeArrayLock( m_array);
+ SmartArray( sourceType * parParams, int count, VARTYPE destVartype);
+// {
+// ATLTRACE("SmartArray<IUnknown>");
+// HRESULT hr= S_OK;
+// SAFEARRAYBOUND rgsabound[1];
+// rgsabound[0].cElements= count;
+// rgsabound[0].lLbound= 0;
+// m_array= SafeArrayCreateVector( VT_UNKNOWN, 0, count);
+// SafeArrayLock( m_array);
+//
+// IUnknown* *pData;
+// if( m_array && (SUCCEEDED( SafeArrayAccessData( m_array, (void**)&pData)) ) )
+// {
//
-// IUnknown* *pData;
-// if( m_array && (SUCCEEDED( SafeArrayAccessData( m_array, (void**)&pData)) ) )
-// {
+// for( int i=0; i< count; i++)
+// {
+// CComVariant varSource( parParams[i]);
+// switch (destVartype)
+// {
//
-// for( int i=0; i< count; i++)
-// {
-// CComVariant varSource( parParams[i]);
-// switch (destVartype)
-// {
-//
-// case VT_UNKNOWN:
-// {
-// pData[i]= parParams[i];
-// pData[i]->AddRef();
-// }
-// default:
-// hr= E_FAIL;
-// }
-// }
-// if( FAILED( hr))
-// {
-// SafeArrayDestroy( m_array);
-// m_array= NULL;
-// }
-// }
-// SafeArrayUnaccessData( m_array);
-// }
- ~SmartArray(){
+// case VT_UNKNOWN:
+// {
+// pData[i]= parParams[i];
+// pData[i]->AddRef();
+// }
+// default:
+// hr= E_FAIL;
+// }
+// }
+// if( FAILED( hr))
+// {
+// SafeArrayDestroy( m_array);
+// m_array= NULL;
+// }
+// }
+// SafeArrayUnaccessData( m_array);
+// }
+ ~SmartArray(){
SafeArrayUnlock( m_array);
SafeArrayDestroy( m_array );
}
@@ -218,13 +218,13 @@ template <> SmartArray <IUnknown*>::SmartArray(sourceType * parParams, int count
rgsabound[0].cElements= count;
rgsabound[0].lLbound= 0;
m_array= SafeArrayCreateVector( VT_UNKNOWN, 0, count);
- SafeArrayLock( m_array);
-
+ SafeArrayLock( m_array);
+
IUnknown* *pData;
if( m_array && (SUCCEEDED( SafeArrayAccessData( m_array, (void**)&pData)) ) )
{
for( int i=0; i< count; i++)
- {
+ {
pData[i]= parParams[i];
pData[i]->AddRef();
}
diff --git a/extensions/test/ole/cpnt/cpnt.cxx b/extensions/test/ole/cpnt/cpnt.cxx
index c44728b9def5..589d27f438c2 100644
--- a/extensions/test/ole/cpnt/cpnt.cxx
+++ b/extensions/test/ole/cpnt/cpnt.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
@@ -65,7 +65,7 @@ using namespace oletest;
using namespace rtl;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
-using namespace com::sun::star::beans;
+using namespace com::sun::star::beans;
using namespace com::sun::star::registry;
using namespace com::sun::star::script;
using namespace com::sun::star::reflection;
@@ -136,7 +136,7 @@ class OComponent : public WeakImplHelper7<
Reference<XInvocation> m_attr_xinvocation;
public:
- OComponent( const Reference<XMultiServiceFactory> & rFactory ) :
+ OComponent( const Reference<XMultiServiceFactory> & rFactory ) :
m_rFactory( rFactory ), m_arrayConstructor(0) {}
~OComponent();
public: // XTestSequence
@@ -157,7 +157,7 @@ public: // XTestSequence
virtual Sequence< Sequence< Sequence< sal_Int32 > > > SAL_CALL methodSequence2(const Sequence< Sequence< Sequence< sal_Int32 > > >& aSeq) throw( RuntimeException );
virtual Sequence< Reference<XEventListener> > SAL_CALL methodXEventListeners( const Sequence<Reference<XEventListener> >& aSeq) throw( RuntimeException);
virtual Sequence< Sequence<Reference<XEventListener > > > SAL_CALL methodXEventListenersMul( const Sequence<Sequence<Reference<XEventListener > > >& aSeq ) throw (RuntimeException);
-
+
virtual Sequence< sal_Int8 > SAL_CALL getAttrByte(void) throw( RuntimeException );
virtual void SAL_CALL setAttrByte(const Sequence< sal_Int8 >& AttrByte_) throw( RuntimeException );
virtual Sequence< float > SAL_CALL getAttrFloat(void) throw( RuntimeException) ;
@@ -263,7 +263,7 @@ public: // XTestSequence
virtual void SAL_CALL setAttrAny2(const Any& AttrAny2_) throw( RuntimeException ) ;
- // XTestStruct
+ // XTestStruct
virtual void SAL_CALL methodStruct(const Property& aProp) throw( RuntimeException );
virtual Property SAL_CALL retMethodStruct(void) throw( RuntimeException );
@@ -280,25 +280,25 @@ public: // XTestSequence
virtual Any SAL_CALL other_methodAny( const Any& rAny, const OUString& typeInAny )
throw (RuntimeException);
-
+
// XTestOutParameters ------------------------------------------------------------------------
// virtual void SAL_CALL out_test(sal_Int8 rIn) throw( RuntimeException );
-// virtual void SAL_CALL out_methodByte(sal_Int8& rOut) throw( RuntimeException );
-// virtual void SAL_CALL out_methodFloat(float& rOut) throw( RuntimeException );
-// virtual void SAL_CALL out_methodDouble(double& rOut) throw( RuntimeException );
-// virtual void SAL_CALL out_methodBool(sal_Bool& rOut) throw( RuntimeException );
-// virtual void SAL_CALL out_methodShort(sal_Int16& rOut) throw( RuntimeException );
-// virtual void SAL_CALL out_methodUShort(sal_uInt16& rOut) throw( RuntimeException );
-// virtual void SAL_CALL out_methodLong(sal_Int32& rOut) throw( RuntimeException );
-// virtual void SAL_CALL out_methodULong(sal_uInt32& rOut) throw( RuntimeException );
-// virtual void SAL_CALL out_methodHyper(sal_Int64& rOut) throw( RuntimeException );
-// virtual void SAL_CALL out_methodUHyper(sal_uInt64& rOut) throw( RuntimeException );
+// virtual void SAL_CALL out_methodByte(sal_Int8& rOut) throw( RuntimeException );
+// virtual void SAL_CALL out_methodFloat(float& rOut) throw( RuntimeException );
+// virtual void SAL_CALL out_methodDouble(double& rOut) throw( RuntimeException );
+// virtual void SAL_CALL out_methodBool(sal_Bool& rOut) throw( RuntimeException );
+// virtual void SAL_CALL out_methodShort(sal_Int16& rOut) throw( RuntimeException );
+// virtual void SAL_CALL out_methodUShort(sal_uInt16& rOut) throw( RuntimeException );
+// virtual void SAL_CALL out_methodLong(sal_Int32& rOut) throw( RuntimeException );
+// virtual void SAL_CALL out_methodULong(sal_uInt32& rOut) throw( RuntimeException );
+// virtual void SAL_CALL out_methodHyper(sal_Int64& rOut) throw( RuntimeException );
+// virtual void SAL_CALL out_methodUHyper(sal_uInt64& rOut) throw( RuntimeException );
// virtual void SAL_CALL out_methodString(OUString& rOut) throw( RuntimeException );
-// virtual void SAL_CALL out_methodChar(sal_Unicode& rOut) throw( RuntimeException );
-// virtual void SAL_CALL out_methodAny(Any& rOut) throw( RuntimeException );
-// virtual void SAL_CALL out_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException );
-// virtual void SAL_CALL out_methodSequence2(Sequence< Sequence< sal_Int32 > >& rOut) throw( RuntimeException );
+// virtual void SAL_CALL out_methodChar(sal_Unicode& rOut) throw( RuntimeException );
+// virtual void SAL_CALL out_methodAny(Any& rOut) throw( RuntimeException );
+// virtual void SAL_CALL out_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException );
+// virtual void SAL_CALL out_methodSequence2(Sequence< Sequence< sal_Int32 > >& rOut) throw( RuntimeException );
// virtual void SAL_CALL out_methodMulParams1(sal_Int32& rout1, sal_Int32& rout2) throw( RuntimeException );
// virtual void SAL_CALL out_methodMulParams2(sal_Int32& rout1, sal_Int32& rout2, OUString& rout3) throw( RuntimeException );
// virtual void SAL_CALL out_methodMulParams3(const OUString& sin, OUString& sout) throw( RuntimeException );
@@ -322,7 +322,7 @@ public: // XTestSequence
virtual Reference<XInvocation > SAL_CALL in_methodInvocation( const Reference< XInvocation >& inv ) throw (RuntimeException);
virtual SimpleStruct SAL_CALL in_methodStruct( const SimpleStruct& aStruct ) throw (RuntimeException);
virtual void SAL_CALL in_methodAll( sal_Int8 b, float f, double d, sal_Bool boo, sal_Int16 sh, sal_uInt16 us, sal_Int32 l, sal_uInt32 ul, const OUString& s, sal_Unicode c, const Any& a, const Type& t, const Reference<XInvocation>& inv ) throw (RuntimeException);
-
+
// XTestInterfaces --------------------------------------------------------------------------
virtual void SAL_CALL testInterface( const Reference< XCallback >& xCallback, sal_Int32 mode ) throw(RuntimeException);
virtual void SAL_CALL testInterface2( const Reference< XSimple >& xSimple, sal_Int32 mode ) throw(RuntimeException);
@@ -355,10 +355,10 @@ OComponent::~OComponent()
// Funktions ==============================================================================
Reference<XInterface> SAL_CALL OComponent_CreateInstance( const Reference<XMultiServiceFactory> & rSMgr ) throw(RuntimeException)
-{
-// Reference<XInterface> xService(static_cast<XWeak*>(new OComponent( rSMgr )), UNO_QUERY);
+{
+// Reference<XInterface> xService(static_cast<XWeak*>(new OComponent( rSMgr )), UNO_QUERY);
OComponent* o= new OComponent( rSMgr );
- Reference<XInterface> xService(static_cast<XIdentity*>(o), UNO_QUERY);
+ Reference<XInterface> xService(static_cast<XIdentity*>(o), UNO_QUERY);
return xService;
}
@@ -366,12 +366,12 @@ Sequence<OUString> OComponent_getSupportedServiceNames(void)
{
Sequence<OUString> aRet(1);
aRet.getArray()[0] = SERVICE_NAME;//ODataInputStream_getImplementationName();
-
+
return aRet;
}
-extern "C" sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey )
+extern "C" sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey )
{
if(pRegistryKey)
{
@@ -402,11 +402,11 @@ extern "C" void * SAL_CALL component_getFactory(
{
Reference<XMultiServiceFactory> xMulFac(
reinterpret_cast< XMultiServiceFactory*>(pServiceManager));
-
- Sequence<OUString> seqServiceNames;
- Reference<XSingleServiceFactory> xFactory = createOneInstanceFactory( xMulFac, SERVICE_NAME,
+
+ Sequence<OUString> seqServiceNames;
+ Reference<XSingleServiceFactory> xFactory = createOneInstanceFactory( xMulFac, SERVICE_NAME,
OComponent_CreateInstance, seqServiceNames);
-
+
if (xFactory.is())
{
xFactory->acquire();
@@ -414,7 +414,7 @@ extern "C" void * SAL_CALL component_getFactory(
}
}
}
- return pRet;
+ return pRet;
}
extern "C" void SAL_CALL component_getImplementationEnvironment(
@@ -425,16 +425,16 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(
// XTestSequence ============================================================================
-Sequence<sal_Int8> SAL_CALL OComponent::methodByte(const Sequence< sal_Int8 >& aSeq) throw( RuntimeException )
-{
+Sequence<sal_Int8> SAL_CALL OComponent::methodByte(const Sequence< sal_Int8 >& aSeq) throw( RuntimeException )
+{
sal_Int8 _x;
for( sal_Int16 i= 0; i < aSeq.getLength(); i++){
_x= aSeq.getConstArray()[i];
}
return aSeq;
}
-Sequence<float> SAL_CALL OComponent::methodFloat(const Sequence< float>& aSeq) throw( RuntimeException )
-{
+Sequence<float> SAL_CALL OComponent::methodFloat(const Sequence< float>& aSeq) throw( RuntimeException )
+{
float _x;
for( sal_Int16 i= 0; i < aSeq.getLength(); i++){
_x= aSeq.getConstArray()[i];
@@ -468,12 +468,12 @@ Sequence< sal_Int16 > SAL_CALL OComponent::methodShort(const Sequence< sal_Int16
Sequence< sal_uInt16 > SAL_CALL OComponent::methodUShort(const Sequence< sal_uInt16 >& aSeq) throw( RuntimeException )
{
sal_uInt16 _x;
- for( sal_Int16 i= 0; i < aSeq.getLength(); i++){
+ for( sal_Int16 i= 0; i < aSeq.getLength(); i++){
_x= aSeq.getConstArray()[i];
}
return aSeq;
}
-Sequence< sal_Int32 > SAL_CALL OComponent::methodLong(const Sequence< sal_Int32 >& aSeq) throw( RuntimeException)
+Sequence< sal_Int32 > SAL_CALL OComponent::methodLong(const Sequence< sal_Int32 >& aSeq) throw( RuntimeException)
{
sal_Int32 _x;
for( sal_Int16 i= 0; i < aSeq.getLength(); i++) {
@@ -481,7 +481,7 @@ Sequence< sal_Int32 > SAL_CALL OComponent::methodLong(const Sequence< sal_Int32
}
return aSeq;
}
-Sequence< sal_uInt32 > SAL_CALL OComponent::methodULong(const Sequence< sal_uInt32 >& aSeq) throw( RuntimeException)
+Sequence< sal_uInt32 > SAL_CALL OComponent::methodULong(const Sequence< sal_uInt32 >& aSeq) throw( RuntimeException)
{
sal_uInt32 _x;
for( sal_Int16 i= 0; i < aSeq.getLength(); i++){
@@ -489,7 +489,7 @@ Sequence< sal_uInt32 > SAL_CALL OComponent::methodULong(const Sequence< sal_uInt
}
return aSeq;
}
-Sequence< OUString > SAL_CALL OComponent::methodString(const Sequence< OUString >& aSeq) throw( RuntimeException)
+Sequence< OUString > SAL_CALL OComponent::methodString(const Sequence< OUString >& aSeq) throw( RuntimeException)
{
OUString _x;
for( sal_Int16 i= 0; i < aSeq.getLength(); i++) {
@@ -497,7 +497,7 @@ Sequence< OUString > SAL_CALL OComponent::methodString(const Sequence< OUString
}
return aSeq;
}
-Sequence< sal_Unicode > SAL_CALL OComponent::methodChar(const Sequence< sal_Unicode >& aSeq) throw( RuntimeException)
+Sequence< sal_Unicode > SAL_CALL OComponent::methodChar(const Sequence< sal_Unicode >& aSeq) throw( RuntimeException)
{
sal_Unicode _x;
for( sal_Int16 i= 0; i < aSeq.getLength(); i++){
@@ -505,7 +505,7 @@ Sequence< sal_Unicode > SAL_CALL OComponent::methodChar(const Sequence< sal_Unic
}
return aSeq;
}
-Sequence< Any > SAL_CALL OComponent::methodAny(const Sequence< Any >& aSeq) throw( RuntimeException)
+Sequence< Any > SAL_CALL OComponent::methodAny(const Sequence< Any >& aSeq) throw( RuntimeException)
{
Any _x;
for( sal_Int16 i= 0; i < aSeq.getLength(); i++){
@@ -527,7 +527,7 @@ Sequence< Type > SAL_CALL OComponent::methodType(const Sequence< Type >& aSeq) t
return aSeq;
}
//Sequence< Reference< XInterface> > SAL_CALL methodXInterface ( const Sequence< Reference < XInterface> >& aSeq)
-// throw (RuntimeException)
+// throw (RuntimeException)
Sequence< Reference< XInterface > > SAL_CALL OComponent::methodXInterface( const Sequence< Reference< XInterface > >& aSeq ) throw(RuntimeException)
{
for( sal_Int32 i= 0; i < aSeq.getLength(); i++)
@@ -540,7 +540,7 @@ Sequence< Reference< XInterface > > SAL_CALL OComponent::methodXInterface( const
return aSeq;
}
-Sequence< Sequence< sal_Int32 > > SAL_CALL OComponent::methodSequence(const Sequence< Sequence< sal_Int32 > >& aSeq) throw( RuntimeException)
+Sequence< Sequence< sal_Int32 > > SAL_CALL OComponent::methodSequence(const Sequence< Sequence< sal_Int32 > >& aSeq) throw( RuntimeException)
{
sal_Int32 value;
for( sal_Int16 i= 0; i < aSeq.getLength(); i++){
@@ -551,7 +551,7 @@ Sequence< Sequence< sal_Int32 > > SAL_CALL OComponent::methodSequence(const Sequ
}
return aSeq;
}
-Sequence< Sequence< Sequence< sal_Int32 > > > SAL_CALL OComponent::methodSequence2(const Sequence< Sequence< Sequence< sal_Int32 > > >& aSeq)
+Sequence< Sequence< Sequence< sal_Int32 > > > SAL_CALL OComponent::methodSequence2(const Sequence< Sequence< Sequence< sal_Int32 > > >& aSeq)
throw( RuntimeException )
{
sal_Int32 value;
@@ -577,10 +577,10 @@ Sequence< Reference< XEventListener> > SAL_CALL OComponent::methodXEventListener
for( int i= 0; i < aSeq.getLength(); i++)
{
listener= aSeq[i];
-
+
listener->disposing( EventObject() );
}
-
+
return aSeq;
}
@@ -589,7 +589,7 @@ Sequence< Sequence<Reference<XEventListener > > > SAL_CALL OComponent::methodXEv
Reference<XEventListener> listener;
for( int i= 0; i < aSeq.getLength(); i++)
{
- Sequence<Reference<XEventListener> > seqInner= aSeq[i];
+ Sequence<Reference<XEventListener> > seqInner= aSeq[i];
for( int j= 0; j < seqInner.getLength(); j++)
{
listener= seqInner[j];
@@ -601,7 +601,7 @@ Sequence< Sequence<Reference<XEventListener > > > SAL_CALL OComponent::methodXEv
//---------------------------------------------------------------------------------------------
-Sequence< sal_Int8 > SAL_CALL OComponent::getAttrByte(void) throw( RuntimeException)
+Sequence< sal_Int8 > SAL_CALL OComponent::getAttrByte(void) throw( RuntimeException)
{
return m_seqByte;
}
@@ -627,8 +627,8 @@ void SAL_CALL OComponent::setAttrDouble(const Sequence< double >& AttrDouble_) t
m_seqDouble= AttrDouble_;
}
-Sequence< sal_Bool > SAL_CALL OComponent::getAttrBool(void) throw( RuntimeException)
-{
+Sequence< sal_Bool > SAL_CALL OComponent::getAttrBool(void) throw( RuntimeException)
+{
return m_seqBool;
}
@@ -637,7 +637,7 @@ void SAL_CALL OComponent::setAttrBool(const Sequence< sal_Bool >& AttrBool_) thr
m_seqBool= AttrBool_;
}
-Sequence< sal_Int16 > SAL_CALL OComponent::getAttrShort(void) throw( RuntimeException)
+Sequence< sal_Int16 > SAL_CALL OComponent::getAttrShort(void) throw( RuntimeException)
{
return m_seqShort;
}
@@ -655,7 +655,7 @@ void SAL_CALL OComponent::setAttrUShort(const Sequence< sal_uInt16 >& AttrUShort
m_seqUShort= AttrUShort_;
}
-Sequence< sal_Int32 > SAL_CALL OComponent::getAttrLong(void) throw( RuntimeException)
+Sequence< sal_Int32 > SAL_CALL OComponent::getAttrLong(void) throw( RuntimeException)
{
return m_seqLong;
}
@@ -686,12 +686,12 @@ Sequence< sal_Unicode > SAL_CALL OComponent::getAttrChar(void) throw( RuntimeEx
{
return m_seqChar;
}
-void SAL_CALL OComponent::setAttrChar(const Sequence< sal_Unicode >& AttrChar_) throw( RuntimeException)
+void SAL_CALL OComponent::setAttrChar(const Sequence< sal_Unicode >& AttrChar_) throw( RuntimeException)
{
m_seqChar= AttrChar_;
}
-Sequence< Any > SAL_CALL OComponent::getAttrAny(void) throw( RuntimeException)
+Sequence< Any > SAL_CALL OComponent::getAttrAny(void) throw( RuntimeException)
{
return m_seqAny;
}
@@ -711,7 +711,7 @@ void SAL_CALL OComponent::setAttrType( const Sequence< Type >& AttrType_) throw(
}
-Sequence< Sequence< sal_Int32 > > SAL_CALL OComponent::getAttrSequence(void) throw( RuntimeException)
+Sequence< Sequence< sal_Int32 > > SAL_CALL OComponent::getAttrSequence(void) throw( RuntimeException)
{
return m_seq1;
}
@@ -735,7 +735,7 @@ Sequence< Sequence< Sequence< sal_Int32 > > > SAL_CALL OComponent::getAttrSequen
{
return m_seq2;
}
-void SAL_CALL OComponent::setAttrSequence2(const Sequence< Sequence< Sequence< sal_Int32 > > >& AttrSequence2_)
+void SAL_CALL OComponent::setAttrSequence2(const Sequence< Sequence< Sequence< sal_Int32 > > >& AttrSequence2_)
throw( RuntimeException )
{
m_seq2= AttrSequence2_;
@@ -771,7 +771,7 @@ void SAL_CALL OComponent::setAFloat( float _afloat ) throw (RuntimeException)
{
m_attr_float = _afloat;
}
-
+
double SAL_CALL OComponent::getADouble() throw (RuntimeException)
{
return m_attr_double;
@@ -943,7 +943,7 @@ void SAL_CALL OComponent::testout_methodChar(sal_Unicode& rOut) throw( RuntimeEx
{
rOut= m_char;
}
-void SAL_CALL OComponent::testout_methodAny(Any& rOut) throw( RuntimeException)
+void SAL_CALL OComponent::testout_methodAny(Any& rOut) throw( RuntimeException)
{
rOut = m_any;
}
@@ -953,7 +953,7 @@ void SAL_CALL OComponent::testout_methodType(Type& rOut) throw( RuntimeException
rOut = m_type;
}
-void SAL_CALL OComponent::testout_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException)
+void SAL_CALL OComponent::testout_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException)
{
rOut.realloc(10);
for( sal_Int16 i= 0; i < rOut.getLength(); i++) rOut.getArray()[i]= i;
@@ -993,9 +993,9 @@ void SAL_CALL OComponent::testout_methodMulParams4( float in1, float& out1, sal_
void SAL_CALL OComponent::testout_methodXInterface( Reference< XInterface >& rOut ) throw(RuntimeException)
{
rOut = m_xinterface;
-// OUString string( L"Property Any");
-// m_any <<= string;
-// rOut= Reference<XInterface> (static_cast<XTestSequence*>(this), UNO_QUERY);
+// OUString string( L"Property Any");
+// m_any <<= string;
+// rOut= Reference<XInterface> (static_cast<XTestSequence*>(this), UNO_QUERY);
}
// XTestInParameters ------------------------------------------------------------
@@ -1023,7 +1023,7 @@ sal_Int16 SAL_CALL OComponent::in_methodShort( sal_Int16 rIn ) throw (RuntimeExc
{
m_int16 = rIn;
return rIn;
-}
+}
sal_uInt16 SAL_CALL OComponent::in_methodUShort( sal_uInt16 rIn ) throw (RuntimeException)
{
m_uint16 = rIn;
@@ -1187,19 +1187,19 @@ void SAL_CALL OComponent::testinout_methodString(OUString& rOut) throw( RuntimeE
rOut = m_string;
m_string = tmp;
}
-void SAL_CALL OComponent::testinout_methodChar(sal_Unicode& rOut) throw( RuntimeException)
+void SAL_CALL OComponent::testinout_methodChar(sal_Unicode& rOut) throw( RuntimeException)
{
sal_Unicode tmp = rOut;
rOut = m_char;
m_char = tmp;
}
-void SAL_CALL OComponent::testinout_methodAny(Any& rOut) throw( RuntimeException)
+void SAL_CALL OComponent::testinout_methodAny(Any& rOut) throw( RuntimeException)
{
Any tmp = rOut;
rOut = m_any;
m_any = tmp;
}
-void SAL_CALL OComponent::testinout_methodType(Type& rOut) throw( RuntimeException)
+void SAL_CALL OComponent::testinout_methodType(Type& rOut) throw( RuntimeException)
{
Type tmp = rOut;
rOut = m_type;
@@ -1207,9 +1207,9 @@ void SAL_CALL OComponent::testinout_methodType(Type& rOut) throw( RuntimeExcepti
}
-void SAL_CALL OComponent::testinout_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException)
+void SAL_CALL OComponent::testinout_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException)
{
-
+
sal_Int32* arr= rOut.getArray();
for ( sal_Int32 i=0; i < rOut.getLength(); i++)
{
@@ -1250,27 +1250,27 @@ void SAL_CALL OComponent::testinout_methodXInterface2( Reference< XInterface > &
Reference<XInterface> tmp = rOut;
rOut = m_xinterface;
m_xinterface = tmp;
-// Reference<XTestSequence> xTest( rOut, UNO_QUERY);
-// if( xTest.is())
-// {
-// Any any= xTest->getAttrAny2();
-// OUString _s;
-// any >>= _s;
-// OUString string= _s + OUString((L" this string was written in the UNO component to the inout pararmeter"));
-// any <<= string;
-// xTest->setAttrAny2( any);
-// }
-
-}
-Any SAL_CALL OComponent::methodAnyTest1(const Any& rIn) throw( RuntimeException )
+// Reference<XTestSequence> xTest( rOut, UNO_QUERY);
+// if( xTest.is())
+// {
+// Any any= xTest->getAttrAny2();
+// OUString _s;
+// any >>= _s;
+// OUString string= _s + OUString((L" this string was written in the UNO component to the inout pararmeter"));
+// any <<= string;
+// xTest->setAttrAny2( any);
+// }
+
+}
+Any SAL_CALL OComponent::methodAnyTest1(const Any& rIn) throw( RuntimeException )
{
return rIn;
}
-Any SAL_CALL OComponent::getAttrAny2(void) throw( RuntimeException )
+Any SAL_CALL OComponent::getAttrAny2(void) throw( RuntimeException )
{
return m_any;
}
-void SAL_CALL OComponent::setAttrAny2(const Any& AttrAny2_) throw( RuntimeException )
+void SAL_CALL OComponent::setAttrAny2(const Any& AttrAny2_) throw( RuntimeException )
{
m_any= AttrAny2_;
}
@@ -1297,7 +1297,7 @@ Property SAL_CALL OComponent::retMethodStruct(void) throw( RuntimeException )
return a;
}
-Property SAL_CALL OComponent::getAttrStruct(void) throw( RuntimeException)
+Property SAL_CALL OComponent::getAttrStruct(void) throw( RuntimeException)
{
Property a(L"OleTest_Property", 255, getCppuType( (Reference<XInterface>*)0), PropertyAttribute::MAYBEVOID |
PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED |
@@ -1313,7 +1313,7 @@ void SAL_CALL OComponent::setAttrStruct(const Property& AttrStruct_) throw( Runt
buff[0]= 0;
sprintf( buff,"Property::Attribute : %d \n Property::Handle : %d \n Property::Name : %S",
AttrStruct_.Attributes, AttrStruct_.Handle, (const sal_Unicode*)AttrStruct_.Name);
-// MessageBox( NULL, A2T(buff), _T("OleTest: setAttrStruct"), MB_OK);
+// MessageBox( NULL, A2T(buff), _T("OleTest: setAttrStruct"), MB_OK);
}
Property SAL_CALL OComponent::methodStruct2( const Property& aProp ) throw (RuntimeException)
@@ -1347,7 +1347,7 @@ Any SAL_CALL OComponent::other_methodAny( const Any& rAny, const OUString& typeI
throw (RuntimeException)
{
Type expectedType;
- typelib_TypeDescription * pDesc= NULL;
+ typelib_TypeDescription * pDesc= NULL;
typelib_typedescription_getByName( &pDesc, typeInAny.pData );
if( pDesc)
{
@@ -1356,96 +1356,96 @@ Any SAL_CALL OComponent::other_methodAny( const Any& rAny, const OUString& typeI
}
if (rAny.getValueType() != expectedType)
throw RuntimeException();
-
+
return rAny;
}
// XTestOutParameters ============================================================================
-// void SAL_CALL OComponent::out_test(sal_Int8 rIn) throw( RuntimeException )
+// void SAL_CALL OComponent::out_test(sal_Int8 rIn) throw( RuntimeException )
// {
// }
// void SAL_CALL OComponent::out_methodByte(sal_Int8& rOut) throw( RuntimeException )
// {
-// rOut= 100;
+// rOut= 100;
// }
// void SAL_CALL OComponent::out_methodDouble(double& rOut) throw( RuntimeException )
// {
-// rOut= 3.14;
+// rOut= 3.14;
// }
// void SAL_CALL OComponent::out_methodFloat(float& rOut) throw( RuntimeException )
// {
-// rOut= 3.14;
+// rOut= 3.14;
// }
-// void SAL_CALL OComponent::out_methodBool(sal_Bool& rOut) throw( RuntimeException )
+// void SAL_CALL OComponent::out_methodBool(sal_Bool& rOut) throw( RuntimeException )
// {
-// rOut= sal_True;
+// rOut= sal_True;
// }
-// void SAL_CALL OComponent::out_methodShort(sal_Int16& rOut) throw( RuntimeException )
+// void SAL_CALL OComponent::out_methodShort(sal_Int16& rOut) throw( RuntimeException )
// {
-// rOut= -100;
+// rOut= -100;
// }
-// void SAL_CALL OComponent::out_methodUShort(sal_uInt16& rOut) throw( RuntimeException )
+// void SAL_CALL OComponent::out_methodUShort(sal_uInt16& rOut) throw( RuntimeException )
// {
-// rOut= 100;
+// rOut= 100;
// }
-// void SAL_CALL OComponent::out_methodLong(sal_Int32& rOut) throw( RuntimeException )
+// void SAL_CALL OComponent::out_methodLong(sal_Int32& rOut) throw( RuntimeException )
// {
-// rOut= -100;
+// rOut= -100;
// }
// void SAL_CALL OComponent::out_methodULong(sal_uInt32& rOut) throw( RuntimeException )
// {
-// rOut= 100;
+// rOut= 100;
// }
// void SAL_CALL OComponent::out_methodHyper(sal_Int64& rOut) throw( RuntimeException )
// {
-
+
// }
// void SAL_CALL OComponent::out_methodUHyper(sal_uInt64& rOut) throw( RuntimeException )
// {
// }
-// void SAL_CALL OComponent::out_methodString(OUString& rOut) throw( RuntimeException )
+// void SAL_CALL OComponent::out_methodString(OUString& rOut) throw( RuntimeException )
// {
-// rOut= L"I'm a string";
+// rOut= L"I'm a string";
// }
-// void SAL_CALL OComponent::out_methodChar(sal_Unicode& rOut) throw( RuntimeException )
+// void SAL_CALL OComponent::out_methodChar(sal_Unicode& rOut) throw( RuntimeException )
// {
-// rOut= 'A';
+// rOut= 'A';
// }
// void SAL_CALL OComponent::out_methodAny(Any& rOut) throw( RuntimeException)
// {
-// Any a;
+// Any a;
// a <<= OUString( L"Hi");
-// rOut= a;
+// rOut= a;
// }
// void SAL_CALL OComponent::out_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException )
// {
-// Sequence< sal_Int32 > aseq(10);
-// for( sal_Int16 i= 0; i < aseq.getLength(); i++) aseq.getArray()[i]= i;
-// rOut= aseq;
+// Sequence< sal_Int32 > aseq(10);
+// for( sal_Int16 i= 0; i < aseq.getLength(); i++) aseq.getArray()[i]= i;
+// rOut= aseq;
// }
// void SAL_CALL OComponent::out_methodSequence2(Sequence< Sequence< sal_Int32 > >& rOut) throw( RuntimeException )
// {
-// rOut= Sequence< Sequence< sal_Int32 > >();
+// rOut= Sequence< Sequence< sal_Int32 > >();
// }
// void SAL_CALL OComponent::out_methodMulParams1(sal_Int32& rout1, sal_Int32& rout2) throw( RuntimeException )
// {
-// rout1= 111;
-// rout2= 222;
+// rout1= 111;
+// rout2= 222;
// }
// void SAL_CALL OComponent::out_methodMulParams2(sal_Int32& rout1, sal_Int32& rout2, OUString& rout3) throw( RuntimeException )
// {
-// rout1= 111;
-// rout2= 222;
-// rout3= L"this is a neet little string";
+// rout1= 111;
+// rout2= 222;
+// rout3= L"this is a neet little string";
// }
// void SAL_CALL OComponent::out_methodMulParams3(const OUString& sin, OUString& sout) throw( RuntimeException )
// {
-// sout= L"this is a neet little string";
+// sout= L"this is a neet little string";
// }
// XTestInterfaces -------------------------------------------------------------------------------------
@@ -1469,15 +1469,15 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
sal_Int8 aByte;
sal_Int16 aShort;
sal_Int32 aLong;
-// sal_uInt16 aUShort;
-// sal_uInt32 aULong;
+// sal_uInt16 aUShort;
+// sal_uInt32 aULong;
switch( mode)
{
case 1:
xCallback->func1(); break;
case 2:
- xSimple= xCallback->returnInterface();
+ xSimple= xCallback->returnInterface();
xSimple->func(L"XCallback::returnInterface");
break;
@@ -1579,23 +1579,23 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
SimpleStruct aSimpleStruct;
SimpleEnum aSimpleEnum;
Sequence<Any> seqAny;
- Any aAny;
- sal_Bool aBool;
+ Any aAny;
+ sal_Bool aBool;
sal_Unicode aChar;
- OUString aString;
- float aFloat;
- double aDouble;
- sal_Int8 aByte;
- sal_Int16 aShort;
- sal_Int32 aLong;
-// sal_uInt16 aUShort;
-// sal_uInt32 aULong;
+ OUString aString;
+ float aFloat;
+ double aDouble;
+ sal_Int8 aByte;
+ sal_Int16 aShort;
+ sal_Int32 aLong;
+// sal_uInt16 aUShort;
+// sal_uInt32 aULong;
xCallback->outValuesAll( xSimple, aSimpleStruct, aSimpleEnum, seqAny, aAny, aBool,
aChar, aString,
aFloat, aDouble,
aByte,
aShort, aLong);
-
+
MessageBox( NULL, _T("XCallback::outValuesAll returned"), _T("OleTest::testInterface"), MB_OK);
break;
}
@@ -1647,7 +1647,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
// a Struct should now contain a different message
MessageBox( NULL, W2T(aStruct.message), _T("OleTest in out parameter"), MB_OK);
}
-
+
}
break;
}
@@ -1684,7 +1684,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
}
}
-
+
break;
}
case 104:
@@ -1815,10 +1815,10 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
sal_Int16 aShort= 0xff;
sal_Int32 aLong= 0xffe;
- xCallback->inoutValuesAll( aXSimple, aStruct, aEnum, aSeq,
- aAny, aBool, aChar, aString, aFloat, aDouble,
+ xCallback->inoutValuesAll( aXSimple, aStruct, aEnum, aSeq,
+ aAny, aBool, aChar, aString, aFloat, aDouble,
aByte, aShort, aLong );
-
+
aXSimple->func(L"XSimple called from OleTest");
MessageBox( NULL, W2T(aStruct.message), _T("OleTest"), MB_OK);
@@ -1856,7 +1856,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
const int LISTENERS= 3;
Reference<XEventListener> arListeners[LISTENERS];
EventObject arEvents[LISTENERS];
-
+
for( int i= 0; i < LISTENERS; i++)
{
Reference<XInterface> aList= static_cast<XWeak*>( new EventListener());
@@ -1867,7 +1867,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
Sequence<EventObject>(arEvents, LISTENERS));
break;
}
-
+
// ############################################################################
// Call a COM object that has not been passed as parameter to a UNO component and
// hence no type information are available in the COM wrapper
@@ -1875,30 +1875,30 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
case 300:
{
Reference<XInterface> xIntFact = m_rFactory->createInstance(L"com.sun.star.bridge.oleautomation.Factory");
-
+
Reference<XMultiServiceFactory> oleFact(xIntFact, UNO_QUERY);
Reference<XInterface> xIntCallback= oleFact->createInstance(L"XCallback_Impl.Callback");
Reference<XInvocation> xInv( xIntCallback, UNO_QUERY);
//Any SAL_CALL invoke( const OUString& aFunctionName, const Sequence<Any >& aParams,Sequence< sal_Int16 >& aOutParamIndex,
-// Sequence<Any >& aOutParam );
+// Sequence<Any >& aOutParam );
Sequence<sal_Int16> seqIndizes;
Sequence<Any> seqOutParams;
xInv->invoke( OUString( L"outValuesAll"), Sequence<Any>(), seqIndizes, seqOutParams);
-// void outValuesAll( [out] oletest::XSimple outInterface,
-// [out] SimpleStruct outStruct ,
-// [out] SimpleEnum outEnum,
-// [out] sequence<any> outSeqAny,
-// [out] any outAny,
-// [out] boolean outBool,
-// [out] char outChar,
-// [out] string outString,
-// [out] float outFloat,
-// [out] double outDouble,
-// [out] byte outByte,
-// [out] short outShort,
-// [out] long outLong);
+// void outValuesAll( [out] oletest::XSimple outInterface,
+// [out] SimpleStruct outStruct ,
+// [out] SimpleEnum outEnum,
+// [out] sequence<any> outSeqAny,
+// [out] any outAny,
+// [out] boolean outBool,
+// [out] char outChar,
+// [out] string outString,
+// [out] float outFloat,
+// [out] double outDouble,
+// [out] byte outByte,
+// [out] short outShort,
+// [out] long outLong);
if( seqOutParams.getLength() == 12)
{
Reference<XSimple> xSimple= *(XSimple**)seqOutParams[0].getValue();
@@ -1914,7 +1914,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
OUString _s;
seqAny[i] >>= _s;
}
-
+
Any _any= *(Any*)seqOutParams[4].getValue();
sal_Bool _bool= *(sal_Bool*)seqOutParams[5].getValue();
sal_Unicode _char= *( sal_Unicode*) seqOutParams[6].getValue();
@@ -1934,7 +1934,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
// in / out parameter
{
Reference<XInterface> xIntFact = m_rFactory->createInstance(L"com.sun.star.bridge.oleautomation.Factory");
-
+
Reference<XMultiServiceFactory> oleFact(xIntFact, UNO_QUERY);
Reference<XInterface> xIntCallback= oleFact->createInstance(L"XCallback_Impl.Callback");
@@ -1970,7 +1970,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
arSeqAny[0] <<= OUString( L"string 0");
arSeqAny[1] <<= OUString( L"string 1");
arSeqAny[2] <<= OUString( L"string 2");
-
+
arAny[3] <<= Sequence< Any >( arAny, 3);
OUString str(L" Ein Any param");
@@ -1989,9 +1989,9 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
arAny[11] <<= _short;
sal_Int32 _long= -1;
arAny[12] <<= _long;
-//
+//
Sequence<Any> params( arAny, 13);
-
+
xInv->invoke( OUString( L"inoutValuesAll"), params, seqIndizes, seqOutParams);
if( seqOutParams.getLength() == 12)
@@ -2009,7 +2009,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
OUString _s;
seqAny[i] >>= _s;
}
-
+
Any _any= *(Any*)seqOutParams[4].getValue();
sal_Bool _bool= *(sal_Bool*)seqOutParams[5].getValue();
sal_Unicode _char= *( sal_Unicode*) seqOutParams[6].getValue();
@@ -2027,11 +2027,11 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
}
case 303:
// in parameter
-// void inValues( [in] char aChar, [in] long aLong, [in] string aString);
+// void inValues( [in] char aChar, [in] long aLong, [in] string aString);
{
Reference<XInterface> xIntFact = m_rFactory->createInstance(
L"com.sun.star.bridge.oleautomation.Factory");
-
+
Reference<XMultiServiceFactory> oleFact(xIntFact, UNO_QUERY);
Reference<XInterface> xIntCallback= oleFact->createInstance(L"XCallback_Impl.Callback");
@@ -2056,7 +2056,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
// ############################################################################
case 400:
- Reference<XSimple> simple= xCallback->getsimple();
+ Reference<XSimple> simple= xCallback->getsimple();
simple->func(L"OleTest calls on XSimple");
break;
diff --git a/extensions/test/ole/cppToUno/testcppuno.cxx b/extensions/test/ole/cppToUno/testcppuno.cxx
index 6c4745a0f5cd..d1606c343d73 100644
--- a/extensions/test/ole/cppToUno/testcppuno.cxx
+++ b/extensions/test/ole/cppToUno/testcppuno.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
@@ -70,14 +70,14 @@ int __cdecl _tmain( int /*argc*/, _TCHAR * /*argv[]*/ )
return -1;
}
-
+
if( FAILED(hr=doTest()))
{
_com_error err( hr);
const TCHAR * errMsg= err.ErrorMessage();
MessageBox( NULL, errMsg, "Test failed", MB_ICONERROR);
}
-
+
CoUninitialize();
return 0;
}
@@ -104,11 +104,11 @@ HRESULT doTest()
// disp contains now oletest.OleTest
- // one dimensional array
+ // one dimensional array
par= SafeArrayCreateVector( VT_UI1, 0, 5);
unsigned char arbyte[]= { 1,2,3,4,5};
for(long i= 0; i < 5;i++)
- hr= SafeArrayPutElement( par, &i, &arbyte[i]);
+ hr= SafeArrayPutElement( par, &i, &arbyte[i]);
result.Clear();
param1.vt= VT_ARRAY| VT_UI1;
@@ -131,7 +131,7 @@ HRESULT doTest()
long uBound2;
hr= SafeArrayGetUBound( par, 1, &uBound1);
hr= SafeArrayGetUBound( par, 2, &uBound2);
-
+
long index2[2];
memset( index2, 0, 2 * sizeof( long) );
long dimLengths[]={3,2};
@@ -147,28 +147,28 @@ HRESULT doTest()
long (*dataL)[2][3];
hr= SafeArrayAccessData( par, (void**)&pdata);
dataL= (long(*)[2][3])pdata;
-
+
for (long i= 0; i < 2; i ++)
{
for(long j= 0; j < 3; j++)
data= (*dataL)[i][j];
}
hr= SafeArrayUnaccessData(par);
-
+
result.Clear();
param1.vt= VT_ARRAY | VT_I4;
param1.byref= par;
disp.Invoke1(L"methodSequence", &param1, &result);
-
+
SAFEARRAY* arRet= result.parray;
-
+
for(long i= 0; i < 2 ; i++)
{
CComVariant varx;
varx.Clear();
hr= SafeArrayGetElement( arRet, &i, &varx);
SAFEARRAY* ari= varx.parray;
-
+
for( j= 0; j < 3; j++)
{
CComVariant varj;
@@ -188,7 +188,7 @@ HRESULT doTest()
// left index is least significant
bool incrementMultidimensionalIndex(
sal_Int32 dimensions,
- const sal_Int32 * parDimensionLengths,
+ const sal_Int32 * parDimensionLengths,
sal_Int32 * parMultidimensionalIndex)
{
if( dimensions < 1)
@@ -196,7 +196,7 @@ bool incrementMultidimensionalIndex(
bool ret= sal_True;
bool carry= sal_True; // to get into the while loop
-
+
sal_Int32 currentDimension= 0; //most significant is 1
while( carry)
{
diff --git a/extensions/test/ole/cpptest/cpptest.cxx b/extensions/test/ole/cpptest/cpptest.cxx
index ef6f44e5d1c7..9582415dfdfe 100644
--- a/extensions/test/ole/cpptest/cpptest.cxx
+++ b/extensions/test/ole/cpptest/cpptest.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
@@ -57,7 +57,7 @@ int main(int /*argc*/, char** /*argv*/)
const TCHAR * errMsg= err.ErrorMessage();
MessageBox( NULL, errMsg, "Test failed", MB_ICONERROR);
}
-
+
CoUninitialize();
return 0;
}
@@ -82,7 +82,7 @@ HRESULT doTest()
_variant_t varP1(L"com.sun.star.frame.Desktop");
_variant_t varRet;
CComDispatchDriver dispMgr(starManager);
- if (FAILED(hr= dispMgr.Invoke1(L"createInstance", &varP1, &varRet)))
+ if (FAILED(hr= dispMgr.Invoke1(L"createInstance", &varP1, &varRet)))
{
fprintf(stderr,"createInstance of Desktop failed\n");
return hr;
@@ -110,7 +110,7 @@ HRESULT doTest()
CComDispatchDriver dispDoc(varRet.pdispVal);
varRet.Clear();
return S_OK;
-
+
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/test/ole/idl/oletest.idl b/extensions/test/ole/idl/oletest.idl
index 61d668dc0580..c62c236de052 100644
--- a/extensions/test/ole/idl/oletest.idl
+++ b/extensions/test/ole/idl/oletest.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
@@ -46,8 +46,8 @@ interface XTestSequence: com::sun::star::uno::XInterface
sequence<unsigned long> methodULong( [in] sequence<unsigned long> aSeq);
sequence<string> methodString( [in] sequence<string> aSeq);
sequence<char> methodChar( [in] sequence<char> aSeq);
- sequence<any> methodAny ( [in] sequence<any> aSeq);
- sequence<type> methodType ( [in] sequence<type> aSeq);
+ sequence<any> methodAny ( [in] sequence<any> aSeq);
+ sequence<type> methodType ( [in] sequence<type> aSeq);
sequence<com::sun::star::uno::XInterface> methodXInterface ( [in] sequence<com::sun::star::uno::XInterface> aSeq);
sequence< sequence <long> > methodSequence( [in] sequence< sequence< long > > aSeq);
sequence< sequence <sequence <long> > > methodSequence2( [in] sequence< sequence< sequence<long> > > aSeq);
@@ -83,7 +83,7 @@ interface XTestSequence: com::sun::star::uno::XInterface
[attribute] any AAny;
[attribute] type AType;
[attribute] com::sun::star::uno::XInterface AXInterface;
- [attribute] com::sun::star::script::XInvocation AXInvocation;
+ [attribute] com::sun::star::script::XInvocation AXInvocation;
void testout_methodByte( [out] byte rOut );
void testout_methodFloat( [out] float rOut);
@@ -97,8 +97,8 @@ interface XTestSequence: com::sun::star::uno::XInterface
void testout_methodUHyper( [out] unsigned hyper rOut);
void testout_methodString( [out] string rOut);
void testout_methodChar( [out] char rOut);
- void testout_methodAny ( [out] any rOut);
- void testout_methodType ( [out] type rOut);
+ void testout_methodAny ( [out] any rOut);
+ void testout_methodType ( [out] type rOut);
void testout_methodSequence( [out] sequence< long > rOut);
void testout_methodSequence2( [out] sequence < sequence< long > > rOut);
void testout_methodXInterface( [out] com::sun::star::uno::XInterface rOut);
@@ -120,8 +120,8 @@ interface XTestSequence: com::sun::star::uno::XInterface
void testinout_methodUHyper( [inout] unsigned hyper rOut);
void testinout_methodString( [inout] string rOut);
void testinout_methodChar( [inout] char rOut);
- void testinout_methodAny ( [inout] any rOut);
- void testinout_methodType ( [inout] type rOut);
+ void testinout_methodAny ( [inout] any rOut);
+ void testinout_methodType ( [inout] type rOut);
void testinout_methodSequence( [inout] sequence< long > rOut);
void testinout_methodSequence2( [inout] sequence < sequence< long > > rOut);
void testinout_methodXInterface( [inout] com::sun::star::script::XInvocation rOut);
@@ -135,7 +135,7 @@ interface XTestStruct: com::sun::star::uno::XInterface
{
// Method taking structs as arguments
void methodStruct( [in] com::sun::star::beans::Property aProp);
-// Methods returning structs
+// Methods returning structs
com::sun::star::beans::Property retMethodStruct();
// Attributes as structs
[attribute] com::sun::star::beans::Property AttrStruct;
@@ -163,8 +163,8 @@ interface XTestInParameters: com::sun::star::uno::XInterface
unsigned hyper in_methodUHyper( [in] unsigned hyper rIn);
string in_methodString( [in] string rIn);
char in_methodChar( [in] char rIn);
- any in_methodAny ( [in] any rIn);
- type in_methodType ( [in] type rIn);
+ any in_methodAny ( [in] any rIn);
+ type in_methodType ( [in] type rIn);
com::sun::star::uno::XInterface in_methodXInterface([in] com::sun::star::uno::XInterface rIn);
com::sun::star::script::XInvocation in_methodInvocation( [in] com::sun::star::script::XInvocation inv);
SimpleStruct in_methodStruct( [in] SimpleStruct aStruct);
@@ -242,7 +242,7 @@ interface XCallback: com::sun::star::uno::XInterface
[out] string outString,
[out] float outFloat,
[out] double outDouble,
- [out] byte outByte,
+ [out] byte outByte,
[out] short outShort,
[out] long outLong);
// IN OUT parameters
@@ -280,7 +280,7 @@ interface XCallback: com::sun::star::uno::XInterface
void inSeqByte( [in] sequence<byte> val);
void inSeqXEventListener( [in] sequence<com::sun::star::lang::XEventListener> listener, [in]
sequence<com::sun::star::lang::EventObject> events);
-
+
// Attributes
[attribute] oletest::XSimple simple;
diff --git a/extensions/test/ole/unloading/unloadTest.cxx b/extensions/test/ole/unloading/unloadTest.cxx
index 85f2de33db47..ccedf0bd2f74 100644
--- a/extensions/test/ole/unloading/unloadTest.cxx
+++ b/extensions/test/ole/unloading/unloadTest.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
@@ -89,7 +89,7 @@ sal_Bool test1()
osl_unloadModule( hMod);
rtl_unloadUnusedModules( NULL);
-
+
OUString sFactoryFunc( RTL_CONSTASCII_USTRINGPARAM("component_getFactory"));
void* pSymbol= osl_getSymbol( hMod,sFactoryFunc.pData);
// true, instance alive
@@ -145,7 +145,7 @@ sal_Bool test3()
Reference<XSimpleRegistry> xreg= createSimpleRegistry();
xreg->open( OUString( RTL_CONSTASCII_USTRINGPARAM("services.rdb")),
sal_False, sal_False );
-
+
Reference< XComponentContext > context= bootstrap_InitialComponentContext(xreg);
Reference<XMultiComponentFactory> fac= context->getServiceManager();
@@ -172,18 +172,18 @@ sal_Bool test3()
Reference<XComponent> xcomp( context, UNO_QUERY);
xcomp->dispose();
-// for (int i=0; i < 10; i++)
-// {
-// Reference<XSimpleRegistry> xreg= createSimpleRegistry();
-// xreg->open( OUString( RTL_CONSTASCII_USTRINGPARAM("applicat.rdb")),
-// sal_False, sal_False );
-// Reference< XComponentContext > context= bootstrap_InitialComponentContext(xreg);
-// Reference<XComponent> xcomp( context, UNO_QUERY);
-// xcomp->dispose();
+// for (int i=0; i < 10; i++)
+// {
+// Reference<XSimpleRegistry> xreg= createSimpleRegistry();
+// xreg->open( OUString( RTL_CONSTASCII_USTRINGPARAM("applicat.rdb")),
+// sal_False, sal_False );
+// Reference< XComponentContext > context= bootstrap_InitialComponentContext(xreg);
+// Reference<XComponent> xcomp( context, UNO_QUERY);
+// xcomp->dispose();
//
-// }
+// }
-// return sal_True;
+// return sal_True;
return bTest1 && bTest2;
}
@@ -217,7 +217,7 @@ sal_Bool test4()
// ApplicationRegistration is a one-instance-service, therefore kill service manager first
Reference<XComponent> xcomp( context, UNO_QUERY);
xcomp->dispose();
-
+
}
rtl_unloadUnusedModules( NULL);
pSymbol= osl_getSymbol( hMod,sFactoryFunc.pData);
diff --git a/extensions/test/ole/unoTocomCalls/Test/StdAfx.cpp b/extensions/test/ole/unoTocomCalls/Test/StdAfx.cpp
index a5d05fe90aa9..36ed10eddb1a 100644
--- a/extensions/test/ole/unoTocomCalls/Test/StdAfx.cpp
+++ b/extensions/test/ole/unoTocomCalls/Test/StdAfx.cpp
@@ -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
@@ -26,8 +26,8 @@
*
************************************************************************/
// stdafx.cpp : source file that includes just the standard includes
-// Test.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
+// Test.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
diff --git a/extensions/test/ole/unoTocomCalls/Test/StdAfx.h b/extensions/test/ole/unoTocomCalls/Test/StdAfx.h
index 408c5cd1fa87..65fffc04cffe 100644
--- a/extensions/test/ole/unoTocomCalls/Test/StdAfx.h
+++ b/extensions/test/ole/unoTocomCalls/Test/StdAfx.h
@@ -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
@@ -37,7 +37,7 @@
#pragma once
#endif // _MSC_VER > 1000
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <stdio.h>
#include <windows.h>
diff --git a/extensions/test/ole/unoTocomCalls/Test/Test.cpp b/extensions/test/ole/unoTocomCalls/Test/Test.cpp
index 27a2229a4d5d..fcb121be6b2a 100644
--- a/extensions/test/ole/unoTocomCalls/Test/Test.cpp
+++ b/extensions/test/ole/unoTocomCalls/Test/Test.cpp
@@ -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 @@ int main(int argc, char* argv[])
return -1;
}
-
+
_Module.Init( ObjectMap, GetModuleHandle( NULL));
if( FAILED(hr=doTest()))
@@ -61,7 +61,7 @@ int main(int argc, char* argv[])
_Module.Term();
CoUninitialize();
-
+
return 0;
}
@@ -78,7 +78,7 @@ HRESULT doTest()
CComDispatchDriver manager( spUnk);
CComVariant param( L"oletest.OleTest");
CComVariant retVal;
- hr= manager.Invoke1((LPCOLESTR)L"createInstance", &param, &retVal );
+ hr= manager.Invoke1((LPCOLESTR)L"createInstance", &param, &retVal );
CComDispatchDriver oletest( retVal.punkVal);
@@ -92,7 +92,7 @@ HRESULT doTest()
//######################################################################
- // out parameters
+ // out parameters
//######################################################################
CComVariant param1( paramDisp);
CComVariant param2(1);
@@ -149,13 +149,13 @@ HRESULT doTest()
hr= oletest.Invoke2(L"testInterface", &param1, &param2);
// XCallback::outSeqByte
- // Does not work currently because Sequences are always converted to
+ // Does not work currently because Sequences are always converted to
// SAFEARRAY( VARIANT)
- // param2= 32;
- // hr= oletest.Invoke2(L"testInterface", &param1, &param2);
-
+ // param2= 32;
+ // hr= oletest.Invoke2(L"testInterface", &param1, &param2);
+
//######################################################################
- // in / out parameters
+ // in / out parameters
//######################################################################
// XCallback::inoutInterface
param2= 100;
@@ -200,7 +200,7 @@ HRESULT doTest()
param2=120;
hr= oletest.Invoke2(L"testInterface", &param1, &param2);
//######################################################################
- // in parameters
+ // in parameters
//######################################################################
// XCallback::inValues
param2= 200;
@@ -213,7 +213,7 @@ HRESULT doTest()
param2= 202;
hr= oletest.Invoke2(L"testInterface", &param1, &param2);
//######################################################################
- // The UNO test component OleTest calls on XCallback_Impl.Callback directly
+ // The UNO test component OleTest calls on XCallback_Impl.Callback directly
// that is the COM object has not been past a parameter but rather OleTest
// creates the COM object itself
//######################################################################
@@ -244,6 +244,6 @@ HRESULT doTest()
return hr;
}
// VARIANT CComVariant VT_UNKNOWN VT_DISPATCH V_UI1 CComDispatchDriver WINAPI
-
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.cpp b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.cpp
index b8e9847b18a7..ea21a969552e 100644
--- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.cpp
+++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.cpp
@@ -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
@@ -43,7 +43,7 @@ STDMETHODIMP CCallback::func1()
STDMETHODIMP CCallback::returnInterface(IDispatch **ppdisp)
{
if( ! ppdisp)
- return E_POINTER;
+ return E_POINTER;
CComPtr<IDispatch> spDisp;
spDisp.CoCreateInstance( L"XCallback_Impl.Simple");
*ppdisp= spDisp;
@@ -53,15 +53,15 @@ STDMETHODIMP CCallback::returnInterface(IDispatch **ppdisp)
STDMETHODIMP CCallback::outInterface(IDispatch **ppdisp)
{
-// return S_OK;
+// return S_OK;
if( ! ppdisp)
- return E_POINTER;
+ return E_POINTER;
CComPtr<IDispatch> spDisp;
spDisp.CoCreateInstance( L"XCallback_Impl.Simple");
*ppdisp= spDisp;
(*ppdisp)->AddRef();
-// MessageBox( NULL, _T("CCallback::outInterface"), _T(""), MB_OK);
+// MessageBox( NULL, _T("CCallback::outInterface"), _T(""), MB_OK);
return S_OK;
}
@@ -76,7 +76,7 @@ STDMETHODIMP CCallback::outValuesMixed(long val, long *pval, BSTR string)
}
-STDMETHODIMP CCallback::outValuesAll(
+STDMETHODIMP CCallback::outValuesAll(
/* [out] */ IDispatch __RPC_FAR *__RPC_FAR *ppdisp,
/* [out] */ IDispatch __RPC_FAR *__RPC_FAR *ppSimpleStruct,
/* [out] */ long __RPC_FAR *aSimpleEnum,
@@ -92,11 +92,11 @@ STDMETHODIMP CCallback::outValuesAll(
/* [out] */ long __RPC_FAR *aLong)
//)
{
-// if( ! ppdisp || ! ppSimpleStruct || ! aSimpleEnum ||
-// ! outSeq || !varAny ||! aBool || ! aChar ||
-// ! aString || ! aFloat || ! aDouble || ! aByte ||
-// ! aShort || ! aLong || ! aUShort || ! aULong)
-// return E_POINTER;
+// if( ! ppdisp || ! ppSimpleStruct || ! aSimpleEnum ||
+// ! outSeq || !varAny ||! aBool || ! aChar ||
+// ! aString || ! aFloat || ! aDouble || ! aByte ||
+// ! aShort || ! aLong || ! aUShort || ! aULong)
+// return E_POINTER;
HRESULT hr=S_OK;
hr= outInterface( ppdisp);
@@ -117,11 +117,11 @@ STDMETHODIMP CCallback::outValuesAll(
STDMETHODIMP CCallback::outStruct(IDispatch **outStruct)
{
-// return S_OK;
+// return S_OK;
if( !outStruct)
return E_POINTER;
HRESULT hr= E_FAIL;
-// MessageBox( NULL, _T("CCallback::outStruct"), _T(""), MB_OK);
+// MessageBox( NULL, _T("CCallback::outStruct"), _T(""), MB_OK);
CComPtr<IDispatch> _dispMgr;
if( SUCCEEDED(hr= _dispMgr.CoCreateInstance(L"com.sun.star.ServiceManager")))
@@ -130,14 +130,14 @@ STDMETHODIMP CCallback::outStruct(IDispatch **outStruct)
CComVariant param1(L"com.sun.star.reflection.CoreReflection");
CComVariant varRet;
hr= manager.Invoke1( L"createInstance", &param1, &varRet);
-
+
CComDispatchDriver reflection( varRet.pdispVal);
param1= L"oletest.SimpleStruct";
varRet.Clear();
hr= reflection.Invoke1( L"forName", &param1, &varRet);
CComDispatchDriver classSimpleStruct( varRet.pdispVal);
-
+
CComPtr<IDispatch> dispStruct;
param1.vt= VT_DISPATCH | VT_BYREF;
param1.ppdispVal= &dispStruct;
@@ -146,7 +146,7 @@ STDMETHODIMP CCallback::outStruct(IDispatch **outStruct)
// Set the value
CComDispatchDriver simpleStruct( dispStruct);
param1=L" this is a property string";
- hr= simpleStruct.PutPropertyByName(L"message", &param1);
+ hr= simpleStruct.PutPropertyByName(L"message", &param1);
*outStruct= dispStruct;
(*outStruct)->AddRef();
hr= S_OK;
@@ -165,14 +165,14 @@ STDMETHODIMP CCallback::outEnum(long *outEnum)
STDMETHODIMP CCallback::outSeqAny(LPSAFEARRAY* outSeq)
{
-// _CrtDbgBreak();
+// _CrtDbgBreak();
SAFEARRAY* pArr= SafeArrayCreateVector( VT_VARIANT, 0, 3);
CComVariant var[3];
var[0]=L" variant 0";
var[1]=L" variant 1";
var[2]=L"variant 2";
for( long i=0; i<3; i++)
- {
+ {
SafeArrayPutElement( pArr, &i, (void*)&var[i]);
}
@@ -298,7 +298,7 @@ STDMETHODIMP CCallback::inoutStruct(IDispatch **inoutVal)
hr= outStruct( &dispStruct.p);
var.Clear();
var= L"This struct was created in XCallback_Imp.Callback";
- hr= dispStruct.PutPropertyByName(L"message", &var);
+ hr= dispStruct.PutPropertyByName(L"message", &var);
*inoutVal= dispStruct;
(*inoutVal)->AddRef();
@@ -332,7 +332,7 @@ STDMETHODIMP CCallback::inoutSeqAny(LPSAFEARRAY *pArray)
var.Clear();
hr= SafeArrayGetElement( *pArray, &i, (void*)&var);
}
-
+
SafeArrayDestroy( *pArray);
outSeqAny( pArray);
@@ -368,7 +368,7 @@ STDMETHODIMP CCallback::inoutChar(short *inoutVal)
return E_POINTER;
USES_CONVERSION;
char buff[256];
- sprintf( buff, "character value: %C", *inoutVal);
+ sprintf( buff, "character value: %C", *inoutVal);
MessageBox( NULL, A2T(buff), _T("XCallback_Impl.Callback"), MB_OK);
*inoutVal= L'B';
return S_OK;
@@ -426,7 +426,7 @@ STDMETHODIMP CCallback::inoutLong(long* inoutVal)
return S_OK;
}
-STDMETHODIMP CCallback::inoutValuesAll(
+STDMETHODIMP CCallback::inoutValuesAll(
/* [out][in] */ IDispatch __RPC_FAR *__RPC_FAR *aXSimple,
/* [out][in] */ IDispatch __RPC_FAR *__RPC_FAR *aStruct,
/* [out][in] */ long __RPC_FAR *aEnum,
@@ -457,7 +457,7 @@ STDMETHODIMP CCallback::inoutValuesAll(
return S_OK;
}
-
+
STDMETHODIMP CCallback::inValues(short aChar, long aLong, BSTR aString)
{
@@ -504,7 +504,7 @@ STDMETHODIMP CCallback::inSeqXEventListener( LPSAFEARRAY listeners, LPSAFEARRAY
CComDispatchDriver disp( varListener.pdispVal);
hr= disp.Invoke1(L"disposing", &varEvent);
}
-
+
}
return S_OK;
diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.h b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.h
index 645f62c18c93..02cb6cff483f 100644
--- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.h
+++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Callback.h
@@ -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
@@ -34,7 +34,7 @@
/////////////////////////////////////////////////////////////////////////////
// CCallback
-class ATL_NO_VTABLE CCallback :
+class ATL_NO_VTABLE CCallback :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CCallback, &CLSID_Callback>,
public IDispatchImpl<ICallback, &IID_ICallback, &LIBID_XCALLBACK_IMPLLib>
@@ -72,7 +72,7 @@ public:
STDMETHOD(inoutEnum)(/*[in,out]*/ long * inoutVal);
STDMETHOD(inoutStruct)(/*[in,out]*/ IDispatch** inoutVal);
STDMETHOD(inoutInterface)(/*[in,out]*/ IDispatch** ppdisp);
- STDMETHOD(inoutValuesAll)(
+ STDMETHOD(inoutValuesAll)(
/* [out][in] */ IDispatch __RPC_FAR *__RPC_FAR *aXSimple,
/* [out][in] */ IDispatch __RPC_FAR *__RPC_FAR *aStruct,
/* [out][in] */ long __RPC_FAR *aEnum,
@@ -86,7 +86,7 @@ public:
/* [out][in] */ unsigned char __RPC_FAR *aByte,
/* [out][in] */ short __RPC_FAR *aShort,
/* [out][in] */ long __RPC_FAR *aLong);
-
+
STDMETHOD(outByte)( unsigned char* outByte);
STDMETHOD(outLong)(/*[out]*/ long* outLong);
STDMETHOD(outShort)(/*[out]*/ short *outShort);
@@ -99,7 +99,7 @@ public:
STDMETHOD(outSeqAny)(/*[out]*/LPSAFEARRAY* outSeq);
STDMETHOD(outEnum)(/*[out]*/ long* outEnum);
STDMETHOD(outStruct)(/*[out]*/ IDispatch** outStruct);
- virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE outValuesAll(
+ virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE outValuesAll(
/* [out] */ IDispatch __RPC_FAR *__RPC_FAR *ppdisp,
/* [out] */ IDispatch __RPC_FAR *__RPC_FAR *ppSimpleStruct,
/* [out] */ long __RPC_FAR *aSimpleEnum,
@@ -113,19 +113,19 @@ public:
/* [out] */ unsigned char __RPC_FAR *aByte,
/* [out] */ short __RPC_FAR *aShort,
/* [out] */ long __RPC_FAR *aLong);
-// );
+// );
//
-// STDMETHOD(outValuesAll)(
-// /*[out]*/ IDispatch** ppdisp,
-// /*[out]*/ IUnknown** ppSimpleStruct,
-// /*[out]*/ long* aSimpleEnum,
-// /*[out]*/ VARIANT* ArrayAny,
-// /*[out]*/ VARIANT* varAny,
-// /*[out]*/ VARIANT_BOOL * aBool,
-// /*[out]*/ unsigned short* aChar,
-// /*[out]*/ BSTR* aString, /*[out]*/ float* aFloat,
-// /*[out]*/ double* aDouble,
-// /*[out]*/ signed char* aByte, /*[out]*/ short* aShort, /*[out]*/long* aLong, /*[out]*/ unsigned short* aUShort, /*[out]*/ unsigned long* aULong);
+// STDMETHOD(outValuesAll)(
+// /*[out]*/ IDispatch** ppdisp,
+// /*[out]*/ IUnknown** ppSimpleStruct,
+// /*[out]*/ long* aSimpleEnum,
+// /*[out]*/ VARIANT* ArrayAny,
+// /*[out]*/ VARIANT* varAny,
+// /*[out]*/ VARIANT_BOOL * aBool,
+// /*[out]*/ unsigned short* aChar,
+// /*[out]*/ BSTR* aString, /*[out]*/ float* aFloat,
+// /*[out]*/ double* aDouble,
+// /*[out]*/ signed char* aByte, /*[out]*/ short* aShort, /*[out]*/long* aLong, /*[out]*/ unsigned short* aUShort, /*[out]*/ unsigned long* aULong);
STDMETHOD(outValuesMixed)(/*[in]*/ long val, /*[out]*/ long* pval, /*[in]*/ BSTR string);
STDMETHOD(outInterface)(/*[out]*/ IDispatch** ppdisp);
STDMETHOD(returnInterface)(/*[out, retval]*/ IDispatch** ppdisp);
@@ -133,6 +133,6 @@ public:
};
#endif //__CALLBACK_H_
-
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.cpp b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.cpp
index e3a738960ee5..34a5075db803 100644
--- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.cpp
+++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.cpp
@@ -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
@@ -60,9 +60,9 @@ STDMETHODIMP CSimple::func3(BSTR message)
STDMETHODIMP CSimple::get__implementedInterfaces(LPSAFEARRAY *pVal)
{
HRESULT hr= S_OK;
- SAFEARRAY *pArr= SafeArrayCreateVector( VT_BSTR, 0, 3);
+ SAFEARRAY *pArr= SafeArrayCreateVector( VT_BSTR, 0, 3);
if( pArr)
- { long index=0;
+ { long index=0;
BSTR name1= SysAllocString(L"oletest.XSimple");
BSTR name2= SysAllocString(L"oletest.XSimple2");
BSTR name3= SysAllocString(L"oletest.XSimple3");
diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.h b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.h
index c911cb325240..e76795925573 100644
--- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.h
+++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/Simple.h
@@ -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
@@ -34,7 +34,7 @@
/////////////////////////////////////////////////////////////////////////////
// CSimple
-class ATL_NO_VTABLE CSimple :
+class ATL_NO_VTABLE CSimple :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CSimple, &CLSID_Simple>,
public IDispatchImpl<ISimple, &IID_ISimple, &LIBID_XCALLBACK_IMPLLib>
@@ -55,8 +55,8 @@ END_COM_MAP()
// ISimple
public:
-
- STDMETHOD(get__implementedInterfaces)(/*[out, retval]*/ LPSAFEARRAY *pVal);
+
+ STDMETHOD(get__implementedInterfaces)(/*[out, retval]*/ LPSAFEARRAY *pVal);
STDMETHOD(func3)(/*[in]*/ BSTR message);
STDMETHOD(func2)(/*[in]*/ BSTR message);
STDMETHOD(func)( BSTR message);
diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.cpp b/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.cpp
index 38d4c2357e81..902524bdf104 100644
--- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.cpp
+++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.cpp
@@ -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/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.h b/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.h
index 0bb223891626..f692fae959e7 100644
--- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.h
+++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.h
@@ -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/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.cpp b/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.cpp
index eb5095730702..78585a01bc83 100644
--- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.cpp
+++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.cpp
@@ -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
@@ -29,7 +29,7 @@
// Note: Proxy/Stub Information
-// To build a separate proxy/stub DLL,
+// To build a separate proxy/stub DLL,
// run nmake -f XCallback_Implps.mk in the project directory.
#include "stdafx.h"
diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.idl b/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.idl
index 2bb44a4b70be..5532432130c8 100644
--- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.idl
+++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/XCallback_Impl.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
@@ -45,18 +45,18 @@ import "ocidl.idl";
[id(2), helpstring("method returnInterface")] HRESULT returnInterface([out, retval] IDispatch** ppdisp);
[id(3), helpstring("method outInterface")] HRESULT outInterface([out] IDispatch** ppdisp);
[id(4), helpstring("method outValuesMixed")] HRESULT outValuesMixed([in] long val, [out] long* pval, [in] BSTR string);
- [id(5), helpstring("method outValuesAll")] HRESULT outValuesAll([out] IDispatch** ppdisp, [out] IDispatch** ppSimpleStruct, [out] long* aSimpleEnum,
- [out] SAFEARRAY( VARIANT)* outSeq,
- [out] VARIANT* varAny,
+ [id(5), helpstring("method outValuesAll")] HRESULT outValuesAll([out] IDispatch** ppdisp, [out] IDispatch** ppSimpleStruct, [out] long* aSimpleEnum,
+ [out] SAFEARRAY( VARIANT)* outSeq,
+ [out] VARIANT* varAny,
[out] VARIANT_BOOL * aBool,
[out] short* aChar,
[out] BSTR* aString ,
- [out] float* aFloat,
- [out] double* aDouble,
+ [out] float* aFloat,
+ [out] double* aDouble,
[out] unsigned char* aByte,
- [out] short* aShort,
+ [out] short* aShort,
[out]long* aLong);
-// );
+// );
[id(6), helpstring("method outStruct")] HRESULT outStruct([out] IDispatch** outStruct);
[id(7), helpstring("method outEnum")] HRESULT outEnum([out] long* outEnum);
[id(8), helpstring("method outSeqAny")] HRESULT outSeqAny([out] SAFEARRAY( VARIANT)* outSeq);
diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/resource.h b/extensions/test/ole/unoTocomCalls/XCallback_Impl/resource.h
index afdbe7bcd552..d041b3790555 100644
--- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/resource.h
+++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/resource.h
@@ -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
@@ -35,7 +35,7 @@
#define IDR_SIMPLESTRUCT 103
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 201
diff --git a/extensions/test/pgp/TestPGP.java b/extensions/test/pgp/TestPGP.java
index 15bf2b1fcef1..41f21f3b767a 100644
--- a/extensions/test/pgp/TestPGP.java
+++ b/extensions/test/pgp/TestPGP.java
@@ -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
@@ -67,7 +67,7 @@ import com.sun.star.pgp.*;
public class TestPGP {
-
+
static void doSomething(Object r) throws com.sun.star.uno.Exception, IOException, Exception {
XNamingService rName = (XNamingService)UnoRuntime.queryInterface(XNamingService.class, r);
@@ -75,7 +75,7 @@ public class TestPGP {
if(rName != null) {
System.err.println("got the remote naming service !");
Object rXsmgr = rName.getRegisteredObject("StarOffice.ServiceManager");
-
+
XMultiServiceFactory rSmgr = (XMultiServiceFactory)UnoRuntime.queryInterface(XMultiServiceFactory.class, rXsmgr);
if(rSmgr != null) {
System.err.println("got the remote service manager !");
@@ -86,7 +86,7 @@ public class TestPGP {
System.err.println(" couldn't get XSet from ServiceFactory");
return;
}
-// try{
+// try{
SimplePGPMailerFactoryReg mailerReg= new SimplePGPMailerFactoryReg();
XSingleServiceFactory factory= mailerReg.getServiceFactory(
"com.sun.star.pgp.SimplePGPMailerImpl", rSmgr, null, null);
@@ -98,10 +98,10 @@ public class TestPGP {
set.insert(factory );
System.err.println("PGP factory inserted into service manager");
-// }catch(Exception e ){
-// System.err.println( "exception caught in TestPGP");
-// }
-
+// }catch(Exception e ){
+// System.err.println( "exception caught in TestPGP");
+// }
+
}
}
@@ -115,32 +115,32 @@ public class TestPGP {
};
public static void main(String argv[]) throws Exception {
- if(argv.length != 1) {
+ if(argv.length != 1) {
System.err.println("usage : testoffice protocol:host:port");
System.exit(-1);
}
-// try {
+// try {
com.sun.star.comp.servicemanager.ServiceManager smgr = new com.sun.star.comp.servicemanager.ServiceManager();
smgr.addFactories(neededServices, null);
XConnector xConnector = (XConnector)smgr.createInstance("com.sun.star.connection.Connector");
XConnection xConnection = xConnector.connect(argv[0]);
-
+
String rootOid = "classic_uno";
IBridge iBridge = UnoRuntime.getBridgeByName("java", null, "remote", null, new Object[]{"iiop", xConnection, null});
Object rInitialObject = iBridge.mapInterfaceFrom(rootOid, XInterface.class);
-// Object rInitialObject = xBridge.getInstance("NamingService");
-
+// Object rInitialObject = xBridge.getInstance("NamingService");
+
if(rInitialObject != null) {
System.err.println("got the remote object");
doSomething(rInitialObject);
}
-// }
-// catch (Exception exception) {
-// System.err.println("Exception thrown:" + exception);
-// }
+// }
+// catch (Exception exception) {
+// System.err.println("Exception thrown:" + exception);
+// }
}
}
diff --git a/extensions/test/sax/factory.hxx b/extensions/test/sax/factory.hxx
index 267e7b6649ee..a2d22acdade5 100644
--- a/extensions/test/sax/factory.hxx
+++ b/extensions/test/sax/factory.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
@@ -27,7 +27,7 @@
************************************************************************/
XInterfaceRef OSaxWriterTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
UString OSaxWriterTest_getServiceName( ) THROWS( () );
-UString OSaxWriterTest_getImplementationName( ) THROWS( () );
+UString OSaxWriterTest_getImplementationName( ) THROWS( () );
Sequence<UString> OSaxWriterTest_getSupportedServiceNames( ) THROWS( () );
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/test/sax/testsax.cxx b/extensions/test/sax/testsax.cxx
index 0fc3691a47dc..74a947dd34dc 100644
--- a/extensions/test/sax/testsax.cxx
+++ b/extensions/test/sax/testsax.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
@@ -127,25 +127,25 @@ public:
}
public: // refcounting
- BOOL queryInterface( Uik aUik, XInterfaceRef & rOut );
- void acquire() { OWeakObject::acquire(); }
- void release() { OWeakObject::release(); }
- void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }
+ BOOL queryInterface( Uik aUik, XInterfaceRef & rOut );
+ void acquire() { OWeakObject::acquire(); }
+ void release() { OWeakObject::release(); }
+ void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }
public:
virtual void testInvariant(const UString& TestName, const XInterfaceRef& TestObject)
- THROWS( ( IllegalArgumentException,
+ THROWS( ( IllegalArgumentException,
UsrSystemException) );
- virtual INT32 test( const UString& TestName,
+ virtual INT32 test( const UString& TestName,
const XInterfaceRef& TestObject,
- INT32 hTestHandle) THROWS( ( IllegalArgumentException,
+ INT32 hTestHandle) THROWS( ( IllegalArgumentException,
UsrSystemException) );
- virtual BOOL testPassed(void) THROWS( ( UsrSystemException) );
- virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) );
- virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) );
- virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) );
+ virtual BOOL testPassed(void) THROWS( ( UsrSystemException) );
+ virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) );
+ virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) );
+ virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) );
private:
void testSimple( const XParserRef &r );
@@ -155,9 +155,9 @@ private:
void testPerformance( const XParserRef &rParser );
private:
- Sequence<UsrAny> m_seqExceptions;
- Sequence<UString> m_seqErrors;
- Sequence<UString> m_seqWarnings;
+ Sequence<UsrAny> m_seqExceptions;
+ Sequence<UString> m_seqErrors;
+ Sequence<UString> m_seqWarnings;
XMultiServiceFactoryRef m_rFactory;
};
@@ -181,7 +181,7 @@ UString OSaxParserTest_getServiceName( ) THROWS( () )
return L"test.com.sun.star.xml.sax.Parser";
}
-UString OSaxParserTest_getImplementationName( ) THROWS( () )
+UString OSaxParserTest_getImplementationName( ) THROWS( () )
{
return L"test.extensions.xml.sax.Parser";
}
@@ -209,7 +209,7 @@ BOOL OSaxParserTest::queryInterface( Uik uik , XInterfaceRef &rOut )
void OSaxParserTest::testInvariant( const UString& TestName, const XInterfaceRef& TestObject )
- THROWS( ( IllegalArgumentException,
+ THROWS( ( IllegalArgumentException,
UsrSystemException) )
{
if( L"com.sun.star.xml.sax.Parser" == TestName ) {
@@ -220,9 +220,9 @@ void OSaxParserTest::testInvariant( const UString& TestName, const XInterfaceRef
}
-INT32 OSaxParserTest::test( const UString& TestName,
+INT32 OSaxParserTest::test( const UString& TestName,
const XInterfaceRef& TestObject,
- INT32 hTestHandle) THROWS( ( IllegalArgumentException,
+ INT32 hTestHandle) THROWS( ( IllegalArgumentException,
UsrSystemException) )
{
if( L"com.sun.star.xml.sax.Parser" == TestName ) {
@@ -273,25 +273,25 @@ INT32 OSaxParserTest::test( const UString& TestName,
-BOOL OSaxParserTest::testPassed(void) THROWS( (UsrSystemException) )
+BOOL OSaxParserTest::testPassed(void) THROWS( (UsrSystemException) )
{
return m_seqErrors.getLen() == 0;
}
-Sequence< UString > OSaxParserTest::getErrors(void) THROWS( (UsrSystemException) )
+Sequence< UString > OSaxParserTest::getErrors(void) THROWS( (UsrSystemException) )
{
return m_seqErrors;
}
-Sequence< UsrAny > OSaxParserTest::getErrorExceptions(void) THROWS( (UsrSystemException) )
+Sequence< UsrAny > OSaxParserTest::getErrorExceptions(void) THROWS( (UsrSystemException) )
{
return m_seqExceptions;
}
-Sequence< UString > OSaxParserTest::getWarnings(void) THROWS( (UsrSystemException) )
+Sequence< UString > OSaxParserTest::getWarnings(void) THROWS( (UsrSystemException) )
{
return m_seqWarnings;
}
@@ -360,10 +360,10 @@ public:
public:
- BOOL queryInterface( Uik aUik, XInterfaceRef & rOut );
- void acquire() { OWeakObject::acquire(); }
- void release() { OWeakObject::release(); }
- void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }
+ BOOL queryInterface( Uik aUik, XInterfaceRef & rOut );
+ void acquire() { OWeakObject::acquire(); }
+ void release() { OWeakObject::release(); }
+ void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }
public: // Error handler
@@ -420,7 +420,7 @@ public: // ExtendedDocumentHandler
printf( "<%s> " , USTRING_TO_PCHAR( aName ) );
for( i = 0 ; i < xAttribs->getLength() ; i ++ ) {
- printf( "(%s,%s,'%s')" , USTRING_TO_PCHAR( xAttribs->getNameByIndex( i ) ) ,
+ printf( "(%s,%s,'%s')" , USTRING_TO_PCHAR( xAttribs->getNameByIndex( i ) ) ,
USTRING_TO_PCHAR( xAttribs->getTypeByIndex( i ) ) ,
USTRING_TO_PCHAR( xAttribs->getValueByIndex( i ) ) );
}
@@ -547,7 +547,7 @@ BOOL TestDocumentHandler::queryInterface( Uik aUik , XInterfaceRef & rOut )
-void OSaxParserTest::testSimple( const XParserRef &rParser )
+void OSaxParserTest::testSimple( const XParserRef &rParser )
{
char TestString[] =
@@ -585,21 +585,21 @@ void OSaxParserTest::testSimple( const XParserRef &rParser )
InputSource source;
source.aInputStream = rInStream;
- source.sSystemId = sInput;
+ source.sSystemId = sInput;
TestDocumentHandler *pDocHandler = new TestDocumentHandler( m_rFactory , FALSE );
XDocumentHandlerRef rDocHandler( (XDocumentHandler *) pDocHandler , USR_QUERY );
- XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY );
+ XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY );
rParser->setDocumentHandler( rDocHandler );
rParser->setEntityResolver( rEntityResolver );
try {
rParser->parseStream( source );
- ERROR_ASSERT( pDocHandler->m_iElementCount == 4 , "wrong element count" );
- ERROR_ASSERT( pDocHandler->m_iAttributeCount == 2 , "wrong attribut count" );
- ERROR_ASSERT( pDocHandler->m_iCharCount == 130 , "wrong char count" );
- ERROR_ASSERT( pDocHandler->m_iWhitespaceCount == 0, "wrong whitespace count" );
+ ERROR_ASSERT( pDocHandler->m_iElementCount == 4 , "wrong element count" );
+ ERROR_ASSERT( pDocHandler->m_iAttributeCount == 2 , "wrong attribut count" );
+ ERROR_ASSERT( pDocHandler->m_iCharCount == 130 , "wrong char count" );
+ ERROR_ASSERT( pDocHandler->m_iWhitespaceCount == 0, "wrong whitespace count" );
}
catch( SAXParseException& e ) {
BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) );
@@ -646,28 +646,28 @@ void OSaxParserTest::testNamespaces( const XParserRef &rParser )
InputSource source;
source.aInputStream = rInStream;
- source.sSystemId = sInput;
+ source.sSystemId = sInput;
TestDocumentHandler *pDocHandler = new TestDocumentHandler( m_rFactory , FALSE );
XDocumentHandlerRef rDocHandler( (XDocumentHandler *) pDocHandler , USR_QUERY );
- XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY );
+ XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY );
rParser->setDocumentHandler( rDocHandler );
rParser->setEntityResolver( rEntityResolver );
try {
rParser->parseStream( source );
- ERROR_ASSERT( pDocHandler->m_iElementCount == 6 , "wrong element count" );
- ERROR_ASSERT( pDocHandler->m_iAttributeCount == 2 , "wrong attribut count" );
- ERROR_ASSERT( pDocHandler->m_iCharCount == 33, "wrong char count" );
- ERROR_ASSERT( pDocHandler->m_iWhitespaceCount == 0 , "wrong whitespace count" );
+ ERROR_ASSERT( pDocHandler->m_iElementCount == 6 , "wrong element count" );
+ ERROR_ASSERT( pDocHandler->m_iAttributeCount == 2 , "wrong attribut count" );
+ ERROR_ASSERT( pDocHandler->m_iCharCount == 33, "wrong char count" );
+ ERROR_ASSERT( pDocHandler->m_iWhitespaceCount == 0 , "wrong whitespace count" );
}
catch( SAXParseException& e ) {
BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) );
}
catch( SAXException& e ) {
BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) );
-
+
}
catch( Exception& e ) {
BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) );
@@ -675,12 +675,12 @@ void OSaxParserTest::testNamespaces( const XParserRef &rParser )
catch(...) {
BUILD_ERROR( 1 , "unknown exception" );
}
- }
+ }
}
void OSaxParserTest::testEncoding( const XParserRef &rParser )
{
- char TestString[] =
+ char TestString[] =
"<?xml version='1.0' encoding=\"iso-8859-1\"?>\n"
"<!-- all elements here are explicitly in the HTML namespace -->\n"
"<html:html xmlns:html='http://www.w3.org/TR/REC-html40'>\n"
@@ -692,23 +692,23 @@ void OSaxParserTest::testEncoding( const XParserRef &rParser )
Sequence<BYTE> seqBytes( strlen( TestString ) );
memcpy( seqBytes.getArray() , TestString , strlen( TestString ) );
-
+
XInputStreamRef rInStream;
UString sInput;
rInStream = createStreamFromSequence( seqBytes , m_rFactory );
sInput = UString( L"internal" );
-
+
if( rParser.is() ) {
InputSource source;
source.aInputStream = rInStream;
- source.sSystemId = sInput;
-
+ source.sSystemId = sInput;
+
TestDocumentHandler *pDocHandler = new TestDocumentHandler( m_rFactory , FALSE );
XDocumentHandlerRef rDocHandler( (XDocumentHandler *) pDocHandler , USR_QUERY );
- XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY );
-
+ XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY );
+
rParser->setDocumentHandler( rDocHandler );
rParser->setEntityResolver( rEntityResolver );
try {
@@ -719,7 +719,7 @@ void OSaxParserTest::testEncoding( const XParserRef &rParser )
}
catch( SAXException& e ) {
BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) );
-
+
}
catch( Exception& e ) {
BUILD_ERROR( 1 , USTRING_TO_PCHAR( e.Message ) );
@@ -732,24 +732,24 @@ void OSaxParserTest::testEncoding( const XParserRef &rParser )
}
-void OSaxParserTest::testFile( const XParserRef & rParser )
+void OSaxParserTest::testFile( const XParserRef & rParser )
{
-
+
XInputStreamRef rInStream = createStreamFromFile( "testsax.xml" , m_rFactory );
UString sInput = UString( PCHAR_TO_USTRING( "testsax.xml" ) );
-
+
if( rParser.is() && rInStream.is() ) {
InputSource source;
source.aInputStream = rInStream;
- source.sSystemId = sInput;
-
+ source.sSystemId = sInput;
+
TestDocumentHandler *pDocHandler = new TestDocumentHandler( m_rFactory , TRUE );
XDocumentHandlerRef rDocHandler( (XDocumentHandler *) pDocHandler , USR_QUERY );
- XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY );
- XErrorHandlerRef rErrorHandler( ( XErrorHandler * )pDocHandler , USR_QUERY );
-
+ XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY );
+ XErrorHandlerRef rErrorHandler( ( XErrorHandler * )pDocHandler , USR_QUERY );
+
rParser->setDocumentHandler( rDocHandler );
rParser->setEntityResolver( rEntityResolver );
rParser->setErrorHandler( rErrorHandler );
@@ -764,30 +764,30 @@ void OSaxParserTest::testFile( const XParserRef & rParser )
SAXParseException *pEx;
if( any.getReflection() == SAXParseException_getReflection() ) {
pEx = ( SAXParseException * ) any.get();
- printf( "%s\n" , UStringToString( pEx->Message , CHARSET_SYSTEM ).GetStr() );
+ printf( "%s\n" , UStringToString( pEx->Message , CHARSET_SYSTEM ).GetStr() );
any = pEx->WrappedException;
}
else {
- break;
+ break;
}
}
}
catch( SAXException& e ) {
- printf( "%s\n" , UStringToString( e.Message , CHARSET_SYSTEM ).GetStr() );
-
+ printf( "%s\n" , UStringToString( e.Message , CHARSET_SYSTEM ).GetStr() );
+
}
catch( Exception& e ) {
printf( "normal exception ! %s\n", e.getName() );
}
catch(...) {
- printf( "any exception !!!!\n" );
+ printf( "any exception !!!!\n" );
}
- }
+ }
}
-void OSaxParserTest::testPerformance( const XParserRef & rParser )
+void OSaxParserTest::testPerformance( const XParserRef & rParser )
{
-
+
XInputStreamRef rInStream = createStreamFromFile( "testPerformance.xml" , m_rFactory );
UString sInput = UString( PCHAR_TO_USTRING( "testperformance.xml" ) );
@@ -795,13 +795,13 @@ void OSaxParserTest::testPerformance( const XParserRef & rParser )
InputSource source;
source.aInputStream = rInStream;
- source.sSystemId = sInput;
-
+ source.sSystemId = sInput;
+
TestDocumentHandler *pDocHandler = new TestDocumentHandler( m_rFactory , FALSE );
XDocumentHandlerRef rDocHandler( (XDocumentHandler *) pDocHandler , USR_QUERY );
- XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY );
- XErrorHandlerRef rErrorHandler( ( XErrorHandler * )pDocHandler , USR_QUERY );
-
+ XEntityResolverRef rEntityResolver( (XEntityResolver *) pDocHandler , USR_QUERY );
+ XErrorHandlerRef rErrorHandler( ( XErrorHandler * )pDocHandler , USR_QUERY );
+
rParser->setDocumentHandler( rDocHandler );
rParser->setEntityResolver( rEntityResolver );
rParser->setErrorHandler( rErrorHandler );
@@ -811,12 +811,12 @@ void OSaxParserTest::testPerformance( const XParserRef & rParser )
osl_getSystemTime( &aStartTime );
rParser->parseStream( source );
osl_getSystemTime( &aEndTime );
-
+
double fStart = (double)aStartTime.Seconds + ((double)aStartTime.Nanosec / 1000000000.0);
double fEnd = (double)aEndTime.Seconds + ((double)aEndTime.Nanosec / 1000000000.0);
-
+
printf( "Performance reading : %g s\n" , fEnd - fStart );
-
+
}
catch( SAXParseException& e ) {
UsrAny any;
@@ -825,25 +825,25 @@ void OSaxParserTest::testPerformance( const XParserRef & rParser )
SAXParseException *pEx;
if( any.getReflection() == SAXParseException_getReflection() ) {
pEx = ( SAXParseException * ) any.get();
- printf( "%s\n" , UStringToString( pEx->Message , CHARSET_SYSTEM ).GetStr() );
+ printf( "%s\n" , UStringToString( pEx->Message , CHARSET_SYSTEM ).GetStr() );
any = pEx->WrappedException;
}
else {
- break;
+ break;
}
}
}
catch( SAXException& e ) {
- printf( "%s\n" , UStringToString( e.Message , CHARSET_SYSTEM ).GetStr() );
-
+ printf( "%s\n" , UStringToString( e.Message , CHARSET_SYSTEM ).GetStr() );
+
}
catch( Exception& e ) {
printf( "normal exception ! %s\n", e.getName() );
}
catch(...) {
- printf( "any exception !!!!\n" );
+ printf( "any exception !!!!\n" );
}
- }
+ }
}
@@ -854,7 +854,7 @@ BOOL EXTERN_SERVICE_CALLTYPE exService_writeRegEntry(
const UNO_INTERFACE(XRegistryKey)* xUnoKey)
{
- XRegistryKeyRef xKey;
+ XRegistryKeyRef xKey;
uno2smart(xKey, *xUnoKey);
UString str = UString( L"/" ) + OSaxParserTest_getImplementationName() + UString( L"/UNO/SERVICES" );
@@ -873,15 +873,15 @@ UNO_INTERFACE(XInterface) EXTERN_SERVICE_CALLTYPE exService_getFactory
(
const wchar_t* implementationName,
const UNO_INTERFACE(XMultiServiceFactory)* xUnoFact,
- const UNO_INTERFACE(XRegistryKey)*
+ const UNO_INTERFACE(XRegistryKey)*
)
{
UNO_INTERFACE(XInterface) xUnoRet = {0, 0};
- XInterfaceRef xRet;
+ XInterfaceRef xRet;
XMultiServiceFactoryRef xSMgr;
- UString aImplementationName(implementationName);
-
+ UString aImplementationName(implementationName);
+
uno2smart(xSMgr, *xUnoFact);
if (aImplementationName == OSaxWriterTest_getImplementationName() )
@@ -899,8 +899,8 @@ UNO_INTERFACE(XInterface) EXTERN_SERVICE_CALLTYPE exService_getFactory
if (xRet.is())
{
smart2uno(xRet, xUnoRet);
- }
-
+ }
+
return xUnoRet;
}
diff --git a/extensions/test/sax/testwriter.cxx b/extensions/test/sax/testwriter.cxx
index 692dcb1647ad..f4930dfec5fa 100644
--- a/extensions/test/sax/testwriter.cxx
+++ b/extensions/test/sax/testwriter.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
@@ -123,7 +123,7 @@ public:
public: // refcounting
- BOOL queryInterface( Uik aUik, XInterfaceRef & rOut )
+ BOOL queryInterface( Uik aUik, XInterfaceRef & rOut )
{
if( XOutputStream::getSmartUik() == aUik ) {
rOut = (XOutputStream *) this;
@@ -132,9 +132,9 @@ public: // refcounting
return TRUE;
}
- void acquire() { OWeakObject::acquire(); }
- void release() { OWeakObject::release(); }
- void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }
+ void acquire() { OWeakObject::acquire(); }
+ void release() { OWeakObject::release(); }
+ void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }
public:
virtual void writeBytes(const Sequence< BYTE >& aData)
@@ -189,25 +189,25 @@ public:
~OSaxWriterTest() {}
public: // refcounting
- BOOL queryInterface( Uik aUik, XInterfaceRef & rOut );
- void acquire() { OWeakObject::acquire(); }
- void release() { OWeakObject::release(); }
- void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }
+ BOOL queryInterface( Uik aUik, XInterfaceRef & rOut );
+ void acquire() { OWeakObject::acquire(); }
+ void release() { OWeakObject::release(); }
+ void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }
public:
virtual void testInvariant(const UString& TestName, const XInterfaceRef& TestObject)
- THROWS( ( IllegalArgumentException,
+ THROWS( ( IllegalArgumentException,
UsrSystemException) );
- virtual INT32 test( const UString& TestName,
+ virtual INT32 test( const UString& TestName,
const XInterfaceRef& TestObject,
- INT32 hTestHandle) THROWS( ( IllegalArgumentException,
+ INT32 hTestHandle) THROWS( ( IllegalArgumentException,
UsrSystemException) );
- virtual BOOL testPassed(void) THROWS( ( UsrSystemException) );
- virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) );
- virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) );
- virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) );
+ virtual BOOL testPassed(void) THROWS( ( UsrSystemException) );
+ virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) );
+ virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) );
+ virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) );
private:
void testSimple( const XExtendedDocumentHandlerRef &r );
@@ -217,9 +217,9 @@ private:
void writeParagraph( const XExtendedDocumentHandlerRef &r , const UString & s);
private:
- Sequence<UsrAny> m_seqExceptions;
- Sequence<UString> m_seqErrors;
- Sequence<UString> m_seqWarnings;
+ Sequence<UsrAny> m_seqExceptions;
+ Sequence<UString> m_seqErrors;
+ Sequence<UString> m_seqWarnings;
XMultiServiceFactoryRef m_rFactory;
};
@@ -228,7 +228,7 @@ private:
/*----------------------------------------
*
-* Attributlist implementation
+* Attributlist implementation
*
*----------------------------------------*/
struct AttributeListImpl_impl;
@@ -242,10 +242,10 @@ public:
~AttributeListImpl();
public:
- BOOL queryInterface( Uik aUik, XInterfaceRef & rOut );
- void acquire() { OWeakObject::acquire(); }
- void release() { OWeakObject::release(); }
- void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }
+ BOOL queryInterface( Uik aUik, XInterfaceRef & rOut );
+ void acquire() { OWeakObject::acquire(); }
+ void release() { OWeakObject::release(); }
+ void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }
public:
virtual INT16 getLength(void) THROWS( (UsrSystemException) );
@@ -269,9 +269,9 @@ struct TagAttribute
TagAttribute(){}
TagAttribute( const UString &sName, const UString &sType , const UString &sValue )
{
- this->sName = sName;
- this->sType = sType;
- this->sValue = sValue;
+ this->sName = sName;
+ this->sType = sType;
+ this->sValue = sValue;
}
UString sName;
@@ -379,7 +379,7 @@ AttributeListImpl::~AttributeListImpl()
}
-void AttributeListImpl::addAttribute( const UString &sName ,
+void AttributeListImpl::addAttribute( const UString &sName ,
const UString &sType ,
const UString &sValue )
{
@@ -421,7 +421,7 @@ UString OSaxWriterTest_getServiceName( ) THROWS( () )
return L"test.com.sun.star.xml.sax.Writer";
}
-UString OSaxWriterTest_getImplementationName( ) THROWS( () )
+UString OSaxWriterTest_getImplementationName( ) THROWS( () )
{
return L"test.extensions.xml.sax.Writer";
}
@@ -449,7 +449,7 @@ BOOL OSaxWriterTest::queryInterface( Uik uik , XInterfaceRef &rOut )
void OSaxWriterTest::testInvariant( const UString& TestName, const XInterfaceRef& TestObject )
- THROWS( ( IllegalArgumentException,
+ THROWS( ( IllegalArgumentException,
UsrSystemException) )
{
if( L"com.sun.star.xml.sax.Writer" == TestName ) {
@@ -467,9 +467,9 @@ void OSaxWriterTest::testInvariant( const UString& TestName, const XInterfaceRef
}
-INT32 OSaxWriterTest::test( const UString& TestName,
+INT32 OSaxWriterTest::test( const UString& TestName,
const XInterfaceRef& TestObject,
- INT32 hTestHandle) THROWS( ( IllegalArgumentException,
+ INT32 hTestHandle) THROWS( ( IllegalArgumentException,
UsrSystemException) )
{
if( L"com.sun.star.xml.sax.Writer" == TestName ) {
@@ -517,25 +517,25 @@ INT32 OSaxWriterTest::test( const UString& TestName,
-BOOL OSaxWriterTest::testPassed(void) THROWS( (UsrSystemException) )
+BOOL OSaxWriterTest::testPassed(void) THROWS( (UsrSystemException) )
{
return m_seqErrors.getLen() == 0;
}
-Sequence< UString > OSaxWriterTest::getErrors(void) THROWS( (UsrSystemException) )
+Sequence< UString > OSaxWriterTest::getErrors(void) THROWS( (UsrSystemException) )
{
return m_seqErrors;
}
-Sequence< UsrAny > OSaxWriterTest::getErrorExceptions(void) THROWS( (UsrSystemException) )
+Sequence< UsrAny > OSaxWriterTest::getErrorExceptions(void) THROWS( (UsrSystemException) )
{
return m_seqExceptions;
}
-Sequence< UString > OSaxWriterTest::getWarnings(void) THROWS( (UsrSystemException) )
+Sequence< UString > OSaxWriterTest::getWarnings(void) THROWS( (UsrSystemException) )
{
return m_seqWarnings;
}
@@ -584,7 +584,7 @@ void OSaxWriterTest::testSimple( const XExtendedDocumentHandlerRef &r )
r->startDocument();
- pList->addAttribute( L"Arg1" , L"CDATA" , L"bla\n u" );
+ pList->addAttribute( L"Arg1" , L"CDATA" , L"bla\n u" );
pList->addAttribute( L"Arg2" , L"CDATA" , L"blub" );
r->startElement( L"tag1" , rList );
@@ -664,13 +664,13 @@ void OSaxWriterTest::testExceptions( const XExtendedDocumentHandlerRef & r )
}
r->startDocument();
-
+
r->startElement( L"huhu" , rList );
r->startCDATA();
{
BOOL bException = TRUE;
- try {
+ try {
r->startElement( L"huhu" , rList );
bException = FALSE;
}
@@ -679,7 +679,7 @@ void OSaxWriterTest::testExceptions( const XExtendedDocumentHandlerRef & r )
}
ERROR_ASSERT( bException , "expected exception not thrown !" );
}
-
+
r->endCDATA();
r->endElement( L"hi" );
@@ -691,22 +691,22 @@ void OSaxWriterTest::testDTD(const XExtendedDocumentHandlerRef &r )
{
OFileWriter *pw = new OFileWriter("outputDTD.xml");
AttributeListImpl *pList = new AttributeListImpl;
-
+
XAttributeListRef rList( (XAttributeList *) pList , USR_QUERY );
XOutputStreamRef ref( ( XOutputStream * ) pw , USR_QUERY );
-
+
XActiveDataSourceRef source( r , USR_QUERY );
-
+
ERROR_ASSERT( ref.is() , "no output stream" );
ERROR_ASSERT( source.is() , "no active data source" );
-
+
source->setOutputStream( ref );
-
+
r->startDocument();
r->unknown( L"<!DOCTYPE iCalendar >\n" );
r->startElement( L"huhu" , rList );
-
+
r->endElement( L"huhu" );
r->endDocument();
}
@@ -720,15 +720,15 @@ void OSaxWriterTest::testPerformance(const XExtendedDocumentHandlerRef &r )
L"wohl > Zeilenumbrueche halbwegs richtig macht oder ob er die Zeile "
L"bis zum bitteren Ende schreibt.";
-
+
XAttributeListRef rList( (XAttributeList *) pList , USR_QUERY );
XOutputStreamRef ref( ( XOutputStream * ) pw , USR_QUERY );
-
+
XActiveDataSourceRef source( r , USR_QUERY );
-
+
ERROR_ASSERT( ref.is() , "no output stream" );
ERROR_ASSERT( source.is() , "no active data source" );
-
+
source->setOutputStream( ref );
TimeValue aStartTime, aEndTime;
@@ -747,8 +747,8 @@ void OSaxWriterTest::testPerformance(const XExtendedDocumentHandlerRef &r )
r->ignorableWhitespace( L"");
r->startElement( L"huhu" , rList );
r->characters( testParagraph );
-// writeParagraph( r , testParagraph );
-
+// writeParagraph( r , testParagraph );
+
r->ignorableWhitespace( L"");
r->endElement( L"huhu" );
}
@@ -758,7 +758,7 @@ void OSaxWriterTest::testPerformance(const XExtendedDocumentHandlerRef &r )
r->ignorableWhitespace( L"");
r->endElement( UString( L"tag" ) + UString::valueOf( i2 ) );
}
-
+
r->endDocument();
osl_getSystemTime( &aEndTime );
diff --git a/extensions/test/stm/datatest.cxx b/extensions/test/stm/datatest.cxx
index 6886f99f8b31..7fb7bde49b00 100644
--- a/extensions/test/stm/datatest.cxx
+++ b/extensions/test/stm/datatest.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,25 +77,25 @@ public:
ODataStreamTest( const XMultiServiceFactoryRef & rFactory ) : m_rFactory( rFactory ){}
public: // refcounting
- BOOL queryInterface( Uik aUik, XInterfaceRef & rOut );
- void acquire() { OWeakObject::acquire(); }
- void release() { OWeakObject::release(); }
- void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }
+ BOOL queryInterface( Uik aUik, XInterfaceRef & rOut );
+ void acquire() { OWeakObject::acquire(); }
+ void release() { OWeakObject::release(); }
+ void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }
public:
virtual void testInvariant(const UString& TestName, const XInterfaceRef& TestObject)
- THROWS( ( IllegalArgumentException,
+ THROWS( ( IllegalArgumentException,
UsrSystemException) );
- virtual INT32 test( const UString& TestName,
+ virtual INT32 test( const UString& TestName,
const XInterfaceRef& TestObject,
- INT32 hTestHandle) THROWS( ( IllegalArgumentException,
+ INT32 hTestHandle) THROWS( ( IllegalArgumentException,
UsrSystemException) );
- virtual BOOL testPassed(void) THROWS( ( UsrSystemException) );
- virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) );
- virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) );
- virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) );
+ virtual BOOL testPassed(void) THROWS( ( UsrSystemException) );
+ virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) );
+ virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) );
+ virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) );
private:
void testSimple( const XDataInputStreamRef & , const XDataOutputStreamRef &);
@@ -122,7 +122,7 @@ BOOL ODataStreamTest::queryInterface( Uik uik , XInterfaceRef &rOut )
void ODataStreamTest::testInvariant( const UString& TestName, const XInterfaceRef& TestObject )
- THROWS( ( IllegalArgumentException,
+ THROWS( ( IllegalArgumentException,
UsrSystemException) )
{
if( L"com.sun.star.io.DataInputStream" == TestName ) {
@@ -144,10 +144,10 @@ void ODataStreamTest::testInvariant( const UString& TestName, const XInterfaceRe
XOutputStreamRef output( TestObject , USR_QUERY );
XDataOutputStreamRef dataOutput( TestObject , USR_QUERY );
- WARNING_ASSERT( connect.is(), "XConnectable cannot be queried" );
- WARNING_ASSERT( active.is() , "XActiveDataSink cannot be queried" );
- ERROR_ASSERT( output.is() , "XInputStream cannot be queried" );
- ERROR_ASSERT( dataOutput.is(), "XDataInputStream cannot be queried" );
+ WARNING_ASSERT( connect.is(), "XConnectable cannot be queried" );
+ WARNING_ASSERT( active.is() , "XActiveDataSink cannot be queried" );
+ ERROR_ASSERT( output.is() , "XInputStream cannot be queried" );
+ ERROR_ASSERT( dataOutput.is(), "XDataInputStream cannot be queried" );
}
@@ -162,14 +162,14 @@ void ODataStreamTest::testInvariant( const UString& TestName, const XInterfaceRe
}
-INT32 ODataStreamTest::test( const UString& TestName,
+INT32 ODataStreamTest::test( const UString& TestName,
const XInterfaceRef& TestObject,
- INT32 hTestHandle) THROWS( ( IllegalArgumentException,
+ INT32 hTestHandle) THROWS( ( IllegalArgumentException,
UsrSystemException) )
{
- if( L"com.sun.star.io.DataInputStream" == TestName ||
+ if( L"com.sun.star.io.DataInputStream" == TestName ||
L"com.sun.star.io.DataOutputStream" == TestName ) {
-
+
try {
if( 0 == hTestHandle ) {
testInvariant( TestName , TestObject );
@@ -181,13 +181,13 @@ INT32 ODataStreamTest::test( const UString& TestName,
XDataInputStreamRef rInput( TestObject , USR_QUERY );
XDataOutputStreamRef rOutput( TestObject , USR_QUERY );
-
+
XInterfaceRef x = m_rFactory->createInstance( L"com.sun.star.io.Pipe");
XInputStreamRef rPipeInput( x , USR_QUERY );
XOutputStreamRef rPipeOutput( x , USR_QUERY );
-
- if( ! rSink.is() ) {
+
+ if( ! rSink.is() ) {
x = m_rFactory->createInstance( L"com.sun.star.io.DataInputStream" );
x->queryInterface( XDataInputStream::getSmartUik() , rInput );
x->queryInterface( XActiveDataSink::getSmartUik() , rSink );
@@ -209,7 +209,7 @@ INT32 ODataStreamTest::test( const UString& TestName,
if( 1 == hTestHandle ) {
testSimple( rInput , rOutput );
- }
+ }
}
}
catch( Exception& e ) {
@@ -218,9 +218,9 @@ INT32 ODataStreamTest::test( const UString& TestName,
catch(...) {
BUILD_ERROR( 0 , "unknown exception (Exception is not base class)" );
}
-
+
hTestHandle ++;
-
+
if( hTestHandle >= 2) {
// all tests finished.
hTestHandle = -1;
@@ -230,34 +230,34 @@ INT32 ODataStreamTest::test( const UString& TestName,
BUILD_ERROR( 0 , "service not supported by test." );
}
return hTestHandle;
-}
+}
-BOOL ODataStreamTest::testPassed(void) THROWS( (UsrSystemException) )
+BOOL ODataStreamTest::testPassed(void) THROWS( (UsrSystemException) )
{
- return m_seqErrors.getLen() == 0;
+ return m_seqErrors.getLen() == 0;
}
-Sequence< UString > ODataStreamTest::getErrors(void) THROWS( (UsrSystemException) )
+Sequence< UString > ODataStreamTest::getErrors(void) THROWS( (UsrSystemException) )
{
return m_seqErrors;
}
-Sequence< UsrAny > ODataStreamTest::getErrorExceptions(void) THROWS( (UsrSystemException) )
+Sequence< UsrAny > ODataStreamTest::getErrorExceptions(void) THROWS( (UsrSystemException) )
{
return m_seqExceptions;
}
-Sequence< UString > ODataStreamTest::getWarnings(void) THROWS( (UsrSystemException) )
+Sequence< UString > ODataStreamTest::getWarnings(void) THROWS( (UsrSystemException) )
{
return m_seqWarnings;
}
-void ODataStreamTest::testSimple( const XDataInputStreamRef &rInput,
+void ODataStreamTest::testSimple( const XDataInputStreamRef &rInput,
const XDataOutputStreamRef &rOutput )
{
rOutput->writeLong( 0x34ff3c );
@@ -265,89 +265,89 @@ void ODataStreamTest::testSimple( const XDataInputStreamRef &rInput,
ERROR_ASSERT( 0x34ff3c == rInput->readLong() , "long read/write mismatch" );
ERROR_ASSERT( 0x34ff3d == rInput->readLong() , "long read/write mismatch" );
-
+
rOutput->writeByte( 0x87 );
ERROR_ASSERT( 0x87 == rInput->readByte() , "byte read/write mismatch" );
-
+
rOutput->writeBoolean( 25 );
ERROR_ASSERT( rInput->readBoolean() , "boolean read/write mismatch" );
-
+
rOutput->writeBoolean( FALSE );
ERROR_ASSERT( ! rInput->readBoolean() , "boolean read/write mismatch" );
-
+
rOutput->writeFloat( (float) 42.42 );
ERROR_ASSERT( rInput->readFloat() == ((float)42.42) , "float read/write mismatch" );
-
+
rOutput->writeDouble( (double) 42.42 );
ERROR_ASSERT( rInput->readDouble() == 42.42 , "double read/write mismatch" );
-
+
rOutput->writeUTF( L"Live long and prosper !" );
ERROR_ASSERT( rInput->readUTF() == L"Live long and prosper !" ,
"UTF read/write mismatch" );
-
+
Sequence<wchar_t> wc(0x10001);
for( int i = 0 ; i < 0x10000 ; i ++ ) {
- wc.getArray()[i] = L'c';
+ wc.getArray()[i] = L'c';
}
wc.getArray()[0x10000] = 0;
UString str( wc.getArray() , 0x10000 );
rOutput->writeUTF( str );
ERROR_ASSERT( rInput->readUTF() == str , "error reading 64k block" );
-
+
rOutput->closeOutput();
try {
rInput->readLong();
- ERROR_ASSERT( 0 , "eof-exception does not occur !" );
+ ERROR_ASSERT( 0 , "eof-exception does not occur !" );
}
catch ( IOException& e ){
- //ok
+ //ok
e.getName();
}
- catch(...) {
+ catch(...) {
ERROR_ASSERT( 0 , "wrong exception after reading beyond eof" );
}
-
- ERROR_ASSERT( ! rInput->readBytes( Sequence<BYTE> (1) , 1 ),
+
+ ERROR_ASSERT( ! rInput->readBytes( Sequence<BYTE> (1) , 1 ),
"stream must be on eof !" );
-
+
rInput->closeInput();
-
+
try {
rOutput->writeByte( 1 );
ERROR_ASSERT( 0 , "writing still possible though chain must be interrupted" );
}
- catch( IOException& e )
+ catch( IOException& e )
{
e.getName();
- // ok
+ // ok
}
catch( ... ) {
- ERROR_ASSERT( 0 , "IOException expected, but another exception was thrown" );
+ ERROR_ASSERT( 0 , "IOException expected, but another exception was thrown" );
}
-
+
}
-/**
+/**
* for external binding
*
*
**/
XInterfaceRef ODataStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception))
-{
+{
ODataStreamTest *p = new ODataStreamTest( rSMgr );
- XInterfaceRef xService = *p;
+ XInterfaceRef xService = *p;
return xService;
}
Sequence<UString> ODataStreamTest_getSupportedServiceNames( int i) THROWS( () )
{
Sequence<UString> aRet(1);
-
+
aRet.getArray()[0] = ODataStreamTest_getImplementationName( i);
-
-
+
+
return aRet;
}
@@ -355,19 +355,19 @@ UString ODataStreamTest_getServiceName( int i) THROWS( () )
{
if( 1 == i ) {
return L"test.com.sun.star.io.DataInputStream";
- }
+ }
else {
- return L"test.com.sun.star.io.DataOutputStream";
+ return L"test.com.sun.star.io.DataOutputStream";
}
}
-UString ODataStreamTest_getImplementationName( int i) THROWS( () )
+UString ODataStreamTest_getImplementationName( int i) THROWS( () )
{
if( 1 == i ) {
return L"test.com.sun.star.comp.extensions.stm.DataInputStream";
}
else {
- return L"test.com.sun.star.comp.extensions.stm.DataOutputStream";
+ return L"test.com.sun.star.comp.extensions.stm.DataOutputStream";
}
}
@@ -379,7 +379,7 @@ UString ODataStreamTest_getImplementationName( int i) THROWS( () )
*
*
*------------------------------------------------------*/
-class MyPersistObject :
+class MyPersistObject :
public XPersistObject,
public XPropertySet,
public OWeakObject
@@ -391,12 +391,12 @@ public:
{}
~MyPersistObject()
{}
-
+
public:
- BOOL queryInterface( Uik aUik, XInterfaceRef & rOut );
- void acquire() { OWeakObject::acquire(); }
- void release() { OWeakObject::release(); }
- void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }
+ BOOL queryInterface( Uik aUik, XInterfaceRef & rOut );
+ void acquire() { OWeakObject::acquire(); }
+ void release() { OWeakObject::release(); }
+ void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }
public:
virtual UString getServiceName(void) const THROWS( (UsrSystemException) );
@@ -405,72 +405,72 @@ public:
public:
- virtual XPropertySetInfoRef getPropertySetInfo(void) const THROWS( (UsrSystemException) );
- virtual void setPropertyValue(const UString& aPropertyName, const UsrAny& aValue)
- THROWS( ( UnknownPropertyException,
- PropertyVetoException,
+ virtual XPropertySetInfoRef getPropertySetInfo(void) const THROWS( (UsrSystemException) );
+ virtual void setPropertyValue(const UString& aPropertyName, const UsrAny& aValue)
+ THROWS( ( UnknownPropertyException,
+ PropertyVetoException,
IllegalArgumentException,
- WrappedTargetException,
+ WrappedTargetException,
UsrSystemException) );
- virtual UsrAny getPropertyValue(const UString& PropertyName) const
- THROWS( ( UnknownPropertyException,
- WrappedTargetException,
+ virtual UsrAny getPropertyValue(const UString& PropertyName) const
+ THROWS( ( UnknownPropertyException,
+ WrappedTargetException,
UsrSystemException) );
- virtual void addPropertyChangeListener( const UString& aPropertyName,
- const XPropertyChangeListenerRef& xListener)
- THROWS( ( UnknownPropertyException,
- WrappedTargetException,
+ virtual void addPropertyChangeListener( const UString& aPropertyName,
+ const XPropertyChangeListenerRef& xListener)
+ THROWS( ( UnknownPropertyException,
+ WrappedTargetException,
UsrSystemException) );
- virtual void removePropertyChangeListener( const UString& aPropertyName,
- const XPropertyChangeListenerRef& aListener)
- THROWS( ( UnknownPropertyException,
- WrappedTargetException,
+ virtual void removePropertyChangeListener( const UString& aPropertyName,
+ const XPropertyChangeListenerRef& aListener)
+ THROWS( ( UnknownPropertyException,
+ WrappedTargetException,
UsrSystemException) );
- virtual void addVetoableChangeListener( const UString& PropertyName,
- const XVetoableChangeListenerRef& aListener)
- THROWS( ( UnknownPropertyException,
- WrappedTargetException,
+ virtual void addVetoableChangeListener( const UString& PropertyName,
+ const XVetoableChangeListenerRef& aListener)
+ THROWS( ( UnknownPropertyException,
+ WrappedTargetException,
UsrSystemException) );
- virtual void removeVetoableChangeListener( const UString& PropertyName,
- const XVetoableChangeListenerRef& aListener)
- THROWS( ( UnknownPropertyException,
- WrappedTargetException,
+ virtual void removeVetoableChangeListener( const UString& PropertyName,
+ const XVetoableChangeListenerRef& aListener)
+ THROWS( ( UnknownPropertyException,
+ WrappedTargetException,
UsrSystemException) );
public:
- INT32 m_l;
- float m_f;
- double m_d;
- BOOL m_b;
- BYTE m_byte;
- wchar_t m_c;
- UString m_s;
- XPersistObjectRef m_ref;
+ INT32 m_l;
+ float m_f;
+ double m_d;
+ BOOL m_b;
+ BYTE m_byte;
+ wchar_t m_c;
+ UString m_s;
+ XPersistObjectRef m_ref;
UString m_sServiceName;
};
-XPropertySetInfoRef MyPersistObject::getPropertySetInfo(void) const THROWS( (UsrSystemException) )
+XPropertySetInfoRef MyPersistObject::getPropertySetInfo(void) const THROWS( (UsrSystemException) )
{
- return XPropertySetInfoRef();
+ return XPropertySetInfoRef();
}
-void MyPersistObject::setPropertyValue(const UString& aPropertyName, const UsrAny& aValue)
- THROWS( ( UnknownPropertyException,
- PropertyVetoException,
+void MyPersistObject::setPropertyValue(const UString& aPropertyName, const UsrAny& aValue)
+ THROWS( ( UnknownPropertyException,
+ PropertyVetoException,
IllegalArgumentException,
- WrappedTargetException,
+ WrappedTargetException,
UsrSystemException) )
{
if( L"long" == aPropertyName ) {
- m_l = aValue.getINT32();
+ m_l = aValue.getINT32();
}
else if ( L"float" == aPropertyName ) {
- m_f = aValue.getFloat();
+ m_f = aValue.getFloat();
}
else if( L"double" == aPropertyName ) {
- m_d = aValue.getDouble();
+ m_d = aValue.getDouble();
}
else if( L"bool" == aPropertyName ) {
m_b = aValue.getBOOL();
@@ -479,14 +479,14 @@ void MyPersistObject::setPropertyValue(const UString& aPropertyName, const UsrAn
m_byte = aValue.getBYTE();
}
else if( L"char" == aPropertyName ) {
- m_c = aValue.getChar();
+ m_c = aValue.getChar();
}
else if( L"string" == aPropertyName ) {
- m_s = aValue.getString();
+ m_s = aValue.getString();
}
else if( L"object" == aPropertyName ) {
if( aValue.getReflection() == XPersistObject_getReflection() ) {
- XPersistObjectRef *pRef = (XPersistObjectRef*) aValue.get();
+ XPersistObjectRef *pRef = (XPersistObjectRef*) aValue.get();
if( pRef ) {
m_ref = *pRef;
}
@@ -502,20 +502,20 @@ void MyPersistObject::setPropertyValue(const UString& aPropertyName, const UsrAn
}
-UsrAny MyPersistObject::getPropertyValue(const UString& aPropertyName) const
- THROWS( ( UnknownPropertyException,
- WrappedTargetException,
+UsrAny MyPersistObject::getPropertyValue(const UString& aPropertyName) const
+ THROWS( ( UnknownPropertyException,
+ WrappedTargetException,
UsrSystemException) )
{
UsrAny aValue;
if( L"long" == aPropertyName ) {
- aValue.setINT32( m_l );
+ aValue.setINT32( m_l );
}
else if ( L"float" == aPropertyName ) {
- aValue.setFloat( m_f );
+ aValue.setFloat( m_f );
}
else if( L"double" == aPropertyName ) {
- aValue.setDouble( m_d );
+ aValue.setDouble( m_d );
}
else if( L"bool" == aPropertyName ) {
aValue.setBOOL( m_b );
@@ -524,10 +524,10 @@ UsrAny MyPersistObject::getPropertyValue(const UString& aPropertyName) const
aValue.setBYTE( m_byte );
}
else if( L"char" == aPropertyName ) {
- aValue.setChar( m_c );
+ aValue.setChar( m_c );
}
else if( L"string" == aPropertyName ) {
- aValue.setString( m_s );
+ aValue.setString( m_s );
}
else if( L"object" == aPropertyName ) {
aValue.set( &m_ref , XPersistObject_getReflection() );
@@ -536,53 +536,53 @@ UsrAny MyPersistObject::getPropertyValue(const UString& aPropertyName) const
}
-void MyPersistObject::addPropertyChangeListener( const UString& aPropertyName,
- const XPropertyChangeListenerRef& xListener)
- THROWS( ( UnknownPropertyException,
- WrappedTargetException,
+void MyPersistObject::addPropertyChangeListener( const UString& aPropertyName,
+ const XPropertyChangeListenerRef& xListener)
+ THROWS( ( UnknownPropertyException,
+ WrappedTargetException,
UsrSystemException) )
{
-
+
}
-void MyPersistObject::removePropertyChangeListener( const UString& aPropertyName,
- const XPropertyChangeListenerRef& aListener)
- THROWS( ( UnknownPropertyException,
- WrappedTargetException,
+void MyPersistObject::removePropertyChangeListener( const UString& aPropertyName,
+ const XPropertyChangeListenerRef& aListener)
+ THROWS( ( UnknownPropertyException,
+ WrappedTargetException,
UsrSystemException) )
{
}
-void MyPersistObject::addVetoableChangeListener(const UString& PropertyName,
- const XVetoableChangeListenerRef& aListener)
- THROWS( ( UnknownPropertyException,
- WrappedTargetException,
+void MyPersistObject::addVetoableChangeListener(const UString& PropertyName,
+ const XVetoableChangeListenerRef& aListener)
+ THROWS( ( UnknownPropertyException,
+ WrappedTargetException,
UsrSystemException) )
{
-
+
}
-void MyPersistObject::removeVetoableChangeListener( const UString& PropertyName,
- const XVetoableChangeListenerRef& aListener)
- THROWS( ( UnknownPropertyException,
- WrappedTargetException,
+void MyPersistObject::removeVetoableChangeListener( const UString& PropertyName,
+ const XVetoableChangeListenerRef& aListener)
+ THROWS( ( UnknownPropertyException,
+ WrappedTargetException,
UsrSystemException) )
{
-
+
}
-
+
BOOL MyPersistObject::queryInterface( Uik aUik , XInterfaceRef &rOut )
{
if( XPersistObject::getSmartUik() == aUik ) {
- rOut = ( XPersistObject * ) this;
+ rOut = ( XPersistObject * ) this;
}
else if( XPropertySet::getSmartUik() == aUik ) {
- rOut = ( XPropertySet * ) this;
+ rOut = ( XPropertySet * ) this;
}
else
return OWeakObject::queryInterface( aUik , rOut );
-
+
return TRUE;
}
@@ -591,7 +591,7 @@ UString MyPersistObject::getServiceName() const THROWS( (UsrSystemException) )
return m_sServiceName;
}
-void MyPersistObject::write( const XObjectOutputStreamRef & rOut )
+void MyPersistObject::write( const XObjectOutputStreamRef & rOut )
THROWS( (IOException,UsrSystemException))
{
rOut->writeLong( m_l);
@@ -605,7 +605,7 @@ void MyPersistObject::write( const XObjectOutputStreamRef & rOut )
}
-void MyPersistObject::read( const XObjectInputStreamRef & rIn )
+void MyPersistObject::read( const XObjectInputStreamRef & rIn )
THROWS( (IOException, UsrSystemException) )
{
m_l = rIn->readLong();
@@ -618,11 +618,11 @@ void MyPersistObject::read( const XObjectInputStreamRef & rIn )
m_ref = rIn->readObject();
}
-XInterfaceRef OMyPersistObject_CreateInstance( const XMultiServiceFactoryRef & rSMgr )
+XInterfaceRef OMyPersistObject_CreateInstance( const XMultiServiceFactoryRef & rSMgr )
THROWS((Exception))
-{
+{
MyPersistObject *p = new MyPersistObject( );
- XInterfaceRef xService = *p;
+ XInterfaceRef xService = *p;
return xService;
}
@@ -638,7 +638,7 @@ UString OMyPersistObject_getServiceName( ) THROWS( () )
return L"test.com.sun.star.io.PersistTest";
}
-UString OMyPersistObject_getImplementationName( ) THROWS( () )
+UString OMyPersistObject_getImplementationName( ) THROWS( () )
{
return L"test.com.sun.star.io.PersistTest";
}
@@ -651,22 +651,22 @@ class OObjectStreamTest :
{
public:
OObjectStreamTest( const XMultiServiceFactoryRef &r) : ODataStreamTest(r) {}
-public: // refcounting
- BOOL queryInterface( Uik aUik, XInterfaceRef & rOut );
+public: // refcounting
+ BOOL queryInterface( Uik aUik, XInterfaceRef & rOut );
-public:
- virtual void testInvariant(const UString& TestName, const XInterfaceRef& TestObject)
- THROWS( ( IllegalArgumentException,
+public:
+ virtual void testInvariant(const UString& TestName, const XInterfaceRef& TestObject)
+ THROWS( ( IllegalArgumentException,
UsrSystemException) );
- virtual INT32 test( const UString& TestName,
- const XInterfaceRef& TestObject,
- INT32 hTestHandle) THROWS( ( IllegalArgumentException,
+ virtual INT32 test( const UString& TestName,
+ const XInterfaceRef& TestObject,
+ INT32 hTestHandle) THROWS( ( IllegalArgumentException,
UsrSystemException) );
private:
- void OObjectStreamTest::testObject( const XObjectOutputStreamRef &rOut,
+ void OObjectStreamTest::testObject( const XObjectOutputStreamRef &rOut,
const XObjectInputStreamRef &rIn );
private:
@@ -679,23 +679,23 @@ BOOL OObjectStreamTest::queryInterface( Uik uik , XInterfaceRef &rOut )
{
if( XSimpleTest::getSmartUik() == uik ) {
rOut = (XSimpleTest *) this;
- }
+ }
else {
return ODataStreamTest::queryInterface( uik , rOut );
- }
+ }
return TRUE;
}
-void OObjectStreamTest::testInvariant( const UString& TestName, const XInterfaceRef& TestObject )
- THROWS( ( IllegalArgumentException,
+void OObjectStreamTest::testInvariant( const UString& TestName, const XInterfaceRef& TestObject )
+ THROWS( ( IllegalArgumentException,
UsrSystemException) )
{
-
+
if( L"com.sun.star.io.ObjectInputStream" == TestName ) {
ODataStreamTest::testInvariant( TestName , TestObject );
- XObjectInputStreamRef dataInput( TestObject , USR_QUERY );
+ XObjectInputStreamRef dataInput( TestObject , USR_QUERY );
XMarkableStreamRef markable( TestObject , USR_QUERY );
ERROR_ASSERT( dataInput.is() , "XObjectInputStream cannot be queried" );
ERROR_ASSERT( markable.is() , "XMarkableStream cannot be queried" );
@@ -704,7 +704,7 @@ void OObjectStreamTest::testInvariant( const UString& TestName, const XInterface
ODataStreamTest::testInvariant( TestName , TestObject );
XMarkableStreamRef markable( TestObject , USR_QUERY );
XObjectOutputStreamRef dataOutput( TestObject , USR_QUERY );
- ERROR_ASSERT( dataOutput.is(), "XObjectOutputStream cannot be queried" );
+ ERROR_ASSERT( dataOutput.is(), "XObjectOutputStream cannot be queried" );
ERROR_ASSERT( markable.is() , "XMarkableStream cannot be queried" );
}
@@ -718,57 +718,57 @@ void OObjectStreamTest::testInvariant( const UString& TestName, const XInterface
}
-INT32 OObjectStreamTest::test( const UString& TestName,
- const XInterfaceRef& TestObject,
- INT32 hTestHandle) THROWS( ( IllegalArgumentException,
+INT32 OObjectStreamTest::test( const UString& TestName,
+ const XInterfaceRef& TestObject,
+ INT32 hTestHandle) THROWS( ( IllegalArgumentException,
UsrSystemException) )
{
- if( L"com.sun.star.io.ObjectInputStream" == TestName ||
+ if( L"com.sun.star.io.ObjectInputStream" == TestName ||
L"com.sun.star.io.ObjectOutputStream" == TestName ) {
-
+
try {
if( 0 == hTestHandle ) {
testInvariant( TestName , TestObject );
}
else if( DATASTREAM_TEST_MAX_HANDLE >= hTestHandle ) {
INT32 hOldHandle = hTestHandle;
- hTestHandle = ODataStreamTest::test( L"com.sun.star.io.DataInputStream" ,
+ hTestHandle = ODataStreamTest::test( L"com.sun.star.io.DataInputStream" ,
TestObject , hTestHandle );
if( hTestHandle == -1 ){
hTestHandle = hOldHandle;
}
}
else {
-
+
XActiveDataSinkRef rSink( TestObject, USR_QUERY );
XActiveDataSourceRef rSource( TestObject , USR_QUERY );
XObjectInputStreamRef rInput( TestObject , USR_QUERY );
XObjectOutputStreamRef rOutput( TestObject , USR_QUERY );
-
+
XInterfaceRef x = m_rFactory->createInstance( L"com.sun.star.io.Pipe");
XInputStreamRef rPipeInput( x , USR_QUERY );
XOutputStreamRef rPipeOutput( x , USR_QUERY );
-
+
x = m_rFactory->createInstance( L"com.sun.star.io.MarkableInputStream" );
- XInputStreamRef markableInput( x , USR_QUERY );
+ XInputStreamRef markableInput( x , USR_QUERY );
XActiveDataSinkRef markableSink( x , USR_QUERY );
-
+
x = m_rFactory->createInstance( L"com.sun.star.io.MarkableOutputStream" );
- XOutputStreamRef markableOutput( x , USR_QUERY );
- XActiveDataSourceRef markableSource( x , USR_QUERY );
-
- OSL_ASSERT( markableInput.is() );
+ XOutputStreamRef markableOutput( x , USR_QUERY );
+ XActiveDataSourceRef markableSource( x , USR_QUERY );
+
+ OSL_ASSERT( markableInput.is() );
OSL_ASSERT( markableOutput.is() );
- OSL_ASSERT( markableSink.is() );
+ OSL_ASSERT( markableSink.is() );
OSL_ASSERT( markableSource.is() );
markableSink->setInputStream( rPipeInput );
markableSource->setOutputStream( rPipeOutput );
- if( ! rSink.is() ) {
+ if( ! rSink.is() ) {
x = m_rFactory->createInstance( L"com.sun.star.io.ObjectInputStream" );
x->queryInterface( XObjectInputStream::getSmartUik() , rInput );
x->queryInterface( XActiveDataSink::getSmartUik() , rSink );
@@ -781,7 +781,7 @@ INT32 OObjectStreamTest::test( const UString& TestName,
OSL_ASSERT( rPipeInput.is() );
OSL_ASSERT( rPipeOutput.is() );
-
+
rSink->setInputStream( markableInput );
rSource->setOutputStream( markableOutput );
@@ -793,7 +793,7 @@ INT32 OObjectStreamTest::test( const UString& TestName,
}
rInput->closeInput();
rOutput->closeOutput();
-
+
}
}
catch( Exception& e ) {
@@ -802,9 +802,9 @@ INT32 OObjectStreamTest::test( const UString& TestName,
catch(...) {
BUILD_ERROR( 0 , "unknown exception (Exception is not base class)" );
}
-
+
hTestHandle ++;
-
+
if( hTestHandle > 1 +DATASTREAM_TEST_MAX_HANDLE ) {
// all tests finished.
hTestHandle = -1;
@@ -814,7 +814,7 @@ INT32 OObjectStreamTest::test( const UString& TestName,
BUILD_ERROR( 0 , "service not supported by test." );
}
return hTestHandle;
-}
+}
BOOL compareMyPropertySet( XPropertySetRef &r1 , XPropertySetRef &r2 )
@@ -823,35 +823,35 @@ BOOL compareMyPropertySet( XPropertySetRef &r1 , XPropertySetRef &r2 )
if( r1->getPropertyValue( L"long" ).getReflection() == Void_getReflection() ||
r2->getPropertyValue( L"long" ).getReflection() == Void_getReflection() ) {
-
+
// one of the objects is not the correct propertyset !
return FALSE;
}
-
- b = b && ( r1->getPropertyValue( L"long" ).getINT32() ==
+
+ b = b && ( r1->getPropertyValue( L"long" ).getINT32() ==
r2->getPropertyValue( L"long" ).getINT32() );
- b = b && ( r1->getPropertyValue( L"float" ).getFloat() ==
+ b = b && ( r1->getPropertyValue( L"float" ).getFloat() ==
r2->getPropertyValue( L"float" ).getFloat() );
-
- b = b && ( r1->getPropertyValue( L"double" ).getDouble() ==
+
+ b = b && ( r1->getPropertyValue( L"double" ).getDouble() ==
r2->getPropertyValue( L"double" ).getDouble() );
- b = b && ( r1->getPropertyValue( L"bool" ).getBOOL() ==
+ b = b && ( r1->getPropertyValue( L"bool" ).getBOOL() ==
r2->getPropertyValue( L"bool" ).getBOOL() );
-
- b = b && ( r1->getPropertyValue( L"byte" ).getBYTE() ==
+
+ b = b && ( r1->getPropertyValue( L"byte" ).getBYTE() ==
r2->getPropertyValue( L"byte" ).getBYTE() );
-
- b = b && ( r1->getPropertyValue( L"char" ).getChar() ==
+
+ b = b && ( r1->getPropertyValue( L"char" ).getChar() ==
r2->getPropertyValue( L"char" ).getChar() );
- b = b && ( r1->getPropertyValue( L"string" ).getString() ==
+ b = b && ( r1->getPropertyValue( L"string" ).getString() ==
r2->getPropertyValue( L"string" ).getString() );
UsrAny o1 = r1->getPropertyValue( L"object" );
UsrAny o2 = r2->getPropertyValue( L"object" );
-
+
if( o1.getReflection() == XPersistObject_getReflection() ) {
if( o2.getReflection() == XPersistObject_getReflection() ) {
@@ -859,34 +859,34 @@ BOOL compareMyPropertySet( XPropertySetRef &r1 , XPropertySetRef &r2 )
XPersistObjectRef rPersist2 = *((XPersistObjectRef*) o2.get());
XPropertySetRef rProp1( rPersist1 , USR_QUERY );
XPropertySetRef rProp2( rPersist2 , USR_QUERY );
-
- if( rProp1.is() && rProp2.is() && ! ( rProp1 == rProp2 )
+
+ if( rProp1.is() && rProp2.is() && ! ( rProp1 == rProp2 )
&&( rProp1 != r1 )) {
compareMyPropertySet( rProp1 , rProp2 );
- }
+ }
}
else {
- b = FALSE;
+ b = FALSE;
}
}
else {
if( o2.getReflection() == XPersistObject_getReflection() ) {
- b = FALSE;
+ b = FALSE;
}
}
return b;
}
-void OObjectStreamTest::testObject( const XObjectOutputStreamRef &rOut,
+void OObjectStreamTest::testObject( const XObjectOutputStreamRef &rOut,
const XObjectInputStreamRef &rIn )
{
ERROR_ASSERT( rOut.is() , "no objectOutputStream" );
ERROR_ASSERT( rIn.is() , "no objectInputStream" );
-
+
XMultiServiceFactoryRef xProv = getProcessServiceManager();
ERROR_ASSERT( xProv.is() , "no global service manager" );
-
+
// tests, if saving an object with an unknown service name allows
// reading the data behind the object !
@@ -920,40 +920,40 @@ void OObjectStreamTest::testObject( const XObjectOutputStreamRef &rOut,
XPersistObjectRef persistRef( x , USR_QUERY );
ERROR_ASSERT( persistRef.is() , "couldn't instantiate PersistTest object" );
-
+
XPropertySetRef rProp( persistRef , USR_QUERY );
ERROR_ASSERT( rProp.is() , "test object is no property set " );
-
+
UsrAny any;
any.setINT32( 0x83482 );
rProp->setPropertyValue( L"long" , any );
-
+
any.setFloat( 42.23 );
rProp->setPropertyValue( L"float" , any );
- any.setDouble( 233.321412 );
+ any.setDouble( 233.321412 );
rProp->setPropertyValue( L"double" , any );
-
+
any.setBOOL( TRUE );
rProp->setPropertyValue( L"bool" , any );
any.setBYTE( 130 );
rProp->setPropertyValue( L"byte" , any );
-
+
any.setChar( 'h' );
rProp->setPropertyValue( L"char" , any );
-
+
any.setString( L"hi du !" );
rProp->setPropertyValue( L"string" , any );
-
+
any.set( &persistRef, XPersistObject_getReflection() ); // try a self reference
rProp->setPropertyValue( L"object" , any );
-
- // do read and write
- rOut->writeObject( persistRef );
+
+ // do read and write
+ rOut->writeObject( persistRef );
ERROR_ASSERT( 0 != rIn->available() , "no data arrived at input" );
- XPersistObjectRef xReadPersistRef = rIn->readObject( );
-
+ XPersistObjectRef xReadPersistRef = rIn->readObject( );
+
XPropertySetRef rPropRead( xReadPersistRef , USR_QUERY );
ERROR_ASSERT( compareMyPropertySet( rProp , rPropRead ) , "objects has not been read properly !" );
@@ -965,68 +965,68 @@ void OObjectStreamTest::testObject( const XObjectOutputStreamRef &rOut,
{
XMarkableStreamRef markableOut( rOut , USR_QUERY );
ERROR_ASSERT( markableOut.is() , "markable stream cannot be queried" );
-
+
// do the same thing multiple times to check if
// buffering and marks work correctly
for( int i = 0 ; i < 2000 ; i ++ ) {
XInterfaceRef x = xProv->createInstance(L"test.com.sun.star.io.PersistTest");
XPersistObjectRef persistRef( x , USR_QUERY );
-
+
XPropertySetRef rProp( persistRef , USR_QUERY );
ERROR_ASSERT( rProp.is() , "test object is no property set " );
-
+
UsrAny any;
any.setINT32( 0x83482 );
rProp->setPropertyValue( L"long" , any );
-
+
any.setFloat( 42.23 );
rProp->setPropertyValue( L"float" , any );
-
- any.setDouble( 233.321412 );
+
+ any.setDouble( 233.321412 );
rProp->setPropertyValue( L"double" , any );
-
+
any.setBOOL( TRUE );
rProp->setPropertyValue( L"bool" , any );
-
+
any.setBYTE( 130 );
rProp->setPropertyValue( L"byte" , any );
-
+
any.setChar( 'h' );
rProp->setPropertyValue( L"char" , any );
-
+
any.setString( L"hi du !" );
rProp->setPropertyValue( L"string" , any );
-
-
+
+
x = xProv->createInstance(L"test.com.sun.star.io.PersistTest");
XPersistObjectRef persist2ndRef( x , USR_QUERY );
-
-
+
+
// Note : persist2ndRef contains coincident values, but also coincident values must be
- // saved properly !
+ // saved properly !
any.set( &persist2ndRef, XPersistObject_getReflection() ); // try a self reference
rProp->setPropertyValue( L"object" , any );
-
+
// simply test, if markable operations and object operations do not interfere
INT32 nMark = markableOut->createMark();
- // do read and write
- rOut->writeObject( persistRef );
-
+ // do read and write
+ rOut->writeObject( persistRef );
+
// further markable tests !
INT32 nOffset = markableOut->offsetToMark( nMark );
markableOut->jumpToMark( nMark );
markableOut->deleteMark( nMark );
markableOut->jumpToFurthest();
-
+
ERROR_ASSERT( 0 != rIn->available() , "no data arrived at input" );
- XPersistObjectRef xReadPersistRef = rIn->readObject( );
-
+ XPersistObjectRef xReadPersistRef = rIn->readObject( );
+
XPropertySetRef rProp1( persistRef , USR_QUERY );
XPropertySetRef rProp2( xReadPersistRef , USR_QUERY );
ERROR_ASSERT( compareMyPropertySet( rProp1, rProp2) , "objects has not been read properly !" );
@@ -1036,9 +1036,9 @@ void OObjectStreamTest::testObject( const XObjectOutputStreamRef &rOut,
XInterfaceRef OObjectStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception))
-{
+{
OObjectStreamTest *p = new OObjectStreamTest( rSMgr );
- XInterfaceRef xService = *p;
+ XInterfaceRef xService = *p;
return xService;
}
@@ -1053,19 +1053,19 @@ UString OObjectStreamTest_getServiceName( int i) THROWS( () )
{
if( 1 == i ) {
return L"test.com.sun.star.io.ObjectInputStream";
- }
+ }
else {
- return L"test.com.sun.star.io.ObjectOutputStream";
+ return L"test.com.sun.star.io.ObjectOutputStream";
}
}
-UString OObjectStreamTest_getImplementationName( int i) THROWS( () )
+UString OObjectStreamTest_getImplementationName( int i) THROWS( () )
{
if( 1 == i ) {
return L"test.com.sun.star.comp.extensions.stm.ObjectInputStream";
}
else {
- return L"test.com.sun.star.comp.extensions.stm.ObjectOutputStream";
+ return L"test.com.sun.star.comp.extensions.stm.ObjectOutputStream";
}
}
diff --git a/extensions/test/stm/marktest.cxx b/extensions/test/stm/marktest.cxx
index 3043d119c122..1c3c5a0f9d01 100644
--- a/extensions/test/stm/marktest.cxx
+++ b/extensions/test/stm/marktest.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
@@ -66,29 +66,29 @@ public:
~OMarkableOutputStreamTest();
public: // refcounting
- BOOL queryInterface( Uik aUik, XInterfaceRef & rOut );
- void acquire() { OWeakObject::acquire(); }
- void release() { OWeakObject::release(); }
- void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }
+ BOOL queryInterface( Uik aUik, XInterfaceRef & rOut );
+ void acquire() { OWeakObject::acquire(); }
+ void release() { OWeakObject::release(); }
+ void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }
public: // implementation names
- static Sequence< UString > getSupportedServiceNames_Static(void) THROWS( () );
- static UString getImplementationName_Static() THROWS( () );
+ static Sequence< UString > getSupportedServiceNames_Static(void) THROWS( () );
+ static UString getImplementationName_Static() THROWS( () );
public:
virtual void testInvariant(const UString& TestName, const XInterfaceRef& TestObject)
- THROWS( ( IllegalArgumentException,
+ THROWS( ( IllegalArgumentException,
UsrSystemException) );
- virtual INT32 test( const UString& TestName,
+ virtual INT32 test( const UString& TestName,
const XInterfaceRef& TestObject,
- INT32 hTestHandle) THROWS( ( IllegalArgumentException,
+ INT32 hTestHandle) THROWS( ( IllegalArgumentException,
UsrSystemException) );
- virtual BOOL testPassed(void) THROWS( ( UsrSystemException) );
- virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) );
- virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) );
- virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) );
+ virtual BOOL testPassed(void) THROWS( ( UsrSystemException) );
+ virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) );
+ virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) );
+ virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) );
private:
void testSimple( const XOutputStreamRef &r, const XInputStreamRef &rInput );
@@ -126,7 +126,7 @@ BOOL OMarkableOutputStreamTest::queryInterface( Uik uik , XInterfaceRef &rOut )
void OMarkableOutputStreamTest::testInvariant( const UString& TestName, const XInterfaceRef& TestObject )
- THROWS( ( IllegalArgumentException,
+ THROWS( ( IllegalArgumentException,
UsrSystemException) )
{
XServiceInfoRef info( TestObject, USR_QUERY );
@@ -139,9 +139,9 @@ void OMarkableOutputStreamTest::testInvariant( const UString& TestName, const XI
}
-INT32 OMarkableOutputStreamTest::test( const UString& TestName,
+INT32 OMarkableOutputStreamTest::test( const UString& TestName,
const XInterfaceRef& TestObject,
- INT32 hTestHandle) THROWS( ( IllegalArgumentException,
+ INT32 hTestHandle) THROWS( ( IllegalArgumentException,
UsrSystemException) )
{
if( L"com.sun.star.io.MarkableOutputStream" == TestName ) {
@@ -190,13 +190,13 @@ INT32 OMarkableOutputStreamTest::test( const UString& TestName,
-BOOL OMarkableOutputStreamTest::testPassed(void) THROWS( (UsrSystemException) )
+BOOL OMarkableOutputStreamTest::testPassed(void) THROWS( (UsrSystemException) )
{
return m_seqErrors.getLen() == 0;
}
-Sequence< UString > OMarkableOutputStreamTest::getErrors(void) THROWS( (UsrSystemException) )
+Sequence< UString > OMarkableOutputStreamTest::getErrors(void) THROWS( (UsrSystemException) )
{
return m_seqErrors;
}
@@ -208,13 +208,13 @@ Sequence< UsrAny > OMarkableOutputStreamTest::getErrorExceptions(void) THROWS( (
}
-Sequence< UString > OMarkableOutputStreamTest::getWarnings(void) THROWS( (UsrSystemException) )
+Sequence< UString > OMarkableOutputStreamTest::getWarnings(void) THROWS( (UsrSystemException) )
{
return m_seqWarnings;
}
-void OMarkableOutputStreamTest::testSimple( const XOutputStreamRef &rOutput ,
+void OMarkableOutputStreamTest::testSimple( const XOutputStreamRef &rOutput ,
const XInputStreamRef &rInput )
{
XMarkableStreamRef rMarkable( rOutput , USR_QUERY );
@@ -404,7 +404,7 @@ UString OMarkableOutputStreamTest_getServiceName() THROWS( () )
return L"test.com.sun.star.io.MarkableOutputStream";
}
-UString OMarkableOutputStreamTest_getImplementationName() THROWS( () )
+UString OMarkableOutputStreamTest_getImplementationName() THROWS( () )
{
return L"test.com.sun.starextensions.stm.MarkableOutputStream";
}
@@ -428,29 +428,29 @@ public:
~OMarkableInputStreamTest();
public: // refcounting
- BOOL queryInterface( Uik aUik, XInterfaceRef & rOut );
- void acquire() { OWeakObject::acquire(); }
- void release() { OWeakObject::release(); }
- void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }
+ BOOL queryInterface( Uik aUik, XInterfaceRef & rOut );
+ void acquire() { OWeakObject::acquire(); }
+ void release() { OWeakObject::release(); }
+ void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }
public: // implementation names
- static Sequence< UString > getSupportedServiceNames_Static(void) THROWS( () );
- static UString getImplementationName_Static() THROWS( () );
+ static Sequence< UString > getSupportedServiceNames_Static(void) THROWS( () );
+ static UString getImplementationName_Static() THROWS( () );
public:
virtual void testInvariant(const UString& TestName, const XInterfaceRef& TestObject)
- THROWS( ( IllegalArgumentException,
+ THROWS( ( IllegalArgumentException,
UsrSystemException) );
- virtual INT32 test( const UString& TestName,
+ virtual INT32 test( const UString& TestName,
const XInterfaceRef& TestObject,
- INT32 hTestHandle) THROWS( ( IllegalArgumentException,
+ INT32 hTestHandle) THROWS( ( IllegalArgumentException,
UsrSystemException) );
- virtual BOOL testPassed(void) THROWS( ( UsrSystemException) );
- virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) );
- virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) );
- virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) );
+ virtual BOOL testPassed(void) THROWS( ( UsrSystemException) );
+ virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) );
+ virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) );
+ virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) );
private:
void testSimple( const XOutputStreamRef &r, const XInputStreamRef &rInput );
@@ -488,7 +488,7 @@ BOOL OMarkableInputStreamTest::queryInterface( Uik uik , XInterfaceRef &rOut )
void OMarkableInputStreamTest::testInvariant( const UString& TestName, const XInterfaceRef& TestObject )
- THROWS( ( IllegalArgumentException,
+ THROWS( ( IllegalArgumentException,
UsrSystemException) )
{
if( L"com.sun.star.io.MarkableInputStream" == TestName ) {
@@ -506,9 +506,9 @@ void OMarkableInputStreamTest::testInvariant( const UString& TestName, const XIn
}
-INT32 OMarkableInputStreamTest::test( const UString& TestName,
+INT32 OMarkableInputStreamTest::test( const UString& TestName,
const XInterfaceRef& TestObject,
- INT32 hTestHandle) THROWS( ( IllegalArgumentException,
+ INT32 hTestHandle) THROWS( ( IllegalArgumentException,
UsrSystemException) )
{
if( L"com.sun.star.io.MarkableInputStream" == TestName ) {
@@ -557,31 +557,31 @@ INT32 OMarkableInputStreamTest::test( const UString& TestName,
-BOOL OMarkableInputStreamTest::testPassed(void) THROWS( (UsrSystemException) )
+BOOL OMarkableInputStreamTest::testPassed(void) THROWS( (UsrSystemException) )
{
return m_seqErrors.getLen() == 0;
}
-Sequence< UString > OMarkableInputStreamTest::getErrors(void) THROWS( (UsrSystemException) )
+Sequence< UString > OMarkableInputStreamTest::getErrors(void) THROWS( (UsrSystemException) )
{
return m_seqErrors;
}
-Sequence< UsrAny > OMarkableInputStreamTest::getErrorExceptions(void) THROWS( (UsrSystemException) )
+Sequence< UsrAny > OMarkableInputStreamTest::getErrorExceptions(void) THROWS( (UsrSystemException) )
{
return m_seqExceptions;
}
-Sequence< UString > OMarkableInputStreamTest::getWarnings(void) THROWS( (UsrSystemException) )
+Sequence< UString > OMarkableInputStreamTest::getWarnings(void) THROWS( (UsrSystemException) )
{
return m_seqWarnings;
}
-void OMarkableInputStreamTest::testSimple( const XOutputStreamRef &rOutput ,
+void OMarkableInputStreamTest::testSimple( const XOutputStreamRef &rOutput ,
const XInputStreamRef &rInput )
{
XMarkableStreamRef rMarkable( rInput , USR_QUERY );
@@ -635,7 +635,7 @@ void OMarkableInputStreamTest::testSimple( const XOutputStreamRef &rOutput
ERROR_ASSERT( 256-10-50 == rInput->available() , "marking error" );
- ERROR_ASSERT( 100 == rInput->readSomeBytes( seqRead , 100 ) , "wrong results using readSomeBytes" );
+ ERROR_ASSERT( 100 == rInput->readSomeBytes( seqRead , 100 ) , "wrong results using readSomeBytes" );
ERROR_ASSERT( 96 == rInput->readSomeBytes( seqRead , 1000) , "wrong results using readSomeBytes" );
rOutput->closeOutput();
rInput->closeInput();
@@ -668,7 +668,7 @@ Sequence<UString> OMarkableInputStreamTest_getSupportedServiceNames(void) THROWS
{
Sequence<UString> aRet(1);
aRet.getArray()[0] = OMarkableInputStreamTest_getImplementationName();
-
+
return aRet;
}
@@ -677,7 +677,7 @@ UString OMarkableInputStreamTest_getServiceName() THROWS( () )
return L"test.com.sun.star.io.MarkableInputStream";
}
-UString OMarkableInputStreamTest_getImplementationName() THROWS( () )
+UString OMarkableInputStreamTest_getImplementationName() THROWS( () )
{
return L"test.com.sun.star.extensions.stm.MarkableInputStream";
}
diff --git a/extensions/test/stm/pipetest.cxx b/extensions/test/stm/pipetest.cxx
index cf74aa2f33c0..d3de76bd9766 100644
--- a/extensions/test/stm/pipetest.cxx
+++ b/extensions/test/stm/pipetest.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
@@ -46,8 +46,8 @@
#include <string.h>
#include "testfactreg.hxx"
-#define IMPLEMENTATION_NAME L"test.com.sun.star.comp.extensions.stm.Pipe"
-#define SERVICE_NAME L"test.com.sun.star.io.Pipe"
+#define IMPLEMENTATION_NAME L"test.com.sun.star.comp.extensions.stm.Pipe"
+#define SERVICE_NAME L"test.com.sun.star.io.Pipe"
#ifndef _VOS_NO_NAMESPACE
using namespace usr;
@@ -104,29 +104,29 @@ public:
~OPipeTest();
public: // refcounting
- BOOL queryInterface( Uik aUik, XInterfaceRef & rOut );
- void acquire() { OWeakObject::acquire(); }
- void release() { OWeakObject::release(); }
- void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }
+ BOOL queryInterface( Uik aUik, XInterfaceRef & rOut );
+ void acquire() { OWeakObject::acquire(); }
+ void release() { OWeakObject::release(); }
+ void* getImplementation(Reflection *p) { return OWeakObject::getImplementation(p); }
public: // implementation names
- static Sequence< UString > getSupportedServiceNames_Static(void) THROWS( () );
- static UString getImplementationName_Static() THROWS( () );
+ static Sequence< UString > getSupportedServiceNames_Static(void) THROWS( () );
+ static UString getImplementationName_Static() THROWS( () );
public:
virtual void testInvariant(const UString& TestName, const XInterfaceRef& TestObject)
- THROWS( ( IllegalArgumentException,
+ THROWS( ( IllegalArgumentException,
UsrSystemException) );
- virtual INT32 test( const UString& TestName,
+ virtual INT32 test( const UString& TestName,
const XInterfaceRef& TestObject,
- INT32 hTestHandle) THROWS( ( IllegalArgumentException,
+ INT32 hTestHandle) THROWS( ( IllegalArgumentException,
UsrSystemException) );
- virtual BOOL testPassed(void) THROWS( ( UsrSystemException) );
- virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) );
- virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) );
- virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) );
+ virtual BOOL testPassed(void) THROWS( ( UsrSystemException) );
+ virtual Sequence< UString > getErrors(void) THROWS( (UsrSystemException) );
+ virtual Sequence< UsrAny > getErrorExceptions(void) THROWS( (UsrSystemException) );
+ virtual Sequence< UString > getWarnings(void) THROWS( (UsrSystemException) );
private:
void testSimple( const XInterfaceRef & );
@@ -166,7 +166,7 @@ BOOL OPipeTest::queryInterface( Uik uik , XInterfaceRef &rOut )
void OPipeTest::testInvariant( const UString& TestName, const XInterfaceRef& TestObject )
- THROWS( ( IllegalArgumentException,
+ THROWS( ( IllegalArgumentException,
UsrSystemException) )
{
XServiceInfoRef info( TestObject, USR_QUERY );
@@ -180,9 +180,9 @@ void OPipeTest::testInvariant( const UString& TestName, const XInterfaceRef& Tes
}
-INT32 OPipeTest::test( const UString& TestName,
+INT32 OPipeTest::test( const UString& TestName,
const XInterfaceRef& TestObject,
- INT32 hTestHandle) THROWS( ( IllegalArgumentException,
+ INT32 hTestHandle) THROWS( ( IllegalArgumentException,
UsrSystemException) )
{
if( L"com.sun.star.io.Pipe" == TestName ) {
@@ -222,25 +222,25 @@ INT32 OPipeTest::test( const UString& TestName,
-BOOL OPipeTest::testPassed(void) THROWS( (UsrSystemException) )
+BOOL OPipeTest::testPassed(void) THROWS( (UsrSystemException) )
{
return m_seqErrors.getLen() == 0;
}
-Sequence< UString > OPipeTest::getErrors(void) THROWS( (UsrSystemException) )
+Sequence< UString > OPipeTest::getErrors(void) THROWS( (UsrSystemException) )
{
return m_seqErrors;
}
-Sequence< UsrAny > OPipeTest::getErrorExceptions(void) THROWS( (UsrSystemException) )
+Sequence< UsrAny > OPipeTest::getErrorExceptions(void) THROWS( (UsrSystemException) )
{
return m_seqExceptions;
}
-Sequence< UString > OPipeTest::getWarnings(void) THROWS( (UsrSystemException) )
+Sequence< UString > OPipeTest::getWarnings(void) THROWS( (UsrSystemException) )
{
return m_seqWarnings;
}
@@ -283,7 +283,7 @@ void OPipeTest::testSimple( const XInterfaceRef &r )
ERROR_ASSERT( 5 == input->available() , "wrong available after skip/write " );
input->readBytes( seqRead , 5 );
- ERROR_ASSERT( ! strcmp( (char*) seqRead.getArray() ,
+ ERROR_ASSERT( ! strcmp( (char*) seqRead.getArray() ,
(char*) &( seqWrite.getArray()[seqWrite.getLen()-5] ) ),
"write/read mismatich" );
@@ -303,7 +303,7 @@ void OPipeTest::testSimple( const XInterfaceRef &r )
ERROR_ASSERT( 0 , "writing on a closed stream does not cause an exception" );
}
catch (IOException& e ) {
- e; // just to suppress warning during compile
+ e; // just to suppress warning during compile
}
ERROR_ASSERT(! input->readBytes( seqRead , 1 ), "eof not found !" );
@@ -314,7 +314,7 @@ void OPipeTest::testSimple( const XInterfaceRef &r )
ERROR_ASSERT( 0 , "reading from a closed stream does not cause an exception" );
}
catch( IOException& e ) {
- e; // just to suppress warning during compile
+ e; // just to suppress warning during compile
}
}
@@ -342,7 +342,7 @@ void OPipeTest::testBufferResizing( const XInterfaceRef &r )
for( i = 0 ; i < iMax ; i ++ ) {
input->readBytes( seqRead, createIntSeq(i).getLen() );
- ERROR_ASSERT( ! strcmp( (char*) seqRead.getArray() ,
+ ERROR_ASSERT( ! strcmp( (char*) seqRead.getArray() ,
(char*) createIntSeq(i).getArray() ) ,
"written/read mismatch\n" );
}
@@ -381,7 +381,7 @@ void OPipeTest::testMultithreading( const XInterfaceRef &r )
break;
}
- ERROR_ASSERT( ! strcmp( (char*) seqRead.getArray() ,
+ ERROR_ASSERT( ! strcmp( (char*) seqRead.getArray() ,
(char*) createIntSeq(i).getArray() ) ,
"written/read mismatch\n" );
}
@@ -390,7 +390,7 @@ void OPipeTest::testMultithreading( const XInterfaceRef &r )
input->closeInput();
}
-/* {
+/* {
try {
XInterfaceRef x = xSMgr->createInstance( strService );
@@ -398,7 +398,7 @@ void OPipeTest::testMultithreading( const XInterfaceRef &r )
XOutputStreamRef output( x , USR_QUERY );
OSL_ASSERT( output.is() );
- while( TRUE ) {
+ while( TRUE ) {
// basic read/write
Sequence<BYTE> seqWrite( 500 );
output->writeBytes( seqWrite );
@@ -442,7 +442,7 @@ UString OPipeTest_getServiceName() THROWS( () )
return SERVICE_NAME;
}
-UString OPipeTest_getImplementationName() THROWS( () )
+UString OPipeTest_getImplementationName() THROWS( () )
{
return IMPLEMENTATION_NAME;
}
diff --git a/extensions/test/stm/testfactreg.cxx b/extensions/test/stm/testfactreg.cxx
index 9c9e1c050a6c..0ebfa87c57d1 100644
--- a/extensions/test/stm/testfactreg.cxx
+++ b/extensions/test/stm/testfactreg.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
@@ -30,7 +30,7 @@
#include "precompiled_extensions.hxx"
#include <string.h>
-#include <usr/reflserv.hxx> // for EXTERN_SERVICE_CALLTYPE
+#include <usr/reflserv.hxx> // for EXTERN_SERVICE_CALLTYPE
#include <usr/factoryhlp.hxx>
#include "testfactreg.hxx"
@@ -49,7 +49,7 @@ BOOL EXTERN_SERVICE_CALLTYPE exService_writeRegEntry(
const UNO_INTERFACE(XRegistryKey)* xUnoKey)
{
- XRegistryKeyRef xKey;
+ XRegistryKeyRef xKey;
uno2smart(xKey, *xUnoKey);
UString str = UString( L"/" ) + OPipeTest_getImplementationName() + UString( L"/UNO/SERVICES" );
@@ -92,15 +92,15 @@ UNO_INTERFACE(XInterface) EXTERN_SERVICE_CALLTYPE exService_getFactory
(
const wchar_t* implementationName,
const UNO_INTERFACE(XMultiServiceFactory)* xUnoFact,
- const UNO_INTERFACE(XRegistryKey)*
+ const UNO_INTERFACE(XRegistryKey)*
)
{
UNO_INTERFACE(XInterface) xUnoRet = {0, 0};
- XInterfaceRef xRet;
+ XInterfaceRef xRet;
XMultiServiceFactoryRef xSMgr;
- UString aImplementationName(implementationName);
-
+ UString aImplementationName(implementationName);
+
uno2smart(xSMgr, *xUnoFact);
if (aImplementationName == OPipeTest_getImplementationName() )
@@ -112,43 +112,43 @@ UNO_INTERFACE(XInterface) EXTERN_SERVICE_CALLTYPE exService_getFactory
else if( aImplementationName == ODataStreamTest_getImplementationName(1) ) {
xRet = createSingleFactory( xSMgr , implementationName,
ODataStreamTest_CreateInstance,
- ODataStreamTest_getSupportedServiceNames(1) );
+ ODataStreamTest_getSupportedServiceNames(1) );
}
else if( aImplementationName == ODataStreamTest_getImplementationName(2) ) {
xRet = createSingleFactory( xSMgr , implementationName,
ODataStreamTest_CreateInstance,
- ODataStreamTest_getSupportedServiceNames(2) );
+ ODataStreamTest_getSupportedServiceNames(2) );
}
else if( aImplementationName == OObjectStreamTest_getImplementationName(1) ) {
xRet = createSingleFactory( xSMgr , implementationName,
OObjectStreamTest_CreateInstance,
- OObjectStreamTest_getSupportedServiceNames(1) );
+ OObjectStreamTest_getSupportedServiceNames(1) );
}
else if( aImplementationName == OObjectStreamTest_getImplementationName(2) ) {
xRet = createSingleFactory( xSMgr , implementationName,
OObjectStreamTest_CreateInstance,
- OObjectStreamTest_getSupportedServiceNames(2) );
+ OObjectStreamTest_getSupportedServiceNames(2) );
}
else if( aImplementationName == OMarkableOutputStreamTest_getImplementationName() ) {
xRet = createSingleFactory( xSMgr , implementationName,
OMarkableOutputStreamTest_CreateInstance,
- OMarkableOutputStreamTest_getSupportedServiceNames() );
+ OMarkableOutputStreamTest_getSupportedServiceNames() );
}
else if( aImplementationName == OMarkableInputStreamTest_getImplementationName() ) {
xRet = createSingleFactory( xSMgr , implementationName,
OMarkableInputStreamTest_CreateInstance,
- OMarkableInputStreamTest_getSupportedServiceNames() );
+ OMarkableInputStreamTest_getSupportedServiceNames() );
}
else if( aImplementationName == OMyPersistObject_getImplementationName() ) {
xRet = createSingleFactory( xSMgr , implementationName,
OMyPersistObject_CreateInstance,
- OMyPersistObject_getSupportedServiceNames() );
+ OMyPersistObject_getSupportedServiceNames() );
}
if (xRet.is())
{
smart2uno(xRet, xUnoRet);
- }
-
+ }
+
return xUnoRet;
}
@@ -163,7 +163,7 @@ Sequence<BYTE> createSeq( char * p )
return seq;
}
-Sequence<BYTE> createIntSeq( INT32 i )
+Sequence<BYTE> createIntSeq( INT32 i )
{
char pcCount[20];
sprintf( pcCount , "%d" , i );
diff --git a/extensions/test/stm/testfactreg.hxx b/extensions/test/stm/testfactreg.hxx
index 81c22d00b351..07e192a94071 100644
--- a/extensions/test/stm/testfactreg.hxx
+++ b/extensions/test/stm/testfactreg.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
@@ -28,32 +28,32 @@
XInterfaceRef OPipeTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
Sequence<UString> OPipeTest_getSupportedServiceNames(void) THROWS( () );
UString OPipeTest_getServiceName() THROWS( () );
-UString OPipeTest_getImplementationName() THROWS( () );
+UString OPipeTest_getImplementationName() THROWS( () );
XInterfaceRef ODataStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
Sequence<UString> ODataStreamTest_getSupportedServiceNames( int i) THROWS( () );
UString ODataStreamTest_getServiceName( int i) THROWS( ( ) );
-UString ODataStreamTest_getImplementationName( int i) THROWS( () );
+UString ODataStreamTest_getImplementationName( int i) THROWS( () );
XInterfaceRef OMarkableOutputStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
Sequence<UString> OMarkableOutputStreamTest_getSupportedServiceNames(void) THROWS( () );
UString OMarkableOutputStreamTest_getServiceName() THROWS( () );
-UString OMarkableOutputStreamTest_getImplementationName() THROWS( () );
+UString OMarkableOutputStreamTest_getImplementationName() THROWS( () );
XInterfaceRef OMarkableInputStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
Sequence<UString> OMarkableInputStreamTest_getSupportedServiceNames(void) THROWS( () );
UString OMarkableInputStreamTest_getServiceName() THROWS( () );
-UString OMarkableInputStreamTest_getImplementationName() THROWS( () );
+UString OMarkableInputStreamTest_getImplementationName() THROWS( () );
XInterfaceRef OObjectStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
Sequence<UString> OObjectStreamTest_getSupportedServiceNames( int i) THROWS( () );
UString OObjectStreamTest_getServiceName( int i) THROWS( () );
-UString OObjectStreamTest_getImplementationName( int i) THROWS( () );
+UString OObjectStreamTest_getImplementationName( int i) THROWS( () );
-XInterfaceRef OMyPersistObject_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
-Sequence<UString> OMyPersistObject_getSupportedServiceNames( ) THROWS( () );
-UString OMyPersistObject_getServiceName( ) THROWS( () );
-UString OMyPersistObject_getImplementationName( ) THROWS( () );
+XInterfaceRef OMyPersistObject_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
+Sequence<UString> OMyPersistObject_getSupportedServiceNames( ) THROWS( () );
+UString OMyPersistObject_getServiceName( ) THROWS( () );
+UString OMyPersistObject_getImplementationName( ) THROWS( () );
Sequence<BYTE> createSeq( char * p );
Sequence<BYTE> createIntSeq( INT32 i );
@@ -75,7 +75,7 @@ Sequence<BYTE> createIntSeq( INT32 i );
m_seqErrors.getArray()[ m_seqErrors.getLen()-1] = StringToOUString( str , CHARSET_SYSTEM ); \
}\
((void)0)
-
+
#define WARNING_ASSERT(expr, Message) \
if( ! (expr) ) { \