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

2020-12-01 Thread Noel (via logerrit)
 include/xmloff/txtimp.hxx|6 ++
 xmloff/source/text/XMLChangeElementImportContext.cxx |   16 +++
 xmloff/source/text/XMLChangeElementImportContext.hxx |9 +--
 xmloff/source/text/XMLChangeInfoContext.cxx  |4 -
 xmloff/source/text/XMLChangeInfoContext.hxx  |2 
 xmloff/source/text/txtimp.cxx|   43 +++
 6 files changed, 60 insertions(+), 20 deletions(-)

New commits:
commit 4d7ad433c6ebd9fbcac480ebdd00af933a437df5
Author: Noel 
AuthorDate: Wed Dec 2 09:07:49 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Dec 2 08:58:50 2020 +0100

fastparser in XMLChangeElementImportContext

with the help of a fallback method for CreateTextChildContext

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

diff --git a/include/xmloff/txtimp.hxx b/include/xmloff/txtimp.hxx
index 94d1d6580ab2..bdd0e169c9d1 100644
--- a/include/xmloff/txtimp.hxx
+++ b/include/xmloff/txtimp.hxx
@@ -59,6 +59,7 @@ namespace frame { class XModel; }
 namespace container { class XNameContainer; class XIndexReplace; }
 namespace beans { class XPropertySet; }
 namespace xml::sax { class XAttributeList; }
+namespace xml::sax { class XFastAttributeList; }
 namespace util { struct DateTime; }
 }
 
@@ -395,6 +396,11 @@ public:
 
 void SetAutoStyles( SvXMLStylesContext *pStyles );
 
