summaryrefslogtreecommitdiff
path: root/sd
AgeCommit message (Collapse)Author
2021-06-22uitest: guard create_doc_in_start_centerXisco Fauli
Mostly done by a script for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac < UITest: introduce guarded context managers > Change-Id: I75ef7712af3676363a9a464acf83f6f68ffc4f85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117617 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-22Avoid 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>
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/+/117653 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-22uitest: guard load_fileXisco Fauli
Mostly done by a script for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac < UITest: introduce guarded context managers > Change-Id: Ia924293dc2a12230fd13f69fd734875ced86be8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117593 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
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>
2021-06-21uitest: guard execute_blocking_actionXisco Fauli
so even if an assert fails, the dialog is closed afterwards for motivation, see 89aaa17a0a4413f07da2bc5084b0164f15dc01ac < UITest: introduce guarded context managers > Change-Id: I9a3adb52546238d960eeaaaf03b6bdbbd5718cf8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117392 Tested-by: Jenkins Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
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>
2021-06-20cid#1485150 suppress Uncaught exceptionCaolán McNamara
Change-Id: Ic1b2a44afd15e0720edd48f3502dd2799795551a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117508 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-18more 32bit build fixesRene Engelhard
Change-Id: I5906ef714a482afffe40e59e90fd709fe857d3ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117404 Tested-by: Jenkins Tested-by: René Engelhard <rene@debian.org> Reviewed-by: René Engelhard <rene@debian.org>
2021-06-18tdf#130428 remove unnecessary usage of SfxItemState::UNKNOWNArmin Le Grand (Allotropia)
Rename ::StateChanged methods using SfxItemState to allow better analysis of SfxItemState/SfxPoolItem usage(s), discussion see tdf#130428 comment 30 Change-Id: I736be0160ad7a9b7882c1c8a4cc05d9396ee3305 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117366 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2021-06-18avoid maybe-uninitialized in PowerPointShapeExportNoel Grandin
/home/noel/libo3/sd/source/filter/eppt/pptx-epptooxml.cxx: In member function ‘oox::drawingml::ShapeExport& oox::core::PowerPointShapeExport::WritePlaceholderReferenceTextBody(oox::core::PlaceholderType, PageType, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>)’: /home/noel/libo3/sd/source/filter/eppt/pptx-epptooxml.cxx:1715:31: error: ‘nDateTimeFormat’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 1715 | SvxTimeFormat eTime = static_cast<SvxTimeFormat>(nDateTimeFormat >> 4); | ^~~~~ /home/noel/libo3/sd/source/filter/eppt/pptx-epptooxml.cxx:1707:36: error: ‘bIsDateTimeFixed’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 1707 | if(ePageType != LAYOUT && !bIsDateTimeFixed) | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ Change-Id: I7f622321680705fb0b0fa42630949c8d6af8488e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117398 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-17Removed executable bits on pptx fileAndrea Gelmini
Change-Id: Icd927660130f72a077c12a38914b3fe8d0ab7d28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117360 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-06-17remove 'relief' from CheckButtonsCaolán McNamara
Change-Id: I8a17c36489946327113e63f80b952525ae4201a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117377 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-17use string_view in the Translate APINoel Grandin
Change-Id: I0bb0ea9d39ed623928060ffd3f2e2bc36ba33209 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117272 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-17svx: prefix member variables SdrViewEvent SdrView SdrObjGroupTomaž Vajngerl
Change-Id: Ic20c9dc7b8109cb095a883f2dfcec3e4f10b2428 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117352 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-06-16cid#485150 silence Uncaught exceptionCaolán McNamara
for the record coverity[foo] defect is marked as intentioanl coverity[foo : FALSE] defect is marked as false positive coverity[foo : SUPPRESS] detect is not saved at all Change-Id: I1277c4426b5fa9efde8a9227c2813d53deb56555 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117325 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-16tdf#59323: pptx export: slide footers roundtrip unit testSarper Akdemir
Roundtrip test that checks the slide footers, and their placeholder indexes. Change-Id: I9c4b819092ac6699617d71538c35b066d6e6f974 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117013 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-06-16tdf#59323: pptx export: add support for slide footersSarper Akdemir
Adds support for exporting slide footers to PPTX. Slide footers are exported as shapes that use placeholder indexes to refer to the shapes on master. To make the references work they are exported to layout slides too. Change-Id: I8bfde520b0aec66405523c719844e69c6fc15b79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117012 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-06-16tdf#59323: pptx export: add placeholder index to master footer placeholdersSarper Akdemir
OOXML uses placeholder index to determine from which layout placeholder it should be inheriting styles, position etc. Added maPlaceholderShapeToIndexMap that stores corresponding Placeholder index for a Placeholder XShape on the master slide. Right now only used for placeholder types Footer, DateAndTime and SlideNumber. Change-Id: If788f235d00b6d1cde7194d9e4a0789e019432c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117010 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-06-16tdf#59323: pptx import: import footer fields as propertiesSarper Akdemir
Makes footer, slidenum and datetime placeholders that are inserted to the slides themselves on pptx files imported as slide properties if it is possible to do so without losing information (style, position etc.) If that is not the case and the footers have some special style applied to them that isn't inherited from master slides, fallbacks to the current implementation importing them as shapes. Also since the default way of displaying slide footers in LO use the respective text fields on master slides, information in master/layout slide datetime and footer placeholders respectively get replaced with <date/time> text fields and <footer> text fields. Change-Id: Ib2f7d18103b62c0c9a8453e01cfd2fd1aa1d39af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117008 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-06-15editengine-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>
2021-06-15vcl: outdevmap.hxx -> rendercontext/ImplMapRes.hxxChris Sherlock
Change-Id: I96e191999e43e1a4203d548eeacd386ed883cd8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115368 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-06-14Fix Exception from PutProperties in unotoolsJulien Nabet
Launch Impress, click on "Animation" icon and check/uncheck "Automatic Preview" checkbox (at bottom right) Close Impress and notice this twice: warn:unotools.config:9155:9155:unotools/source/config/configitem.cxx:487: Exception from PutProperties com.sun.star.lang.IllegalArgumentException message: configmgr inappropriate property value /home/julien/lo/libreoffice/configmgr/source/access.cxx:1497 ArgumentPosition: -1 Investigating a bit, I noticed: officecfg/registry/schema/org/openoffice/Office/Impress.xcs 673 <prop oor:name="Width" oor:type="xs:int" oor:nillable="false"> 680 <prop oor:name="Height" oor:type="xs:int" oor:nillable="false"> officecfg/registry/schema/org/openoffice/Office/Draw.xcs 429 <prop oor:name="Width" oor:type="xs:int" oor:nillable="false"> 436 <prop oor:name="Height" oor:type="xs:int" oor:nillable="false"> sd/source/ui/app/optsitem.cxx:479: "DefaultObjectSize/Width", sd/source/ui/app/optsitem.cxx:480: "DefaultObjectSize/Height", Change-Id: I608b882cdff03e464fdb9886d5ba28dd33bfe229 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117095 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2021-06-14remove double-buffered propertiesCaolán McNamara
these are all fat fingered in somehow or another Change-Id: I0864a5622a244d5e60b368ddc425fc5a9b019060 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117176 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-14only one of the radiobuttons in a group should be activeCaolán McNamara
Change-Id: I0475bdd0633b54a644e205628577fac18a3af974 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117142 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-14group leader should be activeCaolán McNamara
Change-Id: I79cc2032c8641288ec6def4aaee32cb67e2da915 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117140 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-13ofz#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/+/117096 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-13Assert 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>
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>
2021-06-09-Werror,-Wunused-but-set-variable (Clang 13 trunk)Stephan Bergmann
...after 096168cacc574a71482520e5c3fbd79f975dc6ad "loplugin:writeonlyvars" had removed the (only) read of sFirstCharFmt Change-Id: I8b59f54b2bb8669c66a14df80c4c74fceb56b1c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116820 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-06-08sd: split CppunitTest_sd_export_tests-ooxml2 into twoXisco Fauli
Change-Id: Ida23d59cd010d6fb9bf4fb8b5f82d2d764281773 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116826 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-08tdf#47365 PPTX export: support loop attributeTibor Nagy
Follow-up to commit ad2809b4b6dc4837b0c1cadd89a14a234d995fb2 "tdf#47365: import support for PPTX presentation's loop attribute". Change-Id: I7f75acc2bbd6301384883691d5ef4069b1757a05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116560 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-06-08editengine-columns: PPTX support (tdf#118458)Mike Kaganski
The unit tests that used to check the workaround using tables to emulate columns (implemented in tdf#120028) are changed to test import of the columns. This reverts some commits related to the mentioned workaround, namely aef569ed83a3ccc02639e5b2a1c7cc131ba262fc, c50ae6a282ed83762bf634fed5c91033eb305c88, 7b64bd90637a6722438bf873b1ded74ab3424c46, 33696b2820ce3c8b21b753d2c2bf92345ecb9276, 99dff69b561a8fe2d9437e6aa67a9581a6666f41. Change-Id: I97693ad4a981780e822070938992f274920df5a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116738 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-08editengine-columns: Implement layoutMike Kaganski
This changes the way how different parts access positions of lines and paragraphs. Now there is ImpEditEngine::IterateLineAreas, which performs uniform iteration over all ParaPortions and lines in order, calling a user-provided callback function for each portion and line; it passes all information about current portion, line, area, and column to the callback, and checks the return from the callback, to decide if it needs to continue iteration (in case when callback indicated that if doesn't need further data), and if it needs calling the callback for the rest of current portion's lines. This allows to have the code that calculates and iterates dimensions of lines in one central place, without the need to have duplicating logic in several places. One important exception is ImpEditEngine::Paint, which iterates without ImpEditEngine::IterateLineAreas, because it does many atomic paint operations in different points of iteration process, and implementing ImpEditEngine::IterateLineAreas to call callback in the required places would require increased complexity, which is left for a future change. To make that possible, ImpEditEngine::IterFlag should be extended to indicate additional requirements. Note that in fact, ImpEditEngine::Paint was taken as the model for implementation of ImpEditEngine::IterateLineAreas, with its detailed handling of all the vertical offsets like additional line spacing and interparagraph spacings that depend on context. The notable result of the centralization of the iteration code is slight change of heights reported by ImpEditEngine::CalcTextHeight. Previously it simply added all pre-calculated heights of portions, and not taking into account all the spacing handling that ImpEditEngine::Paint did, which was inconsistent (calculated height was different from painted height). Now ImpEditEngine::CalcTextHeight should provide more accurate results, which required small changes in the unit tests. Change-Id: I33cbb978deb974b314d36fda8674186a03991107 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116034 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-08editengine-columns: ODF support [API CHANGE]Mike Kaganski
This uses existing ODF markup, as used by Writer's text frame: style::columns child element of style:graphic-properties, its fo:column-count and fo:column-gap attributes. No ODF extension is required. Since currently only columns with same width and spacing are implemented, without additional settings, style:column child elements are exported, but ignored on import. This adds new property to css::drawing::TextProperties service: TextColumns (of type css::text::XTextColumns). Change-Id: I7e63293e5814b281ceec8a9632e696322d3629e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116035 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-08editengine-columns: Create document model and dialog pageMike Kaganski
Change-Id: I056aad9474ca18134d1f1686a53618cc9ab3d525 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116038 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-08Remove SfxItemState::READONLYArmin Le Grand
As I experimented with redesigning the whole Item/ItemSet/ItemPool paradigm, I alredy checked that SfxItemState::READONLY is not used (and no one really knows what it should do or stands for). Since a removal of complexity is needed to get forward with that redesign and I already made some experiences in branch item_refactor2, I propose to remove this state. It is not really used (gets never set). It is mirrored/used in the UNO API in css::frame::status::ItemState as 'READ_ONLY', but also not used in the office's code. ItenmState itself is used in three places, but all set the Item involved by using a SfxVoidItem to state SfxItemState::DISABLED, which I described in ItemState.idl. This means that no state of READ_ONLY in UNO API is ever imported to office code as DISABLED state at all, so not used. I also marked it as deprecated in the *.idl file. I think - including the experimenting in the mentioned branch - that this is safe for now. I already run a full 'make check' on the changed stuff. Change-Id: I8c15cf7b4f803076ecaaea67659f6e022ac7ef70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116752 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2021-06-07sd: use registerOOXMLNamespaces and registerODFNamespacesXisco Fauli
While at it, fix incorrect r:Relationships with rels:Relationships Change-Id: Ia8e6556b0e7d3839e00936626627471a7a276071 Change-Id: I77f950dabd4d2131256673e517625d31ade9aa76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116800 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-07sd: Use template for export test modulesXisco Fauli
Change-Id: Ib604d0ad64dc16dbf9c0115a0fb30a8e3c6da337 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116787 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-07Move PPTX testdoc to respective directoryMike Kaganski
Change-Id: I020998c8e8b2a715a7f0a924bd24e09082599a6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116788 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-07Resolves tdf#142513 fix zoom caller handlingJim Raykowski
Calling ZoomPlus has always executed shell SID_ZOOM_OUT case handling. ZoomMinus, which replaced ZoomIn, does SID_ZOOM_IN case handling. This patch changes ZoomPlus to do SID_ZOOM_IN case handling and ZoomMinus to do SID_ZOOM_OUT case handling and makes appropriate changes required by these name changes to provide expected zoom results in all module shells that have handling for these calls. Change-Id: If148f4f7866bfc8fc6452ad1c1dace723a125ef6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116287 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2021-06-07tdf#142478 add test that triggers find all and crashesTomaž Vajngerl
String "Crash" in document and notes, then trigger "find all", which produced a crash without the fix in-place. Change-Id: I8e6e4a9da1afc85643648aee36a03c1fb39ca16d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116769 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-06-07Restrict test a bit to verify that there indeed is scalingMike Kaganski
... just to make sure that changes like a1ae30166e92a0a40dff06740f0bb8e9ee63f70a don't break the test. Change-Id: I4d9f8a6a85fc155c2b67c76152b1aaa7df384a38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116701 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-06Fix and unify the two methods that get scaled text sizeMike Kaganski
GetTextFitToSizeScale and SdrTextObj::GetFontScaleY both didn't initialize outliners properly, and thus returned wrong results. Change-Id: I6fe63c51ed838a0d0fafdfa03597cac97ce29831 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116765 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-06tdf#142478 fix crash when searching and a viewshell change occursTomaž Vajngerl
When searching a impress document for a word, and the word is in notes as welll as in the document, a crash happens (only when searching with "find all"). The regressing commit changed that the search is now bound to a view (and to a viewshell). When searching for words in notes and document, at the transition from "standard" to "notes" page kind mode, the view and viewshells are destroyed and the new one created again. The problem lies here as when we destroy the viewshell, we also destroy the search context and FuSearch objects, but we are still executing the search -> crash. The solution for this is that when we change the page kind, we take the FuSearch object from the old viewshell and put it into the newly created viewshell, so that we keep the FuSearch object alive and don't throw away the search context too. Change-Id: I50931cca2a20c5704f7450e3cc8b3466af4c5a3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116758 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-06-04sd: Unit test for Table deletion with Delete Keymerttumer
Change-Id: I9849f55a143007b49bdcaac392dd84e32d610998 Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116069 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116300 Tested-by: Jenkins
2021-06-04Unit tests for .uno:MoveShapeHandle commandmerttumer
Change-Id: Ia1049325bf26fbe6a3c8ac77c873d1af010d3581 Signed-off-by: merttumer <mert.tumer@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115541 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116297 Tested-by: Jenkins