Add the fill style properties so background images etc. are not lost.
(regression from 7d9bb549d4)
Change-Id: I517350eec2f32e4b4bb80427666aad23a31d666a
Shapes may not have a unique name, but TextFrames always have. So in
order to be able to link shapes with textboxes, provide a ChainName
property that's the name of the underlying TextFrame. This kills two
birds with one stone:
- we can have a unique name for each shape
- the names can be used for TextFrame linking, as they are valid
TextFrame names
Change-Id: Ie96f267d392d9fe5388c5eacff9b873f1639054c
Problem Description:
- In LibreOffice, the index field flag '\f' was not
getting preserved after roundtrip as there was no
support for it.
- '\f' field flag is used for Specific Entry Type.
ex. In our case it is "Syn"
Implementation:
- Provided import & export support for Index field flag '\f'
and added UT for the same.
Change-Id: I97c2456dd73c8bdf89ab105f8cac71bf7e2ad164
Reviewed-on: https://gerrit.libreoffice.org/8839
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Table style is a property that defines a set of background and line
attributes for cells. These attributes depend on theme settings (e.g.
theme colors).
We added a grabbag to the table object to save the table style name.
We detect that name on export and write it back to the document.
Finally, modified an existing unit test to check this attribute too.
TODO: To get the table style working properly after a roundtrip, we
must preserve it and also check that its values are not being
overwritten by different cell or table properties.
Change-Id: Id0e022a389561960c21ab874db33649499735024
When some background color is set to a table cell, it is stored in the
cell properties tag <tcPr> like this:
<w:shd w:fill="ECD2B6" w:color="auto"
w:themeFill="accent6" w:themeFillTint="66" w:val="clear"/>
The theme-related attributes in w:shd were not being preserved. To
fix this I added an InteropGrabBag to the cell properties object,
which is filled with the attributes of w:shd to be checked on export.
The exporter checks if the cell color is still the original color that
was imported from the file, if it is not it means the user has
manually changed it during the edition and the new color is written
instead.
Finally, added a unit test for theme attributes on tables.
Change-Id: Ica8091b5eb4075e51912a255650a1d9d64f5767a
By now this property is added for MS Word interoperability.
With it we can make DOCX import/export working.
I use this solution instead of InteropGrabBag because vertical
adjustment would be a good thing to have for text frames too.
So later it can be the first step of an enhanchement.
Change-Id: I9dcfdc8ae56ce443f0c286c51136e1d006951938
Which exposes SwFmtFrmSize::eWidthPercentRelation. Do not document yet,
will be done if layout/filters/UI confirms that the data structure is
suitable.
Change-Id: Ic4eac3356452f4bedf9809ff5678e299b7339053
Issue :
DOCX contatining TOC Code field '\u' was not getting
preserved after RT.
Implementation :
1] Provided import & export support for TOC field flag '\u'.
2] Written export Unit Test for code field '\u'.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7202
Change-Id: I43872c7db21c25e0586bf874d5bb0c9115ab76af
(This is partial fix for this bug)
Implementation :
Provided import & export support for TOC field flag '\b'.
XML file difference :
Before :
<w:instrText>
TOC
</w:instrText>
After :
<w:instrText>
TOC \b "bookmark111" \o "1-9" \o "1-9" \h
</w:instrText>
Conflicts:
sw/inc/tox.hxx
sw/inc/unomap.hxx
sw/inc/unoprnms.hxx
sw/source/core/unocore/unomap.cxx
sw/source/filter/ww8/ww8atr.cxx
writerfilter/source/dmapper/DomainMapper_Impl.cxx
writerfilter/source/dmapper/PropertyIds.cxx
writerfilter/source/dmapper/PropertyIds.hxx
Reviewed on:
https://gerrit.libreoffice.org/7256
Change-Id: I194ba95ca8f25234c0d2a14570fd47eac518b9c5
Issue :
TOC field flag '\w' was not getting preserved after RT.
Implementation :
Provided import & export support for TOC field flag '\w'.
XML file difference :
In document.xml,
Before - <w:instrText>
TOC \o "1-3" \h \z \w
</w:instrText>
After - <w:instrText>
TOC \w \o "1-3" \o "1-3" \h
</w:instrText>
Conflicts:
sw/inc/tox.hxx
sw/inc/unomap.hxx
sw/inc/unoprnms.hxx
sw/source/core/unocore/unomap.cxx
sw/source/filter/ww8/ww8atr.cxx
sw/source/ui/index/cntex.cxx
writerfilter/source/dmapper/DomainMapper_Impl.cxx
writerfilter/source/dmapper/PropertyIds.cxx
writerfilter/source/dmapper/PropertyIds.hxx
Reviewed on:
https://gerrit.libreoffice.org/7238
Change-Id: Ia5d602c6db0b59933d325058ce2d8111e4f03df5
Issue :
TOC field flag '\z' was not getting preserved after RT.
Implementation :
Provided import & export support for TOC field flag '\z'.
XML file difference :
In document.xml,
Before - <w:instrText>
TOC
</w:instrText>
After - <w:instrText>
TOC \z \o "1-3" \o "1-3" \h
</w:instrText>
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
writerfilter/source/dmapper/PropertyIds.cxx
writerfilter/source/dmapper/PropertyIds.hxx
Reviewed on:
https://gerrit.libreoffice.org/7217
Change-Id: I84f90a722c7afbdf626db2cc60c4e73580891d36
Steps
-Add a new character attribute (RES_CHRATR_HIGHLIGHT)
-Get this character attribute via SwFont class just like
background
-If has highlight, then paint that, otherwise paint background
-Extend UNO API
-Implement DOCX export and import filter
Note: By now character highlight can't be set via UI.
It's a next step to add a highlight option.
Change-Id: I7f81e173744bf256891487f898d06dbf372a2f88
Writer core doesn't support this, and this has been a problem for table
cells as well. There the workaround we're using for quite a while is to
do the rotation at a text portion level instead, which results in
reasonable layout for simple cases. Do the same here.
One additional complexity is that the API between oox and writerfilter
is a single UNO shape, we get this property in oox, and we have to
handle it in writerfilter, when the text frame is already attached to
some text. Kill this problem by adding a FrameInteropGrabBag for sw text
frames: it's useful anyway, and then we can pass around this property
inside the grab bag.
Change-Id: Idb5ec83b5cbdde8f29d15b2cebfad24226bb6507
Added the new InteropGrabBag property to the OfficeDocument service
and modified the JUnit UNO unit tests for it.
Added specific implementation in the sfx2 module for the SfxBaseModel
class.
Added specific inherited implementations in the sc, sd, starmath and
sw modules for the ScModelObj, SdXImpressDocument, SmModel, and
SwXTextDocument classes.
This new property is intended by now for its usage on preserving OOX's
theming although the aim is to be able to re-create the theming in the
future from saved properties.
It could also be used for preserving other attributes for
interoperability among document formats.
Change-Id: Ia822856293c70ae22911afa794e3e38bcaa31f86
Reviewed-on: https://gerrit.libreoffice.org/6000
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
drawinglayer has a separate property for the shadow transparency, too.
One more step towards Writer frames have the same UNO API as
drawinglayer shapes.
Change-Id: I84617502e9beb9e077c783ee8eb771d79c6ee666
1, New character attribute
- Add the three shadow members to font
(width, color, location)
2, Painting
- Extract the shadow painting to a local function
and use that for character shadow (paintfrm.cxx)
- Reduce the painting rectangle of background
(shadow doesn't inherites the background of content)
3, Border merge
- Use text portion join members to skip shadow
when neccessary.
4, Vertical text
- Get shadow space dependant from oritentation and
border merge.
5, UNO API and ODF filter
Paragraph: ParaShadowFormat -> Character: CharShadowFormat
Change-Id: Ief4669990d238016c3ffc18a2609a3df7d9dddbf
This bug fixes the DOCX import and export filters, adds a new property
to the document model and updates the UNO API.
There is no need to add layout \ UI updates, because in Word
the only way to turn this on\off is using a simple button,
and there is no way to control the shading color itself.
However, ODF import \ export filters should be updated in a future
commit.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Change-Id: I1d34cec79289e38c08e42a4c6265d998e1edfdef
Reviewed-on: https://gerrit.libreoffice.org/4452
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
This new property is necessary because the old TableBorder cannot be
extended to contain the BorderLine2 structs without breaking
compatibility.
Change-Id: I5e22782256b29224225a9d74c818b2c47fee8526
sw document model, xmloff and offapi supported these separately, but sw
layout did not. It turns out it's not needed for Word interop, either,
so better to just merge these, instead of implementing them
independently without a good use-case.
Change-Id: I5c3b334baa09cabec123745c7af3d65d830754fc
The header/footer text for the first page can now be written (document
model ready), but layout doesn't take it into account yet. Also,
SwDoc::ChgPageDesc() has some copy&paste, will fix that soon.
Change-Id: Ic28659f028e7db4aa1b6eefc76a4e672127e2c98
It's just like HeaderIsShared / FooterIsShared, enabled by default when
header / footer is on. It does nothing yet, but it's read-writable.
Motivation: https://wiki.oasis-open.org/office/HeaderFooterFirst
Change-Id: I1ccfd0aedd1ac71e9f39b7fd43754264afafc1ef