Commit Graph

194 Commits

Author SHA1 Message Date
Stephan Bergmann
7ea5ad6e46 Assumed fix of a clang-analyzer-deadcode.DeadStores
...where the "bOk = false" from the leading "if" is always overwritten in the
following check of "bOk = sTableRange == _sUpdateTableName".  The code had been
effectively like that ever since it got introduced with
4ae41a466a "INTEGRATION: CWS dba30," but it looks
broken.  I assume the two checks of "sTableRange == _sUpdateTableName" for
pNode->GetChild(0) and pNode->GetChild(2) shall only be done if the leading "if"
is not hit.  (And one remaining uncertainty is if really only one of those
"sTableRange == _sUpdateTableName" checks needs to be true or if both should be
true for bOk to be true.)

Change-Id: I453690d65326ed67d7a074d4e4783a743a60d454
2015-10-13 17:40:33 +02:00
Stephan Bergmann
2c5f5976b2 clang-analyzer-deadcode.DeadStores
In 8b9e4e393e "initial import" the assignment to
bCheck was in a for loop that used bCheck in its condition,

  sal_Int32 nPos = m_nStartPos+1;
  for(; aIter != m_pMatrix->end() && bCheck;)
  {
      if(!aIter->isValid())
          ...
      m_pCacheSet->fillValueRow(*aIter++,nPos++);
      bCheck = m_pCacheSet->next();
  }

that loop was then replaced with

  sal_Int32 nPos = m_nStartPos;
  bCheck = fill(aIter,m_pMatrix->end(),nPos,bCheck);

