[ooo-build-commit] Branch 'ooo/master' - 7 commits - bridges/source offapi/com sal/inc sal/osl

Jan Holesovsky kendy at kemper.freedesktop.org
Fri Jul 31 19:48:21 PDT 2009


 bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk     |    6 
 offapi/com/sun/star/sheet/FilterFormulaParser.idl      |   55 +++++
 offapi/com/sun/star/sheet/FilterOperator2.idl          |  164 +++++++++++++++++
 offapi/com/sun/star/sheet/FormulaParser.idl            |    7 
 offapi/com/sun/star/sheet/TableFilterField2.idl        |  106 ++++++++++
 offapi/com/sun/star/sheet/XFilterFormulaParser.idl     |   62 ++++++
 offapi/com/sun/star/sheet/XFormulaParser.idl           |   16 -
 offapi/com/sun/star/sheet/XSheetFilterDescriptor2.idl  |   79 ++++++++
 offapi/com/sun/star/sheet/makefile.mk                  |    5 
 offapi/com/sun/star/task/DocumentMSPasswordRequest.idl |   67 ++++++
 offapi/com/sun/star/task/makefile.mk                   |    2 
 offapi/com/sun/star/ui/dialogs/FilePicker.idl          |    5 
 sal/inc/systools/win32/snprintf.h                      |    4 
 sal/osl/os2/util.c                                     |    5 
 sal/osl/unx/file.cxx                                   |   69 ++++++-
 sal/osl/unx/file_impl.hxx                              |   48 ++++
 sal/osl/unx/file_path_helper.cxx                       |   10 -
 sal/osl/unx/file_path_helper.h                         |   17 -
 sal/osl/unx/file_path_helper.hxx                       |   19 -
 sal/osl/unx/file_stat.cxx                              |   70 ++++++-
 sal/osl/unx/file_url.cxx                               |   56 -----
 sal/osl/unx/process.c                                  |   12 +
 sal/osl/unx/security.c                                 |    9 
 sal/osl/unx/util.c                                     |   77 -------
 sal/osl/w32/conditn.c                                  |    3 
 sal/osl/w32/diagnose.c                                 |    4 
 sal/osl/w32/util.c                                     |    9 
 27 files changed, 763 insertions(+), 223 deletions(-)

New commits:
commit 0178552a2091cb67e0edf31e52369a17e78a38bc
Author: Jens-Heiner Rechtien <hr at openoffice.org>
Date:   Thu Jul 30 10:52:48 2009 +0000

    CWS-TOOLING: integrate CWS fwk114
    2009-07-08 Mikhail Voytenko #i102448# fix typo
    2009-07-08 Mikhail Voytenko #i102448# detect the document of new format correctly
    2009-07-03 Mikhail Voytenko #i101418# adjust header
    2009-07-02 Mikhail Voytenko #i103001# Integrate the patch
    2009-07-01 Mikhail Voytenko rebase to DEV300_m51
    2009-06-25 Mikhail Voytenko #i71512# integrate the patch
    2009-06-19 Mikhail Voytenko #i102931# check whether the file was changed even in case of system file locking
    2009-06-10 Mikhail Voytenko #i102448# allow to turn the office update dialog off
    2009-06-10 Mikhail Voytenko #i102448# allow to turn the office update dialog off
    2009-06-09 Mikhail Voytenko #i96091# the disposed frame should throw DisposedException
    2009-06-09 Mikhail Voytenko #i100835# commit the patch
    2009-05-26 Mikhail Voytenko #i89514# integrate the patch
    2009-05-26 Mikhail Voytenko #i30373# integrate the patch
    2009-05-26 Mikhail Voytenko #i101418# fix the error handling

diff --git a/sal/osl/os2/util.c b/sal/osl/os2/util.c
index 6b9b149..e0fe46e 100644
--- a/sal/osl/os2/util.c
+++ b/sal/osl/os2/util.c
@@ -32,11 +32,6 @@
 
 
 
-extern sal_Bool osl_getEtherAddr(sal_Char* pszAddr, sal_uInt16 BufferSize)
-{
-    return sal_False;
-}
-
 extern sal_Bool osl_getEthernetAddress( sal_uInt8 * pTargetAddress )
 {
     return sal_False;
diff --git a/sal/osl/unx/file_path_helper.cxx b/sal/osl/unx/file_path_helper.cxx
index 3a71121..7a53981 100644
--- a/sal/osl/unx/file_path_helper.cxx
+++ b/sal/osl/unx/file_path_helper.cxx
@@ -125,16 +125,6 @@
  }
  
  /******************************************
-  *  osl_systemPathIsAbsolutePath   		 
-  *****************************************/
-  
- sal_Bool SAL_CALL osl_systemPathIsAbsolutePath(const rtl_uString* pustrPath)
- {
-     OSL_PRECOND(pustrPath, "osl_systemPathIsAbsolutePath: Invalid parameter");		
-     return (!osl_systemPathIsRelativePath(pustrPath));
- }
- 
- /******************************************
     osl_systemPathMakeAbsolutePath
   *****************************************/
   
diff --git a/sal/osl/unx/file_path_helper.h b/sal/osl/unx/file_path_helper.h
index 51047b5..f750c7e 100644
--- a/sal/osl/unx/file_path_helper.h
+++ b/sal/osl/unx/file_path_helper.h
@@ -105,23 +105,6 @@
      const rtl_uString* pustrPath);
  
  /******************************************
-    osl_systemPathIsAbsolutePath
-    Returns true if the given path is an 
-    absolute path and so starts with a '/'
-    
-    @param pustrPath [in] a system path
-           pustrPath must not be NULL
-           
-    @returns sal_True if the given path 
-             start's with a separator else
-             sal_False will be returned
-             
-  *****************************************/
-  
- sal_Bool SAL_CALL osl_systemPathIsAbsolutePath(
-     const rtl_uString* pustrPath);
- 
- /******************************************
     osl_systemPathMakeAbsolutePath
     Append a relative path to a base path 
     
diff --git a/sal/osl/unx/file_path_helper.hxx b/sal/osl/unx/file_path_helper.hxx
index 60d0474..9b72443 100644
--- a/sal/osl/unx/file_path_helper.hxx
+++ b/sal/osl/unx/file_path_helper.hxx
@@ -106,25 +106,6 @@ namespace osl
  }
  
  /******************************************
-    systemPathIsAbsolutePath
-    Returns true if the given path is an 
-    absolute path and so starts with a '/'
-    
-    @param pustrPath [in] a system path
-           pustrPath must not be NULL
-           
-    @returns sal_True if the given path 
-             start's with a separator else
-             sal_False will be returned
-             
-  *****************************************/
-  
- inline bool systemPathIsAbsolutePath(const rtl::OUString& Path)
- {
-     return osl_systemPathIsAbsolutePath(Path.pData);
- }
- 
- /******************************************
     systemPathMakeAbsolutePath
     Append a relative path to a base path 
     
diff --git a/sal/osl/unx/file_url.cxx b/sal/osl/unx/file_url.cxx
index e9d86db..4a4d97a 100644
--- a/sal/osl/unx/file_url.cxx
+++ b/sal/osl/unx/file_url.cxx
@@ -462,39 +462,6 @@ namespace /* private */
     /*********************************************
 
      ********************************************/
