/chart2/

abora/dcm-6.2'>distro/collabora/dcm-6.2 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/oox/source/drawingml/textfield.cxx
AgeCommit message (Collapse)Author
2023-01-16Use o3tl::toInt32 in oox/source/drawingml/textfield.cxxMike Kaganski
rtl_ustr_toInt32 was incorrectly used, relying on null-terminated content of string views. Change-Id: Ia3e4bb04a029149e5945274f592252704c34f3eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145549 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-22rename oox::OptValue::get to valueNoel Grandin
as a step in replacing OptValue with std::optional Change-Id: Ia5d05c28a88beaced11ae1d0414de66106cc9e20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136269 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-21rename oox::OptValue::has() to has_valueNoel Grandin
as a step towards converting it to std::optional Change-Id: I9b2201c29827fcddae3b46480065c90b2907e6cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136210 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-04Just use Any ctor instead of makeAny in ooxStephan Bergmann
Change-Id: Id6c8341b545c819521056926ef1b80d20d148c5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133795 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-12Introduce FastAttributeList::add(NS) taking std::u16string_viewMike Kaganski
... and simplify some places removing explicit conversions from OUString to OString. Change-Id: I4cdf9f3ee3101b3d00a0bbba53a983ed3bebce4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131445 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-22Extend loplugin:stringviewparam to starts/endsWith: ooxStephan Bergmann
Change-Id: I02b4352f02fe32f40c4fe0ab198d8ac094381c7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122491 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-07-19tdf#59323 tdf#142221: fix pptx datetime import export formatSarper Akdemir
fixed some problems from the original implementation of pptx datetime field formatting (2b0669eec0d86e973a7d8def8744c522bbf8af8b) also the comments on tests seemed to be based on en-IN which seems to differ a lot for SvxDateFormat::StdBig. So converted them to en-US's StdBig. expanded the tests, so it covers previously poorly imported types. Also made them use the SvxDateFormat and SvxTimeFormat Change-Id: I675c482d3095b5373975abb2e6e7eca2d353243d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118135 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2021-06-14tdf#59323: ooxml import: add OOXML to LO datetime helperSarper Akdemir
Added static helper functions getLOTimeFormat and getLODateFormat to TextField class for mapping datetime field types to SvxDateFomat and SvxTimeFormat. Change-Id: I9c1553cc89d47855dc7af06a8ea995de01692ded Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117001 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-04-27Make upcasting css::uno::Reference ctor require complete typesStephan Bergmann
The main reason for the "home-grown" UpCast introduced with 904b3d1fceee5827076758ed2a81f80cb73493ca "Up-cast conversion constructor for css::uno::Reference" in 2013 was probably that we could not yet rely on C++11 std::is_base_of back then. A (welcome) side effect was that the derived class could be incomplete. However, specializations of UpCast relying on whether or not T2 is incomplete are obviously an ODR violation if the type is incomplete in some TUs and complete (and derived from T1) in others. And even if UpCast had internal linkage, it would still be brittle that its behavior depends on the completeness of T2 at the point of the template's instantiation, and not necessarily at the point of use. That means we should better base that ctor on std::is_base_of (which we can do now since 39a1edd6fec902ef378acce8af42c4d7fba280d0 "Make css::uno::Reference upcast ctor LIBO_INTERNAL_ONLY"), which causes a compilation error at least on Clang and GCC if the completeness requirements are not met. This change fixes all the cases where types need to be complete now, plus any resulting loplugin:referencecasting warnings ("the source reference is already a subtype of the destination reference"). Change-Id: Ieb9e3552e90adbf2c5a5af933dcb872e20661a2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92950 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-03-16tdf#42949 Fix IWYU warnings in oox/source/[cd]*/*cxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie3c59da7b9e0ad06fcd7f247e47bcc17ea35b17a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90503 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-15clang-tidy modernize-concat-nested-namespace in ooxNoel Grandin
Change-Id: I9877be75e1f7dcefdf7172d05dfbb0a63d06ced1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86803 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-25tdf#126324 Import custom date as custom XTextFieldTamas Bunth
Change-Id: I89f96490a47210e7daa3b21b2399e0dfe0cf3abf Reviewed-on: https://gerrit.libreoffice.org/81513 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2019-08-16use more TOOLS_WARN_EXCEPTIONNoel Grandin
Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86 Reviewed-on: https://gerrit.libreoffice.org/77569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-15loplugin:logexceptionnicely in linguistic..ooxNoel Grandin
Change-Id: I3f96494f5fecb2f1011578b768198c1204147202 Reviewed-on: https://gerrit.libreoffice.org/74099 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-07log nice exception messages whereever possibleNoel Grandin
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1 Reviewed-on: https://gerrit.libreoffice.org/68579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-30Add missing sal/log.hxx headersGabor Kelemen
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from l10ntools to reportdesign Change-Id: Ia2dc93dd848c2dc0b6a8cb6e19849c614ec55198 Reviewed-on: https://gerrit.libreoffice.org/58205 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-10-23loplugin:includeform: ooxStephan Bergmann
Change-Id: I9f1cc9940f5b31370394f789ebfaddfd6d30ca61
2017-10-19Fix typosAndrea Gelmini
Change-Id: I101357736813bfd47fb15d347fd2c0a33133de56 Reviewed-on: https://gerrit.libreoffice.org/43506 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-18Replace lists by vectors in ooxJulien Nabet
Change-Id: I951466552fd1cdb3b8f1cbfc07e64f5e0424552e Reviewed-on: https://gerrit.libreoffice.org/43469 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-12clang-tidy modernize-use-emplace in ooxNoel Grandin
Change-Id: I9ea063b7f6c63ae1ad039859efeebb292d44c6e2 Reviewed-on: https://gerrit.libreoffice.org/42172 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-09cleanup osl/diagnose.h includesJochen Nitschke
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>
2016-12-13OSL_TRACE->SAL in chart2..ooxNoel Grandin
Change-Id: I133a6441824bfbefcfcda130119b5c5d706f86b2 Reviewed-on: https://gerrit.libreoffice.org/31907 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-13OSL_TRACE->SAL in framework..salNoel Grandin
Change-Id: I9a897af88aa9f6f7ca98ce521c69b5a4ee8462e9 Reviewed-on: https://gerrit.libreoffice.org/31903 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann
Change-Id: I379e89e1e6b9fd8668ba7ac59af33f63487a4f66
2016-02-08Export and import of additional fields in ImpressRosemary Sebastian
These include - Author - Page Count - Page Name Export and import of slide number was already implemented. A test for the same has been added along with the tests for the newly implemented field exports. In sdmodeltestbase.hxx a new method getTextFieldFromPage has been added to reduce copy-paste code Change-Id: Icf54b91a7db4b3cccd9d0666a2706e3cc2a89d9a Reviewed-on: https://gerrit.libreoffice.org/22065 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-02-02Export and import of file name fieldRosemary Sebastian
Change-Id: Ic2c8ce0ff2a54079ef81f6ce2770497a9d22c7b6 Reviewed-on: https://gerrit.libreoffice.org/21902 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-01-27Format the datetime fields properly on importRosemary Sebastian
Make sure that, after export, the datetime fields in impress are imported with the correct number format. Change-Id: I5565fef69b3a62e7dd59ea0d39cde151fb0af976 Reviewed-on: https://gerrit.libreoffice.org/21610 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I62a20b440064aca6f102e61cb3984bb95e739a4f
2014-12-15oox: Use appropriate OUString functions on string constantsStephan Bergmann
Change-Id: I55ee581c9d3fc0a17639833a6a034e2addf768d1
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-10-08back out more wrong and confusing tools::Time comment changesEike Rathke
Apparently fc04f76336fdf8c96e35382cdeb497e2f939705c used some sed script to change all ... Change-Id: Ie609bd02a2c5d70109fc6185cf4440480f29d8f5
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-14Move oox/drawingml/*hxx internal headers to oox/inc.Matúš Kukan
Do not export LinePropertiesContext class as visible. And move GraphicProperties to its own header. Change-Id: I047c181e9f2adc7e59885f59663ea56c7eb898ed
2014-04-03oox: sal_Bool->boolNoel Grandin
Change-Id: I2ad60bd64cabb29a9e909f31e7d5bd92989120f7
2014-02-14drawingML import: fix inheritance of character heightMiklos Vajna
The problem was that in case a shape had multiple (e.g. two) paragraphs, and in case the first paragraph had an explicit character height, but not the second, then the cursor carried over the explicit character height to the second paragraph, but it shouldn't, as that leads to incorrect character height in the second paragraph. Fix this by remembering the default character height and using that in case nothing is set explicitly. Change-Id: I66e06d5cf192739fb254f7280c74617171d9ee6a
2013-11-11convert OUString compareToAscii == 0 to equalsAsciiNoel Grandin
Convert code like aStr.compareToAscii("XXX") == 0 to aStr.equalsAscii("XXX") which is both easier to read and faster. Change-Id: I448abf58f2fa0e7715dba53f8e8825ca0587c83f
2013-05-22Use the new type-checking Reference constructor to reduce code noiseNoel Grandin
Also create a Clang compiler plugin to detect such cases. Change-Id: I61ad1a1d6b1c017eeb51f226d2dde0e9bb7f1752 Reviewed-on: https://gerrit.libreoffice.org/4001 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2013-03-11use startsWith() instead of compareToAscii()Thomas Arnhold
brain damage... Change-Id: I4dc63c7346f724eded9ac7b82cda25c2bb60beff
2013-01-04oox: kill no longer needed CREATE_OUSTRINGMiklos Vajna
2012-12-07::rtl:: prefixes removal in ooxJosé Guilherme Vanz
This commit removes some ::rtl:: prefixes and some macros in OOX Change-Id: I0c5ad9805ec2e8ed1092c56fe32e6901fdbd2b67 Signed-off-by: José Guilherme Vanz <guilherme.sft@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/1261 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2012-07-17re-base on ALv2 code. Includes:Michael Meeks
retain presence of MPL licensed nssrenam.h symbol renamer.