summaryrefslogtreecommitdiff
path: root/editeng
AgeCommit message (Collapse)AuthorFilesLines
2018-03-13tdf#116101 Correct bullet position for linespacing > 100%Szymon Kłos2-9/+8
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> Reviewed-on: https://gerrit.libreoffice.org/51086 Reviewed-by: Andras Timar <andras.timar@collabora.com>
2018-03-05Resolves: tdf#114675 return new EditPaM of insert position from SvxReadXML()Eike Rathke3-6/+12
Change-Id: I77027d74a0addaafaf19e2c2a8e9759d560951eb (cherry picked from commit a44e62b82c7598471da9a5254953067613806337) Reviewed-on: https://gerrit.libreoffice.org/50646 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-20tdf#115783 sd: fix lost char attributes during in-table copy&pasteMiklos Vajna2-0/+12
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. (cherry picked from commit f0c25c751cf8e166a84b289746bce6202a40391d) Conflicts: sd/qa/unit/tiledrendering/tiledrendering.cxx Change-Id: I43d321dedcda6c0df9b009b9d99c3544f783473c Reviewed-on: https://gerrit.libreoffice.org/49967 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2018-02-16tdf#83260 sw: call CompressRedlines() in ODF importMichael Stahl1-0/+4
It's possible that an ODF document contains redlines that will be deduplicated by CompressRedlines(). If that happens during some editing operation, then a SwRedline will be deleted and the nodes array becomes smaller by at least 3 nodes; any Undo actions that were created prior to the operation that called CompressRedlines() will store invalid node indexes now and Undo will crash. So presumably it's a precondition of editing operations that CompressRedlines() is a no-op. Interestingly CompressRedlines() is also called from SwEditShell::Undo()/Redo(). Ensure it's a no-op later by calling CompressRedlines() immediately after load. (Hopefully this should also work for the Insert File case.) Add a test too. Change-Id: Iec8135cc60260ed5cfff05a196b5c92cc03265f9 Reviewed-on: https://gerrit.libreoffice.org/49721 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 1c8efde4daea648204e3ba19f8edc01ef3e548bd) Reviewed-on: https://gerrit.libreoffice.org/49805 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-16ofz#6311 still problems with SdrEdgeObj listening to same obj at start as endCaolán McNamara1-1/+1
Change-Id: Ibd80b484788779b73943b28a5f36e51ebcacec30 Reviewed-on: https://gerrit.libreoffice.org/49824 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-15tdf#83260 editeng sw: avoid accessing dead nodes in AutoCorrectFyodor Yemelyanenko1-1/+1
When change tracking is ON (Redlining) and Edit->Change Tracking->Show==OFF Autocorrection and Undo operations crash LO. Change-Id: I616f2de143b78fc83483a6589cfa1dd1ab61675a Reviewed-on: https://gerrit.libreoffice.org/47686 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit aac475436271ddeabf6d9a4c3984ba77accf56ce) Reviewed-on: https://gerrit.libreoffice.org/49794 Tested-by: Jenkins <ci@libreoffice.org>
2018-01-19ofz#5477 if the para is already oversize, nums would go negativeCaolán McNamara1-4/+5
Change-Id: I183e1377747f662da1204e90a24fb4f8f2268699 Reviewed-on: https://gerrit.libreoffice.org/48157 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-10tdf#114628 unit test for line spacingSzymon Kłos1-0/+92
* two cases 60% and 150% line spacing Change-Id: I2ce66cd19f459b738243052b5c12da0bbb883ebe Reviewed-on: https://gerrit.libreoffice.org/47303 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/47575 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-01-10tdf#114628 correct line spacing for impressSzymon Kłos2-17/+28
* use line spacing also for the first line * correct spacing in case of > 100% proportional spacing * impedit2.cxx only code readability change Change-Id: I24832e7dc2fa8cfbb2f9cdfe7062eaaaa63f1729 Reviewed-on: https://gerrit.libreoffice.org/46925 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/47574 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-12-18editeng: fix RTF export of colorsMichael Stahl1-11/+12
SfxItemPool may contain null pointers and return them from GetItem2(), even if non-null pointers follow, so have to use GetItemCount2() here. This later asserts when it can't find the items in aColorList. (cherry picked from commit 30504139af039d524ca0fd7158fc21ed38db2d9f) editeng: RTF export: another buggy GetItem2() loop, for fonts (cherry picked from commit 8ce353279caa84944971f22ec536433030e5d9c7) editeng: error: "remove_const_t" is not a member of "std" Manual type inference was an interesting oxymoronic curiosity that can probably only exist in C++, but it turns out our baseline compilers don't even support it yet. (cherry picked from commit 700e1e7fda6f0a415adbbd5bb190efa5c7435c4f) Change-Id: I976c95387b4c45e5a4371254f130df6b24370eaa Reviewed-on: https://gerrit.libreoffice.org/46469 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-21Translate German variable nameJohnny_M1-5/+5
Change-Id: I70f9355bc7f219e8d6aaf9fb8ecc356e1a86d9da Reviewed-on: https://gerrit.libreoffice.org/44921 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2017-11-20look for =() in loplugin:unnecessaryparenNoel Grandin1-1/+1
Change-Id: I4f9b71ff7767e90987bb40358fc46ed5d1d571d0 Reviewed-on: https://gerrit.libreoffice.org/44944 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-18RotateFlyFrame3: add support for AutoContourArmin Le Grand1-0/+16
For transformed FlyFrames with no Border and no Padding it would be nice to immediately start using AutoContour, added first implementation to do so. Added several conditions for AutoContour, need to work on reaction on changes to these. Corrected needed transform adaptions to Contour(s) Change-Id: Ia3d7845fd5d50c8a413d592ae07ce2041ccc91b9
2017-11-17TypedWhichId for EE_CHAR* constantsNoel Grandin5-30/+27
Change-Id: I261f8a949ddd858dee196118bb42993a101a2a28 Reviewed-on: https://gerrit.libreoffice.org/44829 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-17TypedWhichId for EE_PARA* constantsNoel Grandin5-24/+22
Change-Id: I64d1765336f39c3e3ded4d58ebdee80e97624276 Reviewed-on: https://gerrit.libreoffice.org/44799 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-16use implict conversion operator in TypedWhichIdNoel Grandin11-41/+41
instead of spreading calls to Which() everywhere. Change-Id: Ie32d106e44f5cb583908eeebe254ab8b8168ae61 Reviewed-on: https://gerrit.libreoffice.org/44760 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-15TypedWhichIdNoel Grandin17-66/+76
use a strong-typedef template to give which IDs a type, which we can carry around to do a (a) little bit more convenience when Get()'ing them and (b) a little bit of enforcement of which PoolItem subclass each ID uses Fix a bug in casting EE_PARA_BULLETSTATE to the wrong subclass in AccessibleEditableTextPara::_correctValues Change-Id: I015ce8b3b0f6d21308af182afa3caf122c877a5b Reviewed-on: https://gerrit.libreoffice.org/44587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-13ofz#4202 Null-dereference READCaolán McNamara1-2/+0
Change-Id: Ib9beadaea1bc6521faf7d8080d301e4b5451fb1d Reviewed-on: https://gerrit.libreoffice.org/44685 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-13Fix typosAndrea Gelmini4-4/+4
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91 Reviewed-on: https://gerrit.libreoffice.org/44654 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-11-13Remove OAccessibleTextHelper::getCharacter and getTextRangeArnaud Versini1-2/+2
Change-Id: Ib32e3ca6ba55ab99820a54023041247cea96ab0c Reviewed-on: https://gerrit.libreoffice.org/44652 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-13clang-tidy modernize-use-equals-default in editengJochen Nitschke9-159/+0
remove default-able copy constructors/assignments and a non-virtual default dtor. Change-Id: I3fcc23a480031a9ede00ea22ae8f5ac5e892fd9c Reviewed-on: https://gerrit.libreoffice.org/44657 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-13Remove OCommonAccessibleText::getText and getCharacterCount.Arnaud Versini1-1/+1
No need to create helper for those methods. Change-Id: I0505fe8141b1bad852b7f30aeb69628fb6a90071 Reviewed-on: https://gerrit.libreoffice.org/44649 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-12use copy constructor to clone PoolItemsJochen Nitschke2-17/+11
Change-Id: I2a45a62fd56cc5a768406c7a6e4c72456f962367 Reviewed-on: https://gerrit.libreoffice.org/44648 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-12ofz: Timeout give up earlier on SvParserState::ErrorCaolán McNamara1-2/+3
Change-Id: I191f935c11bc59e0b1a990ac5d3c38a49390afd1 Reviewed-on: https://gerrit.libreoffice.org/44644 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-11tdf#113591 Fix crash when switching between Calc and other LO windowSamuel Mehrbrodt1-3/+5
Need to get the ContentNode from EditDoc, as the selection might have a pointer to an already deleted ContentNode. Change-Id: I5c17be8ec2cbc57686eaf90e8b03c026aea7f28f Reviewed-on: https://gerrit.libreoffice.org/44583 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-11-10ofz#4163 Null-dereference READCaolán McNamara1-0/+2
Change-Id: I3d1ae5f55343b1b8ec3b0d79a56c9368385a0af8 Reviewed-on: https://gerrit.libreoffice.org/44581 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-10editeng: Simplify calls to HasSelection()Samuel Mehrbrodt2-4/+4
Change-Id: I424cd5aee41334aebfd9bc41e1f8a9aeb69b9827 Reviewed-on: https://gerrit.libreoffice.org/44582 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-11-10loplugin:unusedmethodsNoel Grandin2-5/+0
Change-Id: I543b0943f0bc918d59debc8ee051f88c29d18454 Reviewed-on: https://gerrit.libreoffice.org/44553 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-09new loplugin simplifydynamiccastNoel Grandin2-4/+4
simplify dynamic_cast followed by static_cast Change-Id: I965afcf05d1675094cfde53d3590a0fd00f26279 Reviewed-on: https://gerrit.libreoffice.org/44460 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-09rename AvoidConfig to FuzzingCaolán McNamara2-2/+2
cause that's what its really used for and a couple of cases are not specifically about avoiding config but avoiding uninteresting disk acccess and what not Change-Id: I4c6454f98388579fcd0bf9798321d30408ab65ee Reviewed-on: https://gerrit.libreoffice.org/44491 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-08ofz#4121 Floating-point-exceptionCaolán McNamara1-2/+6
Change-Id: I32b52f1e2419ca56db0f4ee92cea39cec047c1c1 Reviewed-on: https://gerrit.libreoffice.org/44455 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-06ofz infinite loopCaolán McNamara1-1/+5
Change-Id: Iae9faaa86e4b3edb9a1fdfe9c6b67eee211c19a9 Reviewed-on: https://gerrit.libreoffice.org/44361 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-06convert GetNumStr from sal_uLong->sal_Int32Noel Grandin1-3/+3
the code was truncating the param to sal_Int32 anyway Change-Id: I743b60097df937c16c995e2e6deacc12cf12e5e9 Reviewed-on: https://gerrit.libreoffice.org/44341 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-06loplugin:finalclasses in editengNoel Grandin3-6/+3
Change-Id: I3cf074d101311e516ee1ce23ad032225780f3e25 Reviewed-on: https://gerrit.libreoffice.org/44314 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-04loplugin:constparams in various(1)Noel Grandin2-2/+2
Change-Id: Ic80ca59abc3e104c7adf0c1eff1d16addf48bc8b Reviewed-on: https://gerrit.libreoffice.org/44261 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-01TSCP: Support DocInfo.Custom field for ODP file formatTomaž Vajngerl4-7/+67
Impress has a limited support for fields - this includes support for DocInfo.Custom field, which shows the user defined custom fields that are used in TSCP. This commit adds minimal support (only what is needed for TSCP) for DocInfo.Custom field but only supports string fields for now. It is not possible to add the field manually, at least not until the full support is added. Change-Id: Ib3b73ab22fd4fe65ab6fb5173fe035a3359deea5 Reviewed-on: https://gerrit.libreoffice.org/44041 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-11-01ofz#3934 Integer-overflowCaolán McNamara1-10/+6
Change-Id: I2c58cca6f01d7c50244dfec6acdfaa988cdbaa07 Reviewed-on: https://gerrit.libreoffice.org/44102 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-31loplugin:constantparam in editengNoel Grandin5-33/+25
Change-Id: I0a07326d5b63e82ef16e02f75fd8523e3b73e1f4 Reviewed-on: https://gerrit.libreoffice.org/44096 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-26vcl: make MapMode constructor explicitMichael Stahl6-14/+20
Insert constructor everywhere, except a couple places that apparently want to compare GetMapUnit(). Change-Id: I1910deb60562e5e949203435e827057f70a3f988
2017-10-24loplugin:implicitboolconversionStephan Bergmann2-2/+2
("explicit conversion (NoOp) from 'const bool' to 'bool' implicitly cast back to 'const bool'", seen now with a recent trunk Clang 6, and with experimentally enabling -std=gnu++17 for the LO build; not sure what caused this to be triggered only now for me) Change-Id: I5310961b1d50870d3ae06554e4cb37e12ac68151
2017-10-23loplugin:includeform: editengStephan Bergmann53-123/+123
Change-Id: If2aa2cbbfabe164ccf0f68522fa18fa3bae2225d
2017-10-23tscp: advanced classification dialog for impressTomaž Vajngerl2-0/+73
Change-Id: I76c81e6f84de8160c20f1614d7676f2f2c3fb155 Reviewed-on: https://gerrit.libreoffice.org/43361 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-10-23overload std::hash for OUString and OStringNoel Grandin1-1/+1
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-19use std::unique_ptr in TrieNodeNoel Grandin1-33/+12
Change-Id: I1482f846370e0b8e6f76d46fc5020e2dcb152223 Reviewed-on: https://gerrit.libreoffice.org/43495 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-17EditEngine: Enhance visualization of URLsArmin Le Grand1-19/+70
When URLs get layouted Multi-Lined from the EditEngine, a rough 'guess' how many chars per line should be used was in place up to now. This could lead to lines being too short or being longer than the available space, also looked ugly. Layouting now using the needed space properly. Also adapted vertical (for horizontal text) space usage, with multiple lines the space was 'compressed' and wrong calculated. Change-Id: I7255e3e65c85a3a50497b771ed2ca1ef5d97c0dd Reviewed-on: https://gerrit.libreoffice.org/43464 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2017-10-16Move editeng/source/editeng include files to common include directoryStephan Bergmann6-15/+16
...that are included from various source directories. Change done in preparation of loplugin:includeform. Change-Id: I4c2160d1c682b37e93e1161796c67097866bf659
2017-10-16editeng: add function to insert parargaph break to the EditViewTomaž Vajngerl1-0/+10
Change-Id: I06ab56967f25e6f9170cfbeb391110b55ddb18f6 Reviewed-on: https://gerrit.libreoffice.org/43359 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-10-14sd lok: fix spell checking languages in ImpressHenry Castro1-0/+10
Change-Id: I133c9b91521fa7f2b5f7e3a47396f7efa31e1a86 Reviewed-on: https://gerrit.libreoffice.org/43382 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>
2017-10-05editeng: fix assert about wrong EE_PARA_OUTLLEVEL itemMichael Stahl1-1/+1
It's a SfxInt16Item in DefItems::DefItems(). Change-Id: I01644b0b9d689d4d8756c52f1c2868f03b3037a5
2017-10-05tdf#112817 editeng,svx: fix SvxUnderlineItem/SvxOverlineItem SDIMichael Stahl1-0/+3
This was asserting because the superclass SvxTextLineItem was instantiated instead of the specific subclasses. Change-Id: If26847b8fa96dbf00062ba8372fe58e58c786782