Commit Graph

132 Commits

Author SHA1 Message Date
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
Matteo Casalin
9fbb74b5b6 sal_uInt16 to size_type
Change-Id: Ib6715c5b61c718302b910a19ef557960e0f7aa93
2015-05-03 22:31:56 +02:00
Noel Grandin
a7b7c64afc convert SCRIPTTYPE_ constants to scoped enum
Change-Id: I5be3980ac865162d8d7626556ca47eca4b0ee433
Reviewed-on: https://gerrit.libreoffice.org/15344
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-04-17 07:21:08 +00:00
Matteo Casalin
6753a14a49 getMaxLookup() can return by value and also be local inline
Change-Id: Ic8975e931992f9010dcb86761d0716c0dffb84ba
2015-04-12 22:36:24 +02:00
Matteo Casalin
4b16c2e873 Fix indentation and simplify
Change-Id: I7557fa22ffe14dd62cf6c0a3ab99323118d97b29
2015-04-12 22:36:24 +02:00
Matteo Casalin
6fbdc7cb86 Use range-for loop
Change-Id: I971bdbe38b78a9d0cba2ddbf189171fb9a21013f
2015-04-12 22:36:23 +02:00
Julien Nabet
2a44e785da Related fdo#86929: Kill FOREACHPAM_START for good (final part)
Change-Id: I74c6e8633ee5ac477d2f7ac8ee468204076bc886
Reviewed-on: https://gerrit.libreoffice.org/13488
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-18 06:39:46 +00:00
Julien Nabet
bbf59cb82e Related fdo#86929: Kill FOREACHPAM_START for good (part2)
Change-Id: Ia6e166a4158d28f1a4145e51040f2f5637827197
Reviewed-on: https://gerrit.libreoffice.org/13466
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2014-12-15 21:05:23 +00:00
Bjoern Michaelsen
d2043e583a use C++11 iteration
Change-Id: I8a05445fe59c68b867a5ebf7291df0cfd07c0fb9
2014-12-04 01:09:44 +01:00
Bjoern Michaelsen
5b9b4eb0b1 use C++11 iteration
Change-Id: I29172f321ebb040278cc4d59ed193973ec6e2af0
2014-12-04 01:09:44 +01:00
Bjoern Michaelsen
c227659968 use C++11 iteration
Change-Id: I0a220d6cec1f50e3bfb5ae3c4eb7fd43836236f8
2014-12-04 01:09:44 +01:00
Bjoern Michaelsen
b4f8a3dd10 use C++11 iteration
Change-Id: Ib8ab87e5581cd4026c5571becc58c9b7c07cbdbe
2014-12-04 01:09:43 +01:00
Bjoern Michaelsen
ecb4e05fb2 use C++11 iteration
Change-Id: I83bed43706cc1dcc17f1b1f37404340ee13afaa4
2014-12-04 01:09:43 +01:00
Daniel Sikeler
a143d7d14d De-/Increase fontsize when multi-sized text
I did the changes proposed in https://gerrit.libreoffice.org/#/c/11857/
I also tested it with a mixture of CJK and CTL text

Change-Id: Ic75f557b8c0a68f43abbd8c28b2222945e9361b7
Reviewed-on: https://gerrit.libreoffice.org/13152
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-12-02 13:45:46 +00:00
Noel Grandin
eb41a2ba20 loplugin: cstylecast
Change-Id: I322c6f9cd106a0ac3ad5c67dd0d49660b608e079
2014-11-19 13:19:37 +02:00
Miklos Vajna
3c95503cef Use SwNode::GetTxtNode()
Change-Id: Icf3e1013d5eba5702badf19aa6c1f5e6708ed154
2014-11-19 09:03:51 +01:00
Caolán McNamara
6a4eaa43b6 coverity#1251172 Dereference null return value
Change-Id: Ic1f1c7f055f3fb21e7361a2e14f6eebe3dac4216
2014-11-08 11:52:04 +00:00
Daniel Sikeler
98c95ce3a7 fdo#35862 De-/Increase font when multi-sized text
Added two new function to the SwEditShell.
The first returns all items of a specific WhichId wich belong to the current selection. The items from the attribute set and from the hints are used.
The second returns SwPaMs separated at borders of an itemtype  identified by its WhichId. The SwPaMs must be deleted after yous.

