Commit Graph

2176 Commits

Author SHA1 Message Date
0d174c9748 Resolves: tdf#101003 don't give paras in editeng accessible names
change since...

commit c23ab5eaed57cc3fb5860e26c591c73c5b22687b
Author: Steve Yin <steve_y@apache.org>
Date:   Tue Nov 26 14:25:22 2013 +0000

    Integrate branch of IAccessible2

keep the accessible description, but drop thea accessible name which
is reportedly an undesirable change.

Change-Id: I8f9c53ef967c4e566fde1829832aa035efce4f23
2016-07-27 13:19:03 +01:00
508c95f1b6 improve passstuffbyref return analysis
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c
Reviewed-on: https://gerrit.libreoffice.org/27317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-27 06:48:25 +00:00
a860df25dd masses of MessBoxes not being disposed promptly
since...

commit ba81e5c6bd420b41a84ade6ccd774011a8089f7f
Date:   Thu May 28 21:35:43 2015 +0100

    tdf#91702 - fix stack-based MessBox allocation.

There is no special ScopedVclPtr<X>::Create or
ScopedVclPtrInstance<X>::Create just
VclPtr<X>::Create and a raw VclPtr<X>::Create()->foo
doesn't call dispose on the owned X

Change-Id: Ifacc8d5e742820701307c3c37b9b86487667d84f
2016-07-26 11:26:52 +01:00
938821fb08 new loplugin overrideparam
verify that parameters on override methods have the same set of default
values for their params as their parent/super-methods do.

Change-Id: Ibdbc1c6e417fbaa680ea025a6bbf5ba9c2e5bcd2
Reviewed-on: https://gerrit.libreoffice.org/27437
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-25 06:09:17 +00:00
6ea8084487 sd lok: decouple vcl window focus from cursor visibility
The problem was the the blinking cursor was hidden when another vcl
window got its focus, so it wasn't possible to edit two shape text in
parallel in two windows.

The code path is like this:

- show cursor, cursor is created: SdrObjEditView::SdrBeginTextEdit() ->
  OutlinerView::ShowCursor()
- show cursor, focus case: sd::FuText::Activate() ->
  OutlinerView::ShowCursor()
- hide cursor, cursor is deleted: SdrObjEditView::SdrEndTextEdit() ->
  OutlinerView::HideCursor()
- hide cursor, focus case: sd::FuText::Deactivate() ->
  OutlinerView::HideCursor()

So add a new optional bool parameter that allows not emitting the
LOK_CALLBACK_CURSOR_VISIBLE callback in the focus change case.

Also, if we're at it, make sure that painting emits no show/cursor LOK
callbacks.

Change-Id: I1068a1b1f5cd76fd09b5a79066834bfb0daebc77
Reviewed-on: https://gerrit.libreoffice.org/27335
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-20 10:04:50 +00:00
8617010b85 Resolves: tdf#97404 outline space wrong on second level
Revert "tdf#42788: FORMATTING - Numbering/ordered list"

This reverts commit 6517141b6233c5f9667031bc92f66109fddf5b76.

https://gerrit.libreoffice.org/#/c/23006/ was apparently
intended to revert this, but it never was

Then there was https://gerrit.libreoffice.org/#/c/23427/
which was an attempt to improve it but it was abandoned

Then there was https://gerrit.libreoffice.org/#/c/23542/
whichw as another attempt to improve it, but it was too
abandoned.

all of which leaves us worse than when we started with
a pile of unhappy abandoned efforts and cruddy indent

Change-Id: I8b3666a957339030d5a946a2b387f452e7fb0099
2016-07-19 22:33:34 +01:00
018e89337d Improve loplugin:unnecessaryoverride
<sberg> thorsten, remember what that "TODO" in
 SvxAccessibleTextPropertySet::getSupportedServiceNames was to be about exactly,
 in a909acb7009acadffa53e74ea05ddb88803490f1 ?
<thorsten> sberg: that's a nonsense, prolly copy'n'pasted, or a 'please review
 me'
<sberg> thorsten, OK, thanks (that override will eventually go away with
 loplugin:unnecessaryoverride, and the TODO comment be lost)

