summaryrefslogtreecommitdiff
path: root/sw/source/core/edit/editsh.cxx
AgeCommit message (Collapse)AuthorFilesLines
2018-12-18sw_redlinehide_4b: visibility checks for EnhancedPDFExport linksMichael Stahl1-3/+9
SwEnhancedPDFExportHelper should not create links to things that are hidden by the layout: * SwCursorShell::GotoFormatField() skips deleted fields (this triggers an assert in GetCharRect() with ooo69593-1.odt) * SwEditShell::GetINetAttrs() skips deleted INet attributes (which, as an additional bonus, hides then in the Navigator too) * SwDoc::GotoOutline() skips outline nodes where we know they have been deleted (as seen in ooo66088-9.odt) * SwFlyFrameFormats are skipped by EnhancedPDFExportHelper itself * footnotes dito Change-Id: Ife77dc7724688631d20cbaf8531b3c826a8ece94 (cherry picked from commit 7d481f7ac1971be622520258a4b13ada29282844)
2018-12-07sw_redlinehide_4a: SwEditShell::GetLineCount()Michael Stahl1-1/+9
Change-Id: Ib9a13eab25b02b919d472ae864213b110e7794c7 (cherry picked from commit a4165e1b08c82b667b209ee38b4d2a2c534c1def)
2018-12-07sw_redlinehide_4a: adapt SwEditShell::ReplaceDropText()/GetDropText()Michael Stahl1-4/+17
Change-Id: Iaf6101f02bd5dbeb9a07e796932186b5e2b1a563 (cherry picked from commit 3b3a81ce2324a11530142c15c62ce64ac2bfaef5)
2018-11-15sw_redlinehide_3: add layout parameter to SwField::ExpandField()Michael Stahl1-1/+1
If the bCached=true, it shouldn't matter what the layout is, because the field won't be expanded properly anyway. Except for the SwInputField which disables caching, but that one often has a different code path anyway. For most fields it doesn't matter anyway, e.g. database fields. Change-Id: I628195f43c5d26feba94af0a832386791c072ba1
2018-11-15sw_redlinehide_3: pass layout into SwTextNode::GetExpandText()Michael Stahl1-4/+4
Thanks to [loplugin:nullptr] and [loplugin:implicitboolconversion] for finding one of the call sites; 3 current C++ compilers would otherwise have implicitly converted the parameters into nonsense without warning. Change-Id: I3cf6697b37616570fd56fd32da27752983a66f4a
2018-11-15sw_redlinehide_3: adapt SwCursorShell::UpdateMarkedListLevel()Michael Stahl1-0/+1
Change-Id: I2cd143baafae09324ad0a439cfad3f916ddb13b3
2018-09-19sw: rework annoying GetFrameOfModify/getLayoutFrame parametersMichael Stahl1-2/+3
The bCalcFrame is only evaluated if a pPoint is given; this is surprising and should be more visible in the interface, so people don't go on a goose chase to find places that may do formatting in inappropriate places. So put these parameters into a pair instead, which doesn't have particularly good ergonomics in C++, particularly since compilers warn about taking the address of a temporary object... Change-Id: I101c6eeb5bd6baf83c2bd9a6cb91ccaa04036cc3 Reviewed-on: https://gerrit.libreoffice.org/60695 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-09-19sw_redlinehide_2: adapt SwEditShell::GetCurWord()Michael Stahl1-4/+10
Move SwTextNode::GetCurWord() to SwTextFrame, this was the only caller. Change-Id: Id26cea92e1ca507fd82c5c75bc5a6eedb531d78d
2018-09-18tdf#119770 nullptr GetGraphic returnCaolán McNamara1-1/+2
Change-Id: I9e76b6704e7f82cd9d200ed6c5802101de264242 Reviewed-on: https://gerrit.libreoffice.org/60683 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-30loplugin:stringloop in swNoel Grandin1-7/+6
Change-Id: Ie316aee8d1e4f772dc25725b46e130c6717458c2 Reviewed-on: https://gerrit.libreoffice.org/58331 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-11new loplugin:shouldreturnboolNoel Grandin1-2/+1
look for methods returning only 1 and/or 0, which (most of the time) should be returning bool. Off by default, because some of this is a matter of taste Change-Id: Ib17782e629888255196e89d4a178618a9612a0de Reviewed-on: https://gerrit.libreoffice.org/54379 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-08sw_redlinehide: SwScriptInfo conversion swcrsr.cxx,edattr.cxx,editsh.cxxMichael Stahl1-2/+6
Change-Id: I3676357fbba242fe7f5ed632d704a6704e802217
2018-06-08sw_redlinehide: SwScriptInfo::GetScriptInfo() should return frame tooMichael Stahl1-6/+4
The SwScriptInfo comes from the frame, and if both are used together they have to match. Change-Id: I3de0754d9ff316180fc04708889886684d6868e5
2018-06-08sw_redlinehide: SwScriptInfo must be inited with MergedParaMichael Stahl1-7/+15
Change-Id: Ie7c9e6aa960ec5d3ac90f1aef0ea6c2a7f7cb92b
2018-06-08sw_redlinehide: trivial conversions in editsh.cxx,ndtxt.cxxMichael Stahl1-1/+1
Change-Id: Ife3df66e1873b2325a41ff196299008ce2422901
2018-04-20loplugin:constantparamNoel Grandin1-1/+1
Change-Id: Ia58d8950b3b9e48bbe9f075b9fe1eed62d9abf0d Reviewed-on: https://gerrit.libreoffice.org/53188 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-10remove swapping and link from GraphicObject and GraphicTomaž Vajngerl1-3/+2
Change-Id: If81127e0589b504909801bcbf392d2dec3a3efc1 Reviewed-on: https://gerrit.libreoffice.org/52244 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-20loplugin:useuniqueptr in SwCalcNoel Grandin1-1/+1
update the table to use a template, which gets rid of lots of casting Change-Id: Ic9ed3901a33e1cd1a1d4335a704d0dd91a5c2f8a Reviewed-on: https://gerrit.libreoffice.org/51414 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-30loplugin:unused-returns in swNoel Grandin1-2/+1
Change-Id: I753fcdd35d461880a8d8160213cabd465cfde967 Reviewed-on: https://gerrit.libreoffice.org/48189 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-22Make loplugin:unnecessaryparen warn about (x) ? ... : ... after allStephan Bergmann1-1/+1
...which had been left out because "lots of our code uses this style, which I'm loathe to bulk-fix as yet", but now in <https://gerrit.libreoffice.org/#/c/45060/1/> "use std::unique_ptr" would have caused an otherwise innocent-looking code change to trigger a loplugin:unnecessaryparen warning for pFormat = (pGrfObj) ? ... (barring a change to ignoreAllImplicit in compilerplugins/clang/unnecessaryparen.cxx similar to that in <https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in loplugin:simplifybool consistent", which should also have caused the warning to disappear for the modified code, IIUC). Change-Id: I8bff0cc11bbb839ef06d07b8d9237f150804fec2 Reviewed-on: https://gerrit.libreoffice.org/45088 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-21loplugin:flatten in swNoel Grandin1-21/+22
Change-Id: I64176f48d90303f078e326c8838da9eb2daf8126 Reviewed-on: https://gerrit.libreoffice.org/44937 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-31RotateFlyFrame2: Unified FrameAreaDefinitionArmin Le Grand1-1/+1
Isolated all Frame AreaDefinition and it's layout flags to SwFrameAreaDefinition class which is now base for SwFrame. Adapted calls to get/set and WriteAccess hekper classes accordingly. This allows much deeper understanding what Writer is doing when layouting it's frames and needed when reaction on such changes is necessary Change-Id: I96220a1d140e69c76cc63023aae26e4ed17f3504
2017-10-30Adapted to get/setSwFrame and get/setSwPrintArmin Le Grand1-1/+1
Change-Id: I6cce40ec49dd5bd32d94fe06b9d2dabd368448be
2017-10-30Isolated SwFrame members maFrane and maPrtArmin Le Grand1-1/+1
To gain more control over changes of the Writer layout, isolated mentioned members and replaced all calls with inline methods for read and/or write access. Moved to own class to also identify 'private' accesses reliably. Change-Id: Ib0b7f852f5176744e860e2aad12dd13c9a906d68
2017-10-21loplugin:redundantcast handle dynamic_castNoel Grandin1-1/+1
Change-Id: I7855c76e820efce96778b1c19ec71dffcc4b4abb Reviewed-on: https://gerrit.libreoffice.org/43621 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-10-05tdf#96505 Get rid of cargo cult long integer literalsudareechk1-1/+1
Removed 0L and 1L in sw/source/ directory files Change-Id: I5c9a7c2f1ff7cc7a4d204540fd93efdc1b4859cf Reviewed-on: https://gerrit.libreoffice.org/42562 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-10-05tdf#112292 - fix memory leak and use more auto ref counting in swNoel Grandin1-2/+2
this bug was introduced in commit a754294ac7a902fe96fbbd6b8b6824a360d6b248 use rtl::Reference in SwDocFac instead of manual acquire/release fix it by using automatic ref-counting (i.e. rtl::Reference) everywhere. Note that the logic in SwViewShell::~SwViewShell is somewhat interesting. From my reading of it, it was previously potentially calling getIDocumentLayoutAccess on an SwDoc that had just been deleted. So if there is a problem with this commit I would look there first. Change-Id: I95b6b7e7523689c8b56063af642c3a84cbdcd331 Reviewed-on: https://gerrit.libreoffice.org/43131 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-14clang-tidy modernize-use-emplace in swNoel Grandin1-1/+1
Change-Id: I92fd035824f247dc61edfb18c54b960a7733fdf7 Reviewed-on: https://gerrit.libreoffice.org/42244 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-28Translate German comments/debug strings (leftovers in dirs starmath to sysui)Johnny_M1-1/+1
Translates leftovers found using a custom regex. Additionally translated: - One randomly found comment in /reportdesign - Test strings in /stoc/test (let's see if it works) Change-Id: I5f893c194c4b56b5365700928a3b8b63936d03e2 Reviewed-on: https://gerrit.libreoffice.org/41583 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-07-04support for saving a modified image instead of original versionMarco Cecchetti1-0/+7
Normally when you save an image through the "Save..." entry in the context menu for an image, the saved image is the original one more eventually applied filters (which are not removeable). Further applied transformations like rotations, cropping, color effects are not included in the saved image. This patch offers the user to choose if saving the original image (with filters) or the modified version through a pop-up dialog. The new feature is available in Writer, Draw and Calc. Change-Id: I4f983e3a5e8a6839fa5789a96c4d8c44477c1fd7 Reviewed-on: https://gerrit.libreoffice.org/39480 Reviewed-by: Marco Cecchetti <mrcekets@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-07-02loplugin:casttovoid: swStephan Bergmann1-1/+0
Change-Id: I224e9995962901e8740bfaed06d57f7c0389236c
2017-05-12sw: change SwCursorShell::Pop() parameter from meaningless bool to enumMichael Stahl1-1/+1
Change-Id: Iadc660025e1501118cb0a659d92d42af924b1c6f
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-16convert SwUndoId to scoped enumNoel Grandin1-8/+8
Change-Id: I782fdd53641c0d7c629265b6179de70aa54382f9 Reviewed-on: https://gerrit.libreoffice.org/35246 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-06sw: remove unnecessary upcastsJochen Nitschke1-1/+1
guess some broken compiler needed these Change-Id: If0132f6363555fea2ef880bd7af343c2d7b2a0a4 Reviewed-on: https://gerrit.libreoffice.org/34925 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-01typesafe wrappers for css::i18nutil::TransliterationModulesNoel Grandin1-1/+1
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-29convert ND constants to o3tl::typed_flagsNoel Grandin1-6/+3
Change-Id: I5fe3df5515017ec24db1184e8aca823714fcfdb3 Reviewed-on: https://gerrit.libreoffice.org/31343 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-08loplugin:constantparam in swNoel Grandin1-2/+2
Change-Id: Ibae4cac28e6ff52298c804519f683017729c07a5
2016-08-31fix buildNoel Grandin1-0/+1
Change-Id: Ic2c1396b0945118887f176d1b7e8bd9ef972bdcd
2016-08-31convert SwDocPositions to scoped enumNoel Grandin1-2/+2
Change-Id: Idd9414b4a10398130337e474fb8fd4063e3bd4f8
2016-08-30loplugin:stringconstant: adapt to improved OUStringLiteral1 (sw)Stephan Bergmann1-1/+1
Change-Id: Ifa1a6bafd3628b48ebceb09f8cd864361848e81c
2016-08-30Let OUStringLiteral1 take its arg as ctor arg, not template argStephan Bergmann1-1/+1
...which makes it more flexible, can now also be used on non-const arguments. The drawback of the argument no longer being a compile-time constant is remedied by making the ctor constexpr. Change-Id: Ia4903a2cc86791fece92eac0cb8406b6659dd19d
2016-07-04remove comphelper::string::removeNoel Grandin1-1/+1
and replace it with OUString/OString::replaceAll Change-Id: I37b1c3b51251dfd9d749d6f1060c75b3a93d7f1a Reviewed-on: https://gerrit.libreoffice.org/26850 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-27Convert GRAPHIC to scoped enumNoel Grandin1-5/+5
Change-Id: I1fd09a729cbda00f99841532e0dd3fa66bce7bea Reviewed-on: https://gerrit.libreoffice.org/25534 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-22Avoid reserved identifiersStephan Bergmann1-7/+7
Change-Id: I27ff0f4f0eb395d7e0a60dd604758c220a3134c4
2016-03-22loplugin:constantparam in swNoel Grandin1-1/+0
Change-Id: I56925a8fd776b3ee787cc26adbaa08c58dd022c0
2016-03-09loplugin:constantparam in swNoel Grandin1-56/+18
Change-Id: I8fa1af4a34770b71f6f4bb28b3313edf4875322b
2016-02-08vcl: cmdevt.[hc]xx -> commandevent.[hc]xxChris Sherlock1-1/+1
Change-Id: I77b30f28ae5a6fad360d7cada9acfaa9c324408b Reviewed-on: https://gerrit.libreoffice.org/22216 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-21loplugin: unused return valuesNoel Grandin1-2/+1
Change-Id: I4eb1f0c9245c04058fd5e47046f043f8840a79c7 Reviewed-on: https://gerrit.libreoffice.org/21628 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-25bin/rename-sw-abbreviations.shlibreoffice-5-1-branch-pointRobinson Tryon1-108/+108
This commit renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I77e5134f42f25e3786afa36b7a505c7e3237a9e8