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

2022-01-09 Thread Sarper Akdemir (via logerrit)
 include/oox/export/drawingml.hxx|6 ++-
 oox/qa/unit/data/camera-rotation-revolution-nonwps.pptx |binary
 oox/qa/unit/drawingml.cxx   |   26 ++
 oox/qa/unit/export.cxx  |   29 
 oox/source/drawingml/shape.cxx  |9 ++--
 oox/source/export/drawingml.cxx |   28 +++
 oox/source/export/shapes.cxx|4 +-
 7 files changed, 73 insertions(+), 29 deletions(-)

New commits:
commit 00ad4d5c38bb3d71eb0d8929dcb4b9485aacf933
Author: Sarper Akdemir 
AuthorDate: Mon Jan 3 05:45:17 2022 +0300
Commit: Miklos Vajna 
CommitDate: Mon Jan 10 08:49:23 2022 +0100

tdf#146534 pptx import: make Z rotation work with rotation transform

Expands previous idea from a9c5c0d814a266096483572b84c72875ef8efd77
(tdf#133037 OOXML shape import: camera rotation along Z)
and uses it also for shapes that have a true bUseRotationTransform flag

Also fixes same Z rotation exporting twice from InteropGrabBag to
both spPr and textBody causing text overrotating on roundtrip.

Change-Id: If0f192af029ca86b932a63613f961be1f5003c5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127880
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
(cherry picked from commit 8bdd134bef3baca2ebd878163af4e55e5f898efe)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127956
Tested-by: Jenkins CollaboraOffice 

diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index 594371db81b4..b5759cfbc560 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -313,7 +313,11 @@ public:
 void WriteShapeStyle( const css::uno::Reference< css::beans::XPropertySet 
>& rXPropSet );
 void WriteShapeEffects( const css::uno::Reference< 
css::beans::XPropertySet >& rXPropSet );
 void WriteShapeEffect( const OUString& sName, const css::uno::Sequence< 
css::beans::PropertyValue >& aEffectProps );
-void WriteShape3DEffects( const css::uno::Reference< 
css::beans::XPropertySet >& rXPropSet );
+/** Populates scene3d tag
+@param rXPropSet Prop set
+@param bIsText True if the 3D effects are for a text body, false if it 
is for a shape
+ */
+void Write3DEffects(const css::uno::Reference& 
rXPropSet, bool bIsText);
 void WriteArtisticEffect( const css::uno::Reference< 
css::beans::XPropertySet >& rXPropSet );
 OString WriteWdpPicture( const OUString& rFileId, const 
css::uno::Sequence< sal_Int8 >& rPictureData );
 void WriteDiagram(const css::uno::Reference& 
rXShape, int nDiagramId);
diff --git a/oox/qa/unit/data/camera-rotation-revolution-nonwps.pptx 
b/oox/qa/unit/data/camera-rotation-revolution-nonwps.pptx
new file mode 100755
index ..db26dc032caa
Binary files /dev/null and 
b/oox/qa/unit/data/camera-rotation-revolution-nonwps.pptx differ
diff --git a/oox/qa/unit/drawingml.cxx b/oox/qa/unit/drawingml.cxx
index a72f84d76b32..3362acb3c8c6 100644
--- a/oox/qa/unit/drawingml.cxx
+++ b/oox/qa/unit/drawingml.cxx
@@ -292,6 +292,32 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, 
testCameraRotationRevolution)
 CPPUNIT_ASSERT_EQUAL(static_cast(27000), nRotateAngle1);
 }
 
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, 
testTdf146534_CameraRotationRevolutionNonWpsShapes)
+{
+OUString aURL
+= m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"camera-rotation-revolution-nonwps.pptx";
+load(aURL);
+
+uno::Reference 
xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+uno::Reference 
xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+uno::Reference xShape0(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+uno::Reference xShape1(xDrawPage->getByIndex(1), 
uno::UNO_QUERY);
+uno::Reference xShapeProps0(xShape0, uno::UNO_QUERY);
+uno::Reference xShapeProps1(xShape1, uno::UNO_QUERY);
+sal_Int32 nRotateAngle0;
+sal_Int32 nRotateAngle1;
+xShapeProps0->getPropertyValue("RotateAngle") >>= nRotateAngle0;
+xShapeProps1->getPropertyValue("RotateAngle") >>= nRotateAngle1;
+
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 9000
+// - Actual  : 0
+// so the camera rotation would not have been factored into how the shape 
is displayed
+CPPUNIT_ASSERT_EQUAL(static_cast(9000), nRotateAngle0);
+CPPUNIT_ASSERT_EQUAL(static_cast(30500), nRotateAngle1);
+}
+
 CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTableShadow)
 {
 auto verify = [](const uno::Reference& xComponent) {
diff --git a/oox/qa/unit/export.cxx b/oox/qa/unit/export.cxx
index 5db14c35d03b..897eec7284b6 100644
--- a/oox/qa/unit/export.cxx
+++ b/oox/qa/unit/export.cxx
@@ -105,6 +105,8 @@ void Test::registerNamespaces(xmlXPathContextPtr& 
pXmlXpathCtx)
BAD_CAST

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - include/unotest oox/qa sd/qa unotest/Library_unotest.mk unotest/source

2022-01-09 Thread Miklos Vajna (via logerrit)
 include/unotest/macros_test.hxx|9 +
 oox/qa/unit/export.cxx |8 +---
 sd/qa/unit/sdmodeltestbase.hxx |   11 ---
 unotest/Library_unotest.mk |1 +
 unotest/source/cpp/macros_test.cxx |   17 +
 5 files changed, 28 insertions(+), 18 deletions(-)

New commits:
commit 27c1318fba70d3682b0938c41eed216373775e69
Author: Miklos Vajna 
AuthorDate: Thu Dec 2 08:45:26 2021 +0100
Commit: Miklos Vajna 
CommitDate: Mon Jan 10 08:45:03 2022 +0100

test: move parseExportStream() from SdModelTestBaseXML up to MacrosTest

Move parseExportStream() from SdModelTestBaseXML up to MacrosTest,
so oox/ test code can use it as well.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126215
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins
(cherry picked from commit f36767fde87191258ea21f3faac0be6ad79328e0)

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

diff --git a/include/unotest/macros_test.hxx b/include/unotest/macros_test.hxx
index 14917794d38d..ed879b835a55 100644
--- a/include/unotest/macros_test.hxx
+++ b/include/unotest/macros_test.hxx
@@ -28,11 +28,16 @@ struct TestMacroInfo
 };
 
 class BasicDLL;
+class SvStream;
 
 namespace test
 {
 class Directories;
 }
+namespace utl
+{
+class TempFile;
+}
 
 namespace unotest
 {
@@ -76,6 +81,10 @@ public:
 const OUString& rCommand,
 const css::uno::Sequence& 
rPropertyValues);
 
+/// Opens rStreamName from rTempFile, assuming it's a ZIP storage.
+static std::unique_ptr parseExportStream(const utl::TempFile& 
rTempFile,
+   const OUString& 
rStreamName);
+
 void setUpNssGpg(const test::Directories& rDirectories, const OUString& 
rTestName);
 void tearDownNssGpg();
 
diff --git a/oox/qa/unit/export.cxx b/oox/qa/unit/export.cxx
index 6e6620ab63a4..5db14c35d03b 100644
--- a/oox/qa/unit/export.cxx
+++ b/oox/qa/unit/export.cxx
@@ -13,11 +13,9 @@
 
 #include 
 #include 
-#include 
 
 #include 
 #include 
-#include 
 
 using namespace ::com::sun::star;
 
@@ -138,11 +136,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDmlGroupshapePolygon)
 
 // Then make sure that the group shape, the group shape's child size and 
the child shape's size
 // match:
-uno::Reference xNameAccess
-= packages::zip::ZipFileAccess::createWithURL(mxComponentContext, 
getTempFile().GetURL());
-uno::Reference 
xInputStream(xNameAccess->getByName("word/document.xml"),
-  uno::UNO_QUERY);
-std::unique_ptr 
pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true));
+std::unique_ptr pStream = parseExportStream(getTempFile(), 
"word/document.xml");
 xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
 assertXPath(pXmlDoc, "//wpg:grpSpPr/a:xfrm/a:ext", "cx", "5328360");
 // Without the accompanying fix in place, this test would have failed, the 
 element was
diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx
index 08f66de864f1..73b5b70f63e1 100644
--- a/sd/qa/unit/sdmodeltestbase.hxx
+++ b/sd/qa/unit/sdmodeltestbase.hxx
@@ -443,17 +443,6 @@ class SdModelTestBaseXML
 {
 
 public:
-std::unique_ptr parseExportStream(utl::TempFile const & 
rTempFile, const OUString& rStreamName)
-{
-// Read the stream we're interested in.
-OUString const url(rTempFile.GetURL());
-uno::Reference const 
xZipNames(packages::zip::ZipFileAccess::createWithURL(
-
comphelper::getComponentContext(m_xSFactory), url));
-uno::Reference const 
xInputStream(xZipNames->getByName(rStreamName), uno::UNO_QUERY);
-std::unique_ptr 
pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true));
-return pStream;
-}
-
 xmlDocUniquePtr parseExport(utl::TempFile const & rTempFile, OUString 
const& rStreamName)
 {
 std::unique_ptr const pStream(parseExportStream(rTempFile, 
rStreamName));
diff --git a/unotest/Library_unotest.mk b/unotest/Library_unotest.mk
index ea697699ee82..3acfe2f69ed9 100644
--- a/unotest/Library_unotest.mk
+++ b/unotest/Library_unotest.mk
@@ -22,6 +22,7 @@ $(eval $(call gb_Library_use_libraries,unotest,\
cppuhelper \
sal \
sb \
+   utl \
 ))
 
 $(eval $(call gb_Library_use_externals,unotest,\
diff --git a/unotest/source/cpp/macros_test.cxx 
b/unotest/source/cpp/macros_test.cxx
index af6ac567edf3..0141af0ec1ab 100644
--- a/unotest/source/cpp/macros_test.cxx
+++ b/unotest/source/cpp/macros_test.cxx
@@ -14,6 +14,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -23,6 +24,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 using namespace css;
 
@@ -85,6 +88,

[Libreoffice-commits] core.git: Branch 'feature/wasm' - 19 commits - android/default-document basctl/Library_basctl.mk bridges/Library_cpp_uno.mk bridges/Module_bridges.mk bridges/source chart2/Librar

2022-01-09 Thread Jan-Marek Glogowski (via logerrit)
Rebased ref, commits from common ancestor:
commit 0381606c401422b95e3ded4277e40b83f5b86042
Author: Jan-Marek Glogowski 
AuthorDate: Sun Jan 9 14:49:28 2022 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Mon Jan 10 05:25:47 2022 +0100

Add a larger Writer example document

Change-Id: I4bc9a82c7f99563af8da62f889b51d1b583df760

diff --git a/android/default-document/example_larger.odt 
b/android/default-document/example_larger.odt
new file mode 100644
index ..1b3a1dfb877a
Binary files /dev/null and b/android/default-document/example_larger.odt differ
diff --git a/static/CustomTarget_wasm_fs_image.mk 
b/static/CustomTarget_wasm_fs_image.mk
index e11d57e359e5..e88d5f422a63 100644
--- a/static/CustomTarget_wasm_fs_image.mk
+++ b/static/CustomTarget_wasm_fs_image.mk
@@ -1169,6 +1169,7 @@ gb_wasm_fs_image_files := \
 $(INSTROOT)/$(LIBO_SHARE_RESOURCE_FOLDER)/common/fonts/opens___.ttf \
 $(INSTROOT)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
+$(SRCDIR)/android/default-document/example_larger.odt \
 $(SRCDIR)/android/default-document/example.odt \
 
 ifneq ($(ENABLE_WASM_STRIP_CHART),TRUE)
diff --git a/static/emscripten/soffice_args.js 
b/static/emscripten/soffice_args.js
index 7ecf7e8988e8..fa5e9dd4164d 100644
--- a/static/emscripten/soffice_args.js
+++ b/static/emscripten/soffice_args.js
@@ -2,5 +2,5 @@ Module['arguments'] = [
 '--norestore',
 '--nologo',
 '--writer',
-'/android/default-document/example.odt'
+'/android/default-document/example_larger.odt'
 ];
commit fab9e2f78f42c0f598c16ad8b9a0441b5f94b2b3
Author: Jan-Marek Glogowski 
AuthorDate: Wed Nov 17 01:57:33 2021 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Mon Jan 10 05:25:47 2022 +0100

WIP: async popup menus

A first patch to get some feedback. Asnyc LO popup menus are still
buggy, as I'm not sure where to call the PopupMenu::Finish for
them.

Also the XDialogClosedListener is currently just for convenience
and might want some separate notifier.

Fun fact, that ImplExecute / ImplPopup is called for submenu, but
then doesn't execute. And generally the naming of some variables
is IMHO wrong; I might also prefix Menu members with "m_" for
easier readability.

Change-Id: Id8b413aa6b4699201e58db0113649c6b224d33b6

diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx
index 6e87c89217f4..0f6cbeb55fdc 100644
--- a/include/sfx2/dispatch.hxx
+++ b/include/sfx2/dispatch.hxx
@@ -20,6 +20,7 @@
 #define INCLUDED_SFX2_DISPATCH_HXX
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -42,6 +43,7 @@ class Point;
 struct SfxDispatcher_Impl;
 
 namespace vcl { class Window; }
+namespace com::sun::star::ui::dialogs { struct DialogClosedEvent; }
 
 enum class SfxDispatcherPopFlags
 {
@@ -136,8 +138,14 @@ public:
 SfxViewFrame*   GetFrame() const;
 SfxModule*  GetModule() const;
 
-voidExecutePopup( const OUString &rResName, vcl::Window 
*pWin = nullptr, const Point *pPos = nullptr );
-static void ExecutePopup( vcl::Window *pWin = nullptr, const Point 
*pPosPixel = nullptr );
+/**
+ * @param rCloseFunc
+ * If this is !nullptr, the popup will be just shown / run async and 
rCloseFunc will be called on close.
+ */
+void ExecutePopup(const OUString &rResName, vcl::Window *pWin = nullptr, 
const Point *pPos = nullptr,
+  const std::function& rCloseFunc = 
nullptr);
+static void ExecutePopup(vcl::Window *pWin = nullptr, const Point 
*pPosPixel = nullptr,
+ const std::function& rCloseFunc 
= nullptr);
 
 boolIsAppDispatcher() const;
 boolIsFlushed() const;
diff --git a/include/toolkit/awt/vclxmenu.hxx b/include/toolkit/awt/vclxmenu.hxx
index 096c370bce82..ffa89e9a8511 100644
--- a/include/toolkit/awt/vclxmenu.hxx
+++ b/include/toolkit/awt/vclxmenu.hxx
@@ -25,10 +25,11 @@
 #include 
 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -39,6 +40,7 @@
 
 #include 
 
+struct DialogClosedEvent;
 class Menu;
 class MenuBar;
 class PopupMenu;
@@ -51,10 +53,11 @@ typedef ::std::vector<
 typedef void (*MenuUserDataReleaseFunction)(void*);
 
 class TOOLKIT_DLLPUBLIC VCLXMenu :  public css::awt::XMenuBar,
-public css::awt::XPopupMenu,
+public css::awt::XPopupMenuAsync,
 public css::lang::XServiceInfo,
 public css::lang::XTypeProvider,
 public css::lang::XUnoTunnel,
+public 
css::ui::dialogs::XDialogClosedListener,
 public ::cppu::OWeakObject
 {
 private:
@@ -76,7 +79,6 @@ public:
 VCLXMenu( Menu* pM

[Libreoffice-commits] core.git: Branch 'feature/wasm' - 2101 commits - accessibility/inc accessibility/Library_acc.mk accessibility/source android/default-document animations/Library_animcore.mk anima

2022-01-09 Thread Jan-Marek Glogowski (via logerrit)
Rebased ref, commits from common ancestor:
commit 2cbb6210585001b1c7b0b634026a701b383e6d2f
Author: Jan-Marek Glogowski 
AuthorDate: Sun Jan 9 14:49:28 2022 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Mon Jan 10 05:05:56 2022 +0100

Add a larger Writer example document

Change-Id: I4bc9a82c7f99563af8da62f889b51d1b583df760

diff --git a/android/default-document/example_larger.odt 
b/android/default-document/example_larger.odt
new file mode 100644
index ..1b3a1dfb877a
Binary files /dev/null and b/android/default-document/example_larger.odt differ
diff --git a/static/CustomTarget_wasm_fs_image.mk 
b/static/CustomTarget_wasm_fs_image.mk
index e11d57e359e5..e88d5f422a63 100644
--- a/static/CustomTarget_wasm_fs_image.mk
+++ b/static/CustomTarget_wasm_fs_image.mk
@@ -1169,6 +1169,7 @@ gb_wasm_fs_image_files := \
 $(INSTROOT)/$(LIBO_SHARE_RESOURCE_FOLDER)/common/fonts/opens___.ttf \
 $(INSTROOT)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
 $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
+$(SRCDIR)/android/default-document/example_larger.odt \
 $(SRCDIR)/android/default-document/example.odt \
 
 ifneq ($(ENABLE_WASM_STRIP_CHART),TRUE)
diff --git a/static/emscripten/soffice_args.js 
b/static/emscripten/soffice_args.js
index 7ecf7e8988e8..fa5e9dd4164d 100644
--- a/static/emscripten/soffice_args.js
+++ b/static/emscripten/soffice_args.js
@@ -2,5 +2,5 @@ Module['arguments'] = [
 '--norestore',
 '--nologo',
 '--writer',
-'/android/default-document/example.odt'
+'/android/default-document/example_larger.odt'
 ];
commit 33494be097b80c87f41749a9c5d5d8c6439c8aa0
Author: Jan-Marek Glogowski 
AuthorDate: Wed Nov 17 01:57:33 2021 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Mon Jan 10 05:05:55 2022 +0100

WIP: async popup menus

A first patch to get some feedback. Asnyc LO popup menus are still
buggy, as I'm not sure where to call the PopupMenu::Finish for
them.

Also the XDialogClosedListener is currently just for convenience
and might want some separate notifier.

Fun fact, that ImplExecute / ImplPopup is called for submenu, but
then doesn't execute. And generally the naming of some variables
is IMHO wrong; I might also prefix Menu members with "m_" for
easier readability.

Change-Id: Id8b413aa6b4699201e58db0113649c6b224d33b6

diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx
index 6e87c89217f4..0f6cbeb55fdc 100644
--- a/include/sfx2/dispatch.hxx
+++ b/include/sfx2/dispatch.hxx
@@ -20,6 +20,7 @@
 #define INCLUDED_SFX2_DISPATCH_HXX
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -42,6 +43,7 @@ class Point;
 struct SfxDispatcher_Impl;
 
 namespace vcl { class Window; }
+namespace com::sun::star::ui::dialogs { struct DialogClosedEvent; }
 
 enum class SfxDispatcherPopFlags
 {
@@ -136,8 +138,14 @@ public:
 SfxViewFrame*   GetFrame() const;
 SfxModule*  GetModule() const;
 
-voidExecutePopup( const OUString &rResName, vcl::Window 
*pWin = nullptr, const Point *pPos = nullptr );
-static void ExecutePopup( vcl::Window *pWin = nullptr, const Point 
*pPosPixel = nullptr );
+/**
+ * @param rCloseFunc
+ * If this is !nullptr, the popup will be just shown / run async and 
rCloseFunc will be called on close.
+ */
+void ExecutePopup(const OUString &rResName, vcl::Window *pWin = nullptr, 
const Point *pPos = nullptr,
+  const std::function& rCloseFunc = 
nullptr);
+static void ExecutePopup(vcl::Window *pWin = nullptr, const Point 
*pPosPixel = nullptr,
+ const std::function& rCloseFunc 
= nullptr);
 
 boolIsAppDispatcher() const;
 boolIsFlushed() const;
diff --git a/include/toolkit/awt/vclxmenu.hxx b/include/toolkit/awt/vclxmenu.hxx
index 096c370bce82..ffa89e9a8511 100644
--- a/include/toolkit/awt/vclxmenu.hxx
+++ b/include/toolkit/awt/vclxmenu.hxx
@@ -25,10 +25,11 @@
 #include 
 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -39,6 +40,7 @@
 
 #include 
 
+struct DialogClosedEvent;
 class Menu;
 class MenuBar;
 class PopupMenu;
@@ -51,10 +53,11 @@ typedef ::std::vector<
 typedef void (*MenuUserDataReleaseFunction)(void*);
 
 class TOOLKIT_DLLPUBLIC VCLXMenu :  public css::awt::XMenuBar,
-public css::awt::XPopupMenu,
+public css::awt::XPopupMenuAsync,
 public css::lang::XServiceInfo,
 public css::lang::XTypeProvider,
 public css::lang::XUnoTunnel,
+public 
css::ui::dialogs::XDialogClosedListener,
 public ::cppu::OWeakObject
 {
 private:
@@ -76,7 +79,6 @@ public:
 VCLXMenu( Menu* pM

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

2022-01-09 Thread Tomaž Vajngerl (via logerrit)
 sc/inc/fillinfo.hxx|1 +
 sc/source/core/data/colorscale.cxx |6 ++
 sc/source/ui/view/output.cxx   |   18 +++---
 3 files changed, 22 insertions(+), 3 deletions(-)

New commits:
commit 093c98dcb4be1c124871468f73be4b59ec99af1f
Author: Tomaž Vajngerl 
AuthorDate: Sun Jan 9 13:04:18 2022 +0900
Commit: Tomaž Vajngerl 
CommitDate: Mon Jan 10 05:09:42 2022 +0100

sc: make icon size of cond. formatting same as font size

This makes the behavior of the Calc te same as other spreadsheet
programs, where the icon size of the conditional formatting is
the same as the font size and not the actual cell height (as it
is the behaviour now).

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

diff --git a/sc/inc/fillinfo.hxx b/sc/inc/fillinfo.hxx
index c4f995c21c1d..9c8681d8f43e 100644
--- a/sc/inc/fillinfo.hxx
+++ b/sc/inc/fillinfo.hxx
@@ -92,6 +92,7 @@ struct ScIconSetInfo
 {
 sal_Int32 nIconIndex;
 ScIconSetType eIconSetType;
+tools::Long mnHeight = 0;
 bool mbShowValue;
 };
 
diff --git a/sc/source/core/data/colorscale.cxx 
b/sc/source/core/data/colorscale.cxx
index 9d4e27b47b51..48d2ec5ad05f 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -16,6 +16,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -1055,6 +1057,10 @@ std::unique_ptr 
ScIconSetFormat::GetIconSetInfo(const ScAddress&
 
 std::unique_ptr pInfo(new ScIconSetInfo);
 
+const SfxPoolItem& rPoolItem = 
mpDoc->GetPattern(rAddr)->GetItem(ATTR_FONT_HEIGHT);
+tools::Long aFontHeight = static_cast(rPoolItem).GetHeight();
+pInfo->mnHeight = aFontHeight;
+
 if(mpFormatData->mbReverse)
 {
 sal_Int32 nMaxIndex = mpFormatData->m_Entries.size() - 1;
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index fe6b3c278884..3bfd86e671ff 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -909,12 +910,23 @@ const BitmapEx& getIcon(sc::IconSetBitmapMap & 
rIconSetBitmapMap, ScIconSetType
 void drawIconSets(vcl::RenderContext& rRenderContext, const ScIconSetInfo* 
pOldIconSetInfo, const tools::Rectangle& rRect, tools::Long nOneX, tools::Long 
nOneY,
 sc::IconSetBitmapMap & rIconSetBitmapMap)
 {
-//long nSize = 16;
 ScIconSetType eType = pOldIconSetInfo->eIconSetType;
 sal_Int32 nIndex = pOldIconSetInfo->nIconIndex;
 const BitmapEx& rIcon = getIcon(rIconSetBitmapMap, eType, nIndex);
-tools::Long aOrigSize = 
std::max(0,std::min(rRect.GetSize().getWidth() - 4 * nOneX, 
rRect.GetSize().getHeight() -4 * nOneY));
-rRenderContext.DrawBitmapEx( Point( rRect.Left() + 2 * nOneX, rRect.Top() 
+ 2 * nOneY), Size(aOrigSize, aOrigSize), rIcon );
+
+tools::Long aHeight = o3tl::convert(10, o3tl::Length::pt, 
o3tl::Length::mm100);
+
+if (pOldIconSetInfo->mnHeight)
+aHeight = o3tl::convert(pOldIconSetInfo->mnHeight, o3tl::Length::twip, 
o3tl::Length::mm100);
+
+Size aSize = rIcon.GetSizePixel();
+double fRatio = aSize.Width() / aSize.Height();
+tools::Long aWidth = fRatio * aHeight;
+
+rRenderContext.Push();
+rRenderContext.SetClipRegion(vcl::Region(rRect));
+rRenderContext.DrawBitmapEx(Point(rRect.Left() + 2 * nOneX, rRect.Bottom() 
- 2 * nOneY - aHeight), Size(aWidth, aHeight), rIcon);
+rRenderContext.Pop();
 }
 
 void drawCells(vcl::RenderContext& rRenderContext, std::optional const 
& pColor, const SvxBrushItem* pBackground, std::optional& pOldColor, 
const SvxBrushItem*& pOldBackground,


[Libreoffice-commits] core.git: config_host/config_features.h.in config_host/config_fonts.h.in configure.ac desktop/qa editeng/qa emfio/qa sc/qa starmath/qa sw/qa vcl/qa

2022-01-09 Thread Jan-Marek Glogowski (via logerrit)
 config_host/config_features.h.in|5 -
 config_host/config_fonts.h.in   |9 +
 configure.ac|1 +
 desktop/qa/desktop_lib/test_desktop_lib.cxx |1 +
 editeng/qa/unit/core-test.cxx   |1 +
 emfio/qa/cppunit/emf/EmfImportTest.cxx  |1 +
 sc/qa/unit/subsequent_export_test.cxx   |1 +
 sc/qa/unit/subsequent_filters_test.cxx  |1 +
 starmath/qa/cppunit/test_starmath.cxx   |1 +
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx   |1 +
 sw/qa/extras/ooxmlexport/ooxmlexport7.cxx   |1 +
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx   |1 +
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx|1 +
 sw/qa/extras/rtfimport/rtfimport.cxx|1 +
 sw/qa/extras/uiwriter/uiwriter.cxx  |1 +
 sw/qa/extras/uiwriter/uiwriter4.cxx |1 +
 sw/qa/extras/ww8export/ww8export.cxx|1 +
 vcl/qa/cppunit/FontFeatureTest.cxx  |1 +
 vcl/qa/cppunit/complextext.cxx  |1 +
 vcl/qa/cppunit/pdfexport/pdfexport.cxx  |1 +
 vcl/qa/cppunit/svm/svmtest.cxx  |1 +
 21 files changed, 28 insertions(+), 5 deletions(-)

New commits:
commit ef5e2d8604b976d352b944c007ae71aa33ffc607
Author: Jan-Marek Glogowski 
AuthorDate: Sun Jan 9 22:36:20 2022 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Mon Jan 10 04:50:46 2022 +0100

Move HAVE_MORE_FONTS into an extra config header

No need to recompile most of LibreOffice, because the --with-fonts
configure flag changed. This preprocessor define is just used by
unit tests anyway.

Change-Id: Ia2eae7d0c74e59e034fdd8513504a34e51ab428e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128197
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in
index db4f7e1b28ae..86a5c6a9c6d9 100644
--- a/config_host/config_features.h.in
+++ b/config_host/config_features.h.in
@@ -128,11 +128,6 @@
  */
 #define HAVE_FEATURE_POPPLER 0
 
-/*
- * Whether extra fonts are available
- */
-#define HAVE_MORE_FONTS 0
-
 /*
  * Whether the automatic online updater is available
  */
diff --git a/config_host/config_fonts.h.in b/config_host/config_fonts.h.in
new file mode 100644
index ..edb828128658
--- /dev/null
+++ b/config_host/config_fonts.h.in
@@ -0,0 +1,9 @@
+#ifndef CONFIG_FONTS_H
+#define CONFIG_FONTS_H
+
+/*
+ * Whether extra fonts are available
+ */
+#define HAVE_MORE_FONTS 0
+
+#endif
diff --git a/configure.ac b/configure.ac
index 88e75bf7ffa9..01867a3e66f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14543,6 +14543,7 @@ 
AC_CONFIG_HEADERS([config_host/config_feature_desktop.h])
 AC_CONFIG_HEADERS([config_host/config_feature_opencl.h])
 AC_CONFIG_HEADERS([config_host/config_firebird.h])
 AC_CONFIG_HEADERS([config_host/config_folders.h])
+AC_CONFIG_HEADERS([config_host/config_fonts.h])
 AC_CONFIG_HEADERS([config_host/config_fuzzers.h])
 AC_CONFIG_HEADERS([config_host/config_gio.h])
 AC_CONFIG_HEADERS([config_host/config_global.h])
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index c1b1cc34cbf9..3f3d59b8673d 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -52,6 +52,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index 8bdd43d926f1..7c76acb3c952 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -8,6 +8,7 @@
  */
 
 #include 
+#include 
 
 #include 
 
diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx 
b/emfio/qa/cppunit/emf/EmfImportTest.cxx
index c9d5d17179ef..c436a53ab8e7 100644
--- a/emfio/qa/cppunit/emf/EmfImportTest.cxx
+++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx
@@ -9,6 +9,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
diff --git a/sc/qa/unit/subsequent_export_test.cxx 
b/sc/qa/unit/subsequent_export_test.cxx
index 158323215660..872d5122a686 100644
--- a/sc/qa/unit/subsequent_export_test.cxx
+++ b/sc/qa/unit/subsequent_export_test.cxx
@@ -13,6 +13,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 
diff --git a/sc/qa/unit/subsequent_filters_test.cxx 
b/sc/qa/unit/subsequent_filters_test.cxx
index 39bf4cd443f6..ddd06d672317 100644
--- a/sc/qa/unit/subsequent_filters_test.cxx
+++ b/sc/qa/unit/subsequent_filters_test.cxx
@@ -16,6 +16,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
diff --git a/starmath/qa/cppunit/test_starmath.cxx 
b/starmath/qa/cppunit/test_starmath.cxx
index f3719b886bad..8cc905aed45b 100644
--- a/starmath/qa/cppunit/test_starmath.cxx
+++ b/starmath/qa/cppunit/test_starmath.cxx
@@ -10,6 +10,7 @@
 #include 
 
 #include 
+#include 
 #include 
 
 #include 
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index b9a9c

[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - lotuswordpro/source

2022-01-09 Thread Caolán McNamara (via logerrit)
 lotuswordpro/source/filter/lwpsdwdrawheader.hxx |   12 
 1 file changed, 12 insertions(+)

New commits:
commit 7cc67c60b8ce52292436478a6c739f6d3b79fa94
Author: Caolán McNamara 
AuthorDate: Sat Jan 8 14:44:11 2022 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Jan 10 02:09:27 2022 +0100

ofz#43818 delete of uninitialized pointer

Change-Id: I91509915c18c3e9b54cb3047462b9dd9a8c7a46b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128086
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/lotuswordpro/source/filter/lwpsdwdrawheader.hxx 
b/lotuswordpro/source/filter/lwpsdwdrawheader.hxx
index 3153b837aaba..13696f453a74 100644
--- a/lotuswordpro/source/filter/lwpsdwdrawheader.hxx
+++ b/lotuswordpro/source/filter/lwpsdwdrawheader.hxx
@@ -271,6 +271,18 @@ struct SdwTextBoxRecord
 sal_Int16 nTextRotation;
 sal_Int16 nTextExtraSpacing;
 sal_uInt8* pTextString;
+SdwTextBoxRecord()
+: nTextWidth(0)
+, nTextHeight(0)
+, nTextSize(0)
+, tmpTextFaceName{}
+, nTextAttrs(0)
+, nTextCharacterSet(0)
+, nTextRotation(0)
+, nTextExtraSpacing(0)
+, pTextString(nullptr)
+{
+}
 };
 
 struct SdwFMPATH


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

2022-01-09 Thread Caolán McNamara (via logerrit)
 lotuswordpro/source/filter/lwpsdwdrawheader.hxx |   12 
 1 file changed, 12 insertions(+)

New commits:
commit e854cdf8c419e91265341881bdc8c94ea0a38dd8
Author: Caolán McNamara 
AuthorDate: Sat Jan 8 14:44:11 2022 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Jan 10 02:09:07 2022 +0100

ofz#43818 delete of uninitialized pointer

Change-Id: I91509915c18c3e9b54cb3047462b9dd9a8c7a46b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128147
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/lotuswordpro/source/filter/lwpsdwdrawheader.hxx 
b/lotuswordpro/source/filter/lwpsdwdrawheader.hxx
index 3153b837aaba..13696f453a74 100644
--- a/lotuswordpro/source/filter/lwpsdwdrawheader.hxx
+++ b/lotuswordpro/source/filter/lwpsdwdrawheader.hxx
@@ -271,6 +271,18 @@ struct SdwTextBoxRecord
 sal_Int16 nTextRotation;
 sal_Int16 nTextExtraSpacing;
 sal_uInt8* pTextString;
+SdwTextBoxRecord()
+: nTextWidth(0)
+, nTextHeight(0)
+, nTextSize(0)
+, tmpTextFaceName{}
+, nTextAttrs(0)
+, nTextCharacterSet(0)
+, nTextRotation(0)
+, nTextExtraSpacing(0)
+, pTextString(nullptr)
+{
+}
 };
 
 struct SdwFMPATH


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

2022-01-09 Thread Caolán McNamara (via logerrit)
 lotuswordpro/source/filter/lwpsdwdrawheader.hxx |   12 
 1 file changed, 12 insertions(+)

New commits:
commit b4a281af53efa0c36ee1770e6cf4d800be77a6d2
Author: Caolán McNamara 
AuthorDate: Sat Jan 8 14:44:11 2022 +
Commit: Caolán McNamara 
CommitDate: Sun Jan 9 22:26:56 2022 +0100

ofz#43818 delete of uninitialized pointer

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

diff --git a/lotuswordpro/source/filter/lwpsdwdrawheader.hxx 
b/lotuswordpro/source/filter/lwpsdwdrawheader.hxx
index 3153b837aaba..13696f453a74 100644
--- a/lotuswordpro/source/filter/lwpsdwdrawheader.hxx
+++ b/lotuswordpro/source/filter/lwpsdwdrawheader.hxx
@@ -271,6 +271,18 @@ struct SdwTextBoxRecord
 sal_Int16 nTextRotation;
 sal_Int16 nTextExtraSpacing;
 sal_uInt8* pTextString;
+SdwTextBoxRecord()
+: nTextWidth(0)
+, nTextHeight(0)
+, nTextSize(0)
+, tmpTextFaceName{}
+, nTextAttrs(0)
+, nTextCharacterSet(0)
+, nTextRotation(0)
+, nTextExtraSpacing(0)
+, pTextString(nullptr)
+{
+}
 };
 
 struct SdwFMPATH


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

2022-01-09 Thread Caolán McNamara (via logerrit)
 lotuswordpro/source/filter/lwpdrawobj.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit e28f4b6bccafb2b9f3c44dfabf36d1b822d85f84
Author: Caolán McNamara 
AuthorDate: Sun Jan 9 16:16:39 2022 +
Commit: Caolán McNamara 
CommitDate: Sun Jan 9 22:26:38 2022 +0100

ofz#43458 avoid OOM

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

diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx 
b/lotuswordpro/source/filter/lwpdrawobj.cxx
index 2ea201082cce..4811c8b8d9cc 100644
--- a/lotuswordpro/source/filter/lwpdrawobj.cxx
+++ b/lotuswordpro/source/filter/lwpdrawobj.cxx
@@ -1047,6 +1047,8 @@ void LwpDrawTextBox::Read()
 
 // the 71 is the fixed length before text content in textbox record
 sal_Int16 TextLength = m_aObjHeader.nRecLen - 71;
+if (TextLength < 0)
+throw BadRead();
 m_aTextRec.pTextString = new sal_uInt8 [TextLength];
 
 m_pStream->ReadBytes(m_aTextRec.pTextString, TextLength);


[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - i18nlangtag/source

2022-01-09 Thread Hossein (via logerrit)
 i18nlangtag/source/isolang/mslangid.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 4b0b5adf22ee479258a2625d6d12d81160f247d0
Author: Hossein 
AuthorDate: Sun Jan 9 16:58:29 2022 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun Jan 9 21:14:23 2022 +0100

tdf#146084 No hyphenation warning for Pashto

Pashto language, which is spoken in Afghanistan and Pakistan uses the
Arabic script, and does not use hyphenation.

Change-Id: I87a1235b183055b0961ab27f45281be7aa9965c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128191
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 
(cherry picked from commit 7ac5ee3546e15455c5ee306af234bb7fe8a29049)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128148

diff --git a/i18nlangtag/source/isolang/mslangid.cxx 
b/i18nlangtag/source/isolang/mslangid.cxx
index 661bebcb6956..83d21b596de9 100644
--- a/i18nlangtag/source/isolang/mslangid.cxx
+++ b/i18nlangtag/source/isolang/mslangid.cxx
@@ -179,6 +179,7 @@ bool MsLangId::usesHyphenation(LanguageType nLang)
 primary(LANGUAGE_SOMALI),
 primary(LANGUAGE_SWAHILI),
 primary(LANGUAGE_URDU_PAKISTAN),
+primary(LANGUAGE_PASHTO),
 primary(LANGUAGE_VIETNAMESE))
 || isCJK(nLang))
 {


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

2022-01-09 Thread Caolán McNamara (via logerrit)
 lotuswordpro/source/filter/lwpdrawobj.cxx |   23 +++
 1 file changed, 23 insertions(+)

New commits:
commit 27e9de358b4afc6a89b09c173316cee0abfb471d
Author: Caolán McNamara 
AuthorDate: Sun Jan 9 16:07:32 2022 +
Commit: Caolán McNamara 
CommitDate: Sun Jan 9 20:04:08 2022 +0100

ofz#43446 Undefined-shift

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

diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx 
b/lotuswordpro/source/filter/lwpdrawobj.cxx
index 4adb32b7fdd3..2ea201082cce 100644
--- a/lotuswordpro/source/filter/lwpdrawobj.cxx
+++ b/lotuswordpro/source/filter/lwpdrawobj.cxx
@@ -1343,6 +1343,22 @@ LwpDrawBitmap::~LwpDrawBitmap()
 {
 }
 
+static bool IsValid(const BmpInfoHeader2& rHeader)
+{
+if (rHeader.nPlanes != 1)
+return false;
+
+if (rHeader.nBitCount != 0 && rHeader.nBitCount != 1 &&
+rHeader.nBitCount != 4 && rHeader.nBitCount != 8 &&
+rHeader.nBitCount != 16 && rHeader.nBitCount != 24 &&
+rHeader.nBitCount != 32)
+{
+return false;
+}
+
+return true;
+}
+
 /**
  * @descr   reading function of class LwpDrawBitmap
  */
@@ -1369,6 +1385,9 @@ void LwpDrawBitmap::Read()
 m_pStream->ReadUInt16( aInfoHeader2.nPlanes );
 m_pStream->ReadUInt16( aInfoHeader2.nBitCount );
 
+if (!IsValid(aInfoHeader2))
+throw BadRead();
+
 N = aInfoHeader2.nPlanes * aInfoHeader2.nBitCount;
 if (N == 24)
 {
@@ -1385,6 +1404,10 @@ void LwpDrawBitmap::Read()
 m_pStream->ReadUInt32( aInfoHeader2.nHeight );
 m_pStream->ReadUInt16( aInfoHeader2.nPlanes );
 m_pStream->ReadUInt16( aInfoHeader2.nBitCount );
+
+if (!IsValid(aInfoHeader2))
+throw BadRead();
+
 N = aInfoHeader2.nPlanes * aInfoHeader2.nBitCount;
 if (N == 24)
 {


Re: Question about cppuhelper/compbase and other compbase1/2/.../12

2022-01-09 Thread Julien Nabet

On 09/01/2022 18:12, Thorsten Behrens wrote:

Julien Nabet wrote:

So it means we could at least use of compbase.hxx internally, then put
compbase.hxx in deprecated.


Yep.

...


Ok now I saw for example compbase11.hxx wasn't used (or it seemed so 
considering the only results of the git grep):


/git grep -n 'cppuhelper/compbase11.hxx'//
//include/IwyuFilter_include.yaml:83: include/cppuhelper/compbase11.hxx://
//odk/Package_odk_headers.mk:40:  cppuhelper/compbase11.hxx \//
//solenv/clang-format/excludelist:5066:include/cppuhelper/compbase11.hxx//
/

//what's the proper way to deprecate a whole file?

I saw @deprecated, SAL_DEPRECATED, /** Deprecated API but each time it 
seems to be related to one specific function.


So I'm searching the official/effective way :-)

Julien



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

2022-01-09 Thread Hossein (via logerrit)
 i18nlangtag/source/isolang/mslangid.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 7ac5ee3546e15455c5ee306af234bb7fe8a29049
Author: Hossein 
AuthorDate: Sun Jan 9 16:58:29 2022 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun Jan 9 18:50:23 2022 +0100

tdf#146084 No hyphenation warning for Pashto

Pashto language, which is spoken in Afghanistan and Pakistan uses the
Arabic script, and does not use hyphenation.

Change-Id: I87a1235b183055b0961ab27f45281be7aa9965c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128191
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/i18nlangtag/source/isolang/mslangid.cxx 
b/i18nlangtag/source/isolang/mslangid.cxx
index 0143ea228596..34c55b66e261 100644
--- a/i18nlangtag/source/isolang/mslangid.cxx
+++ b/i18nlangtag/source/isolang/mslangid.cxx
@@ -179,6 +179,7 @@ bool MsLangId::usesHyphenation(LanguageType nLang)
 primary(LANGUAGE_SOMALI),
 primary(LANGUAGE_SWAHILI),
 primary(LANGUAGE_URDU_PAKISTAN),
+primary(LANGUAGE_PASHTO),
 primary(LANGUAGE_VIETNAMESE))
 || isCJK(nLang))
 {


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

2022-01-09 Thread Stephan Bergmann (via logerrit)
 emfio/qa/cppunit/wmf/wmfimporttest.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 6e527140e8a75a999db2a35208fb85ab3bb552a8
Author: Stephan Bergmann 
AuthorDate: Fri Jan 7 15:03:56 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Sun Jan 9 18:24:49 2022 +0100

Improve some CPPUNIT_ASSERT checks

(In each case, the name of the file is obvious from the surrounding
code, so there's no loss in not having CPPUNIT_ASSERT_LESS/GREATER_MESSAGE
available here.)

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

diff --git a/emfio/qa/cppunit/wmf/wmfimporttest.cxx 
b/emfio/qa/cppunit/wmf/wmfimporttest.cxx
index b7a4dc1badb7..a967930ae5ab 100644
--- a/emfio/qa/cppunit/wmf/wmfimporttest.cxx
+++ b/emfio/qa/cppunit/wmf/wmfimporttest.cxx
@@ -123,8 +123,8 @@ void WmfTest::testTdf88163NonPlaceableWmf()
 // Mac: With fix: 3230, without fix: ~ 8000
 // Windows: With fix: 3303, without fix: ~ 8000
 auto x = getXPath(pDoc, "/metafile/push[2]/font[1]", "height");
-CPPUNIT_ASSERT_MESSAGE(fileName.toUtf8().getStr(), x.toInt32() > 3000);
-CPPUNIT_ASSERT_MESSAGE(fileName.toUtf8().getStr(), x.toInt32() < 3500);
+CPPUNIT_ASSERT_GREATER(sal_Int32(3000), x.toInt32());
+CPPUNIT_ASSERT_LESS(sal_Int32(3500), x.toInt32());
 
 // Fails without the fix: Expected: 7359, Actual: 7336
 assertXPath(pDoc, "/metafile/push[2]/textarray[1]", "x", "7359");
@@ -161,8 +161,8 @@ void WmfTest::testTdf88163PlaceableWmf()
 // The fix does not affect the font size
 // Linux: 300 - Mac: 309 - Windows: 316
 auto x = getXPath(pDoc, "/metafile/push[2]/font[1]", "height");
-CPPUNIT_ASSERT_MESSAGE(fileName.toUtf8().getStr(), x.toInt32() > 290);
-CPPUNIT_ASSERT_MESSAGE(fileName.toUtf8().getStr(), x.toInt32() < 320);
+CPPUNIT_ASSERT_GREATER(sal_Int32(290), x.toInt32());
+CPPUNIT_ASSERT_LESS(sal_Int32(320), x.toInt32());
 
 // Fails without the fix: Expected: 1900, Actual: 19818
 assertXPath(pDoc, "/metafile", "height", "1900");
@@ -368,7 +368,7 @@ void WmfTest::testTdf39894()
 // The x position of the second text must take into account
 // the previous text's last Dx (previously was ~300)
 auto x = getXPath(pDoc, "/metafile/push[2]/textarray[2]", "x");
-CPPUNIT_ASSERT_MESSAGE(file.toUtf8().getStr(), x.toInt32() > 2700);
+CPPUNIT_ASSERT_GREATER(sal_Int32(2700), x.toInt32());
 }
 }
 


Re: Question about cppuhelper/compbase and other compbase1/2/.../12

2022-01-09 Thread Thorsten Behrens
Julien Nabet wrote:
> So it means we could at least use of compbase.hxx internally, then put
> compbase.hxx in deprecated.
> 
Yep.

Cheers,

-- Thorsten


signature.asc
Description: PGP signature


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

2022-01-09 Thread Noel Grandin (via logerrit)
 comphelper/source/misc/backupfilehelper.cxx |   10 +++---
 embeddedobj/source/msole/oleembed.cxx   |   15 ++-
 embeddedobj/source/msole/olepersist.cxx |   18 --
 embeddedobj/source/msole/ownview.cxx|   14 ++
 package/source/xstor/owriteablestream.cxx   |9 -
 package/source/zipapi/ZipOutputEntry.cxx|9 -
 sfx2/source/doc/doctemplates.cxx|   10 --
 7 files changed, 35 insertions(+), 50 deletions(-)

New commits:
commit a3fa2c3bad77b976e7f79de5d0f2abc0283e7b3e
Author: Noel Grandin 
AuthorDate: Sun Jan 9 14:47:04 2022 +0200
Commit: Noel Grandin 
CommitDate: Sun Jan 9 18:02:08 2022 +0100

Simplify some TempFile service code

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

diff --git a/comphelper/source/misc/backupfilehelper.cxx 
b/comphelper/source/misc/backupfilehelper.cxx
index c091ee7ab06b..527c761d834a 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -629,7 +629,7 @@ namespace
 
 // create a SAXWriter
 uno::Reference< xml::sax::XWriter > const xSaxWriter = 
xml::sax::Writer::create(xContext);
-uno::Reference< io::XStream > xTempFile = 
io::TempFile::create(xContext);
+uno::Reference< io::XTempFile > xTempFile = 
io::TempFile::create(xContext);
 uno::Reference< io::XOutputStream > xOutStrm = 
xTempFile->getOutputStream();
 
 // set output stream and do the serialization
@@ -638,9 +638,7 @@ namespace
 
 // get URL from temp file
 uno::Reference < beans::XPropertySet > xTempFileProps(xTempFile, 
uno::UNO_QUERY);
-uno::Any aUrl = xTempFileProps->getPropertyValue("Uri");
-OUString aTempURL;
-aUrl >>= aTempURL;
+OUString aTempURL = xTempFile->getUri();
 
 // copy back file
 if (aTempURL.isEmpty() || !DirectoryHelper::fileExists(aTempURL))
@@ -1923,9 +1921,7 @@ namespace comphelper
 xSerializer->serialize(xSaxWriter, uno::Sequence< 
beans::StringPair >());
 
 // get URL from temp file
-uno::Reference < beans::XPropertySet > xTempFileProps(xTempFile, 
uno::UNO_QUERY);
-uno::Any aUrl = xTempFileProps->getPropertyValue("Uri");
-aUrl >>= aTempURL;
+aTempURL = xTempFile->getUri();
 }
 
 // copy back file
diff --git a/embeddedobj/source/msole/oleembed.cxx 
b/embeddedobj/source/msole/oleembed.cxx
index 15418042f528..b3e4db405015 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -681,10 +681,10 @@ namespace
 const css::uno::Reference< css::uno::XComponentContext >& xContext,
 const css::uno::Reference< css::io::XStream >& xObjectStream )
 {
-uno::Reference  xNativeTempFile(
+uno::Reference  xNativeTempFile(
 io::TempFile::create(xContext),
-uno::UNO_QUERY_THROW);
-uno::Reference < io::XStream > xStream(xNativeTempFile, 
uno::UNO_QUERY_THROW);
+uno::UNO_SET_THROW);
+uno::Reference < io::XStream > xStream(xNativeTempFile);
 
 uno::Sequence< uno::Any > aArgs{ uno::Any(xObjectStream),
  uno::Any(true) }; // do not create 
copy
@@ -775,10 +775,8 @@ namespace
 
 if (bCopied)
 {
-xNativeTempFile->setPropertyValue("RemoveFile",
-uno::makeAny(false));
-uno::Any aUrl = xNativeTempFile->getPropertyValue("Uri");
-aUrl >>= rUrl;
+xNativeTempFile->setRemoveFile(false);
+rUrl = xNativeTempFile->getUri();
 
 xNativeTempFile.clear();
 
@@ -789,8 +787,7 @@ namespace
 }
 else
 {
-xNativeTempFile->setPropertyValue("RemoveFile",
-uno::makeAny(true));
+xNativeTempFile->setRemoveFile(true);
 }
 
 return xStream;
diff --git a/embeddedobj/source/msole/olepersist.cxx 
b/embeddedobj/source/msole/olepersist.cxx
index 2686daa2c2c4..c739e0355f67 100644
--- a/embeddedobj/source/msole/olepersist.cxx
+++ b/embeddedobj/source/msole/olepersist.cxx
@@ -89,14 +89,13 @@ OUString GetNewTempFileURL_Impl( const uno::Reference< 
uno::XComponentContext >&
 
 OUString aResult;
 
-uno::Reference < beans::XPropertySet > xTempFile(
+uno::Reference < io::XTempFile > xTempFile(
 io::TempFile::create(xContext),
-uno::UNO_QUERY_THROW );
+uno::UNO_SET_THROW );
 
 try {
-xTempFile->setPropertyValue("RemoveFile", uno::makeAny( false ) );
-uno::Any aUrl = xTempFile->getPropertyValue("Uri");
-aUrl >>= aResult;
+xTempFile->setRemoveFile( false );
+aResult = xTempFile->

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

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

New commits:
commit 5dcfec0a31075723bf6b94c57d65b560da42df3b
Author: Caolán McNamara 
AuthorDate: Fri Jan 7 20:29:59 2022 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun Jan 9 17:44:14 2022 +0100

tdf#146641 allocations attempted while hidden are discarded by gtk

Change-Id: I46288cf4c106e2763feba298f1c44dbbf6c85581
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128081
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/unx/gtk3/gtkobject.cxx b/vcl/unx/gtk3/gtkobject.cxx
index fbe5a7c39a75..42da4f6f9136 100644
--- a/vcl/unx/gtk3/gtkobject.cxx
+++ b/vcl/unx/gtk3/gtkobject.cxx
@@ -491,7 +491,12 @@ void GtkSalObjectWidgetClip::Show( bool bVisible )
 if (bVisible == bCurrentVis)
 return;
 if( bVisible )
+{
 gtk_widget_show(m_pScrolledWindow);
+// tdf#146641 allocations attempted while hidden are discarded by gtk,
+// so on transition to visible ApplyClipRegion needs to be called
+ApplyClipRegion();
+}
 else
 {
 // on hiding the widget, if a child has focus gtk will want to move 
the focus out of the widget


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

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

New commits:
commit 8c9d8521677f63e22c79eff7399b9f76c06e8847
Author: Caolán McNamara 
AuthorDate: Fri Jan 7 20:29:59 2022 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun Jan 9 17:44:00 2022 +0100

tdf#146641 allocations attempted while hidden are discarded by gtk

Change-Id: I46288cf4c106e2763feba298f1c44dbbf6c85581
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128080
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/unx/gtk3/gtkobject.cxx b/vcl/unx/gtk3/gtkobject.cxx
index d712dae3c8bb..6f8fffd3f0a0 100644
--- a/vcl/unx/gtk3/gtkobject.cxx
+++ b/vcl/unx/gtk3/gtkobject.cxx
@@ -496,7 +496,12 @@ void GtkSalObjectWidgetClip::Show( bool bVisible )
 if (bVisible == bCurrentVis)
 return;
 if( bVisible )
+{
 gtk_widget_show(m_pScrolledWindow);
+// tdf#146641 allocations attempted while hidden are discarded by gtk,
+// so on transition to visible ApplyClipRegion needs to be called
+ApplyClipRegion();
+}
 else
 {
 // on hiding the widget, if a child has focus gtk will want to move 
the focus out of the widget


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

2022-01-09 Thread Caolán McNamara (via logerrit)
 sc/source/ui/optdlg/tpcalc.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit ea800e3bf861a6a6bf338e72cc55959d32b5af48
Author: Caolán McNamara 
AuthorDate: Wed Jan 5 21:09:13 2022 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun Jan 9 17:42:31 2022 +0100

Resolves: tdf#146592 "Reset" to the current document properties

not those seen at the initial load of the TabPage

Change-Id: Ieba4c278a0a9b7fef3030d8462cb845c27dba9b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127961
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx
index 92570ea9653f..53517d81a0f0 100644
--- a/sc/source/ui/optdlg/tpcalc.cxx
+++ b/sc/source/ui/optdlg/tpcalc.cxx
@@ -82,12 +82,16 @@ std::unique_ptr ScTpCalcOptions::Create( 
weld::Container* pPage, wel
 return std::make_unique( pPage, pController, *rAttrSet );
 }
 
-void ScTpCalcOptions::Reset( const SfxItemSet* /* rCoreAttrs */ )
+void ScTpCalcOptions::Reset(const SfxItemSet* rCoreAttrs)
 {
 sal_uInt16  d,m;
 sal_Int16   y;
 
-*pLocalOptions  = *pOldOptions;
+pOldOptions.reset(new ScDocOptions(
+static_cast(rCoreAttrs->Get(
+GetWhich(SID_SCDOCOPTIONS))).GetDocOptions()));
+
+*pLocalOptions = *pOldOptions;
 
 m_xBtnCase->set_active( !pLocalOptions->IsIgnoreCase() );
 m_xBtnCase->set_sensitive( 
!officecfg::Office::Calc::Calculate::Other::CaseSensitive::isReadOnly() );


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

2022-01-09 Thread Olivier Hallot (via logerrit)
 sw/source/uibase/sidebar/ThemePanel.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 9754b3feb4092243f30c665abc0344b1a665b5f6
Author: Olivier Hallot 
AuthorDate: Sat Jan 8 10:01:56 2022 -0300
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun Jan 9 17:41:47 2022 +0100

tdf#90497 Replace Open Sans -> Noto Sans

See comment #19 of tdf#90497.

Change-Id: Ic102e2155ae97cb191b13f883d7c2fcec6b9a38a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128139
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx 
b/sw/source/uibase/sidebar/ThemePanel.cxx
index 974f32cb0fa6..6a13accc32a8 100644
--- a/sw/source/uibase/sidebar/ThemePanel.cxx
+++ b/sw/source/uibase/sidebar/ThemePanel.cxx
@@ -298,10 +298,10 @@ std::vector initFontSets()
 }
 {
 FontSet aFontSet;
-aFontSet.maName = "Open Sans";
-aFontSet.msHeadingFont = "Open Sans";
-aFontSet.msBaseFont = "Open Sans";
-aFontSet.msMonoFont = "Droid Sans Mono";
+aFontSet.maName = "Noto Sans";
+aFontSet.msHeadingFont = "Noto Sans";
+aFontSet.msBaseFont = "Noto Sans";
+aFontSet.msMonoFont = "Noto Mono";
 aFontSets.push_back(aFontSet);
 }
 {


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

2022-01-09 Thread Jan-Marek Glogowski (via logerrit)
 sw/source/filter/html/htmlform.cxx |   22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 032a96621d88097b62fd4613f13e7f617a9c01f3
Author: Jan-Marek Glogowski 
AuthorDate: Sun Jan 9 09:36:14 2022 +0100
Commit: Caolán McNamara 
CommitDate: Sun Jan 9 16:51:41 2022 +0100

Try a different approach to fix ofz#39303

... to get rid of all the "unused, assigned variable" compiler
warnings.

Reverts commit 619dcf67c1f770685c6b40477f15657f70c05865.

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

diff --git a/sw/source/filter/html/htmlform.cxx 
b/sw/source/filter/html/htmlform.cxx
index 60e6ea0f2924..e2685f6bf5ae 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -17,9 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include 
-#include 
-
 #include 
 
 #include 
@@ -30,6 +27,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -1298,25 +1296,28 @@ void SwHTMLParser::NewForm( bool bAppend )
 }
 }
 
-#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
 const uno::Reference< XMultiServiceFactory > & rSrvcMgr =
 m_pFormImpl->GetServiceFactory();
 if( !rSrvcMgr.is() )
 return;
 
 uno::Reference< XInterface > xInt;
+uno::Reference xForm;
 try
 {
 xInt = rSrvcMgr->createInstance("com.sun.star.form.component.Form");
+if (!xInt.is())
+return;
+xForm.set(xInt, UNO_QUERY);
+SAL_WARN_IF(!xForm.is(), "sw", "no XForm for 
com.sun.star.form.component.Form?");
+if (!xForm.is())
+return;
 }
-catch (const css::lang::ServiceNotRegisteredException&)
+catch (...)
 {
-}
-if( !xInt.is() )
+TOOLS_WARN_EXCEPTION("sw", "");
 return;
-
-uno::Reference< XForm >  xForm( xInt, UNO_QUERY );
-OSL_ENSURE( xForm.is(), "no Form?" );
+}
 
 uno::Reference< container::XIndexContainer > xFormComps( xForm, UNO_QUERY 
);
 m_pFormImpl->SetFormComps( xFormComps );
@@ -1367,7 +1368,6 @@ void SwHTMLParser::NewForm( bool bAppend )
 if (bHasEvents)
 NotifyMacroEventRead();
 }
-#endif
 }
 
 void SwHTMLParser::EndForm( bool bAppend )


[Libreoffice-commits] core.git: comphelper/Library_comphelper.mk comphelper/source include/comphelper include/svx solenv/clang-format svx/source

2022-01-09 Thread Luboš Luňák (via logerrit)
 comphelper/Library_comphelper.mk |1 
 comphelper/source/misc/anytohash.cxx |  210 +++
 include/comphelper/anytohash.hxx |   48 
 include/svx/sdasitm.hxx  |8 +
 solenv/clang-format/excludelist  |1 
 svx/source/items/customshapeitem.cxx |   51 ++--
 6 files changed, 308 insertions(+), 11 deletions(-)

New commits:
commit dd6ff1fd7fea0cfae75e5f65afed9d5f871d1313
Author: Luboš Luňák 
AuthorDate: Fri Jan 7 12:43:48 2022 +0100
Commit: Luboš Luňák 
CommitDate: Sun Jan 9 15:43:53 2022 +0100

implement anyToHash() and use it for SdrCustomShapeGeometryItem

Using anyLess() still has quite some cost with bsc#1183308, this
makes the cost almost unnoticeable.

Since some values of Any are not handled, return empty std::optional
for those cases.

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

diff --git a/comphelper/Library_comphelper.mk b/comphelper/Library_comphelper.mk
index 9da69fca91a8..dd2260c111f9 100644
--- a/comphelper/Library_comphelper.mk
+++ b/comphelper/Library_comphelper.mk
@@ -86,6 +86,7 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\
 comphelper/source/misc/accimplaccess \
 comphelper/source/misc/AccessibleImplementationHelper \
 comphelper/source/misc/anycompare \
+comphelper/source/misc/anytohash \
 comphelper/source/misc/anytostring \
 comphelper/source/misc/asyncnotification \
 comphelper/source/misc/asyncquithandler \
diff --git a/comphelper/source/misc/anytohash.cxx 
b/comphelper/source/misc/anytohash.cxx
new file mode 100644
index ..4e97ea124d41
--- /dev/null
+++ b/comphelper/source/misc/anytohash.cxx
@@ -0,0 +1,210 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+
+#include 
+
+#include 
+#include 
+
+#include 
+
+#include "typedescriptionref.hxx"
+
+using namespace ::com::sun::star;
+using ::com::sun::star::uno::TypeDescription;
+using ::comphelper::detail::TypeDescriptionRef;
+
+namespace comphelper {
+namespace {
+
+std::optional hashValue( size_t hash,
+  void const * val, typelib_TypeDescriptionReference * typeRef 
)
+{
+o3tl::hash_combine( hash, typeRef->eTypeClass );
+if (typeRef->eTypeClass == typelib_TypeClass_VOID) {
+return hash;
+}
+assert(val != nullptr);
+
+switch (typeRef->eTypeClass) {
+case typelib_TypeClass_INTERFACE: {
+return std::nullopt; // not implemented
+}
+case typelib_TypeClass_STRUCT:
+case typelib_TypeClass_EXCEPTION: {
+TypeDescription typeDescr( typeRef );
+if (!typeDescr.is())
+typeDescr.makeComplete();
+if (!typeDescr.is())
+return std::nullopt;
+
+typelib_CompoundTypeDescription * compType =
+reinterpret_cast< typelib_CompoundTypeDescription * >(
+typeDescr.get() );
+sal_Int32 nDescr = compType->nMembers;
+
+if (compType->pBaseTypeDescription) {
+std::optional tmpHash = hashValue(
+hash, val, reinterpret_cast<
+typelib_TypeDescription * >(
+compType->pBaseTypeDescription)->pWeakRef);
+if(!tmpHash.has_value())
+return std::nullopt;
+hash = *tmpHash;
+}
+
+typelib_TypeDescriptionReference ** ppTypeRefs =
+compType->ppTypeRefs;
+sal_Int32 * memberOffsets = compType->pMemberOffsets;
+
+for ( sal_Int32 nPos = 0; nPos < nDescr; ++nPos )
+{
+TypeDescriptionRef memberType( ppTypeRefs[ nPos ] );
+if (!memberType.is())
+return std::nullopt;
+
+std::optional tmpHash = hashValue( hash,
+ static_cast< char const * >(
+ val ) + memberOffsets[ nPos ],
+ memberType->pWeakRef );
+if(!tmpHash.has_value())
+return std::nullopt;
+hash 

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

2022-01-09 Thread Luboš Luňák (via logerrit)
 include/svx/sdasitm.hxx  |5 +
 svx/source/items/customshapeitem.cxx |   98 +--
 2 files changed, 64 insertions(+), 39 deletions(-)

New commits:
commit 9ba45189c76373d0464cc06902270914888162a3
Author: Luboš Luňák 
AuthorDate: Thu Jan 6 14:15:44 2022 +0100
Commit: Luboš Luňák 
CommitDate: Sun Jan 9 15:43:39 2022 +0100

make SdrCustomShapeGeometryItem sortable and fast (bsc#1183308)

The document contains a complex graphic consisting of many shapes,
and SfxItemPool tries to avoid duplicates by checking for equality.
And SdrCustomShapeGeometryItem contains a UNO sequence as data,
and comparing those is non-trivial. Make the item sortable, which
should make things faster, and use anyLess() for the ordering.
Additionally first check the size of the list of property names
the class keeps for an easy fast return.

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

diff --git a/include/svx/sdasitm.hxx b/include/svx/sdasitm.hxx
index 620e805b5813..ebd022980e6e 100644
--- a/include/svx/sdasitm.hxx
+++ b/include/svx/sdasitm.hxx
@@ -62,6 +62,9 @@ private:
 SdrCustomShapeGeometryItem & operator =(SdrCustomShapeGeometryItem 
&&) = delete; // due to SfxPoolItem
 
 virtual booloperator==( const SfxPoolItem& ) const 
override;
+virtual booloperator<( const SfxPoolItem& ) const 
override;
+virtual boolIsSortable() const override { return 
true; }
+
 virtual bool GetPresentation(SfxItemPresentation ePresentation,
  MapUnit eCoreMetric, MapUnit 
ePresentationMetric,
  OUString &rText, const IntlWrapper&) 
const override;
diff --git a/svx/source/items/customshapeitem.cxx 
b/svx/source/items/customshapeitem.cxx
index 733b30f29e47..0bba5ca6eb33 100644
--- a/svx/source/items/customshapeitem.cxx
+++ b/svx/source/items/customshapeitem.cxx
@@ -20,6 +20,7 @@
 #include 
 
 #include 
+#include 
 #include 
 
 #include 
@@ -216,12 +217,35 @@ void SdrCustomShapeGeometryItem::ClearPropertyValue( 
const OUString& rPropName )
 SdrCustomShapeGeometryItem::~SdrCustomShapeGeometryItem()
 {
 }
+
 bool SdrCustomShapeGeometryItem::operator==( const SfxPoolItem& rCmp ) const
 {
-bool bRet = SfxPoolItem::operator==( rCmp );
-if ( bRet )
-bRet = static_cast(rCmp).aPropSeq 
== aPropSeq;
-return bRet;
+if( !SfxPoolItem::operator==( rCmp ))
+return false;
+const SdrCustomShapeGeometryItem& other = static_cast(rCmp);
+// This is called often by SfxItemPool, and comparing uno sequences is 
relatively slow.
+// Optimize by checking the list of properties that this class keeps for 
the sequence,
+// if the sizes are different, the sequences are different too, which 
should allow a cheap
+// return for many cases.
+if( aPropHashMap.size() != other.aPropHashMap.size())
+return false;
+if( aPropPairHashMap.size() != other.aPropPairHashMap.size())
+return false;
+return aPropSeq == other.aPropSeq;
+}
+
+bool SdrCustomShapeGeometryItem::operator<( const SfxPoolItem& rCmp ) const
+{
+assert(dynamic_cast( &rCmp ));
+const SdrCustomShapeGeometryItem& other = static_cast(rCmp);
+// Again, optimize by checking the list of properties and compare by their 
count if different
+// (this is operator< for sorting purposes, so the ordering can be 
somewhat arbitrary).
+if( aPropHashMap.size() != other.aPropHashMap.size())
+return aPropHashMap.size() < other.aPropHashMap.size();
+if( aPropPairHashMap.size() != other.aPropPairHashMap.size())
+return aPropPairHashMap.size() < other.aPropPairHashMap.size();
+return comphelper::anyLess( css::uno::makeAny( aPropSeq ),
+css::uno::makeAny( other.aPropSeq ));
 }
 
 bool SdrCustomShapeGeometryItem::GetPresentation(
commit 74a37dce322d56251edfa49e7b98a2195f8c8e45
Author: Luboš Luňák 
AuthorDate: Fri Jan 7 11:29:33 2022 +0100
Commit: Luboš Luňák 
CommitDate: Sun Jan 9 15:43:22 2022 +0100

make SdrCustomShapeGeometryItem internal data consistent

The PutValue() function didn't update the property map properly
the same way the constructor and other functions do.

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

diff --git a/include/svx/sdasitm.hxx b/include/svx/sdasitm.hxx
index c02076bfb923..620e805b5813 100644
--- a/include/svx/sdasitm.hxx
+++ b/include/svx/sdasitm.hxx
@@ -48,6 +48,8 @@ private:
 
 css::uno::Sequence< css::beans::PropertyValue > aPropSeq;
 
+void SetPropSeq( const css::uno::Sequence< css::beans::PropertyValue >& 
rPropSeq );
+
  

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

2022-01-09 Thread Luboš Luňák (via logerrit)
 comphelper/source/misc/anycompare.cxx |   39 ++-
 comphelper/source/misc/anytostring.cxx|   52 --
 comphelper/source/misc/typedescriptionref.hxx |   51 +
 3 files changed, 79 insertions(+), 63 deletions(-)

New commits:
commit afda77cd6565e53a356c0b0be93d708808079e49
Author: Luboš Luňák 
AuthorDate: Thu Jan 6 14:11:30 2022 +0100
Commit: Luboš Luňák 
CommitDate: Sun Jan 9 15:43:07 2022 +0100

use C++ class handling ownership for anyToString()

This matches changes I did for anyLess() in my previous commit.

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

diff --git a/comphelper/source/misc/anycompare.cxx 
b/comphelper/source/misc/anycompare.cxx
index 68cd6dc0f9d2..8a23877239be 100644
--- a/comphelper/source/misc/anycompare.cxx
+++ b/comphelper/source/misc/anycompare.cxx
@@ -26,10 +26,13 @@
 #include 
 #include 
 
+#include "typedescriptionref.hxx"
+
 namespace comphelper
 {
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::Type;
+using ::com::sun::star::uno::TypeDescription;
 using ::com::sun::star::uno::TypeClass_CHAR;
 using ::com::sun::star::uno::TypeClass_BOOLEAN;
 using ::com::sun::star::uno::TypeClass_BYTE;
@@ -50,6 +53,7 @@ namespace comphelper
 using ::com::sun::star::util::Date;
 using ::com::sun::star::util::Time;
 using ::com::sun::star::util::DateTime;
+using ::comphelper::detail::TypeDescriptionRef;
 
 namespace {
 
@@ -178,41 +182,6 @@ namespace comphelper
 return std::nullopt; // equal, so can't yet tell if anyLess() should 
return
 }
 
-using com::sun::star::uno::TypeDescription;
-
-// This is like com::sun::star::uno::TypeDescription, but it uses 
TYPELIB_DANGER_GET
-// (which the code used originally, but it's easier to have a class to 
handle ownership).
-class TypeDescriptionRef
-{
-public:
-TypeDescriptionRef( typelib_TypeDescriptionReference* typeDef )
-{
-TYPELIB_DANGER_GET( &typeDescr, typeDef );
-}
-~TypeDescriptionRef()
-{
-TYPELIB_DANGER_RELEASE( typeDescr );
-}
-typelib_TypeDescription* get()
-{
-return typeDescr;
-}
-typelib_TypeDescription* operator->()
-{
-return typeDescr;
-}
-bool is()
-{
-return typeDescr != nullptr;
-}
-bool equals( const TypeDescriptionRef& other ) const
-{
-return typeDescr && other.typeDescr && 
typelib_typedescription_equals( typeDescr, other.typeDescr );
-}
-private:
-typelib_TypeDescription* typeDescr = nullptr;
-};
-
 // This is typelib_typedescription_equals(), but returns -1/0/1 values 
like strcmp().
 int compareTypes( const typelib_TypeDescription * lhsType,
   const typelib_TypeDescription * rhsType )
diff --git a/comphelper/source/misc/anytostring.cxx 
b/comphelper/source/misc/anytostring.cxx
index 4e068cec9acd..ebc338b0b4be 100644
--- a/comphelper/source/misc/anytostring.cxx
+++ b/comphelper/source/misc/anytostring.cxx
@@ -20,10 +20,14 @@
 
 #include 
 #include 
-#include 
+#include 
 #include 
 
+#include "typedescriptionref.hxx"
+
 using namespace ::com::sun::star;
+using ::com::sun::star::uno::TypeDescription;
+using ::comphelper::detail::TypeDescriptionRef;
 
 namespace comphelper {
 namespace {
@@ -90,15 +94,16 @@ void appendValue( OUStringBuffer & buf,
 case typelib_TypeClass_STRUCT:
 case typelib_TypeClass_EXCEPTION: {
 buf.append( "{ " );
-typelib_TypeDescription * typeDescr = nullptr;
-typelib_typedescriptionreference_getDescription( &typeDescr, typeRef );
-if (typeDescr == nullptr || !typelib_typedescription_complete( 
&typeDescr )) {
+TypeDescription typeDescr( typeRef );
+if (!typeDescr.is())
+typeDescr.makeComplete();
+if (!typeDescr.is()) {
 appendTypeError( buf, typeRef );
 }
 else {
 typelib_CompoundTypeDescription * compType =
 reinterpret_cast< typelib_CompoundTypeDescription * >(
-typeDescr );
+typeDescr.get() );
 sal_Int32 nDescr = compType->nMembers;
 
 if (compType->pBaseTypeDescription) {
@@ -119,9 +124,8 @@ void appendValue( OUStringBuffer & buf,
 {
 buf.append( ppMemberNames[ nPos ] );
 buf.append( " = " );
-typelib_TypeDescription * memberType = nullptr;
-TYPELIB_DANGER_GET( &memberType, ppTypeRefs[ nPos ] );
-if (memberType == nullptr) {
+TypeDescriptionRef memberType( ppTypeRefs[ nPos ] );
+if (!memberType.is()) {
 

[Libreoffice-commits] core.git: comphelper/Library_comphelper.mk comphelper/source

2022-01-09 Thread Luboš Luňák (via logerrit)
 comphelper/Library_comphelper.mk  |2 
 comphelper/source/misc/anycompare.cxx |  295 --
 2 files changed, 246 insertions(+), 51 deletions(-)

New commits:
commit ba252c51f5b49314d8a8e5f9594aedb81f358b2b
Author: Luboš Luňák 
AuthorDate: Thu Jan 6 13:57:57 2022 +0100
Commit: Luboš Luňák 
CommitDate: Sun Jan 9 15:42:50 2022 +0100

make anyLess() work also for compound types such as sequences

The previous implementation used the specific predicates, which
are not recursive. And since that'd require constructing Any
instances, which copies, which would be slow, write new code
based on anyToString() instead.

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

diff --git a/comphelper/Library_comphelper.mk b/comphelper/Library_comphelper.mk
index 20067b14b4ce..9da69fca91a8 100644
--- a/comphelper/Library_comphelper.mk
+++ b/comphelper/Library_comphelper.mk
@@ -85,6 +85,7 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\
 comphelper/source/misc/accessiblewrapper \
 comphelper/source/misc/accimplaccess \
 comphelper/source/misc/AccessibleImplementationHelper \
+comphelper/source/misc/anycompare \
 comphelper/source/misc/anytostring \
 comphelper/source/misc/asyncnotification \
 comphelper/source/misc/asyncquithandler \
@@ -126,7 +127,6 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\
 comphelper/source/misc/simplefileaccessinteraction \
 comphelper/source/misc/solarmutex \
 comphelper/source/misc/stillreadwriteinteraction \
-comphelper/source/misc/anycompare \
 comphelper/source/misc/storagehelper \
 comphelper/source/misc/string \
 comphelper/source/misc/synchronousdispatch \
diff --git a/comphelper/source/misc/anycompare.cxx 
b/comphelper/source/misc/anycompare.cxx
index d802024e7502..68cd6dc0f9d2 100644
--- a/comphelper/source/misc/anycompare.cxx
+++ b/comphelper/source/misc/anycompare.cxx
@@ -18,7 +18,9 @@
  */
 
 #include 
+#include 
 #include 
+#include 
 
 #include 
 #include 
@@ -160,8 +162,250 @@ namespace comphelper
 }
 };
 
+bool anyLess( void const * lhs, typelib_TypeDescriptionReference * lhsType,
+  void const * rhs, typelib_TypeDescriptionReference * rhsType 
);
+
+// For compound types we need to compare them member by member until we've
+// checked them all or found a member that differs. For inequality checks
+// we need to call anyLess() twice in both directions, this function does 
that.
+std::optional anyCompare( void const * lhs, 
typelib_TypeDescriptionReference * lhsType,
+  void const * rhs, typelib_TypeDescriptionReference * rhsType )
+{
+if( anyLess( lhs, lhsType, rhs, rhsType ))
+return std::optional( true );
+if( anyLess( rhs, rhsType, lhs, lhsType ))
+return std::optional( false );
+return std::nullopt; // equal, so can't yet tell if anyLess() should 
return
+}
+
+using com::sun::star::uno::TypeDescription;
+
+// This is like com::sun::star::uno::TypeDescription, but it uses 
TYPELIB_DANGER_GET
+// (which the code used originally, but it's easier to have a class to 
handle ownership).
+class TypeDescriptionRef
+{
+public:
+TypeDescriptionRef( typelib_TypeDescriptionReference* typeDef )
+{
+TYPELIB_DANGER_GET( &typeDescr, typeDef );
+}
+~TypeDescriptionRef()
+{
+TYPELIB_DANGER_RELEASE( typeDescr );
+}
+typelib_TypeDescription* get()
+{
+return typeDescr;
+}
+typelib_TypeDescription* operator->()
+{
+return typeDescr;
+}
+bool is()
+{
+return typeDescr != nullptr;
+}
+bool equals( const TypeDescriptionRef& other ) const
+{
+return typeDescr && other.typeDescr && 
typelib_typedescription_equals( typeDescr, other.typeDescr );
+}
+private:
+typelib_TypeDescription* typeDescr = nullptr;
+};
+
+// This is typelib_typedescription_equals(), but returns -1/0/1 values 
like strcmp().
+int compareTypes( const typelib_TypeDescription * lhsType,
+  const typelib_TypeDescription * rhsType )
+{
+if( lhsType == rhsType )
+return 0;
+if( lhsType->eTypeClass != rhsType->eTypeClass )
+return lhsType->eTypeClass - rhsType->eTypeClass;
+if( lhsType->pTypeName->length != rhsType->pTypeName->length )
+return lhsType->pTypeName->length - rhsType->pTypeName->length;
+return rtl_ustr_compare( lhsType->pTypeName->buffer, 
rhsType->pTypeName->buffer );
 }
 
+bool anyLess( void const * lhs, typelib_TypeDescriptionReference * lhsType,
+  void const * r

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

2022-01-09 Thread Luboš Luňák (via logerrit)
 include/com/sun/star/uno/Sequence.hxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 9e7e63b8f812977b253b05db8a02dd0444de375a
Author: Luboš Luňák 
AuthorDate: Fri Jan 7 10:01:46 2022 +0100
Commit: Luboš Luňák 
CommitDate: Sun Jan 9 15:42:22 2022 +0100

uno sequences with different sizes are not equal

This should often the case, and should be way faster than the UNO
data comparison.

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

diff --git a/include/com/sun/star/uno/Sequence.hxx 
b/include/com/sun/star/uno/Sequence.hxx
index c078124f96fc..e6643a2ec2f4 100644
--- a/include/com/sun/star/uno/Sequence.hxx
+++ b/include/com/sun/star/uno/Sequence.hxx
@@ -146,6 +146,8 @@ inline bool Sequence< E >::operator == ( const Sequence & 
rSeq ) const
 {
 if (_pSequence == rSeq._pSequence)
 return true;
+if (_pSequence->nElements != rSeq._pSequence->nElements)
+return false;
 const Type & rType = ::cppu::getTypeFavourUnsigned( this );
 return ::uno_type_equalData(
 const_cast< Sequence * >( this ), rType.getTypeLibType(),


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

2022-01-09 Thread Mike Kaganski (via logerrit)
 svx/source/svdraw/svdtrans.cxx |   14 --
 1 file changed, 4 insertions(+), 10 deletions(-)

New commits:
commit 1bdb4ddfc516d62f482f83fc6191e9585aa4786b
Author: Mike Kaganski 
AuthorDate: Sun Jan 9 15:53:22 2022 +0300
Commit: Mike Kaganski 
CommitDate: Sun Jan 9 15:11:09 2022 +0100

Slightly optimize code handling angles

Change-Id: I8bc10513f6cd704abc7a2bbb17d8d0d8d2628401
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128187
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
index 2e3b91d47a57..201e9f86d58c 100644
--- a/svx/source/svdraw/svdtrans.cxx
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -407,19 +407,13 @@ Degree100 NormAngle18000(Degree100 a)
 
 Degree100 NormAngle36000(Degree100 a)
 {
-while (a < 0_deg100) a += 36000_deg100;
-while (a >= 36000_deg100) a -= 36000_deg100;
+a %= 36000_deg100;
+if (a < 0_deg100)
+a += 36000_deg100;
 return a;
 }
 
-sal_uInt16 GetAngleSector(Degree100 nAngle)
-{
-nAngle = NormAngle36000(nAngle);
-if (nAngle< 9000_deg100) return 0;
-if (nAngle<18000_deg100) return 1;
-if (nAngle<27000_deg100) return 2;
-return 3;
-}
+sal_uInt16 GetAngleSector(Degree100 nAngle) { return (NormAngle36000(nAngle) / 
9000_deg100).get(); }
 
 tools::Long GetLen(const Point& rPnt)
 {


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

2022-01-09 Thread Jan-Marek Glogowski (via logerrit)
 vcl/source/gdi/impglyphitem.cxx |4 
 1 file changed, 4 deletions(-)

New commits:
commit dbf57c78f075fe0e255cc7d256cd1416569d2bb0
Author: Jan-Marek Glogowski 
AuthorDate: Sun Jan 9 11:33:14 2022 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Sun Jan 9 14:06:16 2022 +0100

VCL drop unused glyphcache include

Change-Id: I5c7461a9ee5d63024b8376f4173d418c21a07935
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128184
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/vcl/source/gdi/impglyphitem.cxx b/vcl/source/gdi/impglyphitem.cxx
index 06dbaf6c5f32..5464754bab56 100644
--- a/vcl/source/gdi/impglyphitem.cxx
+++ b/vcl/source/gdi/impglyphitem.cxx
@@ -19,10 +19,6 @@
 
 #include 
 
-#if (defined UNX && !defined MACOSX && !defined IOS)
-#include 
-#endif
-
 SalLayoutGlyphs::SalLayoutGlyphs() {}
 
 SalLayoutGlyphs::~SalLayoutGlyphs() {}


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

2022-01-09 Thread Caolán McNamara (via logerrit)
 cui/source/options/optcolor.cxx  |   60 +--
 cui/source/options/optcolor.hxx  |5 ++
 cui/uiconfig/ui/colorconfigwin.ui|1 
 cui/uiconfig/ui/optappearancepage.ui |4 --
 4 files changed, 44 insertions(+), 26 deletions(-)

New commits:
commit 0d373003a6a63c3e7e8928ebc0b42eb2d294
Author: Caolán McNamara 
AuthorDate: Thu Jan 6 14:21:38 2022 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun Jan 9 13:39:46 2022 +0100

tdf#146423 don't set a size-request during a size-alloc

and use a better width calculation

Change-Id: Ib873a8ed9e6424c09630650af352ba5a20c674b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128077
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index ebe066b1073e..8024adbf4201 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -188,7 +188,10 @@ public:
 return *m_xBox;
 }
 
-void AdjustExtraWidths(int nTextWidth);
+int GetLabelIndent() const
+{
+return m_nCheckBoxLabelOffset;
+}
 
 private:
 // Chapter -- horizontal group separator stripe with text
@@ -207,10 +210,9 @@ private:
 {
 public:
 Entry(weld::Window* pTopLevel, weld::Builder& rBuilder, const char* 
pTextWidget, const char* pColorWidget,
-  const Color& rColor, tools::Long nCheckBoxLabelOffset, bool 
bCheckBox, bool bShow);
+  const Color& rColor, int nCheckBoxLabelOffset, bool bCheckBox, 
bool bShow);
 public:
 void SetText(const OUString& rLabel) { 
dynamic_cast(*m_xText).set_label(rLabel); }
-void set_width_request(int nTextWidth) { 
m_xText->set_size_request(nTextWidth, -1); }
 int get_height_request() const
 {
 return std::max(m_xText->get_preferred_size().Height(),
@@ -239,6 +241,7 @@ private:
 
 private:
 weld::Window* m_pTopLevel;
+int m_nCheckBoxLabelOffset;
 std::unique_ptr m_xBuilder;
 std::unique_ptr m_xBox;
 std::unique_ptr m_xWidget1;
@@ -280,7 +283,7 @@ ColorConfigWindow_Impl::Chapter::Chapter(weld::Builder& 
rBuilder, const char* pL
 ColorConfigWindow_Impl::Entry::Entry(weld::Window* pTopLevel, weld::Builder& 
rBuilder,
  const char* pTextWidget, const char* 
pColorWidget,
  const Color& rColor,
- tools::Long nCheckBoxLabelOffset, bool 
bCheckBox, bool bShow)
+ int nCheckBoxLabelOffset, bool bCheckBox, 
bool bShow)
 : m_xColorList(new ColorListBox(rBuilder.weld_menu_button(pColorWidget), 
[pTopLevel]{ return pTopLevel; }))
 , m_aDefaultColor(rColor)
 {
@@ -365,8 +368,8 @@ 
ColorConfigWindow_Impl::ColorConfigWindow_Impl(weld::Window* pTopLevel, weld::Co
 : m_pTopLevel(pTopLevel)
 , m_xBuilder(Application::CreateBuilder(pParent, 
"cui/ui/colorconfigwin.ui"))
 , m_xBox(m_xBuilder->weld_box("ColorConfigWindow"))
-, m_xWidget1(m_xBuilder->weld_widget("doccolor"))
-, m_xWidget2(m_xBuilder->weld_widget("doccolor_lb"))
+, m_xWidget1(m_xBuilder->weld_widget("docboundaries"))
+, m_xWidget2(m_xBuilder->weld_widget("docboundaries_lb"))
 {
 CreateEntries();
 }
@@ -384,9 +387,8 @@ void ColorConfigWindow_Impl::CreateEntries()
 
 // Here we want to get the amount to add to the position of a FixedText to
 // get it to align its contents with that of a CheckBox
-tools::Long nCheckBoxLabelOffset = 0;
 {
-OUString sSampleText("X");
+OUString sSampleText("XX");
 std::unique_ptr 
xCheckBox(m_xBuilder->weld_check_button("docboundaries"));
 std::unique_ptr 
xFixedText(m_xBuilder->weld_label("doccolor"));
 OUString sOrigCheck(xCheckBox->get_label());
@@ -397,7 +399,7 @@ void ColorConfigWindow_Impl::CreateEntries()
 Size aFixedSize(xFixedText->get_preferred_size());
 xCheckBox->set_label(sOrigCheck);
 xFixedText->set_label(sOrigFixed);
-nCheckBoxLabelOffset = aCheckSize.Width() - aFixedSize.Width();
+m_nCheckBoxLabelOffset = aCheckSize.Width() - aFixedSize.Width();
 }
 
 // creating entries
@@ -407,7 +409,7 @@ void ColorConfigWindow_Impl::CreateEntries()
 vEntries.push_back(std::make_shared(m_pTopLevel, *m_xBuilder,
 vEntryInfo[i].pText, vEntryInfo[i].pColor,
 ColorConfig::GetDefaultColor(static_cast(i)),
-nCheckBoxLabelOffset,
+m_nCheckBoxLabelOffset,
 vEntryInfo[i].bCheckBox,
 aModulesInstalled[vEntryInfo[i].eGroup]));
 }
@@ -441,18 +443,12 @@ void ColorConfigWindow_Impl::CreateEntries()
 aExtConfig.GetComponentColorConfigValue(sComponentName, i);
 vEntries.push_back(std::make_shared(m_pTopLevel, 
*vExtBuilders.back(),
 "label", "button", aColorEntry.getDefa

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

2022-01-09 Thread Caolán McNamara (via logerrit)
 vcl/source/app/salvtables.cxx |   13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 6c191f339c8bd8717e01085baea93ccfb2416c82
Author: Caolán McNamara 
AuthorDate: Fri Jan 7 12:17:36 2022 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun Jan 9 13:37:04 2022 +0100

Resolves: tdf#129745 don't override child help for application frames

the glue WindowInstance is created on demand, and on creation descends
into any existing open dialogs and changes their help handlers. We could
not descend into child dialogs, but we shouldn't change the app frame
help handler anyway.

Change-Id: I8d149d324f04824fbe9eec517d8c482fd96b125b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128076
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 54199b1284b3..5525ec7d39c5 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1427,7 +1427,10 @@ SalInstanceWindow::SalInstanceWindow(vcl::Window* 
pWindow, SalInstanceBuilder* p
 : SalInstanceContainer(pWindow, pBuilder, bTakeOwnership)
 , m_xWindow(pWindow)
 {
-override_child_help(m_xWindow);
+// tdf#129745 only override child help for the normal case, not for
+// m_pBuilder of null which is the toplevel application frame case.
+if (m_pBuilder)
+override_child_help(m_xWindow);
 }
 
 void SalInstanceWindow::set_title(const OUString& rTitle) { 
m_xWindow->SetText(rTitle); }
@@ -1528,7 +1531,13 @@ weld::ScreenShotCollection 
SalInstanceWindow::collect_screenshot_data()
 return aRet;
 }
 
-SalInstanceWindow::~SalInstanceWindow() { clear_child_help(m_xWindow); }
+SalInstanceWindow::~SalInstanceWindow()
+{
+// tdf#129745 only undo overriding child help for the normal case, not for
+// m_pBuilder of null which is the toplevel application frame case.
+if (m_pBuilder)
+clear_child_help(m_xWindow);
+}
 
 IMPL_LINK_NOARG(SalInstanceWindow, HelpHdl, vcl::Window&, bool)
 {


[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - vcl/source

2022-01-09 Thread Caolán McNamara (via logerrit)
 vcl/source/app/salvtables.cxx |   13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 6ed655058f0a38af744ed2431f006011c6f0afa3
Author: Caolán McNamara 
AuthorDate: Fri Jan 7 12:17:36 2022 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun Jan 9 13:36:41 2022 +0100

Resolves: tdf#129745 don't override child help for application frames

the glue WindowInstance is created on demand, and on creation descends
into any existing open dialogs and changes their help handlers. We could
not descend into child dialogs, but we shouldn't change the app frame
help handler anyway.

Change-Id: I8d149d324f04824fbe9eec517d8c482fd96b125b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128075
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 78148cd10ea8..20e8db2e7726 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1427,7 +1427,10 @@ SalInstanceWindow::SalInstanceWindow(vcl::Window* 
pWindow, SalInstanceBuilder* p
 : SalInstanceContainer(pWindow, pBuilder, bTakeOwnership)
 , m_xWindow(pWindow)
 {
-override_child_help(m_xWindow);
+// tdf#129745 only override child help for the normal case, not for
+// m_pBuilder of null which is the toplevel application frame case.
+if (m_pBuilder)
+override_child_help(m_xWindow);
 }
 
 void SalInstanceWindow::set_title(const OUString& rTitle) { 
m_xWindow->SetText(rTitle); }
@@ -1528,7 +1531,13 @@ weld::ScreenShotCollection 
SalInstanceWindow::collect_screenshot_data()
 return aRet;
 }
 
-SalInstanceWindow::~SalInstanceWindow() { clear_child_help(m_xWindow); }
+SalInstanceWindow::~SalInstanceWindow()
+{
+// tdf#129745 only undo overriding child help for the normal case, not for
+// m_pBuilder of null which is the toplevel application frame case.
+if (m_pBuilder)
+clear_child_help(m_xWindow);
+}
 
 IMPL_LINK_NOARG(SalInstanceWindow, HelpHdl, vcl::Window&, bool)
 {


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

2022-01-09 Thread Caolán McNamara (via logerrit)
 sw/source/ui/chrdlg/numpara.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f2b9ccba7a2dace2c384de06464d6f3535e98620
Author: Caolán McNamara 
AuthorDate: Thu Jan 6 20:27:51 2022 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun Jan 9 13:33:09 2022 +0100

Resolves: tdf#146285 the "edit" button should be insensitive

for this case

Change-Id: Ib60577d10bd4a91ea01c5aa6fcf3d50b38fbe24d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128067
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index 425bbc56a895..272763a43b56 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -200,7 +200,8 @@ void SwParagraphNumTabPage::Reset(const SfxItemSet* rSet)
 m_xNumberStyleLB->set_active(-1);
 }
 
-EditNumStyleSelectHdl_Impl(*m_xNumberStyleLB);
+if (m_xNumberStyleBX->get_sensitive())
+EditNumStyleSelectHdl_Impl(*m_xNumberStyleLB);
 
 m_xNumberStyleLB->save_value();
 


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

2022-01-09 Thread Jan-Marek Glogowski (via logerrit)
 include/sal/log-areas.dox  |1 -
 sw/source/uibase/docvw/srcedtw.cxx |   10 +-
 2 files changed, 1 insertion(+), 10 deletions(-)

New commits:
commit 7af8def453c1cc066b439a14bf207ea42bcd6acb
Author: Jan-Marek Glogowski 
AuthorDate: Sun Jan 9 09:34:57 2022 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Sun Jan 9 13:26:42 2022 +0100

Replace single sw.level2 log area user with area sw

Change-Id: I3df5c5f937361a7a0283a05a7b9c6669bb404c1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128183
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 8702656bbb18..fca315f7c915 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -534,7 +534,6 @@ certain functionality.
 @li @c sw.idle
 @li @c sw.layout - Writer core view: document layout
 @li @c sw.layout.debug - Writer layout dbg_lay output
-@li @c sw.level2
 @li @c sw.mailmerge - Writer mail merge
 @li @c sw.pageframe - debug lifecycle of SwPageFrame
 @li @c sw.rtf - .rtf export filter
diff --git a/sw/source/uibase/docvw/srcedtw.cxx 
b/sw/source/uibase/docvw/srcedtw.cxx
index ba8bcad6650d..cbd0f132a943 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -148,20 +148,12 @@ static void lcl_Highlight(const OUString& rSource, 
TextPortions& aPortionList)
 HtmlTokenId nToken = ::GetHTMLToken(sToken);
 if(nToken != HtmlTokenId::NONE)
 {
-// Token was found
 eFoundType = svtools::HTMLKEYWORD;
 nPortEnd = nSrchPos;
 nPortStart = nActPos;
 }
 else
-{
-// what was that?
-SAL_WARN(
-"sw.level2",
-"Token " << sToken
-<< " not recognised!");
-}
-
+SAL_WARN("sw", "HTML token " << sToken << " not 
recognised!");
 }
 }
 // now we still have to look for '>'


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

2022-01-09 Thread Jan-Marek Glogowski (via logerrit)
 vcl/qt5/QtFrame.cxx |   21 +
 1 file changed, 13 insertions(+), 8 deletions(-)

New commits:
commit 0c124cb6e112b340c397c7615b127e71fbfd5e8c
Author: Jan-Marek Glogowski 
AuthorDate: Sun Jan 9 00:51:09 2022 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Sun Jan 9 13:25:59 2022 +0100

Qt minimize modal reparenting a bit

Change-Id: Ie7203e9d92e5971de6c2730ff847f351e5641c9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128178
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index 46f7a1a409ff..1f69ed66da0c 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -176,8 +176,8 @@ QtFrame::QtFrame(QtFrame* pParent, SalFrameStyleFlags 
nStyle, bool bUseCairo)
 
 if (pParent && !(pParent->m_nStyle & SalFrameStyleFlags::PLUG))
 {
-QWindow* pParentWindow = 
pParent->GetQWidget()->window()->windowHandle();
-QWindow* pChildWindow = asChild()->window()->windowHandle();
+QWindow* pParentWindow = pParent->windowHandle();
+QWindow* pChildWindow = windowHandle();
 if (pParentWindow && pChildWindow && (pParentWindow != pChildWindow))
 pChildWindow->setTransientParent(pParentWindow);
 }
@@ -349,6 +349,7 @@ QWindow* QtFrame::windowHandle() const
 {
 // set attribute 'Qt::WA_NativeWindow' first to make sure a window handle 
actually exists
 QWidget* pChild = asChild();
+assert(pChild->window() == pChild);
 pChild->setAttribute(Qt::WA_NativeWindow);
 return pChild->windowHandle();
 }
@@ -428,21 +429,25 @@ void QtFrame::modalReparent(bool bVisible)
 
 if (!bVisible)
 {
-m_pQWidget->setParent(m_pParent ? m_pParent->asChild() : nullptr,
-  m_pQWidget->windowFlags());
+QWidget* pNewParent = m_pParent ? m_pParent->asChild() : nullptr;
+if (pNewParent != m_pQWidget->parent())
+m_pQWidget->setParent(pNewParent, m_pQWidget->windowFlags());
 return;
 }
 
-if (!QGuiApplication::modalWindow())
+const QWindow* pModalWin = QGuiApplication::modalWindow();
+if (!pModalWin || m_pParent->windowHandle() == pModalWin)
 return;
 
 QtInstance* pInst = static_cast(GetSalData()->m_pInstance);
 for (auto* pFrame : pInst->getFrames())
 {
-QWidget* pQWidget = static_cast(pFrame)->asChild();
-if (pQWidget->windowHandle() == QGuiApplication::modalWindow())
+QtFrame* pQtFrame = static_cast(pFrame);
+if (pQtFrame->windowHandle() == pModalWin)
 {
-m_pQWidget->setParent(pQWidget, m_pQWidget->windowFlags());
+QWidget* pNewParent = pQtFrame->asChild();
+if (pNewParent != m_pQWidget->parent())
+m_pQWidget->setParent(pNewParent, m_pQWidget->windowFlags());
 break;
 }
 }


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

2022-01-09 Thread Hossein (via logerrit)
 i18nlangtag/source/isolang/mslangid.cxx |   22 ++
 include/i18nlangtag/mslangid.hxx|3 +++
 sw/source/core/text/inftxt.cxx  |4 +++-
 3 files changed, 28 insertions(+), 1 deletion(-)

New commits:
commit 139ad1049ca65b279fe5e0b085bf2af039b62e19
Author: Hossein 
AuthorDate: Tue Jan 4 21:12:14 2022 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun Jan 9 13:22:00 2022 +0100

tdf#146084 Don't warn for languages without hyphenation

Upon opening a Writer document containing some languages that do not
use hyphen, an alert is created with the text:

'Missing hyphenation data Please install the hyphenation package for
locale "ab_CD".'

in which 'ab_CD' is the locale.

This patch removes the warning for these languages, that do not use
hyphenation:

* Arabic script languages (except Uighur)
 + Persian (Farsi)
 + Kashmiri
 + Kurdish (Central Kurdish and Southern Kurdish with Arabic script)
 + Punjabi
 + Sindhi
 + Malai
 + Somali
 + Swahili
 + Urdu
"Words are not hyphenated in Arabic language text, however hyphenation
is possible for Uighur text written in the Arabic script"
https://www.w3.org/International/i18n-tests/results/word-break-shaping
The list from MS documents is lenghty, but some of the languages are
were not available in LibreOffice, so they are ommited:
https://docs.microsoft.com/en-us/typography/script-development/arabic
There were languages like Hausa and Kanuri from Nigeria that use both
Latin and Arabic script, but only Latin script was listed in the
LibreOffice languages, so they were also ommited.

* CJK languages
 + Japanese
 + Korean
 + Chinese
 + Yue Chinese
"CJK languages differ from European languages in that there are no
hyphenation rules"
https://tug.org/TUGboat/tb25-0/cho.pdf

* Vietnamese
"In Vietnamese all words consist of single syllables, so they are
often very short; hyphenation is not allowed at all."
https://tug.org/TUGboat/tb29-1/tb91thanh-vntex.pdf
Hyphenation is declined in Vietnamese orthography since 1975
https://www.quora.com/When-did-hyphenation-decline-in-Vietnamese-orthography

The fix for Japanese (tdf#143422) was previously done in:
53df13371252874ec962dee4643168d26780 and the functionality is
preserverd with the current patch.

An alternate approach would be adding all the unicode scripts,
specifying the script for each langauge, and decide upon the script
(mostly) and not (only) the language.

More information about the hyphenation usage of many scripts can be
found in:
https://r12a.github.io/scripts/

This is the list of Unicode scripts:
https://unicode.org/standard/supported.html
https://en.wikipedia.org/wiki/Script_(Unicode)#List_of_scripts_in_Unicode

Change-Id: I7d2b4ee55a0893d1f0d1f9cd3b7cc037a49589b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126435
Tested-by: Jenkins
Reviewed-by: Eike Rathke 
(cherry picked from commit 151c56ed547490a99d912524c0e56b5d6d4a1939)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128082
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/i18nlangtag/source/isolang/mslangid.cxx 
b/i18nlangtag/source/isolang/mslangid.cxx
index 758a6e7aef3f..661bebcb6956 100644
--- a/i18nlangtag/source/isolang/mslangid.cxx
+++ b/i18nlangtag/source/isolang/mslangid.cxx
@@ -165,6 +165,28 @@ LanguageType MsLangId::resolveSystemLanguageByScriptType( 
LanguageType nLang, sa
 return nLang;
 }
 
+// static
+bool MsLangId::usesHyphenation(LanguageType nLang)
+{
+if (primary(nLang).anyOf(
+primary(LANGUAGE_ARABIC_PRIMARY_ONLY),
+primary(LANGUAGE_FARSI),
+primary(LANGUAGE_KASHMIRI),
+primary(LANGUAGE_KURDISH_ARABIC_IRAQ),
+primary(LANGUAGE_PUNJABI),
+primary(LANGUAGE_SINDHI),
+primary(LANGUAGE_USER_MALAY_ARABIC_MALAYSIA),
+primary(LANGUAGE_SOMALI),
+primary(LANGUAGE_SWAHILI),
+primary(LANGUAGE_URDU_PAKISTAN),
+primary(LANGUAGE_VIETNAMESE))
+|| isCJK(nLang))
+{
+return false;
+}
+return true;
+}
+
 
 // static
 css::lang::Locale MsLangId::Conversion::convertLanguageToLocale(
diff --git a/include/i18nlangtag/mslangid.hxx b/include/i18nlangtag/mslangid.hxx
index 4966fde852f3..aee1f23eb816 100644
--- a/include/i18nlangtag/mslangid.hxx
+++ b/include/i18nlangtag/mslangid.hxx
@@ -126,6 +126,9 @@ public:
 static LanguageType resolveSystemLanguageByScriptType( LanguageType nLang, 
sal_Int16 nType );
 
 
+/** Whether the language uses hyphenation. */
+static bool usesHyphenation( LanguageType nLang );
+
 /** Whether locale has a Right-To-Left orientation for text. */
 static bool isRightToLeft( LanguageType nLang );
 
diff --git a/sw

Re: No Full Screen in MacOS

2022-01-09 Thread Tor Lillqvist
> (A bug report would be a good start in any way with proper STR)

See for instance
https://bugs.documentfoundation.org/show_bug.cgi?id=103157 and the
bugs it points to.

The full-screen concept in LO and how it is or isn't connected to a
full-screen concept on each windowing environment is a mess. The core
problem is that the macOS concept of "full-screen" is not a state that
LibreOffice would have any API for. (Just expanding the window to be
as large as possible is not the same thing.)

LibreOffice has its own separate full-screen concept, with its own UI
to get out of it. Ideally, that should not exist on macOS but instead
the system full-screen concept should be used. (Differently on each
windowing system, and probably on Linux differently on GNOME and KDE,
for instance.)

But it is tedious work to implement and nobody has been
interested/funded to do it. And probably the LO UX people would want
to be involved, too. There was a quick and dirty attempt to take the
macOS real full-screen thing into use many years ago (2014 or so) but
it was buggy and was reverted. (That attempt is what the above
meta-bug's initial comment refers to with "as currently implemented".)

--tml


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

2022-01-09 Thread Julien Nabet (via logerrit)
 include/cppuhelper/TODO |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 652a7f1fce0daedee2efa1034ac6047dd49e206e
Author: Julien Nabet 
AuthorDate: Sun Jan 9 10:34:20 2022 +0100
Commit: Julien Nabet 
CommitDate: Sun Jan 9 12:40:20 2022 +0100

Add TODO in include/cppuhelper about compbase.hxx and compbase.hxx

Change-Id: If046e624d6fe5a711aec803652800a4a3830ec74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128181
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/include/cppuhelper/TODO b/include/cppuhelper/TODO
new file mode 100644
index ..3499e525d441
--- /dev/null
+++ b/include/cppuhelper/TODO
@@ -0,0 +1,3 @@
+compbase1.hxx, compbase2.hxx, ... are just there because they are part of the 
published API.
+In LO internals, we could just use compbase.hxx so it would allow us to make 
the compase.hxx deprecated
+See https://lists.freedesktop.org/archives/libreoffice/2022-January/088279.html


Re: No Full Screen in MacOS

2022-01-09 Thread Jan-Marek Glogowski

Hi,

On 09.01.22 09:21, ROHIT ROUT wrote:

Hello, I wanted to have a separate window on the side and keep it on
full screen. But it does not work like that. And if I try to do that
in some other way, it stops working.


This is the development mailing list. If you don't plan to work on a fix 
and need help for that, file a bug report at 
https://bugs.documentfoundation.org/ (A bug report would be a good start 
in any way with proper STR)


HTH


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

2022-01-09 Thread Jan-Marek Glogowski (via logerrit)
 vcl/qt5/QtFrame.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f7346dc88200fa2160d39b4e4b4ae31fcad59a8c
Author: Jan-Marek Glogowski 
AuthorDate: Sun Jan 9 01:01:49 2022 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Sun Jan 9 12:06:45 2022 +0100

Qt use platform-independent visibility functions

show() isn't just some conveniently renamed setVisible(true), but
presents a window in a platform-dependant way, which - at least
for WASM - means maximized and without a title bar. This is not
really expected and WASM can also use multiple windows.

Change-Id: I3fbaec1dfc2cd32bf3a90a94dcee01ebc88e58c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128179
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index 19d9c826f625..46f7a1a409ff 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -460,7 +460,7 @@ void QtFrame::Show(bool bVisible, bool bNoActivate)
 if (!bVisible) // hide
 {
 pSalInst->RunInMainThread([this]() {
-asChild()->hide();
+asChild()->setVisible(false);
 if (m_pQWidget->isModal())
 modalReparent(false);
 });
@@ -474,7 +474,7 @@ void QtFrame::Show(bool bVisible, bool bNoActivate)
 QWidget* const pChild = asChild();
 if (m_pQWidget->isModal())
 modalReparent(true);
-pChild->show();
+pChild->setVisible(true);
 pChild->raise();
 if (!bNoActivate && !isPopup())
 {


[Libreoffice-commits] core.git: desktop/CustomTarget_soffice.mk

2022-01-09 Thread Jan-Marek Glogowski (via logerrit)
 desktop/CustomTarget_soffice.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit b6feea0a84d34a2d74fcba499a48c5902f42200c
Author: Jan-Marek Glogowski 
AuthorDate: Sun Jan 9 01:09:48 2022 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Sun Jan 9 12:06:14 2022 +0100

soffice.sh depends on config_host.mk for the sed

Change-Id: Ifd2ab80fcbfa05ad606a88ac83f1f65dd1713490
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128180
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/desktop/CustomTarget_soffice.mk b/desktop/CustomTarget_soffice.mk
index 1fa356db16b3..d56f571628fe 100644
--- a/desktop/CustomTarget_soffice.mk
+++ b/desktop/CustomTarget_soffice.mk
@@ -14,6 +14,7 @@ $(call gb_CustomTarget_get_target,desktop/soffice) : \
 
 $(call gb_CustomTarget_get_workdir,desktop/soffice)/soffice.sh : \
$(SRCDIR)/desktop/scripts/soffice.sh \
+   $(BUILDDIR)/config_host.mk \
| $(call gb_CustomTarget_get_workdir,desktop/soffice)/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SED,1)
$(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),SED)


No Full Screen in MacOS

2022-01-09 Thread ROHIT ROUT
Hello,
I wanted to have a separate window on the side and keep it on full screen. But 
it does not work like that. And if I try to do that in some other way, it stops 
working.



Re: Question about cppuhelper/compbase and other compbase1/2/.../12

2022-01-09 Thread Julien Nabet

On 09/01/2022 07:27, Noel Grandin wrote:


Those are from the days before we had reliable 
variable-parameters-templates.


We can't remove them because they are part of the published API.


Thank you for your feedback.

So it means we could at least use of compbase.hxx internally, then put 
compbase.hxx in deprecated.


Julien