Commit Graph

125 Commits

Author SHA1 Message Date
Noel Grandin
0c18bedb73 java: 'final static' to 'static final'
this is the canonical order, and it makes the code easier to read

Change-Id: I272e7f1e140296e582702b6dbf77a03eefb65470
Reviewed-on: https://gerrit.libreoffice.org/16242
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Ostrovsky <david@ostrovsky.org>
2015-06-15 08:45:19 +00:00
Matthew J. Francis
46e12364dc Fix insertion and deletion in IndexedPropertyValuesContainer
The cases for iterating to an element from the end (used for
elements in the second half of the underlying array) had an off by
one error causing the wrong elements to be inserted/removed

Change-Id: Idcbf158cc31afaf02fce3f1975509edf6239d3ae
Reviewed-on: https://gerrit.libreoffice.org/16073
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-06-14 15:03:58 +00:00
Noel Grandin
efd4bfa818 java:regulatize the order of 'final' and public/private
Make the order be 'public static' or 'private static'
Just makes the code nicer to read.

Change-Id: I182424bda45a2d68642e5d04c6091d268ace1fe2
Reviewed-on: https://gerrit.libreoffice.org/16202
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-11 09:34:00 +00:00
Christian Lohmaier
ab465b90f6 bin/rename-sw-abbreviations.sh
renames the most annoying abbreviations in Writer (and partially
in the shared code too).

Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
2015-05-20 13:05:49 +02:00
Stephan Bergmann
3e5a3ce027 Maybe this helps TB56?
Change-Id: I209fcc9277d8efe27608b7e858f16fa31a6973b2
2015-03-25 13:48:08 +01:00
Noel Grandin
4bf4e3d407 java: no need to instantiate the AccessibilityTools object
since all of it's methods and fields are static.

Change-Id: Ia2b652969489c5a21e01a35cda65c6e84346aac0
2015-01-12 08:36:17 +02:00
Noel Grandin
454ddddd99 java: remove some unused fields and variables
Change-Id: I5d6071096307adbe7df0178000346cf915afa3e7
Reviewed-on: https://gerrit.libreoffice.org/13477
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-15 12:36:40 +00:00
Noel Grandin
7557f23b31 java: reduce visibility of fields and methods
found by PMD

Change-Id: Id6737916b68ccbdbdeec5d314747a38410923ac6
Reviewed-on: https://gerrit.libreoffice.org/13409
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-11 06:09:03 +00:00
Noel Grandin
fd60dd5226 java: improve use of WrappedTargetException to set cause properly
since we introduced the new constructors that pass the cause all the
way up to java.lang.Throwable.
Also simplify some exeception printing sites, because Throwable
will correctly print out child exceptions for us.

Change-Id: Ibbecce3c6f971fbc80d6de2052ab4f33a4503c0a
2014-12-10 13:37:24 +02:00
Noel Grandin
c199b76d88 java: remove some unused local variables
Change-Id: Ia01528460e2f4b610d123e29cad66520abc6a965
2014-12-05 11:15:57 +02:00
Noel Grandin
58eab57648 java: final fields that can be static
found by PMD

Change-Id: I2b48f35d252d6e914c2a18a2c175b075a9d3ac0f
Reviewed-on: https://gerrit.libreoffice.org/13099
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-25 06:06:48 +00:00
Noel Grandin
0063cf2856 java: make fields final where possible
found by PMD

Change-Id: I87780366119c141cd2dafe6ca1bf2d9798b10aec
2014-11-18 12:44:28 +02:00
Noel Grandin
bb437029c1 java: convert fields to local variables where possible
found by PMD

Change-Id: I05b45382b8fb1b734657ce9421a20e6ef6fbe542
Reviewed-on: https://gerrit.libreoffice.org/12376
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12 11:03:29 +00:00
Michael Stahl
9b7542b092 sw: fix insertion of hyperlink inside hyperlink...
... when either the start or the end position of the new hint is equal
to an existing hint.  There is not just 1 case here but 3 different
ones; don't attempt to insert hints with start > end.

