[Libreoffice-commits] core.git: sw/qa sw/source

2021-06-16 Thread Justin Luth (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport16.cxx |4 
 sw/source/core/text/txttab.cxx |2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 3f5311271ea6e41583c581b8a0172e322f5a179a
Author: Justin Luth 
AuthorDate: Wed Jun 16 15:33:06 2021 +0200
Commit: Justin Luth 
CommitDate: Thu Jun 17 06:21:47 2021 +0200

tdf#142404 DOCX c15: fix centering when TabOverSpacing

I didn't notice the need for making the same
exclusion that TabOverMargin made for centering
when 7.2 got the new TabOverSpacing compat flag.
But now I see it is still needed.

Change-Id: Ia8069b5566eaf6dcdac6ff10ee0c60b849c5fa2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117339
Tested-by: Jenkins
Reviewed-by: Justin Luth 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index 8ab528c6307c..408f0e608da0 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -249,6 +249,10 @@ 
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf142404_tabOverSpacingC15, "tdf142404_
 nHeight = parseDump("//page[1]/body/txt[7]/infos/bounds", 
"height").toInt32();
 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("2 lines high (but 3 in Word)", 
242*2.5, nHeight, 242);
 
+CPPUNIT_ASSERT_EQUAL(OUString("A centered tab positioned at"), 
parseDump("//page[1]/body/txt[3]/Text[1]", "Portion"));
+sal_Int32 nLineWidth = parseDump("//page[1]/body/txt[3]/Text[2]", 
"nWidth").toInt32();
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Big tab: full paragraph area used", 
737, nLineWidth, 100);
+
 // Pages 2/3 are TabOverMargin - in this particular case tabs should not 
go over margin.
 CPPUNIT_ASSERT_EQUAL(OUString("TabOverflow does what?"), 
parseDump("//page[3]/body/txt[2]/Text[1]", "Portion"));
 // Not 1 line high (Word 2010 DOCX and ODT), or 4 lines high (prev LO 
DOCX),
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index 565c660b23be..4039509dd4ae 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -525,7 +525,7 @@ bool SwTabPortion::PostFormat( SwTextFormatInfo &rInf )
 // centered tabs are problematic:
 // We have to detect how much fits into the line.
 sal_uInt16 nNewWidth = nPorWidth /2;
-if( !bTabOverMargin && nNewWidth > rInf.Width() - nRight )
+if (!bTabOverMargin && !bTabOverSpacing && nNewWidth > rInf.Width() - 
nRight)
 nNewWidth = nPorWidth - (rInf.Width() - nRight);
 nPorWidth = nNewWidth;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: basegfx/CppunitTest_basegfx.mk basegfx/source basegfx/test include/basegfx

2021-06-16 Thread Tomaž Vajngerl (via logerrit)
 basegfx/CppunitTest_basegfx.mk   |1 
 basegfx/source/tuple/b2dtuple.cxx|3 
 basegfx/test/B2DTupleTest.cxx|  204 +--
 basegfx/test/B3DTupleTest.cxx|  194 +
 include/basegfx/tuple/Tuple2D.hxx|  157 ++
 include/basegfx/tuple/Tuple3D.hxx|  139 +++
 include/basegfx/tuple/b2dtuple.hxx   |  121 
 include/basegfx/tuple/b2i64tuple.hxx |  105 +-
 include/basegfx/tuple/b2ituple.hxx   |  119 +---
 include/basegfx/tuple/b3dtuple.hxx   |  109 +-
 include/basegfx/tuple/b3ituple.hxx   |   87 --
 11 files changed, 714 insertions(+), 525 deletions(-)

New commits:
commit c703b2d22c3f45825d9c9d790c3b5a4b6f97e776
Author: Tomaž Vajngerl 
AuthorDate: Wed May 12 19:00:32 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu Jun 17 01:55:56 2021 +0200

basegfx: generalise tuples with template class Tuple2D and Tuple3D

B2DTuple2D, B2ITuple2D and B2I64Tuple share a lot in common so
we can generalise it as a template class. The same goes for the
3D variants - B3DTuple and B3ITuple.

This is the initial attempt, but doesn't yet generalise all that
is possible.

Add some tests for the tuple variants that test the behaviour of
overloaded operators and other common methods.

Change-Id: Iee5ed15d58ea88e65ee7854bd05a87ceab22023d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117104
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/basegfx/CppunitTest_basegfx.mk b/basegfx/CppunitTest_basegfx.mk
index a0379e76612a..310424bd6446 100644
--- a/basegfx/CppunitTest_basegfx.mk
+++ b/basegfx/CppunitTest_basegfx.mk
@@ -34,6 +34,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,basegfx,\
 basegfx/test/B2XRangeTest \
 basegfx/test/B2IBoxTest \
 basegfx/test/B2DTupleTest \
+basegfx/test/B3DTupleTest \
 basegfx/test/BColorModifierTest \
 basegfx/test/BColorTest \
 basegfx/test/SvgPathImportExport \
diff --git a/basegfx/source/tuple/b2dtuple.cxx 
b/basegfx/source/tuple/b2dtuple.cxx
index c894639a1511..18a93f8d731c 100644
--- a/basegfx/source/tuple/b2dtuple.cxx
+++ b/basegfx/source/tuple/b2dtuple.cxx
@@ -30,8 +30,7 @@ namespace basegfx
 }
 
 B2DTuple::B2DTuple(const B2ITuple& rTup)
-:   mfX( rTup.getX() ),
-mfY( rTup.getY() )
+: Tuple2D(rTup.getX(), rTup.getY())
 {}
 
 B2ITuple fround(const B2DTuple& rTup)
diff --git a/basegfx/test/B2DTupleTest.cxx b/basegfx/test/B2DTupleTest.cxx
index b2ffd28e84f3..100808fe8a78 100644
--- a/basegfx/test/B2DTupleTest.cxx
+++ b/basegfx/test/B2DTupleTest.cxx
@@ -20,29 +20,211 @@
 #include 
 #include 
 
