Commit Graph

3925 Commits

Author SHA1 Message Date
51e92859c9 rename config_extension_update.h.in to config_extensions.h.in
... and move HAVE_FEATURE_EXTENSIONS there, too

Change-Id: I37fe52071e1db32cf5cc1e51dbd89bb4f32a39c1
Reviewed-on: https://gerrit.libreoffice.org/54072
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Rene Engelhard <rene@debian.org>
2018-05-23 11:44:57 +02:00
b9ebabd675 tdf#97231: basic: do not use extra wrapping for string marshaling
previous approach did wrap string reference once again, making
practically "a pointer to pointer to string" so this code was not
working correctly for RegQueryValueExA WinAPI call.

String is already provided as a reference (see marshalString(), so
no reason to wrap its reference.

This approach was just copied from from dllmgr-x86.cxx plus some
minor changes to make both versions similar.

Change-Id: I85065112407de3f078265d2c76437814402eb1b3
Reviewed-on: https://gerrit.libreoffice.org/54645
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-05-22 01:07:46 +02:00
de9620dd45 tdf#97231: potential crash fixed
blob2 pointer can be invalidated during marshalString() call,
because it also adds new element in data vector and thus later
access to blob2 can cause crash.

Change-Id: I2de519c363193f34b249e7250a016397b7420882
Reviewed-on: https://gerrit.libreoffice.org/54613
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-05-21 15:41:09 +02:00
649313625b New o3tl::temporary to simplify calls of std::modf
...that ignore the out-parameter integral part

Change-Id: I05f07c1a8909023232f8aecf75ea5541d4eb81ca
Reviewed-on: https://gerrit.libreoffice.org/54474
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-05-17 21:03:12 +02:00
7ab34b51f2 loplugin:redundantcast improvements for floating-integer conversions
Change-Id: I63dbf18f144a792ae775fe6706da81657f790016
Reviewed-on: https://gerrit.libreoffice.org/54416
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-05-17 08:22:14 +02:00
40c9a129e5 Resolves: tdf#117612 truncate DateAdd("m",...) to last day of month
... instead of resulting in error because of roll-over not being set.

Fallout from

    commit 6d424f07701bf26d8fb173563b567d5f097c33e2
    CommitDate: Tue May 2 23:12:34 2017 +0200

        Replace mouth-painted "inaccurate around leap year" rollover algorithm

that does stricter checking but DateAdd() needs a lax checking
with truncate to last day of month.

Change-Id: I9d6f95ad3ac38257d492019bd621070491e98e76
2018-05-16 11:38:53 +02:00
0e384e1080 loplugin:unnecessaryvirtual improvements
look for virtual methods where all of the overrides of the method are
empty

Change-Id: I87d99a0b647700a8d53498e0ab5f0437d3508553
Reviewed-on: https://gerrit.libreoffice.org/54060
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-10 11:34:18 +02:00
657668c378 Related: tdf#116579 tell SvNumberFormatter the proper NfEvalDateFormat
So far Basic relied on the side effect of date acceptance patterns
selected according to the passed format's locale, which changed
with the (temporarily reverted) commit
dfb9138b8b5a239b46f189a717999bcaff19aa79. Explicitly tell the
formatter the behavior to use.

Change-Id: I9819399df69bdfa36d79bc9db116dec37a85cbeb
Reviewed-on: https://gerrit.libreoffice.org/53787
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2018-05-04 00:28:59 +02:00
1cb646dc5f loplugin:useuniqueptr in SbiImage
Change-Id: I24ee5de3628d6436dc045cb543d35b16074ef189
Reviewed-on: https://gerrit.libreoffice.org/53700
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-02 08:25:37 +02:00
3de4968948 Avoid comphelper::string::getTokenCount()
Change-Id: I2aae4f106f783969ede076ce7af14e5946a554ae
2018-04-29 22:50:47 +02:00
fcd589d4f3 loplugin:useuniqueptr pStringOff in SbiImage
Change-Id: I05de3e910bf857e095c99cade6fec22ccb2dd99d
Reviewed-on: https://gerrit.libreoffice.org/53606
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-29 18:22:23 +02:00
45f20a893a [API CHANGE] deprecate XGraphicObjectResolver
XGraphicObjectResolver was used to get the GraphicObject URL from
an storage (package) URL. This isn't possible anymore in LO 6.1
since creating GraphicObject from uniqueID was removed for its
lifecycle issues. XGraphicObjectResolver is now deprecated and
when the "resolveGraphicObjectURL" is called, it throws a
RuntimeExeption.

In places where XGraphicObjectResolver was used, we now use the
XGraphicStorageHandler as the alternative. Both share a common
implementation so previously we could cast one to the other at
any time. Now only XGraphicStorageHandler is used.

GraphicObjectResolver was removed and replaced by the alternative
GraphicStorageHandler for instance creation - where needed.

Change-Id: I5d3f759c6f95b7dbe2d93688d99c8aa4899ffa84
Reviewed-on: https://gerrit.libreoffice.org/53279
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-04-26 18:19:32 +02:00
d254f8a926 loplugin:singlevalfields improve unaryoperator
when we see a unaryoperator, unless it's one of a small set, we can
know (mostly) that the field will not be written.
there is still a small risk of false+ with code taking references
via conditional expressions.

Change-Id: I96fa808067576a50e5eaf425338e225b4e0bdd4e
Reviewed-on: https://gerrit.libreoffice.org/53263
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-23 08:16:18 +02:00
de07f40030 cppcheck: identicalInnerCondition
renamed temporary list in EnhancedCustomShape2d.cxx to avoid shadow
of a local variable

Change-Id: I17a2261dafd2067480fcc5314af4f48765d6b690
Reviewed-on: https://gerrit.libreoffice.org/53244
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-21 11:02:29 +02:00
4cb78942f2 loplugin:expressionalwayszero (clang-cl)
Change-Id: If47b5bb3436ebdf799b74f7c0070f674ab52804e
2018-04-20 08:53:16 +02:00
b4d36b5dcf remove some unused comphelper includes
and fix the fallout

Change-Id: I5d0c2040f57a3ac354a7e277592da31d09a5f359
Reviewed-on: https://gerrit.libreoffice.org/52894
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-15 11:17:24 +02:00
d43fa87fbc weld SbiInputDialog
this is basically the same as SvRTLInputBox

Change-Id: Idbf0f58cf51ea706928e18b81ce80088015dccc4
Reviewed-on: https://gerrit.libreoffice.org/52763
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-12 14:04:53 +02:00
6672151fbb weld SvRTLInputBox
This (forgotten) dialog is the statbasic "InputBox" dialog

Change-Id: Ifb65fb382be7bd6b5a2ba904e0cb64ddce2485a8
Reviewed-on: https://gerrit.libreoffice.org/52749
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-12 10:52:01 +02:00
cc20344010 tdf#111313: Honor bWriteNoLenParam in !bCompatibility, too
e8deba22e887a972f60ff05551e93c334ac1e7b6 "INTEGRATION: CWS ab26" had added
the bCompatibility case with all the argument checking ("2006/05/04 08:33:46 ab
1.66.10.3: #111951# Changed Mid runtime behaviour only for
CompatibilityMode(true)"), and it was probably an oversight that, for
!bCompatibility, it left the bWriteNoLenParam case (triggered by Basic code like

  s = "abc"
  Mid(s,1) = "d"

) calling OUStringBuffer::remove with an illegal argument of len=-1.

Change that so that only setting ERRCODE_BASIC_BAD_ARGUMENT is controlled by
bCompatibility, while all the other checks (that are probably all necessary to
not call rtl string functions with illegal arguments) are done in both modes.

Also, the check

  nStartPos + 1 > nArgLen

should probably be

  nStartPos > nArgLen

instead, as nStartPos has already been decremented from the one-based Basic
index to the zero-baesd rtl string index.

Change-Id: I75deec0acf75b8677aa89f91897c06c1caa5614d
Reviewed-on: https://gerrit.libreoffice.org/52500
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-04-06 14:56:20 +02:00
4450b2a166 pass area param to DBG_UNHANDLED_EXCEPTION
and update sallogareas plugin to enforce this

Change-Id: Id0782c8a1f619372e10d931aec3c6a4743a4c86a
Reviewed-on: https://gerrit.libreoffice.org/52249
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-03 08:38:50 +02:00
9401c7c28a remove unused processfactory.hxx includes
and fix fallout

Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee
Reviewed-on: https://gerrit.libreoffice.org/52206
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-04-01 12:11:26 +02:00
73e6a7975b loplugin:unusedmethods
Change-Id: I7805ac9bc6f8c0aa5ba4804777e7d7c2c29a78f3
Reviewed-on: https://gerrit.libreoffice.org/52066
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-29 14:45:43 +02:00
87b0eb0183 loplugin:virtualdown in basctl,basic
Change-Id: If0d729ee84263a5afb2c7acb2d62b08602aa59f4
Reviewed-on: https://gerrit.libreoffice.org/52046
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-29 11:36:28 +02:00
359f2035bc Typos: definied->defined
Change-Id: I052d6a4815372c79b6d62c1c85d303c6272af3df
Reviewed-on: https://gerrit.libreoffice.org/51466
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-17 19:03:02 +01:00
d775ef3601 change recursive ImageURL prop. search to use XGraphic
In two cases we need to traverse and gather all ImageURL properties
and get the URL string and store the graphic content to a storage
(like we do in xmloff filter). ImageURL property can now only store
external URL and Graphic stores the embedded XGraphic, so this was
changed to look into Graphic property first and then ImageURL.

We also don't gather URL sting anymore so they need to be loaded
to XGraphic when gathering them.

Change-Id: I5f3f4be2b403b9589d72b8733df0c97109f2b65d
Reviewed-on: https://gerrit.libreoffice.org/51308
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-15 04:11:02 +01:00
7fbb96c2fb Move (and rename) graphic stuff from svtools to vcl
This is preparing to change how GraphicManager works where it
won't base itself around GraphicObject anymore but Graphic. No
functional or cosmetic change was made to the classes, only
changes that were needed because of the move and rename.

The only thing that wasn't moved is the GraphicRenderer as it
is not needed in vcl for now (but makes sense to move it in the
future to keep graphic stuff together).

grfmgr was renamed to GraphicObject as the GraphicManager will be
changed a lot and most likely moved out, so the name grfmgr won't
make any sense anymore.

All the UNO implementations were renamed with a prefix Uno and
used the same name as the class name. This is made to be more
specific which are the Uno objects (for example graphic.cxx
contained the implementation of XGraphic, which is similar to
graph.cxx contains Graphic).

Change-Id: I54a2fa6c7e997469aaa7770db05244adb9f64137
Reviewed-on: https://gerrit.libreoffice.org/51068
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-11 13:37:21 +01:00
9fcef57a34 convert Redline warning dialog to .ui to get helpids
etc.

Change-Id: Ic5e6031fe99347f19002d5d8527b5632333fefb0
Reviewed-on: https://gerrit.libreoffice.org/50431
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-27 17:25:59 +01:00
0fad8d3081 convert remaining WarningBox to weld::MessageDialog
Change-Id: I7e3c156a6ad47ac232636ae274280c1cb7556d4a
2018-02-27 09:52:32 +00:00
08ab1f46b1 loplugin:oncevar extend to tools/gen.hxx types
Change-Id: I5c75875da44334569c02e2ff039b33c38397a0a2
Reviewed-on: https://gerrit.libreoffice.org/50283
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-26 07:21:04 +01:00
d75144cf44 convert remaining InfoBox to weld::MessageDialog
Change-Id: I91d828e38d96264cf4a76f30940942556b8f78d8
Reviewed-on: https://gerrit.libreoffice.org/50205
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-25 20:03:26 +01:00
1daf4db963 Blind fix for 3ceb01afc3e5f47930e24fb0b21e6e85b86f660e
Change-Id: I01649065c93de368f900eb836a0467693f361f68
Reviewed-on: https://gerrit.libreoffice.org/50297
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-25 12:02:53 +01:00
3ceb01afc3 Use for range loops in basegfx and basic
Change-Id: I5b2086c245695aeb30630150b3c5ccf61fbd6a56
Reviewed-on: https://gerrit.libreoffice.org/50280
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-24 17:28:43 +01:00
bddd6c7781 Revert "loplugin:changetoolsgen in avmedia..basic" and reapply plugin
because I
(a) forgot to insert parentheses which changes the meaning of some expressions and
(b) I now use the AdjustFoo calls when changing unary operations, which reads much better

This reverts commit 1adb1a320a7e9832a41545bde13fd59d27ce7954.

Change-Id: I52924b35008c8e4b44c8a6b6657cc3a1ac513886
Reviewed-on: https://gerrit.libreoffice.org/49848
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-16 19:50:47 +01:00
7faa218231 ofz#6311 still problems with SdrEdgeObj listening to same obj at start as end
Change-Id: Ibd80b484788779b73943b28a5f36e51ebcacec30
Reviewed-on: https://gerrit.libreoffice.org/49821
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-16 00:35:10 +01:00
1adb1a320a loplugin:changetoolsgen in avmedia..basic
Change-Id: I4e355ae27b9fad1cc6e8f8f408dbd9e93d7256d7
Reviewed-on: https://gerrit.libreoffice.org/49603
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-13 07:38:03 +01:00
73256b9181 Decrease fragility in odd use cases with no current document
Change-Id: I9966166561d4c6e577f3f7e8e04572f97a0b295e
Reviewed-on: https://gerrit.libreoffice.org/49450
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-02-09 00:50:02 +01:00
7a42f39663 basic: MSVC: pragma warning: make more specific, remove obsolete
Change-Id: I9e157f7b27eab831c5c15f6c22b9ffb20207b593
Reviewed-on: https://gerrit.libreoffice.org/48947
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-31 21:01:49 +01:00
7c7aa4e307 loplugin:pointerbool (clang-cl)
Change-Id: Idaf9e1858afb8f22bba1767470138ec820a8d7cb
2018-01-25 08:13:11 +01:00
ad9871a5d1 Introduce SbxValues::clear
...to avoid upcoming GCC 8 -Werror=class-memaccess ("clearing an object of non-
trivial type ‘struct SbxValues’")

Change-Id: Icf610e692b81030bfd6f2f940c43ee8bf6f1d4e0
Reviewed-on: https://gerrit.libreoffice.org/48389
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-23 19:54:06 +01:00
9af8f190ed More loplugin:cstylecast on Windows
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after
cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some
more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More
loplugin:cstylecast"

Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862
Reviewed-on: https://gerrit.libreoffice.org/48317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-23 07:54:51 +01:00
44853cc8be loplugin:useuniqeptr in SbxVariable
Change-Id: I788ec594589d9708e12db83a7371b5a8d9fed38c
2018-01-19 08:58:46 +02:00
000fa4c495 loplugin:useuniqueptr in SbiStdObject
Change-Id: Ic66d817746de423549c87f58068e47f9942d04fd
2018-01-19 08:58:46 +02:00
24cbc7a1fc loplugin:useuniqueptr in SbUnoMethod
Change-Id: Ibeae1754a18152c3a17379c95e3caa536a8822db
2018-01-19 08:58:46 +02:00
5954878448 loplugin:useuniqueptr in SbiGlobals
Change-Id: I0ebec3193b4369039f90be4223ebdf6d048b8478
2018-01-19 08:58:46 +02:00
263d732569 loplugin:useuniqueptr in SbModule
Change-Id: I20525bd69c91ff35c9e569525a0d4556bc184982
2018-01-19 08:58:46 +02:00
624f84c07e Fix typos
Change-Id: I078626eaa3155cc429320cc8c1532003b382b22a
Reviewed-on: https://gerrit.libreoffice.org/47855
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-16 12:40:51 +01:00
3a40d3de89 More loplugin:cstylecast: basic
Change-Id: I0bb219632da384ab047a2b1fc3f2b041dacaf2cb
2018-01-15 09:07:14 +01:00
7d8e94444d convert a<b?a:b to std::min(a,b)
with something like

    git grep -nP '(.*)\s*<\s*(.*)\s*\?\s*\g1\s*:\s*\g2' -- *.?xx

Change-Id: Id5078b35961847feb78a66204fdb7598ee63fd23
Note: we also convert a>b?b:a
Reviewed-on: https://gerrit.libreoffice.org/47736
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-15 07:26:17 +01:00
6070aaa47d More loplugin:cstylecast: basic
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files

Change-Id: I20b38196ee1b6a34384dc46d9de1b6e1b44947ae
2018-01-12 20:29:14 +01:00
728104b31c tdf#96099 Removed some trivial typedefs related to UnOrderedMap and size_t.
Change-Id: I59d3d0b2c1097b5ca96505dc99a4a104b4f8ab48
Reviewed-on: https://gerrit.libreoffice.org/47082
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-10 15:20:44 +01:00