Change-Id: I39cf8a352f67d77b56b0d01de5872f4d341f6bdd
2014-10-31 23:00:10 +01:00
Noel Grandin
12b01b920f java: no need to call String.valueOf to append to a String
Change-Id: I5ef45b971d24dde814ab8cbb2e9503d9da4f0d73
2014-10-17 08:26:19 +02:00
Noel Grandin
c26d6444bb java: confusing literal
Change-Id: Ia08b25e1a02c2e86f176e84790bb9f3dc81e11e6
2014-10-16 12:27:10 +02:00
Noel Grandin
252ed1708a double-checked locking is not thread-safe in Java
found by PMD

Change-Id: Ibd4a9139c626932bec56c0b1dd32b4d59c8440b1
2014-08-20 10:35:51 +02:00
Noel Grandin
0764292c5d java: use 'Short.valueOf' instead of 'new Short'
Change-Id: Icef19ef61ee0af2dd3bda527263934006271f219
2014-08-19 14:57:18 +02:00
Noel Grandin
be1bb7b1cc java: use Boolean.valueOf instead of instantiating Boolean objects
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
2014-08-19 14:57:16 +02:00
Noel Grandin
ac5954d7c5 java: remove commented out code
Change-Id: I05c907a38b562231e968c17f14e09ef80e0a6ed1
2014-08-14 10:59:48 +02:00
Noel Grandin
34bcf9b498 java: remove dead methods
found by UCDetector

Change-Id: I219caa8e680dba5a395541a778df6144841c4dde
2014-08-13 10:24:10 +02:00
Noel Grandin
68cd011c90 java: reduce scope, make some methods private
found by UCDetector

Change-Id: Ib1425edde146193a65c242dc159b7e3fbf0e4a2e
2014-08-13 08:49:23 +02:00
Noel Grandin
da677dfd59 java: reduce scope, make fields private
found by UCDetector

Change-Id: I7f97e15667159cf8ee776e8f32fdcdec8ec00ed6
2014-08-13 08:49:22 +02:00
Noel Grandin
0477e6c39b java: add @Override annotation to overriding methods
Change-Id: I086964c6f6ce52c60c52b6dbc445d3c21d22c80a
2014-08-12 09:41:28 +02:00
Noel Grandin
41709cc268 java: remove unused parameters
Change-Id: I47c618117e079bb2ef90d92c449c8166ea957fa5
2014-08-11 12:33:02 +02:00
Noel Grandin
616b3ad504 java: remove exceptions from throws clauses that are not
.. actually thrown

Change-Id: Ia326ac7f82e11b948ed0f34e20908a96e7adcd10
2014-08-08 09:48:20 +02:00
Noel Grandin
b6a83e99c8 java: remove redundant null checks
Change-Id: Ia42e5ed715fbd3f5b84029a9844da55f307c6260
2014-08-08 09:48:19 +02:00
Noel Grandin
8d6cf7a147 java: remove dead methods
Change-Id: I9f2e705fd603a7c8832c0f0772bee9f395380a0d
2014-08-08 09:48:16 +02:00
Noel Grandin
0c5f51ebbc java: remove commented out code
Change-Id: I44e2043e5da23bc9421c03e550ef1d8b7ebaad36
2014-08-05 11:31:50 +02:00
Noel Grandin
9658b27b69 java: remove some unused variables
Change-Id: Ia9405d3e34e710059ff68bf850de91c36f4e1e1b
2014-08-04 13:38:30 +02:00
Miklos Vajna
e826950e9d sw: still use SvxBrushItem for page style background
Commit 6e61ecd096 (Merge back branch
alg_writerframes to trunk, 2014-03-19) changed the sw UNO API, so that
in case SvxBrushItem / RES_BACKGROUND was to be get/set, it mapped that
to svx's fill style.

This has two problems: 1) it does not work (see the failing unit test)
and also page style editing UI sets SvxBrushItem, so even if the UI is
used to (actually successfully) set the page background, it won't be
saved to ODF.

So, do this background <-> fill style mapping only for frames for now.

Change-Id: I734880a40c891ae9e341cbddf8f88b0462361aac
2014-03-31 12:16:49 +02:00
Armin Le Grand
6e61ecd096 Merge back branch alg_writerframes to trunk
(cherry picked from commit b635b4fa4e42053d30ab639643d2236a20243f62)

Conflicts:
	comphelper/inc/comphelper/TypeGeneration.hxx
	comphelper/source/property/TypeGeneration.cxx
	cui/source/factory/dlgfact.hxx
	cui/source/inc/cuitabarea.hxx
	cui/source/tabpages/tabarea.cxx
	cui/source/tabpages/tabarea.hrc
	cui/source/tabpages/tabarea.src
	cui/source/tabpages/tparea.cxx
	drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
	drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
	drawinglayer/source/texture/texture.cxx
	editeng/inc/editeng/unotext.hxx
	editeng/source/items/frmitems.cxx
	include/drawinglayer/texture/texture.hxx
	include/editeng/brushitem.hxx
	include/svx/sdr/primitive2d/sdrdecompositiontools.hxx
	include/svx/svxids.hrc
	include/xmloff/xmltypes.hxx
	reportdesign/source/ui/misc/UITools.cxx
	sc/source/ui/drawfunc/drawsh.cxx
	sfx2/source/dialog/tabdlg.cxx
	svl/source/undo/undo.cxx
	svx/inc/svx/unoshprp.hxx
	sw/Library_sw.mk
	sw/inc/doc.hxx
	sw/inc/format.hxx
	sw/inc/frmfmt.hxx
	sw/inc/swatrset.hxx
	sw/inc/unomap.hxx
	sw/inc/unoprnms.hxx
	sw/source/core/access/accpara.cxx
	sw/source/core/attr/format.cxx
	sw/source/core/attr/swatrset.cxx
	sw/source/core/doc/docdraw.cxx
	sw/source/core/doc/docfly.cxx
	sw/source/core/doc/notxtfrm.cxx
	sw/source/core/inc/frame.hxx
	sw/source/core/inc/frmtool.hxx
	sw/source/core/layout/atrfrm.cxx
	sw/source/core/layout/paintfrm.cxx
	sw/source/core/text/inftxt.cxx
	sw/source/core/text/porfld.cxx
	sw/source/core/text/txtfly.cxx
	sw/source/core/txtnode/fntcache.cxx
	sw/source/core/uibase/app/docst.cxx
	sw/source/core/uibase/app/docstyle.cxx
	sw/source/core/uibase/shells/drawdlg.cxx
	sw/source/core/uibase/shells/frmsh.cxx
	sw/source/core/unocore/unoframe.cxx
	sw/source/core/unocore/unomap.cxx
	sw/source/core/unocore/unoprnms.cxx
	sw/source/core/unocore/unostyle.cxx
	sw/source/ui/fmtui/tmpdlg.cxx
	sw/source/ui/fmtui/tmpdlg.src
	sw/source/ui/frmdlg/frmdlg.cxx
	sw/source/ui/frmdlg/frmpage.src
	sw/source/ui/inc/frmsh.hxx
	xmloff/source/text/txtprhdl.cxx
	xmloff/source/text/txtprmap.cxx

Change-Id: Id3ffaa83bb5594d287f1ac8f2c1c9cf55c70946d
2014-03-28 14:31:08 +01:00
Alexander Wilms
a27462189d Remove visual noise from sw
Conflicts:
	sw/inc/unodraw.hxx
	sw/inc/unoframe.hxx
	sw/sdi/swriter.sdi
	sw/source/core/unocore/unoframe.cxx
	sw/source/core/unocore/unoparagraph.cxx
	sw/source/filter/ww8/rtfexportfilter.cxx
	sw/source/ui/inc/unotxvw.hxx
	sw/source/ui/lingu/hyp.cxx
	sw/source/ui/lingu/sdrhhcwrap.cxx
	sw/source/ui/uno/swdetect.hxx

Change-Id: Ic0a3fb2392187c277c9b36915ffb10dcf0317908
Reviewed-on: https://gerrit.libreoffice.org/8322
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-27 09:41:00 -06:00
Stephan Bergmann
561c48178c Adapt JunitTest_sw_complex to 2bb87dd659
"fdo#39944: Add DOCUMENT_* accessibility UNO roles"