+#include 
+#include 
+#include 
+
 namespace basegfx
 {
-class b2dtuple : public CppUnit::TestFixture
+class B2DTupleTest : public CppUnit::TestFixture
 {
 public:
-// insert your test code here.
-// this is only demonstration code
-void EmptyMethod()
+void testEmpty()
+{
+B2DTuple aTuple;
+CPPUNIT_ASSERT_EQUAL(true, aTuple.equalZero());
+
+B2ITuple aTupleInteger;
+CPPUNIT_ASSERT_EQUAL(true, aTupleInteger.equalZero());
+
+B2I64Tuple aTupleLong;
+CPPUNIT_ASSERT_EQUAL(true, aTupleLong.equalZero());
+}
+
+void testEquals()
+{
+B2DTuple aTuple(1.0, 1.0);
+CPPUNIT_ASSERT_EQUAL(true, aTuple.equal({ 1.0, 1.0 }));
+CPPUNIT_ASSERT_EQUAL(false, aTuple.equal({ 0.99, 0.99 }));
+
+B2ITuple aTupleInteger(1, 1);
+CPPUNIT_ASSERT_EQUAL(true, aTupleInteger.equal({ 1, 1 }));
+CPPUNIT_ASSERT_EQUAL(false, aTupleInteger.equal({ 1, 0 }));
+CPPUNIT_ASSERT_EQUAL(false, aTupleInteger.equal({ 0, 1 }));
+
+B2I64Tuple aTupleLong(1, 1);
+CPPUNIT_ASSERT_EQUAL(true, aTupleLong.equal({ 1, 1 }));
+CPPUNIT_ASSERT_EQUAL(false, aTupleLong.equal({ 1, 0 }));
+CPPUNIT_ASSERT_EQUAL(false, aTupleLong.equal({ 0, 1 }));
+}
+
+void testOperatorAddition()
+{
+B2DTuple aTuple(4.0, 8.0);
+aTuple += { 2.0, 3.0 };
+
+CPPUNIT_ASSERT_DOUBLES_EQUAL(6.0, aTuple.getX(), 1e-2);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(11.0, aTuple.getY(), 1e-2);
+
+B2ITuple aTupleInt(4, 8);
+aTupleInt += { 2, 3 };
+
+CPPUNIT_ASSERT_EQUAL(sal_Int32(6), aTupleInt.getX());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(11), aTupleInt.getY());
+
+B2I64Tuple aTuple64(4, 8);
+aTuple64 += { 2, 3 };
+
+CPPUNIT_ASSERT_EQUAL(sal_Int64(6), aTuple64.getX());
+CPPUNIT_ASSERT_EQUAL(sal_Int64(11), aTuple64.getY());
+}
+
+void testOperatorSubstraction()
+{
+B2DTuple aTuple(4.0, 8.0);
+aTuple -= { 2.0, 3.0 };
+
+CPPUNIT_ASSERT_DOUBLES_EQUAL(2.0, aTuple.getX(), 1e-2);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(5.0, aTuple.getY(), 1e-2);
+
+B2ITuple a

[Libreoffice-commits] core.git: include/basegfx

2021-06-16 Thread Tomaž Vajngerl (via logerrit)
 include/basegfx/numeric/ftools.hxx |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit e337b9d92c6d5184e160df66885f53ebc4835218
Author: Tomaž Vajngerl 
AuthorDate: Wed Jun 16 20:46:27 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu Jun 17 01:55:32 2021 +0200

basegfx: change template param to use int instead bool

Change-Id: I5e0f52ba9b9a82ad702204a2d35ea49a8d74aa55
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117326
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/basegfx/numeric/ftools.hxx 
b/include/basegfx/numeric/ftools.hxx
index b72f069cb875..31d3e585cedd 100644
--- a/include/basegfx/numeric/ftools.hxx
+++ b/include/basegfx/numeric/ftools.hxx
@@ -172,57 +172,57 @@ namespace basegfx
 inline double getSmallValue() { return 0.1f; }
 
 /// Compare against small value
-template ::value, bool>::type = false>
+template , 
int> = 0>
 inline bool equalZero(const T& rfVal)
 {
 return (fabs(rfVal) <= getSmallValue());
 }
 
 /// Compare against given small value
-template ::value, bool>::type = false>
+template , 
int> = 0>
 inline bool equalZero(const T& rfVal, const T& rfSmallValue)
 {
 return (fabs(rfVal) <= rfSmallValue);
 }
 
-template ::value, bool>::type = false>
+template , 
int> = 0>
 inline bool equal(T const& rfValA, T const& rfValB)
 {
 // changed to approxEqual usage for better numerical correctness
 return rtl_math_approxEqual(rfValA, rfValB);
 }
 
-template ::value, bool>::type = false>
+template , 
int> = 0>
 inline bool equal(const T& rfValA, const T& rfValB, const T& 
rfSmallValue)
 {
 return (fabs(rfValA - rfValB) <= rfSmallValue);
 }
 
-template ::value, bool>::type = false>
+template , 
int> = 0>
 inline bool less(const T& rfValA, const T& rfValB)
 {
 return (rfValA < rfValB && !equal(rfValA, rfValB));
 }
 
-template ::value, bool>::type = false>
+template , 
int> = 0>
 inline bool lessOrEqual(const T& rfValA, const T& rfValB)
 {
 return (rfValA < rfValB || equal(rfValA, rfValB));
 }
 
-template ::value, bool>::type = false>
+template , 
int> = 0>
 inline bool more(const T& rfValA, const T& rfValB)
 {
 return (rfValA > rfValB && !equal(rfValA, rfValB));
 }
 
-template ::value, bool>::type = false>
+template , 
int> = 0>
 inline bool moreOrEqual(const T& rfValA, const T& rfValB)
 {
 return (rfValA > rfValB || equal(rfValA, rfValB));
 }
 
-template ::value, bool>::type = false>
+template , 
int> = 0>
 inline bool betweenOrEqualEither(const T& rfValA, const T& rfValB, 
const T& rfValC)
 {
 return (rfValA > rfValB && rfValA < rfValC) || equal(rfValA, 
rfValB) || equal(rfValA, rfValC);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/tags/cp-6.4-41'

2021-06-16 Thread Andras Timar (via logerrit)
Tag 'cp-6.4-41' created by Andras Timar  at 
2021-06-16 21:33 +

cp-6.4-41

Changes since cp-6.4-39-17:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/tags/cp-6.4-40' - 0 commits -

2021-06-16 Thread (via logerrit)
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/tags/cp-6.4-40' - desktop/source

2021-06-16 Thread Mike Kaganski (via logerrit)
Rebased ref, commits from common ancestor:
commit eb20f085489d2467935f2086b0ebdaf433b5ef21
Author: Mike Kaganski 
AuthorDate: Mon Jun 14 14:28:04 2021 +0200
Commit: Andras Timar 
CommitDate: Wed Jun 16 23:13:11 2021 +0200

Use FontList::GetFirstFontMetric instead of custom iteration code

Besides code deduplication, this takes care of case-insensitive search.
Also fall back to a default font in case of no match in doc_renderFont*.

Change-Id: Ica45ca10c374cf6581ba2f6b60563d6a1447232a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117121
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117184
Tested-by: Jenkins CollaboraOffice 
Tested-by: Aron Budea 
Reviewed-by: Aron Budea 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 34853628f1d6..b06f5900912f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1220,6 +1220,26 @@ rtl::Reference 
forceSetClipboardForCurrentView(LibreOfficeKitDocum
 
 #endif
 
+const vcl::Font* FindFont(const OUString& rFontName)
+{
+SfxObjectShell* pDocSh = SfxObjectShell::Current();
+const SvxFontListItem* pFonts
+= static_cast(pDocSh->GetItem(SID_ATTR_CHAR_FONTLIST));
+const FontList* pList = pFonts ? pFonts->GetFontList() : nullptr;
+if (pList && !rFontName.isEmpty())
+if (sal_Handle hMetric = pList->GetFirstFontMetric(rFontName))
+return &FontList::GetFontMetric(hMetric);
+return nullptr;
+}
+
+vcl::Font FindFont_FallbackToDefault(const OUString& rFontName)
+{
+if (auto pFound = FindFont(rFontName))
+return *pFound;
+
+return OutputDevice::GetDefaultFont(DefaultFontType::SANS_UNICODE, 
LANGUAGE_NONE,
+GetDefaultFontFlags::NONE);
+}
 } // anonymous namespace
 
 LibLODocument_Impl::LibLODocument_Impl(const uno::Reference 
 &xComponent, int nDocumentId)
@@ -4684,43 +4704,25 @@ static char* getFonts (const char* pCommand)
 static char* getFontSubset (const OString& aFontName)
 {
 OUString aFoundFont(::rtl::Uri::decode(OStringToOUString(aFontName, 
RTL_TEXTENCODING_UTF8), rtl_UriDecodeStrict, RTL_TEXTENCODING_UTF8));
-SfxObjectShell* pDocSh = SfxObjectShell::Current();
-const SvxFontListItem* pFonts = static_cast(
-pDocSh->GetItem(SID_ATTR_CHAR_FONTLIST));
-const FontList* pList = pFonts ? pFonts->GetFontList() : nullptr;
 
 boost::property_tree::ptree aTree;
 aTree.put("commandName", ".uno:FontSubset");
 boost::property_tree::ptree aValues;
 
-if ( pList && !aFoundFont.isEmpty() )
+if (const vcl::Font* pFont = FindFont(aFoundFont))
 {
-sal_uInt16 nFontCount = pList->GetFontNameCount();
-sal_uInt16 nItFont = 0;
-for (; nItFont < nFontCount; ++nItFont)
-{
-if (aFoundFont == pList->GetFontName(nItFont).GetFamilyName())
-{
-break;
-}
-}
+FontCharMapRef xFontCharMap (new FontCharMap());
+auto aDevice(VclPtr::Create(DeviceFormat::DEFAULT));
 
-if ( nItFont < nFontCount )
-{
-FontCharMapRef xFontCharMap (new FontCharMap());
-auto aDevice(VclPtr::Create(DeviceFormat::DEFAULT));
-const vcl::Font& aFont(pList->GetFontName(nItFont));
+aDevice->SetFont(*pFont);
+aDevice->GetFontCharMap(xFontCharMap);
+SubsetMap aSubMap(xFontCharMap);
 
-aDevice->SetFont(aFont);
-aDevice->GetFontCharMap(xFontCharMap);
-SubsetMap aSubMap(xFontCharMap);
-
-for (auto const& subset : aSubMap.GetSubsetMap())
-{
-boost::property_tree::ptree aChild;
-aChild.put("", 
static_cast(ublock_getCode(subset.GetRangeMin(;
-aValues.push_back(std::make_pair("", aChild));
-}
+for (auto const& subset : aSubMap.GetSubsetMap())
+{
+boost::property_tree::ptree aChild;
+aChild.put("", 
static_cast(ublock_getCode(subset.GetRangeMin(;
+aValues.push_back(std::make_pair("", aChild));
 }
 }
 
@@ -5341,98 +5343,80 @@ unsigned char* 
doc_renderFontOrientation(SAL_UNUSED_PARAMETER LibreOfficeKitDocu
 SolarMutexGuard aGuard;
 SetLastExceptionMsg();
 
-OString aSearchedFontName(pFontName);
-OUString aText(OStringToOUString(pChar, RTL_TEXTENCODING_UTF8));
-SfxObjectShell* pDocSh = SfxObjectShell::Current();
-const SvxFontListItem* pFonts = static_cast(
-pDocSh->GetItem(SID_ATTR_CHAR_FONTLIST));
-const FontList* pList = pFonts ? pFonts->GetFontList() : nullptr;
-
 const int nDefaultFontSize = 25;
 
-if ( pList )
-{
-sal_uInt16 nFontCount = pList->GetFontNameCount();
-for (sal_uInt16 i = 0; i < nFontCount; ++i)
-{
-const FontMetric& rFontMetric = pList->GetFontName(i);
-   

[Libreoffice-commits] core.git: comphelper/source l10ntools/source sal/osl sc/source unotools/source

2021-06-16 Thread Stephan Bergmann (via logerrit)
 comphelper/source/xml/xmltools.cxx   |2 +-
 l10ntools/source/po.cxx  |4 ++--
 sal/osl/unx/uunxapi.cxx  |2 +-
 sc/source/filter/excel/xestream.cxx  |2 +-
 sc/source/filter/html/htmlexp.cxx|2 +-
 sc/source/filter/xcl97/XclExpChangeTrack.cxx |4 ++--
 unotools/source/i18n/resmgr.cxx  |2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 433ab39b2175bdadb4916373cd2dc8e1aabc08a5
Author: Stephan Bergmann 
AuthorDate: Wed Jun 16 16:14:24 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 16 23:05:34 2021 +0200

Adapt implicit OString return value construction to C++23 P2266R1

With the recent implementation of
 
"P2266R1:
Simpler implicit move" in Clang 13 trunk as


"[clang] Implement P2266 Simpler implicit move", a --with-latest-c++ build
started to fail with

> comphelper/source/xml/xmltools.cxx:103:20: error: no viable conversion 
from returned value of type 'char [39]' to function return type 'rtl::OString'
> return str;
>^~~
[...]
> include/rtl/string.hxx:277:5: note: candidate constructor [with T = char 
[39]] not viable: expects an lvalue for 1st argument
> OString( T& value, typename 
libreoffice_internal::NonConstCharArrayDetector< T, libreoffice_internal::Dummy 
>::Type = libreoffice_internal::Dummy() )
> ^
[...]

etc.

Change-Id: If34f143a1855fdd7cd22ea3d7594f9381d50a7ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117336
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/comphelper/source/xml/xmltools.cxx 
b/comphelper/source/xml/xmltools.cxx
index 74ad5faa67e7..366321076bad 100644
--- a/comphelper/source/xml/xmltools.cxx
+++ b/comphelper/source/xml/xmltools.cxx
@@ -100,7 +100,7 @@ namespace comphelper::xml
 aSeq[0], aSeq[1], aSeq[2], aSeq[3], aSeq[4], aSeq[5], 
aSeq[6], aSeq[7], aSeq[8],
 aSeq[9], aSeq[10], aSeq[11], aSeq[12], aSeq[13], aSeq[14], 
aSeq[15]);
 
-return str;
+return OString(str);
 }
 }
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 8d47a7d39410..2c0b4f88b254 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -427,7 +427,7 @@ OString PoEntry::genKeyId(const OString& rGenerator)
 nCRC >>= 6;
 }
 sKeyId[5] = '\0';
-return sKeyId;
+return OString(sKeyId);
 }
 
 namespace
@@ -439,7 +439,7 @@ namespace
 struct tm* pNow = localtime(&aNow);
 char pBuff[50];
 strftime( pBuff, sizeof pBuff, "%Y-%m-%d %H:%M%z", pNow );
-return pBuff;
+return OString(pBuff);
 }
 }
 
diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx
index 1f847cfd32a5..917476d7ab03 100644
--- a/sal/osl/unx/uunxapi.cxx
+++ b/sal/osl/unx/uunxapi.cxx
@@ -154,7 +154,7 @@ static OString macxp_resolveAliasAndConvert(OString const & 
p)
 {
 strcpy(path, p.getStr());
 macxp_resolveAlias(path, PATH_MAX);
-return path;
+return OString(path);
 }
 return p;
 }
diff --git a/sc/source/filter/excel/xestream.cxx 
b/sc/source/filter/excel/xestream.cxx
index ac63d34414b5..17395145bbab 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -705,7 +705,7 @@ OString XclXmlUtils::ToOString( const Color& rColor )
 char buf[9];
 sprintf( buf, "%.2X%.2X%.2X%.2X", rColor.GetAlpha(), rColor.GetRed(), 
rColor.GetGreen(), rColor.GetBlue() );
 buf[8] = '\0';
-return buf;
+return OString(buf);
 }
 
 OStringBuffer& XclXmlUtils::ToOString( OStringBuffer& s, const ScAddress& 
rAddress )
diff --git a/sc/source/filter/html/htmlexp.cxx 
b/sc/source/filter/html/htmlexp.cxx
index 270312f594ce..de0f438d2640 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -189,7 +189,7 @@ static OString lcl_makeHTMLColorTriplet(const Color& rColor)
 // hello
 snprintf( buf, 24, "\"#%02X%02X%02X\"", rColor.GetRed(), 
rColor.GetGreen(), rColor.GetBlue() );
 
-return buf;
+return OString(buf);
 }
 
 ScHTMLExport::ScHTMLExport( SvStream& rStrmP, const OUString& rBaseURL, 
ScDocument* pDocP,
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx 
b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index 5ddd4bf64d7e..225345836793 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -45,7 +45,7 @@ static OString lcl_GuidToOString( sal_uInt8 aGuid[ 16 ] )
 
"{%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
 aGuid[ 0 ], aGuid[ 1 ], aGuid[ 2 ],

Build fails on Linux in include/basegfx/numeric/ftools.hxx

2021-06-16 Thread Julien Nabet

Hello Tomaž,

On pc Debian x86-64 with master sources updated today + make clean, I got:

[CXX] ucbhelper/source/provider/resultsethelper.cxx
In file included from 
/home/julien/lo/libreoffice/libreofficekit/source/gtk/lokdocview.cxx:25:

In file included from /home/julien/lo/libreoffice/include/vcl/event.hxx:26:
In file included from 
/home/julien/lo/libreoffice/include/vcl/settings.hxx:24:
In file included from 
/home/julien/lo/libreoffice/include/tools/color.hxx:26:
In file included from 
/home/julien/lo/libreoffice/include/basegfx/color/bcolor.hxx:27:
In file included from 
/home/julien/lo/libreoffice/include/basegfx/tuple/b3dtuple.hxx:24:
/home/julien/lo/libreoffice/include/basegfx/numeric/ftools.hxx:175:103: 
error: implicit conversion (Dependent) from 'bool' to 'typename 
std::enable_if::value, bool>::type' 
[loplugin:implicitboolconversion]
    template std::enable_if::value, bool>::type = false>

^
/home/julien/lo/libreoffice/include/basegfx/numeric/ftools.hxx:182:103: 
error: implicit conversion (Dependent) from 'bool' to 'typename 
std::enable_if::value, bool>::type' 
[loplugin:implicitboolconversion]
    template std::enable_if::value, bool>::type = false>

^
/home/julien/lo/libreoffice/include/basegfx/numeric/ftools.hxx:188:103: 
error: implicit conversion (Dependent) from 'bool' to 'typename 
std::enable_if::value, bool>::type' 
[loplugin:implicitboolconversion]
    template std::enable_if::value, bool>::type = false>

^
/home/julien/lo/libreoffice/include/basegfx/numeric/ftools.hxx:195:103: 
error: implicit conversion (Dependent) from 'bool' to 'typename 
std::enable_if::value, bool>::type' 
[loplugin:implicitboolconversion]
    template std::enable_if::value, bool>::type = false>

^
/home/julien/lo/libreoffice/include/basegfx/numeric/ftools.hxx:201:103: 
error: implicit conversion (Dependent) from 'bool' to 'typename 
std::enable_if::value, bool>::type' 
[loplugin:implicitboolconversion]
    template std::enable_if::value, bool>::type = false>

^
/home/julien/lo/libreoffice/include/basegfx/numeric/ftools.hxx:207:103: 
error: implicit conversion (Dependent) from 'bool' to 'typename 
std::enable_if::value, bool>::type' 
[loplugin:implicitboolconversion]
    template std::enable_if::value, bool>::type = false>

^
/home/julien/lo/libreoffice/include/basegfx/numeric/ftools.hxx:213:103: 
error: implicit conversion (Dependent) from 'bool' to 'typename 
std::enable_if::value, bool>::type' 
[loplugin:implicitboolconversion]
    template std::enable_if::value, bool>::type = false>

^
/home/julien/lo/libreoffice/include/basegfx/numeric/ftools.hxx:219:103: 
error: implicit conversion (Dependent) from 'bool' to 'typename 
std::enable_if::value, bool>::type' 
[loplugin:implicitboolconversion]
    template std::enable_if::value, bool>::type = false>

^
/home/julien/lo/libreoffice/include/basegfx/numeric/ftools.hxx:225:103: 
error: implicit conversion (Dependent) from 'bool' to 'typename 
std::enable_if::value, bool>::type' 
[loplugin:implicitboolconversion]
    template std::enable_if::value, bool>::type = false>

^

Noticing 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=e838c1b9e9031de742deeff763c06b1d39f399ef:


author    Tomaž Vajngerl     2021-06-14 
20:11:34 +0900

committer    Tomaž Vajngerl     2021-06-16 10:47:27 +0200
commit    e838c1b9e9031de742deeff763c06b1d39f399ef (patch)
tree    348e261e849cfa607b4117f7e788ca24d1a52d80
parent    bf6dabe0ebad3cc5bc0edc04ae74fba0190b6203 (diff)
basegfx: use namespace for "ftools", make sure input is FP number
Don't use empty class with static methods for ftools, but just
use namespace instead. Also make sure it works with any floating
point numbers (float and double) and don't allow input if it is
anything else than a floating point number


Thought you might have some idea.

Here's my autogen.input:

CC=clang
CXX=clang++
--enable-compiler-plugins
--enable-dbgutil
--enable-evolution2
--enable-qt5
--enable-kf5
--enable-gtk3-kde5
--enable-skia=debug
--enable-ext-nlpsolver
--enable-ext-ct2n
--enable-ext-numbertext
--enable-ext-wiki-publisher
--enable-dbus
--enable-werror
--enable-dependency-tracking
--enable-python=fully-internal
--without-system-mariadb
--enable-bundle-mariadb
--enable-symbols
--enable-avahi
--enable-eot
--enable-odk
--with-lang=en-US es fr pt pt-BR it de ru
--with-myspell-dicts

Debian clang version 11.0.1-2

GNU ld (GNU Binutils for Debian) 2.35.2

ldd (Debian GLIBC 2.31-12) 2.31

Regards,

Julien

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: vcl/unx

2021-06-16 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkdata.cxx |   45 +++--
 vcl/unx/gtk3/gtkinst.cxx |   14 --
 2 files changed, 35 insertions(+), 24 deletions(-)

New commits:
commit cb636701881df38f3092d499142acbf62f4eff3c
Author: Caolán McNamara 
AuthorDate: Wed Jun 16 15:20:58 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 16 21:44:35 2021 +0200

gtk4: redo theme unwanted active tab in overflow notebook into invisiblity

don't quite see why this doesn't work out of the box in gtk4, but
putting it into the application-level style provider and using it via a
style class works and probably makes more sense anyway.

Change-Id: I4de196e462d7440174a0d67be25923bddab68197
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117337
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/gtkdata.cxx b/vcl/unx/gtk3/gtkdata.cxx
index 63ed47d6c8c3..65be8189d3f0 100644
--- a/vcl/unx/gtk3/gtkdata.cxx
+++ b/vcl/unx/gtk3/gtkdata.cxx
@@ -417,30 +417,39 @@ bool GtkSalData::Yield( bool bWait, bool 
bHandleAllCurrentEvents )
 return bWasEvent;
 }
 
-static GtkStyleProvider* CreateSmallButtonProvider()
+static GtkStyleProvider* CreateStyleProvider()
 {
 /*
-   set a provider to allow certain widgets to have no padding
+   set a provider to:
 
-   a) little close button in menubar to close back to start-center
-   b) and small buttons in view->data sources (button.small-button)
-   c) small toolbar button in infobars (toolbar.small-button button)
-   d) comboboxes in the data browser for tdf#137695 (box#combobox 
button.small-button,
+   1) allow certain widgets to have no padding
+
+   1.a) little close button in menubar to close back to start-center
+   1.b) and small buttons in view->data sources (button.small-button)
+   1.c) small toolbar button in infobars (toolbar.small-button button)
+   1.d) comboboxes in the data browser for tdf#137695 (box#combobox 
button.small-button,
   which would instead be combobox button.small-button if we didn't 
replace GtkComboBox,
   see GtkInstanceComboBox for an explanation for why we do that)
-   e) entry in the data browser for tdf#137695 (entry.small-button)
+   1.e) entry in the data browser for tdf#137695 (entry.small-button)
+
+   2) hide the unwanted active tab in an 'overflow' notebook of 
double-decker notebooks.
+  (tdf#122623) it's nigh impossible to have a GtkNotebook without an 
active (checked) tab,
+  so theme the unwanted tab into invisibility
 */
-GtkCssProvider* pSmallButtonProvider = gtk_css_provider_new();
+GtkCssProvider* pStyleProvider = gtk_css_provider_new();
 static const gchar data[] =
   "button.small-button, toolbar.small-button button, combobox.small-button 
*.combo, box#combobox.small-button *.combo, entry.small-button { "
-  "padding: 0;"
-  "margin-left: 0px;"
-  "margin-right: 0px;"
-  "min-height: 18px;"
-  "min-width: 18px;"
-  "}";
-css_provider_load_from_data(pSmallButtonProvider, data, -1);
-return GTK_STYLE_PROVIDER(pSmallButtonProvider);
+  "padding: 0; margin-left: 0px; margin-right: 0px;"
+  "min-height: 18px; min-width: 18px; }"
+  "notebook.overflow > header.top > tabs > tab:checked { "
+  "box-shadow: none; padding: 0 0 0 0; margin: 0 0 0 0;"
+  "border-image: none; border-image-width: 0 0 0 0;"
+  "background-image: none; background-color: transparent;"
+  "border-radius: 0 0 0 0; border-width: 0 0 0 0;"
+  "border-style: none; border-color: transparent;"
+  "opacity: 0; min-height: 0; min-width: 0; }";
+css_provider_load_from_data(pStyleProvider, data, -1);
+return GTK_STYLE_PROVIDER(pStyleProvider);
 }
 
 void GtkSalData::Init()
@@ -543,7 +552,7 @@ void GtkSalData::Init()
 GListModel *pMonitors = gdk_display_get_monitors(pGdkDisp);
 g_signal_connect(pMonitors, "items-changed", 
G_CALLBACK(signalMonitorsChanged), pDisplay);
 
-gtk_style_context_add_provider_for_display(pGdkDisp, 
CreateSmallButtonProvider(),
+gtk_style_context_add_provider_for_display(pGdkDisp, CreateStyleProvider(),
 GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
 #else
 int nScreens = gdk_display_get_n_screens( pGdkDisp );
@@ -561,7 +570,7 @@ void GtkSalData::Init()
 g_signal_connect( G_OBJECT(pScreen), "monitors-changed",
   G_CALLBACK(signalMonitorsChanged), pDisplay );
 
-gtk_style_context_add_provider_for_screen(pScreen, 
CreateSmallButtonProvider(),
+gtk_style_context_add_provider_for_screen(pScreen, 
CreateStyleProvider(),
 GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
 }
 #endif
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 3236d3bd9600..de09ae503a21 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -8045,6 +8045,9 @@ private:
 #if !GTK_CHECK_VERSION(4

[Libreoffice-commits] core.git: vcl/unx

2021-06-16 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |   60 +--
 1 file changed, 38 insertions(+), 22 deletions(-)

New commits:
commit f81c1414c0e30713b5fea544cae5f50a330b99e3
Author: Caolán McNamara 
AuthorDate: Wed Jun 16 14:45:51 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 16 21:44:05 2021 +0200

gtk4: partial restoration of double-decker notebooks

there isn't an obvious candidate as to when to do the split though

Change-Id: Iee6d74015263b180470fc0c90924617bcde14421
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117334
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 8253392cf306..3236d3bd9600 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -4998,6 +4998,32 @@ IMPL_LINK_NOARG(ChildFrame, ImplHandleLayoutTimerHdl, 
Timer*, void)
 Layout();
 }
 
+void container_remove(GtkWidget* pContainer, GtkWidget* pChild)
+{
+#if !GTK_CHECK_VERSION(4, 0, 0)
+gtk_container_remove(GTK_CONTAINER(pContainer), pChild);
+#else
+assert(GTK_IS_BOX(pContainer) || GTK_IS_GRID(pContainer));
+if (GTK_IS_BOX(pContainer))
+gtk_box_remove(GTK_BOX(pContainer), pChild);
+else if (GTK_IS_GRID(pContainer))
+gtk_grid_remove(GTK_GRID(pContainer), pChild);
+#endif
+}
+
+void container_add(GtkWidget* pContainer, GtkWidget* pChild)
+{
+#if !GTK_CHECK_VERSION(4, 0, 0)
+gtk_container_add(GTK_CONTAINER(pContainer), pChild);
+#else
+assert(GTK_IS_BOX(pContainer) || GTK_IS_GRID(pContainer));
+if (GTK_IS_BOX(pContainer))
+gtk_box_append(GTK_BOX(pContainer), pChild);
+else if (GTK_IS_GRID(pContainer))
+gtk_grid_attach(GTK_GRID(pContainer), pChild, 0, 0, 1, 1);
+#endif
+}
+
 class GtkInstanceContainer : public GtkInstanceWidget, public virtual 
weld::Container
 {
 private:
@@ -5095,30 +5121,14 @@ public:
 GtkWidget* pChild = pGtkWidget->getWidget();
 g_object_ref(pChild);
 auto pOldContainer = getContainer();
-#if !GTK_CHECK_VERSION(4, 0, 0)
-gtk_container_remove(pOldContainer, pChild);
-#else
-assert(GTK_IS_BOX(pOldContainer) || GTK_IS_GRID(pOldContainer));
-if (GTK_IS_BOX(pOldContainer))
-gtk_box_remove(GTK_BOX(pOldContainer), pChild);
-else if (GTK_IS_GRID(pOldContainer))
-gtk_grid_remove(GTK_GRID(pOldContainer), pChild);
-#endif
+container_remove(GTK_WIDGET(pOldContainer), pChild);
 
 GtkInstanceContainer* pNewGtkParent = 
dynamic_cast(pNewParent);
 assert(!pNewParent || pNewGtkParent);
 if (pNewGtkParent)
 {
 auto pNewContainer = pNewGtkParent->getContainer();
-#if !GTK_CHECK_VERSION(4, 0, 0)
-gtk_container_add(pNewContainer, pChild);
-#else
-assert(GTK_IS_BOX(pNewContainer) || GTK_IS_GRID(pNewContainer));
-if (GTK_IS_BOX(pNewContainer))
-gtk_box_append(GTK_BOX(pNewContainer), pChild);
-else if (GTK_IS_GRID(pNewContainer))
-gtk_grid_attach(GTK_GRID(pNewContainer), pChild, 0, 0, 1, 1);
-#endif
+container_add(GTK_WIDGET(pNewContainer), pChild);
 }
 g_object_unref(pChild);
 }
@@ -7995,18 +8005,24 @@ private:
 
 void make_overflow_boxes()
 {
-#if !GTK_CHECK_VERSION(4, 0, 0)
 m_pOverFlowBox = GTK_BOX(gtk_box_new(GTK_ORIENTATION_VERTICAL, 0));
 GtkWidget* pParent = gtk_widget_get_parent(GTK_WIDGET(m_pNotebook));
-gtk_container_add(GTK_CONTAINER(pParent), GTK_WIDGET(m_pOverFlowBox));
+container_add(pParent, GTK_WIDGET(m_pOverFlowBox));
+#if GTK_CHECK_VERSION(4, 0, 0)
+gtk_box_append(m_pOverFlowBox, GTK_WIDGET(m_pOverFlowNotebook));
+#else
 gtk_box_pack_start(m_pOverFlowBox, GTK_WIDGET(m_pOverFlowNotebook), 
false, false, 0);
+#endif
 g_object_ref(m_pNotebook);
-gtk_container_remove(GTK_CONTAINER(pParent), GTK_WIDGET(m_pNotebook));
+container_remove(pParent, GTK_WIDGET(m_pNotebook));
+#if GTK_CHECK_VERSION(4, 0, 0)
+gtk_box_append(m_pOverFlowBox, GTK_WIDGET(m_pNotebook));
+#else
 gtk_box_pack_start(m_pOverFlowBox, GTK_WIDGET(m_pNotebook), true, 
true, 0);
+#endif
 // coverity[freed_arg : FALSE] - this does not free m_pNotebook , it 
is reffed by pParent
 g_object_unref(m_pNotebook);
 gtk_widget_show(GTK_WIDGET(m_pOverFlowBox));
-#endif
 }
 
 void split_notebooks()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/unx

2021-06-16 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 04895980c096826a63b10ec648627b5007b0a884
Author: Caolán McNamara 
AuthorDate: Wed Jun 16 14:30:26 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 16 21:43:41 2021 +0200

gtk4: Notebook label is now inside another widget

Change-Id: If1f37959603dbe10e01d492321e9324ab55f10d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117333
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 6ac555d63d95..8253392cf306 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -8140,7 +8140,12 @@ private:
 for (gint i = 0; i < nPages; ++i)
 {
 GtkWidget* pTabWidget = 
gtk_notebook_get_tab_label(m_pNotebook, gtk_notebook_get_nth_page(m_pNotebook, 
i));
-if (!gtk_widget_get_child_visible(pTabWidget))
+#if GTK_CHECK_VERSION(4, 0, 0)
+bool bTabVisible = 
gtk_widget_get_child_visible(gtk_widget_get_parent(pTabWidget));
+#else
+bool bTabVisible = gtk_widget_get_child_visible(pTabWidget);
+#endif
+if (!bTabVisible)
 {
 m_nLaunchSplitTimeoutId = 
g_timeout_add_full(G_PRIORITY_HIGH_IDLE, 0, 
reinterpret_cast(launch_split_notebooks), this, nullptr);
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/unx

2021-06-16 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit e3a7d0152518d5de99d61f61bed77b59987d03d2
Author: Caolán McNamara 
AuthorDate: Wed Jun 16 12:50:52 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 16 21:43:09 2021 +0200

gtk4: add some working dialogs

Change-Id: Iac09640fe05110ef01cd7e4645b5a9e0ea8eb48e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117328
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 6e5917a40356..6ac555d63d95 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -22278,6 +22278,7 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* 
pParent, const OUString&
 rUIFile != "cui/ui/optjsearchpage.ui" &&
 rUIFile != "cui/ui/optlingupage.ui" &&
 rUIFile != "cui/ui/optnewdictionarydialog.ui" &&
+rUIFile != "cui/ui/pageformatpage.ui" &&
 rUIFile != "cui/ui/pastespecial.ui" &&
 rUIFile != "cui/ui/patterntabpage.ui" &&
 rUIFile != "cui/ui/percentdialog.ui" &&
@@ -22321,6 +22322,7 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* 
pParent, const OUString&
 rUIFile != "sfx/ui/licensedialog.ui" &&
 rUIFile != "sfx/ui/linefragment.ui" &&
 rUIFile != "sfx/ui/loadtemplatedialog.ui" &&
+rUIFile != "sfx/ui/managestylepage.ui" &&
 rUIFile != "sfx/ui/password.ui" &&
 rUIFile != "sfx/ui/printeroptionsdialog.ui" &&
 rUIFile != "sfx/ui/safemodequerydialog.ui" &&
@@ -22346,6 +22348,7 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* 
pParent, const OUString&
 rUIFile != "svx/ui/docrecoverysavedialog.ui" &&
 rUIFile != "svx/ui/findreplacedialog.ui" &&
 rUIFile != "svx/ui/fontworkgallerydialog.ui" &&
+rUIFile != "svx/ui/headfootformatpage.ui" &&
 rUIFile != "modules/BasicIDE/ui/basicmacrodialog.ui" &&
 rUIFile != "modules/BasicIDE/ui/dialogpage.ui" &&
 rUIFile != "modules/BasicIDE/ui/libpage.ui" &&
@@ -22419,6 +22422,7 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* 
pParent, const OUString&
 rUIFile != "modules/swriter/ui/endnotepage.ui" &&
 rUIFile != "modules/swriter/ui/exchangedatabases.ui" &&
 rUIFile != "modules/swriter/ui/footendnotedialog.ui" &&
+rUIFile != "modules/swriter/ui/footnoteareapage.ui" &&
 rUIFile != "modules/swriter/ui/footnotepage.ui" &&
 rUIFile != "modules/swriter/ui/footnotesendnotestabpage.ui" &&
 rUIFile != "modules/swriter/ui/framedialog.ui" &&
@@ -22445,6 +22449,8 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* 
pParent, const OUString&
 rUIFile != "modules/swriter/ui/renameobjectdialog.ui" &&
 rUIFile != "modules/swriter/ui/sectionpage.ui" &&
 rUIFile != "modules/swriter/ui/statisticsinfopage.ui" &&
+rUIFile != "modules/swriter/ui/templatedialog8.ui" &&
+rUIFile != "modules/swriter/ui/textgridpage.ui" &&
 rUIFile != "modules/swriter/ui/titlepage.ui" &&
 rUIFile != "modules/swriter/ui/watermarkdialog.ui" &&
 rUIFile != "modules/swriter/ui/wrappage.ui" &&
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bin/ui-rules-enforcer.py chart2/uiconfig cui/uiconfig sc/uiconfig sw/uiconfig

2021-06-16 Thread Caolán McNamara (via logerrit)
 bin/ui-rules-enforcer.py  |   17 +
 chart2/uiconfig/ui/sidebarerrorbar.ui |1 -
 chart2/uiconfig/ui/tp_3D_SceneGeometry.ui |1 -
 chart2/uiconfig/ui/tp_Trendline.ui|1 -
 cui/uiconfig/ui/textflowpage.ui   |1 -
 sc/uiconfig/scalc/ui/splitcolumnentry.ui  |1 -
 sw/uiconfig/swriter/ui/textgridpage.ui|1 -
 7 files changed, 17 insertions(+), 6 deletions(-)

New commits:
commit 0f8c44ce269f8f2a8563bd3682349ebfb2db1f70
Author: Caolán McNamara 
AuthorDate: Wed Jun 16 12:57:48 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 16 21:42:48 2021 +0200

remove SpinButton input-purpose properties

Change-Id: I68629d4350c43c80fdd00f9fcb8af3733753fe43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117327
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/bin/ui-rules-enforcer.py b/bin/ui-rules-enforcer.py
index 2624b441aa3b..644f8d0ba431 100755
--- a/bin/ui-rules-enforcer.py
+++ b/bin/ui-rules-enforcer.py
@@ -192,6 +192,22 @@ def remove_check_button_align(current):
 raise Exception(sys.argv[1] + ': non-default yalign', yalign.text)
   current.remove(yalign)
 
+def remove_spin_button_input_purpose(current):
+  input_purpose = None
+  isspinbutton = current.get('class') == "GtkSpinButton"
+  for child in current:
+remove_spin_button_input_purpose(child)
+if not isspinbutton:
+continue
+if child.tag == "property":
+  attributes = child.attrib
+  if attributes.get("name") == "input_purpose" or attributes.get("name") 
== "input-purpose":
+input_purpose = child
+
+  if isspinbutton:
+if input_purpose != None:
+  current.remove(input_purpose)
+
 def remove_track_visited_links(current):
   track_visited_links = None
   islabel = current.get('class') == "GtkLabel"
@@ -332,6 +348,7 @@ if not sys.argv[1].endswith('/multiline.ui'): # let this 
one alone not truncate
 replace_button_use_stock(root)
 replace_image_stock(root)
 remove_check_button_align(root)
+remove_spin_button_input_purpose(root)
 remove_track_visited_links(root)
 remove_expander_label_fill(root)
 remove_expander_spacing(root)
diff --git a/chart2/uiconfig/ui/sidebarerrorbar.ui 
b/chart2/uiconfig/ui/sidebarerrorbar.ui
index ac2daba8f517..7ffdc3a68192 100644
--- a/chart2/uiconfig/ui/sidebarerrorbar.ui
+++ b/chart2/uiconfig/ui/sidebarerrorbar.ui
@@ -130,7 +130,6 @@
 True
 start
 0.00
-alpha
 adjustmentNEG
 True
 2
diff --git a/chart2/uiconfig/ui/tp_3D_SceneGeometry.ui 
b/chart2/uiconfig/ui/tp_3D_SceneGeometry.ui
index d6e74c77def1..ef8e6e0ec0fa 100644
--- a/chart2/uiconfig/ui/tp_3D_SceneGeometry.ui
+++ b/chart2/uiconfig/ui/tp_3D_SceneGeometry.ui
@@ -143,7 +143,6 @@
 True
 True
 True
-alpha
 adjustmentROTATION3
 True
 
diff --git a/chart2/uiconfig/ui/tp_Trendline.ui 
b/chart2/uiconfig/ui/tp_Trendline.ui
index df04260bba57..5698ed56ae83 100644
--- a/chart2/uiconfig/ui/tp_Trendline.ui
+++ b/chart2/uiconfig/ui/tp_Trendline.ui
@@ -578,7 +578,6 @@
 0
 True
 False
-number
 adjustmentForwardBackward2
 2
 
diff --git a/cui/uiconfig/ui/textflowpage.ui b/cui/uiconfig/ui/textflowpage.ui
index 2d9ac00bacf6..2a8a39c4abaf 100644
--- a/cui/uiconfig/ui/textflowpage.ui
+++ b/cui/uiconfig/ui/textflowpage.ui
@@ -133,7 +133,6 @@
 start
 25
 True
-number
 adjustment1
 True
 
diff --git a/sc/uiconfig/scalc/ui/splitcolumnentry.ui 
b/sc/uiconfig/scalc/ui/splitcolumnentry.ui
index d96747687850..dd7b299c44e1 100644
--- a/sc/uiconfig/scalc/ui/splitcolumnentry.ui
+++ b/sc/uiconfig/scalc/ui/splitcolumnentry.ui
@@ -69,7 +69,6 @@
   
 True
 True
-digits
 True
 True
 -1
diff --git a/sw/uiconfig/swriter/ui/textgridpage.ui 
b/sw/uiconfig/swriter/ui/textgridpage.ui
index 20b61c09b628..583361f62987 100644
--- a/sw/uiconfig/swriter/ui/textgridpage.ui
+++ b/sw/uiconfig/swriter/ui/textgridpage.ui
@@ -268,7 +268,6 @@
   
 True
 True
-digits
 adjustmentLINESPERPAGE
 True
 True
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - dictionaries

2021-06-16 Thread Stanislav Horacek (via logerrit)
 dictionaries |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 548c0c5cac19dd9832456e5e6b5826797f4283e9
Author: Stanislav Horacek 
AuthorDate: Wed Jun 16 19:41:59 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Jun 16 19:41:59 2021 +0200

Update git submodules

* Update dictionaries from branch 'libreoffice-7-2'
  to e90526115e6faded4306991a1abc752f198b7487
  - Czech Hunspell: fix word "třídička"

Change-Id: I36236d34249e9a8c5e8bfa48b30a26cf595d309b
Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/117344
Tested-by: Stanislav Horáček 
Reviewed-by: Stanislav Horáček 

diff --git a/dictionaries b/dictionaries
index 7a03e9074d6b..e90526115e6f 16
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit 7a03e9074d6b156821828cd687dc1087ff373bba
+Subproject commit e90526115e6faded4306991a1abc752f198b7487
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dictionaries.git: Branch 'libreoffice-7-2' - cs_CZ/cs_CZ.dic

2021-06-16 Thread Stanislav Horacek (via logerrit)
 cs_CZ/cs_CZ.dic |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e90526115e6faded4306991a1abc752f198b7487
Author: Stanislav Horacek 
AuthorDate: Wed Jun 16 19:34:55 2021 +0200
Commit: Stanislav Horáček 
CommitDate: Wed Jun 16 19:41:59 2021 +0200

Czech Hunspell: fix word "třídička"

Change-Id: I36236d34249e9a8c5e8bfa48b30a26cf595d309b
Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/117344
Tested-by: Stanislav Horáček 
Reviewed-by: Stanislav Horáček 

diff --git a/cs_CZ/cs_CZ.dic b/cs_CZ/cs_CZ.dic
index 0a75d87..1b444e0 100644
--- a/cs_CZ/cs_CZ.dic
+++ b/cs_CZ/cs_CZ.dic
@@ -218699,7 +218699,7 @@ třídeskový/YR
 třídicí/Y
 třídící/YN
 třídič/S
-třídička/Z
+třídička/ZQ
 třídílný/YKRN
 třídimenzionální/YKR
 třídírenský/YR
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dictionaries

2021-06-16 Thread Stanislav Horacek (via logerrit)
 dictionaries |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7c49bd291ce1c77cbbf793d728cd2bafe90d8591
Author: Stanislav Horacek 
AuthorDate: Wed Jun 16 19:41:00 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Jun 16 19:41:00 2021 +0200

Update git submodules

* Update dictionaries from branch 'master'
  to 8cd38fb5138f2e456506aaa889ec2b7042a7439e
  - Czech Hunspell: fix word "třídička"

Change-Id: I36236d34249e9a8c5e8bfa48b30a26cf595d309b
Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/117343
Tested-by: Stanislav Horáček 
Reviewed-by: Stanislav Horáček 

diff --git a/dictionaries b/dictionaries
index 29eb2930309a..8cd38fb5138f 16
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit 29eb2930309a484a6090c474353f99a2c01d1703
+Subproject commit 8cd38fb5138f2e456506aaa889ec2b7042a7439e
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dictionaries.git: cs_CZ/cs_CZ.dic

2021-06-16 Thread Stanislav Horacek (via logerrit)
 cs_CZ/cs_CZ.dic |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8cd38fb5138f2e456506aaa889ec2b7042a7439e
Author: Stanislav Horacek 
AuthorDate: Wed Jun 16 19:34:55 2021 +0200
Commit: Stanislav Horáček 
CommitDate: Wed Jun 16 19:41:00 2021 +0200

Czech Hunspell: fix word "třídička"

Change-Id: I36236d34249e9a8c5e8bfa48b30a26cf595d309b
Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/117343
Tested-by: Stanislav Horáček 
Reviewed-by: Stanislav Horáček 

diff --git a/cs_CZ/cs_CZ.dic b/cs_CZ/cs_CZ.dic
index 0a75d87..1b444e0 100644
--- a/cs_CZ/cs_CZ.dic
+++ b/cs_CZ/cs_CZ.dic
@@ -218699,7 +218699,7 @@ třídeskový/YR
 třídicí/Y
 třídící/YN
 třídič/S
-třídička/Z
+třídička/ZQ
 třídílný/YKRN
 třídimenzionální/YKR
 třídírenský/YR
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Review of 'Improve wrap margins in docx filters'

2021-06-16 Thread Regina Henschel

Hi Miklos, hi all,

this is about patch https://gerrit.libreoffice.org/c/core/+/115668

From my point of view, the patch is now ready. But it is quite big and 
has deeper changes, so I would appreciate it if you take a look at the 
patch.


There are still parts missing, but they can be added later. It is 
missing e.g. consideration of border thicknesses of frames, calculation 
of suitable wrap polygons, better fit of our wrap types to those of 
MSOffice, calculation of correct positions for child elements of rotated 
groups.


Kind regards
Regina

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: compilerplugins/clang include/o3tl

2021-06-16 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/implicitboolconversion.cxx |6 --
 include/o3tl/hash_combine.hxx|8 
 2 files changed, 4 insertions(+), 10 deletions(-)

New commits:
commit d32d2fd301357df94d1930420b89415e1fe69688
Author: Stephan Bergmann 
AuthorDate: Wed Jun 16 14:04:12 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 16 18:37:57 2021 +0200

Move enable_if from dummy template parameter to return type

...and drop the no-longer necessary loplugin:implicitboolconversion 
exclusion
(which had been necessary to avoid

> [CXX] vcl/source/window/dockingarea.cxx
> In file included from vcl/source/window/dockingarea.cxx:26:
> In file included from vcl/inc/svdata.hxx:26:
> include/o3tl/hash_combine.hxx:14:78: error: implicit conversion 
(Dependent) from 'bool' to 'std::enable_if_t<(sizeof(N) == 4), bool>' (aka 
'typename enable_if<(sizeof(N) == 4), bool>::type') 
[loplugin:implicitboolconversion]
> template  = false>
>   
   ^

etc.)

Change-Id: If764365213cf29f7dec6fdd6a773dc9894dd15bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117330
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/clang/implicitboolconversion.cxx 
b/compilerplugins/clang/implicitboolconversion.cxx
index 7e708eb49843..14574e3cd420 100644
--- a/compilerplugins/clang/implicitboolconversion.cxx
+++ b/compilerplugins/clang/implicitboolconversion.cxx
@@ -907,12 +907,6 @@ void 
ImplicitBoolConversion::reportWarning(ImplicitCastExpr const * expr) {
 }
 }
 }
-
-// ignore template magic
-StringRef aFileName = 
getFilenameOfLocation(compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(expr)));
-if (loplugin::hasPathnamePrefix(aFileName, SRCDIR 
"/include/o3tl/hash_combine.hxx"))
-return;
-
 report(
 DiagnosticsEngine::Warning,
 "implicit conversion (%0) from %1 to %2", 
compat::getBeginLoc(expr))
diff --git a/include/o3tl/hash_combine.hxx b/include/o3tl/hash_combine.hxx
index 17419b3e2c0f..139ee981699c 100644
--- a/include/o3tl/hash_combine.hxx
+++ b/include/o3tl/hash_combine.hxx
@@ -11,15 +11,15 @@
 
 namespace o3tl
 {
-template  = 
false>
-inline void hash_combine(N& nSeed, T const& nValue)
+template 
+inline std::enable_if_t<(sizeof(N) == 4)> hash_combine(N& nSeed, T const& 
nValue)
 {
 static_assert(sizeof(nSeed) == 4);
 nSeed ^= std::hash{}(nValue) + 0x9E3779B9u + (nSeed << 6) + (nSeed >> 
2);
 }
 
-template  = 
false>
-inline void hash_combine(N& nSeed, T const& nValue)
+template 
+inline std::enable_if_t<(sizeof(N) == 8)> hash_combine(N& nSeed, T const& 
nValue)
 {
 static_assert(sizeof(nSeed) == 8);
 nSeed ^= std::hash{}(nValue) + 0x9E3779B97F4A7C15llu + (nSeed << 12) + 
(nSeed >> 4);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - include/svx svx/source sw/inc sw/qa sw/source

2021-06-16 Thread Miklos Vajna (via logerrit)
 include/svx/svdxcgv.hxx |2 +-
 svx/source/svdraw/svdxcgv.cxx   |4 ++--
 sw/inc/frmfmt.hxx   |6 +++---
 sw/qa/extras/htmlexport/htmlexport.cxx  |   17 -
 sw/source/core/layout/paintfrm.cxx  |8 
 sw/source/filter/html/htmlflywriter.cxx |2 +-
 6 files changed, 19 insertions(+), 20 deletions(-)

New commits:
commit d562a59c224edc5bb71fa1aceb697c2c2d9c820a
Author: Miklos Vajna 
AuthorDate: Wed Jun 16 10:11:47 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jun 16 17:30:41 2021 +0200

sw HTML export: allow larger bitmaps for shapes than the vcl default

VCL default would be 500k pixels, i.e. a 2" x 1" shape at 600 dpi would
be already truncated from 1200 pixels width to 1000 pixels. That's a bit
too extreme, use a larger limit in the sw HTML export.

Change-Id: I52b85d77cd27410d53c700a89190c99348de5e19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117287
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins
(cherry picked from commit 3c46fd3d727e4885fedef7c9f3fcd6f4c9a9ebb9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117296

diff --git a/include/svx/svdxcgv.hxx b/include/svx/svdxcgv.hxx
index 0afaa7c6ad6f..8ed2adbb126d 100644
--- a/include/svx/svdxcgv.hxx
+++ b/include/svx/svdxcgv.hxx
@@ -58,7 +58,7 @@ public:
 
 // Draw all marked objects onto a bitmap, with the display's color depth
 // and resolution
-BitmapEx GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked = false, const 
std::optional& rTargetDPI = std::nullopt) const;
+BitmapEx GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked = false, const 
sal_uInt32 nMaximumQuadraticPixels = 50, const std::optional& 
rTargetDPI = std::nullopt) const;
 
 // Copy all marked objects to a new model, consisting of exactly one page,
 // with the flag PageNotValid set. This means, that only the page's objects
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index af4e41734db8..8881336bdcf9 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -425,7 +425,7 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, 
SdrObjList& rLst, const Po
 }
 }
 
-BitmapEx SdrExchangeView::GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked, 
const std::optional& rTargetDPI) const
+BitmapEx SdrExchangeView::GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked, 
const sal_uInt32 nMaximumQuadraticPixels, const std::optional& 
rTargetDPI) const
 {
 BitmapEx aBmp;
 
@@ -502,7 +502,7 @@ BitmapEx SdrExchangeView::GetMarkedObjBitmapEx(bool 
bNoVDevIfOneBmpMarked, const
 aBmp = convertPrimitive2DSequenceToBitmapEx(
 xPrimitives,
 aRange,
-/*nMaximumQuadraticPixels=*/ 50,
+nMaximumQuadraticPixels,
 eRangeUnit,
 rTargetDPI);
 }
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 36333d4e8525..316db344a2b8 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -116,7 +116,7 @@ public:
 /// Creates the views.
 virtual void MakeFrames();
 
-virtual Graphic MakeGraphic( ImageMap* pMap = nullptr, const 
std::optional& rTargetDPI = std::nullopt );
+virtual Graphic MakeGraphic( ImageMap* pMap = nullptr, const sal_uInt32 
nMaximumQuadraticPixels = 50, const std::optional& rTargetDPI = 
std::nullopt );
 
 /**  @return the IMapObject defined at format (Fly)
 in the ImageMap at position Point.
@@ -212,7 +212,7 @@ public:
 
 SwAnchoredObject* GetAnchoredObj() const;
 
-virtual Graphic MakeGraphic( ImageMap* pMap = nullptr, const 
std::optional& rTargetDPI = std::nullopt ) override;
+virtual Graphic MakeGraphic( ImageMap* pMap = nullptr, const sal_uInt32 
nMaximumQuadraticPixels = 50, const std::optional& rTargetDPI = 
std::nullopt ) override;
 
 virtual bool GetInfo( SfxPoolItem& rInfo ) const override;
 
@@ -388,7 +388,7 @@ public:
  Reset delete marks. */
 virtual void MakeFrames() override;
 
-virtual Graphic MakeGraphic( ImageMap* pMap = nullptr, const 
std::optional& rTargetDPI = std::nullopt ) override;
+virtual Graphic MakeGraphic( ImageMap* pMap = nullptr, const sal_uInt32 
nMaximumQuadraticPixels = 50, const std::optional& rTargetDPI = 
std::nullopt ) override;
 
 virtual SwFrameFormat::tLayoutDir GetLayoutDir() const override;
 virtual void SetLayoutDir( const SwFrameFormat::tLayoutDir _eLayoutDir ) 
override;
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index 044a6ad29e72..180a2599 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -1762,12 +1762,10 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testReqifEmbedShapeAsPNGCustomDPI)
 uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
 uno::Refe

[Libreoffice-commits] core.git: sd/source

2021-06-16 Thread Caolán McNamara (via logerrit)
 sd/source/ui/view/sdview.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit c9ba420bfe5c31e67a7555c8f4a16d0bd7954a51
Author: Caolán McNamara 
AuthorDate: Wed Jun 16 12:37:39 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 16 17:26:55 2021 +0200

cid#485150 silence Uncaught exception

for the record

coverity[foo] defect is marked as intentioanl
coverity[foo : FALSE] defect is marked as false positive
coverity[foo : SUPPRESS] detect is not saved at all

Change-Id: I1277c4426b5fa9efde8a9227c2813d53deb56555
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117325
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index e2e0a053a47e..3f3120606776 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -145,6 +145,7 @@ View::~View()
 while(PaintWindowCount())
 {
 // remove all registered OutDevs
+// coverity[fun_call_w_exception : SUPPRESS] - cid#485150 silence 
Uncaught exception
 DeleteWindowFromPaintView(GetFirstOutputDevice() /*GetWin(0)*/);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/uiconfig

2021-06-16 Thread Caolán McNamara (via logerrit)
 cui/uiconfig/ui/pageformatpage.ui |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 899737e6e4fca537e7352a9cd11e161328800b83
Author: Caolán McNamara 
AuthorDate: Wed Jun 16 11:17:46 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 16 17:26:34 2021 +0200

stray unwanted 'relief' property on random checkbox

Change-Id: Id942f88780d4f697df44433180343ca3c763ed67
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117321
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/cui/uiconfig/ui/pageformatpage.ui 
b/cui/uiconfig/ui/pageformatpage.ui
index 3a28c29409a5..68bd5a10ab0e 100644
--- a/cui/uiconfig/ui/pageformatpage.ui
+++ b/cui/uiconfig/ui/pageformatpage.ui
@@ -638,7 +638,6 @@
 True
 False
 True
-none
 True
 True
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - desktop/source

2021-06-16 Thread Mike Kaganski (via logerrit)
 desktop/source/lib/init.cxx |  190 
 1 file changed, 87 insertions(+), 103 deletions(-)

New commits:
commit 4e2c8ceed49e05c1cf0569496fa93d258f3f4b7c
Author: Mike Kaganski 
AuthorDate: Mon Jun 14 14:28:04 2021 +0200
Commit: Aron Budea 
CommitDate: Wed Jun 16 17:26:14 2021 +0200

Use FontList::GetFirstFontMetric instead of custom iteration code

Besides code deduplication, this takes care of case-insensitive search.
Also fall back to a default font in case of no match in doc_renderFont*.

Change-Id: Ica45ca10c374cf6581ba2f6b60563d6a1447232a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117121
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117184
Tested-by: Jenkins CollaboraOffice 
Tested-by: Aron Budea 
Reviewed-by: Aron Budea 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 8428dc2343d4..1fa50af7da76 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1251,6 +1251,26 @@ rtl::Reference 
forceSetClipboardForCurrentView(LibreOfficeKitDocum
 
 #endif
 
+const vcl::Font* FindFont(const OUString& rFontName)
+{
+SfxObjectShell* pDocSh = SfxObjectShell::Current();
+const SvxFontListItem* pFonts
+= static_cast(pDocSh->GetItem(SID_ATTR_CHAR_FONTLIST));
+const FontList* pList = pFonts ? pFonts->GetFontList() : nullptr;
+if (pList && !rFontName.isEmpty())
+if (sal_Handle hMetric = pList->GetFirstFontMetric(rFontName))
+return &FontList::GetFontMetric(hMetric);
+return nullptr;
+}
+
+vcl::Font FindFont_FallbackToDefault(const OUString& rFontName)
+{
+if (auto pFound = FindFont(rFontName))
+return *pFound;
+
+return OutputDevice::GetDefaultFont(DefaultFontType::SANS_UNICODE, 
LANGUAGE_NONE,
+GetDefaultFontFlags::NONE);
+}
 } // anonymous namespace
 
 LibLODocument_Impl::LibLODocument_Impl(const uno::Reference 
 &xComponent, int nDocumentId)
@@ -4749,43 +4769,25 @@ static char* getFonts (const char* pCommand)
 static char* getFontSubset (const OString& aFontName)
 {
 OUString aFoundFont(::rtl::Uri::decode(OStringToOUString(aFontName, 
RTL_TEXTENCODING_UTF8), rtl_UriDecodeStrict, RTL_TEXTENCODING_UTF8));
-SfxObjectShell* pDocSh = SfxObjectShell::Current();
-const SvxFontListItem* pFonts = static_cast(
-pDocSh->GetItem(SID_ATTR_CHAR_FONTLIST));
-const FontList* pList = pFonts ? pFonts->GetFontList() : nullptr;
 
 boost::property_tree::ptree aTree;
 aTree.put("commandName", ".uno:FontSubset");
 boost::property_tree::ptree aValues;
 
-if ( pList && !aFoundFont.isEmpty() )
+if (const vcl::Font* pFont = FindFont(aFoundFont))
 {
-sal_uInt16 nFontCount = pList->GetFontNameCount();
-sal_uInt16 nItFont = 0;
-for (; nItFont < nFontCount; ++nItFont)
-{
-if (aFoundFont == pList->GetFontName(nItFont).GetFamilyName())
-{
-break;
-}
-}
+FontCharMapRef xFontCharMap (new FontCharMap());
+auto aDevice(VclPtr::Create(DeviceFormat::DEFAULT));
 
-if ( nItFont < nFontCount )
-{
-FontCharMapRef xFontCharMap (new FontCharMap());
-auto aDevice(VclPtr::Create(DeviceFormat::DEFAULT));
-const vcl::Font& aFont(pList->GetFontName(nItFont));
+aDevice->SetFont(*pFont);
+aDevice->GetFontCharMap(xFontCharMap);
+SubsetMap aSubMap(xFontCharMap);
 
-aDevice->SetFont(aFont);
-aDevice->GetFontCharMap(xFontCharMap);
-SubsetMap aSubMap(xFontCharMap);
-
-for (auto const& subset : aSubMap.GetSubsetMap())
-{
-boost::property_tree::ptree aChild;
-aChild.put("", 
static_cast(ublock_getCode(subset.GetRangeMin(;
-aValues.push_back(std::make_pair("", aChild));
-}
+for (auto const& subset : aSubMap.GetSubsetMap())
+{
+boost::property_tree::ptree aChild;
+aChild.put("", 
static_cast(ublock_getCode(subset.GetRangeMin(;
+aValues.push_back(std::make_pair("", aChild));
 }
 }
 
@@ -5406,98 +5408,80 @@ unsigned char* 
doc_renderFontOrientation(SAL_UNUSED_PARAMETER LibreOfficeKitDocu
 SolarMutexGuard aGuard;
 SetLastExceptionMsg();
 
-OString aSearchedFontName(pFontName);
-OUString aText(OStringToOUString(pChar, RTL_TEXTENCODING_UTF8));
-SfxObjectShell* pDocSh = SfxObjectShell::Current();
-const SvxFontListItem* pFonts = static_cast(
-pDocSh->GetItem(SID_ATTR_CHAR_FONTLIST));
-const FontList* pList = pFonts ? pFonts->GetFontList() : nullptr;
-
 const int nDefaultFontSize = 25;
 
-if ( pList )
-{
-sal_uInt16 nFontCount = pList->GetFontNameCount();
-for (sal_uInt16 i = 0; i < nFontC

[Libreoffice-commits] core.git: sw/qa sw/source

2021-06-16 Thread Justin Luth (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport16.cxx |4 +-
 sw/source/core/text/inftxt.hxx |3 --
 sw/source/core/text/txttab.cxx |   41 +++--
 3 files changed, 36 insertions(+), 12 deletions(-)

New commits:
commit c54de8cca177154d267238ed6d0b6cb4f3f86c8d
Author: Justin Luth 
AuthorDate: Tue Jun 8 10:19:36 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jun 16 16:53:47 2021 +0200

tdf#142404 DOCX c15: line full before out-of-bounds TabOverSpacing

MS Word 2016 does something very weird. It attaches a
TabOverMargin to the previous word, and pulls it down to a new line.
Well, I don't think we want to attempt anything silly like that,
but at least we can have the tab itself start on the new line
(and thus take up the whole line).
This seems to be true only for a left-tab.
The other tabs have a different kind of strangeness
that I haven't identified yet.

In order to do that, when we request a tabstop position,
we must query a tabstop beyond the end margin.
So modify the GetTabStop function to allow for
not checking against an nRight position (when passed a zero).

This is complicated by the function's ability to ALWAYS
return the first tabstop - even if it is past the given
right-most edge. So I made nRight modifiable,
so that in this case, it isn't considered to be past
the right edge. That is fine for both cases where
this function is used.

It is a bit ugly, but I don't see how to make it cleaner,
when these inherent complications are already built-in.

This also has an impact on older DOCX, but the impact
is still valid. (In those, the entire paragraph
extends past the end in Word. With this patch, at
least the first line becomes more than just an
auto-tabstop.)

Change-Id: I42791a959aea2932b5776789ba45307fbca41a5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116878
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index b550e62ef6a2..8ab528c6307c 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -252,9 +252,9 @@ 
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf142404_tabOverSpacingC15, "tdf142404_
 // Pages 2/3 are TabOverMargin - in this particular case tabs should not 
go over margin.
 CPPUNIT_ASSERT_EQUAL(OUString("TabOverflow does what?"), 
parseDump("//page[3]/body/txt[2]/Text[1]", "Portion"));
 // Not 1 line high (Word 2010 DOCX and ODT), or 4 lines high (prev LO 
DOCX),
-// but 3 lines high (8 lines high in Word 2016 because of the same 
weirdness as previous test).
+// but 8 lines high.
 nHeight = parseDump("//page[3]/body/txt[2]/infos/bounds", 
"height").toInt32();
-CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("3 lines high (but 8 in Word)", 
242*3, nHeight, 121);
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("8 lines high", 242*8, nHeight, 121);
 }
 
 DECLARE_OOXMLEXPORT_TEST(testTdf139580, "tdf139580.odt")
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 19d730d02e5c..4d5bb0651163 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -75,8 +75,7 @@ class SwLineInfo
 ~SwLineInfo();
 public:
 // #i24363# tab stops relative to indent - returns the tab stop following 
nSearchPos or NULL
-const SvxTabStop *GetTabStop( const SwTwips nSearchPos,
- const SwTwips nRight ) const;
+const SvxTabStop* GetTabStop(const SwTwips nSearchPos, SwTwips& nRight) 
const;
 const SvxLineSpacingItem *GetLineSpacing() const { return m_pSpace; }
 sal_uInt16 GetDefTabStop() const { return m_nDefTabStop; }
 void SetDefTabStop( sal_uInt16 nNew ) const
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index 101c63cde87e..565c660b23be 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -40,16 +40,24 @@
  * If the tab stop is outside the print area, we
  * return 0 if it is not the first tab stop.
  */
-const SvxTabStop *SwLineInfo::GetTabStop( const SwTwips nSearchPos, const 
SwTwips nRight ) const
+const SvxTabStop* SwLineInfo::GetTabStop(const SwTwips nSearchPos, SwTwips& 
nRight) const
 {
 for( sal_uInt16 i = 0; i < m_pRuler->Count(); ++i )
 {
 const SvxTabStop &rTabStop = m_pRuler->operator[](i);
-if( rTabStop.GetTabPos() > SwTwips(nRight) )
+if (nRight && rTabStop.GetTabPos() > nRight)
+{
+// Consider the first tabstop to always be in-bounds.
+if (!i)
+nRight = rTabStop.GetTabPos();
 return i ? nullptr : &rTabStop;
-
+}
 if( rTabStop.GetTabPos() > nSearchPos )
+{
+if (!i && !nRight)
+nRight = rTabStop

[Libreoffice-commits] core.git: svx/uiconfig

2021-06-16 Thread Caolán McNamara (via logerrit)
 svx/uiconfig/ui/headfootformatpage.ui |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 18f1199f4b99e644e4aea50eb17e409110a0d6c7
Author: Caolán McNamara 
AuthorDate: Wed Jun 16 11:14:54 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 16 16:44:38 2021 +0200

xalign of 0.5 is already the default

so no need to make it explicit

Change-Id: I933fd914a3a7c408b836a85fee7acb39e731990f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117320
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/svx/uiconfig/ui/headfootformatpage.ui 
b/svx/uiconfig/ui/headfootformatpage.ui
index 249cb5accd9f..f5434675657b 100644
--- a/svx/uiconfig/ui/headfootformatpage.ui
+++ b/svx/uiconfig/ui/headfootformatpage.ui
@@ -316,7 +316,6 @@
 True
 True
 True
-0.5
 True
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/uiconfig

2021-06-16 Thread Caolán McNamara (via logerrit)
 cui/uiconfig/ui/bulletandposition.ui |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2305f8fcf69b35f2d2e68eb20172af13ce0792d2
Author: Caolán McNamara 
AuthorDate: Wed Jun 16 09:47:55 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 16 16:44:15 2021 +0200

Resolves: tdf#142874 missing translation property

since...

commit 15664117ef4db51bdcabb46b7990573509da0d73
Date:   Thu Jul 25 21:40:48 2019 +0300

tdf#125923 Fix reset button.

Change-Id: Ib589aa32221eaa33a13a17a00c2edb51866a5daa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117315
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/cui/uiconfig/ui/bulletandposition.ui 
b/cui/uiconfig/ui/bulletandposition.ui
index 12f5d76496df..127b82dacfe6 100644
--- a/cui/uiconfig/ui/bulletandposition.ui
+++ b/cui/uiconfig/ui/bulletandposition.ui
@@ -102,7 +102,7 @@
 end
 
   
-Reset
+_Reset
 True
 True
 True
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/uiconfig

2021-06-16 Thread Caolán McNamara (via logerrit)
 cui/uiconfig/ui/numberingpositionpage.ui |  400 +++
 1 file changed, 200 insertions(+), 200 deletions(-)

New commits:
commit ce0aebb7bd9bf37e67111cf2a425ba7a3aee57fe
Author: Caolán McNamara 
AuthorDate: Wed Jun 16 09:35:51 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 16 16:43:49 2021 +0200

resave with latest glade

Change-Id: I1fac93fc43c80fb986e5b09b497c644be6852b52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117314
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/cui/uiconfig/ui/numberingpositionpage.ui 
b/cui/uiconfig/ui/numberingpositionpage.ui
index 7c2c3fb30bd9..fce23a35b576 100644
--- a/cui/uiconfig/ui/numberingpositionpage.ui
+++ b/cui/uiconfig/ui/numberingpositionpage.ui
@@ -1,37 +1,37 @@
 
-
+
 
   
   
 19.99
-0.05
-10
+0.05
+10
   
   
 -19.99
 19.99
-0.05
-10
+0.05
+10
   
   
 19.99
-0.05
-10
+0.05
+10
   
   
 19.99
-0.01
-10
+0.01
+10
   
   
 19.99
-0.01
-10
+0.01
+10
   
   
 19.99
-0.01
-10
+0.01
+10
   
   
 
@@ -43,15 +43,76 @@
   
   
 True
-False
+False
 True
 True
-6
+6
 12
+
+  
+True
+False
+0
+none
+
+  
+True
+True
+12
+6
+in
+
+  
+True
+True
+liststore1
+False
+False
+0
+False
+
+  
+
+
+  
+
+  
+  
+0
+  
+
+  
+
+
+  
+Select 
the level(s) that you want to modify.
+  
+
+  
+
+  
+
+
+  
+True
+False
+Level
+
+  
+
+  
+
+  
+  
+False
+True
+0
+  
+
 
   
 True
-False
+False
 True
 True
 vertical
@@ -59,87 +120,87 @@
 
   
 True
-False
+False
 True
-0
-none
+0
+none
 
-  
+  
   
 True
-False
+False
 start
-True
-True
-6
-12
 12
 6
+True
+True
+6
+12
 
   
 True
-False
+False
 True
 Numbering followed by:
-True
-numfollowedbylb
+True
+numfollowedbylb
 1
   
   
-0
-2
+0
+2
   
 
 
   
 True
-False
+False
 N_umbering alignment:
-True
-num2alignlb
+True
+num2alignlb
 1
   
   
-0
-1
+0
+1
   
 
 
   
 True
-False
+False
 Aligned at:
-True
-alignedatmf
+True
+alignedatmf
 1
   
   
-0
-0
+0
+0
   
 
 
   
 True
-False
+False
 Indent at:
-True
-indentatmf
+True
+indentatmf
 1
   
   
-0
-4
+0
+4
   
 
 
   
 True
-True
-True
+   

Re: ESC meeting agenda: 2021-06-17 16:00 Berlin time

2021-06-16 Thread Mike Kaganski

On 16.06.2021 17:09, Miklos Vajna wrote:

* Release Engineering update (Cloph)
     + 7.2 status


I hope that https://gerrit.libreoffice.org/c/core/+/117184, sidebar 
panel for the multi-column textbox feature, may be merged to 7-2 as a 
late feature, since it hasn't made it in time before 7-2 branch-off 
together with the multi-column work itself.


Thanks!

--
Best regards,
Mike Kaganski
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/themesupport2' - 2834 commits - accessibility/inc accessibility/README.md accessibility/source android/.gitignore android/README.md android/source anima

2021-06-16 Thread Jan Holesovsky (via logerrit)
Rebased ref, commits from common ancestor:
commit 42fafd1cb63a63714d6f088201b06c7d5c10e0e1
Author: Jan Holesovsky 
AuthorDate: Fri Apr 2 00:21:34 2021 +0200
Commit: Tomaž Vajngerl 
CommitDate: Wed Jun 16 23:05:18 2021 +0900

Unit test (with the content disabled so far) for the theming.

Change-Id: Ie9e003df38e1bc766fb5323936138d3e0e664321

diff --git a/sw/qa/extras/ooxmlexport/data/themeOrange.docx 
b/sw/qa/extras/ooxmlexport/data/themeOrange.docx
new file mode 100644
index ..e350c2676d41
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/themeOrange.docx 
differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index b550e62ef6a2..7af07caa58d8 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -518,6 +518,12 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(Test_ShadowDirection, 
"tdf142361ShadowDirect
 "rotWithShape", "0");
 }
 
+DECLARE_OOXMLEXPORT_TEST(testThemeOrange, "themeOrange.docx")
+{
+// Assert that the theme color of the 1st paragraph is "accent1"
+//CPPUNIT_ASSERT_EQUAL(getProperty(getParagraph(1), 
"CharColorTheme"), static_cast(4));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 421e722049c937e24d8b4740e14de4e172845c16
Author: Tomaž Vajngerl 
AuthorDate: Thu Sep 24 12:32:14 2015 +0200
Commit: Tomaž Vajngerl 
CommitDate: Wed Jun 16 23:05:17 2021 +0900

Improve preview of theme color sets - add color set name

Change-Id: I1f7b3668ba9dfbab1da283741e99754de2d6be47

diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx 
b/sw/source/uibase/sidebar/ThemePanel.cxx
index 09a7665950c9..d41db8ffd659 100644
--- a/sw/source/uibase/sidebar/ThemePanel.cxx
+++ b/sw/source/uibase/sidebar/ThemePanel.cxx
@@ -19,6 +19,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -371,17 +372,39 @@ BitmapEx GenerateColorPreview(const svx::ColorSet& 
rColorSet)
 {
 ScopedVclPtrInstance 
pVirtualDev(*Application::GetDefaultDevice());
 float fScaleFactor = pVirtualDev->GetDPIScaleFactor();
-tools::Long BORDER = 2 * fScaleFactor;
-tools::Long SIZE = 12 * fScaleFactor;
+long BORDER = 3 * fScaleFactor;
+long SIZE = 14 * fScaleFactor;
+long LABEL_HEIGHT = 16 * fScaleFactor;
+long LABEL_TEXT_HEIGHT = 14 * fScaleFactor;
 
-Size aSize(BORDER * 7 + SIZE * 6, BORDER * 3 + SIZE * 2);
+Size aSize(BORDER * 7 + SIZE * 6 + BORDER * 2, BORDER * 3 + SIZE * 2 + 
LABEL_HEIGHT);
 pVirtualDev->SetOutputSizePixel(aSize);
+
pVirtualDev->SetBackground(Wallpaper(Application::GetSettings().GetStyleSettings().GetFaceColor()));
+pVirtualDev->Erase();
 
 tools::Long x = BORDER;
-tools::Long y1 = BORDER;
+tools::Long y1 = BORDER + LABEL_HEIGHT;
 tools::Long y2 = y1 + SIZE + BORDER;
 
 pVirtualDev->SetLineColor(COL_LIGHTGRAY);
+pVirtualDev->SetFillColor(COL_LIGHTGRAY);
+tools::Rectangle aNameRect(Point(0, 0), Size(aSize.Width(), LABEL_HEIGHT));
+pVirtualDev->DrawRect(aNameRect);
+
+vcl::Font aFont;
+OUString aName = rColorSet.getName();
+aFont.SetFontHeight(LABEL_TEXT_HEIGHT);
+pVirtualDev->SetFont(aFont);
+
+Size aTextSize(pVirtualDev->GetTextWidth(aName), 
pVirtualDev->GetTextHeight());
+
+Point aPoint((aNameRect.GetWidth()  / 2.0) - (aTextSize.Width()  / 2.0),
+ (aNameRect.GetHeight() / 2.0) - (aTextSize.Height() / 2.0));
+
+pVirtualDev->DrawText(aPoint, aName);
+
+pVirtualDev->SetLineColor(COL_LIGHTGRAY);
+pVirtualDev->SetFillColor();
 
 for (sal_uInt32 i = 0; i < 12; i += 2)
 {
@@ -392,6 +415,8 @@ BitmapEx GenerateColorPreview(const svx::ColorSet& 
rColorSet)
 pVirtualDev->DrawRect(tools::Rectangle(x, y2, x + SIZE, y2 + SIZE));
 
 x += SIZE + BORDER;
+if (i == 2 || i == 8)
+x += BORDER;
 }
 
 return pVirtualDev->GetBitmapEx(Point(), aSize);
@@ -419,6 +444,7 @@ ThemePanel::ThemePanel(weld::Widget* pParent)
 {
 mxValueSetColors->SetColCount(2);
 mxValueSetColors->SetLineCount(3);
+
mxValueSetColors->SetColor(Application::GetSettings().GetStyleSettings().GetFaceColor());
 
 mxApplyButton->connect_clicked(LINK(this, ThemePanel, ClickHdl));
 mxListBoxFonts->connect_row_activated(LINK(this, ThemePanel, 
DoubleClickHdl));
commit 8d02d87a4d04b46607844c427db414b769355381
Author: Tomaž Vajngerl 
AuthorDate: Thu Sep 24 12:30:10 2015 +0200
Commit: Tomaž Vajngerl 
CommitDate: Wed Jun 16 23:05:16 2021 +0900

StylePresets: set bacground color for ValueSet

Change-Id: Ifbaab139235dbe2fdcebf278bce2c91c2b744aa6

diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.cxx 
b/sw/source/uibase/sidebar/StylePresetsPanel.cxx
index 79b1b93ed34c..981f26b3e839 100644
--- a/sw/source/uibase/sidebar/StylePresetsPanel.cxx
+++ b/sw/source/uibase/sidebar/StylePresetsPanel.cxx
@@ -13,8 +13,9 @@
 #i

[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - cui/uiconfig

2021-06-16 Thread Caolán McNamara (via logerrit)
 cui/uiconfig/ui/bulletandposition.ui |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4d26716bb562808d9a30b483157ab63cbb4636f8
Author: Caolán McNamara 
AuthorDate: Wed Jun 16 09:47:55 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 16 15:48:20 2021 +0200

Resolves: tdf#142874 missing translation property

since...

commit 15664117ef4db51bdcabb46b7990573509da0d73
Date:   Thu Jul 25 21:40:48 2019 +0300

tdf#125923 Fix reset button.

Change-Id: Ib589aa32221eaa33a13a17a00c2edb51866a5daa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117295
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/cui/uiconfig/ui/bulletandposition.ui 
b/cui/uiconfig/ui/bulletandposition.ui
index 93ecab53bc8f..2d3676a3c1f2 100644
--- a/cui/uiconfig/ui/bulletandposition.ui
+++ b/cui/uiconfig/ui/bulletandposition.ui
@@ -102,7 +102,7 @@
 end
 
   
-Reset
+_Reset
 True
 True
 True
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2021-06-16 Thread Noel Grandin (via logerrit)
 sw/source/core/doc/number.cxx |   13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

New commits:
commit e52bbca626e2cbe2f4d13632f65967604abb0abc
Author: Noel Grandin 
AuthorDate: Tue Jun 15 15:27:40 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 16 15:15:32 2021 +0200

tdf#135316 docx open performance

avoid unnecessary SwNumFormat creation

Change-Id: I62a16fdeb1225606a54f384e5196e5137e8d2139
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117271
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index eb84b1b63a68..00eeed63ec70 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -916,10 +916,15 @@ SvxNumRule SwNumRule::MakeSvxNumRule() const
  meRuleType == NUM_RULE ? SvxNumRuleType::NUMBERING : 
SvxNumRuleType::OUTLINE_NUMBERING );
 for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
 {
-SwNumFormat aNumFormat = Get(n);
-if(aNumFormat.GetCharFormat())
-
aNumFormat.SetCharFormatName(aNumFormat.GetCharFormat()->GetName());
-aRule.SetLevel(n, aNumFormat, maFormats[n] != nullptr);
+const SwNumFormat & rNumFormat = Get(n);
+if(rNumFormat.GetCharFormat())
+{
+SwNumFormat aNewFormat = rNumFormat;
+
aNewFormat.SetCharFormatName(rNumFormat.GetCharFormat()->GetName());
+aRule.SetLevel(n, aNewFormat, maFormats[n] != nullptr);
+}
+else
+aRule.SetLevel(n, rNumFormat, maFormats[n] != nullptr);
 }
 return aRule;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/tags/cp-6.4-40'

2021-06-16 Thread Gabriel Masei (via logerrit)
Tag 'cp-6.4-40' created by Andras Timar  at 
2021-06-16 13:12 +

cp-6.4-40

Changes since cp-6.4-39-15:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] translations.git: Changes to 'refs/tags/cp-6.4-40'

2021-06-16 Thread Andras Timar (via logerrit)
Tag 'cp-6.4-40' created by Andras Timar  at 
2021-06-16 13:12 +

cp-6.4-40

Changes since cp-6.4-23:
Andras Timar (1):
  Translation update

---
 source/ar/cui/messages.po  |  130 
 source/ar/dictionaries/da_DK.po|   24 
 source/ar/officecfg/registry/data/org/openoffice/Office/UI.po  |   24 
 source/ar/svtools/messages.po  |   44 
 source/ar/svx/messages.po  |  502 -
 source/ar/sw/messages.po   |  405 
 source/as/cui/messages.po  |  106 
 source/as/dictionaries/da_DK.po|   18 
 source/as/officecfg/registry/data/org/openoffice/Office/UI.po  |   12 
 source/as/svtools/messages.po  |   42 
 source/as/svx/messages.po  |  472 
 source/as/sw/messages.po   |  385 
 source/ast/cui/messages.po |  108 
 source/ast/dictionaries/da_DK.po   |   18 
 source/ast/officecfg/registry/data/org/openoffice/Office/UI.po |   18 
 source/ast/svtools/messages.po |   42 
 source/ast/svx/messages.po |  485 -
 source/ast/sw/messages.po  |  387 
 source/bg/cui/messages.po  |  106 
 source/bg/dictionaries/da_DK.po|   24 
 source/bg/officecfg/registry/data/org/openoffice/Office/UI.po  |   20 
 source/bg/svtools/messages.po  |   42 
 source/bg/svx/messages.po  |  465 
 source/bg/sw/messages.po   |  385 
 source/bn-IN/cui/messages.po   |  106 
 source/bn-IN/dictionaries/da_DK.po |   18 
 source/bn-IN/officecfg/registry/data/org/openoffice/Office/UI.po   |   12 
 source/bn-IN/svtools/messages.po   |   42 
 source/bn-IN/svx/messages.po   |  482 
 source/bn-IN/sw/messages.po|  386 
 source/br/cui/messages.po  |  106 
 source/br/dictionaries/da_DK.po|   18 
 source/br/officecfg/registry/data/org/openoffice/Office/UI.po  |   12 
 source/br/svtools/messages.po  |   42 
 source/br/svx/messages.po  |  487 -
 source/br/sw/messages.po   |  385 
 source/ca-valencia/cui/messages.po |  106 
 source/ca-valencia/dictionaries/da_DK.po   |   18 
 source/ca-valencia/officecfg/registry/data/org/openoffice/Office/UI.po |   12 
 source/ca-valencia/svtools/messages.po |   42 
 source/ca-valencia/svx/messages.po |  471 
 source/ca-valencia/sw/messages.po  |  385 
 source/ca/cui/messages.po  |  106 
 source/ca/dictionaries/da_DK.po|   24 
 source/ca/officecfg/registry/data/org/openoffice/Office/UI.po  |   20 
 source/ca/svtools/messages.po  |   42 
 source/ca/svx/messages.po  |  471 
 source/ca/sw/messages.po   |  385 
 source/cs/cui/messages.po  |  106 
 source/cs/dictionaries/da_DK.po|   24 
 source/cs/officecfg/registry/data/org/openoffice/Office/UI.po  |   20 
 source/cs/svtools/messages.po  |   42 
 source/cs/svx/messages.po  |  465 
 source/cs/sw/messages.po   |  385 
 source/cy/cui/messages.po  |  106 
 source/cy/dictionaries/da_DK.po|   24 
 source/cy/officecfg/registry/data/org/openoffice/Office/UI.po  |   20 
 source/cy/svtools/messages.po  |   42 
 source/cy/svx/messages.po  |  467 
 source/cy/sw/messages.po   |  385 
 source/da/cui/messages.po 

[Libreoffice-commits] help.git: Changes to 'refs/tags/cp-6.4-40'

2021-06-16 Thread Andras Timar (via logerrit)
Tag 'cp-6.4-40' created by Andras Timar  at 
2021-06-16 13:12 +

cp-6.4-40

Changes since cp-6.4-branch-point-11:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dictionaries.git: Changes to 'refs/tags/cp-6.4-40'

2021-06-16 Thread Andras Timar (via logerrit)
Tag 'cp-6.4-40' created by Andras Timar  at 
2021-06-16 13:12 +

cp-6.4-40

Changes since co-6.4-20:
Andras Timar (1):
  update Danish dictionary

---
 da_DK/README_da_DK.txt |4 
 da_DK/da_DK.aff| 3401 
 da_DK/da_DK.dic|288016 
+++--
 da_DK/description.xml  |9 
 4 files changed, 139245 insertions(+), 152185 deletions(-)
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2021-06-16 Thread Georgy Litvinov (via logerrit)
 sw/source/core/text/EnhancedPDFExportHelper.cxx |   35 +++-
 1 file changed, 29 insertions(+), 6 deletions(-)

New commits:
commit 736a2db98bbf7222bfec3dcff8ccb71b576e
Author: Georgy Litvinov 
AuthorDate: Tue Jun 15 00:23:35 2021 +0200
Commit: Michael Stahl 
CommitDate: Wed Jun 16 15:07:08 2021 +0200

tdf#38187 Create back link from footnote text to anchor in text

Change-Id: I1ddf447975872a45447bfa86d050c886f4191962
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117205
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx 
b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index f3d9e69ad51b..94014ae13c9a 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -1977,27 +1977,50 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
 const SwPageFrame* pCurrPage = static_cast( mrSh.GetLayout()->Lower() );
 // Destination PageNum
 tools::Rectangle aRect = SwRectToPDFRect(pCurrPage, 
rDestRect.SVRect());
+// Back link rectangle calculation
+const SwPageFrame* fnBodyPage = 
pCurrPage->getRootFrame()->GetPageByPageNum(nDestPageNum+1);
+SwRect fnSymbolRect;
+if (fnBodyPage->IsVertical()){
+tools::Long fnSymbolTop = fnBodyPage->GetTopMargin() + 
fnBodyPage->getFrameArea().Top();
+tools::Long symbolHeight = rDestRect.Top() - 
fnSymbolTop;
+fnSymbolRect = 
SwRect(rDestRect.Pos().X(),fnSymbolTop,rDestRect.Width(),symbolHeight);
+} else {
+   if (fnBodyPage->IsRightToLeft()){
+   tools::Long fnSymbolRight = 
fnBodyPage->getFrameArea().Right() - fnBodyPage->GetRightMargin();
+   tools::Long symbolWidth = fnSymbolRight - 
rDestRect.Right();
+   fnSymbolRect = 
SwRect(rDestRect.Pos().X(),rDestRect.Pos().Y(),symbolWidth,rDestRect.Height());
+   } else {
+   tools::Long fnSymbolLeft = 
fnBodyPage->GetLeftMargin() + fnBodyPage->getFrameArea().Left();
+   tools::Long symbolWidth = rDestRect.Left() - 
fnSymbolLeft;
+   fnSymbolRect = 
SwRect(fnSymbolLeft,rDestRect.Pos().Y(),symbolWidth,rDestRect.Height());
+   }
+}
+tools::Rectangle aFootnoteSymbolRect = 
SwRectToPDFRect(pCurrPage, fnSymbolRect.SVRect());
+
+// Export back link
+const sal_Int32 nBackLinkId = 
pPDFExtOutDevData->CreateLink(aFootnoteSymbolRect, nDestPageNum);
 // Destination Export
 const sal_Int32 nDestId = 
pPDFExtOutDevData->CreateDest(aRect, nDestPageNum);
 mrSh.GotoFootnoteAnchor();
-
 // Link PageNums
 sal_Int32 aLinkPageNum = CalcOutputPageNum( aLinkRect );
-
 pCurrPage = static_cast( 
mrSh.GetLayout()->Lower() );
-
 // Link Export
 aRect = SwRectToPDFRect(pCurrPage, aLinkRect.SVRect());
 const sal_Int32 nLinkId = 
pPDFExtOutDevData->CreateLink(aRect, aLinkPageNum);
-
+// Back link destination Export
+const sal_Int32 nBackDestId = 
pPDFExtOutDevData->CreateDest(aRect, aLinkPageNum);
 // Store link info for tagged pdf output:
 const IdMapEntry aLinkEntry( aLinkRect, nLinkId );
 s_aLinkIdMap.push_back( aLinkEntry );
 
-// Connect Link and Destination:
+// Store backlink info for tagged pdf output:
+const IdMapEntry aBackLinkEntry( aFootnoteSymbolRect, 
nBackLinkId );
+s_aLinkIdMap.push_back( aBackLinkEntry );
+// Connect Links and Destinations:
 pPDFExtOutDevData->SetLinkDest( nLinkId, nDestId );
+pPDFExtOutDevData->SetLinkDest( nBackLinkId, nBackDestId );
 }
-
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/qa

2021-06-16 Thread Sarper Akdemir (via logerrit)
 sd/qa/unit/data/pptx/tdf59323.pptx |binary
 sd/qa/unit/export-tests-ooxml2.cxx |   37 +
 2 files changed, 37 insertions(+)

New commits:
commit f283ec0bf68734558e903339f2f0d86633cc9a62
Author: Sarper Akdemir 
AuthorDate: Wed Jun 9 08:24:12 2021 +0300
Commit: Miklos Vajna 
CommitDate: Wed Jun 16 15:06:12 2021 +0200

tdf#59323: pptx export: slide footers roundtrip unit test

Roundtrip test that checks the slide footers, and their placeholder indexes.

Change-Id: I9c4b819092ac6699617d71538c35b066d6e6f974
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117013
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/sd/qa/unit/data/pptx/tdf59323.pptx 
b/sd/qa/unit/data/pptx/tdf59323.pptx
new file mode 100755
index ..0660c0af4f23
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf59323.pptx differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx 
b/sd/qa/unit/export-tests-ooxml2.cxx
index b2d30225af44..e2cdef3d76f6 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -149,6 +149,7 @@ public:
 void testTdf118825();
 void testTextColumns_tdf140852();
 void testTextColumns_3columns();
+void testTdf59323_slideFooters();
 
 CPPUNIT_TEST_SUITE(SdOOXMLExportTest2);
 
@@ -213,6 +214,7 @@ public:
 CPPUNIT_TEST(testTdf118825);
 CPPUNIT_TEST(testTextColumns_tdf140852);
 CPPUNIT_TEST(testTextColumns_3columns);
+CPPUNIT_TEST(testTdf59323_slideFooters);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -1742,6 +1744,41 @@ void SdOOXMLExportTest2::testTextColumns_3columns()
 tempFile.EnableKillingFile();
 }
 
+void SdOOXMLExportTest2::testTdf59323_slideFooters()
+{
+::sd::DrawDocShellRef xDocShRef
+= 
loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf59323.pptx"), 
PPTX);
+
+utl::TempFile tempFile;
+xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+
+uno::Reference 
xDoc(xDocShRef->GetDoc()->getUnoModel(),
+ uno::UNO_QUERY_THROW);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xDoc->getDrawPages()->getCount());
+
+for (int nPageIndex = 0; nPageIndex < 3; nPageIndex++)
+{
+uno::Reference xPage(getPage(0, xDocShRef));
+uno::Reference xPropSet(xPage, uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(true, 
xPropSet->getPropertyValue("IsFooterVisible").get());
+CPPUNIT_ASSERT_EQUAL(true, 
xPropSet->getPropertyValue("IsDateTimeVisible").get());
+CPPUNIT_ASSERT_EQUAL(true, 
xPropSet->getPropertyValue("IsPageNumberVisible").get());
+}
+
+// Test placeholder indexes
+xmlDocUniquePtr pXmlDocMaster = parseExport(tempFile, 
"ppt/slideMasters/slideMaster1.xml");
+assertXPath(pXmlDocMaster, "//p:ph [@type='dt']", "idx", "1");
+assertXPath(pXmlDocMaster, "//p:ph [@type='ftr']", "idx", "2");
+assertXPath(pXmlDocMaster, "//p:ph [@type='sldNum']", "idx", "3");
+
+xmlDocUniquePtr pXmlDocSlide1 = parseExport(tempFile, 
"ppt/slides/slide1.xml");
+assertXPath(pXmlDocSlide1, "//p:ph [@type='dt']", "idx", "1");
+assertXPath(pXmlDocSlide1, "//p:ph [@type='ftr']", "idx", "2");
+assertXPath(pXmlDocSlide1, "//p:ph [@type='sldNum']", "idx", "3");
+
+xDocShRef->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/source

2021-06-16 Thread Sarper Akdemir (via logerrit)
 sd/source/filter/eppt/epptooxml.hxx  |3 
 sd/source/filter/eppt/pptx-epptooxml.cxx |  240 ++-
 2 files changed, 242 insertions(+), 1 deletion(-)

New commits:
commit 25ae0de974befb9c279936046056a850d77e0dca
Author: Sarper Akdemir 
AuthorDate: Wed Jun 9 08:21:27 2021 +0300
Commit: Miklos Vajna 
CommitDate: Wed Jun 16 15:04:50 2021 +0200

tdf#59323: pptx export: add support for slide footers

Adds support for exporting slide footers to PPTX.

Slide footers are exported as shapes that use placeholder indexes to refer 
to
the shapes on master.

To make the references work they are exported to layout slides too.

Change-Id: I8bfde520b0aec66405523c719844e69c6fc15b79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117012
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/sd/source/filter/eppt/epptooxml.hxx 
b/sd/source/filter/eppt/epptooxml.hxx
index fffaa100e00c..8643ff58e841 100644
--- a/sd/source/filter/eppt/epptooxml.hxx
+++ b/sd/source/filter/eppt/epptooxml.hxx
@@ -124,6 +124,9 @@ private:
 @returns Placeholder index
 */
 unsigned CreateNewPlaceholderIndex(const 
css::uno::Reference& rXShape);
+css::uno::Reference 
GetReferencedPlaceholderXShape(const PlaceholderType eType, PageType ePageType) 
const;
+void WritePlaceholderReferenceShapes(PowerPointShapeExport& rDML, PageType 
ePageType);
+
 /// Should we export as .pptm, ie. do we contain macros?
 bool mbPptm;
 
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 9bf8069f6dde..b34da51dcfe3 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -28,6 +28,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -57,6 +58,10 @@
 #include "pptx-animations.hxx"
 #include "../ppt/pptanimations.hxx"
 
+#include 
+#include 
+#include 
+
 #include 
 #include 
 #include 
@@ -115,7 +120,11 @@ public:
 ShapeExport&WriteTextShape(const Reference< XShape >& xShape) 
override;
 ShapeExport&WriteUnknownShape(const Reference< XShape >& xShape) 
override;
 ShapeExport&WritePlaceholderShape(const Reference< XShape >& 
xShape, PlaceholderType ePlaceholder);
+/** Writes a placeholder shape that references the placeholder on the 
master slide */
+ShapeExport&WritePlaceholderReferenceShape(PlaceholderType 
ePlaceholder, unsigned nReferencedPlaceholderIdx, PageType ePageType, 
Reference& rXPagePropSet);
 ShapeExport&WritePageShape(const Reference< XShape >& xShape, 
PageType ePageType, bool bPresObj);
+/** Writes textbody of a placeholder that references the placeholder on 
the master slide */
+ShapeExport&WritePlaceholderReferenceTextBody(PlaceholderType 
ePlaceholder, PageType ePageType, const Reference xPagePropSet);
 
 // helper parts
 bool WritePlaceholder(const Reference< XShape >& xShape, PlaceholderType 
ePlaceholder, bool bMaster);
@@ -1504,6 +1513,8 @@ void PowerPointExport::WriteShapeTree(const FSHelperPtr& 
pFS, PageType ePageType
 }
 }
 
+if ( ePageType == NORMAL || ePageType == LAYOUT )
+WritePlaceholderReferenceShapes(aDML, ePageType);
 pFS->endElementNS(XML_p, XML_spTree);
 }
 
@@ -1596,13 +1607,146 @@ ShapeExport& 
PowerPointShapeExport::WritePlaceholderShape(const Reference< XShap
 }
 mpFS->endElementNS(XML_p, XML_spPr);
 
-WriteTextBox(xShape, XML_p);
+WriteTextBox(xShape, XML_p, bUsePlaceholderIndex);
+
+mpFS->endElementNS(XML_p, XML_sp);
+
+return *this;
+}
+
+ShapeExport& PowerPointShapeExport::WritePlaceholderReferenceShape(
+PlaceholderType ePlaceholder, unsigned nReferencedPlaceholderIdx, PageType 
ePageType,
+Reference& rXPagePropSet)
+{
+mpFS->startElementNS(XML_p, XML_sp);
+
+// non visual shape properties
+mpFS->startElementNS(XML_p, XML_nvSpPr);
+const OString aPlaceholderID("PlaceHolder " + 
OString::number(mnShapeIdMax++));
+GetFS()->singleElementNS(XML_p, XML_cNvPr, XML_id, 
OString::number(mnShapeIdMax), XML_name,
+ aPlaceholderID.getStr());
+
+mpFS->startElementNS(XML_p, XML_cNvSpPr);
+mpFS->singleElementNS(XML_a, XML_spLocks, XML_noGrp, "1");
+mpFS->endElementNS(XML_p, XML_cNvSpPr);
+mpFS->startElementNS(XML_p, XML_nvPr);
+
+const char* pType = getPlaceholderTypeName(ePlaceholder);
+mpFS->singleElementNS(XML_p, XML_ph, XML_type, pType, XML_idx,
+  OString::number(nReferencedPlaceholderIdx));
+mpFS->endElementNS(XML_p, XML_nvPr);
+mpFS->endElementNS(XML_p, XML_nvSpPr);
+
+// visual shape properties
+mpFS->startElementNS(XML_p, XML_spPr);
+mpFS->endElementNS(XML_p, XML_spPr);
+
+WritePlaceholderReferenceTextBody(ePlaceholder, ePageType, rXPagePropSet);
 
 mpFS->endElementNS(XML_p, XML_sp);
 
 return *this;
 }
 
+ShapeE

[Libreoffice-commits] core.git: cui/uiconfig

2021-06-16 Thread Caolán McNamara (via logerrit)
 cui/uiconfig/ui/numberingpositionpage.ui |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fc3c92c82198e7ab56d21fbc896f4153bc8628c1
Author: Caolán McNamara 
AuthorDate: Wed Jun 16 09:32:27 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 16 15:02:03 2021 +0200

both children are at position 0

instead of one at 0 and the other at 1

Change-Id: I1943d2e68f39fb463d76237d6eb0bffe800a6b6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117313
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/cui/uiconfig/ui/numberingpositionpage.ui 
b/cui/uiconfig/ui/numberingpositionpage.ui
index 885f61ce558f..7c2c3fb30bd9 100644
--- a/cui/uiconfig/ui/numberingpositionpage.ui
+++ b/cui/uiconfig/ui/numberingpositionpage.ui
@@ -501,7 +501,7 @@ numbering and text:
   
 False
 True
-0
+1
   
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - include/oox oox/source vcl/unx

2021-06-16 Thread Caolán McNamara (via logerrit)
 include/oox/export/drawingml.hxx |   13 ++-
 include/oox/export/shapes.hxx|2 -
 oox/source/export/drawingml.cxx  |   68 +--
 oox/source/export/shapes.cxx |4 +-
 vcl/unx/gtk3/gtkinst.cxx |   19 ++
 5 files changed, 92 insertions(+), 14 deletions(-)

New commits:
commit 6c4e61fcc73574eb5d55cc0bcb3c6ff8d69debc6
Author: Caolán McNamara 
AuthorDate: Wed Jun 16 09:18:00 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 16 15:01:40 2021 +0200

gtk4: reenable some more working dialogs

Change-Id: Iaa8d77b231f8366ff4c33221691e9a3cadb73fa4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117312
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index b8ece3292b5d..6e5917a40356 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -22245,12 +22245,15 @@ weld::Builder* 
GtkInstance::CreateBuilder(weld::Widget* pParent, const OUString&
 rUIFile != "cui/ui/areatabpage.ui" &&
 rUIFile != "cui/ui/autocorrectdialog.ui" &&
 rUIFile != "cui/ui/bitmaptabpage.ui" &&
+rUIFile != "cui/ui/borderpage.ui" &&
 rUIFile != "cui/ui/breaknumberoption.ui" &&
 rUIFile != "cui/ui/colorpage.ui" &&
 rUIFile != "cui/ui/colorpickerdialog.ui" &&
 rUIFile != "cui/ui/editdictionarydialog.ui" &&
 rUIFile != "cui/ui/eventassigndialog.ui" &&
 rUIFile != "cui/ui/eventassignpage.ui" &&
+rUIFile != "cui/ui/gradientpage.ui" &&
+rUIFile != "cui/ui/hatchpage.ui" &&
 rUIFile != "cui/ui/hangulhanjaadddialog.ui" &&
 rUIFile != "cui/ui/hangulhanjaconversiondialog.ui" &&
 rUIFile != "cui/ui/hangulhanjaeditdictdialog.ui" &&
@@ -22268,13 +22271,20 @@ weld::Builder* 
GtkInstance::CreateBuilder(weld::Widget* pParent, const OUString&
 rUIFile != "cui/ui/macroassignpage.ui" &&
 rUIFile != "cui/ui/macroselectordialog.ui" &&
 rUIFile != "cui/ui/namedialog.ui" &&
+rUIFile != "cui/ui/numberingoptionspage.ui" &&
+rUIFile != "cui/ui/numberingpositionpage.ui" &&
 rUIFile != "cui/ui/objectnamedialog.ui" &&
 rUIFile != "cui/ui/objecttitledescdialog.ui" &&
 rUIFile != "cui/ui/optjsearchpage.ui" &&
 rUIFile != "cui/ui/optlingupage.ui" &&
 rUIFile != "cui/ui/optnewdictionarydialog.ui" &&
 rUIFile != "cui/ui/pastespecial.ui" &&
+rUIFile != "cui/ui/patterntabpage.ui" &&
 rUIFile != "cui/ui/percentdialog.ui" &&
+rUIFile != "cui/ui/pickbulletpage.ui" &&
+rUIFile != "cui/ui/pickgraphicpage.ui" &&
+rUIFile != "cui/ui/picknumberingpage.ui" &&
+rUIFile != "cui/ui/pickoutlinepage.ui" &&
 rUIFile != "cui/ui/qrcodegen.ui" &&
 rUIFile != "cui/ui/scriptorganizer.ui" &&
 rUIFile != "cui/ui/searchattrdialog.ui" &&
@@ -22286,6 +22296,7 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* 
pParent, const OUString&
 rUIFile != "cui/ui/thesaurus.ui" &&
 rUIFile != "cui/ui/tipofthedaydialog.ui" &&
 rUIFile != "cui/ui/toolbarmodedialog.ui" &&
+rUIFile != "cui/ui/transparencytabpage.ui" &&
 rUIFile != "cui/ui/wordcompletionpage.ui" &&
 rUIFile != "cui/ui/zoomdialog.ui" &&
 rUIFile != "filter/ui/pdfgeneralpage.ui" &&
@@ -22313,6 +22324,7 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* 
pParent, const OUString&
 rUIFile != "sfx/ui/password.ui" &&
 rUIFile != "sfx/ui/printeroptionsdialog.ui" &&
 rUIFile != "sfx/ui/safemodequerydialog.ui" &&
+rUIFile != "sfx/ui/saveastemplatedlg.ui" &&
 rUIFile != "sfx/ui/securityinfopage.ui" &&
 rUIFile != "sfx/ui/singletabdialog.ui" &&
 rUIFile != "sfx/ui/templatecategorydlg.ui" &&
@@ -22330,6 +22342,7 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* 
pParent, const OUString&
 rUIFile != "svx/ui/chineseconversiondialog.ui" &&
 rUIFile != "svx/ui/chinesedictionary.ui" &&
 rUIFile != "svx/ui/colorwindow.ui" &&
+rUIFile != "svx/ui/docrecoveryprogressdialog.ui" &&
 rUIFile != "svx/ui/docrecoverysavedialog.ui" &&
 rUIFile != "svx/ui/findreplacedialog.ui" &&
 rUIFile != "svx/ui/fontworkgallerydialog.ui" &&
@@ -22399,6 +22412,7 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* 
pParent, const OUString&
 rUIFile != "modules/smath/ui/symdefinedialog.ui" &&
 rUIFile != "modules/swriter/ui/autotext.ui" &&
 rUIFile != "modules/swriter/ui/bibliographyentry.ui" &&
+rUIFile != "modules/swriter/ui/bulletsandnumbering.ui" &&
 rUIFile != "modules/swriter/ui/columndialog.ui" &&
 rUIFile != "modules/swriter/ui/columnpage.ui" &&
 rUIFile != "modules/swriter/ui/editcategories.ui" &&
@@ -22407,6 +22421,10 @@ weld::Builder* 
GtkInstance::CreateBuilder(weld::Widget* pPa

[Libreoffice-commits] core.git: sw/uiconfig

2021-06-16 Thread Caolán McNamara (via logerrit)
 sw/uiconfig/swriter/ui/framedialog.ui |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 560eea7be7668af90e75c4dee2a2f16cbdbf0945
Author: Caolán McNamara 
AuthorDate: Wed Jun 16 09:08:55 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 16 15:01:02 2021 +0200

set default width/height of minimum for dialog

Change-Id: I25ea3a44f7bda7916bb129e7642150c80b9dab11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117291
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sw/uiconfig/swriter/ui/framedialog.ui 
b/sw/uiconfig/swriter/ui/framedialog.ui
index c70ff1971854..9adc58ab67bc 100644
--- a/sw/uiconfig/swriter/ui/framedialog.ui
+++ b/sw/uiconfig/swriter/ui/framedialog.ui
@@ -7,6 +7,8 @@
 6
 Frame
 True
+0
+0
 dialog
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/uiconfig

2021-06-16 Thread Caolán McNamara (via logerrit)
 sw/uiconfig/swriter/ui/framedialog.ui |  313 +-
 1 file changed, 47 insertions(+), 266 deletions(-)

New commits:
commit e7185e1994055672ff338974fe8ccb98daa947dd
Author: Caolán McNamara 
AuthorDate: Wed Jun 16 09:08:29 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 16 15:00:43 2021 +0200

resave with latest glade

Change-Id: I736005e7a6d669dea75347bddcd8114ceea4fe33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117290
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sw/uiconfig/swriter/ui/framedialog.ui 
b/sw/uiconfig/swriter/ui/framedialog.ui
index d16d1fe4c87b..c70ff1971854 100644
--- a/sw/uiconfig/swriter/ui/framedialog.ui
+++ b/sw/uiconfig/swriter/ui/framedialog.ui
@@ -1,31 +1,28 @@
 
-
+
 
   
   
-False
-6
+False
+6
 Frame
 True
-dialog
-
-  
-
+dialog
 
   
-False
+False
 vertical
 12
 
   
-False
-end
+False
+end
 
   
 _Reset
 True
-True
-True
+True
+True
 True
   
   
@@ -38,10 +35,10 @@
   
 _OK
 True
-True
-True
-True
-True
+True
+True
+True
+True
 True
   
   
@@ -54,8 +51,8 @@
   
 _Cancel
 True
-True
-True
+True
+True
 True
   
   
@@ -68,8 +65,8 @@
   
 _Help
 True
-True
-True
+True
+True
 True
   
   
@@ -83,47 +80,23 @@
   
 False
 True
-end
+end
 0
   
 
 
   
 True
-True
+True
 True
 True
 True
-True
+True
 
   
   
 True
-False
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
+False
 
   
 
@@ -132,42 +105,18 @@
 
   
 True
-False
+False
 Type
   
   
-False
+False
   
 
 
   
   
 True
-False
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
+False
 
   
 
@@ -179,43 +128,19 @@
 
   
 True
-False
+False
 Options
   
   
 1
-False
+False
   
 
 
   
   
 True
-False
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
+False
 
   
 
@@ -227,43 +152,19 @@
 
   
 True
-False
+False
 Wrap
   
   
 2
-False
+False
   
  

[Libreoffice-commits] core.git: vcl/unx

2021-06-16 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk4/convert3to4.cxx |   15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 3b8fb0ba187ad8b0a5eb6102dcfd982aee6db9f5
Author: Caolán McNamara 
AuthorDate: Wed Jun 16 08:48:35 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 16 15:00:16 2021 +0200

gtk 4.3.2 will have a fix for this

Change-Id: Idae818c0d7220d0fbe08462eff1654c22d24310c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117284
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/vcl/unx/gtk4/convert3to4.cxx b/vcl/unx/gtk4/convert3to4.cxx
index ce9af84251d5..0e8c697ee753 100644
--- a/vcl/unx/gtk4/convert3to4.cxx
+++ b/vcl/unx/gtk4/convert3to4.cxx
@@ -1341,13 +1341,16 @@ ConvertResult Convert3To4(const 
css::uno::Reference& xNode
 xNode->removeChild(xRemove);
 
 // https://gitlab.gnome.org/GNOME/gtk/-/issues/4041 double encode 
ampersands if use-underline is used
-if (xPropertyLabel && bUseUnderline)
+if (gtk_check_version(4, 3, 2) != nullptr)
 {
-OString sText = 
xPropertyLabel->getFirstChild()->getNodeValue().toUtf8();
-gchar* pText = g_markup_escape_text(sText.getStr(), sText.getLength());
-xPropertyLabel->getFirstChild()->setNodeValue(
-OUString(pText, strlen(pText), RTL_TEXTENCODING_UTF8));
-g_free(pText);
+if (xPropertyLabel && bUseUnderline)
+{
+OString sText = 
xPropertyLabel->getFirstChild()->getNodeValue().toUtf8();
+gchar* pText = g_markup_escape_text(sText.getStr(), 
sText.getLength());
+xPropertyLabel->getFirstChild()->setNodeValue(
+OUString(pText, strlen(pText), RTL_TEXTENCODING_UTF8));
+g_free(pText);
+}
 }
 
 return ConvertResult(bChildCanFocus, bHasVisible, bHasIconSize, 
bAlwaysShowImage, bUseUnderline,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/source

2021-06-16 Thread Sarper Akdemir (via logerrit)
 sd/source/filter/eppt/epptooxml.hxx  |   10 +++
 sd/source/filter/eppt/pptx-epptooxml.cxx |   83 ++-
 2 files changed, 59 insertions(+), 34 deletions(-)

New commits:
commit 1178d2978d3328de0bf0bccb9920fbc8b9a3a414
Author: Sarper Akdemir 
AuthorDate: Wed Jun 9 07:54:04 2021 +0300
Commit: Miklos Vajna 
CommitDate: Wed Jun 16 14:56:21 2021 +0200

tdf#59323: pptx export: add placeholder index to master footer placeholders

OOXML uses placeholder index to determine from which layout placeholder it
should be inheriting styles, position etc.

Added maPlaceholderShapeToIndexMap that stores corresponding Placeholder 
index
for a Placeholder XShape on the master slide.

Right now only used for placeholder types Footer, DateAndTime and 
SlideNumber.

Change-Id: If788f235d00b6d1cde7194d9e4a0789e019432c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117010
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/sd/source/filter/eppt/epptooxml.hxx 
b/sd/source/filter/eppt/epptooxml.hxx
index 93029f073487..fffaa100e00c 100644
--- a/sd/source/filter/eppt/epptooxml.hxx
+++ b/sd/source/filter/eppt/epptooxml.hxx
@@ -118,6 +118,12 @@ private:
 
 static void WriteDiagram(const FSHelperPtr& pFS, PowerPointShapeExport& 
rDML, const css::uno::Reference& rXShape, int nDiagramId);
 
+/** Create a new placeholder index for a master placeholder shape
+
+@param rXShape Master placeholder shape
+@returns Placeholder index
+*/
+unsigned CreateNewPlaceholderIndex(const 
css::uno::Reference& rXShape);
 /// Should we export as .pptm, ie. do we contain macros?
 bool mbPptm;
 
@@ -142,6 +148,10 @@ private:
 
 ::oox::drawingml::ShapeExport::ShapeHashMap maShapeMap;
 
+unsigned mnPlaceholderIndexMax; ///< Last used placeholder index
+/// Map of placeholder indexes for Master placeholders
+std::unordered_map< css::uno::Reference, unsigned > 
maPlaceholderShapeToIndexMap;
+
 struct AuthorComments {
 sal_Int32 nId;
 sal_Int32 nLastIndex;
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 6a8502361061..9bf8069f6dde 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -134,8 +134,35 @@ void WriteSndAc(const FSHelperPtr& pFS, const OUString& 
sSoundRelId, const OUStr
 pFS->endElement(FSNS(XML_p, XML_stSnd));
 pFS->endElement(FSNS(XML_p, XML_sndAc));
 }
-}
 
+const char* getPlaceholderTypeName(PlaceholderType ePlaceholder)
+{
+switch (ePlaceholder)
+{
+case SlideImage:
+return "sldImg";
+case Notes:
+return "body";
+case Header:
+return "hdr";
+case Footer:
+return "ftr";
+case SlideNumber:
+return "sldNum";
+case DateAndTime:
+return "dt";
+case Outliner:
+return "body";
+case Title:
+return "title";
+case Subtitle:
+return "subTitle";
+default:
+SAL_INFO("sd.eppt", "warning: unhandled placeholder type: " << 
ePlaceholder);
+return "";
+}
+}
+}
 }
 
 namespace {
@@ -344,6 +371,7 @@ PowerPointExport::PowerPointExport(const Reference< 
XComponentContext >& rContex
 , mnAnimationNodeIdMax(1)
 , mnDiagramId(1)
 , mbCreateNotes(false)
+, mnPlaceholderIndexMax(1)
 {
 comphelper::SequenceAsHashMap aArgumentsMap(rArguments);
 mbPptm = aArgumentsMap.getUnpackedValueOrDefault("IsPPTM", false);
@@ -1522,41 +1550,22 @@ ShapeExport& 
PowerPointShapeExport::WritePlaceholderShape(const Reference< XShap
 mpFS->endElementNS(XML_p, XML_cNvSpPr);
 mpFS->startElementNS(XML_p, XML_nvPr);
 
-const char* pType = nullptr;
-switch (ePlaceholder)
+bool bUsePlaceholderIndex
+= ePlaceholder == Footer || ePlaceholder == DateAndTime || 
ePlaceholder == SlideNumber;
+const char* pType = getPlaceholderTypeName(ePlaceholder);
+
+SAL_INFO("sd.eppt", "write placeholder " << pType);
+if (bUsePlaceholderIndex)
 {
-case SlideImage:
-pType = "sldImg";
-break;
-case Notes:
-pType = "body";
-break;
-case Header:
-pType = "hdr";
-break;
-case Footer:
-pType = "ftr";
-break;
-case SlideNumber:
-pType = "sldNum";
-break;
-case DateAndTime:
-pType = "dt";
-break;
-case Outliner:
-pType = "body";
-break;
-case Title:
-pType = "title";
-break;
-case Subtitle:
-pType = "subTitle";
-break;
-default:
-SAL_INFO("sd.eppt", "warning: unhandled placeholder type: " << 
ePlaceholder);
+mpFS->singleElementNS(
+XML_p, XML_ph, XML_type, pType, XML_idx,
+OString::number(
+
static_cast(Ge

[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.0' - include/svx svx/source sw/inc sw/qa sw/source

2021-06-16 Thread Miklos Vajna (via logerrit)
 include/svx/svdxcgv.hxx |2 +-
 svx/source/svdraw/svdxcgv.cxx   |4 ++--
 sw/inc/frmfmt.hxx   |6 +++---
 sw/qa/extras/htmlexport/htmlexport.cxx  |   17 -
 sw/source/core/layout/paintfrm.cxx  |8 
 sw/source/filter/html/htmlflywriter.cxx |2 +-
 6 files changed, 19 insertions(+), 20 deletions(-)

New commits:
commit 24cd981bb5bdbf541b6ed263a192836565c36e2b
Author: Miklos Vajna 
AuthorDate: Wed Jun 16 10:11:47 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jun 16 14:51:10 2021 +0200

sw HTML export: allow larger bitmaps for shapes than the vcl default

VCL default would be 500k pixels, i.e. a 2" x 1" shape at 600 dpi would
be already truncated from 1200 pixels width to 1000 pixels. That's a bit
too extreme, use a larger limit in the sw HTML export.

(cherry picked from commit 3c46fd3d727e4885fedef7c9f3fcd6f4c9a9ebb9)

Conflicts:
sw/qa/extras/htmlexport/htmlexport.cxx
sw/source/core/layout/paintfrm.cxx

Change-Id: I52b85d77cd27410d53c700a89190c99348de5e19

diff --git a/include/svx/svdxcgv.hxx b/include/svx/svdxcgv.hxx
index 0afaa7c6ad6f..8ed2adbb126d 100644
--- a/include/svx/svdxcgv.hxx
+++ b/include/svx/svdxcgv.hxx
@@ -58,7 +58,7 @@ public:
 
 // Draw all marked objects onto a bitmap, with the display's color depth
 // and resolution
-BitmapEx GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked = false, const 
std::optional& rTargetDPI = std::nullopt) const;
+BitmapEx GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked = false, const 
sal_uInt32 nMaximumQuadraticPixels = 50, const std::optional& 
rTargetDPI = std::nullopt) const;
 
 // Copy all marked objects to a new model, consisting of exactly one page,
 // with the flag PageNotValid set. This means, that only the page's objects
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index a576b8ee4ab0..38e7975f770d 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -425,7 +425,7 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, 
SdrObjList& rLst, const Po
 }
 }
 
-BitmapEx SdrExchangeView::GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked, 
const std::optional& rTargetDPI) const
+BitmapEx SdrExchangeView::GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked, 
const sal_uInt32 nMaximumQuadraticPixels, const std::optional& 
rTargetDPI) const
 {
 BitmapEx aBmp;
 
@@ -502,7 +502,7 @@ BitmapEx SdrExchangeView::GetMarkedObjBitmapEx(bool 
bNoVDevIfOneBmpMarked, const
 aBmp = convertPrimitive2DSequenceToBitmapEx(
 xPrimitives,
 aRange,
-/*nMaximumQuadraticPixels=*/ 50,
+nMaximumQuadraticPixels,
 eRangeUnit,
 rTargetDPI);
 }
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index e2cb600f2673..e6c72712118e 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -115,7 +115,7 @@ public:
 /// Creates the views.
 virtual void MakeFrames();
 
-virtual Graphic MakeGraphic( ImageMap* pMap = nullptr, const 
std::optional& rTargetDPI = std::nullopt );
+virtual Graphic MakeGraphic( ImageMap* pMap = nullptr, const sal_uInt32 
nMaximumQuadraticPixels = 50, const std::optional& rTargetDPI = 
std::nullopt );
 
 /**  @return the IMapObject defined at format (Fly)
 in the ImageMap at position Point.
@@ -210,7 +210,7 @@ public:
 
 SwAnchoredObject* GetAnchoredObj() const;
 
-virtual Graphic MakeGraphic( ImageMap* pMap = nullptr, const 
std::optional& rTargetDPI = std::nullopt ) override;
+virtual Graphic MakeGraphic( ImageMap* pMap = nullptr, const sal_uInt32 
nMaximumQuadraticPixels = 50, const std::optional& rTargetDPI = 
std::nullopt ) override;
 
 virtual bool GetInfo( SfxPoolItem& rInfo ) const override;
 
@@ -386,7 +386,7 @@ public:
  Reset delete marks. */
 virtual void MakeFrames() override;
 
-virtual Graphic MakeGraphic( ImageMap* pMap = nullptr, const 
std::optional& rTargetDPI = std::nullopt ) override;
+virtual Graphic MakeGraphic( ImageMap* pMap = nullptr, const sal_uInt32 
nMaximumQuadraticPixels = 50, const std::optional& rTargetDPI = 
std::nullopt ) override;
 
 virtual SwFrameFormat::tLayoutDir GetLayoutDir() const override;
 virtual void SetLayoutDir( const SwFrameFormat::tLayoutDir _eLayoutDir ) 
override;
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index 1fd48f104ed6..3dfe581a4858 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -1764,12 +1764,10 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testReqifEmbedShapeAsPNGCustomDPI)
 uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
 uno::Reference xShape(
 xFactory->createInstance("com.sun.st

[Libreoffice-commits] core.git: desktop/source include/desktop sfx2/Library_sfx.mk sfx2/source

2021-06-16 Thread Gopi Krishna Menon (via logerrit)
 desktop/source/app/crashreport.cxx |   15 
 include/desktop/crashreport.hxx|   10 
 sfx2/Library_sfx.mk|3 ++
 sfx2/source/view/viewfrm.cxx   |   43 +
 4 files changed, 70 insertions(+), 1 deletion(-)

New commits:
commit 4b925781760ba84e62cb847ddfe8f8c667a44c95
Author: Gopi Krishna Menon 
AuthorDate: Mon Jun 7 14:21:33 2021 +
Commit: Tor Lillqvist 
CommitDate: Wed Jun 16 14:45:35 2021 +0200

Add Active App Name Field To Crash Report

Adds a Active-App field in Crash
Report to assist in investigating
the crashes

Change-Id: I30e5f307045b8e5def9986447551f39e70b94edc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116786
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/desktop/source/app/crashreport.cxx 
b/desktop/source/app/crashreport.cxx
index 6f3d72934d51..b6d8b14d8beb 100644
--- a/desktop/source/app/crashreport.cxx
+++ b/desktop/source/app/crashreport.cxx
@@ -43,14 +43,16 @@
 #endif
 
 osl::Mutex CrashReporter::maMutex;
+osl::Mutex CrashReporter::maActiveNameMutex;
 std::unique_ptr 
CrashReporter::mpExceptionHandler;
 bool CrashReporter::mbInit = false;
 CrashReporter::vmaKeyValues CrashReporter::maKeyValues;
-
+OUString CrashReporter::mActiveApp;
 
 #if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID
 static bool dumpCallback(const google_breakpad::MinidumpDescriptor& 
descriptor, void* /*context*/, bool succeeded)
 {
+
CrashReporter::addKeyValue("Active-App",CrashReporter::currentActiveApp(),CrashReporter::AddItem);
 CrashReporter::addKeyValue("DumpFile", 
OStringToOUString(descriptor.path(), RTL_TEXTENCODING_UTF8), 
CrashReporter::Write);
 SAL_WARN("desktop", "minidump generated: " << descriptor.path());
 
@@ -68,6 +70,7 @@ static bool dumpCallback(const wchar_t* path, const wchar_t* 
id,
 #endif
 std::wstring_convert> conv1;
 std::string aPath = conv1.to_bytes(std::wstring(path)) + 
conv1.to_bytes(std::wstring(id)) + ".dmp";
+
CrashReporter::addKeyValue("Active-App",CrashReporter::currentActiveApp(),CrashReporter::AddItem);
 CrashReporter::addKeyValue("DumpFile", OStringToOUString(aPath.c_str(), 
RTL_TEXTENCODING_UTF8), CrashReporter::AddItem);
 CrashReporter::addKeyValue("GDIHandles", 
OUString::number(::GetGuiResources(::GetCurrentProcess(), GR_GDIOBJECTS)), 
CrashReporter::Write);
 SAL_WARN("desktop", "minidump generated: " << aPath);
@@ -159,6 +162,16 @@ void CrashReporter::writeCommonInfo()
 updateMinidumpLocation();
 }
 
+void CrashReporter::setActiveApp(const OUString& rActiveApp)
+{
+osl::MutexGuard aGuard(maActiveNameMutex);
+mActiveApp=rActiveApp;
+}
+
+OUString CrashReporter::currentActiveApp()
+{
+return mActiveApp;
+}
 
 namespace {
 
diff --git a/include/desktop/crashreport.hxx b/include/desktop/crashreport.hxx
index 8d55b85487d0..c16b4a7eb80b 100644
--- a/include/desktop/crashreport.hxx
+++ b/include/desktop/crashreport.hxx
@@ -56,8 +56,12 @@ public:
 
 static bool IsDumpEnable();
 
+static void setActiveApp(const OUString& rActiveApp);
+static OUString currentActiveApp();
+
 private:
 static osl::Mutex maMutex;
+static osl::Mutex maActiveNameMutex;
 static bool mbInit;
 typedef  struct _mpair
 {
@@ -72,6 +76,7 @@ private:
 
 typedef std::vector vmaKeyValues;
 static vmaKeyValues maKeyValues; // used to temporarily save entries 
before the old info has been uploaded
+static OUString mActiveApp;
 
 static std::unique_ptr 
mpExceptionHandler;
 
@@ -88,6 +93,11 @@ private:
 // // the code without linking to the lib and without adding 
HAVE_FEATURE_BREAKPAD
 // // everywhere we want to log something to the crash report system.
 inline static void addKeyValue(SAL_UNUSED_PARAMETER const OUString& 
/*rKey*/, SAL_UNUSED_PARAMETER const OUString& /*rValue*/, SAL_UNUSED_PARAMETER 
tAddKeyHandling /*AddKeyHandling*/) {};
+inline static void setActiveApp(SAL_UNUSED_PARAMETER const OUString& 
/*rActiveApp*/) {};
+inline static OUString currentActiveApp()
+{
+return OUString();
+};
 #endif // HAVE_FEATURE_BREAKPAD
 };
 
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index cab55c2a3335..0120cee75b4e 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -65,6 +65,9 @@ $(eval $(call gb_Library_use_libraries,sfx,\
 ucbhelper \
 utl \
 vcl \
+$(if $(ENABLE_BREAKPAD), \
+crashreport \
+) \
 ))
 
 $(eval $(call gb_Library_use_externals,sfx,\
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index be8ea298b978..f15e0aa5bfc4 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -68,6 +68,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 
@@ -95,6 +97,8 @@
 
 #include 
 
+#include 
+
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -143,6 +147,42 @@

[Libreoffice-commits] core.git: vcl/unx

2021-06-16 Thread Gabor Kelemen (via logerrit)
 vcl/unx/generic/app/keysymnames.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 3f9fcf0e7f154e49bbffeaea925edb6055add494
Author: Gabor Kelemen 
AuthorDate: Sat Jun 5 11:32:40 2021 +0200
Commit: László Németh 
CommitDate: Wed Jun 16 14:41:34 2021 +0200

tdf#103388 Show the backtick used in shortcut in Calc View menu

as Ctrl+` instead of "Ctrl+grave" (see at View->Show Formula).

This affected only gen backend on Linux (SAL_USE_VCLPLUGIN=gen),
gtk3 and qt5 are handling this correctly.

Change-Id: I2bebcf68118642e6c12cf2c5d4392f2ca423665b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116742
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/vcl/unx/generic/app/keysymnames.cxx 
b/vcl/unx/generic/app/keysymnames.cxx
index c4211be02b16..387792d95984 100644
--- a/vcl/unx/generic/app/keysymnames.cxx
+++ b/vcl/unx/generic/app/keysymnames.cxx
@@ -67,7 +67,8 @@ namespace vcl_sal {
 { XK_Escape, "Esc" },
 { XK_space, "Space" },
 { XK_Page_Up, "PgUp"},
-{ XK_Page_Down, "PgDn"}
+{ XK_Page_Down, "PgDn"},
+{ XK_grave, "`"}
 };
 
 const struct KeysymNameReplacement aImplReplacements_Turkish[] =
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/oox oox/source

2021-06-16 Thread Sarper Akdemir (via logerrit)
 include/oox/export/drawingml.hxx |   18 ++
 oox/source/export/drawingml.cxx  |  108 ---
 2 files changed, 97 insertions(+), 29 deletions(-)

New commits:
commit ba66d49db89678628975b29612c0caab49457adf
Author: Sarper Akdemir 
AuthorDate: Wed Jun 9 07:34:32 2021 +0300
Commit: Miklos Vajna 
CommitDate: Wed Jun 16 14:34:14 2021 +0200

tdf#59323: pptx export: add datetime field type helpers

Creates helper functions to convert from LO time and date formats to 
datetime
fields on OOXML

Change-Id: Ibbfefa18d0422eddb6c37539294ed23e77fe5f22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117009
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index 2876d59c5367..7f6de9f99006 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -46,6 +46,8 @@
 
 class Graphic;
 class SdrObjCustomShape;
+enum class SvxDateFormat;
+enum class SvxTimeFormat;
 
 namespace com::sun::star {
 namespace awt {
@@ -166,6 +168,22 @@ protected:
   const css::uno::Reference< css::beans::XPropertyState >& 
rXPropState,
   const OUString& aName, css::beans::PropertyState& eState );
 OUString GetFieldValue( const css::uno::Reference< css::text::XTextRange 
>& rRun, bool& bIsURLField );
+/** Gets OOXML datetime field type from LO Date format
+
+@param eDate LO Date format
+*/
+static OUString GetDatetimeTypeFromDate(SvxDateFormat eDate);
+/** Gets OOXML datetime field type from LO Time format
+
+@param eTime LO Time format
+*/
+static OUString GetDatetimeTypeFromTime(SvxTimeFormat eTime);
+/** Gets OOXML datetime field type from combination of LO Time and Date 
formats
+
+@param eDate LO Date format
+@param eTime LO Time format
+*/
+static OUString GetDatetimeTypeFromDateTime(SvxDateFormat eDate, 
SvxTimeFormat eTime);
 
 /// Output the media (including copying a video from vnd.sun.star.Package: 
to the output if necessary).
 void WriteMediaNonVisualProperties(const 
css::uno::Reference& xShape);
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 5f42dc18cd75..26598636efbd 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2286,40 +2286,13 @@ OUString DrawingML::GetFieldValue( const 
css::uno::Reference< css::text::XTextRa
 {
 sal_Int32 nNumFmt = -1;
 rXPropSet->getPropertyValue(UNO_TC_PROP_NUMFORMAT) >>= 
nNumFmt;
-switch(static_cast(nNumFmt))
-{
-case SvxDateFormat::StdSmall:
-case SvxDateFormat::A: aFieldValue = "datetime"; // 
13/02/96
-  break;
-case SvxDateFormat::B: aFieldValue = "datetime1"; // 
13/02/1996
-  break;
-case SvxDateFormat::StdBig:
-case SvxDateFormat::D: aFieldValue = "datetime3"; // 
13 February 1996
-  break;
-default: break;
-}
+aFieldValue = 
GetDatetimeTypeFromDate(static_cast(nNumFmt));
 }
 else if(aFieldKind == "ExtTime")
 {
 sal_Int32 nNumFmt = -1;
 rXPropSet->getPropertyValue(UNO_TC_PROP_NUMFORMAT) >>= 
nNumFmt;
-switch(static_cast(nNumFmt))
-{
-case SvxTimeFormat::Standard:
-case SvxTimeFormat::HH24_MM_SS:
-aFieldValue = "datetime11"; // 13:49:38
-break;
-case SvxTimeFormat::HH24_MM:
-aFieldValue = "datetime10"; // 13:49
-break;
-case SvxTimeFormat::HH12_MM:
-aFieldValue = "datetime12"; // 01:49 PM
-break;
-case SvxTimeFormat::HH12_MM_SS:
-aFieldValue = "datetime13"; // 01:49:38 PM
-break;
-default: break;
-}
+aFieldValue = 
GetDatetimeTypeFromTime(static_cast(nNumFmt));
 }
 else if(aFieldKind == "ExtFile")
 {
@@ -2346,6 +2319,83 @@ OUString DrawingML::GetFieldValue( const 
css::uno::Reference< css::text::XTextRa
 return aFieldValue;
 }
 
+OUString DrawingML::GetDatetimeTypeFromDate(SvxDateFormat eDate)
+{
+return GetDatetimeTypeFromDateTime(eDate, SvxTimeFormat::AppDefault);
+}
+
+OUString DrawingML::GetDatetimeTypeFromTime(SvxTimeFormat eTime)
+{
+   

[Libreoffice-commits] core.git: chart2/qa oox/source sd/qa

2021-06-16 Thread Sarper Akdemir (via logerrit)
 chart2/qa/extras/chart2import.cxx|4 -
 chart2/qa/extras/xshape/chart2xshape.cxx |2 
 oox/source/drawingml/textbody.cxx|1 
 oox/source/ppt/pptshape.cxx  |  104 +++
 sd/qa/unit/data/pptx/numfmt.pptx |binary
 sd/qa/unit/data/pptx/slidenum_field.pptx |binary
 sd/qa/unit/import-tests.cxx  |2 
 7 files changed, 109 insertions(+), 4 deletions(-)

New commits:
commit 166671f4aa19deec47c10a220ae1d29fa57faa93
Author: Sarper Akdemir 
AuthorDate: Sun Apr 25 15:59:39 2021 +0300
Commit: Miklos Vajna 
CommitDate: Wed Jun 16 14:32:41 2021 +0200

tdf#59323: pptx import: import footer fields as properties

Makes footer, slidenum and datetime placeholders that are inserted to
the slides themselves on pptx files imported as slide properties if it
is possible to do so without losing information (style, position etc.)

If that is not the case and the footers have some special style applied
to them that isn't inherited from master slides, fallbacks to the current
implementation importing them as shapes.

Also since the default way of displaying slide footers in LO use the
respective text fields on master slides, information in master/layout
slide datetime and footer placeholders respectively get replaced with
 text fields and  text fields.

Change-Id: Ib2f7d18103b62c0c9a8453e01cfd2fd1aa1d39af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117008
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/chart2/qa/extras/chart2import.cxx 
b/chart2/qa/extras/chart2import.cxx
index 41d55297a336..383e4524468a 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -764,7 +764,7 @@ void Chart2ImportTest::testBnc864396()
 void Chart2ImportTest::testBnc889755()
 {
 load(u"/chart2/qa/extras/data/pptx/", "bnc889755.pptx");
-uno::Reference 
xChartDoc(getChartDocFromDrawImpress(0, 6), uno::UNO_QUERY_THROW);
+uno::Reference 
xChartDoc(getChartDocFromDrawImpress(0, 5), uno::UNO_QUERY_THROW);
 CPPUNIT_ASSERT(xChartDoc->hasInternalDataProvider());
 
 uno::Reference< chart2::XInternalDataProvider > xDataProvider( 
xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW );
@@ -792,7 +792,7 @@ void Chart2ImportTest::testBnc889755()
 uno::Reference xDoc(mxComponent, 
uno::UNO_QUERY_THROW);
 uno::Reference 
xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW);
 // Shape "Title 3"
-uno::Reference xShapeProps(xPage->getByIndex(5), 
uno::UNO_QUERY_THROW);
+uno::Reference xShapeProps(xPage->getByIndex(4), 
uno::UNO_QUERY_THROW);
 awt::Gradient aTransparence;
 xShapeProps->getPropertyValue("FillTransparenceGradient") >>= 
aTransparence;
 CPPUNIT_ASSERT(aTransparence.StartColor != aTransparence.EndColor);
diff --git a/chart2/qa/extras/xshape/chart2xshape.cxx 
b/chart2/qa/extras/xshape/chart2xshape.cxx
index 895f84bb62a4..4964bfc455ee 100644
--- a/chart2/qa/extras/xshape/chart2xshape.cxx
+++ b/chart2/qa/extras/xshape/chart2xshape.cxx
@@ -177,7 +177,7 @@ void Chart2XShapeTest::testTdf76649TrendLineBug()
 void Chart2XShapeTest::testTdf88154LabelRotatedLayout()
 {
 load(u"chart2/qa/extras/xshape/data/pptx/", 
"tdf88154_LabelRotatedLayout.pptx");
-uno::Reference xChartDoc = 
getChartDocFromDrawImpress(0, 6);
+uno::Reference xChartDoc = 
getChartDocFromDrawImpress(0, 5);
 uno::Reference xDumper(xChartDoc, UNO_QUERY_THROW);
 OUString rDump = xDumper->dump();
 OString aXmlDump = OUStringToOString(rDump, RTL_TEXTENCODING_UTF8);
diff --git a/oox/source/drawingml/textbody.cxx 
b/oox/source/drawingml/textbody.cxx
index b665e7b355a0..f4da6886a69c 100644
--- a/oox/source/drawingml/textbody.cxx
+++ b/oox/source/drawingml/textbody.cxx
@@ -35,6 +35,7 @@ TextBody::TextBody()
 }
 
 TextBody::TextBody( const TextBodyPtr& pBody )
+: mbHasNoninheritedBodyProperties( false )
 {
 if( pBody ) {
 maTextProperties = pBody->maTextProperties;
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 4e07ae104db3..f1c4a892ac14 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -20,8 +20,12 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
+#include 
 
+#include 
 #include 
 #include 
 #include 
@@ -86,6 +90,19 @@ static const char* lclDebugSubType( sal_Int32 nType )
 return "unknown - please extend lclDebugSubType";
 }
 
+namespace
+{
+bool ShapeHasNoVisualPropertiesOnImport(oox::ppt::PPTShape& rPPTShape)
+{
+return  !rPPTShape.hasNonInheritedShapeProperties()
+&& !rPPTShape.hasShapeStyleRefs()
+&& !rPPTShape.getTextBody()->hasVisualRunProperties()
+&& !rPPTShape.getTextBody()->hasNoninheritedBodyProperties()
+&& !rPPTShape.getTextBody()->hasListStyleOnImport()
+&& !rPPTShape.getTextBody()->hasParagraphProperties();
+}
+}
+
 oox::drawingml::T

[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - svx/source

2021-06-16 Thread Stephan Bergmann (via logerrit)
 svx/source/svdraw/svdetc.cxx |   80 ++-
 1 file changed, 27 insertions(+), 53 deletions(-)

New commits:
commit 894dd4441a8b3a726d3e868a4f3dcc714332e502
Author: Stephan Bergmann 
AuthorDate: Tue Jun 15 17:57:56 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 16 13:18:55 2021 +0200

memcpy-param-overlap

At least UITest_impress_tests started to fail at

> ==608818==ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges 
[0x602ef270,0x602ef276) and [0x602ef274, 0x602ef27a) overlap
>  #0 in __asan_memcpy at 
~/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:22:3
>  #1 in RemoveWhichRange(unsigned short const*, unsigned short, unsigned 
short) at svx/source/svdraw/svdetc.cxx:413:17
>  #2 in SdrObjEditView::SetAttributes(SfxItemSet const&, bool) at 
svx/source/svdraw/svdedxv.cxx::19
>  #3 in SdrCreateView::SetAttributes(SfxItemSet const&, bool) at 
svx/source/svdraw/svdcrtv.cxx:883:29
>  #4 in SdrView::SetAttributes(SfxItemSet const&, bool) at 
include/svx/svdview.hxx:193:96
>  #5 in sd::View::SetAttributes(SfxItemSet const&, bool, bool, bool) at 
sd/source/ui/view/sdview.cxx:488:28
>  #6 in sd::DrawView::SetAttributes(SfxItemSet const&, bool, bool, bool) 
at sd/source/ui/view/drawview.cxx:288:27
>  #7 in sd::TextObjectBar::Execute(SfxRequest&) at 
sd/source/ui/view/drtxtob1.cxx:819:21
>  #8 in SfxStubTextObjectBarExecute(SfxShell*, SfxRequest&) at 
workdir/SdiTarget/sd/sdi/sdslots.hxx:17883:1
[...]

(followed by

> ==647521==ERROR: AddressSanitizer: heap-buffer-overflow on address 
0x602000258856 at pc 0x002f7b0a bp 0x7f7f7a69fdb0 sp 0x7f7f7a69f560
> READ of size 6 at 0x602000258856 thread T9 (cppu_threadpool)
>  #0 in __asan_memmove at 
/data/sbergman/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:30:3
>  #1 in RemoveWhichRange(unsigned short const*, unsigned short, unsigned 
short) at svx/source/svdraw/svdetc.cxx:413:17
>  #2 in SdrObjEditView::SetAttributes(SfxItemSet const&, bool) at 
svx/source/svdraw/svdedxv.cxx::19
>  #3 in SdrCreateView::SetAttributes(SfxItemSet const&, bool) at 
svx/source/svdraw/svdcrtv.cxx:883:29
>  #4 in SdrView::SetAttributes(SfxItemSet const&, bool) at 
include/svx/svdview.hxx:193:96
>  #5 in sd::View::SetAttributes(SfxItemSet const&, bool, bool, bool) at 
sd/source/ui/view/sdview.cxx:488:28
>  #6 in sd::DrawView::SetAttributes(SfxItemSet const&, bool, bool, bool) 
at sd/source/ui/view/drawview.cxx:288:27
>  #7 in sd::TextObjectBar::Execute(SfxRequest&) at 
sd/source/ui/view/drtxtob1.cxx:819:21
>  #8 in SfxStubTextObjectBarExecute(SfxShell*, SfxRequest&) at 
workdir/SdiTarget/sd/sdi/sdslots.hxx:17883:1
[...]
> 0x602000258856 is located 0 bytes to the right of 6-byte region 
[0x602000258850,0x602000258856)
> allocated by thread T9 (cppu_threadpool) here:
[...]

if the memcpy were replaced with memmove) after
8aaa28ed43978a9a4a20d62368410a57ec05c23f "Assert on valid order of which 
ids in
ranges on SfxItemSet creation":

Where in the past it had called

  RemoveWhichRange({10951, 10951, 4007, 4007, 0}, 4007, 4062)

and

  RemoveWhichRange({10950, 10950, 4007, 4007, 0}, 4007, 4062)

on wrongly sorted ranges, for which the implementation of RemoveWhichRange
happened to work, it now calls

  RemoveWhichRange({4007, 4007, 10951, 10951, 0}, 4007, 4062)

and

  RemoveWhichRange({4007, 4007, 10950, 10950, 0}, 4007, 4062)

on correctly sorted ranges, which uncovered the broken implementation.

Given that RemoveWhichRange is presumably not hot (e.g., being called just 
two
times during UITest_impress_tests), turn it into a less sophisticated, but 
also
likely less error-prone algorithm.

(Leaving unit tests as a TODO, given that RemoveWhichRange is not
currently exported from Library_svxcore, and the existing 
CppunitTest_svx_unit
links against Library_svxcore rather than using
gb_CppunitTest_use_library_objects.)

Change-Id: I8a1c1d5db8073928ad2f6e88d581f24a0e882925
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117264
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 541f94df85756d3a383b1f9ba49841ca0011b52e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117294

diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 69d0306c77b7..9967376bf078 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -19,6 +19,8 @@
 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 
@@ -368,63 +370,35 @@ bool SearchOutlinerItems(const SfxItemSet& rSet, bool 
bInklDefaults, bool* pbOnl
 std::unique_ptr RemoveWhichRange(const sal_uInt16* 
pOldWhichTable, sal_uInt16 nR

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/source

2021-06-16 Thread Gabriel Masei (via logerrit)
 vcl/source/window/dialog.cxx  |   25 ++---
 vcl/source/window/mouse.cxx   |3 ++-
 vcl/source/window/paint.cxx   |   17 +++--
 vcl/source/window/window2.cxx |5 +
 vcl/source/window/winproc.cxx |   34 ++
 5 files changed, 58 insertions(+), 26 deletions(-)

New commits:
commit cf30850d2e04737ca1c646eef6668f110d7ab883
Author: Gabriel Masei 
AuthorDate: Wed Jun 16 09:41:12 2021 +0300
Commit: Andras Timar 
CommitDate: Wed Jun 16 12:51:13 2021 +0200

vcl: check mpWindowImpl for nullptr

Change-Id: I492c7d5c1846df7507b1f043b80de4e61ff8ca86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117282
Tested-by: Jenkins
Reviewed-by: Michael Meeks 
(cherry picked from commit bf6dabe0ebad3cc5bc0edc04ae74fba0190b6203)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117292
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 3cbffb41da66..a68a6a8e4249 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -416,7 +416,8 @@ vcl::Window* Dialog::GetDefaultParent(WinBits nStyle)
 auto& rExecuteDialogs = pSVData->mpWinData->mpExecuteDialogs;
 auto it = std::find_if(rExecuteDialogs.rbegin(), 
rExecuteDialogs.rend(),
 [&pParent](VclPtr& rDialogPtr) {
-return 
pParent->ImplGetFirstOverlapWindow()->IsWindowOrChild(rDialogPtr, true) &&
+return pParent->ImplGetFirstOverlapWindow() &&
+
pParent->ImplGetFirstOverlapWindow()->IsWindowOrChild(rDialogPtr, true) &&
 rDialogPtr->IsReallyVisible() && rDialogPtr->IsEnabled() &&
 rDialogPtr->IsInputEnabled() && 
!rDialogPtr->IsInModalMode(); });
 if (it != rExecuteDialogs.rend())
@@ -962,12 +963,15 @@ bool Dialog::ImplStartExecute()
 if ( pParent )
 {
 pParent = pParent->ImplGetFirstOverlapWindow();
-SAL_WARN_IF( !pParent->IsReallyVisible(), "vcl",
- "Dialog::StartExecuteModal() - Parent not visible" );
-SAL_WARN_IF( !pParent->IsInputEnabled(), "vcl",
- "Dialog::StartExecuteModal() - Parent input disabled, 
use another parent to ensure modality!" );
-SAL_WARN_IF(  pParent->IsInModalMode(), "vcl",
-  "Dialog::StartExecuteModal() - Parent already 
modally disabled, use another parent to ensure modality!" );
+if (pParent)
+{
+SAL_WARN_IF( !pParent->IsReallyVisible(), "vcl",
+"Dialog::StartExecuteModal() - Parent not visible" 
);
+SAL_WARN_IF( !pParent->IsInputEnabled(), "vcl",
+"Dialog::StartExecuteModal() - Parent input 
disabled, use another parent to ensure modality!" );
+SAL_WARN_IF(  pParent->IsInModalMode(), "vcl",
+"Dialog::StartExecuteModal() - Parent already 
modally disabled, use another parent to ensure modality!" );
+}
 }
 #endif
 
@@ -1264,12 +1268,11 @@ void Dialog::ImplSetModalInputMode( bool bModal )
 
 void Dialog::GrabFocusToFirstControl()
 {
-vcl::Window* pFocusControl;
+vcl::Window* pFocusControl = nullptr;
+vcl::Window* pFirstOverlapWindow = ImplGetFirstOverlapWindow();
 
 // find focus control, even if the dialog has focus
-if ( HasFocus() )
-pFocusControl = nullptr;
-else
+if (!HasFocus() && pFirstOverlapWindow && 
pFirstOverlapWindow->mpWindowImpl)
 {
 // prefer a child window which had focus before
 pFocusControl = 
ImplGetFirstOverlapWindow()->mpWindowImpl->mpLastFocusWindow;
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index e2f0458bf0fe..513b186b2dc7 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -292,7 +292,8 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags )
 
 // mark this windows as the last FocusWindow
 vcl::Window* pOverlapWindow = ImplGetFirstOverlapWindow();
-pOverlapWindow->mpWindowImpl->mpLastFocusWindow = this;
+if (pOverlapWindow->mpWindowImpl)
+pOverlapWindow->mpWindowImpl->mpLastFocusWindow = this;
 mpWindowImpl->mpFrameData->mpFocusWin = this;
 
 if( !bHasFocus )
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 218cdd3216ed..f361e49d392b 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -622,6 +622,9 @@ void Window::ImplCallPaint(const vcl::Region* pRegion, 
ImplPaintFlags nPaintFlag
 
 void Window::ImplCallOverlapPaint()
 {
+if (!mpWindowImpl)
+return;
+
 // emit overlapping windows first
 vcl::Window* pTempWindow = mpWindowImpl->mpFirstOverlap;
 while ( pTempWindow )
@@ -988,7 +991,7 @@ void Window::ImplValidate()
 
 void Window::ImplUpdateAll()
 {
-i

[Libreoffice-commits] core.git: include/svx svx/source sw/inc sw/qa sw/source

2021-06-16 Thread Miklos Vajna (via logerrit)
 include/svx/svdxcgv.hxx |2 +-
 svx/source/svdraw/svdxcgv.cxx   |4 ++--
 sw/inc/frmfmt.hxx   |6 +++---
 sw/qa/extras/htmlexport/htmlexport.cxx  |   17 -
 sw/source/core/layout/paintfrm.cxx  |8 
 sw/source/filter/html/htmlflywriter.cxx |2 +-
 6 files changed, 19 insertions(+), 20 deletions(-)

New commits:
commit 3c46fd3d727e4885fedef7c9f3fcd6f4c9a9ebb9
Author: Miklos Vajna 
AuthorDate: Wed Jun 16 10:11:47 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jun 16 12:21:46 2021 +0200

sw HTML export: allow larger bitmaps for shapes than the vcl default

VCL default would be 500k pixels, i.e. a 2" x 1" shape at 600 dpi would
be already truncated from 1200 pixels width to 1000 pixels. That's a bit
too extreme, use a larger limit in the sw HTML export.

Change-Id: I52b85d77cd27410d53c700a89190c99348de5e19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117287
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/include/svx/svdxcgv.hxx b/include/svx/svdxcgv.hxx
index 0afaa7c6ad6f..8ed2adbb126d 100644
--- a/include/svx/svdxcgv.hxx
+++ b/include/svx/svdxcgv.hxx
@@ -58,7 +58,7 @@ public:
 
 // Draw all marked objects onto a bitmap, with the display's color depth
 // and resolution
-BitmapEx GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked = false, const 
std::optional& rTargetDPI = std::nullopt) const;
+BitmapEx GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked = false, const 
sal_uInt32 nMaximumQuadraticPixels = 50, const std::optional& 
rTargetDPI = std::nullopt) const;
 
 // Copy all marked objects to a new model, consisting of exactly one page,
 // with the flag PageNotValid set. This means, that only the page's objects
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index af4e41734db8..8881336bdcf9 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -425,7 +425,7 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, 
SdrObjList& rLst, const Po
 }
 }
 
-BitmapEx SdrExchangeView::GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked, 
const std::optional& rTargetDPI) const
+BitmapEx SdrExchangeView::GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked, 
const sal_uInt32 nMaximumQuadraticPixels, const std::optional& 
rTargetDPI) const
 {
 BitmapEx aBmp;
 
@@ -502,7 +502,7 @@ BitmapEx SdrExchangeView::GetMarkedObjBitmapEx(bool 
bNoVDevIfOneBmpMarked, const
 aBmp = convertPrimitive2DSequenceToBitmapEx(
 xPrimitives,
 aRange,
-/*nMaximumQuadraticPixels=*/ 50,
+nMaximumQuadraticPixels,
 eRangeUnit,
 rTargetDPI);
 }
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 36333d4e8525..316db344a2b8 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -116,7 +116,7 @@ public:
 /// Creates the views.
 virtual void MakeFrames();
 
-virtual Graphic MakeGraphic( ImageMap* pMap = nullptr, const 
std::optional& rTargetDPI = std::nullopt );
+virtual Graphic MakeGraphic( ImageMap* pMap = nullptr, const sal_uInt32 
nMaximumQuadraticPixels = 50, const std::optional& rTargetDPI = 
std::nullopt );
 
 /**  @return the IMapObject defined at format (Fly)
 in the ImageMap at position Point.
@@ -212,7 +212,7 @@ public:
 
 SwAnchoredObject* GetAnchoredObj() const;
 
-virtual Graphic MakeGraphic( ImageMap* pMap = nullptr, const 
std::optional& rTargetDPI = std::nullopt ) override;
+virtual Graphic MakeGraphic( ImageMap* pMap = nullptr, const sal_uInt32 
nMaximumQuadraticPixels = 50, const std::optional& rTargetDPI = 
std::nullopt ) override;
 
 virtual bool GetInfo( SfxPoolItem& rInfo ) const override;
 
@@ -388,7 +388,7 @@ public:
  Reset delete marks. */
 virtual void MakeFrames() override;
 
-virtual Graphic MakeGraphic( ImageMap* pMap = nullptr, const 
std::optional& rTargetDPI = std::nullopt ) override;
+virtual Graphic MakeGraphic( ImageMap* pMap = nullptr, const sal_uInt32 
nMaximumQuadraticPixels = 50, const std::optional& rTargetDPI = 
std::nullopt ) override;
 
 virtual SwFrameFormat::tLayoutDir GetLayoutDir() const override;
 virtual void SetLayoutDir( const SwFrameFormat::tLayoutDir _eLayoutDir ) 
override;
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index 044a6ad29e72..180a2599 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -1762,12 +1762,10 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testReqifEmbedShapeAsPNGCustomDPI)
 uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
 uno::Reference xShape(
 xFactory->createInstance("com.sun.star.drawing.RectangleShape"), 
uno::UNO_QUERY);
-xShape->setSize(awt::Size(

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/sal

2021-06-16 Thread Stephan Bergmann (via logerrit)
 include/sal/log.hxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 0d00628eee27fded8898e87d0ce300e0764c020e
Author: Stephan Bergmann 
AuthorDate: Tue May 18 12:58:34 2021 +0200
Commit: Mike Kaganski 
CommitDate: Wed Jun 16 11:56:22 2021 +0200

tdf#142326: Adapt to "libstdc++: Implement LWG 1203 for rvalue iostreams"

...for libstdc++ 11.2, similar to 1f36f21d91c429190ae314dadeec409f35f4
"Adapt to "libstdc++: Implement LWG 1203 for rvalue iostreams" for 
libstdc++ 12.
The libstdc++ change referenced there has been backported to the 
releases/gcc-11
branch past the releases/gcc-11.1.0 tag (i.e., only towards libstdc++ 11.2) 
as


"libstdc++: Implement LWG 1203 for rvalue iostreams".

According to
,

,
and , the right __GLIBCXX__ 
value for
libstdc++ 11.1 should be 20210427, but at least
libstdc++-devel-11.1.1-1.fc34.x86_64 defines it as 20210428 while not 
including
the above "libstdc++: Implement LWG 1203 for rvalue iostreams" commit, so 
use
that value here.

Change-Id: I4e2c6d6ad8156a83f5c4bc861e4a118271928a20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115738
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins
(cherry picked from commit 95e26d3dce4f5a3b2d010d5ca47b4e450905a100)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117231
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mike Kaganski 

diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index 1193f882d98e..a3844ff0a129 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -163,7 +163,9 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER 
StreamIgnore const &) {
 
 @since LibreOffice 3.5
 */
-#if defined _LIBCPP_VERSION || (defined _GLIBCXX_RELEASE && _GLIBCXX_RELEASE 
>= 12) \
+#if defined _LIBCPP_VERSION \
+|| (defined _GLIBCXX_RELEASE \
+&& (_GLIBCXX_RELEASE >= 12 || (_GLIBCXX_RELEASE == 11 && __GLIBCXX__ > 
20210428))) \
 || (defined _MSC_VER && _MSC_VER >= 1915)
 #define SAL_STREAM(stream) \
 (::std::ostringstream() << stream).str()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/sal

2021-06-16 Thread Stephan Bergmann (via logerrit)
 include/sal/log.hxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 451c98f24cdfd29c5974f199bebfb68f17b1ef98
Author: Stephan Bergmann 
AuthorDate: Wed May 5 08:20:18 2021 +0200
Commit: Mike Kaganski 
CommitDate: Wed Jun 16 11:56:06 2021 +0200

Adapt to "libstdc++: Implement LWG 1203 for rvalue iostreams"



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 &')
> ? 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'
> ? 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 
(cherry picked from commit 1f36f21d91c429190ae314dadeec409f35f4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117230
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mike Kaganski 

diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index daa83bf70abd..1193f882d98e 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -163,7 +163,8 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER 
StreamIgnore const &) {
 
 @since LibreOffice 3.5
 */
-#if defined _LIBCPP_VERSION || (defined _MSC_VER && _MSC_VER >= 1915)
+#if defined _LIBCPP_VERSION || (defined _GLIBCXX_RELEASE && _GLIBCXX_RELEASE 
>= 12) \
+|| (defined _MSC_VER && _MSC_VER >= 1915)
 #define SAL_STREAM(stream) \
 (::std::ostringstream() << stream).str()
 #else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - svx/source

2021-06-16 Thread Stephan Bergmann (via logerrit)
 svx/source/svdraw/svdetc.cxx |   80 ++-
 1 file changed, 27 insertions(+), 53 deletions(-)

New commits:
commit 94c654295e1d0c91fa97bd91d688c63c29ab965d
Author: Stephan Bergmann 
AuthorDate: Tue Jun 15 17:57:56 2021 +0200
Commit: Mike Kaganski 
CommitDate: Wed Jun 16 11:32:46 2021 +0200

memcpy-param-overlap

At least UITest_impress_tests started to fail at

> ==608818==ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges 
[0x602ef270,0x602ef276) and [0x602ef274, 0x602ef27a) overlap
>  #0 in __asan_memcpy at 
~/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:22:3
>  #1 in RemoveWhichRange(unsigned short const*, unsigned short, unsigned 
short) at svx/source/svdraw/svdetc.cxx:413:17
>  #2 in SdrObjEditView::SetAttributes(SfxItemSet const&, bool) at 
svx/source/svdraw/svdedxv.cxx::19
>  #3 in SdrCreateView::SetAttributes(SfxItemSet const&, bool) at 
svx/source/svdraw/svdcrtv.cxx:883:29
>  #4 in SdrView::SetAttributes(SfxItemSet const&, bool) at 
include/svx/svdview.hxx:193:96
>  #5 in sd::View::SetAttributes(SfxItemSet const&, bool, bool, bool) at 
sd/source/ui/view/sdview.cxx:488:28
>  #6 in sd::DrawView::SetAttributes(SfxItemSet const&, bool, bool, bool) 
at sd/source/ui/view/drawview.cxx:288:27
>  #7 in sd::TextObjectBar::Execute(SfxRequest&) at 
sd/source/ui/view/drtxtob1.cxx:819:21
>  #8 in SfxStubTextObjectBarExecute(SfxShell*, SfxRequest&) at 
workdir/SdiTarget/sd/sdi/sdslots.hxx:17883:1
[...]

(followed by

> ==647521==ERROR: AddressSanitizer: heap-buffer-overflow on address 
0x602000258856 at pc 0x002f7b0a bp 0x7f7f7a69fdb0 sp 0x7f7f7a69f560
> READ of size 6 at 0x602000258856 thread T9 (cppu_threadpool)
>  #0 in __asan_memmove at 
/data/sbergman/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:30:3
>  #1 in RemoveWhichRange(unsigned short const*, unsigned short, unsigned 
short) at svx/source/svdraw/svdetc.cxx:413:17
>  #2 in SdrObjEditView::SetAttributes(SfxItemSet const&, bool) at 
svx/source/svdraw/svdedxv.cxx::19
>  #3 in SdrCreateView::SetAttributes(SfxItemSet const&, bool) at 
svx/source/svdraw/svdcrtv.cxx:883:29
>  #4 in SdrView::SetAttributes(SfxItemSet const&, bool) at 
include/svx/svdview.hxx:193:96
>  #5 in sd::View::SetAttributes(SfxItemSet const&, bool, bool, bool) at 
sd/source/ui/view/sdview.cxx:488:28
>  #6 in sd::DrawView::SetAttributes(SfxItemSet const&, bool, bool, bool) 
at sd/source/ui/view/drawview.cxx:288:27
>  #7 in sd::TextObjectBar::Execute(SfxRequest&) at 
sd/source/ui/view/drtxtob1.cxx:819:21
>  #8 in SfxStubTextObjectBarExecute(SfxShell*, SfxRequest&) at 
workdir/SdiTarget/sd/sdi/sdslots.hxx:17883:1
[...]
> 0x602000258856 is located 0 bytes to the right of 6-byte region 
[0x602000258850,0x602000258856)
> allocated by thread T9 (cppu_threadpool) here:
[...]

if the memcpy were replaced with memmove) after
8aaa28ed43978a9a4a20d62368410a57ec05c23f "Assert on valid order of which 
ids in
ranges on SfxItemSet creation":

Where in the past it had called

  RemoveWhichRange({10951, 10951, 4007, 4007, 0}, 4007, 4062)

and

  RemoveWhichRange({10950, 10950, 4007, 4007, 0}, 4007, 4062)

on wrongly sorted ranges, for which the implementation of RemoveWhichRange
happened to work, it now calls

  RemoveWhichRange({4007, 4007, 10951, 10951, 0}, 4007, 4062)

and

  RemoveWhichRange({4007, 4007, 10950, 10950, 0}, 4007, 4062)

on correctly sorted ranges, which uncovered the broken implementation.

Given that RemoveWhichRange is presumably not hot (e.g., being called just 
two
times during UITest_impress_tests), turn it into a less sophisticated, but 
also
likely less error-prone algorithm.

(Leaving unit tests as a TODO, given that RemoveWhichRange is not
currently exported from Library_svxcore, and the existing 
CppunitTest_svx_unit
links against Library_svxcore rather than using
gb_CppunitTest_use_library_objects.)

Change-Id: I8a1c1d5db8073928ad2f6e88d581f24a0e882925
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117264
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 541f94df85756d3a383b1f9ba49841ca0011b52e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117293
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mike Kaganski 

diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 0d82f6632b35..53303e0b7b0d 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -19,6 +19,8 @@
 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 
@@ -371,63 +373,35 @@ bool SearchOutlinerItems(const SfxItemSet& rSet, bool 
bInklDefaults, bool* pbOnl
 std::unique_

[Libreoffice-commits] core.git: basegfx/source include/basegfx svx/source

2021-06-16 Thread Tomaž Vajngerl (via logerrit)
 basegfx/source/color/bcolortools.cxx|2 -
 include/basegfx/numeric/ftools.hxx  |   33 
 svx/source/svdraw/svdotextdecomposition.cxx |4 +--
 3 files changed, 23 insertions(+), 16 deletions(-)

New commits:
commit e838c1b9e9031de742deeff763c06b1d39f399ef
Author: Tomaž Vajngerl 
AuthorDate: Mon Jun 14 20:11:34 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Wed Jun 16 10:47:27 2021 +0200

basegfx: use namespace for "ftools", make sure input is FP number

Don't use empty class with static methods for ftools, but just
use namespace instead. Also make sure it works with any floating
point numbers (float and double) and don't allow input if it is
anything else than a floating point number

Change-Id: I94b964291b3999d38ae13afe6ddfdbe6d891d410
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117154
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/basegfx/source/color/bcolortools.cxx 
b/basegfx/source/color/bcolortools.cxx
index 727b9c781774..160b48328966 100644
--- a/basegfx/source/color/bcolortools.cxx
+++ b/basegfx/source/color/bcolortools.cxx
@@ -152,7 +152,7 @@ namespace basegfx::utils
 }
 else
 {
-if( fTools::equal(h,360) )
+if( fTools::equal(h, 360.0) )
 h = 0; // 360 degrees is equivalent to 0 degrees
 
 h /= 60.0;
diff --git a/include/basegfx/numeric/ftools.hxx 
b/include/basegfx/numeric/ftools.hxx
index 54a8436f86a5..b72f069cb875 100644
--- a/include/basegfx/numeric/ftools.hxx
+++ b/include/basegfx/numeric/ftools.hxx
@@ -166,60 +166,67 @@ namespace basegfx
  */
 BASEGFX_DLLPUBLIC double normalizeToRange(double v, const double fRange);
 
-class BASEGFX_DLLPUBLIC fTools
+namespace fTools
 {
-public:
 /// Get threshold value for equalZero and friends
-static double getSmallValue() { return 0.1f; }
+inline double getSmallValue() { return 0.1f; }
 
 /// Compare against small value
-static bool equalZero(const double& rfVal)
+template ::value, bool>::type = false>
+inline bool equalZero(const T& rfVal)
 {
 return (fabs(rfVal) <= getSmallValue());
 }
 
 /// Compare against given small value
-static bool equalZero(const double& rfVal, const double& rfSmallValue)
+template ::value, bool>::type = false>
+inline bool equalZero(const T& rfVal, const T& rfSmallValue)
 {
 return (fabs(rfVal) <= rfSmallValue);
 }
 
-static bool equal(const double& rfValA, const double& rfValB)
+template ::value, bool>::type = false>
+inline bool equal(T const& rfValA, T const& rfValB)
 {
 // changed to approxEqual usage for better numerical correctness
 return rtl_math_approxEqual(rfValA, rfValB);
 }
 
-static bool equal(const double& rfValA, const double& rfValB, const 
double& rfSmallValue)
+template ::value, bool>::type = false>
+inline bool equal(const T& rfValA, const T& rfValB, const T& 
rfSmallValue)
 {
 return (fabs(rfValA - rfValB) <= rfSmallValue);
 }
 
-static bool less(const double& rfValA, const double& rfValB)
+template ::value, bool>::type = false>
+inline bool less(const T& rfValA, const T& rfValB)
 {
 return (rfValA < rfValB && !equal(rfValA, rfValB));
 }
 
-static bool lessOrEqual(const double& rfValA, const double& rfValB)
+template ::value, bool>::type = false>
+inline bool lessOrEqual(const T& rfValA, const T& rfValB)
 {
 return (rfValA < rfValB || equal(rfValA, rfValB));
 }
 
-static bool more(const double& rfValA, const double& rfValB)
+template ::value, bool>::type = false>
+inline bool more(const T& rfValA, const T& rfValB)
 {
 return (rfValA > rfValB && !equal(rfValA, rfValB));
 }
 
-static bool moreOrEqual(const double& rfValA, const double& rfValB)
+template ::value, bool>::type = false>
+inline bool moreOrEqual(const T& rfValA, const T& rfValB)
 {
 return (rfValA > rfValB || equal(rfValA, rfValB));
 }
 
-static bool betweenOrEqualEither(const double& rfValA, const double& 
rfValB, const double& rfValC)
+template ::value, bool>::type = false>
+inline bool betweenOrEqualEither(const T& rfValA, const T& rfValB, 
const T& rfValC)
 {
 return (rfValA > rfValB && rfValA < rfValC) || equal(rfValA, 
rfValB) || equal(rfValA, rfValC);
 }
-
 };
 } // end of namespace basegfx
 
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx 
b/svx/source/svdraw/svdotextdecomposition.cxx
index c2d5cd2301c8..c6f3bbdb8193 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/sv

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - configure.ac

2021-06-16 Thread Andras Timar (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2b1e9bd3a4938304ca95bba55d1adea8a295985f
Author: Andras Timar 
AuthorDate: Wed Jun 16 10:46:26 2021 +0200
Commit: Andras Timar 
CommitDate: Wed Jun 16 10:46:26 2021 +0200

Bump version to 6.4-41

Change-Id: Ie9d050aed6fcae9d638d65a080171045a070e446

diff --git a/configure.ac b/configure.ac
index dde099e42ac6..2b09b68ee759 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([Collabora Office],[6.4.10.40],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[6.4.10.41],[],[],[https://collaboraoffice.com/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.0' - sw/qa sw/source

2021-06-16 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/htmlexport/htmlexport.cxx  |   87 
 sw/source/filter/html/htmlnumwriter.cxx |   10 ++-
 2 files changed, 95 insertions(+), 2 deletions(-)

New commits:
commit 9b4bd79a84353b2630717014d346982c968cc46f
Author: Miklos Vajna 
AuthorDate: Tue Jun 15 14:04:57 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jun 16 10:24:52 2021 +0200

sw XHTML / reqif export: handle multiple lists when detecting header-only 
lists

The case when the list was at the end of the text node section (body
text, table cell, etc) was already handled, this handles when the list
is followed by a different list.

(cherry picked from commit fdf1db0010104294c01c7780d9daba5adf38450b)

Change-Id: I131402cb577bd16814f56a5bd6bcad7c99947dbd

diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index 750e97594a7d..1fd48f104ed6 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -1849,6 +1849,93 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testReqifOleBmpTransparent)
 CPPUNIT_ASSERT_EQUAL(COL_WHITE, nActualColor);
 }
 
+CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testListsHeading)
+{
+// Given a document with lh, lh, li, li, lh and lh nodes:
+loadURL("private:factory/swriter", nullptr);
+SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
+SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
+pWrtShell->Insert("list 1, header 1");
+pWrtShell->SplitNode();
+pWrtShell->Insert("list 1, header 2");
+pWrtShell->SplitNode();
+pWrtShell->Insert("list 2, item 1");
+pWrtShell->SplitNode();
+pWrtShell->Insert("list 2, item 2");
+pWrtShell->SplitNode();
+pWrtShell->Insert("list 3, header 1");
+pWrtShell->SplitNode();
+pWrtShell->Insert("list 3, header 2");
+SwDoc* pDoc = pWrtShell->GetDoc();
+pWrtShell->Up(false, 5);
+{
+sal_uInt16 nPos = pDoc->MakeNumRule(pDoc->GetUniqueNumRuleName());
+SwNumRule* pNumRule = pDoc->GetNumRuleTable()[nPos];
+{
+SwNode& rNode = 
pWrtShell->GetCursor()->GetPoint()->nNode.GetNode();
+SwTextNode& rTextNode = *rNode.GetTextNode();
+rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName()));
+rTextNode.SetCountedInList(false);
+}
+pWrtShell->Down(false, 1);
+{
+SwNode& rNode = 
pWrtShell->GetCursor()->GetPoint()->nNode.GetNode();
+SwTextNode& rTextNode = *rNode.GetTextNode();
+rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName()));
+rTextNode.SetCountedInList(false);
+}
+}
+pWrtShell->Down(false, 1);
+{
+sal_uInt16 nPos = pDoc->MakeNumRule(pDoc->GetUniqueNumRuleName());
+SwNumRule* pNumRule = pDoc->GetNumRuleTable()[nPos];
+{
+SwNode& rNode = 
pWrtShell->GetCursor()->GetPoint()->nNode.GetNode();
+SwTextNode& rTextNode = *rNode.GetTextNode();
+rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName()));
+}
+pWrtShell->Down(false, 1);
+{
+SwNode& rNode = 
pWrtShell->GetCursor()->GetPoint()->nNode.GetNode();
+SwTextNode& rTextNode = *rNode.GetTextNode();
+rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName()));
+}
+}
+pWrtShell->Down(false, 1);
+{
+sal_uInt16 nPos = pDoc->MakeNumRule(pDoc->GetUniqueNumRuleName());
+SwNumRule* pNumRule = pDoc->GetNumRuleTable()[nPos];
+{
+SwNode& rNode = 
pWrtShell->GetCursor()->GetPoint()->nNode.GetNode();
+SwTextNode& rTextNode = *rNode.GetTextNode();
+rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName()));
+rTextNode.SetCountedInList(false);
+}
+pWrtShell->Down(false, 1);
+{
+SwNode& rNode = 
pWrtShell->GetCursor()->GetPoint()->nNode.GetNode();
+SwTextNode& rTextNode = *rNode.GetTextNode();
+rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName()));
+rTextNode.SetCountedInList(false);
+}
+}
+
+// When exporting to ReqIF:
+ExportToReqif();
+
+// Then make sure the output is valid xhtml:
+SvMemoryStream aStream;
+HtmlExportTest::wrapFragment(maTempFile, aStream);
+xmlDocUniquePtr pXmlDoc = parseXmlStream(&aStream);
+CPPUNIT_ASSERT(pDoc);
+
+// Without the accompanying fix in place, this test would have failed with:
+// - In <>, XPath '/reqif-xhtml:html/reqif-xhtml:div/reqif-xhtml:p' not 
found
+// Because the headers of list 1 were inside , not directly under 
.
+assertXPathContent(pXmlDoc, 
"/reqif-xhtml:html/reqif-xhtml:div/reqif-xhtml:p",
+   "list 1, header 1");
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlnumwriter.cxx 
b/sw/source/filter/html/htmlnum

[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.0-10.0' - sw/qa sw/source

2021-06-16 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/htmlexport/data/transparent.png |binary
 sw/qa/extras/htmlexport/htmlexport.cxx   |   48 ++-
 sw/source/filter/html/htmlreqifreader.cxx|8 +++-
 3 files changed, 54 insertions(+), 2 deletions(-)

New commits:
commit 296e438f7ac3ea221c0e94e0726c30285c3f2509
Author: Miklos Vajna 
AuthorDate: Mon Jun 14 12:09:01 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jun 16 10:19:28 2021 +0200

sw XHTML/reqif export, OLE data for transparent images: avoid black 
background

Once a semi-transparent images is exported to reqif in OLE mode, the
native data is 24bit BMP. This needs some solid color as a background
for the transparent pixels. The OLE presentation data had white, the OLE
native data had black, so this was inconsistent.

Fix the problem by going with white for the native data as well.

(cherry picked from commit 547386eef9b1723812dfdab5aed33e9025a372c6)

Change-Id: I1b5e9ed37369b541425cfcd7f690e1b0bba97ddc

diff --git a/sw/qa/extras/htmlexport/data/transparent.png 
b/sw/qa/extras/htmlexport/data/transparent.png
new file mode 100644
index ..936980b0a19b
Binary files /dev/null and b/sw/qa/extras/htmlexport/data/transparent.png differ
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index 50e001c72890..fd9e4ee06583 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace
 {
@@ -129,6 +130,7 @@ bool TestReqIfRtfReader::WriteObjectData(SvStream& rOLE)
 struct OLE1Reader
 {
 sal_uInt32 m_nNativeDataSize;
+std::vector m_aNativeData;
 sal_uInt32 m_nPresentationDataSize;
 
 OLE1Reader(SvStream& rStream);
@@ -150,7 +152,8 @@ OLE1Reader::OLE1Reader(SvStream& rStream)
 rStream.SeekRel(nData);
 
 rStream.ReadUInt32(m_nNativeDataSize);
-rStream.SeekRel(m_nNativeDataSize);
+m_aNativeData.resize(m_nNativeDataSize);
+rStream.ReadBytes(m_aNativeData.data(), m_aNativeData.size());
 
 rStream.ReadUInt32(nData); // OLEVersion for presentation data
 CPPUNIT_ASSERT(rStream.good());
@@ -1494,6 +1497,49 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testReqifImageToOle)
 CPPUNIT_ASSERT(aOle1Reader.m_nPresentationDataSize);
 }
 
+CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifOleBmpTransparent)
+{
+// Given a document with a transparent image:
+loadURL("private:factory/swriter", nullptr);
+OUString aImageURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"transparent.png";
+uno::Sequence aArgs = {
+comphelper::makePropertyValue("FileName", aImageURL),
+};
+dispatchCommand(mxComponent, ".uno:InsertGraphic", aArgs);
+
+// When exporting to reqif with ExportImagesAsOLE=true:
+uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
+uno::Sequence aStoreProperties = {
+comphelper::makePropertyValue("FilterName", OUString("HTML 
(StarWriter)")),
+comphelper::makePropertyValue("FilterOptions", 
OUString("xhtmlns=reqif-xhtml")),
+comphelper::makePropertyValue("ExportImagesAsOLE", true),
+};
+xStorable->storeToURL(maTempFile.GetURL(), aStoreProperties);
+
+// Then make sure the transparent pixel turns into white:
+OUString aRtfUrl = GetOlePath();
+SvMemoryStream aRtf;
+HtmlExportTest::wrapRtfFragment(aRtfUrl, aRtf);
+tools::SvRef xReader(new TestReqIfRtfReader(aRtf));
+CPPUNIT_ASSERT(xReader->CallParser() != SvParserState::Error);
+SvMemoryStream aOle1;
+CPPUNIT_ASSERT(xReader->WriteObjectData(aOle1));
+OLE1Reader aOle1Reader(aOle1);
+SvMemoryStream aBitmapStream(aOle1Reader.m_aNativeData.data(), 
aOle1Reader.m_aNativeData.size(),
+ StreamMode::READ);
+Bitmap aBitmap;
+ReadDIB(aBitmap, aBitmapStream, /*bFileHeader=*/true);
+Size aBitmapSize = aBitmap.GetSizePixel();
+BitmapEx aBitmapEx(aBitmap);
+Color nActualColor
+= aBitmapEx.GetPixelColor(aBitmapSize.getWidth() - 1, 
aBitmapSize.getHeight() - 1);
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: Color: R:255 G:255 B:255 A:0
+// - Actual  : Color: R:0 G:0 B:0 A:0
+// i.e. the bitmap without an alpha channel was black, not white.
+CPPUNIT_ASSERT_EQUAL(COL_WHITE, nActualColor);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlreqifreader.cxx 
b/sw/source/filter/html/htmlreqifreader.cxx
index 8a6101fa93ee..a091183b9f69 100644
--- a/sw/source/filter/html/htmlreqifreader.cxx
+++ b/sw/source/filter/html/htmlreqifreader.cxx
@@ -545,7 +545,13 @@ bool WrapGraphicInRtf(const Graphic& rGraphic, const 
SwFrameFormat& rFormat, SvS
 
 // NativeDataSize
 SvMemoryStream aNativeData;
-if (GraphicConverter::Export(aNativeData, rGraphic, 
ConvertDataFormat::BMP

[Libreoffice-commits] core.git: vcl/source

2021-06-16 Thread Gabriel Masei (via logerrit)
 vcl/source/window/dialog.cxx  |   25 ++---
 vcl/source/window/mouse.cxx   |3 ++-
 vcl/source/window/paint.cxx   |   17 +++--
 vcl/source/window/window2.cxx |5 +
 vcl/source/window/winproc.cxx |   34 ++
 5 files changed, 58 insertions(+), 26 deletions(-)

New commits:
commit bf6dabe0ebad3cc5bc0edc04ae74fba0190b6203
Author: Gabriel Masei 
AuthorDate: Wed Jun 16 09:41:12 2021 +0300
Commit: Michael Meeks 
CommitDate: Wed Jun 16 10:16:50 2021 +0200

vcl: check mpWindowImpl for nullptr

Change-Id: I492c7d5c1846df7507b1f043b80de4e61ff8ca86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117282
Tested-by: Jenkins
Reviewed-by: Michael Meeks 

diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 538ad37b0ede..f9c6e3b1b503 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -418,7 +418,8 @@ vcl::Window* Dialog::GetDefaultParent(WinBits nStyle)
 auto& rExecuteDialogs = pSVData->mpWinData->mpExecuteDialogs;
 auto it = std::find_if(rExecuteDialogs.rbegin(), 
rExecuteDialogs.rend(),
 [&pParent](VclPtr& rDialogPtr) {
-return 
pParent->ImplGetFirstOverlapWindow()->IsWindowOrChild(rDialogPtr, true) &&
+return pParent->ImplGetFirstOverlapWindow() &&
+
pParent->ImplGetFirstOverlapWindow()->IsWindowOrChild(rDialogPtr, true) &&
 rDialogPtr->IsReallyVisible() && rDialogPtr->IsEnabled() &&
 rDialogPtr->IsInputEnabled() && 
!rDialogPtr->IsInModalMode(); });
 if (it != rExecuteDialogs.rend())
@@ -963,12 +964,15 @@ bool Dialog::ImplStartExecute()
 if ( pParent )
 {
 pParent = pParent->ImplGetFirstOverlapWindow();
-SAL_WARN_IF( !pParent->IsReallyVisible(), "vcl",
- "Dialog::StartExecuteModal() - Parent not visible" );
-SAL_WARN_IF( !pParent->IsInputEnabled(), "vcl",
- "Dialog::StartExecuteModal() - Parent input disabled, 
use another parent to ensure modality!" );
-SAL_WARN_IF(  pParent->IsInModalMode(), "vcl",
-  "Dialog::StartExecuteModal() - Parent already 
modally disabled, use another parent to ensure modality!" );
+if (pParent)
+{
+SAL_WARN_IF( !pParent->IsReallyVisible(), "vcl",
+"Dialog::StartExecuteModal() - Parent not visible" 
);
+SAL_WARN_IF( !pParent->IsInputEnabled(), "vcl",
+"Dialog::StartExecuteModal() - Parent input 
disabled, use another parent to ensure modality!" );
+SAL_WARN_IF(  pParent->IsInModalMode(), "vcl",
+"Dialog::StartExecuteModal() - Parent already 
modally disabled, use another parent to ensure modality!" );
+}
 }
 #endif
 
@@ -1284,12 +1288,11 @@ void Dialog::ImplSetModalInputMode( bool bModal )
 
 void Dialog::GrabFocusToFirstControl()
 {
-vcl::Window* pFocusControl;
+vcl::Window* pFocusControl = nullptr;
+vcl::Window* pFirstOverlapWindow = ImplGetFirstOverlapWindow();
 
 // find focus control, even if the dialog has focus
-if ( HasFocus() )
-pFocusControl = nullptr;
-else
+if (!HasFocus() && pFirstOverlapWindow && 
pFirstOverlapWindow->mpWindowImpl)
 {
 // prefer a child window which had focus before
 pFocusControl = 
ImplGetFirstOverlapWindow()->mpWindowImpl->mpLastFocusWindow;
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index b2f978dbe7cf..1c0eaa3ba3cc 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -291,7 +291,8 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags )
 
 // mark this windows as the last FocusWindow
 vcl::Window* pOverlapWindow = ImplGetFirstOverlapWindow();
-pOverlapWindow->mpWindowImpl->mpLastFocusWindow = this;
+if (pOverlapWindow->mpWindowImpl)
+pOverlapWindow->mpWindowImpl->mpLastFocusWindow = this;
 mpWindowImpl->mpFrameData->mpFocusWin = this;
 
 if( !bHasFocus )
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index d595bd78d82d..734e4d8ed63b 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -623,6 +623,9 @@ void Window::ImplCallPaint(const vcl::Region* pRegion, 
ImplPaintFlags nPaintFlag
 
 void Window::ImplCallOverlapPaint()
 {
+if (!mpWindowImpl)
+return;
+
 // emit overlapping windows first
 vcl::Window* pTempWindow = mpWindowImpl->mpFirstOverlap;
 while ( pTempWindow )
@@ -985,7 +988,7 @@ void Window::ImplValidate()
 
 void Window::ImplUpdateAll()
 {
-if ( !mpWindowImpl->mbReallyVisible )
+if ( !mpWindowImpl || !mpWindowImpl->mbReallyVisible )
 return;
 
 bool bFlush = false;
@@ -1264,6 +1267,9 @@ bool Window::HasPaintEvent() const
 
 void 

(Impress) Disable global shortcuts in edit mode

2021-06-16 Thread Bayram Çiçek

Hi all.

I'm trying to solve 
https://bugs.documentfoundation.org/show_bug.cgi?id=98404 
 (UX - While 
objects on a slide are being edited, notably text boxes, the new slide 
sorter Ctrl+Shift shortcut combinations incorrectly receive focus and 
move the slide)


In Impress, Ctrl+Shift+(Home/End/ArrowUp/ArrowDown) shortcuts works fine 
for slide sorting, but when in edit mode(e.g. clicking in a text box to 
write something) Ctrl+Shift+(Home/End/ArrowUp/ArrowDown) shortcuts don't 
select the text in the slide, but move the slide.


I found the code pointers for edit mode in 
/./sd/source/ui/func/futext.//cxx : 1034:/ 
https://opengrok.libreoffice.org/xref/core/sd/source/ui/func/futext.cxx?r=9090dc1f#1034 



   /**
 * Sets the object into the edit mode.
 */
   void FuText::SetInEditMode(const MouseEvent& rMEvt, bool bQuickDrag) {  /* 
... */ }

- While in /FuText:SetInEditMode/: I want to disable the global slide 
sorting shortcuts by:


SfxItemSet& rSet = <...>

rSet.DisableItem( SID_MOVE_PAGE_LAST );

rSet.DisableItem( SID_MOVE_PAGE_DOWN );

rSet.DisableItem( SID_MOVE_PAGE_UP );

rSet.DisableItem( SID_MOVE_PAGE_FIRST );


... to see how it works in edit mode, but I couldn't found how to assign 
to /rSet/ even if I tried many times. Which statement/variables should I 
assign to /rSet/ or are there another way to overcome this shortcut 
issue? I need your suggestions about this issue.


IRC username: bayramcicek

Thanks in advance.


--

Regards,
Bayram Çiçek

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sw/qa sw/source

2021-06-16 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/htmlexport/htmlexport.cxx  |   87 
 sw/source/filter/html/htmlnumwriter.cxx |   10 ++-
 2 files changed, 95 insertions(+), 2 deletions(-)

New commits:
commit 0762645519eafe55810adf9e62643e478fa6887c
Author: Miklos Vajna 
AuthorDate: Tue Jun 15 14:04:57 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jun 16 09:58:53 2021 +0200

sw XHTML / reqif export: handle multiple lists when detecting header-only 
lists

The case when the list was at the end of the text node section (body
text, table cell, etc) was already handled, this handles when the list
is followed by a different list.

Change-Id: I131402cb577bd16814f56a5bd6bcad7c99947dbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117246
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins
(cherry picked from commit fdf1db0010104294c01c7780d9daba5adf38450b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117226

diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index 5d9232c8b286..044a6ad29e72 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -1847,6 +1847,93 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testReqifOleBmpTransparent)
 CPPUNIT_ASSERT_EQUAL(COL_WHITE, nActualColor);
 }
 
+CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testListsHeading)
+{
+// Given a document with lh, lh, li, li, lh and lh nodes:
+loadURL("private:factory/swriter", nullptr);
+SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
+SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
+pWrtShell->Insert("list 1, header 1");
+pWrtShell->SplitNode();
+pWrtShell->Insert("list 1, header 2");
+pWrtShell->SplitNode();
+pWrtShell->Insert("list 2, item 1");
+pWrtShell->SplitNode();
+pWrtShell->Insert("list 2, item 2");
+pWrtShell->SplitNode();
+pWrtShell->Insert("list 3, header 1");
+pWrtShell->SplitNode();
+pWrtShell->Insert("list 3, header 2");
+SwDoc* pDoc = pWrtShell->GetDoc();
+pWrtShell->Up(false, 5);
+{
+sal_uInt16 nPos = pDoc->MakeNumRule(pDoc->GetUniqueNumRuleName());
+SwNumRule* pNumRule = pDoc->GetNumRuleTable()[nPos];
+{
+SwNode& rNode = 
pWrtShell->GetCursor()->GetPoint()->nNode.GetNode();
+SwTextNode& rTextNode = *rNode.GetTextNode();
+rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName()));
+rTextNode.SetCountedInList(false);
+}
+pWrtShell->Down(false, 1);
+{
+SwNode& rNode = 
pWrtShell->GetCursor()->GetPoint()->nNode.GetNode();
+SwTextNode& rTextNode = *rNode.GetTextNode();
+rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName()));
+rTextNode.SetCountedInList(false);
+}
+}
+pWrtShell->Down(false, 1);
+{
+sal_uInt16 nPos = pDoc->MakeNumRule(pDoc->GetUniqueNumRuleName());
+SwNumRule* pNumRule = pDoc->GetNumRuleTable()[nPos];
+{
+SwNode& rNode = 
pWrtShell->GetCursor()->GetPoint()->nNode.GetNode();
+SwTextNode& rTextNode = *rNode.GetTextNode();
+rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName()));
+}
+pWrtShell->Down(false, 1);
+{
+SwNode& rNode = 
pWrtShell->GetCursor()->GetPoint()->nNode.GetNode();
+SwTextNode& rTextNode = *rNode.GetTextNode();
+rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName()));
+}
+}
+pWrtShell->Down(false, 1);
+{
+sal_uInt16 nPos = pDoc->MakeNumRule(pDoc->GetUniqueNumRuleName());
+SwNumRule* pNumRule = pDoc->GetNumRuleTable()[nPos];
+{
+SwNode& rNode = 
pWrtShell->GetCursor()->GetPoint()->nNode.GetNode();
+SwTextNode& rTextNode = *rNode.GetTextNode();
+rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName()));
+rTextNode.SetCountedInList(false);
+}
+pWrtShell->Down(false, 1);
+{
+SwNode& rNode = 
pWrtShell->GetCursor()->GetPoint()->nNode.GetNode();
+SwTextNode& rTextNode = *rNode.GetTextNode();
+rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName()));
+rTextNode.SetCountedInList(false);
+}
+}
+
+// When exporting to ReqIF:
+ExportToReqif();
+
+// Then make sure the output is valid xhtml:
+SvMemoryStream aStream;
+HtmlExportTest::wrapFragment(maTempFile, aStream);
+xmlDocUniquePtr pXmlDoc = parseXmlStream(&aStream);
+CPPUNIT_ASSERT(pDoc);
+
+// Without the accompanying fix in place, this test would have failed with:
+// - In <>, XPath '/reqif-xhtml:html/reqif-xhtml:div/reqif-xhtml:p' not 
found
+// Because the headers of list 1 were inside , not directly under 
.
+assertXPathContent(pXmlDoc, 
"/reqif-xhtml:html/reqif-xhtml:div/reqif-xhtml:p",
+   "list 1, header 1"

[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sc/uiconfig

2021-06-16 Thread Caolán McNamara (via logerrit)
 sc/uiconfig/scalc/ui/tpviewpage.ui |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 792f7ebf112ebcf66921795f33921d5c46fae960
Author: Caolán McNamara 
AuthorDate: Tue Jun 15 17:09:11 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 16 09:56:44 2021 +0200

tidy up .ui

Change-Id: I7400a4994c57e4652daca6215385bfd8e4d46369
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117224
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sc/uiconfig/scalc/ui/tpviewpage.ui 
b/sc/uiconfig/scalc/ui/tpviewpage.ui
index 0085a13d2ff6..f70d51a1a7c4 100644
--- a/sc/uiconfig/scalc/ui/tpviewpage.ui
+++ b/sc/uiconfig/scalc/ui/tpviewpage.ui
@@ -378,7 +378,6 @@
 True
 False
 True
-0
 True
 
   
@@ -399,7 +398,6 @@
 True
 False
 True
-0
 True
 
   
@@ -467,6 +465,7 @@
 False
 0
 True
+
 
   
 
@@ -505,6 +504,7 @@
 Show the cursor as defined in the 
icon theme, typically as fat cross.
 True
 True
+rbSystemCursor
   
   
 1
@@ -521,7 +521,6 @@
 True
 True
 True
-rbThemedCursor
   
   
 2
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/unx

2021-06-16 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk4/convert3to4.cxx |   20 +++-
 1 file changed, 15 insertions(+), 5 deletions(-)

New commits:
commit 01e4acd1dc3bfedb9c37b4b9bb93be1201b475a5
Author: Caolán McNamara 
AuthorDate: Tue Jun 15 20:58:50 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 16 09:54:32 2021 +0200

gtk4: use xalign to position replacement box

insert, section the "pick button" in color subtab of background as an
example of a horizontally centered case

and

format, watermark, color dropdown "custom color" as a left aligned
example.

Change-Id: Id318b5acec44ceccaed5875e4f747968225bdd78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117278
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/unx/gtk4/convert3to4.cxx b/vcl/unx/gtk4/convert3to4.cxx
index 2ef37b99c72b..ce9af84251d5 100644
--- a/vcl/unx/gtk4/convert3to4.cxx
+++ b/vcl/unx/gtk4/convert3to4.cxx
@@ -312,12 +312,14 @@ struct ConvertResult
 bool m_bAlwaysShowImage;
 bool m_bUseUnderline;
 bool m_bVertOrientation;
+bool m_bXAlign;
 GtkPositionType m_eImagePos;
 css::uno::Reference m_xPropertyLabel;
 css::uno::Reference m_xPropertyIconName;
 
 ConvertResult(bool bChildCanFocus, bool bHasVisible, bool bHasIconSize, 
bool bAlwaysShowImage,
-  bool bUseUnderline, bool bVertOrientation, GtkPositionType 
eImagePos,
+  bool bUseUnderline, bool bVertOrientation, bool bXAlign,
+  GtkPositionType eImagePos,
   const css::uno::Reference& 
rPropertyLabel,
   const css::uno::Reference& 
rPropertyIconName)
 : m_bChildCanFocus(bChildCanFocus)
@@ -326,6 +328,7 @@ struct ConvertResult
 , m_bAlwaysShowImage(bAlwaysShowImage)
 , m_bUseUnderline(bUseUnderline)
 , m_bVertOrientation(bVertOrientation)
+, m_bXAlign(bXAlign)
 , m_eImagePos(eImagePos)
 , m_xPropertyLabel(rPropertyLabel)
 , m_xPropertyIconName(rPropertyIconName)
@@ -343,8 +346,10 @@ ConvertResult Convert3To4(const 
css::uno::Reference& xNode
 {
 css::uno::Reference xNodeList = 
xNode->getChildNodes();
 if (!xNodeList.is())
-return ConvertResult(false, false, false, false, false, false, 
GTK_POS_LEFT, nullptr,
+{
+return ConvertResult(false, false, false, false, false, false, false, 
GTK_POS_LEFT, nullptr,
  nullptr);
+}
 
 std::vector> xRemoveList;
 
@@ -356,6 +361,7 @@ ConvertResult Convert3To4(const 
css::uno::Reference& xNode
 GtkPositionType eImagePos = GTK_POS_LEFT;
 bool bUseUnderline = false;
 bool bVertOrientation = false;
+bool bXAlign = false;
 css::uno::Reference xPropertyLabel;
 css::uno::Reference xPropertyIconName;
 css::uno::Reference xCantFocus;
@@ -598,6 +604,7 @@ ConvertResult Convert3To4(const 
css::uno::Reference& xNode
 {
 // TODO expand into a GtkLabel child with alignment on 
that instead
 assert(xChild->getFirstChild()->getNodeValue() == "0");
+bXAlign = true;
 xRemoveList.push_back(xChild);
 }
 }
@@ -930,6 +937,7 @@ ConvertResult Convert3To4(const 
css::uno::Reference& xNode
 GtkPositionType eChildImagePos = GTK_POS_LEFT;
 bool bChildUseUnderline = false;
 bool bChildVertOrientation = false;
+bool bChildXAlign = false;
 css::uno::Reference xChildPropertyLabel;
 css::uno::Reference xChildPropertyIconName;
 if (xChild->hasChildNodes() && xChild != xGeneratedImageChild)
@@ -949,6 +957,7 @@ ConvertResult Convert3To4(const 
css::uno::Reference& xNode
 eChildImagePos = aChildRes.m_eImagePos;
 bChildUseUnderline = aChildRes.m_bUseUnderline;
 bChildVertOrientation = aChildRes.m_bVertOrientation;
+bChildXAlign = aChildRes.m_bXAlign;
 xChildPropertyLabel = aChildRes.m_xPropertyLabel;
 xChildPropertyIconName = aChildRes.m_xPropertyIconName;
 }
@@ -1274,8 +1283,9 @@ ConvertResult Convert3To4(const 
css::uno::Reference& xNode
 xNewObjectNode->appendChild(xOrientation);
 }
 
-auto xSpacing = CreateProperty(xDoc, "spacing", "6");
-xNewObjectNode->appendChild(xSpacing);
+xNewObjectNode->appendChild(CreateProperty(xDoc, "spacing", 
"6"));
+if (!bChildXAlign)
+xNewObjectNode->appendChild(CreateProperty(xDoc, "halign", 
"center"));
 
 xNewChildNode->appendChild(xNewObjectNode);
 
@@ -1341,7 +1351,7 @@ ConvertResult Convert3To4(const 
css::uno::Reference& xNode
 }
 
 return ConvertResult(bChildCanFocus, bHasVisible, bHasIconSize, 
bAlwaysShowImage, bUseUnderline,
- bVertOrientation, eImagePos, xPropertyLabe

[Libreoffice-commits] core.git: 3 commits - cui/uiconfig vcl/unx

2021-06-16 Thread Caolán McNamara (via logerrit)
 cui/uiconfig/ui/areatabpage.ui |   47 +++--
 vcl/unx/gtk3/gtkinst.cxx   |9 +++
 vcl/unx/gtk4/convert3to4.cxx   |   51 ++---
 3 files changed, 66 insertions(+), 41 deletions(-)

New commits:
commit ecdb4b2ca8a55b8b2d077cabd930964a41624736
Author: Caolán McNamara 
AuthorDate: Tue Jun 15 16:58:32 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 16 09:53:52 2021 +0200

gtk4: use image-position to position elements within replacement box

enable insert, section with pick button in color subtab of background
tabpage as example usage

Change-Id: Ie972e2de9181888b59159a7a12651e6f7f7dec26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117275
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 2f04556c88f1..b8ece3292b5d 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -22242,8 +22242,11 @@ weld::Builder* 
GtkInstance::CreateBuilder(weld::Widget* pParent, const OUString&
 rUIFile != "cui/ui/acorreplacepage.ui" &&
 rUIFile != "cui/ui/applyautofmtpage.ui" &&
 rUIFile != "cui/ui/applylocalizedpage.ui" &&
+rUIFile != "cui/ui/areatabpage.ui" &&
 rUIFile != "cui/ui/autocorrectdialog.ui" &&
+rUIFile != "cui/ui/bitmaptabpage.ui" &&
 rUIFile != "cui/ui/breaknumberoption.ui" &&
+rUIFile != "cui/ui/colorpage.ui" &&
 rUIFile != "cui/ui/colorpickerdialog.ui" &&
 rUIFile != "cui/ui/editdictionarydialog.ui" &&
 rUIFile != "cui/ui/eventassigndialog.ui" &&
@@ -22264,6 +22267,7 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* 
pParent, const OUString&
 rUIFile != "cui/ui/macroassigndialog.ui" &&
 rUIFile != "cui/ui/macroassignpage.ui" &&
 rUIFile != "cui/ui/macroselectordialog.ui" &&
+rUIFile != "cui/ui/namedialog.ui" &&
 rUIFile != "cui/ui/objectnamedialog.ui" &&
 rUIFile != "cui/ui/objecttitledescdialog.ui" &&
 rUIFile != "cui/ui/optjsearchpage.ui" &&
@@ -22336,6 +22340,7 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* 
pParent, const OUString&
 rUIFile != "modules/BasicIDE/ui/newlibdialog.ui" &&
 rUIFile != "modules/BasicIDE/ui/organizedialog.ui" &&
 rUIFile != "modules/scalc/ui/advancedfilterdialog.ui" &&
+rUIFile != "modules/scalc/ui/checkwarningdialog.ui" &&
 rUIFile != "modules/scalc/ui/colwidthdialog.ui" &&
 rUIFile != "modules/scalc/ui/consolidatedialog.ui" &&
 rUIFile != "modules/scalc/ui/dataform.ui" &&
@@ -22401,11 +22406,14 @@ weld::Builder* 
GtkInstance::CreateBuilder(weld::Widget* pParent, const OUString&
 rUIFile != "modules/swriter/ui/exchangedatabases.ui" &&
 rUIFile != "modules/swriter/ui/footendnotedialog.ui" &&
 rUIFile != "modules/swriter/ui/footnotepage.ui" &&
+rUIFile != "modules/swriter/ui/footnotesendnotestabpage.ui" &&
 rUIFile != "modules/swriter/ui/gotopagedialog.ui" &&
+rUIFile != "modules/swriter/ui/indentpage.ui" &&
 rUIFile != "modules/swriter/ui/indexentry.ui" &&
 rUIFile != "modules/swriter/ui/insertbookmark.ui" &&
 rUIFile != "modules/swriter/ui/insertbreak.ui" &&
 rUIFile != "modules/swriter/ui/insertfootnote.ui" &&
+rUIFile != "modules/swriter/ui/insertsectiondialog.ui" &&
 rUIFile != "modules/swriter/ui/inserttable.ui" &&
 rUIFile != "modules/swriter/ui/linenumbering.ui" &&
 rUIFile != "modules/swriter/ui/newuserindexdialog.ui" &&
@@ -22417,6 +22425,7 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* 
pParent, const OUString&
 rUIFile != "modules/swriter/ui/printoptionspage.ui" &&
 rUIFile != "modules/swriter/ui/renameautotextdialog.ui" &&
 rUIFile != "modules/swriter/ui/renameobjectdialog.ui" &&
+rUIFile != "modules/swriter/ui/sectionpage.ui" &&
 rUIFile != "modules/swriter/ui/statisticsinfopage.ui" &&
 rUIFile != "modules/swriter/ui/titlepage.ui" &&
 rUIFile != "modules/swriter/ui/watermarkdialog.ui" &&
diff --git a/vcl/unx/gtk4/convert3to4.cxx b/vcl/unx/gtk4/convert3to4.cxx
index 24b67f01e576..2ef37b99c72b 100644
--- a/vcl/unx/gtk4/convert3to4.cxx
+++ b/vcl/unx/gtk4/convert3to4.cxx
@@ -310,23 +310,23 @@ struct ConvertResult
 bool m_bHasVisible;
 bool m_bHasIconSize;
 bool m_bAlwaysShowImage;
-bool m_bImageAtTop;
 bool m_bUseUnderline;
 bool m_bVertOrientation;
+GtkPositionType m_eImagePos;
 css::uno::Reference m_xPropertyLabel;
 css::uno::Reference m_xPropertyIconName;
 
 ConvertResult(bool bChildCanFocus, bool bHasVisible, bool bHasIconSize, 
bool bAlwaysShowImage,
-  bool bImageAtTop, bool bUseUnderline, bool bVertOrientation,
+  bool bUseUnderline, bool bVertOrientation, GtkPositionType 
eImagePos,
 

[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - solenv/flatpak-manifest.in

2021-06-16 Thread Stephan Bergmann (via logerrit)
 solenv/flatpak-manifest.in |  261 ++---
 1 file changed, 174 insertions(+), 87 deletions(-)

New commits:
commit 43ae5ef76252e6504103b88b1d969e836a9d4681
Author: Stephan Bergmann 
AuthorDate: Tue Jun 15 16:15:20 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 16 09:47:20 2021 +0200

Adapt to flatpak-builder 1.0.14 split "dest" + "dest-filename"

see  "flatpak-builder
1.0.14 breaks build of org.libreoffice.LibreOffice, empty
/run/build/libreoffice"

Change-Id: I7f7d3f655ccf5078cc8827e4088b331477ed8086
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117262
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 2435a238ee4e58f6360541756f50173767803084)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117227

diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 4a89e63a05cb..0cce3253b3a8 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -78,523 +78,610 @@
 "url": 
"https://dev-www.libreoffice.org/src/pdfium-4500.tar.bz2";,
 "sha256": 
"26a03dd60e5ed0979cdaba9cc848242895110ddfdf347d40989ce2f14020f304",
 "type": "file",
-"dest-filename": "external/tarballs/pdfium-4500.tar.bz2"
+"dest": "external/tarballs",
+"dest-filename": "pdfium-4500.tar.bz2"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz";,
 "sha256": 
"983941d31ee8d366085cadf28db75eb1f5cb03ba1e5853b98f12f7f51c63b776",
 "type": "file",
-"dest-filename": 
"external/tarballs/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz"
+"dest": "external/tarballs",
+"dest-filename": 
"0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/xmlsec1-1.2.32.tar.gz";,
 "sha256": 
"e383702853236004e5b08e424b8afe9b53fe9f31aaa7a5382f39d9533eb7c043",
 "type": "file",
-"dest-filename": "external/tarballs/xmlsec1-1.2.32.tar.gz"
+"dest": "external/tarballs",
+"dest-filename": "xmlsec1-1.2.32.tar.gz"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/368f114c078f94214a308a74c7e991bc-crosextrafonts-20130214.tar.gz";,
 "sha256": 
"c48d1c2fd613c9c06c959c34da7b8388059e2408d2bb19845dc3ed35f76e4d09",
 "type": "file",
-"dest-filename": 
"external/tarballs/368f114c078f94214a308a74c7e991bc-crosextrafonts-20130214.tar.gz"
+"dest": "external/tarballs",
+"dest-filename": 
"368f114c078f94214a308a74c7e991bc-crosextrafonts-20130214.tar.gz"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/c74b7223abe75949b4af367942d96c7a-crosextrafonts-carlito-20130920.tar.gz";,
 "sha256": 
"4bd12b6cbc321c1cf16da76e2c585c925ce956a08067ae6f6c64eff6ccfdaf5a",
 "type": "file",
-"dest-filename": 
"external/tarballs/c74b7223abe75949b4af367942d96c7a-crosextrafonts-carlito-20130920.tar.gz"
+"dest": "external/tarballs",
+"dest-filename": 
"c74b7223abe75949b4af367942d96c7a-crosextrafonts-carlito-20130920.tar.gz"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/33e1e61fab06a547851ed308b4ffef42-dejavu-fonts-ttf-2.37.zip";,
 "sha256": 
"7576310b219e04159d35ff61dd4a4ec4cdba4f35c00e002a136f00e96a908b0a",
 "type": "file",
-"dest-filename": 
"external/tarballs/33e1e61fab06a547851ed308b4ffef42-dejavu-fonts-ttf-2.37.zip"
+"dest": "external/tarballs",
+"dest-filename": 
"33e1e61fab06a547851ed308b4ffef42-dejavu-fonts-ttf-2.37.zip"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/1725634df4bb3dcb1b2c91a6175f8789-GentiumBasic_1102.zip";,
 "sha256": 
"2f1a2c5491d7305dffd3520c6375d2f3e14931ee35c6d8ae1e8f098bf1a7b3cc",
 "type": "file",
-"dest-filename": 
"external/tarballs/1725634df4bb3dcb1b2c91a6175f8789-GentiumBasic_1102.zip"
+"dest": "external/tarballs",
+"dest-filename": 
"1725634df4bb3dcb1b2c91a6175f8789-GentiumBasic_1102.zip"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/liberation-narrow-fonts-ttf-1.07.6.tar.

[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - oox/source sw/qa

2021-06-16 Thread Regina Henschel (via logerrit)
 oox/source/export/drawingml.cxx|4 +++-
 sw/qa/extras/ooxmlexport/data/tdf142361ShadowDirection.odt |binary
 sw/qa/extras/ooxmlexport/ooxmlexport16.cxx |   13 +
 3 files changed, 16 insertions(+), 1 deletion(-)

New commits:
commit 1c0c11defaf6a83870725902825b1931f8ef50e5
Author: Regina Henschel 
AuthorDate: Tue Jun 15 01:47:44 2021 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jun 16 09:29:30 2021 +0200

tdf#142361 export: prevent shadow to rotate with shape

OOXML has the feature to rotate a shadow together with the shape. The
associated attribute rotWithShape has the default value 'true'. So
if this attribute is missing, MS Office shows the shadow rotated. As
LibreOffice never rotates a shadow, we need to write this attribute
always. Because LibreOffice cannot rotate shadows, the error is only
visible in MS Office.

Here the attribute is added for the case of documents, which have no
InteropGrabBag or no effects in it.

When a shadow is generated in MS Office, MSO adds the attribute with
value 'false' (0) to the file. MS Office has no UI to set this
attribute. Problem is with cases, where the document comes from
MS Office, has effects in InteropGrabBag, but the shadow was set in
LibreOffice. To add the attribute in such cases too, bug tdf#142858
has to be fixed.

Change-Id: I5f1df416bca8ea15a305242afb140d852cfd84c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117206
Tested-by: Jenkins
Reviewed-by: Regina Henschel 
(cherry picked from commit 58eeec036c3780188feccb0e1a752cfdee90a49b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117225
Reviewed-by: Xisco Fauli 

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 385af08d590b..5f42dc18cd75 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -4241,7 +4241,7 @@ void DrawingML::WriteShapeEffects( const Reference< 
XPropertySet >& rXPropSet )
 if( bHasShadow )
 {
 Sequence< PropertyValue > aShadowGrabBag( 3 );
-Sequence< PropertyValue > aShadowAttribsGrabBag( 3 );
+Sequence< PropertyValue > aShadowAttribsGrabBag( 4 );
 
 double dX = +0.0, dY = +0.0;
 sal_Int32 nBlur =0;
@@ -4255,6 +4255,8 @@ void DrawingML::WriteShapeEffects( const Reference< 
XPropertySet >& rXPropSet )
 aShadowAttribsGrabBag[1].Value <<= lcl_CalculateDir(dX, dY);
 aShadowAttribsGrabBag[2].Name = "blurRad";
 aShadowAttribsGrabBag[2].Value <<=  
oox::drawingml::convertHmmToEmu(nBlur);
+aShadowAttribsGrabBag[3].Name = "rotWithShape";
+aShadowAttribsGrabBag[3].Value <<= false; //ooxml default is 
'true', so must write it
 
 aShadowGrabBag[0].Name = "Attribs";
 aShadowGrabBag[0].Value <<= aShadowAttribsGrabBag;
diff --git a/sw/qa/extras/ooxmlexport/data/tdf142361ShadowDirection.odt 
b/sw/qa/extras/ooxmlexport/data/tdf142361ShadowDirection.odt
new file mode 100644
index ..78372e603542
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf142361ShadowDirection.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index a2217f3ab845..5899bd703ccc 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -492,6 +492,19 @@ DECLARE_OOXMLEXPORT_TEST(testCommentDoneModel, 
"CommentDone.docx")
 }
 }
 
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(Test_ShadowDirection, 
"tdf142361ShadowDirection.odt")
+{
+// The attribute 'rotWithShape' has the default value 'true' in OOXML, so 
Words interprets a
+// missing attribute as 'true'. That means that Word rotates the shadow if 
the shape is
+// rotated. Because in LibreOffice a shadow is never rotated, we must not 
omit this
+// attribute.
+xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+assertXPath(pXmlDoc,
+
"/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing/"
+
"wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:effectLst/a:outerShdw",
+"rotWithShape", "0");
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sw/UIConfig_swriter.mk

2021-06-16 Thread Julien Nabet (via logerrit)
 sw/UIConfig_swriter.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 9656cc894673af9db77a29376a94d3029370d127
Author: Julien Nabet 
AuthorDate: Tue Jun 15 20:42:19 2021 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jun 16 09:28:56 2021 +0200

tdf#142860: fix crash: press Page Columns Button on Tab UI

See bt here:
https://bugs.documentfoundation.org/attachment.cgi?id=172924

Change-Id: I477ad78e943934d83cf48620f5ed2573558901e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117268
Tested-by: Jenkins
Reviewed-by: Julien Nabet 
(cherry picked from commit b89ebf135818ccaa45bbfb164099a6e199bd7d11)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117228
Reviewed-by: Xisco Fauli 

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index b0b94c9979ff..ce3058308d6e 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -236,6 +236,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/notebookbar_groupedbar_full \
sw/uiconfig/swriter/ui/notebookbar_groupedbar_compact \
sw/uiconfig/swriter/ui/notebookbar_online \
+   sw/uiconfig/swriter/ui/pagecolumncontrol \
sw/uiconfig/swriter/ui/pagemargincontrol \
sw/uiconfig/swriter/ui/pageorientationcontrol \
sw/uiconfig/swriter/ui/pagesizecontrol \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/qa

2021-06-16 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/htmlimport/htmlimport.cxx |   71 ++---
 1 file changed, 40 insertions(+), 31 deletions(-)

New commits:
commit 7ed6fc47dc029fcf077d3d389f806e41f5c7427e
Author: Miklos Vajna 
AuthorDate: Tue Jun 15 21:04:18 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jun 16 09:09:25 2021 +0200

sw: rework to avoid DECLARE_SW_IMPORT_TEST() in CppunitTest_sw_htmlimport

See commit a226cec52e536c46e03f57a5f1f7931abbeb0cdd
(CppunitTest_sw_rtfimport: convert one testcase to use
CPPUNIT_TEST_FIXTURE(), 2019-11-05) for motivation.

Change-Id: I0f4d978f6ebb713d472d5d5741369b031e67e0f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117269
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx 
b/sw/qa/extras/htmlimport/htmlimport.cxx
index 67759f8db511..066d41b921aa 100644
--- a/sw/qa/extras/htmlimport/htmlimport.cxx
+++ b/sw/qa/extras/htmlimport/htmlimport.cxx
@@ -36,24 +36,11 @@ class HtmlImportTest : public SwModelTestBase
 {
 public:
 HtmlImportTest() : SwModelTestBase("sw/qa/extras/htmlimport/data/", 
"HTML (StarWriter)") {}
-private:
-std::unique_ptr preTest(const char* /*filename*/) override
-{
-if (getTestName().indexOf("ReqIf") != -1)
-{
-setImportFilterOptions("xhtmlns=reqif-xhtml");
-// Bypass type detection, this is an XHTML fragment only.
-setImportFilterName("HTML (StarWriter)");
-}
-
-return nullptr;
-}
 };
 
-#define DECLARE_HTMLIMPORT_TEST(TestName, filename) 
DECLARE_SW_IMPORT_TEST(TestName, filename, nullptr, HtmlImportTest)
-
-DECLARE_HTMLIMPORT_TEST(testPictureImport, "picture.html")
+CPPUNIT_TEST_FIXTURE(HtmlImportTest, testPictureImport)
 {
+load(mpTestDocumentPath, "picture.html");
 SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get());
 CPPUNIT_ASSERT(pTextDoc);
 // The document contains two pictures stored as a link.
@@ -68,8 +55,9 @@ DECLARE_HTMLIMPORT_TEST(testPictureImport, "picture.html")
 CPPUNIT_ASSERT_EQUAL(size_t(0), rLinkManager.GetLinks().size());
 }
 
-DECLARE_HTMLIMPORT_TEST(testInlinedImage, "inlined_image.html")
+CPPUNIT_TEST_FIXTURE(HtmlImportTest, testInlinedImage)
 {
+load(mpTestDocumentPath, "inlined_image.html");
 SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get());
 CPPUNIT_ASSERT(pTextDoc);
 // The document contains only one embedded picture inlined in img's src 
attribute.
@@ -105,8 +93,9 @@ DECLARE_HTMLIMPORT_TEST(testInlinedImage, 
"inlined_image.html")
 }
 }
 
-DECLARE_HTMLIMPORT_TEST(testInlinedImagesPageAndParagraph, 
"PageAndParagraphFilled.html")
+CPPUNIT_TEST_FIXTURE(HtmlImportTest, testInlinedImagesPageAndParagraph)
 {
+load(mpTestDocumentPath, "PageAndParagraphFilled.html");
 SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get());
 CPPUNIT_ASSERT(pTextDoc);
 
@@ -145,8 +134,9 @@ DECLARE_HTMLIMPORT_TEST(testInlinedImagesPageAndParagraph, 
"PageAndParagraphFill
 }
 }
 
-DECLARE_HTMLIMPORT_TEST(testListStyleType, "list-style.html")
+CPPUNIT_TEST_FIXTURE(HtmlImportTest, testListStyleType)
 {
+load(mpTestDocumentPath, "list-style.html");
 // check unnumbered list style - should be type circle here
 uno::Reference< beans::XPropertySet > xParagraphProperties(getParagraph(4),
uno::UNO_QUERY);
@@ -189,8 +179,9 @@ DECLARE_HTMLIMPORT_TEST(testListStyleType, 
"list-style.html")
 CPPUNIT_FAIL("no NumberingType property found for para 14");
 }
 
-DECLARE_HTMLIMPORT_TEST(testMetaIsoDates, "meta-ISO8601-dates.html")
+CPPUNIT_TEST_FIXTURE(HtmlImportTest, testMetaIsoDates)
 {
+load(mpTestDocumentPath, "meta-ISO8601-dates.html");
 SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get());
 CPPUNIT_ASSERT(pTextDoc);
 SwDocShell* pDocShell(pTextDoc->GetDocShell());
@@ -209,8 +200,9 @@ DECLARE_HTMLIMPORT_TEST(testMetaIsoDates, 
"meta-ISO8601-dates.html")
 CPPUNIT_ASSERT_EQUAL(DateTime(Date(8, 5, 2017), tools::Time(12, 47, 0, 
38600)), aModified);
 }
 
-DECLARE_HTMLIMPORT_TEST(testImageWidthAuto, "image-width-auto.html")
+CPPUNIT_TEST_FIXTURE(HtmlImportTest, testImageWidthAuto)
 {
+load(mpTestDocumentPath, "image-width-auto.html");
 SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get());
 CPPUNIT_ASSERT(pTextDoc);
 SwTextAttr const*const 
pAttr(pTextDoc->GetDocShell()->GetDoc()->GetEditShell()->
@@ -221,16 +213,18 @@ DECLARE_HTMLIMPORT_TEST(testImageWidthAuto, 
"image-width-auto.html")
 CPPUNIT_ASSERT_EQUAL(Size(1835, 560), rSize.GetSize());
 }
 
-DECLARE_HTMLIMPORT_TEST(testImageLazyRead, "image-lazy-read.html")
+CPPUNIT_TEST_FIXTURE(HtmlImportTest, testImageLazyRead)
 {
+load(mpTestDocumentPath, "image-lazy-read.html");
 auto xGraphic = 
getProperty>(getShape(1), "Graphic");
 Graphic aGraphic(xGraphic);