Commit Graph

1656 Commits

Author SHA1 Message Date
Miklos Vajna
0dca68a55a CppunitTest_sw_ooxmlimport's testMceNested: port to textboxes
Change-Id: Ie1cc83963ccd2d9d6f7833302af6cdb3078d60de
2014-06-04 15:08:36 +02:00
Miklos Vajna
c12a78e42e writerfilter: reset properties of reused styles
When we have a style to import and the name is already taken, we reuse
the style (we can't use replaceByName(), it only works with user-defined
styles). If that happens, reset non-default properties of it, so the
result will be what was in the file, not a merge of Writer defaults and
what was in the file.

Change-Id: Ifb1098f78254a061b11fd6c6d2a2fa8d85a00d60
2014-06-04 12:34:18 +02:00
Stephan Bergmann
c772e6252a testFdo52989 kept failing for my Mac build at least
<vmiklos> sberg: the comment says that it was 2, so unless you're interested in
debugging it, i would just lower the barrier (423 -> 369)

Change-Id: I0269eab4eee594c4d7aad1c710ed389443208bc4
2014-06-04 10:58:13 +02:00
Miklos Vajna
5a7e4766ca RTFDocumentImpl::dispatchValue: fix indentation
Change-Id: I521462315ebe8b69b65e05df98042e7a33d60dbb
2014-06-04 10:14:31 +02:00
PriyankaGaikwad
2df0d9d32d fdo#78907 : File crashed while saving.
- There is pagebreak in file and footer has nested table.
   - While exporting LO write section break instead of PAGE_BREAK.
   - Due to this it was writing two sections in file and same footer
     for both sections.
   - This was causing wrong table depth values due to this it was crashing
     while writing table.
   - So in MSWordExportBase::OutputSectionBreaks if next node has
     RES_BREAK(page break) then bNewPageDesc value should be false.

Change-Id: I2ccc4e48a26253716253a7280a244f06e172770a
Reviewed-on: https://gerrit.libreoffice.org/9568
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-06-04 08:05:00 +00:00
Michael Stahl
d71387ca81 fdo#79384: replace the work-around with a different one
Word will reject Shift-JIS following \loch, but apparently OOo could read
and (worse) write such documents, so accept Shift-JIS regardless of run
charset type.

Change-Id: Ib181956e9f218548a52037dd76fa1d3ecdc006bd
2014-06-03 20:48:44 +02:00
Michael Stahl
061190a62f fdo#79384: RTF import: fix literal Shift-JIS text
This is a variable-length encoding, and the second byte may be a RTF
syntax character like \, {, }.

Change-Id: I813ccafda18388af3bf05eb7ce9a0253c627b1c4
2014-06-03 20:48:43 +02:00
Miklos Vajna
2cbd2abf1c ODF loext:text-box import/export testcase
There is a lot more to test here, but for now just test that we can have
tables and rounded corners at the same time.

Change-Id: Ia9a4877202d1d040209f49a428b83633c58fc7c7
2014-06-03 16:15:10 +02:00
Miklos Vajna
e2b260fc98 sw: let layout not mark embedded object as modified
The problem was that right after the import, the document wasn't marked
as modified, but as layout settled, it got marked as modified.

Given that we already have code to avoid modification when updating the
replacement image, do something similar here: when setting the view
area, make sure the embedded object's component is not marked as
modified.

Change-Id: I88a42829ec48db54178553661863a571cd2a268b
2014-06-03 13:10:36 +02:00
Miklos Vajna
6092e2eba3 fdo#79384 RTF import: allow { without } in style names
This is not valid, but LO 3.4 supported it, so add a workaround...