Change-Id: I8b68ef756d054ee4e53941927108253d62e82672
2014-02-05 10:56:37 +01:00
Michael Stahl
00a63ba1c7 sw: CheckBookmarks: can't store OOo XML any more
Change-Id: Ib9e92043d8483feb47f024ee067f2103625dd031
2014-01-29 10:02:44 +01:00
Stephan Bergmann
62951cdd17 Introduce com.sun.star.frame.theGlobalEventBroadcaster singleton
...to supersede com.sun.star.frame.GlobalEventBroadcaster single-instance
service.

Change-Id: I74ecaadadb4c600d39979aa7c13b6389bed38fd7
2014-01-16 18:40:05 +01:00
Andras Timar
1ba111343e bugs.freedesktop.org -> bugs.libreoffice.org
Change-Id: I56c1190c93333636981acf2dd271515170a8a904
2013-11-17 08:33:01 +01:00
David Ostrovsky
b122ec243b Remove Java unit tests migrated to Python
Change-Id: I6f4792a1fdbd40d016fabf8649c7058adaedd00c
Reviewed-on: https://gerrit.libreoffice.org/6017
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2013-10-15 08:48:04 +00:00
Troy Rollo
ee41ad3482 fdo#33960: sw: fix cross reference fields some more
Change-Id: Ia0a34c8fa475f9dea609962997bce9169d9b8878
2013-08-26 15:12:47 +02:00
Noel Grandin
6f17a2f66f Java cleanup, access static methods using correct syntax
Change-Id: I8443aef43d82de33ac7cb47d40cc5b544f7c9c87
2013-04-26 08:36:04 +02:00
Noel Grandin
64e85a4cc8 Java cleanup, remove unused imports
Change-Id: I697017f196a7f7e5684011ae23941e54051c45dd
2013-04-26 08:29:38 +02:00
Noel Grandin
ada0298167 Java cleanup - reduce use of global fields
This field does not need to be global, it is returned from the relevant
methods

Change-Id: Ic53eec4a699d6acc4410e71dde385e6a49ded745
Reviewed-on: https://gerrit.libreoffice.org/3567
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-04-23 10:30:31 +00:00
Michael Meeks
62badf3828 Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-22 09:37:38 +01:00
Noel Grandin
8d87758d65 Java cleanup, remove the rest of the unnecessary casts
Change-Id: Ia61d250f6b3711abc29569c5ece38a6f87e38daa
Reviewed-on: https://gerrit.libreoffice.org/3432
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-04-19 07:52:08 +00:00
Michael Stahl
5c05dd12aa sw: VarFields test: fix "\" in URL (test fails on windows)
Change-Id: Ib1bc81e907cfd3e7a770fccf032c10fec91147e8
2013-03-21 22:29:19 +01:00
David Ostrovsky
3333bb59e2 fdo#55814 improve unit test
Change-Id: I1508cc13bc6f025e671fb0f942a700a37965e242
2013-03-21 10:23:16 +01:00
David Ostrovsky
1bf65d1d57 fdo#55814 create unit test for it first
1. create a variable field, name it "foo" and assign value 0
2. create a section, and put content a in it and assign condition
   "foo EQ 1" to it
3. change th value of VAR foo from 0 to 1
4. expected behaviour: section is hidden
   current behaviour: section get corrupted: condition is overwritten with "0"

Change-Id: I52fb50e26f5330c2b4745093ac954cecf45924f5
2013-03-20 10:30:43 +01:00
Michael Stahl
68d40d2cae fdo#58242: sw: fix more crashes when not on SwTxtNode
In getCrsrPropertyValue etc.; also add a unit test for the problem.

Change-Id: Ibd459a43393c39b4fed9fb89aae4a5f7bacff007
2013-01-09 15:57:50 +01:00
Michael Stahl
affd2b5c4f SwXDocumentIndex: implement css.util.XRefreshable
... as has been promised since the OOo initial import in deprecation
notices in XDocumentIndex :-/

Change-Id: I5dd7e482e0e6d60dcad3de883d5815f729e6b80f
2012-12-03 18:31:57 +01:00
José Guilherme Vanz
4395680011 fdo#51304: Remove @author annotation
This commit removes some @author annotations and some cleanup.

Change-Id: Iaf2c4465825dc73af6c1d7377ae847262721c22b
Signed-off-by: José Guilherme Vanz <guilherme.sft@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/1122
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-11-20 05:15:45 +00:00