summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-03-29allocate columns in ScTable::Compare()Luboš Luňák
This gets triggered by ScCellRangeObj::testSortOOB() if INITIALCOLCOUNT is set to 1. Change-Id: I4d9715e89403072b312c0002a43c67ac59960d1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132281 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-29Update git submodulesIlmari Lauhakangas
* Update helpcontent2 from branch 'master' to 602281f118a8b8218bef24511d835f39aea3561a - Remove redundant image title attributes From web accessiblity evaluation tool: The title attribute value is used to provide advisory information. It typically appears when the user hovers the mouse over an element. The advisory information presented should not be identical to or very similar to the element text or alternative text. Change-Id: Id95d6661d47d7c28ea8a3f6a43ecc1b12c579a95 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/132265 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2022-03-29allocate column in ScTable::FillSeries() when neededLuboš Luňák
There's an assert triggered by Test::testAutoFill() if INITIALCOLCOUNT is set to 1. Change-Id: I65ecd7df3bf6b38a8121a252f7f53dd7f5bbb0fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132270 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-29replace dynamic C style arrays with std::vector in Splines.cxxofftkp
replaced all instances of dynamic C style arrays, removed delete statements as they are no longer needed also now removed a pointless loop for an std::swap Change-Id: I0438b1fa944dc6ae8c6a3cc488645504ab30c3df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132278 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2022-03-29qt: Fix typo in function name: lcl_MapUndrelineStyleMichael Weghorn
Change-Id: I50b2ffeb1b6bb490c14a307152634cc51022a426 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132276 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-03-29tdf#148240: Make Outline-Folding non-experimentalJulien Nabet
Change-Id: I8de81ec13228d0742a3b12af97edb1b97643a790 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132243 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-03-29Check for yet another consteval bugStephan Bergmann
...which caused at least recent Clang 15 trunk configured with LLVM_ENABLE_ASSERTIONS=ON to crash when building --with-latest-c++ e.g. sal/qa/rtl/strings/test_oustring_stringliterals.cxx since 21584b304b21bfe6b99b6f29018c6b754ea28fc0 "make OUString(OUStringLiteral) constructor constexpr" Change-Id: Icef2ae27bfc518b127aabfc4767212b4b6a95a77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132273 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-29tdf#73499 DOCX import: fix grouped linked textboxAttila Bakos (NISZ)
Only ungrouped text boxes were imported correctly. Grouped textboxes lost their linking, resulting broken layout. Now the linking is fixed for DrawingML. Note: in old MSO versions, linking needed grouping. To import these DOC documents correctly, convert them to DOCX/DrawingML in MSO before opening them in Writer. Change-Id: Ib5a8744d783a9c95c42447d204e17891b3aea7bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130950 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-03-29sw: replace usage of sal_Int32 with ColorXisco Fauli
after 49a40e3ed200e7c6d728f36d0b4be22dd85c51be "tdf#135923 DOCX shape import: set text color" Change-Id: Ic96233555d8d79645ff3d5ff3711fa428b05c98b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132271 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-03-29tdf#89449 PPTX import: fix line connectorsTibor Nagy
Line connectors were imported as plain shapes, losing their functionality during editing, i.e. keeping connections of boxes and other shapes. Change-Id: I0f1562be2dbcce0e45eb209c6ca4e035731039e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131303 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-03-29avoid repeated calls to ScMarkData::GetMarkedRanges() (tdf#148147)Luboš Luňák
ScTable::HasSelectionMatrixFragment() gets called several times when opening 'Sheet' in the menubar, and the functions it calls end up a quadratic cost for the number of columns repeatedly calling ScMarkData::GetMarkedRanges() for the same object. Fix the performance problem by getting the value once and reusing it. Change-Id: I8b05475832c3560318c43429c3b9323035a3691f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132267 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-29do not provide non-const iterators for ScMarkData internalsLuboš Luňák
It's a bad idea, and it's actually not needed. Change-Id: Ic1022bc4774a33abbc37158539881a15792bc282 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132266 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-29Revert "removed pointless using namespace std"Stephan Bergmann
This reverts commit 5b53dd0514c25f907c80d523b078387db71f859b. The using directive was not pointless, it was necessary to correctly call the std::swap customization point. Change-Id: I642587fe2a8fc281a6079837edce3a8a6c47ea33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132184 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-29replace temporary value swap with std::swapofftkp
Replaced 3 occurences of temporary value swap with C++ standard std::swap Change-Id: Ib4dea821da8e93e8d18a3ebe55a7e47a010c9de9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132194 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-03-29tdf#145614 Convert #define to constexprofftkp
Change-Id: I2c57e2021a224fb7f69d1de5cf0f809a7d2422b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132151 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-03-29removed pointless using namespace stdofftkp
Change-Id: I117aa1ea74b636ef06f7eedce8f2e12f9c4226b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132213 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-03-29tdf#135923 DOCX shape import: set text colorTünde Tóth
to the character color of the shape if it is not comes from direct formatting. Change-Id: I3f0a3e952b5449a6d92c5bb273d353a561f3e3dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130922 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-03-29tdf#53970 PPTX: fix export of embedded media filesTünde Tóth
Embedded media files lost in documents created with Impress after PPTX export. Change-Id: I453b58f9cfa6a33653e9216fb82b66970a9ec31b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132095 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-03-29android: Enable support for FODSMichael Weghorn
Enable support for MIME type "application/vnd.oasis.opendocument.spreadsheet-flat-xml" in AndroidManifest, the comment saying it crashes the app is obsolete. However, at least on my Android 10 AVD, that MIME type does not seem to be associated with '*.fods' files, so they were not offered to be opened. MIME type "application/octet-stream" was used instead, for which no support is declared. For testing, I just disabled the MIME type filter locally and was then able to open an FODS file just fine: --- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java +++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java @@ -266,7 +266,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings } intent.setType("*/*"); - intent.putExtra(Intent.EXTRA_MIME_TYPES, SUPPORTED_MIME_TYPES);; + //intent.putExtra(Intent.EXTRA_MIME_TYPES, SUPPORTED_MIME_TYPES);; Change-Id: Ibf3f559a313f0b89bc4c25498e3efa0fcbded506 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132263 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-03-29Update git submodulesIlmari Lauhakangas
* Update helpcontent2 from branch 'master' to c623dfe855734c75875f7333e49b1c7cd302988e - Use type="search" for index filter input Change-Id: I0427076aa8d688f837a38c66312b7690336c0d2e Reviewed-on: https://gerrit.libreoffice.org/c/help/+/132264 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-03-29loplugin:unusedfieldsNoel Grandin
Change-Id: Iaf3a0a42e94994eab25f5e9ef8c111362e86fb02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132262 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-29sc: fix use after free in ScChart2DataSequence::ExternalRefListenerMichael Stahl
UITest_chart: tdf122011.tdf122011.test_tdf122011 ERROR: AddressSanitizer: heap-use-after-free on address 0x61e00007a13e at pc 0x7f9a88217e2b bp 0x7f9a901e7ab0 sp 0x7f9a901e7aa8 READ of size 1 at 0x61e00007a13e thread T53 #0 ScDocument::IsInDtorClear() const sc/inc/document.hxx:2421:56 #1 ScChart2DataSequence::ExternalRefListener::~ExternalRefListener() sc/source/ui/unoobj/chart2uno.cxx:2897:26 #4 ScChart2DataSequence::~ScChart2DataSequence() sc/source/ui/unoobj/chart2uno.cxx:2458:1 #6 cppu::OWeakObject::release() cppuhelper/source/weak.cxx:230:9 #8 com::sun::star::uno::Reference<com::sun::star::chart2::data::XDataSequence>::~Reference() include/com/sun/star/uno/Reference.hxx:114:22 #9 chart::LabeledDataSequence::~LabeledDataSequence() chart2/source/tools/LabeledDataSequence.cxx:89:1 #11 cppu::OWeakObject::release() cppuhelper/source/weak.cxx:230:9 #12 cppu::WeakImplHelper<com::sun::star::chart2::data::XLabeledDataSequence2, com::sun::star::lang::XServiceInfo>::release() include/cppuhelper/implbase.hxx:115:66 #13 com::sun::star::uno::Reference<com::sun::star::chart2::data::XLabeledDataSequence>::~Reference() include/com/sun/star/uno/Reference.hxx:114:22 #20 chart::DataSeries::~DataSeries() chart2/source/model/main/DataSeries.cxx:218:1 #24 chart::DataSeries::release() chart2/source/model/main/DataSeries.cxx:537:1 #25 rtl::Reference<chart::DataSeries>::~Reference() include/rtl/ref.hxx:129:22 #32 std::__debug::vector<rtl::Reference<chart::DataSeries>, std::allocator<rtl::Reference<chart::DataSeries> > >::clear() /usr/bin/../lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/debug/vector:720:9 #33 chart::ChartType::~ChartType() chart2/source/model/template/ChartType.cxx:65:19 #34 chart::ColumnChartType::~ColumnChartType() chart2/source/model/template/ColumnChartType.cxx:134:2 #36 cppu::OWeakObject::release() cppuhelper/source/weak.cxx:230:9 #38 chart::ChartType::release() chart2/source/model/template/ChartType.cxx:330:1 #39 rtl::Reference<chart::ChartType>::~Reference() include/rtl/ref.hxx:129:22 #46 chart::BaseCoordinateSystem::~BaseCoordinateSystem() chart2/source/model/main/BaseCoordinateSystem.cxx:185:1 #47 chart::CartesianCoordinateSystem::~CartesianCoordinateSystem() chart2/source/model/main/CartesianCoordinateSystem.cxx:53:2 #49 cppu::OWeakObject::release() cppuhelper/source/weak.cxx:230:9 #51 chart::BaseCoordinateSystem::release() chart2/source/model/main/BaseCoordinateSystem.cxx:406:1 #52 rtl::Reference<chart::BaseCoordinateSystem>::~Reference() include/rtl/ref.hxx:129:22 #53 chart::VCoordinateSystem::~VCoordinateSystem() chart2/source/view/axes/VCoordinateSystem.cxx:89:1 #55 chart::VCartesianCoordinateSystem::~VCartesianCoordinateSystem() chart2/source/view/axes/VCartesianCoordinateSystem.cxx:69:1 #65 chart::ChartView::impl_deleteCoordinateSystems() chart2/source/view/main/ChartView.cxx:1091:20 #66 chart::ChartView::~ChartView() chart2/source/view/main/ChartView.cxx:1085:5 #68 cppu::OWeakObject::release() cppuhelper/source/weak.cxx:230:9 #70 rtl::Reference<chart::ChartView>::~Reference() include/rtl/ref.hxx:129:22 #71 chart::ChartModel::~ChartModel() chart2/source/model/main/ChartModel.cxx:183:1 #73 cppu::OWeakObject::release() cppuhelper/source/weak.cxx:230:9 #75 rtl::Reference<chart::ChartModel>::clear() include/rtl/ref.hxx:196:19 #76 chart::CreationWizardUnoDlg::disposing() chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx:235:19 #77 cppu::OComponentHelper::dispose() cppuhelper/source/component.cxx:161:17 #78 chart::CreationWizardUnoDlg::notifyTermination(com::sun::star::lang::EventObject const&) chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx:140:5 #79 framework::Desktop::impl_sendNotifyTerminationEvent() framework/source/services/desktop.cxx:1649:79 #80 framework::Desktop::terminate() framework/source/services/desktop.cxx:282:13 0x61e00007a13e is located 2238 bytes inside of 2712-byte region [0x61e000079880,0x61e00007a318) freed by thread T53 here: #0 0x4fe267 in operator delete(void*) (instdir/program/soffice.bin+0x4fe267) #1 ScDocShell::~ScDocShell() sc/source/ui/docshell/docsh.cxx:2899:1 #2 SvRefBase::ReleaseRef() include/tools/ref.hxx:163:29 #3 tools::SvRef<SfxObjectShell>::~SvRef() include/tools/ref.hxx:56:36 #4 IMPL_SfxBaseModel_DataContainer::~IMPL_SfxBaseModel_DataContainer() sfx2/source/doc/sfxbasemodel.cxx:245:5 #12 SfxBaseModel::dispose() sfx2/source/doc/sfxbasemodel.cxx:757:13 #13 SfxBaseModel::close(unsigned char) sfx2/source/doc/sfxbasemodel.cxx:1482:5 #14 SfxBaseModel::dispose() sfx2/source/doc/sfxbasemodel.cxx:718:13 #15 gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77:5 Change-Id: I4ac7a702c50f9519a0f982ece9776c2d449c43ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132242 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-03-29sw doc model xml dump: don't warn on SwFormatMetaMiklos Vajna
No need to dump it for now, just silence the warning. Change-Id: I3f09f6198732aacfd7173f8f81f9df220bb59bff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132257 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-03-29cid#1503287 silence Unchecked dynamic_castCaolán McNamara
Change-Id: Id7c6c1ecbfc88c97d5211826fa2d831344dc795c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132245 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-29cid#1503286 Unchecked return valueCaolán McNamara
Change-Id: I701039be73405e354fc64bd6a81999aff44e9e0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132244 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-03-29initialize output parameter of ScFormatRangeStyles::GetStyleNameIndex()Luboš Luňák
ScMyDefaultStyles::FillDefaultStyles() calls this in a loop and compares with previous. Change-Id: Iba3420023e16c3091f4695640251a5525b28f467 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132199 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-03-29tdf#147906 change sqrt(a * a + b * b) occurences to std::hypot(a, b)Bartosz Kosiorek
Change-Id: Ic84899bf34f98382e6cc1ffc14310b1667279ee2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132214 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-29sw: document AbstractSwBreakDlgMiklos Vajna
AbstractSwBreakDlg is implemented by AbstractSwBreakDlg_Impl, which wraps an SwBreakDlg, a bit complex at first. Change-Id: I366bb16b13a6343a45d5538f79ddff729fe31acf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132241 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-03-29-Werror,-Wunused-but-set-variableStephan Bergmann
...ever since f47a9d9db3d06927380bb79b04bb6d4721a92d2b "initial import" Change-Id: I5ae9d757270c69003899a3eaf825acbfc48ea047 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-29qt a11y: Handle TABLE_MODEL_CHANGED eventMichael Weghorn
Note however, that as of now, this doesn't have any effect in practice, since `AtSpiAdaptor` for Linux in the Qt library currently just ignores `QAccessible::TableModelChanged` events instead of forwarding them as corresponding AT-SPI events. [1] [1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/linux/atspiadaptor.cpp?id=9a4c32cedda3a00e06eb3aed13a731d23f6c56d9#n1105 Change-Id: I6339d172da54bc30987bb9261ce37005ebce5501 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132222 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-03-29a11y: Drop unused, deprecated table model change event typesMichael Weghorn
All places that were previously emitting `AccessibleTableModelChangeType::INSERT` and `AccessibleTableModelChangeType::DELETE` events have been ported to emit the 4 new event types introduced in Change-Id I30821a5acafa4f3d1dafdfc219f3b4568d9a6e89, "a11y: Add new table model change types for row/col insertion/del" instead. Therefore, the handling of those events can be dropped from the gtk3 VCL plugin and for macOS's a11y listener as well. Also, drop the now completely unused constants from the IDL file as mentioned in Change-Id I30821a5acafa4f3d1dafdfc219f3b4568d9a6e89: > From a UNO API perspective, this change > and the final removal of the > `AccessibleTableModelChangeType::DELETE` > and `AccessibleTableModelChangeType::INSERT` > constants in a follow-up commit > should be unproblematic, because the > corresponding APIs have been unpublished in > > commit 70626249cd247d9acdad417b8eaf252bae22c059 > Date: Thu Nov 29 00:27:03 2012 +0100 > > API CHANGE a11y unpublishing and add/removeListener rename. Change-Id: I1c062e26481b916af882e301c5f911aba9550ea3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132221 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-03-29sc a11y: Fix + port events for row/col ins/delMichael Weghorn
Previously, incorrect indices were sent when inserting or deleting rows or columns from a Calc spreadsheet, e.g. when deleting rows 4 to 12 (i.e. rows with indices 3 to 11), the pyatspi script from Change-Id I30821a5acafa4f3d1dafdfc219f3b4568d9a6e89, "a11y: Add new table model change types for row/col insertion/del" would have this output: > object:row-deleted(12, 10, 0) > source: [table | Sheet Sheet1] > host_application: [application | soffice] > sender: [application | soffice] > object:column-deleted(0, 16384, 0) > source: [table | Sheet Sheet1] > host_application: [application | soffice] > sender: [application | soffice] i.e. LO would announce the deletion of all columns and the deletion of 10 rows, starting at index 12, which is obviously wrong. For the case where rows or columns have been deleted, the range in the update hint passed to `ScAccessibleSpreadsheet::Notify` is the spreadhseet range after the removed rows/columns; for the case where rows or columns have been inserted, the range in the update hint is from the first inserted row/column to the last row/column in the spreadsheet. So, calculate the indices of the actually inserted/deleted rows/columns from that. Also, switch to using the table model change event types introduced in the change mentioned above. With this in place, output of the Python script for the above case now is as expected (9 rows, starting at row index 3, have been deleted): > object:row-deleted(3, 9, 0) > source: [table | Sheet Sheet1] > host_application: [application | soffice] > sender: [application | soffice] Deletion of non-contiguous row/column ranges (e.g. deleting columns A to C and F to H) also results in the correct events getting sent, since `ScAccessibleSpreadsheet::Notify` gets called multiple times, once for each contiguous cell range. Change-Id: I6e61eb45f255741661b29efb72394029109d682e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132220 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-03-29sc a11y: OSL_ENSURE -> assertMichael Weghorn
Change-Id: I79f477c950e0aca75e2a6041c5fb6a78be4b07c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132219 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-03-29a11y: Use new table model change types for row/col ins/delMichael Weghorn
This ports most existing uses of the now deprecated `AccessibleTableModelChangeType::INSERT` and `AccessibleTableModelChangeType::DELETE` to emit events of the the four new table model change types added in Change-Id I30821a5acafa4f3d1dafdfc219f3b4568d9a6e89, "a11y: Add new table model change types for row/col insertion/del" instead, which among others fixes the a11y events that are sent on the platform level for gtk3 and macOS, s. commit message of the mentioned change for more details. From all I can see, `AccessibleGridControlTable::commitEvent` is just meant to handle removal of rows, not columns, so add a corresponding assert there. (See how only row-related a11y events are emitted in `svtools/source/table/tablecontrol_impl.cxx`, and the "columns aren't selectable" comment for `AccessibleGridControlTable::isAccessibleColumnSelected`. Given that the full range of rows would previously have been sent in the `AccessibleTableModelChangeType::DELETE` event for column removal, this should still have worked in practice, since this would have cleared the whole vector, and elements would have been inserted on demand as needed again later. However, if that should ever be needed in the future, it should be handled more explicitly.) The handling of sending events when rows or columns are inserted or deleted in a Calc spreadsheet is more fundamentally broken and will be handled in a separate commit. Change-Id: Icfd5e326143e8e90cc513e430bfabbba39e7bdc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132218 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-03-29a11y: Add new table model change types for row/col insertion/delMichael Weghorn
So far, there were two types/constants to use in an `AcessibleTableModelChange` event to indicate the insertion or deletion of rows and/or columns. From `offapi/com/sun/star/accessibility/AccessibleTableModelChangeType.idl`: > /** One or more rows and/or columns have been inserted. > > <p>Use the fields of the AccessibleTableModelChange > structure to determine the indices of the rows and/or columns that > have been inserted.</p> > */ > const short INSERT = 1; > > /** One or more rows and/or columns have been deleted. > > <p>The affected area of the table is stored in the fields of the > AccessibleTableModelChange structure.</p> > */ > const short DELETE = 2; From the documentation, it would be possible to indicate an insertion or deletion of both, rows and columns in a single event. However, there is no single instance where this is actually used to indicate the deletion/insertion of both, whole rows and whole columns at the same time. The way that indices are currently used is rather confusing and results in incorrect a11y events being sent on maOS as well as the gtk3 VCL plugin: When only rows are inserted, row indices are set as expected (index of the first and last inserted row), but the column indices are set to the first and last column in the table; i.e. the indices actually give the range of the newly inserted cell range, rather than just the indices of the rows that have been inserted. (The same applies the other way around when only columns are inserted.) That's not what I would have expected when reading the documentation. ("Use the fields of the AccessibleTableModelChange structure to determine the indices of the rows and/or columns that have been inserted.") In the same way, the range of deleted cells is set when emitting `AccessibleTableModelChangeType::DELETE` events. In this case, this can be seen as matching what the documentation says. ("The affected area of the table is stored in the fields of the AccessibleTableModelChange structure.") In any case, the way that the events are handled in the gtk3 VCL plugin and for macOS results in the emission of incorrect events, since those are handling such indices as if both, rows and columns had been inserted/deleted. Example for the gtk3 VCL plugin: Row with index 1 has been deleted from a table. -> an AccessibleTableModelChange event is sent with Type=AccessibleTableModelChangeType::DELETE FirstRow=1 LastRow=1 FirstColumn=0 LastColumn=<index of last column> This would then result in 2 AT-SPI events being emitted by the gtk3 VCL plugin: * one that indicates that row 1 has been deleted (OK) * another event that indicates that all columns have been deleted (NOT OK) Instead of changing the handling of the existing `AccessibleTableModelChangeType`s, introduce 4 new types to replace the existing ones that don't mix handling of rows and columns at the same time: one for row insertion, one for column insertion, one for row deletion, one for column deletion. This commit also adds handling for the newly added change types for macOS and the gtk3 VCL plugin on Linux. winaccessibility is unaffected because it doesn't have any handling specific to the change type. The qt5/qt6 VCL plugins don't yet have any handling for the `AcessibleTableModelChange` event yet (but that will be added in a follow-up commit). Existing uses of `AccessibleTableModelChangeType::INSERT` and `AccessibleTableModelChangeType::DELETE` will be migrated to use the new types in follow-up commits. From a UNO API perspective, this change and the final removal of the `AccessibleTableModelChangeType::DELETE` and `AccessibleTableModelChangeType::INSERT` constants in a follow-up commit should be unproblematic, because the corresponding APIs have been unpublished in commit 70626249cd247d9acdad417b8eaf252bae22c059 Date: Thu Nov 29 00:27:03 2012 +0100 API CHANGE a11y unpublishing and add/removeListener rename. The following Python script was used in follow-up commits to check that AT-SPI events with the expected indices are retrieved with the gtk3 VCL plugin after porting existing uses of `AccessibleTableModelChangeType::INSERT` and `AccessibleTableModelChangeType::DELETE`. #!/usr/bin/python3 import pyatspi def listener(e): try: if e.host_application.name != 'soffice': return except: return print(e) pyatspi.Registry.registerEventListener(listener, "object:row-inserted", "object:column-inserted", "object:column-deleted", "object:row-deleted") pyatspi.Registry.start() Change-Id: I30821a5acafa4f3d1dafdfc219f3b4568d9a6e89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132217 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-03-29sc: fix crash in SdrPageView::GetPageWindow()Aron Budea
From online crashreport: SIG Fatal signal received: SIGSEGV SdrPageView::GetPageWindow(unsigned int) const svx/source/svdraw/svdpagv.cxx:84 (anonymous namespace)::ScLOKProxyObjectContact::calculateGridOffsetForViewOjectContact(basegfx::B2DVector&, sdr::contact::ViewObjectContact const&) const sc/source/ui/view/gridwin4.cxx:1397 sdr::contact::ViewObjectContact::getGridOffset() const svx/source/sdr/contact/viewobjectcontact.cxx:463 sdr::contact::ViewObjectContact::getPrimitive2DSequence(sdr::contact::DisplayInfo const&) const include/basegfx/tuple/b2dtuple.hxx:81 sdr::contact::ViewObjectContact::getObjectRange() const svx/source/sdr/contact/viewobjectcontact.cxx:198 ScLOKProxyObjectContact::calculateGridOffsetForViewOjectContact() didn't check if PageWindowCount() was non-zero. Change-Id: I4a00b5b13a277d0805af3076150a952306908e53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132251 Tested-by: Jenkins Reviewed-by: Aron Budea <aron.budea@collabora.com>
2022-03-29sc: set default parameters in SparklineGroupTomaž Vajngerl
The colors are set to COL_TRANSPARENT except for the series color, which is set to COL_BLUE by default. Other parameters are set to their default values according to OOXML specs. Change-Id: I67ceab2ffd723511fbf0616cca661992f0a8cf69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131920 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-03-29sc: refactor sparkline struture to store a list of sparklinesTomaž Vajngerl
We need to access a list of sparklines and sparkline groups for a sheet. To preven going through all the columns of a sheet, we need to store all the created sparklines in a list. For this it is necessary to change the model structrue a bit. A cell now has a container that stores a shared_ptr to the sparkline instead of storing the sparkline directly. With this we can store a list of weak_ptr to the sparklines in a list (vector), which can be accessed at any time and is quite fast. This is needed by the OOXML export. Change-Id: Iaca0a41e20912775f072ea6e8cab9c44367d6f30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131919 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-03-29Colibre: Add some inner shapesRizal Muttaqin
Change-Id: Ic383567a3274d59f9208130adbc2b278fb3de6a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132246 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2022-03-29Colibre: Simplify db related icons, update filter iconsRizal Muttaqin
Change-Id: I888cb880a7dd17de63b86517b1d968be1e081d6a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132247 Tested-by: Jenkins Tested-by: Rizal Muttaqin <rizmut@libreoffice.org> Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2022-03-28-Werror,-Wunused-but-set-variableStephan Bergmann
...since 777e3930a1e85b9bc97c1852b09802fc389c5e2d "Move the code for "fill simple" to its own method." Change-Id: Iea240530696b89f56fba314b599e7cd43ce6a780 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132231 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-28-Werror,-Wunused-but-set-variableStephan Bergmann
...ever since bc712935a05dd34142b4c17dd6686761d9b9d5e1 "TableRef: refresh table column names before saving" Change-Id: I7537fa3632ff03f73d36eaf9fc6ba0ab73319cab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132232 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-28-Werror,-Wunused-but-set-variableStephan Bergmann
...ever since d9dd003f63a781e63bfbe380ea737e080c21881f "tdf#143103 Support Color Filter in 'Standard Filter' dialog" Change-Id: I04441f4d812e3598b5b91e3bf915315a11ab6e67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132233 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-28-Werror,-Wunused-but-set-variableStephan Bergmann
...since df50b02cd3177570bb26484a03273ba5caa50037 "weld ScFilterListBox" Change-Id: I02e835bb9de373fea7891babbce5eec605455198 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132234 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-28-Werror,-Wunused-but-set-variableStephan Bergmann
...ever since c97f9af5e47ea234ad709a1f66c1e8ed20640066 "tdf#129708 speed-up: reuse enumeration for each effect" Change-Id: Ice1a613676f25e3a63a3479548538d33f1b5ee47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132236 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-28-Werror,-Wunused-but-set-variableStephan Bergmann
...ever since 24da580f8bd0a348fee64c07f9015b09918f8388 "95584#; add RangeId to have the draw ranges unique" Change-Id: I60e98b9645eb4acb2d3d4e47ada81c976e43a424 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132235 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-28-Werror,-Wunused-but-set-variableStephan Bergmann
...which was apparently meant as a "Possible debugger breakpoint" in DBG_UTIL-only sw_DebugRedline. The obvious fix is to mark nDummy as volatile, but increment of a volatile variable is deprecated, so replace those with reads of the variable, but which triggered false loplugin:casttovoid so fix that too. Change-Id: I07376e665caa4fd9befaba06d261a50df7a63a10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132237 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-28-Werror,-Wunused-but-set-variableStephan Bergmann
...since db51589575d37ca608067ad9904dcc6a09651e8c "Convert SVARRAY SORT into STL set" Change-Id: I50384d67252965beb46a9dad5a30df835188f3a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132238 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-28-Werror,-Wunused-but-set-variableStephan Bergmann
...since fa44673e154ed4fb0b518b8850e2f6e4b9069531 "bnc#885548: Adjust xlsx export of revisions to get it to work in Excel." Change-Id: I4e9c8d176cc5bd3ff1f374fcbcf16c738ebf2388 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132240 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-28-Werror,-Wunused-but-set-variableStephan Bergmann
...since 376cc3ea0fc2e0f209763a2a27c5852136332c86 "dbaccess: delete old paste autoincrement logic" Change-Id: I4ffa3ffbcc1b80091a4a3449362766334b31c5af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132229 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>