summaryrefslogtreecommitdiff
path: root/editeng/source/items/textitem.cxx
AgeCommit message (Collapse)AuthorFilesLines
2018-08-24Resolves: tdf#112563 we don't want a human representation of SvxRsidItemCaolán McNamara1-0/+12
Change-Id: I6a57440b08258ddcbfaa955a62c4963a83193115 Reviewed-on: https://gerrit.libreoffice.org/59516 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-03-07use more Color in editeng..formsNoel Grandin1-10/+5
Change-Id: If6c862e7bb61cd78c3379afde11b528a74162900 Reviewed-on: https://gerrit.libreoffice.org/50860 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-28convert COL_ constants to be of type ColorNoel Grandin1-1/+1
Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48 Reviewed-on: https://gerrit.libreoffice.org/50373 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-27replace Color(COL_*) with COL_*Noel Grandin1-1/+1
using git grep -lwP "Color\s*\(\s*(COL_\w+)\s*\)" | xargs perl -pi -e "s/Color\s*\(\s*(COL_\w+)\s*\)//g" and then some manual fixup where the resulting expression no longer compiled Change-Id: I0e268d78611c3be40bba9f60ecfdc087a36c0df4 Reviewed-on: https://gerrit.libreoffice.org/50372 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-26Translate German variable namesJohnny_M1-4/+4
Translated the enum values in editeng, but kept the their translation references in editrids.hrc, to prevent a need to update translations. "UPPERCASE" was used instead of "CAPS", in alignment to style::CaseMap. The values in svxitems.sdi don't seem to be used anywhere, but translated anyway. Change-Id: I1b3a9a68ce814841819b361ce5767764e3b1968c Reviewed-on: https://gerrit.libreoffice.org/50305 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-20drop Color::SetColor(ColorData) in favour of operator=Noel Grandin1-1/+1
first stage of getting rid of ColorData Change-Id: I5e4e95eb958722814c43c8d1ebfef17ad18c29ec Reviewed-on: https://gerrit.libreoffice.org/49997 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-20loplugin:unusedmethodsNoel Grandin1-53/+0
Change-Id: If00b0e659e1818c29ae39b89f8b4f7ea29d14986 Reviewed-on: https://gerrit.libreoffice.org/48185 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-15More loplugin:cstylecast: editengStephan Bergmann1-37/+37
Change-Id: I58978e5376ff1b91fa6dddbd308c923b3f3ab0ec
2018-01-12More loplugin:cstylecast: editengStephan Bergmann1-58/+58
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: I09a4d688e6f3c1ecbe05a7d27ebd955e8ba1eb65
2017-12-13tools: remove unused #include from solar.hMichael Stahl1-0/+1
Change-Id: I214e13add371380701ae39403d90a574a63e495d
2017-12-10ofz#4582 Floating-point-exceptionCaolán McNamara1-7/+11
Change-Id: I808022d970dc6e35839a032f4ebf024a48fadd11
2017-11-13clang-tidy modernize-use-equals-default in editengJochen Nitschke1-28/+0
remove default-able copy constructors/assignments and a non-virtual default dtor. Change-Id: I3fcc23a480031a9ede00ea22ae8f5ac5e892fd9c Reviewed-on: https://gerrit.libreoffice.org/44657 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-12use copy constructor to clone PoolItemsJochen Nitschke1-12/+6
Change-Id: I2a45a62fd56cc5a768406c7a6e4c72456f962367 Reviewed-on: https://gerrit.libreoffice.org/44648 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-10loplugin:unusedmethodsNoel Grandin1-1/+0
Change-Id: I543b0943f0bc918d59debc8ee051f88c29d18454 Reviewed-on: https://gerrit.libreoffice.org/44553 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-24loplugin:implicitboolconversionStephan Bergmann1-1/+1
("explicit conversion (NoOp) from 'const bool' to 'bool' implicitly cast back to 'const bool'", seen now with a recent trunk Clang 6, and with experimentally enabling -std=gnu++17 for the LO build; not sure what caused this to be triggered only now for me) Change-Id: I5310961b1d50870d3ae06554e4cb37e12ac68151
2017-10-05tdf#112817 editeng,svx: fix SvxUnderlineItem/SvxOverlineItem SDIMichael Stahl1-0/+3
This was asserting because the superclass SvxTextLineItem was instantiated instead of the specific subclasses. Change-Id: If26847b8fa96dbf00062ba8372fe58e58c786782
2017-09-08loplugin:constantparamNoel Grandin1-2/+1
Change-Id: Ic87f0cc863490858b7cc7e74a7f90ec31992dd53 Reviewed-on: https://gerrit.libreoffice.org/42089 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-22drop unused SvxScriptTypeItemJochen Nitschke1-14/+0
apparently there was never a user for this item since initial commit in the year 2000. SvxScriptSetItem gets the ScriptType by parameter see GetItemOfScript and PutItemForScriptType. remove SID_ATTR_CHAR_SCRIPTTYPE and don't put the item in any set. keep the gap in the ID range because it's not part of any range and there are already other gaps. Change-Id: Iee24f13b329593af2dc5548d8b6bc2282c2dc5b3 Reviewed-on: https://gerrit.libreoffice.org/41423 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-08loplugin:unusedmethodsNoel Grandin1-105/+0
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-07Removing unused SfxItemPool serialisation from editengVarun Dhall1-325/+0
Change-Id: I051201c272b7acdd48d54cc0c230f8b432196188 Reviewed-on: https://gerrit.libreoffice.org/40429 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-31make IntlWrapper arg to GetPresentation non-implicit and non-optionalCaolán McNamara1-32/+32
which requires explicitly adding null in 1) SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItemSet* p2ndSet) where SdrItemBrowserControl is only used by SdrItemBrowser and the only use of that is within DBG_UTIL in SdrPaintView 2) SwCursorShell::GetContentAtPos( const Point& rPt, within a #ifdef DBG_UTIL block in 3) SvxSearchDialog::BuildAttrText_Impl( OUString& rStr, bool bSrchFlag ) const where the other branch uses SvxResId 4) SfxPoolItem::dumpAsXml(xmlTextWriterPtr pWriter) const 5) XFillStyleItem::dumpAsXml(xmlTextWriterPtr pWriter) const looks very much like all uses (outside the dumpers) are intended to be in the ui locale results in that INetContentTypes::GetPresentation always called with UI Locale Change-Id: I5a110c107838b4db3c355476426d6532f2b6ce52 Reviewed-on: https://gerrit.libreoffice.org/40538 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-21de-hrc various thingsCaolán McNamara1-2/+1
e.g. helpid[s].hrc -> helpids.h and insert include guards where missing move "ordinary" defines into .hxx files remove .hrc entries that are used as arguments to dialog factory when a dedicated method can be added instead Change-Id: I792fb8eb0adfaa63cf354e6e57401fc943e9196e
2017-07-21migrate to boost::gettextCaolán McNamara1-71/+170
* 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
2017-07-10teach unnecessaryparen loplugin about identifiersNoel Grandin1-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>
2017-06-28-Werror=ignored-qualifiers (GCC 8)Stephan Bergmann1-3/+3
Change-Id: I2a43ce3ca6af87ac53dd534c0c37150a000e7013
2017-06-23loplugin:oncevar editeng..extensionsNoel Grandin1-4/+2
Change-Id: I3a63e3e3b873ef8a2d708d39be084124a6ad1346 Reviewed-on: https://gerrit.libreoffice.org/39153 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-16Make SfxItemSet ranges correct by constructionStephan Bergmann1-1/+1
This is a follow-up to 45a7f5b62d0b1b21763c1c94255ef2309ea4280b "Keep WID ranges sorted, and join adjacent ones". While SfxItemSet::MergeRange relies on the m_pWhichRanges being sorted (and, under DBG_UTIL, asserts if they are not), the various SfxItemSet constructors curiously only check (via assert or DBG_ASSERT) that each individual range has an upper bound not smaller than its lower bound. Arguably, all SfxItemSet instances should fulfill the stronger guarantees required and checked by MergeRange. And in many cases the ranges are statically known, so that the checking can happen at compile time. Therefore, replace the two SfxItemSet ctors taking explicit ranges with two other ctors that actually do proper checking. The (templated) overload taking an svl::Items struct should be used in all cases where the range values are statically known at compile time, while the overload taking a std::initializer_list<Pair> is for the remaining cases (that can only do runtime checking via assert). Most of those latter cases are simple cases with a single range covering a single item, but a few are more complex. (At least some of the uses of the existing SfxItemSet overload taking a const sal_uInt16* pWhichPairTable can probably also be strengthened, but that is left for another day.) This commit is the first in a series of two. Apart from the manual changes to compilerplugins/clang/store/sfxitemsetrewrite.cxx, include/svl/itemset.hxx, and svl/source/items/itemset.cxx, it only consists of automatic rewriting of the relevant SfxItemSet ctor calls (plus a few required manual fixes, see next). But it does not yet check that the individual ranges are properly sorted (see the TODO in svl::detail::validGap). That check will be enabled, and the ensuing manual fixes will be made in a follow-up commit, to reduce the likelyhood of accidents. There were three cases of necessary manual intervention: * sw/source/core/unocore/unostyle.cxx uses eAtr of enum type RES_FRMATR in braced-init-list syntax now, so needs explicit narrowing conversion to sal_uInt16. * In sw/source/uibase/uiview/formatclipboard.cxx, the trailiing comma in the definition of macro FORMAT_PAINTBRUSH_FRAME_IDS needed to be removed manually. * In svx/source/svdraw/svdoashp.cxx, svx/source/svdraw/svdotext.cxx, sw/source/uibase/app/docstyle.cxx, sw/source/uibase/shells/frmsh.cxx, sw/source/uibase/shells/grfsh.cxx, and sw/source/uibase/shells/textsh1.cxx, some comments had to be put back (see "TODO: the replaced range can contain relevant comments" in compilerplugins/clang/store/sfxitemsetrewrite.cxx). A few uses of the variadic form erroneously used nullptr instead of 0 for termination. But this should have been harmless even if promoted std::nullptr_t is larger than promoted sal_uInt16, assuming that the part of the nullptr value that was interpreted as sal_uInt16/promoted int was all-zero bits. Similarly, some uses made the harmless error of using 0L instead of 0. Change-Id: I2afea97282803cb311b9321a99bb627520ef5e35 Reviewed-on: https://gerrit.libreoffice.org/38861 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-13Let SfxSetItem ctor take SfxItemSet by unique_ptrStephan Bergmann1-1/+2
Change-Id: I219dd03477862169cd50eecc14822f6a023f879a
2017-04-26use strong_int for LanguageTypeNoel Grandin1-6/+6
Change-Id: If99a944f7032180355da291ad283b4cfcea4f448 Reviewed-on: https://gerrit.libreoffice.org/36629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-06loplugin:redundantcast check for c-style float castsNoel Grandin1-1/+1
Change-Id: I86b6f58887cb398a80698f8d8564b5bc3f55eabb Reviewed-on: https://gerrit.libreoffice.org/36198 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-05loplugin:redundantcast find c-style bool castsNoel Grandin1-6/+6
Change-Id: I3237b93babc67de12c3771aa84766c2141ca93b2 Reviewed-on: https://gerrit.libreoffice.org/36137 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-03tdf#39468 Translate German commentsJens Carl1-1/+1
Translate German comments and terms in UnoControls/, editeng/, filter/, odk/, reportdesign/, sd/, sfx2/, starmath/, svl/, svtools/, toolkit/, tools/, writerfilter/, and xmloff/. Change-Id: Ibc401a425ddfdf41e4e4a78600f3fbce8cfaa2b1 Reviewed-on: https://gerrit.libreoffice.org/35992 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-04-02Add SvxTextRotateItem inherited from SvxCharRotatItemTamás Zolnai1-12/+107
I will be use it later for text rotation inside a table. Change-Id: I4cbaf05953b0e71331d2f3fdb45b7c4254a2b8cc Reviewed-on: https://gerrit.libreoffice.org/36021 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-04-02coverity#1403662 Mixing enum typesCaolán McNamara1-5/+5
Change-Id: Ic5e797c65dfc736a9ef0ab14f3ae563216143947 Reviewed-on: https://gerrit.libreoffice.org/36020 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-29loplugin:unusedmethodsNoel Grandin1-34/+0
Change-Id: Ib008613fb06c82791c63d5b074a3e2ff1c3607a0 Reviewed-on: https://gerrit.libreoffice.org/35834 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-23loplugins:redundantcast teach it about c-style typedef castsNoel Grandin1-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>
2017-03-22loplugin:redundantcast find redundant c-style enum castsNoel Grandin1-1/+1
Change-Id: I2dab376d87804521aed6b6bd41ad7762830fa349 Reviewed-on: https://gerrit.libreoffice.org/35467 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-18remove EE_RESSTR preprocessor abuseBjoern Michaelsen1-30/+30
Change-Id: I83b35c4e2d4275ac76a36bec03807be69a605c58 Reviewed-on: https://gerrit.libreoffice.org/35370 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-03-15remove useless castsJochen Nitschke1-2/+2
Change-Id: I900b72372a56d341d18091b0d4721d31002d147f Reviewed-on: https://gerrit.libreoffice.org/35223 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-08convert SvxCaseMap to scoped enumNoel Grandin1-15/+17
Change-Id: Iea77ddc21e9b2d5a021c08e323da9ccabf9d46bd Reviewed-on: https://gerrit.libreoffice.org/34963 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-07Resolves: coverity#1402073 Mixing enum typesCaolán McNamara1-5/+2
Change-Id: Ifb8ca51cd8937b740c810083b45d5e7fbb06d91f
2017-03-05Proper fix for multiply defined SfxEnumItem<sal_uInt16> with MSVCStephan Bergmann1-1/+1
With --disable-pch the original hack from f091259ad2ec1590714645839668580cd7b8c7c4 "convert SfxEnumItem to type-safe template class" doesn't happen to work: When linking sd, the occurrences of SfxEnumItem<sal_uInt16> in sd/inc/sdattr.hxx clash with those from editeng (where LanguageType is a typedef for sal_uInt16) and svl (as the respective include files from editeng and svl happen to not be included). For whatever reason, the explicit instantiation declaration without a __declspec(...) in include/svl/eitem.hxx doesn't seem to make a difference (at least with MSVC 2015 Update 3). Change-Id: I51b5943fe19a7184db9414192c6364f7c26b79eb Reviewed-on: https://gerrit.libreoffice.org/34903 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-03remove unused CreateDefault methodsNoel Grandin1-11/+0
Change-Id: Ifbdd7d41f0938e9a03693f88416792ff8087f8c2 Reviewed-on: https://gerrit.libreoffice.org/34850 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-03convert SfxEnumItem to type-safe template classNoel Grandin1-19/+20
and drop the SvxChartTextOrientItem class, unused. Change-Id: I99100837d1beb953450f57b2cda47d165df1620c Reviewed-on: https://gerrit.libreoffice.org/34747 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-28new loplugin unoanyNoel Grandin1-9/+9
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89 Reviewed-on: https://gerrit.libreoffice.org/34714 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-15teach sallogareas plugin to catch inconsistenciesNoel Grandin1-3/+3
Change-Id: I8bcea5ffc74d48148bea78da8c17744e288c069a Reviewed-on: https://gerrit.libreoffice.org/32004 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-13OSL_TRACE->SAL in chart2..ooxNoel Grandin1-1/+1
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-11-18editeng: assert SfxPoolItem::operator==Michael Stahl1-9/+9
Change-Id: Ia6c6f4f5af1e3a803b464ab410558984c3861a65
2016-11-16make the element names in dumpAsXml match the class namesNoel Grandin1-6/+6
Change-Id: I955facfe3e901fcb76798dab342f96a67d5ac63f Reviewed-on: https://gerrit.libreoffice.org/30894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-17let LanguageTag::convertToLocale() decide when to create a temporaryEike Rathke1-1/+1
Change-Id: Iaefddb13192aff1aad912ac9f908c3d12236b94d