Age | Commit message (Collapse) | Author |
|
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: I96452a86187a6b03251614625445d1b18a5ee218
Reviewed-on: https://gerrit.libreoffice.org/50357
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
getPropertyValue("Surround") for a non-inserted frame can throw, but
hasPropertyValue("Surround") still returns true. So fix the regression
by just catching the exception, assuming that in that case no increased
spacing is needed.
Change-Id: I49a78ce8d41b4e1cc7d23721d5dc70f7550c94af
Reviewed-on: https://gerrit.libreoffice.org/50175
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
And use less ColorData in writerfilter and xmloff.
part of removing ColorData.
Change-Id: Ia1c57bf837ae814e7642cf1c7de2eb7ada7a1500
Reviewed-on: https://gerrit.libreoffice.org/50028
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Commit 17e51f427b3f0cec74ac8e0a1b3f51189006ae6f (DOCX import: first page
header should always set default headers as well, 2014-11-21) turned on
header/footer of follow page styles of first page styles when the first
page style had the header/footer turned on, but failed to consider if
<w:titlePg> is present or not. When it's not present, the first page
header/footer should be ignored.
An additional problem is that by the time
DomainMapper_Impl::PushPageHeaderFooter() is called, <w:titlePg> is not
parsed yet, so we can't act accordingly.
Fix the problem by moving the check to
SectionPropertyMap::PrepareHeaderFooterProperties(), which runs at the
end of the section properties, where all required info is available,
there we can just check for m_bTitlePage.
This allows reverting the two changes to existing testcases in
CppunitTest_sw_ooxmlexport6 from the original commit as a side-effect.
Change-Id: Ic628adab99a4b148fcfd66ca39d0cf81eb7dd9f1
Reviewed-on: https://gerrit.libreoffice.org/50014
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
... like Word 2013 does, when the version string indicates that the new
layout is wanted.
An alternative to this change would be to add a new sw layout
compatibility flag and handle this at a layout level (somewhere in
SwAnchoredObject::GetObjRectWithSpaces()). The downside of that approach
is that once a layout flag is added, it's not preferred to tweak its
behavior, while doing the same at import time is not a problem.
Also it's better to have a flag for something which has clear behavior
in some spec / implementer notes, which is not the case for this
problem. (I've mailed dochelp@microsoft, no answer so far.)
Change-Id: Ibad28d27e4bcbe1991a3be1c686064e18e9ffa4d
Reviewed-on: https://gerrit.libreoffice.org/49733
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: Ifafd7338ddfec8b707b5ddf4acb39512faf186da
Reviewed-on: https://gerrit.libreoffice.org/49325
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
|
|
Change-Id: Ic3cbabc420c7856682b889528043563622997c14
Reviewed-on: https://gerrit.libreoffice.org/49235
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
|
|
Commit c761df1e42fd11acc5fc05b0baacd803c3788ca6 (tdf#84678 DOCX import:
fix handling of textbox margins, 2016-10-25) uncovered a previously
harder to notice problem that single-paragraph shapes have an incorrect
upper paragraph margin for the first paragraph. Now that the shape
margins are correct this problematic paragraph margin causes crop of the
shape text.
Fix the problem by adapting the DOCX import to the WW8 import's
SwWW8ImplReader::AppendTextNode() (the "If this is the first paragraph
in the document" part), where it seems the first paragraph is not only
the literally first paragraph in the document, but also the first
paragraph of shapes as well.
Change-Id: I9d99b9cfabae2c9a7c33eefefb5a9f008669e93d
Reviewed-on: https://gerrit.libreoffice.org/49617
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
unique_ptr don't need explicit nullptr initialization, same
goes for VclPtr in ImpEditEngine.
Change-Id: Id8f3163c2719bee6ee2724cae98449d564be5535
Reviewed-on: https://gerrit.libreoffice.org/49559
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
1. Allow ooxml / rtf import the ruby aligned on the right side
( rightVertical or jc=5 ) as css::text::RubyPosition::INTER_CHARACTER.
2. Allow rtf / ww8 export of css::text::RubyPosition::INTER_CHARACTER
as jc=5.
Though rtf filter can save and load the new ruby position,
character format seems lost. The reset of the MSO formats have
other issues that they can't make roundtrip yet.
Change-Id: Idb77423842f43abc375a1282a52b0bc6f20049e4
Reviewed-on: https://gerrit.libreoffice.org/49177
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
|
|
Change-Id: I9c4510cb91e2572a3ab2b62497dc4dd9fd1119c8
Reviewed-on: https://gerrit.libreoffice.org/49319
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Unit test included
Change-Id: I8e3338d7df431bd016caa4e06e684fbd189127c4
Reviewed-on: https://gerrit.libreoffice.org/49324
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
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>
|
|
Only shapes were handled previously.
Change-Id: Ie03947d7ae065729ef85addddb1ede32637622f2
Reviewed-on: https://gerrit.libreoffice.org/49178
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: I8a9239667b0d80ee2fa6ebbc8a19ba4c0076c2fb
Reviewed-on: https://gerrit.libreoffice.org/49107
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
This fixes loads of warnings like this one:
warn:legacy.osl:22335:22335:writerfilter/source/dmapper/StyleSheetTable.cxx:1611: Exception in StyleSheetTable::getOrCreateCharStyle - Style::setPropertyValue
during import. They are harmless as we catch the exception, but they are
just noise. It seems the code that transforms grab-bag pseudo-props into
real props was added in commit 4c3ba3a413be7339115ea5e6edc825a8434cd345
(fdo#75757: Remove inheritance from std::map., 2014-07-26), which is
supposed to be a pure refactoring, so just remove this problematic
transformation.
Change-Id: Ibf45bfedc661f9e065405c47623516c4026148a4
Reviewed-on: https://gerrit.libreoffice.org/49105
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
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>
|