Change-Id: I00e6d1b0f75b9f184343711c6d2bdc7e5694c711
Reviewed-on: https://gerrit.libreoffice.org/11857
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2014-11-03 11:26:21 +00:00
Matteo Casalin
da44e4cce8 Use size_t consistently, constify, reduce scope
Change-Id: Ie5de70645becc5ac584f1b3ffe6048969d2a19a9
2014-09-06 12:08:13 +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
6aa35db393 sw: sal_Bool->bool
Change-Id: I324a0ffde2ddcca105451c19e7aadcfad15211d8
2014-04-30 08:44:42 +02:00
Matteo Casalin
a915d7d505 sal_Bool to bool and minor optimizations
Change-Id: Iddee0b723ce8a0ac9020b0b048a31212dc377430
2014-02-16 22:52:31 +01:00
Oliver-Rainer Wittmann
c2b5521921 Resolves: #i33737# enable in-place editing of Input Fields
(cherry picked from commit c2afeb1c3f11e8f420b59f3786eb8626c99ff595)

Conflicts:
	sw/inc/IDocumentContentOperations.hxx
	sw/inc/crsrsh.hxx
	sw/inc/doc.hxx
	sw/inc/editsh.hxx
	sw/inc/expfld.hxx
	sw/inc/fldbas.hxx
	sw/inc/fmtfld.hxx
	sw/inc/hintids.hxx
	sw/inc/ndtxt.hxx
	sw/inc/txatbase.hxx
	sw/inc/txtfld.hxx
	sw/inc/txtrfmrk.hxx
	sw/inc/txttxmrk.hxx
	sw/inc/viscrs.hxx
	sw/source/core/bastyp/init.cxx
	sw/source/core/crsr/crsrsh.cxx
	sw/source/core/crsr/crstrvl.cxx
	sw/source/core/crsr/findattr.cxx
	sw/source/core/crsr/findtxt.cxx
	sw/source/core/crsr/swcrsr.cxx
	sw/source/core/crsr/viscrs.cxx
	sw/source/core/doc/dbgoutsw.cxx
	sw/source/core/doc/doc.cxx
	sw/source/core/doc/docfld.cxx
	sw/source/core/doc/docfmt.cxx
	sw/source/core/doc/docnum.cxx
	sw/source/core/doc/docredln.cxx
	sw/source/core/doc/docruby.cxx
	sw/source/core/doc/doctxm.cxx
	sw/source/core/doc/visiturl.cxx
	sw/source/core/docnode/nodes.cxx
	sw/source/core/edit/edatmisc.cxx
	sw/source/core/edit/edattr.cxx
	sw/source/core/edit/edfld.cxx
	sw/source/core/edit/edfldexp.cxx
	sw/source/core/edit/editsh.cxx
	sw/source/core/edit/edlingu.cxx
	sw/source/core/edit/ednumber.cxx
	sw/source/core/fields/expfld.cxx
	sw/source/core/fields/fldbas.cxx
	sw/source/core/fields/reffld.cxx
	sw/source/core/frmedt/fefly1.cxx
	sw/source/core/inc/docfld.hxx
	sw/source/core/inc/rolbck.hxx
	sw/source/core/inc/swfont.hxx
	sw/source/core/layout/flycnt.cxx
	sw/source/core/layout/laycache.cxx
	sw/source/core/layout/trvlfrm.cxx
	sw/source/core/text/atrhndl.hxx
	sw/source/core/text/atrstck.cxx
	sw/source/core/text/inftxt.cxx
	sw/source/core/text/porfld.cxx
	sw/source/core/text/porfld.hxx
	sw/source/core/text/txtfld.cxx
	sw/source/core/tox/tox.cxx
	sw/source/core/tox/txmsrt.cxx
	sw/source/core/txtnode/atrfld.cxx
	sw/source/core/txtnode/ndhints.cxx
	sw/source/core/txtnode/ndtxt.cxx
	sw/source/core/txtnode/thints.cxx
	sw/source/core/txtnode/txatbase.cxx
	sw/source/core/txtnode/txatritr.cxx
	sw/source/core/txtnode/txtedt.cxx
	sw/source/core/undo/SwUndoField.cxx
	sw/source/core/undo/rolbck.cxx
	sw/source/core/undo/unsect.cxx
	sw/source/core/undo/untbl.cxx
	sw/source/core/unocore/unocrsrhelper.cxx
	sw/source/core/unocore/unofield.cxx
	sw/source/core/unocore/unoframe.cxx
	sw/source/core/unocore/unorefmk.cxx
	sw/source/core/view/vprint.cxx
	sw/source/filter/ascii/ascatr.cxx
	sw/source/filter/html/htmlatr.cxx
	sw/source/filter/rtf/rtffly.cxx
	sw/source/filter/ww1/fltshell.cxx
	sw/source/filter/ww1/w1filter.cxx
	sw/source/filter/ww8/wrtw8esh.cxx
	sw/source/filter/ww8/wrtw8nds.cxx
	sw/source/filter/ww8/ww8atr.cxx
	sw/source/filter/ww8/ww8par.cxx
	sw/source/filter/ww8/ww8par3.cxx
	sw/source/filter/ww8/ww8par5.cxx
	sw/source/ui/app/applab.cxx
	sw/source/ui/docvw/edtwin.cxx
	sw/source/ui/docvw/edtwin2.cxx
	sw/source/ui/envelp/envfmt.cxx
	sw/source/ui/fldui/fldedt.cxx
	sw/source/ui/fldui/fldmgr.cxx
	sw/source/ui/inc/wrtsh.hxx
	sw/source/ui/lingu/hhcwrp.cxx
	sw/source/ui/shells/basesh.cxx
	sw/source/ui/shells/drwtxtex.cxx
	sw/source/ui/shells/grfsh.cxx
	sw/source/ui/shells/tabsh.cxx
	sw/source/ui/shells/textfld.cxx
	sw/source/ui/shells/textidx.cxx
	sw/source/ui/shells/textsh.cxx
	sw/source/ui/shells/textsh1.cxx
	sw/source/ui/shells/txtattr.cxx
	sw/source/ui/uiview/formatclipboard.cxx
	sw/source/ui/uiview/view.cxx
	sw/source/ui/uiview/view2.cxx
	sw/source/ui/uiview/viewsrch.cxx
	sw/source/ui/uiview/viewstat.cxx
	sw/source/ui/uiview/viewtab.cxx
	sw/source/ui/wrtsh/wrtsh1.cxx
	sw/source/ui/wrtsh/wrtsh2.cxx