(without further use of bCheck) in 2facbebb88
"MWS_SRX644: migrate branch mws_srx644 -> HEAD" (and the braces around

  {
      ORowSetMatrix::iterator aIter(aEnd);
      sal_Int32 nPos = m_nStartPos + 1;
      bCheck = fill(aIter, m_pMatrix->end(), nPos, bCheck);
  }

introduced in 1234d599d4 "ORowSetCache: overhaul
internals," presumably to limit the scope of that aIter introduced there).

Change-Id: I1cf4a22fbd1b76d524251a82c3ab4e6ca7a9eca1
2015-10-13 17:40:33 +02:00
Lionel Elie Mamane
558b08d55f silence warning when not a warning
Change-Id: I31d7835a5ed3053cd1a930b3fb922d689d6ddcbe
2015-09-17 19:35:57 +02:00
Noel Grandin
7dc5e8731f com::sun::star->css in dbaccess
Change-Id: I4fbdd3fb7d1e0ad4423148aaaed3a15aebb26d14
2015-08-03 13:38:44 +02:00
Andrea Gelmini
87dc6c82d5 Fix typos
Change-Id: Ideb5688a8c9e7cf10038f2e9d00991e8653b1875
Reviewed-on: https://gerrit.libreoffice.org/16706
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-07-03 09:02:48 +00:00
Michael Stahl
7259901b25 dbaccess: log exception messages in ORowSetCache
Change-Id: I1c76d4ce91d1f22d88106918ab139b17f6f017f0
2015-04-29 16:13:10 +02:00
Matthew Nicholls
a1a25f4c6c tdf#88710 Cleanup after removing dbtoolsclient
Removes "virtualdbtools" and its implementation under "simpledbt", which are
mostly wrappers around various dbtools functions and classes, previously aiding
the now removed dynamic loading logic.

Removes IDataAccessTools, IDataAccessTypeConversion and IDataAccessToolsFactory
interfaces and their accompanying implementations which are completely unused.

Removes IDataAccessCharSet (implemented by ODataAccessCharSet) and moves the
implementation into a function which replaces ODataAccessCharsetHelper.

Removes ISQLParseNode and ISQLParser and their implementation in
OSimpleParseNode and OSimpleSQLParser, which simply wrap around OSQLParseNode
and OSQLParser respectively. To avoid including "sqlbison.hxx" unnecessarily,
includes to "sqlbison.hxx" are now only used where needed.

Change-Id: Id882dfbf43514d84a1eaffc1f916d627830c8cd6
Reviewed-on: https://gerrit.libreoffice.org/15450
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
2015-04-22 07:25:17 +00:00
Michael Stahl
0777231112 V803 decreased performance postfix increment
These are pretty silly anyway, but apparently it complains even about
integer variables which make this rather a waste of time.

Change-Id: I15e847d33d5decd2adcab04e4f1567d3997d28a2
2015-03-13 16:23:26 +01:00
Stephan Bergmann
d54a72a408 dbaccess: std::auto_ptr -> std::unique_ptr
Change-Id: I2b27aaf589fcbe4da1680f624a57be7ae62b0dc5
2014-09-25 08:40:12 +02:00
Stephan Bergmann
b396ae62f7 dbaccess: sal_Bool -> bool
Change-Id: Ifad71823e72be71cbd9f9f58a51f4553ff54e4d4
2014-09-12 16:15:27 +02:00
Norbert Thiebaud
ce55457a8f coverity#708787 Unused pointr value
Change-Id: Ib1b0dd07be41d382fa24edbb37d30cbe9ea193fa
2014-07-05 22:41:09 +02:00
Noel Grandin
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
Noel Grandin
184a00b962 loplugin: inlinesimplememberfunctions
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
Noel Grandin
f824604b5c fix spelling
Change-Id: I1a4d66a78549ea49649a6bed92acb44dbd8b13e2
2014-05-21 13:14:11 +02:00
Noel Grandin
794f09f195 simplify ternary conditions "xxx ? true : yyy"
Look for code like:
   xxx ? true : yyy;
Which can be simplified to:
   xxx || yyy

Change-Id: Ib7ca86580bfd0cf04674328a3c0cf3747de4758d
2014-05-06 07:45:25 +02:00
Noel Grandin
fee4efcb54 dbaccess: sal_Bool->bool
Change-Id: Ieb52470f9638b74898954db3890aaf2cf202290a
2014-04-17 11:17:21 +02:00
Stephan Bergmann
9cc60839f3 bool improvements
Change-Id: I294b930214ce82033402afecf2b3eb2d04299505
2014-01-28 20:26:29 +01:00
Arnaud Versini
5b2ba8ed5d DBACCESS : Remove usage of DBG_CTOR and DBG_DTOR.
Valgrind is capable of detecting such bugs. No need for extra macros.

Conflicts:
	dbaccess/source/ui/dlg/tablespage.cxx

Change-Id: I25ea9174a042050efdb371246417ee7f2edae997
Reviewed-on: https://gerrit.libreoffice.org/7532
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-01-21 16:20:10 +00:00
Lionel Elie Mamane
dd0990db74 fdo#72463 RowSet: on execute when not dirty, rebuild cache
Change-Id: I3f27b7572b88cd1200483121614c29d414c37e20
2013-12-12 20:19:06 +01:00
Jelle van der Waa
2ec606730b fdo#62475 removed pointless comments
Conflicts:
	dbaccess/source/filter/xml/xmlfilter.cxx
	dbaccess/source/ui/dlg/ConnectionPage.cxx
	dbaccess/source/ui/dlg/detailpages.cxx
	dbaccess/source/ui/dlg/odbcconfig.cxx
	dbaccess/source/ui/querydesign/querycontroller.cxx

Change-Id: I3a05649efa3a43dd8d8fb069fc1bce14ca0a6338
Reviewed-on: https://gerrit.libreoffice.org/5484
Reviewed-by: Petr Mladek <pmladek@suse.cz>
Tested-by: Petr Mladek <pmladek@suse.cz>
2013-08-27 16:11:09 +00:00
Michael Meeks
1c7af455ab Re-work 8bit characters in source code, or remove them.
Change-Id: I93e14d4936c0ffbe03425d4a54bb0e09bc62b3e3
Reviewed-on: https://gerrit.libreoffice.org/5550
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@suse.com>
Tested-by: Michael Meeks <michael.meeks@suse.com>
2013-08-20 19:30:59 +00:00
Michael Stahl
91f3d77b98 tweak comment translations
ede5f05c fb3a1bb9 5e04331f fd6089b9 66a1d406

Change-Id: I5077ce5f6182f9193cebaaf63190450d375679dd
2013-08-08 23:25:25 +02:00
Luboš Luňák
1946794ae0 mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).

Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-04-07 14:23:11 +02:00
Noel Grandin
a066525b42 fdo#46808, Convert a bunch of comphelper::ComponentContext stuff
.. to Reference<XComponentContext>
mostly in the dbaccess module, but it also affected some other
modules.

Change-Id: I09b3f6fe7a9b33498b11d98b5521b5aeeb8882be
2013-03-20 07:32:53 +02:00
Noel Grandin
0666e43c45 fdo#46808, use service constructor for i18n::CharacterClassification
Change-Id: I0499ad7de27b1539e97f01ab8aa0ef2d6713ae76
2012-11-05 18:05:00 +01:00
Luboš Luňák
f7a24eff2d mark lcl_ functions static or rename them if they are not local at all
http://lists.freedesktop.org/archives/libreoffice/2012-October/039639.html

Change-Id: I231f0b367bf0b513c6c1ce4c4cfdb7c3dc8660d5
2012-10-12 13:34:47 +02:00
Lionel Elie Mamane
7f424c4076 m_nEndPos==m_nStartPos is OK: empty window (for example, empty table)
Change-Id: I5525eb750dfbed282fea272de4a736e6c70e51a9
2012-08-21 19:30:14 +02:00
Lionel Elie Mamane
5b85f6c1ef nPos is 1-based, so allowed to be equal to row count
Change-Id: Idb37cd23a58816bd16c725fda49a2f9875450e79
2012-08-02 12:07:45 +02:00
Michael Meeks
577cf8ff67 re-base on ALv2 code. 2012-06-14 17:41:07 +01:00
Lionel Elie Mamane
43f9468d35 bCheck is guaranteed by the for loop condition
Change-Id: Ia54eaa5cb1aa8bb4a052cea25396b07f048ff74c
2012-06-04 23:43:41 +02:00
Lionel Elie Mamane
df31ed33b7 Remove wrong optimisation
fixup of d4ae29a37873843c20fe7d5f5f071f8fb201fed9
after the call to m_pCacheSet->absolute_checked, the data *is* used,
so we cannot anymore exempt m_pCacheSet from giving correct data.

