summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/docxsdrexport.hxx
AgeCommit message (Collapse)AuthorFilesLines
2018-05-09Fix some IWYU warningsMiklos Vajna1-3/+4
Change-Id: Iab61e0a7cac2dc89e6b04875a62894b181aa0ff4 Reviewed-on: https://gerrit.libreoffice.org/54016 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-12-22tdf#42949 Fix some Include What You Use warningsMiklos Vajna1-2/+0
Change-Id: I30121764303579a7cb4ded0f0f48cc1f8fff6c33 Reviewed-on: https://gerrit.libreoffice.org/46946 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-11-07tdf#113550 RTF import: fix incorrect text indentMiklos Vajna1-4/+4
Left indent was set to non-zero in the style, but direct formatting set it back to zero. Teach deduplication to remove the NS_ooxml::LN_CT_PPrBase_ind SPRM itself in case the last attribute was removed. Change-Id: I01b202f0241b02816b2b392326737b1150caffc2 Reviewed-on: https://gerrit.libreoffice.org/44385 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-11-07loplugin:constparams in swNoel Grandin1-4/+4
Change-Id: Ie7aac013db4116aa9bd2caa4fc6b4bfad5cea733 Reviewed-on: https://gerrit.libreoffice.org/44356 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-18NdTopLeft is unused now.Tamás Zolnai1-2/+2
Change-Id: I39184b8fdf666676c21560d39911f6204b0afd52 Reviewed-on: https://gerrit.libreoffice.org/41257 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-08-11sw: fix inconsistent param naming in interface/implementationMiklos Vajna1-2/+2
SvxPostureItem& rWeight is confusing at best. Change-Id: I70a7e94151f49bf3539af77160cd4a68b8753464 Reviewed-on: https://gerrit.libreoffice.org/41006 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-05-12remove unused uno::Reference varsNoel Grandin1-2/+1
found by temporarily marking Reference as SAL_WARN_UNUSED. Change-Id: I18809b62654467f890016adcc92576980ced393b Reviewed-on: https://gerrit.libreoffice.org/37511 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-08-29loplugin:staticmethodsStephan Bergmann1-1/+1
Change-Id: I2cd84261237eb1d60dfba5f85e444d5553e08798
2016-05-31teach refcounting clang plugin about uno::ReferenceNoel Grandin1-4/+5
uno::Reference is only allowed to used with classes that have a ::static_type member. So convert all those places to rtl::Reference. Maybe we need some LIBO_INTERNAL_ONLY constructors on rtl::Reference and uno::Reference to make this a little smoother? Change-Id: Icdcb35d71ca40a87b1dc474096776412adbfc7e3 Reviewed-on: https://gerrit.libreoffice.org/25516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-29sw: no need to copy these in docxsdrexportMiklos Vajna1-3/+3
Change-Id: I2d5d0ce4555250b1c2480167743258300b76c9fa Reviewed-on: https://gerrit.libreoffice.org/24486 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-11-10sw: rename sw::Frame in the WW8 filter to ww8::FrameMiklos Vajna1-5/+5
This way it's more clear that sw::FrameClient has nothing to do with sw::Frame, also later renaming SwFrm to SwFrame won't cause confusion about why do we have both sw::Frame and SwFrame. Change-Id: I87c4d199d418c77fdbb600fc388c8b9f026cb0fa
2015-08-03new loplugin: refcountingNoel Grandin1-4/+4
This was a feature requested by mmeeks, as a result of tdf#92611. It validates that things that extend XInterface are not directly heap/stack-allocated, but have their lifecycle managed via css::uno::Reference or rtl::Reference. Change-Id: I28e3b8b236f6a4a56d0a6d6f26ad54e44b36e692 Reviewed-on: https://gerrit.libreoffice.org/16924 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-21o3tl: add make_unique template till we can't use std::make_uniqueMiklos Vajna1-1/+2
Change-Id: I48b26f0199e339badf7a0e2bed322ca701689d13 Reviewed-on: https://gerrit.libreoffice.org/15846 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-05-20bin/rename-sw-abbreviations.shlibreoffice-5-0-branch-pointChristian Lohmaier1-9/+9
renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
2015-04-28DocxSdrExport::Impl::m_pTextboxAttrList: use std::unique_ptr<>Miklos Vajna1-1/+1
Change-Id: If6c836c7e155c958a56fb69a06730c4e5a9ee1b5
2015-04-24checkFrameBtlr() can be moved to DocxSdrExport::ImplMiklos Vajna1-2/+0
Change-Id: Ia5d04e3a7a56880f91c442b1b0dd73e5c7bcc0e5
2015-04-11No need to spell out com::sun::star, css is enough.Miklos Vajna1-3/+3
Change-Id: I1cdf56df10516f01ca091043b6a01bc14095413a Reviewed-on: https://gerrit.libreoffice.org/15242 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-03-20DocxSdrExport::Impl: use std::unique_ptr for m_pDashLineStyleAttrMiklos Vajna1-1/+1
Change-Id: Ie99327cf20cf0106aa9f35f959639597fa3ccd30
2015-03-19DocxSdrExport::Impl: use std::unique_ptr for m_pFlyFillAttrListMiklos Vajna1-1/+1
Change-Id: I134f375f3785beb05f320be67990d3b2d572d46f
2015-03-14DocxSdrExport::Impl::m_pFlyAttrList: use unique_ptrMiklos Vajna1-2/+1
Change-Id: I3424af5e3c10eef454cb6a17ec6e84113fbe10f4
2015-02-28boost::shared_ptr -> std::shared_ptrMiklos Vajna1-2/+2
Change-Id: I536b2c2fbbee9e9fd5dd10e016d73a771bd8083f
2015-02-08sw: make sure that these headers are self-containedMiklos Vajna1-0/+6
Change-Id: Ifdfe85abe57b5873ab4641d3a592c4cf8d2e4e01
2014-12-31Add DocxSdrExport::writeBoxItemLine()Miklos Vajna1-0/+2
On one hand, this reduces code duplication. OTOH, the DocxAttributeOutput::FlyFrameGraphic() version was a stub, so this improves DOCX export of image frames as well. Change-Id: I7cd5e5feb8f1e63d074f82263c3d71088c0be30f
2014-09-17callcatcher: update unused codeCaolán McNamara1-2/+0
Change-Id: I2ddda0600ee876e9886ee3221f0ac5ad515fbd22
2014-07-31DOCX export: handle exact end of paragraph w:sdt tagsMiklos Vajna1-0/+5
Previously every paragraph SDT was closed immediately after the paragraph end. This commit adds support for having multiple paragraphs inside an SDT. A few testcases implicitly tested that such SDT's are lost on save, adjust the relevant XPath expressions now that this works. Change-Id: I07802b3e067600b087b7e0f9b2e7b3ba17c3379a
2014-07-17DocxSdrExport: move member to impl classMiklos Vajna1-2/+0
Change-Id: I37aef651cf6424e7935ea3584b8f493f6f24c484
2014-07-17fdo#80894 : Rotation value for textframe was missing after RT.sushil_shinde1-0/+2
- Rotation property is not available for TextFrame in LO. - Hence grabbaged this value. - Roundtripped rotation value by converting it properly for both dml and vml textbox. - Added UT for it. Change-Id: Ia040d55dc2ea79500df76877ba44a02971c872a8 Reviewed-on: https://gerrit.libreoffice.org/10190 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-06-19fdo#78590: Fix for Corruption of para with framePr & drawing object into paraRohit Deshmukh1-0/+2
Issue: - File contains paragraph with framePr have graphic object in it. - So Libreoffice converts framePr into textbox. - So after saving file textbox gets exported with drawing object. - MS office does not allowed drawing object inside tetxbox. Change-Id: I673e0e9f6681a189bde1c63a8cb7aea2cac0ab41 Fix: - Export framePr into paragraph and igonre exporting of dummy textbox added by LO for framePr. Reviewed-on: https://gerrit.libreoffice.org/9389 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-06-17VML export: handle textbox textMiklos Vajna1-1/+1
Previously, we always exported the text of the shape itself. Bring the VML export in sync with the drawingML export, where we only do that if the shape doesn't have an associated textbox -- if that's the case, then export the textbox's text instead. CppunitTest_sw_ooxmlsdrexport's testFdo69636 is a reproducer for this problem, the VML assert failed because of the lack of this. Change-Id: Icb236579da4e3b74e983a95aa5675fed7862d1e1
2014-06-06DOCX drawingML export: don't export textboxes of shapes twiceMiklos Vajna1-0/+2
We already had code, so that in case a shape has a textbox, then we wrote the textbox contents as the shape text, but textboxes were still exported independently as well. Build a list of textboxes at the start of the export, and ignore anything that's on that list during export. In the future, if both RTF and DOC will support textboxes, then this can be moved to MSWordExportBase. Change-Id: I9370b2bbda515ef605281ad398a358b2f24d8f0e
2014-06-06DOCX drawingML export: if shape has textbox, export its contents as shape textMiklos Vajna1-1/+1
Change-Id: I54a51189e1c595841b8b02f3b4436da4a29f1dac
2014-05-23fdo#78882: DOCX: File gets corrupt after RoundtripPallavi Jadhav1-0/+1
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-21unused DocxSdrExport::setDrawingOpen()Miklos Vajna1-1/+0
Change-Id: I8a5d36325edda8c475c4ad5874ec83c444bf2b50
2014-05-21fdo#78469 FileCorrupt:During export LO was adding wrong tags inside <w:sdtPr>Tushar Bende1-0/+3
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-15fdo#78300 File Corrupt:drawing objects into a text box.PriyankaGaikwad1-0/+2
Description : Docx file corrupt after roundtrip. LO insert <w:drawing> inside the <wps:txbx> under choice after RT, if the file created in MS word 2007 and contains Word Art inside the text box. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx sw/source/filter/ww8/docxsdrexport.cxx sw/source/filter/ww8/docxsdrexport.hxx Change-Id: I7421ed353cd7e9bae17b2447122090a4113f52b5
2014-05-14Find places where uno::Sequence is passed by value.Noel Grandin1-1/+1
Implement a clang plugin to find them, and clean up existing code to pass them by reference. Change-Id: If642d87407c73346d9c0164b9fc77c5c3c4354b8 Reviewed-on: https://gerrit.libreoffice.org/9351 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-13remove dead codeNoel Grandin1-1/+0
Change-Id: Ic4fb478921714429af138ca212bd7f67f408d434
2014-05-12unused DocxSdrExport::get/setFlyFrameGraphicMiklos Vajna1-2/+0
Change-Id: If8b541e3493ca221bf3c2f75f12f0856a3b372f6
2014-04-27fdo#77718: Picture inside SmartArt changes after RTumeshkadam1-1/+2
- The image data stream for the targets of relId's were getting overwritten, therefore the data was getting loss. - Added anchor id as part of computing a unique name for images. - Added UT for the same. Change-Id: I999ba1b3701ef357641dd0365403a5d7ad8d18aa Reviewed-on: https://gerrit.libreoffice.org/9121 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-03-18sw: not used getter / setter methodsMiklos Vajna1-2/+0
Change-Id: Id357ee22d041cd191d06b0dc2dbf162312a4df0a
2014-03-18fdo#76249 DOCX export DML Drawing as lockedCanvas if it's inside DMLTextFrameVinaya Mandke1-0/+2
The Locked Canvas is imported correctly, but while exporting the drawing is exported inside a textbox. However a locked Canvas has to be exported inside a text-box for the RT file to work in MS Word 2010. As dml drawing elements are not allowed in the dml textboxes. Export as Locked Canvas iff the drawing was originally a Locked Canvas and is now inside a DML Text Frame. As otherwise the Locked Canvas is exported correctly as a DMLDrawing. Reviewed on: https://gerrit.libreoffice.org/8618 Change-Id: Ifa350d8922a22c4e480411530aa4d953bd3ed2ac
2014-03-17sw: prefer passing OUString by referenceNoel Grandin1-1/+1
Change-Id: Iaa846ec8f19567f0a9f30154d74cc53df93eff16
2014-03-17fdo#76122: File Corruption-doc contains nested alternateContents.YogeshBharate1-0/+2
Problem Description: - After roundtrip, files contains <mc:AlternateContent> in <mc:Choice>. - Due to this document gets corrupted when we open it in MS Office 2010. - Added unit test. Change-Id: Ic64b815eda4a42cd59f522ac4570ae145b0b38e1 Reviewed-on: https://gerrit.libreoffice.org/8575 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-03-06DocxSdrExport: fix indentationMiklos Vajna1-3/+3
Change-Id: I7e3ddcf1fbda3979243f6540a806d2151a853e4c
2014-03-05fdo#74792 [DOCX] Grab-bag rels and images for SmartArtVinaya Mandke1-1/+4
Added support to grab-bag rels and associated Images for data[i].xml, and drawing[i].xml. Added UT for the same Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/8362 Change-Id: I545825f67214f14037ab72b77764a07d575b8b5b
2014-02-26fdo#74771 : LibreOffice image captions crash MS Office WordTushar Bende1-0/+2
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-13Fix for: DOCX-Preservation of Line style Dash type of "Shape with text inside"Pallavi Jadhav1-0/+1
Issue : File containing Shape with text inside it having Line style as Dash type is not getting preserved after RT in MS office 2007. Implementation : 1] Added XML element <v:stroke> with attribute dashstyle="dash". 2] Written Export Unit test case. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/7611 Change-Id: Id01c5975c2c1cf176a7459f65973f4c9c3c9b9d8
2014-01-13DocxAttributeOutput: factor out writeDMLTextFrame() into DocxSdrExportMiklos Vajna1-2/+6
Also move the related m_pBodyPrAttrList and m_bDMLTextFrameSyntax members as well. Change-Id: I5c9f5b07b472efc930878ee2a26224346f036600
2014-01-10fdo#73227: Fix for corruption after RTPallavi Jadhav1-2/+2
Issue: 1] Document containing SmartArt inside <wp:anchor> tag gets saved with <wp:inline>, due to which value of attribute "id" of <wp:docPr> gets incorrectly written. Which was causing the corruption. 2] LO was exporting SmartArt inside <wp:inline> bydefault. Hence "ids" of <wp:inline> and <wp:anchor> were same for value 1 and document gets corrupt. Implementation: 1] Added code to export SmartArt inside <wp:anchor> in DocxSdrExport::writeDiagram(). 2] Added export Unit test. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/7292 Change-Id: I5b2efcba030d1736203cf4571d8498fd87600d79
2014-01-06DocxAttributeOutput: factor out writeVMLTextFrame() into DocxSdrExportMiklos Vajna1-0/+33
Given that DocxSdrExport doesn't know DocxAttributeOutput this requires also moving a number of data members into that class, which is probably also a good thing. Change-Id: I7e9c7def505e11e5e27a2bf86544d2b66d9b3f86