Commit Graph

1417 Commits

Author SHA1 Message Date
Stephan Bergmann
25fd3077e8 loplugin:includeform: connectivity
Change-Id: I06596fac09f0568b8bab2e2e235a2b88bcd3fc7a
2017-10-23 22:46:11 +02:00
Stephan Bergmann
aa5d391c82 Make include files found through -Iconnectivity/source/inc
...instead of implicitly next to the including file, in preparation of
loplugin:includeform

Change-Id: I4272c5e24eb887a36a6f3c296def375956f56499
2017-10-16 17:15:08 +02:00
Noel Grandin
c8cbcd7748 use more rtl::Reference in connectivity
instead of manual ref counting

Change-Id: I210d4a2cd6487bd2d7d81a53106b484fe411ca9b
Reviewed-on: https://gerrit.libreoffice.org/43203
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-06 21:29:02 +02:00
Stephan Bergmann
7f0bf6220b Revert "check for unnecessary DLLPUBLIC annotations"
This reverts commit a599eeab78, plus follow-up
fa4431449d "Avoid bogus loplugin:dllmacro
'unnecessary *DLLPUBLIC declaration ...'".  See (abandoned)
<https://gerrit.libreoffice.org/#/c/42983/> "loplugin:dllmacro: Handle implicit
member functions" how this would have needed to be extended to give consistent
results across Linux and macOS, but then would have started to remove DLLPUBLIC
from entities that apparently need to at least have default type visibility on
macOS and started to make tests fail.
2017-10-04 13:45:39 +02:00
Noel Grandin
a599eeab78 check for unnecessary DLLPUBLIC annotations
on classes which are fully defined in a header file

Rename the dllprivate plugin to dllmacro and add the functionality
there.

Change-Id: I4581d551c46a8f61213d95973f323359d08278d8
2017-09-29 10:37:47 +02:00
Miklos Vajna
020c3eebc2 connectivity DatabaseMetaData: pull out OComponent from OCalc/Writer
Only getURL() and getTables() is custom, the rest can be shared.

Change-Id: I9d282a30f722bce0c05b37c7d005c84193e01b7c
Reviewed-on: https://gerrit.libreoffice.org/42152
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-09-11 12:27:13 +02:00
Julien Nabet
70d9ae239b Use vector and replace m_aBatchList by m_aBatchVector
Change-Id: I7c2c529eb78679f9733374bf0785773684c728c4
Reviewed-on: https://gerrit.libreoffice.org/41770
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-08-31 21:44:10 +02:00
Julien Nabet
39c6112b5b Replace list by vector for getResourceStringWithSubstitution
Change-Id: I0b09a575971286ecc4d3bbc40926b949e9ab28c0
Reviewed-on: https://gerrit.libreoffice.org/41768
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-08-31 20:52:16 +02:00
Stephan Bergmann
dc3fc59fba loplugin:constparams: connectivity (clang-cl)
Change-Id: I6dc7939f42aa1d1d62f8c71f5a5529becdffa704
2017-08-31 12:14:39 +02:00
Noel Grandin
a209172669 loplugin:constantparam
Change-Id: Ib92aba17c46a4ada75c2a0630f281759d995f32e
Reviewed-on: https://gerrit.libreoffice.org/40843
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-08 08:08:35 +02:00
Noel Grandin
2675cbf042 loplugin:singlevalfields
Change-Id: I8908479ecf513cdf2ecb4bcbe7c1078ef80671cf
Reviewed-on: https://gerrit.libreoffice.org/40838
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-08 08:08:26 +02:00
Miklos Vajna
8a24df0bed connectivity: partially merge OWriterTable and OCalcTable
Factor out the common code of these into a new OComponentTable.

Change-Id: I57abac05c9b64cde69d17568e325e86b3c530b20
Reviewed-on: https://gerrit.libreoffice.org/40648
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-02 09:55:58 +02:00
Noel Grandin
612b489d3e loplugin:checkunusedparams
the "check for taking address of function" part was generating false+

Change-Id: Iad6203850901229b7b1b2f8938c68ec703cd343f
Reviewed-on: https://gerrit.libreoffice.org/40613
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-01 11:06:26 +02:00
Noel Grandin
b09deb0753 loplugin:constparams handle constructors
had to change the structure of the plugin considerably, was too messy to
structure it to do the calculations on a per-function basis