Change-Id: Ib8eefdf41fe9801db6f7e5873eaa1436518912fb
2014-06-02 20:29:00 +02:00
Stephan Bergmann
f87859b88f Fix memory leaks in test code
Change-Id: Ifa756a5da636e0b37654ad83900115872bc40f0e
2014-06-02 15:45:28 +02:00
Pallavi Jadhav
ef8293485a fdo#76934 : DOCX: Preservation: AutoSpacing property not getting preserved.
Issue :
	- In styles.xml, beforeAutospacing property was set to true.
	- In code LO grab bags AustoSpacing property using "ParaInteropGrabBag".
	- But ParaInteropGrabBag had only an entry for direct paragraph properties,
	  not paragraph styles.
	- Hence while importing AustoSpacing property from styles.xml, LO was throwing exception
          as "Some style properties could not be set: Unknown property: ParaInteropGrabBag".

	Implementation :
	- Added "ParaInteropGarbBag" entry for Paragraph styles in
          sw/source/core/unocore/unomap.cxx
	- Removed code from StyleSheetTable::ApplyStyleSheets() as it was previously added to
          "Ignore" the AutoSpacing property.
	  The code was previously added beacuse due to AutpSpacing in styles.xml,
          LO was throwing an exception and this was causing unhandling of properties after AutoSpacing.
	  So to prevent unhandling of other properties due to AutoSpacing property, a check was added to
          "Ignore" AutoSpacing, thus enabling handling of properties after AutoSpacing.
	  Please refer to : https://gerrit.libreoffice.org/#/c/8902/
	  But as now we have to "Preserve AutoSpacing" this check needs to be removed in order to set
          it in StyelSheetTable.cxx.
	- Added Export Unit test case

Change-Id: I6748f97befcdf40643e75388766e05740290306b
Reviewed-on: https://gerrit.libreoffice.org/9561
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-06-02 07:53:11 +00:00
Jens Carl
dcb32a33a3 fdo#68849: Add header guards to all include files
Added header guards to files in directory sw/

Change-Id: I5859f986c6f954d41a7940dc9ae8febaa714d34f
Reviewed-on: https://gerrit.libreoffice.org/9587
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-06-01 16:16:29 +00:00
Tushar Bende
4896117323 fdo#78883: Writer getting Hang while opening document
Description:
Writer getting Hang while opening document because of loop in layout.

Root cause: For Documents containing table with direct formatting for
Para line spacing along with style w:type="table" in style.xml LO was
erasing PROP_PARA_LINE_SPACING Prop from pAllCellProps in
DomainMapperTableHandler::endTableGetCellProperties().  But for
Documents without direct formatting for Para line spacing this deletion
was causing problem, as after deletion there is no formatting available
to apply.

To fix this checking whether there is a Direct formatting available for
table, if Yes then proceed with this deletion logic.

Change-Id: Ibaf51ebd1aca93eff44a9edfbe8fa13832ab2b70
Signed-off-by: Michael Stahl <mstahl@redhat.com>
2014-05-30 21:07:56 +02:00
Miklos Vajna
f64d2df599 CppunitTest_sw_rtfimport: enable on Mac
Change-Id: I5ab812c51e24877a2ad9be29a9d411c08b3234c3
Reviewed-on: https://gerrit.libreoffice.org/9514
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-05-28 01:47:38 -05:00
Miklos Vajna
21c11ffe25 fdo#78900 RTF import: allow \dpxsize inside \dptxbxtext
Previously we assumed that they always appear under \do directly.

Change-Id: Ie3a978da856986f604a3815d6127abb4191323c0
2014-05-26 15:39:52 +02:00
Miklos Vajna
3755c87d04 bnc#863018 WW8 import: fix upper margin of multi-page floating table
A vert orient position was already handled in case a floating table was
imported as a TextFrame, but in case we didn't do that, the vert orient
position was simply lost.

Fix this by importing it as the upper margin of the table (assuming that
the position is relative from the anchor position).

Change-Id: I3e96f3068605fd6313dfb3e55483e1bce6c063a5
2014-05-26 12:20:47 +02:00
Miklos Vajna
a38de87515 CppunitTest_sw_ooxmlexport -> CppunitTest_sw_ooxmlsdrexport moves
Any DOCX export test that is related to shapes should go to the sdr
suite to be able to execute in parallel.

Change-Id: I719cd6eda973c5daa1f11bb0e1f57bbacab9f812
2014-05-26 09:36:30 +02:00
Ravindra Vidhate
4002fae087 fdo#79062 File having Footnote with Text Effect got corrupted after RT
When we do the export of the file, In the footnotes.xml,
 the w14 namespaces were not being added.

This issue exists for EndNotes as well.

Change-Id: I6494bbf1beaa0666743d9c1bb85a64f8bda20398
Reviewed-on: https://gerrit.libreoffice.org/9439
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-05-26 02:10:21 -05:00
Thomas Arnhold
762b160dce WaE: warning C4146: unary minus operator applied to unsigned type,...
...result still unsigned at sw/source/filter/ww8/docxsdrexport.cxx(441)

