Age | Commit message (Collapse) | Author |
|
the attempt is made, but the shape isn't there, so m_bShapeSent
wasn't set, so it will get called again and the markstacks are popped
to many times. Lets set it when the effort is made.
Change-Id: I58dfe11316112cca6ff69ea518ed0b4908f25d6c
Reviewed-on: https://gerrit.libreoffice.org/47106
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I5725602be8a3da8e58a6885f64a7b720061c11ce
Reviewed-on: https://gerrit.libreoffice.org/47085
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I30121764303579a7cb4ded0f0f48cc1f8fff6c33
Reviewed-on: https://gerrit.libreoffice.org/46946
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: I5c3ffc03c26b3428f1f336e6ecba7838a1cf1157
Reviewed-on: https://gerrit.libreoffice.org/46764
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Regression from commit c72a1a74b5b1064fc9cdf9994b11fce26d866e26
(Related: tdf#112211 DOCX import: fix handling of missing first ind in
<w:lvl>, 2017-09-19), now that a numbering level can have default
properties, we need to differentiate between the case when the level has
real properties or it has only default properties.
Merging of properties is not necessary when the abstract numbering has
properties, but the "override" has default properties only.
Change-Id: Idbcbd0f66932514612e11fe82377f2b68ac9e403
Reviewed-on: https://gerrit.libreoffice.org/46751
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
The bugdoc is affected by the change of default vertical alignment, it
doesn't contain anything that would set the VertOrient property.
(regression from c79467ba954987f1d239c594c1e1b3af3f5515f6)
Setting the AnchorType property before adding the shape is actually not
as effective as expected: it does cause the old default vertical
alignment to be used, but does not actually set the anchor type because
there is no anchor position and so SwXDrawPage::add resets the anchor
type to FLY_AT_PAGE; it's less confusing to set the VertOrient
property instead.
Change-Id: Ib0a71d20d479776ab5e4c21c3dd13c0c307a045e
|
|
09:28 <@sberg> vmiklos, I think I ran into a scenario last night where I had
both `git add`-ed and non-added changes in a non-blacklisted file, and the
non-added changes violated clang-format (and the added ones did not), and the
commit hook complained
So make sure we validate the index version, not the filesystem one.
(And modify a formatted file to trigger CI validation of the hook change
itself.)
Change-Id: I6431b35ac50dd03741104b5709c5195d6ff28632
Reviewed-on: https://gerrit.libreoffice.org/46368
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
The alternative would be to clear them in
writerfilter::dmapper::DomainMapper::getPositionOffset(), but that runs
before writerfilter::dmapper::PositionHandler::lcl_sprm(), so it would
be too early.
Change-Id: I287b9a4025c4b1844ae467c48815b5d7ffe3f98e
Reviewed-on: https://gerrit.libreoffice.org/46279
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Disable the positioning for objects that are completely off-page.
During import, LO writer forces content always back to the page
and causes unwanted content on the page in constrast to MSO.
To achive this the top/left position of the content is compared to the bottom/right border of the clipping region.
A new compatibility flag OFF_PAGE_POSITIONING is introduced for
legacy rendering of legacy documents.
A unit test demonstrates the issue.
It resolves tdf#112443.
Change-Id: I263c129f9f09ed909ad777a34f8b9ffc84d871e4
Reviewed-on: https://gerrit.libreoffice.org/43313
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.
Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
... recalculate cell widths by factor pagewidth/tablewidth on export
This makes the import and export symmetrical.
Unit test included.
Some existing unit tests were updated:
- testTdf97035: the previous width of B1 cell (3571 twips) was not
stable enough on round-trip. Old code saved table with wrong width,
and incidentally that made it to output correct width of the cell.
New code outputs table width correctly, and drops unneeded cell width
adjustment on export, so the rounding error on initial import makes
output cell width wrong.
We have a cumbersome arithmetics to import cell widths from RTF:
1. In DomainMapperTableManager::sprm (case NS_ooxml::LN_CT_TblGridBase_gridCol)
we do convertTwipToMM100 on initial sizes in twips;
2. Then, in DomainMapperTableManager::endOfRowAction, we do
rtl::math::round((fGridWidth * 10000) / nFullWidthRelative) on the
mm100 sizes (the 10000 is UNO_TABLE_COLUMN_SUM from unotbl.cxx, which
allows to measure cell widths in 100ths of percent of table's width
instead of absolute sizes)
3. Last, in SwTable::NewSetTabCols, we do
lcl_MulDiv64<long>(nNewPos, rParm.nNewWish, nNewWidth)
where rParm.nNewWish is table's width in twips (again), and nNewWidth
is 10000. So, the three permutations give us twips back, but rounding
errors may make result differ from initial value (as in case of cell
width 1927 twips and table width 15527 twips, which results in 1926).
The unstable width that resulted in roundtrip error was changed by 1.
The changed unit test file is checked to still correctly test tdf#97035
- testFdo55525: previously, the testdoc was imported with wrong width
(too narrow); that caused rounding error on cell width calculation.
Current tested value is more correct.
Change-Id: I69112521c35b316ed6df11d5e4ff7336534164bd
Reviewed-on: https://gerrit.libreoffice.org/46094
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Ic1e79badedc031a588c0b07958002ad7c558ba82
Reviewed-on: https://gerrit.libreoffice.org/45987
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
In other methods it's always checked, so presumably it might be absent.
In caller sites (like OOXMLFastContextHandler::endOfParagraph), it can't
(and shouldn't) be checked.
Change-Id: Ia2edf8b121cac15e6454bc6321d76517fcdf110f
Reviewed-on: https://gerrit.libreoffice.org/45951
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
...and fix the fallout
Change-Id: Ie514bd95d5a9f990a887566619031e9844c40b92
Reviewed-on: https://gerrit.libreoffice.org/45195
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
We already deduplicated first line indentation since commit
3915bf2dc877d5f1140798e24933db0f21386a4a (tdf#95376 DOCX import: fix
incorrectly indented tab stops, 2016-01-26), the same is necessary for
before text indent.
Change-Id: I11394881d116f76922c1a706dd14b6a7cdf3c89f
Reviewed-on: https://gerrit.libreoffice.org/45844
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
MSO seems to write 100% width horizontal lines with a
"suggested" width of 0, so we need to calculate what
the proper width is.
A better fix would be to add "percentage-width" support
to the shape class itself, but that complex enhancement
is way beyond my abilities.
Limiting the patch ONLY to shapes with an undefined
width because it otherwise slightly increases the
size of various other unit tests, and I'm not sure
if those are desirable changes or not. The list of
the unit tests is documented in the bug report.
Change-Id: Ied80beca42a7513b8ea3b94b9c4ea9898e787200
Reviewed-on: https://gerrit.libreoffice.org/42128
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: I93257b0ddd41c649875124d6d5c5faeaa431bae3
Reviewed-on: https://gerrit.libreoffice.org/45218
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I5a1fa919b7fe8c91ac886a796426b5671573dbb6
|
|
Change-Id: I23806d8839bc6227311cb5f5d39c779f23e72e83
|
|
Change-Id: I98d99465d32b553ae55d76c99125f83e686ea2a1
Reviewed-on: https://gerrit.libreoffice.org/45215
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791
Reviewed-on: https://gerrit.libreoffice.org/45068
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Idadd0a64e41cd02f5167b275081c3576a6224b12
Reviewed-on: https://gerrit.libreoffice.org/45075
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
I (tried to) keep the RTF filter style consistent locally with astyle in
the past, but now that's redundant when we have an enforcing
clang-format mechanism in place. So drop the astyle config and switch to
clang-format in the RTF filter case.
To minimize backport pain, do this shortly before the libreoffice-6-0
branch-off.
Change-Id: I708dbeb0b5ad2afacc90029ee5abba9495f4601f
|
|
Change-Id: I4f9b71ff7767e90987bb40358fc46ed5d1d571d0
Reviewed-on: https://gerrit.libreoffice.org/44944
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I92e273aa57db8b4b9779d8d784c5bbad42d720e5
Reviewed-on: https://gerrit.libreoffice.org/44735
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
|
|
Change-Id: I4da2a768b6b55869c3a3d6f8a8d50dc018709acd
Reviewed-on: https://gerrit.libreoffice.org/44865
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91
Reviewed-on: https://gerrit.libreoffice.org/44654
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Page <aptitude@btconnect.com>
|
|
Here goes a bunch of related changes:
1. Create new character style based on current character properties
2. Apply created style to hyperlink object
3. Fixes to predefined style names usage in w:rPr
4. Disable style usage for hyperlinks in TOC: they will receive later
anoter styles
Change-Id: I1a228992eb7c1e259a6a811aa7f959debaae4f35
Reviewed-on: https://gerrit.libreoffice.org/41784
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Change-Id: Ie8a2c6462ddc708140e725847199c8234ab6b592
Reviewed-on: https://gerrit.libreoffice.org/44528
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
fix 5.4 regression from 4605bd46984125a99b0e993b71efa6edb411699f.
When there are columns, if a nextpage section doesn't contain any
other "page style" details we treat it as a continuous break,
If we don't, the column info becomes part of the style itself,
and not just a section property.
However, the very first section is troublesome - by definition it DOES
contain page style details, and so if the document starts with columns,
the default style would gain the column attribute. Usually that
results in a mess, so lets make sure that we avoid that also in
the case where headers/footers are defined.
Change-Id: I7e08a9218e4304206579ed064bc92c9604d4470e
Reviewed-on: https://gerrit.libreoffice.org/44505
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Justin Luth <justin_luth@sil.org>
|
|
Left indent was set to non-zero in the style, but direct formatting set
it back to zero. Teach deduplication to remove the
NS_ooxml::LN_CT_PPrBase_ind SPRM itself in case the last attribute was
removed.
Change-Id: I01b202f0241b02816b2b392326737b1150caffc2
Reviewed-on: https://gerrit.libreoffice.org/44385
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: I441876e73793e07d78f1eadb2b21c282845298c3
Reviewed-on: https://gerrit.libreoffice.org/44345
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: I533a7eb724b15e168a28dc92cd5962a39bc96e7c
Reviewed-on: https://gerrit.libreoffice.org/44313
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
After bd3c5c4c234e3dc6b89cd235321945a41a08d562 "[API CHANGE] tdf#65393 Import
signature line images from ooxml", UBSan CppunitTest_chart2_export had started
to fail with
> writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:1898:25: runtime error: downcast of address 0x61200070a440 which does not point to an object of type 'writerfilter::ooxml::OOXMLFastContextHandlerShape'
> 0x61200070a440: note: object is of type 'writerfilter::ooxml::OOXMLFastContextHandlerWrapper'
> 0e 10 00 20 50 86 4a 00 a2 7f 00 00 01 00 00 00 be be be be 00 00 00 00 00 00 00 00 00 00 00 00
> ^~~~~~~~~~~~~~~~~~~~~~~
> vptr for 'writerfilter::ooxml::OOXMLFastContextHandlerWrapper'
Change-Id: I028ef619766466e8cd9bb0ca09174b926fc6d23c
|
|
showing whether the signature behind the signature line is valid or not.
Change-Id: Ia6cca62812019f26d55d234cac767a9b4b7c8175
Reviewed-on: https://gerrit.libreoffice.org/40980
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
|
|
The problem is that we don't render ShapesWithWrapping.odt
the same as Word does:
https://beta.opendocumentformat.org/rendercompare/upload/223/86/191/1
The first shape in the file is anchored "as-char" and has no
style:vertical-rel or style:vertical-pos attribute affecting it.
If Word would write either style:vertical-rel="baseline" or
style:vertical-pos="top" explicitly, the rendering in LO would
be the same.
So the problem is that, for drawing shapes (note, text frames are
images, embedded objects handled differently), LO's default
vertical alignment is different, it is hard-coded in
SwShapeDescriptor_Impl::GetVOrient() as
SwFormatVertOrient(0, text::VertOrientation::NONE, text::RelOrientation::FRAME)
This effectively positions as-char shapes *below* the baseline,
which, while technically allowed, isn't really a good default.
So fix this by making the default alignment dependent on the anchor
type, so that as-char shapes sit on top of the baseline.
The ODF filter sets the anchor type before inserting the shape in
XMLTextShapeImportHelper::addShape(), however as it turns out the
various MSO filters insert the shape before setting the anchor,
which means the new default in SwXShape has an unwanted effect
on them, as inserting the shape causes the default to be created.
This requires changes to VML import to always set the VertOrient
property, and to RTF import to set the anchor type before inserting.
The DrawingML import is unaffected as it already sets VertOrient
for every non-as-char shape.
The testDmlTextshape "dml-textshape.docx" test still fails, but it
turns out that the change in alignment for this test document is
a bugfix, as it now has the same vertical alignment as in Word,
so adapt the test.
Change-Id: Ifcabd96a037515f7803f5474ec995f968b3b4de1
|
|
The problem was that the paragraph in question had no left margin, while
it should have one. The reason for this is that the style deduplication
logic took both the current paragraph and character style, but the
direct formatting only contained character formatting, so it tried to
emit the default values for all paragraph formatting.
This started to show up after commit
657c6cc3acec0528209a8584b838cd6de581c437 (tdf#104228 RTF import: fix
override of style left/right para margin, 2016-12-13), but the root
cause is much older, it was there since commit
321d7ec2071472b3765a00806715e7ad9f8a306f (fdo#82078 RTF import: fix bold
text spilling over to non-bold text, 2014-09-06).
Change-Id: If03240a85cc9de89afe9111c2d29de2672e407bf
Reviewed-on: https://gerrit.libreoffice.org/44097
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: Iaddd9e852388f5bb076c4bc6f8eee8a256581033
Reviewed-on: https://gerrit.libreoffice.org/43985
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
|
|
Although 2013 commit 60ec497e0e91354a616978be531d15d3efa3f559
added support for the other tcMar items, it omitted _start and
_end (perhaps because they caused unit test failures).
The document in bug 78508 proves that these are needed.
Testing whether the cell spacing matches the default table
spacing should occur before adjusting for MSO compatibility.
This fixes the three unit tests that mysteriously failed
when adding _start/_end support.
Unfortunately, these two fixes could not be committed
separately - the unit test fails unless both parts
are included. I couldn't figure out why.
Change-Id: I9507da48b629b9618c5ee790bf0088ce82fc5692
Reviewed-on: https://gerrit.libreoffice.org/43432
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Handled Header/Footer that are specifically for Left/Right pages the old
way again. Fix done previously was too much.
Change-Id: I0f9e8d23022300a06bd3fb45054cca1b03cf096f
Reviewed-on: https://gerrit.libreoffice.org/43749
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
Change-Id: I143e8df0e16ad921777b9caabde8e1c3f8bd61df
Reviewed-on: https://gerrit.libreoffice.org/43788
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
|
|
Upper, lower and contextual spacing are all stored in SvxULSpaceItem, so
if after spacing is set as direct formatting, contextual spacing has to
be set directly as well (having it in the paragraph style has no
effect).
Change-Id: Ie331c7561de7f2f16776a1613717e38fa083a541
Reviewed-on: https://gerrit.libreoffice.org/43735
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: Ic42219a7d733897ba47b26ffa0659c524798878e
|
|
no need to explicitly specify it anymore
Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec
Reviewed-on: https://gerrit.libreoffice.org/43567
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I7855c76e820efce96778b1c19ec71dffcc4b4abb
Reviewed-on: https://gerrit.libreoffice.org/43621
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I94535a51a87be097ff7356edff935877b42c3272
Reviewed-on: https://gerrit.libreoffice.org/43598
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
During parsing of the docx the paragraph without w:bidi
should take this value from style or from default paragraph properties,
Change-Id: Ie33f0d1cd3551c4053a47e6faf7dcac71765db65
tdf#87533 explicitly set writing mode value based on default properties
Change-Id: I3fcf514a901f0630d749ba0ddb6361d6db3ce1b5
Reviewed-on: https://gerrit.libreoffice.org/42895
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Change-Id: I90d220550d24fb964cf4e528a1f506033f05de95
Reviewed-on: https://gerrit.libreoffice.org/42896
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Change-Id: Ie29a05fec90c0d81b4a0399505b0a6761dfdef69
Reviewed-on: https://gerrit.libreoffice.org/43463
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I336d5a498f4f4523e03b1316b7adaca21df4de82
Reviewed-on: https://gerrit.libreoffice.org/43385
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
|