[Libreoffice-commits] core.git: 5 commits - sal/qa sc/inc sc/source starmath/source writerfilter/CppunitTest_writerfilter_dmapper.mk writerfilter/qa writerfilter/source xmlsecurity/source

2021-02-09 Thread Caolán McNamara (via logerrit)
 sal/qa/osl/file/osl_File.cxx  |5 
 sc/inc/editutil.hxx   |4 
 sc/source/core/tool/editutil.cxx  |   75 
+++---
 sc/source/ui/view/gridwin4.cxx|   34 

 starmath/source/parse.cxx |8 +
 writerfilter/CppunitTest_writerfilter_dmapper.mk  |1 
 writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx|   23 
+++
 writerfilter/qa/cppunittests/dmapper/data/create-date-preserve.docx   |binary
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |7 
 xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx |4 
 10 files changed, 136 insertions(+), 25 deletions(-)

New commits:
commit 61404bca5af9072b99c69a605077f0f4f6b54661
Author: Caolán McNamara 
AuthorDate: Mon Feb 8 20:30:20 2021 +
Commit: Caolán McNamara 
CommitDate: Tue Feb 9 10:18:59 2021 +0100

report what value was found in message

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

diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 30ef0e322eeb..b0a550b9d136 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -253,7 +253,6 @@ static void createTestDirectory(const OUString& basename, 
const OUString& dirnam
 static void deleteTestDirectory(const OUString& dirname)
 {
 OUString aPathURL = dirname.copy(0);
-osl::FileBase::RC nError;
 if (!isURL(dirname))
 osl::FileBase::getFileURLFromSystemPath(dirname, aPathURL); // convert 
if not full qualified URL
 
@@ -261,10 +260,10 @@ static void deleteTestDirectory(const OUString& dirname)
 if (testDir.isOpen())
 testDir.close();  // close if still open.
 
-nError = Directory::remove(aPathURL);
+osl::FileBase::RC nError = Directory::remove(aPathURL);
 
 OString strError = "In deleteTestDirectory function: remove Directory " +
-OUStringToOString(aPathURL, RTL_TEXTENCODING_ASCII_US);
+OUStringToOString(aPathURL, RTL_TEXTENCODING_ASCII_US) + " -> result: 
" + OString::number(nError);
 CPPUNIT_ASSERT_MESSAGE(strError.getStr(), (osl::FileBase::E_None == 
nError) || (nError == osl::FileBase::E_NOENT));
 }
 
commit 439f386602299bfbe05efee3a00cc7614d6ecdef
Author: Caolán McNamara 
AuthorDate: Fri Feb 5 17:14:07 2021 +
Commit: Caolán McNamara 
CommitDate: Tue Feb 9 10:07:26 2021 +0100

ofz#30330 recursion too deep

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

diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 41a6d482cf8f..b4541fea8bb7 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -1314,6 +1314,8 @@ std::unique_ptr SmParser::DoSum()
 {
 DepthProtect aDepthGuard(m_nParseDepth);
 
+int nDepthLimit = m_nParseDepth;
+
 auto xFirst = DoProduct();
 while (TokenInGroup(TG::Sum))
 {
@@ -1322,7 +1324,13 @@ std::unique_ptr SmParser::DoSum()
 auto xThird = DoProduct();
 xSNode->SetSubNodes(std::move(xFirst), std::move(xSecond), 
std::move(xThird));
 xFirst = std::move(xSNode);
+
+++m_nParseDepth;
+DepthProtect bDepthGuard(m_nParseDepth);
 }
+
+m_nParseDepth = nDepthLimit;
+
 return xFirst;
 }
 
commit d87fcadc242881c39d3c49c85b9d5ef83ec6dde4
Author: Dennis Francis 
AuthorDate: Tue Jan 19 14:46:48 2021 +0530
Commit: Dennis Francis 
CommitDate: Tue Feb 9 09:55:34 2021 +0100

lok: Take indent and margins into account

... when painting tiles with edit-text content.

Conflicts:
sc/source/core/tool/editutil.cxx

Change-Id: I31199c18ed5aab005d56241046a9f7109691db99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109755
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 
(cherry picked from commit bc025dac6ce3301f5798e8ada4fee07b415de76a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110619
Tested-by: Jenkins
Reviewed-by: Dennis Francis 

diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx
index d760faf5c53e..4efadface0f4 100644
--- a/sc/inc/editutil.hxx
+++ b/sc/inc/editutil.hxx
@@ -84,6 +84,10 @@ public:
 const Fraction& rX, const Fraction& rY, bool 
bPrintTwips = false );
 
 tools::Rectangle   GetEditArea( const ScPatternAttr* pPattern, bool 
bForceToTop );
+tools::Long GetIndent(const ScPatternAttr* pPattern) const;
+void GetMargins(const ScPatternAttr* pPattern, tools::Long& nLeftMargin, 
tools::Long& nTopMargin,
+tools::Long& nRightMargin, tools:

[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - xmlsecurity/source

2021-02-09 Thread Caolán McNamara (via logerrit)
 xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx |4 
++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit edeb164c1d8ab64116afee4e2140403a362a1358
Author: Caolán McNamara 
AuthorDate: Mon Feb 8 17:05:28 2021 +
Commit: Miklos Vajna 
CommitDate: Tue Feb 9 09:03:36 2021 +0100

default to CertificateValidity::INVALID

so if CertGetCertificateChain fails we don't want validity to be
css::security::CertificateValidity::VALID which is what the old default
of 0 equates to

notably

commit 1e0bc66d16aee28ce8bd9582ea32178c63841902
Date:   Thu Nov 5 16:55:26 2009 +0100

jl137:  #103420# better logging

turned the nss equivalent of SecurityEnvironment_NssImpl::verifyCertificate
from 0 to CertificateValidity::INVALID like this change does

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

diff --git 
a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx 
b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index 01b27fb9756f..0ac0d6216c96 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
@@ -753,7 +753,7 @@ sal_Int32 
SecurityEnvironment_MSCryptImpl::verifyCertificate(
 const uno::Reference< css::security::XCertificate >& aCert,
 const uno::Sequence< uno::Reference< css::security::XCertificate > >& 
seqCerts)
 {
-sal_Int32 validity = 0;
+sal_Int32 validity = css::security::CertificateValidity::INVALID;
 PCCERT_CHAIN_CONTEXT pChainContext = nullptr;
 PCCERT_CONTEXT pCertContext = nullptr;
 
@@ -897,7 +897,7 @@ sal_Int32 
SecurityEnvironment_MSCryptImpl::verifyCertificate(
 }
 else
 {
-SAL_INFO("xmlsecurity.xmlsec", "CertGetCertificateChaine failed.");
+SAL_INFO("xmlsecurity.xmlsec", "CertGetCertificateChain failed.");
 }
 }
 
___
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' - 2 commits - editeng/source include/editeng offapi/com sw/inc sw/source

2021-02-09 Thread Miklos Vajna (via logerrit)
 editeng/source/items/frmitems.cxx|   14 ++
 include/editeng/lrspitem.hxx |4 
 include/editeng/memberids.h  |1 +
 offapi/com/sun/star/style/PageProperties.idl |7 +++
 sw/inc/unoprnms.hxx  |1 +
 sw/source/core/unocore/unomap1.cxx   |1 +
 6 files changed, 28 insertions(+)

New commits:
commit 2ca7964b50756b1e071c432b15eea7f079486f6c
Author: Miklos Vajna 
AuthorDate: Tue Feb 2 15:49:16 2021 +0100
Commit: Miklos Vajna 
CommitDate: Tue Feb 9 09:59:28 2021 +0100

sw page gutter margin: add UNO API

SvxLRSpaceItem is used for all sorts of left/right margins, but gutter
only makes sense for pages, so only expose the gutter margin in the page
properties.

(cherry picked from commit 947277146e4c1ff7544371095fcc6bd5842b2d98)

Conflicts:
sw/source/core/unocore/unomap1.cxx

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

diff --git a/editeng/source/items/frmitems.cxx 
b/editeng/source/items/frmitems.cxx
index 2fde6817e43c..0de646470ecb 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -391,6 +391,11 @@ bool SvxLRSpaceItem::QueryValue( uno::Any& rVal, sal_uInt8 
nMemberId ) const
 rVal <<= IsAutoFirst();
 break;
 
+case MID_GUTTER_MARGIN:
+rVal <<= static_cast(bConvert ? 
convertTwipToMm100(m_nGutterMargin)
+ : m_nGutterMargin);
+break;
+
 default:
 bRet = false;
 // SfxDispatchController_Impl::StateChanged calls this with 
hardcoded 0 triggering this; there used to be a MID_LR_MARGIN 0 but what type 
would it have?
@@ -466,6 +471,10 @@ bool SvxLRSpaceItem::PutValue( const uno::Any& rVal, 
sal_uInt8 nMemberId )
 SetAutoFirst( Any2Bool(rVal) );
 break;
 
+case MID_GUTTER_MARGIN:
+SetGutterMargin(bConvert ? convertMm100ToTwip(nVal) : nVal);
+break;
+
 default:
 OSL_FAIL("unknown MemberId");
 return false;
diff --git a/include/editeng/memberids.h b/include/editeng/memberids.h
index bec53ca51002..0779345a6f77 100644
--- a/include/editeng/memberids.h
+++ b/include/editeng/memberids.h
@@ -129,6 +129,7 @@
 #define MID_FIRST_LINE_REL_INDENT   9
 #define MID_FIRST_AUTO  10
 #define MID_TXT_LMARGIN 11
+#define MID_GUTTER_MARGIN 12
 
 //ProtectItem
 #define MID_PROTECT_CONTENT 0
diff --git a/offapi/com/sun/star/style/PageProperties.idl 
b/offapi/com/sun/star/style/PageProperties.idl
index 73242f230f90..dccd63f20b04 100644
--- a/offapi/com/sun/star/style/PageProperties.idl
+++ b/offapi/com/sun/star/style/PageProperties.idl
@@ -487,6 +487,13 @@ published service PageProperties
 @since LibreOffice 6.1
  */
 [optional, property, maybevoid] com::sun::star::graphic::XGraphic 
FooterBackGraphic;
+
+/** determines the gutter margin of the page.
+
+@since LibreOffice 7.2
+ */
+[optional, property] long GutterMargin;
+
 };
 
 }; }; }; };
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index eea6be637f62..1100a72508fb 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -66,6 +66,7 @@
 #define UNO_NAME_PARA_HYPHENATION_NO_CAPS "ParaHyphenationNoCaps"
 #define UNO_NAME_LEFT_MARGIN "LeftMargin"
 #define UNO_NAME_RIGHT_MARGIN "RightMargin"
+#define UNO_NAME_GUTTER_MARGIN "GutterMargin"
 #define UNO_NAME_HEADER_LEFT_MARGIN "HeaderLeftMargin"
 #define UNO_NAME_HEADER_RIGHT_MARGIN "HeaderRightMargin"
 #define UNO_NAME_FOOTER_LEFT_MARGIN "FooterLeftMargin"
