Commit Graph

2759 Commits

Author SHA1 Message Date
Noel Grandin
0d05173015 loplugin:constantparam
Change-Id: Iced8ff99d52d55e6b6c3126affafbea6786e94f0
Reviewed-on: https://gerrit.libreoffice.org/30858
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-15 12:56:26 +00:00
David Tardon
65aafb5071 only cond. build stuff that is really new in ICU 58
Change-Id: I59598329a7051374177b4d16aa061367b6043982
2016-11-07 12:38:21 +01:00
David Tardon
01ff03e154 fix build with ICU < 58
Change-Id: I84027f0812e672519ed314639deeb5c0d1069624
2016-11-07 09:28:38 +01:00
Khaled Hosny
639735edaf Fix thinkos in my previous commit
Change-Id: I8f912f5a02933bdfb318dc4f946d4ad7471eb261
2016-11-07 06:53:38 +02:00
Khaled Hosny
0b9298bf50 Extend joining groups with new Unicode additions
Change-Id: I14d65d59794fdf9ed4dce05a8f734d9400f85927
2016-11-07 01:16:55 +02:00
Khaled Hosny
979029ee65 Insert Kashida before final Tah
Looks like it was missing from the original code, though described here:
https://www.microsoft.com/middleeast/msdn/JustifyingText-CSS.aspx

Change-Id: Iab283cd8e9cc5aee37836ddb06d5e9b8ce8c18e4
2016-11-07 01:16:55 +02:00
Khaled Hosny
6a087ef7d4 Update comments
Change-Id: Ia63e2f16eb70c4a0cc20fc73f0f2694f1381dac5
2016-11-06 22:45:26 +02:00
Khaled Hosny
7fdb418aea tdf#65344: Don’t put Kashida before any final char
If we didn’t find any known good position, not inserting Kashida at all
is better than inserting it randomly.

Change-Id: I075f8414b7f0a0aeb4d27d372c7eae51f4b5c37b
2016-11-06 22:34:05 +02:00
Khaled Hosny
6723fd9d18 Follow Unicode character names for better or worse
To avoid confusing transliteration.

Change-Id: I0ac1692b469f6f974fe3e5b0cc12a40d6f3a7018
2016-11-06 22:34:04 +02:00
Khaled Hosny
4920ee168f Insert Kasida before final Heh not Hah
This code seems to follow the algorithm described in:
https://www.microsoft.com/middleeast/msdn/JustifyingText-CSS.aspx

But there seem to be a confusion due to the transliteration used there,
Haa can be the standard Arabic name for U+0647 ARABIC LETTER HEH or
U+062D ARABIC LETTER HAH. The code is using the later, but I’m pretty
sure it is the former given that the other character in this priority is
Teh Marbuta, which is a Heh-like character. Also before final Hah is a
bad place for kashida.

Change-Id: I9ad3fc432ac58f0e45c562a6b44ac5cbe751c3bf
2016-11-06 22:34:04 +02:00
Khaled Hosny
c1cb0fe8c5 Bin pointless #ifdef’s
Since we enable Graphite by default, this code was effectively setting
nMaxContext to 8 on macOS and 10 everywhere else. Does not look like a
huge difference, and an unnecessary one even since we use the same
layout engine everywhere now.

Change-Id: I6d2cc3a89ed2942c09e62f7637cec5b6db753a24
2016-11-05 14:26:46 +02:00
Noel Grandin
a7ea18ffe7 loplugin:expandablemethods in sw
Change-Id: Ibc9edc28f4041235ab30c026bd3774bd74b7e960
Reviewed-on: https://gerrit.libreoffice.org/30287
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-27 06:08:51 +00:00
Caolán McNamara
851703f2c5 coverity#1371270 Missing move assignment operator
Change-Id: I47438184a9a895b7aa9889ae1308fda29434a774
2016-10-21 08:59:05 +01:00
Noel Grandin
e8260df1d6 loplugin:expandablemethodds in sw(part2)
Change-Id: Idc2118899a8063099b66c0f5db40d8402db063d1
Reviewed-on: https://gerrit.libreoffice.org/30083
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-20 17:55:01 +00:00
Caolán McNamara
e8baf2d2f1 coverity#1371270 Missing move assignment operator
Change-Id: I9a5656fa3a4d4283a1daec957da9d909390d9eb2
2016-10-19 15:49:33 +01:00
Mark Hung
6130ff7334 tdf#43740 Don't add space after ininvisible characters.
Move CJK justify code in SwFntObj::DrawText to
SwScriptInfo::CJKJustfiy() and use break iterator to
prevent unecessary space.

Change-Id: Ifd25373530fc97d3ce547ee3cd0484d4a852491c
Reviewed-on: https://gerrit.libreoffice.org/29911
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2016-10-17 07:44:46 +00:00
Mark Hung
dcef76b34a tdf#43740 Count CJK characters to distribute spaces.
lcl_AddSpace determine the amount of space to distribute
to a portion based on its text length. Counting the number
of CJK characters prevent including codepoints that are not
visible, such as surrogate pairs or Unicode variance
selectors, by mistake.

