summaryrefslogtreecommitdiff
path: root/include/editeng/editview.hxx
AgeCommit message (Collapse)Author
2019-09-02loplugin:constmethod in editengNoel Grandin
Change-Id: I07e22d880940ea6df928565942dac268f4b94fea Reviewed-on: https://gerrit.libreoffice.org/78399 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-12Don't select hyperlink fields arbitrarilySamuel Mehrbrodt
For some functions, like remove or edit hyperlink, it's required that the hyperlink field is selected. However, we should do that only when executing the function, not when queriying its status. This led to selection changes on mouse over/right click. Change-Id: I22035698032d1e651aae6a74d6e445dfe044bf74 Reviewed-on: https://gerrit.libreoffice.org/77336 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-07-15tdf#62561 Add remove/edit hyperlink to calc context menuSamuel Mehrbrodt
Change-Id: Idb1b96dc4e95be40a796f9178975207099101b87 Reviewed-on: https://gerrit.libreoffice.org/75497 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-06-26allow welded drag and drop into editviewCaolán McNamara
Change-Id: Ia03083b0507ef969300316034cde9bbcf5963b9a Reviewed-on: https://gerrit.libreoffice.org/74746 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-15tdf#42949 Fix IWYU warnings in include/editeng/[a-e]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I81917d697adf79b1bd0de4cc262d3cd6bc8eb36f Reviewed-on: https://gerrit.libreoffice.org/70710 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-08tdf#42949 Fix IWYU warnings in include/sfx2/[t-z]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib3252828385d1dc8faf48a428b1593199647a679 Reviewed-on: https://gerrit.libreoffice.org/70383 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-04weld ClassificationDialogCaolán McNamara
with the extra problem of hosting an EditView/EditEngine within a weld::DrawingArea Change-Id: Id48a57ed0dfd2d92217209c43f752edd9cf8e1bd Reviewed-on: https://gerrit.libreoffice.org/70219 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-13Pointer is pointlessNoel Grandin
since it is just a wrapper around PointerStyle Change-Id: I51f065e0d4ad8bd91f5c84c5819048c720a19267 Reviewed-on: https://gerrit.libreoffice.org/67711 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-11pass EditTextObject around using std::unique_ptrNoel Grandin
Change-Id: I71f4529c2e02fd0ac2561191e4cb35e18e206037 Reviewed-on: https://gerrit.libreoffice.org/52682 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-28loplugin:passstuffbyref improved return in editengNoel Grandin
Change-Id: I6aba5b79e588f28529052ddb30ad51807d73cfe5 Reviewed-on: https://gerrit.libreoffice.org/47120 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-16editeng: add function to insert parargaph break to the EditViewTomaž Vajngerl
Change-Id: I06ab56967f25e6f9170cfbeb391110b55ddb18f6 Reviewed-on: https://gerrit.libreoffice.org/43359 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-08-11Fix typosAndrea Gelmini
Change-Id: Ia36c8abe91e8c2ac46498e88def59a9887711ba1 Reviewed-on: https://gerrit.libreoffice.org/41014 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-08-11editviewoverlay: corrected AttributeChangeArmin Le Grand
EditView on Overlay visualization needs to handle selection change when e.g. FontSize attribute of a selected text portion changes. Changed handling so that selection overlay is an integral part of text visualization overlay and refreshing text visualization always refreshes selection visuals, but not the other way around. Both anyways check for real change, so just extra testing is avoided which is still the better solution Change-Id: I3ce6570fd9a18a7c1d7ced4bc4ca9aeda57538e0 Reviewed-on: https://gerrit.libreoffice.org/40993 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2017-08-10editviewoverlay: correct reaction on property changeArmin Le Grand
Do not hand over LogicalSelectionRanges directly on selection change, better let the visulizer do what he needs. On AttributeChange, tge resulting repaint needs to refresh all OverlayObjects, not only text, but also the selection to make look okay e.g. at font size change Change-Id: Ibb9737c33d6f85a9f68df3edbb989c0443cd4a5c
2017-08-10editviewoverlay: EditViewSelection reorganizedArmin Le Grand
The Selection visualization in EditVierw is organized to use XOR for visualization, thus DrawSelection is used e.g. before and after changes to the Selection. Ensured athat all changers of selection have to use SetEditSelection by making return of GetEditSelection const. This allows to use a central and safe SelectionChanged which is needed for alternatives of Selection visualization. Change-Id: I994553f3be6b58fd595aa500922d8d1d8ddd36d4
2017-08-10editviewoverlay: Allow EditView to run in OverlayArmin Le Grand
This is the first basic functionality to get the active EditView with EditEngine work in the Overlay which all Apps support. Reason is that the current EditEngine 'plugs' into the Window and uses Invalidate() calls to repaint deeply everything under a text change. While this is acceptable for simple cases it can get very slow when there are excessive, expensive to paint objects in the background, e.g. MasterPages in Draw/Impress with gradients and other stuff. This was avoided in older versions (LO51) by 'guessing' a good BackgrundColor by the EditEngine, not invalidating but painting actively using that guess (with better or worse results) which someone removed. For the future it is anyways the better way to get the EditEngine functionality to Overlay and using Primitives, this will be a first step. This may enable Text Editing without repainting the Background (fast), using a non-XOR selection paint and more. It will need thorough testing and further experimenting due to EditEngine being used in many places (DrawObjects, Calc Cells, Formular Fields, Controls, ...) Change-Id: Ib9eb0f3999fd61a82ddf7a60ab1ea6ccda3a60da
2017-07-28loplugin:constparams in editengNoel Grandin
Change-Id: Ice32a16d14d0132a19e8209d311bb799fd7ee0c8 Reviewed-on: https://gerrit.libreoffice.org/40526 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-22loplugin:constparams in editeng,lingucomponentNoel Grandin
Change-Id: I99d9153e3fd1fead34c856ac68a120bb06a003d3 Reviewed-on: https://gerrit.libreoffice.org/40296 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21migrate to boost::gettextCaolán McNamara
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-06-21convert ErrCode to strong typedefNoel Grandin
would have preferred to re-use o3tl::strong_int, of which this is a modified copy, but there are lots of convenience accessors which are nice to define on the class. Change-Id: I301b807aaf02fbced3bf75de1e1692cde6c0340a Reviewed-on: https://gerrit.libreoffice.org/38497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-14remove some unused forward declarationsJochen Nitschke
and unused TransliterationModules include in editeng Change-Id: I02e2d6acfde562a3e0cc8516eb16bb2ce8a810cc Reviewed-on: https://gerrit.libreoffice.org/37556 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-09make loplugin constantparam smarter about string paramsNoel Grandin
Change-Id: Id3df69b38fd35f46735246a6d307a89aa10d4294 Reviewed-on: https://gerrit.libreoffice.org/37426 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-04convert EVAnchorMode enum to scoped enumJochen Nitschke
change values to match position in definition to their meaning Change-Id: Ia96e0c7e0c70c847dea518ef871608516542d3cb Reviewed-on: https://gerrit.libreoffice.org/37186 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-01typesafe wrappers for css::i18nutil::TransliterationModulesNoel Grandin
and related css::util::SearchOptions2 The TransliterationModules enum has it's constants spread over multiple UNO enum/constant-collections - TransliterationModules and TransliterationModulesExtra, which means that most code simply uses sal_Int32. Wrap them up into a better bundle so that only the lowest layer needs to deal directly with the UNO constants. Change-Id: I1edeab79fcc7817a4a97c933ef84ab7015bb849b Reviewed-on: https://gerrit.libreoffice.org/34582 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-16remove unused NONE from ScrollRangeCheck enumNoel Grandin
Change-Id: I9d83cc38a9fa477a61ec7e2ec3d9786318187085
2017-01-13new loplugin: useuniqueptr: editengNoel Grandin
Change-Id: I6df65eab882780d996ee996b5fef8020186b6d98 Reviewed-on: https://gerrit.libreoffice.org/32958 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-18includes should be at the top of the fileNoel Grandin
not randomly scattered through the code found with something like: git ls-files *.cpp | xargs grep -Pzl "(?s){.*#include" Change-Id: I9c242fa4ef99e8677f2800d7ec9f16d16e488351 Reviewed-on: https://gerrit.libreoffice.org/30952 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-09loplugin:expandablemethods in drawinglayer..editengNoel Grandin
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 Grandin
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-10-14LOK: Calc: fixed missed tile invalidations on cell text editingMarco Cecchetti
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>
2016-10-14LOK: Calc: missing invalidate when ending larger-than-cell edit textMarco Cecchetti
- reason: when text content goes further than the cell border the output area of the edit view is grown (extended to an adjacent cell), on the contrary the output area of edit views used only for invalidating windows of other view shells is never updated, so, in other views, only the tile where the edit cell is placed is invalidated; - solution: instead of adding fake edit views for invalidation porpuse (and having to updated the output area of each of them when required), the new solution provides each new edit view, created on cell editing, with a set of `foreign` windows related to other views, they are added and removed to this collection owned by an edit view still using the ScExtraEditViewManager, which has been in turn simplified; when EdiEngine::UpdateViews is invoked not only the window where the edit view lives is invalidated but also all `foreign` windows in the owned set; - note: ScTiledRenderingTest::testTextEditViewInvalidations unit test has been enhanced in order to test correct invalidation when text content goes out of the starting tile. Change-Id: Id223fb1a032d3b18d2cf70df31f704abd245b3ac Reviewed-on: https://gerrit.libreoffice.org/29625 Reviewed-by: Marco Cecchetti <mrcekets@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/29658
2016-09-13sw draw text: emit LOK_CALLBACK_TEXT_VIEW_SELECTION from registerCallback()Miklos Vajna
With this, in case the first view has an active text edit selection and a new view is created, then the text selection is instantly visible in the second view, even if the first view's text selection does not change later. Change-Id: I3255febd5d65d6576ddbc57cf96836bdf0b06a72
2016-09-13sw draw text: emit LOK_CALLBACK_INVALIDATE_VIEW_CURSOR from registerCallback()Miklos Vajna
With this, in case the first view has an active text edit and a new view is created, then the cursor position is instantly visible in the second view, even if the first view's cursor does not move later. Change-Id: Ia82e7dc1ce9bb58c67a280179ecadc74d3b63026
2016-08-25new loplugin: countusersofdefaultparamsNoel Grandin
Change-Id: I79e2c690f3e664c14af12cf763dd5a8ac20d6b04 Reviewed-on: https://gerrit.libreoffice.org/28353 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-02editeng: make SfxUndoAction::GetViewShellId() interface availableMiklos Vajna
Extend the existing OutlinerViewCallable interface to be able to obtain the view shell ID of a view shell, even from editeng. Change-Id: I13708b0e4f58ee86643b913c7d21de022a685223 Reviewed-on: https://gerrit.libreoffice.org/27788 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-20sd lok: decouple vcl window focus from cursor visibilityMiklos Vajna
The problem was the the blinking cursor was hidden when another vcl window got its focus, so it wasn't possible to edit two shape text in parallel in two windows. The code path is like this: - show cursor, cursor is created: SdrObjEditView::SdrBeginTextEdit() -> OutlinerView::ShowCursor() - show cursor, focus case: sd::FuText::Activate() -> OutlinerView::ShowCursor() - hide cursor, cursor is deleted: SdrObjEditView::SdrEndTextEdit() -> OutlinerView::HideCursor() - hide cursor, focus case: sd::FuText::Deactivate() -> OutlinerView::HideCursor() So add a new optional bool parameter that allows not emitting the LOK_CALLBACK_CURSOR_VISIBLE callback in the focus change case. Also, if we're at it, make sure that painting emits no show/cursor LOK callbacks. Change-Id: I1068a1b1f5cd76fd09b5a79066834bfb0daebc77 Reviewed-on: https://gerrit.libreoffice.org/27335 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-07loplugin:passstuffbyref also for {css::uno,rtl}::ReferenceStephan Bergmann
Change-Id: I5bb3c63790cb153c0d6f57a681ec6dda71d482be
2016-06-22Remove no longer needed ImpEditView::mpLibreOfficeKitSearchableMiklos Vajna
All clients has been ported to use ImpEditView::mpLibreOfficeKitViewCallable instead. Change-Id: I3a2513ac5900f801a2e7aec79807f4e333dfba3d Reviewed-on: https://gerrit.libreoffice.org/26561 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-10editeng: implement per-view LOK_CALLBACK_INVALIDATE_VISIBLE_CURSORMiklos Vajna
Given that the per-view callback is in SfxViewShell, and editeng doesn't depend on sfx2, add an interface class in editeng to invert the dependency. With this, gtktiledviewer no longer crashes when starting editeng text edit with per-view callbacks. Change-Id: I783cdc646b890a6b597000f1d88428c8042417cf Reviewed-on: https://gerrit.libreoffice.org/26169 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-04-11clang-tidy performance-unnecessary-value-param in editengNoel Grandin
Change-Id: Idfebcc36c756023e491baf2c4259bd580785dd44
2016-04-05loplugin:constantparam in editengNoel Grandin
Change-Id: If8342112e0657014266133954269b9396085a27d Reviewed-on: https://gerrit.libreoffice.org/23807 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-07loplugin:unuseddefaultparam in editengNoel Grandin
Change-Id: Ifd86b0f6cca5d5d30daeee1c087c0124f2f18f3c Reviewed-on: https://gerrit.libreoffice.org/22899 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-19editeng: remove never read mpLibreOfficeKitCallbackMiklos Vajna
As all callback invocations happen with SdrModel's callback pointer. Change-Id: I0111040c501b7927332f88cc4797b8ebab2bc57a
2016-01-22editeng: ImpEditView::mbTiledRendering is never readMiklos Vajna
Change-Id: Ie8e33d075f0cedbb9f7148717c4318f4494ed419
2016-01-14editeng: handle SdrModel::isTiledSearching()Miklos Vajna
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. Change-Id: I3b98011593b00ac0fab05b6b9c591dd20d94c579
2016-01-12loplugin:unusedmethods unused return value in include/editengNoel Grandin
Change-Id: I1314480950b0d3a3e5ed066d71c175604dd41970 Reviewed-on: https://gerrit.libreoffice.org/21361 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-12-18editeng: clean up no longer necessary isTiledRendering() member functionsMiklos Vajna
Change-Id: I4bf3e9bd9cbf2b32d79cebd5ba0a818b1f4970c2
2015-12-07Let LIBO_INTERNAL_ONLY imply LOK_USE_UNSTABLE_APIMiklos Vajna
Change-Id: Ifbed5e534ba79d32b7188bb7fb7108338b6e124d