summaryrefslogtreecommitdiff
path: root/libreofficekit/qa/gtktiledviewer/gtv-main.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libreofficekit/qa/gtktiledviewer/gtv-main.cxx')
0 files changed, 0 insertions, 0 deletions
4f0b52809091511dc01005fdbfeafd521b4bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137048 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-05-31these can be stack allocatedNoel Grandin Change-Id: Idd2e5e49ba4fcef2e80fd9c569f374a6a69f380e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135175 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2022-03-01Recheck modules s[f-t]* with IWYUGabor Kelemen See tdf#42949 for motivation Change-Id: I1f520aad1b1c942ad5616d96851016fc366ac58f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130203 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@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-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> 2020-12-01OSL_FAIL.*exception -> TOOLS_WARN_EXCEPTIONNoel Change-Id: I6800e23ead2767d245d5da71d2d40e0f8a6d7e1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106859 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2020-04-27Make upcasting css::uno::Reference ctor require complete typesStephan Bergmann The main reason for the "home-grown" UpCast introduced with 904b3d1fceee5827076758ed2a81f80cb73493ca "Up-cast conversion constructor for css::uno::Reference" in 2013 was probably that we could not yet rely on C++11 std::is_base_of back then. A (welcome) side effect was that the derived class could be incomplete. However, specializations of UpCast relying on whether or not T2 is incomplete are obviously an ODR violation if the type is incomplete in some TUs and complete (and derived from T1) in others. And even if UpCast had internal linkage, it would still be brittle that its behavior depends on the completeness of T2 at the point of the template's instantiation, and not necessarily at the point of use. That means we should better base that ctor on std::is_base_of (which we can do now since 39a1edd6fec902ef378acce8af42c4d7fba280d0 "Make css::uno::Reference upcast ctor LIBO_INTERNAL_ONLY"), which causes a compilation error at least on Clang and GCC if the completeness requirements are not met. This change fixes all the cases where types need to be complete now, plus any resulting loplugin:referencecasting warnings ("the source reference is already a subtype of the destination reference"). Change-Id: Ieb9e3552e90adbf2c5a5af933dcb872e20661a2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92950 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2020-01-24loplugin:makeshared in sfx2Noel Grandin Change-Id: I54492b9c9bb7aaf4aed4846c68ff3545695430f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87331 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2020-01-13tdf#42949 Fix IWYU warnings in sfx2/source/[d-n]*/*cxxGabor Kelemen Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I9e5e767f916d317761ac9a19124c19b822226ff5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86152 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> 2019-11-28Resolves: tdf#129082 insert sheet from file failsCaolán McNamara since... tdf#127958 crash adding 2 or more files into writer master document commit 8f6f9e4217d03d874fb1ce391730a1c893ab6844 Date: Mon Oct 7 09:40:41 2019 +0200 used the SfxItemSet copy ctor to make a copy of the itemset, but the orig itemset was a SfxAllItemSet not a SfxItemSet. an SfxAllItemSet allows all items to be added but a plain SfxItemSet only allows items in certain ranges to be inserted. Upshot is that later on the filename property cannot be set in the itemset, so file can't be opened. since... tdf#128898 import text from file with text-decode failed commit cc4dbe473b0b68dbe120065c1d6a64a087f41ba2 Date: Wed Nov 27 11:47:57 2019 +0200 tdf#128898 import text from file with text-decode failed these are std::shared_ptr so we can return to passing in the original SfxAllItemSet again to fix the problem Change-Id: I63a4230a96f9dae7726d854297ebb2b51df4868d Reviewed-on: https://gerrit.libreoffice.org/84024 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> 2019-10-07tdf#127958 crash adding 2 or more files into writer master documentNoel Grandin clean up the memory management here, the SfxMedium wants to own the passed-in SfxItemSet Change-Id: I1bafa520ca7b833c4d2df7593649c3720c46e2ce Reviewed-on: https://gerrit.libreoffice.org/80332 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2019-07-29Simplify Sequence iterations in sfx2Arkadiy Illarionov Use range-based loops, STL and comphelper functions Change-Id: I6a0d18493db7a25e8b41925f2d45cb221b5065a7 Reviewed-on: https://gerrit.libreoffice.org/76074 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com> 2019-05-03Use hasElements to check Sequence emptiness in sfx2..svxArkadiy Illarionov Similar to clang-tidy readability-container-size-empty Change-Id: Icabd773f3b924d465b33e8581175f1fcf70c282e Reviewed-on: https://gerrit.libreoffice.org/71704 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-12-18use unique_ptr in SfxMediumListNoel Grandin fixing leak in SwGlobalTree::DialogClosedHdl Change-Id: I4a8e883bfe62181d4e332b3a0bbb85bbb332f711 Reviewed-on: https://gerrit.libreoffice.org/65333 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-11-19tdf#42949 Fix IWYU warnings in include/vcl/[ab]*Gabor Kelemen Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: If18c80fc64e55d797953e24e40e5d5e62bd9c625 Reviewed-on: https://gerrit.libreoffice.org/63453 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> 2018-10-24weld AdvancedSettingsDialogCaolán McNamara make run virtual and fold executes into it, so GenericUnoDialog can call run on tabdialogs to do the right thing, and allows Start_Impl to be private again Change-Id: Ic457edfbdc7457f4c49d4e8ad679903f38ad9b42 Reviewed-on: https://gerrit.libreoffice.org/62227 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> 2018-09-17New loplugin:externalStephan Bergmann ...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2018-09-10loplugin:simplifyconstruct in sfx2..starmathNoel Grandin Change-Id: I9fbdd23ad61773e57aaf7d70fd19d05a50b8d399 Reviewed-on: https://gerrit.libreoffice.org/60238 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-08-16pass SfxMedium around by std::unique_ptrNoel Grandin Change-Id: Ibde7b68d9248f80d5304991390a80742265f37b3 Reviewed-on: https://gerrit.libreoffice.org/59031 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-08-08loplugin:useuniqueptr in SfxApplication::LoadTemplate and SfxMediumNoel Grandin pass SfxItemSet around by std::unique_ptr Change-Id: I54da96d8df224f7c4f2fb9ebf06ed32d479298e7 Reviewed-on: https://gerrit.libreoffice.org/58649 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-04-06weld linkeditdialogCaolán McNamara which enables changing FileDialogHelper over to welded Change-Id: I988342a6574cb7ed09b2724929e8c7117474a56c Reviewed-on: https://gerrit.libreoffice.org/52388 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> 2018-03-20drop unnecessary includesCaolán McNamara Change-Id: I1a817d5575bbd57ecaa874a27158b9218e4210cc Reviewed-on: https://gerrit.libreoffice.org/51603 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> 2018-03-09inherit welded dialogs from a common ancestorCaolán McNamara Change-Id: Ifa6c871a134cf89bfba71b1049a115cf7c953c42 Reviewed-on: https://gerrit.libreoffice.org/50936 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> 2018-03-05weld SfxPasswordDialog DialogCaolán McNamara Change-Id: If8c9757986f4af7b7927717221860e65c8c7285e Reviewed-on: https://gerrit.libreoffice.org/50755 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> 2018-02-08Use for-range loops in sfx2 (part2)Julien Nabet Change-Id: Ie13b5836eff2e9b5dfec4bb95935de9560ab4be0 Reviewed-on: https://gerrit.libreoffice.org/49393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-01-12More loplugin:cstylecast: sfx2Stephan Bergmann auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: Ia3bed56999f3d684f706ce0bd5be8a2269b06d22 2017-10-23loplugin:includeform: sfx2Stephan Bergmann Change-Id: I5e9a7a2580a710880023288f5ed3584708c4769d 2017-09-08set parent for file dialog helperCaolán McNamara Change-Id: I3994ee48dcb5b2732cb27cb9ccb54926abf0828a Reviewed-on: https://gerrit.libreoffice.org/42048 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> 2017-09-01bump FileDialogHelper to XFilePicker3Caolán McNamara Change-Id: I726676aaa8944bc3b6418abe305ad03f8ec96c59 Reviewed-on: https://gerrit.libreoffice.org/41783 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> 2017-07-21loplugin:constparams in sfx2Noel Grandin Change-Id: Id982c8fb5654433e9db10e2da6a86a6c8d90b9b4 Reviewed-on: https://gerrit.libreoffice.org/40261 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2017-06-21convert ErrCode to strong typedefNoel Grandin would have preferred to re-use o3tl::strong_int, of which this is a modified copy, but there are lots of convenience accessors which are nice to define on the class. Change-Id: I301b807aaf02fbced3bf75de1e1692cde6c0340a Reviewed-on: https://gerrit.libreoffice.org/38497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2017-05-18Remove parentheses around some comparisonsStephan Bergmann ...where Clang would otherwise start to emit -Wparentheses-equality as soon as the order of arguments were switched by loplugin:comparisonwithconstant Change-Id: If064c2c6e2f81478154395137138b71f2d1c6534 2017-05-04loplugin:checkunusedparams in sfx2Noel Grandin Change-Id: Iea88ddd619f10a2a2586ee24edbf07e246dcbb49 Reviewed-on: https://gerrit.libreoffice.org/37191 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2017-04-18Avoid temporary OUStringsMatteo Casalin Change-Id: I0fb456874595814339a420b61fbf4cb957af095e 2017-04-18tdf#95992 "Edit" > "Compare Document..." opens dialog that is...Matteo Casalin misnamed "Insert" Issue is that the caption of the dialog is handled by generic code, which was not designed with comparison in mind. This fix extends the captions that can be used by such generic codes, without modifying the underlaying architecture. Letting callers directly provide caption text might be more versatile, though. The fix is extended to: * Writer Merge functionality * Calc Compare/Merge functionalities which use the same dialog (and thus were also displaying "Insert"). Change-Id: I452b37bf7d0024924c87316cd47572c09b373b65 Reviewed-on: https://gerrit.libreoffice.org/35285 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com> 2017-01-17new loplugin: useuniqueptr: sfx2Noel Grandin Change-Id: I544c615105d14fa258fed7f30790d305e987f523 Reviewed-on: https://gerrit.libreoffice.org/33206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2016-12-05convert DecodeMechanism to scoped enumNoel Grandin Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547 2016-10-06tdf#101813 sw,sfx2: enable inserting master document as sectionMichael Stahl Traditionally only ordinary com.sun.star.text.TextDocument could be inserted as a section but then commit 3da8f3680556e0163f660a0a159930337c8c32ff unintentionally enabled inserting everything, including master documents (com.sun.star.text.GlobalDocument). I'm really not sure if this should be allowed or not but apparently somebody finds it useful so here we add some crude hacks to enable it (to be reverted in case it causes trouble). (regression? from 805fd1ca343d6295b8114a24cc29bdac332f266d) Change-Id: I439b2516fcbe54977ff04e487a920acd38c27152 2016-10-05Remove _TYPED suffix from tools/link.hxx macrosStephan Bergmann ...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually typed Link" to distinguish the new, typed versions from the old, untyped ones, but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173 "remove untyped Link<>" removed the old versions. Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c 2016-05-12convert SFXWB file dialog flags to scoped enumNoel Grandin Change-Id: I1ab5191dc582c46785da58d50b2e68c30b5cbc9b Reviewed-on: https://gerrit.libreoffice.org/24881 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> 2016-03-22sfx2: Fix memleakTakeshi Abe i.e. free pMedium when CheckPasswd_Impl() returns ERRCODE_ABORT. Change-Id: I452074e5189afe64016226c1a193a68f40e9c43d Reviewed-on: https://gerrit.libreoffice.org/23387 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> 2016-03-11work on sane lifecylce for SfxFilterMarkus Mohrhard all SfxFilter instances should now be hold inside of a std::shared_ptr. This fixes a number of huge memory leaks in the test framework and removes one huge source of memory issue in sfx2. SfxMedium contains a pointer to the SfxFilter but does not own. Therefore it is required that any SfxFilter belonging to a SfxMedium lives longer. However this seems to work mostly by hoping that all SfxFilter instances are stored in a global array. As we have seen with the tests this is not true (there are also some cases inside of sd that seem to not follow that pattern as well). Change-Id: I12fd04a504cc4efc0a94967abd91c6fe2c6a8ce8 Reviewed-on: https://gerrit.libreoffice.org/23140 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> 2016-03-02loplugin:unuseddefaultparam in sfx2Noel Grandin Change-Id: I37afde801a6468c79259fe51acbdea0614c2c8c5 2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann Change-Id: I7213b49b09ddcb00841aa5f63343baeab0e65fa4