[Libreoffice-commits] .: Branch 'features/base-preview' - 0 commits -

2012-04-04 Thread Lionel Elie Mamane
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] Changes to 'features/base-preview'

2012-04-04 Thread Lionel Elie Mamane
New branch 'features/base-preview' available with the following commits:
commit 8455648f5562a749784746ad7d349e2182de5a06
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Apr 4 16:00:52 2012 +0200

ORowSetCache::moveWindow m_nEndPos == m_nStartPos == 0 is OK

commit dc8c4e0c2afa499c129a9816758b99fc131e2071
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Feb 27 13:47:24 2012 +0100

fdo#46675: fixup

commit 05bc8ff10ad2911c21481337e0c422bb9e8d551c
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Feb 27 13:10:40 2012 +0100

fdo#46675: expand group memberships in get*Privileges

commit 6b50e94b3e167f5b39ca30c125338ee2552089f7
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 16 09:29:54 2012 +0100

correct indentation

commit 99d326e936693719f755f5c09eded393409f5d19
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 16 09:11:08 2012 +0100

typo  copy/paste error in error message

commit ccea02db5578a4de26dcfed7408bd5be43375f4b
Author: Kate Goss katherine.g...@gmail.com
Date:   Mon Feb 13 21:53:08 2012 +

Remove unused code from connectivity::odbc::OPreparedStatement

Remove methods getDataBuf(int), getParamLength(int), getPrecision(int).

commit e8849d59728fb44d41852b6d94579057d7281dd3
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 14 19:41:08 2012 +0100

ODBC: align *all* the handling of SQLULEN properties with maximal ODBC size

commit c70092fda8efbb3406157eb3605453fe69c5a4a2
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 14 19:39:01 2012 +0100

comphelper: add getINT64

commit e0e027f32bba7806e3cec6f6dff0742776b0a917
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 14 18:34:52 2012 +0100

improve OTools::binParameter/bindData interaction

Don't duplicate the decision point for data at execution or copied data

commit 7d02be52d1673a3eac7f7b814d6f07623888036b
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 14 09:49:19 2012 +0100

new[] already allocates each element of the array

And calls the default constructor, naturally.

commit 2b3edb088bdd0cec8b334ca46c6d5965cd927f52
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 14 06:27:51 2012 +0100

odbc getTableTypes: ask the driver instead of guessing

commit 84e71fa301d77f960eb6d3379e039e3383592fa6
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Feb 13 17:53:19 2012 +0100

ResMgr::TestStack more robust

commit 8ed323467d1f25f23f0ba4f392ce9609a1a9380b
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 9 13:06:27 2012 +0100

reorganise code for better readability

No behaviour change intended. However, if behaviour changed, probably the 
*old* behaviour is buggy, not new one.

commit d65c15553d48d153526380c709dfeab21a656d06
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 9 13:04:34 2012 +0100

typo in comment

commit 65c2f35133fd62a438249d16002e931798240db2
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 9 13:03:24 2012 +0100

ORowSetCache::moveWindow: yet another off-by-one error

commit d56b318e0e53757d0a567986762bb077e5f4ff3c
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Feb 8 19:08:20 2012 +0100

ORowSetCache::moveWindow fix variable inversion; fixes subsequentcheck

commit 6cbb1225934a7941a09fa97df466817090e708a1
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Feb 8 12:41:54 2012 +0100

ORowSetCache: handle case total data  m_nFetchSize

As a drive-by: fillMatrix update m_nEndSize

commit 7a591eceddeaf1f166f25723a157ad395af15ccd
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Jan 31 11:39:47 2012 +0100

pgsql: simpler / safer check for system column

commit 57e6b7a2e8c467f2ac394d7617dfca8bf305afec
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Feb 1 18:28:59 2012 +0100

pgsql: implement getColumnPrivileges, generate statement only once

commit cf43119f2f260c2042899cad6b98c6edbfb3e944
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Feb 1 18:03:40 2012 +0100

pgsql: clean comments

commit d7df4d223bab7d24bd571d9fe5960b7179ebbf64
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Jan 31 22:53:31 2012 +0100

ORowSetCache: keep m_nEndPos better up-to-date

commit e745fdb8215669959a6c5f39b311f796365cd5df
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Jan 24 22:20:31 2012 +0100

make OTools::getValue insanely safe, factorise get{Int,Long,Byte,...}

commit e2d12ef81b781a8d1ec07e59cb31cb90eaada71d
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Jan 23 10:19:55 2012 +0100

ORowSetCache::fillMatrix(): fix case m_nFetchsize  table size

When lowering m_nStartPos, do not duplicate rows above its old value

commit 040394fa3e416086c062abd95fe1b664a965a18e
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Sun Jan 22 01:35:58 2012 +0100

ORowSetCache::fillMatrix(): correct off-by-one error

Symptom: segfault

[Libreoffice-commits] .: connectivity/source

2012-03-27 Thread Lionel Elie Mamane
 connectivity/source/commontools/dbtools2.cxx |   73 ++-
 1 file changed, 62 insertions(+), 11 deletions(-)

New commits:
commit 077e711b5f5f19fceed44e2d992bf5c027e75ab6
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Mar 27 10:49:49 2012 +0200

fdo#47937: copy column privileges into table privileges

diff --git a/connectivity/source/commontools/dbtools2.cxx 
b/connectivity/source/commontools/dbtools2.cxx
index e559847..1ad8985 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -674,19 +674,20 @@ sal_Int32 getTablePrivileges(const Reference 
XDatabaseMetaData _xMetaData,
 Reference XResultSet  xPrivileges = 
_xMetaData-getTablePrivileges(aVal, _sSchema, _sTable);
 Reference XRow  xCurrentRow(xPrivileges, UNO_QUERY);
 
+const ::rtl::OUString sUserWorkingFor = _xMetaData-getUserName();
+static const ::rtl::OUString sSELECT( RTL_CONSTASCII_USTRINGPARAM( 
SELECT ));
+static const ::rtl::OUString sINSERT( RTL_CONSTASCII_USTRINGPARAM( 
INSERT ));
+static const ::rtl::OUString sUPDATE( RTL_CONSTASCII_USTRINGPARAM( 
UPDATE ));
+static const ::rtl::OUString sDELETE( RTL_CONSTASCII_USTRINGPARAM( 
DELETE ));
+static const ::rtl::OUString sREAD( RTL_CONSTASCII_USTRINGPARAM( 
READ ));
+static const ::rtl::OUString sCREATE( RTL_CONSTASCII_USTRINGPARAM( 
CREATE ));
+static const ::rtl::OUString sALTER( RTL_CONSTASCII_USTRINGPARAM( 
ALTER ));
+static const ::rtl::OUString sREFERENCE( RTL_CONSTASCII_USTRINGPARAM( 
REFERENCE ));
+static const ::rtl::OUString sDROP( RTL_CONSTASCII_USTRINGPARAM( 
DROP ));
+
 if ( xCurrentRow.is() )
 {
-::rtl::OUString sUserWorkingFor = _xMetaData-getUserName();
-static const ::rtl::OUString sSELECT( RTL_CONSTASCII_USTRINGPARAM( 
SELECT ));
-static const ::rtl::OUString sINSERT( RTL_CONSTASCII_USTRINGPARAM( 
INSERT ));
-static const ::rtl::OUString sUPDATE( RTL_CONSTASCII_USTRINGPARAM( 
UPDATE ));
-static const ::rtl::OUString sDELETE( RTL_CONSTASCII_USTRINGPARAM( 
DELETE ));
-static const ::rtl::OUString sREAD( RTL_CONSTASCII_USTRINGPARAM( 
READ ));
-static const ::rtl::OUString sCREATE( RTL_CONSTASCII_USTRINGPARAM( 
CREATE ));
-static const ::rtl::OUString sALTER( RTL_CONSTASCII_USTRINGPARAM( 
ALTER ));
-static const ::rtl::OUString sREFERENCE( 
RTL_CONSTASCII_USTRINGPARAM( REFERENCE ));
-static const ::rtl::OUString sDROP( RTL_CONSTASCII_USTRINGPARAM( 
DROP ));
-// after creation the set is positioned before the first record, 
per definitionem
+// after creation the set is positioned before the first record, 
per definition
 #ifdef DBG_UTIL
 Reference XResultSetMetaDataSupplier  
xSup(xPrivileges,UNO_QUERY);
 if ( xSup.is() )
@@ -743,6 +744,56 @@ sal_Int32 getTablePrivileges(const Reference 
XDatabaseMetaData _xMetaData,
 }
 }
 disposeComponent(xPrivileges);
+
+// Some drivers put a table privilege as soon as any column has the 
privilege,
+// some drivers only if all columns have the privilege.
+// To unifiy the situation, collect column privileges here, too.
+Reference XResultSet  xColumnPrivileges = 
_xMetaData-getColumnPrivileges(aVal, _sSchema, _sTable, 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(%)));
+Reference XRow  xColumnCurrentRow(xColumnPrivileges, UNO_QUERY);
+if ( xColumnCurrentRow.is() )
+{
+// after creation the set is positioned before the first record, 
per definition
+::rtl::OUString sPrivilege, sGrantee;
+while ( xColumnPrivileges-next() )
+{
+#ifdef DBG_UTIL
+::rtl::OUString sCat, sSchema, sTableName, sColumnName, 
sGrantor, sGrantable;
+sCat= xColumnCurrentRow-getString(1);
+sSchema = xColumnCurrentRow-getString(2);
+sTableName  = xColumnCurrentRow-getString(3);
+sColumnName = xColumnCurrentRow-getString(4);
+sGrantor= xColumnCurrentRow-getString(5);
+#endif
+sGrantee= xColumnCurrentRow-getString(6);
+sPrivilege  = xColumnCurrentRow-getString(7);
+#ifdef DBG_UTIL
+sGrantable  = xColumnCurrentRow-getString(8);
+#endif
+
+if (!sUserWorkingFor.equalsIgnoreAsciiCase(sGrantee))
+continue;
+
+if (sPrivilege.equalsIgnoreAsciiCase(sSELECT))
+nPrivileges |= Privilege::SELECT;
+else if (sPrivilege.equalsIgnoreAsciiCase(sINSERT))
+nPrivileges |= Privilege::INSERT;
+else if (sPrivilege.equalsIgnoreAsciiCase(sUPDATE))
+nPrivileges |= Privilege::UPDATE;
+else

[Libreoffice-commits] .: 2 commits - dbaccess/source

2012-03-20 Thread Lionel Elie Mamane
 dbaccess/source/ui/querydesign/QueryDesignView.cxx|2 +-
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |   12 ++--
 dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx |1 +
 3 files changed, 12 insertions(+), 3 deletions(-)

New commits:
commit 9f6e09e241921c6c4260ab530374de8d5ccd4267
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Mar 20 11:03:08 2012 +0100

fdo#47560 properly separate each new sorting column

diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx 
b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 12b5b29..4e6d852 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -2326,9 +2326,9 @@ namespace
 
 OQueryController rController = 
static_castOQueryController(_pView-getController());
 EOrderDir eOrderDir;
-OTableFieldDescRef aDragLeft = new OTableFieldDesc();
 for( sal_uInt32 i=0 ; ipNode-count() ; i++ )
 {
+OTableFieldDescRef aDragLeft = new OTableFieldDesc();
 eOrderDir = ORDER_ASC;
 ::connectivity::OSQLParseNode*  pChild = pNode-getChild( i );
 
commit 470feb03f11e015b69fc5df11bd141f536eb8c91
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Mar 20 11:01:12 2012 +0100

fdo#47370 properly duplicate (invisible) out-of-order sort columns

Keep track of position of previous sorting column and use it to decide 
whether to duplicate invisible new sort column

diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx 
b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 35a08f5..b9a73e8 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -69,6 +69,7 @@ const String g_strZero = String::CreateFromAscii(0);
 #define CHECKBOX_SIZE   10
 #define HANDLE_ID0
 #define HANDLE_COLUMN_WITDH 70
+#define SORT_COLUMN_NONE0x
 
 // 
-
 namespace
@@ -114,6 +115,7 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent )
   BROWSER_HIDECURSOR | BROWSER_HLINESFULL | 
BROWSER_VLINESFULL )
,m_aFunctionStrings(ModuleRes(STR_QUERY_FUNCTIONS))
,m_nVisibleCount(0)
+   ,m_nLastSortColumn(SORT_COLUMN_NONE)
,m_bOrderByUnRelated(sal_True)
,m_bGroupByUnRelated(sal_True)
,m_bStopTimer(sal_False)
@@ -420,6 +422,7 @@ void OSelectionBrowseBox::ClearAll()
 aIter = getFields().rbegin();
 }
 }
+m_nLastSortColumn = SORT_COLUMN_NONE;
 SetUpdateMode(sal_True);
 }
 
//--
@@ -1875,11 +1878,14 @@ void OSelectionBrowseBox::AddCondition( const 
OTableFieldDescRef rInfo, const S
 
//--
 void OSelectionBrowseBox::AddOrder( const OTableFieldDescRef rInfo, const 
EOrderDir eDir, sal_uInt32 _nCurrentPos)
 {
+if (_nCurrentPos == 0)
+m_nLastSortColumn = SORT_COLUMN_NONE;
+
 Reference XConnection xConnection = 
static_castOQueryController(getDesignView()-getController()).getConnection();
 if(!xConnection.is())
 return;
 DBG_CHKTHIS(OSelectionBrowseBox,NULL);
-OSL_ENSURE(!rInfo-IsEmpty(),AddOrder:: OTableFieldDescRef sollte nicht 
Empty sein!);
+OSL_ENSURE(!rInfo-IsEmpty(),AddOrder:: OTableFieldDescRef should not be 
Empty!);
 OTableFieldDescRef pEntry;
 ReferenceXDatabaseMetaData xMeta = xConnection-getMetaData();
 ::comphelper::UStringMixEqual bCase(xMeta.is()  
xMeta-supportsMixedCaseQuotedIdentifiers());
@@ -1898,7 +1904,7 @@ void OSelectionBrowseBox::AddOrder( const 
OTableFieldDescRef rInfo, const EOrde
 bCase(aAlias,rInfo-GetAlias()))
 {
 sal_uInt32 nPos = aIter - rFields.begin();
-bAppend = _nCurrentPos  nPos;
+bAppend = (m_nLastSortColumn != SORT_COLUMN_NONE)  (nPos = 
m_nLastSortColumn);
 if ( bAppend )
 aIter = rFields.end();
 else
@@ -1906,6 +1912,7 @@ void OSelectionBrowseBox::AddOrder( const 
OTableFieldDescRef rInfo, const EOrde
 if ( !m_bOrderByUnRelated )
 pEntry-SetVisible(sal_True);
 pEntry-SetOrderDir( eDir );
+m_nLastSortColumn = nPos;
 }
 break;
 }
@@ -1916,6 +1923,7 @@ void OSelectionBrowseBox::AddOrder( const 
OTableFieldDescRef rInfo, const EOrde
 OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, 
sal_False, sal_False );
 if(pTmp.is())
 {
+m_nLastSortColumn = pTmp-GetColumnId() - 1;
 if ( !m_bOrderByUnRelated  !bAppend

[Libreoffice-commits] Changes to 'features/base-preview'

2012-03-20 Thread Lionel Elie Mamane
New branch 'features/base-preview' available with the following commits:
commit ba8080be6907604e1cd53e22442668d545e36eea
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Mar 20 11:03:08 2012 +0100

fdo#47560 properly separate each new sorting column

commit 8b4f2201d43bc7acb2d0ce457a3662596794839e
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Mar 20 11:01:12 2012 +0100

fdo#47370 properly duplicate (invisible) out-of-order sort columns

Keep track of position of previous sorting column and use it to decide 
whether to duplicate invisible new sort column

commit eb634d25eab7fad1c9d5ddb7b2633535dc469544
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Mar 15 10:59:28 2012 +0100

self-implemented iterators (no boost) for OUString

commit 73f18ab94e7459d5dffdffcce33573bb008bff51
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 28 20:15:06 2012 +0100

off-by-one error in months

commit 41d0b76697330fa0b1adbf77f9e73ee3f0cc93e0
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 28 19:27:23 2012 +0100

date parsing: recognise partial dates

commit e52cc28fc25879ea02c2cfea39affa3025c03a56
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 28 18:37:38 2012 +0100

add forgotten file lo_traits.hxx

commit 6d580cbb4c5debc050727deac4670e440055ef00
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 28 18:31:39 2012 +0100

spirit parser for numbers: add basic dates, create proper grammar

commit e89cf657d2c838c9fe42a393ad49506847eede7d
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 28 11:50:43 2012 +0100

Use boost::u16_to_u32_iterator for OUString::const_iterator

commit b6ec4ed84e6b97c1792af7ac2e35b3b3508e58ca
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 28 10:49:57 2012 +0100

spirit parser for numbers: first proof-of-concept

commit aeb6569cf84798f803e55bf7158e660cce8ffb88
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Feb 27 13:47:24 2012 +0100

fdo#46675: fixup

commit e21afa06933d5b8ae23335ff12a4be28bf73e397
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Feb 27 13:10:40 2012 +0100

fdo#46675: expand group memberships in get*Privileges

commit 7033f76646b2357da8b3bd6d6ec664847bd4b479
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 16 09:29:54 2012 +0100

correct indentation

commit 4fb2f2870db8becb74eebe62477e3720664950e8
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 16 09:11:08 2012 +0100

typo  copy/paste error in error message

commit 1101bc5259e79f7e680bc843ce30e0b50194579f
Author: Kate Goss katherine.g...@gmail.com
Date:   Mon Feb 13 21:53:08 2012 +

Remove unused code from connectivity::odbc::OPreparedStatement

Remove methods getDataBuf(int), getParamLength(int), getPrecision(int).

commit 47a4efce56b0aad18f5924c97c0b8c235e9de48e
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 14 19:41:08 2012 +0100

ODBC: align *all* the handling of SQLULEN properties with maximal ODBC size

commit b7782c4a99a87ca262f0f316abd9d7cb68847fb6
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 14 19:39:01 2012 +0100

comphelper: add getINT64

commit 81038fe1f9e167182d5008b96996ab956ea4a628
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 14 18:34:52 2012 +0100

improve OTools::binParameter/bindData interaction

Don't duplicate the decision point for data at execution or copied data

commit 58a1ed92534e37b4532690cf59fe4708bd031d5c
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 14 09:49:19 2012 +0100

new[] already allocates each element of the array

And calls the default constructor, naturally.

commit 70a2f9a3feb761fca259b3bf01df79d4820e651b
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 14 06:27:51 2012 +0100

odbc getTableTypes: ask the driver instead of guessing

commit ca1df36db2179b24e6f3726024d2915316610d9e
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Feb 13 17:53:19 2012 +0100

ResMgr::TestStack more robust

commit 6a7770b2feecdf64fc5798200c68597692b986f8
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 9 13:06:27 2012 +0100

reorganise code for better readability

No behaviour change intended. However, if behaviour changed, probably the 
*old* behaviour is buggy, not new one.

commit 1e1e7cc4137179c8b50a533fb2317c00f78919f0
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 9 13:04:34 2012 +0100

typo in comment

commit e7270e8d6981345712485503db5cec684230c9d6
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 9 13:03:24 2012 +0100

ORowSetCache::moveWindow: yet another off-by-one error

commit 4fd6e1f82cd51e30a02303d359cd2d60ab1ca6d3
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Feb 8 19:08:20 2012 +0100

ORowSetCache::moveWindow fix variable inversion; fixes subsequentcheck

commit 1c23c9012334a8314a0cc091a805f6d30e14c066
Author: Lionel Elie

[Libreoffice-commits] .: dbaccess/source

2012-03-15 Thread Lionel Elie Mamane
 dbaccess/source/ui/querydesign/QueryDesignView.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 80c235510aeb19d4df6a07be7499e70122313bbf
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Mar 15 11:22:32 2012 +0100

fdo#46843 look for order by clause as fifth child of select_statement

Since commit 33b9b857ea6cb5a6f731de68f58e532242c43d30 (dba34c: #i20306# 
support for window function and limit fetch first, ... added), order by is the 
fifth child. It was the fourth one before.

diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx 
b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 397cedb..267c7a9 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -2319,9 +2319,9 @@ namespace
 const ::connectivity::OSQLParseNode* pParseRoot )
 {
 SqlParseError eErrorCode = eOk;
-if (!pParseRoot-getChild(3)-getChild(4)-isLeaf())
+if (!pParseRoot-getChild(3)-getChild(5)-isLeaf())
 {
-::connectivity::OSQLParseNode* pNode = 
pParseRoot-getChild(3)-getChild(4)-getChild(2);
+::connectivity::OSQLParseNode* pNode = 
pParseRoot-getChild(3)-getChild(5)-getChild(2);
 ::connectivity::OSQLParseNode* pParamRef = NULL;
 
 OQueryController rController = 
static_castOQueryController(_pView-getController());
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: dbaccess/source

2012-03-15 Thread Lionel Elie Mamane
 dbaccess/source/ui/querydesign/QueryDesignView.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 08ba87c55858335094c24ca4e610a13da10c
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Mar 15 18:54:17 2012 +0100

fixup: use introduced preprocessor constant instead of hardcoded constant

diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx 
b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 267c7a9..12b5b29 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -2319,9 +2319,9 @@ namespace
 const ::connectivity::OSQLParseNode* pParseRoot )
 {
 SqlParseError eErrorCode = eOk;
-if (!pParseRoot-getChild(3)-getChild(5)-isLeaf())
+if (!pParseRoot-getChild(3)-getChild(ORDER_BY_CHILD_POS)-isLeaf())
 {
-::connectivity::OSQLParseNode* pNode = 
pParseRoot-getChild(3)-getChild(5)-getChild(2);
+::connectivity::OSQLParseNode* pNode = 
pParseRoot-getChild(3)-getChild(ORDER_BY_CHILD_POS)-getChild(2);
 ::connectivity::OSQLParseNode* pParamRef = NULL;
 
 OQueryController rController = 
static_castOQueryController(_pView-getController());
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: connectivity/source

2012-02-27 Thread Lionel Elie Mamane
 connectivity/source/drivers/postgresql/pq_databasemetadata.cxx |   15 
++
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit ee0cb9d05d11c23421ec5d7b268eb8c5e049
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Feb 27 13:10:40 2012 +0100

fdo#46675: expand group memberships in get*Privileges

diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx 
b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index 3748098..d925cb1 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -2071,7 +2071,8 @@ void DatabaseMetaData::init_getPrivs_stmt ()
 {
 rtl::OUStringBuffer sSQL(300);
 sSQL.append( ASCII_STR(
- SELECT * FROM (
+ SELECT dp.TABLE_CAT, dp.TABLE_SCHEM, dp.TABLE_NAME, dp.GRANTOR, 
pr.rolname AS GRANTEE, dp.privilege, dp.is_grantable 
+ FROM (
   SELECT table_catalog AS TABLE_CAT, table_schema AS TABLE_SCHEM, 
table_name,
  grantor, grantee, privilege_type AS PRIVILEGE, 
is_grantable
   FROM information_schema.table_privileges) );
@@ -2093,14 +2094,15 @@ void DatabaseMetaData::init_getPrivs_stmt ()
   WHERE c.relkind IN ('r', 'v') AND c.relacl IS NULL AND 
pg_has_role(rg.oid, c.relowner, 'USAGE')
 AND c.relowner=ro.oid AND c.relnamespace = pn.oid) );
 sSQL.append( ASCII_STR(
- ) s
- WHERE table_schem LIKE ? AND table_name LIKE ? 
+ ) dp,
+ (SELECT oid, rolname FROM pg_catalog.pg_roles UNION ALL VALUES 
(0, 'PUBLIC')) pr
+ WHERE table_schem LIKE ? AND table_name LIKE ? AND 
pg_has_role(pr.oid, dp.grantee, 'USAGE')
  ORDER BY table_schem, table_name, privilege ) );
 
 m_getTablePrivs_stmt = m_origin-prepareStatement( 
sSQL.makeStringAndClear() );
 
 sSQL.append( ASCII_STR(
- SELECT * FROM (
+ SELECT dp.TABLE_CAT, dp.TABLE_SCHEM, dp.TABLE_NAME, 
dp.COLUMN_NAME, dp.GRANTOR, pr.rolname AS GRANTEE, dp.PRIVILEGE, 
dp.IS_GRANTABLE FROM (
   SELECT table_catalog AS TABLE_CAT, table_schema AS TABLE_SCHEM, 
table_name, column_name,
  grantor, grantee, privilege_type AS PRIVILEGE, 
is_grantable
   FROM information_schema.column_privileges) );
@@ -2122,8 +2124,9 @@ void DatabaseMetaData::init_getPrivs_stmt ()
   WHERE c.relkind IN ('r', 'v') AND c.relacl IS NULL AND 
pg_has_role(rg.oid, c.relowner, 'USAGE')
 AND c.relowner=ro.oid AND c.relnamespace = pn.oid AND 
a.attrelid = c.oid AND a.attnum  0) );
 sSQL.append( ASCII_STR(
- ) s
- WHERE table_schem = ? AND table_name = ? AND column_name LIKE ? 
+ ) dp,
+ (SELECT oid, rolname FROM pg_catalog.pg_roles UNION ALL VALUES 
(0, 'PUBLIC')) pr
+ WHERE table_schem = ? AND table_name = ? AND column_name LIKE ? 
AND pg_has_role(pr.oid, dp.grantee, 'USAGE')
  ORDER BY column_name, privilege ) );
 
 m_getColumnPrivs_stmt = m_origin-prepareStatement( 
sSQL.makeStringAndClear() );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 4 commits - connectivity/source forms/source

2012-02-16 Thread Lionel Elie Mamane
 connectivity/source/commontools/FValue.cxx |8 +--
 forms/source/component/ListBox.cxx |   76 ++---
 forms/source/component/ListBox.hxx |   11 +++-
 3 files changed, 74 insertions(+), 21 deletions(-)

New commits:
commit c55d050400139a270f5b3b620db4845001db017d
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 16 13:24:58 2012 +0100

fdo#46163 convert bound values to bound column's type

diff --git a/forms/source/component/ListBox.cxx 
b/forms/source/component/ListBox.cxx
index 2453ebc..eb8c6c9 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -326,7 +326,7 @@ namespace frm
 // propagate
 if ( m_eListSourceType == ListSourceType_VALUELIST )
 {
-m_aBoundValues = m_aListSourceValues;
+setBoundValues(m_aListSourceValues);
 }
 else
 {
@@ -556,7 +556,7 @@ namespace frm
 OSL_FAIL(OListBoxModel::read : invalid (means unknown) version 
!);
 ValueList().swap(m_aListSourceValues);
 m_aBoundColumn = (sal_Int16)0;
-ValueList().swap(m_aBoundValues);
+clearBoundValues();
 m_eListSourceType = ListSourceType_VALUELIST;
 m_aDefaultSelectSeq.realloc(0);
 defaultCommonProperties();
@@ -674,7 +674,7 @@ namespace frm
 // outta here if we don't have all pre-requisites
 if ( !xConnection.is() || sListSource.isEmpty() )
 {
-ValueList().swap(m_aBoundValues);
+clearBoundValues();
 return;
 }
 
@@ -924,7 +924,7 @@ namespace frm
 m_nNULLPos = 0;
 }
 
-m_aBoundValues = aValueList;
+setBoundValues(aValueList);
 
 setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( 
lcl_convertToStringSequence( aDisplayList ) ) );
 }
@@ -948,7 +948,7 @@ namespace frm
 {
 if ( m_eListSourceType != ListSourceType_VALUELIST )
 {
-ValueList().swap(m_aBoundValues);
+clearBoundValues();
 m_nNULLPos = -1;
 m_nBoundColumnType = DataType::SQLNULL;
 
@@ -960,19 +960,63 @@ namespace frm
 }
 
 
//--
+void OListBoxModel::setBoundValues(const ValueList l)
+{
+m_aConvertedBoundValues.clear();
+m_aBoundValues = l;
+}
+
+
//--
+void OListBoxModel::clearBoundValues()
+{
+ValueList().swap(m_aConvertedBoundValues);
+ValueList().swap(m_aBoundValues);
+}
+
+
//--
+void OListBoxModel::convertBoundValues(const sal_Int32 nFieldType) const
+{
+m_aConvertedBoundValues.resize(m_aBoundValues.size());
+ValueList::const_iterator src = m_aBoundValues.begin();
+const ValueList::const_iterator end = m_aBoundValues.end();
+ValueList::iterator dst = m_aConvertedBoundValues.begin();
+for (; src != end; ++src, ++dst )
+{
+*dst = *src;
+dst-setTypeKind(nFieldType);
+}
+m_nConvertedBoundValuesType = nFieldType;
+OSL_ENSURE(dst == m_aConvertedBoundValues.end(), 
OListBoxModel::convertBoundValues expected to have overwritten all of 
m_aConvertedBoundValues, but did not.);
+}
+
//--
+sal_Int32 OListBoxModel::getValueType() const
+{
+return impl_hasBoundComponent() ? m_nBoundColumnType : getFieldType();
+}
+
//--
 ValueList OListBoxModel::impl_getValues() const
 {
+const sal_Int32 nFieldType = getValueType();
+
+if ( !m_aConvertedBoundValues.empty()  m_nConvertedBoundValuesType 
== nFieldType )
+return m_aConvertedBoundValues;
+
 if ( !m_aBoundValues.empty() )
-return m_aBoundValues;
+{
+convertBoundValues(nFieldType);
+return m_aConvertedBoundValues;
+}
 
 Sequence ::rtl::OUString  aStringItems( getStringItemList() );
 ValueList aValues( aStringItems.getLength() );
-::std::copy(
-aStringItems.getConstArray(),
-aStringItems.getConstArray() + aStringItems.getLength(),
-aValues.begin()
-);
-
+ValueList::iterator dst = aValues.begin();
+const ::rtl::OUString *src (aStringItems.getConstArray());
+const ::rtl::OUString * const end = src + aStringItems.getLength();
+for (; src  end; ++src, ++dst )
+{
+*dst = *src;
+dst-setTypeKind(nFieldType);
+}
 return aValues

[Libreoffice-commits] .: forms/source

2012-02-16 Thread Lionel Elie Mamane
 forms/source/component/DatabaseForm.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3f6473f1302d2067e6d7925c17bfed284031d164
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 16 17:01:31 2012 +0100

Forgotten German word in translated comment

diff --git a/forms/source/component/DatabaseForm.cxx 
b/forms/source/component/DatabaseForm.cxx
index 3796d79..559a29e 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -621,7 +621,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList 
rList, const Referenc
 if (!xComponentSet.is())
 return;
 
-// MIB 25.6.98: Catch nested Forms Geschachtelte; or would we need to 
submit them?
+// MIB 25.6.98: Catch nested Forms; or would we need to submit them?
 if (!hasProperty(PROPERTY_CLASSID, xComponentSet))
 return;
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 4 commits - connectivity/source offapi/com

2012-02-14 Thread Lionel Elie Mamane
 connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx  |   39 ++--
 connectivity/source/drivers/odbcbase/OPreparedStatement.cxx |3 
 connectivity/source/inc/odbc/OBoundParam.hxx|2 
 offapi/com/sun/star/sdbc/XDatabaseMetaData.idl  |   16 ++--
 4 files changed, 18 insertions(+), 42 deletions(-)

New commits:
commit 84d21e4de26bd69f7ca5b10f2c72779f07e11347
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 14 14:54:03 2012 +0100

odbc 64 bit crash: correct buffer length allocation for a SQLLEN

diff --git a/connectivity/source/inc/odbc/OBoundParam.hxx 
b/connectivity/source/inc/odbc/OBoundParam.hxx
index 2310a2e..99a4901 100644
--- a/connectivity/source/inc/odbc/OBoundParam.hxx
+++ b/connectivity/source/inc/odbc/OBoundParam.hxx
@@ -68,7 +68,7 @@ namespace connectivity
 // to a Java sal_Int32.  The jdbcodbc 'C' bridge provides an
 // interface to do this.
 
-paramLength = new sal_Int8[4];
+paramLength = new sal_Int8[sizeof(SQLLEN)];
 }
 
 
//
commit 288cc968c4d1fa07b4f3cc106ea6934c4afd955a
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 14 09:49:19 2012 +0100

new[] already allocates each element of the array

And calls the default constructor, naturally.

diff --git a/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx 
b/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx
index 2dbde52..63401f5 100644
--- a/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx
+++ b/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx
@@ -641,11 +641,10 @@ void OPreparedStatement::initBoundParam () 
throw(SQLException)
 
 boundParams = new OBoundParam[numParams];
 
-// Allocate and initialize each bound parameter
+// initialize each bound parameter
 
 for (sal_Int32 i = 0; i  numParams; i++)
 {
-boundParams[i] = OBoundParam();
 boundParams[i].initialize ();
 }
 }
commit 50e5118710c84461b0e09dc0576e924ea149f6d4
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 14 06:27:51 2012 +0100

odbc getTableTypes: ask the driver instead of guessing

diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx 
b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx
index 093c6d9..783e259 100644
--- a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx
+++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx
@@ -728,43 +728,18 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsOuterJoins(  
) throw(SQLException,
 // -
 Reference XResultSet  SAL_CALL ODatabaseMetaData::getTableTypes(  ) 
throw(SQLException, RuntimeException)
 {
-
-// there exists no possibility to get table types so we have to check
-static ::rtl::OUString sTableTypes[] =
-{
-::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(TABLE)),
-::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(VIEW)),
-::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SYSTEM TABLE)),
-::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(GLOBAL TEMPORARY)),
-::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(LOCAL TEMPORARY)),
-::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ALIAS)),
-::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SYNONYM))
-};
-sal_Int32  nSize = sizeof(sTableTypes) / sizeof(::rtl::OUString);
-::connectivity::ODatabaseMetaDataResultSet* pResult = new 
::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTableTypes);
-Reference XResultSet  xRef = pResult;
-SQLUINTEGER nValue = 0;
+Reference XResultSet  xRef;
 try
 {
-
OTools::GetInfo(m_pConnection,m_aConnectionHandle,SQL_CREATE_VIEW,nValue,*this);
-}
-catch(const Exception)
-{
+ODatabaseMetaDataResultSet* pResult = new 
ODatabaseMetaDataResultSet(m_pConnection);
+xRef = pResult;
+pResult-openTablesTypes();
 }
