Age | Commit message (Collapse) | Author |
|
Change-Id: I0dfc7e10250e2690fa34821f8f73cfe6306d2417
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141874
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: Ia51a023102f83406d83f5bfa92bb7dda31ee9dc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141872
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Before it was inheriting from SdModelTestBase for no real
reason
Change-Id: I51ecb82a5e867808c5fd39d2a0aa093ad097cb1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141868
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: I31c941677b45c0a82e3fe688d40b63796a46d26a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141863
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: I8bd1c930896935770cdf7453550340cbc8b79f55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141862
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: I0f04fae8b4ff922f5e14ae413cd63cc92a66077e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141797
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: Ib630949127d7087cddbb92737528690cafe9be26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141782
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: Ia8874d65ea8d7eb26d10b18e37ba2bac1a7d756b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141730
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
In the current implementation of ::Color, it is not possible
to have fully transparent white text (since it collides with
COL_AUTO and gets interpreted as Automatic Color).
Implement a workaround for import of fully transparent white
text color so that it isn't interpreted as the magic value
COL_AUTO (i.e. instead of fully transparent #FFFFFF import
as fully transparent #FFFFFE).
Change-Id: Ide750093ef8a89f1424ddd8f4e9ee1e18209f2ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141439
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I0a88ecc55638d8c6ee06715db8c03d6327666215
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141655
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: I8f5f957557612ce78036d962968a3e9fef113cf8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141291
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: Iafcab8d5b21f9562838c3494cbfd75090dd6e010
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141152
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
And use an overloaded helper function with a better (?) unified name
to show that the result is not an O(U)String.
Change-Id: I8956338b05d02bf46a6185828130ea8ef145d46b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141203
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
which makes it easier to know what each variant requires
to stay on it's happy path
Change-Id: I3275a2543573367714bc78092e882f6535507285
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140469
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Choose mc:Choice in a:graphicData element
if the selected p:oleObj element has a shape id
to avoid of shape duplication which created also
bad layout/overlapping because of the different Z-order
of the duplicated shape.
Change-Id: Idecff4903c2d637bc82353f13352cac72413cec1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140041
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
Change-Id: Idd22956c1b5412d7bb02fd99fd2e3ee54284c4bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140491
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Implement import BiLevel effect's threshold value.
If threshold isn't exactly 50%, we can't map it to the doc model.
Therefore as a workaround apply the BiLevel (Black/White) effect with
specified threshold directly to the graphic.
Change-Id: Ib24d149d74b103d926560708c68bb937b02c4cfe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140136
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
MS Powerpoint doesn't have automatic colors unlike Word or Excel.
Therefore on export the automatic text color should be first resolved
and then exported.
Change-Id: Ied2c3a4235da403350d8518a3414ff6a372b57a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140059
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I151c66479053b9b5b7699a4938a622b4320aeaa0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140104
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Commit c70ee4a6b9071468255e5d4fdb893e9c9bdf4fad has among other things
enabled, that a shape in Impress can use a writing mode corresponding to
vert='vert' in a pptx file. It is new value text::WritingMode2::TB_RL90
for property WritingMode. It is written with value 'tb-rl90' to attribute
loext:writing-mode in ODF.
The same commit has enabled, that the writing mode 'bt-rl' can be used
not only for frames in Writer but for shapes in Impress too.
The unit tests here test round-trip of these property values.
Change-Id: I8dcf9e234d25c2769ed60edd0e435c3606f368bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140066
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
|
|
hopefully this will fix the sporadic failures of
UITest_impress_tests2 in Jenkins
Change-Id: I3df2484b07a0cf7a0efdafb7235c3ff83f187200
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139928
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
it is very small, and this means we can get rid of some ugly runtime
symbol loading
Change-Id: I1d5f5da6a9e908ccd018915bf09b9ab97d67feb6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139866
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Commit 7e23cbdbb6ec0247a29ed8a8f744c01e10963ea0 changed the code so,
that TextPreRotateAngle is used to track ooxml vert attribute. This
patch changes it so, that the style attribute WritingMode is used.
Now text direction can be written in 'writing-mode' attribute in the
graphic properties in ODF, same for shapes as for frames.
The needed conversion from WritingMode BT-LR and TB_LR90 to
TextPreRotateAngle for rendering of text in custom shapes is now in
one place in class SdrObjectCustomshape. The shape edit engine
cannot yet render it itself.
Some unit tests are adapted to use WritingMode property instead of
TextPreRotateAngle.
The value text::WritingMode2::TB_RL90 is introduced, corresponding to
vert='vert' and textDirection='tbRl' or ='rl' in OOXML. It is used
for frames too, so that the original text direction is preserved and
vert='eaVert' can be distinguished from vert='vert'.
TextPreRotateAngle is currently still used in SmartArt import for
'upr' and 'grav' and in emulating 'upright' but no longer to
emulate text direction.
Change-Id: Idc4339bbfc3592fe90b154d75e2c404a1fa30856
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138813
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Hypertext lost its formatting partially: e.g. underline
character setting lost, except on the last word.
Follow-up to commit commit a761a51d9db3a2771ca9fd6ab233c513aa5d8ecf
"tdf#149311 PPTX export: fix internal hyperlink on texts".
Clean-up of commit 855a56fea4561135a63cb729d7a625a950b210e7
"tdf#148965 PPTX import: fix internal hyperlinks on shapes" and
commit cec1f712c87e557e1b7313e0dbef4a635f69d953
"tdf#144918 PPTX import: fix internal hyperlink on shapes" and
commit 7eb0e52527e729a21973e70d5be8e0a6779ec748
"tdf#142648 PPTX: import long slide names to avoid broken link export".
Change-Id: I1de8b06361c7b9529a70a039e194db88460cc27b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138669
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
Change-Id: Iaf9a36c63f2bca9b065b2370e88c5e86c5f06888
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139677
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Id969646a82b9a408fff111c794a6096d8e857db8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139678
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I0dc42449baa4bed54aa1fdd60c1b62d4a9cb358e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139647
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I4bd5f934abb62a161a2002697d68e1bda72e697e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139634
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Checked that in aBound is indeed the size - 1 (probably
due to old integer stuff using Size()/Rectangle() and
getWidth()/GetWidth() with the old one-less paradigm
somewhere), so just correct to the correct size. Be aware
that checking of tdf#126319 is needed, but looks good in
my tests. Still: Changing the central UNO API Metafile
export is always a risky thing, so it will have to show
if this will not influence something else.
Adapted a unit test to take into account that the exported
object as PNG no longer has an empty column at the right and
lo longer an empty row at the bottom. That test testTdf126319
uses now the same test-indexing as the test testTdf105998
already used. This shows a more correct PNG conversion, it
was curious anyways that two identical exports of objects
with a light-red border from dfferent apps had that
difference at all.
Change-Id: I8513688dc062025c5d931b75602f4fdbd924a32a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139596
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
|
|
With 16k column support in Calc enabled by default in
commit 4c5f8ccf0a2320432b8fe91add1dcadf54d9fd58
Date: Tue Mar 8 12:44:49 2022 +0100
change default Calc number of columns to 16384 (tdf#50916)
, the number of Calc cells in a spreadsheet is larger than
SAL_MAX_INT32, meaning that a 32-bit a11y child index is no more
enough and using it resulted in integer overflows in
methods handling corresponding Calc cells in the a11y layer.
This e.g. had the effect of the Orca and NVDA screen readers
not announcing focused or selected cells properly when their
a11y child index was out of the 32-bit integer range.
Switch the internal a11y child indices to 64 bit to
be able to handle this properly internally.
Since the platform APIs (at least AT-SPI on Linux and
IAccessible2 on Windows; from what I can see LO's macOS
a11y bridge doesn't directly expose the child index)
are still restricted to 32 bit, larger child indices
still cannot be exposed via the platform APIs.
As a consequence, use of the the IAccessible2 and
AT-SPI methods that use the child index remains
problematic in those cases where the child index
is larger. However, as an alternative to using the
AT-SPI Table interface and the IAccessibleTable/
IAccessibleTable2 interfaces with the child index
to retrieve information about a specific cell,
both AT-SPI and IAccessible2 also provide interfaces
to retrieve that information directly
from the cell object (TableCell interface for AT-SPI,
IAccessibleTableCell for IAccessible2).
Those interfaces are already implemented/exposed
for winaccessibility (s. `CAccTable`) and the
qt5/qt6/kf5 VCL plugins (s. the `QAccessibleTableCellInterface`
methods implemented in `QtAccessibleInterface`).
With the switch to 64-bit internal a11y child indices,
these now behave correctly for cells with a child
index that doesn't fit into 32 bit as well.
NVDA on Windows already uses the IAccessibleTableCell
interface and thus announcing focused cells works fine
with this change in place.
Orca on Linux currently doesn't make use of the AT-SPI
TableCell interface yet, but with a suggested change to
do so [1], announcement of selected cells works
with the qt6 VCL plugin with a current qtbase dev branch
as well - when combined with the suggested changes
to implement support for the AT-SPI TableCell interface
in Qt [2] [3] and the LO change based on that [4] and
a fix for a nullptr dereference [5].
The gtk3 VCL plugin doesn't expose the AT-SPI
TableCell interface yet, but once it does so
(via `AtkTableCell`), it also works with the
suggested Orca change [1] in place.
(Adding that is planned for an upcoming change,
works with a local WIP patch.)
For handling return values that are larger than what
platform APIs support, the following approach has
been chosen for now:
1) When the return value is for the count of
(selected) children, the maximum value N
supported by the platform API is returned.
(This is what `ScAccessibleTableBase::getAccessibleChildCount`
did previously.)
The first N elements can be accessed by their
actual (selection) indices.
2) When the return value is the child/cell index,
-2 is returned for objects whose index is greater
than the maximum value supported by the platform
API.
Using a non-negative value would mean that the
index would refer to *another* actually existing
child. A child index of -1 on the other hand
tends to be interpreted as "child is invalid" or
"object isn't actually a child of its (previous)
parent any more)". For the Orca case, this would
result in objects with a child index of -1
not being announced, as they are considered
"zombies" [6].
What's still somewhat problematic is the case where
more than 2^31 children are *selected*, since access
to those children still happens by the index into
the selection in the platform APIs, and not all
selected items are accessible this way.
(Screen readers usually just retrieve
the first and last element from the selection and
announce those.)
Orca already seems to apply different handling for the
case for fully selected rows and columns, so
"All cells selected" or "Columns ... to ... selected"
is announced just fine even if more than 2^31
cells are selected.
(Side note: While Microsoft User Interface
Automation - UIA - also uses 32-bit indices, it also
has specific methods in the ISelectionProvider2
interface that allow to explicitly retrieve the
first and last selected item,
`ISelectionProvider2::get_FirstSelectedItem` and
`ISelectionProvider2::get_LastSelectedItem`, but
we currently don't support UIA on Windows.)
Bound checks at the beginning of the methods from the
`XAccessibleContext`, `XAccessibleSelection` and
`XAccessibleTable` interfaces that take a child index
(or in helper methods called by those) should generally
already prevent too large indices from being passed to
the methods in the lower layer code that take smaller
integer types. Such bound checking has been
been added in various places where it wasn't present yet.
If there any remaining issues of this
kind that show after this commit, they can probably be
solved in a similar way (s.e.g. the change to
`AccessibleBrowseBox::getAccessibleChild` in this
commit).
A few asserts were also added at
places where my understanding is that values shouldn't
be larger than what is supported by a called method
anyway.
A test case will be added in a following change.
[1] https://gitlab.gnome.org/GNOME/orca/-/merge_requests/131
[2] https://codereview.qt-project.org/c/qt/qtbase/+/428566
[3] https://codereview.qt-project.org/c/qt/qtbase/+/428567
[4] https://gerrit.libreoffice.org/c/core/+/138750
[5] https://codereview.qt-project.org/c/qt/qtbase/+/430157
[6] https://gitlab.gnome.org/GNOME/orca/-/blob/82c8542002e36e0d3d918088d583162d25136143/src/orca/script_utilities.py#L5155
Change-Id: I3af590c988b0e6754fc72545918412f39e8fea07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139258
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
The PPTX import maps media nodes to XAudio nodes, but the export side in
PPTXAnimationExport::WriteAnimationNodeAudio() only handled audio, not
video.
This is fine, that code was added for audio narration purposes, but the
same animation handles looping for videos, so this needs extending.
Fix the problem by exporting <p:audio> conditionally and write video
markup (especially info about repeat count) when the content of the
media shape is video, not audio.
Change-Id: Iba6bb4901b984c4363023f05232efc06ff069022
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139261
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
Alters ShapeExport::WriteTextBox so that when it is called with an empty
text (on PPTX export) an attempt to export empty text's char properties
(stored in the Shape or Cell's properties directly) made on
ShapeExport::WriteText.
These properties are exported into endParaRPr.
Implementing this caused some tests that contain connector shapes fail
with XML schema validation errors, therefore disabled export of txBody
inside cxnSp tags.
Also adds a unit test that checks roundtrip of empty shape or cell's
endParaRPr.
Change-Id: I3e3feda802f42560fa7fecc9c0b1afe73a900a84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138960
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Reverts parts that have wrong assumptions wrt layouting a table in svx.
The problems reverted commits solved previously, were refixed by commits:
- tdf#144092 pptx import: correct table height during import
(a5126a21351c87138ff86a6636326eb6cd6a0f8c)
- tdf#144092 pptx import: fix import of empty cell and shape text properties
(57f9b4b7d1ad164c56af12009ef1dafbc1be8369)
So hopefully, reverting these now won't cause many regressions.
Change-Id: Ie96293810b033dc86e41c200f10cf63326511cea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138653
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
It appears PowerPoint can export rows of a table with row heights that
is less than the minimum height (for that row). And also export the
total table height wrong with it.
If PowerPoint imports such a table, those rows are individually
expanded to the minimum height. (Also increasing the table's total
height)
In Impress import we calculate table height by adding up individual
row heights. Table layouting code depends on the table height being
correct. This is why rows with less than minimum height lead to
layouting problems.
To compensate for this, while importing tables, layouting is skipped
until the table height is updated with the corrected height.
The correct height is calculated by layouting the table without
fitting to an area (i.e with bFit = false).
Change-Id: I79187882470a4e285b45bca1eabb469a084067f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138652
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: Ifb5ff2e6d5ed28bcb9e190d7f2deaaa970693cbc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138938
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Which means we can get rid of the majestic hack of ScCaptionPtr
Previously, SdrObject was manually managed, and the ownership
passed around in very complicated fashion.
Notes:
(*) SvxShape has a strong reference to SdrObject, where
previously it had a weak reference. It is now strong
since otherwise the SdrObject will go away very eagerly.
(*) SdrObject still has a weak reference to SvxShape
(*) In the existing places that an SdrObject is being
deleted, we now just clear the reference
(*) instead of SwVirtFlyDrawObj removing itself from the
page that contains inside it's destructor, make the call site
do the removing from the page.
(*) Needed to take the SolarMutex in UndoManagerHelper_Impl::impl_clear
because this can be called from UNO (e.g. sfx2_complex JUnit test)
and the SdrObjects need the SolarMutex when destructing.
(*) handle a tricky situation with SwDrawVirtObj in the SwDrawModel
destructor because the existing code wants mpDrawObj in
SwAnchoredObject to be sometimes owning, sometimes not, which
results in a cycle with the new code.
Change-Id: I4d79df1660e386388e5d51030653755bca02a163
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138837
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
For table cells and shapes without any text, text properties weren't
correctly imported. Both the master styles and properties defined in
the endParaRPr were ignored.
It appears the current implementation does attempt to import those in
TextParagraph::insertAt(...), after the attempt they end up in the
TextRange('s nodes) but they are ignored.
This commit implements a fix by: If the cell or shape has no text, the
text properties are also pushed into the shape or cell's propset
directly
Change-Id: Ie425b3e9a73937a2503e47322e25f37ed9a2a6be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138651
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I11ec949cb82ebaaa225afbbc154f574fc56c0d62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138753
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I3c9d0ef457085f14ce59092db8756c04ad5ce62b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138087
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Change-Id: I587c42e658d6f3dca2203d95cda2a972a4ddff91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138058
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
Check the tree order is stable across loads and page switches.
Change-Id: I8850eb8b230d9193c4f2497150a44fd555030a9b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137681
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
It isn't enough to do Paragraph->SetDepth().
It must match the property EE_PARA_OUTLLEVEL.
So I was hoping that the only thing I needed was the
"set property" helper. But unit tests showed that I also needed
"get property" to return an empty aAny instead of a -1.
My confidence level on this one is fairly low.
This code is way too tangled and weird.
I'm sure the concept is right (that the property is the
most important thing) but all of the wonkiness around
the level means any changes to the implementation
will be fragile.
make UITest_impress_tests \
UITEST_TEST_NAME=tdf148810.Tdf148810.test_Tdf148810
Change-Id: I4aa62fe28ecbc483d5df0d1532fecd172afc54b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137569
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
The text rectangle specified by the txXfrm element rotates around its
center. We not directly use this rectangle but we use the text area
rectangle of the preset geometry and crop it by setting distances so,
that the result equals the txXfrm rectangle. But the text area
rectangle still rotates at its original center. So we shift the txXfrm
rectangle so, that it would be at it original place, when rotated with
TextRotateAngle. We then can use the shifted one to calculate the
needed distance values.
This patch contains the calculation of the text area rectangle for
type 'rightArrow' in addition. That fixes tdf#132302.
Change-Id: I59d9aecaaa7ce2ef4502651088ff9576b90873f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137396
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
|
|
Place of the connection point of a polygon changed during
a PPTX round-trip, connecting other vertices of e.g. a square
or a hexagon, as before.
See also commit c3f73f75772d076dfb2ed0538e7d515503edc038
"tdf#149128 PPTX export: fix <stCxn> and <endCxn> connector properties".
Change-Id: I64fc6377417a99d32e84ea71fbed13cf36760118
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136474
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
Some SmartArt types use text area rectangles different from defaults.
The new rectangle is available in element <txXfrm>. This patch adds the
needed corrections for type round1Rect. It is four times used in
SmartArt 'Titled Matrix' with rotations 0deg, 90deg, 180deg and 270deg.
Change-Id: I8c82b446a982ad93026e976b2a47d509b858858d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137287
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
|
|
This is followup to commit 7e23cbdb. That commit contains for several
types of shapes a correction of the position and size of the text area
rectangle.
That commit fixes bugs tdf#59802, tdf#136234, tdf#118009 and duplicate
tdf#142841 were the here tested shape types are involved.
Change-Id: I7c8c9676cf3dbdcc3f91fe25d75901b63d0ca4da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137264
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
|
|
Regression from commit 78e25558e86188314b9b72048b8ddca18697cb86
(tdf#106059 PDF export: create a reference XObject for JPG images with
PDF data, 2017-02-23), once a PDF image was inserted to a document, an
encrypted PDF export lost those images.
The reason for this is that we started to preserve PDF images as vector
data with the above commit, but this means we copied over PDF objects
from PDF images to the export result as-is, so encryption was not
performed for them.
Fix this by separating the write of the PDF object headers, stream
content and object footer and then calling
checkAndEnableStreamEncryption() / disableStreamEncryption() for each
object, even if it's not something our PDF export created but comes from
a PDF image.
Note that when existing PDF files are signed, PDF objects are also
copied into a vcl::filter::PDFDocument, but such PDF images are never
encrypted, so it's fine to have stub implementations in
vcl::filter::PDFDocument.
Change-Id: I2f74b9f51cd35b4319221532ca890e197bab9cf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137242
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
The import filter had only one member for both and had it mapped to
TextPreRotateAngle. That resulted in lost text area rotation when a
shape had both types of rotations, and sheared text when only text
area rotation existed.
The patch introduces a new 'moTextAreaRotation' member for the 'rot'
attribute of the <bodyPr> element. It is mapped to 'TextRotateAngle'
property. It becomes the 'draw:text-rotate-angle' attribute of the
<draw:enhanced-geometry> element for a shape and 'style:rotate-angle'
for chart elements in ODF. It must also be used to simulate 'upright'
and is used for the 'rot' attribute in <txXfrm> of diagram shapes.
The 'moRotation' member is now only used for the 'TextPreRotateAngle'
property. That angle describes a rotation of the text without changing
the text area. Valid values are multiples of 90deg. It is used for
simulating vertical writing modes that are not yet implemented. It has
no corresponding attribute in ODF. To make the meaning clear in code,
the member is renamed to 'moTextPreRotation'.
MS Office recalutes a diagram on file opening from layout.xml and
data.xml. That is not yet implemented in LO, but we use drawing.xml,
which gives the state of the diagram at time of saving. The patch
handles the 'rot' attribute of <txXfrm> element as well. It has to be
mapped to moTextAreaRotation, because it might contain angles, which
are not multiples of 90deg, for example diagram 'Gear'.
The <off> and <ext> child elements of <txXfrm> describe the actual used
text area rectangle. The existing import calculates the difference of
the actual used text area rectangle to the predefined one and
incorporates it into the TextArea*Distance attributes. The patch adds
calculating the current values of the text area rectangle as it would
be using the preset markup. At that time in import there is no
SdrObjCustomShape object, thus we cannot use its GetTextBounds() method.
So it is down manually, covering most of those types, which are used in
diagrams of MS Office.
Remarks to unit tests:
Now the rotation introduced by txXfrm is no longer in
TextPreRotateAngle, but in TextRotateAngle. According changes are in
SdImportTest::testN86510_2
Test, testFdo87488
Now the correct preset text area rectangles are used. That requires
adaption of the needed distances. Done in
SdImportTest::testBnc870237()
SdImportTest::testTdf93830()
SdImportTestSmartArt::testTdf134221()
The buggy 'upright' export is fixed. Adaption in
ScExportTest2::testTdf137000_handle_upright()
Change-Id: I79df1559f88b76e96988fe745304dc4162de6316
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136447
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I0ce12e862ca90ab62da508820aecb3bce93445b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137235
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
|
|
By default Rectangle uses closed interval, if we really want to use half
open intervals then we should specifically say as such in the name.
Change-Id: Id7a91120ba1a1a4bc330014216b73a692dbf03a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136575
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|