[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - dbaccess/source
dbaccess/source/ui/querydesign/QueryDesignView.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 1ce2461ab77f2ad28671ac1542509bbb16a155ef Author: Lionel Elie Mamane lio...@mamane.lu Date: Wed Jan 28 21:09:42 2015 +0100 not all OrCriteria have three children and some contain a column in the second child Change-Id: Ifd69758336233ed0233120b3315d4f33655fa994 Reviewed-on: https://gerrit.libreoffice.org/14719 Tested-by: David Tardon dtar...@redhat.com Reviewed-by: David Tardon dtar...@redhat.com diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 880cafc..7f6a1b1 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -1304,9 +1304,11 @@ namespace { bool bRet = true; ::connectivity::OSQLParseNode* pFirstColumnRef = _pFirstColumnRef; -for (int i = 0; i 3 bRet; i+=2) +for (size_t i = 0; i _pCondition-count() bRet; ++i) { const ::connectivity::OSQLParseNode* pChild = _pCondition-getChild(i); +if ( pChild-isToken() ) +continue; if ( SQL_ISRULE(pChild,search_condition) ) bRet = CheckOrCriteria(pChild,pFirstColumnRef); else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - dbaccess/source
dbaccess/source/ui/dlg/tablespage.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 120f748e81aefa863d6c425b85563dbbb70ae4c1 Author: Lionel Elie Mamane lio...@mamane.lu Date: Thu Feb 5 21:29:29 2015 +0100 tdf#89070 Table filter dialog: properly initialise OTableTreeListBox regression from .ui conversion: commit 5c72a213c7c4b588d0c1e0884ff2c46c22425faf Author: Caolán McNamara caol...@redhat.com Date: Tue Jan 21 14:41:16 2014 + convert table filter page to .ui Change-Id: I7bfb7698e2a5303b492766fba564c7b9033bcc52 Change-Id: Ic7d41d64d4c15eabf7b7f83a17482c473154434a Reviewed-on: https://gerrit.libreoffice.org/14343 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index a12bf47..01da2ed 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -81,6 +81,7 @@ namespace dbaui get(m_pTables, TablesFilterPage); get(m_pTablesList, treeview); +m_pTablesList-init(true); m_pTablesList-set_width_request(56 * m_pTablesList-approximate_char_width()); m_pTablesList-set_height_request(12 * m_pTablesList-GetTextHeight()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - dbaccess/source
dbaccess/source/ui/browser/sbagrid.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 605c8d7f4c7b5b431747ced10243e01529b31777 Author: Lionel Elie Mamane lio...@mamane.lu Date: Sun Jan 25 19:01:00 2015 +0100 tdf#73059 isDBReadOnly ensure connection before trying to retrieve it Change-Id: I03f9b8ea72bd6906df61ccf05ead3670d7f90eb7 Reviewed-on: https://gerrit.libreoffice.org/14345 Tested-by: Michael Stahl mst...@redhat.com Reviewed-by: Michael Stahl mst...@redhat.com diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 889e94a..ee7065d 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -991,6 +991,7 @@ bool SbaGridControl::IsReadOnlyDB() const if (xColumns.is()) { Reference XRowSet xDataSource(xColumns-getParent(), UNO_QUERY); +::dbtools::ensureRowSetConnection( xDataSource, getContext(), false ); // NOT SURE ABOUT FALSE Reference XChild xConn(::dbtools::getConnection(xDataSource),UNO_QUERY); if (xConn.is()) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - dbaccess/source
dbaccess/source/ui/browser/sbagrid.cxx | 35 +++-- 1 file changed, 21 insertions(+), 14 deletions(-) New commits: commit eaf6618df939ac5c41281ddf6744c4e8a0f687c5 Author: Caolán McNamara caol...@redhat.com Date: Thu Feb 5 10:30:48 2015 + Resolves: tdf#88825 absent datasource causes exception / abort ::dbtools::ensureRowSetConnection throws on failure, and it can fail of course if the database doesn't exist its not generally useful to throw through a vcl event handler as that just leads back to the dispatch loop. (cherry picked from commit 863122b9adecedfcf35ffac1354ef8a85d5b6827) Conflicts: dbaccess/source/ui/browser/sbagrid.cxx Change-Id: I8e8f4cff06de5684f163ed1b658a8794f54a7df2 Reviewed-on: https://gerrit.libreoffice.org/14330 Reviewed-by: Lionel Elie Mamane lio...@mamane.lu Tested-by: Lionel Elie Mamane lio...@mamane.lu diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 1fd9685..889e94a 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -971,9 +971,9 @@ Reference XPropertySet SbaGridControl::getField(sal_uInt16 nModelPos) else OSL_FAIL(SbaGridControl::getField getColumns returns NULL or ModelPos is than count!); } -catch (const Exception) +catch (const Exception e) { -OSL_FAIL(SbaGridControl::getField Exception occurred!); +SAL_WARN(dbaccess, SbaGridControl::getField Exception occurred: e.Message); } return xEmptyReturn; @@ -984,24 +984,31 @@ bool SbaGridControl::IsReadOnlyDB() const // assume yes if anything fails bool bDBIsReadOnly = true; -// the db is the implemented by the parent of the grid control's model ... -Reference XChild xColumns(GetPeer()-getColumns(), UNO_QUERY); -if (xColumns.is()) +try { -Reference XRowSet xDataSource(xColumns-getParent(), UNO_QUERY); -Reference XChild xConn(::dbtools::getConnection(xDataSource),UNO_QUERY); -if (xConn.is()) +// the db is the implemented by the parent of the grid control's model ... +Reference XChild xColumns(GetPeer()-getColumns(), UNO_QUERY); +if (xColumns.is()) { -// ... and the RO-flag simply is implemented by a property -Reference XPropertySet xDbProps(xConn-getParent(), UNO_QUERY); -if (xDbProps.is()) +Reference XRowSet xDataSource(xColumns-getParent(), UNO_QUERY); +Reference XChild xConn(::dbtools::getConnection(xDataSource),UNO_QUERY); +if (xConn.is()) { -Reference XPropertySetInfo xInfo = xDbProps-getPropertySetInfo(); -if (xInfo-hasPropertyByName(PROPERTY_ISREADONLY)) -bDBIsReadOnly = ::comphelper::getBOOL(xDbProps-getPropertyValue(PROPERTY_ISREADONLY)); +// ... and the RO-flag simply is implemented by a property +Reference XPropertySet xDbProps(xConn-getParent(), UNO_QUERY); +if (xDbProps.is()) +{ +Reference XPropertySetInfo xInfo = xDbProps-getPropertySetInfo(); +if (xInfo-hasPropertyByName(PROPERTY_ISREADONLY)) +bDBIsReadOnly = ::comphelper::getBOOL(xDbProps-getPropertyValue(PROPERTY_ISREADONLY)); +} } } } +catch (const Exception e) +{ +SAL_WARN(dbaccess, SbaGridControl::IsReadOnlyDB Exception occurred: e.Message); +} return bDBIsReadOnly; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - dbaccess/source
dbaccess/source/core/misc/dsntypes.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ce7017cdbe5af3f75cded806f69c1040857b557f Author: Lionel Elie Mamane lio...@mamane.lu Date: Mon Jan 26 04:44:08 2015 +0100 tdf#70236 propertly recognise full Access 2007 URL Change-Id: If1f4986cfffada6a6ab507296a54589bdd5404ff Reviewed-on: https://gerrit.libreoffice.org/14213 Tested-by: Michael Stahl mst...@redhat.com Reviewed-by: Michael Stahl mst...@redhat.com diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx index 7524ff2..835dbd3 100644 --- a/dbaccess/source/core/misc/dsntypes.cxx +++ b/dbaccess/source/core/misc/dsntypes.cxx @@ -368,7 +368,7 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const OUString _rDsn) const { if (sDsn.startsWithIgnoreAsciiCase(sdbc:ado:access)) { -if (sDsn.equalsIgnoreAsciiCase(sdbc:ado:access:Provider=Microsoft.ACE.OLEDB.12.0;)) +if (sDsn.startsWithIgnoreAsciiCase(sdbc:ado:access:Provider=Microsoft.ACE.OLEDB.12.0;)) return DST_MSACCESS_2007; else return DST_MSACCESS; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - dbaccess/source
dbaccess/source/core/api/RowSetBase.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit db4be3fee9369d8a0bb2df07c25564f19eb564ed Author: Lionel Elie Mamane lio...@mamane.lu Date: Thu Jan 22 13:42:13 2015 +0100 fdo#88475 RowSetBase: reposition cache before interrogating it This partially reverts: commit d20232a77565f46fedc0b556f4d50addff4d3559 Author: Lionel Elie Mamane lio...@mamane.lu Date: Thu Dec 6 13:22:06 2012 +0100 Don't force refresh when higher up code did not request it Change-Id: I0f415c96fc05c1d776d14885751aef020c42f4ae which did not take into account that the cache is shared with the clones. This is not a cherry-pick from master, but a more conservative version of commit d7c9a1d9d65fe8b1a56c5c280d2ca6640a549d2f. Change-Id: I1fa5c3169806760d35dd07e1fc1b8d5522dd3641 Reviewed-on: https://gerrit.libreoffice.org/14104 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx index 5d9438e..47342a2 100644 --- a/dbaccess/source/core/api/RowSetBase.cxx +++ b/dbaccess/source/core/api/RowSetBase.cxx @@ -657,6 +657,7 @@ sal_Bool SAL_CALL ORowSetBase::isFirst( ) throw(SQLException, RuntimeException, if ( impl_rowDeleted() ) return ( m_nDeletedPosition == 1 ); +positionCache( MOVE_NONE_REFRESH_ONLY ); bool bIsFirst = m_pCache-isFirst(); SAL_INFO(dbaccess, ORowSetBase::isFirst() = bIsFirst Clone = m_bClone); @@ -686,6 +687,7 @@ sal_Bool SAL_CALL ORowSetBase::isLast( ) throw(SQLException, RuntimeException, return ( m_nDeletedPosition == impl_getRowCount() ); } +positionCache( MOVE_NONE_REFRESH_ONLY ); bool bIsLast = m_pCache-isLast(); SAL_INFO(dbaccess, ORowSetBase::isLast() = bIsLast Clone = m_bClone); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - dbaccess/source dbaccess/uiconfig
dbaccess/source/ui/dlg/advancedsettings.cxx |1 dbaccess/uiconfig/ui/specialsettingspage.ui | 36 ++-- 2 files changed, 19 insertions(+), 18 deletions(-) New commits: commit db3ab19f6ca3252141f7e7f858fdde406a890cec Author: Caolán McNamara caol...@redhat.com Date: Wed Jan 7 09:55:46 2015 + Resolves: fdo#87840 by default hide all feature checkboxes and explicitly show the supported ones (cherry picked from commit fef5c2b81d1ac7d64e01521da792f470b03a1841) Conflicts: dbaccess/uiconfig/ui/specialsettingspage.ui Change-Id: I93d998472a82085da9bd5a8ec7ad4cb39998e198 Reviewed-on: https://gerrit.libreoffice.org/13789 Reviewed-by: Lionel Elie Mamane lio...@mamane.lu Tested-by: Lionel Elie Mamane lio...@mamane.lu diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index 399369d..3c41665 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -98,6 +98,7 @@ namespace dbaui { get((*setting-ppControl), setting-sControlId); (*setting-ppControl)-SetClickHdl( getControlModifiedLink() ); +(*setting-ppControl)-Show(); // check whether this must be a tristate check box const SfxPoolItem rItem = _rCoreAttrs.Get( nItemId ); diff --git a/dbaccess/uiconfig/ui/specialsettingspage.ui b/dbaccess/uiconfig/ui/specialsettingspage.ui index 0072f8c..48ee74e 100644 --- a/dbaccess/uiconfig/ui/specialsettingspage.ui +++ b/dbaccess/uiconfig/ui/specialsettingspage.ui @@ -1,7 +1,7 @@ ?xml version=1.0 encoding=UTF-8? -!-- Generated with glade 3.16.0 on Wed Jan 29 13:37:30 2014 -- +!-- Generated with glade 3.16.1 -- interface - !-- interface-requires gtk+ 3.0 -- + requires lib=gtk+ version=3.0/ object class=GtkFrame id=SpecialSettingsPage property name=visibleTrue/property property name=can_focusFalse/property @@ -26,9 +26,9 @@ child object class=GtkCheckButton id=usesql92 property name=label translatable=yesUse SQL92 naming constraints/property -property name=visibleTrue/property property name=can_focusTrue/property property name=receives_defaultFalse/property +property name=no_show_allTrue/property property name=use_underlineTrue/property property name=xalign0/property property name=draw_indicatorTrue/property @@ -43,9 +43,9 @@ child object class=GtkCheckButton id=append property name=label translatable=yesAppend the table alias name on SELECT statements/property -property name=visibleTrue/property property name=can_focusTrue/property property name=receives_defaultFalse/property +property name=no_show_allTrue/property property name=use_underlineTrue/property property name=xalign0/property property name=draw_indicatorTrue/property @@ -60,9 +60,9 @@ child object class=GtkCheckButton id=useas property name=label translatable=yesUse keyword AS before table alias names/property -property name=visibleTrue/property property name=can_focusTrue/property property name=receives_defaultFalse/property +property name=no_show_allTrue/property property name=use_underlineTrue/property property name=xalign0/property property name=draw_indicatorTrue/property @@ -77,9 +77,9 @@ child object class=GtkCheckButton id=useoj property name=label translatable=yesUse Outer Join syntax '{oj }'/property -property name=visibleTrue/property property name=can_focusTrue/property property name=receives_defaultFalse/property +property name=no_show_allTrue/property property name=use_underlineTrue/property property name=xalign0/property property name=draw_indicatorTrue/property @@ -94,9 +94,9 @@ child object class=GtkCheckButton id=ignoreprivs property name=label translatable=yesIgnore the privileges from the database driver/property -property name=visibleTrue/property property name=can_focusTrue/property property name=receives_defaultFalse/property +property name=no_show_allTrue/property property name=use_underlineTrue/property property name=xalign0/property property name=draw_indicatorTrue/property @@ -111,9 +111,9 @@ child object
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - dbaccess/source
dbaccess/source/ui/dlg/advancedsettings.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit bda665c442c5e59f5d6656a7d3e54ed1dfdc1b01 Author: Julien Nabet serval2...@yahoo.fr Date: Wed Dec 31 13:57:19 2014 +0100 Related fdo#87840: mix between ignorecurrency and inputchecks Cherry-picked from: 0f9ce69b327ee14f028c26e6af275779b8047def Change-Id: I38501b371b8c63ab2e6fb019e17416e139120908 Reviewed-on: https://gerrit.libreoffice.org/13711 Reviewed-by: David Tardon dtar...@redhat.com Tested-by: David Tardon dtar...@redhat.com diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index 288f943..399369d 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -154,8 +154,8 @@ namespace dbaui { m_pSchema, useschemaname, DSID_SCHEMA,false }, { m_pIndexAppendix,createindex, DSID_INDEXAPPENDIX, false }, { m_pDosLineEnds, eol, DSID_DOSLINEENDS, false }, -{ m_pIgnoreCurrency, inputchecks, DSID_IGNORECURRENCY,false }, -{ m_pCheckRequiredFields, ignorecurrency, DSID_CHECK_REQUIRED_FIELDS, false }, +{ m_pCheckRequiredFields, inputchecks, DSID_CHECK_REQUIRED_FIELDS, false }, +{ m_pIgnoreCurrency, ignorecurrency, DSID_IGNORECURRENCY,false }, { m_pEscapeDateTime, useodbcliterals, DSID_ESCAPE_DATETIME, false }, { m_pPrimaryKeySupport,primarykeys, DSID_PRIMARY_KEY_SUPPORT, false }, { m_pRespectDriverResultSetType, resulttype, DSID_RESPECTRESULTSETTYPE, false }, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - dbaccess/source
dbaccess/source/core/api/RowSet.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 85da280aaa29775cda87af128bfdf7d37f4708f2 Author: Lionel Elie Mamane lio...@mamane.lu Date: Mon Oct 6 12:22:03 2014 +0200 fdo#84658 on reexec, cancel modification before resetting IsModification state Change-Id: I878bff4d36ca1c2dd9474c937b03d0b366a6e911 Reviewed-on: https://gerrit.libreoffice.org/11824 Reviewed-by: Miklos Vajna vmik...@collabora.co.uk Tested-by: Miklos Vajna vmik...@collabora.co.uk diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 216e2da..c136c03 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -561,6 +561,8 @@ void ORowSet::freeResources( bool _bComplete ) } m_aClones.clear(); +doCancelModification(); + m_aBookmark = Any(); m_bBeforeFirst = true; m_bAfterLast= false; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - dbaccess/source dbaccess/uiconfig
dbaccess/source/ui/querydesign/querydlg.cxx |5 + dbaccess/uiconfig/ui/joindialog.ui |1 + 2 files changed, 6 insertions(+) New commits: commit a3de6b662444bafd3b102b6991866ed4c7206965 Author: Caolán McNamara caol...@redhat.com Date: Mon Sep 8 15:49:24 2014 +0100 Resolves: fdo#83501 STR_QUERY_* populate the join dialog (cherry picked from commit 3fc1e691c5e14f3b7a2579b563188e814f731cf6) Change-Id: Id4cff969297009c9f9cd3323ac01c743b29ca6c4 Reviewed-on: https://gerrit.libreoffice.org/11340 Reviewed-by: David Tardon dtar...@redhat.com Tested-by: David Tardon dtar...@redhat.com diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx index b655a9b..23db605 100644 --- a/dbaccess/source/ui/querydesign/querydlg.cxx +++ b/dbaccess/source/ui/querydesign/querydlg.cxx @@ -55,6 +55,11 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent, , m_xConnection(_xConnection) { get(m_pML_HelpText, helptext); +Size aSize(LogicToPixel(Size(179, 49), MAP_APPFONT)); +//alternatively loop through the STR_QUERY_* strings with their STR_JOIN_TYPE_HINT +//suffix to find the longest entry at runtime +m_pML_HelpText-set_height_request(aSize.Height()); +m_pML_HelpText-set_width_request(aSize.Width()); get(m_pLB_JoinType, type); get(m_pCBNatural, natural); get(m_pPB_OK, ok); diff --git a/dbaccess/uiconfig/ui/joindialog.ui b/dbaccess/uiconfig/ui/joindialog.ui index 650fc44..7be2283 100644 --- a/dbaccess/uiconfig/ui/joindialog.ui +++ b/dbaccess/uiconfig/ui/joindialog.ui @@ -167,6 +167,7 @@ property name=visibleTrue/property property name=can_focusFalse/property property name=xalign0/property +property name=yalign0/property property name=wrapTrue/property property name=max_width_chars48/property /object ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - dbaccess/source
dbaccess/source/core/api/CRowSetColumn.cxx | 10 -- dbaccess/source/core/api/CRowSetColumn.hxx |2 - dbaccess/source/core/api/CRowSetDataColumn.cxx | 38 +++-- dbaccess/source/core/api/CRowSetDataColumn.hxx |7 ++-- dbaccess/source/core/api/RowSet.cxx|7 ++-- 5 files changed, 34 insertions(+), 30 deletions(-) New commits: commit 3dc29ff5846160060587d41f22868486ffd4e96e Author: Lionel Elie Mamane lio...@mamane.lu Date: Wed Aug 6 15:17:13 2014 +0200 fdo#82151 when constructing column object, replace m_aCurrentRow by a function The passed m_aCurrentRow becomes out-of-date as soon as the current row changes. This also hides an implementation detail of ORowSet to ORowSet(Data)Column. Functional squelch of the following master commits: Change-Id: Ib9188743e5dd6dec240e9f5fd3fd9655c6761abc commit id: 03a2b4a80c5854bcb8520f2a43e485b98e3eba8f Change-Id: I527cc35ae120cf083f7c69a9a23526839a2bbddb commit id: 90b09303ef4f9163428107be7b8db23022ce10b7 Change-Id: If813a1544ec9a5dac6f87197982d10576c91cd8c commit id: 5be4407d0716f78acdcdf24de135af91f17e51be + keep older behaviour of confusing no value and null value. Change-Id: Ib9188743e5dd6dec240e9f5fd3fd9655c6761abc Reviewed-on: https://gerrit.libreoffice.org/10796 Reviewed-by: David Tardon dtar...@redhat.com Tested-by: David Tardon dtar...@redhat.com diff --git a/dbaccess/source/core/api/CRowSetColumn.cxx b/dbaccess/source/core/api/CRowSetColumn.cxx index 945b15f..adc3d38 100644 --- a/dbaccess/source/core/api/CRowSetColumn.cxx +++ b/dbaccess/source/core/api/CRowSetColumn.cxx @@ -36,9 +36,13 @@ using namespace ::com::sun::star::beans; namespace dbaccess { -ORowSetColumn::ORowSetColumn( const Reference XResultSetMetaData _xMetaData, const Reference XRow _xRow, sal_Int32 _nPos, -const Reference XDatabaseMetaData _rxDBMeta, const OUString _rDescription, const OUString i_sLabel,ORowSetCacheIterator _rColumnValue ) -:ORowSetDataColumn( _xMetaData, _xRow, NULL, _nPos, _rxDBMeta, _rDescription, i_sLabel,_rColumnValue ) +ORowSetColumn::ORowSetColumn( const Reference XResultSetMetaData _xMetaData, + const Reference XRow _xRow, sal_Int32 _nPos, + const Reference XDatabaseMetaData _rxDBMeta, + const OUString _rDescription, + const OUString i_sLabel, + const boost::function const ::connectivity::ORowSetValue ( sal_Int32 ) _getValue ) +:ORowSetDataColumn( _xMetaData, _xRow, NULL, _nPos, _rxDBMeta, _rDescription, i_sLabel, _getValue ) { } diff --git a/dbaccess/source/core/api/CRowSetColumn.hxx b/dbaccess/source/core/api/CRowSetColumn.hxx index bba7c7d..0c4ec82 100644 --- a/dbaccess/source/core/api/CRowSetColumn.hxx +++ b/dbaccess/source/core/api/CRowSetColumn.hxx @@ -38,7 +38,7 @@ namespace dbaccess const ::com::sun::star::uno::Reference ::com::sun::star::sdbc::XDatabaseMetaData _rxDBMeta, const OUString _rDescription, const OUString i_sLabel, -ORowSetCacheIterator _rColumnValue); +const boost::function const ::connectivity::ORowSetValue ( sal_Int32 ) _getValue); virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const SAL_OVERRIDE; virtual ::cppu::IPropertyArrayHelper SAL_CALL getInfoHelper() SAL_OVERRIDE; diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx index f0de794..3f2901d 100644 --- a/dbaccess/source/core/api/CRowSetDataColumn.cxx +++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx @@ -24,6 +24,7 @@ #include comphelper/types.hxx #include cppuhelper/typeprovider.hxx #include com/sun/star/beans/PropertyAttribute.hpp +#include com/sun/star/lang/WrappedTargetRuntimeException.hpp #include tools/debug.hxx using namespace dbaccess; @@ -39,16 +40,16 @@ using namespace cppu; using namespace osl; -ORowSetDataColumn::ORowSetDataColumn( const Reference XResultSetMetaData _xMetaData, +ORowSetDataColumn::ORowSetDataColumn( const Reference XResultSetMetaData _xMetaData, const Reference XRow _xRow, const Reference XRowUpdate _xRowUpdate, sal_Int32 _nPos, const Reference XDatabaseMetaData _rxDBMeta, const OUString _rDescription, const OUString i_sLabel, - const ORowSetCacheIterator _rColumnValue) + const boost::function const ORowSetValue (sal_Int32) _getValue)
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - dbaccess/source
dbaccess/source/core/api/RowSet.cxx |4 1 file changed, 4 insertions(+) New commits: commit aac6ed7a67e70c2548d81484b2930f2a0ce1e4aa Author: Lionel Elie Mamane lio...@mamane.lu Date: Wed Aug 6 15:33:46 2014 +0200 Don't leak the previous cache Conflicts: dbaccess/source/core/api/RowSet.cxx Change-Id: I61cb1c608a7de8efc63533085e86c6c17c05f545 Reviewed-on: https://gerrit.libreoffice.org/10795 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index ca83936..d4795ee 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -1701,6 +1701,10 @@ Reference XResultSet ORowSet::impl_prepareAndExecute_throw() aComposedUpdateTableName = composeTableName( m_xActiveConnection-getMetaData(), m_aUpdateCatalogName, m_aUpdateSchemaName, m_aUpdateTableName, false, ::dbtools::eInDataManipulation ); SAL_INFO(dbaccess, ORowSet::execute_NoApprove_NoNewConn: creating cache ); +if(m_pCache) +{ +DELETEZ(m_pCache); +} m_pCache = new ORowSetCache( xResultSet, m_xComposer.get(), m_aContext, aComposedUpdateTableName, m_bModified, m_bNew,m_aParameterValueForCache,m_aFilter,m_nMaxRows ); if ( m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - dbaccess/source
dbaccess/source/ui/dlg/dlgattr.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 2c57f8b716a5e8e378ac4fe85ef1d62a4fc65dce Author: Caolán McNamara caol...@redhat.com Date: Tue Aug 12 09:01:28 2014 +0100 Resolves: fdo#82413 crash in format-column Change-Id: I3af776c14ec0f224884488fdc99ee26ebbba7cb8 (cherry picked from commit e2d2fa4f0663cf990c0595f8827ff9123c88d41a) Reviewed-on: https://gerrit.libreoffice.org/10876 Reviewed-by: David Tardon dtar...@redhat.com Tested-by: David Tardon dtar...@redhat.com diff --git a/dbaccess/source/ui/dlg/dlgattr.cxx b/dbaccess/source/ui/dlg/dlgattr.cxx index 0a83ba3..8af7569 100644 --- a/dbaccess/source/ui/dlg/dlgattr.cxx +++ b/dbaccess/source/ui/dlg/dlgattr.cxx @@ -39,13 +39,14 @@ SbaSbAttrDlg::SbaSbAttrDlg(Window* pParent, const SfxItemSet* pCellAttrs, : SfxTabDialog(pParent, FieldDialog, dbaccess/ui/fielddialog.ui, pCellAttrs) , m_nNumberFormatId(0) { - pNumberInfoItem = new SvxNumberInfoItem( pFormatter, 0 ); if (bRow) SetText(getFixedText(alttitle)-GetText()); if (bHasFormat) m_nNumberFormatId = AddTabPage(format, RID_SVXPAGE_NUMBERFORMAT); +else +RemoveTabPage(format); AddTabPage(alignment, RID_SVXPAGE_ALIGNMENT); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - dbaccess/source
dbaccess/source/core/dataaccess/documentdefinition.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8bee126e1c8fe83c909fd65d8a2ea5d7fb421da1 Author: Julien Nabet serval2...@yahoo.fr Date: Mon Jun 30 23:27:34 2014 +0200 Resolves fdo#43277 Send Legacy Report E-Mail as ...=error message Cherry-picked from 501ebd0f7c867c4df5ba84fd8b6b1a197aeeea92 Change-Id: Iaaadd4fd3015214c007a86d1a83f837aa0d2bdb6 Reviewed-on: https://gerrit.libreoffice.org/9997 Reviewed-by: Christian Lohmaier lohmaier+libreoff...@googlemail.com Tested-by: Christian Lohmaier lohmaier+libreoff...@googlemail.com diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index 1c06b44..e5494e4 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -931,7 +931,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any _rOpenArgument, cons if ( m_bForm ) xModule-setIdentifier( com.sun.star.sdb.FormDesign ); else if ( !xReportDefinition.is() ) -xModule-setIdentifier( com.sun.star.sdb.TextReportDesign ); +xModule-setIdentifier( com.sun.star.text.TextDocument ); updateDocumentTitle(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - dbaccess/source
dbaccess/source/core/api/RowSet.cxx | 46 +--- 1 file changed, 27 insertions(+), 19 deletions(-) New commits: commit 98986a5167438808871e8094dbf815c72282ca0b Author: Lionel Elie Mamane lio...@mamane.lu Date: Mon Jun 16 08:41:46 2014 +0200 fdo#79427 after execute() a ResultSet is expected to be BeforeFirst Squash the three commits in master: Change-Id: I38091d1ee2161d6e32da3a0bde60e3fc008aa83d Change-Id: Iaa881d055923702acbb96862d187af41a6ded730 Change-Id: I3e34f77ce37c239d8d3d6a8cd7514b125b049de6 1) fdo#79427 after execute() a ResultSet is expected to be BeforeFirst 2) clean up fdo#79427 fix: force BeforeFirst only at execute(), not updateRow() 3) dbaccess::ORowSet: separate impl_rebuild_throw Used by two different callers that wanted different things. Also, freeResources now always positions on BeforeFirst. It is only called with _bComplete==false by execute()-related code. Change-Id: I3cce4334c4ed49855c98fbe5960fb68685c61ed9 Reviewed-on: https://gerrit.libreoffice.org/9813 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 644b937..ca83936 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -560,6 +560,15 @@ void ORowSet::freeResources( bool _bComplete ) } m_aClones.clear(); +m_aBookmark = Any(); +m_bBeforeFirst = true; +m_bAfterLast= false; +m_bNew = false; +m_bModified = false; +m_bIsInsertRow = false; +m_bLastKnownRowCountFinal = false; +m_nLastKnownRowCount = 0; + if ( _bComplete ) { // the columns must be disposed before the querycomposer is disposed because @@ -588,14 +597,6 @@ void ORowSet::freeResources( bool _bComplete ) m_xStatement= NULL; m_xTypeMap = NULL; -m_aBookmark = Any(); -m_bBeforeFirst = true; -m_bAfterLast= false; -m_bNew = false; -m_bModified = false; -m_bIsInsertRow = false; -m_bLastKnownRowCountFinal = false; -m_nLastKnownRowCount = 0; if ( m_aOldRow.is() ) m_aOldRow-clearRow(); @@ -2006,7 +2007,22 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard _rClearForNotifi } else // !m_bCommandFacetsDirty { -impl_rebuild_throw(_rClearForNotification); +Reference XResultSet xResultSet; +if(m_bParametersDirty) +{ +xResultSet = impl_prepareAndExecute_throw(); +} +else +{ +xResultSet = m_xStatement-executeQuery(); +m_pCache-reset(xResultSet); +} +// let our warnings container forget the reference to the (possibly disposed) old result set +m_aWarnings.setExternalWarnings( NULL ); +// clear all current warnings +m_aWarnings.clearWarnings(); +// let the warnings container know about the new external warnings +m_aWarnings.setExternalWarnings( Reference XWarningsSupplier ( xResultSet, UNO_QUERY ) ); } checkCache(); // notify the rowset listeners @@ -2731,16 +2747,8 @@ void SAL_CALL ORowSet::refreshRow( ) throw(SQLException, RuntimeException, std: void ORowSet::impl_rebuild_throw(::osl::ResettableMutexGuard _rGuard) { -Reference XResultSet xResultSet; -if(m_bParametersDirty) -{ -xResultSet = impl_prepareAndExecute_throw(); -} -else -{ -xResultSet = m_xStatement-executeQuery(); -m_pCache-reset(xResultSet); -} +Reference XResultSet xResultSet(m_xStatement-executeQuery()); +m_pCache-reset(xResultSet); m_aWarnings.setExternalWarnings( Reference XWarningsSupplier ( xResultSet, UNO_QUERY ) ); notifyAllListeners(_rGuard); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - dbaccess/source
dbaccess/source/ui/browser/brwctrlr.cxx |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit a730fe78a8d8aa1edf81ccb16622f6d10ebd20e6 Author: Lionel Elie Mamane lio...@mamane.lu Date: Mon Jun 9 08:31:54 2014 +0200 fdo#79786 implement getFormOperations for data grid (table view) Change-Id: I704057b25ca11633ba62fbb834bd2e6095f348f3 Reviewed-on: https://gerrit.libreoffice.org/9686 Reviewed-by: Lionel Elie Mamane lio...@mamane.lu Tested-by: Lionel Elie Mamane lio...@mamane.lu diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index fd19148..8b8b354 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -43,6 +43,7 @@ #include com/sun/star/form/XSubmit.hpp #include com/sun/star/form/XSubmitListener.hpp #include com/sun/star/form/runtime/XFormController.hpp +#include com/sun/star/form/runtime/FormOperations.hpp #include com/sun/star/sdb/CommandType.hpp #include com/sun/star/sdb/ErrorCondition.hpp #include com/sun/star/sdb/ParametersRequest.hpp @@ -93,6 +94,7 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::task; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::frame; +using namespace ::com::sun::star::form::runtime; using namespace ::com::sun::star::form; using namespace ::com::sun::star::util; using namespace ::com::sun::star::lang; @@ -255,8 +257,7 @@ SbaXDataBrowserController::FormControllerImpl::~FormControllerImpl() Reference runtime::XFormOperations SAL_CALL SbaXDataBrowserController::FormControllerImpl::getFormOperations() throw (RuntimeException, std::exception) { -SAL_WARN(dbaccess.ui, SbaXDataBrowserController::FormControllerImpl::getFormOperations: not supported! ); -return NULL; +return FormOperations::createWithFormController( m_pOwner-m_xContext, this ); } Reference ::com::sun::star::awt::XControl SbaXDataBrowserController::FormControllerImpl::getCurrentControl(void) throw( RuntimeException, std::exception ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - dbaccess/source
dbaccess/source/ui/dlg/indexdialog.cxx |2 +- dbaccess/source/ui/inc/indexdialog.hxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit fcf3364343315f8d391e0c824646b5602240418d Author: Caolán McNamara caol...@redhat.com Date: Wed Jun 4 09:17:52 2014 +0100 fix index dialog regression thanks to sk94 for noticing this when trying to convert this to .ui Change-Id: If7130d53acb7c194cf0a9a4301f3573789888b86 (cherry picked from commit 3e66a5b5c6d1f602db2af5b5b44f5f41c83918f9) diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index 7cc9953..c713d10 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -142,7 +142,7 @@ namespace dbaui enableSelectHandler(); } -bool DbaIndexList::Select( SvTreeListEntry* pEntry, sal_Bool _bSelect ) +bool DbaIndexList::Select(SvTreeListEntry* pEntry, bool _bSelect) { bool bReturn = SvTreeListBox::Select(pEntry, _bSelect); diff --git a/dbaccess/source/ui/inc/indexdialog.hxx b/dbaccess/source/ui/inc/indexdialog.hxx index 7c9100e..aef406f 100644 --- a/dbaccess/source/ui/inc/indexdialog.hxx +++ b/dbaccess/source/ui/inc/indexdialog.hxx @@ -56,7 +56,7 @@ namespace dbaui void SetEndEditHdl(const Link _rHdl) { m_aEndEditHdl = _rHdl; } Link GetEndEditHdl() const { return m_aEndEditHdl; } -virtual bool Select( SvTreeListEntry* pEntry, sal_Bool bSelect ); +virtual bool Select(SvTreeListEntry* pEntry, bool bSelect) SAL_OVERRIDE; void enableSelectHandler(); void disableSelectHandler(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - dbaccess/source
dbaccess/source/ui/dlg/indexdialog.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b8cda0d73c0311e71f99cf8d7283abcf62164e30 Author: Stephan Bergmann sberg...@redhat.com Date: Wed Jun 4 10:47:02 2014 +0200 loplugin:literaltoboolconversion Change-Id: Ie871fa9378bbb34eacd3205f9485a6f89f833674 (cherry picked from commit 3e336d69e32ddfac624c450b7bb990dfea1f9c3b) diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index c713d10..6857e2b 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -138,7 +138,7 @@ namespace dbaui void DbaIndexList::SelectNoHandlerCall( SvTreeListEntry* _pEntry ) { disableSelectHandler(); -Select(_pEntry, sal_True); +Select(_pEntry, true); enableSelectHandler(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - dbaccess/source
dbaccess/source/ui/browser/brwctrlr.cxx | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) New commits: commit e8567278f06e957fcdc0e5afb9aa9d423ef1f55a Author: Lionel Elie Mamane lio...@mamane.lu Date: Sat May 31 05:52:00 2014 +0200 fdo#73352 don't crash if clearWarnings throws an SQLException Change-Id: If67bda43589834e4c922056145bc60884728cb8a Reviewed-on: https://gerrit.libreoffice.org/9592 Reviewed-by: Eike Rathke er...@redhat.com Tested-by: Eike Rathke er...@redhat.com diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index cae373c..fd19148 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -600,7 +600,16 @@ void SbaXDataBrowserController::onStartLoading( const Reference XLoadable _r Reference XWarningsSupplier xWarnings( _rxLoadable, UNO_QUERY ); if ( xWarnings.is() ) -xWarnings-clearWarnings(); +{ +try +{ +xWarnings-clearWarnings(); +} +catch(const SQLException e) +{ +DBG_UNHANDLED_EXCEPTION(); +} +} } void SbaXDataBrowserController::impl_checkForCannotSelectUnfiltered( const SQLExceptionInfo _rError ) @@ -666,7 +675,7 @@ bool SbaXDataBrowserController::reloadForm( const Reference XLoadable _rxLoa } catch(const SQLException e) { -(void)e; +DBG_UNHANDLED_EXCEPTION(); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits