summaryrefslogtreecommitdiff
path: root/sw/inc
AgeCommit message (Collapse)Author
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-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: remove overloading of IDocumentContentOperations::InsertMichael Stahl
Change-Id: I29114e7057262f8fd169927abc9d3186a4c74c0c
2017-05-10sw: remove some unused macros from swtypes.hxxMichael Stahl
Change-Id: I50fd0d5c19e351675d19546c40009dba479a87a1
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-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-08sw: fix doxygen commentMichael Stahl
Change-Id: I89b323a61f0617dfe6c21adbdfb3f8a7c90d6d15
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(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-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-07Fix typosAndrea Gelmini
To complete commit 076758857a98 Change-Id: I6424109e3aee8a3236e40168bdd98c725a7afafb Reviewed-on: https://gerrit.libreoffice.org/37306 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-05-06coverity#1405890 Unchecked dynamic_castCaolán McNamara
Change-Id: Ib17e612d8d9b9e9fb712f3fdb4dba24d583a6dba
2017-05-06Typo: attibute(s)->attribute(s)Julien Nabet
Change-Id: Ief134396d3144257e64832cad2590db5d477447a Reviewed-on: https://gerrit.libreoffice.org/37312 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-05-05Fix typosAndrea Gelmini
To complete commit 0ef94e2b559547bc4e906e7f24e57ff5d642e108 and f12096272e684ddcd8ffa4e34dcb0a680cc594c2 Change-Id: Ie86bbfbd58dd728a013bef221e4d5c8fbcaf8e03 Reviewed-on: https://gerrit.libreoffice.org/37199 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-05-03AutoText: first tests & windows fixSzymon Kłos
First tests for AutoText DOCX import: + checking if nothing will be imported when there is no AutoText, only normal content + checking count of loaded entries + checking names of entries + checking first and last paragraph Windows fix: Added swdocxreader to msword library Change-Id: I3cf02572dd85e72b1566ce523e373753a4bd346c Reviewed-on: https://gerrit.libreoffice.org/37176 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2017-05-03tdf#88555 sw: reduce usage of dynamic_cast in SwFormatsModifyBase::ContainsMichael Stahl
This is a bad idea as the function is sometimes used to check if a SwFormat has been deleted, which can happen in Undo. Replace with ContainsFormat() and IsAlive(), and don't require a non-const SwFormat parameter so that the dynamic_cast using one isn't called all the time but only called once where it's safe. Change-Id: Ib74b79629f5c8ed432a912ada5974a6d816e7d31
2017-05-03tdf#88555 sw: remove dynamic_cast from SwFrameFormats::ContainsMichael Stahl
This is a bad idea as the function is sometimes used to check if a SwFrameFormat has been deleted, which can happen in Undo, and for SwCallMouseEvent before commit 32403675bf9d2d0380956f9a82da71593edbb53c Replace with ContainsFormat() and IsAlive(), and don't require a non-const SwFrameFormat parameter. Change-Id: I87ede94dfbfe7f6985f13faab4c156015c3a5fc0
2017-05-03remove empty commentsNoel Grandin
found with: git ls-files | xargs grep -Pzl '/\*\* (\*|\s| )*\*/' Change-Id: I1f47bcb94d5a7b290a6c622c6941195fbb578597 Reviewed-on: https://gerrit.libreoffice.org/37159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-02Revert "SwTOXTypes can just be a std::vector typedef"Noel Grandin
This reverts commit f894da4e687302702d14218138f96ed1c4983124. the default behaviour of SwVectorModifyBase is to free the elements in it's destructor Change-Id: I7a34fe5cc3cb8ffbcbb92068f4bb816dfd9acd43 Reviewed-on: https://gerrit.libreoffice.org/37168 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-02Revert "SwFieldTypes can just be a std::vector typedef"Caolán McNamara
This reverts commit 5eaad8eb1d46b6f85605c5ac210e8b1397b18b22. cause it now leaks as the ~SwVectorModifyBase base deletes the entries Change-Id: I02374f4b439b9cf3e8f331aa9c6892b4418f37f0
2017-05-02SwFieldTypes can just be a std::vector typedefNoel Grandin
Change-Id: I10b43a71c8cedc6efbb30056d3da7fd431f04791 Reviewed-on: https://gerrit.libreoffice.org/37121 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-01SwTOXTypes can just be a std::vector typedefNoel Grandin
Change-Id: I0b20f4dfdbc692e9122f64a11b65bd4234e00ee7 Reviewed-on: https://gerrit.libreoffice.org/37120 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-28tdf#107494 sw: fix crash in SwCallMouseEvent when deleting headerMichael Stahl
The problem is that SwCallMouseEvent::PTR.pFormat is not cleared when the format is destroyed; instead SwDoc::CallEvent() checks via SwFrameFormats::Contains() that the format is still alive, which uses dynamic_cast on the deleted format. (presumably regression from 0f98299f7aa44bbb55c1bfeddca7799f727d14b0) Change-Id: I0d155c162d75b5687b58329a2a862ad57a4eb72e
2017-04-28loplugin:salunicodeliteral: swStephan Bergmann
Change-Id: I3ec5a60fff8577677eaa4977cddf69bec4078cec
2017-04-27remove sw bitmaps from .src filesCaolán McNamara
Change-Id: I9ccd69662f9d3a77d1921b3433b0e2f541960a90 Reviewed-on: https://gerrit.libreoffice.org/37020 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-27tools: move errcode.hxx to the vcl moduleChris Sherlock
Change-Id: I17e5a033de5f0aeb0a726744f7b464cdab6e2ee3 Reviewed-on: https://gerrit.libreoffice.org/36854 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-26remove this whole "kill SwFlyDrawContact with last frame" nonsenseBjoern Michaelsen
- first of all, SwFlyDrawContact is part of the document state/model, not the layout. - SwWW8ImplReader::CreateContactObject() and SwXFrame::GetOrCreateSdrObject() seem to agree as they create SwFlyDrawContacts without caring for frames using them being around. This was inherently fragile as FinitDrawObj would mercilessly kill the SwFlyDrawContact in that case (and thus also modify document state). - SwFlyDrawContact is now entirely owned by SwFlyFrameFormat. Change-Id: I70b716fef63279552b39a18ac143024a460ba785 Reviewed-on: https://gerrit.libreoffice.org/36899 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2017-04-26use strong_int for LanguageTypeNoel Grandin
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-25tdf#101055 Translate default name of bookmarksGabor Kelemen
Change-Id: I9dd5ab006c7b7e7da7c4c2705925bbf264b58b60 Reviewed-on: https://gerrit.libreoffice.org/36813 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-04-25errinf.hxx moved out of tools and into vcl moduleChris Sherlock
ErrorInfo has a hard depency on VCL, yet is in the tools package. It is more appropriate to have it reside in the VCL module. Change-Id: Ica54a46c3a7f86cf0331ed7245234bea69c05650 Reviewed-on: https://gerrit.libreoffice.org/36839 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-25remove DYING_FLYFRAMEFORMAT: now obsoleteBjoern Michaelsen
Change-Id: If82cdcb184069058209e1b23a50b699433dcdfe7 Reviewed-on: https://gerrit.libreoffice.org/36898 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2017-04-25use a unique_ptr to track the SwFlyDrawContactBjoern Michaelsen
Change-Id: I1b9058b41d1708efa4069e737c2247c6600403f5 Reviewed-on: https://gerrit.libreoffice.org/36897 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2017-04-24move SwFlyDrawContact ownership to SwFlyFrameFormatBjoern Michaelsen
Change-Id: I19a65638c7489f74cc7ae5fc08364a103551cd1a Reviewed-on: https://gerrit.libreoffice.org/36878 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2017-04-24coverity#1405474 Unintended sign extensionCaolán McNamara
and coverity#1405473 Unintended sign extension coverity#1405472 Unintended sign extension coverity#1405471 Unintended sign extension Change-Id: I1db183206cb03167d0dd13b2a3470caa3ea1cb4e
2017-04-24move SwDrawFlyContract creation into CreateNewRefBjoern Michaelsen
Change-Id: Ied86e1fd9424fc28e95215e60bed95069b7b51a6 Reviewed-on: https://gerrit.libreoffice.org/36869 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2017-04-21tdf#68604: Commit the data from the postit to the model before docx save.Jan Holesovsky
Change-Id: I74f4adad5f142b35ff8819577b1dbd6e5c45db96 Reviewed-on: https://gerrit.libreoffice.org/36757 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-04-20loplugin:unusedmethodsNoel Grandin
Change-Id: Ib7a9b1b0802ca751da258065e89b412b090bb672 Reviewed-on: https://gerrit.libreoffice.org/36718 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-20loplugin:inlinefields in SwHTMLTableLayoutNoel Grandin
and make the memory management a little more obvious with std::unique_ptr. Change-Id: Ie0dad6a52f70896e144cc396d39c10e9cbff4316 Reviewed-on: https://gerrit.libreoffice.org/36667 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-19sw: replace rudimentary SwCursorShell::m_nBasicActionCntMichael Stahl
The functions to modify the counter were removed in 2004-2006 and there is no evidence in the git repo of these functions ever being called, so the BasicActionPend() condition is effectively equivalent to ActionPend(). Change-Id: Ic8b9c8c6039c318943c96e90f2370cb5a1046ff9
2017-04-19sw: resolve m_pCursorStack overloadMichael Stahl
Both SwCursorShell and SwWrtShell have a m_pCursorStack member, which is confusing gdb. Change-Id: Ie4674fa08eafcfae5273740d7ed8271614f311ab
2017-04-19tdf#106929 sw: SwCursorShell::Pop() ensure cursor ring is recreatedMichael Stahl
... from table cursor. The problem is that in this case, between Push() and Pop() there is no call to ClearMark() or any of the other functions that sets the SwTableCursor::m_bChanged flag, so MakeBoxSels() is never called for the m_pCurrentCursor after Pop() and there is no cursor ring selecting all table cells. (regression from b227a8e4d65e4bbfe991aed9342fe3e30eca8639) Change-Id: I5bce18b71fed60a926f4ddf9938dfb7d1ddf4e92
2017-04-18remove sfx2/sfxcommands.hCaolán McNamara
Change-Id: Ic131adc90f2891497623441dd94da2d3401a93e5
2017-04-18convert readonly menu to .uiCaolán McNamara
Change-Id: Ia9400b3c4b410dbf70633e55286a4af77f0d651a
2017-04-14AutoText: .dotx files visible when importSzymon Kłos
Change-Id: Idd2cdd9696a15ca5a215fc42b46cc470c4c25a28 Reviewed-on: https://gerrit.libreoffice.org/36550 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2017-04-13convert annotation menu to .uiCaolán McNamara
Change-Id: Id15e1c2040d3d202e90984888598da4426b5fec4
2017-04-13convert TableChgMode to scoped enumNoel Grandin
Change-Id: Ib667b15a878bb59cdfe80e9692b31afda85ec5b7 Reviewed-on: https://gerrit.libreoffice.org/36475 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>