summaryrefslogtreecommitdiff
path: root/sw/inc/textboxhelper.hxx
AgeCommit message (Collapse)Author
2018-04-18sw: fix some IWYU warningsMiklos Vajna
Change-Id: Idff219e1c8f18adaa0f445a5469650c7793cae3a Reviewed-on: https://gerrit.libreoffice.org/53066 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-22sw: clang-format textboxhelperMiklos Vajna
This was more or less consistent before, but the recent automatic rewrites broke consistency, just give up on manual formatting here. Change-Id: Ieb387e3d7230d227e33ba0b420cfa572309c5330 Reviewed-on: https://gerrit.libreoffice.org/50119 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-12-22tdf#42949 Fix some Include What You Use warningsMiklos Vajna
Change-Id: I30121764303579a7cb4ded0f0f48cc1f8fff6c33 Reviewed-on: https://gerrit.libreoffice.org/46946 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-12-19Get rid of a dynamic_castTor Lillqvist
Add a virtual member function instead. This improves performance a bit. The time to load a specific pathological customer document dropped from 1min 53s to 1min 47s on my machine. Not hugely, but clearly. Change-Id: I1e59d601e9d0e14b6a756c6e0ad29ce2a1fce66d Reviewed-on: https://gerrit.libreoffice.org/46791 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-10-23loplugin:includeform: swStephan Bergmann
Change-Id: Ifc3c4c31a31ee7189eeab6f1af30b94d64f2f92a
2017-08-07Indentation fixesMiklos Vajna
These files had a consistent style before, let's keep them that way. Change-Id: If64773d8c29dee23638e4fb9b7e5b69b34d47e49
2017-08-03loplugin:constparams in sw part2Noel Grandin
Change-Id: I51ae0e8caaf46f141d3d15ace47612df1e476de7 Reviewed-on: https://gerrit.libreoffice.org/40735 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-26RTF filter: use 'using' instead of 'typedef'Miklos Vajna
Change-Id: Ie7182fa30155a8090421cf9a669525be99f0e0a7 Reviewed-on: https://gerrit.libreoffice.org/38042 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-26Remove dynamic exception specificationsStephan Bergmann
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-19New loplugin:dynexcspec: Add @throws documentation, swStephan Bergmann
Change-Id: I2da2ce4cd247e7b9f973150917b4ee7bd7a0e0c4
2016-08-29Indentation fixesMiklos Vajna
Change-Id: I903fcd36878cd0b74757805bcbdb414feb713d7b
2016-08-29loplugin:passstuffbyrefStephan Bergmann
Change-Id: I0c14b9bca3259b9d24e1d869878872d930f1ff0e
2016-08-29Remove now unused SwTextBoxHelper functionsJan-Marek Glogowski
Change-Id: I39500424c79040b1887ea74081fdf0ea0bc5f009
2016-08-29Add convenience function getOtherTextBoxFormatJan-Marek Glogowski
Since we already have isTextBox to identify a text box, this just adds a call to SwFrameFormat::GetOtherTextBoxFormat() to actually return the corresponding SwFrameFormat. This gets rid off all the remaining occurences of the SwFrameFormat / Textbox sets and maps. Change-Id: Id5f05a1ff71e604658e7d8a0d0825f5671335b3f
2016-08-29Switch isTextBox to use the format pointersJan-Marek Glogowski
This replaces all possible occurences of the text box format maps, which just want to know, if a SwFrameFormat is part of a text box to use the direct lookup via the isTextBox, which is now a cheap call. Change-Id: I3b4e2301f816aead1b719cd70a8ef118e685ccfc
2016-04-22Avoid reserved identifiersStephan Bergmann
Change-Id: I27ff0f4f0eb395d7e0a60dd604758c220a3134c4
2016-04-12clang-tidy performance-unnecessary-value-param in swNoel Grandin
Change-Id: I3e030743b640d5a5f6b3bf4a4e9ba50ccd001287
2016-04-01tdf#99004 SwAnchoredObjectPosition: handle textboxes when determining surroundMiklos Vajna
Writer TextBoxes are always wrapped "through", so that they can appear inside their shapes. However, the surround of the shape may influence its position. So when surround is asked for anchor position purposes, take the surround of the TextBox's "parent" shape instead of the one of the TextBox directly. With this, the TextBox in the bugdoc is properly positioned inside its parent shape as expected. (The problem only happens when at least two shapes are anchored to the same paragraph.) Change-Id: I0cf8a41080e6759aa395c119d862c4be79574d66 Reviewed-on: https://gerrit.libreoffice.org/23720 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2015-11-25bin/rename-sw-abbreviations.shlibreoffice-5-1-branch-pointRobinson Tryon
This commit renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I77e5134f42f25e3786afa36b7a505c7e3237a9e8
2015-05-20bin/rename-sw-abbreviations.shlibreoffice-5-0-branch-pointChristian Lohmaier
renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
2014-11-28SwAnchoredObjectPosition::_GetHoriAlignmentValues: fix position of textboxesMiklos Vajna
The problem was that the right edge of the textbox was outside the parent draw shape, which is unexpected for rectangle shapes. Change-Id: I5154a61b07d3d8d894491e76923b3b017aa3ce8e
2014-11-20fdo#85554 SwXShape: fix getting ZOrder property when doc contains TextBoxesMiklos Vajna
Change-Id: I9b6b83f0f6d627bb14a880a19769ee70564cf52b
2014-10-31Add a SwTextBoxHelper::findTextBoxes() variant that takes an SwNodeMiklos Vajna
This method is called by the ODF export for each paragraph, so limiting the result for TextBoxes anchored to a single paragraph helps to avoid iterating over all the frames for each paragraph. For a test document of 2000 mail merge records and 16 frames, the times for css::text::MailMerge::execute() are 8m18.811s -> 7m53.575s. Change-Id: I7a9cd7b23a3e903059ec0ae3a6a8f8309681bb2e
2014-08-15SwTextBoxHelper::findTextBoxes: return a set of const pointersMiklos Vajna
Change-Id: I8e3ea996959bad72e6d15dc9c980ea9d18d31fb3
2014-08-15SwTextBoxHelper::findTextBox: take a const SwFrmFmtMiklos Vajna
Change-Id: I531a5864f61ab6c9bfcfc44f7fcacef58ad78489
2014-06-25Let SwTextBoxHelper::findTextBoxes() return a setMiklos Vajna
The intention was to have a container where it's fast to look elements up, and list is a linked list, so it doesn't fit. Change-Id: I3196c8dee96ecd4a6f464b74fd5141b27f1773b8
2014-06-24Add SwTextBoxHelper::findShapesMiklos Vajna
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-19SwDoc::SetFlyFrmAttr: sync position between draw shape and its textboxMiklos Vajna
The effect of this is that if you move around a shape (having a textbox) with the keyboard or mouse, then the position of the textbox is now also adjusted as you would expect it, as a user. Change-Id: Ie079f8c7b76e9a97095e4233eded5bda514cf405
2014-06-13SwXShape: add ChainName UNO propertyMiklos Vajna
Shapes may not have a unique name, but TextFrames always have. So in order to be able to link shapes with textboxes, provide a ChainName property that's the name of the underlying TextFrame. This kills two birds with one stone: - we can have a unique name for each shape - the names can be used for TextFrame linking, as they are valid TextFrame names Change-Id: Ie96f267d392d9fe5388c5eacff9b873f1639054c
2014-06-13SwDoc::CopyFlyInFlyImpl: factor out textbox code into SwTextBoxHelperMiklos Vajna
Also, let the new SwTextBoxHelper::restoreLinks() restore also the RES_CNTNT of the *old* draw formats, not only the link between the new draw and fly formats. This allows properly preserving the link between draw and fly formats, when they are in the header (and so copied in and out variously). Change-Id: I101ff06533e2ea27abea8bed171ed69c9649ebe8
2014-06-06SwTextBoxHelper::findTextBox: add an UNO versionMiklos Vajna
Export filters don't have access to SwXShape, and it's probably good to have that way. Change-Id: I039bafec10d2fde7c7acdcfad5b07068a2a519f1
2014-05-30SwTextBoxHelper: handle size when it's set before CustomShapeGeometryMiklos Vajna
E.g. the ODF import won't set an explicit size, it'll just set a Transformation property, and a CustomShapeGeometry one, which contains the textbox rectangle. Change-Id: I9ac7ab5a324dc9c7c5ce3196fee8d257b7426f41
2014-05-29SwTextBoxHelper::syncProperty(): no need to pass the property nameMiklos Vajna
Change-Id: Ic2f6ae15fd81826d2bc6f8796e33c3c93b34e240
2014-05-29SwTextBoxHelper::create(): initialize positionMiklos Vajna
The situation is a bit more complicated here, drawing::XCustomShapeEngine returns the text rectangle in absolute coordinates, but that's on the drawpage. So count the relative coordinates, and then just adjust the position we got from the original shape. Change-Id: Ibfbc183e5170037c8c281d61ce802a19a7acda17
2014-05-28SwTextBoxHelper: extract getTextRectangle() from syncProperty()Miklos Vajna
Change-Id: I6265247593571ffba4cbda7f87bdde1e943aff51
2014-05-27let SwTextBoxHelper::findTextBoxes() take a const SwDocMiklos Vajna
Change-Id: Icb1540b93f4117999b755d4d5fd387f1228250aa
2014-05-27SwXDrawPage::getByIndex(): ignore textboxesMiklos Vajna
Change-Id: I643ca4268e15af1882adb168af152835ef216cd9
2014-05-27SwXDrawPage::getCount(): ignore textboxesMiklos Vajna
Change-Id: I579cc0242f6901175162b169813e4465d52952a0
2014-05-27SwXShape: return the right XText implementaation in the TextBox caseMiklos Vajna
Change-Id: Iac31bd4b3b1918f857feff9045df473e9b1d3d2b
2014-05-27SwXShape: allow setting TextBox property to falseMiklos Vajna
Change-Id: I23d79fc3f5c020c86296bfc84bb0824e1ca68228
2014-05-27SwXShape: new bool TextBox propertyMiklos Vajna
Change-Id: Iae588c817ea17b6b2c2d3f2818ee5f94ed6f4e96
2014-05-27Initial SwTextBoxHelperMiklos Vajna
Change-Id: I2674d72a2ba7bf49f102e09ed8435445c9687bb2