Change-Id: I7d3644ca08ce43cb030a80984605a1f8a8a64211
2012-06-04 19:22:45 +02:00
Elton Chung
806bec7107 Fix typos in comments 2012-02-13 15:27:24 +00:00
Lionel Elie Mamane
9c6ca789ef reorganise code for better readability
No behaviour change intended. However, if behaviour changed, probably the *old* behaviour is buggy, not new one.
2012-02-09 13:10:29 +01:00
Lionel Elie Mamane
4ea68987e9 typo in comment 2012-02-09 13:10:21 +01:00
Lionel Elie Mamane
843c830953 ORowSetCache::moveWindow: yet another off-by-one error 2012-02-09 13:10:12 +01:00
Lionel Elie Mamane
bd9d0aa967 Revert "Tentative fix for invalid iterator range regression"
This reverts commit 23151ab535.

Fixed root cause in previous commit.
2012-02-09 02:14:05 +01:00
Lionel Elie Mamane
370fa77a41 ORowSetCache::moveWindow fix variable inversion; fixes subsequentcheck 2012-02-09 02:11:05 +01:00
Stephan Bergmann
23151ab535 Tentative fix for invalid iterator range regression
37b5dce665 re-wrote a std::rotate call to cause
an "error: function requires a valid iterator range [__middle, __last)" abort
from debug-mode GCC libstdc++ during smoketest.  Lionel should check whether
this fix is actually good -- at least, it causes "make check" to succeed again.
2012-02-08 21:52:37 +01:00
Lionel Elie Mamane
37b5dce665 ORowSetCache: handle case total data < m_nFetchSize
As a drive-by: fillMatrix update m_nEndSize
2012-02-08 13:22:16 +01:00
Lionel Elie Mamane
5f34f5a859 ORowSetCache: keep m_nEndPos better up-to-date 2012-01-31 22:55:04 +01:00
Lionel Elie Mamane
520b8118f4 ORowSetCache::fillMatrix(): fix case m_nFetchsize > table size
When lowering m_nStartPos, do not duplicate rows above its old value
2012-01-23 10:22:48 +01:00
Lionel Elie Mamane
b026e5a4a1 ORowSetCache::fillMatrix(): correct off-by-one error
Symptom: segfault.
Thanks to Julien Nabet for precise pointer to problematic code.
2012-01-22 01:37:08 +01:00
Lionel Elie Mamane
1234d599d4 ORowSetCache: overhaul internals 2012-01-19 21:08:10 +01:00
Olivier Hallot
545921f914 Fix for fdo43460 Part XII getLength() to isEmpty()
Part XII
Module
dbaccess
2011-12-21 09:52:48 +01:00
Norbert Thiebaud
281b13ce89 remove include of pch header in dbaccess 2011-11-27 13:04:48 -06:00
Caolán McNamara
871426533f just silence the auto_ptr deprecations in isolation 2011-09-22 15:01:05 +01:00
Jan Holesovsky
bc3bbd2bb4 Merge commit 'ooo/DEV300_m106' into libreoffice-3-4
Conflicts:
	dbaccess/source/core/api/CacheSet.cxx
	dbaccess/source/core/api/KeySet.cxx
	dbaccess/source/core/api/KeySet.hxx
	dbaccess/source/core/api/OptimisticSet.hxx
	dbaccess/source/core/api/RowSet.cxx
	dbaccess/source/core/api/RowSetCache.cxx
	dbaccess/source/core/api/query.cxx
	dbaccess/source/core/dataaccess/SharedConnection.cxx
	dbaccess/source/ui/app/AppController.cxx
	dbaccess/source/ui/app/makefile.mk
	dbaccess/source/ui/control/FieldDescControl.cxx
	dbaccess/source/ui/querydesign/query.src
	dbaccess/source/ui/tabledesign/TEditControl.cxx
	reportdesign/source/ui/report/ReportController.cxx
	reportdesign/source/ui/report/ReportSection.cxx
	reportdesign/source/ui/report/SectionWindow.cxx
	reportdesign/source/ui/report/StartMarker.cxx
	reportdesign/source/ui/report/ViewsWindow.cxx
2011-04-22 15:07:40 +02:00
Ocke Janssen [oj]
8473229179 dba34d: #i66846# check bookmarable before use statis resultset 2011-03-18 09:31:06 +01:00
Jan Holesovsky
41bc9ff8d7 Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts:
	dbaccess/source/core/misc/services.cxx
	dbaccess/source/filter/migration/cfgimport.cxx
	reportdesign/source/core/api/ReportDefinition.cxx
2011-03-17 16:09:38 +01:00
Thomas Arnhold
f6ccb8354a Move OSL_ENSURE(0,...) to OSL_FAIL(...) 2011-03-12 14:05:07 +01:00