path: root/test/source
AgeCommit message (Collapse)AuthorFilesLines
2022-05-03Just use Any ctor instead of makeAny in testStephan Bergmann6-16/+16
Change-Id: I926cabc8be39344ec254e87b429f4d1bc8cfc94f Reviewed-on: Tested-by: Jenkins Reviewed-by: Stephan Bergmann <>
2022-05-03tdf#99708 Save formula bar height to documentSamuel Mehrbrodt1-0/+10
Save the current state of the Calc formula bar to the document. Number of visible lines is saved into the document settings and restored when loading that document. Also adds a UNO property, so that the formula bar height can be changed via UNO. Change-Id: Ifef0c9e42cb4f7465516629d2c22974367e0eb33 Reviewed-on: Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <>
2022-05-01use more string_view in variousNoel Grandin1-2/+3
found by examining uses of OUString::copy() for likely places Change-Id: I6ff20e7b273ad6005410b82719183c1122f8c018 Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
2022-04-29move HAVE_EXPORT_VALIDATION from config_features.hLuboš Luňák1-1/+1
So that so much stuff doesn't get rebuilt on --with-java change. Change-Id: I87388590a4fd218fd22e68ba0edd290831f6f0fb Reviewed-on: Tested-by: Jenkins Reviewed-by: Luboš Luňák <>
2022-04-10loplugin:stringview check for getToken and trimNoel Grandin1-2/+3
since we now have o3tl versions of those that work on string_view. Also improve those o3tl functions to support both string_view and u16string_view Change-Id: Iacab2996becec62aa78a5597c52d983bb784749a Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
2022-04-04sc: add support for xr2 namespace and read uid of sparkline groupTomaž Vajngerl1-0/+2
Change-Id: I470819a89338f4fb1d9b2486ffb4d93f8eb42844 Reviewed-on: Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <>
2022-04-02Recheck modules t* with IWYUGabor Kelemen1-2/+1
See tdf#42949 for motivation Change-Id: I109fa07d52721fd10354de07a2ed995ffa2f27c5 Reviewed-on: Tested-by: Jenkins Reviewed-by: Thorsten Behrens <>
2022-03-07Fix some DPI-dependent testsMike Kaganski1-0/+6
Change-Id: I3c669802ac558379498c877c8ac4796bbff80f82 Reviewed-on: Reviewed-by: Xisco Fauli <> Reviewed-by: Mike Kaganski <> Tested-by: Jenkins
2021-11-29tdf#132145: Synchronize ScAppCfg with configurationMike Kaganski1-36/+13
Change-Id: Iadf5ff86d043f63355fd30816a9e2011479465c0 Reviewed-on: Tested-by: Jenkins Reviewed-by: Mike Kaganski <>
2021-11-28tdf#132145: Synchronize ScPrintCfg with configurationMike Kaganski1-44/+30
Change-Id: I903e8277fea5c223081244ae30dff31bbda7d554 Reviewed-on: Tested-by: Jenkins Reviewed-by: Mike Kaganski <>
2021-11-27tdf#132145: Synchronize ScInputCfg with configurationMike Kaganski1-103/+58
Change-Id: I45cc9b6c8cbd9205e185bebff97644f53f5cf0af Reviewed-on: Tested-by: Jenkins Reviewed-by: Mike Kaganski <>
2021-11-12make it explicit whether to ignore the result of getLOKPayload()Luboš Luňák1-4/+6
Returning an empty string to signify 'ignore' was a poor design, as some messages types actually may have valid empty messages. Change-Id: Ia82d3d97d150bc5ef412a1bd4b1091d9b2d84385 Reviewed-on: Tested-by: Jenkins Reviewed-by: Luboš Luňák <>
2021-10-31Prepare for removal of non-const operator[] from Sequence in testMike Kaganski21-84/+82
Change-Id: I9f2c0deda676b10377b0a4572d26422cb0d8b807 Reviewed-on: Tested-by: Jenkins Reviewed-by: Mike Kaganski <>
2021-10-25use pull model also for LOK text selectionLuboš Luňák1-1/+1
Make LOK_CALLBACK_TEXT_SELECTION, LOK_CALLBACK_TEXT_SELECTION_START, LOK_CALLBACK_TEXT_SELECTION_END and LOK_CALLBACK_TEXT_VIEW_SELECTION also use pull model, i.e. LO core will only set a flag and when CallbackFlushHandler needs the actual data it'll use getLOKPayload(). This again avoids a large number of messages passed to CallbackFlushHandler only for them to be sooner or later discarded. Change-Id: Ia7528039be996a6e9e8491b4eba3f4133582fa56 Reviewed-on: Tested-by: Jenkins Reviewed-by: Luboš Luňák <>
2021-10-24change some LOK internal updates to be pull model instead of pushLuboš Luňák1-6/+115
Some LOK messages may get called very often, such as updates about cursor position. And since only the last one matters, they get generated every time, which costs some time, and then later except for one they get all discard again from CallbackFlushHandler queue, which again costs time. Change the model to instead only set an 'updated' flag, and CallbackFlushHandler will request the actual message payload only before flushing. This commit changes LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR and LOK_CALLBACK_INVALIDATE_VIEW_CURSOR to work this way. Change-Id: I376be63176c0b4b5cb492fbf529c21ed01b35481 Reviewed-on: Tested-by: Jenkins Reviewed-by: Luboš Luňák <>
2021-10-22properly flush LOK invalidations in testsLuboš Luňák1-1/+18
This should be done always before doing something with a flag related to the invalidations. Use an idle timer for simplicity, tests already usually process to idle. Change-Id: I979900da28061cc690ecbcce023dbb769239f205 Reviewed-on: Tested-by: Jenkins Reviewed-by: Luboš Luňák <>
2021-10-22better name for a function overloadLuboš Luňák1-2/+2
It's better to add to the name what the overload does rather than just have a "mysterious" extra int. Change-Id: Iff89679c4a978a4596ac662ef74e934cdefefc9e Reviewed-on: Tested-by: Jenkins Reviewed-by: Luboš Luňák <>
2021-10-22revert unittests to use plain text-based LibreOfficeKitCallbackLuboš Luňák1-0/+55
At least for now it seems that the more complex SfxLokCallbackInterface is just an unnecessary complication for unit tests. The performance doesn't matter, and handling all the specialized callbacks makes things more complicated. In the future it'd be also useful to make the tests (optionally?) use also CallbackFlushHandler as the provider of the messages, in order to test CallbackFlushHandler more thoroughly, so perhaps in the end it makes more sense to keep unit tests using the plain text interface. This reverts unittest-related parts of 3b729db05553c1a6d461fb41c89 and adds a smaller wrapper callback class that converts messages from SfxLokCallbackInterface to LibreOfficeKitCallback format. Change-Id: I6c14f0be4ed7b777444b131140be54188d309cca Reviewed-on: Tested-by: Jenkins Reviewed-by: Luboš Luňák <>
2021-10-15Remove non-const Sequence::begin()/end() in internal codeMike Kaganski1-1/+1
... 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: Tested-by: Jenkins Reviewed-by: Stephan Bergmann <> Reviewed-by: Mike Kaganski <>
2021-10-14Avoid COW overhead using css::uno::SequenceMike Kaganski1-1/+1
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: Tested-by: Jenkins Reviewed-by: Mike Kaganski <>
2021-10-09Typo: *adress* -> *address* (except from not translated German parts)Julien Nabet1-21/+21
Change-Id: I62e12aed5bc67119433c39ff333f69b79944dca3 Reviewed-on: Tested-by: Jenkins Reviewed-by: Julien Nabet <>
2021-10-02tdf#144758: default value for 'table:orientation' attribute is 'row'Mike Kaganski1-1/+1
See [OpenDocument-v1.3-part3] section 19.690.3 <table:database-range>. Regression after commit ed88b144ce24b9a733d4a9ab6614307c96537baa. Also fixes relevant part of unit test first introduced in commit 6069ef7976c4455c1875afecf02c41c5731f6546, which was at that time testing that IsSortColumns property returned false; then in commit fc95d20500997a1a460be6f3553727299a5080eb, the correct value was changed to true, reflecting the regression fixed here. Change-Id: I6a12a0ad13405bc388efb7c2c3bbf31e89905620 Reviewed-on: Tested-by: Mike Kaganski <> Reviewed-by: Mike Kaganski <>
2021-09-06clang-tidy:readability-redundant-member-initNoel Grandin1-2/+1
Change-Id: I8590d67f064dd74da42c0e3bf543f2aadbd2b893 Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
2021-08-24test: capture stderr of odfvalidator tooMichael Stahl1-1/+1
It will be used when is merged. Change-Id: I78d2b52ffc05fdd446ea7b673c2a7ebab26efc2a Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
2021-07-21Avoid external processes picking up instdir/program/libnspr4.soStephan Bergmann1-0/+16
...which is a problem in ASan builds, as seen with a failing CppunitTest_sd_import_tests (among lots of other similarly failing tests): > Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-11-openjdk- ~/lo/core/instdir/program/ undefined symbol: __asan_option_detect_stack_use_after_return > at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method) > at java.base/java.lang.ClassLoader$NativeLibrary.load( > at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary( > at java.base/java.lang.ClassLoader.loadLibrary0( > at java.base/java.lang.ClassLoader.loadLibrary( > at java.base/java.lang.Runtime.loadLibrary0( > at java.base/java.lang.System.loadLibrary( > at java.base/$ > at java.base/$ > at java.base/ Method) > at java.base/<clinit>( > at java.base/ > at java.base/$ > at java.base/$ > at java.base/ Method) > at java.base/<clinit>( > at java.base/<init>( > at java.base/$ > at java.base/$ > at java.base/ Method) > at java.base/ > at java.base/<clinit>( > at java.base/ > at java.base/<init>( > at java.base/java.util.UUID$Holder.<clinit>( > at java.base/java.util.UUID.randomUUID( > at org.probatron.officeotron.sessionstorage.Store.putZippedResource(Unknown Source) > at org.probatron.officeotron.CommandLineSubmission.<init>(Unknown Source) > at org.probatron.officeotron.Driver.main(Unknown Source) > warn:svl.items:1258842:1258842:svl/source/items/itempool.cxx:358: old secondary pool: EditEngineItemPool of pool: XOutdevItemPool must be empty. > ~/lo/core/test/source/bootstrapfixture.cxx:232:SdImportTest::testDocumentLayout > equality assertion failed > - Expected: 0 > - Actual : 256 > - failed to execute: sh ~/lo/core/bin/ ~/lo/tmp/SdImportTest__testDocumentLayout_16w8dw.tmp > ~/lo/tmp/SdImportTest__testDocumentLayout_16w8dy.tmp The solution reuses the arg-env bootstrap variable already used by test::OfficeConnection::setUp (unotest/source/cpp/officeconnection.cxx) and for that makes test::getArgumnet available outside Library_unotest. (For simplicity, it adds the relevant gb_CppunitTest_add_arguments calls unconditionally to the various *.mk files, even though the data is only used conditionally for non-_WIN32 in test::BootstrapFixture::validate in test/source/bootstrapfixture.cxx, at least for now.) Not sure what exactly started to cause this issue now for my ASan builds on Fedora 34. Change-Id: I7a4d6c0e36b94935442c6c91d5ee967fcad61763 Reviewed-on: Tested-by: Jenkins Reviewed-by: Stephan Bergmann <>
2021-07-15Fix UB calling operator<<(std::basic_ostream) with nullptrMike Kaganski1-2/+2
This resulted in segfault instead of a useful test failure message. Was this way ever since 548b360c0e4693aac0cbdd2fcc1aab433fc54010, and before in 6e31cbb4eaea3c6600248ba59a22853acc1d6606 and 9791453283407a0a129a71767a290058ac759da2. Change-Id: I498d1c84a4eaf3e8180dedd67d1176cf6f8c1a60 Reviewed-on: Tested-by: Jenkins Reviewed-by: Mike Kaganski <>
2021-07-11editengine-columns: tdf#143258 Fix handling rotated textMike Kaganski1-1/+1
This reverts modifications to existing unit tests made in commit d0a1616ccad0dd5f5a02c1b0204f537b57d0b4b5. My idea that those changes were required because of more correct calculations was wrong, and in fact they were caused by off-by-1 error in height calculations. Change-Id: Ib94878a911238c977c35a8f8e3e5694cedc79a89 Reviewed-on: Tested-by: Jenkins Reviewed-by: Mike Kaganski <>
2021-07-01tdf#142871 sw HTML export: avoid unwanted inner PNG for imagesMiklos Vajna1-1/+4
Regression from commit e76471c5ce725dae9abb6f78b7674c6f77df34f4 (sw XHTML / reqif export: export non-PNG graphic shapes directly, 2021-06-02), reqif wants to have a PNG fallback for non-PNG pixel formats, but this is not needed for plain HTML, make this reqif-only. Change-Id: I0fc1bc13ad4bf808afbe68407e7db802f910c7a7 Reviewed-on: Reviewed-by: Miklos Vajna <> Tested-by: Jenkins
2021-06-10schema: update to ODF 1.3 OSMichael Stahl1-3/+3
Change-Id: I97e28612aeeebed709da9ad621250c6b26e55f92 Reviewed-on: Tested-by: Jenkins Reviewed-by: Michael Stahl <>
2021-06-08chart2: use registerOOXMLNamespaces and registerODFNamespacesXisco Fauli1-0/+2
Change-Id: I2ee15ec29fbf5fc4fcaea035a9cd99ba49453a4e Reviewed-on: Tested-by: Jenkins Reviewed-by: Xisco Fauli <>
2021-06-08editengine-columns: Implement layoutMike Kaganski1-1/+1
This changes the way how different parts access positions of lines and paragraphs. Now there is ImpEditEngine::IterateLineAreas, which performs uniform iteration over all ParaPortions and lines in order, calling a user-provided callback function for each portion and line; it passes all information about current portion, line, area, and column to the callback, and checks the return from the callback, to decide if it needs to continue iteration (in case when callback indicated that if doesn't need further data), and if it needs calling the callback for the rest of current portion's lines. This allows to have the code that calculates and iterates dimensions of lines in one central place, without the need to have duplicating logic in several places. One important exception is ImpEditEngine::Paint, which iterates without ImpEditEngine::IterateLineAreas, because it does many atomic paint operations in different points of iteration process, and implementing ImpEditEngine::IterateLineAreas to call callback in the required places would require increased complexity, which is left for a future change. To make that possible, ImpEditEngine::IterFlag should be extended to indicate additional requirements. Note that in fact, ImpEditEngine::Paint was taken as the model for implementation of ImpEditEngine::IterateLineAreas, with its detailed handling of all the vertical offsets like additional line spacing and interparagraph spacings that depend on context. The notable result of the centralization of the iteration code is slight change of heights reported by ImpEditEngine::CalcTextHeight. Previously it simply added all pre-calculated heights of portions, and not taking into account all the spacing handling that ImpEditEngine::Paint did, which was inconsistent (calculated height was different from painted height). Now ImpEditEngine::CalcTextHeight should provide more accurate results, which required small changes in the unit tests. Change-Id: I33cbb978deb974b314d36fda8674186a03991107 Reviewed-on: Tested-by: Jenkins Reviewed-by: Mike Kaganski <>
2021-06-07sd: use registerOOXMLNamespaces and registerODFNamespacesXisco Fauli1-1/+16
While at it, fix incorrect r:Relationships with rels:Relationships Change-Id: Ia8e6556b0e7d3839e00936626627471a7a276071 Change-Id: I77f950dabd4d2131256673e517625d31ade9aa76 Reviewed-on: Tested-by: Jenkins Reviewed-by: Xisco Fauli <>
2021-06-04sc: use XmlTestTools::registerOOXMLNamespaces()Xisco Fauli1-0/+14
after 1ba1bb1cacdc8825d01559859100a2b575967e55 <test: introduce XmlTestTools::registerOOXMLNamespaces() to reduce copy&paste> Change-Id: I5f8fcb977233c30bae74e7cc9fde45d41a523b85 Reviewed-on: Tested-by: Jenkins Reviewed-by: Xisco Fauli <>
2021-06-04test: introduce XmlTestTools::registerOOXMLNamespaces() to reduce copy&pasteMiklos Vajna1-0/+58
sc/ could potentially benefit from this as well, that's not yet done here. Change-Id: I03d0b4afa21a02c74d34aab6e03ab53991df29dd Reviewed-on: Tested-by: Jenkins Reviewed-by: Miklos Vajna <>
2021-04-21loplugin:stringadd replace OUStringLiteral temporaries with OUString::ConcatNoel Grandin1-13/+13
Change-Id: I656f06a74d9f0180ae460264563d6a935c7d2c60 Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
2021-04-12getXPathNode may return nullptrMike Kaganski1-0/+1
E.g., when "Undefined namespace prefix" error is thrown Change-Id: I9dfcf761dc8463e2679fb41962502689c91cd2f7 Reviewed-on: Tested-by: Jenkins Reviewed-by: Mike Kaganski <>
2021-04-09tdf#119457 - check for a valid range name and cell referenceAndreas Heinisch1-0/+7
Change-Id: If23eda52142ba5e59cfd354f2177b1ac1727efaa Reviewed-on: Tested-by: Jenkins Reviewed-by: Andreas Heinisch <>
2021-04-01Exclude tests based on device color depth, not RDPMike Kaganski1-0/+9
After 5c9ba1f47d00ed10960b59928befd68f6c020b15, the failures on Jenkins (see 21191d0d8953a3ca6eac6022c0a14a87fe9c5e2a) made it apparent that (at least some of) Jenkins builds also run in RDP sessions. Since the tests excluded in commit 9c6142ec26a0ba61b1cf58d1e6bf0b5376394bcd never failed in Jenkins builds before, it is wrong to exclude all those tests in all RDP sessions: our CI would not test those on Windows. In the meanwhile, I discovered that the system that failed the tests actually had 16-bit color depth, despite RDP being configured to use 32-bit colors; that was the reason why the colors were modified on roundtrip. So it is better to test the actual problem to exclude tests. This reimplements the check that was introduced in commit 9c6142ec26a0ba61b1cf58d1e6bf0b5376394bcd to test default virtual device color depth. Change-Id: I329a3e2d8eca21732c77dcacf15394d1246b2e18 Reviewed-on: Tested-by: Mike Kaganski <> Reviewed-by: Mike Kaganski <>
2021-03-26Extract copy&pasted namespace list to XmlTestTools::registerODFNamespaces()Miklos Vajna1-0/+74
Both sw/ and xmloff/ can depend on test/, so no need to duplicate this. Change-Id: I93bfdb4422bdef9f8d28bc37548130fae49829e9 Reviewed-on: Tested-by: Jenkins Reviewed-by: Miklos Vajna <>
2021-03-25const OUString -> const OUStringLiteralMike Kaganski6-23/+23
Mostly automated rewrite Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1 Reviewed-on: Tested-by: Jenkins Reviewed-by: Mike Kaganski <>
2021-03-05tdf#139734 Remove redundant asserts after functions loadFromDesktop and loadMoaz1-3/+0
MacrosTest::loadFromDesktop itself asserts on its return value. Thus, the additional checks in unit tests are redundant, and only create noise unrelated to the tested functionality. SwModelTestBase::load calls SwModelTestBase::loadURL which calls loadFromDesktop from within. Change-Id: I30061bbc6e13e05f0cfbf17a7910926070b996f3 Reviewed-on: Tested-by: Jenkins Reviewed-by: Mike Kaganski <>
2021-02-24Fix typoAndrea Gelmini1-2/+2
Change-Id: I98757c517d54d38ac96bc80ddb030d00ddfbb1e2 Reviewed-on: Tested-by: Jenkins Reviewed-by: Julien Nabet <>
2021-02-20loplugin:refcounting in testNoel1-13/+10
Change-Id: I1e741283bffae6c3e40f4e61aaed5c085997c74f Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
2021-02-17loplugin:referencecasting in test..toolkitNoel4-13/+11
Change-Id: Ia290ff4849f4d7eda978c7b1e2c7f36de744056f Reviewed-on: Tested-by: Jenkins Reviewed-by: Noel Grandin <>
2021-02-08Improve loplugin:cppunitassertequal for CPPUNIT_ASSERT(a && b)Stephan Bergmann3-8/+8 re-enabling the code temporarily #if'ed-out in a528392e71bc70136021be4e3d83732fccbb885e "Fixed/improved loplugin:cppunitassertequals" (and which then triggers lots of other lopglugin:cppunitassertequal CPPUNIT_ASSERT -> CPPUNIT_ASSERT_EQUAL warnings). For two css::uno::Reference equality comparisons in cppu/qa/test_any.cxx, it was more straightforward to rewrite them with an explicit call to operator == (which silences loplugin:cppunitassertequal) than to adapt them to CPPUNIT_ASSERT_EQUAL's requirement for arguments of identical types. In sc/qa/unit/ucalc_pivottable.cxx, ScDPItemData needs toString, which has been implemented trivially for now, but might want to combine that with the DEBUG_PIVOT_TABLE-only ScDPItemData::Dump. Change-Id: Iae6d09cf69bd4e52fe4411bba9e50c48e696291c Reviewed-on: Tested-by: Jenkins Reviewed-by: Stephan Bergmann <>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann7-21/+22
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: Tested-by: Jenkins Reviewed-by: Stephan Bergmann <>
2020-12-11Adapt the remaining OUString functions to std string_viewStephan Bergmann1-4/+4
...for LIBO_INTERNAL_ONLY. These had been missed by 1b43cceaea2084a0489db68cd0113508f34b6643 "Make many OUString functions take std::u16string_view parameters" because they did not match the multi-overload pattern that was addressed there, but they nevertheless benefit from being changed just as well (witness e.g. the various resulting changes from copy() to subView()). This showed a conversion from OStringChar to std::string_view to be missing (while the corresponding conversion form OUStringChar to std::u16string_view was already present). The improvement to loplugin:stringadd became necessary to fix > [CPT] compilerplugins/clang/test/stringadd.cxx > error: 'error' diagnostics expected but not seen: > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd] > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd] > 2 errors generated. Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279 Reviewed-on: Tested-by: Jenkins Reviewed-by: Stephan Bergmann <>
2020-12-11Strength-reduce some OUStringToOString("..."+...)Stephan Bergmann3-6/+8 "..."+OUStringToOString(...), in preparation of making OUStringToOString take a std::u16string_view Change-Id: Ic01ca249d4d0eb58ac959ffdf96471308a3715dc Reviewed-on: Tested-by: Jenkins Reviewed-by: Stephan Bergmann <>
2020-12-10Avoid calling OString ctor with null pointerStephan Bergmann1-1/+3 preparation of potential future changes from using OString to using std::string_view, where OString has an undocumented feature of allowing construction from a null pointer. This is mostly the result of a manual audit of potentially problematic getenv calls across the code base. But there can be other problematic places too, like the xmlGetProp call in tools/source/xml/XmlWalker.cxx. To identify those, rtl_{string,uString}_newFromStr aborts now in non-production debug builds when a null pointer is passed(and all places that hit with a full `make check screenshot` have been addressed here). Once we are confident that all problematic places have been identified, we should drop support for the undocumented feature (see the TODO in sal/rtl/strtmpl.cxx). Change-Id: I595cc6d4f1cda74add2a3db171323f817d362b08 Reviewed-on: Tested-by: Jenkins Reviewed-by: Stephan Bergmann <>
2020-11-26Introduce BootstrapFixture::IsDefaultDPI convenience functionMike Kaganski1-0/+7
It should be used to conditionally disable tests that are unreliable in non-default-DPI environments. The workaround implemented by use of the function should be temporary, until a proper fix is found. Change-Id: Ie236226fcfd0ffb054149efc2b7a1727506c4ad0 Reviewed-on: Tested-by: Jenkins Reviewed-by: Mike Kaganski <>