summaryrefslogtreecommitdiff
path: root/sw/source
AgeCommit message (Collapse)Author
2017-05-12convert SdrLayerId to strong_intNoel Grandin
Also - rename SetOfByte to SdrLayerIDSet - add asserts in SdrLayerAdmin::GetUniqueLayerID so that we don't allocate overlapping SdrLayerID values - add a new constant SDRLAYERPOS_NOTFOUND to be returned from SdrLayerAdmin::GetLayerPos Change-Id: I3bb3489f9338e3d02c4040bcbd811744699941c8 Reviewed-on: https://gerrit.libreoffice.org/37467 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-11tdf#107773 DOC import: consider page breaks for multi-page floattablesMiklos Vajna
See commit 8fe8bd6c3b5b1a539b7370f8c457fa69c061d2de (Related: fdo#61594 SwWW8ImplReader::StartApo: don't always start a frame, 2013-05-13) for the context, this is one more case where having a multi-page floattable as a multi-page one is a better option. The additional condition is that in case there is a break right after the table, then always import the table as a non-floating one, as there won't be any wrapping anyway (due to the break). Change-Id: I3dd4174226cfc1e825c00607221feeed51b7133f Reviewed-on: https://gerrit.libreoffice.org/37513 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-11Comment on suspicious use of U+00B5 MICRO SIGNStephan Bergmann
...which had been like that at least since 7b0b5cdfeed656b279bc32cd929630d5fc25878b "initial import". Change-Id: I16e3cc14ed459c5833f2bfa6ead3bec4e819db31 Reviewed-on: https://gerrit.libreoffice.org/37184 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-05-11lok: sw: change tracking: deleted characters aren't deleted right awayMarco Cecchetti
Problem: Start/open a document in CS Writer, and enable track changes. - Type a few characters. - Delete a couple of them with backspace or delete. => The deleted characters are still shown in the document (but not in the tracking comment). Findings: In SwViewShell::ImplEndAction pRegion is 0, so no call to SwRootFrame::Paint->vcl::Window::Invalidate occurs. That is due to the fact that the call to SwLayAction::Action() does not lead to populating *pRegion with rectangles (SwViewShellImp::AddPaintRect). In fact we stop at SwLayAction::TurboAction_ since pCnt->IsValid() returns true and so SwLayAction::PaintContent() is never invoked. SwFrame::IsValid() returns: mbValidPos && mbValidSize && mbValidPrtArea. Here SwFrame::mbValidSize is the one that makes the difference: it is true in Online and false in Desktop. (In our case the other 2 data members are always true). The reason is that the computation of the text range (SwShellCursor::FillRects) in SwRedlineTable::LOKRedlineNotification, which occurs just before collecting paint rectangles, leads to invoke SwContentFrame::MakeAll which in turns set SwFrame::mbValidSize to true. Solution: Call SwFrame::InvalidateSize() on any frame on which MakeAll is invoked soon after we finish to compute the text range in SwRedlineTable::LOKRedlineNotification. Change-Id: Id5e29b06c044f14207722e67d6f5facbf786ffa6 Reviewed-on: https://gerrit.libreoffice.org/37508 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-05-11tdf#107258 Create show/hide all comments toggle button.Gulsah Kose
Created new show/hide all comments button for calc by ShowAnnotations command. Unifyied writer, calc and impress's ShowAnnotations slot. Change-Id: I27149d09ee1763b84258c5e0c890a9628c8874c0 Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/36697 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-05-11ofz there may be no m_pSmartTagDataCaolán McNamara
Change-Id: Ibd529c5db35f2ca64372629ab1fe0ecd08e2ea01
2017-05-11ofz clear the *other* cache too to avoid lsan leak whiningCaolán McNamara
Change-Id: Ib8ce5b83d711e4425bb9f441b8d495a05af820bf Reviewed-on: https://gerrit.libreoffice.org/37501 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-11tdf#39468: Translate German comment/term in sw/source/filter/ww8/wrtww8gr.cxxJens Carl
Change-Id: I5760af990e62cff357cdd2b80db0b129a96a857e Reviewed-on: https://gerrit.libreoffice.org/37491 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-05-11tdf#39468: Translate German comments/termsJens Carl
Change-Id: I85fc05d53c2d53a4922d8322331247ed3ca21361 Reviewed-on: https://gerrit.libreoffice.org/37493 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-05-11tdf#39468: Translate German comments sw/source/filter/html/htmlfly.hxxJens Carl
Change-Id: Ifa287b96f47b5e61eb43289a20a1102ed37c6722 Reviewed-on: https://gerrit.libreoffice.org/37492 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-11tdf#39468: Translate German comments in sw/source/filter/ww8/wrtw8esh.cxxJens Carl
Change-Id: I0fe20381756dcc891c60fbf03f3cfd91719cdc61 Reviewed-on: https://gerrit.libreoffice.org/37490 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-05-11remove some unnecessary temporary OUStringsNoel Grandin
found with: git grep -nP 'OUString\(\s*\w+\s*\)' | grep -v new | grep -v return Change-Id: I923109b4339210aed2639e423fbc4d5f19233f02 Reviewed-on: https://gerrit.libreoffice.org/37463 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-10fix wrong Sequence sizeJochen Nitschke
Avoid this kind of mistake with list initialization and cppcheck is happy too. Change-Id: Ibcd609590f3dc3c2e98434c26d4bd64324a2036d Reviewed-on: https://gerrit.libreoffice.org/37472 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-10tdf#107512 sw: fix rollback of text attributes in SwUndoDeleteMichael Stahl
The problem is that in SwUndoDelete::UndoImpl(), first the formatting attributes are restored via TmpRollback(), and then all footnote/fly attributes are restored via Rollback(). This means that the SwHistory doesn't actually store the original positions of the formatting hints; ideally there wouldn't be 2 separate steps here, but that appears difficult to change now given the plethora of calls to DelContentIndex() ... So work around the problem by adding a new SetAttrMode::NOHINTEXPAND to prevent expanding the existing hints when the CH_TXTATR_BREAKWORD are inserted from SwUndoDelLayFormat. This fixes 2 problematic cases: at the start of the paragraph, and if the hint ends at the position before the CH_TXTATR_BREAKWORD. Let's hope this won't break anything anybody cares about. Change-Id: I557c4c9136f4225ca502019730fb9f0a9c03d23b
2017-05-10sw: avoid assert in SwUndoDelete::RedoImplMichael Stahl
1. insert as-char fly in paragraph 2. hit DEL to delete it 3. Undo 4. Redo Assertion `aTmp.GetPoint()->nNode != rPam.GetPoint()->nNode && aTmp.GetPoint()->nNode != rPam.GetMark()->nNode' failed This was added in e06131e96629eee4e94eba1da7242380716e8e88 assuming that this branch is only reachable with m_bDelFullPara, but it turns out that you get no start/end text also because DelContentIndex() already deleted everything. Change-Id: If4ce55dd4b63d6db11ed3195f78cd595149c0c1b
2017-05-10sw: remove overloading of IDocumentContentOperations::InsertMichael Stahl
Change-Id: I29114e7057262f8fd169927abc9d3186a4c74c0c
2017-05-10sw txt export: Greatly improve the export of bullets & numbering.Jan Holesovsky
Includes unit testing infrastructure for .txt export too + the actual unit test. Change-Id: I19a32955bbc9b97449b4240917fe2505bc3dd54c Reviewed-on: https://gerrit.libreoffice.org/37295 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-05-10tdf#39468: Translate German comments/terms sw/source/filter/ww8/wrtw8esh.cxxJens Carl
Change-Id: I762481e200447ae37231bd62db90bc515a4368a4 Reviewed-on: https://gerrit.libreoffice.org/37453 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-05-10tdf#39468: Translate German comments/terms in sw/source/filter/html/swhtml.cxxJens Carl
Third set of translations. Change-Id: Ic28042d8422218cf70101628a6c065ce20371024 Reviewed-on: https://gerrit.libreoffice.org/37454 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-05-10tdf#39468: Translate German comment in sw/source/filter/ww8/wrtww8.hxxJens Carl
Change-Id: I89c5a835b1b896888821423e67e5fb3e73a31916 Reviewed-on: https://gerrit.libreoffice.org/37452 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-10tdf#39468: Translate German term in sw/source/filter/ww8/ww8glsy.cxxJens Carl
Change-Id: I22c9504e3bc3cc87c0851d7582ed2669ab8dc1bf Reviewed-on: https://gerrit.libreoffice.org/37455 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-10AutoText: add only real AutoText entriesSzymon Kłos
* add only autoTxT gallery type * new test with other types of entries Change-Id: Ibf7751c73dcf3b6ebd69eec5f4931dbeaaf098c8 Reviewed-on: https://gerrit.libreoffice.org/37425 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2017-05-09PreserveRedlineFlags is long goneJochen Nitschke
it was renamed from PreserveRedlineMode to PreserveRedlineFlags in commit 847e004e65ec3c35acff607588d15cd75a84f121 convert nsRedlineMode_t to typed_flags PreserveRedlineMode is dead for 16 years, we stopped setting the filter argument in commit 93dca26e27a4bc51ac873777ef8b134283ae9f71 Date: Wed May 2 15:26:26 2001 +0000 added redline password protection moved redlining enabled flag from view settings to redline element Change-Id: I9c5f38cc42c4595e38862461e28340b450722f0f Reviewed-on: https://gerrit.libreoffice.org/37431 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
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>
2017-05-09drop obsolete mailtosCaolán McNamara
Change-Id: Ice2f3a41c06ffaa58d1f0040d53e24fab89ca438
2017-05-09Fix typosAndrea Gelmini
Change-Id: Ie0f67456e5c7d9b7b26b27b4d633881236ceeadb Reviewed-on: https://gerrit.libreoffice.org/37361 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-05-09loplugin:checkunusedparams in sw(part6)Noel Grandin
Change-Id: I8c32274081663038526e1af2bd2977604b3f88b5 Reviewed-on: https://gerrit.libreoffice.org/37393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-09make loplugin constantparam smarter about string paramsNoel Grandin
Change-Id: Id3df69b38fd35f46735246a6d307a89aa10d4294 Reviewed-on: https://gerrit.libreoffice.org/37426 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-09tdf#107620 RTF export: handle DocumentSettingId::PARA_SPACE_MAX compat settingMiklos Vajna
As it turns out it has a dedicated RTF control word. With this, the bugdoc is again kept as a one-page document during DOCX -> RTF conversion. If we are at it, also write the automatic before/after paragraph spacing markup. Change-Id: I78de644f0631e59ef507dfaa07c5a812d4ef10cd
2017-05-09ofz avoid oomCaolán McNamara
Change-Id: I7d7e249a75fb33ac6a72e941f6b8f92ff8edf25a
2017-05-09tdf#39468: Translate German comments/terms sw/source/filter/ww8/ww8par6.cxxJens Carl
Change-Id: Ia17fdf5238f0b250a9c1be683c0616643f53aced Reviewed-on: https://gerrit.libreoffice.org/37418 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-05-09SetInReading for duration of TestImportDOCCaolán McNamara
Change-Id: I688ec95db500cc1d86402b7da2305528b1f25890
2017-05-09loplugin:checkunusedparams in sw(part5)Noel Grandin
Change-Id: Iee48e6c77f1eb57cd8a3a245e5415051b85f4cc1 Reviewed-on: https://gerrit.libreoffice.org/37387 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-05-09loplugin:checkunusedparams in sw(part4)Noel Grandin
Change-Id: Ia264c192ac02a07bba67a66196899d13b19f83f0 Reviewed-on: https://gerrit.libreoffice.org/37386 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-09tdf#39468: Translate German comments/terms in sw/source/filter/html/swhtml.cxxJens Carl
Second set of translating German comments and terms. Change-Id: Iee55162e9cb5c4e29713304232bfa636a243ccf4 Reviewed-on: https://gerrit.libreoffice.org/37417 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-09tdf#39468: Translate German comments in sw/source/filter/ww8/writerhelper.cxxJens Carl
Change-Id: I1a7bf4a97952674147029457e0a0ff12cd541cba Reviewed-on: https://gerrit.libreoffice.org/37420 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-09tdf#39468: Translate German comments in sw/source/filter/ww8/ww8scan.cxxJens Carl
Change-Id: I91757da79e03deaffe005cb912ff91d604b3ec64 Reviewed-on: https://gerrit.libreoffice.org/37419 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-09ofz avoid oomCaolán McNamara
Change-Id: I84f0eedb8081a3d22f6e02bac0b21456c7d1553a
2017-05-09loplugin:constantparamNoel Grandin
Change-Id: Ia9500b25602c14aadf49fe373682ae9d87a0a1a2 Reviewed-on: https://gerrit.libreoffice.org/37390 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-08tdf#39468: Translate German comments/terms in sw/source/filter/html/swhtml.cxxJens Carl
First set of translating German comments and terms. Change-Id: I95a52fd46cace8a254dddffcc8f8406c0ae6a157 Reviewed-on: https://gerrit.libreoffice.org/37311 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-05-08tdf#70960 sw::UndoManager: fix exponential Repeat proliferationMichael Stahl
In case of a multi-selection, the usual pattern is that the EditShell contains a loop around GetCursor()->GetRingContainer() that creates N "groups" of undo-actions, all of which are inside a SfxListUndoAction. If that is then repeated again with a multi-selection, the result will be N*N actions, etc. This is usually not an issue because most repeatable actions are idempotent - except for the resource usage. Prevent the 2nd step of the proliferation by introducing a flag in SwUndo to do nothing in SwUndo::Repeat() that is set for all but the 1st cursor of the multi-selection in sw::UndoManager::Repeat(). (presumably regression from CWS undoapi) Change-Id: I095258f6d57af6bcaa8a39747632422e8311e694
2017-05-08loplugin:checkunusedparams in sw(part3)Noel Grandin
Change-Id: I604aa74e737894daa6e1878ac3ed61d9eeb6512a Reviewed-on: https://gerrit.libreoffice.org/37296 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-08tdf#39468: Translate German comments/terms in sw/source/filter/ww8/ww8par2.cxxJens Carl
Change-Id: I4dc53515e4e05b2de9c875bd2165329847d1bbef Reviewed-on: https://gerrit.libreoffice.org/37310 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-05-08sw: prefix members of SwImpBlocksMiklos Vajna
Change-Id: I6ffe2eb6a1c401ccaa031be5d9ce9fae488d0014 Reviewed-on: https://gerrit.libreoffice.org/37376 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-08tdf#39468: Translate German comments in sw/source/filter/ww8/wrtw8sty.cxxJens Carl
Change-Id: I7d3e5a366446007c323681abf2b75f54e427d145 Reviewed-on: https://gerrit.libreoffice.org/37309 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-05-08loplugin:checkunusedparams in sw(part2)Noel Grandin
Change-Id: Ic6829542628ed1f5ed7d6b3d6be1d28ed1b5c75b Reviewed-on: https://gerrit.libreoffice.org/37292 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-08ofz avoid oomCaolán McNamara
Change-Id: I1cbcdc0aec8596fce4a803f885b328e604dc22fd
2017-05-08loplugin:checkunusedparams in sw(part1)Noel Grandin
Change-Id: I4847b0f96033016e020212fb8d7331309db25b55 Reviewed-on: https://gerrit.libreoffice.org/37287 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-08teach loplugin:constantparam about simple constructor callsNoel Grandin
Change-Id: I7d2a28ab5951fbdb5a427c84e9ac4c1e32ecf9f9 Reviewed-on: https://gerrit.libreoffice.org/37280 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-08cppcheck nitpicks variableScope and redundantAssignmentJochen Nitschke
Change-Id: I1399e066a96bbd9a3b59e2670a75b0022c882a1d Reviewed-on: https://gerrit.libreoffice.org/37354 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>