Change-Id: Ia20a7f76ea1ea3c1f4638db865721eaa26a8c82c
Reviewed-on: https://gerrit.libreoffice.org/29616
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Tested-by: Khaled Hosny <khaledhosny@eglug.org>
2016-10-15 21:12:31 +00:00
Miklos Vajna
192edafdd0 sw: remove useless debug code in SwTextMargin::CtorInitTextMargin()
Change-Id: I15bde2652ca39c2ea43036557c36b77c5ead0d32
Reviewed-on: https://gerrit.libreoffice.org/29750
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-10-13 08:17:42 +00:00
Noel Grandin
ed3a4fcc87 convert GET_POOLID constants to scoped enum
Change-Id: Ifc54789d12d0b024ed28f13ec78b5c10afa902de
2016-10-12 10:11:19 +02:00
Noel Grandin
c47c1e3551 loplugin:unnecessaryoverride in sw
Change-Id: I641175c9c17fcc46b582b6487b8207deb343e645
2016-10-05 11:13:25 +02:00
Noel Grandin
954f752cf1 convert MapUnit to scoped enum
I left a prefix on the names "Map" so that I would not have to re-arrange
each name too much, since I can't start identifiers with digits like "100thMM"

And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore.

Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224
Reviewed-on: https://gerrit.libreoffice.org/29096
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05 06:51:20 +00:00
Stephan Bergmann
106ea87205 Remove _TYPED suffix from tools/link.hxx macros
...which was introduced with 3ead3ad52f "Gradually
typed Link" to distinguish the new, typed versions from the old, untyped ones,
but is no longer necessary since 382eb1a23c
"remove untyped Link<>" removed the old versions.

Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-05 07:56:12 +02:00
Noel Grandin
480f6916ef loplugin:countusersofdefaultparams in sw
Change-Id: I65beb17816641cff6a07379b7ba234afe26806b3
Reviewed-on: https://gerrit.libreoffice.org/29488
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-04 06:36:22 +00:00
Andrea Gelmini
8740351906 Fix typos
Change-Id: Ia59d287a015482e9e97b701a6695463a7d235203
Reviewed-on: https://gerrit.libreoffice.org/29439
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-10-03 13:47:47 +00:00
Noel Grandin
8f62ca8e2f loplugin:countusersofdefaultparams in sw..vcl
Change-Id: I152df55f5a30e073c66cfd3a64d5090a20cb232d
Reviewed-on: https://gerrit.libreoffice.org/29471
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-03 11:10:56 +00:00
Noel Grandin
ba3521f288 add more dumpAsXml()
and make it format the output nicely, so I don't have to use 'xmllint
--format' before I can read it.

Change-Id: I065ee93193f3c6c7bab87212ab96021fb0d7c5ed
Reviewed-on: https://gerrit.libreoffice.org/29407
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-03 06:08:14 +00:00
Michael Stahl
ebcbc970f8 tdf#102073: sw: do not create SwFootnoteNumPortion inside table
The SwTextFormatter::WhichFirstPortion() wants to create a new
SwFootnoteNumPortion for the first paragraph in every cell, because it
doesn't have mpPrev set and SwTextFrame::IsFootnoteNumFrame() is true,
and somehow this even causes an infinite loop in the bugdoc because
initially nothing more than the footnote number fits inside a line.

Just detect that it's inside a table and return false then.

Change-Id: I1f010f1242d53d9f99a4d3a4f6fc3cee65aa3958
2016-09-28 15:50:33 +02:00
Mike Kaganski
6bdcb730fa Replace SWRECTFN macro with a class
Change-Id: Ib400c5930be84d26665b0e12a61508c8fbfd7f08
Reviewed-on: https://gerrit.libreoffice.org/29105
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2016-09-23 08:34:12 +00:00
Mark Hung
eb8217e17e tdf#80724 try to reuse calculated underline font as much as possible.
Underline was broken because for every portion it calculate a
new underline font based on the following portion so that the
portions do not have consistent underline fonts. And worse the
last portion is never be treated as part of continuous underline.

Change-Id: I7a62d89d5b1031a0e7c5e0339f0c591e58dceb12
Reviewed-on: https://gerrit.libreoffice.org/28267
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
2016-09-18 08:43:54 +00:00
Noel Grandin
3b48b3cc92 loplugin:singlevalfields in sc..vcl
Change-Id: I68752a3daf5ddd8581c07759b8be2c1dabbb9258
2016-09-15 11:30:42 +02:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.

(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to

  OOO_DLLPUBLIC_CHARTTOOLS    virtual ~CloseableLifeTimeManager();

in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro.  Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)

Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13 13:19:22 +02:00
Miklos Vajna
dd4d65a88e sw: prefix members of SwAttrIter
Change-Id: Ib9b18d71ba8a68dba6a4272908ed31fc78afcb94
Reviewed-on: https://gerrit.libreoffice.org/28823
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-09-12 06:50:11 +00:00
Noel Grandin
579426f798 loplugin:constantparam in sw
Change-Id: Ic49d1c3c7b57fb213964ddc21b0f774c762aad94
2016-09-08 09:23:40 +02:00
Noel Grandin
847e004e65 convert nsRedlineMode_t to typed_flags
including fixing a bug in SwXMLExport::exportDoc where it was ORing with
a constant from a different type: nsRedlineType_t::REDLINE_INSERT