-sal_Bool bViewsSupported = (nValue  SQL_CV_CREATE_VIEW) == 
SQL_CV_CREATE_VIEW;
-
-::connectivity::ODatabaseMetaDataResultSet::ORows aRows;
-for(sal_Int32 i=0;i  nSize;++i)
+catch(SQLException)
 {
-if( !bViewsSupported  i == 1)
-continue; // no views supported
-::connectivity::ODatabaseMetaDataResultSet::ORow aRow;
-
aRow.push_back(::connectivity::ODatabaseMetaDataResultSet::getEmptyValue());
-aRow.push_back(new 
::connectivity::ORowSetValueDecorator(sTableTypes[i]));
-aRows.push_back(aRow);
+xRef = new 
::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eTableTypes);
 }
-pResult-setRows(aRows);
- return xRef;
+return xRef

[Libreoffice-commits] .: offapi/com

2012-02-14 Thread Lionel Elie Mamane
 offapi/com/sun/star/sdbc/XDatabaseMetaData.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cf3c4f63d94b39c73858d3455ede1b10dac2fe7d
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 14 15:43:00 2012 +0100

plural right after all

diff --git a/offapi/com/sun/star/sdbc/XDatabaseMetaData.idl 
b/offapi/com/sun/star/sdbc/XDatabaseMetaData.idl
index abee6d2..bf55630 100644
--- a/offapi/com/sun/star/sdbc/XDatabaseMetaData.idl
+++ b/offapi/com/sun/star/sdbc/XDatabaseMetaData.idl
@@ -64,7 +64,7 @@
 arguments all have names such as fooPattern. Within a pattern String, %
 means match any substring of 0 or more characters, and _ means match
 any one character. Only metadata entries matching the search pattern
-is returned. If a search pattern argument is set to VOID/,
+are returned. If a search pattern argument is set to VOID/,
 that argument's criteria will be dropped from the search.
 /p
 p
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 4 commits - comphelper/inc comphelper/source connectivity/source

2012-02-14 Thread Lionel Elie Mamane
/OPreparedStatement.hxx
+++ b/connectivity/source/inc/odbc/OPreparedStatement.hxx
@@ -88,15 +88,11 @@ namespace connectivity
 void putParamData (sal_Int32 index) 
throw(::com::sun::star::sdbc::SQLException);
 void setStream (sal_Int32 ParameterIndex,const 
::com::sun::star::uno::Reference ::com::sun::star::io::XInputStream x,
 SQLLEN 
length,sal_Int32 SQLtype) throw(::com::sun::star::sdbc::SQLException);
-sal_Int32 getParamLength (  sal_Int32 index);
 sal_Int8* getLengthBuf (sal_Int32 index);
-sal_Int8* getDataBuf (sal_Int32 index);
 sal_Int8* allocBindBuf (sal_Int32 index,sal_Int32 bufLen);
 void initBoundParam () throw(::com::sun::star::sdbc::SQLException);
 void setParameter(sal_Int32 parameterIndex,sal_Int32 
_nType,sal_Int32 _nSize,void* _pData);
 
-sal_Int32 getPrecision ( sal_Int32 sqlType);
-
 sal_Bool isPrepared() const { return m_bPrepared;}
 void prepareStatement();
 void checkParameterIndex(sal_Int32 _parameterIndex);
commit cdb2d21c550d18c5565a4ade7aeca4594a836f94
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Feb 14 19:41:08 2012 +0100

ODBC: align *all* the handling of SQLULEN properties with maximal ODBC size

diff --git a/connectivity/source/drivers/odbcbase/OStatement.cxx 
b/connectivity/source/drivers/odbcbase/OStatement.cxx
index 6355217..5c64c26 100644
--- a/connectivity/source/drivers/odbcbase/OStatement.cxx
+++ b/connectivity/source/drivers/odbcbase/OStatement.cxx
@@ -756,13 +756,13 @@ sal_Int64 OStatement_Base::getMaxFieldSize() const
 return ::rtl::OUString::createFromAscii((const char*)pName);
 }
 
//--
-void OStatement_Base::setQueryTimeOut(sal_Int32 seconds)
+void OStatement_Base::setQueryTimeOut(sal_Int64 seconds)
 {
 OSL_ENSURE(m_aStatementHandle,StatementHandle is null!);
 setStmtOptionSQLULEN, SQL_IS_UINTEGER(SQL_ATTR_QUERY_TIMEOUT,seconds);
 }
 
//--
-void OStatement_Base::setMaxRows(sal_Int32 _par0)
+void OStatement_Base::setMaxRows(sal_Int64 _par0)
 {
 OSL_ENSURE(m_aStatementHandle,StatementHandle is null!);
 setStmtOptionSQLULEN, SQL_IS_UINTEGER(SQL_ATTR_MAX_ROWS, _par0);
@@ -872,7 +872,7 @@ void OStatement_Base::setFetchSize(sal_Int32 _par0)
 }
 }
 
//--
-void OStatement_Base::setMaxFieldSize(sal_Int32 _par0)
+void OStatement_Base::setMaxFieldSize(sal_Int64 _par0)
 {
 OSL_ENSURE(m_aStatementHandle,StatementHandle is null!);
 setStmtOptionSQLULEN, SQL_IS_UINTEGER(SQL_ATTR_MAX_LENGTH, _par0);
@@ -913,9 +913,9 @@ void OStatement_Base::setUsingBookmarks(sal_Bool 
_bUseBookmark)
 DECL_BOOL_PROP0(ESCAPEPROCESSING);
 DECL_PROP0(FETCHDIRECTION,sal_Int32);
 DECL_PROP0(FETCHSIZE,   sal_Int32);
-DECL_PROP0(MAXFIELDSIZE,sal_Int32);
-DECL_PROP0(MAXROWS, sal_Int32);
-DECL_PROP0(QUERYTIMEOUT,sal_Int32);
+DECL_PROP0(MAXFIELDSIZE,sal_Int64);
+DECL_PROP0(MAXROWS, sal_Int64);
+DECL_PROP0(QUERYTIMEOUT,sal_Int64);
 DECL_PROP0(RESULTSETCONCURRENCY,sal_Int32);
 DECL_PROP0(RESULTSETTYPE,sal_Int32);
 DECL_BOOL_PROP0(USEBOOKMARKS);
@@ -997,13 +997,13 @@ void 
OStatement_Base::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const A
 switch(nHandle)
 {
 case PROPERTY_ID_QUERYTIMEOUT:
-setQueryTimeOut(comphelper::getINT32(rValue));
+setQueryTimeOut(comphelper::getINT64(rValue));
 break;
 case PROPERTY_ID_MAXFIELDSIZE:
-setMaxFieldSize(comphelper::getINT32(rValue));
+setMaxFieldSize(comphelper::getINT64(rValue));
 break;
 case PROPERTY_ID_MAXROWS:
-setMaxRows(comphelper::getINT32(rValue));
+setMaxRows(comphelper::getINT64(rValue));
 break;
 case PROPERTY_ID_CURSORNAME:
 setCursorName(comphelper::getString(rValue));
diff --git a/connectivity/source/inc/odbc/OStatement.hxx 
b/connectivity/source/inc/odbc/OStatement.hxx
index e0d4663..4768f70 100644
--- a/connectivity/source/inc/odbc/OStatement.hxx
+++ b/connectivity/source/inc/odbc/OStatement.hxx
@@ -99,9 +99,9 @@ namespace connectivity
 sal_Bool getEscapeProcessing()  const;
 template  typename T, SQLINTEGER BufferLength  T getStmtOption 
(SQLINTEGER fOption, T dflt = 0) const;
 
-void setQueryTimeOut(sal_Int32 _par0)   ;
-void setMaxFieldSize(sal_Int32 _par0)   ;
-void setMaxRows(sal_Int32 _par0);
+void setQueryTimeOut(sal_Int64 _par0)   ;
+void setMaxFieldSize(sal_Int64 _par0

[Libreoffice-commits] .: Branch 'libreoffice-3-5' - connectivity/source

2012-02-14 Thread Lionel Elie Mamane
 connectivity/source/drivers/postgresql/pq_databasemetadata.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3809a64ee66afd1be3988b1161390f9b49f1de61
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Feb 2 10:17:12 2012 +

unsigned int-sal_uInt32

Signed-off-by: Lionel Elie Mamane lio...@mamane.lu

diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx 
b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index 7f8249c..bfc7be0 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -1625,7 +1625,7 @@ static void columnMetaData2DatabaseTypeDescription(
 Reference XStatement  domainTypeStmt = m_origin-createStatement();
 columnMetaData2DatabaseTypeDescription( domainMap, rs, domainTypeStmt );
 
-unsigned int colNum;
+sal_uInt32 colNum(0);
 OUString sSchema( ASCII_STR(#invalid#) );
 OUString sTable(  ASCII_STR(#invalid#) );
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - extensions/source tools/source

2012-02-13 Thread Lionel Elie Mamane
 extensions/source/abpilot/typeselectionpage.cxx |   12 +---
 tools/source/rc/resmgr.cxx  |   17 ++---
 2 files changed, 19 insertions(+), 10 deletions(-)

New commits:
commit bbeb0f7a82945e8d7b98e5d5da9f69dfc5c6fabe
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Feb 13 17:53:19 2012 +0100

ResMgr::TestStack more robust

diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index 8d83533..8af6da3 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -1012,18 +1012,29 @@ void ResMgr::TestStack( const Resource* pResObj )
 {
 osl::Guardosl::Mutex aGuard( getResMgrMutex() );
 
+int upperLimit = nCurStack;
+
+if ( upperLimit  0 )
+{
+OSL_FAIL( resource stack underrun! );
+upperLimit = aStack.size() - 1;
+}
+else if ( upperLimit =  static_castint(aStack.size()) )
+{
+OSL_FAIL( stack occupation index  allocated stack size );
+upperLimit = aStack.size() - 1;
+}
+
 if ( DbgIsResource() )
 {
-for( int i = 1; i = nCurStack; ++i )
+for( int i = 1; i = upperLimit; ++i )
 {
 if ( aStack[i].pResObj == pResObj )
 {
-#ifdef DBG_UTIL
 RscError_Impl( Resource not freed! , this,
aStack[i].pResource-GetRT(),
aStack[i].pResource-GetId(),
aStack, i-1 );
-#endif
 }
 }
 }
commit 8eb33ee13519bd3059cdb2019ef843fbb9a7fbd7
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Feb 13 17:36:23 2012 +0100

fdo#43399 hidden radio button should also gets unset

diff --git a/extensions/source/abpilot/typeselectionpage.cxx 
b/extensions/source/abpilot/typeselectionpage.cxx
index 711159e..aee5219 100644
--- a/extensions/source/abpilot/typeselectionpage.cxx
+++ b/extensions/source/abpilot/typeselectionpage.cxx
@@ -110,9 +110,13 @@ namespace abp
 m_aAllTypes.push_back( ButtonItem( m_aOE, AST_OE, bWithMozilla  
!bUnx ) );
 m_aAllTypes.push_back( ButtonItem( m_aOther, AST_OTHER, true ) );
 
-bool bFirstVisible = true;
 Link aTypeSelectionHandler = LINK(this, TypeSelectionPage, 
OnTypeSelected );
 const Size aSpacing( LogicToPixel( Size( 0, 3 ), MAP_APPFONT ) );
+if ( ! m_aAllTypes.empty() )
+{
+ButtonItem aItem = m_aAllTypes[0];
+aItem.m_pItem-SetStyle( aItem.m_pItem-GetStyle() | WB_GROUP );
+}
 for ( ::std::vector ButtonItem ::const_iterator loop = 
m_aAllTypes.begin();
   loop != m_aAllTypes.end(); ++loop )
 {
@@ -125,12 +129,6 @@ namespace abp
 aTopLeft.Y() += aItemSize.Height() + aSpacing.Height();
 aItem.m_pItem-SetClickHdl( aTypeSelectionHandler );
 aItem.m_pItem-Show();
-
-if ( bFirstVisible )
-{
-aItem.m_pItem-SetStyle( aItem.m_pItem-GetStyle() | 
WB_GROUP );
-bFirstVisible = false;
-}
 }
 }
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 3 commits - dbaccess/source

2012-02-09 Thread Lionel Elie Mamane
 dbaccess/source/core/api/RowSetCache.cxx |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 9c6ca789ef80eefff1875b7c804c343ff1668ce0
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 9 13:06:27 2012 +0100

reorganise code for better readability

No behaviour change intended. However, if behaviour changed, probably the 
*old* behaviour is buggy, not new one.

diff --git a/dbaccess/source/core/api/RowSetCache.cxx 
b/dbaccess/source/core/api/RowSetCache.cxx
index 08e1a8b..6a853e6 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -1074,17 +1074,17 @@ sal_Bool ORowSetCache::moveWindow()
 {
 aIter = m_pMatrix-begin();
 
-nPos= m_nStartPos;
-bCheck  = m_pCacheSet-absolute_checked(m_nStartPos,sal_False);
-for(; !aIter-is()  bCheck;++aIter)
+nPos= m_nStartPos + 1;
+bCheck  = m_pCacheSet-absolute_checked(nPos, sal_False);
+for(; !aIter-is()  bCheck;++aIter, ++nPos)
 {
 OSL_ENSURE(aIter != m_pMatrix-end(),Invalid iterator);
-bCheck = m_pCacheSet-next();
 if ( bCheck ) // resultset stands on right position
 {
 *aIter = new 
ORowSetValueVector(m_xMetaData-getColumnCount());
-m_pCacheSet-fillValueRow(*aIter,++nPos);
+m_pCacheSet-fillValueRow(*aIter, nPos);
 }
+bCheck = m_pCacheSet-next();
 }
 }
 }
commit 4ea68987e96714aec1be339c4ddd5b6110bfd008
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 9 13:04:34 2012 +0100

typo in comment

diff --git a/dbaccess/source/core/api/RowSetCache.cxx 
b/dbaccess/source/core/api/RowSetCache.cxx
index be51b2a..08e1a8b 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -917,7 +917,7 @@ sal_Bool ORowSetCache::moveWindow()
 const sal_Int32 nStartPosOffset = m_nStartPos - nNewStartPos; // 
by how much m_nStartPos moves
 m_nStartPos = nNewStartPos;
 OSL_ENSURE( static_castORowSetMatrix::size_type(nOverlapSize) = 
m_pMatrix-size(), new window end is after end of cache matrix! );
-// the first position in m_pMatrix whos data we don't keep;
+// the first position in m_pMatrix whose data we don't keep;
 // content will be moved to m_pMatrix.begin()
 ORowSetMatrix::iterator aEnd (m_pMatrix-begin() + nOverlapSize);
 // the first unused position after we are done; it == 
m_pMatrix.end() if and only if the window is full
commit 843c8309536fec12d63dd45b6074ea5b461df322
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 9 13:03:24 2012 +0100

ORowSetCache::moveWindow: yet another off-by-one error

diff --git a/dbaccess/source/core/api/RowSetCache.cxx 
b/dbaccess/source/core/api/RowSetCache.cxx
index f2301f0..be51b2a 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -909,7 +909,7 @@ sal_Bool ORowSetCache::moveWindow()
 // then we fill in the rows between new and old start pos.
 
 sal_Bool bCheck;
-bCheck = m_pCacheSet-absolute(nNewStartPos);
+bCheck = m_pCacheSet-absolute(nNewStartPos + 1);
 
 // m_nEndPos  nNewEndPos when window not filled (e.g. there are 
less rows in total than window size)
 m_nEndPos = std::min(nNewEndPos, m_nEndPos);
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: dbaccess/source

2012-02-09 Thread Lionel Elie Mamane
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 53ca46cdff7b6e0ed5c6d97b86855a406c54895f
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 9 18:47:32 2012 +0100

translate german comments

diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx 
b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index f3140b0..b7cf65e 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -211,14 +211,15 @@ void OSelectionBrowseBox::initialize()
 m_aFunctionStrings += String(RTL_CONSTASCII_USTRINGPARAM(;));
 m_aFunctionStrings += sGroup;
 
-// Diese Funktionen stehen nur unter CORE zur Verf�gung
+// Aggregate functions in general available only with Core SQL
+// We slip in a few optionals one, too.
 if ( lcl_SupportsCoreSQLGrammar(xConnection) )
 {
 xub_StrLen nCount = 
comphelper::string::getTokenCount(m_aFunctionStrings, ';');
 for (xub_StrLen nIdx = 0; nIdx  nCount; nIdx++)
 
m_pFunctionCell-InsertEntry(m_aFunctionStrings.GetToken(nIdx));
 }
-else // sonst nur COUNT(*)
+else // else only COUNT(*) and COUNT(table.*)
 {
 m_pFunctionCell-InsertEntry(m_aFunctionStrings.GetToken(0));
 m_pFunctionCell-InsertEntry(m_aFunctionStrings.GetToken(2)); // 2 
- COUNT
@@ -2736,7 +2737,7 @@ void 
OSelectionBrowseBox::setFunctionCell(OTableFieldDescRef _pEntry)
 Reference XConnection xConnection = 
static_castOQueryController(getDesignView()-getController()).getConnection();
 if ( xConnection.is() )
 {
-// Diese Funktionen stehen nur unter CORE zur Verf�gung
+// Aggregate functions in general only available with Core SQL
 if ( lcl_SupportsCoreSQLGrammar(xConnection) )
 {
 // if we have an asterix, no other function than count is allowed
@@ -2767,7 +2768,7 @@ void 
OSelectionBrowseBox::setFunctionCell(OTableFieldDescRef _pEntry)
 }
 else
 {
-// nur COUNT(*) erlaubt
+// only COUNT(*) and COUNT(table.*) allowed
 sal_Bool bCountRemoved = !isFieldNameAsterix(_pEntry-GetField());
 if ( bCountRemoved )
 m_pFunctionCell-RemoveEntry(1);
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: postgresql/makefile.mk

2012-02-09 Thread Lionel Elie Mamane
 postgresql/makefile.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 74cb90c9dc026ccb86cbe3f06b28e53f3e9d5fd6
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Fri Feb 10 08:07:32 2012 +0100

pgsql: MSVC build use MozLDAP headers only when using MozLDAP

diff --git a/postgresql/makefile.mk b/postgresql/makefile.mk
index 75c1e62..4550ad5 100644
--- a/postgresql/makefile.mk
+++ b/postgresql/makefile.mk
@@ -56,11 +56,11 @@ CONFIGURE_DIR=.
 BUILD_DIR=src
 
 CONFIGURE_ACTION =
-SOLARINC += -I$(SOLARVER)$/$(INPATH)$/inc$/mozilla$/ldap
 BUILD_ACTION = nmake -f win32.mak USE_SSL=1
 .IF $(WITH_LDAP) == YES
 BUILD_ACTION += USE_LDAP=1
 .IF $(WITH_OPENLDAP) != YES
+SOLARINC += -I$(SOLARVER)$/$(INPATH)$/inc$/mozilla$/ldap
 BUILD_ACTION += USE_MOZLDAP=1
 .ENDIF
 .ENDIF # $(WITH_LDAP) == YES
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: postgresql/libpq-parallel-build.patch postgresql/makefile.mk

2012-02-06 Thread Lionel Elie Mamane
 postgresql/libpq-parallel-build.patch |   11 +++
 postgresql/makefile.mk|1 +
 2 files changed, 12 insertions(+)

New commits:
commit f33038cf6a5f86a619a5860a4f95d337f0c87ae5
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Feb 6 15:17:20 2012 +0100

fix postgresql massive-parallel build

diff --git a/postgresql/libpq-parallel-build.patch 
b/postgresql/libpq-parallel-build.patch
new file mode 100644
index 000..237a483
--- /dev/null
+++ b/postgresql/libpq-parallel-build.patch
@@ -0,0 +1,11 @@
+diff --recursive -u misc/build/postgresql-9.1.1/src/interfaces/libpq/Makefile 
misc/build/postgresql-9.1.1.patch/src/interfaces/libpq/Makefile
+--- misc/build/postgresql-9.1.1/src/interfaces/libpq/Makefile  2012-02-06 
15:11:19.0 +0100
 misc/build/postgresql-9.1.1.patch/src/interfaces/libpq/Makefile
2012-02-06 15:02:51.0 +0100
+@@ -109,6 +109,7 @@
+ libpq.rc: $(top_builddir)/src/Makefile.global
+ 
+ fe-connect.o: fe-connect.c $(top_builddir)/src/port/pg_config_paths.h
++fe-misc.o: fe-misc.c $(top_builddir)/src/port/pg_config_paths.h
+ 
+ $(top_builddir)/src/port/pg_config_paths.h:
+   $(MAKE) -C $(top_builddir)/src/port pg_config_paths.h
diff --git a/postgresql/makefile.mk b/postgresql/makefile.mk
index 340a6a8..75c1e62 100644
--- a/postgresql/makefile.mk
+++ b/postgresql/makefile.mk
@@ -41,6 +41,7 @@ TARFILE_MD5=061a9f17323117c9358ed60f33ecff78
 PATCH_FILES=\
postgresql-moz-ldap.patch \
postgresql-libs-leak.patch \
+   libpq-parallel-build.patch \
$(TARFILE_NAME)-libreoffice.patch \
$(TARFILE_NAME)-autoreconf.patch
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - configure.in postgresql/makefile.mk postgresql/postgresql-9.1.1-autoreconf.patch postgresql/postgresql-9.1.1-configure.patch postgresql/postgresql-libs-leak.patch

2012-02-03 Thread Lionel Elie Mamane
 configure.in |8 
 postgresql/makefile.mk   |9 
 postgresql/postgresql-9.1.1-autoreconf.patch |  326 
 postgresql/postgresql-9.1.1-configure.patch  |  362 ---
 postgresql/postgresql-libs-leak.patch|   39 ++
 5 files changed, 369 insertions(+), 375 deletions(-)

New commits:
commit 3364fcc5a550fae001b24f4303a978662bb7c70f
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Fri Feb 3 11:57:55 2012 +0100

enable Kerberos by default on DragonFly, too

diff --git a/configure.in b/configure.in
index 640a47b..6c255bb 100644
--- a/configure.in
+++ b/configure.in
@@ -6159,7 +6159,7 @@ if test x$enable_postgresql_sdbc != xno; then
 AC_MSG_ERROR([Refusing to enable MIT Kerberos 5 or GSSAPI on 
Microsoft Windows.])
 fi
 ;;
-Linux|GNU|*BSD)
+Linux|GNU|*BSD|DragonFly)
 if test $with_krb5 != no; then
 WITH_KRB5=YES
 AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 
'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
commit d8b5d223877ea743f35424582284c15444e78a15
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Fri Feb 3 11:56:48 2012 +0100

redo c16027de8423cdb6b33ce5f5f9e13fdc25b9dbeb cleaner

Also align our configure.in to the changes
Change source file (configure.in), not only generated file (configure)

diff --git a/configure.in b/configure.in
index d9979e2..640a47b 100644
--- a/configure.in
+++ b/configure.in
@@ -6143,7 +6143,7 @@ if test x$enable_postgresql_sdbc != xno; then
 # MacOS X has system MIT Kerberos 5 since 10.4
 if test $with_krb5 != no; then
 WITH_KRB5=YES
-AC_SEARCH_LIBS(com_err, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' 
com_err 'com_err -lssl -lcrypto'], [],
+AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 
'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
 [AC_MSG_ERROR([could not find function 'com_err' required for 
Kerberos 5])])
 AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 
-lroken'], [],
 [AC_MSG_ERROR([could not find function 'krb5_sendauth' 
required for Kerberos 5])])
@@ -6162,7 +6162,7 @@ if test x$enable_postgresql_sdbc != xno; then
 Linux|GNU|*BSD)
 if test $with_krb5 != no; then
 WITH_KRB5=YES
-AC_SEARCH_LIBS(com_err, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' 
com_err 'com_err -lssl -lcrypto'], [],
+AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 
'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
 [AC_MSG_ERROR([could not find function 'com_err' required for 
Kerberos 5])])
 AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 
-lroken'], [],
 [AC_MSG_ERROR([could not find function 'krb5_sendauth' 
required for Kerberos 5])])
@@ -6176,7 +6176,7 @@ if test x$enable_postgresql_sdbc != xno; then
 *)
 if test $with_krb5 = yes; then
 WITH_KRB5=YES
-AC_SEARCH_LIBS(com_err, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' 
com_err 'com_err -lssl -lcrypto'], [],
+AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 
'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
 [AC_MSG_ERROR([could not find function 'com_err' required for 
Kerberos 5])])
 AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 
-lroken'], [],
 [AC_MSG_ERROR([could not find function 'krb5_sendauth' 
required for Kerberos 5])])
diff --git a/postgresql/makefile.mk b/postgresql/makefile.mk
index 44b7e6f..2d814bd 100644
--- a/postgresql/makefile.mk
+++ b/postgresql/makefile.mk
@@ -40,14 +40,9 @@ TARFILE_NAME=postgresql-9.1.1
 TARFILE_MD5=061a9f17323117c9358ed60f33ecff78
 PATCH_FILES=\
postgresql-moz-ldap.patch \
+   postgresql-libs-leak.patch \
$(TARFILE_NAME)-libreoffice.patch \
-   $(TARFILE_NAME)-autoreconf.patch \
-postgresql-9.1.1-configure.patch
-# postgresql-9.1.1-configure.patch: move check for with_krb5 before 
with_gssapi,
-#  so that LIBS does not already contain -lgssapi_krb5 (which links against
-#  -lkrb5) when looking for symbols from -lkrb5, and within with_krb5, move
-#  com_err before krb5, so that looking with symbol com_err does not 
erroneously
-#  pick -lkrb5 (which links against -lcom_err) instead of -lcom_err
+   $(TARFILE_NAME)-autoreconf.patch
 
 .IF $(SYSTEM_POSTGRESQL) == YES
 @all:
diff --git a/postgresql/postgresql-9.1.1-autoreconf.patch 
b/postgresql/postgresql-9.1.1-autoreconf.patch
index 24e294a..ce91c51 100644
--- a/postgresql/postgresql-9.1.1-autoreconf.patch
+++ b/postgresql/postgresql-9.1.1-autoreconf.patch
@@ -1,6 +1,6 @@
 diff --recursive -u misc/build/postgresql-9.1.1/configure 
misc/build/postgresql-9.1.1.patched/configure
 --- misc/build/postgresql-9.1.1/configure  2011-09-22 23:57:57.0 
+0200
-+++ misc

[Libreoffice-commits] .: configure.in

2012-02-02 Thread Lionel Elie Mamane
 configure.in |   17 +
 1 file changed, 13 insertions(+), 4 deletions(-)

New commits:
commit 0c064e0303ed5e2f4961cc590f62bcb2151b
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 2 15:47:12 2012 +0100

postgresql: enable KerberosGSSAPI on GNU/Linux and *BSD

It is part of the default/core install of (the major distributions of) 
these OSs

diff --git a/configure.in b/configure.in
index a1b2c09..9335fdd 100644
--- a/configure.in
+++ b/configure.in
@@ -1669,10 +1669,6 @@ AC_ARG_WITH(krb5,
  By default automatically enabled on platforms
  where a good system Kerberos 5 is available.]),
 ,)
-#AC_ARG_WITH(system-redland,
-#AS_HELP_STRING([--with-system-redland],
-#[Use redland library already on system.]),,
-#[with_system_redland=$with_system_libs])
 
 AC_ARG_WITH(gssapi,
 AS_HELP_STRING([--with-gssapi],
@@ -6153,6 +6149,19 @@ if test x$enable_postgresql_sdbc != xno; then
 AC_MSG_ERROR([Refusing to enable MIT Kerberos 5 or GSSAPI on 
Microsoft Windows.])
 fi
 ;;
+Linux|GNU|*BSD)
+if test $with_krb5 != no; then
+WITH_KRB5=YES
+AC_SEARCH_LIBS(com_err, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' 
com_err 'com_err -lssl -lcrypto'], [],
+[AC_MSG_ERROR([could not find function 'com_err' required for 
Kerberos 5])])
+AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 
-lroken'], [],
+[AC_MSG_ERROR([could not find function 'krb5_sendauth' 
required for Kerberos 5])])
+fi
+if test $with_gssapi != no; then
+WITH_GSSAPI=YES
+AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi 
-lkrb5 -lcrypto'], [],
+[AC_MSG_ERROR([could not find function 'gss_init_sec_context' 
required for GSSAPI])])
+fi
 *)
 if test $with_krb5 = yes; then
 WITH_KRB5=YES
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: configure.in

2012-02-02 Thread Lionel Elie Mamane
 configure.in |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 41a3c8f14a4a8d3bbdc1fde31536e76f78003cd0
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 2 15:52:39 2012 +0100

configure.in: properly close case

diff --git a/configure.in b/configure.in
index 9335fdd..2fb8d28 100644
--- a/configure.in
+++ b/configure.in
@@ -6162,6 +6162,7 @@ if test x$enable_postgresql_sdbc != xno; then
 AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi 
-lkrb5 -lcrypto'], [],
 [AC_MSG_ERROR([could not find function 'gss_init_sec_context' 
required for GSSAPI])])
 fi
+;;
 *)
 if test $with_krb5 = yes; then
 WITH_KRB5=YES
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: connectivity/source

2012-02-02 Thread Lionel Elie Mamane
 connectivity/source/drivers/postgresql/makefile.mk |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 1f741dfeeab848424b91420390d2853572056e00
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 2 18:37:49 2012 +0100

pgsql-sdbc: put libs libpq needs *before* libpq in the link line

diff --git a/connectivity/source/drivers/postgresql/makefile.mk 
b/connectivity/source/drivers/postgresql/makefile.mk
index 3900d21..8a831a6 100644
--- a/connectivity/source/drivers/postgresql/makefile.mk
+++ b/connectivity/source/drivers/postgresql/makefile.mk
@@ -88,14 +88,13 @@ LIBPQ_DEP_LIBS += \
 LIBPQ_DEP_LIBS+=\
 $(LDAPSDKLIB)
 .ENDIF
-.ELSE
+.ELSE # $(GUI)$(COM)!=WNTMSC
 LIBPQ_LINK=$(OUTDIR)/lib/libpq.a
 LIBPQ_DEP_LIBS+=$(eq,$(OS),MACOSX $(NULL) -Wl,--as-needed)
 .INCLUDE : $(OUTDIR_FOR_BUILD)/inc/postgresql/libpq-flags.mk
 LIBPQ_DEP_LIBS+=$(eq,$(OS),MACOSX $(NULL) -Wl,--no-as-needed)
 .ENDIF
 POSTGRESQL_INC=-I$(OUTDIR)/inc/postgresql
-POSTGRESQL_LIB=
 .ENDIF # SYSTEM_POSTGRESQL
 
 CFLAGS+=$(POSTGRESQL_INC) \
@@ -161,8 +160,8 @@ SHL2STDLIBS= \
 $(SALLIB)  \
 $(SALHELPERLIB)\
 $(POSTGRESQL_LIB)  \
-$(LIBPQ_LINK)  \
-$(LIBPQ_DEP_LIBS)
+$(LIBPQ_DEP_LIBS)  \
+$(LIBPQ_LINK)
 
 SHL2LIBS=  $(LIB2TARGET)
 SHL2DEF=   $(MISC)/$(SHL2TARGET).def
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - connectivity/source

2012-02-02 Thread Lionel Elie Mamane
 connectivity/source/drivers/postgresql/makefile.mk |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 88b58e961324ff69feaec24fdc3fd03cd6f684ca
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 2 21:34:38 2012 +0100

pgsql-sdbc: move libpq link *first* in libs; hopefully will fix tinderboxes

diff --git a/connectivity/source/drivers/postgresql/makefile.mk 
b/connectivity/source/drivers/postgresql/makefile.mk
index d4df775..acf8b8c 100644
--- a/connectivity/source/drivers/postgresql/makefile.mk
+++ b/connectivity/source/drivers/postgresql/makefile.mk
@@ -155,13 +155,13 @@ LIB2OBJFILES= \
 
 
 SHL2STDLIBS= \
