Age | Commit message (Collapse) | Author |
|
The same change was made for getBookmarkFor()
in https://gerrit.libreoffice.org/c/core/+/145412
Because otherwise it's quite confusing
that we have a For() and an At()
which could only be differentiated by a code read.
Also improve getInnerFieldmarkFor() a tiny bit,
so we process the first hit only once.
Suggested at
<https://gerrit.libreoffice.org/c/core/+/145348/1#message-286262286f234823b390e8f962e3ba11f5fa71b2>.
Change-Id: I47e815eea0b8ac0df4957ac0d224acb6c5975b8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145486
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
|
|
Change-Id: I7a491038d1b8532385e70294872d209dcdc63ce9
Signed-off-by: Rasenkai <rasenkai99@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146300
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
|
|
Combine content controls with legacy formfield controls
in keyboard tab navigation.
MS Word (I tested 2010) is extremely irrational and inconsistent
in its behaviour, so I modeled my implementation on the specification
and general logic, and not at all on "compatible misbehaviour".
There is a third category of form control (activeX rich content),
but these are mapped to internal LO controls that are only exposed
at VCL level, and don't pass the keystrokes back to SW.
Plus, they are not inline, but fly controls.
However, it is still a TODO to handle these if reasonably possible.
Change-Id: I1fef34d05a779e9d4f549987238435acb6c043d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146219
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
When reaching the end of the form using keyboard navigation,
the next tabstop should return the user to the beginning of
the form.
This patch adds that to the existing legacy formfield navigation.
I'll wait with a unit test until I have added
activeX/contentControls into the mix.
Change-Id: I24a15a60f5a0a2721f512cca50397efddcbf7e4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146035
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
|
|
One additional complexity I missed is that there can be only one
innermost fieldmark for a position, but there can be multiple bookmarks,
because bookmarks don't have a starting dummy character.
See
<https://gerrit.libreoffice.org/c/core/+/145412/2#message-85a4780c8140038a9cc2bd4b9af64ecf97ee5e60>.
Change-Id: Ia5d3bebddd42be7c44b8df2d5db3c5312285a5f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145699
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Because otherwise it's quite confusing that we have a For() and an At()
variant as well, and it would be less clear what happens in For() when
there are multiple matches.
Also improve getInnerBookmarkFor() a tiny little, so we process the
first hit only once.
Suggested at
<https://gerrit.libreoffice.org/c/core/+/145348/1#message-286262286f234823b390e8f962e3ba11f5fa71b2>.
Change-Id: If068f93e6934c9fc042760c03aac866fe5b50bd2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145412
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
It was possible to get the names of all bookmarks, but you could not get
the name of the (innermost) bookmark under the current cursor.
Getting the name of the current bookmark is useful for Zotero: if we
already have a citation and want to insert one more, then we should turn
the current citation into a citation cluster.
Fix the problem by adding an API similar to what commit
bb20dee2ef1b0804065e1cda2c834d257fdd90ed (sw lok: expose field type &
command of fieldmark under cursor, 2023-01-05) did, but here we deal
with bookmarks, not fieldmarks.
Handle the actual bookmark lookup in MarkManager, such functionality
looks useful outside LOK as well.
Change-Id: Ic5b9b36fda243c5d7d360fa03745b3e121b67b06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145323
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
part of the process of hiding the internals of SwPosition
Change-Id: Id00dc63fd30ea9cf015b9d5f69ee8eb82dc52228
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138834
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
The dialog calls Replace on the whole bookmark, and with commit
7974cea6c788e02d7c36573e2d10dcc51884f70e the bookmark is preserved, so
the HasReadonlySel() should not prevent this replace from happening.
Change-Id: I823b042c8327c6716b2ac1a8a86beffd887e6e4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138693
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
instead of SwNodeIndex and SwContentIndex. Part of the process
of hiding the implementation of SwPosition.
Change-Id: I290fbc14d738d1bbf5d3f613eae6d114fc7cda17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138271
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
to help my poor brain with the different kinds of index we have floating
around
Change-Id: I47ed223922170687d7e07812445aed66b3218230
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137404
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
The problem is that SwXTextTableCursor::mergeRange() wants to move some
nodes, and the deleteMarks() deletes a fieldmark creating a SaveBookmark
but it contains the positions relative to the CH_TXT_ATR_FIELD* still in
the text, while deleting the fieldmark of course removes these.
The SaveBookmark would need to adjust the indexes and store the
separator position too and the vector would need to be restored in
reverse order.
But every time the SaveBookmarks are created, they are restored as well,
so it looks simpler to just suppress deleting the CH_TXT_ATR_FIELD* in
this case, and inserting them too (latter is already done when copying
text).
Change-Id: I690c6432a38eab6dec10adff74e638f0e52cca55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132531
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
That these are only flagged when building against libc++ and not against
libstdc++ is a consequence of the plugin's dependence on implementation details
of the relevant classes, but so be it.
Change-Id: I6b96f81939edab2b8e618aa53c9fe23492edfbbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131562
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Rename getDropDownsFor() to getNoTextFieldmarksIn().
Move some code so that sw::mark::ExpandFieldmark can expand all
fieldmarks that use CH_TXT_ATR_FORMELEMENT.
Change-Id: I8a1e28fc0ad77df3a749d9e55c306cb45187a082
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128606
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
Change-Id: Ia6ed82b67a412841e1559f385afec17da3852d7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116399
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Not deleted annotation windows got a bad strikethrough
in ChangesInMargin mode, if they annotate tracked
deletions.
Also clean-up commit a001a66ba27e2fe9a485388869d53f001f2b09af
(tdf#140982 sw ChangesInMargin: fix annotation ranges).
Change-Id: I06cb88113bf038c09702b6ef33e46c94c963730d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112672
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
Annotation ranges of tracked deletions collapsed in
ChangesInMargin mode (as before saving the document,
see commit d325cd0c69b7c0cc4f47105749a98995de81cc9d
"tdf#115815 sw: fix lost annotation ranges of redlines").
Change-Id: I413804cfcdf972f054b65e28e6265c30d25731e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112644
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
Annotations of tracked deletions lost their ranges
during ODF export, according to the limitation of
ODF or its recent implementation. As a workaround,
save and restore the start of the annotation ranges
using temporary bookmarks (which can be part of
text:deletion).
Note: maybe it's possible to split redline ranges
regarding to the start of the annotation ranges,
mixing tracked deletions with normal text or
tracked insertions, but this would be a not backward
compatible solution, because the ODF import of this
file inserts extra (not tracked) spaces around the
annotation, losing the original text content.
Change-Id: I786993a05ee1683076e213374a92969d1856cf8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111489
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
* Implement text::XTextField in SwXFieldmark
* That requires overriding XTextContent, just forward to SwXBookmark
* Also override XServiceInfo implementation in SwXFieldmark
* Add a PropertySetInfo for SwXFieldmark, which doesn't support "Hidden"
or "Condition" properties of SwXBookmark
* in SwXFieldmark::setFieldType(), only allow sensible new types
* fix DomainMapper_Impl assumptions that if it implements XTextField
it can't be a fieldmark, which caused CppunitTest_sw_ooxmlexport10
testTdf92157 to fail with a SAXException caused by some disposed
SwXTextCursor
Change-Id: I1ae2e9cb99ea784040874517e4d1af7e59d24405
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105083
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
Change-Id: Ie2c3e3f95a687b12b89bcfc5cad44fb7a1d4568f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93862
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
SwPaM::HasReadonlySel() checks PROTECT_BOOKMARKS / PROTECT_FIELDS
setting and checks if bookmarks or fields are selected for deletion.
This should already be called by the UI code in all the right places,
for the other content protection features, and cause a dialog to pop
up.
What's not ideal about this is that it's impossible to delete a
character immediately before or after a point bookmark because that
would delete the point bookmark too.
The bookmark check is done by extracting a function out of
MarkManager::deleteMarks() so both will use the same logic.
The problem of DelContentIndex() duplicating that logic remains...
Apparently the status bar at the bottom already displays "read-only"
for such a selection.
Change-Id: Id87999198a03ba847ef0eff5651fef3bd2517fae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87778
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
Change-Id: I6dbb7a36bdca103d6e9e72a5b5b48ffc135080a1
Reviewed-on: https://gerrit.libreoffice.org/80676
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
Different callers want it at the end, at the start, or in the case of
Undo it can even be in an arbitrary position... (except if it is ensured
that the field command is deleted before the fieldmark?).
So let's just pass in SwPosition and be flexible, if it is missing it
will be before the end as before.
Change-Id: Ibec222f633bdaf66abd1540027d0f5c75988c738
Reviewed-on: https://gerrit.libreoffice.org/80673
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
... and use it where the mark for a given CH_TXT_ATR_FIELD* is
retrieved.
Change-Id: Id58ac2967ab66be8a07586ef31cfe9e18a5f073d
Reviewed-on: https://gerrit.libreoffice.org/80050
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
idea from mike kaganski
look for places where we can mark move operators as noexcept, which
makes some STL operations more efficient
Change-Id: Id732b89d1fcadd5ceb0ea2b9d159fed06136330f
Reviewed-on: https://gerrit.libreoffice.org/78251
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie2285f64919d1c83b0a8df4ceb827f731e5cd609
Reviewed-on: https://gerrit.libreoffice.org/75739
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
* Better to represent it similar to text form field with two
marking characters selecting a text range
* So the text between the two marks can be anything (not only
a well formatted date) and also have any character formatting.
* With this we handle the case when the user needs a placeholder
text in the date field or when the user needs time values (hour,
minute, sec) next to the date.
Change-Id: Id60a50a2028058f8a6a080e265c0730d88b98543
Reviewed-on: https://gerrit.libreoffice.org/75459
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
|
|
Change-Id: I3df49c516603fb16601fc0a9c13c6d9ea401207a
Reviewed-on: https://gerrit.libreoffice.org/75437
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
|
|
Change-Id: I9f92c0d2bc058e65574ffc5cc0e9a61764f86db5
Reviewed-on: https://gerrit.libreoffice.org/75051
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Forward port of https://gerrit.libreoffice.org/#/c/74851/
and much smaller because the shared_ptr has been removed in commit
9ff648c691f003a11eba9a22ac37032d72b4b642
The MarkManager always has MarkBase instances in its vectors, so
abstract the vector better in the IDocumentMarkAccess interface by
exposing only a wrapper iterator that converts from MarkBase to
IMark.
There is an unexpected pitfall here in that forward iterator's
operator* is required to return a reference, but at least for a
const_iterator it appears to work to just return a value instead.
The dynamic_cast of every element in some MarkManager functions is
quite expensive and shows as 10-15% in callgrind.
In bubli's measurements, in the 6.1 branch this speeds up loading the
bugdoc by ~40s of the initial 3min 50s.
Change-Id: I65d974bea0301bf7b4cfa25ad6daae10b6768202
Reviewed-on: https://gerrit.libreoffice.org/75033
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
|
|
Takes load time from 22s to 15.5s
sw::mark::IMark does not need to be held by shared_ptr - we have one
vector, which holds all marks we created, and when we remove from that
vector, which remove the other references too.
Change-Id: Ie6d287d9d825f7129855b64a34afa81a2ef9c378
Reviewed-on: https://gerrit.libreoffice.org/73206
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
to make followup improvements easier
Change-Id: I2b0ab30589bc19a3e6c80228ab037745c7781292
Reviewed-on: https://gerrit.libreoffice.org/72978
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
* Introduce a editing frame with a button for drop-down form field.
** The frame is mouse transparent.
** Pushing the button opens the popup window with the items of the field.
* The button is visible when the cursor is inside the field.
Change-Id: I5c7db138d14380899fee046c95a5afe14cfea213
Reviewed-on: https://gerrit.libreoffice.org/68961
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
|
|
* It was weird anyway that a drop-down form field was represented
as an CheckboxFieldmark.
* It will be useful for later commits, to have a separate field type
for drop-down field.
* Needed to fix-up the API a bit because it was designed to specify
the field type after initialization. I solved it in a way to not break
the API behavior. Hopefully it's not very slow.
Change-Id: I3103e6b1c36289b27b62ab9ca7dfeebc14901c8a
Reviewed-on: https://gerrit.libreoffice.org/68960
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
|
|
Need to handle undo / redo explicitely for form fields, because
there is no a general working undo / redo mechanism for fieldmarks.
During the insertion of the fieldmark, text insertion also happens which
generates an interfering undo action, so we need to disable undoing
temporary.
Also need to invalidta SID_UNDO slot to make the undo toolbar item updated
after we insert a form field.
Change-Id: I358c2704cb30212a38f8a998888a36f72fa404e5
Reviewed-on: https://gerrit.libreoffice.org/68956
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
|
|
Change-Id: Ifc3c4c31a31ee7189eeab6f1af30b94d64f2f92a
|
|
Aha, now we know that the reason for the defensive programming
in lcl_AssureFieldMarksSet() was that there are actually 2
different use-cases for it: usually a new mark is inserted,
so there are no dummy characters and they must be inserted.
However when copying text, the dummy characters are copied too,
so they must not be inserted, or we get duplicate fieldmarks.
This also reverts commit d4036d3a89b65a4912f62e3930eb1a31cd90a16b
which fixed the problem only for CHECKBOX_FIELDMARK in a
different way.
(regression from bb069fe7b8b6a24f9ff4df4c7052961e17ea3a8c)
Change-Id: I3c99b8c6d720951655198e682018794337859373
|
|
This patch was created using a script
Variable name textual alignment is preserved to the same level
Change-Id: I6b4858f8059b8cf71fc253e87d6df634362d62e9
Reviewed-on: https://gerrit.libreoffice.org/26306
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
7c3c3006deaaaf1bb3f2f4eeeaf11da3bcebe53c is apparently worse than it
appeared at first glance since there are numerous assumptions about
bookmarks, such as that if they were inserted successfully they may be
copied successfully, which isn't the case for duplicate cross reference
bookmarks.
So fix this differently, by eliminating the duplicates and mapping all
reference fields to refer to the surviving bookmark.
It was not possible to do this in SwXBookmark by checking the makeMark()
return as that would raise interesting problems such as it's currently
guaranteed to have 1:1 SwXBoomarks to core Marks so we can't just
connect 2 SwXBookmarks to the same core Mark, and we also can't leave
the SwXBookmark unconnected after attach.
Another alternative would be to temporarily allow inserting the
duplicate bookmarks and then eliminate them after the import, but what
is implemented now is to check from xmloff for duplicates, which is
reasonably simple.
Change-Id: I7ee4854d1c9d8bf74201089cbb7287b1bd8ee3b9
|
|
... in ODF import, so that reference fields do not break that reference
numbering cross reference bookmarks that were corrupted by commit
679faffc68bb854af0f55d0f218698e2f372f00b.
This used to work by accident before commit
9d0c51daea67104349cac26de9839afa8baeb099 fixed it to actually check for
duplicates properly.
Change-Id: I5ed58eda7f3f2ce470a778852f6dda7a14356860
|
|
Change-Id: Idfbcfa1e5ba7bff92e98693c33c4b33a6beda08f
|
|
renames the most annoying abbreviations in Writer (and partially
in the shared code too).
Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
|
|
Change-Id: I73c23d327104b377834013a0a6bd2de18de2900b
|
|
Change-Id: I5e7b5327b542f610efb0960b8bcfad10e04025b5
|
|
Change-Id: I68654a5fa4cbb7403c00b103e2be5929ccb516a2
|
|
In case the user double-clicks on a word and exactly that word is
commented, then we used to select only the word, but not its comment
anchor character. So when the user deleted the selection, the comment
left there.
It is still possible to manually select only the word, but on
double-click let's just select the comment anchor as well, so a simple
double-click on the commented word will remove the comment as well.
Change-Id: I7322af61c31e8aba108eef5596849d17d55fc7eb
|
|
Put the VCL KeyCode class in the vcl namespace. Avoids clash with the X11
KeyCode typedef.
Change-Id: I624c9d937f7c5f5986d313b6c5f060bd8bb7e028
|
|
(cherry picked from commit f73412f09ca8a34bb7ec73370dae3e6033c0c581)
Conflicts:
sw/inc/IDocumentMarkAccess.hxx
sw/source/core/doc/docbm.cxx
sw/source/core/doc/docdde.cxx
sw/source/core/inc/MarkManager.hxx
Change-Id: I8aa3a0a3362de63fec9cd640ffde89d5f7f57417
|
|
Change-Id: I04b970a58b5d138b89f4eb331b3f53ebcb55236a
|
|
to dropdowns to be on the safe side for now anyway.
Change-Id: I88a73fe37b39306c6b24226e3b02c702d992ecb0
|