summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2020-11-03Resolves: rhbz#1893846 if last close had insert, index dialog openCaolán McNamara
when starting a new writer document Change-Id: I83131c01aa53208a321abade48d48a6f7965d0ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105201 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-03tdf#135893 sw paste: fix copying fly frame in textbox twiceMiklos Vajna
Regression from commit c7307c77254557646f33017af915f6808a861e29 (fdo#82191 sw::DocumentLayoutManager: copy textbox content of draw formats, 2014-08-15), the problem is that the fly+draw format copies the fly content recursively already, so when we would copy all special formats of the document, the inner fly frame is copied twice. This is normally not a problem for fly frames (where you can't select multiple fly frames at the same time), nor a problem for draw frames (which have no sw content), but it's a problem for the combination of these, TextBoxes. Fix the problem by ignoring fly frames which are anchored in such TextBoxes: we do the same for fly frames which have an associated draw format already. Change-Id: I3376beb414f91abfa6f3f5640f825ccae34911c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105204 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-03tdf#105967 sw change tracking: fix line break symbol in empty lineLászló Németh
At line break symbol of inserted or deleted empty lines, paint strikeout/underline based on redline color. Keep also the underline and strikeout formattings of the line break symbol in neutral color (NON_PRINTING_CHARACTER_COLOR), if they are not affected by change tracking. Note: in non empty lines, remove also the colored (not NON_PRINTING_CHARACTER_COLOR) underline/strikeout, if it's not based on redlining, fixing the double colored lines on the neutral color line break symbol. Follow-up of db25f1e2e3ae7a078f8f3c080ff3c4802f83b853 (tdf#105967 sw change tracking: fix pilcrow in empty line). Change-Id: I565a10154f5ecbefeb00fe3e17a53f74f2f84e63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105206 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.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-02sw/source/core/layout/atrfrm: Remove remaining uses of ModifyNotificationBjoern Michaelsen
Change-Id: I344ec4b834c52f45c27a88b501c6048853437f36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105197 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-02ndtbl: remove remaining use of ModifyNotificationBjoern Michaelsen
Change-Id: I31ccf872fbfaad9867e7e193491a525df46952e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105198 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-02Field, FieldType: Remove remaining calls to ModifyNotificationBjoern Michaelsen
Change-Id: I8a825711f3b1f1085b4da90d4d09e837161329f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105193 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-02Fix typosAndrea Gelmini
Change-Id: Ifc4b1c24b41a9ca7e7b3adcc46e3498f3af5a0b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105192 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2020-11-02SwLayoutFrame::SetFrameFormat: ModifyNotification no more ...Bjoern Michaelsen
Change-Id: Ice30d7830a32396e0b0b55f3971294f45228be81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105194 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-02tdf#105967 sw change tracking: fix pilcrow in empty lineLászló Németh
At pilcrow symbol of inserted or deleted empty paragraphs, paint strikeout/underline based on redline color. Keep also the underline and strikeout formattings of the pilrow symbol in netural color, if they are not affected by change tracking. Follow-up of commit 37d85df2d2fd53ee436f24484b48aafc91d501b1 (tdf#105967 sw change tracking: fix pilcrow color) and commit 350dbba44ee7703b1da11cc4732a5090ce5efe3d (tdf#105967 sw change tracking: fix pilcrow symbol). Note: clean-up also commit 58f64686cd83a349611daa52188db8bca347b3d4 (tdf#105967 sw change tracking: fix line break symbol). Change-Id: I5f527d17fdf4b9a20bd57d5dfe9366e1271ca772 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105176 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-02create common macro and method for logging unknown attributesNoel
instead of repeating the code everywhere Change-Id: Idb94054b392ed256e64259cdb17d1522bf3c52b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105184 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-02drop the SvXMLExport::EndElement method..Noel
in favour of just using the endFastElement() method Change-Id: Id95abb0b9e78bc44278c5e9e3cc8dee15185e2e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105175 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-02sw: prefix members of SwDistance, SwLayIdle, SwOszControl and ...Miklos Vajna
... SwWebColorConfig See tdf#94879 for motivation. Change-Id: I35991a60faaad568ef7b52120c827699db2a5116 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105168 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-11-02make SvXMLImport capable of mixing fast- and slow- contexts adhocNoel
so I can convert even *ImportContext subclasses in the middle of a context stack, and thus break the cyclic dependency nature of the writer import. and adjust the xmlimport loplugin for the new rules. As a consequence of the loplugin:xmlimport's checking, we remove a bunch of now unnecessary overrides of startFastElement. Change-Id: I97464522ede8ec5e345e928cdafa4b18364b1b80 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-01move UpdateAttr sanity check to DBG_UTILBjoern Michaelsen
Change-Id: I9a6fd1ef8ea704a0ea3f8182d06cbbe938fd1937 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105137 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-01use officecfg for ShowLinkWarningDialogNoel Grandin
Change-Id: I92a42eb2ff48bff4e635f1a37a25c8ecb9ac1347 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105153 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-01sw/source/core/crsr: Stop abusing observer pattern for code obfuscation.Bjoern Michaelsen
Change-Id: I2423b70b2d6a9e90388bb7c83d886181cb268c0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105136 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-11-01std::set->o3tl::sorted_vector in SwpHintsNoel Grandin
Change-Id: I6affafb9733495c07c322abc9ac7456862df1332 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105134 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-01std::set->o3tl::sorted_vector in ExportFramesNoel Grandin
Change-Id: Ic82a1aad7df2b0088a78c8d82ceb487d8b9e0571 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105133 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-01tdf#136814 Fix border padding in Word exportSven Lüppken
While converting twips to points in the Word export filer, information is lost due to integer division. This patch tries to fix this by using floating-point division and (hopefully) proper rounding. The example document attached to the bug ticket works as expected now. Change-Id: I4b5b2163e42932b5e877726d16635d9f02a43cb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105128 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
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-11-01SwFormat: remove last ModifyNotificationBjoern Michaelsen
Change-Id: Iaa2b7710c7848855541bd3ea5fd83122077253bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105105 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-10-31rename to NotifyContainsEmbeddedFontCaolán McNamara
to indicate better what its users do with this notification. This reflects better the reality that while the embedded font has been read at this point, vcl hasn't been informed of its existence yet. Change-Id: I87f4d0a0361192dac972f6146d3721a69e11ac27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105086 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-31Remove remaining ModifyNotifications on TextNodeBjoern Michaelsen
Change-Id: I120dfe756dacf4d97c5708c4c46e4184349226e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105084 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-30Removed executable permission on fileAndrea Gelmini
Change-Id: If7048f7456fc3dd5562ec99763f1a83486d43c01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105030 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-10-30tdf#105967 sw change tracking: fix line break symbolLászló Németh
Paint strikeout/underline based on redline color and settings at the inserted or deleted line breaks. Follow-up of commit 350dbba44ee7703b1da11cc4732a5090ce5efe3d (tdf#105967 sw change tracking: fix pilcrow symbol). Change-Id: I64e267aef5a8bb1818f7e9d1a2fe5febb0df43a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105068 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-30tdf#137855: sw: Add UItestXisco Fauli
Change-Id: Iea71fdff2b900d36ad9475b20ef93f81138f3e9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105016 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-10-30crashtesting: assert on undo creation on export of tdf105134-1.docx to pdfCaolán McNamara
since... commit c9eb53f200225f2ee6ca695e1326843a487aee51 (HEAD, refs/bisect/bad) Date: Wed Oct 14 15:46:23 2020 +0200 tdf#135198 sw editing: text box fell out of its shape I don't think layout should add into the undo stack Change-Id: I92e154dbe2396ff4085fffd7e962e43d2c61c073 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105045 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-30ofz#26753 avoid infinite regressCaolán McNamara
Change-Id: I3f5f14aa63c234ffdf1acd8bb730ce0ff08c7a81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105043 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-30tdf#88126: sw_ooxmlexport15: Add unittestXisco Fauli
Change-Id: If150e6f7c9a0ccd203674c3c00fb40231b3d6a8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105069 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-10-30don't need to include sfx2/sidebar/SidebarToolBox.hxxCaolán McNamara
Change-Id: I712a7f7d32387623e47d32c9d8c0a61bd307209a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105040 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-30tdf#98868 re-register cloned TOXMark if the dest doc is differentCaolán McNamara
if the SwTOXType is from a different document that the target, re-register the TOXMark against a matching SwTOXType from the target document instead Change-Id: Ib9e5a2c437a7510712a10f41c551f0813a8323db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104910 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
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-30SwGrfNode: ModifyNotification no moreBjoern Michaelsen
Change-Id: Iea856fd84d08678d1d7d3041df518f58fcd6b28a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104983 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2020-10-30tdf#137642 VML shape import: fix alignment from top marginSzabolcs Toth
Use the new define PAGE_PRINT_AREA_TOP at import. Everything else is handled in the previous patches. Change-Id: Ie801ab71a33a657551dbc5bfb63d1491aaa73abd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104923 Tested-by: Jenkins Reviewed-by: Balazs Varga <varga.balazs3@nisz.hu>
2020-10-30NB tabbed update writer and calc arrangementandreas kainz
Change-Id: Id9a0306a661dcc0dafd6b75776da775af9dc4565 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105032 Tested-by: Jenkins Reviewed-by: Andreas Kainz <kainz.a@gmail.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-29Fix typosAndrea Gelmini
Change-Id: I0b0231eafdc8ff1ed64fc366735ea5882b3e8618 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105031 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-10-29tdf#105967 sw change tracking: fix pilcrow colorLászló Németh
Paint strikeout/underline based on redline color and settings at the inserted or deleted paragraph break. Follow-up of commit 350dbba44ee7703b1da11cc4732a5090ce5efe3d (tdf#105967 sw change tracking: fix pilcrow symbol). Note: because the pilcrow symbol is painted by the temporary text portion SwTmpEndPortion, see sw/qa/extras/layout/data/tdf42748.fodt for testing. Change-Id: I4c9c6bb7ce445aa30224fabe7162a19df0df08b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105007 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-29StylesPreview in Writer NB arrangement in two rowsandreas kainz
Change-Id: I05e0b903e7d51cb2487f18f5bbeb6228ba7c945f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105008 Tested-by: Jenkins Reviewed-by: Andreas Kainz <kainz.a@gmail.com>
2020-10-29Section: dont call obsolete ModifyNotification directlyBjoern Michaelsen
Change-Id: Iefc502d5bd7cd3650a4abf3e79794d06fadd894e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104982 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>