path: root/sw/qa/core
AgeCommit message (Collapse)AuthorFilesLines
2015-03-10tdf#89520 Make TOX creation more robustTobias Lippert1-0/+14
The code is now more robust and will accept illegal arguments. Change-Id: I43ae82b953cea845fb170aa7b6e8d42470ad4e5e Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <> (cherry picked from commit 4bdbea5447f36beb9cc33df173a89a49a9918290) Signed-off-by: Michael Stahl <>
2015-01-30tdf#75996: sw: correct bookmark positions when deleting textMichael Stahl1-0/+43
The problem is that SwUndoDelete will move the fully selected nodes to the UndoNodes but it leaves bookmarks with their SwIndex pointing to the deleted nodes. The SwNodeIndex are corrected by SwNodes::_MoveNodes() so they point to a different node than the SwIndex. This only happens if only one position of the bookmark is inside the deletion range; if both are, the bookmark will be deleted by SwUndoSaveCntnt::DelCntntIndex(). Also joining the 2 start/end nodes of the selection will accidentally correct the bookmarks but only if it happens to delete the end node. (and apparently there is also a DeleteRange method that doesn't join) Change-Id: I91ec362bb833328f8d681fd9458cb915c4efb267 (cherry picked from commit 370febbf19a5f362394d1c9e69b12dcb218f6501) Reviewed-on: Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
2015-01-22Resolves: fdo#87601 specific html doc hangs on loadCaolán McNamara1-0/+100
Change-Id: I67f472d72efe123b533d4d94be0084986c0e8349 (cherry picked from commit 6acd5c45c764d81aea1539e66adbfadb51df0aa3) Reviewed-on: Tested-by: Michael Stahl <> Reviewed-by: Michael Stahl <>
2014-11-26always pass bookmark name through to domainmapperCaolán McNamara1-0/+43
the rtf doc has three bookmark starts but only two matching bookmark ends. The tokenizer has three starts 0, 1, 2, but 0 is missing an end. Without the end of 0, the mapper never inserts an entry for it, so later inserts the start of rtftok index 1 as mapper index 0, and passing the end for a bare "1" cannot be found by index. If we pass the name then it finds it by name as mapper index 0 and all is well. Change-Id: I344db84e4f1c7d55fca59cdfe692080c7d0b8033 (cherry picked from commit 2b54caceab9d975bffa7e24bf732cb877b16632f) Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Miklos Vajna <>
2014-11-19fdo#85872: sw: fix crash in insert index dialogMichael Stahl1-1/+3
Looks like the old code would create a link starting at the beginning in this case, so let's do the same. (regression from 94b296d5416dd71d721ad16216b50bce79e3dc04) Change-Id: Idcd17ae51c478aa5c2a000c7b33a8244f06bd166
2014-11-19add EDB-35279 test-caseCaolán McNamara1-0/+0
Change-Id: I9fb6e1e33f6b67342c8b407eafc9882ee44f4b46
2014-11-10602 regression testCaolán McNamara5-0/+646
Change-Id: I044b9b445a7911e77424613145c7e4d152789f44
2014-11-03drop SW_DLLPUBLICs for unit-test only exposureCaolán McNamara3-0/+482
seeing as have a uwriter target for the non-exposed symbols case. As a motivating side-effect stops crashing on exit on an optimized build with my x86_64 fedora 20 gcc 4.8.3 build Change-Id: If0240ee02d4899e488b12d2d8d5f9b6bf7cca37d
2014-11-03Resolves: fdo#68347 fix word count with recorded changesCaolán McNamara1-8/+26
also see fdo#46757 a) We need to ignore redline-deleted text, but count redline-added text b) each block of text is denoted by its end position in the model and where that maps to in the view so a hidden portion should record its end point not its starting point, and a non-hidden deleted portion should always record its end point c) when mapping a model position to the view we take the offset of the model pos arg from the block end and use that to offset the mapped block-end view pos to get the final view pos. But for hidden portions that won't make a whole lot of sense, and end up offsetting into prior portions, so map all positions within a hidden portion to the same block-end view pos add regression tests for these cases Change-Id: I45c76bba47fd430bc3bccb5f919502660d415d9e
2014-11-02abi#9930 DocxAttributeOutput::AddToAttrList: avoid duplicated attributesMiklos Vajna1-0/+0
Change-Id: Ia799fc8b1b0e9bc6852b21194b71e1f3e683955e
2014-10-28fdo#84692 SwXAutoStyleFamily::insertStyle: don't throw on unknown propertyMiklos Vajna1-0/+0
Regression from commit 7d9bb549d498d6beed2c4050c402d09643febdfa (Related: #i124638# Second step of DrawingLayer FillAttributes..., 2014-06-02), the problem was that the new branch (used for paragraphs) in the method does not tolerate unknown properties (it throws), while the behavior was just a warning. Adapt the new branch to the old behavior, so that the document can be opened again. Change-Id: I5d849987602fb8aa0cbbda92ce07c050067473b3
2014-10-25fdo#82859 RTF import: don't try to set CustomShapeGeometry on a TextFrameMiklos Vajna1-0/+25
Change-Id: I687fa609559f0484fe6bb804265243de154c3760
2014-10-22Resolves: ooo#40683 support word for windows 1Caolán McNamara2-0/+0
via the standard .doc binary filter Change-Id: I0284fa815e6874d7d59ad1ad8ede4482d2e266a4
2014-10-15sw: fix temp file leak in SwDocTestMichael Stahl1-1/+2
Change-Id: I493af417e9bf6c781638a5a2ec10c3bed32d1b8a
2014-10-07kde#52609 RTF import: fix memory leakMiklos Vajna1-0/+8
This is similar to f7ef84640258e4ee6ddc4cc5cbf58a2d89860afa (abi#2128 RTF import: fix memory leak, 2013-11-28). Change-Id: Id57320466e6fb302ec8616ccc9f4f9429b8eff21
2014-10-07disambiguate uniform_int_distributionCaolán McNamara1-1/+1
Change-Id: Ifa0c1b1983d1cc7f22d55b15dee88b7f709dbcf8
2014-10-06loplugin:unreffunStephan Bergmann1-1/+1
Change-Id: I00240e0d17e40e187b82875bbd25a0630120c4d7
2014-10-06cast to size_t altogetherCaolán McNamara1-2/+2
Change-Id: I93cb374bd9743c45c4f3a98799a5f448dbb46fd8
2014-10-06Refactor giant SwDocTest::testModelToViewHelper() into smaller testsMatthew J. Francis1-198/+292
This is to clear the way for following bugfixes which will add to / amend these tests Change-Id: Ie97aba72f1a4c7b1be37577b9bcab2b2f0750d17 Reviewed-on: Reviewed-by: David Tardon <> Tested-by: David Tardon <>
2014-10-06use comphelper::rng::uniform_*_distribution everywhereCaolán McNamara1-7/+9
and automatically seed from time on first use coverity#1242393 Don't call rand coverity#1242404 Don't call rand coverity#1242410 Don't call rand and additionally allow 0xFF as a value coverity#1242409 Don't call rand coverity#1242399 Don't call rand coverity#1242372 Don't call rand coverity#1242377 Don't call rand coverity#1242378 Don't call rand coverity#1242379 Don't call rand coverity#1242382 Don't call rand coverity#1242383 Don't call rand coverity#1242402 Don't call rand coverity#1242397 Don't call rand coverity#1242390 Don't call rand coverity#1242389 Don't call rand coverity#1242388 Don't call rand coverity#1242386 Don't call rand coverity#1242384 Don't call rand coverity#1242394 Don't call rand Change-Id: I241feab9cb370e091fd6ccaba2af941eb95bc7cf
2014-10-01fdo#84536 RTF import: don't try to rotate TextFramesMiklos Vajna1-0/+16
Regression from 818d80eb0cee65d1bcc4fdb74b32a7c42cc1336e (RTF import: support shapes inside tables, 2013-06-28). Change-Id: I05eb2f4f2e3467e35f96b280e3a79f69906a56de
2014-09-30Resolves: fdo#79129 Crash in oox::drawingml::LayoutNode::setupShapeCaolán McNamara1-0/+0
Change-Id: I0bafd2c43d29806eea0ff0cb165e67aece53488f
2014-09-29Resolves: fdo#79131 crash in EnhancedCustomShapeTypeNames::GetCaolán McNamara1-0/+0
Change-Id: Ib21a4a1574119120f09d4ecac73b93a0f2f6739f
2014-09-28Resolves: fdo#73608 bail out on loop in style sheet hierarchyCaolán McNamara1-0/+0
Change-Id: I03975d1ce8eaceceb4d5c263eb11c1521bcd57eb
2014-09-28Related: fdo#73608 don't crash on missing table stylesCaolán McNamara1-0/+0
Change-Id: I340b43b7afc4c5c4d6dc8e4ed182279240306540
2014-08-28sw: why is swdll.hxx included everywhere?Michael Stahl1-0/+1
Change-Id: Ic401ca83666a887be9e5efe8369440e78fa4eeac
2014-08-22DOCX import: list styles don't support automatic updatesMiklos Vajna1-0/+0
The problem was the following: setPropertyValue("IsAutoUpdate") on the style failed -> a number of styles was not imported in StyleSheetTable::ApplyStyleSheets() due to the exception, then when we tried to use one of the not imported styles, we also got an exception in DomainMapper_Impl::finishParagraph(), which resulted in not calling DomainMapperTableManager::handle(), so multiple cells of the same table wanted the same range for cell contents, and that resulted in a crash. Regression from cf33af732ed0d3d553bb74636e3b14c55d44c153 (handle w:gridBefore by faking cells (fdo#38414), 2014-04-23), but that commit just made the previously hidden problem visible. Change-Id: I788cb6b4a2c7b7efbfa48297c658bb26450bf583
2014-08-21DOCX export: handle anchored TextFrames inside shapesMiklos Vajna1-0/+0
The exporter already handled TextFrames inside TextFrames, a feature supported by Writer, and not by Word. Similarly, if DocxSdrExport::writeDMLAndVMLDrawing() starts a shape, then anchored TextFrames should be posponed till the end of that shape. Change-Id: I597a8a46b1cf2348a8ccb9af668ea5afab27541b
2014-08-19DOCX export: handle SDT end right before a section break introducing headersMiklos Vajna1-0/+0
Change-Id: I0fab5ae4335ed6016d31aa243b131899c3154388
2014-08-19DOCX export: handle SDT around floating tablesMiklos Vajna1-0/+0
Change-Id: I07fedc201c51008baca3254dcc099f0182aa4c72
2014-08-19DOCX export: handle multi-para SDT's ending right before a tableMiklos Vajna1-0/+0
Change-Id: I47ea5fd6e1b4d9d5a2893112efdcd810c4c84cfb
2014-08-18DOCX export: don't forget to close SDT elements inside the TextBoxes of shapesMiklos Vajna4-0/+9
A usual problem with SDT is that in case it should end after the last paragrah of a container, there is no "next" paragraph that could have the relevant "EndSdtBefore" property. This is usually handled by closing the SDT tag before the container is closed. The problem here was that DocxAttributeOutput::WriteSdtBlock() did not notify DocxSdrExport about opening the SDT, as it thought there is no draw export in progress. This is because in case of "shape with a TextBox", the common writeDMLAndVMLDrawing() method is not called, instead the separate writeDMLTextFrame() and writeVMLTextFrame() methods are invoked. Fix the problem by adjusting these methods to writeDMLAndVMLDrawing(), so that they also set m_bDMLAndVMLDrawingOpen to true during the TextBox export. Change-Id: Ie08b0b955cd2d6a645970da3d485e447abfd6495
2014-08-13warning C4245: 'initializing' : conversion from 'int' to 'sal_uLong'...Thomas Arnhold1-4/+7
...signed/unsigned mismatch In history this was sal_Long and then converted to sal_uLong, but the test never got aligned. Fix it by adding arbitrary element counts starting from 30. old: getCount(): {-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9} (With -5 silently converted to SAL_MAX_UINT32 - 5) new: getCount(): {30,31,32,33,34,0,1,2,3,4,5,6,7,8,9} Change-Id: Ic13678094c7bb4dcd122727f028c910513609cef
2014-08-12Refactored IDocumentLayoutAccess out of SwDoc.Valentin Kettner1-1/+2
Into the new class DocumentLayoutManager. Change-Id: I02d0cfcc63633d0bdab380508b2ef563187fd269
2014-08-12Refactored IDocumentStatistics our of SwDoc.Valentin Kettner1-5/+6
Into the new class DocumentStatisticsManager. Change-Id: I281232dc09dbd79c2faf3c2a78ae49625bbe88ee
2014-08-12Refactored IDocumentFieldsAccess out of SwDoc.Valentin Kettner1-1/+2
Into the new class DocumentFieldsManager. Removed SwDoc::_MakeFldList because it is not defined anywhere. Also moved a few non interface methods that belong to the manager. Change-Id: Icefd7ca7adcbb05a18d6fae0529fc54150b862fd
2014-08-12Refactored IDocumentRedlineAccess out of SwDoc.Valentin Kettner1-12/+13
Into the new class DocumentRedlineManager. Added an non const version of GetRedlineTbl to the interface. Also Moved SetAutoFmtRedlineComment which is not part of interface. Change-Id: I600d5821d5d5831557f5fc5375fb1203fe67a295
2014-08-05Avoid fn ptr casts in SwNodes::ForEeachStephan Bergmann1-134/+1 moving ForEach from BigPtrArray down to its sole user SwNodes. Change-Id: I6d326d3e1ac9dc6ac820e600973af420785d5a50
2014-08-01fdo#81491 FILEOPEN DOCX Assert Fails while Deleting Para (FramePr)Vinaya Mandke1-0/+0
SwXText::convertToTextFrame is called for a Para with FramePr. convertToTextFrame in turn calls DelFullPara which throws an assert as a few Bookmarks are still registered to the paragraph. In MarkManager::correctMarksAbsolute, pMark->GetMarkPos().nNode.GetNode() is checked if it is pOldNode, and then the Mark Position is shifted to aNewPos. In the following condition pMark->GetOtherMarkPos().nNode.GetNode() if it is the pOldNode, and still the Mark Position is changed. However the Other Mark Position must be changed as now the Othe Mark is in pOldNode. Change-Id: I4507f6b2906d33bc65c922fffe12db2110de651b Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Miklos Vajna <>
2014-07-29fdo#80580: LO crashes while opening the document on ubuntu buildYogesh Bharate1-0/+0
Problem Description: This issue is reproducible. Step to reproduce : 1. Create .docx contains page break on first page. 2. Second page contains '&'(ampersand) with some character like 'x','z','#' etc. 3. Changes the size or font of '&character' which is on second page. 4. Precaution will be take all this i.e page break and '&character' contains in single paragraph'. Solution: Added a check for Context Type which must be CONTEXT_CHARACTER for deferring character. Change-Id: I27989d2ca8d62fbd9efafe5ba7f4a65d56467c1e Reviewed-on: Reviewed-by: Luboš Luňák <> Tested-by: Luboš Luňák <>
2014-07-21fdo#81380: LO crashes while opening the documentdinesh_mp1-0/+0
LO crashes while opening the document because PropertySet interface is null and check for this condition was missing, so added the check. Change-Id: I04dd873ea0923a662e27f9eb2013cde31edc912b Reviewed-on: Reviewed-by: Luboš Luňák <> Tested-by: Luboš Luňák <>
2014-07-16fdo#80924: writerfilter: RTF import: fix shapeType PictureFrame importMichael Stahl1-0/+43
For shapeType PictureFrame, a default CustomShape was created and then RTFDocumentImpl::resolvePict() crashes because it actually operates on a previous shape, because in this special case RTFSdrImport::m_xShape is never actually set to the new shape, so contains the previous one. Also the new shape needs to be added to the draw-page, at least otherwise the assertion of the supported service fails because some SvxShape::mpObj weak-reference is dead? This essentially reverts commit 3cab1adf19d553663685e8198f0ec3f258a37c36 (except for the added testcase, which was slightly different because it did not have a "pib" property). (regression from ba9b63d8101197d3fd8612193b1ca188271dfc1a) Change-Id: I6539c4286850dff2d8564006487cc765f1d117be
2014-07-15Refactored IDocumentContentOperations out of SwDoc.Valentin Kettner1-74/+74
Into the new class DocumentContentOperationsManager. Made SwNodes in sw/inc/ndarr.hxx friend class to DocumentContentOperationsManager so it can call DelNodes at end of DocumentContentOperationsManager::DeleteSection . Added DeleteAutoCorrExceptWord to SwDoc, its needed in the Manager. Added a non const version of SwDoc::GetDfltGrfFmtColl() to SwDoc because its needed in the Manager. Made SwDoc a friend class to DocumentContentOperationsManager so it can call SwDoc::checkRedlining and SwDocL::_MakeFlySection. Moved SwDoc::CopyImpl_ , SwDoc::CopyWithFlyInFly and SwDoc::CopyFlyInFlyImpl into the Manager. Moved "struct ParaRstFmt" and "lcl_RstTxtAttr" from docfmt.cxx in DocumentContentOperationsManager.hxx . Change-Id: Icaab57f4a8c158a85e549ecb4aacc752bc95bbc9
2014-07-02fdo#79838 : DOCX : File crashes on openPallavi Jadhav1-0/+0
Issue : DOCX containing nested form fields FORMCHECKBOX inside FORMTEXT crashes at open. Implementation : - Handled case for FORMTEXT. - Added issue file isnide sw/qa/core/data/ooxml/pass/ NOTE : This is a due to regression. Issue file opened successfully on LO-3.5 and LO-4.1. Code changes that caused regression is :;a=commitdiff;h=a52ee51269a47e52d68405caf8507e1abaa6fd8f Change-Id: I59dbe7bb2d58c1bcb0ddd144cf7891cbec5cdb24 Reviewed-on: Tested-by: Norbert Thiebaud <> Reviewed-by: Norbert Thiebaud <>
2014-06-30fdo#80514 LO crashes on opening; tries to remove a para with NumPicBulletVinaya Mandke1-0/+0
LO crashes while opening the issue file as, an extra Num Pic Bullets is attached to the dummy para. All NumPicBullets were disposed in dtor of ListsManager. LO tries to remove dummy para after the section, while the pic bullet is still attached to it. This causes Lo to crash while removing the paragraph. Added a 'ListsManager::DisposeNumPicBullets( )' to remove the extra bullets from the document Added the issue file in sw/qa/core/data/ooxml/pass/ Change-Id: I578f48364dcb4ff939fa3800e90db88a99d5ca1a Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Miklos Vajna <>
2014-06-27remove SFX_APP() macro that was a mer wrapper for SfxGetApp()Norbert Thiebaud1-1/+1
Change-Id: I480a789c767dd671775c9d70d96bf71908f21f5b
2014-06-26fdo#79940 LO crashes on opening; tries to remove a para with bookmarksVinaya Mandke1-0/+0
LO crashes while opening the issue file as, DomainMapper_Impl::RemoveLastParagraph tries to dispose a paragraph which has bookmarks attached. If A para finishes and a new para has not been started as yet, which means the current cursor position is outside a paragraph. In such a case move the Bookmark-End to the earlier paragraph. Added the issue file in sw/qa/core/data/ooxml/pass/ Change-Id: I62cf94718add943d042d770ab5337a0dae70d9e8 Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Miklos Vajna <>
2014-06-24new compilerplugin returnbyrefNoel Grandin1-21/+21
Find places where we are returning a pointer to something, where we can be returning a reference. e.g. class A { struct X x; public X* getX() { return &x; } } which can be: public X& getX() { return x; } Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
2014-06-20fdo#79973 : LO crashes while opening the document.PriyankaGaikwad1-0/+0
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: Reviewed-by: Muthu Subramanian K <> Tested-by: Muthu Subramanian K <>
2014-06-20fdo#78904 : LO hangs while saving the document.Umesh Kadam1-0/+0
- 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: Reviewed-by: Miklos Vajna <> Tested-by: Miklos Vajna <>