+$(POSTGRESQL_LIB)  \
+$(LIBPQ_LINK)  \
+$(LIBPQ_DEP_LIBS)  \
 $(CPPULIB) \
 $(CPPUHELPERLIB)   \
 $(SALLIB)  \
-$(SALHELPERLIB)\
-$(POSTGRESQL_LIB)  \
-$(LIBPQ_LINK)  \
-$(LIBPQ_DEP_LIBS)
+$(SALHELPERLIB)
 
 SHL2LIBS=  $(LIB2TARGET)
 SHL2DEF=   $(MISC)/$(SHL2TARGET).def
commit c39cec2f91205529cef237e6bae500bbaf169517
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 2 21:20:11 2012 +0100

pgsql-sdbc: libpq dependencies *after* libpq seems to be the right after all

diff --git a/connectivity/source/drivers/postgresql/makefile.mk 
b/connectivity/source/drivers/postgresql/makefile.mk
index 8a831a6..d4df775 100644
--- a/connectivity/source/drivers/postgresql/makefile.mk
+++ b/connectivity/source/drivers/postgresql/makefile.mk
@@ -160,8 +160,8 @@ SHL2STDLIBS= \
 $(SALLIB)  \
 $(SALHELPERLIB)\
 $(POSTGRESQL_LIB)  \
-$(LIBPQ_DEP_LIBS)  \
-$(LIBPQ_LINK)
+$(LIBPQ_LINK)  \
+$(LIBPQ_DEP_LIBS)
 
 SHL2LIBS=  $(LIB2TARGET)
 SHL2DEF=   $(MISC)/$(SHL2TARGET).def
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: configure.in

2012-02-02 Thread Lionel Elie Mamane
 configure.in |   18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)

New commits:
commit 4cb33a7db765f8ad06e65d24a2396f2857a9cf0d
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Feb 2 22:49:28 2012 +0100

make --with-system-libs behave as documented

make it enable --with-system-headers and --with-system-jars
also fixup lucene-analyzers.jar search path

