summaryrefslogtreecommitdiff
path: root/sw/inc/crsrsh.hxx
AgeCommit message (Collapse)Author
2022-07-26sal_uLong->sal_Int32 in the Find/Search methodsNoel Grandin
we cast this to sal_Int32 once it hits the UNO methods anyway Change-Id: I8d18330929acbb5b2f40d9b0fd0f49e087be867e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137483 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-26convert CRSR_SKIP_* to typed enumNoel Grandin
Change-Id: Ia5cb9915fc7ad3238f4386f5ed3e43efc4b74a32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137478 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-15sw content control, dropdown: allow selecting via the keyboardMiklos Vajna
It was not possible to select an entry from a content control dropdown using the keyboard, which breaks accessibility. This had the benefit that the mouse handler code could contain the popup start calls, but Word can do this with alt-down arrow, so make sense to add it on our side as well. Fix the problem by adding SwContentControl::ShouldOpenPopup(), which knows that dropdowns want a popup with alt-down, and then connecting SwEditWin::KeyInput() to it. Date content controls probably will want something similar, but that's not yet done in this commit. Change-Id: I6853d3a1661e4d826b96b1b5cb938909875af2ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137102 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-12sw content controls: fixes for the ending dummy charMiklos Vajna
- make sure the DOC/RTF export doesn't write the dummy char as-is - let "enter" only insert a linebreak while inside a content control, to ensure that the starting and ending dummy char stays inside the same text node - let deletion of the dummy character at the end behave the same as the start dummy character: if trying to delete that single character, then just move the cursor, don't delete it - reject document insertion in the middle of a content control, similar to input fields Change-Id: I9b54ef50261e6b17f38eadadacfe1e1111199e96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134239 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-04-07sw content controls: select the content on click when showing placeholderMiklos Vajna
- teach SwCursorShell::GetContentAtPos() about a new IsAttrAtPos::ContentControl - add a new SwCursorShell::GotoFormatContentControl() to select a content control, and a SwWrtShell::GotoContentControl() wrapper around it - combine these together in SwEditWin::MouseButtonUp() The intention is that when you open a document and you click on a placeholder text like "Click here to enter text", then this content is pre-selected (so typing overwrites it), but typing real content there disables this behavior. Change-Id: Ia539865da7b18c41cbfb398282842bdb2e25f0bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132652 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-03-07sw_redlinehide: more issues with SwEditWin Surrounding functionsMichael Stahl
.. and SwEditWinUIObject. These need to work with TextFrameIndex. Add some functions to SwCursorShell to make it possible. Change-Id: I884c4822a0e7ecf254ea09a893762e1e6d539534 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131042 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-12-09tdf#146144 sw: add tooltip to table rows with change trackingLászló Németh
Showing "Row Deleted" and "Row Inserted" with Author and Date (of the associated SwRangeRedline: latest tracked deletion in deleted rows, and first tracked insertion in inserted rows). Follow-up to commit c6af542a31e167e5a01908d049e399ce06a5e4e4 "tdf#146120 sw: show tracked table changes with different color" and Change-Id: I913e234de1a60311306fbebdfb1ae16dcea7cd8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126575 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-10-21introduce SwNodeOffset strong typedefNoel Grandin
for indexing into node children. Replaces various usage of sal_uLong, tools::Long, sal_uInt32 with an underlying type of sal_Int32. Also add a NODE_OFFSET_MAX constant to replace usage of ULONG_MAX Change-Id: I2f466922e1ebc19029bb2883d2b29aa4c0614170 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123892 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-04tdf#144788 SwNavigator: Add footnotes and endnotes to content treeJim Raykowski
This patch introduces lcl_SelectByContentTypeAndAddress function which is useful for content types that can have non unique string entries which can be selected incorrectly by use of the lcl_SelectByContentTypeAndName function. Although footnotes and endnotes names are always unique, lcl_SelectByContentTypeAndAddress is used here in preference of lcl_SelectByContentTypeAndName. Change-Id: Ia118f717f72877cddb932ef19f6d155a7227845d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122970 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-09-24return SwCursor from IShellCursorSupplierNoel Grandin
rather than casting it Change-Id: Ia950f521c8f73d8a0da59344db9b5aacb727aca8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122576 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-20clean up ambiguous confusing rectangle APIs like IsInside()Luboš Luňák
Reading 'rectA.IsInside( rectB )' kind of suggests that the code checks whether 'rectA is inside rectB', but it's actually the other way around. Rename IsInside() -> Contains(), IsOver() -> Overlaps(), which should make it clear which way the logic goes. Change-Id: I9347450fe7dc34c96df6d636a4e3e660de1801ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122271 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
2021-06-11loplugin:unnecessaryreturn in sw/Noel Grandin
Change-Id: Iaca3f5385fd2c763cd1121ae50624aaa4a1f6165 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117029 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-05tdf#93441: Revert "Fix fdo#38884 Improve Up/Down movement in writer"Xisco Fauli
This reverts commit d58bea0ffa2a2fe79103ab7aa743aea63e27a0fd it's really unclear to me what the original commit tries to fix. https://bugs.documentfoundation.org/show_bug.cgi?id=38884#c6 gives some information but the behaviour described there is the same with or without the commit applied. The discussion in https://gerrit.libreoffice.org/c/core/+/11500 doesn't give much information either. Change-Id: Iadd8cb6e869fd26654bb0301fbc30ea4f2d39fdf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111932 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-17SwGrfNode: Remove graphic arrived hackBjoern Michaelsen
Change-Id: Ib8fb5b223a1b3cc05a75ecfcc7c763bbb3928fae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105965 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-05Ensure no class directly derives from SwModifyBjoern Michaelsen
- make all classes that used to be SwModify to be sw::BroadcastingModify's - this makes sure they are all sw::BroadcastMixin too, so all clients of SwModify can be migrated over to use sw::BroadcastMixin (only) instead Change-Id: Idd217b98f9c20f01e0788bc65af796050dbb5699 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105207 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-10-20use tools::Long in swNoel
Change-Id: I44be72b3a9b14823ec37a3c799cffb4fb4d6e1de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-20tdf#132366 Writer enhancement that highlights search resultsJim Raykowski
This enhancement selects outline headings in the Writer Navigator content tree according to 'Find All' search results. It does this when the content navigation view is set to show headings content only. Change-Id: I77dabcdd38c8877b7f8a177689da094638d5fe00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92886 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2020-05-09compact namespace in swNoel Grandin
Change-Id: Ie2c3e3f95a687b12b89bcfc5cad44fb7a1d4568f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93862 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-21Drop o3tl::optional wrapperStephan Bergmann
...now that macOS builds are guaranteed to have std::optional since 358146bbbd1b9775c12770fb5e497b6ec5adfc51 "Bump macOS build baseline to Xcode 11.3 and macOS 10.14.4". The change is done mostly mechanically with > for i in $(git grep -Fl optional); do > sed -i -e 's:<o3tl/optional\.hxx>\|\"o3tl/optional\.hxx\":<optional>:' \ > -e 's/\<o3tl::optional\>/std::optional/g' \ > -e 's/\<o3tl::make_optional\>/std::make_optional/g' "$i" > done > for i in $(git grep -Flw o3tl::nullopt); do > sed -i -e 's/\<o3tl::nullopt\>/std::nullopt/g' "$i" > done (though that causes some of the resulting #include <optional> to appear at different places relative to other includes than if they had been added manually), plus a few manual modifications: * adapt bin/find-unneeded-includes * adapt desktop/IwyuFilter_desktop.yaml * remove include/o3tl/optional.hxx * quote resulting "<"/">" as "&lt;"/"&gt;" in officecfg/registry/cppheader.xsl * and then solenv/clang-format/reformat-formatted-files Change-Id: I68833d9f7945e57aa2bc703349cbc5a56b342273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89165 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-04rename GetCursorOfst -> GetModelPositionForViewPointNoel Grandin
Change-Id: Ia7202e009f635032178e5467a1ac0ab43f82ccf2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87953 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins
2020-02-01tdf#128814 Navigator content context menu relatedJim Raykowski
Adds Select menu item to Chapter, Table, and Section content context menus to make document selection of content. Document selection made for collapsed chapters includes all sub chapters. Multi chapter selections can be made from the headings content navigation view. Reworks chapter delete to follow chapter selection behavior. Adds accelerator keys to context menu items Delete and Chapter/Level Promote/Demote. Makes chapter delete undo/redo entries show as 'Delete chapter' or 'Delete chapters' depending on single or multiselected chapter delete. Renames 'Select Chapter' and 'Delete Chapter' menu items to 'Select' and 'Delete'. Reworks an assert so as not to assert fail when delete key is pressed on content type entry Change-Id: I68c725bbf5c6d561615cf10a0a75d4284b698ace Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87168 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2019-12-01Introduce o3tl::optional as an alias for std::optionalStephan Bergmann
...with a boost::optional fallback for Xcode < 10 (as std::optional is only available starting with Xcode 10 according to <https://en.cppreference.com/w/cpp/compiler_support>, and our baseline for iOS and macOS is still Xcode 9.3 according to README.md). And mechanically rewrite all code to use o3tl::optional instead of boost::optional. One immediate benefit is that disabling -Wmaybe-uninitialized for GCC as per fed7c3deb3f4ec81f78967c2d7f3c4554398cb9d "Slience bogus -Werror=maybe-uninitialized" should no longer be necessary (and whose check happened to no longer trigger for GCC 10 trunk, even though that compiler would still emit bogus -Wmaybe-uninitialized for uses of boost::optional under --enable-optimized, which made me ponder whether this switch from boost::optional to std::optional would be a useful thing to do; I keep that configure.ac check for now, though, and will only remove it in a follow up commit). Another longer-term benefit is that the code is now already in good shape for an eventual switch to std::optional (a switch we would have done anyway once we no longer need to support Xcode < 10). Only desktop/qa/desktop_lib/test_desktop_lib.cxx heavily uses boost::property_tree::ptree::get_child_optional returning boost::optional, so let it keep using boost::optional for now. After a number of preceding commits have paved the way for this change, this commit is completely mechanical, done with > git ls-files -z | grep -vz -e '^bin/find-unneeded-includes$' -e '^configure.ac$' -e '^desktop/qa/desktop_lib/test_desktop_lib.cxx$' -e '^dictionaries$' -e '^external/' -e '^helpcontent2$' -e '^include/IwyuFilter_include.yaml$' -e '^sc/IwyuFilter_sc.yaml$' -e '^solenv/gdb/boost/optional.py$' -e '^solenv/vs/LibreOffice.natvis$' -e '^translations$' -e '\.svg$' | xargs -0 sed -i -E -e 's|\<boost(/optional)?/optional\.hpp\>|o3tl/optional.hxx|g' -e 's/\<boost(\s*)::(\s*)(make_)?optional\>/o3tl\1::\2\3optional/g' -e 's/\<boost(\s*)::(\s*)none\>/o3tl\1::\2nullopt/g' (before committing include/o3tl/optional.hxx, and relying on some GNU features). It excludes some files where mention of boost::optional et al should apparently not be changed (and the sub-repo directory stubs). It turned out that all uses of boost::none across the code base were in combination with boost::optional, so had all to be rewritten as o3tl::nullopt. Change-Id: Ibfd9f4b3d5a8aee6e6eed310b988c4e5ffd8b11b Reviewed-on: https://gerrit.libreoffice.org/84128 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-05tdf#127759 Writer: add table row/column insert modeLászló Németh
using enhanced table selection. When the table rows or columns are selected by enhanced table selection, ie. clicking in front of them, next Cut operation cuts the selected rows or columns completely without leaving empty cells. Pasting them results insertion before the actual row/column instead of overwriting the actual and the next rows/columns. This greatly speeds up moving table rows and columns, like in MSO. Change-Id: I6d82ca8aad4888ab37bdb9a89d37102763fcd6c6 Reviewed-on: https://gerrit.libreoffice.org/81503 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-10-11SwCursorShell argument of AttrChangedNotify is unusedCaolán McNamara
Change-Id: I1fde665dcb77d29cad7f6a5c12e82c1822cff022 Reviewed-on: https://gerrit.libreoffice.org/80621 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-09-28loplugin:constmethod in swNoel Grandin
Change-Id: I73c3c6d2165287d2d581a04b23b1d3b48166a488 Reviewed-on: https://gerrit.libreoffice.org/79780 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-17tdf#105330 sw: fix lost cursor on undoing nested table insertMiklos Vajna
This is a regression from commit e4509eea8fc7c07ddff48edf0d4c015c2663d896 (n#751313 SwCallLink: avoid redrawing complete rows without nested tables, 2012-04-20), though manual testing shows that the underlying problem has been addressed in the meantime, so this can be reverted. Over time, some poor tests started to depend on the new behavior so adapt them as necessary: 1) Change back test added in commit 075fc0c0a34875adf2833e5933b4982b9443a373 (testcase for fdo#38414, 2014-03-18) to its original form, that was changed to an export test in commit 086550313260d9fa45b91dc705b21bb9b51ce0b8 (move round-tripables to ooxmlexport, 2016-10-07), as the export of that document still results in data loss of cell content, just happened to pass so far. 2) Explicitly calculate content of text frames in two more tests, which just hoped that by the time they assert, the layout is ready already (but now that the missing notification is restored, it happens that the first pass of the layout doesn't create them; only a later pass, invoked by Idle, which doesn't run during cppunit tests). Change-Id: Ie13d17266cd552f3850848ae980bcfe8776997ac Reviewed-on: https://gerrit.libreoffice.org/79026 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-08-15tdf#122529 lok - table border position manipulationTomaž Vajngerl
This adds a new LOK callback (LOK_CALLBACK_TABLE_SELECTED) that sends the border positions to the client when the user has the cursor or slelection in a table. In addition this adds a .uno:TableChangeCurrentBorderPosition uno command, which implements changing a specific border in the current table. Border can be either a column or a row border, which is either at the first, middle or last position. Change-Id: Ife7cff14d91ffc84c95c040f0b42319e3d6194b4 Reviewed-on: https://gerrit.libreoffice.org/77365 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-08-12Fix typosAndrea Gelmini
Change-Id: Ib6b4f091e56e047968b2ad9b575aff2c81558635 Reviewed-on: https://gerrit.libreoffice.org/77254 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-11Rework tdf#115600 Display not found message for Navigate by SelectionJim Raykowski
Fixes not found message being displayed in find bar when a header or footer is deleted and other uses of SwCursorShell::GoNextCursor and SwCursorShell::GoPrevCursor when SwCursorShell::m_pCurrentCursor is not multi selection. Change-Id: Ie71d39e51b05363ad33ba2f912ac36273c38b8b4 Reviewed-on: https://gerrit.libreoffice.org/75386 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-08tdf#123968 sw: use inline editing for input fields for variablesMichael Stahl
* set these to RES_TXTATR_INPUTFIELD so they get a SwTextInputField * only for string fields, the numeric ones break when editing * SwCursorShell::CursorInsideInputField() must check type of the hint, not type of the field * DocumentFieldsManager::UpdateExpFieldsImpl() is called with one field when it is inserted, and must expand the field into the SwTextNode then, and it's called when the user edits inside the field, and must *not* expand the field into the SwTextNode then * SwDocUpdateField::MakeFieldList_() must iterate RES_TXTATR_INPUTFIELD * SwEditWin::MouseButtonDown() must still pop up the edit dialog on double-click * SetFieldsDirty() should check RES_TXTATR_INPUTFIELD because SwGetExp may depend on them * a very odd API design: SwSetExpField::PutValue() allows to change the "InputFlag", which is actually used by the ODF import! This needs some alchemy to convert between SwTextField and SwTextInputField hints, see SwXTextField::TransmuteLeadToInputField(). * etc. Change-Id: I45c471703f102ebcb04b8567f9d76c17d5a063e7 Co-authored-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Reviewed-on: https://gerrit.libreoffice.org/69414 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-03-16pahole changes in variousNoel Grandin
I'm not seeing as much as I would expect here, mostly because pahole seems to be having trouble parsing quite a few of our structures, and consequently producing useless data than I then ignore. XDash 24bytes -> 20bytes vcl::font::FeatureDefinition 64bytes -> 56bytes SvXMLTokenMapEntry 16bytes -> 12bytes SvXMLItemMapEntry 16bytes -> 12bytes SwContentAtPos 40bytes -> 32bytes Change-Id: I74c8b93f74b8352f48ef552d7d4239aa7f4237d4 Reviewed-on: https://gerrit.libreoffice.org/69304 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-09MSForms: Update cursor position after the drop down form field was changedTamás Zolnai
Change-Id: I0e9e8a0e9212cdf539caa163f9071bc2f21e4c9f Reviewed-on: https://gerrit.libreoffice.org/68959 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-03-05re-land "new loplugin typedefparam""Noel Grandin
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-04Revert "new loplugin typedefparam"Noel Grandin
This reverts commit 9865440d217d975206a3f91612f0666312bc8fd8. This is not ready to land yet, seems like the latest update of the logic reveals a bunch more places I need to fix before it can land.
2019-03-04new loplugin typedefparamNoel Grandin
verify that parameters use the exact same typedef-names (if any) in definition and declaration Change-Id: I55d2817f599b0253904dce2d35a1a93967e15a77 Reviewed-on: https://gerrit.libreoffice.org/68439 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-28use the xmlTextWriterPtr typedef consistentlyNoel Grandin
this is the single biggest chunk of stuff my upcoming paramtypedef loplugin will warn about, so do it separately Change-Id: I412e69e76406d6d947101885d4cd92c65e021508 Reviewed-on: https://gerrit.libreoffice.org/68486 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-22sw btlr writing mode shell: fix up/down cursor travellingMiklos Vajna
By teaching SwEditWin::KeyInput() about 2 vertical modes: the existing tbrl one and the new btlr one. Up now correctly goes to the next character and down to the previous one. Change-Id: I71faebe62e5fa3892b37e8bea6c15d1fb84df5d1 Reviewed-on: https://gerrit.libreoffice.org/68183 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2018-12-22use boost::optional for OUStringNoel Grandin
instead of storing on heap Change-Id: I4ca2bb58ec4f71b161c9e6081f5e456de54d8153 Reviewed-on: https://gerrit.libreoffice.org/65537 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-18sw_redlinehide_4b: FindText() adapt the replace part as wellMichael Stahl
When redlining is enabled, the result will be a delete redline for the existing text, and an insert redline for the new text; that much is obious (and ReplaceRange can deal with a selection larger than one SwTextNode easily, since it mostly adds redlines). For the case when redlining is disabled, there are 2 options, and i don't really know which is preferrable from UX point of view: One approach is to reuse GetRanges() to ignore delete redlines in the replace range; move its declaration to different header. Another approach is to DeleteAndJoin() the existing delete redlines, which is the same as the previous model based Hide mode, which calls DeleteRedline() to remove the hidden redlines. Also change ChgAutoCorrWord() to call DeleteSelImpl() directly. Change-Id: I5974409d09eb39e04cc0b5dfc20d4db510e1cf58
2018-12-18sw: refactor a confusing thicket of overloads, all named Find()Michael Stahl
Also, some of these don't really make much sense as member functions of SwPaM, so make them plain functions instead. Also, some pointer parameters are never null, but there is code to handle that case in MakeRegion(); simplify that. Change-Id: I822e814b0cab14f7f31cfa33478ed15774405a61
2018-09-19sw_redlinehide_2: view cursor: IsSelOnePara(),IsStartPara(),IsEndPara()Michael Stahl
Change-Id: Idb7bdc139e501dfbd7e7d3b2d4598d211fa11591
2018-09-19sw_redlinehide_2: remove GetTextUntilEndOfNode()Michael Stahl
This is pretty silly, the only caller is actually interested in the position of the cursor, not any text at all. Change-Id: Ibf016d5526e18775c0e6e365b9823723267e76d5
2018-09-19sw_redlinehide_2: rename SwCursorShell::GetText()Michael Stahl
It's really not obvious *what* you can get here. Change-Id: I1f14b851a127847206f8eb5fd2da778d0acece9b
2018-09-19sw_redlinehide_2: view cursor movement, Word/Sentence functionsMichael Stahl
E.g. Ctrl+Left/Right, Ctrl+Shift+Del/Backspace, double-click to select word... These are all implemented in SwCursor, so they need a layout passed to them from the SwViewShell. There was a bug in the while loop in SwCursor::GoSentence() case NEXT_SENT that triggered assert in the mapping code when the endOfSentence() returned the length of the SwTextNode but then it was incremented once more. Change-Id: Ic3866860a8c07774dce35952271c207eb6e7d182
2018-08-29loplugin:constantparam (3)Noel Grandin
Change-Id: Ifc47bb8e096c9a8563021b2fcb44199577740746 Reviewed-on: https://gerrit.libreoffice.org/59747 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-06tdf#101856 create bookmarks w/ new hidden/cond attrs, save as odtBernhard Widl
Committer's note: this is forward ported from 5.2+backports branch, with numerous conflicts. tdf#101856 add new checkbox/editfield for hidden/condition attrs Conflicts: sw/uiconfig/swriter/ui/insertbookmark.ui Author: Bernhard Widl <bernhard.widl@cib.de> (cherry picked from commit c347e00821791377731ab32acd103ea006f3cc1b) tdf#101856 Fix crash in Insert Bookmark dialog Author: Serge Krot <Serge.Krot@cib.de> Reviewed-on: https://gerrit.libreoffice.org/50616 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit bcc16920eec647f2a3753d60c4d969862f272942) Change-Id: Ib1df7a4c1477693aa2d0ec067635cdcbd393cebd Reviewed-on: https://gerrit.libreoffice.org/46820 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-06-13tdf#116537: use page #s excluding empty pages when they are ignoredMike Kaganski
Since commit 3c1a343f6936f1dcefdf79a677f8c26ce29676e6, SwDoc::CalculatePagesForPrinting expects that PageRange contains page numbers that don't include empty pages' numbers, when the org.openoffice.Office.Writer/Print/EmptyPages is false. Change-Id: I4057d6e36765707affbd5f3a4507ae03f4a27171 Reviewed-on: https://gerrit.libreoffice.org/55756 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-04-28loplugin:countusersofdefaultparamsNoel Grandin
Change-Id: I84868b3115c534a8240394283cc3beedf8cb3a80 Reviewed-on: https://gerrit.libreoffice.org/53543 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-25sw: fix remaining IWYU warnings in inc/*.hxxMiklos Vajna
Also check for not needed forward declarations. Change-Id: I92759f3f40d9458fd192665b39b87a78d8b97e5a Reviewed-on: https://gerrit.libreoffice.org/53418 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>