summaryrefslogtreecommitdiff
path: root/sw/source/uibase/inc/wrtsh.hxx
AgeCommit message (Collapse)Author
2017-06-09clang-tidy readability-non-const-parameterNoel Grandin
Change-Id: I7b2680898dbfc49185fb949349d81f4ac615a470 Reviewed-on: https://gerrit.libreoffice.org/38593 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-13sw: some old GCC apparently doesn't like that, let's try thisMichael Stahl
Change-Id: I1d6e74ae990faecfd3a28e0971ed6abe20bcef75
2017-05-12sw: change SwCursorShell::Pop() parameter from meaningless bool to enumMichael Stahl
Change-Id: Iadc660025e1501118cb0a659d92d42af924b1c6f
2017-04-21pass RndStdIds around instead of sal_uInt16Noel Grandin
Change-Id: I28c85b8a5370faa06043ad93412897778ed1a619 Reviewed-on: https://gerrit.libreoffice.org/36731 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-12convert SelectionType to scoped enumNoel Grandin
Change-Id: Iefdf6d47b1c0189c3b3e39ad5a025e95f18fe6b6 Reviewed-on: https://gerrit.libreoffice.org/36446 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-16Clean up integers representing positions in SwOutlineNodes vectorsStephan Bergmann
Change-Id: If1a6a9cb61ffd355a85835127e7c893969833587
2017-03-02Complete the transition of SwRedlineTable::size_typeStephan Bergmann
...from 9ca8a63fff65acf2ea13b391495ad232f4636548 "Use consistent integer types in the SwRedlineTable interface". This all started as an attempt to reduce the number of places a to-be-committed improved loplugin:loopvartoosmall complains about. Lets see where it ends... SwRedlineTable::size_type is now the size_type of the underlying std::vector, no longer sal_uInt16 from ancient times. I tried hard to find all places that are affected by this change, changing types of affected variables and non-static data members as needed. Some notes: * The original code used USHRT_MAX as a "not found" value. I replaced that with a new SwRedlineTable::npos, of type SwRedlineTable::size_type but still for now of value USHRT_MAX. This should eventually be changed to something more sensible, like std::numeric_limits<SwRedlineTable::size_type>::max() (which is best done after we have constexpr support in all toolchains, so that npos can be constexpr). It is important that the value of npos is towards positive infinity, as many places in the code use for (i = f(); // may return npos i < table.size(); ++i) table[i] ... * There are some borders where values of SwRedlineTable::size_type are converted into different types, for various reasons. But all of those other types should be large enough for practical purposes (at least 32 bits wide): MakrEntry::m_nIdx: long int SvxRedlinTable::InsertEntry: sal_uIntPtr nPos SwRangeRedline: size_t SwRedlineItr: sal_Int32 SwVbaRevision::GetPosition: sal_Int32 SwXRedlines: sal_Int32 * .uno:TrackedChangeIndex= transports textual representations of such values. libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx treats them purely as strings, while SwTiledRenderingTest converts them to int. * TODO: The one place I'm unsure about is SfxUInt16Items with IDs FN_REDLINE_ACCEPT_DIRECT, FN_REDLINE_REJECT_DIRECT, and FN_REDLINE_NEXT_CHANGE in sw/source/uibase/uiview/view2.cxx. For now, I kept those as SfxUInt16Items and take care to "map" USHRT_MAX to npos when reading from those items. But I have no idea where instances of those items would actually be created, and what it would mean to change those items' types? Change-Id: Ib7a14dc67e2b970766966e43f4732abd9f045ff8 Reviewed-on: https://gerrit.libreoffice.org/34775 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-01typesafe wrappers for css::i18nutil::TransliterationModulesNoel Grandin
and related css::util::SearchOptions2 The TransliterationModules enum has it's constants spread over multiple UNO enum/constant-collections - TransliterationModules and TransliterationModulesExtra, which means that most code simply uses sal_Int32. Wrap them up into a better bundle so that only the lowest layer needs to deal directly with the UNO constants. Change-Id: I1edeab79fcc7817a4a97c933ef84ab7015bb849b Reviewed-on: https://gerrit.libreoffice.org/34582 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-25replace URLLOAD constants with o3tl::typed_flagsNoel Grandin
Change-Id: Ief6cb3dfc53da8cbae0feded9e215905c7a8459c
2016-11-23tdf#42949 Remove unused uno headers from /sw/source/uibaseBartosz Kosiorek
Change-Id: Iec10c5411814008f873868382faf245f38eeae1f Reviewed-on: https://gerrit.libreoffice.org/31097 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05Remove _TYPED suffix from tools/link.hxx macrosStephan Bergmann
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually typed Link" to distinguish the new, typed versions from the old, untyped ones, but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173 "remove untyped Link<>" removed the old versions. Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-03loplugin:countusersofdefaultparams in sw..vclNoel Grandin
Change-Id: I152df55f5a30e073c66cfd3a64d5090a20cb232d Reviewed-on: https://gerrit.libreoffice.org/29471 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-08convert nsRedlineMode_t to typed_flagsNoel Grandin
including fixing a bug in SwXMLExport::exportDoc where it was ORing with a constant from a different type: nsRedlineType_t::REDLINE_INSERT Change-Id: I2bb154c9a35d106e64fd1a8b6e928d0384c9fafe
2016-09-07loplugin:constantparam in swNoel Grandin
Change-Id: I16badc615e98202668b1b201035b5137cb94c10c
2016-08-31convert FindRanges to o3tl::typed_flags_setNoel Grandin
Change-Id: I745b2f469e44b79a06a18bc5264aae75b096835c
2016-08-25loplugin:countusersofdefaultparamsNoel Grandin
Change-Id: I7150494a56abc6ec9c7fba39cefe3967a475f073
2016-08-17loplugin:unusedenumvalues in swNoel Grandin
Change-Id: Ia5faa65cd7824183cead2634edab96b5d23a6c02 Reviewed-on: https://gerrit.libreoffice.org/28072 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26tdf#100051 Partially revert "loplugin:constantparam in sw"Miklos Vajna
This partially reverts commit 9585c8b8c8d8724cc1bad4a2060c828c15599929. Instead of removing the nCount parameters, make use of them in SwXTextViewCursor::go{Left,Right,Down,Up}. For the following testcase: a document with 1000 lines, and calling goDown(1000, true) the spent time goes from 4 secs to 1.8 secs with this for me. Change-Id: I10351a6dbaa6d3fff883520c85701f60b05b4873 Reviewed-on: https://gerrit.libreoffice.org/25450 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-04-22Avoid reserved identifiersStephan Bergmann
Change-Id: I27ff0f4f0eb395d7e0a60dd604758c220a3134c4
2016-03-31loplugin:constantparam in swNoel Grandin
Change-Id: I2d99ff8149f6348a3781e01e9b3079f6c2505d6a
2016-03-22loplugin:constantparam in swNoel Grandin
Change-Id: I56925a8fd776b3ee787cc26adbaa08c58dd022c0
2016-03-09loplugin:constantparam in swNoel Grandin
Change-Id: I8fa1af4a34770b71f6f4bb28b3313edf4875322b
2016-03-04loplugin:unuseddefaultparam in swNoel Grandin
Change-Id: I1a8a25c09ae0c8ba39fcedb032562df93fdd6ba4
2016-02-24let SvxSearchItem use SearchOptions2Eike Rathke
And all those places that interface to SvxSearchItem. Change-Id: I08915824a596cd0f247a89f44e4684cd22b98082
2016-01-28sw: add AnchorType parameter to .uno:PasteMiklos Vajna
Which allows not hardcoding as-char for LOK. Change-Id: I3b2987abbaf1f259c614b7b2a8709f15048d362d
2016-01-13loplugin:unusedmethods unused return value in sw/Noel Grandin
Change-Id: Iaec71124b04ed678686d646df3ff0892585d3d50
2016-01-10Fix typosAndrea Gelmini
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2015-11-25bin/rename-sw-abbreviations.shlibreoffice-5-1-branch-pointRobinson Tryon
This commit renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I77e5134f42f25e3786afa36b7a505c7e3237a9e8
2015-11-16Rename SetCursor -> CallSetCursor to avoid future name clash.Jan Holesovsky
Change-Id: I0e0e2351f1bcccee8157c00ab22c35dcf2007ec5
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
2015-11-06com::sun::star->css in sw/source/coreNoel Grandin
Change-Id: I30016977f1be8fb53dd239367d043de92a9467d9
2015-10-20Up/Down's bSelect param cannot be defaulted anywayStephan Bergmann
...because SwWrtShell inherits SwCrsrShell::Up/Down, which already default their first param. Change-Id: I62fa00c3e1e679dcb2e5bbd50f34cb9a6926b7b8
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-09-29Fix typosAndrea Gelmini
Change-Id: Ifddd2533b767924791338555031b848c59980c52 Reviewed-on: https://gerrit.libreoffice.org/18989 Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org> Tested-by: Joren De Cuyper <jorendc@libreoffice.org>
2015-09-23no point in redeclaring methods with slightly different namesNoel Grandin
Change-Id: I446ca61415e998d1f325b602cb587815af5ff425 Reviewed-on: https://gerrit.libreoffice.org/18813 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-23convert Link<> to typedNoel Grandin
Change-Id: I6a4fade1688dfce9aec1530da51ea874cddfcbc0 Reviewed-on: https://gerrit.libreoffice.org/18812 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-23remove unused Link<> parameterNoel Grandin
Change-Id: I9d8916b69e2e986ee1e30091cb046e7812a68ed1 Reviewed-on: https://gerrit.libreoffice.org/18795 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-18convert Link<> to typedNoel Grandin
Change-Id: I706a3b3489dc8e945ce9e7e7ddc41104e9a15bab
2015-08-28make PostUserEvent Link<> typedNoel Grandin
Change-Id: I13f10bda985d55d419a5bff481130a456ae2db8a
2015-08-21AutoCorrect methods result in ambiguous overloadsNoel Grandin
When actually using the parameter defaults. So just remove the defaults. Change-Id: I02dbffcd87a3a07382cb10655d46e7d0312f4e51
2015-07-21loplugin:unusedmethods swNoel Grandin
Change-Id: Ied51535fa169451fc4991237122817a34a59f6fe Reviewed-on: https://gerrit.libreoffice.org/17256 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-20bin/rename-sw-abbreviations.shlibreoffice-5-0-branch-pointChristian Lohmaier
renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
2015-05-10Replace IMPL_STATIC_LINK[_TYPED] with more useful variantsStephan Bergmann
Change-Id: I9764e8860ee66cc94456eae879a9fc90d0ad850d
2015-04-30Gradually typed LinkStephan Bergmann
Turn the Link class into a template abstracting over the link's argument and return types, but provide default template arguments that keep the generic, unsafe "void* in, sal_IntPtr out" behvior. That way, individual uses of the Link class can be updated over time. All the related macros are duplicated with ..._TYPED counterparts, that additionally take the RetType (except for LINK_TYPED, which manages to infer the relevant types from the supplied Member). (It would have been attractive to change the "untyped" LinkStubs from taking a void* to a properly typed ArgType parameter, too, but that would cause -fsanitize=function to flag uses of "untyped" Link::Call.) Change-Id: I3b0140378bad99abbf240140ebb4a46a05d2d2f8
2015-03-14SwWrtShell: rename member variables missing their prefixesMiklos Vajna
Change-Id: I78ae647cca9167e130592fd11b8dd15c512a2353
2015-03-11sw: s/eEnde/eEnd/Michael Stahl
Change-Id: I9ea963d09c2975b8e40856e3ba2d3896be9a1876
2015-03-02V813: Decreased performanceCaolán McNamara
Change-Id: I49c022b29a2771b5091ba04b85e5117773730b85
2015-02-03Typo: selction/slection -> selectionJulien Nabet
Change-Id: I3f405d9525d3afb6534166fd733cabf7779a2846
2014-11-16Remove sal_True/sal_False from code and comments in sw includesMatteo Casalin
Change-Id: Icfbbae898749196e27199802ec728417d5205bc5