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

2021-07-09 Thread Justin Luth (via logerrit)
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   31 +-
 writerfilter/source/dmapper/NumberingManager.cxx  |5 +++
 2 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit 11211f2ff0a4d894f889874d46c6ba8be4d3dc39
Author: Justin Luth 
AuthorDate: Fri Apr 30 13:42:58 2021 +0200
Commit: Justin Luth 
CommitDate: Sat Jul 10 07:24:54 2021 +0200

tdf#141964 writerfilter CN: why ignore paragraph's listId?

This seems bizarre. nListId was only set when the style
defined it? What about the directly applied rule?
Surely that has more relevance in all the
subsequent code that used the value in nListId,
as borne out in all of the code that re-calculated nlistId2.

Change-Id: I188e812388c706cf0e785fdede29a6d21be12867
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115260
Tested-by: Justin Luth 
Reviewed-by: Justin Luth 

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 40602ee0d40d..c3d6e4efbe6d 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1533,13 +1533,14 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap, con
 const StyleSheetEntryPtr pEntry = 
GetStyleSheetTable()->FindStyleSheetByConvertedStyleName( 
GetCurrentParaStyleName() );
 OSL_ENSURE( pEntry, "no style sheet found" );
 const StyleSheetPropertyMap* pStyleSheetProperties = dynamic_cast(pEntry ? pEntry->pProperties.get() : nullptr);
+sal_Int32 nListId = pParaContext ? pParaContext->GetListId() : -1;
 bool isNumberingViaStyle(false);