Change-Id: I2bb154c9a35d106e64fd1a8b6e928d0384c9fafe
2016-09-08 09:23:40 +02:00
Stephan Bergmann
32f9120fa0 loplugin:stringconstant: adapt to improved OUStringLiteral1 (sw)
Change-Id: Ifa1a6bafd3628b48ebceb09f8cd864361848e81c
2016-08-30 15:29:41 +02:00
Jan-Marek Glogowski
f7f5d27066 Add convenience function getOtherTextBoxFormat
Since we already have isTextBox to identify a text box, this
just adds a call to SwFrameFormat::GetOtherTextBoxFormat() to
actually return the corresponding SwFrameFormat.

This gets rid off all the remaining occurences of the
SwFrameFormat / Textbox sets and maps.

Change-Id: Id5f05a1ff71e604658e7d8a0d0825f5671335b3f
2016-08-29 13:13:15 +02:00
Takeshi Abe
dd64e9ea7a loplugin:nullptr
Change-Id: I565c774d24bf52d33ea3ed37fa397f835de5875c
2016-08-24 13:14:13 +09:00
Mark Hung
d5fab973d0 tdf#87224 Merge character borders across different scripts.
Character borders were broken when it contains multiple scripts.
Merge borders on kern portions and draw its border as necessary.
Refer to correct previous portion so it decide whether it join
previous or next border correctly.

Change-Id: I881da36a5204ef627289ee799438c4ff915b00ef
Reviewed-on: https://gerrit.libreoffice.org/27652
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
2016-08-24 00:06:38 +00:00
Noel Grandin
a6a2b2826d loplugin:countusersofdefaultparams in sw
Change-Id: I668bfe93d77b06385544651583bcf71f6b5df2fc
2016-08-19 08:15:49 +02:00
Caolán McNamara
0896207282 cppcheck: noCopyConstructor
Change-Id: Id5323cb6f52666f85965e11b07e4f2bca8af4e78
2016-08-18 14:24:11 +01:00
Noel Grandin
49561be0fd convert SvxTabAdjust to scoped enum
Change-Id: I29a33b8ea5daaa4b9059d024ffa4a99ca924f7ef
2016-08-17 08:45:15 +02:00
Noel Grandin
42ab2cfbd9 convert SvxLineSpace to scoped enum
and rename to be more explicit

Change-Id: Id06e6b68ef30e1d0d0daf19c37a390060e8bcb01
2016-08-17 08:45:15 +02:00
Noel Grandin
a49eeecd23 convert SvxInterLineSpaceRule to scoped enum
and rename it to be more explicit

Change-Id: I3f8bd7928495dba1e94b785cdda06d9819ee66bf
2016-08-17 08:45:15 +02:00
Caolán McNamara
2b3112b30a the sole caller is ok with rPoint being modified, so change to non-const arg
Change-Id: I40a24502e2e8ad312e13e0c47ee1fde3118d2251
2016-08-04 09:16:04 +01:00
Caolán McNamara
cc7a554506 only called if !bDraw
Change-Id: I7310b5f8cbbc4176e76d92ce2bcd49168470843c
2016-08-04 09:16:04 +01:00
Caolán McNamara
35f4248206 SwLinePortion::GetCursorOfst is const and its ret is ignored here
so nOfst is unnecessary

Change-Id: I27f73057b55ebdf30eb69a19ee1b0647ba25583e
2016-08-04 09:16:04 +01:00
Caolán McNamara
2702796806 pPos can never be null
Change-Id: Ib7b57d628fbd80a1d2214917cd439e09d4803d91
2016-08-04 09:16:04 +01:00
Caolán McNamara
24c009de4d Resolves: tdf#101269 cannot click/edit text inside a frame
regression from...

commit b0c0a074a2
Date:   Mon Apr 18 11:03:43 2016 +0200

    clang-tidy clang-analyzer-deadcode.DeadStores

    suspect that some of these may reveal latent bugs....

and restore method then removed by

commit 47f62540bd
Date:   Thu May 19 10:31:47 2016 +0200

    loplugin:unusedmethods in sw

Change-Id: I14826eecadbc1a74e408f8907eea8746debe4db4
2016-08-04 09:16:04 +01:00
Miklos Vajna
73c8bc849c sw layout xml dump: mention SfxViewShell addresses
Change-Id: I2e5c8102684494fd3d7c1c70971a09d0c940a124
Reviewed-on: https://gerrit.libreoffice.org/27637
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-29 07:08:00 +00:00
Stephan Bergmann
454ab144c9 clang-tidy performance-unnecessary-value-param in sw
Change-Id: I6cd0d28dade01366b087aebff894b6f003d87b31
2016-07-19 10:49:54 +02:00