1217 Commits

Author SHA1 Message Date
Miklos Vajna
2df53ef500 fdo#74599 RTF import: enable StylesNoDefault compat setting
The Writer 'Heading 3' paragraph style is gray by default, but (just
like in case of DOCX) that shouldn't have any influence on the RTF
import result.

Fix this by moving the compat setting from the DOCX filter
implementation to the common dmapper.

Change-Id: I86c7cf1a66f82b438ce8379467773a88c9e229af
2014-04-12 16:46:26 +02:00
Rajashri
07f90c89ef fdo#76635 : Table borders not preserved after RT
The document containing a custom table is getting crashed.
In the document the user has created his own costume table styles and
in the created custom table style the user has set  repeat first row as header property.
The corresponding tag for this property is 'tblHeader'
LO was adding this property as a part of cellProperties in DomainMapperTableHandler.cxx.
But it is a part of a Row Property. That is why there was a crash @ open.

In DomainMapperTableHandler.cxx : 'endTableGetCellProperties' tblHeader property is removed from
style as it is not allowed for a cell.

Change-Id: I83cd369aa4497ec3f4b567174f23ddee9be2864e
Reviewed-on: https://gerrit.libreoffice.org/8848
Tested-by: David Tardon <dtardon@redhat.com>
Reviewed-by: David Tardon <dtardon@redhat.com>
2014-04-11 12:30:45 +00:00
Tor Lillqvist
84272d115d Introduce twip/mm100 conversion functions instead of duplicated macros
Change-Id: Ib689e35b417e0e9016cd6a239c986e0603a99d62
Reviewed-on: https://gerrit.libreoffice.org/8837
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-04-11 10:19:05 +00:00
Rohit Deshmukh
05c5da4c37 fdo#76597: Fix preservation issue of Spacing between paragraph
Change-Id: I458bed111893a8d2fef79b11e28263a5bd2ed9cf
Reviewed-on: https://gerrit.libreoffice.org/8842
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-04-11 07:52:57 +00:00
Jan Holesovsky
492c1da6be Off by one.
Compared to 4c8d29f4f26bfa30689b2b98414fe874225b9a2e, we do not have to
provide 0 to mark the end.

Change-Id: I3b9a3de61df48caf271cb06b27cf9cfa174dc4ed
2014-04-10 11:03:42 +02:00
YogeshBharate
a7bc9c1e49 fdo#77051: Preservation of Index field flag '\f'.
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>
2014-04-10 08:15:54 +00:00
Norbert Thiebaud
066288976b tweak the height value in testDmlRectangleResize once again to pass on Mac
Change-Id: I4d4780bdd8491c00140babc7651fc80a711bcf20
2014-04-09 12:05:08 -05:00
Luke Deller
19644e657d Unit test for .doc export of full colour borders
This test exercises the *export* component of recent work to add support
for full colour borders in .doc import/export.

Change-Id: I2da0b8b488e399d0cd4791678fac6e1c85921c2c
Reviewed-on: https://gerrit.libreoffice.org/8887
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-04-09 10:23:38 +00:00
Miklos Vajna
8329afc2ba SwModelTestBase: use rtl::ByteSequence
Change-Id: I39dde5fa13f6d393ebac05138e1deadd98689199
2014-04-09 11:45:52 +02:00
Jan Holesovsky
4c8d29f4f2 html export: Simplify & speed-up the test.
Change-Id: I619e4441898fe10e319d9f95413f078003364579
2014-04-09 09:50:30 +02:00
umeshkadam
48dd437039 fdo#76583 DOCX import: Floating table information is not preserved in RT file.
- Earlier the table width was compared with the text area to decide if the
  fly has to be created for the floating table.
- In most of the cases such floating tables were the ones which did not have
  any text around them and not importing such tables as fly made sense.
- But there are some scenarios where in the floating tables have width
  greater than the text area but are positioned in a way such that they begin
  before left margin and end before the right margin moreover they appear to be
  really floating (unlike in first scenario) as they have text around them since
  there is still room for the text.