Change-Id: I6758d6719e1fd523797cc6ee2648ffcb47d52595
2013-11-19 15:51:27 +00:00
Caolán McNamara
8820448bfe longparas: change GetExpandTxt to sal_Int32
Change-Id: I34b6f91d104e5f095f0aad58869d62d0a367d2b3
2013-11-14 11:05:38 +00:00
Matteo Casalin
ebeff3f074 xub_StrLen to sal_Int32 in SwIndex and some related
Change-Id: I66735635a88844c30a7fa1c886d2c1df34008f4f
2013-11-14 09:23:19 +01:00
Caolán McNamara
b17601a4cb longparas: these USHRT_MAX are really STRING_LEN
Change-Id: I5b55204c262e9fd0c14a9562351a9a1f8b080cec
2013-11-13 15:29:22 +00:00
Noel Grandin
fa109ceba9 convert xub_StrLen to sal_Int32
convert various module-local functions

Change-Id: I89f3eb40b107e2617958e474ffe86bd73e01cf33
2013-11-06 08:51:23 +02:00
Noel Grandin
a6dc113734 convert xub_StrLen to sal_Int32
Convert code like:
   xub_StrLen nLen = aStr.getLength();
into
   sal_Int32 nLen = aStr.getLength();

Change-Id: Ib0af6b747068257478918fd1cc93e4925f32ac47
2013-11-05 15:15:30 +02:00
Oliver-Rainer Wittmann
0921642e7f Related: #i33737# some minor refactoring in advance
(cherry picked from commit b27ff0a078b7c1b32e88041f25314eaad267618b)