diff --git a/sw/source/core/unocore/unomap1.cxx 
b/sw/source/core/unocore/unomap1.cxx
index 4a8587ac81b9..08c97f878703 100644
--- a/sw/source/core/unocore/unomap1.cxx
+++ b/sw/source/core/unocore/unomap1.cxx
@@ -491,6 +491,7 @@ const SfxItemPropertyMapEntry*  
SwUnoPropertyMapProvider::GetPageStylePropertyMa
 { OUString(UNO_NAME_BACK_TRANSPARENT), RES_BACKGROUND,  
cppu::UnoType::get(), PROPERTY_NONE ,MID_GRAPHIC_TRANSPARENT  
 },
 { OUString(UNO_NAME_LEFT_BORDER), RES_BOX,  
cppu::UnoType::get(),  0, LEFT_BORDER  |CONVERT_TWIPS },
 { OUString(UNO_NAME_RIGHT_BORDER), RES_BOX, 
cppu::UnoType::get(),  0, RIGHT_BORDER |CONVERT_TWIPS },
+{ OUString(UNO_NAME_GUTTER_MARGIN), RES_LR_SPACE, 
cppu::UnoType::get(), PROPERTY_NONE, MID_GUTTER_MARGIN | 
CONVERT_TWIPS},
 { OUString(UNO_NAME_TOP_BORDER), RES_BOX,   
cppu::UnoType::get(),  0, TOP_BORDER   |CONVERT_TWIPS },
 { OUString(UNO_NAME_BOTTOM_BORDER), RES_BOX,
cppu::UnoType::get(),  0, BOTTOM_BORDER|CONVERT_TWIPS },
 { OUString(UNO_NAME_BORDER_DISTANCE), RES_BOX,
cppu::Uno

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

2021-02-09 Thread Caolán McNamara (via logerrit)
 xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx |4 
++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a5fe0bea138c5b32268a5cd0093908909d8bc013
Author: Caolán McNamara 
AuthorDate: Mon Feb 8 17:05:28 2021 +
Commit: Miklos Vajna 
CommitDate: Tue Feb 9 09:03:13 2021 +0100

default to CertificateValidity::INVALID

so if CertGetCertificateChain fails we don't want validity to be
css::security::CertificateValidity::VALID which is what the old default
of 0 equates to

notably

commit 1e0bc66d16aee28ce8bd9582ea32178c63841902
Date:   Thu Nov 5 16:55:26 2009 +0100

jl137:  #103420# better logging

turned the nss equivalent of SecurityEnvironment_NssImpl::verifyCertificate
from 0 to CertificateValidity::INVALID like this change does

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

diff --git 
a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx 
b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index c62c96d77328..4f16dc5707ca 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
@@ -753,7 +753,7 @@ sal_Int32 
SecurityEnvironment_MSCryptImpl::verifyCertificate(
 const uno::Reference< css::security::XCertificate >& aCert,
 const uno::Sequence< uno::Reference< css::security::XCertificate > >& 
seqCerts)
 {
-sal_Int32 validity = 0;
+sal_Int32 validity = css::security::CertificateValidity::INVALID;
 PCCERT_CHAIN_CONTEXT pChainContext = nullptr;
 PCCERT_CONTEXT pCertContext = nullptr;
 
@@ -897,7 +897,7 @@ sal_Int32 
SecurityEnvironment_MSCryptImpl::verifyCertificate(
 }
 else
 {
-SAL_INFO("xmlsecurity.xmlsec", "CertGetCertificateChaine failed.");
+SAL_INFO("xmlsecurity.xmlsec", "CertGetCertificateChain failed.");
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-09 Thread Luboš Luňák (via logerrit)
 canvas/source/vcl/spritehelper.cxx |   83 -
 1 file changed, 11 insertions(+), 72 deletions(-)

New commits:
commit 5177c672bb1eb848cc1da5d96c5871e8da6adb0f
Author: Luboš Luňák 
AuthorDate: Thu Dec 17 21:28:43 2020 +0100
Commit: Luboš Luňák 
CommitDate: Tue Feb 9 10:36:22 2021 +0100

simply use DrawTransformedBitmapEx()

And leave the work to the function instead of trying to handle it
manually.

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

diff --git a/canvas/source/vcl/spritehelper.cxx 
b/canvas/source/vcl/spritehelper.cxx
index 53116fa9d53d..31d16032e576 100644
--- a/canvas/source/vcl/spritehelper.cxx
+++ b/canvas/source/vcl/spritehelper.cxx
@@ -175,67 +175,6 @@ namespace vclcanvas
 
 ::basegfx::B2DHomMatrix aTransform( getTransformation() );
 
-// check whether matrix is "easy" to handle - pure
-// translations or scales are handled by OutputDevice
-// alone
-const bool bIdentityTransform( aTransform.isIdentity() );
-
-// make transformation absolute (put sprite to final
-// output position). Need to happen here, as we also have
-// to translate the clip polygon
-aTransform.translate( aOutPos.X(),
-  aOutPos.Y() );
-
-if( !bIdentityTransform )
-{
-if (!::basegfx::fTools::equalZero( aTransform.get(0,1) ) ||
-!::basegfx::fTools::equalZero( aTransform.get(1,0) ))
-{
-// "complex" transformation, employ affine
-// transformator
-
-// modify output position, to account for the fact
-// that transformBitmap() always normalizes its output
-// bitmap into the smallest enclosing box.
-::basegfx::B2DRectangle aDestRect;
-::canvas::tools::calcTransformedRectBounds( aDestRect,
-
::basegfx::B2DRectangle(0,
-   
 0,
-   
 rOrigOutputSize.getX(),
-   
 rOrigOutputSize.getY()),
-aTransform );
-
-aOutPos.setX( ::basegfx::fround( aDestRect.getMinX() ) );
-aOutPos.setY( ::basegfx::fround( aDestRect.getMinY() ) );
-
-// TODO(P3): Use optimized bitmap transformation here.
-
-// actually re-create the bitmap ONLY if necessary
-if( bNeedBitmapUpdate )
-maContent = tools::transformBitmap( *maContent,
-aTransform );
-
-aOutputSize = maContent->GetSizePixel();
-}
-else
-{
-// relatively 'simplistic' transformation -
-// retrieve scale and translational offset
-aOutputSize.setWidth (
-::basegfx::fround( rOrigOutputSize.getX() * 
aTransform.get(0,0) ) );
-aOutputSize.setHeight(
-::basegfx::fround( rOrigOutputSize.getY() * 
aTransform.get(1,1) ) );
-
-aOutPos.setX( ::basegfx::fround( aTransform.get(0,2) ) );
-aOutPos.setY( ::basegfx::fround( aTransform.get(1,2) ) );
-}
-}
-
-// transformBitmap() might return empty bitmaps, for tiny
-// scales.
-if( !(*maContent) )
-return;
-
 rTargetSurface.Push( PushFlags::CLIPREGION );
 
 // apply clip (if any)
@@ -247,10 +186,10 @@ namespace vclcanvas
 
 if( aClipPoly.count() )
 {
-// aTransform already contains the
-// translational component, moving the clip to
-// the final sprite output position.
-aClipPoly.transform( aTransform );
+// Move the clip to the final sprite output position.
+::basegfx::B2DHomMatrix aClipTransform( aTransform );
+aClipTransform.translate( aOutPos.X(), aOutPos.Y() );
+aClipPoly.transform( aClipTransform );
 
 if( mbShowSpriteBounds )
 {
@@ -266,13 +205,15 @@ namespace vclcanvas
 }
 }
 
+::basegfx::B2DHomMatrix aSizeTransform, aMoveTransform;
+aSizeTransform.scale( aOutputSize.Width(), aOutputSize.Height() );
+aMoveTransform.translate( aOutPos.X(), aOutPos.Y() );
+aTransform = aMoveTransform * aTransform * aSizeTransform;
+
 if( ::rtl::math::approxEqual(fAlpha, 1.0) )
 {
 // no alpha modulat

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/sfx2 sc/source sd/source svx/source sw/inc sw/source

2021-02-09 Thread Szymon Kłos (via logerrit)
 include/sfx2/viewsh.hxx |2 +
 sc/source/ui/inc/tabvwsh.hxx|2 +
 sc/source/ui/view/tabvwsh4.cxx  |5 +++
 sd/source/ui/inc/ViewShellBase.hxx  |4 ++
 sd/source/ui/inc/unomodel.hxx   |2 +
 sd/source/ui/unoidl/unomodel.cxx|   11 +++
 svx/source/tbxctrls/fontworkgallery.cxx |   46 
 sw/inc/view.hxx |2 +
 sw/source/uibase/uiview/view.cxx|9 ++
 sw/source/uibase/uiview/viewdraw.cxx|   14 -
 10 files changed, 79 insertions(+), 18 deletions(-)

New commits:
commit 2555441f3f694af11d0d7b220b12ae25f43a6a5a
Author: Szymon Kłos 
AuthorDate: Tue Jan 26 16:35:10 2021 +0100
Commit: Jan Holesovsky 
CommitDate: Tue Feb 9 10:53:33 2021 +0100

fontwork: insert in the center of LOK view

Change-Id: Iabde4ee927546b0e396c4fbd6d0099fa82240166
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109968
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index e9863fd99a03..dedef69a65b9 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -383,6 +383,8 @@ public:
 bool isLOKTablet() const  { return maLOKDeviceFormFactor == 
LOKDeviceFormFactor::TABLET; }
 /// Check if the lok client is running on a mobile device.
 bool isLOKMobilePhone() const { return maLOKDeviceFormFactor == 
LOKDeviceFormFactor::MOBILE; }
+
+virtual tools::Rectangle getLOKVisibleArea() const { return 
tools::Rectangle(); }
 };
 
 
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index cffc7cf1bb3c..60cd3d4848ea 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -402,6 +402,8 @@ public:
 void InitFormEditData();
 void ClearFormEditData();
 ScFormEditData* GetFormEditData() { return mpFormEditData.get(); }
+
+virtual tools::Rectangle getLOKVisibleArea() const override;
 };
 
 #endif
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index ee279ceec064..66da8b55e6d0 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1829,4 +1829,9 @@ ScNavigatorSettings* 
ScTabViewShell::GetNavigatorSettings()
 return pNavSettings.get();
 }
 
+tools::Rectangle ScTabViewShell::getLOKVisibleArea() const
+{
+return GetViewData().getLOKVisibleArea();
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/ViewShellBase.hxx 
b/sd/source/ui/inc/ViewShellBase.hxx
index 4e4871186d3c..44dd9d25dfa5 100644
--- a/sd/source/ui/inc/ViewShellBase.hxx
+++ b/sd/source/ui/inc/ViewShellBase.hxx
@@ -217,6 +217,9 @@ public:
 /// See SfxViewShell::NotifyCursor().
 void NotifyCursor(SfxViewShell* pViewShell) const override;
 
+void setLOKVisibleArea(const ::tools::Rectangle& rArea) { maLOKVisibleArea 
= rArea; }
+virtual ::tools::Rectangle getLOKVisibleArea() const override { return 
maLOKVisibleArea; }
+
 protected:
 
 virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
@@ -228,6 +231,7 @@ private:
 std::unique_ptr mpImpl;
 DrawDocShell* mpDocShell;
 SdDrawDocument* mpDocument;
+::tools::Rectangle maLOKVisibleArea;
 
 /** Determine from the properties of the document shell the initial type
 of the view shell in the center pane.  We use this method to avoid
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
index b320abda4912..08629b074b5b 100644
--- a/sd/source/ui/inc/unomodel.hxx
+++ b/sd/source/ui/inc/unomodel.hxx
@@ -255,6 +255,8 @@ public:
 virtual void setGraphicSelection(int nType, int nX, int nY) override;
 /// @see lok::Document::resetSelection().
 virtual void resetSelection() override;
+/// @see vcl::ITiledRenderable::setClientVisibleArea().
+virtual void setClientVisibleArea(const tools::Rectangle& rRectangle) 
override;
 /// @see vcl::ITiledRenderable::setClipboard().
 virtual void setClipboard(const 
css::uno::Reference& xClipboard) 
override;
 /// @see vcl::ITiledRenderable::isMimeTypeSupported().
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 17d07ec02cef..69c2a94dd946 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2615,6 +2615,17 @@ void SdXImpressDocument::resetSelection()
 pSdrView->UnmarkAll();
 }
 
+void SdXImpressDocument::setClientVisibleArea(const ::tools::Rectangle& 
rRectangle)
+{
+SolarMutexGuard aGuard;
+
+DrawViewShell* pViewShell = GetViewShell();
+if (!pViewShell)
+return;
+
+pViewShell->GetViewShellBase().setLOKVisibleArea(rRectangle);
+}
+
 void SdXImpressDocument::setClipboard(const 
uno::Reference& xClipboard)
 {
 SolarMutexGuard aGuard;
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx 
b/svx/source/tbxctrls/fontworkgallery.cxx
index e04978139236..afd2da9f8dfa 10

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

2021-02-09 Thread Jean-Pierre Ledure (via logerrit)
 wizards/source/scriptforge/SF_Array.xba |   52 
 1 file changed, 52 insertions(+)

New commits:
commit c8ac8acca8442335321e20801f4c89357cf64894
Author: Jean-Pierre Ledure 
AuthorDate: Mon Feb 8 18:25:58 2021 +0100
Commit: Jean-Pierre Ledure 
CommitDate: Tue Feb 9 10:56:24 2021 +0100

ScriptForge - (SF_Array) new Copy() method

Duplicate the array
A simple assignment copies the reference, not the data
In code like:
   Dim a, b
   a = Array(1, 2, 3)
   b = a
   a(2) = 30
   MsgBox b(2)   '   Displays 30

Replace by
   b = SF_Array.Copy(a)
to get a real duplication of the initial array

Change-Id: I62b931b92995c6607a3b354c60f0ebafb042b88a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110591
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 20c4632aa7ae..b51bba63adbe 100644
--- a/wizards/source/scriptforge/SF_Array.xba
+++ b/wizards/source/scriptforge/SF_Array.xba
@@ -370,6 +370,58 @@ Catch:
GoTo Finally
 End Function   '  ScriptForge.SF_Array.ConvertToDictionary
 
+REM 
-
+Public Function Copy(Optional ByRef Array_ND As Variant) As Variant
+''' Duplicate a 1D or 2D array
+''' A usual assignment copies an array by reference, i.e. 
shares the same memory location
+''' Dim a, b
+''' a = Array(1, 2, 3)
+''' b = a
+''' a(2) = 30
+''' MsgBox b(2) '  30
+''' Args
+''' Array_ND: the array to copy, may be empty
+''' Return:
+''' the copied array. Subarrays however still 
remain assigned by reference
+''' Examples:
+''' SF_Array.Copy(Array(1, 2, 3)) returns (1, 2, 3)
+
+Dim vCopy As Variant   '  Return value
+Dim iDims As Integer   '  Number of dimensions of the input array
+Const cstThisSub = "Array.Copy"
+Const cstSubArgs = "Array_ND"
+
+   If SF_Utils._ErrorHandling() Then On Local Error GoTo Catch
+   vCopy = Array()
+
+Check:
+   If SF_Utils._EnterFunction(cstThisSub, cstSubArgs) Then
+   If Not SF_Utils._ValidateArray(Array_ND, "Array_ND") 
Then GoTo Finally
+   iDims = SF_Array.CountDims(Array_ND)
+   If iDims > 2 Then
+   If Not SF_Utils._ValidateArray(Array_ND, 
"Array_ND", 2) Then GoTo Finally
+   End If
+   End If
+
+Try:
+   Select Case iDims
+   Case 0
+   Case 1
+   vCopy = Array_ND
+   ReDim Preserve vCopy(LBound(Array_ND) To 
UBound(Array_ND))
+   Case 2
+   vCopy = Array_ND
+   ReDim Preserve vCopy(LBound(Array_ND, 1) To 
UBound(Array_ND, 1), LBound(Array_ND, 2) To UBound(Array_ND, 2))
+   End Select
+
+Finally:
+   Copy = vCopy()
+   SF_Utils._ExitFunction(cstThisSub)
+   Exit Function
+Catch:
+   GoTo Finally
+End Function   '  ScriptForge.SF_Array.Copy
+
 REM 
-
 Public Function CountDims(Optional ByRef Array_ND As Variant) As Integer
 ''' Count the number of dimensions of an array - may be 
> 2
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/svx include/vcl officecfg/registry svx/source sw/source vcl/source

2021-02-09 Thread Szymon Kłos (via logerrit)
 include/svx/fontworkbar.hxx  |2 
 include/vcl/EnumContext.hxx  |1 
 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu |   13 +
 svx/source/sidebar/SelectionAnalyzer.cxx |9 +++
 svx/source/toolbars/fontworkbar.cxx  |   25 +++
 sw/source/uibase/shells/drawsh.cxx   |   11 
 vcl/source/window/EnumContext.cxx|1 
 7 files changed, 53 insertions(+), 9 deletions(-)

New commits:
commit 6dc466e02451c3d59f535050763413b63aca675a
Author: Szymon Kłos 
AuthorDate: Wed Jan 27 14:34:19 2021 +0100
Commit: Jan Holesovsky 
CommitDate: Tue Feb 9 10:56:23 2021 +0100

Introduce Fontwork context

Change-Id: I61512e4da13514d3e5a199ccb46468ba199b808f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110023
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/include/svx/fontworkbar.hxx b/include/svx/fontworkbar.hxx
index 224aae1dbb1e..bac7ce1543bc 100644
--- a/include/svx/fontworkbar.hxx
+++ b/include/svx/fontworkbar.hxx
@@ -26,6 +26,7 @@
 
 class SfxViewShell;
 class SdrView;
+class SdrObject;
 
 //
 
@@ -33,6 +34,7 @@ namespace svx
 {
 
 bool SVX_DLLPUBLIC checkForSelectedFontWork( SdrView const * pSdrView, 
sal_uInt32& nCheckStatus );
+bool SVX_DLLPUBLIC checkForFontWork( SdrObject* pObj );
 
 class SAL_WARN_UNUSED SVX_DLLPUBLIC FontworkBar final : public SfxShell
 {
diff --git a/include/vcl/EnumContext.hxx b/include/vcl/EnumContext.hxx
index 1c68e1b6f014..4cc6217ffb26 100644
--- a/include/vcl/EnumContext.hxx
+++ b/include/vcl/EnumContext.hxx
@@ -71,6 +71,7 @@ public:
 Chart,
 ChartElements,
 Draw,
+DrawFontwork,
 DrawLine,
 DrawPage,
 DrawText,
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index 80bef5d9..f7946142d86e 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -351,6 +351,7 @@
 Calc, Pivot,  visible,  .uno:CellTextDlg ;
 DrawImpress,  3DObject,   visible;
 DrawImpress,  Draw,   hidden ;
+DrawImpress,  DrawFontwork,   hidden ;
 DrawImpress,  DrawText,   visible;
 DrawImpress,  DrawLine,   hidden ;
 DrawImpress,  Graphic,hidden ;
@@ -515,13 +516,16 @@
 
   
 Calc,   Draw,   visible ;
+Calc,   DrawFontwork, visible ;
 Calc,   OLE,hidden  ;
 DrawImpress,3DObject,   visible ;
 DrawImpress,Draw,   visible ;
+DrawImpress,DrawFontwork, visible ;
 DrawImpress,Graphic,hidden  ;
 DrawImpress,TextObject, hidden  ;
 DrawImpress,OLE,hidden  ;
 WriterVariants, Draw,   visible ;
+WriterVariants, DrawFontwork, visible ;
 Writer, Graphic,hidden  ;
 Writer, OLE,hidden  ;
 Writer, Frame,  visible ;
@@ -551,9 +555,11 @@
 
   
 Calc,   Draw,   visible ;
+Calc,   DrawFontwork, visible ;
 Calc,   OLE,hidden  ;
 DrawImpress,3DObject,   visible ;
 DrawImpress,Draw,   hidden ;
+DrawImpress,DrawFontwork, hidden ;
 DrawImpress,Graphic,hidden  ;
 DrawImpress,TextObject, hidden  ;
 DrawImpress,OLE,hidden  ;
@@ -583,16 +589,19 @@
 
   
 Calc,   Draw,   visible ;
+Calc,   DrawFontwork, visible ;
 Calc,   DrawLine,   visible ;
 Calc,   Graphic,visible ;
 Calc,   OLE,hidden  ;
 DrawImpress,3DObject,   visible ;
 DrawImpress,Draw,   visible ;
+DrawImpress,DrawFontwork, visible ;
 DrawImpress,DrawLine,   visible ;
 DrawImpress,Graphic,visible ;
 DrawImpress,TextObject, hidden  ;
 DrawImpress,OLE,hidden  ;
 WriterVariants, Draw,   visible ;
+WriterVariants, DrawFontwork, visible ;
   
 
 
@@ -646,6 +655,7 @@
   
 Calc,   Chart,   visible   

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - officecfg/registry svx/Library_svx.mk svx/source svx/uiconfig svx/UIConfig_svx.mk

2021-02-09 Thread Szymon Kłos (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu |   25 ++
 svx/Library_svx.mk   |1 
 svx/UIConfig_svx.mk  |1 
 svx/source/sidebar/PanelFactory.cxx  |5 
 svx/source/sidebar/fontwork/FontworkPropertyPanel.cxx|   76 
 svx/source/sidebar/fontwork/FontworkPropertyPanel.hxx|   51 +
 svx/uiconfig/ui/sidebarfontwork.ui   |   95 +++
 7 files changed, 254 insertions(+)

New commits:
commit 852315fa15fdd1ad1f75820e39f5fc298a552b1b
Author: Szymon Kłos 
AuthorDate: Wed Jan 27 10:58:12 2021 +0100
Commit: Jan Holesovsky 
CommitDate: Tue Feb 9 10:57:54 2021 +0100

fontwork: add sidebar panel

Change-Id: I092e40c17dd814d0b18f06aea01d7afa29cbad2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110024
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index f7946142d86e..6c88f1195d7f 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -688,6 +688,31 @@
 
   
 
+  
+
+  Fontwork
+
+
+  FontworkPropertyPanel
+
+
+  PropertyDeck
+
+
+  
+Calc,   DrawFontwork,   visible ;
+DrawImpress,DrawFontwork,   visible ;
+WriterVariants, DrawFontwork,   visible ;
+  
+
+
+  
private:resource/toolpanel/SvxPanelFactory/FontworkPropertyPanel
+
+
+  600
+
+  
+
   
 
   Image
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index 60916bc4c3a1..dc312a81d772 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -199,6 +199,7 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
 svx/source/sidebar/area/AreaPropertyPanel \
 svx/source/sidebar/area/AreaPropertyPanelBase \
 svx/source/sidebar/area/AreaTransparencyGradientPopup \
+svx/source/sidebar/fontwork/FontworkPropertyPanel \
 svx/source/sidebar/shadow/ShadowPropertyPanel \
 svx/source/sidebar/graphic/GraphicPropertyPanel \
 svx/source/sidebar/line/LinePropertyPanel \
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index a3753e2281d9..2dad0a2bb7a8 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -87,6 +87,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/savemodifieddialog \
svx/uiconfig/ui/selectionmenu \
svx/uiconfig/ui/sidebararea \
+   svx/uiconfig/ui/sidebarfontwork \
svx/uiconfig/ui/sidebarshadow \
svx/uiconfig/ui/sidebargraphic \
svx/uiconfig/ui/sidebarline \
diff --git a/svx/source/sidebar/PanelFactory.cxx 
b/svx/source/sidebar/PanelFactory.cxx
index a22a889a382a..b532a845c877 100644
--- a/svx/source/sidebar/PanelFactory.cxx
+++ b/svx/source/sidebar/PanelFactory.cxx
@@ -24,6 +24,7 @@
 #include "paragraph/ParaPropertyPanel.hxx"
 #include "lists/ListsPropertyPanel.hxx"
 #include "area/AreaPropertyPanel.hxx"
+#include "fontwork/FontworkPropertyPanel.hxx"
 #include "shadow/ShadowPropertyPanel.hxx"
 #include "graphic/GraphicPropertyPanel.hxx"
 #include "line/LinePropertyPanel.hxx"
@@ -141,6 +142,10 @@ Reference SAL_CALL 
PanelFactory::createUIElement (
 {
 pControl = AreaPropertyPanel::Create(pParentWindow, xFrame, pBindings);
 }
+else if (rsResourceURL.endsWith("/FontworkPropertyPanel"))
+{
+pControl = FontworkPropertyPanel::Create(pParentWindow, xFrame);
+}
 else if (rsResourceURL.endsWith("/ShadowPropertyPanel"))
 {
 pControl = ShadowPropertyPanel::Create(pParentWindow, xFrame, 
pBindings);
diff --git a/svx/source/sidebar/fontwork/FontworkPropertyPanel.cxx 
b/svx/source/sidebar/fontwork/FontworkPropertyPanel.cxx
new file mode 100644
index ..d6d2143396b3
--- /dev/null
+++ b/svx/source/sidebar/fontwork/FontworkPropertyPanel.cxx
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not us

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

2021-02-09 Thread Caolán McNamara (via logerrit)
 sal/qa/osl/file/osl_File.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 88c8e2ae2b92f806b4add25bba06e702dcb38eb5
Author: Caolán McNamara 
AuthorDate: Mon Feb 8 20:30:20 2021 +
Commit: Michael Stahl 
CommitDate: Tue Feb 9 11:03:16 2021 +0100

report what value was found in message

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

diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 42c7a18a4f11..544fd6c4d629 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -254,7 +254,6 @@ static void createTestDirectory(const OUString& basename, 
const OUString& dirnam
 static void deleteTestDirectory(const OUString& dirname)
 {
 OUString aPathURL = dirname.copy(0);
-osl::FileBase::RC nError;
 if (!isURL(dirname))
 osl::FileBase::getFileURLFromSystemPath(dirname, aPathURL); // convert 
if not full qualified URL
 
@@ -262,10 +261,10 @@ static void deleteTestDirectory(const OUString& dirname)
 if (testDir.isOpen())
 testDir.close();  // close if still open.
 
-nError = Directory::remove(aPathURL);
+osl::FileBase::RC nError = Directory::remove(aPathURL);
 
 OString strError = "In deleteTestDirectory function: remove Directory " +
-OUStringToOString(aPathURL, RTL_TEXTENCODING_ASCII_US);
+OUStringToOString(aPathURL, RTL_TEXTENCODING_ASCII_US) + " -> result: 
" + OString::number(nError);
 CPPUNIT_ASSERT_MESSAGE(strError.getStr(), (osl::FileBase::E_None == 
nError) || (nError == osl::FileBase::E_NOENT));
 }
 
___
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' - writerfilter/CppunitTest_writerfilter_dmapper.mk writerfilter/qa writerfilter/source

2021-02-09 Thread Miklos Vajna (via logerrit)
 writerfilter/CppunitTest_writerfilter_dmapper.mk|1 
 writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx  |   23 
++
 writerfilter/qa/cppunittests/dmapper/data/create-date-preserve.docx |binary
 writerfilter/source/dmapper/DomainMapper_Impl.cxx   |7 +++
 4 files changed, 31 insertions(+)

New commits:
commit 793fc8c7c70faec4e6c1e9ad0c4d9f47193a181c
Author: Miklos Vajna 
AuthorDate: Mon Feb 8 21:03:04 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Feb 9 11:05:11 2021 +0100

tdf#134592 DOCX import: preserve formatting of CREATEDATE fields

The create date of a document doesn't really change, so we can only
loose if the cached result of the field is not preserved.

(cherry picked from commit 3b928391b3398c1113e675ea6a542d05d9611e0a)

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

diff --git a/writerfilter/CppunitTest_writerfilter_dmapper.mk 
b/writerfilter/CppunitTest_writerfilter_dmapper.mk
index 7fe8b9035d3d..48b4ee87e087 100644
--- a/writerfilter/CppunitTest_writerfilter_dmapper.mk
+++ b/writerfilter/CppunitTest_writerfilter_dmapper.mk
@@ -33,6 +33,7 @@ $(eval $(call 
gb_CppunitTest_use_libraries,writerfilter_dmapper, \
 sal \
 test \
 unotest \
+vcl \
 ))
 
 $(eval $(call gb_CppunitTest_use_sdk_api,writerfilter_dmapper))
diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx
index 77bd616f37d6..da7501e2ef2e 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx
@@ -19,6 +19,8 @@
 #include 
 #include 
 
+#include 
+
 using namespace ::com::sun::star;
 
 namespace
@@ -189,6 +191,27 @@ CPPUNIT_TEST_FIXTURE(Test, testFieldIfInsideIf)
 // i.e. some of the inner fields escaped outside the outer field.
 CPPUNIT_ASSERT_EQUAL(OUString("25"), xCell->getString());
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testCreateDatePreserve)
+{
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"create-date-preserve.docx";
+getComponent() = loadFromDesktop(aURL);
+// Trigger idle layout.
+Scheduler::ProcessEventsToIdle();
+uno::Reference xTextDocument(getComponent(), 
uno::UNO_QUERY);
+uno::Reference 
xParaEnumAccess(xTextDocument->getText(),
+  
uno::UNO_QUERY);
+uno::Reference xParaEnum = 
xParaEnumAccess->createEnumeration();
+uno::Reference 
xPortionEnumAccess(xParaEnum->nextElement(),
+ 
uno::UNO_QUERY);
+uno::Reference xPortionEnum = 
xPortionEnumAccess->createEnumeration();
+uno::Reference xPortion(xPortionEnum->nextElement(), 
uno::UNO_QUERY);
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 7/7/2020 10:11:00 AM
+// - Actual  : 07/07/2020
+// i.e. the formatting of the create date field was lost.
+CPPUNIT_ASSERT_EQUAL(OUString("7/7/2020 10:11:00 AM"), 
xPortion->getString());
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git 
a/writerfilter/qa/cppunittests/dmapper/data/create-date-preserve.docx 
b/writerfilter/qa/cppunittests/dmapper/data/create-date-preserve.docx
new file mode 100644
index ..4a587ce0d2ef
Binary files /dev/null and 
b/writerfilter/qa/cppunittests/dmapper/data/create-date-preserve.docx differ
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 580de1b9730c..0aee6c1d6598 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -6245,6 +6245,13 @@ void DomainMapper_Impl::SetFieldResult(OUString const& 
rResult)
 xFieldProperties->setPropertyValue(
 getPropertyName(bHasContent && sValue.isEmpty()? 
PROP_CONTENT : PROP_CURRENT_PRESENTATION),
  uno::makeAny( rResult ));
+
+if (xServiceInfo->supportsService(
+
"com.sun.star.text.TextField.DocInfo.CreateDateTime"))
+{
+// Creation time is const, don't try to update it.
+xFieldProperties->setPropertyValue("IsFixed", 
uno::makeAny(true));
+}
 }
 }
 catch( const beans::UnknownPropertyException& )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/drawinglayercore' - include/vcl vcl/source

2021-02-09 Thread Tomaž Vajngerl (via logerrit)
 include/vcl/graphicfilter.hxx   |7 
 vcl/source/filter/graphicfilter.cxx |  308 
 2 files changed, 179 insertions(+), 136 deletions(-)

New commits:
commit bcf411b61c5d9022f3bd0859b32876706bd54d79
Author: Tomaž Vajngerl 
AuthorDate: Tue Feb 9 19:02:25 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Feb 9 19:06:55 2021 +0900

vcl: split-up GraphicFilter::Import into per-format methods

Change-Id: Idb5f120f47b4374fc709413a615baa606cd9b165

diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index 5b18654cb81b..84b856d4b3be 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -327,6 +327,13 @@ public:
 
 void preload();
 
+ErrCode readGIF(SvStream& rStream, Graphic& rGraphic, GfxLinkType& 
rLinkType);
+ErrCode readPNG(SvStream & rStream, Graphic & rGraphic, GfxLinkType & 
rLinkType,
+std::unique_ptr & rpGraphicContent, 
sal_Int32& rGraphicContentSize);
+ErrCode readJPEG(SvStream & rStream, Graphic & rGraphic, GfxLinkType & 
rLinkType,
+GraphicFilterImportFlags nImportFlags);
+ErrCode readSVG(SvStream & rStream, Graphic & rGraphic, GfxLinkType & 
rLinkType,
+std::unique_ptr & rpGraphicContent, 
sal_Int32& rGraphicContentSize);
 private:
 OUStringaFilterPath;
 FilterConfigCache*  pConfig;
diff --git a/vcl/source/filter/graphicfilter.cxx 
b/vcl/source/filter/graphicfilter.cxx
index d6b1f9e5777a..61c660ddf141 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1449,17 +1449,175 @@ void GraphicFilter::preload()
 }
 }
 
+ErrCode GraphicFilter::readGIF(SvStream & rStream, Graphic & rGraphic, 
GfxLinkType & rLinkType)
+{
+if (ImportGIF(rStream, rGraphic))
+{
+rLinkType = GfxLinkType::NativeGif;
+return ERRCODE_NONE;
+}
+else
+return ERRCODE_GRFILTER_FILTERERROR;
+}
+
+ErrCode GraphicFilter::readPNG(SvStream & rStream, Graphic & rGraphic, 
GfxLinkType & rLinkType, std::unique_ptr & rpGraphicContent,
+sal_Int32& rGraphicContentSize)
+{
+ErrCode aReturnCode = ERRCODE_NONE;
+
+vcl::PNGReader aPNGReader(rStream);
+{
+// check if this PNG contains a GIF chunk!
+const std::vector& rChunkData = 
aPNGReader.GetChunks();
+for (auto const& chunk : rChunkData)
+{
+// Microsoft Office is storing Animated GIFs in following chunk
+if (chunk.nType == PMGCHUNG_msOG)
+{
+sal_uInt32 nChunkSize = chunk.aData.size();
+
+if (nChunkSize > 11)
+{
+const std::vector& rData = chunk.aData;
+rGraphicContentSize = nChunkSize - 11;
+SvMemoryStream aIStrm(const_cast(&rData[11]), 
rGraphicContentSize, StreamMode::READ);
+rpGraphicContent.reset(new sal_uInt8[rGraphicContentSize]);
+sal_uInt64 aCurrentPosition = aIStrm.Tell();
+aIStrm.ReadBytes(rpGraphicContent.get(), 
rGraphicContentSize);
+aIStrm.Seek(aCurrentPosition);
+ImportGIF(aIStrm, rGraphic);
+rLinkType = GfxLinkType::NativeGif;
+return aReturnCode;
+}
+}
+}
+}
+
+// PNG has no GIF chunck
+BitmapEx aBitmapEx(aPNGReader.Read());
+if (!aBitmapEx.IsEmpty())
+{
+rGraphic = aBitmapEx;
+rLinkType = GfxLinkType::NativePng;
+}
+else
+aReturnCode = ERRCODE_GRFILTER_FILTERERROR;
+
+return aReturnCode;
+}
+
+ErrCode GraphicFilter::readJPEG(SvStream & rStream, Graphic & rGraphic, 
GfxLinkType & rLinkType, GraphicFilterImportFlags nImportFlags)
+{
+ErrCode aReturnCode = ERRCODE_NONE;
+
+// set LOGSIZE flag always, if not explicitly disabled
+// (see #90508 and #106763)
+if (!(nImportFlags & GraphicFilterImportFlags::DontSetLogsizeForJpeg))
+{
+nImportFlags |= GraphicFilterImportFlags::SetLogsizeForJpeg;
+}
+
+sal_uInt64 nPosition = rStream.Tell();
+if (!ImportJPEG(rStream, rGraphic, nImportFlags | 
GraphicFilterImportFlags::OnlyCreateBitmap, nullptr))
+aReturnCode = ERRCODE_GRFILTER_FILTERERROR;
+else
+{
+Bitmap& rBitmap = 
const_cast(rGraphic.GetBitmapExRef().GetBitmap());
+BitmapScopedWriteAccess pWriteAccess(rBitmap);
+rStream.Seek(nPosition);
+if (!ImportJPEG(rStream, rGraphic, nImportFlags | 
GraphicFilterImportFlags::UseExistingBitmap, &pWriteAccess))
+aReturnCode = ERRCODE_GRFILTER_FILTERERROR;
+else
+rLinkType = GfxLinkType::NativeJpg;
+}
+
+return aReturnCode;
+}
+
+ErrCode GraphicFilter::readSVG(SvStream & rStream, Graphic & rGraphic, 
GfxLinkType & rLinkType, std::unique_ptr & rpGraphicContent,
+sal_Int32& rGraphicContentSize)
+{
+ErrCode aReturnC

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

2021-02-09 Thread Miklos Vajna (via logerrit)
 source/text/shared/01/05040200.xhp |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit 246f9b7f85571b7b31c56a40aed21dcb1602f2fd
Author: Miklos Vajna 
AuthorDate: Tue Feb 9 11:36:14 2021 +0100
Commit: Miklos Vajna 
CommitDate: Tue Feb 9 11:38:16 2021 +0100

tdf#91920 sw page gutter margin: add help

Cover the default, the mirrored and the from-top cases.

Change-Id: Icf4da5232c1c2a693a5741f6c207d59acd79294b
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/110629
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/source/text/shared/01/05040200.xhp 
b/source/text/shared/01/05040200.xhp
index fb956c62a..f2ce94dc2 100644
--- a/source/text/shared/01/05040200.xhp
+++ b/source/text/shared/01/05040200.xhp
@@ -87,6 +87,16 @@
 
 Right / 
Outer
 Enter the amount of space to leave 
between the right edge of the page and the document text. If you are using the 
Mirrored page layout, enter the amount of space to leave between 
the outer text margin and the outer edge of the 
page.
+
+
+
+
+
+  Gutter
+  Enter the amount of space to leave 
between the left edge of the page and the left margin. If you are using the 
Mirrored page layout, enter the amount of space to leave between 
the inner page margin and the inner edge of the page.
+
+
+
 
 Top
 Enter the amount of space to leave 
between the upper edge of the page and the document text.
@@ -133,6 +143,10 @@
 Use page line-spacing
 Aligns the text on the selected 
Page Style to a vertical page grid. The spacing of the grid is defined 
by the Reference Style.
 Select the Paragraph Style 
that you want to use as a reference for lining up the text on the selected Page 
style. The height of the font that is specified in the reference style sets the 
spacing of the vertical page grid. 
+
+Gutter position
+   Allows 
choosing if the current document's gutter shall be positioned at the left of 
the document's pages (default) or at top of the document's pages when the 
document is displayed.
+
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2021-02-09 Thread Miklos Vajna (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit dc4443a3696fa13914bc47251a9d6d832eed7338
Author: Miklos Vajna 
AuthorDate: Tue Feb 9 11:38:16 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Feb 9 11:38:16 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 246f9b7f85571b7b31c56a40aed21dcb1602f2fd
  - tdf#91920 sw page gutter margin: add help

Cover the default, the mirrored and the from-top cases.

Change-Id: Icf4da5232c1c2a693a5741f6c207d59acd79294b
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/110629
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/helpcontent2 b/helpcontent2
index 603f98229537..246f9b7f8557 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 603f982295379b1d7f3038579451d8c3bc25530c
+Subproject commit 246f9b7f85571b7b31c56a40aed21dcb1602f2fd
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-09 Thread Caolán McNamara (via logerrit)
 starmath/inc/parse.hxx|4 ++--
 starmath/source/parse.cxx |   18 --
 2 files changed, 10 insertions(+), 12 deletions(-)

New commits:
commit e2342ca5155f27637770fc392916804c8ac4728f
Author: Caolán McNamara 
AuthorDate: Tue Feb 9 09:44:31 2021 +
Commit: Caolán McNamara 
CommitDate: Tue Feb 9 12:29:03 2021 +0100

ofz#30663 Direct-leak

since...

commit 17149f65f03a34e88bb4a10abcd20e6891f5d7ca
Date:   Sun Feb 7 10:41:46 2021 +0100

Let depthGuard handle everything

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

diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index 591db3637714..6349dc8c479f 100644
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -148,8 +148,8 @@ class SmParser
 std::unique_ptr DoRelation();
 std::unique_ptr DoSum();
 std::unique_ptr DoProduct();
-std::unique_ptr DoSubSup(TG nActiveGroup, SmNode *pGivenNode);
-std::unique_ptr DoSubSupEvaluate(SmNode *pGivenNode);
+std::unique_ptr DoSubSup(TG nActiveGroup, std::unique_ptr 
xGivenNode);
+std::unique_ptr DoSubSupEvaluate(std::unique_ptr 
xGivenNode);
 std::unique_ptr DoOpSubSup();
 std::unique_ptr DoPower();
 std::unique_ptr DoBlank();
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index b4541fea8bb7..0aa1518eb4c2 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -1408,10 +1408,9 @@ std::unique_ptr SmParser::DoProduct()
 return xFirst;
 }
 
-std::unique_ptr SmParser::DoSubSup(TG nActiveGroup, SmNode *pGivenNode)
+std::unique_ptr SmParser::DoSubSup(TG nActiveGroup, 
std::unique_ptr xGivenNode)
 {
 DepthProtect aDepthGuard(m_nParseDepth);
-std::unique_ptr xGivenNode(pGivenNode);
 
 assert(nActiveGroup == TG::Power || nActiveGroup == TG::Limit);
 assert(m_aCurToken.nGroup == nActiveGroup);
@@ -1482,10 +1481,9 @@ std::unique_ptr SmParser::DoSubSup(TG 
nActiveGroup, SmNode *pGivenNode)
 return pNode;
 }
 
-std::unique_ptr SmParser::DoSubSupEvaluate(SmNode *pGivenNode)
+std::unique_ptr SmParser::DoSubSupEvaluate(std::unique_ptr 
xGivenNode)
 {
 DepthProtect aDepthGuard(m_nParseDepth);
-std::unique_ptr xGivenNode(pGivenNode);
 
 std::unique_ptr pNode(new SmSubSupNode(m_aCurToken));
 pNode->SetUseLimits(true);
@@ -1535,13 +1533,13 @@ std::unique_ptr SmParser::DoOpSubSup()
 DepthProtect aDepthGuard(m_nParseDepth);
 
 // get operator symbol
-auto pNode = std::make_unique(m_aCurToken);
+auto xNode = std::make_unique(m_aCurToken);
 // skip operator token
 NextToken();
 // get sub- supscripts if any
 if (m_aCurToken.nGroup == TG::Power)
-return DoSubSup(TG::Power, pNode.release());
-return pNode;
+return DoSubSup(TG::Power, std::move(xNode));
+return xNode;
 }
 
 std::unique_ptr SmParser::DoPower()
@@ -1552,7 +1550,7 @@ std::unique_ptr SmParser::DoPower()
 std::unique_ptr xNode(DoTerm(false));
 
 if (m_aCurToken.nGroup == TG::Power)
-return DoSubSup(TG::Power, xNode.release());
+return DoSubSup(TG::Power, std::move(xNode));
 return xNode;
 }
 
@@ -1857,7 +1855,7 @@ std::unique_ptr SmParser::DoOperator()
 auto xOperator = DoOper();
 
 if (m_aCurToken.nGroup == TG::Limit || m_aCurToken.nGroup == TG::Power)
-xOperator = DoSubSup(m_aCurToken.nGroup, xOperator.release());
+xOperator = DoSubSup(m_aCurToken.nGroup, std::move(xOperator));
 
 // get argument
 auto xArg = DoPower();
@@ -2398,7 +2396,7 @@ std::unique_ptr SmParser::DoEvaluate()
 if ( m_aCurToken.nGroup == TG::Limit )
 {
 std::unique_ptr rSNode;
-rSNode = DoSubSupEvaluate(xSNode.release());
+rSNode = DoSubSupEvaluate(std::move(xSNode));
 rSNode->GetToken().eType = TEVALUATE;
 return rSNode;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-09 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/uicalc/data/tdf140151.ods |binary
 sc/qa/unit/uicalc/uicalc.cxx |   17 +
 2 files changed, 17 insertions(+)

New commits:
commit 593ab5fbedb3de3c62039affd69f3dcd30f56d8f
Author: Xisco Fauli 
AuthorDate: Mon Feb 8 11:15:04 2021 +0100
Commit: Xisco Fauli 
CommitDate: Tue Feb 9 12:32:32 2021 +0100

tdf#140151: sc_uicalc: Add unittest

For some reason, this test fails on Mac and Windows.
I tried different approaches but all of them failed.
See https://gerrit.libreoffice.org/c/core/+/110551
Since I don't know any other way of testing this bug,
let test it at least on Linux
Change-Id: I40e0afe6c850533e4a1db0fec30838a66f206512

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

diff --git a/sc/qa/unit/uicalc/data/tdf140151.ods 
b/sc/qa/unit/uicalc/data/tdf140151.ods
new file mode 100644
index ..6c908b7596e3
Binary files /dev/null and b/sc/qa/unit/uicalc/data/tdf140151.ods differ
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index f1d861518271..8c92824fe541 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -281,6 +281,23 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf92963)
 pMod->SetInputOptions(aInputOption);
 }
 
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf140151)
+{
+#if !defined(MACOSX) && !defined(_WIN32) //FIXME
+ScModelObj* pModelObj = createDoc("tdf140151.ods");
+ScDocument* pDoc = pModelObj->GetDocument();
+CPPUNIT_ASSERT(pDoc);
+
+// Focus is already on the button
+pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::RETURN);
+pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::RETURN);
+Scheduler::ProcessEventsToIdle();
+
+// Without the fix in place, the current cursor position wouldn't have 
changed
+lcl_AssertCurrentCursorPosition(1, 110);
+#endif
+}
+
 CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf68290)
 {
 ScModelObj* pModelObj = createDoc("tdf68290.ods");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-09 Thread Jean-Pierre Ledure (via logerrit)
 wizards/source/scriptforge/SF_String.xba |   20 +++-
 1 file changed, 15 insertions(+), 5 deletions(-)

New commits:
commit 42535b54e32ce64b7b3d34d13f9dd1a6c0dbd5dc
Author: Jean-Pierre Ledure 
AuthorDate: Mon Feb 8 18:21:42 2021 +0100
Commit: Jean-Pierre Ledure 
CommitDate: Tue Feb 9 12:32:50 2021 +0100

ScriptForge - (SF_String) more severe check on the date validity of 
IsADate()

So far IsADate checked the format of the date only,
not the validity vs. leap years, days in month, etc.

Corrected with an error check on the DateSerial() builtin function

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

diff --git a/wizards/source/scriptforge/SF_String.xba 
b/wizards/source/scriptforge/SF_String.xba
index 66eb90910ba5..23010e88c750 100644
--- a/wizards/source/scriptforge/SF_String.xba
+++ b/wizards/source/scriptforge/SF_String.xba
@@ -719,7 +719,10 @@ Public Function IsADate(Optional ByRef InputStr As Variant 
_
 
 Dim bADate As Boolean  '  Return value
 Dim sFormat As String  '  Alias for DateFormat
-Dim sRegex As String   '  The regex to check 
against the input string
+Dim iYear As Integer   '  Alias of year in input 
string
+Dim iMonth As Integer  '  Alias of month in input 
string
+Dim iDay As Integer'  Alias of day in 
input string
+Dim dDate As Date  '  Date value
 Const cstFormat = "-MM-DD"   '  Default date 
format
 Const cstFormatRegex = "([- /.]MM[- /.]DD|MM[- /.]DD[- /.]|DD[- 
/.]MM[- /.])"
'  
The regular expression the format must match
@@ -743,10 +746,14 @@ Check:
 
 Try:
If Len(InputStr) = Len(DateFormat) Then
-   sRegex = ReplaceStr(sFormat, Array("", 
"MM", "DD") _
-   , Array(REGEXDATEYEAR, REGEXDATEMONTH, 
REGEXDATEDAY) _
-   , CaseSensitive := False)
-   bADate = SF_String.IsRegex(InputStr, sRegex, CaseSensitive := 
False)
+   '  Extract the date components , MM, DD from the input 
string
+   iYear = CInt(Mid(InputStr, InStr(sFormat, ""), 4))
+   iMonth = CInt(Mid(InputStr, InStr(sFormat, "MM"), 2))
+   iDay = CInt(Mid(InputStr, InStr(sFormat, "DD"), 2))
+   '  Check the validity of the date
+   On Local Error GoTo NotADate
+   dDate = DateSerial(iYear, iMonth, iDay)
+   bADate = True   '  Statement reached only if no error
End If
 
 Finally:
@@ -755,6 +762,9 @@ Finally:
Exit Function
 Catch:
GoTo Finally
+NotADate:
+   On Error GoTo 0 '  Reset the error object
+   GoTo Finally
 End Function   '  ScriptForge.SF_String.IsADate
 
 REM 
-
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-09 Thread Olivier Hallot (via logerrit)
 source/text/swriter/guide/stylist_fromselect.xhp |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 5cfd09886740bea6de229184cee57820f1d069e4
Author: Olivier Hallot 
AuthorDate: Tue Feb 9 12:33:09 2021 +0100
Commit: Olivier Hallot 
CommitDate: Tue Feb 9 12:40:50 2021 +0100

Remove excessive 

Change-Id: Iec2b5ccf9a97aff667afc343634d1a688ed12601
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/110563
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/swriter/guide/stylist_fromselect.xhp 
b/source/text/swriter/guide/stylist_fromselect.xhp
index 1f3bc5404..c2bbd4a6b 100644
--- a/source/text/swriter/guide/stylist_fromselect.xhp
+++ b/source/text/swriter/guide/stylist_fromselect.xhp
@@ -62,7 +62,7 @@
 
 
 
-Icon 
+Icon New Style from 
Selection
 


@@ -76,22 +76,22 @@
 
 
   
-
+
   
   
-
+
   
   
-For 
paragraph, character and 
list styles, select at least one character in the style that 
you want to copy, then drag the selection to the Styles deck and 
release. For frame styles, select the frame and hold the 
mouse button pressed until the mouse icon changes, then drag to the 
Styles deck and release.
-Alternatively, you can drag-and-drop the selection onto the 
respective icon at the top of the Styles deck. You do not need to 
open that style category in advance.
+For 
paragraph, character and list styles, select at least one character in the 
style that you want to copy, then drag the selection to the Styles 
deck and release. For frame styles, select the frame and 
hold the mouse button pressed until the mouse icon changes, then drag to the 
Styles deck and release.
+Alternatively, you can drag-and-drop the selection onto the 
respective icon at the top of the Styles deck. You do not need to open that 
style category in advance.
 
 
 
-  
+  
 
   
 
-For 
page and table styles, you must use the 
Styles actions menu at the top right corner of the Styles 
deck. The drag-and-drop method is not possible with these styles.
+For page and table 
styles, you must use the Styles actions menu at the top 
right corner of the Styles deck. The drag-and-drop method is not possible with 
these styles.
 
 Styles 
(Sidebar)
 Styles - New Style from 
Selection
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2021-02-09 Thread Olivier Hallot (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 61f58b5c8d0ff51bcaecc1d73002b3d335fb3a73
Author: Olivier Hallot 
AuthorDate: Tue Feb 9 12:40:50 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Feb 9 12:40:50 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 5cfd09886740bea6de229184cee57820f1d069e4
  - Remove excessive 

Change-Id: Iec2b5ccf9a97aff667afc343634d1a688ed12601
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/110563
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 246f9b7f8557..5cfd09886740 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 246f9b7f85571b7b31c56a40aed21dcb1602f2fd
+Subproject commit 5cfd09886740bea6de229184cee57820f1d069e4
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

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

New commits:
commit 2b042a343d25294360972492e36cb84e448eb211
Author: Caolán McNamara 
AuthorDate: Mon Feb 8 13:49:53 2021 +
Commit: Caolán McNamara 
CommitDate: Tue Feb 9 13:24:55 2021 +0100

tdf#140225 call cancel before destroying menubar

a) in case there are some menus open cancel them before removing
their parent menubar
b) when a GtkSalMenu is deleted clear the action-group of the
hierarchy and flag it as needed a refresh, clearing it of
any references to the deleted GtkSalMenu

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

diff --git a/vcl/unx/gtk3/gtk3gtksalmenu.cxx b/vcl/unx/gtk3/gtk3gtksalmenu.cxx
index f78bbab0081f..c5e0a9518e39 100644
--- a/vcl/unx/gtk3/gtk3gtksalmenu.cxx
+++ b/vcl/unx/gtk3/gtk3gtksalmenu.cxx
@@ -596,6 +596,16 @@ GtkSalMenu::~GtkSalMenu()
 {
 SolarMutexGuard aGuard;
 
+if (mpActionGroup)
+{
+// tdf#140225 if any menu is deleted clear the action-group shared
+// by the hierarchy
+GLOActionGroup* pActionGroup = G_LO_ACTION_GROUP(mpActionGroup);
+g_lo_action_group_clear(pActionGroup);
+// and flag the hierarchy as needing an update
+SetNeedsUpdate();
+}
+
 DestroyMenuBarWidget();
 
 if (mpMenuModel)
@@ -998,6 +1008,10 @@ void GtkSalMenu::DestroyMenuBarWidget()
 {
 if (mpMenuBarContainerWidget)
 {
+// tdf#140225 call cancel before destroying it in case there are some
+// active menus popped open
+gtk_menu_shell_cancel(GTK_MENU_SHELL(mpMenuBarWidget));
+
 gtk_widget_destroy(mpMenuBarContainerWidget);
 mpMenuBarContainerWidget = nullptr;
 mpCloseButton = nullptr;
___
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' - sc/source

2021-02-09 Thread Szymon Kłos (via logerrit)
 sc/source/ui/cctrl/dpcontrol.cxx |7 +++
 sc/source/ui/view/output2.cxx|   14 +-
 2 files changed, 16 insertions(+), 5 deletions(-)

New commits:
commit 68892230ddcde135e9951047a3621438eb7987d0
Author: Szymon Kłos 
AuthorDate: Mon Feb 1 16:48:28 2021 +0100
Commit: Jan Holesovsky 
CommitDate: Tue Feb 9 13:27:09 2021 +0100

autofilter: scale dropdown button according to zoom level

Change-Id: I4f8a16e196bc33ea5b29fda0edc1f773a24e28db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110259
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index 2ca413055000..f178074ae577 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -146,6 +146,13 @@ void ScDPFieldButton::getPopupBoundingBox(Point& rPos, 
Size& rSize) const
 long nW = std::min(maSize.getWidth() / 2, nMaxSize);
 long nH = std::min(maSize.getHeight(),nMaxSize);
 
+double fZoom = static_cast(maZoomY) > 1.0 ? 
static_cast(maZoomY) : 1.0;
+if (fZoom > 1.0)
+{
+nW = fZoom * (nW - 1);
+nH = fZoom * (nH - 1);
+}
+
 // #i114944# AutoFilter button is left-aligned in RTL.
 // DataPilot button is always right-aligned for now, so text output isn't 
affected.
 if (mbPopupLeft)
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 41a9760cc450..9e301615a107 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -1336,8 +1336,10 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE 
nArrY, long nPosX, long nPosY
  ( rPattern.GetItem(ATTR_MERGE_FLAG).GetValue() & 
(ScMF::Auto|ScMF::Button|ScMF::ButtonPopup) ) &&
  ( !bBreak || mpRefDevice == pFmtDevice ) )
 {
-// filter drop-down width is now independent from row height
-const long nFilter = DROPDOWN_BITMAP_SIZE;
+// filter drop-down width depends on row height
+double fZoom = mpRefDevice ? 
static_cast(mpRefDevice->GetMapMode().GetScaleY()) : 1.0;
+fZoom = fZoom > 1.0 ? fZoom : 1.0;
+const long nFilter = fZoom * DROPDOWN_BITMAP_SIZE;
 bool bFit = ( nNeeded + nFilter <= nMergeSizeX );
 if ( bFit || bCellIsValue )
 {
@@ -4906,11 +4908,13 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
 
eOrient!=SvxCellOrientation::Stacked &&
 pInfo->bAutoFilter)
 {
-// filter drop-down width is now 
independent from row height
+// filter drop-down width depends on 
row height
+double fZoom = mpRefDevice ? 
static_cast(mpRefDevice->GetMapMode().GetScaleY()) : 1.0;
+fZoom = fZoom > 1.0 ? fZoom : 1.0;
 if (bPixelToLogic)
-nAvailWidth -= 
mpRefDevice->PixelToLogic(Size(0,DROPDOWN_BITMAP_SIZE)).Height();
+nAvailWidth -= 
mpRefDevice->PixelToLogic(Size(0,fZoom * DROPDOWN_BITMAP_SIZE)).Height();
 else
-nAvailWidth -= 
DROPDOWN_BITMAP_SIZE;
+nAvailWidth -= fZoom * 
DROPDOWN_BITMAP_SIZE;
 long nComp = nEngineWidth;
 if (nAvailWidthhttps://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-09 Thread Noel Grandin (via logerrit)
 sax/source/fastparser/fastparser.cxx |  145 ++-
 1 file changed, 143 insertions(+), 2 deletions(-)

New commits:
commit 6b4b1339b4fb9e1436827235526116c1e411fa2f
Author: Noel Grandin 
AuthorDate: Sun Nov 8 13:17:36 2020 +0200
Commit: Jan Holesovsky 
CommitDate: Tue Feb 9 13:43:36 2021 +0100

ofz#26944

this actually a regression from

commit 8c5ffecf1dbd3f93128910433da11d5315661680
Author: Noel 
   Date:   Fri Oct 23 15:12:22 2020 +0200
make SvXMLImport capable of mixing fast- and slow- contexts adhoc

where I did not get the namespace handling right, but it only
became obvious with

commit 3940cf7d716f3e469f47d3c831a799e58edf2eb8
Date:   Mon Nov 2 12:26:26 2020 +0200
drop the SvXMLExport::EndElement method..

Specifically, we have weird logic to treat some bad namespaces
as good (who knows why), but that logic only exists for the
slowparser path.
With the dropping of EndElement(), we ended up with calls
to SvXMLImport::startUnknownElement() calling
SvXMLImportContext::StartElement(), but without
a corresponding call to SvXMLImportContext::endFastElement.

To make this work right, I copied the namespace aliasing code
to FastParser.

Change-Id: I00ecbf046feeaac6f2a789f801175dba40836f84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105441
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110284
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/sax/source/fastparser/fastparser.cxx 
b/sax/source/fastparser/fastparser.cxx
index 9b35c1682be5..524b17363fa8 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -62,6 +62,8 @@ using namespace ::com::sun::star::io;
 using namespace com::sun::star;
 using namespace sax_fastparser;
 
+static void NormalizeURI( OUString& rName );
+
 namespace {
 
 struct Event;
@@ -1154,8 +1156,10 @@ void FastSaxParserImpl::callbackStartElement(const 
xmlChar *localName , const xm
 // namespaces[] is (prefix/URI)
 if( namespaces[ i ] != nullptr )
 {
-DefineNamespace( OString( XML_CAST( namespaces[ i ] )),
-OUString( XML_CAST( namespaces[ i + 1 ] ), strlen( 
XML_CAST( namespaces[ i + 1 ] )), RTL_TEXTENCODING_UTF8 ));
+OString aPrefix( XML_CAST( namespaces[ i ] ));
+OUString namespaceURL( XML_CAST( namespaces[ i + 1 ] ), 
strlen( XML_CAST( namespaces[ i + 1 ] )), RTL_TEXTENCODING_UTF8 );
+NormalizeURI( namespaceURL );
+DefineNamespace(aPrefix, namespaceURL);
 if( rEntity.mxNamespaceHandler.is() )
 rEvent.mxDeclAttributes->addUnknown( OString( XML_CAST( 
namespaces[ i ] ) ), OString( XML_CAST( namespaces[ i + 1 ] ) ) );
 }
@@ -1163,6 +1167,7 @@ void FastSaxParserImpl::callbackStartElement(const 
xmlChar *localName , const xm
 {
 // default namespace
 sNamespace = OUString( XML_CAST( namespaces[ i + 1 ] ), 
strlen( XML_CAST( namespaces[ i + 1 ] )), RTL_TEXTENCODING_UTF8 );
+NormalizeURI( sNamespace );
 nNamespaceToken = GetNamespaceToken( sNamespace );
 if( rEntity.mxNamespaceHandler.is() )
 rEvent.mxDeclAttributes->addUnknown( "", OString( 
XML_CAST( namespaces[ i + 1 ] ) ) );
@@ -1433,4 +1438,140 @@ 
com_sun_star_comp_extensions_xml_sax_FastParser_get_implementation(
 return cppu::acquire(new FastSaxParser);
 }
 
+// --
+// copy of the code in xmloff/source/core/namespace.cxx, which adds namespace 
aliases
+// for various dodgy namespace decls in the wild.
+
+static bool NormalizeW3URI( OUString& rName );
+static bool NormalizeOasisURN( OUString& rName );
+
+static void NormalizeURI( OUString& rName )
+{
+// try OASIS + W3 URI normalization
+bool bSuccess = NormalizeOasisURN( rName );
+if( ! bSuccess )
+bSuccess = NormalizeW3URI( rName );
+}
+
+const OUStringLiteral XML_URI_W3_PREFIX("http://www.w3.org/";);
+const OUStringLiteral XML_URI_XFORMS_SUFFIX("/xforms");
+const OUStringLiteral XML_N_XFORMS_1_0("http://www.w3.org/2002/xforms";);
+const OUStringLiteral XML_N_SVG("http://www.w3.org/2000/svg";);
+const OUStringLiteral 
XML_N_SVG_COMPAT("urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0");
+const OUStringLiteral XML_N_FO("http://www.w3.org/1999/XSL/Format";);
+const OUStringLiteral 
XML_N_FO_COMPAT("urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0");
+const OUStringLiteral XML_N_SMIL("http://www.w3.org/2001/SMIL20/";);
+const OUStringLiteral XML_N_SMIL_OLD("http://www.w3.org/2001/SMIL20";);
+const OUStringLiteral 
XML_N_SMIL_COMPAT("urn:oasis:names:tc:opendocument:xmlns:smil-co

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

2021-02-09 Thread andreas kainz (via logerrit)
 extras/source/gallery/gallery_system/sg36.sdg |binary
 extras/source/gallery/gallery_system/sg36.sdv |binary
 extras/source/gallery/gallery_system/sg36.thm |binary
 3 files changed

New commits:
commit c9f1be6ce897f0fcf5aae7da1ca909ac1164dca1
Author: andreas kainz 
AuthorDate: Sun Mar 29 20:08:23 2020 +0200
Commit: Jan Holesovsky 
CommitDate: Tue Feb 9 13:45:11 2021 +0100

tdf#125960 update fontwork shapes for fontwork gallery

Change-Id: I330ccdb91b4283cf947041c94fa39c4334432895
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91334
Tested-by: Jenkins
Reviewed-by: andreas_kainz 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110286
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/extras/source/gallery/gallery_system/sg36.sdg 
b/extras/source/gallery/gallery_system/sg36.sdg
index 0e65e9a7e143..65fc4f3bfb1b 100644
Binary files a/extras/source/gallery/gallery_system/sg36.sdg and 
b/extras/source/gallery/gallery_system/sg36.sdg differ
diff --git a/extras/source/gallery/gallery_system/sg36.sdv 
b/extras/source/gallery/gallery_system/sg36.sdv
index e6a03eeda8f2..51171313668d 100644
Binary files a/extras/source/gallery/gallery_system/sg36.sdv and 
b/extras/source/gallery/gallery_system/sg36.sdv differ
diff --git a/extras/source/gallery/gallery_system/sg36.thm 
b/extras/source/gallery/gallery_system/sg36.thm
index 7c7c4bea4755..8d80fe15f24a 100644
Binary files a/extras/source/gallery/gallery_system/sg36.thm and 
b/extras/source/gallery/gallery_system/sg36.thm differ
___
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' - sc/source

2021-02-09 Thread Szymon Kłos (via logerrit)
 sc/source/ui/dbgui/PivotLayoutTreeListData.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 8e98abb60d6930670d92906a6110b80b84a003c3
Author: Szymon Kłos 
AuthorDate: Tue Jan 19 12:02:41 2021 +0100
Commit: Jan Holesovsky 
CommitDate: Tue Feb 9 13:47:06 2021 +0100

pivot table: avoid crash on drag n drop

prevents from unexpected situation when user will send double request for 
the same drag and drop operation (slow internet connection and repeating 
operation)

Change-Id: I8d081cf884c38b2e4f367143ad728c29b1466fbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109634
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 
(cherry picked from commit fbef08d9cb9c5bfc852dc23d5bafc9d057ee3bcd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109737
Reviewed-by: Jan Holesovsky 
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx 
b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx
index 6b10fd8b953f..da54e26ad5a1 100644
--- a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx
@@ -184,6 +184,9 @@ void 
ScPivotLayoutTreeListData::PushDataFieldNames(std::vector& rDataF
 
 void ScPivotLayoutTreeListData::InsertEntryForSourceTarget(weld::TreeView& 
rSource, int nTarget)
 {
+if (rSource.count_selected_rows() <=0)
+return;
+
 ScItemValue* pItemValue = 
reinterpret_cast(rSource.get_selected_id().toInt64());
 
 if (mpParent->IsDataElement(pItemValue->maFunctionData.mnCol))
___
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' - vcl/inc vcl/jsdialog vcl/source

2021-02-09 Thread Szymon Kłos (via logerrit)
 vcl/inc/jsdialog/jsdialogbuilder.hxx |2 ++
 vcl/jsdialog/executor.cxx|8 
 vcl/jsdialog/jsdialogbuilder.cxx |   35 +++
 vcl/source/window/dialog.cxx |   10 ++
 4 files changed, 55 insertions(+)

New commits:
commit 781d9d11c96c142f285a3d45af02207228f60672
Author: Szymon Kłos 
AuthorDate: Mon Feb 8 16:58:44 2021 +0100
Commit: Jan Holesovsky 
CommitDate: Tue Feb 9 13:48:41 2021 +0100

jsdialog: handle standard buttons like help

- dump response bindings
- execute help callback

Change-Id: Ib0696b4ba74a186a2b80d49f21a1442d1c520821
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110586
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 00d94d8a03b5..0f3fddc0d69d 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -418,6 +418,8 @@ public:
 virtual void set_primary_text(const OUString& rText) override;
 
 virtual void set_secondary_text(const OUString& rText) override;
+
+virtual void response(int response) override;
 };
 
 class JSCheckButton : public JSWidget
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 937064875248..4c40109a5057 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -343,6 +343,14 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 pDialog->response(RET_CANCEL);
 return true;
 }
+else if (sAction == "response")
+{
+OString nResponseString
+= OUStringToOString(rData["data"], 
RTL_TEXTENCODING_ASCII_US);
+int nResponse = std::atoi(nResponseString.getStr());
+pDialog->response(nResponse);
+return true;
+}
 }
 }
 else if (sControlType == "radiobutton")
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index a07ac1959573..e1156bc88c78 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -21,6 +21,23 @@
 
 using namespace weld;
 
+namespace
+{
+void response_help(vcl::Window* pWindow)
+{
+::Dialog* pDialog = dynamic_cast<::Dialog*>(pWindow);
+if (!pDialog)
+return;
+
+vcl::Window* pButtonWindow = pDialog->get_widget_for_response(RET_HELP);
+::Button* pButton = dynamic_cast<::Button*>(pButtonWindow);
+if (!pButton)
+return;
+
+pButton->Click();
+}
+}
+
 JSDialogNotifyIdle::JSDialogNotifyIdle(VclPtr aNotifierWindow,
VclPtr aContentWindow, 
std::string sTypeOfJSON)
 : Idle("JSDialog notify")
@@ -756,6 +773,12 @@ void JSDialog::undo_collapse()
 
 void JSDialog::response(int response)
 {
+if (response == RET_HELP)
+{
+response_help(m_xWidget.get());
+return;
+}
+
 sendClose();
 SalInstanceDialog::response(response);
 }
@@ -930,6 +953,18 @@ void JSMessageDialog::set_secondary_text(const OUString& 
rText)
 sendFullUpdate();
 }
 
+void JSMessageDialog::response(int response)
+{
+if (response == RET_HELP)
+{
+response_help(m_xWidget.get());
+return;
+}
+
+sendClose();
+SalInstanceMessageDialog::response(response);
+}
+
 JSCheckButton::JSCheckButton(JSDialogSender* pSender, ::CheckBox* pCheckBox,
  SalInstanceBuilder* pBuilder, bool bTakeOwnership)
 : JSWidget(pSender, pCheckBox, 
pBuilder, bTakeOwnership)
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index ab9a30430b4c..d4437116b725 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1630,6 +1630,16 @@ boost::property_tree::ptree Dialog::DumpAsPropertyTree()
 nStartPos = nStartPos >= 0 ? nStartPos + 1 : 0;
 aTree.put("dialogid", sDialogId.copy(nStartPos));
 
+boost::property_tree::ptree aResponses;
+for (auto& rResponse : mpDialogImpl->maResponses)
+{
+boost::property_tree::ptree aResponse;
+aResponse.put("id", rResponse.first->get_id());
+aResponse.put("response", rResponse.second);
+aResponses.push_back(std::make_pair("", aResponse));
+}
+aTree.add_child("responses", aResponses);
+
 return aTree;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-09 Thread Szymon Kłos (via logerrit)
 include/vcl/treelistbox.hxx |1 +
 vcl/source/treelist/svtabbx.cxx |2 ++
 2 files changed, 3 insertions(+)

New commits:
commit d00cad178c8830bada68bd9d81dc0c4466160ab6
Author: Szymon Kłos 
AuthorDate: Tue Feb 9 09:38:58 2021 +0100
Commit: Jan Holesovsky 
CommitDate: Tue Feb 9 13:51:19 2021 +0100

jsdialog: single activation property for treeview

Change-Id: Iaaeab7f14f1a05c38f41c4beb774a0980844fdb3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110621
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/include/vcl/treelistbox.hxx b/include/vcl/treelistbox.hxx
index 537e4abc7a8d..8301ac1d9434 100644
--- a/include/vcl/treelistbox.hxx
+++ b/include/vcl/treelistbox.hxx
@@ -733,6 +733,7 @@ public:
 
 // Make single click "activate" a row like a double-click normally does
 voidSetActivateOnSingleClick(bool bEnable) { 
mbActivateOnSingleClick = bEnable; }
+boolGetActivateOnSingleClick() { return 
mbActivateOnSingleClick; }
 
 // Make mouse over a row "select" a row like a single-click normally does
 voidSetHoverSelection(bool bEnable) { mbHoverSelection = 
bEnable; }
diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx
index 4cfb34668907..6f07fe00301a 100644
--- a/vcl/source/treelist/svtabbx.cxx
+++ b/vcl/source/treelist/svtabbx.cxx
@@ -117,6 +117,8 @@ boost::property_tree::ptree 
SvTabListBox::DumpAsPropertyTree()
 {
 boost::property_tree::ptree aTree(SvTreeListBox::DumpAsPropertyTree());
 
+aTree.put("singleclickactivate", GetActivateOnSingleClick());
+
 bool bCheckButtons = static_cast(nTreeFlags & SvTreeFlags::CHKBTN);
 aTree.push_back(std::make_pair("entries", 
lcl_DumpEntryAndSiblings(First(), this, bCheckButtons)));
 
___
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' - sw/qa sw/source

2021-02-09 Thread Miklos Vajna (via logerrit)
 sw/qa/core/layout/layout.cxx   |   27 +++
 sw/source/core/inc/frmtool.hxx |1 +
 sw/source/core/layout/frmtool.cxx  |6 ++
 sw/source/core/layout/paintfrm.cxx |   10 ++
 4 files changed, 44 insertions(+)

New commits:
commit cf113d719f54cc0839c8ab40f2c53b5f156f9424
Author: Miklos Vajna 
AuthorDate: Wed Feb 3 09:36:50 2021 +0100
Commit: Miklos Vajna 
CommitDate: Tue Feb 9 14:09:19 2021 +0100

tdf#91920 sw page gutter margin: add layout

Handle this in general by decreasing the print area of the page frame,
that way the position and size of the child frames (header, body, etc)
will be correct.

One catch is that the page border is independent from the gutter margin
in Word, so compensate for it in lcl_CalcBorderRect() have matching
render result. (E.g. 1cm gutter margin, 1cm left and right margins, then
we would default to drawing the left margin at 2cm from left edge, but
1cm is wanted.)

(cherry picked from commit b1779452bdf8b4d00791f013945cb9aa12b19723)

Conflicts:
sw/qa/core/layout/layout.cxx

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

diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx
index 04b6cd0be900..63fa7336d263 100644
--- a/sw/qa/core/layout/layout.cxx
+++ b/sw/qa/core/layout/layout.cxx
@@ -74,6 +74,33 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, 
testBorderCollapseCompat)
 assertXPath(pXmlDoc, "//polyline[@style='solid']", "width", "20");
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testGutterMargin)
+{
+// Create a document, remember the old left edge of the page print area 
(the rectangle that is
+// inside margins).
+loadURL("private:factory/swriter", nullptr);
+SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
+SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+uno::Reference 
xStandard(getStyles("PageStyles")->getByName("Standard"),
+  uno::UNO_QUERY);
+SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+SwFrame* pPage = pLayout->GetLower();
+long nOldLeft = pPage->getFramePrintArea().Left();
+
+// Set the gutter margin to 2cm.
+sal_Int32 nGutterMm100 = 2000;
+xStandard->setPropertyValue("GutterMargin", uno::makeAny(nGutterMm100));
+
+// Verify that the new left edge is larger.
+long nNewLeft = pPage->getFramePrintArea().Left();
+long nGutterTwips = convertMm100ToTwip(nGutterMm100);
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 1134
+// - Actual  : 0
+// i.e. the gutter was not added to the left margin.
+CPPUNIT_ASSERT_EQUAL(nGutterTwips, nNewLeft - nOldLeft);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index c8447d8dd0f1..23f905f611b3 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -373,6 +373,7 @@ public:
 
 const SwAttrSet  &GetAttrSet() const { return m_rAttrSet;  }
 const SvxULSpaceItem &GetULSpace() const { return m_rUL;   }
+const std::shared_ptr& GetLRSpace() const { return m_rLR; }
 const SvxBoxItem &GetBox() const { return m_rBox;  }
 const SvxShadowItem  &GetShadow()  const { return m_rShadow;   }
 
diff --git a/sw/source/core/layout/frmtool.cxx 
b/sw/source/core/layout/frmtool.cxx
index a861dd60013b..0d106946cd2b 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -2306,6 +2306,12 @@ long SwBorderAttrs::CalcLeft( const SwFrame *pCaller ) 
const
 nLeft += static_cast(pCaller)->GetTextNodeForParaProps()->GetLeftMarginWithNum();
 }
 
+if (pCaller->IsPageFrame() && m_rLR)
+{
+// Decrease the print area: the left space is the sum of left and 
gutter margins.
+nLeft += m_rLR->GetGutterMargin();
+}
+
 return nLeft;
 }
 
diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index a53e7b249dba..da8731a400d1 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -1266,6 +1266,16 @@ static void lcl_CalcBorderRect( SwRect &rRect, const 
SwFrame *pFrame,
 
 SwRectFn fnRect = pFrame->IsVertical() ? ( pFrame->IsVertLR() ? 
(pFrame->IsVertLRBT() ? fnRectVertL2RB2T : fnRectVertL2R) : fnRectVert ) : 
fnRectHori;
 
+if (pFrame->IsPageFrame() && rAttrs.GetLRSpace())
+{
+long nGutterMargin = rAttrs.GetLRSpace()->GetGutterMargin();
+if (nGutterMargin)
+{
+// Paint the left border based on the left margin, ignoring 
the gutter margin.
+(rRect.*fnRect->fnSubLef

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

2021-02-09 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ooxmlexport/data/gutter-left.docx|binary
 sw/qa/extras/ooxmlexport/ooxmlexport15.cxx|   13 +
 sw/source/filter/ww8/docxattributeoutput.cxx  |   12 ++--
 writerfilter/source/dmapper/DomainMapper.cxx  |1 +
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |5 -
 writerfilter/source/dmapper/DomainMapper_Impl.hxx |1 +
 writerfilter/source/dmapper/PropertyIds.cxx   |3 +++
 writerfilter/source/dmapper/PropertyIds.hxx   |1 +
 writerfilter/source/dmapper/PropertyMap.cxx   |2 ++
 writerfilter/source/dmapper/PropertyMap.hxx   |2 ++
 10 files changed, 33 insertions(+), 7 deletions(-)

New commits:
commit abcb758941d955bd5f822ae164fdcdd7870d1d55
Author: Miklos Vajna 
AuthorDate: Wed Feb 3 11:58:10 2021 +0100
Commit: Miklos Vajna 
CommitDate: Tue Feb 9 14:10:22 2021 +0100

tdf#91920 sw page gutter margin: add DOCX filter

- import: convert the gutter twips value to mm100, then map it to the
GutterMargin property of the page style

- export: map SvxLRSpaceItem::m_nGutterMargin to 

(cherry picked from commit b07f6c14a49aea23457b41b0d75390e68fe550b3)

Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
writerfilter/source/dmapper/PropertyIds.cxx
writerfilter/source/dmapper/PropertyIds.hxx

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

diff --git a/sw/qa/extras/ooxmlexport/data/gutter-left.docx 
b/sw/qa/extras/ooxmlexport/data/gutter-left.docx
new file mode 100644
index ..4dc1cbf615f7
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/gutter-left.docx 
differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index 843ef1f3704c..52cfc5c11387 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -157,6 +157,19 @@ DECLARE_OOXMLEXPORT_TEST(testTdf138953, 
"croppedAndRotated.odt")
 CPPUNIT_ASSERT_EQUAL(sal_Int32(8664), frameRect.Width);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testGutterLeft, "gutter-left.docx")
+{
+uno::Reference xPageStyle;
+getStyles("PageStyles")->getByName("Standard") >>= xPageStyle;
+sal_Int32 nGutterMargin{};
+xPageStyle->getPropertyValue("GutterMargin") >>= nGutterMargin;
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 1270
+// - Actual  : 0
+// i.e. gutter margin was lost.
+CPPUNIT_ASSERT_EQUAL(static_cast(1270), nGutterMargin);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 7d614a206c7b..c2776d461c89 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -8323,10 +8323,12 @@ void DocxAttributeOutput::FormatLRSpace( const 
SvxLRSpaceItem& rLRSpace )
 
 m_pageMargins.nLeft += 
sal::static_int_cast(rLRSpace.GetLeft());
 m_pageMargins.nRight += 
sal::static_int_cast(rLRSpace.GetRight());
+sal_uInt16 nGutter = rLRSpace.GetGutterMargin();
 
-AddToAttrList( m_pSectionSpacingAttrList, 2,
+AddToAttrList( m_pSectionSpacingAttrList, 3,
 FSNS( XML_w, XML_left ), OString::number( m_pageMargins.nLeft 
).getStr(),
-FSNS( XML_w, XML_right ), OString::number( 
m_pageMargins.nRight ).getStr() );
+FSNS( XML_w, XML_right ), OString::number( 
m_pageMargins.nRight ).getStr(),
+FSNS( XML_w, XML_gutter ), OString::number( nGutter ).getStr() 
);
 }
 else
 {
@@ -8398,13 +8400,11 @@ void DocxAttributeOutput::FormatULSpace( const 
SvxULSpaceItem& rULSpace )
 // Page Bottom
 m_pageMargins.nBottom = aDistances.dyaBottom;
 
-AddToAttrList( m_pSectionSpacingAttrList, 5,
+AddToAttrList( m_pSectionSpacingAttrList, 4,
 FSNS( XML_w, XML_header ), OString::number( nHeader ).getStr(),
 FSNS( XML_w, XML_top ), OString::number( m_pageMargins.nTop 
).getStr(),
 FSNS( XML_w, XML_footer ), OString::number( nFooter ).getStr(),
-FSNS( XML_w, XML_bottom ), OString::number( 
m_pageMargins.nBottom ).getStr(),
-// FIXME Page Gutter is not handled ATM, setting to 0 as it's 
mandatory for OOXML
-FSNS( XML_w, XML_gutter ), "0" );
+FSNS( XML_w, XML_bottom ), OString::number( 
m_pageMargins.nBottom ).getStr() );
 }
 else
 {
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 7789b54c0f5c..2c47effafd45 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/xmloff schema/libreoffice sw/qa xmloff/source

2021-02-09 Thread Miklos Vajna (via logerrit)
 include/xmloff/xmltoken.hxx |1 
 schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng |   11 ++
 sw/qa/extras/odfexport/data/gutter-left.odt |binary
 sw/qa/extras/odfexport/odfexport.cxx|   13 
 xmloff/source/core/xmltoken.cxx |1 
 xmloff/source/style/PageMasterStyleMap.cxx  |3 ++
 xmloff/source/token/tokens.txt  |1 
 7 files changed, 30 insertions(+)

New commits:
commit 4e544c7776207d2c7725e10a13896c9eb3265370
Author: Miklos Vajna 
AuthorDate: Wed Feb 3 15:36:03 2021 +0100
Commit: Miklos Vajna 
CommitDate: Tue Feb 9 14:10:44 2021 +0100

tdf#91920 sw page gutter margin: add ODF filter

Note that the context filter is not set, since fo:margin affects left
margin, but should not affect the gutter margin.

Also put the new entry at the end, but before the header and footer
sections, so the attribute is written to the correct XML element.

(cherry picked from commit 11e91719ef362e38b3b92e525763a5a89f4eeecb)

Conflicts:
schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng

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

diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index daa4a74db6a2..74e51fb7c41e 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -3371,6 +3371,7 @@ namespace xmloff { namespace token {
 XML_RESOLVED,
 
 XML_PAGE_CONTENT_BOTTOM,
+XML_MARGIN_GUTTER,
 
 XML_TOKEN_END
 };
diff --git a/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng 
b/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng
index 7058d37de220..f99e708a2a52 100644
--- a/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng
+++ b/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng
@@ -2274,6 +2274,17 @@ 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.
 
   
 
+  
+  
+
+  
+
+  
+
+  
+
+  
+
   
   
 
diff --git a/sw/qa/extras/odfexport/data/gutter-left.odt 
b/sw/qa/extras/odfexport/data/gutter-left.odt
new file mode 100644
index ..a5ce541ef078
Binary files /dev/null and b/sw/qa/extras/odfexport/data/gutter-left.odt differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx 
b/sw/qa/extras/odfexport/odfexport.cxx
index a9cc169a6116..7bdb9163e372 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -2442,5 +2442,18 @@ DECLARE_ODFEXPORT_TEST(tdf135942, 
"nestedTableInFooter.odt")
 }
 }
 
+DECLARE_ODFEXPORT_TEST(testGutterLeft, "gutter-left.odt")
+{
+uno::Reference xPageStyle;
+getStyles("PageStyles")->getByName("Standard") >>= xPageStyle;
+sal_Int32 nGutterMargin{};
+xPageStyle->getPropertyValue("GutterMargin") >>= nGutterMargin;
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 1270
+// - Actual  : 0
+// i.e. gutter margin was lost.
+CPPUNIT_ASSERT_EQUAL(static_cast(1270), nGutterMargin);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 5dea024e336f..3978c2673edc 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -3364,6 +3364,7 @@ namespace xmloff { namespace token {
 TOKEN( "resolved",XML_RESOLVED ),
 
 TOKEN( "page-content-bottom", XML_PAGE_CONTENT_BOTTOM ),
+TOKEN("margin-gutter", XML_MARGIN_GUTTER),
 
 #if OSL_DEBUG_LEVEL > 0
 { 0, nullptr, nullptr,   XML_TOKEN_END }
diff --git a/xmloff/source/style/PageMasterStyleMap.cxx 
b/xmloff/source/style/PageMasterStyleMap.cxx
index 641b7471450d..dc6290fd4e8d 100644
--- a/xmloff/source/style/PageMasterStyleMap.cxx
+++ b/xmloff/source/style/PageMasterStyleMap.cxx
@@ -31,6 +31,8 @@ using namespace ::xmloff::token;
 MAP(name, prefix, token, type|XML_TYPE_PROP_PAGE_LAYOUT, context, 
SvtSaveOptions::ODFSVER_012)
 #define PLMAP_ODF13(name,prefix,token,type,context) \
 MAP(name, prefix, token, type|XML_TYPE_PROP_PAGE_LAYOUT, context, 
SvtSaveOptions::ODFSVER_013)
+#define PLMAP_EXT(name,prefix,token,type,context) \
+MAP(name, prefix, token, type|XML_TYPE_PROP_PAGE_LAYOUT, context, 
SvtSaveOptions::ODFSVER_FUTURE_EXTENDED)
 #define HFMAP(name,prefix,token,type,context) \
 MAP(name, prefix, token, type|XML_TYPE_PROP_HEADER_FOOTER, context, 
SvtSaveOptions::ODFSVER_010)
 
@@ -153,6 +155,7 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] =
 PLMAP( "FootnoteLineTextDistance", XML_NAMESPACE_STYL

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

2021-02-09 Thread Szymon Kłos (via logerrit)
 sfx2/source/appl/sfxhelp.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 391f6cbf804f0a2bbd5e22cd3626d7af9a2e8cfa
Author: Szymon Kłos 
AuthorDate: Mon Feb 8 19:01:00 2021 +0100
Commit: Henry Castro 
CommitDate: Tue Feb 9 14:30:35 2021 +0100

lok: send help even when document not ready

Change-Id: I44855ef00a6c54a774965b3c951a4476ed5c8b01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110593
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Henry Castro 

diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 3df45642a5df..67e268e27103 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -722,6 +722,13 @@ static bool impl_showOnlineHelp( const OUString& rURL )

aHelpLink.toUtf8().getStr());
 return true;
 }
+else if (GetpApp())
+{
+
GetpApp()->libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED,
+   
aHelpLink.toUtf8().getStr());
+return true;
+}
+
 return false;
 }
 
___
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' - sw/qa sw/source

2021-02-09 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ww8export/data/gutter-left.doc |binary
 sw/qa/extras/ww8export/ww8export3.cxx   |   13 +
 sw/source/filter/ww8/ww8atr.cxx |8 
 sw/source/filter/ww8/ww8par.hxx |3 ++-
 sw/source/filter/ww8/ww8par6.cxx|   16 
 5 files changed, 35 insertions(+), 5 deletions(-)

New commits:
commit 0a50ed4fb20cc816a8999798339857862ec245b4
Author: Miklos Vajna 
AuthorDate: Wed Feb 3 17:44:38 2021 +0100
Commit: Miklos Vajna 
CommitDate: Tue Feb 9 14:45:19 2021 +0100

tdf#91920 sw page gutter margin: add DOC filter

Map between sprmSDzaGutter and SvxLRSpaceItem::m_nGutterMargin, but
leave the fRTLGutter and iGutterPos cases alone for now.

(cherry picked from commit 5e6f79348c2df12c8793e3c5cb943a86f9e47cc5)

Conflicts:
sw/qa/extras/ww8export/ww8export3.cxx

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

diff --git a/sw/qa/extras/ww8export/data/gutter-left.doc 
b/sw/qa/extras/ww8export/data/gutter-left.doc
new file mode 100644
index ..0d76e8748699
Binary files /dev/null and b/sw/qa/extras/ww8export/data/gutter-left.doc differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx 
b/sw/qa/extras/ww8export/ww8export3.cxx
index e8d3aaec215f..eca50addbe46 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -57,6 +57,19 @@ DECLARE_WW8EXPORT_TEST(testTdf37778_readonlySection, 
"tdf37778_readonlySection.d
 CPPUNIT_ASSERT_EQUAL_MESSAGE("Last printed date", sal_Int16(2009), 
xDPS->getDocumentProperties()->getPrintDate().Year);
 }
 
+DECLARE_WW8EXPORT_TEST(testGutterLeft, "gutter-left.doc")
+{
+uno::Reference xPageStyle;
+getStyles("PageStyles")->getByName("Standard") >>= xPageStyle;
+sal_Int32 nGutterMargin{};
+xPageStyle->getPropertyValue("GutterMargin") >>= nGutterMargin;
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 1270
+// - Actual  : 0
+// i.e. gutter margin was lost.
+CPPUNIT_ASSERT_EQUAL(static_cast(1270), nGutterMargin);
+}
+
 DECLARE_WW8EXPORT_TEST(testArabicZeroNumbering, "arabic-zero-numbering.doc")
 {
 auto xNumberingRules
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index bea6090df892..eb5d42253024 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -4074,6 +4074,7 @@ void WW8AttributeOutput::FormatLRSpace( const 
SvxLRSpaceItem& rLR )
 
 m_pageMargins.nLeft += sal::static_int_cast(rLR.GetLeft());
 m_pageMargins.nRight += 
sal::static_int_cast(rLR.GetRight());
+sal_uInt16 nGutter = rLR.GetGutterMargin();
 
 // sprmSDxaLeft
 m_rWW8Export.InsUInt16( NS_sprm::sprmSDxaLeft );
@@ -4082,6 +4083,13 @@ void WW8AttributeOutput::FormatLRSpace( const 
SvxLRSpaceItem& rLR )
 // sprmSDxaRight
 m_rWW8Export.InsUInt16( NS_sprm::sprmSDxaRight );
 m_rWW8Export.InsUInt16( m_pageMargins.nRight );
+
+if (nGutter)
+{
+// sprmSDzaGutter
+m_rWW8Export.InsUInt16(NS_sprm::sprmSDzaGutter);
+m_rWW8Export.InsUInt16(nGutter);
+}
 }
 else
 {  // normal paragraphs
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index d178bbbeda9a..b2f4a12db1b9 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -794,6 +794,7 @@ public:
 sal_uInt32 nPgWidth;
 sal_uInt32 nPgLeft;
 sal_uInt32 nPgRight;
+sal_uInt32 nPgGutter;
 
 css::drawing::TextVerticalAdjust mnVerticalAdjustment;
 sal_uInt8 mnBorders;
@@ -810,7 +811,7 @@ public:
 bool IsBiDi() const { return maSep.fBiDi != 0; }
 sal_uInt32 GetPageWidth() const { return nPgWidth; }
 sal_uInt32 GetTextAreaWidth() const
-{ return GetPageWidth() - GetPageLeft() - GetPageRight(); }
+{ return GetPageWidth() - GetPageLeft() - nPgGutter - GetPageRight(); }
 sal_uInt32 GetPageHeight() const { return maSep.yaPage; }
 sal_uInt32 GetPageLeft() const { return nPgLeft; }
 sal_uInt32 GetPageRight() const { return nPgRight; }
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 634ac5131b0c..4a8821f678f8 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -477,9 +477,14 @@ void wwSectionManager::SetLeftRight(wwSection &rSection)
 case is handled in GetPageULData.
 */
 if (rSection.maSep.fRTLGutter)
+{
 nWWRi += nWWGu;
-else if (!mrReader.m_xWDop->iGutterPos)
-nWWLe += nWWGu;
+nWWGu = 0;
+}
+else if (mrReader.m_xWDop->iGutterPos)
+{
+nWWGu = 0;
+}
 
 // Left / Right
 if ((rSection.nPgWidth - nW

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

2021-02-09 Thread Miklos Vajna (via logerrit)
 sw/inc/txatbase.hxx |2 +-
 sw/inc/txtftn.hxx   |1 +
 sw/source/core/txtnode/atrftn.cxx   |   29 +
 sw/source/core/txtnode/txatbase.cxx |5 +
 4 files changed, 36 insertions(+), 1 deletion(-)

New commits:
commit 0239f033f77eeaac5ae3d74f2a9cb273cf0bfd41
Author: Miklos Vajna 
AuthorDate: Tue Feb 9 12:34:28 2021 +0100
Commit: Miklos Vajna 
CommitDate: Tue Feb 9 15:01:25 2021 +0100

sw doc model xml dump: show more details of SwTextFootnote

Most importantly the node index of the referred footnote.

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

diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx
index 90509a929309..824f28ff1bd2 100644
--- a/sw/inc/txatbase.hxx
+++ b/sw/inc/txatbase.hxx
@@ -121,7 +121,7 @@ public:
 inline const SwFormatINetFormat   &GetINetFormat() const;
 inline const SwFormatRuby  &GetRuby() const;
 
-void dumpAsXml(xmlTextWriterPtr pWriter) const;
+virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
 };
 
 class SAL_DLLPUBLIC_RTTI SwTextAttrEnd : public virtual SwTextAttr
diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx
index 9d6aa60ff49b..c451b89e7abe 100644
--- a/sw/inc/txtftn.hxx
+++ b/sw/inc/txtftn.hxx
@@ -64,6 +64,7 @@ public:
 sal_uInt16 GetSeqRefNo() const  { return m_nSeqNo; }
 
 static void SetUniqueSeqRefNo( SwDoc& rDoc );
+void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 };
 
 inline const SwTextNode& SwTextFootnote::GetTextNode() const
diff --git a/sw/source/core/txtnode/atrftn.cxx 
b/sw/source/core/txtnode/atrftn.cxx
index 02188cf011de..a621f2a41902 100644
--- a/sw/source/core/txtnode/atrftn.cxx
+++ b/sw/source/core/txtnode/atrftn.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
 #include 
 
 #include 
@@ -576,4 +578,31 @@ void SwTextFootnote::CheckCondColl()
 //FEATURE::CONDCOLL
 }
 
+void SwTextFootnote::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+xmlTextWriterStartElement(pWriter, BAD_CAST("SwTextFootnote"));
+SwTextAttr::dumpAsXml(pWriter);
+
+if (m_pStartNode)
+{
+xmlTextWriterStartElement(pWriter, BAD_CAST("m_pStartNode"));
+xmlTextWriterWriteAttribute(pWriter, BAD_CAST("index"),
+
BAD_CAST(OString::number(m_pStartNode->GetIndex()).getStr()));
+xmlTextWriterEndElement(pWriter);
+}
+if (m_pTextNode)
+{
+xmlTextWriterStartElement(pWriter, BAD_CAST("m_pTextNode"));
+xmlTextWriterWriteAttribute(pWriter, BAD_CAST("index"),
+
BAD_CAST(OString::number(m_pTextNode->GetIndex()).getStr()));
+xmlTextWriterEndElement(pWriter);
+}
+xmlTextWriterStartElement(pWriter, BAD_CAST("m_nSeqNo"));
+xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"),
+BAD_CAST(OString::number(m_nSeqNo).getStr()));
+xmlTextWriterEndElement(pWriter);
+
+xmlTextWriterEndElement(pWriter);
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/txatbase.cxx 
b/sw/source/core/txtnode/txatbase.cxx
index 7f46fd178f37..cf4583f1473a 100644
--- a/sw/source/core/txtnode/txatbase.cxx
+++ b/sw/source/core/txtnode/txatbase.cxx
@@ -89,6 +89,9 @@ void SwTextAttrEnd::SetEnd(sal_Int32 n)
 void SwTextAttr::dumpAsXml(xmlTextWriterPtr pWriter) const
 {
 xmlTextWriterStartElement(pWriter, BAD_CAST("SwTextAttr"));
+xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this);
+xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("symbol"), "%s",
+  BAD_CAST(typeid(*this).name()));
 
 xmlTextWriterWriteAttribute(pWriter, BAD_CAST("start"), 
BAD_CAST(OString::number(m_nStart).getStr()));
 if (End())