Change-Id: I4edee7735f726101105c607368124a08dba21086
Reviewed-on: https://gerrit.libreoffice.org/40516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-28 14:51:56 +02:00
Noel Grandin
18f80da7a6 loplugin:checkunusedparams more part2
Change-Id: Ibb940c2a7098313dfa282734894b1abc1ac40bc2
Reviewed-on: https://gerrit.libreoffice.org/40489
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-28 07:18:23 +02:00
Caolán McNamara
182a74d937 de-hrc various things
e.g.  helpid[s].hrc -> helpids.h
and insert include guards where missing

move "ordinary" defines into .hxx files

remove .hrc entries that are used as arguments to dialog factory
when a dedicated method can be added instead

Change-Id: I792fb8eb0adfaa63cf354e6e57401fc943e9196e
2017-07-21 08:20:51 +01:00
Caolán McNamara
00657aef09 migrate to boost::gettext
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl
* all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string")
* ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching
  MODULE .mo files
* UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui
  goes from l10n target to normal one, so the res/lang.zips of UI files go away
* translation via Translation::get(hrc-define-key, imbued-std::locale)
* python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there
  to keep finding the .hrc file uniform) so magic numbers can go away there
* java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation
  mechanism
* en-US res files go away, their strings are now the .hrc keys in the source code
* remaining .res files are replaced by .mo files
* in .res/.ui-lang-zip files, the old scheme missing translations of strings
  results in inserting the english original so something can be found, now the
  standard fallback of using the english original from the source key is used, so
  partial translations shrink dramatically in size
* extract .hrc strings with hrcex which backs onto
   xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap
* extract .ui strings with uiex which backs onto
   xgettext --add-comments --no-wrap
* qtz for gettext translations is generated at runtime as ascii-ified crc32 of
   content + "|" + msgid
* [API CHANGE] remove deprecated binary .res resouce loader related uno apis
      com::sun::resource::OfficeResourceLoader
      com::sun::resource::XResourceBundleLoader
      com::sun::resource::XResourceBundle
    when translating strings via uno apis
      com.sun.star.resource.StringResourceWithLocation
    can continue to be used

Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-21 08:20:50 +01:00
Miklos Vajna
d3d9292a0f connectivity: merge OCalcColumns and OWriterColumns
Turns out createObject() only needs the base class OFileTable, and then
these can be shared.

Change-Id: I6e8a83155dbbbc3d85794e190c2e710d01902017
Reviewed-on: https://gerrit.libreoffice.org/40183
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-19 19:53:20 +02:00
Miklos Vajna
196ee66d4a connectivity: merge OCalcPreparedStatement and OWriterPreparedStatement
Into a single OComponentPreparedStatement, as both of them just provide
prepared statement functionality based on a file loaded into an LO
component, so they can share code.

Change-Id: Ib1074871d63de83f16861081050e57442ebf0ffa
Reviewed-on: https://gerrit.libreoffice.org/40182
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-19 19:51:47 +02:00
Miklos Vajna
4073bc15d1 connectivity: merge OCalcStatement and OWriterStatement
Into a single OComponentStatement, as both of them just provide statement
functionality based on a file loaded into an LO component, so they can share
code.

Change-Id: Iad2852f93783ec3c4a672f4b86424b4aa0ae8eaf
Reviewed-on: https://gerrit.libreoffice.org/40181
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-19 19:50:27 +02:00
Miklos Vajna
e473d49acc connectivity: merge OCalcResultSet and OWriterResultSet
Into a single OComponentResultSet, as both of them just provide data
source functionality based on a file loaded into an LO component, so
they can share code.

Change-Id: I19352e592a45d7a58d834e72645dec72d77ce7c9
Reviewed-on: https://gerrit.libreoffice.org/40180
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-19 19:49:20 +02:00
Noel Grandin
30f7ce30c9 loplugin:constparams in connectivity
Change-Id: I9b81c6227fb3c89a832640058a11444f72019694
Reviewed-on: https://gerrit.libreoffice.org/40155
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-19 09:35:59 +02:00
Miklos Vajna
cad0d8df38 connectivity writer driver: add Statement implementation
Gets rid of the OWriterConnection::createStatement() stub warning. This
is the last interface which was not supported by the writer driver, as
far as I see.

