Commit Graph

1217 Commits

Author SHA1 Message Date
Miklos Vajna
76d1ca523d bnc#816593 DOCX import: fix auto table width wrt nested tables
The bugdoc has a table with a single cell, and also a nested table in
that cell. Both tables have auto width. The problem was that the width
of the outer table was too large.

There is a trick in DomainMapperTableManager::startLevel() to get the
cell widths at the correct level: do the same in
DomainMapperTableManager::endLevel(), and that'll fix the table width
problem. (Because with that, the outer table will correctly have access
to its cell width.)

Change-Id: Ib750f0475364fd7e47c445cb54f2df34f3af085d
2013-08-28 16:15:12 +02:00
Miklos Vajna
d9f1c11dfa Reduce copy&paste by adding SwModelTestBase::getShape()
Change-Id: I3b73405c546427bb5676db30e297af36c18043e6
2013-08-27 18:26:39 +02:00
Miklos Vajna
8f146a8042 bnc#834035 test file
Change-Id: I8416d663e573237a7b5a55545e630e5cbfdca25c
2013-08-26 13:40:17 +02:00
Miklos Vajna
e9275c08ac bnc#834035 DOCX export: fix hyperlinks of illustration index
We used to export raw Writer bookmarks, but that's not valid in OOXML.
Instead, it has normal bookmarks around the sequence fields, so use them
if they are available.

Change-Id: I0ef2ff7967c2802b53752c9505ef6db4cc2b8265
2013-08-26 13:11:09 +02:00
Miklos Vajna
ac6a2038ac ODF filter: handle draw:shadow-opacity for Writer frames
Change-Id: I3ad39e5de5b6999d6c2182c1ec622ae7f873cafe
2013-08-24 12:45:16 +02:00
Zolnai Tamás
e2e10b4a54 Fix types in new odf tests.
Change-Id: I0339dd941c81d12688bd531178ce9f1d6b779375
2013-08-23 22:33:37 +02:00
Zolnai Tamás
fa94ca9a84 ODF export/import of fine dashed border style
Change-Id: Ia81385dd9952e90cd5ebb3d1bba38aff6f84d079
2013-08-23 21:01:38 +02:00
Zolnai Tamás
f8b6c3949e CharBrd 7: Border shadow
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
2013-08-23 21:01:37 +02:00
Miklos Vajna
df06e968f6 DOCX export of picture shadow transparency
Change-Id: If84da3cd020485b1895c572b8e24998266d9be31
2013-08-23 16:13:11 +02:00
Miklos Vajna
b6a4247ea5 VML import: fix default value of mso-wrap-distance-left/right
Change-Id: I2168358076d9c5ce3271b21cd5a541e51aa502f9
2013-08-23 16:13:09 +02:00
Ri GangHu
d3ffe3ed3f fdo#67737 : fix for flip not being imported & rendered correctly
Signed-off-by: Adam Co <rattles2013@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/5272

Conflicts:
	sw/qa/extras/ooxmlexport/ooxmlexport.cxx

Change-Id: I5c8440edad0381e33b64f64bb54aa8f1bc304007
2013-08-22 17:06:10 +02:00
Miklos Vajna
84184f957d DOCX tests: move testTableFloatingMargins to the export suite
This was added to the import suite temporarily, to be sure the import
part does not regress till the export part passes, which is now the
case.

Change-Id: Ib9291ab3ef0beaa407f025c6f81bda9cdf9f75e9
2013-08-22 16:48:41 +02:00
Miklos Vajna
f26e35c935 oox::drawingml::convertEmuToHmm: fix rounding for negative values
This commit also moves the floating table DOCX import testcase to the
export suite. That test now passes fine, though previously it failed with:

- Expected: -199
- Actual  : -198

Due to the rounding error.