@@ -154,6 +157,8 @@ void SwTextAttr::dumpAsXml(xmlTextWriterPtr pWriter) const
 case RES_TXTATR_INPUTFIELD:
 GetFormatField().dumpAsXml(pWriter);
 break;
+case RES_TXTATR_FTN:
+break;
 default:
 SAL_WARN("sw.core", "Unhandled TXTATR");
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Unit test, with inserting a control?

2021-02-09 Thread Regina Henschel

Hi all,

this is about https://gerrit.libreoffice.org/c/core/+/110636, a fix for 
Bug 140252 - Form control is not in front of other shapes


I would need to make a test with this:
1. Open toolbar "Form controls".
2. Select a form control, e.g. the push button.
3. Drag create the button control with the mouse.
4. Deselect it.
5. Click on "line" (or another, but not a custom shape because of bug 
134355) in drawing toolbar.

6. Drag create the line so that it overlaps the button object.
Make sure, that the button object is shown on front of the line.

Alternatively (and likely easier)
5. Examine the button object, and verify that it has properties 
layerID="3" and LayerName="controls".

Error was, that it has layerID="0" and LayerName="vorne".

I don't see a way to do this as cppunit test.
Xisco, do you see a way to do it as uitest? Then I would ask you to 
create one. I'm on Windows, that makes it difficult for me.


