summaryrefslogtreecommitdiff
path: root/sd
AgeCommit message (Collapse)Author
2022-02-01tdf#147032 unselect anything set_cursor selected as its side-effectCaolán McNamara
Change-Id: I723bbd82fc01f644de3bfb2a80b4640cec0cfbca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129250 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-01-21tdf#141340 PDF export: fix hyperlinks on the wrong page with page num rangeMiklos Vajna
Regression from commit 01dbb38680aa39a4d3bc7afd05d44a4b2c9bc6ab (tdf#61274 sd PDF export: fix links ending up on wrong pages with hidden slides, 2020-03-10), the problem was that the sd/ code that mapped page numbers between the model and the PDF output only handled hidden slides, but not partial exports. Fix this by revisiting the decision to handle hidden slides in sd/, the filter/ code at the end does have enough information to correctly do this mapping at the end, and this way both tdf#61274 and tdf#141340 can work at the same time. (cherry picked from commit 31bbaf478783e3a2c21bd3ea94ddf39299a63d1e) Change-Id: I5679743ca67fab562e14c73e32f1a06ead8e7a31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128647 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 3d60ad8c67e347f56400e3be05a3f1641f77c719) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128545
2021-12-11Resolves: tdf#145974 reduce the papersize by scrollbar thicknessCaolán McNamara
if scrollbar required and scrollbar isn't an overlay one Change-Id: I839fd8c214febadb80f692b53dc156e251f506ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126603 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-12-09tdf#145162 PPTX export: fix extra bullet regressionAttila Bakos (NISZ)
Placeholders have bullet by default in MSO, so write <a:buNone/> for paragraphs where numbering/bullet is disabled to avoid extra bullets in Impress. Regression from commit b6b02e0b4c9d739836e1f61a886ea45b01e6696e (tdf#111903 tdf#137152 PPTX export: fix placeholders). Change-Id: Ib4c563cba475d61bc475ca05623e7c7b20fded30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126528 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit f57cfddb51b7d7409b7b425dc200aa73406a13bd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126525 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-12-03tdf#140912 Better handling of the picture placeholders.gulsahkose
To see icon and placeholder text at the center of picture placeholder shape, we set the TextContourFrame and GraphicCrop properties. Change-Id: I49e3d08c9020e593232c60c97af3f45fb620075e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126165 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 7b3be7f6f3d800e2ad86f5a043e6e9b21ed4409f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126138
2021-12-02tdf#145819 Revert logic of the image-with-rotation dialog: sc & sdGabor Kelemen
Change-Id: I906e83ada98fd7a583872a2eaa76d7fd04a5401b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126110 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 970cbb120a62e952e80348b8e94478600241273a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126144
2021-11-25tdf#130131 UI: add back "Split" to draw/impress popupJustin Luth
This is a partial revert of LO 6.2 commit cf8b3a74e8c093dd0ffc7e2f431a26864958f6fb I have no idea why uno:Dismantle would have been removed in this commit, since it wasn't added back anywhere else, and seems to be unrelated to anything else in that patch. Change-Id: I1fbed2b3a58aee733c41c7a4817b215e4bec6061 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125681 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> (cherry picked from commit b7a46259eba35257291fe00851252c18ffb4fc90) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125713 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-17tdf#135033: Make undo of adding and editing animations possibleKatarina Behrens
weird this somehow sneaked out when converting custom animation pane to sidebar when undoing other operations (delete etc.) stayed in place Change-Id: I6287682839d0e0401cc60bf82257d86765f3a858 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125110 Tested-by: Jenkins Reviewed-by: Katarina Behrens <bubli@bubli.org> (cherry picked from commit 71a186aedc6060bb4fb834c847f74c657d700f1e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125357 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-11-03Resolves: tdf#136945 fix custom slide show dnd to reorder pagesCaolán McNamara
Change-Id: Ib28d6779e772fd8ad30899354cde2c281085b328 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124479 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-09-22tdf#127900 sd: fix regression at applying master propertiesAttila Bakos (NISZ)
Language settings of frames in slide master weren't applied on the slides based on that master. Regression since LO 6.3 by "tdf#126067 Fix slide scope feature." (commit 40bb9ac690d979ef544d5aa759bd734a176912a0). Co-developed-by: Dániel Arató (NISZ) Change-Id: I559adbe00870ed8a3d2947fef8dae435a387e34a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120993 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122397 Tested-by: Jenkins
2021-08-31tdf#142645 PPTX import: convert "ctrTitle" text to slide nameTibor Nagy
(i.e. centered title) similar to <p:ph type="title"/>. See commit 7eb0e52527e729a21973e70d5be8e0a6779ec748 "tdf#142648 PPTX: import long slide names to avoid broken link export", commit 253bee65bc24d999c3629a4d503d0fa01b355cfc "tdf#142646 PPTX import: count repeating slide names" etc. Change-Id: I5f25f04f23981ce2ff64dc792fe8464682d749a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121295 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit e5cfda76aefd6996813f461198816be24cd6ad43) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121289 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-08-20tdf#143624 PPTX: slideshow setting “Manual forwarding” not exportedTibor Nagy
Follow-up to commit f8ddaaf0f5e1fb61e0d4404ea28757bc652ae4be (tdf#142915 PPTX import: support for presentation's timing attribute). Change-Id: I1b175d406d2cd0fc40ba7085517709fb477fed58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120529 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120751 Tested-by: Jenkins
2021-08-20tdf#142648 PPTX: import long slide names to avoid broken link exportTibor Nagy
PPTX import renames the slides using their short title text. Apply this for the titles with 64 or more characters, too, abbreviating the title text instead of using the default slide name "page1", "page2" etc., because the default slide names result broken hyperlinks during the PPTX export. To test the fix manually, create a new hyperlink using text selection and Insert Hyperlink (Ctrl-K), clicking on Target in Document button on the Document pane, and selecting a slide name. Note: the problem still exists for the duplicated or newly inserted slides, which get default slide names. Change-Id: Iec1fab5a2ee862353766ed7e13b1501b3a325d0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118548 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120750 Tested-by: Jenkins
2021-08-19tdf#143353 defer tip of the day until impress template dialog is goneCaolán McNamara
wait until that dialog is dismissed before showing the tip dialog Change-Id: Id0e7e28f09c5a9727e10eda55e468adb56bfda70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120677 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-08-13Resolves: tdf#143795 trigger layout when content changesCaolán McNamara
Change-Id: I9ec19b55f2b46ac8dd1415f45d5e0368fa52fbfd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120366 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-12tdf#143129 PPTX: custom slide show use as default is not exported.Tibor Nagy
Follow-up to commit 11ef976624dce8a8e50a1eb20e9c586519fd7ec8 "tdf#142590 PPTX import: fix custom slide show use as default" Change-Id: Ie8a53a79bd531cfe2c3b3559b70d28770ca8b960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119564 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 569cb54f1d82e993dcf1fd11d92d4cbd4f224a2d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120364 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-08-11tdf#136610 Add Clone/Clear Direct Format buttons to LO Draw tabbed interfaceRafael Lima
Currently LO Draw only shows the "Clone" and "Clear Direct Format" buttons in the tabbed interface when a text object is selected (in the Text tab). With this patch, LO Draw will now show these buttons in the "Draw" tab when shapes are selected, as well as in the Home tab (as it is shown in Impress). Change-Id: I9acf577cc5322d43c18acc366788a5eadda67ff6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119183 Tested-by: Jenkins Tested-by: Andreas Kainz <kainz.a@gmail.com> Reviewed-by: Andreas Kainz <kainz.a@gmail.com> (cherry picked from commit 73fc697d5aac06938cc78f51b4e0d6f3d615447c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120249
2021-08-10tdf#142845 editeng: don't update selection when formatting before sd pasteMiklos Vajna
Regression from commit f0c25c751cf8e166a84b289746bce6202a40391d (tdf#115783 sd: fix lost char attributes during in-table copy&paste, 2018-02-16), the problem was that the formatting before paste also created an undo action, and executing it alters the selection, which was not intended. So in case the textbox contains "world" and we paste "hello", then the undo will set the cursor at the end of "world", while the expected result is to just undo the paste and the formatting of "world". Fix the problem by not altering the selection in the undo of Outliner::SetCharAttribs(), which is only called by sd/ in the before-paste case, not anywhere else. (cherry picked from commit fc4c0747e97bb997cc37263b3e86b07dab21fe25) Change-Id: Ie4a08f57d22cd1862c02987a5f86089fda8a5d9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120254 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-08-10tdf#143126 PPTX: slideshow setting “Start from” not exportedTibor Nagy
Follow-up to commit 3d55149dcf19cffefcc19c16a3abbe8851453c5e (tdf#142913 PPTX: slideshow setting “Start from” not imported). Change-Id: I4124e528f8af61c3b87978c2f3d2b96d983ec056 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118648 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit d2c2985024ee085796a21ef9c3226dde10311c80) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120238 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-08-09tdf#142915 PPTX import: support for presentation's timing attributeTibor Nagy
See Slide Show->Slide Show Settings...->Change slides manually, which is disabled by default. Now <p:showPr useTimings="false"> is imported correctly, i.e. with enabled "Change slides manually". Note: it seems, com::sun::star::presentation::IsAutomatic UNO attribute has got a bad name and documentation: if it's value is TRUE, "Change slides manually" is enabled, and vice versa. Check with the following Basic code: ' show presentation-level automatic transition (IsAutomatic = False) print ThisComponent.getPresentation().IsAutomatic ' show slide-level automatic transition (Change = 1) Dim oDrawPages as Object, oDrawPage as Object oDrawPages = ThisComponent.getDrawPages() oDrawPage = oDrawPages.getByIndex(0) print oDrawPage.Change Change-Id: Ie4a687a29077cad89f11e77b856c28a1fe09376b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119321 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit f8ddaaf0f5e1fb61e0d4404ea28757bc652ae4be) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120237 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-08-09tdf#142817: Correctly replace animation effect that comes with a commandKatarina Behrens
As effect1 with command (e.g. the one from misc/MEDIACALL category) is created, 'mnCommand' member var is set. But when it is replaced by command-less effect2 via CustomAnnimationEffect::replaceNode, this var is never reset (simply because the relevant if-else branch is never hit) so it looks as if the command was still there. This causes UI glitch in sidebar: setting incorrect category of the next selected effect To fix that, we reset 'mnCommand' in ::setNode function, just as it is done with resetting audio associated w/ the effect Change-Id: I86016dd1acadfb31f460bde749bbe15164f1eb81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119492 Tested-by: Jenkins Reviewed-by: Katarina Behrens <bubli@bubli.org> (cherry picked from commit 6146b185ab2a335de39d0562a8d34e53d3e742e0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120236 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-08-09tdf#143572 Restore enable undo setting immediatly after object nameJim Raykowski
is set each time here This prevents a crash when an object is in text edit mode and a different object is selected in the navigator to jump to. Change-Id: I7c0eaa7770f0e3f23e6a62780f18e0a973019c62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120170 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com> (cherry picked from commit 18004b707d2cb92ab88923138d72c5ca1b03301c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120141 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-08-09tdf#138960 Check if tree entry has children before attempting to expandJim Raykowski
or collapse Change-Id: Icbfc50dda35bb6027c12a42b5e8f79da165888e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120129 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com> (cherry picked from commit 12dd1ce1dddc4ebad6be94ddec167cc7f6c45fe3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120142 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-08-08Resolves: tdf#137637 keep user selection during initializationCaolán McNamara
Change-Id: Ibef83d132ce951393a996aae94b8cdee51da1a64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119865 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-07-21sdremote: avoid infinite loop if client disconnects during handshakeAndrzej Hunt
The following loop can turn into an infinite loop if the client disconnects at the wrong point in time, because pSocket->readLine() returns 0 (indicating disconnection), aLine remains empty (no data was read), and we just keep looping because we never bothered to check the return value: do { pSocket->readLine( aLine ); } while ( aLine.getLength() > 0 ); Aside from spinning unnecessarily, this infinite loop also stops the server from being able to accept any new incoming connections - in effect this causes a DOS of the server. Hence we need to start checking readLine's return value, and break out of this loop - and in fact break of the surrounding outer loop too (because we discard this connection and want to wait for another connection to arrive). Because of the nested looping it's hard to come up with a clean solution that only involves changing this loop - we'd probably need to introduce a temporary to remember that the client has disconnected, and check that temporary after the do...while - letting us 'continue' the outer loop. Therefore we first extract the code that handles newly accepted clients into a separate method, which then lets us simplify the implementation by returning at those points that we know a client has disappeared. That unfortunately makes this bug-fix patch a little more noisy than expected, but it is a refactoring that we'd want to make anyway. (There are further improvement we can make here, but I'll put those in a separate commit to simplify cherry-picking of just this fix. Examples include moving to smart pointers instead of new/delete, introducing an early return instead of the really long if statement, etc.) Change-Id: I13c6efa622a1b1de10b72757ea07e5f4660749fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119083 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit fcc4d8e01360baa9ba0bf20eb5e7a1c9af793a02) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119184
2021-07-20sdremote: fix race condition in Transmitter shutdown to plug leakAndrzej Hunt
We need to acquire the mutex in notifyFinished() to avoid a race between notifyFinished() and the loop in run(). And we also need to check mFinishRequested) while holding the mutex to avoid the same race condition. While we're here, rename the mutex to make it more obvious that it's not only protecting the queues. The race can happen because the loop in run() blocks until mQueuesNotEmpty is set. It also resets mQueuesNotEmpty at the end of each iteration if the queues are empty. So if someone sets mQueuesNotEmpty in the middle of an iteration, and the loop later resets it, the loop won't continue iterating. But we're actually using mQueuesNotEmpty to indicate either that the queues have data OR that we might want to finish transmission. And the problem is that notifyFinished() sets mFinishRequested, followed by setting mQueuesNotEmpty in an attempt to get the loop to process mFinishRequested (at which point the loop should finish and return). But as described above, we can easily get into a situation where the loop resets mQueuesNotEmpty again (at least if there's no more pending data in the queues). In this scenario, the loop blocks forever (we won't receive any new messages after notifyFinished()), causing a leak of both Transmitter and any resources it's using - e.g. the StreamSocket. The easiest way to fix this is to make it clear that the mutex protects all internal state, followed by using it to protect all internal state. This issue is not a big deal in normal usage - it's a tiny leak, and users won't connect enough clients for accumulated leaks to pose any issues. But it's ugly, and potentially problematic for long-running tests which could run out of filedescriptors because of the socket leak. I will rename mQueuesNotEmpty to something more obvious (possibly mProcessingRequired) in a separate commit. Change-Id: I2e22087054f3f6a02e05c568b1832ccc5a8b47a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118751 Reviewed-by: Andrzej Hunt <andrzej@ahunt.org> Tested-by: Jenkins (cherry picked from commit 8e6cdb02450a876b5c684eb621e1c9383fb1c428) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118917 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-07-19tdf#143125 sd: fix crash when closing Custom Slide Shows dialogTibor Nagy
regression from commit I6e97a69c546870199d5a45d9a6ad102e30d820c2 Change-Id: I760dabeb024413f1a2aeb57434f63adedb4246f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118231 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit d7dff57384126e50b75c95e84fd3081db2f326a1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119172 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-07-19tdf#92796 ODF import: remove unused bitmap fillsMichael Stahl
With CWS impress64 a partial fix for this was implemented to drop unreferenced named items including all non-color fills after ODF import, but this is only done in sd so move the code that does that to svx and call it from sc and sw as well. Implement some UNO interface for this, it's at least better than a magic string, and not obvious how a better solution would look like since it's known only at the end of the import if a bitmap is used or not. Another problem: when the Area tab is used to change to a different kind of fill, the items with the details for the previous fill aren't cleared, and so they are written to ODF files. Hence bitmaps in the file can be referenced even if they aren't actually used, and bloat up the files. Fix this by dropping all unused draw:fill-image-name attributes in ODF import. Also do the same for Gradient and Hatch fills; Transparency gradients can be combined with anything so leave them as they are. Change-Id: I0b591fd9f963d974d0c3e7208b99621ad61dd93c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118950 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 86c0f58b6f9f392865196606173d1b98a6897f32) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119036 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-07-15tdf#143315: restore the stylesheet after clearing outliner objectMike Kaganski
Prior to commit c4f615b359be56e88e4fbf9aaaf30affb29d57e2, pObj passed to SvxMSDffManager::ReadObjText was not initializing its properties (no call to AttributeProperties::GetObjectItemSet() happened) until call to CreateParaObject in the end of the function. Then it finally initialized, and called applyDefaultStyleSheetFromSdrModel, which applied the obtained stylesheet to the nodes of the outliner object, and resulted in OutlinerParaObject having correct style name in its ContentInfo structures, which then went into pObj. The mentioned commit added calls to SdrTextObj::GetTextColumns* in SdrOutliner::SetTextObj, called by SdrTextObj::ImpGetDrawOutliner indirectly. These calls initialize the object properties, and the stylesheet gets applied to the SdrOutliner and its empty node early. Then the call to Outliner::Init and Outliner::Clear resulted in the node being destroyed and re-created without stylesheet info. Then in AttributeProperties::GetObjectItemSet called from CreateParaObject, re-initialization does not happen, because the item set exists. When exporting to OOXML, the missing stylesheet required to use pool default value, which led to bullet being exported. The previous behavior relied on fragile and unspecified assumption. Instead, now we call SetStyleSheet after all operations, to make sure that the stylesheet information is present in the final data. Change-Id: I14de9017e4af92a2eaf12b3a0e090b0db7fcc759 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118961 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118964 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-07-13tdf#119312 Crash in: sdext::presenter::PresenterSlideShowView::LateInit()Hochwasser
Change-Id: I8c2eda406d8266996eaf023072cc7f4f38edc4a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102902 Tested-by: Jenkins Tested-by: Andrzej Hunt <andrzej@ahunt.org> Reviewed-by: Andrzej Hunt <andrzej@ahunt.org> (cherry picked from commit dabb1dc347071abb7d6a708930f5fbdb8c68c72a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118719 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-07-12tdf#143291 the "none" item selected is distinct from nothing selectedCaolán McNamara
Change-Id: I2e012df85a5c28f462a6c643d7a9a88f8775e870 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118729 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-07-12editengine-columns: tdf#143258 Fix handling rotated textMike Kaganski
This reverts modifications to existing unit tests made in commit d0a1616ccad0dd5f5a02c1b0204f537b57d0b4b5. My idea that those changes were required because of more correct calculations was wrong, and in fact they were caused by off-by-1 error in height calculations. Change-Id: Ib94878a911238c977c35a8f8e3e5694cedc79a89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118705 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118711 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-07-09Resolves: tdf#143153 null-deref on grouping fit-to-frame obj with anotherCaolán McNamara
Change-Id: I134d15ac980aa34ff274abd03966cd7948390542 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118627 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-07-08tdf#142235 PPTX export: fix styles with placeholdersAttila Bakos (NISZ)
inserting icons and alignment. Regression from commit b6b02e0b4c9d739836e1f61a886ea45b01e6696e (tdf#111903 tdf#137152 PPTX export: fix placeholders). Note: in the unit test document, check fixed vertical position of the second text boxes of Slide 2–4. Change-Id: I3c649db69f94a2e9f49ae7aa11d9cd9d9f6d80d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116828 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118446 Tested-by: Jenkins
2021-06-30editengine-columns: add sidebar property panelMike Kaganski
Change-Id: I90aefc10f9ddddeb64a65799480777bc4287abae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117107 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit dd5bf12193471f064bf7f581dd1b21783390e735) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117217
2021-06-29tdf#142589 Impress UI: fix Start button of Custom Slide ShowsTibor Nagy
This button started the selected custom slide show only by changing the (already) selected custom slide show, and enabling the checkbox "Use custom slide show". Otherwise it started always the full show. Remove the redundant checkbox "Use custom slide show" of the dialog window "Custom Slide Shows" (Slide Show->Custom Slide Show...) to avoid inconsistent behavior of the Start button (which could start the full show instead of the selected custom slide show). Now Start button of the dialog starts the selected custom slide show only once, i.e. it doesn't modify the global slide show settings for all the next slide shows (that is already handled by Slide Show->Slide Show Settings->Range->"Custom slide show:" and Slide Show->Slide Show Settings->Range->"All slides"). Change-Id: I6e97a69c546870199d5a45d9a6ad102e30d820c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117876 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit a46a847d4298806d4e91e4665c3c1907c09a17c7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118100 Tested-by: Jenkins
2021-06-29tdf#142913 PPTX: slideshow setting “Start from” not importedTibor Nagy
Note: see Slide Show->Slide Show Settings...->Range->From: on the UI, or press Shift-F5 after loading the unit test document sd/qa/unit/data/pptx/tdf142913.pptx. Change-Id: I2e10a4353c26600bf405475cb89990413c81dc1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117705 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 3d55149dcf19cffefcc19c16a3abbe8851453c5e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118062 Tested-by: Jenkins
2021-06-29new ODF numbered list parameter loext:num-list-formatVasily Melenchuk
Instead of style:num-prefix and style:num-suffix new list format is much more flexible for storing list multilevel numberings. Now it is possible to have not just prefix/suffix but any random separators between levels, arbitrary levels order, etc. Internal LO format for list format is changed: instead of placeholders like %1, %2, etc we right now use %1%, %2%... Reason: for ODT documents, having more than 9 levels there is ambiguity in "%10": it is "%1" followed by "0" suffix, or "%10"? Aux changes: * removed zero width space hack: since format string is always defined this hack is interfering with standard list numbers printing (see changes in ooxmlexport14.cxx, ww8export3.cxx tests) * changed cross-references values to lists: they are now including full list label string: previously this was bit self-contradictory (see changes in odfexport.cxx and check_cross_references.py tests) Conflicts: sw/qa/extras/odfexport/odfexport.cxx Change-Id: I9696cc4846375c5f6222539aeaadbca5ae58ce27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117156 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118040 Reviewed-by: Vasily Melenchuk <vasily.melenchuk@cib.de>
2021-06-28tdf#142646 PPTX import: count repeating slide namesTibor Nagy
instead of using the default slide name "Slide n". PPTX slides are named after their titles. Now repeating titles got a number instead of using the default slide name "Slide n". E.g. "Title", "Title", "Title" will be slide names "Title", "Title (2)", Title (3)", and not "Title", "Slide 2", "Slide 3". Follow-up to commit I98511c3c9a59598ea113e7387db5202d7f8a7cd4 "tdf#103347: PTX import: fix duplicated slide name" Change-Id: I449d6f7d7599291b3dae7df65ad6ff86a4269fb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117317 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 253bee65bc24d999c3629a4d503d0fa01b355cfc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117972 Tested-by: Jenkins
2021-06-23Avoid crash getting default item for OWN_ATTR_TEXTCOLUMNSMike Kaganski
... as seen in https://dev-builds.libreoffice.org/crashtest/89459662bf2684a07596d4132c84e5da7e0af8d4/backtraces/task908-core.backtrace.txt ... #8 0x00007fb81c9674f2 in Application::Abort(rtl::OUString const&) (rErrorText="") at /home/buildslave/source/libo-core/vcl/source/app/svapp.cxx:274 #9 0x00007fb8226aa127 in desktop::Desktop::Exception(ExceptionCategory) (this=0x7ffdf0d856d0, nCategory=<optimized out>) at /home/buildslave/source/libo-core/include/rtl/ustring.hxx:181 bInException = true nOldMode = <optimized out> rArgs = <optimized out> bRestart = <optimized out> bAllowRecoveryAndSessionManagement = <optimized out> #10 0x00007fb81c97ca5a in VCLExceptionSignal_impl(void*, oslSignalInfo*) (pInfo=<optimized out>) at /home/buildslave/source/libo-core/vcl/source/app/svmain.cxx:169 nOldMode = SystemWindowFlags::DIALOG pSVData = 0x7fb81d423300 <rtl::Static<ImplSVData, (anonymous namespace)::private_aImplSVData>::get()::instance> aLock = {m_isAcquired = true, m_isChecked = true, m_rSolarMutex = @0x5612f7423da0} bIn = true nVCLException = <optimized out> #11 0x00007fb82282d1a7 in callSignalHandler(oslSignalInfo*) (pInfo=pInfo@entry=0x7fb80a196af0) at /home/buildslave/source/libo-core/sal/osl/all/signalshared.cxx:59 pHandler = 0x5612f826c2d0 Action = <optimized out> #12 0x00007fb82289e5a8 in (anonymous namespace)::signalHandlerFunction(int, siginfo_t*, void*) (signal=6, info=0x7fb80a196cf0, context=0x7fb80a196bc0) at /home/buildslave/source/libo-core/sal/osl/unx/signal.cxx:451 Info = {Signal = osl_Signal_AccessViolation, UserSignal = 6, UserData = 0x0} #13 0x00007fb8224d6840 in <signal handler called> () at /lib/x86_64-linux-gnu/libc.so.6 #14 0x00007fb8224d67bb in raise () at /lib/x86_64-linux-gnu/libc.so.6 #15 0x00007fb8224c1535 in abort () at /lib/x86_64-linux-gnu/libc.so.6 #16 0x00007fb8224c140f in () at /lib/x86_64-linux-gnu/libc.so.6 #17 0x00007fb8224cf102 in () at /lib/x86_64-linux-gnu/libc.so.6 #18 0x00007fb81f72434c in SfxItemPool::GetDefaultItem(unsigned short) const (this=0x5612f8e2ec00, nWhich=<optimized out>) at /home/buildslave/source/libo-core/svl/source/items/itempool.cxx:728 __PRETTY_FUNCTION__ = "const SfxPoolItem& SfxItemPool::GetDefaultItem(sal_uInt16) const" nPos = <optimized out> pDefault = <optimized out> #19 0x00007fb81f724326 in SfxItemPool::GetDefaultItem(unsigned short) const (this=0x5612f8869790, nWhich=4006) at /home/buildslave/source/libo-core/svl/source/items/itempool.cxx:727 __PRETTY_FUNCTION__ = "const SfxPoolItem& SfxItemPool::GetDefaultItem(sal_uInt16) const" nPos = <optimized out> pDefault = <optimized out> #20 0x00007fb80de6cc2e in SdStyleSheet::setPropertyValue(rtl::OUString const&, com::sun::star::uno::Any const&) (this=0x5612f89d3940, aPropertyName=..., aValue=uno::Any("com.sun.star.text.XTextColumns": {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x5612f89006c0}, <No data fields>})) at /home/buildslave/source/libo-core/include/svl/style.hxx:257 aGuard = {<osl::Guard<comphelper::SolarMutex>> = {pT = 0x5612f7423da0}, <No data fields>} pEntry = 0x7fb80e7252e8 <GetStylePropertySet()::aFullPropertyMap_Impl+1992> rStyleSet = SfxItemSet of pool 0x5612f8869790 with parent 0x0 and Which ranges: [(1000, 1012), (1014, 1033), (1047, 1056), (1068, 1091), (1093, 1124), (1174, 1229), (4007, 4058)] = {1000 = 0x0, 1001 = 0x0, 1002 = 0x0, 1003 = 0x0, 1004 = 0x0, 1005 = 0x0, 1006 = 0x0, 1007 = 0x0, 1008 = 0x0, 1009 = 0x0, 1010 = 0x0, 1011 = 0x0, 1012 = 0x0, 1014 = 0x0, 1015 = 0x0, 1016 = 0x0, 1017 = 0x0, 1018 = 0x0, 1019 = 0x0, 1020 = 0x0, 1021 = 0x0, 1022 = 0x0, 1023 = 0x0, 1024 = 0x0, 1025 = 0x0, 1026 = 0x0, 1027 = 0x0, 1028 = 0x0, 1029 = 0x0, 1030 = 0x0, 1031 = 0x0, 1032 = 0x0, 1033 = 0x0, 1047 = 0x0, 1048 = 0x0, 1049 = 0x0, 1050 = 0x0, 1051 = 0x0, 1052 = 0x0, 1053 = 0x0, 1054 = 0x0, 1055 = 0x0, 1056 = 0x0, 1068 = 0x0, 1069 = 0x0, 1070 = 0x0, 1071 = 0x0, 1072 = 0x0, 1073 = 0x0, 1074 = 0x0, 1075 = 0x0, 1076 = 0x0, 1077 = 0x0, 1078 = 0x0, 1079 = 0x0, 1080 = 0x0, 1081 = 0x0, 1082 = 0x0, 1083 = 0x0, 1084 = 0x0, 1085 = 0x0, 1086 = 0x0, 1087 = 0x0, 1088 = 0x0, 1089 = 0x0, 1090 = 0x0, 1091 = 0x0, 1093 = 0x0, 1094 = 0x0, 1095 = 0x0, 1096 = 0x0, 1097 = 0x0, 1098 = 0x0, 1099 = 0x0, 1100 = 0x0, 1101 = 0x0, 1102 = 0x0, 1103 = 0x0, 1104 = 0x0, 1105 = 0x0, 1106 = 0x0, 1107 = 0x0, 1108 = 0x0, 1109 = 0x0, 1110 = 0x0, 1111 = 0x0, 1112 = 0x0, 1113 = 0x0, 1114 = 0x0, 1115 = 0x0, 1116 = 0x0, 1117 = 0x0, 1118 = 0x0, 1119 = 0x0, 1120 = 0x0, 1121 = 0x0, 1122 = 0x0, 1123 = 0x0, 1124 = 0x0, 1174 = 0x0, 1175 = 0x0, 1176 = 0x0, 1177 = 0x0, 1178 = 0x0, 1179 = 0x0, 1180 = 0x0, 1181 = 0x0, 1182 = 0x0, 1183 = 0x0, 1184 = 0x0, 1185 = 0x0, 1186 = 0x0, 1187 = 0x0, 1188 = 0x0, 1189 = 0x0, 1190 = 0x0, 1191 = 0x0, 1192 = 0x0, 1193 = 0x0, 1194 = 0x0, 1195 = 0x0, 1196 = 0x0, 1197 = 0x0, 1198 = 0x0, 1199 = 0x0, 1200 = 0x0, 1201 = 0x0, 1202 = 0x0, 1203 = 0x0, 1204 = 0x0, 1205 = 0x0, 1206 = 0x0, 1207 = 0x0, 1208 = 0x0, 1209 = 0x0, 1210 = 0x0, 1211 = 0x0, 1212 = 0x0, 1213 = 0x0, 1214 = 0x0, 1215 = 0x0, 1216 = 0x0, 1217 = 0x0, 1218 = 0x0, 1219 = 0x0, 1220 = 0x0, 1221 = 0x0, 1222 = 0x0, 1223 = 0x0, 1224 = 0x0, 1225 = 0x0, 1226 = 0x0, 1227 = 0x0, 1228 = 0x0, 1229 = 0x0, 4007 = 0x0, 4008 = 0x0, 4009 = 0x0, 4010 = 0x0, 4011 = 0x0, 4012 = 0x0, 4013 = 0x0, 4014 = 0x0, 4015 = 0x0, 4016 = 0x0, 4017 = 0x0, 4018 = 0x0, 4019 = 0x0, 4020 = 0x0, 4021 = 0x0, 4022 = 0x0, 4023 = 0x0, 4024 = 0x0, 4025 = 0x0, 4026 = 0x0, 4027 = 0x0, 4028 = 0x0, 4029 = 0x0, 4030 = 0x0, 4031 = 0x0, 4032 = 0x0, 4033 = 0x0, 4034 = 0x0, 4035 = 0x0, 4036 = 0x0, 4037 = 0x0, 4038 = 0x0, 4039 = 0x0, 4040 = 0x0, 4041 = 0x0, 4042 = 0x0, 4043 = 0x0, 4044 = 0x0, 4045 = 0x0, 4046 = 0x0, 4047 = 0x0, 4048 = 0x0, 4049 = 0x0, 4050 = 0x0, 4051 = 0x0...} aSet = SfxItemSet of pool 0x5612f8869790 with parent 0x0 and Which ranges: [(4006, 4006)] = {4006 = 0x0} #21 0x00007fb81945d8eb in SvXMLImportPropertyMapper::FillPropertySet_(std::__debug::vector<XMLPropertyState, std::allocator<XMLPropertyState> > const&, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> const&, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo> const&, rtl::Reference<XMLPropertySetMapper> const&, SvXMLImport&, ContextID_Index_Pair*) (rProperties=std::__debug::vector of length 3, capacity 4 = {...}, rPropSet=uno::Reference to (class SdStyleSheet *) 0x5612f89d3ad0, rPropSetInfo=uno::Reference to (class SfxItemPropertySetInfo *) 0x5612f8938ed8, rPropMapper=rtl::Reference to 0x5612f89a1900, rImport=..., pSpecialContextIds=pSpecialContextIds@entry=0x7fb80a1978b0) at /home/buildslave/source/libo-core/include/com/sun/star/uno/Reference.h:384 rProp = @0x5612f8497590: {mnIndex = 54, maValue = uno::Any("com.sun.star.text.XTextColumns": {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x5612f89006c0}, <No data fields>})} nIdx = 54 rPropName = "TextColumns" nPropFlags = 201342976 i = 1 bSet = false nCount = <optimized out> #22 0x00007fb8194650c6 in SvXMLImportPropertyMapper::FillPropertySet(std::__debug::vector<XMLPropertyState, std::allocator<XMLPropertyState> > const&, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> const&, ContextID_Index_Pair*) const (this=0x5612f8fa4960, aProperties=std::__debug::vector of length 3, capacity 4 = {...}, rPropSet=uno::Reference to (class SdStyleSheet *) 0x5612f89d3ad0, pSpecialContextIds=pSpecialContextIds@entry=0x7fb80a1978b0) at /home/buildslave/source/libo-core/xmloff/source/style/xmlimppr.cxx:466 xInfo = uno::Reference to (class SfxItemPropertySetInfo *) 0x5612f8938ed8 xMultiPropSet = empty uno::Reference bSet = <optimized out> xTolPropSet = empty uno::Reference ... Change-Id: Icdb32ff5383a8073f525aad1a39ff1dcc70559f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117661 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit f2ea39c70da3f82bb39f8b51b5484172360b1fc2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117638 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-22Resolves: tdf#140361 use the DisableEditHyperlink state as of menu launch timeCaolán McNamara
at context menu popup time set if the EditHyperlink entry should be disabled and use that state if queried about it if EditHyperlink is dispatched from the menu. So ignoring where the mouse currently happens to be when the menu was dismissed. The dispatch is done async, if at all, so also trigger an async Query with Invalidate so at least one Query is ensured to reset the stored state similar to tdf#137445 which was for impress/draw Change-Id: I43a144f1ac0a4db89cc5ab0ebeeae744719f5958 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117636 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-21tdf#142590 PPTX import: fix custom slide show use as defaultTibor Nagy
If the PPTX file contains a custom slideshow, which set by default and opening in Impress, this setting wasn't imported. See also commit 312334f8488a668e9b5302959b60292ce151e4fc "tdf#47365 PPTX export: support loop attribute" and commit a4b66458a7b8da2f5580014813e5dabe3fa670b6 "tdf#125071 PPTX: fix missing custom slide show export". Change-Id: I9c2b3773f6883ee795f119df5b8534fcdfa6618f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117172 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 8bf44b9cdceb7926fe52ef0bd4a38af24e7c700a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117562 Tested-by: Jenkins
2021-06-21tdf#142716 Update selection after any text is inserted.Gülşah Köse
When we don't update the selection after insertion of new text SvxUnoTextBase::createEnumeration knows old selection and losts last part of the text. Change-Id: I20f6530f34097ff213ff00cff617139887fd287a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117409 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> (cherry picked from commit e837f50313a703b6b26abb78f224472c1e4734ea) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117558 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-19fix 32bit build of tiledrendering testsRene Engelhard
Squash of commits 49849a09e2823ac6edb42693daf7eac5312f2eb9 d7b9b9e8e02aefd61669e07543fc370b0c58207f Change-Id: I2f10b7bb37b05961f73fad9ee2e716ed8177d8ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117474 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-14ofz#34297 Indirect-leakCaolán McNamara
this is similar to the memory leak fixed by commit d6e752d5ebfaf66d1c9b0694f9c8582311d6151a Author: Jian Fang Zhang <zhangjf@apache.org> Date: Mon Jun 18 12:26:30 2012 +0000 i#113608#, memory leak in animations: newly exposed crashed problem where the parent node holds a reference to its children and the child held a reference to its parent. Change RandomAnimationNode to use a WeakReference to its parent like the other AnimationNodes do Change-Id: I251a6127c301d1fb7e51397d8f05db4020bc612c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117113 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-14Assert on valid order of which ids in ranges on SfxItemSet creationMike Kaganski
This allows to make sure we actually use sorted which ranges, and then it's safe to call SfxItemSet::MergeRange when needed. Also this change relaxes the previous requirement that ranges must be separated by at least one; this allows to have adjacent ranges, like in RES_FRMATR_BEGIN, RES_FRMATR_END-1, RES_GRFATR_BEGIN, RES_GRFATR_END-1, where RES_FRMATR_END is equal to RES_GRFATR_BEGIN. Allowing this makes possible to (1) self-document the ranges, so it's clear which ranges are included; and (2) be safe in case when these constants would change, so that the one merged range would not unexpectedly contain everything inserted between RES_FRMATR_END and RES_GRFATR_BEGIN. Change-Id: Iaad0f099b85059b3aa318a347aa7fbd3f6d455c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116909 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 8aaa28ed43978a9a4a20d62368410a57ec05c23f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117114
2021-06-11tdf#130428 remove unnecessary usage of SfxItemState::UNKNOWNArmin Le Grand (Allotropia)
FontworkBar::getState does not need to check for SfxItemState::UNKNOWN at all, actions solely depend on FontWork object being selected. This also greatly simplifies that method. Also, the optimization by passing in a variable to checkForSelectedFontWork and remember if already computed can be removed - also in other places where it had to be given, but was not re-used at all Change-Id: I35b1f36195feb1d645619665d2dd65a84b75b118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117014 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2021-06-10sd: ubsan - fix heap-use-after-free in SdOutlinerTomaž Vajngerl
OutlinerView can change (old one deleted and new one create) so we can't store it in a local vairable and need to always fetch it. UBSAN Error log: ==21484==ERROR: AddressSanitizer: heap-use-after-free on address 0x606000af7d28 at pc 0x2ab7c5979405 bp 0x7ffcd1a3d1a0 sp 0x7ffcd1a3d198 READ of size 8 at 0x606000af7d28 thread T0 -0 0x2ab7c5979404 in std::__uniq_ptr_impl<EditView, std::default_delete<EditView> >::_M_ptr() const /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:147:42 -1 0x2ab7c59792ea in std::unique_ptr<EditView, std::default_delete<EditView> >::get() const /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:337:21 -2 0x2ab7c59791d9 in std::unique_ptr<EditView, std::default_delete<EditView> >::operator*() const /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:322:2 -3 0x2ab7c59725da in OutlinerView::GetEditView() const /include/editeng/outliner.hxx:209:46 -4 0x2ab7c70e36bb in SdOutliner::SearchAndReplaceOnce(std::__debug::vector<sd::SearchSelection, std::allocator<sd::SearchSelection> >*) /sd/source/ui/view/Outliner.cxx:903:21 -5 0x2ab7c70dcb32 in SdOutliner::SearchAndReplaceAll() /sd/source/ui/view/Outliner.cxx:622:29 -6 0x2ab7c70da81b in SdOutliner::StartSearchAndReplace(SvxSearchItem const*) /sd/source/ui/view/Outliner.cxx:478:28 -7 0x2ab7c61e4fc5 in sd::FuSearch::SearchAndReplace(SvxSearchItem const*) /sd/source/ui/func/fusearch.cxx:128:44 -8 0x2ab7c5c61fc5 in sd::DrawDocShell::Execute(SfxRequest&) /sd/source/ui/docshell/docshel3.cxx:228:36 -9 0x2ab7c5cac074 in SfxStubDrawDocShellExecute(SfxShell*, SfxRequest&) /workdir/SdiTarget/sd/sdi/sdslots.hxx:18384:1 -10 0x2ab7cd885d8f in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) /sfx2/source/control/dispatch.cxx:253:9 -11 0x2ab7cd89bd8f in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) /sfx2/source/control/dispatch.cxx:753:9 -12 0x2ab7cd89ccd6 in SfxDispatcher::Execute(unsigned short, SfxCallMode, SfxItemSet const*, SfxItemSet const*, unsigned short) /sfx2/source/control/dispatch.cxx:811:9 -13 0x2ab7cdd11d76 in SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:738:46 -14 0x2ab7cdd15135 in SfxOfficeDispatch::dispatchWithNotification(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:243:16 -15 0x2ab7f54b25d7 in framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatch> const&, com::sun::star::util::URL const&, bool, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx:159:30 -16 0x2ab7f54b1531 in framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx:117:16 -17 0x2ab7f54b2d17 in non-virtual thunk to framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx -18 0x2ab7e63c546f in unotest::MacrosTest::dispatchCommand(com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /unotest/source/cpp/macros_test.cxx:85:22 -19 0x2ab7b1a9ac2d in testSearchAllInDocumentAndNotes::TestBody() /sd/qa/unit/uiimpress.cxx:715:5 -20 0x2ab7b1b43f84 in void std::__invoke_impl<void, void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&>(std::__invoke_memfun_deref, void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:73:14 -21 0x2ab7b1b43b5e in std::__invoke_result<void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&>::type std::__invoke<void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&>(void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:95:14 -22 0x2ab7b1b439b2 in void std::_Bind<void (testSearchAllInDocumentAndNotes::* (testSearchAllInDocumentAndNotes*))()>::__call<void, 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/functional:467:11 -23 0x2ab7b1b43612 in void std::_Bind<void (testSearchAllInDocumentAndNotes::* (testSearchAllInDocumentAndNotes*))()>::operator()<void>() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/functional:549:17 -24 0x2ab7b1b426a1 in std::_Function_handler<void (), std::_Bind<void (testSearchAllInDocumentAndNotes::* (testSearchAllInDocumentAndNotes*))()> >::_M_invoke(std::_Any_data const&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:316:2 -25 0x2ab7b1aec1f1 in std::function<void ()>::operator()() const /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:706:14 -26 0x2ab7b1b41984 in CppUnit::TestCaller<testSearchAllInDocumentAndNotes>::runTest() /workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:175:7 -27 0x2ab765f655ba in CppUnit::TestCaseMethodFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5 -28 0x2ab780dd0937 in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /test/source/vclbootstrapprotector.cxx:46:14 -29 0x2ab765f36c47 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 -30 0x2ab775453fd7 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:78:12 -31 0x2ab765f36c47 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 -32 0x2ab771f47962 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:62:16 -33 0x2ab765f36c47 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 -34 0x2ab765ecdf84 in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15:12 -35 0x2ab765f36c47 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 -36 0x2ab765f30697 in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:86:18 -37 0x2ab765fcfa79 in CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:182:28 -38 0x2ab765f63c21 in CppUnit::TestCase::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91:13 -39 0x2ab765f67a52 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 -40 0x2ab765f66c4a in CppUnit::TestComposite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 -41 0x2ab765f67a52 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 -42 0x2ab765f66c4a in CppUnit::TestComposite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 -43 0x2ab765ffd60e in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47:27 -44 0x2ab765fce4de in CppUnit::TestResult::runTest(CppUnit::Test*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:149:9 -45 0x2ab765ffe56b in CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96:14 -46 0x4ff42e in (anonymous namespace)::ProtectedFixtureFunctor::run() const /sal/cppunittester/cppunittester.cxx:324:20 -47 0x4fb90c in sal_main() /sal/cppunittester/cppunittester.cxx:474:20 -48 0x4fa40e in main /sal/cppunittester/cppunittester.cxx:381:1 -49 0x2ab767c44554 in __libc_start_main (/lib64/libc.so.6+0x22554) -50 0x425e04 in _start (/workdir/LinkTarget/Executable/cppunittester+0x425e04) 0x606000af7d28 is located 8 bytes inside of 56-byte region [0x606000af7d20,0x606000af7d58) freed by thread T0 here: -0 0x4f75f0 in operator delete(void*) /home/tdf/lode/packages/llvm-llvmorg-9.0.1.src/compiler-rt/lib/asan/asan_new_delete.cc:160 -1 0x2ab7c70c42b1 in SdOutliner::Implementation::ProvideOutlinerView(Outliner&, std::shared_ptr<sd::ViewShell> const&, vcl::Window*) /sd/source/ui/view/Outliner.cxx:1988:17 -2 0x2ab7c70c1302 in SdOutliner::SetViewShell(std::shared_ptr<sd::ViewShell> const&) /sd/source/ui/view/Outliner.cxx:1743:17 -3 0x2ab7c70ed9f4 in SdOutliner::SetViewMode(PageKind) /sd/source/ui/view/Outliner.cxx:1571:5 -4 0x2ab7c70f309e in SdOutliner::SetObject(sd::outliner::IteratorPosition const&) /sd/source/ui/view/Outliner.cxx:1720:5 -5 0x2ab7c70f3db6 in SdOutliner::PrepareSearchAndReplace() /sd/source/ui/view/Outliner.cxx:1507:13 -6 0x2ab7c70d4b3f in SdOutliner::ProvideNextTextObject() /sd/source/ui/view/Outliner.cxx:1302:33 -7 0x2ab7c70e30f0 in SdOutliner::SearchAndReplaceOnce(std::__debug::vector<sd::SearchSelection, std::allocator<sd::SearchSelection> >*) /sd/source/ui/view/Outliner.cxx:892:17 -8 0x2ab7c70dcb32 in SdOutliner::SearchAndReplaceAll() /sd/source/ui/view/Outliner.cxx:622:29 -9 0x2ab7c70da81b in SdOutliner::StartSearchAndReplace(SvxSearchItem const*) /sd/source/ui/view/Outliner.cxx:478:28 -10 0x2ab7c61e4fc5 in sd::FuSearch::SearchAndReplace(SvxSearchItem const*) /sd/source/ui/func/fusearch.cxx:128:44 -11 0x2ab7c5c61fc5 in sd::DrawDocShell::Execute(SfxRequest&) /sd/source/ui/docshell/docshel3.cxx:228:36 -12 0x2ab7c5cac074 in SfxStubDrawDocShellExecute(SfxShell*, SfxRequest&) /workdir/SdiTarget/sd/sdi/sdslots.hxx:18384:1 -13 0x2ab7cd885d8f in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) /sfx2/source/control/dispatch.cxx:253:9 -14 0x2ab7cd89bd8f in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) /sfx2/source/control/dispatch.cxx:753:9 -15 0x2ab7cd89ccd6 in SfxDispatcher::Execute(unsigned short, SfxCallMode, SfxItemSet const*, SfxItemSet const*, unsigned short) /sfx2/source/control/dispatch.cxx:811:9 -16 0x2ab7cdd11d76 in SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:738:46 -17 0x2ab7cdd15135 in SfxOfficeDispatch::dispatchWithNotification(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:243:16 -18 0x2ab7f54b25d7 in framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatch> const&, com::sun::star::util::URL const&, bool, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx:159:30 -19 0x2ab7f54b1531 in framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx:117:16 -20 0x2ab7f54b2d17 in non-virtual thunk to framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx -21 0x2ab7e63c546f in unotest::MacrosTest::dispatchCommand(com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /unotest/source/cpp/macros_test.cxx:85:22 -22 0x2ab7b1a9ac2d in testSearchAllInDocumentAndNotes::TestBody() /sd/qa/unit/uiimpress.cxx:715:5 -23 0x2ab7b1b43f84 in void std::__invoke_impl<void, void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&>(std::__invoke_memfun_deref, void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:73:14 -24 0x2ab7b1b43b5e in std::__invoke_result<void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&>::type std::__invoke<void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&>(void (testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:95:14 -25 0x2ab7b1b439b2 in void std::_Bind<void (testSearchAllInDocumentAndNotes::* (testSearchAllInDocumentAndNotes*))()>::__call<void, 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/functional:467:11 -26 0x2ab7b1b43612 in void std::_Bind<void (testSearchAllInDocumentAndNotes::* (testSearchAllInDocumentAndNotes*))()>::operator()<void>() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/functional:549:17 -27 0x2ab7b1b426a1 in std::_Function_handler<void (), std::_Bind<void (testSearchAllInDocumentAndNotes::* (testSearchAllInDocumentAndNotes*))()> >::_M_invoke(std::_Any_data const&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:316:2 -28 0x2ab7b1aec1f1 in std::function<void ()>::operator()() const /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:706:14 -29 0x2ab7b1b41984 in CppUnit::TestCaller<testSearchAllInDocumentAndNotes>::runTest() /workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:175:7 Change-Id: I0b4616cd3813565bc58b7a84320cbf52dd654a3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116879 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-06-09Simplify Sequences initializations (sd)Julien Nabet
Change-Id: I968f1209961ba30ad0837846ae1ba4a9249663c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116934 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-06-09-Werror,-Wunused-but-set-variable (Clang 13 trunk)Stephan Bergmann
> sd/source/ui/dlg/BulletAndPositionDlg.cxx:707:14: error: variable 'sSelectStyle' set but not used [-Werror,-Wunused-but-set-variable] > OUString sSelectStyle; > ^ ...ever since the code's introduction in e3015d7021e689c71c2ed8e5dd01a74d832c84f0 "Add new customize and position merged dialog", and which means that SvxBulletAndPositionDlg::m_sBulletCharFormatName and second parameter of SvxBulletAndPositionDlg::SetCharFmts, both also introduced in that commit, were equally unused Change-Id: Id07c05777817298073d85719689b391bda533221 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116821 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>