- Handled this scenario and added a UT.

Reviewed on:
	https://gerrit.libreoffice.org/8840

Change-Id: I7ea25e04ed7c6315e4e4fe4b67badf451c30cd0c
2014-04-09 10:06:36 +02:00
Tor Lillqvist
51c2cbf539 WaE: passing OUString by value, rather pass by reference
Change-Id: I72a1617e54157129bdbfd10f39deaf280006b6c9
2014-04-08 15:55:59 +03:00
Tor Lillqvist
009db0e3a7 WaE: overriding virtual function declaration not marked 'override'
Change-Id: Ie799cd4a2d9c4c9de70712dbfd5de57944d8ecbc
2014-04-08 15:55:59 +03:00
Tomaž Vajngerl
5f7e661732 sw html: Add missing textAndImage.docx document..
Change-Id: I0dc99a17625101673281403c3000d3293782b05d
2014-04-08 14:01:32 +02:00
Tomaž Vajngerl
011cd3926f sw html: HTML export test - option with or without "skipImages"
Additionally add loading of HTML document and parsing the document
with libxml - to be able to assert with xpath expression.

Change-Id: I7c62082a124c3705626cd76c8a4cdabc16372399
2014-04-08 13:15:57 +02:00
Tomaž Vajngerl
b2d6ca342c sw test: add export test macro, remember test name
Added a new export only macro - this can be used to create tests
which import a document (in any format), and export it in a format
that is being tested. The exported document isn't loaded again, but
it must be asserted using xpath. The primary usage of this is to
test the HTML export.

Change-Id: I1ad300f6274a2181f7f29fed3903b99b68f37fd9
2014-04-08 13:15:56 +02:00
Sourav
69eebf8735 fdo76591:-Textbox property (order-> send behind text) is not preserved.
Z-Index was not handledin LO for vml.
I have made the changes to handle that using aGrabBag.

Change-Id: I2af3b2974c8eb699bc6a7b743dc438584d6517ac
Reviewed-on: https://gerrit.libreoffice.org/8833
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-04-08 03:20:50 -05:00
Miklos Vajna
dcb88d170b Testcase for RtfAttributeOutput::SectionLineNumbering()
lcov pointed out this method wasn't ever invoked in any of the tests.

Change-Id: I6cccf4fc1d870938a2f218bedc0b8d195a299cd1
2014-04-06 18:14:03 +02:00
Miklos Vajna
0a215b9a98 fdo#74823 RTF import: work around wrong table column width on invalid input
This scenario is not a valid one, Word doesn't handle it, either -- but
the old LO 3.4 parser did. So add minimal support for it to avoid
the regression.

Change-Id: Icc2e8d3bf314e9cadda57956668033aa6d092457
2014-04-05 16:06:26 +02:00
Sourav
df098f6207 fdo76734-Text Box is not preserved for file created in MSWord 2007.
Issue:Only one AlternateContent is getting written in the RT file irrespective of
the number of TextBoxes in the original file which is causing the issue.
RootCause is found in DocxAttributeOutput::OutputFlyFrame_Impl where under case
sw::Frame::eTxtBox,m_aFramesOfParagraph.push_back(sw::Frame(rFrame)); is getting executed only once.
push_back should happen as many number of times as there are TextBoxes in the original file.

if(rFrame.GetFrmFmt().GetName() == m_aFramesOfParagraph[nIndex].GetFrmFmt().GetName())
	bDuplicate = true;

In the above check both the GetName() are returning values as empty which leads to
bDuplicate equals TRUE and hence push_back does not happen.
I have introduced one more check to handle this.

Also changes are made in for loop to make it more efficient.

Conflicts:
	sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
	https://gerrit.libreoffice.org/8782

Change-Id: I397aa3c4548cb57e8dacbf3fbf9ebaf87c0daa80
2014-04-04 11:39:06 +02:00
Miklos Vajna
8baff038be fdo#76628 RTF import: allow the same font to have multiple encodings
Commit bbe3627eece0c3486e7ea11f2f13377aaa3a8fed (rtftok: stop sending
sprm:CRgFtc{0,1,2} tokens, 2014-03-05) dropped support for case when a
font name is used in multiple entries in the font table, but with
different encodings.

Turns out that this is a valid use-case, so revert back to the old
behavior where the key of the encoding table is the font index, not the
font name.

Change-Id: I048dff58af801d704fd4bc75a6a4dcb0f03bf185
2014-04-04 10:53:27 +02:00
Jacobo Aragunde Pérez
ae61569eea oox: Do not overwrite table style properties
Some table properties can be defined by the table style but cells can
overwrite them in their cell properties section. Our exporter was
writing all the cell properties in all cases, regardless of them
being defined by the theme or not, and we shouldn't do that if we
want the document to work properly in Word.

To fix the issue I store the style-defined cell properties (the
format of all four borders) in the table grab bag. The exporter
recovers them and compares with the cell properties before writing
them; if the cell property matches the stlye-defined one, we don't
write it to the document.

An existing unit test was slightly modified to check that the actual
cell properties are not being skipped.

Change-Id: I3aa12d76fb8f73d3fd300f254d19e1683fb6146c
2014-04-03 22:19:20 +02:00
Miklos Vajna
5a5d948e23 bnc#821208 DOC import: fix unwanted char background in numbering char style
Word supports formatting the paragraph parker itself, and we import that
as a formatting at a position after the last character (e.g. "foo" will
have that formatting at char pos 3, which is ignored by the layout).

In addition to this hack, commit
1c22545edf9085b9f2656ca92781158b6b123db3 (Fix issue #i119405: Numbering
text style changed after importing the *.doc, 2012-08-24) added a
SwTxtNode::TryCharSetExpandToNum() hack to Writer core, where in case
such a paragraph marker attribute is set, and the SwTxtNode has a
numbering, then also modify the associated character style as well.

As that commit already noticed, there are attributes which should not be
propagated to that character style. Extend this blacklist to ignore
RES_CHRATR_BACKGROUND as well, as Word does.

Change-Id: Idcb40d37d8688c76fbd61f28428f6e3bc995f799
2014-04-03 18:07:08 +02:00
Miklos Vajna
84c04d73e6 fdo#76979 DOCX export: a:srgbClr should be always an explicit color
The brush color contains both the color itself and transparency as well.
In case of DocxAttributeOutput::FormatBackground(), the sColor should
contain the color part, and oAlpha the transparency part.

In case of drawingML export of Writer TextFrames, an automatic color
(0xFFFFFFF) shouldn't be recognized as "auto", as that's invalid:
instead an explicit 0xFFFFFF with zero transparency should be written.

Fix the problem by calling msfilter::util::ConvertColor() for the RGB
color only.

Change-Id: I2132375a4dbcac1667aed49c74e581183178b0cc
2014-04-03 14:01:03 +02:00
Pallavi Jadhav
8902a25c1a fdo#76589 : FILESAVE: DOCX: Numbered list is not preserved after RT
Issue :
	Numbered list without suffix does not get preserved after
	Roudtrip.

	Description :
	- For level zero LO was writing w:lvlText with epmty value.
	- This was because in DocxAttributeOutput::NumberingLevel()
	  check was based on empty NumberingString.
	- But for "deciaml" also rNumberingString appears to be empty
	  for level-0

	Implementation :
	- Added check to write empty value for w:lvlText only if
	  NumberingType is "bullet" with level-0.
	- This will not write empty w:lvlText with level-0 and
	  NumberingType as "decimal".

Reviewed on:
	https://gerrit.libreoffice.org/8768

Change-Id: Ic6ece45e0122da05013beac93a6e11fac926514d
2014-04-03 11:08:56 +02:00
Jacobo Aragunde Pérez
3e9d9b073f oox: Preserve table style.
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
2014-04-03 09:59:18 +02:00
Jacobo Aragunde Pérez
a3efbb5d33 oox: Preserve cell theme color.
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
2014-04-03 09:59:17 +02:00
Vinaya Mandke
54d913aa74 fdo#76586 Table column separators from individual cell widths
In the test file Table Grid had only one value for entire table width
while there are two cells in a table row. So the table was not
imported with the correct Column Separators.