Conflicts:
	sw/source/core/bastyp/init.cxx
	sw/source/core/crsr/findtxt.cxx
	sw/source/core/doc/doc.cxx
	sw/source/core/doc/docfld.cxx
	sw/source/core/edit/edfld.cxx
	sw/source/core/fields/authfld.cxx
	sw/source/core/fields/dbfld.cxx
	sw/source/core/fields/docufld.cxx
	sw/source/core/fields/expfld.cxx
	sw/source/core/fields/fldlst.cxx
	sw/source/core/fields/reffld.cxx
	sw/source/core/frmedt/tblsel.cxx
	sw/source/core/inc/wrong.hxx
	sw/source/core/layout/atrfrm.cxx
	sw/source/core/text/EnhancedPDFExportHelper.cxx
	sw/source/core/text/atrstck.cxx
	sw/source/core/text/itratr.cxx
	sw/source/core/tox/txmsrt.cxx
	sw/source/core/txtnode/atrfld.cxx
	sw/source/core/txtnode/ndtxt.cxx
	sw/source/core/txtnode/thints.cxx
	sw/source/core/undo/SwUndoField.cxx
	sw/source/core/undo/rolbck.cxx
	sw/source/core/unocore/unocrsrhelper.cxx
	sw/source/core/unocore/unofield.cxx
	sw/source/core/unocore/unoportenum.cxx
	sw/source/core/unocore/unotext.cxx
	sw/source/filter/rtf/rtffld.cxx
	sw/source/filter/ww8/ww8atr.cxx
	sw/source/filter/ww8/ww8par.cxx
	sw/source/ui/docvw/AnnotationWin.cxx
	sw/source/ui/utlui/content.cxx

Change-Id: I372cfaed881188266c359867879ae92c8d45fee1
2013-11-01 14:43:15 +00:00
Noel Grandin
8396cce9b5 clean up places accessing the NULL at the of an OUString
There were only a couple of real bugs fixed, but we're a little
bit safer now.
This also fixes the assert and the comment in OUString::operator[]
about this.

