Commit Graph

234 Commits

Author SHA1 Message Date
Andras Timar
f20c03acac tdf#90713 tdf#90925 remove footnote mark from TOC/List of Figures entry
Change-Id: I58ab0fbc6a247c29c77a4e9d7febc11daa4a79c8
Reviewed-on: https://gerrit.libreoffice.org/16233
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2015-06-11 20:03:01 +00:00
Stephan Bergmann
b2c8ea3a02 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I8d27ae80d209159690182ab91e272cf00e9f863d
2015-06-08 16:28:47 +02: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
Katarina Behrens
3ccacb47fa tdf#89783: Allow more than 64k PageDescs
+ adjust related code using the functionality

Change-Id: I6fa4ad04137643009ee39522c36d6c9e6f3d2502
2015-05-18 13:54:12 +02:00
Katarina Behrens
98436c4b53 tdf#89783: Adjust to new GetPos retval (size_t vs. sal_uInt16)
Some of the usages of GetPos were just misusing it to find out
whether a vector contains given element -- use Contains() in those
cases

This patch is partially based on work of Christoph Lutz

Conflicts:
	sw/source/filter/ww8/wrtw8esh.cxx
	sw/source/filter/ww8/wrtw8num.cxx

Change-Id: I40bedba905e7577ba23f69acee178e0ea7cc1521
2015-05-03 23:31:53 +02:00
Stephan Bergmann
6f3c52bb37 const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Icb14a036ea9d7636359b6bc5e0af17568c0d54cb
2015-03-26 15:33:38 +01:00
Bjoern Michaelsen
d26725ad0f move SwIterator into calbck.hxx
Change-Id: Icdcd46d392bbf1dbe45448328c310d9a327ba60d
2015-03-19 23:41:06 +01:00
Noel Grandin
10a1b86185 convert MarkType to enum class
Change-Id: I73c23d327104b377834013a0a6bd2de18de2900b
2015-03-11 13:40:46 +02:00
Noel Grandin
68c87b46fd convert SetAttrMode to enum class
Change-Id: If7dd0c49480756afb7d4eaaba597ecc305c35f64
2015-03-11 10:16:53 +02:00
Tobias Lippert
4bdbea5447 tdf#89520 Make TOX creation more robust
The code is now more robust and will accept illegal arguments.

Change-Id: I43ae82b953cea845fb170aa7b6e8d42470ad4e5e
Reviewed-on: https://gerrit.libreoffice.org/14580
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-03-03 10:08:35 +00:00
Caolán McNamara
c19c242ec0 boost->std
Change-Id: I412137e7e7b9b2b87f401bc140a9499d1fc012c6
2015-02-18 11:00:17 +00:00
Jan-Marek Glogowski
89f01955e2 Merge common code of sw format lists
Moves the common code of Fmt based lists and simple vector lists
into two intermediate template classes, of which one provides
the SwFmtsBase interface.

Change-Id: If963c19293584654a3d17438221e3fca8bdfd4f9
Reviewed-on: https://gerrit.libreoffice.org/13448
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-22 09:11:42 +00:00
Pieter Adriaensen
f29bf46359 Resolves: fdo#87003 - Kill BOOST_FOREACH
Conflicts:
	avmedia/source/framework/modeltools.cxx
	basic/source/sbx/sbxbase.cxx
	sd/source/filter/eppt/pptx-epptooxml.cxx
	svx/qa/unit/svdraw/test_SdrTextObject.cxx
	sw/qa/core/uwriter.cxx
	sw/source/core/doc/CntntIdxStore.cxx
	sw/source/core/doc/DocumentLinksAdministrationManager.cxx
	sw/source/core/doc/docnew.cxx
	sw/source/core/doc/gctable.cxx
	sw/source/core/doc/htmltbl.cxx
	sw/source/core/doc/sortopt.cxx
	sw/source/core/doc/tblcpy.cxx
	sw/source/core/doc/tblrwcl.cxx
	sw/source/core/docnode/ndcopy.cxx
	sw/source/core/docnode/ndtbl.cxx
	sw/source/core/docnode/ndtbl1.cxx
	sw/source/core/frmedt/tblsel.cxx
	sw/source/core/text/itratr.cxx
	sw/source/core/tox/ToxLinkProcessor.cxx
	sw/source/filter/xml/xmltble.cxx