-    sal_Unicode* ustrcpy(const sal_Unicode* s, sal_Unicode* d)
-    {
-        const sal_Unicode* sc = s;
-        sal_Unicode*       dc = d;
-        
-        while ((*dc++ = *sc++))
-            /**/;
-            
-        return d;
-    }
-    
-    /*********************************************
-
-     ********************************************/
-     
-    sal_Unicode* ustrncpy(const sal_Unicode* s, sal_Unicode* d, unsigned int n)
-    {
-        const sal_Unicode* sc = s;
-        sal_Unicode*       dc = d;
-        unsigned int       i  = n;		
-        
-        while (i--)	
-            *dc++ = *sc++;
-        
-        if (n)
-            *dc = 0;
-            
-        return d;
-    }
-    
-    /*********************************************
-
-     ********************************************/
      
     sal_Unicode* ustrchrcat(const sal_Unicode chr, sal_Unicode* d)
     {
@@ -504,17 +471,6 @@ namespace /* private */
         return d;	
     }
 
-    /*********************************************
-
-     ********************************************/
-     
-    sal_Unicode* ustrcat(const sal_Unicode* s, sal_Unicode* d)
-    {
-        sal_Unicode* dc = ustrtoend(d);					
-        ustrcpy(s, dc);		
-        return d;
-    }	
-
     /******************************************************
      *
      ******************************************************/
@@ -528,18 +484,6 @@ namespace /* private */
     }
 
     /******************************************************
-     * Ensure that the given string has the specified last 
-     * character if necessary append it
-     ******************************************************/
- 
-    sal_Unicode* _strensurelast(sal_Unicode* pStr, sal_Unicode Chr)
-    {
-        if (!_islastchr(pStr, Chr))
-            ustrchrcat(Chr, pStr);
-        return pStr;
-    }	
-
-    /******************************************************
      * Remove the last part of a path, a path that has 
      * only a '/' or no '/' at all will be returned
      * unmodified 
diff --git a/sal/osl/unx/util.c b/sal/osl/unx/util.c
index 59bd7fd..335773c 100644
--- a/sal/osl/unx/util.c
+++ b/sal/osl/unx/util.c
@@ -51,11 +51,10 @@
 
 static int   osl_getHWAddr(const char *ifname, char* hard_addr);
 static int   osl_checkAddr(const char* addr);
-static char* osl_decodeEtherAddr(const char *ptr, char* buff);
 
 
 /*****************************************************************************/
-/* osl_getEtherAddr */
+/* osl_getEthernetAddress */
 /*****************************************************************************/
 
 sal_Bool SAL_CALL osl_getEthernetAddress( sal_uInt8 * pAddr )
@@ -124,68 +123,6 @@ sal_Bool SAL_CALL osl_getEthernetAddress( sal_uInt8 * pAddr )
 }
 
 
-extern sal_Bool osl_getEtherAddr(sal_Char* pszAddr, sal_uInt16 BufferSize)
-{
-    char buff[1024];
-    char hard_addr[64];
-    struct ifconf ifc;
-    struct ifreq *ifr;
-    int i;
-    int so;
-
-    (void) BufferSize; /* unused */
-
-    if ( pszAddr == 0 )
-    {
-        return sal_False;
-    }
-
-    
-    /*
-     * All we need is ... a network file descriptor.
-     * Normally, this is a very socket.
-     */
-    
-    so = socket(AF_INET, SOCK_DGRAM, 0);	
-
-    
-    /*
-     * The first thing we have to do, get the interface configuration.
-     * It is a list of attached/configured interfaces
-     */
-    
-    ifc.ifc_len = sizeof(buff);
-    ifc.ifc_buf = buff;
-    if ( ioctl(so, SIOCGIFCONF, &ifc) < 0 )
-    {
-/*		fprintf(stderr, "SIOCGIFCONF: %s\n", strerror(errno));*/
-        close(so);
-        return sal_False;
-    }
-
-    close(so);
-    
-    /*
-     *  For each of the interfaces in the interface list,
-     *  try to get the hardware address
-     */
-
-    ifr = ifc.ifc_req;
-    for ( i = ifc.ifc_len / sizeof(struct ifreq) ; --i >= 0 ; ifr++ )
-    {
-        int nRet=0;
-        nRet = osl_getHWAddr(ifr->ifr_name,hard_addr);
-        if ( nRet  > 0 )
-        {
-            osl_decodeEtherAddr(hard_addr,pszAddr);
-            return sal_True;
-        }		
-    }
-
-    return sal_False;
-}
-
-
 /*****************************************************************************/
 /* osl_getHWAddr */
 /*****************************************************************************/
@@ -285,18 +222,6 @@ static int osl_checkAddr(const char* addr)
 }
 
 
-/*****************************************************************************/
-/* osl_decodeEtherAddr */
-/*****************************************************************************/
-
-static char* osl_decodeEtherAddr(const char *ptr, char* buff)
-{
-    sprintf(buff, "%02X:%02X:%02X:%02X:%02X:%02X",
-            (ptr[0] & 0377), (ptr[1] & 0377), (ptr[2] & 0377),
-            (ptr[3] & 0377), (ptr[4] & 0377), (ptr[5] & 0377));
-    return(buff);
-}
-
 #if defined (SPARC)
 
 #if defined (SOLARIS) && !defined(__sparcv8plus) && !defined(__sparcv9)
diff --git a/sal/osl/w32/util.c b/sal/osl/w32/util.c
index a2e1fe1..6ab7e6e 100644
--- a/sal/osl/w32/util.c
+++ b/sal/osl/w32/util.c
@@ -32,15 +32,6 @@
 
 
 
