summaryrefslogtreecommitdiffstats
path: root/scaddins
Commit message (Collapse)AuthorAgeFilesLines
* normalize resource locale ctor construction mechanismsCaolán McNamara2017-08-021-1/+1
| | | | | | | | | | | | make them all the same and share std::locales more various OModuleClient, etc, classes go away Change-Id: I7e3ff01a69332eeacd22e3078f66a60318de62d5 Reviewed-on: https://gerrit.libreoffice.org/40634 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* move resmgr to unotoolsCaolán McNamara2017-08-016-6/+6
| | | | | | | | | and the vast majority of translations is to the ui language so default ctor with that arg and now drop OModuleResourceClient Change-Id: I3b85a560ffdfe5f019c2271ac56a5fe4a361522b
* migrate to boost::gettextCaolán McNamara2017-07-2127-2845/+1576
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
* loplugin:constparams in scaddins,hwpfilterNoel Grandin2017-07-183-3/+3
| | | | | | | Change-Id: I91b3559b9c3f5d8837d182cf9406fad9aeee78b3 Reviewed-on: https://gerrit.libreoffice.org/40049 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* use more OUString::operator== in scaddins..sdextNoel Grandin2017-07-141-1/+1
| | | | | | | Change-Id: I8bc5c925f940283bc54698bbcba77efcca883273 Reviewed-on: https://gerrit.libreoffice.org/39937 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:useuniqueptr in scaddins..svxNoel Grandin2017-07-112-3/+4
| | | | | | | Change-Id: I309f98f6b820103a926e9fe94d67d0aff6eb6476 Reviewed-on: https://gerrit.libreoffice.org/39754 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* teach unnecessaryparen loplugin about identifiersNoel Grandin2017-07-101-1/+1
| | | | | | | Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:oncevar in scaddins..sotNoel Grandin2017-06-262-2/+2
| | | | | | | Change-Id: I657a131374b9f1153135e00ed429889518b91427 Reviewed-on: https://gerrit.libreoffice.org/39258 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
* move unlocalized pricing strings into sourceCaolán McNamara2017-06-114-62/+21
| | | | | | | | | | | and each string array is always 1 string in length, so simplify a little based on that Change-Id: I822dbe884608a935ff2cf86c059c558ee9ad4d4b Reviewed-on: https://gerrit.libreoffice.org/38644 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* make string translation loading more uniformCaolán McNamara2017-05-193-3/+3
| | | | | | | | | | | | | | | change various ResId classes that use conversion operator to OUString to functions that return a OUString drop various defines drop unnecessary toString calls Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92 Reviewed-on: https://gerrit.libreoffice.org/37817 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* Revert "Fix typos"Stephan Bergmann2017-05-183-3/+3
| | | | | This reverts commit 26a67002fcb9381b54de6cae1aaa37120d49066a. "Iff" is not a typo, see 2a65bf32ec270484dcea4d22d3c93552dc0c24dd "Revert 'Typo: iff->if'".
* Fix typosAndrea Gelmini2017-05-183-3/+3
| | | | | | | | | 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>
* loplugin:unusedmethodsNoel Grandin2017-05-181-2/+0
| | | | | | | Change-Id: I1c50d176e793397a1f9625f797a3750cf191a61c Reviewed-on: https://gerrit.libreoffice.org/37679 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* cleanup osl/diagnose.h includesJochen Nitschke2017-05-093-3/+0
| | | | | | | | | | | | | | with command > git grep -l osl/diagnose.h *.cxx | xargs grep -L -w 'OSL_\w*' | xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d' headers need more work Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab Reviewed-on: https://gerrit.libreoffice.org/37350 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Michael Stahl <mstahl@redhat.com>
* coverity#1405891..1405898: MISSING_COMMAJulien Nabet2017-05-061-8/+8
| | | | | | | | Change-Id: I481fd6fedf4df6ecbd1b9ae1651f95278fdb3b80 Reviewed-on: https://gerrit.libreoffice.org/37313 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* tdf#107566 adjust constraints for Add-In function YIELDMAT.Winfried Donkers2017-05-041-1/+1
| | | | | | | | | | | | | | Constraints are adjusted to make Calc behave the same as Excel. Constraint for rate is less severe than ODFF1.2, but a rate of 0 is mathematically no problem and Excel allows a rate of 0. Constraint that Settlement date cannot be before Issue date is neither mentioned in ODFF1.2 nor in Excel's help text for YIELDMAT, but is applied by Excel. In reality, a settlement before issue is not possible. Change-Id: I9c19d33abe8518311606fcee1c9dea32438d61a4 Reviewed-on: https://gerrit.libreoffice.org/37206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
* untranslated strings are just stringsCaolán McNamara2017-05-025-91/+84
| | | | | | | | | | removes starmaths InsertCommand in favour of InsertCommandText Change-Id: I5659adcaa28e5b5861d1a1cc5d2afa84009490f6 Reviewed-on: https://gerrit.libreoffice.org/37113 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* split these out into a standalone headerCaolán McNamara2017-04-282-606/+632
| | | | | | cut down on the chance they get mangled by a non utf-8 editor Change-Id: I672885c26883275ba57fbfac49a6c761ec00bef1
* can move these nonlocalized strings into sourceCaolán McNamara2017-04-276-1066/+618
| | | | | | | | | if u8 is suported everywhere Change-Id: I0448db49e6f2e5c6cd6806b8da072ba672b6d95a Reviewed-on: https://gerrit.libreoffice.org/37029 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky2017-04-213-3/+0
| | | | | | | | | Uwinapi is discontinued. Change-Id: I063b4d0d8fab2d60de168e960a63b8181158ac01 Reviewed-on: https://gerrit.libreoffice.org/23198 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
* loplugin:unusedmethodsNoel Grandin2017-04-203-3/+2
| | | | | | | Change-Id: Ib7a9b1b0802ca751da258065e89b412b090bb672 Reviewed-on: https://gerrit.libreoffice.org/36718 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* scaddins: silence -Werror=maybe-uninitializedMiklos Vajna2017-04-041-1/+1
| | | | Change-Id: Idbbd6490c954f50d3baa7a72cd89f081d1316e6b
* Fix typosAndrea Gelmini2017-03-252-2/+2
| | | | | | | Change-Id: I4e1a613fc99b931e84a1955695364e1d25e25e5c Reviewed-on: https://gerrit.libreoffice.org/35642 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
* loplugins:redundantcast teach it about c-style typedef castsNoel Grandin2017-03-232-2/+2
| | | | | | | Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c Reviewed-on: https://gerrit.libreoffice.org/35558 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Remove redundant 'inline' keywordStephan Bergmann2017-03-033-25/+25
| | | | | | | | | | ...from function definitions occurring within class definitions. Done with a rewriting Clang plugin (to be pushed later). Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8 Reviewed-on: https://gerrit.libreoffice.org/34874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Fix typosAndrea Gelmini2017-03-021-1/+1
| | | | | | | Change-Id: If5e709c9d6e3a4fbb568bdc261cccd214dd0cbd3 Reviewed-on: https://gerrit.libreoffice.org/34784 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* unwind RID_ANALYSIS_DEFFUNCTION_NAMES local resourceCaolán McNamara2017-02-143-633/+610
| | | | Change-Id: I65ce69460b6c5f73fd41345f55630d0fcf5c04a4
* covert ANALYSIS_* resources to StringArraysCaolán McNamara2017-02-142-3195/+882
| | | | Change-Id: Id0aba9531ef179102f62c4f89fa65a244c975570
* unwind RID_ANALYSIS_FUNCTION_DESCRIPTIONS local resourceCaolán McNamara2017-02-143-3326/+3308
| | | | Change-Id: Iad53fa9af738873c6d594d60aec1cfdb29e2ea1d
* unwind RID_ANALYSIS_FUNCTION_NAMES local resourceCaolán McNamara2017-02-144-528/+504
| | | | Change-Id: Icaab5d3690922748bd473434dbbb1d8cc6eccd2d
* convert DATE_FUNCDESC_* resources to StringArraysCaolán McNamara2017-02-143-157/+54
| | | | Change-Id: I13527ba3a53b7a0e913b672a5a87dae4a1556270
* convert PRICING_FUNCDESC_* resources to StringArraysCaolán McNamara2017-02-143-379/+94
| | | | Change-Id: If1726a57b427b73269e826b0f719d6b69782611e
* unwind RID_DATE_FUNCTION_DESCRIPTIONS local resourceCaolán McNamara2017-02-144-177/+160
| | | | Change-Id: If769264721850397c3c243c976c64c49fddf64fb
* unwind RID_PRICING_FUNCTION_DESCRIPTIONS local resourceCaolán McNamara2017-02-144-389/+371
| | | | Change-Id: Ib171e111c330241fb93edf1f2f39933eadc4adea
* unwind RID_PRICING_FUNCTION_NAMES local resourceCaolán McNamara2017-02-144-27/+20
| | | | Change-Id: I3da1caed4b6c91acdabe16d98e6d43bf5dc32247
* unwind RID_DATE_FUNCTION_NAMES local resourceCaolán McNamara2017-02-144-30/+39
| | | | Change-Id: I1d849238f6dd96986d640bb791f966a29b19525b
* unwind RID_DATE_DEFFUNCTION_NAMES local resourceCaolán McNamara2017-02-144-75/+50
| | | | Change-Id: I99ac46b89d2158d420e6458055cdeb5c6421f1ac
* unwind RID_PRICING_DEFFUNCTION_NAMES local resourceCaolán McNamara2017-02-144-46/+22
| | | | Change-Id: I9834795ef873e1ffb6cb1abc092a8333f9373e32
* don't need to store this dataCaolán McNamara2017-02-142-6/+1
| | | | Change-Id: I797c0fc9cc293b0538392362e2e582e9821da530
* don't need to store this dataCaolán McNamara2017-02-142-3/+1
| | | | Change-Id: Ic6d1e061073937b967e289d16a7d2926b5cb733a
* don't need to store this dataCaolán McNamara2017-02-142-3/+1
| | | | Change-Id: I7606088fe9e04edddc1918fa8847f927510b1086
* replace localresource of strings and keys with StringArrayCaolán McNamara2017-02-142-34/+15
| | | | Change-Id: I09543bf862dce9e0ad2afb626d58f062f552fcba
* replace localresource of strings and keys with StringArrayCaolán McNamara2017-02-142-51/+19
| | | | Change-Id: I4bbf5286384905b6201b1a04f161d50f4c9d4aef
* remove more STR_FROM_ANSI macroNoel Grandin2017-02-071-13/+11
| | | | Change-Id: I0957d1162c7b5bf8f52c7a79aaced667961d40a3
* convert ScaCategory to scoped enumNoel Grandin2017-02-072-23/+19
| | | | | | and drop unused AddIn constant Change-Id: Ic775e3c956c7200bb04be0a776a688284ba9d19b
* remove unnecessary STR_FROM_ANSI macroNoel Grandin2017-02-071-14/+11
| | | | Change-Id: I262158991a83083f999b0ae48da4ed4d77fc57fe
* convert ScaCategory to scoped enumNoel Grandin2017-02-072-27/+23
| | | | | | and drop unused AddIn constant Change-Id: I4422f34db756649cb08aa9aa7f975cef73ccfa91
* convert FDCategory to scoped enumNoel Grandin2017-02-073-130/+124
| | | | | | and drop unused AddIn constant Change-Id: I9cb07d58d7c986973d9713572538ce2142654397
* Remove dynamic exception specificationsStephan Bergmann2017-01-2611-528/+486
| | | | | | | | | | | | | | | | | | | | | | | | | ...(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>
* Avoid calling log10(0)Stephan Bergmann2017-01-251-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | ...to avoid UBSan reporting during CppunitTest_sc_addin_functions_test: [...] > Testing file:///data/sbergman/lo-san/core/sc/qa/unit/data/functions/addin/fods/imabs.fods: > warn:xmloff.style:14186:1:xmloff/source/style/xmlstyle.cxx:300: Here is a duplicate Style > scaddins/source/analysis/analysishelper.cxx:949:37: runtime error: value -inf is outside the range of representable values of type 'int' > #0 0x7f77717d11d6 in sca::analysis::ParseDouble(char16_t const*&, double&) scaddins/source/analysis/analysishelper.cxx:949:37 > #1 0x7f77717e39e5 in sca::analysis::Complex::ParseString(rtl::OUString const&, sca::analysis::Complex&) scaddins/source/analysis/analysishelper.cxx:1690:10 > #2 0x7f77717e317f in sca::analysis::Complex::Complex(rtl::OUString const&) scaddins/source/analysis/analysishelper.cxx:1664:10 > #3 0x7f777167fa79 in AnalysisAddIn::getImabs(rtl::OUString const&) scaddins/source/analysis/analysis.cxx:912:19 > #4 0x7f78148bd16a in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77:5 > #5 0x7f78148b6b70 in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:233:13 > #6 0x7f78148b3894 in bridges::cpp_uno::shared::unoInterfaceProxyDispatch(_uno_Interface*, _typelib_TypeDescription const*, void*, void**, _uno_Any**) bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:420:13 > #7 0x7f7772bdd096 in stoc_corefl::IdlInterfaceMethodImpl::invoke(com::sun::star::uno::Any const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&) stoc/source/corereflection/criface.cxx:697:9 > #8 0x7f7772bdf45a in non-virtual thunk to stoc_corefl::IdlInterfaceMethodImpl::invoke(com::sun::star::uno::Any const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&) stoc/source/corereflection/criface.cxx > #9 0x7f77d3c63f17 in ScUnoAddInCall::ExecuteCallWithArgs(com::sun::star::uno::Sequence<com::sun::star::uno::Any>&) sc/source/core/tool/addincol.cxx:1466:31 > #10 0x7f77d3c631da in ScUnoAddInCall::ExecuteCall() sc/source/core/tool/addincol.cxx:1444:9 > #11 0x7f77d484504f in ScInterpreter::ScExternal() sc/source/core/tool/interpr4.cxx:2999:19 [...] Change-Id: Ie31d6374bdac3ae11784d925011c5a67802cdf56