summaryrefslogtreecommitdiff
path: root/sfx2/source/config
AgeCommit message (Collapse)AuthorFilesLines
2023-10-23Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann1-1/+1
...in include files. This is a mix of automatic rewriting in include files and manual fixups (mostly addressing loplugin:redundantfcast) in source files that include those. Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann1-1/+1
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-31these can be stack allocatedNoel Grandin1-3/+3
Change-Id: Idd2e5e49ba4fcef2e80fd9c569f374a6a69f380e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135175 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-03use more TOOLS_WARN_EXCEPTIONNoel1-2/+3
Change-Id: I8b5cde993c13e0b7c8c830b1ff698933a6b7cfd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103863 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-02tdf#42949 Fix IWYU warnings in sfx2/source/[b-c]*/*cxxGabor Kelemen1-11/+0
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Iefbde5e045b5c0bbfd61d18c80bc76c2fcf0cbaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85546 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-12use covariant return type for SfxPoolItem::CloneCaolán McNamara1-1/+1
and can then remove some casting Change-Id: Id821c32ca2cbcdb7f57ef7a5fa1960042e630ffc Reviewed-on: https://gerrit.libreoffice.org/85022 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-30Fix typosAndrea Gelmini1-1/+1
It passed "make check" Change-Id: I50c3639ec258c7fb6d73104f8e777f96995aa8e3 Reviewed-on: https://gerrit.libreoffice.org/76543 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-20loplugin:referencecasting in sfx2Noel Grandin1-2/+1
Change-Id: I97cd8821aa9a6f462f9b271940483738655ee9cf Reviewed-on: https://gerrit.libreoffice.org/75979 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-25WIP: Further preparations for deeper Item changesArmin Le Grand1-6/+0
(1) Migrated all still existing binary load/save stuff in SfxPoolItem to legacy files. Isolated from Item implementations. Adapted all usages. No more methods Create/Store needed, also GetVersion removed (2) Removed operator= for SfxPoolItem. Adapted all usages. Goal ist to handle Items more as Objects ('Object-Oriented') in the sense to move/handle instances, not to copy one instance over another one (which is more and more problematic with hard to copy content as UNO API stuff or similar). This lead to much more usages of std::shared_ptr which correlates well with future plans fr Items (see dev branch). Next logic step will be to also remove copy constructor Linux build and corrections done Fixed Writer test and removed unused defines Fixed another unused m,acro Started to unify the AutoFormat stuff Changes to OUString constructor usages, tests completely No idea why, but SfxStringItem constructor which takes a OUString& now insists of not getting ::OUString's handed in - changed all 'SfxStringItem.*OUString.*".*"' accordingly Change-Id: Ibed7358b18fb019994a7490332b9d797a6694c29 Reviewed-on: https://gerrit.libreoffice.org/71075 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2019-03-28tdf#42949 Fix IWYU warnings in include/sfx2/[e-M]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I6e97c7ed6c0211dfafee83b9bdbea672e415fc49 Reviewed-on: https://gerrit.libreoffice.org/69715 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-07loplugin:flatten in sfx2Noel Grandin1-19/+19
Change-Id: If4e07d497ead58a2ff58b5fdedd282b8784be421 Reviewed-on: https://gerrit.libreoffice.org/67435 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-05simplify SfxEventNamesListNoel Grandin1-17/+7
no need to store elements of vector on the heap Change-Id: I314372b8f81b117c07676263c0c3481b51374f33 Reviewed-on: https://gerrit.libreoffice.org/67397 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-12use unique_ptr in SfxEventConfiguration::ConvertToMacroNoel Grandin1-1/+1
Change-Id: I7f96ce55b22212c38972a51c9273c9f9cd241acf Reviewed-on: https://gerrit.libreoffice.org/66183 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann1-2/+2
...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-07-31Add missing sal/log.hxx headersGabor Kelemen1-0/+1
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from sfx2 to starmath Change-Id: I40ee7bfae6efdadd862319b7b693ad22c648e1c4 Reviewed-on: https://gerrit.libreoffice.org/58222 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-02loplugin:useuniqueptr in SfxEventNamesListNoel Grandin1-8/+5
Change-Id: Ie296881069393001842f4424f398b0edefd89ac5 Reviewed-on: https://gerrit.libreoffice.org/53702 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-18tdf#42949 Remove unnecessary localization headers of sfx2Gabor Kelemen1-1/+0
Found by searching for the header names and the localization functions: git grep -l -e \<sfx2/sfxresid.hxx\> -e \<sfx2/strings.hrc\> | xargs grep -c -e SfxResId -e GetResString | grep :0$ | grep -v /pch Change-Id: If0571ae4029b5fb2699cdd6ea768d3cd240bdce3 Reviewed-on: https://gerrit.libreoffice.org/53073 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-03-20drop unnecessary includesCaolán McNamara1-1/+0
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-08loplugin:constantparam in linguistic..sfx2Noel Grandin1-1/+1
Change-Id: I0e8c506df0beb0b05d9c32723876b11b6577280a Reviewed-on: https://gerrit.libreoffice.org/50938 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-31loplugin:constantparam in sfx2Noel Grandin1-2/+2
Change-Id: Id52809401fb848d7169a665903e67ba28f4af598 Reviewed-on: https://gerrit.libreoffice.org/44084 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: sfx2Stephan Bergmann1-1/+1
Change-Id: I5e9a7a2580a710880023288f5ed3584708c4769d
2017-08-07Removing unused SfxItemPool serialisation from sfx2Varun Dhall1-12/+0
Change-Id: Ibb14fcd656f401cb9d2ad57ab63f6cfecf49807d Reviewed-on: https://gerrit.libreoffice.org/40814 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-31make IntlWrapper arg to GetPresentation non-implicit and non-optionalCaolán McNamara1-1/+1
which requires explicitly adding null in 1) SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItemSet* p2ndSet) where SdrItemBrowserControl is only used by SdrItemBrowser and the only use of that is within DBG_UTIL in SdrPaintView 2) SwCursorShell::GetContentAtPos( const Point& rPt, within a #ifdef DBG_UTIL block in 3) SvxSearchDialog::BuildAttrText_Impl( OUString& rStr, bool bSrchFlag ) const where the other branch uses SvxResId 4) SfxPoolItem::dumpAsXml(xmlTextWriterPtr pWriter) const 5) XFillStyleItem::dumpAsXml(xmlTextWriterPtr pWriter) const looks very much like all uses (outside the dumpers) are intended to be in the ui locale results in that INetContentTypes::GetPresentation always called with UI Locale Change-Id: I5a110c107838b4db3c355476426d6532f2b6ce52 Reviewed-on: https://gerrit.libreoffice.org/40538 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-25convert UNO event ids to scoped enumNoel Grandin1-1/+1
I'm fairly sure there are more simplifications that could be make here. It seems like we have both an ID and a string name for all of these events, and we could probably get by with just one of those, or alternately, centralise the name<->id mapping somewhere Change-Id: I978073822ddbebce94ac5b560fea675bea905a35 Reviewed-on: https://gerrit.libreoffice.org/40392 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21loplugin:constparams in sfx2Noel Grandin1-2/+2
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>
2016-11-18editeng: assert SfxPoolItem::operator==Michael Stahl1-1/+1
Change-Id: Ia6c6f4f5af1e3a803b464ab410558984c3861a65
2016-08-19Resolves: coverity#705366 Mixing enum typesCaolán McNamara1-4/+4
and coverity#705367 Mixing enum types coverity#705371 Mixing enum types coverity#982694 Mixing enum types coverity#1027717 Mixing enum types coverity#1371228 Mixing enum types coverity#1371242 Mixing enum types coverity#1371280 Mixing enum types coverity#1371310 Mixing enum types MapUnit and SfxMapUnit share the same values and are freely cast from one to the other. Now that commit d30a4298bdb5ba53cd1fe659f2b742f218a2e527 Date: Thu Aug 11 15:02:19 2016 +0200 loplugin:unusedenumconstants in package..svtools removed the SfxMapUnit entries that were directly unused, they don't match anymore and casting from one to the other is dangerous. Why there was two of these anyway escapes me, get rid of SfxMapUnit and just use MapUnit universally Change-Id: I4db5dcd04b59be2f85b62b728f96c90afe00c57e Reviewed-on: https://gerrit.libreoffice.org/28234 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-05-10clang-tidy modernize-loop-convert sfx2Noel Grandin1-2/+2
Change-Id: Ief72064e2869945734215a7c67440adc6c1550c3 Reviewed-on: https://gerrit.libreoffice.org/24799 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-09Remove excess newlinesChris Sherlock1-4/+0
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2015-11-24loplugin:unusedfields in include/framework/Noel Grandin1-1/+0
Change-Id: I04603a3b78b0611fcca4974b00e2da06045308d1
2015-11-115th step to remove tools/rtti.hxxOliver Specht1-1/+0
tools/rtti.hxx removed completed the interface of some Sdr.* Items and removed pseudo items Change-Id: I0cdcd01494be35b97a27d5985aa908affa96048a Reviewed-on: https://gerrit.libreoffice.org/19837 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann1-1/+1
Change-Id: I7213b49b09ddcb00841aa5f63343baeab0e65fa4
2015-11-09new loplugin: oncevarNoel Grandin1-15/+6
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f Reviewed-on: https://gerrit.libreoffice.org/19815 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-05use uno::Reference::set method instead of assignmentNoel Grandin1-4/+3
Change-Id: Id9e7621ca7170d6cc80d8ce14f155ce564691ec0
2015-10-29com::sun::star->css in sfx2Noel Grandin1-3/+3
Change-Id: I20d9b45e4b28c2a4a511774d3154aceb0471d197 Reviewed-on: https://gerrit.libreoffice.org/19643 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-19convert remaing DBG_WARNING to SAL_INFONoel Grandin1-1/+1
and drop the macro Change-Id: I452ca373d0c277166e94928c1bce78bf37e39d7c
2015-09-17boost->stdCaolán McNamara1-2/+2
Change-Id: Ifde84627578283bd057d7393eb7e5578ef5c029a
2014-12-18sfx2: Use appropriate OUString functions on string constantsStephan Bergmann1-7/+7
Change-Id: Iea55d87a7c7b2afc408e3822121f79234481eccc
2014-11-14fdo#86023 - O[U]String needs a 'clear' methodBrij Mohan Lal Srivastava1-1/+1
Added clear() method to OString and OUString class, Updated appropriate call-sites. Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-10-02loplugin: cstylecastNoel Grandin1-1/+1
Change-Id: I4a230f45e91773fca7d537e91c9e9fb54773cf10
2014-09-06SfxHint: convert home-grown RTTI to normal C++ RTTINoel Grandin1-2/+0
Also note that I fixed a bug in SvxFontMenuControl::Notify where the if statement had the check the wrong way around. Change-Id: I611e8929c65818191e36bd80f2b985820ada4411 Reviewed-on: https://gerrit.libreoffice.org/11147 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-07-29simplify return argument of SfxPoolItem::GetPresentationNoel Grandin1-2/+2
since all two of the actual call-sites only care about whether it is a valid presentation or not, not what kind of presentation it is. Change-Id: I75717c88878d37b2897741b0c833ff283b3fee59
2014-03-18sfx2: sal_Bool->boolNoel Grandin1-1/+1
Change-Id: I125e09933be2841315252fbc3fc021c195f255f8
2014-03-13sfx2,svl: prefer passing OUString and OString by referenceNoel Grandin1-2/+2
Change-Id: I9833265f6e635a057cea2c4a945cc73809b1e2ef
2014-02-26Remove visual noise from sfx2Alexander Wilms1-1/+1
Change-Id: I0f556a386ce64d154b695c2a35f808c94b9f0b7a Reviewed-on: https://gerrit.libreoffice.org/8310 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23Remove unneccessary commentsAlexander Wilms1-5/+5
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb Reviewed-on: https://gerrit.libreoffice.org/8182 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-01-28bool improvementsStephan Bergmann1-3/+3
Change-Id: I4a09bffccc0049d81ea3113e79184f64b026a4ba
2014-01-16Introduce com.sun.star.frame.theGlobalEventBroadcaster singletonStephan Bergmann1-2/+2
...to supersede com.sun.star.frame.GlobalEventBroadcaster single-instance service. Change-Id: I74ecaadadb4c600d39979aa7c13b6389bed38fd7
2014-01-10SfxPoolItem::operator ==, != should return boolStephan Bergmann1-1/+1
...and SfxEnumItemInterface::HasBoolValue, too. Change-Id: Ia032e3d35a4c3b4c1efdc515ca36e466be03fc0a
2013-11-11sfx2: include <> for external includesNorbert Thiebaud1-1/+1
Change-Id: I63de4bc034020d19abd20f301194482da9a604f4