2546 Commits

Author SHA1 Message Date
Miklos Vajna
5b5706f41f comphelper lok: remove the g_bViewCallback global
Its purpose was to allow incrementally migrate all callers of
SdrModel::libreOfficeKitCallback() to use
SfxViewShell::libreOfficeKitViewCallback() (which allows notifying only
the currently active or all views) instead. That is done by now, so it
can go.

Change-Id: I521bbbe5c638dfd844ebf025153459a37362d3c3
Reviewed-on: https://gerrit.libreoffice.org/26413
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-06-17 12:47:46 +00:00
Caolán McNamara
e0c6f71a8e coverity#1362679 try and tell coverity these are non-null by restoring...
to the pre vectorization code layout before...

commit e5d378b1ba04c470e0c6c16b48af97ab5818e2bb
Author: Kohei Yoshida <kohei.yoshida@gmail.com>
Date:   Tue Apr 3 18:26:29 2012 -0400

    Check for empty-ness of vector before accessing the first element.

    I hope this will keep Stephan's tinderbox happy.  If not...

changed it, now that c++11 data is available to us

Change-Id: I184092502d1f30fcec78f3fa807de70ddc6c2aef
Reviewed-on: https://gerrit.libreoffice.org/26224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-06-13 19:28:19 +00:00
Caolán McNamara
558df654ed Revert "coverity#1362679 try and tell coverty these are non-null by restoring..."
didn't mean to push that just yet

This reverts commit 9c13ba3b79249dae41c8ac844e435a1a226cd56e.
2016-06-13 15:59:52 +01:00
Caolán McNamara
9c13ba3b79 coverity#1362679 try and tell coverty these are non-null by restoring...
to the pre vectorization code layout before...

commit e5d378b1ba04c470e0c6c16b48af97ab5818e2bb
Author: Kohei Yoshida <kohei.yoshida@gmail.com>
Date:   Tue Apr 3 18:26:29 2012 -0400

    Check for empty-ness of vector before accessing the first element.

    I hope this will keep Stephan's tinderbox happy.  If not...

changed it, now that c++11 data is available to us

Change-Id: Ie5e584c02f51d9cc8dc3b3f65f7cfc90822f65c2
2016-06-13 15:59:05 +01:00
Miklos Vajna
26772e210d editeng: implement per-view LOK_CALLBACK_TEXT_SELECTION
These were the last callback invocations in editeng that did not support
the per-view callback.

Change-Id: Ic703f6708a37f059dcdbbc321d6b18a7fd04edae
Reviewed-on: https://gerrit.libreoffice.org/26216
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-06-13 11:20:31 +00:00
Stephan Bergmann
fb7b701c18 Clean up uses of Any::getValue() in editeng
Change-Id: I2bce1aba3e01e5c8d67d47b88cddca1f7ad37a93
2016-06-13 12:10:27 +02:00
Miklos Vajna
a6353d61d3 editeng: imlement per-view LOK_CALLBACK_CURSOR_VISIBLE
Also assert that we don't try to invoke the model callback in editeng in
the the view-callback case.