Change-Id: I9bdc9295f68b6bd3e5f5bee868aae15194b30804
2013-08-22 16:35:54 +02:00
Piao Jing Nan
b904b9a487 fdo#44689: fix for DOCX import+export of page number start value
Change-Id: If4940b17bcee0d06fa8dc9bf9faa708cf6d0db1c
Signed-off-by: Adam Co <rattles2013@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/5528
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
2013-08-22 13:52:37 +00:00
Miklos Vajna
f1e5e271f9 fdo#68076 RTF import: default font had priority over the specified one
Regression from 60c17b2873.

Change-Id: Ie16d611622e6a814d5cbea00c3f992cd9ecba027
2013-08-22 11:39:31 +02:00
Miklos Vajna
9bc83f1b56 sw_ooxmlexport test: remove no longer needed m_bImport
Change-Id: Ib95491e07d5619bd1a1b2946596c0308c6f73739
2013-08-21 17:04:47 +02:00
Miklos Vajna
d4d0df13bd DOCX import: fix handling of textframes having shape text ending with a table
Change-Id: I82ef1072bfeb1195152ef7f1ea743653ac102b37
2013-08-21 17:04:46 +02:00
Zolnai Tamás
cc978cda8c Add test for drop caps odf filter
Change-Id: I52735c222e14e725fc01caa156cb8ea9671a36cc
2013-08-18 09:49:51 +02:00
Zolnai Tamás
ea358f5d5b CharBrd 8.2: Tests for UNO API and ODF filter
Use just those API tests which still alive.
Export filter test use import so no need for distinct
import tests.

Change-Id: Idddc2ece10e20027551538f4e8c224edffa9bfe8
2013-08-18 09:49:50 +02:00
Miklos Vajna
b9c1a9b9aa fdo#44715 RTF import: reset styles in tables on RTF_PARD
Commit 4a507f732d added an exception to
RTF_PARD (reset paragraph properties) handling: when we're inside a
table, it should not reset the fact that we're inside a table (which is
a paragraph property).

However, instead of just re-adding that property, it disabled resetting
for all properties, and we had a growing list of exceptions since then.
The next thing to add there would be the paragraph attributes, which
contains the style information. Instead of growing that ad-hoc list,
reset everything again and just re-add the "in table" SPRM.

This makes the second and later paragraphs in the A1 cell of the bugdoc
have proper font size.

Change-Id: I2de80894fcd5da3bf45d221af9a04a307c70a29b
2013-08-17 12:30:56 +02:00
Miklos Vajna
e41ce95ca8 DOCX export: fix bottom paragraph margin inside text frame
Having non-null mpParentFrame during the export of text (not during the
export of the frame properties) resulted in getting the frame margins as
an SvxULSpaceItem, not the real paragraph margins.

Change-Id: Icab8906ef7935a86098d7340f5469e732393663c
2013-08-16 19:53:33 +02:00
Miklos Vajna
cea495b0db DOCX export: implement wrap distance of Writer textframes
Change-Id: Ia4a36f18495de9f8a2fb0d2b6691231c7bcbcce4
2013-08-16 19:53:32 +02:00
Miklos Vajna
e06e0fd5ea RTF import/export of paragraph drop shadow
Change-Id: I8d2485962947eac8acc9ada384a9c1bd4cb22503
2013-08-15 17:13:35 +02:00
Miklos Vajna
66b4bfe302 DOCX import: handle custom left cell margin for float table position
Change-Id: I5bc51b739c663d3e123c9d7fb4c2a70f01f8c841
2013-08-15 17:09:11 +02:00
Miklos Vajna
26d9efd36a DOCX import: handle w:leftFromText and w:rightFromText for floating tables
Left margin wasn't implemented, that's simple. Right margin of the table
was set to the cell margin in commit
53d27a30ce, which turns out to be wrong:
it's true that the right margin should be >0, but not because of the
cell margin but because of the table margin. The new behavior matches
what the binary import always did.

Change-Id: Ifc24e4f086c49d5d575defdfca1d27e497fa03dc
2013-08-15 17:09:11 +02:00
Miklos Vajna
53d27a30ce DOCX import: fixed horizontal position of floating tables
In Word, just like normal tables, floating tables should be positioned
in a way that the start of the cell text has the same horizontal
position as normal paragraph text.

