1217 Commits

Author SHA1 Message Date
Alexander Wilms
a27462189d Remove visual noise from sw
Conflicts:
	sw/inc/unodraw.hxx
	sw/inc/unoframe.hxx
	sw/sdi/swriter.sdi
	sw/source/core/unocore/unoframe.cxx
	sw/source/core/unocore/unoparagraph.cxx
	sw/source/filter/ww8/rtfexportfilter.cxx
	sw/source/ui/inc/unotxvw.hxx
	sw/source/ui/lingu/hyp.cxx
	sw/source/ui/lingu/sdrhhcwrap.cxx
	sw/source/ui/uno/swdetect.hxx

Change-Id: Ic0a3fb2392187c277c9b36915ffb10dcf0317908
Reviewed-on: https://gerrit.libreoffice.org/8322
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-27 09:41:00 -06:00
Miklos Vajna
150420cbff DOCX export: fix style's next element order
Change-Id: I03e91a448794efc2b91f3a6fb6c29dda3403ce9b
2014-02-27 16:22:25 +01:00
Miklos Vajna
743d90ca38 DOCX export: fix order of table border elements
Change-Id: I17d8634017c5b0374d30501186b338ddedbcd7ea
2014-02-27 15:22:35 +01:00
Tomaž Vajngerl
e9b6e7f6b4 ooxml: extend roundtrip test with w14:props3d
Change-Id: Ia7a3a998b07aefc94e6713c2ecf639166f1d3460
2014-02-27 09:12:05 +01:00
Tomaž Vajngerl
a9e117cfb6 ooxml: extend roundtrip test with w14:textFill
Change-Id: I9d1a426b0972211f4b04145dd8e231162d3e5845
2014-02-27 09:12:02 +01:00
Jacobo Aragunde Pérez
1c993627d8 sw: write other types of embeddings properly to docx
Improves patch 1428ec6f4e2bfe0d8654a9ccc713e274e08c6423

When embedding an object into a docx, several things interact:

* The properties in the <o:OLEObject> tag in document.xml
* The ContentType for the file defined in [Content_Types].xml
* The Type of the Relationship defined in document.xml.rels

You need the right combination of those three elements for Word to
properly recognize the embeddings in exported documents.

To know which values must be written, I store some interoperability
information in the import phase in the document grab bag. The
relevant information is the value of the ProgID attribute in the
<o:OLEObject> tag.

I have defined three cases depending on the value of ProgID, but more
could be needed in the future:
* Embedded xlsx sheet.
* Embedded pptx presentation.
* Generic OLE, this should work with embedded odt/ods in combination
  with the ProgID attribute stored in the import phase.

Change-Id: I26336cb3fe47bd33e1cef11dd1c7edcf390f2e56
2014-02-26 20:18:36 +01:00
Miklos Vajna
52c5d1a70d CppunitTest_sw_ooxmlexport: restore this test
It was crashing, as a quick-fix 43feacd5330b5652b58e8a75a0f41a78ee6ebe1c
(sw: fix build, 2014-02-08) disabled the test. I wanted to fix this
properly today, but it was already working.

Change-Id: Ifbfa82bc907d6c4bd8ec398472f751714c721b09
2014-02-26 17:39:31 +01:00
Miklos Vajna
8520f61fe3 CppunitTest_sw_ooxmlsdrexport: move all AlternateContent tests
AlternateContent is used while dealing with shapes, move all those
tests. With this, the original suite has 330 asserts, the new one has
78, and they can run in parallel since
2efee3c632bb8372685bb9f7b07e99b91668d779.

Toplevel 'make' on my machine:
- before: 3m15.237s
- after:  2m40.197s

Change-Id: Id7ac9708e29ae8c6ea7db8aa845de089ed4bdf42
2014-02-26 16:21:19 +01:00
Miklos Vajna
2efee3c632 CppunitTest_sw_ooxmlexport: factor out drawing-related testcases
As a start, moved 30 asserts to the new suite, still 378 is in the
original one.

Change-Id: I934bce63e286af3080ae014c3bd8f4f09866feb2
2014-02-26 15:52:02 +01:00
Tushar Bende
7e92d9881f fdo#74771 : LibreOffice image captions crash MS Office Word
There was a problem if
    1)Document is created in MS word
    2)then opened in Libreoffice and edited by adding Image and Caption
    3)saved back to docx format
    4)Attempt to open the DOCX file in Word. Word was crashing.

    Problem was if any doc is edited in LO by adding image and Caption LO adds image as anchored inside TextBox.
    Which MS word doesn't support(Anchored image inside TextBox).
    Verified code changes on both MSWord2007 & MSWord2010 as it was crashing both earlier.

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

