path: root/sw/qa/extras/uiwriter/uiwriter.cxx
AgeCommit message (Collapse)AuthorFilesLines
2015-09-12Revert "Fix single node CopyRange"Michael Stahl1-0/+27
This reverts commit 9099e21b89184bd4e39def497e483cac4a77ec5a. It causes the problem that frames anchored to the same node where redlines start or end get duplicated during Hide. Jan-Marek said that the original mail-merge related problem this change was fixing is now most likely fixed differently, and the test in testMultiPageAnchoredDraws() still passes. (equivalent master commit e84f0a9b3223f49b0829f2f55dacbf11ae201c1e) sw: add unit test for the redline frame duplication regression (cherry picked from commit d5ffcba07acb4dd5bd68373d40f07af825f07fba) Change-Id: I4c2b425b0dc8d2706cc74ad93a485a501d44c072 Reviewed-on: Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
2015-08-20tdf#89720 sw: do not create text range overlay for reply annotationsMiklos Vajna1-0/+21
Regression from commit 0761f81643a6890457e9ef7d913ab5c88c2593a4 (123792: complete annotations on text ranges feature, 2013-12-19), the problem was that in case a comment had a reply, then both comments produced its range overlay, and this repeated semi-transparent overlay resulted in dark color. Go back to the old behavior of just painting the overlay for the non-reply comment; for real, partly overlapping comments showing the exact boundaries of the overlapping overlays still makes sense. (cherry picked from commit 780dd8c1cf5302ca503cf7b55357dace4d69beb9) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: Ic2673a1a41146ff547262ba681b34a63f41aa8ff Reviewed-on: Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
2015-08-17tdf#90575 sw: fix pasting DDE linksMiklos Vajna1-0/+40
Regression from commit 0761f81643a6890457e9ef7d913ab5c88c2593a4 (123792: complete annotations on text ranges feature, 2013-12-19), the problem was that the added additional IDocumentMarkAccess::GetType() check in lcl_FindDdeBookmark(), which means that the function no longer finds bookmarks with the matching name, only real DDE marks. This is a problem, as SwTrnsfrDdeLink::WriteData() depends on the fact that sw::mark::Bookmark inherits from sw::mark::DdeBookmark. As a result, the fast IDocumentMarkAccess::GetType() (that intentionally doesn't handle inheritance for performance reasons) can't be used here. (cherry picked from commit e06e2cb18874987d2dafd4faa0a8b71fc0aa6453) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx sw/source/core/doc/DocumentLinksAdministrationManager.cxx Change-Id: I2b7a07c18b641ac991f3227812a609dedc960e08 Reviewed-on: Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
2015-03-03cp#1000115 SwTxtFrm: don't join follow just because it has no contentMiklos Vajna1-0/+15
The problem was that the bugdoc had a table, and inside the table there was a long paragraph that flows to the next page, but only the paragraph mark of it does so. We first split the frame to have space for the paragraph mark, but later decided that all the content would fit the first frame, and this way the last hard line break and the paragraph mark was painted on each other. This is normally not a problem without tables, because SwTxtFrm::FormatAdjust() just calls SplitFrm(), sets its nNew flag to non-zero make sure that later SwTxtFrm::_AdjustFollow() doesn't try to join it, and we're ready. However, when the paragraph is inside a table, then the paragraph was formatted multiple times, and next time when we already had a follow nNew was not set, so even if there was a correct split first, the new frame was joined later. Fix the problem by explicitly setting nNew for the "in a table and paragraph ends with a hard line break" case, that way we don't blindly join the frame, only in case there is enough space for the follow in the master. (cherry picked from commit 7e33cce05b2df3f1761bcc66606c4d3b2b2671e9) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: Iede654740dcb0d8aa768d742ee330208291a383a Reviewed-on: Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
2015-01-24fdo#72486 SwWrtShell::SelAll: if in table, then call extended select all ...Miklos Vajna1-1/+2
... only in case the whole table is already selected Change-Id: If7626954460e16945af6b21402a84e90c71ae138 (cherry picked from commit fa39e7970496537258eaad1f5351db2d675225b6) Reviewed-on: Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <>
2014-12-11Add undo operation for deleting a bookmark + unit test, related fdo#51741Matúš Kukan1-0/+36
(cherry picked from commit 9338bea6e8dfab8d360fe8ab19dd5d75071bfc2a) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx sw/source/core/undo/unbkmk.cxx Change-Id: I79d8d3c30b6b0b2cc253963fdd50019aec033e12
2014-11-20fdo#85554 SwXShape: fix getting ZOrder property when doc contains TextBoxesMiklos Vajna1-0/+25
Change-Id: I9b6b83f0f6d627bb14a880a19769ee70564cf52b
2014-11-19Use SwNode::GetTxtNode()Miklos Vajna1-2/+2
Change-Id: Icf3e1013d5eba5702badf19aa6c1f5e6708ed154
2014-11-18fdo#86131 SwXTextField::getAnchor: handle postit field with annotation markMiklos Vajna1-0/+7
Change-Id: I3881c4577375a2eda053f64800d0991de6f009ad
2014-10-14Wrong unnecessarily deep downcastsStephan Bergmann1-2/+2 SwDrawContact instead of SwContact, ingoring that some objects involved in e.g. CppunitTest_sw_uiwriter are of type SwFlyDrawContact. Change-Id: Ie3b7726b3d47106db00b8aa11b702d505c369e00
2014-09-19SwCursor::SelectWordWT: include comment anchor character of a commented wordMiklos Vajna1-0/+19
In case the user double-clicks on a word and exactly that word is commented, then we used to select only the word, but not its comment anchor character. So when the user deleted the selection, the comment left there. It is still possible to manually select only the word, but on double-click let's just select the comment anchor as well, so a simple double-click on the commented word will remove the comment as well. Change-Id: I7322af61c31e8aba108eef5596849d17d55fc7eb
2014-09-15CppunitTest_sw_uiwriter: sal_Bool -> boolStephan Bergmann1-6/+6
Change-Id: I76199dbd781d228153bca015ac0b34d589276d85
2014-09-01fdo#83178 fix Chinese Conversion crashMatthew J. Francis1-0/+122
Reviewed on: Change-Id: Ifa9c7c1a29d7076903e038d3132c635b1143e2d8
2014-08-16Consistently use size_t and SAL_MAX_SIZEMatteo Casalin1-3/+3
Change-Id: Ibab89984ec94556ec368653b6db50c6c2e380dec
2014-08-15fdo#82191 sw::DocumentLayoutManager: copy textbox content of draw formatsMiklos Vajna1-0/+24
The SwFmtCntnt, i.e. the content of the draw format was already copied, but that's only a pointer to the real content: instead duplicate the real contents on copy&paste, that's how we copy fly frames as well. Change-Id: I42475e356aaa1c54c08fb23a6a395d1726e5f33e
2014-08-12Refactored IDocumentRedlineAccess out of SwDoc.Valentin Kettner1-1/+1
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-07-15Refactored IDocumentContentOperations out of SwDoc.Valentin Kettner1-4/+4
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-06-27SwTextBoxHelper::create: handle TextAutoGrowHeightMiklos Vajna1-0/+18
Without this, in case TextAutoGrowHeight is set before TextBox, the textbox of the shape won't have automatic height. Change-Id: I2ebf77eacbe1f1d10ccf64ef833c39ee965245d3
2014-06-25SwTextBoxHelper::syncProperty: handle RES_TEXT_VERT_ADJUSTMiklos Vajna1-0/+12
So that vertical text adjustment of the shape is reflected in the textbox layout. Change-Id: I887d51928fe4d37db08864374e0cea54f80953b5
2014-06-24Add SwTextBoxHelper::findShapesMiklos Vajna1-1/+23
It builds a textbox -> shape map, so methods interested to pick the shape instead of a shape's textbox can call it and act accordingly if their textbox is in the map. Change-Id: I0f30d64a284eb461f462ed6c0a36c88271153f04
2014-06-24fix broken redlines after undoing column count change (cp#1000071)Luboš Luňák1-0/+45
Changing a document with redlines to two columns and then using undo set some redlines to point to the end of the document (done by the call to RemoveIdxFromSection() in SwUndoInsSection::UndoImpl()). Change-Id: I88b563b88beebcd1c3cb21fe61bb56cdb12cdc41
2014-06-24new compilerplugin returnbyrefNoel Grandin1-3/+3
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-23SwDrawView::DeleteMarked: delete textbox of shape as wellMiklos Vajna1-0/+22
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-06commit id with ccc in it breaks regression testCaolán McNamara1-0/+10
Change-Id: I1a222fdd5e837a4d0071f8b4d03b80c1d104f235
2014-03-26related fdo#74981: add a unittest for kicksBjoern Michaelsen1-0/+29
Change-Id: I817948d053640b04dab8aaee85e914757b83cfa1
2014-03-13fdo#75898 SwFEShell::InsertRow: fix this in case bSelectAll == trueMiklos Vajna1-0/+17
Change-Id: Iaf59db6a55c3f81d11d0196d5d3e52056e31c4b1
2014-03-12fdo#75110 SwEditShell::DeleteSel fix start of selection when bSelAll == trueMiklos Vajna1-0/+15
Change-Id: I3e8ce585b29619061b18ab1ab8f0cf6c7d421074
2014-02-10coverity#1130361 Unchecked dynamic_castCaolán McNamara1-0/+1
Change-Id: I2c93a085fe55098777ae7b41953f2610903b5a54
2014-01-16Assert SwReaderWriter::GetReader returning non-nullStephan Bergmann1-0/+1
...happened to fail for me once, for unclear reasons. Change-Id: Idf88ff4952924a814e465b039fbae384691ba7a6
2014-01-16missing sal_Int32Miklos Vajna1-2/+2
Change-Id: Id93a7945365b82ae600c6dfe0d17d13ad41256fb
2014-01-16CppunitTest_sw_uiwriter: add testcase for ExportRTF()Miklos Vajna1-0/+30
Change-Id: I49a86e6a5cd525118d902b37825cfdb7dc8e70d2
2014-01-16CppunitTest_sw_uiwriter: add testcase for ImportRTF()Miklos Vajna1-0/+24
Change-Id: I334b21532337c1895a148c949dde60ad774b4759
2014-01-10fdo#70807: Improve unit test using custom stylesMarcos Paulo de Souza1-5/+13
As the bug talks about issues in custom styles, now they're tested too. Change-Id: I5f727718ec3591e29c44c49750a7c7a0841a8c61 Reviewed-on: Reviewed-by: Marcos Souza <> Tested-by: Marcos Souza <>
2014-01-10fdo#70807: UT to verify used styles in documentMarcos Paulo de Souza1-0/+23
Change-Id: Ief2eef638bc3f9e44358addf0d1c655a790834a2 Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Miklos Vajna <>
2013-11-14xub_StrLen to sal_Int32 in SwIndex and some relatedMatteo Casalin1-1/+1
Change-Id: I66735635a88844c30a7fa1c886d2c1df34008f4f
2013-10-28fdo#69893 fix SwWrtShell::SelAll() to work with empty table at doc startMiklos Vajna1-0/+16
In theory, it was a problem to have the table cursor around when having the selection outside the table; but it didn't cause a problem so far. However, when the table has one or more empty cells, we really need to leave table mode, otherwise only the table gets selected. Change-Id: I766903ed624b9338f0612697b4c03f44de1d2e41
2013-10-28SwUiWriterTest: allow loading a custom bugdocMiklos Vajna1-5/+7
Change-Id: I5578e462c21c023d8c9a269f2ca254e20c1a617e
2013-10-13Introduce unit test in replace functionnality in WriterArnaud Versini1-0/+101
Change-Id: I5ee33965a511c7730610377a2e41f4728a0fe4d2 Reviewed-on: Tested-by: Arnaud Versini <> Reviewed-by: Arnaud Versini <>