summaryrefslogtreecommitdiff
path: root/sw/source/ui/envelp
AgeCommit message (Collapse)Author
2024-11-28tdf#163913 Implement font-relative marginsJonathan Clark
This change adds loext:margin-left and loext:margin-right, which implement margins that support font-relative units. See tdf#36709 for additional details. Change-Id: I31b0dd2b6f98cb5b02fd4dca3608db6fdee4054c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177473 Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-11-24Turn SW_MOD macro to a functionMike Kaganski
Change-Id: Ide1f6fd2fc8a80b31353a14e416505a2349cea2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177071 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-08no need to take a copy of the getProcessComponentContext return valueNoel Grandin
we can just take a "const &". (found by running clang-tidy with the performance-unnecessary-copy-initialization warning) Change-Id: I20fd208c65303da78170b1ac06c638fdf3aa094b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176267 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-09-16use more concrete UNO types in swNoel Grandin
Change-Id: I2650eff8bd5bb222c123255a7e3cb4aa3c36fc10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-07-14cid#1608453 COPY_INSTEAD_OF_MOVECaolán McNamara
Change-Id: I059fb6a6b3af58ecedcf14c347adbb698348da1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170441 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-06-14loplugin:ostr in swNoel Grandin
Change-Id: Ibc8c3ce70d572e2e07ee6ae1e46996943cf90a5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168840 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-05-09WaE: C6011 Dereferencing NULL pointer warningsCaolán McNamara
Change-Id: I37166c03ffd0f8f76ddc03ce556b6e6341a02b48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167355 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-10tdf#146619 Drop unused 'using namespace' in: sw/Gabor Kelemen
Change-Id: I56463130ab617b0e11e237718cb8456913373818 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165696 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-01-31make char properties dialog asyncNoel Grandin
Change-Id: I5bba9b50cc1a34944afea28458f57bd51047433e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162344 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-27ITEM: Cleanup some Pool stuff with DefaultsArmin Le Grand (allotropia)
Sorted out some methods at ItemPool which process Defaults to make more clear what is going on and what which method is doing. Change-Id: I2568d3e03d0a56a14b6fe4e04521e1a8e22c000b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162643 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-12-18[API CHANGE] tdf#158041 Remove unused SinglePrintJobs config option from swSamuel Mehrbrodt
This is handled by the print dialog directly Change-Id: Ieb4221d97444216f332501da9a3aba7dc6b8500a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160762 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-10-02tdf#146619 Recheck include/s* with IWYUGabor Kelemen
Change-Id: Ia0a6330278b044f448c9928362308aadc8fc9a20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156989 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-06-26new loplugin:constexprliteralNoel Grandin
OUStringLiteral should be declared constexpr, to enforce that it is initialised at compile-time and not runtime. This seems to make a different at least on Visual Studio Change-Id: I1698f5fa22ddb480347c2f4d444530c2e0e88d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153499 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-06SvtCommandOptions only supports CMDOPTION_DISABLEDNoel Grandin
CMDOPTION_NONE is just ignored, so remove this parameter Change-Id: If9de22a6b0522620a267cbc92b118f79e200d999 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152671 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-02Avoid conversions between OUString and OString in VCLMike Kaganski
Standardize on OUString, which is the main internal string class. Convert from/to OUString only when communicating with respective external APIs. Removes about 200 conversions from the code. Change-Id: I96ecee7c6fd271bb76639220e96d69d2964bed26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149930 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-16De-static-izing colors in SwViewOptionParis Oplopoios
The view colors in SwViewOption were static which means that two separate views couldn't have different colors Change-Id: Id595b00ba56bdb210ad1a784cf76e99ead0d6014 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148481 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-02-24tdf#78510 sw,cui: split SvxLRSpaceItem for SwTextNode, SwTextFormatCollMichael Stahl
Leave editengine and non-paragraph usages of SvxLRSpaceItem as-is for now. Add new items RES_MARGIN_LEFT etc., order them so that paragraphs can have 3 consecutive items RES_MARGIN_FIRSTLINE..RES_MARGIN_RIGHT and non-paragraphs also have 2-4 consecutive items RES_MARGIN_RIGHT..RES_MARGIN_LEFT (only the 3 paragraph ones are actually used now). The HTML import filter is particularly annoying because it parses CSS stuff into SfxItemSets without knowing where the items will be applied, so it can't know whether to create SvxLeftMarginItem or SvxTextLeftMarginItem... the split items are created in ParseCSS1_* functions and then converted later if necessary. WW8 import has some weird code as well, SwWW8ImplReader::Read_LR() creates 3 items and then something wants to set every item on its own so SwWW8FltControlStack::SetAttrInDoc() turned out rather weird. Convert the paragraph dialog to handle the split items (by mapping them to SID_ATTR_PARA_FIRSTLINESPACE/SID_ATTR_PARA_LEFTSPACE/ SID_ATTR_PARA_RIGHTSPACE), but the SvxRuler looks a bit more confusing so convert in sw shells for now and leave that for later (also unclear if changing these slot items like SID_ATTR_PARA_LRSPACE breaks any ABIs?). Change-Id: I40431821868fd3e1cceba121b5539ff9ae6befbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147024 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-10-26crashreporting: crash in area tab page with insert, envelopeCaolán McNamara
insert, envelope, format, addressee: format: edit: paragraph, area, click on gradient, bitmap, etc. Change-Id: I121674776662b31dc4e3cf96fbeb2c1d234ae00e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141864 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-17sw: prefix members of SwSvxNumBulletTabDialog, SwTableTabDlg, ...Miklos Vajna
SwTemplateDlgController and SwXSelChgLstnr_Impl See tdf#94879 for motivation. Change-Id: I84d1ba98798a375f8bd138276b5bff45b005d6fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141438 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-10-16tdf#143148 Use pragma once in sw/source/ui/envelpOmkarAcharekar
Change-Id: Iff490b1ceb0bd73aa61fd7a92367d1e71b9f84ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141422 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-09-26sw: prefix members of SwInsTableDlg, SwRenameXNamedDlg, SwSaveLabelDlg ...Miklos Vajna
... and SwSectionPropertyTabDialog See tdf#94879 for motivation. Change-Id: Id622c7880e978e1631d235a8fe04cb2976bbcd2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140583 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-09-19sw: prefix members of SwFootNoteOptionDlg, SwLabPrtPage, SwMailMergeDlg ...Miklos Vajna
... and SwMailMergeWizard See tdf#94879 for motivation. Change-Id: I01521a5b96e45483bb810ea0e8cfb26cbf55bc40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140133 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-09-05sw: prefix members of SwChangeDBDlg, SwEditRegionDlg, SwLabFormatPage ...Miklos Vajna
... and SwLabPage See tdf#94879 for motivation. Change-Id: Ic3208b78883e4926bd7bde836b1cf4b51c8a02e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139396 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-08-29sw: prefix members of SwAuthorMarkPane, SwCaptionDialog, ...Miklos Vajna
... SwConvertTableDlg and SwLabDlg See tdf#94879 for motivation. Change-Id: I9a8be0c3f5763ea0fb9119960eb799b6ff7a0a4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138956 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-08-22sw: prefix members of NumberingPreview, SwDocStatPage, SwEnvDlg and ...Miklos Vajna
... SwTestTabPage See tdf#94879 for motivation. Change-Id: Ie60001ada507d5355715ebaaed3897de9854f7d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138655 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-06-10tdf#148978: Business Cards in Writer dont show databaseJulien Nabet
+ remove "medium" tab since its goal is exactly what "label" tab does. So now "label" tab is common for "File - New - Business Cards" and "File - New - Labels" Change-Id: I9c7f4e74d7cbc0ffa8ee146a0ef39c87ff5261e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135566 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-03-28Recheck sw/ cxx files with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I8a8df68946297fad517b753d73e4373203a45ed6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132150 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-03-11use more SfxItemSet::GetItemIfSetNoel Grandin
Change-Id: I58af59d82d92c89ca1939d35f9fb4121b6815559 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131336 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-07Simplify sequences uses in sw (2)Julien Nabet
Change-Id: Ic4b3136414d778990e179e36162ca61327cb13f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129578 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-15Remove non-const Sequence::begin()/end() in internal codeMike Kaganski
... to avoid hidden cost of multiple COW checks, because they call getArray() internally. This obsoletes [loplugin:sequenceloop]. Also rename toNonConstRange to asNonConstRange, to reflect that the result is a view of the sequence, not an independent object. TODO: also drop non-const operator[], but introduce operator[] in SequenceRange. Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-14Avoid COW overhead using css::uno::SequenceMike Kaganski
The scenarios are: 1. Calling sequence's begin() and end() in pairs to pass to algorithms (both calls use getArray(), which does the COW checks) 2. In addition to #1, calling end() again when checking result of find algorithms, and/or begin() to calculate result's distance 3. Using non-const sequences in range-based for loops, which internally do #1 4. Assigning sequence to another sequence variable, and then modifying one of them In many cases, the sequences could be made const, or treated as const for the purposes of the algorithms (using std::as_const, std::cbegin, and std::cend). Where algorithm modifies the sequence, it was changed to only call getArray() once. For that, css::uno::toNonConstRange was introduced, which returns a struct (sublclass of std::pair) with two iterators [begin, end], that are calculated using one call to begin() and one call to getLength(). To handle #4, css::uno::Sequence::swap was introduced, that swaps the internal pointer to uno_Sequence. So when a local Sequence variable should be assigned to another variable, and the latter will be modified further, it's now possible to use swap instead, so the two sequences are kept independent. The modified places were found by temporarily removing non-const end(). Change-Id: I8fe2787f200eecb70744e8b77fbdf7a49653f628 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123542 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-22Extend loplugin:stringviewparam to starts/endsWith: swStephan Bergmann
Change-Id: I7271bba6c61a56be15335c81d8950a29a07eb6d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122473 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-07-19Move svl::Items to include/svl/whichranges.hxx, and unify its usageMike Kaganski
... in WhichRangesContainer and SfxItemSet ctors. Now it's not needed to explicitly use 'value' in WhichRangesContainer's ctor, or create an instance for use in SfxItemSet ctor (svl::Items is already defined as a template value of corresponding type). Instead of WhichRangesContainer Foo(svl::Items<1, 2>::value); SfxItemSet Bar(rItemPool, svl::Items<1, 2>{}); now use: WhichRangesContainer Foo(svl::Items<1, 2>); SfxItemSet Bar(rItemPool, svl::Items<1, 2>); Change-Id: I4681d952b6442732025e5a26768098878907a238 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119157 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-07-16Move validity check to svl::Items, to avoid invalid WhichRangesContainerMike Kaganski
This uncovered lots of pre-existing invalid ranges, e.g. introduced in commit 6dbfbebad37fd84208e4c336f0864d26019db153, or in much older commit 46952138c938730afcc3607e1a524bb590b0e30e. Also this makes the static in svl::Items to be array of WhichPair, to avoid questionable reinterpret_cast in WhichRangesContainer ctor. Change-Id: I86030b2a2ac0a6d98870f8f7f5cc83e071c6597c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119003 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-07-15WhichRangesContainer, reduce malloc in SfxItemSetNoel Grandin
SfxItemSet shows up in perf profiles frequently, and the hottest part is the malloc of the two arrays we need. But most of the time, one of those arrays is a compile-time constant. So this change introduces (*) WhichRangesContainer, which manages whether the SfxItemSet owns the array it points at or not. (*) a static const member in svl::Items (idea from mkaganski) to store the data. Change-Id: Icb8cdbc4d54fd76739565c575e16a744515e5355 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118703 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-21bundle the FolderPicker instantiations behind a single callCaolán McNamara
in prep to add parent support Change-Id: I2aa4b9343f895ae866f600dd3260b7fdc4e1efec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117579 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-17drop the bare set_busy_cursor, the scoped WaitObject is enoughCaolán McNamara
to set it back to its default on leaving the scope Change-Id: I303c201a1830ef24955fe35ad1058d6d88067f4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117394 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-21sw: replace most static_cast<sal_uInt16>() calls with o3tl::narrowing()Miklos Vajna
o3tl::narrowing() is a better way to handle this, as that way the integer conversion is still implicit, which allows detecting integer truncation at runtime (with suitable compiler flags). Change-Id: I499abda3be6943e8c111c56df390e72939586221 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115948 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-05-21add Toggleable as a separate thing to a ButtonCaolán McNamara
and inherit ToggleButton from both it and Button Change-Id: If0e500aca8d0ffa087cb5e2bfc1786372fbff4eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115921 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-20split handlers into button click and radiobutton toggleCaolán McNamara
Change-Id: I375d75518b09a14dd3a5033f2be394fb3e891838 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115866 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-20use toggle instead of click for CheckButtonCaolán McNamara
Change-Id: I6a80946481ee6fc40b2ee207a64287d1a5f96110 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115864 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-09Recheck include/ with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: Ifc253bf800bb1468b5774663a93f4fb30bec81d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113657 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-03-25const OUString -> const OUStringLiteralMike Kaganski
Mostly automated rewrite Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-01-20weld the dialog parent for best cleanupCaolán McNamara
Change-Id: I4e43a7e891077ab257419d57093383c07311bd5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109650 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-24tdf#42949 Fix new IWYU warnings in directory swGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I4bb84c3f401aba8a3dede9cec3a7f2187a2ba02a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106473 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-19tdf#123936 Formatting files in module sw with clang-formatPhilipp Hofer
Change-Id: I6243bc95129bf81a124d006ce0fc1aa1b5f618bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105718 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins
2020-11-11make tools::Long 64-bit on Windows platformNoel Grandin
This is only for the 64-bit windows platform. I don't see the point in messing with the 32-bit platforms, they are (a) become more and more rare (b) unlikely to even have enough available process memory to load extremely large calc spreadsheets The primary problem we are addressing here is bringing Windows-64bit up to same capability as Linux-64bit when it comes to handling very large spreadsheets, which is caused by things like tools::Rectangle using "long", which means that all the work done to make Libreoffice on 64-bit Linux capable of loading large spreadsheets is useless on Windows, where long is 32-bit. The operator<< for tools::Rectangle needs to be inside the tools namespace because of an interaction with the cppunit printing template stuff that I don't understand. SalPoint changed to use sal_Int32, since it needs to be the same definition as the Windows POINT structure. Change-Id: Iab6f1af88847b6c8d46995e8ceda3f82b6722ff7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-20use tools::Long in swNoel
Change-Id: I44be72b3a9b14823ec37a3c799cffb4fb4d6e1de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-28'Jaket' -> EnvelopeCaolán McNamara
Change-Id: Idcf95141ca4169fa0c1580c99a7e51a3df77f640 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103535 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>