Or have you an idea, how to make it as cppunit test...?

Kind regards
Regina




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


Recursive use of non-recursive std::mtuex in Scheduler::ProcessTaskScheduling?

2021-02-09 Thread Stephan Bergmann
I occasionally see soffice.bin crash during `make check` tests on 
Windows, and now building with --enable-breakpad, 
JunitTest_forms_unoapi_1 failed with


[...]

LOG> up(): COMPLETED.OK







LOG> Execute: down()



LOG> starting required method: addSpinListener()



warn:desktop:23856:19364:desktop/source/app/crashreport.cxx:73: minidump 
generated: 
C:\lo-clang\core\workdir\JunitTest\forms_unoapi_1\user\crash\05aab6e1-a92d-4bfe-8563-0bfd0dc85d65.dmp
com.sun.star.lang.DisposedException


[...]

and inspecting that .dmp (with VS, as documented in 
external/breakpad/README) shows an uncaught std::system_error at 
(annotations inline):



KERNELBASE.dll!RaiseException()
VCRUNTIME140D.dll!_CxxThrowException(void * pExceptionObject, const 
_s__ThrowInfo * pThrowInfo) Line 75
at D:\a01\_work\6\s\src\vctools\crt\vcruntime\src\eh\throw.cpp(75)
MSVCP140D.dll!std::_Throw_Cpp_error(int code) Line 38
at D:\a01\_work\6\s\src\vctools\crt\github\stl\src\thread0.cpp(38)
MSVCP140D.dll!std::_Throw_C_error(int code) Line 50
at D:\a01\_work\6\s\src\vctools\crt\github\stl\src\thread0.cpp(50)
vcllo.dll!std::_Check_C_return(int _Res) Line 134
at 
C:\PROGRA~2\MIB055~1\2019\COMMUN~1\VC\Tools\MSVC\1428~1.293\Include\xthreads.h(134)


^ that's


enum { _Thrd_success, _Thrd_nomem, _Thrd_timedout, _Thrd_busy, _Thrd_error };



inline int _Check_C_return(int _Res) { // throw exception on failure
if (_Res != _Thrd_success) {
_Throw_C_error(_Res);
}

return _Res;
}


with _Res = 3 (aka _Thrd_busy, presumably representing an attempt to 
recursively lock a non-recursive std::mutex)



vcllo.dll!std::_Mutex_base::lock() Line 52
at 
C:\PROGRA~2\MIB055~1\2019\COMMUN~1\VC\Tools\MSVC\1428~1.293\Include\mutex(52)


^ that's


void lock() {
   _Check_C_return(_Mtx_lock(_Mymtx()));
}