Change-Id: I621d0c5e3acbf9e1fc8514aa70110aa863748ceb
2014-02-26 13:25:41 +01:00
Rohit Deshmukh
598d02d71f fdo#75133: Preseved bibliography after round trip.
Conflicts:
	sw/qa/extras/ooxmlexport/ooxmlexport.cxx
	writerfilter/source/dmapper/DomainMapper_Impl.hxx
Reviewed on:
	https://gerrit.libreoffice.org/8124

Change-Id: Ieaea19600fbda3b536549a1a100f847f9ae3654b
2014-02-26 12:50:29 +01:00
Vinaya Mandke
a45bdb8aa8 fdo#73596 [DOCX] Auto Columns in Index
When number of columns in the Index is not specified
by the "\c" switch, then avoid adding the section breaks
explicitly before and after the Index Section and "\c '0'"
in the field identifier string.
Also added UT for the same.

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

Change-Id: I56826f72beea580d0ac5aef44d4a71fd29b77316
2014-02-26 12:18:50 +01:00
Tushar Bende
0fb3bdc5d3 fdo#72563 : PAGEREF field tag not preserved during Roundtrip
There was a problem that in case of TOC,PAGEREF field tag was not preserved
inside <hyperlink> during Roundtrip.
Reason found, there was no code support to handle PAGEREF in export.
- Added code support in export code to handle PAGEREF.
- Also added <w:webHidden /> tag for PAGEREF
- Earlier pushed code changes was corrupting some documents.
- Verified this patch on large set of Docx containing different combination of hyperlinks.

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

Change-Id: I2331a33100ed77e15a39ecc6db01b0e696ea62de
2014-02-26 11:43:53 +01:00
Vinaya Mandke
263938c4a8 fdo#73596 [DOCX] Multiple Columns in Index
The number of columns in an Index is given by the "\c" switch.
During export, added section breaks before and after the Index;
this is to preserve the layout of the round tripped file in MS Office.

Modified MSWordExportBase::NoPageBreakSection so that
an incorrect "nextPage" section break is not exported.

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

Change-Id: I364e19d6739c4c6a60e3c605044fc1fafd9147d3
2014-02-26 11:27:58 +01:00
Pallavi Jadhav
a31fbb53db fdo#74566:DOCX: Preservation <w:br> tag for Break to Next Page
Issue :
	'Break to Next Page' gets converted to 'Page Break Before'
         in RT.

	XML diffrenece :
	- LO exports <w:br> as <w:pageBreakBefore /> in document.xml
	- The page break is written into wrong paragraph.

	Implementation :
	1] Removed implementation to export <w:pageBreakBefore />.
	2] Added a check to write <w:br> in correct paragraph.
	3] Modified code to handle SectionBreak() even if Text node
       	   has no string.
	   It is required when DOCX contains a PageBreak with footer.
	4] Written Export Unit Test case.

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

Change-Id: I237b9c5fdd3083b441f6e81cd8442f458eccf1a0
2014-02-26 10:50:08 +01:00
YogeshBharate
4654e9b113 fdo#74271: Added unit test & code changes for footer contains hyperlink.
Problem description:
- If the document contains a hyperlink in footer
  that starts with "www" (ex. www.google.com) then
  the footer1.xml.rels of the roundtrip file contains
  empty Target.
- Since the target is empty, the file get corrupted in MS Office 2007.

Implementation:
- If hyperlink starts with "www" then make bSmart as true.

Change-Id: Ifa2b587d3326152b2d9778bd818fbe68b1cf6410
Reviewed-on: https://gerrit.libreoffice.org/7766
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-02-26 03:24:57 -06:00
Stephan Bergmann
9d6c36dee3 ambiguity
Change-Id: Id0e3a969ff282673efd874980c25570b7ea1087b
2014-02-25 15:08:47 +01:00
Michael Stahl
c8f83ce1db rhbz#1065629: RTF import: re-implement nested tables
The previous fix for this bug only fixed a symptom, this a fix for the
real problem; with the real problem fixed the nCellEnds is unnecessary.

Given that top-level table properties may be put either before or after the
table cells, the only way that works to import tables is to buffer a whole
top-level table row, but currently the buffer is replayed already at the
end of a nested table row.

Fortunately the RTF spec guarantees that \nesttableprops must occur
after the nested table cells of the nested row, so it should be
sufficient to remember the cell properties for the current nested table
row only, in addition to the cell properties for the top-level table row.

With this change, skipping a \nesttableprops destination when there is
a table style turns out to mangle ooo98040-1.rtf badly, so stop doing
that workaround.

RTFDocumentImpl::popState() was copying various buffers up the state
stack which is a clear indication that these shouldn't be members of
RTFParserState in the first place, move them to RTFDocumentImpl.

