Age | Commit message (Collapse) | Author |
|
to support the registered databases (containing ODS, XLSX
sheet or ODT text table data sources).
Now database fields don't lose their database connection,
and File->Print can merge mails after DOCX export/import, if
the LO instance has got a registered database with the same
name and table, as in saved in w:settings/w:mailMerge/w:query
element of the DOCX document in the form of
SELECT * FROM [databaseName].dbo.[tableName]$
query.
Notes:
– This fix supports only single table usage.
– The exported DOCX document is editable in MSO, too,
without losing the database connection in LO later.
Change-Id: I97826b7ee7defd0243dbaffa0325c5b11dd2c0d1
Reviewed-on: https://gerrit.libreoffice.org/71228
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
|
|
The hack added in commit 3325e0f206ce864730468c3556ce06760042c157
(bnc#865381 DOCX import: handle w:jc=center inside w:textDirection=btLr,
2014-07-02) is no longer needed, actually just reverting it fixes the
problem, as then layout does the right thing.
No need to center paragraph adjustment to any kind of vertical
orientation, now that we have proper layout support.
Change-Id: I6aa74f5289a014c148fbd7c7ab03ec885d931daf
Reviewed-on: https://gerrit.libreoffice.org/70610
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I50dcc2363982f8e6b68f10b0b724b59e9430d6c5
Reviewed-on: https://gerrit.libreoffice.org/63380
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: Id73a21bbf897af77057fb8e8c58b1e9e247584d8
Reviewed-on: https://gerrit.libreoffice.org/63910
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
The document properly opens with all sections protected because
document protection (forms view) is enabled. However, when that
setting was toggled off, all sections wrongly became unprotected,
and remained unprotected when round-tripped
(including in Word - so loss of configuration).
Word does protection differently. It opens up in a forms only mode,
but upon enabling editing mode, the individual sections can
still be protected. Only when global enforcement is disabled
do all sections become editable.
So, if global enforcement is enabled, map the section protection to
LO native protection. On startup, the sections will all be protected
because of the global compatibility flag. If the flag is turned
off, then you enter a similar mode to Word's "Edit document" where
the sections are still protected. In LO, *each* section's protection
must be turned off individually to fully disable enforcement.
This patch keeps the same three-step process to fully edit the
entire document, but the meanings take on a different form.
"Compatability: Protect Form" changes from "enforcement" to
"edit document" in concept. BTW, that matches how export works,
where PROTECT_FORM is auto-enabled if any sections are protected.
Section protection in LO can be disabled through
Format - Sections - Write Protection.
Patch initially developed to support tdf#120499.
It depends on an earlier commit in order to round-trip.
Change-Id: I8a2399f79640115d689ae9093792eecef7dbaeec
Reviewed-on: https://gerrit.libreoffice.org/61918
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
|
|
If RTL is defined in the default (Normal) paragraph style,
then the footnote separator should be right-aligned.
In MSWORD, the alignment is not a property that is stored
with the footnote separator definition, and it is not a
page property like it is in LO.
The reverse needs to happen for LTR default paragraph style.
Based on my MSWORD observations, the only place where you can
indirectly set RightToLeft is in the "Normal" paragraph style.
That option is disabled in all of the other styles.
In LibreOffice, this is typically handled by the locale properties.
The default PAGE style's Footnotes - Position is RIGHT for
RTL locales, but LEFT for LTR locales.
It is kinda interesting that no one from a RTL locale complained
about wrongly-right-aligned footnote separator
from imported LTR .docx's.
None of this belongs in export code, since MSO doesn't support
specifying the location - it is just a consequence of the
RTL/LTR settings.
Change-Id: I07d26640116cb12cb9157cd1d902b4c774dbba26
Reviewed-on: https://gerrit.libreoffice.org/56532
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
|
|
This moves BackGraphicURL, HeaderGraphicURL, FooterGraphicURL and
ParaBackGraphicURL properties to BackGraphic, HeaderBackGraphic,
FooterBackGraphic and ParaBackGraphic. With this the property type
changes from String to XGraphic.
This change also fixes a bunch of test failures, changes the tests
to use the new properties and the correct type, changes the import
and export filters like xmloff and oox, to make the tests happy.
Change-Id: Ie66097514203c6dc36ab27420faf265322e9279e
Reviewed-on: https://gerrit.libreoffice.org/50760
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
|
|
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>
|
|
1. Use converted style name to assure the default style is found.
2. Switch off squared-page mode before setting the base text width and height.
3. Ruby text height is not effective per ODF spec.
Change-Id: I0f2901a453a9f7b344cac6989780688cc2d6c7b4
Reviewed-on: https://gerrit.libreoffice.org/36828
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
|
|
An image saved in cache when NS_ooxml::LN_CT_NumPicBullet_pict
property is processed should not to be resized. It reduce quality
the image.
Just set the property "GraphicSize" of current level of the NumRule
instead of resize the image when processing
NS_ooxml::LN_CT_Lvl_lvlPicBulletId property.
Change-Id: I8ac80643decb7794de7a295cc7c2895a5bd24e2d
Reviewed-on: https://gerrit.libreoffice.org/35592
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: I3cc0d696059b130a8f1f1d8d3b1908d2e84d1a75
Reviewed-on: https://gerrit.libreoffice.org/34017
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Since .doc and .docx don't have an option to "don't split table",
we emulated that. For this IMPORT case when there is only one row,
consider the entire table to be unsplitable is the row is unsplitable.
This will give the expected results if the user starts adding more rows
to the table.
Change-Id: I8a2d817ff714ba0df65b5a5e263b27df4264e848
Reviewed-on: https://gerrit.libreoffice.org/28357
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
|
|
Change-Id: I90174f7a98e9bd01f45ee668f127356ff3e0e4ed
Reviewed-on: https://gerrit.libreoffice.org/18481
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
|
|
RTF import, export, and ooxml export for ruby text are implemented.
tdf#49073 - FILEOPEN: Furigana (ruby text) and characters with them are
missing in opened .docx files.
tdf#50786 - [TASK, METABUG] FILEOPEN, FILESAVE, FORMATTING : Japanese
ruby-character handling is broken
Change-Id: I4a5c30bad180241e3344e9da7efe7da4369fb325
Reviewed-on: https://gerrit.libreoffice.org/17241
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
|
|
Measurements showed that the "optimisation" of caching PropertyIds and their
string equivalent leads to an increase of approx. 6 times in the total overall
time spent in PropertyNameSupplier::getName(eId), when running the unit tests.
PropertyNameSupplier was the only PropertyNameSupplier (no derived classes).
This means that getPropertyName can easily provide the same functionality.
Change-Id: I933b67c11d4cc35395a0c70e15f1c24ac9842ab0
Reviewed-on: https://gerrit.libreoffice.org/16665
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Fix the situation for OOXML import filter:
a) While handling DocGrid type, SnapToChars was treated as
None. Now it is implemented as described in the article:
http://linpeifeng.blogspot.tw/2007/02/text-grid-enhancement.html
Both LinesAndChars and SnapToChars will be translated to
Writer grid type "lines and characters", and set SnapToGrid
property to false or true accordingly.
b) All the imported paragraphs snap to grid because SnapToGrid was
appended to grabbag, now it allows SnapToGrid property in
paragraph and paragraph styles to be imported properly.
Change-Id: I446b4c64c0ed86960896bcd61a1006c9173a757a
Reviewed-on: https://gerrit.libreoffice.org/15732
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
|
|
Change-Id: I1e4cf3241bee20677f61ea334efc3aa4e490a016
|
|
* So MSO format export filters can recognize that it should be exported
as shading.
* Editing in LO removes this shading marker, so from that point there
will be an LO character background.
Change-Id: I853b952f0395b33d36bb2934a6d910f2182cc1d9
|
|
In theory this is to be in sync with the ODF import. In practice the old
UNO property seems not to have a proper fallback to populate the doc
model with the fillattributes, so without this even if the import result
is visible, it would be lost on ODF export.
Additionally, this detected a bug in SwUnoCursorHelper::makeRedline(),
where paragraph format redline tried to use the map of a text portion
instead of a paragraph.
Change-Id: I026e38e1990ed2a460624a8d967a16ae3fb6c512
|
|
Change-Id: I8268567b84aa0f6e42624bfd0f79c8c49c153edd
|
|
Change-Id: Id0dd34110376168e34df4956869608895b86abfe
|
|
Change-Id: I178cb5591c95cc5587ac56662abf808bfca7a336
|
|
Change-Id: I849daf0ddee370775fda73e04739e69acbc64246
|
|
Change-Id: I47d9dab17d4891d05cf7497e53026bc801f2726b
|
|
Change-Id: I3bbd65af4f52ce28e2962a1b3e0c7f1c348f3a01
|
|
Testcase will be added when the export half of this is also in place.
Change-Id: Ic6ef8ea72a45424fcb5a473c74db9e30d6fd3be8
|
|
Change-Id: I5b6158281782fc07ffe0eef73ab94345563498f9
|
|
Change-Id: I102c70429457515b34e74cb8e82e1417e6276d1d
|
|
Change-Id: I3ed0f926e79f3878c5702c2becae97d99d00e201
|
|
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
|
|
The exporter writes the sdt blocks enclosing an entire paragraph, but
that's not the proper behaviour in all cases. The documents that mix
checkboxes and text in the same paragraph export the text inside the
sdt box and that's incorrect.
We have added code to be able to write sdt blocks that enclose
paragraphs or text runs, depending on the type of block. We have
applied it to checkboxes now.
There are two sets of properties in DocxAttributeOutput that store
sdt properties for the text run and for the paragraph. We have
modified the method WriteParagraphSdt to be generic enough to support
both cases. To write the sdt block enclosing the text run we used
parser marks.
We have renamed the property id PROP_PARA_SDTPR to the more generic
name PROP_SDTPR.
Checkbox unit test was modified to match the new structure of the
generated document.
Change-Id: I81ffe0062e1a5f80fc4638f7ee454a9bc18e63ee
|
|
The <w:docPartObj> property inside <w:sdt> blocks determines a block
inside the document that can be dinamically updated and enables Word
2010 to show a hover button to update it. It is used for TOCs,
bibliography, etc. LibreOffice ignored these blocks and removed them
from the document on export.
In this patch, we make the importer save the <w:docPartObj> tag and
its contents in the paragraph interop grab bag.
On export we read the paragraph grab bag and restore the sdt block
back to the document; we don't know if the paragraph must be enclosed
in a sdt block when we start it, so we used the parser marks to be
able to prepend the start of the block before the paragraph opening
tag.
The grab bag on import is managed by the SdtHelper class. Added a set
of methods for that purpose.
The ooxml model file was modified to assign token ids to the children
of w:docPartObj.
Fixed several unit tests that didn't expect the <w:sdt> tag to be
exported. Also modified testBibliography inside ooxmlexport test
suite to add checks for this patch.
TODO: in the imported documents the sdtContent block may contain
several paragraphs but the exporter code as it is can only wrap one
paragraph. As a result, if the sdt block contained several paragraphs
the second and next paragraphs will be outside the block in the
exported document.
Change-Id: I5333fc5ad91a3c50198a4f7647424a2101268c12
|
|
Change-Id: Ieb622364c1fbb2e5177392ff576a457a57b5cbb0
|
|
Refactor the code to support an additional main element at processing
of w14 elements for rPr.
Change-Id: Iaf18a11bbda245b0b5b629e5f2e9f1f9682e6d41
|
|
TextEffectsHandler is responsible to add all subelements
(using nesting of Sequence and Property objects) of text
effects (like w14:glow) into a CharGrabBag.
Change-Id: Ie011a059b905b7cd43528dd7d40be186c4fc4229
|
|
Change-Id: I54cfe0faac1fd3d75fb6931863008b9db86191d1
Reviewed-on: https://gerrit.libreoffice.org/7870
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: Id9d7e6903d6cd36f04c96fb509da1508d493cef8
Reviewed-on: https://gerrit.libreoffice.org/7818
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: I5cbc8fda63a9fd2999555d5a46ea3a063685ffc7
|
|
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
|
|
Issue :
TOC field flag '\x' was not getting preserved after RT.
Implementation :
Provided import & export support for TOC field flag '\x'.
XML file difference :
In document.xml,
Before:
‒<w:r w:rsidR="00A9725D">
‒<w:instrText xml:space="preserve">
TOC \o "1-3"
</w:instrText>
</w:r>
‒<w:r w:rsidR="008A34F6">
‒<w:instrText>
\h
</w:instrText>
</w:r>
‒<w:r w:rsidR="00A9725D">
‒<w:instrText xml:space="preserve">
\x
</w:instrText>
After:
‒<w:instrText>
TOC \x \o "1-3" \h
</w:instrText>
Conflicts:
sw/inc/tox.hxx
sw/inc/unoprnms.hxx
sw/source/core/unocore/unoidx.cxx
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/7257
Change-Id: I8f196446a3beb8deea6b7ddde50e16c9cea73cd9
|
|
(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
|
|
Change-Id: I82f334426715fd1a1f0105b86f763d41e66f32da
|
|
The theme fill attribute and the original fill color are saved to the
paragraph grab bag during the import.
On export, the original fill color and the current one are compared
to know if the user has changed the fill color during the edition. In
that case, the theme fill attribute and the original color are
dropped.
Some methods related to the grab bag management were added to
CellColorHandler for convenience.
Added a unit test for this attribute.
Change-Id: Ic0514ce1d2f290fb0aef5ed86327c1f03f31f20c
|
|
Change-Id: I6b6c99893f18deb1686fca9094037e2fada1b302
|
|
Change-Id: I40fa3f172f98b319a97a855231b854651be2d784
|
|
The property is called w:themeColor and it belongs to the w:color tag
inside run properties.
On import, the themeColor prop is stored in the character interop
grab bag together with the val prop.
On export, the current color of a text run is compared with the
stored val prop to know if the color has been changed during the
document edition. If it hasn't changed, the themeColor property
must be written to the document; if it has, it must not be written to
avoid overwriting the new color.
Also added a unit test for this property.
Change-Id: Icc95ee023aecc741adcba23d23206aadd6c30e1f
|