Commit Graph

6204 Commits

Author SHA1 Message Date
f46d23e242 sal_Bool to bool
Change-Id: Ie04d9314f66bcda8e1c7939248af79a15fbdaaeb
2014-03-02 20:17:57 +01:00
754dd9212a sw: hey, don't forget about big-endian parts in wrtasc.cxx!
Change-Id: I8e71c35dfb4f8ce475357412cc9121c50830069e
Reviewed-on: https://gerrit.libreoffice.org/8401
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-28 14:21:42 -06:00
a783421ef0 ooxml export: write w:compatSettings if present in GrabBag
Change-Id: Ie5f3ba8f12ca8d5b9729c5bfa13da3b34dbfda2d
2014-02-28 20:24:38 +01:00
4b4a1b8095 ooxml export: write mc:Ignorable for w14 and wp14 namespace
Change-Id: Ifc461da32fa732bafd3bab4d5bcb0760992c2679
2014-02-28 20:24:38 +01:00
8dd20b80ea ooxml export: rename member settings to m_aSettings
Change-Id: Ic286df1c6d8bd611c7771482f91e5e375af3745c
2014-02-28 20:24:37 +01:00
c5ecd9d2a7 Correct indentation
Change-Id: I3ce85a17966c155c71cd3e3d1a142cc02ec34bd7
2014-02-28 13:05:19 +01:00
21d356f691 sw: export OLE objects outside run properties
Until now the export of OLE objects was being done adding them to the
m_postponedOLE member and reading that member when the run properties
are closed, but it can happen that we receive an OLE object while not
in the middle of the row properties.

We have extracted the code that actually does the export to a
separate method and call it if m_postponedOLE is not available.

Some lines are incorrectly indented to make the purpose of this patch
more evident, and will be corrected in the next patch.

Change-Id: I3e0d785c99c659ec35d0c02dfc52367dcb6880b7
2014-02-28 13:02:01 +01:00
94b46d202c Correct wrong variable name.
Change-Id: Ic76e328e7600aab54dfb8318e1d9667fa6d309a5
2014-02-28 13:02:00 +01:00
de90456c71 sw: prevent crash
In case some error happens when exporting OLE to docx.

Change-Id: I5673f13e2fb4bc7887f1fc54771532c049129047
2014-02-28 13:01:59 +01:00
af63727b9f Resolves: #i15508# Added support for BMP file type
(cherry picked from commit 9956ed1303545cd61901e33b110698c4e5e224c4)

Conflicts:
	filter/source/msfilter/escherex.cxx
	include/vcl/gfxlink.hxx
	svx/source/xml/xmlgrhlp.cxx
	sw/source/ui/docvw/romenu.cxx
	vcl/source/filter/graphicfilter.cxx

Change-Id: Ibcbb69b9c57cd8a438788e9a9c95744e99b6fcdd
2014-02-27 19:30:40 +00:00
8827b08dc3 fdo#39468 Translate German comments: sw/source/filter/ww1
There was still one untranslated paragraph left.

Change-Id: I9b951c5216560614bd3fc42f9118477ad66cbdf2
Reviewed-on: https://gerrit.libreoffice.org/8385
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-27 10:58:49 -06:00
1c0e1b9c64 ooxml export: w14:stylisticSets & w14:cntxtAlts element
Change-Id: I46e838fac213378f95389812b47ce5896f703505
2014-02-27 17:35:04 +01:00
675bdda729 ooxml export: w14:numSpacing element
Change-Id: I6592b9c5a02d96795411526eff69c3380668a10e
2014-02-27 17:35:02 +01:00
1ed9d3abf3 ooxml export: w14:numForm element
Change-Id: I7990d2ef77de855455f49e3f12f4ae117f753774
2014-02-27 17:35:01 +01:00
31cd5fc1fd ooxml export: w14:ligatures element
Change-Id: Iad9a96d202487fa71e7110d7f89d94f161e0bb6f
2014-02-27 17:35:00 +01:00
f3307b0306 coverity#1187644 confused copy ctors, leaks, etc.
also

coverity#1187861 Uninitialized pointer field
coverity#1187862 Uninitialized pointer field

Change-Id: Ibc420b8ef2d6db58b1b23a85a4029182a05b5f44
2014-02-27 16:09:27 +00:00
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
150420cbff DOCX export: fix style's next element order
Change-Id: I03e91a448794efc2b91f3a6fb6c29dda3403ce9b
2014-02-27 16:22:25 +01:00
743d90ca38 DOCX export: fix order of table border elements
Change-Id: I17d8634017c5b0374d30501186b338ddedbcd7ea
2014-02-27 15:22:35 +01:00
37a543e8d5 coverity#1187668 Dereference null return value
Change-Id: Ie0022c868484a9aed2d0efe2d95182d0094c6734
2014-02-27 12:58:43 +00:00
015b80e852 editeng: sal_Bool->bool
Change-Id: I9e27453f0b77a23ae3d811f0a50a85d3fdf80978
2014-02-27 12:30:30 +02:00
2a4a74a499 editeng: sal_Bool->bool
Change-Id: I3827611dc887985484aec7fa5506e15298ac916e
2014-02-27 12:30:28 +02:00
57779aa019 editeng: sal_Bool->bool
Change-Id: Id4174904487fc153d8e80471da7c829c52092f78
2014-02-27 12:30:26 +02:00
bbe5d32dda editeng: sal_Bool->bool
Change-Id: If5b8269b35983e564f1002f6ed25ca607381eea7
2014-02-27 12:30:24 +02:00
46888b6f8d editeng: sal_Bool->bool
Change-Id: I87dbcb590484c6142c2ce33d57eed846998aac36
2014-02-27 12:30:24 +02:00
416e098e20 ooxml export: w14:props3d element
Change-Id: I8182959bb75f4f0308b9285f29f6ea3c2b9b05e4
2014-02-27 09:12:04 +01:00
d42c34304c ooxml export: w14:scene3d element
Change-Id: Iaf1745e9d415d14e310adc75199321cfe27966a3
2014-02-27 09:12:03 +01:00
70ffc556cc ooxml export: w14:textFill element
Change-Id: Ie1e44215ce70c28c58575a703328a836279f92a4
2014-02-27 09:12:01 +01:00
a395c9fa38 loplugin:literaltoboolconversion
Change-Id: I9f601252a24e935e81716213a6733ee2adb1489f
2014-02-26 20:29:26 +01:00
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
72d9fa114a sw: code simplification
XEmbeddedObject already implements XClassifiedObject which contains a
getClassID method.

