summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/xmlimprt.cxx
AgeCommit message (Collapse)Author
2018-03-05drop sax::tools::*base64 methodsNoel Grandin
and use the underlying comphelper methods rather. This is so that I can break the dependency that tools has on sax, and can add methods that make sax depend on tools. Change-Id: I8a2d6ce2ffc3529a0020710ade6a1748ee5af7d5 Reviewed-on: https://gerrit.libreoffice.org/50767 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-12More loplugin:cstylecast: scStephan Bergmann
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I987ac3a6d062600a5e21c3462c70595dfaa51796
2017-12-18clear the data provider cache after import, tdf#111960Markus Mohrhard
This might also fix some problems with normal ODS files and not just with FODS files when we recompile formulas after the whole import. Change-Id: Iec05d2052ca5ce3bdf03abf02d502e4537fd3082 Reviewed-on: https://gerrit.libreoffice.org/46672 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-12-11loplugin:salcall fix functionsNoel Grandin
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-30xmloff: turn SvXMLImportContext into a no-op base classMichael Stahl
Fix the non-obvious and potentially dangerous recursion that is implicit in xmloff's context code. SvXMLImportContext::CreateChildContext() now always creates a SvXMLImportContext, does not delegate to SvXMLImport. Rename CreateContext to CreateDocumentContext, to make its purpose of creating only the top-level context more obvious. With the previous changes to CreateContext overrides in sw, reportdesign and dbaccess, this hopefully shouldn't break anything. Change-Id: I9e147bf6297bbac9e8470454881da73f6e39db0a
2017-11-28add xlsx support to fftesterCaolán McNamara
Change-Id: I07198f24a3e096fab67333cf6a98185d5b40fffc Reviewed-on: https://gerrit.libreoffice.org/45399 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-26vcl: make MapMode constructor explicitMichael Stahl
Insert constructor everywhere, except a couple places that apparently want to compare GetMapUnit(). Change-Id: I1910deb60562e5e949203435e827057f70a3f988
2017-10-23loplugin:includeform: scStephan Bergmann
Change-Id: I2ed763e0584a188032c80fde60890de3c6985cbd
2017-09-26close sc and sw docshells tooCaolán McNamara
Change-Id: I2cf06762d50736debd63f385dcae3022412ac0c0
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-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-08-30Refactoring fastcontexts code:Mohammed Abdul Azeem
Moved all the casts inside ::createFastChildContext and used reference to it as an argument in the constructors. This avoids spreading the cast statements all over the place. Also removed some of the empty createFastChildContext(), they are unnecessary as the parent class already has it. Change-Id: I344ede732a53878a7e265c0178b07d73b5398237 Reviewed-on: https://gerrit.libreoffice.org/41178 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-08-25loplugin:unusedfieldsNoel Grandin
Change-Id: I81bcf4f56599146536ba8d66cc86fa5a08737298 Reviewed-on: https://gerrit.libreoffice.org/41556 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-24loplugin:constparam in sc part4Noel Grandin
Change-Id: I745f50257948a53ca07766955c4f4e86dd2a366e Reviewed-on: https://gerrit.libreoffice.org/41497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-15loplugin:checkunusedparams in scNoel Grandin
Change-Id: Ib4572899caeb7bc2dceb2c188ceb306b8ffc9193 Reviewed-on: https://gerrit.libreoffice.org/40629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-12Avoiding unnecessary OUString allocation:Mohammed Abdul Azeem
Using direct strcmp instead of mapping. This is one of the hotspots and will help improve performance. Change-Id: I97a452984d53a6746f477ffe4be2806d9e89eee4 Reviewed-on: https://gerrit.libreoffice.org/40928 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-08-11convert std::map::insert to std::map::emplace IINoel Grandin
Change-Id: Ief8bd59c903625ba65b75114b7b52c3b7ecbd331 Reviewed-on: https://gerrit.libreoffice.org/41019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-08loplugin:unusedmethodsNoel Grandin
Change-Id: Id66cf12e3a59aeed1b9a7a111b841e30b248635b Reviewed-on: https://gerrit.libreoffice.org/40876 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-08loplugin:singlevalfieldsNoel Grandin
Change-Id: I8908479ecf513cdf2ecb4bcbe7c1078ef80671cf Reviewed-on: https://gerrit.libreoffice.org/40838 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-25loplugin:unusedmethodsNoel Grandin
Change-Id: Ia874baf21257e5fe41e104211068a2bcc50446eb Reviewed-on: https://gerrit.libreoffice.org/40391 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-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-03C++11 remove std::unary_function bases from functorsJochen Nitschke
std::unary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::unary_function base class was used in 3 places: * chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole is used in a std::not1 function helper who uses the members return_type and argument_type. - replace deprecated std::not1 with a lambda * chart2/source/tools/ModifyListenerHelper.cxx: lcl_weakReferenceToSame used the argument_type member in the operator() parameter. - inline the parameter type. * xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement used result_type and argument_type in operator(). - inline the types Also fix compile error with gcc about finding std::for_each. Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f Reviewed-on: https://gerrit.libreoffice.org/39358 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-28loplugin:unusedfields in sc part2Noel Grandin
and mark some fields as being needed to be imported to the model Change-Id: Icbf846aa1278f4672509dcf6488a7971795b06d8 Reviewed-on: https://gerrit.libreoffice.org/39063 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-27Using fast tokens directly:Mohammed Abdul Azeem
Replacing integer-to-integer mapped tokens with fast Tokens direcly for branching. Adding a macro XML_ELEMENT that combines namespace and element tokens. Change-Id: I8701c8af9607392843460fe726bffb6556cf9b33 Reviewed-on: https://gerrit.libreoffice.org/39275 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-06-26loplugin:oncevar in scNoel Grandin
Change-Id: Ice59e286debb6bd0eb692f2b2b0c2c5087c069c0 Reviewed-on: https://gerrit.libreoffice.org/39239 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21convert ErrCode to strong typedefNoel Grandin
would have preferred to re-use o3tl::strong_int, of which this is a modified copy, but there are lots of convenience accessors which are nice to define on the class. Change-Id: I301b807aaf02fbced3bf75de1e1692cde6c0340a Reviewed-on: https://gerrit.libreoffice.org/38497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-18Revert "Fix typos"Stephan Bergmann
This reverts commit 26a67002fcb9381b54de6cae1aaa37120d49066a. "Iff" is not a typo, see 2a65bf32ec270484dcea4d22d3c93552dc0c24dd "Revert 'Typo: iff->if'".
2017-05-18Fix typosAndrea Gelmini
Only replaced "iff" with "if" Change-Id: Ib9dfa5c12b05500043147fe3b65f923b1b12a581 Reviewed-on: https://gerrit.libreoffice.org/37782 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-05-18Pass grammar to ScCompiler ctor instead of subsequent SetGrammar()Eike Rathke
Not only to have more concise code but also to avoid setting grammar twice if the actual grammar differs from the document's default one. Change-Id: I7bfd151c22c48a40aea05f5f983fa0370d9fd9ae
2017-05-17tdf#43535: support additional sheet protection options.Kohei Yoshida
New options are: * insert columns. * insert rows. * delete columns. * delete rows. Change-Id: I076b0d01bee0fff0623e2f1137c09938a6110939 Reviewed-on: https://gerrit.libreoffice.org/37695 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2017-05-10loplugin:checkunusedparams in sc(part3)Noel Grandin
Change-Id: I61fc2ba762983d7bafb6ed8baafba458590af59a Reviewed-on: https://gerrit.libreoffice.org/37458 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-08loplugin:checkunusedparams in xmloffNoel Grandin
Change-Id: I59d2cb1f69882b62e6fe732e9d9214feec8a79a2 Reviewed-on: https://gerrit.libreoffice.org/37283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-13Removed duplicated includesAndrea Gelmini
No automatic tools. Manual checked and tested. Change-Id: Ife260fa4e1d786cf81f2917a901664cc54943754 Reviewed-on: https://gerrit.libreoffice.org/36371 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04tdf#39468 Translate German commentsJens Carl
First run of translating German comments and terms in sc/ Change-Id: I9802df334259edcea148bead95cc98a8057b91a1 Reviewed-on: https://gerrit.libreoffice.org/35994 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-07loplugin:loopvartoosmallStephan Bergmann
Change-Id: I81b56ad2a32ef61a514d5e6e9f45c3f956126040
2017-02-21loplugin:subtlezeroinit: scStephan Bergmann
Change-Id: I98e433441e97d0f2e88f84cd9b3cf91861465bff
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-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-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
2016-12-05loplugin:unnecessaryoverride (dtors) in scStephan Bergmann
Change-Id: Ifc44a22738cbd0ebbd81fae5caf1d9792e7746cf
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-07inherit from ScXMLImportContextNoel Grandin
and drop a bunch of redundant code Change-Id: I187273ad9eebeaf2446e09b2e3442e963d8ae4f4 Reviewed-on: https://gerrit.libreoffice.org/30568 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-19loplugin:expandablemethodds in scNoel Grandin
Change-Id: Idda64b23ea91ec457b60279d851b7f01d8c02881 Reviewed-on: https://gerrit.libreoffice.org/30033 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05convert MapUnit to scoped enumNoel Grandin
I left a prefix on the names "Map" so that I would not have to re-arrange each name too much, since I can't start identifiers with digits like "100thMM" And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore. Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224 Reviewed-on: https://gerrit.libreoffice.org/29096 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-02support TargetFrame in url field import/export code, tdf#77873Markus Mohrhard
Change-Id: Id09ecbd10b8ee60371f223d62f2dd6fe1c2296ca Reviewed-on: https://gerrit.libreoffice.org/29459 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-09-26implement prototype for more stable calc cell style namesMarkus Mohrhard
This should ensure that as long as the style does not change the cell style name is the same after an import export cycle. Each ScPatternAttr stores a unique ID and we store the ID to name mapping during import. During export if we find a ScPatternAttr that has a key that is also stored in the map we write back the style name from the map. To avoid name collisions we block the style names from the import for the export. The missing piece to make this completely awesome is now to make sure that styles are sorted by name during export. That way we can reduce the diff between import and export even more. Change-Id: Ie4fe2aa00f07efec27ea129e314ac0b6b7e0d8c0 Reviewed-on: https://gerrit.libreoffice.org/29255 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>