summaryrefslogtreecommitdiff
path: root/editeng
AgeCommit message (Collapse)AuthorFilesLines
2016-02-06remove some unnecessary typedefs to pointerNoel Grandin2-5/+3
that were really not helping make the code any clearer. Found with a search git grep -P 'typedef\s+\w+\s*\*\s*\w+\;' and manual inspection (cherry picked from commit d16d9f950f8cb6d8948875372c9ff1f0aae9fb7a) Change-Id: I6a5c031e9e060ad3623a7586ec8a8cc4fe6252e9
2016-02-06Fix typosAndrea Gelmini2-2/+2
Reviewed-on: https://gerrit.libreoffice.org/16582 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 1a8915ef8302b13b781977209ae1fa41f5f659dc) Change-Id: I1c5e4970d4e90bdea68a901294594104de5e189e
2016-02-06loplugin:stringconstant: Flag more inefficienciesStephan Bergmann1-1/+1
Change-Id: Ie217f99961c6f2c224d1c01beaf0146a4ea3e0c2 (cherry picked from commit 8987a2920cc638939c3d5beb0f80c9bd6a13f3d5)
2016-02-06Simplify uses of OUString::replaceAll with literal argumentsStephan Bergmann1-1/+1
Change-Id: I769cc6e11909c7f4c6394fdc4dec8a12b9a67af8 (cherry picked from commit 9fc05ce275526df9c5e2aa5df30c4b08a61fd0bc)
2016-02-06loplugin:loopvartoosmallNoel Grandin8-11/+11
(cherry picked from commit 6140ca9f1d728475e332f9fa96ee62dda58687ea) Change-Id: Icb31e51575f7fffd36be73bbd87a3c5e56c3aa26
2016-02-06seems to be what was meantLionel Elie Mamane1-1/+1
Change-Id: Ia7b784d820249c3d75915761dac34a2aaa190c0b Reviewed-on: https://gerrit.libreoffice.org/16358 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit ecaf1cb3861c1b519a1495487fc796884cf37b92)
2016-02-06Global CptlSttWrd and CptlSttWord -> CapitalStartWordJan Holesovsky3-14/+14
Change-Id: I550456ae319a6a865f2ee951a1ddf70384ce33ef (cherry picked from commit 9fadc1dc4753862a41569651cf6357234e5e3333)
2016-02-06Global CptlSttSntnc -> CapitalStartSentenceJan Holesovsky3-18/+18
Change-Id: Id428332201f14b172af1590baed6aa2a67e0557a (cherry picked from commit 42f0f1397ad6c36410e26f8bbc04372a754b153d)
2016-02-06bCptlSttSntnc -> bCapitalStartSentenceMiklos Vajna2-4/+4
Change-Id: Ie22198837257163fd7211e93d97d97be2bca4b64 (cherry picked from commit 63654692728aa4ce44c57412eccc7a252f8b3e26)
2016-02-06Fix typosAndrea Gelmini1-1/+1
Change-Id: I80995af6459af9f647e66d1c85da2eedad2647b9 Reviewed-on: https://gerrit.libreoffice.org/16523 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 5d5dc059cb4b88fe19e5d92e7d9b9ae581afce98)
2016-02-06Fix typosAndrea Gelmini1-1/+1
Change-Id: Ifd126a535f18db79a18aaec61b76cdf26ab33dff Reviewed-on: https://gerrit.libreoffice.org/16522 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 69c88a32aad2cafde197e98557868ad069795d60)
2016-02-06Fix typosAndrea Gelmini2-4/+4
Reviewed-on: https://gerrit.libreoffice.org/16408 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit aade27554d427649810f5635133519cadfa8002f) Change-Id: I60ed5eb658d50cbc7dc572facb5463b7527b4d9b
2016-02-06Fix typosAndrea Gelmini1-1/+1
Change-Id: I2297bf392a405f02be2450f4624f1c9fc0b512ce Reviewed-on: https://gerrit.libreoffice.org/16373 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com> (cherry picked from commit 9ed033917b0bdaeb663395224a5e5b8b20a67169)
2016-02-06Fix typosAndrea Gelmini1-1/+1
Reviewed-on: https://gerrit.libreoffice.org/16314 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit ae150c6a5424d021ce5eb46dc9573f12a4d05445) Change-Id: Ibfa971952cd330ddf430e7e951c5c235d2ae6bd8
2016-02-06Replace boost::scoped_array<T> with std::unique_ptr<T[]>Takeshi Abe6-12/+12
This may reduce some degree of dependency on boost. Done by running a script like: git grep -l '#include *.boost/scoped_array.hpp.' \ | xargs sed -i -e 's@#include *.boost/scoped_array.hpp.@#include <memory>@' git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \ | xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<[]>/' ... and then killing duplicate or unnecessary includes, while changing manually m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx, extensions/source/ole/unoconversionutilities.hxx, and extensions/source/ole/oleobjw.cxx. Reviewed-on: https://gerrit.libreoffice.org/16289 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 09800956191c90035872cbc18cd304fee043c710) Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd
2016-02-06Fix typosAndrea Gelmini1-1/+1
Reviewed-on: https://gerrit.libreoffice.org/16310 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 3fa7b0b70f8f21c65603aa2b7db53392fdbceec4) Change-Id: Id8c7cf460cba5af89891c470e1aaa61b227d356e
2016-02-06remove unnecessary check for null when calling deleteNoel Grandin2-6/+3
Idea originally from caolan. Found using the following command: find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;' Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763 (cherry picked from commit 4729774b244db7a175077ed0c70aa48be62bc60e)
2016-02-05Typo: emty->emptyJulien Nabet2-3/+3
Change-Id: I495ae28194da449ab1b31b2b5ec0d9e08fbcc291 (cherry picked from commit c27798b20097602739e3e81a5063109b8c66447d)
2016-02-05convert SCROLL constants to scoped enumNoel Grandin1-1/+1
(cherry picked from commit 204d147b8a887d17e6457f795e8b8f4d632213ae) Change-Id: I5696fa39b2d032735cea7abe039349d4f83cf68d
2016-01-14editeng: handle SdrModel::isTiledSearching()Miklos Vajna4-7/+26
Given that the edit/outliner views can come and go, avoid the lifecycle problems with just passing a pointer to the sdr model to editeng, and then it'll always have the up to date "are we searching" information. editeng can't depend on svx, so provide an interface class SdrModel can implement. (cherry picked from commit 7b5d20983dfbfb458898eeab54828ba5fef5841f) Conflicts: editeng/source/editeng/editview.cxx editeng/source/editeng/impedit.cxx include/editeng/outliner.hxx sd/qa/unit/tiledrendering/tiledrendering.cxx svx/source/svdraw/svdedxv.cxx sw/inc/PostItMgr.hxx sw/source/uibase/docvw/PostItMgr.cxx sw/source/uibase/docvw/SidebarWin.cxx Change-Id: I3b98011593b00ac0fab05b6b9c591dd20d94c579
2015-11-24editeng lok: invalidate on scrollMiklos Vajna1-0/+6
E.g. when a Witer comment has long enough contents to get scrolled, the desktop case repaints its contents by vcl::Window::Scroll(), followed by a vcl::Window::Update(), i.e. vcl::Window::Invalidate() is not called. The result of this in case of tiled rendering is that no tile is repainted, so call vcl::Window::Invalidate() after scrolling manually. A generic VCL-level invalidate-after-scroll is not wanted, as the scrolling of the document contents and the main document window is not in sync when tiled rendering. (cherry picked from commit 162ae47a046b0c501e09d611a9834e875db884b8) Conflicts: editeng/source/editeng/impedit.cxx Change-Id: I74296a0f0e52c92cf3db6aefa73f28bb2b202871
2015-11-16editeng lok: respect origin of map mode for TEXT_SELECTIONMiklos Vajna1-0/+9
With this, selections of Writer comment text show up at the correct position, not at the top left corner of the window. Change-Id: If865503d9a02a27730e382d65c42c706dd533a93 (cherry picked from commit 22e97c130868fe7d7529cfcfb2a240f775bd8916)
2015-11-16editeng lok: respect origin of map mode for INVALIDATE_VISIBLE_CURSORMiklos Vajna1-0/+7
Writer comments are separate widgets, but we want to have coordinates in absolutes twips, so give Writer a chance to inform us about the delta. For now only do this in case the map unit is twips, as Impress sets the origin already. Change-Id: Idf340944165e44b0888c00965d6be7798712ff76 (cherry picked from commit e988ab84f1c32519bfca758086c749ba98a5a85f)
2015-11-10EditUndoRemoveChars::GetStr must return a referenceStephan Bergmann1-1/+1
...as ImpEditEngine::ImpRemoveChars (editeng/source/editeng/impedit2.cxx) calls pCurUndo->GetStr() += aStr; Regression introduced with d5e11f5ffb741aabe7e43be78ef764a1f3cafd8e "convert editeng/source/editeng/editundo.hxx from String to OUString." Change-Id: Iab3dd3b861bca715a90e89e3a63a6f298657367d (cherry picked from commit e31205f3ec1f941ab5a188bfde6329edf2acc55b) Reviewed-on: https://gerrit.libreoffice.org/19857 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 5889d97f4e6ac41db9cd65b55baa14c46a283893)
2015-11-10Resolves: tdf#76964 fall back to primary language via getLanguageCaolán McNamara1-13/+21
instead of bittwiddling which ends up trying to resolve the system language (cherry picked from commit a1ff0745cc4f78777e8dba1e7bb52d18386d7394) more tdf#76964 fall back to primary language via getLanguage (cherry picked from commit 97893e56e61a466e56d12ee46d11f6e4c32a737b) sw: fix SwUiWriterTest pointlessly loading an "empty.odt" ... ... instead of just creating a new document. (cherry picked from commit 98ddd7a32fd0d5fa080fac368b9dc53a06659285) Change-Id: I545bd5e39f99003ddedf3c90031e8b818edc1de2 Reviewed-on: https://gerrit.libreoffice.org/19545 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit de1cb4039756f71d848297981b757c1cfa4609b1)
2015-11-03Fix tdf#93438 Impress generate abnormal style when copy-pastingMark Hung1-1/+7
from Writer with Chinese UI. When user configure UI language as Chinese, style names are also translated. However when Copy-pasting from Writer to Impress ( select RTF fromat with paste-special), Chinese (unicode) style names are borken into multiparts, where some of them are empty string. Neither deleting the abnormal style nor saving the file can be achieved. The only remedy is to remove style with emtpy name with macro. With this patch: 1) Catch NoSuchElementException and ignores it, so user still has chance saving file. 2) Make sure style has valid number before inserting it. 3) Prevent text breaking into multiple tokens by handling ucN in ScanText(). Change-Id: I417f70b81c23ac63c175cc13c548068873d13a38 Reviewed-on: https://gerrit.libreoffice.org/18148 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/19685 (cherry picked from commit 52f3eb47aa42bd1a2a61088706cd3c729e274fc0)
2015-10-17tdf#93141 Calc/Impress: remove last colon of emoji short namesLászló Németh1-1/+5
AutoCorrect Emoji replacements were incomplete in Calc cells and Impress text boxes, keeping the terminating colon: :omega: -> Ω: Corrected by this patch: :omega: -> Ω Change-Id: I0d1f6f9ec9c31a7b37e0c9afaaad17dcee568dd5 Reviewed-on: https://gerrit.libreoffice.org/18849 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> (cherry picked from commit 1e15cf04b5e167de1bfc5c19019dcae2042e1414)
2015-10-16editeng tiled rendering: avoid selections callbacks in Paint()Miklos Vajna1-1/+4
Given that we emit selection callbacks on each logical operations (set selection, deselect all, etc) already, it's not necessary to emit callbacks in DrawSelection() when it's called from Paint(). Change-Id: I6781c71ee2f292de2a1c7d129fc49b514aca2be1 (cherry picked from commit c8bfca547d822a75ddfdd33903deae3fb6488789)
2015-10-14editeng: add EditView::GetSelectionRectangles()Miklos Vajna4-5/+28
This gives sd access to the selection rectangles as well (as opposed only to the document model positions of selections). Change-Id: Icb903e91f9e868573403b360bbe839705ddf2916 (cherry picked from commit f7764214f2ab8aff030aaeb29efd693275822761)
2015-10-08editeng, sw, sc: use comphelper::string::join()Miklos Vajna1-5/+4
Change-Id: I9b0a32271a965bc4089720ccb61b26b67ceab7b2 (cherry picked from commit 1cb13d87b5d887718f6d81a842444b7251dc64cf)
2015-09-18tdf#93052 - When save, generate unused list-styles in context.xmlJuergen Funk1-2/+3
Evaluation of the 0 is here http://opengrok.libreoffice.org/xref/core/xmloff/source/text/txtparae.cxx#615 the methode "xNumRule->getCount()" get back the 0. Change-Id: I15424fe7eb9d35a6a6d4f669e695efc904be320f Reviewed-on: https://gerrit.libreoffice.org/18231 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2015-09-18Fix tdf#93781 Impress copy wrong style name to clipboard whenMark Hung1-1/+2
style name contains Chinese character. Encode style name in multibyte sring (ex,Chinese) properly with RTFOutFuncs::Out_String(). Change-Id: Ibdd1010e28c711d7829643b60b32637ebce58bdb Reviewed-on: https://gerrit.libreoffice.org/18247 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 85c62a36a907bc5ff31627349a80baa51efbd443) Reviewed-on: https://gerrit.libreoffice.org/18296
2015-08-31don't write SvxBackgroundColorItem via inherited SvxColorItem::StoreCaolán McNamara2-32/+12
SvxBackgroundColorItem inherits from SvxColorItem and for backwards compatibility with the StarOffice 5 binary file format (yes, really) writes/reads only rgb and not the transparency value, so copying and pasting text from a sidebar comment in writer to itself or another one results in a black character background as the default COL_AUTO turns into black Change-Id: I18b5105dd8e060b9e49dda6026e26d3a0f00d8f5 (cherry picked from commit 3bc69b1d0d8620afd89a993b5f6bc46a2ff5267f) this farcical staroffice 5.0 related junk can at least be const Change-Id: I096d98f6e0cb61cacd9cd82a623f832b88ded1e6 (cherry picked from commit 1e8b7cdbbd084a1e75f82bfff605321c8480b78d) Reviewed-on: https://gerrit.libreoffice.org/18087 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-08-20tdf#93384 editeng rendercontext: don't paint spellcheck result directlyMiklos Vajna1-2/+1
E.g. in Writer create a new comment, type a word that is not in the dictionary, then a space to trigger the spelling, and that painted the spelling error indicator outside Paint(). (cherry picked from commits 71aed9185fb17ee27bdc38b4ac650713c4cabb8b and 89bd30cf426ca54fc9e46295a60551b5bb2d3232) Change-Id: I8f72486189e04a5596729fb52b6af39772f8e002 Reviewed-on: https://gerrit.libreoffice.org/17690 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-06tdf#88295: Don't export transparent background colour as whiteKatarina Behrens1-0/+45
The fix is twofold: 1. retrieve transparency from colour in SvxBackgroundColorItem (add QueryValue, PutValue methods, use additional memberID to retrieve alpha channel as a bool property) 2. add CharBackTransparent bool property to Draw [text] shapes Change-Id: I6e14b81cc82f6b4d7fdd4756ff2e4f75e9270361
2015-08-06tdf#90804 remove SfxFieldUnit enumAndras Timar1-2/+2
b78d881520f2eb658180e2c90ffee3d30a80f0ae removed unused values from SfxFieldUnit enum. This broke the mapping between SfxFieldUnit and FieldUnit. In fact SfxFieldUnit was redundant. Change-Id: I13c7e7d708c6eeab0de192f4cd110b0a23989a31 Reviewed-on: https://gerrit.libreoffice.org/16150 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 7f4230675c6c78ebea8b6db3f3612e3ef6fb23df)
2015-08-06AutoCorrect: fix not immediately replacement of Emoji :short_names:László Németh1-2/+7
Cherry-picked from 86782d5dfc0163159369677b0ac172ed2125b221 and cd2ba3124602ad9ee8f5927c385936cc5319808d. [86782d5dfc0163159369677b0ac172ed2125b221: AutoCorrect: direct replacement of keywords surrounded by colons Replacing immediately (without pressing space or enter) and inside words, too. For example, fixing tdf#55292 – complete input method for n-dash, m-dash – is possible now by :--: -> n-dash, :---: -> m-dash AutoCorrect replacements.] cd2ba3124602ad9ee8f5927c385936cc5319808d: unbreak calc again, a fix for the previous commit by Markus Mohrhard] Change-Id: Id7d9411599bec620fa91c246b531d26150f20c6a Reviewed-on: https://gerrit.libreoffice.org/16002 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2015-08-06tdf#91702 - fix stack-based MessBox allocation.Michael Meeks3-3/+3
Change-Id: I62dd164e281911d9db3de453789a5badc7cd5fd7 Reviewed-on: https://gerrit.libreoffice.org/15954 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-08-06tdf#88276: toolbar|sidebar button for text background colourKatarina Behrens1-1/+1
Change-Id: I547a562384d30b95b744673feb284ccbcf50a614 Reviewed-on: https://gerrit.libreoffice.org/16030 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Yousuf Philips <philipz85@hotmail.com> Reviewed-by: Philippe Jung <phil.jung@free.fr> Reviewed-by: Yousuf Philips <philipz85@hotmail.com>
2015-05-29convert constants in include/vcl/settings.hxx to scoped enumsNoel Grandin1-1/+1
Change-Id: I2a110c017f13eca6ddbd70ef3ed195d24adef0a3 Reviewed-on: https://gerrit.libreoffice.org/15828 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com> Signed-off-by: Jan Holesovsky <kendy@collabora.com>
2015-05-29convert POINTER constants to scoped enumNoel Grandin2-9/+9
Change-Id: Iea29ce5fd6c620535197d3ca8538335078430e19 Reviewed-on: https://gerrit.libreoffice.org/15825 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com> Signed-off-by: Jan Holesovsky <kendy@collabora.com>
2015-05-27tdf#91416 - fix some incorrectly allocated VirtualDevices.Michael Meeks1-1/+1
Change-Id: I9ebed313827986473c60e77b7e218b4c1b2487fe (cherry picked from commit f849d96463d967214bc063f6de912a082272c395)
2015-05-26ImpEditView::SetCursorAtPoint tiled rendering: avoid partial selectionsMiklos Vajna1-2/+2
Same problem as in the previous commit, just for mouse move. Previously when selecting "abc" with the mouse only one or zero letter got selected as the mouse moved, now it's properly the whole afffected string. Change-Id: I025dbd71fc02a0c93a532ca188836ffb957d6b35 (cherry picked from commit c6f03d6fc25a3cea22f2ce035d0948bcaa74daa9)
2015-05-26ImpEditEngine::MoveCursor tiled rendering: avoid partial selectionsMiklos Vajna1-2/+2
Tiled rendering assumes that the whole list of selection rectangles is sent, i.e. the information is not incremental. With this, if the text is "abc" and you are before "a" with the cursor, then pressing shift-rightarrow two times will result in "ab" being selected, not just "b". Change-Id: I70c043575d3c68d78342af0a6b78659d83b4f5f4 (cherry picked from commit 18e08580b660111e7e9b0bae18ac9034f57475ba)
2015-05-20bin/rename-sw-abbreviations.shlibreoffice-5-0-branch-pointChristian Lohmaier17-106/+106
renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
2015-05-20convert DEFAULTCONSTANT constant to scoped enumNoel Grandin3-3/+3
Change-Id: I5ebd77edfa29d6c6c7acea37e826ef1d625916c3
2015-05-20convert DRAWMODE constants to scoped enumNoel Grandin1-2/+2
Change-Id: I36cbe8057d09226f8b302963bdd94dc5600b686f
2015-05-18Related tdf#88056: use better-fitting <text:page-name>Katarina Behrens2-8/+8
Implemented Regina's suggestions: * this is a text field, therefore it belongs to text namespace * page-name (evtl. slide-name) describes much better what this field really contains This (among other changes) reverts commit 6609de8856519e0e9 Change-Id: Idab3b7c291839a9137f80d325a7d3f5ef0ff2636
2015-05-15tdf#62475: partial handmade fixesAndrea Gelmini3-18/+12
Change-Id: Ib9af202c43b916b9af4b4e18db35d470a8692fe4 Reviewed-on: https://gerrit.libreoffice.org/15712 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2015-05-15conver MENU_FLAG_ constants to scoped enumNoel Grandin1-2/+2
Change-Id: I969d99fa8881cc89601696a2d8621905a82b147b