Change-Id: Id176d4e052c719c9afdf91ed450de84d8d2bc486
Reviewed-on: https://gerrit.libreoffice.org/13575
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-07 14:57:09 +00:00
Nathan Yee
a509a8d995 Resolves: fdo#87003 Kill BOOST_FOREACH on master
use C++11s range-based for() loops instead

Conflicts:
	sd/source/filter/eppt/pptx-epptooxml.cxx

Change-Id: I0868eb345932c05b7e40b087035da252b99bf0b9
Reviewed-on: https://gerrit.libreoffice.org/13714
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-05 09:34:08 +00:00
Stephan Bergmann
b1fab4ab32 sw: Use appropriate OUString functions on string constants
Change-Id: I9c3e03324c69beb5af4c43da208086600876f875
2014-12-18 14:12:34 +01:00
Stephan Bergmann
0f5e917024 Introduce rtl::OUStringLiteral1
...to use single ASCII character literals "more directly" in the OUString API
(instead of having to go via an intermediary OUString ctor call).  Especially
useful for character literals that are defined as const variables or via macros
("direct" uses of character literals in the OUString API can often simply be
replaced with single-character string literals, for improved readability).

(The functions overloaded for OUStringLiteral1 are those that are actually used
by the existing LO code; more could potentially be added.  The asymmetry in the
operator ==/!= parameter types is by design, though---writing code like

  'x' == s

is an abomination that shall not be abetted.)

Change-Id: Ic5264714be7439eed56b5dfca6ccaee277306f1f
2014-12-17 16:39:33 +01:00
Michaël Lefèvre
7c181e5e0a fdo#75757 Remove inheritance to std::vector
Change-Id: I5d5746869e47a1d25d6bec28452394e215d4427d
Reviewed-on: https://gerrit.libreoffice.org/13483
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-17 08:20:11 +00:00
Michael Stahl
9ba1f8e19e fdo#83798: sw: fix generation of ToX with chapter numbers
(regression from 0a1b1511fa
 and 26259e0cca)

Change-Id: Idf9a6f5620c9efe62d2824df1688b30d13a4782e
2014-11-25 23:37:10 +01:00
Noel Grandin
0df9e5e46b loplugin: cstylecast
Change-Id: Ia3dc8efc8c8803597cbf226780bdb7e1c9681ee0
2014-11-24 14:20:37 +02:00
Michael Stahl
6b9ab853b6 fdo#85872: sw: fix crash in insert index dialog
Looks like the old code would create a link starting at the beginning in
this case, so let's do the same.

(regression from 94b296d541)

Change-Id: Idcd17ae51c478aa5c2a000c7b33a8244f06bd166
2014-11-19 23:56:59 +01:00
Miklos Vajna
3c95503cef Use SwNode::GetTxtNode()
Change-Id: Icf3e1013d5eba5702badf19aa6c1f5e6708ed154
2014-11-19 09:03:51 +01:00
Andrea Gelmini
c70f1545e2 Removed duplicated includes
Change-Id: I5362d997bfa086c9fb1726efcb15132a966684f6
Reviewed-on: https://gerrit.libreoffice.org/12160
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-10-31 16:18:30 +00:00
Andrea Gelmini
0c0e3e7539 Fixed typos. No automatic tools (sed, and so on).
Change-Id: Ia43976d84eede6f699381bc4f3daf89b95e4cb4f
Reviewed-on: https://gerrit.libreoffice.org/12150
Reviewed-by: Bryan Quigley <gquigs@gmail.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-10-30 17:16:02 +00:00
Michael Stahl
a54734c82a sw: assert SfxPoolItem::operator==
Change-Id: I9b48fc25abcbdeceefd5a86d8305209f312c9976
2014-10-27 14:25:52 +01:00
Caolán McNamara
e5ab368555 Related: coverity#704049 Unchecked return value
surely this should be IsLess not IsEqual, i.e.
see
 commit 86a3fe47a6
 Date:   Sat Oct 4 21:36:27 2014 -0500
 coverity#704049 Unchecked return value