To emulate this, first the table should be moved left by the table
border distance, then also by the border with / 2; as done for
non-floating tables already.

Change-Id: I581311fbb08009e6c1839106e8f615d078a4a705
2013-08-14 17:30:08 +02:00
Luboš Luňák
186fc4c434 w:spacing in a paragraph should also apply to as-char objects (bnc#780044)
Otherwise global w:spacing will be used even if overriden locally.

Change-Id: I01f0a3a323566f6e29faf73bf9d2ba874565eb42
2013-08-14 15:13:59 +02:00
Miklos Vajna
65afb07d56 DOCX export of paragraph border drop shadow
Instead of passing over shadow location only in case of page borders, do
the same for paragraph borders as well.

Change-Id: I311638fe0f41ef47ae351f7d199bfbc8b8aabfbe
2013-08-13 17:35:15 +02:00
Miklos Vajna
774b689917 RTF import: handle rotation on groupshapes
Change-Id: I7892224a118b6566e26b3ffc472c88f3c7f58620
2013-08-13 11:02:19 +02:00
Miklos Vajna
144ca12ef3 VML import: handle rotation on groupshapes
Change-Id: I37f0081ae0a8af838c9f5bf158b340d726d7d1a3
2013-08-12 16:08:19 +02:00
Miklos Vajna
c73b8072a1 fdo#63428 writerfilter: fix paste of commented text ranges
There were multiple problems here:

- xFoo->createTextCursorByRange() got a text range argument,
  where the text range wasn't from the xFoo text
- it was assumed that all XText implements text::XParagraphCursor as
  well, but this is not true for e.g. comment text
- commented text ranges were pasted as normal comments (once again, the
  insert position wasn't passed around)

Change-Id: I9a975a08b08a7f32b1ee71e42f58736cc0dbb09d
2013-08-12 12:35:19 +02:00
Miklos Vajna
aa6959ba2c fdo#53556 testcase
Change-Id: If58376aec31ab00cab19221beed73e8275a834d2
2013-08-09 16:12:18 +02:00
Miklos Vajna
4bc063090c bnc#823651 WW8 import: fix paragraph style in empty first page header
The problem was that the first page SwFmtHeader / SwFmtFooter wasn't
created in case the header/footer text was empty, even if fTitlePage was
set.

Change-Id: I5e58419161bcc663e2beb0338b95877469e0fd3c
2013-08-08 16:20:26 +02:00
Miklos Vajna
b755df14a4 fdo#47440 import RTF_SHPBX/YPAGE for Writer pictures, too
Previously this was only handled for drawinglayer shapes.

Change-Id: I7ce440a27ebe44fc867b8a7f4ee62217076677f0
2013-08-06 16:57:26 +02:00
Miklos Vajna
c7884509a8 fdo#67498 RTF import: fix missing margins vs continuous section breaks
The document had 3 sections, separated by continuous section breaks.
Previously only margins from the last section were imported, this way
the first page had default margins.

Now margins are also applied when we hit continuous section breaks. This
way margin values from the last section break affecting the page wins. A
later commit could improve this further by setting the minimum of these
and setting a section margin for each non-minimal sections.

Change-Id: I4d9a4585e795220533909bd1d467d933caaa0d71
2013-08-05 17:38:20 +02:00
Adam Co
a4b4bde0a2 fdo#67013 : fix for borders in headers and footers
Change-Id: I45d71348a64b8e79c34e24829cceadedd0d8f6a9
Reviewed-on: https://gerrit.libreoffice.org/5170
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-07-31 16:19:21 +00:00
Tor Lillqvist
3e48277e36 Convert utf-8 bytes to \xNN hex representation
Change-Id: I5d1cc0331278f09a6e32345980c660d877d606fa
2013-07-31 12:46:45 +02:00
Fridrich Štrba
c7a8462b83 Revert "fdo#66246 fdo#66395 BOM for MSVC with UTF-8 unfriendly codepage"
This breaks tinderbox builds. Better fix on the way.

This reverts commit ded871e9c1.
2013-07-31 11:36:27 +02:00
Isamu Mogi
ded871e9c1 fdo#66246 fdo#66395 BOM for MSVC with UTF-8 unfriendly codepage
MSVC misinterprets UTF-8 source code without BOM as ANSI/OEM codepage.
For that reason if local codepage is unfriendly to UTF-8, it sometimes
causes compilation error.

Change-Id: I8acd5500e581e020fd60b5a2ec20629f92fdf87c
2013-07-31 09:29:07 +01:00
Adam Co
86166dea7e fdo#64350: fix for page border shadow export
Change-Id: I3ae7a532eea7e81b9a302a98c00a514d307e8605
Reviewed-on: https://gerrit.libreoffice.org/5146
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-07-30 12:03:50 +00:00
Miklos Vajna
83e0489217 fdo#67365 testcase
Change-Id: I921eda30f60e5466e381922193c2a46be10ad65c
2013-07-27 01:09:46 +02:00
Miklos Vajna
67163f5531 fdo#66474 DOCX import: fix handling of mixed fixed/auto cell widths
Instead of checking if any cells have fixed width, check if all calls
have fixed with.  Regression from
74c5ed19f4.

Change-Id: I58d3d16cbaa2c54a8a1ac309910336c72dcb39b7
2013-07-26 17:33:02 +02:00
Miklos Vajna
e849f5d84a RTF import: fix groupshape import when shapes don't contain text
Without this, the groupshape itself was created, not it had no child
shapes.

Change-Id: I5d3276498eb3ffe840f3d42dad16661849596da4
2013-07-26 12:55:02 +02:00
Miklos Vajna
50a76af9d1 Related: bnc#820504 RTF import: don't anchor shapes TO_PAGE
This is the RTF equivalent of f5b7acac62,
which avoided TO_PAGE-anchored shapes in the VML importer.

Change-Id: I58a5cdb311ac43ddba00bc441005fb37a4899cee
2013-07-26 11:13:44 +02:00
Adam Co
6be2b0fbf9 fdo#65718 : fix for exporting of image distance from text
Conflicts:
	sw/qa/extras/ooxmlexport/ooxmlexport.cxx

Change-Id: Id33a9d491b2d89b05189b566641dadcef3176dc3
2013-07-26 10:40:16 +02:00
Miklos Vajna
94b3ec0597 fdo#60990 testcase
Change-Id: I35dcb21e55e262db274d7e811d79f9fafc6d6c25
2013-07-24 18:08:20 +02:00
Adam Co
71e1927c78 fdo#66781 : fix bullets with level 0
Conflicts:
	sw/qa/extras/ooxmlexport/ooxmlexport.cxx

Change-Id: I14b0ce9ae096eae4759793a49865eefe16ec1afd
Reviewed-on: https://gerrit.libreoffice.org/4818
2013-07-24 15:08:03 +02:00
Miklos Vajna
afe463fb62 SfxGrabBagItem testcase
Change-Id: I1386ab7a0680460bd98648d2803b1b7e0326e093
2013-07-24 12:11:13 +02:00
Miklos Vajna
bb67e709b7 fdo#64637 RTF import: handle multiple RTF_COMPANY
Instead of unconditionally calling addProperty(), first check the
existence with hasPropertyByName() and call setPropertyValue() instead,
if necessary.

Change-Id: Ie0a075bbfe6eaa1f66726c456105dcdef9001d30
2013-07-23 12:37:06 +02:00
Adam Co
2d5978b22b fdo#66145: fix for FirstIsShared flag
Change-Id: Id8cc3829ccd5806295b0f240a570dc1d66ed0c87
Reviewed-on: https://gerrit.libreoffice.org/5002
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-07-22 20:28:30 +00:00