summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2015-01-23Factor out SfxPoolItem::dumpAsXml() from swMiklos Vajna
The primary benefit of this is that it's no longer necessary to manually downcast to each and every subclass in sw. Change-Id: I5742d5744836eef192eef2d4f7ad180da67eb914
2015-01-22Resolves: fdo#87760 if we can't anchor at hidden text then...Caolán McNamara
anchor to the page instead Change-Id: Ib7931fdd1c70e809ec442aeac125879980e20ec9
2015-01-22Related: fdo#87760 don't crash on searching for a place to put the anchorCaolán McNamara
1 press return in an empty writer doc a few times 2 insert a stock 2x2 table 4 enter A1 and change format->character to hidden A1 3 draw a rectangle above A1 so it'll get anchored to paragraph above table 5 draw rectangle anchor into A1 Change-Id: I2b0631908843150fae48f7e387a98e91cf90423d
2015-01-22::rtl::OUString->OUStringCaolán McNamara
Change-Id: I68654a5fa4cbb7403c00b103e2be5929ccb516a2
2015-01-22Resolves: fdo#88378 flipping by reversing co-ord system no longer worksCaolán McNamara
not entirely sure when this stopped working, but our contempory code is riddled with asserts and throws for negative sizes so rework this to explicitly mirror the preview rather than try the no longer working technique Change-Id: Ie90283cad2797ab1c37848469b007dc01a2c9d75
2015-01-22writerfilter: DOCX import: better error handling than "catch (...) {}"Michael Stahl
If there is a SAXParseException, OOXMLDocumentImpl::resolve() should not ignore it, because if it occurs in a substream some end tag handlers may not have been run and the DomainMapper may be in an inconsistent state, so continuing to parse the outer document is probably not a good idea. Also add some exception mangling so sfx2 can present a useful error dialog. Change-Id: I169ba6db25f2ae264af08a64edf76a6bf6757f85
2015-01-22loplugin:stringconstantStephan Bergmann
Change-Id: Ia23865a38eff10304a1c1748b2b4f17af7b4d3ae
2015-01-22fix mangled indentCaolán McNamara
Change-Id: Ie7ff70660a95711bcedc96da72694e5c46717274
2015-01-22fdo#68963 recognize __RefHeading__ bookmarks as TOC in .doc filesJustin Luth
LibreOffice recognizes MS Office Table Of Contents, but LO files saved as .doc didn't show the Cross-Refence heading - it was blank. Now bookmarks using the LO naming convention are also imported as TOC bookmarks from .doc files. Testcase included. Change-Id: Icae5c0de31856ccc75ede9a97c0ea046dd97325f Reviewed-on: https://gerrit.libreoffice.org/14018 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-01-22Merge common code of sw format listsJan-Marek Glogowski
Moves the common code of Fmt based lists and simple vector lists into two intermediate template classes, of which one provides the SwFmtsBase interface. Change-Id: If963c19293584654a3d17438221e3fca8bdfd4f9 Reviewed-on: https://gerrit.libreoffice.org/13448 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-22Factor out SfxStringItem::dumpAsXml() from swMiklos Vajna
Change-Id: If218d83297bfdd39471d5502c0639248c96af9c6
2015-01-22Some more loplugin:cstylecast: swStephan Bergmann
note the two TODOs about suspicious casts Change-Id: I324fa05b30a5c8aa1d9e9a6d488a1e295226e788
2015-01-21drop unnecessary inlineCaolán McNamara
Change-Id: I3355990769251aaee8957f889f97a80af1670bdc
2015-01-21Hint assertions and sanity checks added.Ashod Nakashian
Change-Id: I83bf8866c8855b3266703eca62010d28388c5a07 Reviewed-on: https://gerrit.libreoffice.org/13880 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-21Resolves: fdo#87601 specific html doc hangs on loadCaolán McNamara
Change-Id: I67f472d72efe123b533d4d94be0084986c0e8349
2015-01-21RotateAngle of UNO type longStephan Bergmann
Change-Id: Id3aec16d17b55366c2a35810b21b0a1c73439741
2015-01-21fdo#87488 Wrong text rotation inside a preset shape from docxGary Houston
Preset shape text rotation values are read in a few places and stored in moRotation. With these changes, moRotation is always read unchanged, but multiplied by -1 when it's used. Change-Id: I633d665c21daa69e15fa828a43300f10d2bf2054 Reviewed-on: https://gerrit.libreoffice.org/13561 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-01-21SwSection::GetFmt const-correctnessStephan Bergmann
...otherwise, wouldn't make sense to have non-const/const overloads anyway. Needs to introduce one const_cast into doctxm.cxx (which already contains quite a handful), otherwise the required changes would turn into too much of an avalanche. Change-Id: I694c7a1df7089d83ee95d35ed09bb864e9703f7c
2015-01-21sw: make SwTxtNode::RstTxtAttr() easier to understandMichael Stahl
Trying to figure out whether the other 2 asserts could trigger, the idea to just delay everything that could potentially re-sort the array and thereby invalidate the current iteration index seemed appealing. Should be faster too: the main loop now looks at each hint only once, but deleting a hint now requires a O(log(n)) GetStartOf() lookup. Change-Id: I5c7b8493b35ee71c8ebdc284d2508c9812dc29cf
2015-01-21sw: fix bogus assert in SwTxtNode::RstTxtAttr()Michael Stahl
The assert for case 3 is wrong and fires when importing ooo44732-2.doc but there is also a bug here where a hint could be skipped. Change-Id: I028d2d5df9e80cf0001d9bc11aa7fabcd01e83bb
2015-01-21Factor out SwFmtPageDesc::dumpAsXml() from docnodeMiklos Vajna
Change-Id: I813804ece7507fef84c43ba8fc290b151c8063ab
2015-01-20sw: add unit test for 5c363cf3f1d75e37835a6663a96b4e22c754c4cbMichael Stahl
Change-Id: If83f4900fcecde07f75d88c7f0b7c9088974b093
2015-01-20fix SwIndexReg::~SwIndexReg assert in fdo68332-2.docxCaolán McNamara
SwParaSelection sets a mark on the cursor, but there is no need to do that. DelFullPara will delete the SwTxtNode anyway. Change-Id: I99b8dd637bd4d2b49a555e147514a2def19fa0bf Reviewed-on: https://gerrit.libreoffice.org/14054 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-01-20Maintain the sorting in sorted_vector after modifying the elements.Ashod Nakashian
Resort immediately after modifying the data to prevent invalid lookups. Change-Id: If132af401d8164fd5973d81a8327c1fa726c908c Reviewed-on: https://gerrit.libreoffice.org/13984 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2015-01-20Resolves: fdo#84943 make fodt non crashy like odt for formulas inside shapesCaolán McNamara
where odt checks for a null pTxtCrsr and skips the object and fodt just ploughed ahead. i.e. make fodt equally useless as odt (fdo#84942) Change-Id: I915cc1f7c065ea83377e895a932636c82698cf1f
2015-01-20OSL_ENSURE->SAL_WARN_IF where conditional deref followsCaolán McNamara
Change-Id: I2648b0357c13699df2693968db4e57c81028c962
2015-01-20OSL_ENSURE->assert where unconditionally deref followsCaolán McNamara
Change-Id: I0cb2400e7ebb28cad2c98f9e69d68d312efb03ca
2015-01-20Drop unused comphelper::service_decl::component_getFactoryHelper paramsStephan Bergmann
Change-Id: Ia47c0bc3539ddf8f925cd053a2431c742c46d337
2015-01-20Factor out SvxShadowItem::dumpAsXml() from swMiklos Vajna
Change-Id: Id25a050a9840d83cff4b390faec7478f17336524
2015-01-19fdo#39468 Translate German comments - sw/source/core/textPhilipp Weissenbacher
Change-Id: I187cb3f6beb14c43def5d76396bf49bd9540a222 Reviewed-on: https://gerrit.libreoffice.org/13981 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-01-19if we change the keys we have to resort based on the new keysCaolán McNamara
Change-Id: Ied95c2d1490554d9ba5402c936a9720c8a325771
2015-01-19fdo#39440 sw: reduce scope of local variablesMichael Weghorn
This addresses some cppcheck warnings. Change-Id: I2368fc0a1c6dd73125d4770d06063ea3e3d8c713 Reviewed-on: https://gerrit.libreoffice.org/13961 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-19fdo#39440 sw: reduce scope of local variablesMichael Weghorn
This addresses some cppcheck warnings. Change-Id: I0de4e6278fb564c299722a9e23eb67d0999c4e31 Reviewed-on: https://gerrit.libreoffice.org/13966 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-19fdo#39440 sw: reduce scope of local variablesMichael Weghorn
This addresses some cppcheck warnings. Change-Id: I7cbc1908d0e3c84f5864db34984d0740db891aef Reviewed-on: https://gerrit.libreoffice.org/13962 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-19fdo#39440 sw: reduce scope of local variablesMichael Weghorn
This addresses some cppcheck warnings. Change-Id: Iccdd4bebd46f274697597b13746c820aaadc99a4 Reviewed-on: https://gerrit.libreoffice.org/13960 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-18SwTextBoxHelper::findTextBoxes: optimize unnecessary O(n^2)Miklos Vajna
Change-Id: Ib127b6cf44a69709673465db99cc79417b18c266
2015-01-18ODT export: fix namespace of <table:covered-table-cell> inside shapesMiklos Vajna
Change-Id: If96b46bac7f8212cfb83dc8b4528986137f1eaea
2015-01-17Use std::unique_ptrMiklos Vajna
Change-Id: I4c72576d36621d863de55b0ab9f0b5a22753446a
2015-01-17Factor out SvxULSpaceItem::dumpAsXml() from swMiklos Vajna
Change-Id: I52d7a7aaf304b7d698705cda7d3e70e723811fb2
2015-01-17rhbz#1136013: svx: try to make the ExternalToolEdit not crash all the timeMichael Stahl
This thing was starting a timer that re-starts itself forever, and when the file it was watching changed, it would just assume the drawing objects were still there (and the document, for that matter...) Change-Id: I35f187f0828097a05618dc1733dce819fc6bffc6
2015-01-16SwViewImp::AddPaintRect: when tiled rendering, ignore visual areaMiklos Vajna
With this, gtktiledviewer gets the proper invalidation rectangles after keypresses. Change-Id: I9bd1f5b59d05ae93a0a1d018dda8b2efc01cb38c
2015-01-16SwViewShell: make sure no callback is fired during PaintTile()Miklos Vajna
When the invalidation callback is invoked, we call PaintTile() for each tile that is affected by the invalidated rectangle. Make sure PaintTile() doesn't result in new invalidations generated by itself, to avoid infinite loops. Change-Id: I593726bd7e72028f26103829831949f000665e95
2015-01-16SwViewShell::InvalidateWindows: when tiled rendering, ignore visual areaMiklos Vajna
Change-Id: I9b40a32e08f4472b75a236e2720ecbe5927117fb
2015-01-16SwViewShell::PaintTile: paint a small red rectangle as well in debug modeMiklos Vajna
Change-Id: I246965ac341ef0deeb30f1d3a0c518e67a074869
2015-01-16sw: missing nullptr checkMiklos Vajna
As pointed out by JunitTest_sw_unoapi. Change-Id: Ia553dfb48215fab44f4899223c63ee454ff1c648
2015-01-16SwRootFrm::CheckViewLayout: never center pages when doing tiled renderingMiklos Vajna
The size of the root frame is usually the max of the page frame widths, except when the visual area is larger, in which case the root frame is the visual area width, and page frames are centered (when there is a single column). When doing tiled rendering, we are not interested in the gray area around the pages (not more than just having a gap between pages), so never do this centering. This has two benefits: 1) When painting the tiles, we change the visual area already to always have the given tile visible, that would undo this centering anyway, but changing the size of the root frame causes a pointless mass-invalidation. 2) When getting the size of the document, this way the width of the document (root frame) will independent from the visual area, i.e. it'll be always the same. Change-Id: Ib0d86bbe6c7b5a83646264a2f308624179ad6982
2015-01-16sw: invalidate after keypresses when we have a callbackMiklos Vajna
Ideally we could always just invalidate and paint when the main loop says so, but currently without priorities that can take some time. So just do the invalidate-then-paint when we have a callback that is listening to invalidations. Change-Id: I6a835a0a149ae01a4ece3a319dffbe81cd5bd3eb
2015-01-16Missing guard in SwXTextDocument::initializeForTiledRendering()Miklos Vajna
Change-Id: Ic0b09b13612e92ec069cb72a951431939b979715
2015-01-16coverity#1264391 help coverity out wrt Logically dead codeCaolán McNamara
This reverts commit 95f7a01621dd5cd62190c334fcdf02e3941fdcab. Change-Id: I1712553e592f1313a2591f7dae92453a4a85b7f2
2015-01-16fdo#86844 - CONTEXT MENU: Remove hyperlink not accessibleNiklas Johansson
At the moment Remove hyperlink is only shown when text is selected together with a hyperlink but not when you right click directly on a link. Let's reuse the logic from when edit hyperlink should be shown and append it to the currently working case where text and link is selected. Change-Id: I2524f1c3037f3101d24e592eadf2e7d5d66ab4f9 Reviewed-on: https://gerrit.libreoffice.org/13926 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>