vcllo.dll!Scheduler::Lock() Line 215
at C:\lo-clang\core\vcl\source\app\scheduler.cxx(215)
vcllo.dll!SchedulerGuard::SchedulerGuard() Line 57
at C:\lo-clang\core\vcl\inc\schedulerimpl.hxx(57)
vcllo.dll!Scheduler::ProcessTaskScheduling() Line 344
at C:\lo-clang\core\vcl\source\app\scheduler.cxx(344)
vcllo.dll!Scheduler::CallbackTaskScheduling() Line 267
at C:\lo-clang\core\vcl\source\app\scheduler.cxx(267)
vcllo.dll!SalTimer::CallCallback() Line 55
at C:\lo-clang\core\vcl\inc\saltimer.hxx(55)
vclplug_winlo.dll!WinSalTimer::ImplHandleElapsedTimer() Line 166
at C:\lo-clang\core\vcl\win\app\saltimer.cxx(166)
vclplug_winlo.dll!ImplSalYield(const bool bWait, const bool 
bHandleAllCurrentEvents) Line 456
at C:\lo-clang\core\vcl\win\app\salinst.cxx(456)
vclplug_winlo.dll!SalComWndProc(HWND__ *, unsigned int nMsg, unsigned __int64 
wParam, __int64 lParam, bool & rDef) Line 570
at C:\lo-clang\core\vcl\win\app\salinst.cxx(570)
vclplug_winlo.dll!SalComWndProcW(HWND__ * hWnd, unsigned int nMsg, unsigned 
__int64 wParam, __int64 lParam) Line 655
at C:\lo-clang\core\vcl\win\app\salinst.cxx(655)
user32.dll!UserCallWinProcCheckWow()
user32.dll!DispatchClientMessage()
user32.dll!__fnDWORD()
ntdll.dll!KiUserCallbackDispatcherContinue()
user32.dll!NtUserPeekMessage()
user32.dll!PeekMessageW()
vclplug_winlo.dll!WinSalInstance::AnyInput(VclInputFlags nType) Line 801
at C:\lo-clang\core\vcl\win\app\salinst.cxx(801)
vcllo.dll!Application::AnyInput(VclInputFlags nType) Line 590
at C:\lo-clang\core\vcl\source\app\svapp.cxx(590)
vcllo.dll!Scheduler::ProcessTaskScheduling() Line 436
at C:\lo-clang\core\vcl\source\app\scheduler.cxx(436)


^ that frame has the same SchedulerGuard locked that the other 
Scheduler::ProcessTaskScheduling frame further up wants to lock



vcllo.dll!Scheduler::CallbackTaskScheduling() Line 267
at C:\lo-clang\core\vcl\source\app\scheduler.cxx(267)
vcllo.dll!SalTimer::CallCallback() Line 55
at C:\lo-clang\core\vcl\inc\saltimer.hxx(55)
vclplug_winlo.dll!WinSalTimer::ImplHandleElapsedTimer() Line 166
at C:\lo-clang\core\vcl\win\app\saltimer.cxx(166)
vclplug_winlo.dll!ImplSalYield(const bool bWait, const bool 
bHandleAllCurrentEvents) Line 456
at C:\lo-clang\core\vcl\win\app\salinst.cxx(456)
vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool 
bHandleAllCurrentEvents) Line 512
at C:\lo-clang\core\vcl\win\app\salinst.cxx(512)
vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 463
at C:\lo-clang\core\vcl\source\app\svapp.cxx(463)
vcllo.dll!Application::Yield() Line 531
at C:\lo-clang\core\vcl\source\app\svapp.cxx(531)
vcllo.dll!Application::Execute() Line 441
at C:\lo-clang\core\vcl\source\app\svapp.cxx(441)
sofficeapp.dll!desktop::Desktop::Main() Line 1586
at C:\lo-clang\core\desktop\source\app\app.cxx(1586)
vcllo.dll!ImplSVMain() Line 196
at C:\lo-clang\core\vcl\source\app\svmain.cxx(196)
vcllo.dll!SVMain() Line 228
at C:\lo-clang\core\vcl\source\app\svmain.cxx(228)
sofficeapp.dll!soffice_main() 

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

2021-02-09 Thread Miklos Vajna (via logerrit)
 sw/inc/txatbase.hxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 0f89ce31eda36a05d295504a521b27907b798490
Author: Miklos Vajna 
AuthorDate: Tue Feb 9 15:06:48 2021 +0100
Commit: Miklos Vajna 
CommitDate: Tue Feb 9 16:20:21 2021 +0100

sw: document SwTextAttr

Just a summary, sw/README has more on this.

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

diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx
index 824f28ff1bd2..8018712eaa23 100644
--- a/sw/inc/txatbase.hxx
+++ b/sw/inc/txatbase.hxx
@@ -34,6 +34,10 @@
 
 class SfxItemPool;
 
+/**
+ * A wrapper around SfxPoolItem to store the start position of (usually) a 
text portion, with an
+ * optional end.
+ */
 class SAL_DLLPUBLIC_RTTI SwTextAttr
 {
 friend class SwpHints;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-09 Thread Attila Szűcs (via logerrit)
 sc/inc/document.hxx|5 -
 sc/inc/table.hxx   |7 +
 sc/qa/unit/bugfix-test.cxx |   19 
 sc/qa/unit/data/ods/tdf104502_hiddenColsCountedInPageCount.ods |binary
 sc/source/core/data/documen2.cxx   |4 
 sc/source/core/data/document.cxx   |4 
 sc/source/core/data/table1.cxx |   47 
+++---
 sc/source/ui/unoobj/cursuno.cxx|2 
 8 files changed, 66 insertions(+), 22 deletions(-)

New commits:
commit 2bf3e0d00e3bccb5b250642ee0d3fdbe6cae8ecc
Author: Attila Szűcs 
AuthorDate: Wed Jan 27 17:43:43 2021 +0100
Commit: László Németh 
CommitDate: Tue Feb 9 16:37:51 2021 +0100

tdf#104502 sc: skip hidden columns at printing pages

Page calculation counted the hidden columns, resulted
printing blank pages by accident.

Extend GetPrintArea() and GetTableArea() to count pages
without the hidden columns, too.

Co-authored-by: Tibor Nagy (NISZ)

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

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 79091e89504c..6d012c9b01ec 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1456,9 +1456,10 @@ public:
 boolGetDataAreaSubrange(ScRange& rRange) const;
 
 SC_DLLPUBLIC bool   GetCellArea( SCTAB nTab, SCCOL& rEndCol, 
SCROW& rEndRow ) const;
-SC_DLLPUBLIC bool   GetTableArea( SCTAB nTab, SCCOL& rEndCol, 
SCROW& rEndRow ) const;
+SC_DLLPUBLIC bool   GetTableArea( SCTAB nTab, SCCOL& rEndCol, 
SCROW& rEndRow,
+  bool bCalcHiddens = false) const;
 SC_DLLPUBLIC bool   GetPrintArea( SCTAB nTab, SCCOL& rEndCol, 
SCROW& rEndRow,
-  bool bNotes = true ) const;
+  bool bNotes = true, bool 
bCalcHiddens = false) const;
 SC_DLLPUBLIC bool   GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, 
SCROW nEndRow,
  SCCOL& rEndCol ) const;
 SC_DLLPUBLIC bool   GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, 
SCCOL nEndCol,
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 309d49d4f140..fed4d4b12388 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -198,6 +198,8 @@ private:
 
 mutable SCCOL nTableAreaX;
 mutable SCROW nTableAreaY;
+mutable SCCOL nTableAreaVisibleX;
+mutable SCROW nTableAreaVisibleY;
 
 SCTAB   nTab;
 ScDocument& rDocument;
@@ -232,6 +234,7 @@ private:
 boolbLoadingRTL:1;
 boolbPageSizeValid:1;
 mutable boolbTableAreaValid:1;
+mutable boolbTableAreaVisibleValid:1;
 boolbVisible:1;
 boolbStreamValid:1;
 boolbPendingRowHeights:1;
@@ -567,8 +570,8 @@ public:
 voidInvalidatePageBreaks();
 
 boolGetCellArea( SCCOL& rEndCol, SCROW& rEndRow ) const;   
 // FALSE = empty
-boolGetTableArea( SCCOL& rEndCol, SCROW& rEndRow ) const;
-boolGetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, bool bNotes ) 
const;
+boolGetTableArea( SCCOL& rEndCol, SCROW& rEndRow, bool 
bCalcHiddens = false) const;
+boolGetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, bool bNotes, 
bool bCalcHiddens = false) const;
 boolGetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
 SCCOL& rEndCol ) const;
 boolGetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
diff --git a/sc/qa/unit/bugfix-test.cxx b/sc/qa/unit/bugfix-test.cxx
index 874069ade2f5..384591fe1a10 100644
--- a/sc/qa/unit/bugfix-test.cxx
+++ b/sc/qa/unit/bugfix-test.cxx
@@ -59,6 +59,7 @@ public:
 void testTdf128951();
 void testTdf129789();
 void testTdf130725();
+void testTdf104502_hiddenColsCountedInPageCount();
 
 CPPUNIT_TEST_SUITE(ScFiltersTest);
 CPPUNIT_TEST(testTdf137576_Measureline);
@@ -81,6 +82,7 @@ public:
 CPPUNIT_TEST(testTdf128951);
 CPPUNIT_TEST(testTdf129789);
 CPPUNIT_TEST(testTdf130725);
+CPPUNIT_TEST(testTdf104502_hiddenColsCountedInPageCount);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -721,6 +723,23 @@ void ScFiltersTest::testTdf130725()
 0.0042, xCell->getValue()); // strict equality
 }
 
+void ScFiltersTest::testTdf104502_hiddenColsCountedInPageCount()
+{
+ScDocShellRef xShell = loadDoc(u"tdf104502_hiddenColsCountedInPageCount.", 
FORMAT_ODS);
+CPPUNIT_ASSERT(xShell.is());
+
+ScDocument& rDoc = xShell->GetDocument();
+
+//Check that hidden columns are not calculated into Print Area
+SCC

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 2 commits - cui/source cui/uiconfig sw/qa sw/source writerfilter/source

2021-02-09 Thread Miklos Vajna (via logerrit)
 cui/source/inc/page.hxx |2 +
 cui/source/tabpages/page.cxx|   24 +-
 cui/uiconfig/ui/pageformatpage.ui   |   32 
 sw/qa/extras/rtfexport/data/gutter-left.rtf |4 +++
 sw/qa/extras/rtfexport/rtfexport4.cxx   |   15 +++
 sw/source/filter/ww8/rtfattributeoutput.cxx |5 +++
 writerfilter/source/rtftok/rtfdispatchvalue.cxx |5 +++
 7 files changed, 86 insertions(+), 1 deletion(-)

New commits:
commit 3739a08653fbdb2c9268f7386dfccfad052aca82
Author: Miklos Vajna 
AuthorDate: Thu Feb 4 14:07:21 2021 +0100
Commit: Miklos Vajna 
CommitDate: Tue Feb 9 17:08:50 2021 +0100

tdf#91920 sw page gutter margin: add UI

Also update the preview widget and hide the new UI in Calc/Impress.

(cherry picked from commit e1d7242341ec148b631a96e6d63697bce6a497c9)

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

diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index 1019a9fbc214..a2d2dcf5dda4 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -106,6 +106,8 @@ private:
 std::unique_ptr m_xRightMarginEdit;
 std::unique_ptr m_xTopMarginEdit;
 std::unique_ptr m_xBottomMarginEdit;
+std::unique_ptr m_xGutterMarginLbl;
+std::unique_ptr m_xGutterMarginEdit;
 // layout settings
 std::unique_ptr m_xPageText;
 std::unique_ptr m_xLayoutBox;
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 508984bf882b..7a46f0fa2ae5 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -162,6 +162,8 @@ SvxPageDescPage::SvxPageDescPage(weld::Container* pPage, 
weld::DialogController*
 , m_xRightMarginEdit(m_xBuilder->weld_metric_spin_button("spinMargRight", 
FieldUnit::CM))
 , m_xTopMarginEdit(m_xBuilder->weld_metric_spin_button("spinMargTop", 
FieldUnit::CM))
 , m_xBottomMarginEdit(m_xBuilder->weld_metric_spin_button("spinMargBot", 
FieldUnit::CM))
+, m_xGutterMarginLbl(m_xBuilder->weld_label("labelGutterMargin"))
+, m_xGutterMarginEdit(m_xBuilder->weld_metric_spin_button("spinMargGut", 
FieldUnit::CM))
 , m_xPageText(m_xBuilder->weld_label("labelPageLayout"))
 , m_xLayoutBox(m_xBuilder->weld_combo_box("comboPageLayout"))
 , m_xNumberFormatText(m_xBuilder->weld_label("labelPageNumbers"))
@@ -231,6 +233,7 @@ SvxPageDescPage::SvxPageDescPage(weld::Container* pPage, 
weld::DialogController*
 SetFieldUnit( *m_xRightMarginEdit, eFUnit );
 SetFieldUnit( *m_xTopMarginEdit, eFUnit );
 SetFieldUnit( *m_xBottomMarginEdit, eFUnit );
+SetFieldUnit(*m_xGutterMarginEdit, eFUnit);
 SetFieldUnit( *m_xPaperWidthEdit, eFUnit );
 SetFieldUnit( *m_xPaperHeightEdit, eFUnit );
 
@@ -281,6 +284,9 @@ SvxPageDescPage::SvxPageDescPage(weld::Container* pPage, 
weld::DialogController*
 
m_xRightMarginEdit->set_max(m_xRightMarginEdit->normalize(aDrawinglayerOpt.GetMaximumPaperRightMargin()),
 FieldUnit::MM);
 
m_xTopMarginEdit->set_max(m_xTopMarginEdit->normalize(aDrawinglayerOpt.GetMaximumPaperTopMargin()),
 FieldUnit::MM);
 
m_xBottomMarginEdit->set_max(m_xBottomMarginEdit->normalize(aDrawinglayerOpt.GetMaximumPaperBottomMargin()),
 FieldUnit::MM);
+m_xGutterMarginEdit->set_max(
+
m_xGutterMarginEdit->normalize(aDrawinglayerOpt.GetMaximumPaperLeftMargin()),
+FieldUnit::MM);
 
 // Get the i18n framework numberings and add them to the listbox.
 
SvxNumOptionsTabPageHelper::GetI18nNumbering(m_xNumberFormatBox->get_widget(), 
std::numeric_limits::max());
@@ -311,6 +317,7 @@ void SvxPageDescPage::Init_Impl()
 m_xRightMarginEdit->connect_value_changed(aLink);
 m_xTopMarginEdit->connect_value_changed(aLink);
 m_xBottomMarginEdit->connect_value_changed(aLink);
+m_xGutterMarginEdit->connect_value_changed(aLink);
 
 m_xHorzBox->connect_toggled(LINK(this, SvxPageDescPage, CenterHdl_Impl));
 m_xVertBox->connect_toggled(LINK(this, SvxPageDescPage, CenterHdl_Impl));
@@ -329,6 +336,7 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet )
 {
 const SvxLRSpaceItem& rLRSpace = static_cast(*pItem);
 SetMetricValue( *m_xLeftMarginEdit, rLRSpace.GetLeft(), eUnit );
+SetMetricValue(*m_xGutterMarginEdit, rLRSpace.GetGutterMargin(), 
eUnit);
 m_aBspWin.SetLeft(
 static_cast(ConvertLong_Impl( rLRSpace.GetLeft(), 
eUnit )) );
 SetMetricValue( *m_xRightMarginEdit, rLRSpace.GetRight(), eUnit );
@@ -478,6 +486,9 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet )
 m_aBspWin.SetHorz(m_xHorzBox->get_active());
 m_aBspWin.SetVert(m_xVertBox->get_active());
 
+m_xGutterMarginLbl->hide();
+m_xGutterMarginEdit->hide();
+
 break;
 }
 
@@ -493,6 +504,9 @@

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

2021-02-09 Thread Miklos Vajna (via logerrit)
 sw/inc/IDocumentSettingAccess.hxx |1 +
 sw/source/core/doc/DocumentSettingManager.cxx |8 +++-
 sw/source/core/inc/DocumentSettingManager.hxx |2 ++
 sw/source/uibase/uno/SwXDocumentSettings.cxx  |   16 
 4 files changed, 26 insertions(+), 1 deletion(-)

New commits:
commit 9cf6612438a478da3c42de2a2fb83d4b5fdc626e
Author: Miklos Vajna 
AuthorDate: Thu Feb 4 16:55:13 2021 +0100
Commit: Miklos Vajna 
CommitDate: Tue Feb 9 17:09:03 2021 +0100

tdf#91920 sw page gutter margin, from top: add doc model & UNO API

Do this per-doc, rather than per-page-desc, because Word doesn't support
it per-section, so we would just create interop problems for ourselves
with supporting it per-page-desc.

(cherry picked from commit 97abf85bb152b8a665dff6fd8b65fffea5365dc8)

Conflicts:
sw/inc/IDocumentSettingAccess.hxx
sw/source/core/doc/DocumentSettingManager.cxx
sw/source/core/inc/DocumentSettingManager.hxx
sw/source/uibase/uno/SwXDocumentSettings.cxx

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

diff --git a/sw/inc/IDocumentSettingAccess.hxx 
b/sw/inc/IDocumentSettingAccess.hxx
index 5b093bc0d08a..287a12604850 100644
--- a/sw/inc/IDocumentSettingAccess.hxx
+++ b/sw/inc/IDocumentSettingAccess.hxx
@@ -106,6 +106,7 @@ enum class DocumentSettingId
 APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING,
 CONTINUOUS_ENDNOTES,
 HEADER_SPACING_BELOW_LAST_PARA,
+GUTTER_AT_TOP,
 };
 
  /** Provides access to settings of a document
diff --git a/sw/source/core/doc/DocumentSettingManager.cxx 
b/sw/source/core/doc/DocumentSettingManager.cxx
index 5d6a0ba7df1c..d7af55649e62 100644
--- a/sw/source/core/doc/DocumentSettingManager.cxx
+++ b/sw/source/core/doc/DocumentSettingManager.cxx
@@ -93,7 +93,8 @@ sw::DocumentSettingManager::DocumentSettingManager(SwDoc 
&rDoc)
 mApplyParagraphMarkFormatToNumbering(false),
 mbLastBrowseMode( false ),
 mbDisableOffPagePositioning ( false ),
-mbHeaderSpacingBelowLastPara(false)
+mbHeaderSpacingBelowLastPara(false),
+mbGutterAtTop(false)
 
 // COMPATIBILITY FLAGS END
 {
@@ -224,6 +225,8 @@ bool sw::DocumentSettingManager::get(/*[in]*/ 
DocumentSettingId id) const
 case DocumentSettingId::CONTINUOUS_ENDNOTES:
 return mbContinuousEndnotes;
 case DocumentSettingId::HEADER_SPACING_BELOW_LAST_PARA: return 
mbHeaderSpacingBelowLastPara;
+case DocumentSettingId::GUTTER_AT_TOP:
+return mbGutterAtTop;
 default:
 OSL_FAIL("Invalid setting id");
 }
@@ -469,6 +472,9 @@ void sw::DocumentSettingManager::set(/*[in]*/ 
DocumentSettingId id, /*[in]*/ boo
 case DocumentSettingId::HEADER_SPACING_BELOW_LAST_PARA:
 mbHeaderSpacingBelowLastPara = value;
 break;
+case DocumentSettingId::GUTTER_AT_TOP:
+mbGutterAtTop = value;
+break;
 default:
 OSL_FAIL("Invalid setting id");
 }
diff --git a/sw/source/core/inc/DocumentSettingManager.hxx 
b/sw/source/core/inc/DocumentSettingManager.hxx
index 5a19e930f664..6b65839259d7 100644
--- a/sw/source/core/inc/DocumentSettingManager.hxx
+++ b/sw/source/core/inc/DocumentSettingManager.hxx
@@ -164,6 +164,8 @@ class DocumentSettingManager :
 bool mbEmptyDbFieldHidesPara;
 bool mbContinuousEndnotes = false;
 bool mbHeaderSpacingBelowLastPara;
+/// Gutter position: false means left (not a compatibility setting).
+bool mbGutterAtTop;
 
 public:
 
diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx 
b/sw/source/uibase/uno/SwXDocumentSettings.cxx
index 1c437e021f93..b33be85354f2 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx
@@ -147,6 +147,7 @@ enum SwDocumentSettingsPropertyHandles
 HANDLE_EMPTY_DB_FIELD_HIDES_PARA,
 HANDLE_CONTINUOUS_ENDNOTES,
 HANDLE_HEADER_SPACING_BELOW_LAST_PARA,
+HANDLE_GUTTER_AT_TOP,
 };
 
 static MasterPropertySetInfo * lcl_createSettingsInfo()