Change-Id: Ic2d8f7b3e00844b224d61605b405ca651239e5f7
2014-02-25 14:06:14 +01:00
Miklos Vajna
d618ea6b86 xmloff: import/export loext:rel-width/height-rel for Writer shapes
Change-Id: Ie6e4367a235038479287530bd08b0a89c6bb498b
2014-02-25 12:43:32 +01:00
Tomaž Vajngerl
aaf1e86408 fix test merge screw-up
Change-Id: Id09d609c97872f7578b33e981d397fcdf7241e1b
2014-02-25 12:31:42 +01:00
Miklos Vajna
4da81e4a0b xmloff: import style:rel-width/height for drawinglayer shapes
In case the underlying UNO object supports that, which is the case for
Writer. Export was already working before.

Change-Id: I4676c8349ebe1959da004d6e1a024a342da45049
2014-02-25 12:11:41 +01:00
Tomaž Vajngerl
ea7685ce69 ooxml: extend roundtrip test with w14:textOutline
Change-Id: Ie888f3089f56dfd7b6ae4ae87aa2700e364c3ae3
2014-02-25 12:10:21 +01:00
Tomaž Vajngerl
55d1464407 ooxml: also change the document name in the test
Change-Id: I930d7da93d49545a1622a158943ab7ef03fc4d1f
2014-02-25 12:08:51 +01:00
Tomaž Vajngerl
6eb247f4e9 ooxml: extend roundtrip test with w14:shadow and w14:reflection
Change-Id: If5843a6e5b18102d0a3379ece168d06ad0020275
2014-02-25 12:08:50 +01:00
Pallavi Jadhav
01826dc125 fdo#74105 : Prservation of Numbered lists-Starting with Value '0'
Issue :
	  - DOCX containing Numbered lists- Strating with
            value '0' is not preserved after RT.
          - LO exports document with Numbered lists starting
            from '1' instead of '0'.
          - LO "Import" and "Export" need fixes.
          - If LO will imports correctly, export will get
            correct value.

       Implentation :
          - Added code at Import and Export side.
          - Added Export Unit test case to check that
            <w:start> is not present in numbering.xml
            for 0th level.

       NOTE : <w:start> is optional. If not mentioned
              Numbered lists starts from '0'.

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

Change-Id: I30910c41fd188f30a1723cf8e07be5ea1cde1be0
2014-02-25 10:13:55 +01:00
Caolán McNamara
df2533ec40 fix MacOSX-x86_49-TDF tinderbox
Change-Id: I15632bd87be37d9bb5815c9d800271dfd4c3b016
2014-02-24 13:39:16 +00:00
Jacobo Aragunde Pérez
9fab183d4d sw: Unit test for spreadsheets embedded in docx
Change-Id: I0a91ea0ca36d57320c3495a5cedba7924d3a7ea7
2014-02-24 13:26:58 +01:00
Miklos Vajna
0cf6f241e4 abi#11739 DOCX export: fix validation error, wrong order of some elements
Change-Id: Ic1c0174718ba6853fcc8795324a99b2a332b865e
2014-02-24 09:14:46 +01:00
Zolnai Tamás
9afdc0fb6b DOCX export tests: simplify namespace
Change-Id: I656bba948ba672e68b8de262b06e18ded73668db
2014-02-22 07:20:08 +01:00
Markus Mohrhard
7d7e2941d6 fix build
Change-Id: Ic21c92a02d42dc69d66a69de0e5d8e55ee1c8cb3
2014-02-22 05:58:51 +01:00
Tomaž Vajngerl
0d2c1e6423 OOXML roundtrip test for w14:glow
Change-Id: I80dd71bad02be980229899845c1451df6f34dca5
2014-02-21 23:34:38 +01:00
Zolnai Tamás
27a03eb3ba WW export: make line spacing export clearer
see also: SvxLineSpacingItem::PutValue

Move para spacing test from import to export and
remove a test case which tests a part of the same thing.

Change-Id: I96da9f6ac7851bd74e34ab4a6d2a2f3499549a87
2014-02-21 22:19:10 +01:00
Zolnai Tamás
12f22bd781 drawingML import: paragraph spacing inside group shape
unotext: a conversion was missing during the corresponding
SvxLineSpacingItem was filled with "ParaLineSpacing" UNO property.

Change-Id: I02559ed7e8b46150a88eed2bf20afdf084aec47b
2014-02-21 22:11:35 +01:00
Miklos Vajna
1ec263e25d DOCX export: initial support for the DateField form control
Before we started to import the date SDT as a form control, we exported
what is now the HelpText property on the control. So as an initial step,
export that back as plain text, without any formatting.

Change-Id: I569e6690b0c580d8073611b48d610f87974145b3
2014-02-21 18:11:00 +01:00
Miklos Vajna
32ada80a9f DOCX export: make sure a graphic is only written once
Even if it's referenced multiple times, because of mc:AlternateContent.

