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

2023-11-04 Thread Noel Grandin (via logerrit)
 drawinglayer/source/primitive2d/GlowSoftEgdeShadowTools.cxx |   10 +-
 drawinglayer/source/primitive2d/glowprimitive2d.cxx |6 --
 drawinglayer/source/primitive2d/softedgeprimitive2d.cxx |4 
 3 files changed, 9 insertions(+), 11 deletions(-)

New commits:
commit cfd7cffb00f9f4ee934006a706184fefc8cb8d9d
Author: Noel Grandin 
AuthorDate: Fri Nov 3 10:12:57 2023 +0200
Commit: Noel Grandin 
CommitDate: Sun Nov 5 06:32:17 2023 +0100

tdf#158014 Skia adds filled white areas in .svg when exporting to PDF

So my strategy here is to assume that ProcessAndBlurAlphaMask
was doing the right thing before
commit 81994cb2b8b32453a92bcb011830fcb884f22ff3
Date:   Fri Apr 16 20:33:10 2021 +0200
Convert internal vcl bitmap formats transparency->alpha (II)
but the subsequent naiving changing of its logic undermines it
because of some subtle interaction.

So take the brute force approach of reverting most of the code
to its prior state (i.e. working in the transparency domain),
and doing an Invert() before and after the original code.

This seems to fix all of the test files I have on hand
for this situation for both Skia and non-Skia cases.

Change-Id: If4c4d4c5351a4ec55897bed96b57d28eda88f5dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158793
Tested-by: Jenkins
Reviewed-by: Patrick Luby 
Reviewed-by: Noel Grandin 

diff --git a/drawinglayer/source/primitive2d/GlowSoftEgdeShadowTools.cxx 
b/drawinglayer/source/primitive2d/GlowSoftEgdeShadowTools.cxx
index 298713517d2f..bcd5f779af79 100644
--- a/drawinglayer/source/primitive2d/GlowSoftEgdeShadowTools.cxx
+++ b/drawinglayer/source/primitive2d/GlowSoftEgdeShadowTools.cxx
@@ -33,9 +33,14 @@ namespace drawinglayer::primitive2d
 AlphaMask ProcessAndBlurAlphaMask(const Bitmap& rMask, double 
fErodeDilateRadius,
   double fBlurRadius, sal_uInt8 nTransparency, 
bool bConvertTo1Bit)
 {
+// Invert it to operate in the transparency domain. Trying to update this 
method to
+// work in the alpha domain is fraught with hazards.
+Bitmap tmpMask = rMask;
+tmpMask.Invert();
+
 // Only completely white pixels on the initial mask must be considered for 
transparency. Any
 // other color must be treated as black. This creates 1-bit B&W bitmap.
-BitmapEx mask(bConvertTo1Bit ? rMask.CreateMask(COL_BLACK) : rMask);
+BitmapEx mask(bConvertTo1Bit ? tmpMask.CreateMask(COL_WHITE) : tmpMask);
 
 // Scaling down increases performance without noticeable quality loss. 
Additionally,
 // current blur implementation can only handle blur radius between 2 and 
254.
@@ -71,6 +76,9 @@ AlphaMask ProcessAndBlurAlphaMask(const Bitmap& rMask, double 
fErodeDilateRadius
 
 mask.Scale(rMask.GetSizePixel());
 
+// And switch to the alpha domain.
+mask.Invert();
+
 return AlphaMask(mask.GetBitmap());
 }
 
diff --git a/drawinglayer/source/primitive2d/glowprimitive2d.cxx 
b/drawinglayer/source/primitive2d/glowprimitive2d.cxx
index c49ea68c9089..fb1a12fa1421 100644
--- a/drawinglayer/source/primitive2d/glowprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/glowprimitive2d.cxx
@@ -209,12 +209,6 @@ void GlowPrimitive2D::create2DDecomposition(
fDiscreteGlowRadius * 
fScale / 2.0,
255 - 
getGlowColor().GetAlpha()));
 
-// tdf#157502 and tdf#157652 invert alpha mask
-// Due to the switch from transparency to alpha in commit
-// 81994cb2b8b32453a92bcb011830fcb884f22ff3, invert the alpha
-// mask.
-mask.Invert();
-
 // The end result is the bitmap filled with glow color and blurred 
8-bit alpha mask
 Bitmap bmp(aAlpha.GetSizePixel(), vcl::PixelFormat::N24_BPP);
 bmp.Erase(getGlowColor());