@@ -235,6 +236,7 @@ static MasterPropertySetInfo * lcl_createSettingsInfo()
 { OUString("EmptyDbFieldHidesPara"), HANDLE_EMPTY_DB_FIELD_HIDES_PARA, 
cppu::UnoType::get(), 0 },
 { OUString("ContinuousEndnotes"), HANDLE_CONTINUOUS_ENDNOTES, 
cppu::UnoType::get(), 0 },
 { OUString("HeaderSpacingBelowLastPara"), 
HANDLE_HEADER_SPACING_BELOW_LAST_PARA, cppu::UnoType::get(), 0 },
+{ OUString("GutterAtTop"), HANDLE_GUTTER_AT_TOP, 
cppu::UnoType::get(), 0 },
 
 /*
  * As OS said, we don't have a view when we need to set this, so I have to
@@ -966,6 +968,15 @@ void SwXDocumentSettings::_setSingleValue( const 
comphelper::PropertyInfo & rInf
 }
 }
 break;
+case HANDLE_GUTTER_AT_TOP:
+{
+bo

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

2021-02-09 Thread Miklos Vajna (via logerrit)
 sw/qa/core/layout/layout.cxx   |   31 +++
 sw/source/core/layout/frmtool.cxx  |   22 --
 sw/source/core/layout/paintfrm.cxx |   10 +-
 3 files changed, 60 insertions(+), 3 deletions(-)

New commits:
commit c5b0c15f56f3a74612b4808c7ec699c46d7f1e98
Author: Miklos Vajna 
AuthorDate: Fri Feb 5 09:10:39 2021 +0100
Commit: Miklos Vajna 
CommitDate: Tue Feb 9 17:09:19 2021 +0100

tdf#91920 sw page gutter margin, from top: add layout

Take the new doc setting into account and if it's true, then undo the
existing "increase left margin" logic, and do an "increase top margin"
one instead.

(cherry picked from commit 59e816faa2a2bc0b88c39f063c53e00a33f23722)

Conflicts:
sw/source/core/layout/paintfrm.cxx

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

diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx
index 63fa7336d263..33642b84776d 100644
--- a/sw/qa/core/layout/layout.cxx
+++ b/sw/qa/core/layout/layout.cxx
@@ -101,6 +101,37 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testGutterMargin)
 CPPUNIT_ASSERT_EQUAL(nGutterTwips, nNewLeft - nOldLeft);
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testGutterTopMargin)
+{
+// Create a document, remember the old top edge of the page print area 
(the rectangle that is
+// inside margins).
+loadURL("private:factory/swriter", nullptr);
+SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
+SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xSettings(
+xFactory->createInstance("com.sun.star.document.Settings"), 
uno::UNO_QUERY);
+xSettings->setPropertyValue("GutterAtTop", uno::makeAny(true));
+uno::Reference 
xStandard(getStyles("PageStyles")->getByName("Standard"),
+  uno::UNO_QUERY);
+SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+SwFrame* pPage = pLayout->GetLower();
+long nOldTop = pPage->getFramePrintArea().Top();
+
+// Set the gutter margin to 2cm.
+sal_Int32 nGutterMm100 = 2000;
+xStandard->setPropertyValue("GutterMargin", uno::makeAny(nGutterMm100));
+
+// Verify that the new top edge is larger.
+long nNewTop = pPage->getFramePrintArea().Top();
+long nGutterTwips = convertMm100ToTwip(nGutterMm100);
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 1134
+// - Actual  : 0
+// i.e. the gutter was not added to the left margin.
+CPPUNIT_ASSERT_EQUAL(nGutterTwips, nNewTop - nOldTop);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/frmtool.cxx 
b/sw/source/core/layout/frmtool.cxx
index 0d106946cd2b..550e54c05f70 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -2206,6 +2206,18 @@ SwBorderAttrs::~SwBorderAttrs()
 void SwBorderAttrs::CalcTop_()
 {
 m_nTop = CalcTopLine() + m_rUL.GetUpper();
+
+if (m_rLR)
+{
+bool bGutterAtTop = 
m_rAttrSet.GetDoc()->getIDocumentSettingAccess().get(
+DocumentSettingId::GUTTER_AT_TOP);
+if (bGutterAtTop)
+{
+// Decrease the print area: the top space is the sum of top and 
gutter margins.
+m_nTop += m_rLR->GetGutterMargin();
+}
+}
+
 m_bTop = false;
 }
 
@@ -2308,8 +2320,14 @@ long SwBorderAttrs::CalcLeft( const SwFrame *pCaller ) 
const
 
 if (pCaller->IsPageFrame() && m_rLR)
 {
-// Decrease the print area: the left space is the sum of left and 
gutter margins.
-nLeft += m_rLR->GetGutterMargin();
+const auto pPageFrame = static_cast(pCaller);
+bool bGutterAtTop = 
pPageFrame->GetFormat()->getIDocumentSettingAccess().get(
+DocumentSettingId::GUTTER_AT_TOP);
+if (!bGutterAtTop)
+{
+// Decrease the print area: the left space is the sum of left and 
gutter margins.
+nLeft += m_rLR->GetGutterMargin();
+}
 }
 
 return nLeft;
diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index da8731a400d1..6563256804f9 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -1269,11 +1269,19 @@ static void lcl_CalcBorderRect( SwRect &rRect, const 
SwFrame *pFrame,
 if (pFrame->IsPageFrame() && rAttrs.GetLRSpace())
 {
 long nGutterMargin = rAttrs.GetLRSpace()->GetGutterMargin();
-if (nGutterMargin)
+const auto pPageFrame = static_cast(pFrame);
+bool bGutterAtTop = 
pPageFrame->GetFormat()->getIDocumentSettingAccess().get(
+DocumentSetti

Re: Recursive use of non-recursive std::mtuex in Scheduler::ProcessTaskScheduling?

2021-02-09 Thread Jan-Marek Glogowski

Am 09.02.21 um 15:56 schrieb Stephan Bergmann:
I occasionally see soffice.bin crash during `make check` tests on 
Windows, and now building with --enable-breakpad, 
JunitTest_forms_unoapi_1 failed with




...


vclplug_winlo.dll!WinSalTimer::ImplHandleElapsedTimer() Line 166
at C:\lo-clang\core\vcl\win\app\saltimer.cxx(166)
vclplug_winlo.dll!ImplSalYield(const bool bWait, const bool 
bHandleAllCurrentEvents) Line 456

at C:\lo-clang\core\vcl\win\app\salinst.cxx(456)
vclplug_winlo.dll!SalComWndProc(HWND__ *, unsigned int nMsg, unsigned 
__int64 wParam, __int64 lParam, bool & rDef) Line 570

at C:\lo-clang\core\vcl\win\app\salinst.cxx(570)
vclplug_winlo.dll!SalComWndProcW(HWND__ * hWnd, unsigned int nMsg, 
unsigned __int64 wParam, __int64 lParam) Line 655

at C:\lo-clang\core\vcl\win\app\salinst.cxx(655)
user32.dll!UserCallWinProcCheckWow()
user32.dll!DispatchClientMessage()
user32.dll!__fnDWORD()
ntdll.dll!KiUserCallbackDispatcherContinue()
user32.dll!NtUserPeekMessage()
user32.dll!PeekMessageW()
vclplug_winlo.dll!WinSalInstance::AnyInput(VclInputFlags nType) Line 801
at C:\lo-clang\core\vcl\win\app\salinst.cxx(801)
vcllo.dll!Application::AnyInput(VclInputFlags nType) Line 590
at C:\lo-clang\core\vcl\source\app\svapp.cxx(590)
vcllo.dll!Scheduler::ProcessTaskScheduling() Line 436
at C:\lo-clang\core\vcl\source\app\scheduler.cxx(436)


^ that frame has the same SchedulerGuard locked that the other 
Scheduler::ProcessTaskScheduling frame further up wants to lock.


That is the new code from https://gerrit.libreoffice.org/c/core/+/110538

I think we have to revert that. I don't see a way to prevent AnyInput / 
PeekMessage to process messages. There is GetQueueStatus, but I guess 
that's not possible to be used correctly with our complicated user 
WM_USER based setup.


I wasn't anymore aware, that PeekMessage, called from AnyInput, will 
actually dispatch messages (well - the API docs start with "Dispatches 
incoming sent messages"). This backtrace just dispatches 
SAL_MSG_THREADYIELD in a nested scheduler loop.


Even with a recursive lock, this breaks the Scheduler event sequence, as 
it would now probably process an event before the current event.


IMHO the whole SAL_MSG_THREADYIELD should not exist, and we should have 
per-thread event loops and these wouldn't idle on the main thread at 
all, but that is probably a larger change, requiring a lot of new code 
to sync events with the main thread.

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


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

2021-02-09 Thread Stephan Bergmann (via logerrit)
 embedserv/source/embed/servprov.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4440be60e43183b1761fbec38c09665b237fb01e
Author: Stephan Bergmann 
AuthorDate: Tue Feb 9 16:22:53 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Feb 9 17:50:56 2021 +0100

Silence -Werror,-Wunused-variable (clang-cl)

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

diff --git a/embedserv/source/embed/servprov.cxx 
b/embedserv/source/embed/servprov.cxx
index ef8004a3ce02..8a1efd5152a5 100644
--- a/embedserv/source/embed/servprov.cxx
+++ b/embedserv/source/embed/servprov.cxx
@@ -45,7 +45,7 @@ const GUID* const guidList[ SUPPORTED_FACTORIES_NUM ] = {
 
 static void o2u_attachCurrentThread()
 {
-static thread_local bool aInit = []
+[[maybe_unused]] static thread_local bool aInit = []
 {
 HRESULT hr = CoInitializeEx(nullptr, COINIT_MULTITHREADED);
 if (!SUCCEEDED(hr))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-09 Thread Stephan Bergmann (via logerrit)
 sal/qa/osl/file/osl_File.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ea0d73e3e10bddda716e11b067d70fb2c9dba626
Author: Stephan Bergmann 
AuthorDate: Tue Feb 9 16:24:04 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Feb 9 17:51:54 2021 +0100

loplugin:fakebool followed by loplugin:implicitboolconversion (clang-cl)

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

diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index b0a550b9d136..d0bc3e1c0039 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -411,8 +411,8 @@ static void hideFile(const OUString& filepath)
 if (isURL(filepath))
 osl::FileBase::getSystemPathFromFileURL(filepath, aSysPath);
 
-BOOL ret = SetFileAttributesW(o3tl::toW(aSysPath.getStr()), 
FILE_ATTRIBUTE_HIDDEN);
-CPPUNIT_ASSERT(ret != FALSE);
+bool ret = SetFileAttributesW(o3tl::toW(aSysPath.getStr()), 
FILE_ATTRIBUTE_HIDDEN);
+CPPUNIT_ASSERT(ret);
 }
 #endif
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-09 Thread Stephan Bergmann (via logerrit)
 sc/qa/unit/subsequent_export-test.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit d03308ad9520d97d948e1143a59f0c259f18ba36
Author: Stephan Bergmann 
AuthorDate: Tue Feb 9 16:25:15 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Feb 9 17:52:16 2021 +0100

loplugin:cppunitassertequals (clang-cl)

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

diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 14f218aa5eaf..746eda5d3437 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -3462,7 +3462,11 @@ void ScExportTest::testRelativePathsODS()
 sal_Unicode aDocDrive = lcl_getWindowsDrive(pTempFile->GetURL());
 sal_Unicode aLinkDrive = lcl_getWindowsDrive(aURL);
 CPPUNIT_ASSERT_MESSAGE("document on the same drive but no relative 
link!",
-   aDocDrive != 0 && aLinkDrive != 0 && aDocDrive 
!= aLinkDrive);
+   aDocDrive != 0);
+CPPUNIT_ASSERT_MESSAGE("document on the same drive but no relative 
link!",
+   aLinkDrive != 0);
+CPPUNIT_ASSERT_MESSAGE("document on the same drive but no relative 
link!",
+   aDocDrive != aLinkDrive);
 return;
 }
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Recursive use of non-recursive std::mtuex in Scheduler::ProcessTaskScheduling?

2021-02-09 Thread Caolán McNamara
On Tue, 2021-02-09 at 17:13 +0100, Jan-Marek Glogowski wrote:
> I don't see a way to prevent AnyInput / PeekMessage to process
> messages.

FWIW https://bugs.documentfoundation.org/show_bug.cgi?id=140293 is a
problem MarkHung had this morning under windows which I was able to
reproduce which seems to be the same issue causing initial launch of
the startcenter to fail

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


[Libreoffice-commits] core.git: configure.ac

2021-02-09 Thread Andrew Udvare (via logerrit)
 configure.ac |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit d1dc51f95f9e831aa6adbbeff549c2017d2dfd82
Author: Andrew Udvare 
AuthorDate: Tue Dec 29 15:18:06 2020 -0500
Commit: Michael Stahl 
CommitDate: Tue Feb 9 18:36:23 2021 +0100

configure.ac: allow --enable-python=system on macOS if PYTHON is non-empty

This will work as long as a valid Python is in PATH, such as 
/usr/bin/python3
from Xcode or another version in some prefix like /opt/local.

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

diff --git a/configure.ac b/configure.ac
index e6607334b067..78bb7998e62c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9238,8 +9238,9 @@ AC_SUBST(XMLLINT)
 # Optionally user can pass an option to configure, i. e.
 # ./configure PYTHON=/usr/bin/python
 # =
-if test $_os = Darwin -a "$enable_python" != no -a "$enable_python" != 
fully-internal -a "$enable_python" != internal; then
+if test $_os = Darwin -a "$enable_python" != no -a "$enable_python" != 
fully-internal -a "$enable_python" != internal -a "$enable_python" != system; 
then
 # Only allowed choices for macOS are 'no', 'internal' (default), and 
'fully-internal'
+# unless PYTHON is defined as above which allows 'system'
 enable_python=internal
 fi
 if test "$build_os" != "cygwin" -a "$enable_python" != fully-internal; then
@@ -9311,7 +9312,7 @@ fully-internal)
 ;;
 system)
 AC_MSG_RESULT([system])
-if test "$_os" = Darwin; then
+if test "$_os" = Darwin -a -z "$PYTHON"; then
 AC_MSG_ERROR([--enable-python=system doesn't work on macOS because the 
version provided is obsolete])
 fi
 ;;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-09 Thread Caolán McNamara (via logerrit)
 vcl/source/window/seleng.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2d154d55db925dfa20358faa0302d4d942496aee
Author: Caolán McNamara 
AuthorDate: Tue Feb 9 16:50:22 2021 +
Commit: Caolán McNamara 
CommitDate: Tue Feb 9 18:43:50 2021 +0100

Revert "on SelMouseButtonDown check if window pointer is not null"

because there is no pWin for the cases where an EditEngine is
hosted in a native widget, e.g. comment in a sidebar in writer
or format header/footer in calc's format page, header/footer, edit...
and with change applied clicking doesn't move the cursor

This reverts commit 0a2fa32f8756b3c99975df6d98736a8e9abb625a.

Change-Id: Ie1da24d22b6d298f0c074f7bf187c5d891b78368
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110648
Reviewed-by: Pranam Lashkari 
Tested-by: Jenkins

diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx
index 8c4d27a26f9f..017ae30b8062 100644
--- a/vcl/source/window/seleng.cxx
+++ b/vcl/source/window/seleng.cxx
@@ -115,7 +115,7 @@ void SelectionEngine::CursorPosChanging( bool bShift, bool 
bMod1 )
 bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
 {
 nFlags &= ~SelectionEngineFlags::CMDEVT;
-if ( !pFunctionSet || rMEvt.GetClicks() > 1 || !pWin )
+if ( !pFunctionSet || rMEvt.GetClicks() > 1 )
 return false;
 
 sal_uInt16 nModifier = rMEvt.GetModifier() | nLockedMods;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Recursive use of non-recursive std::mtuex in Scheduler::ProcessTaskScheduling?

2021-02-09 Thread Noel Grandin
On Tue, 9 Feb 2021 at 18:13, Jan-Marek Glogowski  wrote:

>
> IMHO the whole SAL_MSG_THREADYIELD should not exist, and we should have
>
>
Looking at SAL_MSG_THREADYIELD, the primary use-case seems to be things
calling Application::Reschedule,
which wants to wait until all the current events have been processed.

Surely that could be more easily implemented by logic like:

if (we're on event thread)
handle_events()
else
{
SpecialWaitEvent aEvent;
Application::postUserEvent(&aEvent);
aEvent.waitUntilProcessedByEventThread();
}

which is largely the same logic, but without needing special handling
inside the scheduler.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2021-02-09 Thread Stephan Bergmann (via logerrit)
 embedserv/source/embed/tracker.cxx   |2 +-
 sfx2/source/appl/shutdowniconw32.cxx |8 ++--
 vcl/win/dtrans/MtaOleClipb.cxx   |   10 +++---
 vcl/win/dtrans/target.cxx|8 ++--
 4 files changed, 20 insertions(+), 8 deletions(-)

New commits:
commit 8f22ce5ea3e62a4837773f6958b8ce7ac96f811a
Author: Stephan Bergmann 
AuthorDate: Tue Feb 9 16:27:41 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Feb 9 19:41:51 2021 +0100

loplugin:fakebool (clang-cl)

But GetMessageW encodes more than true vs. false in its BOOL return value, 
so
silence the unhelpful loplugin with auto.

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

diff --git a/embedserv/source/embed/tracker.cxx 
b/embedserv/source/embed/tracker.cxx
index dbe114660f61..2a736c39b05f 100644
--- a/embedserv/source/embed/tracker.cxx
+++ b/embedserv/source/embed/tracker.cxx
@@ -405,7 +405,7 @@ BOOL Tracker::TrackHandle(int nHandle,HWND hWnd,POINT 
point,HWND hWndClipTo)
 for (;;)
 {
 MSG msg;
-BOOL bRet = GetMessageW(&msg, nullptr, 0, 0);
+auto const bRet = GetMessageW(&msg, nullptr, 0, 0);
 SAL_WARN_IF(-1 == bRet, "embedserv", "GetMessageW failed: " << 
WindowsErrorString(GetLastError()));
 if (-1 == bRet || 0 == bRet)
 break;
diff --git a/sfx2/source/appl/shutdowniconw32.cxx 
b/sfx2/source/appl/shutdowniconw32.cxx
index 298d84bf7d89..f86476995f1a 100644
--- a/sfx2/source/appl/shutdowniconw32.cxx
+++ b/sfx2/source/appl/shutdowniconw32.cxx
@@ -459,10 +459,14 @@ static DWORD WINAPI SystrayThread( LPVOID /*lpParam*/ )
 );
 
 MSG msg;
-BOOL bRet;
 
