summaryrefslogtreecommitdiff
path: root/editeng
AgeCommit message (Collapse)AuthorFilesLines
2017-05-29tdf#107176: just return initial selection when there's no rangeJulien Nabet1-0/+4
See https://bugs.documentfoundation.org/show_bug.cgi?id=107176#c2 Change-Id: I606b7f248821bb24b3a9026ecd26a9bc93971748 Reviewed-on: https://gerrit.libreoffice.org/36582 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 6bde2e93a2e0f94bc2263928cb27c4b85827822d) Reviewed-on: https://gerrit.libreoffice.org/37788 Reviewed-by: Eike Rathke <erack@redhat.com>
2017-05-25fix gdi resource leak (editeng/impedit)Julien Nabet2-0/+5
Change-Id: Ia2d9ad88b5bcc2adf7f28ac7833132c04045d55b Reviewed-on: https://gerrit.libreoffice.org/37802 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-27check for nullptr, tdf#104265Eike Rathke1-10/+13
Crash not reproduced, but a nullptr is believed to be the cause as ParaPortionList::SafeGetObject() may return nullptr if a stray EditPaM was passed to ImpEditEngine::GetI18NScriptType() At least this matches http://cgit.freedesktop.org/libreoffice/core/tree/editeng/source/editeng/impedit2.cxx?h=libreoffice-5-2-4#n1756 given in http://crashreport.libreoffice.org/stats/crash_details/725e8295-6dc0-4b0c-aff3-57c6c95930f2 and http://crashreport.libreoffice.org/stats/crash_details/e2570ac8-6137-4b67-91b2-6cc871f8cb69 Change-Id: Id01983a31145442016da527a57024dc060060b1a (cherry picked from commit 17236fe21f9b0c734c0e8d5c371b8112dcab8ac0) Reviewed-on: https://gerrit.libreoffice.org/36989 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-09ofz: leak in loading pptsCaolán McNamara1-7/+5
regression from commit 5e10e6937a8d5117555a4dcc9520aca173d75c95 Date: Sat Jan 18 10:15:10 2014 +0100 EDITENG : Remove usage of DBG_CTOR and DBG_DTOR. Change-Id: Id109f5bb23b1e4a93195548f880973ebc778515f (cherry picked from commit 0cbc0181d52433790bb607176ff01dcffc89ce99) Reviewed-on: https://gerrit.libreoffice.org/34952 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-02-28Resolves: tdf#106123 store and restore the PaM around the menu ExecuteCaolán McNamara1-0/+11
because the loss of focus in the current editeng causes writer annotations to save their contents, making the pContent of the current EditMaps invalid (cherry picked from commit 71a84b69ae30458a941f38869aa994118051a063) Change-Id: Ic01379291fa66dd58246d33287b18801f5da49c0 Reviewed-on: https://gerrit.libreoffice.org/34613 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-02-18revert tdf#101815 editeng SetMustRepaint when InsertTextJustin Luth1-1/+0
It wasn't targetted enough at the specific problem, and caused paint problems. This fixes tdf#106056. Change-Id: I2d87bc78627a558c62cb0efc24e49c7656662976 Reviewed-on: https://gerrit.libreoffice.org/34403 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> (cherry picked from commit a189b27ebeac8f179b9cce959e66862a16c4dd52) Reviewed-on: https://gerrit.libreoffice.org/34405
2017-02-14editeng: presumed copypasta in 048e30c1f8231e6cd144a9251061f6fa127b353eMichael Stahl1-1/+1
Doesn't make sense to check for RTF twice in a row. Change-Id: I15a384adb4d9e65770d81c414b6f24cc0a2b75e8 (cherry picked from commit 6ed7a9759fdf6affdb6ec81a9aae7a3398de8d9b) Reviewed-on: https://gerrit.libreoffice.org/34244 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-02-01tdf#103927: Share single standard VirtualDevice instance.Kohei Yoshida4-25/+25
To avoid creating excessive amounts of VirtualDevice instances. Also, since we now have VclPtr, we shouldn't need this bOwnerOfRefDev flag. This fixes tdf#102688 as well as other GDI-Limit related issues. See tdf#105469 for other bugs this may fix. (cherry picked from commit b41186a2fc49e440890b8c86e5367352ffaf9cd6) (cherry picked from commit fab2f546d1fb3ceaf5ee5d4d728f1728a8f1e7f3) (cherry picked from commit bac2baa785ffc75160de2d15da60901152da33de) Change-Id: Ieda242786c6376c7ac249a9f6d469b670f1ac177 Reviewed-on: https://gerrit.libreoffice.org/33640 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-01-26tdf#101828 handle rtf/richtext correctlyOliver Specht2-4/+15
Change-Id: Id894f62a918bd6e6fa59f8d546307343bf2bd4b0 Reviewed-on: https://gerrit.libreoffice.org/32682 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 048e30c1f8231e6cd144a9251061f6fa127b353e) Reviewed-on: https://gerrit.libreoffice.org/33567 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-01-19tdf#96354 correct broken autocorrect INitial CApitalsYossi Zahn1-3/+3
Change-Id: If65ec7814c3aed5e4c17294ae57c34550373469d Reviewed-on: https://gerrit.libreoffice.org/31317 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org> (cherry picked from commit c6db0e064959ec154db9471a8e1f1e2716bb3523) Reviewed-on: https://gerrit.libreoffice.org/33265 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-12-19tdf#104488 editeng,svx: throw less Accessible exceptionsMichael Stahl1-15/+0
For some of these functions it doesn't make sense to throw DisposedException as they can return a sensible default value. Particularly AccessibleShape::getAccessibleChildCount() was throwing an exception that was never caught. (cherry picked from commit 5a3b2111172f106378cbf78aba0fde1db3642275) loplugin:unnecessaryoverride (cherry picked from commit 10bf49c18d56f198e63514953a1c6e2ea17fcc9c) Change-Id: I000149cf9bb0fd13f69650ad8224a8daf26f7bee Reviewed-on: https://gerrit.libreoffice.org/32187 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2016-11-30Resolves: tdf#104152 suppress notifications from EditEngine during PasteEike Rathke1-0/+5
Broadcast once at the end instead to notify a11y. Change-Id: I12383b6efbbb2b149f0d73c67d8576fcc050b253 (cherry picked from commit 7c20d0174c59d46b11fc5029fe3fc0c00f5dc6d0) Reviewed-on: https://gerrit.libreoffice.org/31424 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-11-30prevent endlessly creating new lines until out of memory, tdf#104152Eike Rathke1-17/+61
Though this just prevents mishappens during reformatting a broken portion that is in a half-ready state because a11y was notified and attempts to obtain a paragraph. Solving the real cause means not being called in such state.. However, not going out of memory and also having matching X-values for the node's text positions that don't make the EditEngine crash later is better than nothing. Change-Id: Ifa8d2c5d1766b0f145b8e89ad26a78528db42056 (cherry picked from commit fff0cf20e4020af9e2c134549a5164417fde30b7) Reviewed-on: https://gerrit.libreoffice.org/31423 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-11-22trivial makefile cleanupsMichael Stahl1-1/+1
Change-Id: Ida5bdfa06ecd7907305f4f171ca5ab64260d0259
2016-11-21convert inventorId to scoped enumNoel Grandin1-1/+1
SW_DRAWLAYER had the same value as SC_DRAWLAYER, so I merged it into the ScOrSwDraw enum constant Change-Id: I5c45d378c00364d11cc960c9e48a6e3f10928724 Reviewed-on: https://gerrit.libreoffice.org/31037 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-21make this just every so slightly less awfulCaolán McNamara3-12/+13
Change-Id: Iddc39359d426f345eff0abf9fc9616e19597a0a4
2016-11-18editeng: assert SfxPoolItem::operator==Michael Stahl6-31/+31
Change-Id: Ia6c6f4f5af1e3a803b464ab410558984c3861a65
2016-11-16make the element names in dumpAsXml match the class namesNoel Grandin9-24/+24
Change-Id: I955facfe3e901fcb76798dab342f96a67d5ac63f Reviewed-on: https://gerrit.libreoffice.org/30894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-13drop useless semicolonsDavid Tardon1-1/+1
Change-Id: I039f8ff491b42ea9c3936bf13922df8095434228
2016-11-11coverity#1371263 Missing move assignment operatorCaolán McNamara1-0/+26
Change-Id: Ifb4117afac4aa86893e674a581e1a7bb80925ee3
2016-11-11check for self-assignmentCaolán McNamara1-8/+11
Change-Id: I74eb934d19c0b511870e5a675917ca4baaf768cc
2016-11-11make it more typical copy ctorCaolán McNamara1-2/+9
Change-Id: I0367e24b966a5bcc0d4838022ae12054e097270e
2016-11-11seems dubious to copy the state, but drop the load again bitCaolán McNamara1-1/+1
if the assigned-to item had loaded its original content, but the assigned-from item hadn't, then surely the assigned-to item will never load the new content. if the assigned-to item hadn't loaded its original content, but the assigned-from had, then why load it again Change-Id: I68c2cf2682a517e7e630ab6cbc637b35a2b9c7aa Reviewed-on: https://gerrit.libreoffice.org/30781 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-11-11these are going to get overwritten immediatelyCaolán McNamara1-3/+0
Change-Id: I065ae2aa2dead0679d05f080124ed54c27f0d68f
2016-11-11make this operator= a little less crazyCaolán McNamara1-18/+4
if SetGraphicPos was called with GPOS_NONE then xGraphicObject, maStrLink and maStrFilter are in a suitable state to copy to get the same results as explicitly forced here Change-Id: Id072590e92e0c083a3cbc443db0e85d9dbfa73f0 Reviewed-on: https://gerrit.libreoffice.org/30780 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-11-11why have a pimpl with somethings in it and somethings notCaolán McNamara1-167/+99
Change-Id: I6151defcd9dddf4582ecf8d5952f6f8a825c545a
2016-11-11the pStream member makes no sense at allCaolán McNamara1-14/+6
maybe the PurgeMedia call in sw was meant to be a PurgeGraphic call originally (PurgeGraphic since removed by... commit a22ac2c218870033822120bf0b0d6cfde6ce799f Author: Caolán McNamara <caolanm@redhat.com> Date: Thu Jul 14 22:06:29 2011 +0100 callcatcher: remove unused methods) PurgeMedia releasing the stream makes no difference to the only place its used which is SvxBrushItem::GetGraphicObject which makes a new one every time anyway. the SvxBrushItem assignment operator doesn't change the stream member of the pImpl which looks utterly nuts, so its a good thing the stream is not reused Change-Id: Ie0dee22a6640a6916908fcddbc3541ba85034217
2016-11-11this looks like a leak to meCaolán McNamara1-10/+9
Change-Id: Id72d770ec55d6e627a81cc9590cb59f6c84f27b9
2016-11-11use std::unique_ptrCaolán McNamara1-51/+44
Change-Id: I03e2fb2d3ad1b0b7e64f93dbee172b119ef7bf40
2016-11-11loplugin:countusersofdefaultparams in editeng..rscNoel Grandin1-1/+1
Change-Id: I8a8d13faf228cbc934ae21d6763d92d370eb42ec
2016-11-09loplugin:expandablemethods in drawinglayer..editengNoel Grandin7-66/+14
Change-Id: Ic7fe13651e18b4eec90ef3fd8d7aab81197e0f39 Reviewed-on: https://gerrit.libreoffice.org/30707 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08loplugin:unnecessaryvirtual in comphelper..formsNoel Grandin1-2/+2
Change-Id: Iabe292e68cb84b97f207061347ed6a30309dc9fd Reviewed-on: https://gerrit.libreoffice.org/30679 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-05make a useful function - SvxBoxItem::CalcLineWidthJustin Luth1-0/+27
It saves lots of extra code: no separately checking if a line exists, and then getting the width. Closely matches the existing CalcLineSpace. sc/source/ui/view/printfun.cxx is another place that could use this heavily to replace their lcl_LineTotal function. Perhaps something good for an easyHack. (Wait until LO5.4, since much of the logic should use CalcLineSpace(,true) instead, and that function probably will have the default bEvenIfNoLine changed to true. Compiler doesn't like providing "true" when the default value is also "true".) Change-Id: I298d057b2bf04959434736f6ab2666d2de4222f9 Reviewed-on: https://gerrit.libreoffice.org/30589 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2016-11-05tdf#90070 don't clip flys with bordersJustin Luth1-2/+10
regression from commit e598ab04476a32a08f18e8f0662fafa5f78f1a4a very aggressively forced a new frame size via compat setting CLIPPED_PICTURES on any fly - not just images. This only affects MS-format documents, EXCEPT that it is a document property, so if the file every spent any part of it's life in MS-format, it will always retain that compatibility setting. That explains why the problem was intermittent for me - and was hard to reproduce in a clean document, even though I'd seen it in .ODTs. bIgnoreLine (ignore the fact that there is no visible line) was a confusing word choice for "if there is no line, then return a spacing size of zero". bEvenIfNoLine=false is better. Change-Id: I50a3bdef3a67339ae517ee6319920651bc56f9be Reviewed-on: https://gerrit.libreoffice.org/30585 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2016-11-04loplugin:oncevar in desktop..filterNoel Grandin2-8/+2
Change-Id: I21c47cacbcd68f06eea7ccbbfa6d04fc65e2b7ee Reviewed-on: https://gerrit.libreoffice.org/30564 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-02loplugin:singlevalfieldsNoel Grandin3-23/+5
Change-Id: I65f96d9cd24572c8d0946acf4d2d45eb3db83a76 Reviewed-on: https://gerrit.libreoffice.org/30476 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-31tdf#103334 - EDITING: Undo on bullet point styleNoel Grandin4-5/+9
I have checked the normal model and the editing model after UNDO, and all seems to be well, this is purely a rendering/lack-of-invalidation issue. The extra invalidation I add here is restricted to the UNDO case to prevent tripping up a LOK unit test (SdTiledRenderingTest::testCursorViews). I confess to not having followed the invalidation logic all the way to see why exactly it makes the bug go away. Change-Id: I34f7d84526462665b1ec09aba966c98cd4e8795f Reviewed-on: https://gerrit.libreoffice.org/30225 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-31Omit comparator which is the same as default std::less<key_type>Takeshi Abe1-9/+1
Change-Id: I72a0b618577caececaaf3eb4df53d4cb192251da Reviewed-on: https://gerrit.libreoffice.org/30369 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-10-28update unnecessaryoverride plugin to find pure forwarding methodsNoel Grandin1-5/+0
which can be replaced with using declarations. Is there a more efficient way to code the search? Seems to slow the build down a little. Change-Id: I08cda21fa70dce6572e1acc71bf5e6df36bb951f Reviewed-on: https://gerrit.libreoffice.org/30157 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-28ScopedVclPtr vs std::unique_ptr for VclAbstractDialog derivativesCaolán McNamara2-2/+2
Change-Id: I5e43312b6f42ce0c63946f366eaf1e6dcb9629b2 Reviewed-on: https://gerrit.libreoffice.org/30344 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-10-27make the AbstractDialog stuff extend from VclReferenceBaseNoel Grandin1-3/+3
Because some stuff wants to multiple-inherit from VclAbstractDialog and OutputDevice-subclasses, and we'd prefer to keep all the lifetime management through a single smart pointer class (VclPtr) The change in msgbox.cxx and window.cxx is to workaround a bug in VS2013 to do with virtual inheritance and delegating constructors. Change-Id: I178e8983b7d20a7d2790aa283be838dca5d14773 Reviewed-on: https://gerrit.libreoffice.org/29140 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-26rework to avoid coverity#1371205 Missing move assignment operatorCaolán McNamara1-54/+62
Change-Id: I117fa0891e8cd1bf339bded93a7ee19d799caf9f
2016-10-26we don't need ree after the loop hereCaolán McNamara1-6/+4
Change-Id: Ib288ab3a7abf8f45c1175c36dcd4349dc4ad019f
2016-10-21loplugin:expandablemethodds in include/editengNoel Grandin5-40/+14
Change-Id: Iaf56cb9c16a4cbfb9ab1636228c77d1033a334f5 Reviewed-on: https://gerrit.libreoffice.org/30132 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-20add dumpAsXmlEditDocNoel Grandin1-0/+5
to dump the current editing document to editdoc.xml on F12 Change-Id: I1b9cc2edb6429aa0bf651bdd52cac70dfd4db9d0
2016-10-19loplugin:expandablemethodds in editeng..extensionsNoel Grandin7-14/+6
Change-Id: Ibe1929d74ff460955e39f2ccce3056b2051ddf08 Reviewed-on: https://gerrit.libreoffice.org/30013 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-18loplugin:unusedmethodsNoel Grandin1-5/+0
Change-Id: Icf773925c37dde8b7404edac9864e7b10fe113b4 Reviewed-on: https://gerrit.libreoffice.org/29968 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-17let LanguageTag::convertToLocale() decide when to create a temporaryEike Rathke1-1/+1
Change-Id: Iaefddb13192aff1aad912ac9f908c3d12236b94d
2016-10-17replace <<= with assign for <<= with rhs AnyJochen Nitschke2-7/+7
makeAny and Any ctor return an Any Change-Id: Iaa361bc315d785f80153acf1009bf47d109728ec Reviewed-on: https://gerrit.libreoffice.org/29914 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-14LOK: Calc: fixed missed tile invalidations on cell text editingMarco Cecchetti3-11/+26
What's new: 1) when an edit view is killed, the area which was used by the edit view is invalidated for both own window and other view windows after the edit view has been destroyed; 2) when an edit view is created or its out area is expanded, the windows of other views are invalidated too; 3) when a vertical scroll occurs in the edit view area the windows of other view are invalidated too; 4) same methods renaming since now we add/remove windows not edit views. Change-Id: Iac54f5b182c9562f08bb724f9ddde1c26cffa2e7 Reviewed-on: https://gerrit.libreoffice.org/29783 Reviewed-by: Marco Cecchetti <mrcekets@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com>