Change-Id: Iba964c61768459aac4067bbd4e1f7d4f78f6adac
Reviewed-on: https://gerrit.libreoffice.org/27232
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-15 14:08:07 +00:00
6e72f0251b new loplugin unnecessary override
Change-Id: I88d3e33823d68745b98625050a8a274f9ef04bcb
Reviewed-on: https://gerrit.libreoffice.org/27135
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-15 14:05:41 +00:00
71ab1ee978 tdf#100880 editeng spellchecking doesn't work sometimes...
believe to be a regression from

commit 73f0b3bd5553c5d023d0a1dbfdc00836e2937961
Author: Matteo Casalin <matteo.casalin@yahoo.com>
Date:   Sat Dec 28 13:37:26 2013 +0100

    xub_StrLen to sal_Int32 + some const

and lets fix it the same way

commit 9705fbc1119da91e73c00a2ec848565929eeb483
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Sun Mar 2 12:19:16 2014 -0600

    Fix editeng missing spellchecking redline on load

(probably) fixed some other regression caused by that

Change-Id: I52775aff50dcc634fd2f08eb685cc4ad9850c82c
2016-07-13 18:03:15 +01:00
8c4dbcef8f Revert "bccu#1781: Impress/Comments - selection not updated on delete"
because selection is visually mangled in the editeng.

type a word in calc, hit return, double click on the word, then end, hold down
the shift key and move to the left, every second letter gets highlighted.

The original bug is private so I don't know what problem it wanted to fix
to see if there is a better solution.

This reverts commit c8a09eb373b78d9936fb00ac98b6876eb8740c4d.

Change-Id: Ib1b535aca98daaae210db4e3d62900fbc389e816
2016-07-13 14:59:49 +01:00
a4d40892b7 Fix typos
Change-Id: I81671c9a8e7e5b878e605ac0ed6c3d8ef5c5b689
Reviewed-on: https://gerrit.libreoffice.org/27088
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-07-11 05:49:27 +00:00
435be8e8e1 Remove redundant SvxGet* wrappers around LinguMgr functions
Change-Id: Ic431ce4880d0c1277ddb411ca59b3c8e8ca36518
2016-07-10 22:08:12 +02:00
a97d67cd0b ditch the application per-language IsAutoMnemonicEnabled setting
Change-Id: I9734ada09edb6544a332893a7c5d31730b0d081d
2016-07-10 19:12:39 +01:00
6d4f2dcc7c Resolves: tdf#100452 class Date full (BCE,CE) proleptic Gregorian calendar
... implementing signed years with year 0 gap.
Date(31,12,-1) last day BCE
Date(1,1,1) first day CE

New class Date member functions:
* AddYears(sal_Int16) to be used instead of
  aDate.SetYear(aDate.GetYear()+sal_Int16) to handle year 0 gap.
* convenience GetNextYear() to be used insted of GetYear()+1
* convenience GetPrevYear() to be used insted of GetYear()-1
* AddMonths(sal_Int32)
* operator=(const css::util::Date&)

New class DateTime member functions:
* operator=(const css::util::DateTime&)

Made some conversion ctors explicit, specifically Date(sal_Int32)

Adapted hopefully all places that used a sal_uInt16 year to use
sal_Int16 where appropriate.

Eliminated some quirks in date handling found on the fly.

Added era handling to i18npool icu calendar setting interface, which
missing was responsible for 0001-01-01 entered in Calc being set as
-0001-01-01, hence subtracting one day resulted in -0002-12-31.

Change-Id: I77b39fba9599ebd5067d7864f6c9ebe01f6f578f
Reviewed-on: https://gerrit.libreoffice.org/27049
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-08 20:41:02 +00:00
aae1018af6 SvxGetOrCreatePosDic parameter is unused
...ever since fd069bee7e57ad529c3c0974559fd2d84ec3151a "initial import", so kill
the equally old "TODO: remove argument or provide SvxGetIgnoreAllList with the
same one" comment for good now