-while ((bRet = GetMessageW(&msg, nullptr, 0, 0)) != 0)
+for (;;)
 {
+auto const bRet = GetMessageW(&msg, nullptr, 0, 0);
+if (bRet == 0)
+{
+break;
+}
 if (-1 == bRet)
 {
 SAL_WARN("sfx.appl", "GetMessageW failed: " << 
WindowsErrorString(GetLastError()));
diff --git a/vcl/win/dtrans/MtaOleClipb.cxx b/vcl/win/dtrans/MtaOleClipb.cxx
index f6e471925516..3898bdc30dfb 100644
--- a/vcl/win/dtrans/MtaOleClipb.cxx
+++ b/vcl/win/dtrans/MtaOleClipb.cxx
@@ -654,10 +654,14 @@ unsigned int CMtaOleClipboard::run( )
 nRet = 0;
 
 // pumping messages
-MSG msg;
-BOOL bRet;
-while ((bRet = GetMessageW(&msg, nullptr, 0, 0)) != 0)
+for (;;)
 {
+MSG msg;
+auto const bRet = GetMessageW(&msg, nullptr, 0, 0);
+if (bRet == 0)
+{
+break;
+}
 if (-1 == bRet)
 {
 SAL_WARN("vcl.win.dtrans", "GetMessageW failed: " << 
WindowsErrorString(GetLastError()));
diff --git a/vcl/win/dtrans/target.cxx b/vcl/win/dtrans/target.cxx
index 45a8515bd414..2492c8a3cc94 100644
--- a/vcl/win/dtrans/target.cxx
+++ b/vcl/win/dtrans/target.cxx
@@ -208,9 +208,13 @@ DWORD WINAPI DndTargetOleSTAFunc(LPVOID pParams)
 DWORD threadId= GetCurrentThreadId();
 // We force the creation of a thread message queue. This is necessary
 // for a later call to AttachThreadInput
-BOOL bRet;
-while ((bRet = GetMessageW(&msg, nullptr, 0, 0)) != 0)
+for (;;)
 {
+auto const bRet = GetMessageW(&msg, nullptr, 0, 0);
+if (bRet == 0)
+{
+break;
+}
 if (-1 == bRet)
 {
 SAL_WARN("vcl.win.dtrans", "GetMessageW failed: " << 
WindowsErrorString(GetLastError()));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-09 Thread Stephan Bergmann (via logerrit)
 bridges/source/cpp_uno/msvc_shared/except.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 19ca93a8c09bf657fa44d9d26ea6f697afe5
Author: Stephan Bergmann 
AuthorDate: Tue Feb 9 16:21:30 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Feb 9 19:42:26 2021 +0100

loplugin:stringview (clang-cl)

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

diff --git a/bridges/source/cpp_uno/msvc_shared/except.cxx 
b/bridges/source/cpp_uno/msvc_shared/except.cxx
index c9432af4e67b..4b3d2ae3da0d 100644
--- a/bridges/source/cpp_uno/msvc_shared/except.cxx
+++ b/bridges/source/cpp_uno/msvc_shared/except.cxx
@@ -59,7 +59,7 @@ static OUString toUNOname(OUString const& rRTTIname) throw()
 while (nPos > 0)
 {
 sal_Int32 n = aStr.lastIndexOf('@', nPos);
-aRet.append(aStr.copy(n + 1, nPos - n - 1));
+aRet.append(aStr.subView(n + 1, nPos - n - 1));
 if (n >= 0)
 aRet.append('.');
 nPos = n;
@@ -75,7 +75,7 @@ static OUString toRTTIname(OUString const& rUNOname) throw()
 while (nPos > 0)
 {
 sal_Int32 n = rUNOname.lastIndexOf('.', nPos);
-aRet.append(rUNOname.copy(n + 1, nPos - n - 1));
+aRet.append(rUNOname.subView(n + 1, nPos - n - 1));
 aRet.append('@');
 nPos = n;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Recursive use of non-recursive std::mtuex in Scheduler::ProcessTaskScheduling?

2021-02-09 Thread Luboš Luňák
On Tuesday 09 of February 2021, Jan-Marek Glogowski wrote:
> That is the new code from https://gerrit.libreoffice.org/c/core/+/110538
>
> I think we have to revert that. I don't see a way to prevent AnyInput /
> PeekMessage to process messages. There is GetQueueStatus, but I guess
> that's not possible to be used correctly with our complicated user
> WM_USER based setup.

 I think GetQueueStatus() should be sufficient for this specific case. I'll 
try to do that change and see if it helps.

> I wasn't anymore aware, that PeekMessage, called from AnyInput, will
> actually dispatch messages (well - the API docs start with "Dispatches
> incoming sent messages").

 I did notice that, but I thought it was related only to PM_REMOVE. I find 
PeekMessage( PM_NOREMOVE ) processing messages to be pretty lame :(.

-- 
 Luboš Luňák
 l.lu...@collabora.com
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2021-02-09 Thread Noel (via logerrit)
 starmath/inc/parse.hxx|4 ++--
 starmath/source/parse.cxx |   21 +++--
 2 files changed, 13 insertions(+), 12 deletions(-)

New commits:
commit 1e56cce16bbe07c6e8e900dd4c4d41b1fcd54614
Author: Noel 
AuthorDate: Tue Feb 9 13:51:45 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Feb 9 19:57:46 2021 +0100

no need to use unique_ptr for a simple value class

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

diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index 6349dc8c479f..752cde6b23e5 100644
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -93,7 +93,7 @@ class SmParser
 {
 OUStringm_aBufferString;
 SmToken m_aCurToken;
-std::vector> m_aErrDescList;
+std::vector m_aErrDescList;
 int m_nCurError;
 sal_Int32   m_nBufferIndex,
 m_nTokenIndex;
@@ -194,7 +194,7 @@ public:
 
 const SmErrorDesc*  NextError();
 const SmErrorDesc*  PrevError();
-const SmErrorDesc*  GetError();
+const SmErrorDesc*  GetError() const;
 const std::set< OUString >&   GetUsedSymbols() const  { return 
m_aUsedSymbols; }
 };
 
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 0aa1518eb4c2..8e3afd989b1e 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -2599,8 +2599,8 @@ std::unique_ptr 
SmParser::DoError(SmParseError eError)
 xSNode->SetSubNode(0, pErr);
 
 // Append error to the error list
-SmErrorDesc* pErrDesc = new SmErrorDesc(eError, xSNode.get(), 
m_aCurToken.cMathChar);
-m_aErrDescList.push_back(std::unique_ptr(pErrDesc));
+SmErrorDesc aErrDesc(eError, xSNode.get(), m_aCurToken.cMathChar);
+m_aErrDescList.push_back(aErrDesc);
 
 NextToken();
 
@@ -2659,11 +2659,11 @@ std::unique_ptr SmParser::ParseExpression(const 
OUString &rBuffer)
 const SmErrorDesc *SmParser::NextError()
 {
 if ( !m_aErrDescList.empty() )
-if (m_nCurError > 0) return m_aErrDescList[ --m_nCurError ].get();
+if (m_nCurError > 0) return &m_aErrDescList[ --m_nCurError ];
 else
 {
 m_nCurError = 0;
-return m_aErrDescList[ m_nCurError ].get();
+return &m_aErrDescList[ m_nCurError ];
 }
 else return nullptr;
 }
@@ -2672,21 +2672,22 @@ const SmErrorDesc *SmParser::NextError()
 const SmErrorDesc *SmParser::PrevError()
 {
 if ( !m_aErrDescList.empty() )
-if (m_nCurError < static_cast(m_aErrDescList.size() - 1)) return 
m_aErrDescList[ ++m_nCurError ].get();
+if (m_nCurError < static_cast(m_aErrDescList.size() - 1))
+return &m_aErrDescList[ ++m_nCurError ];
 else
 {
 m_nCurError = static_cast(m_aErrDescList.size() - 1);
-return m_aErrDescList[ m_nCurError ].get();
+return &m_aErrDescList[ m_nCurError ];
 }
 else return nullptr;
 }
 
 
-const SmErrorDesc *SmParser::GetError()
+const SmErrorDesc* SmParser::GetError() const
 {
-if ( !m_aErrDescList.empty() )
-return m_aErrDescList.front().get();
-return nullptr;
+if (m_aErrDescList.empty())
+return nullptr;
+return &m_aErrDescList.front();
 }
 
 /* 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: sw/qa

2021-02-09 Thread László Németh (via logerrit)
 sw/qa/uitest/writer_tests7/tdf139301.py |   20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)

New commits:
commit 32e4d0907fa6d1fcd82b0762c3f02f4c1ee1dd94
Author: László Németh 
AuthorDate: Mon Feb 8 12:29:17 2021 +0100
Commit: László Németh 
CommitDate: Tue Feb 9 21:00:30 2021 +0100

tdf#139301 line dash interoperability: fix asynchron UI test

to avoid false alarms during slow testing. Also the test
doesn't open the same file n times for testing the n line dash
styles now.

The problem reported by Stephan Bergmann.

See also commit 8cc78b527bf2b7dcaaff73d8f0770f3d324ac839
("Avoid test_tdf139301 hanging upon failure") and
commit commit 183c06fc02a50fb117bb6162e4d6e56cdd34fad1
("tdf#139301 fix OOXML-compatible preset dash styles").

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

diff --git a/sw/qa/uitest/writer_tests7/tdf139301.py 
b/sw/qa/uitest/writer_tests7/tdf139301.py
index caca09fa9281..db48b4d9a5f6 100644
--- a/sw/qa/uitest/writer_tests7/tdf139301.py
+++ b/sw/qa/uitest/writer_tests7/tdf139301.py
@@ -11,15 +11,16 @@ import time
 class tdf139301(UITestCase):
 
 def test_tdf139301(self):
+writer_doc = 
self.ui_test.load_file(get_url_for_data_file("tdf127166_prstDash_Word97.docx"))
+
 styles = ('Long Dash', 'Long Dash Dot', 'Long Dot', 'Double Dash', 
'Double Dash Dot', 'Double Dash Dot Dot', 'Dash', 'Dash Dot', 'Dash Dot Dot', 
'Dot')
 
-for i in range(len(styles)):
-writer_doc = 
self.ui_test.load_file(get_url_for_data_file("tdf127166_prstDash_Word97.docx"))
-xWriterDoc = self.xUITest.getTopFocusWindow()
-xWriterEdit = xWriterDoc.getChild("writer_edit")
+xWriterDoc = self.xUITest.getTopFocusWindow()
+xWriterEdit = xWriterDoc.getChild("writer_edit")
 
-for i in range(i+1):
-self.xUITest.executeCommand(".uno:JumpToNextFrame")
+for i in range(len(styles)):
+# select next line shape
+
writer_doc.getCurrentController().select(writer_doc.getDrawPage()[i])
 
 # wait for available line style setting
 self.ui_test.wait_until_child_is_available(xWriterEdit, 
'metricfield')
@@ -34,15 +35,16 @@ class tdf139301(UITestCase):
 xLineStyle = xFormatLineDlg.getChild("LB_LINE_STYLE")
 time.sleep(1)
 
-# preset line style
+# check preset line style
 style = get_state_as_dict(xLineStyle)['SelectEntryText']
 
 xOKBtn = xFormatLineDlg.getChild("ok")
 self.ui_test.close_dialog_through_button(xOKBtn)
 
-self.ui_test.close_doc()
-
 self.assertEqual(style, styles[i])
 
+self.ui_test.close_doc()
+
+
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Greetings, reply asap

2021-02-09 Thread Joe Barton
Hello
Compliment of the season, how are you doing today? I will like to talk
to you about some private matters. Please reply asap.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2021-02-09 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/calc_tests7/tdf123052.py |   68 --
 sc/qa/unit/uicalc/uicalc.cxx  |   33 
 2 files changed, 33 insertions(+), 68 deletions(-)

New commits:
commit 662055db385cd1f17ae1a375b2da3b3246e02517
Author: Xisco Fauli 
AuthorDate: Tue Feb 9 20:16:26 2021 +0100
Commit: Xisco Fauli 
CommitDate: Tue Feb 9 22:43:03 2021 +0100

tdf#123052: sc: Move UItest to CppUnitTest

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

diff --git a/sc/qa/uitest/calc_tests7/tdf123052.py 
b/sc/qa/uitest/calc_tests7/tdf123052.py
deleted file mode 100644
index 7d1b8eaa076b..
--- a/sc/qa/uitest/calc_tests7/tdf123052.py
+++ /dev/null
@@ -1,68 +0,0 @@
-# -*- 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.common import get_state_as_dict, get_url_for_data_file
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
-from libreoffice.uno.propertyvalue import mkPropertyValues
-
-#Bug 123052 - [regression] Shift+Tab not working
-
-class tdf123052(UITestCase):
-def test_tdf123052_shit_tab(self):
-calc_doc = 
self.ui_test.load_file(get_url_for_data_file("tdf123052.ods"))
-xCalcDoc = self.xUITest.getTopFocusWindow()
-gridwin = xCalcDoc.getChild("grid_window")
-document = self.ui_test.get_component()
-#Holding the Shift key and repeated pressing the Tab key does not 
correctly cycle though the unprotected cells
-#I'm at 7, hold TAB for cycling
-gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "TAB"}))
-# Assert that the correct cell has been selected
-gridWinState = get_state_as_dict(gridwin)
-self.assertEqual(gridWinState["CurrentRow"], "2")
-self.assertEqual(gridWinState["CurrentColumn"], "5")
-
-gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "TAB"}))
-# Assert that the correct cell has been selected
-gridWinState = get_state_as_dict(gridwin)
-self.assertEqual(gridWinState["CurrentRow"], "4")
-self.assertEqual(gridWinState["CurrentColumn"], "3")
-
-gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "TAB"}))
-# Assert that the correct cell has been selected
-gridWinState = get_state_as_dict(gridwin)
-self.assertEqual(gridWinState["CurrentRow"], "4")
-self.assertEqual(gridWinState["CurrentColumn"], "4")
-
-gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "TAB"}))
-# Assert that the correct cell has been selected
-gridWinState = get_state_as_dict(gridwin)
-self.assertEqual(gridWinState["CurrentRow"], "5")
-self.assertEqual(gridWinState["CurrentColumn"], "5")
-
-gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "TAB"}))
-# Assert that the correct cell has been selected
-gridWinState = get_state_as_dict(gridwin)
-self.assertEqual(gridWinState["CurrentRow"], "7")
-self.assertEqual(gridWinState["CurrentColumn"], "0")
-
-gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": "TAB"}))
-# Assert that the correct cell has been selected
-gridWinState = get_state_as_dict(gridwin)
-self.assertEqual(gridWinState["CurrentRow"], "8")
-self.assertEqual(gridWinState["CurrentColumn"], "4")
-#now shift + tab
-gridwin.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"SHIFT+TAB"}))
-# Assert that the correct cell has been selected
-gridWinState = get_state_as_dict(gridwin)
-self.assertEqual(gridWinState["CurrentRow"], "7")
-self.assertEqual(gridWinState["CurrentColumn"], "0")
-
-self.ui_test.close_doc()
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/data/tdf123052.ods 
b/sc/qa/unit/uicalc/data/tdf123052.ods
similarity index 100%
rename from sc/qa/uitest/data/tdf123052.ods
rename to sc/qa/unit/uicalc/data/tdf123052.ods
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 8c92824fe541..7335fa01dc22 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -337,6 +337,39 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf122232)
 lcl_AssertCurrentCursorPosition(2, 6);
 }
 
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf123052)
+{
+ScModelObj* pModelObj = createDoc("tdf123052.ods");
+ScDocument* pDoc = pModelObj->GetDocument();
+CPPUNIT_ASSERT(pDoc);
+
+std::vector aExpectedAddresses{ ScAddres

Re: Recursive use of non-recursive std::mtuex in Scheduler::ProcessTaskScheduling?

2021-02-09 Thread Jan-Marek Glogowski

Am 09.02.21 um 19:08 schrieb Noel Grandin:
On Tue, 9 Feb 2021 at 18:13, Jan-Marek Glogowski > wrote: 

Looking at SAL_MSG_THREADYIELD, the primary use-case seems to be things 
calling Application::Reschedule,

which wants to wait until all the current events have been processed.


Would be nice, if that was true. This is platform specific code. For 
example gtk3 has "int nMaxEvents = bHandleAllCurrentEvents ? 100 : 1;".
Qt can't "practically" handle single events, so we call processEvents 
with QEventLoop::AllEvents, which "Processes pending events that match 
flags until there are no more events to process."


Over time I changed WIN to process system events from "true == 100" to 
"event timestamp < processing start time". And OSX from a 
"ProcessEventsToIdle" equivalent to do the same; for better or worse.


I would also like to drop the "bHandleAllCurrentEvents" parameter by 
defaulting to true. But that doesn't seem to be implementable by gtk 
without that "true == 100" hack, but maybe it's still better for 
consistency. OTOH Qt uses glib main loop internally and doesn't allow to 
restrict event processing in a sensible way, except timeout. You can't 
even check for pending events in Qt (deprecated). From all I see, gtk 
and Qt have conflicting requirements here.



Surely that could be more easily implemented by logic like:

     if (we're on event thread)
         handle_events()
     else
     {
         SpecialWaitEvent aEvent;
         Application::postUserEvent(&aEvent);
         aEvent.waitUntilProcessedByEventThread();
     }

which is largely the same logic, but without needing special handling 
inside the scheduler.


So there is already Appplication::PostUserEvent + ImplSVEvent + 
SalUserEvent. But without anything like "waitUntilProcessedByEventThread".
That code depends on a backend specific SalFrame::PostEvent. AFAIK all 
backends except Windows use SalUserEventList to handle them. Windows 
uses PostMessageW(SAL_MSG_USEREVENT), which actually might be wrong.
SalUserEvents for SalUserEventList are processed in 
SalInstance::DoYield, even before any system events. But you must ignore 
your own event, otherwise you would just process yourself and report to 
have "done events" .


So you can't rely on any LO abstraction and would need to do something 
Windows specific. And there is the whole SalYieldMutex::doAcquire, 
MsgWaitForMultipleObjects, OSL condition, QS_SENDMESSAGE handling, for 
the m_nNoYieldLock "GUI processing redirect to main thread" SolarMutex 
workaround. So currently you must use SendMessage, otherwise a blocked 
main thread on acquiring the SolarMutex wouldn't process your message 
and you would unintentionally block, even if you don't want to wait (if 
commit ce8bbb782b806e429ffb44226162967bed244d94 is still needed).


Jan-Marek

P.S. this is all way more complex, then I like it. Feel free to give a 
variant of your idea a shot, but AFAIK your described approach wouldn't 
work. And the unit test coverage for this is mediocre, but hopefully 
make check would nevertheless fail on a breaking code variant.

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


Re: Recursive use of non-recursive std::mtuex in Scheduler::ProcessTaskScheduling?

2021-02-09 Thread Jan-Marek Glogowski

Am 09.02.21 um 19:47 schrieb Luboš Luňák:

On Tuesday 09 of February 2021, Jan-Marek Glogowski wrote:

I wasn't anymore aware, that PeekMessage, called from AnyInput, will
actually dispatch messages (well - the API docs start with "Dispatches
incoming sent messages").


  I did notice that, but I thought it was related only to PM_REMOVE. I find
PeekMessage( PM_NOREMOVE ) processing messages to be pretty lame :(.


Yeah :( AFAIK all system event loops have some interesting 
"implementation details" wrt timers, event processing, posting and peeking.


Maybe that's the reason on the conflicting details in the Qt and Gtk 
abstractions. Or I'm missing something.


And on top of it we have LO's "process GUI from any thread" model.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2021-02-09 Thread Seth Chaiklin (via logerrit)
 source/text/swriter/main0115.xhp |4 
 1 file changed, 4 insertions(+)

New commits:
commit b8df7b86811aa6433f2df6e8fbcbcf635020f894
Author: Seth Chaiklin 
AuthorDate: Tue Feb 9 17:04:42 2021 +0100
Commit: Seth Chaiklin 
CommitDate: Wed Feb 10 00:51:02 2021 +0100

tdf#137084 add relatedtopics section to Styles menu help

  + add links to guide pages for "Update Selected Style"
and "New Style from Selction" commands

Change-Id: I6c5e9bfe7a9129ed4202af82ed1e45a1d49d3fbd
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/110565
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins

diff --git a/source/text/swriter/main0115.xhp b/source/text/swriter/main0115.xhp
index b68aac9af..a26fb7871 100644
--- a/source/text/swriter/main0115.xhp
+++ b/source/text/swriter/main0115.xhp
@@ -43,5 +43,9 @@
  Import 
styles from another document or template into the current 
document.
   Manage Styles
   Opens the Styles deck in the sidebar.
+
+   
+   
+
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2021-02-09 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9c473da1c99d70f5fa6467cebb1cebe4a9deb602
Author: Seth Chaiklin 
AuthorDate: Wed Feb 10 00:51:02 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Wed Feb 10 00:51:02 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to b8df7b86811aa6433f2df6e8fbcbcf635020f894
  - tdf#137084 add relatedtopics section to Styles menu help

  + add links to guide pages for "Update Selected Style"
and "New Style from Selction" commands

Change-Id: I6c5e9bfe7a9129ed4202af82ed1e45a1d49d3fbd
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/110565
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins

diff --git a/helpcontent2 b/helpcontent2
index 5cfd09886740..b8df7b86811a 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 5cfd09886740bea6de229184cee57820f1d069e4
+Subproject commit b8df7b86811aa6433f2df6e8fbcbcf635020f894
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-09 Thread Seth Chaiklin (via logerrit)
 source/text/swriter/main0110.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8364e1a17ab04680905248d96be010af0d8c7ede
Author: Seth Chaiklin 
AuthorDate: Wed Feb 10 01:11:42 2021 +0100
Commit: Seth Chaiklin 
CommitDate: Wed Feb 10 01:16:47 2021 +0100

"Formula" -> "Text Formula" in Table menu help

Change-Id: I5415717ed44c57ef76a259fc349cdd6e007e54fb
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/110571
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins

diff --git a/source/text/swriter/main0110.xhp b/source/text/swriter/main0110.xhp
index 50bcaeaf4..98bb7c26b 100644
--- a/source/text/swriter/main0110.xhp
+++ b/source/text/swriter/main0110.xhp
@@ -144,7 +144,7 @@
 Table to Text
 Opens a dialog where you can convert the current table to 
text. Opens a dialog 
where you can convert the current table to text.
 
-Formula
+Text Formula
 Opens the Formula bar to enter or edit a 
formula.
 
 Sort
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2021-02-09 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d3eb353b6f53a3d066cec8f20ea196d7a14efbe7
Author: Seth Chaiklin 
AuthorDate: Wed Feb 10 01:16:47 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Wed Feb 10 01:16:47 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 8364e1a17ab04680905248d96be010af0d8c7ede
  - "Formula" -> "Text Formula" in Table menu help

Change-Id: I5415717ed44c57ef76a259fc349cdd6e007e54fb
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/110571
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins

diff --git a/helpcontent2 b/helpcontent2
index b8df7b86811a..8364e1a17ab0 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit b8df7b86811aa6433f2df6e8fbcbcf635020f894
+Subproject commit 8364e1a17ab04680905248d96be010af0d8c7ede
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-09 Thread Andrea Gelmini (via logerrit)
 source/text/sbasic/shared/03/sf_string.xhp |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c36ab9284db666581cb814ce6f2265107439c4ee
Author: Andrea Gelmini 
AuthorDate: Tue Feb 9 23:10:22 2021 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Feb 10 01:36:16 2021 +0100

Fix typos

Change-Id: Ic59e55a6b3b31211dedca20572f53914eb9a47ef
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/110660
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/source/text/sbasic/shared/03/sf_string.xhp 
b/source/text/sbasic/shared/03/sf_string.xhp
index 25d85015f..c48a3bdf9 100644
--- a/source/text/sbasic/shared/03/sf_string.xhp
+++ b/source/text/sbasic/shared/03/sf_string.xhp
@@ -451,7 +451,7 @@
   
 
   InputStr: The string to be 
searched
-  ReplacedBy: Zero, one or more characters 
that will replace all non-printable charaters in InputStr 
(Default = "")
+  ReplacedBy: Zero, one or more characters 
that will replace all non-printable characters in InputStr 
(Default = "")
 
   
 Dim LF : LF = Chr(10)
@@ -498,7 +498,7 @@
   
   HashStr
   Hash functions 
are used inside some cryptographic algorithms, in digital signatures, message 
authentication codes, manipulation detection, fingerprints, checksums (message 
integrity check), hash tables, password storage and much more.
-  The HashStr method returns the result of a 
hash function applied on a given string and using a scpecified algorithm, as a 
string of lowercase hexadecimal digits.
+  The HashStr method returns the result of a 
hash function applied on a given string and using a specified algorithm, as a 
string of lowercase hexadecimal digits.
   The hash algorithms supported are: MD5, 
SHA1, SHA224, SHA256, 
SHA384 and SHA512.
   
   
@@ -1044,7 +1044,7 @@
   
 
   InputStr: The input string on which 
replacements will occur.
-  Before: A string with the characters 
that will be searched in the input string for repacement.
+  Before: A string with the characters 
that will be searched in the input string for replacement.
   After: A string with the new characters 
that will replace those defined in Before.
 
   
@@ -1145,7 +1145,7 @@
 MsgBox SF_String.Represent(Pi) ' "3.142"
 MsgBox 
SF_String.Represent(CreateUnoService("com.sun.star.util.PathSettings")) ' 
"[com.sun.star.comp.framework.PathSettings]"
   
-  Note that the 
representation of data types such as Arrays and 
ScriptForge.Dictionary object intances include both the data 
type and their values:
+  Note that the 
representation of data types such as Arrays and 
ScriptForge.Dictionary object instances include both the 
data type and their values:
   
 ' An example with a 
Basic built-in Array
 MsgBox SF_String.Represent(Array(1, 2, "Text" & 
Chr(9) & "here"))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2021-02-09 Thread Andrea Gelmini (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e4e0cf825a858e82c299c55632b03ca6f80647d1
Author: Andrea Gelmini 
AuthorDate: Wed Feb 10 01:36:16 2021 +0100
Commit: Gerrit Code Review 
CommitDate: Wed Feb 10 01:36:16 2021 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to c36ab9284db666581cb814ce6f2265107439c4ee
  - Fix typos

Change-Id: Ic59e55a6b3b31211dedca20572f53914eb9a47ef
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/110660
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index 8364e1a17ab0..c36ab9284db6 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 8364e1a17ab04680905248d96be010af0d8c7ede
+Subproject commit c36ab9284db666581cb814ce6f2265107439c4ee
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - 1767 commits - accessibility/inc accessibility/source android/README animations/source avmedia/Library_avmediavlc.mk avmedia/Module

2021-02-09 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit 4497f42c335265ce92f2b4af0d71127b5d91eabe
Author: Tomaž Vajngerl 
AuthorDate: Thu Nov 12 10:01:20 2020 +0100
Commit: Tomaž Vajngerl 
CommitDate: Wed Feb 10 11:49:49 2021 +0900

basegfx: added LengthUnit class as the base unit for length

Change-Id: I1d4790b60dd784e8b2e2e438274f3ebd6db4b60c

diff --git a/basegfx/CppunitTest_basegfx.mk b/basegfx/CppunitTest_basegfx.mk
index a0379e76612a..b66b1381d69a 100644
--- a/basegfx/CppunitTest_basegfx.mk
+++ b/basegfx/CppunitTest_basegfx.mk
@@ -42,6 +42,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,basegfx,\
 basegfx/test/basegfxtools \
 basegfx/test/clipstate \
 basegfx/test/genericclipper \
+basegfx/test/LengthUnitTest \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/basegfx/test/LengthUnitTest.cxx b/basegfx/test/LengthUnitTest.cxx
new file mode 100644
index ..0b80c33da5b0
--- /dev/null
+++ b/basegfx/test/LengthUnitTest.cxx
@@ -0,0 +1,96 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * 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/.
+ */
+
+#include 
+
+#include 
+#include 
+
+class LengthUnitTest : public CppUnit::TestFixture
+{
+public:
+void test();
+
+CPPUNIT_TEST_SUITE(LengthUnitTest);
+CPPUNIT_TEST(test);
+CPPUNIT_TEST_SUITE_END();
+};
+
+void LengthUnitTest::test()
+{
+gfx::LengthUnit cm = 1_cm + 5_cm - 2_cm;
+CPPUNIT_ASSERT_DOUBLES_EQUAL(4.0, cm.as_cm(), 1e-4);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(0.04, cm.as_m(), 1e-4);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(40.0, cm.as_mm(), 1e-4);
+CPPUNIT_ASSERT_EQUAL(sal_Int64(144), cm.raw());
+
+gfx::LengthUnit cm2 = 5_cm * 2;
+CPPUNIT_ASSERT_EQUAL(sal_Int64(360), cm2.raw());
+CPPUNIT_ASSERT_DOUBLES_EQUAL(10.0, cm2.as_cm(), 1e-4);
+
+// 1 km - 50 m = 950 m = 95000 cm
+gfx::LengthUnit cm3 = 10_cm - 5000_cm;
+CPPUNIT_ASSERT_EQUAL(sal_Int64(342), cm3.raw());
+CPPUNIT_ASSERT_DOUBLES_EQUAL(95000.0, cm3.as_cm(), 1e-4);
+
+gfx::LengthUnit cm4(1_cm);
+cm4 /= 2;
+CPPUNIT_ASSERT_EQUAL(sal_Int64(18), cm4.raw());
+CPPUNIT_ASSERT_DOUBLES_EQUAL(0.5, cm4.as_cm(), 1e-4);
+
+// (635 * 20) + 3 * (635 * 15) = 41275EMU
+gfx::LengthUnit pt = 1_pt + 3_px;
+CPPUNIT_ASSERT_DOUBLES_EQUAL(3.25, pt.as_pt(), 1e-4);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(65.0, pt.as_twip(), 1e-4);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0451, pt.as_in(), 1e-4);
+CPPUNIT_ASSERT_EQUAL(sal_Int64(41275), pt.raw());
+
+gfx::LengthUnit inch = 1_in; // 1440 * 635
+CPPUNIT_ASSERT_DOUBLES_EQUAL(1440.0, inch.as_twip(), 1e-4);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(96.0, inch.as_px(), 1e-4);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, inch.as_in(), 1e-4);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(914400.0, inch.as_emu(), 1e-4);
+CPPUNIT_ASSERT_EQUAL(sal_Int64(914400), inch.raw());
+
+// Conversion
+sal_Int64 asNumber(17_pt);
+asNumber += sal_Int64(1_pt);
+gfx::LengthUnit asLength = gfx::LengthUnit::emu(asNumber);
+CPPUNIT_ASSERT_EQUAL(sal_Int64(18 * 635 * 20), asLength.raw());
+
+gfx::LengthUnit maximum = gfx::LengthUnit::emu(SAL_MAX_INT64);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(256204778801.5, maximum.as_m(), 1e-1);
+// 256204778 km
+CPPUNIT_ASSERT_EQUAL(sal_Int64(SAL_MAX_INT64), maximum.raw());
+
+gfx::LengthUnit minimum = gfx::LengthUnit::emu(SAL_MIN_INT64);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(-256204778801.5, minimum.as_m(), 1e-1);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(double(SAL_MIN_INT64), minimum.as_emu(), 
1e-1);
+CPPUNIT_ASSERT_EQUAL(sal_Int64(SAL_MIN_INT64), minimum.raw());
+
+// 27 emu + 33 emu + 360 emu = 420
+gfx::LengthUnit emus = 27_emu + 33_emu + 1_hmm;
+CPPUNIT_ASSERT_EQUAL(sal_Int64(420), emus.raw());
+
+//  Creation from number
+int number = 10;
+auto asCm = gfx::LengthUnit::cm(number);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(10.0, asCm.as_cm(), 1e-4);
+CPPUNIT_ASSERT_EQUAL(sal_Int64(360), asCm.raw());
+
+auto asMm = gfx::LengthUnit::mm(number);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(10.0, asMm.as_mm(), 1e-4);
+CPPUNIT_ASSERT_EQUAL(sal_Int64(36), asMm.raw());
+
+auto asInch = gfx::LengthUnit::in(number);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(10.0, asInch.as_in(), 1e-4);
+CPPUNIT_ASSERT_EQUAL(sal_Int64(9144000), asInch.raw());
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(LengthUnitTest);
diff --git a/include/basegfx/units/LengthUnit.hxx 
b/include/basegfx/units/LengthUnit.hxx
new file mode 100644
index ..4edd1cc4704f
--- /dev/null
+++ b/include/basegfx/units/LengthUnit.hxx
@@ -0,0 +1,194 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Fo

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

2021-02-09 Thread Gülşah Köse (via logerrit)
 oox/source/drawingml/fillproperties.cxx |   84 
 oox/source/export/drawingml.cxx |   39 +-
 sd/qa/unit/data/pptx/crop-position.pptx |binary
 sd/qa/unit/export-tests-ooxml1.cxx  |   29 +--
 sd/qa/unit/import-tests.cxx |   16 ++
 5 files changed, 129 insertions(+), 39 deletions(-)

New commits:
commit ccdee8eebaa56619248e35001017226eecfe4e83
Author: Gülşah Köse 
AuthorDate: Mon Feb 1 17:03:33 2021 +0300
Commit: Gülşah Köse 
CommitDate: Wed Feb 10 07:04:38 2021 +0100

tdf#134210 Import crop position of bitmap filled shape.

Change-Id: I6a62d68cd0f57e53934851a2f53dae05bf7d3730
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110262
Tested-by: Jenkins
Reviewed-by: Gülşah Köse 

diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index 6d537097a206..6feeb1c9991d 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -87,6 +87,30 @@ Reference< XGraphic > 
lclRotateGraphic(uno::Reference const &
 return aReturnGraphic.GetXGraphic();
 }
 
+void lclCalculateCropPercentage(uno::Reference const & 
xGraphic, geometry::IntegerRectangle2D &aFillRect)
+{
+::Graphic aGraphic(xGraphic);
+assert (aGraphic.GetType() == GraphicType::Bitmap);
+
+BitmapEx aBitmapEx(aGraphic.GetBitmapEx());
+
+sal_Int32 nScaledWidth = aBitmapEx.GetSizePixel().Width();
+sal_Int32 nScaledHeight = aBitmapEx.GetSizePixel().Height();
+
+sal_Int32 nOrigWidth = (nScaledWidth * (10 - aFillRect.X1 - 
aFillRect.X2)) / 10;
+sal_Int32 nOrigHeight = (nScaledHeight * (10 - aFillRect.Y1 - 
aFillRect.Y2)) / 10;
+
+sal_Int32 nLeftPercentage = nScaledWidth * aFillRect.X1 / nOrigWidth;
+sal_Int32 nRightPercentage = nScaledWidth * aFillRect.X2 / nOrigWidth;
+sal_Int32 nTopPercentage = nScaledHeight * aFillRect.Y1 / nOrigHeight;
+sal_Int32 nBottomPercentage = nScaledHeight * aFillRect.Y2 / nOrigHeight;
+
+aFillRect.X1 = -nLeftPercentage;
+aFillRect.X2 = -nRightPercentage;
+aFillRect.Y1 = -nTopPercentage;
+aFillRect.Y2 = -nBottomPercentage;
+}
+
 Reference< XGraphic > lclCropGraphic(uno::Reference const & 
xGraphic, geometry::IntegerRectangle2D aFillRect)
 {
 ::Graphic aGraphic(xGraphic);
@@ -103,8 +127,15 @@ Reference< XGraphic > 
lclCropGraphic(uno::Reference const & x
 sal_Int32 nBottomCorr = nOrigHeight * -1 * 
static_cast(aFillRect.Y2) / 10;
 nHeight += nBottomCorr;
 
-aBitmapEx.Scale(Size(aBitmapEx.GetSizePixel().Width(), nHeight));
-aBitmapEx.Crop(tools::Rectangle(Point(0, nTopCorr), 
Size(aBitmapEx.GetSizePixel().Width(), nOrigHeight)));
+sal_Int32 nOrigWidth = aBitmapEx.GetSizePixel().Width();
+sal_Int32 nWidth = nOrigWidth;
+sal_Int32 nLeftCorr  = nOrigWidth * -1 * static_cast(aFillRect.X1) 
/ 10;
+nWidth += nLeftCorr;
+sal_Int32 nRightCorr = nOrigWidth * -1 * static_cast(aFillRect.X2) 
/ 10;
+nWidth += nRightCorr;
+
+aBitmapEx.Scale(Size(nWidth, nHeight));
+aBitmapEx.Crop(tools::Rectangle(Point(nLeftCorr, nTopCorr), 
Size(nOrigWidth, nOrigHeight)));
 
 aReturnGraphic = ::Graphic(aBitmapEx);
 aReturnGraphic.setOriginURL(aGraphic.getOriginURL());
@@ -819,6 +850,36 @@ void GraphicProperties::pushToPropMap( PropertyMap& 
rPropMap, const GraphicHelpe
 nContrast = 0;
 }
 
+// cropping
+if ( maBlipProps.moClipRect.has() )
+{
+geometry::IntegerRectangle2D oClipRect( 
maBlipProps.moClipRect.get() );
+awt::Size aOriginalSize( rGraphicHelper.getOriginalSize( xGraphic 
) );
+if ( aOriginalSize.Width && aOriginalSize.Height )
+{
+text::GraphicCrop aGraphCrop( 0, 0, 0, 0 );
+if ( oClipRect.X1 )
+aGraphCrop.Left = rtl::math::round( ( static_cast< double 
>( aOriginalSize.Width ) * oClipRect.X1 ) / 10 );
+if ( oClipRect.Y1 )
+aGraphCrop.Top = rtl::math::round( ( static_cast< double 
>( aOriginalSize.Height ) * oClipRect.Y1 ) / 10 );
+if ( oClipRect.X2 )
+aGraphCrop.Right = rtl::math::round( ( static_cast< double 
>( aOriginalSize.Width ) * oClipRect.X2 ) / 10 );
+if ( oClipRect.Y2 )
+aGraphCrop.Bottom = rtl::math::round( ( static_cast< 
double >( aOriginalSize.Height ) * oClipRect.Y2 ) / 10 );
+rPropMap.setProperty(PROP_GraphicCrop, aGraphCrop);
+}
+
+if(mbIsCustomShape)
+{
+geometry::IntegerRectangle2D aCropRect = oClipRect;
+lclCalculateCropPercentage(xGraphic, aCropRect);
+xGraphic = lclCropGraphic(xGraphic, aCropRect);
+
+rPropMap.setProperty(PROP_FillBitmap, xGraphic);
+}
+
+}
+
 if(mbIsCustomShape)
 {

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

2021-02-09 Thread Noel (via logerrit)
 basctl/source/dlged/dlgedobj.cxx   |   88 ++
 basctl/source/inc/dlgedobj.hxx |8 --
 include/svx/cube3d.hxx |4 -
 include/svx/lathe3d.hxx|4 -
 include/svx/obj3d.hxx  |6 -
 include/svx/scene3d.hxx|2 
 include/svx/sphere3d.hxx   |4 -
 include/svx/svdoashp.hxx   |2 
 include/svx/svdoattr.hxx   |6 -
 include/svx/svdobj.hxx |   32 +---
 include/svx/svdocapt.hxx   |5 -
 include/svx/svdocirc.hxx   |5 -
 include/svx/svdoedge.hxx   |3 
 include/svx/svdograf.hxx   |3 
 include/svx/svdogrp.hxx|3 
 include/svx/svdomeas.hxx   |5 -
 include/svx/svdomedia.hxx  |3 
 include/svx/svdoole2.hxx   |5 -
 include/svx/svdopage.hxx   |3 
 include/svx/svdopath.hxx   |3 
 include/svx/svdorect.hxx   |5 -
 include/svx/svdotable.hxx  |3 
 include/svx/svdotext.hxx   |4 -
 include/svx/svdouno.hxx|4 -
 include/svx/svdovirt.hxx   |3 
 reportdesign/inc/RptObject.hxx |8 +-
 reportdesign/source/core/sdr/RptObject.cxx |   76 ++-
 svx/inc/extrud3d.hxx   |4 -
 svx/inc/polygn3d.hxx   |4 -
 svx/source/engine3d/cube3d.cxx |   28 +++
 svx/source/engine3d/extrud3d.cxx   |   24 +++---
 svx/source/engine3d/lathe3d.cxx|   24 +++---
 svx/source/engine3d/obj3d.cxx  |   62 +++-
 svx/source/engine3d/polygn3d.cxx   |   28 +++
 svx/source/engine3d/scene3d.cxx|   64 
 svx/source/engine3d/sphere3d.cxx   |   25 +++---
 svx/source/form/fmobj.cxx  |   95 ++--
 svx/source/inc/fmobj.hxx   |5 -
 svx/source/svdraw/svdoashp.cxx |   30 ---
 svx/source/svdraw/svdoattr.cxx |5 +
 svx/source/svdraw/svdobj.cxx   |  112 ++---
 svx/source/svdraw/svdocapt.cxx |   26 ++
 svx/source/svdraw/svdocirc.cxx |   24 ++
 svx/source/svdraw/svdoedge.cxx |   38 +
 svx/source/svdraw/svdograf.cxx |   99 ++---
 svx/source/svdraw/svdogrp.cxx  |   54 ++---
 svx/source/svdraw/svdomeas.cxx |   27 +++---
 svx/source/svdraw/svdomedia.cxx|   23 ++---
 svx/source/svdraw/svdoole2.cxx |  103 +++---
 svx/source/svdraw/svdopage.cxx |   18 ++--
 svx/source/svdraw/svdopath.cxx |   19 ++--
 svx/source/svdraw/svdorect.cxx |   27 ++
 svx/source/svdraw/svdotext.cxx |   97 -
 svx/source/svdraw/svdouno.cxx  |   88 +++---
 svx/source/svdraw/svdovirt.cxx |   31 +++-
 svx/source/table/svdotable.cxx |   57 +-
 sw/inc/dcontact.hxx|3 
 sw/source/core/draw/dcontact.cxx   |   31 
 58 files changed, 761 insertions(+), 811 deletions(-)

New commits:
commit 09cb778b6eb7d3a5b9029965a1320b49c90e7295
Author: Noel 
AuthorDate: Tue Feb 9 13:42:22 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Feb 10 07:35:41 2021 +0100

clean up SdrObject cloning

using operator= implies that overwriting an SdrObject is a
useful operation, but that is not at all true - they are typically
linked into and referred to by many other things.

So rather use a copy-constructor.

Also clean up a couple of weird "do some stuff after the clone"
code into the main copy constructor.

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

diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index 056006c4305e..e4047abace14 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -74,6 +74,44 @@ DlgEdObj::DlgEdObj(SdrModel& rSdrModel)
 {
 }
 
+DlgEdObj::DlgEdObj(SdrModel& rSdrModel, DlgEdObj const & rSource)
+:   SdrUnoObj(rSdrModel, rSource)
+,bIsListening(false)
+{
+// set parent form
+pDlgEdForm = rSource.pDlgEdForm;
+
+// add child to parent form
+pDlgEdForm->AddChild( this );
+
+Reference< beans::XPropertySet > xPSet( GetUnoControlModel(), UNO_QUERY );
+if ( xPSet.is() )
+{
+// set new name
+OUString aOUniqueName( GetUniqueName() );
+Any aUniqueName;
+aUniqueName <<= aOUniqueName;
+xPS

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

2021-02-09 Thread Noel (via logerrit)
 include/oox/export/vmlexport.hxx  |7 -
 include/sax/fshelper.hxx  |   13 +-
 oox/source/export/drawingml.cxx   |   57 ---
 oox/source/export/vmlexport.cxx   |   79 +++
 sax/source/tools/fshelper.cxx |   16 +--
 sc/source/filter/excel/excrecds.cxx   |2 
 sc/source/filter/excel/xepage.cxx |5 
 sc/source/filter/excel/xepivotxml.cxx |   13 --
 sw/source/filter/ww8/docxattributeoutput.cxx  |  134 ++
 sw/source/filter/ww8/docxattributeoutput.hxx  |2 
 sw/source/filter/ww8/docxexport.cxx   |   12 --
 sw/source/filter/ww8/docxexport.hxx   |2 
 sw/source/filter/ww8/docxsdrexport.cxx|   60 +--
 sw/source/filter/ww8/docxsdrexport.hxx|2 
 sw/source/filter/ww8/docxtablestyleexport.cxx |   55 --
 15 files changed, 195 insertions(+), 264 deletions(-)

New commits:
commit 830e5e055760c31693e72e036ad473f4a3c43b55
Author: Noel 
AuthorDate: Tue Feb 9 21:47:22 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Feb 10 07:36:57 2021 +0100

pass FastAttributeList around by rtl::Reference

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

diff --git a/include/oox/export/vmlexport.hxx b/include/oox/export/vmlexport.hxx
index a1c79fda73a8..4ee885fba6bd 100644
--- a/include/oox/export/vmlexport.hxx
+++ b/include/oox/export/vmlexport.hxx
@@ -34,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace com::sun::star {
 namespace drawing {
@@ -83,14 +84,14 @@ class OOX_DLLPUBLIC VMLExport : public EscherEx
 
 /// Anchoring - Writer specific properties
 sal_Int16 m_eHOri, m_eVOri, m_eHRel, m_eVRel;
-std::unique_ptr m_pWrapAttrList;
+rtl::Reference m_pWrapAttrList;
 bool m_bInline; // css::text::TextContentAnchorType_AS_CHARACTER
 
 /// The object we're exporting.
 const SdrObject* m_pSdrObject;
 
 /// Fill the shape attributes as they come.
-::sax_fastparser::FastAttributeList *m_pShapeAttrList;
+rtl::Reference<::sax_fastparser::FastAttributeList> m_pShapeAttrList;
 
 /// Remember the shape type.
 sal_uInt32 m_nShapeType;
@@ -142,7 +143,7 @@ public:
 OString const & AddSdrObject( const SdrObject& rObj, sal_Int16 eHOri = -1,
 sal_Int16 eVOri = -1, sal_Int16 eHRel = -1,
 sal_Int16 eVRel = -1,
-std::unique_ptr m_pWrapAttrList 
= {},
+sax_fastparser::FastAttributeList* pWrapAttrList = nullptr,
 const bool bOOxmlExport = false );
 OString const & AddInlineSdrObject( const SdrObject& rObj, const bool 
bOOxmlExport );
 virtual void  AddSdrObjectVMLObject( const SdrObject& rObj) override;
diff --git a/include/sax/fshelper.hxx b/include/sax/fshelper.hxx
index 7a540ef6fddf..79f0e1a0f30f 100644
--- a/include/sax/fshelper.hxx
+++ b/include/sax/fshelper.hxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -39,8 +40,6 @@ namespace sax_fastparser {
 
 enum class MergeMarks { APPEND = 0, PREPEND = 1, POSTPONE = 2};
 
-typedef css::uno::Reference< css::xml::sax::XFastAttributeList > 
XFastAttributeListRef;
-
 class FastSaxSerializer;
 
 class SAX_DLLPUBLIC FastSerializerHelper
@@ -123,12 +122,12 @@ public:
 void endElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId)
 { endElement( FSNS( namespaceTokenId, elementTokenId ) ); }
 
-void singleElement(sal_Int32 elementTokenId, const XFastAttributeListRef& 
xAttrList);
-void singleElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId, 
XFastAttributeListRef const & xAttrList)
+void singleElement(sal_Int32 elementTokenId, const 
rtl::Reference& xAttrList);
+void singleElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId, 
rtl::Reference const & xAttrList)
 { singleElement(FSNS( namespaceTokenId, elementTokenId), xAttrList); }
 
-void startElement(sal_Int32 elementTokenId, const XFastAttributeListRef& 
xAttrList);
-void startElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId, 
XFastAttributeListRef const & xAttrList)
+void startElement(sal_Int32 elementTokenId, const 
rtl::Reference& xAttrList);
+void startElementNS(sal_Int32 namespaceTokenId, sal_Int32 elementTokenId, 
rtl::Reference const & xAttrList)
 { startElement( FSNS( namespaceTokenId, elementTokenId ), xAttrList ); 
}
 
 FastSerializerHelper* write(const char* value);
@@ -145,7 +144,7 @@ public:
 
 css::uno::Reference< css::io::XOutputStream > const & getOutputStream() 
const;
 
-static FastAttributeList *createAttrList();
+static rtl::Reference createAttrList();
 
 void mark(sal_Int32 nTag,
 const css::uno::Sequence< sal_Int32 >& rOrder =
diff --git a/oox/source/export/drawingml.cxx b/oo

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

2021-02-09 Thread Gülşah Köse (via logerrit)
 svx/source/table/tablelayouter.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b6d53ce5359d4f41b9fece475339cdf63c5817e9
Author: Gülşah Köse 
AuthorDate: Wed Feb 10 08:49:28 2021 +0300
Commit: Gülşah Köse 
CommitDate: Wed Feb 10 07:46:31 2021 +0100

tdf#139511 Correct calculation of minimum row height during resize.

Change-Id: Id47b5877d56850c80395897a83daae8e24f5c099
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110662
Tested-by: Jenkins
Reviewed-by: Gülşah Köse 

diff --git a/svx/source/table/tablelayouter.cxx 
b/svx/source/table/tablelayouter.cxx
index 80d0a52f4db2..2d8de0c1f8e2 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -789,7 +789,7 @@ void TableLayouter::LayoutTableHeight( tools::Rectangle& 
rArea, bool bFit )
 // Case 2: * Row has "Height" property
 // * Calculated minimum height is bigger than 
Height property value and
 // * Row has not any text of any cell in edit 
mode in the row (means completely empty)
-if ((nMinHeight < nRowPropHeight && nRowPropHeight > 0 ) ||
+if ((nMinHeight < nRowPropHeight && nRowPropHeight > 0 && 
(bRowHasText || bRowHasCellInEditMode)) ||
 (nMinHeight > nRowPropHeight && nRowPropHeight > 0 && 
(!bRowHasText && !bRowHasCellInEditMode)))
 {
 nMinHeight = nRowPropHeight;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-02-09 Thread Gülşah Köse (via logerrit)
 oox/source/drawingml/fillproperties.cxx  |   19 +++
 sd/qa/unit/data/pptx/greysscale-graphic.pptx |binary
 sd/qa/unit/import-tests.cxx  |   16 
 3 files changed, 35 insertions(+)

New commits:
commit b7189e1a9aef85ac2e3423cc4c136d97ebf0a58b
Author: Gülşah Köse 
AuthorDate: Mon Feb 8 13:30:39 2021 +0300
Commit: Gülşah Köse 
CommitDate: Wed Feb 10 08:08:35 2021 +0100

tdf#134210 Handle greyscale effect on bitmap filled custom shapes.

Change-Id: Ia4a0828dad80e32cc0c7fe12227ffca717d62e03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110572
Tested-by: Jenkins
Reviewed-by: Gülşah Köse 

diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index 6feeb1c9991d..2022df1d335a 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -166,6 +166,22 @@ Reference< XGraphic > 
lclMirrorGraphic(uno::Reference const &
 return aReturnGraphic.GetXGraphic();
 }
 
+Reference< XGraphic > lclGreysScaleGraphic(uno::Reference 
const & xGraphic)
+{
+::Graphic aGraphic(xGraphic);
+::Graphic aReturnGraphic;
+
+assert (aGraphic.GetType() == GraphicType::Bitmap);
+
+BitmapEx aBitmapEx(aGraphic.GetBitmapEx());
+aBitmapEx.Convert(BmpConversion::N8BitGreys);
+
+aReturnGraphic = ::Graphic(aBitmapEx);
+aReturnGraphic.setOriginURL(aGraphic.getOriginURL());
+
+return aReturnGraphic.GetXGraphic();
+}
+
 Reference< XGraphic > lclCheckAndApplyChangeColorTransform(const 
BlipFillProperties &aBlipProps, uno::Reference const & 
xGraphic,
const 
GraphicHelper& rGraphicHelper, const ::Color nPhClr)
 {
@@ -899,6 +915,9 @@ void GraphicProperties::pushToPropMap( PropertyMap& 
rPropMap, const GraphicHelpe
 if(bFlipH || bFlipV)
 xGraphic = lclMirrorGraphic(xGraphic, bFlipH, bFlipV );
 
+if(eColorMode == ColorMode_GREYS)
+xGraphic = lclGreysScaleGraphic( xGraphic );
+
 rPropMap.setProperty(PROP_FillBitmap, xGraphic);
 }
 else
diff --git a/sd/qa/unit/data/pptx/greysscale-graphic.pptx 
b/sd/qa/unit/data/pptx/greysscale-graphic.pptx
new file mode 100644
index ..547b60c10269
Binary files /dev/null and b/sd/qa/unit/data/pptx/greysscale-graphic.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 8af1b3000e9b..617580ff7f56 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -214,6 +214,7 @@ public:
 void testShapeBlurPPTXImport();
 void testMirroredGraphic();
 void testCropPositionGraphic();
+void testGreysScaleGraphic();
 
 bool checkPattern(sd::DrawDocShellRef const & rDocRef, int nShapeNumber, 
std::vector& rExpected);
 void testPatternImport();
@@ -344,6 +345,7 @@ public:
 CPPUNIT_TEST(testShapeBlurPPTXImport);
 CPPUNIT_TEST(testMirroredGraphic);
 CPPUNIT_TEST(testCropPositionGraphic);
+CPPUNIT_TEST(testGreysScaleGraphic);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -3337,6 +3339,20 @@ void SdImportTest::testCropPositionGraphic()
 xDocShRef->DoClose();
 }
 
+void SdImportTest::testGreysScaleGraphic()
+{
+sd::DrawDocShellRef xDocShRef = 
loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/greysscale-graphic.pptx"),
 PPTX);
+uno::Reference xShape(getShapeFromPage(0, 0, 
xDocShRef), uno::UNO_SET_THROW);
+CPPUNIT_ASSERT(xShape.is());
+uno::Reference xGraphic;
+xShape->getPropertyValue("FillBitmap") >>= xGraphic;
+CPPUNIT_ASSERT(xGraphic.is());
+Graphic aGraphic(xGraphic);
+BitmapEx aBitmap(aGraphic.GetBitmapEx());
+CPPUNIT_ASSERT_EQUAL( Color(3947580), aBitmap.GetPixelColor( 0, 0 ));
+xDocShRef->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
___
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.2' - include/sfx2 include/svtools sfx2/source svtools/inc

2021-02-09 Thread Samuel Mehrbrodt (via logerrit)
 include/sfx2/docmacromode.hxx|7 +--
 include/svtools/sfxecode.hxx |1 +
 sfx2/source/doc/docmacromode.cxx |   23 +++
 sfx2/source/doc/objmisc.cxx  |5 +++--
 svtools/inc/errtxt.hrc   |1 +
 5 files changed, 29 insertions(+), 8 deletions(-)

New commits:
commit d2c52c4af12b74ee9530e6cc8ce188b939efb9b2
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jan 18 15:24:48 2021 +0100
Commit: Andras Timar 
CommitDate: Wed Feb 10 08:41:56 2021 +0100

Improve macro checks

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109552
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 1dc71daf7fa7204a98c75dac680af664ab9c8edb)

Change-Id: Ie40801df8866b52c1458e020ffa9cba120720af7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110058
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/include/sfx2/docmacromode.hxx b/include/sfx2/docmacromode.hxx
index 7e1511625086..19199f7a410e 100644
--- a/include/sfx2/docmacromode.hxx
+++ b/include/sfx2/docmacromode.hxx
@@ -218,7 +218,8 @@ namespace sfx2
  if and only if macro execution in this document is 
allowed.
 */
 booladjustMacroMode(
-const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction
+const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction,
+bool bHasValidContentSignature = false
 );
 
 /** determines whether macro execution is disallowed
@@ -284,11 +285,13 @@ namespace sfx2
 */
 bool
 checkMacrosOnLoading(
-const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction
+const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction,
+bool bHasValidContentSignature = false
 );
 
 private:
 std::shared_ptr< DocumentMacroMode_Data >   m_xData;
+bool m_bNeedsContentSigned;
 };
 
 
diff --git a/include/svtools/sfxecode.hxx b/include/svtools/sfxecode.hxx
index 3cc2f28e4816..99db1fd42fc6 100644
--- a/include/svtools/sfxecode.hxx
+++ b/include/svtools/sfxecode.hxx
@@ -37,6 +37,7 @@
 #define ERRCODE_SFX_CANTCREATEBACKUPErrCode(ErrCodeArea::Sfx, 
ErrCodeClass::Create, 50)
 #define ERRCODE_SFX_MACROS_SUPPORT_DISABLED ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 51)
 #define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 52)
+#define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_CONTENT_UNSIGNED 
ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 53)
 #define ERRCODE_SFX_SHARED_NOPASSWORDCHANGE ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 54)
 #define ERRCODE_SFX_INCOMPLETE_ENCRYPTION   ErrCode(WarningFlag::Yes, 
ErrCodeArea::Sfx, ErrCodeClass::NONE, 55)
 #define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_MAC \
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index 570fc27ac43f..7c414be4347b 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -111,6 +111,10 @@ namespace sfx2
 #endif
 }
 
+void lcl_showMacrosDisabledUnsignedContentError( const Reference< 
XInteractionHandler >& rxHandler, bool& rbAlreadyShown )
+{
+lcl_showGeneralSfxErrorOnce( rxHandler, 
ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_CONTENT_UNSIGNED, rbAlreadyShown );
+}
 
 bool lcl_showMacroWarning( const Reference< XInteractionHandler >& 
rxHandler,
 const OUString& rDocumentLocation )
@@ -123,7 +127,8 @@ namespace sfx2
 
 //= DocumentMacroMode
 DocumentMacroMode::DocumentMacroMode( IMacroDocumentAccess& 
rDocumentAccess )
-:m_xData( new DocumentMacroMode_Data( rDocumentAccess ) )
+:m_xData( new DocumentMacroMode_Data( rDocumentAccess ) ),
+m_bNeedsContentSigned(false)
 {
 }
 
@@ -139,7 +144,7 @@ namespace sfx2
 return false;
 }
 
-bool DocumentMacroMode::adjustMacroMode( const Reference< 
XInteractionHandler >& rxInteraction )
+bool DocumentMacroMode::adjustMacroMode( const Reference< 
XInteractionHandler >& rxInteraction, bool bHasValidContentSignature )
 {
 sal_uInt16 nMacroExecutionMode = 
m_xData->m_rDocumentAccess.getCurrentMacroExecMode();
 
@@ -230,6 +235,14 @@ namespace sfx2
 {
 return disallowMacroExecution();
 }
+else if ( 
m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading() &&
+  bHasTrustedMacroSignature &&
+  !bHasValidContentSignature)
+{
+// When macros are signed, and the document has events 
which call macros, the document content needs to be signed too.
+lcl_showMacrosDisabled

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

2021-02-09 Thread Andras Timar (via logerrit)
 oox/source/drawingml/chart/datasourcecontext.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 754599f0ec3b6fecc72554dcdabbd73fe4e66254
Author: Andras Timar 
AuthorDate: Tue Feb 9 12:00:45 2021 +0100
Commit: Andras Timar 
CommitDate: Wed Feb 10 08:44:46 2021 +0100

Fix chart label import, use the locale as MS Office does

Change-Id: Ic2b9198d37c102721c3043825113567d703d72b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110675
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/oox/source/drawingml/chart/datasourcecontext.cxx 
b/oox/source/drawingml/chart/datasourcecontext.cxx
index e50723b378d0..4988a24b61ee 100644
--- a/oox/source/drawingml/chart/datasourcecontext.cxx
+++ b/oox/source/drawingml/chart/datasourcecontext.cxx
@@ -156,7 +156,7 @@ SvNumberFormatter* 
DoubleSequenceContext::getNumberFormatter()
 uno::Reference rContext =
 getFilter().getComponentContext();
 mpNumberFormatter.reset(
-new SvNumberFormatter(rContext, LANGUAGE_DONTKNOW) );
+new SvNumberFormatter(rContext, LANGUAGE_SYSTEM) );
 }
 return mpNumberFormatter.get();
 }
___
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' - oox/source

2021-02-09 Thread Andras Timar (via logerrit)
 oox/source/drawingml/chart/datasourcecontext.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 25252cf15a0c1b5cd308d502dc8c5efed46bcda2
Author: Andras Timar 
AuthorDate: Tue Feb 9 12:00:45 2021 +0100
Commit: Andras Timar 
CommitDate: Wed Feb 10 08:45:03 2021 +0100

Fix chart label import, use the locale as MS Office does

Change-Id: Ic2b9198d37c102721c3043825113567d703d72b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110630
Tested-by: Jenkins CollaboraOffice 
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/oox/source/drawingml/chart/datasourcecontext.cxx 
b/oox/source/drawingml/chart/datasourcecontext.cxx
index 7fa7b12852a7..18353d570dc5 100644
--- a/oox/source/drawingml/chart/datasourcecontext.cxx
+++ b/oox/source/drawingml/chart/datasourcecontext.cxx
@@ -156,7 +156,7 @@ SvNumberFormatter* 
DoubleSequenceContext::getNumberFormatter()
 uno::Reference rContext =
 getFilter().getComponentContext();
 mpNumberFormatter.reset(
-new SvNumberFormatter(rContext, LANGUAGE_DONTKNOW) );
+new SvNumberFormatter(rContext, LANGUAGE_SYSTEM) );
 }
 return mpNumberFormatter.get();
 }
___
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.2' - configure.ac

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

New commits:
commit a682c9dd877a9056b787ecc73b3866334d3afa52
Author: Andras Timar 
AuthorDate: Wed Feb 10 08:48:18 2021 +0100
Commit: Andras Timar 
CommitDate: Wed Feb 10 08:48:18 2021 +0100

Bump version to 6.2-29

Change-Id: Ic2348e378a469eb4a44d343ad50be8686bb09bce

diff --git a/configure.ac b/configure.ac
index a331039d7d0f..f0aeab1c3363 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([Collabora Office],[6.2.10.28],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[6.2.10.29],[],[],[https://collaboraoffice.com/])
 
 AC_PREREQ([2.59])
 
___
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/co-6.2-29'

2021-02-09 Thread Andras Timar (via logerrit)
Tag 'co-6.2-29' created by Andras Timar  at 
2021-02-10 07:49 +

co-6.2-29

Changes since cp-6.2-25-1:
---
 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/co-6.2-29'

2021-02-09 Thread Andras Timar (via logerrit)
Tag 'co-6.2-29' created by Andras Timar  at 
2021-02-10 07:49 +

co-6.2-29

Changes since CODE-4.2.2-2:
Andras Timar (1):
  [cp] add info about xapian omega search and the cp-query template

---
 xapian/cp-query   |  141 ++
 xapian/xapian.txt |  109 +
 2 files changed, 250 insertions(+)
---
___
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/co-6.2-29'

2021-02-09 Thread Andras Timar (via logerrit)
Tag 'co-6.2-29' created by Andras Timar  at 
2021-02-10 07:49 +

co-6.2-29

Changes since cp-6.2-23:
Andras Timar (1):
  Update mobile Word Count dialog translations and some more

---
 source/ar/sw/messages.po  | 1364 +++-
 source/as/sw/messages.po  | 1364 +++-
 source/ast/sw/messages.po | 1426 --
 source/bg/sw/messages.po  | 1374 +++--
 source/bn-IN/sw/messages.po   | 1364 +++-
 source/br/sw/messages.po  | 1364 +++-
 source/ca-valencia/sw/messages.po | 1794 --
 source/ca/sw/messages.po  | 1374 +++--
 source/cs/sw/messages.po  | 1374 +++--
 source/cy/sw/messages.po  | 1374 +++--
 source/da/sw/messages.po  | 1374 +++--
 source/de/sw/messages.po  | 1370 +++--
 source/el/sw/messages.po  | 1374 +++--
 source/es/sw/messages.po  |  113 +-
 source/et/sw/messages.po  | 1410 +++--
 source/eu/sw/messages.po  | 1374 +++--
 source/fi/sw/messages.po  | 1384 +++--
 source/fr/sw/messages.po  | 1374 +++--
 source/ga/sw/messages.po  | 1364 +++-
 source/gd/sw/messages.po  | 1364 +++-
 source/gl/sw/messages.po  | 1374 +++--
 source/gu/sw/messages.po  | 1364 +++-
 source/he/sw/messages.po  | 1374 +++--
 source/hi/sw/messages.po  | 1364 +++-
 source/hr/sw/messages.po  | 1374 +++--
 source/hu/sw/messages.po  | 1364 +++-
 source/id/sw/messages.po  | 1390 +++--
 source/is/sw/messages.po  | 1368 +++-
 source/it/sw/messages.po  | 1374 +++--
 source/ja/sw/messages.po  | 1404 +++--
 source/km/sw/messages.po  | 1364 +++-
 source/kn/sw/messages.po  | 1364 +++-
 source/ko/sw/messages.po  | 1364 +++-
 source/lt/sw/messages.po  | 1388 +++--
 source/lv/sw/messages.po  | 1374 +++--
 source/ml/sw/messages.po  | 1364 +++-
 source/mr/sw/messages.po  | 1364 +++-
 source/nb/sw/messages.po  | 1374 +++--
 source/nl/sw/messages.po  | 1374 +++--
 source/nn/sw/messages.po  | 1374 +++--
 source/oc/sw/messages.po  | 1364 +++-
 source/or/sw/messages.po  | 1364 +++-
 source/pa-IN/sw/messages.po   | 1366 +++-
 source/pl/sw/messages.po  | 1400 +++--
 source/pt-BR/sw/messages.po   |  121 +-
 source/pt/sw/messages.po  | 1374 +++--
 source/ro/sw/messages.po  | 1364 +++-
 source/ru/sw/messages.po  | 1374 +++--
 source/sk/sw/messages.po  | 1374 +++--
 source/sl/sw/messages.po  | 1374 +++--
 source/sr-Latn/sw/messages.po | 1363 +++-
 source/sr/sw/messages.po  | 1378 +++--
 source/sv/sw/messages.po  | 1404 +++--
 source/ta/sw/messages.po  | 1364 +++-
 source/te/sw/messages.po  | 1364 +++-
 source/tr/sw/messages.po  | 1387 +++--
 source/uk/sw/messages.po  | 1376 +++--
 source/vi/sw/messages.po  | 1364 +++-
 source/zh-CN/sw/messages.po   | 1374 +++--
 source/zh-TW/sw/messages.po   | 1376 +++--
 60 files changed, 43140 insertions(+), 37212 deletions(-)
---
___
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/co-6.2-29'

2021-02-09 Thread Andras Timar (via logerrit)
Tag 'co-6.2-29' created by Andras Timar  at 
2021-02-10 07:49 +

co-6.2-29

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


[Libreoffice-commits] core.git: bridges/source chart2/source comphelper/source connectivity/source cui/source dbaccess/source editeng/source filter/source i18nlangtag/source lotuswordpro/source winacc

2021-02-09 Thread Andrea Gelmini (via logerrit)
 bridges/source/cpp_uno/gcc3_linux_mips64/uno2cpp.cxx|1 
 chart2/source/controller/main/ChartController.cxx   |1 
 comphelper/source/misc/anycompare.cxx   |   14 
 connectivity/source/drivers/flat/ETable.cxx |1 
 cui/source/customize/CustomNotebookbarGenerator.cxx |   10 ---
 dbaccess/source/filter/xml/xmlStyleImport.cxx   |1 
 dbaccess/source/filter/xml/xmlfilter.cxx|5 -
 editeng/source/items/frmitems.cxx   |1 
 filter/source/graphicfilter/icgm/bitmap.cxx |1 
 filter/source/msfilter/escherex.cxx |1 
 i18nlangtag/source/languagetag/languagetag.cxx  |6 -
 lotuswordpro/source/filter/xfilter/xfutil.cxx   |   52 
 winaccessibility/source/service/AccObjectWinManager.cxx |2 
 13 files changed, 96 deletions(-)

New commits:
commit 974dc88a06603f2f119f603c2581870e4e7ea7bc
Author: Andrea Gelmini 
AuthorDate: Sun Feb 7 21:47:10 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Feb 10 08:52:11 2021 +0100

Remove unneeded breaks

Extending this:
https://gerrit.libreoffice.org/c/core/+/110512

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

diff --git a/bridges/source/cpp_uno/gcc3_linux_mips64/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_mips64/uno2cpp.cxx
index e33969ae789c..cb0661e7fd6a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_mips64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_mips64/uno2cpp.cxx
@@ -113,7 +113,6 @@ namespace
   break;
   default:
   return false;
-  break;
   }
   }
   return true;
diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index be8dffbaee44..d19f3b97ef32 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -291,7 +291,6 @@ OUString ChartController::GetContextName()
 {
 case OBJECTTYPE_DATA_SERIES:
 return "Series";
-break;
 case OBJECTTYPE_DATA_ERRORS_X:
 case OBJECTTYPE_DATA_ERRORS_Y:
 case OBJECTTYPE_DATA_ERRORS_Z:
diff --git a/comphelper/source/misc/anycompare.cxx 
b/comphelper/source/misc/anycompare.cxx
index 106892400c7c..d802024e7502 100644
--- a/comphelper/source/misc/anycompare.cxx
+++ b/comphelper/source/misc/anycompare.cxx
@@ -242,46 +242,32 @@ namespace comphelper
 return ScalarPredicateLess< sal_Unicode >().isLess(lhs, rhs);
 case TypeClass_BOOLEAN:
 return ScalarPredicateLess< bool >().isLess(lhs, rhs);
-break;
 case TypeClass_BYTE:
 return ScalarPredicateLess< sal_Int8 >().isLess(lhs, rhs);
-break;
 case TypeClass_SHORT:
 return ScalarPredicateLess< sal_Int16 >().isLess(lhs, rhs);
-break;
 case TypeClass_UNSIGNED_SHORT:
 return ScalarPredicateLess< sal_uInt16 >().isLess(lhs, rhs);
-break;
 case TypeClass_LONG:
 return ScalarPredicateLess< sal_Int32 >().isLess(lhs, rhs);
-break;
 case TypeClass_UNSIGNED_LONG:
 return ScalarPredicateLess< sal_uInt32 >().isLess(lhs, rhs);
-break;
 case TypeClass_HYPER:
 return ScalarPredicateLess< sal_Int64 >().isLess(lhs, rhs);
-break;
 case TypeClass_UNSIGNED_HYPER:
 return ScalarPredicateLess< sal_uInt64 >().isLess(lhs, rhs);
-break;
 case TypeClass_FLOAT:
 return ScalarPredicateLess< float >().isLess(lhs, rhs);
-break;
 case TypeClass_DOUBLE:
 return ScalarPredicateLess< double >().isLess(lhs, rhs);
-break;
 case TypeClass_STRING:
 return StringPredicateLess().isLess(lhs, rhs);
-break;
 case TypeClass_TYPE:
 return TypePredicateLess().isLess(lhs, rhs);
-break;
 case TypeClass_ENUM:
 return EnumPredicateLess( lhs.getValueType() ).isLess(lhs, rhs);
-break;
 case TypeClass_INTERFACE:
 return InterfacePredicateLess().isLess(lhs, rhs);
-break;
 case TypeClass_STRUCT:
 if ( lhs.getValueType().equals( ::cppu::UnoType< Date >::get() ) )
 return DatePredicateLess().isLess(lhs, rhs);
diff --git a/connectivity/source/drivers/flat/ETable.cxx 
b/connectivity/source/drivers/flat/ETable.cxx
index 0dceba05b641..fa4305e991a4 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -784,7 +784,6 @@ bool OFlatTable::seekRow(IResultSetHelper::Movement 
eCursorPosition, sal_Int32 n
 }
 // m