summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2017-09-30work around clang-cl ABI bug PR25641Stephan Bergmann
<https://bugs.llvm.org/show_bug.cgi?id=25641> "clang-cl: vtordisp thunks not emitted for functions with class template specializations in their signatures". Change-Id: I4f9a9777ba7486a026cb3b34340fa5b78f210f05 Reviewed-on: https://gerrit.libreoffice.org/42949 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-29ofz#3487 further limit ScMatrix elements allocationEike Rathke
To 85M elements per matrix. The effective allocation depends on data types and distribution and is not statically predictable here. Previous limit (allowing 128M elements) in the fuzz case allocated 6.5GB temporarily, it now fails early with matrix size error. With the case's string data types and changed input ranges probably still 4GB could be allocated. Change-Id: I20ab3cf22705bf022f1c8c8e55b1c412380915dd
2017-09-29sc: fix loplugin:unnecessaryoverride warningMiklos Vajna
Change-Id: I3b7e7a5dae9f393e3388bc5a3ab3666f116570ab
2017-09-29Get rid of some pointless cleanups that fail anyway occasionallyTor Lillqvist
Change-Id: I758b4452bdf0cfcc75280a73993f219a57072e41
2017-09-29Try to work around GCC 4.8.1 problemTor Lillqvist
Move the definition of the static thread_local members of ScInterpreter to the source file where its constructor is. Also, the only users of those members are in that file, so it is logically a better place anyway. Change-Id: I651b15abc83cc49edebbe8e3f982c3b3e6cc8799
2017-09-29check for unnecessary DLLPUBLIC annotationsNoel Grandin
on classes which are fully defined in a header file Rename the dllprivate plugin to dllmacro and add the functionality there. Change-Id: I4581d551c46a8f61213d95973f323359d08278d8
2017-09-29convert IsEqual/etc methods on ESelection to operatorsNoel Grandin
Change-Id: Ia8424e701b6f22d0536ee7f3bdb0ecaaed94a3b9 Reviewed-on: https://gerrit.libreoffice.org/42904 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-29loplugin:flatten check for throw in then clauseNoel Grandin
also make the plugin ignore the case where we have var decl's in the clause we want to flatten, which could lead to problematic extension of variable lifetime Change-Id: I3061f7104e8c6a460bf74f5eac325a516ec50c59 Reviewed-on: https://gerrit.libreoffice.org/42889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-28Remove dead code behind Calc "Live Data Streams" dialog's "scriptdata" buttonStephan Bergmann
...that has been disabled and hidden ever since 4c90ed782a09e2e4b8738b82028032c42d1a203d "Actually hide these two radio buttons (since there is no choice now)." This removes the sole user of SvScriptStream. (Unfortunately, removing the no longer needed #include <osl/process.h> from include/tools/stream.hxx triggered an avalanche of missing includes elsewhere.) Change-Id: I7b0e683b14c0eaf7f4737f62adc9d691826380c0 Reviewed-on: https://gerrit.libreoffice.org/42916 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-09-28The OpenCL XIRR test fails randomly on some machines so bin itTor Lillqvist
We don't even use OpenCL for XIRR normally anyway. Change-Id: I4bd76e9c5a0ad2222bef47d801f956fda1da568c
2017-09-27If we are going to avoid repeated calls to pDocument->GetRecursionHelper(),Tor Lillqvist
do it from the start of the function then. Change-Id: I4699fbd9c70f6ec0110d202062631e8861095aa0
2017-09-27Resolves: tdf#112523 do not use anything Ascii in UI contextEike Rathke
Change-Id: I0854f7b1e6e0bf51d8b4c7d846fad9b0ff25e763
2017-09-27Make pGlobalStack and bGlobalStackInUse thread_localTor Lillqvist
Change-Id: Ie196510f68d7bd0a129b92886dbff8af35c81fe8 Reviewed-on: https://gerrit.libreoffice.org/41659 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-09-27Test also SUMIFS where no row matchesTor Lillqvist
Change-Id: Ifd4ab6f1760a5088744cb728a3e0c970388d8283
2017-09-27Typo: Grafic -> GraphicSamuel Mehrbrodt
Change-Id: Ic5d8ff346dfe66efb9a99e2d23c9cff514e5352a Reviewed-on: https://gerrit.libreoffice.org/42818 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-26Don't use RTL_TEXTENCODING_DONTKNOW in OUStringToOStringStephan Bergmann
CppunitTest_sc_subsequent_export_test would run into that as below, so better find a more suitable encoding here (similar to what RTFDocumentImpl::getEncoding in writerfilter/source/rtftok/rtfdocumentimpl.cxx does to "Guess based on locale"). > rtl::OUStringToOString(rtl::OUString const&, unsigned short, unsigned int) at include/rtl/ustring.hxx:3662 > XclExpHyperlink::XclExpHyperlink(XclExpRoot const&, SvxURLField const&, ScAddress const&) at sc/source/filter/excel/xecontent.cxx:370 > XclExpHyperlinkHelper::ProcessUrlField(SvxURLField const&) at sc/source/filter/excel/xehelper.cxx:307 > (anonymous namespace)::lclCreateFormattedString(XclExpRoot const&, EditEngine&, XclExpHyperlinkHelper*, unsigned short, unsigned short) at sc/source/filter/excel/xehelper.cxx:471 > XclExpStringHelper::CreateCellString(XclExpRoot const&, EditTextObject const&, ScPatternAttr const*, XclExpHyperlinkHelper&, unsigned short, unsigned short) at sc/source/filter/excel/xehelper.cxx:583 > XclExpLabelCell::XclExpLabelCell(XclExpRoot const&, XclAddress const&, ScPatternAttr const*, unsigned int, EditTextObject const*, XclExpHyperlinkHelper&) at sc/source/filter/excel/xetable.cxx:708 > XclExpCellTable::XclExpCellTable(XclExpRoot const&) at sc/source/filter/excel/xetable.cxx:2569 > ExcTable::FillAsTableXml() at sc/source/filter/excel/excdoc.cxx:589 > ExcDocument::ReadDoc() at sc/source/filter/excel/excdoc.cxx:771 > XclExpXmlStream::exportDocument() at sc/source/filter/excel/xestream.cxx:1113 > oox::core::FilterBase::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at oox/source/core/filterbase.cxx:495 > oox::xls::ExcelFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sc/source/filter/oox/excelfilter.cxx:169 > SfxObjectShell::ExportTo(SfxMedium&) at sfx2/source/doc/objstor.cxx:2380 > SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) at sfx2/source/doc/objstor.cxx:1500 > SfxObjectShell::DoSaveAs(SfxMedium&) at sfx2/source/doc/objstor.cxx:1889 > ScBootstrapFixture::saveAndReload(ScDocShell*, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags) at sc/qa/unit/helper/qahelper.cxx:669 > ScBootstrapFixture::saveAndReload(ScDocShell*, int) at sc/qa/unit/helper/qahelper.cxx:691 > ScExportTest::testTdf111876() at sc/qa/unit/subsequent_export-test.cxx:438 [...] Change-Id: Ia8a07336bc6fc39573676c227a551fbfe50a519e Reviewed-on: https://gerrit.libreoffice.org/42789 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-26Rename the basegfx::tools namespace to basegfx::utilsTor Lillqvist
Reduce potential confusion with the global tools namespace. Will hopefully make it possible to remove the annoying initial :: when referring to the global tools namespace. Unless we have even more tools subnamespaces somewhere. Thorsten said it was OK. Change-Id: Id088dfe8f4244cb79df9aa988995b31a1758c996 Reviewed-on: https://gerrit.libreoffice.org/42644 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-09-26tdf#112288 Clarify Reschedule implementationsJan-Marek Glogowski
Application::Reschedule(true) must just process all currently pending events and ignore all new events generated while processing them. In contrast to Scheduler::ProcessEventsToIdle, this way it can't busy-lock the application with background jobs. This way we also can drop nMaxEvents from the Windows backend. This limit was also never implemented on OSX and for the KDE4 backend it's actually impossible to handle single events, and a call to QAbstractEventDispatcher::processEvents works like this. Also changes various call sites to just process all pending events instead of some made up number of times. Change-Id: I1ab95df89b079cc8c6319a808194fe3127144d1c Reviewed-on: https://gerrit.libreoffice.org/42659 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-26close sc and sw docshells tooCaolán McNamara
Change-Id: I2cf06762d50736debd63f385dcae3022412ac0c0
2017-09-26loplugin:flatten in scNoel Grandin
Change-Id: I40653af2d90ef123cf77d7223c520cba0e5a3aca Reviewed-on: https://gerrit.libreoffice.org/42661 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-25Make two slightly mysterious static local variables thread_localTor Lillqvist
IRC discussion about them: tml_: erAck: any idea why in ScFormulaCell::GetMatrixEdge those nC and nR are static? tml_: seems to have been since initial import in 2000 (then in a different file, and of type USHORT) tml_: let's assume it is just random insanity tml_: hmm, no, making them non-static actually breaks a unit test. wow erAck: tml_: they are reused when the call is for the same matrix origin as the last one to not have to recalculate the same thing tml_: erAck: ah ok Change-Id: Ib0fe322492917b5224937ec6ef527707ca2e07f7 Reviewed-on: https://gerrit.libreoffice.org/41658 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-09-25-Werror,-Winconsistent-missing-overrideStephan Bergmann
Change-Id: I1d6d315cea33ba19a7d61f532c9d968d582b476f
2017-09-25ScTokenArray::operator=: assign also mnHashValue and meVectorStateEike Rathke
They now were left cleared, and before Clear() was virtual even left in the previous state. Change-Id: I2a1b5f5db24419645f5716938e0b8da4546d7453
2017-09-25FormulaTokenArray::Clear() virtual, ScTokenArray::Clear() overridesEike Rathke
A sliced Clear()/ClearScTokenArray() was never intended. Change-Id: I25df3fa8829f6bc8f1dee6ef0d27b28491d6a5c3
2017-09-25Clarify comment of "copy"-ctor and operator=()Eike Rathke
Change-Id: I64b5c1384c116ac659fe674adcda142eddf79d5e
2017-09-25Rename GetSelectEntryCount -> GetSelectedEntryCountSamuel Mehrbrodt
Change-Id: I405b347b404ed0acb3b6a0204e0b914a7698ce25 Reviewed-on: https://gerrit.libreoffice.org/42284 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-24tdf#112388 make aComboButton release its ScGridWindow outputdeviceCaolán McNamara
Change-Id: I938e36dda7fbc3b769b3fba8fd9a7d5d9b8e248c Reviewed-on: https://gerrit.libreoffice.org/42716 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-24Fix duplicated context attributes.Kiyotaka Nishibori
The duplication generates invalid .pot file: ./pot/sc/messages.pot. Change-Id: If2a5248ad3226f5cc2e866fdf2033c867943e8b9 Reviewed-on: https://gerrit.libreoffice.org/42702 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-24tdf#106762 Base SvxColorToolBoxControl on svt::PopupWindowControllerMaxim Monastirsky
This allows us to support tearoff without breaking gtk3/wayland. SvxColorWindow no longer inherits from FloatingWindow, so several call sites need also to be changed to use DockingManager. Change-Id: I5d0bc611bbd2a8b9bfd4335212d0ae7e8fc10593
2017-09-23coverity#1418341 Dereference after null checkCaolán McNamara
Change-Id: I525895b3a37a52e05a06ad4f2e1663ecd9d7ce52 Reviewed-on: https://gerrit.libreoffice.org/42692 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-23tdf#112089 add charts to the ShapeMapSzymon Kłos
Charts weren't added to the collection what resulted in missing ids during export (target field). Change-Id: Ie96a4e33a52c5448342a3c3dcec0d8e8b244e270 Reviewed-on: https://gerrit.libreoffice.org/42552 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2017-09-23tdf#86083 Restore old operation buttons but have them hiddenYousuf Philips
Change-Id: I7d006d3d5e22ade59ddfe46f21fbc777a1c75dac Reviewed-on: https://gerrit.libreoffice.org/42684 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Yousuf Philips <philipz85@hotmail.com>
2017-09-22Fresh run of bin/update_pch.shMike Kaganski
Change-Id: I69d4157aaf6570cecd51ea59df20556914942e06 Reviewed-on: https://gerrit.libreoffice.org/42565 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-22tdf#91820 Add insert field commands to Insert menuYousuf Philips
Change-Id: I3b5593cd5b397e0297f67e2bc1b0d1ff6a3a9582 Reviewed-on: https://gerrit.libreoffice.org/41953 Reviewed-by: Yousuf Philips <philipz85@hotmail.com> Tested-by: Yousuf Philips <philipz85@hotmail.com>
2017-09-22loplugin:flatten in pyuno..scNoel Grandin
Change-Id: I7ddc0b76532d26910f78642200750459508c2861 Reviewed-on: https://gerrit.libreoffice.org/42617 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-22Bin leftover SAL_DEBUGTor Lillqvist
Change-Id: I452909cc1f0529ecb24b1f705a86a0a8bc1a3c9f
2017-09-22ofz: don't leak in face of exceptionsCaolán McNamara
Change-Id: Ic15590a13bd3770ee5dd7db76b21c830a4fe73e2 Reviewed-on: https://gerrit.libreoffice.org/42587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-21tdf#112501: Pivot table: popupbuttons are placed on wrong cellsTamás Zolnai
...imported from XLS Change-Id: I45bc4a0182e6a62471bc02ac1bca31f9735e6566 Reviewed-on: https://gerrit.libreoffice.org/42508 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-09-21Rename GetSelectEntryPos -> GetSelectedEntryPosSamuel Mehrbrodt
Change-Id: I0bd4cb463575af843c72d9c8aaf91742203532a4 Reviewed-on: https://gerrit.libreoffice.org/42283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-21Rename GetSelectEntry -> GetSelectedEntrySamuel Mehrbrodt
Change-Id: Ibb7d8c59c0e61b0e87455bd78f241d8691dd9dce Reviewed-on: https://gerrit.libreoffice.org/42282 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-21add fods fuzzerCaolán McNamara
Change-Id: I3cc5a0d8bb24dd33b63ed82866a4acfb7a2dd043 Reviewed-on: https://gerrit.libreoffice.org/42459 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-21ScXMLImport dtor deleted pSolarMutex before SvXMLImport dtor is calledCaolán McNamara
so if there are still ScXMLDatabaseRangesContext on the import stack, i.e. exception thrown during ScXMLDatabaseRanges import, then stuff crashes ================================================================= ==23249==ERROR: AddressSanitizer: heap-use-after-free READ of size 8 at 0x6020001c3190 thread T0 SolarMutexGuard::~SolarMutexGuard() /src/libreoffice/include/vcl/svapp.hxx:1420:9 ScXMLImport::UnlockSolarMutex() /src/libreoffice/sc/source/filter/xml/xmlimprt.cxx:1916:13 ScXMLDatabaseRangesContext::~ScXMLDatabaseRangesContext() /src/libreoffice/sc/source/filter/xml/xmldrani.cxx:64:19 ScXMLDatabaseRangesContext::~ScXMLDatabaseRangesContext() /src/libreoffice/sc/source/filter/xml/xmldrani.cxx:63:1 destroy /usr/local/bin/../include/c++/v1/memory:1838:64 __destroy<rtl::Reference<SvXMLImportContext> > /usr/local/bin/../include/c++/v1/memory:1706 destroy<rtl::Reference<SvXMLImportContext> > /usr/local/bin/../include/c++/v1/memory:1574 std::__1::deque<rtl::Reference<SvXMLImportContext>, std::__1::allocator<rtl::Reference<SvXMLImportContext> > >::pop_back() /usr/local/bin/../include/c++/v1/deque:2604 pop /usr/local/bin/../include/c++/v1/stack:212:19 SvXMLImport::~SvXMLImport() /src/libreoffice/xmloff/source/core/xmlimp.cxx:418 ScXMLImport::~ScXMLImport() /src/libreoffice/sc/source/filter/xml/xmlimprt.cxx:769:1 freed by thread T0 here: #0 0x6164a0 in operator delete(void*) /src/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:126 #1 0x6254e3 in ScXMLImport::~ScXMLImport() /src/libreoffice/sc/source/filter/xml/xmlimprt.cxx:787:5 #2 0x6259cc in ScXMLImport::~ScXMLImport() /src/libreoffice/sc/source/filter/xml/xmlimprt.cxx:769:1 Change-Id: Ia72284f99e2e2efe4f1f9e57b1483c0f1333274d Reviewed-on: https://gerrit.libreoffice.org/42502 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-21update calc notebookbar styles drop down and context-EditCell fixandreas kainz
Change-Id: Iaa3242120f250fb75946c8c3c448364a54203db8 Reviewed-on: https://gerrit.libreoffice.org/42342 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Heiko Tietze <tietze.heiko@googlemail.com>
2017-09-20tdf#112005 xmloff: ODF export: export embedded object text *first*Michael Stahl
... before adding any attributes, so that the attributes don't erroneously get added to the paragraph element. Also fix the problem that if you set "ODF format version" to 1.1 or 1.2, export asserts in SvXMLNamespaceMap::GetQNameByKey() because the "loext" namespace isn't registered, and creates an invalid <p> element. Change-Id: I637f9d3ff746d877ced480e35ef53f4545a06a4b
2017-09-20Resolves: tdf#99477 freeze first col/row always set a freezeEike Rathke
The previous implementation had the odd behavior that Freeze First Column and Freeze First Row removed any frozen state (column or row) if there was one, instead of freezing the actually selected choice. Changed to * Freeze First Column * always freezes the first column * removes another column freeze if there was one * keeps a row freeze if there is one * checks the Freeze Rows and Columns toggle box * Freeze First Row * always freezes the first row * removes another row freeze if there was one * keeps a column freeze if there is one * checks the Freeze Rows and Columns toggle box * Freeze Rows and Columns * freezes at the current cell cursor position if there was no freeze (toggle box was unchecked) * removes any freeze if there was one (toggle box was checked) Change-Id: I38c4b6f0486ef8e93da0bb3a69a99e5c7709a21e Reviewed-on: https://gerrit.libreoffice.org/41908 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-09-20filter,sc: try to prevent potential SeekToEndOfRecord infinite loopsMichael Stahl
SeekToEndOfRecord() now doesn't seek to EOF if the offset is too large; break out of loops in the obvious cases where this could be problematic. But don't use SAL_WARN_UNUSED_RESULT because unfortunately GCC doesn't allow to explicitly suppress that with a (void) cast. Change-Id: Ie0211075bf0f4ef271bb26bdfead5fb070875a2b
2017-09-20unused aCId in ScHTMLExportNoel Grandin
ever since commit fa135fd0e05fc4ba784b4349d65f2e5ed26c0f55 Date: Tue May 31 10:30:35 2016 +0200 remove unused SID constants and associated code Change-Id: I47388fa5dcfec67bbcd9f7bf0a079d9376bc05af
2017-09-20simplify calling listenersNoel Grandin
Change-Id: I4bf0d378003d1f54685f6c55c0314c117b243526
2017-09-19add signature icon cause the icon is available (in breeez)andreas kainz
Change-Id: If221848b1ef389a1816e5aab71f784ddd932c9bc Reviewed-on: https://gerrit.libreoffice.org/42347 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Heiko Tietze <tietze.heiko@googlemail.com>
2017-09-19sc: fix infinite loop in XclImpDffConverter::ProcessShGrContainer()Michael Stahl
... and also in XclImpDffConverter::ProcessDgContainer() This was looping in CppunitTest_sc_filters_test, reportedly since commit 7e8c38b69742ff037a5e239bf0f02665f053ea53. The problem is that checkSeek() doesn't actually seek until EOF if the offset is too large. Change-Id: I16226a88388dcac8069d6a4cad860470540466e3