summaryrefslogtreecommitdiff
path: root/include/svl
AgeCommit message (Collapse)AuthorFilesLines
2017-09-08loplugin:constantparamNoel Grandin2-2/+2
Change-Id: Ic87f0cc863490858b7cc7e74a7f90ec31992dd53 Reviewed-on: https://gerrit.libreoffice.org/42089 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-04New loplugin:dyncastvisibilityStephan Bergmann2-2/+2
...to find uses of dynamic_cast where the static (base) type has hidden visibility while the dynamic (derived) one has default visibility, and which may thus fail at least on macOS like happened in d5ed3cd6dbd22bb18542778f1c48f4d5b3ae0f95 "Make WinMtfFontStyle's base class EMFIO_DLLPUBLIC, too". libcxxabi's __dynamic_cast takes static_type and dst_type arguments. Now, if dst_type (the derived type, with default visibility) is taken from .so A (and thus references the version of the base type info hidden in .so A) but the __dynamic_cast call is made from .so B, it passes for static_type the base type information hidden in .so B, and __dynamic_cast will consider the cast to fail. I'm not sure whether hidden intermediary types (in the hierarchy between the dynamic_cast's base and derived types) acutally cause a problem too, but lets flag them with the plugin anyway. The fixes use SAL_DLLPUBLIC_RTTI. For one, there appear to be no other reasons than type visibility to make those classes SAL_DLLPUBLIC. For another, this nicely avoids any actual changes on Windows (where SAL_DLLPUBLIC expands to nothing, and many of the affected classes were explicityl introduced into class hierarchies as "MSVC hacks"). Change-Id: Ia85a9635cebffb1009a9efc1484b8bd4025585d4 Reviewed-on: https://gerrit.libreoffice.org/41802 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-03SfxItemPool::AddRef always adds 1Jochen Nitschke1-3/+3
Change-Id: I710ff662ed5b8a77d228e49804d3de418899c76b Reviewed-on: https://gerrit.libreoffice.org/41859 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-08-28svl: populate subject and date-time when verifying signatureAshod Nakashian1-0/+3
Change-Id: I50eeabf3e18176cac383f48797daa771ee9dc7e4 Reviewed-on: https://gerrit.libreoffice.org/41591 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-08-25Add check and comment for i18npool locale data using reserved formatIndexEike Rathke1-1/+13
Change-Id: I9401e353241973129bff764d6d7b7f94d7c9b7b0
2017-08-25loplugin:unusedmethodsNoel Grandin4-18/+0
Change-Id: Iaaf9092ec4d6189492906648b84494d087fed81f Reviewed-on: https://gerrit.libreoffice.org/41539 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-19drop unused SfxSizeItemJochen Nitschke1-56/+0
unused since commit 48bf5e855ae02fd1bea87938978f29ee6147285c Date: Thu Nov 16 14:30:58 2000 +0000 Remove tests for INET_PROT_FILE Change-Id: I2dc134f529675204caad78c7e50417adb55e8e4f Reviewed-on: https://gerrit.libreoffice.org/41320 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-18drop unused CntContentTypeItemJochen Nitschke1-67/+0
unused since commit cdae06a664bfc3279bd9f177473357cce316b9b1 Date: Fri Apr 6 11:17:10 2001 +0000 #78400# Template scanning reimplemented using UCB Change-Id: I3e742be5a7c5467628dbe5a19171c4dfcef07c58 Reviewed-on: https://gerrit.libreoffice.org/41274 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17Removing unused serialisation codeVarun Dhall2-8/+1
Change-Id: I86911c77f0831d448ff803afae2a74ec55ad4dd8 Reviewed-on: https://gerrit.libreoffice.org/41233 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-08-16Rename SfxItemPool GetSurrogate to CheckItemInPoolVarun Dhall1-1/+1
Change-Id: Ife08e05a9fcbadea86c005a2e9defb7cef9b5acc Reviewed-on: https://gerrit.libreoffice.org/41231 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-08-16Removing unused serialisation code from svlVarun Dhall1-647/+0
Change-Id: Ia22ea346610e925cc6d499b0cc4bc768a419f909 Reviewed-on: https://gerrit.libreoffice.org/41229 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-08-16Removing unused serialisation codeVarun Dhall3-26/+0
Change-Id: Id31c8de69043d393f005f83d5c7eba878af5119c Reviewed-on: https://gerrit.libreoffice.org/41149 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-08-16assert on duplicate listener in SfxListenerNoel Grandin1-2/+2
To enable finding the source of the duplicate calls, I add new SAL API (only for internal use) to retrieve and symbolise stack backtraces. The theory is that it relatively cheap to just store a backtrace, but quite expense to symbolise it to strings. Note that the backtrace() library we use on Linux does not do a particularly good job, but it gives enough information that developers can use the addr2line tool to get more precise info. Explanation of fixes in the code that triggered the assert: In SwFrameHolder, we need to only call StartListening() if the pFrame member is actually changing. We also need to call EndListening() on the old values when pFrame changes. In SwNavigationPI, there is already a StartListening() call in the only place we assign to m_pCreateView. In ImpEditEngine, we need to ignore duplicates, because it is doing a ref-counting thing. By storing duplicates on the listener list, it doesn't need to keep track of which stylesheets its child nodes are using. Given that it therefore will see duplicate events, there is probably some performance optimisation opportunities here. In MasterPageObserver::Implementation::RegisterDocument, we seem to be getting called multiple times with the same SdDrawDocument, so just check if we've been registered already before calling StartListening() In SvxShape::impl_initFromSdrObject, do the same thing we do elsewhere in this class, i.e. only call StartListening() if the model has changed. Change-Id: I7eae5c774e1e8d56f0ad7bec80e4df0017b287ac Reviewed-on: https://gerrit.libreoffice.org/41045 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-08loplugin:unusedmethodsNoel Grandin1-5/+0
Change-Id: Id66cf12e3a59aeed1b9a7a111b841e30b248635b Reviewed-on: https://gerrit.libreoffice.org/40876 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-08loplugin:unnecessaryvirtualNoel Grandin1-1/+1
Change-Id: I7aa23e56f2c126bf505262454408340b557f13cf Reviewed-on: https://gerrit.libreoffice.org/40865 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-04rename Anz->Cnt in svlNoel Grandin2-5/+5
Change-Id: Ibe9ad8c1bfbb336ee1f02edf0f619220cfcee375 Reviewed-on: https://gerrit.libreoffice.org/40744 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-04sw: sign paragraph textAshod Nakashian1-2/+2
The results are not stored anywhere just yet. Change-Id: I99a701ee8a16f166350c7c342b34b8fc476a81ae Reviewed-on: https://gerrit.libreoffice.org/40721 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-08-04svl: move DecodeHexString from vclAshod Nakashian1-0/+3
Change-Id: I86da993050bde20f9ff0413ad5424673647a0e5c Reviewed-on: https://gerrit.libreoffice.org/40720 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-08-03rename SV_MAX_ANZ_STANDARD_FORMATE->SV_MAX_COUNT_STANDARD_FORMATSNoel Grandin1-2/+2
Change-Id: I83df4ecabcbc98b5a75f93e44b584291068c6e94 Reviewed-on: https://gerrit.libreoffice.org/40702 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-03rename nAnzStrings -> nStringsCntNoel Grandin1-2/+2
Change-Id: I387b702a0bc785a8e9da4e0390067626c5475319 Reviewed-on: https://gerrit.libreoffice.org/40674 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-02normalize resource locale ctor construction mechanismsCaolán McNamara1-0/+21
make them all the same and share std::locales more various OModuleClient, etc, classes go away Change-Id: I7e3ff01a69332eeacd22e3078f66a60318de62d5 Reviewed-on: https://gerrit.libreoffice.org/40634 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-31make IntlWrapper arg to GetPresentation non-implicit and non-optionalCaolán McNamara19-27/+26
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-28loplugin:constparams handle constructorsNoel Grandin2-3/+3
had to change the structure of the plugin considerably, was too messy to structure it to do the calculations on a per-function basis Change-Id: I4edee7735f726101105c607368124a08dba21086 Reviewed-on: https://gerrit.libreoffice.org/40516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-27Ditch use of EditTextObject::Store() in ScGlobal::EETextObjEqual()Eike Rathke1-0/+14
This was the last incarnation of SfxItem binary stream serialization that is to be eliminated after clipboard use is gone. The "full" EditTextObject::operator==() in EditTextObjectImpl::operator==(), and via ContentInfo::operator==() in SfxItemSet::operator==(), also compare the SfxItemPool pointers which gets in the way here (not stored to stream hence didn't matter and maybe the reason for not having switched EETextObjEqual() to use operator==() back in the days). Introduce *::Equals() functions that do not compare pool pointers and let SfxItemSet::Equals() in that case not assume it would be operating on one pool only. Change-Id: Ifff939a92101c7f74695b676a45a7fdbb4f1d7f6 Reviewed-on: https://gerrit.libreoffice.org/40492 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-25convert UNO event ids to scoped enumNoel Grandin1-11/+12
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-24svl: support verifying streams as well as byte arraysAshod Nakashian1-0/+6
Change-Id: I67a5094c6817b9f9e04ef72e15b059d6667f1397 Reviewed-on: https://gerrit.libreoffice.org/40335 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-07-21de-hrc various thingsCaolán McNamara2-105/+21
e.g. helpid[s].hrc -> helpids.h and insert include guards where missing move "ordinary" defines into .hxx files remove .hrc entries that are used as arguments to dialog factory when a dedicated method can be added instead Change-Id: I792fb8eb0adfaa63cf354e6e57401fc943e9196e
2017-07-21migrate to boost::gettextCaolán McNamara5-115/+98
* 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-07-18remove unused CntWallpaperItemCaolán McNamara1-67/+0
Change-Id: I47cf9fc37bb64a80a21ed805bff2bb3ac3eb6da5 Reviewed-on: https://gerrit.libreoffice.org/40148 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-18Change nonsense non-const Date* GetNullDate() to const Date&Eike Rathke1-1/+1
* first, a non-const Date* may leave the impression that one could change the NullDate through the pointer, which is only partly successful; luckily no one did that * second, there is always a NullDate so checking for nullptr is superfluous * third, the pointer was dereferenced (maybe after a check) everywhere to obtain the NullDate, luckily.. Change-Id: I3c3a788ba0336596ac6bde4c96e77a0cdb7a4a95
2017-07-18fix terrible state of chassisCaolán McNamara1-8/+0
Change-Id: Idc0a4ea5def17e00af8c8dfec6efb797252e5a00 Reviewed-on: https://gerrit.libreoffice.org/40144 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-18loplugin:constparams in i18npool,opencl,svlNoel Grandin1-3/+3
Change-Id: I23368c3ce6d29c7b2e758e209e5a8315e82a2818 Reviewed-on: https://gerrit.libreoffice.org/40051 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-17Defer also loading of the English CalendarWrapper, tdf#109045 follow-upEike Rathke1-4/+8
Always constructing the en-US CalendarWrapper defeats the original intention that not for every construction of SvNumberFormatter a calendar is needed, plus if no en-US is requested constructing such calendar is just wasted. Since commit 2a22696546ace75c38a72ad13f7383aedd00e06a Date: Mon Jul 10 15:56:32 2017 +0200 tdf#109045: store en calendar separately in OnDemandCalendarWrapper Change-Id: I06e13754f03fc1fe4fbf48b76ccb82c917606480
2017-07-17loplugin:useuniqueptr: svl (clang-cl)Stephan Bergmann1-1/+1
Change-Id: Id8705c82ab87724b0542acbfe0ad165f889f267a
2017-07-17svl: move byte-array verification from vclAshod Nakashian2-1/+145
Also use comphelper::Base64 and DateTime::CreateFromUnixTime to avoid depending on sax. Change-Id: If1853f8d9481c9caa0625a111707531bbc495f75 Reviewed-on: https://gerrit.libreoffice.org/39993 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-07-15svl: move byte-array signing from vclAshod Nakashian1-0/+71
Signing a generic byte-array can (and will be) used by more than the existing PDF signing code, hence the move into comphelper from vcl and ourside of the PDF-specific logic. Change-Id: I7257b5218c6ba37960c6a013746eb387917a23a4 Reviewed-on: https://gerrit.libreoffice.org/39717 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-07-11tdf#109045: store en calendar separately in OnDemandCalendarWrapperAron Budea1-15/+35
When working with pivot cache there's alternating use of locale dependent and locale indepentent formats, which causes unnecessary loading of calendars due to constant switching. OnDemandLocaleDataWrapper already does this, now do something similar in OnDemandCalendarWrapper. Change-Id: I3d64dbe8afa929cf416d87678762e82b45561d63 Reviewed-on: https://gerrit.libreoffice.org/39762 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05crash on exit of cppunit testsCaolán McNamara1-1/+2
rework EditEngineItemPools own their default items and use a global weak_ptr to share them between instances Change-Id: Ifda3619a175eba3fcad81918c71b16a4d6dd663a Reviewed-on: https://gerrit.libreoffice.org/38885 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-05new loplugin unnecessaryparenNoel Grandin1-1/+1
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-03loplugin:unusedfields in slideshow..svtoolsNoel Grandin1-2/+2
Change-Id: I74d5a4b8cfc4b18267f99648a3112b163c91fd8c Reviewed-on: https://gerrit.libreoffice.org/39474 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-03C++11 remove std::unary_function bases from functorsJochen Nitschke1-2/+1
std::unary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::unary_function base class was used in 3 places: * chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole is used in a std::not1 function helper who uses the members return_type and argument_type. - replace deprecated std::not1 with a lambda * chart2/source/tools/ModifyListenerHelper.cxx: lcl_weakReferenceToSame used the argument_type member in the operator() parameter. - inline the parameter type. * xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement used result_type and argument_type in operator(). - inline the types Also fix compile error with gcc about finding std::for_each. Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f Reviewed-on: https://gerrit.libreoffice.org/39358 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-27loplugin:useuniqueptr in variousNoel Grandin1-2/+3
extending it to find places we can use std::unique_ptr on arrays Change-Id: I9feb1d12d738d6931e752ecb6dd51cbc1540c81b Reviewed-on: https://gerrit.libreoffice.org/39255 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21loplugin:unusedfields store..svlNoel Grandin1-6/+0
Change-Id: I6070a683e5128271b84a10caccb548d07c950927 Reviewed-on: https://gerrit.libreoffice.org/39021 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-19Make SfxItemSet ranges correct by construction: Fix static casesStephan Bergmann1-2/+2
...with the aid of an extended compilerplugins/clang/store/sfxitemsetrewrite.cxx (which in turn needed a small addition to compilerplugins/clang/check.hxx). Enable svl::detail::validGap check for the static case, but keep it disabled for now for the dynamic case. Change-Id: I4846ba8e99aff94a86518e2cb5044e575093386e
2017-06-16Make SfxItemSet ranges correct by constructionStephan Bergmann1-6/+61
This is a follow-up to 45a7f5b62d0b1b21763c1c94255ef2309ea4280b "Keep WID ranges sorted, and join adjacent ones". While SfxItemSet::MergeRange relies on the m_pWhichRanges being sorted (and, under DBG_UTIL, asserts if they are not), the various SfxItemSet constructors curiously only check (via assert or DBG_ASSERT) that each individual range has an upper bound not smaller than its lower bound. Arguably, all SfxItemSet instances should fulfill the stronger guarantees required and checked by MergeRange. And in many cases the ranges are statically known, so that the checking can happen at compile time. Therefore, replace the two SfxItemSet ctors taking explicit ranges with two other ctors that actually do proper checking. The (templated) overload taking an svl::Items struct should be used in all cases where the range values are statically known at compile time, while the overload taking a std::initializer_list<Pair> is for the remaining cases (that can only do runtime checking via assert). Most of those latter cases are simple cases with a single range covering a single item, but a few are more complex. (At least some of the uses of the existing SfxItemSet overload taking a const sal_uInt16* pWhichPairTable can probably also be strengthened, but that is left for another day.) This commit is the first in a series of two. Apart from the manual changes to compilerplugins/clang/store/sfxitemsetrewrite.cxx, include/svl/itemset.hxx, and svl/source/items/itemset.cxx, it only consists of automatic rewriting of the relevant SfxItemSet ctor calls (plus a few required manual fixes, see next). But it does not yet check that the individual ranges are properly sorted (see the TODO in svl::detail::validGap). That check will be enabled, and the ensuing manual fixes will be made in a follow-up commit, to reduce the likelyhood of accidents. There were three cases of necessary manual intervention: * sw/source/core/unocore/unostyle.cxx uses eAtr of enum type RES_FRMATR in braced-init-list syntax now, so needs explicit narrowing conversion to sal_uInt16. * In sw/source/uibase/uiview/formatclipboard.cxx, the trailiing comma in the definition of macro FORMAT_PAINTBRUSH_FRAME_IDS needed to be removed manually. * In svx/source/svdraw/svdoashp.cxx, svx/source/svdraw/svdotext.cxx, sw/source/uibase/app/docstyle.cxx, sw/source/uibase/shells/frmsh.cxx, sw/source/uibase/shells/grfsh.cxx, and sw/source/uibase/shells/textsh1.cxx, some comments had to be put back (see "TODO: the replaced range can contain relevant comments" in compilerplugins/clang/store/sfxitemsetrewrite.cxx). A few uses of the variadic form erroneously used nullptr instead of 0 for termination. But this should have been harmless even if promoted std::nullptr_t is larger than promoted sal_uInt16, assuming that the part of the nullptr value that was interpreted as sal_uInt16/promoted int was all-zero bits. Similarly, some uses made the harmless error of using 0L instead of 0. Change-Id: I2afea97282803cb311b9321a99bb627520ef5e35 Reviewed-on: https://gerrit.libreoffice.org/38861 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-13Let SfxSetItem ctor take SfxItemSet by unique_ptrStephan Bergmann1-1/+1
Change-Id: I219dd03477862169cd50eecc14822f6a023f879a
2017-06-08DbgCheckItemSet is goneStephan Bergmann1-1/+0
...since 87c9465262680dec09efb869800859aa65ab1d19 "Bin unused function DbgCheckItemSet" Change-Id: I109598dc5e087697d77b96a0ba2fb178d47b3aa6
2017-06-06Perf-sc: tdf#100709 SfxPoolItem::IsVoidItem() instead of dynamic_castEike Rathke1-0/+10
SfxItemSet::GetItemState() before, Ir: 4 048 231 416 after, Ir: 2 577 117 709 Change-Id: I26d8b91ad5d851011a670b38b7b98e5582c319cf
2017-06-06tdf#106942 Wrong message when lock file is empty or corruptJuergen Funk1-0/+3
1. Erase empty or corrupt lockfile, when reading it fails and skip "Locked Document Dialog" in that case 2. Show Dialog (use LockFileIgnoreRequest -> LockFailedQueryBox) when create lock file is not possible. Two Dialogs: "lock file create error" and "empty lockfile is present" Set the document to read-only when creating lockfile is not possible. If lockfile is corrupt or empty, inform the user. They can interrupt loading the document or open it read-only, which also erases the corrupt lock file after closing the document 3. Handling for the two Dialogs Use LockFileIgnoreRequst for create lockfile error and add a new LockFileCorruptRequest, (lock file is corrupt). Change and generate new messages for both dialogs in english Change-Id: I35c377f85b5113e8ffb89d83b9544b8ebc81d89f Reviewed-on: https://gerrit.libreoffice.org/36658 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-06-06add COVERITY_NOEXCEPT_FALSECaolán McNamara5-5/+5
to markup dtors that coverity warns might throw exceptions which won't throw in practice, or where std::terminate is an acceptable response if they do Change-Id: I32b94814e8245372e1d1dc36be0d81e3564042f4 Reviewed-on: https://gerrit.libreoffice.org/38318 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>