Added fix to calculate column seperators from cell widths if
unable to calculate from Table Grid, and all the cells have individual cell widths and
there are no after and before cells.

Change-Id: I466737437a18d3373e75fea5ad56c9e31eb149ec
Reviewed-on: https://gerrit.libreoffice.org/8767
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-04-02 07:26:22 +00:00
Stephan Bergmann
362d4f0cd4 Explicitly mark overriding destructors as "virtual"
It appears that the C++ standard allows overriding destructors to be marked
"override," but at least some MSVC versions complain about it, so at least make
sure such destructors are explicitly marked "virtual."

Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1
2014-04-01 19:22:54 +02:00
Miklos Vajna
102bb87ca1 SwXTextFrame: also restore semi-lost BackColorTransparency property
Change-Id: I2af01a87218d08baf399069b90085d01d49983a8
2014-04-01 12:12:54 +02:00
Miklos Vajna
5ce92b73ce SwXTextFrame: restore semi-lost BackColor property
In the past in case FillStyle was set, BackColor wasn't ignored, now it
is, since 6e61ecd09679a66060f932835622821d39e92f01 (Merge back branch
alg_writerframes to trunk, 2014-03-19).

The intention there was that in case FillStyle is set, FillColor will be
used: so to keep both new users and old filters happy, just restore
handling of BackColor in case FillStyle is set, but not FillColor.

Change-Id: Ie034a959e72e48b617cf598af8f7afd030bb50c4
2014-04-01 11:06:47 +02:00
Miklos Vajna
ec221b7339 DocxAttributeOutput: port to FillAttributes
Now that fill attributes are available in the item set of the shared
exporter, just had to adjust the WhichId of fill style / gradient fill,
and it's working again.

Change-Id: Iec7048ef77aea534a567799bfd385fcc029586b3
2014-04-01 10:04:57 +02:00
Miklos Vajna
84c40768f8 MSWordExportBase::OutputItemSet: handle fill attributes as frame ones
Fill attributes with their original WhichId are only used for frames at
the moment, replacing RES_BACKGROUND. To keep export filters working,
handle those fill attributes as frame ones as well.

Change-Id: I1e59b483b706d9fd3f9b947e83244740e3293f9e
2014-03-31 17:15:23 +02:00
Miklos Vajna
c7837b8caa sw: fix DOC/DOCX/RTF export of TextFrame background color
Change-Id: I8b7c23af7548a0eb073e046eedfbabfb9f78fafe
2014-03-31 15:39:52 +02:00
Miklos Vajna
e826950e9d sw: still use SvxBrushItem for page style background
Commit 6e61ecd09679a66060f932835622821d39e92f01 (Merge back branch
alg_writerframes to trunk, 2014-03-19) changed the sw UNO API, so that
in case SvxBrushItem / RES_BACKGROUND was to be get/set, it mapped that
to svx's fill style.

This has two problems: 1) it does not work (see the failing unit test)
and also page style editing UI sets SvxBrushItem, so even if the UI is
used to (actually successfully) set the page background, it won't be
saved to ODF.

So, do this background <-> fill style mapping only for frames for now.

Change-Id: I734880a40c891ae9e341cbddf8f88b0462361aac
2014-03-31 12:16:49 +02:00
Armin Le Grand
6e61ecd096 Merge back branch alg_writerframes to trunk
(cherry picked from commit b635b4fa4e42053d30ab639643d2236a20243f62)

