summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2016-11-01loplugin:oncevar in sal..scriptingNoel Grandin
Change-Id: Id9ab12f3a61eb83a2288b2fd4d99ab77f5833e1b Reviewed-on: https://gerrit.libreoffice.org/30461 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-01cppcheck unreadVariable: nModifiedJochen Nitschke
unused since initial commit 9ae5a91f7955e44d3b24a3f7741f9bca02ac7f24 Change-Id: I2828af1fbfda993dff32abf0f9a9f73e9fb61028 Reviewed-on: https://gerrit.libreoffice.org/30455 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-11-01Omit the default comparator for std::sort()Takeshi Abe
Change-Id: Ib865bdf911b53d809fc2979f524da3735bb39ce5 Reviewed-on: https://gerrit.libreoffice.org/30432 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-10-31Resolves: tdf#99291 empty array element should not match empty cellEike Rathke
As weird as it is, but an empty cell is only to be matched by an empty string, not another empty cell. Affects spreadsheet functions SUMIF, AVERAGEIF, COUNTIF, SUMIFS, AVERAGEIFS and COUNTIFS. Change-Id: Ib33402e8c93f26cd8e2648426a5bde6b267c55ab
2016-10-31Resolves: tdf#64001 exclude "boolean" value cells from increment during FillEike Rathke
Change-Id: Id79438cc37a63c0619c6b96ecf57b10d781afea3
2016-10-31don't loop uint16 against sizeEike Rathke
Theoretically selecting over 64k rows with a series sequence and calling Fill could had looped endless. Change-Id: I1740b674638eb90d51808e619c562cf8064f4888
2016-10-31Nonsensical OUString null checkStephan Bergmann
...ever since 523e10ac08b35b6b63e9ac0ffefac7c013e4ee89 "INTEGRATION: CWS scriptingf4: #i28384# - implement Macro Selector specification". (That happened to redundantly check for non-empty aScriptURL, too.) Change-Id: I3fae859af4b0cc5d2b5f8a609c74b00b120694f3
2016-10-31loplugin:countusersofdefaultparams in sc(part1)Noel Grandin
Change-Id: Ia2b0174654fad536ee23f6174a0b38b1843a4aa5 Reviewed-on: https://gerrit.libreoffice.org/30427 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-31return dialog pointers using VclPtr<>Noel Grandin
or their ref-count could drop to zero before they actually get used Change-Id: I5af7a0cc8650e3d779c870144c23b6de19c8cc45
2016-10-31This needs to be VclPtr tooJulien Nabet
Avoid this segfault: Thread 1 "soffice.bin" received signal SIGSEGV, Segmentation fault. 0x00002aaad2a20e4e in VclReferenceBase::acquire (this=0x9999eeeef579c129) at /home/julien/lo/libreoffice/include/vcl/vclreferencebase.hxx:38 38 assert(mnRefCnt>0); (gdb) bt 0 0x00002aaad2a20e4e in VclReferenceBase::acquire (this=0x9999eeeef579c129) at /home/julien/lo/libreoffice/include/vcl/vclreferencebase.hxx:38 1 0x00002aaad37325ae in rtl::Reference<AbstractScImportAsciiDlg>::Reference (this=0x7ffffffef7c0, pBody=0x55555be02790) at /home/julien/lo/libreoffice/include/rtl/ref.hxx:63 2 0x00002aaad37321b5 in VclPtr<AbstractScImportAsciiDlg>::VclPtr (this=0x7ffffffef7c0, pBody=0x55555be02790) at /home/julien/lo/libreoffice/include/vcl/vclptr.hxx:89 3 0x00002aaad3731e25 in ScopedVclPtr<AbstractScImportAsciiDlg>::ScopedVclPtr (this=0x7ffffffef7c0, pBody=0x55555be02790) at /home/julien/lo/libreoffice/include/vcl/vclptr.hxx:305 4 0x00002aaad373055e in ScFilterOptionsObj::execute (this=0x555558d8d450) at /home/julien/lo/libreoffice/sc/source/ui/unoobj/filtuno.cxx:179 5 0x00002aaad1c03f50 in (anonymous namespace)::handleFilterOptionsRequest_ (xContext=uno::Reference to (cppu::ComponentContext *) 0x5555559ec960, rRequest=..., rContinuations=uno::Sequence of length 2 = {...}) at /home/julien/lo/libreoffice/uui/source/iahndl-filter.cxx:259 6 0x00002aaad1c044f4 in UUIInteractionHelper::handleFilterOptionsRequest (this=0x555558c1b400, rRequest=uno::Reference to (RequestFilterOptions *) 0x555558d5edf8) at /home/julien/lo/libreoffice/uui/source/iahndl-filter.cxx:315 Change-Id: I50f9f5c4c63328a0aaa3ecb2d83a902de6a38add Reviewed-on: https://gerrit.libreoffice.org/30410 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-30add LEFT test caseZdeněk Crhonek
Change-Id: I4001716ea3c6fe1993a565585cb5f90a4c639c0c Reviewed-on: https://gerrit.libreoffice.org/30305 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-10-30add BETA.INV test caseZdeněk Crhonek
Change-Id: Ie8fa5f8047136853414ab6db6a1a83daaec89758 Reviewed-on: https://gerrit.libreoffice.org/29976 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-10-30add LEN test caseZdeněk Crhonek
Change-Id: I99ee54406f446d9b97a61cbd3ec1a58115b544bf Reviewed-on: https://gerrit.libreoffice.org/30392 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-10-30add FORECAST.ETS.ADD test caseZdeněk Crhonek
Change-Id: I841115854791b329417b7ff0798e55dfccf93a9e Reviewed-on: https://gerrit.libreoffice.org/30357 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-10-30Let Menu dispose submenusMaxim Monastirsky
(I'm not sure about how good are the changes from ScopedVclPtr to non-scoped, and disposeAndClear to clear. They aren't really needed, because of the VclReferenceBase::mbDisposed logic. But at least they should be safe, as long as we have disposeOnce calls in Menu's dtor.) See also previous commits: 4433d95b374c13a3501cdf3a6e273f68eb49873a ("MenuItemData now properly disposes the submenu") 89c23b4aaef931b5d6009efaf44ce6e6c976e8d4 ("Sub menus no longer need manual disposing") Change-Id: I9d455a94590f5eec9b097947f6984f1b3e477b52
2016-10-29add MAXA testcaseZdeněk Crhonek
Change-Id: I05a15da6526449342c9f0f41960c461e67df50ec Reviewed-on: https://gerrit.libreoffice.org/30353 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-10-29convert usages of DPIScalingFactor from int to floatTomaž Vajngerl
Change-Id: I049b3d2cde4dcb8c8c0690d75a015a43cb71b0c0 Reviewed-on: https://gerrit.libreoffice.org/30381 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29add HYPGEOMDIST test caseZdeněk Crhonek
Change-Id: I996161ff95fb682f3a9bb62fe6444be96fd6fd3f Reviewed-on: https://gerrit.libreoffice.org/30355 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-10-29add LOGINV test caseZdeněk Crhonek
Change-Id: Ie05a462418322aac43f36c069749fdae195a8585 Reviewed-on: https://gerrit.libreoffice.org/30354 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-10-28sc: remove antique reference counting hacks from ScDocumentPoolMichael Stahl
This attempt to prevent overflowing a 16-bit counter was obsoleted by the conversion of SfxPoolItem's reference count to ULONG in 2001 or so. Change-Id: Iafb6f151f68cbb84fda59bd134a7a4930f9a4d1f
2016-10-28svl: change SfxPoolItem ref-count to sal_uInt32Michael Stahl
Fixes the inconsistency between potentially 64-bit sal_uLong and the max-value macros that are ~2^32. Change-Id: I895c674819cf4766cb2c7441f670bc1305362a74
2016-10-28tdf#63846 assign macros after VBA project fully loaded.Justin Luth
fixes regression caused by d4743045a0b320449d07a957463a76bb8b13f939. see the documentation for VbaMacroAttacherBase, which indicates that the macros are to be attached after all objects are finished loading. Made attachMacros() public so it could be called separately since so many things are inter-dependent in the logic flow. Change-Id: I11f7f4a1a75d6f77a97e12e3359d6ea8a995f518 Reviewed-on: https://gerrit.libreoffice.org/30337 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-10-28add MAX test caseZdeněk Crhonek
Change-Id: Ie32504b84e227cc3f33d89ec46bca1835e433844 Reviewed-on: https://gerrit.libreoffice.org/30352 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
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>
2016-10-28these need to be VclPtrsCaolán McNamara
Change-Id: I83616728289e398c97e50f33b5dd1de404deaa27
2016-10-28can do this in one stepCaolán McNamara
Change-Id: Iab4798b34018a272a68d3d1a206dfbeef6ff19ca
2016-10-28ScopedVclPtr vs std::unique_ptr for VclAbstractDialog derivativesCaolán McNamara
Change-Id: I5e43312b6f42ce0c63946f366eaf1e6dcb9629b2 Reviewed-on: https://gerrit.libreoffice.org/30344 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-10-28convert std::unique_ptr<VclAbstractDialog> to VclPtrNoel Grandin
Change-Id: Ifdd2a0599efd701def02b4a4d2a1c489cb1b27fa
2016-10-28Various loplugin warnings in --enable-telepathyStephan Bergmann
Change-Id: I4c437491466c3029f2a9c93fb630c7b5a8d2ff21
2016-10-27sc: OOXML: range with file ID within quoted sheet name, tdf#103531 relatedEike Rathke
Wherever non-formula-expression ranges with external document reference might be used in OOXML, format ScAddress/ScRange as '[1]Sheet Name' instead of [1]'Sheet Name' as Excel expects them. Change-Id: Ia7be13f4d631405e4bcb4617fbded27586fa5dcd
2016-10-27sc: OOXML: actually write both sheet names in external 3D referencesEike Rathke
... instead of twice the same name. Even if not handled yet in Calc, external 3D references may get imported and have to be written again. Copy&Paste error since 2f373570c51e13baf0530605ef59808462e6ca71 Change-Id: I6cb982793e1072d619053c02860a8046e78bc99e
2016-10-27Resolves: tdf#103531 OOXML: write external file ID within quoted sheet namesEike Rathke
Excel expects '[1]Sheet Name' instead of [1]'Sheet Name' and complains if it encounters the latter. Fortunately Calc handles both. Change-Id: If1129e58725b522ca4755c05e313c03fca065f28
2016-10-27Resolves: tdf#103530 OOXML: pass ExternalLinkInfo compiling named expressionsEike Rathke
Change-Id: If15aa520b93f30b889e5f950185068ef3bdb9235
2016-10-27remove non-sensical OSL_ENSUREEike Rathke
That started as OSL_ENSURE( (nTabId == 0) || (getFilterType() == FILTER_OOXML) || (getBiff() == BIFF8), then with c4cb83504faa1d241a116001fd27f7148de300ba became OSL_ENSURE( (nTabId == 0) || (getBiff() == BIFF8), then with e73c4d5013d7a0bf7d72db1773d7125ab91cf269 became OSL_ENSURE( nTabId == 0, which makes no sense anymore and gets hit in ~every call. Change-Id: I5dfe3dd53310ab2f977ad574acb1ec9874775020
2016-10-27make the AbstractDialog stuff extend from VclReferenceBaseNoel Grandin
Because some stuff wants to multiple-inherit from VclAbstractDialog and OutputDevice-subclasses, and we'd prefer to keep all the lifetime management through a single smart pointer class (VclPtr) The change in msgbox.cxx and window.cxx is to workaround a bug in VS2013 to do with virtual inheritance and delegating constructors. Change-Id: I178e8983b7d20a7d2790aa283be838dca5d14773 Reviewed-on: https://gerrit.libreoffice.org/29140 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-27trust the size ... tdf#79442 follow-upEike Rathke
... and don't unnecessarily loop over the whole range. Actually a max/min typo. Change-Id: I3dbda3a7388baa337c3922ad992fd3946074c3b7
2016-10-26init ScUndoRemoveMerge with range, tdf#92117 follow-upEike Rathke
So the original selection is restored after Undo. Change-Id: Ie549a0b62da469ee38270ae089ea5abf9a6868e3
2016-10-26Resolves: tdf#92117 create only one Undo for all UnmergeCells() callsEike Rathke
... during DeleteCells() and InsertCells(), instead of one Undo per UnmergeCells() call. And actually create Undo only if bRecord requested. Change-Id: I4f1747c3f42f36e16be81f989f0af5d048ba9d9f
2016-10-26Better way to silence loplugin:staticmethodsStephan Bergmann
...in this !ENABLE_FORMULA_LOGGER dummy implementation Change-Id: Ifaf3356ada68d70164644f89fc6dc6d66f22024b
2016-10-26assemble SfxStyleFamilies from more generic resource componentsCaolán McNamara
Change-Id: I25aa0d8bca1f16f5fc27d3b299709479a1635ea3
2016-10-25Keep loplugin:staticmethods happy.Kohei Yoshida
Change-Id: I45b576a4401d51d204007a8dde3b24617b5a17e9
2016-10-25Add configure option --enable-formula-logger to conditionalize it.Kohei Yoshida
Change-Id: I1badbcfa259b22d742e5241bd817ea44769a771e
2016-10-25Ensure that GroupScope can only be instantiated by FormulaLogger.Kohei Yoshida
And also annotate the class a bit. Change-Id: I7544e49991778be36a9214851f3d7add4bfef626
2016-10-25LIBO_FORMULA_LOG_FILE env var to specify the log file location.Kohei Yoshida
In theory you can either use file:///foo/bar or /foo/bar style of file path. And also make sure that we don't crash in case a file is not specified or the file path is invalid. Change-Id: Ia1fb11af84f91e678401bde11454522db9893f4c
2016-10-25Write nest levels in case of nested group calculations.Kohei Yoshida
Change-Id: Ie2a94bf76ab28f792ff5684879365fda81c10e2b
2016-10-25Use a singleton pattern here.Kohei Yoshida
Change-Id: I45e8bcdb4ee2717ac7e223e68e0c03da9473db5b
2016-10-25Have the logger instantiate on first use.Kohei Yoshida
Change-Id: Ia2e3c011a66030aafa479f3ea47dcc1fb0c5e8be
2016-10-25Initial take on group formula logging.Kohei Yoshida
For now, this logger only logs group formula calculations. Change-Id: Idab3cf58f8d9e5fd24fc9f7498d55e385ca93ca7
2016-10-25tdf#79892: Pass resolved locale to transliterate calls in CalcAron Budea
Instead of ScGlobal::eLnge, use ScGlobal::pSysLocale->GetLanguageTag().getLanguageType(). Change-Id: Ie0aa90098860ac2b6cee195180dbc213eaf3b5f8 Reviewed-on: https://gerrit.libreoffice.org/30240 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-10-25Resolves: tdf#79442 in OOXML import add external files to LinkManagerEike Rathke
Now that we store formula results without recalculating, the implicit logic that adds files of external references to the LinkManager is not triggered, explicitly force it during import. Change-Id: Id867d2fa2b39841fb4c8e90941814457c8db431d