[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 2 commits - include/svl svx/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jun 14 17:33:04 UTC 2021
include/svl/itemset.hxx | 18 -----------------
svx/source/svdraw/svdedxv.cxx | 44 +++++++++++++++++++++++++++---------------
2 files changed, 29 insertions(+), 33 deletions(-)
New commits:
commit 688c955b6501c8480fcf92789dcf9202057f5de4
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Jun 14 16:01:09 2021 +0200
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Jun 14 19:32:43 2021 +0200
global-buffer-overflow
...down in svl::detail::CountRanges during e.g. CppunitTest_sd_tiledrendering,
after 8aaa28ed43978a9a4a20d62368410a57ec05c23f "Assert on valid order of which
ids in ranges on SfxItemSet creation" and
90cb57eb53e28ecb983001bf8f018577abb6d145 "Workaround internal compiler error on
tb77"
Change-Id: I8ff49384a86676a97ec876ef08426b978e39f6d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117168
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit d3e51bce28a759916e9a3988172ba02b1db66641)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117128
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 7dac2e2dfb7a..321672491349 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -2629,16 +2629,33 @@ bool SdrObjEditView::SupportsFormatPaintbrush(SdrInventor nObjectInventor,
static const sal_uInt16* GetFormatRangeImpl(bool bTextOnly)
{
- static const sal_uInt16 gFull[]
- = { XATTR_LINE_FIRST, XATTR_LINE_LAST, XATTR_FILL_FIRST,
- XATTRSET_FILL, SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,
- SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST, // table cell formats
- SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST, SDRATTR_TABLE_FIRST,
- SDRATTR_TABLE_LAST, EE_PARA_START, EE_PARA_END,
- EE_CHAR_START, EE_CHAR_END };
-
- static const sal_uInt16 gTextOnly[] = { SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST, EE_PARA_START,
- EE_PARA_END, EE_CHAR_START, EE_CHAR_END };
+ static const sal_uInt16 gFull[] = { XATTR_LINE_FIRST,
+ XATTR_LINE_LAST,
+ XATTR_FILL_FIRST,
+ XATTRSET_FILL,
+ SDRATTR_SHADOW_FIRST,
+ SDRATTR_SHADOW_LAST,
+ SDRATTR_MISC_FIRST,
+ SDRATTR_MISC_LAST, // table cell formats
+ SDRATTR_GRAF_FIRST,
+ SDRATTR_GRAF_LAST,
+ SDRATTR_TABLE_FIRST,
+ SDRATTR_TABLE_LAST,
+ EE_PARA_START,
+ EE_PARA_END,
+ EE_CHAR_START,
+ EE_CHAR_END,
+ 0,
+ 0 };
+
+ static const sal_uInt16 gTextOnly[] = { SDRATTR_MISC_FIRST,
+ SDRATTR_MISC_LAST,
+ EE_PARA_START,
+ EE_PARA_END,
+ EE_CHAR_START,
+ EE_CHAR_END,
+ 0,
+ 0 };
return bTextOnly ? gTextOnly : gFull;
}
commit 580e7bee057c7f865df777bdff6a7fedfb13076d
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Mon Jun 14 12:06:08 2021 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Jun 14 19:32:31 2021 +0200
Workaround internal compiler error on tb77
As reported in https://ci.libreoffice.org/job/gerrit_windows/98360/console :
C:/cygwin/home/tdf/jenkins/workspace/gerrit_windows/svx/source/svdraw/svdedxv.cxx(2639): fatal error C1001: Internal compiler error.
(compiler file 'msc1.cpp', line 1591)
To work around this problem, try simplifying or changing the program near the locations listed above.
If possible please provide a repro here: https://developercommunity.visualstudio.com
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
C:/cygwin/home/tdf/jenkins/workspace/gerrit_windows/svx/source/svdraw/svdedxv.cxx(2631): note: while evaluating constexpr function 'svl::ItemsArray'
INTERNAL COMPILER ERROR in 'C:\PROGRA~2\MIB055~1\2019\COMMUN~1\VC\Tools\MSVC\1427~1.291\bin\Hostx64\x86\cl.exe'
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
tb77 uses VS 16.7.7 (cl.exe is under Tools/MSVC/14.27.29110); tb68 with
cl.exe under Tools/MSVC/14.28.29910 has no problems compiling this.
Let's make the code simple for now, until we upgrade the tooling on CI.
Change-Id: I10aaf289454c89b2f49b4be947627a9a3be30fde
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117137
Tested-by: Mike Kaganski <mike.kaganski at collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
(cherry picked from commit 90cb57eb53e28ecb983001bf8f018577abb6d145)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117125
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
diff --git a/include/svl/itemset.hxx b/include/svl/itemset.hxx
index 80d8ad5b4237..2d642b1863ee 100644
--- a/include/svl/itemset.hxx
+++ b/include/svl/itemset.hxx
@@ -86,24 +86,6 @@ constexpr std::size_t rangesSize()
template<sal_uInt16... WIDs> struct Items {};
-// This allows creating compile-time which id arrays using syntax like
-//
-// constexpr auto aWids = svl::ItemsArray({ { widFrom1, widTo2 }, { widFrom2, widTo2 }, ... });
-//
-// so that e.g. clang-format would not try to rearrange the initializer sequence to break pairs.
-// Additionally, the array validity is checked in debug builds.
-template <size_t N> constexpr auto ItemsArray(const std::pair<sal_uInt16, sal_uInt16> (&wids)[N])
-{
- std::array<sal_uInt16, N * 2 + 1> aArray{};
- sal_uInt16* p = aArray.data();
- for (const auto& [wid1, wid2] : wids)
- {
- *p++ = wid1;
- *p++ = wid2;
- }
- assert(svl::detail::validRanges(aArray.data()));
- return aArray;
-}
}
class SAL_WARN_UNUSED SVL_DLLPUBLIC SfxItemSet
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 1bf140367ac1..7dac2e2dfb7a 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -2629,21 +2629,18 @@ bool SdrObjEditView::SupportsFormatPaintbrush(SdrInventor nObjectInventor,
static const sal_uInt16* GetFormatRangeImpl(bool bTextOnly)
{
- static constexpr auto gFull
- = svl::ItemsArray({ { XATTR_LINE_FIRST, XATTR_LINE_LAST },
- { XATTR_FILL_FIRST, XATTRSET_FILL },
- { SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST },
- { SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST }, // table cell formats
- { SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST },
- { SDRATTR_TABLE_FIRST, SDRATTR_TABLE_LAST },
- { EE_PARA_START, EE_PARA_END },
- { EE_CHAR_START, EE_CHAR_END } });
-
- static constexpr auto gTextOnly = svl::ItemsArray({ { SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST },
- { EE_PARA_START, EE_PARA_END },
- { EE_CHAR_START, EE_CHAR_END } });
-
- return bTextOnly ? gTextOnly.data() : gFull.data();
+ static const sal_uInt16 gFull[]
+ = { XATTR_LINE_FIRST, XATTR_LINE_LAST, XATTR_FILL_FIRST,
+ XATTRSET_FILL, SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,
+ SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST, // table cell formats
+ SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST, SDRATTR_TABLE_FIRST,
+ SDRATTR_TABLE_LAST, EE_PARA_START, EE_PARA_END,
+ EE_CHAR_START, EE_CHAR_END };
+
+ static const sal_uInt16 gTextOnly[] = { SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST, EE_PARA_START,
+ EE_PARA_END, EE_CHAR_START, EE_CHAR_END };
+
+ return bTextOnly ? gTextOnly : gFull;
}
void SdrObjEditView::TakeFormatPaintBrush(std::shared_ptr<SfxItemSet>& rFormatSet)
More information about the Libreoffice-commits
mailing list