diff options
10 files changed, 30 insertions, 69 deletions
diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/nativeview.h b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/nativeview.h index 81de2d9f1b31..99207192f796 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/nativeview.h +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/nativeview.h @@ -47,16 +47,14 @@ extern "C" { * Method: getNativeWindowSystemType * Signature: ()I */ -JNIEXPORT jint JNICALL Java_NativeView_getNativeWindowSystemType - (JNIEnv *, jobject); +JNIEXPORT jint JNICALL Java_NativeView_getNativeWindowSystemType(JNIEnv*, jobject); /* * Class: org_openoffice_OpenOffice * Method: getNativeWindow * Signature: ()J */ -JNIEXPORT jlong JNICALL Java_NativeView_getNativeWindow - (JNIEnv *, jobject); +JNIEXPORT jlong JNICALL Java_NativeView_getNativeWindow(JNIEnv*, jobject); #ifdef __cplusplus } diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.h b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.h index 81de2d9f1b31..99207192f796 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.h +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.h @@ -47,16 +47,14 @@ extern "C" { * Method: getNativeWindowSystemType * Signature: ()I */ -JNIEXPORT jint JNICALL Java_NativeView_getNativeWindowSystemType - (JNIEnv *, jobject); +JNIEXPORT jint JNICALL Java_NativeView_getNativeWindowSystemType(JNIEnv*, jobject); /* * Class: org_openoffice_OpenOffice * Method: getNativeWindow * Signature: ()J */ -JNIEXPORT jlong JNICALL Java_NativeView_getNativeWindow - (JNIEnv *, jobject); +JNIEXPORT jlong JNICALL Java_NativeView_getNativeWindow(JNIEnv*, jobject); #ifdef __cplusplus } diff --git a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/string_samples.cxx b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/string_samples.cxx index ecb21116a00a..26162eeb3617 100644 --- a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/string_samples.cxx +++ b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/string_samples.cxx @@ -53,35 +53,34 @@ SAL_IMPLEMENT_MAIN() // give it an initial size, should be a good guess. // stringbuffer extends if necessary - OUStringBuffer buf( 128 ); + OUStringBuffer buf(128); // append an ascii string - buf.append( "pi ( here " ); + buf.append("pi ( here "); // numbers can be simply appended - buf.append( pi ); + buf.append(pi); // lets the compiler count the stringlength, so this is more efficient than // the above appendAscii call, where length of the string must be calculated at // runtime - buf.append( " ) multiplied with " ); - buf.append( n ); - buf.append( " gives " ); - buf.append( (double)( n * pi ) ); - buf.append( "." ); + buf.append(" ) multiplied with "); + buf.append(n); + buf.append(" gives "); + buf.append((double)(n * pi)); + buf.append("."); // now transfer the buffer into the string. // afterwards buffer is empty and may be reused again ! OUString string = buf.makeStringAndClear(); // I could of course also used the OStringBuffer directly - OString oString = rtl::OUStringToOString( string , RTL_TEXTENCODING_ASCII_US ); + OString oString = rtl::OUStringToOString(string, RTL_TEXTENCODING_ASCII_US); // just to print something - printf( "%s\n" ,oString.getStr() ); + printf("%s\n", oString.getStr()); return 0; } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/odk/examples/DevelopersGuide/ProfUNO/Lifetime/object_lifetime.cxx b/odk/examples/DevelopersGuide/ProfUNO/Lifetime/object_lifetime.cxx index f92731d37d88..86cd5b356cf5 100644 --- a/odk/examples/DevelopersGuide/ProfUNO/Lifetime/object_lifetime.cxx +++ b/odk/examples/DevelopersGuide/ProfUNO/Lifetime/object_lifetime.cxx @@ -40,28 +40,26 @@ class MyOWeakObject : public ::cppu::OWeakObject { public: - MyOWeakObject() { fprintf( stdout, "constructed\n" ); } - ~MyOWeakObject() { fprintf( stdout, "destructed\n" ); } + MyOWeakObject() { fprintf(stdout, "constructed\n"); } + ~MyOWeakObject() { fprintf(stdout, "destructed\n"); } }; - void simple_object_creation_and_destruction() { // create the UNO object - com::sun::star::uno::XInterface * p = new MyOWeakObject(); + com::sun::star::uno::XInterface* p = new MyOWeakObject(); // acquire it, refcount becomes one p->acquire(); - fprintf( stdout, "before release\n" ); + fprintf(stdout, "before release\n"); // release it, refcount drops to zero p->release(); - fprintf( stdout, "after release\n" ); + fprintf(stdout, "after release\n"); } - int main() { simple_object_creation_and_destruction(); diff --git a/odk/examples/OLE/activex/SOComWindowPeer.cpp b/odk/examples/OLE/activex/SOComWindowPeer.cpp index 0045014fec81..7439593dd138 100644 --- a/odk/examples/OLE/activex/SOComWindowPeer.cpp +++ b/odk/examples/OLE/activex/SOComWindowPeer.cpp @@ -40,19 +40,15 @@ #include "SOComWindowPeer.h" #include <sal/macros.h> - - - STDMETHODIMP SOComWindowPeer::InterfaceSupportsErrorInfo(REFIID riid) { - static const IID* arr[] = - { + static const IID* arr[] = { &IID_ISOComWindowPeer, }; - for (int i=0;i<SAL_N_ELEMENTS(arr);i++) + for (int i = 0; i < SAL_N_ELEMENTS(arr); i++) { - if (InlineIsEqualGUID(*arr[i],riid)) + if (InlineIsEqualGUID(*arr[i], riid)) return S_OK; } return S_FALSE; diff --git a/odk/examples/OLE/activex/StdAfx2.h b/odk/examples/OLE/activex/StdAfx2.h index df14ccf949a0..39c84dc2fc14 100644 --- a/odk/examples/OLE/activex/StdAfx2.h +++ b/odk/examples/OLE/activex/StdAfx2.h @@ -47,7 +47,7 @@ #define _ATL_APARTMENT_THREADED #define _ATL_STATIC_REGISTRY -#define min(a, b) (((a) < (b)) ? (a) : (b)) +#define min(a, b) (((a) < (b)) ? (a) : (b)) #include <atlbase.h> //You may derive a class from CComModule and use it if you want to override diff --git a/odk/examples/OLE/activex/so_activex.cpp b/odk/examples/OLE/activex/so_activex.cpp index e546aeff56ec..b2cf16a80349 100644 --- a/odk/examples/OLE/activex/so_activex.cpp +++ b/odk/examples/OLE/activex/so_activex.cpp @@ -35,7 +35,6 @@ // so_activex.cpp : Implementation of DLL Exports. - // Note: Proxy/Stub Information // To build a separate proxy/stub DLL, // run nmake -f so_activexps.mk in the project directory. @@ -48,18 +47,15 @@ #include "so_activex_i.c" #include "SOActiveX.h" - CComModule _Module; BEGIN_OBJECT_MAP(ObjectMap) OBJECT_ENTRY(CLSID_SOActiveX, CSOActiveX) END_OBJECT_MAP() - // DLL Entry Point -extern "C" -BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) +extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) { if (dwReason == DLL_PROCESS_ATTACH) { @@ -68,17 +64,12 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) } else if (dwReason == DLL_PROCESS_DETACH) _Module.Term(); - return TRUE; // ok + return TRUE; // ok } - // Used to determine whether the DLL can be unloaded by OLE -STDAPI DllCanUnloadNow(void) -{ - return (_Module.GetLockCount()==0) ? S_OK : S_FALSE; -} - +STDAPI DllCanUnloadNow(void) { return (_Module.GetLockCount() == 0) ? S_OK : S_FALSE; } // Returns a class factory to create an object of the requested type @@ -87,7 +78,6 @@ STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) return _Module.GetClassObject(rclsid, riid, ppv); } - // DllRegisterServer - Adds entries to the system registry STDAPI DllRegisterServer(void) @@ -97,7 +87,6 @@ STDAPI DllRegisterServer(void) return aResult; } - // DllUnregisterServer - Removes entries from the system registry STDAPI DllUnregisterServer(void) diff --git a/odk/examples/cpp/complextoolbarcontrols/CalcListener.cxx b/odk/examples/cpp/complextoolbarcontrols/CalcListener.cxx index 38b3326c7754..0b5b0ca1e1ef 100644 --- a/odk/examples/cpp/complextoolbarcontrols/CalcListener.cxx +++ b/odk/examples/cpp/complextoolbarcontrols/CalcListener.cxx @@ -17,16 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "MyListener.h" #include <com/sun/star/lang/XMultiServiceFactory.hpp> -void SAL_CALL CalcListener::notifyEvent( const ::com::sun::star::document::EventObject& aEvent ) -{ -} +void SAL_CALL CalcListener::notifyEvent(const ::com::sun::star::document::EventObject& aEvent) {} -void SAL_CALL CalcListener::disposing( const com::sun::star::lang::EventObject& aSource ) -{ -} +void SAL_CALL CalcListener::disposing(const com::sun::star::lang::EventObject& aSource) {} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/odk/qa/checkapi/checkapi.cxx b/odk/qa/checkapi/checkapi.cxx index 95cac2c042bf..fac7fbfc708a 100644 --- a/odk/qa/checkapi/checkapi.cxx +++ b/odk/qa/checkapi/checkapi.cxx @@ -23,15 +23,12 @@ #ifdef _MSC_VER // deprecation warnings do not matter here -#pragma warning (disable : 4996) +#pragma warning(disable : 4996) #endif #include <allheaders.hxx> CPPUNIT_PLUGIN_IMPLEMENT(); -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool firstfunc(sal_Bool) -{ - return true; -} +extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool firstfunc(sal_Bool) { return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index 8f6559608247..07de73698403 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -7485,26 +7485,18 @@ odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.hxx odk/examples/DevelopersGuide/Database/DriverSkeleton/propertyids.cxx odk/examples/DevelopersGuide/Database/DriverSkeleton/propertyids.hxx odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/nativeview.c -odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/unix/nativeview.h odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.c -odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.h odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.hxx odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.cxx -odk/examples/DevelopersGuide/ProfUNO/CppBinding/string_samples.cxx -odk/examples/DevelopersGuide/ProfUNO/Lifetime/object_lifetime.cxx odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/SimpleBootstrap_cpp.cxx odk/examples/OLE/activex/SOActiveX.cpp odk/examples/OLE/activex/SOActiveX.h -odk/examples/OLE/activex/SOComWindowPeer.cpp odk/examples/OLE/activex/SOComWindowPeer.h -odk/examples/OLE/activex/StdAfx2.h odk/examples/OLE/activex/resource.h -odk/examples/OLE/activex/so_activex.cpp odk/examples/cpp/DocumentLoader/DocumentLoader.cxx -odk/examples/cpp/complextoolbarcontrols/CalcListener.cxx odk/examples/cpp/complextoolbarcontrols/ListenerHelper.cxx odk/examples/cpp/complextoolbarcontrols/ListenerHelper.h odk/examples/cpp/complextoolbarcontrols/MyJob.cxx @@ -7523,7 +7515,6 @@ odk/examples/cpp/custompanel/ctp_panel.cxx odk/examples/cpp/custompanel/ctp_panel.hxx odk/examples/cpp/custompanel/ctp_services.cxx odk/examples/cpp/remoteclient/remoteclient.cxx -odk/qa/checkapi/checkapi.cxx odk/source/unoapploader/unx/unoapploader.c odk/source/unoapploader/win/unoapploader.c odk/source/unowinreg/win/unowinreg.cxx |