Change-Id: Ie7b64306b8d06fc72d0bb49cc1e5fa3b00f59d6b
2016-07-08 18:20:39 +02:00
52e92d5622 loplugin:redundantcast: redundant static_casts in editeng
Change-Id: Ifc6d62fce28d540d07d95ec06c3a2b95030f1f0c
2016-07-08 16:47:31 +02:00
e4651e2003 loplugin:passstuffbyref also for {css::uno,rtl}::Reference
Change-Id: I5bb3c63790cb153c0d6f57a681ec6dda71d482be
2016-07-07 18:59:55 +02:00
3a9c151e6e tdf#100734: Update bullet of paragraph on UNDO
Change-Id: I1afe0b4ca537eea752d3bced8bbc8944380c3514
Reviewed-on: https://gerrit.libreoffice.org/26874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2016-07-04 09:18:37 +00:00
6752590fec don't autocapitalize words that follow a field mark
Change-Id: Ia8efa88aaf47edba9a590c858d0ea30d7bfe2977
2016-07-01 14:49:03 +01:00
42486dde49 move #includes to top of file
instead of being randomly embedded somewhere deep inside the CXX code.

Found with:
  git grep -nP '^#include' -- *.cxx | sort -g -k 2 -t :

Change-Id: I9ee432d3b665ecb6ec600bd51cc4b735a1b1127a
Reviewed-on: https://gerrit.libreoffice.org/26764
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-06-29 14:49:19 +00:00
e3e79246cb Simplify some PutProperties calls
Change-Id: Idf91592e6cf34b5591f221c3c5bdc937bbe46014
2016-06-28 14:50:49 +02:00
723467bd88 [API CHANGE] notebookbar: paragraph spacing controls
Change-Id: I9d2672cd156f2dcc2ee4c544902e9d42632cab70
Reviewed-on: https://gerrit.libreoffice.org/26039
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-06-27 12:46:56 +00:00
db12f068f8 loplugin:singlevalfields in editeng
Change-Id: I99c7ab28be7853535674cd7fab975da4252441f1
Reviewed-on: https://gerrit.libreoffice.org/26600
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-24 06:44:48 +00:00
ea5a5b1dbb tdf#99589 - tolower / toupper - dangerous to Turks ...
Change-Id: Id3b9abd557f2b8dfc942589362452cbdb0232da9
Reviewed-on: https://gerrit.libreoffice.org/26546
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-23 10:01:18 +00:00
aa0d0536a4 tdf#97527 - vcl: reference-count Menu
some places are marked with "dodgy"- need to check those to see
what is going on, because they are leaving dangling pointers behind
in the Menu class

Change-Id: I41d5c7c0fec2f70ce9e3ffdc48cd03d26c0a869b
Reviewed-on: https://gerrit.libreoffice.org/26516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-23 06:28:00 +00:00
03e83de83b Remove no longer needed ImpEditView::mpLibreOfficeKitSearchable
All clients has been ported to use
ImpEditView::mpLibreOfficeKitViewCallable instead.

Change-Id: I3a2513ac5900f801a2e7aec79807f4e333dfba3d
Reviewed-on: https://gerrit.libreoffice.org/26561
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-06-22 07:49:24 +00:00
cc66f408f9 fix DBG_ASSERT condition to match message
Change-Id: I7073d3063d17ade9b0d4f88013c47eabb646af58
2016-06-21 11:41:11 +02:00
5f2b7007fd improve error message
Change-Id: Id1408cb1d8f04b36ffab65b684a94b14db9d9c50
2016-06-21 09:43:23 +02:00
82da3d95c1 loplugin:salbool: Implicit conversions from non-Boolean fundamental types
Change-Id: I67eac95686678e6f5a2d60798535b2c65a9ba5d7
2016-06-19 21:29:43 +02:00
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
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
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
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
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
fb7b701c18 Clean up uses of Any::getValue() in editeng
Change-Id: I2bce1aba3e01e5c8d67d47b88cddca1f7ad37a93
2016-06-13 12:10:27 +02:00
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
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
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
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
6925222271 Convert SvxPraVertAlignItem::Align to scoped enum
Change-Id: I2f73a200b04322dd65e0758f4238347bfea832fb
2016-06-10 11:01:04 +02:00
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
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
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
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
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
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
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
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
84fb4be390 editeng: rename misleading SvxBoxItem::GetDistance()/SetDistance()
Change-Id: Iea61f2de2b907974bbb05c66abf6cdaeab87b8b2
2016-05-30 17:33:53 +02:00
8fec9e7e4c Some clean up of uses of css::uno::Any::setValue
Change-Id: I04e8aef35a6083b61d775c8eb3f96757da2b31bd
2016-05-30 15:14:03 +02:00