-extern sal_Bool osl_getEtherAddr(sal_Char* pszAddr, sal_uInt16 BufferSize)
-{
-    /* avoid warnings */
-    pszAddr = pszAddr;
-    BufferSize = BufferSize;
-    
-    return sal_False;
-}
-
 extern sal_Bool SAL_CALL osl_getEthernetAddress( sal_uInt8 *pAddr )
 {
     pAddr = pAddr; /* avoid warnings */
commit 51e680e7fc05f24dc6f0e736c160f054251d802b
Author: Jens-Heiner Rechtien <hr at openoffice.org>
Date:   Thu Jul 30 10:30:12 2009 +0000

    CWS-TOOLING: integrate CWS filepicker02
    2009-07-24 16:20:33 +0200 cd  r274312 : #i95152# Use trimTrailingBlanks() correctly
    2009-07-21 14:41:50 +0200 cd  r274197 : #i103566# Makes fixes for MinGW port
    2009-07-20 10:45:57 +0200 cd  r274112 : #i95152# Return empty string when there are only blanks
    2009-07-17 14:53:51 +0200 cd  r274093 : #i95152# Old Windows file picker implementation now trims trailing blanks like the new Vista file picker
    2009-07-17 09:45:38 +0200 cd  r274080 : #i99759# Apply stability fixes from CWS filepicker01 to help QA
    2009-07-17 09:00:26 +0200 cd  r274078 : #i95336# Extend SfxApplication to reset last used directory
    2009-07-17 08:59:10 +0200 cd  r274077 : #i99759# Apply fix from filepicker01 to filepicker02 to help QA
    2009-07-17 08:58:45 +0200 cd  r274076 : #i99759# Apply fix from filepicker01 to filepicker02 to help QA
    2009-07-16 16:08:17 +0200 cd  r274059 : #103566# Use AddPlace as a fallback for directories which are not change the current folder
    2009-07-16 11:54:26 +0200 cd  r274038 : #i103566# Use provided folder and filename to decide to set the folder in the file dialog
    2009-07-15 17:19:47 +0200 cd  r274016 : #i95336# Set flag to true to force the file picker to use the default working path.
    2009-07-14 14:49:48 +0200 cd  r273977 : #i103346# Set work path flag to indicate file picker to use work path once
    2009-07-14 14:47:49 +0200 cd  r273976 : #i95336# New configuration entry for work path changes via Tools-Options
    2009-07-14 14:46:19 +0200 cd  r273975 : #i95336# Force file picker to use a changed work path once
    2009-07-14 10:19:54 +0200 cd  r273961 : #i103346# Add new advice for file picker usage. Especially for Windows Vista and higher.
    2009-07-09 10:32:08 +0200 cd  r273852 : #i97053# Use SetFolder()/AddPlace() for Open dialog, too.
    2009-07-06 14:59:06 +0200 cd  r273746 : #i103346# Destroy dialog instance within close handler to prevent problems with custom controls under Windows
    2009-07-03 15:25:48 +0200 cd  r273707 : #i94054# Add resource access to read localized labels for custom controls. Use SetControlLabel to set the localized label

diff --git a/offapi/com/sun/star/ui/dialogs/FilePicker.idl b/offapi/com/sun/star/ui/dialogs/FilePicker.idl
index 463d3a6..d8aae97 100644
--- a/offapi/com/sun/star/ui/dialogs/FilePicker.idl
+++ b/offapi/com/sun/star/ui/dialogs/FilePicker.idl
@@ -60,6 +60,11 @@ module com { module sun { module star { module ui { module dialogs {
 //=============================================================================
 /** A FilePicker. 
 
+    It is <strong>NOT</strong> recommended to cache a reference to a file 
+    picker instance. Due to restrictions by the underlying system there can 
+    be specific limitations possible. To overcome these problems it'
+    s recommended to create a new instance on demand.
+
     @see XFilePicker
 */
 
commit 741f734d572a01523457d3a9997f21c28bfd14cb
Author: Jens-Heiner Rechtien <hr at openoffice.org>
Date:   Thu Jul 30 10:24:24 2009 +0000

    CWS-TOOLING: integrate CWS wordencryption
    2009-07-10 09:42:25 +0200 mav  r273872 : resolve merge problem
    2009-07-08 07:46:13 +0200 mav  r273815 : CWS-TOOLING: rebase CWS wordencryption to trunk at 273468 (milestone: DEV300:m51)
    2009-07-03 10:38:03 +0200 mav  r273682 : #i10000# resolve conflict
    2009-07-02 08:47:35 +0200 steve_yin  r273618 : Removed IBM(C) from modified files.
    2009-06-22 04:34:44 +0200 steve_yin  r273191 : Based on Mikhail suggestions, I changed some code.
    2009-06-18 09:37:14 +0200 mav  r273100 : #i10000# get rid of windows warnings
    2009-06-17 08:18:33 +0200 mav  r273047 : #i10000# adopt for linux build

diff --git a/offapi/com/sun/star/task/DocumentMSPasswordRequest.idl b/offapi/com/sun/star/task/DocumentMSPasswordRequest.idl
new file mode 100644
index 0000000..f2ac5a5
--- /dev/null
+++ b/offapi/com/sun/star/task/DocumentMSPasswordRequest.idl
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright IBM Corporation 2009.
+ * Copyright 2009 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: DocumentMSPasswordRequest.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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef __com_sun_star_task_DocumentMSPasswordRequest_idl__
+#define __com_sun_star_task_DocumentMSPasswordRequest_idl__
+
+#ifndef __com_sun_star_task_PasswordRequest_idl__
+#include <com/sun/star/task/PasswordRequest.idl>
+#endif
+
+
+//=============================================================================
+
+module com { module sun { module star { module task { 
+
+//=============================================================================
+/** this request specifies the mode in which the password for Microsoft Office file format encryption should be asked
+
+    <P>
+    It is supported by <type>InteractionHandler</type> service, and can
+    be used to interact for a document password. Continuations for using with
+    the mentioned service are Abort and Approve.
+    </P>
+
+    @since OOo 3.x.x
+*/
+published exception DocumentMSPasswordRequest: PasswordRequest
+{
+    //-------------------------------------------------------------------------
+    /** the name of the document
+    */
+    string Name;
+
+};
+
+//=============================================================================
+
+}; }; }; }; 
+
+#endif
diff --git a/offapi/com/sun/star/task/makefile.mk b/offapi/com/sun/star/task/makefile.mk
index 366d531..1559901 100644
--- a/offapi/com/sun/star/task/makefile.mk
+++ b/offapi/com/sun/star/task/makefile.mk
@@ -3,6 +3,7 @@
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 # 
 # Copyright 2008 by Sun Microsystems, Inc.
+# Copyright IBM Corporation 2009.
 #
 # OpenOffice.org - a multi-platform office productivity suite
 #
@@ -45,6 +46,7 @@ IDLFILES=\
     ClassifiedInteractionRequest.idl\
     DocumentMacroConfirmationRequest.idl\
     DocumentPasswordRequest.idl\
+    DocumentMSPasswordRequest.idl\
     ErrorCodeRequest.idl\
     ErrorCodeIOException.idl\
     FutureDocumentVersionProductUpdateRequest.idl\
commit bda55efd6b49cad8f7c962491604e3f950b0901f
Author: Jens-Heiner Rechtien <hr at openoffice.org>
Date:   Wed Jul 29 15:33:56 2009 +0000

    CWS-TOOLING: integrate CWS cmcfixes61
    2009-07-22 10:53:14 +0200 cmc  r274224 : #i103714# duplicate patch
    2009-07-22 10:45:26 +0200 cmc  r274223 : #i103715# fix up m68k makefile.mk
    2009-07-22 10:32:16 +0200 cmc  r274222 : #i103714# || && new gcc warnings
    2009-07-21 13:29:17 +0200 cmc  r274190 : #i103651# fix for subpixel gray line in cairo canvas animations
    2009-07-20 17:35:58 +0200 cmc  r274151 : #i103668# WaE over use of const
    2009-07-20 15:53:51 +0200 cmc  r274146 : #i103664# use boost::addressof instead
    2009-07-20 15:38:40 +0200 cmc  r274145 : #i103451# long -> INT32 for these streamable values
    2009-07-20 15:33:15 +0200 cmc  r274144 : #i103663 clear low-hanging aliasing warnings
    2009-07-20 15:28:23 +0200 cmc  r274143 : #i103662 clear low-hanging aliasing warnings
    2009-07-20 15:21:46 +0200 cmc  r274142 : #i103661 clear low-hanging aliasing warnings
    2009-07-20 15:16:05 +0200 cmc  r274141 : #i103660 clear low-hanging aliasing warnings

diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk
index 32d4b0d..8371d65 100644
--- a/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk
+++ b/bridges/source/cpp_uno/gcc3_linux_m68k/makefile.mk
@@ -61,8 +61,7 @@ CFLAGSNOOPT=-O0
 SLOFILES= \
     $(SLO)$/cpp2uno.obj \
     $(SLO)$/except.obj \
-    $(SLO)$/uno2cpp.obj \
-    $(SLO)$/m68khelper.obj
+    $(SLO)$/uno2cpp.obj
 
 SHL1TARGET= $(TARGET)
 
@@ -83,6 +82,3 @@ SHL1STDLIBS= \
 # --- Targets ------------------------------------------------------
 
 .INCLUDE :  target.mk
-
-$(SLO)$/%.obj: %.s
-       $(CXX) -c -o $(SLO)$/$(@:b).o $< -fPIC ; touch $@
commit 549f5439bceee3273dc5e47ec1bc0acd351c5948
Author: Jens-Heiner Rechtien <hr at openoffice.org>
Date:   Wed Jul 29 14:46:52 2009 +0000

    CWS-TOOLING: integrate CWS dr71
    2009-07-07 16:26:00 +0200 dr  r273805 : #i10000# unused variables
    2009-07-07 10:27:14 +0200 dr  r273780 : CWS-TOOLING: rebase CWS dr71 to trunk at 273468 (milestone: DEV300:m51)
    2009-07-01 11:28:24 +0200 dr  r273559 : #101471# special handling for XL library functions in ODF formulas (EUROCONVERT)
    2009-06-29 17:48:46 +0200 dr  r273478 : #i101471# typo
    2009-06-29 17:35:16 +0200 dr  r273477 : #i101471# import msoxl: formulas from conditional formatting and data validation
    2009-06-18 13:45:17 +0200 dr  r273115 : #101471# changed interface css.sheet.XFormulaParser
    2009-06-18 13:44:43 +0200 dr  r273114 : #101471# changed interface css.sheet.XFormulaParser
    2009-06-17 17:29:23 +0200 dr  r273089 : #i101471# extend the XFormulaParser interface with a ReferencePosition parameter, make rel-refs from msoxl: namespace working
    2009-06-17 17:28:39 +0200 dr  r273088 : #i101471# extend the XFormulaParser interface with a ReferencePosition parameter
    2009-06-17 17:28:19 +0200 dr  r273087 : #i101471# extend the XFormulaParser interface with a ReferencePosition parameter
    2009-06-17 17:27:19 +0200 dr  r273086 : #i101471# extend the XFormulaParser interface with a ReferencePosition parameter, remove that property from FormulaParser service
    2009-06-17 12:52:20 +0200 dr  r273059 : #i101471# import cell formulas from msoxl: namespace
    2009-06-16 11:40:50 +0200 dr  r273013 : #i101471# import formula namespace from xml elements
    2009-06-12 18:34:13 +0200 dr  r272935 : #i101471# external formula parser for oox in odf
    2009-06-12 18:33:13 +0200 dr  r272934 : #i101471# external formula parsers
    2009-06-12 18:29:46 +0200 dr  r272933 : #i101471# external formula parsers
    2009-06-05 15:53:47 +0200 dr  r272705 : #i101471# provide OOX formula parser as UNO service

diff --git a/offapi/com/sun/star/sheet/FilterFormulaParser.idl b/offapi/com/sun/star/sheet/FilterFormulaParser.idl
new file mode 100644
index 0000000..ed1a1d0
--- /dev/null
+++ b/offapi/com/sun/star/sheet/FilterFormulaParser.idl
@@ -0,0 +1,55 @@
+/*************************************************************************
+ *
+ * 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: FilterFormulaParser.idl,v $
+ * $Revision: 1.1 $
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_sheet_FilterFormulaParser_idl__
+#define __com_sun_star_sheet_FilterFormulaParser_idl__
+
+#include <com/sun/star/sheet/XFilterFormulaParser.idl>
+#include <com/sun/star/lang/XComponent.idl>
+
+//=============================================================================
+
+module com {  module sun {  module star {  module sheet {
+
+//=============================================================================
+
+/** A service used to implement parsing and printing formula strings in a
+    specific formula language.
+ */
+service FilterFormulaParser : XFilterFormulaParser
+{
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif
+
diff --git a/offapi/com/sun/star/sheet/FormulaParser.idl b/offapi/com/sun/star/sheet/FormulaParser.idl
index ba38acf..2f8be7e 100644
--- a/offapi/com/sun/star/sheet/FormulaParser.idl
+++ b/offapi/com/sun/star/sheet/FormulaParser.idl
@@ -37,9 +37,6 @@
 #ifndef __com_sun_star_sheet_XFormulaParser_idl__
 #include <com/sun/star/sheet/XFormulaParser.idl>
 #endif
-#ifndef __com_sun_star_table_CellAddress_idl__
-#include <com/sun/star/table/CellAddress.idl>
-#endif
 #ifndef __com_sun_star_sheet_FormulaOpCodeMapEntry_idl__
 #include <com/sun/star/sheet/FormulaOpCodeMapEntry.idl>
 #endif
@@ -65,10 +62,6 @@ service FormulaParser
 
     // ------------------------------------------------------------------------
 
-    [property] com::sun::star::table::CellAddress ReferencePosition;
-
-    // ------------------------------------------------------------------------
-
     /** specifies whether to use English parser and formatter.
 
         <p>Note: When changing this, an already existing <member>OpCodeMap
diff --git a/offapi/com/sun/star/sheet/XFilterFormulaParser.idl b/offapi/com/sun/star/sheet/XFilterFormulaParser.idl
new file mode 100644
index 0000000..300a098
--- /dev/null
+++ b/offapi/com/sun/star/sheet/XFilterFormulaParser.idl
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * 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: XFilterFormulaParser.idl,v $
+ * $Revision: 1.1 $
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_sheet_XFilterFormulaParser_idl__
+#define __com_sun_star_sheet_XFilterFormulaParser_idl__
+
+#include <com/sun/star/sheet/XFormulaParser.idl>
+
+//=============================================================================
+
+module com {  module sun {  module star {  module sheet {
+
+//=============================================================================
+
+/** Extends the interface <type>XFormulaParser</type> by an attribute that
+    specifies the namespace URL of the supported formula language.
+ */
+interface XFilterFormulaParser : XFormulaParser
+{
+    //-------------------------------------------------------------------------
+
+    /** Specifies the namespace URL of the formula language supported by this
+        implementation.
+     */
+    [attribute, readonly] string SupportedNamespace;
+
+    //-------------------------------------------------------------------------
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif
+
diff --git a/offapi/com/sun/star/sheet/XFormulaParser.idl b/offapi/com/sun/star/sheet/XFormulaParser.idl
index 01ddffd..de78f00 100644
--- a/offapi/com/sun/star/sheet/XFormulaParser.idl
+++ b/offapi/com/sun/star/sheet/XFormulaParser.idl
@@ -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
@@ -31,13 +31,9 @@
 #ifndef __com_sun_star_sheet_XFormulaParser_idl__
 #define __com_sun_star_sheet_XFormulaParser_idl__
 
-#ifndef __com_sun_star_uno_XInterface_idl__
 #include <com/sun/star/uno/XInterface.idl>
-#endif
-
-#ifndef __com_sun_star_sheet_FormulaToken_idl__
 #include <com/sun/star/sheet/FormulaToken.idl>
-#endif
+#include <com/sun/star/table/CellAddress.idl>
 
 //=============================================================================
 
@@ -53,13 +49,17 @@ interface XFormulaParser
 
     /** parses a formula into a sequence of tokens.
      */
-    sequence< FormulaToken > parseFormula( [in] string aFormula );
+    sequence< FormulaToken > parseFormula(
+        [in] string aFormula,
+        [in] ::com::sun::star::table::CellAddress aReferencePos );
 
     //-------------------------------------------------------------------------
 
     /** converts a formula into a string.
      */
-    string printFormula( [in] sequence< FormulaToken > aTokens );
+    string printFormula(
+        [in] sequence< FormulaToken > aTokens,
+        [in] ::com::sun::star::table::CellAddress aReferencePos );
 
 };
 
diff --git a/offapi/com/sun/star/sheet/makefile.mk b/offapi/com/sun/star/sheet/makefile.mk
index 2ab8318..468e96b 100644
--- a/offapi/com/sun/star/sheet/makefile.mk
+++ b/offapi/com/sun/star/sheet/makefile.mk
@@ -137,6 +137,7 @@ IDLFILES=\
     FillDirection.idl\
     FillMode.idl\
     FilterConnection.idl\
+    FilterFormulaParser.idl\
     FilterOperator.idl\
     FilterOperator2.idl\
     FormulaLanguage.idl\
@@ -276,6 +277,7 @@ IDLFILES=\
     XExternalSheetCache.idl\
     XExternalSheetName.idl\
     XFillAcrossSheet.idl\
+    XFilterFormulaParser.idl\
     XFormulaOpCodeMapper.idl\
     XFormulaParser.idl\
     XFormulaQuery.idl\
commit d6931f6ba557be5e9d9a7257161f1fda00a37f7f
Author: Jens-Heiner Rechtien <hr at openoffice.org>
Date:   Tue Jul 28 10:04:47 2009 +0000

    CWS-TOOLING: integrate CWS calc51
    2009-07-17 15:47:46 +0200 er  r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access.
    2009-07-16 14:20:11 +0200 er  r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions
    2009-07-07 10:11:40 +0200 nn  r273776 : #i35579# don't use long instead of sal_Int32
    2009-07-03 16:41:39 +0200 nn  r273711 : msvc warnings
    2009-07-03 14:18:45 +0200 nn  r273698 : msvc warning
    2009-07-03 11:30:41 +0200 nn  r273685 : #i35579# move new tokens to the end
    2009-07-03 10:12:55 +0200 nn  r273681 : CWS-TOOLING: rebase CWS calc51 to trunk at 273468 (milestone: DEV300:m51)
    2009-06-30 17:57:30 +0200 nn  r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo
    2009-06-29 14:31:18 +0200 er  r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311
    2009-06-29 10:30:20 +0200 nn  r273457 : #i103161# DeleteCells: always leave list action
    2009-06-24 16:16:34 +0200 nn  r273353 : gcc warnings
    2009-06-17 11:50:28 +0200 tbe  r273055 : #i35579# Standard filter requires more options
    2009-06-17 11:44:22 +0200 tbe  r273054 : #i35579# Standard filter requires more options
    2009-06-17 11:22:23 +0200 tbe  r273052 : #i35579# Standard filter requires more options
    2009-06-15 18:29:32 +0200 nn  r273006 : #160063# UseFormulaData: check parenthesis position
    2009-06-12 15:41:16 +0200 nn  r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon)
    2009-06-11 15:07:05 +0200 nn  r272874 : #i86943# GetNextPos: skip overlapped cells
    2009-06-11 11:17:37 +0200 nn  r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action
    2009-06-10 20:45:07 +0200 nn  r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc)
    2009-06-10 20:22:02 +0200 nn  r272838 : #i69524# PasteFile: specify target for SID_OPENDOC
    2009-06-09 17:33:08 +0200 nn  r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)

diff --git a/offapi/com/sun/star/sheet/FilterOperator2.idl b/offapi/com/sun/star/sheet/FilterOperator2.idl
new file mode 100644
index 0000000..ba4502d
--- /dev/null
+++ b/offapi/com/sun/star/sheet/FilterOperator2.idl
@@ -0,0 +1,164 @@
+/*************************************************************************
+ *
+ * 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: FilterOperator2.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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_sheet_FilterOperator2_idl__
+#define __com_sun_star_sheet_FilterOperator2_idl__
+
+//=============================================================================
+
+module com {  module sun {  module star {  module sheet {
+
+//=============================================================================
+
+/** specifies the type of a single condition in a filter descriptor.
+
+    <p>This constants group extends the <type>FilterOperator</type> enum by
+    additional filter operators.</p>
+
+    @since OOo 3.2
+ */
+published constants FilterOperator2
+{
+
+    //-------------------------------------------------------------------------
+
+    /** selects empty entries.
+     */
+    const long EMPTY = 0;
+
+    //-------------------------------------------------------------------------
+
+    /** selects non-empty entries.
+     */
+    const long NOT_EMPTY = 1;
+
+    //-------------------------------------------------------------------------
+
+    /** value has to be equal to the specified value.
+     */
+    const long EQUAL = 2;
+
+    //-------------------------------------------------------------------------
+
+    /** value must not be equal to the specified value.
+     */
+    const long NOT_EQUAL = 3;
+
+    //-------------------------------------------------------------------------
+
+    /** value has to be greater than the specified value.
+     */
+    const long GREATER = 4;
+
+    //-------------------------------------------------------------------------
+
+    /** value has to be greater than or equal to the specified value.
+     */
+    const long GREATER_EQUAL = 5;
+
+    //-------------------------------------------------------------------------
+
+    /** value has to be less than the specified value.
+     */
+    const long LESS = 6;
+
+    //-------------------------------------------------------------------------
+
+    /** value has to be less than or equal to the specified value.
+     */
+    const long LESS_EQUAL = 7;
+
+    //-------------------------------------------------------------------------
+
+    /** selects a specified number of entries with the greatest values.
+     */
+    const long TOP_VALUES = 8;
+
+    //-------------------------------------------------------------------------
+
+    /** selects a specified percentage of entries with the greatest values.
+     */
+    const long TOP_PERCENT = 9;
+
+    //-------------------------------------------------------------------------
+
+    /** selects a specified number of entries with the lowest values.
+     */
+    const long BOTTOM_VALUES = 10;
+
+    //-------------------------------------------------------------------------
+
+    /** selects a specified percentage of entries with the lowest values.
+     */
+    const long BOTTOM_PERCENT = 11;
+
+    //-------------------------------------------------------------------------
+
+    /** selects contains entries.
+     */
+    const long CONTAINS = 12;
+
+    //-------------------------------------------------------------------------
+
+    /** selects does-not-contain entries.
+     */
+    const long DOES_NOT_CONTAIN = 13;
+
+    //-------------------------------------------------------------------------
+
+    /** selects begins-with entries.
+     */
+    const long BEGINS_WITH = 14;
+
+    //-------------------------------------------------------------------------
+
+    /** selects does-not-begin-with entries.
+     */
+    const long DOES_NOT_BEGIN_WITH = 15;
+    //-------------------------------------------------------------------------
+
+    /** selects ends-with entries.
+     */
+    const long ENDS_WITH = 16;
+
+    //-------------------------------------------------------------------------
+
+    /** selects does-not-end-with entries.
+     */
+    const long DOES_NOT_END_WITH = 17;
+
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif
+
diff --git a/offapi/com/sun/star/sheet/TableFilterField2.idl b/offapi/com/sun/star/sheet/TableFilterField2.idl
new file mode 100644
index 0000000..2ebf911
--- /dev/null
+++ b/offapi/com/sun/star/sheet/TableFilterField2.idl
@@ -0,0 +1,106 @@
+/*************************************************************************
+ *
+ * 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: TableFilterField2.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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_sheet_TableFilterField2_idl__
+#define __com_sun_star_sheet_TableFilterField2_idl__
+
+
+#ifndef __com_sun_star_sheet_FilterConnection_idl__
+#include <com/sun/star/sheet/FilterConnection.idl>
+#endif
+
+#ifndef __com_sun_star_sheet_FilterOperator2_idl__
+#include <com/sun/star/sheet/FilterOperator2.idl>
+#endif
+
+//=============================================================================
+
+module com {  module sun {  module star {  module sheet {
+
+//=============================================================================
+
+/** describes a single condition in a filter descriptor.
+
+    <p>This struct has the <type>FilterOperator2</type> constants group as
+    member, whereas the <type>TableFilterField</type> struct uses the
+    <type>FilterOperator</type> enum.</p>
+
+    @see com::sun::star::sheet::SheetFilterDescriptor
+    @since OOo 3.2
+ */
+published struct TableFilterField2
+{
+    //-------------------------------------------------------------------------
+
+    /** specifies how the condition is connected to the previous condition.
+     */
+    com::sun::star::sheet::FilterConnection Connection;
+
+    //-------------------------------------------------------------------------
+
+    /** specifies which field (column) is used for the condition.
+     */
+    long Field;
+
+    //-------------------------------------------------------------------------
+
+    /** specifies the type of the condition as defined in
+    <type>FilterOperator2</type>.
+    */
+    long Operator;
+
+    //-------------------------------------------------------------------------
+
+    /** selects whether the <member>TableFilterField2::NumericValue</member>
+        or the <member>TableFilterField2::StringValue</member> is used.
+     */
+    boolean IsNumeric;
+
+    //-------------------------------------------------------------------------
+
+    /** specifies a numeric value for the condition.
+     */
+    double NumericValue;
+
+    //-------------------------------------------------------------------------
+
+    /** specifies a string value for the condition.
+     */
+    string StringValue;
+
+};
+
+//=============================================================================
+
+}; }; }; };
+
+
+#endif
+
diff --git a/offapi/com/sun/star/sheet/XSheetFilterDescriptor2.idl b/offapi/com/sun/star/sheet/XSheetFilterDescriptor2.idl
new file mode 100644
index 0000000..90e54cd
--- /dev/null
+++ b/offapi/com/sun/star/sheet/XSheetFilterDescriptor2.idl
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * 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: XSheetFilterDescriptor2.idl,v $
+ * $Revision: 1.9 $
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_sheet_XSheetFilterDescriptor2_idl__
+#define __com_sun_star_sheet_XSheetFilterDescriptor2_idl__
+
+#ifndef __com_sun_star_sheet_TableFilterField2_idl__
+#include <com/sun/star/sheet/TableFilterField2.idl>
+#endif
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+
+//=============================================================================
+
+module com {  module sun {  module star {  module sheet {
+
+//=============================================================================
+
+/** provides access to a collection of filter conditions (filter fields).
+
+    <p>This interface uses the <type>TableFilterField2</type> struct,
+    whereas the <type>XSheetFilterDescriptor</type> interface uses the
+    <type>TableFilterField</type> struct.</p>
+
+    @see com::sun::star::sheet::SheetFilterDescriptor
+    @since OOo 3.2
+ */
+published interface XSheetFilterDescriptor2: com::sun::star::uno::XInterface
+{
+    //-------------------------------------------------------------------------
+
+    /** returns the collection of filter fields.
+     */
+    sequence< com::sun::star::sheet::TableFilterField2 > getFilterFields2();
+
+    //-------------------------------------------------------------------------
+
+    /** sets a new collection of filter fields.
+     */
+    void setFilterFields2(
+        [in] sequence< com::sun::star::sheet::TableFilterField2 > aFilterFields );
+
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif
+
diff --git a/offapi/com/sun/star/sheet/makefile.mk b/offapi/com/sun/star/sheet/makefile.mk
index f6ca081..2ab8318 100644
--- a/offapi/com/sun/star/sheet/makefile.mk
+++ b/offapi/com/sun/star/sheet/makefile.mk
@@ -138,6 +138,7 @@ IDLFILES=\
     FillMode.idl\
     FilterConnection.idl\
     FilterOperator.idl\
+    FilterOperator2.idl\
     FormulaLanguage.idl\
     FormulaMapGroup.idl\
     FormulaMapGroupSpecialOffset.idl\
@@ -219,6 +220,7 @@ IDLFILES=\
     TableConditionalEntryEnumeration.idl\
     TableConditionalFormat.idl\
     TableFilterField.idl\
+    TableFilterField2.idl\
     TableOperationMode.idl\
     TablePageBreakData.idl\
     TablePageStyle.idl\
@@ -315,6 +317,7 @@ IDLFILES=\
     XSheetConditionalEntries.idl\
     XSheetConditionalEntry.idl\
     XSheetFilterDescriptor.idl\
+    XSheetFilterDescriptor2.idl\
     XSheetFilterable.idl\
     XSheetFilterableEx.idl\
     XSheetLinkable.idl\
commit a4a85f41c1d120bb092fce72401677dc2279f370
Author: Jens-Heiner Rechtien <hr at openoffice.org>
Date:   Mon Jul 27 15:26:29 2009 +0000

    CWS-TOOLING: integrate CWS kso32fixes
    2009-07-10 15:25:24 +0200 kso  r273899 : #i53184# - fix probs with UNC server names containing underscores.
    2009-07-10 14:31:59 +0200 kso  r273893 : CWS-TOOLING: rebase CWS kso32fixes to trunk at 273858 (milestone: DEV300:m52)
    2009-07-09 13:46:16 +0200 kso  r273861 : #i53184# - withdrew patch.
    2009-07-08 13:39:00 +0200 kso  r273829 : #i63159# - added license header
    2009-07-08 11:44:08 +0200 kso  r273824 : i53184 - cannot open files from shell if UNC server has a _ (underscore)
    2009-07-08 11:21:12 +0200 kso  r273822 : #i93271# - mingw build error
    2009-07-08 11:13:48 +0200 kso  r273821 : #i91247 - Adhere to one more xdg spec
    2009-07-08 11:02:53 +0200 kso  r273820 : #i89017# - osl_trace now emits trailing line feed to the debugger
    2009-07-08 10:55:04 +0200 kso  r273819 : #i88663# - not waiting on successful forks but subsequent process failure
    2009-07-07 17:05:27 +0200 kso  r273810 : #i88382# - It's nice to leave the modal mode in gtk+ too ;-)
    2009-07-07 16:53:34 +0200 kso  r273808 : i88331# - Typo in include guard
    2009-07-07 16:48:17 +0200 kso  r273807 : i82831# - crashrep: warnings when size_t != int
    2009-07-07 16:39:49 +0200 kso  r273806 : i63159# - Patch to use d_type field in dirent structure if possible
    2009-06-24 12:52:27 +0200 kso  r273333 : #i100274# - solved win2k missing symbol problem (again).
    2009-05-20 13:58:48 +0200 kso  r272124 : CWS-TOOLING: rebase CWS kso32fixes to trunk at 271830 (milestone: DEV300:m48)
    2009-04-17 14:50:54 +0200 kso  r270950 : CWS-TOOLING: rebase CWS kso32fixes to trunk at 270723 (milestone: DEV300:m46)
    2009-03-26 09:27:28 +0100 kso  r270054 : #i100274# NTLM code cleanup.
    2009-03-20 14:13:38 +0100 kso  r269807 : #i100274# - Fixed potential buffer overflow in NTLM code.
    2009-03-19 14:53:03 +0100 kso  r269748 : #i100274. Added NTLM support for Non-Windows platforms.
    2009-03-17 15:52:44 +0100 kso  r269613 : CWS-TOOLING: rebase CWS kso32fixes to trunk at 269297 (milestone: DEV300:m43)

diff --git a/sal/inc/systools/win32/snprintf.h b/sal/inc/systools/win32/snprintf.h
index 26a6620..e3751c8 100644
--- a/sal/inc/systools/win32/snprintf.h
+++ b/sal/inc/systools/win32/snprintf.h
@@ -1,4 +1,4 @@
-#ifndef _SMPRINTF_H
+#ifndef _SNPRINTF_H
 #define _SNPRINTF_H
 
 #if     !defined(_WIN32)
@@ -77,4 +77,4 @@ _SNPRINTF_DLLIMPORT int __cdecl vsnprintf( char *buffer, size_t count, const cha
 }
 #endif
 
-#endif /* _SMPRINTF_H */
+#endif /* _SNPRINTF_H */
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 2451da3..f15f6bd 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -131,6 +131,42 @@ static const sal_Char* MOUNTTAB="/etc/mtab";
 
 #endif
 
+#ifdef _DIRENT_HAVE_D_TYPE
+#include "file_impl.hxx"
+    oslDirectoryItemImpl* oslDirectoryItemImpl_CreateNew( rtl_uString* _ustrFilePath, bool _bHasDType, unsigned char _DType )
+    {
+        oslDirectoryItemImpl *pItemObject = (oslDirectoryItemImpl*) malloc( sizeof( oslDirectoryItemImpl ) );
+        pItemObject->RefCount = 1;
+        pItemObject->bHasType = _bHasDType;
+        pItemObject->DType = _DType;
+        pItemObject->ustrFilePath = _ustrFilePath;
+
+        return pItemObject;
+    }
+
+    void oslDirectoryItemImpl_Destroy( oslDirectoryItemImpl* pItem )
+    {
+        if( pItem->ustrFilePath ) {
+            rtl_uString_release( pItem->ustrFilePath );
+            pItem->ustrFilePath = NULL;
+        }
+        free( pItem );
+    }
+
+    void oslDirectoryItemImpl_acquire( oslDirectoryItemImpl* pItem )
+    {
+        pItem->RefCount ++;
+    }
+
+    void oslDirectoryItemImpl_release( oslDirectoryItemImpl* pItem )
+    {
+        pItem->RefCount --;
+
+        if( pItem->RefCount <= 0 )
+            oslDirectoryItemImpl_Destroy( pItem );
+    }
+#endif
+
 #if OSL_DEBUG_LEVEL > 1
 
     extern void debug_ustring(rtl_uString*);
@@ -467,8 +503,15 @@ oslFileError SAL_CALL osl_getNextDirectoryItem(oslDirectory Directory, oslDirect
     osl_systemPathMakeAbsolutePath(pDirImpl->ustrPath, ustrFileName, &ustrFilePath);
     rtl_uString_release( ustrFileName );
 
-    /* use path as directory item */
-    *pItem = (oslDirectoryItem) ustrFilePath;
+#ifdef _DIRENT_HAVE_D_TYPE
+    if(*pItem)
+        oslDirectoryItemImpl_release( ( oslDirectoryItemImpl* )( *pItem ) );
+
+     *pItem = (oslDirectoryItem) oslDirectoryItemImpl_CreateNew( ustrFilePath, true, pEntry->d_type );
+#else
+     /* use path as directory item */
+     *pItem = (oslDirectoryItem) ustrFilePath;
+#endif
 
     return osl_File_E_None;
 }
@@ -497,7 +540,11 @@ oslFileError SAL_CALL osl_getDirectoryItem( rtl_uString* ustrFileURL, oslDirecto
 
     if (0 == access_u(ustrSystemPath, F_OK))
     {
+#ifdef _DIRENT_HAVE_D_TYPE
+        *pItem = (oslDirectoryItem) oslDirectoryItemImpl_CreateNew( ustrSystemPath, false );
+#else
         *pItem = (oslDirectoryItem)ustrSystemPath;
+#endif
         osl_error = osl_File_E_None;
     }
     else
@@ -515,12 +562,21 @@ oslFileError SAL_CALL osl_getDirectoryItem( rtl_uString* ustrFileURL, oslDirecto
 
 oslFileError osl_acquireDirectoryItem( oslDirectoryItem Item )
 {
+#ifdef _DIRENT_HAVE_D_TYPE
+    oslDirectoryItemImpl* pImpl = (oslDirectoryItemImpl*) Item;
+#else
     rtl_uString* ustrFilePath = (rtl_uString *) Item;
+#endif
 
     OSL_ASSERT( Item );
 
+#ifdef _DIRENT_HAVE_D_TYPE
+    if( pImpl )
+        oslDirectoryItemImpl_acquire( pImpl );
+#else
     if( ustrFilePath )
         rtl_uString_acquire( ustrFilePath );
+#endif
 
     return osl_File_E_None;
 }
@@ -531,12 +587,21 @@ oslFileError osl_acquireDirectoryItem( oslDirectoryItem Item )
 
 oslFileError osl_releaseDirectoryItem( oslDirectoryItem Item )
 {
+#ifdef _DIRENT_HAVE_D_TYPE
+    oslDirectoryItemImpl* pImpl = (oslDirectoryItemImpl*) Item;
+#else
     rtl_uString* ustrFilePath = (rtl_uString *) Item;
+#endif
 
     OSL_ASSERT( Item );
 
+#ifdef _DIRENT_HAVE_D_TYPE
+    if( pImpl )
+        oslDirectoryItemImpl_release( pImpl );
+#else
     if( ustrFilePath )
         rtl_uString_release( ustrFilePath );
+#endif
 
     return osl_File_E_None;
 }
diff --git a/sal/osl/unx/file_impl.hxx b/sal/osl/unx/file_impl.hxx
new file mode 100644
index 0000000..7a37912
--- /dev/null
+++ b/sal/osl/unx/file_impl.hxx
@@ -0,0 +1,48 @@
+/*************************************************************************
+ *
+ * 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: $
+ * $Revision: $
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+typedef struct
+{
+    rtl_uString* ustrFilePath;       /* holds native file name */
+    unsigned char DType;
+    bool bHasType;
+    sal_uInt32 RefCount;
+} oslDirectoryItemImpl;
+
+    oslDirectoryItemImpl* oslDirectoryItemImpl_CreateNew( rtl_uString* _ustrFilePath, bool _bHasDType, unsigned char _DType=0 );
+    void oslDirectoryItemImpl_Destroy( oslDirectoryItemImpl* pItem );
+    void oslDirectoryItemImpl_acquire( oslDirectoryItemImpl* pItem );
+    void oslDirectoryItemImpl_release( oslDirectoryItemImpl* pItem );
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
diff --git a/sal/osl/unx/file_stat.cxx b/sal/osl/unx/file_stat.cxx
index fed7228..b26e898 100644
--- a/sal/osl/unx/file_stat.cxx
+++ b/sal/osl/unx/file_stat.cxx
@@ -42,6 +42,11 @@
 #ifndef _UNISTD_H
 #include <unistd.h>
 #endif
+
+#ifndef _DIRENT_H
+#include <dirent.h>
+#endif
+
 #include <osl/file.h>
 
 #ifndef _ERRNO_H
@@ -56,6 +61,9 @@
 #include "file_path_helper.hxx"
 #include "file_error_transl.h"
 
+#ifdef _DIRENT_HAVE_D_TYPE
+#include "file_impl.hxx"
+#endif
 
 namespace /* private */
 {
@@ -223,9 +231,19 @@ namespace /* private */
     
     /* we only need to call stat or lstat if one of the 
        following flags is set */
+#ifdef _DIRENT_HAVE_D_TYPE
+    inline bool is_stat_call_necessary(sal_uInt32 field_mask, oslDirectoryItemImpl *pImpl)
+#else
     inline bool is_stat_call_necessary(sal_uInt32 field_mask)
+#endif
     {
-        return ((field_mask & osl_FileStatus_Mask_Type) ||
+        return (
+/* on linux the dirent might have d_type */
+#ifdef _DIRENT_HAVE_D_TYPE
+                ((field_mask & osl_FileStatus_Mask_Type) && (!pImpl->bHasType || pImpl->DType == DT_UNKNOWN)) ||
+#else
+                (field_mask & osl_FileStatus_Mask_Type) ||
+#endif
                 (field_mask & osl_FileStatus_Mask_Attributes) ||
                 (field_mask & osl_FileStatus_Mask_CreationTime) ||
                 (field_mask & osl_FileStatus_Mask_AccessTime) ||
@@ -254,7 +272,11 @@ namespace /* private */
         if ((NULL == Item) || (NULL == pStat))
             return osl_File_E_INVAL;
                             
+#ifdef _DIRENT_HAVE_D_TYPE
+        file_path = rtl::OUString(reinterpret_cast<rtl_uString*>(((oslDirectoryItemImpl* ) Item)->ustrFilePath));
+#else
         file_path = rtl::OUString(reinterpret_cast<rtl_uString*>(Item));    
+#endif
 
         OSL_ASSERT(file_path.getLength() > 0);
         
@@ -285,10 +307,18 @@ oslFileError SAL_CALL osl_getFileStatus(oslDirectoryItem Item, oslFileStatus* pS
 #else
     struct stat file_stat;
 #endif
-    if (is_stat_call_necessary(uFieldMask) && (0 != osl::lstat(file_path, file_stat)))
+
+#ifdef _DIRENT_HAVE_D_TYPE
+    oslDirectoryItemImpl* pImpl = (oslDirectoryItemImpl*) Item;
+    bool bStatNeeded = is_stat_call_necessary(uFieldMask, pImpl);
+#else
+    bool bStatNeeded = is_stat_call_necessary(uFieldMask);
+#endif
+
+    if (bStatNeeded && (0 != osl::lstat(file_path, file_stat)))
         return oslTranslateFileError(OSL_FET_ERROR, errno);
     
-    if (is_stat_call_necessary(uFieldMask))
+    if (bStatNeeded)
     {
         // we set all these attributes because it's cheap				
         set_file_type(file_stat, pStat);
@@ -305,6 +335,40 @@ oslFileError SAL_CALL osl_getFileStatus(oslDirectoryItem Item, oslFileStatus* pS
                 return osl_error;
         }
     }
+#ifdef _DIRENT_HAVE_D_TYPE
+    else if (uFieldMask & osl_FileStatus_Mask_Type)
+    {
+        OSL_ASSERT(pImpl->bHasType);
+
+        switch(pImpl->DType)
+        {
+        case DT_LNK:
+            pStat->eType = osl_File_Type_Link;              
+            break;
+        case DT_DIR:
+            pStat->eType = osl_File_Type_Directory;       
+            break;
+        case DT_REG:
+            pStat->eType = osl_File_Type_Regular;
+            break;
+        case DT_FIFO:
+            pStat->eType = osl_File_Type_Fifo;
+            break;
+        case DT_SOCK:
+            pStat->eType = osl_File_Type_Socket;
+            break;
+        case DT_CHR:
+        case DT_BLK:
+            pStat->eType = osl_File_Type_Special;
+            break;
+        default:
+            OSL_ASSERT(0);
+            pStat->eType = osl_File_Type_Unknown;
+        }
+
+       pStat->uValidFields |= osl_FileStatus_Mask_Type;
+    }
+#endif
             
     if (uFieldMask & osl_FileStatus_Mask_FileURL)
     {
diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c
index 64f013e..2eaea19 100644
--- a/sal/osl/unx/process.c
+++ b/sal/osl/unx/process.c
@@ -650,6 +650,18 @@ static void ChildStatusProc(void *pData)
             close( stdOutput[0] );
             close( stdError[0] );
 
+            //if pid > 0 then a process was created, even if it later failed
+            //e.g. bash searching for a command to execute, and we still
+            //need to clean it up to avoid "defunct" processes
+            if (pid > 0)
+            {
+                pid_t child_pid;
+                do
+                {
+                    child_pid = waitpid(pid, &status, 0);
+                } while ( 0 > child_pid && EINTR == errno );
+            }
+
             /* notify (and unblock) parent thread */
             osl_setCondition(pdata->m_started);
         }
diff --git a/sal/osl/unx/security.c b/sal/osl/unx/security.c
index 625c591..a5b883b 100644
--- a/sal/osl/unx/security.c
+++ b/sal/osl/unx/security.c
@@ -801,7 +801,14 @@ sal_Bool SAL_CALL osl_getConfigDir(oslSecurity Security, rtl_uString **pustrDire
 
 static sal_Bool SAL_CALL osl_psz_getConfigDir(oslSecurity Security, sal_Char* pszDirectory, sal_uInt32 nMax)
 {
-    return (osl_psz_getHomeDir(Security, pszDirectory, nMax));
+    sal_Char *pStr = getenv("XDG_CONFIG_HOME");
+    
+    if ((pStr == NULL) || (strlen(pStr) == 0) ||
+        (access(pStr, 0) != 0))
+        return (osl_psz_getHomeDir(Security, pszDirectory, nMax));
+
+    strncpy(pszDirectory, pStr, nMax);
+    return sal_True;
 }
 
 #else
diff --git a/sal/osl/w32/conditn.c b/sal/osl/w32/conditn.c
index 854c359..d6cf1a5 100644
--- a/sal/osl/w32/conditn.c
+++ b/sal/osl/w32/conditn.c
@@ -107,8 +107,7 @@ oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition,
     while ( 1 )
     {
         /* Only wake up if a SendMessage call to the threads message loop is detected */
-
-        switch( MsgWaitForMultipleObjects( 1, &(HANDLE)Condition, FALSE, timeout, QS_SENDMESSAGE ) )
+        switch( MsgWaitForMultipleObjects( 1, (HANDLE *)(&Condition), FALSE, timeout, QS_SENDMESSAGE ) )
         {
             case WAIT_OBJECT_0 + 1:
                 {
diff --git a/sal/osl/w32/diagnose.c b/sal/osl/w32/diagnose.c
index 0983e2c..f1227d6 100644
--- a/sal/osl/w32/diagnose.c
+++ b/sal/osl/w32/diagnose.c
@@ -73,6 +73,7 @@ void SAL_CALL osl_breakDebug(void)
 void SAL_CALL osl_trace(const sal_Char* lpszFormat, ...)
 {
     va_list args;
+    int written = 0;
 
     va_start(args, lpszFormat);
 
@@ -90,7 +91,8 @@ void SAL_CALL osl_trace(const sal_Char* lpszFormat, ...)
     {
         sal_Char	szMessage[512];
         szMessage[sizeof(szMessage)-1] = 0;
-        _vsnprintf( szMessage, sizeof(szMessage) -1, lpszFormat, args );
+        written = _vsnprintf( szMessage, sizeof(szMessage) - 2, lpszFormat, args );
+        szMessage[ written == -1 ? sizeof(szMessage) - 2 : written ] = '\n';
         OutputDebugString( szMessage );
     }
 


More information about the ooo-build-commit mailing list