Change-Id: I9f7b7d74da154ac8d0fe3404b7d8114008f74773
Reviewed-on: https://gerrit.libreoffice.org/26211
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-06-13 09:23:58 +00:00
Noel Grandin
272a8afa60 convert more DBG_ASSERT(false to SAL_WARN
Change-Id: Ie52f28f28c67a91c4d3d4517d5c6a466890c7a55
Reviewed-on: https://gerrit.libreoffice.org/26195
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-12 18:10:44 +00:00
Noel Grandin
ab10f9fc11 convert DBG_ASSERT(false, to SAL_WARN(
Change-Id: I400d728c5d99228c5ca52e369037395b4da2af5c
Reviewed-on: https://gerrit.libreoffice.org/26187
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-12 09:04:15 +00:00
Miklos Vajna
89bbd0ecbf editeng: implement per-view LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR
Given that the per-view callback is in SfxViewShell, and editeng doesn't
depend on sfx2, add an interface class in editeng to invert the
dependency.

With this, gtktiledviewer no longer crashes when starting editeng text
edit with per-view callbacks.

Change-Id: I783cdc646b890a6b597000f1d88428c8042417cf
Reviewed-on: https://gerrit.libreoffice.org/26169
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-06-10 15:15:06 +00:00
Noel Grandin
6925222271 Convert SvxPraVertAlignItem::Align to scoped enum
Change-Id: I2f73a200b04322dd65e0758f4238347bfea832fb
2016-06-10 11:01:04 +02:00
Gleb Mishchenko
a97b392879 tdf#94698 cleanup Makefiles. Get rid of udkapi and offapi
This patch changes occurences in makefiles
from
$(eval $(call gb_CppunitTest_use_api,comphelper_test_config, \
	udkapi \
	offapi \
))

to
$(eval $(call gb_CppunitTest_use_sdk_api,comphelper_test_config))

(corrected instead of abandon, jani)

Change-Id: Ic96ec65d82d7452e288f05a8b6d576ef543b068e
Reviewed-on: https://gerrit.libreoffice.org/23426
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-06-09 09:47:11 +00:00
Stephan Bergmann
4d49c9601c Let loplugin:passstuffbyref also look at fn defn not preceded by any decl
Change-Id: I752bc96d2d521d790e919283cabb14b6526626f4
2016-06-08 17:14:34 +02:00
Michael Stahl
62d270116b tools: rename SvStream::Read/Write to ReadBytes/WriteBytes
Change-Id: Ib788a30d413436aa03f813aa2fddcbc4d6cd2f9a
Reviewed-on: https://gerrit.libreoffice.org/25972
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-06-06 18:09:11 +00:00
Noel Grandin
0323253a7c remove some manual ref-counting
triggered when I noticed a class doing acquire() in the
constructor and then release() in the destructor.

found mostly by
    git grep -n -B5 -e '->release()'

Change-Id: I96e43a3d30ffd9ae9a34275f24cd914d8f7b026f
Reviewed-on: https://gerrit.libreoffice.org/25806
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-06 07:01:34 +00:00
Mark Page
954f853c7b tdf#96099 Remove sfx std::shared_ptr typedefs
Removed SfxItemSet_Pointer_t and SfxStyleSheetIteratorPtr

Change-Id: Ibfa6a79809fdbbe2648dacc02625e620ceaf9bf0
Reviewed-on: https://gerrit.libreoffice.org/25851
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-04 09:45:55 +00:00
Noel Grandin
52225a3b7f Convert ComplexTextLayoutMode to scoped enum
Change-Id: I257f8e15fec92f0701235a6fe4b6a2272498c4f1
Reviewed-on: https://gerrit.libreoffice.org/25667
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-03 11:34:23 +00:00
Noel Grandin
fa135fd0e0 remove unused SID constants and associated code
found with a python script that looks like:

process = subprocess.Popen(
  "git ls-files *.hrc | xargs grep -hE '#define +SID_' | cut -d ' ' -f 2 | sort -u",
  shell=True, stdout=subprocess.PIPE)
for line in iter(process.stdout.readline, b''):
  line = line.strip()
  if line.startswith("//"): continue
  if line.startswith("sfx"): continue
  if len(line) < 10: continue
  i = subprocess.check_output("git grep -nP \"#define +" + line + " \"",
                              shell=True)
  if i.count("#define") < 2: continue
  print line + "
" + i

Change-Id: I40eac2569c2b5b129d9459cb723a9d6f26d09264
Reviewed-on: https://gerrit.libreoffice.org/25715
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-01 06:48:13 +00:00
Noel Grandin
b860b73f2b Convert VCL_MESSAGE to scoped enum
Change-Id: I976536849fa5585c96cee23b660c56d3d0116933
Reviewed-on: https://gerrit.libreoffice.org/25720
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-01 06:46:29 +00:00
Noel Grandin
0b23eec200 teach refcounting clang plugin about uno::Reference
uno::Reference is only allowed to used with classes that have a
::static_type member.
So convert all those places to rtl::Reference.

Maybe we need some LIBO_INTERNAL_ONLY constructors on rtl::Reference and
uno::Reference to make this a little smoother?

Change-Id: Icdcb35d71ca40a87b1dc474096776412adbfc7e3
Reviewed-on: https://gerrit.libreoffice.org/25516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-31 06:25:45 +00:00
Michael Stahl
84fb4be390 editeng: rename misleading SvxBoxItem::GetDistance()/SetDistance()
Change-Id: Iea61f2de2b907974bbb05c66abf6cdaeab87b8b2
2016-05-30 17:33:53 +02:00
Stephan Bergmann
8fec9e7e4c Some clean up of uses of css::uno::Any::setValue
Change-Id: I04e8aef35a6083b61d775c8eb3f96757da2b31bd
2016-05-30 15:14:03 +02:00
Noel Grandin
990082f37c Convert FontRelief to scoped enum
Change-Id: I545c83d742db27f1a004b66e5eb1ef768f62e011
Reviewed-on: https://gerrit.libreoffice.org/25626
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30 06:41:53 +00:00
Noel Grandin
c47b170c71 Convert SelectionMode to scoped enum
Change-Id: I86c435de3918540cb54a0cb24568e58456c2f9d1
Reviewed-on: https://gerrit.libreoffice.org/25611
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30 06:41:28 +00:00
Ashod Nakashian
8915919b57 bccu#1851 - CTRL+A in Writer comments shows selection at top-left corner
Change-Id: Ia87b86a45a38449d59eb7bcea7f8cb4068655a17
Reviewed-on: https://gerrit.libreoffice.org/25571
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit b736ea1b02346ba190f280f254714bb6e1983858)
Reviewed-on: https://gerrit.libreoffice.org/25572
Tested-by: Jenkins <ci@libreoffice.org>
2016-05-29 01:58:52 +00:00
Ashod Nakashian
c8a09eb373 bccu#1781: Impress/Comments - selection not updated on delete
Change-Id: I694d76785fcf6ec9c158c34cbe07f4d1f2c7a41d
Reviewed-on: https://gerrit.libreoffice.org/25219
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit b95e4e8681c9cefb4e1d4177192164e041baf9d9)
Reviewed-on: https://gerrit.libreoffice.org/25428
Tested-by: Jenkins <ci@libreoffice.org>
2016-05-29 01:56:38 +00:00
Noel Grandin
850a8d27ca Convert GRAPHIC to scoped enum
Change-Id: I1fd09a729cbda00f99841532e0dd3fa66bce7bea
Reviewed-on: https://gerrit.libreoffice.org/25534
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-27 12:59:23 +00:00
Noel Grandin
9eb2e683ab tdf#34465 remove calls to SfxItemSet::Put(const SfxPoolItem&, sal_uInt16)
and put an assert in SfxPoolItem::SetWhich() so nothing new
creeps in.

Change-Id: I6497650fa61ffb2b6941ffff2d471c8f117be1df
Reviewed-on: https://gerrit.libreoffice.org/24324
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-27 07:21:45 +00:00
Noel Grandin
cc12a1b727 Convert TextDirectionality to scoped enum
Change-Id: I1046e791a73ec07be5a946c63a2256939a323e91
Reviewed-on: https://gerrit.libreoffice.org/25497
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26 09:24:53 +00:00
Michael Stahl
1029b6cb06 sw: replace boost::shared_array with std::shared_ptr
Change-Id: I99eec60db7f6d586b3b424661e03a7891422ab2e
2016-05-25 23:47:22 +02:00
Andrea Gelmini
2af018e4dd Fix typos
Change-Id: I860cc4aa04b4e5cd1437b2f24176ee2ccdec3266
Reviewed-on: https://gerrit.libreoffice.org/25420
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-25 09:50:55 +00:00
Xisco Fauli
62ddce422c tdf#89329: use unique_ptr for pImpl in xmlcnitm
Change-Id: Iec37e509b78e58e90591bad26735ff31462eaf5c
Reviewed-on: https://gerrit.libreoffice.org/25328
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-25 06:52:04 +00:00
Noel Grandin
95d20a3799 Revert "remove some manual ref-counting"
until I have a better understanding of the UNO reference
counting.

This reverts commit 111de438ea3e512a541281dc0716cc728ea8d152.
2016-05-24 11:02:42 +02:00
Noel Grandin
111de438ea remove some manual ref-counting
triggered when I noticed a class doing acquire() in the constructor and
then release() in the destructor.

found mostly by
   git grep -n -B5 -e '->release()'

Change-Id: Ie1abeaed75c1f861df185e3bde680272dbadc97f
Reviewed-on: https://gerrit.libreoffice.org/25363
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-24 06:54:06 +00:00
László Németh
785e530e83 fix bad index/assertion failure with line ending autocorrect patterns
Test case: type "->" and press Enter in a new en-US text document.
Result: crash or missing replacement of the arrow.

Change-Id: I052ae868b6fe0b1e5557c40471d31a20bd1e5ca9
2016-05-21 02:49:27 +02:00
Noel Grandin
d4d2fc2479 clang-tidy modernize-make-unique
Change-Id: I550bb69ddcef69906027516ccde62cf8e87c295b
Reviewed-on: https://gerrit.libreoffice.org/25138
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-19 08:33:10 +00:00
Eike Rathke
48d0affa11 Resolves: tdf#99930 SetReplaceLeadingSingleQuotationMark(false) for Calc
Change-Id: I29906de6a4075b7de82bd6e16560b56b9b648e91
2016-05-18 15:59:30 +02:00
Noel Grandin
2c8fe2e737 update unusedmethods plugin to deal with constructors
and fix the operator< implementations in some of the other
plugins too.

Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035
Reviewed-on: https://gerrit.libreoffice.org/25057
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18 10:03:44 +00:00
Noel Grandin
63ba54a168 convert EXTTEXTINPUT_ATTR to scoped enum
Change-Id: I94706bdea91d367fc8c2bbd482f6b4d8f55449d7
Reviewed-on: https://gerrit.libreoffice.org/24821
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-11 07:14:34 +00:00
Andrea Gelmini
3742748699 Fix typos
Change-Id: I1c1894fcf533291b34a662b6efb96dcfa75b92b3
Reviewed-on: https://gerrit.libreoffice.org/24760
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-10 19:13:31 +00:00
Stephan Bergmann
ddb4988c58 Add SAL_FALLTHROUGH, where apparently appropriate
Change-Id: I005943a7c7bc4f8bfc647b2cf44f143a66a7e997
2016-05-10 17:03:59 +02:00
Stephan Bergmann
14cd5182c5 Replace fallthrough comments with new SAL_FALLTHROUGH macro
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in
preparation of enabling -Wimplicit-fallthrough.  (This is only relevant for
C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.)

Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but
that would require adding back in dependencies on boost_headers to many
libraries where we carefully removed any remaining Boost dependencies only
recently.  (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its
future evolution will not have any impact on the stable URE interface.)  C++17
will have a proper [[fallthroug]], eventually removing the need for a macro
altogether.

Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-05-10 16:42:16 +02:00
Stephan Bergmann
0f3ac23d73 Insert explicit "break" when falling through to empty next case
...which itself only contains a "break" (or nothing at all at the end of the
"switch"), as otherwise Clang -Wimplicit-fallthrough would warn about these.

Change-Id: I25c1cf2ca74dfeba7ca0385ca8f1c1bf30bbf91b
2016-05-10 14:57:26 +02:00
Noel Grandin
17076d8ecf convert OUTLINER_MODE to scoped enum
Change-Id: I7ac45d7fbd5e77a105cbe942c6d4fd6cfc8ff909
Reviewed-on: https://gerrit.libreoffice.org/24789
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-09 11:15:16 +00:00
Noel Grandin
50ac0f503b convert FONT_EMPHASIS_MARK to scoped enum
Change-Id: I137c78b337e57d3442db08334128e79d186b278f
Reviewed-on: https://gerrit.libreoffice.org/24753
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-09 09:41:34 +00:00
Noel Grandin
bcb41235de convert SfxStyleFamily to scoped enum
and update the RSC compiler to accept such

In the process fix some confusion in SD where it was confusing
SfxStyleFamily and the index of the relevant family
(which other parts of the code in SVL use)

Change-Id: I1efc9f85fbed8ab76eafe8f6e1ada411753ae5f9
2016-05-09 10:17:13 +02:00
Julien Nabet
5d60bbc071 Translate German comment
Change-Id: I7a6481370cacd1c33510654d17b20d254e753476
Reviewed-on: https://gerrit.libreoffice.org/24754
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-05-08 10:12:15 +00:00
Noel Grandin
58a32075ca use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
2016-05-04 12:39:40 +02:00
Stephan Bergmann
6e70103da0 While at it, delete Any functions on sal_Bool*
(at least for LIBO_INTERNAL_ONLY), to help further reduce the occurrences of
sal_Bool across the code base

Change-Id: I70654a0cb56655984c717b7b894f26c9ab47536e
2016-05-04 11:59:23 +02:00
Stephan Bergmann
0b1e4a3067 Prevent Any::setValue from reinterpreting bool* as sal_Bool*
...which only happens ot work in environments where sizeof (bool) == 1.  The
simpler alternative is to use the operator <<= template without passing explicit
UNO type information, anyway.

The std::nullptr_t overloads are needed to disambiguate calls with a nullptr
argument.  (Which can at least be meaningful for VOID, but for other types what
it happens to do is store a default value of the given type.)  As std::nullptr_t
is only C++11, this all needs to be LIBO_INTERNAL_ONLY.

Change-Id: Iff06a6ba94250bd4ae4afc937c2a2bfa75f0888f
2016-05-03 15:26:01 +02:00