Until now the 'local' StyleSheet got set, but that may
not be the same as the original. It was/gets identified just
by searching by name and type, not comparing content.
What to do? We could...
(a) the Style-Friendly way:
- check if StyleSheet is identical
- if not, create a new in-between StyleSheet hosting missing Items
- if yes, use, done.
(b) the pragmatic/practical way:
- Just hard-attribute the Items that are detected as different
similar to what BurnInStyleSheetAttributes does/did, but only
for a view differing Items
(b) is the most simple for now, but will lead to more hard
attributes. The other possibilities will be better in the
long term. For now, I will use (b).
Note that there are more cases in that VERY complex and grown
stuff emerging from SdDrawDocument::PasteBookmarkAsPage. More
things will need to be fixed, see this as a 1st step.
Needed to adapt postProcessAfterCloneToDifferentModel due to
UT testTdf96206 failing, see comment there for details.
That 1st implementation showed weaknesses with those Items
critical and only on MasterPages, so decided to give up on
that and implement ContentCompare to SdPage::Equals. That
was easier than thought: No parameter needed, only used by
InsertBookmarkAsPage_FindDuplicateLayouts::operator(). Thus,
SdPage::Equals needs no change, just SdrObject::Equals.
Due to still problems with Items corrected in Objects on
MasterPages I will for now exclude this.
Could now isolate remaining problems, these are defaults
and/or PresObj things on MasterPages. Important is that I can
completely correct all Items for all Objects in
postProcessAfterCloneToDifferentModel. I can react to these
false-positives in the ContentCompare in SdrObject::Equals.
Signed-off-by: Armin Le Grand (collabora) <Armin.LeGrand@collabora.com>
Change-Id: I10e17c8d6a893dbe92ab716182f07bafce1f3284
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6595
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Armin Le Grand <armin.legrand@collabora.com>
(cherry picked from commit 92ffaeac04c5c8586006b026f29ce12fba3674f1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211729
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Exporting a hyperlink laid out down the page, over more than one line,
produced link annotations a PDF/UA validator rejects: on a vertical page
whose link wraps, two of the three annotations carried no structure
element, and veraPDF reported both under ISO 14289-1 7.18.5:
A Link annotation is an Artifact or is nested within null tag
(standard type = null) instead of Link
Export a document whose hyperlink ends in a ruby and runs over several
lines down the page to PDF with tagged PDF enabled, then run veraPDF
over the result in PDF/UA-1 mode to see it.
An annotation is tied to a structure element by the text painted inside
it, so one holding no text of any line is tied to nothing. That is what
the region CalcFrameRects returns can hand out: it covers the selection
in whatever rectangles fall out of inverting the pieces it was built
from, and one of those can span several lines while another holds a ruby
and none of the text beside it.
Let CalcFrameRects return those pieces as well, and the holes it cuts
afterwards, and take the shape from the pieces and the area from the
region: the pieces follow the lines and, once the overlapping ones are
joined, no longer overlap each other, so every part of the region falls
in exactly one of them. What tdf#157816 requires still decides each
part, and the parts a piece has left are joined unless the join would
reach over a hole - a fly, a drop cap - that the selection excludes on
purpose.
Every annotation now holds text of the lines it covers, so every one of
them is tagged, and a ruby sits inside the rectangle of the line that
carries it. The narrowing to a portion's band, the growing over a ruby
portion and the joining of tiling rectangles that
Ide896d00c7619b772802762e85abfb6e2cf7ef0a ("tdf#163240 sw: let a link's
rectangle cover the ruby it ends in") added are all gone. On the
horizontal document that change was measured against, the exported
rectangles are the same to the last digit.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I9faf2bc10af491576cc2f4ba5f3e3433eb03d16c
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13767
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit e77b1d25d3601315f80169e4e811d74ef2ff0374)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211704
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Changes SwUnoCursor::operator* to use shared_ptr::operator* so that it
will assert that the pointer is not null. This should help catch cases
that were relying on undefined behaviour to get a pointer to the
returned reference.
Change-Id: If90db9404a34fb08bfef506eb00ebd99fb82406b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211698
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
ISO 32000-2 Table 369 makes the order normative: a Ruby shall contain
one RB followed by an RT, or by RP, RT and RP. A ruby's two sub-lines
paint in visual order, though, and each opened its structure element as
it painted, so an exported ruby held its RT before its RB. PAC 2026
reports that as two errors per ruby; veraPDF does not report it.
An element is ordered among its siblings where its type is set, not
where it is painted, so both kids are created and typed before either
sub-line paints, and each sub-line then enters the kid already created
for it.
Which sub-line carries the annotation follows OnTop, while bRubyTop only
reflects where a squared grid puts the annotation and is true everywhere
else. Keying the role off bRubyTop tagged the base of a ruby positioned
below outside a squared grid, or to the right, as the RT and its
annotation as the RB, so both the role and the element follow OnTop now.
A squared grid with the ruby text below was already right, bRubyTop and
OnTop agreeing there.
The kids are created only where BeginInlineStructureElements would enter
them: a ruby in the repeated headline row of a follow table would
otherwise leave an empty RB and RT on the table, once per following
page.
testLinkWithRuby asserted only that both kids are present, the order
being wrong when it was written; it compares them in order now.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I8e38a3544008f79939d7d0795c4808a1a72caad7
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13402
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 65c62bc31aff793465f31ab6172c118921fe9d51)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211690
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Copying a cell over another one with change recording on could crash, or
destroy the tracked change it had just recorded when the target cell had a
number format.
The root cause was that formulas and formatted numbers overwrite
existing cells and destroy some tracked changes..
The cursor could point to a character that is not exist anymore.
So, first i made some cursor position fix in some key points
to avoid some crashes.
Then disabled tracked changes when a cell with formula is changed.
Every time it was recalculated, it generated a new tracked change.
Normally if we want it to be tracked, we should track the formula inside,
not the visible value .. but we don't have that type of tracked change.
ChgTextToNum() could also generate lost tracked changes:
If we copied a formatted number cell content to an other similar cell,
(for example a currency like $1,000.00 to $10.00)
by replacing the text ... then at first it generated a cell content like
$1,000.00($10.00)
where ($10.00) is a delete change..
Then the ChgTextToNum() reformatted the cell.. and overwritten it with
the $1,000.00 ... so we lost the delete change.
now i changed it so it can keep tracked deletion changes as well
(it was able to store some insert changes)
and then it checked if the format is fine for the real text ..
If it is, then it will leave it.. so tracked changes survive.
If the format is not good, then i keep the old way of working to
replace cell with the new value... and make it 1 insert tracked change
I do this to avoid complex problems.. because at format changes
a lot of things can change.. position of the characters ..
and it could be a confusion where the old delete change should start from.
It would need more planning to figure out a way to handle it.
Side note: in some cases if we modify the value of the formatted number cell
to something that does not fit the format, it can lose the formation
and change to pure text. (so all track changes will work on it)
like if you change this: $1,123,234.00 -> $1,123234.00
(This is not my change. i just mentioned this behavior.)
Signed-off-by: Attila Szűcs <attila.szucs@collabora.com>
Change-Id: I152ec4720ec8e133800186c7e5787fe0f6954fc8
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13456
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
(cherry picked from commit 699b9cb056cb283fc2699763e1a2340e12680c3f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211684
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
When image is wrapped through in document body.
Separate part of SwFEShell::ShouldObjectBeSelected()
to SwFEShell::IsTextOverBgObjectAt(), and use it to detect
text overlapping background image.
Handle case when DocumentSettingId::PAINT_HELL_OVER_HEADER_FOOTER
is set. (see eg. SwFlyFrame::InitDrawObj())
Not part of this change: updating mouse pointer over objects/text.
Related to b860aea9d6,
which introduced special handling of
PAINT_HELL_OVER_HEADER_FOOTER for DOCX compatibility.
Change-Id: I571942a43c3c1d5a5be5906fcce08640739e6493
Signed-off-by: Aron Budea <aron.budea@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/11523
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 3bae82eb865b2568506417349d2f3a62bfd775e8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211680
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
The patch concerns Writer but it should help for Calc and Impress/Draw later
for adding "Current sheet"/"Current slide" option since we change vcl part too.
I used the help from GPT 5.6 Luna to:
- find root cause (print mechanism is quite complicated)
- find the fix
I made several tests but can't pretend I tested everything (far from it)
There are 2 main parts in the patch:
1) UI : add STR_PRINTOPTUI_PRINTCURRENTPAGE in sw + modify ui file vcl
2) Mechanism
a) in sw part
- add the new choice in SwPrintUIOptions
- take it into account in CalculatePagesForPrinting
- in GetRenderDoc, in case of current page, the current mechanism which uses a temporary doc
for the preview doesn't work so we need to use the whole doc instead of creating a temporary doc
b) in vcl part
- add mnInitialPage to keep in memory the current page when opening the dialog.
I found no other way to have this information once the range has been changed
- initialize mnInitialPage in ctr
- modify PrintDialog::preparePreview to have the right range
- take into account the new choice in UIOption_RadioHdl
(this last one is for the preview, the rendering is ok even without it)
+ add some check on test_printDialog QA test to see if range is ok
when going back to Portrait.
Change-Id: Idff5622601d94c73e53e12af215d5c8ba3e1b04a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210643
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Write a paragraph in a language other than the document's, then File -
Export As - Export as PDF with Tagged PDF on. The paragraph's element
said nothing about the language, and the Span holding its text said it
instead:
/StructElem /S/Standard /K[6 0 R]
/StructElem /S/Span /Lang (en-GB) /K[1 2 3 4 5 6 7 8]
A run of text was compared against the language of the document, so
every run of a paragraph that declares one of its own differed from it
and opened a Span. The comparison is against the paragraph now, and a
paragraph unlike the document names its language itself. A run unlike
its paragraph still opens a Span and names its own, which it did not
where it was the document's language the paragraph had departed from.
A Span that carries anything else - a strikeout, a script, a character
style - still stands, without the language it was repeating, and so
does a Link. A paragraph with something anchored in it says nothing,
as before: what hangs there is tagged underneath it and would take the
paragraph's language for its own.
testSpans reads four list items, three of them en-GB in a de-DE
document. It asserted the shape the old rule made - for one of them it
looked for a single Span and took the language off that, and for the
rest it counted the Spans that rule opened. It reads the language off
the paragraph now, asserts that the item at the document's own
language names none, and where an item holds a hyperlink and a
footnote it finds the two Links alone.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I4082891666598793f59d1bf62c33e883ebdebb8f
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13117
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 0d2d9e656d87647f904f1a463ed9b879c2bfb10c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211375
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Add new paragraph justification option "Split compound words" for
custom compound-based "smart" hyphenation. Add compound-based "smart"
hyphenation support for Danish, Dutch, Esperanto, Estonian, German,
Norwegian, Swedish (and potentially, Icelandic, Finnish and
Latvian) languages by fixing Hunspell morphological analysis and the
associated lingucomponent code. (Previously compound-based "smart"
hyphenation was enabled only for Hungarian.)
With the new option it's possible to keep MSO/MS-DOCX interoperability,
also introducing a better hyphenation algorithm for several languages.
Details:
* Add check box to Alignment in paragraph formatting dialog window;
* Store properties in paragraph model:
css::style::ParagraphProperties::ParaIsCompoundBased
* Implement it by checking the new option in the previously
added commit f9f694f5d9f39c5801bc5fec45867252c293bbcb;
* Add ODF import/export (loext:compound-based);
* Add ODF unit tests by the new tdf173389_smart_hyphenation_nl.odt
and tdf173389_smart_hyphenation_hu.odt. Now use the previous
tdf119908_smart_hyphenation_hu for disabled compound-based "smart"
hyphenation, also the new tdf119908_smart_hyphenation_nl.odt.
Note: the Dutch test document results better compound-based
hyphenation in two positions.
* Add Hunspell patch to fix Danish, Dutch, Esperanto, Estonian,
German, Norwegian, Swedish (and future Icelandic, Latvian,
Finnish) morphological analysis for compound word constituents;
* hyphenimp.cxx hyphenate(): fix tokenization for consecutive
pa: elements, like resulted in the fixed Hunspell dictionaries.
Follow-up to commit f9f694f5d9
"tdf#173389 sw: add compound-based “smart” hyphenation for readability".
Change-Id: I4414bd588646ecf6dc86b77642833ac9c7820a98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211341
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Always disable line numbering for headers/footers
when importing MS formats.
Copying what was implemented for DOCX in tdf#79738 and tdf#167193
This ultimately just turns off a LO built-in style's default value.
rDoc.FindTextFormatCollByName currently just ends up doing a
UIName.toString as it looks for matching styles,
so the conversion of ProgName to UIName wasn't strictly necessary
at this time, but better to do it right immediately.
make CppunitTest_sw_ww8export4 \
CPPUNIT_TEST_NAME=testTdf79738_footerLineNumbering
Change-Id: Ied7a64bcd43f9a4f0abc5103a0c17e93f651019e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211300
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
Writer laid text into a 0.2 cm gap left of a text box, where Word
leaves the gap empty. Word gives up a gap under a quarter inch wide,
measured from the column edge to the object's wrap boundary, when the
other side has at least that much room. Follow the same rule for
documents the Word filters read.
Change-Id: Ifdacbf0469296ade1665fb0b56526301cd19f973
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211280
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>
Tested-by: Jenkins
Exporting a document to PDF/UA-2 produced a file that fails
ISO 14289-2 clause 8.8, once per outline item and internal link.
veraPDF reports
Destination in Outline item, OpenAction or Link annotation is not
a structure destination
The destination named the page and an area on it, and that is all:
what was linked to could only be worked out by looking at what the
layout had put at that position.
A destination for a link or an outline item is now written as a GoTo
action carrying a structure destination beside the page one
(ISO 32000-2 12.3.2.3):
/A<</Type/Action/S/GoTo/D[<page> 0 R/XYZ ...]/SD[<elem> 0 R/XYZ ...]>>
sw creates a destination before its target is tagged, so the node is
remembered while the cursor is on it, and matched against the tags in
the pass that already runs after the last page. Creating one and
remembering its node is a single call now, which every destination a
link or an outline item points at goes through: bibliography entries
and links in the text of a shape are named as well.
The cursor is not always on the target: a jump that selects a frame
or a drawing object, and one that finds nothing, move it nowhere, and
where it was left standing on the link, that link's own element must
not become the target. The pass over a shape's links can instead
start with the cursor on the target already, where a jump that did
reach it shows no move either, so there the mark names its own node.
Those keep writing /Dest, as do a target that was never tagged and
one whose element was never emitted.
The element carries its role and its content, not a name of its own:
a heading becomes /S/H1 with no /Alt or /T. veraPDF does not check
what a structure destination points at, so the test does.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: Ic76d80d46f130d549ebaacf175393a3d6ec77998
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12300
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit a6502c6e96d13425bcb4a3bf5731a998982d5957)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211150
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
The commit "tdf#163240 vcl,sw: keep one Link tag for a wrapped link"
made language, baseline shift and decoration come from the link's first
portion for the whole link, and noted subdividing by Spans as the fix:
those three are attributes of the Link tag, and there is now one tag per
hyperlink, so a change inside it had nowhere to go.
Open a Span in the Link instead. A span waits inside its link, so two
tags can be open at once, and an annotation goes to the link's own tag -
vcl takes it on a Link only, and a styled run crossing a line break
would otherwise leave that line's annotation without a StructParent.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I302d32f66fcb4e3b1eaf63b136bdcf96aaea17b7
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/11543
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 8f52d63f897aaf710dfe4cd9771f39689471abfd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211101
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
The commit "tdf#163240 vcl,sw: keep one Link tag for a wrapped link"
kept the tag across a line break. A ruby still split it, and a character
style on a ruby base pulled the following text into the Ruby element.
Tags were closed by a count, which callers decremented to leave one open
for the next portion; a count does not record which tag. Keep two stacks
instead: the tags this helper opened, and the tags left open for a
following portion. Close a deferred tag only while it is the current
element, so neither a ruby nor a fly closes a tag of another.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: Icdf793f149076db2b5dfac2b7668d0c414467427
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/11542
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 1936ac2268b9e603c64a03eff6eb8b7ecb8b56de)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211090
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Regression after commit a71da3b7a8
(tdf#156565 sw: PDF/UA export: split Link SE at line break,
2023-11-01), which closed the tag at each line break so that every
annotation had a tag to nest in.
A structure element could reference one annotation only, the
LinkAnnotation attribute being a value in a std::map; give it a vector
and emit an OBJR kid and a parent tree entry per annotation, so each
StructParent resolves to that tag. A page or column break still ends
the tag.
Language, baseline shift and decoration now come from the link's first
portion, at a line break as much as within a line - splitting the tag
at a break would only make the result depend on where the line ends.
LATER: subdivide the Link by Spans, which covers both.
testTdf157816Link and testTdf142806 expected a tag per annotation.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I493439a33b2cbc0eecf1af6b300859cd78ee87ba
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/11541
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit ade287e6a4edf7476e667f48082261deeddd96d5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211077
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
as part of the process of merging the Outliner code into the normal EditEngine paths.
So instead of keeping a bunch of information "on the side" and then having to merge information
from multiple sources, it all lives where it logically belongs.
Also take the chance to rename the depth/getdepth/setdepth
fields and methods to NumberingDepth, which makes the purpose
more obvious.
Change-Id: I314673ee1b9efa14f178ac34a122995a554cd788
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10551
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 284bbe0af12b96844976f30bb35ade3a327ea76d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210503
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Add an "Add [n] Columns" spin button to the Convert Text to Table
dialog, letting users choose how many empty columns (0-20) to append
when converting text to a table.
Instead of inserting separator characters into the source text (which
left those characters behind in the document when the conversion was
reverted), pass the requested column count down to SwNodes::TextToTable
and raise nMaxBoxes accordingly. lcl_BalanceTable() then creates the
extra empty boxes via InsBoxen() without touching the text, and
registers them with the undo object, so reverting the conversion
restores exactly the originally selected text.
Change-Id: I0bd01c31854cb5b4de0e63f0e3f0fbe88baf5c44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188311
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Being able to search for the end ($)
or the beginning(^)(\A)
of a paragraph is a common regex search criteria.
This patch adds the support needed to find the beginning.
It works for both forward and backward searches.
The problem is that the search code
generally assumes a non-zero-length match,
but of course the beginning position is exactly that.
So things get tricky trying not to skip anything
and yet still avoiding infinite loops.
So why doesn't it work in the first place?
-for Find Next: we do NOT want to do a bFirst search
because we are probably already there (both Point and Mark).
Otherwise it never gets past the first match.
For regular text, the Point is past the start of the match
(the Mark) so it doesn't find it twice.
-For Find All: on last node, can't forceMove, so infinite loop.
-bToNextPara force move handles the previous cases
-alternatively could be handled by tracking with a bForceMove
Wrap-around already works (want bFirst = true to test CurrPos).
Find-in-selection already works (want bFirst = true).
Find-All already works (want bFirst = true).
-all these MustStartWithCurrentNode
I was tempted to do something similar for FindAttr (tdf#129449).
make CppunitTest_sw_uiwriter7 \
CPPUNIT_TEST_NAME=testTdf147583_backwardSearch
Change-Id: I192b48d556e84f4f04c844ff65be03dc6c0c6707
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209094
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
SvxBrushItem::GetGraphic wants the name of the document the brush came
from, so take it as an argument and hand in SwDoc::GetLinkReferer
wherever a document is at hand, the Writer style, frame and background
shell paths included.
The dialog and example-window callers pass the name of the active
document shell through a new svx helper getActiveDocumentLinkReferer.
The hand-rolled copies of the GetPersist, HasName, GetMedium GetName
sequence elsewhere in sw now call SwDoc::GetLinkReferer too.
Change-Id: I8693d27869baed79962b2d5bdcb7b7e2c63227bb
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8200
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 18f91ac71710027479dfe9f206ae2207bad8f2b7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209827
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Repeat last change (Ctrl-Shift-Y) does work for numbering, but NOT
for repeating the first time, when the NumRule is first created.
That action was considered not repeatable, and thus it blocked
the entire request.
Well, nicely enough an attempt to repeat NUMRULE_CREATE
already does nothing at all, so don't invalidate CanRepeat.
I just reused the first existing unit test that I found with
nice-looking paragraphs that I could turn into numbering.
make CppunitTest_sw_uiwriter CPPUNIT_TEST_NAME=testFdo70807
Change-Id: If85fbe68dec934b0d76e8d4c70b925cf6ace78a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119201
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Drop the space character from the places that rejected it in
table names:
- Insert Table dialog: text filter on the name entry
- Table Properties dialog: validation in DeactivatePage that
showed an info dialog
- Navigator rename: forbidden characters list
- UNO SwXTextTable::setName: check that threw RuntimeException
Other illegal characters (".<>") are still blocked, since they
are incorrectly handled in formulas and chart data sources.
Also remove the now unused STR_WRONG_TABLENAME string.
Allowing spaces exposed that a chart linked to such a table lost
its data connection after save/reload, so fix the table name
(de)serialization on both sides of the link:
- ODF export (xmltexte.cxx) wrote draw:notify-on-update-of-ranges
wrapped in single quotes when the name contained a space; write
it unmodified instead (the attribute also allows a plain string,
not only a cellRangeAddressList).
- ODF import (xmltexti.cxx) only unquotes the legacy single-quoted
form when the value actually starts with a quote, so both old and
new documents are read correctly.
- SwChartDataProvider::convertRangeFromXML split the space separated
range list with a naive tokenizer that broke inside a single-quoted
table name; split it in a quote-aware way so the chart range still
resolves to the table (instead of falling back to the chart's
internal local-table).
Added regression tests:
- verify that the Insert Table dialog accepts spaces in the
table name
- verify that a table name with a space can be set via UNO
and is preserved
- verify that the Table Properties dialog accepts and saves
a table name containing a space
- verify that, after save/reload, the chart's
notify-on-update-of-ranges keeps the unquoted table name
- verify the convertRangeToXML/convertRangeFromXML round-trip for
a table name containing a space
Fix found with the help of Claude Opus.
Change-Id: I92bbed3bfed5c90af4242c396608dd3802cd126a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204381
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
The insert table of contents dialog box has a label used as a section
header which contains “Create %s from” where %s is replaced by the
currently selected ToC or index type. Previously this was generated by
replacing the %s part with the text from the drop down box to select the
type. This is difficult to translate for a lot of languages. Instead,
this patch adds a different string for each possible type.
Change-Id: I6a906be6ae88373e8f79b32d7bff87b77680f280
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209363
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
We had only one shared setting for the three script groups, which means
the same variation settings are applied to the three groups, which makes
no sense as they often use entirely different fonts.
Change-Id: I6f2a8b4d1c9e0357a6b2d8f4e1c7093b5a2d6e84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209222
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
As per the proposal, modified the, Create From, section title to include
the type of ToX to be made. Moreover, changed the wording to be more
accurate and cleaned up the relevant sections of the UI file that were
touched.
Change-Id: I15f7f2e7e4ec2406488824189f8e88797a64e85b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208750
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
The word “outline” in LibreOffice can refer to either the lines of the
shape of something or an overview of something. When the string is quite
short it’s difficult for translators to know which meaning is intended.
There seems to be quite a lot of cases where the translators have got
this wrong. In order to help them this patch adds translator comments to
a bunch of the strings to explain which meaning should be used.
Change-Id: I4b75cc829128633bc9382817fc574d55a09af8a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209037
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
It's annoyingly difficult to remove the links from the broadcaster,
drop that approach and do it a more direct and less reentrant way.
Get ~SwFormat and SwContentNode::ImplDestroy to report the death to the
tracker instead.
A flag on SwDoc keeps the common no-links case in those destructors to a
single test.
During ~SwDoc the hosts stay silent: the links administration manager
can already be unreachable through the half-destroyed document, and
~FillBitmapLinkTracker releases whatever is left without touching the
dead hosts.
SwContentNode::ImplDestroy skips disconnected nodes, the stack-built
working copies like SwTextNode::Update's SwContentNodeTmp that have no
nodes-array and no SwDoc. A node deleted for real still reaches its
SwDoc, since SwNodes::RemoveNode deletes nodes while they are still in
the array.
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ibbf15e4e17a7a08aa029c9d5df8f40b7a4a13e04
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4282
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 38ac5c0e6c7baf4de27498e5428d6279c753c97e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208603
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>