summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-05-25sw: language fallback in MSWordExportBase::GetNumberFormat()feature/cib_contract3753Michael Stahl
There is this number format: <number:date-style style:name="N36" number:automatic-order="true"> <number:day number:style="long"/> <number:text>.</number:text> <number:month number:style="long"/> <number:text>.</number:text> <number:year number:style="long"/> </number:date-style> in a paragraph which has fo:language="zxx", so the field has LANGUAGE_NONE. MSWordExportBase::GetNumberFormat() exports as: DATE \@"dd/MM/yyyy" But should be: DATE \@"dd.MM.yyyy" Follow Eike's suggestion to use the number format's language in case the field doesn't have one. Change-Id: I596bea5daa75c717931b3c5d5506103b87b8ee08
2022-05-25Revert "svl: SvNumberformat::GetMappedFormatstring() vs. LANGUAGE_DONTKNOW"Michael Stahl
This reverts commit 712b7e578292e521c64e6de117dbf7d11e38ba7a.
2022-05-20svl: SvNumberformat::GetMappedFormatstring() vs. LANGUAGE_DONTKNOWMichael Stahl
There is this number format: <number:date-style style:name="N36" number:automatic-order="true"> <number:day number:style="long"/> <number:text>.</number:text> <number:month number:style="long"/> <number:text>.</number:text> <number:year number:style="long"/> </number:date-style> MSWordExportBase::GetNumberFormat() exports as: DATE \@"dd/MM/yyyy" But should be: DATE \@"dd.MM.yyyy" The problem is that with LANGUAGE_DONTKNOW, the available LocaleDataWrapper can't be considered reliable, so prefer to use the existing separator string in this case. Change-Id: I596bea5daa75c717931b3c5d5506103b87b8ee08
2022-05-19svx: fix double-free if SvxShape of SwDrawVirtObj is disposedMichael Stahl
First SvxShape::dispose() deletes it, then ~SwDrawFrameFormat() via ~SwDrawContact() calls SwDrawContact::RemoveAllVirtObjs() and deletes it again. Back in 2009, CWS dba32 (60698c8a619f219129dbeac7da1f962f3fa63f6a) added this OSL_ENSURE, let's actually try to fix this now. Change-Id: I5c391aa425aa75fb87cecccbf9e41c9f90196f9f
2022-04-12sw: DOCX export: For JumpEdit fields, don't write "temporary" elementMichael Stahl
The "showingPlcHdr" remains but now the SDT won't be removed after editing. Change-Id: Id7b94ef590b1871477afc168be3915e9d379f4bb
2022-02-15tdf#146848 sw: fix assert about input field in undo nodesMichael Stahl
These should not be updated. soffice.bin: sw/source/core/txtnode/atrfld.cxx:713: void SwTextInputField::UpdateTextNodeContent(const rtl::OUString&): Assertion `IsFieldInDoc() && "<SwTextInputField::UpdateTextNodeContent(..)> - misusage as Input Field is not in document content."' failed. 3 SwTextInputField::UpdateTextNodeContent(rtl::OUString const&) 4 SwTextInputField::NotifyContentChange(SwFormatField&) at sw/source/core/txtnode/atrfld.cxx:669 5 SwTextField::ExpandTextField(bool) const 6 SwFormatField::UpdateTextNode(SfxPoolItem const*, SfxPoolItem const*) at sw/source/core/txtnode/atrfld.cxx:407 7 SwFormatField::SwClientNotify(SwModify const&, SfxHint const&) 10 SwFieldType::UpdateFields() (this=0x7f7ff2d654b0) at sw/source/core/fields/fldbas.cxx:220 11 sw::DocumentFieldsManager::UpdateFields(bool) 12 SwFEShell::Paste(SwDoc&, bool) at sw/source/core/frmedt/fecopy.cxx:1117 Somehow this causes testTdf139843 to go from 7 to 6 pages, but opening the bugdoc shows it as 6 pages too, not sure what's going on there. Change-Id: Ie25b2b2c4d8fd262850da31cbade5e121e9ec361 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129919 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 71e8a947753d359bd5b4d1174f4d6332eaf4a309)
2022-02-14gdb: BigPtrArrayPrinter gets confused by libstdc++ std::unique_ptrMichael Stahl
It looks like this in libstdc++: <BigPtrArray> = { m_ppInf = { _M_t = { <std::__uniq_ptr_impl<BlockInfo*, std::default_delete<BlockInfo* []> >> = { _M_t = { <std::_Tuple_impl<0, BlockInfo**, std::default_delete<BlockInfo* []> >> = { <std::_Tuple_impl<1, std::default_delete<BlockInfo* []> >> = { <std::_Head_base<1, std::default_delete<BlockInfo* []>, true>> = { _M_head_impl = {<No data fields>} }, <No data fields>}, <std::_Head_base<0, BlockInfo**, false>> = { _M_head_impl = 0x567fd20 }, <No data fields>}, <No data fields>} }, <No data fields>} }, Note there are 2 _M_head_impl members, and somehow gdb 11.1-2.fc34 picks the wrong one. A manual cast to std::_Head_base<0, BlockInfo**, false> seems to help. Change-Id: I1332c2fc6eb2661d417fd92a73aed977bbb1dcea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126220 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit c9267ca4fa7fa94a1bf79320bec54428a6ad4804)
2022-02-14Fix Python deprecation warningsStephan Bergmann
I noticed these "DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working" now when running tests with CPPUNITTRACE='gdb --args' on Fedora 32. Change-Id: If263dacb9df5c1fffd2be2418e13e69b96070c77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103294 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-02-14desktop: rr --ignore-nested was renamed to --nested=ignoreMichael Stahl
Change-Id: Id1c1789c24b8eec27db0b24e1e43e2eb7d562509 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106291 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins (cherry picked from commit 1ab938155c875e65470b9f6b3b3ef65885462f7a)
2022-02-14Fix gpgmepp build with glibcMike Kaganski
posix-io.c: In function '_gpgme_io_spawn': posix-io.c:492:23: error: void value not ignored as it ought to be 492 | while ((i = closefrom (fd)) && errno == EINTR) | ^ make[1]: *** [Makefile:964: posix-io.lo] Error 1 Change-Id: I0e7abc33200ca7436c72e925447e681fd241c6a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123259 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126265 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126561 Tested-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126926
2022-02-14Adapt to hamcrest-2.2-3.fc35.noarch.rpmStephan Bergmann
Change-Id: Ibddfc30a5f0828ab77235ec1155f1c2e1eef24ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116506 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit e6c25186c8584f68b5f8074004556bd855200fff)
2022-01-13sw: DOCX export: don't export numPr to style, but only...Michael Stahl
... if the outline level doesn't have numbering. This should fix the originally reported vague problem, in case it really is a problem. Change-Id: I12a7bc4cd9455e84b596b8e403421f04a515d393
2022-01-13Revert "sw: DOCX export: don't export numPr to style from outline numrule"Michael Stahl
This reverts commit b6b63c7ce92f7cc830593dbdd639cfde4951b971. This doesn't work if there actually is numbering. Change-Id: I9a801d92d70733c13deaca1d624cb3cc60d43ac2
2022-01-12tdf#133065 tdf#133602 DOCX export: fix OLE wrap regressionAttila Bakos
caused by commit 2150fdc7d0f63288ac56c33cb898589512057642 (tdf#131539 DOCX export: fix position of OLE objects). The wrap setting of the anchored OLE object were not preserved. Note: It needs also z-order export for background mode. Co-authored-by: Tibor Nagy Change-Id: I7f8c48019157dda00bcc97a490c5f582eccf1b22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94220 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 4bdff3c731a9f8ef11ffdae804a99a47f119ee50)
2022-01-12tdf#133035 DOCX export: fix position of unnamed OLEAttila Bakos
Position export depended on OLE object names, instead of the type of anchoring. Follow-up of commit 2150fdc7d0f63288ac56c33cb898589512057642 (tdf#131539 DOCX export: fix position of OLE objects). Co-authored-by: Tibor Nagy (NISZ) Change-Id: Ib98a19cb012047f37a5830c81541ef00c55589dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94190 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 45fe51bca2ab534cfe1139b734d839728225d6d9)
2022-01-12tdf#131539 DOCX export: fix position of OLE objectsAttila Bakos
Keeping position of OLE objects anchored to text as a character. Co-developer: Tibor Nagy (NISZ) Change-Id: I9699250ae5c418f9994ea2a7a3b102681b042214 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91983 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 2150fdc7d0f63288ac56c33cb898589512057642)
2021-11-19sw: DOCX export: use list's indent if paragraph is not countedMichael Stahl
Writer/ODF has a feature to have paragraphs in a list without having a list label, but they do take the indent of the list level into account. Word doesn't appear to have this feature, so the export forces such paragraphs to refer to a non-existent numId 0, so they are not part of a list. Take the left indent from the list level and write it into the pPr. Change-Id: I8ad56e51e2d4dfd691e3c38532f1a824f5276fd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125555 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit a8beb8c08886ac6eef7fcc6a8881a77156e05d4e)
2021-11-09tdf#128290 add tblLayout element to docx exportLouis Meyrat
This will disable the automatic table width feature of MS Word, which does not exist in LO. Now, tables in LO-generated docx have the same column width in MS Word Change-Id: I955c8e5667376475e7c41e3b74d88e3513fec561 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86671 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 8be3ae254f5b2ff76d9861ad4b9b5b5de5d14bb4)
2021-08-23tdf#140437 ODF import: fix for broken documents with field code as typeMichael Stahl
Not sure how old the bug that caused this and which filter it was originally but currently the Word import filters don't do that any more. This causes an exception since commit dd24e21bb4f183048a738314934fc3f02ec093f1 so try to fix it up. Change-Id: I087586054ebd5698ed8e8a4054869df202226e92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111345 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit d62c93a831080ef332e416dc78f5600c2c5b9850) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111318 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 3a1c4dc5887eee7313fe3f6cb20202df89ac5457)
2021-08-23Adapt to "libstdc++: Implement LWG 1203 for rvalue iostreams"Stephan Bergmann
<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=aa475c4ac80733f85ba47b109fc1900f05e810e2> towards GCC 12, so that now "the return type is the original rvalue stream type not its base class." (And which would thus have caused issues like > sfx2/source/control/bindings.cxx:1323:19: error: dynamic_cast from rvalue to reference type '::std::ostringstream &' (aka 'basic_ostringstream<char> &') > ? SAL_STREAM("File: " << pFile << " Line: " << nLine) : "")); > ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/sal/log.hxx:198:6: note: expanded from macro 'SAL_STREAM' > (dynamic_cast< ::std::ostringstream & >(::std::ostringstream() << stream).str()) > ^ > include/sal/log.hxx:341:20: note: expanded from macro 'SAL_INFO' > SAL_WHERE, stream) > ~~~~~~~~~~~^~~~~~~ > include/sal/log.hxx:155:68: note: expanded from macro 'SAL_DETAIL_LOG_STREAM' > SAL_DETAIL_LOG_STREAM_PRIVATE_(level, area, where, stream); \ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ > include/sal/log.hxx:133:45: note: expanded from macro 'SAL_DETAIL_LOG_STREAM_PRIVATE_' > ::sal::detail::StreamStart() << stream) == 1) \ > ^~~~~~ now. While the issue with old libstdc++ that originally prompted the dynamic_cast was > sfx2/source/control/bindings.cxx:1323:19: error: no member named 'str' in 'std::basic_ostream<char>' > ? SAL_STREAM("File: " << pFile << " Line: " << nLine) : "")); > ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > include/sal/log.hxx:194:40: note: expanded from macro 'SAL_STREAM' > (::std::ostringstream() << stream).str() > ^ > include/sal/log.hxx:336:20: note: expanded from macro 'SAL_INFO' > SAL_WHERE, stream) > ~~~~~~~~~~~^~~~~~~ > include/sal/log.hxx:155:68: note: expanded from macro 'SAL_DETAIL_LOG_STREAM' > SAL_DETAIL_LOG_STREAM_PRIVATE_(level, area, where, stream); \ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ > include/sal/log.hxx:133:45: note: expanded from macro 'SAL_DETAIL_LOG_STREAM_PRIVATE_' > ::sal::detail::StreamStart() << stream) == 1) \ > ^~~~~~ .) The libstdc++ macro _GLIBCXX_RELEASE is reportedly available since GCC 7.1. Change-Id: I1ee6eabb66355c1f28b9d305cbd85bac50d6b0e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115121 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 1f3dddd6f21d91c429190ae314dadeec409f35f4, plus follow-up 95e26d3dce4f5a3b2d010d5ca47b4e450905a100 "tdf#142326: Adapt to 'libstdc++: Implement LWG 1203 for rvalue iostreams'") Change-Id: I7c8fef25e15fcfa9b83924467dc86dc2957fbd7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116447 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 428206c3c1c54d01435cf4e4a07174cfbd567335)
2021-07-02sw: handle RANGE_IS_SECTION in SwXTextRange::getText()Michael Stahl
It always returned null. This was missing in 6471d88cb8b61741c51499ac579dd16cb5b67ebf Change-Id: Ibf34c24fdbbbc2f65c6948f58d12f257ccf120ae
2021-07-02Missing include (for std::min)Stephan Bergmann
Change-Id: I44eebee0149d7e890aeff715dd7ae0005c45378d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109179 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit e24cc814b5b6e50967116cb3908e4bf56b7aee4b)
2021-07-02include cstddef for gcc11Jeff Law
Change-Id: I2f845ce9bb660ad6c1eea80ea81dd71add2c0db1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107191 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 8830cf86b146b1252ac37f351a23246088d569b0)
2021-07-02odk: build examples with GCC with explicit -std=c++11Michael Stahl
GCC 11 defaults to -std=c++17, which doesn't support exception specifications any more. ddcc98fa50dd9d86a60dada4daa00f4d95ffe005 seems a bit large to backport. Change-Id: I74a182435b268be8fd7a9ff0be9f404122108b51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115505 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-07-02gbuild: work around GDB 10 bug with DWARF5 in split debug infoMichael Stahl
GCC 11 defaults to -gdwarf-5 and GDB can only read it if -gsplit-dwarf isn't used. Dwarf Error: wrong unit_type in compilation unit header (is DW_UT_split_compile (0x05), should be DW_UT_type (0x02)) [in module /workdir/CObject/desktop/source/app/main.dwo] https://sourceware.org/bugzilla/show_bug.cgi?id=27354 https://bugzilla.redhat.com/show_bug.cgi?id=1956475 Change-Id: Ie2ac7193a29a8f257cf6f1d711f9fa6941df48ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115054 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit dc8c8a4aa20ddd3139a25d5c052cac9bae944cb8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115193 Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 626ea4e62a3e5005fe9825923a1c0c5bdb61cc08) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115504 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-07-02external/libwpd: Missing include for size_tStephan Bergmann
...as now reported when building with recent trunk GCC/libstdc++ on Linux: > In file included from WPXContentListener.cpp:26: > In file included from ./WPXContentListener.h:29: > ./WPXTable.h:56:31: error: unknown type name 'size_t'; did you mean 'std::size_t'? > const WPXTableCell *getCell(size_t i, size_t j) > ^~~~~~ > std::size_t Change-Id: Ic20240f01c7b0305cb87ababf53a3aaf66072d61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105324 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 8d378abf1de0a47517427c086da26588f846592a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115000 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 524cfb93d4033917ad20c718d538235078d068d5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115503 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-07-02exteranl/coinmp: Fix build with recent GCC 11 trunkStephan Bergmann
It had started to fail for me now with > ~/gcc/trunk/inst/bin/g++ -DHAVE_CONFIG_H -I. -I. -O -MT CoinFinite.lo -MD -MP -MF .deps/CoinFinite.Tpo -c CoinFinite.cpp -fPIC -DPIC -o .libs/CoinFinite.o > CoinFinite.cpp: In function 'bool CoinFinite(double)': > CoinFinite.cpp:38:19: error: 'DBL_MAX' was not declared in this scope > 38 | return val != DBL_MAX && val != -DBL_MAX; > | ^~~~~~~ > CoinFinite.cpp:8:1: note: 'DBL_MAX' is defined in header '<cfloat>'; did you forget to '#include <cfloat>'? > 7 | #include "CoinUtilsConfig.h" > +++ |+#include <cfloat> > 8 | because of a missing -DCOINUTILS_BUILD. Which in turn was caused by workdir/UnpackedTarball/coinmp/CoinUtils/configure (see workdir/UnpackedTarball/coinmp/CoinUtils/config.log), which first tries to determine an ac_declaration that would apparently be a suitable declaration of `exit` without actually including <stdlib.h> in a C++ file. It settles on > configure:3551: ~/gcc/trunk/inst/bin/g++ -c -g -O2 conftest.cc >&5 > conftest.cc:15:17: warning: 'void std::exit(int)' has not been declared within 'std' > 15 | extern "C" void std::exit (int) throw (); using std::exit; > | ^~~ > <built-in>: note: only here as a 'friend' > configure:3557: $? = 0 (which generates a warning, but no error with the given g++ invocation). The determined ac_declaration value is then included in confdefs.h, causing the later > configure:4014: ~/gcc/trunk/inst/bin/g++ -o conftest -O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long -DCOINUTILS_BUILD -Wl,-z,origin -Wl,-rpath,\$$ORIGIN conftest.cc >&5 > conftest.cc:15:17: error: 'void std::exit(int)' has not been declared within 'std' > 15 | extern "C" void std::exit (int) throw (); using std::exit; > | ^~~ > <built-in>: note: only here as a 'friend' > configure:4020: $? = 1 > configure: failed program was: > | /* confdefs.h. */ > | > | #define PACKAGE_NAME "CoinUtils" > | #define PACKAGE_TARNAME "coinutils" > | #define PACKAGE_VERSION "2.9.11" > | #define PACKAGE_STRING "CoinUtils 2.9.11" > | #define PACKAGE_BUGREPORT "http://projects.coin-or.org/CoinUtils" > | #define COINUTILS_VERSION "2.9.11" > | #define COINUTILS_VERSION_MAJOR 2 > | #define COINUTILS_VERSION_MINOR 9 > | #define COINUTILS_VERSION_RELEASE 11 > | #define COIN_COINUTILS_VERBOSITY 0 > | #define COIN_COINUTILS_CHECKLEVEL 0 > | #ifdef __cplusplus > | extern "C" void std::exit (int) throw (); using std::exit; > | #endif > | /* end confdefs.h. */ > | > | int > | main () > | { > | int i=0; i++; > | ; > | return 0; > | } > configure:4045: WARNING: The flags CXXFLAGS="-O3 -pipe -DNDEBUG -pedantic-errors -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long -DCOINUTILS_BUILD" do not work. I will now just try '-O', but you might want to set CXXFLAGS manually. to fail, because its g++ invocation including -pedantic-errors turns that > 'void std::exit(int)' has not been declared within 'std' warning into an error. There were similar build failures in the Cgl, > ~/gcc/trunk/inst/bin/g++ -DHAVE_CONFIG_H -I. -I. -I~/lo/core/workdir/UnpackedTarball/coinmp/CoinUtils/src -DCOIN_HAS_CLP -O -MT ClpCholeskyDense.lo -MD -MP -MF .deps/ClpCholeskyDense.Tpo -c ClpCholeskyDense.cpp -fPIC -DPIC -o .libs/ClpCholeskyDense.o > In file included from ClpCholeskyDense.cpp:11: > ClpHelperFunctions.hpp:16:4: error: #error "don't have header file for math" > 16 | # error "don't have header file for math" > | ^~~~~ > In file included from ClpCholeskyDense.cpp:11: > ClpHelperFunctions.hpp: In function 'double CoinSqrt(double)': > ClpHelperFunctions.hpp:81:13: error: 'sqrt' was not declared in this scope > 81 | return sqrt(x); > | ^~~~ and Clp, > ~/gcc/trunk/inst/bin/g++ -DHAVE_CONFIG_H -I. -I. -I.. -I./.. -I./../CglGomory -I~/lo/core/workdir/UnpackedTarball/coinmp/CoinUtils/src -I~/lo/core/workdir/UnpackedTarball/coinmp/Osi/src/Osi -I~/lo/core/workdir/UnpackedTarball/coinmp/CoinUtils/src -I~/lo/core/workdir/UnpackedTarball/coinmp/Clp/src/OsiClp -I~/lo/core/workdir/UnpackedTarball/coinmp/Clp/src -I~/lo/core/workdir/UnpackedTarball/coinmp/CoinUtils/src -I~/lo/core/workdir/UnpackedTarball/coinmp/Osi/src/Osi -O -MT CglLandPValidator.lo -MD -MP -MF .deps/CglLandPValidator.Tpo -c CglLandPValidator.cpp -fPIC -DPIC -o .libs/CglLandPValidator.o > CglLandPValidator.cpp: In member function 'int LAP::Validator::cleanCut(OsiRowCut&, const double*, const OsiSolverInterface&, const CglParam&, const double*, const double*)': > CglLandPValidator.cpp:66:22: error: 'fabs' was not declared in this scope; did you mean 'labs'? > 66 | double val = fabs(elems[i]); > | ^~~~ > | labs > CglLandPValidator.cpp: In member function 'int LAP::Validator::cleanCut2(OsiRowCut&, const double*, const OsiSolverInterface&, const CglParam&, const double*, const double*)': > CglLandPValidator.cpp:189:23: error: 'fabs' was not declared in this scope; did you mean 'labs'? > 189 | double smallest = fabs(rhs); > | ^~~~ > | labs subdirectories, and which happened to get solved by the same approach of removing problematic ac_declaration values from configure. I am not sure what all that magic of determining that ac_declaration value is supposed to be good for. There appears to be no trace of it in the corresponding configure.ac sources, so it likely was automatically added by some dated autotools (all three configure files mention "Generated by GNU Autoconf 2.59"). At least on a cursory look, the determined ac_declaration appears to only be used in configure itself, and not leak into the actual coinmp build stage, so dropping the problematic ac_declaration values is hopefully harmless. These three subdirectories were all that failed for me, but there might still be silent issues in other subdirectories when a problematic ac_declaration value would negatively affect other configure checks. (An alternative approach could be to regenerate all the configure files from their configure.ac sources with a recent autotools. But at least some of the existing external/coinmp/*.patch* already change such configure files, which would need to be adapted.) Change-Id: I0a33b0f654800e8288d3ca28e26a64efc23a3f6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103756 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 762aacc4e055fffbc605be81f66f2274dccb4be8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114999 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 802b76340082e817efe67a5be4a021cb998a28a2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115502 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-07-02external/coinmp: C++17 no longer supports "register"Stephan Bergmann
...and GCC 11 trunk g++ now defaults to C++17, so compilation started to fail with that compiler Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99082 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit ad607d898f9826c6fa144783c93541a10ad4740c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114998 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 656085bf2757437a088058871573385ff45f8ef5) Change-Id: I792e4c7ff59ad88e5571163d5b2362fdb349667d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115501 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-07-02external/liborcus: Missing includesStephan Bergmann
...as seen with recent GCC 11 trunk libstdc++: > orcus_xlsx.cpp: In function ‘size_t orcus::{anonymous}::get_schema_rank(orcus::schema_t)’: > orcus_xlsx.cpp:313:59: error: incomplete type ‘std::numeric_limits<long unsigned int>’ used in nested name specifier > 313 | return it == rank_map.end() ? numeric_limits<size_t>::max() : it->second; > | ^~~ etc. Change-Id: If92cfb565ed9344b2ec1403793d7aeff8bd019ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104074 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit a9976a958b2857e308c6598532151878615bfd9f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114997 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit eaa9f84465eb330aa4c68711e8c8ec609503c5d3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115500 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-04-16bestFitOpenSymbolToMSFont() disable OpenSymbol replacementMichael Stahl
Change-Id: Ia30d52bc2f04de8dbdde0a773834b224447877d0
2021-04-16gbuild: don't use -Wunused-macros with sccacheMichael Stahl
In at least soltools, jurt and gperf generated files, build with GCC and sccache 0.2.16-alpha.0 reports spurious -Werror=implicit-fallthrough= due to comments and these go away by configuring sccache with rewrite_includes_only = true. But his results in cc1: error: ‘-fdirectives-only’ is incompatible with ‘-Wunused-macros’ so disable that like for clang-with-icecream builds. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111716 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 6fb9f368c6824a8ff7bc5bc5cf66fc2df7d055b7) Change-Id: I6dec38e86aa6e22591d7a700a8daddf3fed88b16
2021-03-10sw: DOCX export: put fly before fieldmark start into its own runMichael Stahl
If a fly starts at the same position as a CH_TXT_ATR_FIELDSTART, it is anchored before the field, and written in OutFlys() before the field is written in EndRun(), but the DOCX export reorders things in confusing ways. StartField_Impl() and CmdField_Impl() will actually end the current run (after putting the field char in it) and start a new one. So do something similar in this situation and create a new run if flys have been processed. Restrict this extra run to when there is actually a fly, because otherwise a dozen tests break; this requires a new FLY_NONE result for OutFlys() because FLY_PROCESSED is returned even if there are no flys. Change-Id: Id469c53d07eacad3992c7c0e451ab3756e02c8fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112267 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 3eced2d52415abeac266804ab682bee022322a19)
2021-02-22oox: VML export: write o:allowincell attribute on shapesMichael Stahl
Apparently the default is "t", which causes a fly that is anchored at-page with the first content on the page being a table to be wrongly positioned. Change-Id: Iba1b961c6e884b2a55928952937187732ef73a5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111336 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 60b61fdaf85cecea0f972fc435530ee5d7492c98)
2021-02-08oox: prefix VML shapetype ids with _x0000_tMichael Stahl
Word 2013 refuses to even load a file that has a <v:shapetype id="shapetype_75"> on some form control shape, reporting a misleading error in a location far later when the top-level w:tbl that contains the shape ends. Using id="_x0000_t75" appears to work, so let's do that then. Couldn't find any documentation on why this is so. Change-Id: Ie22bb04244e24b00a1880544872ae8e281422405 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110493 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 560f9bac4c1ee1b044efc55af8d532e9efefd313)
2021-02-04sw: fix copying and deleting of table in section via APIMichael Stahl
This is a follow-up to 7ab349296dac79dad3fec09f60348efcbb9ea17e. The first problem was that tables that contain protected cells refused to be deleted, which caused an infinite loop in SwXTextRange::DeleteAndInsert(). This also affected SwXTextTable::dispose(), and DDE tables. Fix this by forcibly deleting even protected cells from UNO APIs; protection is an UI feature. The second problem was that pasting the table SwFEShell::Paste() would set up aCpyPam so that it selects from the start node of the table to the last text node in the table, excluding the table cell and table end nodes, which caused: DocumentContentOperationsManager.cxx:3548: An insufficient number of nodes were copied! Fix this by setting up aCpyPam over the entire body section of the clipboard document. Change-Id: I8c6caee5e75260dff79f106efc11f9669feddc0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110411 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit c598e0accf24e149520a22a8c062249f147844c7)
2021-02-04avoid -Werror=unused-variableMichael Stahl
Change-Id: I5002ca7411d0d9f85b95af864d5cf3dcd201c34c
2021-02-04Avoid -Werror=nonnull with glibc-headers-x86-2.32-1.fc33.noarchStephan Bergmann
...on Fedora 33: > ~/lo/core/vcl/unx/generic/app/i18n_cb.cxx: In function ‘void Preedit_InsertText(preedit_text_t*, XIMText*, int)’: > ~/lo/core/vcl/unx/generic/app/i18n_cb.cxx:149:34: error: argument 1 is null but the corresponding size argument 3 value is 1024 [-Werror=nonnull] > 149 | size_t nBytes = wcstombs ( nullptr, pWCString, 1024 /* don't care */); > | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In file included from ~/gcc/trunk/inst/include/c++/11.0.0/cstdlib:75, > from ~/lo/core/include/sal/log.hxx:15, > from ~/lo/core/vcl/unx/generic/app/i18n_cb.cxx:25: > /usr/include/stdlib.h:937:15: note: in a call to function ‘size_t wcstombs(char*, const wchar_t*, size_t)’ declared with attribute ‘access (write_only, 1, 3)’ > 937 | extern size_t wcstombs (char *__restrict __s, > | ^~~~~~~~ (Allowing the first argument to wcstombs to be null, and in which case the third argument is ignored, is a POSIX extension.) Change-Id: Ic078623643010b7539bc5bc1b498f18977ae77ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103473 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 782d160458d319c6c77fffa4c003c519afffaa17)
2020-12-02[API CHANGE] extend css.security.XDocumentDigitalSignaturesbrinzing
Add support for macro and package signing with a provided certificate which is already possible for document signing since LO 6.2: boolean signScriptingContentWithCertificate( [in] ::com::sun::star::security::XCertificate xCertificate, [in] ::com::sun::star::embed::XStorage xStorage, [in] ::com::sun::star::io::XStream xStream); boolean signPackageWithCertificate( [in] ::com::sun::star::security::XCertificate xCertificate, [in] ::com::sun::star::embed::XStorage xStorage, [in] ::com::sun::star::io::XStream xStream); Change-Id: I9783cd317a7202691913be186eca95964b1e0ff7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86141 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 697989d11e25b3eb83e5ca2dad5d71b178abfbc1)
2020-11-24sw: fix SwXTextRange::createEnumeration() inside table cellMichael Stahl
This would set CursorType::SelectionInTable but leave m_pOwnTable and m_pOwnStartNode uninitialised, causing sw/source/core/unocore/unoobj2.cxx:399: SwXParagraphEnumeration: table type but no start node or table and then the enumeration would return the table it's in as the first element, which is quite annoying. Refactor the creation of SwXParagraphEnumeration to prevent this. Change-Id: I4e9e3456bdf66b9822d19ad985a20b094e6bbba4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106532 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit ecc3c621fe5a7e962f0e40cb3709ad5772a5d744)
2020-11-24sw: fix copying and deleting of section content via APIMichael Stahl
The problem happens if a section starts or ends with a table: SwXTextSection::getAnchor() may return a SwXTextRange with one position in a table cell and another position in a different table cell, or outside the table, neither of which is valid to set the cursor via SwXTextViewCurosor::gotoRange(). Introduce a new special mode for SwXTextRange, RANGE_IS_SECTION, analogous to RANGE_IS_TABLE but actually working. Only SwXTextView can be used to create XTransferables, and it requires selecting first via either the SwXTextViewCursor or select(). It's currently not possible to select the content of a section in the ViewShell in these problematic cases, and would be some effort to add. So add a new interface XTransferableTextSupplier that can be used to create XTransferable from the SwXTextRange with RANGE_IS_SECTION. The core CopyRange() and DeleteRange() functions can deal with SwPaMs that start or end in non-text-nodes, so pass the whole section content to these in SwXTextRange::setString() and in SwXTextView::getTransferableFromTextRange(). Change-Id: If7e3210e8a26f5618317c294f2b2f3ed5c217f1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106293 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 7ab349296dac79dad3fec09f60348efcbb9ea17e)
2020-11-24sw: exception messages for SwXTextRangeMichael Stahl
Change-Id: Iee53473ead4151348c2f02f4a83bd0bd17c46758 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106292 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 93eb6a87e30c8716b5e65ce71e3d1d9deffb6425)
2020-11-24external/liblangtag: Avoid null pointer deref in lt_warning callStephan Bergmann
Recent GCC 10 trunk warns (when LO is configured with --enable-optimized): > In file included from lt-script-db.c:24: > lt-script-db.c: In function ‘lt_script_db_parse.constprop’: > lt-messages.h:105:2: error: ‘%s’ directive argument is null [-Werror=format-overflow=] > 105 | lt_message_printf(LT_MSG_WARNING, \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 106 | LT_MSG_FLAG_NONE, \ > | ~~~~~~~~~~~~~~~~~~~ > 107 | 0, \ > | ~~~~~~ > 108 | __VA_ARGS__) > | ~~~~~~~~~~~~ > lt-script-db.c:137:4: note: in expansion of macro ‘lt_warning’ > 137 | lt_warning("No subtag node: description = '%s'", > | ^~~~~~~~~~ > lt-script-db.c:137:47: note: format string is defined here > 137 | lt_warning("No subtag node: description = '%s'", > | ^~ Change-Id: I2924f7aab84f4f2640f277ee5c2689753627ae78 Reviewed-on: https://gerrit.libreoffice.org/83869 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 047e8ae5d189f030d565b13f97a4d6a45b00e6be) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105557 Tested-by: Michael Stahl <michael.stahl@cib.de> Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-11-02sw: return SwXFieldmark in SwXFieldEnumerationMichael Stahl
* Implement text::XTextField in SwXFieldmark * That requires overriding XTextContent, just forward to SwXBookmark * Also override XServiceInfo implementation in SwXFieldmark * Add a PropertySetInfo for SwXFieldmark, which doesn't support "Hidden" or "Condition" properties of SwXBookmark * in SwXFieldmark::setFieldType(), only allow sensible new types * fix DomainMapper_Impl assumptions that if it implements XTextField it can't be a fieldmark, which caused CppunitTest_sw_ooxmlexport10 testTdf92157 to fail with a SAXException caused by some disposed SwXTextCursor Change-Id: I1ae2e9cb99ea784040874517e4d1af7e59d24405 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105083 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit dd24e21bb4f183048a738314934fc3f02ec093f1)
2020-10-20sw: DOCX export: don't export numPr to style from outline numruleMichael Stahl
8e9e705de29a1a3d9b964c9350aa2a3a17cce6f9 disabled this for paragraphs but it appears to be unnecessary for styles as well, since w:outlineLvl will be produced, and Word displays bullets active in the UI if numPr exists. Change-Id: I60f7cf6359b27a4d69450752fbc4de6595d98761 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104539 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 9e455724e50bf512683b1cddfeb7493e047c19ae)
2020-10-16sw: fix unsorted redlines in SwTable::ConvertSubtableBox()Michael Stahl
ooo12626-10.odt asserts because MoveNodeRange() handles redlines only with an explicit flag. (regression from e366c928819c44b5c253c45dca6dae40b71c9808) Change-Id: I80c6e696e51c6d9c366af30ecf8b6df265d0fc91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104286 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins (cherry picked from commit 48a76ea268b4c7fe499abe858074420dd7b152e2)
2020-10-16sw: ODF import: convert the simplest sub-tables to rowspan tablesMichael Stahl
Before OOo 2.3, CWS swnewtable, Writer represented complex table structures as sub-tables, i.e. <table:table table:is-sub-table="true">. Try to convert these to the modern rowspan tables, which export to non-ODF formats much easier. There are some cases where the result is going to look different, or where further work is required to adapt other things in the document; leave these alone for now. Change-Id: I6a6c497089ef886826484d2d723bf57c72f95b14
2020-10-16sw: SwTable::GCLines(): don't throw away row backgroundMichael Stahl
If there's a row background, and a cell in the row doesn't override it, apply the row background to the cell. Change-Id: I37cd33249d3ab66c898c537e3bc6bab067d6f74b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103772 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit e65b1ba0033e1adaa4135539bb7b34b28cbedd7c)
2020-10-16sw: improve comments, dump rowspan to nodes.xmlMichael Stahl
Change-Id: Ifcd011f6d55ac534c449050d07009680dcd71d51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103771 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 309868c32f00e5ca045f941deafb5216aad2538c)
2020-10-16tdf#136620 tdf#136708 filter,oox,sw: fix export of 2 different wrapsMichael Stahl
This reverts commit 2cb90a5c87fe46737c8d840967d8836284f92ffd. Revert the change to EscherPropertyContainer, which was completely bogus, based on pre-existing bogus code in VMLExport::Commit(). The problem is that ESCHER_Wrap values are for wrapping text *inside* a text box, which is "mso-wrap-style" in VML, whereas VML's w10:wrap element defines how text wraps *around* a shape, doesn't exist as an ESCHER property and is specific to Word formats. Instead, export the w10:wrap element in VMLExport::EndShape(). This has 2 callers, WriteActiveXControl() and writeVMLDrawing(). Furthermore the value "none" wasn't written for WrapTextMode_THROUGH, which caused the wrap element to be omitted in that case. Change-Id: Id4a01fcb2ea73fa9bef4ee8769b5e0680e059f15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103009 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit fdc8590032b292dcb8152b328401e591fea642a4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103090 Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit c54d697e2ac379d4b1a3ff5acb6f06bff30cadd6)
2020-10-16.gitreview: Update default branchSamuel Mehrbrodt
Change-Id: Ifcbcd3427508b468a9f1872b563c93760854becf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102364 Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>