summaryrefslogtreecommitdiff
path: root/sc/inc
AgeCommit message (Collapse)Author
2016-08-06sc: drop most osl/endian.h includesJochen Nitschke
only users in implementation of ScImportExport and ScImportStringStream moving them to impex.cxx Change-Id: Ic7a78f9dd11830ad0ed330c5349beddd724236da Reviewed-on: https://gerrit.libreoffice.org/27918 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2016-08-04save about 50% of the import time for nearly empty ods documentsMarkus Mohrhard
It seems that currently most of the time is spent iterating through all the cells to get the optimal row height. We can easily optimize by using mdds::flat_segment_tree. Now we don't need to iterate through all cells and instead can work on whole blocks. Change-Id: Id9a0686490b0e91ad6552b428c38a9f6635a7938 Reviewed-on: https://gerrit.libreoffice.org/27856 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-08-03Resolves: tdf#97193 restore pre 5-1 values for INS_INSROWS and INS_INSCOLSCaolán McNamara
i.e. INS_INSCOLS_BEFORE and INS_INSROWS_BEFORE have the same meaning as the old INS_INSROWS and INS_INSCOWS, so reorder the enum so they are at the positions of their corresponding originals. This makes macros recorded before 5-1 work like they did prior to 5-1-0. This unfortunately will have the same effect to macros recorded during the 5-1 period that the original change did. regression since... commit f97beeef352fdd9fd4f157a7a4c4f6af8341cbe6 Date: Wed May 20 16:54:27 2015 +0200 Calc: Insert row/col before/after [1/2] This part renames all INSROW / INSCOL to INSROWS_BEFORE / INSCOLS_BEFORE which is the current (default) behaviour. Change-Id: Ide90b8cfebe4af1a3718d93c34657663c20ccc62
2016-07-29tdf#91665 l10n: Replace string list by separate strings in ScPrintUIOptionsMuhammet Kara
String lists are sometimes (mis)used to group unrelated items; the advantage(?) being that only one identifier needs to be defined for the whole group. The items are then referenced by index, which is rather fragile when they are used in different parts of UI. String lists like this one should be replaced by separate strings. Change-Id: I78a2c8d1a8e5b1fed6a2d0afefd96ec126bb79af Reviewed-on: https://gerrit.libreoffice.org/27689 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-07-27Resolves: tdf#65334 cannot search in cell notesCaolán McNamara
regression since... commit c06dbbe7594c2a0b5a5b19f8e183d9c421e6e094 Author: Markus Mohrhard <markus.mohrhard@googlemail.com> Date: Thu Feb 23 23:36:49 2012 +0100 remove mpNote from ScBaseCell and requires restoring some code subsequently removed in commit a1a1131c16227327d17bcf5ad2a5209ddc0f01a1 Date: Sun Mar 4 15:27:27 2012 +0800 Remove unused code Change-Id: If931c3162cacaeb126e730e3e79c1c47be4ce434
2016-07-27loplugin:singlevalfields in sc(part4)Noel Grandin
Change-Id: I77bcfc0103f638cd3eddb676ee88a4749bc74b1b Reviewed-on: https://gerrit.libreoffice.org/26687 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-27improve passstuffbyref return analysisNoel Grandin
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c Reviewed-on: https://gerrit.libreoffice.org/27317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-26Resolves: tdf#87474 handle renaming of named expressions/ranges in formulasEike Rathke
Change-Id: If82b62505624c3c259371fa37de1994a94bbceb5
2016-07-26sc: convert SC_SCENARIO_.. defines typed flags ..Jochen Nitschke
ScScenarioFlags add ScScenarioFlags::NONE for 0. replace uses of '-= flag' with '&= ~flag'. Change-Id: I003c0ca1f59b060f52935fec8bb6282fd9981805 Reviewed-on: https://gerrit.libreoffice.org/27464 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-25new loplugin overrideparamNoel Grandin
verify that parameters on override methods have the same set of default values for their params as their parent/super-methods do. Change-Id: Ibdbc1c6e417fbaa680ea025a6bbf5ba9c2e5bcd2 Reviewed-on: https://gerrit.libreoffice.org/27437 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-25sc: remove ScPointerChangedHint classJochen Nitschke
nFlags is never set, ctor was removed in commit 716636d558e9cc9b910da6d127314d2b20cdf0b6 Change-Id: Id1a608999042ff29b26162fddccaa35806a3e9e6 Reviewed-on: https://gerrit.libreoffice.org/27488 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-22sc: remove unused ScCloneFlags: Adjust3Drel and NoCaptionJochen Nitschke
ScTokenArray::ReadjustRelative3DReferences() is unused now and is removed too Adjust3Drel got obsolete with commit 3f41b12c6685b82b5c2674bd9b9d5991adebeaf9 SwapRow() is no more! NoCaption got obsolete with commit c06dbbe7594c2a0b5a5b19f8e183d9c421e6e094 remove mpNote from ScBaseCell Change-Id: I0e21a80ad06b2f0cb1346cf2eeeabbb7cce9d6e9 Reviewed-on: https://gerrit.libreoffice.org/27439 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-07-22sc: convert SC_CLONECELL_... to typed_flagsJochen Nitschke
Change-Id: I4ce14eecaa9fbdc007bbb39f0543099c75f2ffcb Reviewed-on: https://gerrit.libreoffice.org/27428 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-22sc: convert MatrixEdge... to typed_flagsJochen Nitschke
remove some unhelpful or obvious comments replace numeric values in last loop of ScTable::HasBlockMatrixFragment Change-Id: If7115b504689ce31b5caadbcae8ce2f5466e5b2a Reviewed-on: https://gerrit.libreoffice.org/27378 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-21move setter implementation from .hxx to .cxxEike Rathke
Change-Id: I78d5d6955b98d6fb8fed4d3b705091d46e1047e3
2016-07-21directly set eFormulaSearchType if regex or wildcards are set to trueEike Rathke
... and setting false to false doesn't changge anything. In both cases we don't need to call ConvertToSearchType() in GetFormulaSearchType() later. Also, in GetFormulaSearchType() check if both, bFormulaRegexEnabled and bFormulaWildcardsEnabled are true, which souldn't happen if the setters are used, but ... Change-Id: I58c4519e102a3d8d05c8816d059361ce3dda294f
2016-07-20RegularExpressions and Wildcards are mutually exclusive, tdf#88581 follow-upEike Rathke
... so treat them as such. This fixes the UNO API JunitTest that tries to enable RegularExpressions with the now default enabled Wildcards config, which then overrode the RegularExpressions when queried and returned false. Change-Id: I85f7617a20d4cc392e1ce34bcb2d14792f6d4170
2016-07-20sc: remove CHAR_CR defineJochen Nitschke
Change-Id: Ief0ef8916166d479e868fc56887aa788aae63260 Reviewed-on: https://gerrit.libreoffice.org/27327 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-19clang-tidy performance-unnecessary-value-param in scStephan Bergmann
Change-Id: I1941c050a385e3a1020c5d2495471f5805c4c180
2016-07-19sc: convert SC_DROP_* defines to typed flagsJochen Nitschke
flags are stored by ScTransferObj and ScDrawTransferObj in members nDragSourceFlags, implemented in the same way by both classes. set only in ScTabControl::DoDrag() and ScContentTree::DoDrag(). convert to typed_flags ScDragSrc and move flags closer to users, from sc/inc/scmod.hxx to sc/source/ui/inc/viewdata.hxx Change-Id: I15f58a5c828e154114971a1fcf941a3e27acbd56 Reviewed-on: https://gerrit.libreoffice.org/27303 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-19sc dif import: plain number formatter is unusedJochen Nitschke
commit 2cb7d3c13cc55d8ee680fe19d99819529d8b9ba5 revealed DifOptions is always set to DifOptions::Excel, so DifParser.bPlain is never true. remove import with plain number formatter and DifOptions enum Change-Id: I8e214f3fff8ecfc7e03622dd1fe3fb53c2fb1e25 Reviewed-on: https://gerrit.libreoffice.org/27277 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-18sc: convert SC_DIFOPT_* defines to typed_flagsJochen Nitschke
Change-Id: Ic4ec298fa9147edf8fda20fbcceebf6b803b342d Reviewed-on: https://gerrit.libreoffice.org/27271 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-17Use mdds' event callback to count formula blocks in each column.Kohei Yoshida
And use it to speed up certain formula related operations. Change-Id: I43b1d860d6b665556624ba7bc716826799919015 Reviewed-on: https://gerrit.libreoffice.org/27261 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2016-07-13Moved SfxModule owner to SfxApplicationMark Page
::GetAppData replaced with SfxApplication::GetModule that now returns SfxModule* SfxModule no longer registers self for ownership instead it is now registered using SfxApplication::SetModule Change-Id: Ifbbe1b2b4c5122da8e643b7926d47878d116c6c8 Reviewed-on: https://gerrit.libreoffice.org/26914 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-10ditch the font/screen-scaling thingCaolán McNamara
its of limited utility wrt the vcl layout work and optimal size widgets, and its confuses people looking for hidpi settings Change-Id: I37d21b480446f9fe2845b3a2d9fd59cdeddf1a93
2016-07-08Resolves: tdf#100452 class Date full (BCE,CE) proleptic Gregorian calendarEike Rathke
... implementing signed years with year 0 gap. Date(31,12,-1) last day BCE Date(1,1,1) first day CE New class Date member functions: * AddYears(sal_Int16) to be used instead of aDate.SetYear(aDate.GetYear()+sal_Int16) to handle year 0 gap. * convenience GetNextYear() to be used insted of GetYear()+1 * convenience GetPrevYear() to be used insted of GetYear()-1 * AddMonths(sal_Int32) * operator=(const css::util::Date&) New class DateTime member functions: * operator=(const css::util::DateTime&) Made some conversion ctors explicit, specifically Date(sal_Int32) Adapted hopefully all places that used a sal_uInt16 year to use sal_Int16 where appropriate. Eliminated some quirks in date handling found on the fly. Added era handling to i18npool icu calendar setting interface, which missing was responsible for 0001-01-01 entered in Calc being set as -0001-01-01, hence subtracting one day resulted in -0002-12-31. Change-Id: I77b39fba9599ebd5067d7864f6c9ebe01f6f578f Reviewed-on: https://gerrit.libreoffice.org/27049 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-07loplugin:passstuffbyref also for {css::uno,rtl}::ReferenceStephan Bergmann
Change-Id: I2707d16e6dd7bc5617094963933fced147a496e8
2016-07-04Resolves: tdf#90285 during sheet copying the old sheets retain their old indexCaolán McNamara
at the point that ScDocument::CopyTab calls StartListeners so when void ScColumn::StartListening(sc::StartListeningContext& rCxt... calls rCxt.getBlockPosition(nTab) it calls it with the old nTab index in ScDocument::maTabs, so the return block position is not correct. Here I bubble down the requested ScAddress and use its Tab/Col/Row members rather than trust the members of the indexed-into elements Change-Id: I291e8c1146c2caa4d0976780b1ee6bcc41994e3c Reviewed-on: https://gerrit.libreoffice.org/26552 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2016-07-04comphelper::OBaseMutex -> cppu::BaseMutexNoel Grandin
convert usage of deprecated class, and remove the old class Change-Id: I19fb9271090d19e5531622b58492e1a848d306e2 Reviewed-on: https://gerrit.libreoffice.org/26843 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-27SfxProgress::SetState always returns trueStephan Bergmann
Change-Id: Ib606b0391f814ea9ff4383397a40a8a692563fa3
2016-06-21Remove no longer needed vcl::ITiledRenderable::registerCallback()Miklos Vajna
All clients has been changed to use SfxViewShell::registerLibreOfficeKitViewCallback() instead. Change-Id: I2538268dc9c4b449f68b5d2b05a72de584c29fd0 Reviewed-on: https://gerrit.libreoffice.org/26540 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-17comphelper lok: remove the g_bViewCallback globalMiklos Vajna
Its purpose was to allow incrementally migrate all callers of SdrModel::libreOfficeKitCallback() to use SfxViewShell::libreOfficeKitViewCallback() (which allows notifying only the currently active or all views) instead. That is done by now, so it can go. Change-Id: I521bbbe5c638dfd844ebf025153459a37362d3c3 Reviewed-on: https://gerrit.libreoffice.org/26413 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-15introduce ScMatrix::GetDoubleWithStringConversion() preparing for tdf#100409Eike Rathke
... as GetDouble() returns 0.0 for any string and we don't want to change that, most relevant places already check for numeric/text beforehand. Change-Id: Ifbc04e892f6f504040026042faa38674ced880fb
2016-06-14intern SharedStringEike Rathke
Change-Id: Ic8e6d3595002094792462b585d427f58c5c84156
2016-06-14explicit svl::SharedString(const OUString&) ctorEike Rathke
... to prevent accidental surprises. Not interned shared strings constructed from OUString have mpDataIgnoreCase=nullptr so can't be used for case insensitive comparison. Change-Id: I03323354298a73e93b18d2796ec447c072fdefa5
2016-06-09sc: eeek, a boost::ptr_vector! take it off! take it off!Michael Stahl
Change-Id: I3fffecd295577cc8eaa521e819b3c922f8c3f56e
2016-06-09tdf#100257 - Data : XML Source does not workNoel Grandin
Revert "sc: boost::ptr_vector->std::vector" This reverts commit 280553e30f4ddc932838f98a9efaac03a988a0df. Change-Id: Ia50c9cf7902e2e830c6e7f7a13c8f04341556e6c Reviewed-on: https://gerrit.libreoffice.org/26106 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-09change number format for formula results if of different typeEike Rathke
... so =IF(B1,B1) changes from FALSE to the content of B1 instead of TRUE if B1 was empty or 0 on the first run but another value on the next run, with some logic to not override user applied formats. Change-Id: I0207adf0d71844f7bc2bb0f51ff308cca65aec52
2016-06-08Let loplugin:passstuffbyref also look at fn defn not preceded by any declStephan Bergmann
Change-Id: I752bc96d2d521d790e919283cabb14b6526626f4
2016-06-08remove some manual refcounting in scNoel Grandin
Change-Id: Ie13b28ffaf861dc85063e5a4b23fef8c929033d9 Reviewed-on: https://gerrit.libreoffice.org/26006 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-06Resolves: tdf#35247 introduce a locale independent numeric field filterEike Rathke
... that tries to match a locale independent query string. Going via string queries is likely only necessary for the ugly alternative "fieldname[member]" syntax, if it is actually unnecessary for the field1,item1,... syntax needs to be evaluated and if so a distinct GetPivotData() function evaluating numeric contraints as well could be introduced. Change-Id: I2c1fc81c1022b0bba5eef8d86c0c815bb6e31f2d Reviewed-on: https://gerrit.libreoffice.org/25975 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2016-06-06remove unused constants in HRC filesNoel Grandin
Change-Id: Ia034fb16ce75caeb69fd746d4a602cd5fcfef6d1 Reviewed-on: https://gerrit.libreoffice.org/25817 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-06remove some manual ref-countingNoel Grandin
triggered when I noticed a class doing acquire() in the constructor and then release() in the destructor. found mostly by git grep -n -B5 -e '->release()' Change-Id: I96e43a3d30ffd9ae9a34275f24cd914d8f7b026f Reviewed-on: https://gerrit.libreoffice.org/25806 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-03Resolves: tdf#98880 ensure backing context of DoubleVectorRefToken...Caolán McNamara
exists for the lifetime of the ScGroupTokenConverter otherwise in tdf#98880 ScDocument::InterpretDirtyCells releases that backing storage that the DoubleVectorRefToken relies on, and the ScVectorRefMatrix relies on that, so... when sc/source/core/tool/interpr4.cxx calls ::IsString on the ScVectorRefMatrix which calls ensureFullMatrix. That makes use of rArray.mpStringArray where rArray's mpStringArray is set to that rArray by FormulaGroupContext::ensureStrArray and the storage of mpStringArray belongs to the FormulaGroupContext, but that context was reset and destroyed up the stack in ScDocument::InterpretDirtyCells so the data is now invalid We could turn the unique_ptr into a shared_ptr and have the ScGroupTokenConverter take a ref to the currently active FormulaGroupContext to ensure any generated DoubleVectorRefToken/SingleVectorRefToken point to valid data during the lifetime of the ScGroupTokenConverter Change-Id: Id457934cdff18570961cb261cf5c46b6ef8ea083 Reviewed-on: https://gerrit.libreoffice.org/25815 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-06-03loplugin:constantparamsNoel Grandin
Change-Id: Ib162ba9297b9d900ea42c7e5216e152d3e58a361 Reviewed-on: https://gerrit.libreoffice.org/25769 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-01notebookbar: working number format listboxSzymon Kłos
Change-Id: I1555934646148b9cd4164cbaaf09dcb9affe861e Reviewed-on: https://gerrit.libreoffice.org/25579 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-05-31tdf#100160 - Changing OpenCL state doesn't update sheetMarco Cecchetti
now we re-check for vectorization state of formula token each time OpenCL is enabled or disabled Change-Id: I652397dd154f5fbf788cb511c70e53a47cc94293
2016-05-30actually multiple destination sheets are handled, tdf#97158 follow-upEike Rathke
... so ScMarkData doesn't need to be passed. Which it wasn't anyway because the destination sheet span is part of CopyFromClipContext. Change-Id: I0addd370d96ab78b22ed957081a1212fc70419a1
2016-05-30Resolves: tdf#97158 CopyOneCellFromClip() does not handle multiple sheetsEike Rathke
... so check that and bail out to let the remainder of CopyFromClip() handle it. Change-Id: I9d139de905fd108ae41fed79a38860058525272c
2016-05-26sc lok bccu#1610 - Tiles not rendering in large spreadsheetsAshod Nakashian
Variable max info rows instead of hard-coded allows for collecting info on more rows. FillInfo, however, is extremely slow for large row count (a few thousand) and needs improving. Reviewed-on: https://gerrit.libreoffice.org/25293 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 4c338a328d6be0450bfdcb08876abfd149cb80ca) Change-Id: Ib0e475513bc3ba98fff66a5b9d405aeba1057331 Reviewed-on: https://gerrit.libreoffice.org/25423 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>