Just use SAL_{MAX,MIN}_INT32 (change -2147483648 to (-2147483647-1)) which fixes this warning for MSVC.

Change-Id: Ia039906602d3b00193a364bddb81626afa928f2d
2014-05-25 21:55:35 +02:00
Miklos Vajna
1c14618eaf CppunitTest_sw_rtfimport: the point here was only that this was nearly zero
If the old width was that small, then something larger should be also
fine. (Seen 564 instead of 423.)

Change-Id: Ife0fd4a55738268cdc1691b90e28b51adba829ef
2014-05-24 22:11:04 +02:00
Michael Stahl
6d431ffb68 fdo#77454: fix WW8 import/export of negative image crop
The negative crop values were imported as large positive values, which
caused the image to be rendered with 1 pixel width after commit
2e5167528f.

Change-Id: I0e01b9d9a05d90e868699832085a06ba5aab7e54
2014-05-24 18:34:06 +02:00
Luboš Luňák
5510f56350 discard more header/footer stuff when discarding headers/footers (bnc#875718)
782adba4d4 discards unneeded headers/footers,
but only the text, not e.g. frames or fields. The test document therefore
ends up with a frame with a page number inside the body text, because the text
in the footer it should be anchored to was discarded. This commit fixes
this by discarding more (although probably the whole header/footer
shouldn't even be parsed to begin with).

The test from b349d2483e actually checked
for this incorrect frame, so change that (the whole test is suspicious, as
the end result is quite far away from what the original doc looks like).

Change-Id: I2e7192e00237db1f030d0524c5667fe92c9e496b
2014-05-24 00:41:49 +02:00
Caolán McNamara
6878f0debf coverity#1209381 Unchecked dynamic_cast
Change-Id: Idab888e866fa08e184b51b8209a4154062d61041
2014-05-23 20:37:36 +01:00
Jacobo Aragunde Pérez
b5f6a5cfc5 ooxml: Do not repeat wdp files in artistic effects
When two pictures apply different effects to the same picture, it is
only saved once in the original document. Added a cache to DrawingML
to know if the picture has already been exported, and added a test
for it.

Change-Id: Ia25f3d8f2f46d61f18aefc22fdfdbcdc72f2d916
2014-05-23 10:04:00 +02:00
Jacobo Aragunde Pérez
2e68a1468c ooxml: Preserve the original picture in artistic effects
When Word applies an artistic effect, it creates two embedded files;
one contains the bitmap with the effect and the other one contains the
original bitmap to be able to undo the effect.

This patch reads the original bitmap, stores it in the shape grab bag
and saves it back to the docx file. Added unit tests too.

TODO: right now, if two effects point to the same original bitmap it
is stored twice, we should improve this.

Change-Id: Ia72034a257739abe4ffafa0f42b2a912e4bf9436
2014-05-23 10:04:00 +02:00
Jacobo Aragunde Pérez
642a252cf1 ooxml: preserve artistic effects on shapes.
Bitmaps can define artistic effects like in the following example:

  <a:blip r:embed="rId5">
    <a:extLst>
      <a:ext uri="{BEBA8EAE-BF5A-486C-A8C5-ECC9F3942E4B}">
        <a14:imgProps
         xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main">
          <a14:imgLayer r:embed="rId6">
            <a14:imgEffect>
              <a14:artisticMarker trans="14000" size="80" />
            </a14:imgEffect>
          </a14:imgLayer>
        </a14:imgProps>
      </a:ext>
    </a:extLst>
  </a:blip>

LO core doesn't support them, but I'm preserving them using the shape
grab bag. Bitmaps must not be transformed to a SwXTextGraphicObject
so the grab bag of the XShape is not discarded.

Added several Context and Properties objects on the import side to
traverse and save the relevant tags, and added the corresponding code
on the export side to extract the grab bag and output the effect back.

Also added a unit test for a selection of artistic effects.

TODO: Word saves the original bitmap as an embedded wdp file so the
effect can be undone. We must preserve it too and add the reference to
the a14:imgLayer tag.

Change-Id: I61d427f83e4c8f353eb073da0114cd73ba50ba4b
2014-05-23 10:03:59 +02:00
Pallavi Jadhav
70f49dc692 fdo#78882: DOCX: File gets corrupt after Roundtrip
Issue :
	- Document contains a Section break(Next Page) with a drawing.
	- Section break is manullay adjusted before the drawing.
	  Hence in original document.xml it wsectPr comes as
	  a part of w:pPr of paragraph.
	- But in RT in document.xml, section break is written
	  by adding a dummy paragraph.
	- This is because <w:drawing> also contains a paragraph
	  and hence when encounters section property LO creates
	  a dummy paragraph and writes it in between runs.
	- This was causing the corruption.

	Implementation :
	- Added a member varaible m_bDMLAndVMLDrawingOpen.
	- It is set to true when it writes drawing.
	- It's value is checked in DocxAttributeOutput::EndParagraph()
	  If m_bDMLAndVMLDrawingOpen is true Do Not make
	  m_bParagraphOpened to false, as one more paragraph is still
	  open.
	- This will postpone the writing od Section property and will
	  be written inside w:pPr and no dummy paragraph will get
	  created.
	- Added Export Unit test case.

Change-Id: Ifa26fcaf8f02e62d020339670c8ba58ba92d9f40
Reviewed-on: https://gerrit.libreoffice.org/9430
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-05-23 01:33:13 -05:00
Miklos Vajna
8e2b894c30 fdo#76101 move testcase to CppunitTest_sw_ooxmlsdrexport
The motivation is that this test takes time to execute (and we're
testing a limit here, so it's not easy to speed it up), though moving it
out of CppunitTest_sw_ooxmlexport is still possible (which is the
current critical path during a toplevel 'make').

Change-Id: Ibe6580f8aea1439f4feb281996f2f4bbd46ff4ce
2014-05-22 19:52:27 +02:00
Dinesh Patil
ed3fd76b65 fdo#79008 Crash: File getting crash while saving in LO
File is getting crashed while saving in LO, as it tries
to access the value of vector after erasing that value.
Code changed to access the vector value first and
then erase that value from vector.

Change-Id: I29369b7582fdbd7363d0e6fdae091a30c79a747d
Reviewed-on: https://gerrit.libreoffice.org/9433
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-05-22 08:47:02 -05:00
Tor Lillqvist
73f65ac3ef WaE: unused variable 'aFileNameBase'
Change-Id: I26cf27c7edc51d0a28e228c56465c3ec2ad7d35e
2014-05-22 16:12:09 +03:00
Michael Stahl
b01b171fbf sw: why the heck is that #ifdef'd out?
Change-Id: I213ad0f0ab853aec5cb523474218dfad2c44d11b
2014-05-22 14:21:29 +02:00
Michael Stahl
5246fa2624 fdo#68983: basic: if the library is not loaded fully, copy source storage
Also fixes fdo#42899 and fdo#67685 in a different way; the previous fix
for fdo#42899 caused the problem with password-protected libraries for
which the password is not known: only the binary representation of the
BAISC module was stored, not the source code; by simply copying from the
source storage the problem can be avoided.

It would be possible to ask for the password when storing, but that
would not work when non-interactive (called via API).

An alternative fix would be to pass in the
SfxObjectShell::IsSetModifyEnabled() flag and actually reset the BASIC
library's modify flag correctly, but that requires adding a
parameter to XStorageBasedLibraryContainer::storeLibrariesToStorage().

(regression from af34774d26 )

Change-Id: I4701401f35171139fc2fe8d225d13d4e533091a0
2014-05-22 13:12:55 +02:00
Yogesh Bharate
f7bcaa9882 fdo#78957 Corruption - <wp:extent> "cy" height exceed the limit in header.xml
Problem Description:

1. On 19th  May windows daily build
[Build ID: dd0f844728, TinderBox: Win-x86@42, Branch:master],
if we RT document, RT get corrupted due to the exceeding the limit of extend height & width.
2. As per ECMA standard, extend height & width is of type long, but MSO only
support int32.Hence added code changes to check the same.
3. On 20th May windows daily build
[Build ID: f3a46244a0, TinderBox: Win-x86@42, Branch:master],
if we RT document, it get corrupted due to exceeding value of posOffset.
4. Added code changes to make sure posOffset value is within the allowed range.

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

Change-Id: Ib0b55314f54c51f39a492485992356f71eb062e3
2014-05-22 11:24:46 +02:00
Vinaya Mandke
3c87d89bca fdo#78910 Hyperlink and Field start-end mismatch
Originally a Field began inside a hyperlink but ended after the hyperlink.
This causes the corruption in MS Word.

Incremented the field count if the field is added for the current new hyperlink.
Added another variable to store the Field-Count from previous hyperlink.

Added UT for the same.

Change-Id: Id3c3bee1c8ed9c0755f8fff7efd5d1c5662f2c82
Reviewed-on: https://gerrit.libreoffice.org/9421
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-05-22 04:03:21 -05:00
Ravindra Vidhate
8555c24e06 fdo#78887 <w:br> tag is not being preserved after export.
When we have <w:br> tag continuous like in the following cases...

    "Title: Superstition\v\vComposer: Stevie Wonder\v\v"
    or "\vLyrics: \v"

    where "\n" is internally replaced by "\v" LO.

    Before text "\v" or after text multiple "\v" is not preserved.

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

Change-Id: I2a6d0a7d2382dfbc2f0ab04f150653c9b17bbfd1
2014-05-22 10:19:09 +02:00
Dinesh Patil
c5547beb47 fdo#78886 File getting corrupted after Roundtrip due to fieldChar
In a hyperlink, extra field with fldCharType="end" is getting added
even though there is no begin and separate fldCharType. When hyperlink is
closing pageref was not set to false. Due to which LO was adding extra
end fldCharType.

Change-Id: I0f54ab03c38cec2888cf9a1638ec5435da90099c
Reviewed-on: https://gerrit.libreoffice.org/9414
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-05-22 02:45:58 -05:00
Umesh Kadam
80fd9fb720 fdo#78333 : SdtContent and a Shape overlapping causes corruption
- Normally if there is a case where text/shape is overlapped with (another)
   shape then LO used to write the text and the AlternateContent in the same run.
- This is supported in MSO and there is no visual difference.
- But in case if the SdtContent(with text) is overlapped with the Shape then LO
   processes sdtContent as a text and ends up putting the alternateContent and the
   text in a single run. Ultimately it includes the entire run in a SdtContent,
   which is incorrect.
- The fix checks for the aforementioned scenario and puts them in a different run
   and also restricts the sdtContent being written in an invalid AlternateContent.

Change-Id: I36f4cdb1b583523dd8f717ae094bdf09c7a61f62
Reviewed-on: https://gerrit.libreoffice.org/9374
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-05-22 02:31:53 -05:00
Miklos Vajna
d4af55670f try to fix Mac build
Change-Id: Id36f801cdf72d7654958b9d9837590990fdf161b
2014-05-21 16:50:31 +02:00
Miklos Vajna
612e0c647e fdo#77725 make testcase minimal
Loading 54 pages to check a single footnote is a waste of time.

Change-Id: Ic68d1d29e26e3d66973e5fca65c8958b953c78e0
2014-05-21 12:28:44 +02:00
Rajashri
b349d2483e fdo#78663 : Corrupt: 2007 WordArt whithin a Drawing tool
A file contains a 2007 word art within a drawing tool.
    In Original file, the xml structure is as below:
    sample xml:
    <p> <r> <ac> <drawing> <txbx> <txbxContent> .. <pict> </pict> </txbxContent></txbx> </drawing> </ac> </r> </p>
    LO was preserving this as :
    <p> <r> <ac> <drawing> <txbx> <txbxContent> .. <drawing> <txbx> <txbxContent> ..
    </txbxContent></txbx> </drawing> .. </txbxContent></txbx> </drawing> </ac> </r> </p>
    Now after this fix, If there is a custom shape within a text box, then we should postpone it and write it in
    a separate run.
    This approach is followed on the fact that LO writes nested TextBoxes in separate run.

    NOTE1 :Due to this fix, xpath related to the below UT needs to be updated.
    testFdo76249 in ooxmlsdrexport.cxx

    NOTE2: In docxsdrexport.cxx : 'm_bIsInDMLTextFrame' is no more required.
    For adding LockedCanvas, we only need to check if the property exists in the property set.
    Therefoew removing the above bool variable.

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

Change-Id: I00e94712e912ad1977fcb65a945fefb927795d77
2014-05-21 11:56:38 +02:00
Tushar Bende
1fc9923b19 fdo#78469 FileCorrupt:During export LO was adding wrong tags inside <w:sdtPr>
Description :
Docx file corrupt after roundtrip.
Root cause: For some documents During export LO was not checking for the content of sdt and Even if sdt contains Drawing object
LO was writing text data related tags <w:text/> & <w:dataBinding> in <w:sdtPr>,This was the reason for corruption.

To Fix this checking is there is any Drawing Object in run if yes skip writing <w:dataBinding> tag in <w:sdtPr>
And if sdt content is Text and Drawing both do not write <Text> or <Picture> as these tags will again result in corruption.

Presently, while writing the sdtContent tag LO does not check for the content type due to which LO ends up adding the dataBinding along with the
Drawing/AlternateContent which is incorrect according ecma ECMA-376, Second Edition, Part 1 : 17.5.2.6. This cause in file corruption.

Added a check to restrict the aforementioned.

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

Change-Id: Id31437db0309b0a2159389a4a9a1f5e13c1ac3a5
2014-05-21 11:19:10 +02:00
Dinesh Patil
df973e6e95 fdo#78658 Corruption: lockedCanvas tag is missing from RT file
While export, locked Canvas is missing and drawing is
exported inside textbox. However a locked Canvas has to be exported
inside a text-box and drawing should fall under locked Canvas
for the RT file to work in MS Office 2010.

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

Change-Id: Iea2c411302b552db18527001cc4c6d0290085afe
2014-05-20 11:33:07 +02:00
Miklos Vajna
e4740dbecf fdo#78659 make testcase minimal
Change-Id: I393b413528685276bffd35fb7fe5ce8c742314b7
2014-05-20 10:54:22 +02:00
Ravindra Vidhate
1870ed0e4f fdo#78659:FIle geting corrupted after Roundtrip due to fieldchar.
In a hyperlink, the field with fieldchartype="end" is getting addeded eventhough there is no begin for that field.

Change-Id: I50df6efc63fc9a66b146d4a861ae4bd654b4a3c6
Reviewed-on: https://gerrit.libreoffice.org/9368
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-05-20 03:53:51 -05:00
sushil_shinde
d2a19aad65 fdo#78654 LO was exporting corrupt docx file.
If docx file contains multiple hyperlinks in one paragraph
   and one of the hyperlink contains "PAGEREF" field. End tag
   for "PAGEREF" field was not exported hence it was causing
   corruption in exported file.
   Fixed export part of field end tags in case of "PAGEREF".
   Added unit test.

Change-Id: I18a3625213bf7269e3f441859a27acc38cf6ff45
Reviewed-on: https://gerrit.libreoffice.org/9364
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-05-20 03:16:26 -05:00
Sourav
ca0be67434 fdo78474:Corruption a:graphicData has no info for the image.
The original file contains two text boxes one contains image and the other contains chart.
Image in text box is not getting imported in LO which leads to no contents inside the a:graphicData tag which is causing the corruption.
Root cause is found in ShapeContextHandler::getShape.
mxChartShapeContext.is() returns true even when mnStartToken is not set as NMSP_dmlChart which is causing the issue.
I have added one more condition to handle this.

Change-Id: I6c567d7618b34c1a24f6809801e4460af6894c67
Reviewed-on: https://gerrit.libreoffice.org/9363
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-05-19 02:35:49 -05:00
Vinaya Mandke
6d73c5d748 fdo#78651 DOCX Incorrect export of nested Tables
As the m_oldTableReference->m_pOldTablepInner was not cleared
the same tabled was incorrectly nested with itself.

Another issue was that the same table was mirrored in RT file
as LO was trying to export a Section break within a table cell.

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

Reviewe on:
	https://gerrit.libreoffice.org/9361

Change-Id: I09b730a10f1a0bc4434050e0078aeab3185de817
2014-05-18 11:22:49 +02:00
Chris Laplante
3c1e30b77d Correct common misspellings, and remove some ASCII art along the way.
Change-Id: I42787db31769e8bde984c5f4f0aa90335e889b1c
Reviewed-on: https://gerrit.libreoffice.org/9356
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
2014-05-17 12:38:38 +00:00
Miklos Vajna
04ab7b8e16 sw: fix indentation in rtf{export,import} test
Change-Id: Ie777de47dc70da136b145028a08ea17a0de7a87d
2014-05-16 23:00:33 +02:00