Age | Commit message (Collapse) | Author | Files | Lines |
|
The 2nd paragraph of the bugdoc has a \fi set, but it has to be ignored.
The reason for this is that the \fi is a repeated property from the list
definition, but there \levelnumbers has invalid contents, which means
its \fi has to be ignored, including their repeated values in paragraph
direct formatting.
There was already code to insert implicit defaults as paragraph direct
formatting based on list properties, this does the opposite: remove
paragraph direct formatting based on the list state.
This requires tracking the ignored values in a separate structure, since
the normal list properties no longer contain the information we need to
be able to remove paragraph formatting. (At the moment this tracks only
\fi, but can be extended to other properties if it'll be necessary.)
Change-Id: Iff542cb76c66b7fc7ae4e07ade84701e24a74f1a
Reviewed-on: https://gerrit.libreoffice.org/52352
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
which triggered a lot of changes in sw/
Change-Id: Ia2aa22ea3f76463a85ea077a411246fcfed00bf6
Reviewed-on: https://gerrit.libreoffice.org/48806
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iea48bb3304e2688b440c5c396ed340ffffa11568
Reviewed-on: https://gerrit.libreoffice.org/52121
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Otherwise, if SRCDIR is a read-only tree, CppunitTest_sw_rtfimport would fail
with the
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, pStream->GetError());
from <https://gerrit.libreoffice.org/#/c/51992/> "Check successful stream
creation". (And before that, it would have more obscurely failed with the
CPPUNIT_ASSERT_EQUAL(2, getParagraphs());
in testTdf90260Par failing with 1 vs. 2.)
Change-Id: I55fcc932c66e6a4b84cd391f8821257a0de2abb8
Reviewed-on: https://gerrit.libreoffice.org/51993
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I220905486cc2287f2157f57b537c0df0b325bd36
Reviewed-on: https://gerrit.libreoffice.org/51994
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Iea7dea13684a15ed1960d2c8562253f5a2e64c34
Reviewed-on: https://gerrit.libreoffice.org/51992
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
This is the same mechanism that was added in commit
1be0a3fa9ebb22b607c54b47739d4467acfed259 (n#825305: writerfilter RTF
import: override style properties like Word, 2014-06-17), except that
here the reference is a list definition, not a paragraph style.
Also, this commit only implements the part that inserts explicit
defaults for not repeated properties, not the actual deduplication, as
that already works at a dmapper level.
(Saving the bugdoc as DOCX, it's visible in document.xml that DOCX marks
these defaults explicitly:
<w:ind w:left="0" w:right="-6" w:firstLine="0"/>
but RTF does not, so the right place to fix this is in the tokenizer.)
Change-Id: Iec88d9bf1032d1d89194bd272500d6780c3c2224
Reviewed-on: https://gerrit.libreoffice.org/51589
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
The only reason the DOCX equivalent of the bugdoc was imported correctly
is that these default zero margins are simply missing from the DOCX
markup, suggesting Word ignores them. We now do the same, this way
the stripped down document's 3 paragraphs all have different margins as
expected.
(Also rework the testTdf112211_2 testcase to test the original problem
better: I verified that the layout is unchanged before/after this
patch.)
Change-Id: I88d56c27c19e070e983c3392f99bca96597cd56e
Reviewed-on: https://gerrit.libreoffice.org/50391
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: Ifb3aa4f79b9accc34b2010b762e596fadae9fd09
Reviewed-on: https://gerrit.libreoffice.org/49297
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
So that paragraph properties inherited from numbering properties can be
properly overwritten with direct formatting, even when we have to take
style deduplication into account.
The OOXML tokenizer already did this,
writerfilter::dmapper::DomainMapper::sprmWithProps()'s
NS_ooxml::LN_CT_NumPr_numId depends on this, so adapt the RTF tokenizer
accordingly.
Change-Id: Iec6026d146f08a9d06266763d01ed626a2d1f3d1
Reviewed-on: https://gerrit.libreoffice.org/49247
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
This used to work in the past only because the left indent was also
imported as a direct paragraph formatting, but that is not the case
since left margin of lists is deduplicated during import after commit
c9dee880d88305312094b311abdae155e452bf14 (tdf#104016 RTF import:
deduplicate before text indent from numbering, 2017-12-05).
Change-Id: I1c9be30700c51ef97fb274e8781d6008db3121d8
Reviewed-on: https://gerrit.libreoffice.org/48855
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: Id64041090a0be4df847f2962e32011ef2500de0e
Reviewed-on: https://gerrit.libreoffice.org/48760
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I74724ba61aadfad19501a87ab548219ea0a1f236
|
|
The bugdoc is affected by the change of default vertical alignment;
apparently it's not even possible to set the vertical alignment of a
Word 6 drawing object (\do) so we have to set the Word default.
(regression from c79467ba954987f1d239c594c1e1b3af3f5515f6)
Change-Id: I4084a7a7e2a55f864cb569e04632e034d59eefdb
|
|
Change-Id: I6f2822e7068754a1b5e70e401247a36b214147e3
Reviewed-on: https://gerrit.libreoffice.org/48079
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I2040315707674dc99a37aedb96ac61dca274c13a
Reviewed-on: https://gerrit.libreoffice.org/47348
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: I4c14679d5cb91dc3cf35c3f47cb9120d3ee0f9cf
Reviewed-on: https://gerrit.libreoffice.org/46212
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
|
|
... 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: I7ff67ff952ecb2682a163866b91a9f2621dde935
Reviewed-on: https://gerrit.libreoffice.org/46210
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.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>
|
|
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
|
|
lcov points out this was not covered so far.
Change-Id: I11ff9eb8a819268382e6564be873403c47ec2176
Reviewed-on: https://gerrit.libreoffice.org/45018
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Added different branches for Windows/Linux because of differences in
linebreaks. Recommit with ifdef guard for preventing tinderbox failure
Change-Id: I08c45e3e653990a47a85aee6f63f063b2f9385a7
Reviewed-on: https://gerrit.libreoffice.org/44677
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
lcov points out this was not covered so far.
Change-Id: I7c5047b75f6548e7738e6118f8d3c0eb9ed76045
Reviewed-on: https://gerrit.libreoffice.org/44702
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Seems the test doc is fragile under font replacement.
This reverts commit 743efc3d4b086d20abd1449bcb73e9bce506c083.
|
|
Added different branches for Windows/Linux because of differences in
linebreaks.
Change-Id: I17397155292e173bf698fa2680aaaf2711c064cf
Reviewed-on: https://gerrit.libreoffice.org/44358
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Change-Id: Ifc3c4c31a31ee7189eeab6f1af30b94d64f2f92a
|
|
Commit 56a695fddb915bcba13b088b5b2b4e0841d4acbc (tdf#112211 RTF import:
fix unwanted direct formatting for left indents, 2017-09-26) fixed left
indents, and given that it was a regression fix, left the other indent
types untouched.
As it has been pointed out in the bug comment, the original bugdoc
actually needs the other indent types removed as well, so let's do that.
Change-Id: Ia4ea7e2214b7df27536f46b046f90bd703c107be
Reviewed-on: https://gerrit.libreoffice.org/43303
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: If80c53978106789824e6154db396baeecc1969dd
Reviewed-on: https://gerrit.libreoffice.org/42876
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
|
|
\tx in the list level definition has a different meaning (we should map
it to the ListtabStopPosition UNO property), compared to when it's used
as a plain text property.
Change-Id: I7b98ae3d82bbd2c4ad41d0d7f4ad50525c4d0f9a
Reviewed-on: https://gerrit.libreoffice.org/41442
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
In the enum types that caused the problem look like this when I dump
then:
EnumType 0xdb45770 'enum SvxFrameDirection'
`-Enum 0xdb456d8 'SvxFrameDirection'
SubstTemplateTypeParmType 0xdb61200 'enum SvxFrameDirection' sugar
|-TemplateTypeParmType 0xd7518f0 'EnumT' dependent depth 0 index 0
| `-TemplateTypeParm 0xd7518a8 'EnumT'
`-EnumType 0xdb45770 'enum SvxFrameDirection'
`-Enum 0xdb456d8 'SvxFrameDirection'
Change-Id: Id8fedabe43b7a27df61a2320a9acbf54d2dc7882
Reviewed-on: https://gerrit.libreoffice.org/41169
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Regression from commit f528f9499bd91b700c549575e88fa102cfffede9
(tdf#106953 RTF import: fix missing paragraph left margin, 2017-05-16)
where I fixed the parent of the ooxml::CT_NumPr_numId token at one
place, but forgot to adapt RTFDocumentImpl::popState() accordingly.
Change-Id: Ibddd2486a50f284e11c2cd96339e7140b427aae1
Reviewed-on: https://gerrit.libreoffice.org/40381
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
This serves two purposes. It helps to prevent regressions
and it allows focusing on features that still don't export properly.
Also created rtfexport3 since the other two are already very full.
Change-Id: I7d580f575c1debe344275869fefcbba6e29cbad6
Reviewed-on: https://gerrit.libreoffice.org/39842
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
|
|
Change-Id: Ia96172489eec09607113d388a5b683bb6e0d2dec
Reviewed-on: https://gerrit.libreoffice.org/39290
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Some paragraph-level run properties affect the current list style since
commit 2123ede032ca64f696ef54af4ad3238974ca2b5d (n#758883 dmapper:
paragraph-level run props should affect numberings as well, 2012-06-19).
This was extended for any run properties in case of RTF since commit
c1f8437dbed0e8b989e41a345ef7e658a6e8a4cd (fdo#83465 RTF import: handle
font of numbering, 2014-09-25), as RTF doesn't really separate the
paragraph-level and the other run properties.
However, field formatting clearly should affect only the field itself,
so disable this mechanism in that context.
Change-Id: I6df7488e99e44f3ba7e17bf09ce590c88151e043
Reviewed-on: https://gerrit.libreoffice.org/38980
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
When Watermark size is set to Auto in the MSO,
the saved value is equal 1pt. Before this patch
in this case Watermark was invisible due to small size.
Change-Id: Ia2028a6547cf98dd31031305bcc5375625b83fe0
Reviewed-on: https://gerrit.libreoffice.org/38883
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Made it so Header/Footer of a certain section can only be added once.
This change should only affect RTF-Files.
Added Unittest
Change-Id: I55025984e343d04da7fc0f201164ef39e3a26202
Reviewed-on: https://gerrit.libreoffice.org/37814
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Make sure that even if the text append stack is empty (and we return
early) the table manager push/pop operations are in sync with the shape
start/end, otherwise we'll have an empty table manager stack.
That is a problem as
writerfilter::dmapper::DomainMapper_Impl::getTableManager() assumes that
it always has at least one element.
Change-Id: I92b3381e820bc8eaeb351532a6ce8909490c0f30
Reviewed-on: https://gerrit.libreoffice.org/38490
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Regression from commit 26d40686128e70916a636e20f5ccc5763bbb6cc8
(fdo65400: fix for Character Shading being lost, 2013-06-23), though
much more visible since commit a9e029ace41562e28e9242d63230ad1ca275f5d3
(tdf#104744 RTF import: fix unexpected zero para left margin wrt style
dedup, 2017-01-03), when I fixed the RTF filter to not duplicate the
"align paragraph to center" paragraph style property as a direct
formatting as well.
The problem was that the CharShadingValue property was not added as a
paragraph style property, while in general all character properties are
also allowed on paragraphs and paragraph styles as well.
Change-Id: If1bdad96e45adc545a81a1f550ab7ccb3591c4f6
Reviewed-on: https://gerrit.libreoffice.org/38210
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
See commit 3915bf2dc877d5f1140798e24933db0f21386a4a (tdf#95376 DOCX
import: fix incorrectly indented tab stops, 2016-01-26) for the various
sources that can determine the paragraph indentation.
In this case the problem was that too aggressive RTF style deduplication
removed a direct indent, which then meant a fallback to the ind-from-num
value, not to the ind-from-parastyle one.
Change-Id: I3b47b2bbeaaedf405baef24505d23dc49bd01865
Reviewed-on: https://gerrit.libreoffice.org/37660
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: Ie14c4d76cb61cfbe0410103adfc1afc8ade0f3e0
Reviewed-on: https://gerrit.libreoffice.org/37146
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I3ec5a60fff8577677eaa4977cddf69bec4078cec
|
|
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca
Reviewed-on: https://gerrit.libreoffice.org/36896
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
See commit 1be0a3fa9ebb22b607c54b47739d4467acfed259 (n#825305:
writerfilter RTF import: override style properties like Word,
2014-06-17) for the context.
Here the problem was that various details of the top border were removed
during the style deduplication, but not the top border sprm itself. That
was interpreted (correctly) by dmapper as "no border", rather than
"inherit from style".
Change-Id: I3dec8df789fc7b75fccfff91ce66f457fecd2f6e
Reviewed-on: https://gerrit.libreoffice.org/36661
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: I95fa42f4ef0580734b605df859c1660b29adb8b2
Reviewed-on: https://gerrit.libreoffice.org/36499
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
|
|
git grep -l "[ _\.]THROUGHT" | xargs sed -i 's/THROUGHT/THROUGH/g'
git grep -l -i "[ _\.]THROUGHT" | xargs sed -i 's/throught/through/g'
In ENUMs: THROUGHT = THROUGH (preserved as valid alternate spelling)
In ooxmlexport8 - unit test confirms THROUGH = THROUGHT
Change-Id: Iae0fef9a8adcb96761989f38903a24ffb1b91e77
Reviewed-on: https://gerrit.libreoffice.org/35998
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
It's not a newline but yet another one of those bizarre RTF-encodings.
(regression from 10e733908038407791f9c14af2a86417cc4a653c)
Change-Id: I568050b031b95ac0b6ebfa1a0c39107e62f68bed
|
|
Change-Id: Ifd5522ce1be31f9c9bd432ccf40a0c971063c8da
|
|
Nested namespaces were always declared in new lines in these files,
let's keep the consistency.
Change-Id: I1dcfdd2b1f54ec56b3554f3c0095513cec33e49c
|