Change-Id: Ibe16b5794e0ba7ecd345fa0801586d25b015974c
2013-10-23 13:12:55 +02:00
Tor Lillqvist
a7724966ab Bin comments that claim to say why some header is included
They are practically always useless, often misleading or obsolete.

Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-10-22 16:56:28 +03:00
Caolán McNamara
894054ceff CID#736191 out of bounds
Change-Id: Iaed9abdeb82e2f039020e95314603ad9d20aa3e4
2013-10-19 19:16:30 +01:00
Noel Grandin
0422a95d37 convert sw/source/core/edit/*.cxx from String to OUString
Change-Id: I7d79a1a5bdfbfbb58ca2b99dc544dc174c997fb4
2013-10-18 09:59:21 +02:00
Caolán McNamara
8df4f86d27 CID#982804 out of bounds
Change-Id: I134944d8c4a1312f65ff7c3df98d8828bfc96b15
2013-10-16 11:59:50 +01:00
Miklos Vajna
815c675872 sw: unify PCURCRSR / FOREACHPAM_START / FOREACHPAM_END macros
Change-Id: I10ab2d0ba10178ba2d37db2632349215341612f4
2013-09-21 14:26:55 +02:00
Matteo Casalin
2631538427 String to OUString
Change-Id: I64f31d8a0bb02a2ecd8fcc993c90ca76923b35fb
Reviewed-on: https://gerrit.libreoffice.org/4924
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-07-16 13:55:41 +00:00
Philipp Riemer
b3e6706260 fdo#62475 - remove visual noise in sw/source/core/edit
- ASCII art
    - method comments without further info
    - multiple blank lines

Change-Id: I2b17f5fe4be89cc58c3563dfc64f1b3e2a20bdee
2013-06-09 00:56:40 +02:00
Philipp Riemer
7cb8b8c8e9 work on existing comments in sw/source/core/edit
Change-Id: I32b249971ac6ac540d816c38e00321befb181901
2013-06-09 00:56:40 +02:00
Miklos Vajna
0fdd758051 sw: missing prefix for global pBreakIt
Change-Id: I7fa8e697537ce8eb915da00920bf6882603b115a
2013-04-19 10:38:24 +02:00
Matthias Freund
cfc6473352 Comment translation german-english
Three small files...

Change-Id: I9dd5914caef6ca061e94d52d7abd5afb59c8ed29
Reviewed-on: https://gerrit.libreoffice.org/2353
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-02-24 00:43:14 +00:00
Miklos Vajna
d0fc2174a7 sw: rename member variables missing their prefix in ViewShell
Change-Id: I4ec171a42f589826071d6e9ea2c87e9e2c94fdb3
2013-02-23 12:49:39 +01:00
Michael Stahl
0295c8a34e sw: let SwTxtNode::GetTxt() return OUString
Change-Id: I36e777b2f623429773277e092284f7d2ba61e6ef
2013-02-18 20:16:07 +01:00
Michael Meeks
caaeb0a046 re-base on ALv2 code. Includes:
Patches contributed by Oliver-Rainer Wittmann
    sw34bf06: #i117783# - Writer's implementation of XPagePrintable -
    apply print settings to new printing routines
    http://svn.apache.org/viewvc?view=revision&revision=1172115
    sw34bf06: #o12311627# use <rtl_random> methods to
    create unique ids for list styles and list ids
    http://svn.apache.org/viewvc?view=revision&revision=1172112
    sw34bf06 #i114725#,#i115828# - method <SwDoc::ClearDoc()> -
    clear list structures completely
    http://svn.apache.org/viewvc?view=revision&revision=1172122
    i#118572 - remove ui string and help content regarding usage of
    Java Mail in Writer's Mail Merge as Java Mail is not used.
    http://svn.apache.org/viewvc?view=revision&revision=1197035

    Patches contributed by Mathias Bauer
    cws mba34issues01: #i117718#: provide filter name in
    case storage of medium does not allow to detect one
    http://svn.apache.org/viewvc?view=revision&revision=1172350
    cws mba34issues01: #i117721#: directly provide
    parameters retrieved from SfxMedium
    http://svn.apache.org/viewvc?view=revision&revision=1172353
    gnumake4 work variously
    http://svn.apache.org/viewvc?view=revision&revision=1394707
    http://svn.apache.org/viewvc?view=revision&revision=1394326
    http://svn.apache.org/viewvc?view=revision&revision=1396797
    http://svn.apache.org/viewvc?view=revision&revision=1397315
    cws mba34issues01: #i117723#: convert assertion into trace
    http://svn.apache.org/viewvc?view=revision&revision=1172355
    cws mba34issues01: #i117699#: keep layout alive until swdoc dies
    http://svn.apache.org/viewvc?view=revision&revision=1172362
    cws mba34issues01: #i117943#: missing color attributes in RTF clipboard
    http://svn.apache.org/viewvc?view=revision&revision=1172363

    Patch contributed by Henning Brinkmann
    imported patch i#103878
    http://svn.apache.org/viewvc?view=revision&revision=1172109

    Patches contributed by Michael Stahl
    sw34bf06: #i117955#: WW8 export: disable storing of section breaks in endnotes
    http://svn.apache.org/viewvc?view=revision&revision=1172119

    Patch contributed by imacat
    Fixed the Asian language work count.
    http://svn.apache.org/viewvc?view=revision&revision=1241345

    Patch contributed by Pedro Giffuni
    i#20878 - Add comment with BZ issue for reference.
    http://svn.apache.org/viewvc?view=revision&revision=1244517

    Patch contributed by Andre Fischer
    Do not add targets for junit tests when junit is disabled.
    http://svn.apache.org/viewvc?view=revision&revision=1241508

add writerperfect dependency.
2012-11-30 10:10:38 +00:00
Takeshi Abe
10ffbbd269 sal_Bool to bool
Change-Id: I5f454a00d10264adc0c7312459ca0a7ad261c3ad
2012-11-23 21:45:53 +09:00
Takeshi Abe
9e44e1a819 sal_Bool to bool
Change-Id: I8b76ba6d6a27cebefca3307a648bd5baafd27262
2012-10-25 17:01:50 +09:00
Luboš Luňák
f2655f92c1 postfix operator++ -> prefix operator++
Change-Id: I51506a83009db838d8e12d5559c46b404e59f9b5
2012-10-15 23:33:09 +02:00
Luboš Luňák
21d10c6f32 mark lcl_ functions static or rename them if they are not local at all
http://lists.freedesktop.org/archives/libreoffice/2012-October/039639.html

Change-Id: I21e12d6a4dfb9697d2346a4e564e96af0ad03f96
2012-10-12 16:56:54 +02:00
Noel Grandin
a236f8318a Convert SV_DECL_PTRARR_SORT(_SwFtnIdxs) to o3tl::sorted_vector
Change-Id: I84c4cd5686ea0649ad9ca6c879d51bffe6d693c2
2012-07-26 14:30:09 +02:00
Noel Grandin
31dafba4d7 Convert SV_DECL_PTRARR_DEL(_SwSeqFldList) to std::vector
Change-Id: I40802ba1e7b2e2f6f57c59c4d66b544604d01ce5
2012-07-25 14:13:46 +02:00
Michael Meeks
ec5fa0164b replace all but one .hdl include with equivalent .hpp includes.
Change-Id: I15e94f112144549692d0c2babeb48c77adcb93a9
2012-06-21 19:28:47 +01:00