diff --git a/configure.in b/configure.in
index 61d9bfa..6009518 100644
--- a/configure.in
+++ b/configure.in
@@ -998,15 +998,15 @@ AC_ARG_WITH(system-headers,
 AS_HELP_STRING([--with-system-headers],
 [Use headers already on system -- enables all --with-system-* flags for
  external packages whose headers are the only entities used i.e.
- boost/vigra/odbc/sane-header(s).]),
-,)
+ boost/vigra/odbc/sane-header(s).]),,
+[with_system_headers=$with_system_libs])
 
 AC_ARG_WITH(system-jars,
 AS_HELP_STRING([--without-system-jars],
 [When building with --with-system-libs, also the needed jars are 
expected
  on the system. Use this to disable that (except for the db case where
- --with-system-db *has to* imply using the db.jar from there, too).]),
-,)
+ --with-system-db *has to* imply using the db.jar from there, too).]),,
+[with_system_jars=$with_system_libs])
 
 AC_ARG_WITH(system-stdlibs,
 AS_HELP_STRING([--with-system-stdlibs],
@@ -1107,8 +1107,8 @@ AC_ARG_WITH(system-libcmis,
 
 AC_ARG_WITH(system-libcdr,
 AS_HELP_STRING([--with-system-libcdr],
-[Use libvisio already on system.]),,
-[with_system_libcdr=no])
+[Use libcdr already on system.]),,
+[with_system_libcdr=$with_system_libs])
 
 AC_ARG_WITH(system-libvisio,
 AS_HELP_STRING([--with-system-libvisio],
@@ -5930,7 +5930,11 @@ if test $with_system_lucene = yes; then
 [
   
AC_CHECK_FILE(/usr/share/java/lucene-contrib/lucene-analyzers.jar,
 [ 
LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar ],
-[ AC_MSG_ERROR(lucene-analyzers.jar replacement not found.)]
+[ AC_CHECK_FILE(/usr/share/java/lucene-analyzers.jar,
+   [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers.jar 
],
+   [ AC_MSG_ERROR(lucene-analyzers.jar replacement not found.)]
+  )
+]
   )
 ]
 )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: connectivity/source

2012-02-01 Thread Lionel Elie Mamane
 connectivity/source/drivers/postgresql/pq_databasemetadata.cxx |   23 
+++---
 1 file changed, 9 insertions(+), 14 deletions(-)

New commits:
commit 7bd9ce1fae67539f9717c9ead628bd72dffafc37
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Feb 1 18:53:41 2012 +0100

pgsql: simpler / safer check for system column

diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx 
b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index 7765086..ebe5af8 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -1389,16 +1389,11 @@ sal_Int32 typeNameToDataType( const OUString typeName, 
const OUString typtype
 return ret;
 }
 
-static bool isSystemColumn( const OUString columnName )
+namespace {
+inline bool isSystemColumn( sal_Int16 attnum )
 {
-return
-columnName.compareToAscii( oid ) == 0 ||
-columnName.compareToAscii( tableoid ) == 0 ||
-columnName.compareToAscii( xmin ) == 0 ||
-columnName.compareToAscii( cmin ) == 0 ||
-columnName.compareToAscii( xmax ) == 0 ||
-columnName.compareToAscii( cmax ) == 0 ||
-columnName.compareToAscii( ctid ) == 0;
+return attnum = 0;
+}
 }
 
 // is not exported by the postgres header
@@ -1593,7 +1588,8 @@ static void columnMetaData2DatabaseTypeDescription(
 pg_type.typtype,   // 8
 pg_attrdef.adsrc,  // 9
 pg_description.description,// 10
-pg_type.typbasetype// 11
+pg_type.typbasetype,   // 11
+pg_attribute.attnum// 12
 FROM pg_class, 
  pg_attribute LEFT JOIN pg_attrdef ON pg_attribute.attrelid = 
pg_attrdef.adrelid AND pg_attribute.attnum = pg_attrdef.adnum 
   LEFT JOIN pg_description ON 
pg_attribute.attrelid = pg_description.objoid AND 
pg_attribute.attnum=pg_description.objsubid,
@@ -1627,8 +1623,7 @@ static void columnMetaData2DatabaseTypeDescription(
 
 while( rs-next() )
 {
-OUString columnName = xRow-getString(3);
-if( m_pSettings-showSystemColumns || ! isSystemColumn( columnName ) )
+if( m_pSettings-showSystemColumns || ! isSystemColumn( 
xRow-getShort( 12 ) ) )
 {
 OUString sNewSchema( xRow-getString(1) );
 OUString sNewTable(  xRow-getString(2) );
@@ -1645,7 +1640,7 @@ static void columnMetaData2DatabaseTypeDescription(
 row[0] = m_pSettings-catalog;
 row[1] = sNewSchema;
 row[2] = sNewTable;
-row[3] = columnName;
+row[3] = xRow-getString(3);
 if( xRow-getString(8).equalsAscii( d ) )
 {
 DatabaseTypeDescription desc( domainMap[xRow-getInt(11)] );
@@ -1662,7 +1657,7 @@ static void columnMetaData2DatabaseTypeDescription(
 // row[7] BUFFER_LENGTH not used
 row[8] = scale;
 // row[9] RADIX TODO
-if( xRow-getBoolean( 6 )  ! isSystemColumn(xRow-getString(3)) )
+if( xRow-getBoolean( 6 )  ! isSystemColumn(xRow-getInt( 12 )) )
 {
 row[10] = 
OUString::valueOf(com::sun::star::sdbc::ColumnValue::NO_NULLS);
 row[17] = statics.NO;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: dbaccess/source

2012-01-31 Thread Lionel Elie Mamane
 dbaccess/source/core/api/KeySet.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit f96a392d2ee541cbaac6517b1e4f75a49f9f49f2
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Jan 31 21:32:55 2012 +0100

fdo#45453: use integers rather than booleans

for always-true and always-false tests.
Some databases have poor or no support for booleans.

diff --git a/dbaccess/source/core/api/KeySet.cxx 
b/dbaccess/source/core/api/KeySet.cxx
index a7d9abe..1903110 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -228,8 +228,8 @@ namespace
 void appendOneKeyColumnClause( const ::rtl::OUString tblName, const 
::rtl::OUString colName, ::rtl::OUStringBuffer o_buf )
 {
 static ::rtl::OUString s_sDot(RTL_CONSTASCII_USTRINGPARAM(.));
-static ::rtl::OUString s_sParam0(RTL_CONSTASCII_USTRINGPARAM( ( TRUE 
= ? AND ));
-static ::rtl::OUString s_sParam1(RTL_CONSTASCII_USTRINGPARAM( = ? OR 
TRUE = ? AND ));
+static ::rtl::OUString s_sParam0(RTL_CONSTASCII_USTRINGPARAM( ( 1 = ? 
AND ));
+static ::rtl::OUString s_sParam1(RTL_CONSTASCII_USTRINGPARAM( = ? OR 
1 = ? AND ));
 static ::rtl::OUString s_sParam2(RTL_CONSTASCII_USTRINGPARAM( IS NULL 
) ));
 o_buf.append(s_sParam0);
 o_buf.append(tblName);
@@ -247,16 +247,16 @@ void OKeySet::setOneKeyColumnParameter( sal_Int32 nPos, 
const Reference XParam
 {
 if ( _rValue.isNull() )
 {
-_xParameter-setBoolean( nPos++, false );
+_xParameter-setByte( nPos++, 0 );
 // We do the full call so that the right sqlType is passed to setNull
 setParameter( nPos++, _xParameter, _rValue, _nType, _nScale );
-_xParameter-setBoolean( nPos++, true );
+_xParameter-setByte( nPos++, 1 );
 }
 else
 {
-_xParameter-setBoolean( nPos++, true );
+_xParameter-setByte( nPos++, 1 );
 setParameter( nPos++, _xParameter, _rValue, _nType, _nScale );
-_xParameter-setBoolean( nPos++, false );
+_xParameter-setByte( nPos++, 0 );
 }
 }
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: dbaccess/source

2012-01-31 Thread Lionel Elie Mamane
 dbaccess/source/core/api/RowSetCache.cxx |   26 --
 dbaccess/source/core/api/RowSetCache.hxx |2 +-
 2 files changed, 21 insertions(+), 7 deletions(-)

New commits:
commit 5f34f5a8596335d8509fde8fd7ef1ab0418ec3be
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Jan 31 22:53:31 2012 +0100

ORowSetCache: keep m_nEndPos better up-to-date

diff --git a/dbaccess/source/core/api/RowSetCache.cxx 
b/dbaccess/source/core/api/RowSetCache.cxx
index 4cc1811..acd2908 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -452,13 +452,18 @@ void ORowSetCache::setFetchSize(sal_Int32 _nSize)
 else if (m_nStartPos  m_nPosition  m_nPosition = m_nEndPos)
 {
 sal_Int32 nNewSt = -1;
-fillMatrix(nNewSt,_nSize);
+_nSize += m_nStartPos;
+fillMatrix(nNewSt, _nSize);
 if (nNewSt = 0)
 {
 m_nStartPos = nNewSt;
-m_nEndPos =  nNewSt + _nSize;
+m_nEndPos =  _nSize;
 m_aMatrixIter = calcPosition();
 }
+else
+{
+m_nEndPos = m_nStartPos + m_nFetchSize;
+}
 }
 else
 {
@@ -746,7 +751,7 @@ sal_Bool ORowSetCache::afterLast(  )
 return sal_True;
 }
 
-sal_Bool ORowSetCache::fillMatrix(sal_Int32 _nNewStartPos,sal_Int32 
_nNewEndPos)
+sal_Bool ORowSetCache::fillMatrix(sal_Int32 _nNewStartPos, sal_Int32 
_nNewEndPos)
 {
 OSL_ENSURE(_nNewStartPos != _nNewEndPos,ORowSetCache::fillMatrix: 
StartPos and EndPos can not be equal!);
 // If _nNewStartPos = 0, then fill the whole window with new data
@@ -791,7 +796,16 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32 
_nNewStartPos,sal_Int32 _nNewEndPos
 }
 const ORowSetMatrix::iterator aEnd = aIter;
 ORowSetMatrix::iterator aRealEnd = m_pMatrix-end();
-sal_Int32 nPos = (m_nRowCount  m_nFetchSize) ? (m_nRowCount - 
m_nFetchSize) : 0;
+sal_Int32 nPos;
+if (m_nRowCount = m_nFetchSize)
+{
+nPos = m_nRowCount - m_nFetchSize;
+}
+else
+{
+nPos = 0;
+_nNewEndPos = m_nRowCount;
+}
 _nNewStartPos = nPos;
 ++nPos;
 bCheck = m_pCacheSet-absolute(nPos);
@@ -1655,6 +1669,7 @@ void ORowSetCache::deregisterOldRow(const 
TORowSetOldRowHelperRef _rRow)
 
 sal_Bool ORowSetCache::reFillMatrix(sal_Int32 _nNewStartPos,sal_Int32 
_nNewEndPos)
 {
+OSL_ENSURE( _nNewEndPos - _nNewStartPos == m_nFetchSize, reFillMatrix 
called with Start/EndPos not m_nFetchSize apart);
 const TOldRowSetRows::const_iterator aOldRowEnd = m_aOldRows.end();
 for (TOldRowSetRows::iterator aOldRowIter = m_aOldRows.begin(); 
aOldRowIter != aOldRowEnd; ++aOldRowIter)
 {
@@ -1664,8 +1679,7 @@ sal_Bool ORowSetCache::reFillMatrix(sal_Int32 
_nNewStartPos,sal_Int32 _nNewEndPo
 sal_Int32 nNewSt = _nNewStartPos;
 sal_Bool bRet = fillMatrix(nNewSt,_nNewEndPos);
 m_nStartPos = nNewSt;
-m_nEndPos = nNewSt + (_nNewEndPos - _nNewStartPos);
-OSL_ENSURE( _nNewEndPos - _nNewStartPos == m_nFetchSize, reFillMatrix 
called with Start/EndPos not m_nFetchSize apart);
+m_nEndPos = _nNewEndPos;
 
rotateCacheIterator(static_castORowSetMatrix::difference_type(m_nFetchSize+1));
 // invalidate every iterator
 return bRet;
 }
diff --git a/dbaccess/source/core/api/RowSetCache.hxx 
b/dbaccess/source/core/api/RowSetCache.hxx
index fc41495..850849f 100644
--- a/dbaccess/source/core/api/RowSetCache.hxx
+++ b/dbaccess/source/core/api/RowSetCache.hxx
@@ -111,7 +111,7 @@ namespace dbaccess
 
 sal_Bool fill(ORowSetMatrix::iterator _aIter,const 
ORowSetMatrix::const_iterator _aEnd,sal_Int32 _nPos,sal_Bool _bCheck);
 sal_Bool reFillMatrix(sal_Int32 _nNewStartPos,sal_Int32 nNewEndPos);
-sal_Bool fillMatrix(sal_Int32 _nNewStartPos,sal_Int32 _nNewEndPos);
+sal_Bool fillMatrix(sal_Int32 _nNewStartPos,sal_Int32 _nNewEndPos);
 sal_Bool moveWindow();
 // returns true when a keyset needs to be created.
 sal_Bool impl_createBookmarkSet_nothrow(const 
::com::sun::star::uno::Reference ::com::sun::star::sdbc::XResultSet  _xRs);
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: connectivity/source

2012-01-29 Thread Lionel Elie Mamane
 connectivity/source/drivers/odbcbase/OStatement.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit ab2fb9c4f95f13a1579e0ac199a109d082fbe945
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Sun Jan 29 19:48:40 2012 +0100

remove erroneously committed debug code

diff --git a/connectivity/source/drivers/odbcbase/OStatement.cxx 
b/connectivity/source/drivers/odbcbase/OStatement.cxx
index 4d963c8..6355217 100644
--- a/connectivity/source/drivers/odbcbase/OStatement.cxx
+++ b/connectivity/source/drivers/odbcbase/OStatement.cxx
@@ -828,7 +828,6 @@ void OStatement_Base::setResultSetType(sal_Int32 _par0)
 nSet =  SQL_SENSITIVE;
 break;
 default:
-fprintf(stderr, _par0=%d\n, (int) _par0);
 OSL_FAIL( OStatement_Base::setResultSetType: invalid result set 
type! );
 break;
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: dbaccess/Module_dbaccess.mk

2012-01-26 Thread Lionel Elie Mamane
 dbaccess/Module_dbaccess.mk |2 --
 1 file changed, 2 deletions(-)

New commits:
commit b86c6ac65c9fae4da5fc8faf1ed194007de37afc
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Fri Jan 27 06:57:28 2012 +0100

Disable Adabas UI, too

diff --git a/dbaccess/Module_dbaccess.mk b/dbaccess/Module_dbaccess.mk
index 73b3e58..b7788c1 100644
--- a/dbaccess/Module_dbaccess.mk
+++ b/dbaccess/Module_dbaccess.mk
@@ -29,13 +29,11 @@
 $(eval $(call gb_Module_Module,dbaccess))
 
 $(eval $(call gb_Module_add_targets,dbaccess,\
-AllLangResTarget_adabasui \
 AllLangResTarget_dba \
 AllLangResTarget_dbmm \
 AllLangResTarget_dbu \
 AllLangResTarget_sdbt \
 $(if $(filter WNT,$(GUI)),Executable_odbcconfig) \
-Library_adabasui \
 Library_dba \
 Library_dbaxml \
 Library_dbmm \
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: scp2/source

2012-01-26 Thread Lionel Elie Mamane
 scp2/source/base/file_base.scp |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit d9ebbe3e5f0beb31364df524b9136958012558cf
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Fri Jan 27 08:01:09 2012 +0100

Disable Adabas UI *installation*, too

diff --git a/scp2/source/base/file_base.scp b/scp2/source/base/file_base.scp
index d54b5e1..59b0f74 100644
--- a/scp2/source/base/file_base.scp
+++ b/scp2/source/base/file_base.scp
@@ -57,9 +57,6 @@ STD_RES_FILE( gid_File_Res_Dbp, dbp)
 STD_LIB_FILE( gid_File_Lib_Dbu, dbu )
 STD_RES_FILE( gid_File_Res_Dbu, dbu)
 
-STD_LIB_FILE( gid_File_Lib_Adabasui, adabasui )
-STD_RES_FILE( gid_File_Res_Adabasui, adabasui)
-
 STD_RES_FILE( gid_File_Res_Cnr, cnr)
 STD_RES_FILE( gid_File_Res_Sdbcl, sdbcl)
 STD_RES_FILE( gid_File_Res_Sdberr, sdberr)
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: dbaccess/source

2012-01-23 Thread Lionel Elie Mamane
 dbaccess/source/core/api/RowSetCache.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 520b8118f4a2d54e4849929d94091f29a6434346
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Jan 23 10:19:55 2012 +0100

ORowSetCache::fillMatrix(): fix case m_nFetchsize  table size

When lowering m_nStartPos, do not duplicate rows above its old value

diff --git a/dbaccess/source/core/api/RowSetCache.cxx 
b/dbaccess/source/core/api/RowSetCache.cxx
index 87655f4..4cc1811 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -796,7 +796,7 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32 
_nNewStartPos,sal_Int32 _nNewEndPos
 ++nPos;
 bCheck = m_pCacheSet-absolute(nPos);
 
-for(;bCheck  aIter != aRealEnd;++aIter)
+for(;bCheck  nPos = m_nStartPos  aIter != aRealEnd; ++aIter)
 {
 if(!aIter-is())
 *aIter = new 
ORowSetValueVector(m_xMetaData-getColumnCount());
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - connectivity/source

2012-01-23 Thread Lionel Elie Mamane
 connectivity/source/drivers/file/FResultSet.cxx |   48 
 1 file changed, 17 insertions(+), 31 deletions(-)

New commits:
commit 48c33e89fe7398c05f2af6c49c75fa2bedf36859
Author: Michael Stahl mst...@redhat.com
Date:   Thu Jan 19 15:25:07 2012 +0100

connectivity: fdo#43479: fix crash on DISTINCT:

Since commit f89f2b8bf506de0cc547ad596c75cbe1a0cf1ef1,
OResultSet::sortRows() works on the rows after SELECT, not on full rows.
So OResultSet::OpenImpl() has to be adapted to not use the mapping from
selected columns to entries rows in m_aColMapping any more; instead,
use the given ORDER BY clause for sorting.
But first extend the sort order to cover all columns, so it is no longer
necessary to call sortRows twice (this should be legal, because SQL says
the order of rows that are equal in ORDER BY columns is unspecified).

Signed-off-by: Lionel Elie Mamane lio...@mamane.lu

diff --git a/connectivity/source/drivers/file/FResultSet.cxx 
b/connectivity/source/drivers/file/FResultSet.cxx
index 43b7827..3316e37 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -1438,26 +1438,29 @@ sal_Bool OResultSet::OpenImpl()
 else
 {
 sal_Bool bDistinct = sal_False;
-sal_Bool bWasSorted = sal_False;
 OSQLParseNode *pDistinct = m_pParseTree-getChild(1);
-::std::vectorsal_Int32
aOrderbyColumnNumberSave;
-::std::vectorTAscendingOrder  aOrderbyAscendingSave;
 
+assert(m_aOrderbyColumnNumber.size() ==
+   m_aOrderbyAscending.size());
 if (pDistinct  pDistinct-getTokenID() == SQL_TOKEN_DISTINCT 
)
 {
-// Sort on all columns, saving original order for later
-if(IsSorted())
+// To eliminate duplicates we need to sort on all columns.
+// This is not a problem because the SQL spec says that the
+// order of columns that are not specified in ORDER BY
+// clause is undefined, so it doesn't hurt to sort on
+// these; pad the vectors to include them.
+for (sal_Int32 i = 1; // 0: bookmark (see 
setBoundedColumns)
+ static_castsize_t(i)  m_aColMapping.size(); ++i)
 {
-aOrderbyColumnNumberSave = m_aOrderbyColumnNumber;
-m_aOrderbyColumnNumber.clear();
-
aOrderbyAscendingSave.assign(m_aOrderbyAscending.begin(), 
m_aOrderbyAscending.end());
-bWasSorted = sal_True;
+if (::std::find(m_aOrderbyColumnNumber.begin(),
+m_aOrderbyColumnNumber.end(), i)
+== m_aOrderbyColumnNumber.end())
+{
+m_aOrderbyColumnNumber.push_back(i);
+// ASC or DESC doesn't matter
+m_aOrderbyAscending.push_back(SQL_ASC);
+}
 }
-
-// the first column is the bookmark column
-::std::vectorsal_Int32::iterator aColStart = 
(m_aColMapping.begin()+1);
-::std::copy(aColStart, 
m_aColMapping.end(),::std::back_inserter(m_aOrderbyColumnNumber));
-m_aOrderbyAscending.assign(m_aColMapping.size()-1, 
SQL_ASC);
 bDistinct = sal_True;
 }
 
@@ -1539,23 +1542,6 @@ sal_Bool OResultSet::OpenImpl()
 
m_pFileSet-get().erase(::std::remove_if(m_pFileSet-get().begin(),m_pFileSet-get().end(),
 
::std::bind2nd(::std::equal_tosal_Int32(),0))
   ,m_pFileSet-get().end());
-
-if (bWasSorted)
-{
-// Re-sort on original requested order
-m_aOrderbyColumnNumber = aOrderbyColumnNumberSave;
-
m_aOrderbyAscending.assign(aOrderbyAscendingSave.begin(), 
aOrderbyAscendingSave.end());
-
-TIntVector aEvaluationKeySet(m_pFileSet-get());
-m_pEvaluationKeySet = aEvaluationKeySet;
-sortRows();
-}
-else
-{
-m_aOrderbyColumnNumber.clear();
-m_aOrderbyAscending.clear();
-
::std::sort(m_pFileSet-get().begin(),m_pFileSet-get().end

[Libreoffice-commits] .: Branch 'libreoffice-3-4' - connectivity/source

2012-01-23 Thread Lionel Elie Mamane
 connectivity/source/drivers/file/FResultSet.cxx |   48 
 1 file changed, 17 insertions(+), 31 deletions(-)

New commits:
commit 9cd5a1b11f2f5f69d674f0b0e44352d96518013e
Author: Michael Stahl mst...@redhat.com
Date:   Thu Jan 19 15:25:07 2012 +0100

connectivity: fdo#43479: fix crash on DISTINCT:

Since commit f89f2b8bf506de0cc547ad596c75cbe1a0cf1ef1,
OResultSet::sortRows() works on the rows after SELECT, not on full rows.
So OResultSet::OpenImpl() has to be adapted to not use the mapping from
selected columns to entries rows in m_aColMapping any more; instead,
use the given ORDER BY clause for sorting.
But first extend the sort order to cover all columns, so it is no longer
necessary to call sortRows twice (this should be legal, because SQL says
the order of rows that are equal in ORDER BY columns is unspecified).

Signed-off-by: Lionel Elie Mamane lio...@mamane.lu

diff --git a/connectivity/source/drivers/file/FResultSet.cxx 
b/connectivity/source/drivers/file/FResultSet.cxx
index 71d2f3e..26baffe 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -1441,26 +1441,29 @@ sal_Bool OResultSet::OpenImpl()
 else
 {
 sal_Bool bDistinct = sal_False;
-sal_Bool bWasSorted = sal_False;
 OSQLParseNode *pDistinct = m_pParseTree-getChild(1);
-::std::vectorsal_Int32   
aOrderbyColumnNumberSave;
-::std::vectorTAscendingOrder  aOrderbyAscendingSave;
 
+assert(m_aOrderbyColumnNumber.size() ==
+   m_aOrderbyAscending.size());
 if (pDistinct  pDistinct-getTokenID() == SQL_TOKEN_DISTINCT 
)
 {
-// Sort on all columns, saving original order for later
-if(IsSorted())
+// To eliminate duplicates we need to sort on all columns.
+// This is not a problem because the SQL spec says that the
+// order of columns that are not specified in ORDER BY
+// clause is undefined, so it doesn't hurt to sort on
+// these; pad the vectors to include them.
+for (sal_Int32 i = 1; // 0: bookmark (see 
setBoundedColumns)
+ static_castsize_t(i)  m_aColMapping.size(); ++i)
 {
-aOrderbyColumnNumberSave = m_aOrderbyColumnNumber;
-m_aOrderbyColumnNumber.clear();
-
aOrderbyAscendingSave.assign(m_aOrderbyAscending.begin(), 
m_aOrderbyAscending.end());
-bWasSorted = sal_True;
+if (::std::find(m_aOrderbyColumnNumber.begin(),
+m_aOrderbyColumnNumber.end(), i)
+== m_aOrderbyColumnNumber.end())
+{
+m_aOrderbyColumnNumber.push_back(i);
+// ASC or DESC doesn't matter
+m_aOrderbyAscending.push_back(SQL_ASC);
+}
 }
-
-// the first column is the bookmark column
-::std::vectorsal_Int32::iterator aColStart = 
(m_aColMapping.begin()+1);
-::std::copy(aColStart, 
m_aColMapping.end(),::std::back_inserter(m_aOrderbyColumnNumber));
-m_aOrderbyAscending.assign(m_aColMapping.size()-1, 
SQL_ASC);
 bDistinct = sal_True;
 }
 
@@ -1542,23 +1545,6 @@ sal_Bool OResultSet::OpenImpl()
 
m_pFileSet-get().erase(::std::remove_if(m_pFileSet-get().begin(),m_pFileSet-get().end(),
 
::std::bind2nd(::std::equal_tosal_Int32(),0))
   ,m_pFileSet-get().end());
-
-if (bWasSorted)
-{
-// Re-sort on original requested order
-m_aOrderbyColumnNumber = aOrderbyColumnNumberSave;
-
m_aOrderbyAscending.assign(aOrderbyAscendingSave.begin(), 
aOrderbyAscendingSave.end());
-
-TIntVector aEvaluationKeySet(m_pFileSet-get());
-m_pEvaluationKeySet = aEvaluationKeySet;
-sortRows();
-}
-else
-{
-m_aOrderbyColumnNumber.clear();
-m_aOrderbyAscending.clear();
-
::std::sort(m_pFileSet-get().begin(),m_pFileSet-get().end

[Libreoffice-commits] .: dbaccess/source

2012-01-21 Thread Lionel Elie Mamane
 dbaccess/source/core/api/RowSetCache.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b026e5a4a17babd43cac266b06ad49e12f9aa225
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Sun Jan 22 01:35:58 2012 +0100

ORowSetCache::fillMatrix(): correct off-by-one error

Symptom: segfault.
Thanks to Julien Nabet for precise pointer to problematic code.

diff --git a/dbaccess/source/core/api/RowSetCache.cxx 
b/dbaccess/source/core/api/RowSetCache.cxx
index bcc8652..87655f4 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -760,7 +760,7 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32 
_nNewStartPos,sal_Int32 _nNewEndPos
 if ( _nNewStartPos == -1 )
 {
 aIter = m_pMatrix-begin() + (m_nEndPos - m_nStartPos);
-i = m_nEndPos;
+i = m_nEndPos + 1;
 }
 else
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 3 commits - dbaccess/source svx/source

2012-01-19 Thread Lionel Elie Mamane
 dbaccess/source/core/api/RowSetBase.cxx  |2 
 dbaccess/source/core/api/RowSetCache.cxx |  313 ---
 dbaccess/source/core/api/RowSetCache.hxx |   10 
 svx/source/fmcomp/gridctrl.cxx   |4 
 4 files changed, 178 insertions(+), 151 deletions(-)

New commits:
commit 1234d599d4ee67bd725f0513431b2d4c56c9e09d
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Jan 19 20:20:06 2012 +0100

ORowSetCache: overhaul internals

diff --git a/dbaccess/source/core/api/RowSetCache.cxx 
b/dbaccess/source/core/api/RowSetCache.cxx
index 8fc264a..bcc8652 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -443,17 +443,29 @@ void ORowSetCache::setFetchSize(sal_Int32 _nSize)
 }
 if(!m_nPosition)
 {
-sal_Int32 nNewSt = 1;
-fillMatrix(nNewSt,_nSize+1);
+sal_Int32 nNewSt = 0;
+fillMatrix(nNewSt,_nSize);
+OSL_ENSURE(nNewSt == 0, fillMatrix set new start to unexpected 
value);
 m_nStartPos = 0;
 m_nEndPos = _nSize;
 }
-else if (m_nStartPos  m_nPosition  m_nPosition  m_nEndPos)
+else if (m_nStartPos  m_nPosition  m_nPosition = m_nEndPos)
 {
 sal_Int32 nNewSt = -1;
-fillMatrix(nNewSt,_nSize+1);
-m_nStartPos = 0;
-m_nEndPos = _nSize;
+fillMatrix(nNewSt,_nSize);
+if (nNewSt = 0)
+{
+m_nStartPos = nNewSt;
+m_nEndPos =  nNewSt + _nSize;
+m_aMatrixIter = calcPosition();
+}
+}
+else
+{
+OSL_FAIL(m_nPosition not between m_nStartPos and m_nEndpos);
+// try to repair
+moveWindow();
+m_aMatrixIter = calcPosition();
 }
 }
 
@@ -737,32 +749,34 @@ sal_Bool ORowSetCache::afterLast(  )
 sal_Bool ORowSetCache::fillMatrix(sal_Int32 _nNewStartPos,sal_Int32 
_nNewEndPos)
 {
 OSL_ENSURE(_nNewStartPos != _nNewEndPos,ORowSetCache::fillMatrix: 
StartPos and EndPos can not be equal!);
-// fill the whole window with new data
+// If _nNewStartPos = 0, then fill the whole window with new data
+// Else if _nNewStartPos == -1, then fill only segment [m_nEndPos, 
_nNewEndPos)
+// Else, undefined (invalid argument)
+OSL_ENSURE( _nNewStartPos = -1, ORowSetCache::fillMatrix: invalid 
_nNewStartPos );
+
 ORowSetMatrix::iterator aIter;
 sal_Int32 i;
 sal_Bool bCheck;
 if ( _nNewStartPos == -1 )
 {
-aIter = m_pMatrix-begin() + m_nEndPos;
-i = m_nEndPos+1;
+aIter = m_pMatrix-begin() + (m_nEndPos - m_nStartPos);
+i = m_nEndPos;
 }
 else
 {
 aIter = m_pMatrix-begin();
-i = _nNewStartPos;
+i = _nNewStartPos + 1;
 }
-bCheck = m_pCacheSet-absolute(i); // -1 no need to
+bCheck = m_pCacheSet-absolute(i);
 
 
-for(;i_nNewEndPos;++i,++aIter)
+for(; i = _nNewEndPos; ++i,++aIter)
 {
 if(bCheck)
 {
 if(!aIter-is())
 *aIter = new ORowSetValueVector(m_xMetaData-getColumnCount());
 m_pCacheSet-fillValueRow(*aIter,i);
-if(!m_bRowCountFinal)
-++m_nRowCount;
 }
 else
 {   // there are no more rows found so we can fetch some before start
@@ -775,35 +789,28 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32 
_nNewStartPos,sal_Int32 _nNewEndPos
 m_nRowCount = i-1; // it can be that getRow return zero
 m_bRowCountFinal = sal_True;
 }
-if(m_nRowCount  m_nFetchSize)
+const ORowSetMatrix::iterator aEnd = aIter;
+ORowSetMatrix::iterator aRealEnd = m_pMatrix-end();
+sal_Int32 nPos = (m_nRowCount  m_nFetchSize) ? (m_nRowCount - 
m_nFetchSize) : 0;
+_nNewStartPos = nPos;
+++nPos;
+bCheck = m_pCacheSet-absolute(nPos);
+
+for(;bCheck  aIter != aRealEnd;++aIter)
 {
-ORowSetMatrix::iterator aEnd = aIter;
-ORowSetMatrix::iterator aRealEnd = m_pMatrix-end();
-sal_Int32 nPos = m_nRowCount - m_nFetchSize + 1;
-_nNewStartPos = nPos;
-bCheck = m_pCacheSet-absolute(_nNewStartPos);
-
-for(;bCheck  aIter != aRealEnd;++aIter)
-{
-if(bCheck)
-{
-if(!aIter-is())
-*aIter = new 
ORowSetValueVector(m_xMetaData-getColumnCount());
-m_pCacheSet-fillValueRow(*aIter,nPos++);
-}
-bCheck = m_pCacheSet-next();
-}
-if(aIter != aEnd)
-::std::rotate(m_pMatrix-begin(),aEnd,aRealEnd);
+if(!aIter-is())
+*aIter = new 
ORowSetValueVector(m_xMetaData-getColumnCount());
+m_pCacheSet-fillValueRow(*aIter,nPos++);
+bCheck = m_pCacheSet-next

[Libreoffice-commits] .: 2 commits - connectivity/inc dbaccess/source

2012-01-18 Thread Lionel Elie Mamane
 connectivity/inc/connectivity/dbtools.hxx |4 -
 dbaccess/source/core/api/KeySet.cxx   |   71 +-
 dbaccess/source/core/api/KeySet.hxx   |5 ++
 dbaccess/source/core/api/RowSet.hxx   |2 
 4 files changed, 59 insertions(+), 23 deletions(-)

New commits:
commit c2567a658735423948d76992ca744a4187620928
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Jan 18 12:31:06 2012 +0100

janitorial: typo in comments

diff --git a/connectivity/inc/connectivity/dbtools.hxx 
b/connectivity/inc/connectivity/dbtools.hxx
index 3555025..24f39cb 100644
--- a/connectivity/inc/connectivity/dbtools.hxx
+++ b/connectivity/inc/connectivity/dbtools.hxx
@@ -615,7 +615,7 @@ namespace dbtools
 const ::com::sun::star::uno::Reference 
::com::sun::star::task::XInteractionHandler  _rxHandler,
 const ::std::vectorbool, std::allocatorbool  
_aParametersSet = ::std::vectorbool, std::allocatorbool ());
 
-/** call the appropiate set method for the specific sql type @see 
com::sun::star::sdbc::DataType
+/** call the appropriate set method for the specific sql type @see 
com::sun::star::sdbc::DataType
 @param  _xParamsthe parameters where to set the value
 @param  parameterIndex  the index of the parameter, 1 based
 @param  x   the value to set
@@ -629,7 +629,7 @@ namespace dbtools
 sal_Int32 sqlType,
 sal_Int32 scale=0) 
throw(::com::sun::star::sdbc::SQLException, 
::com::sun::star::uno::RuntimeException);
 
-/** call the appropiate set method for the specific sql type @see 
com::sun::star::sdbc::DataType
+/** call the appropriate set method for the specific sql type @see 
com::sun::star::sdbc::DataType
 @param  _xParamsthe parameters where to set the value
 @param  parameterIndex  the index of the parameter, 1 based
 @param  x   the value to set
diff --git a/dbaccess/source/core/api/RowSet.hxx 
b/dbaccess/source/core/api/RowSet.hxx
index 40e1920..42ca4b3 100644
--- a/dbaccess/source/core/api/RowSet.hxx
+++ b/dbaccess/source/core/api/RowSet.hxx
@@ -223,7 +223,7 @@ namespace dbaccess
 void checkUpdateIterator();
 const connectivity::ORowSetValue getInsertValue(sal_Int32 
columnIndex);
 void setParameter(sal_Int32 parameterIndex, const 
connectivity::ORowSetValue x);
-// resizes the parameter vector if nescessary
+// resizes the parameter vector if necessary
 ::connectivity::ORowSetValue getParameterStorage( sal_Int32 
parameterIndex );
 
 void updateValue(sal_Int32 columnIndex,const 
connectivity::ORowSetValue x);
commit 3623701d65f92017da905f4debf5514045f502c8
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Jan 18 12:30:36 2012 +0100

fdo#44813: make the refresh query filter NULL-safe

diff --git a/dbaccess/source/core/api/KeySet.cxx 
b/dbaccess/source/core/api/KeySet.cxx
index 6024f3f..46444e9 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -223,22 +223,56 @@ void OKeySet::findTableColumnsMatching_throw(   const 
Any i_aTable,
 }
 SAL_WNODEPRECATED_DECLARATIONS_POP
 
+namespace
+{
+void appendOneKeyColumnClause( const ::rtl::OUString tblName, const 
::rtl::OUString colName, ::rtl::OUStringBuffer o_buf )
+{
+static ::rtl::OUString s_sDot(RTL_CONSTASCII_USTRINGPARAM(.));
+static ::rtl::OUString s_sParam0(RTL_CONSTASCII_USTRINGPARAM( ( TRUE 
= ? AND ));
+static ::rtl::OUString s_sParam1(RTL_CONSTASCII_USTRINGPARAM( = ? OR 
TRUE = ? AND ));
+static ::rtl::OUString s_sParam2(RTL_CONSTASCII_USTRINGPARAM( IS NULL 
) ));
+o_buf.append(s_sParam0);
+o_buf.append(tblName);
+o_buf.append(s_sDot);
+o_buf.append(colName);
+o_buf.append(s_sParam1);
+o_buf.append(tblName);
+o_buf.append(s_sDot);
+o_buf.append(colName);
+o_buf.append(s_sParam2);
+}
+}
+
+void OKeySet::setOneKeyColumnParameter( sal_Int32 nPos, const Reference 
XParameters  _xParameter, const connectivity::ORowSetValue _rValue, 
sal_Int32 _nType, sal_Int32 _nScale ) const
+{
+if ( _rValue.isNull() )
+{
+_xParameter-setBoolean( nPos++, false );
+// We do the full call so that the right sqlType is passed to setNull
+setParameter( nPos++, _xParameter, _rValue, _nType, _nScale );
+_xParameter-setBoolean( nPos++, true );
+}
+else
+{
+_xParameter-setBoolean( nPos++, true );
+setParameter( nPos++, _xParameter, _rValue, _nType, _nScale );
+_xParameter-setBoolean( nPos++, false );
+}
+}
+
 ::rtl::OUStringBuffer OKeySet::createKeyFilter()
 {
 static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM( AND ));
 const ::rtl::OUString aQuote= getIdentifierQuoteString();
 ::rtl::OUStringBuffer aFilter;
-static ::rtl

[Libreoffice-commits] .: dbaccess/source

2012-01-18 Thread Lionel Elie Mamane
 dbaccess/source/core/api/KeySet.cxx |   80 +++-
 dbaccess/source/core/api/KeySet.hxx |1 
 2 files changed, 26 insertions(+), 55 deletions(-)

New commits:
commit 773668c6ab0963f56f98270b29d595f5df7c4bb2
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Jan 18 13:10:12 2012 +0100

OKeySet: tryRefetch and refreshRow share most of their code

diff --git a/dbaccess/source/core/api/KeySet.cxx 
b/dbaccess/source/core/api/KeySet.cxx
index 46444e9..d55f075 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -881,45 +881,9 @@ void OKeySet::tryRefetch(const ORowSetRow 
_rInsertRow,bool bRefetch)
 {
 if ( bRefetch )
 {
-// we just areassign the base members
 try
 {
-Reference XParameters  xParameter(m_xStatement,UNO_QUERY);
-OSL_ENSURE(xParameter.is(),No Parameter interface!);
-xParameter-clearParameters();
-
-sal_Int32 nPos=1;
-connectivity::ORowVector ORowSetValue ::Vector::const_iterator 
aParaIter;
-connectivity::ORowVector ORowSetValue ::Vector::const_iterator 
aParaEnd;
-OUpdatedParameter::iterator aUpdateFind = 
m_aUpdatedParameter.find(m_aKeyIter-first);
-if ( aUpdateFind == m_aUpdatedParameter.end() )
-{
-aParaIter = m_aParameterValueForCache.get().begin();
-aParaEnd = m_aParameterValueForCache.get().end();
-}
-else
-{
-aParaIter = aUpdateFind-second.get().begin();
-aParaEnd = aUpdateFind-second.get().end();
-}
-
-for(++aParaIter;aParaIter != aParaEnd;++aParaIter,++nPos)
-{
-::dbtools::setObjectWithInfo( xParameter, nPos, 
aParaIter-makeAny(), aParaIter-getTypeKind() );
-}
-connectivity::ORowVector ORowSetValue ::Vector::const_iterator 
aIter2 = m_aKeyIter-second.first-get().begin();
-SelectColumnsMetaData::const_iterator aPosIter = 
(*m_pKeyColumnNames).begin();
-SelectColumnsMetaData::const_iterator aPosEnd = 
(*m_pKeyColumnNames).end();
-for(;aPosIter != aPosEnd;++aPosIter,++aIter2)
-
setOneKeyColumnParameter(nPos,xParameter,*aIter2,aPosIter-second.nType,aPosIter-second.nScale);
-aPosIter = (*m_pForeignColumnNames).begin();
-aPosEnd = (*m_pForeignColumnNames).end();
-for(;aPosIter != aPosEnd;++aPosIter,++aIter2)
-
setOneKeyColumnParameter(nPos,xParameter,*aIter2,aPosIter-second.nType,aPosIter-second.nScale);
-
-m_xSet = m_xStatement-executeQuery();
-OSL_ENSURE(m_xSet.is(),No resultset form statement!);
-bRefetch = m_xSet-next();
+bRefetch = doTryRefetch_throw();
 }
 catch(const Exception)
 {
@@ -1327,22 +1291,9 @@ sal_Bool SAL_CALL OKeySet::previous(  ) 
throw(SQLException, RuntimeException)
 return previous_checked(sal_True);
 }
 
-// 
-
-void SAL_CALL OKeySet::refreshRow() throw(SQLException, RuntimeException)
+bool OKeySet::doTryRefetch_throw()  throw(SQLException, RuntimeException)
 {
-RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, dbaccess, ocke.jans...@sun.com, 
OKeySet::refreshRow );
-if(isBeforeFirst() || isAfterLast() || !m_xStatement.is())
-return;
-
-m_xRow = NULL;
-::comphelper::disposeComponent(m_xSet);
-
-if ( m_aKeyIter-second.second.second.is() )
-{
-m_xRow = m_aKeyIter-second.second.second;
-return;
-}
-// we just areassign the base members
+// we just reassign the base members
 Reference XParameters  xParameter(m_xStatement,UNO_QUERY);
 OSL_ENSURE(xParameter.is(),No Parameter interface!);
 xParameter-clearParameters();
@@ -1379,8 +1330,27 @@ void SAL_CALL OKeySet::refreshRow() throw(SQLException, 
RuntimeException)
 
setOneKeyColumnParameter(nPos,xParameter,*aIter,aPosIter-second.nType,aPosIter-second.nScale);
 
 m_xSet = m_xStatement-executeQuery();
-OSL_ENSURE(m_xSet.is(),No resultset form statement!);
-sal_Bool bOK = m_xSet-next();
+OSL_ENSURE(m_xSet.is(),No resultset from statement!);
+return m_xSet-next()
+}
+
+// 
-
+void SAL_CALL OKeySet::refreshRow() throw(SQLException, RuntimeException)
+{
+RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, dbaccess, ocke.jans...@sun.com, 
OKeySet::refreshRow );
+if(isBeforeFirst() || isAfterLast() || !m_xStatement.is())
+return;
+
+m_xRow = NULL;
+::comphelper::disposeComponent(m_xSet);
+
+if ( m_aKeyIter-second.second.second.is() )
+{
+m_xRow = m_aKeyIter-second.second.second;
+return;
+}
+
+sal_Bool bOK = doTryRefetch_throw();
 if ( !bOK )
 {
 OKeySetMatrix::iterator aTemp

[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - dbaccess/source

2012-01-18 Thread Lionel Elie Mamane
 dbaccess/source/core/api/CacheSet.cxx  |2 
 dbaccess/source/core/api/KeySet.cxx|   85 +++--
 dbaccess/source/core/api/KeySet.hxx|5 +
 dbaccess/source/core/api/OptimisticSet.cxx |2 
 4 files changed, 65 insertions(+), 29 deletions(-)

New commits:
commit dfcf55a9de3cc928e5612117d0f9f5f3783de2ff
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Jan 18 12:30:36 2012 +0100

fdo#44813: make the refresh query filter NULL-safe

diff --git a/dbaccess/source/core/api/KeySet.cxx 
b/dbaccess/source/core/api/KeySet.cxx
index 17789ff..b41e68b 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -223,22 +223,56 @@ void OKeySet::findTableColumnsMatching_throw(   const 
Any i_aTable,
 }
 SAL_WNODEPRECATED_DECLARATIONS_POP
 
+namespace
+{
+void appendOneKeyColumnClause( const ::rtl::OUString tblName, const 
::rtl::OUString colName, ::rtl::OUStringBuffer o_buf )
+{
+static ::rtl::OUString s_sDot(RTL_CONSTASCII_USTRINGPARAM(.));
+static ::rtl::OUString s_sParam0(RTL_CONSTASCII_USTRINGPARAM( ( TRUE 
= ? AND ));
+static ::rtl::OUString s_sParam1(RTL_CONSTASCII_USTRINGPARAM( = ? OR 
TRUE = ? AND ));
+static ::rtl::OUString s_sParam2(RTL_CONSTASCII_USTRINGPARAM( IS NULL 
) ));
+o_buf.append(s_sParam0);
+o_buf.append(tblName);
+o_buf.append(s_sDot);
+o_buf.append(colName);
+o_buf.append(s_sParam1);
+o_buf.append(tblName);
+o_buf.append(s_sDot);
+o_buf.append(colName);
+o_buf.append(s_sParam2);
+}
+}
+
+void OKeySet::setOneKeyColumnParameter( sal_Int32 nPos, const Reference 
XParameters  _xParameter, const connectivity::ORowSetValue _rValue, 
sal_Int32 _nType, sal_Int32 _nScale ) const
+{
+if ( _rValue.isNull() )
+{
+_xParameter-setBoolean( nPos++, false );
+// We do the full call so that the right sqlType is passed to setNull
+setParameter( nPos++, _xParameter, _rValue, _nType, _nScale );
+_xParameter-setBoolean( nPos++, true );
+}
+else
+{
+_xParameter-setBoolean( nPos++, true );
+setParameter( nPos++, _xParameter, _rValue, _nType, _nScale );
+_xParameter-setBoolean( nPos++, false );
+}
+}
+
 ::rtl::OUStringBuffer OKeySet::createKeyFilter()
 {
 static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM( AND ));
 const ::rtl::OUString aQuote= getIdentifierQuoteString();
 ::rtl::OUStringBuffer aFilter;
-static ::rtl::OUString s_sDot(RTL_CONSTASCII_USTRINGPARAM(.));
-static ::rtl::OUString s_sParam(RTL_CONSTASCII_USTRINGPARAM( = ?));
 // create the where clause
 ReferenceXDatabaseMetaData xMeta = m_xConnection-getMetaData();
 SelectColumnsMetaData::iterator aPosEnd = m_pKeyColumnNames-end();
 for(SelectColumnsMetaData::iterator aPosIter = 
m_pKeyColumnNames-begin();aPosIter != aPosEnd;)
 {
-aFilter.append(::dbtools::quoteTableName( 
xMeta,aPosIter-second.sTableName,::dbtools::eInDataManipulation));
-aFilter.append(s_sDot);
-aFilter.append(::dbtools::quoteName( 
aQuote,aPosIter-second.sRealName));
-aFilter.append(s_sParam);
+appendOneKeyColumnClause(::dbtools::quoteTableName( 
xMeta,aPosIter-second.sTableName,::dbtools::eInDataManipulation),
+ ::dbtools::quoteName( 
aQuote,aPosIter-second.sRealName),
+ aFilter);
 ++aPosIter;
 if(aPosIter != aPosEnd)
 aFilter.append(aAnd);
@@ -276,8 +310,6 @@ void OKeySet::construct(const Reference XResultSet 
_xDriverSet,const ::rtl::O
 {
 static ::rtl::OUString aAnd(RTL_CONSTASCII_USTRINGPARAM( AND ));
 const ::rtl::OUString aQuote= getIdentifierQuoteString();
-static ::rtl::OUString s_sDot(RTL_CONSTASCII_USTRINGPARAM(.));
-static ::rtl::OUString s_sParam(RTL_CONSTASCII_USTRINGPARAM( = ?));
 const ::rtl::OUString* pIter = aSeq.getConstArray();
 const ::rtl::OUString* pEnd   = pIter + aSeq.getLength();
 for(;pIter != pEnd;++pIter)
@@ -294,12 +326,11 @@ void OKeySet::construct(const Reference XResultSet 
_xDriverSet,const ::rtl::O
 for(SelectColumnsMetaData::iterator aPosIter = 
(*m_pForeignColumnNames).begin();aPosIter != aPosEnd;++aPosIter)
 {
 // look for columns not in the source columns to use them 
as filter as well
-if ( aFilter.getLength() )
-aFilter.append(aAnd);
-aFilter.append(::dbtools::quoteName( 
aQuote,sSelectTableName));
-aFilter.append(s_sDot);
-aFilter.append(::dbtools::quoteName( 
aQuote,aPosIter-second.sRealName));
-aFilter.append(s_sParam);
+if ( aFilter.getLength() )
+aFilter.append(aAnd

[Libreoffice-commits] .: dbaccess/source

2012-01-18 Thread Lionel Elie Mamane
 dbaccess/source/core/api/KeySet.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ef08c38172f0a19063759a52dd94b70ebd962ed4
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Jan 18 13:51:14 2012 +0100

Oups... where is my brown paper bag?

diff --git a/dbaccess/source/core/api/KeySet.cxx 
b/dbaccess/source/core/api/KeySet.cxx
index d55f075..a7d9abe 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -1331,7 +1331,7 @@ bool OKeySet::doTryRefetch_throw()  throw(SQLException, 
RuntimeException)
 
 m_xSet = m_xStatement-executeQuery();
 OSL_ENSURE(m_xSet.is(),No resultset from statement!);
-return m_xSet-next()
+return m_xSet-next();
 }
 
 // 
-
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 6 commits - connectivity/source dbaccess/source svx/source

2012-01-17 Thread Lionel Elie Mamane
 connectivity/source/parse/sqlbison.y   |   16 +++-
 dbaccess/source/core/api/CacheSet.cxx  |2 +-
 dbaccess/source/core/api/KeySet.cxx|   24 
 dbaccess/source/core/api/OptimisticSet.cxx |2 +-
 dbaccess/source/core/api/RowSet.cxx|8 
 dbaccess/source/core/api/RowSet.hxx|4 ++--
 svx/source/fmcomp/gridctrl.cxx |1 +
 7 files changed, 36 insertions(+), 21 deletions(-)

New commits:
commit 8935f127d1dbe82c10db229d6cda1acfb964456c
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Jan 17 13:34:04 2012 +0100

DbGridControl::SeekCursor: show exception when seek fails (and debug build)

diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 646bf9b..9548a81 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -2470,6 +2470,7 @@ sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool 
bAbsolute)
 catch(Exception)
 {
 OSL_FAIL(DbGridControl::SeekCursor : failed ...);
+DBG_UNHANDLED_EXCEPTION();
 m_nSeekPos = -1;// kein Datensatz mehr 
vorhanden
 }
 }
commit a63d7020ce55c1b2970ba5a3ddd3f6f7067eac48
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Jan 17 09:27:40 2012 +0100

janitorial: typo in private member name

diff --git a/dbaccess/source/core/api/RowSet.cxx 
b/dbaccess/source/core/api/RowSet.cxx
index 33d1f0c..a7f834b 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -162,7 +162,7 @@ ORowSet::ORowSet( const Reference 
::com::sun::star::lang::XMultiServiceFactory
 ,m_bCommandFacetsDirty( sal_True )
 ,m_bModified(sal_False)
 ,m_bRebuildConnOnExecute(sal_False)
-,m_bIsBookmarable(sal_True)
+,m_bIsBookmarkable(sal_True)
 ,m_bNew(sal_False)
 ,m_bCanUpdateInsertedRows(sal_True)
 ,m_bOwnConnection(sal_False)
@@ -197,7 +197,7 @@ ORowSet::ORowSet( const Reference 
::com::sun::star::lang::XMultiServiceFactory
 
registerProperty(PROPERTY_SINGLESELECTQUERYCOMPOSER,PROPERTY_ID_SINGLESELECTQUERYCOMPOSER,
  nRT,m_xComposer,   ::getCppuType(reinterpret_cast 
Reference XSingleSelectQueryComposer * (NULL)));
 
 // sdbcx.ResultSet Properties
-registerProperty(PROPERTY_ISBOOKMARKABLE,   
PROPERTY_ID_ISBOOKMARKABLE, nRT,
m_bIsBookmarable,  ::getBooleanCppuType());
+registerProperty(PROPERTY_ISBOOKMARKABLE,   
PROPERTY_ID_ISBOOKMARKABLE, nRT,
m_bIsBookmarkable,  ::getBooleanCppuType());
 
registerProperty(PROPERTY_CANUPDATEINSERTEDROWS,PROPERTY_ID_CANUPDATEINSERTEDROWS,
  nRT,m_bCanUpdateInsertedRows,  
::getBooleanCppuType());
 // sdbc.ResultSet Properties
 registerProperty(PROPERTY_RESULTSETCONCURRENCY, 
PROPERTY_ID_RESULTSETCONCURRENCY,   PropertyAttribute::TRANSIENT,   
m_nResultSetConcurrency,::getCppuType(reinterpret_cast sal_Int32*(NULL)));
@@ -2736,7 +2736,7 @@ ORowSetClone::ORowSetClone( const 
::comphelper::ComponentContext _rContext, ORo
  ,m_pParent(rParent)
  ,m_nFetchDirection(rParent.m_nFetchDirection)
  ,m_nFetchSize(rParent.m_nFetchSize)
- ,m_bIsBookmarable(sal_True)
+ ,m_bIsBookmarkable(sal_True)
 {
 DBG_CTOR(ORowSetClone, NULL);
 
@@ -2813,7 +2813,7 @@ ORowSetClone::ORowSetClone( const 
::comphelper::ComponentContext _rContext, ORo
 registerProperty(PROPERTY_RESULTSETTYPE,PROPERTY_ID_RESULTSETTYPE, 
 PropertyAttribute::READONLY,m_nResultSetType,  
::getCppuType(reinterpret_cast sal_Int32*(NULL)));
 registerProperty(PROPERTY_FETCHDIRECTION,   
PROPERTY_ID_FETCHDIRECTION, PropertyAttribute::TRANSIENT,   
m_nFetchDirection, ::getCppuType(reinterpret_cast sal_Int32*(NULL)));
 registerProperty(PROPERTY_FETCHSIZE,PROPERTY_ID_FETCHSIZE, 
 PropertyAttribute::TRANSIENT,   m_nFetchSize,  
::getCppuType(reinterpret_cast sal_Int32*(NULL)));
-registerProperty(PROPERTY_ISBOOKMARKABLE,   
PROPERTY_ID_ISBOOKMARKABLE, nRT,
m_bIsBookmarable,  ::getBooleanCppuType());
+registerProperty(PROPERTY_ISBOOKMARKABLE,   
PROPERTY_ID_ISBOOKMARKABLE, nRT,
m_bIsBookmarkable,  ::getBooleanCppuType());
 }
 
 ORowSetClone::~ORowSetClone()
diff --git a/dbaccess/source/core/api/RowSet.hxx 
b/dbaccess/source/core/api/RowSet.hxx
index 891d4a2..40e1920 100644
--- a/dbaccess/source/core/api/RowSet.hxx
+++ b/dbaccess/source/core/api/RowSet.hxx
@@ -142,7 +142,7 @@ namespace dbaccess
 sal_Boolm_bCommandFacetsDirty;  // any of the 
facets which define the active command is dirty
 sal_Boolm_bModified ;
 sal_Bool

[Libreoffice-commits] .: svtools/source

2012-01-11 Thread Lionel Elie Mamane
 svtools/source/brwbox/brwbox1.cxx   |   22 +-
 svtools/source/brwbox/brwbox2.cxx   |   22 --
 svtools/source/brwbox/brwbox3.cxx   |2 +-
 svtools/source/brwbox/brwhead.cxx   |2 +-
 svtools/source/brwbox/datwin.cxx|2 +-
 svtools/source/brwbox/editbrowsebox.cxx |   12 +---
 6 files changed, 29 insertions(+), 33 deletions(-)

New commits:
commit a3261b16471995832f6791b5831c640c72948a95
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Jan 11 18:55:14 2012 +0100

fdo#44283: finish 8a17792f2e5 (Handle/invalid column ID cleanup)

diff --git a/svtools/source/brwbox/brwbox1.cxx 
b/svtools/source/brwbox/brwbox1.cxx
index cca40ce..5ddaa03 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -307,9 +307,9 @@ void BrowseBox::InsertDataColumn( sal_uInt16 nItemId, const 
XubString rText,
 
 if ( getDataWindow()-pHeaderBar )
 {
-// Handlecolumn nicht in der Headerbar
+// Handle column not in the header bar
 sal_uInt16 nHeaderPos = nPos;
-if (nHeaderPos != HEADERBAR_APPEND  !GetColumnId(0))
+if (nHeaderPos != HEADERBAR_APPEND  GetColumnId(0) == HandleColumnId 
)
 nHeaderPos--;
 getDataWindow()-pHeaderBar-InsertItem(
 nItemId, rText, nWidth, nBits, nHeaderPos );
@@ -347,7 +347,7 @@ void BrowseBox::FreezeColumn( sal_uInt16 nItemId, sal_Bool 
bFreeze )
 DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
 
 // never unfreeze the handle-column
-if ( nItemId == 0  !bFreeze )
+if ( nItemId == HandleColumnId  !bFreeze )
 return;
 
 // get the position in the current array
@@ -424,12 +424,8 @@ void BrowseBox::FreezeColumn( sal_uInt16 nItemId, sal_Bool 
bFreeze )
 
 void BrowseBox::SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos )
 {
-// never set pos of the handle-column
-if ( nColumnId == 0 )
-return;
-
-// do not move handle column
-if (nPos == 0  !(*pCols)[ 0 ]-GetId())
+// never set pos of the handle column
+if ( nColumnId == HandleColumnId )
 return;
 
 // get the position in the current array
@@ -504,7 +500,7 @@ void BrowseBox::SetColumnPos( sal_uInt16 nColumnId, 
sal_uInt16 nPos )
 if ( getDataWindow()-pHeaderBar )
 {
 sal_uInt16 nNewPos = nPos;
-if ( !GetColumnId(0) )
+if ( GetColumnId(0) == HandleColumnId )
 --nNewPos;
 getDataWindow()-pHeaderBar-MoveItem(nColumnId,nNewPos);
 }
@@ -550,7 +546,7 @@ void BrowseBox::SetColumnTitle( sal_uInt16 nItemId, const 
String rTitle )
 DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
 
 // never set title of the handle-column
-if ( nItemId == 0 )
+if ( nItemId == HandleColumnId )
 return;
 
 // get the position in the current array
@@ -2383,8 +2379,8 @@ void BrowseBox::SetMode( BrowserMode nMode )
 if ( pDataWin )
 pDataWin-Invalidate();
 
-// kein Cursor auf Handle-Column
-if ( nCurColId == 0 )
+// no cursor on handle column
+if ( nCurColId == HandleColumnId )
 nCurColId = GetColumnId( 1 );
 
 m_nCurrentMode = nMode;
diff --git a/svtools/source/brwbox/brwbox2.cxx 
b/svtools/source/brwbox/brwbox2.cxx
index 92c29de..9a4a7b2 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -416,8 +416,8 @@ void BrowseBox::DrawCursor()
 else
 bReallyHide |= ( GetCursorHideCount()  0 );
 
-// keine Cursor auf Handle-Column
-if ( nCurColId == 0 )
+// no cursor on handle column
+if ( nCurColId == HandleColumnId )
 nCurColId = GetColumnId(1);
 
 // Cursor-Rechteck berechnen
@@ -1682,8 +1682,8 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent 
rEvt )
 // DataRow?
 if ( rEvt.GetRow() = 0 )
 {
-// Zeilenselektion?
-if ( rEvt.GetColumnId() == 0 || !bColumnCursor )
+// line selection?
+if ( rEvt.GetColumnId() == HandleColumnId || !bColumnCursor )
 {
 if ( bMultiSelection )
 {
@@ -1757,7 +1757,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent 
rEvt )
 }
 else
 {
-if ( bMultiSelection  rEvt.GetColumnId() == 0 )
+if ( bMultiSelection  rEvt.GetColumnId() == HandleColumnId )
 {
 // toggle all-selection
 if ( uRow.pSel-GetSelectCount()  ( GetRowCount() / 2 ) )
@@ -1990,7 +1990,7 @@ void BrowseBox::Dispatch( sal_uInt16 nId )
 if ( bColumnCursor )
 {
 sal_uInt16 nNewId = GetColumnId(ColCount() -1);
-bDone = (nNewId != 0)  GoToColumnId( nNewId );
+bDone = nNewId != HandleColumnId  GoToColumnId( nNewId );
 break

[Libreoffice-commits] .: Branch 'libreoffice-3-5' - svtools/source

2012-01-11 Thread Lionel Elie Mamane
 svtools/source/brwbox/brwbox2.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit de89f1694b4cb2a5bf8ade020bfdef33e7135d35
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Jan 11 19:05:36 2012 +0100

fdo#44283: contination of 8a17792f2e5 (Handle/invalid column ID cleanup)

Thanks to Julien Nabet for pointer and first part of this patch

diff --git a/svtools/source/brwbox/brwbox2.cxx 
b/svtools/source/brwbox/brwbox2.cxx
index 92c29de..7fe378e 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -2001,11 +2001,13 @@ void BrowseBox::Dispatch( sal_uInt16 nId )
 {
 sal_uInt16 nNewPos = GetColumnPos( GetCurColumnId() ) + 1;
 sal_uInt16 nNewId = GetColumnId( nNewPos );
-if (nNewId != 0)// Am Zeilenende ?
+if (nNewId != BROWSER_INVALIDID)// At end of row ?
 bDone = GoToColumnId( nNewId );
 else
 {
-sal_uInt16 nColId = ( GetColumnId(0) == 0 ) ? 
GetColumnId(1) : GetColumnId(0);
+sal_uInt16 nColId = GetColumnId(0);
+if ( nColId == BROWSER_INVALIDID || nColId == 
HandleColumnId )
+nColId = GetColumnId(1);
 if ( GetRowCount() )
 bDone = ( nCurRow  GetRowCount() - 1 )  
GoToRowColumnId( nCurRow + 1, nColId );
 else if ( ColCount() )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: configure.in postgresql/makefile.mk set_soenv.in

2011-12-15 Thread Lionel Elie Mamane
 configure.in   |   62 -
 postgresql/makefile.mk |   12 -
 set_soenv.in   |2 +
 3 files changed, 74 insertions(+), 2 deletions(-)

New commits:
commit 227350eb5a9881f795e9ae499c732f0148e4ac38
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Dec 15 18:40:59 2011 +0100

Introduce optional krb5gssapi support for internal PostgreSQL

Enable it by default on MacOS X

diff --git a/configure.in b/configure.in
index 354fa52..3dbbc4b 100644
--- a/configure.in
+++ b/configure.in
@@ -1592,6 +1592,25 @@ AC_ARG_WITH(lang,
 ],
 ,)
 
+# Kerberos and GSSAPI used only by PostgreSQL as of LibO 3.5
+AC_ARG_WITH(krb5,
+AS_HELP_STRING([--with-krb5],
+[Enable MIT Kerberos 5 support in modules that support it.
+ By default automatically enabled on platforms
+ where a good system Kerberos 5 is available.]),
+,)
+#AC_ARG_WITH(system-redland,
+#AS_HELP_STRING([--with-system-redland],
+#[Use redland library already on system.]),,
+#[with_system_redland=$with_system_libs])
+
+AC_ARG_WITH(gssapi,
+AS_HELP_STRING([--with-gssapi],
+[Enable GSSAPI support in modules that support it.
+ By default automatically enabled on platforms
+ where a good system GSSAPI is available.]),
+,)
+
 dnl ===
 dnl Branding
 dnl ===
@@ -5413,12 +5432,51 @@ fi
 dnl ===
 dnl Check for PostgreSQL stuff
 dnl ===
-
 if test x$enable_ext_postgresql_sdbc = xyes; then
 if test x$enable_extension_integration = xyes; then
   SCPDEFS=$SCPDEFS -DWITH_EXTENSION_POSTGRESQL
 fi
 
+# if/when anything else than PostgreSQL uses Kerberos,
+# move this out of `test x$enable_ext_postgresql_sdbc = xyes'
+WITH_KRB5=NO
+WITH_GSSAPI=no
+case $_os in
+  Darwin)
+# MacOS X has system MIT Kerberos 5 since 10.4
+if test $with_krb5 != no; then
+  WITH_KRB5=YES
+  AC_SEARCH_LIBS(com_err, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' 
com_err 'com_err -lssl -lcrypto'], [],
+[AC_MSG_ERROR([could not find function 'com_err' required 
for Kerberos 5])])
+  AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 
-lroken'], [],
+[AC_MSG_ERROR([could not find function 'krb5_sendauth' 
required for Kerberos 5])])
+fi
+if test $with_gssapi != no; then
+  WITH_GSSAPI=YES
+  AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 
-lcrypto'], [],
+ [AC_MSG_ERROR([could not find function 
'gss_init_sec_context' required for GSSAPI])])
+fi
+   ;;
+  WINNT)
+   if test $with_krb5 = yes || $with_gssapi = yes; then
+  AC_MSG_ERROR([Refusing to enable MIT Kerberos 5 or GSSAPI on Microsoft 
Windows.])
+   fi
+  ;;
+  *)
+if test $with_krb5 = yes; then
+  WITH_KRB5=YES
+  AC_SEARCH_LIBS(com_err, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' 
com_err 'com_err -lssl -lcrypto'], [],
+[AC_MSG_ERROR([could not find function 'com_err' required 
for Kerberos 5])])
+  AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 
-lroken'], [],
+[AC_MSG_ERROR([could not find function 'krb5_sendauth' 
required for Kerberos 5])])
+fi
+if test $with_gssapi = yes; then
+  WITH_GSSAPI=YES
+  AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 
-lcrypto'], [],
+ [AC_MSG_ERROR([could not find function 
'gss_init_sec_context' required for GSSAPI])])
+fi
+esac
+
 AC_MSG_CHECKING([PostgreSQL C interface])
 if test $with_system_postgresql = yes; then
 AC_MSG_RESULT([external PostgreSQL])
@@ -5465,6 +5523,8 @@ if test x$enable_ext_postgresql_sdbc = xyes; then
 fi
 BUILD_POSTGRESQL_SDBC=YES
 fi
+AC_SUBST(WITH_KRB5)
+AC_SUBST(WITH_GSSAPI)
 AC_SUBST(BUILD_POSTGRESQL_SDBC)
 AC_SUBST(SYSTEM_POSTGRESQL)
 AC_SUBST(POSTGRESQL_INC)
diff --git a/postgresql/makefile.mk b/postgresql/makefile.mk
index e4e3969..1e1c4f4 100644
--- a/postgresql/makefile.mk
+++ b/postgresql/makefile.mk
@@ -60,15 +60,25 @@ CONFIGURE_DIR=.
 BUILD_DIR=src/interfaces/libpq
 
 CONFIGURE_ACTION = CPPFLAGS=$(SOLARINC) LDFLAGS=$(SOLARLIB) ./configure 
--without-readline --disable-shared --with-openssl
+
 .IF $(WITH_LDAP) == YES
 CONFIGURE_ACTION += --with-ldap
 .IF $(WITH_OPENLDAP) != YES
 CONFIGURE_ACTION += 
--with-includes='$(SOLARVER)$/$(INPATH)$/inc$/mozilla$/ldap' --with-mozldap
 .ENDIF
+.ENDIF # $(WITH_LDAP) == YES
+
+.IF $(WITH_KRB5) == YES
+CONFIGURE_ACTION += --with-krb5
 .ENDIF
-BUILD_ACTION = make -j$(GMAKE_MODULE_PARALLELISM) all-static-lib libpq-flags.mk
+.IF $(WITH_GSSAPI) == YES
+CONFIGURE_ACTION += --with-gssapi
 .ENDIF
 
+BUILD_ACTION = make

[Libreoffice-commits] .: Branch 'libreoffice-3-5' - postgresql/makefile.mk

2011-12-12 Thread Lionel Elie Mamane
 postgresql/makefile.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 46269163c3db74a59b9e4e46202b6e4d42228ea5
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Dec 12 15:18:40 2011 +0100

postgresql: go look for includes and libs in solver

diff --git a/postgresql/makefile.mk b/postgresql/makefile.mk
index 6f2931e..9ec3ec1 100644
--- a/postgresql/makefile.mk
+++ b/postgresql/makefile.mk
@@ -57,7 +57,7 @@ BUILD_ACTION = nmake -f win32.mak USE_SSL=1 USE_LDAP=1 
USE_MOZLDAP=1
 CONFIGURE_DIR=.
 BUILD_DIR=src/interfaces/libpq
 
-CONFIGURE_ACTION = CPPFLAGS=-I$(SOLARVER)$/$(INPATH)$/inc ./configure 
--without-readline --disable-shared --with-openssl
+CONFIGURE_ACTION = CPPFLAGS=-I$(SOLARVER)$/$(INPATH)$/inc 
-I$(SOLARVER)$/$(INPATH)$/inc$/external 
LDFLAGS=-L$(SOLARVER)$/$(INPATH)$/lib ./configure --without-readline 
--disable-shared --with-openssl
 .IF $(WITH_LDAP) == YES
 CONFIGURE_ACTION += --with-ldap
 .IF $(WITH_OPENLDAP) != YES
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: pyuno/source wizards/com

2011-12-12 Thread Lionel Elie Mamane
 pyuno/source/loader/pythonloader.py |   11 ++-
 wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py |1 -
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 7f4cb27518ec9d0916a4d6508d9f720771859c22
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Dec 12 22:12:40 2011 +0100

fix loading of python-uno module by package.module name

diff --git a/pyuno/source/loader/pythonloader.py 
b/pyuno/source/loader/pythonloader.py
index eef1bd6..7a66cfa 100644
--- a/pyuno/source/loader/pythonloader.py
+++ b/pyuno/source/loader/pythonloader.py
@@ -111,16 +111,18 @@ class Loader( XImplementationLoader, XServiceInfo, 
unohelper.Base ):
 g_loadedComponents[url] = mod
 return mod
 elif vnd.openoffice.pymodule == protocol:
-# the failure is on symbol lookup later in the parent ...
-print (Warning: Python module loading is almost certainly 
pre-broken)
 nSlash = dependent.rfind('/')
 if -1 != nSlash:
 path = unohelper.fileUrlToSystemPath( dependent[0:nSlash] )
 dependent = dependent[nSlash+1:len(dependent)]
 if not path in sys.path:
 sys.path.append( path )
-var =  __import__( dependent )
-return var
+mod =  __import__( dependent )
+path_component, dot, rest = dependent.partition('.')
+while dot == '.':
+path_component, dot, rest = rest.partition('.')
+mod = getattr(mod, path_component)
+return mod
 else:
 if DEBUG:
 print(Unknown protocol ' + protocol + ');
@@ -140,7 +142,6 @@ class Loader( XImplementationLoader, XServiceInfo, 
unohelper.Base ):
 mod = self.getModuleFromUrl( locationUrl )
 implHelper = mod.__dict__.get( g_ImplementationHelper , None )
 if DEBUG:
-print (dump stuff)
 print (Fetched ImplHelper as  + str(implHelper))
 if implHelper == None:
 return mod.getComponentFactory( implementationName, 
self.ctx.ServiceManager, regKey )
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py 
b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
index c6b1a08..37ec3b1 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
@@ -59,7 +59,6 @@ class FaxWizardDialogImpl(FaxWizardDialog):
 def startWizard(self, xMSF):
 self.running = True
 try:
-print entra
 #Number of steps on WizardDialog
 self.nMaxStep = 5
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - pyuno/source wizards/com

2011-12-12 Thread Lionel Elie Mamane
 pyuno/source/loader/pythonloader.py |   11 ++-
 wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py |1 -
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit a94660eaaad9b662812fe0d3aee7179cf41c0ad9
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Dec 12 22:12:40 2011 +0100

fix loading of python-uno module by package.module name

diff --git a/pyuno/source/loader/pythonloader.py 
b/pyuno/source/loader/pythonloader.py
index eef1bd6..7a66cfa 100644
--- a/pyuno/source/loader/pythonloader.py
+++ b/pyuno/source/loader/pythonloader.py
@@ -111,16 +111,18 @@ class Loader( XImplementationLoader, XServiceInfo, 
unohelper.Base ):
 g_loadedComponents[url] = mod
 return mod
 elif vnd.openoffice.pymodule == protocol:
-# the failure is on symbol lookup later in the parent ...
-print (Warning: Python module loading is almost certainly 
pre-broken)
 nSlash = dependent.rfind('/')
 if -1 != nSlash:
 path = unohelper.fileUrlToSystemPath( dependent[0:nSlash] )
 dependent = dependent[nSlash+1:len(dependent)]
 if not path in sys.path:
 sys.path.append( path )
-var =  __import__( dependent )
-return var
+mod =  __import__( dependent )
+path_component, dot, rest = dependent.partition('.')
+while dot == '.':
+path_component, dot, rest = rest.partition('.')
+mod = getattr(mod, path_component)
+return mod
 else:
 if DEBUG:
 print(Unknown protocol ' + protocol + ');
@@ -140,7 +142,6 @@ class Loader( XImplementationLoader, XServiceInfo, 
unohelper.Base ):
 mod = self.getModuleFromUrl( locationUrl )
 implHelper = mod.__dict__.get( g_ImplementationHelper , None )
 if DEBUG:
-print (dump stuff)
 print (Fetched ImplHelper as  + str(implHelper))
 if implHelper == None:
 return mod.getComponentFactory( implementationName, 
self.ctx.ServiceManager, regKey )
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py 
b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
index c6b1a08..37ec3b1 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
@@ -59,7 +59,6 @@ class FaxWizardDialogImpl(FaxWizardDialog):
 def startWizard(self, xMSF):
 self.running = True
 try:
-print entra
 #Number of steps on WizardDialog
 self.nMaxStep = 5
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - connectivity/source

2011-12-12 Thread Lionel Elie Mamane
 connectivity/source/drivers/postgresql/makefile.mk |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit e984a1627ed205423167066e78943f783b8e87e4
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Dec 12 23:07:03 2011 +0100

postgresql-sdbc: do not use GNU ld-specific options on MacOS X

diff --git a/connectivity/source/drivers/postgresql/makefile.mk 
b/connectivity/source/drivers/postgresql/makefile.mk
index 7506efd..3f9bfb5 100644
--- a/connectivity/source/drivers/postgresql/makefile.mk
+++ b/connectivity/source/drivers/postgresql/makefile.mk
@@ -91,10 +91,17 @@ LIBPQ_DEP_LIBS+=\
 .ENDIF
 .ELSE
 LIBPQ_LINK=$(OUTDIR)/lib/libpq.a
+.IF $(GUI)==MAC
+LIBPQ_DEP_LIBS += -Wl,-dead_strip_dylibs
+.ELSE
 LIBPQ_DEP_LIBS += -Wl,--as-needed
+.ENDIF
 .INCLUDE : $(OUTDIR_FOR_BUILD)/inc/postgresql/libpq-flags.mk
+.IF $(GUI)==MAC
+.ELSE
 LIBPQ_DEP_LIBS += -Wl,--no-as-needed
 .ENDIF
+.ENDIF
 POSTGRESQL_INC=-I$(OUTDIR)/inc/postgresql
 POSTGRESQL_LIB=
 .ENDIF # SYSTEM_POSTGRESQL
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: connectivity/source

2011-12-12 Thread Lionel Elie Mamane
 connectivity/source/drivers/postgresql/makefile.mk |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 1a658dda70d2e139d124d60d64691356c9414f3e
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Dec 12 23:07:03 2011 +0100

postgresql-sdbc: do not use GNU ld-specific options on MacOS X

diff --git a/connectivity/source/drivers/postgresql/makefile.mk 
b/connectivity/source/drivers/postgresql/makefile.mk
index 7506efd..3f9bfb5 100644
--- a/connectivity/source/drivers/postgresql/makefile.mk
+++ b/connectivity/source/drivers/postgresql/makefile.mk
@@ -91,10 +91,17 @@ LIBPQ_DEP_LIBS+=\
 .ENDIF
 .ELSE
 LIBPQ_LINK=$(OUTDIR)/lib/libpq.a
+.IF $(GUI)==MAC
+LIBPQ_DEP_LIBS += -Wl,-dead_strip_dylibs
+.ELSE
 LIBPQ_DEP_LIBS += -Wl,--as-needed
+.ENDIF
 .INCLUDE : $(OUTDIR_FOR_BUILD)/inc/postgresql/libpq-flags.mk
+.IF $(GUI)==MAC
+.ELSE
 LIBPQ_DEP_LIBS += -Wl,--no-as-needed
 .ENDIF
+.ENDIF
 POSTGRESQL_INC=-I$(OUTDIR)/inc/postgresql
 POSTGRESQL_LIB=
 .ENDIF # SYSTEM_POSTGRESQL
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - chart2/source

2011-12-12 Thread Lionel Elie Mamane
 chart2/source/view/axes/ScaleAutomatism.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 893552129e0eb82c0bfbcac750a068258720adaf
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Dec 13 04:15:27 2011 +0100

missing #include

diff --git a/chart2/source/view/axes/ScaleAutomatism.cxx 
b/chart2/source/view/axes/ScaleAutomatism.cxx
index ba10366..896caf9 100644
--- a/chart2/source/view/axes/ScaleAutomatism.cxx
+++ b/chart2/source/view/axes/ScaleAutomatism.cxx
@@ -36,6 +36,7 @@
 
 #include rtl/math.hxx
 #include tools/debug.hxx
+#include limits
 
 //.
 namespace chart
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - connectivity/source

2011-12-12 Thread Lionel Elie Mamane
 connectivity/source/drivers/postgresql/makefile.mk |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1ce79958fbaeb5fc58b0d4d525380133e4e9c1e5
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Dec 13 04:20:30 2011 +0100

postgresql-sdbc: correctly recognise MacOS X build

diff --git a/connectivity/source/drivers/postgresql/makefile.mk 
b/connectivity/source/drivers/postgresql/makefile.mk
index 3f9bfb5..c99deae 100644
--- a/connectivity/source/drivers/postgresql/makefile.mk
+++ b/connectivity/source/drivers/postgresql/makefile.mk
@@ -91,13 +91,13 @@ LIBPQ_DEP_LIBS+=\
 .ENDIF
 .ELSE
 LIBPQ_LINK=$(OUTDIR)/lib/libpq.a
-.IF $(GUI)==MAC
+.IF $(OS)==MACOSX
 LIBPQ_DEP_LIBS += -Wl,-dead_strip_dylibs
 .ELSE
 LIBPQ_DEP_LIBS += -Wl,--as-needed
 .ENDIF
 .INCLUDE : $(OUTDIR_FOR_BUILD)/inc/postgresql/libpq-flags.mk
-.IF $(GUI)==MAC
+.IF $(OS)==MACOSX
 .ELSE
 LIBPQ_DEP_LIBS += -Wl,--no-as-needed
 .ENDIF
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: configure.in

2011-12-10 Thread Lionel Elie Mamane
 configure.in |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 76fac398dd71364302a261a18d8015fd250543cd
Author: Korrawit Pruegsanusak detective.conan.1...@gmail.com
Date:   Sat Dec 3 22:13:29 2011 +0700

--with-theme is without trailing s

Signed-off-by: Lionel Elie Mamane lio...@mamane.lu

diff --git a/configure.in b/configure.in
index 951ab60..26e2fd8 100644
--- a/configure.in
+++ b/configure.in
@@ -8039,7 +8039,7 @@ WITH_THEMES=
 for theme in $with_theme; do
 case $theme in
 default|crystal|hicontrast|oxygen|tango) : ;;
-*) AC_MSG_ERROR([Unknown value for --with-themes: $theme]) ;;
+*) AC_MSG_ERROR([Unknown value for --with-theme: $theme]) ;;
 esac
 WITH_THEMES=$WITH_THEMES $theme
 SCPDEFS=$SCPDEFS -DTHEME_`echo $theme|tr '[[:lower:]]' '[[:upper:]]'`
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: solenv/gbuild

2011-12-09 Thread Lionel Elie Mamane
 solenv/gbuild/Output.mk |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 13b93f40ab2dd0777c4051996e604858c4e2fafb
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Fri Dec 9 09:17:23 2011 +0100

Allow gb_COLOR and gb_TITLES for 256color TERMs, too

diff --git a/solenv/gbuild/Output.mk b/solenv/gbuild/Output.mk
index e4b811f..ab5ec5a 100644
--- a/solenv/gbuild/Output.mk
+++ b/solenv/gbuild/Output.mk
@@ -60,8 +60,12 @@ gb_Output_BELL := $(shell echo|awk 'BEGIN { printf %c, 7 
}' -)
 # only enable colorized output if
 # - gb_COLOR is set
 # - we have a known term
+KNOWN_TERM:=Eterm aterm gnome kterm linux putty rxvt rxvt-unicode screen xterm 
xterm xtermc
+KNOWN_TERM:=$(KNOW_TERM) $(patsubst %,%-color,$(KNOWN_TERM))
+KNOWN_TERM:=$(KNOW_TERM) $(patsubst %-color,%-256color,$(KNOWN_TERM))
+KNOWN_TERM:=$(KNOW_TERM) $(patsubst %-color,%+256color,$(KNOWN_TERM))
 ifneq ($(strip $(gb_COLOR)),)
-ifneq ($(filter $(TERM),Eterm aterm gnome kterm linux rxvt rxvt-unicode screen 
xterm xterm-color xtermc),)
+ifneq ($(filter $(TERM),$(KNOWN_TERM)),)
 
 gb_Output_COLOR_RESET := $(gb_Output_ESCAPE)[0m
 gb_Output_COLOR_RESETANDESCAPE := $(gb_Output_COLOR_RESET)$(gb_Output_ESCAPE)
@@ -121,7 +125,7 @@ endif
 # - gb_TITLES is set
 # - we have a known term
 ifneq ($(strip $(gb_TITLES)),)
-ifneq ($(filter $(TERM),Eterm aterm gnome kterm rxvt rxvt-unicode screen xterm 
xterm-color),)
+ifneq ($(filter $(TERM),$(KNOWN_TERM)),)
 define gb_Output_announce_title
 $(info $(gb_Output_ESCAPE)]2;gbuild: 
$(1)$(gb_Output_BELL)$(gb_Output_ESCAPE)[A)
 endef
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch

2011-12-08 Thread Lionel Elie Mamane
 mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch |   11 
++
 1 file changed, 11 insertions(+)

New commits:
commit 85863c130ae9327f83d819c45a3a9c3de399cd1e
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Dec 8 20:35:41 2011 +0100

fix build with --enable-ext-mysql-connector --without-system-mysql

diff --git a/mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch 
b/mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch
index f013b5e..80a87c8 100644
--- a/mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch
+++ b/mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch
@@ -4,3 +4,14 @@
 -dummy
 +#define HAVE_DLFCN_H 1
 +//#define MYSQLCLIENT_STATIC_BINDING 1
+--- misc/mysql-connector-c++-1.1.0/driver/nativeapi/mysql_client_api.h 
2010-09-10 11:47:47.0 +0200
 misc/build/mysql-connector-c++-1.1.0/driver/nativeapi/mysql_client_api.h   
2011-12-08 20:22:29.0 +0100
+@@ -107,6 +107,8 @@
+ 
+ typedef MYSQL_RES * (STDCALL *ptr2mysql_use_result)(MYSQL *);
+ 
++typedef unsigned long (STDCALL *ptr2mysql_realescapestring)(MYSQL *, char *, 
const char *, unsigned long);
++
+ /* Prepared Statement stmt_* functions */
+ typedef my_ulonglong (STDCALL *ptr2mysql_stmt_affected_rows)(MYSQL_STMT *);
+ 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch

2011-12-08 Thread Lionel Elie Mamane
 mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch |   11 
++
 1 file changed, 11 insertions(+)

New commits:
commit bf162f6ba161e7157d9dac61be01cf3b72b8a6c1
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Dec 8 20:35:41 2011 +0100

fix build with --enable-ext-mysql-connector --without-system-mysql

diff --git a/mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch 
b/mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch
index f013b5e..80a87c8 100644
--- a/mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch
+++ b/mysqlcppconn/mysql-connector-c++-1.1.0-mysql-binding-dynamic.patch
@@ -4,3 +4,14 @@
 -dummy
 +#define HAVE_DLFCN_H 1
 +//#define MYSQLCLIENT_STATIC_BINDING 1
+--- misc/mysql-connector-c++-1.1.0/driver/nativeapi/mysql_client_api.h 
2010-09-10 11:47:47.0 +0200
 misc/build/mysql-connector-c++-1.1.0/driver/nativeapi/mysql_client_api.h   
2011-12-08 20:22:29.0 +0100
+@@ -107,6 +107,8 @@
+ 
+ typedef MYSQL_RES * (STDCALL *ptr2mysql_use_result)(MYSQL *);
+ 
++typedef unsigned long (STDCALL *ptr2mysql_realescapestring)(MYSQL *, char *, 
const char *, unsigned long);
++
+ /* Prepared Statement stmt_* functions */
+ typedef my_ulonglong (STDCALL *ptr2mysql_stmt_affected_rows)(MYSQL_STMT *);
+ 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: configure.in

2011-12-08 Thread Lionel Elie Mamane
 configure.in |   20 
 1 file changed, 16 insertions(+), 4 deletions(-)

New commits:
commit 4097499989f4058b9c66ed6f7fe79eb8f5543c8c
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Dec 8 23:21:49 2011 +0100

Allow Xinerama to sit in another directory than other X libraries

diff --git a/configure.in b/configure.in
index 509ce03..0228af5 100644
--- a/configure.in
+++ b/configure.in
@@ -8563,7 +8563,15 @@ if test $_os = Darwin; then
 XINERAMA_LINK=dynamic
 AC_MSG_RESULT([yes])
 elif test $_os = Linux -o $_os = FreeBSD; then
-if test -e $XLIB/libXinerama.so -a -e $XLIB/libXinerama.a; then
+if test $x_libraries = default_x_libraries; then
+XINERAMALIB=`$PKG_CONFIG --variable=libdir xinerama`
+if test x$XINERAMALIB = x; then
+   XINERAMALIB=/usr/lib
+fi
+else
+XINERAMALIB=$x_libraries
+fi
+if test -e $XINERAMALIB/libXinerama.so -a -e 
$XINERAMALIB/libXinerama.a; then
 # we have both versions, let the user decide but use the dynamic one
 # per default
 USE_XINERAMA=YES
@@ -8572,11 +8580,11 @@ elif test $_os = Linux -o $_os = FreeBSD; then
 else
 XINERAMA_LINK=static
 fi
-elif test -e $XLIB/libXinerama.so -a ! -e $XLIB/libXinerama.a; then
+elif test -e $XINERAMALIB/libXinerama.so -a ! -e 
$XINERAMALIB/libXinerama.a; then
 # we have only the dynamic version
 USE_XINERAMA=YES
 XINERAMA_LINK=dynamic
-elif test -e $XLIB/libXinerama.a; then
+elif test -e $XINERAMALIB/libXinerama.a; then
 # static version
 if echo $host_cpu | grep -E 'i[[3456]]86' 2/dev/null /dev/null; then
 USE_XINERAMA=YES
@@ -8594,7 +8602,11 @@ elif test $_os = Linux -o $_os = FreeBSD; then
 AC_MSG_RESULT([yes, with $XINERAMA_LINK linking])
 AC_CHECK_HEADER(X11/extensions/Xinerama.h, [],
 [AC_MSG_ERROR(Xinerama header not found.)], [])
-XINERAMA_EXTRA_LIBS=-L$XLIB -lXext
+XEXTLIBS=`$PKG_CONFIG --variable=libs xext`
+if test x$XEXTLIB = x; then
+   XEXTLIBS=-L$XLIB -L$XINERAMALIB -lXext
+fi
+XINERAMA_EXTRA_LIBS=$XEXTLIBS
 if test $_os = FreeBSD; then
 XINERAMA_EXTRA_LIBS=$XINERAMA_EXTRA_LIBS -lXt
 fi
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - configure.in

2011-12-08 Thread Lionel Elie Mamane
 configure.in |   20 
 1 file changed, 16 insertions(+), 4 deletions(-)

New commits:
commit 331892b21d656a2b382165bca2a9e2cc0a777ca8
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Dec 8 23:21:49 2011 +0100

Allow Xinerama to sit in another directory than other X libraries

diff --git a/configure.in b/configure.in
index 1c9a08d..44bb5e9 100644
--- a/configure.in
+++ b/configure.in
@@ -8523,7 +8523,15 @@ if test $_os = Darwin; then
 XINERAMA_LINK=dynamic
 AC_MSG_RESULT([yes])
 elif test $_os = Linux -o $_os = FreeBSD; then
-if test -e $XLIB/libXinerama.so -a -e $XLIB/libXinerama.a; then
+if test $x_libraries = default_x_libraries; then
+XINERAMALIB=`$PKG_CONFIG --variable=libdir xinerama`
+if test x$XINERAMALIB = x; then
+   XINERAMALIB=/usr/lib
+fi
+else
+XINERAMALIB=$x_libraries
+fi
+if test -e $XINERAMALIB/libXinerama.so -a -e 
$XINERAMALIB/libXinerama.a; then
 # we have both versions, let the user decide but use the dynamic one
 # per default
 USE_XINERAMA=YES
@@ -8532,11 +8540,11 @@ elif test $_os = Linux -o $_os = FreeBSD; then
 else
 XINERAMA_LINK=static
 fi
-elif test -e $XLIB/libXinerama.so -a ! -e $XLIB/libXinerama.a; then
+elif test -e $XINERAMALIB/libXinerama.so -a ! -e 
$XINERAMALIB/libXinerama.a; then
 # we have only the dynamic version
 USE_XINERAMA=YES
 XINERAMA_LINK=dynamic
-elif test -e $XLIB/libXinerama.a; then
+elif test -e $XINERAMALIB/libXinerama.a; then
 # static version
 if echo $host_cpu | grep -E 'i[[3456]]86' 2/dev/null /dev/null; then
 USE_XINERAMA=YES
@@ -8554,7 +8562,11 @@ elif test $_os = Linux -o $_os = FreeBSD; then
 AC_MSG_RESULT([yes, with $XINERAMA_LINK linking])
 AC_CHECK_HEADER(X11/extensions/Xinerama.h, [],
 [AC_MSG_ERROR(Xinerama header not found.)], [])
-XINERAMA_EXTRA_LIBS=-L$XLIB -lXext
+XEXTLIBS=`$PKG_CONFIG --variable=libs xext`
+if test x$XEXTLIB = x; then
+   XEXTLIBS=-L$XLIB -L$XINERAMALIB -lXext
+fi
+XINERAMA_EXTRA_LIBS=$XEXTLIBS
 if test $_os = FreeBSD; then
 XINERAMA_EXTRA_LIBS=$XINERAMA_EXTRA_LIBS -lXt
 fi
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: mysqlcppconn/makefile.mk solenv/inc

2011-12-08 Thread Lionel Elie Mamane
 mysqlcppconn/makefile.mk |   34 --
 solenv/inc/tg_ext.mk |   29 -
 2 files changed, 36 insertions(+), 27 deletions(-)

New commits:
commit 694627b7860fb69f115c020719c5b149d328f9ef
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Dec 8 23:56:40 2011 +0100

mysqlcppconn: force recompilation when switching between different bindings

diff --git a/mysqlcppconn/makefile.mk b/mysqlcppconn/makefile.mk
index d7fa8a6..a6534a2 100644
--- a/mysqlcppconn/makefile.mk
+++ b/mysqlcppconn/makefile.mk
@@ -27,10 +27,21 @@
 
 PRJ=.
 
-PRJNAME=mysqlcppconn
-TARGET=so_mysqlcppconn
+# distro-specific builds want to link against a particular mysql library
+# then they do not require mysql-devel package at runtime
+# So put mysql-connector-cpp/driver/nativeapi/binding_config.h into separate 
patch
+# and enable/disable MYSQLCLIENT_STATIC_BINDING according to the used mysql 
library
+.IF $(SYSTEM_MYSQL) == YES
+MYSQL_BINDING=static
+.ELSE
+MYSQL_BINDING=dynamic
+.ENDIF
 
+PRJNAME=mysqlcppconn
 EXT_PROJECT_NAME=mysql-connector-c++-1.1.0
+TARGET=so_mysqlcppconn_binding-$(MYSQL_BINDING)
+TARFILE_ROOTDIR=mysql-connector-c++-1.1.0_binding-$(MYSQL_BINDING)
+
 
 # --- Settings -
 
@@ -49,16 +60,6 @@ ADDITIONAL_FILES=\
 CONVERTFILES=\
 cppconn$/build_config.h
 
-# distro-specific builds want to link against a particular mysql library
-# then they do not require mysql-devel package at runtime
-# So put mysql-connector-cpp/driver/nativeapi/binding_config.h into separate 
patch
-# and enable/disable MYSQLCLIENT_STATIC_BINDING according to the used mysql 
library
-.IF $(SYSTEM_MYSQL) == YES
-MYSQL_BINDING=static
-.ELSE
-MYSQL_BINDING=dynamic
-.ENDIF
-
 PATCH_FILES=\
 $(TARFILE_NAME).patch \
 $(TARFILE_NAME)-mysql-binding-$(MYSQL_BINDING).patch \
@@ -66,6 +67,11 @@ PATCH_FILES=\
 
 BUILD_DIR=driver
 BUILD_ACTION = \
+   if test -e ../../lastbuild; then LASTBUILD=$$(cat ../../lastbuild); 
else LASTBUILD='$(MYSQL_BINDING)'; fi  \
+   if test $${LASTBUILD} != $(MYSQL_BINDING); then \
+   rm -f ../$(BACK_PATH)/slo/* 
../../so_built_so_mysqlcppconn_binding-$${LASTBUILD}; \
+fi  \
+echo $(MYSQL_BINDING)  ../../lastbuild  \
 cd nativeapi \
   $(MAKE) $(MFLAGS) $(CALLMACROS) \
   cd .. \
@@ -88,9 +94,9 @@ BUILD_ACTION = \
 NORMALIZE_FLAG_FILE=so_normalized_$(TARGET)
 
 $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE) : $(PACKAGE_DIR)$/$(BUILD_FLAG_FILE)
-@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(EXT_PROJECT_NAME)$/driver$/mysql_driver.h 
$(INCCOM)
+@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(TARFILE_ROOTDIR)$/driver$/mysql_driver.h 
$(INCCOM)
 -@$(MKDIRHIER) $(INCCOM)$/cppconn
-@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(EXT_PROJECT_NAME)$/cppconn$/* 
$(INCCOM)$/cppconn
+@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(TARFILE_ROOTDIR)$/cppconn$/* 
$(INCCOM)$/cppconn
 @$(TOUCH) $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE)
 
 normalize: $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE)
diff --git a/solenv/inc/tg_ext.mk b/solenv/inc/tg_ext.mk
index 0adec0c..e696054 100644
--- a/solenv/inc/tg_ext.mk
+++ b/solenv/inc/tg_ext.mk
@@ -54,10 +54,13 @@ ABS_PACKAGE_DIR:=$(MAKEDIR)/$(MISC)/build
 BACK_PATH=../../../
 #MUST match with reference (currently MISC)
 MBACK_PATH=../../
-.IF $(TARFILE_IS_FLAT) != 
-fake_root_dir=/$(TARFILE_NAME)
+fake_root_dir=/$(TARFILE_ROOTDIR)
 #MUST match fake_root_dir in directory levels
 fake_back=../
+.IF $(TARFILE_IS_FLAT) != 
+TAR_STRIP_LEVEL=0
+.ELSE
+TAR_STRIP_LEVEL=1
 .ENDIF $(TARFILE_IS_FLAT) != 
 
 TARFILE_LOCATION*=$(BACK_PATH)$(fake_back)download
@@ -106,9 +109,9 @@ clean:
 $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar.bz2
 @-$(RM) $@
 .IF $(GUI)==UNX
-@noop $(assign UNPACKCMD := sh -c bzip2 -cd 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | 
$(GNUTAR) --no-same-owner -x$(tar_verbose_switch)f - )
+@noop $(assign UNPACKCMD := sh -c bzip2 -cd 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | 
$(GNUTAR) --no-same-owner --strip-components=$(TAR_STRIP_LEVEL) 
-x$(tar_verbose_switch)f - )
 .ELSE  # $(GUI)==UNX
-@noop $(assign UNPACKCMD := bzip2 -cd 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | 
$(GNUTAR) --no-same-owner -x$(tar_verbose_switch)f - )
+@noop $(assign UNPACKCMD := bzip2 -cd 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | 
$(GNUTAR) --no-same-owner --strip-components=$(TAR_STRIP_LEVEL) 
-x$(tar_verbose_switch)f - )
 .ENDIF # $(GUI)==UNX
 @$(TYPE) $(mktmp $(UNPACKCMD))  $@.$(INPATH)
 @$(RENAME) $@.$(INPATH) $@
@@ -116,28 +119,28 @@ $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar.bz2
 $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar.Z
 @-$(RM) $@
 .IF $(GUI)==UNX
-@noop $(assign UNPACKCMD := sh -c uncompress -c 
$(TARFILE_LOCATION)/$(TARFILE_MD5

[Libreoffice-commits] .: solenv/inc

2011-12-08 Thread Lionel Elie Mamane
 solenv/inc/tg_ext.mk |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 58844404ad9c9da806b9b521d5e39af6cf78b480
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Fri Dec 9 00:37:05 2011 +0100

tg_ext: fix unpack for flat zip files

diff --git a/solenv/inc/tg_ext.mk b/solenv/inc/tg_ext.mk
index f31c340..a6335a5 100644
--- a/solenv/inc/tg_ext.mk
+++ b/solenv/inc/tg_ext.mk
@@ -58,8 +58,10 @@ fake_root_dir=/$(TARFILE_ROOTDIR)
 #MUST match fake_root_dir in directory levels
 fake_back=../
 .IF $(TARFILE_IS_FLAT) != 
+zip_dir=.
 TAR_STRIP_LEVEL=0
 .ELSE
+zip_dir=..
 TAR_STRIP_LEVEL=1
 .ENDIF $(TARFILE_IS_FLAT) != 
 
@@ -146,22 +148,22 @@ $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar
 
 $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.zip
 @-$(RM) $@
-@noop $(assign UNPACKCMD := cd ..  unzip $(unzip_quiet_switch)  -o 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).zip)
+@noop $(assign UNPACKCMD := cd $(zip_dir)  unzip $(unzip_quiet_switch)  
-o $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).zip)
 @$(TYPE) $(mktmp $(UNPACKCMD))  $@.$(INPATH)
 @$(RENAME) $@.$(INPATH) $@
 
 $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.oxt
 @-$(RM) $@
-@noop $(assign UNPACKCMD := cd ..  unzip $(unzip_quiet_switch)  -o 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).oxt)
+@noop $(assign UNPACKCMD := cd $(zip_dir)  unzip $(unzip_quiet_switch)  
-o $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).oxt)
 @$(TYPE) $(mktmp $(UNPACKCMD))  $@.$(INPATH)
 @$(RENAME) $@.$(INPATH) $@
 
 $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.jar
 @-$(RM) $@
 .IF $(OS)==SOLARIS
-@noop $(assign UNPACKCMD := cd ..  jar xf 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).jar)
+@noop $(assign UNPACKCMD := cd $(zip_dir)  jar xf 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).jar)
 .ELSE  # $(OS)==SOLARIS
-@noop $(assign UNPACKCMD := cd ..  unzip $(unzip_quiet_switch)  -o 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).jar)
+@noop $(assign UNPACKCMD := cd $(zip_dir)  unzip $(unzip_quiet_switch)  
-o $(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).jar)
 .ENDIF # $(OS)==SOLARIS
 @$(TYPE) $(mktmp $(UNPACKCMD))  $@.$(INPATH)
 @$(RENAME) $@.$(INPATH) $@
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - mysqlcppconn/makefile.mk solenv/inc

2011-12-08 Thread Lionel Elie Mamane
 mysqlcppconn/makefile.mk |   34 --
 solenv/inc/tg_ext.mk |   39 ++-
 2 files changed, 42 insertions(+), 31 deletions(-)

New commits:
commit b9e6db9be72625ff8de17c2cee5fc78d8d65957b
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Dec 8 23:56:40 2011 +0100

mysqlcppconn: force recompilation when switching between different bindings

diff --git a/mysqlcppconn/makefile.mk b/mysqlcppconn/makefile.mk
index d7fa8a6..a6534a2 100644
--- a/mysqlcppconn/makefile.mk
+++ b/mysqlcppconn/makefile.mk
@@ -27,10 +27,21 @@
 
 PRJ=.
 
-PRJNAME=mysqlcppconn
-TARGET=so_mysqlcppconn
+# distro-specific builds want to link against a particular mysql library
+# then they do not require mysql-devel package at runtime
+# So put mysql-connector-cpp/driver/nativeapi/binding_config.h into separate 
patch
+# and enable/disable MYSQLCLIENT_STATIC_BINDING according to the used mysql 
library
+.IF $(SYSTEM_MYSQL) == YES
+MYSQL_BINDING=static
+.ELSE
+MYSQL_BINDING=dynamic
+.ENDIF
 
+PRJNAME=mysqlcppconn
 EXT_PROJECT_NAME=mysql-connector-c++-1.1.0
+TARGET=so_mysqlcppconn_binding-$(MYSQL_BINDING)
+TARFILE_ROOTDIR=mysql-connector-c++-1.1.0_binding-$(MYSQL_BINDING)
+
 
 # --- Settings -
 
@@ -49,16 +60,6 @@ ADDITIONAL_FILES=\
 CONVERTFILES=\
 cppconn$/build_config.h
 
-# distro-specific builds want to link against a particular mysql library
-# then they do not require mysql-devel package at runtime
-# So put mysql-connector-cpp/driver/nativeapi/binding_config.h into separate 
patch
-# and enable/disable MYSQLCLIENT_STATIC_BINDING according to the used mysql 
library
-.IF $(SYSTEM_MYSQL) == YES
-MYSQL_BINDING=static
-.ELSE
-MYSQL_BINDING=dynamic
-.ENDIF
-
 PATCH_FILES=\
 $(TARFILE_NAME).patch \
 $(TARFILE_NAME)-mysql-binding-$(MYSQL_BINDING).patch \
@@ -66,6 +67,11 @@ PATCH_FILES=\
 
 BUILD_DIR=driver
 BUILD_ACTION = \
+   if test -e ../../lastbuild; then LASTBUILD=$$(cat ../../lastbuild); 
else LASTBUILD='$(MYSQL_BINDING)'; fi  \
+   if test $${LASTBUILD} != $(MYSQL_BINDING); then \
+   rm -f ../$(BACK_PATH)/slo/* 
../../so_built_so_mysqlcppconn_binding-$${LASTBUILD}; \
+fi  \
+echo $(MYSQL_BINDING)  ../../lastbuild  \
 cd nativeapi \
   $(MAKE) $(MFLAGS) $(CALLMACROS) \
   cd .. \
@@ -88,9 +94,9 @@ BUILD_ACTION = \
 NORMALIZE_FLAG_FILE=so_normalized_$(TARGET)
 
 $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE) : $(PACKAGE_DIR)$/$(BUILD_FLAG_FILE)
-@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(EXT_PROJECT_NAME)$/driver$/mysql_driver.h 
$(INCCOM)
+@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(TARFILE_ROOTDIR)$/driver$/mysql_driver.h 
$(INCCOM)
 -@$(MKDIRHIER) $(INCCOM)$/cppconn
-@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(EXT_PROJECT_NAME)$/cppconn$/* 
$(INCCOM)$/cppconn
+@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(TARFILE_ROOTDIR)$/cppconn$/* 
$(INCCOM)$/cppconn
 @$(TOUCH) $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE)
 
 normalize: $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE)
diff --git a/solenv/inc/tg_ext.mk b/solenv/inc/tg_ext.mk
index 0adec0c..a6335a5 100644
--- a/solenv/inc/tg_ext.mk
+++ b/solenv/inc/tg_ext.mk
@@ -54,10 +54,15 @@ ABS_PACKAGE_DIR:=$(MAKEDIR)/$(MISC)/build
 BACK_PATH=../../../
 #MUST match with reference (currently MISC)
 MBACK_PATH=../../
-.IF $(TARFILE_IS_FLAT) != 
-fake_root_dir=/$(TARFILE_NAME)
+fake_root_dir=/$(TARFILE_ROOTDIR)
 #MUST match fake_root_dir in directory levels
 fake_back=../
+.IF $(TARFILE_IS_FLAT) != 
+zip_dir=.
+TAR_STRIP_LEVEL=0
+.ELSE
+zip_dir=..
+TAR_STRIP_LEVEL=1
 .ENDIF $(TARFILE_IS_FLAT) != 
 
 TARFILE_LOCATION*=$(BACK_PATH)$(fake_back)download
@@ -106,9 +111,9 @@ clean:
 $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar.bz2
 @-$(RM) $@
 .IF $(GUI)==UNX
-@noop $(assign UNPACKCMD := sh -c bzip2 -cd 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | 
$(GNUTAR) --no-same-owner -x$(tar_verbose_switch)f - )
+@noop $(assign UNPACKCMD := sh -c bzip2 -cd 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | 
$(GNUTAR) --no-same-owner --strip-components=$(TAR_STRIP_LEVEL) 
-x$(tar_verbose_switch)f - )
 .ELSE  # $(GUI)==UNX
-@noop $(assign UNPACKCMD := bzip2 -cd 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | 
$(GNUTAR) --no-same-owner -x$(tar_verbose_switch)f - )
+@noop $(assign UNPACKCMD := bzip2 -cd 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | 
$(GNUTAR) --no-same-owner --strip-components=$(TAR_STRIP_LEVEL) 
-x$(tar_verbose_switch)f - )
 .ENDIF # $(GUI)==UNX
 @$(TYPE) $(mktmp $(UNPACKCMD))  $@.$(INPATH)
 @$(RENAME) $@.$(INPATH) $@
@@ -116,49 +121,49 @@ $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar.bz2
 $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar.Z
 @-$(RM) $@
 .IF $(GUI)==UNX
-@noop $(assign UNPACKCMD := sh -c uncompress -c

[Libreoffice-commits] .: Branch 'libreoffice-3-5' - solenv/inc

2011-12-08 Thread Lionel Elie Mamane
 solenv/inc/tg_ext.mk |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit f7c0526a120711b02ad69b68fd254fcd8f5e0f09
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Fri Dec 9 00:54:46 2011 +0100

tg_ext.ml: fix patch when filename ambiguous

diff --git a/solenv/inc/tg_ext.mk b/solenv/inc/tg_ext.mk
index a6335a5..1ab9dc6 100644
--- a/solenv/inc/tg_ext.mk
+++ b/solenv/inc/tg_ext.mk
@@ -194,9 +194,9 @@ $(PACKAGE_DIR)/$(PATCH_FLAG_FILE) : 
$(PACKAGE_DIR)/$(ADD_FILES_FLAG_FILE)
 $(COMMAND_ECHO)$(TOUCH) $@
 .ELSE  # $(PATCH_FILES)==none ||   $(PATCH_FILES)==
 .IF $(GUI)==WNT
-$(COMMAND_ECHO)cd $(PACKAGE_DIR)  $(TYPE:s/+//) 
$(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d \015 | (cd 
.$(fake_root_dir)  patch $(PATCHFLAGS) -p3 )  $(TOUCH) $(PATCH_FLAG_FILE)
+$(COMMAND_ECHO)cd $(PACKAGE_DIR)  $(TYPE:s/+//) 
$(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d \015 | (cd 
.$(fake_root_dir)  patch $(PATCHFLAGS) -p2 )  $(TOUCH) $(PATCH_FLAG_FILE)
 .ELSE   # $(GUI)==WNT
-$(COMMAND_ECHO)cd $(PACKAGE_DIR)  $(TYPE) 
$(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | (cd .$(fake_root_dir)  
$(GNUPATCH) $(PATCHFLAGS) -p3 )  $(TOUCH) $(PATCH_FLAG_FILE)
+$(COMMAND_ECHO)cd $(PACKAGE_DIR)  $(TYPE) 
$(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | (cd .$(fake_root_dir)  
$(GNUPATCH) $(PATCHFLAGS) -p2 )  $(TOUCH) $(PATCH_FLAG_FILE)
 .ENDIF  # $(GUI)==WNT
 .ENDIF # $(PATCH_FILES)==none ||   $(PATCH_FILES)==
 .IF $(T_ADDITIONAL_FILES)!=
@@ -306,10 +306,10 @@ $(MISC)/$(TARFILE_ROOTDIR).done : 
$(MISC)/$(TARFILE_MD5)-$(TARFILE_NAME).unpack
 #.IF $(my4ver:s/.//:s/,//) = 300
 #  $(COMMAND_ECHO)cd $(MISC)  ( $(TYPE:s/+//) 
$(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d \015 | patch 
$(PATCHFLAGS) -p2 )
 #.ELSE # $(my4ver:s/.//:s/,//) = 300
-$(COMMAND_ECHO)cd $(MISC)  $(TYPE:s/+//) 
$(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d \015 | (cd 
.$(fake_root_dir)  patch $(PATCHFLAGS) -p3 )
+$(COMMAND_ECHO)cd $(MISC)  $(TYPE:s/+//) 
$(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d \015 | (cd 
.$(fake_root_dir)  patch $(PATCHFLAGS) -p2 )
 #.ENDIF# $(my4ver:s/.//:s/,//) = 300
 .ELSE   # $(GUI)==WNT
-$(COMMAND_ECHO)cd $(MISC)  $(TYPE) 
$(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | ( cd .$(fake_root_dir)  
$(GNUPATCH) $(PATCHFLAGS) -p3 )
+$(COMMAND_ECHO)cd $(MISC)  $(TYPE) 
$(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | ( cd .$(fake_root_dir)  
$(GNUPATCH) $(PATCHFLAGS) -p2 )
 .ENDIF  # $(GUI)==WNT
 .IF $(CONVERTFILES)!=
 $(COMMAND_ECHO)$(CONVERT) dos  $(foreach,i,$(CONVERTFILES) 
$(MISC)/$(TARFILE_ROOTDIR)/$i)
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: solenv/inc

2011-12-08 Thread Lionel Elie Mamane
 solenv/inc/tg_ext.mk |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 0189e8881de7a48c62fdf84a9b0e9ce8668a530b
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Fri Dec 9 00:54:46 2011 +0100

tg_ext.ml: fix patch when filename ambiguous

diff --git a/solenv/inc/tg_ext.mk b/solenv/inc/tg_ext.mk
index a6335a5..1ab9dc6 100644
--- a/solenv/inc/tg_ext.mk
+++ b/solenv/inc/tg_ext.mk
@@ -194,9 +194,9 @@ $(PACKAGE_DIR)/$(PATCH_FLAG_FILE) : 
$(PACKAGE_DIR)/$(ADD_FILES_FLAG_FILE)
 $(COMMAND_ECHO)$(TOUCH) $@
 .ELSE  # $(PATCH_FILES)==none ||   $(PATCH_FILES)==
 .IF $(GUI)==WNT
-$(COMMAND_ECHO)cd $(PACKAGE_DIR)  $(TYPE:s/+//) 
$(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d \015 | (cd 
.$(fake_root_dir)  patch $(PATCHFLAGS) -p3 )  $(TOUCH) $(PATCH_FLAG_FILE)
+$(COMMAND_ECHO)cd $(PACKAGE_DIR)  $(TYPE:s/+//) 
$(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d \015 | (cd 
.$(fake_root_dir)  patch $(PATCHFLAGS) -p2 )  $(TOUCH) $(PATCH_FLAG_FILE)
 .ELSE   # $(GUI)==WNT
-$(COMMAND_ECHO)cd $(PACKAGE_DIR)  $(TYPE) 
$(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | (cd .$(fake_root_dir)  
$(GNUPATCH) $(PATCHFLAGS) -p3 )  $(TOUCH) $(PATCH_FLAG_FILE)
+$(COMMAND_ECHO)cd $(PACKAGE_DIR)  $(TYPE) 
$(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | (cd .$(fake_root_dir)  
$(GNUPATCH) $(PATCHFLAGS) -p2 )  $(TOUCH) $(PATCH_FLAG_FILE)
 .ENDIF  # $(GUI)==WNT
 .ENDIF # $(PATCH_FILES)==none ||   $(PATCH_FILES)==
 .IF $(T_ADDITIONAL_FILES)!=
@@ -306,10 +306,10 @@ $(MISC)/$(TARFILE_ROOTDIR).done : 
$(MISC)/$(TARFILE_MD5)-$(TARFILE_NAME).unpack
 #.IF $(my4ver:s/.//:s/,//) = 300
 #  $(COMMAND_ECHO)cd $(MISC)  ( $(TYPE:s/+//) 
$(BACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d \015 | patch 
$(PATCHFLAGS) -p2 )
 #.ELSE # $(my4ver:s/.//:s/,//) = 300
-$(COMMAND_ECHO)cd $(MISC)  $(TYPE:s/+//) 
$(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d \015 | (cd 
.$(fake_root_dir)  patch $(PATCHFLAGS) -p3 )
+$(COMMAND_ECHO)cd $(MISC)  $(TYPE:s/+//) 
$(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | tr -d \015 | (cd 
.$(fake_root_dir)  patch $(PATCHFLAGS) -p2 )
 #.ENDIF# $(my4ver:s/.//:s/,//) = 300
 .ELSE   # $(GUI)==WNT
-$(COMMAND_ECHO)cd $(MISC)  $(TYPE) 
$(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | ( cd .$(fake_root_dir)  
$(GNUPATCH) $(PATCHFLAGS) -p3 )
+$(COMMAND_ECHO)cd $(MISC)  $(TYPE) 
$(MBACK_PATH)$(PATH_IN_MODULE)/{$(PATCH_FILES)} | ( cd .$(fake_root_dir)  
$(GNUPATCH) $(PATCHFLAGS) -p2 )
 .ENDIF  # $(GUI)==WNT
 .IF $(CONVERTFILES)!=
 $(COMMAND_ECHO)$(CONVERT) dos  $(foreach,i,$(CONVERTFILES) 
$(MISC)/$(TARFILE_ROOTDIR)/$i)
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 4 commits - mysqlcppconn/makefile.mk solenv/inc

2011-12-08 Thread Lionel Elie Mamane
 mysqlcppconn/makefile.mk |   34 ++
 solenv/inc/tg_ext.mk |   39 +--
 2 files changed, 31 insertions(+), 42 deletions(-)

New commits:
commit e89c99ce5e5474173d354778b531f2dff8eff25e
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Fri Dec 9 01:17:19 2011 +0100

Revert mysqlcppconn: force recompilation when switching between different 
bindings

This reverts commit 694627b7860fb69f115c020719c5b149d328f9ef.

diff --git a/mysqlcppconn/makefile.mk b/mysqlcppconn/makefile.mk
index a6534a2..d7fa8a6 100644
--- a/mysqlcppconn/makefile.mk
+++ b/mysqlcppconn/makefile.mk
@@ -27,21 +27,10 @@
 
 PRJ=.
 
-# distro-specific builds want to link against a particular mysql library
-# then they do not require mysql-devel package at runtime
-# So put mysql-connector-cpp/driver/nativeapi/binding_config.h into separate 
patch
-# and enable/disable MYSQLCLIENT_STATIC_BINDING according to the used mysql 
library
-.IF $(SYSTEM_MYSQL) == YES
-MYSQL_BINDING=static
-.ELSE
-MYSQL_BINDING=dynamic
-.ENDIF
-
 PRJNAME=mysqlcppconn
-EXT_PROJECT_NAME=mysql-connector-c++-1.1.0
-TARGET=so_mysqlcppconn_binding-$(MYSQL_BINDING)
-TARFILE_ROOTDIR=mysql-connector-c++-1.1.0_binding-$(MYSQL_BINDING)
+TARGET=so_mysqlcppconn
 
+EXT_PROJECT_NAME=mysql-connector-c++-1.1.0
 
 # --- Settings -
 
@@ -60,6 +49,16 @@ ADDITIONAL_FILES=\
 CONVERTFILES=\
 cppconn$/build_config.h
 
+# distro-specific builds want to link against a particular mysql library
+# then they do not require mysql-devel package at runtime
+# So put mysql-connector-cpp/driver/nativeapi/binding_config.h into separate 
patch
+# and enable/disable MYSQLCLIENT_STATIC_BINDING according to the used mysql 
library
+.IF $(SYSTEM_MYSQL) == YES
+MYSQL_BINDING=static
+.ELSE
+MYSQL_BINDING=dynamic
+.ENDIF
+
 PATCH_FILES=\
 $(TARFILE_NAME).patch \
 $(TARFILE_NAME)-mysql-binding-$(MYSQL_BINDING).patch \
@@ -67,11 +66,6 @@ PATCH_FILES=\
 
 BUILD_DIR=driver
 BUILD_ACTION = \
-   if test -e ../../lastbuild; then LASTBUILD=$$(cat ../../lastbuild); 
else LASTBUILD='$(MYSQL_BINDING)'; fi  \
-   if test $${LASTBUILD} != $(MYSQL_BINDING); then \
-   rm -f ../$(BACK_PATH)/slo/* 
../../so_built_so_mysqlcppconn_binding-$${LASTBUILD}; \
-fi  \
-echo $(MYSQL_BINDING)  ../../lastbuild  \
 cd nativeapi \
   $(MAKE) $(MFLAGS) $(CALLMACROS) \
   cd .. \
@@ -94,9 +88,9 @@ BUILD_ACTION = \
 NORMALIZE_FLAG_FILE=so_normalized_$(TARGET)
 
 $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE) : $(PACKAGE_DIR)$/$(BUILD_FLAG_FILE)
-@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(TARFILE_ROOTDIR)$/driver$/mysql_driver.h 
$(INCCOM)
+@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(EXT_PROJECT_NAME)$/driver$/mysql_driver.h 
$(INCCOM)
 -@$(MKDIRHIER) $(INCCOM)$/cppconn
-@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(TARFILE_ROOTDIR)$/cppconn$/* 
$(INCCOM)$/cppconn
+@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(EXT_PROJECT_NAME)$/cppconn$/* 
$(INCCOM)$/cppconn
 @$(TOUCH) $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE)
 
 normalize: $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE)
diff --git a/solenv/inc/tg_ext.mk b/solenv/inc/tg_ext.mk
index e696054..0adec0c 100644
--- a/solenv/inc/tg_ext.mk
+++ b/solenv/inc/tg_ext.mk
@@ -54,13 +54,10 @@ ABS_PACKAGE_DIR:=$(MAKEDIR)/$(MISC)/build
 BACK_PATH=../../../
 #MUST match with reference (currently MISC)
 MBACK_PATH=../../
-fake_root_dir=/$(TARFILE_ROOTDIR)
+.IF $(TARFILE_IS_FLAT) != 
+fake_root_dir=/$(TARFILE_NAME)
 #MUST match fake_root_dir in directory levels
 fake_back=../
-.IF $(TARFILE_IS_FLAT) != 
-TAR_STRIP_LEVEL=0
-.ELSE
-TAR_STRIP_LEVEL=1
 .ENDIF $(TARFILE_IS_FLAT) != 
 
 TARFILE_LOCATION*=$(BACK_PATH)$(fake_back)download
@@ -109,9 +106,9 @@ clean:
 $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar.bz2
 @-$(RM) $@
 .IF $(GUI)==UNX
-@noop $(assign UNPACKCMD := sh -c bzip2 -cd 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | 
$(GNUTAR) --no-same-owner --strip-components=$(TAR_STRIP_LEVEL) 
-x$(tar_verbose_switch)f - )
+@noop $(assign UNPACKCMD := sh -c bzip2 -cd 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | 
$(GNUTAR) --no-same-owner -x$(tar_verbose_switch)f - )
 .ELSE  # $(GUI)==UNX
-@noop $(assign UNPACKCMD := bzip2 -cd 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | 
$(GNUTAR) --no-same-owner --strip-components=$(TAR_STRIP_LEVEL) 
-x$(tar_verbose_switch)f - )
+@noop $(assign UNPACKCMD := bzip2 -cd 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | 
$(GNUTAR) --no-same-owner -x$(tar_verbose_switch)f - )
 .ENDIF # $(GUI)==UNX
 @$(TYPE) $(mktmp $(UNPACKCMD))  $@.$(INPATH)
 @$(RENAME) $@.$(INPATH) $@
@@ -119,28 +116,28 @@ $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar.bz2
 $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar.Z
 @-$(RM

[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - mysqlcppconn/makefile.mk solenv/inc

2011-12-08 Thread Lionel Elie Mamane
 mysqlcppconn/makefile.mk |   34 ++
 solenv/inc/tg_ext.mk |   39 +--
 2 files changed, 31 insertions(+), 42 deletions(-)

New commits:
commit d17045d7756e22f39751352bc8778788e15cede6
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Fri Dec 9 01:18:43 2011 +0100

Revert mysqlcppconn: force recompilation when switching between different 
bindings

This reverts commit b9e6db9be72625ff8de17c2cee5fc78d8d65957b.

diff --git a/mysqlcppconn/makefile.mk b/mysqlcppconn/makefile.mk
index a6534a2..d7fa8a6 100644
--- a/mysqlcppconn/makefile.mk
+++ b/mysqlcppconn/makefile.mk
@@ -27,21 +27,10 @@
 
 PRJ=.
 
-# distro-specific builds want to link against a particular mysql library
-# then they do not require mysql-devel package at runtime
-# So put mysql-connector-cpp/driver/nativeapi/binding_config.h into separate 
patch
-# and enable/disable MYSQLCLIENT_STATIC_BINDING according to the used mysql 
library
-.IF $(SYSTEM_MYSQL) == YES
-MYSQL_BINDING=static
-.ELSE
-MYSQL_BINDING=dynamic
-.ENDIF
-
 PRJNAME=mysqlcppconn
-EXT_PROJECT_NAME=mysql-connector-c++-1.1.0
-TARGET=so_mysqlcppconn_binding-$(MYSQL_BINDING)
-TARFILE_ROOTDIR=mysql-connector-c++-1.1.0_binding-$(MYSQL_BINDING)
+TARGET=so_mysqlcppconn
 
+EXT_PROJECT_NAME=mysql-connector-c++-1.1.0
 
 # --- Settings -
 
@@ -60,6 +49,16 @@ ADDITIONAL_FILES=\
 CONVERTFILES=\
 cppconn$/build_config.h
 
+# distro-specific builds want to link against a particular mysql library
+# then they do not require mysql-devel package at runtime
+# So put mysql-connector-cpp/driver/nativeapi/binding_config.h into separate 
patch
+# and enable/disable MYSQLCLIENT_STATIC_BINDING according to the used mysql 
library
+.IF $(SYSTEM_MYSQL) == YES
+MYSQL_BINDING=static
+.ELSE
+MYSQL_BINDING=dynamic
+.ENDIF
+
 PATCH_FILES=\
 $(TARFILE_NAME).patch \
 $(TARFILE_NAME)-mysql-binding-$(MYSQL_BINDING).patch \
@@ -67,11 +66,6 @@ PATCH_FILES=\
 
 BUILD_DIR=driver
 BUILD_ACTION = \
-   if test -e ../../lastbuild; then LASTBUILD=$$(cat ../../lastbuild); 
else LASTBUILD='$(MYSQL_BINDING)'; fi  \
-   if test $${LASTBUILD} != $(MYSQL_BINDING); then \
-   rm -f ../$(BACK_PATH)/slo/* 
../../so_built_so_mysqlcppconn_binding-$${LASTBUILD}; \
-fi  \
-echo $(MYSQL_BINDING)  ../../lastbuild  \
 cd nativeapi \
   $(MAKE) $(MFLAGS) $(CALLMACROS) \
   cd .. \
@@ -94,9 +88,9 @@ BUILD_ACTION = \
 NORMALIZE_FLAG_FILE=so_normalized_$(TARGET)
 
 $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE) : $(PACKAGE_DIR)$/$(BUILD_FLAG_FILE)
-@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(TARFILE_ROOTDIR)$/driver$/mysql_driver.h 
$(INCCOM)
+@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(EXT_PROJECT_NAME)$/driver$/mysql_driver.h 
$(INCCOM)
 -@$(MKDIRHIER) $(INCCOM)$/cppconn
-@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(TARFILE_ROOTDIR)$/cppconn$/* 
$(INCCOM)$/cppconn
+@$(GNUCOPY) -r $(PACKAGE_DIR)$/$(EXT_PROJECT_NAME)$/cppconn$/* 
$(INCCOM)$/cppconn
 @$(TOUCH) $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE)
 
 normalize: $(PACKAGE_DIR)$/$(NORMALIZE_FLAG_FILE)
diff --git a/solenv/inc/tg_ext.mk b/solenv/inc/tg_ext.mk
index a6335a5..0adec0c 100644
--- a/solenv/inc/tg_ext.mk
+++ b/solenv/inc/tg_ext.mk
@@ -54,15 +54,10 @@ ABS_PACKAGE_DIR:=$(MAKEDIR)/$(MISC)/build
 BACK_PATH=../../../
 #MUST match with reference (currently MISC)
 MBACK_PATH=../../
-fake_root_dir=/$(TARFILE_ROOTDIR)
+.IF $(TARFILE_IS_FLAT) != 
+fake_root_dir=/$(TARFILE_NAME)
 #MUST match fake_root_dir in directory levels
 fake_back=../
-.IF $(TARFILE_IS_FLAT) != 
-zip_dir=.
-TAR_STRIP_LEVEL=0
-.ELSE
-zip_dir=..
-TAR_STRIP_LEVEL=1
 .ENDIF $(TARFILE_IS_FLAT) != 
 
 TARFILE_LOCATION*=$(BACK_PATH)$(fake_back)download
@@ -111,9 +106,9 @@ clean:
 $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar.bz2
 @-$(RM) $@
 .IF $(GUI)==UNX
-@noop $(assign UNPACKCMD := sh -c bzip2 -cd 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | 
$(GNUTAR) --no-same-owner --strip-components=$(TAR_STRIP_LEVEL) 
-x$(tar_verbose_switch)f - )
+@noop $(assign UNPACKCMD := sh -c bzip2 -cd 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | 
$(GNUTAR) --no-same-owner -x$(tar_verbose_switch)f - )
 .ELSE  # $(GUI)==UNX
-@noop $(assign UNPACKCMD := bzip2 -cd 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | 
$(GNUTAR) --no-same-owner --strip-components=$(TAR_STRIP_LEVEL) 
-x$(tar_verbose_switch)f - )
+@noop $(assign UNPACKCMD := bzip2 -cd 
$(TARFILE_LOCATION)/$(TARFILE_MD5)-$(TARFILE_NAME).tar.bz2 $(TARFILE_FILTER) | 
$(GNUTAR) --no-same-owner -x$(tar_verbose_switch)f - )
 .ENDIF # $(GUI)==UNX
 @$(TYPE) $(mktmp $(UNPACKCMD))  $@.$(INPATH)
 @$(RENAME) $@.$(INPATH) $@
@@ -121,49 +116,49 @@ $(MISC)/%.unpack : $(TARFILE_LOCATION2)/%.tar.bz2
 $(MISC)/%.unpack : $(TARFILE_LOCATION2

[Libreoffice-commits] .: connectivity/source

2011-12-05 Thread Lionel Elie Mamane
 connectivity/source/drivers/postgresql/makefile.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e53cf6c27fa1395983679ca2e81ead7f6fdb6e5d
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Dec 6 05:30:43 2011 +0100

pgsql-sdbc: do not use -s option to sed; GNU extension, breaks MacOS build

diff --git a/connectivity/source/drivers/postgresql/makefile.mk 
b/connectivity/source/drivers/postgresql/makefile.mk
index aa168b0..ac19cd9 100644
--- a/connectivity/source/drivers/postgresql/makefile.mk
+++ b/connectivity/source/drivers/postgresql/makefile.mk
@@ -211,7 +211,7 @@ $(DLLDEST)$/META-INF$/manifest.xml : manifest.xml
 +cp $? $@
 
 $(DLLDEST)$/description.xml : description.xml
-+sed -s -e 's/@EXTENSION_VERSION@/$(PQ_SDBC_VERSION)/'  $?  $@
++sed -e 's/@EXTENSION_VERSION@/$(PQ_SDBC_VERSION)/'  $?  $@
 
 $(DLLDEST)$/postgresql.xcu : postgresql.xcu
 rm -f $@
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source

2011-12-05 Thread Lionel Elie Mamane
 sc/source/ui/unoobj/chart2uno.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e68487b719a1690150d88b251fb3e0b9f0ff4e09
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Dec 6 08:24:34 2011 +0100

calcGlueState(): move State enum to file-global anonymous namespace

so that it can be used in templates in strict C++98.
C++11 allows local types (i.e. without linkage) to be used in templates.

diff --git a/sc/source/ui/unoobj/chart2uno.cxx 
b/sc/source/ui/unoobj/chart2uno.cxx
index 6e54996..1847bb0 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -599,6 +599,8 @@ void Chart2Positioner::glueState()
 calcGlueState(nC, nR);
 }
 
+enum State { Hole = 0, Occupied = 1, Free = 2, Glue = 3 };
+
 void Chart2Positioner::calcGlueState(SCCOL nColSize, SCROW nRowSize)
 {
 // TODO: This code can use some space optimization.  Using an array to
@@ -607,8 +609,6 @@ void Chart2Positioner::calcGlueState(SCCOL nColSize, SCROW 
nRowSize)
 
 sal_uInt32 nCR = static_castsal_uInt32(nColSize*nRowSize);
 
-enum State { Hole = 0, Occupied = 1, Free = 2, Glue = 3 };
-
 vectorState aCellStates(nCR, Hole);
 
 // Mark all referenced cells occupied.
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: connectivity/source

2011-12-04 Thread Lionel Elie Mamane
 connectivity/source/drivers/postgresql/makefile.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 402db3dceb02134860cf42af791523e7703c34dd
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Dec 5 00:09:50 2011 +0100

PostgreSQL-SDBC: increment version number

diff --git a/connectivity/source/drivers/postgresql/makefile.mk 
b/connectivity/source/drivers/postgresql/makefile.mk
index 615b26b..aa168b0 100644
--- a/connectivity/source/drivers/postgresql/makefile.mk
+++ b/connectivity/source/drivers/postgresql/makefile.mk
@@ -74,7 +74,7 @@ DLLPRE=
 
 PQ_SDBC_MAJOR=0
 PQ_SDBC_MINOR=8
-PQ_SDBC_MICRO=1
+PQ_SDBC_MICRO=2
 PQ_SDBC_VERSION=$(PQ_SDBC_MAJOR).$(PQ_SDBC_MINOR).$(PQ_SDBC_MICRO)
 
 CFLAGS+=$(POSTGRESQL_INC) \
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: configure.in

2011-12-04 Thread Lionel Elie Mamane
 configure.in |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 04f53f0714ed364177a740d9de52c497cda74064
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Dec 5 07:46:59 2011 +0100

configure.in: search for pg_config in default fink/MacPort locations

diff --git a/configure.in b/configure.in
index 5b2a01c..cf0d3cb 100644
--- a/configure.in
+++ b/configure.in
@@ -5409,7 +5409,7 @@ if test x$enable_ext_postgresql_sdbc = xyes -a 
x$enable_extension_integrati
 SYSTEM_POSTGRESQL=YES
 if test $_os = Darwin; then
supp_path=''
-   for d in /Library/PostgreSQL/9.*/bin; do
+   for d in /Library/PostgreSQL/9.*/bin /sw/opt/postgresql/9.*/bin 
/opt/local/lib/postgresql9*/bin; do
 pg_supp_path=$PATH_SEPARATOR$d$pg_supp_path
done
 fi
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - basic/source comphelper/inc

2011-12-03 Thread Lionel Elie Mamane
 basic/source/app/textedit.cxx   |7 ---
 comphelper/inc/comphelper/container.hxx |   24 +---
 2 files changed, 17 insertions(+), 14 deletions(-)

New commits:
commit d952f91d1b37cab3f634aa29a5ee84f96d4f47bd
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Sun Dec 4 08:19:40 2011 +0100

Review translation by Mike Whiteley

diff --git a/comphelper/inc/comphelper/container.hxx 
b/comphelper/inc/comphelper/container.hxx
index c64b531..53b0c31 100644
--- a/comphelper/inc/comphelper/container.hxx
+++ b/comphelper/inc/comphelper/container.hxx
@@ -41,7 +41,7 @@ namespace comphelper
 //
 //= IndexAccessIterator
 //
-/** ein Iterator, der von einem XIndexAccess ausgehend alle Elemente 
durchiteriert (pre-order)
+/** an iterator that iterates through all elements, starting from an 
XIndexAccess (pre-order)
 */
 class COMPHELPER_DLLPUBLIC IndexAccessIterator
 {
@@ -49,13 +49,12 @@ protected:
 ::com::sun::star::uno::Reference ::com::sun::star::uno::XInterface
m_xStartingPoint;
 
 ::com::sun::star::uno::Reference ::com::sun::star::uno::XInterface
m_xCurrentObject;
-// The actual object
+// The current object
 ::std::vectorsal_Int32m_arrChildIndizies;
 
-// Actually, as I move through this tree, there are elements but NO
-// GetNextSibling, so I have to remember where each child
-// is in relation to it's parent.  This is the path from the
-// root node to m_xCurrentObject
+// I'm moving through a tree, but its elements have no GetNextSibling,
+// so I have to remember where each child is in relation to its parent.
+// That is the path from the root node to m_xCurrentObject
 
 ::rtl::OUString m_ustrProperty;
 // The Name of the requested property
@@ -72,11 +71,11 @@ public:
 protected:
 virtual sal_Bool ShouldHandleElement(const 
::com::sun::star::uno::Reference ::com::sun::star::uno::XInterface 
/*rElement*/) { return sal_True; }
 
-// So we can exclude certain elements, which are expected
-// if this returns sal_True. If so, this element will be returned,
-// which also allows us to return additional information.
+// This can be used to exclude certain elements; elements for which
+// this function returns sal_True will be simply skipped.
+// If this element is returned from Next(), then one can get
+// here get a little more information on the element.
 // That's why this method is not const.
-
 virtual sal_Bool ShouldStepInto(const ::com::sun::star::uno::Reference 
::com::sun::star::uno::XInterface /*xContainer*/) const { return sal_True; }
 };
 
commit 9f8d1f6b46d7a6be51e46bdde935a1c804baf228
Author: Mike Whiteley m...@whiteley.org
Date:   Thu Dec 1 19:13:20 2011 -0800

translated some comments from German to English

diff --git a/basic/source/app/textedit.cxx b/basic/source/app/textedit.cxx
index ad66db9..9bdbf8c 100644
--- a/basic/source/app/textedit.cxx
+++ b/basic/source/app/textedit.cxx
@@ -384,11 +384,12 @@ IMPL_LINK( TextEditImp, SyntaxTimerHdl, Timer *, EMPTYARG 
)
 else
 pTextEngine-SetUpdateMode( sal_True ); // ! With VDev
 
-// SetUpdateMode( sal_True ) soll kein Modify setzen
+// SetUpdateMode (sal_True ) shouldn't set Modify
 pTextEngine-SetModified( bWasModified );
 
-// SyntaxTimerHdl wird gerufen, wenn Text-Aenderung
-// = gute Gelegenheit, Textbreite zu ermitteln!
+// SyntaxTimerHdl will be called when the text changes
+// = Good opportunity to get the text width
+
 bHighlightning = sal_False;
 
 if ( aSyntaxLineTable.First() )
diff --git a/comphelper/inc/comphelper/container.hxx 
b/comphelper/inc/comphelper/container.hxx
index f0466fe..c64b531 100644
--- a/comphelper/inc/comphelper/container.hxx
+++ b/comphelper/inc/comphelper/container.hxx
@@ -49,15 +49,16 @@ protected:
 ::com::sun::star::uno::Reference ::com::sun::star::uno::XInterface
m_xStartingPoint;
 
 ::com::sun::star::uno::Reference ::com::sun::star::uno::XInterface
m_xCurrentObject;
-// das aktuelle Objekt
+// The actual object
 ::std::vectorsal_Int32m_arrChildIndizies;
-// ich bewege mich eigentlich durch einen Baum, dummerweise haben 
dessen
-// Elemente aber kein GetNextSibling, also muss ich mir merken, wo die 
Childs
-// innerhalb ihres Parents sitzen (das ist sozusagen der Pfad von der 
Wurzel
-// zu m_xCurrentObject
+
+// Actually, as I move through this tree, there are elements but NO
+// GetNextSibling, so I have to remember where each child
+// is in relation to it's parent.  This is the path from the
+// root node to m_xCurrentObject
 
 ::rtl::OUString m_ustrProperty;
-// der

[Libreoffice-commits] .: 2 commits - configure.in connectivity/prj connectivity/source postgresql/makefile.mk postgresql/prj

2011-12-01 Thread Lionel Elie Mamane
 configure.in   |   44 +++
 connectivity/prj/build.lst |2 
 connectivity/source/drivers/postgresql/makefile.mk |7 +
 postgresql/makefile.mk |   81 +
 postgresql/prj/build.lst   |3 
 postgresql/prj/d.lst   |7 +
 6 files changed, 127 insertions(+), 17 deletions(-)

New commits:
commit 44ec239eba3b652fc8dbe1e0eb66c7f9ed018137
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Dec 1 21:59:09 2011 +0100

Internal libpq (PostgreSQL client lib)

diff --git a/configure.in b/configure.in
index 796c5f1..890ec7b 100644
--- a/configure.in
+++ b/configure.in
@@ -5403,7 +5403,7 @@ dnl 
===
 if test x$enable_ext_postgresql_sdbc = xyes -a 
x$enable_extension_integration != xno; then
 SCPDEFS=$SCPDEFS -DWITH_EXTENSION_POSTGRESQL
 
-AC_MSG_CHECKING([for PostgreSQL prerequisites])
+AC_MSG_CHECKING([PostgreSQL C interface])
 if test $with_system_postgresql = yes; then
 AC_MSG_RESULT([external PostgreSQL])
 SYSTEM_POSTGRESQL=YES
@@ -5420,27 +5420,33 @@ if test x$enable_ext_postgresql_sdbc = xyes -a 
x$enable_extension_integrati
 POSTGRESQL_INC=-I$(${PGCONFIG} --includedir)
 POSTGRESQL_LIB=-L$(${PGCONFIG} --libdir)
 else
-SYSTEM_POSTGRESQL=NO
 if test -n $with_libpq_path; then
+SYSTEM_POSTGRESQL=YES
 AC_MSG_RESULT([external libpq])
 POSTGRESQL_LIB=-L${with_libpq_path}/lib/
 POSTGRESQL_INC=-I${with_libpq_path}/include/
 else
-AC_MSG_ERROR([not given. Please specify either 
--with-system-postgresql or --with-libpq-path])
+SYSTEM_POSTGRESQL=NO
+AC_MSG_RESULT([internal])
+POSTGRESQL_LIB=
+POSTGRESQL_INC=@@OVERRIDE_ME@@
+BUILD_TYPE=$BUILD_TYPE POSTGRESQL
 fi
 fi
-AC_MSG_CHECKING([for PostgreSQL C interface])
-save_CFLAGS=$CFLAGS
-save_CPPFLAGS=$CPPFLAGS
-save_LIBS=$LIBS
-CPPFLAGS=${CPPFLAGS} ${POSTGRESQL_INC}
-LIBS=${LIBS} ${POSTGRESQL_LIB}
-AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], 
[])
-AC_CHECK_LIB(pq, PQconnectdbParams, [],
-[AC_MSG_ERROR(libpq not found or too old. Need = 9.0)], [])
-CFLAGS=$save_CFLAGS
-CPPFLAGS=$save_CPPFLAGS
-LIBS=$save_LIBS
+if test ${SYSTEM_POSTGRESQL} = YES; then
+AC_MSG_NOTICE([checking system PostgreSQL prerequisites])
+save_CFLAGS=$CFLAGS
+save_CPPFLAGS=$CPPFLAGS
+save_LIBS=$LIBS
+CPPFLAGS=${CPPFLAGS} ${POSTGRESQL_INC}
+LIBS=${LIBS} ${POSTGRESQL_LIB}
+AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is 
needed])], [])
+AC_CHECK_LIB(pq, PQconnectdbParams, [],
+[AC_MSG_ERROR(libpq not found or too old. Need = 9.0)], [])
+CFLAGS=$save_CFLAGS
+CPPFLAGS=$save_CPPFLAGS
+LIBS=$save_LIBS
+fi
 BUILD_POSTGRESQL_SDBC=YES
 fi
 AC_SUBST(BUILD_POSTGRESQL_SDBC)
diff --git a/connectivity/prj/build.lst b/connectivity/prj/build.lst
index dae3499..fd358fa 100644
--- a/connectivity/prj/build.lst
+++ b/connectivity/prj/build.lst
@@ -1,4 +1,4 @@
-cn  connectivity:shell  TRANSLATIONS:translations comphelper MOZ:moz 
svl UNIXODBC:unixODBC unoil javaunohelper HSQLDB:hsqldb qadevOOo officecfg 
NSS:nss LIBXSLT:libxslt NULL
+cn  connectivity:shell  TRANSLATIONS:translations comphelper MOZ:moz 
POSTGRESQL:postgresql svl UNIXODBC:unixODBC unoil javaunohelper HSQLDB:hsqldb 
qadevOOo officecfg NSS:nss LIBXSLT:libxslt NULL
 cn  connectivityusr1-   all cn_mkout 
NULL
 cn  connectivity\incnmake   -   all cn_inc NULL
 cn  connectivity\com\sun\star\sdbcx\comp\hsqldb nmake   -   all 
cn_jhsqldbdb cn_hsqldb cn_inc NULL
diff --git a/connectivity/source/drivers/postgresql/makefile.mk 
b/connectivity/source/drivers/postgresql/makefile.mk
index e498981..615b26b 100644
--- a/connectivity/source/drivers/postgresql/makefile.mk
+++ b/connectivity/source/drivers/postgresql/makefile.mk
@@ -101,11 +101,18 @@ SHL1VERSIONMAP=$(SOLARENV)$/src$/reg-component.map
 # LEM 17/11/2011: removed everything except libpq proper;
 #  as per instructions in libpq documentation.
 #  If it turns out the rest was needed, reenable it.
+.IF $(SYSTEM_POSTGRESQL)==YES
 .IF $(GUI)==WNT
 LIBPQ_LINK=libpq.lib #wsock32.lib advapi32.lib
 .ELSE
 LIBPQ_LINK=-lpq #-lcrypt
 .ENDIF
+.ELSE #SYSTEM_POSTGRESQL==NO
+LIBPQ_LINK=$(OUTDIR_FOR_BUILD)/lib/libpq.a
+POSTGRESQL_INC=-I$(OUTDIR_FOR_BUILD)/inc/postgresql
+POSTGRESQL_LIB=
+.ENDIF
+
 SHL2TARGET=postgresql-sdbc-impl.uno
 LIB2TARGET=$(SLB)$/$(SHL2TARGET).lib
 LIB2OBJFILES= \
diff --git a/postgresql/makefile.mk b/postgresql/makefile.mk
new file mode 100644
index 000..d75b0de

[Libreoffice-commits] .: postgresql/makefile.mk

2011-12-01 Thread Lionel Elie Mamane
 postgresql/makefile.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8d3793b2b6cde0cb7ee69472ebaecd7b98c30265
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Fri Dec 2 00:20:31 2011 +0100

postgresql: correct TARFILE_MD5

diff --git a/postgresql/makefile.mk b/postgresql/makefile.mk
index d75b0de..c47721b 100644
--- a/postgresql/makefile.mk
+++ b/postgresql/makefile.mk
@@ -40,7 +40,7 @@ MAJOR_VER=9.1
 # --- Files 
 
 TARFILE_NAME=$(EXT_PROJECT_NAME)
-TARFILE_MD5=0981bda6548a8c8233ffce2b6e4b2a23
+TARFILE_MD5=061a9f17323117c9358ed60f33ecff78
 
 
 # distro-specific builds want to link against a particular mysql library
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 3 commits - connectivity/source dbaccess/source

2011-11-30 Thread Lionel Elie Mamane
 connectivity/source/drivers/odbcbase/OStatement.cxx|   19 ++--
 connectivity/source/drivers/postgresql/pq_connection.cxx   |1 
 connectivity/source/drivers/postgresql/pq_databasemetadata.cxx |   13 +-
 connectivity/source/drivers/postgresql/pq_tools.cxx|   46 
+++---
 connectivity/source/drivers/postgresql/pq_tools.hxx|8 +
 connectivity/source/drivers/postgresql/pq_xcolumns.cxx |   17 +--
 connectivity/source/drivers/postgresql/pq_xindexes.cxx |   15 +--
 connectivity/source/drivers/postgresql/pq_xkeycolumns.cxx  |   15 +--
 connectivity/source/drivers/postgresql/pq_xkeys.cxx|   18 ++-
 connectivity/source/drivers/postgresql/pq_xtables.cxx  |   19 ++--
 connectivity/source/drivers/postgresql/pq_xusers.cxx   |   15 +--
 connectivity/source/drivers/postgresql/pq_xviews.cxx   |   20 ++--
 connectivity/source/inc/odbc/OStatement.hxx|8 -
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx  |2 
 dbaccess/source/ui/dlg/detailpages.cxx |2 
 15 files changed, 129 insertions(+), 89 deletions(-)

New commits:
commit 5f3bd5bed3f5d677208dc1b897b2f21eb5f622bb
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Nov 30 15:57:08 2011 +0100

pgsql-sdbc: Robustify against empty arrays, etc

diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx 
b/connectivity/source/drivers/postgresql/pq_connection.cxx
index bf30c77..ef6ec78 100644
--- a/connectivity/source/drivers/postgresql/pq_connection.cxx
+++ b/connectivity/source/drivers/postgresql/pq_connection.cxx
@@ -492,6 +492,7 @@ static void properties2arrays( const Sequence 
PropertyValue   args,
 for( int i = 0; i  args.getLength() ; ++i )
 {
 bool append = true;
+// TODO: rewrite this as a static table of keywords, and a loop over 
these keywords.
 if( args[i].Name.matchIgnoreAsciiCaseAsciiL( 
RTL_CONSTASCII_STRINGPARAM( password ) ) )
 {
 keywords.push_back( password, SAL_NO_ACQUIRE );
diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx 
b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index 7bca582..28aad9c 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -1250,8 +1250,7 @@ sal_Bool 
DatabaseMetaData::dataDefinitionIgnoredInTransactions(  ) throw (SQLExc
 closeable-close();
 
 return new SequenceResultSet(
-m_refMutex, *this, statics.tablesRowNames,
-Sequence Sequence Any   ( vec[0],vec.size() ), m_pSettings-tc );
+m_refMutex, *this, statics.tablesRowNames, sequence_of_vector(vec), 
m_pSettings-tc );
 }
 
 struct SortInternalSchemasLastAndPublicFirst
@@ -1325,8 +1324,7 @@ struct SortInternalSchemasLastAndPublicFirst
 if( closeable.is() )
 closeable-close();
 return new SequenceResultSet(
-m_refMutex, *this, getStatics().schemaNames,
-Sequence Sequence Any   ( vec[0], vec.size() ), m_pSettings-tc );
+m_refMutex, *this, getStatics().schemaNames, sequence_of_vector(vec), 
m_pSettings-tc );
 }
 
 ::com::sun::star::uno::Reference XResultSet  DatabaseMetaData::getCatalogs(  
)
@@ -1670,8 +1668,7 @@ static void columnMetaData2DatabaseTypeDescription(
 closeable-close();
 
 return new SequenceResultSet(
-m_refMutex, *this, statics.columnRowNames,
-Sequence Sequence Any   ( vec[0],vec.size() ), m_pSettings-tc );
+m_refMutex, *this, statics.columnRowNames, sequence_of_vector(vec), 
m_pSettings-tc );
 }
 
 ::com::sun::star::uno::Reference XResultSet  
DatabaseMetaData::getColumnPrivileges(
@@ -2348,7 +2345,7 @@ static void pgTypeInfo2ResultSet(
 m_refMutex,
 *this,
 getStatics().typeinfoColumnNames,
-Sequence Sequence Any   ( vec[0] , vec.size() ),
+sequence_of_vector(vec),
 m_pSettings-tc,
 ( getStatics().typeInfoMetaData ));
 }
@@ -2494,7 +2491,7 @@ static sal_Int32 seqContains( const Sequence sal_Int32  
seq, sal_Int32 value
 }
 return new SequenceResultSet(
 m_refMutex, *this, getStatics().indexinfoColumnNames,
-Sequence Sequence Any   ( vec[0] , vec.size() ),
+sequence_of_vector(vec),
 m_pSettings-tc );
 }
 
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx 
b/connectivity/source/drivers/postgresql/pq_tools.cxx
index ac9c66f..c27bf15 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -829,8 +829,7 @@ com::sun::star::uno::Sequence Any  parseArray( const 
rtl::OUString  str ) thr
 }
 i++;
 }
-ret = Sequence Any  ( elements[0] , elements.size() );
-return ret;
+return sequence_of_vector(elements);
 }
 
 com::sun::star::uno::Sequence sal_Int32  parseIntArray( const 
::rtl

[Libreoffice-commits] .: connectivity/source

2011-11-30 Thread Lionel Elie Mamane
 connectivity/source/drivers/postgresql/pq_statics.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit aad641e29b87013ecd77d03d18d7755f284539d7
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Nov 30 18:30:39 2011 +0100

pgsql-sdbc: adapt comment to new code situation

diff --git a/connectivity/source/drivers/postgresql/pq_statics.cxx 
b/connectivity/source/drivers/postgresql/pq_statics.cxx
index 3a95279..acd0d28 100644
--- a/connectivity/source/drivers/postgresql/pq_statics.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statics.cxx
@@ -698,8 +698,9 @@ Statics  getStatics()
baseTypeDefs[i].value;
 }
 
-// LEM TODO: this bears a passing resemblance with the structure 
of pg_catalog.pg_type
-// LEM TODO: isSigned (last field) is not initialised
+// This is the metadata for the columns of the recordset returned
+// by ::com::sun::star::sdbc::XDatabaseMetaData::getTypeInfo(),
+// that is what is returned by getTypeInfo().getMetaData()
 DefColumnMetaData defTypeInfoMetaData[] =
 {
 { TYPE_NAME, TYPEINFO, pg_catalog, , 
com::sun::star::sdbc::DataType::VARCHAR, 0,50,0,0,0,0, false },  // 0
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: configure.in connectivity/source

2011-11-30 Thread Lionel Elie Mamane
 configure.in   |   10 +-
 connectivity/source/drivers/postgresql/makefile.mk |9 +
 2 files changed, 10 insertions(+), 9 deletions(-)

New commits:
commit 05b53b1b8e500b31bef1db737303725a168379da
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Nov 30 21:09:43 2011 +0100

postgresql-sdbc: review build rules

diff --git a/configure.in b/configure.in
index a47725f..e2b9ea3 100644
--- a/configure.in
+++ b/configure.in
@@ -5400,7 +5400,7 @@ dnl 
===
 dnl Check for PostgreSQL stuff
 dnl ===
 
-if test x$enable_ext_postgresql_sdbc = xyes; then
+if test x$enable_ext_postgresql_sdbc = xyes -a 
x$enable_extension_integration != xno; then
 SCPDEFS=$SCPDEFS -DWITH_EXTENSION_POSTGRESQL
 
 AC_MSG_CHECKING([for PostgreSQL prerequisites])
@@ -5412,12 +5412,12 @@ if test x$enable_ext_postgresql_sdbc = xyes; then
AC_MSG_ERROR([pg_config needed; set PGCONFIG if not in PATH])
 fi
 POSTGRESQL_INC=-I$(pg_config --includedir)
-POSTGRESQL_LIB=-L$(pg_config --libdir) -lpq
+POSTGRESQL_LIB=-L$(pg_config --libdir)
 else
 SYSTEM_POSTGRESQL=NO
 if test -n $with_libpq_path; then
 AC_MSG_RESULT([external libpq])
-POSTGRESQL_LIB=-L${with_libpq_path}/lib/ -lpq
+POSTGRESQL_LIB=-L${with_libpq_path}/lib/
 POSTGRESQL_INC=-I${with_libpq_path}/include/
 else
 AC_MSG_ERROR([not given. Please specify either 
--with-system-postgresql or --with-libpq-path])
@@ -5427,8 +5427,8 @@ if test x$enable_ext_postgresql_sdbc = xyes; then
 save_CFLAGS=$CFLAGS
 save_CPPFLAGS=$CPPFLAGS
 save_LIBS=$LIBS
-CPPFLAGS=${POSTGRESQL_INC}
-LIBS=${POSTGRESQL_LIB}
+CPPFLAGS=${CPPFLAGS} ${POSTGRESQL_INC}
+LIBS=${LIBS} ${POSTGRESQL_LIB}
 AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], 
[])
 AC_CHECK_LIB(pq, PQconnectdbParams, [],
 [AC_MSG_ERROR(libpq not found or too old. Need = 9.0)], [])
diff --git a/connectivity/source/drivers/postgresql/makefile.mk 
b/connectivity/source/drivers/postgresql/makefile.mk
index 4f2dffd..e498981 100644
--- a/connectivity/source/drivers/postgresql/makefile.mk
+++ b/connectivity/source/drivers/postgresql/makefile.mk
@@ -97,14 +97,14 @@ SHL1DEF=$(MISC)$/$(SHL1TARGET).def
 DEF1NAME=  $(SHL1TARGET)
 SHL1VERSIONMAP=$(SOLARENV)$/src$/reg-component.map
 
-# use the static version
+# use the static version on Windows?
 # LEM 17/11/2011: removed everything except libpq proper;
 #  as per instructions in libpq documentation.
 #  If it turns out the rest was needed, reenable it.
 .IF $(GUI)==WNT
-POSTGRESQL_LIB=libpq.lib #wsock32.lib advapi32.lib
+LIBPQ_LINK=libpq.lib #wsock32.lib advapi32.lib
 .ELSE
-POSTGRESQL_LIB=-lpq #-lcrypt
+LIBPQ_LINK=-lpq #-lcrypt
 .ENDIF
 SHL2TARGET=postgresql-sdbc-impl.uno
 LIB2TARGET=$(SLB)$/$(SHL2TARGET).lib
@@ -148,7 +148,8 @@ SHL2STDLIBS= \
 $(CPPUHELPERLIB)   \
 $(SALLIB)  \
 $(SALHELPERLIB)\
-$(POSTGRESQL_LIB)
+$(POSTGRESQL_LIB)  \
+$(LIBPQ_LINK)
 
 SHL2LIBS=  $(LIB2TARGET)
 SHL2DEF=   $(MISC)$/$(SHL2TARGET).def
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: configure.in

2011-11-30 Thread Lionel Elie Mamane
 configure.in |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 130028f2b4f27765ddf1b657f1f8e1d4a4005698
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Nov 30 22:54:42 2011 +0100

configure pgsql-sdbc: use PGCONFIG instead of relying on PATH

diff --git a/configure.in b/configure.in
index e2b9ea3..a9dac9d 100644
--- a/configure.in
+++ b/configure.in
@@ -5411,8 +5411,8 @@ if test x$enable_ext_postgresql_sdbc = xyes -a 
x$enable_extension_integrati
 if test -z $PGCONFIG; then
AC_MSG_ERROR([pg_config needed; set PGCONFIG if not in PATH])
 fi
-POSTGRESQL_INC=-I$(pg_config --includedir)
-POSTGRESQL_LIB=-L$(pg_config --libdir)
+POSTGRESQL_INC=-I$(${PGCONFIG} --includedir)
+POSTGRESQL_LIB=-L$(${PGCONFIG} --libdir)
 else
 SYSTEM_POSTGRESQL=NO
 if test -n $with_libpq_path; then
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sc/source

2011-11-24 Thread Lionel Elie Mamane
 sc/source/filter/excel/xeview.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0bde24644b5457aa193ecc84ba37169a967de1c6
Author: Kohei Yoshida kohei.yosh...@suse.com
Date:   Wed Nov 23 18:23:14 2011 -0500

fdo#39589: Avoid using ulimit_cast between signed and unsigned.

If you do, things go very very wrong.  These *limit_cast try to be
clever and check ranges of various types before casting, but they
fail to do the right thing when casting a signed integer into unsigned.

Signed-off-by: Lionel Elie Mamane lio...@mamane.lu

diff --git a/sc/source/filter/excel/xeview.cxx 
b/sc/source/filter/excel/xeview.cxx
index 437a953..5a02c3f 100644
--- a/sc/source/filter/excel/xeview.cxx
+++ b/sc/source/filter/excel/xeview.cxx
@@ -368,8 +368,8 @@ XclExpTabViewSettings::XclExpTabViewSettings( const 
XclExpRoot rRoot, SCTAB nSc
 else
 {
 // split window: position is in twips
-maData.mnSplitX = ulimit_cast sal_uInt16 ( 
rTabSett.maSplitPos.X() );
-maData.mnSplitY = ulimit_cast sal_uInt32 ( 
rTabSett.maSplitPos.Y() );
+maData.mnSplitX = static_castsal_uInt16(rTabSett.maSplitPos.X());
+maData.mnSplitY = static_castsal_uInt32(rTabSett.maSplitPos.Y());
 }
 
 // selection
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - connectivity/source wizards/com

2011-11-24 Thread Lionel Elie Mamane
 connectivity/source/drivers/postgresql/pq_databasemetadata.cxx |1 +
 wizards/com/sun/star/wizards/form/StyleApplier.java|2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit ef3a19eed2dc3aaddf3d48a204eff934b7002055
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Nov 24 19:37:46 2011 +0100

fdo#37626: form wizard recognise # also at beginning of line

This was keeping the Base form wizard from applying styles

diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java 
b/wizards/com/sun/star/wizards/form/StyleApplier.java
index 1dedca3..433384c 100644
--- a/wizards/com/sun/star/wizards/form/StyleApplier.java
+++ b/wizards/com/sun/star/wizards/form/StyleApplier.java
@@ -343,7 +343,7 @@ public class StyleApplier
 String[] sPropList = 
JavaTools.ArrayoutofString(scurline, :);
 String sPropValue = sPropList[1];
 sPropValue = sPropValue.trim();
-if (sPropValue.indexOf(#)  0)
+if (sPropValue.indexOf(#)  -1)
 {
 sPropValue = 
JavaTools.replaceSubString(sPropValue, PropertyNames.EMPTY_STRING, 
PropertyNames.SEMI_COLON);
 sPropValue = 
JavaTools.replaceSubString(sPropValue, PropertyNames.EMPTY_STRING, 
PropertyNames.SPACE);
commit 8d2780d42f6ee67688f176b0e04bc294575550ba
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Nov 23 21:46:48 2011 +0100

psql-sdbc: TODO note

diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx 
b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index 91eb3df..d2a0684 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -1503,6 +1503,7 @@ static void columnMetaData2DatabaseTypeDescription(
 const OUString columnNamePattern ) throw (SQLException, RuntimeException)
 {
 // LEM TODO: review in comparison with JDBC driver
+//   OK, confirmed it does not return consecutive values in 
ORDINAL_POSITION; needs to be fixed.
 Statics statics = getStatics();
 
 // continue !
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: dbaccess/Library_dbu.mk dbaccess/Library_dbui.mk dbaccess/source

2011-11-23 Thread Lionel Elie Mamane
 dbaccess/Library_dbu.mk |6 --
 dbaccess/Library_dbui.mk|   17 -
 dbaccess/source/ui/dlg/ConnectionHelper.cxx |4 
 3 files changed, 4 insertions(+), 23 deletions(-)

New commits:
commit 538190e0ea142d0a7da244809c66241379d4d91b
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Wed Nov 23 14:34:24 2011 +0100

fdo#32347: reenable ADO URL helper UI

cleanup obsolete DISABLE_ADO/WINDOWS_VISTA_PSDK logic

diff --git a/dbaccess/Library_dbu.mk b/dbaccess/Library_dbu.mk
index 0419c29..6c645c9 100644
--- a/dbaccess/Library_dbu.mk
+++ b/dbaccess/Library_dbu.mk
@@ -50,12 +50,6 @@ $(eval $(call gb_Library_add_defs,dbu,\
 $(if $(filter YES,$(SYSTEM_ODBC_HEADERS)),-DSYSTEM_ODBC_HEADERS) \
 ))
 
-ifeq (,$(strip $(PROF_EDITION)))
-$(eval $(call gb_Library_add_defs,dbu,\
--DWINDOWS_VISTA_PSDK \
-))
-endif
-
 ifeq ($(GUI)$(COM),WNTGCC) # for adoint.h
 $(eval $(call gb_Library_add_cxxflags,dbu,\
 -fpermissive \
diff --git a/dbaccess/Library_dbui.mk b/dbaccess/Library_dbui.mk
index 3c6bfb2..0808896 100644
--- a/dbaccess/Library_dbui.mk
+++ b/dbaccess/Library_dbui.mk
@@ -51,34 +51,17 @@ $(eval $(call gb_Library_add_cflags,dbui,\
 ))
 endif
 
-ifneq ($(WINDOWS_VISTA_PSDK),)
-ifeq ($(PROF_EDITION),)
-$(eval $(call gb_Library_add_defs,dbui,\
-   -DDBACCESS_DLLIMPLEMENTATION\
-   -DWINDOWS_VISTA_PSDK \
-))
-endif
-endif
-
 ifeq ($(GUI)$(COM),WNTGCC)
 $(eval $(call gb_Library_add_cflags,dbui,\
-fpermissive \
 ))
 endif
 
-ifeq ($(PROF_EDITION),)
-ifneq ($(WINDOWS_VISTA_PSDK),)
-DISABLE_ADO=TRUE
-endif
-endif
-
 ifeq ($(OS),WNT)
-ifeq ($(DISABLE_ADO),)
 $(eval $(call gb_Library_add_exception_objects,dbui,\
dbaccess/source/ui/dlg/adodatalinks \
 ))
 endif
-endif
 
 $(eval $(call gb_Library_add_defs,dbui,\
-DDBACCESS_DLLIMPLEMENTATION\
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx 
b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index bc03951..7ec94ad 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -71,6 +71,10 @@
 #include tools/diagnose_ex.h
 #include sfx2/docfilt.hxx
 
+#if defined(WNT)
+#define _ADO_DATALINK_BROWSE_
+#endif
+
 #ifdef _ADO_DATALINK_BROWSE_
 #include vcl/sysdata.hxx
 #include adodatalinks.hxx
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/osl

2011-11-21 Thread Lionel Elie Mamane
 sal/osl/unx/signal.c |4 
 1 file changed, 4 insertions(+)

New commits:
commit 6dc6820038cf0a2d067e5fe9c72b42a79404a3c9
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Fri Nov 18 13:07:59 2011 +0100

Do not catch signals in dbgutil build

Helps debug crashes, segfaults, etc
as one gets the right backtrace in gdb and dumped core.

diff --git a/sal/osl/unx/signal.c b/sal/osl/unx/signal.c
index abb4eaa..6a6dd1d 100644
--- a/sal/osl/unx/signal.c
+++ b/sal/osl/unx/signal.c
@@ -248,6 +248,10 @@ static sal_Bool InitSignal()
 bSetILLHandler = sal_True;
 }
 
+#ifdef DBG_UTIL
+bSetSEGVHandler = bSetWINCHHandler = bSetILLHandler = bDoHardKill = 
sal_False;
+#endif
+
 SignalListMutex = osl_createMutex();
 
 act.sa_handler = SignalHandlerFunction;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/win

2011-11-21 Thread Lionel Elie Mamane
 vcl/win/source/gdi/salprn.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 96d01c8f07478f4241f014145a64c57b041f0d44
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Mon Nov 21 14:14:40 2011 +0100

disambiguate (OU)?String comparison into OUString comparison

diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx
index 5f58cb7..bcfc850 100644
--- a/vcl/win/source/gdi/salprn.cxx
+++ b/vcl/win/source/gdi/salprn.cxx
@@ -368,7 +368,7 @@ static sal_Bool ImplTestSalJobSetup( WinSalInfoPrinter* 
pPrinter,
 }
 SalDriverData* pSetupDriverData = 
(SalDriverData*)(pSetupData-mpDriverData);
 if ( (pSetupData-mnSystem == JOBSETUP_SYSTEM_WINDOWS) 
- (pPrinter-maDriverName == pSetupData-maDriver) 
+ (OUString(pPrinter-maDriverName) == pSetupData-maDriver) 
  (pSetupData-mnDriverDataLen  sizeof( SalDriverData )) 
  (long)(pSetupData-mnDriverDataLen - 
pSetupDriverData-mnDriverOffset) == nSysJobSize 
  pSetupDriverData-mnSysSignature == SAL_DRIVERDATA_SYSSIGN )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/unx

2011-11-18 Thread Lionel Elie Mamane
 desktop/unx/source/splashx.c |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 48efe5ce26b519a1a87da1d0ee1acefcb000934e
Author: August Sodora aug...@gmail.com
Date:   Thu Nov 17 21:06:16 2011 -0500

Valgrind: fixed memory leak

diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
index 0c7024d..3d3981d 100644
--- a/desktop/unx/source/splashx.c
+++ b/desktop/unx/source/splashx.c
@@ -744,6 +744,12 @@ void splash_destroy(struct splash* splash)
 {
 if(splash-display)
 {
+if(splash-gc)
+{
+XFreeGC(splash-display, splash-gc);
+splash-gc = NULL;
+}
+
 XCloseDisplay( splash-display );
 splash-display = NULL;
 png_destroy_read_struct( (splash-png_ptr), (splash-info_ptr), 
NULL );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: connectivity/source

2011-11-17 Thread Lionel Elie Mamane
/pq_xtables.hxx   |2 
+-
 connectivity/source/drivers/postgresql/pq_xuser.cxx |2 
+-
 connectivity/source/drivers/postgresql/pq_xuser.hxx |2 
+-
 connectivity/source/drivers/postgresql/pq_xusers.cxx|2 
+-
 connectivity/source/drivers/postgresql/pq_xusers.hxx|2 
+-
 connectivity/source/drivers/postgresql/pq_xview.cxx |2 
+-
 connectivity/source/drivers/postgresql/pq_xview.hxx |2 
+-
 connectivity/source/drivers/postgresql/pq_xviews.cxx|2 
+-
 connectivity/source/drivers/postgresql/pq_xviews.hxx|2 
+-
 68 files changed, 68 insertions(+), 68 deletions(-)

New commits:
commit 412e178a40bbd8b3e008d637727691bdd6d032a8
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Nov 17 21:29:14 2011 +0100

pgsql-sdbc: be less prescriptive about indentation style

diff --git a/connectivity/source/drivers/postgresql/pq_allocator.hxx 
b/connectivity/source/drivers/postgresql/pq_allocator.hxx
index 6022967..ffa2e02 100644
--- a/connectivity/source/drivers/postgresql/pq_allocator.hxx
+++ b/connectivity/source/drivers/postgresql/pq_allocator.hxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; eval:(c-set-style bsd); tab-width: 4; indent-tabs-mode: 
nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /*
  *
  *  This library is free software; you can redistribute it and/or
diff --git a/connectivity/source/drivers/postgresql/pq_array.cxx 
b/connectivity/source/drivers/postgresql/pq_array.cxx
index 92944f5..9a88b62 100644
--- a/connectivity/source/drivers/postgresql/pq_array.cxx
+++ b/connectivity/source/drivers/postgresql/pq_array.cxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; eval:(c-set-style bsd); tab-width: 4; indent-tabs-mode: 
nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /*
  *
  *  This library is free software; you can redistribute it and/or
diff --git a/connectivity/source/drivers/postgresql/pq_array.hxx 
b/connectivity/source/drivers/postgresql/pq_array.hxx
index 6bac429..e211b31 100644
--- a/connectivity/source/drivers/postgresql/pq_array.hxx
+++ b/connectivity/source/drivers/postgresql/pq_array.hxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; eval:(c-set-style bsd); tab-width: 4; indent-tabs-mode: 
nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /*
  *
  *  This library is free software; you can redistribute it and/or
diff --git a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx 
b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx
index 8381c72..f7a1eda 100644
--- a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx
+++ b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; eval:(c-set-style bsd); tab-width: 4; indent-tabs-mode: 
nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /*
  *
  *  This library is free software; you can redistribute it and/or
diff --git a/connectivity/source/drivers/postgresql/pq_baseresultset.hxx 
b/connectivity/source/drivers/postgresql/pq_baseresultset.hxx
index 6a9ec39..8ccba31 100644
--- a/connectivity/source/drivers/postgresql/pq_baseresultset.hxx
+++ b/connectivity/source/drivers/postgresql/pq_baseresultset.hxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; eval:(c-set-style bsd); tab-width: 4; indent-tabs-mode: 
nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /*
  *
  *  This library is free software; you can redistribute it and/or
diff --git a/connectivity/source/drivers/postgresql/pq_common.hxx 
b/connectivity/source/drivers/postgresql/pq_common.hxx
index 0c5f89a..c712f2c 100644
--- a/connectivity/source/drivers/postgresql/pq_common.hxx
+++ b/connectivity/source/drivers/postgresql/pq_common.hxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; eval:(c-set-style bsd); tab-width: 4; indent-tabs-mode: 
nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /*
  *
  * Copyright 2011 Lionel Elie Mamane lio...@mamane.lu
diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx 
b/connectivity/source/drivers/postgresql/pq_connection.cxx
index 735e437..9b2210a 100644
--- a/connectivity/source/drivers/postgresql/pq_connection.cxx
+++ b/connectivity/source/drivers

[Libreoffice-commits] .: configure.in connectivity/source set_soenv.in

2011-11-17 Thread Lionel Elie Mamane
 configure.in |   52 ---
 connectivity/source/drivers/postgresql/makefile.mk   |   28 ++
 connectivity/source/drivers/postgresql/pq_driver.hxx |8 --
 set_soenv.in |2 
 4 files changed, 54 insertions(+), 36 deletions(-)

New commits:
commit 7bab4645ce08e9cb41b38a983c57a514358b71ec
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Thu Nov 17 23:17:21 2011 +0100

Implement --with-sytem-postgreql and --with-libq-path; cleanup unused 
#define

diff --git a/configure.in b/configure.in
index a628175..995 100644
--- a/configure.in
+++ b/configure.in
@@ -1090,7 +1090,8 @@ AC_ARG_WITH(lucene-analyzers-jar,
 AC_ARG_WITH(system-mysql,
 AS_HELP_STRING([--with-system-mysql],
 [Use MySQL libraries already on system, for building the MySQL 
Connector/LibreOffice
- extension. Requires MYSQLCONFIG to point to the mysql_config 
executable.]),,
+ extension. If the the mysql_config executable is not in PATH, use 
MYSQLCONFIG to
+ point to it.]),,
 [with_system_mysql=$with_system_libs])
 
 AC_ARG_WITH(libmysql-path,
@@ -1108,6 +1109,22 @@ AC_ARG_WITH(system-mysql-cppconn,
 [Use MySQL C++ Connector libraries already on system.]),,
 [with_system_mysql_cppconn=$with_system_libs])
 
+AC_ARG_WITH(system-postgresql,
+AS_HELP_STRING([--with-system-postgresql],
+[Use PostgreSQL libraries already on system, for building the 
PostgreSQL-SDBC
+ extension. If pg_config is not in PATH, use PGCONFIG to point to 
it.]),,
+[with_system_postgresql=$with_system_libs])
+
+AC_ARG_WITH(libpq-path,
+AS_HELP_STRING([--with-libpq-path],
+[Use this PostgreSQL C interface (libpq) installation for building
+ the PostgreSQL-SDBC extension.])
+[
+  Usage: --with-libpq-path=absolute path to
+  your libq installation
+],
+,)
+
 AC_ARG_WITH(system-hsqldb,
 AS_HELP_STRING([--with-system-hsqldb],
 [Use hsqldb already on system.]),,
@@ -5218,7 +5235,7 @@ if test $ENABLE_MYSQLC = YES; then
 dnl ===
 dnl Check for system MySQL
 dnl ===
-AC_MSG_CHECKING([for mysql pre-requisites])
+AC_MSG_CHECKING([for MySQL prerequisites])
 if test $with_system_mysql = yes; then
 AC_MSG_RESULT([external MySQL])
 SYSTEM_MYSQL=YES
@@ -5365,23 +5382,44 @@ dnl Check for PostgreSQL stuff
 dnl ===
 
 if test x$enable_ext_postgresql_sdbc = xyes; then
-AC_PATH_PROG(PGCONFIG, pg_config)
-if test -z $PGCONFIG; then
-AC_MSG_ERROR([pg_config needed])
+AC_MSG_CHECKING([for PostgreSQL prerequisites])
+if test $with_system_postgresql = yes; then
+AC_MSG_RESULT([external PostgreSQL])
+SYSTEM_POSTGRESQL=YES
+AC_PATH_PROG(PGCONFIG, pg_config)
+if test -z $PGCONFIG; then
+   AC_MSG_ERROR([pg_config needed; set PGCONFIG if not in PATH])
+fi
+POSTGRESQL_INC=-I$(pg_config --includedir)
+POSTGRESQL_LIB=-L$(pg_config --libdir) -lpq
+else
+SYSTEM_POSTGRESQL=NO
+if test -n $with_libpq_path; then
+AC_MSG_RESULT([external libpq])
+POSTGRESQL_LIB=-L${with_libpq_path}/lib/ -lpq
+POSTGRESQL_INC=-I${with_libpq_path}/include/
+else
+AC_MSG_ERROR([not given. Please specify either 
--with-system-postgresql or --with-libpq-path])
+fi
 fi
+AC_MSG_CHECKING([for PostgreSQL C interface])
 save_CFLAGS=$CFLAGS
+save_CPPFLAGS=$CPPFLAGS
 save_LIBS=$LIBS
-CFLAGS=-I`pg_config --includedir`
+CPPFLAGS=${POSTGRESQL_INC}
+LIBS=${POSTGRESQL_LIB}
 AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], 
[])
 AC_CHECK_LIB(pq, PQconnectdbParams, [],
 [AC_MSG_ERROR(libpq not found or too old. Need = 9.0)], [])
 CFLAGS=$save_CFLAGS
+CPPFLAGS=$save_CPPFLAGS
 LIBS=$save_LIBS
 BUILD_POSTGRESQL_SDBC=YES
-SYSTEM_POSTGRESQL=YES # only option atm :-)
 fi
 AC_SUBST(BUILD_POSTGRESQL_SDBC)
 AC_SUBST(SYSTEM_POSTGRESQL)
+AC_SUBST(POSTGRESQL_INC)
+AC_SUBST(POSTGRESQL_LIB)
 
 dnl ===
 dnl Check for system beanshell
diff --git a/connectivity/source/drivers/postgresql/makefile.mk 
b/connectivity/source/drivers/postgresql/makefile.mk
index 8c8c022..8b02689 100644
--- a/connectivity/source/drivers/postgresql/makefile.mk
+++ b/connectivity/source/drivers/postgresql/makefile.mk
@@ -39,9 +39,6 @@ NO_DEFAULT_STL=TRUE
 
 .IF $(BUILD_POSTGRESQL_SDBC) == YES
 
-.IF $(SYSTEM_POSTGRESQL) != YES
-.INCLUDE :  $(SOLARINCDIR)$/postgresql/postgresql-version.mk
-.ENDIF

[Libreoffice-commits] .: 2 commits - sc/source

2011-11-15 Thread Lionel Elie Mamane
 sc/source/ui/view/auditsh.cxx  |2 -
 sc/source/ui/view/colrowba.cxx |8 ++-
 sc/source/ui/view/dbfunc.cxx   |   44 -
 sc/source/ui/view/viewfunc.cxx |4 +--
 4 files changed, 28 insertions(+), 30 deletions(-)

New commits:
commit 964671497e0b384f6db34c5b7a5d73e26157a47c
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Nov 15 09:03:10 2011 +0100

tweak comment

diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index b1e6a75..77fb8d8 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -226,7 +226,7 @@ void ScDBFunc::NotifyCloseDbNameDlg( const ScDBCollection 
rNewColl, const std::
 std::vectorScRange::const_iterator iter;
 for (iter = rDelAreaList.begin(); iter != rDelAreaList.end(); ++iter)
 {
-//  register target in SBA no longer necessary
+//  registering target in SBA no longer necessary
 const ScAddress rStart = iter-aStart;
 const ScAddress rEnd   = iter-aEnd;
 pDocShell-DBAreaDeleted( rStart.Tab(),
commit 3b442f6909f77613b4bcbc43e3b2193125b5f1df
Author: w.donkers w.donk...@linux-testpc.dci-electronics
Date:   Tue Nov 15 08:03:24 2011 +0100

translations of comments from german to english Committer: Winfried Donkers 
o...@dci-electronics.nl On branch master Changes to be committed: modified: 
sc/source/ui/view/auditsh.cxx modified: sc/source/ui/view/colrowba.cxx 
modified: sc/source/ui/view/dbfunc.cxx modified: sc/source/ui/view/viewfunc.cxx

diff --git a/sc/source/ui/view/auditsh.cxx b/sc/source/ui/view/auditsh.cxx
index 364c412..baf6001 100644
--- a/sc/source/ui/view/auditsh.cxx
+++ b/sc/source/ui/view/auditsh.cxx
@@ -119,7 +119,7 @@ void ScAuditingShell::Execute( SfxRequest rReq )
pReqArgs-GetItemState( SID_RANGE_ROW, sal_True, 
pYItem ) == SFX_ITEM_SET )
 {
 OSL_ENSURE( pXItem-ISA(SfxInt16Item)  
pYItem-ISA(SfxInt32Item),
-falsche Items );
+wrong items );
 SCsCOL nCol = static_castSCsCOL(((const 
SfxInt16Item*) pXItem)-GetValue());
 SCsROW nRow = static_castSCsROW(((const 
SfxInt32Item*) pYItem)-GetValue());
 ScViewFunc* pView = pViewData-GetView();
diff --git a/sc/source/ui/view/colrowba.cxx b/sc/source/ui/view/colrowba.cxx
index 0f24a98..83c5ab9 100644
--- a/sc/source/ui/view/colrowba.cxx
+++ b/sc/source/ui/view/colrowba.cxx
@@ -185,7 +185,7 @@ void ScColBar::SelectWindow()
 {
 ScTabViewShell* pViewSh = pViewData-GetViewShell();
 
-pViewSh-SetActive();   // Appear und SetViewFrame
+pViewSh-SetActive();   // Appear and SetViewFrame
 pViewSh-DrawDeselectAll();
 
 ScSplitPos eActive = pViewData-GetActivePart();
@@ -350,7 +350,7 @@ void ScRowBar::SelectWindow()
 {
 ScTabViewShell* pViewSh = pViewData-GetViewShell();
 
-pViewSh-SetActive();   // Appear und SetViewFrame
+pViewSh-SetActive();   // Appear and SetViewFrame
 pViewSh-DrawDeselectAll();
 
 ScSplitPos eActive = pViewData-GetActivePart();
@@ -398,9 +398,7 @@ String ScRowBar::GetDragHelp( long nVal )
 return lcl_MetricString( nTwips, ScGlobal::GetRscString(STR_TIP_HEIGHT) );
 }
 
-//  GetHiddenCount ist nur fuer Zeilen ueberladen
-
-SCROW ScRowBar::GetHiddenCount( SCROW nEntryNo )
+SCROW ScRowBar::GetHiddenCount( SCROW nEntryNo )   // overloaded only for rows
 {
 ScDocument* pDoc = pViewData-GetDocument();
 SCTAB nTab = pViewData-GetTabNo();
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index 2498fa3..b1e6a75 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -64,7 +64,7 @@ ScDBFunc::~ScDBFunc()
 }
 
 //
-//  Hilfsfunktionen
+//  auxiliary functions
 //
 
 void ScDBFunc::GotoDBArea( const ::rtl::OUString rDBName )
@@ -92,7 +92,7 @@ void ScDBFunc::GotoDBArea( const ::rtl::OUString rDBName )
 }
 }
 
-//  aktuellen Datenbereich fuer Sortieren / Filtern suchen
+//  get actual datarange for sort / filter search
 
 ScDBData* ScDBFunc::GetDBData( bool bMark, ScGetDBMode eMode, ScGetDBSelection 
eSel )
 {
@@ -210,7 +210,7 @@ ScDBData* ScDBFunc::GetAnonymousDBData()
 return pDocSh-GetAnonymousDBData(aRange);
 }
 
-//  Datenbankbereiche aendern (Dialog)
+//  change database range (dialog)
 
 void ScDBFunc::NotifyCloseDbNameDlg( const ScDBCollection rNewColl, const 
std::vectorScRange rDelAreaList )
 {
@@ -226,7 +226,7 @@ void ScDBFunc::NotifyCloseDbNameDlg( const ScDBCollection 
rNewColl, const std::
 std::vectorScRange::const_iterator iter;
 for (iter = rDelAreaList.begin(); iter != rDelAreaList.end(); ++iter)
 {
-//  Targets am SBA abmelden nicht mehr noetig
+//  register target in SBA no longer necessary
 const ScAddress rStart = iter-aStart;
 const ScAddress rEnd

[Libreoffice-commits] .: sc/source

2011-11-15 Thread Lionel Elie Mamane
 sc/source/ui/view/dbfunc.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a5b21ebc93ba34c36ca111c98d90e8f3bd19657b
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Nov 15 09:07:48 2011 +0100

correct comment

diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index 77fb8d8..d78c11e 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -226,7 +226,7 @@ void ScDBFunc::NotifyCloseDbNameDlg( const ScDBCollection 
rNewColl, const std::
 std::vectorScRange::const_iterator iter;
 for (iter = rDelAreaList.begin(); iter != rDelAreaList.end(); ++iter)
 {
-//  registering target in SBA no longer necessary
+// unregistering target in SBA no longer necessary
 const ScAddress rStart = iter-aStart;
 const ScAddress rEnd   = iter-aEnd;
 pDocShell-DBAreaDeleted( rStart.Tab(),
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: git-hooks/commit-msg

2011-11-15 Thread Lionel Elie Mamane
 git-hooks/commit-msg |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5403fa516bb83181d78789cd2cad8ed59c69de1e
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Nov 15 09:13:19 2011 +0100

commit-msg hook: allow commit message that *starts* with an asterisk

diff --git a/git-hooks/commit-msg b/git-hooks/commit-msg
index d51a330..6257213 100755
--- a/git-hooks/commit-msg
+++ b/git-hooks/commit-msg
@@ -32,7 +32,7 @@ test  = $(grep '^Signed-off-by: ' $1 |
 
 # Check that the first line exists, and is not an asterisk
 
-if [ -z `head -n 1 $1 | grep -v '^[ \t]*\*'` ] ; then
+if [ -z `head -n 1 $1 | grep -v '^[ \t]*\*$'` ] ; then
 abort $1 Please provide the general description on the first line.
 fi
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: framework/source

2011-11-13 Thread Lionel Elie Mamane
 framework/source/loadenv/loadenv.cxx |   23 +++
 1 file changed, 15 insertions(+), 8 deletions(-)

New commits:
commit 88285f84bdf54147ee5238e97d0d805fa1c127c1
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Sun Nov 13 15:26:41 2011 +0100

fdo#35091 do not honour ForceFocusAndToFront preference for preview

diff --git a/framework/source/loadenv/loadenv.cxx 
b/framework/source/loadenv/loadenv.cxx
index 409ef40..2e100c1 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; eval:(c-set-style bsd); tab-width: 4; indent-tabs-mode: 
nil; c-basic-offset: 4 -*- */
 /*
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1688,14 +1688,21 @@ void LoadEnv::impl_makeFrameWindowVisible(const 
css::uno::Reference css::awt::X
 Window* pWindow = VCLUnoHelper::GetWindow(xWindow);
 if ( pWindow )
 {
+bool preview(false);
+css::uno::Any a = 
m_lMediaDescriptor[::comphelper::MediaDescriptor::PROP_PREVIEW()];
+a = preview;
+
 bool bForceFrontAndFocus(false);
-css::uno::Any a = ::comphelper::ConfigurationHelper::readDirectKey(
-xSMGR,
-
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(org.openoffice.Office.Common/View)),
-
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(NewDocumentHandling)),
-
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ForceFocusAndToFront)),
-::comphelper::ConfigurationHelper::E_READONLY);
-a = bForceFrontAndFocus;
+if ( !preview )
+{
+a = ::comphelper::ConfigurationHelper::readDirectKey(
+  xSMGR,
+  
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(org.openoffice.Office.Common/View)),
+  
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(NewDocumentHandling)),
+  
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ForceFocusAndToFront)),
+  ::comphelper::ConfigurationHelper::E_READONLY);
+a = bForceFrontAndFocus;
+}
 
 if( pWindow-IsVisible()  (bForceFrontAndFocus || bForceToFront) )
 pWindow-ToTop();
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/osl

2011-11-13 Thread Lionel Elie Mamane
 sal/osl/unx/socket.c |  140 ---
 1 file changed, 11 insertions(+), 129 deletions(-)

New commits:
commit 0ddf2b8adf119b6abeb44e507c577fbdb259be85
Author: Arnaud Versini arnaud.vers...@gmail.com
Date:   Sun Nov 13 16:01:31 2011 +0100

Remove _osl_getDomainName and simplify _osl_getFullQualifiedDomainName

diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c
index 9c33eaf..ed31a82 100644
--- a/sal/osl/unx/socket.c
+++ b/sal/osl/unx/socket.c
@@ -40,7 +40,6 @@
 
 #include sockimpl.h
 
-
 /* defines for poll */
 #ifdef HAVE_POLL_H
 #undef HAVE_POLL_H
@@ -809,142 +808,25 @@ static struct hostent* _osl_gethostbyname_r (
 #endif
 }
 
-static sal_Bool  _osl_getDomainName (sal_Char *buffer, sal_Int32 bufsiz)
-{
-sal_Bool result = (getdomainname(buffer, bufsiz) == 0);
-if  (!result) {
-OSL_TRACE(osl_getDomainName failed. Errno: %d; %s\n,
-  errno,
-  strerror(errno));
-}
-return (result);
-}
-
 static sal_Char* _osl_getFullQualifiedDomainName (const sal_Char *pHostName)
 {
 #   define DOMAINNAME_LENGTH 512
-sal_uInt32  nLengthOfHostName;
-static sal_uInt32   nLengthOfDomainName = 0;
-static sal_Char*pDomainName = NULL;
-
-sal_Char  *pFullQualifiedName;
-
-/* get a '\0' terminated domainname */
-
-/* read default domainname default from environment */
-if (nLengthOfDomainName == 0)
-{
-sal_Char *pEnvDomain;
-
-pEnvDomain = getenv (STAR_OVERRIDE_DOMAINNAME);
-if (pEnvDomain)
-{
-pDomainName = strdup (pEnvDomain);
-nLengthOfDomainName = strlen (pDomainName);
-}
-}
-
-if (nLengthOfDomainName == 0)
-{
-sal_Char pDomainNameBuffer[ DOMAINNAME_LENGTH ];
-
-pDomainNameBuffer[0] = '\0';
-
-if (_osl_getDomainName (pDomainNameBuffer, DOMAINNAME_LENGTH))
-{
-pDomainName = strdup (pDomainNameBuffer);
-nLengthOfDomainName = strlen (pDomainName);
-}
-}
-
-/* compose hostname and domainname */
-nLengthOfHostName = strlen( pHostName );
-pFullQualifiedName = (sal_Char*) malloc( (nLengthOfHostName + 1
-+ nLengthOfDomainName + 1) * sizeof(sal_Char) );
-memcpy( pFullQualifiedName, pHostName,
-(nLengthOfHostName + 1) * sizeof(sal_Char) );
+struct hostent  aHostByName;
+struct hostent *pHostByName;
+sal_CharpQualifiedHostBuffer[ MAX_HOSTBUFFER_SIZE ];
+sal_Char  *pFullQualifiedName = NULL;
+int nErrorNo;
 
-if ( nLengthOfDomainName  0 )
+pHostByName = _osl_gethostbyname_r (
+pHostName,
+aHostByName, pQualifiedHostBuffer,
+sizeof(pQualifiedHostBuffer), nErrorNo );
+if (pHostByName != NULL)
 {
-/* fqdn = hostname + '.' + domainname + '\0' */
-pFullQualifiedName[ nLengthOfHostName ] = '.';
-memcpy( pFullQualifiedName + nLengthOfHostName + 1, pDomainName,
-nLengthOfDomainName + 1 );
+pFullQualifiedName = strdup(pHostByName-h_name);
 }
-
-/* check whether full-qualified name and hostname point to the same host
- * should almost always be true */
-if ( nLengthOfDomainName  0 )
-{
-struct hostent *pQualifiedHostByName;
-struct hostent *pHostByName;
-sal_BoolbHostsAreEqual;
-
-/* buffer for calls to reentrant version of gethostbyname */
-struct hostent  aHostByName, aQualifiedHostByName;
-sal_CharpHostBuffer[ MAX_HOSTBUFFER_SIZE ];
-sal_CharpQualifiedHostBuffer[ MAX_HOSTBUFFER_SIZE ];
-int nErrorNo;
-
-pHostBuffer[0] = '\0';
-pQualifiedHostBuffer[0] = '\0';
-
-/* get list of addresses */
-pQualifiedHostByName = _osl_gethostbyname_r (
-pFullQualifiedName,
-aQualifiedHostByName, pQualifiedHostBuffer,
-sizeof(pQualifiedHostBuffer), nErrorNo );
-pHostByName = _osl_gethostbyname_r (
-pHostName,
-aHostByName, pHostBuffer,
-sizeof(pHostBuffer), nErrorNo );
-
-/* compare addresses */
-bHostsAreEqual = sal_False;
-if ( pQualifiedHostByName  pHostByName )
-{
-sal_Char **p, **q;
-struct in_addr in;
-
-/* lists are expected to be (very) short */
-for ( p = pQualifiedHostByName-h_addr_list; *p != NULL; p++ )
-{
-for ( q = pHostByName-h_addr_list; *q != NULL; q++ )
-{
-/* in.s_addr may be in_addr_t or uint32_t or heaven knows 
*/
-if ( memcmp( *p, *q, sizeof(in.s_addr) ) == 0 )
-{
-bHostsAreEqual = sal_True;
-break;
-}
-}
-if ( bHostsAreEqual )
-break;
-}
-

[Libreoffice-commits] .: 2 commits - svx/source

2011-11-01 Thread Lionel Elie Mamane
 svx/source/fmcomp/fmgridif.cxx |   63 -
 1 file changed, 31 insertions(+), 32 deletions(-)

New commits:
commit 3a183d773f837a57671377a22808f66b2ff535ca
Author: Lionel Elie Mamane lio...@mamane.lu
Date:   Tue Nov 1 08:04:28 2011 +0100

translate comments

diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 1240562..1367c9f 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -527,8 +527,8 @@ void SAL_CALL FmXGridControl::createPeer(const Reference 
::com::sun::star::awt:
 if (!getPeer().is())
 {
 mbCreatingPeer = sal_True;
-// mbCreatingPeer is virtually the same as m_nPeerCreationLevel, 
but it's the base class' method
-// to prevent recursion.
+// mbCreatingPeer is virtually the same as m_nPeerCreationLevel, but 
it's the base class' method
+// to prevent recursion.
 
 Window* pParentWin = NULL;
 if (rParentPeer.is())
@@ -542,19 +542,17 @@ void SAL_CALL FmXGridControl::createPeer(const Reference 
::com::sun::star::awt:
 DBG_ASSERT(pPeer != NULL, FmXGridControl::createPeer : imp_CreatePeer 
didn't return a peer !);
 setPeer( pPeer );
 
-// lesen der properties aus dem model
+// reading the properties from the model
 //  ++m_nPeerCreationLevel;
 updateFromModel();
 
-// folgendes unschoene Szenario : updateFromModel fuehrt zu einem 
propertiesChanged am Control,
-// das stellt fest, dass sich eine 'kritische' Property geaendert hat 
(zum Beispiel Border) und
-// legt daraufhin eine neue Peer an, was wieder hier im createPeer 
landet, wir legen also eine
-// zweite FmXGridPeer an und initialisieren die. Dann kommen wir in 
der ersten Inkarnation aus
-// dem updsateFromModel raus und arbeiten dort weiter mit dem pPeer, 
das jetzt eigentlich schon
-// veraltet ist (da ja in der zweiten Inkarnation eine andere Peer 
angelegt wurde).
-// Deswegen also der Aufwand mit dem PeerCreationLevel, das stellt 
sicher, dass wir die in dem
-// tiefsten Level angelegte Peer wirklich verwenden, sie aber erst im 
top-level
-// initialisieren.
+// consider the following ugly scenario: updateFromModel leads to a 
propertiesChanges on the Control,
+// which determines, dat a critical property has changed (e.g. 
Border) and therefore starts a new
+// Peer, which lands again here in createPeerm we also start a second 
FmXGridPeer and initialise it.
+// Then we exit from the first incarnation's updateFromModel and 
continue working with the pPeer,
+// that is in fact now already obsolete (as another peer is being 
started in the second incarnation).
+// Therefore the effort with the PeerCreationLevel, which ensures that 
we really use the Peer
+// created at the deepest level, but first initialise it in the 
top-level.
 //  if (--m_nPeerCreationLevel == 0)
 {
 DBG_ASSERT(getPeer().is(), FmXGridControl::createPeer : something 
went wrong ... no top level peer !);
@@ -601,9 +599,9 @@ void SAL_CALL FmXGridControl::createPeer(const Reference 
::com::sun::star::awt:
 
 // forward the design mode
 sal_Bool bForceAlivePeer = m_bInDraw  !maComponentInfos.bVisible;
-// (we force a alive-mode peer if we're in draw, cause in 
this case the peer will be used for drawing in
-// foreign devices. We ensure this with the visibility check 
as an living peer is assumed to be noncritical
-// only if invisible)
+// (we force an alive-mode peer if we're in draw, cause in this 
case the peer will be used for drawing in
+// foreign devices. We ensure this with the visibility check as an 
living peer is assumed to be noncritical
+// only if invisible)
 Any aOldCursorBookmark;
 if (!mbDesignMode || bForceAlivePeer)
 {
@@ -1145,7 +1143,7 @@ FmXGridPeer::FmXGridPeer(const Reference 
XMultiServiceFactory  _rxFactory)
 ,m_pGridListener(NULL)
 ,m_xServiceFactory(_rxFactory)
 {
-// nach diesem Constructor muss Create gerufen werden !
+// Create must be called after this constructure
 m_pGridListener = new GridListenerDelegator( this );
 }
 
@@ -1167,7 +1165,7 @@ void FmXGridPeer::Create(Window* pParent, WinBits nStyle)
 // want to hear about row selections
 pWin-setGridListener( m_pGridListener );
 
-// Init muß immer aufgerufen werden
+// Init must always be called
 pWin-Init();
 pWin-SetComponentInterface(this);
 
@@ -1392,7 +1390,7 @@ Sequence Any  SAL_CALL FmXGridPeer::queryFieldData( 
sal_Int32 nRow, const Type
 DbGridRowRef xPaintRow = pGrid-GetPaintRow();
 ENSURE_OR_THROW( xPaintRow.Is(), invalid paint row );
 
-// die Columns des Controls brauche ich fuer GetFieldText