Age | Commit message (Collapse) | Author | Files | Lines |
|
During inserting of the text from the external document
we should not change original default styles in
currently opened document.
Added unit test.
Change-Id: Ida754a0da5efaaa043464cd807c0b52cfb0d5670
Reviewed-on: https://gerrit.libreoffice.org/48826
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
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>
|
|
Horizontal mirror on the UNO API level, mirror on the vertical axis
internally.
Change-Id: If142274a8f81a6875059a2651af6d8470870a36a
Reviewed-on: https://gerrit.libreoffice.org/48843
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: Iedd82d035454c940d76a94c7e910c81827c1389c
Reviewed-on: https://gerrit.libreoffice.org/48828
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
A unit test will come in a separate commit
Change-Id: I89dd9cae6e099509d21398e29ccf6412791accc2
Reviewed-on: https://gerrit.libreoffice.org/48781
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Unit test will come in separate commit
Change-Id: I4cd6983d708868883c766b239cb57752106a59bf
Reviewed-on: https://gerrit.libreoffice.org/48780
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
It is confusing having three undocumented Find functions.
Reduce by one - either search on the imported WW8 (ISTD) name
or on the internal (converted) name.
The one remaining use of ByStyleName was testing against an
already set property, so by definition it was set using
convertedStyleName. (Plus, that was my code anyway...)
Change-Id: If5a352bedb7d297698f449fbb629a1350e27c51c
Reviewed-on: https://gerrit.libreoffice.org/48037
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
|
|
The default style was missing out on all of the fixes made
by LN_CT_PPrBase_pStyle. That included right margins, and
numbering styles.
Essentially, this change is just copy and paste from one function
to another. I tried to make all of the logic changes
separately in previous commits. So the adjustments here are simply
to accommodate different variable/function names. So if this
causes any regressions, it ought to just be related to either
applying later on (at finishparagraph instead of
LN_CT_PPrBase_pStyle or because it includes the default style.
One important note regards the preparatory
commit 254c80037a3939c110d5c66fef6c28caf47625e5.
If this commit is reverted, make sure to check that commit
to add a conditional wrappers around GetCurrentNumberingRules().
Change-Id: I9827b2cd1a74a13cf18ada9baa221c5c567a7391
Reviewed-on: https://gerrit.libreoffice.org/48458
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
[MS-RTF] specifies in "Conventions of an RTF Reader" section
("Change Formatting Property" action), that if a control word
requires a parameter, and it isn't specified, then a control-word-
specific default value is used. This patch implements the said
rule.
[MS-RTF]: https://www.microsoft.com/download/details.aspx?id=10725
Change-Id: Ic0b76bf16b01c65e1b89c243698fd46fd6426d90
Reviewed-on: https://gerrit.libreoffice.org/48375
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
This is prep work for tdf#95377. This unit test avoids the unique
chapter-numbering style (from the heading paragraph styles) and just
has a basic, user-created style inheriting from Default.
Also unique about this unit test is that the numbering is
specified by the "Default Style" which takes a rather unique
code path and exposes even more problems.
We already know the listId through a recursive function, and
GetCurrentNumberingRules only looks at the current style which
isn't good enough. Moved that modified function into
DomainMapper_Impl since I will need it there for bug 95377.
Additionally, ensure that directly applied paragraph properties
are not overwritten. That also meant changing the order, so that
paraStyle properties are directly applied to the paragraph before
applying RightMargin and friends.
Change-Id: I5c1fb71d64727be9d9105f287150daf4e0ff413d
Reviewed-on: https://gerrit.libreoffice.org/48457
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: Iac6265094572c57f421b0533db2c90a41b2ef427
Reviewed-on: https://gerrit.libreoffice.org/48492
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Change-Id: Ieef0e3f21eb12cb5b72d39da4bc0a8c60dd0d5ce
Reviewed-on: https://gerrit.libreoffice.org/48545
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
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
|
|
The sStyleIdentifierD for the default style is "Normal".
FindStyleSheetByISTD uses sStyleIndentifierD for its comparison.
SetCurrentParaStyleId() is used to save the WW8 provided name.
Thus, the default style should do the same.
The SetCurrentParaStyleId was added here by
commit 4abb20ee162ff874cc143fd952f72d30ddc9d136
Author: Miklos Vajna
Date: Tue Jun 19 17:36:28 2012 +0200
Also removing the static variable, since it serves no purpose.
Change-Id: I58659e9d809c32dd799fb46217971707991b2803
Reviewed-on: https://gerrit.libreoffice.org/48034
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: I7c695073d9a9d3b7a641d6eb9fe01a47d8c3a504
Reviewed-on: https://gerrit.libreoffice.org/48392
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
The case '...topMargin' was not caught for setting a relative
vertical position in GraphicHelpers. The test file demands a '7' here,
which stands for 'PAGE_FRAME'. The '7' was overwritten in GraphicImport in case
'LN_CT_Anchor_positionV' by a call of 'resolve'.
For a better overview a switch is inserted here.
Change-Id: Ie98209fe445ecbba15c3dafe5980ca52421126f8
Reviewed-on: https://gerrit.libreoffice.org/47905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
This is prep work for tdf#95377. I need this function to
run when there is no TopContext. This function doesn't do anything
with the context, so in that regard I wonder if it is even
necessary? My guess would be that it is a leftover piece from
discovering the fix for n75883.
However, to avoid causing a regression, I'm just pulling this test
into the calling functions. (Of the three instances
calling this function, two need to be contextless..)
This is not truly NFC because if the followup patch is reverted,
then this one will cause a change. But that is actually OK, because
if my follow-up patch breaks because of these two functions changing
to become contextless, then I'll be better able to pin-point the
reason for the regression.
Original commit adding this function was
commit 2123ede032ca64f696ef54af4ad3238974ca2b5d
Change-Id: I471aa852aa48527d69e0343a2ac28fa6e8acb209
Reviewed-on: https://gerrit.libreoffice.org/48062
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Justin Luth <justin_luth@sil.org>
|
|
Change-Id: I1092115a0ceb3a5e6680a4b724b129f98a892c42
Reviewed-on: https://gerrit.libreoffice.org/48128
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...instead of having to add it to more and more individual .cxx files, as the
need arises.
Change-Id: If1e893c79abf1c1bb7fb7b89dcb9bd423a7f1b94
Reviewed-on: https://gerrit.libreoffice.org/48108
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Both sStyleName and sStyleName1 were part of the original
fork from the OOo project. I'm
not sure if/how it was ever used, but sStyleName1 is unused now.
Change-Id: I71b54645aa0615101529aa4d5008973f740da1f0
Reviewed-on: https://gerrit.libreoffice.org/48036
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Justin Luth <justin_luth@sil.org>
|
|
Originally, StyleIdentiferI was the string name, and
StyleIdentifierD was an integer. That changed a long
time ago.
Both identifiers are only assigned a value once, and
both are given identical values at the same time.
Thus, one is completely redundant and is being removed.
Change-Id: Ia7e9bbeec53110fa8e56cdfb13b9871486f335fa
Reviewed-on: https://gerrit.libreoffice.org/48035
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Justin Luth <justin_luth@sil.org>
|
|
Change-Id: I5fff9ccb1bc74b85ee378439ffa2272583ffcb0f
Reviewed-on: https://gerrit.libreoffice.org/48024
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
|
|
Change-Id: Id3d1a07922d4ca05e3bbf61d4b5797a30fc5b23a
Reviewed-on: https://gerrit.libreoffice.org/47872
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
This fixes the inability to insert a numbered Heading into
an existing sequence in an opened document. Before it would
start a new sequence, but now it connects to / adjusts
the other numbered Headings.
LibreOffice has built-in handling for "Chapter Numbering".
All of the formatting for this is tied to the paragraph stylename.
Since MSO has a different structure, in docx format these
are defined as "regular" styles with an OutlineLvl component.
During import, that style information was copied to LO's special
Outline chapter numbering style. *From this point on, the
"regular" list style should no longer be referred to.* Numbering is only
defined by the paragraph stylename (which by definition is "Heading X").
The unit test I am hijacking has an unchangeable Paragraph Numbering
style of "Outline Numbering" and not WWNumX. So, in reality the
document ought to require the style name to be the internal Outline
style like it originally was.
A followup patch allows this to round-trip.
Change-Id: If5d544529fa32d4abaa2b46403bc61c028e53f21
Reviewed-on: https://gerrit.libreoffice.org/47827
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: I06ab6063a4d349859851065b96442564598f9d14
|
|
The code moved to NumberingManager.cxx I believe.
Change-Id: I6f21e913e8fa52ffd47a3004137e7b5043421613
Reviewed-on: https://gerrit.libreoffice.org/47826
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
|
|
unused even on the day when the function was created in 2009:
CWS-TOOLING: integrate CWS os124.
Change-Id: I20e46d6b55f307744851fc4fe1773549535bcfd7
Reviewed-on: https://gerrit.libreoffice.org/47448
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
|
|
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files
Change-Id: I94d069b3605b45de958c3541ff93d3ae70955ea3
|
|
with something like:
git grep -nP '(.*)\s*>\s*(.*)\s*\?\s*\g1\s*:\s*\g2'
Change-Id: I60b9a3a2a09162bc0de4c13fdde2c209696e5413
Reviewed-on: https://gerrit.libreoffice.org/47602
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Numbering definitions have two levels: abstract ones and overrides. The
full definition is a merge of the two. Make sure that when defaults are
added to the numbering level properties, these are only added for
abstract ones, otherwise overriding e.g. the start value of a level will
also pull in other, unwanted default properties.
Change-Id: If0273ebc6b49476df17b09d636489a3bfb717334
Reviewed-on: https://gerrit.libreoffice.org/47619
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: I2040315707674dc99a37aedb96ac61dca274c13a
Reviewed-on: https://gerrit.libreoffice.org/47348
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
slightly less restrictive check when calling functions
Change-Id: I35e268ac611797b1daa83777cda02288a635aa32
Reviewed-on: https://gerrit.libreoffice.org/47259
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I237936d62d0f1b17574dd88b5c9de932dc03238e
Reviewed-on: https://gerrit.libreoffice.org/47214
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I57f180c9e28d5f2439efcc1f2726d8fabc108bc9
Reviewed-on: https://gerrit.libreoffice.org/47176
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
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>
|