diff --git a/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx 
b/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx
index bfd8ebf71656..87e60467f1ac 100644
--- a/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx
@@ -206,10 +206,6 @@ void SoftEdgePrimitive2D::create2DDecomposition(
 break;
 AlphaMask blurMask(drawinglayer::primitive2d::ProcessAndBlurAlphaMask(
 aMask, -fDiscreteSoftRadius * fScale, fDiscreteSoftRadius * 
fScale, 0));
-// tdf#157086 invert the blur mask instead of the alpha mask
-// An invert is needed to fix tdf#156808 but inverting the alpha mask
-// causes tdf#157086 so invert the blur mask instead.
-blurMask.Invert();
 aMask.BlendWith(blurMask);
 
 // The end result is the original bitmap with blurred 8-bit alpha mask


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

2023-11-04 Thread Marco Cecchetti (via logerrit)
 sfx2/source/view/lokhelper.cxx |2 -
 sfx2/source/view/viewsh.cxx|   46 -
 2 files changed, 24 insertions(+), 24 deletions(-)

New commits:
commit e6caece707a7d6f3a3e397e6213be9af6054f148
Author: Marco Cecchetti 
AuthorDate: Sat Nov 4 22:36:05 2023 +0100
Commit: Marco Cecchetti 
CommitDate: Sun Nov 5 05:07:58 2023 +0100

lok: a11y: corelog: removing log from LOKDocumentFocusListener

Change-Id: I0194cd4548dbb44f9efce4c53c790c3eec938524
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158940
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Marco Cecchetti 

diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 93f92e21c577..8ace83445ae0 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -325,7 +325,7 @@ void SfxLokHelper::setAccessibilityState(int nId, bool 
nEnabled)
 
 for (SfxViewShell* pViewShell : rViewArr)
 {
-if (pViewShell->GetViewShellId() == ViewShellId(nId))
+if (pViewShell && pViewShell->GetViewShellId() == ViewShellId(nId))
 {
 LOK_INFO("lok.a11y", "SfxLokHelper::setAccessibilityState: view 
id: " << nId << ", nEnabled: " << nEnabled);
 pViewShell->SetLOKAccessibilityState(nEnabled);
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index d4dc941151c6..7fd5f974ccc1 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -476,7 +476,7 @@ void aboutEvent(std::string msg, const 
accessibility::AccessibleEventObject& aEv
 
 if (xContext.is())
 {
-LOK_INFO("lok.a11y", msg << ": event id: " << aEvent.EventId
+SAL_INFO("lok.a11y", msg << ": event id: " << aEvent.EventId
 << "\n  xSource: " << xSource.get()
 << "\n  role: " << xContext->getAccessibleRole()
 << "\n  name: " << xContext->getAccessibleName()
@@ -487,13 +487,13 @@ void aboutEvent(std::string msg, const 
accessibility::AccessibleEventObject& aEv
 }
 else
 {
-LOK_INFO("lok.a11y", msg << ": event id: " << aEvent.EventId
+SAL_INFO("lok.a11y", msg << ": event id: " << aEvent.EventId
  << ", no accessible context!");
 }
 }
 else
 {
-LOK_INFO("lok.a11y", msg << ": event id: " << aEvent.EventId
+SAL_INFO("lok.a11y", msg << ": event id: " << aEvent.EventId
  << ", no accessible source!");
 }
 uno::Reference< accessibility::XAccessible > xOldValue;
@@ -524,7 +524,7 @@ void aboutEvent(std::string msg, const 
accessibility::AccessibleEventObject& aEv
 
 if (xContext.is())
 {
-LOK_INFO("lok.a11y", msg << ": "
+SAL_INFO("lok.a11y", msg << ": "
 << "\n  xNewValue: " << xNewValue.get()
 << "\n  role: " << xContext->getAccessibleRole()
 << "\n  name: " << xContext->getAccessibleName()
@@ -537,7 +537,7 @@ void aboutEvent(std::string msg, const 
accessibility::AccessibleEventObject& aEv
 }
 catch( const lang::IndexOutOfBoundsException& )
 {
-LOK_WARN("lok.a11y", "Focused object has invalid index in parent");
+SAL_WARN("lok.a11y", "Focused object has invalid index in parent");
 }
 }
 
@@ -937,7 +937,7 @@ void 
LOKDocumentFocusListener::notifyEditingInSelectionState(bool bParagraph)
 std::string aPayload = aStream.str();
 if (m_pViewShell)
 {
-LOK_INFO("lok.a11y", 
"LOKDocumentFocusListener::notifyEditingInSelectionState: payload: \n" << 
aPayload);
+SAL_INFO("lok.a11y", 
"LOKDocumentFocusListener::notifyEditingInSelectionState: payload: \n" << 
aPayload);
 
m_pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_A11Y_EDITING_IN_SELECTION_STATE,
 aPayload.c_str());
 }
 }
@@ -1350,7 +1350,7 @@ void LOKDocumentFocusListener::notifyEvent(const 
accessibility::AccessibleEventO
 aEvent.NewValue >>= nState;
 sal_Int64 nOldState = 
accessibility::AccessibleStateType::INVALID;
 aEvent.OldValue >>= nOldState;
-LOK_INFO("lok.a11y", "LOKDocumentFocusListener::notifyEvent: 
STATE_CHANGED: "
+SAL_INFO("lok.a11y", "LOKDocumentFocusListener::notifyEvent: 
STATE_CHANGED: "
  << " New State: " << 
stateSetToString(nState)
  << ", Old State: " << 
stateSetToString(nOldState));
 
@@ -1474,7 +1474,7 @@ void LOKDocumentFocusListener::notifyEvent(const 
accessibility::AccessibleEventO
 
 if (nNewPos >= 0)
 {
-LOK_INFO("lok.a11y", 
"LOKDocumentFocusListener::notifyEvent: CARET_CHANGED: "
+  

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

2023-11-04 Thread Mike Kaganski (via logerrit)
 fpicker/source/win32/VistaFilePicker.cxx |1 -
 fpicker/source/win32/shared.hxx  |   29 -
 2 files changed, 30 deletions(-)

New commits:
commit 2b84c860b591457da4c995435f9ca7ce5c7b3d23
Author: Mike Kaganski 
AuthorDate: Sun Nov 5 01:19:05 2023 +0300
Commit: Mike Kaganski 
CommitDate: Sun Nov 5 00:21:10 2023 +0100

shared.hxx is unused

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

diff --git a/fpicker/source/win32/VistaFilePicker.cxx 
b/fpicker/source/win32/VistaFilePicker.cxx
index dbd50307391c..743dcda5d080 100644
--- a/fpicker/source/win32/VistaFilePicker.cxx
+++ b/fpicker/source/win32/VistaFilePicker.cxx
@@ -22,7 +22,6 @@
 #include "VistaFilePicker.hxx"
 
 #include "WinImplHelper.hxx"
-#include "shared.hxx"
 
 #include 
 #include 
diff --git a/fpicker/source/win32/shared.hxx b/fpicker/source/win32/shared.hxx
deleted file mode 100644
index c47f6411e28b..
--- a/fpicker/source/win32/shared.hxx
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- 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 .
- */
-
-#pragma once
-
-#include 
-
-const OUStringLiteral BACKSLASH(u"\\");
-const OUStringLiteral 
FILTER_SEPARATOR(u"--");
-const OUStringLiteral ALL_FILES_WILDCARD(u"*.*");
-const bool ALLOW_DUPLICATES = true;
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2023-11-04 Thread Mike Kaganski (via logerrit)
 desktop/source/lib/init.cxx |   24 ++--
 1 file changed, 14 insertions(+), 10 deletions(-)

New commits:
commit 2bf894e91adf8783baaabc2203f7e97c4b8f3ca7
Author: Mike Kaganski 
AuthorDate: Sat Nov 4 17:53:47 2023 +0300
Commit: Mike Kaganski 
CommitDate: Sat Nov 4 20:06:26 2023 +0100

External data must be checked when parsed

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 92628177cb66..71eeabcbc380 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -542,34 +542,38 @@ RectangleAndPart RectangleAndPart::Create(const OString& 
rPayload)
 const char* pos = rPayload.getStr();
 const char* end = rPayload.getStr() + rPayload.getLength();
 tools::Long nLeft = rtl_str_toInt64_WithLength(pos, 10, end - pos);
-while( *pos != ',' )
+while (pos < end && *pos != ',')
+++pos;
+if (pos < end)
 ++pos;
-++pos;
 assert(pos < end);
 tools::Long nTop = rtl_str_toInt64_WithLength(pos, 10, end - pos);
-while( *pos != ',' )
+while (pos < end && *pos != ',')
+++pos;
+if (pos < end)
 ++pos;
-++pos;
 assert(pos < end);
 tools::Long nWidth = rtl_str_toInt64_WithLength(pos, 10, end - pos);
-while( *pos != ',' )
+while (pos < end && *pos != ',')
+++pos;
+if (pos < end)
 ++pos;
-++pos;
 assert(pos < end);
 tools::Long nHeight = rtl_str_toInt64_WithLength(pos, 10, end - pos);
 tools::Long nPart = INT_MIN;
 tools::Long nMode = 0;
 if (comphelper::LibreOfficeKit::isPartInInvalidation())
 {
-while( *pos != ',' )
+while (pos < end && *pos != ',')
+++pos;
+if (pos < end)
 ++pos;
-++pos;
 assert(pos < end);
 nPart = rtl_str_toInt64_WithLength(pos, 10, end - pos);
 
-while( *pos && *pos != ',' )
+while (pos < end && *pos != ',')
 ++pos;
-if (*pos)
+if (pos < end)
 {
 ++pos;
 assert(pos < end);


URL links in bundled template

2023-11-04 Thread Laurent Balland

Hello,

While I was updating "Grey Elegant" Impress template for bug 158022 [1], 
I noticed that


- on master page "Table of content", there are two URL links ([2] and 
[3]) for the credits of the illustration


- on last slide, there are two URL links ([4] and [5]) for the credits 
of the photo


[2] seems empty and [4] is a broken link. [3] and [5] look like 
commercial links


Shall we preserve them? "Vintage" Impress template uses meta.xml [6] to 
take care of such information.


Any opinion how we could deal with the credits used in bundled templates?

Best regards


Laurent


[1] https://bugs.documentfoundation.org/show_bug.cgi?id=158022

[2] https://icons8.com/illustrations/author/5ec7b0e101d0360016f3d1b3

[3] https://icons8.com/

[4] 
https://unsplash.com/@johnwestrock?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText


[5] 
https://unsplash.com/s/photos/landscape?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText


[6] 
https://opengrok.libreoffice.org/xref/core/extras/source/templates/presnt/Vintage/meta.xml?r=659acfbb#8


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

2023-11-04 Thread Mike Kaganski (via logerrit)
 desktop/source/lib/init.cxx | 1131 +---
 1 file changed, 548 insertions(+), 583 deletions(-)

New commits:
commit e14a55c9aa834c160e9a5c70f0de3b0635cde66f
Author: Mike Kaganski 
AuthorDate: Sat Nov 4 12:25:11 2023 +0300
Commit: Mike Kaganski 
CommitDate: Sat Nov 4 15:42:28 2023 +0100

LOK: Simplify a bit, and use more compile-time knowledge

Bring some C++20 goodness to LOK code: avoid lots of small memory
allocations when constructing OUString from ASCII char arrays;
use string lengths known at compile and run time; use safer and
cleaner syntax.

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index af2eba39876a..92628177cb66 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -261,8 +261,8 @@ namespace {
 
 struct ExtensionMap
 {
-const char *extn;
-const char *filterName;
+std::string_view extn;
+OUString filterName;
 };
 
 class TraceEventDumper : public AutoTimer
@@ -300,88 +300,81 @@ public:
 }
 };
 
-} // unnamed namespace
-
-static TraceEventDumper *traceEventDumper = nullptr;
-
-const ExtensionMap aWriterExtensionMap[] =
-{
-{ "doc",   "MS Word 97" },
-{ "docm",  "MS Word 2007 XML VBA" },
-{ "docx",  "MS Word 2007 XML" },
-{ "fodt",  "OpenDocument Text Flat XML" },
-{ "html",  "HTML (StarWriter)" },
-{ "odt",   "writer8" },
-{ "ott",   "writer8_template" },
-{ "pdf",   "writer_pdf_Export" },
-{ "epub",  "EPUB" },
-{ "rtf",   "Rich Text Format" },
-{ "txt",   "Text" },
-{ "xhtml", "XHTML Writer File" },
-{ "png",   "writer_png_Export" },
-{ "xml",   "writer_indexing_export" },
-{ nullptr, nullptr }
+TraceEventDumper *traceEventDumper = nullptr;
+
+constexpr ExtensionMap aWriterExtensionMap[] =
+{
+{ "doc",   u"MS Word 97"_ustr },
+{ "docm",  u"MS Word 2007 XML VBA"_ustr },
+{ "docx",  u"MS Word 2007 XML"_ustr },
+{ "fodt",  u"OpenDocument Text Flat XML"_ustr },
+{ "html",  u"HTML (StarWriter)"_ustr },
+{ "odt",   u"writer8"_ustr },
+{ "ott",   u"writer8_template"_ustr },
+{ "pdf",   u"writer_pdf_Export"_ustr },
+{ "epub",  u"EPUB"_ustr },
+{ "rtf",   u"Rich Text Format"_ustr },
+{ "txt",   u"Text"_ustr },
+{ "xhtml", u"XHTML Writer File"_ustr },
+{ "png",   u"writer_png_Export"_ustr },
+{ "xml",   u"writer_indexing_export"_ustr },
 };
 
-const ExtensionMap aCalcExtensionMap[] =
-{
-{ "csv",   "Text - txt - csv (StarCalc)" },
-{ "fods",  "OpenDocument Spreadsheet Flat XML" },
-{ "html",  "HTML (StarCalc)" },
-{ "ods",   "calc8" },
-{ "ots",   "calc8_template" },
-{ "pdf",   "calc_pdf_Export" },
-{ "xhtml", "XHTML Calc File" },
-{ "xls",   "MS Excel 97" },
-{ "xlsm",  "Calc MS Excel 2007 VBA XML" },
-{ "xlsx",  "Calc MS Excel 2007 XML" },
-{ "png",   "calc_png_Export" },
-{ nullptr, nullptr }
+constexpr ExtensionMap aCalcExtensionMap[] =
+{
+{ "csv",   u"Text - txt - csv (StarCalc)"_ustr },
+{ "fods",  u"OpenDocument Spreadsheet Flat XML"_ustr },
+{ "html",  u"HTML (StarCalc)"_ustr },
+{ "ods",   u"calc8"_ustr },
+{ "ots",   u"calc8_template"_ustr },
+{ "pdf",   u"calc_pdf_Export"_ustr },
+{ "xhtml", u"XHTML Calc File"_ustr },
+{ "xls",   u"MS Excel 97"_ustr },
+{ "xlsm",  u"Calc MS Excel 2007 VBA XML"_ustr },
+{ "xlsx",  u"Calc MS Excel 2007 XML"_ustr },
+{ "png",   u"calc_png_Export"_ustr },
 };
 
-const ExtensionMap aImpressExtensionMap[] =
-{
-{ "fodp",  "OpenDocument Presentation Flat XML" },
-{ "html",  "impress_html_Export" },
-{ "odg",   "impress8_draw" },
-{ "odp",   "impress8" },
-{ "otp",   "impress8_template" },
-{ "pdf",   "impress_pdf_Export" },
-{ "potm",  "Impress MS PowerPoint 2007 XML Template" },
-{ "pot",   "MS PowerPoint 97 Vorlage" },
-{ "pptm",  "Impress MS PowerPoint 2007 XML VBA" },
-{ "pptx",  "Impress MS PowerPoint 2007 XML" },
-{ "pps",   "MS PowerPoint 97 Autoplay" },
-{ "ppt",   "MS PowerPoint 97" },
-{ "svg",   "impress_svg_Export" },
-{ "xhtml", "XHTML Impress File" },
-{ "png",   "impress_png_Export"},
-{ nullptr, nullptr }
+constexpr ExtensionMap aImpressExtensionMap[] =
+{
+{ "fodp",  u"OpenDocument Presentation Flat XML"_ustr },
+{ "html",  u"impress_html_Export"_ustr },
+{ "odg",   u"impress8_draw"_ustr },
+{ "odp",   u"impress8"_ustr },
+{ "otp",   u"impress8_template"_ustr },
+{ "pdf",   u"impress_pdf_Export"_ustr },
+{ "potm",  u"Impress MS PowerPoint 2007 XML Template"_ustr },
+{ "pot",   u"MS PowerPoint 97 Vorlage"_ustr },
+{ "pptm",  u"Impress MS PowerPoint 2007 XML VBA"_ustr },
+{ "pptx",  u"Impress MS PowerPoint 2007 XML"_ustr },
+  

Re: Import of curved connectors from OOXML

2023-11-04 Thread Thorsten Behrens
Hi Regina,

Regina Henschel wrote:
> It is not an ODF problem.
> 
Oh ok - then what I implied, was instead of trying to emulate the
curvedConnector3 connector by mapping it to our existing ones, why not
implement the missing drawingml ones natively?

Cheers,

-- Thorsten

signature.asc
Description: PGP signature


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

2023-11-04 Thread Balazs Varga (via logerrit)
 cui/source/options/optgdlg.cxx  |   22 
 cui/source/options/optgdlg.hxx  |   10 +
 cui/uiconfig/ui/optlanguagespage.ui |  141 
 include/unotools/syslocaleoptions.hxx   |4 
 unotools/source/config/syslocaleoptions.cxx |   10 +
 5 files changed, 169 insertions(+), 18 deletions(-)

New commits:
commit 07590ff83e03077cf0d755f698b5b6bb36bb54d2
Author: Balazs Varga 
AuthorDate: Fri Nov 3 14:20:15 2023 +0100
Commit: Balazs Varga 
CommitDate: Sat Nov 4 10:58:42 2023 +0100

tdf#158001 - UI: Part 18 - Unify lockdown behavior of Options dialog

for Languages Page.

Change-Id: I3f4cf27980dd6d06da13f554feaca192ebd0b671
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158882
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index ee727e074e51..9e32e2fc9ea6 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1170,19 +1170,28 @@ 
OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* pPage, weld::DialogCon
 , m_xUserInterfaceLB(m_xBuilder->weld_combo_box("userinterface"))
 , m_xLocaleSettingFT(m_xBuilder->weld_label("localesettingFT"))
 , m_xLocaleSettingLB(new 
SvxLanguageBox(m_xBuilder->weld_combo_box("localesetting")))
+, m_xLocaleSettingImg(m_xBuilder->weld_widget("locklocalesetting"))
+, m_xDecimalSeparatorFT(m_xBuilder->weld_label("label6"))
 , m_xDecimalSeparatorCB(m_xBuilder->weld_check_button("decimalseparator"))
+, m_xDecimalSeparatorImg(m_xBuilder->weld_widget("lockdecimalseparator"))
 , m_xCurrencyFT(m_xBuilder->weld_label("defaultcurrency"))
 , m_xCurrencyLB(m_xBuilder->weld_combo_box("currencylb"))
+, m_xCurrencyImg(m_xBuilder->weld_widget("lockcurrencylb"))
 , m_xDatePatternsFT(m_xBuilder->weld_label("dataaccpatterns"))
 , m_xDatePatternsED(m_xBuilder->weld_entry("datepatterns"))
+, m_xDatePatternsImg(m_xBuilder->weld_widget("lockdatepatterns"))
 , m_xWesternLanguageLB(new 
SvxLanguageBox(m_xBuilder->weld_combo_box("westernlanguage")))
 , m_xWesternLanguageFT(m_xBuilder->weld_label("western"))
+, m_xWesternLanguageImg(m_xBuilder->weld_widget("lockwesternlanguage"))
 , m_xAsianLanguageLB(new 
SvxLanguageBox(m_xBuilder->weld_combo_box("asianlanguage")))
 , m_xComplexLanguageLB(new 
SvxLanguageBox(m_xBuilder->weld_combo_box("complexlanguage")))
 , m_xCurrentDocCB(m_xBuilder->weld_check_button("currentdoc"))
 , m_xAsianSupportCB(m_xBuilder->weld_check_button("asiansupport"))
+, m_xAsianSupportImg(m_xBuilder->weld_widget("lockasiansupport"))
 , m_xCTLSupportCB(m_xBuilder->weld_check_button("ctlsupport"))
+, m_xCTLSupportImg(m_xBuilder->weld_widget("lockctlsupport"))
 , 
m_xIgnoreLanguageChangeCB(m_xBuilder->weld_check_button("ignorelanguagechange"))
+, 
m_xIgnoreLanguageChangeImg(m_xBuilder->weld_widget("lockignorelanguagechange"))
 {
 // tdf#125483 save original default label
 m_sDecimalSeparatorLabel = m_xDecimalSeparatorCB->get_label();
@@ -1321,6 +1330,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* 
pPage, weld::DialogCon
 m_xAsianSupportCB->save_state();
 bool bReadonly = SvtCJKOptions::IsAnyReadOnly();
 m_xAsianSupportCB->set_sensitive(!bReadonly);
+m_xAsianSupportImg->set_visible(bReadonly);
 SupportHdl(*m_xAsianSupportCB);
 
 m_bOldCtl = SvtCTLOptions::IsCTLFontEnabled();
@@ -1328,6 +1338,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* 
pPage, weld::DialogCon
 m_xCTLSupportCB->save_state();
 bReadonly = 
pLangConfig->aCTLLanguageOptions.IsReadOnly(SvtCTLOptions::E_CTLFONT);
 m_xCTLSupportCB->set_sensitive(!bReadonly);
+m_xCTLSupportImg->set_visible(bReadonly);
 SupportHdl(*m_xCTLSupportCB);
 
 m_xIgnoreLanguageChangeCB->set_active( 
pLangConfig->aSysLocaleOptions.IsIgnoreLanguageChange() );
@@ -1633,12 +1644,20 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet* rSet 
)
 bool bReadonly = 
pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::EOption::Locale);
 m_xLocaleSettingLB->set_sensitive(!bReadonly);
 m_xLocaleSettingFT->set_sensitive(!bReadonly);
+m_xLocaleSettingImg->set_visible(bReadonly);
 
 
 m_xDecimalSeparatorCB->set_active( 
pLangConfig->aSysLocaleOptions.IsDecimalSeparatorAsLocale());
+bReadonly = 
pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::EOption::DecimalSeparator);
+m_xDecimalSeparatorCB->set_sensitive(!bReadonly);
+m_xDecimalSeparatorFT->set_sensitive(!bReadonly);
+m_xDecimalSeparatorImg->set_visible(bReadonly);
 m_xDecimalSeparatorCB->save_state();
 
 m_xIgnoreLanguageChangeCB->set_active( 
pLangConfig->aSysLocaleOptions.IsIgnoreLanguageChange());
+bReadonly = 
pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::EOption::IgnoreLanguageChange);
+m_xIgnoreLanguageChangeCB->set_sensitive(!

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

2023-11-04 Thread Balazs Varga (via logerrit)
 cui/uiconfig/ui/optlanguagespage.ui |  266 ++--
 1 file changed, 133 insertions(+), 133 deletions(-)

New commits:
commit 918f2663e8668ef4f15157e50d6de402a2b30eda
Author: Balazs Varga 
AuthorDate: Fri Nov 3 11:16:49 2023 +0100
Commit: Balazs Varga 
CommitDate: Sat Nov 4 10:58:24 2023 +0100

resave with newer glade version

Change-Id: I8c11067d813c2331e5f9ceae1cb780c73b45e0f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158881
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/cui/uiconfig/ui/optlanguagespage.ui 
b/cui/uiconfig/ui/optlanguagespage.ui
index 121ba38e4f6c..71b8b8c6fdd1 100644
--- a/cui/uiconfig/ui/optlanguagespage.ui
+++ b/cui/uiconfig/ui/optlanguagespage.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -32,47 +32,47 @@
   
 
   
-  
+  
   
 True
-False
-6
-12
+False
+6
+12
 
   
 True
-False
+False
 True
-0
-none
+0
+none
 
-  
+  
   
 True
-False
-True
-6
-12
+False
 12
 6
+True
+6
+12
 
   
 True
-False
+False
 _User interface:
-True
-userinterface
+True
+userinterface
 0
   
   
-0
-0
+0
+0
   
 
 
   
 True
-False
+False
 start
 True
 
@@ -82,8 +82,8 @@
 
   
   
-1
-0
+1
+0
   
 
   
@@ -91,7 +91,7 @@
 
   
 True
-False
+False
 Language Of
 
   
@@ -100,36 +100,36 @@
 
   
   
-0
-0
+0
+0
   
 
 
   
 True
-False
+False
 True
-0
-none
+0
+none
 
-  
+  
   
 True
-False
-True
-6
-12
+False
 12
 6
+True
+6
+12
 
   
 True
-False
+False
 start
 True
 liststore1
-0
-1
+0
+1
 
   
   
@@ -149,19 +149,19 @@
 
   
   
-1
-0
+1
+0
   
 
 
   
 True
-False
+False
 start
 True
 liststore2
-0
-1
+0
+1
 
   
   
@@ -181,19 +181,19 @@
 
   
   
-1
-1
+1
+1
   
 
 
   
 True
-False
+False
 start
 True
 liststore3
-0
-1
+0
+1
 
   
   
@@ -213,19 +213,19 @@
 
   
   
-1
-2
+1
+2
   
 
 
   
 For the current document only
 True
-True
-False
+True
+False
 start
-True
-True
+True
+True
 
   
 Specifies that the 
settings for default languages are valid only for the current 
document.
@@ -233,18 +233,18 @@
 
   
   
-1
-3
+1
+3
   
 
 
   
 Complex _text layout:
 True
-True
-False
-True
-True
+True
+False
+True
+True
 
   
  

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

2023-11-04 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/compat.hxx  |   11 +++
 compilerplugins/clang/external.cxx|3 ++-
 compilerplugins/clang/externandnotdefined.cxx |3 ++-
 compilerplugins/clang/plugin.cxx  |2 +-
 compilerplugins/clang/redundantinline.cxx |3 ++-
 compilerplugins/clang/unreffun.cxx|3 ++-
 6 files changed, 20 insertions(+), 5 deletions(-)

New commits:
commit 5323c18753504ae99e271f98052b13271343de6f
Author: Stephan Bergmann 
AuthorDate: Fri Nov 3 22:42:51 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Sat Nov 4 09:51:18 2023 +0100

Adapt to Clang 18 trunk Linkage rework



"[clang][NFC] Refactor clang::Linkage"

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

diff --git a/compilerplugins/clang/compat.hxx b/compilerplugins/clang/compat.hxx
index 21a3c4ae4018..df4052ef108a 100644
--- a/compilerplugins/clang/compat.hxx
+++ b/compilerplugins/clang/compat.hxx
@@ -91,6 +91,17 @@ constexpr clang::ElaboratedTypeKeyword None = 
clang::ETK_None;
 #endif
 }
 
+namespace Linkage
+{
+#if CLANG_VERSION >= 18
+constexpr clang::Linkage External = clang::Linkage::External;
+constexpr clang::Linkage Module = clang::Linkage::Module;
+#else
+constexpr clang::Linkage External = clang::ExternalLinkage;
+constexpr clang::Linkage Module = clang::ModuleLinkage;
+#endif
+}
+
 inline bool EvaluateAsInt(clang::Expr const * expr, llvm::APSInt& intRes, 
const clang::ASTContext& ctx) {
 clang::Expr::EvalResult res;
 bool b = expr->EvaluateAsInt(res, ctx);
diff --git a/compilerplugins/clang/external.cxx 
b/compilerplugins/clang/external.cxx
index de2b51ff82bc..8c8733553907 100644
--- a/compilerplugins/clang/external.cxx
+++ b/compilerplugins/clang/external.cxx
@@ -17,6 +17,7 @@
 #include "clang/Sema/SemaDiagnostic.h"
 
 #include "check.hxx"
+#include "compat.hxx"
 #include "plugin.hxx"
 
 namespace
@@ -468,7 +469,7 @@ private:
 {
 return true;
 }
-if (decl->getLinkageInternal() < ModuleLinkage)
+if (decl->getLinkageInternal() < compat::Linkage::Module)
 {
 return true;
 }
diff --git a/compilerplugins/clang/externandnotdefined.cxx 
b/compilerplugins/clang/externandnotdefined.cxx
index 5fd59ca4b58c..5d8803a6faaa 100644
--- a/compilerplugins/clang/externandnotdefined.cxx
+++ b/compilerplugins/clang/externandnotdefined.cxx
@@ -11,6 +11,7 @@
 
 #include 
 
+#include "compat.hxx"
 #include "plugin.hxx"
 
 // Having an extern prototype for a method in a module and not actually 
declaring that method is dodgy.
@@ -35,7 +36,7 @@ bool ExternAndNotDefined::VisitFunctionDecl(const 
FunctionDecl * functionDecl) {
 }
 if (functionDecl->isDefined() || functionDecl->isPure()
   || (functionDecl->getLinkageAndVisibility().getLinkage()
-  != ExternalLinkage)) {
+  != compat::Linkage::External)) {
 return true;
 }
 //TODO, filtering out anything template for now:
diff --git a/compilerplugins/clang/plugin.cxx b/compilerplugins/clang/plugin.cxx
index e2d4d7fbf0a4..10102d426079 100644
--- a/compilerplugins/clang/plugin.cxx
+++ b/compilerplugins/clang/plugin.cxx
@@ -1013,7 +1013,7 @@ int derivedFromCount(QualType subclassQt, QualType 
baseclassQt)
 // a variable declared in an 'extern "..." {...}'-style linkage-specification 
as
 // if it contained the 'extern' specifier:
 bool hasExternalLinkage(VarDecl const * decl) {
-if (decl->getLinkageAndVisibility().getLinkage() != ExternalLinkage) {
+if (decl->getLinkageAndVisibility().getLinkage() != 
compat::Linkage::External) {
 return false;
 }
 for (auto ctx = decl->getLexicalDeclContext();
diff --git a/compilerplugins/clang/redundantinline.cxx 
b/compilerplugins/clang/redundantinline.cxx
index 1172dfec33d3..962a11ed6037 100644
--- a/compilerplugins/clang/redundantinline.cxx
+++ b/compilerplugins/clang/redundantinline.cxx
@@ -10,6 +10,7 @@
 
 #include 
 
+#include "compat.hxx"
 #include "plugin.hxx"
 
 namespace {
@@ -141,7 +142,7 @@ private:
 }
 
 bool handleNonExternalLinkage(FunctionDecl const * decl) {
-if (decl->getLinkageInternal() >= ModuleLinkage) {
+if (decl->getLinkageInternal() >= compat::Linkage::Module) {
 return false;
 }
 if (!compiler.getSourceManager().isInMainFile(decl->getLocation())) {
diff --git a/compilerplugins/clang/unreffun.cxx 
b/compilerplugins/clang/unreffun.cxx
index 353eee5f0b31..fcb6f04016b7 100644
--- a/compilerplugins/clang/unreffun.cxx
+++ b/compilerplugins/clang/unreffun.cxx
@@ -16,6 +16,7 @@
 #include "clang/AST/Attr.h"
 #include "clang/Sema/SemaInternal.h" // warn_unused_function
 
+#include "compat.hxx"
 #include "plugin.hxx"
 
 namespace {
@@ -152,7 +153,7 @@ bool Unre