and
 commit 3edb1dcdc8
 Date:   Wed Jun 26 08:32:38 2002 +0000
 #99877# Phonetic sorting for Asian languages

Change-Id: I6c78e388e986577c34b37643a877ab7f5c17b173
2014-10-06 14:08:59 +01:00
Norbert Thiebaud
86a3fe47a6 coverity#704049 Unchecked return value
Gold? broken since 3edb1dcdc8
June 26 2002 ?

Change-Id: I7f0bc4899070daff8329d6f66315956a7ed6084c
2014-10-04 21:45:15 -05:00
Lionel Elie Mamane
5ca2d1e265 more accurate typing
Change-Id: Ibccf8c5cf520b79da0914eccbebdbb68601dd0f1
Reviewed-on: https://gerrit.libreoffice.org/11314
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-09-07 02:37:38 -05:00
Lionel Elie Mamane
aa454b228c AUTH_FIELD_END looks like it is made for this
avoids mucking with casts and allows more accurate typing

Change-Id: I968a2f7fcfa5534947102918125b095ca3b4a66c
Reviewed-on: https://gerrit.libreoffice.org/11313
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-09-07 02:37:04 -05:00
Lionel Elie Mamane
dd2abe04a8 push explicit cast to minimal expression
Change-Id: I33879aa7724703745728128e59735e5d16aa2a57
2014-09-07 08:53:24 +02:00
Matteo Casalin
f4b91fc723 Fix build: narrowing cast
Change-Id: Iebcc89019dc5c482ab00743071002e2983e65469
2014-09-06 14:27:59 +02:00
Matteo Casalin
fe2b2be9da Improve readability by early bailout
Change-Id: Ie6616f886d58c756df10ae917ced07c82cae7f61
2014-09-06 12:09:05 +02:00
Matteo Casalin
43bd90abe8 Avoid lookup table: just one single special case
Caller uses indexes from 1 to GetFormMax(), that is AUTH_TYPE_END+1
for TOX_AUTHORITIES and is smaller (23) that the number of entries
in the lookup table (30). The index is compensated for this offset,
so that the following check for special case AUTH_TYPE_WWW is
correct, but no checks on maximum value are performed since it
should have never reached the last special item of the table anyway.

Change-Id: Idd85e509da1e8ab4cdda0070f513c4e07008d410
2014-09-06 12:09:05 +02:00
Matteo Casalin
80a8509b89 Reserve vector capacity in advance and avoid copying it
Change-Id: I98d1d6fdf6c4646486a751c34e79bddf771b83a9
2014-09-06 12:09:04 +02:00
Michael Stahl
57b29dc9d4 RegisterToTOXType has a silly parameter name
Change-Id: I1cfd5c077f4b1ac809ace91fe76308f0e1892e09
2014-08-20 16:40:14 +02:00
Valentin Kettner
535971f3a1 Refactored IDocumentStylePoolAccess out of SwDoc.
Added non const SwDoc::GetDfltTxtFmtColl and SwDoc::GetTxtFmtColls
and SwDoc::GetCharFmts.
Had to make the manager friend of SwTxtFmtColl and SwConditionTxtFmtColl
Had to make SwDoc::_MakeCharFmt and SwDoc::_MakeFrmFmt public.

Change-Id: I19a36d91f92b3781a6c4313ec12eb8f7d4dfacc3
2014-08-12 23:26:38 +02:00
Valentin Kettner
5494954b26 Refactored IDocumentLayoutAccess out of SwDoc.
Into the new class DocumentLayoutManager.

Change-Id: I02d0cfcc63633d0bdab380508b2ef563187fd269
2014-08-12 23:26:38 +02:00
Stephan Bergmann
3dafed2ede -Werror,-Wundefined-bool-conversion
Change-Id: Iff8db4c82abeeed0789d7012223a846f1058c353
2014-08-12 12:19:43 +02:00
Matteo Casalin
05dda9a913 SwpHintsArray/SwpHints and related: sal_uInt16 to size_t
Change-Id: I9a7674109b05683287e12cbce6bc417b40ca5084
2014-07-22 23:50:42 +02:00
Noel Grandin
dac4ca5f68 new loplugin: externalandnotdefined
Find "missing headers," where a function is declared directly in the
.cxx (as extern) and not defined, and should arguably instead be declared
in an include file.

