Age | Commit message (Collapse) | Author |
|
This commit enables exporting the following STYLEREF flags with OOXML
- Search from bottom to top
- Hide non numerical
After this commit, the following steps have been implemented
- The document model (I7d8f455ffe90cface4f3b1acf6b9bef6a045ed19)
- The layout (I7d8f455ffe90cface4f3b1acf6b9bef6a045ed19)
- The UI (I7d8f455ffe90cface4f3b1acf6b9bef6a045ed19)
- UNO
- DOCX filter
Change-Id: Ib664fec059aa1f7f130acc76c253d5d298fa59f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158350
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
If a paragraph is using the "Block Quotation" paragraph style,
report the newly introduced BLOCK_QUOTE a11y role for it instead
of the PARAGRAPH role.
This is similar to how the HEADING role is reported when
one of the paragraph styles for headings is used
(s. `SwAccessibleParagraph::GetRealHeadingLevel`).
This is also in line with what is documented for mapping
LO elements to tagged PDF elements in
sw/inc/EnhancedPDFExportHelper.hxx:
> * Mapping of OOo elements to tagged pdf elements:
> *
> * OOo element tagged pdf element
> * ----------- ------------------
> * [...]
> * SwFormat Quotations BlockQuote
This makes the Orca screen reader with the gtk3 VCL plugin on Linux
and the NVDA screen reader on Windows explicitly announce a paragraph
as block quote when moving there with the cursor.
Adapt some places that have specific handling for the
PARAGRAPH role to take into account the BLOCK_QUOTE
role as well.
Change-Id: I4a89625c2a3f07d37df09e68cb7045a59cfff633
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158574
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
STYLEREF is a field type in Word which changes its content based on
nearby paragraphs. For example, upon creating a styleref referencing
"Heading 1" you will see the text of the nearest "Heading 1"-styled
paragraph that is above the field.
This patch implements STYLEREF in Writer as a cross-reference. By using
"insert>cross-reference>styles" you'll be presented with a list of
styles. Selecting one and clicking "insert" will create a field which
has text from the "most relevant" instance of the style. To find the
most relevant instance we first search up for paragraphs with the style,
and if there are any we take the closest. If there weren't any, we
search down for paragraphs with the style.
This patch also updates our use of STYLEREF for chapters exported to
docx by using it for all chapters not only those in headers and footers.
This allows us to approximate more chapter field functionality even when
moving between Writer and Word.
Finally, this patch adds some tests for STYLEREF:
- testTdf86790 tests that the "sample file with STYLEREF" document from
tdf#86790 has the correct fields
- testStyleRefSearchUp tests that the STYLEREF searches up when there
are bits of text both above and below it
- testStyleRefSearchDown tests that the STYLEREF searches down when
there are bits of text below it only
- testMarginalStyleRef tests that the STYLEREF searches from the page
top when it is placed in a footer
- testFootnotetyleRef tests that the STYLEREF searches from the
reference mark when it is placed in a footnote
Still TODO:
- [ ] Update documentation
- [ ] Implement reverse-searching (\l) and nondelimiter
suppression (\t)
- Probably these 2 will be in a followup patch
Change-Id: I25dd7a6940abee5651a784b9059fe23b32547d6c
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157456
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Text inside block SDTs was shown as Text Fields wich ignored properties such as
alias and formatting. Now those texts are imported as content controls like in
the case of run SDTs.
Added the ability for content controls to remember and export the "multiline"
property of block SDT text.
Some existing tests have been changed due to some different export results.
Change-Id: Ice1eb4ca6dd53c99d5abb239371f8ac896c3b6e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156867
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
Reported by Stephan Bergmann.
Change-Id: Ide8d17dcc7775f3a4f97088e2cbb00ddef271929
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151676
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
This is a minimal extension of the text range based change
tracking to record and apply table column deletions with full
Undo/Redo support.
Add property HasTextChangesOnly to com::sun::star::text::CellProperties.
During recording of track changes, deletion of table columns wasn't
recorded: columns were removed completely with their text content.
Now the deletion deletes the cell content with change tracking,
setting also HasTextChangesOnly property of table cells to FALSE. If
a tracked deletion is accepted in a deleted column, and the result
is an empty cell, the column will be removed, if HasTextChangesOnly
property of the deleted cell is FALSE.
Note: Deletion of empty columns isn't recorded. Hiding deleted
columns hasn't been supported yet in the Hide Changes mode.
Follow-up to commit 05366b8e6683363688de8708a3d88cf144c7a2bf
"tdf#60382 sw offapi: add change tracking of table/row deletion".
Change-Id: I36915d7a58f66b4a3bdaf90495cb998d29c36561
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151593
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
This exposes the internal property added in
0bb90afaeb193181d7b98b79e962549d8a1dd85a (sw: add document model for
multi-page fly frames, 2023-01-24) on the UNO API.
Change-Id: If9acd2d2130f727bc9481980445c0da01be04729
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146124
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
CreateFromStarImage isn't implemented, having been removed in 2000.
Change-Id: Ic0e90eaf760374df69f8d8779c37819d4943a063
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145911
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
This is for Table of Figures/Objects/Tables.
The core will happily generate entries from paragraph styles by simply
setting the Template flag and adding the style name.
In Word, this feature differs from ToC in that only a single paragraph
style is allowed, and there is only one level to assign to so that is
omitted and \t is simply the style name (presumably suffering the usual
i18n disaster, see tdf#153083).
So implement it with the same limitations, not reusing the
CreateFromLevelParagraphStyles property on SwXDocumentIndex but instead
add new property CreateFromParagraphStyle.
Change-Id: Ic8ab1fa9e81bdc85cc932f6bba8724d560e0fbc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145904
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
Change-Id: I4185b019b8dbce7de9bf853c0416fd43201b1f60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144987
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Now roundtrips the w15:appearance value which dictates whether there's
an effect when hovering a placeholder.
Change-Id: I3c911a0cfe31e235b9d981bbff0c1bb5827a85ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144845
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Follow-up to 100c914d44ae8f362924fe567d7d41d0033ae8ad
which added the initial id preservation for DOCX.
adding DOCX block SDT grabbaging, ODF import/export
[content controls can't exist in DOC format]
The ID field is CRITICAL to preserve for VBA purposes.
This patch adjusts BlockSDT to also round-trip the id
instead of just creating a random one.
m_nRunSdtPrToken <never equals> FSNS(XML_w, XML_id) since 2021
with 5f3af56b2c0ef6c628a7cfe5ce6e86f8e1765f5f,
so I removed that part of the clause.
I had thought about changing the ID to use a string instead of an int,
but then the integer version was adopted to fix a regression
in the commit mentioned earlier.
I think it is AWFUL to have a number as the identifier
when it will be used in StarBASIC. The VBA guys have to deal
with it, but it would be nice to do something reasonable
for LO native access to content controls.
However, the concern would be if we allow VBA macro content created in LO
to be exported to DOCX format - that would cause problems converting
from a string ID to a number ID. VBA editing already is happening to
some extent, and mmeeks seems interested in enabling it.
So over-all it seems best to just stick with an integer ID.
I used the commits for <w:alias> and <w:tag> to compose this patch.
XML_ID already existed in include/xmloff/xmltoken.hxx
and "id" already exists in xmloff/source/token/tokens.txt
The ID can be used in VBA to select a specific control.
The id (which is a positive or negative integer in DOCX)
specifies a unique control - either by passing the number as a string
(of the UNSIGNED value) or by passing as a float (specified with #).
For example:
msgbox ActiveDocument.ContentControls(2587720202#).ID
msgbox ActiveDocument.ContentControls("2587720202").ID
but not as an integer since that is used for index access.
dim index as integer
index = 1
msgbox ActiveDocument.ContentControls(index).ID
make CppunitTest_writerfilter_dmapper CPPUNIT_TEST_NAME=testSdtRunRichText
make CppunitTest_sw_ooxmlexport17 CPPUNIT_TEST_NAME=testDateContentControlExport
make CppunitTest_sw_ooxmlexport18 CPPUNIT_TEST_NAME=testTdf151912
make CppunitTest_sw_core_unocore CPPUNIT_TEST_NAME=testContentControlDate
make CppunitTest_xmloff_text CPPUNIT_TEST_NAME=testAliasContentControlExport
make CppunitTest_xmloff_text CPPUNIT_TEST_NAME=testAliasContentControlImport
Change-Id: I5c4022dc932d941fad9da6d75ce899ee1ff66ff5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142818
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
This has to be vital to keyboard navigation.
Certainly it is good to have it imported
before we start to consider tab-movements
for form controls.
All tabIndex 1's are processed (in placement order)
and then the 2's etc. 0's are to be done last.
XML_TAB_INDEX already existed in include/xmloff/xmltoken.hxx
and "tab-index" already exists in xmloff/source/token/tokens.txt
make CppunitTest_writerfilter_dmapper CPPUNIT_TEST_NAME=testSdtRunRichText
make CppunitTest_sw_ooxmlexport17 CPPUNIT_TEST_NAME=testDateContentControlExport
make CppunitTest_sw_core_unocore CPPUNIT_TEST_NAME=testContentControlDate
make CppunitTest_xmloff_text CPPUNIT_TEST_NAME=testAliasContentControlExport
make CppunitTest_xmloff_text CPPUNIT_TEST_NAME=testAliasContentControlImport
No existing unit test found containing blockSDT with tabIndex.
Change-Id: I8a958844e6192b079a2b22a62dedfd8739021f4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143603
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
DOCX SdtControls can be locked in two ways:
-Content Control cannot be deleted (sdtLocked)
-Contents cannot be edited (contentLocked)
or both (sdtContentLocked)
make CppunitTest_writerfilter_dmapper CPPUNIT_TEST_NAME=testSdtRunRichText
make CppunitTest_sw_ooxmlexport4 CPPUNIT_TEST_NAME=testSimpleSdts
make CppunitTest_sw_ooxmlexport17 CPPUNIT_TEST_NAME=testDateContentControlExport
make CppunitTest_sw_core_unocore CPPUNIT_TEST_NAME=testContentControlDate
make CppunitTest_sw_macros_test CPPUNIT_TEST_NAME=testVba
make CppunitTest_xmloff_text CPPUNIT_TEST_NAME=testAliasContentControlExport
make CppunitTest_xmloff_text CPPUNIT_TEST_NAME=testAliasContentControlImport
Change-Id: I5a82d9f6b5103a4902f59af66cd8a99addd4e690
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143542
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
* sw core RES_DECORATIVE as a FRMATR
* sw API SwXFrame property "Decorative"
* UI checkbox "Decorative"
* ODF import/export as loext:decorative on draw:frame
* DOCX export
* DOCX import - very non-obvious how to get it from model.xml to dmapper
* PDF/UA export: tag flys with this flag as Artifact
* test for DOCX filters, ODF filters, PDF export
Change-Id: I1ceb67fdd4e1cfa212aafdeb1c5f4ccd873d433e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143815
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
Exporting the DOCX bugdoc back to DOCX resulted in a document that can't
be opened in Word.
Examining the output, the problem is that the document had 2 inline
<w:sdt> elements with <w:id>, and we mapped such <w:sdt> elements to
both grab-bags and content controls, leading to duplicate <w:sdt>
elements on export. This is schema-valid, but it goes against the
intention of the spec and Word can't open it.
The initial fix was just a writerfilter/ tweak to avoid grab-bagging
<w:id> for inline <w:sdt>, but CppunitTest_sw_ooxmlexport4's
testSimpleSdts points out that in other cases we already require
preserving <w:id>. Fix the problem by storing <w:id> in the content
control, which is essentially a subset of
<https://gerrit.libreoffice.org/c/core/+/142818>.
Thanks to Justin Luth! - he prototyped the DOCX filter for <w:id>.
Change-Id: I9f002b770049ce8be30253d0b39410d9a58981dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143117
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
Using createTextRangeByPixelPosition() with a pixel position that leads
to a graphic node resulted in a crash.
The direct reason for this is that the makeMark() call in
SwXTextRange::SetPositions() returns nullptr in case rPaM points to a
graphic node, but later we dereference that result unconditionally. This
also uncovers that the XTextRange returned by
createTextRangeByPixelPosition() is meant to point to a text node, but a
pixel position may be closest to a graphic node.
Fix the problem by explicitly checking for graphic nodes; and try to
look up the anchor position of such graphics, which will be definitely a
text node.
In practice this will mean that in case the image's anchor type is
as-char, then we'll return a cursor position which will be on the left
hand side of the image.
Change-Id: Ief58148247fe3cd4371ed245b4eff5b45ca2aa15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143092
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
As noted in
<https://gerrit.libreoffice.org/c/core/+/142454/3#message-18fe8bb36fc24d317ad16dd25e236ed51c88a910>,
introducing a dedicated css.text.ContentControls service is actually not
needed and client code should be fine with just an "anonymous" object
returned by getContentControls() + implementing XIndexAccess.
Remove it before somebody starts to depend on it. Let's rather have a
bit of inconsistency (e.g. SwXFootnotes implements XServiceInfo, while
SwXContentControls not) than an XServiceInfo implementation that we'll
have to support from now on, without a user.
Change-Id: Ifde4fb6bcafdffabb189447415b89b01c9675296
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142511
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
- Replace SwContentControl::HasListItems(), which assumed that the type
is dropdown if we have list items. This is not valid, it's OK to have
a dropdown with no list items. Add a GetDropDown() instead to check
for the type, explicitly.
- UNO API sets the dropdown bit when list items are set and the type is
not expilcitly combo box or drop down, to keep backwards
compatibility with existing documents.
- No change to the edit shell, SwDropDownContentControlButton already
checked if items are empty and used STR_DROP_DOWN_EMPTY_LIST in that
case, but that was dead code previously.
- ODT & DOCX filters are now updated, ODF has a new
<loext:content-control loext:dropdown="..."> attribute to specify that
the type is a dropdown, explicitly.
Change-Id: Id577ba9639151549a8f953aab31685a73a898504
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142491
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
This builds on top of commit ad950f10dc382ea169f94a0c301ca8c424e7103e
(sw: introduce a manager for content controls, 2022-11-08) and exposes
it on the UNO API:
- add a new css.text.ContentControls service, backed by SwContentControlManager
- add a new css.text.XContentControlsSupplier interface, implemented by
SwXTextDocument
- implement XIndexAccess in ContentControls
This allows UNO (and later VBA) clients to have random access to the
content controls in a document, which is much easier than the relatively
complex traversal of the whole doc model.
Change-Id: I26240c9ddbd06f4f57f5f65460ef75a2ace94825
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142454
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
The document had a 2022 date in document.xml, but had a 2012 date in
data binding. Writer used to show 2022, while Word picks 2012.
Data binding for dates were disabled in commit
de90c192cb8f1f03a4028493d8bfe9a127a76b2a (sw content controls, plain
text: enable DOCX filter with data binding, 2022-09-19), because the
formatting of those date timestamps were missing, so it was better to
just not update them from data binding, temporarily.
Fix the problem by adding a new read-only DateString property on
SwXContentControl, this way the import filter can set not only the
timestamp but the formatted date as well.
This shares the SwContentControl::GetDateString() code with the UI,
which already had the need in the past to turn a timestamp into a
date string, based on a provided language and date format.
Change-Id: I842a9483a675f895129a9854caec347be6b6b84e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141859
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
This is similar to <w15:color> to preserve <w:tag>.
Resolves
<https://gerrit.libreoffice.org/c/core/+/137399/2#message-a5ba9f1e0dc9e586034758ee7c0a94e1533e8922>.
Change-Id: I4fdab44aaf13ca812502ae79f38f32ec9468db11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140981
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
This is similar to <w15:color> to preserve <w:alias>.
Related to
<https://gerrit.libreoffice.org/c/core/+/137399/2#message-a5ba9f1e0dc9e586034758ee7c0a94e1533e8922>.
Change-Id: I774b7204c5ca02ec6db89f5cbd3a6de6f2bf82a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140975
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
This is similar to dropdowns, but combo box allow free-form user input,
while dropdown is meant to enforce that the content is one of the list
items.
Change-Id: I4ae226c55f70b2b3237021348e21b7d184e8a5ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140302
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
Commit 7e23cbdbb6ec0247a29ed8a8f744c01e10963ea0 changed the code so,
that TextPreRotateAngle is used to track ooxml vert attribute. This
patch changes it so, that the style attribute WritingMode is used.
Now text direction can be written in 'writing-mode' attribute in the
graphic properties in ODF, same for shapes as for frames.
The needed conversion from WritingMode BT-LR and TB_LR90 to
TextPreRotateAngle for rendering of text in custom shapes is now in
one place in class SdrObjectCustomshape. The shape edit engine
cannot yet render it itself.
Some unit tests are adapted to use WritingMode property instead of
TextPreRotateAngle.
The value text::WritingMode2::TB_RL90 is introduced, corresponding to
vert='vert' and textDirection='tbRl' or ='rl' in OOXML. It is used
for frames too, so that the original text direction is preserved and
vert='eaVert' can be distinguished from vert='vert'.
TextPreRotateAngle is currently still used in SmartArt import for
'upr' and 'grav' and in emulating 'upright' but no longer to
emulate text direction.
Change-Id: Idc4339bbfc3592fe90b154d75e2c404a1fa30856
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138813
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
It has a lot of properties and what's inside ListItems was also rather
unclear.
Change-Id: Iaef719d72b95374da6d0dfa8247870fa5f76d18d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139406
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
It's an XTextContent and also document the possible values of the Clear
property.
Change-Id: Ic1c338e4461ceea75cf16ce896e98e732d9af859
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139397
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
duplicated text - "@see NumberingLevel"
Change-Id: I210c392dba738e65ed22b8c66e16a6bafb1c4265
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138261
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
which is internal API, unused (as far as I can tell) by external
users.
This state is purely a bitset
(as implemented by utl::AccessibleStateSetHelper)
so we can just return it as a 64-bit value.
This shaves significant time off the performance profiles
of code that loads very complex shapes, because this state
is frequently used, and we no longer need to allocate a return
value on the heap for every call.
Change-Id: Icf1b3bd367c256646ae9015f9127025f59459c2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136786
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...which were used by ildc, which is gone since
a8485d558fab53291e2530fd9a1be581c1628deb "[API CHANGE] Remove deprecated idlc
and regmerge from the SDK", and have always been ignored as legacy by its
unoidl-write replacement.
This change has been carried out (making use of GNU sed extensions) with
> for i in $(git ls-files \*.idl); do sed -i -z -E -e 's/\n\n((#[^\n]*\n)+\n)*(#[^\n]*\n)+\n?/\n\n/g' -e 's/\n(#[^\n]*\n)+/\n/g' "$i"; done && git checkout extensions/source/activex/so_activex.idl odk/examples/OLE/activex/so_activex.idl
which apparently happened to do the work. (The final two files are not UNOIDL
source files.)
Change-Id: Ic9369e05d46e8f7e8a304ab01740b171b92335cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135683
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
This is somewhat similar to commit
1acf8e3cfaf1ef92008e39514a32ace0d036e552 (sw fields: add Title uno
property, 2022-03-24), except that this is for images, and images
already had a Title, which is persisted to ODT.
So add a new Tooltip property which has priority over the tooltip
generated for URLs, in case the tooltip is non-empty. This helps in case
the URL is long / non-readable / confusing and a more helpful
popup text can be provided instead.
Change-Id: Ife34dab5e4490eb1682c55fb7c01f7509d0057fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132361
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
The use-case is user fields, which are kind of variables in the
document. They have a name and a value, but the name might be only
readable to an extension or macro, not to the user. In this case, it
makes sense to have a way to specify a user-readable tooltip.
Be consistent with TextFrames which already have a Title property.
Change-Id: I986792f5e55e0b96489347be482d640d155113cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132077
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
Add IsMoved bit to SwRangeRedline, and keep it in both
parts of a split Delete/Insert redline. Set this bit
during DOCX import, fixing incomplete import of
moveFrom/moveTo elements.
Details:
- Search text moving only at redline Insert() and AppendRedline()
instead in the layout code (which was much slower, because
triggered by also mouse hovering):
- detect text moving in Hide Changes mode, too;
- Insertion inside or directly after tracked text moving keeps
"moved text" layout of the original moved text parts (before
and after the insertion).
- at detection of text moving, invalidate (update) layout of the
redline pair, too.
- fix DOCX import: extend makeRedline() with property RedlineMoved
to keep all moveFrom/moveTo stored in DOCX instead of
losing them (joining them with normal redlines) in the case
of missing Delete/Insert pair (see unit test document);
Follow-up to commit ec577f566fa3e6d2666069180f8ec8474054aea9
"tdf#145233 sw track changes: show moved text in green color",
commit bcdebc832b272662d28035007a4796e42d1305ae
"tdf#104797 DOCX change tracking: handle moveFrom and moveTo"
and commit d32d9a2b3c5e3963f4a18f6c7bbf50fab2e9b2be
"tdf#123460 DOCX track changes: moveFrom completely".
Change-Id: Iaca80e5e326a172bc7ba5fec64b63668b9378e2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125317
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
The idea is that a bibliography entry (field) can have not only an URL
(which might be unavailable due to lack of network connectivity,
paywall, etc) but also a local copy, which is also a URL.
The local copy doesn't replace the original URL. The local copy is
stored part of the document, since it may be a relative URL, e.g. ODT +
several PDFs copied around in the same directory.
This commit just starts this feature, up to the extent that read and
write of the new property works.
Change-Id: I3c4df2be3a1f3b02a87c097f8a0630951def09d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119322
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
to OpenDocument format using
<style:table-row-properties loext:text-changes-only="false"/>
Rename also com::sun::star::text::TextTableRow::IsNotTracked
to com::sun::star::text::TextTableRow::HasTextChangesOnly.
Follow-up to commit 05366b8e6683363688de8708a3d88cf144c7a2bf
"tdf#60382 sw offapi: add change tracking of table/row deletion".
Change-Id: Iefb0d4095af0983fdd15697d5b80073d18d21bd7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116212
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
TextTableRow property. Remove also maybevoid from
com::sun::star::text::TextTableRow::IsNotTracked.
(It's possible to add it later, if needed.)
Follow-up to commit 05366b8e6683363688de8708a3d88cf144c7a2bf
"itdf#60382 sw offapi: add change tracking of table/row deletion".
Change-Id: I4854dcda827cc8d5b1d0ec8bba381458b3ab17b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115988
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
This is a minimal extension of the text range based change
tracking to record and apply table row and table deletions
with full Undo/Redo support.
Add property IsNotTracked to com::sun::star::text::TextTableRow.
During recording of track changes, deletion of table rows wasn't
recorded: the rows removed completely with their text content.
Now the deletion deletes the cell content with change tracking,
setting also IsNotTracked property of table rows to FALSE. If
all tracked deletions were accepted in a row, and the result is
an empty row, the row will be removed, if its IsNotTracked
property is FALSE.
Note: Deletion of empty lines isn't recorded (they are simply
deleted). Hiding deleted rows hasn't been supported yet in
the Hide Changes mode.
OpenDocument supports only track changes of text ranges, but
not changes of the table structure, e.g. deletion of table
rows. For the native export it needs to extend ODF, and
depending on this future extension, can be based also on
SwExtraRedlineTable (which lacks of recording and Undo/Redo,
but supports OOXML round-trip of tracked table changes).
See also commit d688069023959ab97d14eb1dbfd5bf6ad3c1b160
"Add support for 'Table Row Redlines' in SW core" and its
follow-up commits.
Change-Id: I2e3807cf8ae8212bd51c210ef1c20c85878d0da8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115804
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
The use-case is drag&drop: if an UNO API client registers its drag&drop
listener, then it gets a DropTargetDropEvent and has to decide if it
wants to handle that event or allow Writer to handle it. In case it
decides to handle the event, it would be good to able to e.g. insert a
string at the point where the Writer UI indicates it to the user. But
DropTargetDropEvent only exposes a pixel position and Writer requires
you to have an XTextRange when inserting content.
Fix the problem by introducing a new createTextRangeByPixelPosition()
which first does a pixel -> logic coordinate conversion (this is
window-specific, in case you have multiple windows), then picks the doc
model position which is the closest to a logic coordinate.
Change-Id: I6a8e69e3c39b9d99209342469653c0e0bd99bf53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112201
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
Also included in this patch:
- Modifications to make all outline content visible during move
operations.
- Removal of code intended to redraw buttons when layout is changed that
seems not to work as intended.
- Function IsOutlineContentFolded changed to IsOutlineContentVisible
- Change of delay before button is shown to half of what it was.
Change-Id: I0dde555ccd0693ca382c1f15326edfdc2fc44a93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107815
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
|
|
Allow relative alignment to the top page border (the area
over PAGE_PRINT_AREA) by adding constant PAGE_PRINT_AREA_TOP
to com::sun::star::text::RelOrientation.
Fix DOCX shape import of <wp:positionV relativeFrom="topMargin">.
Follow-up of commit 6788133b3bdf02097d66a99047aa7bcba3a99a66
(tdf#135720 sw: fix PAGE_PRINT_AREA_BOTTOM alignment with footer)
and commit 79107d3f8d10aa0f38641775c5eb47dcfd4fd37e
(sw from-bottom relative orientation: add UNO API).
Co-authored-by: Balázs Regényi
Change-Id: I3a3f7324c0ef8d448526982d3e2f09b67f5fd4d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104113
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
In ShowTrackedChanges mode, hide tracked deletions
in text optionally and show their shortened text
in margin next to the vertical "Changed line" mark
(showing only the first deletion of the line).
Add "Tracked deletions in margin" checkbox to Writer->View page.
Add "Display tracked changes" and "Outline View" sections to View, too.
Add property ShowChangesInMargin to com::sun::star::text::ViewSettings.
Add config setting:
org/openoffice/Office/Writer/Content/Display/ShowChangesInMargin
Show more information in Manage Changes dialog window
about the tracked deletions with restricted visibility
in ShowChangesInMargin mode: show shortened text content
of a deletion in its (otherwise empty) Comment field.
Change-Id: I1d19a4bf8225f536a635c6dd5062344c51e03b79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104350
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
Patch 1/6
-Adds option 'Show outline visibility button' to options writer view
tab in Display section.
-Adds UNO command '.uno:ShowOutlineContentVisibilityButton' to toggle
option on and off from menus, toolbars, and key bindings.
-Makes feature experimental mode.
Change-Id: If5a57defd8f568736ea08625ab6eb08e30b15c03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99652
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
When it comes to vertical positioning of anchored sw objects, one can
say the position should be "1cm from the top of the page". But measuring
from the bottom of something was not possible.
Add API for this to help working with documents from Word, which
supports the feature.
There is no duplicated C++ enum in sw/ for vertical relative
orientation, so no "doc model" changes are needed for this in sw/.
Change-Id: I3199d3e794bda2f21f92ce3bb7c3c6f04d284db2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93065
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
Create specific option to toggle display of the bookmark positions
instead of relying on generic IsViewMetaChars().
Add a Bookmarks checkbox to Writer->Formatting Aids page in Options.
Add property ShowBookmarks to com::sun::star::text::ViewSettings.
Add config setting:
org/openoffice/Office/Writer/Content/NonprintingCharacter/Bookmarks
Change-Id: I998ecdc16d8e4a5baeeb1bbcff0bf5f1f5636692
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87774
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
And fix the pool item's operator==() that forgot to take allow-overlap
into account.
Change-Id: I34ec29eed95d821cfccebbb15675e0f576b6454d
Reviewed-on: https://gerrit.libreoffice.org/79115
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: I42ff874b5fc68e7fb750b47be3b7b8a9d76e59fc
Reviewed-on: https://gerrit.libreoffice.org/78016
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: If226fcb97cd67ad2239f55f4138703d712b70a08
Reviewed-on: https://gerrit.libreoffice.org/77991
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
|
|
Change-Id: I3beb64e7d96e23c973fe1246aadccebb86eb301a
Reviewed-on: https://gerrit.libreoffice.org/77310
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
"its"
Change-Id: I02c660e46964270376a66210fdb5f1b1985ce5b6
Reviewed-on: https://gerrit.libreoffice.org/77255
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I76fe3da0ab62afa1cc07dafcd97c3cd06a7a23a1
Reviewed-on: https://gerrit.libreoffice.org/77205
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|