Change-Id: I5d1e6835d30b704d6866f2cc4cd9e82ea0f2139e
Reviewed-on: https://gerrit.libreoffice.org/40134
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-18 15:56:34 +02:00
Miklos Vajna
a93c89894f connectivity writer driver: add ResultSet implementation
Now column headers and table data show up on the UI.

Change-Id: I84100c5a7ac65c3be1e985be8ae7195835c45145
Reviewed-on: https://gerrit.libreoffice.org/40128
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-18 15:55:50 +02:00
Stephan Bergmann
86d4a76b51 -Werror,-Wunused-private-field
Change-Id: Idd356214b553eadf5030115fc60a526e4428b1bb
2017-07-18 10:00:32 +02:00
Miklos Vajna
ac3c24bec9 connectivity writer driver: add PreparedStatement implementation
Gets rid of the stub warnings in OWriterConnection::prepareStatement().

Change-Id: I05db81898d8117578130e660932608fcc927edf0
Reviewed-on: https://gerrit.libreoffice.org/40092
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-18 09:09:20 +02:00
Miklos Vajna
a11ddfdcf3 connectivity writer driver: add Columns implementation
Gets rid of the stub warnings in OWriterTable::refreshColumns().

Change-Id: I2dd43777a00a6958548e3dc8119c5cb825ebb02e
Reviewed-on: https://gerrit.libreoffice.org/40091
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-18 09:08:26 +02:00
Miklos Vajna
bec2da98c7 connectivity writer driver: add Table implementation
Gets rid of the stub warnings in OWriterTables::createObject().

Change-Id: I161e498d5704bb9a3d9f423ce1823664d8249c86
Reviewed-on: https://gerrit.libreoffice.org/40090
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-18 09:07:16 +02:00
Miklos Vajna
60020f6133 connectivity writer driver: add Tables implementation
But leave OWriterTables::createObject() as a stub for now.

Change-Id: I8a05d698e565cefded1286decdfbdfece8c2237b
2017-07-18 09:03:39 +02:00
Miklos Vajna
6fb3e3a9c1 connectivity writer driver: add Catalog implementation
But leave OWriterCatalog::refreshTables() as a stub for now.

Change-Id: Ica5eb9d45937c826501b666d565019e2e04df6bf
Reviewed-on: https://gerrit.libreoffice.org/40071
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-18 09:01:40 +02:00
Miklos Vajna
d7ac239793 connectivity writer driver: initial DatabaseMetaData implementation
With this the list of tables is visible in Data Sources.

Change-Id: I7ee4955c54a76c57f854dba19fd1a6a8ee606089
Reviewed-on: https://gerrit.libreoffice.org/40056
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-17 17:31:53 +02:00
Miklos Vajna
69068f2228 connectivity: add initial writer backend
Similar to the calc one. As a first step the Driver and the Connection
interfaces are implemented, though the later has some stubs.

Change-Id: Id043f7742fdb2006d4f88526ef4d055a6d8dee82
Reviewed-on: https://gerrit.libreoffice.org/40033
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-07-17 10:02:05 +02:00
Jochen Nitschke
db4741043d C++11 remove std::binary_function bases from functors
std::binary_function is deprecated since C++11 and removed in C++17

90% done with regexp magic.
removed obsolete <functional> includes.

The std::binary_function base class was used by deprecated
std::bind2nd, this was solved in individual commits.

The members first_argument_type and second_argument_type were used
in chart2/source/controller/dialogs/DataBrowserModel.cxx:
DataBrowserModel::implColumnLess and are inlined in this commit.

Change-Id: I60ded60a8d4afd59e15ac15a58e18d2498c9be5a
Reviewed-on: https://gerrit.libreoffice.org/39659
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07 08:31:48 +02:00
Noel Grandin
b0e05f9ade loplugin:useuniqueptr in basic..cppcanvas
Change-Id: Ib40241eb794607154ae52f8aa68fbf5ea5e944af
Reviewed-on: https://gerrit.libreoffice.org/39551
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05 11:30:12 +02:00
Noel Grandin
2b487c2a13 loplugin:unusedfields connectivity
Change-Id: I056b36249803982e451b887cc73b49a851144b7e
Reviewed-on: https://gerrit.libreoffice.org/39498
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05 08:33:54 +02:00
Julien Nabet
b2607c28a6 Typo: isCaseSensitveExtension->isCaseSensitiveExtension
Change-Id: Ifcd0a93fc8f3e95f7e0e8d518b5d6fbb5ab0a514
Reviewed-on: https://gerrit.libreoffice.org/39448
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-07-02 14:30:27 +02:00
Julien Nabet
5435e2b2aa dBASE: put back an array for trailer
since except language code, the other information aren't used
but keep the details in comment

