summaryrefslogtreecommitdiff
path: root/sw/qa
AgeCommit message (Collapse)Author
2014-06-23SwDrawView::DeleteMarked: delete textbox of shape as wellMiklos Vajna
If we delete a shape that had a textbox, then delete that textbox as well. Without that, the doc model would be still consistent, but most probably would not be what the user expects. Change-Id: Id5075233ce66d7a398c88ff3e63b05a6b2133571
2014-06-22CppunitTest_sw_ooxmlexport: enable a subset of these tests on WindowsMiklos Vajna
Change-Id: Ia9bb5f9ea7854e7f85abd8bad347db82b342177f
2014-06-20sw: clean up leftover TextBox TODOsMiklos Vajna
Change-Id: I12782690368789849ea2ce2ed08ad4838a0a55db
2014-06-20fdo#79973 : LO crashes while opening the document.PriyankaGaikwad
Description: - If the equation ends with two dots(.) then file get crash. - In SmParser::NextToken() the file get crash because string index is out of bound. Change-Id: I5f25814220d556d53c10d4ca33a38b4d0d451438 Reviewed-on: https://gerrit.libreoffice.org/9840 Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com> Tested-by: Muthu Subramanian K <muthusuba@gmail.com>
2014-06-20CppunitTest_sw_ooxmlsdrexport: this define should no longer be necessaryMiklos Vajna
Change-Id: I5e4540b5bf47dde53021a300118052da47b90eff
2014-06-20RTF import: handle column break at the very start of the documentMiklos Vajna
Change-Id: Ib7d166bf1b1e5d5216d822b2b0396aa4dc535c6f
2014-06-20CppunitTest_sw_ooxmlsdrexport: clean up testFDO77122Miklos Vajna
The document contained a few unrelated shapes and it was reported that those cause testcase failures, depending on the version of some system libraries (at least Ubuntu 14.04 is reported to be affected). Change-Id: I1aaf02441e2bc30d1a5465b038211deb240a5b69
2014-06-20fdo#78904 : LO hangs while saving the document.Umesh Kadam
- In case of framePr attributes being omitted in original xml, LO defaults such attributes to incorrect values. - Correcting these values in this fix. - This fix stops LO from getting hang while saving the document, the actual fix needs to be somewhere in the table layout. We need to restrict the frame from being considered as part of the table as MSO does not allow frame to be part of a table. Change-Id: I4c35f7eff6ca1122901f5667fc26b849df527f60 Reviewed-on: https://gerrit.libreoffice.org/9774 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-06-20fdo#79968: & fdo#79969: Fix for embedded powerpoint & excel sheet in docx.Yogesh Bharate
Problem Description: fdo#79968: 1. Document contains embedded powerpoint in docx. 2. After RT, embedded powerpoint object is not preserved. 3. In this case, .sldx is get converted to .bin due to this powerpoint slides is getting converted to picture. fdo#79969: 1. Document contains embedded excel work sheet. 2. After RT, embedded excel sheet is not preserved. 3. In this case, .xlsm is get converted to .xls. 4. Similar case happened with binary excel work sheet. Implementation: Added sMediaType, sRelationType & sFileExtension for embedded excel sheet, binary excel sheet & powerpoint slide. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/9765 Change-Id: I8f94e3f9293f2ac98b61f919d60ca556695b26c2
2014-06-20fdo#79591 Values for docPr name and shape ID attributes were set invalidDinesh Patil
Values set for docPr name and shape ID attributes in RT file were not valid as per UTF-8 encoding format and hence was showing RT document as corrupt with error message "invalid character". Calling add() function with current parameters is causing issue and setting invalid values so modified the second parameter which will set valid values to the specified parameters. Reviewed on: https://gerrit.libreoffice.org/9746 Change-Id: I3b48e53adbe5ed844235e596bb98eb396133845a
2014-06-19fdo#79599: use \highlightN instead of \chcbpatN in RTF import and exportnrbrtx@gmail.com
Reviewed on: https://gerrit.libreoffice.org/9776 Change-Id: I98ef606fb73368a3c275819cb83b936e2162769d
2014-06-19abi#2720 RTF import: handle non-graphic object after a graphic oneMiklos Vajna
Change-Id: I9416b6e7cf3677006215fcbde458ed341c4e3e9e
2014-06-19ToxLinkProcessorTest needs SwGlobals::ensure to set pSwResMgrStephan Bergmann
...derefernced in (anonymous namespace)::lcl_NewUINameArray SwStyleNameMapper::GetChrFmtUINameArray SwStyleNameMapper::getNameFromId SwStyleNameMapper::fillNameFromId SwStyleNameMapper::FillUIName SwFmtINetFmt::SwFmtINetFmt sw::ToxLinkProcessor::ClosedLink::ClosedLink sw::ToxLinkProcessor::CloseLink ToxLinkProcessorTest::ExceptionIsThrownIfTooManyLinksAreClosed ... Also, fix the name from sw_tox_test to sw_tox. Change-Id: I48ea9fb6322df3725b089538fd67b2e24578b668
2014-06-19fdo#78590: Fix for Corruption of para with framePr & drawing object into paraRohit Deshmukh
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-19indentation fixesMiklos Vajna
Change-Id: Ia391ccc9889a135730f0fead11eb0b6c2f748ec4
2014-06-18oox: import WPS shape with text as shape with textboxMiklos Vajna
This allows having real shapes (like having rounded corners) and complex content (like containing a table) at the same time. WPS shapes are wrappers around drawingML markup in DOCX files, so this only affects the DOCX import. Change-Id: Iad1c1c61233be1c17efa1821e680927aa9587215
2014-06-18chart2, sw: remaining textbox DOCX import test preparationsMiklos Vajna
Ideally now all testcases handle both cases during DOCX import: - current situation, when shape with text is imported as a Writer TextFrame - future situation, when shape with text will be imported as shape with an assicated TextBox Change-Id: I5b95ff4672cecf39eb744f8557f967ade73404c0
2014-06-18DocxSdrExport::writeDMLAndVMLDrawing: fix handling of inline VML shapesMiklos Vajna
In general Writer supports having objects inside a TextFrame, Word does not. It turns out that Word allows having certain shapes inside other shapes, as long as they are VML-only. So do that for now: if we receive a shape when we're already inside a shape, then just export it as VML, not the usual drawingml+VML pair. Also, blacklist one more VML shape type, where the shape text is already exported inside <v:textpath>, so no dedicated <v:textbox> is needed. Change-Id: I5786bd6827eae9756e7c179bb2ef5a5741a91878
2014-06-18CppunitTest_sw_ooxmlsdrexport: port fdo78474 to textboxesMiklos Vajna
Change-Id: Icadf4b44377684e40334c52887883320805a8e89
2014-06-18CppunitTest_sw_ooxmlsdrexport: port fdo77719 to textboxesMiklos Vajna
Change-Id: I987f727ec1cd3927239a9339144274f2eea63e36
2014-06-17VML export of shapes with textboxes: missing <w:txbxContent> tagMiklos Vajna
Change-Id: Iaf4e34007d7822705a278a94138572b0379b2779
2014-06-17n#825305: writerfilter RTF import: override style properties like WordMichael Stahl
It would certainly be immediately obvious to any reader of the RTF spec that \sN will apply the style with index N to the current paragraph. But actually, that is not what Word does when it reads \sN... what it really does is to apply the style with index N, and then for every attribute in that style, apply the same attribute with a default value to the paragraph, effectively overriding what's in the style. If that doesn't make any sense to you, well, have you heard the joke about how many Microsoft engineers it takes to change a light bulb? Also, \pard apparently implies \s0. To implement that, change RTFSprms::deduplicate() to recursively look for style SPRMs that are missing in the properties, and put in default ones, currently just for 2 keywords \sa and \sb. This requires changing deduplicate() to be const and return a new value, since it is no longer idempotent, as the erased SPRMs would get defaulted on the next run. While at it, fix RTFValue::equals() which did not compare m_sValue. This fixes the testParaBottomMargin test that was broken by the fix for fdo#70578. Change-Id: I4ced38628d76f6c41b488d608a804883493ff00b
2014-06-17fdo#70578: writerfilter RTF import: by default style is para style 0Michael Stahl
quoth the spec: "For <style>, both <styledef> and <stylename> are optional; the default is paragraph style 0." Of course in order to do that we need to add support for at least recognizing the \dsN and \tsN keywords to override the default, so that table styles don't become paragraph styles. Change-Id: Ic100768581f9e8c327063ff776fbd61ac4242483
2014-06-17CppunitTest_sw_ooxmlsdrexport: port testMSwordHang to textboxesMiklos Vajna
Change-Id: Ia13c3d5657c32b89e200ede572d4615b833374de
2014-06-17CppunitTest_sw_ooxmlsdrexport: port testLineStyle_DashType_VML to textboxesMiklos Vajna
Change-Id: Idb4807a58b6008afeb3e26d03b699671c0b88f7c
2014-06-17drawingML export: recognize <a:prstDash val="dash"/>Miklos Vajna
We used to write out a custom dash definition all the time, even in case it was imported from a dash preset. Recognize at least "dash", and write that on export if the parameters match. Change-Id: Ifaaec51be9ecf1e7667a8c8f85fbd4fb9636a325
2014-06-17CppunitTest_sw_ooxmlsdrexport: port testFdo70942 to textboxesMiklos Vajna
Change-Id: I417405192a74f340aaf80b911d9a8b16b3a83d6f
2014-06-17CppunitTest_sw_ooxmlsdrexport: port testFdo73247 to textboxesMiklos Vajna
Change-Id: Ie9653c3a4c4e09d052027580036d73c20cc576ab
2014-06-16fdo#79915:Text Data Lost after exporting through LORavindra Vidhate
In the OutputTextNode, the text data is postponed when the in case of NOT_PROCESSED state of fly frame. This text data is never been processed later. When the text data is postponed we should write this before processing the next text node. Change-Id: Ib8d5fdcf8dcfb9ff394d32103502150e08bbd521 Reviewed-on: https://gerrit.libreoffice.org/9737 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-06-16CppunitTest_sw_ooxmlsdrexport: port testTableFloatingMargins to textboxesMiklos Vajna
Change-Id: I62f0159bec97c6c7a2285509b0662125f46ed480
2014-06-16SwModelTestBase: add a getShapeByName() methodMiklos Vajna
Change-Id: Ie3b7099aea1d473cca88c4904683234408920100
2014-06-15CppunitTest_sw_ooxmlsdrexport: disable testFDO77122 on Mac for nowMiklos Vajna
Change-Id: I1c87406d9b23e36d35e2ef2e62f9f7b4d209e381
2014-06-14sw, writerfilter: identation fixesMiklos Vajna
Change-Id: I1f1db08447006515e7e6842792241aca992984c0
2014-06-13CppunitTest_sw_ooxmlsdrexport: clean up XPath expressions in testFDO77122Miklos Vajna
Change-Id: I1f8737bbe128c747c84c67e8ba8000ecef1ed4f7
2014-06-13loplugin:staticcallStephan Bergmann
Change-Id: I26e1e0f66dad5ed4e8351fc7509449b312559166
2014-06-13fdo#76633: writerfilter: RTF import: do not leak the XShape of imageMichael Stahl
RTFSdrImport::resolve() is called for \picprop and creates an XShape that is stored in RTFSdrImport::m_xShape and also DomainMapper_Impl::m_aPendingShapes; later RTFDocumentImpl::resolvePict() completely ignores that XShape and creates a new one, which is also inserted in the document; the first XShape is effectively leaked. Try to avoid that by re-using the exising m_xShape in resolvePict(). Not sure if there are any problems with doing this, it's all a bit confusing. Change-Id: I98456242acb0766f547eb8f7d877f51d53323f3a
2014-06-13fdo#76633: writerfilter RTF import: disappear the rectangle shapes on imagesMichael Stahl
If the shape properties are inside \picprop destination, don't set shapeType. (regression from 9f1f7199736e2ae07b34849ba66f61a1ef5782e8) Actually this does not fix the root cause, this is just a work-around, the extra shape is still inserted but it's invisible now. Change-Id: I6cf093de2a5657533f393863ed8010ae083bec16
2014-06-12Spell out UTF-8Stephan Bergmann
Change-Id: Iea5f79fb12ac86d4348f46f8ad93a13aaf0f7eb6
2014-06-12fdo#77979: argh forgot to add the test documentMichael Stahl
Change-Id: I64cf70cf7f1f77c38a8a4804b705ce8a0441e487
2014-06-12fdo#77979: sw: RTF export: write non-ASCII font names encodedMichael Stahl
Currently font names like "微软雅黑" (Microsoft YaHei) are written as "????" in the RTF export; to avoid that, set the \fcharset of the font entry to something that at least is able to encode the font name and alternate name. This requires a new function since the existing rtl_TextEncodingToWinCharset was changed in b88fe998ce8c80d7629fe70118311096615d959d to return "default" 0x01 (for OOXML) which is quite unhelpful for RTF. This is not entirely satisfactory, as of course that is no guarantee that the encoding can represent all of the actual text that has the font applied; hence there are some \'3f in the fall-back encoded text of the heading of the bugdoc, which indicates that the detected Shift-JIS is insufficient and GB-2132 would be required; but it's not obvious how to do better here without iterating over all the text twice, and that still leaves the possibility that all text that has a particular font applied cannot be represented by a single non-Unicode encoding. But since we always write text as the \u Unicode + legacy fall-back, this should not be a big problem since modern RTF readers will simply read the Unicode. Change-Id: Ie6a42294c501d014dd9f0df82638519412ca19bb
2014-06-12CppunitTest_sw_ooxmlexport: port testFloatingTablePosition to textboxesMiklos Vajna
Change-Id: I200520a28335fb62cecb91175fc6cefc2cfb51ec
2014-06-12CppunitTest_sw_ooxmlexport: port testPageRelSize to textboxesMiklos Vajna
Change-Id: I08e112b3816797a848ae9d16fa7002a67c12fc3d
2014-06-11This assumption doesn't hold on all build environments.Kohei Yoshida
Change-Id: Ie1f56aed91e7cbfc59e254a111991f958e9a1607
2014-06-11CppunitTest_sw_ooxmlexport: port testTextBoxPictureFill to textboxesMiklos Vajna
Change-Id: I304c7d7157c4167e7fe33af259e732865900d4ca
2014-06-11DOCX drawingML filter: handle TextAutoGrowHeight for shapes having textboxesMiklos Vajna
Change-Id: I0cdc7edf851915f7fbc772eb42edd6ec08b09025
2014-06-11DOCX import: fix additional empty paragraphs around footnote textMiklos Vajna
Regression from commit abe1e852a232e3bdab7b9177d099fe3929f5a4aa (handle properly page breaks even if a page contains only a frame (fdo#55381), 2014-04-21), DomainMapper::lcl_endSectionGroup() inserted an empty paragraph before and after the real footnote text. Disable addition of the dummy paragraph for footnotes. Change-Id: I6e1954c9bd5520ac284d66244ce1c9004e970305
2014-06-11fdo#79668 :File getting corrupt after RTTushar Bende
Problem Description : For some documents containing redLine data there was already processing done for paragraph properties pPr but when it comes to DocxAttributeOutput::EndParagraphProperties() instead of writing these pPr, LO was calling Redline( pRedlineData ) which has it's pPr inside w:pPrChange. This was the reason when LO calls WriteCollectedParagraphProperties() after calling Redline() it was writing both paragraph properties inside single w:shd element.Hence the RT document was getting Corrupt. Added condition in DocxAttributeOutput::EndParagraphProperties() which is checking for RedlineData and if it's there call WriteCollectedParagraphProperties() before calling Redline(). Added Export Test case. Change-Id: I7000c27fe6ee372cac81d6f22e0d3ca9219a24d7 Reviewed-on: https://gerrit.libreoffice.org/9712 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-06-11fdo#78885 : File crashed while opening in LOsushil_shinde
- File attached to issue contains footnote between a table and reference of footnote is in field. - In PopFieldContext code was throwing exception due to null value of footnotestartnode. Reviewed on: https://gerrit.libreoffice.org/9697 Change-Id: I467e234a7daa6a5f724087c2cc959e4c9d76f4d2
2014-06-11fdo#79817:Fix for corruption having databinding have duplicates attributesRohit Deshmukh
File contains SDT content, in which after export databinding have duplicate attribute. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/9693 Change-Id: Ibe828964c054bdd5a63b5c0c903bc7441d953d72
2014-06-11fdo#79540 : DOCX: Lo exports Drawing inside DrawingPallavi Jadhav
Issue : - In file there is a WordArt inside Table. - In RT, LO exports <w:drawing> inside <w:drawing>. - The xml sequence was : <mc:AltrnateContent> <mc:Choice> <w:drawing> // first start of drawing <w:txbxContent> <w:tbl> <w:drawing> // second start of drawing. MSO does not allow. Implementation : - In DocxAttributeOutput::OutputFlyFrame_Impl() under "case sw::Frame::eDrawing", if drawing is already open then Postpone the Inner Drawing. - Added Export Unit Test case to check two separate drawings are now written in document.xml of RT. Change-Id: I01d06621576d60d26cd51489ee9718dd79eb9c72 Reviewed-on: https://gerrit.libreoffice.org/9653 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>