Rebased ref, commits from common ancestor:
commit cdbb588dce1448eeb5d099e24eae781cbba4578f
Author: Andras Timar <[email protected]>
AuthorDate: Fri Feb 7 14:27:59 2025 +0100
Commit: Andras Timar <[email protected]>
CommitDate: Sat Feb 8 10:03:53 2025 +0100
Respect document specific settings – cool#11103
The purpose of this CheckConfigOptions function is to reset
formula separators, when there is a clash with decimal separator.
However, ignoring other settings that are coming from the document
can cause issues, like that we saw with LOKit, where
StringRefAddressSyntax of a German XLSX document was reset to default
CONV_UNSPECIFIED, and function =INDIREKT("Sheet1!A1") which was
according to CONV_XL_A1 stopped working, and gave error #BEZUG (#REF).
Change-Id: I7693deed436ad4e54569a21cc3faeaafceeb459c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181250
Tested-by: Jenkins CollaboraOffice <[email protected]>
Reviewed-by: Andras Timar <[email protected]>
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index 0e147f14c3fe..d9ab7e78354b 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -491,6 +491,7 @@ void ScDocShell::CheckConfigOptions()
// One of arg separators conflicts with the current decimal
// separator. Reset them to default.
ScFormulaOptions aNew = rOpt;
+
aNew.GetCalcConfig().MergeDocumentSpecific(m_pDocument->GetCalcConfig());
aNew.ResetFormulaSeparators();
SetFormulaOptions(aNew);
pScMod->SetFormulaOptions(aNew);
commit 22af804836df3fc1827a2a08b2c91bd76b740177
Author: Miklos Vajna <[email protected]>
AuthorDate: Thu Feb 6 08:35:33 2025 +0100
Commit: Andras Timar <[email protected]>
CommitDate: Sat Feb 8 10:03:21 2025 +0100
writerfilter: fix crash in DomainMapperTableHandler::endTable()
Crashreport signature:
/opt/rh/devtoolset-12/root/usr/include/c++/12/bits/stl_stack.h:234:
std::stack<_Tp, _Sequence>::reference std::stack<_Tp, _Sequence>::top() [with
_Tp = writerfilter::dmapper::TextAppendContext; _Sequence =
std::deque<writerfilter::dmapper::TextAppendContext,
std::allocator<writerfilter::dmapper::TextAppendContext> >; reference =
writerfilter::dmapper::TextAppendContext&]: Assertion '!this->empty()' failed.
SIG Fatal signal received: SIGABRT code: 18446744073709551610 for
address: 0x7300004d65
program/libwriterfilterlo.so
writerfilter::dmapper::DomainMapper_Impl::GetTopTextAppend()
/opt/rh/devtoolset-12/root/usr/include/c++/12/bits/stl_stack.h:234
program/libwriterfilterlo.so
writerfilter::dmapper::DomainMapperTableHandler::endTable(unsigned
int)
workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/text/XTextAppendAndConvert.hpp:23
program/libwriterfilterlo.so
writerfilter::dmapper::TableManager::resolveCurrentTable()
include/tools/ref.hxx:56
program/libwriterfilterlo.so
writerfilter::dmapper::TableManager::endLevel()
writerfilter/source/dmapper/TableManager.cxx:461
It seems the trouble is that DomainMapperTableHandler::endTable() calls
GetTopTextAppend() unconditionally, which asserts that the text append
stack is non-empty. GetCurrentXText() already check if this stack is
empty, so use that to check for emptyness and only then get the top of
the stack. Later DomainMapperTableHandler::endTable() already checks if
xTextAppendAndConvert is an empty reference or not.
Change-Id: Ibb377cb03f8beaed9b3c9d45e322c8ad1f9d26c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181205
Tested-by: Jenkins CollaboraOffice <[email protected]>
Reviewed-by: Caolán McNamara <[email protected]>
Tested-by: Caolán McNamara <[email protected]>
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 5ebe9c8b77a9..6cc69a01a83a 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -1660,7 +1660,11 @@ void DomainMapperTableHandler::endTable(unsigned int
nestedTableLevel)
sal_Int32 nTableWidthType = text::SizeType::FIX;
m_aTableProperties->getValue(TablePropertyMap::TABLE_WIDTH_TYPE,
nTableWidthType);
// m_xText points to the body text, get the current xText from
m_rDMapper_Impl, in case e.g. we would be in a header.
- uno::Reference<text::XTextAppendAndConvert>
xTextAppendAndConvert(m_rDMapper_Impl.GetTopTextAppend(), uno::UNO_QUERY);
+ uno::Reference<text::XTextAppendAndConvert> xTextAppendAndConvert;
+ if (m_rDMapper_Impl.GetCurrentXText())
+ {
+ xTextAppendAndConvert.set(m_rDMapper_Impl.GetTopTextAppend(),
uno::UNO_QUERY);
+ }
uno::Reference<beans::XPropertySet> xFrameAnchor;
// Writer layout has problems with redlines on floating table rows
in footnotes, avoid