From 79e2f02e137c6cf3487a5f006782268de53d762e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Timm?= Date: Fri, 26 Sep 2008 07:04:59 +0000 Subject: [PATCH 01/56] Create DEV300_m32 milestone tag From 4dba2ed1cf0bfec414015390387bfc0954042db0 Mon Sep 17 00:00:00 2001 From: Release Engineers Date: Mon, 3 Nov 2008 12:53:04 +0000 Subject: [PATCH 02/56] Create DEV300_m35 milestone tag From 9578c30661506a863ac374128078aa0b5f7a3991 Mon Sep 17 00:00:00 2001 From: Release Engineers Date: Mon, 26 Jan 2009 16:51:30 +0000 Subject: [PATCH 03/56] Create DEV300_m40 milestone tag from trunk@266942 From 17b84c4746cd782b3ecf3b28166f0ccabcbb6079 Mon Sep 17 00:00:00 2001 From: Philipp Lohmann Date: Mon, 20 Apr 2009 16:57:13 +0000 Subject: [PATCH 04/56] CWS-TOOLING: rebase CWS printerpullpages to trunk@270723 (milestone: DEV300:m46) --- .../OpenOfficeorg/javavendors_linux.xml | 2 +- .../OpenOfficeorg/javavendors_macosx.xml | 2 +- .../OpenOfficeorg/javavendors_os2.xml | 2 +- .../OpenOfficeorg/javavendors_unx.xml | 4 +- .../OpenOfficeorg/javavendors_wnt.xml | 2 +- jvmfwk/inc/jvmfwk/framework.h | 21 ++++++++++ .../plugins/sunmajor/javaenvsetup/javaldx.cxx | 36 +++++++++++++---- .../plugins/sunmajor/pluginlib/sunversion.cxx | 3 +- jvmfwk/source/framework.cxx | 30 ++++++++++++++ jvmfwk/source/framework.map | 5 +++ sal/typesconfig/typesconfig.c | 39 +++++++++++++------ stoc/source/javavm/javavm.cxx | 33 +++++++++++++--- store/source/lockbyte.cxx | 12 +++++- store/source/storbase.hxx | 2 +- store/source/stordata.hxx | 4 +- store/source/storlckb.cxx | 6 +-- store/source/stortree.cxx | 6 ++- store/source/stortree.hxx | 2 + store/workben/t_file.cxx | 25 ++++++++++++ store/workben/t_page.cxx | 4 +- 20 files changed, 198 insertions(+), 42 deletions(-) diff --git a/jvmfwk/distributions/OpenOfficeorg/javavendors_linux.xml b/jvmfwk/distributions/OpenOfficeorg/javavendors_linux.xml index f3bf44addc25..ed329e5788d3 100644 --- a/jvmfwk/distributions/OpenOfficeorg/javavendors_linux.xml +++ b/jvmfwk/distributions/OpenOfficeorg/javavendors_linux.xml @@ -3,7 +3,7 @@ - 2008-01-16 + 2004-01-30 diff --git a/jvmfwk/distributions/OpenOfficeorg/javavendors_macosx.xml b/jvmfwk/distributions/OpenOfficeorg/javavendors_macosx.xml index 1d7894a11025..215d26c0ea2a 100644 --- a/jvmfwk/distributions/OpenOfficeorg/javavendors_macosx.xml +++ b/jvmfwk/distributions/OpenOfficeorg/javavendors_macosx.xml @@ -3,7 +3,7 @@ - 2008-01-16 + 2006-05-02 diff --git a/jvmfwk/distributions/OpenOfficeorg/javavendors_os2.xml b/jvmfwk/distributions/OpenOfficeorg/javavendors_os2.xml index 5ba2eaf76251..372254d4ee71 100644 --- a/jvmfwk/distributions/OpenOfficeorg/javavendors_os2.xml +++ b/jvmfwk/distributions/OpenOfficeorg/javavendors_os2.xml @@ -3,7 +3,7 @@ - 2008-01-16 + 2004-01-30 diff --git a/jvmfwk/distributions/OpenOfficeorg/javavendors_unx.xml b/jvmfwk/distributions/OpenOfficeorg/javavendors_unx.xml index b9b8296edf8f..3b1f53fc4fce 100755 --- a/jvmfwk/distributions/OpenOfficeorg/javavendors_unx.xml +++ b/jvmfwk/distributions/OpenOfficeorg/javavendors_unx.xml @@ -3,7 +3,7 @@ - 2008-01-16 + 2004-01-30 @@ -14,4 +14,4 @@ vnd.sun.star.expand:$URE_INTERNAL_LIB_DIR/sunjavaplugin.so - \ No newline at end of file + diff --git a/jvmfwk/distributions/OpenOfficeorg/javavendors_wnt.xml b/jvmfwk/distributions/OpenOfficeorg/javavendors_wnt.xml index 47a5800659ca..a72216d66646 100644 --- a/jvmfwk/distributions/OpenOfficeorg/javavendors_wnt.xml +++ b/jvmfwk/distributions/OpenOfficeorg/javavendors_wnt.xml @@ -3,7 +3,7 @@ - 2008-01-16 + 2004-01-30 diff --git a/jvmfwk/inc/jvmfwk/framework.h b/jvmfwk/inc/jvmfwk/framework.h index 49516f554e21..4082adba0a5f 100644 --- a/jvmfwk/inc/jvmfwk/framework.h +++ b/jvmfwk/inc/jvmfwk/framework.h @@ -815,6 +815,27 @@ javaFrameworkError SAL_CALL jfw_setJRELocations( javaFrameworkError SAL_CALL jfw_getJRELocations( rtl_uString *** parLocations, sal_Int32 * pSize); + +/** checks if the installation of the jre still exists. + + This function checks if the JRE described by pInfo still + exists. The check must be very quick because it is called by javaldx + (Linux, Solaris) at start up. + + @param pInfo + [in] the JavaInfo object with information about the JRE. + @param pp_exist + [out] the parameter is set to either sal_True or sal_False. The value is + only valid if the function returns JFW_E_NONE. + + @return + JFW_E_NONE the function ran successfully.
+ JFW_E_ERROR an error occurred during execution.
+ JFW_E_INVALID_ARG pInfo contains invalid data
+ */ +javaFrameworkError SAL_CALL jfw_existJRE(const JavaInfo *pInfo, sal_Bool *exist); + + /** locks this API so that it cannot be used by other threads.

If a different thread called this function before then the diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx index 762497b8d8bc..1a6f99f65ba4 100755 --- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx +++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx @@ -46,6 +46,7 @@ using namespace rtl; static sal_Bool hasOption(char const * szOption, int argc, char** argv); static rtl::OString getLD_LIBRARY_PATH(const rtl::ByteSequence & vendorData); +static bool findAndSelect(JavaInfo**); //static sal_Bool printPaths(const OUString& sPathFile); #define HELP_TEXT \ @@ -95,15 +96,22 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) if (pInfo == NULL) { - errcode = jfw_findAndSelectJRE( & pInfo); - if (errcode == JFW_E_NO_JAVA_FOUND) + if (false == findAndSelect(&pInfo)) + return -1; + } + else + { + //check if the JRE was not uninstalled + sal_Bool bExist = sal_False; + errcode = jfw_existJRE(pInfo, &bExist); + if (errcode == JFW_E_NONE) { - fprintf(stderr,"javaldx: Could not find a Java Runtime Environment! \n"); - return 0; + if (false == findAndSelect(&pInfo)) + return -1; } - else if (errcode != JFW_E_NONE && errcode != JFW_E_DIRECT_MODE) + else { - fprintf(stderr,"javaldx failed!\n"); + fprintf(stderr, "javaldx: Could not determine if JRE still exist\n"); return -1; } } @@ -162,7 +170,21 @@ static sal_Bool hasOption(char const * szOption, int argc, char** argv) return retVal; } - +static bool findAndSelect(JavaInfo ** ppInfo) +{ + javaFrameworkError errcode = jfw_findAndSelectJRE(ppInfo); + if (errcode == JFW_E_NO_JAVA_FOUND) + { + fprintf(stderr,"javaldx: Could not find a Java Runtime Environment! \n"); + return false; + } + else if (errcode != JFW_E_NONE && errcode != JFW_E_DIRECT_MODE) + { + fprintf(stderr,"javaldx failed!\n"); + return false; + } + return true; +} diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx index 083739078bf0..f3586af32bb5 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx @@ -110,8 +110,7 @@ bool SunVersion::init(const char *szVersion) ! (nPartPos == 0) // prevents: ".4.1", "..1", part must start with digit && ( //seperators after maintainance (1.4.1_01, 1.4.1-beta, or1.4.1 - (pCur == pEnd || *pCur == '_' || *pCur == '-') - && (nPart == 2 ) + ((pCur == pEnd || *pCur == '_' || *pCur == '-') && (nPart == 2 )) || //separators between major-minor and minor-maintainance (nPart < 2 && *pCur == '.') ) diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx index 75a20ac98ff3..933e5e10ea09 100644 --- a/jvmfwk/source/framework.cxx +++ b/jvmfwk/source/framework.cxx @@ -34,6 +34,7 @@ #include "rtl/ustring.hxx" #include "rtl/bootstrap.hxx" #include "osl/thread.hxx" +#include "osl/file.hxx" #include "osl/module.hxx" #include "jvmfwk/framework.h" #include "jvmfwk/vendorplugin.h" @@ -1113,6 +1114,35 @@ javaFrameworkError SAL_CALL jfw_getJRELocations( return errcode; } + +javaFrameworkError jfw_existJRE(const JavaInfo *pInfo, sal_Bool *exist) +{ + javaFrameworkError ret = JFW_E_NONE; + if (!pInfo || !exist) + return JFW_E_INVALID_ARG; + ::rtl::OUString sLocation(pInfo->sLocation); + + if (sLocation.getLength() == 0) + return JFW_E_INVALID_ARG; + + ::osl::DirectoryItem item; + ::osl::File::RC rc_item = ::osl::DirectoryItem::get(sLocation, item); + if (::osl::File::E_None == rc_item) + { + *exist = sal_True; + } + else if (::osl::File::E_NOENT == rc_item) + { + *exist = sal_False; + } + else + { + ret = JFW_E_ERROR; + } + + return ret; +} + void SAL_CALL jfw_lock() { jfw::FwkMutex::get().acquire(); diff --git a/jvmfwk/source/framework.map b/jvmfwk/source/framework.map index 2ce5d22b61dc..c95cc83aa826 100644 --- a/jvmfwk/source/framework.map +++ b/jvmfwk/source/framework.map @@ -24,3 +24,8 @@ UDK_3_0_0 { local: *; }; + +UDK_3.1 { # OOo 3.1.0 + global: + jfw_existJRE; +} UDK_3_0_0; diff --git a/sal/typesconfig/typesconfig.c b/sal/typesconfig/typesconfig.c index be02052378ae..932d80fd979a 100644 --- a/sal/typesconfig/typesconfig.c +++ b/sal/typesconfig/typesconfig.c @@ -163,20 +163,37 @@ int check( TestFunc func, Type eT, void* p ) |* Letzte Aenderung |* *************************************************************************/ +#if defined(IA64) || defined(ARM32) + +int forceerror() +{ +#if defined(ARM32) +// workaround for qemu-user + hit = 1; +#else + raise (SIGBUS); +#endif + return 1; +} + +int GetAtAddress( Type eT, void* p ) +{ + switch ( eT ) + { + case t_char: return *((char*)p); + case t_short: if ((long)p % sizeof(short)) return forceerror(); else return *((short*)p); + case t_int: if ((long)p % sizeof(int)) return forceerror(); else return *((int*)p); + case t_long: if ((long)p % sizeof(long)) return forceerror(); else return *((long*)p); + case t_double: if ((long)p % sizeof(double)) return forceerror(); else return *((double*)p); + } + abort(); +} + +#else static int dummy(void* unused); int GetAtAddress( Type eT, void* p ) { -#if defined(IA64) || defined(ARM32) - switch ( eT ) - { - case t_char: return *((char*)p); - case t_short: if ((long)p % sizeof(short)) abort(); else return *((short*)p); - case t_int: if ((long)p % sizeof(int)) abort(); else return *((int*)p); - case t_long: if ((long)p % sizeof(long)) abort(); else return *((long*)p); - case t_double: if ((long)p % sizeof(double)) abort(); else return *((double*)p); - } -#else switch ( eT ) { case t_char: { char x = *(char*)p; return dummy(&x); } @@ -185,7 +202,6 @@ int GetAtAddress( Type eT, void* p ) case t_long: { long x = *(long*)p; return dummy(&x); } case t_double: { double x = *(double*)p; return dummy(&x); } } -#endif abort(); } @@ -195,6 +211,7 @@ int dummy(void* unused) return 0; } +#endif /************************************************************************* |* |* SetAtAddress() diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index e7c9ff1a5851..8042b70c9dd1 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -881,11 +881,34 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId) } case JFW_E_VM_CREATION_FAILED: { - //Error: - //%PRODUCTNAME requires a Java runtime environment (JRE) to perform - //this task. The selected JRE is defective. Please select another - //version or install a new JRE and select it under Tools - Options - - //%PRODUCTNAME - Java. + //If the creation failed because the JRE has been uninstalled then + //we search another one. As long as there is a javaldx, we should + //never come into this situation. javaldx checks alway if the JRE + //still exist. + JavaInfo * pJavaInfo = NULL; + if (JFW_E_NONE == jfw_getSelectedJRE(&pJavaInfo)) + { + sal_Bool bExist = sal_False; + if (JFW_E_NONE == jfw_existJRE(pJavaInfo, &bExist)) + { + if (bExist == sal_False + && ! (pJavaInfo->nRequirements & JFW_REQUIRE_NEEDRESTART)) + { + javaFrameworkError errFind = jfw_findAndSelectJRE( NULL ); + if (errFind == JFW_E_NONE) + { + continue; + } + } + } + } + + jfw_freeJavaInfo(pJavaInfo); + // + //Error: %PRODUCTNAME requires a Java + //runtime environment (JRE) to perform this task. The selected JRE + //is defective. Please select another version or install a new JRE + //and select it under Tools - Options - %PRODUCTNAME - Java. css::java::JavaVMCreationFailureException exc( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( diff --git a/store/source/lockbyte.cxx b/store/source/lockbyte.cxx index ef97f129538d..a38aa768908d 100644 --- a/store/source/lockbyte.cxx +++ b/store/source/lockbyte.cxx @@ -41,6 +41,7 @@ #include "sal/types.h" #include "osl/diagnose.h" #include "osl/file.h" +#include "osl/process.h" #include "rtl/alloc.h" #include "rtl/ustring.hxx" @@ -278,9 +279,18 @@ struct FileHandle rtl::OUString aFileUrl; if (osl_getFileURLFromSystemPath (pFilename, &(aFileUrl.pData)) != osl_File_E_None) { - // Not system path. Maybe a file url, already. + // Not system path. Assume file url. rtl_uString_assign (&(aFileUrl.pData), pFilename); } + if (aFileUrl.compareToAscii("file://", 7) != 0) + { + // Not file url. Assume relative path. + rtl::OUString aCwdUrl; + (void) osl_getProcessWorkingDir (&(aCwdUrl.pData)); + + // Absolute file url. + (void) osl_getAbsoluteFileURL (aCwdUrl.pData, aFileUrl.pData, &(aFileUrl.pData)); + } // Acquire handle. oslFileError result = osl_openFile (aFileUrl.pData, &m_handle, nFlags); diff --git a/store/source/storbase.hxx b/store/source/storbase.hxx index 167302d7bedd..04be2860f691 100644 --- a/store/source/storbase.hxx +++ b/store/source/storbase.hxx @@ -910,7 +910,7 @@ protected: public: template< class U > - PageHolderObject get() const + PageHolderObject makeHolder() const { return PageHolderObject(m_xPage); } diff --git a/store/source/stordata.hxx b/store/source/stordata.hxx index 4610db5ac908..1b6c74c371fd 100644 --- a/store/source/stordata.hxx +++ b/store/source/stordata.hxx @@ -836,13 +836,13 @@ private: */ page & PAGE() { - page * pImpl = reinterpret_cast(m_xPage.get()); + page * pImpl = static_cast(m_xPage.get()); OSL_PRECOND(pImpl != 0, "OStoreDirectoryPageObject::PAGE(): Null pointer"); return (*pImpl); } page const & PAGE() const { - page const * pImpl = reinterpret_cast(m_xPage.get()); + page const * pImpl = static_cast(m_xPage.get()); OSL_PRECOND(pImpl != 0, "OStoreDirectoryPageObject::PAGE(): Null pointer"); return (*pImpl); } diff --git a/store/source/storlckb.cxx b/store/source/storlckb.cxx index 837945d1646c..fc028f1da688 100644 --- a/store/source/storlckb.cxx +++ b/store/source/storlckb.cxx @@ -221,7 +221,7 @@ storeError OStoreLockBytes::readAt ( } else { - PageHolderObject< data > xData (aData.get()); + PageHolderObject< data > xData (aData.makeHolder()); memcpy ( &pData[rnDone], &xData->m_pData[aDescr.m_nOffset], @@ -322,13 +322,13 @@ storeError OStoreLockBytes::writeAt ( } } - PageHolderObject< data > xData (aData.get()); + PageHolderObject< data > xData (aData.makeHolder()); if (!xData.is()) { eErrCode = aData.construct(m_xManager->allocator()); if (eErrCode != store_E_None) return eErrCode; - xData = aData.get(); + xData = aData.makeHolder(); } // Modify data page. diff --git a/store/source/stortree.cxx b/store/source/stortree.cxx index 1967c744c66b..614b995aba72 100644 --- a/store/source/stortree.cxx +++ b/store/source/stortree.cxx @@ -127,6 +127,7 @@ void OStoreBTreeNodeData::remove (sal_uInt16 i) } } +#if 0 /* NYI */ /* * merge (with right page). */ @@ -140,6 +141,7 @@ void OStoreBTreeNodeData::merge (const self& rPageR) usageCount (n + m); } } +#endif /* * split (left half copied from right half of left page). @@ -538,7 +540,7 @@ storeError OStoreBTreeRootObject::find_lookup ( // Check current page. PageHolderObject< page > xPage (rNode.get()); - for (; xPage->depth() > 0; xPage = rNode.get< page >()) + for (; xPage->depth() > 0; xPage = rNode.makeHolder< page >()) { // Find next page. page const & rPage = (*xPage); @@ -621,7 +623,7 @@ storeError OStoreBTreeRootObject::find_insert ( // Check current Page. PageHolderObject< page > xPage (rNode.get()); - for (; xPage->depth() > 0; xPage = rNode.get< page >()) + for (; xPage->depth() > 0; xPage = rNode.makeHolder< page >()) { // Find next page. page const & rPage = (*xPage); diff --git a/store/source/stortree.hxx b/store/source/stortree.hxx index ddfe4fecc5bf..9aa5da92cfda 100644 --- a/store/source/stortree.hxx +++ b/store/source/stortree.hxx @@ -224,9 +224,11 @@ struct OStoreBTreeNodeData : public store::OStorePageData void insert (sal_uInt16 i, const T& t); void remove (sal_uInt16 i); +#if 0 /* NYI */ /** merge (with right page). */ void merge (const self& rPageR); +#endif /** split (left half copied from right half of left page). */ diff --git a/store/workben/t_file.cxx b/store/workben/t_file.cxx index ea7b6bcd37d2..d4feb25651eb 100644 --- a/store/workben/t_file.cxx +++ b/store/workben/t_file.cxx @@ -42,6 +42,9 @@ #define INCLUDED_STDIO_H #endif +#include "osl/file.h" +#include "osl/process.h" + using namespace store; #define TEST_PAGESIZE 16384 @@ -62,6 +65,28 @@ int SAL_CALL main (int argc, char **argv) argv[1], rtl_str_getLength(argv[1]), osl_getThreadTextEncoding()); +#if 0 /* EXP */ + oslFileError result; + rtl::OUString aPath; + + result = osl_getFileURLFromSystemPath(aFilename.pData, &(aPath.pData)); + if (result != osl_File_E_None) + { + // not SystemPath, assume FileUrl. + aPath = aFilename; + } + if (rtl_ustr_ascii_shortenedCompare_WithLength(aPath.pData->buffer, aPath.pData->length, "file://", 7) != 0) + { + // not FileUrl, assume relative path. + rtl::OUString aBase; + (void) osl_getProcessWorkingDir (&(aBase.pData)); + + // absolute FileUrl. + (void) osl_getAbsoluteFileURL(aBase.pData, aPath.pData, &(aPath.pData)); + } + aFilename = aPath; +#endif /* EXP */ + eErrCode = FileLockBytes_createInstance ( xLockBytes, aFilename.pData, store_AccessReadWrite); if (eErrCode != store_E_None) diff --git a/store/workben/t_page.cxx b/store/workben/t_page.cxx index b488e1ac997b..a0645f00bc58 100644 --- a/store/workben/t_page.cxx +++ b/store/workben/t_page.cxx @@ -17,7 +17,7 @@ * *======================================================================*/ -template< class T > inline void swap (T & lhs, T & rhs) +template< class T > void swap (T & lhs, T & rhs) { T tmp = rhs; rhs = lhs; lhs = tmp; } @@ -694,7 +694,7 @@ public: { TestObject aObj; - rBIOS.loadPageAt(aObj.get(), &aObj.verify); + rBIOS.loadPageAt(aObj.get(), aObj.verify); rBIOS.loadPageAt(aObj.get(), TestObject::verify); rBIOS.loadPageAt(aObj.get(), PageHolderObject::verify); From 15cc1011a1deb9c54833af62c6bc04499293b457 Mon Sep 17 00:00:00 2001 From: Release Engineers Date: Wed, 10 Jun 2009 13:24:56 +0000 Subject: [PATCH 05/56] Create DEV300_m50 milestone tag from trunk@272824 From 078725525ba344e7c6885ab510ce83b52075107b Mon Sep 17 00:00:00 2001 From: Release Engineers Date: Mon, 29 Jun 2009 10:25:28 +0000 Subject: [PATCH 06/56] Create DEV300_m51 milestone tag from trunk@273467 From 74cb7ba840d6b26931d7735cd2e9c2607f1e7c9d Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Mon, 13 Jul 2009 11:08:01 +0000 Subject: [PATCH 07/56] #i1601# sentence case transliteration --- .../star/i18n/TransliterationModulesExtra.idl | 59 +++++++++++++++++++ offapi/com/sun/star/i18n/makefile.mk | 1 + offapi/com/sun/star/style/CaseMap.idl | 3 + 3 files changed, 63 insertions(+) create mode 100644 offapi/com/sun/star/i18n/TransliterationModulesExtra.idl diff --git a/offapi/com/sun/star/i18n/TransliterationModulesExtra.idl b/offapi/com/sun/star/i18n/TransliterationModulesExtra.idl new file mode 100644 index 000000000000..d899118b2900 --- /dev/null +++ b/offapi/com/sun/star/i18n/TransliterationModulesExtra.idl @@ -0,0 +1,59 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: TransliterationModulesExtra.idl,v $ + * $Revision: 1.0 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_i18n_TransliterationModulesExtra_idl__ +#define __com_sun_star_i18n_TransliterationModulesExtra_idl__ + +//============================================================================= + +module com { module sun { module star { module i18n { + +//============================================================================= + +/** Extra transliteration module enumeration to use with + XTransliteration::loadModule() + + The values used in this group need to be different from the ones in + TransliterationModules and TransliterationModulesNew! + */ + + +// using a constant group instead of enum leaves room for additional values later on... +constants TransliterationModulesExtra +{ + /// Transliterate a string from upper case to lower case + const long SENTENCE_CASE = 200; + + const long END_OF_MODULE = 0; +}; + +//============================================================================= +}; }; }; }; + +#endif diff --git a/offapi/com/sun/star/i18n/makefile.mk b/offapi/com/sun/star/i18n/makefile.mk index f9d8b80c29fb..24157932fc26 100644 --- a/offapi/com/sun/star/i18n/makefile.mk +++ b/offapi/com/sun/star/i18n/makefile.mk @@ -98,6 +98,7 @@ IDLFILES=\ Transliteration.idl \ TransliterationModules.idl \ TransliterationModulesNew.idl \ + TransliterationModulesExtra.idl \ TransliterationType.idl \ UnicodeScript.idl \ UnicodeType.idl \ diff --git a/offapi/com/sun/star/style/CaseMap.idl b/offapi/com/sun/star/style/CaseMap.idl index 4afc4cc65399..b971571f4f7f 100644 --- a/offapi/com/sun/star/style/CaseMap.idl +++ b/offapi/com/sun/star/style/CaseMap.idl @@ -78,6 +78,9 @@ published constants CaseMap */ const short SMALLCAPS = 4; + /** The first character of each first word of each sentence is put in upper case. + */ + const short SENTENCE = 5; }; //============================================================================= From c0840181bcba5e5e90c44ff56e1780c74fae1683 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Mon, 13 Jul 2009 12:48:12 +0000 Subject: [PATCH 08/56] undoing r273933 which was accidently commited on master m51 --- .../star/i18n/TransliterationModulesExtra.idl | 59 ------------------- offapi/com/sun/star/i18n/makefile.mk | 1 - offapi/com/sun/star/style/CaseMap.idl | 3 - 3 files changed, 63 deletions(-) delete mode 100644 offapi/com/sun/star/i18n/TransliterationModulesExtra.idl diff --git a/offapi/com/sun/star/i18n/TransliterationModulesExtra.idl b/offapi/com/sun/star/i18n/TransliterationModulesExtra.idl deleted file mode 100644 index d899118b2900..000000000000 --- a/offapi/com/sun/star/i18n/TransliterationModulesExtra.idl +++ /dev/null @@ -1,59 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: TransliterationModulesExtra.idl,v $ - * $Revision: 1.0 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef __com_sun_star_i18n_TransliterationModulesExtra_idl__ -#define __com_sun_star_i18n_TransliterationModulesExtra_idl__ - -//============================================================================= - -module com { module sun { module star { module i18n { - -//============================================================================= - -/** Extra transliteration module enumeration to use with - XTransliteration::loadModule() - - The values used in this group need to be different from the ones in - TransliterationModules and TransliterationModulesNew! - */ - - -// using a constant group instead of enum leaves room for additional values later on... -constants TransliterationModulesExtra -{ - /// Transliterate a string from upper case to lower case - const long SENTENCE_CASE = 200; - - const long END_OF_MODULE = 0; -}; - -//============================================================================= -}; }; }; }; - -#endif diff --git a/offapi/com/sun/star/i18n/makefile.mk b/offapi/com/sun/star/i18n/makefile.mk index 24157932fc26..f9d8b80c29fb 100644 --- a/offapi/com/sun/star/i18n/makefile.mk +++ b/offapi/com/sun/star/i18n/makefile.mk @@ -98,7 +98,6 @@ IDLFILES=\ Transliteration.idl \ TransliterationModules.idl \ TransliterationModulesNew.idl \ - TransliterationModulesExtra.idl \ TransliterationType.idl \ UnicodeScript.idl \ UnicodeType.idl \ diff --git a/offapi/com/sun/star/style/CaseMap.idl b/offapi/com/sun/star/style/CaseMap.idl index b971571f4f7f..4afc4cc65399 100644 --- a/offapi/com/sun/star/style/CaseMap.idl +++ b/offapi/com/sun/star/style/CaseMap.idl @@ -78,9 +78,6 @@ published constants CaseMap */ const short SMALLCAPS = 4; - /** The first character of each first word of each sentence is put in upper case. - */ - const short SENTENCE = 5; }; //============================================================================= From ffd6952e9ad711c6eb60d2eb823999ff99fa0f05 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 10 Jul 2009 14:03:42 +0200 Subject: [PATCH 09/56] #i103452#: replace PRODUCT by !DBG_UTIL; replace assert by OSL_ASSERT where possible --- bridges/source/remote/static/proxy.cxx | 8 +------ bridges/source/remote/static/remote.cxx | 8 +------ bridges/source/remote/urp/urp_log.hxx | 2 +- bridges/test/testclient.cxx | 15 +++++-------- bridges/test/testcomp.cxx | 11 +++------- bridges/test/testoffice.cxx | 10 +++------ bridges/test/testsameprocess.cxx | 7 +----- cppuhelper/source/interfacecontainer.cxx | 7 ------ cppuhelper/test/testidlclass.cxx | 19 ++++++---------- cppuhelper/test/testproptyphlp.cxx | 22 +++++++------------ io/source/stm/omark.cxx | 10 ++------- io/test/stm/datatest.cxx | 28 ++++++++++-------------- io/test/stm/marktest.cxx | 14 ++++-------- sal/osl/w32/dllentry.c | 4 ++-- xml2cmp/source/xcd/xmlelem.cxx | 11 +--------- 15 files changed, 51 insertions(+), 125 deletions(-) diff --git a/bridges/source/remote/static/proxy.cxx b/bridges/source/remote/static/proxy.cxx index 6f07ba95d6ff..6cfd9c11e9fb 100644 --- a/bridges/source/remote/static/proxy.cxx +++ b/bridges/source/remote/static/proxy.cxx @@ -30,12 +30,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_bridges.hxx" -#if OSL_DEBUG_LEVEL == 0 -# ifndef NDEBUG -# define NDEBUG -# endif -#endif -#include #include #include #include @@ -84,7 +78,7 @@ void acquireRemote2UnoProxy( uno_Interface *pThis ) freeRemote2UnoProxy, p->m_sOid.pData, p->m_pType ); - assert( (uno_Interface *)p == pThis ); + OSL_ASSERT( (uno_Interface *)p == pThis ); } } diff --git a/bridges/source/remote/static/remote.cxx b/bridges/source/remote/static/remote.cxx index 1cb26b4ccd9c..ed8b1dbc9d59 100644 --- a/bridges/source/remote/static/remote.cxx +++ b/bridges/source/remote/static/remote.cxx @@ -30,12 +30,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_bridges.hxx" -#if OSL_DEBUG_LEVEL == 0 -# ifndef NDEBUG -# define NDEBUG -# endif -#endif -#include #include #include @@ -90,7 +84,7 @@ void acquireRemote2RemoteStub( remote_Interface *pThis ) freeRemote2RemoteStub, p->m_sOid.pData, p->m_pType ); - assert( (remote_Interface *)p == pThis ); + OSL_ASSERT( (remote_Interface *)p == pThis ); } } diff --git a/bridges/source/remote/urp/urp_log.hxx b/bridges/source/remote/urp/urp_log.hxx index c7811faf51e9..6c96ea0dbffc 100644 --- a/bridges/source/remote/urp/urp_log.hxx +++ b/bridges/source/remote/urp/urp_log.hxx @@ -29,7 +29,7 @@ ************************************************************************/ namespace bridges_urp { -#ifndef PRODUCT +#ifdef DBG_UTIL #define BRIDGES_URP_PROT #endif diff --git a/bridges/test/testclient.cxx b/bridges/test/testclient.cxx index df5ac58d1a2d..ce870bc19ea9 100644 --- a/bridges/test/testclient.cxx +++ b/bridges/test/testclient.cxx @@ -32,11 +32,6 @@ #include "precompiled_bridges.hxx" #include -#if OSL_DEBUG_LEVEL == 0 -#undef NDEBUG -#define NDEBUG -#endif -#include #include #include @@ -193,10 +188,10 @@ int main( int argc, char *argv[] ) { // test the factory Reference < XBridge > rBridge2 = rFactory->getBridge( OUString( RTL_CONSTASCII_USTRINGPARAM("bla blub")) ); - assert( rBridge2.is() ); - assert( rBridge2->getDescription() == rBridge->getDescription( ) ); - assert( rBridge2->getName() == rBridge->getName() ); - assert( rBridge2 == rBridge ); + OSL_ASSERT( rBridge2.is() ); + OSL_ASSERT( rBridge2->getDescription() == rBridge->getDescription( ) ); + OSL_ASSERT( rBridge2->getName() == rBridge->getName() ); + OSL_ASSERT( rBridge2 == rBridge ); } @@ -230,7 +225,7 @@ int main( int argc, char *argv[] ) } Reference < XBridge > rBridge = rFactory->getBridge( OUString( RTL_CONSTASCII_USTRINGPARAM("bla blub")) ); -// assert( ! rBridge.is() ); +// OSL_ASSERT( ! rBridge.is() ); } } diff --git a/bridges/test/testcomp.cxx b/bridges/test/testcomp.cxx index 432a32f2a554..90a07ab31f43 100644 --- a/bridges/test/testcomp.cxx +++ b/bridges/test/testcomp.cxx @@ -30,11 +30,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_bridges.hxx" -#if OSL_DEBUG_LEVEL == 0 -#undef NDEBUG -#define NDEBUG -#endif -#include #include #include #include @@ -598,7 +593,7 @@ void testException( const Reference < XCallMe > &r ) { try { r->call( OUString( RTL_CONSTASCII_USTRINGPARAM("dummy")) , -1 ); - assert( ! "no exception flown !" ); + OSL_ASSERT( ! "no exception flown !" ); } catch( TestBridgeException & e ) { @@ -606,11 +601,11 @@ void testException( const Reference < XCallMe > &r ) } catch( Exception & e ) { - assert( ! "only base class of exception could be catched!" ); + OSL_ASSERT( ! "only base class of exception could be catched!" ); } catch(...) { - assert(! "wrong unknown exception !" ); + OSL_ASSERT(! "wrong unknown exception !" ); } } diff --git a/bridges/test/testoffice.cxx b/bridges/test/testoffice.cxx index bae00be6caaa..bf5b470d7185 100644 --- a/bridges/test/testoffice.cxx +++ b/bridges/test/testoffice.cxx @@ -30,10 +30,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_bridges.hxx" -#if OSL_DEBUG_LEVEL == 0 -#define NDEBUG -#endif -#include #include #include @@ -96,7 +92,7 @@ void testPipe( const Reference < XMultiServiceFactory > & rSmgr ) rSmgr->createInstance( OUString::createFromAscii( "com.sun.star.io.Pipe" ) ), UNO_QUERY ); - assert( rOut.is() ); + OSL_ASSERT( rOut.is() ); { Sequence < sal_Int8 > seq( 10 ); @@ -115,7 +111,7 @@ void testPipe( const Reference < XMultiServiceFactory > & rSmgr ) if( ! ( 42 == seq.getArray()[0] ) ) printf( "wrong element in sequence\n" ); -// assert( 0 ); +// OSL_ASSERT( 0 ); } } #include @@ -155,7 +151,7 @@ void testDocument( const Reference < XMultiServiceFactory > & rSmgr ) rSmgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop" ))), UNO_QUERY ); - assert( rLoader.is() ); + OSL_ASSERT( rLoader.is() ); sal_Char *urls[] = { "private:factory/swriter", diff --git a/bridges/test/testsameprocess.cxx b/bridges/test/testsameprocess.cxx index cf67d2484cb3..1cfc44078376 100644 --- a/bridges/test/testsameprocess.cxx +++ b/bridges/test/testsameprocess.cxx @@ -30,11 +30,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_bridges.hxx" -#if OSL_DEBUG_LEVEL == 0 -#undef NDEBUG -#define NDEBUG -#endif -#include #include #include @@ -201,7 +196,7 @@ int main( int argc, char *argv[] ) Reference < XBridge > rBridge = rFactory->getBridge( OUString( RTL_CONSTASCII_USTRINGPARAM("bla blub")) ); - assert( ! rBridge.is() ); + OSL_ASSERT( ! rBridge.is() ); } catch( Exception & ) diff --git a/cppuhelper/source/interfacecontainer.cxx b/cppuhelper/source/interfacecontainer.cxx index 88f25e192e49..cc5b7708f1d8 100644 --- a/cppuhelper/source/interfacecontainer.cxx +++ b/cppuhelper/source/interfacecontainer.cxx @@ -40,13 +40,6 @@ #include -#if OSL_DEBUG_LEVEL == 0 -# ifndef NDEBUG -# define NDEBUG -# endif -#endif -#include - #include diff --git a/cppuhelper/test/testidlclass.cxx b/cppuhelper/test/testidlclass.cxx index 8784f59d79e3..89b2d6411e77 100644 --- a/cppuhelper/test/testidlclass.cxx +++ b/cppuhelper/test/testidlclass.cxx @@ -30,11 +30,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_cppuhelper.hxx" -#if OSL_DEBUG_LEVEL == 0 -#undef NDEBUG -#define NDEBUG -#endif -#include #include @@ -65,18 +60,18 @@ void testidlclass( const Reference < XMultiServiceFactory > &rSMgr) (XServiceInfo * ) 0 ); - assert( r.is() ); + OSL_ASSERT( r.is() ); { // test the xidlclassprovider interface ! Reference< XIdlClassProvider > rProv( r , UNO_QUERY ); - assert( rProv.is() ); + OSL_ASSERT( rProv.is() ); { Sequence < Reference < XIdlClass > > seq = rProv->getIdlClasses(); // is always one - assert( seq.getLength() == 1 ); + OSL_ASSERT( seq.getLength() == 1 ); // test the weak reference rProv->getIdlClasses(); @@ -89,7 +84,7 @@ void testidlclass( const Reference < XMultiServiceFactory > &rSMgr) } - assert( r->getName() == sImplName ); + OSL_ASSERT( r->getName() == sImplName ); // test equals Reference < XIdlClass > r2 = @@ -101,18 +96,18 @@ void testidlclass( const Reference < XMultiServiceFactory > &rSMgr) (XServiceInfo * ) 0 ); // test for implementation name - assert( r2->equals( r ) ); + OSL_ASSERT( r2->equals( r ) ); Sequence < Reference < XIdlClass > > seqIdlClass = r->getInterfaces(); //TODO ! // one idl class for one interface // this test fails, if core reflection fails ! -// assert( 1 == seqIdlClass.getLength() ); +// OSL_ASSERT( 1 == seqIdlClass.getLength() ); // Reference < XIdlClass > rIdlInterface = seqIdlClass.getArray()[0]; // check for IdlClass interface returned by Core Reflection -// assert( rIdlInterface.is() ); +// OSL_ASSERT( rIdlInterface.is() ); diff --git a/cppuhelper/test/testproptyphlp.cxx b/cppuhelper/test/testproptyphlp.cxx index e798f86cab54..d3b17ed3e83a 100644 --- a/cppuhelper/test/testproptyphlp.cxx +++ b/cppuhelper/test/testproptyphlp.cxx @@ -34,12 +34,6 @@ #include -#if OSL_DEBUG_LEVEL == 0 -#undef NDEBUG -#define NDEBUG -#endif -#include - using namespace ::com::sun::star::uno; using namespace ::cppu; @@ -51,27 +45,27 @@ void testPropertyTypeHelper() sal_Int32 i; convertPropertyValue( i , a ); - assert( 25 == i ); + OSL_ASSERT( 25 == i ); sal_Int16 i16; convertPropertyValue( i16 , a ); - assert( 25 == i16 ); + OSL_ASSERT( 25 == i16 ); sal_Int8 i8; convertPropertyValue( i8 , a ); - assert( 25 == i8 ); + OSL_ASSERT( 25 == i8 ); sal_uInt32 i32; convertPropertyValue( i32 , a ); - assert( 25 == i32 ); + OSL_ASSERT( 25 == i32 ); double d; convertPropertyValue( d , a ); - assert( 25. == d ); + OSL_ASSERT( 25. == d ); float f; convertPropertyValue( f , a ); - assert( 25. == f ); + OSL_ASSERT( 25. == f ); ::com::sun::star::beans::Property prop; @@ -83,11 +77,11 @@ void testPropertyTypeHelper() ::com::sun::star::beans::Property prop2; convertPropertyValue( prop2 , a ); - assert( prop.Handle == prop2.Handle && prop.Name == prop2.Name && prop.Attributes == prop2.Attributes ); + OSL_ASSERT( prop.Handle == prop2.Handle && prop.Name == prop2.Name && prop.Attributes == prop2.Attributes ); ::rtl::OUString ow; a <<= prop.Name; convertPropertyValue( ow , a ); - assert( ow == prop.Name ); + OSL_ASSERT( ow == prop.Name ); } diff --git a/io/source/stm/omark.cxx b/io/source/stm/omark.cxx index 69ccf08fce6a..29d326170ff1 100644 --- a/io/source/stm/omark.cxx +++ b/io/source/stm/omark.cxx @@ -49,12 +49,6 @@ #include #include -#if OSL_DEBUG_LEVEL == 0 -# ifndef NDEBUG -# define NDEBUG -# endif -#endif -#include #include @@ -632,7 +626,7 @@ sal_Int32 OMarkableInputStream::readBytes(Sequence< sal_Int8 >& aData, sal_Int32 sal_Int32 nToRead = nBytesToRead - ( m_pBuffer->getSize() - m_nCurrentPos ); nRead = m_input->readBytes( aData , nToRead ); - assert( aData.getLength() == nRead ); + OSL_ASSERT( aData.getLength() == nRead ); try { @@ -650,7 +644,7 @@ sal_Int32 OMarkableInputStream::readBytes(Sequence< sal_Int8 >& aData, sal_Int32 } } - assert( m_pBuffer->getSize() - m_nCurrentPos >= nBytesToRead ); + OSL_ASSERT( m_pBuffer->getSize() - m_nCurrentPos >= nBytesToRead ); m_pBuffer->readAt( m_nCurrentPos , aData , nBytesToRead ); diff --git a/io/test/stm/datatest.cxx b/io/test/stm/datatest.cxx index 3de10d5fe63e..b7515b3c5417 100644 --- a/io/test/stm/datatest.cxx +++ b/io/test/stm/datatest.cxx @@ -55,10 +55,6 @@ #include #include -#if OSL_DEBUG_LEVEL == 0 -#define NDEBUG -#endif -#include #include using namespace ::rtl; @@ -209,13 +205,13 @@ sal_Int32 ODataStreamTest::test( rSource = Reference< XActiveDataSource > ( x, UNO_QUERY ); } - assert( rPipeInput.is() ); - assert( rPipeOutput.is() ); + OSL_ASSERT( rPipeInput.is() ); + OSL_ASSERT( rPipeOutput.is() ); rSink->setInputStream( rPipeInput ); rSource->setOutputStream( rPipeOutput ); - assert( rSink->getInputStream().is() ); - assert( rSource->getOutputStream().is() ); + OSL_ASSERT( rSink->getInputStream().is() ); + OSL_ASSERT( rSource->getOutputStream().is() ); if( 1 == hTestHandle ) { testSimple( rInput , rOutput ); @@ -778,10 +774,10 @@ sal_Int32 OObjectStreamTest::test( const OUString& TestName, Reference markableOutput( x , UNO_QUERY ); Reference markableSource( x , UNO_QUERY ); - assert( markableInput.is() ); - assert( markableOutput.is() ); - assert( markableSink.is() ); - assert( markableSource.is() ); + OSL_ASSERT( markableInput.is() ); + OSL_ASSERT( markableOutput.is() ); + OSL_ASSERT( markableSink.is() ); + OSL_ASSERT( markableSource.is() ); markableSink->setInputStream( rPipeInput ); markableSource->setOutputStream( rPipeOutput ); @@ -799,14 +795,14 @@ sal_Int32 OObjectStreamTest::test( const OUString& TestName, rSource = Reference ( x, UNO_QUERY ); } - assert( rPipeInput.is() ); - assert( rPipeOutput.is() ); + OSL_ASSERT( rPipeInput.is() ); + OSL_ASSERT( rPipeOutput.is() ); rSink->setInputStream( markableInput ); rSource->setOutputStream( markableOutput ); - assert( rSink->getInputStream().is() ); - assert( rSource->getOutputStream().is() ); + OSL_ASSERT( rSink->getInputStream().is() ); + OSL_ASSERT( rSource->getOutputStream().is() ); if( 1 + DATASTREAM_TEST_MAX_HANDLE == hTestHandle ) { testObject( rOutput , rInput); diff --git a/io/test/stm/marktest.cxx b/io/test/stm/marktest.cxx index 88d52a09c891..20e4015ffa1f 100644 --- a/io/test/stm/marktest.cxx +++ b/io/test/stm/marktest.cxx @@ -46,12 +46,6 @@ #include #include -#if OSL_DEBUG_LEVEL == 0 -#define NDEBUG -#endif -#include -#include - using namespace ::rtl; using namespace ::osl; using namespace ::cppu; @@ -159,8 +153,8 @@ sal_Int32 OMarkableOutputStreamTest::test( Reference< XOutputStream > rOutput( TestObject , UNO_QUERY ); - assert( rPipeInput.is() ); - assert( rOutput.is() ); + OSL_ASSERT( rPipeInput.is() ); + OSL_ASSERT( rOutput.is() ); if( 1 == hTestHandle ) { // checks usual streaming testSimple( rOutput , rPipeInput ); @@ -526,8 +520,8 @@ sal_Int32 OMarkableInputStreamTest::test( Reference < XInputStream > rInput( TestObject , UNO_QUERY ); - assert( rPipeOutput.is() ); - assert( rInput.is() ); + OSL_ASSERT( rPipeOutput.is() ); + OSL_ASSERT( rInput.is() ); if( 1 == hTestHandle ) { // checks usual streaming testSimple( rPipeOutput , rInput ); diff --git a/sal/osl/w32/dllentry.c b/sal/osl/w32/dllentry.c index 11928a3b6458..ac47b1ac6050 100644 --- a/sal/osl/w32/dllentry.c +++ b/sal/osl/w32/dllentry.c @@ -255,7 +255,7 @@ void do_cleanup( void ) */ -#ifdef PRODUCT +#ifndef DBG_UTIL __try #endif { @@ -267,7 +267,7 @@ void do_cleanup( void ) rtl_cache_fini(); rtl_arena_fini(); } -#ifdef PRODUCT +#ifndef DBG_UTIL __except( EXCEPTION_EXECUTE_HANDLER ) { } diff --git a/xml2cmp/source/xcd/xmlelem.cxx b/xml2cmp/source/xcd/xmlelem.cxx index 4b642e1d30cc..c111c927c90f 100644 --- a/xml2cmp/source/xcd/xmlelem.cxx +++ b/xml2cmp/source/xcd/xmlelem.cxx @@ -36,15 +36,6 @@ #include #include -#if OSL_DEBUG_LEVEL == 0 -# ifndef NDEBUG -# define NDEBUG -# endif -#endif -#include - - - XmlElement::XmlElement( const char * i_sName ) : sName(i_sName) { @@ -160,7 +151,7 @@ ListElement::Write2Html( HtmlCreator & io_rHC ) const XmlElement * ListElement::Create_and_Add_NewElement() { - assert(fCreateNewElement != 0); + OSL_ASSERT(fCreateNewElement != 0); XmlElement * pNew = (*fCreateNewElement)(Name()); Children().push_back( pNew ); return pNew; From 6d8addd659110282cac4217c7dc47cecbc4bcc7f Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 10 Jul 2009 16:31:49 +0200 Subject: [PATCH 10/56] #i103452#: remove obsolete PRODUCT_FULL and HDEFS --- xml2cmp/source/xcd/xmlelem.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/xml2cmp/source/xcd/xmlelem.cxx b/xml2cmp/source/xcd/xmlelem.cxx index c111c927c90f..aa80459ccead 100644 --- a/xml2cmp/source/xcd/xmlelem.cxx +++ b/xml2cmp/source/xcd/xmlelem.cxx @@ -151,7 +151,6 @@ ListElement::Write2Html( HtmlCreator & io_rHC ) const XmlElement * ListElement::Create_and_Add_NewElement() { - OSL_ASSERT(fCreateNewElement != 0); XmlElement * pNew = (*fCreateNewElement)(Name()); Children().push_back( pNew ); return pNew; From 0fdd247dfb2bf4a4202786b9471d81863496cdc8 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 13 Jul 2009 10:59:09 +0200 Subject: [PATCH 11/56] #i103496#: remove superfluous dependency on tools --- cli_ure/prj/build.lst | 2 +- cli_ure/source/native/path.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli_ure/prj/build.lst b/cli_ure/prj/build.lst index 007a01aec93f..609550e8dd42 100644 --- a/cli_ure/prj/build.lst +++ b/cli_ure/prj/build.lst @@ -1,4 +1,4 @@ -ure cli_ure : cppu cppuhelper sal codemaker stoc udkapi tools NULL +ure cli_ure : cppu cppuhelper sal codemaker stoc udkapi NULL ure cli_ure usr1 - all ure_mkout NULL ure cli_ure\inc nmake - all ure_inc NULL ure cli_ure\version nmake - all ure_source_version ure_inc NULL diff --git a/cli_ure/source/native/path.cxx b/cli_ure/source/native/path.cxx index 075a3cdb75bd..9ef17010b0d2 100644 --- a/cli_ure/source/native/path.cxx +++ b/cli_ure/source/native/path.cxx @@ -38,7 +38,7 @@ #include #include "sal/types.h" -#include "tools/pathutils.hxx" +//#include "tools/pathutils.hxx" namespace cli_ure { From 475bd0f922e05d3bea003871d65e52b3aaef5678 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 13 Jul 2009 16:17:28 +0200 Subject: [PATCH 12/56] #i103496#: new top level module for ure --- ure_top/prj/build.lst | 1 + 1 file changed, 1 insertion(+) create mode 100644 ure_top/prj/build.lst diff --git a/ure_top/prj/build.lst b/ure_top/prj/build.lst new file mode 100644 index 000000000000..a552106b59f7 --- /dev/null +++ b/ure_top/prj/build.lst @@ -0,0 +1 @@ +up ure_pack :: ure bridges cli_ure cppu cppuhelper cpputools io javaunohelper jurt jvmaccess jvmfwk libxml2 readlicense_oo registry remotebridges ridljar sal salhelper stlport stoc store udkapi ure From 13b50a6e292efad6ae09f8ad61d08f6ab15f2888 Mon Sep 17 00:00:00 2001 From: Release Engineers Date: Tue, 21 Jul 2009 13:29:33 +0000 Subject: [PATCH 13/56] Create DEV300_m53 milestone tag from trunk@274201 From 5518e93f0d8c739938783054082eeda4c1c0d06b Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 30 Jul 2009 09:37:08 +0200 Subject: [PATCH 14/56] more dependencies fixed --- cli_ure/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli_ure/prj/build.lst b/cli_ure/prj/build.lst index 609550e8dd42..268240c4597b 100644 --- a/cli_ure/prj/build.lst +++ b/cli_ure/prj/build.lst @@ -1,4 +1,4 @@ -ure cli_ure : cppu cppuhelper sal codemaker stoc udkapi NULL +ure cli_ure : cppu cppuhelper sal codemaker stoc udkapi bridges NULL ure cli_ure usr1 - all ure_mkout NULL ure cli_ure\inc nmake - all ure_inc NULL ure cli_ure\version nmake - all ure_source_version ure_inc NULL From a9912838a6e361e2564f4ef30a5b0f619641dac2 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 10 Aug 2009 15:10:32 +0000 Subject: [PATCH 15/56] #i96402# Added DuplexMode constants --- offapi/com/sun/star/view/DuplexMode.idl | 69 +++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 offapi/com/sun/star/view/DuplexMode.idl diff --git a/offapi/com/sun/star/view/DuplexMode.idl b/offapi/com/sun/star/view/DuplexMode.idl new file mode 100644 index 000000000000..47877a8ad960 --- /dev/null +++ b/offapi/com/sun/star/view/DuplexMode.idl @@ -0,0 +1,69 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: PaperFormat.idl,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_view_DuplexMode_idl__ +#define __com_sun_star_view_DuplexMode_idl__ + + +//============================================================================= + +module com { module sun { module star { module view { + +//============================================================================= + +/** These constants specify available duplex modes + */ +constants DuplexMode +{ + //------------------------------------------------------------------------- + /** specifies an unknown duplex mode. + */ + const short UNKNOWN = 0; + + //------------------------------------------------------------------------- + /** specifies that there is no duplex mode enabled + */ + const short OFF = 1; + + //------------------------------------------------------------------------- + /** specifies a long edge duplex mode + */ + const short LONGEDGE = 2; + + //------------------------------------------------------------------------- + /** specifies the paper format as A4. + */ + const short SHORTEDGE = 3; +}; + +//============================================================================= + +}; }; }; }; + +#endif From 216a877272828f919996baf828d7669319b70798 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 10 Aug 2009 15:11:12 +0000 Subject: [PATCH 16/56] #i96402# Added DuplexMode constants --- offapi/com/sun/star/view/DuplexMode.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/offapi/com/sun/star/view/DuplexMode.idl b/offapi/com/sun/star/view/DuplexMode.idl index 47877a8ad960..6d5d84ff4abc 100644 --- a/offapi/com/sun/star/view/DuplexMode.idl +++ b/offapi/com/sun/star/view/DuplexMode.idl @@ -57,7 +57,7 @@ constants DuplexMode const short LONGEDGE = 2; //------------------------------------------------------------------------- - /** specifies the paper format as A4. + /** specifies a short edge duplex mode */ const short SHORTEDGE = 3; }; From 227e3afb7518e8844788094e2dd6426be6beaa59 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 10 Aug 2009 15:13:59 +0000 Subject: [PATCH 17/56] #i96402# Added DuplexMode option --- offapi/com/sun/star/view/PrintOptions.idl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/offapi/com/sun/star/view/PrintOptions.idl b/offapi/com/sun/star/view/PrintOptions.idl index 6bd67e0f52bd..df65229a0854 100644 --- a/offapi/com/sun/star/view/PrintOptions.idl +++ b/offapi/com/sun/star/view/PrintOptions.idl @@ -85,6 +85,13 @@ published service PrintOptions Otherwhise following actions (as e.g. closing the corresponding model) can fail. */ [optional, property] boolean Wait; + + //------------------------------------------------------------------------- + /** determines the duplex mode for the print job. + + @see DuplexMode for more information about supported values + */ + [optional, property] short DuplexMode; }; //============================================================================= From accedbb3caa51b0d9686dbdef56e17c9fcf4bd99 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 10 Aug 2009 15:14:18 +0000 Subject: [PATCH 18/56] #i96402# Added DuplexMode --- offapi/com/sun/star/view/makefile.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/offapi/com/sun/star/view/makefile.mk b/offapi/com/sun/star/view/makefile.mk index 04dbdc77abac..1db50d0ece89 100644 --- a/offapi/com/sun/star/view/makefile.mk +++ b/offapi/com/sun/star/view/makefile.mk @@ -73,7 +73,8 @@ IDLFILES=\ XPrintJobBroadcaster.idl\ XPrintJobListener.idl\ XMultiSelectionSupplier.idl\ - SelectionType.idl + SelectionType.idl\ + DuplexMode.idl # ------------------------------------------------------------------ From 219c155e515255b8b040d853b598fb1d6c009e8c Mon Sep 17 00:00:00 2001 From: Release Engineers Date: Fri, 14 Aug 2009 16:37:51 +0000 Subject: [PATCH 19/56] Create DEV300_m55 milestone tag from trunk@275000 From 1f5e32262c475444b09293e7e7b78141a1704696 Mon Sep 17 00:00:00 2001 From: Release Engineers Date: Fri, 4 Sep 2009 10:33:24 +0000 Subject: [PATCH 20/56] Create DEV300_m57 milestone tag from trunk@275796 From 6902c6cc538e1a40cbe8ab201163e49e72528397 Mon Sep 17 00:00:00 2001 From: Release Engineers Date: Thu, 10 Sep 2009 17:49:19 +0000 Subject: [PATCH 21/56] Create DEV300_m58 milestone tag from trunk@276042 From 6ea0304b451d06756bf24256fadbf379faf72265 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 14 Sep 2009 19:06:55 +0200 Subject: [PATCH 22/56] #i103496#: split cppunit in a pure external lib and a lib depending on sal -> testshl2 --- codemaker/test/cppumaker/makefile.mk | 4 +- .../cppumaker/test_codemaker_cppumaker.cxx | 2 +- cppu/qa/makefile.mk | 18 +++---- cppu/qa/test_any.cxx | 2 +- cppu/qa/test_recursion.cxx | 2 +- cppu/qa/test_reference.cxx | 2 +- cppu/qa/test_unotype.cxx | 2 +- .../qa/ifcontainer/cppu_ifcontainer.cxx | 2 +- cppuhelper/qa/ifcontainer/makefile.mk | 5 +- cppuhelper/qa/propertysetmixin/makefile.mk | 4 +- .../test_propertysetmixin.cxx | 2 +- cppuhelper/qa/unourl/cppu_unourl.cxx | 2 +- cppuhelper/qa/unourl/makefile.mk | 5 +- cppuhelper/qa/weak/makefile.mk | 6 +-- cppuhelper/qa/weak/test_weak.cxx | 2 +- sal/qa/ByteSequence/ByteSequence.cxx | 2 +- sal/qa/ByteSequence/makefile.mk | 17 ++----- sal/qa/ByteSequence/rtl_old_testbyteseq.cxx | 2 +- sal/qa/OStringBuffer/makefile.mk | 13 +---- sal/qa/OStringBuffer/rtl_OStringBuffer.cxx | 2 +- sal/qa/osl/condition/makefile.mk | 13 ++--- sal/qa/osl/condition/osl_Condition_Const.h | 2 +- sal/qa/osl/file/makefile.mk | 24 ++------- sal/qa/osl/file/osl_File.cxx | 2 +- sal/qa/osl/file/osl_old_test_file.cxx | 2 +- sal/qa/osl/file/test_cpy_wrt_file.cxx | 2 +- sal/qa/osl/module/makefile.mk | 13 ++--- sal/qa/osl/module/osl_Module_Const.h | 2 +- sal/qa/osl/module/osl_Module_DLL.cxx | 2 +- sal/qa/osl/mutex/makefile.mk | 12 ++--- sal/qa/osl/mutex/osl_Mutex_Const.h | 2 +- sal/qa/osl/pipe/makefile.mk | 15 ++---- sal/qa/osl/pipe/osl_Pipe.cxx | 2 +- sal/qa/osl/process/makefile.mk | 27 ++-------- sal/qa/osl/process/osl_Thread.cxx | 2 +- sal/qa/osl/process/osl_process.cxx | 2 +- sal/qa/osl/profile/makefile.mk | 8 ++- sal/qa/osl/profile/osl_old_testprofile.cxx | 2 +- sal/qa/osl/security/makefile.mk | 14 ++---- sal/qa/osl/security/osl_Security_Const.h | 2 +- sal/qa/osl/semaphore/makefile.mk | 13 ++--- sal/qa/osl/semaphore/osl_Semaphore_Const.h | 2 +- sal/qa/osl/socket/makefile.mk | 50 ++++++------------- sal/qa/osl/socket/osl_AcceptorSocket.cxx | 2 +- sal/qa/osl/socket/osl_ConnectorSocket.cxx | 2 +- sal/qa/osl/socket/osl_DatagramSocket.cxx | 2 +- sal/qa/osl/socket/osl_Socket.cxx | 2 +- sal/qa/osl/socket/osl_Socket2.cxx | 2 +- sal/qa/osl/socket/osl_SocketAddr.cxx | 2 +- sal/qa/osl/socket/osl_Socket_tests.cxx | 2 +- sal/qa/osl/socket/osl_StreamSocket.cxx | 2 +- sal/qa/osl/socket/sockethelper.cxx | 2 +- sal/qa/osl/thread/makefile.mk | 4 +- sal/qa/osl/thread/test_thread.cxx | 2 +- sal/qa/rtl/alloc/makefile.mk | 14 ++---- sal/qa/rtl/alloc/rtl_alloc.cxx | 2 +- sal/qa/rtl/bootstrap/makefile.mk | 10 ++-- sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx | 4 +- sal/qa/rtl/cipher/makefile.mk | 8 ++- sal/qa/rtl/cipher/rtl_cipher.cxx | 2 +- sal/qa/rtl/crc32/makefile.mk | 13 ++--- sal/qa/rtl/crc32/rtl_crc32.cxx | 2 +- sal/qa/rtl/digest/makefile.mk | 8 ++- sal/qa/rtl/digest/rtl_digest.cxx | 2 +- sal/qa/rtl/doublelock/makefile.mk | 8 ++- sal/qa/rtl/doublelock/rtl_doublelocking.cxx | 2 +- sal/qa/rtl/locale/makefile.mk | 8 ++- sal/qa/rtl/locale/rtl_locale.cxx | 2 +- sal/qa/rtl/logfile/makefile.mk | 6 +-- sal/qa/rtl/logfile/rtl_logfile.cxx | 2 +- sal/qa/rtl/math/makefile.mk | 25 +++------- sal/qa/rtl/math/rtl_math.cxx | 2 +- sal/qa/rtl/math/rtl_old_testint64.cxx | 2 +- sal/qa/rtl/ostring/makefile.mk | 16 ++---- sal/qa/rtl/ostring/rtl_OString2.cxx | 2 +- sal/qa/rtl/ostring/rtl_str.cxx | 2 +- sal/qa/rtl/ostring/rtl_string.cxx | 2 +- sal/qa/rtl/oustring/makefile.mk | 12 ++--- sal/qa/rtl/oustring/rtl_OUString2.cxx | 2 +- sal/qa/rtl/oustring/rtl_ustr.cxx | 2 +- sal/qa/rtl/oustringbuffer/makefile.mk | 8 ++- .../oustringbuffer/rtl_OUStringBuffer2.cxx | 2 +- sal/qa/rtl/process/makefile.mk | 12 ++--- sal/qa/rtl/process/rtl_Process.cxx | 2 +- sal/qa/rtl/random/makefile.mk | 8 ++- sal/qa/rtl/random/rtl_random.cxx | 2 +- sal/qa/rtl/strings/makefile.mk | 4 +- sal/qa/rtl/strings/test_oustring_compare.cxx | 2 +- sal/qa/rtl/strings/test_oustring_convert.cxx | 2 +- sal/qa/rtl/strings/test_oustring_endswith.cxx | 2 +- .../strings/test_oustring_noadditional.cxx | 2 +- .../rtl/strings/test_oustringbuffer_utf32.cxx | 2 +- sal/qa/rtl/textenc/makefile.mk | 10 ++-- sal/qa/rtl/textenc/rtl_tencinfo.cxx | 2 +- sal/qa/rtl/textenc/rtl_textcvt.cxx | 2 +- sal/qa/rtl/uri/makefile.mk | 10 ++-- sal/qa/rtl/uri/rtl_Uri.cxx | 2 +- sal/qa/rtl/uri/rtl_testuri.cxx | 2 +- sal/qa/rtl/uuid/makefile.mk | 8 ++- sal/qa/rtl/uuid/rtl_Uuid.cxx | 2 +- sal/qa/rtl_strings/makefile.mk | 45 +++++------------ sal/qa/rtl_strings/rtl_old_testostring.cxx | 2 +- sal/qa/rtl_strings/rtl_old_testowstring.cxx | 2 +- sal/qa/rtl_strings/rtl_old_teststrbuf.cxx | 2 +- sal/qa/sal/makefile.mk | 4 +- sal/qa/sal/test_types.cxx | 2 +- sal/qa/systools/makefile.mk | 9 ++-- sal/qa/systools/test_comtools.cxx | 2 +- sal/qa/testHelperFunctions/makefile.mk | 6 +-- .../testHelperFunctions.cxx | 2 +- .../testHelperFunctions2.cxx | 2 +- salhelper/qa/makefile.mk | 6 +-- salhelper/qa/test_api.cxx | 2 +- stoc/test/uriproc/makefile.mk | 4 +- stoc/test/uriproc/test_uriproc.cxx | 2 +- 115 files changed, 237 insertions(+), 436 deletions(-) diff --git a/codemaker/test/cppumaker/makefile.mk b/codemaker/test/cppumaker/makefile.mk index bab3dcbb30ea..1bc926dc0fe0 100644 --- a/codemaker/test/cppumaker/makefile.mk +++ b/codemaker/test/cppumaker/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -43,7 +43,7 @@ INCPRE += $(MISC)$/$(TARGET)$/inc SHL1TARGET = $(TARGET) SHL1OBJS = $(SLO)$/test_codemaker_cppumaker.obj -SHL1STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB) +SHL1STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB) $(TESTSHL2LIB) SHL1VERSIONMAP = version.map SHL1IMPLIB = i$(SHL1TARGET) DEF1NAME = $(SHL1TARGET) diff --git a/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx b/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx index 2f5c75fc1d92..9cd3dc70d3fd 100644 --- a/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx +++ b/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx @@ -369,7 +369,7 @@ #include "com/sun/star/uno/Any.hxx" #include "com/sun/star/uno/Type.hxx" #include "com/sun/star/uno/TypeClass.hpp" -#include "cppunit/simpleheader.hxx" +#include "testshl/simpleheader.hxx" #include "rtl/ustring.h" #include "rtl/ustring.hxx" diff --git a/cppu/qa/makefile.mk b/cppu/qa/makefile.mk index 4051dd6d82ec..8b720c832cf4 100644 --- a/cppu/qa/makefile.mk +++ b/cppu/qa/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -43,28 +43,28 @@ INCPRE += $(MISC)$/$(TARGET)$/inc SHL1TARGET = $(TARGET)_any SHL1OBJS = $(SLO)$/test_any.obj -SHL1STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB) +SHL1STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB) SHL1VERSIONMAP = version.map SHL1IMPLIB = i$(SHL1TARGET) DEF1NAME = $(SHL1TARGET) SHL2TARGET = $(TARGET)_unotype SHL2OBJS = $(SLO)$/test_unotype.obj -SHL2STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB) +SHL2STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB) SHL2VERSIONMAP = version.map SHL2IMPLIB = i$(SHL2TARGET) DEF2NAME = $(SHL2TARGET) SHL3TARGET = $(TARGET)_reference SHL3OBJS = $(SLO)$/test_reference.obj -SHL3STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB) +SHL3STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB) SHL3VERSIONMAP = version.map SHL3IMPLIB = i$(SHL3TARGET) DEF3NAME = $(SHL3TARGET) SHL4TARGET = $(TARGET)_recursion SHL4OBJS = $(SLO)$/test_recursion.obj -SHL4STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB) +SHL4STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB) SHL4VERSIONMAP = version.map SHL4IMPLIB = i$(SHL4TARGET) DEF4NAME = $(SHL4TARGET) @@ -92,7 +92,7 @@ $(MISC)$/$(TARGET)$/types.urd: types.idl $(IDLC) -O$(MISC)$/$(TARGET) -I$(SOLARIDLDIR) -cid -we $< test .PHONY: $(SHL1TARGETN) $(SHL2TARGETN) $(SHL3TARGETN) $(SHL4TARGETN) - testshl2 $(SHL1TARGETN) - testshl2 $(SHL2TARGETN) - testshl2 $(SHL3TARGETN) - testshl2 $(SHL4TARGETN) \ No newline at end of file + $(TESTSHL2) $(SHL1TARGETN) + $(TESTSHL2) $(SHL2TARGETN) + $(TESTSHL2) $(SHL3TARGETN) + $(TESTSHL2) $(SHL4TARGETN) diff --git a/cppu/qa/test_any.cxx b/cppu/qa/test_any.cxx index cad91661926f..785af529e51a 100644 --- a/cppu/qa/test_any.cxx +++ b/cppu/qa/test_any.cxx @@ -58,7 +58,7 @@ #include "com/sun/star/uno/Sequence.hxx" #include "com/sun/star/uno/Type.hxx" #include "com/sun/star/uno/XInterface.hpp" -#include "cppunit/simpleheader.hxx" +#include "testshl/simpleheader.hxx" #include "osl/diagnose.h" #include "osl/interlck.h" #include "rtl/string.h" diff --git a/cppu/qa/test_recursion.cxx b/cppu/qa/test_recursion.cxx index 6ae70c44d003..60853776662b 100644 --- a/cppu/qa/test_recursion.cxx +++ b/cppu/qa/test_recursion.cxx @@ -31,7 +31,7 @@ #include "precompiled_cppu.hxx" #include "sal/config.h" -#include "cppunit/simpleheader.hxx" +#include "testshl/simpleheader.hxx" #include "sal/types.h" #include "Rec.hpp" diff --git a/cppu/qa/test_reference.cxx b/cppu/qa/test_reference.cxx index afb12654a124..8bb793c655e4 100644 --- a/cppu/qa/test_reference.cxx +++ b/cppu/qa/test_reference.cxx @@ -35,7 +35,7 @@ #include "Interface1.hpp" -#include "cppunit/simpleheader.hxx" +#include "testshl/simpleheader.hxx" #include "rtl/ustring.hxx" #include "sal/types.h" diff --git a/cppu/qa/test_unotype.cxx b/cppu/qa/test_unotype.cxx index 0068dcedd463..ad457d516fa2 100644 --- a/cppu/qa/test_unotype.cxx +++ b/cppu/qa/test_unotype.cxx @@ -47,7 +47,7 @@ #include "com/sun/star/uno/XComponentContext.hpp" #include "com/sun/star/uno/XInterface.hpp" #include "cppu/unotype.hxx" -#include "cppunit/simpleheader.hxx" +#include "testshl/simpleheader.hxx" #include "rtl/ustring.h" #include "rtl/ustring.hxx" #include "sal/types.h" diff --git a/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx b/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx index ddbc3f7c6f82..cfcfebf246e6 100644 --- a/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx +++ b/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx @@ -28,7 +28,7 @@ * ************************************************************************/ -#include +#include #include "com/sun/star/lang/XEventListener.hpp" #include "cppuhelper/interfacecontainer.hxx" diff --git a/cppuhelper/qa/ifcontainer/makefile.mk b/cppuhelper/qa/ifcontainer/makefile.mk index dd6c13fea52c..624bc797a64b 100644 --- a/cppuhelper/qa/ifcontainer/makefile.mk +++ b/cppuhelper/qa/ifcontainer/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -41,7 +41,7 @@ ENABLE_EXCEPTIONS=TRUE # BEGIN ---------------------------------------------------------------- -# auto generated Target:joblist by codegen.pl +# auto generated Target:joblist by codegen.pl SHL1OBJS= \ $(SLO)$/cppu_ifcontainer.obj SHL1TARGET= cppu_ifcontainer @@ -49,6 +49,7 @@ SHL1STDLIBS=\ $(CPPUHELPERLIB) \ $(SALLIB) \ $(CPPULIB) \ + $(TESTSHL2LIB)\ $(CPPUNITLIB) SHL1IMPLIB= i$(SHL1TARGET) DEF1NAME =$(SHL1TARGET) diff --git a/cppuhelper/qa/propertysetmixin/makefile.mk b/cppuhelper/qa/propertysetmixin/makefile.mk index b081274d8e99..2ad56c05ff1c 100644 --- a/cppuhelper/qa/propertysetmixin/makefile.mk +++ b/cppuhelper/qa/propertysetmixin/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -54,7 +54,7 @@ INCPRE += -I$(MISC)$/$(TARGET)$/inc SHL1TARGET = $(TARGET) SHL1OBJS = $(SLO)$/test_propertysetmixin.obj -SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB) +SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB) $(TESTSHL2LIB) SHL1IMPLIB = i$(SHL1TARGET) DEF1NAME = $(SHL1TARGET) diff --git a/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx b/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx index 5336b60ae68a..ecb7220d110d 100644 --- a/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx +++ b/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx @@ -64,7 +64,7 @@ #include "com/sun/star/uno/XComponentContext.hpp" #include "cppuhelper/implbase1.hxx" #include "cppuhelper/servicefactory.hxx" -#include "cppunit/simpleheader.hxx" +#include "testshl/simpleheader.hxx" #include "osl/mutex.hxx" #include "osl/thread.h" #include "rtl/ref.hxx" diff --git a/cppuhelper/qa/unourl/cppu_unourl.cxx b/cppuhelper/qa/unourl/cppu_unourl.cxx index 21af4b8d1364..f80388d5d122 100644 --- a/cppuhelper/qa/unourl/cppu_unourl.cxx +++ b/cppuhelper/qa/unourl/cppu_unourl.cxx @@ -28,7 +28,7 @@ * ************************************************************************/ -#include +#include #include "cppuhelper/unourl.hxx" #include "rtl/malformeduriexception.hxx" diff --git a/cppuhelper/qa/unourl/makefile.mk b/cppuhelper/qa/unourl/makefile.mk index a611b135c7e9..a999532c5b4a 100644 --- a/cppuhelper/qa/unourl/makefile.mk +++ b/cppuhelper/qa/unourl/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -41,7 +41,7 @@ ENABLE_EXCEPTIONS=TRUE # BEGIN ---------------------------------------------------------------- -# auto generated Target:joblist by codegen.pl +# auto generated Target:joblist by codegen.pl SHL1OBJS= \ $(SLO)$/cppu_unourl.obj SHL1TARGET= cppu_unourl @@ -49,6 +49,7 @@ SHL1STDLIBS=\ $(CPPUHELPERLIB) \ $(SALLIB) \ $(CPPULIB) \ + $(TESTSHL2LIB)\ $(CPPUNITLIB) SHL1IMPLIB= i$(SHL1TARGET) DEF1NAME =$(SHL1TARGET) diff --git a/cppuhelper/qa/weak/makefile.mk b/cppuhelper/qa/weak/makefile.mk index 95f1697ef7be..bb0072b4d0f3 100644 --- a/cppuhelper/qa/weak/makefile.mk +++ b/cppuhelper/qa/weak/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -41,7 +41,7 @@ DLLPRE = # no leading "lib" on .so files SHL1TARGET = $(TARGET) SHL1OBJS = $(SLO)$/test_weak.obj -SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB) +SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB) $(TESTSHL2LIB) SHL1VERSIONMAP = version.map SHL1IMPLIB = i$(SHL1TARGET) DEF1NAME = $(SHL1TARGET) @@ -53,4 +53,4 @@ SLOFILES = $(SHL1OBJS) ALLTAR: test test .PHONY: $(SHL1TARGETN) - testshl2 $(SHL1TARGETN) + $(TESTSHL2) $(SHL1TARGETN) diff --git a/cppuhelper/qa/weak/test_weak.cxx b/cppuhelper/qa/weak/test_weak.cxx index 98bbb6527276..0cf128d519d6 100644 --- a/cppuhelper/qa/weak/test_weak.cxx +++ b/cppuhelper/qa/weak/test_weak.cxx @@ -41,7 +41,7 @@ #include "com/sun/star/uno/XWeak.hpp" #include "cppuhelper/implbase1.hxx" #include "cppuhelper/weak.hxx" -#include "cppunit/simpleheader.hxx" +#include "testshl/simpleheader.hxx" #include "rtl/ref.hxx" #include "sal/types.h" diff --git a/sal/qa/ByteSequence/ByteSequence.cxx b/sal/qa/ByteSequence/ByteSequence.cxx index 16283a48da92..f1105298deaf 100644 --- a/sal/qa/ByteSequence/ByteSequence.cxx +++ b/sal/qa/ByteSequence/ByteSequence.cxx @@ -36,7 +36,7 @@ #include -#include +#include using namespace rtl; diff --git a/sal/qa/ByteSequence/makefile.mk b/sal/qa/ByteSequence/makefile.mk index a2ecbd5ccef1..0f1b88ac6e6a 100644 --- a/sal/qa/ByteSequence/makefile.mk +++ b/sal/qa/ByteSequence/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -47,17 +47,10 @@ CXXFLAGS+= $(LFS_CFLAGS) #----------------------------------- OStringBuffer ----------------------------------- SHL1OBJS= \ - $(SLO)$/ByteSequence.obj + $(SLO)$/ByteSequence.obj SHL1TARGET= rtl_ByteSequence -SHL1STDLIBS=\ - $(SALLIB) -.IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2" -SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib -.ENDIF -.IF "$(GUI)" == "UNX" -SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a -.ENDIF +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) # SHL1DEF= $(MISC)$/$(SHL1TARGET).def @@ -70,9 +63,7 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map SHL2OBJS= \ $(SLO)$/rtl_old_testbyteseq.obj SHL2TARGET= rtl_old_testbyteseq -SHL2STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL2IMPLIB= i$(SHL2TARGET) diff --git a/sal/qa/ByteSequence/rtl_old_testbyteseq.cxx b/sal/qa/ByteSequence/rtl_old_testbyteseq.cxx index 1c49a316c537..2cea6fa3a878 100644 --- a/sal/qa/ByteSequence/rtl_old_testbyteseq.cxx +++ b/sal/qa/ByteSequence/rtl_old_testbyteseq.cxx @@ -42,7 +42,7 @@ using namespace ::rtl; -#include +#include namespace rtl_testbyteseq diff --git a/sal/qa/OStringBuffer/makefile.mk b/sal/qa/OStringBuffer/makefile.mk index be0f891cf8fc..d20c011a552e 100644 --- a/sal/qa/OStringBuffer/makefile.mk +++ b/sal/qa/OStringBuffer/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -56,16 +56,7 @@ SHL1OBJS= \ $(SLO)$/rtl_String_Utils.obj SHL1TARGET= rtl_OStringBuffer -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) - -# .IF "$(GUI)" == "WNT" -# SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib -# .ENDIF -# .IF "$(GUI)" == "UNX" -# SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a -# .ENDIF +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) # SHL1DEF= $(MISC)$/$(SHL1TARGET).def diff --git a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx index df97eccf751e..2b3bbfd6caa3 100644 --- a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx +++ b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx @@ -38,7 +38,7 @@ #include -#include +#include using namespace rtl; diff --git a/sal/qa/osl/condition/makefile.mk b/sal/qa/osl/condition/makefile.mk index fd58c9e633a3..586908e93032 100644 --- a/sal/qa/osl/condition/makefile.mk +++ b/sal/qa/osl/condition/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -44,19 +44,12 @@ CFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS) # BEGIN ---------------------------------------------------------------- -# auto generated Target:Condition by codegen.pl +# auto generated Target:Condition by codegen.pl SHL1OBJS= \ $(SLO)$/osl_Condition.obj SHL1TARGET= osl_Condition -SHL1STDLIBS=\ - $(SALLIB) -.IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2" -SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib -.ENDIF -.IF "$(GUI)" == "UNX" -SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a -.ENDIF +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) diff --git a/sal/qa/osl/condition/osl_Condition_Const.h b/sal/qa/osl/condition/osl_Condition_Const.h index c04261176ee6..608bd38e3a64 100644 --- a/sal/qa/osl/condition/osl_Condition_Const.h +++ b/sal/qa/osl/condition/osl_Condition_Const.h @@ -59,7 +59,7 @@ #include #endif -#include +#include #define OSLTEST_DECLARE_USTRING( str_name, str_value ) \ ::rtl::OUString a##str_name = rtl::OUString::createFromAscii( str_value ) diff --git a/sal/qa/osl/file/makefile.mk b/sal/qa/osl/file/makefile.mk index 7c6d1232c1a0..0d83a06b7124 100644 --- a/sal/qa/osl/file/makefile.mk +++ b/sal/qa/osl/file/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -47,15 +47,7 @@ CXXFLAGS+= $(LFS_CFLAGS) SHL1OBJS= \ $(SLO)$/osl_File.obj SHL1TARGET= osl_File -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) -# .IF "$(GUI)" == "WNT" -# SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib -# .ENDIF -# .IF "$(GUI)" == "UNX" -# SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a -# .ENDIF +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) @@ -66,13 +58,7 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map SHL2OBJS=$(SLO)$/test_cpy_wrt_file.obj SHL2TARGET=tcwf -SHL2STDLIBS=$(SALLIB) -.IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2" -SHL2STDLIBS+=$(SOLARLIBDIR)$/cppunit.lib -.ENDIF -.IF "$(GUI)" == "UNX" -SHL2STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a -.ENDIF +SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL2IMPLIB=i$(SHL2TARGET) SHL2DEF=$(MISC)$/$(SHL2TARGET).def SHL2VERSIONMAP = $(PRJ)$/qa$/export.map @@ -85,9 +71,7 @@ DEF2NAME =$(SHL2TARGET) SHL3OBJS= \ $(SLO)$/osl_old_test_file.obj SHL3TARGET= osl_old_test_file -SHL3STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL3STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL3IMPLIB= i$(SHL3TARGET) diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index 3a44c565d162..a1cb3fa54e9e 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -44,7 +44,7 @@ #include #include -#include +#include // #ifdef WNT // # define UNICODE diff --git a/sal/qa/osl/file/osl_old_test_file.cxx b/sal/qa/osl/file/osl_old_test_file.cxx index 18be1d38e40c..64258b8e9006 100644 --- a/sal/qa/osl/file/osl_old_test_file.cxx +++ b/sal/qa/osl/file/osl_old_test_file.cxx @@ -51,7 +51,7 @@ #define TEST_VOLUME "c:/" #endif -#include +#include namespace osl_test_file { diff --git a/sal/qa/osl/file/test_cpy_wrt_file.cxx b/sal/qa/osl/file/test_cpy_wrt_file.cxx index 6c4986f485b3..05910ea3ddd7 100755 --- a/sal/qa/osl/file/test_cpy_wrt_file.cxx +++ b/sal/qa/osl/file/test_cpy_wrt_file.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sal.hxx" -#include +#include #include #include #include diff --git a/sal/qa/osl/module/makefile.mk b/sal/qa/osl/module/makefile.mk index d3500d267020..40f597bdbbc7 100644 --- a/sal/qa/osl/module/makefile.mk +++ b/sal/qa/osl/module/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -48,7 +48,7 @@ CXXFLAGS+= $(LFS_CFLAGS) # --- test dll ------------------------------------------------------ SHL1TARGET = Module_DLL SHL1OBJS = $(SLO)$/osl_Module_DLL.obj -SHL1STDLIBS = $(SALLIB) +SHL1STDLIBS = $(SALLIB) SHL1IMPLIB = i$(SHL1TARGET) SHL1DEF = $(MISC)$/$(SHL1TARGET).def DEF1NAME = $(SHL1TARGET) @@ -59,21 +59,16 @@ SHL1VERSIONMAP = export_dll.map SHL2OBJS= $(SLO)$/osl_Module.obj SHL2TARGET= osl_Module -SHL2STDLIBS= $(SALLIB) +SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) .IF "$(GUI)" == "WNT" -SHL2STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib SHL2STDLIBS+=i$(SHL2TARGET).lib .ENDIF -.IF "$(GUI)" == "OS2" -SHL2STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib -.ENDIF .IF "$(GUI)" == "UNX" -SHL2STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a APP3STDLIBS+=-l$(SHL2TARGET) .ENDIF -SHL2DEPN= $(SHL1OBJS) +SHL2DEPN= $(SHL1OBJS) SHL2IMPLIB= i$(SHL2TARGET) SHL2DEF= $(MISC)$/$(SHL2TARGET).def diff --git a/sal/qa/osl/module/osl_Module_Const.h b/sal/qa/osl/module/osl_Module_Const.h index beeb4a800a11..ad954b5cb4ad 100644 --- a/sal/qa/osl/module/osl_Module_Const.h +++ b/sal/qa/osl/module/osl_Module_Const.h @@ -37,7 +37,7 @@ #include #include -#include +#include #if ( defined UNX ) || ( defined OS2 ) //Unix # include diff --git a/sal/qa/osl/module/osl_Module_DLL.cxx b/sal/qa/osl/module/osl_Module_DLL.cxx index ed7874eb11b5..46610f35f22c 100644 --- a/sal/qa/osl/module/osl_Module_DLL.cxx +++ b/sal/qa/osl/module/osl_Module_DLL.cxx @@ -33,7 +33,7 @@ #include #include -#include +#include extern "C" sal_Bool SAL_CALL firstfunc( sal_Bool bRes ) { diff --git a/sal/qa/osl/mutex/makefile.mk b/sal/qa/osl/mutex/makefile.mk index 44c5b6b46f7f..7c8cfeb39037 100755 --- a/sal/qa/osl/mutex/makefile.mk +++ b/sal/qa/osl/mutex/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -44,22 +44,16 @@ CFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS) # BEGIN ---------------------------------------------------------------- -# auto generated Target:Socket by codegen.pl +# auto generated Target:Socket by codegen.pl SHL1OBJS= \ $(SLO)$/osl_Mutex.obj SHL1TARGET= osl_Mutex -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) .IF "$(GUI)" == "WNT" SHL1STDLIBS += $(WS2_32LIB) .ENDIF -.IF "$(GUI)" == "OS2" -SHL1STDLIBS += $(SOLARLIBDIR)$/cppunit.lib -.ENDIF - .IF "$(GUI)" == "UNX" SHL1STDLIBS += -ldl -lnsl .ENDIF diff --git a/sal/qa/osl/mutex/osl_Mutex_Const.h b/sal/qa/osl/mutex/osl_Mutex_Const.h index 789b9e91c007..a13f40ab9605 100755 --- a/sal/qa/osl/mutex/osl_Mutex_Const.h +++ b/sal/qa/osl/mutex/osl_Mutex_Const.h @@ -49,7 +49,7 @@ #endif #include -#include +#include #ifdef UNX #include diff --git a/sal/qa/osl/pipe/makefile.mk b/sal/qa/osl/pipe/makefile.mk index 636bdde7de82..3d0df14bbd69 100644 --- a/sal/qa/osl/pipe/makefile.mk +++ b/sal/qa/osl/pipe/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -44,21 +44,12 @@ CFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS) # BEGIN ---------------------------------------------------------------- -# auto generated Target:Pipe by codegen.pl +# auto generated Target:Pipe by codegen.pl SHL1OBJS= \ $(SLO)$/osl_Pipe.obj SHL1TARGET= osl_Pipe -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) - -#.IF "$(GUI)" == "WNT" -#SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib -#.ENDIF -#.IF "$(GUI)" == "UNX" -#SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a -#.ENDIF +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) # SHL1DEF= $(MISC)$/$(SHL1TARGET).def diff --git a/sal/qa/osl/pipe/osl_Pipe.cxx b/sal/qa/osl/pipe/osl_Pipe.cxx index 4f0da4ea686e..c2b2ae740527 100644 --- a/sal/qa/osl/pipe/osl_Pipe.cxx +++ b/sal/qa/osl/pipe/osl_Pipe.cxx @@ -35,7 +35,7 @@ // include files //------------------------------------------------------------------------ -#include +#include #include #include diff --git a/sal/qa/osl/process/makefile.mk b/sal/qa/osl/process/makefile.mk index 17f6ab46bd5a..32e97f3c162d 100644 --- a/sal/qa/osl/process/makefile.mk +++ b/sal/qa/osl/process/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -45,7 +45,7 @@ CFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS) # BEGIN ---------------------------------------------------------------- -# auto generated Target:testjob by codegen.pl +# auto generated Target:testjob by codegen.pl .IF "$(GUI)" == "WNT" CFLAGS+=/Ob1 @@ -55,17 +55,7 @@ SHL1OBJS= \ $(SLO)$/osl_Thread.obj SHL1TARGET= osl_Thread -SHL1STDLIBS=\ - $(SALLIB) -.IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2" -SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib -.ENDIF -.IF "$(GUI)" == "UNX" -SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a -# .IF "$(OS)" == "SOLARIS" -# SHL1STDLIBS += -lrt -laio -# .ENDIF -.ENDIF +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) @@ -82,14 +72,7 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map SHL2OBJS=$(SLO)$/osl_process.obj SHL2TARGET=osl_process -SHL2STDLIBS=$(SALLIB) - -.IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2" -SHL2STDLIBS+=$(SOLARLIBDIR)$/cppunit.lib -.ENDIF -.IF "$(GUI)" == "UNX" -SHL2STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a -.ENDIF +SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL2IMPLIB=i$(SHL2TARGET) SHL2DEF=$(MISC)$/$(SHL2TARGET).def @@ -98,7 +81,7 @@ DEF2EXPORTFILE=export.exp # END ------------------------------------------------------------------ -OBJ3FILES=$(OBJ)$/osl_process_child.obj +OBJ3FILES=$(OBJ)$/osl_process_child.obj APP3TARGET=osl_process_child APP3OBJS=$(OBJ3FILES) diff --git a/sal/qa/osl/process/osl_Thread.cxx b/sal/qa/osl/process/osl_Thread.cxx index 9f666acc9659..88f796b6728c 100644 --- a/sal/qa/osl/process/osl_Thread.cxx +++ b/sal/qa/osl/process/osl_Thread.cxx @@ -52,7 +52,7 @@ #endif #include -#include +#include using namespace osl; using namespace rtl; diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx index 7fb794925ed2..a0fe5182daa1 100644 --- a/sal/qa/osl/process/osl_process.cxx +++ b/sal/qa/osl/process/osl_process.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sal.hxx" -#include +#include #include #include #include diff --git a/sal/qa/osl/profile/makefile.mk b/sal/qa/osl/profile/makefile.mk index d685655feb86..482bc69276a2 100644 --- a/sal/qa/osl/profile/makefile.mk +++ b/sal/qa/osl/profile/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -48,9 +48,7 @@ SHL1OBJS= \ $(SLO)$/osl_old_testprofile.obj SHL1TARGET= osl_old_testprofile -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) DEF1NAME =$(SHL1TARGET) @@ -61,7 +59,7 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map #------------------------------- All object files ------------------------------- # do this here, so we get right dependencies SLOFILES=\ - $(SHL1OBJS) + $(SHL1OBJS) # --- Targets ------------------------------------------------------ diff --git a/sal/qa/osl/profile/osl_old_testprofile.cxx b/sal/qa/osl/profile/osl_old_testprofile.cxx index d5a6b3d92468..27e4cbe6b35b 100644 --- a/sal/qa/osl/profile/osl_old_testprofile.cxx +++ b/sal/qa/osl/profile/osl_old_testprofile.cxx @@ -40,7 +40,7 @@ #include #include -#include +#include //================================================================================================== // ----------------------------------------------------------------------------- diff --git a/sal/qa/osl/security/makefile.mk b/sal/qa/osl/security/makefile.mk index 5896f1b6108d..6bcc6fc9f6d3 100755 --- a/sal/qa/osl/security/makefile.mk +++ b/sal/qa/osl/security/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -44,23 +44,15 @@ CFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS) # BEGIN ---------------------------------------------------------------- -# auto generated Target:Security by codegen.pl +# auto generated Target:Security by codegen.pl SHL1OBJS= \ $(SLO)$/osl_Security.obj SHL1TARGET= osl_Security -SHL1STDLIBS=\ - $(SALLIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) .IF "$(GUI)" == "WNT" -SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib SHL1STDLIBS+= $(ADVAPI32LIB) .ENDIF -.IF "$(GUI)" == "OS2" -SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib -.ENDIF -.IF "$(GUI)" == "UNX" -SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a -.ENDIF SHL1IMPLIB= i$(SHL1TARGET) SHL1DEF= $(MISC)$/$(SHL1TARGET).def diff --git a/sal/qa/osl/security/osl_Security_Const.h b/sal/qa/osl/security/osl_Security_Const.h index 428d6bb30fc6..ca08e3025b38 100755 --- a/sal/qa/osl/security/osl_Security_Const.h +++ b/sal/qa/osl/security/osl_Security_Const.h @@ -57,7 +57,7 @@ #include #endif -#include +#include // LLA: #include diff --git a/sal/qa/osl/semaphore/makefile.mk b/sal/qa/osl/semaphore/makefile.mk index d5ad5e532626..a8918dcfb12b 100644 --- a/sal/qa/osl/semaphore/makefile.mk +++ b/sal/qa/osl/semaphore/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -44,19 +44,12 @@ CFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS) # BEGIN ---------------------------------------------------------------- -# auto generated Target:Semaphore by codegen.pl +# auto generated Target:Semaphore by codegen.pl SHL1OBJS= \ $(SLO)$/osl_Semaphore.obj SHL1TARGET= osl_Semaphore -SHL1STDLIBS=\ - $(SALLIB) -.IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2" -SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib -.ENDIF -.IF "$(GUI)" == "UNX" -SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a -.ENDIF +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) diff --git a/sal/qa/osl/semaphore/osl_Semaphore_Const.h b/sal/qa/osl/semaphore/osl_Semaphore_Const.h index f1aafa3a6244..c9f1149674f4 100644 --- a/sal/qa/osl/semaphore/osl_Semaphore_Const.h +++ b/sal/qa/osl/semaphore/osl_Semaphore_Const.h @@ -51,7 +51,7 @@ #endif #include -#include +#include #ifdef UNX #include diff --git a/sal/qa/osl/socket/makefile.mk b/sal/qa/osl/socket/makefile.mk index 5bcb252d187a..134bcadb55aa 100755 --- a/sal/qa/osl/socket/makefile.mk +++ b/sal/qa/osl/socket/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -44,22 +44,18 @@ CFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS) # BEGIN ---------------------------------------------------------------- -# auto generated Target:Socket by codegen.pl +# auto generated Target:Socket by codegen.pl SHL1OBJS= \ $(SLO)$/osl_Socket.obj SHL1TARGET=osl_SocketOld -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL1STDLIBS= $(SALLIB) $CPPUNITLIB) $(TESTSHL2LIB) .IF "$(GUI)" == "WNT" -#SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib SHL1STDLIBS+= $(WS2_32LIB) .ENDIF .IF "$(GUI)" == "UNX" -#SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a SHL1STDLIBS+= -ldl -lnsl .ENDIF @@ -75,9 +71,7 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map SHL2OBJS= \ $(SLO)$/osl_Socket_tests.obj SHL2TARGET= osl_Socket_tests -SHL2STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL2STDLIBS= $(SALLIB) $CPPUNITLIB) $(TESTSHL2LIB) SHL2IMPLIB= i$(SHL2TARGET) DEF2NAME= $(SHL2TARGET) @@ -86,15 +80,13 @@ SHL2VERSIONMAP = $(PRJ)$/qa$/export.map # END -------------------------------------------------------------- # BEGIN ---------------------------------------------------------------- -# auto generated Target:Socket by codegen.pl +# auto generated Target:Socket by codegen.pl SHL3OBJS= \ $(SLO)$/sockethelper.obj \ $(SLO)$/osl_StreamSocket.obj SHL3TARGET= osl_StreamSocket -SHL3STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL3STDLIBS= $(SALLIB) $CPPUNITLIB) $(TESTSHL2LIB) .IF "$(GUI)" == "WNT" SHL3STDLIBS += $(WS2_32LIB) @@ -111,15 +103,13 @@ SHL3VERSIONMAP = $(PRJ)$/qa$/export.map # END ------------------------------------------------------------------ # BEGIN ---------------------------------------------------------------- -# auto generated Target:Socket by codegen.pl +# auto generated Target:Socket by codegen.pl SHL4OBJS= \ $(SLO)$/sockethelper.obj \ $(SLO)$/osl_DatagramSocket.obj SHL4TARGET= osl_DatagramSocket -SHL4STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL4STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) .IF "$(GUI)" == "WNT" SHL4STDLIBS += $(WS2_32LIB) @@ -136,15 +126,13 @@ SHL4VERSIONMAP = $(PRJ)$/qa$/export.map # END ------------------------------------------------------------------ # BEGIN ---------------------------------------------------------------- -# auto generated Target:Socket by codegen.pl +# auto generated Target:Socket by codegen.pl SHL5OBJS= \ $(SLO)$/sockethelper.obj \ $(SLO)$/osl_SocketAddr.obj SHL5TARGET= osl_SocketAddr -SHL5STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL5STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) .IF "$(GUI)" == "WNT" SHL5STDLIBS += $(WS2_32LIB) @@ -161,15 +149,13 @@ SHL5VERSIONMAP = $(PRJ)$/qa$/export.map # END ------------------------------------------------------------------ # BEGIN ---------------------------------------------------------------- -# auto generated Target:Socket by codegen.pl +# auto generated Target:Socket by codegen.pl SHL6OBJS= \ $(SLO)$/sockethelper.obj \ $(SLO)$/osl_Socket2.obj SHL6TARGET= osl_Socket2 -SHL6STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL6STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) .IF "$(GUI)" == "WNT" SHL6STDLIBS += $(WS2_32LIB) @@ -186,15 +172,13 @@ SHL6VERSIONMAP = $(PRJ)$/qa$/export.map # END ------------------------------------------------------------------ # BEGIN ---------------------------------------------------------------- -# auto generated Target:Socket by codegen.pl +# auto generated Target:Socket by codegen.pl SHL7OBJS= \ $(SLO)$/sockethelper.obj \ $(SLO)$/osl_ConnectorSocket.obj SHL7TARGET= osl_ConnectorSocket -SHL7STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL7STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) .IF "$(GUI)" == "WNT" SHL7STDLIBS += $(WS2_32LIB) @@ -211,15 +195,13 @@ SHL7VERSIONMAP = $(PRJ)$/qa$/export.map # END ------------------------------------------------------------------ # BEGIN ---------------------------------------------------------------- -# auto generated Target:Socket by codegen.pl +# auto generated Target:Socket by codegen.pl SHL8OBJS= \ $(SLO)$/sockethelper.obj \ $(SLO)$/osl_AcceptorSocket.obj SHL8TARGET= osl_AcceptorSocket -SHL8STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL8STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) .IF "$(GUI)" == "WNT" SHL8STDLIBS += $(WS2_32LIB) diff --git a/sal/qa/osl/socket/osl_AcceptorSocket.cxx b/sal/qa/osl/socket/osl_AcceptorSocket.cxx index 002e27efbd0e..6325385b62ee 100644 --- a/sal/qa/osl/socket/osl_AcceptorSocket.cxx +++ b/sal/qa/osl/socket/osl_AcceptorSocket.cxx @@ -61,7 +61,7 @@ // include files //------------------------------------------------------------------------ -#include +#include #include "osl_Socket_Const.h" #include "sockethelper.hxx" diff --git a/sal/qa/osl/socket/osl_ConnectorSocket.cxx b/sal/qa/osl/socket/osl_ConnectorSocket.cxx index e3f4ad3e5bea..52c1b12b687e 100644 --- a/sal/qa/osl/socket/osl_ConnectorSocket.cxx +++ b/sal/qa/osl/socket/osl_ConnectorSocket.cxx @@ -61,7 +61,7 @@ // include files //------------------------------------------------------------------------ -#include +#include #include "osl_Socket_Const.h" #include "sockethelper.hxx" diff --git a/sal/qa/osl/socket/osl_DatagramSocket.cxx b/sal/qa/osl/socket/osl_DatagramSocket.cxx index 4e714d0b655b..4cf27a90ad90 100644 --- a/sal/qa/osl/socket/osl_DatagramSocket.cxx +++ b/sal/qa/osl/socket/osl_DatagramSocket.cxx @@ -61,7 +61,7 @@ // include files //------------------------------------------------------------------------ -#include +#include //#include "osl_Socket_Const.h" #include "sockethelper.hxx" diff --git a/sal/qa/osl/socket/osl_Socket.cxx b/sal/qa/osl/socket/osl_Socket.cxx index 20f2a80d04da..ccc87ee23a1d 100755 --- a/sal/qa/osl/socket/osl_Socket.cxx +++ b/sal/qa/osl/socket/osl_Socket.cxx @@ -66,7 +66,7 @@ #include #endif -#include +#include using namespace osl; using namespace rtl; diff --git a/sal/qa/osl/socket/osl_Socket2.cxx b/sal/qa/osl/socket/osl_Socket2.cxx index 29a7924c5503..a7b0ecfa1ef7 100644 --- a/sal/qa/osl/socket/osl_Socket2.cxx +++ b/sal/qa/osl/socket/osl_Socket2.cxx @@ -61,7 +61,7 @@ // include files //------------------------------------------------------------------------ -#include +#include //#include "osl_Socket_Const.h" #include "sockethelper.hxx" diff --git a/sal/qa/osl/socket/osl_SocketAddr.cxx b/sal/qa/osl/socket/osl_SocketAddr.cxx index e9db614bade8..63ca58f67936 100644 --- a/sal/qa/osl/socket/osl_SocketAddr.cxx +++ b/sal/qa/osl/socket/osl_SocketAddr.cxx @@ -61,7 +61,7 @@ // include files //------------------------------------------------------------------------ -#include +#include //#include "osl_Socket_Const.h" #include "sockethelper.hxx" diff --git a/sal/qa/osl/socket/osl_Socket_tests.cxx b/sal/qa/osl/socket/osl_Socket_tests.cxx index 3122b27b1f1a..7f0fb5bbe87e 100644 --- a/sal/qa/osl/socket/osl_Socket_tests.cxx +++ b/sal/qa/osl/socket/osl_Socket_tests.cxx @@ -36,7 +36,7 @@ //------------------------------------------------------------------------ #include -#include +#include #include //------------------------------------------------------------------------ // helper functions diff --git a/sal/qa/osl/socket/osl_StreamSocket.cxx b/sal/qa/osl/socket/osl_StreamSocket.cxx index 0d5a1e54739f..9769d13adb0f 100644 --- a/sal/qa/osl/socket/osl_StreamSocket.cxx +++ b/sal/qa/osl/socket/osl_StreamSocket.cxx @@ -61,7 +61,7 @@ // include files //------------------------------------------------------------------------ -#include +#include //#include "osl_Socket_Const.h" #include "sockethelper.hxx" diff --git a/sal/qa/osl/socket/sockethelper.cxx b/sal/qa/osl/socket/sockethelper.cxx index c10ebcb2c8ca..681858f15dc1 100644 --- a/sal/qa/osl/socket/sockethelper.cxx +++ b/sal/qa/osl/socket/sockethelper.cxx @@ -32,7 +32,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sal.hxx" #include "sockethelper.hxx" -#include +#include //------------------------------------------------------------------------ // Ip version definition diff --git a/sal/qa/osl/thread/makefile.mk b/sal/qa/osl/thread/makefile.mk index e74400ba6aff..86551fc6771b 100644 --- a/sal/qa/osl/thread/makefile.mk +++ b/sal/qa/osl/thread/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -41,7 +41,7 @@ DLLPRE = # no leading "lib" on .so files SHL1TARGET = $(TARGET) SHL1OBJS = $(SLO)$/test_thread.obj -SHL1STDLIBS = $(CPPUNITLIB) $(SALLIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1VERSIONMAP = version.map SHL1IMPLIB = i$(SHL1TARGET) DEF1NAME = $(SHL1TARGET) diff --git a/sal/qa/osl/thread/test_thread.cxx b/sal/qa/osl/thread/test_thread.cxx index 59c857c82b2f..21fd2e297fe0 100644 --- a/sal/qa/osl/thread/test_thread.cxx +++ b/sal/qa/osl/thread/test_thread.cxx @@ -33,7 +33,7 @@ #include "sal/config.h" -#include "cppunit/simpleheader.hxx" +#include "testshl/simpleheader.hxx" #include "osl/conditn.hxx" #include "osl/thread.hxx" #include "osl/time.h" diff --git a/sal/qa/rtl/alloc/makefile.mk b/sal/qa/rtl/alloc/makefile.mk index 4fad638942fb..ce88442a5574 100755 --- a/sal/qa/rtl/alloc/makefile.mk +++ b/sal/qa/rtl/alloc/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -45,20 +45,12 @@ CFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS) # BEGIN ---------------------------------------------------------------- -# auto generated Target:jobfile by codegen.pl +# auto generated Target:jobfile by codegen.pl SHL1OBJS= \ $(SLO)$/rtl_alloc.obj SHL1TARGET= rtl_Alloc -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) -# .IF "$(GUI)" == "WNT" -# SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib -# .ENDIF -# .IF "$(GUI)" == "UNX" -# SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a -# .ENDIF +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) # SHL1DEF= $(MISC)$/$(SHL1TARGET).def diff --git a/sal/qa/rtl/alloc/rtl_alloc.cxx b/sal/qa/rtl/alloc/rtl_alloc.cxx index 75173f3aaf86..ae9a1e9e9587 100755 --- a/sal/qa/rtl/alloc/rtl_alloc.cxx +++ b/sal/qa/rtl/alloc/rtl_alloc.cxx @@ -34,7 +34,7 @@ // autogenerated file with codegen.pl #include -#include +#include namespace rtl_alloc { diff --git a/sal/qa/rtl/bootstrap/makefile.mk b/sal/qa/rtl/bootstrap/makefile.mk index ff47fa6c78d2..a492af8dd3c5 100644 --- a/sal/qa/rtl/bootstrap/makefile.mk +++ b/sal/qa/rtl/bootstrap/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -55,14 +55,12 @@ CFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS) # BEGIN ---------------------------------------------------------------- -# auto generated Target:joblist by codegen.pl +# auto generated Target:joblist by codegen.pl SHL1OBJS= \ $(SLO)$/rtl_Bootstrap.obj SHL1TARGET= rtl_Bootstrap -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) # SHL1DEF= $(MISC)$/$(SHL1TARGET).def @@ -72,7 +70,7 @@ DEF1NAME =$(SHL1TARGET) SHL1VERSIONMAP= $(PRJ)$/qa$/export.map # END ------------------------------------------------------------------ -OBJ2FILES=$(OBJ)$/bootstrap_process.obj +OBJ2FILES=$(OBJ)$/bootstrap_process.obj APP2TARGET=bootstrap_process APP2OBJS=$(OBJ2FILES) diff --git a/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx b/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx index 85efcfa55b34..520c1298030f 100644 --- a/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx +++ b/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx @@ -39,9 +39,9 @@ #include #include // STL -#include "cppunit/stringhelper.hxx" +#include "testshl/stringhelper.hxx" -#include +#include //#include "stringhelper.hxx" //#include "valueequal.hxx" #include diff --git a/sal/qa/rtl/cipher/makefile.mk b/sal/qa/rtl/cipher/makefile.mk index c8d508f8b9ef..fc7a975651f5 100644 --- a/sal/qa/rtl/cipher/makefile.mk +++ b/sal/qa/rtl/cipher/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -45,14 +45,12 @@ CFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS) # BEGIN ---------------------------------------------------------------- -# auto generated Target:joblist by codegen.pl +# auto generated Target:joblist by codegen.pl SHL1OBJS= \ $(SLO)$/rtl_cipher.obj SHL1TARGET= rtl_cipher -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) # SHL1DEF= $(MISC)$/$(SHL1TARGET).def diff --git a/sal/qa/rtl/cipher/rtl_cipher.cxx b/sal/qa/rtl/cipher/rtl_cipher.cxx index c51344cdc83e..a55f4a20d6fe 100644 --- a/sal/qa/rtl/cipher/rtl_cipher.cxx +++ b/sal/qa/rtl/cipher/rtl_cipher.cxx @@ -32,7 +32,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sal.hxx" -#include +#include #include #include diff --git a/sal/qa/rtl/crc32/makefile.mk b/sal/qa/rtl/crc32/makefile.mk index aa24d698ea30..8b1ee4a6f350 100755 --- a/sal/qa/rtl/crc32/makefile.mk +++ b/sal/qa/rtl/crc32/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -45,19 +45,12 @@ CFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS) # BEGIN ---------------------------------------------------------------- -# auto generated Target:jobfile by codegen.pl +# auto generated Target:jobfile by codegen.pl SHL1OBJS= \ $(SLO)$/rtl_crc32.obj SHL1TARGET= rtl_crc32 -SHL1STDLIBS=\ - $(SALLIB) -.IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2" -SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib -.ENDIF -.IF "$(GUI)" == "UNX" -SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a -.ENDIF +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) # SHL1DEF= $(MISC)$/$(SHL1TARGET).def diff --git a/sal/qa/rtl/crc32/rtl_crc32.cxx b/sal/qa/rtl/crc32/rtl_crc32.cxx index fa5870c9c8dd..09f492376ba2 100755 --- a/sal/qa/rtl/crc32/rtl_crc32.cxx +++ b/sal/qa/rtl/crc32/rtl_crc32.cxx @@ -33,7 +33,7 @@ #include "precompiled_sal.hxx" // autogenerated file with codegen.pl -#include +#include #include namespace rtl_CRC32 diff --git a/sal/qa/rtl/digest/makefile.mk b/sal/qa/rtl/digest/makefile.mk index a80835047d8b..7786522901ee 100644 --- a/sal/qa/rtl/digest/makefile.mk +++ b/sal/qa/rtl/digest/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -48,12 +48,10 @@ CXXFLAGS+= $(LFS_CFLAGS) #----------------------------------- OStringBuffer ----------------------------------- SHL1OBJS= \ - $(SLO)$/rtl_digest.obj + $(SLO)$/rtl_digest.obj SHL1TARGET= rtl_digest -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) DEF1NAME= $(SHL1TARGET) diff --git a/sal/qa/rtl/digest/rtl_digest.cxx b/sal/qa/rtl/digest/rtl_digest.cxx index 151b01f8994c..9f8dd3f24542 100644 --- a/sal/qa/rtl/digest/rtl_digest.cxx +++ b/sal/qa/rtl/digest/rtl_digest.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sal.hxx" -#include +#include #include #include diff --git a/sal/qa/rtl/doublelock/makefile.mk b/sal/qa/rtl/doublelock/makefile.mk index 7ee93688eff2..b46518fb2e68 100644 --- a/sal/qa/rtl/doublelock/makefile.mk +++ b/sal/qa/rtl/doublelock/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -45,7 +45,7 @@ CFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS) # BEGIN ---------------------------------------------------------------- -# auto generated Target:testjob by codegen.pl +# auto generated Target:testjob by codegen.pl .IF "$(GUI)" == "WNT" CFLAGS+=/Ob1 @@ -55,9 +55,7 @@ SHL1OBJS= \ $(SLO)$/rtl_doublelocking.obj SHL1TARGET= rtl_doublelocking -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) DEF1NAME =$(SHL1TARGET) diff --git a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx index 2f3f004dbabc..cbcc334d3134 100644 --- a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx +++ b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx @@ -46,7 +46,7 @@ #include -#include +#include // ----------------------------------------------------------------------------- #define CONST_TEST_STRING "gregorian" diff --git a/sal/qa/rtl/locale/makefile.mk b/sal/qa/rtl/locale/makefile.mk index 6ad4991bcfd9..8e4710c5ac6b 100644 --- a/sal/qa/rtl/locale/makefile.mk +++ b/sal/qa/rtl/locale/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -45,14 +45,12 @@ CFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS) # BEGIN ---------------------------------------------------------------- -# auto generated Target:locale by codegen.pl +# auto generated Target:locale by codegen.pl SHL1OBJS= \ $(SLO)$/rtl_locale.obj SHL1TARGET= rtl_locale -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) # SHL1DEF= $(MISC)$/$(SHL1TARGET).def diff --git a/sal/qa/rtl/locale/rtl_locale.cxx b/sal/qa/rtl/locale/rtl_locale.cxx index 91fb285db98a..c677259038f3 100644 --- a/sal/qa/rtl/locale/rtl_locale.cxx +++ b/sal/qa/rtl/locale/rtl_locale.cxx @@ -33,7 +33,7 @@ #include "precompiled_sal.hxx" // autogenerated file with codegen.pl -#include +#include #include #include diff --git a/sal/qa/rtl/logfile/makefile.mk b/sal/qa/rtl/logfile/makefile.mk index 23a5979237d9..da70d7533fa0 100644 --- a/sal/qa/rtl/logfile/makefile.mk +++ b/sal/qa/rtl/logfile/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -47,9 +47,7 @@ CXXFLAGS+= $(LFS_CFLAGS) SHL1OBJS= \ $(SLO)$/rtl_logfile.obj SHL1TARGET= rtl_logfile -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) DEF1NAME =$(SHL1TARGET) diff --git a/sal/qa/rtl/logfile/rtl_logfile.cxx b/sal/qa/rtl/logfile/rtl_logfile.cxx index 9ed83adf9c09..d589cfb2bf04 100644 --- a/sal/qa/rtl/logfile/rtl_logfile.cxx +++ b/sal/qa/rtl/logfile/rtl_logfile.cxx @@ -46,7 +46,7 @@ #endif #include -#include +#include // #ifndef _OSL_MODULE_HXX_ // #include diff --git a/sal/qa/rtl/math/makefile.mk b/sal/qa/rtl/math/makefile.mk index 14e8cec2ec9c..5db3ffdd2028 100644 --- a/sal/qa/rtl/math/makefile.mk +++ b/sal/qa/rtl/math/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -48,17 +48,10 @@ CXXFLAGS+= $(LFS_CFLAGS) #----------------------------------- OStringBuffer ----------------------------------- SHL1OBJS= \ - $(SLO)$/test_rtl_math.obj + $(SLO)$/test_rtl_math.obj SHL1TARGET= rtl_math -SHL1STDLIBS=\ - $(SALLIB) -.IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2" -SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib -.ENDIF -.IF "$(GUI)" == "UNX" -SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a -.ENDIF +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) # SHL1DEF= $(MISC)$/$(SHL1TARGET).def @@ -71,9 +64,7 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map SHL2OBJS= \ $(SLO)$/rtl_math.obj SHL2TARGET= rtl_math2 -SHL2STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL2IMPLIB= i$(SHL2TARGET) DEF2NAME= $(SHL2TARGET) @@ -90,14 +81,12 @@ SHL2VERSIONMAP = $(PRJ)$/qa$/export.map # SHL3OBJS= \ # $(SLO)$/rtl_old_testint64.obj # SHL3TARGET= rtl_old_testint64 -# SHL3STDLIBS=\ -# $(SALLIB) \ -# $(CPPUNITLIB) -# +# SHL3STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) +# # SHL3IMPLIB= i$(SHL3TARGET) # DEF3NAME= $(SHL3TARGET) # SHL3VERSIONMAP = $(PRJ)$/qa$/export.map -# +# #------------------------------- All object files ------------------------------- # do this here, so we get right dependencies diff --git a/sal/qa/rtl/math/rtl_math.cxx b/sal/qa/rtl/math/rtl_math.cxx index 34d851b4f2e7..a9c16541e524 100644 --- a/sal/qa/rtl/math/rtl_math.cxx +++ b/sal/qa/rtl/math/rtl_math.cxx @@ -37,7 +37,7 @@ #endif #include -#include +#include #include #include diff --git a/sal/qa/rtl/math/rtl_old_testint64.cxx b/sal/qa/rtl/math/rtl_old_testint64.cxx index e0059b200db6..923c464186f3 100644 --- a/sal/qa/rtl/math/rtl_old_testint64.cxx +++ b/sal/qa/rtl/math/rtl_old_testint64.cxx @@ -49,7 +49,7 @@ // #define TEST_ENSURE(c, m) OSL_VERIFY(c) // #endif -#include +#include // ----------------------------------------------------------------------------- namespace rtl_math diff --git a/sal/qa/rtl/ostring/makefile.mk b/sal/qa/rtl/ostring/makefile.mk index 279697313cf1..d2c6049afcbc 100644 --- a/sal/qa/rtl/ostring/makefile.mk +++ b/sal/qa/rtl/ostring/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -45,14 +45,12 @@ CFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS) # BEGIN ---------------------------------------------------------------- -# auto generated Target:joblist by codegen.pl +# auto generated Target:joblist by codegen.pl SHL1OBJS= \ $(SLO)$/rtl_OString2.obj SHL1TARGET= rtl_OString2 -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) # SHL1DEF= $(MISC)$/$(SHL1TARGET).def @@ -68,9 +66,7 @@ SHL2OBJS= \ $(SLO)$/rtl_str.obj SHL2TARGET= rtl_str -SHL2STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL2IMPLIB= i$(SHL2TARGET) DEF2NAME =$(SHL2TARGET) @@ -82,9 +78,7 @@ SHL3OBJS= \ $(SLO)$/rtl_string.obj SHL3TARGET= rtl_string -SHL3STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL3STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL3IMPLIB= i$(SHL3TARGET) DEF3NAME =$(SHL3TARGET) diff --git a/sal/qa/rtl/ostring/rtl_OString2.cxx b/sal/qa/rtl/ostring/rtl_OString2.cxx index 8421346f84a7..2ff2ca6b434b 100644 --- a/sal/qa/rtl/ostring/rtl_OString2.cxx +++ b/sal/qa/rtl/ostring/rtl_OString2.cxx @@ -34,7 +34,7 @@ // autogenerated file with codegen.pl // There exist some more test code in sal/qa/rtl_strings/rtl_OString.cxx -#include +#include #include "valueequal.hxx" namespace rtl_OString diff --git a/sal/qa/rtl/ostring/rtl_str.cxx b/sal/qa/rtl/ostring/rtl_str.cxx index 5e34b034bffb..6ce43ae0bb9b 100644 --- a/sal/qa/rtl/ostring/rtl_str.cxx +++ b/sal/qa/rtl/ostring/rtl_str.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sal.hxx" -#include +#include namespace rtl_str { diff --git a/sal/qa/rtl/ostring/rtl_string.cxx b/sal/qa/rtl/ostring/rtl_string.cxx index 549555d0e10a..a1fc88037f51 100644 --- a/sal/qa/rtl/ostring/rtl_string.cxx +++ b/sal/qa/rtl/ostring/rtl_string.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sal.hxx" -#include +#include namespace rtl_string { diff --git a/sal/qa/rtl/oustring/makefile.mk b/sal/qa/rtl/oustring/makefile.mk index dedaa650107d..40e4ba4a0b58 100644 --- a/sal/qa/rtl/oustring/makefile.mk +++ b/sal/qa/rtl/oustring/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -45,14 +45,12 @@ CFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS) # BEGIN ---------------------------------------------------------------- -# auto generated Target:joblist by codegen.pl +# auto generated Target:joblist by codegen.pl SHL1OBJS= \ $(SLO)$/rtl_OUString2.obj SHL1TARGET= rtl_OUString2 -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) # SHL1DEF= $(MISC)$/$(SHL1TARGET).def @@ -68,9 +66,7 @@ SHL2OBJS= \ $(SLO)$/rtl_ustr.obj SHL2TARGET= rtl_ustr -SHL2STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL2IMPLIB= i$(SHL2TARGET) DEF2NAME =$(SHL2TARGET) diff --git a/sal/qa/rtl/oustring/rtl_OUString2.cxx b/sal/qa/rtl/oustring/rtl_OUString2.cxx index 9606ae0859c3..8632a159ab85 100644 --- a/sal/qa/rtl/oustring/rtl_OUString2.cxx +++ b/sal/qa/rtl/oustring/rtl_OUString2.cxx @@ -38,7 +38,7 @@ #include // STL -#include +#include #include "stringhelper.hxx" #include "valueequal.hxx" diff --git a/sal/qa/rtl/oustring/rtl_ustr.cxx b/sal/qa/rtl/oustring/rtl_ustr.cxx index 5cc28ea1f389..43610d0461f4 100644 --- a/sal/qa/rtl/oustring/rtl_ustr.cxx +++ b/sal/qa/rtl/oustring/rtl_ustr.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sal.hxx" -#include +#include /** print a UNI_CODE file name. */ diff --git a/sal/qa/rtl/oustringbuffer/makefile.mk b/sal/qa/rtl/oustringbuffer/makefile.mk index 9737d998a768..a910d7222773 100644 --- a/sal/qa/rtl/oustringbuffer/makefile.mk +++ b/sal/qa/rtl/oustringbuffer/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -45,14 +45,12 @@ CFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS) # BEGIN ---------------------------------------------------------------- -# auto generated Target:joblist by codegen.pl +# auto generated Target:joblist by codegen.pl SHL1OBJS= \ $(SLO)$/rtl_OUStringBuffer2.obj SHL1TARGET= rtl_OUStringBuffer2 -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) # SHL1DEF= $(MISC)$/$(SHL1TARGET).def diff --git a/sal/qa/rtl/oustringbuffer/rtl_OUStringBuffer2.cxx b/sal/qa/rtl/oustringbuffer/rtl_OUStringBuffer2.cxx index d259e63174f8..febaa2a9d552 100644 --- a/sal/qa/rtl/oustringbuffer/rtl_OUStringBuffer2.cxx +++ b/sal/qa/rtl/oustringbuffer/rtl_OUStringBuffer2.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sal.hxx" -#include +#include #include "stringhelper.hxx" #include #include diff --git a/sal/qa/rtl/process/makefile.mk b/sal/qa/rtl/process/makefile.mk index c1f5d9cad7eb..ac8d66e24b7d 100644 --- a/sal/qa/rtl/process/makefile.mk +++ b/sal/qa/rtl/process/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -45,14 +45,12 @@ CFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS) # BEGIN ---------------------------------------------------------------- -# auto generated Target:joblist by codegen.pl +# auto generated Target:joblist by codegen.pl SHL1OBJS= \ $(SLO)$/rtl_Process.obj SHL1TARGET= rtl_Process -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) # SHL1DEF= $(MISC)$/$(SHL1TARGET).def @@ -62,7 +60,7 @@ DEF1NAME =$(SHL1TARGET) SHL1VERSIONMAP= $(PRJ)$/qa$/export.map # END ------------------------------------------------------------------ -OBJ3FILES=$(OBJ)$/child_process.obj +OBJ3FILES=$(OBJ)$/child_process.obj APP3TARGET=child_process APP3OBJS=$(OBJ3FILES) @@ -74,7 +72,7 @@ APP3OBJS=$(OBJ3FILES) #.ENDIF APP3STDLIBS=$(SALLIB) -OBJ4FILES=$(OBJ)$/child_process_id.obj +OBJ4FILES=$(OBJ)$/child_process_id.obj APP4TARGET=child_process_id APP4OBJS=$(OBJ4FILES) diff --git a/sal/qa/rtl/process/rtl_Process.cxx b/sal/qa/rtl/process/rtl_Process.cxx index 78360186fea7..e14d52905c32 100644 --- a/sal/qa/rtl/process/rtl_Process.cxx +++ b/sal/qa/rtl/process/rtl_Process.cxx @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include #include diff --git a/sal/qa/rtl/random/makefile.mk b/sal/qa/rtl/random/makefile.mk index 61cd9b676351..0fc2e5e5a7f8 100644 --- a/sal/qa/rtl/random/makefile.mk +++ b/sal/qa/rtl/random/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -45,14 +45,12 @@ CFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS) # BEGIN ---------------------------------------------------------------- -# auto generated Target:job by codegen.pl +# auto generated Target:job by codegen.pl SHL1OBJS= \ $(SLO)$/rtl_random.obj SHL1TARGET= rtl_Random -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) DEF1NAME =$(SHL1TARGET) diff --git a/sal/qa/rtl/random/rtl_random.cxx b/sal/qa/rtl/random/rtl_random.cxx index 7e3c56115b33..ae3845bd16b9 100644 --- a/sal/qa/rtl/random/rtl_random.cxx +++ b/sal/qa/rtl/random/rtl_random.cxx @@ -35,7 +35,7 @@ #include // STL -#include +#include #include namespace rtl_random diff --git a/sal/qa/rtl/strings/makefile.mk b/sal/qa/rtl/strings/makefile.mk index 16abc6b7e118..8b2a62b82d13 100644 --- a/sal/qa/rtl/strings/makefile.mk +++ b/sal/qa/rtl/strings/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -49,7 +49,7 @@ SHL1OBJS := \ $(SLO)$/test_oustring_endswith.obj \ $(SLO)$/test_oustring_noadditional.obj SHL1IMPLIB := i$(SHL1TARGET) -SHL1STDLIBS := $(CPPUNITLIB) $(SALLIB) +SHL1STDLIBS := $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1VERSIONMAP := $(PRJ)$/qa$/export.map DEF1NAME := $(SHL1TARGET) diff --git a/sal/qa/rtl/strings/test_oustring_compare.cxx b/sal/qa/rtl/strings/test_oustring_compare.cxx index a19c3360145c..582dd6a21b7a 100644 --- a/sal/qa/rtl/strings/test_oustring_compare.cxx +++ b/sal/qa/rtl/strings/test_oustring_compare.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sal.hxx" -#include "cppunit/simpleheader.hxx" +#include "testshl/simpleheader.hxx" #include "rtl/string.h" #include "rtl/ustring.hxx" diff --git a/sal/qa/rtl/strings/test_oustring_convert.cxx b/sal/qa/rtl/strings/test_oustring_convert.cxx index b579da99ee27..e1219c3024d6 100644 --- a/sal/qa/rtl/strings/test_oustring_convert.cxx +++ b/sal/qa/rtl/strings/test_oustring_convert.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sal.hxx" -#include "cppunit/simpleheader.hxx" +#include "testshl/simpleheader.hxx" #include "rtl/strbuf.hxx" #include "rtl/string.hxx" #include "rtl/ustring.hxx" diff --git a/sal/qa/rtl/strings/test_oustring_endswith.cxx b/sal/qa/rtl/strings/test_oustring_endswith.cxx index 83714ff6fe71..467878697fd2 100644 --- a/sal/qa/rtl/strings/test_oustring_endswith.cxx +++ b/sal/qa/rtl/strings/test_oustring_endswith.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sal.hxx" -#include "cppunit/simpleheader.hxx" +#include "testshl/simpleheader.hxx" #include "rtl/strbuf.hxx" #include "rtl/string.h" #include "rtl/string.hxx" diff --git a/sal/qa/rtl/strings/test_oustring_noadditional.cxx b/sal/qa/rtl/strings/test_oustring_noadditional.cxx index 26db4917f096..dd30871b7622 100644 --- a/sal/qa/rtl/strings/test_oustring_noadditional.cxx +++ b/sal/qa/rtl/strings/test_oustring_noadditional.cxx @@ -31,6 +31,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sal.hxx" -#include "cppunit/simpleheader.hxx" +#include "testshl/simpleheader.hxx" NOADDITIONAL; diff --git a/sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx b/sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx index ca05cbf514b7..71fb6def0b31 100644 --- a/sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx +++ b/sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sal.hxx" -#include "cppunit/simpleheader.hxx" +#include "testshl/simpleheader.hxx" #include "rtl/ustrbuf.hxx" #include "rtl/ustring.h" #include "rtl/ustring.hxx" diff --git a/sal/qa/rtl/textenc/makefile.mk b/sal/qa/rtl/textenc/makefile.mk index c2b9a836ab3b..31f700b7b96a 100644 --- a/sal/qa/rtl/textenc/makefile.mk +++ b/sal/qa/rtl/textenc/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -47,9 +47,7 @@ CXXFLAGS+= $(LFS_CFLAGS) SHL1OBJS= \ $(SLO)$/rtl_textcvt.obj SHL1TARGET= rtl_textcvt -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) DEF1NAME =$(SHL1TARGET) @@ -65,9 +63,7 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map SHL2OBJS= \ $(SLO)$/rtl_tencinfo.obj SHL2TARGET= rtl_tencinfo -SHL2STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL2IMPLIB= i$(SHL2TARGET) DEF2NAME =$(SHL2TARGET) diff --git a/sal/qa/rtl/textenc/rtl_tencinfo.cxx b/sal/qa/rtl/textenc/rtl_tencinfo.cxx index 8f5fa28defda..2bc3f930af42 100644 --- a/sal/qa/rtl/textenc/rtl_tencinfo.cxx +++ b/sal/qa/rtl/textenc/rtl_tencinfo.cxx @@ -36,7 +36,7 @@ #include #include -#include +#include // ----------------------------------------------------------------------------- diff --git a/sal/qa/rtl/textenc/rtl_textcvt.cxx b/sal/qa/rtl/textenc/rtl_textcvt.cxx index 0e4a1a306949..2129815a6779 100644 --- a/sal/qa/rtl/textenc/rtl_textcvt.cxx +++ b/sal/qa/rtl/textenc/rtl_textcvt.cxx @@ -36,7 +36,7 @@ #include #include -#include "cppunit/simpleheader.hxx" +#include "testshl/simpleheader.hxx" #include "rtl/string.hxx" #include "rtl/tencinfo.h" #include "rtl/textcvt.h" diff --git a/sal/qa/rtl/uri/makefile.mk b/sal/qa/rtl/uri/makefile.mk index 95ba01debd1e..2c536da484d7 100644 --- a/sal/qa/rtl/uri/makefile.mk +++ b/sal/qa/rtl/uri/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -47,9 +47,7 @@ CXXFLAGS+= $(LFS_CFLAGS) SHL1OBJS= \ $(SLO)$/rtl_Uri.obj SHL1TARGET= rtl_uri_simple -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) DEF1NAME =$(SHL1TARGET) @@ -61,9 +59,7 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map SHL2OBJS= \ $(SLO)$/rtl_testuri.obj SHL2TARGET= rtl_Uri -SHL2STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL2IMPLIB= i$(SHL2TARGET) DEF2NAME =$(SHL2TARGET) diff --git a/sal/qa/rtl/uri/rtl_Uri.cxx b/sal/qa/rtl/uri/rtl_Uri.cxx index 794074e18d0f..cc27f956b573 100644 --- a/sal/qa/rtl/uri/rtl_Uri.cxx +++ b/sal/qa/rtl/uri/rtl_Uri.cxx @@ -38,7 +38,7 @@ #include #include -#include +#include // ----------------------------------------------------------------------------- diff --git a/sal/qa/rtl/uri/rtl_testuri.cxx b/sal/qa/rtl/uri/rtl_testuri.cxx index 956c5ccbaacb..4d1d80830dd3 100644 --- a/sal/qa/rtl/uri/rtl_testuri.cxx +++ b/sal/qa/rtl/uri/rtl_testuri.cxx @@ -39,7 +39,7 @@ #include "rtl/ustring.h" #include "rtl/ustring.hxx" -#include "cppunit/simpleheader.hxx" +#include "testshl/simpleheader.hxx" #include #include diff --git a/sal/qa/rtl/uuid/makefile.mk b/sal/qa/rtl/uuid/makefile.mk index ed780dd82ec1..554c2034d0cd 100644 --- a/sal/qa/rtl/uuid/makefile.mk +++ b/sal/qa/rtl/uuid/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -45,14 +45,12 @@ CFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS) # BEGIN ---------------------------------------------------------------- -# auto generated Target:joblist by codegen.pl +# auto generated Target:joblist by codegen.pl SHL1OBJS= \ $(SLO)$/rtl_Uuid.obj SHL1TARGET= rtl_Uuid -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) # SHL1DEF= $(MISC)$/$(SHL1TARGET).def diff --git a/sal/qa/rtl/uuid/rtl_Uuid.cxx b/sal/qa/rtl/uuid/rtl_Uuid.cxx index 508a1127b60e..a77c4e8d90de 100644 --- a/sal/qa/rtl/uuid/rtl_Uuid.cxx +++ b/sal/qa/rtl/uuid/rtl_Uuid.cxx @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include #include diff --git a/sal/qa/rtl_strings/makefile.mk b/sal/qa/rtl_strings/makefile.mk index 4cd99ba3aec9..166ef568debc 100644 --- a/sal/qa/rtl_strings/makefile.mk +++ b/sal/qa/rtl_strings/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -44,15 +44,13 @@ CFLAGS+= $(LFS_CFLAGS) CXXFLAGS+= $(LFS_CFLAGS) # BEGIN ---------------------------------------------------------------- -# auto generated Target:FileBase by codegen.pl +# auto generated Target:FileBase by codegen.pl SHL1OBJS= \ $(SLO)$/rtl_String_Utils.obj \ $(SLO)$/rtl_OString.obj SHL1TARGET= rtl_OString -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) # SHL1DEF= $(MISC)$/$(SHL1TARGET).def @@ -65,15 +63,13 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map # END ------------------------------------------------------------------ # BEGIN ---------------------------------------------------------------- -# auto generated Target:FileBase by codegen.pl +# auto generated Target:FileBase by codegen.pl SHL2OBJS= \ $(SLO)$/rtl_String_Utils.obj \ $(SLO)$/rtl_OUString.obj SHL2TARGET= rtl_OUString -SHL2STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL2IMPLIB= i$(SHL2TARGET) # SHL2DEF= $(MISC)$/$(SHL2TARGET).def @@ -86,22 +82,13 @@ SHL2VERSIONMAP = $(PRJ)$/qa$/export.map # END ------------------------------------------------------------------ # BEGIN ---------------------------------------------------------------- -# auto generated Target:FileBase by codegen.pl +# auto generated Target:FileBase by codegen.pl SHL3OBJS= \ $(SLO)$/rtl_String_Utils.obj \ $(SLO)$/rtl_OUStringBuffer.obj SHL3TARGET= rtl_OUStringBuffer -SHL3STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) - -# .IF "$(GUI)" == "WNT" -# SHL3STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib -# .ENDIF -# .IF "$(GUI)" == "UNX" -# SHL3STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a -# .ENDIF +SHL3STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL3IMPLIB= i$(SHL3TARGET) # SHL3DEF= $(MISC)$/$(SHL3TARGET).def @@ -115,12 +102,10 @@ SHL3VERSIONMAP = $(PRJ)$/qa$/export.map # BEGIN ---------------------------------------------------------------- SHL4OBJS= \ - $(SLO)$/rtl_old_teststrbuf.obj + $(SLO)$/rtl_old_teststrbuf.obj SHL4TARGET= rtl_old_teststrbuf -SHL4STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL4STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL4IMPLIB= i$(SHL4TARGET) DEF4NAME =$(SHL4TARGET) @@ -130,12 +115,10 @@ SHL4VERSIONMAP = $(PRJ)$/qa$/export.map # BEGIN ---------------------------------------------------------------- SHL5OBJS= \ - $(SLO)$/rtl_old_testowstring.obj + $(SLO)$/rtl_old_testowstring.obj SHL5TARGET= rtl_old_testowstring -SHL5STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL5STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL5IMPLIB= i$(SHL5TARGET) DEF5NAME =$(SHL5TARGET) @@ -145,12 +128,10 @@ SHL5VERSIONMAP = $(PRJ)$/qa$/export.map # BEGIN ---------------------------------------------------------------- SHL6OBJS= \ - $(SLO)$/rtl_old_testostring.obj + $(SLO)$/rtl_old_testostring.obj SHL6TARGET= rtl_old_testostring -SHL6STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL6STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL6IMPLIB= i$(SHL6TARGET) DEF6NAME =$(SHL6TARGET) diff --git a/sal/qa/rtl_strings/rtl_old_testostring.cxx b/sal/qa/rtl_strings/rtl_old_testostring.cxx index 6c481914127d..329eb71c7dc5 100644 --- a/sal/qa/rtl_strings/rtl_old_testostring.cxx +++ b/sal/qa/rtl_strings/rtl_old_testostring.cxx @@ -48,7 +48,7 @@ #include #endif -#include +#include #define TEST_ENSURE(c, m) CPPUNIT_ASSERT_MESSAGE((m), (c)) diff --git a/sal/qa/rtl_strings/rtl_old_testowstring.cxx b/sal/qa/rtl_strings/rtl_old_testowstring.cxx index 6741deb06e84..938ec01f5fff 100644 --- a/sal/qa/rtl_strings/rtl_old_testowstring.cxx +++ b/sal/qa/rtl_strings/rtl_old_testowstring.cxx @@ -61,7 +61,7 @@ #include -#include +#include #define TEST_ENSURE(c, m) CPPUNIT_ASSERT_MESSAGE((m), (c)) // #if OSL_DEBUG_LEVEL > 0 diff --git a/sal/qa/rtl_strings/rtl_old_teststrbuf.cxx b/sal/qa/rtl_strings/rtl_old_teststrbuf.cxx index 7f6a54478697..c277517d57b2 100644 --- a/sal/qa/rtl_strings/rtl_old_teststrbuf.cxx +++ b/sal/qa/rtl_strings/rtl_old_teststrbuf.cxx @@ -53,7 +53,7 @@ #include #endif -#include +#include using namespace rtl; diff --git a/sal/qa/sal/makefile.mk b/sal/qa/sal/makefile.mk index ebf7aa314ab7..61f279e226eb 100644 --- a/sal/qa/sal/makefile.mk +++ b/sal/qa/sal/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -39,7 +39,7 @@ ENABLE_EXCEPTIONS := TRUE SHL1TARGET = $(TARGET)_types SHL1OBJS = $(SLO)$/test_types.obj -SHL1STDLIBS = $(CPPUNITLIB) $(SALLIB) +SHL1STDLIBS = $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1VERSIONMAP = version.map SHL1IMPLIB = i$(SHL1TARGET) DEF1NAME = $(SHL1TARGET) diff --git a/sal/qa/sal/test_types.cxx b/sal/qa/sal/test_types.cxx index fff05cb08106..5d72175bb8db 100644 --- a/sal/qa/sal/test_types.cxx +++ b/sal/qa/sal/test_types.cxx @@ -35,7 +35,7 @@ #include // C99 snprintf not necessarily in #include // wntmsci10 does not know std::strcmp -#include "cppunit/simpleheader.hxx" +#include "testshl/simpleheader.hxx" #include "sal/types.h" namespace { diff --git a/sal/qa/systools/makefile.mk b/sal/qa/systools/makefile.mk index cde5b71c215c..035bef25c34a 100644 --- a/sal/qa/systools/makefile.mk +++ b/sal/qa/systools/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -47,15 +47,12 @@ CXXFLAGS+= $(LFS_CFLAGS) CFLAGS+=/Ob0 # BEGIN ---------------------------------------------------------------- -# auto generated Target:joblist by codegen.pl +# auto generated Target:joblist by codegen.pl SHL1OBJS= \ $(SLO)$/test_comtools.obj SHL1TARGET= test_comtools -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB)\ - uuid.lib +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) uuid.lib SHL1IMPLIB= i$(SHL1TARGET) # SHL1DEF= $(MISC)$/$(SHL1TARGET).def diff --git a/sal/qa/systools/test_comtools.cxx b/sal/qa/systools/test_comtools.cxx index 1957d62d54f2..c61ff435d235 100644 --- a/sal/qa/systools/test_comtools.cxx +++ b/sal/qa/systools/test_comtools.cxx @@ -33,7 +33,7 @@ #include "precompiled_sal.hxx" // autogenerated file with codegen.pl -#include +#include #include class COMObject : public IUnknown diff --git a/sal/qa/testHelperFunctions/makefile.mk b/sal/qa/testHelperFunctions/makefile.mk index 0064cabef952..33c43f259081 100644 --- a/sal/qa/testHelperFunctions/makefile.mk +++ b/sal/qa/testHelperFunctions/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -49,9 +49,7 @@ SHL1OBJS= \ $(SLO)$/testHelperFunctions2.obj SHL1TARGET= testHelperFunctions -SHL1STDLIBS=\ - $(SALLIB) \ - $(CPPUNITLIB) +SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) SHL1IMPLIB= i$(SHL1TARGET) DEF1NAME =$(SHL1TARGET) diff --git a/sal/qa/testHelperFunctions/testHelperFunctions.cxx b/sal/qa/testHelperFunctions/testHelperFunctions.cxx index 9272433d2e1f..9d96d91939ec 100644 --- a/sal/qa/testHelperFunctions/testHelperFunctions.cxx +++ b/sal/qa/testHelperFunctions/testHelperFunctions.cxx @@ -38,7 +38,7 @@ #include "stringhelper.hxx" -#include +#include // void isJaBloed() // { diff --git a/sal/qa/testHelperFunctions/testHelperFunctions2.cxx b/sal/qa/testHelperFunctions/testHelperFunctions2.cxx index 9ddc1031d7fa..1adae36ade2a 100644 --- a/sal/qa/testHelperFunctions/testHelperFunctions2.cxx +++ b/sal/qa/testHelperFunctions/testHelperFunctions2.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sal.hxx" -#include +#include #include "stringhelper.hxx" namespace testOfHelperFunctions diff --git a/salhelper/qa/makefile.mk b/salhelper/qa/makefile.mk index 9987b3a276cd..4589338a5316 100644 --- a/salhelper/qa/makefile.mk +++ b/salhelper/qa/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -39,7 +39,7 @@ ENABLE_EXCEPTIONS := TRUE SHL1TARGET = $(TARGET) SHL1OBJS = $(SLO)$/test_api.obj -SHL1STDLIBS = $(CPPUNITLIB) $(SALLIB) $(SALHELPERLIB) +SHL1STDLIBS = $(CPPUNITLIB) $(SALLIB) $(SALHELPERLIB) $(TESTSHL2LIB) SHL1IMPLIB = i$(SHL1TARGET) SHL1VERSIONMAP = version.map DEF1NAME = $(SHL1TARGET) @@ -51,4 +51,4 @@ SLOFILES = $(SHL1OBJS) ALLTAR: test test .PHONY: $(SHL1TARGETN) - cd $(SHL1TARGETN:d) && testshl2 $(SHL1TARGETN:f) + cd $(SHL1TARGETN:d) && $(TESTSHL2) $(SHL1TARGETN:f) diff --git a/salhelper/qa/test_api.cxx b/salhelper/qa/test_api.cxx index 9957f6a56cf1..83df7ec084c6 100644 --- a/salhelper/qa/test_api.cxx +++ b/salhelper/qa/test_api.cxx @@ -59,7 +59,7 @@ std::type_info const & getSimpleReferenceObjectTypeInfo() } -#include "cppunit/simpleheader.hxx" +#include "testshl/simpleheader.hxx" #include "osl/mutex.hxx" #include "salhelper/condition.hxx" #include "salhelper/dynload.hxx" diff --git a/stoc/test/uriproc/makefile.mk b/stoc/test/uriproc/makefile.mk index 85e3a294f434..78b54bb2a5a2 100644 --- a/stoc/test/uriproc/makefile.mk +++ b/stoc/test/uriproc/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2008 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite @@ -56,7 +56,7 @@ UNOTYPES = \ SHL1TARGET = $(TARGET) SHL1OBJS = $(SLO)$/test_uriproc.obj -SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB) +SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB) $(TESTSHL2LIB) SHL1VERSIONMAP = version.map SHL1IMPLIB = i$(SHL1TARGET) DEF1NAME = $(SHL1TARGET) diff --git a/stoc/test/uriproc/test_uriproc.cxx b/stoc/test/uriproc/test_uriproc.cxx index f1032276eb89..71f92e504d64 100644 --- a/stoc/test/uriproc/test_uriproc.cxx +++ b/stoc/test/uriproc/test_uriproc.cxx @@ -47,7 +47,7 @@ #include "com/sun/star/uri/XVndSunStarScriptUrlReference.hpp" #include "com/sun/star/util/XMacroExpander.hpp" #include "cppuhelper/servicefactory.hxx" -#include "cppunit/simpleheader.hxx" +#include "testshl/simpleheader.hxx" #include "osl/diagnose.h" #include "osl/thread.h" #include "rtl/string.h" From e70fdfaaebb72ff54e3458b9d8d1cff5d37ae509 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Wed, 16 Sep 2009 23:21:42 +0200 Subject: [PATCH 23/56] removed unintendendly committed ure_top --- ure_top/prj/build.lst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 ure_top/prj/build.lst diff --git a/ure_top/prj/build.lst b/ure_top/prj/build.lst deleted file mode 100644 index a552106b59f7..000000000000 --- a/ure_top/prj/build.lst +++ /dev/null @@ -1 +0,0 @@ -up ure_pack :: ure bridges cli_ure cppu cppuhelper cpputools io javaunohelper jurt jvmaccess jvmfwk libxml2 readlicense_oo registry remotebridges ridljar sal salhelper stlport stoc store udkapi ure From 8fb94ad47fa73514ec1854825d63d612121dd9b7 Mon Sep 17 00:00:00 2001 From: Release Engineers Date: Thu, 24 Sep 2009 22:39:01 +0000 Subject: [PATCH 24/56] Create DEV300_m60 milestone tag from trunk@276428 From a2c915bbd6b28ca2ad39800ba768464f73981145 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 25 Sep 2009 10:47:57 +0200 Subject: [PATCH 25/56] removing ure_top; was added by accident --- ure_top/prj/build.lst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 ure_top/prj/build.lst diff --git a/ure_top/prj/build.lst b/ure_top/prj/build.lst deleted file mode 100644 index a552106b59f7..000000000000 --- a/ure_top/prj/build.lst +++ /dev/null @@ -1 +0,0 @@ -up ure_pack :: ure bridges cli_ure cppu cppuhelper cpputools io javaunohelper jurt jvmaccess jvmfwk libxml2 readlicense_oo registry remotebridges ridljar sal salhelper stlport stoc store udkapi ure From d280fada4056f6e1a9db7b4f6adf58c547864270 Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 13 Oct 2009 13:03:26 +0200 Subject: [PATCH 26/56] #i105639# made two functions const (patch by cmc) --- sal/inc/osl/thread.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sal/inc/osl/thread.hxx b/sal/inc/osl/thread.hxx index 0df24e07587a..b770120c167e 100644 --- a/sal/inc/osl/thread.hxx +++ b/sal/inc/osl/thread.hxx @@ -117,7 +117,7 @@ public: osl_joinWithThread(m_hThread); } - sal_Bool SAL_CALL isRunning() + sal_Bool SAL_CALL isRunning() const { return osl_isThreadRunning(m_hThread); } @@ -128,7 +128,7 @@ public: osl_setThreadPriority(m_hThread, Priority); } - oslThreadPriority SAL_CALL getPriority() + oslThreadPriority SAL_CALL getPriority() const { return m_hThread ? osl_getThreadPriority(m_hThread) : osl_Thread_PriorityUnknown; } From 4e9db26ac86b8e140cc90094d0ab38cfed964e15 Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 13 Oct 2009 13:09:45 +0200 Subject: [PATCH 27/56] #i105348# get rid of LinuxThread-specific code (NPTL define) --- sal/osl/unx/process.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c index a1f47cdf76a5..7966651bed86 100644 --- a/sal/osl/unx/process.c +++ b/sal/osl/unx/process.c @@ -490,11 +490,6 @@ static void ChildStatusProc(void *pData) for (i = 0; data.m_pszEnv[i] != NULL; i++) putenv(data.m_pszEnv[i]); -#if defined(LINUX) && !defined(NPTL) - /* mfe: linux likes to have just one thread when the exec family is called */ - /* this np function has this purpose ... */ - pthread_kill_other_threads_np(); -#endif OSL_TRACE("ChildStatusProc : starting '%s'",data.m_pszArgs[0]); /* Connect std IO to pipe ends */ From 28e6a67615184ee13a032e662d17d535e4822fa7 Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 20 Oct 2009 15:26:49 +0200 Subject: [PATCH 28/56] #i106074# silence extra warnings with GCC Fortify Source (patch by cmc) --- sal/osl/unx/process.c | 50 +++++++++++++++++++++++-------------------- sal/osl/unx/profile.c | 12 +++++------ 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c index 7966651bed86..6745c8ba543c 100644 --- a/sal/osl/unx/process.c +++ b/sal/osl/unx/process.c @@ -432,9 +432,8 @@ oslSocket osl_receiveResourcePipe(oslPipe pPipe) static void ChildStatusProc(void *pData) { int i; -/* int first = 0;*/ - pid_t pid; -/* int status;*/ + pid_t pid = -1; + int status = 0; int channel[2]; ProcessData data; ProcessData *pdata; @@ -447,23 +446,26 @@ static void ChildStatusProc(void *pData) in our child process */ memcpy(&data, pData, sizeof(data)); - socketpair(AF_UNIX, SOCK_STREAM, 0, channel); + if (socketpair(AF_UNIX, SOCK_STREAM, 0, channel) == -1) + status = errno; fcntl(channel[0], F_SETFD, FD_CLOEXEC); fcntl(channel[1], F_SETFD, FD_CLOEXEC); /* Create redirected IO pipes */ + if ( status == 0 && data.m_pInputWrite ) + if (pipe( stdInput ) == -1) + status = errno; - if ( data.m_pInputWrite ) - pipe( stdInput ); + if ( status == 0 && data.m_pOutputRead ) + if (pipe( stdOutput ) == -1) + status = errno; - if ( data.m_pOutputRead ) - pipe( stdOutput ); + if ( status == 0 && data.m_pErrorRead ) + if (pipe( stdError ) == -1) + status = errno; - if ( data.m_pErrorRead ) - pipe( stdError ); - - if ((pid = fork()) == 0) + if ( (status == 0) && ((pid = fork()) == 0) ) { /* Child */ if (channel[0] != -1) close(channel[0]); @@ -481,12 +483,12 @@ static void ChildStatusProc(void *pData) #endif } - if ((data.m_uid == (uid_t)-1) || ((data.m_uid == getuid()) && (data.m_gid == getgid()))) + int chstatus = 0; + if (data.m_pszDir) + chstatus = chdir(data.m_pszDir); + if (chstatus == 0 && ((data.m_uid == (uid_t)-1) || ((data.m_uid == getuid()) && (data.m_gid == getgid())))) { - if (data.m_pszDir) - chdir(data.m_pszDir); - for (i = 0; data.m_pszEnv[i] != NULL; i++) putenv(data.m_pszEnv[i]); @@ -532,7 +534,9 @@ static void ChildStatusProc(void *pData) OSL_TRACE("ChildStatusProc : starting '%s' failed",data.m_pszArgs[0]); /* if we reach here, something went wrong */ - write(channel[1], &errno, sizeof(errno)); + sal_Int32 nWrote = write(channel[1], &errno, sizeof(errno)); + if (nWrote != sizeof(errno)) + OSL_TRACE("sendFdPipe : sending failed (%s)",strerror(errno)); if (channel[1] != -1) close(channel[1]); @@ -540,8 +544,6 @@ static void ChildStatusProc(void *pData) } else { /* Parent */ - int status; - if (channel[1] != -1) close(channel[1]); /* Close unused pipe ends */ @@ -549,15 +551,17 @@ static void ChildStatusProc(void *pData) if (stdOutput[1] != -1) close( stdOutput[1] ); if (stdError[1] != -1) close( stdError[1] ); - while (((i = read(channel[0], &status, sizeof(status))) < 0)) + if (pid > 0) { - if (errno != EINTR) - break; + while (((i = read(channel[0], &status, sizeof(status))) < 0)) + { + if (errno != EINTR) + break; + } } if (channel[0] != -1) close(channel[0]); - if ((pid > 0) && (i == 0)) { pid_t child_pid; diff --git a/sal/osl/unx/profile.c b/sal/osl/unx/profile.c index a01d292e23b6..a0ea4c59ffdd 100644 --- a/sal/osl/unx/profile.c +++ b/sal/osl/unx/profile.c @@ -263,12 +263,9 @@ static oslProfile SAL_CALL osl_psz_openProfile(const sal_Char *pszProfileName, o pProfile->m_Stamp = OslProfile_getFileStamp(pFile); bRet=loadProfile(pFile, pProfile); + bRet &= realpath(pszProfileName, pProfile->m_FileName) != NULL; OSL_ASSERT(bRet); - /* #109261# using osl profiles is deprecated */ - /* OSL_VERIFY(NULL != realpath(pszProfileName, pProfile->m_FileName)); */ - realpath(pszProfileName, pProfile->m_FileName); - if (pProfile->m_pFile == NULL) closeFileImpl(pFile,pProfile->m_Flags); @@ -1338,6 +1335,7 @@ static osl_TStamp closeFileImpl(osl_TFile* pFile, oslProfileOption Flags) static sal_Bool OslProfile_rewindFile(osl_TFile* pFile, sal_Bool bTruncate) { + sal_Bool bRet = sal_True; #ifdef TRACE_OSL_PROFILE OSL_TRACE("In osl_OslProfile_rewindFile\n"); #endif @@ -1349,14 +1347,14 @@ static sal_Bool OslProfile_rewindFile(osl_TFile* pFile, sal_Bool bTruncate) #ifdef DEBUG_OSL_PROFILE OSL_TRACE("rewinding\n"); #endif - lseek(pFile->m_Handle, SEEK_SET, 0L); + bRet = (lseek(pFile->m_Handle, SEEK_SET, 0L) == 0L); if (bTruncate) { #ifdef DEBUG_OSL_PROFILE OSL_TRACE("truncating\n"); #endif - ftruncate(pFile->m_Handle, 0L); + bRet &= (ftruncate(pFile->m_Handle, 0L) == 0); } } @@ -1364,7 +1362,7 @@ static sal_Bool OslProfile_rewindFile(osl_TFile* pFile, sal_Bool bTruncate) #ifdef TRACE_OSL_PROFILE OSL_TRACE("Out osl_OslProfile_rewindFile [ok]\n"); #endif - return (sal_True); + return bRet; } From 40a156995c9a39cd5de0efaa0ddcc163515bf70a Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 20 Oct 2009 15:32:17 +0200 Subject: [PATCH 29/56] #i106074# silence warning about potentially uninitialized variable in previous change --- sal/osl/unx/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c index 6745c8ba543c..453d00091c63 100644 --- a/sal/osl/unx/process.c +++ b/sal/osl/unx/process.c @@ -431,7 +431,6 @@ oslSocket osl_receiveResourcePipe(oslPipe pPipe) static void ChildStatusProc(void *pData) { - int i; pid_t pid = -1; int status = 0; int channel[2]; @@ -489,6 +488,7 @@ static void ChildStatusProc(void *pData) if (chstatus == 0 && ((data.m_uid == (uid_t)-1) || ((data.m_uid == getuid()) && (data.m_gid == getgid())))) { + int i; for (i = 0; data.m_pszEnv[i] != NULL; i++) putenv(data.m_pszEnv[i]); @@ -544,6 +544,7 @@ static void ChildStatusProc(void *pData) } else { /* Parent */ + int i = -1; if (channel[1] != -1) close(channel[1]); /* Close unused pipe ends */ From c81e99461e33626ff0ae997379041757231342fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Sch=C3=B6nheit?= Date: Fri, 23 Oct 2009 09:46:03 +0200 Subject: [PATCH 30/56] step 0 of an UNOization of the css.form.(X)FormController implementation: move the API to css.form.runtime, so we can later add new API chunks without breaking compatibility of the existing API in css.form --- offapi/com/sun/star/form/FormController.idl | 105 +----- .../star/form/FormControllerDispatcher.idl | 170 +-------- offapi/com/sun/star/form/XFormController.idl | 53 +-- .../sun/star/form/runtime/FormController.idl | 51 +++ .../sun/star/form/runtime/FormOperations.idl | 4 +- .../sun/star/form/runtime/XFormController.idl | 342 ++++++++++++++++++ .../sun/star/form/runtime/XFormOperations.idl | 6 +- offapi/com/sun/star/form/runtime/makefile.mk | 2 + offapi/com/sun/star/sdb/DataSourceBrowser.idl | 6 +- offapi/com/sun/star/view/XFormLayerAccess.idl | 8 +- 10 files changed, 416 insertions(+), 331 deletions(-) create mode 100644 offapi/com/sun/star/form/runtime/FormController.idl create mode 100644 offapi/com/sun/star/form/runtime/XFormController.idl diff --git a/offapi/com/sun/star/form/FormController.idl b/offapi/com/sun/star/form/FormController.idl index 03e4bffc2074..4bd94946f1c1 100644 --- a/offapi/com/sun/star/form/FormController.idl +++ b/offapi/com/sun/star/form/FormController.idl @@ -84,127 +84,26 @@ module runtime { //============================================================================= -/** specifies a component controlling the interaction between the user and form functionality. - -

As soon as a form (containing controls) is to be presented to the user, - there is a need for an instance controlling the user interaction.
- Such a FormController is responsible for dialog processing, - like controlling the tab order and the grouping of controls.

- -

As a form may contain one or many subforms, a FormController may - contain one or more other FormControllers, so the form model structure or hierarchy - is reflected in the structure of FormControllers.

- -

Responsibilities

-

A FormController is responsible for a UnoControlContainer, - and all controls therein.

- -

Furthermore, a form controller is responsible for preventing invalid user input. That is, if the form - contains controls bound to a database, or to an external validator, then the form controller will - check their current value when the current record is to be saved to the database.

- -

First, it will check whether any controls with an external validator exist. If so, those validators - will be asked to validate the current control content. If this fails, the message provided by the validator - is displayed to the user, the control is focused, and the update of the record is vetoed.

- -

Second, the controls are examined for NULL values. If a control is bound to a database field which - is declared to be NOT NULL, no auto-increment field, but still , then an error - message is shown to the user saying that input is required, the respective control is focused, and - the update of the record is vetoed.

- -

Note that you can precent the second check - for database fields containing values - on - a per-form and a per-database basis.
- For the former, you need to add a boolean property FormsCheckRequiredFields to the form - (aka the FormController's model), using its - XPropertyContainer::addProperty method, with a value - of .
- For the latter, you need to set the respective property of the data source's Settings - (also named FormsCheckRequiredFields) to .

- -

Alternatively, you can prevent the check on a per-control basis, using the - DataAwareControlModel::InputRequired property of a single control model.

- - @see com::sun::star::form::component:Form - @see com::sun::star::awt::XTabController - @see com::sun::star::form::binding::BindableControlModel - @see com::sun::star::sdb::DataSource::Settings +/** is superseded by FormController. + @deprecated */ published service FormController { - /** allows delegating form controller functionality to the component - -

If a control which the controller is responsible for supports the XDispatchProviderInterception - interface, the controller registers a dispatch interceptor. Then, the control can try to delegate part of its - functionality to the controller by querying the dispatch interceptor for it.

- */ [optional] service FormControllerDispatcher; - - /** denotes the instance which is used to implement operations on the form which the controller - works for. - -

This instance can be used, for instance, to determine the current state of certain form features.

- */ [optional, property] ::com::sun::star::form::runtime::XFormOperations FormOperations; /** is used for notifying the (de)activation of the controller. */ interface com::sun::star::form::XFormController; - - /** is used for tab controlling and grouping of the controls. - */ interface com::sun::star::awt::XTabController; - - - /** A FormController may have a parent controller, such as when the related form is a subform. - */ interface com::sun::star::container::XChild; - - - /** A FormController must be disposable. - */ interface com::sun::star::lang::XComponent; - - - /** A FormController must provide access to its sub controllers. - */ interface com::sun::star::container::XEnumerationAccess; - - - /** A FormController must communicate if any of its children (means sub controllers) or contained - controls have been modified. - */ interface com::sun::star::util::XModifyBroadcaster; - - /** used to notify deletions of data in the form before they happen. - -

A form controller listens for deletion events at the form it is responsible for.
- If and only if no XConfirmDeleteListener is registered at - the controller, it uses an own dialog to ask the user for confirmation.

- -

You may use this interface to integrate your own confirmation dialogs.

- */ interface com::sun::star::form::XConfirmDeleteBroadcaster; - - /** used to notify errors which happen in the form the controller is responsible for. - -

A form controller listens for error events at the form it is responsible for.
- If and only if no XSQLErrorListener is registered at the controller, it - uses an own dialog to notify the user of the error.

- - */ interface com::sun::star::sdb::XSQLErrorBroadcaster; - - /** is used for multiplexing row set events happening on the form which the controller is responsible for. - */ interface com::sun::star::sdb::XRowSetApproveBroadcaster; - - /** is used broadcasting parameter events in the form. - -

A form controller listens for parameter events at the form it is responsible for.
- If and only if no XDatabaseParameterListener is registered at the controller, it - uses an own dialog to ask the user for parameter values.

- */ interface com::sun::star::form::XDatabaseParameterBroadcaster; }; diff --git a/offapi/com/sun/star/form/FormControllerDispatcher.idl b/offapi/com/sun/star/form/FormControllerDispatcher.idl index 96cab9ee73f1..8e2513b62102 100644 --- a/offapi/com/sun/star/form/FormControllerDispatcher.idl +++ b/offapi/com/sun/star/form/FormControllerDispatcher.idl @@ -40,177 +40,13 @@ module com { module sun { module star { module form { //============================================================================= -/** specifies a component which can be used to dispatch form controller functionality. +/** is not used anymore, and superseded by FormController and + FormOperations. -

A form controller dispatcher is an instance which provides access to dispatchers - (XDispatch) for certain form controller - functionality.

- -

The way how access to these dispatchers is provided is not defined. It may either - be directly via an XDispatchProvider interface, - or indirectly, e.g. by registering dispatch interceptors (XDispatchProviderInterceptor) - at another instance which supports this (by exposing the XDispatchProviderInterception - interface).

- -

In any scenario, foreign components have a (implicit or explicit) possibility to request a dispatcher - for a given URL.

- -

Below, there's a list of URLs which have a defined meaning - if a FormControllerDispatcher - implementation supports one of them, there must be a guaranteed semantices. However, concrete implementations - may support an arbitrary sub or super set of these URLs.

- -

In general, all URLs start with the same prefix, namely .uno:FormController/. To this, a suffix is - appended which describes the requested functionality.
- Example: The URL suffix for deleting the current record is deleteRecord, so the complete URL for - requesting a dispatcher for this functionality is .uno:FormController/deleteRecord.

- -

Some URLs may require parameters. For this, the sequence of PropertyValues - passed to the XDispatch::dispatch call is used - every property value is - used as one named parameter.

- -

For all URLs, interested parties can register as status listeners (XStatusListener) - at the dispatchers, and be notified whenever the functionality associated with the URL becomes enabled or - disabled.
- For instance, the URL with the suffix moveToFirst is associated with moving the form to the first - record, and it will be disabled in case the form is already positioned on the first record.

- -

Nearly all of the functionality offered by a FormControllerDispatcher can also be - reached by other means. E.g., moving a form to its first record can be achieved by calling the - method XResultSet::first of the form.
- However, the advantage of using a FormControllerDispatcher is that it's usually implemented - by a component which has additional knowledge about the form. For instance, in a document which - displays a form, there might be a control which contains uncommitted changes, plus a control - whose changes were already committed to the current record, but not to the database. Simply - calling XResultSet::first on the form would lose - both the content in the uncommitted control, and the changes in the current record.
- An FormControllerDispatcher is expected to care for both of these.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
URL suffixfunctionality
positionFormpositions the form on a record given by absolute number.
- There's one parameter for this functionality, named Position, which must be a long - value specifying the absolute position to which the form should be moved
RecordCountThis is a passive functionality: It cannot be dispatched, instead, interested parties may - use the dispatcher to add as XStatusListener, and be - notified when the record count changes.
- The status value which is being notified (FeatureStateEvent::State) - is a string which can be used to display the record count. In particular, if the record count is not yet known - (RowSet::IsRowCountFinal is ), this is indicated in the - string, too.
moveToFirstmoves the form to the first record
moveToPrevmoves the form to the record preceding the current one
moveToNextmoves the form to the record after the current one
moveToLastmoves the form to the last record
moveToNewmoves the form to the virtual "insert row", where new records can be inserted
saveRecordCommits any potentially pending changes in the current control, and saves the current record to - the database, or inserts a new record if the form is currently positioned on the virtual insertion row.
undoRecordreverts the changes done to the current record. Basically, this means refreshing the - current row from the database, and updating all controls with the new content.
deleteRecorddeletes the current record, after asking the user for confirmation.
refreshFormreloads the complete form. After this, the form is positioned on the first record
sortUpAdds an order clause to the form, to sort it ascending by the field which the current control is bound to, - and then reloads the form.
sortDownAdds an order clause to the form, to sort it descending by the field which the current control is bound to, - and then reloads the form.
sortopens an dialog, which allows the user to manipulate the current sorting order of the form. If the dialog - is closed with OK, the form is reloaded after setting the new sorting order.
autoFiltercreates, from the current control, a filter for the form. This is, if the current control is bound to - the field, say, "customer", and contains the value "Furs, Inc.", then a filter "customer = 'Furs, Inc.'" - is created and set at the form. After this, the form is reloaded.
filteropens an dialog, which allows the user to manipulate the current filter of the form. If the dialog - is closed with OK, the form is reloaded after setting the new filter.
applyFilter

Toggles the RowSet::ApplyFilter property - of the form.

-

Additionally, status listeners will be provided with the current (boolean) state of this property - in the FeatureStateEvent::State member of the event - notified by the dispatcher.

removeFilterOrdercompletely removes any filter and sorting order from the form, and reloads it.
- - @see FormController + @deprecated */ published service FormControllerDispatcher { - //------------------------------------------------------------------------- - /** allows direct access to the dispatchers provided by the component. - */ [optional] interface com::sun::star::frame::XDispatchProvider; }; diff --git a/offapi/com/sun/star/form/XFormController.idl b/offapi/com/sun/star/form/XFormController.idl index 832ec077b264..e1ca56c0b276 100644 --- a/offapi/com/sun/star/form/XFormController.idl +++ b/offapi/com/sun/star/form/XFormController.idl @@ -49,57 +49,14 @@ //============================================================================= -/** provides functionality to control the activation of forms controls. - -

There is a duality of forms (DataForm) - and form controllers. In a document view, for every loaded form there is a form controller which is - responsible for exactly the controls which's models are direct children of the form.
- - In some sense, a form controller is the view representation of a form, like a form control is the - view representation of a form control model.
- - This is also reflected in this interface: If you call - XTabController::getModel on a form controller, the form which - the controller is responsible for will be returned.
- - As always in the model-view-paradigm, there is no way from a model to its controller, mostly, because for - one given form, there is one controller for every view of the document.

- -

A controller is called active if one of the controls it is responsible for has the focus, - else inactive. To be notified whenever this activation state of a given controller changes, you can - add listeners.

- - @see com::sun::star::form::component::Form +/** is superseded by XFormController. + @deprecated */ published interface XFormController: com::sun::star::awt::XTabController { - //------------------------------------------------------------------------- - - /** access to the currently active control - - @returns - the currently active control, or if there is no such control - */ - com::sun::star::awt::XControl getCurrentControl(); - - //------------------------------------------------------------------------- - - /** adds the specified listener to receive notifications whenever the activation state of - the controller changes. - - @param l - the listener to add. - */ - [oneway] void addActivateListener( [in] com::sun::star::form::XFormControllerListener l ); - - //------------------------------------------------------------------------- - - /** removes the specified listener - - @param l - the listener to remove. - */ - [oneway] void removeActivateListener( [in] com::sun::star::form::XFormControllerListener l ); + ::com::sun::star::awt::XControl getCurrentControl(); + [oneway] void addActivateListener( [in] ::com::sun::star::form::XFormControllerListener l ); + [oneway] void removeActivateListener( [in] ::com::sun::star::form::XFormControllerListener l ); }; diff --git a/offapi/com/sun/star/form/runtime/FormController.idl b/offapi/com/sun/star/form/runtime/FormController.idl new file mode 100644 index 000000000000..17501ffa162c --- /dev/null +++ b/offapi/com/sun/star/form/runtime/FormController.idl @@ -0,0 +1,51 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2009 by Sun Microsystems, Inc. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +#ifndef __offapi_com_sun_star_form_runtime_FormController_idl__ +#define __offapi_com_sun_star_form_runtime_FormController_idl__ + +#include + +//============================================================================= + +module com { module sun { module star { module form { module runtime { + +//============================================================================= + +/** specifies a component controlling the interaction between the user and multiple + form controls belonging to a single form. + */ +service FormController +{ + interface XFormController; +}; + +//============================================================================= + +}; }; }; }; }; + +//============================================================================= + +#endif diff --git a/offapi/com/sun/star/form/runtime/FormOperations.idl b/offapi/com/sun/star/form/runtime/FormOperations.idl index c9390ac25918..984a09e0d7c4 100644 --- a/offapi/com/sun/star/form/runtime/FormOperations.idl +++ b/offapi/com/sun/star/form/runtime/FormOperations.idl @@ -34,8 +34,8 @@ #ifndef __com_sun_star_form_runtime_XFormOperations_idl__ #include #endif -#ifndef __com_sun_star_form_XFormController_idl__ -#include +#ifndef __com_sun_star_form_runtime_XFormController_idl__ +#include #endif #ifndef __com_sun_star_form_XForm_idl__ #include diff --git a/offapi/com/sun/star/form/runtime/XFormController.idl b/offapi/com/sun/star/form/runtime/XFormController.idl new file mode 100644 index 000000000000..76081bc82fe2 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/XFormController.idl @@ -0,0 +1,342 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2009 by Sun Microsystems, Inc. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +#ifndef __offapi_com_sun_star_form_runtime_XFormController_idl__ +#define __offapi_com_sun_star_form_runtime_XFormController_idl__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//============================================================================= + +module com { module sun { module star { module form { module runtime { + +interface XFormOperations; + +//============================================================================= + +/** specifies a component controlling the interaction between the user and form functionality. + +

As soon as a form (containing controls) is to be presented to the user, + there is a need for an instance controlling the user interaction.
+ Such a FormController is responsible for dialog processing, + like controlling the tab order and the grouping of controls.

+ +

As a form may contain one or many subforms, a FormController may + contain one or more other FormControllers, so the form model structure or hierarchy + is reflected in the structure of FormControllers. That is, retrieving the parent of + the model of a controller will give you the same object as retrieving the model of the parent of + the controller. Similarly, retrieving the model of the nth child of + a controller gives you the same object as retrieving the nth child of + the model of the controller.

+ +

A controller is called active if one of the controls it is responsible for has the focus, + else inactive. To be notified whenever this activation state of a given controller changes, you can + add listeners.

+ +

This interface supersedes the FormController.

+ +

Responsibilities

+

A FormController is responsible for a UnoControlContainer, + and all controls therein.

+ +

Furthermore, a form controller is responsible for preventing invalid user input. That is, if the form + contains controls bound to a database, or to an external validator, then the form controller will + check their current value when the current record is to be saved to the database.

+ +

First, it will check whether any controls with an external validator exist. If so, those validators + will be asked to validate the current control content. If this fails, the message provided by the validator + is displayed to the user, the control is focused, and the update of the record is vetoed.

+ +

Second, the controls are examined for NULL values. If a control is bound to a database field which + is declared to be NOT NULL, no auto-increment field, but still , then an error + message is shown to the user saying that input is required, the respective control is focused, and + the update of the record is vetoed.

+ +

Note that you can precent the second check - for database fields containing values - on + a per-form and a per-database basis.
+ For the former, you need to add a boolean property FormsCheckRequiredFields to the form + (aka the FormController's model), using its + XPropertyContainer::addProperty method, with a value + of .
+ For the latter, you need to set the respective property of the data source's Settings + (also named FormsCheckRequiredFields) to .

+ +

Alternatively, you can prevent the check on a per-control basis, using the + DataAwareControlModel::InputRequired property of a single control model.

+ +

If a control which the controller is responsible for supports the XDispatchProviderInterception + interface, the controller registers a dispatch interceptor. Then, the control can try to delegate part of its + functionality to the controller by querying the dispatch interceptor for it.

+ +

Below, there's a list of URLs which have a defined meaning - if an implementation supports one of them, + there must be a guaranteed semantices. However, concrete implementations may support an arbitrary sub or super + set of these URLs.

+ +

In general, all URLs start with the same prefix, namely .uno:FormController/. To this, a suffix is + appended which describes the requested functionality.
+ Example: The URL suffix for deleting the current record is deleteRecord, so the complete URL for + requesting a dispatcher for this functionality is .uno:FormController/deleteRecord.

+ +

Some URLs may require parameters. For this, the sequence of PropertyValues + passed to the XDispatch::dispatch call is used - every property value is + used as one named parameter.

+ +

For all URLs, interested parties can register as status listeners (XStatusListener) + at the dispatchers, and be notified whenever the functionality associated with the URL becomes enabled or + disabled.
+ For instance, the URL with the suffix moveToFirst is associated with moving the form to the first + record, and it will be disabled in case the form is already positioned on the first record.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
URL suffixfunctionality
positionFormpositions the form on a record given by absolute number.
+ There's one parameter for this functionality, named Position, which must be a long + value specifying the absolute position to which the form should be moved
RecordCountThis is a passive functionality: It cannot be dispatched, instead, interested parties may + use the dispatcher to add as XStatusListener, and be + notified when the record count changes.
+ The status value which is being notified (FeatureStateEvent::State) + is a string which can be used to display the record count. In particular, if the record count is not yet known + (RowSet::IsRowCountFinal is ), this is indicated in the + string, too.
moveToFirstmoves the form to the first record
moveToPrevmoves the form to the record preceding the current one
moveToNextmoves the form to the record after the current one
moveToLastmoves the form to the last record
moveToNewmoves the form to the virtual "insert row", where new records can be inserted
saveRecordCommits any potentially pending changes in the current control, and saves the current record to + the database, or inserts a new record if the form is currently positioned on the virtual insertion row.
undoRecordreverts the changes done to the current record. Basically, this means refreshing the + current row from the database, and updating all controls with the new content.
deleteRecorddeletes the current record, after asking the user for confirmation.
refreshFormreloads the complete form. After this, the form is positioned on the first record
sortUpAdds an order clause to the form, to sort it ascending by the field which the current control is bound to, + and then reloads the form.
sortDownAdds an order clause to the form, to sort it descending by the field which the current control is bound to, + and then reloads the form.
sortopens an dialog, which allows the user to manipulate the current sorting order of the form. If the dialog + is closed with OK, the form is reloaded after setting the new sorting order.
autoFiltercreates, from the current control, a filter for the form. This is, if the current control is bound to + the field, say, "customer", and contains the value "Furs, Inc.", then a filter "customer = 'Furs, Inc.'" + is created and set at the form. After this, the form is reloaded.
filteropens an dialog, which allows the user to manipulate the current filter of the form. If the dialog + is closed with OK, the form is reloaded after setting the new filter.
applyFilter

Toggles the RowSet::ApplyFilter property + of the form.

+

Additionally, status listeners will be provided with the current (boolean) state of this property + in the FeatureStateEvent::State member of the event + notified by the dispatcher.

removeFilterOrdercompletely removes any filter and sorting order from the form, and reloads it.
+ + @see ::com::sun::star::form::component:Form + @see ::com::sun::star::form::binding::BindableControlModel + @see ::com::sun::star::sdb::DataSource::Settings + */ +interface XFormController +{ + /** is used for tab controlling and grouping of the controls. + +

The model obtained via XTabController::getModel is the form for which the + controller is responsible.

+ */ + interface ::com::sun::star::awt::XTabController; + + /** allows access to the parent controller. + */ + interface ::com::sun::star::container::XChild; + + /** allows access to the sub controllers. + */ + interface ::com::sun::star::container::XIndexAccess; + + /** allows enumerating sub controllers + */ + interface ::com::sun::star::container::XEnumerationAccess; + + /** allows life time control of the controller. + */ + interface ::com::sun::star::lang::XComponent; + + /** allows to register as listener for modifications in the controls which the controller is responsible + for. + */ + interface ::com::sun::star::util::XModifyBroadcaster; + + /** used to notify deletions of data in the form before they happen. + +

A form controller listens for deletion events at the form it is responsible for. If and only if no + XConfirmDeleteListener is registered at + the controller, it uses an own dialog to ask the user for confirmation.

+ */ + interface ::com::sun::star::form::XConfirmDeleteBroadcaster; + + /** is used to notify errors which happen in the form the controller is responsible for. + +

A form controller listens for error events at the form it is responsible for. If and only if no + XSQLErrorListener is registered at the controller, it + uses an own dialog to notify the user of the error.

+ + */ + interface ::com::sun::star::sdb::XSQLErrorBroadcaster; + + /** is used for multiplexing row set events happening on the form which the controller is responsible for. + */ + interface ::com::sun::star::sdb::XRowSetApproveBroadcaster; + + /** is used broadcasting parameter events in the form. + +

A form controller listens for parameter events at the form it is responsible for. If and only if no + XDatabaseParameterListener is registered at the controller, it + uses an own dialog to ask the user for parameter values.

+ */ + interface ::com::sun::star::form::XDatabaseParameterBroadcaster2; + + /** allows switching the form controller to different operation modes. + +

The two modes usually (but not necessarily) supported by a form controller are the DataMode + and the FilterMode, where the former is the usual modus operandi for displaying and modifying + data, and the latter is a special mode to enter a filter for the database form which the controller is + responsible for.

+ */ + interface ::com::sun::star::util::XModeSelector; + + /** denotes the instance which is used to implement operations on the form which the controller + works for. + +

This instance can be used, for instance, to determine the current state of certain form features.

+ */ + [attribute, readonly] XFormOperations FormOperations; + + /** provicdes access to the currently active control + */ + [attribute, readonly] ::com::sun::star::awt::XControl CurrentControl; + + /** adds the specified listener to receive notifications whenever the activation state of + the controller changes. + */ + void addActivateListener( [in] com::sun::star::form::XFormControllerListener _Listener ); + + /** removes the specified listener from the list of components to receive notifications whenever the activation + state of the controller changes. + */ + void removeActivateListener( [in] com::sun::star::form::XFormControllerListener _Listener ); +}; + +//============================================================================= + +}; }; }; }; }; + +//============================================================================= + +#endif diff --git a/offapi/com/sun/star/form/runtime/XFormOperations.idl b/offapi/com/sun/star/form/runtime/XFormOperations.idl index 24552584aa29..10b568923ec5 100644 --- a/offapi/com/sun/star/form/runtime/XFormOperations.idl +++ b/offapi/com/sun/star/form/runtime/XFormOperations.idl @@ -44,8 +44,8 @@ #ifndef __com_sun_star_sdbc_XResultSetUpdate_idl__ #include #endif -#ifndef __com_sun_star_form_XFormController_idl__ -#include +#ifndef __com_sun_star_form_runtime_XFormController_idl__ +#include #endif #ifndef __com_sun_star_lang_IllegalArgumentException_idl__ #include @@ -115,7 +115,7 @@ interface XFormOperations : ::com::sun::star::lang::XComponent case some functionality will not be available. In particular, every feature which relies on the active control of the controller might be of limited use.

*/ - [attribute, readonly] ::com::sun::star::form::XFormController Controller; + [attribute, readonly] ::com::sun::star::form::runtime::XFormController Controller; /** retrieves the current state of the given feature diff --git a/offapi/com/sun/star/form/runtime/makefile.mk b/offapi/com/sun/star/form/runtime/makefile.mk index 81c66826793b..18d59244ddda 100644 --- a/offapi/com/sun/star/form/runtime/makefile.mk +++ b/offapi/com/sun/star/form/runtime/makefile.mk @@ -45,7 +45,9 @@ IDLFILES=\ FeatureState.idl\ FormFeature.idl \ FormOperations.idl \ + FormController.idl \ XFeatureInvalidation.idl \ + XFormController.idl \ XFormOperations.idl \ # ------------------------------------------------------------------ diff --git a/offapi/com/sun/star/sdb/DataSourceBrowser.idl b/offapi/com/sun/star/sdb/DataSourceBrowser.idl index 36c73ae9da2c..0690321608a4 100644 --- a/offapi/com/sun/star/sdb/DataSourceBrowser.idl +++ b/offapi/com/sun/star/sdb/DataSourceBrowser.idl @@ -168,13 +168,11 @@ published service DataSourceBrowser

With a data source browser implementing this interface, external components have access to

  • the grid control which is used to display the currently selected table/query - (see - XFormController::getControls() - ) + (see XTabController::getControls)
  • the data form used for displaying objects. As always for components implementing this service, the object returned by - XTabController::getModel()isadataform. + XTabController::getModelis a dataform.

diff --git a/offapi/com/sun/star/view/XFormLayerAccess.idl b/offapi/com/sun/star/view/XFormLayerAccess.idl index a5a96dd31e5d..16d8fb5137c3 100644 --- a/offapi/com/sun/star/view/XFormLayerAccess.idl +++ b/offapi/com/sun/star/view/XFormLayerAccess.idl @@ -37,8 +37,8 @@ #ifndef __com_sun_star_form_XForm_idl__ #include #endif -#ifndef __com_sun_star_form_XFormController_idl__ -#include +#ifndef __com_sun_star_form_runtime_XFormController_idl__ +#include #endif #ifndef __com_sun_star_lang_IllegalArgumentException_idl__ #include @@ -73,10 +73,10 @@ interface XFormLayerAccess @see isDesignMode @see setDesignMode - @see ::com::sun::star::form::FormController + @see ::com::sun::star::form::runtime::FormController @see ::com::sun::star::form::runtime::FormOperations */ - ::com::sun::star::form::XFormController + ::com::sun::star::form::runtime::XFormController getFormController( [in] ::com::sun::star::form::XForm Form ); From a829048a41fa7f0923d9360eb948ff398e33b586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Sch=C3=B6nheit?= Date: Fri, 23 Oct 2009 12:18:08 +0200 Subject: [PATCH 31/56] #i106184# added VerticalAlign property --- .../com/sun/star/awt/UnoControlCurrencyFieldModel.idl | 11 +++++++++++ offapi/com/sun/star/awt/UnoControlDateFieldModel.idl | 11 +++++++++++ offapi/com/sun/star/awt/UnoControlEditModel.idl | 11 +++++++++++ .../com/sun/star/awt/UnoControlFileControlModel.idl | 10 ++++++++++ .../sun/star/awt/UnoControlFormattedFieldModel.idl | 11 +++++++++++ .../com/sun/star/awt/UnoControlNumericFieldModel.idl | 11 +++++++++++ .../com/sun/star/awt/UnoControlPatternFieldModel.idl | 11 +++++++++++ offapi/com/sun/star/awt/UnoControlTimeFieldModel.idl | 11 +++++++++++ 8 files changed, 87 insertions(+) diff --git a/offapi/com/sun/star/awt/UnoControlCurrencyFieldModel.idl b/offapi/com/sun/star/awt/UnoControlCurrencyFieldModel.idl index 17f72a2be100..6a7a49b826df 100644 --- a/offapi/com/sun/star/awt/UnoControlCurrencyFieldModel.idl +++ b/offapi/com/sun/star/awt/UnoControlCurrencyFieldModel.idl @@ -42,6 +42,9 @@ #include #endif +#ifndef __com_sun_star_style_VerticalAlignment_idl__ +#include +#endif //============================================================================= @@ -262,6 +265,14 @@ published service UnoControlCurrencyFieldModel this is possible.

*/ [optional, property] short MouseWheelBehavior; + + //------------------------------------------------------------------------- + + /** specifies the vertical alignment of the text in the control. + + @since OpenOffice.org 3.3 + */ + [optional, property] com::sun::star::style::VerticalAlignment VerticalAlign; }; //============================================================================= diff --git a/offapi/com/sun/star/awt/UnoControlDateFieldModel.idl b/offapi/com/sun/star/awt/UnoControlDateFieldModel.idl index d14f602e817a..e5f8207e1ae9 100644 --- a/offapi/com/sun/star/awt/UnoControlDateFieldModel.idl +++ b/offapi/com/sun/star/awt/UnoControlDateFieldModel.idl @@ -42,6 +42,9 @@ #include #endif +#ifndef __com_sun_star_style_VerticalAlignment_idl__ +#include +#endif //============================================================================= @@ -274,6 +277,14 @@ published service UnoControlDateFieldModel this is possible.

*/ [optional, property] short MouseWheelBehavior; + + //------------------------------------------------------------------------- + + /** specifies the vertical alignment of the text in the control. + + @since OpenOffice.org 3.3 + */ + [optional, property] com::sun::star::style::VerticalAlignment VerticalAlign; }; //============================================================================= diff --git a/offapi/com/sun/star/awt/UnoControlEditModel.idl b/offapi/com/sun/star/awt/UnoControlEditModel.idl index 705c9f206030..708af3edaaca 100644 --- a/offapi/com/sun/star/awt/UnoControlEditModel.idl +++ b/offapi/com/sun/star/awt/UnoControlEditModel.idl @@ -42,6 +42,9 @@ #include #endif +#ifndef __com_sun_star_style_VerticalAlignment_idl__ +#include +#endif //============================================================================= @@ -274,6 +277,14 @@ published service UnoControlEditModel @since OOo 3.1 */ [optional, property] short WritingMode; + + //------------------------------------------------------------------------- + + /** specifies the vertical alignment of the text in the control. + + @since OpenOffice.org 3.3 + */ + [optional, property] com::sun::star::style::VerticalAlignment VerticalAlign; }; //============================================================================= diff --git a/offapi/com/sun/star/awt/UnoControlFileControlModel.idl b/offapi/com/sun/star/awt/UnoControlFileControlModel.idl index eafde096fd73..aba49c351400 100644 --- a/offapi/com/sun/star/awt/UnoControlFileControlModel.idl +++ b/offapi/com/sun/star/awt/UnoControlFileControlModel.idl @@ -42,6 +42,9 @@ #include #endif +#ifndef __com_sun_star_style_VerticalAlignment_idl__ +#include +#endif //============================================================================= @@ -169,6 +172,13 @@ published service UnoControlFileControlModel */ [property] com::sun::star::util::Color TextLineColor; + //------------------------------------------------------------------------- + + /** specifies the vertical alignment of the text in the control. + + @since OpenOffice.org 3.3 + */ + [optional, property] com::sun::star::style::VerticalAlignment VerticalAlign; }; //============================================================================= diff --git a/offapi/com/sun/star/awt/UnoControlFormattedFieldModel.idl b/offapi/com/sun/star/awt/UnoControlFormattedFieldModel.idl index 1575e1f6d6a6..a4c8bff2db3f 100644 --- a/offapi/com/sun/star/awt/UnoControlFormattedFieldModel.idl +++ b/offapi/com/sun/star/awt/UnoControlFormattedFieldModel.idl @@ -46,6 +46,9 @@ #include #endif +#ifndef __com_sun_star_style_VerticalAlignment_idl__ +#include +#endif //============================================================================= @@ -307,6 +310,14 @@ published service UnoControlFormattedFieldModel this is possible.

*/ [optional, property] short MouseWheelBehavior; + + //------------------------------------------------------------------------- + + /** specifies the vertical alignment of the text in the control. + + @since OpenOffice.org 3.3 + */ + [optional, property] com::sun::star::style::VerticalAlignment VerticalAlign; }; //============================================================================= diff --git a/offapi/com/sun/star/awt/UnoControlNumericFieldModel.idl b/offapi/com/sun/star/awt/UnoControlNumericFieldModel.idl index 4846980a974c..8db4dec74d4b 100644 --- a/offapi/com/sun/star/awt/UnoControlNumericFieldModel.idl +++ b/offapi/com/sun/star/awt/UnoControlNumericFieldModel.idl @@ -42,6 +42,9 @@ #include #endif +#ifndef __com_sun_star_style_VerticalAlignment_idl__ +#include +#endif //============================================================================= @@ -250,6 +253,14 @@ published service UnoControlNumericFieldModel this is possible.

*/ [optional, property] short MouseWheelBehavior; + + //------------------------------------------------------------------------- + + /** specifies the vertical alignment of the text in the control. + + @since OpenOffice.org 3.3 + */ + [optional, property] com::sun::star::style::VerticalAlignment VerticalAlign; }; //============================================================================= diff --git a/offapi/com/sun/star/awt/UnoControlPatternFieldModel.idl b/offapi/com/sun/star/awt/UnoControlPatternFieldModel.idl index b3bb7691e333..a155588191ca 100644 --- a/offapi/com/sun/star/awt/UnoControlPatternFieldModel.idl +++ b/offapi/com/sun/star/awt/UnoControlPatternFieldModel.idl @@ -42,6 +42,9 @@ #include #endif +#ifndef __com_sun_star_style_VerticalAlignment_idl__ +#include +#endif //============================================================================= @@ -209,6 +212,14 @@ published service UnoControlPatternFieldModel this is possible.

*/ [optional, property] short MouseWheelBehavior; + + //------------------------------------------------------------------------- + + /** specifies the vertical alignment of the text in the control. + + @since OpenOffice.org 3.3 + */ + [optional, property] com::sun::star::style::VerticalAlignment VerticalAlign; }; //============================================================================= diff --git a/offapi/com/sun/star/awt/UnoControlTimeFieldModel.idl b/offapi/com/sun/star/awt/UnoControlTimeFieldModel.idl index 79bed704660f..0412ebc8c129 100644 --- a/offapi/com/sun/star/awt/UnoControlTimeFieldModel.idl +++ b/offapi/com/sun/star/awt/UnoControlTimeFieldModel.idl @@ -42,6 +42,9 @@ #include #endif +#ifndef __com_sun_star_style_VerticalAlignment_idl__ +#include +#endif //============================================================================= @@ -254,6 +257,14 @@ published service UnoControlTimeFieldModel this is possible.

*/ [optional, property] short MouseWheelBehavior; + + //------------------------------------------------------------------------- + + /** specifies the vertical alignment of the text in the control. + + @since OpenOffice.org 3.3 + */ + [optional, property] com::sun::star::style::VerticalAlignment VerticalAlign; }; //============================================================================= From ee4945697ac3b2b4f65105f5eb3fb7a108850c28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Sch=C3=B6nheit?= Date: Fri, 23 Oct 2009 16:03:52 +0200 Subject: [PATCH 32/56] step 1 of the FormController UNOization: base the outgoing calls in the FormController implementation on (new) UNO API, instead of using implementation classes --- .../sun/star/form/runtime/XFormController.idl | 10 ++++ .../form/runtime/XFormControllerContext.idl | 57 +++++++++++++++++++ offapi/com/sun/star/form/runtime/makefile.mk | 1 + 3 files changed, 68 insertions(+) create mode 100644 offapi/com/sun/star/form/runtime/XFormControllerContext.idl diff --git a/offapi/com/sun/star/form/runtime/XFormController.idl b/offapi/com/sun/star/form/runtime/XFormController.idl index 76081bc82fe2..9c306eeb7857 100644 --- a/offapi/com/sun/star/form/runtime/XFormController.idl +++ b/offapi/com/sun/star/form/runtime/XFormController.idl @@ -38,12 +38,14 @@ #include #include #include +#include //============================================================================= module com { module sun { module star { module form { module runtime { interface XFormOperations; +interface XFormControllerContext; //============================================================================= @@ -322,6 +324,14 @@ interface XFormController */ [attribute, readonly] ::com::sun::star::awt::XControl CurrentControl; + /** allows to delegate certain tasks to the context of the form controller + */ + [attribute] XFormControllerContext Context; + + /** used (if not ) for user interactions triggered by the form controller. + */ + [attribute] ::com::sun::star::task::XInteractionHandler InteractionHandler; + /** adds the specified listener to receive notifications whenever the activation state of the controller changes. */ diff --git a/offapi/com/sun/star/form/runtime/XFormControllerContext.idl b/offapi/com/sun/star/form/runtime/XFormControllerContext.idl new file mode 100644 index 000000000000..da0999ee17a7 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/XFormControllerContext.idl @@ -0,0 +1,57 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2009 by Sun Microsystems, Inc. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +#ifndef __offapi_com_sun_star_form_runtime_XFormControllerContext_idl__ +#define __offapi_com_sun_star_form_runtime_XFormControllerContext_idl__ + +#include + +//============================================================================= + +module com { module sun { module star { module form { module runtime { + +//============================================================================= + +/** provides a context for a FormController + +

A FormController knows about the controls it is responsible + for, and about the control container which those controls live in. However, it doesn't know + about a possible larger context, like a scrollable view which the controls are embedded into. + To compensate this, it can be provided a XFormControllerContext.

+ */ +interface XFormControllerContext +{ + /** ensures the given control is visible, by scrolling the view if necessary. + */ + void makeVisible( [in] ::com::sun::star::awt::XControl _Control ); +}; + +//============================================================================= + +}; }; }; }; }; + +//============================================================================= + +#endif diff --git a/offapi/com/sun/star/form/runtime/makefile.mk b/offapi/com/sun/star/form/runtime/makefile.mk index 18d59244ddda..b13879e1f65a 100644 --- a/offapi/com/sun/star/form/runtime/makefile.mk +++ b/offapi/com/sun/star/form/runtime/makefile.mk @@ -48,6 +48,7 @@ IDLFILES=\ FormController.idl \ XFeatureInvalidation.idl \ XFormController.idl \ + XFormControllerContext.idl \ XFormOperations.idl \ # ------------------------------------------------------------------ From bb3275d5529e5e6553ccbf9ff91e1f458498f3a8 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 29 Oct 2009 11:59:44 +0100 Subject: [PATCH 33/56] step 2 of the FormController UNOization: UNOized all the incoming and outgoing calls, now the interface is completely UNO-based --- .../com/sun/star/form/runtime/FilterEvent.idl | 64 +++++++ .../star/form/runtime/XFilterController.idl | 180 ++++++++++++++++++ .../runtime/XFilterControllerListener.idl | 84 ++++++++ .../sun/star/form/runtime/XFormController.idl | 25 ++- offapi/com/sun/star/form/runtime/makefile.mk | 5 +- 5 files changed, 355 insertions(+), 3 deletions(-) create mode 100644 offapi/com/sun/star/form/runtime/FilterEvent.idl create mode 100644 offapi/com/sun/star/form/runtime/XFilterController.idl create mode 100644 offapi/com/sun/star/form/runtime/XFilterControllerListener.idl diff --git a/offapi/com/sun/star/form/runtime/FilterEvent.idl b/offapi/com/sun/star/form/runtime/FilterEvent.idl new file mode 100644 index 000000000000..8ec7b202e175 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/FilterEvent.idl @@ -0,0 +1,64 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2009 by Sun Microsystems, Inc. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +#ifndef __com_sun_star_form_runtime_FilterEvent_idl__ +#define __com_sun_star_form_runtime_FilterEvent_idl__ + +#include + +//============================================================================= + +module com { module sun { module star { module form { module runtime { + +//============================================================================= + +/** is an event fired by a filter controller, when the filter managed by the controller changes. + + @see XFilterController + + @since OpenOffice.org 3.3 + */ +struct FilterEvent : ::com::sun::star::lang::EventObject +{ + /** denotes the index of the disjunctive term to which the event applies, if any. + */ + long DisjunctiveTerm; + + /** denotes the index of the filter component to which the event applies, if any. + */ + long FilterComponent; + + /** denotes the predicate expression associated with the event. + */ + string PredicateExpression; +}; + +//============================================================================= + +}; }; }; }; }; + +//============================================================================= + +#endif diff --git a/offapi/com/sun/star/form/runtime/XFilterController.idl b/offapi/com/sun/star/form/runtime/XFilterController.idl new file mode 100644 index 000000000000..5ee9bab57540 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/XFilterController.idl @@ -0,0 +1,180 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2009 by Sun Microsystems, Inc. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +#ifndef __offapi_com_sun_star_form_runtime_XFilterController_idl__ +#define __offapi_com_sun_star_form_runtime_XFilterController_idl__ + +#include +#include + +//============================================================================= + +module com { module sun { module star { module form { module runtime { + +//============================================================================= + +interface XFilterControllerListener; + +/** provides access to a form based filter for a database form + +

In a form based filter, form controls bound to a searchable database field are replaced with a control + which allows entering a search expression. This so-called predicate expression is basically a part of an + SQL WHERE clause, but without the the part denoting the database column. For instance, if you + have a form control bound to a table column named Name, then entering the string + LIKE '%Smith%' effectively consitutes a SQL WHERE clause "Name" LIKE '%Smith%'.

+ +

In the actual document view, there are usually some relaxations to this. For instance, keywords such as + LIKE might be localized, according to OpenOffice.org's UI locale. Also, for an equality criterion, + the equality sign = is usually omitted. However, this interface here provides programmatic access + to the form based filter, so those relaxations are not considered here.

+ +

The filter maintained by a filter controller is, logically, a disjunctive normal form of an SQL WHERE + class. That is, it is a disjunction of m terms, where each term is a conjunction of n clauses + of the form <column> <predicate> <literal> or of the form <column> + IS [NOT] NULL.

+ +

n equals the number of filter controls which the filter controller is responsible for. This number + doesn't change during one session of the form based filter. On the other hand, m, the number of disjunctive + terms, is dynamic.

+ + +

With the above, there are potentially m * n predicate expressions (though usually only a fraction + of those will actually exist). Since in a form based filter, there are only n filter controls, and each + filter control displays exactly one predicate expression, this means that only a part of the complete + filter can be displayed, in particular, only one disjunctive term can be displayed at a time. Thus, + the filter controller knows the concept of an active term, denoted by the ActiveTerm + attribute, controls which of the terms is currently displayed in the form controls.

+ + @see XFormController + @see com::sun::star::sdbc::XResultSetMetaData::isSearchable + @see com::sun::star::sdb::XSingleSelectQueryAnalyzer::getStructuredFilter + @see com::sun::star::sdb::SQLFilterOperator + + @since OpenOffice.org 3.3 + */ +interface XFilterController +{ + /** registers a listener to be notified of certain changes in the form based filter. + +

Registering the same listener multiple times results in multiple notifications of the same event, + and also requires multiple revocations of the listener. + */ + void addFilterControllerListener( [in] XFilterControllerListener _Listener ); + + /** revokes a listener which was previously registered to be notified of certain changes in the form based filter. + */ + void removeFilterControllerListener( [in] XFilterControllerListener _Listener ); + + /** is the number of filter components, or filter controls, which the filter controller is responsible + for. + +

This number is constant during one session of the form based filter.

+ */ + [attribute, readonly] long FilterComponents; + + /** is the number of disjunctive terms of the filter expression represented by the form based filter. + */ + [attribute, readonly] long DisjunctiveTerms; + + /** denotes the active term of the filter controller. + */ + [attribute] long ActiveTerm + { + set raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); + }; + + /** sets a given predicate expression + + @param _Component + denotes the filter component whose expression is to be set. Must be greater than or equal to 0, and smaller than + FilterComponents. + + @param _Term + denotes the disjunctive term in which the expression is to be set. Must be greater than or equal to 0, + and smaller than DisjunctiveTerms. + + @param _PredicateExpression + denotes the predicate expression to set for the given filter component in the given term. + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if one of the indexes is out of the allowed range + */ + void + setPredicateExpression( [in] long _Component, [in] long _Term, [in] string _PredicateExpression ) + raises( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** retrieves the filter component with the given index. + +

The filter control has the same control model as the control which it stands in for. Consequently, you can use this method + to obtain the database column which the filter control works on, by examining the control model's BoundField + property.

+ + @param _Component + denotes the index of the filter component whose control should be obtained. Must be greater than or equal to 0, + and smaller than FilterComponents. + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if _Component is out of the allowed range. + + @see ::com::sun::star::form::component::DataAwareControlModel::BoundField + */ + ::com::sun::star::awt::XControl + getFilterComponent( [in] long _Component ) + raises( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** retrieves the entirety of the predicate expressions represented by the filter controller. + +

Each element of the returned sequence is a disjunctive term, having exactly FilterComponents + elements, which denote the single predicate expressions of this term.

+ */ + sequence< sequence< string > > + getPredicateExpressions(); + + /** removes a given disjunctive term + + @param _Term + the index of the term to remove. Must be greater than or equal to 0, and smaller than + DisjunctiveTerms. + + @throws ::com::sun::star::lang::IndexOutOfBoundsException + if _Term is out of the allowed range. + */ + void + removeDisjunctiveTerm( [in] long _Term ) + raises( ::com::sun::star::lang::IndexOutOfBoundsException ); + + /** appends an empty disjunctive term to the list of terms. + */ + void + appendEmptyDisjunctiveTerm(); +}; + +//============================================================================= + +}; }; }; }; }; + +//============================================================================= + +#endif diff --git a/offapi/com/sun/star/form/runtime/XFilterControllerListener.idl b/offapi/com/sun/star/form/runtime/XFilterControllerListener.idl new file mode 100644 index 000000000000..230ba9656d81 --- /dev/null +++ b/offapi/com/sun/star/form/runtime/XFilterControllerListener.idl @@ -0,0 +1,84 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2009 by Sun Microsystems, Inc. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +#ifndef __com_sun_star_form_runtime_XFilterControllerListener_idl__ +#define __com_sun_star_form_runtime_XFilterControllerListener_idl__ + +#include +#include + +//============================================================================= + +module com { module sun { module star { module form { module runtime { + +//============================================================================= + +/** is implemented by components listening for events fired by an XFilterController. + + @since OpenOffice.org 3.3 +*/ +interface XFilterControllerListener : ::com::sun::star::lang::XEventListener +{ + /** is fired when a single predicate expression of the filter represented by the filter + controller changed. + +

FilterEvent::DisjunctiveTerm is the index of the disjunctive term in which the + expression changed. This usually equals XFilterController::ActiveTerm.

+ +

FilterEvent::FilterComponent denotes the index of the filter component whose + predicate expression changed.

+ +

FilterEvent::PredicateExpression is the new predicate expressions.

+ */ + void predicateExpressionChanged( [in] FilterEvent _Event ); + + /** is fired when a disjunctive term was removed from the filter of the filter controller. + +

FilterEvent::DisjunctiveTerm is the index of the disjunctive term which was + removed.

+ +

FilterEvent::FilterComponent and FilterEvent::PredicateExpression are not + used for this event type.

+ */ + void disjunctiveTermRemoved( [in] FilterEvent _Event ); + + /** is fired when a disjunctive term was added to the filter of the filter controller. + +

FilterEvent::DisjunctiveTerm is the index of the disjunctive term which was + added.

+ +

FilterEvent::FilterComponent and FilterEvent::PredicateExpression are not + used for this event type.

+ */ + void disjunctiveTermAdded( [in] FilterEvent _Event ); +}; + +//============================================================================= + +}; }; }; }; }; + +//============================================================================= + +#endif diff --git a/offapi/com/sun/star/form/runtime/XFormController.idl b/offapi/com/sun/star/form/runtime/XFormController.idl index 9c306eeb7857..f0573383860a 100644 --- a/offapi/com/sun/star/form/runtime/XFormController.idl +++ b/offapi/com/sun/star/form/runtime/XFormController.idl @@ -39,6 +39,8 @@ #include #include #include +#include +#include //============================================================================= @@ -244,6 +246,8 @@ interface XFormControllerContext; @see ::com::sun::star::form::component:Form @see ::com::sun::star::form::binding::BindableControlModel @see ::com::sun::star::sdb::DataSource::Settings + + @since OpenOffice.org 3.3 */ interface XFormController { @@ -306,6 +310,7 @@ interface XFormController /** allows switching the form controller to different operation modes. +

The two modes usually (but not necessarily) supported by a form controller are the DataMode and the FilterMode, where the former is the usual modus operandi for displaying and modifying data, and the latter is a special mode to enter a filter for the database form which the controller is @@ -313,6 +318,13 @@ interface XFormController */ interface ::com::sun::star::util::XModeSelector; + /** allows controlling the filter mode. + +

If the form controller supports a form based filter mode, then it shall also + support the XFilterController interface, which allows controlling this mode.

+ */ + [optional] interface XFilterController; + /** denotes the instance which is used to implement operations on the form which the controller works for. @@ -335,12 +347,21 @@ interface XFormController /** adds the specified listener to receive notifications whenever the activation state of the controller changes. */ - void addActivateListener( [in] com::sun::star::form::XFormControllerListener _Listener ); + void addActivateListener( [in] ::com::sun::star::form::XFormControllerListener _Listener ); /** removes the specified listener from the list of components to receive notifications whenever the activation state of the controller changes. */ - void removeActivateListener( [in] com::sun::star::form::XFormControllerListener _Listener ); + void removeActivateListener( [in] ::com::sun::star::form::XFormControllerListener _Listener ); + + /** adds a controller to the list of child controllers + @throws ::com::sun::star::lang::IllegalArgumentException + if the given controller is , or cannot rightfully be a child controller. Since controllers + mirror the hierarchy of the forms the are responsible for, this means that the form of the given + child controller must be a child of the controller at which the method is invoked. + */ + void addChildController( [in] XFormController _ChildController ) + raises ( ::com::sun::star::lang::IllegalArgumentException ); }; //============================================================================= diff --git a/offapi/com/sun/star/form/runtime/makefile.mk b/offapi/com/sun/star/form/runtime/makefile.mk index b13879e1f65a..97c4451edf40 100644 --- a/offapi/com/sun/star/form/runtime/makefile.mk +++ b/offapi/com/sun/star/form/runtime/makefile.mk @@ -42,11 +42,14 @@ PACKAGE=com$/sun$/star$/form$/runtime # ------------------------------------------------------------------------ IDLFILES=\ - FeatureState.idl\ + FeatureState.idl \ + FilterEvent.idl \ FormFeature.idl \ FormOperations.idl \ FormController.idl \ XFeatureInvalidation.idl \ + XFilterController.idl \ + XFilterControllerListener.idl \ XFormController.idl \ XFormControllerContext.idl \ XFormOperations.idl \ From 925a3a281e9fe4bc6d1f62d8c1ade83e46bf87f9 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 29 Oct 2009 15:48:48 +0100 Subject: [PATCH 34/56] sb116: #i106384# avoid GCC warnings produced if -fno-strict-aliasing were removed (patch by cmc) --- sal/inc/rtl/math.hxx | 23 ++++++++++++++++++----- sal/osl/unx/process.c | 4 ++-- sal/osl/unx/socket.c | 19 ++++++++++--------- sal/rtl/source/bootstrap.cxx | 4 ++-- sal/rtl/source/math.cxx | 9 +++++++-- 5 files changed, 39 insertions(+), 20 deletions(-) diff --git a/sal/inc/rtl/math.hxx b/sal/inc/rtl/math.hxx index 5760340cc6a4..dbd4a2172246 100644 --- a/sal/inc/rtl/math.hxx +++ b/sal/inc/rtl/math.hxx @@ -357,17 +357,30 @@ inline bool isSignBitSet(double d) */ inline void setInf(double * pd, bool bNegative) { - reinterpret_cast< sal_math_Double * >(pd)->w32_parts.msw - = bNegative ? 0xFFF00000 : 0x7FF00000; - reinterpret_cast< sal_math_Double * >(pd)->w32_parts.lsw = 0; + union + { + double sd; + sal_math_Double md; + }; + sd = *pd; + md.w32_parts.msw = bNegative ? 0xFFF00000 : 0x7FF00000; + md.w32_parts.lsw = 0; + *pd = sd; } /** Set a QNAN. */ inline void setNan(double * pd) { - reinterpret_cast< sal_math_Double * >(pd)->w32_parts.msw = 0x7FFFFFFF; - reinterpret_cast< sal_math_Double * >(pd)->w32_parts.lsw = 0xFFFFFFFF; + union + { + double sd; + sal_math_Double md; + }; + sd = *pd; + md.w32_parts.msw = 0x7FFFFFFF; + md.w32_parts.lsw = 0xFFFFFFFF; + *pd = sd; } /** If a value is a valid argument for sin(), cos(), tan(). diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c index 453d00091c63..abda0b73d856 100644 --- a/sal/osl/unx/process.c +++ b/sal/osl/unx/process.c @@ -269,7 +269,7 @@ static sal_Bool sendFdPipe(int PipeFD, int SocketFD) cmptr->cmsg_level = SOL_SOCKET; cmptr->cmsg_type = SCM_RIGHTS; cmptr->cmsg_len = CONTROLLEN; - *(int*)CMSG_DATA(cmptr) = SocketFD; + memcpy(CMSG_DATA(cmptr), &SocketFD, sizeof(int)); #endif @@ -360,7 +360,7 @@ static oslSocket receiveFdPipe(int PipeFD) ( msghdr.msg_controllen == CONTROLLEN ) ) { OSL_TRACE("receiveFdPipe : received '%i' bytes\n",nRead); - newfd = *(int*)CMSG_DATA(cmptr); + memcpy(&newfd, CMSG_DATA(cmptr), sizeof(int)); } #endif else diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c index 310dd57592f5..4306347af873 100644 --- a/sal/osl/unx/socket.c +++ b/sal/osl/unx/socket.c @@ -1869,10 +1869,13 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket) if ( pSocket->m_bIsAccepting == sal_True ) { int nConnFD; - struct sockaddr aSockAddr; - socklen_t nSockLen = sizeof(aSockAddr); + union { + struct sockaddr aSockAddr; + struct sockaddr_in aSockAddrIn; + } s; + socklen_t nSockLen = sizeof(s.aSockAddr); - nRet = getsockname(nFD, &aSockAddr, &nSockLen); + nRet = getsockname(nFD, &s.aSockAddr, &nSockLen); #if OSL_DEBUG_LEVEL > 1 if ( nRet < 0 ) { @@ -1880,13 +1883,11 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket) } #endif /* OSL_DEBUG_LEVEL */ - if ( aSockAddr.sa_family == AF_INET ) + if ( s.aSockAddr.sa_family == AF_INET ) { - struct sockaddr_in* pSockAddrIn = (struct sockaddr_in*) &aSockAddr; - - if ( pSockAddrIn->sin_addr.s_addr == htonl(INADDR_ANY) ) + if ( s.aSockAddrIn.sin_addr.s_addr == htonl(INADDR_ANY) ) { - pSockAddrIn->sin_addr.s_addr = htonl(INADDR_LOOPBACK); + s.aSockAddrIn.sin_addr.s_addr = htonl(INADDR_LOOPBACK); } nConnFD = socket(AF_INET, SOCK_STREAM, 0); @@ -1897,7 +1898,7 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket) } #endif /* OSL_DEBUG_LEVEL */ - nRet = connect(nConnFD, &aSockAddr, sizeof(aSockAddr)); + nRet = connect(nConnFD, &s.aSockAddr, sizeof(s.aSockAddr)); #if OSL_DEBUG_LEVEL > 1 if ( nRet < 0 ) { diff --git a/sal/rtl/source/bootstrap.cxx b/sal/rtl/source/bootstrap.cxx index 23dab839d558..769251a6c4ec 100644 --- a/sal/rtl/source/bootstrap.cxx +++ b/sal/rtl/source/bootstrap.cxx @@ -820,8 +820,8 @@ void SAL_CALL rtl_bootstrap_set ( rtl_uString * pValue ) SAL_THROW_EXTERN_C() { - OUString const & name = *reinterpret_cast< OUString const * >( &pName ); - OUString const & value = *reinterpret_cast< OUString const * >( &pValue ); + const OUString name( pName ); + const OUString value( pValue ); osl::MutexGuard guard( osl::Mutex::getGlobalMutex() ); diff --git a/sal/rtl/source/math.cxx b/sal/rtl/source/math.cxx index a255ca21b13a..012046c9e5c8 100644 --- a/sal/rtl/source/math.cxx +++ b/sal/rtl/source/math.cxx @@ -879,8 +879,13 @@ inline double stringToDouble(CharT const * pBegin, CharT const * pEnd, rtl::math::setNan( &fVal ); if (bSign) { - reinterpret_cast< sal_math_Double * >(&fVal)->w32_parts.msw - |= 0x80000000; // create negative NaN + union { + double sd; + sal_math_Double md; + } m; + m.sd = fVal; + m.md.w32_parts.msw |= 0x80000000; // create negative NaN + fVal = m.sd; bSign = false; // don't negate again } // Eat any further digits: From 27d87c9b00edcee2d64df592daf008bff20a41e7 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 30 Oct 2009 19:10:16 +0100 Subject: [PATCH 35/56] #i105898#: make LD_PRELOAD of libsalalloc_malloc.so work again --- sal/util/makefile.mk | 6 ++++++ sal/util/salalloc.list | 7 +++++++ 2 files changed, 13 insertions(+) create mode 100644 sal/util/salalloc.list diff --git a/sal/util/makefile.mk b/sal/util/makefile.mk index bc8026aa860f..82a01f868cf3 100644 --- a/sal/util/makefile.mk +++ b/sal/util/makefile.mk @@ -163,6 +163,12 @@ SHL1STDLIBS+=-lcrypt .ENDIF .ENDIF +# #i105898# required for LD_PRELOAD libsalalloc_malloc.so +# if sal is linked with -Bsymbolic-functions +.IF "$(HAVE_LD_BSYMBOLIC_FUNCTIONS)" == "TRUE" +SHL1LINKFLAGS+=-Wl,--dynamic-list=salalloc.list +.ENDIF # .IF "$(HAVE_LD_BSYMBOLIC_FUNCTIONS)" == "TRUE" + SHL1LIBS+=$(SLB)$/$(TARGET).lib .IF "$(linkinc)" != "" diff --git a/sal/util/salalloc.list b/sal/util/salalloc.list new file mode 100644 index 000000000000..303d225dda7f --- /dev/null +++ b/sal/util/salalloc.list @@ -0,0 +1,7 @@ +{ + rtl_allocateMemory; + rtl_reallocateMemory; + rtl_freeMemory; + rtl_allocateZeroMemory; + rtl_freeZeroMemory; +}; From e7b782233f0d04b494aab32be9907d802f13ef08 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Wed, 11 Nov 2009 07:25:37 +0100 Subject: [PATCH 36/56] #i103496#: sandbox removed --- cli_ure/qa/climaker/makefile.mk | 2 +- stoc/test/javavm/testapplet/TestApplet.java | 1 - stoc/test/javavm/testapplet/makefile.mk | 2 +- stoc/test/javavm/testcomponent/TestComponent.java | 5 +++-- stoc/test/javavm/testcomponent/makefile.mk | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cli_ure/qa/climaker/makefile.mk b/cli_ure/qa/climaker/makefile.mk index cde3f4066142..a5b0af914f29 100644 --- a/cli_ure/qa/climaker/makefile.mk +++ b/cli_ure/qa/climaker/makefile.mk @@ -41,7 +41,7 @@ CLIMAKER*=$(WRAPCMD) $(BIN)$/climaker #----- compile .java files ----------------------------------------- -JARFILES = sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar +JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar JAVAFILES = ClimakerTestCase.java JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) diff --git a/stoc/test/javavm/testapplet/TestApplet.java b/stoc/test/javavm/testapplet/TestApplet.java index 07467cc54c0f..55916cff784b 100644 --- a/stoc/test/javavm/testapplet/TestApplet.java +++ b/stoc/test/javavm/testapplet/TestApplet.java @@ -5,7 +5,6 @@ import java.io.IOException; import java.net.URL; import java.io.InputStream; import java.net.MalformedURLException; -import com.sun.star.lib.sandbox.*; /* * TestApplet.java * diff --git a/stoc/test/javavm/testapplet/makefile.mk b/stoc/test/javavm/testapplet/makefile.mk index 706180655f06..da5a21e4f166 100644 --- a/stoc/test/javavm/testapplet/makefile.mk +++ b/stoc/test/javavm/testapplet/makefile.mk @@ -40,7 +40,7 @@ TARGET = TestApplet #.INCLUDE : $(PRJ)$/util$/makefile.pmk .INCLUDE : settings.mk # Files -------------------------------------------------------- -JARFILES = sandbox.jar ridl.jar jurt.jar unoil.jar +JARFILES = ridl.jar jurt.jar unoil.jar JAVAFILES= $(subst,$(CLASSDIR)$/$(PACKAGE)$/, $(subst,.class,.java $(JAVACLASSFILES))) diff --git a/stoc/test/javavm/testcomponent/TestComponent.java b/stoc/test/javavm/testcomponent/TestComponent.java index a0fb1d01a858..5622ba087d7a 100644 --- a/stoc/test/javavm/testcomponent/TestComponent.java +++ b/stoc/test/javavm/testcomponent/TestComponent.java @@ -4,7 +4,7 @@ import com.sun.star.uno.*; import com.sun.star.registry.XRegistryKey; import java.io.*; import java.net.*; -import com.sun.star.lib.sandbox.*; +//import com.sun.star.lib.sandbox.*; /** This component implements XTypeProvider for use with StarBasic. @@ -74,10 +74,11 @@ public class TestComponent implements XServiceInfo, XTypeProvider }catch( IOException e) { String s= e.getMessage(); System.out.println(s); - }catch( SandboxSecurityException sse) { + }/*catch( SandboxSecurityException sse) { String s= sse.getMessage(); System.out.println("s"); } +*/ return __serviceName; } diff --git a/stoc/test/javavm/testcomponent/makefile.mk b/stoc/test/javavm/testcomponent/makefile.mk index 68f3f5bd6431..9fcd390b02a1 100644 --- a/stoc/test/javavm/testcomponent/makefile.mk +++ b/stoc/test/javavm/testcomponent/makefile.mk @@ -40,7 +40,7 @@ TARGET = JavaTestComponent #.INCLUDE : $(PRJ)$/util$/makefile.pmk .INCLUDE : settings.mk # Files -------------------------------------------------------- -JARFILES = sandbox.jar ridl.jar jurt.jar unoil.jar +JARFILES = ridl.jar jurt.jar unoil.jar CUSTOMMANIFESTFILE= manifest From 3be984c247488f75a9e23e7549efb69b8bbcacce Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 13 Nov 2009 11:04:06 +0100 Subject: [PATCH 37/56] sb116: #i106845# removed obsolete IRIX port --- cpputools/source/sp2bv/makefile.mk | 2 +- .../plugins/sunmajor/javaenvsetup/makefile.mk | 2 - sal/inc/osl/endian.h | 17 +- sal/inc/rtl/uuid.h | 2 - sal/inc/sal/alloca.h | 2 +- sal/inc/sal/config.h | 2 +- sal/osl/os2/file.cxx | 4 +- sal/osl/os2/nlsupport.c | 21 +- sal/osl/os2/socket.c | 2 +- sal/osl/os2/system.h | 32 +- sal/osl/unx/backtrace.c | 48 -- sal/osl/unx/file_volume.cxx | 425 +----------------- sal/osl/unx/module.c | 26 -- sal/osl/unx/nlsupport.c | 50 +-- sal/osl/unx/process.c | 44 +- sal/osl/unx/socket.c | 2 +- sal/osl/unx/system.h | 31 +- sal/rtl/source/alloc.c | 4 +- sal/rtl/source/macro.hxx | 4 - sal/util/makefile.mk | 3 - salhelper/source/simplereferenceobject.cxx | 2 +- 21 files changed, 27 insertions(+), 698 deletions(-) diff --git a/cpputools/source/sp2bv/makefile.mk b/cpputools/source/sp2bv/makefile.mk index 2b80d6e431c6..e9ca09bff6df 100644 --- a/cpputools/source/sp2bv/makefile.mk +++ b/cpputools/source/sp2bv/makefile.mk @@ -34,7 +34,7 @@ PRJ=..$/.. PRJNAME=cpputools TARGET=sp2bv TARGETTYPE=CUI -.IF "$(OS)"!="IRIX" && "$(OS)" != "MACOSX" +.IF "$(OS)" != "MACOSX" # hack to get stdc++ linked NO_DEFAULT_STL=TRUE .ENDIF diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/makefile.mk b/jvmfwk/plugins/sunmajor/javaenvsetup/makefile.mk index 29aa95854d33..55fb0e2d3c0d 100755 --- a/jvmfwk/plugins/sunmajor/javaenvsetup/makefile.mk +++ b/jvmfwk/plugins/sunmajor/javaenvsetup/makefile.mk @@ -34,9 +34,7 @@ PRJ=..$/..$/.. PRJNAME=javaldx TARGET=javaldx TARGETTYPE=CUI -.IF "$(OS)"!="IRIX" NO_DEFAULT_STL=TRUE -.ENDIF LIBTARGET=NO ENABLE_EXCEPTIONS=true diff --git a/sal/inc/osl/endian.h b/sal/inc/osl/endian.h index b0d2922839be..09529a48840f 100644 --- a/sal/inc/osl/endian.h +++ b/sal/inc/osl/endian.h @@ -118,20 +118,6 @@ extern "C" { # include #endif -#ifdef IRIX -# include -# if BYTE_ORDER == LITTLE_ENDIAN -# undef _BIG_ENDIAN -# undef _PDP_ENDIAN -# elif BYTE_ORDER == BIG_ENDIAN -# undef _LITTLE_ENDIAN -# undef _PDP_ENDIAN -# elif BYTE_ORDER == PDP_ENDIAN -# undef _LITTLE_ENDIAN -# undef _BIG_ENDIAN -# endif -#endif - #ifdef _WIN16 # define _LITTLE_ENDIAN #endif @@ -166,8 +152,7 @@ extern "C" { #if !defined(_WIN32) && !defined(_WIN16) && !defined(OS2) && \ !defined(LINUX) && !defined(NETBSD) && !defined(SCO) && \ !defined(AIX) && !defined(HPUX) && \ - !defined(SOLARIS) && !defined(IRIX) && \ - !defined(MACOSX) && !defined(FREEBSD) + !defined(SOLARIS) && !defined(MACOSX) && !defined(FREEBSD) # error "Target platform not specified !" #endif diff --git a/sal/inc/rtl/uuid.h b/sal/inc/rtl/uuid.h index 6451ac7738d6..76911dd841fb 100644 --- a/sal/inc/rtl/uuid.h +++ b/sal/inc/rtl/uuid.h @@ -201,8 +201,6 @@ void SAL_CALL rtl_createNamedUuid( #define UUID_SYSTEM_TIME_RESOLUTION_100NS_TICKS 10 #elif MACOSX #define UUID_SYSTEM_TIME_RESOLUTION_100NS_TICKS 100000 -#elif IRIX -#define UUID_SYSTEM_TIME_RESOLUTION_100NS_TICKS 10 #else #error "System time resolution must be calculated!" #endif diff --git a/sal/inc/sal/alloca.h b/sal/inc/sal/alloca.h index 703027277f18..912e58eff06e 100644 --- a/sal/inc/sal/alloca.h +++ b/sal/inc/sal/alloca.h @@ -31,7 +31,7 @@ #ifndef INCLUDED_SAL_ALLOCA_H #define INCLUDED_SAL_ALLOCA_H -#if defined (SOLARIS) || defined (LINUX) || defined (IRIX) || defined(__EMX__) +#if defined (SOLARIS) || defined (LINUX) || defined(__EMX__) #ifndef INCLUDED_ALLOCA_H #include diff --git a/sal/inc/sal/config.h b/sal/inc/sal/config.h index f16165fe72cb..c9d31a437758 100644 --- a/sal/inc/sal/config.h +++ b/sal/inc/sal/config.h @@ -102,7 +102,7 @@ extern "C" { #define SAL_SYSCONFIGFILE( name ) name ".ini" #endif -#if defined(SOLARIS) || defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || defined(SCO) || defined(IRIX) +#if defined(SOLARIS) || defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || defined(SCO) #define SAL_UNX #define SAL_DLLEXTENSION ".so" #define SAL_DLLPREFIX "lib" diff --git a/sal/osl/os2/file.cxx b/sal/osl/os2/file.cxx index e89ce6450bee..f3c1ad015de0 100644 --- a/sal/osl/os2/file.cxx +++ b/sal/osl/os2/file.cxx @@ -2343,7 +2343,7 @@ oslFileError SAL_CALL osl_syncFile(oslFileHandle Handle) # define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) ((__OSL_MSDOS_SUPER_MAGIC != (a).f_type)) #endif /* LINUX */ -#if defined(SOLARIS) || defined(IRIX) +#if defined(SOLARIS) # define __OSL_STATFS_STRUCT struct statvfs # define __OSL_STATFS(dir, sfs) statvfs((dir), (sfs)) # define __OSL_STATFS_BLKSIZ(a) ((sal_uInt64)((a).f_frsize)) @@ -2355,7 +2355,7 @@ oslFileError SAL_CALL osl_syncFile(oslFileHandle Handle) of the target platforms fix it!!!! */ # define __OSL_STATFS_IS_CASE_SENSITIVE_FS(a) (1) # define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) (1) -#endif /* SOLARIS || IRIX*/ +#endif /* SOLARIS */ # define __OSL_STATFS_INIT(a) (memset(&(a), 0, sizeof(__OSL_STATFS_STRUCT))) diff --git a/sal/osl/os2/nlsupport.c b/sal/osl/os2/nlsupport.c index 0efccaa787e6..b05332bab0ea 100644 --- a/sal/osl/os2/nlsupport.c +++ b/sal/osl/os2/nlsupport.c @@ -411,9 +411,6 @@ void _imp_getProcessLocale( rtl_Locale ** ppLocale ) int _imp_setProcessLocale( rtl_Locale * pLocale ) { -#ifdef IRIX - char env_buf[80]; -#endif char locale_buf[64]; /* convert rtl_Locale to locale string */ @@ -421,11 +418,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale ) { /* only change env vars that exist already */ if( getenv( "LC_ALL" ) ) { -#if defined( IRIX ) - snprintf(env_buf, sizeof(env_buf), "LC_ALL=%s", locale_buf); - env_buf[sizeof(env_buf)] = '\0'; - putenv(env_buf); -#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ ) +#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ ) setenv( "LC_ALL", locale_buf, 1); #else setenv( "LC_ALL", locale_buf ); @@ -433,11 +426,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale ) } if( getenv( "LC_CTYPE" ) ) { -#if defined( IRIX ) - snprintf(env_buf, sizeof(env_buf), "LC_CTYPE=%s", locale_buf); - env_buf[sizeof(env_buf)] = '\0'; - putenv(env_buf); -#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ ) +#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ ) setenv("LC_CTYPE", locale_buf, 1 ); #else setenv( "LC_CTYPE", locale_buf ); @@ -445,11 +434,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale ) } if( getenv( "LANG" ) ) { -#if defined( IRIX ) - snprintf(env_buf, sizeof(env_buf), "LANG=%s", locale_buf); - env_buf[sizeof(env_buf)] = '\0'; - putenv(env_buf); -#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ ) +#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ ) setenv("LC_CTYPE", locale_buf, 1 ); #else setenv( "LANG", locale_buf ); diff --git a/sal/osl/os2/socket.c b/sal/osl/os2/socket.c index de70e5b8885a..1c6603b55932 100644 --- a/sal/osl/os2/socket.c +++ b/sal/osl/os2/socket.c @@ -48,7 +48,7 @@ #undef HAVE_POLL_H #endif -#if defined(LINUX) || defined (IRIX) || defined(NETBSD) || defined ( FREEBSD ) || defined (MACOSX) +#if defined(LINUX) || defined(NETBSD) || defined ( FREEBSD ) || defined (MACOSX) #include #define HAVE_POLL_H #endif /* HAVE_POLL_H */ diff --git a/sal/osl/os2/system.h b/sal/osl/os2/system.h index 565dfe3ea9c6..ef7626e9c036 100644 --- a/sal/osl/os2/system.h +++ b/sal/osl/os2/system.h @@ -306,36 +306,6 @@ extern unsigned int nanosleep(unsigned int); # define PTHREAD_SIGACTION cma_sigaction #endif -#ifdef IRIX -# define AF_IPX -1 -# include -# include -# include -# include -# include -# include -# include -# include -# include -# if BYTE_ORDER == LITTLE_ENDIAN -# undef _BIG_ENDIAN -# undef _PDP_ENDIAN -# elif BYTE_ORDER == BIG_ENDIAN -# undef _LITTLE_ENDIAN -# undef _PDP_ENDIAN -# elif BYTE_ORDER == PDP_ENDIAN -# undef _LITTLE_ENDIAN -# undef _BIG_ENDIAN -# endif -# define SA_FAMILY_DECL \ - union { struct { short sa_family2; } sa_generic; } sa_union -# define PTR_SIZE_T(s) ((int *)&(s)) -# define NO_PTHREAD_PRIORITY -# include -# define IOCHANNEL_TRANSFER_BSD -extern char *strdup(const char *); -#endif - #ifdef SOLARIS # include # include @@ -389,7 +359,7 @@ char *macxp_tempnam( const char *tmpdir, const char *prefix ); #if !defined(_WIN32) && !defined(_WIN16) && !defined(OS2) && \ !defined(LINUX) && !defined(NETBSD) && !defined(FREEBSD) && !defined(SCO) && \ !defined(AIX) && !defined(HPUX) && \ - !defined(SOLARIS) && !defined(IRIX) && !defined(MAC) && \ + !defined(SOLARIS) && !defined(MAC) && \ !defined(MACOSX) # error "Target plattform not specified !" #endif diff --git a/sal/osl/unx/backtrace.c b/sal/osl/unx/backtrace.c index 437d31157049..886da0c3bee5 100755 --- a/sal/osl/unx/backtrace.c +++ b/sal/osl/unx/backtrace.c @@ -207,54 +207,6 @@ void backtrace_symbols_fd( void **buffer, int size, int fd ) } #endif /* defined FREEBSD */ -#if defined(IRIX) -#include -#include -#include -#include -#include - -/* Need extra libs -lexc -ldwarf -lelf */ - -int backtrace( void **buffer, int max_frames ) -{ - struct sigcontext context; - int i = 0; - - memset(&context, 0, sizeof(struct sigcontext)); - - exc_setjmp(&context); - while(context.sc_pc != 1 && i < max_frames) { - exc_unwind(&context, 0); - if(context.sc_pc != 1) { - *(buffer++) = (void *)context.sc_pc; - i++; - } - } - return(i); -} - -void backtrace_symbols_fd( void **buffer, int size, int fd ) -{ - FILE *fp = fdopen( fd, "w" ); - struct sigcontext context; - char *name; - - if ( fp ) { - while(context.sc_pc!=1) { - if(context.sc_pc != 1) { - exc_unwind_name(&context, 0, &name); - fprintf(fp, " 0x%012lx %.100s\n", context.sc_pc, name ? name : ""); - free(name); - } - } - - fflush( fp ); - fclose( fp ); - } -} -#endif /* defined IRIX */ - #ifdef LINUX #ifndef _GNU_SOURCE diff --git a/sal/osl/unx/file_volume.cxx b/sal/osl/unx/file_volume.cxx index a3b7109123b7..4489368a4c9b 100644 --- a/sal/osl/unx/file_volume.cxx +++ b/sal/osl/unx/file_volume.cxx @@ -76,16 +76,6 @@ static const sal_Char* MOUNTTAB="/etc/mtab"; * This information is stored only in the kernel. */ /* static const sal_Char* MOUNTTAB="/etc/mtab"; */ -#elif defined(IRIX) - -#include -#include -#include -#define HAVE_STATFS_H -#include -//#include -static const sal_Char* MOUNTTAB="/etc/mtab"; - #elif defined(MACOSX) #include @@ -140,12 +130,6 @@ static sal_Bool osl_isFloppyMounted(oslVolumeDeviceHandleImpl* pDevice); static sal_Bool osl_getFloppyMountEntry(const sal_Char* pszPath, oslVolumeDeviceHandleImpl* pItem); #endif /* LINUX */ - -#if defined(IRIX) -static sal_Bool osl_isFloppyMounted(oslVolumeDeviceHandleImpl* pDevice); -static sal_Bool osl_getFloppyMountEntry(const sal_Char* pszPath, oslVolumeDeviceHandleImpl* pItem); -#endif /* IRIX */ - #ifdef DEBUG_OSL_FILE static void osl_printFloppyHandle(oslVolumeDeviceHandleImpl* hFloppy); #endif /* DEBUG_OSL_FILE */ @@ -220,7 +204,7 @@ oslFileError osl_getVolumeInformation( rtl_uString* ustrDirectoryURL, oslVolumeI # define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) ((__OSL_MSDOS_SUPER_MAGIC != (a).f_type)) #endif /* LINUX */ -#if defined(SOLARIS) || defined(IRIX) +#if defined(SOLARIS) # define __OSL_STATFS_STRUCT struct statvfs # define __OSL_STATFS(dir, sfs) statvfs((dir), (sfs)) # define __OSL_STATFS_BLKSIZ(a) ((sal_uInt64)((a).f_frsize)) @@ -232,7 +216,7 @@ oslFileError osl_getVolumeInformation( rtl_uString* ustrDirectoryURL, oslVolumeI of the target platforms fix it!!!! */ # define __OSL_STATFS_IS_CASE_SENSITIVE_FS(a) (1) # define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) (1) -#endif /* SOLARIS || IRIX*/ +#endif /* SOLARIS */ # define __OSL_STATFS_INIT(a) (memset(&(a), 0, sizeof(__OSL_STATFS_STRUCT))) @@ -1093,411 +1077,6 @@ osl_isFloppyMounted (oslVolumeDeviceHandleImpl* pDevice) } #endif /* LINUX */ -/****************************************************************************** - * - * IRIX FLOPPY FUNCTIONS - * - *****************************************************************************/ - -#if defined(IRIX) -static oslVolumeDeviceHandle osl_isFloppyDrive(const sal_Char* pszPath) -{ - oslVolumeDeviceHandleImpl* pItem = osl_newVolumeDeviceHandleImpl (); - sal_Bool bRet = sal_False; - -#ifdef TRACE_OSL_FILE - fprintf(stderr,"In osl_isFloppyDrive\n"); -#endif - - bRet=osl_getFloppyMountEntry(pszPath,pItem); - - if ( bRet == sal_False ) - { -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_isFloppyDrive [not a floppy]\n"); -#endif - rtl_freeMemory(pItem); - return 0; - } - - -#ifdef DEBUG_OSL_FILE - osl_printFloppyHandle(pItem); -#endif -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_isFloppyDrive [ok]\n"); -#endif - - return (oslVolumeDeviceHandle) pItem; -} - - -static oslFileError osl_mountFloppy(oslVolumeDeviceHandle hFloppy) -{ - sal_Bool bRet = sal_False; - oslVolumeDeviceHandleImpl* pItem=0; - int nRet; - sal_Char pszCmd[PATH_MAX]; - sal_Char* pszMountProg = "mount"; - sal_Char* pszSuDo = 0; - sal_Char* pszTmp = 0; - - pszCmd[0] = '\0'; - -#ifdef TRACE_OSL_FILE - fprintf(stderr,"In osl_mountFloppy\n"); -#endif - - pItem = (oslVolumeDeviceHandleImpl*) hFloppy; - - if ( pItem == 0 ) - { -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_mountFloppy [pItem == 0]\n"); -#endif - - return osl_File_E_INVAL; - } - - if ( pItem->ident[0] != 'O' || pItem->ident[1] != 'V' || pItem->ident[2] != 'D' || pItem->ident[3] != 'H' ) - { -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_mountFloppy [invalid handle]\n"); -#endif - return osl_File_E_INVAL; - } - - bRet = osl_isFloppyMounted(pItem); - if ( bRet == sal_True ) - { -#ifdef DEBUG_OSL_FILE - fprintf(stderr,"detected mounted floppy at '%s'\n",pItem->pszMountPoint); -#endif - return osl_File_E_BUSY; - } - - /* mfe: we can't use the mount(2) system call!!! */ - /* even if we are root */ - /* since mtab is not updated!!! */ - /* but we need it to be updated */ - /* some "magic" must be done */ - -/* nRet = mount(pItem->pszDevice,pItem->pszMountPoint,0,0,0); */ -/* if ( nRet != 0 ) */ -/* { */ -/* nRet=errno; */ -/* #ifdef DEBUG_OSL_FILE */ -/* perror("mount"); */ -/* #endif */ -/* } */ - - pszTmp = getenv("SAL_MOUNT_MOUNTPROG"); - if ( pszTmp != 0 ) - { - pszMountProg=pszTmp; - } - - pszTmp=getenv("SAL_MOUNT_SU_DO"); - if ( pszTmp != 0 ) - { - pszSuDo=pszTmp; - } - - if ( pszSuDo != 0 ) - { - snprintf(pszCmd, sizeof(pszCmd), "%s %s %s %s",pszSuDo,pszMountProg,pItem->pszDevice,pItem->pszMountPoint); - } - else - { - snprintf(pszCmd, sizeof(pszCmd), "%s %s",pszMountProg,pItem->pszMountPoint); - } - - -#ifdef DEBUG_OSL_FILE - fprintf(stderr,"executing '%s'\n",pszCmd); -#endif - - nRet = system(pszCmd); - -#ifdef DEBUG_OSL_FILE - fprintf(stderr,"call returned '%i'\n",nRet); - fprintf(stderr,"exit status is '%i'\n", WEXITSTATUS(nRet)); -#endif - - - switch ( WEXITSTATUS(nRet) ) - { - case 0: - nRet=0; - break; - - case 2: - nRet=EPERM; - break; - - case 4: - nRet=ENOENT; - break; - - case 8: - nRet=EINTR; - break; - - case 16: - nRet=EPERM; - break; - - case 32: - nRet=EBUSY; - break; - - case 64: - nRet=EAGAIN; - break; - - default: - nRet=EBUSY; - break; - } - - return ((0 == nRet) ? oslTranslateFileError(OSL_FET_SUCCESS, nRet) : oslTranslateFileError(OSL_FET_ERROR, nRet)); -} - -static oslFileError osl_unmountFloppy(oslVolumeDeviceHandle hFloppy) -{ - oslVolumeDeviceHandleImpl* pItem=0; - int nRet=0; - sal_Char pszCmd[PATH_MAX]; - sal_Char* pszTmp = 0; - sal_Char* pszSuDo = 0; - sal_Char* pszUmountProg = "umount"; - - pszCmd[0] = '\0'; - -#ifdef TRACE_OSL_FILE - fprintf(stderr,"In osl_unmountFloppy\n"); -#endif - - pItem = (oslVolumeDeviceHandleImpl*) hFloppy; - - if ( pItem == 0 ) - { -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_unmountFloppy [pItem==0]\n"); -#endif - return osl_File_E_INVAL; - } - - if ( pItem->ident[0] != 'O' || pItem->ident[1] != 'V' || pItem->ident[2] != 'D' || pItem->ident[3] != 'H' ) - { -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_unmountFloppy [invalid handle]\n"); -#endif - return osl_File_E_INVAL; - } - - /* mfe: we can't use the umount(2) system call!!! */ - /* even if we are root */ - /* since mtab is not updated!!! */ - /* but we need it to be updated */ - /* some "magic" must be done */ - -/* nRet=umount(pItem->pszDevice); */ -/* if ( nRet != 0 ) */ -/* { */ -/* nRet = errno; */ - -/* #ifdef DEBUG_OSL_FILE */ -/* perror("mount"); */ -/* #endif */ -/* } */ - - - pszTmp = getenv("SAL_MOUNT_UMOUNTPROG"); - if ( pszTmp != 0 ) - { - pszUmountProg=pszTmp; - } - - pszTmp = getenv("SAL_MOUNT_SU_DO"); - if ( pszTmp != 0 ) - { - pszSuDo=pszTmp; - } - - if ( pszSuDo != 0 ) - { - snprintf(pszCmd, sizeof(pszCmd), "%s %s %s",pszSuDo,pszUmountProg,pItem->pszMountPoint); - } - else - { - snprintf(pszCmd, sizeof(pszCmd), "%s %s",pszUmountProg,pItem->pszMountPoint); - } - - -#ifdef DEBUG_OSL_FILE - fprintf(stderr,"executing '%s'\n",pszCmd); -#endif - - nRet = system(pszCmd); - -#ifdef DEBUG_OSL_FILE - fprintf(stderr,"call returned '%i'\n",nRet); - fprintf(stderr,"exit status is '%i'\n", WEXITSTATUS(nRet)); -#endif - - switch ( WEXITSTATUS(nRet) ) - { - case 0: - nRet=0; - break; - - default: - nRet=EBUSY; - break; - } - -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_unmountFloppy [ok]\n"); -#endif - - return ((0 == nRet) ? oslTranslateFileError(OSL_FET_SUCCESS, nRet) : oslTranslateFileError(OSL_FET_ERROR, nRet)); - -/* return osl_File_E_None;*/ -} - -static sal_Bool osl_getFloppyMountEntry(const sal_Char* pszPath, oslVolumeDeviceHandleImpl* pItem) -{ - struct mntent* pMountEnt=0; - sal_Char buffer[PATH_MAX]; - FILE* mntfile=0; - int nRet=0; - - buffer[0] = '\0'; - - mntfile = setmntent(MOUNTTAB,"r"); - -#ifdef TRACE_OSL_FILE - fprintf(stderr,"In osl_getFloppyMountEntry\n"); -#endif - - memset(buffer, 0, sizeof(buffer)); - strncpy(buffer, pszPath, sizeof(buffer) - 1); - -#ifdef DEBUG_OSL_FILE - fprintf(stderr,"Checking mount of %s\n",buffer); -#endif - - - if ( mntfile == 0 ) - { - nRet=errno; -#ifdef DEBUG_OSL_FILE - perror("mounttab"); -#endif -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_getFloppyMountEntry [mntfile]\n"); -#endif - return sal_False; - } - - pMountEnt=getmntent(mntfile); - while ( pMountEnt != 0 ) - { -#ifdef DEBUG_OSL_FILE -/* fprintf(stderr,"mnt_fsname : %s\n",pMountEnt->mnt_fsname); */ -/* fprintf(stderr,"mnt_dir : %s\n",pMountEnt->mnt_dir); */ -/* fprintf(stderr,"mnt_type : %s\n",pMountEnt->mnt_type);*/ -#endif - if ( strcmp(pMountEnt->mnt_dir,buffer) == 0 && - strncmp(pMountEnt->mnt_fsname,"/dev/fd",strlen("/dev/fd")) == 0 ) - { - - memset(pItem->pszMountPoint, 0, sizeof(pItem->pszMountPoint)); - strncpy(pItem->pszMountPoint, pMountEnt->mnt_dir, sizeof(pItem->pszMountPoint) - 1); - - memset(pItem->pszFilePath, 0, sizeof(pItem->pszFilePath)); - strncpy(pItem->pszFilePath, pMountEnt->mnt_dir, sizeof(pItem->pszFilePath) - 1); - - memset(pItem->pszDevice, 0, sizeof(pItem->pszDevice)); - strncpy(pItem->pszDevice, pMountEnt->mnt_fsname, sizeof(pItem->pszDevice) - 1); - - fclose(mntfile); -#ifdef DEBUG_OSL_FILE - fprintf(stderr,"Mount Point found '%s'\n",pItem->pszMountPoint); -#endif -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_getFloppyMountEntry [found]\n"); -#endif - return sal_True; - } -#ifdef DEBUG_OSL_FILE -/* fprintf(stderr,"=================\n");*/ -#endif - pMountEnt=getmntent(mntfile); - } - -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_getFloppyMountEntry [not found]\n"); -#endif - - fclose(mntfile); - return sal_False; -} - -static sal_Bool osl_isFloppyMounted(oslVolumeDeviceHandleImpl* pDevice) -{ - sal_Char buffer[PATH_MAX]; - oslVolumeDeviceHandleImpl* pItem=0; - sal_Bool bRet=0; - - buffer[0] = '\0'; - -#ifdef TRACE_OSL_FILE - fprintf(stderr,"In osl_isFloppyMounted\n"); -#endif - - pItem = osl_newVolumeDeviceHandleImpl (); - if ( pItem == 0 ) - return osl_File_E_NOMEM; - - memset(buffer, 0, sizeof(buffer)); - strncpy(buffer, pDevice->pszMountPoint, sizeof(buffer) - 1); - -#ifdef DEBUG_OSL_FILE - fprintf(stderr,"Checking mount of %s\n",buffer); -#endif - - bRet = osl_getFloppyMountEntry(buffer,pItem); - - if ( bRet == sal_False ) - { -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_isFloppyMounted [not mounted]\n"); -#endif - return sal_False; - } - - if (strcmp(pItem->pszMountPoint, pDevice->pszMountPoint) == 0 && - strcmp(pItem->pszDevice,pDevice->pszDevice) == 0) - { -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_isFloppyMounted [is mounted]\n"); -#endif - rtl_freeMemory(pItem); - return sal_True; - } - -#ifdef TRACE_OSL_FILE - fprintf(stderr,"Out osl_isFloppyMounted [may be EBUSY]\n"); -#endif - - rtl_freeMemory(pItem); - return sal_False; -} -#endif /* IRIX */ - - /* NetBSD floppy functions have to be added here. Until we have done that, * we use the MACOSX definitions for nonexistent floppy. * */ diff --git a/sal/osl/unx/module.c b/sal/osl/unx/module.c index d486aad00e01..ffb0ebb61e7b 100644 --- a/sal/osl/unx/module.c +++ b/sal/osl/unx/module.c @@ -35,32 +35,6 @@ #include #include -#ifdef IRIX -#ifndef _RLD_INTERFACE_DLFCN_H_DLADDR -#define _RLD_INTERFACE_DLFCN_H_DLADDR -typedef struct DL_INFO { - const char * dli_fname; - void * dli_fbase; - const char * dli_sname; - void * dli_saddr; - int dli_version; - int dli_reserved1; - long dli_reserved[4]; -} Dl_info; -#endif -#include -#define _RLD_DLADDR 14 -int dladdr(void *address, Dl_info *dl); - -int dladdr(void *address, Dl_info *dl) -{ - void *v; - v = _rld_new_interface(_RLD_DLADDR,address,dl); - - return (int)v; -} -#endif - #include "system.h" #if OSL_DEBUG_LEVEL > 1 diff --git a/sal/osl/unx/nlsupport.c b/sal/osl/unx/nlsupport.c index e5390089e6d7..5f3741be883e 100644 --- a/sal/osl/unx/nlsupport.c +++ b/sal/osl/unx/nlsupport.c @@ -33,7 +33,7 @@ #include #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) || defined(MACOSX) +#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || defined(FREEBSD) || defined(MACOSX) #include #ifndef MACOSX #include @@ -42,7 +42,7 @@ #include #include #endif /* !MACOSX */ -#endif /* LINUX || SOLARIS || IRIX || NETBSD || MACOSX */ +#endif /* LINUX || SOLARIS || NETBSD || MACOSX */ #include @@ -229,13 +229,12 @@ static rtl_Locale * _parse_locale( const char * locale ) return NULL; } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) +#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps * from nl_langinfo(CODESET) to rtl_textencoding defines. - * nl_langinfo() is supported only on Linux and Solaris. - * nl_langinfo() is supported only on Linux, Solaris and IRIX, + * nl_langinfo() is supported only on Linux, Solaris, * >= NetBSD 1.6 and >= FreeBSD 4.4 * * This routine is SLOW because of the setlocale call, so @@ -299,24 +298,6 @@ const _pair _nl_language_list[] = { /* XXX MS-874 is an extension to tis620, so this is not * really equivalent */ -#elif defined(IRIX) - -const _pair _nl_language_list[] = { - { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ - { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ - { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ - { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ - { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ - { "eucTW", RTL_TEXTENCODING_EUC_TW }, /* Taiwan - Traditional Chinese */ - { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ - { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ - { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ - { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ - { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ - { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ - { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ - { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ -}; #elif defined(LINUX) || defined(NETBSD) @@ -552,7 +533,7 @@ const _pair _nl_language_list[] = { { "UTF-8", RTL_TEXTENCODING_UTF8 } /* ISO-10646/UTF-8 */ }; -#endif /* ifdef SOLARIS IRIX LINUX FREEBSD NETBSD */ +#endif /* ifdef SOLARIS LINUX FREEBSD NETBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; @@ -927,9 +908,6 @@ void _imp_getProcessLocale( rtl_Locale ** ppLocale ) int _imp_setProcessLocale( rtl_Locale * pLocale ) { -#ifdef IRIX - char env_buf[80]; -#endif char locale_buf[64]; /* convert rtl_Locale to locale string */ @@ -937,11 +915,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale ) { /* only change env vars that exist already */ if( getenv( "LC_ALL" ) ) { -#if defined( IRIX ) - snprintf(env_buf, sizeof(env_buf), "LC_ALL=%s", locale_buf); - env_buf[sizeof(env_buf)] = '\0'; - putenv(env_buf); -#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) +#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) setenv( "LC_ALL", locale_buf, 1); #else setenv( "LC_ALL", locale_buf ); @@ -949,11 +923,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale ) } if( getenv( "LC_CTYPE" ) ) { -#if defined( IRIX ) - snprintf(env_buf, sizeof(env_buf), "LC_CTYPE=%s", locale_buf); - env_buf[sizeof(env_buf)] = '\0'; - putenv(env_buf); -#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) +#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) setenv("LC_CTYPE", locale_buf, 1 ); #else setenv( "LC_CTYPE", locale_buf ); @@ -961,11 +931,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale ) } if( getenv( "LANG" ) ) { -#if defined( IRIX ) - snprintf(env_buf, sizeof(env_buf), "LANG=%s", locale_buf); - env_buf[sizeof(env_buf)] = '\0'; - putenv(env_buf); -#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) +#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) setenv("LC_CTYPE", locale_buf, 1 ); #else setenv( "LANG", locale_buf ); diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c index abda0b73d856..234232b1f0ef 100644 --- a/sal/osl/unx/process.c +++ b/sal/osl/unx/process.c @@ -49,7 +49,7 @@ #endif #include "system.h" -#if defined(SOLARIS) || defined(IRIX) +#if defined(SOLARIS) # include #endif #include @@ -1368,48 +1368,6 @@ oslProcessError SAL_CALL osl_getProcessInfo(oslProcess Process, oslProcessData F return (pInfo->Fields == Fields) ? osl_Process_E_None : osl_Process_E_Unknown; } -#elif defined(IRIX) - - int fd; - sal_Char name[PATH_MAX + 1]; - - snprintf(name, sizeof(name), "/proc/%u", pid); - - if ((fd = open(name, O_RDONLY)) >= 0) - { - prstatus_t prstatus; - prpsinfo_t prpsinfo; - - if (ioctl(fd, PIOCSTATUS, &prstatus) >= 0 && - ioctl(fd, PIOCPSINFO, &prpsinfo) >= 0) - { - if (Fields & osl_Process_CPUTIMES) - { - pInfo->UserTime.Seconds = prstatus.pr_utime.tv_sec; - pInfo->UserTime.Nanosec = prstatus.pr_utime.tv_nsec; - pInfo->SystemTime.Seconds = prstatus.pr_stime.tv_sec; - pInfo->SystemTime.Nanosec = prstatus.pr_stime.tv_nsec; - - pInfo->Fields |= osl_Process_CPUTIMES; - } - - if (Fields & osl_Process_HEAPUSAGE) - { - int pagesize = getpagesize(); - - pInfo->HeapUsage = prpsinfo.pr_size*pagesize; - - pInfo->Fields |= osl_Process_HEAPUSAGE; - } - - close(fd); - - return (pInfo->Fields == Fields) ? osl_Process_E_None : osl_Process_E_Unknown; - } - else - close(fd); - } - #elif defined(LINUX) if ( (Fields & osl_Process_CPUTIMES) || (Fields & osl_Process_HEAPUSAGE) ) diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c index 4306347af873..362f3b0f2644 100644 --- a/sal/osl/unx/socket.c +++ b/sal/osl/unx/socket.c @@ -48,7 +48,7 @@ #undef HAVE_POLL_H #endif -#if defined(LINUX) || defined (IRIX) || defined(NETBSD) || defined ( FREEBSD ) || defined (MACOSX) +#if defined(LINUX) || defined(NETBSD) || defined ( FREEBSD ) || defined (MACOSX) #include #define HAVE_POLL_H #endif /* HAVE_POLL_H */ diff --git a/sal/osl/unx/system.h b/sal/osl/unx/system.h index c2e01126fb58..91f3b9fb7ae0 100644 --- a/sal/osl/unx/system.h +++ b/sal/osl/unx/system.h @@ -270,34 +270,6 @@ extern unsigned int nanosleep(unsigned int); # define PTHREAD_SIGACTION cma_sigaction #endif -#ifdef IRIX -# define AF_IPX -1 -# include -# include -# include -# include -# include -# include -# include -# include -# if BYTE_ORDER == LITTLE_ENDIAN -# undef _BIG_ENDIAN -# undef _PDP_ENDIAN -# elif BYTE_ORDER == BIG_ENDIAN -# undef _LITTLE_ENDIAN -# undef _PDP_ENDIAN -# elif BYTE_ORDER == PDP_ENDIAN -# undef _LITTLE_ENDIAN -# undef _BIG_ENDIAN -# endif -# define SA_FAMILY_DECL \ - union { struct { short sa_family2; } sa_generic; } sa_union -# define NO_PTHREAD_PRIORITY -# include -# define IOCHANNEL_TRANSFER_BSD -extern char *strdup(const char *); -#endif - #ifdef SOLARIS # include # include @@ -364,8 +336,7 @@ int macxp_resolveAlias(char *path, int buflen); #if !defined(_WIN32) && !defined(_WIN16) && !defined(OS2) && \ !defined(LINUX) && !defined(NETBSD) && !defined(FREEBSD) && !defined(SCO) && \ !defined(AIX) && !defined(HPUX) && \ - !defined(SOLARIS) && !defined(IRIX) && \ - !defined(MACOSX) + !defined(SOLARIS) && !defined(MACOSX) # error "Target platform not specified!" #endif diff --git a/sal/rtl/source/alloc.c b/sal/rtl/source/alloc.c index 98a4c061e42b..123406717275 100644 --- a/sal/rtl/source/alloc.c +++ b/sal/rtl/source/alloc.c @@ -78,7 +78,7 @@ static sal_Size __rtl_memory_vmpagesize (void) /* xBSD */ return (sal_Size)(getpagesize()); } -#elif defined(IRIX) || defined(LINUX) || defined(SOLARIS) +#elif defined(LINUX) || defined(SOLARIS) static sal_Size __rtl_memory_vmpagesize (void) { /* POSIX */ @@ -90,7 +90,7 @@ static sal_Size __rtl_memory_vmpagesize (void) /* other */ return (sal_Size)(0x2000); } -#endif /* FREEBSD || NETBSD || MACOSX || IRIX || LINUX || SOLARIS */ +#endif /* FREEBSD || NETBSD || MACOSX || LINUX || SOLARIS */ #ifndef PROT_HEAP #define PROT_HEAP (PROT_READ | PROT_WRITE | PROT_EXEC) diff --git a/sal/rtl/source/macro.hxx b/sal/rtl/source/macro.hxx index a007d9e1cdab..ec8e4721a6a1 100644 --- a/sal/rtl/source/macro.hxx +++ b/sal/rtl/source/macro.hxx @@ -49,8 +49,6 @@ #define THIS_OS "NetBSD" #elif defined FREEBSD #define THIS_OS "FreeBSD" -#elif defined IRIX -#define THIS_OS "Irix" #endif #if ! defined THIS_OS @@ -76,8 +74,6 @@ this is inserted for the case that the preprocessor ignores error #else # define THIS_ARCH "SPARC" #endif -#elif defined IRIX -# define THIS_ARCH "MIPS" #elif defined MIPS # ifdef OSL_BIGENDIAN # define THIS_ARCH "MIPS_EB" diff --git a/sal/util/makefile.mk b/sal/util/makefile.mk index bc8026aa860f..a43f09e2e0e0 100644 --- a/sal/util/makefile.mk +++ b/sal/util/makefile.mk @@ -127,9 +127,6 @@ SHL1STDLIBS= -Bdynamic -ldl -lpthread -lposix4 -lsocket -lnsl SHL1STDLIBS+= -z allextract -staticlib=Crun -z defaultextract .ENDIF # C50 .ENDIF # SOLARIS -.IF "$(OS)"=="IRIX" -SHL1STDLIBS= -lexc -.ENDIF .ENDIF # UNX .IF "$(GUI)"=="OS2" diff --git a/salhelper/source/simplereferenceobject.cxx b/salhelper/source/simplereferenceobject.cxx index 2d80f246d171..36036feb5986 100755 --- a/salhelper/source/simplereferenceobject.cxx +++ b/salhelper/source/simplereferenceobject.cxx @@ -69,7 +69,7 @@ void SimpleReferenceObject::operator delete(void * pPtr) SAL_THROW(()) void SimpleReferenceObject::operator delete(void * pPtr, std::nothrow_t const &) SAL_THROW(()) { -#if defined WNT || (defined IRIX && !defined GCC) +#if defined WNT ::operator delete(pPtr); // WNT lacks a global nothrow operator delete... #else // WNT ::operator delete(pPtr, std::nothrow); From 678bc2193d95cbc3103a139cb87d3ada5c22804e Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 16 Nov 2009 12:01:50 +0100 Subject: [PATCH 38/56] in preparation of #i84012#: introduced a dedicated interface (css.sdb.XDatabaseRegistrations) for dealing with data source registrations, this way hiding the concrete configuration details. --- offapi/com/sun/star/sdb/DatabaseContext.idl | 17 +- .../star/sdb/DatabaseRegistrationEvent.idl | 60 +++++++ offapi/com/sun/star/sdb/XDatabaseAccess.idl | 49 +----- .../sun/star/sdb/XDatabaseAccessListener.idl | 35 +--- .../com/sun/star/sdb/XDatabaseEnvironment.idl | 27 +-- .../sun/star/sdb/XDatabaseRegistrations.idl | 158 ++++++++++++++++++ .../sdb/XDatabaseRegistrationsListener.idl | 70 ++++++++ offapi/com/sun/star/sdb/makefile.mk | 3 + 8 files changed, 312 insertions(+), 107 deletions(-) create mode 100644 offapi/com/sun/star/sdb/DatabaseRegistrationEvent.idl create mode 100644 offapi/com/sun/star/sdb/XDatabaseRegistrations.idl create mode 100644 offapi/com/sun/star/sdb/XDatabaseRegistrationsListener.idl diff --git a/offapi/com/sun/star/sdb/DatabaseContext.idl b/offapi/com/sun/star/sdb/DatabaseContext.idl index e82cce64de3d..9197057ff01a 100644 --- a/offapi/com/sun/star/sdb/DatabaseContext.idl +++ b/offapi/com/sun/star/sdb/DatabaseContext.idl @@ -52,6 +52,8 @@ module com { module sun { module star { module sdb { +published interface XDataSourceRegistrations; + /** is the context for accessing datasource.

@@ -65,12 +67,10 @@ */ published service DatabaseContext { - /** Enumeration on all registered data sources. */ interface com::sun::star::container::XEnumerationAccess; - /** NameAccess on all registered data sources.

One exception is the getByName, this method also allows to ask for a DatabaseLocation. @@ -89,6 +89,19 @@ published service DatabaseContext /** Interface for creation of new datasources. */ interface com::sun::star::lang::XSingleServiceFactory; + + /** allows to access and modify the configuration data for registered data source. + +

The main purpose of this interface is to allow you to register data sources which you know + by URL only, and have not yet loaded.

+ +

Also, it hides the details of the configuration data where the data source registrations + are maintained, so if possible at all, you should use this interface, instead of modifying or + querying the configuration data directly.

+ + @since OpenOffice.org 3.3 + */ + [optional] interface XDataSourceRegistrations; }; //============================================================================= diff --git a/offapi/com/sun/star/sdb/DatabaseRegistrationEvent.idl b/offapi/com/sun/star/sdb/DatabaseRegistrationEvent.idl new file mode 100644 index 000000000000..3f2a82aa13cb --- /dev/null +++ b/offapi/com/sun/star/sdb/DatabaseRegistrationEvent.idl @@ -0,0 +1,60 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2009 by Sun Microsystems, Inc. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +#ifndef __com_sun_star_sdb_DatabaseRegistrationEvent_idl__ +#define __com_sun_star_sdb_DatabaseRegistrationEvent_idl__ + +#include + +//============================================================================= + +module com { module sun { module star { module sdb { + +//============================================================================= + +/** describes a change in a database registration + + @see XDatabaseRegistrations + @see XDatabaseRegistrationsListener + + @since OpenOffice.org 3.3 + */ +struct DatabaseRegistrationEvent : ::com::sun::star::lang::EventObject +{ + /// is the name of the database registration affected by the event + string Name; + /// is the old location of the database which is affected by the event + string OldLocation; + /// is the new location of the database which is affected by the event + string NewLocation; +}; + +//============================================================================= + +}; }; }; }; + +//============================================================================= + +#endif diff --git a/offapi/com/sun/star/sdb/XDatabaseAccess.idl b/offapi/com/sun/star/sdb/XDatabaseAccess.idl index a9091be56ce5..61667e73a1af 100644 --- a/offapi/com/sun/star/sdb/XDatabaseAccess.idl +++ b/offapi/com/sun/star/sdb/XDatabaseAccess.idl @@ -54,60 +54,17 @@ //============================================================================= -/** is used to connect to a data access bean. A data access bean represents a - database connection and provides additional information related to the connection - such as forms, reports, or queries. +/** is not to be used anymore + @deprecated */ published interface XDatabaseAccess: com::sun::star::sdbc::XDataSource { - - /** indicates that connections already exist. - @returns - if so - */ boolean hasConnections(); - //------------------------------------------------------------------------- - - /** attempts to establish a database connection, that can not be shared with - other components. This should be used for transaction processing. - @param user - the user name - @param password - the password - @returns - an isolated connection object - @throws com::sun::star::sdbc::SQLException - if a database access error occurs. - @see com::sun::star::sdbc::XConnection - */ com::sun::star::sdbc::XConnection getIsolatedConnection([in]string user, [in]string password) raises (com::sun::star::sdbc::SQLException); - //------------------------------------------------------------------------- - - /** closes the all connections to database. This request could be aborted by - listeners of the component. - @throws com::sun::star::sdbc::SQLException - if a database access error occurs. - */ boolean suspendConnections() raises (com::sun::star::sdbc::SQLException); - //------------------------------------------------------------------------- - - /** adds the specified listener to receive the events "connectionChanged", - "approveConnectionClose", and "connectionClosing". - @param listener - the listener to append - @see com::sun::star::sdb::XDatabaseAccessListener - */ [oneway] void addDatabaseAccessListener([in]XDatabaseAccessListener listener); - //------------------------------------------------------------------------- - - /** removes the specified listener. - @param listener - the listener to append - @see com::sun::star::sdb::XDatabaseAccessListener - */ - [oneway] void removeDatabaseAccessListener( - [in]XDatabaseAccessListener listener); + [oneway] void removeDatabaseAccessListener([in]XDatabaseAccessListener listener); }; //============================================================================= diff --git a/offapi/com/sun/star/sdb/XDatabaseAccessListener.idl b/offapi/com/sun/star/sdb/XDatabaseAccessListener.idl index 1c9361f9da09..2a502f632d86 100644 --- a/offapi/com/sun/star/sdb/XDatabaseAccessListener.idl +++ b/offapi/com/sun/star/sdb/XDatabaseAccessListener.idl @@ -37,44 +37,13 @@ module com { module sun { module star { module sdb { -/** is used for receiving "connectionChanged", "approveConnectionClose", and - "connectionClosing" events posted by a database access bean. - - -

- A database access bean setting may be changed to connect to a different database. - In that case, the connection of the bean must be closed and a new connection must - be established. The could affect the current data processing on the bean, as it - could be shared by a number of components. To prevent the bean from closing it's - connection, a DatabaseAccessListener could abort the closing. -

+/** is not to be used anymore + @deprecated */ published interface XDatabaseAccessListener: com::sun::star::lang::XEventListener { - - /** indicates that a new connection for the bean has been established. - @param evenet - the event happend - */ [oneway] void connectionChanged([in]com::sun::star::lang::EventObject event); - //------------------------------------------------------------------------- - - /** indicates that the connection of the bean will be closed. If there are pending - actions on the connection of the bean, "approveConnectionClosing" should return - . - - @param evenet - the event happend - @returns - when approved, otherwise - */ boolean approveConnectionClosing([in]com::sun::star::lang::EventObject event); - //------------------------------------------------------------------------- - - /** indicates that the connection will definitely be closed. - @param evenet - the event happend - */ [oneway] void connectionClosing([in]com::sun::star::lang::EventObject event); }; diff --git a/offapi/com/sun/star/sdb/XDatabaseEnvironment.idl b/offapi/com/sun/star/sdb/XDatabaseEnvironment.idl index 2e7f9b46200c..5cb3aa4832fd 100644 --- a/offapi/com/sun/star/sdb/XDatabaseEnvironment.idl +++ b/offapi/com/sun/star/sdb/XDatabaseEnvironment.idl @@ -54,39 +54,14 @@ //============================================================================= -/** specifies the root of the data access beans. It provides the possiblity - to open a data access bean, which contains tables, queries, forms, and - report documents, or to open a connection to a database. +/** is not to be used anymore. @deprecated */ published interface XDatabaseEnvironment: com::sun::star::sdbc::XDriverManager { - //------------------------------------------------------------------------- - - /** returns an existing DatabaseAccess bean specified by it's URL. - - -

Database Access beans are always shared, so if there's a second request - for the same bean, the same instance of the bean will be returned, if it is still alive. -

- @param URL - a database url of the form sdbc:subprotocol:subname - @returns - the database access object for this url - */ XDatabaseAccess getDatabaseAccess([in]string URL) raises (com::sun::star::sdbc::SQLException); - //------------------------------------------------------------------------- - - /** creates a new DatabaseAccess bean specified by it's URL. - @param URL - a database url of the form sdbc:subprotocol:subname - @param title - the title of the database access - @returns - the new created database access object for this url - */ XDatabaseAccess createDatabaseAccess([in]string URL, [in]string title) raises (com::sun::star::sdbc::SQLException); }; diff --git a/offapi/com/sun/star/sdb/XDatabaseRegistrations.idl b/offapi/com/sun/star/sdb/XDatabaseRegistrations.idl new file mode 100644 index 000000000000..ce8e54b8d359 --- /dev/null +++ b/offapi/com/sun/star/sdb/XDatabaseRegistrations.idl @@ -0,0 +1,158 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2009 by Sun Microsystems, Inc. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +#ifndef __com_sun_star_sdb_XDatabaseRegistrations_idl__ +#define __com_sun_star_sdb_XDatabaseRegistrations_idl__ + +#include +#include +#include +#include + +//============================================================================= + +module com { module sun { module star { module sdb { + +interface XDatabaseRegistrationsListener; + +//============================================================================= + +/** provides access to the application-wide registered databases. + +

This interface provides a mere wrapper around the respective configuration data, + this way hiding the concrete configuration structure from its clients. You should, + if possible at all, use this interface, instead of modifying or querying the configuration + data directly.

+ + @since OpenOffice.org 3.3 + */ +interface XDatabaseRegistrations +{ + /** determines whether a database is registered under the given name. + + @throws ::com::sun::star::lang::IllegalArgumentException + if the given name is empty + */ + boolean hasRegisteredDatabase( [in] string Name ) + raises ( ::com::sun::star::lang::IllegalArgumentException + ); + + /** returns the names of all registered databases + */ + sequence< string > + getRegistrationNames(); + + /** returns the location of the database registered under the given name + + @throws ::com::sun::star::lang::IllegalArgumentException + if the given name is empty + + @throws ::com::sun::star::container::NoSuchElementException + if there is no database registered under this name + */ + string getDatabaseLocation( [in] string Name ) + raises ( ::com::sun::star::lang::IllegalArgumentException + , ::com::sun::star::container::NoSuchElementException + ); + + /** registers a database, given by location, under a given name + + @throws ::com::sun::star::lang::IllegalArgumentException + if the given name is empty, or the given location is invalid. + + @throws ::com::sun::star::container::ElementExistException + if there already is a databases registered under the given name. + */ + void registerDatabaseLocation( [in] string Name, [in] string Location ) + raises ( ::com::sun::star::lang::IllegalArgumentException + , ::com::sun::star::container::ElementExistException + ); + + /** revokes the registration of a database, given by name + + @throws ::com::sun::star::lang::IllegalArgumentException + if the given name is empty + + @throws ::com::sun::star::container::NoSuchElementException + if there is no database registered under this name + + @throws ::com::sun::star::lang::IllegalAccessException + if the registration data for this database is read-only + */ + void revokeDatabaseLocation( [in] string Name ) + raises ( ::com::sun::star::lang::IllegalArgumentException + , ::com::sun::star::container::NoSuchElementException + , ::com::sun::star::lang::IllegalAccessException + ); + + /** changes the location of a given database registration + + @throws ::com::sun::star::lang::IllegalArgumentException + if the given name is empty, or the given location is invalid. + + @throws ::com::sun::star::container::NoSuchElementException + if there is no database registered under this name + + @throws ::com::sun::star::lang::IllegalAccessException + if the registration data for this database is read-only + */ + void changeDatabaseLocation( [in] string Name, [in] string NewLocation ) + raises ( ::com::sun::star::lang::IllegalArgumentException + , ::com::sun::star::container::NoSuchElementException + , ::com::sun::star::lang::IllegalAccessException + ); + + /** determines whether the registration data for a database given by name is + read-only. + +

In this case, attempts to revoke this registration will fail.

+ + @throws ::com::sun::star::lang::IllegalArgumentException + if the given name is empty + + @throws ::com::sun::star::container::NoSuchElementException + if there is no database registered under this name + */ + boolean isDatabaseRegistrationReadOnly( [in] string Name ) + raises ( ::com::sun::star::lang::IllegalArgumentException + , ::com::sun::star::container::NoSuchElementException + ); + + /** registers a listener which is notified of changes in the registered databases + */ + void addDatabaseRegistrationsListener( [in] XDatabaseRegistrationsListener Listener ); + + /** revokes a previously registered listener + */ + void removeDatabaseRegistrationsListener( [in] XDatabaseRegistrationsListener Listener ); +}; + +//============================================================================= + +}; }; }; }; + +//============================================================================= + +#endif diff --git a/offapi/com/sun/star/sdb/XDatabaseRegistrationsListener.idl b/offapi/com/sun/star/sdb/XDatabaseRegistrationsListener.idl new file mode 100644 index 000000000000..f5fc65513d6e --- /dev/null +++ b/offapi/com/sun/star/sdb/XDatabaseRegistrationsListener.idl @@ -0,0 +1,70 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2009 by Sun Microsystems, Inc. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +#ifndef __com_sun_star_sdb_XDatabaseRegistrationsListener_idl__ +#define __com_sun_star_sdb_XDatabaseRegistrationsListener_idl__ + +#include +#include + +//============================================================================= + +module com { module sun { module star { module sdb { + +//============================================================================= + +/** implemented by components which want to be notified of changes in the application-wide registered + databases. + + @see XDatabaseRegistrations + + @since OpenOffice.org 3.3 + */ +interface XDatabaseRegistrationsListener : ::com::sun::star::lang::XEventListener +{ + /** called when a database has been registered + */ + void registeredDatabaseLocation( [in] DatabaseRegistrationEvent Event ); + + /** called when a database registration has been revoked + */ + void revokedDatabaseLocation( [in] DatabaseRegistrationEvent Event ); + + /** called when a the location of a registered database changed + +

Note that this talks about registration data only. That is, if the actual file denoted by the database + registration is moved, this is in no way monitored or reported. Only (successful) calls to + XDatabaseRegistrations::changeDatabaseLocation are reported here.

+ */ + void changedDatabaseLocation( [in] DatabaseRegistrationEvent Event ); +}; + +//============================================================================= + +}; }; }; }; + +//============================================================================= + +#endif diff --git a/offapi/com/sun/star/sdb/makefile.mk b/offapi/com/sun/star/sdb/makefile.mk index b535584fc4b8..3e76283ecf18 100644 --- a/offapi/com/sun/star/sdb/makefile.mk +++ b/offapi/com/sun/star/sdb/makefile.mk @@ -62,6 +62,7 @@ IDLFILES=\ DatabaseContext.idl \ DatabaseDocument.idl \ DatabaseEnvironment.idl \ + DatabaseRegistrationEvent.idl \ DataColumn.idl \ DataSettings.idl \ DataSource.idl \ @@ -113,6 +114,8 @@ IDLFILES=\ XDataAccessDescriptorFactory.idl \ XDatabaseAccess.idl \ XDatabaseAccessListener.idl \ + XDatabaseRegistrations.idl \ + XDatabaseRegistrationsListener.idl \ XDatabaseEnvironment.idl \ XDocumentDataSource.idl \ XFormDocumentsSupplier.idl \ From de0938bc20ede6f83742edd65252287087eb9fef Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 17 Nov 2009 14:58:44 +0100 Subject: [PATCH 39/56] performance bug in build system caused by too many flushed --- registry/source/keyimpl.cxx | 8 ++++---- registry/source/regimpl.cxx | 22 ++++++++++++++++++---- registry/source/regimpl.hxx | 2 ++ registry/source/registry.cxx | 2 ++ 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/registry/source/keyimpl.cxx b/registry/source/keyimpl.cxx index 281c8e27cbf0..b41fbbb5ada9 100644 --- a/registry/source/keyimpl.cxx +++ b/registry/source/keyimpl.cxx @@ -365,7 +365,7 @@ RegError ORegKey::setValue(const OUString& valueName, RegValueType vType, RegVal return REG_SET_VALUE_FAILED; } - rValue.flush(); + //rValue.flush(); rtl_freeMemory(pBuffer); return REG_NO_ERROR; } @@ -424,7 +424,7 @@ RegError ORegKey::setLongListValue(const OUString& valueName, sal_Int32* pValueL return REG_SET_VALUE_FAILED; } - rValue.flush(); + //rValue.flush(); rtl_freeMemory(pBuffer); return REG_NO_ERROR; } @@ -492,7 +492,7 @@ RegError ORegKey::setStringListValue(const OUString& valueName, sal_Char** pValu return REG_SET_VALUE_FAILED; } - rValue.flush(); + //rValue.flush(); rtl_freeMemory(pBuffer); return REG_NO_ERROR; } @@ -560,7 +560,7 @@ RegError ORegKey::setUnicodeListValue(const OUString& valueName, sal_Unicode** p return REG_SET_VALUE_FAILED; } - rValue.flush(); + //rValue.flush(); rtl_freeMemory(pBuffer); return REG_NO_ERROR; } diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx index 8a4dd8b88ee9..b9edca734232 100644 --- a/registry/source/regimpl.cxx +++ b/registry/source/regimpl.cxx @@ -848,7 +848,7 @@ RegError ORegistry::eraseKey(ORegKey* pKey, const OUString& keyName) { return REG_DELETE_KEY_FAILED; } - sFile.flush(); + //sFile.flush(); // set flag deleted !!! ((ORegKey*)hOldKey)->setDeleted(sal_True); @@ -894,7 +894,7 @@ RegError ORegistry::deleteSubkeysAndValues(ORegKey* pKey) { return REG_DELETE_VALUE_FAILED; } - ((OStoreFile&)pKey->getStoreFile()).flush(); + //((OStoreFile&)pKey->getStoreFile()).flush(); } _err = rStoreDir.next(iter); @@ -1065,7 +1065,7 @@ RegError ORegistry::loadAndSaveValue(ORegKey* pTargetKey, { return REG_VALUE_NOT_EXISTS; } - pSourceKey->getStoreFile().flush(); + //pSourceKey->getStoreFile().flush(); pBuffer = (sal_uInt8*)rtl_allocateMemory(VALUE_HEADERSIZE); @@ -1137,7 +1137,7 @@ RegError ORegistry::loadAndSaveValue(ORegKey* pTargetKey, rtl_freeMemory(pBuffer); return REG_INVALID_VALUE; } - rTargetFile.flush(); + //rTargetFile.flush(); if (rwBytes != nSize) { @@ -1482,6 +1482,20 @@ RegError ORegistry::dumpRegistry(RegKeyHandle hKey) const return REG_NO_ERROR; } +RegError ORegistry::flush() +{ + REG_GUARD(m_mutex); + + if (m_file.isValid()) + { + m_file.flush(); + return REG_NO_ERROR; + } else + { + return REG_REGISTRY_NOT_EXISTS; + } +} + //********************************************************************* // dumpValue() diff --git a/registry/source/regimpl.hxx b/registry/source/regimpl.hxx index c32dcf3527df..32baf9cc6ed5 100644 --- a/registry/source/regimpl.hxx +++ b/registry/source/regimpl.hxx @@ -113,6 +113,8 @@ public: RegError dumpRegistry(RegKeyHandle hKey) const; + RegError flush(); + ~ORegistry(); sal_Bool isReadOnly() const diff --git a/registry/source/registry.cxx b/registry/source/registry.cxx index cb145b3910c2..139646f7cdc7 100644 --- a/registry/source/registry.cxx +++ b/registry/source/registry.cxx @@ -430,6 +430,8 @@ static RegError REGISTRY_CALLTYPE mergeKey(RegHandle hReg, */ _ret = pKey->closeKey(pNewKey); + if (_ret == REG_NO_ERROR ) + _ret = pReg->flush(); return _ret; } From eb927863522b0ba8a67a245e6f0d631406bf7e1a Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 17 Nov 2009 15:05:59 +0100 Subject: [PATCH 40/56] #i10000# --- offapi/com/sun/star/sdb/DatabaseContext.idl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/offapi/com/sun/star/sdb/DatabaseContext.idl b/offapi/com/sun/star/sdb/DatabaseContext.idl index 9197057ff01a..623b28c887b8 100644 --- a/offapi/com/sun/star/sdb/DatabaseContext.idl +++ b/offapi/com/sun/star/sdb/DatabaseContext.idl @@ -52,7 +52,7 @@ module com { module sun { module star { module sdb { -published interface XDataSourceRegistrations; +published interface XDatabaseRegistrations; /** is the context for accessing datasource. @@ -101,7 +101,7 @@ published service DatabaseContext @since OpenOffice.org 3.3 */ - [optional] interface XDataSourceRegistrations; + [optional] interface XDatabaseRegistrations; }; //============================================================================= From abaa6f10a80ce5a8a5f16542cc08ceda130892cc Mon Sep 17 00:00:00 2001 From: npower Developer Date: Wed, 18 Nov 2009 11:25:15 +0000 Subject: [PATCH 41/56] menuincustomtoolbar: #i105626#: implement menu for custom toolbar ( and some item style override capability ) --- offapi/com/sun/star/ui/ItemStyle.idl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/offapi/com/sun/star/ui/ItemStyle.idl b/offapi/com/sun/star/ui/ItemStyle.idl index 6c20d06e9a56..6646c5ec5c72 100644 --- a/offapi/com/sun/star/ui/ItemStyle.idl +++ b/offapi/com/sun/star/ui/ItemStyle.idl @@ -127,6 +127,7 @@ constants ItemStyle /** specifies if an icon is placed on left side of the text, like an entry in a taskbar.

This style is only valid if the item describes a toolbar item and visible if style of the toolbar is set to symboltext.

+

This style can also be used for custom toolbars and menus, in a custom toolbar an item's Style setting can used to override the toolbar container setting, the style can be bitwise OR-ed with TEXT to define text, text+icon or icon only is to be displayed. Similarly for menu items, an items Style can override the application setting to display either text or icon ( note: for menu an icon only setting interpreted as icon+text )

*/ const short ICON = 128; @@ -149,6 +150,10 @@ constants ItemStyle

This style is only valid if the item describes a toolbar item.

*/ const short DROPDOWN_ONLY = 1024; + /** indicates if icon, text or text+icon is displayed for the item. +

This style can be used for custom toolbars and menus, in a custom toolbar an item's Style setting can used to override the toolbar container setting, the style can be bitwise OR-ed with ICON to define text, text+icon or icon only is to be displayed. Similarly for menu items, an items Style can override the application setting to display either text or icon ( note: for menu an icon only setting interpreted as icon+text )

+ */ + const short TEXT = 2048; }; }; }; }; }; From b83f93224608378719efae3888f9fa0b34439015 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 19 Nov 2009 11:54:55 +0100 Subject: [PATCH 42/56] #i97029#: offapi: add com.sun.star.util.Duration --- offapi/com/sun/star/util/Duration.idl | 102 ++++++++++++++++++++++++++ offapi/com/sun/star/util/makefile.mk | 1 + 2 files changed, 103 insertions(+) create mode 100644 offapi/com/sun/star/util/Duration.idl diff --git a/offapi/com/sun/star/util/Duration.idl b/offapi/com/sun/star/util/Duration.idl new file mode 100644 index 000000000000..839caec83796 --- /dev/null +++ b/offapi/com/sun/star/util/Duration.idl @@ -0,0 +1,102 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: DateTime.idl,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_util_Duration_idl__ +#define __com_sun_star_util_Duration_idl__ + + +//======================================================================== + +module com { module sun { module star { module util { + +//======================================================================== + +/** represents a duration. + +

+ A duration is the difference of 2 DateTimes. +

+ +

+ Note that there are no constraints on the ranges of the members, + except that every member must be non-negative: + for example, a Duration of 400 Days is valid. +

+ */ +struct Duration +{ + //-------------------------------------------------------------------- + /** explicit sign bit. + */ + boolean Negative; + + //-------------------------------------------------------------------- + /** contains the years. + */ + unsigned short Years; + + //-------------------------------------------------------------------- + /** contains the months. + */ + unsigned short Months; + + //-------------------------------------------------------------------- + /** contains the days. + */ + unsigned short Days; + + //-------------------------------------------------------------------- + /** contains the hours. + */ + unsigned short Hours; + + //-------------------------------------------------------------------- + /** contains the minutes. + */ + unsigned short Minutes; + + //-------------------------------------------------------------------- + /** contains the seconds. + */ + unsigned short Seconds; + + //-------------------------------------------------------------------- + /** contains the hundredth seconds. + */ + unsigned short HundredthSeconds; + +}; + +//======================================================================== + +}; }; }; }; + +#endif + diff --git a/offapi/com/sun/star/util/makefile.mk b/offapi/com/sun/star/util/makefile.mk index 44fbdf9065b2..e5f9aab136c3 100644 --- a/offapi/com/sun/star/util/makefile.mk +++ b/offapi/com/sun/star/util/makefile.mk @@ -53,6 +53,7 @@ IDLFILES=\ DateTime.idl\ DateTimeRange.idl\ DiskFullException.idl\ + Duration.idl\ ElementChange.idl \ Endianness.idl \ FileIOException.idl\ From 8a55ff3c76acbd2349648fbe368d91a00811882d Mon Sep 17 00:00:00 2001 From: Mikhail Voitenko Date: Mon, 23 Nov 2009 13:47:02 +0000 Subject: [PATCH 43/56] #i105343# no outdated info in the buffer --- sal/osl/unx/file.cxx | 4 +++- sal/osl/w32/file.cxx | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx index 8e7d76cda614..e02485cdf4ce 100644 --- a/sal/osl/unx/file.cxx +++ b/sal/osl/unx/file.cxx @@ -466,6 +466,7 @@ oslFileError FileHandle_Impl::readFileAt ( oslFileError result = syncFile(); if (result != osl_File_E_None) return (result); + m_bufptr = -1, m_buflen = 0; if (nBytesRequested >= m_bufsiz) { @@ -535,6 +536,7 @@ oslFileError FileHandle_Impl::writeFileAt ( oslFileError result = syncFile(); if (result != osl_File_E_None) return (result); + m_bufptr = -1, m_buflen = 0; if (nBytesToWrite >= m_bufsiz) { @@ -1009,7 +1011,7 @@ SAL_CALL osl_syncFile(oslFileHandle Handle) FileHandle_Impl::Guard lock (&(pImpl->m_mutex)); - OSL_FILE_TRACE("osl_syncFile(%d)", pImpl->m_fd); + OSL_TRACE("osl_syncFile(%d)", pImpl->m_fd); oslFileError result = pImpl->syncFile(); if (result != osl_File_E_None) return (result); diff --git a/sal/osl/w32/file.cxx b/sal/osl/w32/file.cxx index 34deba2293da..60c51cfb3a73 100644 --- a/sal/osl/w32/file.cxx +++ b/sal/osl/w32/file.cxx @@ -400,6 +400,7 @@ oslFileError FileHandle_Impl::readFileAt ( oslFileError result = syncFile(); if (result != osl_File_E_None) return (result); + m_bufptr = -1, m_buflen = 0; if (nBytesRequested >= m_bufsiz) { @@ -472,6 +473,7 @@ oslFileError FileHandle_Impl::writeFileAt ( oslFileError result = syncFile(); if (result != osl_File_E_None) return (result); + m_bufptr = -1, m_buflen = 0; if (nBytesToWrite >= m_bufsiz) { From 50c59ad9f307d16bc312d9b87b9fcfda1ea8f44c Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 24 Nov 2009 11:44:08 +0100 Subject: [PATCH 44/56] sb116: #i107157# redesigned java_environment.Registry to avoid memory leaks (and simplified code) --- .../environments/java/java_environment.java | 192 +++++++----------- 1 file changed, 76 insertions(+), 116 deletions(-) diff --git a/jurt/com/sun/star/lib/uno/environments/java/java_environment.java b/jurt/com/sun/star/lib/uno/environments/java/java_environment.java index 36404f28d57e..aa9a21a26b22 100644 --- a/jurt/com/sun/star/lib/uno/environments/java/java_environment.java +++ b/jurt/com/sun/star/lib/uno/environments/java/java_environment.java @@ -37,7 +37,6 @@ import java.lang.ref.ReferenceQueue; import java.lang.ref.WeakReference; import java.util.HashMap; import java.util.Iterator; -import java.util.LinkedList; /** * The java_environment is the environment where objects and @@ -159,70 +158,64 @@ public final class java_environment implements IEnvironment { } private static final class Registry { - public Object register(Object object, String oid, Type type) { - synchronized (map) { - cleanUp(); - Level1Entry l1 = getLevel1Entry(oid); - if (l1 != null) { - Level2Entry l2 = l1.get(type); - if (l2 != null) { - Object o = l2.get(); - if (o != null) { - l2.acquire(); - return o; - } + public synchronized Object register( + Object object, String oid, Type type) + { + cleanUp(); + Level1Entry l1 = level1map.get(oid); + if (l1 != null) { + Level2Entry l2 = l1.level2map.get(type); + if (l2 != null) { + Object o = l2.get(); + if (o != null) { + l2.acquire(); + return o; } } - // TODO If a holder references an unreachable object, but still - // has a positive count, it is replaced with a new holder - // (referencing a reachable object, and with a count of 1). Any - // later calls to revoke that should decrement the count of the - // previous holder would now decrement the count of the new - // holder, removing it prematurely. This is a design flaw that - // will be fixed when IEnvironment.revokeInterface is changed to - // no longer use counting. (And this problem is harmless, as - // currently a holder either references a strongly held object - // and uses register/revoke to control it, or references a - // weakly held proxy and never revokes it.) - if (l1 == null) { - l1 = new Level1Entry(); - map.put(oid, l1); - } - l1.add(new Level2Entry(oid, type, object, queue)); } + // TODO If a holder references an unreachable object, but still has + // a positive count, it is replaced with a new holder (referencing a + // reachable object, and with a count of 1). Any later calls to + // revoke that should decrement the count of the previous holder + // would now decrement the count of the new holder, removing it + // prematurely. This is a design flaw that will be fixed when + // IEnvironment.revokeInterface is changed to no longer use + // counting. (And this problem is harmless, as currently a holder + // either references a strongly held object and uses register/revoke + // to control it, or references a weakly held proxy and never + // revokes it.) + if (l1 == null) { + l1 = new Level1Entry(); + level1map.put(oid, l1); + } + l1.level2map.put(type, new Level2Entry(oid, type, object, queue)); return object; } - public boolean revoke(String oid, Type type) { - synchronized (map) { - Level1Entry l1 = getLevel1Entry(oid); - Level2Entry l2 = null; - if (l1 != null) { - l2 = l1.get(type); - if (l2 != null && l2.release()) { - removeLevel2Entry(oid, l1, l2); - } + public synchronized boolean revoke(String oid, Type type) { + Level1Entry l1 = level1map.get(oid); + Level2Entry l2 = null; + if (l1 != null) { + l2 = l1.level2map.get(type); + if (l2 != null && l2.release()) { + removeLevel2Entry(l1, oid, type); } - cleanUp(); - return l2 != null; } + cleanUp(); + return l2 != null; } - public Object get(String oid, Type type) { - synchronized (map) { - Level1Entry l1 = getLevel1Entry(oid); - return l1 == null ? null : l1.find(type); - } + public synchronized Object get(String oid, Type type) { + Level1Entry l1 = level1map.get(oid); + return l1 == null ? null : l1.find(type); } - public void clear() { - synchronized (map) { - map.clear(); - cleanUp(); - } + public synchronized void clear() { + level1map.clear(); + cleanUp(); } - // must only be called while synchronized on map: + // must only be called while synchronized on this Registry: private void cleanUp() { for (;;) { Level2Entry l2 = (Level2Entry) queue.poll(); @@ -235,55 +228,38 @@ public final class java_environment implements IEnvironment { // created since now e1.get() == null), and only then e1 is // enqueued. To not erroneously remove the new e2 in that case, // check whether the map still contains e1: - String oid = l2.getOid(); - Level1Entry l1 = getLevel1Entry(oid); - if (l1 != null && l1.get(l2.getType()) == l2) { - removeLevel2Entry(oid, l1, l2); + Level1Entry l1 = level1map.get(l2.oid); + if (l1 != null && l1.level2map.get(l2.type) == l2) { + removeLevel2Entry(l1, l2.oid, l2.type); } } } - // must only be called while synchronized on map: - private Level1Entry getLevel1Entry(String oid) { - return (Level1Entry) map.get(oid); - } - - // must only be called while synchronized on map: - private void removeLevel2Entry(String oid, Level1Entry l1, - Level2Entry l2) { - if (l1.remove(l2)) { - map.remove(oid); + // must only be called while synchronized on this Registry: + private void removeLevel2Entry(Level1Entry l1, String oid, Type type) { + l1.level2map.remove(type); + if (l1.level2map.isEmpty()) { + level1map.remove(oid); } } private static final class Level1Entry { - // must only be called while synchronized on map: - public Level2Entry get(Type type) { - for (Iterator i = list.iterator(); i.hasNext();) { - Level2Entry l2 = (Level2Entry) i.next(); - if (l2.getType().equals(type)) { - return l2; - } - } - return null; - } - - // must only be called while synchronized on map: + // must only be called while synchronized on enclosing Registry: public Object find(Type type) { // First, look for an exactly matching entry; then, look for an // arbitrary entry for a subtype of the request type: - for (Iterator i = list.iterator(); i.hasNext();) { - Level2Entry l2 = (Level2Entry) i.next(); - if (l2.getType().equals(type)) { - Object o = l2.get(); - if (o != null) { - return o; - } + Level2Entry l2 = level2map.get(type); + if (l2 != null) { + Object o = l2.get(); + if (o != null) { + return o; } } - for (Iterator i = list.iterator(); i.hasNext();) { - Level2Entry l2 = (Level2Entry) i.next(); - if (type.isSupertypeOf(l2.getType())) { + for (Iterator i = level2map.values().iterator(); + i.hasNext();) + { + l2 = i.next(); + if (type.isSupertypeOf(l2.type)) { Object o = l2.get(); if (o != null) { return o; @@ -293,53 +269,37 @@ public final class java_environment implements IEnvironment { return null; } - // must only be called while synchronized on map: - public void add(Level2Entry l2) { - list.add(l2); - } - - // must only be called while synchronized on map: - public boolean remove(Level2Entry l2) { - list.remove(l2); - return list.isEmpty(); - } - - private final LinkedList list = new LinkedList(); // of Level2Entry + public final HashMap level2map = + new HashMap(); } - private static final class Level2Entry extends WeakReference { - public Level2Entry(String oid, Type type, Object object, - ReferenceQueue queue) { + private static final class Level2Entry extends WeakReference { + public Level2Entry( + String oid, Type type, Object object, ReferenceQueue queue) + { super(object, queue); this.oid = oid; this.type = type; } - public String getOid() { - return oid; - } - - public Type getType() { - return type; - } - - // must only be called while synchronized on map: + // must only be called while synchronized on enclosing Registry: public void acquire() { ++count; } - // must only be called while synchronized on map: + // must only be called while synchronized on enclosing Registry: public boolean release() { return --count == 0; } - private final String oid; - private final Type type; + public final String oid; + public final Type type; + private int count = 1; } - private final HashMap map = new HashMap(); - // from OID (String) to Level1Entry + private final HashMap level1map = + new HashMap(); private final ReferenceQueue queue = new ReferenceQueue(); } From 7752052f8472ca365167abbcd15c4c0f5d643f1d Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 26 Nov 2009 10:57:49 +0100 Subject: [PATCH 45/56] #i97029#: offapi: com.sun.star.util.Duration: add forgotten since tag --- offapi/com/sun/star/util/Duration.idl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/offapi/com/sun/star/util/Duration.idl b/offapi/com/sun/star/util/Duration.idl index 839caec83796..39f3ca8114ce 100644 --- a/offapi/com/sun/star/util/Duration.idl +++ b/offapi/com/sun/star/util/Duration.idl @@ -49,6 +49,8 @@ module com { module sun { module star { module util { except that every member must be non-negative: for example, a Duration of 400 Days is valid.

+ + @since OOo 3.3 */ struct Duration { From eb40b6f614b54fea1a729c63ef5213b1b000b19a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 30 Nov 2009 12:03:04 +0000 Subject: [PATCH 46/56] cmcfixes68: #i107320# ifdef debug only code --- jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx | 7 ------- jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx | 1 - jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 5 ++++- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx index 56972ea0e66f..e7f55eb91595 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx @@ -54,13 +54,6 @@ public: } test; #endif -SunVersion::SunVersion(): m_nUpdateSpecial(0), - m_preRelease(Rel_NONE), - m_bValid(false) -{ - memset(m_arVersionParts, 0, sizeof(m_arVersionParts)); -} - SunVersion::SunVersion(const rtl::OUString &usVer): m_nUpdateSpecial(0), m_preRelease(Rel_NONE), usVersion(usVer) diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx index f6114672b17c..51b4ecf10221 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx @@ -92,7 +92,6 @@ protected: PreRelease m_preRelease; public: - SunVersion(); SunVersion(const char * szVer); SunVersion(const rtl::OUString& usVer); ~SunVersion(); diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index a823d551af88..674dd2103236 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -300,13 +300,14 @@ class AsynchReader: public Thread public: AsynchReader(oslFileHandle & rHandle); - +#if OSL_DEBUG_LEVEL >= 2 /** only call this function after this thread has finished. That is, call join on this instance and then call getData. */ OString getData(); +#endif }; AsynchReader::AsynchReader(oslFileHandle & rHandle): @@ -314,11 +315,13 @@ AsynchReader::AsynchReader(oslFileHandle & rHandle): { } +#if OSL_DEBUG_LEVEL >= 2 OString AsynchReader::getData() { OSL_ASSERT(isRunning() == sal_False ); return OString(m_arData.get(), m_nDataSize); } +#endif void AsynchReader::run() { From c13c003af95580e555c8ef83b19b00c8c29685ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 30 Nov 2009 12:07:42 +0000 Subject: [PATCH 47/56] cmcfixes68: #i107321# micro opt for x86_64 bridge --- bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx index 5fb2bd7e12a3..526ff88db39d 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx @@ -121,13 +121,11 @@ static typelib_TypeClass cpp2uno_call( for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos ) { const typelib_MethodParameter & rParam = pParams[nPos]; - typelib_TypeDescription * pParamTypeDescr = 0; - TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef ); int nUsedGPR = 0; int nUsedSSE = 0; bool bFitsRegisters = x86_64::examine_argument( rParam.pTypeRef, false, nUsedGPR, nUsedSSE ); - if ( !rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ) ) // value + if ( !rParam.bOut && bridges::cpp_uno::shared::isSimpleType( rParam.pTypeRef ) ) // value { // Simple types must fit exactly one register on x86_64 OSL_ASSERT( bFitsRegisters && ( ( nUsedSSE == 1 && nUsedGPR == 0 ) || ( nUsedSSE == 0 && nUsedGPR == 1 ) ) ); @@ -152,12 +150,12 @@ static typelib_TypeClass cpp2uno_call( else pCppArgs[nPos] = pUnoArgs[nPos] = ovrflw++; } - - // no longer needed - TYPELIB_DANGER_RELEASE( pParamTypeDescr ); } else // struct <= 16 bytes || ptr to complex value || ref { + typelib_TypeDescription * pParamTypeDescr = 0; + TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef ); + void *pCppStack; char pTmpStruct[16]; From ead5b1e338399f18cbabfbe7d38628f68443e680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 1 Dec 2009 11:43:22 +0000 Subject: [PATCH 48/56] cmcfixes68: #i107182# ppc fix argument passing in a rare case --- bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx index 1aca0f480b6a..deede37c942f 100644 --- a/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx @@ -164,11 +164,11 @@ static typelib_TypeClass cpp2uno_call( case typelib_TypeClass_HYPER: case typelib_TypeClass_UNSIGNED_HYPER: - if (ng < 7) { - if (ng & 1) { - ng++; - gpreg++; - } + if (ng & 1) { + ng++; + gpreg++; + } + if (ng < 8) { pCppArgs[nPos] = gpreg; pUnoArgs[nPos] = gpreg; ng += 2; From d0a8f938405309b81e0705a63c365fa9c1394788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 1 Dec 2009 11:47:26 +0000 Subject: [PATCH 49/56] cmcfixes68: #i107183# ppc-linux: add support for softfloat toolchains --- .../cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx | 71 +++++++++++++++++-- .../cpp_uno/gcc3_linux_powerpc/except.cxx | 6 +- .../cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx | 54 +++++++++++--- 3 files changed, 115 insertions(+), 16 deletions(-) diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx index deede37c942f..e901a110213f 100644 --- a/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx @@ -61,7 +61,9 @@ static typelib_TypeClass cpp2uno_call( sal_Int64 * pRegisterReturn /* space for register return */ ) { int ng = 0; //number of gpr registers used +#ifndef __NO_FPRS__ int nf = 0; //number of fpr regsiters used +#endif void ** pCppStack; //temporary stack pointer // gpreg: [ret *], this, [gpr params] @@ -123,11 +125,23 @@ static typelib_TypeClass cpp2uno_call( { case typelib_TypeClass_DOUBLE: +#ifndef __NO_FPRS__ if (nf < 8) { pCppArgs[nPos] = fpreg; pUnoArgs[nPos] = fpreg; nf++; fpreg += 2; +#else + if (ng & 1) { + ng++; + gpreg++; + } + if (ng < 8) { + pCppArgs[nPos] = gpreg; + pUnoArgs[nPos] = gpreg; + ng += 2; + gpreg += 2; +#endif } else { if (((long)ovrflw) & 4) ovrflw++; pCppArgs[nPos] = ovrflw; @@ -139,6 +153,7 @@ static typelib_TypeClass cpp2uno_call( case typelib_TypeClass_FLOAT: // fpreg are all double values so need to // modify fpreg to be a single word float value +#ifndef __NO_FPRS__ if (nf < 8) { float tmp = (float) (*((double *)fpreg)); (*((float *) fpreg)) = tmp; @@ -146,6 +161,13 @@ static typelib_TypeClass cpp2uno_call( pUnoArgs[nPos] = fpreg; nf++; fpreg += 2; +#else + if (ng < 8) { + pCppArgs[nPos] = gpreg; + pUnoArgs[nPos] = gpreg; + ng++; + gpreg++; +#endif } else { #if 0 /* abi is not being followed correctly */ if (((long)ovrflw) & 4) ovrflw++; @@ -488,10 +510,12 @@ static typelib_TypeClass cpp_mediate( static void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** gpregptr, void** fpregptr, void** ovrflw) { sal_Int32 gpreg[8]; - double fpreg[8]; - memcpy( gpreg, gpregptr, 32); + +#ifndef __NO_FPRS__ + double fpreg[8]; memcpy( fpreg, fpregptr, 64); +#endif volatile long nRegReturn[2]; @@ -499,10 +523,14 @@ static void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** gpreg // fprintf(stderr,"in cpp_vtable_call nVtableOffset is %x\n",nVtableOffset); // fflush(stderr); - sal_Bool bComplex = nFunctionIndex & 0x80000000 ? sal_True : sal_False; - typelib_TypeClass aType = - cpp_mediate( nFunctionIndex, nVtableOffset, (void**)gpreg, (void**)fpreg, ovrflw, (sal_Int64*)nRegReturn ); + cpp_mediate( nFunctionIndex, nVtableOffset, (void**)gpreg, +#ifndef __NO_FPRS__ + (void**)fpreg, +#else + NULL, +#endif + ovrflw, (sal_Int64*)nRegReturn ); switch( aType ) { @@ -524,13 +552,25 @@ static void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** gpreg break; case typelib_TypeClass_FLOAT: +#ifndef __NO_FPRS__ __asm__( "lfs 1,%0\n\t" : : "m" (*((float*)nRegReturn)) ); + #else + __asm__( "lwz 3,%0\n\t" : : + "m"(nRegReturn[0]) ); +#endif break; case typelib_TypeClass_DOUBLE: +#ifndef __NO_FPRS__ __asm__( "lfd 1,%0\n\t" : : "m" (*((double*)nRegReturn)) ); +#else + __asm__( "lwz 3,%0\n\t" : : + "m"(nRegReturn[0]) ); + __asm__( "lwz 4,%0\n\t" : : + "m"(nRegReturn[1]) ); +#endif break; case typelib_TypeClass_HYPER: @@ -577,6 +617,7 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal // # next save fpr 1 to fpr 8 (aligned to 8) + // if dedicated floating point registers are used // stfd f1,-2016(r1) // stfd f2,-2008(r1) // stfd f3,-2000(r1) @@ -604,6 +645,10 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal // #now load up the pointer to the saved fpr registers // addi r6,r1,-2016 + // if no dedicated floating point registers are used than we have NULL + // pointer there + // li r6, 0 + // // #now load up the pointer to the overflow call stack // addi r7,r1,8 @@ -617,6 +662,7 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal * p++ = 0x9101f814; * p++ = 0x9121f818; * p++ = 0x9141f81c; +#ifndef __NO_FPRS__ * p++ = 0xd821f820; * p++ = 0xd841f828; * p++ = 0xd861f830; @@ -625,6 +671,17 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal * p++ = 0xd8c1f848; * p++ = 0xd8e1f850; * p++ = 0xd901f858; +#else + /* these nops could be replaced with a smaller codeSnippetSize - 8 * 4 */ + * p++ = 0x60000000; + * p++ = 0x60000000; + * p++ = 0x60000000; + * p++ = 0x60000000; + * p++ = 0x60000000; + * p++ = 0x60000000; + * p++ = 0x60000000; + * p++ = 0x60000000; +#endif * p++ = 0x3c600000 | (((unsigned long)cpp_vtable_call) >> 16); * p++ = 0x60630000 | (((unsigned long)cpp_vtable_call) & 0x0000FFFF); * p++ = 0x7c6903a6; @@ -633,7 +690,11 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal * p++ = 0x3c800000 | (((unsigned long)vtableOffset) >> 16); * p++ = 0x60840000 | (((unsigned long)vtableOffset) & 0x0000FFFF); * p++ = 0x38a1f800; +#ifndef __NO_FPRS__ * p++ = 0x38c1f820; +#else + * p++ = 0x38c00000; +#endif * p++ = 0x38e10008; * p++ = 0x4e800420; return (code + codeSnippetSize); diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx index 28ad7dc83ed7..adb10dae24c7 100644 --- a/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx @@ -137,8 +137,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName; MutexGuard guard( m_mutex ); - t_rtti_map::const_iterator iFind( m_rttis.find( unoName ) ); - if (iFind == m_rttis.end()) + t_rtti_map::const_iterator iRttiFind( m_rttis.find( unoName ) ); + if (iRttiFind == m_rttis.end()) { // RTTI symbol OStringBuffer buf( 64 ); @@ -202,7 +202,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR } else { - rtti = iFind->second; + rtti = iRttiFind->second; } return rtti; diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx index 2a8626733f24..8c527df2d48c 100644 --- a/bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx @@ -74,12 +74,14 @@ static void callVirtualMethod( void (*ptr)(); int gpr[8]; // storage for gpregisters, map to r3-r10 int off; // offset used to find function +#ifndef __NO_FPRS__ double fpr[8]; // storage for fpregisters, map to f1-f8 - int n; // number of gprs mapped so far int f; // number of fprs mapped so far + double dret; // temporary function return values +#endif + int n; // number of gprs mapped so far long *p; // pointer to parameter overflow area int c; // character of parameter type being decoded - double dret; // temporary function return values int iret, iret2; // Because of the Power PC calling conventions we could be passing @@ -93,7 +95,7 @@ static void callVirtualMethod( // Note: could require up to 2*nStackLongs words of parameter stack area // if the call has many float parameters (i.e. floats take up only 1 - // word on the stack but take 2 words in parameter area in the + // word on the stack but double takes 2 words in parameter area in the // stack frame . // Update! floats on the outgoing parameter stack only take up 1 word @@ -119,7 +121,9 @@ static void callVirtualMethod( // now begin to load the C++ function arguments into storage n = 0; +#ifndef __NO_FPRS__ f = 0; +#endif // now we need to parse the entire signature string */ // until we get the END indicator */ @@ -143,8 +147,16 @@ static void callVirtualMethod( c = *pPT; switch (c) { case 'D': /* type is double */ +#ifndef __NO_FPRS__ if (f < 8) { fpr[f++] = *((double *)pStackLongs); /* store in register */ +#else + if (n & 1) + n++; + if (n < 8) { + gpr[n++] = *pStackLongs; + gpr[n++] = *(pStackLongs+1); +#endif } else { if (((long) p) & 4) p++; @@ -163,8 +175,13 @@ static void callVirtualMethod( store floats as a *single* word on outgoing parameter stack to match what gcc actually does */ +#ifndef __NO_FPRS__ if (f < 8) { fpr[f++] = *((float *)pStackLongs); +#else + if (n < 8) { + gpr[n++] = *pStackLongs; +#endif } else { #if 0 /* if abi were followed */ if (((long) p) & 4) @@ -243,6 +260,7 @@ static void callVirtualMethod( "lwz 8, 20(%0)\n\t" "lwz 9, 24(%0)\n\t" "lwz 10, 28(%0)\n\t" +#ifndef __NO_FPRS__ "lfd 1, 0(%1)\n\t" "lfd 2, 8(%1)\n\t" "lfd 3, 16(%1)\n\t" @@ -252,16 +270,24 @@ static void callVirtualMethod( "lfd 7, 48(%1)\n\t" "lfd 8, 56(%1)\n\t" : : "r" (gpr), "r" (fpr) +#else + : : "r" (gpr) +#endif : "0", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" ); (*ptr)(); __asm__ __volatile__ ( - "mr %1, 3\n\t" - "mr %2, 4\n\t" - "fmr %0, 1\n\t" - : "=f" (dret), "=r" (iret), "=r" (iret2) : ); + "mr %0, 3\n\t" + "mr %1, 4\n\t" +#ifndef __NO_FPRS__ + "fmr %2, 1\n\t" + : "=r" (iret), "=r" (iret2), "=f" (dret) +#else + : "=r" (iret), "=r" (iret2) +#endif + : ); switch( eReturnType ) { @@ -284,10 +310,21 @@ static void callVirtualMethod( *(unsigned char*)pRegisterReturn = (unsigned char)iret; break; case typelib_TypeClass_FLOAT: +#ifndef __NO_FPRS__ *(float*)pRegisterReturn = (float)dret; +#else + ((unsigned int*)pRegisterReturn)[0] = iret; +#endif break; case typelib_TypeClass_DOUBLE: +#ifndef __NO_FPRS__ *(double*)pRegisterReturn = dret; +#else + ((unsigned int*)pRegisterReturn)[0] = iret; + ((unsigned int*)pRegisterReturn)[1] = iret2; +#endif + break; + default: break; } } @@ -399,6 +436,8 @@ static void cpp_call( case typelib_TypeClass_UNSIGNED_HYPER: *pPT++ = 'H'; pCppStack += sizeof(sal_Int32); // extra long + default: + break; } // no longer needed @@ -518,7 +557,6 @@ void unoInterfaceProxyDispatch( // is my surrogate bridges::cpp_uno::shared::UnoInterfaceProxy * pThis = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy *> (pUnoI); - typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr; switch (pMemberDescr->eTypeClass) { From db37a31eb2512b1e42c293c45ca700a6f76d601f Mon Sep 17 00:00:00 2001 From: Mikhail Voitenko Date: Thu, 3 Dec 2009 10:22:54 +0000 Subject: [PATCH 50/56] #i105172# PL:extend session management --- .../star/frame/XSessionManagerListener2.idl | 56 +++++++++++++++++++ offapi/com/sun/star/frame/makefile.mk | 1 + 2 files changed, 57 insertions(+) create mode 100644 offapi/com/sun/star/frame/XSessionManagerListener2.idl diff --git a/offapi/com/sun/star/frame/XSessionManagerListener2.idl b/offapi/com/sun/star/frame/XSessionManagerListener2.idl new file mode 100644 index 000000000000..51e8643e459a --- /dev/null +++ b/offapi/com/sun/star/frame/XSessionManagerListener2.idl @@ -0,0 +1,56 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: XSessionManagerListener.idl,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_frame_XSessionManagerListener2_idl__ +#define __com_sun_star_frame_XSessionManagerListener2_idl__ + +#ifndef __com_sun_star_lang_XEventListener_idl__ +#include +#endif + +#ifndef __com_sun_star_frame_XSessionManagerListener_idl__ +#include +#endif +//============================================================================= + +module com { module sun { module star { module frame { + + interface XSessionManagerListener2 : XSessionManagerListener + { + /** doQuit gets called when the session manager has decided + the application should quit. Under these circumstances bringing up + further UI will usually be impossible and must be avoided. + */ + [oneway] void doQuit(); + }; + +}; }; }; }; + + +#endif diff --git a/offapi/com/sun/star/frame/makefile.mk b/offapi/com/sun/star/frame/makefile.mk index 789a0f6e499e..0d0650a701fb 100644 --- a/offapi/com/sun/star/frame/makefile.mk +++ b/offapi/com/sun/star/frame/makefile.mk @@ -142,6 +142,7 @@ IDLFILES=\ XRecordableDispatch.idl\ XSessionManagerClient.idl\ XSessionManagerListener.idl\ + XSessionManagerListener2.idl\ XStatusListener.idl\ XStatusbarController.idl\ XStorable.idl\ From 0a537a4a7dac6a1183266384359b263405aa9994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 7 Dec 2009 09:17:16 +0000 Subject: [PATCH 51/56] cmcfixes68: #i107465# fix nonpro build error --- bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx | 2 +- bridges/source/remote/urp/urp_reader.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx index 21ec451bcc94..fc5a9af1ac5c 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx @@ -124,7 +124,7 @@ static typelib_TypeClass cpp2uno_call( int nUsedGPR = 0; int nUsedSSE = 0; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 bool bFitsRegisters = #endif x86_64::examine_argument( rParam.pTypeRef, false, nUsedGPR, nUsedSSE ); diff --git a/bridges/source/remote/urp/urp_reader.cxx b/bridges/source/remote/urp/urp_reader.cxx index dd9ff0af80ec..f2ac4f3e9dc7 100644 --- a/bridges/source/remote/urp/urp_reader.cxx +++ b/bridges/source/remote/urp/urp_reader.cxx @@ -372,8 +372,8 @@ inline sal_Bool OReaderThread::readFlags( struct MessageFlags *pFlags ) } pFlags->bSynchronous = ( HDRFLAG_SYNCHRONOUS & moreFlags ); pFlags->bMustReply = ( HDRFLAG_MUSTREPLY & moreFlags ); - OSL_ENSURE( pFlags->bSynchronous && pFlags->bMustReply || - ! pFlags->bSynchronous && !pFlags->bMustReply, + OSL_ENSURE( (pFlags->bSynchronous && pFlags->bMustReply) || + (!pFlags->bSynchronous && !pFlags->bMustReply), "urp-bridge : customized calls currently not supported !"); } From 0ba84eeda83b5241619a7c2e63f257db08629bad Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 10 Dec 2009 11:28:04 +0100 Subject: [PATCH 52/56] sb116: #i106384# removed unncessary assignments (that caused warnings about using uninitialized variables) --- sal/inc/rtl/math.hxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/sal/inc/rtl/math.hxx b/sal/inc/rtl/math.hxx index dbd4a2172246..4891b7565647 100644 --- a/sal/inc/rtl/math.hxx +++ b/sal/inc/rtl/math.hxx @@ -362,7 +362,6 @@ inline void setInf(double * pd, bool bNegative) double sd; sal_math_Double md; }; - sd = *pd; md.w32_parts.msw = bNegative ? 0xFFF00000 : 0x7FF00000; md.w32_parts.lsw = 0; *pd = sd; @@ -377,7 +376,6 @@ inline void setNan(double * pd) double sd; sal_math_Double md; }; - sd = *pd; md.w32_parts.msw = 0x7FFFFFFF; md.w32_parts.lsw = 0xFFFFFFFF; *pd = sd; From 4a96552f4966f204a15287d3c1a9340012792661 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 10 Dec 2009 11:32:26 +0100 Subject: [PATCH 53/56] sb116: #i106074# moved variable declarations to beginning of C blocks, for non-C99 compilers --- sal/osl/unx/process.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c index 234232b1f0ef..e3f78ff2f2b4 100644 --- a/sal/osl/unx/process.c +++ b/sal/osl/unx/process.c @@ -467,6 +467,9 @@ static void ChildStatusProc(void *pData) if ( (status == 0) && ((pid = fork()) == 0) ) { /* Child */ + int chstatus = 0; + sal_Int32 nWrote; + if (channel[0] != -1) close(channel[0]); if ((data.m_uid != (uid_t)-1) && ((data.m_uid != getuid()) || (data.m_gid != getgid()))) @@ -482,7 +485,6 @@ static void ChildStatusProc(void *pData) #endif } - int chstatus = 0; if (data.m_pszDir) chstatus = chdir(data.m_pszDir); @@ -534,7 +536,7 @@ static void ChildStatusProc(void *pData) OSL_TRACE("ChildStatusProc : starting '%s' failed",data.m_pszArgs[0]); /* if we reach here, something went wrong */ - sal_Int32 nWrote = write(channel[1], &errno, sizeof(errno)); + nWrote = write(channel[1], &errno, sizeof(errno)); if (nWrote != sizeof(errno)) OSL_TRACE("sendFdPipe : sending failed (%s)",strerror(errno)); From 43ae0dd93a44a399d8629934fc1a78fbd7fa6773 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 11 Dec 2009 09:59:23 +0100 Subject: [PATCH 54/56] dba33b: use COMMAND_ECHO for the regcompare and the checknewapi call --- offapi/util/makefile.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/offapi/util/makefile.mk b/offapi/util/makefile.mk index d3157dac31df..34fde4014a5b 100644 --- a/offapi/util/makefile.mk +++ b/offapi/util/makefile.mk @@ -180,12 +180,12 @@ $(OUT)$/ucrdoc$/types_doc.db : $(OUT)$/ucrdoc$/offapi_doc.db $(SOLARBINDIR)$/udk #JSC: i have removed the doc rdb because all type information is already in the # types.rdb, even the service and singleton type info. IDL docu isn't checked. $(REGISTRYCHECKFLAG) : $(UCR)$/types.db $(OUT)$/ucrdoc$/types_doc.db - $(REGCOMPARE) -f -t -r1 $(REFERENCE_RDB) -r2 $(UCR)$/types.db \ + $(COMMAND_ECHO)$(REGCOMPARE) -f -t -r1 $(REFERENCE_RDB) -r2 $(UCR)$/types.db \ && echo > $(REGISTRYCHECKFLAG) #JSC: new target to prepare some UNO type statistics, the ouput will be later used # for versioning of UNO cli type libraries $(UNOTYPE_STATISTICS) : $(REGISTRYCHECKFLAG) - $(AUGMENT_LIBRARY_PATH) $(PERL) checknewapi.pl $(UCR)$/types.db $(REFERENCE_RDB) "$(RSCREVISION)" "$(REGVIEWTOOL)" > $@ + $(COMMAND_ECHO)$(AUGMENT_LIBRARY_PATH) $(PERL) checknewapi.pl $(UCR)$/types.db $(REFERENCE_RDB) "$(RSCREVISION)" "$(REGVIEWTOOL)" > $@ .INCLUDE : target.mk From d555ca1c9765878de262e2a07f787fea39ad6007 Mon Sep 17 00:00:00 2001 From: Mikhail Voitenko Date: Sat, 12 Dec 2009 01:22:18 +0000 Subject: [PATCH 55/56] #i104974# workaround linux smb-client problem, be ready for errors while using mmap --- sal/osl/unx/file_misc.cxx | 100 ++++++++++++++++++++++---------------- sal/osl/unx/makefile.mk | 8 +-- 2 files changed, 63 insertions(+), 45 deletions(-) diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx index 3f3cf02fb010..b9b2b6a23c7d 100644 --- a/sal/osl/unx/file_misc.cxx +++ b/sal/osl/unx/file_misc.cxx @@ -29,6 +29,7 @@ #include "osl/diagnose.h" #include "osl/thread.h" +#include #include "rtl/alloc.h" #include "system.h" @@ -48,6 +49,8 @@ #include #include +#include + /************************************************************************ * ToDo * @@ -1002,7 +1005,6 @@ static int oslDoCopyFile(const sal_Char* pszSourceFileName, const sal_Char* pszD int SourceFileFD=0; int DestFileFD=0; int nRet=0; - void* pSourceFile=0; SourceFileFD=open(pszSourceFileName,O_RDONLY); if ( SourceFileFD < 0 ) @@ -1011,6 +1013,18 @@ static int oslDoCopyFile(const sal_Char* pszSourceFileName, const sal_Char* pszD return nRet; } + // read and lseek are used to check the possibility to access the data + // not a nice solution, but it allows to avoid a crash in case it is an opened samba file + // generally, reading of one byte should not affect the performance + char nCh; + if ( 1 != read( SourceFileFD, &nCh, 1 ) + || -1 == lseek( SourceFileFD, 0, SEEK_SET ) ) + { + nRet = errno; + (void) close( SourceFileFD ); + return nRet; + } + DestFileFD=open(pszDestFileName, O_WRONLY | O_CREAT, mode); if ( DestFileFD < 0 ) @@ -1029,56 +1043,58 @@ static int oslDoCopyFile(const sal_Char* pszSourceFileName, const sal_Char* pszD return 0; } - /* FIXME doCopy: fall back code for systems not having mmap */ - /* mmap file -- open dest file -- write once -- fsync it */ - pSourceFile=mmap(0,nSourceSize,PROT_READ,MAP_PRIVATE,SourceFileFD,0); + size_t nWritten = 0; + size_t nRemains = nSourceSize; - if ( pSourceFile == MAP_FAILED ) + /* mmap file -- open dest file -- write -- fsync it at the end */ + void* pSourceFile = mmap( 0, nSourceSize, PROT_READ, MAP_SHARED, SourceFileFD, 0 ); + if ( pSourceFile != MAP_FAILED ) { - /* it's important to set nRet before the hack - otherwise errno may be changed by lstat */ - nRet = errno; - close(SourceFileFD); - close(DestFileFD); - - return nRet; + nWritten = write( DestFileFD, pSourceFile, nSourceSize ); + nRemains -= nWritten; + munmap( (char*)pSourceFile, nSourceSize ); } - nRet = write(DestFileFD,pSourceFile,nSourceSize); - - /* #112584# if 'write' could not write the requested number of bytes - we have to fail of course; because it's not exactly specified if 'write' - sets errno if less than requested byte could be written we set nRet - explicitly to ENOSPC */ - if ((nRet < 0) || (nRet != sal::static_int_cast< int >(nSourceSize))) + if ( nRemains ) { - if (nRet < 0) + /* mmap has problems, try the direct streaming */ + char pBuffer[32000]; + size_t nRead = 0; + + nRemains = nSourceSize; + + if ( -1 != lseek( SourceFileFD, 0, SEEK_SET ) + && -1 != lseek( DestFileFD, 0, SEEK_SET ) ) + { + do + { + nRead = 0; + nWritten = 0; + + size_t nToRead = std::min( (size_t)32000, nRemains ); + nRead = read( SourceFileFD, pBuffer, nToRead ); + if ( (size_t)-1 != nRead ) + nWritten = write( DestFileFD, pBuffer, nRead ); + + if ( (size_t)-1 != nWritten ) + nRemains -= nWritten; + } + while( nRemains && (size_t)-1 != nRead && nRead == nWritten ); + } + } + + if ( nRemains ) + { + if ( errno ) nRet = errno; else nRet = ENOSPC; - - close(SourceFileFD); - close(DestFileFD); - munmap((char*)pSourceFile,nSourceSize); - return nRet; } - nRet = munmap((char*)pSourceFile,nSourceSize); - if ( nRet < 0 ) - { - nRet=errno; - close(SourceFileFD); - close(DestFileFD); - return nRet; - } + close( SourceFileFD ); + if ( close( DestFileFD ) == -1 && nRet == 0 ) + nRet = errno; - close(SourceFileFD); - - // Removed call to 'fsync' again (#112584#) and instead - // evaluate the return value of 'close' in order to detect - // and report ENOSPC and other erronous conditions on close - if (close(DestFileFD) == -1) - return errno; - else - return 0; + return nRet; } + diff --git a/sal/osl/unx/makefile.mk b/sal/osl/unx/makefile.mk index 0e728c29dbcd..eac4c24cdfa9 100644 --- a/sal/osl/unx/makefile.mk +++ b/sal/osl/unx/makefile.mk @@ -55,7 +55,8 @@ CXXFLAGS+= $(LFS_CFLAGS) # --- Files -------------------------------------------------------- -SLOFILES= $(SLO)$/conditn.obj \ +SLOFILES= \ + $(SLO)$/conditn.obj \ $(SLO)$/diagnose.obj \ $(SLO)$/semaphor.obj \ $(SLO)$/socket.obj \ @@ -74,7 +75,7 @@ SLOFILES= $(SLO)$/conditn.obj \ $(SLO)$/util.obj \ $(SLO)$/tempfile.obj\ $(SLO)$/file.obj \ - $(SLO)$/file_misc.obj \ + $(SLO)$/file_misc.obj\ $(SLO)$/file_url.obj\ $(SLO)$/file_error_transl.obj\ $(SLO)$/file_path_helper.obj\ @@ -84,6 +85,7 @@ SLOFILES= $(SLO)$/conditn.obj \ $(SLO)$/process_impl.obj\ $(SLO)$/salinit.obj + #.IF "$(UPDATER)"=="YES" OBJFILES= $(OBJ)$/conditn.obj \ $(OBJ)$/diagnose.obj \ @@ -104,7 +106,7 @@ OBJFILES= $(OBJ)$/conditn.obj \ $(OBJ)$/util.obj \ $(OBJ)$/tempfile.obj\ $(OBJ)$/file.obj \ - $(OBJ)$/file_misc.obj \ + $(OBJ)$/file_misc.obj\ $(OBJ)$/file_url.obj\ $(OBJ)$/file_error_transl.obj\ $(OBJ)$/file_path_helper.obj\ From cf95e01ac375206a63db7bd08c4ed3bbc430c093 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Tue, 5 Jan 2010 10:09:04 +0000 Subject: [PATCH 56/56] #i108012# Check for file size must be done earlier --- sal/osl/unx/file_misc.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx index b9b2b6a23c7d..0bde1616f6ae 100644 --- a/sal/osl/unx/file_misc.cxx +++ b/sal/osl/unx/file_misc.cxx @@ -1013,6 +1013,15 @@ static int oslDoCopyFile(const sal_Char* pszSourceFileName, const sal_Char* pszD return nRet; } + /* HACK: because memory mapping fails on various + platforms if the size of the source file is 0 byte */ + if (0 == nSourceSize) + { + close(SourceFileFD); + close(DestFileFD); + return 0; + } + // read and lseek are used to check the possibility to access the data // not a nice solution, but it allows to avoid a crash in case it is an opened samba file // generally, reading of one byte should not affect the performance @@ -1034,15 +1043,6 @@ static int oslDoCopyFile(const sal_Char* pszSourceFileName, const sal_Char* pszD return nRet; } - /* HACK: because memory mapping fails on various - platforms if the size of the source file is 0 byte */ - if (0 == nSourceSize) - { - close(SourceFileFD); - close(DestFileFD); - return 0; - } - size_t nWritten = 0; size_t nRemains = nSourceSize;