path: root/sw
AgeCommit message (Collapse)AuthorFilesLines
2012-09-17fdo#45700: sw ODF export: workaround corrupted table model:Michael Stahl1-8/+3
do not export invalid table:number-columns-spanned="0" (cherry picked from commit c45c64e3de51d9f56c9d9789729b6f7952547a61) Conflicts: sw/source/filter/xml/xmltble.cxx Change-Id: I7e286a9fcb6ed3df7222c83fe73e870e69561649 Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Miklos Vajna <>
2012-09-13fdo#42450: fix crash in SwXTextSection::attach:Michael Stahl1-0/+8
Inserting the section can fail if the given text range is not valid. Change-Id: Ib6ba3b02dd581dce08b646b841354073caf894b2 (cherry picked from commit 5bc6c7b2e170a35914d7cd07347c77a9c9d23664 and commit 2940a697dce2292e9c5b118feb8ec4159e3606fa) Reviewed-on: Reviewed-by: Norbert Thiebaud <> Reviewed-by: Miklos Vajna <> Tested-by: Miklos Vajna <>
2012-09-11fdo#53113 various docx shape export fixesMiklos Vajna3-3/+57
- docx export: initial shape text support - vml export: handle custom segment types - docx: export fillBlip shape property Change-Id: I8453d76cfb91386c8beaedc874e09a291234babb Reviewed-on: Reviewed-by: Bosdonnat Cedric <> Tested-by: Bosdonnat Cedric <>
2012-09-07fdo#54620 do not use vector iterator after insertDavid Tardon1-6/+7
Change-Id: I5e809f38a500ab818e9acef80b419dfece7a29fa (cherry picked from commit 06ae26b5676c29c4d1cc9c65f5bbaede9483a21d) Signed-off-by: Caolán McNamara <>
2012-09-06Headers/Footers: don't create temporary parts of document (perf problems)Cédric Bosdonnat3-55/+33
Clicking on an empty header/footer only displays the separator as creating empty header/footer could cause important layout recomputing on long documents. Change-Id: I800c5dd27744772833dee0da4269e7591bd0a10b Signed-off-by: Petr Mladek <> Signed-off-by: Michael Stahl <> Signed-off-by: Rainer Bielefeld <> Signed-off-by: Roman Eisele <>
2012-09-06fdo#46141: Don't use a timer to show header/footer separatorsCédric Bosdonnat5-35/+91
Clicking on the header/footer area will show the separator. Clicking on an empty header/footer area will add a temporary one that we try hard to remove when clicking outside Change-Id: I8f29f8fd80b2d808257636bf94ec4e2e46f6028e Signed-off-by: Petr Mladek <> Signed-off-by: Michael Stahl <> Signed-off-by: Rainer Bielefeld <> Signed-off-by: Roman Eisele <>
2012-08-29SwPageBreakWin: memory leakIvan Timofeev1-0/+1
Change-Id: Ibb543b8da8c89c7fa3799fada03c787dabe2b3cb (cherry picked from commit a251863970e0512a1dc2bd857913a3adf7148bb3) Reviewed-on: Reviewed-by: Norbert Thiebaud <> Tested-by: Norbert Thiebaud <>
2012-08-28fdo#53399 Word count is inconsistent and wrong with non-breaking spaceMuhammad Haggag2-12/+11
This change replaces lcl_IsSkippableWhitespace with a call to ICU's u_isspace, which covers all Unicode separators. It also updates and fixes one of the SwScanner unit tests. Bug details: SwScanner::NextWord skips whitespace before calling into ICU's BreakIterator. The function used to identify whitespace (lcl_IsSkippableWhitespace) doesn't cover the full category of Unicode separators (code [Zs], 18 in total. See: Since 0xA0 (no-break space) is not identified as whitespace and not skipped, we end up calling ICU starting at the position 0xA0, asking it to get us the boundary of the next word forward. ICU sees that it's called at the end of a word, and reverses the query direction to backward, and returns the word before. This causes NextWord to think we've hit the end of the string and call it a day, terminating word count for the rest of the line. Change-Id: I29c89ddb0b26e88da822501253898856b28e3fa5 Reviewed-on: Reviewed-by: Andras Timar <> Tested-by: Andras Timar <> (cherry picked from commit 3ba107606682b5e675127483a514f0e6580ecfd1) Signed-off-by: Caolán McNamara <>
2012-08-27fdo#49901: SwView::ExecSearch: fix Replace All cursor:Michael Stahl1-23/+23
Because the "fix" for i#8288 only set the point of the cursor and not the mark, it can happen that after a Replace All weird things are selected; fix that (and i#8288 properly) by using the SwCrsrShell stack, and don't do it when searching in the selection. This cannot be done in SwCrsrShell itself because ExecSearch sets the cursor to the beginning/end of the document already. (regression from cda75d6f358d438f7ed36ed7fa296ac23e3c4a04) Change-Id: Ie9f8d7da2fa26000a0237c24f8742e47ffa29213 (cherry picked from commit b3233579ccb2528912835deedde37c1d48417d6c) Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Miklos Vajna <>
2012-08-24Revert "initialize member": the commit to fix isn't in 3.6Cédric Bosdonnat1-1/+0
This reverts commit 7f18b80a3bd2b3c126ac852c7ecd5ceb376f389d. Change-Id: Ie577edba915ad78eaa82a66280a51ddd6ba9398e
2012-08-24fix math export/import in docx/rtfLuboš Luňák1-4/+7
For some reason older gcc versions don't manage to dynamic_cast to the necessary cast. I'm not quite sure why, forcing sal/osl/unx/module.cxx to always use RTLD_GLOBAL does not seem to help. Most probably compiler bug. Changing the cast to two simpler ones helps. Signed-off-by: Miklos Vajna <>
2012-08-24initialize memberLuboš Luňák1-0/+1
Introduced by b95d203bc17c83ec0fe5139f519d53ed1d842d3a . Change-Id: I2497ee7cd55776fbd801d07470968e5aa47e971a Signed-off-by: Cédric Bosdonnat <>
2012-08-24SwHeaderFooterWin: memory leakIvan Timofeev1-0/+1
Change-Id: Ie8322b93745c48970766c2033a23cca2c710a516 (cherry picked from commit 442d0766eb9575a45572e29f2018bed2831c177f) Reviewed-on: Reviewed-by: Bosdonnat Cedric <> Tested-by: Bosdonnat Cedric <>
2012-08-23fdo#51514: SwXBookmarks: only consider real bookmarks:Michael Stahl1-14/+60
Since CWS swrefactormarks2 the SwXBookmarks collection handles not only bookmarks but at least cross-ref marks as well, which then bother users when they show up in the Insert->Hyperlink dialog; remove non-bookmarks again. (regression from df6d312ca537402463e4eb0530f22b956600fc02) Change-Id: I6a64ba8a43468dd3ce1569e944371d3ef71f8824 (cherry picked from commit 45be3ac8151d63ccb61879f876696704542a4ce7) Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Miklos Vajna <>
2012-08-23SwTokenWindow::InsertAtSelection: fix STL assertion:Michael Stahl1-6/+4
error: attempt to copy-construct an iterator from a singular iterator. (regression from 39b8a5f87f55abe53488c9c3c35b65fb0df84cde) Change-Id: Iab29f4c356ea1cb5ca0f687bcfc5e54f185fbba3 (cherry picked from commit c47505a4525c342694ba4196544715467c2bdb8e) Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Miklos Vajna <>
2012-08-22fdo#51777: add a hack for 1 twip DOUBLE borders:Michael Stahl1-2/+1
Arguably such annoyingly thin double borders don't make much sense anyway, because they're essentially 2 hairlines with ~no space between, but unfortunately older LO versions are able to create them; since the refactoring in 2d045cdb69176b280812dda0b813371cf1ac72e2, which changed the BorderWidthImpl::Get* methods to return 0 due to rounding, they were ignored at least in the HTML import, which is a regression. So add a special purpose hack that essentially rounds up the first line to 1 but not the other lines so the visual result is a hairline single border. Change-Id: I20ac4675bcf67ea58a6931a40bff3605390e9c0d (cherry picked from commit 601bfe2ce3113719b2f8edaba2ccb6b630051a9a) Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Miklos Vajna <>
2012-08-21fdo#53175: Fixed the end of hyperlinksCédric Bosdonnat2-5/+13
This fixes the end of hyperlinks appearing after field ends (while the start of hyperlink is after field start too). Change-Id: If21b8973baaca183e0103e3a70ed98b99aa59392 (cherry picked from commit c1c2688912e769dfd7654e11e87dae380a8ce1eb) Signed-off-by: Miklos Vajna <>
2012-08-14fdo#53210 SwDoc::UpdateExpFlds don't crash when hiding all sectionsMiklos Vajna1-2/+28
(cherry picked from commit bb6bd1ff9cd3eecec7eb2cd7bd0a4dcef584c903) Change-Id: I9b7a61f18f987214708195a89f6e346c865c7f9f Signed-off-by: Petr Mladek <>
2012-08-13Page Break: don't show if mouse is gone and button is still invisible ↵Ivan Timofeev1-1/+1
(fdo#46518) it seems when the mouse leaves the dashed line, it immediately appears inside a button (if the mouse motion is not super-fast). Change-Id: I43c792fdba59feafd761bde8529a8683c07bf3d3 Signed-off-by: Petr Mladek <>
2012-08-13fdo#53439 SwPageFrm::PaintBorderAndShadow fix painting at small zoomMiklos Vajna1-5/+16
Change-Id: I235895caaf95225148e61d96f4c3b14bf9f5542e (cherry picked from commit c5b9c197d70a0fb7d75bcedf2d70e6320175e846) Signed-off-by: Ivan Timofeev <>
2012-08-10fdo#51832: SwRedlineAcceptDlg: fix STL conversion:Michael Stahl1-1/+1
62b7606fddfef9e1a7645a2d3d605f1fa3aee263 wrongly converted the call to aRedlineParents.DeleteAndDestroy() in SwRedlineAcceptDlg::RemoveParents() and erases one element less than the old code, which results in access to deleted SvListEntry and crash. (cherry picked from commit 8a66a7789698b12f2c07169e0106413de2f39fb8) Change-Id: Ie2749cb3f17b36649adff46c166642fccde31329 Signed-off-by: Tor Lillqvist <>
2012-08-08n#773515 SwPageFrm::PaintBorderAndShadow fix shadow color on partial redrawMiklos Vajna1-4/+18
How to reproduce: if you have a paragraph of text, and hit Enter in the middle of the paragraph, the frame around the document below the cursor position gets darker. Regression from f23d055dbee887ef9ebdf0a72b83ee1de91b7b8b. Change-Id: I41f9972b9be8d3ea02b52c0bc7355b012b41395d Signed-off-by: Jan Holesovsky <>
2012-08-03fdo#46020: fixed missing footnote docx/doc/rtf exportCédric Bosdonnat1-1/+3
Don't skip a next position when parsing a paragraph into runs to export. Change-Id: If7e887ea84ad24256b37aa96187bc30ea154632b Signed-off-by: Miklos Vajna <>
2012-08-02sw: fix some warningsMichael Stahl10-15/+33
Signed-off-by: Petr Mladek <>
2012-08-02some tweaks in RTF filterMichael Stahl6-24/+43
Signed-off-by: Petr Mladek <>
2012-08-02fdo#52610: Fixed several docx export bugsCédric Bosdonnat2-12/+15
+ hyperlink starting before a field and ending in its results isn't valid. + when footnotes have hyperlinks we need to add the proper XML namespace and output the relations to a different file. Change-Id: I1c6cb8acba21c35e10bb0497eeaf96bbd73730d1 (cherry picked from commit 0e4846ec20c1aefc554037e8f08255019c08da47) Signed-off-by: Miklos Vajna <>
2012-08-01fdo#45724 fix WW8 export of textbox default background colorMiklos Vajna1-0/+2
regression from 5609c512cd4d2899300b432d88d93cff05a05c87 Change-Id: I5f3ce73943b2805b7de1ae41699e605af9086b15
2012-07-30sw: disable CheckBookmarks on WNTMichael Stahl1-1/+7
Change-Id: Ia52cbea28c832706cbfa74c2b1d9bca43df006d9 (cherry picked from commit 01550a7450f099c4016af53fef53c286040b1575) Signed-off-by: Miklos Vajna <>
2012-07-24better page descriptor handling in RTFMichael Stahl1-7/+10
Change-Id: I9f80d5be700c94cf5993243903a70295d2545868 Signed-off-by: Miklos Vajna <>
2012-07-24fdo#39812: Writer: fix collapsing merged table border painting:Michael Stahl1-13/+26
Create a table with a merged cell like in the screenshot in the bug, with a SAL_DEBUG in SwTabFrmPainter::PaintLines the following lines are painted: debug: paint start 1 debug: start: 2749,1488 end: 12387,1488 2 debug: start: 2749,1945 end: 7567,1945 3 debug: start: 7567,1945 end: 12387,1945 4 debug: start: 2749,2015 end: 12387,2015 5 debug: start: 2749,2542 end: 7567,2542 6 debug: start: 7567,2542 end: 12387,2542 7 debug: start: 2749,1488 end: 2749,1945 8 debug: start: 2749,1945 end: 2749,2015 9 debug: start: 2749,2015 end: 2749,2542 A debug: start: 7567,1945 end: 7567,2542 B debug: start: 12387,1488 end: 12387,1945 C debug: start: 12387,1945 end: 12387,2015 D debug: start: 12387,2015 end: 12387,2542 debug: paint end *11111*11111* 7 B 7 B *22222*33333* 8 A C *44444*44444* 9 A D 9 A D *55555*66666* The problem is obviously that the Y coordinates of the lines 2, 3 and 4 differ; they should be on the same Y position. The problem here is that logically horizontal lines must be painted not centered but "below" the line, and It turns out that SwTabFrmPainter::Insert cannot correct the positions properly to do that, because it only looks at borders in a single cell. When using the UI to set the borders, we get (for innner table borders) only a bottom border in the cells, but no top borders, so the top position of the logically vertical borders needs to be corrected with the width of the bottom border of the cell _above_; a symmetric correction of the bottom position to the top border of the cell below is also necessary. Fortunately if we just leave the positons alone in Insert then TabFrmPainter will eliminate duplicate lines with equal positions and so it's only necessary to correct the positions when actually painting the line in wTabFrmPainter::PaintLines, where we have the neighboring lines available. (cherry picked from commit 02e80d2e431a57ad775a674eb3cfcd6cec53e09f) Change-Id: Ia8519f6673db0f3a1ecaa68038896cac39609129 Signed-off-by: Miklos Vajna <>
2012-07-19fdo#52241 remove just one entryDavid Tardon1-3/+2
Change-Id: Ida7920c3196105f7f8aab519da12e79135839345 (cherry picked from commit 859018061956b1937c7be3809a9858cbd610fa9c) Signed-off-by: Luboš Luňák <>
2012-07-18fdo#50801 fix cross-reference text when Caption order is Numbering firstUray M. János4-61/+101
Change-Id: I7306f99c18d0f9cfb3b0ce147ecc200662d23b3d Signed-off-by: Andras Timar <>
2012-07-15Resolves: fdo#52013 use vector::insert insteadCaolán McNamara1-1/+2
Change-Id: Ie12e5b11196b1b0f919bd18f28a0b86f60cc6513 Signed-off-by: Takeshi Abe <>
2012-07-13do not write default tab stop into the default style in .docxLuboš Luňák3-3/+15
Use w:defaultTabStop in w:settings instead. Change-Id: I7056ff0ee8574fd942e2f330a1f76bae657a825e (cherry picked from commit 15af925c254f27046427de70a59011e2ac3d6bdb) Signed-off-by: Caolán McNamara <>
2012-07-11fdo#51793: FormatNumber can handle sal_uInt32 values after all...Cédric Bosdonnat3-3/+3
Change-Id: I9d50bce0278a4aa65873aa816eb991473f556cee (cherry picked from commit 32c7ba61a9ce620c1c9544ac469ccfd143e60bb9) Signed-off-by: Michael Stahl <>
2012-07-06fdo#38071: roll back change to MarkBase::IsCoveringPosition:Michael Stahl1-3/+4
This change seems wrong as the end position is actually behind the CH_TXT_ATR_FIELDEND; fortunately it is also unnecessary because the change in MSWordExportBase::OutputTextNode is sufficient to fix the crash. Change-Id: I79d508b13ecc8d85c4e09149b44695436416ba6d (cherry picked from commit f2b6d71ccd04f41a849a0e5386f6619bfcc211da)
2012-07-06fdo#33960: fix cross reference number test failureMichael Stahl2-37/+48
(cherry picked from commit 190ca072fc1c8679c586867582c816d98016f343) Conflicts: sw/source/core/doc/number.cxx Change-Id: If50a09a14ad30fa3dcb587d6e59a5a0d161394b1
2012-07-04refactor handling of double border widths:Michael Stahl6-14/+17
Word uses a completely different definition of "width" of a double border than OOo and ODF: for Word the width is apparently the largest of the 3 component widths, while OOo and ODF define the width as the total with of all 3 components. The new border implementation in LO 3.4 was apparently inspired by Word's double border definition, which resulted in various import filter regressions, see the previous fixes: 36e43b52992735c622833e923faa63774b9e2f76 e2ffb71305c5f085eec6d396651c76d6daee3406 70a6a4d425558340bb49507975343a3e0a1bdde8 These fixes set the ScaleMetrics, which actually seems sub-optimal as there is a ScaleItemSet function somewhere that apparently re-scales all items in an itemset, which could undo the fixes. Also, one of the fixes actually managed to break RTF/DOCX import of double borders, as that ended up in the same code via the API. This commit now reverses the change, so that the width of a border is now always the total with of all components, which is (imho) much more intutitive, and also leads to a consistent UI where selecting say 3pt width has predictable results, no matter what the border style. The border widths are now converted in the Word format import/export filters (writerfilter and sw/source/filter/ww8), and various tests were adapted to the new handling. (cherry picked from commit 2d045cdb69176b280812dda0b813371cf1ac72e2) Conflicts: sw/qa/extras/ooxmltok/ooxmltok.cxx Change-Id: I50456c49b1a298569607e6c88f19f18441348ac3
2012-07-04replace enum SvxBorderStyle with css::table::BorderLineSyleMichael Stahl27-198/+243
Change-Id: I1dadb53f46b23f92d34061ef78dda872bdbcda67 (cherry picked from commit 8b4593948582c3b5b3d013bd751bb19ffd37a31b)
2012-07-04rename SvxBorderLine::SetStyle to something unambiguousMichael Stahl18-42/+46
Change-Id: Iec70985319a64cdc3630e15499ac304a7f1aabae (cherry picked from commit 463e59d680467a7b0d30ae956935a444c513de9e)
2012-07-04Remove duplication of License/Credits informationStefan Knorr (astron)6-6/+0
A bit differently this time around: + remove Credits menu item from menu + remove License button from the About dialog Conflicts: cui/source/dialogs/about.cxx Change-Id: I07c1e115aa209ef1d69458f5b188d73caaae4294
2012-06-28fdo#39415: sw: fix vertical collapsing border painting:Michael Stahl1-20/+22
For borders in vertically oriented text it's necessary to correct positions at different sides, i.e., right and left instead of top and bottom; refactor SwTabFrmPainter::Insert some more to handle this properly. Change-Id: If20b9477415e9bd12e63aab4eed2f070065eb473 (cherry picked from commit d0bbbfdef6b31650a351883de09b5338562048a2) Signed-off-by: Michael Stahl <>
2012-06-28fdo#39415: sw: fix collapsing border painting more:Michael Stahl1-19/+27
There is a special case for i#9860, which is for first line in follow table (i.e. continued on new page) without repeated headlines: Here the bottom border of the cell is used as the top border in case the cell does not have a top border; this is fixed now with a bit of refactoring, so the correct half width adjustment can be made. Change-Id: I58ef81b7e13544014ef75973ea793f673a242488 (cherry picked from commit 3a4b7c3555f2ffb4e89502bb04ff063d8c08f628) Signed-off-by: Michael Stahl <>
2012-06-28fdo#39415: sw: fix collapsing border painting:Michael Stahl1-4/+9
In a table with collapsing borders, the horizontal borders need to be painted "below" the reference line, and not "centered" on the line like the vertical borders. a0486f02433703744f487e599422714d03937956 was apparently an attempt to fix this, but unfortunately it adjusted both top and bottom borders with the top border width, which has horrible results if the top and bottom borders have different widths. Change-Id: I7605eda6ef8111612ceb1ded79c0811de9ca7b25 (cherry picked from commit aa8240e80394887a4af45710de69aacacec66d25) Signed-off-by: Michael Stahl <>
2012-06-27fdo#48335 RTF export: avoid fake page breaks on page style changesMiklos Vajna3-2/+10
The problem was that a page break has been always exported when the page style changed -- but in case the page style changes just because of "first page"-like styles, we don't need that. Change-Id: I15527c8d3a2d1c441b4817cf94d61ea68dc5f92c
2012-06-27fdo#48335 don't export zoom factor when zoom type is not percentMiklos Vajna1-1/+1
Change-Id: I1fb7e3d9d65f2f3388bb4851f5ad517ed1681f04
2012-06-27fdo#48335 RTF export: don't try to end not started runsMiklos Vajna2-2/+7
Change-Id: I022556acd0891cf24963d667d34f366496453630
2012-06-22fdo#50831 fix RTF export of direct run formatting for empty paragraphsMiklos Vajna10-13/+47
Change-Id: I5f0e7aefdea80bbb9cf61b991c5b706bd2023dfa
2012-06-21fdo#34093: fix error in calculation of page number of SwRectIvan Timofeev2-29/+37
StringRangeEnumerator (i.e. user's input) contains page numbers in a different page range (it excludes empty pages). So: - first map page numbers to a common range, then compare - user's input can't contain empty pages, remove this check Change-Id: I4fce5215272fc90f39c9e05d3f3604734a8aebe3 (cherry picked from commit db053e48d2ca17e1256eb12500f075488483603b)
2012-06-18missing intializationDavid Tardon1-0/+1
Change-Id: I2350adf98e12b9c9cda4c18a6ba9f935016ac299 Signed-off-by: David Tardon <>