Change-Id: Ifbeed343493208fff3704b21ee484fd92c570974
2014-02-26 20:18:36 +01:00
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
5faf549274 Resolves: #i119612# fix the order of Hebraic string are changed after..
save as new .doc

* when opening .doc in AOO, preserve the RTL property(property ID is 0x085A)
and export.

Reported by: Lou Qing le
Patch by: Chen Zuo Jun
Review by: Lei De Bin
(cherry picked from commit daa4da26a7ba0c58c79af69fc6624729f7b22c10)

Conflicts:
	sw/inc/hintids.hxx
	sw/source/core/bastyp/init.cxx
	sw/source/core/doc/docnew.cxx
	sw/source/core/text/atrstck.cxx
	sw/source/filter/ww8/ww8atr.cxx

Change-Id: I2a1788452475e0deebf530aae41e543eae3cd45d

Resolves: #i120935# Insert blank entry for RES_CHRATR_BIDITRL...

and RES_CHRATR_IDCTHINT, to keep the identical res order

(cherry picked from commit 919e99308395c572a7298e6db2b96df8bf7ec3fd)

Conflicts:
	sw/source/filter/html/htmlatr.cxx

Change-Id: I3c2a3513de3c146ece583ff40bf3ffb3845f971c

Resolves: #i122867# HTML export - correct function pointer table...

which holds the export functions for certain attributes

(cherry picked from commit 5d963c0c996d50fa1033e7c2da48b5d1c3747f20)

Conflicts:
	sw/source/filter/html/css1atr.cxx

Change-Id: I7f31cfab8c654d5c549db1343d1e222f50a42c60
2014-02-26 16:13:25 +00:00
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
3c0a7cf4f6 fdo#75254 Unsupported shape in DML writing was causing document corruption.
Added a way to avoid DML export for un-supported shapes. We need to fix
those properly by adding proper support.

Change-Id: I0aeac1cc3b6e807a0427df9a9695446148d2ba38
Reviewed-on: https://gerrit.libreoffice.org/8202
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-02-26 06:03:36 -06:00
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
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
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
a4f0d09605 Translate german strings, potentially user-visible - sw/source/filter/ww1
These are mostly assertion-like messages.

Change-Id: Iabf8e2ea3411c51756765e160a9e654b06ca005d
Reviewed-on: https://gerrit.libreoffice.org/8356
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 04:41:55 -06:00
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
eb75997457 Remove germanisms in variables: sw/source/filter/ww1
Change-Id: Ieb61128a6497fc8f980b315a949ce74b2dc4adce
Reviewed-on: https://gerrit.libreoffice.org/8324
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 03:52:06 -06:00
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
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
7feb9a9c71 Fix a crashtest + default value + fix a wrong copy paste
Change-Id: Ic7a4ff410b2e4450c5f5220c6201931ca3e15a02
Reviewed-on: https://gerrit.libreoffice.org/8307
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-02-26 03:09:44 -06:00
1f00b24c1a WaE: implicit conversion of literal of type 'const char *' to 'bool'
Fixed the fairly obvious (?) mistake. Thanks again to our Clang plugin and
sberg.

Change-Id: I7b7ab4b6fcb99b93305c7e8872810a6096c8b720
2014-02-26 08:43:58 +02:00
5dee438cc2 html: Another problem caused by lowercasing the tags.
Let's convert the switches to full comprison; it's future-proof, and the
performance difference here is not critical.

Change-Id: I1541acdc89312806f4bf05226efb3a42e81f8019
2014-02-25 22:25:26 +01:00
5fce5642b6 fdo#39468 Translate German comments: sw/source/filter/ww1
Change-Id: I5c6ae4f1692f6ed8d1792417cb594174a35ca8fa
Reviewed-on: https://gerrit.libreoffice.org/8323
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-25 21:08:00 +00:00
9f4b335af2 coverity#738306 Uncaught exception
Change-Id: Id8b343993b22ceb83490c7f2d1f465a728ccb4fc
2014-02-25 14:27:43 +00:00
1726906250 ooxml export: w14:textOutline element
Change-Id: I76f414471aa6304e6add8274c1fd52375a7a963b
2014-02-25 12:08:54 +01:00
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