Instead of style:num-prefix and style:num-suffix new list format
is much more flexible for storing list multilevel numberings.
Now it is possible to have not just prefix/suffix but any random
separators between levels, arbitrary levels order, etc.
Internal LO format for list format is changed: instead of placeholders
like %1, %2, etc we right now use %1%, %2%... Reason: for ODT documents,
having more than 9 levels there is ambiguity in "%10": it is "%1"
followed by "0" suffix, or "%10"?
Aux changes:
* removed zero width space hack: since format string is always defined
this hack is interfering with standard list numbers printing
(see changes in ooxmlexport14.cxx, ww8export3.cxx tests)
* changed cross-references values to lists: they are now including full
list label string: previously this was bit self-contradictory (see
changes in odfexport.cxx and check_cross_references.py tests)
Change-Id: I9696cc4846375c5f6222539aeaadbca5ae58ce27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117156
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Per default, a document opened by a user action will always open
in a new frame. For tdf#83722, this behaviour was extended to
documents created from templates.
But this currently also affects the default factory templates, if
these are replaced by a config setting with a real template, which
was not intentional.
So this patch introduces a new MediaDescriptor property, which
allows to mark a document as replaceable and automatically sets
it for factory default documents. If this property is set to true,
a document just acts as a placeholder while it's unmodified. I.e.
the next opened document from its frame will close and replace it.
Change-Id: I45ffa8709f7cdda949fac78f3b363f120f0c4a03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88257
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
As it turns out, UI names of table styles are
leaking into documents, and changing those names
actually breaks the import of documents from
previous versions. The problem is that a table
style itself is saved using its programmatic name,
but is referenced by tables using its UI name. So
after changing the UI name, these no longer map.
It's still possible to manually reapply the style,
but if not doing this and just saving, the style
and its child cell styles will be silently lost.
Moreover, if the given document is of fodt type,
it's not even possible to save it (even not as
"save as" to odt).
Obviously, the issue isn't just with renaming.
The same happens also with documents created
with a different UI language (even English).
Fortunately, up to now English UI names were
identical to the programmatic ones. So the first
thing we can do is to accept both kinds of names
for table:template-name. This way, we solved the
problem for documents created in an English UI,
and in addition made them work in non-English UI
(unlike before). As for export, we want to always
writes programmatic names, so newly edited
documents will continue to work regardless of
future UI changes or UI language switching (and
also stay compatible with older versions).
For the fodt export failure, changed the order of
things in SwXTextTableStyle::replaceByName, as
setting a new box breaks SwXTextCellStyle::getName
in this specific case. Also changed cell styles
to be named using the parent style's programmatic
name, so new documents won't have this problem
when opened in older versions. This also fixed
part of the PythonTest_sw_python failure.
The remaining PythonTest_sw_python failure was
about the "TableTemplateName" UNO API property
of a table, which didn't work with programmatic
names. That's a real bug by itself, and was
fixed. Also an explicit test was added, to make
sure the API always returns the programmatic name.
Finally, an odf export test was added. It tests
files with both old-style UI names, and new-style
programmatic names. Styles should be correctly
imported, used by the table, and survive export.
Change-Id: I45dfda193813fea184dc42e5e75544ebc05d4a92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87826
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
followed recommendation in bug report: 16pt, bold, centered
- inheritance from Heading
- when tdf#128858 is resolved then Appendix will inherit
outline level 1
One attempt at filter modifications, but maybe there are others?
Change-Id: I0f91327cfe5578cd888528b2c6fac5065951eec0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85657
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Setting this option will prevent copying/dragging any content from LO
to another program or even another LO window.
Change-Id: Ifbc032a4fa69ac1a17d4b500f5a30f5399d84ed7
Reviewed-on: https://gerrit.libreoffice.org/80586
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
- the document styles tests seems mostly unrelated
- also: add bug reference in commit message subject, so that the
bugzilla bot can do its shtick
- all the real work done already by Thomas Viehmann on commit
2f679fd3e6
Change-Id: Ice5860c15c05fae37f0ba337d804de70acf3d936
Reviewed-on: https://gerrit.libreoffice.org/79132
Tested-by: Jenkins
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
tdf#127534 TextRange.getPropertyValues runs into RuntimeException when
getting all properties form PropertySetinfo
We suspect that the property might be completely unused / useless.
However, removing it might be BC breaking for "buggy" uses of
the property, so this is a lower-risk fix.
Björn helped with great advice, thank you! All errors in the patch
are my own, though.
Change-Id: Ie80b61003de2b8516e458c800531aac951ebc148
Reviewed-on: https://gerrit.libreoffice.org/78865
Tested-by: Jenkins
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
- fix unittest assuming the double-insertion of annotation
throwing an IllegalArgumentException was intentional
- remove SwModify/SwClient in SwXTextField
- also: add basic C++ api test
Change-Id: Ia4657dc65dfadc3e975bdf409bd5e43413ea1f5a
Reviewed-on: https://gerrit.libreoffice.org/71452
Tested-by: Jenkins
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
Use pylint to identify style and convention errors in
xscriptprovider.py. Also make use of setUp and tearDown
methods to streamline the class and reduce code
duplication.
Change-Id: Iee4addb6577c304c5ced4e2d246c4bb557d2b6f4
Reviewed-on: https://gerrit.libreoffice.org/66197
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
This is not and has never been a unit test; let's remove it to avoid
confusion.
Change-Id: I42a5e8f9d2f9757bcc9e0c6051e5d86ffc6e023f
Reviewed-on: https://gerrit.libreoffice.org/67732
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Tested-by: Jenkins
Use pylint to make xtextcontent.py more pythonic. Mostly,
changing variable and method names to comply with the
python style guide. Also, remove unneeded imports.
Change-Id: I80e6fa53e67a86520a85284f3dad76a614450047
Reviewed-on: https://gerrit.libreoffice.org/66199
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
If all of the document is contained inside of sections, then at
least one section must be visible or writer crashes. The 2012
fix seemed to assume that all content would be in a section,
and thus required at least one section be visible.
Instead, check for non-section content at the start and end of the
document, and for gaps between sections, and count those
as "virtual", visible sections, which would allow all real sections
to be marked as hidden.
The example document HiddenSection.odt in tdf#55814 is a really
nice test document. With this patch, that test now works
even if you remove the last non-section paragraph.
Even nicer is finding that a (very unclear) "did you fix me?"
unit test entry gives a unit test for patch.
Change-Id: I6cac5e6df8dff7fbb78828ae2521a1b02e305a27
Reviewed-on: https://gerrit.libreoffice.org/66128
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Jenkins
Tested-by: Serge Krot (CIB) <Serge.Krot@cib.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
New "Header and Footer" style introduced as parent to header/footer styles
Right alignment set for HeaderR and FooterR
Change-Id: Iff407da8907b761236ebc2aa8877b9d6b8294e10
Reviewed-on: https://gerrit.libreoffice.org/64152
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
This is a follow-up to 4967d498c4 and
avoids to have setup errors making these tests silently pass.
Also cleanup code a bit & share common init sequence.
Change-Id: I043447a28f5e2c9f416aa906135030c07b2cacc8
Reviewed-on: https://gerrit.libreoffice.org/63800
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Keep lines within the correct length and add a little bit
of whitespace to improve readability.
Change-Id: I0cf26886b25079a970938b728004c96c9fa3e26f
Reviewed-on: https://gerrit.libreoffice.org/61622
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Improve readability by inserting a little whitespace,
and obeying PEP 8 (python style guide) more closely.
Also remove an unused import and a few unused
local variables.
Change-Id: I07de686ec9b04e293bc4e0a092e5ad957cffbbba
Reviewed-on: https://gerrit.libreoffice.org/61624
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Use whitespace to improve readability, including
indenting arguments in a more readable way
Change-Id: I7cf687042fb1d4d62e8acb8277539101dc859859
Reviewed-on: https://gerrit.libreoffice.org/61626
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>