summaryrefslogtreecommitdiff
path: root/forms
AgeCommit message (Collapse)Author
2021-11-25remove unused defines and convert some to OUStringLiteralNoel Grandin
Also remove the associated links.txt entries Change-Id: I5028fab2feb828875a0b772418fc29cbdfe4ce72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125773 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-25loplugin:stringliteraldefine in formsNoel Grandin
Change-Id: Ia26f0c767030db0361758d2be37f01d30c7e1df9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125763 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23O[U]String::replaceAt overloads that take string_viewNoel Grandin
which results in lots of nice string_view improvements picked up by the plugins Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23remove ORowSetValue implicit conversion methodsNoel Grandin
in favour of the existing get*() methods. The get*() methods 0 or false or empty in the case of "null", which is exactly the same behaviour as the conversion methods. These implicit conversion methods cause lookup problems when combined with some upcoming OUString changes. And the code looks cleaner this way too, and has less magic when calling methods. Change-Id: Ieb4756bf693e83b996a32667fc1b955f89193496 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125690 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-22improve method namingNoel Grandin
Change-Id: I9a45839f6566caf41ccee2f8d149b4d0c60c3503 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125663 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-19loplugin:stringliteraldefine in toolsNoel Grandin
Change-Id: I348b9a844c009f9c19301baa76d31b12f67c6130 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125535 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-17tdf#145731: fix crash closing documentJulien Nabet
Regression from: https://cgit.freedesktop.org/libreoffice/core/commit/?id=73334560b2dd2d60ac58d2cc2b1a5295490b03e1 author Julien Nabet <serval2412@yahoo.fr> 2021-11-07 15:40:37 +0100 committer Julien Nabet <serval2412@yahoo.fr> 2021-11-07 21:58:53 +0100 commit 73334560b2dd2d60ac58d2cc2b1a5295490b03e1 (patch) tree b5bc4f69dd8ed455c78ea05ab1c5e2f3c25b909e parent 6be03ac71e0d4927612b4a57ead3d0b245c29c77 (diff) Replace some macros in forms part 16 Thank you Xisco for having spotted it! Change-Id: Ie0eb2a7e0e9f4c4fc12b83a233553a8713d6a6f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125420 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-08Replace some macros in forms part 17Julien Nabet
Remove FRM_RES_STRING + PROP + PROPERTY_FLAGS Change-Id: I11befedbe83ad9d7c3f3f4d689230ffe422c0770 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124830 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-07Replace some macros in forms part 16Julien Nabet
Remove DEFAULT_DECLARE_SUBTYPE + EXCEPT + EXPAND_PROP_INIT + DECLARE_DEFAULT_CLONE_CTOR + DECLARE_DEFAULT_LEAF_XTOR + FORWARD_TO_PEER_1 + IMPLEMENT_DEFAULT_CLONING + ADD_ENTRY (include removing: /home/julien/lo/libreoffice/forms/source/xforms/convert.cxx:56:14: error: unused function 'lcl_toXSD_bool' [-Werror,-Wunused-function] OUString lcl_toXSD_bool( const Any& rAny ) ^ /home/julien/lo/libreoffice/forms/source/xforms/convert.cxx:60:9: error: unused function 'lcl_toAny_bool' [-Werror,-Wunused-function] Any lcl_toAny_bool( const OUString& rStr ) ^ /home/julien/lo/libreoffice/forms/source/xforms/convert.cxx:67:14: error: unused function 'lcl_toXSD_double' [-Werror,-Wunused-function] OUString lcl_toXSD_double( const Any& rAny ) ^ /home/julien/lo/libreoffice/forms/source/xforms/convert.cxx:80:9: error: unused function 'lcl_toAny_double' [-Werror,-Wunused-function] Any lcl_toAny_double( const OUString& rString ) ^ ) Change-Id: I1e6923922b7037e8d1e9d009b05a27111c94b6fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124827 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-07Replace some macros in forms part 15Julien Nabet
Remove REGISTER_VOID_PROP + REGISTER_BOOL_PROPERTY_RO + REGISTER_PROPERTY_RO + REGISTER_PROPERTY + PROPERTY_RO + PROPERTY + REGISTER_PROPERTY_BOOL + REGISTER_BOOL_PROPERTY + REGISTER_PROPERTY_API Change-Id: Ia38d75e89aafc5788bc143aae864eac9ad5bb86d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124815 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-07Replace some macros in forms part 14Julien Nabet
Remove DEFAULT_IMPLEMNENT_SUBTYPE + SET_PROPERTY Change-Id: Ic1ab69076017eeb58cefb3dbecd385f1b862c031 Change-Id: I91230d25e8eb11c6c0dd6cec920c6bd5ec958bb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124808 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-07Replace some macros in forms part 13Julien Nabet
Remove DECLARE_DEFAULT_CLONING + IMPLEMENT_DEFAULT_TYPED_CLONING + DECLARE_XPERSISTOBJECT Change-Id: Ib874cadcfd30c3ac9e2d12036482868c19a2d98b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124807 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-06Replace some macros in forms part 12Julien Nabet
Remove IMPL_COLUMN Change-Id: I7446b1146853c7a3b0820a681793e0146921da0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124791 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-06Replace some macros in forms part 11Julien Nabet
Remove DECL_COLUMN Change-Id: Ie7533f8a52e7365215fbd878385f2bed0113b5aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124788 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-06Replace some macros in forms part 10Julien Nabet
Remove DECL_PROP_IMPL Change-Id: I4ba5e3252058b137cd314f0aed0caf60bb347852 Change-Id: Icfda67a31f465ebfe0c13761bdbdf9b024605dc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124785 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-06Replace some macros in forms part 9Julien Nabet
Change-Id: I3bd6e118455c8ce86650797e05b7e40ca066eb53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124784 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-05Replace some macros in forms part 7Julien Nabet
Remove BEGIN_DESCRIBE_PROPERTIES Change-Id: Ic1f52f21037e890c4f7143a1283f34101dbb737a Change-Id: I1bd902af7f634bb70313dda72b7a008bdda38f75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124782 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-05Replace some macros in forms part 8Julien Nabet
Remove END_DESCRIBE_PROPERTIES Change-Id: I844b71cd74f2b2c5306d0ad979ed56480892268c Change-Id: Ia0aa75a3042ecc47bf434afb0de971d35ab78dfa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124783 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-05Replace some macros in forms part 6Julien Nabet
Remove DECL_BOOL_PROP_IMPL + BEGIN_DESCRIBE_BASE_PROPERTIES Change-Id: I1a55c9de46ae741045002241a2b0f5dfa32db8c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124777 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-05Replace some macros in forms part 5Julien Nabet
Remove DECL_IFACE_PROP_IMPL + DECL_PROP0 + DECL_PROP2 Change-Id: I8bd0222244a4cb0db33fa890056bf00e240fb4fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124769 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-05Replace some macros in forms part 4Julien Nabet
Change-Id: Ic9310fcfa4fb3b1b7e64eaa2be3839ba89949a3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124723 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-04Replace some macros in forms part 3Julien Nabet
Remove DECL_BOOL_PROP1 + DECL_BOOL_PROP2 Change-Id: I8a07ac7b2b8ab724d5277a11b37cf10a6711fdb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124664 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-03Replace some macros in forms part 2Julien Nabet
DECL_PROP4 + REGISTER_PROP_2 + REGISTER_PROP_3 + REGISTER_VOID_PROP_2 Change-Id: Ib7fdfed9f94fe0bb2c3f4f1398bc058af84823d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124615 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-02Replace some macros in formsJulien Nabet
DECL_IFACE_PROP2 + DECL_IFACE_PROP3 + DECL_IFACE_PROP4 + DECL_BOOL_PROP3 Change-Id: Ibfe652001f4e914cad364222bcaf38dec69298e5 Change-Id: I432e045b9d071d61cd142bca66f40233cd59ef0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124564 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-30Prepare for removal of non-const operator[] from Sequence in formsMike Kaganski
Change-Id: I2b7bd7935d7e620b9f283ec7c0548beeb97c140d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124366 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
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-14use std::vector::insert instead of push_backNoel Grandin
because it will pre-allocate space and often is optimised to memcpy Change-Id: I03ed7915f2762d3d27e378638052a47a28bbf096 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123588 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-10-11loplugin:moveparam in formsNoel Grandin
Change-Id: Ib3a6058e933eb7030cd6d7aef335f12fbd4e6bd3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123417 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-03drop 'using namespace std' in desktop, e*, f*Julien Nabet
Change-Id: I277dc957798093001f9a3935f97db8ac0314e6a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123022 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-09-28gives names to all the Idles and TasksNoel Grandin
enforce it by making the constructor parameter non-default. Change-Id: I321543e4dcf15ea0a43ad8cce91d2f8dc22df6ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122766 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-28vcl: rename OutDevState to StackChris Sherlock
I have moved the header file to include/vcl/rendercontext as this will eventually be part of the RenderContext split from OutputDevice. State and associated enums have also been moved to the vcl namespace. I have also moved ComplexTextLayoutFlags into the vcl::text namespace. Change-Id: I0abbf560e75b45a272854b267e948c240cd69091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121524 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-09-24make it possible to build required database stuff for fuzzingCaolán McNamara
The dbase filter requires dbaccess and connectivity but I don't want to pull in the rest of the stuff that --disable-database-connectivity currently disables that we still don't need for fuzzing if --disable-database-connectivity is removed Change-Id: Ia48d42295f9724b4dd2d3beb8e46ed23fc789f5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122579 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 5Mike Kaganski
- Revise uses of getSomething to use getFromUnoTunnel Where that is impossible, use getSomething_cast to unify casting, and minimize number of places doing low-level transformations. The change keeps the existing tunnel references that last for the duration of the pointers' life, because sometimes destroying such reference may destroy the pointed object, and result in use after free. Change-Id: I291c33223582c34cd2c763aa8aacf0ae899ca4c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122101 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 4Mike Kaganski
- Change implementations of getSomething to use getSomethingImpl Or where that's impossible, use getSomething_cast to unify this and reduce number of places where we reinterpret_cast. All static methods getting tunnel ids were renamed to getUnoTunnelId, to comply with the convention used in <comphelper/servicehelper.hxx>. TODO (in separate commits): - Revise uses of getSomething to use getFromUnoTunnel Change-Id: Ifde9e214b52e5df678de71fcc32d2199c82e85cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122100 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 3 [API CHANGE]Mike Kaganski
- Replace all uses of OImplementationId in core with UnoIdInit - Deprecate OImplementationId in <cppuhelper/typeprovider.hxx> OImplementationId uses broken double checked locking; additionally, it uses it at the first call to getImplementationId, not when the object is constructed. This implementation can't be changed, cince it's part of published API; it can't rely on C++11, which would be required for use of thread-safe statics and move the initialization to ctor. The class has obsolete _bUseEthernetAddress member, that is unused and ignored since 4e9fa7e339a1cd6cb2fec643715991bcf5057cec. No need to implement it when replacing its uses to UnoIdInit. The deprecation is the API CHANGE. No published API is introduced to replace it; 3rd-party code should seek alternative solutions, or just keep using the deprecated functionality. TODO (in separate commits): - Change implementations of getSomething to use getSomethingImpl - Revise uses of getSomething to use getFromUnoTunnel Change-Id: I8b6e684e5389bc0d5bb3b7f21f72a4c8f684107d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122077 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-15Use <comphelper/servicehelper.hxx> implementing XUnoTunnel part 1Mike Kaganski
The header got some changes: 1. Move UnoTunnelIdInit and isUnoTunnelId into 'comphelper' namespace 2. Rename UnoTunnelIdInit to UnoIdInit, as a precondition to replace of uses of OImplementationId with it, including in XTypeProvider 3. Introduce convenience functions 'getSomething_cast' to cast between sal_Int64 and object pointers uniformly. 4. Rename getUnoTunnelImplementation to getFromUnoTunnel, both to make it a bit shorter, and to reflect its function better. Templatize it to take also css::uno::Any for convenience. 5. Introduce getSomethingImpl, inspired by sw::UnoTunnelImpl; allow it handle cases both with and without fallback to parent. 6. Adjust UNO3_GETIMPLEMENTATION_* macros TODO (in separate commits): - Drop sw::UnoTunnelImpl and sw::UnoTunnelGetImplementation - Replace all uses of OImplementationId in core with UnoIdInit - Deprecate OImplementationId in <cppuhelper/typeprovider.hxx> - Change implementations of getSomething to use getSomethingImpl - Revise uses of getSomething to use getFromUnoTunnel Change-Id: If4a3cb024130f1f552f988f0479589da1cd066e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122022 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-12Simplify ORichTextModel's XUnoTunnel implementationMike Kaganski
Change-Id: I0d0e724c4da705f0f56dec41448a8312c4ffd37d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121975 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-08convert some OSL_ENSURE -> assertNoel Grandin
where we are just provide checking for a following static_cast. I'd rather have an explicit assert failure than a random crash Change-Id: Iab6c6b056341018deaa74b78b075e564f72c58d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121814 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-02rename UpdateMode -> UpdateLayout in editeng classNoel Grandin
... because "update" is such a generic term I keep forgetting what we are turning on and off Also return the previous value from SetUpdateLayout to make the save/restore code more compact. Change-Id: Iae1764c837a92e58c9b17521f130e8fc80311d22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121479 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-01clang-tidy:readability-redundant-member-initNoel Grandin
Change-Id: I67edbea77b12940ac807ccbadfd74b250902809d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121378 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-30tdf#74702 vcl: introduce GetSystemTextColor()Chris Sherlock
Also rename DrawFlags to SystemDrawColorFlags, added a unit test. Change-Id: I3cb74b278e43561d1055b3b55b9730cdbdea51aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113559 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-23loplugin:referencecasting look through more clang TypesNoel Grandin
Note that because of where the fix resides, loplugin:redundantcast also notices a few more things. Change-Id: I0b66047fadfff2c5ceafcbd3eab085de00d861a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120865 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-20New loplugin:unusedcapturedefaultStephan Bergmann
In sc/qa/unit/ucalc_formula.cxx, dropping the capture-default from the lExpectedinF lambda revealed that MSVC in C++17 mode (i.e., when building without --with-latest-c++) requires ROW_RANGE (a local const int variable from the enclosing TestFormula::testTdf97369) to be captured, even though all uses of that variable within the lambda body are constant expressions. That is still true at least for the latest Visual Studio 2019 version 16.11.1. (This is not an issue for the lExpectedinH and lExpectedinI lambdas a few lines further down, as they, in addition to using that ROW_RANGE, also use the local const double variables SHIFT1 and SHIFT2, whose uses are not constant expressions, so they are implicitly captured and loplugin:unusedcapturedefault does not suggest dropping those lambdas' capture-defaults in the first place.) Change-Id: Iee7efb485187cbe8eba6a2d470afca4993eb1816 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120693 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-13split SvNumberFormatter into it's own headerNoel Grandin
so I can make changes without running into cyclic dependencies between header files Change-Id: I98a91c7cc66002ba745cdb8239e5cc267922a45c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120412 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-10Missing includeStephan Bergmann
(for std::unique_ptr, with recent libstdc++ 12 trunk) Change-Id: I61b7823dd740ea7cdfe0d7403a50ac73b24d1c4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120229 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-05Pass context and resource string down to boost::locale separatelyNoel Grandin
because this is often on a hot path, and we can avoid the splitting and joining of strings like this. Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-21IsVertical->IsEffectivelyVertical, GetDirectVertical->GetVerticalMike Kaganski
Before commit 653b53287ca09a9ffe3f5ce0242919e719c1086c, editengine objects had a pair IsVertical/SetVertical, which queried and set a boolean flag (and SetVertical also had a second argument to set another flag). The mentioned commit had introduced an inconsistency, changing SetVertical to only set a single flag, but at the same time making IsVertical to return a synthesized result from two values: vertical and rotation. Additionally, GetDirectVertical was introduced to complement SetVertical. In many places, the use of synthetic IsVertical looks suspicious, especially where it is used in combinations with SetVertical. But here I don't change existing logic, and only rename the methods, so that in case someone sees an actual problem, it would be easier to spot the method mismatch. The end result is that now we have a proper getter/setter pair GetVertical/SetVertical, and also IsEffectivelyVertical, named to reflect that it calculates its return value. Change-Id: I38e2b7c5bd7af0787dd7a1c48e1385138dac80b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119315 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-07-12tdf#126665 Remember last used file picker directorySamuel Mehrbrodt
This introduces internal tracking of last used directories. Each caller of the file picker can pass a "context". The selected directory will then be saved & restored when opening the file picker with the same context again. After ffa636ba74b04b3258ec9a696bc4eac33581fa24 , the Windows file picker no longer tracks the last used directory itself. This is a replacement and an improvement at the same time, since there is not one global last used directory, but one per context. Change-Id: I10650cfb9359922690954fa65c89b4e47477e2c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118597 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-06-17use string_view in the Translate APINoel Grandin
Change-Id: I0bb0ea9d39ed623928060ffd3f2e2bc36ba33209 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117272 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>