Conflicts:
	comphelper/inc/comphelper/TypeGeneration.hxx
	comphelper/source/property/TypeGeneration.cxx
	cui/source/factory/dlgfact.hxx
	cui/source/inc/cuitabarea.hxx
	cui/source/tabpages/tabarea.cxx
	cui/source/tabpages/tabarea.hrc
	cui/source/tabpages/tabarea.src
	cui/source/tabpages/tparea.cxx
	drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
	drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
	drawinglayer/source/texture/texture.cxx
	editeng/inc/editeng/unotext.hxx
	editeng/source/items/frmitems.cxx
	include/drawinglayer/texture/texture.hxx
	include/editeng/brushitem.hxx
	include/svx/sdr/primitive2d/sdrdecompositiontools.hxx
	include/svx/svxids.hrc
	include/xmloff/xmltypes.hxx
	reportdesign/source/ui/misc/UITools.cxx
	sc/source/ui/drawfunc/drawsh.cxx
	sfx2/source/dialog/tabdlg.cxx
	svl/source/undo/undo.cxx
	svx/inc/svx/unoshprp.hxx
	sw/Library_sw.mk
	sw/inc/doc.hxx
	sw/inc/format.hxx
	sw/inc/frmfmt.hxx
	sw/inc/swatrset.hxx
	sw/inc/unomap.hxx
	sw/inc/unoprnms.hxx
	sw/source/core/access/accpara.cxx
	sw/source/core/attr/format.cxx
	sw/source/core/attr/swatrset.cxx
	sw/source/core/doc/docdraw.cxx
	sw/source/core/doc/docfly.cxx
	sw/source/core/doc/notxtfrm.cxx
	sw/source/core/inc/frame.hxx
	sw/source/core/inc/frmtool.hxx
	sw/source/core/layout/atrfrm.cxx
	sw/source/core/layout/paintfrm.cxx
	sw/source/core/text/inftxt.cxx
	sw/source/core/text/porfld.cxx
	sw/source/core/text/txtfly.cxx
	sw/source/core/txtnode/fntcache.cxx
	sw/source/core/uibase/app/docst.cxx
	sw/source/core/uibase/app/docstyle.cxx
	sw/source/core/uibase/shells/drawdlg.cxx
	sw/source/core/uibase/shells/frmsh.cxx
	sw/source/core/unocore/unoframe.cxx
	sw/source/core/unocore/unomap.cxx
	sw/source/core/unocore/unoprnms.cxx
	sw/source/core/unocore/unostyle.cxx
	sw/source/ui/fmtui/tmpdlg.cxx
	sw/source/ui/fmtui/tmpdlg.src
	sw/source/ui/frmdlg/frmdlg.cxx
	sw/source/ui/frmdlg/frmpage.src
	sw/source/ui/inc/frmsh.hxx
	xmloff/source/text/txtprhdl.cxx
	xmloff/source/text/txtprmap.cxx

Change-Id: Id3ffaa83bb5594d287f1ac8f2c1c9cf55c70946d
2014-03-28 14:31:08 +01:00
Stephan Bergmann
567ef6d578 Second batch of adding SAL_OVERRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
2014-03-27 18:12:18 +01:00
Luke Deller
92ad689bcb Unit test for .doc import of full colour borders
This test exercises the import component of commit
ad51d4952dc30e0d1cdcc6037556cd7c66a61542 which adds support for full
colour borders in .doc import/export.

Also this test showed that page border import was not actually covered
by ad51d4952dc30e0d1cdcc6037556cd7c66a61542, so that omission is fixed
here.

Change-Id: I6272e9b22415b5af012145e99360c5765d5aec60
Reviewed-on: https://gerrit.libreoffice.org/8759
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-03-27 16:57:59 +00:00
Miklos Vajna
ddecc21561 RTF export: handle Relative{Height,Width}{,Relation}
Change-Id: I16bef12840f45b269de18fdac4c3718ed904e1be
2014-03-27 08:31:44 +01:00
Luboš Luňák
ec2b4ea9b4 fix test doc again
Change-Id: Icd728e03ac605a05fc9a1f001e2becaf1536ce7d
2014-03-26 21:05:32 +01:00
Luboš Luňák
ea4ce88bf6 fix test document name
Change-Id: I029c77aac896cefacd685705881a3259affee921
2014-03-26 20:30:43 +01:00
Luboš Luňák
0d1abac3a3 test for ignoring negative cell margin values
Change-Id: I7e56762a7097dd7369f9d8d71b499888ee5c081d
2014-03-26 17:36:49 +01:00
Luboš Luňák
77f4c4b8db Revert "rhbz#1075124: writerfilter: fix tables with negative left margin"
It appears that this was just a workaround that incidentally worked.
Making the negative value even larger (in abs value) doesn't seem to make
a difference for MSO, but LO fails again. A proper fix (better workaround?)
will follow.