Change-Id: I6d83ee432b2ab0cd050aec2b27c3658d32ac02a2
2014-07-11 14:12:25 +02:00
Noel Grandin
e2080e70fe new compilerplugin returnbyref
Find places where we are returning a pointer to something, where we can
be returning a reference.
e.g.
   class A {
     struct X x;
     public X* getX() { return &x; }
   }
which can be:
     public X& getX() { return x; }

Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
2014-06-24 11:34:21 +02:00
Noel Grandin
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
Tobias Lippert
3aca57fb9c TOX: Extract generation of tab stop attributes to its own class.
This allows us to pass through less parameters which are only used for
this functionality.

Conflicts:
	sw/inc/ToxTextGenerator.hxx
	sw/source/core/tox/ToxTextGenerator.cxx

Change-Id: I5a03cf8ec6d86d05f2a7f7771668585669c1e595
Reviewed-on: https://gerrit.libreoffice.org/9613
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-06-06 14:02:16 +00:00
Tobias Lippert
0a1b1511fa Unittest generation of text for chapter entries in the TOC
Conflicts:
	sw/inc/ToxTextGenerator.hxx
	sw/qa/cppunit/tox/test_ToxTextGenerator.cxx
	sw/source/core/tox/ToxTextGenerator.cxx

Change-Id: I343958f85fb6718215a0caa456a825d72f168a57
Reviewed-on: https://gerrit.libreoffice.org/9612
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-06-06 12:19:12 +00:00
Caolán McNamara
68e18231b9 tweak to get building universally
Change-Id: I5760dc1fccb7ad726663727b9404e014da519755
2014-06-06 09:31:11 +01:00
Tobias Lippert
26259e0cca Unittest generation of page number placeholders in table of contents
Conflicts:
	sw/inc/ToxTextGenerator.hxx
	sw/source/core/tox/ToxTextGenerator.cxx

Change-Id: I15c963b6e1a8823a1fdafd2c123d18ba3dc9f134
Reviewed-on: https://gerrit.libreoffice.org/9611
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-06-06 08:08:08 +00:00
Caolán McNamara
2ac07bb5bf missing mode-lines, stray semi-colons
Change-Id: I89fc2b0385cebbf5c629e67fa89ba1dd30486f35
2014-06-06 09:00:58 +01:00
Tobias Lippert
9088a4c2d1 fdo#30732 Retain selected character attributes for table of contents
The text and selected attributes are copied from the source text node
and added to the target node at the corresponding positions.

Conflicts:
	sw/inc/ToxTextGenerator.hxx
	sw/source/core/tox/ToxTextGenerator.cxx

Change-Id: Ifa329bfcb2b9691120513236909bcadaf1127b5e
Reviewed-on: https://gerrit.libreoffice.org/9610
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-06-06 07:59:21 +00:00
Caolán McNamara
eb1b6b8f52 they're not copyable, deploy boost::ptr_vector instead
Change-Id: I2e44b9e60622981141eb7af9753898b9f98b238a
2014-06-05 20:31:58 +01:00
Tobias Lippert
94b296d541 Unittest link generation for table of contents.
The logic was moved to a separate class and unittested.

Conflicts:
	sw/inc/ToxTextGenerator.hxx

Change-Id: I0e4475f5e2950cdfdfb07b89128c4ce1d6af3f22
Reviewed-on: https://gerrit.libreoffice.org/9609
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-06-05 16:26:39 +00:00
Tobias Lippert
e5345f62bf Unittest the whitespace stripping logic for tox text generation
The separate class allows to unittest this functionality in isoloation.

Change-Id: I1e5eddfb455ca85a662ea38c03302883decc5d58
Reviewed-on: https://gerrit.libreoffice.org/9608
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2014-06-05 16:26:06 +00:00