-bool isNumberingViaRule = pParaContext && pParaContext->GetListId() > -1;
-sal_Int32 nListId = -1;
+bool isNumberingViaRule = nListId > -1;
 if ( !bRemove && pStyleSheetProperties && pParaContext )
 {
 bool bNumberingFromBaseStyle = false;
-nListId = lcl_getListId(pEntry, GetStyleSheetTable(), 
bNumberingFromBaseStyle);
+if (!isNumberingViaRule)
+nListId = lcl_getListId(pEntry, GetStyleSheetTable(), 
bNumberingFromBaseStyle);
 
 //apply numbering level/style to paragraph if it was set at the style, 
but only if the paragraph itself
 //does not specify the numbering
@@ -1552,10 +1553,10 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap, con
 pParaContext->Insert( PROP_NUMBERING_LEVEL, 
uno::makeAny(nListLevel), false );
 
 auto const pList(GetListTable()->GetList(nListId));
-if (pList && nListId >= 0 && 
!pParaContext->isSet(PROP_NUMBERING_STYLE_NAME))
+if (pList && nListId > 0 && 
!pParaContext->isSet(PROP_NUMBERING_STYLE_NAME))
 {
 // ListLevel 9 means Body Level/no numbering.  numId 0 means no 
numbering.
-if (bNoNumbering || nListLevel == 9 || (!isNumberingViaRule && 
!nListId))
+if (bNoNumbering || nListLevel == 9)
 pParaContext->Insert(PROP_NUMBERING_STYLE_NAME, 
uno::makeAny(OUString()), true);
 else if ( !isNumberingViaRule )
 {
@@ -1570,7 +1571,8 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap, con
 // Apply the style if it uses the same list as the direct 
numbering,
 // otherwise the directly-applied-to-paragraph status will be 
lost,
 // and the priority of the numbering-style-indents will be 
lowered. tdf#133000
-if ( nListId == pParaContext->GetListId() )
+bool bDummy;
+if (nListId == lcl_getListId(pEntry, GetStyleSheetTable(), 
bDummy))
 pParaContext->Insert( PROP_NUMBERING_STYLE_NAME, 
uno::makeAny(pList->GetStyleName()), true );
 }
 }
@@ -1621,10 +1623,8 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap, con
 {
 pParaContext->Insert(PROP_PARA_RIGHT_MARGIN, aRightMargin, 
/*bOverwrite=*/false);
 
-sal_Int32 nListId2(pParaContext->GetListId());
-
-const sal_Int32 nFirstLineIndent = 
getNumberingProperty(nListId2, nListLevel, "FirstLineIndent");
-const sal_Int32 nParaLeftMargin  = 
getNumberingProperty(nListId2, nListLevel, "IndentAt");
+const sal_Int32 nFirstLineIndent = 
getNumberingProperty(nListId, nListLevel, "FirstLineIndent");
+const sal_Int32 nParaLeftMargin  = 
getNumberingProperty(nListId, nListLevel, "IndentAt");
 if (nFirstLineIndent != 0)
 pParaContext->Insert(PROP_PARA_FIRST_LINE_INDENT, 
uno::makeAny(nFirstLineIndent), /*bOverwrite=*/false);
 if (nParaLeftMargin != 0)
@@ -1948,12 +1948,7 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap, con
 (isNumberingViaStyle || isNumberingViaRule

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

2021-07-09 Thread panoskorovesis (via logerrit)
 include/vcl/filter/SvmReader.hxx|1 +
 include/vcl/metaact.hxx |5 +
 vcl/source/filter/svm/SvmReader.cxx |   28 +++-
 3 files changed, 33 insertions(+), 1 deletion(-)

New commits:
commit 4146be28450c77159ae8c7f8d4d7f471756ec14c
Author: panoskorovesis 
AuthorDate: Fri Jul 9 14:17:38 2021 +0300
Commit: Tomaž Vajngerl 
CommitDate: Sat Jul 10 00:41:31 2021 +0200

Add Handler for BmpExScalePart Read

The handler separates MetaBmpExScalePartAction::Read from metaact.hxx
Read implementation is now in SvmReader.hxx

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

diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx
index 853a52a8ae3d..9ce071448dca 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -61,6 +61,7 @@ public:
 rtl::Reference BmpScalePartHandler();
 rtl::Reference BmpExHandler();
 rtl::Reference BmpExScaleHandler();
+rtl::Reference BmpExScalePartHandler();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index b71c59b5144f..c59257433daa 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -909,6 +909,11 @@ public:
 const Size& GetDestSize() const { return maDstSz; }
 const Point&GetSrcPoint() const { return maSrcPt; }
 const Size& GetSrcSize() const { return maSrcSz; }
+voidSetBitmapEx(BitmapEx& rBmpEx) { maBmpEx = rBmpEx; }
+voidSetDestPoint(Point& rDstPt) { maDstPt = rDstPt; }
+voidSetDestSize(Size& rDstSz) { maDstSz = rDstSz; }
+voidSetSrcPoint(Point& rSrcPt) { maSrcPt = rSrcPt; }
+voidSetSrcSize(Size& rSrcSz) { maSrcSz = rSrcSz; }
 boolIsTransparent() const override { return 
GetBitmapEx().IsAlpha(); }
 };
 
diff --git a/vcl/source/filter/svm/SvmReader.cxx 
b/vcl/source/filter/svm/SvmReader.cxx
index 303e280e8680..679a6185c503 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -226,7 +226,7 @@ rtl::Reference 
SvmReader::MetaActionHandler(ImplMetaReadData* pData)
 return BmpExScaleHandler();
 break;
 case MetaActionType::BMPEXSCALEPART:
-pAction = new MetaBmpExScalePartAction;
+return BmpExScalePartHandler();
 break;
 case MetaActionType::MASK:
 pAction = new MetaMaskAction;
@@ -935,4 +935,30 @@ rtl::Reference SvmReader::BmpExScaleHandler()
 
 return pAction;
 }
+
+rtl::Reference SvmReader::BmpExScalePartHandler()
+{
+auto pAction = new MetaBmpExScalePartAction();
+
+VersionCompatRead aCompat(mrStream);
+BitmapEx aBmpEx;
+ReadDIBBitmapEx(aBmpEx, mrStream);
+TypeSerializer aSerializer(mrStream);
+Point aDstPoint;
+aSerializer.readPoint(aDstPoint);
+Size aDstSize;
+aSerializer.readSize(aDstSize);
+Point aSrcPoint;
+aSerializer.readPoint(aSrcPoint);
+Size aSrcSize;
+aSerializer.readSize(aSrcSize);
+
+pAction->SetBitmapEx(aBmpEx);
+pAction->SetDestPoint(aDstPoint);
+pAction->SetDestSize(aDstSize);
+pAction->SetSrcPoint(aSrcPoint);
+pAction->SetSrcSize(aSrcSize);
+
+return pAction;
+}
 /* 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: include/vcl vcl/source

2021-07-09 Thread panoskorovesis (via logerrit)
 include/vcl/filter/SvmReader.hxx|1 +
 include/vcl/metaact.hxx |3 +++
 vcl/source/filter/svm/SvmReader.cxx |   22 +-
 3 files changed, 25 insertions(+), 1 deletion(-)

New commits:
commit fa17410b7cad394254818ca0dfcd92673fb642d0
Author: panoskorovesis 
AuthorDate: Fri Jul 9 14:10:13 2021 +0300
Commit: Tomaž Vajngerl 
CommitDate: Sat Jul 10 00:41:09 2021 +0200

Add Handler for BmpExScale Read

The hanlder separates MetaBmpExScaleAction::Read from metaact.hxx
Read implementation is now in SvmReader.hxx

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

diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx
index fc82e47268bc..853a52a8ae3d 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -60,6 +60,7 @@ public:
 rtl::Reference BmpScaleHandler();
 rtl::Reference BmpScalePartHandler();
 rtl::Reference BmpExHandler();
+rtl::Reference BmpExScaleHandler();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index b3cd5e0b5e87..b71c59b5144f 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -867,6 +867,9 @@ public:
 const BitmapEx& GetBitmapEx() const { return maBmpEx; }
 const Point&GetPoint() const { return maPt; }
 const Size& GetSize() const { return maSz; }
+voidSetBitmapEx(BitmapEx& rBmpEx) { maBmpEx = rBmpEx; }
+voidSetPoint(Point& rPt) { maPt = rPt; }
+voidSetSize(Size& rSz) { maSz = rSz; }
 boolIsTransparent() const override { return 
GetBitmapEx().IsAlpha(); }
 };
 
diff --git a/vcl/source/filter/svm/SvmReader.cxx 
b/vcl/source/filter/svm/SvmReader.cxx
index e53dbefeb45e..303e280e8680 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -223,7 +223,7 @@ rtl::Reference 
SvmReader::MetaActionHandler(ImplMetaReadData* pData)
 return BmpExHandler();
 break;
 case MetaActionType::BMPEXSCALE:
-pAction = new MetaBmpExScaleAction;
+return BmpExScaleHandler();
 break;
 case MetaActionType::BMPEXSCALEPART:
 pAction = new MetaBmpExScalePartAction;
@@ -915,4 +915,24 @@ rtl::Reference SvmReader::BmpExHandler()
 
 return pAction;
 }
+
+rtl::Reference SvmReader::BmpExScaleHandler()
+{
+auto pAction = new MetaBmpExScaleAction();
+
+VersionCompatRead aCompat(mrStream);
+BitmapEx aBmpEx;
+ReadDIBBitmapEx(aBmpEx, mrStream);
+TypeSerializer aSerializer(mrStream);
+Point aPoint;
+aSerializer.readPoint(aPoint);
+Size aSize;
+aSerializer.readSize(aSize);
+
+pAction->SetBitmapEx(aBmpEx);
+pAction->SetPoint(aPoint);
+pAction->SetSize(aSize);
+
+return pAction;
+}
 /* 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: include/vcl vcl/source

2021-07-09 Thread panoskorovesis (via logerrit)
 include/vcl/filter/SvmReader.hxx|1 +
 include/vcl/metaact.hxx |2 ++
 vcl/source/filter/svm/SvmReader.cxx |   19 ++-
 3 files changed, 21 insertions(+), 1 deletion(-)

New commits:
commit 7c85ebbc1aa81f54351f82566d25a11125eaeaa1
Author: panoskorovesis 
AuthorDate: Fri Jul 9 14:01:01 2021 +0300
Commit: Tomaž Vajngerl 
CommitDate: Sat Jul 10 00:40:53 2021 +0200

Add Handler for BmpEx Read

The handler separates MetaBmpExAction::Read from metaact.hxx
Read implementation is now in SvmReader.hxx

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

diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx
index fedaf58b9692..fc82e47268bc 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -59,6 +59,7 @@ public:
 rtl::Reference BmpHandler();
 rtl::Reference BmpScaleHandler();
 rtl::Reference BmpScalePartHandler();
+rtl::Reference BmpExHandler();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 4c531977100f..b3cd5e0b5e87 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -831,6 +831,8 @@ public:
 
 const BitmapEx& GetBitmapEx() const { return maBmpEx; }
 const Point&GetPoint() const { return maPt; }
+voidSetBitmapEx(BitmapEx rBmpEx) { maBmpEx = rBmpEx; }
+voidSetPoint(Point& rPt) { maPt = rPt; }
 boolIsTransparent() const override { return 
GetBitmapEx().IsAlpha(); }
 };
 
diff --git a/vcl/source/filter/svm/SvmReader.cxx 
b/vcl/source/filter/svm/SvmReader.cxx
index ed75eb27893e..e53dbefeb45e 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -220,7 +220,7 @@ rtl::Reference 
SvmReader::MetaActionHandler(ImplMetaReadData* pData)
 return BmpScalePartHandler();
 break;
 case MetaActionType::BMPEX:
-pAction = new MetaBmpExAction;
+return BmpExHandler();
 break;
 case MetaActionType::BMPEXSCALE:
 pAction = new MetaBmpExScaleAction;
@@ -898,4 +898,21 @@ rtl::Reference SvmReader::BmpScalePartHandler()
 
 return pAction;
 }
+
+rtl::Reference SvmReader::BmpExHandler()
+{
+auto pAction = new MetaBmpExAction();
+
+VersionCompatRead aCompat(mrStream);
+BitmapEx aBmpEx;
+ReadDIBBitmapEx(aBmpEx, mrStream);
+TypeSerializer aSerializer(mrStream);
+Point aPoint;
+aSerializer.readPoint(aPoint);
+
+pAction->SetPoint(aPoint);
+pAction->SetBitmapEx(aBmpEx);
+
+return pAction;
+}
 /* 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: include/vcl vcl/source

2021-07-09 Thread panoskorovesis (via logerrit)
 include/vcl/filter/SvmReader.hxx|1 +
 include/vcl/metaact.hxx |5 +
 vcl/source/filter/svm/SvmReader.cxx |   28 +++-
 3 files changed, 33 insertions(+), 1 deletion(-)

New commits:
commit 83b3c793144a1ef39edb72e8d4c438dbec13c179
Author: panoskorovesis 
AuthorDate: Fri Jul 9 13:55:14 2021 +0300
Commit: Tomaž Vajngerl 
CommitDate: Sat Jul 10 00:40:11 2021 +0200

Add Handler for BmpScalePart Read

The handler separates MetaBmpScalePartAction::Read from metaact.hxx
Read implementation is now in SvmReader.hxx

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

diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx
index 5757abe1c30c..fedaf58b9692 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -58,6 +58,7 @@ public:
 rtl::Reference TextLineHandler();
 rtl::Reference BmpHandler();
 rtl::Reference BmpScaleHandler();
+rtl::Reference BmpScalePartHandler();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index f025ae6fac87..4c531977100f 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -796,6 +796,11 @@ public:
 const Size& GetDestSize() const { return maDstSz; }
 const Point&GetSrcPoint() const { return maSrcPt; }
 const Size& GetSrcSize() const { return maSrcSz; }
+voidSetBitmap(Bitmap& rBmp) { maBmp = rBmp; }
+voidSetDestPoint(Point& rPt) { maDstPt = rPt; }
+voidSetDestSize(Size& rSz) { maDstSz = rSz; }
+voidSetSrcPoint(Point& rPt) { maSrcPt = rPt; }
+voidSetSrcSize(Size& rSz) { maSrcSz = rSz; }
 };
 
 class VCL_DLLPUBLIC MetaBmpExAction final : public MetaAction
diff --git a/vcl/source/filter/svm/SvmReader.cxx 
b/vcl/source/filter/svm/SvmReader.cxx
index 91e4052dab33..ed75eb27893e 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -217,7 +217,7 @@ rtl::Reference 
SvmReader::MetaActionHandler(ImplMetaReadData* pData)
 return BmpScaleHandler();
 break;
 case MetaActionType::BMPSCALEPART:
-pAction = new MetaBmpScalePartAction;
+return BmpScalePartHandler();
 break;
 case MetaActionType::BMPEX:
 pAction = new MetaBmpExAction;
@@ -872,4 +872,30 @@ rtl::Reference SvmReader::BmpScaleHandler()
 
 return pAction;
 }
+
+rtl::Reference SvmReader::BmpScalePartHandler()
+{
+auto pAction = new MetaBmpScalePartAction();
+
+VersionCompatRead aCompat(mrStream);
+Bitmap aBmp;
+ReadDIB(aBmp, mrStream, true);
+TypeSerializer aSerializer(mrStream);
+Point aDestPoint;
+aSerializer.readPoint(aDestPoint);
+Size aDestSize;
+aSerializer.readSize(aDestSize);
+Point aSrcPoint;
+aSerializer.readPoint(aSrcPoint);
+Size aSrcSize;
+aSerializer.readSize(aSrcSize);
+
+pAction->SetBitmap(aBmp);
+pAction->SetDestPoint(aDestPoint);
+pAction->SetDestSize(aDestSize);
+pAction->SetSrcPoint(aSrcPoint);
+pAction->SetSrcSize(aSrcSize);
+
+return pAction;
+}
 /* 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: 2 commits - include/vcl vcl/source

2021-07-09 Thread panoskorovesis (via logerrit)
 include/vcl/filter/SvmReader.hxx|2 +
 include/vcl/metaact.hxx |5 
 vcl/source/filter/svm/SvmReader.cxx |   42 ++--
 3 files changed, 47 insertions(+), 2 deletions(-)

New commits:
commit 19441313b37eb5d0a11c8a929a38c079fa7ef291
Author: panoskorovesis 
AuthorDate: Fri Jul 9 13:36:54 2021 +0300
Commit: Tomaž Vajngerl 
CommitDate: Sat Jul 10 00:39:47 2021 +0200

Add Handler for BmpScale Read

The handler separates MetaBmpScaleAction::Read from metaact.hxx
Read implementation is now in SvmReader.hxx

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

diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx
index c34c7db1df4e..5757abe1c30c 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -57,6 +57,7 @@ public:
 rtl::Reference TextRectHandler(ImplMetaReadData* pData);
 rtl::Reference TextLineHandler();
 rtl::Reference BmpHandler();
+rtl::Reference BmpScaleHandler();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 464f2b32777e..f025ae6fac87 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -755,6 +755,9 @@ public:
 const Bitmap&   GetBitmap() const { return maBmp; }
 const Point&GetPoint() const { return maPt; }
 const Size& GetSize() const { return maSz; }
+voidSetBitmap(Bitmap& rBmp) { maBmp = rBmp; }
+voidSetPoint(Point& rPt) { maPt = rPt; }
+voidSetSize(Size& rSz) { maSz = rSz; }
 };
 
 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaBmpScalePartAction final : public 
MetaAction
diff --git a/vcl/source/filter/svm/SvmReader.cxx 
b/vcl/source/filter/svm/SvmReader.cxx
index 8f2c503ffc7b..91e4052dab33 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -214,7 +214,7 @@ rtl::Reference 
SvmReader::MetaActionHandler(ImplMetaReadData* pData)
 return BmpHandler();
 break;
 case MetaActionType::BMPSCALE:
-pAction = new MetaBmpScaleAction;
+return BmpScaleHandler();
 break;
 case MetaActionType::BMPSCALEPART:
 pAction = new MetaBmpScalePartAction;
@@ -852,4 +852,24 @@ rtl::Reference SvmReader::BmpHandler()
 
 return pAction;
 }
+
+rtl::Reference SvmReader::BmpScaleHandler()
+{
+auto pAction = new MetaBmpScaleAction();
+
+VersionCompatRead aCompat(mrStream);
+Bitmap aBmp;
+ReadDIB(aBmp, mrStream, true);
+TypeSerializer aSerializer(mrStream);
+Point aPoint;
+aSerializer.readPoint(aPoint);
+Size aSz;
+aSerializer.readSize(aSz);
+
+pAction->SetBitmap(aBmp);
+pAction->SetPoint(aPoint);
+pAction->SetSize(aSz);
+
+return pAction;
+}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 10d983f57f0bc1ec665d6e2bbfa1d9038446e7f9
Author: panoskorovesis 
AuthorDate: Fri Jul 9 13:28:47 2021 +0300
Commit: Tomaž Vajngerl 
CommitDate: Sat Jul 10 00:39:32 2021 +0200

Add Handler for Bmp Read

The handler separates MetaBmpAction::Read from metaact.hxx
Read implementation is now in SvmReader.hxx

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

diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx
index fd8d81ce7295..c34c7db1df4e 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -56,6 +56,7 @@ public:
 rtl::Reference StretchTextHandler(ImplMetaReadData* pData);
 rtl::Reference TextRectHandler(ImplMetaReadData* pData);
 rtl::Reference TextLineHandler();
+rtl::Reference BmpHandler();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 731e901bd622..464f2b32777e 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -720,6 +720,8 @@ public:
 
 const Bitmap&   GetBitmap() const { return maBmp; }
 const Point&GetPoint() const { return maPt; }
+voidSetBitmap(Bitmap& rBmp) { maBmp = rBmp; }
+voidSetPoint(Point& rPt) { maPt = rPt; }
 };
 
 class VCL_DLLPUBLIC MetaBmpScaleAction final : public MetaAction
diff --git a/vcl/source/filter/svm/SvmReader.cxx 
b/vcl/source/filter/svm/SvmReader.cxx
index 43cd2e0e354a..8f2c503ffc7b 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -21,6 +21,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -210,7 +211,7 @@ rtl::Reference 
SvmReader::MetaActionHandler(ImplMetaReadData* pData)

[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk include/vcl vcl/backendtest

2021-07-09 Thread homeboy445 (via logerrit)
 cui/Library_cui.mk|1 
 cui/UIConfig_cui.mk   |2 
 cui/source/dialogs/GraphicTestsDialog.cxx |   78 +++--
 cui/source/dialogs/ImageViewerDialog.cxx  |   24 +
 cui/source/inc/GraphicsTestsDialog.hxx|   34 ++
 cui/source/inc/ImageViewerDialog.hxx  |   20 +
 cui/uiconfig/ui/graphictestdlg.ui |  101 +-
 cui/uiconfig/ui/graphictestentry.ui   |   43 ++
 cui/uiconfig/ui/imageviewer.ui|   44 ++
 include/vcl/test/GraphicsRenderTests.hxx  |   39 +-
 vcl/backendtest/GraphicsRenderTests.cxx   |  455 --
 11 files changed, 625 insertions(+), 216 deletions(-)

New commits:
commit 3057ee8ba01535324f57978569526988664eb53a
Author: homeboy445 
AuthorDate: Tue Jun 22 16:54:34 2021 +0530
Commit: Tomaž Vajngerl 
CommitDate: Sat Jul 10 00:34:38 2021 +0200

Added support for viewing results in the VCL tests UI box

The user can now easily view the result of any VCL test
by just clicking on it - which would show them the resultant
bitmap of that corresponding test.

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

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 345f84b7f008..bc4f1e50c139 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -139,6 +139,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/dialogs/postdlg \
 cui/source/dialogs/QrCodeGenDialog \
 cui/source/dialogs/GraphicTestsDialog \
+cui/source/dialogs/ImageViewerDialog \
 cui/source/dialogs/scriptdlg \
 cui/source/dialogs/SignatureLineDialogBase \
 cui/source/dialogs/SignatureLineDialog \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 73da8e159f09..3af5d8e698e7 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -83,6 +83,8 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/gallerytitledialog \
cui/uiconfig/ui/galleryupdateprogress \
cui/uiconfig/ui/graphictestdlg \
+   cui/uiconfig/ui/graphictestentry \
+   cui/uiconfig/ui/imageviewer \
cui/uiconfig/ui/hangulhanjaadddialog \
cui/uiconfig/ui/hangulhanjaeditdictdialog \
cui/uiconfig/ui/hangulhanjaconversiondialog \
diff --git a/cui/source/dialogs/GraphicTestsDialog.cxx 
b/cui/source/dialogs/GraphicTestsDialog.cxx
index 275d33d75886..000129444cd5 100644
--- a/cui/source/dialogs/GraphicTestsDialog.cxx
+++ b/cui/source/dialogs/GraphicTestsDialog.cxx
@@ -8,48 +8,70 @@
  */
 
 #include 
+#include 
+
+GraphicTestEntry::GraphicTestEntry(weld::Container* pParent, weld::Dialog* 
pDialog,
+   OUString aTestName, OUString aTestStatus, 
Bitmap aTestBitmap)
+: m_xBuilder(Application::CreateBuilder(pParent, 
"cui/ui/graphictestentry.ui"))
+, m_xContainer(m_xBuilder->weld_container("gptestbox"))
+, m_xTestLabel(m_xBuilder->weld_label("gptestlabel"))
+, m_xTestButton(m_xBuilder->weld_button("gptestbutton"))
+, m_xResultBitmap(aTestBitmap)
+{
+m_xParentDialog = pDialog;
+m_xTestLabel->set_label(aTestName);
+m_xTestButton->set_label(aTestStatus);
+m_xTestButton->set_tooltip_text(aTestName);
+m_xTestButton->set_background(
+aTestStatus == "PASSED"
+? COL_LIGHTGREEN
+: aTestStatus == "QUIRKY" ? COL_YELLOW
+  : aTestStatus == "FAILED" ? COL_LIGHTRED 
: COL_LIGHTGRAY);
+m_xTestButton->connect_clicked(LINK(this, GraphicTestEntry, 
HandleResultViewRequest));
+m_xContainer->show();
+}
+
+IMPL_LINK(GraphicTestEntry, HandleResultViewRequest, weld::Button&, rButton, 
void)
+{
+if (rButton.get_label() == "SKIPPED")
+{
+return;
+}
+ImageViewerDialog m_ImgVwDialog(m_xParentDialog, BitmapEx(m_xResultBitmap),
+rButton.get_tooltip_text());
+m_ImgVwDialog.run();
+}
 
 GraphicsTestsDialog::GraphicsTestsDialog(weld::Window* pParent)
 : GenericDialogController(pParent, "cui/ui/graphictestdlg.ui", 
"GraphicTestsDialog")
-, m_xResultLog(m_xBuilder->weld_text_view("gptestresults"))
+, m_xResultLog(m_xBuilder->weld_text_view("gptest_txtVW"))
 , m_xDownloadResults(m_xBuilder->weld_button("gptest_downld"))
+, m_xContainerBox(m_xBuilder->weld_box("gptest_box"))
 {
-m_xResultLog->set_text("Running tests...");
 m_xDownloadResults->connect_clicked(LINK(this, GraphicsTestsDialog, 
HandleDownloadRequest));
-runGraphicsTestandUpdateLog();
 }
 
-void GraphicsTestsDialog::runGraphicsTestandUpdateLog()
+short GraphicsTestsDialog::run()
 {
-GraphicsRenderTests TestObject;
-TestObject.run();
-OUString atemp = "--General Info--\nGraphics Backend used : " + 
TestObject.m_aCurGraphicsBackend
- + "\nPassed Tests : " + 
OUString::number(TestObject.m_aPassed.size())
-  

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

2021-07-09 Thread Bjoern Michaelsen (via logerrit)
 sw/inc/hints.hxx |9 
 sw/source/core/layout/tabfrm.cxx |   25 +++-
 sw/source/core/table/swtable.cxx |   40 +--
 3 files changed, 39 insertions(+), 35 deletions(-)

New commits:
commit 56d7965b6c24915359f39f45f1696c6f1dc3d3c9
Author: Bjoern Michaelsen 
AuthorDate: Mon Jul 5 02:34:18 2021 +0200
Commit: Bjoern Michaelsen 
CommitDate: Fri Jul 9 23:28:43 2021 +0200

Remove some iterator abuse

Change-Id: I9279a1729e1715ac44c600c930f50c6e8704e676
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118393
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen 

diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index 8f978d886c2a..afaf1d9022d9 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -34,6 +34,8 @@ class SwHistory;
 class SwTextNode;
 class SwTextFormatColl;
 class SwFrameFormat;
+class SwTableBox;
+class SwTableBoxFormat;
 class SwTableLine;
 class SwTableLineFormat;
 class SwTableBox;
@@ -179,6 +181,13 @@ public:
 const SwTableLine& m_rTabLine;
 TableLineFormatChanged(const SwTableLineFormat& rNewFormat, const 
SwTableLine& rTabLine) : m_rNewFormat(rNewFormat), m_rTabLine(rTabLine) {};
 };
+class TableBoxFormatChanged final : public SfxHint
+{
+public:
+const SwTableBoxFormat& m_rNewFormat;
+const SwTableBox& m_rTableBox;
+TableBoxFormatChanged(const SwTableBoxFormat& rNewFormat, const 
SwTableBox& rTableBox) : m_rNewFormat(rNewFormat), m_rTableBox(rTableBox) {};
+};
 }
 
 class SwUpdateAttr final : public SwMsgPoolItem
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index c50f4d4873eb..36c5ba5faf1e 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -5459,7 +5459,30 @@ void SwCellFrame::Format( vcl::RenderContext* 
/*pRenderContext*/, const SwBorder
 
 void SwCellFrame::SwClientNotify(const SwModify& rMod, const SfxHint& rHint)
 {
-if(auto pMoveTableBoxHint = dynamic_cast(&rHint))
+if(auto pNewFormatHint = dynamic_cast(&rHint))
+{
+if(GetTabBox() != &pNewFormatHint->m_rTableBox)
+return;
+
RegisterToFormat(const_cast(pNewFormatHint->m_rNewFormat));
+InvalidateSize();
+InvalidatePrt_();
+SetCompletePaint();
+SetDerivedVert(false);
+CheckDirChange();
+
+// #i47489#
+// make sure that the row will be formatted, in order
+// to have the correct Get(Top|Bottom)MarginForLowers values
+// set at the row.
+const SwTabFrame* pTab = FindTabFrame();
+if(pTab && pTab->IsCollapsingBorders())
+{
+SwFrame* pRow = GetUpper();
+pRow->InvalidateSize_();
+pRow->InvalidatePrt_();
+}
+}
+else if(auto pMoveTableBoxHint = dynamic_cast(&rHint))
 {
 if(GetTabBox() != &pMoveTableBoxHint->m_rTableBox)
 return;
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index fe6a221daa0c..1da79f960545 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -1689,45 +1689,17 @@ SwFrameFormat* SwTableBox::ClaimFrameFormat()
 return pRet;
 }
 
-void SwTableBox::ChgFrameFormat( SwTableBoxFormat* pNewFormat, bool 
bNeedToReregister )
+void SwTableBox::ChgFrameFormat(SwTableBoxFormat* pNewFormat, bool 
bNeedToReregister)
 {
-SwFrameFormat *pOld = GetFrameFormat();
-SwIterator aIter( *pOld );
-
+SwFrameFormat* pOld = GetFrameFormat();
 // tdf#84635 We set bNeedToReregister=false to avoid a quadratic slowdown 
on loading large tables,
 // and since we are creating the table for the first time, no 
re-registration is necessary.
-
 // First, re-register the Frames.
-if (bNeedToReregister)
-for( SwCellFrame* pCell = aIter.First(); pCell; pCell = aIter.Next() )
-{
-if( pCell->GetTabBox() == this )
-{
-pCell->RegisterToFormat( *pNewFormat );
-pCell->InvalidateSize();
-pCell->InvalidatePrt_();
-pCell->SetCompletePaint();
-pCell->SetDerivedVert( false );
-pCell->CheckDirChange();
-
-// #i47489#
-// make sure that the row will be formatted, in order
-// to have the correct Get(Top|Bottom)MarginForLowers values
-// set at the row.
-const SwTabFrame* pTab = pCell->FindTabFrame();
-if ( pTab && pTab->IsCollapsingBorders() )
-{
-SwFrame* pRow = pCell->GetUpper();
-pRow->InvalidateSize_();
-pRow->InvalidatePrt_();
-}
-}
-}
-
+if(bNeedToReregister)
+pOld->CallSwClientNotify(sw::TableBoxFormatChanged(*pNewFormat, 
*this));
 // Now, re-register self.
-pNewFormat->Add( this );
-
-if( !pOld->HasWri

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

2021-07-09 Thread Bjoern Michaelsen (via logerrit)
 sw/inc/hints.hxx |9 +++
 sw/source/core/layout/tabfrm.cxx |   29 -
 sw/source/core/table/swtable.cxx |   44 ---
 3 files changed, 42 insertions(+), 40 deletions(-)

New commits:
commit 0c8f364421014486c4e35a78a6dabca5b6a5dd26
Author: Bjoern Michaelsen 
AuthorDate: Mon Jul 5 01:53:48 2021 +0200
Commit: Bjoern Michaelsen 
CommitDate: Fri Jul 9 23:28:08 2021 +0200

remove some SwIterator abuse

Change-Id: Ic95562ebb57106c733d919059ff9d042fef28f3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118392
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen 

diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index e83d42251882..8f978d886c2a 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -35,6 +35,7 @@ class SwTextNode;
 class SwTextFormatColl;
 class SwFrameFormat;
 class SwTableLine;
+class SwTableLineFormat;
 class SwTableBox;
 
 // Base class for all Message-Hints:
@@ -170,6 +171,14 @@ public:
 class DocumentDyingHint final : public SfxHint
 {
 };
+
+class TableLineFormatChanged final : public SfxHint
+{
+public:
+const SwTableLineFormat& m_rNewFormat;
+const SwTableLine& m_rTabLine;
+TableLineFormatChanged(const SwTableLineFormat& rNewFormat, const 
SwTableLine& rTabLine) : m_rNewFormat(rNewFormat), m_rTabLine(rTabLine) {};
+};
 }
 
 class SwUpdateAttr final : public SwMsgPoolItem
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index c54b24d59e3d..c50f4d4873eb 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -3919,7 +3919,34 @@ void SwRowFrame::OnFrameSize(const SfxPoolItem& rSize)
 
 void SwRowFrame::SwClientNotify(const SwModify& rModify, const SfxHint& rHint)
 {
-if(auto pMoveTableLineHint = dynamic_cast(&rHint))
+if(auto pNewFormatHint = dynamic_cast(&rHint))
+{
+if(GetTabLine() != &pNewFormatHint->m_rTabLine)
+return;
+
RegisterToFormat(const_cast(pNewFormatHint->m_rNewFormat));
+InvalidateSize();
+InvalidatePrt_();
+SetCompletePaint();
+ReinitializeFrameSizeAttrFlags();
+
+// #i35063#
+// consider 'split row allowed' attribute
+SwTabFrame* pTab = FindTabFrame();
+bool bInFollowFlowRow = false;
+const bool bInFirstNonHeadlineRow = pTab->IsFollow() && this == 
pTab->GetFirstNonHeadlineRow();
+if(bInFirstNonHeadlineRow ||
+ !GetNext() ||
+ (bInFollowFlowRow = IsInFollowFlowRow()) ||
+ nullptr != IsInSplitTableRow() )
+{
+if(bInFirstNonHeadlineRow || bInFollowFlowRow)
+pTab = pTab->FindMaster();
+
+pTab->SetRemoveFollowFlowLinePending(true);
+pTab->InvalidatePos();
+}
+}
+else if(auto pMoveTableLineHint = dynamic_cast(&rHint))
 {
 
 if(GetTabLine() != &pMoveTableLineHint->m_rTableLine)
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index c2f3b3bd9764..fe6a221daa0c 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -1496,47 +1496,13 @@ SwFrameFormat* SwTableLine::ClaimFrameFormat()
 return pRet;
 }
 
-void SwTableLine::ChgFrameFormat( SwTableLineFormat *pNewFormat )
+void SwTableLine::ChgFrameFormat(SwTableLineFormat* pNewFormat)
 {
-SwFrameFormat *pOld = GetFrameFormat();
-SwIterator aIter( *pOld );
-
-// First, re-register the Frames.
-for( SwRowFrame* pRow = aIter.First(); pRow; pRow = aIter.Next() )
-{
-if( pRow->GetTabLine() == this )
-{
-pRow->RegisterToFormat( *pNewFormat );
-
-pRow->InvalidateSize();
-pRow->InvalidatePrt_();
-pRow->SetCompletePaint();
-pRow->ReinitializeFrameSizeAttrFlags();
-
-// #i35063#
-// consider 'split row allowed' attribute
-SwTabFrame* pTab = pRow->FindTabFrame();
-bool bInFollowFlowRow = false;
-const bool bInFirstNonHeadlineRow = pTab->IsFollow() &&
-pRow == 
pTab->GetFirstNonHeadlineRow();
-if ( bInFirstNonHeadlineRow ||
- !pRow->GetNext() ||
- ( bInFollowFlowRow = pRow->IsInFollowFlowRow() ) ||
- nullptr != pRow->IsInSplitTableRow() )
-{
-if ( bInFirstNonHeadlineRow || bInFollowFlowRow )
-pTab = pTab->FindMaster();
-
-pTab->SetRemoveFollowFlowLinePending( true );
-pTab->InvalidatePos();
-}
-}
-}
-
+auto pOld = GetFrameFormat();
+pOld->CallSwClientNotify(sw::TableLineFormatChanged(*pNewFormat, *this));
 // Now, re-register self.
-pNewFormat->Add( this );
-
-if ( !pOld->HasWriterListeners() )
+pNewFormat->Add(this);
+if(!pOld->HasWriterListeners())
 delete p

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

2021-07-09 Thread Bjoern Michaelsen (via logerrit)
 sw/source/core/inc/frmtool.hxx |   14 --
 sw/source/core/layout/frmtool.cxx  |   27 ++-
 sw/source/core/layout/laycache.cxx |5 +
 sw/source/core/layout/tabfrm.cxx   |   21 -
 sw/source/core/layout/wsfrm.cxx|8 
 5 files changed, 47 insertions(+), 28 deletions(-)

New commits:
commit debfdcfc0b2c07319e4a754decab18a292dc227c
Author: Bjoern Michaelsen 
AuthorDate: Sun Jul 4 13:00:03 2021 +0200
Commit: Bjoern Michaelsen 
CommitDate: Fri Jul 9 23:27:26 2021 +0200

remove global bDontCreateObjects bit

Wrapping this in a scope based helper is mostly lipstick on a pig, but
at least one cant forget toggling back this way. Apparently, this flag
was already toggled in recursive calls without checking previous state,
which is likely buggy.

In the long run, this should a/ never be used recursively or better b/
not be a global flag at all.

Change-Id: Id3554d2acb94d565611701c046ca4d8669594cea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118371
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen 

diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index 1974338f7936..4e328ca32af9 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -150,9 +150,6 @@ void MakeFrames( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
 
 extern bool bObjsDirect;
 
-// prevent creation of Flys in InsertCnt_, e.g. for table headlines
-extern bool bDontCreateObjects;
-
 // for FlyCnts, see SwFlyAtContentFrame::MakeAll()
 extern bool bSetCompletePaintOnInvalidate;
 
@@ -161,9 +158,14 @@ SwTwips CalcRowRstHeight( SwLayoutFrame *pRow );
 tools::Long CalcHeightWithFlys( const SwFrame *pFrame );
 
 namespace sw {
-
-bool IsRightPageByNumber(SwRootFrame const& rLayout, sal_uInt16 nPageNum);
-
+bool IsRightPageByNumber(SwRootFrame const& rLayout, sal_uInt16 nPageNum);
+class FlyCreationSuppressor
+{
+const bool m_wasAlreadySuppressed;
+public:
+FlyCreationSuppressor(bool isAlreadySuppressedAllowed = true);
+~FlyCreationSuppressor();
+};
 } // namespace sw
 
 SwPageFrame *InsertNewPage( SwPageDesc &rDesc, SwFrame *pUpper,
diff --git a/sw/source/core/layout/frmtool.cxx 
b/sw/source/core/layout/frmtool.cxx
index c50061bcf68e..59429f55ddf2 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -79,8 +79,25 @@
 
 using namespace ::com::sun::star;
 
+namespace {
+// FIXME: would likely better be a member of SwRootFrame instead of a 
global flag
+bool isFlyCreationSuppressed = false;
+}
+namespace sw {
+FlyCreationSuppressor::FlyCreationSuppressor(bool 
wasAlreadySuppressedAllowed)
+: m_wasAlreadySuppressed(isFlyCreationSuppressed)
+{
+(void)wasAlreadySuppressedAllowed;
+assert(wasAlreadySuppressedAllowed || !isFlyCreationSuppressed);
+isFlyCreationSuppressed = true;
+}
+FlyCreationSuppressor::~FlyCreationSuppressor()
+{
+isFlyCreationSuppressed = m_wasAlreadySuppressed;
+}
+}
+
 bool bObjsDirect = true;
-bool bDontCreateObjects = false;
 bool bSetCompletePaintOnInvalidate = false;
 
 sal_uInt8 StackHack::s_nCnt = 0;
@@ -1588,7 +1605,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc,
 lcl_SetPos( *pFrame, *pLay );
 pPrv = pFrame;
 
-if ( !pTable->empty() && bObjsDirect && !bDontCreateObjects )
+if ( !pTable->empty() && bObjsDirect && !isFlyCreationSuppressed )
 AppendObjs( pTable, nIndex, pFrame, pPage, pDoc );
 }
 else if ( pNd->IsTableNode() )
@@ -1893,7 +1910,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc,
 assert(false); // actually a fly-section can't be deleted?
 continue; // skip it
 }
-if ( !pTable->empty() && bObjsDirect && !bDontCreateObjects )
+if ( !pTable->empty() && bObjsDirect && !isFlyCreationSuppressed )
 {
 SwFlyFrame* pFly = pLay->FindFlyFrame();
 if( pFly )
@@ -1922,7 +1939,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc,
 
 if ( bPages ) // let the Flys connect to each other
 {
-if ( !bDontCreateObjects )
+if ( !isFlyCreationSuppressed )
 AppendAllObjs( pTable, pLayout );
 bObjsDirect = true;
 }
@@ -2110,7 +2127,7 @@ void MakeFrames( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
   nEndIdx, pPrv, eMode );
 // OD 23.06.2003 #108784# - correction: append objects doesn't
 // depend on value of 
-if( !bDontCreateObjects )
+if( !isFlyCreationSuppressed )
 {
 const SwFrameFormats *pTable = pDoc->GetSpzFrameFormats();
 if( !pTable->empty() )
diff --git a/sw/source/core/layout/laycache.cxx 

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

2021-07-09 Thread Caolán McNamara (via logerrit)
 sw/source/filter/ww8/ww8scan.cxx |   15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

New commits:
commit af2d477a30c197be5fbfa54022343f7a559b35cf
Author: Caolán McNamara 
AuthorDate: Fri Jul 9 14:51:23 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 9 21:43:34 2021 +0200

ofz: OOM

these old ww7- font names are supposed to be limited to maxStrSize

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

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 657cf60026c9..b8ea323e434d 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -7206,16 +7206,17 @@ namespace
 return true;
 }
 
-sal_Int32 getStringLength(
-sal_uInt8 const * p, std::size_t offset, sal_uInt8 const * pEnd)
+sal_Int32 getStringLengthWithMax(
+sal_uInt8 const * p, std::size_t offset, sal_uInt8 const * pEnd, 
std::size_t maxchars)
 {
 assert(p <= pEnd);
 assert(pEnd - p <= SAL_MAX_INT32);
 if (offset >= o3tl::make_unsigned(pEnd - p)) {
 return -1;
 }
-void const * p2 = std::memchr(
-p + offset, 0, static_cast(pEnd - p) - offset);
+std::size_t nbytes = static_cast(pEnd - p) - offset;
+std::size_t nsearch = std::min(nbytes, maxchars + 1);
+void const * p2 = std::memchr(p + offset, 0, nsearch);
 if (p2 == nullptr) {
 return -1;
 }
@@ -7315,7 +7316,7 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib const & rFib )
 eEnc = RTL_TEXTENCODING_MS_1252;
 
 const size_t nStringOffset = 1 + 2;
-sal_Int32 n = getStringLength(pVer2, nStringOffset, pEnd);
+sal_Int32 n = getStringLengthWithMax(pVer2, nStringOffset, 
pEnd, maxStrSize);
 if (n == -1) {
 break;
 }
@@ -7367,7 +7368,7 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib const & rFib )
 if ((eEnc == RTL_TEXTENCODING_SYMBOL) || (eEnc == 
RTL_TEXTENCODING_DONTKNOW))
 eEnc = RTL_TEXTENCODING_MS_1252;
 const size_t nStringOffset = offsetof(WW8_FFN_Ver6, szFfn);
-sal_Int32 n = getStringLength(pVer6, nStringOffset, pEnd);
+sal_Int32 n = getStringLengthWithMax(pVer6, nStringOffset, 
pEnd, maxStrSize);
 if (n == -1) {
 break;
 }
@@ -7375,7 +7376,7 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib const & rFib )
 if (p->aFFNBase.ibszAlt && p->aFFNBase.ibszAlt < maxStrSize) 
//don't start after end of string
 {
 const size_t nAltStringOffset = offsetof(WW8_FFN_Ver6, 
szFfn) + p->aFFNBase.ibszAlt;
-n = getStringLength(pVer6, nAltStringOffset, pEnd);
+n = getStringLengthWithMax(pVer6, nAltStringOffset, pEnd, 
maxStrSize);
 if (n == -1) {
 break;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-09 Thread Caolán McNamara (via logerrit)
 vcl/source/uitest/uiobject.cxx |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 43f17336db888bd5d4671325e679dc12e693b1d0
Author: Caolán McNamara 
AuthorDate: Fri Jul 9 15:53:35 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 9 21:00:07 2021 +0200

split out duplicated condition and test it once

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

diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index 14ff3f5d7690..fe9791c83aba 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -411,16 +411,16 @@ vcl::Window* findChild(vcl::Window* pParent, const 
OUString& rID, bool bRequireV
 for (size_t i = 0; i < nCount; ++i)
 {
 vcl::Window* pChild = pParent->GetChild(i);
-if (pChild->get_id() == rID
-&& (!bRequireVisible || pChild->IsVisible()))
+bool bCandidate = !bRequireVisible || pChild->IsVisible();
+if (!bCandidate)
+continue;
+
+if (pChild->get_id() == rID)
 return pChild;
 
-if (!bRequireVisible || pChild->IsVisible())
-{
-vcl::Window* pResult = findChild(pChild, rID);
-if (pResult)
-return pResult;
-}
+vcl::Window* pResult = findChild(pChild, rID);
+if (pResult)
+return pResult;
 }
 
 return nullptr;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-09 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |   23 ---
 1 file changed, 12 insertions(+), 11 deletions(-)

New commits:
commit e875df09fc230639455a7084919bacd81c18c61e
Author: Caolán McNamara 
AuthorDate: Fri Jul 9 16:35:02 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 9 20:58:35 2021 +0200

gtk4: use m_bPopupActive rather than repeatedly call 
toggle_button_get_active

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 47be0fd7ed25..1ee5072aed7f 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -17482,7 +17482,7 @@ private:
 void fire_signal_changed()
 {
 m_bUserSelectEntry = true;
-m_bChangedByMenu = toggle_button_get_active();
+m_bChangedByMenu = m_bPopupActive;
 signal_changed();
 m_bChangedByMenu = false;
 }
@@ -17545,7 +17545,7 @@ private:
 
 void menu_toggled()
 {
-if (!toggle_button_get_active())
+if (!m_bPopupActive)
 {
 #if 0
 if (m_bHoverSelection)
@@ -17584,12 +17584,13 @@ private:
 {
 m_aQuickSelectionEngine.Reset();
 
+bool bOldPopupActive = m_bPopupActive;
+m_bPopupActive = toggle_button_get_active();
+
 menu_toggled();
 
-bool bIsShown = toggle_button_get_active();
-if (m_bPopupActive != bIsShown)
+if (bOldPopupActive != m_bPopupActive)
 {
-m_bPopupActive = bIsShown;
 ComboBox::signal_popup_toggled();
 // restore focus to the GtkEntry when the popup is gone, which
 // is what the vcl case does, to ease the transition a little,
commit 8c9588cceaad5a9155c8d22a44a2e7dc54a56aa0
Author: Caolán McNamara 
AuthorDate: Fri Jul 9 16:26:12 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 9 20:58:20 2021 +0200

gtk[3|4] rename toggle_menu -> menu_toggled

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index cd61f4e683d2..47be0fd7ed25 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -9496,12 +9496,12 @@ private:
 {
 GtkInstanceMenuButton* pThis = 
static_cast(widget);
 SolarMutexGuard aGuard;
-pThis->toggle_menu();
+pThis->menu_toggled();
 }
 #endif
 
 #if !GTK_CHECK_VERSION(4, 0, 0)
-void toggle_menu()
+void menu_toggled()
 {
 if (!m_pMenuHack)
 return;
@@ -17543,7 +17543,7 @@ private:
 return g_value_get_boolean(&value);
 }
 
-void toggle_menu()
+void menu_toggled()
 {
 if (!toggle_button_get_active())
 {
@@ -17584,7 +17584,7 @@ private:
 {
 m_aQuickSelectionEngine.Reset();
 
-toggle_menu();
+menu_toggled();
 
 bool bIsShown = toggle_button_get_active();
 if (m_bPopupActive != bIsShown)
@@ -19268,7 +19268,7 @@ private:
 return nHeight;
 }
 
-void toggle_menu()
+void menu_toggled()
 {
 if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m_pToggleButton)))
 {
@@ -19328,7 +19328,7 @@ private:
 {
 m_aQuickSelectionEngine.Reset();
 
-toggle_menu();
+menu_toggled();
 
 bool bIsShown = 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(m_pToggleButton));
 if (m_bPopupActive != bIsShown)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

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

New commits:
commit caae3b77b23c382f58c1b0dd47ce8ed5d4ccad3b
Author: Caolán McNamara 
AuthorDate: Fri Jul 9 16:21:37 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 9 20:57:29 2021 +0200

gtk4: disregard insert-text signal if it happens while the popup is shown

otherwise we lose our selection

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index cd3fd1b5bc84..cd61f4e683d2 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -17445,6 +17445,9 @@ private:
 
 void signal_entry_insert_text(GtkEntry* pEntry, const gchar* pNewText, 
gint nNewTextLength, gint* position)
 {
+if (m_bPopupActive) // not entered by the user
+return;
+
 // first filter inserted text
 if (m_aEntryInsertTextHdl.IsSet())
 {
@@ -17459,6 +17462,7 @@ private:
 }
 g_signal_stop_emission_by_name(pEntry, "insert-text");
 }
+
 if (m_bAutoComplete)
 {
 // now check for autocompletes
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-09 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/stringadd.cxx |   89 +---
 1 file changed, 44 insertions(+), 45 deletions(-)

New commits:
commit 6a1ed1e5cdb9f56fc8c7278b7361c7b2aa200bb8
Author: Stephan Bergmann 
AuthorDate: Fri Jul 9 15:08:24 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Jul 9 19:23:34 2021 +0200

Remove redundant duplicate check

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

diff --git a/compilerplugins/clang/stringadd.cxx 
b/compilerplugins/clang/stringadd.cxx
index 394139dbb354..f10072497767 100644
--- a/compilerplugins/clang/stringadd.cxx
+++ b/compilerplugins/clang/stringadd.cxx
@@ -346,69 +346,68 @@ bool StringAdd::isSideEffectFree(Expr const* expr)
 {
 // check for calls through OUString::number/OUString::unacquired
 if (auto calleeMethodDecl = 
dyn_cast_or_null(callExpr->getCalleeDecl()))
-if (calleeMethodDecl)
+{
+if (calleeMethodDecl->getIdentifier())
 {
-if (calleeMethodDecl->getIdentifier())
+auto name = calleeMethodDecl->getName();
+if (callExpr->getNumArgs() > 0
+&& (name == "number" || name == "unacquired" || name == 
"boolean"
+|| name == "copy"))
 {
-auto name = calleeMethodDecl->getName();
-if (callExpr->getNumArgs() > 0
-&& (name == "number" || name == "unacquired" || name 
== "boolean"
-|| name == "copy"))
+auto tc = 
loplugin::TypeCheck(calleeMethodDecl->getParent());
+if (tc.Class("OUString") || tc.Class("OString"))
 {
-auto tc = 
loplugin::TypeCheck(calleeMethodDecl->getParent());
-if (tc.Class("OUString") || tc.Class("OString"))
-{
-if (isSideEffectFree(callExpr->getArg(0)))
-return true;
-}
+if (isSideEffectFree(callExpr->getArg(0)))
+return true;
 }
 }
-else if (auto const d = 
dyn_cast(calleeMethodDecl))
+}
+else if (auto const d = 
dyn_cast(calleeMethodDecl))
+{
+if (loplugin::TypeCheck(d->getConversionType())
+.ClassOrStruct("basic_string_view")
+.StdNamespace())
 {
-if (loplugin::TypeCheck(d->getConversionType())
-.ClassOrStruct("basic_string_view")
-.StdNamespace())
+auto const tc = 
loplugin::TypeCheck(calleeMethodDecl->getParent());
+if (tc.Class("OUString").Namespace("rtl").GlobalNamespace()
+|| 
tc.Class("OString").Namespace("rtl").GlobalNamespace())
 {
-auto const tc = 
loplugin::TypeCheck(calleeMethodDecl->getParent());
-if 
(tc.Class("OUString").Namespace("rtl").GlobalNamespace()
-|| 
tc.Class("OString").Namespace("rtl").GlobalNamespace())
-{
-if (isSideEffectFree(callExpr->getCallee()))
-return true;
-}
+if (isSideEffectFree(callExpr->getCallee()))
+return true;
 }
 }
-// Aggressively assume that calls to const member functions 
are side effect free (if
-// all of the call's sub-expressions are):
-if (calleeMethodDecl->isConst())
+}
+// Aggressively assume that calls to const member functions are 
side effect free (if
+// all of the call's sub-expressions are):
+if (calleeMethodDecl->isConst())
+{
+auto sef = true;
+// Other options besides CXXMemberCallExpr are e.g. 
CXXOperatorCallExpr which
+// does not have such a target expression:
+if (auto const mce = dyn_cast(callExpr))
 {
-auto sef = true;
-// Other options besides CXXMemberCallExpr are e.g. 
CXXOperatorCallExpr which
-// does not have such a target expression:
-if (auto const mce = dyn_cast(callExpr))
+if (!isSideEffectFree(mce->getImplicitObjectArgument()))
 {
-if 
(!isSideEffectFree(mce->getImplicitObjectArgument()))
-{
-sef = false;
-  

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

2021-07-09 Thread Szymon Kłos (via logerrit)
 svx/source/sidebar/effect/EffectPropertyPanel.cxx |2 +-
 svx/uiconfig/ui/sidebareffect.ui  |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 00d52f5119b091f51fee188655a1bfc4c84889f8
Author: Szymon Kłos 
AuthorDate: Fri Jul 9 16:38:57 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Jul 9 17:55:27 2021 +0200

jsdialog: dont use popular id for glow color

to avoid confusing it on updates

Change-Id: I2b19dc41a17e070ac1c8869d478c3b0b09a54223
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118692
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/svx/source/sidebar/effect/EffectPropertyPanel.cxx 
b/svx/source/sidebar/effect/EffectPropertyPanel.cxx
index 44b825aa77f4..af65ce5efce2 100644
--- a/svx/source/sidebar/effect/EffectPropertyPanel.cxx
+++ b/svx/source/sidebar/effect/EffectPropertyPanel.cxx
@@ -37,7 +37,7 @@ EffectPropertyPanel::EffectPropertyPanel(weld::Widget* 
pParent, SfxBindings* pBi
   m_xBuilder->weld_metric_spin_button("LB_GLOW_TRANSPARENCY", 
FieldUnit::PERCENT))
 , mxFTRadiusSoftEdge(m_xBuilder->weld_label("radiussoftedge"))
 , mxFTRadiusGlow(m_xBuilder->weld_label("radiusglow"))
-, mxFTColor(m_xBuilder->weld_label("color"))
+, mxFTColor(m_xBuilder->weld_label("glowcolorlabel"))
 , 
mxSoftEdgeRadius(m_xBuilder->weld_metric_spin_button("SB_SOFTEDGE_RADIUS", 
FieldUnit::POINT))
 {
 Initialize();
diff --git a/svx/uiconfig/ui/sidebareffect.ui b/svx/uiconfig/ui/sidebareffect.ui
index 0e633242cd5c..23997adee33e 100644
--- a/svx/uiconfig/ui/sidebareffect.ui
+++ b/svx/uiconfig/ui/sidebareffect.ui
@@ -77,7 +77,7 @@
   
 
 
-  
+  
 True
 False
 Color:
@@ -239,7 +239,7 @@
   
 
   
-  
+  
   
   
 
___
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' - sfx2/source

2021-07-09 Thread Szymon Kłos (via logerrit)
 sfx2/source/control/unoctitm.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 5229bfbc73f9051f59d50502921709006a14d7ea
Author: Szymon Kłos 
AuthorDate: Fri Jul 9 17:33:31 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Jul 9 17:55:11 2021 +0200

jsdialog: send GlowColor state updates

Change-Id: I27e14610d7df231f05bd27ad3ce121361e198c2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118693
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index f8039ca9d4b7..256ed9f744b3 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1071,7 +1071,8 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, 
SfxViewFrame* pViewFra
  aEvent.FeatureURL.Path == "CharBackColor" ||
  aEvent.FeatureURL.Path == "Color" ||
  aEvent.FeatureURL.Path == "FontColor" ||
- aEvent.FeatureURL.Path == "FrameLineColor")
+ aEvent.FeatureURL.Path == "FrameLineColor" ||
+ aEvent.FeatureURL.Path == "GlowColor")
 {
 sal_Int32 nColor = -1;
 aEvent.State >>= nColor;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-09 Thread Jean-Pierre Ledure (via logerrit)
 wizards/source/scriptforge/SF_Array.xba  |4 -
 wizards/source/scriptforge/SF_Utils.xba  |   27 --
 wizards/source/scriptforge/python/scriptforge.py |8 +-
 wizards/source/sfdocuments/SF_Base.xba   |   63 +++
 wizards/source/sfdocuments/SF_Calc.xba   |   24 --
 wizards/source/sfdocuments/SF_Document.xba   |   92 +++
 wizards/source/sfdocuments/SF_Writer.xba |8 ++
 7 files changed, 203 insertions(+), 23 deletions(-)

New commits:
commit 90d33528ceb9d3a6b0edda708ca102c16c320b0d
Author: Jean-Pierre Ledure 
AuthorDate: Fri Jul 9 14:32:05 2021 +0200
Commit: Jean-Pierre Ledure 
CommitDate: Fri Jul 9 17:46:07 2021 +0200

ScriptForge - (SF_Document) new SetPrinter() method

The SetPrinter() method is applicable to any document type,
except Base documents.
It is also applicable to Base form documents with an
additional "FormDocument" argument.

Implemented in Basic and in Python.

The method defines next printer settings:
- the printer name
- the orientation
- the paper format

The settings are kept per document or form document

To bypass array management troubles in Basic,
the SF_Utils._SetPropertyValue() Sub is converted to a Function.
(no user scripts impact, only internal use).

Change-Id: I39290d924646ff3b2a65a6d9282f1265ca7543b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118685
Tested-by: Jean-Pierre Ledure 
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure 

diff --git a/wizards/source/scriptforge/SF_Array.xba 
b/wizards/source/scriptforge/SF_Array.xba
index 9930574b6b10..49bdab14770a 100644
--- a/wizards/source/scriptforge/SF_Array.xba
+++ b/wizards/source/scriptforge/SF_Array.xba
@@ -1008,8 +1008,8 @@ Public Function IndexOf(Optional ByRef Array_1D As 
Variant _
 ''' 
SF_Array.IndexOf(Array("A","B","c","D"),
 "C", SortOrder := "ASC") returns 2
 ''' 
SF_Array.IndexOf(Array("A","B","c","D"),
 "C", CaseSensitive := True) returns -1
 
-Dim vFindItem() As Variant '  2-items array (0) = 
True if found, (1) = Index where found
-Dim lIndex As Long '  Return value
+Dim vFindItem As Variant   '  2-items array (0) = 
True if found, (1) = Index where found
+Dim lIndex As Long '  Return value
 Dim iToFindType As Integer '  VarType of ToFind
 Const cstThisSub = "Array.IndexOf"
 Const cstSubArgs = "Array_1D, ToFind, [CaseSensitive=False], 
[SortOrder=|""ASC""|""DESC""]"
diff --git a/wizards/source/scriptforge/SF_Utils.xba 
b/wizards/source/scriptforge/SF_Utils.xba
index be2a9fd91cc7..2f2044cafcc8 100644
--- a/wizards/source/scriptforge/SF_Utils.xba
+++ b/wizards/source/scriptforge/SF_Utils.xba
@@ -586,35 +586,40 @@ Const cstContinue = "…" '  
Unicode continuation char U+2026
 End Function   '  ScriptForge.SF_Utils._ReprValues
 
 REM 
-
-Public Sub _SetPropertyValue(ByRef pvPropertyValue As Variant _
+Public Function _SetPropertyValue(ByVal pvPropertyValue As Variant _
, ByVal 
psName As String _
, ByRef 
pvValue As Variant _
-   )
-''' Update the 1st argument (passed by reference), which is 
an array of property values
-''' If the property psName exists, update it with pvValue, 
otherwise create it on top of the array
+   ) As 
variant
+''' Return the 1st argument (passed by reference), which is 
an array of property values
+''' If the property psName exists, update it with pvValue, 
otherwise create it on top of the returned array
 
 Dim oPropertyValue As New com.sun.star.beans.PropertyValue
 Dim lIndex As Long '  Found entry
 Dim vValue As Variant  '  Alias of pvValue
+Dim vProperties As Variant '  Alias of pvPropertyValue
 Dim i As Long
 
lIndex = -1
-   For i = 0 To UBound(pvPropertyValue)
-   If pvPropertyValue(i).Name = psName Then
+   vProperties = pvPropertyValue
+   For i = 0 To UBound(vProperties)
+   If vProperties(i).Name = psName Then
lIndex = i
Exit For
End If
Next i
If lIndex < 0 Then   '  Not found
-   lIndex = UBound(pvPropertyValue) + 1
-   ReDim Preserve pvPropertyValue(0 To lIndex)
+   lIndex = UBound(vProperties) + 1
+   ReDim Preserve vProperties(0 To lIndex)
Set oPropertyValue = SF_Utils._MakePropertyValue(psNa

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

2021-07-09 Thread Michael Stahl (via logerrit)
 toolkit/source/awt/vclxtoolkit.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit ffeeb78118a887419c5f33bb5311f0e2ddae463c
Author: Michael Stahl 
AuthorDate: Fri Jul 9 14:25:28 2021 +0200
Commit: Michael Stahl 
CommitDate: Fri Jul 9 17:38:50 2021 +0200

toolkit: initialise new VCLXTopWindow properly

VCLXToolkit::createSystemChild() doesn't init WindowImpl::mpVCLXWindow
and so it can happen that another VCLXTopWindow instance is created
later for the same Window.

Change-Id: I9ac654dceb15ea619597f2b8d9d1f9282aa1dfc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118684
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit addd7e7835097043efda52594f3a34219dbd1063)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118712

diff --git a/toolkit/source/awt/vclxtoolkit.cxx 
b/toolkit/source/awt/vclxtoolkit.cxx
index 10eb7f8019e2..070d579d92bb 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -2048,6 +2048,7 @@ css::uno::Reference< css::awt::XWindowPeer > 
VCLXToolkit::createSystemChild( con
 SolarMutexGuard aGuard;
 pPeer->SetWindow( pChildWindow );
 xPeer = pPeer;
+pChildWindow->SetWindowPeer(xPeer, pPeer.get());
 }
 
 return xPeer;
___
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/libreoffice-7.2.0.1'

2021-07-09 Thread Christian Lohmaier (via logerrit)
Tag 'libreoffice-7.2.0.1' created by Christian Lohmaier 
 at 2021-07-09 15:31 +

Tag libreoffice-7.2.0.1
-BEGIN PGP SIGNATURE-

iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmDoa70ACgkQ9DSh76/u
rqMDEw/+P0ZbJIfWtDANfGYZem6Lrgw/ec48am03bqVQNkxUm+tf9TN3bmhk7Yv0
EZXkDhgiG/mJOcpaaYfOr71FpEUYy1Rm70pGmPevG6o8N57Iv1mugqkw/IkuHH9J
fWbxpZ530fnwqw65pkUI2+Gws6ZlCdXmzDJ3MgtA+J9qDYoXhOQOZFKHXEtOcBuU
4YkdYaEvBCeR8pF6n2AUiXOWV2/DqTSU2UMiISSmUwsYimu0oJIgt9vBlxf7CB3T
8Gok3CIkKEJkTOQKUkeHivn4iTf9IYQhFezBU2U+0fK7iyOhwpwHJoAatOxW1NDu
XIXHapvRNdZoUOMBW5AU88BnI/Xr3YnaXxZUjl/EMGt8MTJA2kTj+qUvOz1zAzZR
+3D58EuXFCi3qCy2y9RHJ26l9P/TXLDrAn8MGeJAWvNOz6hlvLd31d4F0+RUQwPL
pEic/GwBJZeoZLoaNd3N+MYF5Jva1oVisudgpuywgY3G/GJsjX98mLqbPOawS2YD
9zAjfBN3gN1aDdtBZcP6KfdRpeh3An+TmtV1TypPd4NPx7VUaF1QgGTj/FG2sSCw
KF8I6hMiwqk0yVZqe857TgUTDoPVm1NUbWGlvlBNvl7Kf0xDLo8rZ1pF8pBQIhKe
xTnv74rytUvBs46T7FXY3uRG/W0/W8fYWEcVN4YEJ8nhGk8vB1s=
=bzS0
-END PGP SIGNATURE-

Changes since libreoffice-7-2-branch-point-208:
---
 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/libreoffice-7.2.0.1'

2021-07-09 Thread Christian Lohmaier (via logerrit)
Tag 'libreoffice-7.2.0.1' created by Christian Lohmaier 
 at 2021-07-09 15:31 +

Tag libreoffice-7.2.0.1
-BEGIN PGP SIGNATURE-

iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmDoa70ACgkQ9DSh76/u
rqOD9g/9FzawnCdNV3VSHOneQBC7FWHrUf5IwvyFaxbJCU2d9V0WPJMFKJyZXLxh
VN9p04oO3DaoPekLlZ+aTC4QPTyANlMHb84fHHxRpCz/YhUu2ZczsYAx/TlzDDMb
BjaUQLCYJ3GD8kx1FhcG4hLw/ENrtMg7lBT0Yd4Akf8ZNk2yKhfEl+w6A1ezwhTg
Y68zMdBAUeY2kcX5uxdHpuBGFZB8q1tPZxyXSvCMBBF42sz3ZSslnZvqkJWu17LR
ZVzgqT6C42eCxuLdoE2G1AkaZtF0amDvQg3MbKIRipzQMal0I+RGc0WXdnCAKYBI
YUuLJHrXo67WJ1xKMZwxUc//OtSN11olEhgf/mh2cZq+KKrP+JPZLEIqv7CFwmjt
pRvcQ8s4dJP/JNb0EFRO5zfQKLfUhzBaMNYoe1PP/wn/1gSZFLn0Qnv+Dnv4AOxa
nlMhbAZDXkHwsMGvbMdJrjosZYLY6vCoikDlgNod037dPHISegMTZ4x7txZ7Hw6G
tdOWoluw9rRDDWkq/tmrXHT9N38pKpHVYrd6EIEFFA1hBfF+Jvn32/ROU1ylviIx
NdivHww/B9jdDQ7qJ6RS9xxbYQnKmz20g1leiX1Z9oNPfGOWPGQphZ234pyD7zAp
wPx3JMo9hiUXwwqWUDtIlFkxDzEk2gbyybLe/GtNSg/mzTP0VRM=
=QjJ6
-END PGP SIGNATURE-

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


[Libreoffice-commits] help.git: Changes to 'refs/tags/libreoffice-7.2.0.1'

2021-07-09 Thread Christian Lohmaier (via logerrit)
Tag 'libreoffice-7.2.0.1' created by Christian Lohmaier 
 at 2021-07-09 15:31 +

Tag libreoffice-7.2.0.1
-BEGIN PGP SIGNATURE-

iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmDoa70ACgkQ9DSh76/u
rqO9kg/8DdXY5xnXEDAzZDURLjQDpOv8ITKAbQFQbgsXPuyUdyTN58F92cwQpmuL
plD0QftrOgQqGitewkcaOX9DpnQ5TbNSlqgaY1C1Pj8r5jgoodYJ+xwfLDmL1/zY
0E4zNh+FlCjwVhVsOePo6RrfT8Sm+ql9ONjouzGUXSJKLhzDsY5O97ErATMC3t+H
lyO5u6PBIOXihYsIE0oc8vaFHXODGsS6GocunCBVjyjQ2ytQi69uX/kMfja+at9P
uDWw4FVwgo16OQoTVqpvDVn8zcnLlXIHnVIajpRXYB6cMPwTaJaP6d10/48w3GM0
x2iTK4nVRDePKkmgfRNwxZcVaTiMnB7J+j5K/Wpxmvalv7vqBcqmqyCiln2cUgSO
P+knTHJLt4fkyy3JfO5XarMLVMmsQAdOHgH1ujUkzsKKo+6pBEmer9LnXg4wznoE
vFLVvUvHuCV9uGjhNu938uPzSoE9OVawTvOs/dmr5FLXYxbnjM5MmyxqyfJhoe12
5vSFVTAivbYDlr0QLannnpvzEjMcZdiqHaWlSAstZP2oySoV6acDZr+tsCfOs9Kt
2aaP/yhQBXsBikZPBDrBVv58ww2R55w4A+KdKUHh7/oN8BdaMAAMzYZpZRGSDG0Q
YFluiJGc1C64aOYX5+vTrSyabJ990xSKPnpRplHXYa+eFv2A+HM=
=HIz9
-END PGP SIGNATURE-

Changes since libreoffice-7-2-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/libreoffice-7.2.0.1'

2021-07-09 Thread Christian Lohmaier (via logerrit)
Tag 'libreoffice-7.2.0.1' created by Christian Lohmaier 
 at 2021-07-09 15:31 +

Tag libreoffice-7.2.0.1
-BEGIN PGP SIGNATURE-

iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmDoa7kACgkQ9DSh76/u
rqOl8g/6AvA++2SXONq4/G7CgDPyJCJQR6fY+Vl+z3SHkSLgdfNZiZ+8dMOcJvEQ
qfWzf8xA+QWE929z545wL9Mys8Oo1LaXbR8DNYVM137kKetnRrNWzdy3FsuKX5Dy
MXhIdX8URD5hA7hYK+pILuwP8XFysPD/V/fSAtg1WRtOfxVJqn1xV3QxEvJiY9rJ
biXxYxBduDhbMnXzlrFKRTFijShPxG9OgbWZ3R6CxlPbJbfaNWthemd6ZORhjOqQ
K0U9JnMrUJoM6ftFd7PddnFtWi0IuIterGi9Kp6YlWuipbaB6nzcAcpGe21wJqr+
UOlWbEaSyR8JXbItJUBvA6JRPYh66iO0FALoW9tkyPc7MqWYryA8KwSc794FLaH6
/0DFdHmKNT2+YNvdSWwFzuPNt0zjKPWXBMxwaSCKwryXLf+z8N08AYj2CIAk2AWj
1SIU2su91DZVVwykl7rbV54eZkbVaswd0D9uyUAjCelCVWseGkewbRVnMcL4bS1q
LNHfEg+rLCX27CGI2RwCVd1jbFCxHM/RYXFie+Y/FIKiPxOFM/gCQghnxLDGWtqf
vxnRD6zTDCXFXL14TzXha+Uq48FZv/w8RcSt5F6nOoJHJay1JjgRz1UAm9cgK1/0
5Cw14sYZpnJDTY79roJIrEvt+P2y5HMYNshwlBoyQb6iNZaGCSE=
=1uC6
-END PGP SIGNATURE-

Changes since libreoffice-7-2-branch-point-9:
---
 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 'libreoffice-7-2' - configure.ac

2021-07-09 Thread Christian Lohmaier (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c7e0d552915667ab364ec719f2e6f79f9cb1b78c
Author: Christian Lohmaier 
AuthorDate: Fri Jul 9 17:33:26 2021 +0200
Commit: Christian Lohmaier 
CommitDate: Fri Jul 9 17:33:26 2021 +0200

bump product version to 7.2.0.1.0+

Change-Id: I2f5ce8853d7d2578e1a2694ecff610d573fc9dfa

diff --git a/configure.ac b/configure.ac
index 1bd3fb28e22c..36fd7876307a 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([LibreOffice],[7.2.0.0.beta1+],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[7.2.0.1.0+],[],[],[http://documentfoundation.org/])
 
 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: sw/source

2021-07-09 Thread Caolán McNamara (via logerrit)
 sw/source/filter/ww8/ww8scan.cxx |   23 +--
 1 file changed, 9 insertions(+), 14 deletions(-)

New commits:
commit e6d73df65223e738de6e707eea573b41785198fc
Author: Caolán McNamara 
AuthorDate: Fri Jul 9 14:39:08 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 9 17:08:26 2021 +0200

make this a little more readable

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

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 4ec169dfb187..657cf60026c9 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -7314,12 +7314,13 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib const & rFib )
 if ((eEnc == RTL_TEXTENCODING_SYMBOL) || (eEnc == 
RTL_TEXTENCODING_DONTKNOW))
 eEnc = RTL_TEXTENCODING_MS_1252;
 
-sal_Int32 n = getStringLength(pVer2, 1 + 2, pEnd);
+const size_t nStringOffset = 1 + 2;
+sal_Int32 n = getStringLength(pVer2, nStringOffset, pEnd);
 if (n == -1) {
 break;
 }
 p->sFontname = OUString(
-reinterpret_cast(pVer2 + 1 + 2), n, eEnc);
+reinterpret_cast(pVer2 + nStringOffset), n, 
eEnc);
 pVer2 = pVer2 + p->aFFNBase.cbFfnM1 + 1;
 }
 nMax = i;
@@ -7365,26 +7366,20 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib const & rFib )
 rtl_TextEncoding eEnc = WW8Fib::GetFIBCharset(p->aFFNBase.chs, 
rFib.m_lid);
 if ((eEnc == RTL_TEXTENCODING_SYMBOL) || (eEnc == 
RTL_TEXTENCODING_DONTKNOW))
 eEnc = RTL_TEXTENCODING_MS_1252;
-sal_Int32 n = getStringLength(
-pVer6, offsetof(WW8_FFN_Ver6, szFfn), pEnd);
+const size_t nStringOffset = offsetof(WW8_FFN_Ver6, szFfn);
+sal_Int32 n = getStringLength(pVer6, nStringOffset, pEnd);
 if (n == -1) {
 break;
 }
-p->sFontname = OUString(
-reinterpret_cast(
-pVer6 + offsetof(WW8_FFN_Ver6, szFfn)),
-n, eEnc);
+p->sFontname = OUString(reinterpret_cast(pVer6 + 
nStringOffset), n, eEnc);
 if (p->aFFNBase.ibszAlt && p->aFFNBase.ibszAlt < maxStrSize) 
//don't start after end of string
 {
-n = getStringLength(
-pVer6, offsetof(WW8_FFN_Ver6, szFfn) + 
p->aFFNBase.ibszAlt,
-pEnd);
+const size_t nAltStringOffset = offsetof(WW8_FFN_Ver6, 
szFfn) + p->aFFNBase.ibszAlt;
+n = getStringLength(pVer6, nAltStringOffset, pEnd);
 if (n == -1) {
 break;
 }
-p->sFontname += ";" + OUString(
-reinterpret_cast(
-pVer6 + offsetof(WW8_FFN_Ver6, szFfn) + 
p->aFFNBase.ibszAlt),
+p->sFontname += ";" + OUString(reinterpret_cast(pVer6 + nAltStringOffset),
 n, eEnc);
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-09 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkframe.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 9fb3742df0a65238197e760a85f3f4a0e58ec31b
Author: Caolán McNamara 
AuthorDate: Fri Jul 9 11:35:17 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 9 16:49:28 2021 +0200

use GTK_PHASE_TARGET instead of GTK_PHASE_BUBBLE

so we don't get called if the event happened in another widget hosted
inside this widget

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

diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index 71b8673ee11e..3b23b5c2a07e 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -961,6 +961,10 @@ void GtkSalFrame::InitCommon()
 #else
 GtkGesture *pClick = gtk_gesture_click_new();
 gtk_gesture_single_set_button(GTK_GESTURE_SINGLE(pClick), 0);
+// use GTK_PHASE_TARGET instead of default GTK_PHASE_BUBBLE because I don't
+// want click events in gtk widgets inside the overlay, e.g. the font size
+// combobox GtkEntry in the toolbar, to be propagated down to this widget
+gtk_event_controller_set_propagation_phase(GTK_EVENT_CONTROLLER(pClick), 
GTK_PHASE_TARGET);
 gtk_widget_add_controller(pEventWidget, GTK_EVENT_CONTROLLER(pClick));
 g_signal_connect(pClick, "pressed", G_CALLBACK(gesturePressed), this);
 g_signal_connect(pClick, "released", G_CALLBACK(gestureReleased), this);
@@ -969,6 +973,7 @@ void GtkSalFrame::InitCommon()
 g_signal_connect(pMotionController, "motion", G_CALLBACK(signalMotion), 
this);
 g_signal_connect(pMotionController, "enter", G_CALLBACK(signalEnter), 
this);
 g_signal_connect(pMotionController, "leave", G_CALLBACK(signalLeave), 
this);
+gtk_event_controller_set_propagation_phase(pMotionController, 
GTK_PHASE_TARGET);
 gtk_widget_add_controller(pEventWidget, pMotionController);
 
 GtkEventController* pScrollController = 
gtk_event_controller_scroll_new(GTK_EVENT_CONTROLLER_SCROLL_BOTH_AXES);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-09 Thread Michael Stahl (via logerrit)
 toolkit/source/awt/vclxtoolkit.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit addd7e7835097043efda52594f3a34219dbd1063
Author: Michael Stahl 
AuthorDate: Fri Jul 9 14:25:28 2021 +0200
Commit: Michael Stahl 
CommitDate: Fri Jul 9 16:39:27 2021 +0200

toolkit: initialise new VCLXTopWindow properly

VCLXToolkit::createSystemChild() doesn't init WindowImpl::mpVCLXWindow
and so it can happen that another VCLXTopWindow instance is created
later for the same Window.

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

diff --git a/toolkit/source/awt/vclxtoolkit.cxx 
b/toolkit/source/awt/vclxtoolkit.cxx
index 10eb7f8019e2..070d579d92bb 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -2048,6 +2048,7 @@ css::uno::Reference< css::awt::XWindowPeer > 
VCLXToolkit::createSystemChild( con
 SolarMutexGuard aGuard;
 pPeer->SetWindow( pChildWindow );
 xPeer = pPeer;
+pChildWindow->SetWindowPeer(xPeer, pPeer.get());
 }
 
 return xPeer;
___
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' - translations

2021-07-09 Thread Christian Lohmaier (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d869ef40f649f200de9e6d6d2a99ce35f1391eea
Author: Christian Lohmaier 
AuthorDate: Fri Jul 9 16:21:53 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Fri Jul 9 16:21:53 2021 +0200

Update git submodules

* Update translations from branch 'libreoffice-7-2'
  to ff1d84e8948e2493e0ac9e9acdb4f8e0dc961605
  - update translations for 7.2.0 rc1/master

and force-fix errors using pocheck

Change-Id: I71c26192dc4a8508810a8fe67149ad0ec9dc2874
(cherry picked from commit 299af21d9cc4faa4606f39d897ca9b91c8fd31f6)

diff --git a/translations b/translations
index aa48c56ee2ce..ff1d84e8948e 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit aa48c56ee2ce8b011eb55157b3bbeb8f5ea0700b
+Subproject commit ff1d84e8948e2493e0ac9e9acdb4f8e0dc961605
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] translations.git: Branch 'libreoffice-7-2' - source/af source/cy source/es source/eu source/fi source/gug source/nb source/nl source/nn source/pl source/pt-BR source/tr source/zh

2021-07-09 Thread Christian Lohmaier (via logerrit)
 source/af/svx/messages.po   |   28 +++---
 source/cy/svx/messages.po   |   30 +++---
 source/es/cui/messages.po   |8 -
 source/es/helpcontent2/source/text/sbasic/shared/03.po  |8 -
 source/es/helpcontent2/source/text/sdraw/guide.po   |6 -
 source/es/helpcontent2/source/text/swriter/01.po|8 -
 source/es/svx/messages.po   |6 -
 source/eu/helpcontent2/source/text/sbasic/shared.po |   16 +--
 source/eu/helpcontent2/source/text/scalc/01.po  |   10 +-
 source/fi/filter/messages.po|   11 +-
 source/fi/sc/messages.po|   35 ---
 source/fi/wizards/messages.po   |8 -
 source/gug/helpcontent2/source/text/sbasic/shared/03.po |8 -
 source/gug/helpcontent2/source/text/sdraw/guide.po  |6 -
 source/gug/helpcontent2/source/text/swriter/01.po   |8 -
 source/nb/svx/messages.po   |   74 +---
 source/nl/helpcontent2/source/text/shared/02.po |   52 +--
 source/nn/formula/messages.po   |4 
 source/nn/helpcontent2/source/text/shared/01.po |   30 +++---
 source/nn/svx/messages.po   |   40 
 source/nn/sw/messages.po|   74 
 source/pl/svx/messages.po   |   28 +++---
 source/pt-BR/svx/messages.po|   28 +++---
 source/tr/sc/messages.po|   30 +++---
 source/tr/starmath/messages.po  |   36 +++
 source/zh-TW/cui/messages.po|   10 +-
 26 files changed, 312 insertions(+), 290 deletions(-)

New commits:
commit ff1d84e8948e2493e0ac9e9acdb4f8e0dc961605
Author: Christian Lohmaier 
AuthorDate: Fri Jul 9 16:11:43 2021 +0200
Commit: Christian Lohmaier 
CommitDate: Fri Jul 9 16:21:43 2021 +0200

update translations for 7.2.0 rc1/master

and force-fix errors using pocheck

Change-Id: I71c26192dc4a8508810a8fe67149ad0ec9dc2874
(cherry picked from commit 299af21d9cc4faa4606f39d897ca9b91c8fd31f6)

diff --git a/source/af/svx/messages.po b/source/af/svx/messages.po
index 6aa13548bfe..927d72c375f 100644
--- a/source/af/svx/messages.po
+++ b/source/af/svx/messages.po
@@ -4,7 +4,7 @@ msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: 
https://bugs.libreoffice.org/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED&component=UI\n";
 "POT-Creation-Date: 2021-07-08 10:36+0200\n"
-"PO-Revision-Date: 2021-07-08 08:50+\n"
+"PO-Revision-Date: 2021-07-09 13:43+\n"
 "Last-Translator: Paul Roos \n"
 "Language-Team: Afrikaans 
\n"
 "Language: af\n"
@@ -13,7 +13,7 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "X-Accelerator-Marker: ~\n"
-"X-Generator: LibreOffice\n"
+"X-Generator: Weblate 4.6.2\n"
 "X-POOTLE-MTIME: 1560976220.00\n"
 
 #. 3GkZj
@@ -5218,7 +5218,7 @@ msgstr "Lang punt"
 #: include/svx/strings.hrc:913
 msgctxt "RID_SVXSTR_DASH2"
 msgid "Dot (Rounded)"
-msgstr ""
+msgstr "Dot (Gerond)"
 
 #. 2X7pw
 #: include/svx/strings.hrc:914
@@ -5326,67 +5326,67 @@ msgstr "Lyn met fyn punte"
 #: include/svx/strings.hrc:931
 msgctxt "RID_SVXSTR_DASH20"
 msgid "Dash Dot"
-msgstr ""
+msgstr "Strepie Dot"
 
 #. 5ZGZy
 #: include/svx/strings.hrc:932
 msgctxt "RID_SVXSTR_DASH21"
 msgid "Long Dot (Rounded)"
-msgstr ""
+msgstr "Lange Dot (Gerond)"
 
 #. Ac2F2
 #: include/svx/strings.hrc:933
 msgctxt "RID_SVXSTR_DASH22"
 msgid "Dash Dot Dot"
-msgstr ""
+msgstr "Strepie Dot Dot"
 
 #. mWMXG
 #: include/svx/strings.hrc:934
 msgctxt "RID_SVXSTR_DASH23"
 msgid "Dash (Rounded)"
-msgstr ""
+msgstr "Strepie (Gerond)"
 
 #. B6fd2
 #: include/svx/strings.hrc:935
 msgctxt "RID_SVXSTR_DASH24"
 msgid "Long Dash (Rounded)"
-msgstr ""
+msgstr "Lang Strepie (Gerond)"
 
 #. ds2VE
 #: include/svx/strings.hrc:936
 msgctxt "RID_SVXSTR_DASH25"
 msgid "Double Dash (Rounded)"
-msgstr ""
+msgstr "Dubbel Strepie (Gerond)"
 
 #. qtCkm
 #: include/svx/strings.hrc:937
 msgctxt "RID_SVXSTR_DASH26"
 msgid "Dash Dot (Rounded)"
-msgstr ""
+msgstr "Strepie Dot (Gerond)"
 
 #. psNix
 #: include/svx/strings.hrc:938
 msgctxt "RID_SVXSTR_DASH27"
 msgid "Long Dash Dot (Rounded)"
-msgstr ""
+msgstr "Lang Strepie Dot (Gerond)"
 
 #. FWkBJ
 #: include/svx/strings.hrc:939
 msgctxt "RID_SVXSTR_DASH28"
 msgid "Double Dash Dot (Rounded)"
-msgstr ""
+msgstr "Dubbel Strepie Dot (Gerond)"
 
 #. eiCNz
 #: include/svx/strings.hrc:940
 msgctxt "RID_SVXSTR_DASH29"
 msgid "Dash Dot Dot (Rounded)"
-msgstr ""
+msgstr "Strepie Dot Dot (Gerond)"
 
 #. BbE5B
 #: include/svx/strings.hrc:941
 msgctxt "RID_SVXSTR_DASH30"
 msgid "Double Dash Dot Dot (Round

[Libreoffice-commits] core.git: translations

2021-07-09 Thread Christian Lohmaier (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 830ed2e0706a38a6a5debf41a41347b1f14a1d5b
Author: Christian Lohmaier 
AuthorDate: Fri Jul 9 16:19:07 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Fri Jul 9 16:19:07 2021 +0200

Update git submodules

* Update translations from branch 'master'
  to 299af21d9cc4faa4606f39d897ca9b91c8fd31f6
  - update translations for 7.2.0 rc1/master

and force-fix errors using pocheck

Change-Id: I71c26192dc4a8508810a8fe67149ad0ec9dc2874

diff --git a/translations b/translations
index 6e44dc455cec..299af21d9cc4 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 6e44dc455cecec8e0109243bf7e2398e4dc1306b
+Subproject commit 299af21d9cc4faa4606f39d897ca9b91c8fd31f6
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] translations.git: source/af source/cy source/es source/eu source/fi source/gug source/nb source/nl source/nn source/pl source/pt-BR source/tr source/zh-TW

2021-07-09 Thread Christian Lohmaier (via logerrit)
 source/af/svx/messages.po   |   28 +++---
 source/cy/svx/messages.po   |   30 +++---
 source/es/cui/messages.po   |8 -
 source/es/helpcontent2/source/text/sbasic/shared/03.po  |8 -
 source/es/helpcontent2/source/text/sdraw/guide.po   |6 -
 source/es/helpcontent2/source/text/swriter/01.po|8 -
 source/es/svx/messages.po   |6 -
 source/eu/helpcontent2/source/text/sbasic/shared.po |   16 +--
 source/eu/helpcontent2/source/text/scalc/01.po  |   10 +-
 source/fi/filter/messages.po|   11 +-
 source/fi/sc/messages.po|   35 ---
 source/fi/wizards/messages.po   |8 -
 source/gug/helpcontent2/source/text/sbasic/shared/03.po |8 -
 source/gug/helpcontent2/source/text/sdraw/guide.po  |6 -
 source/gug/helpcontent2/source/text/swriter/01.po   |8 -
 source/nb/svx/messages.po   |   74 +---
 source/nl/helpcontent2/source/text/shared/02.po |   52 +--
 source/nn/formula/messages.po   |4 
 source/nn/helpcontent2/source/text/shared/01.po |   30 +++---
 source/nn/svx/messages.po   |   40 
 source/nn/sw/messages.po|   74 
 source/pl/svx/messages.po   |   28 +++---
 source/pt-BR/svx/messages.po|   28 +++---
 source/tr/sc/messages.po|   30 +++---
 source/tr/starmath/messages.po  |   36 +++
 source/zh-TW/cui/messages.po|   10 +-
 26 files changed, 312 insertions(+), 290 deletions(-)

New commits:
commit 299af21d9cc4faa4606f39d897ca9b91c8fd31f6
Author: Christian Lohmaier 
AuthorDate: Fri Jul 9 16:11:43 2021 +0200
Commit: Christian Lohmaier 
CommitDate: Fri Jul 9 16:11:43 2021 +0200

update translations for 7.2.0 rc1/master

and force-fix errors using pocheck

Change-Id: I71c26192dc4a8508810a8fe67149ad0ec9dc2874

diff --git a/source/af/svx/messages.po b/source/af/svx/messages.po
index 6aa13548bfe..927d72c375f 100644
--- a/source/af/svx/messages.po
+++ b/source/af/svx/messages.po
@@ -4,7 +4,7 @@ msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: 
https://bugs.libreoffice.org/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED&component=UI\n";
 "POT-Creation-Date: 2021-07-08 10:36+0200\n"
-"PO-Revision-Date: 2021-07-08 08:50+\n"
+"PO-Revision-Date: 2021-07-09 13:43+\n"
 "Last-Translator: Paul Roos \n"
 "Language-Team: Afrikaans 
\n"
 "Language: af\n"
@@ -13,7 +13,7 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 "X-Accelerator-Marker: ~\n"
-"X-Generator: LibreOffice\n"
+"X-Generator: Weblate 4.6.2\n"
 "X-POOTLE-MTIME: 1560976220.00\n"
 
 #. 3GkZj
@@ -5218,7 +5218,7 @@ msgstr "Lang punt"
 #: include/svx/strings.hrc:913
 msgctxt "RID_SVXSTR_DASH2"
 msgid "Dot (Rounded)"
-msgstr ""
+msgstr "Dot (Gerond)"
 
 #. 2X7pw
 #: include/svx/strings.hrc:914
@@ -5326,67 +5326,67 @@ msgstr "Lyn met fyn punte"
 #: include/svx/strings.hrc:931
 msgctxt "RID_SVXSTR_DASH20"
 msgid "Dash Dot"
-msgstr ""
+msgstr "Strepie Dot"
 
 #. 5ZGZy
 #: include/svx/strings.hrc:932
 msgctxt "RID_SVXSTR_DASH21"
 msgid "Long Dot (Rounded)"
-msgstr ""
+msgstr "Lange Dot (Gerond)"
 
 #. Ac2F2
 #: include/svx/strings.hrc:933
 msgctxt "RID_SVXSTR_DASH22"
 msgid "Dash Dot Dot"
-msgstr ""
+msgstr "Strepie Dot Dot"
 
 #. mWMXG
 #: include/svx/strings.hrc:934
 msgctxt "RID_SVXSTR_DASH23"
 msgid "Dash (Rounded)"
-msgstr ""
+msgstr "Strepie (Gerond)"
 
 #. B6fd2
 #: include/svx/strings.hrc:935
 msgctxt "RID_SVXSTR_DASH24"
 msgid "Long Dash (Rounded)"
-msgstr ""
+msgstr "Lang Strepie (Gerond)"
 
 #. ds2VE
 #: include/svx/strings.hrc:936
 msgctxt "RID_SVXSTR_DASH25"
 msgid "Double Dash (Rounded)"
-msgstr ""
+msgstr "Dubbel Strepie (Gerond)"
 
 #. qtCkm
 #: include/svx/strings.hrc:937
 msgctxt "RID_SVXSTR_DASH26"
 msgid "Dash Dot (Rounded)"
-msgstr ""
+msgstr "Strepie Dot (Gerond)"
 
 #. psNix
 #: include/svx/strings.hrc:938
 msgctxt "RID_SVXSTR_DASH27"
 msgid "Long Dash Dot (Rounded)"
-msgstr ""
+msgstr "Lang Strepie Dot (Gerond)"
 
 #. FWkBJ
 #: include/svx/strings.hrc:939
 msgctxt "RID_SVXSTR_DASH28"
 msgid "Double Dash Dot (Rounded)"
-msgstr ""
+msgstr "Dubbel Strepie Dot (Gerond)"
 
 #. eiCNz
 #: include/svx/strings.hrc:940
 msgctxt "RID_SVXSTR_DASH29"
 msgid "Dash Dot Dot (Rounded)"
-msgstr ""
+msgstr "Strepie Dot Dot (Gerond)"
 
 #. BbE5B
 #: include/svx/strings.hrc:941
 msgctxt "RID_SVXSTR_DASH30"
 msgid "Double Dash Dot Dot (Rounded)"
-msgstr ""
+msgstr "Dubbel Strepie Dot Dot (Gerond)"
 
 #. iKAwD
 #:

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

2021-07-09 Thread Justin Luth (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport16.cxx|4 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit ba7dc3413388449303745fdcbaa7e4ac478cd5a2
Author: Justin Luth 
AuthorDate: Fri Apr 30 15:37:33 2021 +0200
Commit: Justin Luth 
CommitDate: Fri Jul 9 16:14:13 2021 +0200

tdf#141964 writerfilter CN: also insert inherited listLevels

If direct formatting specifies a numId, but does not provide
a listLevel, the listLevel can be inherited from styles.
Since this is a NOT-OVERWRITE, it is fine to try to
insert again even if direct formatting has already
inserted a level.

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index c65e59e2ff78..120c312969d2 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -178,6 +178,10 @@ 
DECLARE_OOXMLEXPORT_TEST(testTdf141966_chapterNumberTortureTest, "tdf141966_chap
 xPara.set(getParagraph(11, "direct formatting - Body listLvl(9)."), 
uno::UNO_QUERY);
 CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty(xPara, 
"ListLabelString"));
 
+xPara.set(getParagraph(12, "direct numId, inherit listLvl."), 
uno::UNO_QUERY);
+//CPPUNIT_ASSERT_EQUAL(OUString("2nd.ii.a.1.I"), 
getProperty(xPara, "ListLabelString"));
+CPPUNIT_ASSERT_EQUAL(sal_Int16(4), getProperty(xPara, 
"NumberingLevel")); // Level 5
+
 xPara.set(getParagraph(13, "Style numId0 cancels inherited numbering."), 
uno::UNO_QUERY);
 CPPUNIT_ASSERT_EQUAL(OUString(""), getProperty(xPara, 
"ListLabelString"));
 }
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 01ea5230ecfa..40602ee0d40d 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1548,7 +1548,7 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap, con
 if (nListLevel == -1 && nListId > 0)
 nListLevel = 0;
 
-if (!bNoNumbering && !isNumberingViaRule && nListLevel >= 0 && 
nListLevel < 9)
+if (!bNoNumbering && nListLevel >= 0 && nListLevel < 9)
 pParaContext->Insert( PROP_NUMBERING_LEVEL, 
uno::makeAny(nListLevel), false );
 
 auto const pList(GetListTable()->GetList(nListId));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-09 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/calc_tests3/tdf143008.py |   39 ++
 1 file changed, 39 insertions(+)

New commits:
commit 162c5c343db475d9fc930c17b3d62a84925878b3
Author: Xisco Fauli 
AuthorDate: Fri Jul 9 14:09:15 2021 +0200
Commit: Xisco Fauli 
CommitDate: Fri Jul 9 16:13:39 2021 +0200

tdf#143008: sc: Add UItest

Change-Id: I2797d67e675d1e2a53e9ddd1c81a29947182c54b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118683
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/uitest/calc_tests3/tdf143008.py 
b/sc/qa/uitest/calc_tests3/tdf143008.py
new file mode 100644
index ..8138fa37f652
--- /dev/null
+++ b/sc/qa/uitest/calc_tests3/tdf143008.py
@@ -0,0 +1,39 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.calc import enter_text_to_cell
+from uitest.uihelper.common import get_state_as_dict
+from libreoffice.calc.document import get_cell_by_position
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+class tdf143008(UITestCase):
+
+def test_tdf143008(self):
+with self.ui_test.create_doc_in_start_center("calc") as document:
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+#fill data
+enter_text_to_cell(gridwin, "A1", "22/06/2021 10:02 PM")
+
+with 
self.ui_test.execute_dialog_through_command(".uno:TextToColumns") as xDialog:
+xGrid = xDialog.getChild("csvgrid")
+xColumnType = xDialog.getChild("columntype")
+
+# Use the right arrow to put the focus in the grid
+xGrid.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"RIGHT"}))
+
+self.assertEqual('true', 
get_state_as_dict(xColumnType)['Enabled'])
+
+xColumnType.executeAction("SELECT", mkPropertyValues({"TEXT": 
"Date (DMY)"}))
+
+self.assertEqual('Date (DMY)', 
get_state_as_dict(xColumnType)['SelectEntryText'])
+
+# Without the fix in place, this test would have failed with
+# AssertionError: '06/22/21 10:02 PM' != '06/22/21 10:02 AM'
+self.assertEqual("06/22/21 10:02 PM", 
get_cell_by_position(document, 0, 0, 0).getString())
+
+# 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 'feature/cib_contract6721b' - toolkit/source

2021-07-09 Thread Michael Stahl (via logerrit)
 toolkit/source/awt/vclxtoolkit.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit f1f50a829d5194636d637b196c916133e5360fe6
Author: Michael Stahl 
AuthorDate: Fri Jul 9 14:25:28 2021 +0200
Commit: Michael Stahl 
CommitDate: Fri Jul 9 15:32:22 2021 +0200

toolkit: initialise new VCLXTopWindow properly

VCLXToolkit::createSystemChild() doesn't init WindowImpl::mpVCLXWindow
and so it can happen that another VCLXTopWindow instance is created
later for the same Window.

Change-Id: I9ac654dceb15ea619597f2b8d9d1f9282aa1dfc1

diff --git a/toolkit/source/awt/vclxtoolkit.cxx 
b/toolkit/source/awt/vclxtoolkit.cxx
index b7f6f2f43f91..2fa64bc02ca1 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -2040,6 +2040,7 @@ css::uno::Reference< css::awt::XWindowPeer > 
VCLXToolkit::createSystemChild( con
 SolarMutexGuard aGuard;
 pPeer->SetWindow( pChildWindow );
 xPeer = pPeer;
+pChildWindow->SetWindowPeer(xPeer, pPeer);
 }
 
 return xPeer;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-09 Thread Caolán McNamara (via logerrit)
 include/vcl/window.hxx   |8 
 vcl/source/window/window.cxx |6 --
 2 files changed, 14 deletions(-)

New commits:
commit 2dbdaa2840f9e1b176464c132465ea5bb32208f0
Author: Caolán McNamara 
AuthorDate: Thu Jul 8 15:40:31 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 9 15:57:55 2021 +0200

drop newly unused SetParentToDefaultWindow

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

diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index a0bc04cd4523..4fb9e4ab15e0 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1450,14 +1450,6 @@ public:
 // a helper method for a Control's Draw method
 void PaintToDevice( ::OutputDevice* pDevice, const Point& rPos );
 
-/* tdf#119390 set parent to default window. Typically for use in advance 
of destroying
- * a floating windows which has the current focus so focus will revert to 
the main
- * document window and not the first widget in the current parent of the 
floating
- * window.
-*/
-SAL_DLLPRIVATE void SetParentToDefaultWindow();
-
-
 //  Keyboard access functions
 
 /** Query the states of keyboard indicators - Caps Lock, Num Lock and
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 61bcc8ce57a0..41751c015a43 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1782,12 +1782,6 @@ void Window::SetModalHierarchyHdl(const Link& rLink)
 ImplGetFrame()->SetModalHierarchyHdl(rLink);
 }
 
-void Window::SetParentToDefaultWindow()
-{
-Show(false);
-// don't reparent: this window dies anyway and any children must have been 
disposed already
-}
-
 KeyIndicatorState Window::GetIndicatorState() const
 {
 return mpWindowImpl->mpFrame->GetIndicatorState();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-09 Thread Caolán McNamara (via logerrit)
 vcl/inc/unx/gtk/gtkframe.hxx |4 ++
 vcl/unx/gtk3/gtkframe.cxx|   59 +++
 2 files changed, 35 insertions(+), 28 deletions(-)

New commits:
commit 6e90aec7fdcab6740b29597a7236cc0be2129762
Author: Caolán McNamara 
AuthorDate: Wed Jul 7 11:18:53 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 9 15:54:13 2021 +0200

gtk4: use the FixedContainer overlay for mouse events after all

Remove gtk_widget_set_can_target on the overlay so that when we put
native gtk widgets into the overlay they get events and can be
interacted with.

The DrawingArea is 'underneath' the overlay. So just move the mouse
event handlers to the overlay itself so we can still appear to interact
with the DrawingArea.

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

diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 7dcb722968bc..685c2c306894 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -302,7 +302,9 @@ class GtkSalFrame final : public SalFrame
 static gboolean signalFocus( GtkWidget*, GdkEventFocus*, gpointer );
 #endif
 #if !GTK_CHECK_VERSION(4, 0, 0)
-static void signalSetFocus( GtkWindow* pWindow, GtkWidget* 
pWidget, gpointer frame );
+static void signalSetFocus(GtkWindow* pWindow, GtkWidget* pWidget, 
gpointer frame);
+#else
+static void signalSetFocus(GtkWindow* pWindow, GParamSpec* pSpec, 
gpointer frame);
 #endif
 void WindowMap();
 void WindowUnmap();
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index b3647b6a8296..71b8673ee11e 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -768,7 +768,7 @@ void GtkSalFrame::moveWindow( tools::Long nX, tools::Long 
nY )
 
 void GtkSalFrame::widget_set_size_request(tools::Long nWidth, tools::Long 
nHeight)
 {
-gtk_widget_set_size_request(GTK_WIDGET(m_pDrawingArea), nWidth, nHeight );
+gtk_widget_set_size_request(GTK_WIDGET(m_pFixedContainer), nWidth, nHeight 
);
 }
 
 void GtkSalFrame::window_resize(tools::Long nWidth, tools::Long nHeight)
@@ -873,7 +873,7 @@ GtkWidget *GtkSalFrame::getMouseEventWidget() const
 #if !GTK_CHECK_VERSION(4,0,0)
 return GTK_WIDGET(m_pEventBox);
 #else
-return GTK_WIDGET(m_pDrawingArea);
+return GTK_WIDGET(m_pFixedContainer);
 #endif
 }
 
@@ -922,8 +922,8 @@ void GtkSalFrame::InitCommon()
 m_pFixedContainer = GTK_FIXED(gtk_fixed_new());
 m_pDrawingArea = GTK_DRAWING_AREA(gtk_drawing_area_new());
 #endif
-gtk_widget_set_can_focus(GTK_WIDGET(m_pDrawingArea), true);
-gtk_widget_set_size_request(GTK_WIDGET(m_pDrawingArea), 1, 1);
+gtk_widget_set_can_focus(GTK_WIDGET(m_pFixedContainer), true);
+gtk_widget_set_size_request(GTK_WIDGET(m_pFixedContainer), 1, 1);
 #if !GTK_CHECK_VERSION(4,0,0)
 gtk_container_add( GTK_CONTAINER(m_pEventBox), 
GTK_WIDGET(m_pFixedContainer) );
 #else
@@ -932,13 +932,12 @@ void GtkSalFrame::InitCommon()
 gtk_grid_attach(m_pTopLevelGrid, GTK_WIDGET(m_pOverlay), 0, 0, 1, 1);
 gtk_overlay_set_child(m_pOverlay, GTK_WIDGET(m_pDrawingArea));
 gtk_overlay_add_overlay(m_pOverlay, GTK_WIDGET(m_pFixedContainer));
-gtk_widget_set_can_target(GTK_WIDGET(m_pFixedContainer), false);
 #endif
 
 GtkWidget *pEventWidget = getMouseEventWidget();
 #if !GTK_CHECK_VERSION(4,0,0)
-gtk_widget_set_app_paintable(GTK_WIDGET(m_pDrawingArea), true);
-gtk_widget_set_redraw_on_allocate(GTK_WIDGET(m_pDrawingArea), false);
+gtk_widget_set_app_paintable(GTK_WIDGET(m_pFixedContainer), true);
+gtk_widget_set_redraw_on_allocate(GTK_WIDGET(m_pFixedContainer), false);
 #endif
 
 #if GTK_CHECK_VERSION(4,0,0)
@@ -1003,14 +1002,14 @@ void GtkSalFrame::InitCommon()
 #endif
 
 #if !GTK_CHECK_VERSION(4,0,0)
-g_signal_connect( G_OBJECT(m_pDrawingArea), "draw", 
G_CALLBACK(signalDraw), this );
-g_signal_connect( G_OBJECT(m_pDrawingArea), "size-allocate", 
G_CALLBACK(sizeAllocated), this );
+g_signal_connect( G_OBJECT(m_pFixedContainer), "draw", 
G_CALLBACK(signalDraw), this );
+g_signal_connect( G_OBJECT(m_pFixedContainer), "size-allocate", 
G_CALLBACK(sizeAllocated), this );
 #else
 gtk_drawing_area_set_draw_func(m_pDrawingArea, signalDraw, this, nullptr);
-g_signal_connect( G_OBJECT(m_pDrawingArea), "resize", 
G_CALLBACK(sizeAllocated), this );
+g_signal_connect(G_OBJECT(m_pDrawingArea), "resize", 
G_CALLBACK(sizeAllocated), this);
 #endif
 
-g_signal_connect( G_OBJECT(m_pDrawingArea), "realize", 
G_CALLBACK(signalRealize), this );
+g_signal_connect(G_OBJECT(m_pFixedContainer), "realize", 
G_CALLBACK(signalRealize), this);
 
 #if !GTK_CHECK_VERSION(4,0,0)
 GtkGesture *pSwipe = gtk_gesture_swipe_new(pEventWidget);
@@ -1043,6 +1042,8 @@ void GtkSalFrame::InitCommon()
 g_signal_conne

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

2021-07-09 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit b1b6af02465b1a20ec4f28811bc5cc6bde8417be
Author: Caolán McNamara 
AuthorDate: Fri Jul 9 12:18:32 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 9 15:53:54 2021 +0200

gtk4: adjust restoring focus to GtkEntry part of GtkComboBox on menu popdown

the order of changed and popdown is different that in the gtk3 variant
so protect against something (font size picker) changing the focus already
when the ComboBox reported a change before the popdown happened

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 741d7c29470a..cd3fd1b5bc84 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -17587,11 +17587,15 @@ private:
 {
 m_bPopupActive = bIsShown;
 ComboBox::signal_popup_toggled();
-if (!m_bPopupActive && m_pEntry)
+// restore focus to the GtkEntry when the popup is gone, which
+// is what the vcl case does, to ease the transition a little,
+// but don't do it if the focus was moved out of togglebutton
+// by something else already (e.g. font combobox in toolbar
+// on a "direct pick" from the menu which moves focus into
+// the main document
+if (!m_bPopupActive && m_pEntry && has_child_focus())
 {
 disable_notify_events();
-//restore focus to the GtkEntry when the popup is gone, which
-//is what the vcl case does, to ease the transition a little
 gtk_widget_grab_focus(m_pEntry);
 enable_notify_events();
 }
___
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 test/source

2021-07-09 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/htmlexport/htmlexport.cxx  |   28 
 sw/source/filter/html/htmlflywriter.cxx |4 ++--
 test/source/htmltesttools.cxx   |5 -
 3 files changed, 34 insertions(+), 3 deletions(-)

New commits:
commit 559181f925b5791512408c87ce32e3aed90ecded
Author: Miklos Vajna 
AuthorDate: Thu Jul 8 17:08:06 2021 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jul 9 15:10:46 2021 +0200

tdf#142871 sw HTML export: avoid unwanted inner PNG for images

Regression from commit e76471c5ce725dae9abb6f78b7674c6f77df34f4 (sw
XHTML / reqif export: export non-PNG graphic shapes directly,
2021-06-02), reqif wants to have a PNG fallback for non-PNG pixel
formats, but this is not needed for plain HTML, make this reqif-only.

(cherry picked from commit 2d9580e6a65a2699ff61fc1b0e07f62b4946de84)

Change-Id: I0fc1bc13ad4bf808afbe68407e7db802f910c7a7

diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index 3dfe581a4858..f1fcc3631dae 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -1757,6 +1757,34 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testReqifEmbedShapeAsPNG)
 OUString::number(aPixelSize.getWidth()));
 }
 
+CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testShapeAsImageHtml)
+{
+// Given a document with a shape:
+loadURL("private:factory/swriter", nullptr);
+uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xShape(
+xFactory->createInstance("com.sun.star.drawing.RectangleShape"), 
uno::UNO_QUERY);
+xShape->setSize(awt::Size(5080, 2540));
+uno::Reference xDrawPageSupplier(mxComponent, 
uno::UNO_QUERY);
+xDrawPageSupplier->getDrawPage()->add(xShape);
+
+// When exporting to plain HTML:
+uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
+uno::Sequence aStoreProperties = {
+comphelper::makePropertyValue("FilterName", OUString("HTML 
(StarWriter)")),
+};
+xStorable->storeToURL(maTempFile.GetURL(), aStoreProperties);
+mxComponent->dispose();
+
+// Then make sure importing it back results in a clean doc model:
+mxComponent = loadFromDesktop(maTempFile.GetURL());
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected:
+// - Actual  :  />
+// i.e. the output was not well-formed.
+CPPUNIT_ASSERT_EQUAL(OUString(" "), getParagraph(1)->getString());
+}
+
 CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifEmbedShapeAsPNGCustomDPI)
 {
 // Given a document with a shape:
diff --git a/sw/source/filter/html/htmlflywriter.cxx 
b/sw/source/filter/html/htmlflywriter.cxx
index 6f01a5c7008d..847dae7cb93b 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -1801,7 +1801,7 @@ static void OutHTML_ImageOLEEnd(SwHTMLWriter& rHTMLWrt)
 static Writer & OutHTML_FrameFormatAsImage( Writer& rWrt, const SwFrameFormat& 
rFrameFormat, bool bPNGFallback)
 {
 SwHTMLWriter& rHTMLWrt = static_cast(rWrt);
-bool bWritePNGFallback = !rHTMLWrt.m_bExportImagesAsOLE && bPNGFallback;
+bool bWritePNGFallback = rHTMLWrt.mbReqIF && 
!rHTMLWrt.m_bExportImagesAsOLE && bPNGFallback;
 
 if (rHTMLWrt.mbSkipImages)
 return rWrt;
@@ -1896,7 +1896,7 @@ static Writer& OutHTML_FrameFormatGrfNode( Writer& rWrt, 
const SwFrameFormat& rF
   bool bInCntnr, bool bPNGFallback )
 {
 SwHTMLWriter& rHTMLWrt = static_cast(rWrt);
-bool bWritePNGFallback = !rHTMLWrt.m_bExportImagesAsOLE && bPNGFallback;
+bool bWritePNGFallback = rHTMLWrt.mbReqIF && 
!rHTMLWrt.m_bExportImagesAsOLE && bPNGFallback;
 
 if (rHTMLWrt.mbSkipImages)
 return rWrt;
diff --git a/test/source/htmltesttools.cxx b/test/source/htmltesttools.cxx
index 9f9a1bbddfc6..d61f07bd3d1b 100644
--- a/test/source/htmltesttools.cxx
+++ b/test/source/htmltesttools.cxx
@@ -8,6 +8,7 @@
  */
 
 #include 
+#include 
 
 #include 
 
@@ -30,7 +31,9 @@ htmlDocUniquePtr HtmlTestTools::parseHtmlStream(SvStream* 
pStream)
 std::unique_ptr pBuffer(new sal_uInt8[nSize + 1]);
 pStream->ReadBytes(pBuffer.get(), nSize);
 pBuffer[nSize] = 0;
-return 
htmlDocUniquePtr(htmlParseDoc(reinterpret_cast(pBuffer.get()), 
nullptr));
+auto pCharBuffer = reinterpret_cast(pBuffer.get());
+SAL_INFO("test", "HtmlTestTools::parseXmlStream: pBuffer is '" << 
pCharBuffer << "'");
+return htmlDocUniquePtr(htmlParseDoc(pCharBuffer, nullptr));
 }
 
 /* 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: compilerplugins/clang extensions/source i18nlangtag/qa sc/source svl/qa sw/source ucb/source

2021-07-09 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/stringadd.cxx|   30 +
 compilerplugins/clang/test/stringadd.cxx   |   24 
 extensions/source/bibliography/datman.cxx  |4 ---
 i18nlangtag/qa/cppunit/test_languagetag.cxx|3 --
 sc/source/ui/miscdlgs/solveroptions.cxx|4 +--
 svl/qa/unit/lockfiles/test_lockfiles.cxx   |   16 +++--
 sw/source/core/doc/doc.cxx |3 --
 sw/source/core/tox/ToxTextGenerator.cxx|3 --
 sw/source/filter/ww8/rtfattributeoutput.cxx|4 +--
 sw/source/filter/ww8/wrtw8nds.cxx  |4 +--
 sw/source/uibase/sidebar/PageMarginControl.cxx |6 +
 ucb/source/ucp/hierarchy/hierarchycontent.cxx  |4 ---
 12 files changed, 71 insertions(+), 34 deletions(-)

New commits:
commit f020784e14a55c82418e4f231855040177ac9f82
Author: Stephan Bergmann 
AuthorDate: Fri Jul 9 13:04:19 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Jul 9 15:07:05 2021 +0200

Make loplugin:stringadd slightly more aggressive

...by assuming that all const member functions are side-effect free.  (This
presumably means that some of the special cases in
StringAdd::isSideEffectFree are obsoleted by this more general case, but any
such removal is postponed to later clean-up.)

(Came across this when idly wondering why
8b7f948d9d79393bc6c1b11d23970fd5d7de "sc, VmlFormControlExporter: avoid
OStringBuffer style" had not been found by the plugin before.)

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

diff --git a/compilerplugins/clang/stringadd.cxx 
b/compilerplugins/clang/stringadd.cxx
index c25992928f1e..394139dbb354 100644
--- a/compilerplugins/clang/stringadd.cxx
+++ b/compilerplugins/clang/stringadd.cxx
@@ -378,6 +378,36 @@ bool StringAdd::isSideEffectFree(Expr const* expr)
 }
 }
 }
+// Aggressively assume that calls to const member functions 
are side effect free (if
+// all of the call's sub-expressions are):
+if (calleeMethodDecl->isConst())
+{
+auto sef = true;
+// Other options besides CXXMemberCallExpr are e.g. 
CXXOperatorCallExpr which
+// does not have such a target expression:
+if (auto const mce = dyn_cast(callExpr))
+{
+if 
(!isSideEffectFree(mce->getImplicitObjectArgument()))
+{
+sef = false;
+}
+}
+if (sef)
+{
+for (unsigned i = 0; i != callExpr->getNumArgs(); ++i)
+{
+if (!isSideEffectFree(callExpr->getArg(i)))
+{
+sef = false;
+break;
+}
+}
+}
+if (sef)
+{
+return true;
+}
+}
 }
 if (auto calleeFunctionDecl = 
dyn_cast_or_null(callExpr->getCalleeDecl()))
 if (calleeFunctionDecl && calleeFunctionDecl->getIdentifier())
diff --git a/compilerplugins/clang/test/stringadd.cxx 
b/compilerplugins/clang/test/stringadd.cxx
index fb805ce519b9..a20b64698433 100644
--- a/compilerplugins/clang/test/stringadd.cxx
+++ b/compilerplugins/clang/test/stringadd.cxx
@@ -235,4 +235,28 @@ void f2(char ch)
 s = s + OString(ch);
 }
 }
+
+namespace test10
+{
+struct C
+{
+OString constStringFunction(int) const;
+OString nonConstStringFunction();
+int constIntFunction() const;
+int nonConstIntFunction();
+};
+
+C getC();
+
+void f1(C c)
+{
+OString s;
+// expected-error@+1 {{simplify by merging with the preceding assignment 
[loplugin:stringadd]}}
+s += c.constStringFunction(c.constIntFunction());
+s += c.constStringFunction(c.nonConstIntFunction());
+s += c.nonConstStringFunction();
+s += getC().constStringFunction(c.constIntFunction());
+}
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/extensions/source/bibliography/datman.cxx 
b/extensions/source/bibliography/datman.cxx
index a492c839712e..875938b7924f 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -848,9 +848,7 @@ void BibDataManager::startQueryWith(const OUString& rQuery)
 OUString aQueryString;
 if(!rQuery.isEmpty())
 {
-aQueryString=aQuoteChar;
-aQueryString+=getQueryField();
-aQueryString+=aQuoteChar + " like '";
+

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

2021-07-09 Thread Caolán McNamara (via logerrit)
 sc/qa/unit/uicalc/uicalc.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit ac7bba3cc1e13824732f5ab69af602848e4ba227
Author: Caolán McNamara 
AuthorDate: Fri Jul 9 11:27:48 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 9 13:48:02 2021 +0200

add Scheduler::ProcessEventsToIdle() to test

to see if it has an effect on intermittent error of:

sc/qa/unit/uicalc/uicalc.cxx(1325) : error : Assertion
Test name: testTdf130614::TestBody
equality assertion failed
- Expected: 1
- Actual  : 0

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

diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 3b3bdadbd4e2..61707d5cb02a 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -1319,6 +1319,7 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf130614)
 
 // Without the fix in place, this test would have crashed here
 dispatchCommand(mxComponent, ".uno:Paste", {});
+Scheduler::ProcessEventsToIdle();
 
 ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
 SdrPage* pPage = pDrawLayer->GetPage(0);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-09 Thread Caolán McNamara (via logerrit)
 vcl/source/window/menu.cxx   |2 --
 vcl/source/window/menubarwindow.cxx  |1 -
 vcl/source/window/menufloatingwindow.cxx |1 -
 vcl/source/window/window2.cxx|1 -
 4 files changed, 5 deletions(-)

New commits:
commit 57dfefa71070d2168df7115856f468dfc0ccaccc
Author: Caolán McNamara 
AuthorDate: Thu Jul 8 14:44:30 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 9 13:47:42 2021 +0200

drop some calls to SetParentToDefaultWindow

when the next thing called is disposeAndClear now that
all SetParentToDefaultWindow does it hide the Window

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

diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 5cc01ef41df1..6225f25a6d16 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -3021,7 +3021,6 @@ sal_uInt16 PopupMenu::ImplExecute( const 
VclPtr& pW, const tools::R
 {
 pWin->StopExecute();
 pWin->doShutdown();
-pWindow->SetParentToDefaultWindow();
 pWindow.disposeAndClear();
 ImplClosePopupToolBox(pW);
 ImplFlushPendingSelect();
@@ -3082,7 +3081,6 @@ sal_uInt16 PopupMenu::ImplExecute( const 
VclPtr& pW, const tools::R
 }
 }
 pWin->doShutdown();
-pWindow->SetParentToDefaultWindow();
 pWindow.disposeAndClear();
 ImplClosePopupToolBox(pW);
 ImplFlushPendingSelect();
diff --git a/vcl/source/window/menubarwindow.cxx 
b/vcl/source/window/menubarwindow.cxx
index 1f945e0a95c3..09dd1d569edf 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -373,7 +373,6 @@ void MenuBarWindow::KillActivePopup()
 }
 m_pActivePopup->ImplGetFloatingWindow()->StopExecute();
 m_pActivePopup->ImplGetFloatingWindow()->doShutdown();
-m_pActivePopup->pWindow->SetParentToDefaultWindow();
 m_pActivePopup->pWindow.disposeAndClear();
 }
 m_pActivePopup = nullptr;
diff --git a/vcl/source/window/menufloatingwindow.cxx 
b/vcl/source/window/menufloatingwindow.cxx
index 7597e170fe5f..1737e80da843 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -499,7 +499,6 @@ void MenuFloatingWindow::KillActivePopup( PopupMenu* 
pThisOnly )
 {
 pPopup->ImplGetFloatingWindow()->StopExecute();
 pPopup->ImplGetFloatingWindow()->doShutdown();
-pPopup->pWindow->SetParentToDefaultWindow();
 pPopup->pWindow.disposeAndClear();
 
 PaintImmediately();
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index db6f493cc342..555bbef324e3 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -338,7 +338,6 @@ void Window::EndAutoScroll()
 pSVData->mpWinData->mpAutoScrollWin = nullptr;
 pSVData->mpWinData->mnAutoScrollFlags = StartAutoScrollFlags::NONE;
 pSVData->maAppData.mpWheelWindow->ImplStop();
-pSVData->maAppData.mpWheelWindow->SetParentToDefaultWindow();
 pSVData->maAppData.mpWheelWindow.disposeAndClear();
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Row height test failing for some on Windows

2021-07-09 Thread Caolán McNamara
On Fri, 2021-07-09 at 08:40 +0300, Ilmari Lauhakangas wrote:
> Someone I am mentoring got this test failure on Windows:
> 
> : error : Assertion
> Test name: ScFiltersTest::testTdf118086
> equality assertion failed
> - Expected: 477
> - Actual  : 480
> 
> Any ideas?

I'd try to:

a) Open sc/qa/unit/data/ods/tdf118086.ods manually in calc.
b) Change tools, options, calc, general, measurement unit to "points"
(to make things easy)
c) In the first tab in calc "Tabelle2" click in the A3 cell, and what
is the value for format, rows, height?

The expectation is that the value there is 23.85 (* 20 to get the
Expected: above). Given the error presumably this is showing "24"
instead.

If that value isn't 23.85 then is the font "Arial" shown italicized in
the font selector in the toolbar ? (That would be very unusual on a
windows machine I guess). If it is, then the problem might be a font
replacement issue and reworking the document to use fonts that are in
our build is a possible solution.

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


[Libreoffice-commits] core.git: helpcontent2

2021-07-09 Thread Rafael Lima (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e45aa2950c1113b17fdf5adf4c67e2522514e2ed
Author: Rafael Lima 
AuthorDate: Fri Jul 9 12:28:37 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Fri Jul 9 12:28:37 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to d2a1bbcae2b2311f13bb0651a4eb36bc978b46b9
  - Add Python support to SF_Database help file

Change-Id: I47b7f328569d14d543708e3534bb99744b2cc3a0
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/118511
Tested-by: Jenkins
Tested-by: Jean-Pierre Ledure 
Reviewed-by: Jean-Pierre Ledure 

diff --git a/helpcontent2 b/helpcontent2
index dc68b55ae08e..d2a1bbcae2b2 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit dc68b55ae08e9445e3ec982b7d5e91a4b522b9a1
+Subproject commit d2a1bbcae2b2311f13bb0651a4eb36bc978b46b9
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: source/text

2021-07-09 Thread Rafael Lima (via logerrit)
 source/text/sbasic/shared/03/sf_database.xhp |  233 +--
 1 file changed, 154 insertions(+), 79 deletions(-)

New commits:
commit d2a1bbcae2b2311f13bb0651a4eb36bc978b46b9
Author: Rafael Lima 
AuthorDate: Thu Jul 8 01:55:38 2021 +0200
Commit: Jean-Pierre Ledure 
CommitDate: Fri Jul 9 12:28:37 2021 +0200

Add Python support to SF_Database help file

Change-Id: I47b7f328569d14d543708e3534bb99744b2cc3a0
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/118511
Tested-by: Jenkins
Tested-by: Jean-Pierre Ledure 
Reviewed-by: Jean-Pierre Ledure 

diff --git a/source/text/sbasic/shared/03/sf_database.xhp 
b/source/text/sbasic/shared/03/sf_database.xhp
index bbc936356..316690fd6 100644
--- a/source/text/sbasic/shared/03/sf_database.xhp
+++ b/source/text/sbasic/shared/03/sf_database.xhp
@@ -37,41 +37,66 @@
   
 
 
-TODO: Add reference to the future help page SFDocuments.SF_Form 
service in the paragraph below
-Each instance of the Database service 
represents a single database and gives access to its tables, queries and data. 
This service does not provide access to forms or reports in the Base 
document.
+Each instance of the Database service 
represents a single database and gives access to its tables, queries and 
data.
+This service does 
not provide access to forms or reports in the Base document that contains the 
database. To access forms in a Base document, refer to the method FormDocuments of the 
Base service.
 All exchanges between this service and 
the database are done using SQL only.
 SQL statements may be run in direct or 
indirect mode. In direct mode the statement is transferred to the 
database engine without any syntax checking or review.
 The provided interfaces include simple tables and queries 
lists, as well as access to database data.
-To make SQL statements 
more readable, you can use optional square brackets to enclose tables, queries 
and fields instead of using other enclosing characters that may be exclusive to 
certain Relational Database Management Systems (RDBMS).
+To make SQL statements 
more readable, you may use square brackets "[ ]" to enclose names of tables, 
queries and fields instead of using other enclosing characters that may be 
exclusive to certain Relational Database Management Systems (RDBMS). But beware 
that enclosing characters are mandatory in this context.
 
 Service invocation
-
-The code snippet below shows how to access any database with 
the Database service.
+
+To 
create a instance of the Database service you can use the 
CreateScriptService method:
+
+  CreateScriptService("SFDatabases.Database", [filename: str], 
[registrationname], [readonly], [user, [password]]): svc
+
+In the syntax described above you can use 
either "SFDatabases.Database" or simply "Database" as the first argument of the 
CreateScriptService method.
+
+filename: The name of the Base file. 
Must be expressed using SF_FileSystem.FileNaming 
notation.
+registrationname: The name of a 
registered database. If filename is provided, this argument 
should not be used.
+Conversely, if a 
registrationname is specified, the 
filename parameter should not be defined.
+readonly: Determines if the database 
will be opened as readonly (Default = True).
+user, 
password: Additional connection parameters to the database 
server.
+
+
 
-Dim myDatabase As Object
-Set myDatabase = 
CreateScriptService("SFDatabases.Database", [FileName], [RegistrationName], 
[ReadOnly], [User, [Password]])
-'   ... Run 
queries, SQL statements, ...
-myDatabase.CloseDatabase()
+  GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")
+  Dim myDatabase as Object
+  Set myDatabase = CreateScriptService("Database", 
"~/Documents/myDB.odb")
+  ' Run queries, SQL 
statements, ...
+  myDatabase.CloseDatabase()
 
-
-FileName: The name of the Base file. 
Must be expressed using SF_FileSystem.FileNaming 
notation.
-RegistrationName: The name of a 
registered database. If a file name is provided, this argument should not be 
used.
-Conversely, if a 
RegistrationName is specified, the 
FileName parameter should not be defined.
-ReadOnly: Determines if the database 
will be opened as readonly (Default = True).
-User, 
Password: Additional connection parameters to the database 
server.
-
+
+
+  from scriptforge import 
CreateScriptService
+  myDatabase = CreateScriptService("Database", 
"~/Documents/myDB.odb")
+  # Run queries, SQL 
statements, ...
+  myDatabase.CloseDatabase()
+
 
 Accessing Databases with the UI Service
-It 
is also possible to access the database associated with a Base document using 
the ScriptForge.UI service, as shown in the 
example below:
+It 
is also possible to access the database associated with a Base document usi

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

2021-07-09 Thread panoskorovesis (via logerrit)
 include/vcl/filter/SvmReader.hxx|1 +
 include/vcl/metaact.hxx |5 +
 vcl/source/filter/svm/SvmReader.cxx |   35 ++-
 3 files changed, 40 insertions(+), 1 deletion(-)

New commits:
commit 31311b7df472903e2f16102663d5bad17d8371ca
Author: panoskorovesis 
AuthorDate: Thu Jul 8 17:45:31 2021 +0300
Commit: Tomaž Vajngerl 
CommitDate: Fri Jul 9 11:50:11 2021 +0200

Add Handler for TextLine Read

The handler separates MetaTextLineAction::Read from metaact.hxx
Read implementation is now in SvmReader.hxx

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

diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx
index ab9654ea8d9a..fd8d81ce7295 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -55,6 +55,7 @@ public:
 rtl::Reference TextArrayHandler(ImplMetaReadData* pData);
 rtl::Reference StretchTextHandler(ImplMetaReadData* pData);
 rtl::Reference TextRectHandler(ImplMetaReadData* pData);
+rtl::Reference TextLineHandler();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index b6509c12aaf8..731e901bd622 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -685,6 +685,11 @@ public:
 FontStrikeout   GetStrikeout() const { return meStrikeout; }
 FontLineStyle   GetUnderline() const { return meUnderline; }
 FontLineStyle   GetOverline()  const { return meOverline; }
+voidSetStartPoint(Point& rPos) { maPos = rPos; }
+voidSetWidth(tools::Long rWidth) { mnWidth = rWidth; }
+voidSetStrikeout(FontStrikeout eStrikeout) { meStrikeout = 
eStrikeout; }
+voidSetUnderline(FontLineStyle eUnderline) { meUnderline = 
eUnderline; }
+voidSetOverline(FontLineStyle eOverline) { meOverline = 
eOverline; }
 };
 
 class VCL_DLLPUBLIC MetaBmpAction final : public MetaAction
diff --git a/vcl/source/filter/svm/SvmReader.cxx 
b/vcl/source/filter/svm/SvmReader.cxx
index 1cfb6cd4ab75..43cd2e0e354a 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -207,7 +207,7 @@ rtl::Reference 
SvmReader::MetaActionHandler(ImplMetaReadData* pData)
 return TextRectHandler(pData);
 break;
 case MetaActionType::TEXTLINE:
-pAction = new MetaTextLineAction;
+return TextLineHandler();
 break;
 case MetaActionType::BMP:
 pAction = new MetaBmpAction;
@@ -801,4 +801,37 @@ rtl::Reference 
SvmReader::TextRectHandler(ImplMetaReadData* pData)
 
 return pAction;
 }
+
+rtl::Reference SvmReader::TextLineHandler()
+{
+auto pAction = new MetaTextLineAction();
+
+VersionCompatRead aCompat(mrStream);
+TypeSerializer aSerializer(mrStream);
+
+Point aPos;
+aSerializer.readPoint(aPos);
+sal_Int32 nTempWidth(0);
+mrStream.ReadInt32(nTempWidth);
+
+pAction->SetStartPoint(aPos);
+pAction->SetWidth(nTempWidth);
+
+sal_uInt32 nTempStrikeout(0);
+mrStream.ReadUInt32(nTempStrikeout);
+sal_uInt32 nTempUnderline(0);
+mrStream.ReadUInt32(nTempUnderline);
+
+pAction->SetStrikeout(static_cast(nTempStrikeout));
+pAction->SetUnderline(static_cast(nTempUnderline));
+
+if (aCompat.GetVersion() >= 2)
+{
+sal_uInt32 nTempOverline(0);
+mrStream.ReadUInt32(nTempOverline);
+pAction->SetOverline(static_cast(nTempOverline));
+}
+
+return pAction;
+}
 /* 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: include/vcl vcl/source

2021-07-09 Thread panoskorovesis (via logerrit)
 include/vcl/filter/SvmReader.hxx|1 +
 include/vcl/metaact.hxx |3 +++
 vcl/source/filter/svm/SvmReader.cxx |   27 ++-
 3 files changed, 30 insertions(+), 1 deletion(-)

New commits:
commit c46aba4341744ce7b0bf91ba86805687898c21a4
Author: panoskorovesis 
AuthorDate: Thu Jul 8 13:35:24 2021 +0300
Commit: Tomaž Vajngerl 
CommitDate: Fri Jul 9 11:49:32 2021 +0200

Add Handler for MetaTextRect Read

The handler separates MetaTextAction::Read from metaact.hxx
Read implementation is now in SvmReader.hxx

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

diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx
index 230a725c0ca9..ab9654ea8d9a 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -54,6 +54,7 @@ public:
 rtl::Reference TextHandler(ImplMetaReadData* pData);
 rtl::Reference TextArrayHandler(ImplMetaReadData* pData);
 rtl::Reference StretchTextHandler(ImplMetaReadData* pData);
+rtl::Reference TextRectHandler(ImplMetaReadData* pData);
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 19ed80859f33..b6509c12aaf8 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -644,6 +644,9 @@ public:
 const tools::Rectangle&GetRect() const { return maRect; }
 const OUString& GetText() const { return maStr; }
 DrawTextFlags   GetStyle() const { return mnStyle; }
+voidSetRect(tools::Rectangle& rRect) { maRect = rRect; }
+voidSetText(OUString& rStr) { maStr = rStr; }
+voidSetStyle(DrawTextFlags rStyle) { mnStyle = rStyle; }
 };
 
 class SAL_DLLPUBLIC_RTTI MetaTextLineAction final : public MetaAction
diff --git a/vcl/source/filter/svm/SvmReader.cxx 
b/vcl/source/filter/svm/SvmReader.cxx
index cea3409df856..1cfb6cd4ab75 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -204,7 +204,7 @@ rtl::Reference 
SvmReader::MetaActionHandler(ImplMetaReadData* pData)
 return StretchTextHandler(pData);
 break;
 case MetaActionType::TEXTRECT:
-pAction = new MetaTextRectAction;
+return TextRectHandler(pData);
 break;
 case MetaActionType::TEXTLINE:
 pAction = new MetaTextLineAction;
@@ -776,4 +776,29 @@ rtl::Reference 
SvmReader::StretchTextHandler(ImplMetaReadData* pData
 
 return pAction;
 }
+
+rtl::Reference SvmReader::TextRectHandler(ImplMetaReadData* pData)
+{
+auto pAction = new MetaTextRectAction();
+
+VersionCompatRead aCompat(mrStream);
+TypeSerializer aSerializer(mrStream);
+
+tools::Rectangle aRect;
+aSerializer.readRectangle(aRect);
+OUString aStr;
+aStr = mrStream.ReadUniOrByteString(pData->meActualCharSet);
+sal_uInt16 nTmp;
+mrStream.ReadUInt16(nTmp);
+
+pAction->SetRect(aRect);
+pAction->SetStyle(static_cast(nTmp));
+
+if (aCompat.GetVersion() >= 2) // Version 2
+aStr = read_uInt16_lenPrefixed_uInt16s_ToOUString(mrStream);
+
+pAction->SetText(aStr);
+
+return pAction;
+}
 /* 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: include/vcl vcl/source

2021-07-09 Thread panoskorovesis (via logerrit)
 include/vcl/filter/SvmReader.hxx|1 +
 include/vcl/metaact.hxx |5 +
 vcl/source/filter/svm/SvmReader.cxx |   33 -
 3 files changed, 38 insertions(+), 1 deletion(-)

New commits:
commit 66ac7e94ea69cd62c256cae8d3ced82678ce6992
Author: panoskorovesis 
AuthorDate: Thu Jul 8 13:06:06 2021 +0300
Commit: Tomaž Vajngerl 
CommitDate: Fri Jul 9 11:48:58 2021 +0200

Add Handler for MetaStretchText Read

The handler separates the MetaStretchTextAction::Read from metaact.hxx
Read implementation is now in SvmReader.hxx

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

diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx
index 7baae24379b0..230a725c0ca9 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -53,6 +53,7 @@ public:
 rtl::Reference PolyPolygonHandler();
 rtl::Reference TextHandler(ImplMetaReadData* pData);
 rtl::Reference TextArrayHandler(ImplMetaReadData* pData);
+rtl::Reference StretchTextHandler(ImplMetaReadData* pData);
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 28a5373329c6..19ed80859f33 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -606,6 +606,11 @@ public:
 sal_uInt32  GetWidth() const { return mnWidth; }
 sal_Int32   GetIndex() const { return mnIndex; }
 sal_Int32   GetLen() const { return mnLen; }
+voidSetPoint(Point& rPt) { maPt = rPt; }
+voidSetText(OUString& rStr) { maStr = rStr; }
+voidSetWidth(sal_uInt32 rWidth) { mnWidth = rWidth; }
+voidSetIndex(sal_uInt32 rIndex) { mnIndex = rIndex; }
+voidSetLen(sal_uInt32 rLen) { mnLen = rLen; }
 };
 
 class SAL_DLLPUBLIC_RTTI MetaTextRectAction final : public MetaAction
diff --git a/vcl/source/filter/svm/SvmReader.cxx 
b/vcl/source/filter/svm/SvmReader.cxx
index 74919c3b17d1..cea3409df856 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -201,7 +201,7 @@ rtl::Reference 
SvmReader::MetaActionHandler(ImplMetaReadData* pData)
 return TextArrayHandler(pData);
 break;
 case MetaActionType::STRETCHTEXT:
-pAction = new MetaStretchTextAction;
+return StretchTextHandler(pData);
 break;
 case MetaActionType::TEXTRECT:
 pAction = new MetaTextRectAction;
@@ -745,4 +745,35 @@ rtl::Reference 
SvmReader::TextArrayHandler(ImplMetaReadData* pData)
 pAction->SetDXArray(aArray.get());
 return pAction;
 }
+
+rtl::Reference SvmReader::StretchTextHandler(ImplMetaReadData* 
pData)
+{
+auto pAction = new MetaStretchTextAction();
+
+VersionCompatRead aCompat(mrStream);
+TypeSerializer aSerializer(mrStream);
+
+Point aPoint;
+aSerializer.readPoint(aPoint);
+OUString aStr;
+aStr = mrStream.ReadUniOrByteString(pData->meActualCharSet);
+sal_uInt32 nTmpWidth;
+mrStream.ReadUInt32(nTmpWidth);
+sal_uInt16 nTmpIndex(0);
+mrStream.ReadUInt16(nTmpIndex);
+sal_uInt16 nTmpLen(0);
+mrStream.ReadUInt16(nTmpLen);
+
+pAction->SetPoint(aPoint);
+pAction->SetWidth(nTmpWidth);
+pAction->SetIndex(nTmpIndex);
+pAction->SetLen(nTmpLen);
+
+if (aCompat.GetVersion() >= 2) // Version 2
+aStr = read_uInt16_lenPrefixed_uInt16s_ToOUString(mrStream);
+
+pAction->SetText(aStr);
+
+return pAction;
+}
 /* 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: include/vcl vcl/source

2021-07-09 Thread panoskorovesis (via logerrit)
 include/vcl/filter/SvmReader.hxx|1 
 include/vcl/metaact.hxx |5 ++
 vcl/source/filter/svm/SvmReader.cxx |   81 +++-
 vcl/source/gdi/metaact.cxx  |   11 
 4 files changed, 97 insertions(+), 1 deletion(-)

New commits:
commit 58a064595e43428f7d74341aff38df40fec0c8b3
Author: panoskorovesis 
AuthorDate: Thu Jul 8 12:51:11 2021 +0300
Commit: Tomaž Vajngerl 
CommitDate: Fri Jul 9 11:48:22 2021 +0200

Add Handler for MetaTextArray Read

The handler separates the MetaTextArrayAction::Read from metaact.hxx
Read implementation is now in SvmReader.hxx

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

diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx
index ea3d9a31fd63..7baae24379b0 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -52,6 +52,7 @@ public:
 rtl::Reference PolygonHandler();
 rtl::Reference PolyPolygonHandler();
 rtl::Reference TextHandler(ImplMetaReadData* pData);
+rtl::Reference TextArrayHandler(ImplMetaReadData* pData);
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 96c15ff23213..28a5373329c6 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -563,6 +563,11 @@ public:
 sal_Int32   GetIndex() const { return mnIndex; }
 sal_Int32   GetLen() const { return mnLen; }
 tools::Long*   GetDXArray() const { return mpDXAry.get(); }
+voidSetPoint(Point& rPt) { maStartPt = rPt; }
+voidSetText(OUString& rStr) { maStr = rStr; }
+voidSetIndex(sal_Int32 rIndex) { mnIndex = rIndex; }
+voidSetLen(sal_Int32 rLen) { mnLen = rLen; }
+voidSetDXArray(tools::Long* rDXAry);
 };
 
 class SAL_DLLPUBLIC_RTTI MetaStretchTextAction final : public MetaAction
diff --git a/vcl/source/filter/svm/SvmReader.cxx 
b/vcl/source/filter/svm/SvmReader.cxx
index 6fbd043d9ad1..74919c3b17d1 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -198,7 +198,7 @@ rtl::Reference 
SvmReader::MetaActionHandler(ImplMetaReadData* pData)
 return TextHandler(pData);
 break;
 case MetaActionType::TEXTARRAY:
-pAction = new MetaTextArrayAction;
+return TextArrayHandler(pData);
 break;
 case MetaActionType::STRETCHTEXT:
 pAction = new MetaStretchTextAction;
@@ -666,4 +666,83 @@ rtl::Reference 
SvmReader::TextHandler(ImplMetaReadData* pData)
 
 return pAction;
 }
+
+rtl::Reference SvmReader::TextArrayHandler(ImplMetaReadData* pData)
+{
+auto pAction = new MetaTextArrayAction();
+
+std::unique_ptr aArray;
+aArray.reset();
+
+VersionCompatRead aCompat(mrStream);
+TypeSerializer aSerializer(mrStream);
+
+Point aPoint;
+aSerializer.readPoint(aPoint);
+pAction->SetPoint(aPoint);
+
+OUString aStr;
+aStr = mrStream.ReadUniOrByteString(pData->meActualCharSet);
+pAction->SetText(aStr);
+
+sal_uInt16 nTmpIndex(0);
+mrStream.ReadUInt16(nTmpIndex);
+pAction->SetIndex(nTmpIndex);
+
+sal_uInt16 nTmpLen(0);
+mrStream.ReadUInt16(nTmpLen);
+pAction->SetLen(nTmpLen);
+
+sal_Int32 nAryLen(0);
+mrStream.ReadInt32(nAryLen);
+
+if (nTmpLen > aStr.getLength() - nTmpIndex)
+{
+pAction->SetIndex(0);
+pAction->SetDXArray(nullptr);
+return pAction;
+}
+if (nAryLen)
+{
+// #i9762#, #106172# Ensure that DX array is at least mnLen entries 
long
+if (nTmpLen >= nAryLen)
+{
+aArray.reset(new (std::nothrow) tools::Long[nTmpLen]);
+if (aArray)
+{
+sal_Int32 i;
+sal_Int32 val;
+for (i = 0; i < nAryLen; i++)
+{
+mrStream.ReadInt32(val);
+aArray[i] = val;
+}
+// #106172# setup remainder
+for (; i < nTmpLen; i++)
+aArray[i] = 0;
+}
+}
+else
+{
+pAction->SetDXArray(nullptr);
+return pAction;
+}
+}
+else
+pAction->SetDXArray(nullptr);
+
+if (aCompat.GetVersion() >= 2) // Version 2
+{
+aStr = read_uInt16_lenPrefixed_uInt16s_ToOUString(mrStream);
+
+if (nTmpIndex + nTmpLen > aStr.getLength())
+{
+pAction->SetIndex(0);
+aArray.reset();
+}
+}
+
+pAction->SetDXArray(aArray.get());
+return pAction;
+}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 20325ed90e33..bd3c6d60681f 100644
--- a

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

2021-07-09 Thread panoskorovesis (via logerrit)
 include/vcl/filter/SvmReader.hxx|1 +
 include/vcl/metaact.hxx |4 
 vcl/source/filter/svm/SvmReader.cxx |   30 +-
 3 files changed, 34 insertions(+), 1 deletion(-)

New commits:
commit 1d873936b48c2f672a12b8a380860d691937b8b3
Author: panoskorovesis 
AuthorDate: Thu Jul 8 12:31:33 2021 +0300
Commit: Tomaž Vajngerl 
CommitDate: Fri Jul 9 11:47:22 2021 +0200

Add Handler for MetaText Read

The handler separates the MetaTextAction::Read from metaact.hxx
Read implementation is now in SvmReader.hxx

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

diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx
index 0259dd03503c..ea3d9a31fd63 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -51,6 +51,7 @@ public:
 rtl::Reference PolyLineHandler();
 rtl::Reference PolygonHandler();
 rtl::Reference PolyPolygonHandler();
+rtl::Reference TextHandler(ImplMetaReadData* pData);
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index aca0c4e2c493..96c15ff23213 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -522,6 +522,10 @@ public:
 const OUString& GetText() const { return maStr; }
 sal_Int32   GetIndex() const { return mnIndex; }
 sal_Int32   GetLen() const { return mnLen; }
+voidSetPoint(Point& rPt) { maPt = rPt; }
+voidSetText(OUString& rStr) { maStr = rStr; }
+voidSetIndex(sal_Int32 rIndex) { mnIndex = rIndex; }
+voidSetLen(sal_Int32 rLen) { mnLen = rLen; }
 };
 
 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaTextArrayAction final : public 
MetaAction
diff --git a/vcl/source/filter/svm/SvmReader.cxx 
b/vcl/source/filter/svm/SvmReader.cxx
index ffd17c5761ee..6fbd043d9ad1 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -195,7 +195,7 @@ rtl::Reference 
SvmReader::MetaActionHandler(ImplMetaReadData* pData)
 return PolyPolygonHandler();
 break;
 case MetaActionType::TEXT:
-pAction = new MetaTextAction;
+return TextHandler(pData);
 break;
 case MetaActionType::TEXTARRAY:
 pAction = new MetaTextArrayAction;
@@ -638,4 +638,32 @@ rtl::Reference SvmReader::PolyPolygonHandler()
 
 return pAction;
 }
+
+rtl::Reference SvmReader::TextHandler(ImplMetaReadData* pData)
+{
+auto pAction = new MetaTextAction();
+
+VersionCompatRead aCompat(mrStream);
+TypeSerializer aSerializer(mrStream);
+
+Point aPoint;
+aSerializer.readPoint(aPoint);
+OUString aStr;
+aStr = mrStream.ReadUniOrByteString(pData->meActualCharSet);
+sal_uInt16 nTmpIndex(0);
+mrStream.ReadUInt16(nTmpIndex);
+sal_uInt16 nTmpLen(0);
+mrStream.ReadUInt16(nTmpLen);
+
+pAction->SetPoint(aPoint);
+pAction->SetIndex(nTmpIndex);
+pAction->SetLen(nTmpLen);
+
+if (aCompat.GetVersion() >= 2) // Version 2
+aStr = read_uInt16_lenPrefixed_uInt16s_ToOUString(mrStream);
+
+pAction->SetText(aStr);
+
+return pAction;
+}
 /* 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: include/vcl vcl/source

2021-07-09 Thread panoskorovesis (via logerrit)
 include/vcl/filter/SvmReader.hxx|1 
 include/vcl/metaact.hxx |1 
 vcl/source/filter/svm/SvmReader.cxx |   48 +++-
 3 files changed, 49 insertions(+), 1 deletion(-)

New commits:
commit 6cd8eeb66443dda80cf88205f33f184314d85c49
Author: panoskorovesis 
AuthorDate: Thu Jul 8 12:07:49 2021 +0300
Commit: Tomaž Vajngerl 
CommitDate: Fri Jul 9 11:46:53 2021 +0200

Add Handler for MetaPolyPolygon Read

The handler separates the MetaPolyPolygonAction::Read from metaact.hxx
Read implementation is now in SvmReader.hxx

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

diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx
index 57e97a923df4..0259dd03503c 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -50,6 +50,7 @@ public:
 rtl::Reference ChordHandler();
 rtl::Reference PolyLineHandler();
 rtl::Reference PolygonHandler();
+rtl::Reference PolyPolygonHandler();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 94d45ee0365f..aca0c4e2c493 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -486,6 +486,7 @@ public:
 virtual voidScale( double fScaleX, double fScaleY ) override;
 
 const tools::PolyPolygon&  GetPolyPolygon() const { return maPolyPoly; }
+voidSetPolyPolygon(tools::PolyPolygon& rPolyPoly) { 
maPolyPoly = rPolyPoly; }
 };
 
 class SAL_DLLPUBLIC_RTTI MetaTextAction final : public MetaAction
diff --git a/vcl/source/filter/svm/SvmReader.cxx 
b/vcl/source/filter/svm/SvmReader.cxx
index 4e4242665c6e..ffd17c5761ee 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -192,7 +192,7 @@ rtl::Reference 
SvmReader::MetaActionHandler(ImplMetaReadData* pData)
 return PolygonHandler();
 break;
 case MetaActionType::POLYPOLYGON:
-pAction = new MetaPolyPolygonAction;
+return PolyPolygonHandler();
 break;
 case MetaActionType::TEXT:
 pAction = new MetaTextAction;
@@ -592,4 +592,50 @@ rtl::Reference SvmReader::PolygonHandler()
 
 return pAction;
 }
+
+rtl::Reference SvmReader::PolyPolygonHandler()
+{
+auto pAction = new MetaPolyPolygonAction();
+
+VersionCompatRead aCompat(mrStream);
+tools::PolyPolygon aPolyPolygon;
+ReadPolyPolygon(mrStream, aPolyPolygon); // Version 1
+
+if (aCompat.GetVersion() < 2) // Version 2
+{
+pAction->SetPolyPolygon(aPolyPolygon);
+return pAction;
+}
+
+sal_uInt16 nNumberOfComplexPolygons(0);
+mrStream.ReadUInt16(nNumberOfComplexPolygons);
+const size_t nMinRecordSize = sizeof(sal_uInt16);
+const size_t nMaxRecords = mrStream.remainingSize() / nMinRecordSize;
+if (nNumberOfComplexPolygons > nMaxRecords)
+{
+SAL_WARN("vcl.gdi", "Parsing error: " << nMaxRecords << " max possible 
entries, but "
+  << nNumberOfComplexPolygons
+  << " claimed, truncating");
+nNumberOfComplexPolygons = nMaxRecords;
+}
+for (sal_uInt16 i = 0; i < nNumberOfComplexPolygons; ++i)
+{
+sal_uInt16 nIndex(0);
+mrStream.ReadUInt16(nIndex);
+tools::Polygon aPoly;
+aPoly.Read(mrStream);
+if (nIndex >= aPolyPolygon.Count())
+{
+SAL_WARN("vcl.gdi", "svm contains polygon index " << nIndex
+  << " outside 
possible range "
+  << 
aPolyPolygon.Count());
+continue;
+}
+aPolyPolygon.Replace(aPoly, nIndex);
+}
+
+pAction->SetPolyPolygon(aPolyPolygon);
+
+return pAction;
+}
 /* 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: include/vcl vcl/source

2021-07-09 Thread panoskorovesis (via logerrit)
 include/vcl/filter/SvmReader.hxx|1 +
 include/vcl/metaact.hxx |1 +
 vcl/source/filter/svm/SvmReader.cxx |   24 +++-
 3 files changed, 25 insertions(+), 1 deletion(-)

New commits:
commit e9d92a40bd59954d6716e889f4925319f4ab322e
Author: panoskorovesis 
AuthorDate: Thu Jul 8 09:42:43 2021 +0300
Commit: Tomaž Vajngerl 
CommitDate: Fri Jul 9 11:45:35 2021 +0200

Add Handler for MetaPolygon Read

The handler separates the MetaPolygonAction::Read from metaact.hxx
Read implementation is now in SvmReader.hxx

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

diff --git a/include/vcl/filter/SvmReader.hxx b/include/vcl/filter/SvmReader.hxx
index f5da5b6e9f5c..57e97a923df4 100644
--- a/include/vcl/filter/SvmReader.hxx
+++ b/include/vcl/filter/SvmReader.hxx
@@ -49,6 +49,7 @@ public:
 rtl::Reference PieHandler();
 rtl::Reference ChordHandler();
 rtl::Reference PolyLineHandler();
+rtl::Reference PolygonHandler();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 4578c791d61e..94d45ee0365f 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -457,6 +457,7 @@ public:
 virtual voidScale( double fScaleX, double fScaleY ) override;
 
 const tools::Polygon& GetPolygon() const { return maPoly; }
+voidSetPolygon(tools::Polygon& rPoly) { maPoly = rPoly; }
 };
 
 class UNLESS_MERGELIBS(VCL_DLLPUBLIC) MetaPolyPolygonAction final : public 
MetaAction
diff --git a/vcl/source/filter/svm/SvmReader.cxx 
b/vcl/source/filter/svm/SvmReader.cxx
index 5406e786dfaf..4e4242665c6e 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -189,7 +189,7 @@ rtl::Reference 
SvmReader::MetaActionHandler(ImplMetaReadData* pData)
 return PolyLineHandler();
 break;
 case MetaActionType::POLYGON:
-pAction = new MetaPolygonAction;
+return PolygonHandler();
 break;
 case MetaActionType::POLYPOLYGON:
 pAction = new MetaPolyPolygonAction;
@@ -570,4 +570,26 @@ rtl::Reference SvmReader::PolyLineHandler()
 
 return pAction;
 }
+
+rtl::Reference SvmReader::PolygonHandler()
+{
+auto pAction = new MetaPolygonAction();
+
+VersionCompatRead aCompat(mrStream);
+
+tools::Polygon aPolygon;
+ReadPolygon(mrStream, aPolygon); // Version 1
+
+if (aCompat.GetVersion() >= 2) // Version 2
+{
+sal_uInt8 bHasPolyFlags(0);
+mrStream.ReadUChar(bHasPolyFlags);
+if (bHasPolyFlags)
+aPolygon.Read(mrStream);
+}
+
+pAction->SetPolygon(aPolygon);
+
+return pAction;
+}
 /* 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 'distro/collabora/co-2021' - sc/CppunitTest_sc_macros_test.mk sc/qa sc/source

2021-07-09 Thread Miklos Vajna (via logerrit)
 sc/CppunitTest_sc_macros_test.mk  |3 
 sc/qa/extras/macros-test.cxx  |   76 +-
 sc/qa/extras/testdocuments/macro-button-form-control.xlsm |binary
 sc/source/filter/excel/xeescher.cxx   |   32 -
 sc/source/filter/inc/xeescher.hxx |2 
 5 files changed, 102 insertions(+), 11 deletions(-)

New commits:
commit 9ef217144d6452fead389ec031eb6f78ba5067e7
Author: Miklos Vajna 
AuthorDate: Tue Jul 6 14:31:07 2021 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jul 9 11:26:45 2021 +0200

XLSX export: handle macros on button form controls

This builds on top of commit 1e3263a677b61c718d0fd1be15c066b933f7de18
(XLSX export: handle button form controls, 2021-07-01).

The binary XLS export already had code to turn Calc macro names into
Excel ones, reuse that for XLSX purposes.

Also fix the unwanted named range on export,
oox::xls::FormulaParser::importMacroName() mentions how XLSX doesn't
have matching named ranges for vba macros (while XLS has), mirror this
on the export side as well.

(cherry picked from commit 7e7a871bcd4f923b015a7e040969335696b434c6)

Conflicts:
sc/source/filter/excel/xeescher.cxx

Change-Id: I877b6ba2c2e834a2327482da5cadcddf1b4672bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118563
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Luboš Luňák 

diff --git a/sc/CppunitTest_sc_macros_test.mk b/sc/CppunitTest_sc_macros_test.mk
index e0852b653598..b4f62624e693 100644
--- a/sc/CppunitTest_sc_macros_test.mk
+++ b/sc/CppunitTest_sc_macros_test.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_CppunitTest_CppunitTest,sc_macros_test))
 $(eval $(call gb_CppunitTest_use_externals,sc_macros_test, \
 boost_headers \
 mdds_headers \
+libxml2 \
 ))
 
 $(eval $(call gb_CppunitTest_use_common_precompiled_header,sc_macros_test))
@@ -37,6 +38,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sc_macros_test, \
 sax \
 sb \
 sc \
+scqahelper \
 sfx \
 sot \
 subsequenttest \
@@ -58,6 +60,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sc_macros_test, \
 $(eval $(call gb_CppunitTest_set_include,sc_macros_test,\
 -I$(SRCDIR)/sc/source/ui/inc \
 -I$(SRCDIR)/sc/inc \
+-I$(SRCDIR)/sc/qa/unit \
 $$(INCLUDE) \
 ))
 
diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index 9322a3eab7cd..adc451127108 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -14,6 +14,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -25,13 +26,17 @@
 #include 
 #include 
 
+#include 
+
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 
 /* Implementation of Macros test */
 
-class ScMacrosTest : public UnoApiTest
+class ScMacrosTest : public UnoApiTest, public XmlTestTools
 {
+protected:
+void registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) override;
 public:
 ScMacrosTest();
 void saveAndReload(css::uno::Reference& xComponent,
@@ -55,6 +60,7 @@ public:
 void testTdf43003();
 void testTdf138646();
 void testTdf90278();
+void testMacroButtonFormControlXlsxExport();
 
 CPPUNIT_TEST_SUITE(ScMacrosTest);
 CPPUNIT_TEST(testStarBasic);
@@ -75,10 +81,47 @@ public:
 CPPUNIT_TEST(testTdf43003);
 CPPUNIT_TEST(testTdf138646);
 CPPUNIT_TEST(testTdf90278);
+CPPUNIT_TEST(testMacroButtonFormControlXlsxExport);
 
 CPPUNIT_TEST_SUITE_END();
 };
 
+void ScMacrosTest::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx)
+{
+static const struct { xmlChar* pPrefix; xmlChar* pURI; } aNamespaces[] =
+{
+{ BAD_CAST("w"), 
BAD_CAST("http://schemas.openxmlformats.org/wordprocessingml/2006/main";) },
+{ BAD_CAST("x"), 
BAD_CAST("http://schemas.openxmlformats.org/spreadsheetml/2006/main";) },
+{ BAD_CAST("v"), BAD_CAST("urn:schemas-microsoft-com:vml") },
+{ BAD_CAST("c"), 
BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/chart";) },
+{ BAD_CAST("a"), 
BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/main";) },
+{ BAD_CAST("mc"), 
BAD_CAST("http://schemas.openxmlformats.org/markup-compatibility/2006";) },
+{ BAD_CAST("wps"), 
BAD_CAST("http://schemas.microsoft.com/office/word/2010/wordprocessingShape";) },
+{ BAD_CAST("wpg"), 
BAD_CAST("http://schemas.microsoft.com/office/word/2010/wordprocessingGroup";) },
+{ BAD_CAST("wp"), 
BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing";)
 },
+{ BAD_CAST("office"), 
BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:office:1.0") },
+{ BAD_CAST("table"), 
BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:table:1.0") },
+{ BAD_CAST("text"), 
BAD_CAST("urn:oasis:names:tc:opendocument:xmlns:text:1.0") },
+{ BAD_CAST("style"), 
BAD_CAST("urn:oasis:names:tc:opendoc

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

2021-07-09 Thread Caolán McNamara (via logerrit)
 sw/source/core/edit/edtab.cxx |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 5ea8b62575eca6527310c9f51a418f3fae420e66
Author: Caolán McNamara 
AuthorDate: Fri Dec 11 09:03:51 2020 +
Commit: Michael Stahl 
CommitDate: Fri Jul 9 11:20:08 2021 +0200

cid#1470585 Dereference null return value

Change-Id: If2a3eae843753a06d2f3fa9ac31acc9470cb6982
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107584
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 2c0930f19e269348a2aadc0ffe69ff23d04d7cc1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118616
Reviewed-by: Michael Stahl 

diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index b598e4754a70..03e951e2509c 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -148,17 +148,19 @@ bool SwEditShell::TextToTable( const 
SwInsertTableOptions& rInsTableOpts,
 bool SwEditShell::TableToText( sal_Unicode cCh )
 {
 SwWait aWait( *GetDoc()->GetDocShell(), true );
-bool bRet = false;
 SwPaM* pCursor = GetCursor();
 const SwTableNode* pTableNd =
 GetDoc()->IsIdxInTable( pCursor->GetPoint()->nNode );
+if (!pTableNd)
+return false;
+
 if( IsTableMode() )
 {
 ClearMark();
 pCursor = GetCursor();
 }
-else if( !pTableNd || pCursor->GetNext() != pCursor )
-return bRet;
+else if (pCursor->GetNext() != pCursor)
+return false;
 
 // TL_CHART2:
 // tell the charts about the table to be deleted and have them use their 
own data
@@ -177,7 +179,7 @@ bool SwEditShell::TableToText( sal_Unicode cCh )
 
 //Modified for bug #i119954# Application crashed if undo/redo convert nest 
table to text
 StartUndo();
-bRet = ConvertTableToText( pTableNd, cCh );
+bool bRet = ConvertTableToText( pTableNd, cCh );
 EndUndo();
 //End  for bug #i119954#
 pCursor->GetPoint()->nNode = aTabIdx;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-09 Thread Caolán McNamara (via logerrit)
 svx/source/accessibility/GraphCtlAccessibleContext.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b8dbe5fe8445cacca919a04611bb09ac4c15937d
Author: Caolán McNamara 
AuthorDate: Thu Jul 8 10:04:10 2021 +0100
Commit: Michael Stahl 
CommitDate: Fri Jul 9 11:18:47 2021 +0200

return value of PixelToLogic ignored

the other uses of SdrObjListPrimitiveHit operate in Logic Position

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

diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx 
b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
index ffe195b4d990..25a271063bc5 100644
--- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx
+++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
@@ -176,7 +176,7 @@ Reference< XAccessible > SAL_CALL 
SvxGraphCtrlAccessibleContext::getAccessibleAt
 }
 
 Point aPnt( rPoint.X, rPoint.Y );
-mpControl->GetDrawingArea()->get_ref_device().PixelToLogic( aPnt );
+aPnt = mpControl->GetDrawingArea()->get_ref_device().PixelToLogic(aPnt);
 
 SdrObject* pObj = nullptr;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sd/source

2021-07-09 Thread Caolán McNamara (via logerrit)
 sd/source/ui/view/drviewsj.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f2290187dcd59f159c560a47629b5d3897be1864
Author: Caolán McNamara 
AuthorDate: Thu Jul 8 14:15:12 2021 +0100
Commit: Michael Stahl 
CommitDate: Fri Jul 9 11:17:54 2021 +0200

Resolves: tdf#143153 null-deref on grouping fit-to-frame obj with another

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

diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx
index 47cbb175ddf4..9eebdbc57c29 100644
--- a/sd/source/ui/view/drviewsj.cxx
+++ b/sd/source/ui/view/drviewsj.cxx
@@ -271,7 +271,8 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
 if( SfxItemState::DEFAULT == rSet.GetItemState( 
SID_OUTLINE_TEXT_AUTOFIT ) )
 {
 const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
-const bool bSet = 
pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE)->GetValue()
 != drawing::TextFitToSizeType_NONE;
+const SdrTextFitToSizeTypeItem* pItem = 
pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE);
+const bool bSet = pItem && pItem->GetValue() != 
drawing::TextFitToSizeType_NONE;
 rSet.Put(SfxBoolItem(SID_OUTLINE_TEXT_AUTOFIT, bSet));
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sfx2/source

2021-07-09 Thread Caolán McNamara (via logerrit)
 sfx2/source/sidebar/TabBar.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 80f5f74b661b52717ec2848b98cad3be8192b330
Author: Caolán McNamara 
AuthorDate: Thu Jul 8 13:48:35 2021 +0100
Commit: Michael Stahl 
CommitDate: Fri Jul 9 11:16:36 2021 +0200

tdf#143146 copy functor and arg before calling function that can delete this

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

diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index 8164c3e34884..881ec8f78fc2 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -248,13 +248,17 @@ TabBar::Item::~Item()
 mrTabBar.GetContainer()->move(mxButton.get(), nullptr);
 }
 
-
 IMPL_LINK_NOARG(TabBar::Item, HandleClick, const OString&, void)
 {
+// tdf#143146 copy the functor and arg before calling
+// GrabFocusToDocument which may destroy this object
+auto aDeckActivationFunctor = maDeckActivationFunctor;
+auto sDeckId = msDeckId;
+
 mrTabBar.GrabFocusToDocument();
 try
 {
-maDeckActivationFunctor(msDeckId);
+aDeckActivationFunctor(sDeckId);
 }
 catch(const css::uno::Exception&)
 {} // workaround for #i123198#
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-09 Thread Caolán McNamara (via logerrit)
 sc/source/filter/xml/XMLExportDatabaseRanges.cxx |9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

New commits:
commit 7699d89a5e8a442a77504260d70048392110b232
Author: Caolán McNamara 
AuthorDate: Fri Jul 9 09:04:38 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 9 11:15:52 2021 +0200

cid#1487029 Identical code for different branches

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

diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx 
b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
index 106f24e593c2..db50c1ecd703 100644
--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
@@ -481,14 +481,7 @@ private:
 
 // Store the 1st value for backward compatibility.
 const ScQueryEntry::Item& rItem = rItems.front();
-if (rItem.meType == ScQueryEntry::ByValue)
-{
-mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_VALUE, 
rItem.maString.getString());
-}
-else
-{
-mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_VALUE, 
rItem.maString.getString());
-}
+mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_VALUE, 
rItem.maString.getString());
 mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OPERATOR, 
OUString("="));
 mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_FIELD_NUMBER, 
OUString::number(rEntry.nField - nFieldStart));
 if (bCaseSens)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - libreofficekit/source

2021-07-09 Thread Caolán McNamara (via logerrit)
 libreofficekit/source/gtk/lokdocview.cxx |   14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

New commits:
commit 087c9fe1ba0ad5c83745605d78715d5489762345
Author: Caolán McNamara 
AuthorDate: Sat Mar 20 20:14:43 2021 +
Commit: Michael Stahl 
CommitDate: Fri Jul 9 11:15:26 2021 +0200

cid#1478187 Resource leak

Change-Id: Ib63d25e358f81c428fcbbb502650c37d016b6b44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112821
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
(cherry picked from commit da86cd492c5a04c42086985e17ae84d63bdedd0b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118617
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index c1fcc5542750..156224b57351 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -991,19 +991,28 @@ payloadToRectangle (LOKDocView* pDocView, const char* 
pPayload)
 aRet.width = aRet.height = aRet.x = aRet.y = 0;
 
 if (!*ppCoordinate)
+{
+g_strfreev(ppCoordinates);
 return aRet;
+}
 aRet.x = atoi(*ppCoordinate);
 if (aRet.x < 0)
 aRet.x = 0;
 ++ppCoordinate;
 if (!*ppCoordinate)
+{
+g_strfreev(ppCoordinates);
 return aRet;
+}
 aRet.y = atoi(*ppCoordinate);
 if (aRet.y < 0)
 aRet.y = 0;
 ++ppCoordinate;
 if (!*ppCoordinate)
+{
+g_strfreev(ppCoordinates);
 return aRet;
+}
 long l = atol(*ppCoordinate);
 if (l > std::numeric_limits::max())
 aRet.width = std::numeric_limits::max();
@@ -1013,7 +1022,10 @@ payloadToRectangle (LOKDocView* pDocView, const char* 
pPayload)
 aRet.width = priv->m_nDocumentWidthTwips - aRet.x;
 ++ppCoordinate;
 if (!*ppCoordinate)
+{
+g_strfreev(ppCoordinates);
 return aRet;
+}
 l = atol(*ppCoordinate);
 if (l > std::numeric_limits::max())
 aRet.height = std::numeric_limits::max();
@@ -1021,8 +1033,8 @@ payloadToRectangle (LOKDocView* pDocView, const char* 
pPayload)
 aRet.height = l;
 if (aRet.y + aRet.height > priv->m_nDocumentHeightTwips)
 aRet.height = priv->m_nDocumentHeightTwips - aRet.y;
-g_strfreev(ppCoordinates);
 
+g_strfreev(ppCoordinates);
 return aRet;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-09 Thread Caolán McNamara (via logerrit)
 sw/source/core/view/viewsh.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 99a5de001d635db05a92f8889d1703024205cc75
Author: Caolán McNamara 
AuthorDate: Tue Dec 1 14:13:50 2020 +
Commit: Michael Stahl 
CommitDate: Fri Jul 9 11:13:57 2021 +0200

cid#1470368 Unchecked dynamic_cast

Change-Id: Ie67501aea8df37e894edfecf75e2338709535253
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106986
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
(cherry picked from commit 52a69f41e992efa2abc2e2e94414a2547df71329)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118620
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 2f4aee28b52b..c53be1dea5b7 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -2155,7 +2155,7 @@ IsCursorInFieldmarkHidden(SwPaM const& rCursor, 
sw::FieldmarkMode const eMode)
 if (*rCursor.GetPoint() < (**iter).GetMarkEnd())
 {
 SwPosition const sepPos(sw::mark::FindFieldSep(
-*dynamic_cast(*iter)));
+dynamic_cast(**iter)));
 if (eMode == sw::FieldmarkMode::ShowResult)
 {
 if (*rCursor.GetPoint() <= sepPos
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - libreofficekit/source

2021-07-09 Thread Caolán McNamara (via logerrit)
 libreofficekit/source/gtk/lokdocview.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 531886dd79edb6637685e9f7b9961257a3ad4a06
Author: Caolán McNamara 
AuthorDate: Sun Mar 21 14:38:36 2021 +
Commit: Michael Stahl 
CommitDate: Fri Jul 9 11:12:57 2021 +0200

cid#1474127 Unchecked return value from library

Change-Id: I6dac6f24d33ce4557ab94ff08357e597819510d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112839
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
(cherry picked from commit 9456a764a98daa2915f6fefac336d8bb5cff531a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118619
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index 2a4b90cc8de5..c1fcc5542750 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -2776,10 +2776,10 @@ static gboolean lok_doc_view_initable_init (GInitable 
*initable, GCancellable* /
 return true;
 
 if (priv->m_bUnipoll)
-g_setenv("SAL_LOK_OPTIONS", "unipoll", FALSE);
+(void)g_setenv("SAL_LOK_OPTIONS", "unipoll", FALSE);
 
 static const char testingLangs[] = "de_DE en_GB en_US es_ES fr_FR it nl 
pt_BR pt_PT ru";
-g_setenv("LOK_ALLOWLIST_LANGUAGES", testingLangs, FALSE);
+(void)g_setenv("LOK_ALLOWLIST_LANGUAGES", testingLangs, FALSE);
 
 priv->m_pOffice = lok_init_2(priv->m_aLOPath.c_str(), 
priv->m_aUserProfileURL.empty() ? nullptr : priv->m_aUserProfileURL.c_str());
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - libreofficekit/qa

2021-07-09 Thread Caolán McNamara (via logerrit)
 libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx |   42 +++
 1 file changed, 22 insertions(+), 20 deletions(-)

New commits:
commit a204ab6e8b1c1eabf5318b618d7e2ed2837d9126
Author: Caolán McNamara 
AuthorDate: Sat Mar 20 20:11:25 2021 +
Commit: Michael Stahl 
CommitDate: Fri Jul 9 11:12:23 2021 +0200

cid#1474277 Resource leak

and...

cid#1474319 Resource leak
cid#1473965 Resource leak
cid#1474109 Resource leak
cid#1474179 Resource leak

Change-Id: I7daba2a0173a7fe7a912c0febf7957667f0fae83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112822
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 4efc4a43ff481661990b304f9599f811db39f7dc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118618
Reviewed-by: Michael Stahl 

diff --git a/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx 
b/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx
index fef712ceef0a..be7cd4445536 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx
@@ -38,8 +38,8 @@ void btn_clicked(GtkWidget* pButton, gpointer)
 GtvHelpers::userPromptDialog(GTK_WINDOW(window), "Insert Comment", 
aEntries);
 
 boost::property_tree::ptree aTree;
-aTree.put(boost::property_tree::ptree::path_type(g_strconcat("Text", 
"/", "type", nullptr), '/'), "string");
-aTree.put(boost::property_tree::ptree::path_type(g_strconcat("Text", 
"/", "value", nullptr), '/'), aEntries["Text"]);
+aTree.put(boost::property_tree::ptree::path_type("Text/type", '/'), 
"string");
+aTree.put(boost::property_tree::ptree::path_type("Text/value", '/'), 
aEntries["Text"]);
 
 std::stringstream aStream;
 boost::property_tree::write_json(aStream, aTree);
@@ -191,8 +191,12 @@ static void iterateUnoParams(GtkWidget* pWidget, gpointer 
userdata)
 unoParam[i] = gtk_entry_get_text(GTK_ENTRY(pIt->data));
 }
 
-pTree->put(boost::property_tree::ptree::path_type(g_strconcat(unoParam[1], 
"/", "type", nullptr), '/'), unoParam[0]);
-pTree->put(boost::property_tree::ptree::path_type(g_strconcat(unoParam[1], 
"/", "value", nullptr), '/'), unoParam[2]);
+gchar* pPath = g_strconcat(unoParam[1], "/", "type", nullptr);
+pTree->put(boost::property_tree::ptree::path_type(pPath, '/'), 
unoParam[0]);
+g_free(pPath);
+pPath = g_strconcat(unoParam[1], "/", "value", nullptr);
+pTree->put(boost::property_tree::ptree::path_type(pPath, '/'), 
unoParam[2]);
+g_free(pPath);
 }
 
 void recentUnoChanged( GtkWidget* pSelector, gpointer /* pItem */ )
@@ -256,11 +260,9 @@ void unoCommandDebugger(GtkWidget* pButton, gpointer /* 
pItem */)
 gtk_widget_show_all(pUnoCmdDialog);
 
 gint res = gtk_dialog_run (GTK_DIALOG(pUnoCmdDialog));
-switch (res)
-{
-case GTK_RESPONSE_OK:
+if (res == GTK_RESPONSE_OK)
 {
-const gchar* sUnoCmd = g_strconcat(".uno:", 
gtk_entry_get_text(GTK_ENTRY(pUnoCmdEntry)), nullptr);
+gchar* sUnoCmd = g_strconcat(".uno:", 
gtk_entry_get_text(GTK_ENTRY(pUnoCmdEntry)), nullptr);
 
 boost::property_tree::ptree aTree;
 gtk_container_foreach(GTK_CONTAINER(pUnoParamAreaBox), 
iterateUnoParams, &aTree);
@@ -273,8 +275,8 @@ void unoCommandDebugger(GtkWidget* pButton, gpointer /* 
pItem */)
 
 lok_doc_view_post_command(LOK_DOC_VIEW(window->lokdocview), sUnoCmd, 
(aArguments.empty() ? nullptr : aArguments.c_str()), false);
 addToRecentUnoCommands(window, sUnoCmd, aArguments);
-}
-break;
+
+g_free(sUnoCmd);
 }
 
 gtk_widget_destroy(pUnoCmdDialog);
@@ -649,11 +651,11 @@ void editButtonClicked(GtkWidget* pWidget, gpointer 
userdata)
 gchar *commentId = 
static_cast(g_object_get_data(G_OBJECT(userdata), "id"));
 
 boost::property_tree::ptree aTree;
-aTree.put(boost::property_tree::ptree::path_type(g_strconcat("Id", "/", 
"type", nullptr), '/'), "string");
-aTree.put(boost::property_tree::ptree::path_type(g_strconcat("Id", "/", 
"value", nullptr), '/'), std::string(commentId));
+aTree.put(boost::property_tree::ptree::path_type("Id/type", '/'), 
"string");
+aTree.put(boost::property_tree::ptree::path_type("Id/value", '/'), 
std::string(commentId));
 
-aTree.put(boost::property_tree::ptree::path_type(g_strconcat("Text", "/", 
"type", nullptr), '/'), "string");
-aTree.put(boost::property_tree::ptree::path_type(g_strconcat("Text", "/", 
"value", nullptr), '/'), aEntries["Text"]);
+aTree.put(boost::property_tree::ptree::path_type("Text/type", '/'), 
"string");
+aTree.put(boost::property_tree::ptree::path_type("Text/value", '/'), 
aEntries["Text"]);
 
 std::stringstream aStream;
 boost::property_tree::write_json(aStream, aTree);
@@ -673,11 +675,11 @@ void replyButtonClicked(GtkWidget* pWidget, gpointer 
userdata)
 gchar *commentId = 
static_cast(g_

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - starmath/source

2021-07-09 Thread dante (via logerrit)
 starmath/source/mathmlimport.cxx |   18 --
 1 file changed, 4 insertions(+), 14 deletions(-)

New commits:
commit d18161a90d36b167e9ddd5440be332198b06841d
Author: dante 
AuthorDate: Tue Dec 1 21:00:33 2020 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Jul 9 10:49:23 2021 +0200

Doubled code correction

Change-Id: I391cb0f51788034e358889bb4aaf38c3824cac2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107010
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit e8c8af66c4bc63d9761508b4d24f5d1dd4050b79)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118601
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 543a8d02fcb2..2df8e642d925 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -1415,20 +1415,10 @@ void SmXMLOperatorContext_Impl::TCharacters(const 
OUString &rChars)
 aToken.cMathChar = rChars[0];
 SmToken bToken;
 if( bIsFenced ){
-if( bIsStretchy )
-{
-if( isPrefix ) bToken = 
starmathdatabase::Identify_Prefix_SmXMLOperatorContext_Impl( aToken.cMathChar );
-else if( isInfix ) bToken = SmToken( TMLINE, MS_VERTLINE, "mline", 
TG::NONE, 0 );
-else if( isPostfix ) bToken = 
starmathdatabase::Identify_Postfix_SmXMLOperatorContext_Impl( aToken.cMathChar 
);
-else bToken = 
starmathdatabase::Identify_PrefixPostfix_SmXMLOperatorContext_Impl( 
aToken.cMathChar );
-}
-else
-{
-if( isPrefix ) bToken = 
starmathdatabase::Identify_Prefix_SmXMLOperatorContext_Impl( aToken.cMathChar );
-else if( isInfix ) bToken = SmToken( TMLINE, MS_VERTLINE, "mline", 
TG::NONE, 0 );
-else if( isPostfix ) bToken = 
starmathdatabase::Identify_Postfix_SmXMLOperatorContext_Impl( aToken.cMathChar 
);
-else bToken = 
starmathdatabase::Identify_PrefixPostfix_SmXMLOperatorContext_Impl( 
aToken.cMathChar );
-}
+if( isPrefix ) bToken = 
starmathdatabase::Identify_Prefix_SmXMLOperatorContext_Impl( aToken.cMathChar );
+else if( isInfix ) bToken = SmToken( TMLINE, MS_VERTLINE, "mline", 
TG::NONE, 0 );
+else if( isPostfix ) bToken = 
starmathdatabase::Identify_Postfix_SmXMLOperatorContext_Impl( aToken.cMathChar 
);
+else bToken = 
starmathdatabase::Identify_PrefixPostfix_SmXMLOperatorContext_Impl( 
aToken.cMathChar );
 }
 else bToken = starmathdatabase::Identify_SmXMLOperatorContext_Impl( 
aToken.cMathChar, bIsStretchy );
 if( bToken.eType != TERROR ) aToken = bToken;
___
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' - sfx2/source

2021-07-09 Thread Miklos Vajna (via logerrit)
 sfx2/source/view/viewsh.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit e3bbc3c712c9e7eab603fcea0882b154f9b3dfc6
Author: Miklos Vajna 
AuthorDate: Thu Jul 8 11:49:13 2021 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jul 9 10:15:28 2021 +0200

sfx2: fix uninitialized SfxViewShell::mbLOKIsFreemiumView

Introduced in commit 1b9fe58acb7b5bbbc83ecca30e17663fff7f0db4 (LOK:
introduced Freemium LOK API, 2021-06-02).

Change-Id: Ifdd6c13a64a167fa00b0305441c52340167f3809
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118632
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Pranam Lashkari 
(cherry picked from commit d6811bd47a255d40aeb4509c7011fa7d9e75e3f3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118639
Reviewed-by: Miklos Vajna 

diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index d7790fcdb6f5..2b97061fa8da 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1087,6 +1087,7 @@ SfxViewShell::SfxViewShell
 ,   maLOKLanguageTag(LANGUAGE_NONE)
 ,   maLOKLocale(LANGUAGE_NONE)
 ,   maLOKDeviceFormFactor(LOKDeviceFormFactor::UNKNOWN)
+,   mbLOKIsFreemiumView(false)
 {
 SetMargin( pViewFrame->GetMargin_Impl() );
 
___
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' - sd/source

2021-07-09 Thread Caolán McNamara (via logerrit)
 sd/source/ui/view/drviewsj.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 3e3e0bd5a4952506aad1ee88c037f045ef594d54
Author: Caolán McNamara 
AuthorDate: Thu Jul 8 14:15:12 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Jul 9 10:00:09 2021 +0200

Resolves: tdf#143153 null-deref on grouping fit-to-frame obj with another

Change-Id: I134d15ac980aa34ff274abd03966cd7948390542
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118627
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx
index 47cbb175ddf4..9eebdbc57c29 100644
--- a/sd/source/ui/view/drviewsj.cxx
+++ b/sd/source/ui/view/drviewsj.cxx
@@ -271,7 +271,8 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
 if( SfxItemState::DEFAULT == rSet.GetItemState( 
SID_OUTLINE_TEXT_AUTOFIT ) )
 {
 const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
-const bool bSet = 
pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE)->GetValue()
 != drawing::TextFitToSizeType_NONE;
+const SdrTextFitToSizeTypeItem* pItem = 
pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE);
+const bool bSet = pItem && pItem->GetValue() != 
drawing::TextFitToSizeType_NONE;
 rSet.Put(SfxBoolItem(SID_OUTLINE_TEXT_AUTOFIT, bSet));
 }
 
___
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' - svx/uiconfig

2021-07-09 Thread Caolán McNamara (via logerrit)
 svx/uiconfig/ui/sidebartextcolumnspanel.ui |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 72ab4596657fd71311b9d40f7d8a9236adab425a
Author: Caolán McNamara 
AuthorDate: Thu Jul 8 14:05:56 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Jul 9 09:59:34 2021 +0200

Related: tdf#143153 these are GtkBox properties not GtkGrid ones

nothing to do with the crash though

Change-Id: If7645a904de9147d20f548017bf5390fc57af6cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118626
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/svx/uiconfig/ui/sidebartextcolumnspanel.ui 
b/svx/uiconfig/ui/sidebartextcolumnspanel.ui
index 42b93c64f213..47d6fd0977ca 100644
--- a/svx/uiconfig/ui/sidebartextcolumnspanel.ui
+++ b/svx/uiconfig/ui/sidebartextcolumnspanel.ui
@@ -98,9 +98,8 @@
 
   
   
-False
-True
-0
+0
+0
   
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-09 Thread Caolán McNamara (via logerrit)
 vcl/source/app/salvtables.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 5dbcf65d6999c835ac750a216f46ffe585f9018e
Author: Caolán McNamara 
AuthorDate: Thu Jul 8 15:37:40 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 9 09:57:40 2021 +0200

SetParentToDefaultWindow doesn't change parent anymore

but for SalInstanceContainer::move with a null destination
we do want to move the widget out of the parent to 'somewhere else'
and vcl (unlike gtk) will complain if the new parent is null
so continue to use the DefaultWindow as the temporary home.

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

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 2a93a80711de..1dd49323e90d 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1212,10 +1212,14 @@ void SalInstanceContainer::move(weld::Widget* pWidget, 
weld::Container* pNewPare
 assert(pVclWidget);
 SalInstanceContainer* pNewVclParent = 
dynamic_cast(pNewParent);
 assert(!pNewParent || pNewVclParent);
+vcl::Window* pVclWindow = pVclWidget->getWidget();
 if (pNewVclParent)
-pVclWidget->getWidget()->SetParent(pNewVclParent->getWidget());
+pVclWindow->SetParent(pNewVclParent->getWidget());
 else
-pVclWidget->getWidget()->SetParentToDefaultWindow();
+{
+pVclWindow->Hide();
+pVclWindow->SetParent(ImplGetDefaultWindow());
+}
 }
 
 void SalInstanceContainer::child_grab_focus()
___
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' - sfx2/source

2021-07-09 Thread Caolán McNamara (via logerrit)
 sfx2/source/sidebar/TabBar.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 95315e4a0cce767500e35fc32aa7aa25ca54c308
Author: Caolán McNamara 
AuthorDate: Thu Jul 8 13:48:35 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Jul 9 09:57:42 2021 +0200

tdf#143146 copy functor and arg before calling function that can delete this

Change-Id: I4e29fe6fa4119b709e31156afc5c2a5d08cdc072
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118624
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index eda97378bcae..540136c447f7 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -251,13 +251,17 @@ TabBar::Item::~Item()
 mrTabBar.GetContainer()->move(mxButton.get(), nullptr);
 }
 
-
 IMPL_LINK_NOARG(TabBar::Item, HandleClick, const OString&, void)
 {
+// tdf#143146 copy the functor and arg before calling
+// GrabFocusToDocument which may destroy this object
+auto aDeckActivationFunctor = maDeckActivationFunctor;
+auto sDeckId = msDeckId;
+
 mrTabBar.GrabFocusToDocument();
 try
 {
-maDeckActivationFunctor(msDeckId);
+aDeckActivationFunctor(sDeckId);
 }
 catch(const css::uno::Exception&)
 {} // workaround for #i123198#
___
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' - vcl/source

2021-07-09 Thread Caolán McNamara (via logerrit)
 vcl/source/app/salvtables.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit ad980a729fa5773c12339452518aa7c4e56f1fb5
Author: Caolán McNamara 
AuthorDate: Thu Jul 8 15:37:40 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Jul 9 09:57:22 2021 +0200

SetParentToDefaultWindow doesn't change parent anymore

but for SalInstanceContainer::move with a null destination
we do want to move the widget out of the parent to 'somewhere else'
and vcl (unlike gtk) will complain if the new parent is null
so continue to use the DefaultWindow as the temporary home.

Change-Id: I3d738c11c3a1c07402d1a926d890caf3e657bca2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118652
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 2b1908f55834..1bab62fdf101 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1212,10 +1212,14 @@ void SalInstanceContainer::move(weld::Widget* pWidget, 
weld::Container* pNewPare
 assert(pVclWidget);
 SalInstanceContainer* pNewVclParent = 
dynamic_cast(pNewParent);
 assert(!pNewParent || pNewVclParent);
+vcl::Window* pVclWindow = pVclWidget->getWidget();
 if (pNewVclParent)
-pVclWidget->getWidget()->SetParent(pNewVclParent->getWidget());
+pVclWindow->SetParent(pNewVclParent->getWidget());
 else
-pVclWidget->getWidget()->SetParentToDefaultWindow();
+{
+pVclWindow->Hide();
+pVclWindow->SetParent(ImplGetDefaultWindow());
+}
 }
 
 void SalInstanceContainer::child_grab_focus()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-09 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 4c24250cd52ab36ae0a44459675752ec22530f42
Author: Caolán McNamara 
AuthorDate: Thu Jul 8 16:15:59 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 9 09:57:13 2021 +0200

gtk4: use gtk_widget_get_preferred_size instead of gtk_widget_size_request

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

diff --git a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx 
b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
index 14f7762fd7b0..c6f1b72c9c0b 100644
--- a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx
@@ -1139,6 +1139,8 @@ static void HackWidthToFirst(GtkComboBox *pWidget)
 GtkRequisition requisition;
 #if !GTK_CHECK_VERSION(4, 0, 0)
 gtk_widget_size_request(GTK_WIDGET(pWidget), &requisition);
+#else
+gtk_widget_get_preferred_size(GTK_WIDGET(pWidget), &requisition, nullptr);
 #endif
 gtk_widget_set_size_request(GTK_WIDGET(pWidget), requisition.width, -1);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-09 Thread Caolán McNamara (via logerrit)
 include/vcl/window.hxx |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 9f918b1dbe687e330e424413f09a0a41bac3af32
Author: Caolán McNamara 
AuthorDate: Thu Jul 8 20:57:19 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 9 09:56:51 2021 +0200

can avoid exporting the Compat methods

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

diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 0deb36dad6fd..a0bc04cd4523 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -563,6 +563,14 @@ public:
 SAL_DLLPRIVATE void ImplCallResize();
 SAL_DLLPRIVATE void ImplCallMove();
 
+// These methods call the relevant virtual method when not in/post dispose
+SAL_DLLPRIVATE void CompatGetFocus();
+SAL_DLLPRIVATE void CompatLoseFocus();
+SAL_DLLPRIVATE void CompatStateChanged( StateChangedType 
nStateChange );
+SAL_DLLPRIVATE void CompatDataChanged( const 
DataChangedEvent& rDCEvt );
+SAL_DLLPRIVATE bool CompatPreNotify( NotifyEvent& rNEvt );
+SAL_DLLPRIVATE bool CompatNotify( NotifyEvent& rNEvt );
+
void IncModalCount();
void DecModalCount();
 
@@ -765,14 +773,6 @@ public:
 virtual boolPreNotify( NotifyEvent& rNEvt );
 virtual boolEventNotify( NotifyEvent& rNEvt );
 
-// These methods call the relevant virtual method when not in/post dispose
-voidCompatGetFocus();
-voidCompatLoseFocus();
-voidCompatStateChanged( StateChangedType 
nStateChange );
-voidCompatDataChanged( const 
DataChangedEvent& rDCEvt );
-boolCompatPreNotify( NotifyEvent& rNEvt );
-boolCompatNotify( NotifyEvent& rNEvt );
-
 voidAddEventListener( const 
Link& rEventListener );
 voidRemoveEventListener( const 
Link& rEventListener );
 voidAddChildEventListener( const 
Link& rEventListener );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: ESC meeting minutes: 2021-07-08

2021-07-09 Thread Michael Stahl

On 08/07/2021 17.01, Noel Grandin wrote:

* What’s cooking (Miklos)
   + Noel looked at UNO-level weak references, performance → found a
different solution for a11y


Our a11y is fundamentally slow because it always builds a parallel 
object hierarchy of ~everything, UI and document model.


And because it makes extensive use of weak pointers, and ours are even 
slower than std::weak_ptr (which is not high performance itself).


Ideally, we should be building the a11y stuff on-demand, but that it 
just too deep of a change to be achievable.


I'm playing with the idea of saying:

     Everything inside the soffice binary __must__ use OWeakObject and 
css::uno::WeakReference to do any weak stuff.


and then I can specialise the weak object implementation into two - one 
fast one for everything inside the process, and a slow one for handling 
cross-process weak pointers.


weak pointers are fun, i remember spending days tracking down data races 
in the implementation.


does an in-process JVM count as cross-process for this purpose?
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sal/qa sal/rtl

2021-07-09 Thread Stephan Bergmann (via logerrit)
 sal/qa/rtl/math/test-rtl-math.cxx |   14 ++
 sal/rtl/math.cxx  |7 ++-
 2 files changed, 20 insertions(+), 1 deletion(-)

New commits:
commit 9d27a44e8b79373573ea038d8a44874785036fd3
Author: Stephan Bergmann 
AuthorDate: Thu Jul 8 15:36:29 2021 +0200
Commit: Michael Stahl 
CommitDate: Fri Jul 9 09:48:40 2021 +0200

Do not support +/-NaN with an explicit sign

The code accepting "NaN" had been introduced with
92dafe9862d693ce9d79269627c3e6832422874e "dba33h: #i112652#: rtl/math.h:
string<->double conversion and XMLSchema-2: [...] rtl_math_stringToDouble 
and
rtl_math_uStringToDouble support XMLSchema-2 values in addition to 
deprecated
previously supported values."  The "XMLSchema-2" mentioned in that commit 
and in
the corresponding  "ORB:
report builder not handle correctly NULL values" presumably references
 "XML Schema Part 2: Datatypes Second
Edition", where section "3.2.5 double" only supports "NaN" without a "+" or 
a
"-" sign in the lexical representation.  So stop accepting those.

(I came across this in the context of 
2b2b6405161025678f91a5625e50d0b414597368
"Reliably generate positive or negative NaN again", wondering whether this 
code
should be updated too.  But then decided that it is probably best not to 
allow
that non-standard signed NaN notation for this case, and just keep 
producing for
the "NaN" representation whatever std::numeric_limits::quiet_NaN
produces.)

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

diff --git a/sal/qa/rtl/math/test-rtl-math.cxx 
b/sal/qa/rtl/math/test-rtl-math.cxx
index f4df71e78ac3..f6ab314fbd21 100644
--- a/sal/qa/rtl/math/test-rtl-math.cxx
+++ b/sal/qa/rtl/math/test-rtl-math.cxx
@@ -74,6 +74,20 @@ public:
 CPPUNIT_ASSERT_EQUAL(sal_Int32(3), end);
 CPPUNIT_ASSERT(std::isnan(res));
 
+res = rtl::math::stringToDouble(
+OUString("+NaN"),
+'.', ',', &status, &end);
+CPPUNIT_ASSERT_EQUAL(rtl_math_ConversionStatus_Ok, status);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), end);
+CPPUNIT_ASSERT_EQUAL(0.0, res);
+
+res = rtl::math::stringToDouble(
+OUString("-NaN"),
+'.', ',', &status, &end);
+CPPUNIT_ASSERT_EQUAL(rtl_math_ConversionStatus_Ok, status);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), end);
+CPPUNIT_ASSERT_EQUAL(0.0, res);
+
 res = rtl::math::stringToDouble(
 OUString("+1.#NAN"),
 '.', ',', &status, &end);
diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx
index 5d4ed6061f97..feb3a2b1852d 100644
--- a/sal/rtl/math.cxx
+++ b/sal/rtl/math.cxx
@@ -835,16 +835,21 @@ double stringToDouble(CharT const * pBegin, CharT const * 
pEnd,
 }
 
 bool bSign;
+bool explicitSign = false;
 if (p0 != pEnd && *p0 == CharT('-'))
 {
 bSign = true;
+explicitSign = true;
 ++p0;
 }
 else
 {
 bSign = false;
 if (p0 != pEnd && *p0 == CharT('+'))
+{
+explicitSign = true;
 ++p0;
+}
 }
 
 CharT const * p = p0;
@@ -853,7 +858,7 @@ double stringToDouble(CharT const * pBegin, CharT const * 
pEnd,
 // #i112652# XMLSchema-2
 if ((pEnd - p) >= 3)
 {
-if ((CharT('N') == p[0]) && (CharT('a') == p[1])
+if (!explicitSign && (CharT('N') == p[0]) && (CharT('a') == p[1])
 && (CharT('N') == p[2]))
 {
 p += 3;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-09 Thread Miklos Vajna (via logerrit)
 sw/source/core/doc/DocumentSettingManager.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a5606b69333a6f13cc8eec8f6f47db1a2fb5fb0c
Author: Miklos Vajna 
AuthorDate: Thu Jul 8 20:25:34 2021 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jul 9 09:43:32 2021 +0200

sw: handle mbAddVerticalFlyOffsets when replacing compat options

This was added in commit 50223ea6e212b60b7d33839c2753c5601fb50f95
(tdf#98987 sw: add AddVerticalFrameOffsets compat mode, 2016-03-31),
it's off by default and is in for Word documents.

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

diff --git a/sw/source/core/doc/DocumentSettingManager.cxx 
b/sw/source/core/doc/DocumentSettingManager.cxx
index 8d9959631d7c..c418e7560451 100644
--- a/sw/source/core/doc/DocumentSettingManager.cxx
+++ b/sw/source/core/doc/DocumentSettingManager.cxx
@@ -631,7 +631,7 @@ void 
sw::DocumentSettingManager::ReplaceCompatibilityOptions(const DocumentSetti
 mbTabCompat = rSource.mbTabCompat;
 mbUseVirtualDevice = rSource.mbUseVirtualDevice;
 mbAddFlyOffsets = rSource.mbAddFlyOffsets;
-// No mbAddVerticalFlyOffsets
+mbAddVerticalFlyOffsets = rSource.mbAddVerticalFlyOffsets;
 mbAddExternalLeading = rSource.mbAddExternalLeading;
 mbUseHiResolutionVirtualDevice = rSource.mbUseHiResolutionVirtualDevice;
 mbOldLineSpacing = rSource.mbOldLineSpacing;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: ESC meeting minutes: 2021-07-08

2021-07-09 Thread Miklos Vajna
Hi Noel,

On Thu, Jul 08, 2021 at 04:56:28PM +0200, Noel Grandin  
wrote:
> >   8 CppunitTest_sw_core_undogerrit_windows
> >   9 CppunitTest_writerperfect_writergerrit_windows
> >  22 CppunitTest_sc_uicalc   gerrit_windows
> >
> >
> Can anyone else trigger these? I've tried and I can't seem to get any of
> these on my Windows box, despite running them repeatedly.

Note that this is a list of total failures. If you push a broken commit
which breaks tests and CI correctly fails, it's part of these numbers.

My understanding is that this happens because there is no easy,
automated way to differentiate false alarms and catching real badness.

Regards,

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


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

2021-07-09 Thread Dennis Francis (via logerrit)
 desktop/qa/data/table-selection.odt |binary
 desktop/qa/desktop_lib/test_desktop_lib.cxx |  121 
 2 files changed, 121 insertions(+)

New commits:
commit 658c95f7bc3ed3c62dc802d1b9bcc026462f7340
Author: Dennis Francis 
AuthorDate: Mon Jun 28 13:32:48 2021 +0530
Commit: Miklos Vajna 
CommitDate: Fri Jul 9 09:32:32 2021 +0200

lok-desktop: unit tests for LOK_CALLBACK_TABLE_SELECTED

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

diff --git a/desktop/qa/data/table-selection.odt 
b/desktop/qa/data/table-selection.odt
new file mode 100644
index ..c19f8c79fc3a
Binary files /dev/null and b/desktop/qa/data/table-selection.odt differ
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 28e9ef4ae612..d41777c5e77b 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -226,6 +226,8 @@ public:
 void testMetricField();
 void testMultiDocuments();
 void testJumpCursor();
+void testNoDuplicateTableSelection();
+void testMultiViewTableSelection();
 void testABI();
 
 CPPUNIT_TEST_SUITE(DesktopLOKTest);
@@ -289,6 +291,8 @@ public:
 CPPUNIT_TEST(testMetricField);
 CPPUNIT_TEST(testMultiDocuments);
 CPPUNIT_TEST(testJumpCursor);
+CPPUNIT_TEST(testNoDuplicateTableSelection);
+CPPUNIT_TEST(testMultiViewTableSelection);
 CPPUNIT_TEST(testABI);
 CPPUNIT_TEST_SUITE_END();
 
@@ -1946,6 +1950,8 @@ class ViewCallback
 int mnView;
 public:
 OString m_aCellFormula;
+int m_nTableSelectionCount;
+bool m_bEmptyTableSelection;
 bool m_bTilesInvalidated;
 bool m_bZeroCursor;
 tools::Rectangle m_aOwnCursor;
@@ -1954,6 +1960,8 @@ public:
 
 ViewCallback(LibLODocument_Impl* pDocument)
 : mpDocument(pDocument),
+  m_nTableSelectionCount(0),
+  m_bEmptyTableSelection(false),
   m_bTilesInvalidated(false),
   m_bZeroCursor(false)
 {
@@ -2017,6 +2025,12 @@ public:
 m_aCellFormula = aPayload;
 }
 break;
+case LOK_CALLBACK_TABLE_SELECTED:
+{
+m_bEmptyTableSelection = (std::string(pPayload).compare("{\n}\n") 
== 0);
+++m_nTableSelectionCount;
+}
+break;
 }
 }
 };
@@ -3089,6 +3103,113 @@ void DesktopLOKTest::testJumpCursor()
 comphelper::LibreOfficeKit::setTiledAnnotations(true);
 }
 
+static void lcl_repeatKeyStroke(LibLODocument_Impl *pDocument, int nCharCode, 
int nKeyCode, size_t nCount)
+{
+for (size_t nCtr = 0; nCtr < nCount; ++nCtr)
+{
+pDocument->m_pDocumentClass->postKeyEvent(pDocument, 
LOK_KEYEVENT_KEYINPUT, nCharCode, nKeyCode);
+pDocument->m_pDocumentClass->postKeyEvent(pDocument, 
LOK_KEYEVENT_KEYUP, nCharCode, nKeyCode);
+}
+}
+
+void DesktopLOKTest::testNoDuplicateTableSelection()
+{
+comphelper::LibreOfficeKit::setActive();
+LibLODocument_Impl* pDocument = loadDoc("table-selection.odt");
+
+// Create view 1.
+pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}");
+ViewCallback aView1(pDocument);
+
+lcl_repeatKeyStroke(pDocument, 0, KEY_DOWN, 1);
+Scheduler::ProcessEventsToIdle();
+CPPUNIT_ASSERT_EQUAL(1, aView1.m_nTableSelectionCount);
+CPPUNIT_ASSERT(aView1.m_bEmptyTableSelection);
+
+aView1.m_nTableSelectionCount = 0;
+// Go to Table1.
+lcl_repeatKeyStroke(pDocument, 0, KEY_DOWN, 1);
+Scheduler::ProcessEventsToIdle();
+CPPUNIT_ASSERT_EQUAL(1, aView1.m_nTableSelectionCount);
+CPPUNIT_ASSERT(!aView1.m_bEmptyTableSelection);
+
+aView1.m_nTableSelectionCount = 0;
+// Move to the last row in Table1.
+lcl_repeatKeyStroke(pDocument, 0, KEY_DOWN, 2);
+Scheduler::ProcessEventsToIdle();
+CPPUNIT_ASSERT_EQUAL(0, aView1.m_nTableSelectionCount);
+
+// Go outside Table1.
+lcl_repeatKeyStroke(pDocument, 0, KEY_DOWN, 1);
+Scheduler::ProcessEventsToIdle();
+CPPUNIT_ASSERT_EQUAL(1, aView1.m_nTableSelectionCount);
+CPPUNIT_ASSERT(aView1.m_bEmptyTableSelection);
+}
+
+void DesktopLOKTest::testMultiViewTableSelection()
+{
+comphelper::LibreOfficeKit::setActive();
+LibLODocument_Impl* pDocument = loadDoc("table-selection.odt");
+
+// Create view 1.
+pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}");
+ViewCallback aView1(pDocument);
+int nView1 = pDocument->m_pDocumentClass->getView(pDocument);
+
+// Create view 2.
+pDocument->m_pDocumentClass->createView(pDocument);
+pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}");
+ViewCallback aView2(pDocument);
+int nView2 = pDocument->m_pDocumentClass->getView(pDocument);
+
+// switch to view 1.
+pDocument->m_pDocumentClass->setView(pDocumen

[Libreoffice-commits] core.git: embeddedobj/source extensions/source hwpfilter/source jvmfwk/plugins sal/osl winaccessibility/source

2021-07-09 Thread Stephan Bergmann (via logerrit)
 embeddedobj/source/msole/olecomponent.cxx |   12 -
 extensions/source/ole/unoobjw.cxx |2 
 hwpfilter/source/hcode.cxx|4 
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx|2 
 sal/osl/w32/profile.cxx   |6 
 sal/osl/w32/salinit.cxx   |6 
 winaccessibility/source/service/AccComponentEventListener.cxx |   68 +-
 7 files changed, 50 insertions(+), 50 deletions(-)

New commits:
commit 010cf46e04907fa2503477ce4c0c85f465747034
Author: Stephan Bergmann 
AuthorDate: Fri Jul 9 08:34:31 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Jul 9 09:15:52 2021 +0200

loplugin:indentation (clang-cl)

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

diff --git a/embeddedobj/source/msole/olecomponent.cxx 
b/embeddedobj/source/msole/olecomponent.cxx
index da5b02874b07..cbcc1f6e79d7 100644
--- a/embeddedobj/source/msole/olecomponent.cxx
+++ b/embeddedobj/source/msole/olecomponent.cxx
@@ -360,13 +360,13 @@ bool OleComponentNative_Impl::ConvertDataForFlavor( const 
STGMEDIUM& aMedium,
 if ( pBuf && !bAnyIsReady )
 {
 for ( auto const & supportedFormat : 
std::as_const(m_aSupportedGraphFormats) )
- if ( aFlavor.MimeType.match( supportedFormat.MimeType )
+if ( aFlavor.MimeType.match( supportedFormat.MimeType )
   && aFlavor.DataType == supportedFormat.DataType
   && aFlavor.DataType == cppu::UnoType>::get() )
-{
-bAnyIsReady = ConvertBufferToFormat( pBuf.get(), nBufSize, 
aFormat, aResult );
-break;
-}
+{
+bAnyIsReady = ConvertBufferToFormat( pBuf.get(), nBufSize, 
aFormat, aResult );
+break;
+}
 }
 }
 
@@ -612,7 +612,7 @@ void OleComponent::RetrieveObjectDataFlavors_Impl()
 if( hr2 == S_OK || hr2 == S_FALSE )
 {
 for( sal_uInt32 nInd = 0; nInd < FORMATS_NUM; nInd++ )
-{
+{
 if ( pElem[nInd].cfFormat == 
pFormatTemplates[nInd].cfFormat
   && pElem[nInd].tymed == 
pFormatTemplates[nInd].tymed )
 nSupportedAspects |= pElem[nInd].dwAspect;
diff --git a/extensions/source/ole/unoobjw.cxx 
b/extensions/source/ole/unoobjw.cxx
index 2d935f8d9583..595d4276e3c4 100644
--- a/extensions/source/ole/unoobjw.cxx
+++ b/extensions/source/ole/unoobjw.cxx
@@ -1731,7 +1731,7 @@ static bool writeBackOutParameter(VARIANTARG* pDest, 
VARIANT* pSource)
 else
 {
 // variantarg and variant must have same type
-  if ((V_VT(pDest) & oleTypeFlags) == oleTypeFlags)
+if ((V_VT(pDest) & oleTypeFlags) == oleTypeFlags)
 {
 if ((oleTypeFlags & VT_ARRAY) != 0)
 {
diff --git a/hwpfilter/source/hcode.cxx b/hwpfilter/source/hcode.cxx
index dfd9af78b4b8..ff133cebd25a 100644
--- a/hwpfilter/source/hcode.cxx
+++ b/hwpfilter/source/hcode.cxx
@@ -1352,10 +1352,10 @@ char *hcolor2str(uchar color, uchar shade, char *buf, 
bool bIsChar)
 {
 std::string ret;
 if( !_strnicmp(src, "http", 4))
- {
+{
 // nothing special here, just copy
 }
- else
+else
 {
 unsigned int srclen = strlen(src);
 if (3 < srclen)
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index df14c0841bf9..bc66d68de052 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -614,7 +614,7 @@ static void addJavaInfoFromWinReg(
 {
 getAndAddJREInfoByPath(javaHome, allInfos, addedInfos);
 }
-   }
+}
 
 vecJavaHome.clear();
 if (getJavaInfoFromRegistry(L"Software\\JavaSoft\\JDK", vecJavaHome)) {
diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx
index 17540f65e424..a0790c3de632 100644
--- a/sal/osl/w32/profile.cxx
+++ b/sal/osl/w32/profile.cxx
@@ -1977,10 +1977,10 @@ static bool releaseProfile(osl_TProfileImpl* pProfile)
 else
 {
 #ifdef DEBUG_OSL_PROFILE
-SAL_INFO("sal.osl", "DEFAULT MODE");
+SAL_INFO("sal.osl", "DEFAULT MODE");
 #endif
-if (! (pProfile->m_Flags & (osl_Profile_READLOCK |
-osl_Profile_WRITELOCK | 
osl_Profile_FLUSHWRITE)))
+if (! (pProfile->m_Flags & (osl_Profile_READLOCK |
+osl_Profile_WRITELOCK | 
osl_Profile_FLUSHWRITE)))
 {
 if (pProfile->m_Flags & FLG_MODIFIED)