summaryrefslogtreecommitdiff
path: root/editeng
AgeCommit message (Collapse)Author
2018-03-25accessibility: simplify OCommonAccessibleTextArnaud Versini
Change-Id: Ied5520179d15f0a854c16b14f5a5e6b84cef1300 Reviewed-on: https://gerrit.libreoffice.org/51514 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
2018-03-20drop unnecessary includesCaolán McNamara
Change-Id: I1a817d5575bbd57ecaa874a27158b9218e4210cc Reviewed-on: https://gerrit.libreoffice.org/51603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-19coverity#1430093 Logically dead codeCaolán McNamara
regression from... commit e9171066136868fe89947dda5095e9479d5e50e7 Date: Sat Mar 10 18:00:58 2018 +0100 Use for-range loops in editeng Change-Id: If7601ecc0d8d87bf87d982544e0f4b5b2a5d91c6 Reviewed-on: https://gerrit.libreoffice.org/51561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-18tdf#112118: use correct border when calculating marginMike Kaganski
This is a longstanding (at least since 2000: already present in commit 7b0b5cdf) error where left border linespace was used when calculating right margin. It was copypasted from ww8 import to ooxml code verbatim. The problem only manifests itself when left and right border spacings are not the same; and since we had other errors in the borders import, that additional problem simply wasn't apparent. Also use scaled border width in border distance/margin calculations. Unit tests updated. Change-Id: I70961e1bde29471def69e1ef944ba2779cffe307 Reviewed-on: https://gerrit.libreoffice.org/51474 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-03-16Fix typosAndrea Gelmini
Change-Id: If70b03cad4c46010a59cf3bee139e801230fa3aa Reviewed-on: https://gerrit.libreoffice.org/51385 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-16tdf#112118: DOC: properly import/export border distanceMike Kaganski
DOCX part was done in fb959e581c900b392efd0bb329b7cf30c8ed56a5. This commit fixes DOC part. Line width wasn't taken into account on import; and export was done only with "from text" distance, which gave poor interoperability with Word, where the borders were close to page edge. The common code is moved to editeng/source/items/frmitems.cxx and include/editeng/boxitem.hxx. Change-Id: I3d1d1312cb9dc9a9e00d9847ec11234cd787df60 Reviewed-on: https://gerrit.libreoffice.org/51366 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-03-16Clip BColor lightness value at 1.0Stephan Bergmann
UBSan build started to fail CppunitTest_sw_ooxmlexport8 with > /include/tools/color.hxx:59:27: runtime error: value 258.5 is outside the range of representable values of type 'unsigned char' > #0 0x2ad219182418 in Color::Color(basegfx::BColor const&) /include/tools/color.hxx:59:27 > #1 0x2ad219175e48 in (anonymous namespace)::lcl_compute3DColor(Color, int, int, int) /editeng/source/items/borderline.cxx:50:16 > #2 0x2ad219175574 in editeng::SvxBorderLine::threeDLightColor(Color) /editeng/source/items/borderline.cxx:77:12 > #3 0x2ad21917ea78 in editeng::SvxBorderLine::GetColorOut(bool) const /editeng/source/items/borderline.cxx:573:23 where lcl_compute3DColor had been called with (aMain=rgba(255, 255, 255, 255), nLight=3, nMedium=40, nDark=83) Change-Id: I0f4569d9fd9f54164efe395960bcc8a6840e7744 Reviewed-on: https://gerrit.libreoffice.org/51351 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-03-13lokdialog: Tunnel the spell-checking context menu with recommendations.Jan Holesovsky
Change-Id: I1a7952e88a3f89346c97d2516628b4a7a0423de6 Reviewed-on: https://gerrit.libreoffice.org/51062 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/51166 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-03-13Revert "lok: Don't freeze the LibreOfficeKit via the spell-checking popup..."Jan Holesovsky
This reverts commit 551e639f467813e52ff4301822b6a7f8778a2ef4. Change-Id: I0c7c85fe22d53aa5587ec119e1c3242682b88e43 Reviewed-on: https://gerrit.libreoffice.org/51164 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-03-12loplugin:unusedmethodsNoel Grandin
Change-Id: I027adbe65edd5f07534bb36f9f54c55f30ba516e Reviewed-on: https://gerrit.libreoffice.org/50998 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-11Move (and rename) graphic stuff from svtools to vclTomaž Vajngerl
This is preparing to change how GraphicManager works where it won't base itself around GraphicObject anymore but Graphic. No functional or cosmetic change was made to the classes, only changes that were needed because of the move and rename. The only thing that wasn't moved is the GraphicRenderer as it is not needed in vcl for now (but makes sense to move it in the future to keep graphic stuff together). grfmgr was renamed to GraphicObject as the GraphicManager will be changed a lot and most likely moved out, so the name grfmgr won't make any sense anymore. All the UNO implementations were renamed with a prefix Uno and used the same name as the class name. This is made to be more specific which are the Uno objects (for example graphic.cxx contained the implementation of XGraphic, which is similar to graph.cxx contains Graphic). Change-Id: I54a2fa6c7e997469aaa7770db05244adb9f64137 Reviewed-on: https://gerrit.libreoffice.org/51068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-11Use for-range loops in editengJulien Nabet
Change-Id: I6abf56aba1211e1288bd8ee673e0614d1b5dc1d6 Reviewed-on: https://gerrit.libreoffice.org/51050 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-09tdf#116101 Correct bullet position for linespacing > 100%Szymon Kłos
Change-Id: Ia900636d4013ab2a9c893c8246391db867fe1543 Reviewed-on: https://gerrit.libreoffice.org/51017 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-03-09tdf#116101 Correct position for linespacing > 100%Szymon Kłos
Change-Id: Ia3d90d521e03ed59312d1603b2cf5e5680b00781 Reviewed-on: https://gerrit.libreoffice.org/51005 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2018-03-09remove MID_GRAPHIC_URL and related mappings, implementationTomaž Vajngerl
Change-Id: I752a2f036791720d12fb04b95f53d4127d605c7e Reviewed-on: https://gerrit.libreoffice.org/50979 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-08editeng: remove "GraphicURL" - it was replaced by "GraphicBitmap"Tomaž Vajngerl
Change-Id: I79f9ffd68da2d90da96707c9d6183e6c8a6e74a4 Reviewed-on: https://gerrit.libreoffice.org/50932 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-08loplugin:constantparam in desktop..i18npoolNoel Grandin
Change-Id: Ie2e1004c1ccc03777a8da9cb1144e89eb28ff313 Reviewed-on: https://gerrit.libreoffice.org/50928 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-08loplugin:unusedmethodsNoel Grandin
Change-Id: Id6b4edd265cb6bef31c72e2a0a440211d51c7c33 Reviewed-on: https://gerrit.libreoffice.org/50900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-08tdf#116157: Always apply Unicode Bidi in editengKhaled Hosny
Similar to commit 270d6db63d933b7350dc8543b9b9ebc2133a116e which fixed the same issue in Writer. Surely having two text engines duplicating the same bugs sounded like a brilliant idea to someone. Change-Id: If85315fb00a2c0be78d502df0bfb9b50d9191368 Reviewed-on: https://gerrit.libreoffice.org/50921 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2018-03-07fixup "use more Color in editeng..forms"Noel Grandin
some of the code changes hidden inside debug ifdefs were broken Change-Id: I6ceb18950c0cda0592da1da83d7b45240dd60070
2018-03-07use more Color in editeng..formsNoel Grandin
Change-Id: If6c862e7bb61cd78c3379afde11b528a74162900 Reviewed-on: https://gerrit.libreoffice.org/50860 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-07MID_GRAPHIC as alternative to set graphic to the SvxBrushItemTomaž Vajngerl
Change-Id: I6e17d1a34f0bd17a0eafd7c741162f23279e9d1a Reviewed-on: https://gerrit.libreoffice.org/50539 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-05Resolves: tdf#116188 set min version on all .ui files to 3.18Caolán McNamara
which is already the min for the runtime Change-Id: Ifebe099f1f94a36f65a31989689400327a823dcd Reviewed-on: https://gerrit.libreoffice.org/50776 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-02Resolves: tdf#114675 return new EditPaM of insert position from SvxReadXML()Eike Rathke
Change-Id: I77027d74a0addaafaf19e2c2a8e9759d560951eb
2018-03-02delete colordata.hxxNoel Grandin
move what we still need into color.hxx Change-Id: Ied7e31eb16468aa334c666b1499a6262f16a6350 Reviewed-on: https://gerrit.libreoffice.org/50561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-01drop old tools/gen methods in accessibility..formulaNoel Grandin
Change-Id: I075e29173945200854f2ef8e420867871659766a Reviewed-on: https://gerrit.libreoffice.org/50446 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-28use less COLORDATA_RGBNoel Grandin
part of removing ColorData Change-Id: I5518cddeeefe66f70380367e1e3f78af0f3b5fbc Reviewed-on: https://gerrit.libreoffice.org/50486 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-28convert COL_ constants to be of type ColorNoel Grandin
Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48 Reviewed-on: https://gerrit.libreoffice.org/50373 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-27remove unused vclunohelper.hxx includesJochen Nitschke
Change-Id: I68178379e5493d0e738861a4dce5aa6e4b58cd22 Reviewed-on: https://gerrit.libreoffice.org/50393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-27replace Color(COL_*) with COL_*Noel Grandin
using git grep -lwP "Color\s*\(\s*(COL_\w+)\s*\)" | xargs perl -pi -e "s/Color\s*\(\s*(COL_\w+)\s*\)//g" and then some manual fixup where the resulting expression no longer compiled Change-Id: I0e268d78611c3be40bba9f60ecfdc087a36c0df4 Reviewed-on: https://gerrit.libreoffice.org/50372 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-26Translate German variable namesJohnny_M
Translated the enum values in editeng, but kept the their translation references in editrids.hrc, to prevent a need to update translations. "UPPERCASE" was used instead of "CAPS", in alignment to style::CaseMap. The values in svxitems.sdi don't seem to be used anywhere, but translated anyway. Change-Id: I1b3a9a68ce814841819b361ce5767764e3b1968c Reviewed-on: https://gerrit.libreoffice.org/50305 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-26ColorData->Color in variousNoel Grandin
Change-Id: I22018b6a535224316d93bfd621771248b873a218 Reviewed-on: https://gerrit.libreoffice.org/50167 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-25convert remaining InfoBox to weld::MessageDialogCaolán McNamara
Change-Id: I91d828e38d96264cf4a76f30940942556b8f78d8 Reviewed-on: https://gerrit.libreoffice.org/50205 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-25fix import of graphic bulletsTomaž Vajngerl
When changing to use "GraphicBitmap" property instead of "ImageURL", the import wasn't adapted and there was no test which would warn of such an situation. This also changes the difference between writer and impress where impress used "Graphic" and not "GraphicBitmap" property. Also adds missing tests for both writer and impress Change-Id: Ieed629d2d37f7806d63e729b6ef23cd848593071 Reviewed-on: https://gerrit.libreoffice.org/50140 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-02-24sd lok: Delete selection highlight after cutting text.Tamás Zolnai
Call drawing also after the new selection is set, similar to other cases where DrawSelectionXOR() is called before and after selection change. In desktop LO drawing is always called again and again by timeout, so there the selection is updated anyway, while in LO online painting does not emit a notification. Change-Id: I6e9337fc0cfb61656387ba44d901521c3dfa60dd Reviewed-on: https://gerrit.libreoffice.org/50268 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-02-22weld native message dialogsCaolán McNamara
just the straight-forward MessageDialog cases first a) remove border_width from message dialog .ui so as to take the default border width b) retain 12 as default message dialog border for vcl widget case c) remove layour_style from message dialog button boxes so as to take the default mode (a no-op for vcl widget case) d) use gtk response ids (vcl builder will converts to vcl ones) Change-Id: I7de281093a1b64f92f71ca11e7cbba42bb658154 Reviewed-on: https://gerrit.libreoffice.org/50143 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-22loplugin:redundantcopy extend to ColorNoel Grandin
Change-Id: I224cc955d49ee100d328e0171da710f38068d2d4 Reviewed-on: https://gerrit.libreoffice.org/50114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-21New loplugin:nestedunnamedStephan Bergmann
Change-Id: Ifb434589ef08428ce609bc7a40b015d4df13224c Reviewed-on: https://gerrit.libreoffice.org/50048 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-02-21ColorData->Color in sd..svxNoel Grandin
Change-Id: I70de56b6bfb1ea4655ec03510fad92bf6645f64e Reviewed-on: https://gerrit.libreoffice.org/50046 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-21Increase delta value for these checksTamás Zolnai
Change-Id: I14582541bf076340cfc95a17e1a9070a596c67db Reviewed-on: https://gerrit.libreoffice.org/50073 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-02-20tdf#115874: show non-zero fraction part for ptsMike Kaganski
Change-Id: I6183d9d7e28b76bb4da0229c42573ee833f2520a Reviewed-on: https://gerrit.libreoffice.org/50033 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-02-20Blind fix for -Werror,-Wunused-variable on macOSStephan Bergmann
...after c40ef4d19bfecd91e16a104a657d01196d855630 "workaround jenkins failure on OSX". Probably better to keep executing the code under test than to #if-out the whole block. Change-Id: I83c21c532cd69f72834e4a242f767cca419b04ea
2018-02-20workaround jenkins failure on OSXNoel Grandin
Change-Id: I82fd0bba275c4c58f1a39b823c75fd18889987ed Reviewed-on: https://gerrit.libreoffice.org/50024 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-20drop Color::SetColor(ColorData) in favour of operator=Noel Grandin
first stage of getting rid of ColorData Change-Id: I5e4e95eb958722814c43c8d1ebfef17ad18c29ec Reviewed-on: https://gerrit.libreoffice.org/49997 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-19tdf#115639: Handle alignment correctly for multiple paragraph caseTamás Zolnai
I used the wrong calculator method to get the line width. This commit also fixes the crashes found by crashtest. Change-Id: I25392f86af912ee54c07b14480d82282210ac346 Reviewed-on: https://gerrit.libreoffice.org/49994 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-02-18in numbering use "GraphicBitmap" property for image transportTomaž Vajngerl
Change-Id: I43abef3fe4a177f9f7867fe86e18beac812c626b Reviewed-on: https://gerrit.libreoffice.org/49923 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-02-17tdf#115639: Align right/center with trailing spaces the same as MS PowerPointTamás Zolnai
* Add HoriAlignIgnoreTrailingWhitespace compatibility option. ** For MSO file formats it is set to true ** For ODP format it's set to false by default ** The flag is saved to ODP format as user data if the document comes from an MSO format. Change-Id: Ie22233d33a25e605de46120bfc2195038dffd63c Reviewed-on: https://gerrit.libreoffice.org/49889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-02-16tdf#115783 sd: fix lost char attributes during in-table copy&pasteMiklos Vajna
The SvxFontHeightItem (12pt) is originally a character-level property on the table cell (covering the whole cell text) but when the user sets the font height of the cell, sdr::properties::CellProperties::ItemSetChanged() will turn that into a paragraph-level property. This is fine, except that this way the property has unclear semantics when the user pastes single-paragraph content into an existing paragraph. (Keep the old paragraph properties? Use the new ones?) The current behavior is that sd::View::OnEndPasteOrDrop() calls into ContentAttribs::SetStyleSheet() at the end of the paste, which removes paragraph-level formatting (giving visibility to the from-style 18pt font height this way for the existing content), so both the old and the new paragraph formatting is lost. Improve the situation by copying these paragraph-level character properties back to character-level before paste at the paste position (so doc model is back to the state after load), that way font height and similar properties are not removed by the on-end-paste handler. Change-Id: I43d321dedcda6c0df9b009b9d99c3544f783473c Reviewed-on: https://gerrit.libreoffice.org/49868 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-02-16Revert "loplugin:changetoolsgen in editeng..extensions" and reapply pluginNoel Grandin
because I (a) forgot to insert parentheses which changes the meaning of some expressions and (b) I now use the AdjustFoo calls when changing unary operations, which reads much better This reverts commit 2096aac8b958db66b3ddce16b06dca87edc8ba0a. Change-Id: I4b5941c4119b95aaefb9180a0ca95a1dbb4ec317 Reviewed-on: https://gerrit.libreoffice.org/49844 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-16ofz#6311 still problems with SdrEdgeObj listening to same obj at start as endCaolán McNamara
Change-Id: Ibd80b484788779b73943b28a5f36e51ebcacec30 Reviewed-on: https://gerrit.libreoffice.org/49821 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>