Change-Id: Ibb5bf22e88bd3a5f9c7603ad018cada8add8b2ce
Reviewed-on: https://gerrit.libreoffice.org/38799
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-14 21:22:08 +02:00
Stephan Bergmann
0782cdaeb3 loplugin:redundantcase (clang-cl)
Change-Id: I8d31de92528461afbe25ec059093c1c21eb9ef72
2017-06-14 18:24:11 +02:00
Julien Nabet
e599716735 dBASE: remove wrong m_ prefix introduced in a recent commit
Change-Id: I9f05facd98d60604256b15c4b35871f7d0a825f9
Reviewed-on: https://gerrit.libreoffice.org/38755
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-13 23:53:09 +02:00
Julien Nabet
d391c6acfe dBASE: typo + remove useless comment from previous commit
Change-Id: Icb16bc4eaf06bd1abc41d5c4109e66c914fb9e71
Reviewed-on: https://gerrit.libreoffice.org/38754
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-13 23:18:57 +02:00
Julien Nabet
557f5eb1d9 dBASE: header refactoring
use sources from:
https://www.clicketyclick.dk/databases/xbase/format/dbf.html
http://www.dbase.com/KnowledgeBase/int/db7_file_fmt.htm
+ translate vars
Also, a condition was wrong about language driver

Change-Id: I58c41776f927c51bc4eec951d747b9e2a59733d1
Reviewed-on: https://gerrit.libreoffice.org/38751
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-13 22:48:17 +02:00
Noel Grandin
2ccde70d60 teach redundantcast plugin about functional casts
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0
Reviewed-on: https://gerrit.libreoffice.org/37910
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-30 08:50:31 +02:00
Noel Grandin
fd00bd0f69 loplugin:unusedfields
make it a little smarter in dealing with fields that are smart pointers

Change-Id: I44072105170882dc29fb19558f1065cffc7e5f11
Reviewed-on: https://gerrit.libreoffice.org/37751
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-19 09:17:06 +02:00
Noel Grandin
04422d7f9f loplugin:checkunusedparams in connectivity
Change-Id: I302af54f4bcb5807c264f7926cffa025550ccb00
Reviewed-on: https://gerrit.libreoffice.org/37065
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-28 14:01:02 +02:00
Caolán McNamara
2c6eb5dcad remove ResourceBasedEventLogger in favor of its base EventLogger
because there are no resources in use anymore

Change-Id: I37e4a100aabbf6214533738da3e528ed2f434eae
2017-04-27 16:35:07 +01:00
Caolán McNamara
8efb852024 another name for a nonlocalized string is a string
Change-Id: Ic4ff92720edd1c10dd6d5eff026e79cb02990005
2017-04-27 13:29:58 +01:00
Chris Sherlock
da64d198ec tools: svstream.hxx needs only errcode.hxx & not errinf.hxx
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca
Reviewed-on: https://gerrit.libreoffice.org/36896
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-25 09:31:31 +02:00
Noel Grandin
4d12bbef79 revert bits of "remove some old MSVC workarounds"
in commit 841e1a6f36, since MSVC 2015
still does not pack heterogenous bitfields tightly

Change-Id: I251c797492762cbd2381496b2f2c6c3223d563c6
Reviewed-on: https://gerrit.libreoffice.org/36800
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-22 22:05:13 +02:00
Noel Grandin
841e1a6f36 remove some old MSVC workarounds
Change-Id: I6abd8aaffb27b3c85df7c0518f7f576be4e32222
Reviewed-on: https://gerrit.libreoffice.org/36660
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-21 09:14:45 +02:00
Stephan Bergmann
071dcb5f6a loplugin:redundantinline (clang-cl)
Change-Id: I03a19b599005f6ef25040889a1e1802445ebf430
Reviewed-on: https://gerrit.libreoffice.org/36063
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04 12:06:18 +00:00