This reverts commit 76aa23c59b4c81ea7b9d974a1a0a9e39c6bf8741.
2014-03-26 17:36:49 +01:00
Miklos Vajna
8757bea2e8 cp#1000044 DOC import: fProtEnabled means document is not totally read-only
Reading the spec, it seems that we have two cases here:

- if lKeyProtDoc is set and fProtEnabled is 1, then editing forms is
  allowed
- if lKeyProtDoc is set, but fProtEnabled is 0, then the document is
  totally read-only

So in the first case avoid the SetModifyPasswordHash() call to allow
form field editing.

Change-Id: Id0c48e8eb4bde75c5520a7b108fcfada51148faf
2014-03-26 15:40:22 +01:00
Miklos Vajna
bc5060b32f RTF import: handle Relative{Height,Width}{,Relation}
Change-Id: Ic3a578af9c0808b188a4d196b1c132c0b23f15f7
2014-03-26 11:53:09 +01:00
Bjoern Michaelsen
8bf22e7fe6 related fdo#74981: add a unittest for kicks
Change-Id: I817948d053640b04dab8aaee85e914757b83cfa1
2014-03-26 00:11:30 +01:00
Caolán McNamara
138d02c6c6 coverity#982474 Unchecked dynamic_cast
Change-Id: I67f495755502b034b8a09d8b6d61ede45f2d91e1
2014-03-25 17:03:50 +00:00
Jan Holesovsky
ece15872c8 Simplify.
Change-Id: If20ed2636c9b3cfbfcfe058fe027bd0cc9f8f277
2014-03-24 10:43:41 +01:00
Luke Deller
ad51d4952d Full colour borders in .doc import/export
The BRC (BoRder Control) structure used in .doc files to specify border
properties has undergone several revisions over time.  LibreOffice
supports the WW6 and WW8 (Word '97) BRC versions, which allow the border
colour to be selected from a palette of only 16 colours.

This changeset adds support for the WW9 (Word 2000) BRC version, along
with some new SPRMs (Single PRoperty Modifiers) which use it, so that
border colours are preserved accurately in .doc import/export.

This change covers:
- page borders
- paragraph borders
- borders around a sequence of characters
- table / table cell borders (import only)

Further work is required to extend coverage to borders of pictures and
export of borders in tables.

The LO code was using the same class WW8_BRC to store the bits for either
the WW6 or WW8 BRC.  This becomes a bit unmanagable when adding a third
BRC version, so I have split this into a separate class for each version.

Fixes fdo#68475, fdo#50185

Change-Id: I7ebc15236497cbab9312d8659fe7ed0bee2c59ed
Reviewed-on: https://gerrit.libreoffice.org/8646
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-03-23 12:57:52 +00:00
Jacobo Aragunde Pérez
8931ab3fc2 ooxml: preserve rich text sdt controls
These controls don't have a special property, like for example
unformatted text controls have. So we use the id property as a
marker; we will grab-bag it together with other sdt properties and
use the existing mechanism to write the sdt block on export.

A grab bag that only contains an id property is for sure a rich text
control so we add it to the character props and not to the paragraph
props, like in the case of the unformatted text control.

Word doesn't allow us to write an empty <w:id/> tag, so we fill
it with a random number.

Finally, modified an existing unit test to add a rich text control and
check it is exported correctly.

Change-Id: If403a4a2393d4ee069a628645e364d21f104a859
2014-03-22 23:58:16 +01:00