summaryrefslogtreecommitdiff
path: root/sw/inc
AgeCommit message (Collapse)Author
2020-11-19tdf#123936 Formatting files in module sw with clang-formatPhilipp Hofer
Change-Id: I6243bc95129bf81a124d006ce0fc1aa1b5f618bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105718 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins
2020-11-17SwGrfNode: Remove graphic arrived hackBjoern Michaelsen
Change-Id: Ib8fb5b223a1b3cc05a75ecfcc7c763bbb3928fae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105965 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-16Replace needless SwClientNotifyCalls with CallSwClientNotifyBjoern Michaelsen
Change-Id: I967d458be7cd7c68ff410357da0cb0163dcb454e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105908 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-14tdf#136868, tdf#136912, Styles Inspector: Translatable categoriesAron Budea
...and "Direct Formatting" renamed to "Character Direct Formatting" Change-Id: I9fe711bfebfaa90a9797b6e1a47e41a5f307170b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105843 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-14tdf#138135: sw ChangesInMargin: join characters at backspaceLászló Németh
Words deleted by pressing multiple backspaces weren't shown on margin, only their first letter. Change-Id: I2f5d0bb057250d3bfd788e1007f1ad24f8c3c2fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105807 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-12replace RES_GRF_REREAD_AND_INCACHE with sw::GrfRereadAndInCacheHintBjoern Michaelsen
Change-Id: I8b36fd0dde6f4e7f83cf73dc8b6aefb196babb8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105571 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-12Make SwClientNotifyCall protectedBjoern Michaelsen
Change-Id: I1da6cd45c5039f2b36ae6d8a64febc69eda9c6d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105569 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-11convert more long -> tools::LongNoel
found by grepping and changed by hand. Change-Id: I3c720859dba430fde3abc76c6c5cb58269efaf4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105512 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11make tools::Long 64-bit on Windows platformNoel Grandin
This is only for the 64-bit windows platform. I don't see the point in messing with the 32-bit platforms, they are (a) become more and more rare (b) unlikely to even have enough available process memory to load extremely large calc spreadsheets The primary problem we are addressing here is bringing Windows-64bit up to same capability as Linux-64bit when it comes to handling very large spreadsheets, which is caused by things like tools::Rectangle using "long", which means that all the work done to make Libreoffice on 64-bit Linux capable of loading large spreadsheets is useless on Windows, where long is 32-bit. The operator<< for tools::Rectangle needs to be inside the tools namespace because of an interaction with the cppunit printing template stuff that I don't understand. SalPoint changed to use sal_Int32, since it needs to be the same definition as the Windows POINT structure. Change-Id: Iab6f1af88847b6c8d46995e8ceda3f82b6722ff7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-10sw user field type: fix failing string to double conversionkirchhoffb
For converting a string to a double, we need to know the language of the string. We should not assume, that this language is always the system locale, because the system locale can change during a session. Change-Id: Ic851d7430bba7392c7e2c8b36912467eee935f9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96776 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-09tdf#83419 sw change tracking: clean-up autocorrectLászló Németh
fix of commit ac84cf7dda4a5150ff23e112ee16f00b8de8ec7c (tdf#83419 sw change tracking: fix bad autocorrect). Now automatic sentence capitalization and correction of two initial capitals are allowed again, if there is a tracked deletion in the same paragraph before the modified word. Change-Id: I8c583df2f14468b47079019009e7937f559b652b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105477 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-09tdf#138052 Added a check for fontworks.Ivan Stefanenko
Fontworks should be warned about coz they reprezent a stylized text, which is hard to recognize for digital readers. Check is added to checkObject() function as fontwork is an object. Change-Id: I2ed5a5784dfe96bbf05ec7cf4c09dc97e1fb29d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105436 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-07std::set->o3tl::sorted_vector in SwSoftPageBreakListNoel
Change-Id: I929b2eb5824580d106b2505ea6b2d0a59248a6f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104856 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-06make SdrObject Identifiers SdrObjKind enum membersCaolán McNamara
with unique values so that, e.g. if (pObj->GetObjIdentifier() == OBJ_LINE) is only true if pObj is a SdrPathObj and not a E3dScene Change-Id: I30c91e57eb27141390c644dec42e2a4bee96edf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105374 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-06disentangle writer's SID_FM_CONTROL_IDENTIFIER handlingCaolán McNamara
a) make m_nFormSfxId simply follow the slotid, like its sibling m_nDrawSfxId b) move the previously selected form object into a variable of its own as m_eFormObjKind instead of ~abusing m_nFormSfxId to do that c) pass which form object a ConstFormControl creates as an explicit ctor arg instead of providing that information by overwriting the slotid that its ::Activate gets passed making it follow the equivalent calc pattern and separating these very different slot ids and object identifiers In testing, with the form controls toolbar, clicking on a toolbaritem toggles it on, and drawing in writer gives the expected control via ConstFormControl ctor, and clicking the same toolbaritem toggles it off hitting the expected SID_FM_LEAVE_CREATE case. Change-Id: I514f6adc38f706c82f0268abf5c5e73cef5b902c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105405 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-06Adjust tooltip for Outline Content VisibilitySeth Chaiklin
Make tooltips identical for "Ctrl over heading" or "mouse over left margin arrow", because identical functionality and action. typo repair: STR_ClICK_OUTLINE_CONTENT_TOGGLE_VISIBILITY --> STR_CLICK_OUTLINE_CONTENT_TOGGLE_VISIBILITY Change-Id: Ica6508140fe91423f25368aaca6302008756f905 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105224 Tested-by: Jenkins Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk> Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2020-11-05retire most of SwModifyBjoern Michaelsen
only remaining uses are: - in calbck.{c,h}xx - in uwriter unittests - as a parameter of SwClientNotify all other uses have been replaced with sw::BroadcastingModify, which contains sw::BroadcastingMixin functionality. Existing code should then be moved to sw::BroadcastingMixin (only) as soon as possible. Change-Id: Ief7895597633c2fcb97e1cbc182905d75feb1567 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105320 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-05tdf#137968 Added check for the headings orderIvan Stefanenko
Headings' levels order is important for readers and converters. Check firstly finds out if the node is a TextNode, then gets it's OutlineLevel. If it is greater than 0, i.e. the node is a heading, then it checks if node's heading level is greater then previous one's by more than 1. If so, warning is thrown. So the first heading level is always 1 and no heading levels are greater then previous by more than 1. Change-Id: I39d230d747699eddd36610193bde9b23f348e257 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105274 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2020-11-05get rid of long deprecated SwModify::BroadcastModifyBjoern Michaelsen
Change-Id: I9c65de16bf1f1a604c0045444203a16f30f2833e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105318 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-05Ensure no class directly derives from SwModifyBjoern Michaelsen
- make all classes that used to be SwModify to be sw::BroadcastingModify's - this makes sure they are all sw::BroadcastMixin too, so all clients of SwModify can be migrated over to use sw::BroadcastMixin (only) instead Change-Id: Idd217b98f9c20f01e0788bc65af796050dbb5699 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105207 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-04remove SwClient::ModifyNotifcation, now unusedBjoern Michaelsen
... and there was much rejoicing. Change-Id: Ib7ed5a897f2a1e7490462eb47578a8efd22a669e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105233 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-04SwModify: remove the LockClientList madnessBjoern Michaelsen
sw::WriterListener has better debug messages anyway. Change-Id: I24ae3fabe885002d250ad30e596973c26316abcc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105232 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-02move SwCondCollCondChg on top of SfxHintBjoern Michaelsen
... and get rid of ModifyNotifications along the way. Change-Id: I10fc9d24743d50cef771ff63dae004d31dce1846 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105195 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-02SwFormatDrop: remove Modify/ModifyBroadcast/ModifyNotification from this beautyBjoern Michaelsen
Change-Id: I858e0c26849f227f821966d3627114b276b5717d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105185 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-02sw: return SwXFieldmark in SwXFieldEnumerationMichael Stahl
* Implement text::XTextField in SwXFieldmark * That requires overriding XTextContent, just forward to SwXBookmark * Also override XServiceInfo implementation in SwXFieldmark * Add a PropertySetInfo for SwXFieldmark, which doesn't support "Hidden" or "Condition" properties of SwXBookmark * in SwXFieldmark::setFieldType(), only allow sensible new types * fix DomainMapper_Impl assumptions that if it implements XTextField it can't be a fieldmark, which caused CppunitTest_sw_ooxmlexport10 testTdf92157 to fail with a SAXException caused by some disposed SwXTextCursor Change-Id: I1ae2e9cb99ea784040874517e4d1af7e59d24405 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105083 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-11-02SwGrfNode: ModifyNotification no more ...Bjoern Michaelsen
Change-Id: I6c1fda1d92c4e3511113fcd8a8bc09efba96e3e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105180 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-02SwFieldType: ModifyNotification no more ...Bjoern Michaelsen
Change-Id: Idb6c0a6cca5df729037067f6def5594eed2cca19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105178 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-02sw/source/core/undo: ModifyNotification no more ...Bjoern Michaelsen
- also: introduce SwFormat::RemoveAllUnos() as a member function, because that is where this belongs ... - ... and then also use it elsewhere if possible. Change-Id: I9cc073a41ef1077429f648309806fa433bdcec99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105173 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-01Make SwClient::ModifyNotification non-virtualBjoern Michaelsen
Change-Id: Ic34b0b7a3ad906da5f25103f32a28e2a3efd82fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105150 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-01sw/source/core/txtnode: ModifyNotification no more ...Bjoern Michaelsen
Change-Id: I380b6c173d35865188c6d65f356a6e5d1165bd1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105138 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-01use officecfg for Experimental flagNoel Grandin
move IsShowOutlineContentVisibilityButton out of header to avoid having to add extra include paths to all the unit test makefiles. Change-Id: I2763390e07cd85b8f09b6f2ad7702039daecb22f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105100 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-01sw/source/core/doc: Stop abusing observer pattern for code obfuscation.Bjoern Michaelsen
The old SwClient/SwModify combo is a questionable implementation of the observer pattern (among other things). The one thing the observer pattern is good for is dependency inversion: The creator of the message does not need to know the type of the receiver. Calling the message handling on the receiver directly introduces tight coupling and entirely defeats the purpose, leaving us with the worst of both worlds. In such case, at least be honest about the tight coupling and call a somewhat more explicit member function of the target. Thus introduce SwFootNoteInfo::UpdateFormatOrAttr, SwContentNode::UpdateAttr, remove some useless SwFormatChg clutter in Set{Foot,End}NodeInfo, and check for some invariants in SwContentNode::SwClientNotify to limit some of the "a message are two void pointers" madness. Change-Id: I32a8d6973231bb5f65c9e144be72d5bcf98f3f44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105104 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-10-31atrfld: ModifyNotification no more ...Bjoern Michaelsen
Change-Id: I9a5dc35a71725969bc4b75f0444ba663271e3228 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105079 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-10-30Related: tdf#98868 add SwDoc& member to SwTOXTypeCaolán McNamara
Change-Id: Ic1dc600e75cb4f6a7a0aa86714a87e3ec5658cb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104926 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-30convert some tools::Long->sal_Int32Noel
in places where it is obvious we only need a sal_Int32, because we are dealing with rows and columns, and not even calc needs more than 32 bits for that. Change-Id: I114417e639c224d45bfd9fc6838122ab195eefa3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104584 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-29move ClientNotifyAttrChg to calbck.hxx ...Bjoern Michaelsen
... and also use it from SwNode. Change-Id: Icc71eabbc918aa7d61fb0bb4b72c3dd7d91cdbff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104981 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-10-29SwNumFormat: Modify no more ...Bjoern Michaelsen
Change-Id: Icda36d5226a2eca63b9ed56ac9ac5be768a4d117 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104977 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-10-28std::set->o3tl::sorted_vector in swNoel Grandin
Change-Id: Ib647878c129171e5d633a783a262a56f4c1fb7af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104969 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-28sw: add an xml dumper for SwUndoSaveSectionMiklos Vajna
With this, if I have an sw image in a draw+fly format combo and cut these, then all the 3 formats are visible in the undo xml dump. Change-Id: I2abc54ca8d4fb3b00b8da60bcb9dea5e07d20d4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104970 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-10-28convert some more long -> tools::LongNoel
Change-Id: Ide9811c1a7582454b3fcf655b70ea106ed56509a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104914 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-28std::set->o3tl::sorted_vector in MultiSelectionNoel Grandin
Change-Id: I88a77f4b07e5aaccc42e6fb6e5bd0366f57381a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104899 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-28convert some more long -> tools::LongNoel
grepping for stuff in template params this time Change-Id: Ia37bfd85480b3a72c3c465489581d56ad8dde851 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104855 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-27Other part to resolve: tdf#127279 Change Search attributeSeth Chaiklin
Change-Id: I8078f14f25844facf2ec6bb4e0888c5c0f78e3d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104672 Tested-by: Jenkins Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
2020-10-26std::unique_ptr -> std::optionalNoel
Change-Id: Icf8168423af437fda88a6bd26679fecb699606e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104795 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-26Section/SectionFormat: Modify no more ...Bjoern Michaelsen
Change-Id: I4f890013401c0ca1313ec0b9f6c2827019759446 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104778 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-10-26SwTextFormatColl: Modify no more ...Bjoern Michaelsen
Change-Id: Idbacff4f7bdd0f986c55c68f796c00b6f82d61ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104782 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-10-25LineInfo: Modify no more ...Bjoern Michaelsen
Change-Id: I8c2de87bf82a34449838120e23c78647f04088b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104580 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-10-20use tools::Long in swNoel
Change-Id: I44be72b3a9b14823ec37a3c799cffb4fb4d6e1de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-19sw: prefix members of SwFlowFrame, SwXLinkTargetSupplier, ...Miklos Vajna
... SwXOutlineTarget and SwXTextDocument See tdf#94879 for motivation. Change-Id: Ic8f8f5f544dd93e6d9c6764ec53e58c5975598a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104512 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-10-15tdf#34355 sw,offapi,officecfg: show track changes in marginLászló Németh
In ShowTrackedChanges mode, hide tracked deletions in text optionally and show their shortened text in margin next to the vertical "Changed line" mark (showing only the first deletion of the line). Add "Tracked deletions in margin" checkbox to Writer->View page. Add "Display tracked changes" and "Outline View" sections to View, too. Add property ShowChangesInMargin to com::sun::star::text::ViewSettings. Add config setting: org/openoffice/Office/Writer/Content/Display/ShowChangesInMargin Show more information in Manage Changes dialog window about the tracked deletions with restricted visibility in ShowChangesInMargin mode: show shortened text content of a deletion in its (otherwise empty) Comment field. Change-Id: I1d19a4bf8225f536a635c6dd5062344c51e03b79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104350 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>