Age | Commit message (Collapse) | Author |
|
Change-Id: Ia613dca3dc8bb1aa2e45e73149932be6ac61f8cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87691
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
|
|
found by my new loplugin:unusedvariableplus
Change-Id: Ic3f55f492d43a53d8850a97d44059ff127fd69a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87573
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
This avoids problems with round-tripping Excel spreadsheets, where
previously a formula like =IF(ISNA(A1)=FALSE;"a";"b") was imported
as =IF(ISNA(A1)=0;"a";"b"), and when exported back, it didn't work
in Excel, because boolean values had a distinct type in it.
Change-Id: I672a631bfa1a4811349794f714293404c6b24381
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86238
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
Change-Id: I792755f043109173606a78e947d5dc01f78c6849
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86982
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Used in both Writer and Calc at 5 different places, so host it in
unotest/.
Change-Id: I013e6df471deb8693cf4ae62f0958b12e16fda7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86972
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
and compact the ScMarkEntry record, this stuff shows up on perf profiles
Also make these classes so we don't need to #include the cxx into a
unit test.
Change-Id: Id806385ae877a576ec25e7772c972448dada130b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86907
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I6a9b2b912434c053e20ce06ef03e52451e506693
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86804
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
found using 'git grep', I tried using clang-tidy, but it only
successfully found a tiny fraction of these
Change-Id: I61c7d85105ff7a911722750e759d6641d578da33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86526
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ife14b8c3f7d121deb390deb5f405dd42d3016acf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86156
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Commit caeb7b141280a65e60525f11a7e6514b76e12e11 (tdf#124983 In calc make
printable page borders also initially visible, 2019-07-10) added the
ability to paint page breaks right after opening a document. The
implementation calls ScPrintFunc::UpdatePages() whenever there are no
calculated page breaks. The problem is that this is not only true when
they are not calculated, but also happens when the print range is empty.
This means that ScGridWindow::Paint() resulted in a
vcl::Window::Invalidate() for the same window, and this happened again
and again as the idle handler was invoked, resulting in flickering form
controls.
Fix the problem by only calculating page breaks when
ScPrintFunc::HasPrintRange() confirms something will be calculated. This
works because HasPrintRange() return false when ScTable::aPrintRanges is
empty, and UpdatePages() also does nothing in that case.
Change-Id: I14d8a728f4672e647e9009a3dc3e0dd5fb40c023
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86258
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
ScExportTest::testTdf112567() and ScExportTest::testTdf112567b()
change the locale config to "hu-HU" and revert to "" at the end,
the resulted locale is the system one instead of English, and
breaks testTdf128976 under a zh-TW build environment because
testTdf128976 relies on some font/loclae dependent metric data.
Change-Id: Iec8a0771a726133dfd30d5e5e254d9b678d44d72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86191
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Allow regex engine use its own case-insensitive search instead. We
already set UREGEX_CASE_INSENSITIVE ICU flag when case-insensitive
search is requested in TextSearch::RESrchPrepare. Case-insensitive
transliteration used when preparing the string for passing to regex
engine creates a lowercase string, where case-sensitive search is
impossible, even when regex includes explicit flags for that.
This change allows to honor (?-i)/(?i) flags in the regex if present.
It removes case-sensitive flag from consideration for creation of
transliteration service if regex search is requested.
Change-Id: I0d8960670c1681f7c6bc162a4f858006596c7c36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85650
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
This allows to correctly store and read Unicode strings used in
password-protected libraries. The additional data stored after all
legacy data of the stringpool record (after a magic number to mark
its presence), and so is invisible for older versions of program:
this allows to keep the version of data and backward compatibility.
Of course, older versions will only see legacy data, with broken
Unicode strings; and password-protected libraries edited and saved
in older versions will not contain Unicode data.
read_uInt16s_ToOUString and write_uInt16s_FromOUString are used
for correct handling of UTF-16 strings on LE/BE systems.
Change-Id: I990bc27b5cc7d499e71c43d45b7f263af41911e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86065
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I795ec97e663708fa36feae8f537e2138dfd77547
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86052
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I9b7183be9bc5cbfef9ab1538fd20554217fa4b70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86062
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
This is obviously a result of copy-paste from XclExpColinfo::WriteBody
(where that increment existed at least since commit
92d8c6d6c4dc2a2824a0e24e22485361c3b65b54 from 2004). Implementing OOXML
export, authors of commit 64274b38f6cc50a8bb49f114f1ac9e7c1c3b3c4f likely
forgot to remove this after copying the code to XclExpColinfo::SaveXml.
This change removes the copy-pasted code incrementing column number for
the last possible column.
Change-Id: Ie2f043c4910568731cac90d89ec791ecbc8565b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86046
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Ia7572b2f8a5bc901434a9564b69408643a3e9fd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85990
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Testing on Windows with UI scaling set to 150%, having screen size
1920x1080, ScMacrosTest::testVba failed in window2.xls (SplitColumn)
because it tried to split at pixel position 486, while maximum split
position was 460.
This changes tested SplitColumn value in the test from 243 to 193.
Change-Id: Iec9b25dc7b2a700adf23d7ec8983f393ba603191
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85983
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Iab0c301096118203466dd91c724c25f1283a0488
Reviewed-on: https://gerrit.libreoffice.org/85392
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
|
|
Change-Id: I7e212a36898e71b03db88053647bfeee12a49cb5
Reviewed-on: https://gerrit.libreoffice.org/85690
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
move these into their own file, the way we do elsewhere
Change-Id: Ib97e09c80537e31d795a8c66a6dfb06b350ff0e2
Reviewed-on: https://gerrit.libreoffice.org/85560
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I99ab71f6fba4eb9f83fe8c262a6549a236ccf1ec
Reviewed-on: https://gerrit.libreoffice.org/85422
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
I had added these while tracking down some issue which ultimately turned out to
be unrelated to this. But looks like it can't hurt to explicitly close these
documents, as is already done in all the other tests in this file.
Change-Id: I32f8b3cb38264aac4b7c5982430006b374142be0
Reviewed-on: https://gerrit.libreoffice.org/85264
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Following swap of patterns is not safe :
"""
const ScPatternAttr* pPat1 = GetPattern(nRow);
const ScPatternAttr* pPat2 = rOther.GetPattern(nRow);
SetPattern(nRow, *pPat2);
rOther.SetPattern(nRow, *pPat1);
"""
as the first SetPattern can cause deallocation of the pattern object
pointed to by pPat1 if it had a reference count of 1 to begin with.
In such cases, increase the reference count of first pattern by
putting it into document pool, thereby evading deallocation.
The stacktrace of the crash without the fix looks like :
Thread 1 "soffice.bin" received signal SIGSEGV, Segmentation fault.
602 SfxPoolItem *pPoolItem = rItem.Clone(pImpl->mpMaster);
0 0x00007ffff4ad2905 in SfxItemPool::PutImpl(SfxPoolItem const&, unsigned short, bool) (this=0x16c6830, rItem=..., nWhich=39321, bPassingOwnership=false) at /ssd1/work/dennis/core/svl/source/items/itempool.cxx:602
1 0x00007fffd179e5a5 in ScDocumentPool::PutImpl(SfxPoolItem const&, unsigned short, bool) (this=0x16c6830, rItem=..., nWhich=0, bPassingOwnership=false) at /ssd1/work/dennis/core/sc/source/core/data/docpool.cxx:333
2 0x00007fffd14e88fb in SfxItemPool::Put<ScPatternAttr>(ScPatternAttr const&, unsigned short) (this=0x16c6830, rItem=..., nWhich=0) at /ssd1/work/dennis/core/include/svl/itempool.hxx:154
3 0x00007fffd14dd228 in ScAttrArray::SetPatternAreaImpl(int, int, ScPatternAttr const*, bool, ScEditDataArray*, bool)
(this=0x2cbc020, nStartRow=9, nEndRow=9, pPattern=0x2da5d80, bPutToPool=true, pDataArray=0x0, bPassingOwnership=false) at /ssd1/work/dennis/core/sc/source/core/data/attarray.cxx:464
4 0x00007fffd1653fcd in ScAttrArray::SetPattern(int, ScPatternAttr const*, bool) (this=0x2cbc020, nRow=9, pPattern=0x2da5d80, bPutToPool=true) at /ssd1/work/dennis/core/sc/inc/attarray.hxx:142
5 0x00007fffd163cd41 in ScColumn::SetPattern(int, ScPatternAttr const&) (this=0x2cb4610, nRow=9, rPatAttr=...) at /ssd1/work/dennis/core/sc/source/core/data/column.cxx:694
6 0x00007fffd170e65b in ScColumn::Swap(ScColumn&, int, int, bool) (this=0x2339270, rOther=..., nRow1=0, nRow2=9, bPattern=true) at /ssd1/work/dennis/core/sc/source/core/data/column4.cxx:1112
7 0x00007fffd1ada654 in ScTable::SortReorderByColumn(ScSortInfoArray const*, int, int, bool, ScProgress*) (this=0x2cb9ea0, pArray=0x5ef71a0, nRow1=0, nRow2=9, bPattern=true, pProgress=0x7fffffff09a0)
at /ssd1/work/dennis/core/sc/source/core/data/table3.cxx:922
8 0x00007fffd1adf991 in ScTable::Sort(ScSortParam const&, bool, bool, ScProgress*, sc::ReorderParam*) (this=0x2cb9ea0, rSortParam=..., bKeepQuery=false, bUpdateRefs=false, pProgress=0x7fffffff09a0, pUndo=0x7fffffff0950)
at /ssd1/work/dennis/core/sc/source/core/data/table3.cxx:1750
9 0x00007fffd17cc70a in ScDocument::Sort(short, ScSortParam const&, bool, bool, ScProgress*, sc::ReorderParam*) (
this=0x2cc4db0, nTab=0, rSortParam=..., bKeepQuery=false, bUpdateRefs=false, pProgress=0x7fffffff09a0, pUndo=0x7fffffff0950) at /ssd1/work/dennis/core/sc/source/core/data/documen3.cxx:1411
10 0x00007fffd22a2f76 in ScDBDocFunc::Sort(short, ScSortParam const&, bool, bool, bool) (this=0x7fffffff0b50, nTab=0, rSortParam=..., bRecord=true, bPaint=true, bApi=false)
at /ssd1/work/dennis/core/sc/source/ui/docshell/dbdocfun.cxx:578
11 0x00007fffd2744e29 in ScDBFunc::Sort(ScSortParam const&, bool, bool) (this=0x2e3b560, rSortParam=..., bRecord=true, bPaint=true) at /ssd1/work/dennis/core/sc/source/ui/view/dbfunc.cxx:217
12 0x00007fffd2744d7b in ScDBFunc::UISort(ScSortParam const&) (this=0x2e3b560, rSortParam=...) at /ssd1/work/dennis/core/sc/source/ui/view/dbfunc.cxx:208
13 0x00007fffd2735e3d in ScCellShell::ExecuteDB(SfxRequest&) (this=0x1e42330, rReq=...) at /ssd1/work/dennis/core/sc/source/ui/view/cellsh2.cxx:528
Change-Id: I70f8b95a6ff59f372b909fd173117a114906deff
Reviewed-on: https://gerrit.libreoffice.org/85072
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
|
|
with this patch I can finally load a 3201 column document
Change-Id: I880d485b3f628836e7aed92c276e660466a3b19c
Reviewed-on: https://gerrit.libreoffice.org/85139
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
which means we end up passing around ScDocument*
__everywhere__
Change-Id: I44d235ca5e9d57519f068b6880ee7d66f3ceb529
Reviewed-on: https://gerrit.libreoffice.org/83548
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
instead of SCCOL, else it may cause overflows.
Also included a unit test for protecting the fix.
Change-Id: I8f735b23b7f95ecf34ccae86f00c76b82b0d668f
Reviewed-on: https://gerrit.libreoffice.org/85118
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ifa99d1c8d593e2a5dd81a3aaf4cd702d3ba96b89
Reviewed-on: https://gerrit.libreoffice.org/85060
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
needed to create a fake ScDocument for the external ref manager, since
it has no ScDocument at all
Change-Id: Ia786ac291133e3c438694e81ecfb2590729a853d
Reviewed-on: https://gerrit.libreoffice.org/85050
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and use in ScDrawLayer::RecalcPos and in ScDrawView::FitToCellSize().
Error was, that it was assumed, that SdObjCustomShape::SetSnapRect()
changes the shape so, that it fits into the passed rectangle. That is
true for other type of shapes, but not for custom shapes.
Change-Id: Ib00d52087509f459165000abf43c7f244980a01b
Reviewed-on: https://gerrit.libreoffice.org/84216
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
|
|
Change-Id: Ief739616163c68e0e30d6287fdac90c1bcc9d13f
Reviewed-on: https://gerrit.libreoffice.org/84879
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I8ed99f19ff6f4751c0867147fc1a60ac917f083b
Reviewed-on: https://gerrit.libreoffice.org/84876
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Idbcf73ea3034b62e283537e052c17a9fb3988a8b
Reviewed-on: https://gerrit.libreoffice.org/84918
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
so its clear that it is not an override of baseclass EditEngine::SetText
Change-Id: I85ee9c9b212fe9248fb7e5fcb1ec83679ffb633d
Reviewed-on: https://gerrit.libreoffice.org/84553
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I573467a962a2835765cc5672b81cce4c7772ddff
Reviewed-on: https://gerrit.libreoffice.org/84669
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
Don't duplicate this on the ITiledRenderable interface, which is not a
per-view construct, this just confuses everything.
Store & restore the zoom level before/after rendering a tile -
unfortunately this is not done by the most optimal view yet.
Change-Id: I1f7dfaa353333f45c5601d49a9bca784d34fb81a
Reviewed-on: https://gerrit.libreoffice.org/84281
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
...with a boost::optional fallback for Xcode < 10 (as std::optional is only
available starting with Xcode 10 according to
<https://en.cppreference.com/w/cpp/compiler_support>, and our baseline for iOS
and macOS is still Xcode 9.3 according to README.md). And mechanically rewrite
all code to use o3tl::optional instead of boost::optional.
One immediate benefit is that disabling -Wmaybe-uninitialized for GCC as per
fed7c3deb3f4ec81f78967c2d7f3c4554398cb9d "Slience bogus
-Werror=maybe-uninitialized" should no longer be necessary (and whose check
happened to no longer trigger for GCC 10 trunk, even though that compiler would
still emit bogus -Wmaybe-uninitialized for uses of boost::optional under
--enable-optimized, which made me ponder whether this switch from
boost::optional to std::optional would be a useful thing to do; I keep that
configure.ac check for now, though, and will only remove it in a follow up
commit).
Another longer-term benefit is that the code is now already in good shape for an
eventual switch to std::optional (a switch we would have done anyway once we no
longer need to support Xcode < 10).
Only desktop/qa/desktop_lib/test_desktop_lib.cxx heavily uses
boost::property_tree::ptree::get_child_optional returning boost::optional, so
let it keep using boost::optional for now.
After a number of preceding commits have paved the way for this change, this
commit is completely mechanical, done with
> git ls-files -z | grep -vz -e '^bin/find-unneeded-includes$' -e '^configure.ac$' -e '^desktop/qa/desktop_lib/test_desktop_lib.cxx$' -e '^dictionaries$' -e '^external/' -e '^helpcontent2$' -e '^include/IwyuFilter_include.yaml$' -e '^sc/IwyuFilter_sc.yaml$' -e '^solenv/gdb/boost/optional.py$' -e '^solenv/vs/LibreOffice.natvis$' -e '^translations$' -e '\.svg$' | xargs -0 sed -i -E -e 's|\<boost(/optional)?/optional\.hpp\>|o3tl/optional.hxx|g' -e 's/\<boost(\s*)::(\s*)(make_)?optional\>/o3tl\1::\2\3optional/g' -e 's/\<boost(\s*)::(\s*)none\>/o3tl\1::\2nullopt/g'
(before committing include/o3tl/optional.hxx, and relying on some GNU features).
It excludes some files where mention of boost::optional et al should apparently
not be changed (and the sub-repo directory stubs). It turned out that all uses
of boost::none across the code base were in combination with boost::optional, so
had all to be rewritten as o3tl::nullopt.
Change-Id: Ibfd9f4b3d5a8aee6e6eed310b988c4e5ffd8b11b
Reviewed-on: https://gerrit.libreoffice.org/84128
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
improve the script to filter out more noise generated by library symbols
Change-Id: I22bf6037d56bc4015001825c3fb3b21a39d85e07
Reviewed-on: https://gerrit.libreoffice.org/84022
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Found while looking for problems in another patch.
This will become more important with "jumbo sheets" when using the wrong
datatype can mean overflow
Change-Id: I7370ffd8a6edc33a5e613242735e4c7b9eaf830d
Reviewed-on: https://gerrit.libreoffice.org/83991
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
(found by upcoming loplugin:unusedmember)
Change-Id: I2ed1fd158779716297a93fade34b1cf541c44aba
Reviewed-on: https://gerrit.libreoffice.org/83818
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I40045b46f5cf8063e41211f9f7ea55e712036cd2
Reviewed-on: https://gerrit.libreoffice.org/83713
Tested-by: Jenkins
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
|
|
It passed Jenkins once, but it times out for me locally and it regularly
also times out on Jenkins.
Disable this till the root cause is identified and fixed.
Change-Id: I0501407fb8362c5e1d965e5bf1bdec7fa50b572a
Reviewed-on: https://gerrit.libreoffice.org/83684
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Miklos Vajna <vmiklos@collabora.com>
|
|
XLS stores default column width as 16-bit unsigned integer in the range
from 0 to 255 inclusive ([MS-XLS] 2.4.89 DefColWidth), unlike in OOXML
where any floating-point value is valid. Additionally, some correction
is used, introduced in commit 555d702903fb0857122024e1ab78a72d122d3f16
(basis of empirical formula in XclTools::GetXclDefColWidthCorrection
is unclear). So in XLS, when the default is calculated, we need to take
into account if the resulting stored value will actually represent our
calculated value. If not, then just ignore the calculated value, and
use arbitrary 8 as the default.
With that, following IsDefWidth will correctly check if passed width
is represented by the stored default or not. All widths that can't be
represented as integral count chars in DefColWidth will have fUserSet
set in corresponding ColInfo records, thus correctly keeping widths.
Change-Id: Iedcc5583c861f5b18a422a9b279c48cff729cbc5
Reviewed-on: https://gerrit.libreoffice.org/83613
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I0322a3bc821850d5f15aeb690ba80ff7b8129140
Reviewed-on: https://gerrit.libreoffice.org/83546
Tested-by: Jenkins
Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
|
|
This partially reverts 009e7a54f40ebacd9dd4a394504c277789699801
Change-Id: I5a9605ff9d0ff1cd825968fb247b2a3bf4b2902a
Reviewed-on: https://gerrit.libreoffice.org/83464
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Ic6d3910f12409f5af541c887760caefcb78b30f9
Reviewed-on: https://gerrit.libreoffice.org/83362
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
|
|
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend
loplugin:external to warn about enums".
Cases where free functions were moved into an unnamed namespace along with a
class, to not break ADL, are in:
filter/source/svg/svgexport.cxx
sc/source/filter/excel/xelink.cxx
sc/source/filter/excel/xilink.cxx
svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
All other free functions mentioning moved classes appear to be harmless and not
give rise to (silent, even) ADL breakage. (One remaining TODO in
compilerplugins/clang/external.cxx is that derived classes are not covered by
computeAffectedTypes, even though they could also be affected by ADL-breakage---
but don't seem to be in any acutal case across the code base.)
For friend declarations using elaborate type specifiers, like
class C1 {};
class C2 { friend class C1; };
* If C2 (but not C1) is moved into an unnamed namespace, the friend declaration
must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see
C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither
qualified nor a template-id and the declaration is a function or an
elaborated-type-specifier, the lookup to determine whether the entity has been
previously declared shall not consider any scopes outside the innermost
enclosing namespace.")
* If C1 (but not C2) is moved into an unnamed namespace, the friend declaration
must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882>
"elaborated-type-specifier friend not looked up in unnamed namespace".
Apart from that, to keep changes simple and mostly mechanical (which should help
avoid regressions), out-of-line definitions of class members have been left in
the enclosing (named) namespace. But explicit specializations of class
templates had to be moved into the unnamed namespace to appease
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of
template from unnamed namespace using unqualified-id in enclosing namespace".
Also, accompanying declarations (of e.g. typedefs or static variables) that
could arguably be moved into the unnamed namespace too have been left alone.
And in some cases, mention of affected types in blacklists in other loplugins
needed to be adapted.
And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which
is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is
not moved into an unnamed namespace (because it is declared in
sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about
such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler
doesn’t give this warning for types defined in the main .C file, as those are
unlikely to have multiple definitions."
(<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The
warned-about classes also don't have multiple definitions in the given test, so
disable the warning when including the .cxx.
Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4
Reviewed-on: https://gerrit.libreoffice.org/83239
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
if the object isn't valid, e.g. link to something that doesn't exist, set the fallback
graphic as mxGraphic so SdrOle2Obj::GetGraphic will show the fallback, otherwise
the failing mxObjRef.is test in SdrOle2Obj::GetGraphic means it doesn't get used
Change-Id: I8f1aea6b25dc216e01a0f888a44d10876bb1bebd
Reviewed-on: https://gerrit.libreoffice.org/83322
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ia811eeb04cb9ab86aea205aa848e210fc34ab9d6
Reviewed-on: https://gerrit.libreoffice.org/83072
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
ctor of SvXMLExport expects a util::MeasureUnit, but getMetric() from
XGlobalSheetSettings returns a FieldUnit. The conversion was missing.
So FieldUnit::MM (=1) was treated as MeasureUnit::MM_10TH (=1). But
that one has no unit string, so the 'translate' transformation got
numbers without unit, which then were wrongly interpreted.
Change-Id: I433c7534be21655887863005f14836d2b733cf1f
Reviewed-on: https://gerrit.libreoffice.org/83004
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
|