summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml
AgeCommit message (Collapse)Author
2017-02-28new loplugin unoanyNoel Grandin
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89 Reviewed-on: https://gerrit.libreoffice.org/34714 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-28tdf#48140 Replace CellRangeAddress with ScRangeBartosz Kosiorek
Change-Id: I5aa1dabf938e1567d386fceb153e2986862f70a6 Reviewed-on: https://gerrit.libreoffice.org/34707 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-02-24a first stab against the note caption ownership messEike Rathke
This should not change any existing behavior, but may help tracking down what happens where and when. The final goal is to let ScCaptionPtr also handle deletion of caption objects once they're unreferenced and guard against dangling pointers and double delete, and/or to manage transfer of ownership to the drawing layer. Further improvement to the structure could involve a head data element so that the duplicated (and unused except in head) mnRefs field could be eliminated and the walk simplified when removing an element from the list. Change-Id: Ifbb2fb1d9dc4d2594a1eae2a8489270dd1fe0d0c Reviewed-on: https://gerrit.libreoffice.org/34616 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-02-21loplugin:subtlezeroinit: scStephan Bergmann
Change-Id: I98e433441e97d0f2e88f84cd9b3cf91861465bff
2017-02-15tdf#100726 Improved readability in sc directoryFakabbir Amin
cleaning concatenation in sc directory. Change-Id: I137eb0eaf161edece272b084980e622831200803 Reviewed-on: https://gerrit.libreoffice.org/34288 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-10Further modifications to FastAttributeIter:Mohammed Abdul Azeem
attempt to further reduce unnecessary allocation and freeing of OUString. Change-Id: I85169cfcd2311a5e6a96dc0292ce0686d1b0e43d Reviewed-on: https://gerrit.libreoffice.org/34092 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-02-10convert SearchParam::SearchType to scoped enumNoel Grandin
and drop unused SRCH_LEVDIST enumerator Change-Id: Ic5118757060656562e04dd7da24a3f143abec3fb Reviewed-on: https://gerrit.libreoffice.org/34065 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-09Reapply "create ErrorHandlerFlags scoped enum for error handling flags""Noel Grandin
This effectively reverts commit 32cae6a2eaa41568888df9c8fc5605debd8d704a. Change-Id: I15bb0a5c4acaeee6d47dd93a71601d9687d701bc Reviewed-on: https://gerrit.libreoffice.org/34028 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-08Adding an iterator for fastattributes:Mohammed Abdul Azeem
This helps to avoid the expensive allocation and freeing of OUString at some places. Change-Id: I7d49974ce13799fcf62b989ce5d3c61b01316190 Reviewed-on: https://gerrit.libreoffice.org/34011 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-02-07Revert "remove ugly operator* in DynamicErrorInfo"Michael Stahl
This reverts commit b5e3f8a5fa98a249ecd50021c33cf2a5c7a3b4fc. The problem is this: ==24217== Conditional jump or move depends on uninitialised value(s) ==24217== at 0x29A25FCE: SfxObjectShell::SetError(unsigned int, rtl::OUString const&) (objmisc.cxx:220) ==24217== by 0x29A35E6E: SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) (objstor.cxx:2300) ==24217== by 0x29A3705C: SfxObjectShell::DoLoad(SfxMedium*) (objstor.cxx:765) ==24217== by 0x29A6BC48: SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (sfxbasemodel.cxx:1802) The commit is bogus because it introduces a DynamicErrorInfo::GetErrorCode(), which overloads ErrorInfo::GetErrorCode(), which is used at least in DynamicErrorInfo_Impl::RegisterEDcr() and used to return a constructor argument of DynamicErrorInfo but now returns pImpl->lErrId, which is what this statement is trying to initialize. Ultimately this causes my clang+ASAN build to fail because the uninitialized error code happens to be detected as a mere Warning: Test name: testMathMalformedXml::Import assertion failed - Expression: !xComponent.is() - loading succeeded: sw/qa/extras/ooxmlimport/data/math-malformed_xml.docx Change-Id: I9141144e0bc356ee54279948f2fce036d1831a86
2017-02-07Revert "create ErrorHandlerFlags scoped enum for error handling flags"Michael Stahl
This reverts commit 05e78bde26d8b8b257ed22a0ce20c5b386a629d1. Depends on the other commit that needs reverting
2017-02-07create ErrorHandlerFlags scoped enum for error handling flagsNoel Grandin
Change-Id: I30c80979c87bad7bc98f36a158c31c88d80d1caf Reviewed-on: https://gerrit.libreoffice.org/33991 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-07remove ugly operator* in DynamicErrorInfoNoel Grandin
I can see why you'd want to hide this horrible tunnelling of information with objects registering themselves in a global list. Urrgh. Change-Id: Ib151a0d2d5a4508dc456e52883e488ce56d9a095 Reviewed-on: https://gerrit.libreoffice.org/33984 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-06Add missing #includesStephan Bergmann
...and remove some unncessary using directives/declarations, in preparation of removing now-unnecessary #includes from cppumaker-generated files, post e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception specifications". Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-03new loplugin:unusedenumconstantsNoel Grandin
These are the simple removals, where it is obviously safe, the more complex ones will come in separate commits Change-Id: I7211945a6a5576354b60d9c709940ce9b674f308 Reviewed-on: https://gerrit.libreoffice.org/33828 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-02Expand macro in its single place of useStephan Bergmann
Change-Id: Ib959c35f6d9da3ad4eeaf0d52a9e6d43642d2282
2017-02-02...or rather, fix ScChangeTrackingExportHelper::GetChangeID properlyStephan Bergmann
...after 1461ebbbb5d47d90e31f0945a4878a68fbee5213 "expand out ::sax::Converter::convertNumber to OUString::number" Change-Id: I62b9cbb83b1d4be2b2e97d3c938eb7a8ee46bc85
2017-02-02Removal missing from previous commitStephan Bergmann
Change-Id: If910262c7495124795384282fdd5d1441124604f
2017-02-02-Werror,-Wunused-private-fieldStephan Bergmann
Change-Id: I25a8ebb0e5677980b58046d6dde9133cd6592c54
2017-02-02convert method names in tools::SvRef to be more like our other..Noel Grandin
reference classes, uno::Reference and rtl::Reference. Specifically rename Is()->is() and Clear()->clear(). Change-Id: Icb7e05e2d09cb9977121508b837ba0961dabb4ae Reviewed-on: https://gerrit.libreoffice.org/33576 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-02expand out ::sax::Converter::convertNumber to OUString::numberNoel Grandin
which results in much simpler code overall, there is no need to go via an OUStringBuffer all the time Change-Id: I69eba92c93f471fa9a45f97c29c56dcf3cd1ebf8 Reviewed-on: https://gerrit.libreoffice.org/33773 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-26Remove dynamic exception specificationsStephan Bergmann
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-25ScXMLTableRowCellContext implements fast interfaces:Mohammed Abdul Azeem
Implementation of fast interfaces for contexts in path from ScXMLImport::CreateFastContext to ScXMLTableRowCellContext. FastParser is enabled and duplicates are avoided at all possible places. OOoXML filters still need those legacy paths we removed, so I had to temporarily map them to fast elements, which would increase their load time, but hopefully it should help us in the long run. Change-Id: Ie997a9a8b72787da2356abc99ea2cd57c2e5b670 Reviewed-on: https://gerrit.libreoffice.org/28648 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-01-25loplugin: unnecessary destructor scNoel Grandin
Change-Id: I877bc0927aff7d175c1978fdf3db55d2e048d3b9 Reviewed-on: https://gerrit.libreoffice.org/33510 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-24manage SvRefBase-subclass by tools::SvRef in ScXMLTableRowCellContextNoel Grandin
ScXMLTableRowCellContext Change-Id: Ia624e971f31cc517f65b6ae15729476cea091d86
2017-01-19new loplugin: useuniqueptr: sc part 2Noel Grandin
Change-Id: I37936a297027313e2a8ae18f355567462955739e Reviewed-on: https://gerrit.libreoffice.org/33203 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-17convert subtotalfuncs from manual array to std::vectorNoel Grandin
Change-Id: I6af7e8c8d001c92edd364aa32224da1e4e1d1d9b
2017-01-14coverity#1371289 avoid the need for an assignmentCaolán McNamara
Change-Id: I7f9b8d21652c79642f9a2f916ad0609c8abd430b
2017-01-11Some loplugin:conststringvar/stringconstant improvements: scStephan Bergmann
Change-Id: Ie01088776c4339ec7d1fb5941c4e65d95aff8b1f
2017-01-09New loplugin:externvar: scStephan Bergmann
Change-Id: I6f9df997a957a1fa49161add2adafe228d036a30
2017-01-06recognize the broken "Err:xxx" written by 5.2 and earlier, tdf#105024 relatedEike Rathke
... and handle same as "#ERRxxx!" if present. Change-Id: I1ebb31d628b080c52b450a8fe624c20e9e1188b7
2017-01-06read single error constant formula as such, tdf#105024 relatedEike Rathke
... without creating a token so when writing again no leading '=' is prepended, with which we can enable 5.2 to read such thing correctly, and when re-reading in 5.3 it also doesn't lead to a "real" formula. Change-Id: I26fbd20536436b49b781e2bbb5bba1dc6bafbb37
2017-01-02coverity#1397202 Unchecked return valueCaolán McNamara
Change-Id: Iba346a5379f89b1a726f57b2d2a48cc827ec4a1f
2016-12-16coverity#1397200 Unchecked return valueCaolán McNamara
and coverity#1397201 Unchecked return value coverity#1397202 Unchecked return value Change-Id: I73cc6e3b08e6a44b27be2093ba568d46ebe0659a
2016-12-10rename to RegisterDefinedStyleNames() to clarify, tdf#104097 follow-upEike Rathke
Change-Id: Iecb64ab1e25913180bcb53a133f9dd6777ffb17b
2016-12-09Resolves: tdf#104097 register reserved cell style names for auto stylesEike Rathke
SvXMLAutoStylePoolP_Impl re-starts with a clean XMLAutoStyleFamily::maReservedNameSet, so reserving the names in ScXMLExport::ExportStyles_() is not enough and needs to be redone in ScXMLExport::ExportAutoStyles_() In the bug scenario that lead to cell styles with duplicated names for different styles of which when reloading only the first was taken. Additionally, a style must be registered after SvXMLAutoStylePoolP::AddNamed() to prevent duplicated styles with different names. Change-Id: If3491eb89ab1741887d9a36ecf904a216fb1368e
2016-12-05loplugin:unnecessaryoverride (dtors) in scStephan Bergmann
Change-Id: Ifc44a22738cbd0ebbd81fae5caf1d9792e7746cf
2016-11-30ScAddress::operator<() is not what we need here, tdf#48140 follow-up fixEike Rathke
ScAddress::operator<() compares by tab,col,row while we need tab,row,col for ODF import/export. This caused the export crash tests http://dev-builds.libreoffice.org/crashtest/27ec6d1cb96a0d3becf14309a26d1c024a0f8603/exportCrash.txt to fail due to assert sax/source/expatwrap/saxwriter.cxx:1143: virtual void {anonymous}::SAXWriter::endElement(const rtl::OUString&): Assertion `aName == m_pSaxWriterHelper->m_DebugStartedElements.top()' Fallout from commit 50106435e9a5bbc067e9beeabc5147ed9f305286 Date: Thu Nov 24 00:02:45 2016 +0100 tdf#48140 Change types of variables and remove uneeded code Change-Id: I63d365f62868099b79de4812534c323b89dc2ee1
2016-11-27use the existing ScAddress::operator==Markus Mohrhard
Change-Id: I04626875a822457ccef448278a3bc8f990760e57 Reviewed-on: https://gerrit.libreoffice.org/31253 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-11-26tdf#48140 Replace uno with direct callsBartosz Kosiorek
Change-Id: I38af8d3e4dfbd42f025734ba14de409e8bd97393 Reviewed-on: https://gerrit.libreoffice.org/31179 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-24tdf#48140 Change types of variables and remove uneeded codeBartosz Kosiorek
Change-Id: I9a82c7aca3433c474653d8847b6e24ed2249db58 Reviewed-on: https://gerrit.libreoffice.org/31138 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-23[API Change]: Create new GeneralFunction2 for adding medianTamás Zolnai
New functionality added to pivot table became fully broken with Eike's revertion: 50244309501d738e7314fa79785db139c826f8d7 This commit fixes this problem. Change-Id: I67cfc63305bb9b2edeed2abd26d729fbf650579f Reviewed-on: https://gerrit.libreoffice.org/31096 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2016-11-22[API Change] revert incompatible change of enum css::sheet::GeneralFunctionEike Rathke
Quick solution before 5-3 branch off without reverting everything related. This will need a new constant value type for API instead of the enum and an internal mapping from/to the enum. Kept the GeneralFunction_MEDIAN at all places in uing code so it can be easily grep'ed for. Change-Id: I95256649f16ded08e467003d2924be0ff5efb87f
2016-11-21tdf#42949 Remove not needed uno headers from filters/xmlBartosz Kosiorek
Change-Id: I5be5150a41906aa550e1fe00aa1647d79315172d Reviewed-on: https://gerrit.libreoffice.org/31043 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-11-21tdf#48140 Replace uno CellRangeAddress and CellAddress with direct callsBartosz Kosiorek
Change-Id: I43c5c1274c9ed45c929a2d5a8596d54626b5e4f6 Reviewed-on: https://gerrit.libreoffice.org/30994 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-11-20PivotMedian: ODS import / export of pivot table medianTamás Zolnai
Change-Id: I3b018f5a76bb3d89bcb6cbc34e4cb2f2057248d5
2016-11-19tdf#48140 Replace CellAddress uno calls with direct accessBartosz Kosiorek
Change-Id: I4c8b36eaa29241f886810f9bff88ed9ca9d3192f Reviewed-on: https://gerrit.libreoffice.org/30979 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-11-19sc-perf: lock drawing layer during creation of captions for SaveEike Rathke
This gives an extra boost compared to commit 451c4cccc7e3ec3f1e046d3232cb52f6fc443f59 (see there for further details) as it eliminates broadcasts to accessibility and thus obtaining text forwarders and what not. ScPostIt::CreateCaptionFromInitData() compared to that commit from 145,055,889,118 to 63,386,691,509 Overall ScDocShell::SaveXML() from original state before that commit Before: 370,433,720,090 After: 107,468,180,524 Reduced to 29% or speed-up by factor 3.45 Change-Id: Ife86476c9654739ed9adf25e775f7568ea9934c2
2016-11-19tdf#48140 Remove not used UNO headers from filtersBartosz Kosiorek
Change-Id: I66e775b60343fe8ac772d8c0287ca19be58a7236 Reviewed-on: https://gerrit.libreoffice.org/30966 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-11-18includes should be at the top of the fileNoel Grandin
not randomly scattered through the code found with something like: git ls-files *.cpp | xargs grep -Pzl "(?s){.*#include" Change-Id: I9c242fa4ef99e8677f2800d7ec9f16d16e488351 Reviewed-on: https://gerrit.libreoffice.org/30952 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>