summaryrefslogtreecommitdiff
path: root/svx/source/gallery2/galmisc.cxx
AgeCommit message (Collapse)Author
2024-05-11loplugin:ostr in svxNoel Grandin
Change-Id: Ia765a03e033acb82e367873380d289587ea87d6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167449 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-04-02simplify SotTempStream and lifetimeNoel Grandin
It is really just an SvStream instance, and the lifetime does not need reference counting Change-Id: Idb5ffd96f852aae0dc1a94cddc0a83fbcdf974ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165655 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-08GalleryObject*Storage are unnecessaryNoel Grandin
They are identical, and they contain no useful logic. Remove them and just store the underlying INetURL object directly. Change-Id: I73f46d13867ae3b6e738189c0dbaa3cb0ea40ba0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151539 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-14loplugin:moveitNoel Grandin
Change-Id: I2702e716dc669ffbb870d36d060e110288d7a744 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137043 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-03Just use Any ctor instead of makeAny in svxStephan Bergmann
Change-Id: I59b1b3f817a9028f132456ea5094f38f88674d00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133768 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-01tdf#145964 related: also drop special-casing in TransferableHelper::SetStringMike Kaganski
Follow-up to commit 5fb9f4ffa9284c7248e2e82210506babaad4044d Change-Id: I46d5ea404f77ac5ff67b6ee6a42afee13274a481 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126174 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-31Prepare for removal of non-const operator[] from Sequence in svxMike Kaganski
Change-Id: Ib5fda9469f9a1987cf9071c0e228c582cfb3dfa1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124397 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-28loplugin:indentation improve checks for brace alignmentNoel Grandin
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-09Recheck include/ with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: Ifc253bf800bb1468b5774663a93f4fb30bec81d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113657 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-03-08clean up some more dynamic/static castingNoel
using a hacked version of the staticdynamic plugin and some judgement Change-Id: I5e6668b19320025e419f84bebceade4239577729 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112137 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-22split SotStorageStream into two classesNoel
since it has two completely different paths of control Change-Id: I89b739d318d52245208a4bda1230f69d19f3ae0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108104 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-25tdf#42949 Fix new IWYU warnings in directory svxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: If578c5119b85f991825e91df37c42e28f16e9de5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100555 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-11loplugin:stringviewNoel
Add new methods "subView" to O(U)String to return substring views of the underlying data. Add a clang plugin to warn when replacing existing calls to copy() would be better to use subView(). Change-Id: I03a5732431ce60808946f2ce2c923b22845689ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105420 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-02svx: Refactor GalleryObject member aURLAditya
The member aURL does not belong here and needs to be refactored, the reason is that there can be two type of URLs - XML and binary URL. Change-Id: Ieb4e57a6f144070f95282a7fd02d08bda6d11f3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101084 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-08-06loplugin:flatten in svxNoel Grandin
Change-Id: I31f33a5f693d5fdb8282181c5bd7f31971efe784 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100236 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-17svx: refactoring of GalleryTheme GetModel(), InsertModel()Aditya
Introduce readModel(), readModelStream(), insertModel(), insertModelStream() in Gallery Binary Engine because these deal with file reading stuff. Move ImplGetURL() to galmisc for now because GalleryTheme and GalleryBinaryEngine both use it. Separate InsertModel() into two parts - one dealing with Sot Storage stream, the other adding object to gallery list. Move first part to Gallery Binary Engine, the second stays. Separate InsertObject() into two parts. Move CreateThemeEntry() to Binary Engine. Change-Id: Id3b4091db27b5b88bcf025f9fd94ad86169505d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98492 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-02-24tdf#42949 Fix IWYU warnings in svx/source/[f-m]*/*cxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I103c5c7f1a74e8c3a021a91c7a96ebc87cb19efd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89263 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-21weld gallery panelCaolán McNamara
Change-Id: I4aebb3f90e9943044d106a507972c39434988f03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87003 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2019-10-17Rename OUStringLiteral1 to OUStringCharStephan Bergmann
It started out as a wrapper around character literals, but has by now become a wrapper around arbitrary single characters. Besides updating the documentation, this change is a mechanical for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f Reviewed-on: https://gerrit.libreoffice.org/80892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-20loplugin:referencecasting in svxNoel Grandin
Change-Id: I2f6bc2467fa7689d186bc2bc45d2071ea0a38e63 Reviewed-on: https://gerrit.libreoffice.org/75998 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-21Drop INetURLObject::GetName and INetURLObject::GetExtensionMike Kaganski
They are just synonyms for GetLastName and GetFileExtension resp. Change-Id: Ic498c7025cc421b830394ed94d64529fd74fe7dd Reviewed-on: https://gerrit.libreoffice.org/74448 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-05-16tdf#42949 Fix IWYU warnings in include/svx/[e-g]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I861d3f0fa15ee3b7e0e830c4fac2e5794ea4071b Reviewed-on: https://gerrit.libreoffice.org/72213 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-02-10loplugin:indentation in svxNoel Grandin
Change-Id: Ifea8e24fb76025715ab2ff495d3949223584070a Reviewed-on: https://gerrit.libreoffice.org/67567 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-23loplugin:constparams in svxNoel Grandin
Change-Id: Ie37288e4b9f064e309df81830f3a07507525bc55 Reviewed-on: https://gerrit.libreoffice.org/66771 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-13tdf#42949 Fix IWYU warnings in include/ucbhelper/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7bfeef47abaf94cfb355db95c0fdb928ce36c0a6 Reviewed-on: https://gerrit.libreoffice.org/60232 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-11loplugin:simplifyconstruct in svtools..svxNoel Grandin
Change-Id: Ia20fac7cec01ac658a903f8b001807b2e72dbf3e Reviewed-on: https://gerrit.libreoffice.org/60316 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-30Avoid getTokenCount()Matteo Casalin
Change-Id: Ia3c7657a89187ff21fca6d07c27ba260a0be36d8
2018-05-17loplugin:unusedfields in svxNoel Grandin
Change-Id: I2e34b3819c576072beaacb87cb99d73457667dc3 Reviewed-on: https://gerrit.libreoffice.org/54449 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-02loplugin:useuniqueptr in GalleryTransferableNoel Grandin
Change-Id: Iad9ca26bb94fb1d499d3ce028b2289c11c1771fa Reviewed-on: https://gerrit.libreoffice.org/53711 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-23loplugin:singlevalfields improve unaryoperatorNoel Grandin
when we see a unaryoperator, unless it's one of a small set, we can know (mostly) that the field will not be written. there is still a small risk of false+ with code taking references via conditional expressions. Change-Id: I96fa808067576a50e5eaf425338e225b4e0bdd4e Reviewed-on: https://gerrit.libreoffice.org/53263 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-20loplugin:constantparamNoel Grandin
Change-Id: Ia58d8950b3b9e48bbe9f075b9fe1eed62d9abf0d Reviewed-on: https://gerrit.libreoffice.org/53188 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-19remove unused ucbstreamhelper includesJochen Nitschke
and a few vclunohelper includes Change-Id: I4803605766d155fe5044c2a65c0444631146831c Reviewed-on: https://gerrit.libreoffice.org/51496 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-12More loplugin:cstylecast: svxStephan 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: I100e6c14cbf1d780f0e5ebca6b0c9e71ce1caaf7
2017-12-15sal_uIntPtr->sal_uInt32 in GalleryTransferableNoel Grandin
to match the underlying field Change-Id: I96bee1b19fb33e00bb09617a458f741654beb7f3 Reviewed-on: https://gerrit.libreoffice.org/46479 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-13sal_uIntPtr->sal_Int32 in GalleryProgressNoel Grandin
to match the underlying type on mxProgressBar->setValue Change-Id: Ib04569235830f16b6507180e0f27816f8cfc50ff Reviewed-on: https://gerrit.libreoffice.org/46347 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-11A user object id is *NOT* a SotClipboardFormatIdEike Rathke
Do not try to squeeze it into such.. especially if SotClipboardFormatId::... enum identifiers are used in a user object id context that is completely not related to the identifier name this is totally confusing. commit fb14be5f8f74f83ba89e15f891ddf1f753dcc62f Date: Thu Mar 12 14:53:28 2015 +0200 create new 'enum class' SotClipboardFormatId to unify types overdid with that. Change-Id: I34b570be9f52b7b94ca8af6b23983393ac3a3a55 Reviewed-on: https://gerrit.libreoffice.org/44612 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-23loplugin:includeform: svxStephan Bergmann
Change-Id: I4057fe05983fb2b63b592ffd325894c12b9cb5b2
2017-08-17remove UL/L suffixes from integer constants in initialiser/call expressionsNoel Grandin
Change-Id: Iae081567c4fa5b88edbd12cf2fbafd2b8f31b300 Reviewed-on: https://gerrit.libreoffice.org/41214 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-01move resmgr to unotoolsCaolán McNamara
and the vast majority of translations is to the ui language so default ctor with that arg and now drop OModuleResourceClient Change-Id: I3b85a560ffdfe5f019c2271ac56a5fe4a361522b
2017-07-24SdrGlobalData::aUserMakeObjUserDataHdl is unusedNoel Grandin
ever since commit ddb1d5ebf0a81888001ffa1dbab883df70cdc279 Author: Felix Zhang <fezhang@suse.com> Date: Fri Nov 18 18:23:52 2011 +0800 remove unused Sdr methods removed the SdrObjFactory::MakeNewObjUserData method Change-Id: I95c167b2f20b436bcc0085b6b616406ac210045f Reviewed-on: https://gerrit.libreoffice.org/40363 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21migrate to boost::gettextCaolán McNamara
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-05-19make string translation loading more uniformCaolán McNamara
change various ResId classes that use conversion operator to OUString to functions that return a OUString drop various defines drop unnecessary toString calls Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92 Reviewed-on: https://gerrit.libreoffice.org/37817 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-05loplugin:checkunusedparams in svtoolsNoel Grandin
Change-Id: Iea68d7c0683740acaf4f85c14efe2a33e0cf13e7 Reviewed-on: https://gerrit.libreoffice.org/37201 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-27remove svx bitmaps from .src filesCaolán McNamara
Change-Id: Ie3795870484648e62dea483f9976af31cd1be167 Reviewed-on: https://gerrit.libreoffice.org/37006 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-02-28new loplugin unoanyNoel Grandin
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89 Reviewed-on: https://gerrit.libreoffice.org/34714 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-02convert method names in tools::SvRef to be more like our other..Noel Grandin
reference classes, uno::Reference and rtl::Reference. Specifically rename Is()->is() and Clear()->clear(). Change-Id: Icb7e05e2d09cb9977121508b837ba0961dabb4ae Reviewed-on: https://gerrit.libreoffice.org/33576 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-05convert FSysStyle to o3tl::typed_flagsNoel Grandin
Change-Id: I58a63a0e6f619442f21827064644ecd8ca57b8ff
2016-12-05convert DecodeMechanism to scoped enumNoel Grandin
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-11-21convert inventorId to scoped enumNoel Grandin
SW_DRAWLAYER had the same value as SC_DRAWLAYER, so I merged it into the ScOrSwDraw enum constant Change-Id: I5c45d378c00364d11cc960c9e48a6e3f10928724 Reviewed-on: https://gerrit.libreoffice.org/31037 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-28update unnecessaryoverride plugin to find pure forwarding methodsNoel Grandin
which can be replaced with using declarations. Is there a more efficient way to code the search? Seems to slow the build down a little. Change-Id: I08cda21fa70dce6572e1acc71bf5e6df36bb951f Reviewed-on: https://gerrit.libreoffice.org/30157 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>