summaryrefslogtreecommitdiff
path: root/xmloff
AgeCommit message (Collapse)Author
2016-07-04Fix some spelling errors in comments and stringsOtto Kekäläinen
Change-Id: Iecd6b5e13d6be14651f77d8e37f01117ba15a11e Reviewed-on: https://gerrit.libreoffice.org/26883 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-06-30loplugin:unusedfieldsNoel Grandin
Change-Id: If06fffa8db050df0f9c1c7da6163575bf522382e Reviewed-on: https://gerrit.libreoffice.org/26754 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-28loplugin:singlevalfields in variousNoel Grandin
Change-Id: Ia0d8f463a4dba9ec63aa0159441e3e607dd3bf5e Reviewed-on: https://gerrit.libreoffice.org/26738 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-27ODF import: add embedded pdf supportMiklos Vajna
The use-case is to have a .svm and .pdf alternative, need to pick .pdf from those. The test fails with any of the below commits reverted: - the xmloff part of this commit - fda68426374ed915783fd306c2f56463c757774a (ODT export: add embedded pdf support, 2016-06-27) - 878a860dff10bd91491d6c9f2f4e2308bfe4f0b2 (vcl: add initial PDF import-as-graphic filter, 2016-06-23) Change-Id: Id5b298d25a46af6ce7aa5f8c71a29c3914e1a7ce Reviewed-on: https://gerrit.libreoffice.org/26706 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-24-Werror,-Wunused-private-fieldStephan Bergmann
Change-Id: I23caef822107596c9c04a8d4c28b30f32b7095ba
2016-06-24loplugin:singlevalfields in xmlhelp,xmloffNoel Grandin
Change-Id: Ia40d1c9a153b5237c46d5a2b807dceff30775f4a Reviewed-on: https://gerrit.libreoffice.org/26589 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-23Simplify dynamic_cast followed by a static_cast.Jan Holesovsky
Change-Id: Ia8b1145d43828a40611e5f59651d9dc6ff7d5360
2016-06-23Introduce FillAutoStyle() method to reduce copy'n'paste.Jan Holesovsky
Change-Id: Ibdb6ae15790cc117d3d8c41c57924f9b22e85cba
2016-06-22Simplify dynamic_cast followed by a static_cast.Jan Holesovsky
Change-Id: Ie4b92f3763d2d695709a4919faceb520f874897f
2016-06-21Simplify dynamic_cast followed by a static_cast.Jan Holesovsky
Change-Id: I89fc21757493a42e17d518da585bafdb8f2e303a
2016-06-21Simplify dynamic_cast followed by a static_cast.Jan Holesovsky
Change-Id: I86e756ce46f6cdb84bddc3faae74782c8b4ad519
2016-06-20GSoC Table Styles, Export Cell StylesJakub Trzebiatowski
Exporting cell-styles Exporting table-template To be able to map SwTableAutoFormat to table-template 1:1 extended table-template by the following elements: loext:first-row-even-column loext:last-row-even-column loext:first-row-end-column loext:first-row-start-column loext:last-row-end-column loext:last-row-start-column Added attributes describing box format to SwXTextCellStyle Change-Id: I2967ba461dfc6f030c1e5cdbba62e2673d3b232b Reviewed-on: https://gerrit.libreoffice.org/26185 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-06-17convert DBG_ASSERT in xmloffNoel Grandin
Change-Id: I2f4bbbef451026fc34638e17fa29b6db2c14d850 Reviewed-on: https://gerrit.libreoffice.org/26191 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-16tdf#97837 Detect delimiter only for date, time, currencyLaurent Balland-Poirier
Other formats do not require delimiter Except for minus sign Change-Id: Ica5a62c175345062383247760fe5e2a061aeebe8 Reviewed-on: https://gerrit.libreoffice.org/24902 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-06-14tdf#88206 Change use of cppu::WeakImplHelper*krishna keshav
Change-Id: I8562a69bf624902a54da004b0786cae2a98102e5 Reviewed-on: https://gerrit.libreoffice.org/26168 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-12convert more DBG_ASSERT(false to SAL_WARNNoel Grandin
Change-Id: Ie52f28f28c67a91c4d3d4517d5c6a466890c7a55 Reviewed-on: https://gerrit.libreoffice.org/26195 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-12convert DBG_ASSERT(false, to SAL_WARN(Noel Grandin
Change-Id: I400d728c5d99228c5ca52e369037395b4da2af5c Reviewed-on: https://gerrit.libreoffice.org/26187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-10o3tl::tryGet on a temporary is dangerousStephan Bergmann
...so rename to o3tl::tryAccess to make it more obvious that the returned proxy points into the internals of the given Any, and forbid calling o3tl::tryAccess on a temporary Change-Id: Ia412c6b2b06693811b9b7f0076a08bbf97142df9
2016-06-09tdf#94698 cleanup Makefiles. Get rid of udkapi and offapiGleb Mishchenko
This patch changes occurences in makefiles from $(eval $(call gb_CppunitTest_use_api,comphelper_test_config, \ udkapi \ offapi \ )) to $(eval $(call gb_CppunitTest_use_sdk_api,comphelper_test_config)) (corrected instead of abandon, jani) Change-Id: Ic96ec65d82d7452e288f05a8b6d576ef543b068e Reviewed-on: https://gerrit.libreoffice.org/23426 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-06-06tdf#89329: use unique_ptr for pImpl in xmlnumfeXisco Fauli
Change-Id: I1c07b20f187d4b7045d68e0b7f95725de039bf77 Reviewed-on: https://gerrit.libreoffice.org/25743 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-06remove some manual ref counting in svx and xmloffNoel Grandin
Change-Id: Ica0b6ff8ff7fa9e65cd758160d6e3ea7110ebb46 Reviewed-on: https://gerrit.libreoffice.org/25824 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-06remove some manual ref-countingNoel Grandin
triggered when I noticed a class doing acquire() in the constructor and then release() in the destructor. found mostly by git grep -n -B5 -e '->release()' Change-Id: I96e43a3d30ffd9ae9a34275f24cd914d8f7b026f Reviewed-on: https://gerrit.libreoffice.org/25806 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-03tdf#96099 Reduce number of typedefs used for trivial container typeskrishna keshav
Change-Id: I1ec93e281d7c2648a150c98144905f1158502dcc Reviewed-on: https://gerrit.libreoffice.org/25835 Reviewed-by: Akshay Deep <akshaydeepiitr@gmail.com> Tested-by: Akshay Deep <akshaydeepiitr@gmail.com>
2016-06-03Convert FontRights to scoped enumNoel Grandin
Change-Id: Ib46fe9dbe4b41bfe2e85e9171e8dcf7a96ccb483 Reviewed-on: https://gerrit.libreoffice.org/25717 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-02New o3tl::try/doGet to obtain value from AnyStephan Bergmann
...in an attempt to reduce usage of type-unsafe void const * css::uno::Any::getValue() These new functions are often more convenient to use than the existing ">>=" and Any::get<T>. Note how they are careful to provide a pointer directly into the given Any, instead of creating temporaries. As an example, replaced most calls of getValue across xmloff: * Cases that first check for a specific type (via getValueType etc.) and then call getValue can instead call tryGet. (But beware that tryGet supports some conversions, which a check for a specific type may have missed---either intentionally or by accident. Also beware the somewhat common idiom of checking for TypeClass_ENUM and then using getValue to obtain a sal_Int32; this cannot be replaced with a call to tryGet.) * Cases that seem confident that the Any is of the correct type when calling getValue (but apparently are confident due to some higher-layer protocol, as the surrounding code does not do any checking via getValueType or similar) can instead call doGet. It throws an exception if it turns out the confidence wasn't warranted. (Many of the existing calls that directly dereferenced the return value of getValue as sal_Bool look suspicious, in that the author might have thought the given code would also cover a VOID Any---which technically it even would have happened to do. If any RuntimeExceptions thrown from these doGet calls start to crop up, these changes need to be revisited. Some may even be rewritten as uses of ">>=". But at least "make check" did not show any such problems. Also note that casting the value obtained from getValue to any css::uno::Reference<X> with X being anything but the base css::uno::XInterface was always prone to producing a bad pointer, in case the interface actually stored in the Any derived from X via multiple inheritance.) * Should there ever be cases where an Any is known to be of the requested type, some additional forceGet could be introduced (which would assert instead of throwing an exception). Change-Id: I2d8739e86314eff73abfcafe01d806f5bc5c34db
2016-06-02drop some more RTL_CONSTASCII_USTRINGPARAMNoel Grandin
Change-Id: I528b0ecb5282178d8e727471beb126cb7d3f2eb4
2016-05-31teach refcounting clang plugin about uno::ReferenceNoel Grandin
uno::Reference is only allowed to used with classes that have a ::static_type member. So convert all those places to rtl::Reference. Maybe we need some LIBO_INTERNAL_ONLY constructors on rtl::Reference and uno::Reference to make this a little smoother? Change-Id: Icdcb35d71ca40a87b1dc474096776412adbfc7e3 Reviewed-on: https://gerrit.libreoffice.org/25516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30Choose ODF version for fill-characterLaurent Balland-Poirier
OASIS reference: https://issues.oasis-open.org/browse/OFFICE-3765 XML_TEXT in FinishTextElement_Impl follows a different logic See https://cgit.freedesktop.org/libreoffice/core/commit?id=66c6d1ef204f3507e7663a1b8b1be05b9ec71092 Change-Id: Iac966f74c26c2b72ed54db26cf17a35717263007 Reviewed-on: https://gerrit.libreoffice.org/25590 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-05-31prevent out of bounds string accessEike Rathke
Yet another reminiscence of String to OUString conversion.. where the terminating NULL-character was obtained and SvNumberformat::InsertBlanks() effectively did nothing. Could be triggered already by entering an '_' underscore character as number format code, which is a place holder for blanks of the same width as the following character, which there isn't then yet. Change-Id: I0534e1417d4bd35e9e7ed4bd0170b9ea3b5fb575
2016-05-30tdf#99661 Add max-denominator-value attribute to number:fractionLaurent Balland-Poirier
Add max-denominator-value attibute to <number:fraction> to comply with ODF 1.3 See https://issues.oasis-open.org/browse/OFFICE-3695 Specify loext or number according to ODF version This value is only used to stored the number of digits in numerator. No other values than 9, 99, 999,... are expected. Add loext:max-numerator-digits attributes to <number:fraction> to distinguish ??/?? and ##/## or any combination Not saved for ODF strict min-...-digits indicates the number of '?' max-...-digits indicates the total number of '?' and '#' This needs to be saved with both min-...-digits at least one because previous versions cannot have min-...-digits of 0. See tdf#38097 Change-Id: Ibd785579aa75edc315e3bd94935a146d82bbeeef Reviewed-on: https://gerrit.libreoffice.org/24903 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-05-30Choose ODF version for min-decimal-place and force-exponent-signLaurent Balland-Poirier
Change-Id: I873dbf53bbb865577fd51ee70142c1b45ea54ce2 Reviewed-on: https://gerrit.libreoffice.org/25588 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2016-05-30tdf#100134 xmloff: only update the progressbar twice for every percentMiklos Vajna
This restores the state before commit e1b78d36008d1fd188ca8dc154ad069d3476520c (#95181#; call the setValue method of the XStatusIndicator as often as possible to enable reschedule, 2001-11-26), which doesn't seem to be necessary anymore, perhaps due to the current scheduler that has priorities. Rather than a plain revert, still allow the progressbar to jump back, as that seems to be used relatively frequently. So just filter out the calls that would increment the value, but only with a small difference, compared to the shown value. Change-Id: I7136b20f1c64e267b0b4a35bbe2564e5163d9468 Reviewed-on: https://gerrit.libreoffice.org/25654 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-05-26cppcheck: variable scopeCaolán McNamara
Change-Id: I27ab82d32df984a86af1a2abda491581bff70a2c
2016-05-25Resolves: tdf#97879 loop in style hierarchy on odt loopCaolán McNamara
Change-Id: I0098c434b89b6a57e8b888a4d4f643e4d0865d29
2016-05-25Convert XMLTextParagraphExport::FrameType to scoped enumNoel Grandin
Change-Id: I9e36f6566310e960a2b49f5a57f4b4491d32bb9a Reviewed-on: https://gerrit.libreoffice.org/25366 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-24Revert "remove some manual ref-counting"Noel Grandin
until I have a better understanding of the UNO reference counting. This reverts commit 111de438ea3e512a541281dc0716cc728ea8d152.
2016-05-24Convert XMLTextType to scoped enumNoel Grandin
Change-Id: Iac147e57784e11d29f2b34e60dc3c624d6090c8b Reviewed-on: https://gerrit.libreoffice.org/25367 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-24remove some manual ref-countingNoel Grandin
triggered when I noticed a class doing acquire() in the constructor and then release() in the destructor. found mostly by git grep -n -B5 -e '->release()' Change-Id: Ie1abeaed75c1f861df185e3bde680272dbadc97f Reviewed-on: https://gerrit.libreoffice.org/25363 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-20clang-tidy misc-assign-operator-signatureNoel Grandin
Change-Id: I2953a88d9e2f5923732865ef17615d5928ac5f5f Reviewed-on: https://gerrit.libreoffice.org/25154 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-19loplugin:unusedmethods in writerfilter to xmloffNoel Grandin
Change-Id: If95890eff0f785111e8b511ac1d5481c6910f099 Reviewed-on: https://gerrit.libreoffice.org/25148 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-19clang-tidy modernize-make-uniqueNoel Grandin
Change-Id: I550bb69ddcef69906027516ccde62cf8e87c295b Reviewed-on: https://gerrit.libreoffice.org/25138 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18clang-tidy modernize-make-sharedNoel Grandin
Change-Id: I3fa866bfb3093fc876474a9d9db29fe05dc2af3a Reviewed-on: https://gerrit.libreoffice.org/25056 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-16Fix typosAndrea Gelmini
Change-Id: If7262e114b5b4cd40e9c0a8929940199ea747595 Reviewed-on: https://gerrit.libreoffice.org/25025 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-05-13clang-tidy modernize-loop-convert in writerfilter to xmlsecurityNoel Grandin
Change-Id: I334411c6b57c028ffb41b5deb72002f9d54038c3 Reviewed-on: https://gerrit.libreoffice.org/24923 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-12Convert SCA flags to scoped enumNoel Grandin
Change-Id: I761022dd78f6c1d19cf4f2650a5ac7b2212c11c3
2016-05-12Convert EA flags to scoped enumNoel Grandin
Change-Id: I7fbd4cea13fc311624804f7acd9dd66955b860d3
2016-05-12Convert BA flags to scoped enumNoel Grandin
Change-Id: I22a6f41091d69ad4ed91a745e9b7cbcebd9fad55
2016-05-12Fix bitmaskStephan Bergmann
...from e82fe5f00afe0364fbcbfea3e91e10b85faae34c "Convert BOOL_ATTR to scoped enum" Change-Id: I78500163391eae2927ea96d3f14bf4ea5535b0f6
2016-05-12Convert DA flags to scoped enumNoel Grandin
Change-Id: Iabbf4b32a1b5b47e6cfe791a15f111918d5bd3a9
2016-05-12convert CCA flags to scoped enumNoel Grandin
Change-Id: Ic52872ac60845e92cc3774c693fdd7918efefe89