summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2022-06-09Ignore warning C4723 for windows arm64 buildBalazs Varga
Tinderbox message from windows arm64 build: C:\cygwin\home\tdf\jenkins\daily_workspace\tb\src_master\include\basegfx\range\basicrange.hxx(276) : error C2220: the following warning is treated as an error C:\cygwin\home\tdf\jenkins\daily_workspace\tb\src_master\include\basegfx\range\basicrange.hxx(276) : warning C4723: potential divide by 0 LINK : fatal error LNK1257: code generation failed Change-Id: I86ce1a0ea6abdf46464dcac95b9b591120782a13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135523 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-06-09clang-tidy modernize-pass-by-value in editengNoel Grandin
Change-Id: Ibf912c597896a2ac0bf3ba8108f55c5018115bb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135501 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-08Fix typoAndrea Gelmini
Change-Id: I6463eb09c5bac07e6aa8e23b4b5eab06172ab2b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135514 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-06-08Related: tdf#149484 Display BOOLEAN literal string text additionsEike Rathke
Change-Id: Ifbaf0b18178091c3a340a7c4bc66f78397aadc18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135506 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-06-08VCL add vcl::WindowPosSize abstract classJan-Marek Glogowski
... and use it to remove a duplicate and simplify code. Should mostly be a refactoring, which was mainly done by some larger sed calls, except for the new API calls, which helped shrinking some LOC. All data is also now private. Originally two of the "replaced" "classes" had unsigned width and height and one had signed. Noel pointed out, that during calculations, the value might get negative temporarly, so this now settles with signed values. Still the set size should never be negative and this is enforced this way. Not sure that is what Noel had in mind. This also includes: - rename WindowState => WindowData - rename WindowStateMask => WindowDataMask - rename WindowStateState => WindowState - move WindowState and WindowDataMask to vcl/windowstate.hxx - move WindowData(Mask) and WindowState into vcl namespace - readability: replace or'ed WindowState enums with "meta" enums + add "meta" WindowState enums PosSize and PosSizeState Change-Id: Icd16cfb498531aa7238ddbde83fcb0ed6d9e4f77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135426 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-06-08DOC import: allow negative page border distancesMiklos Vajna
In case the margin (distance between body frame and page frame) is smaller than the border spacing (distance between border and page frame), then we can map that to a negative border distance during the import of DOCX files since commit 1f127a2b9e1c1daab0972f98fc8708ecb7afa299 (sw layout: allow negative page border distances, 2022-06-07), but DOC import had the same problem. The above commit intentionally kept the default behavior of BorderDistanceFromWord() unchanged to avoid side effects in other clients of that function (not DOCX import), but means that DOC import was still broken. Given that it turns out there are only 2 callers of BorderDistanceFromWord(), fix the problem by allowing negative border distances unconditionally: this simplifies code & SetBorderDistance() in the DOC import will now get the correct border distance out of the box. DOC export works out of the box without any additional work. Change-Id: I6bf15b3c73823c9265218b7b3a7b869e131818db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135484 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-06-07Resolves tdf#146928 - Redesign charnamedialogHeiko Tietze
Dialog was changed in d73602dc51aa8829fc88e5e67e2b0c4da6b8f715 to fit vertical size on small screens by placing Western/CJK/CTL into a notebook. But for CJK and CTL it's required to have Western fonts visible in parallel. * dual solution for western with nocjk and cjk dropped western scales to the dialog width if no CJK nor CTL is enabled * CJK and CTL placed in a notebook, Western as well for proper alignment * font names are presented in lists but size and style per simple dropdowns * info text sized at 80% * variables renamed to keep track of controls (old names kept in l10n descriotion) * UITests adjusted for variable names and tab positioning Change-Id: I45b40e9bc37565f6364f1dfc1b5d837270fe4644 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134666 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-06-07sw layout: allow negative page border distancesMiklos Vajna
Writer follows the CSS box model when it comes to page borders: there can be a positive distance between the edge of the page and the border, and again a positive distance between the border and the body frame. This ensures that the page border never intersect with the body frame, which is usually what users expect. Word, however, can work with 2 distances for border and text, both measured from the edge of the page, leading to a page border, which is inside the body text. This is described at great detail at <https://wiki.openoffice.org/wiki/Writer/MSInteroperability/PageBorder#Importing_case_3:>. Fix the problem by allowing negative border distances: this doesn't influence the position or the size of the body frame, but it gives us a way to position the border more towards the center of the page, leading the matching layout between Writer and Word. The doc model (to allow negative border distances), UNO API and DOCX filter is updated in this commit. The ODT filter works without explicit effort. Other filters are not yet updated in this commit. Change-Id: I723e1bdb8dc6391129f1686f88826cc089f6fd67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135462 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-06-06improve field nameNoel Grandin
Change-Id: I78c1670589c21c047ba7a2eede86e46643e88f69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135451 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-06add comments to SvtBroadcaster about field sizes/packingNoel Grandin
Change-Id: Ia01897ac1444e9ac905a0e383b892fa1478c2c33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135447 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-06Fix typosAndrea Gelmini
Change-Id: I36d81be6e591830ee3762a0d43357dbacd68ad93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135439 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-06-05cid#1504664 silence Operands don't affect resultCaolán McNamara
Change-Id: I9ec3ae0e8cb87ab8a98746b8e49fd3f969ea0bd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135437 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-05restore %PRODUCTNAME to accessible descriptions that need themCaolán McNamara
The original problem was that %PRODUCTNAME wasn't replaced for accessibility descriptions (which are reused for extended tips) under gtk. Universally querying all a11y descs on load to potentially replace %PRODUCTNAME in a11y descs at runtime led to tdf146971 which was a huge startup slowdown. The half way 7.3 fix was to leave a11y descs alone, but do the replacement when querying for the extended tip case. So the extended tooltips were ok, but screen readers would still say a raw "%PRODUCTNAME" text, hence the rewording effort to remove %PRODUCTNAME from the a11y descs entirely for 7.4. But there is now a few cases where some options paths exists in the a11y descs which is not exactly correct wrt to the text shown in the options dialog. Reworking the options dialog to not have %PRODUCTNAME there at all and updating everything to fit that sort of change would not be popular. So move the cases where a11y descs really should have %PRODUCTNAME in them out of the .ui files and into .hrc files and use specific set_accessibility_description calls for them via ResID which will do the %PRODUCTNAME replacement automatically. Hopefully the a11y runtime cost for just this handful of cases is negligible in the overall scheme of things. Change-Id: Ieb17d26fd581cd5804a52b371b3bb5ea43023aa3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135432 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-04Rectangle: move inline definition into functionsJan-Marek Glogowski
... and add GetPos() as TopLeft() alias. Change-Id: Ia2c169d40ed121e829802835011648281f48f585 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135424 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-06-03clang-tidy modernize-pass-by-value in svlNoel Grandin
Change-Id: I184efd7aee2c3eb02399100a4a7500951255d423 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135357 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-03Use more appropriate type for MultiSelection::nCurSubSel et alStephan Bergmann
(In MultiSelection::LastSelected, there is no need to set nCurSubSel (to a potentially negative value) before setting bCurValid to false, as nCurSubSel is only ever used after checking that bCurValid is true.) Change-Id: I3c23c89fbb7b4ef962436476f6576af9fe623fd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135354 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-03clang-tidy modernize-pass-by-value in cuiNoel Grandin
Change-Id: If3d2717c22e33412f813673a93ccc56d23ab2fa5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135348 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-03allow to dynamically show/hide notebook tabsCaolán McNamara
Change-Id: I19681d9bfcd91e205e684674d1ec8f0058c1eb91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135350 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-03implement "show-tabs" for TabControlCaolán McNamara
defaults to the current status of "true" Change-Id: Id4fa50d359e29fa3a7db845edbcb86a3b1caa790 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135345 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-02Use more appropriate type for LocationAccess::nOwnClassVectorIndexStephan Bergmann
Change-Id: Iba1709b60a27c331dcc6cf4e6f0966d94130a66c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135320 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-02clang-tidy modernize-pass-by-value in avmediaNoel Grandin
Change-Id: Ia579341951d3fa0a227cdfa888c380b032e2ee2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135312 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-02Use more appropriate return type for ThreadPool::getPreferredConcurrencyStephan Bergmann
All call sites already effectively asked for an unsigned return type, including: * The ThreadPool ctor took an nWorkers argument of type sal_Int32, but internally stores that as std::size_t mnMaxWorkers. * ZipOutputStream::reduceScheduledThreadTasksToGivenNumberOrLess apparently benefits from an unsigned nThreadTasks parameter, getting rid of various casts in its implementation that were necessary to silence signed vs. unsigned comparison warnings. The only drawback is that comphelper::ThreadPool::getPreferredConcurrency() * 4 in package/source/zippackage/ZipPackageStream.cxx would now silently wrap around instead of causing UB on overflow (which could be detected with appropriate tools). Ideally, it would use some o3tl::saturating_mul if we had that, so add a TODO comment for now. While std::thread::hardware_concurrency returns unsigned, it looked more natural to go with std::size_t here, as some call sites already used that (see above), so the implementation of ThreadPool::getPreferredConcurrency is a natural place to hide clamping std::thread::hardware_concurrency() to std::size_t (in the unlikely case that std::size_t is of smaller rank than unsigned). This required addition of o3tl::clamp_to_unsigned in o3tl/safeint.hxx. Change-Id: I0a04a8b32e63ebfeb39f924c4b38520455a6fb38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135309 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-02Revert "mark SvxFontItem as IsSortable"Noel Grandin
This reverts commit c390c2e3f44953e236389467c7c090cee9ebc1b7. Causes crashes like ./instdir/program/soffice --headless --convert-to pdf ooo30162-3.xls because code likes modifying items that are in existing pools. Change-Id: I988745a538509f90f357ec6a321b2e37828a4111 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135308 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-02clang-tidy modernize-pass-by-value in frameworkNoel Grandin
Change-Id: I024653154c51389bb27f3e94b422ff7fc1c9b46b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135296 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-02tdf#149420 sw offapi xmloff: add hyphenation zoneLászló Németh
Add hyphenation zone support, i.e. allow the specified amount of extra space in lines instead of forcing hyphenation. It's for limiting hyphenation, used especially with not justified paragraph alignment. Note: this is an OOXML interoperability feature, used also in DTP software and CSS. * Add checkbox to Text Flow in paragraph dialog * Store property in paragraph model (com::sun::star::style::ParagraphProperties::ParaHyphenationZone) * Add ODF import/export * Add ODF unit test * Add layout test Note: extend SvxHyphenZoneItem::GetPresentation() with missing No CAPS and No last word hyphenation options. Note: fix OSL_ENSURE condition in SwTextFormatInfo::GetHyphValues(). Follow-up to commit 29359fc15c435cec17987fd6221ab6833d38746e "tdf#149324 sw offapi xmloff: add option to not hyphenate short words". Change-Id: Ib8eff6ea98a9aa5ca6cb9d17faa0bbb789687ce9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135247 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2022-06-02Suppress false positive cid#1504594Stephan Bergmann
Change-Id: I9a4a20a2725a050b7e3d0aa38cb4568e7462926c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135287 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-02Resolves: tdf#149378 Force array input if outer function returns array/matrixEike Rathke
So the result will actually display as full matrix, or in the cell range marked prior to input, instead of just the top left element in one cell, without having to close the input with Shift+Ctrl+Enter to force array mode. The previous behaviour can be forced by pre-selecting/marking one cell, which also worked previously when closing as array input. Change-Id: I81c079ce02e0c8d0536617ca6882fb470a352441 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135278 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-06-01clang-tidy modernize-pass-by-value in filterNoel Grandin
Change-Id: Id55c90665eaa29ee2ece07606429411549e06b8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135242 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-01Introduce weld::IconView::insert_separatorMike Kaganski
Needed to eventual re-implementation of starmath's SmElementsControl using IconView. This required re-implementation of IconViewImpl, to layout entries by iteration, because now it's impossible to find an entry position just based on its index. This coincidentally fixed some visual glitches in non-gtk IconView implementation from commit 5813660e7bfe128ac076e592fe31de64a6863780 Author Szymon Kłos <eszkadev@gmail.com> Date Tue Feb 16 16:03:30 2016 +0100 icon view for RemoteFilesDialog where any selected element could become first in row when scrolling. SvTreeListBox::SetEntryHeight taking a SvTreeListEntry const* had to be renamed to CalcEntryHeight, to avoid both virtual and non-virtual overloads, additionally having different accessibility. A TODO is implement separators in GtkInstanceIconView. I couldn't find a GTK API for separators in IconView, so possibly a workaround would be needed with some non-selectable narrow elements. Change-Id: Ie8dc35d94049a1c48e4eb49697681ffbe93c17f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135112 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-06-01Implement weld::IconView::[gs]et_item_widthMike Kaganski
Change-Id: I211e3c21b4e0148c4ff6fc9931838e37ccd0cc41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134897 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-06-01Implement weld::IconView::connect_query_tooltipMike Kaganski
Change-Id: I8a8540e240d6a7046f564404c7c3b6bff8c2f04d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134806 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-06-01Fix commentStephan Bergmann
For one, the functions are already available in C++20. For another, our fallback implementation is only an approximation, as it doesn't enforce the requirement that the involved template types "are standard integer types or extended integer types" (but which is at least checked in --with-latest-c++ builds against standard libraries that already provide those C++20 functions). Change-Id: I91208c185f2db681cf25899d3cd9a9e2912d32a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135232 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-01sw content controls, date: add LOK APIMiklos Vajna
- send a LOK_CALLBACK_CONTENT_CONTROL with date=true when entering a date content control - extend lok::Document::sendContentControlEvent() to be able to set the date of a date content control (after the client's date picker is closed) - update gtktiledviewer to work with these Change-Id: I0abf21eb1d4ba233050f0aa2607b68740c048262 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135214 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-05-31elide temporary vector in TextDecoratedPortionPrimitive2DNoel Grandin
Change-Id: Ie3945d3a2e133d3ce527844f9c0d61a6541175e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135200 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-31clang-cl wants VCL_DLLPUBLIC SalLayoutGlyphsCache::clear not to be inlineStephan Bergmann
...to avoid > [build DEP] LNK:CppunitTest/test_vcl_text.dll.d > complextext.o : error LNK2019: unresolved external symbol "public: unsigned __int64 __cdecl SalLayoutGlyphsCache::GlyphsCost::operator()(class SalLayoutGlyphs const &)const " (??RGlyphsCost@SalLayoutGlyphsCache@@QEBA_KAEBVSalLayoutGlyphs@@@Z) referenced in function "private: void __cdecl o3tl::lru_map<struct SalLayoutGlyphsCache::CachedGlyphsKey,class SalLayoutGlyphs,struct SalLayoutGlyphsCache::CachedGlyphsHash,struct std::equal_to<struct SalLayoutGlyphsCache::CachedGlyphsKey>,struct SalLayoutGlyphsCache::GlyphsCost>::removeSize(class SalLayoutGlyphs const &)" (?removeSize@?$lru_map@UCachedGlyphsKey@SalLayoutGlyphsCache@@VSalLayoutGlyphs@@UCachedGlyphsHash@2@U?$equal_to@UCachedGlyphsKey@SalLayoutGlyphsCache@@@std@@UGlyphsCost@2@@o3tl@@AEAAXAEBVSalLayoutGlyphs@@@Z) (Not sure why MSVC itself doesn't complain; maybe LLVM 15 trunk clang-cl accidentally diverges from the MSVC semantics here.) Change-Id: I910fc309f9e02ec0794e449b97ba111d33dcbb54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135199 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-31Advanced Diagram support: UI visualization & simple interactionsArmin Le Grand (Allotropia)
Added visualization to show an imminently recognizable additional visualization for DynamicDiagrams that can also be used to show/hide the DiagramDialog by the user. It is also used as additional drag/move handle for the object. Change-Id: I56292cebe7c7a6f79be920c17edafdd7e453b6eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135183 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-05-31lok: add more efficient getSelectionType() replacementLuboš Luňák
The getSelectionType() function usually needs to be followed by a call to getTextSelection(), which means having them as two functions leads to duplicating to a number of calls, some of which may be somewhat expensive (pDoc->getSelection() e.g. for Calc builds another ScDocument for the selection, and then getFromTransferrable() converts that to the given format). Change-Id: Ib0a8844701d80eaaff4834dcd3633c09d6b921b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134603 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-05-31clang-tidy modernize-pass-by-value in basicNoel Grandin
Change-Id: I9034ab95a4ccb58e36e77d911dd33cc50857c03a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135176 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-31Use more appropriate type for comphelper::internal::OPropertyAccessor::nPosStephan Bergmann
Change-Id: Ia7055dcc3832002fd10ae23a35fd08df5a98ae40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135177 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-31tdf#147991 PPTX export: fix bullet indent regressionAttila Bakos (NISZ)
Instead of exporting the inherited master slide indent values of the placeholders, export 0 indent value for removed/disabled bullets to fix interoperability. Regression from commit f57cfddb51b7d7409b7b425dc200aa73406a13bd "tdf#145162 PPTX export: fix extra bullet regression". Change-Id: Icbf823adc07f19fd10d1a60da9cff17616a2aef6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135025 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-05-30these can be stack allocatedNoel Grandin
Change-Id: Ief9a0732d50af95d679d1d6b66dec9d2e2d141df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135132 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-30clang-tidy modernize-pass-by-value in unotoolsNoel Grandin
Change-Id: Ifa67ab7198f5d3b06171869f57703acdaa959f7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135128 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-30clang-tidy modernize-pass-by-value in sotNoel Grandin
Change-Id: I1ff31ae1291a82630ae32185077e369bbdfd3a0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135127 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-30cid#1504574 Resource leakCaolán McNamara
make an owner for the PropertyMapEntries Change-Id: Ie915a8a312f2b24488566814ad67fdeef89b5941 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135123 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-30framework: fix crash on Writer startup when using --enable-ext-wiki-publisherMiklos Vajna
As reported by Julien, once the mediawiki extension is installed, the xHandler in framework::DispatchProvider::implts_searchProtocolHandler() points to an UNO component implemented in Java, and we crash in dynamic_cast<>(), at least on Linux with gcc 7.5 and libstdc++. This dynamic_cast<>() call was added in commit c0fa456436947a5c167c652d19a884064b43c03d (tdf#149261 sdext: fix crash on starting the presenter console for the 2nd time, 2022-05-26), to allow the presenter console to opt out from protocol handler caching. It was expected that the proxy object created for a Java UNO component would simply return nullptr when we try to dynamic_cast<>() it down to a C++ interface. Fix the problem by moving the interface to an UNO one: this side-steps the dynamic_cast<>() crash at the price of introducing an UNO interface, which is not meant to be part of the public UNO API (but at least it's not published). It may still make sense to improve the bridges/ code at some stage to not crash in dynamic_cast<>() on generated Java proxy objects. Change-Id: Iaac44515339e0dc15dddc3be45ef7dee7331e47a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135114 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2022-05-30Related: tdf#89131 draw up/down spins disabled if value is at max/minCaolán McNamara
if there is a max/min set. Change-Id: I2dc7ccccad9ec2aa7eb89d8b5fa137e077a846fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135105 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-05-29New o3tl::intcmp.hxxStephan Bergmann
...introducing o3tl::cmp_equal etc. implementing C++23 std::cmp_equal etc., plus an o3tl::IntCmp wrapper around it for convenient operator syntax Change-Id: I1d2e0d1aef99c531039fb83de31ed8e6036fde03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135095 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-29we can std::move the data out of TextBreakupHelperNoel Grandin
and save some copying Change-Id: I34cbc2edfd53fcc440d1765dba471fcbb05b2b7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135088 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-29Improve some operator== involving OString,Stephan Bergmann
avoiding creation of temporary OString instances Change-Id: I27b4cb59b48b3ba40311a1f935a20250c8317d00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135093 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-29[API CHANGE] Deprecate unused typelib_setCacheSize and make it a no-opStephan Bergmann
...and simplify the remaining code using the (now const) nCacheSize Change-Id: I4468cf223c158a318ba56ba63f5f60121c94f42d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134879 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>