summaryrefslogtreecommitdiff
path: root/sw/source
AgeCommit message (Collapse)Author
2022-02-05lok: render image preview with lower resolutionSzymon Kłos
renderShapeSelection callback is used to render image previews which are later used during eg. rotation. Do not render preview with original size which slows down app a lot. Use 1280x720 max. Change-Id: Ia8365a67d87cea869ef74cb70ce4830439a523b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129376 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129497 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-02-04tdf#146462 sw: fix broken CrossReference field tab pageMichael Stahl
(regression from 40487d9c81c69c4e5ee1621e53c8162ae33c80b2) Change-Id: Ifb4117a8fa5c393483209b2768f0b6ea4eea2d5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129502 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-02-04tdf#146893 Remove extra buttons from Manage Changes sidebarrafaelhlima
After commit 2e1a38ceb6866248ec30f6fe58cd3adc1b910eec that moved the command buttons in the Manage Changes dialog to the List tab, the Manage Changes sidebar started showing the buttons twice. This patch remove the duplicated buttons from the sidebar. Change-Id: I767e88ba9ca7595913b6ddc57d152febd595f504 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129103 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-02-04use some more add toId/fromIdCaolán McNamara
Change-Id: I3a21e2aa5a2c482c0bac1d4c9bf84f8b56261408 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129492 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-04add toId/fromId to tidy up some ugly castingCaolán McNamara
Change-Id: I70f34ac5e9b5d2f2d6c0375e823908eaa2e540b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129487 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-04Resolves: tdf#146997 use sal_Int64 instead of sal_Int32 for spinbutton valuesCaolán McNamara
for these cases where draw wants to massively scale the units the underlying "metric conversion" are already using sal_Int64 anyway Change-Id: I94e120d72644319548f75b2f68cfe60d4829a2e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129356 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-04Don't cast enum to bool instead of comparing to a defined constantMike Kaganski
Change-Id: I1be04d5c52903bb75105182c3cf46defa266d755 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129431 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-04sw: prefix members of SwClipboardChangeListener, SwPagePreview, ...Miklos Vajna
... SwScannerEventListener and SwView_Impl See tdf#94879 for motivation. Change-Id: I19958bc70e7dd80ea3f1c75e06b9ac192d40f254 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129472 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-02-03cid#1497932 Dereference after null checkCaolán McNamara
pSh->GetOut() is always dereferenced before this check Change-Id: I1909ec7a726049cc154c5a2300fe921dc8cdcbb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129399 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-03tdf#147144: Writer crash after adding rectangle, add link and delete itJulien Nabet
bt: 0 SdrMark::GetMarkedSdrObj() const (this=0x0) at include/svx/svdmark.hxx:68 1 0x00007f958c31555c in SwDrawBaseShell::GetState(SfxItemSet&) (this=0x6bbcd70, rSet= SfxItemSet of pool 0x2dc5730 with parent 0x0 and Which ranges: [(5678, 5678), ... = {...}) at sw/source/uibase/shells/drwbassh.cxx:899 2 0x00007f958c3148bd in SfxStubSwDrawBaseShellGetState(SfxShell*, SfxItemSet&) (pShell=0x6bbcd70, rSet=SfxItemSet of pool 0x2dc5730 with parent 0x0 and Which ranges: [(5678, 5678),...] = {...}) at workdir/SdiTarget/sw/sdi/swslots.hxx:8315 3 0x00007f95a6025de1 in SfxDispatcher::FillState_(SfxSlotServer const&, SfxItemSet&, SfxSlot const*) (this=0x65acbe0, rSvr=..., rState=SfxItemSet of pool 0x2dc5730 with parent 0x0 and Which ranges: [(5678, 5678), (5713, 5713),...] = {...}, pRealSlot=0x7f958d1eb190 <aSwDrawBaseShellSlots_Impl>) at sfx2/source/control/dispatch.cxx:1658 4 0x00007f95a6004fe9 in SfxBindings::Update_Impl(SfxStateCache&) (this=0x65863c0, rCache=...) at sfx2/source/control/bindings.cxx:259 Change-Id: I910429103f505e855d88b7efe9a5ca771d5fc92e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129388 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-02-03related tdf#90805 sw table: ensure border when setting border styleJustin Luth
When using uno:LineStyle to set a table's border style, add all borders if there are none at all. The thickness of this line is set in svx/source/tbxctrls/tbcontrl.cxx to ::Thin (which is different from ::VeryThin set by color and borders). Change-Id: I8af1e6a2447a3bb99f00b9c19708bd2a1208109d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127166 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-02-02tdf#137920 sw: avoid layout loop when inserting at-char anchored large imageMiklos Vajna
Regression from commit d250ca91c79f457102daf4da81446b7f130fb0ee (sw: insert image: set anchor to at-char by default, 2019-11-18), the problem was that the document has 2 pages, the first page would host the anchor of an inserted image and looped while creating/deleting a next page frame when updating the layout on inserting of an image. This problem was less visible before, as the at-para anchor is a different codepath, which was the previous default. The primary problem is that the loop in SwLayAction::Action() assumes that we make progress, so in case m_bAgain is set, then doing the layout again won't re-set m_bAgain, but it happened here. That happens because each iteration calls SwFrame::InsertPage(), followed by a SwPageFrame::DestroyImpl(). Examining the backtrace of the SwPageFrame ctor leads to SwTextFrame::FormatAdjust() which tries to split the text frame only in case it has either a number portion or a text portion, but the check there was incomplete: a "none" number format results in no number portion, leading to this loop. Fix the problem by checking for HasVisibleNumberingOrBullet() before assuming that we can split an empty text frame into two pieces where at least one of them is not empty. Change-Id: I454e1ec275ad6c00202e65b97adb79647d11a0b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129371 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-02-02Related tdf#66039 DOCX import: fix Z-order of group shapesAttila Bakos (NISZ)
A missing function resulted covered textboxes which weren't visible in group shapes. Follow-up to 121cbc250b36290f0f8c7265fea57256dad69553 "tdf#66039 DOCX: import textboxes (with tables, images etc.) in group shapes". Change-Id: I08eb1c1cf4a4f4769af8812500b9cf9778b01e9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128279 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-02-02lok: find active SmViewShell reliablyMike Kaganski
... even after SfxViewShell::Current() had been set to parent document frame's viewshell (e.g., see LOKPostAsyncEvent grabbing focus, which replaces current frame and its associated viewshell). Change-Id: If63087f4c7f3f878ada93d93cc0af6c20a6c0a62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129323 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-02-02tdf#147006 sw_fieldmarkhide: fix crash when deleting fly with fieldmarkMichael Stahl
The problem is similar to commit eef10be20a4c5108c68b19ccdda263c5ca852386, there is a fieldmark in a fly and this results in UpdateFramesForRemoveDeleteRedline() re-creating fly frames that have already been deleted in SwUndoFlyBase::DelFly(), and then the SwFlyAtContentFrame::SwClientNotify() crashes on a null anchor position in the SwFormat::ResetFormatAttr(RES_ANCHOR). This time the passed rPam is empty, after removing the dummy characters of the fieldmark; there isn't really anything to do in this case so just return. Change-Id: I475b8fcb0bcf94be58ff553454c261d75076303b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129308 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-02-02tdf#147008 sw_fieldmarkhide: fix invalid NonTextFieldmark positionsMichael Stahl
Commit ab6176e88f78d0b3aa2490fbc7858304c2d4a437 introduced a crash in ModelToViewHelper when the positions of a NonTextFieldmark are invalid. The NonTextFieldmark must always contain 1 CH_TXT_ATR_FORMELEMENT but after SplitNode() the position is (rr) p *pFieldMark->m_pPos1 $2 = SwPosition (node 10, offset 1) (rr) p *pFieldMark->m_pPos2 $3 = SwPosition (node 9, offset 0) This is because in ContentIdxStoreImpl::SaveBkmks() there is an asymmetry where the m_pPos2 is recorded to be wrongly corrected to node 9, but if the positions were swapped so that m_pPos1 is the start position, then it will not be recorded and remain in node 10. So fix this by changing the NonTextFieldmark to insert its CH_TXT_ATR_FORMELEMENT differently. There is some very subtle code in SwTextNode::Update() that is again asymmetric and (non-obviously) prefers to move m_pPos2 and leave m_pPos1 alone (by moving it to aTmpIdxReg) in case the positions are equal. But then the fieldmark code increments "rEnd" (which is really the m_pPos1 i.e. the start after InsertString() returns), and then decrements m_pPos2. So avoid the problem by removing these 2 pointless adjustments. Then it turns a bunch of tests fail because other code assumes that m_pPos1 is the end of the NonTextFieldmark, so fix MarkManager::changeFormFieldmarkType(), ModelToViewHelper and SwHistoryNoTextFieldmark to use GetMarkStart(). Change-Id: I7c82f9a67661121662c95727e0f8f15e06d85a3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129289 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-02-02sw: fix swapped inner vs outer border for Word-style right/bottom page bordersMiklos Vajna
This is similar to commit cf2690ae76b4250af32be7c8980b8d83b3611591 (sw: fix swapped inner vs outer border for Word-style bottom table borders, 2022-01-13), but that was for outer table borders, this one is for page borders. The explicit mirroring is needed because Writer will automatically mirror, but Word mirrors in its document model, so we need to "mirror back" to get the matching rendering. Change-Id: I38fbf8adbc87ecd217a11b177840b0fede4cdf8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129281 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-02-02tdf#107727 disable border in RTF export if not drawnRegina Henschel
A border of a text frame is not drawn, if it is really disabled or if its line style is None. The patch considers both cases. Previously the first case was missing. LO can disable single border lines and single border lines can have different styles. The patch uses a border line now, that is really drawn, to get the color and width. It uses the first one in order top, bottom, left, right. In theory RTF can describe disabling single border lines by using the flags fTopLine, fBottomLine, fLeftLine or fRightLine. But Word has only the ability to enable all or none of the border lines for an old kind text box as contained in an rtf-document. The current patch uses therefore this all-or-none approach too. It enables border if at least one is actually drawn, because that keeps the style settings for that border line. Previously all four border lines need to be drawn. If it is changed to use the flags fTopLine, fBottomLine, fLeftLine and fRightLine on export, then it would be possible to recover showing only single border lines on reimport. But that is out of scope here. Change-Id: Ib78604def154c133d3c93bc75a38731eb6b02294 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129305 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-02-02convert OfaRefItem to a normal classNoel Grandin
only instantiated with one type, so just turn it into a normal class Change-Id: If3ae908f3e226ae9f4d3b81a7a7d9ba492ccda4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129283 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-02SwNavigator: set bookmark member countJim Raykowski
Missed in commit 3771a81060f9e1f60ada37c3b7fa0a51b3042952 Change-Id: Idce750efc266415ec092cef4e781ba5fbb7048bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129269 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-02-01sw: add note to DateFieldmarkMichael Stahl
Change-Id: I50cc5fcc46e200116745cdfa1c3588436ac0aa46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129288 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-02-01sw: document SwXBookmarkMiklos Vajna
I.e. this is used not only for bookmarks, but also for fieldmarks. Change-Id: I01e7c0fdfcd8e2fc93217dd5bc7b2ba00709ecd6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129236 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-02-01tdf#146964 sw layout: fix reappearing deletion in Hide ChangesLászló Németh
mode at moving text. Test: in Hide Changes mode, move the selected text by cutting and pasting it with change tracking. Before the fix, hidden deletion reappeared again (only clicking on Show Changes and Hide Changes again fixed the layout). Regression from commit f51fa7534421a195a58b4a737a2e836d8c25ba81 "tdf#145718 sw, DOCX import: complete tracked text moving" Change-Id: Ia86f570bd634dd513fdbb93a83a929fd0ba4e273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129223 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-02-01tdf#144851 Honor Selection When Applying Title Case FormatMichael Warner
Prevents Title Case formmating from occuring outside of a user's selection. This is relevant if the user has started or ended a selection in the middle of a word. Change-Id: I39d8f2445acf5d9bb225bf8e3b36e2eb3b518857 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124102 Tested-by: Jenkins Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-01-31sw: prefix members of SwPagePreview, SwScrollbar, ...Miklos Vajna
... sw::sidebar::PageStylesPanel and sw::sidebar::WrapPropertyPanel See tdf#94879 for motivation. Change-Id: I8eb8be59b9fad087fadb2735c46133aca4810415 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129199 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-01-31tdf#106899 - Remove header definition of buffer sizeAndreas Heinisch
Change-Id: Ia7e3cc32c067afa0f376e52e0eb5cdc83ca2e4b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129082 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2022-01-31Resolves tdf#146261 - Remember size of bookmark dialogHeiko Tietze
Change-Id: I0c6f20692af88c603106d76c45c722cdb7deb118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126993 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-31gtk4: use ToggleButtons if we want to show an imageCaolán McNamara
SAL_USE_VCLPLUGIN=gtk4 make screenshot now finally passes, so that's the end of this phase Change-Id: Iddb1e7d13a3218497419ae434b8bc4e2e80e74fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129185 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-30tdf#108910, tdf#125496 - read/write index entries using utf8Andreas Heinisch
Always write an index concordance file using the utf8 encoding and read the index entries using the appropriate character set which is either utf8 or the os thread encoding. Change-Id: I5b30f4749f635bd51d8f0933ce5029d5303aef3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128745 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2022-01-30ofz#44207 Integer-overflowCaolán McNamara
Change-Id: Ia3cace5df71ec9dbf17d06f3c21b65a87025bfd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129172 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-29SwNavigator: fix HasContentChanged always returns trueJim Raykowski
when there are outline nodes in the frames, headers, footer section of the document model When outline nodes are in the frames, headers, footers section of the document model the outline content array, used to fill Writer Navigator content tree outline content type members and determine outline content change, will likely differ in order to that of the document model outline nodes array. Outline nodes in frames, headers, and footers section of the document model are placed at the beginning of the document model outline nodes array. Writer outline content array members are placed in document appearance order. This patch is done to correct comparison of old outline content array members to current outline content array members to determine outline level change. Change-Id: I5047aa0491a9d0f170fe61f381bf0982f97ff906 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129063 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-01-29tdf#147041 Always show navigated heading at top of visible view areaJim Raykowski
Revert to pre commit 1df2581cfffc87386c6de7614793b2d664244e5a behavior Change-Id: I06fe630bf0c0e611351e0e9a56361a3028f207d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129129 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-01-29used TypedWhichId in the constructor of various svx *Item classesNoel Grandin
to act as an extra check that we have the association of Item and TypedWhichId annotations correct. (*) requires that I add an upcasting constructor to TypedWhichId (*) Make the field dialog stuff in writer use a new item id FN_FIELD_DIALOG_DOC_PROPS instead of abusing the existing SID_DOCINFO Change-Id: Ica4aea930c80124609a063768c9af5a189df1c27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129098 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-29no need to call GetWhich on these SID_ valuesNoel Grandin
none of them are remapped (via the SfxItemfo stuff in the pool) Change-Id: Iefd38f1aac55e6059e2c57d102efb508bd1572b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-29Fix typosAndrea Gelmini
Change-Id: Id74af6775a04fee013df6a02b0261155908dc22f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129122 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-01-29SwNavigator: check if unselect_all is neededJim Raykowski
Change-Id: I2a3914482167700bebf5ff8e67c34f7e31a0be9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129089 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-01-28v2 tdf#134951 docxexport GUI: don't lose postponed commentJustin Luth
A previous patch handled ooxmlexport's unit test failure. But saving interactively writes the nodes in a different order, and thus the flys process differently. The comment was still lost/moving into the textbox when manually testing. So, just make sure that comments are written out before a call to OutFlys(). There is one other place where OutFlys is called that I didn't cover here. As a !bTextAtr, it doesn't seem likely to need it, plus I don't want to modify ANYTHING here without a proof document. Change-Id: Iaf3d19bd8d8f6744b9fea1c8686e59612c0a7ff8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128732 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2022-01-28no need to call GetWhich on these SID_ valuesNoel Grandin
none of them are remapped (via the SfxItemEntryInfo stuff in the pool) Change-Id: Ic4f1b13e1f35f7e67195a12c727ea2f088f8ddc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129060 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-28sw: remove unused include in rtfexportMiklos Vajna
It was the only '#if OSL_DEBUG_LEVEL > 1' in this file, so the include is definitely not used. Change-Id: I51e5a8ee04999f803fa7af92a4fd3a250b5c9c22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129064 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-01-28related tdf#111733 TextCharacterSpacingControl sw draw: goto position tabJustin Luth
The kerning button on the sidebar very unhelpfully did nothing at all in draw text (like textboxes). It should have brought the user directly to the "position" tab where the kerning property can be found. Change-Id: I89d4a180ac19e1e096b9157f3f32a254ff138940 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129045 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2022-01-28related tdf#11173 TextCharacterSpacingControl sw annot: goto position tabJustin Luth
The kerning button on the sidebar very unhelpfully did nothing at all in draw text (like textboxes). It should have brought the user directly to the "position" tab where the kerning property can be found. Change-Id: I83687c732cc45bb28a835e878d0c91f10fb713ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129046 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2022-01-27SwNavigator: move content type init into SwContentType constructorJim Raykowski
With commit 7270ed7b81c12c8ba2e57b1a0d2ae084f8489d61 the Init function is no longer needed to help determine if content has changed. It's other duty of setting wheather content type can be edited or deleted or both, and if it has attachment for URL are moved to the constructor. Change-Id: Ie6cf2273baca8e84e2b0d4757794e91f0a1af2dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126799 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2022-01-27no need to call GetWhich on these SID_ valuesNoel Grandin
none of them are remapped (via the SfxItemEntryInfo stuff in the pool) Change-Id: Ic7b5f2c3cc75a65bdf9c45f9522cc53954b4ba38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129040 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-27sw uno:Color: directly goto CHAR_DLG fonteffects tabJustin Luth
.uno:Color started the character properties dialog, but opened whatever tab was last opened, and not the font-effects tab where color settings are found. This is related to tdf#111733. In terms of draw text (like textboxes) and comments it did nothing at all, so I fixed that too. I found this looking for other possible uses for CHAR_DLG_POSITION or CHAR_DLG_EFFECTS. I didn't find any pre-defined menu where this could be seen, but a customized menu adding the right "Font Color" (uno:Color) demonstrates the difference. There might be more EFFECTS, but this was the only one I found. Change-Id: If80f14e00d1a2ebae850a885df06fc556f77903a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129044 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2022-01-27v2 tdf#134951 docxexport: don't lose postponed commentJustin Luth
This patch basically reverts and re-writes the original fix. Prior to mstahl's 7.4 commit f261fae4af72b1328bc3e93fc52a9a24ce0975b3 tdf#143039 tdf#143106 sw: DOCX export: don't export duplicate flys ooxmlexport5's comment would only last for one or two round-trips, and then be lost after that. It kept moving around into things like the fly itself, or the footnote. With mstahl's commit, it was lost immediately (same as Word 2016), and so the ooxmlexport5 unit test that broke was commented out. Change-Id: Ia7e881143f1243a3ab81bb94c02b57189f3730f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128703 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Justin Luth <jluth@mail.com>
2022-01-27related tdf#111733 TextCharacterSpacingControl sw: goto position tabJustin Luth
The kerning button on the sidebar very unhelpfully launches the character properties dialog at the last-used tab, instead of bringing the user directly to the "position" tab where the kerning (.uno:Spacing) property can be found. Notes: -sw draw text (eg. textbox) does nothing - no dialog at all -sw comments also do nothing -sc does nothing -sd does nothing Somehow the sidebar is calling SID_ATTR_CHAR_KERNING, but I can't find out where. In any case, I have to change this SID_ATTR_CHAR_KERNING into SID_CHAR_DLG_POSITION for these "do nothing" situations. That can happen in separate commits for each situation. I basically copied SID_CHAR_DLG_EFFECTS which is explicitly called in underline's "more options", so it is used a bit differently. Change-Id: I833d54da3664b9c01325130a2c36bbbe90b2b878 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129043 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2022-01-27let SfxDispatcher::fillPopupMenu operate on css::awt::XPopupMenuCaolán McNamara
rather than need to be passed its internal PopupMenu Change-Id: Iff1106b80b71602cf8b77361086517f0e8f11c6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129052 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-27add some more TypeWhichId annotationsNoel Grandin
and update the idl compiler to cope with namespaced class names Change-Id: I7b5242f872e358bc3c5584f543767719172aac83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129026 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-27fix ubsan downcast of SfxInt16ItemNoel Grandin
source seems to be commit 0c8b1efbad48fa9697c0b1afbe4753bbbc3c4c5c Date: Fri Oct 25 15:02:26 2019 +0200 tdf#127759 Writer: add table row/column insert mode /sw/source/uibase/shells/tabsh.cxx:872:26: runtime error: downcast of address 0x60300137c2f0 which does not point to an object of type 'const SfxInt16Item' 0x60300137c2f0: note: object is of type 'SfxUInt16Item' 83 25 00 34 d0 ad 9b bc d1 2a 00 00 01 00 00 00 1f 50 00 be 03 00 be be be be be be 00 00 00 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'SfxUInt16Item' /sw/source/uibase/shells/tabsh.cxx:872:26 SfxRequest&) /workdir/SdiTarget/sw/sdi/swslots.hxx:12197:1 const&, SfxRequest&, bool) /sfx2/source/control/dispatch.cxx:254:9 const&, SfxRequest&, SfxCallMode) /sfx2/source/control/dispatch.cxx:753:9 Change-Id: Ib5ac07778cf80c6826917d33912594e0b9027fbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129021 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-27sw: remove confusing 'using namespace objectpositioning' statementsMiklos Vajna
The using namespace declaration implicitly put the SwAnchoredObjectPosition definition into that namespace, but this is far from obvious when reading the code. Just put the definitions into the namespace, the way other code in sw/ does this. Change-Id: I580c6bc5bb46a76364ddeeca021dd7b0e4369e42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129007 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>