+SvXMLImportContext *CreateTextChildContext(
+SvXMLImport& rImport,
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList > & 
xAttrList,
+XMLTextType eType = XMLTextType::Shape );
 SvXMLImportContext *CreateTextChildContext(
 SvXMLImport& rImport,
 sal_uInt16 nPrefix, const OUString& rLocalName,
diff --git a/xmloff/source/text/XMLChangeElementImportContext.cxx 
b/xmloff/source/text/XMLChangeElementImportContext.cxx
index a3bce265ae43..4fc81a755eda 100644
--- a/xmloff/source/text/XMLChangeElementImportContext.cxx
+++ b/xmloff/source/text/XMLChangeElementImportContext.cxx
@@ -44,17 +44,15 @@ 
XMLChangeElementImportContext::XMLChangeElementImportContext(
 {
 }
 
-SvXMLImportContextRef XMLChangeElementImportContext::CreateChildContext(
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
-const Reference & xAttrList)
+css::uno::Reference< css::xml::sax::XFastContextHandler > 
XMLChangeElementImportContext::createFastChildContext(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
 SvXMLImportContextRef xContext;
 
-if ( (XML_NAMESPACE_OFFICE == nPrefix) &&
- IsXMLToken( rLocalName, XML_CHANGE_INFO) )
+if ( nElement == XML_ELEMENT(OFFICE, XML_CHANGE_INFO) )
 {
-xContext = new XMLChangeInfoContext(GetImport(), nPrefix, rLocalName,
+xContext = new XMLChangeInfoContext(GetImport(),
 rChangedRegion, maType);
 }
 else
@@ -63,7 +61,7 @@ SvXMLImportContextRef 
XMLChangeElementImportContext::CreateChildContext(
 rChangedRegion.UseRedlineText();
 
 xContext = GetImport().GetTextImport()->CreateTextChildContext(
-GetImport(), nPrefix, rLocalName, xAttrList,
+GetImport(), nElement, xAttrList,
 XMLTextType::ChangedRegion);
 
 if (!xContext)
@@ -74,7 +72,7 @@ SvXMLImportContextRef 
XMLChangeElementImportContext::CreateChildContext(
 }
 }
 
-return xContext;
+return xContext.get();
 }
 
 void XMLChangeElementImportContext::startFastElement( sal_Int32, const 
Reference< css::xml::sax::XFastAttributeList >& )
diff --git a/xmloff/source/text/XMLChangeElementImportContext.hxx 
b/xmloff/source/text/XMLChangeElementImportContext.hxx
index e43e86248224..fb7bef4aa13f 100644
--- a/xmloff/source/text/XMLChangeElementImportContext.hxx
+++ b/xmloff/source/text/XMLChangeElementImportContext.hxx
@@ -37,7 +37,7 @@ class XMLChangedRegionImportContext;
  * Import  and  elements contained in a
  *  element.
  */
-class XMLChangeElementImportContext : public SvXMLImportContext
+ class XMLChangeElementImportContext : public SvXMLImportContext
 {
 /**
  * accept text content (paragraphs) in element as redline content?
@@ -60,7 +60,6 @@ class XMLChangeElementImportContext : public 
SvXMLImportContext
 
 public:
 
-
 XMLChangeElementImportContext(
 SvXMLImport& rImport,
 /// accept text content (paragraphs) in element as redline content?
@@ -69,10 +68,8 @@ public:
 XMLChangedRegionImportContext& rParent,
 OUString const & rType);
 
-virtual SvXMLImportContextRef CreateChildContext(
-sal_uInt16 nPrefix,
-const OUString& rLocalName,
-const css::uno::Reference & xAttrList) 
override;
+virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CAL

[Libreoffice-commits] core.git: external/python3

2020-12-01 Thread Tor Lillqvist (via logerrit)
 external/python3/macos-11.patch.0 |   20 
 1 file changed, 20 insertions(+)

New commits:
commit ff270d936d1d0209d9036aaa9149a8ee489aaebf
Author: Tor Lillqvist 
AuthorDate: Tue Dec 1 21:36:05 2020 +0200
Commit: Tor Lillqvist 
CommitDate: Wed Dec 2 08:44:08 2020 +0100

Guard against sysconf(_SC_OPEN_MAX) returning LONG_MAX

That seems to happen in a sandboxed process on macOS, at least. This
caused an apparent hang when invoking Python, for instance simply
through Tools > Macros > Run Macro... .

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

diff --git a/external/python3/macos-11.patch.0 
b/external/python3/macos-11.patch.0
index 23fc5f9760c5..3c42d515f6bd 100644
--- a/external/python3/macos-11.patch.0
+++ b/external/python3/macos-11.patch.0
@@ -48,3 +48,23 @@
#else
  #error "unknown architecture for universal build."
#endif
+--- Modules/_posixsubprocess.c
 Modules/_posixsubprocess.c
+@@ -31,6 +31,8 @@
+ # define SYS_getdents64  __NR_getdents64
+ #endif
+ 
++#include 
++
+ #if defined(__sun) && defined(__SVR4)
+ /* readdir64 is used to work around Solaris 9 bug 6395699. */
+ # define readdir readdir64
+@@ -202,7 +202,7 @@
+ #endif
+ #ifdef _SC_OPEN_MAX
+ local_max_fd = sysconf(_SC_OPEN_MAX);
+-if (local_max_fd == -1)
++if (local_max_fd == -1 || local_max_fd == LONG_MAX)
+ #endif
+ local_max_fd = 256;  /* Matches legacy Lib/subprocess.py behavior. */
+ return local_max_fd;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Andrea Gelmini (via logerrit)
 forms/source/component/DatabaseForm.cxx |2 --
 forms/source/runtime/formoperations.cxx |1 -
 2 files changed, 3 deletions(-)

New commits:
commit 3fdf151dcdc00d65633c3ff33182b371da7ebfcb
Author: Andrea Gelmini 
AuthorDate: Tue Dec 1 14:12:09 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Dec 2 08:20:47 2020 +0100

Removed triplicated includes

Change-Id: I91af264306ac7a61c90bf46df0560448b7d2285d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106981
Reviewed-by: Julien Nabet 
Tested-by: Jenkins

diff --git a/forms/source/component/DatabaseForm.cxx 
b/forms/source/component/DatabaseForm.cxx
index 41753cc0a121..d46cd0b0d3f3 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -68,12 +68,10 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
-#include 
 
 using namespace ::dbtools;
 using namespace ::comphelper;
diff --git a/forms/source/runtime/formoperations.cxx 
b/forms/source/runtime/formoperations.cxx
index e698d29f4051..4aa12bc91233 100644
--- a/forms/source/runtime/formoperations.cxx
+++ b/forms/source/runtime/formoperations.cxx
@@ -60,7 +60,6 @@
 #include 
 #include 
 #include 
-#include 
 
 
 namespace frm
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3

2020-12-01 Thread Stephan Bergmann (via logerrit)
 external/python3/ubsan.patch.0 |   23 +++
 1 file changed, 23 insertions(+)

New commits:
commit 1657639d5e405c6e1e988d51a1f267c378c74b53
Author: Stephan Bergmann 
AuthorDate: Tue Dec 1 14:44:01 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Dec 2 08:16:50 2020 +0100

external/python3: Silence UBSan errors with --with-pydebug

...that happen when building ExternalProject_python3 itself after
12142490cd43f8568ab29e0ddfa75b334d6d39d5 "Enable Python Py_DEBUG setting 
when
built with --enable-dbgutil on Linux":

For one, silence

> Modules/posixmodule.c:14395:9: runtime error: left shift of 34 by 26 
places cannot be represented in type 'int'
>  #0 in all_ins at 
workdir/UnpackedTarball/python3/./Modules/posixmodule.c:14395:9

where at least my kernel-headers-5.9.9-200.fc33.x86_64
/usr/include/linux/memfd.h has

> #define MFD_HUGE_16GB HUGETLB_FLAG_ENCODE_16GB

and /usr/include/asm-generic/hugetlb_encode.h has

> #define HUGETLB_FLAG_ENCODE_16GB  (34 << HUGETLB_FLAG_ENCODE_SHIFT)

For another (and as predicted in 29d47d22c43e6adc1850b7db5880028dcd07d1b3 
"Fix
passing --disable-optimized into external/python3": "in a Linux UBsan build,
making ExternalProject_python3 would have started to cause some 'applying 
zero
offset to null pointer' failures, but which would have been easy to fix"),
silence

> Objects/listobject.c:551:24: runtime error: applying zero offset to null 
pointer
>  #0 in list_concat at 
workdir/UnpackedTarball/python3/Objects/listobject.c:551:24

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

diff --git a/external/python3/ubsan.patch.0 b/external/python3/ubsan.patch.0
index 938acc1f1725..9f458b1e0f95 100644
--- a/external/python3/ubsan.patch.0
+++ b/external/python3/ubsan.patch.0
@@ -18,3 +18,26 @@
  
/*  Set the carry bit if the function uses any sse registers.
This is clc or stc, together with the first byte of the jmp.  */
+--- Modules/posixmodule.c
 Modules/posixmodule.c
+@@ -23,6 +23,9 @@
+ };
+ 
+ static int
++#if defined __clang__
++__attribute__((no_sanitize("shift-base"))) // MFD_HUGE_16GB in 
/usr/include/linux/memfd.h
++#endif
+ all_ins(PyObject *m)
+ {
+ #ifdef F_OK
+--- Objects/listobject.c
 Objects/listobject.c
+@@ -548,7 +548,7 @@
+ dest[i] = v;
+ }
+ src = b->ob_item;
+-dest = np->ob_item + Py_SIZE(a);
++dest = Py_SIZE(a) == 0 ? np->ob_item : np->ob_item + Py_SIZE(a);
+ for (i = 0; i < Py_SIZE(b); i++) {
+ PyObject *v = src[i];
+ Py_INCREF(v);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source framework/source include/unotools sfx2/source unotools/source

2020-12-01 Thread Noel Grandin (via logerrit)
 cui/source/dialogs/hldocntp.cxx  |   18 +---
 framework/source/uielement/newmenucontroller.cxx |   28 ++--
 include/unotools/dynamicmenuoptions.hxx  |   20 -
 sfx2/source/appl/shutdowniconaqua.mm |   11 +---
 sfx2/source/appl/shutdowniconw32.cxx |   13 +
 unotools/source/config/dynamicmenuoptions.cxx|   51 ++-
 6 files changed, 44 insertions(+), 97 deletions(-)

New commits:
commit 264498b4baeb4d451c17153ae354bf9c241709eb
Author: Noel Grandin 
AuthorDate: Mon Nov 30 21:19:52 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Dec 2 08:01:57 2020 +0100

simplify SvtDynamicMenuOptions

just use the struct instead of passing around sequence
of sequence of PropertyValue

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

diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index 1a201f8421c3..3a582764f40e 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -157,23 +157,13 @@ void SvxHyperlinkNewDocTp::FillDocumentList()
 {
 weld::WaitObject aWaitObj(mpDialog->getDialog());
 
-uno::Sequence< uno::Sequence< beans::PropertyValue > >
-aDynamicMenuEntries( SvtDynamicMenuOptions().GetMenu( 
EDynamicMenuType::NewMenu ) );
+std::vector aDynamicMenuEntries( 
SvtDynamicMenuOptions().GetMenu( EDynamicMenuType::NewMenu ) );
 
-sal_uInt32 i, nCount = aDynamicMenuEntries.getLength();
-for ( i = 0; i < nCount; i++ )
+for ( const SvtDynMenuEntry & rDynamicMenuEntry : aDynamicMenuEntries )
 {
-const uno::Sequence< beans::PropertyValue >& rDynamicMenuEntry = 
aDynamicMenuEntries[ i ];
+OUString aDocumentUrl = rDynamicMenuEntry.sURL;
+OUString aTitle = rDynamicMenuEntry.sTitle;
 
-OUString aDocumentUrl, aTitle;
-
-for ( const beans::PropertyValue& e : rDynamicMenuEntry )
-{
-if ( e.Name == DYNAMICMENU_PROPERTYNAME_URL )
-e.Value >>= aDocumentUrl;
-else if ( e.Name == DYNAMICMENU_PROPERTYNAME_TITLE )
-e.Value >>= aTitle;
-}
 //#i96822# business cards, labels and database should not be inserted 
here
 if( aDocumentUrl == "private:factory/swriter?slot=21051" ||
 aDocumentUrl == "private:factory/swriter?slot=21052" ||
diff --git a/framework/source/uielement/newmenucontroller.cxx 
b/framework/source/uielement/newmenucontroller.cxx
index feb9df4bf408..76f7bc6eb194 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -325,40 +325,24 @@ void NewMenuController::fillPopupMenu( Reference< 
css::awt::XPopupMenu > const &
 if(xMenuItemDispatch == nullptr)
 return;
 
-const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > 
> aDynamicMenuEntries =
+const std::vector< SvtDynMenuEntry > aDynamicMenuEntries =
 SvtDynamicMenuOptions().GetMenu( m_bNewMenu ? 
EDynamicMenuType::NewMenu : EDynamicMenuType::WizardMenu );
 
-OUString aTitle;
-OUString aURL;
-OUString aTargetFrame;
-OUString aImageId;
 sal_uInt16 nItemId = 1;
 
 for ( const auto& aDynamicMenuEntry : aDynamicMenuEntries )
 {
-for ( const auto& aProperty : aDynamicMenuEntry )
-{
-if ( aProperty.Name == DYNAMICMENU_PROPERTYNAME_URL )
-aProperty.Value >>= aURL;
-else if ( aProperty.Name == DYNAMICMENU_PROPERTYNAME_TITLE )
-aProperty.Value >>= aTitle;
-else if ( aProperty.Name == 
DYNAMICMENU_PROPERTYNAME_IMAGEIDENTIFIER )
-aProperty.Value >>= aImageId;
-else if ( aProperty.Name == DYNAMICMENU_PROPERTYNAME_TARGETNAME )
-aProperty.Value >>= aTargetFrame;
-}
-
-if ( aTitle.isEmpty() && aURL.isEmpty() )
+if ( aDynamicMenuEntry.sTitle.isEmpty() && 
aDynamicMenuEntry.sURL.isEmpty() )
 continue;
 
-if ( aURL == "private:separator" )
+if ( aDynamicMenuEntry.sURL == "private:separator" )
 pVCLPopupMenu->InsertSeparator();
 else
 {
-pVCLPopupMenu->InsertItem( nItemId, aTitle );
-pVCLPopupMenu->SetItemCommand( nItemId, aURL );
+pVCLPopupMenu->InsertItem( nItemId, aDynamicMenuEntry.sTitle );
+pVCLPopupMenu->SetItemCommand( nItemId, aDynamicMenuEntry.sURL );
 
-void* nAttributePtr = MenuAttributes::CreateAttribute( 
aTargetFrame, aImageId );
+void* nAttributePtr = MenuAttributes::CreateAttribute( 
aDynamicMenuEntry.sTargetName, aDynamicMenuEntry.sImageIdentifier );
 pVCLPopupMenu->SetUserValue( nItemId, nAttributePtr, 
MenuAttributes::ReleaseAttribute );
 
 nItemId++;
diff --git a/include/unot

[Libreoffice-commits] core.git: offapi/com

2020-12-01 Thread Mike Kaganski (via logerrit)
 offapi/com/sun/star/xml/sax/XFastParser.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 70a7ed7fe8959988b58c0ef3c3f04a2a7db0625b
Author: Mike Kaganski 
AuthorDate: Wed Dec 2 06:43:52 2020 +0100
Commit: Mike Kaganski 
CommitDate: Wed Dec 2 07:48:20 2020 +0100

We should mention product name here together with version, too

Change-Id: Ia0da1511c242bb4638c7853e043f96895a65fcbe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107019
Reviewed-by: Noel Grandin 
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/xml/sax/XFastParser.idl 
b/offapi/com/sun/star/xml/sax/XFastParser.idl
index f8f781839c82..853b886c75a1 100644
--- a/offapi/com/sun/star/xml/sax/XFastParser.idl
+++ b/offapi/com/sun/star/xml/sax/XFastParser.idl
@@ -159,7 +159,7 @@ interface XFastParser: com::sun::star::uno::XInterface
 void setNamespaceHandler( [in] XFastNamespaceHandler Handler);
 
 /**
-  * @since 7.1
+  * @since LibreOffice 7.1
   * Simulate a DTD file.
   * Will allow to use customized entity references like ∞ .
   */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: offapi/com

2020-12-01 Thread dante (via logerrit)
 offapi/com/sun/star/xml/sax/XFastParser.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e3f8e1260ac42b680e79bf50b2645957916d34e0
Author: dante 
AuthorDate: Tue Dec 1 23:56:25 2020 +0100
Commit: Noel Grandin 
CommitDate: Wed Dec 2 06:39:50 2020 +0100

Corrections on xfasatparser IDL file.

- Removed uneeded include
- Added @since tag

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

diff --git a/offapi/com/sun/star/xml/sax/XFastParser.idl 
b/offapi/com/sun/star/xml/sax/XFastParser.idl
index e9081bbd6235..f8f781839c82 100644
--- a/offapi/com/sun/star/xml/sax/XFastParser.idl
+++ b/offapi/com/sun/star/xml/sax/XFastParser.idl
@@ -40,7 +40,6 @@
 #include 
 
 #include 
-//#include 
 
 
 module com {  module sun {  module star {  module xml {  module sax {
@@ -160,6 +159,7 @@ interface XFastParser: com::sun::star::uno::XInterface
 void setNamespaceHandler( [in] XFastNamespaceHandler Handler);
 
 /**
+  * @since 7.1
   * Simulate a DTD file.
   * Will allow to use customized entity references like ∞ .
   */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2020-12-01 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 761a672d62df1891b9f4f367a499b220ab2b33fa
Author: Seth Chaiklin 
AuthorDate: Wed Dec 2 01:16:47 2020 +0100
Commit: Gerrit Code Review 
CommitDate: Wed Dec 2 01:16:47 2020 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to be1839104c885a769c6caf84feb83c272b68f763
  - update menu sequences

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

diff --git a/helpcontent2 b/helpcontent2
index bcbb41057636..be1839104c88 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit bcbb4105763653a71881bf2c18c275a686078511
+Subproject commit be1839104c885a769c6caf84feb83c272b68f763
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Seth Chaiklin (via logerrit)
 source/text/shared/01/01100200.xhp |3 +--
 source/text/shared/optionen/01040500.xhp   |4 ++--
 source/text/swriter/02/0425.xhp|2 +-
 source/text/swriter/guide/number_date_conv.xhp |6 +++---
 4 files changed, 7 insertions(+), 8 deletions(-)

New commits:
commit be1839104c885a769c6caf84feb83c272b68f763
Author: Seth Chaiklin 
AuthorDate: Tue Dec 1 23:46:59 2020 +0100
Commit: Seth Chaiklin 
CommitDate: Wed Dec 2 01:16:47 2020 +0100

update menu sequences

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

diff --git a/source/text/shared/01/01100200.xhp 
b/source/text/shared/01/01100200.xhp
index ee9f4819b..30c56e907 100644
--- a/source/text/shared/01/01100200.xhp
+++ b/source/text/shared/01/01100200.xhp
@@ -77,7 +77,6 @@
   Resets the editing time to zero, the 
creation date to the current date and time, and the version number to 1. The 
modification and printing dates are also deleted.
   Save preview image with this document
   Saves a thumbnail 
preview .png inside the document. This image may be used by a file manager 
under certain conditions.
-  If you want to disable generating thumbnails 
in general, then choose 
-Tools > Options > LibreOffice > Advanced. Click the 
Open Expert Configuration button, and search for 
GenerateThumbnail. If this property has the value 
true, then double-click on it to set its value to 
false.
+  If you want to disable generating thumbnails 
in general, then choose Tools - Options - LibreOffice - 
Advanced. Click the Open Expert Configuration 
button, and search for GenerateThumbnail. If this property has the 
value true, then double-click on it to set its value to 
false.
 
 
diff --git a/source/text/shared/optionen/01040500.xhp 
b/source/text/shared/optionen/01040500.xhp
index ed9739f20..5b6d9ca85 100644
--- a/source/text/shared/optionen/01040500.xhp
+++ b/source/text/shared/optionen/01040500.xhp
@@ -69,12 +69,12 @@
 
 Input in tables
 
+
 
 
-
 Number recognition
 
-Specifies that numbers 
entered into a table cell are recognized and formatted as numbers. 
Table cells in %PRODUCTNAME Writer can recognize a number when it is 
represented in one of the number formats available in categories of Numbers, 
Percent, Currency, Date, Time, Scientific, Fraction and Boolean.
+Specifies that numbers 
entered into a text table cell are recognized and formatted as numbers. 
Table cells in %PRODUCTNAME Writer can recognize a number when it is 
represented in one of the number formats available in categories of Numbers, 
Percent, Currency, Date, Time, Scientific, Fraction and Boolean.
 
 
 The 
recognized number is displayed with default number format for table cells, and 
sets the cell format to the recognized category. For example, if a number is 
recognized as Date, the cell format category is set to Date. You can set a 
specific number format for the cell, for example, a date entered as 8/3/2018 displays as Thursday March 8, 2018 when the cell 
number format is set to "Friday, December 31, 1999" in the Number Format 
dialog.
diff --git a/source/text/swriter/02/0425.xhp 
b/source/text/swriter/02/0425.xhp
index 85ae86961..93f835c9a 100644
--- a/source/text/swriter/02/0425.xhp
+++ b/source/text/swriter/02/0425.xhp
@@ -34,7 +34,7 @@
 Activates the sum function. Note that the cursor must be in 
the cell where you want the sum to appear.
 
 
-%PRODUCTNAME recognizes the cell range for the sum function as long as the 
cells are filled with numbers. Prior to entering the data, you must choose 
Table > Number Recognition to enable this 
feature.
+%PRODUCTNAME recognizes the cell range for the sum function as long as the 
cells are filled with numbers. Prior to entering the data, you must choose 
Table - Number Recognition to enable this 
feature.
 Click 
Apply to accept the sum formula as it appears in the entry 
line.
 
 
diff --git a/source/text/swriter/guide/number_date_conv.xhp 
b/source/text/swriter/guide/number_date_conv.xhp
index 710478b55..e69f6230d 100644
--- a/source/text/swriter/guide/number_date_conv.xhp
+++ b/source/text/swriter/guide/number_date_conv.xhp
@@ -35,18 +35,18 @@
 
 Turning Number Recognition On or Off in Tables
 
-  $[officename] can automatically recognize numbers or dates 
that you enter into a table cell, converting them from text to an appropriate 
number format. Use Table > Number Format to change the 
display of the entered value.
+  $[officename] can automatically recognize numbers or dates 
that you enter into a table cell, converting them from text to an appropriate 
number format. Use Table - Number Format to change the 
display of the entered value.
   
   To 
enable or disable this feature, do one of the following:
   
  
-Choose Table > Number 
Recognition.
+Choose Table - Number 
Recognition.

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

2020-12-01 Thread Eike Rathke (via logerrit)
 sal/rtl/math.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 49aff144c72a5258cf2ca392a0cfb7a31fb86819
Author: Eike Rathke 
AuthorDate: Tue Dec 1 19:08:26 2020 +0100
Commit: Eike Rathke 
CommitDate: Wed Dec 2 00:27:30 2020 +0100

Related: tdf#138360 Rounding integers to decimals is futile

Change-Id: Ica25747a26d6c2637c46808d1b73aeeed6e1df37
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107001
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx
index 1d6cb88327f9..10417742b3a2 100644
--- a/sal/rtl/math.cxx
+++ b/sal/rtl/math.cxx
@@ -1146,7 +1146,10 @@ double SAL_CALL rtl_math_round(double fValue, int 
nDecPlaces,
 
 // Rounding to decimals between integer distance precision (gaps) does not
 // make sense, do not even try to multiply/divide and introduce inaccuracy.
-if (nDecPlaces >= 0 && fValue >= (static_cast(1) << 52))
+// For same reasons, do not attempt to round integers to decimals.
+if (nDecPlaces >= 0
+&& (fValue >= (static_cast(1) << 52)
+|| isRepresentableInteger(fValue)))
 return bSign ? -fValue : fValue;
 
 double fFac = 0;
___
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' - external/python3

2020-12-01 Thread Tor Lillqvist (via logerrit)
 external/python3/macos-11.patch.0 |   20 
 1 file changed, 20 insertions(+)

New commits:
commit eacf5c8ff4548fa75d6d69083c16db9152ddffc6
Author: Tor Lillqvist 
AuthorDate: Tue Dec 1 21:36:05 2020 +0200
Commit: Tor Lillqvist 
CommitDate: Tue Dec 1 23:31:39 2020 +0100

Guard against sysconf(_SC_OPEN_MAX) returning LONG_MAX

That seems to happen in a sandboxed process on macOS, at least. This
caused an apparent hang when invoking Python, for instance simply
through Tools > Macros > Run Macro... .

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

diff --git a/external/python3/macos-11.patch.0 
b/external/python3/macos-11.patch.0
index d3dbbf605639..3a3da0e99bac 100644
--- a/external/python3/macos-11.patch.0
+++ b/external/python3/macos-11.patch.0
@@ -57,3 +57,23 @@
#else
  #error "unknown architecture for universal build."
#endif
+--- Modules/_posixsubprocess.c
 Modules/_posixsubprocess.c
+@@ -31,6 +31,8 @@
+ # define SYS_getdents64  __NR_getdents64
+ #endif
+ 
++#include 
++
+ #if defined(__sun) && defined(__SVR4)
+ /* readdir64 is used to work around Solaris 9 bug 6395699. */
+ # define readdir readdir64
+@@ -202,7 +202,7 @@
+ #endif
+ #ifdef _SC_OPEN_MAX
+ local_max_fd = sysconf(_SC_OPEN_MAX);
+-if (local_max_fd == -1)
++if (local_max_fd == -1 || local_max_fd == LONG_MAX)
+ #endif
+ local_max_fd = 256;  /* Matches legacy Lib/subprocess.py behavior. */
+ return local_max_fd;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Caolán McNamara (via logerrit)
 sw/uiconfig/swriter/ui/notebookbar.ui |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 462c79c9e9c9163bd9b7ce48e19c9c2f5d49333c
Author: Caolán McNamara 
AuthorDate: Tue Dec 1 14:32:49 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 21:17:26 2020 +0100

tab-fill used in widget that isn't a tab

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

diff --git a/sw/uiconfig/swriter/ui/notebookbar.ui 
b/sw/uiconfig/swriter/ui/notebookbar.ui
index 3a5e5b195fba..6b19befa7417 100644
--- a/sw/uiconfig/swriter/ui/notebookbar.ui
+++ b/sw/uiconfig/swriter/ui/notebookbar.ui
@@ -12485,7 +12485,6 @@
   
   
 8
-False
   
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread zeynepsninkaya (via logerrit)
 sw/source/uibase/inc/selglos.hxx   |6 ++
 sw/source/uibase/inc/splittbl.hxx  |6 ++
 sw/source/uibase/inc/wview.hxx |6 ++
 sw/source/uibase/table/tablepg.hxx |3 ---
 4 files changed, 6 insertions(+), 15 deletions(-)

New commits:
commit 3aaff1083a60010ad31342e029ce6e9b8ec62f9c
Author: zeynepsninkaya 
AuthorDate: Sat Nov 28 09:42:13 2020 +
Commit: Julien Nabet 
CommitDate: Tue Dec 1 20:58:51 2020 +0100

tdf#124176: Use pragma once instead of include guards

Change-Id: I0531950697f96c208eadc64732a200e27fd94741
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106801
Reviewed-by: Julien Nabet 
Tested-by: Jenkins

diff --git a/sw/source/uibase/inc/selglos.hxx b/sw/source/uibase/inc/selglos.hxx
index b31f61a54ef6..0109051a5f68 100644
--- a/sw/source/uibase/inc/selglos.hxx
+++ b/sw/source/uibase/inc/selglos.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_SELGLOS_HXX
-#define INCLUDED_SW_SOURCE_UIBASE_INC_SELGLOS_HXX
+
+#pragma once
 
 #include 
 
@@ -46,6 +46,4 @@ public:
 }
 };
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/inc/splittbl.hxx 
b/sw/source/uibase/inc/splittbl.hxx
index 4fc49e572e87..523632ef8045 100644
--- a/sw/source/uibase/inc/splittbl.hxx
+++ b/sw/source/uibase/inc/splittbl.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_SPLITTBL_HXX
-#define INCLUDED_SW_SOURCE_UIBASE_INC_SPLITTBL_HXX
+
+#pragma once
 
 #include 
 #include 
@@ -52,6 +52,4 @@ public:
 SplitTable_HeadlineOption GetSplitMode() const { return m_nSplit; }
 };
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/inc/wview.hxx b/sw/source/uibase/inc/wview.hxx
index 9ac5f79499c7..94c41551b600 100644
--- a/sw/source/uibase/inc/wview.hxx
+++ b/sw/source/uibase/inc/wview.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_WVIEW_HXX
-#define INCLUDED_SW_SOURCE_UIBASE_INC_WVIEW_HXX
+
+#pragma once
 
 #include 
 #include 
@@ -40,6 +40,4 @@ public:
 virtual ~SwWebView() override;
 };
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/table/tablepg.hxx 
b/sw/source/uibase/table/tablepg.hxx
index f038c8402541..4c1171dd72eb 100644
--- a/sw/source/uibase/table/tablepg.hxx
+++ b/sw/source/uibase/table/tablepg.hxx
@@ -16,7 +16,6 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-
 #pragma once
 
 #include 
@@ -183,6 +182,4 @@ public:
 voidDisablePageBreak();
 };
 
-
-
 /* 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: dbaccess/source

2020-12-01 Thread Julien Nabet (via logerrit)
 dbaccess/source/ui/browser/sbagrid.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 44f1ed1928d4d32b1a1962f413df69e2ae851789
Author: Julien Nabet 
AuthorDate: Mon Nov 30 07:49:02 2020 +0100
Commit: Julien Nabet 
CommitDate: Tue Dec 1 20:57:21 2020 +0100

Related tdf#54021: Fields in tablecontrols of a form could not be copied

See https://bugs.documentfoundation.org/show_bug.cgi?id=54021#c42
for more details.
Of course there's still the main pb to fix, moving columns

Change-Id: I2308efa47cbb9b80f278cf2644bb9cf24ab831e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106849
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/dbaccess/source/ui/browser/sbagrid.cxx 
b/dbaccess/source/ui/browser/sbagrid.cxx
index 92e93e5ed8d9..65b30505fbfc 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -1046,6 +1046,7 @@ void SbaGridControl::DoColumnDrag(sal_uInt16 nColumnPos)
 {
 Reference< XPropertySet >  xDataSource = getDataSource();
 OSL_ENSURE(xDataSource.is(), "SbaGridControl::DoColumnDrag : invalid data 
source !");
+::dbtools::ensureRowSetConnection(Reference< XRowSet 
>(getDataSource(),UNO_QUERY), getContext(), nullptr);
 
 Reference< XPropertySet > xAffectedCol;
 Reference< XPropertySet > xAffectedField;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - hardened_runtime.xcent.in

2020-12-01 Thread Tor Lillqvist (via logerrit)
 hardened_runtime.xcent.in |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6edd9b477d0653596b200590e750edbd9aa47c62
Author: Tor Lillqvist 
AuthorDate: Wed Sep 23 10:34:40 2020 +0300
Commit: Tor Lillqvist 
CommitDate: Tue Dec 1 20:52:28 2020 +0100

tdf#135479: Seems we need the more broad entitlement for Java's sake

Sad, but OK.

This reverts part of 2c366aae9263dc4115b054fe74b90cabea61fa0b.

Change-Id: I6b74c871e3ec2408f833a5e2b652fd19cb7a2c0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103230
Tested-by: Tor Lillqvist 
Reviewed-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106994
Reviewed-by: Christian Lohmaier 
Tested-by: Jenkins

diff --git a/hardened_runtime.xcent.in b/hardened_runtime.xcent.in
index 2bbcda34f18c..d270c93ec694 100644
--- a/hardened_runtime.xcent.in
+++ b/hardened_runtime.xcent.in
@@ -6,7 +6,7 @@
 com.apple.security.automation.apple-events
 
 
-com.apple.security.cs.allow-jit
+com.apple.security.cs.disable-executable-page-protection
 
 
 com.apple.security.cs.disable-library-validation
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Caolán McNamara (via logerrit)
 sc/source/core/tool/inputopt.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 1196e7fd0b1cff41242bebf99890c56069782107
Author: Caolán McNamara 
AuthorDate: Tue Dec 1 10:14:19 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 20:39:29 2020 +0100

cid#1470370 Uninitialized scalar field

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

diff --git a/sc/source/core/tool/inputopt.cxx b/sc/source/core/tool/inputopt.cxx
index d54ab975b14c..119c7a74c738 100644
--- a/sc/source/core/tool/inputopt.cxx
+++ b/sc/source/core/tool/inputopt.cxx
@@ -49,6 +49,7 @@ void ScInputOptions::SetDefaults()
 bTextWysiwyg= false;
 bReplCellsWarn  = true;
 bLegacyCellSelection = false;
+bEnterPasteMode = false;
 }
 
 //  Config Item containing input options
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Caolán McNamara (via logerrit)
 sw/source/core/unocore/unoobj2.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 4b7ef8a9755e9e7b6876d64ae7888d9c3c3308ff
Author: Caolán McNamara 
AuthorDate: Tue Dec 1 14:17:07 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 20:37:44 2020 +0100

cid#1470356 silence Dereference null return value

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

diff --git a/sw/source/core/unocore/unoobj2.cxx 
b/sw/source/core/unocore/unoobj2.cxx
index a2b98d41d307..4852fcca9662 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -810,14 +810,14 @@ void SwXTextRange::DeleteAndInsert(
 
 if (RANGE_IS_SECTION == m_pImpl->m_eRangePosition)
 {
-if (!m_pImpl->m_pTableOrSectionFormat)
+SwSectionFormat const* pFormat(
+static_cast(m_pImpl->m_pTableOrSectionFormat));
+if (!pFormat)
 {
 throw uno::RuntimeException("disposed?");
 }
 m_pImpl->m_rDoc.GetIDocumentUndoRedo().StartUndo(SwUndoId::INSERT, 
nullptr);
-SwSectionFormat const& rFormat(
-*static_cast(m_pImpl->m_pTableOrSectionFormat));
-SwNodeIndex const start(*rFormat.GetSectionNode());
+SwNodeIndex const start(*pFormat->GetSectionNode());
 SwNodeIndex const end(*start.GetNode().EndOfSectionNode());
 
 // delete tables at start
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Caolán McNamara (via logerrit)
 include/xmloff/xmlimp.hxx |3 ++-
 writerfilter/source/dmapper/FontTable.cxx |3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 01e75b9b5c4459a5a8fbc86cd37635161efa093d
Author: Caolán McNamara 
AuthorDate: Tue Dec 1 14:09:25 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 20:36:01 2020 +0100

cid#1401328 Uncaught exception

and

cid#1401334 Uncaught exception

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

diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index 73f35b90f631..674a535c5d7f 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -245,7 +246,7 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public 
cppu::WeakImplHelper<
 
 // tdf#69060 & tdf#137643 import embedded fonts and activate them in a
 // batch in EmbeddedFontsHelper's dtor
-std::unique_ptr mxEmbeddedFontHelper;
+std::unique_ptr> mxEmbeddedFontHelper;
 
 protected:
 boolmbIsFormsSupported;
diff --git a/writerfilter/source/dmapper/FontTable.cxx 
b/writerfilter/source/dmapper/FontTable.cxx
index c98177db5959..2dd7b3d91221 100644
--- a/writerfilter/source/dmapper/FontTable.cxx
+++ b/writerfilter/source/dmapper/FontTable.cxx
@@ -18,6 +18,7 @@
  */
 
 #include "FontTable.hxx"
+#include 
 #include 
 #include 
 #include 
@@ -32,7 +33,7 @@ namespace writerfilter::dmapper
 
 struct FontTable_Impl
 {
-std::unique_ptr xEmbeddedFontHelper;
+std::unique_ptr> xEmbeddedFontHelper;
 std::vector< FontEntry::Pointer_t > aFontEntries;
 FontEntry::Pointer_t pCurrentEntry;
 FontTable_Impl() {}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

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

New commits:
commit 52a69f41e992efa2abc2e2e94414a2547df71329
Author: Caolán McNamara 
AuthorDate: Tue Dec 1 14:13:50 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 20:34:49 2020 +0100

cid#1470368 Unchecked dynamic_cast

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

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


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

2020-12-01 Thread Michael Stahl (via logerrit)
 sw/source/core/doc/docbm.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 8ea3a9230e8975a5ec5516c6c59a1f69f1160b20
Author: Michael Stahl 
AuthorDate: Thu Nov 26 19:55:27 2020 +0100
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 20:33:44 2020 +0100

sw_fieldmarkhide: fix getFieldMarkFor() to return innermost field

... like it's supposed to; if it finds the outer field and then the next
field is inside but ends *before* the rPos then the loop is erroneously
terminated.

Change-Id: Ic5e469d1c05cecd7feca275dc1689af2c40567f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106710
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 6a11f94ab366e1d736e97e31e908e86aa5d8b533)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106689
(cherry picked from commit fd596591b385a8b03459a7dd3f79e65a59f530f4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106939
Reviewed-by: Caolán McNamara 

diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index c76e4417c020..fb8206e61d21 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -1383,10 +1383,11 @@ namespace sw::mark
 return nullptr;
 auto pFieldmark(*itFieldmark);
 for ( ; itFieldmark != m_vFieldmarks.end()
-&& (**itFieldmark).IsCoveringPosition(rPos); ++itFieldmark)
+&& (**itFieldmark).GetMarkStart() <= rPos; ++itFieldmark)
 {   // find the innermost fieldmark
-if (pFieldmark->GetMarkStart() < (**itFieldmark).GetMarkStart()
-|| (**itFieldmark).GetMarkEnd() < pFieldmark->GetMarkEnd())
+if (rPos < (**itFieldmark).GetMarkEnd()
+&& (pFieldmark->GetMarkStart() < (**itFieldmark).GetMarkStart()
+|| (**itFieldmark).GetMarkEnd() < 
pFieldmark->GetMarkEnd()))
 {
 pFieldmark = *itFieldmark;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Caolán McNamara (via logerrit)
 basic/source/comp/buffer.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit c9eed223e212fb26c6399f679091f0511baf5c8e
Author: Caolán McNamara 
AuthorDate: Tue Dec 1 13:35:51 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 20:32:36 2020 +0100

cid#1470374 silence Stray semicolon

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

diff --git a/basic/source/comp/buffer.cxx b/basic/source/comp/buffer.cxx
index 3d0880f7c678..ca7af7dd4090 100644
--- a/basic/source/comp/buffer.cxx
+++ b/basic/source/comp/buffer.cxx
@@ -26,6 +26,7 @@ const sal_uInt32 UP_LIMIT=0xFF00;
 template  void write(I it, T n)
 {
 *it = static_cast(n & 0xFF);
+// coverity[stray_semicolon : FALSE] - coverity parse error
 if constexpr (sizeof(n) > 1)
 {
 for (std::size_t i = 1; i < sizeof(n); ++i)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Miklos Vajna (via logerrit)
 svx/qa/unit/unodraw.cxx|   26 ++
 svx/source/unodraw/unoprov.cxx |1 +
 2 files changed, 27 insertions(+)

New commits:
commit 55d4c6cfe5bd9b737698c6cd1f28ee8234abb5d0
Author: Miklos Vajna 
AuthorDate: Tue Dec 1 15:16:13 2020 +0100
Commit: Miklos Vajna 
CommitDate: Tue Dec 1 20:25:00 2020 +0100

tdf#129961 svx: add UNO API for table shadow as direct format

Adding it via a style was working already.

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

diff --git a/svx/qa/unit/unodraw.cxx b/svx/qa/unit/unodraw.cxx
index a835dee951bd..51b1c8b43847 100644
--- a/svx/qa/unit/unodraw.cxx
+++ b/svx/qa/unit/unodraw.cxx
@@ -107,6 +107,32 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testTdf93998)
 xModelProps->getPropertyValue("Graphic") >>= xGraphic;
 CPPUNIT_ASSERT(xGraphic.is());
 }
+
+CPPUNIT_TEST_FIXTURE(UnodrawTest, testTableShadowDirect)
+{
+// Create an Impress document an insert a table shape.
+mxComponent = loadFromDesktop("private:factory/simpress",
+  
"com.sun.star.presentation.PresentationDocument");
+uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xShape(
+xFactory->createInstance("com.sun.star.drawing.TableShape"), 
uno::UNO_QUERY);
+xShape->setPosition(awt::Point(1000, 1000));
+xShape->setSize(awt::Size(1, 1));
+uno::Reference xSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xDrawPages = xSupplier->getDrawPages();
+uno::Reference xDrawPage(xDrawPages->getByIndex(0), 
uno::UNO_QUERY);
+xDrawPage->add(xShape);
+
+// Create a red shadow on it without touching its style.
+uno::Reference xShapeProps(xShape, uno::UNO_QUERY);
+// Without the accompanying fix in place, this test would have failed with 
throwing a
+// beans.UnknownPropertyException, as shadow-as-direct-formatting on 
tables were not possible.
+xShapeProps->setPropertyValue("Shadow", uno::makeAny(true));
+sal_Int32 nRed = 0xff;
+xShapeProps->setPropertyValue("ShadowColor", uno::makeAny(nRed));
+CPPUNIT_ASSERT(xShapeProps->getPropertyValue("ShadowColor") >>= nRed);
+CPPUNIT_ASSERT_EQUAL(static_cast(0xff), nRed);
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index 9b4cb8e43a53..f51cfa2cee73 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -739,6 +739,7 @@ static SfxItemPropertyMapEntry const * 
ImplGetSvxTableShapePropertyMap()
 {
 static SfxItemPropertyMapEntry const  aTableShapePropertyMap_Impl[] =
 {
+SHADOW_PROPERTIES
 { u"" UNO_NAME_MISC_OBJ_ZORDER,   OWN_ATTR_ZORDER, 
cppu::UnoType::get(), 0, 0},
 { u"" UNO_NAME_MISC_OBJ_LAYERID,  SDRATTR_LAYERID, 
cppu::UnoType::get(), 0,0},
 { u"" UNO_NAME_MISC_OBJ_LAYERNAME,SDRATTR_LAYERNAME, 
cppu::UnoType::get(), 0, 0},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Michael Stahl (via logerrit)
 sw/source/core/text/redlnitr.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit dee22364c5b9583dc8091b827c1af60bab6737e0
Author: Michael Stahl 
AuthorDate: Tue Dec 1 11:21:28 2020 +0100
Commit: Michael Stahl 
CommitDate: Tue Dec 1 19:28:37 2020 +0100

sw_fieldmarkhide: CID#1470358: Null pointer dereferences

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

diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index 3a6a2749f8a4..b27f03ead354 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -598,7 +598,8 @@ void SwAttrIter::CtorInitAttrIter(SwTextNode & rTextNode,
 // TODO this is true initially but after delete ops it may be false... 
need to delete m_pMerged somewhere?
 // assert(SwRedlineTable::npos != nRedlPos);
 // false now with fieldmarks
-assert(pRootFrame->GetFieldmarkMode() != sw::FieldmarkMode::ShowBoth
+assert(!pRootFrame
+|| pRootFrame->GetFieldmarkMode() != sw::FieldmarkMode::ShowBoth
 || SwRedlineTable::npos != nRedlPos || 
m_pMergedPara->extents.size() <= 1);
 }
 if (!(pExtInp || m_pMergedPara || SwRedlineTable::npos != nRedlPos))
___
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

2020-12-01 Thread Szymon Kłos (via logerrit)
 sc/source/ui/attrdlg/scdlgfact.cxx |   10 +
 sc/source/ui/attrdlg/scdlgfact.hxx |6 -
 sc/source/ui/view/cellsh1.cxx  |  200 -
 3 files changed, 126 insertions(+), 90 deletions(-)

New commits:
commit a5b021561545bdda65c8233e541c2090a0243f74
Author: Szymon Kłos 
AuthorDate: Mon Nov 30 05:55:55 2020 +0100
Commit: Szymon Kłos 
CommitDate: Tue Dec 1 18:54:01 2020 +0100

Make Pivot table db & external source dialogs async

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

diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx 
b/sc/source/ui/attrdlg/scdlgfact.cxx
index cb9d07c008ad..b5629728d356 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -105,6 +105,11 @@ short AbstractScDataPilotDatabaseDlg_Impl::Execute()
 return m_xDlg->run();
 }
 
+bool AbstractScDataPilotDatabaseDlg_Impl::StartExecuteAsync(AsyncContext &rCtx)
+{
+return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+}
+
 short AbstractScDataPilotSourceTypeDlg_Impl::Execute()
 {
 return m_xDlg->run();
@@ -120,6 +125,11 @@ short AbstractScDataPilotServiceDlg_Impl::Execute()
 return m_xDlg->run();
 }
 
+bool 
AbstractScDataPilotServiceDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext
 &rCtx)
+{
+return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+}
+
 short AbstractScDeleteCellDlg_Impl::Execute()
 {
 return m_xDlg->run();
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx 
b/sc/source/ui/attrdlg/scdlgfact.hxx
index 582d189ef4c0..91f6040b7842 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -165,13 +165,14 @@ public:
 
 class AbstractScDataPilotDatabaseDlg_Impl  :public 
AbstractScDataPilotDatabaseDlg
 {
-std::unique_ptr m_xDlg;
+std::shared_ptr m_xDlg;
 public:
 explicit 
AbstractScDataPilotDatabaseDlg_Impl(std::unique_ptr p)
 : m_xDlg(std::move(p))
 {
 }
 virtual short Execute() override;
+virtual bool StartExecuteAsync(AsyncContext &) override;
 virtual void GetValues( ScImportSourceDesc& rDesc ) override;
 
 // screenshotting
@@ -202,13 +203,14 @@ public:
 
 class AbstractScDataPilotServiceDlg_Impl : public AbstractScDataPilotServiceDlg
 {
-std::unique_ptr m_xDlg;
+std::shared_ptr m_xDlg;
 public:
 explicit 
AbstractScDataPilotServiceDlg_Impl(std::unique_ptr p)
 : m_xDlg(std::move(p))
 {
 }
 virtual short Execute() override;
+virtual bool StartExecuteAsync(AsyncContext &) override;
 virtual OUString  GetServiceName() const override;
 virtual OUString  GetParSource() const override;
 virtual OUString  GetParName() const override;
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index f5d8a0ab17ea..26ef479f914f 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2852,124 +2852,148 @@ void ScCellShell::ExecuteDataPilotDialog()
 
 pTypeDlg->StartExecuteAsync([this, pTypeDlg, pTabViewShell,
 pScMod, pFact, pDoc, &rMark, aDestPos](int 
nResult) mutable {
-const char* pSrcErrorId = nullptr;
-std::unique_ptr pNewDPObject;
-
 if (nResult == RET_OK )
 {
 if ( pTypeDlg->IsExternal() )
 {
 std::vector aSources = 
ScDPObject::GetRegisteredSources();
-ScopedVclPtr pServDlg(
+VclPtr pServDlg(
 pFact->CreateScDataPilotServiceDlg(
 pTabViewShell->GetFrameWeld(), aSources));
 
-if ( pServDlg->Execute() == RET_OK )
-{
-ScDPServiceDesc aServDesc(
-pServDlg->GetServiceName(),
-pServDlg->GetParSource(),
-pServDlg->GetParName(),
-pServDlg->GetParUser(),
-pServDlg->GetParPass() );
-pNewDPObject.reset(new ScDPObject(pDoc));
-pNewDPObject->SetServiceData( aServDesc );
-}
+pServDlg->StartExecuteAsync([pServDlg, pScMod, 
pTabViewShell,
+ aDestPos, pDoc](int nResult2) 
mutable {
+if ( nResult2 == RET_OK )
+{
+ScDPServiceDesc aServDesc(
+pServDlg->GetServiceName(),
+pServDlg->GetParSource(),
+pServDlg->GetParName(),
+pServDlg->GetParUser(),
+pServDlg->Ge

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

2020-12-01 Thread Caolán McNamara (via logerrit)
 sax/source/fastparser/fastparser.cxx|   28 ++--
 sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx |2 
 2 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit ebe25a18c4d2aa3fc5e1c8c57f14d71ce50cb15c
Author: Caolán McNamara 
AuthorDate: Tue Dec 1 13:16:16 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 18:17:14 2020 +0100

cid#1470375 Unrecoverable parse warning

and

cid#1470366 Unrecoverable parse warning
cid#1470365 Unrecoverable parse warning
cid#1470361 Unrecoverable parse warning
cid#1470360 Unrecoverable parse warning
cid#1470367 Unrecoverable parse warning

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

diff --git a/sax/source/fastparser/fastparser.cxx 
b/sax/source/fastparser/fastparser.cxx
index 79ac533f72b6..662991ff91ba 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -1495,20 +1495,20 @@ static void NormalizeURI( OUString& rName )
 bSuccess = NormalizeW3URI( rName );
 }
 
-const OUStringLiteral XML_URI_W3_PREFIX(u"http://www.w3.org/";);
-const OUStringLiteral XML_URI_XFORMS_SUFFIX(u"/xforms");
-const OUStringLiteral XML_N_XFORMS_1_0(u"http://www.w3.org/2002/xforms";);
-const OUStringLiteral XML_N_SVG(u"http://www.w3.org/2000/svg";);
-const OUStringLiteral 
XML_N_SVG_COMPAT(u"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0");
-const OUStringLiteral XML_N_FO(u"http://www.w3.org/1999/XSL/Format";);
-const OUStringLiteral 
XML_N_FO_COMPAT(u"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0");
-const OUStringLiteral XML_N_SMIL(u"http://www.w3.org/2001/SMIL20/";);
-const OUStringLiteral XML_N_SMIL_OLD(u"http://www.w3.org/2001/SMIL20";);
-const OUStringLiteral 
XML_N_SMIL_COMPAT(u"urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0");
-const OUStringLiteral XML_URN_OASIS_NAMES_TC(u"urn:oasis:names:tc");
-const OUStringLiteral XML_XMLNS(u"xmlns");
-const OUStringLiteral XML_OPENDOCUMENT(u"opendocument");
-const OUStringLiteral XML_1_0(u"1.0");
+constexpr OUStringLiteral XML_URI_W3_PREFIX(u"http://www.w3.org/";);
+constexpr OUStringLiteral XML_URI_XFORMS_SUFFIX(u"/xforms");
+constexpr OUStringLiteral XML_N_XFORMS_1_0(u"http://www.w3.org/2002/xforms";);
+constexpr OUStringLiteral XML_N_SVG(u"http://www.w3.org/2000/svg";);
+constexpr OUStringLiteral 
XML_N_SVG_COMPAT(u"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0");
+constexpr OUStringLiteral XML_N_FO(u"http://www.w3.org/1999/XSL/Format";);
+constexpr OUStringLiteral 
XML_N_FO_COMPAT(u"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0");
+constexpr OUStringLiteral XML_N_SMIL(u"http://www.w3.org/2001/SMIL20/";);
+constexpr OUStringLiteral XML_N_SMIL_OLD(u"http://www.w3.org/2001/SMIL20";);
+constexpr OUStringLiteral 
XML_N_SMIL_COMPAT(u"urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0");
+constexpr OUStringLiteral XML_URN_OASIS_NAMES_TC(u"urn:oasis:names:tc");
+constexpr OUStringLiteral XML_XMLNS(u"xmlns");
+constexpr OUStringLiteral XML_OPENDOCUMENT(u"opendocument");
+constexpr OUStringLiteral XML_1_0(u"1.0");
 
 static bool NormalizeW3URI( OUString& rName )
 {
diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx 
b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
index b48af4241a9b..f2e0155b578b 100644
--- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
@@ -49,7 +49,7 @@ const char* lclAnovaLabels[] =
 nullptr
 };
 
-const OUStringLiteral strWildcardRange = u"%RANGE%";
+constexpr OUStringLiteral strWildcardRange = u"%RANGE%";
 
 OUString lclCreateMultiParameterFormula(
 ScRangeList&aRangeList, const OUString& aFormulaTemplate,
___
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' - xmlsecurity/qa xmlsecurity/source

2020-12-01 Thread Miklos Vajna (via logerrit)
 xmlsecurity/qa/unit/pdfsigning/data/bad-cert-p3-stamp.pdf |binary
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |   18 
 xmlsecurity/source/pdfio/pdfdocument.cxx  |   63 --
 3 files changed, 76 insertions(+), 5 deletions(-)

New commits:
commit 91a39edbbd353326bd2cd37ea93be9f27d533ea5
Author: Miklos Vajna 
AuthorDate: Wed Nov 4 21:39:04 2020 +0100
Commit: Miklos Vajna 
CommitDate: Tue Dec 1 18:06:31 2020 +0100

xmlsecurity: reject a few dangerous annotation types during pdf sig verify

(cherry picked from commit f231dacde9df1c4aa5f4e0970535c4f4093364a7)

Conflicts:
include/vcl/filter/PDFiumLibrary.hxx
xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
xmlsecurity/source/helper/pdfsignaturehelper.cxx
xmlsecurity/source/pdfio/pdfdocument.cxx

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

diff --git a/xmlsecurity/qa/unit/pdfsigning/data/bad-cert-p3-stamp.pdf 
b/xmlsecurity/qa/unit/pdfsigning/data/bad-cert-p3-stamp.pdf
new file mode 100644
index ..b30f5b03867c
Binary files /dev/null and 
b/xmlsecurity/qa/unit/pdfsigning/data/bad-cert-p3-stamp.pdf differ
diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx 
b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index 60dcd0fc7544..05a91714ff09 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -78,6 +78,7 @@ public:
 void testPartial();
 void testPartialInBetween();
 void testBadCertP1();
+void testBadCertP3Stamp();
 /// Test writing a PAdES signature.
 void testSigningCertificateAttribute();
 /// Test that we accept files which are supposed to be good.
@@ -101,6 +102,7 @@ public:
 CPPUNIT_TEST(testPartial);
 CPPUNIT_TEST(testPartialInBetween);
 CPPUNIT_TEST(testBadCertP1);
+CPPUNIT_TEST(testBadCertP3Stamp);
 CPPUNIT_TEST(testSigningCertificateAttribute);
 CPPUNIT_TEST(testGood);
 CPPUNIT_TEST(testTokenize);
@@ -456,6 +458,22 @@ void PDFSigningTest::testBadCertP1()
  rInformation.nStatus);
 }
 
+void PDFSigningTest::testBadCertP3Stamp()
+{
+std::vector aInfos
+= verify(m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"bad-cert-p3-stamp.pdf", 1,
+ /*rExpectedSubFilter=*/OString());
+CPPUNIT_ASSERT(!aInfos.empty());
+SignatureInformation& rInformation = aInfos[0];
+
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 0 (SecurityOperationStatus_UNKNOWN)
+// - Actual  : 1 (SecurityOperationStatus_OPERATION_SUCCEEDED)
+// i.e. adding a stamp annotation was not considered as a bad modification.
+
CPPUNIT_ASSERT_EQUAL(xml::crypto::SecurityOperationStatus::SecurityOperationStatus_UNKNOWN,
+ rInformation.nStatus);
+}
+
 void PDFSigningTest::testSigningCertificateAttribute()
 {
 // Create a new signature.
diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx 
b/xmlsecurity/source/pdfio/pdfdocument.cxx
index 3cedf7b62273..047141b731be 100644
--- a/xmlsecurity/source/pdfio/pdfdocument.cxx
+++ b/xmlsecurity/source/pdfio/pdfdocument.cxx
@@ -24,6 +24,11 @@
 #include 
 #include 
 #include 
+#include 
+
+#if HAVE_FEATURE_PDFIUM
+#include 
+#endif
 
 using namespace com::sun::star;
 
@@ -138,8 +143,29 @@ bool IsCompleteSignature(SvStream& rStream, 
vcl::filter::PDFDocument& rDocument,
 return std::find(rAllEOFs.begin(), rAllEOFs.end(), nFileEnd) != 
rAllEOFs.end();
 }
 
+/**
+ * Contains checksums of a PDF page, which is rendered without annotations. It 
also contains
+ * the geometry of a few dangerous annotation types.
+ */
+struct PageChecksum
+{
+BitmapChecksum m_nPageContent;
+std::vector m_aAnnotations;
+bool operator==(const PageChecksum& rChecksum) const;
+};
+
+bool PageChecksum::operator==(const PageChecksum& rChecksum) const
+{
+if (m_nPageContent != rChecksum.m_nPageContent)
+{
+return false;
+}
+
+return m_aAnnotations == rChecksum.m_aAnnotations;
+}
+
 /// Collects the checksum of each page of one version of the PDF.
-void AnalyizeSignatureStream(SvMemoryStream& rStream, 
std::vector& rPageChecksums,
+void AnalyizeSignatureStream(SvMemoryStream& rStream, 
std::vector& rPageChecksums,
  int nMDPPerm)
 {
 #if HAVE_FEATURE_PDFIUM
@@ -156,8 +182,35 @@ void AnalyizeSignatureStream(SvMemoryStream& rStream, 
std::vectorgetChecksum(nMDPPerm);
-rPageChecksums.push_back(nPageChecksum);
+PageChecksum aPageChecksum;
+aPageChecksum.m_nPageContent = pPdfPage->getChecksum(nMDPPerm);
+for (int i = 0; i < FPDFPage_GetAnnotCount(pPdfPage->getPointer()); 
++i)
+{
+FPDF_ANNOTATION pAnnotation = 
FPDFPage_GetAnnot(pPdfPage->getPointe

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

2020-12-01 Thread Noel (via logerrit)
 xmloff/source/text/XMLIndexTOCContext.cxx |   41 ++
 xmloff/source/text/XMLIndexTOCContext.hxx |5 ++-
 2 files changed, 23 insertions(+), 23 deletions(-)

New commits:
commit cebf5e827bcda80093bd02f62967dd205e9204e5
Author: Noel 
AuthorDate: Tue Dec 1 10:33:07 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Dec 1 18:00:58 2020 +0100

fastparser in XMLIndexTOCContext

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

diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx 
b/xmloff/source/text/XMLIndexTOCContext.cxx
index 3c05f623d23a..829bf0a74c45 100644
--- a/xmloff/source/text/XMLIndexTOCContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCContext.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include "XMLIndexTOCSourceContext.hxx"
 #include "XMLIndexObjectSourceContext.hxx"
 #include "XMLIndexAlphabeticalSourceContext.hxx"
@@ -117,8 +118,9 @@ XMLIndexTOCContext::~XMLIndexTOCContext()
 {
 }
 
-void XMLIndexTOCContext::StartElement(
-const Reference & xAttrList)
+void XMLIndexTOCContext::startFastElement(
+sal_Int32 /*nElement*/,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
 if (!bValid)
 return;
@@ -126,44 +128,41 @@ void XMLIndexTOCContext::StartElement(
 // find text:style-name attribute and set section style
 // find text:protected and set value
 // find text:name and set value (if not empty)
-sal_Int16 nCount = xAttrList->getLength();
 bool bProtected = false;
 OUString sIndexName;
 OUString sXmlId;
 XMLPropStyleContext* pStyle(nullptr);
-for(sal_Int16 nAttr = 0; nAttr < nCount; nAttr++)
+for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
 {
-OUString sLocalName;
-sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
-GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
-  &sLocalName );
-if ( XML_NAMESPACE_TEXT == nPrefix)
+switch(aIter.getToken())
 {
-if ( IsXMLToken( sLocalName, XML_STYLE_NAME ) )
+case XML_ELEMENT(TEXT, XML_STYLE_NAME):
 {
 pStyle = GetImport().GetTextImport()->FindSectionStyle(
-xAttrList->getValueByIndex(nAttr));
+aIter.toString());
+break;
 }
-else if ( IsXMLToken( sLocalName, XML_PROTECTED ) )
+case XML_ELEMENT(TEXT, XML_PROTECTED):
 {
 bool bTmp(false);
-if (::sax::Converter::convertBool(
- bTmp, xAttrList->getValueByIndex(nAttr)))
+if (::sax::Converter::convertBool(bTmp, aIter.toString()))
 {
 bProtected = bTmp;
 }
+break;
 }
-else if ( IsXMLToken( sLocalName, XML_NAME ) )
+case XML_ELEMENT(TEXT, XML_NAME):
 {
-sIndexName = xAttrList->getValueByIndex(nAttr);
+sIndexName = aIter.toString();
+break;
 }
-}
-else if ( XML_NAMESPACE_XML == nPrefix)
-{
-if ( IsXMLToken( sLocalName, XML_ID ) )
+case XML_ELEMENT(XML, XML_ID):
 {
-sXmlId = xAttrList->getValueByIndex(nAttr);
+sXmlId = aIter.toString();
+break;
 }
+default:
+XMLOFF_WARN_UNKNOWN("xmloff", aIter);
 }
 }
 
diff --git a/xmloff/source/text/XMLIndexTOCContext.hxx 
b/xmloff/source/text/XMLIndexTOCContext.hxx
index b67381ca8ef1..b179d35013a9 100644
--- a/xmloff/source/text/XMLIndexTOCContext.hxx
+++ b/xmloff/source/text/XMLIndexTOCContext.hxx
@@ -72,8 +72,9 @@ public:
 
 virtual ~XMLIndexTOCContext() override;
 
-virtual void StartElement(
-const css::uno::Reference & xAttrList) 
override;
+virtual void SAL_CALL startFastElement(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& 
xAttrList ) override;
 
 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Noel (via logerrit)
 xmloff/source/text/XMLIndexTOCStylesContext.cxx |   18 +++---
 xmloff/source/text/XMLIndexTOCStylesContext.hxx |5 +++--
 2 files changed, 10 insertions(+), 13 deletions(-)

New commits:
commit 22382bd480d40338207d5cb02787a37a72b95299
Author: Noel 
AuthorDate: Tue Dec 1 10:30:06 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Dec 1 18:00:29 2020 +0100

fastparser in XMLIndexTOCStylesContext

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

diff --git a/xmloff/source/text/XMLIndexTOCStylesContext.cxx 
b/xmloff/source/text/XMLIndexTOCStylesContext.cxx
index d761027b57af..830369240e7c 100644
--- a/xmloff/source/text/XMLIndexTOCStylesContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCStylesContext.cxx
@@ -54,29 +54,25 @@ XMLIndexTOCStylesContext::~XMLIndexTOCStylesContext()
 {
 }
 
-void XMLIndexTOCStylesContext::StartElement(
-const Reference & xAttrList )
+void XMLIndexTOCStylesContext::startFastElement(
+sal_Int32 /*nElement*/,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
 // find text:outline-level attribute
-sal_Int16 nCount = xAttrList->getLength();
-for(sal_Int16 nAttr = 0; nAttr < nCount; nAttr++)
+for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
 {
-OUString sLocalName;
-sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
-GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
-  &sLocalName );
-if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- (IsXMLToken(sLocalName, XML_OUTLINE_LEVEL)) )
+if ( aIter.getToken() == XML_ELEMENT(TEXT, XML_OUTLINE_LEVEL) )
 {
 sal_Int32 nTmp;
 if (::sax::Converter::convertNumber(
-nTmp, xAttrList->getValueByIndex(nAttr), 1,
+nTmp, aIter.toString(), 1,
 GetImport().GetTextImport()->GetChapterNumbering()->
 getCount()))
 {
 // API numbers 0..9, we number 1..10
 nOutlineLevel = nTmp-1;
 }
+break;
 }
 }
 }
diff --git a/xmloff/source/text/XMLIndexTOCStylesContext.hxx 
b/xmloff/source/text/XMLIndexTOCStylesContext.hxx
index bf18d7e64d71..fe588b933112 100644
--- a/xmloff/source/text/XMLIndexTOCStylesContext.hxx
+++ b/xmloff/source/text/XMLIndexTOCStylesContext.hxx
@@ -60,8 +60,9 @@ public:
 
 protected:
 
-virtual void StartElement(
-const css::uno::Reference & xAttrList) 
override;
+virtual void SAL_CALL startFastElement(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& 
xAttrList ) override;
 
 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Noel (via logerrit)
 xmloff/source/text/XMLIndexTemplateContext.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit bb5cf02fd2cdc8a2821361a05b8c96cf34a8be5b
Author: Noel 
AuthorDate: Tue Dec 1 10:28:21 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Dec 1 18:00:03 2020 +0100

fastparser in XMLIndexTemplateContext

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

diff --git a/xmloff/source/text/XMLIndexTemplateContext.cxx 
b/xmloff/source/text/XMLIndexTemplateContext.cxx
index 32e2ad5b4e27..36710b0eab2b 100644
--- a/xmloff/source/text/XMLIndexTemplateContext.cxx
+++ b/xmloff/source/text/XMLIndexTemplateContext.cxx
@@ -102,14 +102,13 @@ void XMLIndexTemplateContext::startFastElement(
 // process two attributes: style-name, outline-level
 for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
 {
-if (aIter.getToken() == XML_ELEMENT(TEXT, XML_STYLE_NAME) )
+if(aIter.getToken() == XML_ELEMENT(TEXT, XML_STYLE_NAME))
 {
 // style name
 sStyleName = aIter.toString();
 bStyleNameOK = true;
 }
-else if (eOutlineLevelAttrName != XML_TOKEN_INVALID &&
- aIter.getToken()  == XML_ELEMENT(TEXT, eOutlineLevelAttrName))
+else if (aIter.getToken() == XML_ELEMENT(TEXT, eOutlineLevelAttrName))
 {
 // we have an attr name! Then see if we have the attr, too.
 // outline level
___
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/source

2020-12-01 Thread Szymon Kłos (via logerrit)
 vcl/source/window/builder.cxx |   30 --
 1 file changed, 20 insertions(+), 10 deletions(-)

New commits:
commit 662245e653c3c8f7f1342be065ff332a34e90d8b
Author: Szymon Kłos 
AuthorDate: Wed Nov 25 13:39:28 2020 +0100
Commit: Szymon Kłos 
CommitDate: Tue Dec 1 17:57:15 2020 +0100

jsdialog: enable Pivot Table dialogs

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

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index d141dace9e98..46d1cae2583f 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -153,17 +153,27 @@ weld::Builder* Application::CreateBuilder(weld::Widget* 
pParent, const OUString
 {
 bool bUseJSBuilder = false;
 
-if (bMobile)
-{
-if (rUIFile == "modules/swriter/ui/wordcount-mobile.ui" ||
-rUIFile == "svx/ui/findreplacedialog-mobile.ui" ||
-rUIFile == "modules/swriter/ui/watermarkdialog.ui" ||
-rUIFile == "modules/scalc/ui/validationdialog.ui" ||
-rUIFile == "modules/scalc/ui/validationcriteriapage.ui" ||
-rUIFile == "modules/scalc/ui/validationhelptabpage-mobile.ui" ||
-rUIFile == "modules/scalc/ui/erroralerttabpage-mobile.ui" ||
-rUIFile == "modules/scalc/ui/validationdialog.ui")
+if (comphelper::LibreOfficeKit::isActive())
+{
+if (bMobile)
+{
+if (rUIFile == "modules/swriter/ui/wordcount-mobile.ui" ||
+rUIFile == "svx/ui/findreplacedialog-mobile.ui" ||
+rUIFile == "modules/swriter/ui/watermarkdialog.ui" ||
+rUIFile == "modules/scalc/ui/validationdialog.ui" ||
+rUIFile == "modules/scalc/ui/validationcriteriapage.ui" ||
+rUIFile == "modules/scalc/ui/validationhelptabpage-mobile.ui" 
||
+rUIFile == "modules/scalc/ui/erroralerttabpage-mobile.ui" ||
+rUIFile == "modules/scalc/ui/validationdialog.ui")
+{
+bUseJSBuilder = true;
+}
+}
+
+if (rUIFile == "modules/scalc/ui/pivottablelayoutdialog.ui")
+{
 bUseJSBuilder = true;
+}
 }
 
 if (bUseJSBuilder)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Caolán McNamara (via logerrit)
 sfx2/source/sidebar/SidebarController.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 33ca9483169c6e1f9675893dcfbd62cdda36f1b4
Author: Caolán McNamara 
AuthorDate: Tue Dec 1 12:24:20 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 16:38:07 2020 +0100

Resolves: tdf#138417 crash on customize sidebar

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

diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index f359e768665e..5b13e599afb1 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -1182,6 +1182,7 @@ IMPL_LINK(SidebarController, OnSubMenuItemSelected, const 
OString&, rCurItemId,
 IsDocumentReadOnly(),
 mxFrame->getController());
 // Notify the tab bar about the updated set of decks.
+maFocusManager.Clear();
 mpTabBar->SetDecks(aDecks);
 mpTabBar->HighlightDeck(mpCurrentDeck->GetId());
 mpTabBar->UpdateFocusManager(maFocusManager);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Caolán McNamara (via logerrit)
 sfx2/source/sidebar/SidebarController.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit f09d21b0428b8d1441a32e27baca945d2101600c
Author: Caolán McNamara 
AuthorDate: Tue Dec 1 12:24:20 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 16:37:45 2020 +0100

Resolves: tdf#138417 crash on customize sidebar

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

diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index 35fbdf41254d..231524d1af9b 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -1180,6 +1180,7 @@ IMPL_LINK(SidebarController, OnSubMenuItemSelected, const 
OString&, rCurItemId,
 IsDocumentReadOnly(),
 mxFrame->getController());
 // Notify the tab bar about the updated set of decks.
+maFocusManager.Clear();
 mpTabBar->SetDecks(aDecks);
 mpTabBar->HighlightDeck(mpCurrentDeck->GetId());
 mpTabBar->UpdateFocusManager(maFocusManager);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Noel (via logerrit)
 xmloff/source/text/XMLChangedRegionImportContext.cxx |   31 ---
 xmloff/source/text/XMLChangedRegionImportContext.hxx |5 +--
 2 files changed, 17 insertions(+), 19 deletions(-)

New commits:
commit 380e3fdc8a0ca86429ab44669820f09dad1a6fb8
Author: Noel 
AuthorDate: Tue Dec 1 10:24:14 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Dec 1 16:30:21 2020 +0100

fastparser in XMLChangedRegionImportContext

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

diff --git a/xmloff/source/text/XMLChangedRegionImportContext.cxx 
b/xmloff/source/text/XMLChangedRegionImportContext.cxx
index aa257bf50ef8..a0f11b97d3ff 100644
--- a/xmloff/source/text/XMLChangedRegionImportContext.cxx
+++ b/xmloff/source/text/XMLChangedRegionImportContext.cxx
@@ -50,42 +50,39 @@ 
XMLChangedRegionImportContext::~XMLChangedRegionImportContext()
 {
 }
 
-void XMLChangedRegionImportContext::StartElement(
-const Reference & xAttrList)
+void XMLChangedRegionImportContext::startFastElement(
+sal_Int32 /*nElement*/,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
 // process attributes: id
 bool bHaveXmlId( false );
-sal_Int16 nLength = xAttrList->getLength();
-for(sal_Int16 nAttr = 0; nAttr < nLength; nAttr++)
+for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
 {
-OUString sLocalName;
-sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
-GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
-  &sLocalName );
-
-const OUString sValue = xAttrList->getValueByIndex(nAttr);
-if (XML_NAMESPACE_XML == nPrefix)
+const OUString sValue = aIter.toString();
+switch(aIter.getToken())
 {
-if (IsXMLToken(sLocalName, XML_ID))
+case XML_ELEMENT(XML, XML_ID):
 {
 sID = sValue;
 bHaveXmlId = true;
+break;
 }
-}
-else if (XML_NAMESPACE_TEXT == nPrefix)
-{
-if (IsXMLToken(sLocalName, XML_ID))
+case XML_ELEMENT(TEXT, XML_ID):
 {
 if (!bHaveXmlId) { sID = sValue; }
+break;
 }
-else if( IsXMLToken( sLocalName, XML_MERGE_LAST_PARAGRAPH ) )
+case XML_ELEMENT(TEXT, XML_MERGE_LAST_PARAGRAPH):
 {
 bool bTmp(false);
 if (::sax::Converter::convertBool(bTmp, sValue))
 {
 bMergeLastPara = bTmp;
 }
+break;
 }
+default:
+XMLOFF_WARN_UNKNOWN("xmloff", aIter);
 }
 }
 }
diff --git a/xmloff/source/text/XMLChangedRegionImportContext.hxx 
b/xmloff/source/text/XMLChangedRegionImportContext.hxx
index 2964790f8fcc..97c545cbb58c 100644
--- a/xmloff/source/text/XMLChangedRegionImportContext.hxx
+++ b/xmloff/source/text/XMLChangedRegionImportContext.hxx
@@ -57,8 +57,9 @@ public:
 
 virtual ~XMLChangedRegionImportContext() override;
 
-virtual void StartElement(
-const css::uno::Reference & xAttrList) 
override;
+virtual void SAL_CALL startFastElement(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& 
xAttrList ) override;
 
 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL 
createFastChildContext(
 sal_Int32 nElement, const css::uno::Reference< 
css::xml::sax::XFastAttributeList >& AttrList ) override;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Noel (via logerrit)
 xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx |   37 +++
 xmloff/source/text/XMLIndexAlphabeticalSourceContext.hxx |2 
 xmloff/source/text/XMLIndexBibliographySourceContext.cxx |6 +-
 xmloff/source/text/XMLIndexBibliographySourceContext.hxx |2 
 xmloff/source/text/XMLIndexObjectSourceContext.cxx   |   19 +++
 xmloff/source/text/XMLIndexObjectSourceContext.hxx   |2 
 xmloff/source/text/XMLIndexSourceBaseContext.cxx |   32 
 xmloff/source/text/XMLIndexSourceBaseContext.hxx |7 +-
 xmloff/source/text/XMLIndexTOCSourceContext.cxx  |   14 ++---
 xmloff/source/text/XMLIndexTOCSourceContext.hxx  |2 
 xmloff/source/text/XMLIndexTableSourceContext.cxx|   12 ++--
 xmloff/source/text/XMLIndexTableSourceContext.hxx|2 
 xmloff/source/text/XMLIndexUserSourceContext.cxx |   25 --
 xmloff/source/text/XMLIndexUserSourceContext.hxx |2 
 14 files changed, 77 insertions(+), 87 deletions(-)

New commits:
commit 9dc284bb68d2648be6c1846df313519056a5b894
Author: Noel 
AuthorDate: Tue Dec 1 10:06:10 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Dec 1 16:29:57 2020 +0100

fastparser in XMLIndexSourceBaseContext

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

diff --git a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx 
b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
index b6ed744129c8..08522e6aee81 100644
--- a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
@@ -40,8 +40,7 @@ using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::Any;
 using ::com::sun::star::xml::sax::XAttributeList;
 using ::xmloff::token::IsXMLToken;
-using ::xmloff::token::XML_ALPHABETICAL_INDEX_ENTRY_TEMPLATE;
-using ::xmloff::token::XML_OUTLINE_LEVEL;
+using namespace ::xmloff::token;
 
 XMLIndexAlphabeticalSourceContext::XMLIndexAlphabeticalSourceContext(
 SvXMLImport& rImport,
@@ -64,14 +63,14 @@ 
XMLIndexAlphabeticalSourceContext::~XMLIndexAlphabeticalSourceContext()
 }
 
 void XMLIndexAlphabeticalSourceContext::ProcessAttribute(
-enum IndexSourceParamEnum eParam,
+sal_Int32 nAttributeToken,
 const OUString& rValue)
 {
 bool bTmp(false);
 
-switch (eParam)
+switch (nAttributeToken)
 {
-case XML_TOK_INDEXSOURCE_MAIN_ENTRY_STYLE:
+case XML_ELEMENT(TEXT, XML_MAIN_ENTRY_STYLE_NAME):
 {
 sMainEntryStyleName = rValue;
 OUString sDisplayStyleName = GetImport().GetStyleDisplayName(
@@ -82,79 +81,79 @@ void XMLIndexAlphabeticalSourceContext::ProcessAttribute(
 }
 break;
 
-case XML_TOK_INDEXSOURCE_IGNORE_CASE:
+case XML_ELEMENT(TEXT, XML_IGNORE_CASE):
 if (::sax::Converter::convertBool(bTmp, rValue))
 {
 bCaseSensitive = !bTmp;
 }
 break;
 
-case XML_TOK_INDEXSOURCE_SEPARATORS:
+case XML_ELEMENT(TEXT, XML_ALPHABETICAL_SEPARATORS):
 if (::sax::Converter::convertBool(bTmp, rValue))
 {
 bSeparators = bTmp;
 }
 break;
 
-case XML_TOK_INDEXSOURCE_COMBINE_ENTRIES:
+case XML_ELEMENT(TEXT, XML_COMBINE_ENTRIES):
 if (::sax::Converter::convertBool(bTmp, rValue))
 {
 bCombineEntries = bTmp;
 }
 break;
 
-case XML_TOK_INDEXSOURCE_COMBINE_WITH_DASH:
+case XML_ELEMENT(TEXT, XML_COMBINE_ENTRIES_WITH_DASH):
 if (::sax::Converter::convertBool(bTmp, rValue))
 {
 bCombineDash = bTmp;
 }
 break;
-case XML_TOK_INDEXSOURCE_KEYS_AS_ENTRIES:
+case XML_ELEMENT(TEXT, XML_USE_KEYS_AS_ENTRIES):
 if (::sax::Converter::convertBool(bTmp, rValue))
 {
 bEntry = bTmp;
 }
 break;
 
-case XML_TOK_INDEXSOURCE_COMBINE_WITH_PP:
+case XML_ELEMENT(TEXT, XML_COMBINE_ENTRIES_WITH_PP):
 if (::sax::Converter::convertBool(bTmp, rValue))
 {
 bCombinePP = bTmp;
 }
 break;
 
-case XML_TOK_INDEXSOURCE_CAPITALIZE:
+case XML_ELEMENT(TEXT, XML_CAPITALIZE_ENTRIES):
 if (::sax::Converter::convertBool(bTmp, rValue))
 {
 bUpperCase = bTmp;
 }
 break;
 
-case XML_TOK_INDEXSOURCE_COMMA_SEPARATED:
+case XML_ELEMENT(TEXT, XML_COMMA_SEPARATED):
 if (::sax::Converter::convertBool(bTmp, rValue))
 {
 bCommaSeparated = bTmp;
 }
 break;
 
-case XML_TOK_INDEXSOURCE_SORT_ALGORITHM:
+  

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

2020-12-01 Thread Luboš Luňák (via logerrit)
 drawinglayer/source/primitive3d/textureprimitive3d.cxx   |2 +-
 include/drawinglayer/attribute/fillgradientattribute.hxx |2 +-
 svx/source/sdr/primitive2d/sdrattributecreator.cxx   |3 +--
 svx/source/xoutdev/xtabgrdt.cxx  |4 +---
 sw/source/uibase/docvw/HeaderFooterWin.cxx   |2 +-
 sw/source/uibase/docvw/ShadowOverlayObject.cxx   |9 +++--
 6 files changed, 8 insertions(+), 14 deletions(-)

New commits:
commit 8601eca3c8573b433933ab59180624d798c6189e
Author: Luboš Luňák 
AuthorDate: Tue Dec 1 12:39:39 2020 +0100
Commit: Luboš Luňák 
CommitDate: Tue Dec 1 16:28:59 2020 +0100

do not unnecessarily explicitly force gradient step count (tdf#138581)

Toolkits usually do not provide the ability to specify gradient steps,
which means VCL falls back to its algorithm, which at least with Skia
sometimes causes poor results.

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

diff --git a/drawinglayer/source/primitive3d/textureprimitive3d.cxx 
b/drawinglayer/source/primitive3d/textureprimitive3d.cxx
index a053a7c214d0..7c9226bf40de 100644
--- a/drawinglayer/source/primitive3d/textureprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/textureprimitive3d.cxx
@@ -91,7 +91,7 @@ namespace drawinglayer::primitive3d
 {
 // create TransparenceTexturePrimitive3D with fixed 
transparence as replacement
 const basegfx::BColor aGray(getTransparence(), 
getTransparence(), getTransparence());
-const attribute::FillGradientAttribute 
aFillGradient(attribute::GradientStyle::Linear, 0.0, 0.0, 0.0, 0.0, aGray, 
aGray, 1);
+const attribute::FillGradientAttribute 
aFillGradient(attribute::GradientStyle::Linear, 0.0, 0.0, 0.0, 0.0, aGray, 
aGray);
 const Primitive3DReference xRef(new 
TransparenceTexturePrimitive3D(aFillGradient, getChildren(), getTextureSize()));
 return { xRef };
 }
diff --git a/include/drawinglayer/attribute/fillgradientattribute.hxx 
b/include/drawinglayer/attribute/fillgradientattribute.hxx
index f9d9e2245d9a..50a87a685f1a 100644
--- a/include/drawinglayer/attribute/fillgradientattribute.hxx
+++ b/include/drawinglayer/attribute/fillgradientattribute.hxx
@@ -53,7 +53,7 @@ public:
 /// constructors/assignmentoperator/destructor
 FillGradientAttribute(GradientStyle eStyle, double fBorder, double 
fOffsetX, double fOffsetY,
   double fAngle, const basegfx::BColor& rStartColor,
-  const basegfx::BColor& rEndColor, sal_uInt16 nSteps);
+  const basegfx::BColor& rEndColor, sal_uInt16 nSteps 
= 0);
 FillGradientAttribute();
 FillGradientAttribute(const FillGradientAttribute&);
 FillGradientAttribute(FillGradientAttribute&&);
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx 
b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index d5baa905e0a8..5ee93efef85f 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -644,8 +644,7 @@ namespace drawinglayer::primitive2d
 static_cast(rGradient.GetYOffset()) * 0.01,
 static_cast(rGradient.GetAngle().get()) * 
F_PI1800,
 basegfx::BColor(fStartLum, fStartLum, fStartLum),
-basegfx::BColor(fEndLum, fEndLum, fEndLum),
-0);
+basegfx::BColor(fEndLum, fEndLum, fEndLum));
 }
 }
 
diff --git a/svx/source/xoutdev/xtabgrdt.cxx b/svx/source/xoutdev/xtabgrdt.cxx
index fbb69a0ddd77..23bfc8313cb9 100644
--- a/svx/source/xoutdev/xtabgrdt.cxx
+++ b/svx/source/xoutdev/xtabgrdt.cxx
@@ -153,7 +153,6 @@ BitmapEx XGradientList::CreateBitmap( tools::Long nIndex, 
const Size& rSize ) co
 }
 }
 
-const sal_uInt16 nSteps((rSize.Width() + rSize.Height()) / 3);
 const drawinglayer::attribute::FillGradientAttribute aFillGradient(
 aGradientStyle,
 static_cast(rGradient.GetBorder()) * 0.01,
@@ -161,8 +160,7 @@ BitmapEx XGradientList::CreateBitmap( tools::Long nIndex, 
const Size& rSize ) co
 static_cast(rGradient.GetYOffset()) * 0.01,
 static_cast(rGradient.GetAngle().get()) * F_PI1800,
 aStart,
-aEnd,
-nSteps);
+aEnd);
 
 const drawinglayer::primitive2d::Primitive2DReference 
aGradientPrimitive(
 new drawinglayer::primitive2d::PolyPolygonGradientPrimitive2D(
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx 
b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index 2f08f0a5a7c3..7305a440d29a 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/inc vcl/unx

2020-12-01 Thread Caolán McNamara (via logerrit)
 vcl/inc/unx/gtk/gtksalmenu.hxx  |6 +
 vcl/unx/gtk3/gtk3gtksalmenu.cxx |  161 
 2 files changed, 137 insertions(+), 30 deletions(-)

New commits:
commit 8d20a638c6a2f2835966fa322f7ddcf9e92e
Author: Caolán McNamara 
AuthorDate: Tue Dec 1 12:05:31 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 16:17:00 2020 +0100

tdf#132350 gtk: implement extra update button in menubar

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

diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx
index d4857fe7e87a..8af690d20a9d 100644
--- a/vcl/inc/unx/gtk/gtksalmenu.hxx
+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx
@@ -33,6 +33,7 @@ class GtkSalMenu : public SalMenu
 {
 private:
 std::vector< GtkSalMenuItem* >  maItems;
+std::vector> maExtraButtons;
 IdlemaUpdateMenuBarIdle;
 
 boolmbInActivateCallback;
@@ -63,6 +64,8 @@ private:
 
 DECL_LINK(MenuBarHierarchyChangeHandler, Timer*, void);
 
+static GtkWidget* AddButton(GtkWidget *pImage);
+
 public:
 GtkSalMenu( bool bMenuBar );
 virtual ~GtkSalMenu() override;
@@ -127,6 +130,9 @@ public:
 
 virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const 
tools::Rectangle& rRect, FloatWinPopupFlags nFlags) override;
 virtual void ShowCloseButton(bool bShow) override;
+virtual bool AddMenuBarButton( const SalMenuButtonItem& rNewItem ) 
override;
+virtual void RemoveMenuBarButton( sal_uInt16 nId ) override;
+virtual tools::Rectangle GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, 
SalFrame* i_pReferenceFrame ) override;
 virtual bool CanGetFocus() const override;
 virtual bool TakeFocus() override;
 virtual int GetMenuBarHeight() const override;
diff --git a/vcl/unx/gtk3/gtk3gtksalmenu.cxx b/vcl/unx/gtk3/gtk3gtksalmenu.cxx
index 72ad6e40d6bd..bd15de7de848 100644
--- a/vcl/unx/gtk3/gtk3gtksalmenu.cxx
+++ b/vcl/unx/gtk3/gtk3gtksalmenu.cxx
@@ -652,6 +652,28 @@ static void CloseMenuBar(GtkWidget *, gpointer pMenu)
 
Application::PostUserEvent(static_cast(pMenu)->GetCloseButtonClickHdl());
 }
 
+GtkWidget* GtkSalMenu::AddButton(GtkWidget *pImage)
+{
+GtkWidget* pButton = gtk_button_new();
+
+gtk_button_set_relief(GTK_BUTTON(pButton), GTK_RELIEF_NONE);
+gtk_button_set_focus_on_click(GTK_BUTTON(pButton), false);
+gtk_widget_set_can_focus(pButton, false);
+
+GtkStyleContext *pButtonContext = 
gtk_widget_get_style_context(GTK_WIDGET(pButton));
+
+gtk_style_context_add_class(pButtonContext, "flat");
+gtk_style_context_add_class(pButtonContext, "small-button");
+
+gtk_widget_show(pImage);
+
+gtk_widget_set_valign(pButton, GTK_ALIGN_CENTER);
+
+gtk_container_add(GTK_CONTAINER(pButton), pImage);
+gtk_widget_show_all(pButton);
+return pButton;
+}
+
 void GtkSalMenu::ShowCloseButton(bool bShow)
 {
 assert(mbMenuBar);
@@ -668,35 +690,124 @@ void GtkSalMenu::ShowCloseButton(bool bShow)
 return;
 }
 
-MenuBar *pVclMenuBar = static_cast(mpVCLMenu.get());
-mpCloseButton = gtk_button_new();
-gtk_widget_set_margin_start(mpCloseButton, 8);
+if (mpCloseButton)
+return;
+
+GIcon* pIcon = 
g_themed_icon_new_with_default_fallbacks("window-close-symbolic");
+GtkWidget* pImage = gtk_image_new_from_gicon(pIcon, GTK_ICON_SIZE_MENU);
+g_object_unref(pIcon);
+
+mpCloseButton = AddButton(pImage);
+
 gtk_widget_set_margin_end(mpCloseButton, 8);
+
+OUString sToolTip(VclResId(SV_HELPTEXT_CLOSEDOCUMENT));
+gtk_widget_set_tooltip_text(mpCloseButton, sToolTip.toUtf8().getStr());
+
+MenuBar *pVclMenuBar = static_cast(mpVCLMenu.get());
 g_signal_connect(mpCloseButton, "clicked", G_CALLBACK(CloseMenuBar), 
pVclMenuBar);
 
-gtk_button_set_relief(GTK_BUTTON(mpCloseButton), GTK_RELIEF_NONE);
-gtk_button_set_focus_on_click(GTK_BUTTON(mpCloseButton), false);
-gtk_widget_set_can_focus(mpCloseButton, false);
+gtk_grid_attach(GTK_GRID(mpMenuBarContainerWidget), mpCloseButton, 1, 0, 
1, 1);
+}
 
-GtkStyleContext *pButtonContext = 
gtk_widget_get_style_context(GTK_WIDGET(mpCloseButton));
+namespace
+{
+void DestroyMemoryStream(gpointer data)
+{
+SvMemoryStream* pMemStm = static_cast(data);
+delete pMemStm;
+}
+}
 
-gtk_style_context_add_class(pButtonContext, "flat");
-gtk_style_context_add_class(pButtonContext, "small-button");
+static void MenuButtonClicked(GtkWidget* pWidget, gpointer pMenu)
+{
+const gchar* pStr = gtk_buildable_get_name(GTK_BUILDABLE(pWidget));
+OString aId(pStr, pStr ? strlen(pStr) : 0);
+static_cast(pMenu)->HandleMenuButtonEvent(aId.toUInt32());
+}
 
-GIcon* icon = 
g_themed_icon_new_with_default_fallbacks("window-close-symbolic");
-GtkWidget* image = gtk_image_new_from_gicon(icon, 

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

2020-12-01 Thread Caolán McNamara (via logerrit)
 vcl/inc/unx/gtk/gtksalmenu.hxx  |6 +
 vcl/unx/gtk3/gtk3gtksalmenu.cxx |  161 
 2 files changed, 137 insertions(+), 30 deletions(-)

New commits:
commit 4bf54eb22cfe604dc29c4f7e3ffa687324b19636
Author: Caolán McNamara 
AuthorDate: Tue Dec 1 12:05:31 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 16:16:36 2020 +0100

tdf#132350 gtk: implement extra update button in menubar

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

diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx
index d4857fe7e87a..8af690d20a9d 100644
--- a/vcl/inc/unx/gtk/gtksalmenu.hxx
+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx
@@ -33,6 +33,7 @@ class GtkSalMenu : public SalMenu
 {
 private:
 std::vector< GtkSalMenuItem* >  maItems;
+std::vector> maExtraButtons;
 IdlemaUpdateMenuBarIdle;
 
 boolmbInActivateCallback;
@@ -63,6 +64,8 @@ private:
 
 DECL_LINK(MenuBarHierarchyChangeHandler, Timer*, void);
 
+static GtkWidget* AddButton(GtkWidget *pImage);
+
 public:
 GtkSalMenu( bool bMenuBar );
 virtual ~GtkSalMenu() override;
@@ -127,6 +130,9 @@ public:
 
 virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const 
tools::Rectangle& rRect, FloatWinPopupFlags nFlags) override;
 virtual void ShowCloseButton(bool bShow) override;
+virtual bool AddMenuBarButton( const SalMenuButtonItem& rNewItem ) 
override;
+virtual void RemoveMenuBarButton( sal_uInt16 nId ) override;
+virtual tools::Rectangle GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, 
SalFrame* i_pReferenceFrame ) override;
 virtual bool CanGetFocus() const override;
 virtual bool TakeFocus() override;
 virtual int GetMenuBarHeight() const override;
diff --git a/vcl/unx/gtk3/gtk3gtksalmenu.cxx b/vcl/unx/gtk3/gtk3gtksalmenu.cxx
index 72ad6e40d6bd..bd15de7de848 100644
--- a/vcl/unx/gtk3/gtk3gtksalmenu.cxx
+++ b/vcl/unx/gtk3/gtk3gtksalmenu.cxx
@@ -652,6 +652,28 @@ static void CloseMenuBar(GtkWidget *, gpointer pMenu)
 
Application::PostUserEvent(static_cast(pMenu)->GetCloseButtonClickHdl());
 }
 
+GtkWidget* GtkSalMenu::AddButton(GtkWidget *pImage)
+{
+GtkWidget* pButton = gtk_button_new();
+
+gtk_button_set_relief(GTK_BUTTON(pButton), GTK_RELIEF_NONE);
+gtk_button_set_focus_on_click(GTK_BUTTON(pButton), false);
+gtk_widget_set_can_focus(pButton, false);
+
+GtkStyleContext *pButtonContext = 
gtk_widget_get_style_context(GTK_WIDGET(pButton));
+
+gtk_style_context_add_class(pButtonContext, "flat");
+gtk_style_context_add_class(pButtonContext, "small-button");
+
+gtk_widget_show(pImage);
+
+gtk_widget_set_valign(pButton, GTK_ALIGN_CENTER);
+
+gtk_container_add(GTK_CONTAINER(pButton), pImage);
+gtk_widget_show_all(pButton);
+return pButton;
+}
+
 void GtkSalMenu::ShowCloseButton(bool bShow)
 {
 assert(mbMenuBar);
@@ -668,35 +690,124 @@ void GtkSalMenu::ShowCloseButton(bool bShow)
 return;
 }
 
-MenuBar *pVclMenuBar = static_cast(mpVCLMenu.get());
-mpCloseButton = gtk_button_new();
-gtk_widget_set_margin_start(mpCloseButton, 8);
+if (mpCloseButton)
+return;
+
+GIcon* pIcon = 
g_themed_icon_new_with_default_fallbacks("window-close-symbolic");
+GtkWidget* pImage = gtk_image_new_from_gicon(pIcon, GTK_ICON_SIZE_MENU);
+g_object_unref(pIcon);
+
+mpCloseButton = AddButton(pImage);
+
 gtk_widget_set_margin_end(mpCloseButton, 8);
+
+OUString sToolTip(VclResId(SV_HELPTEXT_CLOSEDOCUMENT));
+gtk_widget_set_tooltip_text(mpCloseButton, sToolTip.toUtf8().getStr());
+
+MenuBar *pVclMenuBar = static_cast(mpVCLMenu.get());
 g_signal_connect(mpCloseButton, "clicked", G_CALLBACK(CloseMenuBar), 
pVclMenuBar);
 
-gtk_button_set_relief(GTK_BUTTON(mpCloseButton), GTK_RELIEF_NONE);
-gtk_button_set_focus_on_click(GTK_BUTTON(mpCloseButton), false);
-gtk_widget_set_can_focus(mpCloseButton, false);
+gtk_grid_attach(GTK_GRID(mpMenuBarContainerWidget), mpCloseButton, 1, 0, 
1, 1);
+}
 
-GtkStyleContext *pButtonContext = 
gtk_widget_get_style_context(GTK_WIDGET(mpCloseButton));
+namespace
+{
+void DestroyMemoryStream(gpointer data)
+{
+SvMemoryStream* pMemStm = static_cast(data);
+delete pMemStm;
+}
+}
 
-gtk_style_context_add_class(pButtonContext, "flat");
-gtk_style_context_add_class(pButtonContext, "small-button");
+static void MenuButtonClicked(GtkWidget* pWidget, gpointer pMenu)
+{
+const gchar* pStr = gtk_buildable_get_name(GTK_BUILDABLE(pWidget));
+OString aId(pStr, pStr ? strlen(pStr) : 0);
+static_cast(pMenu)->HandleMenuButtonEvent(aId.toUInt32());
+}
 
-GIcon* icon = 
g_themed_icon_new_with_default_fallbacks("window-close-symbolic");
-GtkWidget* image = gtk_image_new_from_gic

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

2020-12-01 Thread Caolán McNamara (via logerrit)
 sc/source/core/data/postit.cxx |   11 ---
 svx/source/svdraw/svdotxat.cxx |   11 +++
 2 files changed, 7 insertions(+), 15 deletions(-)

New commits:
commit 77670f84c1148d15ab9a34c4db150e87ad9949eb
Author: Caolán McNamara 
AuthorDate: Tue Dec 1 09:09:45 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 15:57:34 2020 +0100

Resolves: tdf#138549 use GetSpecialTextBoxShadow to identify ScPostIt

instead of a 'special' name which causes undo-related causes side effects

Change-Id: Id36b0b5360ddde3469721a7c837fe3942af08209
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106938
Tested-by: Xisco Fauli 
Reviewed-by: Xisco Fauli 
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 92221fe87430..d0ac658f3e35 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -382,17 +382,6 @@ void ScCaptionCreator::CreateCaption( bool bShown, bool 
bTailFront )
 *mrDoc.GetDrawLayer(), //  should ret a ref?
 aTextRect,
 aTailPos));
-
-// tdf#114956 a way to recognize that this SdrCaption is for a ScPostit in
-// SdrTextObj::AdjustTextFrameWidthAndHeight
-SdrModel& rModel = mxCaption->getSdrModelFromSdrObject();
-const bool bUndoEnabled = rModel.IsUndoEnabled();
-if (bUndoEnabled)
-rModel.EnableUndo(false);
-mxCaption->SetName("ScPostIt");
-if (bUndoEnabled)
-rModel.EnableUndo(true);
-
 // basic caption settings
 ScCaptionUtil::SetBasicCaptionSettings( *mxCaption, bShown );
 }
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
index 6f97960b5377..315e57e7cb06 100644
--- a/svx/source/svdraw/svdotxat.cxx
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -263,8 +263,12 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight()
 if (dynamic_cast(this) != nullptr) { // this is a 
hack
 static_cast(this)->SetXPolyDirty();
 }
-if (dynamic_cast(this) != nullptr) { // this is 
a hack
-static_cast(this)->ImpRecalcTail();
+bool bScPostIt = false;
+if (auto pCaptionObj = dynamic_cast(this)) { // this 
is a hack
+pCaptionObj->ImpRecalcTail();
+// tdf#114956, tdf#138549 use GetSpecialTextBoxShadow to recognize
+// that this SdrCaption is for a ScPostit
+bScPostIt = pCaptionObj->GetSpecialTextBoxShadow();
 }
 
 // to not slow down EditView visualization on Overlay (see
@@ -278,8 +282,7 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight()
 GetTextEditOutliner() &&
 GetTextEditOutliner()->hasEditViewCallbacks());
 
-// tdf#114956 always broadcast change for ScPostIts
-if (!bSuppressChangeWhenEditOnOverlay || GetName() == "ScPostIt")
+if (!bSuppressChangeWhenEditOnOverlay || bScPostIt)
 {
 SetChanged();
 BroadcastObjectChange();
___
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

2020-12-01 Thread Stephan Bergmann (via logerrit)
 sc/source/ui/view/cellsh1.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d0504b28ccbfd8fbac7191e606c6487aab66e1f3
Author: Stephan Bergmann 
AuthorDate: Mon Nov 30 22:16:15 2020 +0100
Commit: Szymon Kłos 
CommitDate: Tue Dec 1 15:50:27 2020 +0100

Fix stack-use-after-return

...introduced with 244a447734d2abae8896884d4ab73eb4510d243c "Make Pivot 
table
data source dialog async", as seen e.g. during UITest_calc_tests8:

> ==1217030==ERROR: AddressSanitizer: stack-use-after-return on address 
0x7f06d7133444 at pc 0x7f069f0cb613 bp 0x7ffe24058430 sp 0x7ffe24058428
> WRITE of size 2 at 0x7f06d7133444 thread T0
>  #0 in ScAddress::operator=(ScAddress const&) at sc/inc/address.hxx:415:10
>  #1 in ScCellShell::ExecuteDataPilotDialog()::$_4::operator()(int) const 
at sc/source/ui/view/cellsh1.cxx:3014:42
>  #2 in void std::__invoke_impl(std::__invoke_other, 
ScCellShell::ExecuteDataPilotDialog()::$_4&, int&&) at 
~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/invoke.h:60:14
>  #3 in std::enable_if, void>::type 
std::__invoke_r(ScCellShell::ExecuteDataPilotDialog()::$_4&, int&&) at 
~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/invoke.h:110:2
>  #4 in std::_Function_handler::_M_invoke(std::_Any_data const&, 
int&&) at 
~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/std_function.h:291:9
>  #5 in std::function::operator()(int) const at 
~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/std_function.h:560:9
>  #6 in Dialog::EndDialog(long) at vcl/source/window/dialog.cxx:1137:9
>  #7 in Dialog::ResponseHdl(Button*) at vcl/source/window/dialog.cxx:1391:5
>  #8 in Dialog::LinkStubResponseHdl(void*, Button*) at 
vcl/source/window/dialog.cxx:1376:1
>  #9 in Link::Call(Button*) const at 
include/tools/link.hxx:111:45
>  #10 in Button::Click()::$_0::operator()() const at 
vcl/source/control/button.cxx:124:87
>  #11 in void std::__invoke_impl(std::__invoke_other, Button::Click()::$_0&) at 
~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/invoke.h:60:14
>  #12 in std::enable_if, 
void>::type std::__invoke_r(Button::Click()::$_0&) 
at 
~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/invoke.h:110:2
>  #13 in std::_Function_handler::_M_invoke(std::_Any_data const&) at 
~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/std_function.h:291:9
>  #14 in std::function::operator()() const at 
~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/std_function.h:560:9
>  #15 in Control::ImplCallEventListenersAndHandler(VclEventId, 
std::function const&) at vcl/source/control/ctrl.cxx:315:13
>  #16 in Button::Click() at vcl/source/control/button.cxx:124:5
>  #17 in ButtonUIObject::execute(rtl::OUString const&, 
std::__debug::map, std::allocator > > 
const&) at vcl/source/uitest/uiobject.cxx:614:19
>  #18 in UIObjectUnoObj::executeAction(rtl::OUString const&, 
com::sun::star::uno::Sequence 
const&)::$_0::operator()() const at 
vcl/source/uitest/uno/uiobject_uno.cxx:124:16
>  #19 in void std::__invoke_impl 
const&)::$_0&>(std::__invoke_other, UIObjectUnoObj::executeAction(rtl::OUString 
const&, com::sun::star::uno::Sequence 
const&)::$_0&) at 
~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/invoke.h:60:14
>  #20 in std::enable_if 
const&)::$_0&>, void>::type std::__invoke_r 
const&)::$_0&>(UIObjectUnoObj::executeAction(rtl::OUString const&, 
com::sun::star::uno::Sequence 
const&)::$_0&) at 
~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/invoke.h:110:2
>  #21 in std::_Function_handler 
const&)::$_0>::_M_invoke(std::_Any_data const&) at 
~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/std_function.h:291:9
>  #22 in std::function::operator()() const at 
~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/std_function.h:560:9
>  #23 in (anonymous namespace)::ExecuteWrapper::ExecuteActionHdl(Timer*) 
at vcl/source/uitest/uno/uiobject_uno.cxx:83:13
>  #24 in (anonymous 
namespace)::ExecuteWrapper::LinkStubExecuteActionHdl(void*, Timer*) at 
vcl/source/uitest/uno/uiobject_uno.cxx:78:1
>  #25 in Link::Call(Timer*) const at 
include/tools/link.hxx:111:45
>  #26 in Timer::Invoke() at vcl/source/app/timer.cxx:75:21
>  #27 in Scheduler::ProcessTaskScheduling() at 
vcl/source/app/scheduler.cxx:486:20
>  #28 in Scheduler::CallbackTaskScheduling() at 
vcl/source/app/scheduler.cxx:288:5
>  #29 in SalTimer::CallCallback() at vcl/inc/saltimer.hxx:54:13
>  #30 in SvpSalInstance::CheckTimeout(bool) at 
vcl/h

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

2020-12-01 Thread Szymon Kłos (via logerrit)
 sc/source/ui/attrdlg/scdlgfact.cxx |5 
 sc/source/ui/attrdlg/scdlgfact.hxx |3 
 sc/source/ui/view/cellsh1.cxx  |  231 +++--
 3 files changed, 130 insertions(+), 109 deletions(-)

New commits:
commit c94df0a883f53fb5aac2f5d4378120443c9639fb
Author: Szymon Kłos 
AuthorDate: Mon Nov 23 12:02:07 2020 +0100
Commit: Szymon Kłos 
CommitDate: Tue Dec 1 15:50:04 2020 +0100

Make Pivot table data source dialog async

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

diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx 
b/sc/source/ui/attrdlg/scdlgfact.cxx
index ab717e1ee05e..cb9d07c008ad 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -110,6 +110,11 @@ short AbstractScDataPilotSourceTypeDlg_Impl::Execute()
 return m_xDlg->run();
 }
 
+bool AbstractScDataPilotSourceTypeDlg_Impl::StartExecuteAsync(AsyncContext 
&rCtx)
+{
+return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+}
+
 short AbstractScDataPilotServiceDlg_Impl::Execute()
 {
 return m_xDlg->run();
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx 
b/sc/source/ui/attrdlg/scdlgfact.hxx
index 4f8987bc4e1a..582d189ef4c0 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -181,13 +181,14 @@ public:
 
 class AbstractScDataPilotSourceTypeDlg_Impl  :public 
AbstractScDataPilotSourceTypeDlg
 {
-std::unique_ptr m_xDlg;
+std::shared_ptr m_xDlg;
 public:
 explicit 
AbstractScDataPilotSourceTypeDlg_Impl(std::unique_ptr 
p)
 : m_xDlg(std::move(p))
 {
 }
 virtual short Execute() override;
+virtual bool StartExecuteAsync(AsyncContext &) override;
 virtual bool IsDatabase() const override;
 virtual bool IsExternal() const override;
 virtual bool IsNamedRange() const override;
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index e715c721c721..11d9b5aa743a 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2780,6 +2780,23 @@ bool isDPSourceValid(const ScDPObject& rDPObj)
 return true;
 }
 
+void RunPivotLayoutDialog(ScModule* pScMod,
+  ScTabViewShell* pTabViewShell,
+  std::unique_ptr& pNewDPObject)
+{
+bool bHadNewDPObject = pNewDPObject != nullptr;
+pTabViewShell->SetDialogDPObject( std::move(pNewDPObject) );
+if ( bHadNewDPObject )
+{
+//  start layout dialog
+
+sal_uInt16 nId  = ScPivotLayoutWrapper::GetChildWindowId();
+SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
+SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId );
+pScMod->SetRefDialog( nId, pWnd == nullptr );
+}
+}
+
 }
 
 void ScCellShell::ExecuteDataPilotDialog()
@@ -2789,21 +2806,21 @@ void ScCellShell::ExecuteDataPilotDialog()
 ScViewData* pData = GetViewData();
 ScDocument* pDoc = pData->GetDocument();
 
-std::unique_ptr pNewDPObject;
-
 // ScPivot is no longer used...
 ScDPObject* pDPObj = pDoc->GetDPAtCursor(
 pData->GetCurX(), pData->GetCurY(),
 pData->GetTabNo() );
 if ( pDPObj )   // on an existing table?
 {
+std::unique_ptr pNewDPObject;
+
 if (isDPSourceValid(*pDPObj))
 pNewDPObject.reset(new ScDPObject(*pDPObj));
+
+RunPivotLayoutDialog(pScMod, pTabViewShell, pNewDPObject);
 }
 else// create new table
 {
-const char* pSrcErrorId = nullptr;
-
 //  select database range or data
 pTabViewShell->GetDBData( true, SC_DB_OLD );
 ScMarkData& rMark = GetViewData()->GetMarkData();
@@ -2820,7 +2837,7 @@ void ScCellShell::ExecuteDataPilotDialog()
 
 ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
 
-ScopedVclPtr pTypeDlg(
+VclPtr pTypeDlg(
 pFact->CreateScDataPilotSourceTypeDlg(
 pTabViewShell->GetFrameWeld(), bEnableExt));
 
@@ -2833,129 +2850,127 @@ void ScCellShell::ExecuteDataPilotDialog()
 pTypeDlg->AppendNamedRange(itr->second->GetName());
 }
 
-if ( pTypeDlg->Execute() == RET_OK )
-{
-if ( pTypeDlg->IsExternal() )
-{
-std::vector aSources = 
ScDPObject::GetRegisteredSources();
-ScopedVclPtr pServDlg(
-pFact->CreateScDataPilotServiceDlg(
-pTabViewShell->GetFrameWeld(), aSources));
+pTypeDlg->StartExecuteAsync([this, pTypeDlg, pTabViewShell,
+pScMod, pFact, pDoc, &rMark, 
&aDestPos](int nResult) {
+const char* pSrcErrorId = nullptr;
+std::unique_ptr pNewDPObject;
 
-if ( pServDlg->Execute() == RET_OK )
-  

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

2020-12-01 Thread Caolán McNamara (via logerrit)
 include/sfx2/sidebar/TabBar.hxx |2 --
 include/sfx2/sidebar/Theme.hxx  |3 ---
 sfx2/source/sidebar/TabBar.cxx  |   10 --
 sfx2/source/sidebar/Theme.cxx   |   22 --
 4 files changed, 37 deletions(-)

New commits:
commit 1186dfea12738c6157d6214f32b49d821db1f280
Author: Caolán McNamara 
AuthorDate: Tue Dec 1 10:22:09 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 15:44:40 2020 +0100

cid#1470362 Uninitialized scalar field

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

diff --git a/include/sfx2/sidebar/TabBar.hxx b/include/sfx2/sidebar/TabBar.hxx
index 53135697230d..8a6b03f74d17 100644
--- a/include/sfx2/sidebar/TabBar.hxx
+++ b/include/sfx2/sidebar/TabBar.hxx
@@ -69,7 +69,6 @@ public:
 virtual ~TabBar() override;
 virtual void dispose() override;
 
-virtual void Paint (vcl::RenderContext& /*rRenderContext*/, const 
tools::Rectangle& rUpdateArea) override;
 virtual void DataChanged (const DataChangedEvent& rDataChangedEvent) 
override;
 virtual bool EventNotify (NotifyEvent& rEvent) override;
 
@@ -120,7 +119,6 @@ private:
 typedef ::std::vector> ItemContainer;
 ItemContainer maItems;
 const ::std::function 
maDeckActivationFunctor;
-sal_Int32 mnMenuSeparatorY;
 PopupMenuProvider maPopupMenuProvider;
 
 static void CreateTabItem(weld::Toolbar& rButton, const DeckDescriptor& 
rDeckDescriptor);
diff --git a/include/sfx2/sidebar/Theme.hxx b/include/sfx2/sidebar/Theme.hxx
index 9b35ce7aa6dd..c59d71233b00 100644
--- a/include/sfx2/sidebar/Theme.hxx
+++ b/include/sfx2/sidebar/Theme.hxx
@@ -61,7 +61,6 @@ public:
 
 Color_DeckTitleFont,
 Color_PanelTitleFont,
-Color_TabMenuSeparator,
 Color_Highlight,
 Color_HighlightText,
 Color_DeckBackground,
@@ -79,8 +78,6 @@ public:
 Int_DeckBorderSize,
 Int_DeckSeparatorHeight,
 Int_PanelTitleBarHeight,
-Int_TabMenuPadding,
-Int_TabMenuSeparatorPadding,
 Int_DeckLeftPadding,
 Int_DeckTopPadding,
 Int_DeckRightPadding,
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index ee6b901c65de..9738ae6ca29f 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -95,16 +95,6 @@ void TabBar::dispose()
 InterimItemWindow::dispose();
 }
 
-void TabBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& 
rUpdateArea)
-{
-InterimItemWindow::Paint(rRenderContext, rUpdateArea);
-
-const sal_Int32 
nHorizontalPadding(Theme::GetInteger(Theme::Int_TabMenuSeparatorPadding));
-
rRenderContext.SetLineColor(Theme::GetColor(Theme::Color_TabMenuSeparator));
-rRenderContext.DrawLine(Point(nHorizontalPadding, mnMenuSeparatorY),
-Point(GetSizePixel().Width() - nHorizontalPadding, 
mnMenuSeparatorY));
-}
-
 sal_Int32 TabBar::GetDefaultWidth()
 {
 if (!gDefaultWidth)
diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx
index 063572b5c97e..bd64a87b7907 100644
--- a/sfx2/source/sidebar/Theme.cxx
+++ b/sfx2/source/sidebar/Theme.cxx
@@ -180,16 +180,6 @@ void Theme::UpdateTheme()
 maPropertyIdToNameMap[Color_TabBarBackground],
 Any(sal_Int32(aBaseBackgroundColor.GetRGBColor(;
 
-setPropertyValue(
-maPropertyIdToNameMap[Int_TabMenuPadding],
-Any(sal_Int32(3)));
-setPropertyValue(
-maPropertyIdToNameMap[Color_TabMenuSeparator],
-Any(sal_Int32(aBorderColor.GetRGBColor(;
-setPropertyValue(
-maPropertyIdToNameMap[Int_TabMenuSeparatorPadding],
-Any(sal_Int32(3)));
-
 setPropertyValue(
 maPropertyIdToNameMap[Color_DropDownBackground],
 Any(sal_Int32(aBaseBackgroundColor.GetRGBColor(;
@@ -512,9 +502,6 @@ void Theme::SetupPropertyMaps()
 maPropertyNameToIdMap["Color_PanelTitleFont"]=Color_PanelTitleFont;
 maPropertyIdToNameMap[Color_PanelTitleFont]="Color_PanelTitleFont";
 
-maPropertyNameToIdMap["Color_TabMenuSeparator"]=Color_TabMenuSeparator;
-maPropertyIdToNameMap[Color_TabMenuSeparator]="Color_TabMenuSeparator";
-
 maPropertyNameToIdMap["Color_Highlight"]=Color_Highlight;
 maPropertyIdToNameMap[Color_Highlight]="Color_Highlight";
 
@@ -559,12 +546,6 @@ void Theme::SetupPropertyMaps()
 maPropertyNameToIdMap["Int_PanelTitleBarHeight"]=Int_PanelTitleBarHeight;
 maPropertyIdToNameMap[Int_PanelTitleBarHeight]="Int_PanelTitleBarHeight";
 
-maPropertyNameToIdMap["Int_TabMenuPadding"]=Int_TabMenuPadding;
-maPropertyIdToNameMap[Int_TabMenuPadding]="Int_TabMenuPadding";
-
-
maPropertyNameToIdMap["Int_TabMenuSeparatorPadding"]=Int_TabMenuSeparatorPadding;
-
maPropertyIdToNameMap[Int_TabMenuSeparatorPadding]="Int_TabMenuSeparatorPad

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

2020-12-01 Thread Caolán McNamara (via logerrit)
 sw/source/core/txtnode/ndtxt.cxx |   11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 0b4257bae19500083f530fa78afb6a67f68db75a
Author: Caolán McNamara 
AuthorDate: Tue Nov 17 12:51:32 2020 +
Commit: Xisco Fauli 
CommitDate: Tue Dec 1 15:25:42 2020 +0100

tdf#134626 assertion in ~SwTextNode

taking the simplest example of...
http://bugs.documentfoundation.org/attachment.cgi?id=167361

a) on ctrl+v paste into the new document:

DocumentContentOperationsManager::CopyImplImpl
is called and that (at "Also copy all format templates")
causes SwTextNode::ChgTextCollUpdateNum
to call rDoc.GetNodes().UpdateOutlineNode(*this)

so the new paragraph is now set as an outline node of the
document DocNodes

that seems perfectly reasonable

b) ctrl+v again

no new paragraph, text appended to node of a)

c) ctrl+z

SwUndoSaveContent::MoveToUndoNds is called
and rNodes.MakeTextNode is called to make a
new TextNode to move the content into.

The SwNodes the TextNode is created in are rNds =
rDoc.GetUndoManager().GetUndoNodes(), i.e. the undo nodes.

MakeTextNode calls...
SwTextNode *pNode = new SwTextNode( rWhere, pColl, nullptr )
and the SwTextNode ctor unconditionally does...

GetNodes().UpdateOutlineNode(*this);

so its set as an outline node in those undo SwNodes

In SwNodes::MakeTextNode right after the
SwTextNode *pNode = new SwTextNode( rWhere, pColl, nullptr )
call we have...

// call method  only for the document nodes array
if ( IsDocNodes() )
UpdateOutlineNode(*pNode);

That seems odd, because we have *already* unconditionally called
UpdateOutlineNode in the SwTextNode ctor.

d) ctrl+z
The SwTextFormatColl is destroyed
and SwTextNode::TriggerNodeUpdate
is called for the TextNode of a) and is updated. It is also
called for the TextNode of c) but due to...

// #125329# - assure that text node is in document nodes array
if ( !rDoc.IsInDtor() && &rDoc.GetNodes() == &GetNodes() )

c is *not* updated, so on eventual dtor of c the assert fires.

Change-Id: I56f9b00dd4665fd44359a01baef66c82937c2781

---

If the conditional UpdateOutlineNode call in SwNodes::MakeTextNode is
the right thing to do where only TextNodes in the DocNodes should be
updated, then presumably the equivalent call in the SwTextNode
ctor should be also conditional, making that MakeTextNode call redundant
in any case.

ChgTextCollUpdateNum always calls
rDoc.GetNodes().UpdateOutlineNode(*this);
which suggests that the SwTextNode::ChgFormatColl function should
rely on that to call UpdateOutlineNode and not call it directly
to also avoid a UpdateOutlineNode in the undo nodes

Change-Id: Iedc3fb4d41c24dbbe41fbac259abe41d3757be09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106011
Tested-by: Jenkins
Tested-by: Xisco Fauli 
Reviewed-by: Michael Stahl 
(cherry picked from commit 138cf950dcdc8a1240452cad6867e197279f42b0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106937
Reviewed-by: Xisco Fauli 

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 62b8171387b5..3d48aded03cc 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -110,10 +110,6 @@ SwTextNode *SwNodes::MakeTextNode( const SwNodeIndex & 
rWhere,
 
 SwNodeIndex aIdx( *pNode );
 
-// call method  only for the document nodes array
-if ( IsDocNodes() )
-UpdateOutlineNode(*pNode);
-
 // if there is no layout or it is in a hidden section, MakeFrames is not 
needed
 const SwSectionNode* pSectNd;
 if (!bNewFrames ||
@@ -220,7 +216,10 @@ SwTextNode::SwTextNode( const SwNodeIndex &rWhere, 
SwTextFormatColl *pTextColl,
 }
 AddToList();
 }
-GetNodes().UpdateOutlineNode(*this);
+
+// call method  only for the document nodes array
+if (GetNodes().IsDocNodes())
+GetNodes().UpdateOutlineNode(*this);
 
 m_bNotifiable = true;
 
@@ -3932,8 +3931,6 @@ SwFormatColl* SwTextNode::ChgFormatColl( SwFormatColl 
*pNewColl )
 ChgTextCollUpdateNum( pOldColl, static_cast(pNewColl) );
 }
 
-GetNodes().UpdateOutlineNode(*this);
-
 return pOldColl;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Noel (via logerrit)
 xmloff/source/text/XMLFootnoteImportContext.cxx |   33 +++-
 xmloff/source/text/XMLFootnoteImportContext.hxx |5 ++-
 2 files changed, 13 insertions(+), 25 deletions(-)

New commits:
commit 048eebd2f282634ffa2b7b2bc29436adae96769a
Author: Noel 
AuthorDate: Tue Dec 1 10:21:52 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Dec 1 15:09:27 2020 +0100

fastparser in XMLFootnoteImportContext

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

diff --git a/xmloff/source/text/XMLFootnoteImportContext.cxx 
b/xmloff/source/text/XMLFootnoteImportContext.cxx
index 95a30097675e..7ea3ba22f4ac 100644
--- a/xmloff/source/text/XMLFootnoteImportContext.cxx
+++ b/xmloff/source/text/XMLFootnoteImportContext.cxx
@@ -73,8 +73,9 @@ XMLFootnoteImportContext::XMLFootnoteImportContext(
 {
 }
 
-void XMLFootnoteImportContext::StartElement(
-const Reference & xAttrList)
+void XMLFootnoteImportContext::startFastElement(
+sal_Int32 /*nElement*/,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
 // create footnote
 Reference xFactory(GetImport().GetModel(),
@@ -84,18 +85,11 @@ void XMLFootnoteImportContext::StartElement(
 
 // create endnote or footnote
 bool bIsEndnote = false;
-sal_Int16 nLength = xAttrList->getLength();
-for(sal_Int16 nAttr1 = 0; nAttr1 < nLength; nAttr1++)
+for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
 {
-OUString sLocalName;
-sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
-GetKeyByAttrName( xAttrList->getNameByIndex(nAttr1),
-  &sLocalName );
-if( XML_NAMESPACE_TEXT == nPrefix && IsXMLToken( sLocalName,
-XML_NOTE_CLASS ) )
+if( aIter.getToken() == XML_ELEMENT(TEXT, XML_NOTE_CLASS) )
 {
-const OUString& rValue = xAttrList->getValueByIndex( nAttr1 );
-if( IsXMLToken( rValue, XML_ENDNOTE ) )
+if( IsXMLToken( aIter.toString(), XML_ENDNOTE ) )
 bIsEndnote = true;
 break;
 }
@@ -111,15 +105,9 @@ void XMLFootnoteImportContext::StartElement(
 rHelper.InsertTextContent(xTextContent);
 
 // process id attribute
-for(sal_Int16 nAttr2 = 0; nAttr2 < nLength; nAttr2++)
+for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
 {
-OUString sLocalName;
-sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
-GetKeyByAttrName( xAttrList->getNameByIndex(nAttr2),
-  &sLocalName );
-
-if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- IsXMLToken( sLocalName, XML_ID )   )
+if( aIter.getToken() == XML_ELEMENT(TEXT, XML_ID) )
 {
 // get ID ...
 Reference xPropertySet(xTextContent, UNO_QUERY);
@@ -128,9 +116,8 @@ void XMLFootnoteImportContext::StartElement(
 aAny >>= nID;
 
 // ... and insert into map
-rHelper.InsertFootnoteID(
-xAttrList->getValueByIndex(nAttr2),
-nID);
+rHelper.InsertFootnoteID( aIter.toString(), nID);
+break;
 }
 }
 
diff --git a/xmloff/source/text/XMLFootnoteImportContext.hxx 
b/xmloff/source/text/XMLFootnoteImportContext.hxx
index ff2acc296988..6c20b1a331cd 100644
--- a/xmloff/source/text/XMLFootnoteImportContext.hxx
+++ b/xmloff/source/text/XMLFootnoteImportContext.hxx
@@ -61,8 +61,9 @@ public:
 
 protected:
 
-virtual void StartElement(
-const css::uno::Reference & xAttrList) 
override;
+virtual void SAL_CALL startFastElement(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& 
xAttrList ) override;
 
 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Stephan Bergmann (via logerrit)
 sc/qa/unit/subsequent_filters-test.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 97a857b17d06fcc5de5d284424ba1831ee3bac4a
Author: Stephan Bergmann 
AuthorDate: Tue Dec 1 11:31:29 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Dec 1 14:59:25 2020 +0100

Simplify nullptr

With 3741b90abe478fb04db88207b496a5238df35bb8 "tdf#138483 sc: update red 
circles
after merging cells", UBSan builds had started to fail as
CppunitTest_sc_subsequent_filters_test now need ScUndoRemoveMerge RTTI:

> [CUT] sc_subsequent_filters_test
> DynamicLibraryManagerException: "Failed to load dynamic library: 
workdir/LinkTarget/CppunitTest/libtest_sc_subsequent_filters_test.so
> workdir/LinkTarget/CppunitTest/libtest_sc_subsequent_filters_test.so: 
undefined symbol: _ZTI17ScUndoRemoveMerge"

But as pUndoRemoveMerge was always empty, we can just as well remove the
variable completely.  (Though I do not know whether pUndoRemoveMerge being 
empty
is what 3741b90abe478fb04db88207b496a5238df35bb8 had actually intended.)

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

diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index 2ef3cf4fb326..a00e756bcbc8 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -552,8 +552,7 @@ void ScFiltersTest::testUpdateCircleInMergedCellODS()
 // There should be a circle object!
 CPPUNIT_ASSERT_EQUAL(static_cast(1), pPage->GetObjCount());
 
-std::unique_ptr pUndoRemoveMerge;
-xDocSh->GetDocFunc().UnmergeCells(aCellMergeOption, true, 
pUndoRemoveMerge.get());
+xDocSh->GetDocFunc().UnmergeCells(aCellMergeOption, true, nullptr);
 
 // There should be four circle objects!
 CPPUNIT_ASSERT_EQUAL(static_cast(4), pPage->GetObjCount());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sax/qa sax/source scaddins/IwyuFilter_scaddins.yaml scaddins/source sccomp/IwyuFilter_sccomp.yaml scripting/source sdext/source sfx2/IwyuFilter_sfx2.yaml sfx2/source sh

2020-12-01 Thread Gabor Kelemen (via logerrit)
 sax/qa/cppunit/parser.cxx   |2 
 sax/source/fastparser/fastparser.cxx|2 
 sax/source/tools/fastattribs.cxx|1 
 sax/source/tools/fshelper.cxx   |1 
 scaddins/IwyuFilter_scaddins.yaml   |   13 ++
 scaddins/source/analysis/analysis.cxx   |3 
 scaddins/source/analysis/analysisdefs.hxx   |3 
 scaddins/source/analysis/financial.cxx  |1 
 scaddins/source/datefunc/datefunc.cxx   |1 
 scaddins/source/pricing/pricing.cxx |4 
 sccomp/IwyuFilter_sccomp.yaml   |3 
 scripting/source/basprov/basprov.cxx|1 
 scripting/source/dlgprov/dlgprov.cxx|2 
 scripting/source/protocolhandler/scripthandler.cxx  |3 
 scripting/source/provider/BrowseNodeFactoryImpl.cxx |2 
 scripting/source/provider/MasterScriptProvider.cxx  |3 
 scripting/source/provider/MasterScriptProviderFactory.cxx   |1 
 scripting/source/stringresource/stringresource.cxx  |1 
 sdext/source/presenter/PresenterProtocolHandler.hxx |1 
 sdext/source/presenter/PresenterTimer.cxx   |1 
 sfx2/IwyuFilter_sfx2.yaml   |   47 
--
 sfx2/source/appl/app.cxx|2 
 sfx2/source/appl/appcfg.cxx |1 
 sfx2/source/appl/appmisc.cxx|3 
 sfx2/source/appl/appquit.cxx|2 
 sfx2/source/appl/appserv.cxx|8 -
 sfx2/source/appl/helpinterceptor.cxx|1 
 sfx2/source/appl/newhelp.cxx|3 
 sfx2/source/appl/sfxpicklist.cxx|1 
 sfx2/source/control/charwin.cxx |1 
 sfx2/source/control/listview.cxx|8 -
 sfx2/source/control/recentdocsviewitem.cxx  |1 
 sfx2/source/control/templatedlglocalview.cxx|1 
 sfx2/source/control/templatelocalview.cxx   |1 
 sfx2/source/control/thumbnailview.cxx   |1 
 sfx2/source/control/thumbnailviewitem.cxx   |1 
 sfx2/source/dialog/backingwindow.cxx|3 
 sfx2/source/dialog/basedlgs.cxx |1 
 sfx2/source/dialog/infobar.cxx  |2 
 sfx2/source/dialog/tabdlg.cxx   |2 
 sfx2/source/dialog/templdlg.cxx |5 -
 sfx2/source/dialog/versdlg.cxx  |1 
 sfx2/source/doc/SfxDocumentMetaData.cxx |1 
 sfx2/source/doc/objembed.cxx|3 
 sfx2/source/doc/objitem.cxx |1 
 sfx2/source/doc/objmisc.cxx |1 
 sfx2/source/doc/objserv.cxx |1 
 sfx2/source/doc/ownsubfilterservice.cxx |1 
 sfx2/source/doc/printhelper.cxx |1 
 sfx2/source/doc/sfxmodelfactory.cxx |9 -
 sfx2/source/doc/templatedlg.cxx |9 -
 sfx2/source/explorer/nochaos.cxx|1 
 sfx2/source/notebookbar/SfxNotebookBar.cxx  |2 
 sfx2/source/notify/eventsupplier.cxx|4 
 sfx2/source/sidebar/ControllerItem.cxx  |2 
 sfx2/source/sidebar/Deck.cxx|2 
 sfx2/source/sidebar/PanelTitleBar.cxx   |6 -
 sfx2/source/sidebar/SidebarController.cxx   |4 
 sfx2/source/sidebar/SidebarDockingWindow.cxx|2 
 sfx2/source/sidebar/TabBar.cxx  |4 
 sfx2/source/sidebar/Theme.cxx   |2 
 sfx2/source/sidebar/Tools.cxx   |1 
 sfx2/source/toolbox/tbxitem.cxx |3 
 sfx2/source/view/frame.cxx  |1 
 sfx2/source/view/lokcharthelper.cxx |1 
 sfx2/source/view/lokhelper.cxx  |1 
 sfx2/source/view/viewfrm.cxx|1 
 sfx2/source/view/viewsh.cxx |2 
 shell/source/ba

Re: Trouble with SdrMeasureObj (dimension line)

2020-12-01 Thread Miklos Vajna
Hi Regina,

On Tue, Dec 01, 2020 at 01:25:22PM +0100, Regina Henschel 
 wrote:
> The approach with dispatcher did not work. But after some days and several
> failed attempts I found a solution to create the default measure line:
> 
>ScTabViewShell* pTabViewShell = pDocSh->GetBestViewShell(false);
>SfxRequest aReq(pTabViewShell->GetViewFrame(), SID_DRAW_MEASURELINE);
>aReq.SetModifier(8192); // Ctrl
>pTabViewShell->ExecDraw(aReq);
> 
> I had seen the magic number "8192" in uitest

Nice find. :-)

> sw/qa/uitest/writer_tests7/tdf130629.py and in Visual Studio. There might be
> a "speaking" define, I don't know.

That would be KEY_MOD1 in include/vcl/keycodes.hxx, I think.

Regards,

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


New Defects reported by Coverity Scan for LibreOffice

2020-12-01 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

25 new defect(s) introduced to LibreOffice found with Coverity Scan.
2 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent 
build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 20 of 25 defect(s)


** CID 1470375:  Parse warnings  (PARSE_ERROR)
/sax/source/fastparser/fastparser.cxx: 1502 in ()



*** CID 1470375:  Parse warnings  (PARSE_ERROR)
/sax/source/fastparser/fastparser.cxx: 1502 in ()
1496 if( ! bSuccess )
1497 bSuccess = NormalizeW3URI( rName );
1498 }
1499 
1500 const OUStringLiteral 
XML_URI_W3_PREFIX(u"https://u15810271.ct.sendgrid.net/ls/click?upn=CTPegkVN6peWFCMEieYYmMAi6rxYQqD8BK-2BowJuYSxg-3Dc6q9_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi-2B4MXY6F0w8TVlVWTU6jHANV6gdLlgOLABK-2F2IuW4zk32FGVaiuzudvtgyqMeq59PyJPL6-2FrPaQxbjCnUTgXMDX-2Fuk-2BppQlRGHM4-2F2YQxGmTTpxLZRH9xLewuWKwi9NfwFYdUsxACgQYyBgVaSUQ1V3W6t9Wt6uwTc6RxIBsDFrw6JT4cvkBgStNPCql6lLNQ
1501 const OUStringLiteral XML_URI_XFORMS_SUFFIX(u"/xforms");
>>> CID 1470375:  Parse warnings  (PARSE_ERROR)
>>> class template name must be a placeholder for the complete type being 
>>> initialized (not for a component of that type)
1502 const OUStringLiteral 
XML_N_XFORMS_1_0(u"https://u15810271.ct.sendgrid.net/ls/click?upn=CTPegkVN6peWFCMEieYYmE4D34YvVPE16-2FjT4Tl-2FaCEX2vkfxwH3ZDFlUPEa3IWFbStP_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi-2B4MXY6F0w8TVlVWTU6jHAEt0BawV1hb436D-2BC9IReecEo5Ay71l9qnPdaNjsIdbQx8-2BBL40Dn-2FumrEreP5QumVMJBPudpwBxB43W4o1wN4gDmyo909wQTfSTyVz2hvKfu5wIboilLd5jik5W1FduU7lNDL-2BNkbDIg0x0S-2FCHsAxHrZa8GMyZlEXJ3-2FoLiG-2Fr
1503 const OUStringLiteral 
XML_N_SVG(u"https://u15810271.ct.sendgrid.net/ls/click?upn=CTPegkVN6peWFCMEieYYmNsCdS2AhBjuINuzNiQdqd4Du2h6yaUjbK9yiBv9mh4RJZXc_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi-2B4MXY6F0w8TVlVWTU6jHAA3OCKUodGCzvTlHlI7EkVbz9GgsfvnSjr8Jscojq3KsV574ppYVlysR-2FBiFpEvk8k8L73VjyTvPZnm5TDxG-2FqxfQaWszGSDxKm48Sz4-2BJEfHNP1OkEWXNKBk2i7LYEoJNXGDQdWs4pp9Pay7yiR4Fs567jV5tl4XECWXjCsbEpT
1504 const OUStringLiteral 
XML_N_SVG_COMPAT(u"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0");
1505 const OUStringLiteral 
XML_N_FO(u"https://u15810271.ct.sendgrid.net/ls/click?upn=CTPegkVN6peWFCMEieYYmGddCe8wGYJVaRe7igkdO2XLI6htp92A2rsGR3zYeI3XSl5i_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi-2B4MXY6F0w8TVlVWTU6jHAHIBJfocAstr0ttGCGQ0tp2j2FlMJkwhOmhr2iuMvIDnQgcKeALk-2Fg9FvuMUnxWN25JMQEI8xnkHCyyu2eYCSBhcMiKO5M6Pm3pihmPCHiCMpOULOiGLyKf69-2Blh5TkJKe6s-2BWjWf8GiTFGNY-2B9AYdiii1YAb1FOTJNW3mfHDldD
1506 const OUStringLiteral 
XML_N_FO_COMPAT(u"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0");
1507 const OUStringLiteral 
XML_N_SMIL(u"https://u15810271.ct.sendgrid.net/ls/click?upn=CTPegkVN6peWFCMEieYYmA5FGwWkCOniUlZCORDq8ZvZTTztOU1bxWhU85CvVK4jGRtI_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi-2B4MXY6F0w8TVlVWTU6jHACZIz2XZsYsEajFVE6xfaMef3ONm78lbSsQc3AsNY9S4cu16Z1hTVNo9oTdPTwwiB-2Fw3IhB3BZvdpXDdIgDBHrI0CU1LmOsw9aU-2F8iGUwVl1162RX7tnT6dj2qWvccEx6MglkebJTGk5GuWEBhEfqvukGZlWCRYyGvnjxwJBG3WB

** CID 1470374:(STRAY_SEMICOLON)
/basic/source/comp/buffer.cxx: 29 in 
::write>>, unsigned char>(T1, T2)()
/basic/source/comp/buffer.cxx: 29 in 
::write>>, signed char>(T1, T2)()



*** CID 1470374:(STRAY_SEMICOLON)
/basic/source/comp/buffer.cxx: 29 in 
::write>>, unsigned char>(T1, T2)()
23 {
24 const sal_uInt32 UP_LIMIT=0xFF00;
25 
26 template  void write(I it, T n)
27 {
28 *it = static_cast(n & 0xFF);
>>> CID 1470374:(STRAY_SEMICOLON)
>>> An "if" statement with no "then" or "else" is suspicious.
29 if constexpr (sizeof(n) > 1)
30 {
31 for (std::size_t i = 1; i < sizeof(n); ++i)
32 {
33 n >>= 8;
34 *++it = static_cast(n & 0xFF);
/basic/source/comp/buffer.cxx: 29 in 
::write>>, signed char>(T1, T2)()
23 {
24 const sal_uInt32 UP_LIMIT=0xFF00;
25 
26 template  void write(I it, T n)
27 {
28 *it = static_cast(n & 0xFF);
>>> CID 1470374:(STRAY_SEMICOLON)
>>> An "if" statement with no "then" or "else" is suspicious.
29 if constexpr (sizeof(n) > 1)
30 {
31 for (std::size_t i = 1; i < sizeof(n); ++i)
32 {
33 n >>= 8;
34 *++it = static_cast(n & 0xFF);

** CID 1470373:  Incorrect expression  (IDENTICAL_BRANCHES)
/starmath/source/mathmlimport.cxx: 1400 in 
::SmXMLOperatorContext_Impl::TCharacters(const rtl::OUString &)()


___

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - helpcontent2

2020-12-01 Thread Mike Kaganski (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f9e029c78dc17da90931dee8aaabba8e80083886
Author: Mike Kaganski 
AuthorDate: Tue Dec 1 14:41:39 2020 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Dec 1 14:41:39 2020 +0100

Update git submodules

* Update helpcontent2 from branch 'libreoffice-7-1'
  to 3a7095a6de5b431e80987da81311505e6639bbbd
  - Regex: improve \u/\U description

Change-Id: Id5c69c045fe0ebc856c62640efae92e6147f5c10
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/106935
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 
(cherry picked from commit bcbb4105763653a71881bf2c18c275a686078511)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/106945
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index 8749baf2e067..3a7095a6de5b 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 8749baf2e0677de36216d73506f0df42a5cc0dee
+Subproject commit 3a7095a6de5b431e80987da81311505e6639bbbd
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Branch 'libreoffice-7-1' - source/text

2020-12-01 Thread Mike Kaganski (via logerrit)
 source/text/shared/01/0211.xhp |2 +-
 source/text/shared/04/0101.xhp |3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 3a7095a6de5b431e80987da81311505e6639bbbd
Author: Mike Kaganski 
AuthorDate: Tue Dec 1 07:40:41 2020 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Dec 1 14:41:39 2020 +0100

Regex: improve \u/\U description

Change-Id: Id5c69c045fe0ebc856c62640efae92e6147f5c10
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/106935
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 
(cherry picked from commit bcbb4105763653a71881bf2c18c275a686078511)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/106945
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/source/text/shared/01/0211.xhp 
b/source/text/shared/01/0211.xhp
index dbc0d877c..8e5cea57e 100644
--- a/source/text/shared/01/0211.xhp
+++ b/source/text/shared/01/0211.xhp
@@ -194,7 +194,7 @@
 
 The 
character represented by the four-digit hexadecimal Unicode code 
().
 The 
character represented by the eight-digit hexadecimal Unicode code 
().
-For 
certain symbol fonts the Unicode code for special characters may depend on the 
font in use. The Unicode codes can be viewed by choosing Insert - 
Special Character.
+For 
certain symbol fonts the symbol (glyph) that you see on screen may look related 
to a different Unicode code than that is actually used for it in the font. The 
Unicode codes can be viewed by choosing Insert - Special 
Character, or using Unicode conversion 
shortcut.
 
   
   
diff --git a/source/text/shared/04/0101.xhp 
b/source/text/shared/04/0101.xhp
index 8067d08ec..80bae7687 100644
--- a/source/text/shared/04/0101.xhp
+++ b/source/text/shared/04/0101.xhp
@@ -52,10 +52,11 @@
   Some of the 
characters shown on the menu bar are underlined. You can access these menus 
directly by pressing the underlined character together with the 
Alt key. Once the menu is opened, you will again find 
underlined characters. You can access these menu items directly by simply 
pressing the underlined character key.
   
 
+  
 Entering Unicode Characters
 You can enter arbitrary 
Unicode characters in the document typing the Unicode hexadecimal code point 
and then pressing Command+Option+XAlt+X
 (default). Type the Unicode hexadecimal notation and press Command+Option+XAlt+X
 to toggle between the Unicode character and its hexadecimal notation. 
Selection is not necessary but the conversion will apply to the selected 
characters. Toggling occurs on the characters prior to the cursor position when 
these characters form a valid Unicode hexadecimal point. Hexadecimal code 
points with value in the range U+ to U+0020 are not converted.
 The default Unicode 
conversion shortcut is Command+Option+XAlt+X
 and Command+Option+CAlt+C
 in some locales where the default Unicode shortcut interferes with the main 
menu shortcut. To reassign the shortcut, choose Tools > Customize > 
Keyboard and select Category:Options with 
Function:Toggle Unicode Notation.
-
+  
 Using Shortcut Keys to Control Dialogs
   There is 
always one element highlighted in any given dialog - usually shown by a broken 
frame. This element, which can be either a button, an option field, an entry in 
a list box or a check box, is said to have the focus on it. If the focal point 
is a button, pressing Enter runs it as if you had 
clicked it. A check box is toggled by pressing the Spacebar. If an option field has the focus, use the arrow 
keys to change the activated option field in that area. Use the Tab key to go from one element or area to the next one, 
use Shift+Tab to go in the reverse 
direction.
   Pressing 
Esc closes the dialog without saving changes. 

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Caolán McNamara (via logerrit)
 sc/source/core/data/postit.cxx |   11 ---
 svx/source/svdraw/svdotxat.cxx |7 +--
 2 files changed, 5 insertions(+), 13 deletions(-)

New commits:
commit 9c94bae963ef5019f6ca0394d076b1288969aa53
Author: Caolán McNamara 
AuthorDate: Tue Dec 1 09:09:45 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 14:39:19 2020 +0100

Resolves: tdf#138549 use GetSpecialTextBoxShadow to identify ScPostIt

instead of a 'special' name which causes undo-related causes side effects

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

diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 7bb1b96eb2b4..bafd2e9e901b 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -382,17 +382,6 @@ void ScCaptionCreator::CreateCaption( bool bShown, bool 
bTailFront )
 *mrDoc.GetDrawLayer(), //  should ret a ref?
 aTextRect,
 aTailPos));
-
-// tdf#114956 a way to recognize that this SdrCaption is for a ScPostit in
-// SdrTextObj::AdjustTextFrameWidthAndHeight
-SdrModel& rModel = mxCaption->getSdrModelFromSdrObject();
-const bool bUndoEnabled = rModel.IsUndoEnabled();
-if (bUndoEnabled)
-rModel.EnableUndo(false);
-mxCaption->SetName("ScPostIt");
-if (bUndoEnabled)
-rModel.EnableUndo(true);
-
 // basic caption settings
 ScCaptionUtil::SetBasicCaptionSettings( *mxCaption, bShown );
 }
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
index 4b96bb04c12a..5ba5ec6a82cc 100644
--- a/svx/source/svdraw/svdotxat.cxx
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -263,8 +263,12 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight()
 if (auto pRectObj = dynamic_cast(this)) { // this is a 
hack
 pRectObj->SetXPolyDirty();
 }
+bool bScPostIt = false;
 if (auto pCaptionObj = dynamic_cast(this)) { // this 
is a hack
 pCaptionObj->ImpRecalcTail();
+// tdf#114956, tdf#138549 use GetSpecialTextBoxShadow to recognize
+// that this SdrCaption is for a ScPostit
+bScPostIt = pCaptionObj->GetSpecialTextBoxShadow();
 }
 
 // to not slow down EditView visualization on Overlay (see
@@ -278,8 +282,7 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight()
 GetTextEditOutliner() &&
 GetTextEditOutliner()->hasEditViewCallbacks());
 
-// tdf#114956 always broadcast change for ScPostIts
-if (!bSuppressChangeWhenEditOnOverlay || GetName() == "ScPostIt")
+if (!bSuppressChangeWhenEditOnOverlay || bScPostIt)
 {
 SetChanged();
 BroadcastObjectChange();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Caolán McNamara (via logerrit)
 sfx2/source/sidebar/TabBar.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 87ea90dfdd9cc9a430487cfb6e37a5dd6b393a53
Author: Caolán McNamara 
AuthorDate: Tue Dec 1 10:24:26 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 14:38:45 2020 +0100

cid#1470371 Uninitialized scalar field

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

diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index 11567b228eb0..b4cd8907d96b 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -237,6 +237,8 @@ TabBar::Item::Item(TabBar& rTabBar)
 : mrTabBar(rTabBar)
 , mxBuilder(Application::CreateBuilder(rTabBar.GetContainer(), 
"sfx/ui/tabbutton.ui"))
 , mxButton(mxBuilder->weld_toolbar("button"))
+, mbIsHidden(false)
+, mbIsHiddenByDefault(false)
 {
 }
 
___
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' - sc/source

2020-12-01 Thread Luboš Luňák (via logerrit)
 sc/source/core/data/table3.cxx |   48 ++---
 1 file changed, 40 insertions(+), 8 deletions(-)

New commits:
commit 8d29d0cee0b16df71134cd82d3fc0dbcdcd3dde3
Author: Luboš Luňák 
AuthorDate: Tue Nov 24 15:23:22 2020 +0100
Commit: Luboš Luňák 
CommitDate: Tue Dec 1 14:30:12 2020 +0100

bring back optimized calc querying by value (tdf#133878)

When filtering, if the filtered value was a number, Calc used
to convert the string value from the autofilter dialog to a number,
since querying by numerical value is much faster then comparing
strings. Commit 42e472b5870278058537d43d03d457dc80b16166 tried
to fix a problem with filtering time values (that are internally
also represented as a float) by moving this optimization elsewhere,
but that had 2 problems: 1) the problem was with the time value
getting rounded to seconds for display and then converting back
to float value for querying, so the move would not have fixed
anything, 2) the move "fixed" the problem by essentially disabling
the optimization (the new code doesn't get called with the doc
from tdf#105629).
This commit reverts that (actually, it does the optimization in both
places, since at least the unittest requires it in the other place,
and it seems to make sense to keep it there too). As a fix
for the original problem, this this optimization is allowed
only for number formats where this problem should not occur.

Change-Id: I2fb56dea9577c59b870c29e26bb5f09ef9ddec82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106594
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 
Reviewed-by: Luboš Luňák 
(cherry picked from commit 85cb9262644ebe376f9c5af1f01a0216a51a6d6d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106941

diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index a528117f1d74..b4967a9a31dd 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -2978,6 +2978,29 @@ void ScTable::TopTenQuery( ScQueryParam& rParam )
 
 namespace {
 
+bool CanOptimizeQueryStringToNumber( SvNumberFormatter* pFormatter, sal_uInt32 
nFormatIndex )
+{
+// tdf#105629: ScQueryEntry::ByValue queries are faster than 
ScQueryEntry::ByString.
+// The problem with this optimization is that the autofilter dialog 
apparently converts
+// the value to text and then converts that back to a number for filtering.
+// If that leads to any change of value (such as when time is rounded to 
seconds),
+// even matching values will be filtered out. Therefore query by value 
only for formats
+// where no such change should occur.
+if(const SvNumberformat* pEntry = pFormatter->GetEntry(nFormatIndex))
+{
+switch(pEntry->GetType())
+{
+case SvNumFormatType::NUMBER:
+case SvNumFormatType::FRACTION:
+case SvNumFormatType::SCIENTIFIC:
+return true;
+default:
+break;
+}
+}
+return false;
+}
+
 class PrepareQueryItem
 {
 const ScDocument& mrDoc;
@@ -2986,15 +3009,26 @@ public:
 
 void operator() (ScQueryEntry::Item& rItem)
 {
-// Double-check if the query by date is really appropriate.
-
-if (rItem.meType != ScQueryEntry::ByDate)
+if (rItem.meType != ScQueryEntry::ByString && rItem.meType != 
ScQueryEntry::ByDate)
 return;
 
 sal_uInt32 nIndex = 0;
 bool bNumber = mrDoc.GetFormatTable()->
 IsNumberFormat(rItem.maString.getString(), nIndex, rItem.mfVal);
 
+// Advanced Filter creates only ByString queries that need to be
+// converted to ByValue if appropriate. rItem.mfVal now holds the value
+// if bNumber==true.
+
+if (rItem.meType == ScQueryEntry::ByString)
+{
+if (bNumber && CanOptimizeQueryStringToNumber( 
mrDoc.GetFormatTable(), nIndex ))
+rItem.meType = ScQueryEntry::ByValue;
+return;
+}
+
+// Double-check if the query by date is really appropriate.
+
 if (bNumber && ((nIndex % SV_COUNTRY_LANGUAGE_OFFSET) != 0))
 {
 const SvNumberformat* pEntry = 
mrDoc.GetFormatTable()->GetEntry(nIndex);
@@ -3360,19 +3394,17 @@ bool ScTable::CreateQueryParam(SCCOL nCol1, SCROW 
nRow1, SCCOL nCol2, SCROW nRow
 
 SvNumberFormatter* pFormatter = rDocument.GetFormatTable();
 nCount = rQueryParam.GetEntryCount();
-
 if (bValid)
 {
-//  bQueryByString must be set
+//  query type must be set
 for (i=0; i < nCount; i++)
 {
 ScQueryEntry::Item& rItem = rQueryParam.GetEntry(i).GetQueryItem();
-
 sal_uInt32 nIndex = 0;
 bool bNumber = pFormatter->IsNumberFormat(
 rItem.maString.getString(), nIndex, rItem.mfVal);
-
-rItem.meType = bNumber ? ScQueryEntry::ByValue : 
ScQueryEntry::ByStri

[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - vcl/source

2020-12-01 Thread Caolán McNamara (via logerrit)
 vcl/source/gdi/print.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit e7c9da0a69077902fb44ff40b1efa70b9380969f
Author: Caolán McNamara 
AuthorDate: Tue Dec 1 10:17:18 2020 +
Commit: Samuel Mehrbrodt 
CommitDate: Tue Dec 1 14:13:23 2020 +0100

cid#1202935 Uninitialized scalar field

Change-Id: Ie95426e6188253dd5f2bd77782f62647d9ddba50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106956
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit ad53629186343f8a111b4bee21721e8b446bd8a2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106946
Tested-by: Samuel Mehrbrodt 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index a5fe96a76db0..956ca7a01c57 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -480,6 +480,7 @@ void Printer::ImplInitData()
 mbPrintFile = false;
 mbInPrintPage   = false;
 mbNewJobSetup   = false;
+mbSinglePrintJobs   = false;
 mpInfoPrinter   = nullptr;
 mpPrinter   = nullptr;
 mpDisplayDev= nullptr;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Caolán McNamara (via logerrit)
 include/sfx2/sidebar/TabBar.hxx |2 --
 include/sfx2/sidebar/Theme.hxx  |3 ---
 sfx2/source/sidebar/TabBar.cxx  |   10 --
 sfx2/source/sidebar/Theme.cxx   |   22 --
 4 files changed, 37 deletions(-)

New commits:
commit e5529e3a89df2b9bd5d76e3b8fbbfa17c4203d28
Author: Caolán McNamara 
AuthorDate: Tue Dec 1 10:22:09 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 14:01:45 2020 +0100

cid#1470362 Uninitialized scalar field

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

diff --git a/include/sfx2/sidebar/TabBar.hxx b/include/sfx2/sidebar/TabBar.hxx
index e52202ac1bb0..1738df1e2bfe 100644
--- a/include/sfx2/sidebar/TabBar.hxx
+++ b/include/sfx2/sidebar/TabBar.hxx
@@ -69,7 +69,6 @@ public:
 virtual ~TabBar() override;
 virtual void dispose() override;
 
-virtual void Paint (vcl::RenderContext& /*rRenderContext*/, const 
tools::Rectangle& rUpdateArea) override;
 virtual void DataChanged (const DataChangedEvent& rDataChangedEvent) 
override;
 virtual bool EventNotify (NotifyEvent& rEvent) override;
 
@@ -120,7 +119,6 @@ private:
 typedef ::std::vector> ItemContainer;
 ItemContainer maItems;
 const ::std::function 
maDeckActivationFunctor;
-sal_Int32 mnMenuSeparatorY;
 PopupMenuProvider maPopupMenuProvider;
 
 static void CreateTabItem(weld::Toolbar& rButton, const DeckDescriptor& 
rDeckDescriptor);
diff --git a/include/sfx2/sidebar/Theme.hxx b/include/sfx2/sidebar/Theme.hxx
index 9b35ce7aa6dd..c59d71233b00 100644
--- a/include/sfx2/sidebar/Theme.hxx
+++ b/include/sfx2/sidebar/Theme.hxx
@@ -61,7 +61,6 @@ public:
 
 Color_DeckTitleFont,
 Color_PanelTitleFont,
-Color_TabMenuSeparator,
 Color_Highlight,
 Color_HighlightText,
 Color_DeckBackground,
@@ -79,8 +78,6 @@ public:
 Int_DeckBorderSize,
 Int_DeckSeparatorHeight,
 Int_PanelTitleBarHeight,
-Int_TabMenuPadding,
-Int_TabMenuSeparatorPadding,
 Int_DeckLeftPadding,
 Int_DeckTopPadding,
 Int_DeckRightPadding,
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index 6efe1133bda9..11567b228eb0 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -95,16 +95,6 @@ void TabBar::dispose()
 InterimItemWindow::dispose();
 }
 
-void TabBar::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& 
rUpdateArea)
-{
-InterimItemWindow::Paint(rRenderContext, rUpdateArea);
-
-const sal_Int32 
nHorizontalPadding(Theme::GetInteger(Theme::Int_TabMenuSeparatorPadding));
-
rRenderContext.SetLineColor(Theme::GetColor(Theme::Color_TabMenuSeparator));
-rRenderContext.DrawLine(Point(nHorizontalPadding, mnMenuSeparatorY),
-Point(GetSizePixel().Width() - nHorizontalPadding, 
mnMenuSeparatorY));
-}
-
 sal_Int32 TabBar::GetDefaultWidth()
 {
 if (!gDefaultWidth)
diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx
index 063572b5c97e..bd64a87b7907 100644
--- a/sfx2/source/sidebar/Theme.cxx
+++ b/sfx2/source/sidebar/Theme.cxx
@@ -180,16 +180,6 @@ void Theme::UpdateTheme()
 maPropertyIdToNameMap[Color_TabBarBackground],
 Any(sal_Int32(aBaseBackgroundColor.GetRGBColor(;
 
-setPropertyValue(
-maPropertyIdToNameMap[Int_TabMenuPadding],
-Any(sal_Int32(3)));
-setPropertyValue(
-maPropertyIdToNameMap[Color_TabMenuSeparator],
-Any(sal_Int32(aBorderColor.GetRGBColor(;
-setPropertyValue(
-maPropertyIdToNameMap[Int_TabMenuSeparatorPadding],
-Any(sal_Int32(3)));
-
 setPropertyValue(
 maPropertyIdToNameMap[Color_DropDownBackground],
 Any(sal_Int32(aBaseBackgroundColor.GetRGBColor(;
@@ -512,9 +502,6 @@ void Theme::SetupPropertyMaps()
 maPropertyNameToIdMap["Color_PanelTitleFont"]=Color_PanelTitleFont;
 maPropertyIdToNameMap[Color_PanelTitleFont]="Color_PanelTitleFont";
 
-maPropertyNameToIdMap["Color_TabMenuSeparator"]=Color_TabMenuSeparator;
-maPropertyIdToNameMap[Color_TabMenuSeparator]="Color_TabMenuSeparator";
-
 maPropertyNameToIdMap["Color_Highlight"]=Color_Highlight;
 maPropertyIdToNameMap[Color_Highlight]="Color_Highlight";
 
@@ -559,12 +546,6 @@ void Theme::SetupPropertyMaps()
 maPropertyNameToIdMap["Int_PanelTitleBarHeight"]=Int_PanelTitleBarHeight;
 maPropertyIdToNameMap[Int_PanelTitleBarHeight]="Int_PanelTitleBarHeight";
 
-maPropertyNameToIdMap["Int_TabMenuPadding"]=Int_TabMenuPadding;
-maPropertyIdToNameMap[Int_TabMenuPadding]="Int_TabMenuPadding";
-
-
maPropertyNameToIdMap["Int_TabMenuSeparatorPadding"]=Int_TabMenuSeparatorPadding;
-
maPropertyIdToNameMap[Int_TabMenuSeparatorPadding]="Int_TabMenuSeparatorPad

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

2020-12-01 Thread Szymon Kłos (via logerrit)
 sc/source/ui/cctrl/checklistmenu.cxx |5 -
 sc/source/ui/inc/checklistmenu.hxx   |1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 8e75c42253d92a014baf24dda82d3379bd736978
Author: Szymon Kłos 
AuthorDate: Mon Nov 23 09:41:37 2020 +0100
Commit: Szymon Kłos 
CommitDate: Tue Dec 1 13:48:45 2020 +0100

Avoid crash while closing autofilter

EndPopupMode called on destroy causes set of actions
which may cause a crash in DockingManager

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

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index deeb987ee806..6798520f1ffb 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -400,7 +400,8 @@ void ScCheckListMenuControl::setSubMenuFocused(const 
ScCheckListMenuControl* pSu
 void ScCheckListMenuControl::EndPopupMode()
 {
 vcl::Window::GetDockingManager()->EndPopupMode(mxFrame);
-mxFrame->EnableDocking(false);
+if (!mbDisposing)
+mxFrame->EnableDocking(false);
 }
 
 void ScCheckListMenuControl::StartPopupMode(const tools::Rectangle& rRect, 
FloatWinPopupFlags eFlags)
@@ -465,6 +466,7 @@ 
ScCheckListMenuControl::ScCheckListMenuControl(ScCheckListMenuWindow* pParent, v
 , mbCanHaveSubMenu(bCanHaveSubMenu)
 , maOpenTimer(this)
 , maCloseTimer(this)
+, mbDisposing(false)
 {
 /*
tdf#136559 If we have no dates we don't need a tree
@@ -579,6 +581,7 @@ void ScCheckListMenuControl::GrabFocus()
 
 ScCheckListMenuControl::~ScCheckListMenuControl()
 {
+mbDisposing = true;
 EndPopupMode();
 for (auto& rMenuItem : maMenuItems)
 rMenuItem.mxSubMenuWin.disposeAndClear();
diff --git a/sc/source/ui/inc/checklistmenu.hxx 
b/sc/source/ui/inc/checklistmenu.hxx
index 5d4d6a6abd33..74014e9ce80d 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -293,6 +293,7 @@ private:
 
 SubMenuItemData   maOpenTimer;
 SubMenuItemData   maCloseTimer;
+bool  mbDisposing;
 };
 
 /**
___
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 sc/source vcl/jsdialog

2020-12-01 Thread Szymon Kłos (via logerrit)
 include/vcl/jsdialog/executor.hxx|2 +
 sc/source/ui/cctrl/checklistmenu.cxx |   36 +--
 sc/source/ui/view/gridwin2.cxx   |8 ++-
 vcl/jsdialog/executor.cxx|1 
 4 files changed, 44 insertions(+), 3 deletions(-)

New commits:
commit 73827caacedd2ddf8583ac2c4090c7f6ac05f67b
Author: Szymon Kłos 
AuthorDate: Fri Nov 20 12:23:45 2020 +0100
Commit: Szymon Kłos 
CommitDate: Tue Dec 1 13:48:28 2020 +0100

autofilter: fix submenu popup for online

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

diff --git a/include/vcl/jsdialog/executor.hxx 
b/include/vcl/jsdialog/executor.hxx
index 5dde733a3823..038b86b30f64 100644
--- a/include/vcl/jsdialog/executor.hxx
+++ b/include/vcl/jsdialog/executor.hxx
@@ -29,6 +29,8 @@ public:
 rTreeView.signal_row_activated();
 }
 
+static void trigger_changed(weld::TreeView& rTreeView) { 
rTreeView.signal_changed(); }
+
 static void trigger_clicked(weld::Toolbar& rToolbar, const OString& rIdent)
 {
 rToolbar.signal_clicked(rIdent);
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index 0df3819e686c..deeb987ee806 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -34,6 +34,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 
@@ -169,8 +171,14 @@ ScCheckListMenuWindow* 
ScCheckListMenuControl::addSubMenuItem(const OUString& rT
 MenuItemData aItem;
 aItem.mbEnabled = bEnabled;
 vcl::Window *pContainer = mxFrame->GetWindow(GetWindowType::FirstChild);
+
+vcl::ILibreOfficeKitNotifier* pNotifier = nullptr;
+if (comphelper::LibreOfficeKit::isActive())
+pNotifier = SfxViewShell::Current();
+
 aItem.mxSubMenuWin.reset(VclPtr::Create(pContainer, 
mpDoc, false,
-   false, -1, 
mxFrame.get()));
+   false, -1, 
mxFrame.get(),
+   pNotifier));
 maMenuItems.emplace_back(std::move(aItem));
 
 mxMenu->append_text(rText);
@@ -287,6 +295,16 @@ void ScCheckListMenuControl::launchSubMenu(bool 
bSetMenuPos)
 
 mxMenu->select(*mxScratchIter);
 rSubMenuControl.GrabFocus();
+
+// TODO: something better to retrigger JSON dialog invalidation
+if (comphelper::LibreOfficeKit::isActive())
+{
+StringMap args;
+args["cmd"] = "change";
+args["type"] = "checkbox";
+args["data"] = "true";
+jsdialog::ExecuteAction(pSubMenu->GetLOKWindowId(), "toggle_all", 
args);
+}
 }
 
 IMPL_LINK_NOARG(ScCheckListMenuControl, PostPopdownHdl, void*, void)
@@ -515,6 +533,8 @@ 
ScCheckListMenuControl::ScCheckListMenuControl(ScCheckListMenuWindow* pParent, v
 mxMenu->connect_size_allocate(LINK(this, ScCheckListMenuControl, 
TreeSizeAllocHdl));
 }
 
+long nContainerHeight = mxContainer->get_preferred_size().Height() + 
nDiffHeight;
+
 if (!bIsSubMenu)
 {
 // determine what width the checklist will end up with
@@ -524,9 +544,21 @@ 
ScCheckListMenuControl::ScCheckListMenuControl(ScCheckListMenuWindow* pParent, v
 mxTreeChecks->set_size_request(mnCheckWidthReq, nChecksHeight);
 mxListChecks->set_size_request(mnCheckWidthReq, nChecksHeight);
 }
+else
+{
+long nMenuWidth = mxMenu->get_preferred_size().Width();
+long nMenuHeight = mxMenu->get_preferred_size().Height();
+
+if (nMenuWidth < 200)
+nMenuWidth = 200;
+if (nMenuHeight < nContainerHeight * 90 / 100)
+nMenuHeight = nContainerHeight * 90 / 100;
+
+mxMenu->set_size_request(nMenuWidth, nMenuHeight);
+}
 
 mxContainer->set_size_request(mxContainer->get_preferred_size().Width(),
-  mxContainer->get_preferred_size().Height() + 
nDiffHeight);
+  nContainerHeight);
 }
 
 IMPL_LINK_NOARG(ScCheckListMenuControl, FocusHdl, weld::Widget&, void)
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index bfd4eec09a0e..490efe5531be 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -467,8 +467,14 @@ void ScGridWindow::DPLaunchFieldPopupMenu(const Point& 
rScrPos, const Size& rScr
 const ScDPLabelData& rLabelData = pDPData->maLabels;
 
 mpDPFieldPopup.disposeAndClear();
+
+vcl::ILibreOfficeKitNotifier* pNotifier = nullptr;
+if (comphelper::LibreOfficeKit::isActive())
+pNotifier = SfxViewShell::Current();
+
 mpDPFieldPopup.reset(VclPtr::Create(this, 
pViewData->GetDocument(),
-   
bDimOrientNotPage, false));
+

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

2020-12-01 Thread Szymon Kłos (via logerrit)
 include/vcl/dialog.hxx   |2 ++
 vcl/jsdialog/executor.cxx|   12 
 vcl/jsdialog/jsdialogbuilder.cxx |3 +++
 vcl/source/window/dialog.cxx |7 +++
 4 files changed, 24 insertions(+)

New commits:
commit 411034066510d21a960adced5c6f0f14638da972
Author: Szymon Kłos 
AuthorDate: Thu Nov 19 13:50:30 2020 +0100
Commit: Szymon Kłos 
CommitDate: Tue Dec 1 13:48:13 2020 +0100

jsdialog: dump dialog title

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

diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 1f777dfc1629..d02772ce0e63 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -155,6 +155,8 @@ public:
 voidset_default_response(int nResponse);
 int get_default_response() const;
 vcl::Window*get_widget_for_response(int nResponse);
+
+virtual boost::property_tree::ptree DumpAsPropertyTree() override;
 };
 
 #endif // INCLUDED_VCL_DIALOG_HXX
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 85f87ad92a54..f0b5a96462c9 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1607,4 +1607,11 @@ void TopLevelWindowLocker::decBusy()
 m_aBusyStack.pop();
 }
 
+boost::property_tree::ptree Dialog::DumpAsPropertyTree()
+{
+boost::property_tree::ptree aTree(SystemWindow::DumpAsPropertyTree());
+aTree.put("title", GetText());
+return aTree;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit cdeadf981ba0e4beccf3f0ad454272d199aea078
Author: Szymon Kłos 
AuthorDate: Wed Nov 18 12:14:35 2020 +0100
Commit: Szymon Kłos 
CommitDate: Tue Dec 1 13:47:56 2020 +0100

jsdialog: remember dialog instance & handle close

Change-Id: I1b10d12edfa7ffca1061f50b5219baae1ac3caeb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106930
Tested-by: Szymon Kłos 
Reviewed-by: Szymon Kłos 

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index b4613db68fe9..813b9d4b00a9 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -241,6 +241,18 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 }
 }
 }
+else if (sControlType == "dialog")
+{
+auto pDialog = dynamic_cast(pWidget);
+if (pDialog)
+{
+if (sAction == "close")
+{
+pDialog->response(RET_CANCEL);
+return true;
+}
+}
+}
 }
 
 return false;
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 19a652e8e440..bc80416ac335 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -359,6 +359,9 @@ std::unique_ptr 
JSInstanceBuilder::weld_dialog(const OString& id,
 std::unique_ptr pRet(pDialog ? new 
JSDialog(m_aOwnedToplevel, m_aOwnedToplevel,
   pDialog, this, 
false, m_sTypeOfJSON)
: nullptr);
+
+RememberWidget("__DIALOG__", pRet.get());
+
 if (bTakeOwnership && pDialog)
 {
 assert(!m_aOwnedToplevel && "only one toplevel per .ui allowed");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Caolán McNamara (via logerrit)
 vcl/source/gdi/print.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit ad53629186343f8a111b4bee21721e8b446bd8a2
Author: Caolán McNamara 
AuthorDate: Tue Dec 1 10:17:18 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 13:28:11 2020 +0100

cid#1202935 Uninitialized scalar field

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

diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 48338a879ea5..fb3e5de9a95b 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -459,6 +459,7 @@ void Printer::ImplInitData()
 mbPrintFile = false;
 mbInPrintPage   = false;
 mbNewJobSetup   = false;
+mbSinglePrintJobs   = false;
 mpInfoPrinter   = nullptr;
 mpPrinter   = nullptr;
 mpDisplayDev= nullptr;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Trouble with SdrMeasureObj (dimension line)

2020-12-01 Thread Regina Henschel

Hi Miklos, hi all,

Regina Henschel schrieb am 20-Nov-20 um 11:46:

Hi Miklos,

Miklos Vajna schrieb am 19-Nov-20 um 09:22:

Hi Regina,

On Wed, Nov 18, 2020 at 11:56:01PM +0100, Regina Henschel 
 wrote:
Do you know examples for unit tests with "drag create" and for unit 
tests

with "create default objects"?


I'm not sure we have such tests. But it does not seem too problematic to
create one. Here is how I would start:


Good tip! I see use of a dispatcher in the call stack. That looks 
promising.


The approach with dispatcher did not work. But after some days and 
several failed attempts I found a solution to create the default measure 
line:


   ScTabViewShell* pTabViewShell = pDocSh->GetBestViewShell(false);
   SfxRequest aReq(pTabViewShell->GetViewFrame(), SID_DRAW_MEASURELINE);
   aReq.SetModifier(8192); // Ctrl
   pTabViewShell->ExecDraw(aReq);

I had seen the magic number "8192" in uitest 
sw/qa/uitest/writer_tests7/tdf130629.py and in Visual Studio. There 
might be a "speaking" define, I don't know.


The shape is inserted and selected, so that you can manipulate it, 
changing the anchor for example. When you want to work on the sheet 
itself, hiding a column for example, you have to deactivate draw shell. 
That can be done with

   pTabViewShell->SetDrawShell(false);

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


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

2020-12-01 Thread Luboš Luňák (via logerrit)
 cui/source/options/optgdlg.cxx |  101 +++--
 cui/source/options/optgdlg.hxx |5 --
 2 files changed, 8 insertions(+), 98 deletions(-)

New commits:
commit 33e1a54ea845f263fa417d5fda4baee26c1cc519
Author: Luboš Luňák 
AuthorDate: Mon Nov 30 16:40:57 2020 +0100
Commit: Luboš Luňák 
CommitDate: Tue Dec 1 13:08:27 2020 +0100

drop the needless and broken SkiaConfig abstraction (tdf#137935)

I originally copy&pasted this from the OpenGL setting, but this appears
to be just an unnecessary complication. Both the option and writing
is in fact simple, and trying to make it abstract and complicated
doesn't provide much, and it causes the options not saved if only
'Apply' is used in the config dialog.

Change-Id: Ibd55052467988b54429358567d70cbfbb0a34653
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106900
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 
(cherry picked from commit 414930465e86e898a2493f61e4832f9a841ebe00)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106940

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 0dc33f2c64ba..07435990a234 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -101,90 +101,6 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::util;
 using namespace ::utl;
 
-namespace svt {
-
-class SkiaCfg
-{
-private:
-bool mbUseSkia;
-bool mbForceSkiaRaster;
-bool mbModified;
-
-public:
-SkiaCfg();
-~SkiaCfg();
-
-bool useSkia() const;
-bool forceSkiaRaster() const;
-
-void setUseSkia(bool bSkia);
-void setForceSkiaRaster(bool bSkia);
-
-void reset();
-};
-
-SkiaCfg::SkiaCfg():
-mbModified(false)
-{
-reset();
-}
-
-void SkiaCfg::reset()
-{
-mbUseSkia = officecfg::Office::Common::VCL::UseSkia::get();
-mbForceSkiaRaster = officecfg::Office::Common::VCL::ForceSkiaRaster::get();
-mbModified = false;
-}
-
-SkiaCfg::~SkiaCfg()
-{
-if (!mbModified)
-return;
-
-try
-{
-std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
-if (!officecfg::Office::Common::VCL::UseSkia::isReadOnly())
-officecfg::Office::Common::VCL::UseSkia::set(mbUseSkia, batch);
-if (!officecfg::Office::Common::VCL::ForceSkiaRaster::isReadOnly())
-
officecfg::Office::Common::VCL::ForceSkiaRaster::set(mbForceSkiaRaster, batch);
-batch->commit();
-}
-catch (...)
-{
-}
-}
-
-bool SkiaCfg::useSkia() const
-{
-return mbUseSkia;
-}
-
-bool SkiaCfg::forceSkiaRaster() const
-{
-return mbForceSkiaRaster;
-}
-
-void SkiaCfg::setUseSkia(bool bSkia)
-{
-if (bSkia != mbUseSkia)
-{
-mbUseSkia = bSkia;
-mbModified = true;
-}
-}
-
-void SkiaCfg::setForceSkiaRaster(bool bSkia)
-{
-if (mbForceSkiaRaster != bSkia)
-{
-mbForceSkiaRaster = bSkia;
-mbModified = true;
-}
-}
-
-}
-
 // class OfaMiscTabPage --
 
 DeactivateRC OfaMiscTabPage::DeactivatePage( SfxItemSet* pSet_ )
@@ -656,7 +572,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 , pAppearanceCfg(new SvtTabAppearanceCfg)
 , pCanvasSettings(new CanvasSettings)
 , mpDrawinglayerOpt(new SvtOptionsDrawinglayer)
-, mpSkiaConfig(new svt::SkiaCfg)
 , m_xIconSizeLB(m_xBuilder->weld_combo_box("iconsize"))
 , m_xSidebarIconSizeLB(m_xBuilder->weld_combo_box("sidebariconsize"))
 , 
m_xNotebookbarIconSizeLB(m_xBuilder->weld_combo_box("notebookbariconsize"))
@@ -941,8 +856,10 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 if (m_xUseSkia->get_state_changed_from_saved() ||
 m_xForceSkiaRaster->get_state_changed_from_saved())
 {
-mpSkiaConfig->setUseSkia(m_xUseSkia->get_active());
-mpSkiaConfig->setForceSkiaRaster(m_xForceSkiaRaster->get_active());
+std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
+officecfg::Office::Common::VCL::UseSkia::set(m_xUseSkia->get_active(), 
batch);
+
officecfg::Office::Common::VCL::ForceSkiaRaster::set(m_xForceSkiaRaster->get_active(),
 batch);
+batch->commit();
 bModified = true;
 }
 
@@ -989,7 +906,6 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 void OfaViewTabPage::Reset( const SfxItemSet* )
 {
 SvtMiscOptions aMiscOptions;
-mpSkiaConfig->reset();
 
 if (aMiscOptions.GetSymbolsSize() != SFX_SYMBOLS_SIZE_AUTO)
 {
@@ -1072,16 +988,15 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
 m_xUseAntiAliase->save_state();
 }
 
-m_xUseSkia->set_active(mpSkiaConfig->useSkia());
-m_xForceSkiaRaster->set_active(mpSkiaConfig->forceSkiaRaster());
+m_xUseSkia->set_active(officecfg::Office::Common::VCL::UseSkia::get());
+
m_xForceSkiaRaster->set_active(officecfg::Office::Common::VCL::ForceSkiaRaster::get(

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - helpcontent2

2020-12-01 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1f88dbbd02899d5faa213fad60c077019e97c720
Author: Seth Chaiklin 
AuthorDate: Tue Dec 1 12:30:01 2020 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Dec 1 12:30:01 2020 +0100

Update git submodules

* Update helpcontent2 from branch 'libreoffice-7-1'
  to 8749baf2e0677de36216d73506f0df42a5cc0dee
  - tdf#134602 repair menu sequence for Freezing Rows or Columns

  * change View - Freeze Cells - Freeze Rows and Columns -->
View - Freeze Rows and Columns
  * update to 

Change-Id: I3d4b29cbabe5195c10d95fe7da56f1129befe6e9
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/106934
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins
(cherry picked from commit f6a5ead66ece37829ee11dd6f29bc1450f235462)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/106942
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index 1608a8a0c897..8749baf2e067 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 1608a8a0c897c7b32a9bdc35f6f63fef33c42d53
+Subproject commit 8749baf2e0677de36216d73506f0df42a5cc0dee
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Branch 'libreoffice-7-1' - source/text

2020-12-01 Thread Seth Chaiklin (via logerrit)
 source/text/scalc/00/0407.xhp|4 ++--
 source/text/scalc/01/0709.xhp|2 +-
 source/text/scalc/guide/line_fix.xhp |8 
 3 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 8749baf2e0677de36216d73506f0df42a5cc0dee
Author: Seth Chaiklin 
AuthorDate: Mon Nov 30 20:08:00 2020 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Dec 1 12:30:01 2020 +0100

tdf#134602 repair menu sequence for Freezing Rows or Columns

  * change View - Freeze Cells - Freeze Rows and Columns -->
View - Freeze Rows and Columns
  * update to 

Change-Id: I3d4b29cbabe5195c10d95fe7da56f1129befe6e9
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/106934
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins
(cherry picked from commit f6a5ead66ece37829ee11dd6f29bc1450f235462)
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/106942
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/source/text/scalc/00/0407.xhp 
b/source/text/scalc/00/0407.xhp
index 8623bb0ac..aea740854 100644
--- a/source/text/scalc/00/0407.xhp
+++ b/source/text/scalc/00/0407.xhp
@@ -25,8 +25,8 @@
   
 
 
-Window 
Menu
+Window Menu
 Choose >View - Split 
Window.
-Choose View - Freeze Cells - Freeze Rows and 
Columns.
+Choose View - Freeze Rows and 
Columns.
 
 
diff --git a/source/text/scalc/01/0709.xhp 
b/source/text/scalc/01/0709.xhp
index c5b1c7362..9d2c9eca0 100644
--- a/source/text/scalc/01/0709.xhp
+++ b/source/text/scalc/01/0709.xhp
@@ -31,7 +31,7 @@
 
 
 
-Freeze Rows and 
Columns
+Freeze Rows and 
Columns
 Divides the sheet at the top left corner of the active cell and the 
area to the top left is no longer scrollable.
 
 
diff --git a/source/text/scalc/guide/line_fix.xhp 
b/source/text/scalc/guide/line_fix.xhp
index 2dc78101c..688669bad 100644
--- a/source/text/scalc/guide/line_fix.xhp
+++ b/source/text/scalc/guide/line_fix.xhp
@@ -40,7 +40,7 @@
 
 
 
-Freezing Rows or Columns as Headers 
+Freezing Rows or Columns as Headers 
 If you have 
long rows or columns of data that extend beyond the viewable area of the sheet, 
you can freeze some rows or columns, which allows you to see the frozen columns 
or rows as you scroll through the rest of the data.
 
 
@@ -49,15 +49,15 @@
 To freeze 
both horizontally and vertically, select the cell that is below 
the row and to the right of the column that you want to freeze.
   
   
-Choose 
View - Freeze Cells - Freeze Rows and 
Columns.
-To 
deactivate, choose View - Freeze Cells - Freeze Rows and 
Columns again.
+Choose 
View - Freeze Rows and Columns.
+To 
deactivate, choose View - Freeze Rows and Columns 
again.
   
 
 If the area defined 
is to be scrollable, apply the View - Split Window 
command.
 If you want to 
print a certain row on all pages of a document, choose Format - Print ranges - Edit.
 
 
-View - Freeze Cells - Freeze Rows and Columns
+View - Freeze Rows and Columns
 View - Split 
Window
 
 Format - 
Print ranges - Edit
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Noel (via logerrit)
 xmloff/source/text/XMLIndexBibliographyEntryContext.cxx |   29 +++-
 xmloff/source/text/XMLIndexBibliographyEntryContext.hxx |5 +-
 2 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit 3b594e1e50bdc2ad374321fa3da304596bb15ffa
Author: Noel 
AuthorDate: Tue Dec 1 10:19:34 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Dec 1 12:19:27 2020 +0100

fastparser in XMLIndexBibliographyEntryContext

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

diff --git a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx 
b/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx
index af5886fe559d..c9bd4eabbce3 100644
--- a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 
 using namespace ::com::sun::star::text;
@@ -91,35 +92,33 @@ const SvXMLEnumMapEntry 
aBibliographyDataFieldMap[] =
 { XML_TOKEN_INVALID, 0 }
 };
 
-void XMLIndexBibliographyEntryContext::StartElement(
-const Reference & xAttrList)
+void XMLIndexBibliographyEntryContext::startFastElement(
+sal_Int32 /*nElement*/,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
 // handle both, style name and bibliography info
-sal_Int16 nLength = xAttrList->getLength();
-for(sal_Int16 nAttr = 0; nAttr < nLength; nAttr++)
+for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
 {
-OUString sLocalName;
-sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
-GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
-  &sLocalName );
-if (XML_NAMESPACE_TEXT == nPrefix)
+switch(aIter.getToken())
 {
-if ( IsXMLToken( sLocalName, XML_STYLE_NAME ) )
+case XML_ELEMENT(TEXT, XML_STYLE_NAME):
 {
-m_sCharStyleName = xAttrList->getValueByIndex(nAttr);
+m_sCharStyleName = aIter.toString();
 m_bCharStyleNameOK = true;
+break;
 }
-else if ( IsXMLToken( sLocalName, XML_BIBLIOGRAPHY_DATA_FIELD ) )
+case XML_ELEMENT(TEXT, XML_BIBLIOGRAPHY_DATA_FIELD):
 {
 sal_uInt16 nTmp;
-if (SvXMLUnitConverter::convertEnum(
-nTmp, xAttrList->getValueByIndex(nAttr),
-aBibliographyDataFieldMap))
+if (SvXMLUnitConverter::convertEnum(nTmp, aIter.toString(), 
aBibliographyDataFieldMap))
 {
 nBibliographyInfo = nTmp;
 bBibliographyInfoOK = true;
 }
+break;
 }
+default:
+XMLOFF_WARN_UNKNOWN("xmloff", aIter);
 }
 }
 
diff --git a/xmloff/source/text/XMLIndexBibliographyEntryContext.hxx 
b/xmloff/source/text/XMLIndexBibliographyEntryContext.hxx
index 97546c0759dd..0314dc899b7f 100644
--- a/xmloff/source/text/XMLIndexBibliographyEntryContext.hxx
+++ b/xmloff/source/text/XMLIndexBibliographyEntryContext.hxx
@@ -55,8 +55,9 @@ public:
 protected:
 
 /** process parameters */
-virtual void StartElement(
-const css::uno::Reference & xAttrList) 
override;
+virtual void SAL_CALL startFastElement(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& 
xAttrList ) override;
 
 /** call FillPropertyValues and insert into template */
 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Noel (via logerrit)
 xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx |   35 -
 xmloff/source/text/XMLIndexChapterInfoEntryContext.hxx |5 +-
 2 files changed, 20 insertions(+), 20 deletions(-)

New commits:
commit 4bb80a6d97b9ab4f2017c6033f18f806f3d4828a
Author: Noel 
AuthorDate: Tue Dec 1 10:16:30 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Dec 1 12:18:58 2020 +0100

fastparser in XMLIndexChapterInfoEntryContext

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

diff --git a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx 
b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
index d394a78add77..8436d1bb339b 100644
--- a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx
@@ -23,6 +23,7 @@
 #include 
 
 #include 
+#include 
 
 #include "XMLIndexTemplateContext.hxx"
 #include 
@@ -74,46 +75,44 @@ const SvXMLEnumMapEntry aChapterDisplayMap[] =
 { XML_TOKEN_INVALID,0 }
 };
 
-void XMLIndexChapterInfoEntryContext::StartElement(
-const Reference & xAttrList)
+void XMLIndexChapterInfoEntryContext::startFastElement(
+sal_Int32 /*nElement*/,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
 // handle both, style name and bibliography info
-sal_Int16 nLength = xAttrList->getLength();
-for(sal_Int16 nAttr = 0; nAttr < nLength; nAttr++)
+for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
 {
-OUString sLocalName;
-sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
-GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
-  &sLocalName );
-if (XML_NAMESPACE_TEXT == nPrefix)
+switch(aIter.getToken())
 {
-if ( IsXMLToken( sLocalName, XML_STYLE_NAME ) )
+case XML_ELEMENT(TEXT, XML_STYLE_NAME):
 {
-m_sCharStyleName = xAttrList->getValueByIndex(nAttr);
+m_sCharStyleName = aIter.toString();
 m_bCharStyleNameOK = true;
+break;
 }
-else if ( IsXMLToken( sLocalName, XML_DISPLAY ) )//i53420, always 
true, in TOC as well
+case XML_ELEMENT(TEXT, XML_DISPLAY): //i53420, always true, in TOC 
as well
 {
 sal_uInt16 nTmp;
-if (SvXMLUnitConverter::convertEnum(
-nTmp, xAttrList->getValueByIndex(nAttr),
-aChapterDisplayMap))
+if (SvXMLUnitConverter::convertEnum(nTmp, aIter.toString(), 
aChapterDisplayMap))
 {
 nChapterInfo = nTmp;
 bChapterInfoOK = true;
 }
+break;
 }
-else if ( IsXMLToken( sLocalName, XML_OUTLINE_LEVEL ) )
+case XML_ELEMENT(TEXT, XML_OUTLINE_LEVEL):
 {
 sal_Int32 nTmp;
-if (::sax::Converter::convertNumber(nTmp,
-xAttrList->getValueByIndex(nAttr)))
+if (::sax::Converter::convertNumber(nTmp, aIter.toString()))
 {
 //control on range is carried out in the UNO level
 nOutlineLevel = static_cast(nTmp);
 bOutlineLevelOK = true;
 }
+break;
 }
+default:
+XMLOFF_WARN_UNKNOWN("xmloff", aIter);
 }
 }
 
diff --git a/xmloff/source/text/XMLIndexChapterInfoEntryContext.hxx 
b/xmloff/source/text/XMLIndexChapterInfoEntryContext.hxx
index 13608a3b6009..e5779a107c17 100644
--- a/xmloff/source/text/XMLIndexChapterInfoEntryContext.hxx
+++ b/xmloff/source/text/XMLIndexChapterInfoEntryContext.hxx
@@ -56,8 +56,9 @@ public:
 protected:
 
 /** process parameters */
-virtual void StartElement(
-const css::uno::Reference & xAttrList) 
override;
+virtual void SAL_CALL startFastElement(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& 
xAttrList ) override;
 
 /** fill property values for this template entry */
 virtual void FillPropertyValues(
___
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/jsdialog vcl/source

2020-12-01 Thread Szymon Kłos (via logerrit)
 include/vcl/dialog.hxx   |1 +
 vcl/jsdialog/jsdialogbuilder.cxx |1 +
 vcl/source/window/dialog.cxx |   30 +++---
 3 files changed, 25 insertions(+), 7 deletions(-)

New commits:
commit 779d7c963c2668e9cb066ecb4209277330070b7e
Author: Szymon Kłos 
AuthorDate: Wed Nov 18 12:00:03 2020 +0100
Commit: Szymon Kłos 
CommitDate: Tue Dec 1 12:18:17 2020 +0100

jsdialog: turn off tunneling for JSON dialogs

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

diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 1840635f151f..1f777dfc1629 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -149,6 +149,7 @@ public:
 
 voidSetPopupMenuHdl(const Link& 
rLink);
 voidSetInstallLOKNotifierHdl(const Link& rLink);
+voidSetLOKTunnelingState(bool bEnabled);
 
 voidadd_button(PushButton* pButton, int nResponse, bool 
bTransferOwnership);
 voidset_default_response(int nResponse);
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 05903cef6f49..19a652e8e440 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -352,6 +352,7 @@ std::unique_ptr 
JSInstanceBuilder::weld_dialog(const OString& id,
 {
 ::Dialog* pDialog = m_xBuilder->get<::Dialog>(id);
 m_nWindowId = pDialog->GetLOKWindowId();
+pDialog->SetLOKTunnelingState(false);
 
 InsertWindowToMap(m_nWindowId);
 
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index a754182d3eeb..85f87ad92a54 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -353,8 +353,9 @@ struct DialogImpl
 VclAbstractDialog::AsyncContext maEndCtx;
 Link m_aPopupMenuHdl;
 Link m_aInstallLOKNotifierHdl;
+boolm_bLOKTunneling;
 
-DialogImpl() : mnResult( -1 ), mbStartedModal( false ) {}
+DialogImpl() : mnResult( -1 ), mbStartedModal( false ), m_bLOKTunneling( 
true ) {}
 
 #ifndef NDEBUG
 short get_response(vcl::Window *pWindow) const
@@ -607,6 +608,8 @@ Dialog::~Dialog()
 
 void Dialog::dispose()
 {
+bool bTunnelingEnabled = mpDialogImpl->m_bLOKTunneling;
+
 mpDialogImpl.reset();
 RemoveFromDlgList();
 mpActionArea.clear();
@@ -624,7 +627,8 @@ void Dialog::dispose()
 {
 if(const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
 {
-pNotifier->notifyWindow(GetLOKWindowId(), "close");
+if (bTunnelingEnabled)
+pNotifier->notifyWindow(GetLOKWindowId(), "close");
 ReleaseLOKNotifier();
 }
 }
@@ -731,14 +735,21 @@ void Dialog::SetInstallLOKNotifierHdl(const Linkm_aInstallLOKNotifierHdl = rLink;
 }
 
+void Dialog::SetLOKTunnelingState(bool bEnabled)
+{
+mpDialogImpl->m_bLOKTunneling = bEnabled;
+}
+
 void Dialog::StateChanged( StateChangedType nType )
 {
+bool bTunnelingEnabled = mpDialogImpl->m_bLOKTunneling;
+
 if (nType == StateChangedType::InitShow)
 {
 DoInitialLayout();
 
 const bool bKitActive = comphelper::LibreOfficeKit::isActive();
-if (bKitActive)
+if (bKitActive && bTunnelingEnabled)
 {
 std::vector aItems;
 aItems.emplace_back("type", "dialog");
@@ -777,7 +788,8 @@ void Dialog::StateChanged( StateChangedType nType )
 }
 else if (nType == StateChangedType::Text)
 {
-if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
+const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier();
+if (pNotifier && bTunnelingEnabled)
 {
 std::vector aPayload;
 aPayload.emplace_back("title", GetText().toUtf8());
@@ -795,7 +807,8 @@ void Dialog::StateChanged( StateChangedType nType )
 
 if (!mbModalMode && nType == StateChangedType::Visible)
 {
-if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
+const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier();
+if (pNotifier && bTunnelingEnabled)
 {
 std::vector aPayload;
 aPayload.emplace_back("title", GetText().toUtf8());
@@ -983,7 +996,8 @@ bool Dialog::ImplStartExecute()
 else
 UITestLogger::getInstance().log("Open Modeless " + get_id());
 
-if (comphelper::LibreOfficeKit::isActive())
+bool bTunnelingEnabled = mpDialogImpl->m_bLOKTunneling;
+if (comphelper::LibreOfficeKit::isActive() && bTunnelingEnabled)
 {
 if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
 {
@@ -1327,7 +1341,9 @@ void Dialog::Resize()
 if (comphelper::LibreOfficeKit::isDialogPainting())
 return;
 
-if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
+bool bTunnelingEnabled =

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

2020-12-01 Thread Szymon Kłos (via logerrit)
 vcl/inc/jsdialog/jsdialogbuilder.hxx |   55 
 vcl/jsdialog/executor.cxx|   21 ++
 vcl/jsdialog/jsdialogbuilder.cxx |  119 +++
 3 files changed, 195 insertions(+)

New commits:
commit 3dc572e07671107f6aa4a627660ab9c403d54dc9
Author: Szymon Kłos 
AuthorDate: Wed Nov 18 10:12:38 2020 +0100
Commit: Szymon Kłos 
CommitDate: Tue Dec 1 12:17:56 2020 +0100

jsdialog:  drag and drop support for TreeView

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

diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 3d7b6c62c24e..b6ee02c4ff04 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -21,6 +21,11 @@
 #include 
 #include 
 
+#include 
+#include 
+#include 
+#include 
+
 class ToolBox;
 class SfxViewShell;
 class VclMultiLineEdit;
@@ -59,6 +64,40 @@ public:
 void notifyDialogState(bool bForce = false);
 };
 
+class JSDropTarget final
+: public cppu::WeakComponentImplHelper
+{
+osl::Mutex m_aMutex;
+
std::vector> 
m_aListeners;
+
+public:
+JSDropTarget();
+
+// XInitialization
+virtual void SAL_CALL initialize(const css::uno::Sequence& 
rArgs) override;
+
+// XDropTarget
+virtual void SAL_CALL addDropTargetListener(
+const 
css::uno::Reference&) override;
+virtual void SAL_CALL removeDropTargetListener(
+const 
css::uno::Reference&) override;
+virtual sal_Bool SAL_CALL isActive() override;
+virtual void SAL_CALL setActive(sal_Bool active) override;
+virtual sal_Int8 SAL_CALL getDefaultActions() override;
+virtual void SAL_CALL setDefaultActions(sal_Int8 actions) override;
+
+OUString SAL_CALL getImplementationName() override;
+
+sal_Bool SAL_CALL supportsService(OUString const& ServiceName) override;
+
+css::uno::Sequence SAL_CALL getSupportedServiceNames() override;
+
+void fire_drop(const css::datatransfer::dnd::DropTargetDropEvent& dtde);
+
+void fire_dragEnter(const 
css::datatransfer::dnd::DropTargetDragEnterEvent& dtde);
+};
+
 class JSInstanceBuilder : public SalInstanceBuilder
 {
 sal_uInt64 m_nWindowId;
@@ -141,6 +180,9 @@ private:
 template 
 class JSWidget : public BaseInstanceClass, public JSDialogSender
 {
+protected:
+rtl::Reference m_xDropTarget;
+
 public:
 JSWidget(VclPtr aNotifierWindow, VclPtr 
aContentWindow,
  VclClass* pObject, SalInstanceBuilder* pBuilder, bool 
bTakeOwnership,
@@ -168,6 +210,14 @@ public:
 BaseInstanceClass::set_sensitive(sensitive);
 notifyDialogState();
 }
+
+virtual css::uno::Reference 
get_drop_target() override
+{
+if (!m_xDropTarget)
+m_xDropTarget.set(new JSDropTarget);
+
+return m_xDropTarget.get();
+}
 };
 
 class VCL_DLLPUBLIC JSDialog : public JSWidget
@@ -323,6 +373,11 @@ public:
 using SalInstanceTreeView::select;
 /// pos is used differently here, it defines how many steps of iterator we 
need to perform to take entry
 virtual void select(int pos) override;
+
+virtual weld::TreeView* get_drag_source() const override;
+
+void drag_start();
+void drag_end();
 };
 
 class JSExpander : public JSWidget
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 8e1ec3cf8f7b..b4613db68fe9 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -205,6 +205,27 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 
 pTreeView->select(nRow);
 LOKTrigger::trigger_row_activated(*pTreeView);
+return true;
+}
+else if (sAction == "dragstart")
+{
+OString nRowString
+= OUStringToOString(rData["data"], 
RTL_TEXTENCODING_ASCII_US);
+int nRow = std::atoi(nRowString.getStr());
+
+pTreeView->select(nRow);
+
+JSTreeView* pJSTreeView = 
dynamic_cast(pTreeView);
+if (pJSTreeView)
+pJSTreeView->drag_start();
+return true;
+}
+else if (sAction == "dragend")
+{
+JSTreeView* pJSTreeView = 
dynamic_cast(pTreeView);
+if (pJSTreeView)
+pJSTreeView->drag_end();
+return true;
 }
 }
 }
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index f02d469dc701..05903cef6f49 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -16,6 +16,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace weld;
 
@@ -89,6 +90,98 @@ void JSDi

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

2020-12-01 Thread Szymon Kłos (via logerrit)
 vcl/inc/jsdialog/jsdialogbuilder.hxx |   24 ++--
 vcl/jsdialog/executor.cxx|   12 
 vcl/jsdialog/jsdialogbuilder.cxx |   29 +
 3 files changed, 59 insertions(+), 6 deletions(-)

New commits:
commit f74370e3875fcfac865f194b3110a458d43a6332
Author: Szymon Kłos 
AuthorDate: Tue Nov 17 14:32:04 2020 +0100
Commit: Szymon Kłos 
CommitDate: Tue Dec 1 12:17:38 2020 +0100

jsdialog: implemented Expander widget

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

diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 86bc0020eaea..3d7b6c62c24e 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -119,12 +119,14 @@ public:
 weld_drawing_area(const OString& id, const a11yref& rA11yImpl = nullptr,
   FactoryFunction pUITestFactoryFunction = nullptr, void* 
pUserData = nullptr,
   bool bTakeOwnership = false) override;
-std::unique_ptr weld_toolbar(const OString& id,
-bool bTakeOwnership = true) 
override;
-std::unique_ptr weld_text_view(const OString& id,
-   bool bTakeOwnership = 
false) override;
-std::unique_ptr weld_tree_view(const OString& id,
-   bool bTakeOwnership = 
false) override;
+virtual std::unique_ptr weld_toolbar(const OString& id,
+bool bTakeOwnership = 
true) override;
+virtual std::unique_ptr weld_text_view(const OString& id,
+   bool bTakeOwnership 
= false) override;
+virtual std::unique_ptr weld_tree_view(const OString& id,
+   bool bTakeOwnership 
= false) override;
+virtual std::unique_ptr weld_expander(const OString& id,
+  bool bTakeOwnership 
= false) override;
 
 static weld::MessageDialog* CreateMessageDialog(weld::Widget* pParent,
 VclMessageType 
eMessageType,
@@ -323,4 +325,14 @@ public:
 virtual void select(int pos) override;
 };
 
+class JSExpander : public JSWidget
+{
+public:
+JSExpander(VclPtr aNotifierWindow, VclPtr 
aContentWindow,
+   ::VclExpander* pExpander, SalInstanceBuilder* pBuilder, bool 
bTakeOwnership,
+   std::string sTypeOfJSON);
+
+virtual void set_expanded(bool bExpand) override;
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index a4fb7093b4bf..8e1ec3cf8f7b 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -208,6 +208,18 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 }
 }
 }
+else if (sControlType == "expander")
+{
+auto pExpander = dynamic_cast(pWidget);
+if (pExpander)
+{
+if (sAction == "toggle")
+{
+pExpander->set_expanded(!pExpander->get_expanded());
+return true;
+}
+}
+}
 }
 
 return false;
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 5ae77f856e2f..f02d469dc701 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -463,6 +463,21 @@ std::unique_ptr 
JSInstanceBuilder::weld_tree_view(const OString&
 return pWeldWidget;
 }
 
+std::unique_ptr JSInstanceBuilder::weld_expander(const 
OString& id,
+ bool 
bTakeOwnership)
+{
+VclExpander* pExpander = m_xBuilder->get(id);
+auto pWeldWidget
+= pExpander ? std::make_unique(GetNotifierWindow(), 
GetContentWindow(),
+   pExpander, this, 
bTakeOwnership, m_sTypeOfJSON)
+: nullptr;
+
+if (pWeldWidget)
+RememberWidget(id, pWeldWidget.get());
+
+return pWeldWidget;
+}
+
 weld::MessageDialog* JSInstanceBuilder::CreateMessageDialog(weld::Widget* 
pParent,
 VclMessageType 
eMessageType,
 VclButtonsType 
eButtonType,
@@ -791,4 +806,18 @@ void JSTreeView::select(int pos)
 enable_notify_events();
 }
 
+JSExpander::JSExpander(VclPtr aNotifierWindow, 
VclPtr aContentWindow,
+   ::VclExpander* pExpander, SalInstanceBuilder* pBuilder, 
bool bTak

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

2020-12-01 Thread Szymon Kłos (via logerrit)
 include/vcl/salvtables.hxx|   17 
 vcl/source/app/salvtables.cxx |   43 --
 2 files changed, 34 insertions(+), 26 deletions(-)

New commits:
commit 206462c5cee46bae2378da6ac6a55d12eac8f5a4
Author: Szymon Kłos 
AuthorDate: Tue Nov 17 09:03:35 2020 +0100
Commit: Szymon Kłos 
CommitDate: Tue Dec 1 12:17:10 2020 +0100

Move SalInstanceExpander decl to header file

Change-Id: I5399f5aca07dd27dfc668cad66cf347936bbba7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106926
Tested-by: Szymon Kłos 
Reviewed-by: Szymon Kłos 

diff --git a/include/vcl/salvtables.hxx b/include/vcl/salvtables.hxx
index 23db65df8525..401cbb0702a3 100644
--- a/include/vcl/salvtables.hxx
+++ b/include/vcl/salvtables.hxx
@@ -1430,4 +1430,21 @@ public:
 virtual ~SalInstanceTreeView() override;
 };
 
+class SalInstanceExpander : public SalInstanceContainer, public virtual 
weld::Expander
+{
+private:
+VclPtr m_xExpander;
+
+DECL_LINK(ExpandedHdl, VclExpander&, void);
+
+public:
+SalInstanceExpander(VclExpander* pExpander, SalInstanceBuilder* pBuilder, 
bool bTakeOwnership);
+
+virtual bool get_expanded() const override;
+
+virtual void set_expanded(bool bExpand) override;
+
+virtual ~SalInstanceExpander() override;
+};
+
 #endif
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 39f19171db0e..12503e478646 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -5320,36 +5320,27 @@ IMPL_LINK(SalInstanceTextView, CursorListener, 
VclWindowEvent&, rEvent, void)
 signal_cursor_position();
 }
 
-class SalInstanceExpander : public SalInstanceContainer, public virtual 
weld::Expander
+SalInstanceExpander::SalInstanceExpander(VclExpander* pExpander, 
SalInstanceBuilder* pBuilder, bool bTakeOwnership)
+: SalInstanceContainer(pExpander, pBuilder, bTakeOwnership)
+, m_xExpander(pExpander)
 {
-private:
-VclPtr m_xExpander;
-
-DECL_LINK(ExpandedHdl, VclExpander&, void);
-
-public:
-SalInstanceExpander(VclExpander* pExpander, SalInstanceBuilder* pBuilder, 
bool bTakeOwnership)
-: SalInstanceContainer(pExpander, pBuilder, bTakeOwnership)
-, m_xExpander(pExpander)
-{
-m_xExpander->SetExpandedHdl(LINK(this, SalInstanceExpander, 
ExpandedHdl));
-}
+m_xExpander->SetExpandedHdl(LINK(this, SalInstanceExpander, ExpandedHdl));
+}
 
-virtual bool get_expanded() const override
-{
-return m_xExpander->get_expanded();
-}
+bool SalInstanceExpander::get_expanded() const
+{
+return m_xExpander->get_expanded();
+}
 
-virtual void set_expanded(bool bExpand) override
-{
-m_xExpander->set_expanded(bExpand);
-}
+void SalInstanceExpander::set_expanded(bool bExpand)
+{
+m_xExpander->set_expanded(bExpand);
+}
 
-virtual ~SalInstanceExpander() override
-{
-m_xExpander->SetExpandedHdl(Link());
-}
-};
+SalInstanceExpander::~SalInstanceExpander()
+{
+m_xExpander->SetExpandedHdl(Link());
+}
 
 IMPL_LINK_NOARG(SalInstanceExpander, ExpandedHdl, VclExpander&, void)
 {
___
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

2020-12-01 Thread Szymon Kłos (via logerrit)
 sc/source/ui/cctrl/checklistmenu.cxx |5 -
 sc/source/ui/inc/checklistmenu.hxx   |3 ++-
 sc/source/ui/view/gridwin.cxx|9 ++---
 3 files changed, 12 insertions(+), 5 deletions(-)

New commits:
commit b528017e8c95791bb441d61540cfbafe89854eb4
Author: Szymon Kłos 
AuthorDate: Fri Nov 13 12:30:51 2020 +0100
Commit: Szymon Kłos 
CommitDate: Tue Dec 1 12:16:38 2020 +0100

autofilter: make working with multiple users in online

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

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index 98421847ccd6..0df3819e686c 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -558,11 +558,14 @@ ScCheckListMenuControl::~ScCheckListMenuControl()
 }
 
 ScCheckListMenuWindow::ScCheckListMenuWindow(vcl::Window* pParent, ScDocument* 
pDoc, bool bCanHaveSubMenu,
- bool bTreeMode, int nWidth, 
ScCheckListMenuWindow* pParentMenu)
+ bool bTreeMode, int nWidth, 
ScCheckListMenuWindow* pParentMenu,
+ vcl::ILibreOfficeKitNotifier* 
pNotifier)
 : DockingWindow(pParent, "InterimDockParent", 
"svx/ui/interimdockparent.ui")
 , mxParentMenu(pParentMenu)
 , mxBox(get("box"))
 {
+if (pNotifier)
+SetLOKNotifier(pNotifier);
 setDeferredProperties();
 mxControl.reset(new ScCheckListMenuControl(this, mxBox.get(), pDoc, 
bCanHaveSubMenu, bTreeMode, nWidth));
 
SetBackground(Application::GetSettings().GetStyleSettings().GetMenuColor());
diff --git a/sc/source/ui/inc/checklistmenu.hxx 
b/sc/source/ui/inc/checklistmenu.hxx
index 49d4822ecd3b..5d4d6a6abd33 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -304,7 +304,8 @@ class ScCheckListMenuWindow : public DockingWindow
 public:
 explicit ScCheckListMenuWindow(vcl::Window* pParent, ScDocument* pDoc,
bool bCanHaveSubMenu, bool bTreeMode, int 
nWidth = -1,
-   ScCheckListMenuWindow* pParentMenu = 
nullptr);
+   ScCheckListMenuWindow* pParentMenu = 
nullptr,
+   vcl::ILibreOfficeKitNotifier* pNotifier = 
nullptr);
 virtual void dispose() override;
 virtual ~ScCheckListMenuWindow() override;
 
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 31db62f12c6e..fe1bf2703a34 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -639,13 +639,16 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW 
nRow)
 ScFilterEntries aFilterEntries;
 pDoc->GetFilterEntries(nCol, nRow, nTab, aFilterEntries);
 
+vcl::ILibreOfficeKitNotifier* pNotifier = nullptr;
+if (bLOKActive)
+pNotifier = SfxViewShell::Current();
+
 int nColWidth = ScViewData::ToPixel(pDoc->GetColWidth(nCol, nTab), 
pViewData->GetPPTX());
 mpAutoFilterPopup.reset(VclPtr::Create(this, pDoc, 
false,
-  
aFilterEntries.mbHasDates, nColWidth));
+  
aFilterEntries.mbHasDates,
+  nColWidth, 
nullptr, pNotifier));
 ScCheckListMenuControl& rControl = mpAutoFilterPopup->get_widget();
 
-if (bLOKActive)
-mpAutoFilterPopup->SetLOKNotifier(SfxViewShell::Current());
 rControl.setOKAction(new AutoFilterAction(this, AutoFilterMode::Normal));
 rControl.setPopupEndAction(
 new AutoFilterPopupEndAction(this, ScAddress(nCol, nRow, nTab)));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Caolán McNamara (via logerrit)
 sc/source/core/data/postit.cxx |   11 ---
 svx/source/svdraw/svdotxat.cxx |   11 +++
 2 files changed, 7 insertions(+), 15 deletions(-)

New commits:
commit 4795e8ac3ed56b2f1ff93b0ac870a45be2428bca
Author: Caolán McNamara 
AuthorDate: Tue Dec 1 09:09:45 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 12:14:47 2020 +0100

Resolves: tdf#138549 use GetSpecialTextBoxShadow to identify ScPostIt

instead of a 'special' name which causes undo-related causes side effects

Change-Id: Id36b0b5360ddde3469721a7c837fe3942af08209
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106925
Tested-by: Xisco Fauli 
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 92221fe87430..d0ac658f3e35 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -382,17 +382,6 @@ void ScCaptionCreator::CreateCaption( bool bShown, bool 
bTailFront )
 *mrDoc.GetDrawLayer(), //  should ret a ref?
 aTextRect,
 aTailPos));
-
-// tdf#114956 a way to recognize that this SdrCaption is for a ScPostit in
-// SdrTextObj::AdjustTextFrameWidthAndHeight
-SdrModel& rModel = mxCaption->getSdrModelFromSdrObject();
-const bool bUndoEnabled = rModel.IsUndoEnabled();
-if (bUndoEnabled)
-rModel.EnableUndo(false);
-mxCaption->SetName("ScPostIt");
-if (bUndoEnabled)
-rModel.EnableUndo(true);
-
 // basic caption settings
 ScCaptionUtil::SetBasicCaptionSettings( *mxCaption, bShown );
 }
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
index 6f97960b5377..315e57e7cb06 100644
--- a/svx/source/svdraw/svdotxat.cxx
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -263,8 +263,12 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight()
 if (dynamic_cast(this) != nullptr) { // this is a 
hack
 static_cast(this)->SetXPolyDirty();
 }
-if (dynamic_cast(this) != nullptr) { // this is 
a hack
-static_cast(this)->ImpRecalcTail();
+bool bScPostIt = false;
+if (auto pCaptionObj = dynamic_cast(this)) { // this 
is a hack
+pCaptionObj->ImpRecalcTail();
+// tdf#114956, tdf#138549 use GetSpecialTextBoxShadow to recognize
+// that this SdrCaption is for a ScPostit
+bScPostIt = pCaptionObj->GetSpecialTextBoxShadow();
 }
 
 // to not slow down EditView visualization on Overlay (see
@@ -278,8 +282,7 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight()
 GetTextEditOutliner() &&
 GetTextEditOutliner()->hasEditViewCallbacks());
 
-// tdf#114956 always broadcast change for ScPostIts
-if (!bSuppressChangeWhenEditOnOverlay || GetName() == "ScPostIt")
+if (!bSuppressChangeWhenEditOnOverlay || bScPostIt)
 {
 SetChanged();
 BroadcastObjectChange();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Caolán McNamara (via logerrit)
 vcl/inc/salgdi.hxx|   14 ++---
 vcl/source/gdi/salgdilayout.cxx   |   99 ++
 vcl/source/outdev/bitmap.cxx  |6 +-
 vcl/source/outdev/line.cxx|6 +-
 vcl/source/outdev/outdev.cxx  |2 
 vcl/source/outdev/polygon.cxx |   12 ++--
 vcl/source/outdev/polyline.cxx|4 -
 vcl/source/outdev/textline.cxx|2 
 vcl/source/outdev/transparent.cxx |8 +--
 9 files changed, 76 insertions(+), 77 deletions(-)

New commits:
commit e6c9396c555cdcbe8d7eb49ab48065c5df525107
Author: Caolán McNamara 
AuthorDate: Mon Nov 30 12:10:47 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 12:14:21 2020 +0100

DrawPolyLine/DrawPolyPolygon never called with null OutputDevice*

so we can remove some redundant nullptr checks, maybe making this
a tiny less confusing

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

diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index e0cd3e53a2ac..b9f15c324eb1 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -206,13 +206,13 @@ public:
 voidmirror( tools::Long& nX, const OutputDevice& 
rOutDev ) const;
 // only called mirror2 to avoid ambiguity
 [[nodiscard]] tools::Long   mirror2( tools::Long nX, const OutputDevice& 
rOutDev ) const;
-voidmirror( tools::Long& nX, tools::Long nWidth, 
const OutputDevice *pOutDev, bool bBack = false ) const;
+voidmirror( tools::Long& nX, tools::Long nWidth, 
const OutputDevice& rOutDev, bool bBack = false ) const;
 boolmirror( sal_uInt32 nPoints, const Point 
*pPtAry, Point *pPtAry2, const OutputDevice& rOutDev ) const;
 voidmirror( tools::Rectangle& rRect, const 
OutputDevice&, bool bBack = false ) const;
 voidmirror( vcl::Region& rRgn, const OutputDevice& 
rOutDev ) const;
 voidmirror( ImplControlValue&, const OutputDevice& 
) const;
 basegfx::B2DPolyPolygon mirror( const basegfx::B2DPolyPolygon& 
i_rPoly, const OutputDevice& rOutDev ) const;
-const basegfx::B2DHomMatrix& getMirror( const OutputDevice *pOutDev ) 
const;
+const basegfx::B2DHomMatrix& getMirror( const OutputDevice& rOutDev ) 
const;
 
 // non virtual methods; these do possible coordinate mirroring and
 // then delegate to protected virtual methods
@@ -240,7 +240,7 @@ public:
 const basegfx::B2DHomMatrix& 
rObjectToDevice,
 const basegfx::B2DPolyPolygon 
&i_rPolyPolygon,
 double i_fTransparency,
-const OutputDevice *i_pOutDev);
+const OutputDevice& i_rOutDev);
 
 boolDrawPolyLine(
 const basegfx::B2DHomMatrix& 
rObjectToDevice,
@@ -252,7 +252,7 @@ public:
 css::drawing::LineCap i_eLineCap,
 double i_fMiterMinimumAngle,
 bool bPixelSnapHairline,
-const OutputDevice* i_pOutDev);
+const OutputDevice& i_rOutDev);
 
 boolDrawPolyLineBezier(
 sal_uInt32 nPoints,
@@ -305,13 +305,13 @@ public:
 voidDrawBitmap(
 const SalTwoRect& rPosAry,
 const SalBitmap& rSalBitmap,
-const OutputDevice* pOutDev );
+const OutputDevice& rOutDev );
 
 voidDrawBitmap(
 const SalTwoRect& rPosAry,
 const SalBitmap& rSalBitmap,
 const SalBitmap& rTransparentBitmap,
-const OutputDevice* pOutDev );
+const OutputDevice& rOutDev );
 
 voidDrawMask(
 const SalTwoRect& rPosAry,
@@ -614,7 +614,7 @@ protected:
 /// flags which hold the SetAntialiasing() value from OutputDevice
 boolm_bAntiAlias : 1;
 
-inline tools::Long GetDeviceWidth(const OutputDevice* pOutDev) const;
+inline tools::Long GetDeviceWidth(const OutputDevice& rOutDev) const;
 
 /**
  * Handle damage done by drawing with a widget draw override
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 7079fabcf500..eab208eb8689 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdi

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

2020-12-01 Thread Caolán McNamara (via logerrit)
 sw/source/core/txtnode/ndtxt.cxx |   11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit b1acda00fecb2d158c4cb4b0c36add34caebc84b
Author: Caolán McNamara 
AuthorDate: Tue Nov 17 12:51:32 2020 +
Commit: Xisco Fauli 
CommitDate: Tue Dec 1 12:04:27 2020 +0100

tdf#134626 assertion in ~SwTextNode

taking the simplest example of...
http://bugs.documentfoundation.org/attachment.cgi?id=167361

a) on ctrl+v paste into the new document:

DocumentContentOperationsManager::CopyImplImpl
is called and that (at "Also copy all format templates")
causes SwTextNode::ChgTextCollUpdateNum
to call rDoc.GetNodes().UpdateOutlineNode(*this)

so the new paragraph is now set as an outline node of the
document DocNodes

that seems perfectly reasonable

b) ctrl+v again

no new paragraph, text appended to node of a)

c) ctrl+z

SwUndoSaveContent::MoveToUndoNds is called
and rNodes.MakeTextNode is called to make a
new TextNode to move the content into.

The SwNodes the TextNode is created in are rNds =
rDoc.GetUndoManager().GetUndoNodes(), i.e. the undo nodes.

MakeTextNode calls...
SwTextNode *pNode = new SwTextNode( rWhere, pColl, nullptr )
and the SwTextNode ctor unconditionally does...

GetNodes().UpdateOutlineNode(*this);

so its set as an outline node in those undo SwNodes

In SwNodes::MakeTextNode right after the
SwTextNode *pNode = new SwTextNode( rWhere, pColl, nullptr )
call we have...

// call method  only for the document nodes array
if ( IsDocNodes() )
UpdateOutlineNode(*pNode);

That seems odd, because we have *already* unconditionally called
UpdateOutlineNode in the SwTextNode ctor.

d) ctrl+z
The SwTextFormatColl is destroyed
and SwTextNode::TriggerNodeUpdate
is called for the TextNode of a) and is updated. It is also
called for the TextNode of c) but due to...

// #125329# - assure that text node is in document nodes array
if ( !rDoc.IsInDtor() && &rDoc.GetNodes() == &GetNodes() )

c is *not* updated, so on eventual dtor of c the assert fires.

Change-Id: I56f9b00dd4665fd44359a01baef66c82937c2781

---

If the conditional UpdateOutlineNode call in SwNodes::MakeTextNode is
the right thing to do where only TextNodes in the DocNodes should be
updated, then presumably the equivalent call in the SwTextNode
ctor should be also conditional, making that MakeTextNode call redundant
in any case.

ChgTextCollUpdateNum always calls
rDoc.GetNodes().UpdateOutlineNode(*this);
which suggests that the SwTextNode::ChgFormatColl function should
rely on that to call UpdateOutlineNode and not call it directly
to also avoid a UpdateOutlineNode in the undo nodes

Change-Id: Iedc3fb4d41c24dbbe41fbac259abe41d3757be09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106011
Tested-by: Jenkins
Tested-by: Xisco Fauli 
Reviewed-by: Michael Stahl 
(cherry picked from commit 138cf950dcdc8a1240452cad6867e197279f42b0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106936
Reviewed-by: Xisco Fauli 

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index e4cd823d74e0..ec6a0081667c 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -111,10 +111,6 @@ SwTextNode *SwNodes::MakeTextNode( const SwNodeIndex & 
rWhere,
 
 SwNodeIndex aIdx( *pNode );
 
-// call method  only for the document nodes array
-if ( IsDocNodes() )
-UpdateOutlineNode(*pNode);
-
 // if there is no layout or it is in a hidden section, MakeFrames is not 
needed
 const SwSectionNode* pSectNd;
 if (!bNewFrames ||
@@ -221,7 +217,10 @@ SwTextNode::SwTextNode( const SwNodeIndex &rWhere, 
SwTextFormatColl *pTextColl,
 }
 AddToList();
 }
-GetNodes().UpdateOutlineNode(*this);
+
+// call method  only for the document nodes array
+if (GetNodes().IsDocNodes())
+GetNodes().UpdateOutlineNode(*this);
 
 m_bNotifiable = true;
 
@@ -3925,8 +3924,6 @@ SwFormatColl* SwTextNode::ChgFormatColl( SwFormatColl 
*pNewColl )
 ChgTextCollUpdateNum( pOldColl, static_cast(pNewColl) );
 }
 
-GetNodes().UpdateOutlineNode(*this);
-
 return pOldColl;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2020-12-01 Thread Mike Kaganski (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 95c5e73122ba23d02eaf7dfeecdd44243189617e
Author: Mike Kaganski 
AuthorDate: Tue Dec 1 12:02:18 2020 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Dec 1 12:02:18 2020 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to bcbb4105763653a71881bf2c18c275a686078511
  - Regex: improve \u/\U description

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

diff --git a/helpcontent2 b/helpcontent2
index 6e7f4ece270f..bcbb41057636 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 6e7f4ece270fd504303ab279795462ce22c3de27
+Subproject commit bcbb4105763653a71881bf2c18c275a686078511
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Mike Kaganski (via logerrit)
 source/text/shared/01/0211.xhp |2 +-
 source/text/shared/04/0101.xhp |3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit bcbb4105763653a71881bf2c18c275a686078511
Author: Mike Kaganski 
AuthorDate: Tue Dec 1 07:40:41 2020 +0100
Commit: Olivier Hallot 
CommitDate: Tue Dec 1 12:02:18 2020 +0100

Regex: improve \u/\U description

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

diff --git a/source/text/shared/01/0211.xhp 
b/source/text/shared/01/0211.xhp
index dbc0d877c..8e5cea57e 100644
--- a/source/text/shared/01/0211.xhp
+++ b/source/text/shared/01/0211.xhp
@@ -194,7 +194,7 @@
 
 The 
character represented by the four-digit hexadecimal Unicode code 
().
 The 
character represented by the eight-digit hexadecimal Unicode code 
().
-For 
certain symbol fonts the Unicode code for special characters may depend on the 
font in use. The Unicode codes can be viewed by choosing Insert - 
Special Character.
+For 
certain symbol fonts the symbol (glyph) that you see on screen may look related 
to a different Unicode code than that is actually used for it in the font. The 
Unicode codes can be viewed by choosing Insert - Special 
Character, or using Unicode conversion 
shortcut.
 
   
   
diff --git a/source/text/shared/04/0101.xhp 
b/source/text/shared/04/0101.xhp
index 8067d08ec..80bae7687 100644
--- a/source/text/shared/04/0101.xhp
+++ b/source/text/shared/04/0101.xhp
@@ -52,10 +52,11 @@
   Some of the 
characters shown on the menu bar are underlined. You can access these menus 
directly by pressing the underlined character together with the 
Alt key. Once the menu is opened, you will again find 
underlined characters. You can access these menu items directly by simply 
pressing the underlined character key.
   
 
+  
 Entering Unicode Characters
 You can enter arbitrary 
Unicode characters in the document typing the Unicode hexadecimal code point 
and then pressing Command+Option+XAlt+X
 (default). Type the Unicode hexadecimal notation and press Command+Option+XAlt+X
 to toggle between the Unicode character and its hexadecimal notation. 
Selection is not necessary but the conversion will apply to the selected 
characters. Toggling occurs on the characters prior to the cursor position when 
these characters form a valid Unicode hexadecimal point. Hexadecimal code 
points with value in the range U+ to U+0020 are not converted.
 The default Unicode 
conversion shortcut is Command+Option+XAlt+X
 and Command+Option+CAlt+C
 in some locales where the default Unicode shortcut interferes with the main 
menu shortcut. To reassign the shortcut, choose Tools > Customize > 
Keyboard and select Category:Options with 
Function:Toggle Unicode Notation.
-
+  
 Using Shortcut Keys to Control Dialogs
   There is 
always one element highlighted in any given dialog - usually shown by a broken 
frame. This element, which can be either a button, an option field, an entry in 
a list box or a check box, is said to have the focus on it. If the focal point 
is a button, pressing Enter runs it as if you had 
clicked it. A check box is toggled by pressing the Spacebar. If an option field has the focus, use the arrow 
keys to change the activated option field in that area. Use the Tab key to go from one element or area to the next one, 
use Shift+Tab to go in the reverse 
direction.
   Pressing 
Esc closes the dialog without saving changes. 

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Luboš Luňák (via logerrit)
 sc/source/core/data/table3.cxx |   48 ++---
 1 file changed, 40 insertions(+), 8 deletions(-)

New commits:
commit 85cb9262644ebe376f9c5af1f01a0216a51a6d6d
Author: Luboš Luňák 
AuthorDate: Tue Nov 24 15:23:22 2020 +0100
Commit: Luboš Luňák 
CommitDate: Tue Dec 1 11:18:52 2020 +0100

bring back optimized calc querying by value (tdf#133878)

When filtering, if the filtered value was a number, Calc used
to convert the string value from the autofilter dialog to a number,
since querying by numerical value is much faster then comparing
strings. Commit 42e472b5870278058537d43d03d457dc80b16166 tried
to fix a problem with filtering time values (that are internally
also represented as a float) by moving this optimization elsewhere,
but that had 2 problems: 1) the problem was with the time value
getting rounded to seconds for display and then converting back
to float value for querying, so the move would not have fixed
anything, 2) the move "fixed" the problem by essentially disabling
the optimization (the new code doesn't get called with the doc
from tdf#105629).
This commit reverts that (actually, it does the optimization in both
places, since at least the unittest requires it in the other place,
and it seems to make sense to keep it there too). As a fix
for the original problem, this this optimization is allowed
only for number formats where this problem should not occur.

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

diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index a528117f1d74..b4967a9a31dd 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -2978,6 +2978,29 @@ void ScTable::TopTenQuery( ScQueryParam& rParam )
 
 namespace {
 
+bool CanOptimizeQueryStringToNumber( SvNumberFormatter* pFormatter, sal_uInt32 
nFormatIndex )
+{
+// tdf#105629: ScQueryEntry::ByValue queries are faster than 
ScQueryEntry::ByString.
+// The problem with this optimization is that the autofilter dialog 
apparently converts
+// the value to text and then converts that back to a number for filtering.
+// If that leads to any change of value (such as when time is rounded to 
seconds),
+// even matching values will be filtered out. Therefore query by value 
only for formats
+// where no such change should occur.
+if(const SvNumberformat* pEntry = pFormatter->GetEntry(nFormatIndex))
+{
+switch(pEntry->GetType())
+{
+case SvNumFormatType::NUMBER:
+case SvNumFormatType::FRACTION:
+case SvNumFormatType::SCIENTIFIC:
+return true;
+default:
+break;
+}
+}
+return false;
+}
+
 class PrepareQueryItem
 {
 const ScDocument& mrDoc;
@@ -2986,15 +3009,26 @@ public:
 
 void operator() (ScQueryEntry::Item& rItem)
 {
-// Double-check if the query by date is really appropriate.
-
-if (rItem.meType != ScQueryEntry::ByDate)
+if (rItem.meType != ScQueryEntry::ByString && rItem.meType != 
ScQueryEntry::ByDate)
 return;
 
 sal_uInt32 nIndex = 0;
 bool bNumber = mrDoc.GetFormatTable()->
 IsNumberFormat(rItem.maString.getString(), nIndex, rItem.mfVal);
 
+// Advanced Filter creates only ByString queries that need to be
+// converted to ByValue if appropriate. rItem.mfVal now holds the value
+// if bNumber==true.
+
+if (rItem.meType == ScQueryEntry::ByString)
+{
+if (bNumber && CanOptimizeQueryStringToNumber( 
mrDoc.GetFormatTable(), nIndex ))
+rItem.meType = ScQueryEntry::ByValue;
+return;
+}
+
+// Double-check if the query by date is really appropriate.
+
 if (bNumber && ((nIndex % SV_COUNTRY_LANGUAGE_OFFSET) != 0))
 {
 const SvNumberformat* pEntry = 
mrDoc.GetFormatTable()->GetEntry(nIndex);
@@ -3360,19 +3394,17 @@ bool ScTable::CreateQueryParam(SCCOL nCol1, SCROW 
nRow1, SCCOL nCol2, SCROW nRow
 
 SvNumberFormatter* pFormatter = rDocument.GetFormatTable();
 nCount = rQueryParam.GetEntryCount();
-
 if (bValid)
 {
-//  bQueryByString must be set
+//  query type must be set
 for (i=0; i < nCount; i++)
 {
 ScQueryEntry::Item& rItem = rQueryParam.GetEntry(i).GetQueryItem();
-
 sal_uInt32 nIndex = 0;
 bool bNumber = pFormatter->IsNumberFormat(
 rItem.maString.getString(), nIndex, rItem.mfVal);
-
-rItem.meType = bNumber ? ScQueryEntry::ByValue : 
ScQueryEntry::ByString;
+rItem.meType = bNumber && CanOptimizeQueryStringToNumber( 
pFormatter, nIndex )
+? ScQueryEntry::ByValue

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

2020-12-01 Thread Luboš Luňák (via logerrit)
 cui/source/options/optgdlg.cxx |  101 +++--
 cui/source/options/optgdlg.hxx |5 --
 2 files changed, 8 insertions(+), 98 deletions(-)

New commits:
commit 414930465e86e898a2493f61e4832f9a841ebe00
Author: Luboš Luňák 
AuthorDate: Mon Nov 30 16:40:57 2020 +0100
Commit: Luboš Luňák 
CommitDate: Tue Dec 1 11:16:13 2020 +0100

drop the needless and broken SkiaConfig abstraction (tdf#137935)

I originally copy&pasted this from the OpenGL setting, but this appears
to be just an unnecessary complication. Both the option and writing
is in fact simple, and trying to make it abstract and complicated
doesn't provide much, and it causes the options not saved if only
'Apply' is used in the config dialog.

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

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 0dc33f2c64ba..07435990a234 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -101,90 +101,6 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::util;
 using namespace ::utl;
 
-namespace svt {
-
-class SkiaCfg
-{
-private:
-bool mbUseSkia;
-bool mbForceSkiaRaster;
-bool mbModified;
-
-public:
-SkiaCfg();
-~SkiaCfg();
-
-bool useSkia() const;
-bool forceSkiaRaster() const;
-
-void setUseSkia(bool bSkia);
-void setForceSkiaRaster(bool bSkia);
-
-void reset();
-};
-
-SkiaCfg::SkiaCfg():
-mbModified(false)
-{
-reset();
-}
-
-void SkiaCfg::reset()
-{
-mbUseSkia = officecfg::Office::Common::VCL::UseSkia::get();
-mbForceSkiaRaster = officecfg::Office::Common::VCL::ForceSkiaRaster::get();
-mbModified = false;
-}
-
-SkiaCfg::~SkiaCfg()
-{
-if (!mbModified)
-return;
-
-try
-{
-std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
-if (!officecfg::Office::Common::VCL::UseSkia::isReadOnly())
-officecfg::Office::Common::VCL::UseSkia::set(mbUseSkia, batch);
-if (!officecfg::Office::Common::VCL::ForceSkiaRaster::isReadOnly())
-
officecfg::Office::Common::VCL::ForceSkiaRaster::set(mbForceSkiaRaster, batch);
-batch->commit();
-}
-catch (...)
-{
-}
-}
-
-bool SkiaCfg::useSkia() const
-{
-return mbUseSkia;
-}
-
-bool SkiaCfg::forceSkiaRaster() const
-{
-return mbForceSkiaRaster;
-}
-
-void SkiaCfg::setUseSkia(bool bSkia)
-{
-if (bSkia != mbUseSkia)
-{
-mbUseSkia = bSkia;
-mbModified = true;
-}
-}
-
-void SkiaCfg::setForceSkiaRaster(bool bSkia)
-{
-if (mbForceSkiaRaster != bSkia)
-{
-mbForceSkiaRaster = bSkia;
-mbModified = true;
-}
-}
-
-}
-
 // class OfaMiscTabPage --
 
 DeactivateRC OfaMiscTabPage::DeactivatePage( SfxItemSet* pSet_ )
@@ -656,7 +572,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
 , pAppearanceCfg(new SvtTabAppearanceCfg)
 , pCanvasSettings(new CanvasSettings)
 , mpDrawinglayerOpt(new SvtOptionsDrawinglayer)
-, mpSkiaConfig(new svt::SkiaCfg)
 , m_xIconSizeLB(m_xBuilder->weld_combo_box("iconsize"))
 , m_xSidebarIconSizeLB(m_xBuilder->weld_combo_box("sidebariconsize"))
 , 
m_xNotebookbarIconSizeLB(m_xBuilder->weld_combo_box("notebookbariconsize"))
@@ -941,8 +856,10 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 if (m_xUseSkia->get_state_changed_from_saved() ||
 m_xForceSkiaRaster->get_state_changed_from_saved())
 {
-mpSkiaConfig->setUseSkia(m_xUseSkia->get_active());
-mpSkiaConfig->setForceSkiaRaster(m_xForceSkiaRaster->get_active());
+std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
+officecfg::Office::Common::VCL::UseSkia::set(m_xUseSkia->get_active(), 
batch);
+
officecfg::Office::Common::VCL::ForceSkiaRaster::set(m_xForceSkiaRaster->get_active(),
 batch);
+batch->commit();
 bModified = true;
 }
 
@@ -989,7 +906,6 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
 void OfaViewTabPage::Reset( const SfxItemSet* )
 {
 SvtMiscOptions aMiscOptions;
-mpSkiaConfig->reset();
 
 if (aMiscOptions.GetSymbolsSize() != SFX_SYMBOLS_SIZE_AUTO)
 {
@@ -1072,16 +988,15 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
 m_xUseAntiAliase->save_state();
 }
 
-m_xUseSkia->set_active(mpSkiaConfig->useSkia());
-m_xForceSkiaRaster->set_active(mpSkiaConfig->forceSkiaRaster());
+m_xUseSkia->set_active(officecfg::Office::Common::VCL::UseSkia::get());
+
m_xForceSkiaRaster->set_active(officecfg::Office::Common::VCL::ForceSkiaRaster::get());
+m_xUseSkia->save_state();
+m_xForceSkiaRaster->save_state();
 
 m_xFontAntiAliasing->save_state();
 m_xAAPointLimit-

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

2020-12-01 Thread Luboš Luňák (via logerrit)
 sc/inc/document.hxx |   17 -
 sc/source/core/data/documen2.cxx|2 +-
 sc/source/core/data/documen8.cxx|   12 +++-
 sc/source/core/data/document.cxx|   22 +++---
 sc/source/core/data/formulacell.cxx |5 ++---
 5 files changed, 17 insertions(+), 41 deletions(-)

New commits:
commit e70739d24b81397ca8e216a4188f09f665030c34
Author: Luboš Luňák 
AuthorDate: Fri Nov 27 11:43:10 2020 +0100
Commit: Luboš Luňák 
CommitDate: Tue Dec 1 11:15:50 2020 +0100

clean up ScDocumentThreadSpecific

IIRC there has always been a bit of an overlap between
ScDocumentThreadSpecific and ScInterpreterContext, but it has evolved
over time into the current state, which AFAICT is that
ScDocumentThreadSpecific is just a thread_local aggregate
of thread-specific data (including ScInterpreterContext) and
ScInterpreterContext is the actual storage used for passing data
around (including to/from the worker threads). So remove obsolete
parts of ScDocumentThreadSpecific, including the functions
for moving data to/from threads (they do not do anything, they
even can't do anything because the struct is thread_local, and
they have already been incorrectly converted to static by loplugin).

Change-Id: I81fff7c83df151413a5387b3173af60f122f374a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106759
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 
(cherry picked from commit f98af92e2bbc2064ddc18b80ede68f4267813ddf)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106826

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 5bab5a19d80c..1d6a20efd2af 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -297,16 +297,7 @@ const sal_uInt8 SC_DDE_IGNOREMODE= 255;   /// For 
usage in FindDdeLink()
 struct ScDocumentThreadSpecific
 {
 std::unique_ptr xRecursionHelper; // information for 
recursive and iterative cell formulas
-ScInterpreterContext* pContext;  // references the context passed around 
for easier access
-
-ScDocumentThreadSpecific();
-~ScDocumentThreadSpecific();
-
-// To be called in the thread at start
-static void SetupFromNonThreadedData(const ScDocumentThreadSpecific& 
rNonThreadedData);
-
-// To be called in the main thread after the thread has finished
-static void MergeBackIntoNonThreadedData(ScDocumentThreadSpecific& 
rNonThreadedData);
+ScInterpreterContext* pContext = nullptr;  // references the context 
passed around for easier access
 };
 
 /// Enumeration to determine which pieces of the code should not be mutated 
when set.
@@ -619,8 +610,8 @@ public:
 {
 return IsThreadedGroupCalcInProgress() ? *maThreadSpecific.pContext : 
GetNonThreadedContext();
 }
-static void SetupFromNonThreadedContext( ScInterpreterContext& 
threadedContext, int threadNumber );
-void MergeBackIntoNonThreadedContext( ScInterpreterContext& 
threadedContext, int threadNumber );
+void SetupContextFromNonThreadedContext( ScInterpreterContext& 
threadedContext, int threadNumber );
+void MergeContextBackIntoNonThreadedContext( ScInterpreterContext& 
threadedContext, int threadNumber );
 void SetThreadedGroupCalcInProgress( bool set ) { (void)this; 
ScGlobal::bThreadedGroupCalcInProgress = set; }
 bool IsThreadedGroupCalcInProgress() const { (void)this; return 
ScGlobal::bThreadedGroupCalcInProgress; }
 
@@ -2192,7 +2183,7 @@ public:
  */
 void SC_DLLPUBLIC SetFormulaResults( const ScAddress& rTopPos, const 
double* pResults, size_t nLen );
 
-const ScDocumentThreadSpecific& CalculateInColumnInThread( 
ScInterpreterContext& rContext, const ScRange& rCalcRange, unsigned 
nThisThread, unsigned nThreadsTotal);
+void CalculateInColumnInThread( ScInterpreterContext& rContext, const 
ScRange& rCalcRange, unsigned nThisThread, unsigned nThreadsTotal);
 void HandleStuffAfterParallelCalculation( SCCOL nColStart, SCCOL nColEnd, 
SCROW nRow, size_t nLen, SCTAB nTab, ScInterpreter* pInterpreter );
 
 /**
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 267382a516eb..ee2383a6fad1 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -409,16 +409,15 @@ void ScDocument::SetFormulaResults( const ScAddress& 
rTopPos, const double* pRes
 pTab->SetFormulaResults(rTopPos.Col(), rTopPos.Row(), pResults, nLen);
 }
 
-const ScDocumentThreadSpecific& ScDocument::CalculateInColumnInThread( 
ScInterpreterContext& rContext, const ScRange& rCalcRange, unsigned 
nThisThread, unsigned nThreadsTotal)
+void ScDocument::CalculateInColumnInThread( ScInterpreterContext& rContext, 
const ScRange& rCalcRange, unsigned nThisThread, unsigned nThreadsTotal)
 {
 ScTable* pTab = FetchTable(rCalcRange.aStart.Tab());
 if (!pTab)
-return maNonThreaded;
+return;
 
 assert(IsThreadedGroupCalcInProgress());
 
 maTh

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - 2 commits - comphelper/qa comphelper/source include/comphelper sc/source

2020-12-01 Thread Luboš Luňák (via logerrit)
 comphelper/qa/unit/parallelsorttest.cxx |2 -
 comphelper/qa/unit/threadpooltest.cxx   |   62 
 comphelper/source/misc/threadpool.cxx   |   28 ++
 include/comphelper/threadpool.hxx   |9 +++-
 sc/source/core/data/documen2.cxx|2 -
 5 files changed, 90 insertions(+), 13 deletions(-)

New commits:
commit ebd9e833fab5a26a137bef6c0e7bce2b3c9e0cf9
Author: Luboš Luňák 
AuthorDate: Thu Nov 26 15:05:16 2020 +0100
Commit: Luboš Luňák 
CommitDate: Tue Dec 1 11:15:22 2020 +0100

add ThreadPool::isIdle() to avoid incorrect detection of "no tasks"

Tasks that are being worked on but are not yet finished are removed
from maTasks, so maTasks.empty() does not mean "idle". I fixed one
case already in 2ad4e77a0f266ae6e6fccaebb1d080d2880bdac3, this one
fixes joinAll() which has a similar problem and triggers

https://gerrit.libreoffice.org/c/core/+/69473/3/sc/source/core/data/documen2.cxx#312

Also rename joinAll() to joinThreadsIfIdle(), as that's what it really is.

Change-Id: I8129cfadb81be968575ea8718de9ae997b877a4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106701
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 
(cherry picked from commit 583b0612696f42571ac97b66c159570ea452fe17)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106824

diff --git a/comphelper/qa/unit/parallelsorttest.cxx 
b/comphelper/qa/unit/parallelsorttest.cxx
index 90dcb3c235ba..a3618244ab8d 100644
--- a/comphelper/qa/unit/parallelsorttest.cxx
+++ b/comphelper/qa/unit/parallelsorttest.cxx
@@ -53,7 +53,7 @@ void ParallelSortTest::setUp()
 void ParallelSortTest::tearDown()
 {
 if (pThreadPool)
-pThreadPool->joinAll();
+pThreadPool->joinThreadsIfIdle();
 }
 
 void ParallelSortTest::fillRandomUptoN(std::vector& rVector, size_t N)
diff --git a/comphelper/qa/unit/threadpooltest.cxx 
b/comphelper/qa/unit/threadpooltest.cxx
index 03bd4a33d69c..695aca5b421a 100644
--- a/comphelper/qa/unit/threadpooltest.cxx
+++ b/comphelper/qa/unit/threadpooltest.cxx
@@ -24,10 +24,16 @@ class ThreadPoolTest : public CppUnit::TestFixture
 public:
 void testPreferredConcurrency();
 void testWorkerUsage();
+void testTasksInThreads();
+void testNoThreads();
+void testDedicatedPool();
 
 CPPUNIT_TEST_SUITE(ThreadPoolTest);
 CPPUNIT_TEST(testPreferredConcurrency);
 CPPUNIT_TEST(testWorkerUsage);
+CPPUNIT_TEST(testTasksInThreads);
+CPPUNIT_TEST(testNoThreads);
+CPPUNIT_TEST(testDedicatedPool);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -98,6 +104,62 @@ void ThreadPoolTest::testWorkerUsage()
 rSharedPool.waitUntilDone(pTag);
 }
 
+namespace
+{
+class CheckThreadTask : public comphelper::ThreadTask
+{
+oslThreadIdentifier mThreadId;
+bool mCheckEqual;
+
+public:
+CheckThreadTask(oslThreadIdentifier threadId, bool checkEqual,
+const std::shared_ptr& pTag)
+: ThreadTask(pTag)
+, mThreadId(threadId)
+, mCheckEqual(checkEqual)
+{
+}
+virtual void doWork()
+{
+assert(mCheckEqual ? osl::Thread::getCurrentIdentifier() == mThreadId
+   : osl::Thread::getCurrentIdentifier() != mThreadId);
+}
+};
+} // namespace
+
+void ThreadPoolTest::testTasksInThreads()
+{
+// Check that all tasks are run in worker threads, not this thread.
+comphelper::ThreadPool& pool = 
comphelper::ThreadPool::getSharedOptimalPool();
+std::shared_ptr pTag = 
comphelper::ThreadPool::createThreadTaskTag();
+for (int i = 0; i < 8; ++i)
+pool.pushTask(
+
std::make_unique(osl::Thread::getCurrentIdentifier(), false, 
pTag));
+pool.waitUntilDone(pTag);
+}
+
+void ThreadPoolTest::testNoThreads()
+{
+// No worker threads, tasks will be run in this thread.
+comphelper::ThreadPool pool(0);
+std::shared_ptr pTag = 
comphelper::ThreadPool::createThreadTaskTag();
+for (int i = 0; i < 8; ++i)
+pool.pushTask(
+
std::make_unique(osl::Thread::getCurrentIdentifier(), true, 
pTag));
+pool.waitUntilDone(pTag);
+}
+
+void ThreadPoolTest::testDedicatedPool()
+{
+// Test that a separate thread pool works. The tasks themselves do not 
matter.
+comphelper::ThreadPool pool(4);
+std::shared_ptr pTag = 
comphelper::ThreadPool::createThreadTaskTag();
+for (int i = 0; i < 8; ++i)
+pool.pushTask(
+
std::make_unique(osl::Thread::getCurrentIdentifier(), false, 
pTag));
+pool.waitUntilDone(pTag);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ThreadPoolTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/comphelper/source/misc/threadpool.cxx 
b/comphelper/source/misc/threadpool.cxx
index 4ff7bac3aede..1ef0eeaaba5c 100644
--- a/comphelper/source/misc/threadpool.cxx
+++ b/comphelper/source/misc/threadpool.cxx
@@ -76,6 +76,7 @@ public:
 std::unique_ptr pTask = mpPool->popWorkLocked( aGuard, 
true );
 if( pTask )

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

2020-12-01 Thread Szymon Kłos (via logerrit)
 sc/source/ui/cctrl/checklistmenu.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 5c870e6ec5753c86de7c27292575a5969e792a01
Author: Szymon Kłos 
AuthorDate: Thu Nov 12 14:48:35 2020 +0100
Commit: Szymon Kłos 
CommitDate: Tue Dec 1 11:03:42 2020 +0100

jsdialog: handle close for autofilter menu

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

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index 452e7c1eb61a..98421847ccd6 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -395,6 +395,9 @@ void ScCheckListMenuControl::StartPopupMode(const 
tools::Rectangle& rRect, Float
 
 void ScCheckListMenuControl::terminateAllPopupMenus()
 {
+if (comphelper::LibreOfficeKit::isActive())
+NotifyCloseLOK();
+
 EndPopupMode();
 ScCheckListMenuWindow* pParentMenu = mxFrame->GetParentMenu();
 if (pParentMenu)
@@ -1355,7 +1358,7 @@ void ScCheckListMenuControl::NotifyCloseLOK()
 {
 std::stringstream aStream;
 boost::property_tree::ptree aTree;
-aTree.put("jsontype", "dockingwindow");
+aTree.put("jsontype", "autofilter");
 aTree.put("action", "close");
 
 boost::property_tree::write_json(aStream, 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/jsdialog vcl/source

2020-12-01 Thread Szymon Kłos (via logerrit)
 include/vcl/salvtables.hxx   |   17 +
 vcl/jsdialog/jsdialogbuilder.cxx |5 +
 vcl/source/app/salvtables.cxx|   17 -
 3 files changed, 22 insertions(+), 17 deletions(-)

New commits:
commit a4b7f16cb2cf433eec58a06404b495ab9077d1fa
Author: Szymon Kłos 
AuthorDate: Thu Nov 12 14:28:47 2020 +0100
Commit: Szymon Kłos 
CommitDate: Tue Dec 1 11:03:24 2020 +0100

jsdialog: signal when treeview element is toggled

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

diff --git a/include/vcl/salvtables.hxx b/include/vcl/salvtables.hxx
index ee55bb9fa081..23db65df8525 100644
--- a/include/vcl/salvtables.hxx
+++ b/include/vcl/salvtables.hxx
@@ -1101,6 +1101,23 @@ public:
 virtual ~SalInstanceTextView() override;
 };
 
+struct SalInstanceTreeIter : public weld::TreeIter
+{
+SalInstanceTreeIter(const SalInstanceTreeIter* pOrig)
+: iter(pOrig ? pOrig->iter : nullptr)
+{
+}
+SalInstanceTreeIter(SvTreeListEntry* pIter)
+: iter(pIter)
+{
+}
+virtual bool equal(const TreeIter& rOther) const override
+{
+return iter == static_cast(rOther).iter;
+}
+SvTreeListEntry* iter;
+};
+
 class SalInstanceTreeView : public SalInstanceContainer, public virtual 
weld::TreeView
 {
 protected:
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 877ebaf6e8db..5ae77f856e2f 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -761,7 +761,12 @@ void JSTreeView::set_toggle(int pos, TriState eState, int 
col)
 pEntry = m_xTreeView->Next(pEntry);
 
 if (pEntry)
+{
 SalInstanceTreeView::set_toggle(pEntry, eState, col);
+signal_toggled(iter_col(SalInstanceTreeIter(pEntry), col));
+
+notifyDialogState();
+}
 }
 
 void JSTreeView::select(int pos)
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 5b4a76a1c8ec..39f19171db0e 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3199,23 +3199,6 @@ IMPL_LINK_NOARG(SalInstanceEntry, ActivateHdl, Edit&, 
bool)
 return m_aActivateHdl.Call(*this);
 }
 
-struct SalInstanceTreeIter : public weld::TreeIter
-{
-SalInstanceTreeIter(const SalInstanceTreeIter* pOrig)
-: iter(pOrig ? pOrig->iter : nullptr)
-{
-}
-SalInstanceTreeIter(SvTreeListEntry* pIter)
-: iter(pIter)
-{
-}
-virtual bool equal(const TreeIter& rOther) const override
-{
-return iter == static_cast(rOther).iter;
-}
-SvTreeListEntry* iter;
-};
-
 static SalInstanceTreeView* g_DragSource;
 
 // Each row has a cell for the expander image, (and an optional cell for a
___
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

2020-12-01 Thread Szymon Kłos (via logerrit)
 sc/source/ui/cctrl/checklistmenu.cxx |   34 ++
 sc/source/ui/inc/checklistmenu.hxx   |2 ++
 2 files changed, 36 insertions(+)

New commits:
commit 7120385d05a1f820c661ede1650af8bfb4f4ceff
Author: Szymon Kłos 
AuthorDate: Wed Nov 4 11:37:15 2020 +0100
Commit: Szymon Kłos 
CommitDate: Tue Dec 1 11:03:07 2020 +0100

jsdialog: notify about autofilter dropdown close

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

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index 8c378849a83d..452e7c1eb61a 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -32,6 +32,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 
@@ -1342,11 +1344,40 @@ void ScCheckListMenuControl::launch(const 
tools::Rectangle& rRect)
 StartPopupMode(aRect, FloatWinPopupFlags::Down);
 }
 
+void ScCheckListMenuControl::NotifyCloseLOK()
+{
+VclPtr aNotifierWindow = mxFrame->GetParentWithLOKNotifier();
+if (aNotifierWindow) {
+try
+{
+const vcl::ILibreOfficeKitNotifier* pNotifier = 
aNotifierWindow->GetLOKNotifier();
+if (pNotifier)
+{
+std::stringstream aStream;
+boost::property_tree::ptree aTree;
+aTree.put("jsontype", "dockingwindow");
+aTree.put("action", "close");
+
+boost::property_tree::write_json(aStream, aTree);
+const std::string message = aStream.str();
+pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, 
message.c_str());
+}
+}
+catch (boost::property_tree::json_parser::json_parser_error& rError)
+{
+SAL_WARN("vcl", rError.message());
+}
+}
+}
+
 void ScCheckListMenuControl::close(bool bOK)
 {
 if (bOK && mxOKAction)
 mxOKAction->execute();
 EndPopupMode();
+
+if (comphelper::LibreOfficeKit::isActive())
+NotifyCloseLOK();
 }
 
 void ScCheckListMenuControl::setExtendedData(std::unique_ptr p)
@@ -1374,6 +1405,9 @@ IMPL_LINK_NOARG(ScCheckListMenuControl, PopupModeEndHdl, 
FloatingWindow*, void)
 clearSelectedMenuItem();
 if (mxPopupEndAction)
 mxPopupEndAction->execute();
+
+if (comphelper::LibreOfficeKit::isActive())
+NotifyCloseLOK();
 }
 
 int ScCheckListMenuControl::GetTextWidth(const OUString& rsName) const
diff --git a/sc/source/ui/inc/checklistmenu.hxx 
b/sc/source/ui/inc/checklistmenu.hxx
index eb5c418a3cad..49d4822ecd3b 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -209,6 +209,8 @@ private:
 
 void CreateDropDown();
 
+void NotifyCloseLOK();
+
 DECL_LINK(ButtonHdl, weld::Button&, void);
 DECL_LINK(TriStateHdl, weld::ToggleButton&, void);
 
___
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

2020-12-01 Thread Szymon Kłos (via logerrit)
 sc/source/ui/cctrl/checklistmenu.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit f046ea86e6185c4515f95abd2abdc3c544d44021
Author: Szymon Kłos 
AuthorDate: Mon Nov 2 16:33:22 2020 +0100
Commit: Szymon Kłos 
CommitDate: Tue Dec 1 11:02:51 2020 +0100

Set height for autofilter dropdown

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

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index 5d76250bed14..8c378849a83d 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -462,6 +462,7 @@ 
ScCheckListMenuControl::ScCheckListMenuControl(ScCheckListMenuWindow* pParent, v
 bool bIsSubMenu = pParent->GetParentMenu();
 
 int nChecksHeight = mxTreeChecks->get_height_rows(9);
+int nDiffHeight = nChecksHeight - 
mxTreeChecks->get_preferred_size().Height();
 if (!bIsSubMenu && nWidth != -1)
 {
 mnCheckWidthReq = nWidth - mxFrame->get_border_width() * 2 - 4;
@@ -518,6 +519,9 @@ 
ScCheckListMenuControl::ScCheckListMenuControl(ScCheckListMenuWindow* pParent, v
 mxTreeChecks->set_size_request(mnCheckWidthReq, nChecksHeight);
 mxListChecks->set_size_request(mnCheckWidthReq, nChecksHeight);
 }
+
+mxContainer->set_size_request(mxContainer->get_preferred_size().Width(),
+  mxContainer->get_preferred_size().Height() + 
nDiffHeight);
 }
 
 IMPL_LINK_NOARG(ScCheckListMenuControl, FocusHdl, weld::Widget&, void)
___
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 - desktop/source include/vcl vcl/inc vcl/jsdialog

2020-12-01 Thread Szymon Kłos (via logerrit)
 desktop/source/lib/init.cxx  |   22 --
 include/vcl/jsdialog/executor.hxx|8 +++
 include/vcl/salvtables.hxx   |2 
 include/vcl/weld.hxx |4 +
 vcl/inc/jsdialog/jsdialogbuilder.hxx |   20 +
 vcl/jsdialog/executor.cxx|   65 +
 vcl/jsdialog/jsdialogbuilder.cxx |   76 +++
 7 files changed, 176 insertions(+), 21 deletions(-)

New commits:
commit 26b45c96ca1b2c2214a88d24a08de94b712db584
Author: Szymon Kłos 
AuthorDate: Mon Nov 2 12:24:49 2020 +0100
Commit: Szymon Kłos 
CommitDate: Tue Dec 1 11:02:36 2020 +0100

jsdialog: execute checkbox action

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

diff --git a/include/vcl/jsdialog/executor.hxx 
b/include/vcl/jsdialog/executor.hxx
index e49190f31e5f..5dde733a3823 100644
--- a/include/vcl/jsdialog/executor.hxx
+++ b/include/vcl/jsdialog/executor.hxx
@@ -22,6 +22,8 @@ public:
 
 static void trigger_changed(weld::ComboBox& rComboBox) { 
rComboBox.signal_changed(); }
 
+static void trigger_toggled(weld::ToggleButton& rButton) { 
rButton.signal_toggled(); }
+
 static void trigger_row_activated(weld::TreeView& rTreeView)
 {
 rTreeView.signal_row_activated();
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 289c68aa148e..6dcd91c97ccb 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -1126,6 +1126,8 @@ public:
 
 class VCL_DLLPUBLIC ToggleButton : virtual public Button
 {
+friend class ::LOKTrigger;
+
 protected:
 Link m_aToggleHdl;
 TriState m_eSavedValue = TRISTATE_FALSE;
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index dc98ba525458..a4fb7093b4bf 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -96,6 +96,20 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 }
 }
 }
+else if (sControlType == "checkbox")
+{
+auto pCheckButton = dynamic_cast(pWidget);
+if (pCheckButton)
+{
+if (sAction == "change")
+{
+bool bChecked = rData["data"] == "true";
+pCheckButton->set_state(bChecked ? TRISTATE_TRUE : 
TRISTATE_FALSE);
+
LOKTrigger::trigger_toggled(*static_cast(pCheckButton));
+return true;
+}
+}
+}
 else if (sControlType == "drawingarea")
 {
 auto pArea = dynamic_cast(pWidget);
commit c191da8d670262db1631f98ad3c9885f8f05dc10
Author: Szymon Kłos 
AuthorDate: Fri Oct 30 10:51:08 2020 +0100
Commit: Szymon Kłos 
CommitDate: Tue Dec 1 11:02:22 2020 +0100

jsdialog: implement TreeView

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index c9d5e7d1d489..4b043141e743 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -449,24 +449,6 @@ std::vector 
desktop::jsonToPropertyValuesVector(const char
 }
 
 
-static StringMap jsonToStringMap(const char* pJSON)
-{
-StringMap aArgs;
-if (pJSON && pJSON[0] != '\0')
-{
-std::stringstream aStream(pJSON);
-boost::property_tree::ptree aTree;
-boost::property_tree::read_json(aStream, aTree);
-
-for (const auto& rPair : aTree)
-{
-aArgs[OUString::fromUtf8(rPair.first.c_str())] = 
OUString::fromUtf8(rPair.second.get_value(".").c_str());
-}
-}
-return aArgs;
-}
-
-
 static boost::property_tree::ptree unoAnyToPropertyTree(const uno::Any& 
anyItem)
 {
 boost::property_tree::ptree aTree;
@@ -3714,7 +3696,7 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* 
/*pThis*/, unsigned long
 {
 SolarMutexGuard aGuard;
 
-StringMap aMap(jsonToStringMap(pArguments));
+StringMap aMap(jsdialog::jsonToStringMap(pArguments));
 VclPtr pWindow = vcl::Window::FindLOKWindow(nWindowId);
 
 if (!pWindow && nWindowId >= 10 /* why unsigned? */)
@@ -5704,7 +5686,7 @@ static void 
doc_sendFormFieldEvent(LibreOfficeKitDocument* pThis, const char* pA
 if (doc_getDocumentType(pThis) != LOK_DOCTYPE_TEXT)
 return;
 
-StringMap aMap(jsonToStringMap(pArguments));
+StringMap aMap(jsdialog::jsonToStringMap(pArguments));
 ITiledRenderable* pDoc = getTiledRenderable(pThis);
 if (!pDoc)
 {
diff --git a/include/vcl/jsdialog/executor.hxx 
b/include/vcl/jsdialog/executor.hxx
index 1cfa24c28a8a..e49190f31e5f 100644
--- a/include/vcl/jsdialog/executor.hxx
+++ b/include/vcl/jsdialog/executor.hxx
@@ -2

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

2020-12-01 Thread Noel (via logerrit)
 xmloff/source/text/XMLIndexTitleTemplateContext.cxx |   20 +---
 xmloff/source/text/XMLIndexTitleTemplateContext.hxx |5 +++--
 2 files changed, 12 insertions(+), 13 deletions(-)

New commits:
commit a4a15dc18c4be7fdb840b5d478c39cb1e8206b1a
Author: Noel 
AuthorDate: Tue Dec 1 08:19:41 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Dec 1 11:00:55 2020 +0100

fastparser in XMLIndexTitleTemplateContext

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

diff --git a/xmloff/source/text/XMLIndexTitleTemplateContext.cxx 
b/xmloff/source/text/XMLIndexTitleTemplateContext.cxx
index 14b4608d8877..e5c690f09d49 100644
--- a/xmloff/source/text/XMLIndexTitleTemplateContext.cxx
+++ b/xmloff/source/text/XMLIndexTitleTemplateContext.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -50,27 +51,24 @@ 
XMLIndexTitleTemplateContext::~XMLIndexTitleTemplateContext()
 {
 }
 
-void XMLIndexTitleTemplateContext::StartElement(
-const Reference & xAttrList)
+void XMLIndexTitleTemplateContext::startFastElement(
+sal_Int32 /*nElement*/,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
 // there's only one attribute: style-name
-sal_Int16 nLength = xAttrList->getLength();
-for(sal_Int16 nAttr = 0; nAttr < nLength; nAttr++)
+for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
 {
-OUString sLocalName;
-sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
-GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
-  &sLocalName );
-if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- (IsXMLToken(sLocalName, XML_STYLE_NAME)) )
+if ( aIter.getToken() == XML_ELEMENT(TEXT, XML_STYLE_NAME) )
 {
-sStyleName = xAttrList->getValueByIndex(nAttr);
+sStyleName = aIter.toString();
 OUString sDisplayStyleName = GetImport().GetStyleDisplayName(
 XmlStyleFamily::TEXT_PARAGRAPH, sStyleName );
 const Reference < css::container::XNameContainer >&
 rStyles = GetImport().GetTextImport()->GetParaStyles();
 bStyleNameOK = rStyles.is() && rStyles->hasByName( 
sDisplayStyleName );
 }
+else
+XMLOFF_WARN_UNKNOWN("xmloff", aIter);
 }
 }
 
diff --git a/xmloff/source/text/XMLIndexTitleTemplateContext.hxx 
b/xmloff/source/text/XMLIndexTitleTemplateContext.hxx
index a5b698242e68..b517ab9e8015 100644
--- a/xmloff/source/text/XMLIndexTitleTemplateContext.hxx
+++ b/xmloff/source/text/XMLIndexTitleTemplateContext.hxx
@@ -58,8 +58,9 @@ public:
 protected:
 
 /** process parameters */
-virtual void StartElement(
-const css::uno::Reference & xAttrList) 
override;
+virtual void SAL_CALL startFastElement(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& 
xAttrList ) override;
 
 /** set values */
 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Justin Luth (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport15.cxx  |8 ++-
 sw/qa/extras/rtfexport/data/tdf137683_charHighlightNone.rtf |   18 
 sw/qa/extras/rtfexport/rtfexport3.cxx   |8 +++
 sw/qa/extras/ww8export/data/tdf138345_paraCharHighlight.doc |binary
 sw/qa/extras/ww8export/ww8export3.cxx   |   14 ++
 sw/source/filter/ww8/docxattributeoutput.cxx|1 
 sw/source/filter/ww8/rtfattributeoutput.cxx |7 ---
 sw/source/filter/ww8/ww8atr.cxx |   27 
 8 files changed, 69 insertions(+), 14 deletions(-)

New commits:
commit 2622cd9c31a5db423c6f878f990a41191d0079af
Author: Justin Luth 
AuthorDate: Sat Nov 21 13:51:47 2020 +0300
Commit: Miklos Vajna 
CommitDate: Tue Dec 1 10:52:35 2020 +0100

tdf#137683 sw ms formats Char highlight: export "none"

NONE settings need to be exported in order
to cancel out a CharHighlight set
at a higher style level.

This patch has two main parts.
1.) Export none for DOCX/DOC/RTF
2.) Only export necessary "none" highlights.

I am unpleasantly surprised that I did not find
any existing functions that avoided spamming
unnecessary settings into the export. Perhaps
in the default case things are more complicated,
but in this case, only paragraph styles are
expected to have any hierarchical impact.

This could be made into a more general function
at some point, but at the moment I don't have
anywhere else to apply it, and I would be
terribly afraid to try to add it at some
general level... Imagine the regressions.

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index 65baba8fdb99..1170bdc44d11 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -721,10 +721,14 @@ 
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf136441_commentInFootnote, "tdf136441_
 
 DECLARE_OOXMLEXPORT_TEST(testTdf137683_charHighlightTests, 
"tdf137683_charHighlightTests.docx")
 {
+// Don't export unnecessary w:highlight="none" (Unnecessary one 
intentionally hand-added to original .docx)
+xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
+if (pXmlStyles)
+assertXPath(pXmlStyles, 
"/w:styles/w:style[@w:styleId='Normal']/w:rPr/w:highlight", 0);
+
 uno::Reference xRun(getRun(getParagraph(10), 2, "no 
highlight"), uno::UNO_QUERY_THROW);
 // This test was failing with a cyan charHighlight of 65535 (0x00), 
instead of COL_TRANSPARENT (0x)
-if ( !mbExported ) //TODO: export COL_TRANSPARENT
-CPPUNIT_ASSERT_EQUAL(static_cast(COL_AUTO), 
getProperty(xRun, "CharHighlight"));
+CPPUNIT_ASSERT_EQUAL(static_cast(COL_AUTO), 
getProperty(xRun, "CharHighlight"));
 }
 
 DECLARE_OOXMLEXPORT_TEST(testTdf134063, "tdf134063.docx")
diff --git a/sw/qa/extras/rtfexport/data/tdf137683_charHighlightNone.rtf 
b/sw/qa/extras/rtfexport/data/tdf137683_charHighlightNone.rtf
new file mode 100644
index ..4a1eba7b098a
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/tdf137683_charHighlightNone.rtf
@@ -0,0 +1,18 @@
+{\rtf1\ansi\deff4\adeflang1025
+{\fonttbl{\f0\froman\fprq2\fcharset0 Times New 
Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 
Arial;}{\f3\froman\fprq2\fcharset0 Liberation Serif{\*\falt Times New 
Roman};}{\f4\froman\fprq0\fcharset0 Times New Roman;}{\f5\fnil\fprq2\fcharset0 
DejaVu Sans;}}
+{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red255\green151\blue47;}
+{\stylesheet{\s0\snext0\hich\af4\dbch\af5\langfe2052\dbch\af4\afs24\alang1025\widctlpar\hyphpar0\aspalpha\ltrpar\fs48\b\highlight14\cf0\loch\f4\lang255\kerning1
 Normal;}
+{\s15\sbasedon0\snext16\dbch\af5\dbch\af4\afs28\sb240\sa120\keepn\loch\f4\fs28\b\highlight14
 Heading;}
+{\s16\sbasedon0\snext16\sl276\slmult1\sb0\sa140\fs48\b\highlight14 Text Body;}
+{\s17\sbasedon16\snext17\dbch\af4\sl276\slmult1\sb0\sa140\loch\f4\fs48\b\highlight14
 List;}
+{\s18\sbasedon0\snext18\dbch\af4\afs24\ai\sb120\sa120\noline\loch\f4\fs24\i\b\highlight14
 Caption;}
+{\s19\sbasedon0\snext19\dbch\af4\noline\loch\f4\fs48\b\highlight14 Index;}
+{\s20\sbasedon0\snext20\qc\fs96\b\highlight0 noHighlight;}
+}{\*\generator LibreOfficeDev/7.1.0.0.alpha1$Linux_X86_64 
LibreOffice_project/1d485c8880d4a5a379bc0d23553f956b5eedc1bd}{\info{\creatim\yr2020\mo11\dy

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

2020-12-01 Thread Tibor Nagy (via logerrit)
 sw/qa/extras/ooxmlexport/data/tdf123621.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx   |2 +-
 sw/qa/extras/ooxmlexport/ooxmlexport15.cxx   |   11 +++
 sw/source/core/layout/anchoreddrawobject.cxx |   12 ++--
 4 files changed, 22 insertions(+), 3 deletions(-)

New commits:
commit 296d814dcc72ecf15a443aed4d73106cef0672f1
Author: Tibor Nagy 
AuthorDate: Thu Jul 9 09:54:15 2020 +0200
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 10:20:07 2020 +0100

tdf#138130, tdf#123621 sw: fix textbox position according to DOCX

i.e. when spAutoFit is present in DOCX, and size of
the textbox is relative.

See also commit cab956c480eb4f619580285c7b9a15b9e6d9b780
(tdf#112312 DOCX legacy shape export: keep fixed size).

Co-authored-by: Attila Szűcs (NISZ)

Change-Id: I29af97001954ad353a386164b68cd22f6230e3e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98401
Tested-by: László Németh 
Reviewed-by: László Németh 
Signed-off-by: Xisco Fauli 

This commit also includes:

Clean-up of commit I29af97001954ad353a386164b68cd22f6230e3e5

Change-Id: I1963a5d899da2d122e60c4d87ca32aba4fb1f32a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102449
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106589
(cherry picked from commit 92f1c430e4e77e71e7c914ad567d4970e5b2cd95)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106672
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf123621.docx 
b/sw/qa/extras/ooxmlexport/data/tdf123621.docx
new file mode 100644
index ..471b6ef71e95
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf123621.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index f209ed442175..87a5223ccd2b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -236,7 +236,7 @@ DECLARE_OOXMLEXPORT_TEST(testMceNested, "mce-nested.docx")
 // Vertical position of the shape was incorrect due to incorrect nested 
mce handling.
 uno::Reference xShape(getShape(1), uno::UNO_QUERY);
 // positionV's posOffset from the bugdoc, was 0.
-CPPUNIT_ASSERT(6985 <= getProperty(xShape, 
"VertOrientPosition"));
+CPPUNIT_ASSERT(6879 <= getProperty(xShape, 
"VertOrientPosition"));
 // This was -1 (default), make sure the background color is set.
 CPPUNIT_ASSERT_EQUAL(sal_Int32(0x4f81bd), getProperty(xShape, 
"FillColor"));
 
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index 1950b8349697..1fd8ad4a7d84 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -30,6 +30,17 @@ protected:
 }
 };
 
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf123621, "tdf123621.docx")
+{
+xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+if (!pXmlDocument)
+return;
+
+assertXPathContent(pXmlDocument, 
"/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
+"/wp:positionV/wp:posOffset", "1080135");
+}
+
+
 DECLARE_OOXMLEXPORT_TEST(testTdf14_followPgStyle, 
"tdf14_followPgStyle.odt")
 {
 CPPUNIT_ASSERT_EQUAL(2, getPages());
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx 
b/sw/source/core/layout/anchoreddrawobject.cxx
index 2cbe4bab0f3b..a908300b0e0c 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -34,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -681,8 +682,15 @@ SwRect SwAnchoredDrawObject::GetObjBoundRect() const
 nTargetWidth = nWidth * (*GetDrawObj( )->GetRelativeWidth());
 }
 
-long nTargetHeight = aCurrObjRect.GetHeight( );
-if ( GetDrawObj( )->GetRelativeHeight( ) )
+bool bCheck = GetDrawObj()->GetRelativeHeight();
+if (bCheck)
+{
+auto pObjCustomShape = dynamic_cast(GetDrawObj());
+bCheck = !pObjCustomShape || !pObjCustomShape->IsAutoGrowHeight();
+}
+
+long nTargetHeight = aCurrObjRect.GetHeight();
+if (bCheck)
 {
 long nHeight = 0;
 if (GetDrawObj()->GetRelativeHeightRelation() == 
text::RelOrientation::FRAME)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Julien Nabet (via logerrit)
 connectivity/source/commontools/TTableHelper.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit b700cd9509895ade747d7cd5ee0b628307fb08de
Author: Julien Nabet 
AuthorDate: Thu Nov 26 23:12:46 2020 +0100
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 10:19:34 2020 +0100

tdf#137745: crash, when deleting tables and changed relationship isn't 
changed

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

some explanations here:
https://bugs.documentfoundation.org/show_bug.cgi?id=137745#c8

Change-Id: I1d9dc8d2e3ad7e3e36c4687cb9b2c5990f2d2c8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106715
(cherry picked from commit 4335810b00abb9b00a9d81caa5ffe09a3ea927fd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106743
Reviewed-by: Lionel Mamane 
Tested-by: Jenkins
(cherry picked from commit d9c84029c18ea0964705ed8c56e40784a1c556df)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106819
Reviewed-by: Michael Stahl 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/connectivity/source/commontools/TTableHelper.cxx 
b/connectivity/source/commontools/TTableHelper.cxx
index e86af9673052..03724d669704 100644
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -72,6 +72,11 @@ public:
 }
 virtual void SAL_CALL elementRemoved( const 
css::container::ContainerEvent& Event ) override
 {
+// tdf#137745, perhaps connectivity::OTableHelper::disposing() has 
been called
+// which called OTableContainerListener::clear(), so m_pComponent may 
be null
+if (m_pComponent == nullptr)
+return;
+
 OUString sName;
 Event.Accessor  >>= sName;
 if ( m_aRefNames.find(sName) != m_aRefNames.end() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Stephan Bergmann (via logerrit)
 solenv/flatpak-manifest.in |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d040919ddc8f77ea1dbabcb00baf2efdebb85c3a
Author: Stephan Bergmann 
AuthorDate: Fri Nov 27 08:22:33 2020 +0100
Commit: Caolán McNamara 
CommitDate: Tue Dec 1 10:18:38 2020 +0100

Adapt solenv/flatpak-manifest.in to312a33b7636334f6ce3b6d1702bc5d3e45215601

..."Update language-subtag-registry to 2020-09-29"

Change-Id: Idea4df8f6a920cbceb37d5156417f6979d7a4fff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106718
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 25bb4c31a68acd4526176580be72a9d4d626d013)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106732
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 0719073025ed..1da85580037d 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -255,10 +255,10 @@
 "dest-filename": 
"external/tarballs/libfreehand-0.1.2.tar.xz"
 },
 {
-"url": 
"https://dev-www.libreoffice.org/src/language-subtag-registry-2020-04-01.tar.bz2";,
-"sha256": 
"fb1ee0dabfd956a445fbe9f351e86a52767808558f20f4256e67fbbb3768e9da",
+"url": 
"https://dev-www.libreoffice.org/src/language-subtag-registry-2020-09-29.tar.bz2";,
+"sha256": 
"cbe9fca811a37056560aab73e9fc9d3522b46b6785cb02db165f521bf42c230f",
 "type": "file",
-"dest-filename": 
"external/tarballs/language-subtag-registry-2020-04-01.tar.bz2"
+"dest-filename": 
"external/tarballs/language-subtag-registry-2020-09-29.tar.bz2"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/liblangtag-0.6.2.tar.bz2";,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/python3 RepositoryExternal.mk

2020-12-01 Thread Thomas Viehmann (via logerrit)
 RepositoryExternal.mk   |2 
 external/python3/ExternalPackage_python3.mk |  125 ++--
 external/python3/ExternalProject_python3.mk |1 
 3 files changed, 66 insertions(+), 62 deletions(-)

New commits:
commit 12142490cd43f8568ab29e0ddfa75b334d6d39d5
Author: Thomas Viehmann 
AuthorDate: Fri Nov 27 23:08:08 2020 +0100
Commit: Michael Stahl 
CommitDate: Tue Dec 1 10:16:17 2020 +0100

Enable Python Py_DEBUG setting when built with --enable-dbgutil on Linux

This has been suggested on IRC for testing fixes/avoiding regressions
when working on the GIL locking in PyUNO.

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

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index f0cad01beb49..99dfcea22b40 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3200,7 +3200,7 @@ $(call gb_LinkTarget_add_libs,$(1),\
 else
 $(call gb_LinkTarget_add_libs,$(1),\
-L$(call gb_UnpackedTarball_get_dir,python3) \
-   -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
+   -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if 
$(ENABLE_DBGUTIL),d) \
 )
 endif
 
diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index 4886b123cab4..5f1fd5ae70ea 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -43,8 +43,8 @@ $(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor
 ))
 else
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin,python))
-$(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).so,libpython$(PYTHON_VERSION_MAJOR).so))
-$(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so.1.0,libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so))
+$(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 
$(ENABLE_DBGUTIL),d).so,libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 $(ENABLE_DBGUTIL),d).so))
+$(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 
$(ENABLE_DBGUTIL),d).so.1.0,libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 $(ENABLE_DBGUTIL),d).so))
 $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin-gdb.py,Tools/gdb/libpython.py))
 
 # Unfortunately the python build system does not allow to explicitly enable or
@@ -55,69 +55,72 @@ $(eval $(call 
gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin-
 # that may not be available on baseline systems.
 
 ifneq ($(OS),AIX)
+python3_EXTENSION_MODULE_SUFFIX=cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(if
 $(ENABLE_DBGUTIL),d)
 $(eval $(call 
gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/lib-dynload,\
-   LO_lib/array.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so 
\
-   
LO_lib/_asyncio.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/audioop.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/binascii.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_bisect.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_blake2.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   LO_lib/cmath.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so 
\
-   
LO_lib/_codecs_cn.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_codecs_hk.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_codecs_iso2022.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so
 \
-   
LO_lib/_codecs_jp.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_codecs_kr.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_codecs_tw.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_contextvars.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_crypt.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   LO_lib/_csv.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_ctypes.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_datetime.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_decimal.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   
LO_lib/_elementtree.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
-   LO_lib/fcntl.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MI

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

2020-12-01 Thread Caolán McNamara (via logerrit)
 sw/source/core/txtnode/ndtxt.cxx |   11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 138cf950dcdc8a1240452cad6867e197279f42b0
Author: Caolán McNamara 
AuthorDate: Tue Nov 17 12:51:32 2020 +
Commit: Michael Stahl 
CommitDate: Tue Dec 1 10:12:55 2020 +0100

tdf#134626 assertion in ~SwTextNode

taking the simplest example of...
http://bugs.documentfoundation.org/attachment.cgi?id=167361

a) on ctrl+v paste into the new document:

DocumentContentOperationsManager::CopyImplImpl
is called and that (at "Also copy all format templates")
causes SwTextNode::ChgTextCollUpdateNum
to call rDoc.GetNodes().UpdateOutlineNode(*this)

so the new paragraph is now set as an outline node of the
document DocNodes

that seems perfectly reasonable

b) ctrl+v again

no new paragraph, text appended to node of a)

c) ctrl+z

SwUndoSaveContent::MoveToUndoNds is called
and rNodes.MakeTextNode is called to make a
new TextNode to move the content into.

The SwNodes the TextNode is created in are rNds =
rDoc.GetUndoManager().GetUndoNodes(), i.e. the undo nodes.

MakeTextNode calls...
SwTextNode *pNode = new SwTextNode( rWhere, pColl, nullptr )
and the SwTextNode ctor unconditionally does...

GetNodes().UpdateOutlineNode(*this);

so its set as an outline node in those undo SwNodes

In SwNodes::MakeTextNode right after the
SwTextNode *pNode = new SwTextNode( rWhere, pColl, nullptr )
call we have...

// call method  only for the document nodes array
if ( IsDocNodes() )
UpdateOutlineNode(*pNode);

That seems odd, because we have *already* unconditionally called
UpdateOutlineNode in the SwTextNode ctor.

d) ctrl+z
The SwTextFormatColl is destroyed
and SwTextNode::TriggerNodeUpdate
is called for the TextNode of a) and is updated. It is also
called for the TextNode of c) but due to...

// #125329# - assure that text node is in document nodes array
if ( !rDoc.IsInDtor() && &rDoc.GetNodes() == &GetNodes() )

c is *not* updated, so on eventual dtor of c the assert fires.

Change-Id: I56f9b00dd4665fd44359a01baef66c82937c2781

---

If the conditional UpdateOutlineNode call in SwNodes::MakeTextNode is
the right thing to do where only TextNodes in the DocNodes should be
updated, then presumably the equivalent call in the SwTextNode
ctor should be also conditional, making that MakeTextNode call redundant
in any case.

ChgTextCollUpdateNum always calls
rDoc.GetNodes().UpdateOutlineNode(*this);
which suggests that the SwTextNode::ChgFormatColl function should
rely on that to call UpdateOutlineNode and not call it directly
to also avoid a UpdateOutlineNode in the undo nodes

Change-Id: Iedc3fb4d41c24dbbe41fbac259abe41d3757be09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106011
Tested-by: Jenkins
Tested-by: Xisco Fauli 
Reviewed-by: Michael Stahl 

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 8ebdc1322a68..c128973cdf63 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -110,10 +110,6 @@ SwTextNode *SwNodes::MakeTextNode( const SwNodeIndex & 
rWhere,
 
 SwNodeIndex aIdx( *pNode );
 
-// call method  only for the document nodes array
-if ( IsDocNodes() )
-UpdateOutlineNode(*pNode);
-
 // if there is no layout or it is in a hidden section, MakeFrames is not 
needed
 const SwSectionNode* pSectNd;
 if (!bNewFrames ||
@@ -220,7 +216,10 @@ SwTextNode::SwTextNode( const SwNodeIndex &rWhere, 
SwTextFormatColl *pTextColl,
 }
 AddToList();
 }
-GetNodes().UpdateOutlineNode(*this);
+
+// call method  only for the document nodes array
+if (GetNodes().IsDocNodes())
+GetNodes().UpdateOutlineNode(*this);
 
 m_bNotifiable = true;
 
@@ -3924,8 +3923,6 @@ SwFormatColl* SwTextNode::ChgFormatColl( SwFormatColl 
*pNewColl )
 ChgTextCollUpdateNum( pOldColl, static_cast(pNewColl) );
 }
 
-GetNodes().UpdateOutlineNode(*this);
-
 return pOldColl;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread László Németh (via logerrit)
 sc/qa/unit/data/ods/updateCircleInMergedCell.ods |binary
 sc/qa/unit/subsequent_filters-test.cxx   |   35 +++
 sc/source/core/tool/detfunc.cxx  |9 +++--
 sc/source/ui/docshell/docfunc.cxx|8 +
 sc/source/ui/inc/docfunc.hxx |3 +
 5 files changed, 51 insertions(+), 4 deletions(-)

New commits:
commit b18c7096af799e49bc27771cd1500c4eff6bb780
Author: László Németh 
AuthorDate: Mon Nov 30 18:26:43 2020 +0100
Commit: László Németh 
CommitDate: Tue Dec 1 10:12:34 2020 +0100

Revert "Revert "tdf#138483 sc: update red circles after merging cells""

This reverts commit 210ec3ef966b2f9206e9e52781f4cb9d2ed46300.

Reason for revert:

Build error has been solved in
commit b208621f4ac5dc1ae40cb853f8662e8b10434cdc
(Missing include (for ScMergeFlagAttr))

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

diff --git a/sc/qa/unit/data/ods/updateCircleInMergedCell.ods 
b/sc/qa/unit/data/ods/updateCircleInMergedCell.ods
new file mode 100644
index ..93be82487e22
Binary files /dev/null and b/sc/qa/unit/data/ods/updateCircleInMergedCell.ods 
differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index 9c087549ec3e..2ef3cf4fb326 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -65,6 +65,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -102,6 +104,7 @@ public:
 virtual void tearDown() override;
 
 //ods, xls, xlsx filter tests
+void testUpdateCircleInMergedCellODS();
 void testDeleteCircleInMergedCellODS();
 void testBooleanFormatXLSX();
 void testBasicCellContentODS();
@@ -292,6 +295,7 @@ public:
 void testDeleteCirclesInRowAndCol();
 
 CPPUNIT_TEST_SUITE(ScFiltersTest);
+CPPUNIT_TEST(testUpdateCircleInMergedCellODS);
 CPPUNIT_TEST(testDeleteCircleInMergedCellODS);
 CPPUNIT_TEST(testBooleanFormatXLSX);
 CPPUNIT_TEST(testBasicCellContentODS);
@@ -526,6 +530,37 @@ void testRangeNameImpl(const ScDocument& rDoc)
 
 }
 
+void ScFiltersTest::testUpdateCircleInMergedCellODS()
+{
+ScDocShellRef xDocSh = loadDoc("updateCircleInMergedCell.", FORMAT_ODS);
+CPPUNIT_ASSERT_MESSAGE("Failed to load updateCircleInMergedCell.ods", 
xDocSh.is());
+
+ScDocument& rDoc = xDocSh->GetDocument();
+rDoc.EnableChangeReadOnly(true);
+
+ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer();
+SdrPage* pPage = pDrawLayer->GetPage(0);
+CPPUNIT_ASSERT_MESSAGE("draw page for sheet 1 should exist.", pPage);
+
+// There should be four circle objects!
+CPPUNIT_ASSERT_EQUAL(static_cast(4), pPage->GetObjCount());
+
+ScCellMergeOption aCellMergeOption(0,0,1,1); // A1:B2
+aCellMergeOption.maTabs.insert(0);
+xDocSh->GetDocFunc().MergeCells(aCellMergeOption, false, true, true, 
false);
+
+// There should be a circle object!
+CPPUNIT_ASSERT_EQUAL(static_cast(1), pPage->GetObjCount());
+
+std::unique_ptr pUndoRemoveMerge;
+xDocSh->GetDocFunc().UnmergeCells(aCellMergeOption, true, 
pUndoRemoveMerge.get());
+
+// There should be four circle objects!
+CPPUNIT_ASSERT_EQUAL(static_cast(4), pPage->GetObjCount());
+
+xDocSh->DoClose();
+}
+
 void ScFiltersTest::testDeleteCircleInMergedCellODS()
 {
 ScDocShellRef xDocSh = loadDoc("deleteCircleInMergedCell.", FORMAT_ODS);
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index be4d3e01e02c..f2d8f8254d20 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -1382,13 +1382,15 @@ bool ScDetectiveFunc::MarkInvalid(bool& rOverflow)
 if ( bMarkEmpty )
 for ( nRow = nNextRow; nRow < nCellRow && nInsCount < 
SC_DET_MAXCIRCLE; nRow++ )
 {
-DrawCircle( nCol, nRow, aData );
+
if(!pPattern->GetItem(ATTR_MERGE_FLAG).IsOverlapped())
+   DrawCircle( nCol, nRow, aData );
 ++nInsCount;
 }
 ScRefCellValue aCell = aCellIter.getRefCellValue();
 if (!pData->IsDataValid(aCell, aCellIter.GetPos()))
 {
-DrawCircle( nCol, nCellRow, aData );
+if(!pPattern->GetItem(ATTR_MERGE_FLAG).IsOverlapped())
+   DrawCircle( nCol, nCellRow, aData );
 ++nInsCount;
 }
 nNextRow = nCellRow + 1;
@@ -1396,7 +1398,8 @@ bool ScDetectiveFunc::MarkInvalid(bool& rOverflow)
 if ( bMarkEmpty )
 for ( nRow = nNextRow; nRow <= nRow2 && nInsCount < 
SC_DET_MAXCIRCLE; nRo

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

2020-12-01 Thread ganeshdevare (via logerrit)
 connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx |4 +---
 connectivity/source/inc/java/sql/CallableStatement.hxx |4 +---
 connectivity/source/inc/java/sql/DriverPropertyInfo.hxx|4 +---
 connectivity/source/inc/java/sql/PreparedStatement.hxx |4 +---
 connectivity/source/inc/java/sql/ResultSetMetaData.hxx |4 +---
 5 files changed, 5 insertions(+), 15 deletions(-)

New commits:
commit bc833c71cda6595897277013b1ee6273c6296219
Author: ganeshdevare 
AuthorDate: Sun Nov 29 16:48:59 2020 +0530
Commit: Ilmari Lauhakangas 
CommitDate: Tue Dec 1 10:08:40 2020 +0100

tdf#124176 Use #pragma once in connectivity

Change-Id: I5a25e8b7bdbb4de411d5aa5313d409a4c0beb24b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106839
Reviewed-by: Ilmari Lauhakangas 
Tested-by: Ilmari Lauhakangas 

diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx 
b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx
index 0558d2996ead..a5f271183b27 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef 
INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_MOZAB_BOOTSTRAP_MNSPROFILEDISCOVER_HXX
-#define 
INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_MOZAB_BOOTSTRAP_MNSPROFILEDISCOVER_HXX
+#pragma once
 
 #include 
 #include 
@@ -77,6 +76,5 @@ namespace connectivity::mozab
 
 }
 
-#endif // 
INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_MOZAB_BOOTSTRAP_MNSPROFILEDISCOVER_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/inc/java/sql/CallableStatement.hxx 
b/connectivity/source/inc/java/sql/CallableStatement.hxx
index 31cafdeed2c5..df9aa389c64f 100644
--- a/connectivity/source/inc/java/sql/CallableStatement.hxx
+++ b/connectivity/source/inc/java/sql/CallableStatement.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_JAVA_SQL_CALLABLESTATEMENT_HXX
-#define INCLUDED_CONNECTIVITY_SOURCE_INC_JAVA_SQL_CALLABLESTATEMENT_HXX
+#pragma once
 
 #include 
 #include 
@@ -79,6 +78,5 @@ namespace connectivity
 virtual void SAL_CALL registerNumericOutParameter( sal_Int32 
parameterIndex, sal_Int32 sqlType, sal_Int32 scale ) override;
 };
 }
-#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_JAVA_SQL_CALLABLESTATEMENT_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/inc/java/sql/DriverPropertyInfo.hxx 
b/connectivity/source/inc/java/sql/DriverPropertyInfo.hxx
index b0ab4efda344..4bc681622692 100644
--- a/connectivity/source/inc/java/sql/DriverPropertyInfo.hxx
+++ b/connectivity/source/inc/java/sql/DriverPropertyInfo.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_JAVA_SQL_DRIVERPROPERTYINFO_HXX
-#define INCLUDED_CONNECTIVITY_SOURCE_INC_JAVA_SQL_DRIVERPROPERTYINFO_HXX
+#pragma once
 
 #include 
 
@@ -39,6 +38,5 @@ namespace connectivity
 };
 }
 
-#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_JAVA_SQL_DRIVERPROPERTYINFO_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/inc/java/sql/PreparedStatement.hxx 
b/connectivity/source/inc/java/sql/PreparedStatement.hxx
index 5bfc085876b6..8920c88e9404 100644
--- a/connectivity/source/inc/java/sql/PreparedStatement.hxx
+++ b/connectivity/source/inc/java/sql/PreparedStatement.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_JAVA_SQL_PREPAREDSTATEMENT_HXX
-#define INCLUDED_CONNECTIVITY_SOURCE_INC_JAVA_SQL_PREPAREDSTATEMENT_HXX
+#pragma once
 
 #include 
 #include 
@@ -100,6 +99,5 @@ namespace connectivity
 using java_sql_Statement_Base::execute;
 };
 }
-#endif // INCLUDED_CONNECTIVITY_SOURCE_INC_JAVA_SQL_PREPAREDSTATEMENT_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/inc/java/sql/ResultSetMetaData.hxx 
b/connectivity/source/inc/java/sql/ResultSetMetaData.hxx
index bc96fdf4b9a8..e5017f1158fd 100644
--- a/connectivity/source/inc/java/sql/ResultSetMetaData.hxx
+++ b/connectivity/source/inc/java/sql/ResultSetMetaData.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_JAVA_SQL_RESULTSETMETADATA_HXX
-#define INCLUDED_CONNECTIVITY_SOURCE_INC_JAVA_SQL_RESULTSETMETADATA_HXX
+#pragma once
 
 #include 
 #include 
@@ -67,6 +66,5 @@ namespace connectivity
 virtual OUString SAL_CAL

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

2020-12-01 Thread Noel (via logerrit)
 xmloff/source/text/XMLIndexSimpleEntryContext.cxx  |   20 -
 xmloff/source/text/XMLIndexSimpleEntryContext.hxx  |5 +-
 xmloff/source/text/XMLIndexTabStopEntryContext.cxx |   45 ++---
 xmloff/source/text/XMLIndexTabStopEntryContext.hxx |5 +-
 4 files changed, 38 insertions(+), 37 deletions(-)

New commits:
commit 7673b027daed248d1be4dd1a773bfc0334a00c53
Author: Noel 
AuthorDate: Tue Dec 1 09:39:01 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Dec 1 09:55:03 2020 +0100

fastparser in XMLIndexTabStopEntryContext

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

diff --git a/xmloff/source/text/XMLIndexSimpleEntryContext.cxx 
b/xmloff/source/text/XMLIndexSimpleEntryContext.cxx
index 1317331ade71..be728eac98f8 100644
--- a/xmloff/source/text/XMLIndexSimpleEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexSimpleEntryContext.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -54,21 +55,16 @@ XMLIndexSimpleEntryContext::~XMLIndexSimpleEntryContext()
 {
 }
 
-void XMLIndexSimpleEntryContext::StartElement(
-const Reference & xAttrList)
+void XMLIndexSimpleEntryContext::startFastElement(
+sal_Int32 /*nElement*/,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
 // we know only one attribute: style-name
-sal_Int16 nLength = xAttrList->getLength();
-for(sal_Int16 nAttr = 0; nAttr < nLength; nAttr++)
+for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
 {
-OUString sLocalName;
-sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
-GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
-  &sLocalName );
-if ( (XML_NAMESPACE_TEXT == nPrefix) &&
- IsXMLToken(sLocalName, XML_STYLE_NAME) )
+if(aIter.getToken() == XML_ELEMENT(TEXT, XML_STYLE_NAME))
 {
-m_sCharStyleName = xAttrList->getValueByIndex(nAttr);
+m_sCharStyleName = aIter.toString();
 OUString sDisplayStyleName = GetImport().GetStyleDisplayName(
 XmlStyleFamily::TEXT_TEXT, m_sCharStyleName );
 // #142494#: Check if style exists
@@ -79,6 +75,8 @@ void XMLIndexSimpleEntryContext::StartElement(
 else
 m_bCharStyleNameOK = false;
 }
+else
+XMLOFF_WARN_UNKNOWN("xmloff", aIter);
 }
 
 // if we have a style name, set it!
diff --git a/xmloff/source/text/XMLIndexSimpleEntryContext.hxx 
b/xmloff/source/text/XMLIndexSimpleEntryContext.hxx
index beb816832749..dbce23d8c588 100644
--- a/xmloff/source/text/XMLIndexSimpleEntryContext.hxx
+++ b/xmloff/source/text/XMLIndexSimpleEntryContext.hxx
@@ -64,8 +64,9 @@ public:
 protected:
 
 /** process parameters */
-virtual void StartElement(
-const css::uno::Reference & xAttrList) 
override;
+virtual void SAL_CALL startFastElement(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& 
xAttrList ) override;
 
 /** call FillPropertyValues and insert into template */
 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
diff --git a/xmloff/source/text/XMLIndexTabStopEntryContext.cxx 
b/xmloff/source/text/XMLIndexTabStopEntryContext.cxx
index 9c9e195c60fc..1c785c53cc4d 100644
--- a/xmloff/source/text/XMLIndexTabStopEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexTabStopEntryContext.cxx
@@ -57,60 +57,61 @@ XMLIndexTabStopEntryContext::~XMLIndexTabStopEntryContext()
 {
 }
 
-void XMLIndexTabStopEntryContext::StartElement(
-const Reference & xAttrList)
+void XMLIndexTabStopEntryContext::startFastElement(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
 // process three attributes: type, position, leader char
-sal_Int16 nLength = xAttrList->getLength();
-for(sal_Int16 nAttr = 0; nAttr < nLength; nAttr++)
+for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
 {
-OUString sLocalName;
-sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
-GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
-  &sLocalName );
-OUString sAttr = xAttrList->getValueByIndex(nAttr);
-if (XML_NAMESPACE_STYLE == nPrefix)
+OUString sValue = aIter.toString();
+switch(aIter.getToken())
 {
-if ( IsXMLToken( sLocalName, XML_TYPE ) )
+case XML_ELEMENT(STYLE, XML_TYPE):
 {
 // if it's neither left nor right, value is
 // ignored. Since left is default, we only need to
 // check for right
-bTabRightAligned = IsXMLToken( sAttr, XML_RIGHT );
+bTabRightAligned = IsXMLToken( sValue, XML

[Libreoffice-commits] core.git: accessibility/source chart2/source chart2/workbench connectivity/source cui/source dbaccess/source desktop/source editeng/source embeddedobj/source filter/source forms/

2020-12-01 Thread Noel (via logerrit)
 accessibility/source/extended/accessibleeditbrowseboxcell.cxx   |3 
 chart2/source/model/filter/XMLFilter.cxx|2 
 chart2/source/tools/WrappedPropertySet.cxx  |4 
 chart2/workbench/addin/sampleaddin.cxx  |2 
 connectivity/source/commontools/DateConversion.cxx  |2 
 connectivity/source/commontools/dbexception.cxx |3 
 connectivity/source/commontools/dbtools.cxx |8 -
 connectivity/source/commontools/predicateinput.cxx  |2 
 connectivity/source/drivers/file/fcomp.cxx  |3 
 connectivity/source/drivers/hsqldb/HStorageAccess.cxx   |7 -
 connectivity/source/drivers/hsqldb/HStorageMap.cxx  |2 
 connectivity/source/drivers/hsqldb/StorageFileAccess.cxx|2 
 connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx |7 -
 connectivity/source/drivers/mork/MResultSet.cxx |3 
 connectivity/source/manager/mdrivermanager.cxx  |2 
 cui/source/dialogs/showcols.cxx |6 
 cui/source/options/optasian.cxx |7 -
 cui/source/options/sdbcdriverenum.cxx   |3 
 dbaccess/source/core/dataaccess/ContentHelper.cxx   |3 
 dbaccess/source/core/dataaccess/documentdefinition.cxx  |4 
 dbaccess/source/filter/xml/dbloader2.cxx|4 
 dbaccess/source/filter/xml/xmlExport.cxx|2 
 dbaccess/source/filter/xml/xmlHierarchyCollection.cxx   |3 
 dbaccess/source/filter/xml/xmlQuery.cxx |3 
 dbaccess/source/filter/xml/xmlTable.cxx |5 
 dbaccess/source/ui/app/AppDetailPageHelper.cxx  |2 
 dbaccess/source/ui/browser/sbagrid.cxx  |2 
 dbaccess/source/ui/control/tabletree.cxx|2 
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx   |3 
 dbaccess/source/ui/querydesign/TableWindow.cxx  |5 
 dbaccess/source/ui/relationdesign/RelationTableView.cxx |5 
 desktop/source/deployment/gui/dp_gui_dialog2.cxx|4 
 editeng/source/accessibility/AccessibleEditableTextPara.cxx |2 
 editeng/source/misc/hangulhanja.cxx |2 
 embeddedobj/source/commonembedding/miscobj.cxx  |3 
 filter/source/svg/svgexport.cxx |3 
 forms/source/component/Button.cxx   |2 
 forms/source/component/ComboBox.cxx |2 
 forms/source/component/Currency.cxx |3 
 forms/source/component/DatabaseForm.cxx |4 
 forms/source/component/Grid.cxx |3 
 forms/source/component/ImageControl.cxx |2 
 forms/source/component/clickableimage.cxx   |3 
 forms/source/runtime/formoperations.cxx |7 -
 forms/source/xforms/submission/submission_get.cxx   |3 
 forms/source/xforms/submission/submission_post.cxx  |3 
 forms/source/xforms/submission/submission_put.cxx   |3 
 fpicker/source/office/fpsmartcontent.cxx|3 
 linguistic/source/gciterator.cxx|2 
 oox/source/helper/binarystreambase.cxx  |5 
 oox/source/ppt/slidetransition.cxx  |5 
 package/source/zippackage/ZipPackageStream.cxx  |6 
 reportdesign/source/core/api/FixedLine.cxx  |3 
 reportdesign/source/core/api/ReportDefinition.cxx   |4 
 reportdesign/source/core/sdr/PropertyForward.cxx|2 
 reportdesign/source/core/sdr/RptObject.cxx  |2 
 reportdesign/source/filter/xml/xmlCell.cxx  |3 
 reportdesign/source/filter/xml/xmlComponent.cxx |3 
 reportdesign/source/filter/xml/xmlCondPrtExpr.cxx   |3 
 reportdesign/source/filter/xml/xmlFormatCondition.cxx   |3 
 reportdesign/source/filter/xml/xmlFormattedField.cxx|3 
 reportdesign/source/filter/xml/xmlFunction.cxx  |5 
 reportdesign/source/filter/xml/xmlGroup.cxx |5 
 reportdesign/source/filter/xml/xmlHelper.cxx|3 
 reportdesign/source/filter/xml/xmlImage.cxx |3 
 reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx |3 
 reportdesign/source/filter/xml/xmlReport.cxx|2 
 reportdesign/source/filter/xml/xmlReportElement.cxx |3 
 reportdesign/source/filter/xm

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

2020-12-01 Thread Noel (via logerrit)
 xmloff/source/text/XMLIndexTemplateContext.cxx |   51 +
 xmloff/source/text/XMLIndexTemplateContext.hxx |5 +-
 2 files changed, 22 insertions(+), 34 deletions(-)

New commits:
commit 102fdc08b86599b9e538d2f38df865d56b3ec63d
Author: Noel 
AuthorDate: Tue Dec 1 08:24:03 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Dec 1 09:12:21 2020 +0100

fastparser in XMLIndexTemplateContext

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

diff --git a/xmloff/source/text/XMLIndexTemplateContext.cxx 
b/xmloff/source/text/XMLIndexTemplateContext.cxx
index 2c23fe3227f8..32e2ad5b4e27 100644
--- a/xmloff/source/text/XMLIndexTemplateContext.cxx
+++ b/xmloff/source/text/XMLIndexTemplateContext.cxx
@@ -95,44 +95,31 @@ void XMLIndexTemplateContext::addTemplateEntry(
 }
 
 
-void XMLIndexTemplateContext::StartElement(
-const Reference & xAttrList)
+void XMLIndexTemplateContext::startFastElement(
+sal_Int32 /*nElement*/,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
 {
 // process two attributes: style-name, outline-level
-sal_Int16 nLength = xAttrList->getLength();
-for(sal_Int16 nAttr = 0; nAttr < nLength; nAttr++)
+for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
 {
-OUString sLocalName;
-sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
-GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
-  &sLocalName );
-if (XML_NAMESPACE_TEXT == nPrefix)
+if (aIter.getToken() == XML_ELEMENT(TEXT, XML_STYLE_NAME) )
 {
-if ( IsXMLToken( sLocalName, XML_STYLE_NAME ) )
-{
-// style name
-sStyleName = xAttrList->getValueByIndex(nAttr);
-bStyleNameOK = true;
-}
-else if (eOutlineLevelAttrName != XML_TOKEN_INVALID)
+// style name
+sStyleName = aIter.toString();
+bStyleNameOK = true;
+}
+else if (eOutlineLevelAttrName != XML_TOKEN_INVALID &&
+ aIter.getToken()  == XML_ELEMENT(TEXT, eOutlineLevelAttrName))
+{
+// we have an attr name! Then see if we have the attr, too.
+// outline level
+sal_uInt16 nTmp;
+if (SvXMLUnitConverter::convertEnum(nTmp, aIter.toString(), 
pOutlineLevelNameMap))
 {
-// we have an attr name! Then see if we have the attr, too.
-if (IsXMLToken(sLocalName, eOutlineLevelAttrName))
-{
-// outline level
-sal_uInt16 nTmp;
-if (SvXMLUnitConverter::convertEnum(
-nTmp, xAttrList->getValueByIndex(nAttr),
-pOutlineLevelNameMap))
-{
-nOutlineLevel = nTmp;
-bOutlineLevelOK = true;
-}
-// else: illegal value -> ignore
-}
-// else: unknown attribute -> ignore
+nOutlineLevel = nTmp;
+bOutlineLevelOK = true;
 }
-// else: we don't care about outline-level -> ignore
+// else: illegal value -> ignore
 }
 // else: attribute not in text namespace -> ignore
 }
diff --git a/xmloff/source/text/XMLIndexTemplateContext.hxx 
b/xmloff/source/text/XMLIndexTemplateContext.hxx
index b1a5ede7eab9..2aa8a9db56c7 100644
--- a/xmloff/source/text/XMLIndexTemplateContext.hxx
+++ b/xmloff/source/text/XMLIndexTemplateContext.hxx
@@ -112,8 +112,9 @@ public:
 
 protected:
 
-virtual void StartElement(
-const css::uno::Reference & xAttrList) 
override;
+virtual void SAL_CALL startFastElement(
+sal_Int32 nElement,
+const css::uno::Reference< css::xml::sax::XFastAttributeList >& 
xAttrList ) override;
 
 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-12-01 Thread Miklos Vajna (via logerrit)
 sw/qa/core/layout/data/textbox-modification.docx |binary
 sw/qa/core/layout/layout.cxx |   12 
 2 files changed, 12 insertions(+)

New commits:
commit e5e3fc015520990df851e5d020219cb6c9d1eb11
Author: Miklos Vajna 
AuthorDate: Mon Nov 30 21:13:51 2020 +0100
Commit: Miklos Vajna 
CommitDate: Tue Dec 1 09:04:01 2020 +0100

tdf#137638 sw textbox: make sure layout doesn't mark the doc as modified

Regression from commit c9eb53f200225f2ee6ca695e1326843a487aee51
(tdf#135198 sw editing: text box fell out of its shape, 2020-10-14),
layout may need to adjust the doc model when the position of a draw
shape is known and its textframe has to be re-positioned accordingly.
Make sure that similar to suppressing undo, modify notifications are
also disabled.

This also helps with creating a thumbnail for the start center which
skips thumbnail creation for modified documents.

[ In the meantime commit 59fec754a1523eede0f19a59e4eeeff593a4d688
(tdf#135198 tdf#138050 sw editing: fix text box position sync,
2020-11-16) also fixed this, so drop the actual fix and just keep the
testcase. ]

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

diff --git a/sw/qa/core/layout/data/textbox-modification.docx 
b/sw/qa/core/layout/data/textbox-modification.docx
new file mode 100644
index ..6adf1a950e72
Binary files /dev/null and b/sw/qa/core/layout/data/textbox-modification.docx 
differ
diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx
index 2151b870da13..44e09a6ffe54 100644
--- a/sw/qa/core/layout/layout.cxx
+++ b/sw/qa/core/layout/layout.cxx
@@ -216,6 +216,18 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, 
testTextBoxAutoGrowVertical)
 CPPUNIT_ASSERT(aShapeRect.IsInside(aFlyRect));
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTextboxModification)
+{
+// Load a document with a textbox in it: the layout will have to position 
the shape part.
+load(DATA_DIRECTORY, "textbox-modification.docx");
+SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
+SwDocShell* pDocShell = pTextDoc->GetDocShell();
+
+// Without the accompanying fix in place, this test would have failed, as 
the document was
+// marked as modified right after the import.
+CPPUNIT_ASSERT(!pDocShell->IsModified());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits