summaryrefslogtreecommitdiff
path: root/xmloff/source
AgeCommit message (Collapse)Author
2014-11-18cppuhelper: clean up public headers with include-what-you-useMichael Stahl
Change-Id: I41ba46831f24b2960a1fe982b74a2b623e682e0b
2014-11-18cppu: clean up public headers with include-what-you-useMichael Stahl
Unfortunately iwyu gets quite confused by the weird cyclic dependencies between various foo.h/foo.hxx and cppumaker generated headers, so it's not obvious if any improvement here is realistic... Change-Id: I0bc66f98b146712e28cabc18d56c11c08418c721
2014-11-17sal: clean up public headers with include-what-you-useMichael Stahl
Sadly cannot forward declare "struct {...} TimeValue;". rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h was painful enough for now... Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
2014-11-16Remove now useless setTextEmbeddedGraphicURL()Zolnai Tamás
Since this commit: 286e2f5c6ec829bc0987b1be7016699f7ef03e5e it's not necessary to update the package URL. Change-Id: I25c829e9bc0c666838baf19cd60f19938ebb430c
2014-11-14more catch by referenceCaolán McNamara
Change-Id: I2db9f94a517f814ef0854190e6f1194501070409
2014-11-14fdo#86023 - O[U]String needs a 'clear' methodBrij Mohan Lal Srivastava
Added clear() method to OString and OUString class, Updated appropriate call-sites. Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959 Reviewed-on: https://gerrit.libreoffice.org/12164 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-11xmloff: XML_DROPDOWN should be XML_DROP_DOWNMichael Stahl
Change-Id: I47247289bb4367faa9a07f3568270718b5423353
2014-11-08xmloff: [loplugin:unusedvariablecheck]Michael Stahl
Change-Id: I5b141d35ab05e1a3f225a980aad1280102a80ee0
2014-11-08xmloff: remove unused parameter of SvxXMLListStyleContext::FillUnoNumRule()Michael Stahl
Change-Id: I359f37ce778d55e6868bd1c78c0ff0d452f36088
2014-11-07Removed #includes including themselvesAndrea Gelmini
Change-Id: I3fe3227967e07b6b0c82dccf3c9400bfe6e1d729 Reviewed-on: https://gerrit.libreoffice.org/12292 Reviewed-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com> Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2014-11-05markup with event type not checker typeCaolán McNamara
Change-Id: I14c0c5d90b67000cb4fe9e6be647854abfe784da
2014-11-05fdo#38835 strip out OUString globalsNoel Grandin
they are largely unnecessary these days, since our OUString infrastructure gained optimised handling for static char constants. Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
2014-11-03coverity#705391: xmloff: XMLMergeElemTransformerContext misuse of enumMichael Stahl
The enum types XMLElemTransformerAction and XMLAttrTransformerAction use the same integer values so a mixture of values from these 2 in one switch is very suspicious. In the various *ActionTable arrays in OOo2Oasis/Oasis2OOo there is just one such array that mixes values from the 2 enums, and that is just the values that coverity complains about. The XML_ETACTION_EXTRACT_CHARACTERS was added at a later date in commits 8d374c039e7d349141befe3c9ef97f82f42bfa7 2685b93a6a23867baa4df265bb0cc35abaf76c0e 7d2405a54d13f68a35dfc5f619ad4bdb0b761856 c276550e07f8078fe9345985f70e8384d930a83f ...but it turns out that the XMLAttrTransformerAction ones are handled in StartElement() and ProcessAttrs() methods but the XMLElemTransformerAction ones are handled in CreateChildContext() methods so probably the XML_ATACTION_MOVE_FROM_ELEM* values are in the wrong enum. Change-Id: Ib1791f6eafac4fb1e99334f41c17a90cfb076359
2014-11-03coverity#1250700 Uninitialized scalar fieldCaolán McNamara
Change-Id: I5db51e7864017f0d0e474ed3e253657288245850
2014-10-31Removed duplicated includesAndrea Gelmini
Change-Id: I5362d997bfa086c9fb1726efcb15132a966684f6 Reviewed-on: https://gerrit.libreoffice.org/12160 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-10-31coverity#705348 Missing break in switchEike Rathke
Change-Id: I23e03e45ba4f6d259128bc5e4c2fd5952be05c2f
2014-10-31fdo#80403: Import baseclasses implement FastParser interfacesDaniel Sikeler
SvXMLImportContext implements XFastContextHandler SvXMLImport implements XFastDocumentHandler Change-Id: Id400260af112f4a448fe469c9580f0ebacec4ab6
2014-10-30Fixed typos. No automatic tools (sed, and so on).Andrea Gelmini
Change-Id: Ia43976d84eede6f699381bc4f3daf89b95e4cb4f Reviewed-on: https://gerrit.libreoffice.org/12150 Reviewed-by: Bryan Quigley <gquigs@gmail.com> Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2014-10-29coverity#735663 Division or modulo by zeroCaolán McNamara
Change-Id: I69410ebe3dcded9951bfa9e83844644147f4416a
2014-10-24XM_TOK_UNKNOWN needs to be in the value range of XMLImageMapToken (ubsan)Stephan Bergmann
Change-Id: Ief14b775851f457becb6f42b9a74e423bb73ed32
2014-10-23coverity#705781 Resource leakCaolán McNamara
Change-Id: Ia802df9c36b59a0130931436be7f5dbea07c0c8c
2014-10-15More -Werror,-Wunused-private-fieldStephan Bergmann
...detected with a modified trunk Clang with > Index: lib/Sema/SemaDeclCXX.cpp > =================================================================== > --- lib/Sema/SemaDeclCXX.cpp (revision 219190) > +++ lib/Sema/SemaDeclCXX.cpp (working copy) > @@ -1917,9 +1917,10 @@ > const Type *T = FD.getType()->getBaseElementTypeUnsafe(); > // FIXME: Destruction of ObjC lifetime types has side-effects. > if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl()) > - return !RD->isCompleteDefinition() || > - !RD->hasTrivialDefaultConstructor() || > - !RD->hasTrivialDestructor(); > + return !RD->hasAttr<WarnUnusedAttr>() && > + (!RD->isCompleteDefinition() || > + !RD->hasTrivialDefaultConstructor() || > + !RD->hasTrivialDestructor()); > return false; > } > > @@ -3517,9 +3518,11 @@ > bool addFieldInitializer(CXXCtorInitializer *Init) { > AllToInit.push_back(Init); > > +#if 0 > // Check whether this initializer makes the field "used". > if (Init->getInit()->HasSideEffects(S.Context)) > S.UnusedPrivateFields.remove(Init->getAnyMember()); > +#endif > > return false; > } to warn about members of SAL_WARN_UNUSED-annotated class types, and warn about initializations with side effects (cf. <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039602.html> "-Wunused-private-field distracted by side effects"). Change-Id: I3f3181c4eb8180ca28e1fa3dffc9dbe1002c6628
2014-10-11coverity#735353 Unchecked return valueCaolán McNamara
Change-Id: Iab54019d07ac27b4d8247d789c29165d24e2288f
2014-10-11coverity#704113 Unchecked return valueCaolán McNamara
Change-Id: If6537d84953c67801bc1959e17dd3662cd1face7
2014-10-10UBSan runtime error: division by zeroStephan Bergmann
...triggered by CppunitTest_sw_ooxmlexport. Though it iss unclear to me what is the best fix in this case, emit a style:legend-expansion-aspect-ratio value of 1, emit a style:legend-expansion value of "custom" without an accompanying style:legend-expansion-aspect-ratio (if that is even valid), emit another style:legend-expansion value, or emit no style:legend-expansion attribute (if that is even valid)? Change-Id: I36afe35082a841974bb2480fe11a7a3dd815ddf0
2014-10-08back out even more wrong tools::Time changes, geez..Eike Rathke
Change-Id: I52eb3400769999d7f554c3bdb8746f65b7990388
2014-10-08spelling: instanciated -> instantiatedNoel Grandin
Change-Id: I99f3010e30f81786b938dc11736ea1597cd5530d
2014-10-06use comphelper::rng::uniform_*_distribution everywhereCaolán McNamara
and automatically seed from time on first use coverity#1242393 Don't call rand coverity#1242404 Don't call rand coverity#1242410 Don't call rand and additionally allow 0xFF as a value coverity#1242409 Don't call rand coverity#1242399 Don't call rand coverity#1242372 Don't call rand coverity#1242377 Don't call rand coverity#1242378 Don't call rand coverity#1242379 Don't call rand coverity#1242382 Don't call rand coverity#1242383 Don't call rand coverity#1242402 Don't call rand coverity#1242397 Don't call rand coverity#1242390 Don't call rand coverity#1242389 Don't call rand coverity#1242388 Don't call rand coverity#1242386 Don't call rand coverity#1242384 Don't call rand coverity#1242394 Don't call rand Change-Id: I241feab9cb370e091fd6ccaba2af941eb95bc7cf
2014-10-04sw textboxes: reimplement ODF import/exportMiklos Vajna
Turns out that for normal TextFrames and rectangular drawinglayer shapes, the engine is written in ODF implicitly. Use the same trick to describe if the shape content should be rendered by SW or editeng. This reverts 9d310ecfce3c2fc481b125e1493a534e2107a68e (sw textboxes: implement ODF import/export, 2014-06-02). Change-Id: Id8afa6368bedcd293e578244abb58e18949bec8d
2014-10-04coverity#1242759 Result is not floating-pointNorbert Thiebaud
Change-Id: I3a358722279d574f96a2270b5dee84b85ddb402f
2014-10-03rename SvRef::AddRef to AddFirstRefNoel Grandin
to make it's intended purpose clearly distinguishable from AddNextRef Change-Id: I5da780b48b19fd873667b648031bc394113f953b Reviewed-on: https://gerrit.libreoffice.org/11763 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-01loplugin: cstylecastNoel Grandin
Change-Id: I25b82a96aace448a8debe90c181b22976ea95414
2014-10-01fdo#82577: Handle TimeNoel Grandin
Put the TOOLS Time class in the tools namespace. Avoids clash with the X11 Time typedef. Change-Id: Iac57d5aef35e81ace1ee0d5e6d76cb278f8ad866 Reviewed-on: https://gerrit.libreoffice.org/11684 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-09-30fdo#82577: Handle PolyPolygonNoel Grandin
Put the TOOLS PolyPolygon class in the tools namespace. Avoids clash with the Windows PolyPolygon typedef. Change-Id: I811ecbb3d55ba4ce66e4555a8586f60fcd57fb66
2014-09-30xmloff: std::auto_ptr -> std::unique_ptrStephan Bergmann
Change-Id: I8baa6c0573af3629bacbf1891c3196c165883d9e
2014-09-30WaE: implicit conversion of literal of type 'sal_Bool' to 'bool'Tor Lillqvist
Change-Id: Ibcb6abe7162197dec35f4626f158448ff538542f
2014-09-29fdo#79269: fix ODF import of style:footer-firstMichael Stahl
The implementation of SwXStyle's FirstIsShared property is busted, and that causes xmloff to write the footer-first content into the master footer. Change-Id: I520a4929d9d7313da65bcdcf4094f8244382377d
2014-09-29Resolves: fdo#80468 and fdo#81223 image/frame backgrounds wrongCaolán McNamara
writer has code to fill in missing new properties from the old properties if they exist. But xmloff is stripping them out before they get there. Don't strip them out, and add in a missing check for one of the archaic bg colors and add a regression test for fdo#81223 Change-Id: I9a541a9bee0a01c90f2c33383f1144ecd8b0bfff
2014-09-25assert that XMLTransformerBase::m_xHandler is initializedMichael Stahl
Just seen a test with a null m_xHandler, no idea how that happened. Change-Id: I2e5ff9d3c799284beea5fdca37fa8a825f8a4756
2014-09-23loplugin: cstylecast, update PTR_CAST macro to use static_castNoel Grandin
I introduce a template method into the PTR_CAST machinery to maintain constness. There is now a FIXME in sd/../docshell.cxx because I needed to use a dynamic_cast there to work around the games it appears to be playing with OLE in-place activation. Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, dropping the GCC-extension, unnecessary use of typeof from tools/rtti.hxx Change-Id: Iba5ace1aa27e02b34fcc91af1e658c43371afd03
2014-09-18fdo#83512 Make use of OUStringHash and OStringHashDaniel Sikeler
Change-Id: I33cafe68c798e3d54943ea1790fa4e73f85e525d Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-09-15xmloff: sal_Bool -> boolStephan Bergmann
Change-Id: Ic1e599568ece7e6bba354845a6cf85fa090e67bd
2014-09-12xmloff: remove yet another SunStudio workaroundMichael Stahl
Change-Id: Ic9ec167d921c4c5f08914476bdbdd6a31a9391c1
2014-09-11Avoid ODR-violating name clashStephan Bergmann
Change-Id: I69c3b11b01d520a485b07c8e5397a7f971210af2
2014-09-11Avoid ODR-violating name clashStephan Bergmann
Change-Id: I4911dcb5d902a5b92d4c175054acd220e449459d
2014-08-22Remove some useless tools/debug.hxx includesMarcos Paulo de Souza
Also remove the tools/solar.h included from tools/debug.hxx. The include of solar.h header was necessary in some cases because of a macro or a typedef that was needed. Change-Id: Ia6e15d5c2571c58c9e9138b0d0a7f08ae88053c9 Reviewed-on: https://gerrit.libreoffice.org/11075 Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Tested-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2014-08-20xmloff: dead code gives MSVC fitsMichael Stahl
Change-Id: I1aaaaae4a38fb828e6801e444b6345fd8b60f5c1
2014-08-20ODF export: don't write invalid "group-name" attributeMichael Stahl
Radio buttons are grouped via their "form:name" attribute already. Change-Id: I9f8b27a2904d947c3d4665495d36961e3e41d2c6
2014-08-16prevent invalid ods files with loext:fill-characterMarkus Mohrhard
ODF specifies that extension elements in a document are removed before the validation. With our old implementation of the number format export this could result in two number:text elements following each other. According to the spec a number:text element may not follow another number:text element. The number:text element before loext:fill is actually not that interesting so it makes more sense to make this one an extension element. Possible documents showing issues: fdo45268-1.xlsx fdo49150-1.xlsx and many more Change-Id: I3ad92b8a61a246b3dbc0132d9a2c367488a766d0