summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2017-07-21tdf#43157 - Clean up OSL_ENSURE and OSL_FAIL in sc/filter/lotusAlbert Thuswaldner
Change-Id: I88e794752dff1bd46faac71234322d603c10bed9 Reviewed-on: https://gerrit.libreoffice.org/40075 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-07-21Moving legacy contexts to FastContexts:Mohammed Abdul Azeem
ScXMLTableShapesContext ScXMLTableSourceContext ScXMLTableColContext ScXMLTableColsContext ScXMLConditionalFormatsContext ScXMLTableProtectionContext Change-Id: I36704c7f51cd5d13b3c0ebf9bc07b172c1576f3e Reviewed-on: https://gerrit.libreoffice.org/40246 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-20Obtain days using GetInt32()Eike Rathke
Change-Id: I1f23c1e7f0fee6ffe90b3f5b094a7a672fc7ff0d
2017-07-20Obtain days using GetInt32() instead of casting floorEike Rathke
... so out of range arguments result in error. Change-Id: Iaea943719681019b7d5f4393540655243bcb2ca4
2017-07-20Another attempt to blind fix tdf#108612Eike Rathke
Oddly in that scenario on Windows there are two clipboard documents alive when destroying one, so the destroyed one erroneously is said to be a clipboard source and then detachs the comments' caption information. There's no legit case where a clipboard document could actually be the real original source of another clipboard document, so bail out if the caller already is one. Change-Id: I0f8d240d8ec13bf91b77176dc6439a541cf14eaa
2017-07-20Avoid unnecessary calls of AdjustRowHeightTamas Bunth
Check if attribute changed during ApplyAttributes. If it did not change, it is unnecessary to recalculate cell size, repaint etc. Change-Id: Ic3a3fa24efa9ad3619b8979a67e972a7635311cc Reviewed-on: https://gerrit.libreoffice.org/40198 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-07-19Fix crash when saving new spreadsheet as dBase/.dbf, tdf#108789 follow-upEike Rathke
... as there is no input stream. Regression from commit 7f1465a9599e9665159dd2d823a6e9064cca5703 Date: Sun Jun 25 17:21:45 2017 +0200 Change-Id: Ib97a4878fe8cf28e5d0f1dc6cc07800ea1635e68
2017-07-19Avoid temporary Date and normalizationEike Rathke
Rather than possibly calculating Date=((Date=(Date+int))+int) with a normalization involved for each operator+() force Date=(Date+(int+int)) Change-Id: I6c4b30749d138c0b041ffc9e37796b6f64b6d461
2017-07-19Don't calculate GetDayOfWeek() thriceEike Rathke
Change-Id: Ia1f7689448f8a9ea9e5c1a6e3b1949ee2065c827
2017-07-19Change the most obvious Date+=(long)... to Date+=static_cast<sal_Int32>(...)Eike Rathke
Simple search git grep -l 'Date.*[+-].*[(<] *long *[>)]' Since commit f5b0cc2a3690ba963b3f150886e1d5ddddee9530 Date: Sat Jul 1 16:01:15 2017 +0200 Date operators +,-,+=,-= have sal_Int32 operands instead of long. Change-Id: I2387cbceadcb056831225e4111353980d50a94d4 Reviewed-on: https://gerrit.libreoffice.org/40163 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-07-19tdf#108881 : do not assume that chart objects always...Dennis Francis
...have data ranges associated with it. Empty charts do not have data ranges. Reverts the part of c55d52262ea1d5f869a9528fd051ee19e687f1cc which makes this assumption. Matching test cases (in uitest) coming up soon in another commit. Change-Id: I60f0f03a8c937ecfdff95047bdfeeb7733eff4a4 Reviewed-on: https://gerrit.libreoffice.org/40057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-07-19tdf#93328 : Assign the ScInterpreter results back to ScFormulaCell...Dennis Francis
when the formula cell type is unknown before interpreting, otherwise the cell is treated as of type string later when used by the interpreter. Added unit-test testIterations() in ucalc that tests the establishment of circular chain of references and editing of a formula cell that already belong to the circular chain. Change-Id: Ib13b05b20d17c0696fce0ac9eefd9e621bdc0c5f Reviewed-on: https://gerrit.libreoffice.org/40165 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-07-19vbaapi: File dialog produces pathTamas Bunth
instead of file url Change-Id: I6f4cab23edd1fabe93290a26adc5fb77f2a55e8b Reviewed-on: https://gerrit.libreoffice.org/40170 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-07-18Eliminate some unnecessary temporary Date instancesEike Rathke
Change-Id: Idede71608458acf4d23504b3a6a1cba557f370d1
2017-07-18Change nonsense non-const Date* GetNullDate() to const Date&Eike Rathke
* 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-18No reason to silently misbehave when these UNO services are missingStephan Bergmann
...which e.g. made it unnecessarily hard to track down 7a23668e4f4e235c7a4e1c99e38506bd9c874be8 "Fix CppunitTest_cppcanvas_emfplus" Change-Id: I2f537fabb067b77e82b900bd2cba30fd65c275aa
2017-07-18Address b0210c34dcaa5fc44956078ffa1dfe734d379224 nitpicks, tdf#43157 follow-upEike Rathke
Change-Id: I3c70225f4d19ea85a54026e8eb78ba729acd6dfd
2017-07-18fdo#43157 convert OSL_ASSERT to assert in sc/source/filterBernhard Widl
Change-Id: I3d6d3da69ed7539dacf7eaf82fa7633f85619b39 Reviewed-on: https://gerrit.libreoffice.org/39366 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-07-18Moving legacy contexts to FastContexts:Mohammed Abdul Azeem
ScXMLNullDateContext ScXMLIterationContext ScXMLContentValidationContext ScXMLHelpMessageContext ScXMLErrorMessageContext ScXMLErrorMacroContext Change-Id: Ic2a4f038891aefbb94b1d9ada96da7c139c6c9fe Reviewed-on: https://gerrit.libreoffice.org/40012 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-07-18Clean up android specific template functions defined in std namespacebrainbreaker
Change-Id: I2094ee8eec00587f166d96723a02eb5957dbf79b Reviewed-on: https://gerrit.libreoffice.org/39890 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-17Translate randomly found German commentsJohnny_M
Change-Id: I7db515e04d3845c3ec51c7f88fe51bcafddd5268 Reviewed-on: https://gerrit.libreoffice.org/39987 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-07-17Fix typosAndrea Gelmini
Change-Id: I9d2c641b485c32ddccf0bfaaed1d0796572d1d33 Reviewed-on: https://gerrit.libreoffice.org/39477 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2017-07-17ScAddress aPos is already available, use itEike Rathke
Change-Id: I5d7cb8a4263b454438e7af45192f9008f283150d
2017-07-17Temporary ScAddress is unnecessary when constructing ScRangeEike Rathke
Change-Id: I9160eb2c0fe79a5a56b4a4e524d163133f6dc65b
2017-07-17ScRange has a col,row,tab ctor, use it instead of a temporary ScAddressEike Rathke
Change-Id: I4d095d00254abac3675c2e369ca37df6abd3d341
2017-07-17Resolves: tdf#75650 reset boolean number format to General for new formulaEike Rathke
Change-Id: Iec2feefcbb5a92c64f182d93b4055fc009dbe1e5
2017-07-17extend loplugin useuniqueptr to OUString pointersNoel Grandin
Change-Id: Ieb5bab3895e1edaff497c4a1a88303ccac097edc Reviewed-on: https://gerrit.libreoffice.org/39948 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-15coverity#1415092 Logically dead code (golden)Caolán McNamara
this was detected after commit 85ff2eafc692f6f0d33ac611600935a96058f20a Date: Thu Jul 13 23:32:46 2017 +0530 Moving legacy contexts to FastContexts: but exists since commit 3d23002b6c1189e18922dbcbfbd5d271ecd09c2a Date: Tue Sep 4 05:26:24 2001 +0000 #91850#; fix the problems of called assertions which resulted in... else if (IsXMLToken(aLocalName, XML_TYPE)) { if (...) ... else if (IsXMLToken(aLocalName, XML_TABLE)) nActionType = SC_CAT_DELETE_TABS; } ScXMLInsertionContext::ScXMLInsertionContext though doesn't suffer from this Change-Id: I8c5fced7a81d892cc6208a1d9a2c78a692e02090 Reviewed-on: https://gerrit.libreoffice.org/39998 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-15use unique_ptr for ScMyLabelRangeJochen Nitschke
Change-Id: Ib54d28024d5f853c6f54600222be7a4285873a9b Reviewed-on: https://gerrit.libreoffice.org/39986 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-15emfplus: create a wmf/emf/emf+ primitive based importerArmin Le Grand
First steps to organize an importer that can read/interpret wmf/emf/emf+ and deliver a primitive representation for the content by parsing it. Use the same mechanisms as already applied for Svg, so to reuse abilities to keep original binary data to allow save again and embedding in files and have an implemented replacement bitmap based representation. For this, unify the used helper classes to handle more than just Svg. For 1st try, add test code and static bool switches Change-Id: I6e0a82943541d811a8f8d65a84115569fcd8cee7
2017-07-14implement Application.FileDialog attributeTamas Bunth
Documentation: https://msdn.microsoft.com/en-us/vba/excel-vba/articles/application-filedialog-property-excel https://msdn.microsoft.com/VBA/Office-Shared-VBA/articles/filedialog-object-office Using FilePicker and FolderPicker uno services. Change-Id: Ifd3b3fc9c135efb0663d2ef36ecbe2b2fbe6132f Reviewed-on: https://gerrit.libreoffice.org/39806 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-07-14Assert non-empty sheet nameEike Rathke
Change-Id: I6794d134a6f0d1f1b1531782c5f8011ce322085b
2017-07-14Fix export test crash of ooo95715-1.xlsEike Rathke
Negative sheet number injected by sc::FormulaLogger::GroupScope::addRefMessage() wans't handled by lcl_Format() #9 0x00007f292172c322 in ScGroupTokenConverter::convert (this=0x7ffc5b1940d0, rCode=..., rScope=...) at /build/libo/dev/sc/source/core/data/grouptokenconverter.cxx:140 #8 0x00007f29224c54d8 in sc::FormulaLogger::GroupScope::addRefMessage (this=0x7ffc5b193ff0, rCellPos=..., rRefPos=..., nLen=111, rArray=...) at /build/libo/dev/sc/source/core/tool/formulalogger.cxx:147 #7 0x00007f292181c071 in ScRange::Format (this=0x7ffc5b193dc0, nFlags=-32760, pDoc=0x4b1db70, rDetails=..., bFullAddressNotation=false) at /build/libo/dev/sc/source/core/tool/address.cxx:2211 #6 0x00007f292181b9a9 in ScAddress::Format (this=0x7ffc5b193dc0, nFlags=-32760, pDoc=0x4b1db70, rDetails=...) at /build/libo/dev/sc/source/core/tool/address.cxx:2111 #5 0x00007f292181ecf5 in lcl_Format<rtl::OUStringBuffer> (r="", nTab=-1, nRow=75, nCol=0, nFlags=-30968, pDoc=0x4b1db70, rDetails=...) at /build/libo/dev/sc/source/core/tool/address.cxx:2018 #4 0x00007f29214471fb in rtl::OUString::operator[] (this=0x7ffc5b193c00, index=0) at /build/libo/dev/include/rtl/ustring.hxx:668 Change-Id: I68ecfb11574644e9e5670431789ee42d37d27523
2017-07-14extend loplugin useuniqueptr to POD typesNoel Grandin
Change-Id: I6ff24f048bd8f75bf87a78b718f37b57855d4781 Reviewed-on: https://gerrit.libreoffice.org/39932 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-14use more OUString::operator== in scNoel Grandin
Change-Id: I1a7691fe59e5e93c15bd812f03366da814f9f3db Reviewed-on: https://gerrit.libreoffice.org/39900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-14Moving legacy contexts to FastContexts:Mohammed Abdul Azeem
ScXMLTrackedChangesContext ScXMLChangeInfoContext ScXMLBigRangeContext ScXMLCellContentDeletionContext ScXMLDependenceContext ScXMLDependingsContext ScXMLChangeDeletionContext ScXMLDeletionsContext ScXMLChangeCellContext ScXMLPreviousContext ScXMLContentChangeContext ScXMLInsertionContext ScXMLDeletionContext ScXMLMovementContext ScXMLRejectionContext Change-Id: I13b657efa47bd037e9f83c39ba8fd0f6b7edba1c Reviewed-on: https://gerrit.libreoffice.org/39927 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-13tdf#108758 : do not write to undo document when...Dennis Francis
...updating references during a block move, for formula cells that are in the target range of the move operation. The fix is for formula cells that are not grouped. For the grouped case, it was already doing correctly. Added two unit tests in ucalc_formula.cxx for grouped formula and non-grouped formula cases. Change-Id: I9f4d988f5e154f56670bd1c0cc366ee6704fb858 Reviewed-on: https://gerrit.libreoffice.org/39883 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-07-13Reorganize Scheduler priority classesJan-Marek Glogowski
This is based on glibs classification of tasks, but while glib uses an int for more fine grained priority, we stay with our enum. 1. Timers start with DEFAULT priority, which directly corresponds with the previous HIGH priority 2. Idles start with DEFAULT_IDLE priority instead of the previous HIGH priority, so idle default becomes "really run when idle". As RESIZE and REPAINT are special, and the DEFAULTS are set, there is just one primary decision for the programmer: should my idle run before paint (AKA HIGH_IDLE)? If we really need a more fine-grained classification, we can add it later, or also switch to a real int. As a result, this drops many classifications from the code and drastically changes behaviour, AKA a mail merge from KDE is now as fast as Gtk+ again. Change-Id: I498a73fd02d5fb6f5d7e9f742f3bce972de9b1f9
2017-07-13Move scheduler task into its own headerJan-Marek Glogowski
Change-Id: I54534787b8cfa4c47dc09dde9c38a7893df9d367
2017-07-13improve useuniqueptr loplugin to find arraysNoel Grandin
Change-Id: I81e9d0cd4f430b11d20037054055683240792240 Reviewed-on: https://gerrit.libreoffice.org/39825 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-13loplugin:oncevar: empty strings: scStephan Bergmann
Change-Id: I8eca50560d9ce0a3be5ffe6a4a88cb0de5d5d451
2017-07-13loplugin:useuniqueptr in scNoel Grandin
Change-Id: I004e1f0292c8a40515880546574255ab835dbdbe Reviewed-on: https://gerrit.libreoffice.org/39875 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-12Eliminate trailing blanks from descriptions and some parameter namesEike Rathke
... where they don't belong, ie. at non-repeating parameters that don't get numeration appended in UI. Change-Id: I1516185978fecfbadcf2836eb60530b456c4d041
2017-07-12borderline: correct problems with border displayArmin Le Grand
Borderline display with direct paint and with primitive direct paint has quite some errors in the current state. Started to unify usages, check deeper with creation/usage. borderline: deep changes to BorderLine Found basic error in determining the offset values for BorderLinePrimitive creation, these were not centered on the lines. Corrected that. This makes it possible to remove the formally used clipping which seems to have been used to correct that. Also allows to go back to a 'normal' decomposition that creates line primitives as expected. That again can then be painted quite normally. Also added view-dependent case to the decomposition to guarantee a gap of one discrete unit (pixel). Removed the direct painter, too. Checked and corrected stroking. borderline: Adapted previews to primitives Added code to use the primitive representation in all dialogs and apps using tables. The edit views use these mostly, so the preview should do that, too. Currently missing is a good visualization of diagonals, but this is also true for edit views. Checked all apps and table usages to not get worse borderline: correct line dash visualization When a dashed line is used, a factor of 10.0 was applied in the original coded, added that. Also the orientation of vertical borders was inverted since it was simpler to exchange Start/End, but this also mirrors the line dash visualisation, corrected that Change-Id: I4c1b380a76cb37389fab1259a53fb7cc9da982d1 e95e246d5563360617a2a2213e4d5ec7d0e736b9 62369b4de58fb0264aeb710ec6983ceddca5701d 77418cc6c84ebb0632f8c3448976e82ce612d6b6 b4eb28dc86ce05eb89b26517167305b994158ef8 borderline: adapt cppunittest and clang
2017-07-12loplugin:unreffunJan-Marek Glogowski
Fix some HAVE_MORE_FONTS dependent tests. Change-Id: I79fec705d02b38222d66368759a95b667604335c
2017-07-11replace 'resize(size+1)' with emplace_backNoel Grandin
which is considerably faster if we're dealing with a std::list, and just easier on the eyes if we're dealing with a std::vector Change-Id: I373689205ebc048689f29ab80a7ee8551b20cc96 Reviewed-on: https://gerrit.libreoffice.org/39816 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11Introduce IFormulaEditorHelper::createCompiler()Eike Rathke
For application specific derivatives. Change-Id: I8af95bd120c642e47ec5d0708ed463c98c471567
2017-07-11simplify calls OUString::copy in foo.copy(x, foo.getLength() - x)Noel Grandin
Change-Id: I20318c77dcc3bc2a64336541ef5a3f412bfd9483 Reviewed-on: https://gerrit.libreoffice.org/39803 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11simplify some OUString::copy callsNoel Grandin
Change-Id: Ifa228ca02ea79a1309e1875414028aade7e5f12d Reviewed-on: https://gerrit.libreoffice.org/39801 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11use more range-for on uno::SequenceNoel Grandin
Change-Id: Ifad32425d79be5a22d33d721bdc5fb993f699759 Reviewed-on: https://gerrit.libreoffice.org/39763 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>