Change-Id: Ie4cb0ec088d12be5421bac43113c8ae4636028e0
2014-02-21 13:02:31 +01:00
Zolnai Tamás
b733190b0e DOCX export tests: increase strength of testing nested text frames
Change-Id: I370f22ee948f5a760ba01c98a8cfb5fac96f98b7
2014-02-21 09:28:25 +01:00
Zolnai Tamás
756d0b1dff drawingML import: run fonts inside group shape
Change-Id: Ib54fe868c11c0c22b85d8821fa7274c80918362c
2014-02-21 09:28:25 +01:00
Zolnai Tamás
191f648ffd drawingML export: gradient fill defined by imported theme
Plus avoid writing out empty <a:gradFill></a:gradFill>.

Change-Id: I50fa92b2cc30eedfe28a8c6af697d43d98a3aee8
2014-02-21 09:28:24 +01:00
Miklos Vajna
deabda6b38 DOCX import: fix missing underline in comment text
Regression from fb5ee5c9953635a423d3102b901e409d15800096 (sw: Add
support for different grab bags at PropertyMap., 2013-11-29),
PropertyMap::GetPropertyValues() assumed all XTextRange implementations
support the new property, which is not true for at least editeng.

Change-Id: Ib5657be522d30f203cecbbbae74d6594cef984fb
2014-02-20 18:39:23 +01:00
Tobias Lippert
a18a1a4545 Remove vcl/settings.hxx from vcl/svapp.hxx and vcl/outdev.hxx
Added vcl/settings.hxx to all cxx files which require it.
This helps to speed up compilation after changes to the settings.

Conflicts:
	sc/source/ui/dbgui/pvlaydlg.cxx

Change-Id: I211a0735c47f72d6879f6f15339355abfe0e3cf4
Reviewed-on: https://gerrit.libreoffice.org/7933
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-20 16:22:17 +00:00
Miklos Vajna
c2485b4c38 DOCX export: handle wp14:sizeRelH/V relativeFrom=margin for shapes
Change-Id: I913fe328376a246bf410512c4cfb018fc573094b
2014-02-20 16:46:33 +01:00
Miklos Vajna
1733b67841 CppunitTest_sw_odfimport: add annotation formatting testcase
Most probably this was fixed by 0761f81643a6890457e9ef7d913ab5c88c2593a4
(123792: complete annotations on text ranges feature, 2013-12-19).

Change-Id: Ic712c1a33271081205901ddbf5d629d6f2198126
2014-02-19 15:50:32 +01:00
Miklos Vajna
4fc2bec525 DOCX OLE import: inherit more properties
Change-Id: Ifa7eb3eee774266f440b313437f0decce27eedc5
2014-02-19 13:20:31 +01:00
Stephan Bergmann
973b47a336 unotools: sal_Bool -> bool
Change-Id: I8051c0756e0474a5b4f748e0aa15a9922e82ea97
2014-02-19 12:47:07 +01:00
Miklos Vajna
2a35f5c794 DOCX OLE import: inherit anchor type from replacement graphic
Change-Id: Ic8b6f423acae5cc7e3799cf20e672b56a9cc8c0c
2014-02-18 20:19:17 +01:00
Zolnai Tamás
8e285728e6 ooxml unit tests: merge two tests
Change-Id: Ie37ec829ddeeaeb8882c1a566cc80419edcfa170
2014-02-18 17:32:44 +01:00
Zolnai Tamás
c9b1fd6345 drawingML import: fix position of cildren in shape groups
Translate component of parent shapes' transformation
have to be applied to children when there is no explicit
child transformation.

Note. Export also use this concept.

Change-Id: I51bd3325fb53ee250402326ee361c8f07038ed07
2014-02-18 17:31:01 +01:00
Miklos Vajna
9e6960c74d DOCX drawingML export: fix paragraph margins
Without the EndParagraphProperties() call, w:spacing wasn't ever
written as a paragraph property.

Change-Id: Iff4ca2a9e0725ac38d7b528c220c8ea58fc89cab
2014-02-18 16:03:49 +01:00
Michael Stahl
07ef4cf096 rhbz#1065629: RTF import: don't drop nested cells if not enough \cellx
In this document written by "XMLmind XSL-FO Converter" there are less
\cellx than \cell and thus when reading \nestrow/\row a whole buffered
nested table \cell is lost and then subsequently the rest of the nested
table too.  Try to fix that by counting both \cell and \cellx and
replaying until the maximum of those.

Cannot count \intbl since we synthesize that in various places.

(regression in LO 3.5)

Change-Id: I3b64ad94af842e076611418589a0c83bd18841c6
2014-02-18 11:35:51 +01:00
Zolnai Tamás
f4ae06c6b5 DOCX import: fix position of floating tables
Change-Id: I542acfd3215dcc7bbc2de49c567f73de0cda97a7
2014-02-17 17:22:28 +01:00