Re: Where to put a static method for common use in oox?

2022-12-01 Thread Tomaž Vajngerl
Hi Regina,

On Fri, Dec 2, 2022 at 8:39 AM Regina Henschel 
wrote:

> Hi all,
>
> I'm going to implement generating Fontwork shapes in import of docx (bug
> 125884). Thereby I have noticed, that the method
>
> static void
> lcl_putCustomShapeIntoTextPathMode(const
> uno::Reference& xShape,
> const CustomShapePropertiesPtr&
> pCustomShapePropertiesPtr,
> const TextBodyPtr& pTextBody)
>
> from oox/source/drawingml/shape.cxx
> is usable in /oox/source/shape/WpsContext.cxx too, where the import of
> docx happens.
>
> Where can/should I put the method, so that it is usable in both files?
>

You can just rename it to "putCustomShapeIntoTextPathMode" and add it to
shape.hxx (stand alone function not part of any class). WpsContext.cxx
already includes oox/drawingml/shape.hxx so you can just use it.


> Kind regards,
> Regina
>

Tomaž


Where to put a static method for common use in oox?

2022-12-01 Thread Regina Henschel

Hi all,

I'm going to implement generating Fontwork shapes in import of docx (bug 
125884). Thereby I have noticed, that the method


static void
lcl_putCustomShapeIntoTextPathMode(const 
uno::Reference& xShape,
   const CustomShapePropertiesPtr& 
pCustomShapePropertiesPtr,

   const TextBodyPtr& pTextBody)

from oox/source/drawingml/shape.cxx
is usable in /oox/source/shape/WpsContext.cxx too, where the import of 
docx happens.


Where can/should I put the method, so that it is usable in both files?

Kind regards,
Regina


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

2022-12-01 Thread Justin Luth (via logerrit)
 sw/inc/textcontentcontrol.hxx |2 ++
 sw/qa/core/data/docm/testModernVBA.docm   |binary
 sw/source/core/txtnode/attrcontentcontrol.cxx |   14 ++
 sw/source/ui/vba/vbacontentcontrol.cxx|5 ++---
 4 files changed, 18 insertions(+), 3 deletions(-)

New commits:
commit 982f9ec1e07364e317fbcd25f1ef06f984cc0ce8
Author: Justin Luth 
AuthorDate: Wed Nov 23 18:12:20 2022 -0500
Commit: Justin Luth 
CommitDate: Thu Dec 1 21:32:05 2022 +0100

tdf#151548 ContentControls: Add Delete()

Needed a function to delete a control,
so it seemed to make sense to include it here.

[I saw a nice bExact flag, but it doesn't work because
 RES_TXTATTR_CONTENTCONTROLS is outside of a certain
 range. Oh well.]

make CppunitTest_sw_macros_test CPPUNIT_TEST_NAME=testVba

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

diff --git a/sw/inc/textcontentcontrol.hxx b/sw/inc/textcontentcontrol.hxx
index a9bc4e4a1054..3fb7ea124b99 100644
--- a/sw/inc/textcontentcontrol.hxx
+++ b/sw/inc/textcontentcontrol.hxx
@@ -41,6 +41,8 @@ public:
 
 void ChgTextNode(SwTextNode* pNode);
 
+void Delete(bool bSaveContents);
+
 SwTextNode* GetTextNode() const;
 /// Get the current (potentially invalid) string from the doc
 OUString ToString() const;
diff --git a/sw/qa/core/data/docm/testModernVBA.docm 
b/sw/qa/core/data/docm/testModernVBA.docm
index dd96686659ca..be7d99a24b84 100644
Binary files a/sw/qa/core/data/docm/testModernVBA.docm and 
b/sw/qa/core/data/docm/testModernVBA.docm differ
diff --git a/sw/source/core/txtnode/attrcontentcontrol.cxx 
b/sw/source/core/txtnode/attrcontentcontrol.cxx
index e3d0c2237b3b..890bf20c1376 100644
--- a/sw/source/core/txtnode/attrcontentcontrol.cxx
+++ b/sw/source/core/txtnode/attrcontentcontrol.cxx
@@ -675,6 +675,20 @@ void SwTextContentControl::ChgTextNode(SwTextNode* pNode)
 }
 }
 
+void SwTextContentControl::Delete(bool bSaveContents)
+{
+if (!GetTextNode())
+return;
+
+if (bSaveContents)
+GetTextNode()->RstTextAttr(GetStart(), *End() - GetStart(), 
RES_TXTATR_CONTENTCONTROL);
+else
+{
+SwPaM aPaM(*GetTextNode(), GetStart(), *GetTextNode(), *End());
+
GetTextNode()->GetDoc().getIDocumentContentOperations().DeleteAndJoin(aPaM);
+}
+}
+
 SwTextNode* SwTextContentControl::GetTextNode() const
 {
 auto& rFormatContentControl = static_cast(GetAttr());
diff --git a/sw/source/ui/vba/vbacontentcontrol.cxx 
b/sw/source/ui/vba/vbacontentcontrol.cxx
index d75ce84d7f4a..da3f3ec6f4ee 100644
--- a/sw/source/ui/vba/vbacontentcontrol.cxx
+++ b/sw/source/ui/vba/vbacontentcontrol.cxx
@@ -676,15 +676,14 @@ void SwVbaContentControl::Cut()
 SAL_INFO("sw.vba",
  "SwVbaContentControl::Cut[" << getID() << "], but missing sending 
to clipboard");
 
-Delete(uno::Any(false));
+m_rCC.Delete(/*bSaveContents=*/false);
 }
 
 void SwVbaContentControl::Delete(const uno::Any& DeleteContents)
 {
 bool bDeleteContents = false;
 DeleteContents >>= bDeleteContents;
-SAL_INFO("sw.vba", "SwVbaContentControl::Delete[" << DeleteContents << "] 
stub");
-//m_rCC.ChgTextNode(nullptr); // works, but crashes on UI touch - probably 
requires invalidation
+m_rCC.Delete(!bDeleteContents);
 }
 
 void SwVbaContentControl::SetCheckedSymbol(sal_Int32 Character, const 
uno::Any& Font)


[Libreoffice-commits] core.git: include/toolkit include/unotools include/vbahelper toolkit/inc ucb/source unotools/source

2022-12-01 Thread Noel Grandin (via logerrit)
 include/toolkit/awt/vclxwindows.hxx   |4 +---
 include/unotools/eventlisteneradapter.hxx |2 --
 include/vbahelper/vbadialogbase.hxx   |3 +--
 toolkit/inc/helper/msgbox.hxx |3 +--
 ucb/source/cacher/dynamicresultsetwrapper.hxx |1 -
 ucb/source/ucp/webdav-curl/DAVSession.hxx |3 +--
 unotools/source/ucbhelper/XTempFile.hxx   |2 +-
 7 files changed, 5 insertions(+), 13 deletions(-)

New commits:
commit 224fc966096e9fc52d8e41fbae211e3999edd945
Author: Noel Grandin 
AuthorDate: Thu Dec 1 15:41:29 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Dec 1 21:28:53 2022 +0100

loplugin:unusedfields make some fields private

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

diff --git a/include/toolkit/awt/vclxwindows.hxx 
b/include/toolkit/awt/vclxwindows.hxx
index 677186367a87..bffddf6fd63e 100644
--- a/include/toolkit/awt/vclxwindows.hxx
+++ b/include/toolkit/awt/vclxwindows.hxx
@@ -437,11 +437,9 @@ public:
 
 class SVTXFormattedField : public VCLXSpinField
 {
-protected:
 rtl::Reference m_xCurrentSupplier;
 boolbIsStandardSupplier;
-
-sal_Int32   nKeyToSetDelayed;
+sal_Int32   nKeyToSetDelayed;
 
 public:
 SVTXFormattedField();
diff --git a/include/unotools/eventlisteneradapter.hxx 
b/include/unotools/eventlisteneradapter.hxx
index 92fbe212c586..f3d9ede9cd45 100644
--- a/include/unotools/eventlisteneradapter.hxx
+++ b/include/unotools/eventlisteneradapter.hxx
@@ -40,11 +40,9 @@ namespace utl
 {
 friend class OEventListenerImpl;
 
-private:
 OEventListenerAdapter( const OEventListenerAdapter& _rSource ) = 
delete;
 const OEventListenerAdapter& operator=( const OEventListenerAdapter& 
_rSource ) = delete;
 
-protected:
 std::unique_ptr  m_pImpl;
 
 protected:
diff --git a/include/vbahelper/vbadialogbase.hxx 
b/include/vbahelper/vbadialogbase.hxx
index 751429cd4531..e56a27e08282 100644
--- a/include/vbahelper/vbadialogbase.hxx
+++ b/include/vbahelper/vbadialogbase.hxx
@@ -45,9 +45,8 @@ typedef InheritedHelperInterfaceWeakImpl< ov::XDialogBase > 
VbaDialogBase_BASE;
 
 class VBAHELPER_DLLPUBLIC VbaDialogBase : public VbaDialogBase_BASE
 {
-protected:
 sal_Int32 mnIndex;
-css::uno::Reference< css::frame::XModel > m_xModel;
+css::uno::Reference< css::frame::XModel > m_xModel;
 public:
 VbaDialogBase( const css::uno::Reference< ov::XHelperInterface >& xParent, 
const css::uno::Reference< css::uno::XComponentContext >& xContext, 
css::uno::Reference< css::frame::XModel > xModel, sal_Int32 nIndex 
):VbaDialogBase_BASE( xParent, xContext ), mnIndex( nIndex ), 
m_xModel(std::move( xModel )) {}
 
diff --git a/toolkit/inc/helper/msgbox.hxx b/toolkit/inc/helper/msgbox.hxx
index 9259719ce3a2..7c2b26ee1e89 100644
--- a/toolkit/inc/helper/msgbox.hxx
+++ b/toolkit/inc/helper/msgbox.hxx
@@ -53,10 +53,9 @@ class MessBox : public ButtonDialog
 Image maImage;
 bool mbHelpBtn;
 MessBoxStyle mnMessBoxStyle;
-
-protected:
 OUString maMessText;
 
+protected:
 void ImplInitButtons();
 void ImplPosControls();
 
diff --git a/ucb/source/cacher/dynamicresultsetwrapper.hxx 
b/ucb/source/cacher/dynamicresultsetwrapper.hxx
index 8f9c0473f072..c6a363cff796 100644
--- a/ucb/source/cacher/dynamicresultsetwrapper.hxx
+++ b/ucb/source/cacher/dynamicresultsetwrapper.hxx
@@ -149,7 +149,6 @@ class DynamicResultSetWrapperListener
 : public cppu::OWeakObject
 , public css::ucb::XDynamicResultSetListener
 {
-protected:
 DynamicResultSetWrapper*m_pOwner;
 osl::Mutex  m_aMutex;
 
diff --git a/ucb/source/ucp/webdav-curl/DAVSession.hxx 
b/ucb/source/ucp/webdav-curl/DAVSession.hxx
index 6a4b65cdc41c..b73ceb561357 100644
--- a/ucb/source/ucp/webdav-curl/DAVSession.hxx
+++ b/ucb/source/ucp/webdav-curl/DAVSession.hxx
@@ -177,14 +177,13 @@ public:
 virtual void abort() = 0;
 
 protected:
-rtl::Reference< DAVSessionFactory > m_xFactory;
-
 explicit DAVSession( rtl::Reference< DAVSessionFactory > xFactory )
 : m_xFactory(std::move( xFactory )), m_nRefCount( 0 ) {}
 
 virtual ~DAVSession() {}
 
 private:
+rtl::Reference< DAVSessionFactory > m_xFactory;
 DAVSessionFactory::Map::iterator m_aContainerIt;
 oslInterlockedCount m_nRefCount;
 
diff --git a/unotools/source/ucbhelper/XTempFile.hxx 
b/unotools/source/ucbhelper/XTempFile.hxx
index b439068d99ac..2b0ec33cb42a 100644
--- a/unotools/source/ucbhelper/XTempFile.hxx
+++ b/unotools/source/ucbhelper/XTempFile.hxx
@@ -48,7 +48,6 @@ typedef ::cppu::WeakImplHelper< css::io::XTempFile
 
 class OTempFileService : public OTempFileBase
 {
-protected:
 std::optional mpTempFile;
 std::mutex maMutex;
 SvStream* mpStream;
@@ -56,6 +55,7 @@ protected:
 bool 

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

2022-12-01 Thread Noel Grandin (via logerrit)
 chart2/source/inc/chartview/DrawModelWrapper.hxx |2 
 chart2/source/view/main/ChartItemPool.cxx|   43 
 chart2/source/view/main/ChartItemPool.hxx|8 +--
 chart2/source/view/main/DrawModelWrapper.cxx |   29 ++
 sw/inc/undobj.hxx|3 -
 sw/inc/unoframe.hxx  |5 +
 sw/inc/unotbl.hxx|2 
 sw/source/core/access/acctable.hxx   |   10 ++-
 sw/source/core/inc/SwXMLTextBlocks.hxx   |4 -
 sw/source/core/inc/unocontentcontrol.hxx |4 -
 sw/source/filter/html/parcss1.hxx|1 
 sw/source/filter/ww8/docxattributeoutput.hxx |   18 +++---
 sw/source/filter/ww8/ww8attributeoutput.hxx  |   61 +++
 sw/source/filter/ww8/ww8par.hxx  |2 
 sw/source/filter/xml/xmlexpit.hxx|2 
 sw/source/filter/xml/xmlimpit.hxx|1 
 sw/source/uibase/inc/numfmtlb.hxx|1 
 17 files changed, 90 insertions(+), 106 deletions(-)

New commits:
commit 8e33793d72a0561ebcf19ca22df814bb347813b7
Author: Noel Grandin 
AuthorDate: Thu Dec 1 15:37:26 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Dec 1 21:28:36 2022 +0100

loplugin:unusedfields make some fields private

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

diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index ab3fb876302e..f95a3aa78bfc 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -257,13 +257,12 @@ class SwUndoInserts : public SwUndo, public SwUndRng, 
private SwUndoSaveContent
 std::vector< std::shared_ptr > m_FlyUndos;
 std::unique_ptr m_pRedlineData;
 SwNodeOffset m_nDeleteTextNodes;
-
-protected:
 SwNodeOffset m_nNodeDiff;
 /// start of Content in UndoNodes for Redo
 std::optional m_oUndoNodeIndex;
 sal_uInt16 m_nSetPos; // Start in the history list.
 
+protected:
 SwUndoInserts( SwUndoId nUndoId, const SwPaM& );
 public:
 virtual ~SwUndoInserts() override;
diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx
index e1b1425f103c..e87cb87e0675 100644
--- a/sw/inc/unoframe.hxx
+++ b/sw/inc/unoframe.hxx
@@ -76,11 +76,12 @@ private:
 sal_Int64   m_nVisibleAreaWidth;
 sal_Int64   m_nVisibleAreaHeight;
 css::uno::Reference m_xParentText;
+css::uno::Reference< css::beans::XPropertySet > mxStyleData;
+css::uno::Reference< css::container::XNameAccess >  mxStyleFamily;
+
 void DisposeInternal();
 
 protected:
-css::uno::Reference< css::beans::XPropertySet > mxStyleData;
-css::uno::Reference< css::container::XNameAccess >  mxStyleFamily;
 virtual void Notify(const SfxHint&) override;
 
 virtual ~SwXFrame() override;
diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx
index 178989fbaefc..fb02bfb9f9d1 100644
--- a/sw/inc/unotbl.hxx
+++ b/sw/inc/unotbl.hxx
@@ -194,6 +194,7 @@ class SW_DLLPUBLIC SwXTextTableCursor final
 {
 SwFrameFormat* m_pFrameFormat;
 const SfxItemPropertySet* m_pPropSet;
+sw::UnoCursorPointer m_pUnoCursor;
 
 public:
 SwXTextTableCursor(SwFrameFormat* pFormat, SwTableBox const* pBox);
@@ -237,7 +238,6 @@ public:
 
 const SwUnoCursor&GetCursor() const;
 SwUnoCursor&  GetCursor();
-sw::UnoCursorPointer m_pUnoCursor;
 SwFrameFormat* GetFrameFormat() const { return m_pFrameFormat; }
 };
 
diff --git a/sw/source/core/access/acctable.hxx 
b/sw/source/core/access/acctable.hxx
index 4b3dd87938e0..ce3f12b64093 100644
--- a/sw/source/core/access/acctable.hxx
+++ b/sw/source/core/access/acctable.hxx
@@ -46,6 +46,11 @@ class SwAccessibleTable :
 {
 std::unique_ptr mpTableData;// the table's 
data, protected by SolarMutex
 OUString m_sDesc;
+typedef std::vector< std::pair > > Cells_t;
+Cells_t m_vecCellAdd;
+Cells_t m_vecCellRemove;
+
 const SwSelBoxes *GetSelBoxes() const;
 
 void FireTableChangeEvent( const SwAccessibleTableData_Impl& rTableData );
@@ -213,10 +218,7 @@ public:
 
 // XAccessibleComponent
 sal_Int32 SAL_CALL getBackground() override;
-typedef std::vector< std::pair > > Cells_t;
-Cells_t m_vecCellAdd;
-Cells_t m_vecCellRemove;
+
 void FireSelectionEvent( );
 void AddSelectionCell(SwAccessibleContext*, bool bAddOrRemove);
 };
diff --git a/sw/source/core/inc/SwXMLTextBlocks.hxx 
b/sw/source/core/inc/SwXMLTextBlocks.hxx
index 9132b5993e8f..05a97ded5942 100644
--- a/sw/source/core/inc/SwXMLTextBlocks.hxx
+++ b/sw/source/core/inc/SwXMLTextBlocks.hxx
@@ -44,6 +44,8 @@ class SwXMLTextBlocks final : public SwImpBlocks
 SwXmlFlags  m_nFlags;
 OUStringm_aPackageName;
 tools::SvRef m_xMedium;
+css::uno::Reference < css::embed::XStorage > m_xBl

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

2022-12-01 Thread Xisco Fauli (via logerrit)
 sc/IwyuFilter_sc.yaml   |9 -
 sc/qa/unit/bugfix-test.cxx  |3 ---
 sc/qa/unit/chart2dataprovider.cxx   |1 -
 sc/qa/unit/dataproviders_test.cxx   |1 -
 sc/qa/unit/filters-test.cxx |   11 ---
 sc/qa/unit/helper/qahelper.cxx  |   15 ---
 sc/qa/unit/subsequent_export_test.cxx   |5 -
 sc/qa/unit/subsequent_export_test2.cxx  |5 -
 sc/qa/unit/subsequent_filters_test2.cxx |2 --
 9 files changed, 52 deletions(-)

New commits:
commit 88397d5cce34bf24fdb90f60befcc48dd4616187
Author: Xisco Fauli 
AuthorDate: Thu Dec 1 15:50:22 2022 +0100
Commit: Xisco Fauli 
CommitDate: Thu Dec 1 21:27:48 2022 +0100

sc: remove unused includes

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

diff --git a/sc/IwyuFilter_sc.yaml b/sc/IwyuFilter_sc.yaml
index 956bf6ad9c4c..35a1ad9828d7 100644
--- a/sc/IwyuFilter_sc.yaml
+++ b/sc/IwyuFilter_sc.yaml
@@ -378,9 +378,6 @@ excludelist:
 sc/qa/unit/screenshots/screenshots.cxx:
 # Needed for template
 - sfx2/sfxdlg.hxx
-sc/qa/unit/subsequent_filters-test.cxx:
-# Actually used
-- comphelper/scopeguard.hxx
 sc/qa/unit/subsequent_export_test.cxx:
 # Actually used
 - comphelper/scopeguard.hxx
@@ -396,9 +393,6 @@ excludelist:
 # base class has to be a complete type
 - com/sun/star/lang/XServiceInfo.hpp
 - com/sun/star/sheet/XResultListener.hpp
-sc/source/core/inc/arraysumfunctor.hxx:
-# Needed for uintptr_t
-- cstdint
 sc/source/core/opencl/formulagroupcl.cxx:
 # Needed for implicit dtor in inverseMatrix()
 - scmatrix.hxx
@@ -573,9 +567,6 @@ excludelist:
 # base class has to be a complete type
 - com/sun/star/lang/XServiceInfo.hpp
 - com/sun/star/ui/XUIElementFactory.hpp
-sc/source/ui/vba/service.hxx:
-# Used in extern declaration
-- namespace comphelper::service_decl { class ServiceDecl; } }
 sc/source/ui/vba/vbaassistant.hxx:
 # base class has to be a complete type
 - ooo/vba/XAssistant.hpp
diff --git a/sc/qa/unit/bugfix-test.cxx b/sc/qa/unit/bugfix-test.cxx
index fb8137d4099b..10bfd7199a67 100644
--- a/sc/qa/unit/bugfix-test.cxx
+++ b/sc/qa/unit/bugfix-test.cxx
@@ -15,11 +15,8 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include "helper/qahelper.hxx"
-#include 
-#include 
 #include 
 #include 
 #include 
diff --git a/sc/qa/unit/chart2dataprovider.cxx 
b/sc/qa/unit/chart2dataprovider.cxx
index 4c4b8007c15b..5b10ee7f8af2 100644
--- a/sc/qa/unit/chart2dataprovider.cxx
+++ b/sc/qa/unit/chart2dataprovider.cxx
@@ -11,7 +11,6 @@
 
 #include 
 
-#include 
 #include 
 
 #include 
diff --git a/sc/qa/unit/dataproviders_test.cxx 
b/sc/qa/unit/dataproviders_test.cxx
index 854757299b9d..d4d0a9f8f60c 100644
--- a/sc/qa/unit/dataproviders_test.cxx
+++ b/sc/qa/unit/dataproviders_test.cxx
@@ -13,7 +13,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 63ae46860c4d..671f9760d197 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -12,23 +12,12 @@
 #include "helper/scfiltertestbase.hxx"
 
 #include 
-#include 
-#include 
 #include 
-#include 
-#include 
-#include 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index dd1c6e09708c..f9c7af04a813 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -11,9 +11,7 @@
 #include "csv_handler.hxx"
 #include "debughelper.hxx"
 #include 
-#include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -23,22 +21,13 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
-#include 
-#include 
-#include 
 #include 
-#include 
 #include 
-#include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -51,10 +40,6 @@
 
 #include 
 #include 
-#include 
-#include 
-#include 
-
 
 using namespace com::sun::star;
 using namespace ::com::sun::star::uno;
diff --git a/sc/qa/unit/subsequent_export_test.cxx 
b/sc/qa/unit/subsequent_export_test.cxx
index 9ef88173d47c..a010a9820ea4 100644
--- a/sc/qa/unit/subsequent_export_test.cxx
+++ b/sc/qa/unit/subsequent_export_test.cxx
@@ -11,10 +11,8 @@
 #include 
 
 #include "helper/debughelper.hxx"
-#include 
 
 #include "helper/qahelper.hxx"
-#include 
 #include "helper/shared_test_impl.hxx"
 
 #include 
@@ -44,9 +42,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
diff --git a/sc/qa/unit/subsequent_export_test2.cxx 
b/sc/qa/unit/subsequent_export_test2.cxx
index 77b033d042a3..4010cc9dce1f 100644
--- a/sc/qa/unit/subsequent_export

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

2022-12-01 Thread Justin Luth (via logerrit)
 sw/inc/formatcontentcontrol.hxx |4 ++
 sw/inc/textcontentcontrol.hxx   |2 +
 sw/source/core/txtnode/attrcontentcontrol.cxx   |   33 
 sw/source/ui/vba/vbacontentcontrollistentry.cxx |   16 +--
 4 files changed, 46 insertions(+), 9 deletions(-)

New commits:
commit 64ad923652a11dc68a93f41044df9719c15dec86
Author: Justin Luth 
AuthorDate: Mon Nov 28 14:16:57 2022 -0500
Commit: Justin Luth 
CommitDate: Thu Dec 1 21:26:49 2022 +0100

tdf#151548 ContentControls: improve GetSelectedListItem

Before there was only an option to get the temporarily
selected list item that had not yet been committed to text.

Add a function that checks whether there is a valid
selected item, regardless of whether it has been
written out or not.

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

diff --git a/sw/inc/formatcontentcontrol.hxx b/sw/inc/formatcontentcontrol.hxx
index 88d32e83d31a..94399d6818e8 100644
--- a/sw/inc/formatcontentcontrol.hxx
+++ b/sw/inc/formatcontentcontrol.hxx
@@ -306,6 +306,10 @@ public:
 
 const std::optional& GetSelectedListItem() const { return 
m_oSelectedListItem; }
 
+/// Get a copy of selected list item's index,
+/// potentially even if the selection is already written out to text (i.e. 
validated).
+std::optional GetSelectedListItem(bool bCheckDocModel) const;
+
 void SetSelectedDate(std::optional oSelectedDate) { 
m_oSelectedDate = oSelectedDate; }
 
 const std::optional& GetSelectedDate() const { return 
m_oSelectedDate; }
diff --git a/sw/inc/textcontentcontrol.hxx b/sw/inc/textcontentcontrol.hxx
index 8c8a3b3ee044..a9bc4e4a1054 100644
--- a/sw/inc/textcontentcontrol.hxx
+++ b/sw/inc/textcontentcontrol.hxx
@@ -42,6 +42,8 @@ public:
 void ChgTextNode(SwTextNode* pNode);
 
 SwTextNode* GetTextNode() const;
+/// Get the current (potentially invalid) string from the doc
+OUString ToString() const;
 void Invalidate();
 
 void dumpAsXml(xmlTextWriterPtr pWriter) const override;
diff --git a/sw/source/core/txtnode/attrcontentcontrol.cxx 
b/sw/source/core/txtnode/attrcontentcontrol.cxx
index 98cfa13f9611..e3d0c2237b3b 100644
--- a/sw/source/core/txtnode/attrcontentcontrol.cxx
+++ b/sw/source/core/txtnode/attrcontentcontrol.cxx
@@ -232,6 +232,25 @@ void SwContentControl::SwClientNotify(const SwModify&, 
const SfxHint& rHint)
 }
 }
 
+std::optional SwContentControl::GetSelectedListItem(bool 
bCheckDocModel) const
+{
+if (!bCheckDocModel || m_oSelectedListItem)
+return m_oSelectedListItem;
+
+const size_t nLen = GetListItems().size();
+if (GetShowingPlaceHolder() || !nLen || !GetTextAttr())
+return std::nullopt;
+
+const OUString& rText = GetTextAttr()->ToString();
+for (size_t i = 0; i < nLen; ++i)
+{
+if (GetTextAttr()[i].ToString() == rText)
+return i;
+}
+assert(!GetDropDown() && "DropDowns must always have an associated list 
item");
+return std::nullopt;
+}
+
 bool SwContentControl::AddListItem(size_t nZIndex, const OUString& 
rDisplayText,
const OUString& rValue)
 {
@@ -662,6 +681,20 @@ SwTextNode* SwTextContentControl::GetTextNode() const
 return rFormatContentControl.GetTextNode();
 }
 
+OUString SwTextContentControl::ToString() const
+{
+if (!GetTextNode())
+return OUString();
+
+// Don't select the text attribute itself at the start.
+sal_Int32 nStart = GetStart() + 1;
+// Don't select the CH_TXTATR_BREAKWORD itself at the end.
+sal_Int32 nEnd = *End() - 1;
+
+SwPaM aPaM(*GetTextNode(), nStart, *GetTextNode(), nEnd);
+return aPaM.GetText();
+}
+
 void SwTextContentControl::Invalidate()
 {
 SwDocShell* pDocShell = GetTextNode() ? 
GetTextNode()->GetDoc().GetDocShell() : nullptr;
diff --git a/sw/source/ui/vba/vbacontentcontrollistentry.cxx 
b/sw/source/ui/vba/vbacontentcontrollistentry.cxx
index 61d2a1faf6a8..80603df21309 100644
--- a/sw/source/ui/vba/vbacontentcontrollistentry.cxx
+++ b/sw/source/ui/vba/vbacontentcontrollistentry.cxx
@@ -63,19 +63,17 @@ void SwVbaContentControlListEntry::setText(const OUString& 
rSet)
 return;
 }
 
-bool bNeedsInvalidation = false;
-if (!pCC->GetShowingPlaceHolder())
-{
-// TODO: implement bCheckDocModel
-std::optional 
oSel(pCC->GetSelectedListItem(/*bCheckDocModel=true*/));
-bNeedsInvalidation = oSel && *oSel == m_nZIndex;
-}
+const std::optional 
oSel(pCC->GetSelectedListItem(/*bCheckDocModel=*/true));
+const bool bNeedsInvalidation = pCC->GetDropDown() && oSel && *oSel == 
m_nZIndex;
 
 vListItems[m_nZIndex].m_aDisplayText = rSet;
 pCC->SetListItems(vListItems);
 
 if (bNeedsInvalidation)
+{
+pCC->SetSelectedListItem(m_nZIndex);
   

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

2022-12-01 Thread Michael Stahl (via logerrit)
 drawinglayer/source/tools/primitive2dxmldump.cxx |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit d7e80e272a83f960b06521595bd494f2dc84038a
Author: Michael Stahl 
AuthorDate: Wed Nov 30 19:23:09 2022 +0100
Commit: Michael Stahl 
CommitDate: Thu Dec 1 19:31:44 2022 +0100

drawinglayer: add StructureTagPrimitive to XML dump

Turned out to be unnecessary but why not add it.

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

diff --git a/drawinglayer/source/tools/primitive2dxmldump.cxx 
b/drawinglayer/source/tools/primitive2dxmldump.cxx
index 176b1384dd86..74e95836fdf9 100644
--- a/drawinglayer/source/tools/primitive2dxmldump.cxx
+++ b/drawinglayer/source/tools/primitive2dxmldump.cxx
@@ -34,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -947,6 +948,19 @@ void Primitive2dXmlDump::decomposeAndWrite(
 }
 break;
 
+case PRIMITIVE2D_ID_STRUCTURETAGPRIMITIVE2D:
+{
+const StructureTagPrimitive2D& rStructureTagPrimitive2D
+= dynamic_cast(*pBasePrimitive);
+rWriter.startElement("structuretag");
+rWriter.attribute("structureelement",
+  
rStructureTagPrimitive2D.getStructureElement());
+
+decomposeAndWrite(rStructureTagPrimitive2D.getChildren(), 
rWriter);
+rWriter.endElement();
+}
+break;
+
 case PRIMITIVE2D_ID_SVGRADIALGRADIENTPRIMITIVE2D:
 {
 const SvgRadialGradientPrimitive2D& 
rSvgRadialGradientPrimitive2D


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

2022-12-01 Thread Stephan Bergmann (via logerrit)
 vcl/inc/win/salgdi.h  |2 
 vcl/win/gdi/salfont.cxx   |4 -
 vcl/win/gdi/salgdi.cxx|   18 --
 vcl/win/gdi/salnativewidgets-luna.cxx |  101 --
 vcl/win/gdi/winlayout.cxx |5 -
 5 files changed, 67 insertions(+), 63 deletions(-)

New commits:
commit ddf8e2c9c366eb7b8757a589fd7b8e30849d2824
Author: Stephan Bergmann 
AuthorDate: Thu Dec 1 16:36:07 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Dec 1 18:35:46 2022 +0100

Avoid dynamic cross casts to WinSalGraphicsImplBase

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

diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index f26f1d40f0c9..eb41d0304d1c 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -144,6 +144,7 @@ class WinSalGraphics : public SalGraphics
 
 protected:
 std::unique_ptr mpImpl;
+WinSalGraphicsImplBase * mWinSalGraphicsImplBase;
 
 private:
 HDC mhLocalDC;  // HDC
@@ -210,6 +211,7 @@ public:
 virtual ~WinSalGraphics() override;
 
 SalGraphicsImpl* GetImpl() const override;
+WinSalGraphicsImplBase * getWinSalGraphicsImplBase() const { return 
mWinSalGraphicsImplBase; }
 bool isPrinter() const;
 bool isVirtualDevice() const;
 bool isWindow() const;
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index 9dde07473845..196932982c28 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -1152,9 +1152,7 @@ void WinSalGraphics::GetDevFontList( 
vcl::font::PhysicalFontCollection* pFontCol
 
 void WinSalGraphics::ClearDevFontCache()
 {
-WinSalGraphicsImplBase* pImpl = 
dynamic_cast(GetImpl());
-assert(pImpl != nullptr);
-pImpl->ClearDevFontCache();
+mWinSalGraphicsImplBase->ClearDevFontCache();
 ImplReleaseTempFonts(*GetSalData(), false);
 }
 
diff --git a/vcl/win/gdi/salgdi.cxx b/vcl/win/gdi/salgdi.cxx
index c723ed1156ba..48ba63e0b192 100644
--- a/vcl/win/gdi/salgdi.cxx
+++ b/vcl/win/gdi/salgdi.cxx
@@ -592,8 +592,7 @@ CompatibleDC::CompatibleDC(SalGraphics &rGraphics, int x, 
int y, int width, int
 return;
 }
 
-mpImpl = dynamic_cast(rWinGraphics.GetImpl());
-assert(mpImpl != nullptr);
+mpImpl = rWinGraphics.getWinSalGraphicsImplBase();
 mhCompatibleDC = CreateCompatibleDC(rWinGraphics.getHDC());
 
 // move the origin so that we always paint at 0,0 - to keep the bitmap
@@ -642,10 +641,18 @@ WinSalGraphics::WinSalGraphics(WinSalGraphics::Type 
eType, bool bScreen, HWND hW
 {
 #if HAVE_FEATURE_SKIA
 if (SkiaHelper::isVCLSkiaEnabled() && !mbPrinter)
-mpImpl.reset(new WinSkiaSalGraphicsImpl(*this, pProvider));
+{
+auto const impl = new WinSkiaSalGraphicsImpl(*this, pProvider);
+mpImpl.reset(impl);
+mWinSalGraphicsImplBase = impl;
+}
 else
 #endif
-mpImpl.reset(new WinSalGraphicsImpl(*this));
+{
+auto const impl = new WinSalGraphicsImpl(*this);
+mpImpl.reset(impl);
+mWinSalGraphicsImplBase = impl;
+}
 }
 
 WinSalGraphics::~WinSalGraphics()
@@ -799,8 +806,7 @@ tools::Long WinSalGraphics::GetGraphicsWidth() const
 
 void WinSalGraphics::Flush()
 {
-if(WinSalGraphicsImplBase* impl = 
dynamic_cast(GetImpl()))
-impl->Flush();
+mWinSalGraphicsImplBase->Flush();
 }
 
 void WinSalGraphics::ResetClipRegion()
diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx 
b/vcl/win/gdi/salnativewidgets-luna.cxx
index 6b676162f7d0..601575a9f58b 100644
--- a/vcl/win/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/gdi/salnativewidgets-luna.cxx
@@ -80,15 +80,14 @@ void SalData::deInitNWF()
 aThemeMap.clear();
 }
 
-static HTHEME getThemeHandle(HWND hWnd, LPCWSTR name, SalGraphicsImpl* 
pGraphicsImpl)
+static HTHEME getThemeHandle(HWND hWnd, LPCWSTR name, WinSalGraphicsImplBase* 
pGraphicsImpl)
 {
 if( GetSalData()->mbThemeChanged )
 {
 // throw away invalid theme handles
 SalData::deInitNWF();
 // throw away native control cache
-if (WinSalGraphicsImplBase* pImpl = 
dynamic_cast(pGraphicsImpl))
-pImpl->ClearNativeControlCache();
+pGraphicsImpl->ClearNativeControlCache();
 GetSalData()->mbThemeChanged = false;
 }
 
@@ -112,33 +111,33 @@ bool WinSalGraphics::isNativeControlSupported( 
ControlType nType, ControlPart nP
 case ControlType::Radiobutton:
 case ControlType::Checkbox:
 if( nPart == ControlPart::Entire )
-hTheme = getThemeHandle(mhWnd, L"Button", mpImpl.get());
+hTheme = getThemeHandle(mhWnd, L"Button", 
mWinSalGraphicsImplBase);
 break;
 case ControlType::Scrollbar:
 if( nPart == ControlPart::DrawBackgroundHorz || nPart == 
ControlPart::DrawBackgroundVert )
 return false;   // n

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

2022-12-01 Thread Caolán McNamara (via logerrit)
 sd/source/core/drawdoc4.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 5c28d80e766795b9e998f72f60abdfee01d5fe54
Author: Caolán McNamara 
AuthorDate: Thu Dec 1 14:03:15 2022 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 1 17:34:38 2022 +0100

ofz#53873 Abrt

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

diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 6791f4c64878..907b4163e500 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -604,6 +605,9 @@ void SdDrawDocument::CreateLayoutTemplates()
 
 void SdDrawDocument::CreateDefaultCellStyles()
 {
+if (utl::ConfigManager::IsFuzzing())
+return;
+
 Reference 
xContext(comphelper::getProcessComponentContext());
 Reference 
xImporter(xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
 "com.sun.star.comp.Draw.XMLOasisStylesImporter",


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

2022-12-01 Thread Michael Stahl (via logerrit)
 svx/source/sdr/contact/viewobjectcontact.cxx |  105 +++
 1 file changed, 60 insertions(+), 45 deletions(-)

New commits:
commit 81ef84648515965bf67afaced946227d0f63a71e
Author: Michael Stahl 
AuthorDate: Wed Nov 30 16:40:27 2022 +0100
Commit: Michael Stahl 
CommitDate: Thu Dec 1 17:04:58 2022 +0100

(related: tdf#135192) svx: PDF/UA export: tag background as Artifact

 ISO 14289-1:2014, Clause: 7.1, Test number: 3
 Content shall be marked as Artifact or tagged as real content

This needs to have an effect on ViewObjectContactOfSdrPage etc.
but let's put it in ViewObjectContact and hope anything that's not
SdrObject can be tagged as Artifact.

Also VclMetafileProcessor2D::processStructureTagPrimitive2D() has a very
peculiar habit of ignoring any obvious way to create an Artifact,
which should perhaps be fixed?

Change-Id: I8d22c36a8e31692d3ee24af692026e02b8faa70a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143502
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx 
b/svx/source/sdr/contact/viewobjectcontact.cxx
index 9d88819a9fe2..39421a9542e2 100644
--- a/svx/source/sdr/contact/viewobjectcontact.cxx
+++ b/svx/source/sdr/contact/viewobjectcontact.cxx
@@ -385,59 +385,74 @@ drawinglayer::primitive2d::Primitive2DContainer const & 
ViewObjectContact::getPr
 
 // Check if we need to embed to a StructureTagPrimitive2D, too. This
 // was done at ImplRenderPaintProc::createRedirectedPrimitive2DSequence 
before
-if(!xNewPrimitiveSequence.empty() && nullptr != pSdrObj && 
GetObjectContact().isExportTaggedPDF())
+if (!xNewPrimitiveSequence.empty() && 
GetObjectContact().isExportTaggedPDF())
 {
-vcl::PDFWriter::StructElement 
eElement(vcl::PDFWriter::NonStructElement);
-const SdrInventor nInventor(pSdrObj->GetObjInventor());
-const SdrObjKind nIdentifier(pSdrObj->GetObjIdentifier());
-const bool bIsTextObj(nullptr != DynCastSdrTextObj(pSdrObj));
-
-// Note: SwFlyDrawObj/SwVirtFlyDrawObj have SdrInventor::Swg - these
-// are *not* handled here because not all of them are painted
-// completely with primitives, so a tag here does not encapsulate them.
-// The tag must be created by SwTaggedPDFHelper until this is fixed.
-if ( nInventor == SdrInventor::Default )
+if (nullptr != pSdrObj)
 {
-if ( nIdentifier == SdrObjKind::Group )
-eElement = vcl::PDFWriter::Section;
-else if (nIdentifier == SdrObjKind::Table)
-eElement = vcl::PDFWriter::Table;
-else if ( nIdentifier == SdrObjKind::TitleText )
-eElement = vcl::PDFWriter::Heading;
-else if ( nIdentifier == SdrObjKind::OutlineText )
-eElement = vcl::PDFWriter::Division;
-else if ( !bIsTextObj || !static_cast(*pSdrObj).HasText() )
-eElement = vcl::PDFWriter::Figure;
-else
-eElement = vcl::PDFWriter::Division;
-}
-
-if(vcl::PDFWriter::NonStructElement != eElement)
-{
-SdrPage* pSdrPage(pSdrObj->getSdrPageFromSdrObject());
+vcl::PDFWriter::StructElement 
eElement(vcl::PDFWriter::NonStructElement);
+const SdrInventor nInventor(pSdrObj->GetObjInventor());
+const SdrObjKind nIdentifier(pSdrObj->GetObjIdentifier());
+const bool bIsTextObj(nullptr != DynCastSdrTextObj(pSdrObj));
+
+// Note: SwFlyDrawObj/SwVirtFlyDrawObj have SdrInventor::Swg - 
these
+// are *not* handled here because not all of them are painted
+// completely with primitives, so a tag here does not encapsulate 
them.
+// The tag must be created by SwTaggedPDFHelper until this is 
fixed.
+if ( nInventor == SdrInventor::Default )
+{
+if ( nIdentifier == SdrObjKind::Group )
+eElement = vcl::PDFWriter::Section;
+else if (nIdentifier == SdrObjKind::Table)
+eElement = vcl::PDFWriter::Table;
+else if ( nIdentifier == SdrObjKind::TitleText )
+eElement = vcl::PDFWriter::Heading;
+else if ( nIdentifier == SdrObjKind::OutlineText )
+eElement = vcl::PDFWriter::Division;
+else if ( !bIsTextObj || !static_cast(*pSdrObj).HasText() )
+eElement = vcl::PDFWriter::Figure;
+else
+eElement = vcl::PDFWriter::Division;
+}
 
-if(pSdrPage)
+if(vcl::PDFWriter::NonStructElement != eElement)
 {
-const bool bBackground(pSdrPage->IsMasterPage());
-const bool bImage(SdrObjKind::Graphic == 
pSdrObj->GetObjIdentifier());
-// note: there must be outpu

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

2022-12-01 Thread Michael Stahl (via logerrit)
 include/svx/svdotable.hxx  |7 ---
 svx/source/table/viewcontactoftableobj.cxx |   59 +++--
 svx/source/table/viewcontactoftableobj.hxx |1 
 3 files changed, 58 insertions(+), 9 deletions(-)

New commits:
commit 4bfa3edaeea444d46f9470d415667fb8df54c32d
Author: Michael Stahl 
AuthorDate: Thu Dec 1 13:35:32 2022 +0100
Commit: Michael Stahl 
CommitDate: Thu Dec 1 17:02:00 2022 +0100

tdf#135192 svx: PDF/UA export: table tag primitives only if necessary

Introduce a ViewObjectContactOfTableObj which is able to check that a
tagged PDF export is in progress.

For the non-PDF case, for performance, fall back to calling
ViewContact::createViewIndependentPrimitive2DSequence().

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

diff --git a/include/svx/svdotable.hxx b/include/svx/svdotable.hxx
index 9eea4930aff5..3e0da9a72708 100644
--- a/include/svx/svdotable.hxx
+++ b/include/svx/svdotable.hxx
@@ -262,6 +262,8 @@ public:
 
 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 
+const TableLayouter& getTableLayouter() const;
+
 private:
 void init( sal_Int32 nColumns, sal_Int32 nRows );
 
@@ -274,11 +276,6 @@ private:
 
 SdrOutliner* GetCellTextEditOutliner( const sdr::table::Cell& rCell ) 
const;
 
-// For the ViewContactOfTableObj to build the primitive representation, it 
is necessary to access the
-// TableLayouter for position and attribute information
-friend class sdr::contact::ViewContactOfTableObj;
-const TableLayouter& getTableLayouter() const;
-
 tools::Rectangle   maLogicRect;
 rtl::Reference mpImpl;
 };
diff --git a/svx/source/table/viewcontactoftableobj.cxx 
b/svx/source/table/viewcontactoftableobj.cxx
index da11d1741789..3f17c5ccae21 100644
--- a/svx/source/table/viewcontactoftableobj.cxx
+++ b/svx/source/table/viewcontactoftableobj.cxx
@@ -36,6 +36,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -153,6 +155,21 @@ namespace drawinglayer::primitive2d
 
 namespace sdr::contact
 {
+
+namespace {
+class ViewObjectContactOfTableObj : public ViewObjectContactOfSdrObj
+{
+public:
+ViewObjectContactOfTableObj(ObjectContact& rObjectContact, 
ViewContact& rViewContact)
+: ViewObjectContactOfSdrObj(rObjectContact, rViewContact)
+{
+}
+
+protected:
+virtual void createPrimitive2DSequence(DisplayInfo const& 
rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor& 
rVisitor) const override;
+};
+} // namespace
+
 static svx::frame::Style impGetLineStyle(
 const sdr::table::TableLayouter& rLayouter,
 sal_Int32 nX,
@@ -204,9 +221,11 @@ namespace sdr::contact
 return svx::frame::Style();
 }
 
-void 
ViewContactOfTableObj::createViewIndependentPrimitive2DSequence(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&
 rVisitor) const
+static void createPrimitive2DSequenceImpl(
+sdr::table::SdrTableObj const& rTableObj,
+bool const isTaggedPDF,
+drawinglayer::primitive2d::Primitive2DDecompositionVisitor& 
rVisitor)
 {
-const sdr::table::SdrTableObj& rTableObj = static_cast(GetSdrObject());
 const uno::Reference< css::table::XTable > xTable = 
rTableObj.getTable();
 
 if(xTable.is())
@@ -352,7 +371,7 @@ namespace sdr::contact
 aRetvalForShadow.append(xCellReference);
 }
 }
-if (pPage)
+if (isTaggedPDF && pPage)
 {
 // heuristic: if there's a special formatting 
on
 // first row, assume that it's a header row
@@ -370,7 +389,7 @@ namespace sdr::contact
 row.append(cell);
 }
 
-if (pPage)
+if (isTaggedPDF && pPage)
 {
 row = 
drawinglayer::primitive2d::Primitive2DContainer {
 new 
drawinglayer::primitive2d::StructureTagPrimitive2D(
@@ -484,6 +503,38 @@ namespace sdr::contact
 }
 }
 
+void ViewObjectContactOfTableObj::createPrimitive2DSequence(
+DisplayInfo const& rDisplayInfo,
+drawinglayer::primitive2d::Primitive2DDecompositionVisitor& 
rVisitor) const
+{
+bool const isTaggedPDF(GetObjectContact().isExportTaggedPDF());
+if (isTaggedPDF)
+{
+// this will be u

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

2022-12-01 Thread Michael Stahl (via logerrit)
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |5 +
 svx/source/table/viewcontactoftableobj.cxx |8 ++
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |   41 -
 3 files changed, 52 insertions(+), 2 deletions(-)

New commits:
commit 0bc96b8805f2cfa2278729a9f3e56a350ddd69ad
Author: Michael Stahl 
AuthorDate: Wed Nov 30 15:06:02 2022 +0100
Commit: Michael Stahl 
CommitDate: Thu Dec 1 17:01:42 2022 +0100

tdf#135192 drawinglayer,svx: PDF/UA export: also tag TH for SdrTableObj

There isn't really an indication of anything being a header row, but the
table template application has a flag to apply special formatting to the
first row, so let's use that as indication that it's a header row

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

diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 393fbfee9cfc..3b3f27ba302c 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -2460,6 +2460,11 @@ void 
VclMetafileProcessor2D::processStructureTagPrimitive2D(
 default:
 break;
 }
+if (rTagElement == vcl::PDFWriter::TableHeader)
+{
+
mpPDFExtOutDevData->SetStructureAttribute(vcl::PDFWriter::Scope,
+  
vcl::PDFWriter::Column);
+}
 }
 // background object
 else
diff --git a/svx/source/table/viewcontactoftableobj.cxx 
b/svx/source/table/viewcontactoftableobj.cxx
index df271a3e2404..da11d1741789 100644
--- a/svx/source/table/viewcontactoftableobj.cxx
+++ b/svx/source/table/viewcontactoftableobj.cxx
@@ -354,9 +354,15 @@ namespace sdr::contact
 }
 if (pPage)
 {
+// heuristic: if there's a special formatting 
on
+// first row, assume that it's a header row
+auto const eType(
+   aCellPos.mnRow == 0 && 
rTableObj.getTableStyleSettings().mbUseFirstRow
+   ? vcl::PDFWriter::TableHeader
+   : vcl::PDFWriter::TableData);
 cell = 
drawinglayer::primitive2d::Primitive2DContainer {
 new 
drawinglayer::primitive2d::StructureTagPrimitive2D(
-vcl::PDFWriter::TableData,
+eType,
 pPage->IsMasterPage(),
 false,
 std::move(cell)) };
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 8756dc9b5d77..ea8f83e6ba8f 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -3461,7 +3461,46 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf135192)
 auto pS3 = dynamic_cast<
 
vcl::filter::PDFNameElement*>(
 pObject3->Lookup("S"));
-if (pS3 && pS3->GetValue() 
== "TD")
+if (nTR == 0 && pS3 && 
pS3->GetValue() == "TH")
+{
+int nOTable(0);
+auto pAttrs = 
dynamic_cast<
+
vcl::filter::PDFArrayElement*>(
+
pObject3->Lookup("A"));
+CPPUNIT_ASSERT(pAttrs 
!= nullptr);
+for (const auto& 
rAttrRef :
+ 
pAttrs->GetElements())
+{
+auto pARef = 
dynamic_cast<
+
vcl::filter::PDFReferenceElement*>(
+rAttrRef);
+
CPPUNIT_ASSERT(pARef != nullptr);
+auto pAttr = 
pARef->LookupObject();
+  

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

2022-12-01 Thread Michael Stahl (via logerrit)
 svx/source/sdr/contact/viewobjectcontact.cxx   |2 
 svx/source/table/viewcontactoftableobj.cxx |   30 ++-
 vcl/qa/cppunit/pdfexport/data/tdf135192-1.fodp |  239 +
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |   95 +
 4 files changed, 364 insertions(+), 2 deletions(-)

New commits:
commit 56ff8262d8ace8fd99326e290597cb901654ea11
Author: Michael Stahl 
AuthorDate: Wed Nov 30 13:59:53 2022 +0100
Commit: Michael Stahl 
CommitDate: Thu Dec 1 17:01:20 2022 +0100

tdf#135192 svx: PDF/UA export: implement tags for SdrTableObj

There seems to be no way to check for isExportTaggedPDF() in
ViewContactOfTableObj::createViewIndependentPrimitive2DSequence()
so simply always add the tags.

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

diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx 
b/svx/source/sdr/contact/viewobjectcontact.cxx
index 8580603850ea..9d88819a9fe2 100644
--- a/svx/source/sdr/contact/viewobjectcontact.cxx
+++ b/svx/source/sdr/contact/viewobjectcontact.cxx
@@ -400,6 +400,8 @@ drawinglayer::primitive2d::Primitive2DContainer const & 
ViewObjectContact::getPr
 {
 if ( nIdentifier == SdrObjKind::Group )
 eElement = vcl::PDFWriter::Section;
+else if (nIdentifier == SdrObjKind::Table)
+eElement = vcl::PDFWriter::Table;
 else if ( nIdentifier == SdrObjKind::TitleText )
 eElement = vcl::PDFWriter::Heading;
 else if ( nIdentifier == SdrObjKind::OutlineText )
diff --git a/svx/source/table/viewcontactoftableobj.cxx 
b/svx/source/table/viewcontactoftableobj.cxx
index 2d71f83ef337..df271a3e2404 100644
--- a/svx/source/table/viewcontactoftableobj.cxx
+++ b/svx/source/table/viewcontactoftableobj.cxx
@@ -33,8 +33,10 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -217,6 +219,7 @@ namespace sdr::contact
 const sal_Int32 nRowCount(xTable->getRowCount());
 const sal_Int32 nColCount(xTable->getColumnCount());
 const sal_Int32 nAllCount(nRowCount * nColCount);
+SdrPage const*const pPage(rTableObj.getSdrPageFromSdrObject());
 
 if(nAllCount)
 {
@@ -230,7 +233,7 @@ namespace sdr::contact
 // GetGeoRect() to not trigger any calculations. It's the 
unrotated geometry.
 const basegfx::B2DRange aObjectRange = 
vcl::unotools::b2DRectangleFromRectangle(rTableObj.GetGeoRect());
 
-// To create the CellBorderPrimitives, use the tolling 
from svx::frame::Array
+// To create the CellBorderPrimitives, use the tooling 
from svx::frame::Array
 // which is capable of creating the needed visualization. 
Fill it during the
 // anyways needed run over the table.
 svx::frame::Array aArray;
@@ -241,11 +244,13 @@ namespace sdr::contact
 // create single primitives per cell
 for(aCellPos.mnRow = 0; aCellPos.mnRow < nRowCount; 
aCellPos.mnRow++)
 {
+drawinglayer::primitive2d::Primitive2DContainer row;
 // add RowHeight to CellBorderArray for primitive 
creation
 aArray.SetRowHeight(aCellPos.mnRow, 
rTableLayouter.getRowHeight(aCellPos.mnRow));
 
 for(aCellPos.mnCol = 0; aCellPos.mnCol < nColCount; 
aCellPos.mnCol++)
 {
+drawinglayer::primitive2d::Primitive2DContainer 
cell;
 // add ColWidth to CellBorderArray for primitive 
creation, only
 // needs to be done in the 1st run
 if(0 == aCellPos.mnRow)
@@ -324,7 +329,7 @@ namespace sdr::contact
 const 
drawinglayer::primitive2d::Primitive2DReference xCellReference(
 new 
drawinglayer::primitive2d::SdrCellPrimitive2D(
 aCellMatrix, aAttribute));
-aRetval.append(xCellReference);
+cell.append(xCellReference);
 }
 
 // Create cell primitive without text.
@@ -347,7 +352,28 @@ namespace sdr::contact
 aRetvalForShadow.append(xCellReference);
 }
 }
+if (pPage)
+{
+cell = 
drawinglayer::primitive2d::Primitive2DContainer {
+  

[Libreoffice-commits] core.git: xmlsecurity/CppunitTest_xmlsecurity_signing2.mk xmlsecurity/CppunitTest_xmlsecurity_signing.mk xmlsecurity/Module_xmlsecurity.mk xmlsecurity/qa

2022-12-01 Thread Xisco Fauli (via logerrit)
 xmlsecurity/CppunitTest_xmlsecurity_signing.mk  |1 
 xmlsecurity/CppunitTest_xmlsecurity_signing2.mk |   94 
 xmlsecurity/Module_xmlsecurity.mk   |1 
 xmlsecurity/qa/unit/signing/signing2.cxx|   65 ++--
 4 files changed, 104 insertions(+), 57 deletions(-)

New commits:
commit 336602a15d481c4502e66778aec8d37727922152
Author: Xisco Fauli 
AuthorDate: Thu Dec 1 14:27:03 2022 +0100
Commit: Xisco Fauli 
CommitDate: Thu Dec 1 16:45:45 2022 +0100

CppunitTest_xmlsecurity_signing2: inherit from UnoApiXmlTest

for some reason, if xmlsecurity/qa/unit/signing/signing2.cxx
is executed with CppunitTest_xmlsecurity_signing, it makes
testPreserveMacroTemplateSignature10::TestBody to crash,
which is weird. Split them in two

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

diff --git a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk 
b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
index c3842c16872d..7339800107a7 100644
--- a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
+++ b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
@@ -13,7 +13,6 @@ $(eval $(call gb_CppunitTest_CppunitTest,xmlsecurity_signing))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,xmlsecurity_signing, \
xmlsecurity/qa/unit/signing/signing \
-   xmlsecurity/qa/unit/signing/signing2 \
 ))
 
 $(eval $(call gb_CppunitTest_use_libraries,xmlsecurity_signing, \
diff --git a/xmlsecurity/CppunitTest_xmlsecurity_signing2.mk 
b/xmlsecurity/CppunitTest_xmlsecurity_signing2.mk
new file mode 100644
index ..0cd450121979
--- /dev/null
+++ b/xmlsecurity/CppunitTest_xmlsecurity_signing2.mk
@@ -0,0 +1,94 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*
+#
+# 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/.
+#
+#*
+
+$(eval $(call gb_CppunitTest_CppunitTest,xmlsecurity_signing2))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,xmlsecurity_signing2, \
+   xmlsecurity/qa/unit/signing/signing2 \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,xmlsecurity_signing2, \
+   comphelper \
+   cppuhelper \
+   cppu \
+   sal \
+   sax \
+   sfx \
+   svx \
+   subsequenttest \
+   test \
+   tl \
+   unotest \
+   utl \
+   vcl \
+   xmlsecurity \
+   xsec_xmlsec \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,xmlsecurity_signing2,\
+boost_headers \
+libxml2 \
+))
+
+ifneq ($(OS),WNT)
+ifneq (,$(ENABLE_NSS))
+$(eval $(call gb_CppunitTest_use_externals,xmlsecurity_signing2,\
+nssutil3 \
+))
+endif
+endif
+
+$(eval $(call gb_CppunitTest_set_include,xmlsecurity_signing2,\
+   -I$(SRCDIR)/xmlsecurity/inc \
+   $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,xmlsecurity_signing2))
+
+$(eval $(call gb_CppunitTest_use_ure,xmlsecurity_signing2))
+$(eval $(call gb_CppunitTest_use_vcl,xmlsecurity_signing2))
+
+$(eval $(call gb_CppunitTest_use_uiconfigs,xmlsecurity_signing2, \
+svt \
+))
+
+$(eval $(call gb_CppunitTest_use_rdb,xmlsecurity_signing2,services))
+
+$(eval $(call gb_CppunitTest_use_configuration,xmlsecurity_signing2))
+
+ifeq ($(ENABLE_POPPLER),TRUE)
+$(eval $(call gb_CppunitTest_use_executable,xmlsecurity_signing2,xpdfimport))
+endif
+
+# various hacks to make unit test work on Linux more often
+ifeq ($(OS),LINUX)
+# reset the LD_LIBRARY_PATH for spawned GPG processes
+$(call gb_CppunitTest_get_target,xmlsecurity_signing2): \
+EXTRA_ENV_VARS += \
+LIBO_LD_PATH=$$LD_LIBRARY_PATH
+endif
+
+$(eval $(call gb_CppunitTest_use_custom_headers,xmlsecurity_signing2,\
+officecfg/registry \
+))
+
+ifeq ($(OS),WNT)
+# Initializing DocumentSignatureManager will require gpgme-w32spawn.exe in 
workdir/LinkTarget/Executable
+$(eval $(call gb_CppunitTest_use_packages,xmlsecurity_signing2,\
+$(call gb_Helper_optional,GPGMEPP,gpgmepp)\
+))
+endif
+
+$(eval $(call gb_CppunitTest_add_arguments,xmlsecurity_signing2, \
+
-env:arg-env=$(gb_Helper_LIBRARY_PATH_VAR)"{$(gb_Helper_LIBRARY_PATH_VAR)+=$(gb_Helper_LIBRARY_PATH_VAR)}"
 \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/xmlsecurity/Module_xmlsecurity.mk 
b/xmlsecurity/Module_xmlsecurity.mk
index 62852c0a4d1d..2416d609d1b8 100644
--- a/xmlsecurity/Module_xmlsecurity.mk
+++ b/xmlsecurity/Module_xmlsecurity.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,xmlsecurity,\
 
 $(eval $(call gb_Module_add_subsequentcheck_targets,xmlsecurity,\
 CppunitTest_xmlsecurity_signing \

ESC meeting minutes: 2022-12-01

2022-12-01 Thread Stephan Bergmann

* Present:
+ Heiko, Ilmari, Stephan, Caolan, Hossein, Cloph, Michael S, 
Thorsten, Xisco, Eike


* Completed Action Items:
+ enable the commit permission for Kevin (Cloph)
+ send the new-committer welcome mail to Kevin (Heiko)

* Pending Action Items:

* Release Engineering update (Cloph)
+ 7.4 status: 7.4.4 rc1 in 2 weeks
   + 7.4.3 approved in Mac app store, pending some approval in MS store
+ 7.5 status:
  + issue building install sets on Windows, still investigating
  + feature freeze in 1 week, also means the beta1 and -7-5 branch
 + (but can still +2 yourself for now)
  + no late features are known at this time
  + blog post to announce beta, even when some installsets missing? 
(Xisco)

 + probably makes sense

* Documentation (Olivier)
+ missing Olivier
+ New Help
   + Annoying issue at 
https://bugs.documentfoundation.org/show_bug.cgi?id=144859

  + Javascrpt skills welcome
+ Helpcontents
   + Fixes and updates (stragu, erack, A. Romedenne, R, Lima, 
fitoshido)

+ Guides
   + Published Getting Started guide 7.4, Impress Guide 7.4
   + Blog post:

https://blog.documentfoundation.org/blog/2022/12/01/getting-started-guide-7-4-and-impress-guide-7-4-available-for-download/ 


+ Bugzilla Documentation statistics
248(248) bugs open
+ Updates:
BZ changes   1 week1 month   3 months   12 months
   created  9(-5) 46(1) 94(3)  320(0)
 commented 23(-30)   161(16)   286(27)1219(-6)
  resolved  1(-3) 18(-1)44(-1) 200(-3)
+ top 10 contributors:
  Bogdan B made 132 changes in 1 month, and 145 changes in 1 year
  Stéphane Guillou (stragu) made 36 changes in 1 month, and 41 
changes in 1 year
  Heiko Tietze made 28 changes in 1 month, and 126 changes in 1 
year
  Olivier Hallot made 20 changes in 1 month, and 461 changes in 
1 year
  Roman Kuznetsov made 18 changes in 1 month, and 53 changes in 
1 year

  Dieter made 18 changes in 1 month, and 89 changes in 1 year
  Rafael Lima made 12 changes in 1 month, and 226 changes in 1 year
  steve made 11 changes in 1 month, and 18 changes in 1 year
  Kaganski, Mike made 10 changes in 1 month, and 114 changes in 
1 year
  Ilmari Lauhakangas made 9 changes in 1 month, and 98 changes 
in 1 year


* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
277(277) (topicUI) bugs open, 58(58) (needsUXEval) needs to be 
evaluated by the UXteam

+ Updates:
BZ changes   1 week1 month3 months   12 months
 added  4(-2)  6(-8) 24(-13) 49(-12)
 commented 42(-52)   182(-65)   546(-87)   2226(-84)
   removed  2(2)   6(3)  10(3)   37(3)
  resolved  9(-1) 35(8)  88(5)  324(2)
+ top 10 contributors:
  Heiko Tietze made 185 changes in 1 month, and 1548 changes in 
1 year
  Eyal Rozenberg made 31 changes in 1 month, and 187 changes in 
1 year

  Dieter made 30 changes in 1 month, and 227 changes in 1 year
  V Stuart Foote made 30 changes in 1 month, and 71 changes in 
1 year

  Bogdan B made 27 changes in 1 month, and 48 changes in 1 year
  Stéphane Guillou (stragu) made 27 changes in 1 month, and 32 
changes in 1 year
  Ilmari Lauhakangas made 17 changes in 1 month, and 148 
changes in 1 year

  Hossein made 14 changes in 1 month, and 77 changes in 1 year
  Rafael Lima made 14 changes in 1 month, and 204 changes in 1 year
  خالد حسني made 11 changes in 1 month, and 24 changes in 1 year
+ [Bug 152337] Show a warning infobar when imported text file used 
several of

   selected field separators
 -> + [Bug 32485] Settings on the image frame style lost when caption 
is applied

+ input welcome!
+ [Bug 152284] Increase contrast of the ruler elements when os/DE 
is in a

   Dark color mode
+ [Bug 152189] styles list "new", plus "DUPLICATE" !
+ [Bug 152136] "SMTP Server" term needs clarification in UI that 
non-SMTP

   servers are unsupported
+ [Bug 97802] Chart categories : manually set strings (not 
references to table)

   are allowed but not used
 -> + [Bug 152256] CHAPTER NUMBERING DIALOG: Add additional option in 
numbering

   sublevels
+ up for discussion
+ [Bug 143015] 'Text Language' field on the Status bar for Calc 
should display
   language for cell paragraph content consistent with Writer 
handling of

   paragraph or table cell, and not the global document language
+ [Bug 139977] Tools>Options>LibreOffice Writer>Table dialog, 
"Variable"

   setting does not work when resizing cells with keyboard shortcut
+ [Bug 146273] inconsistencies in navigator page "go to" and page 
dialog
+ [Bug 152164] Use the same ba

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

2022-12-01 Thread Stephan Bergmann (via logerrit)
 include/toolkit/awt/vclxwindows.hxx  |  109 +
 toolkit/inc/awt/vclxcontainer.hxx|   17 
 toolkit/inc/awt/vclxsystemdependentwindow.hxx|   15 
 toolkit/inc/awt/vclxtopwindow.hxx|   19 -
 toolkit/inc/awt/vclxwindows.hxx  |  169 +
 toolkit/source/awt/vclxcontainer.cxx |   26 -
 toolkit/source/awt/vclxsystemdependentwindow.cxx |   24 -
 toolkit/source/awt/vclxtopwindow.cxx |   24 -
 toolkit/source/awt/vclxwindows.cxx   |  429 ---
 9 files changed, 54 insertions(+), 778 deletions(-)

New commits:
commit 4e26dbf214df8a9f76791dd3fc3b52f146e5f12e
Author: Stephan Bergmann 
AuthorDate: Thu Dec 1 13:59:43 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Dec 1 15:40:25 2022 +0100

Use cppuhelper::ImplInheritanceHelper for toolkit VCLX window classes

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

diff --git a/include/toolkit/awt/vclxwindows.hxx 
b/include/toolkit/awt/vclxwindows.hxx
index e67f6b619a15..677186367a87 100644
--- a/include/toolkit/awt/vclxwindows.hxx
+++ b/include/toolkit/awt/vclxwindows.hxx
@@ -37,7 +37,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
@@ -131,9 +130,10 @@ public:
 
 //  class VCLXCheckBox
 
-class TOOLKIT_DLLPUBLIC VCLXCheckBox final : public css::awt::XCheckBox,
-public css::awt::XButton,
-public VCLXGraphicControl
+class TOOLKIT_DLLPUBLIC VCLXCheckBox final : public 
cppu::ImplInheritanceHelper<
+VCLXGraphicControl,
+css::awt::XCheckBox,
+css::awt::XButton>
 {
 private:
 ActionListenerMultiplexer   maActionListeners;
@@ -146,15 +146,6 @@ private:
 public:
 VCLXCheckBox();
 
-// css::uno::XInterface
-css::uno::Any  SAL_CALL queryInterface( const 
css::uno::Type & rType ) override;
-voidSAL_CALL acquire() noexcept 
override  { OWeakObject::acquire(); }
-voidSAL_CALL release() noexcept 
override  { OWeakObject::release(); }
-
-// css::lang::XTypeProvider
-css::uno::Sequence< css::uno::Type >  SAL_CALL getTypes() override;
-css::uno::Sequence< sal_Int8 > SAL_CALL 
getImplementationId() override;
-
 
 // css::lang::XComponent
 void SAL_CALL dispose(  ) override;
@@ -188,9 +179,10 @@ public:
 
 //  class VCLXRadioButton
 
-class TOOLKIT_DLLPUBLIC VCLXRadioButton final : public css::awt::XRadioButton,
-public css::awt::XButton,
-public VCLXGraphicControl
+class TOOLKIT_DLLPUBLIC VCLXRadioButton final : public 
cppu::ImplInheritanceHelper<
+VCLXGraphicControl,
+css::awt::XRadioButton,
+css::awt::XButton>
 {
 private:
 ItemListenerMultiplexer maItemListeners;
@@ -204,15 +196,6 @@ private:
 public:
 VCLXRadioButton();
 
-// css::uno::XInterface
-css::uno::Any  SAL_CALL queryInterface( const 
css::uno::Type & rType ) override;
-voidSAL_CALL acquire() noexcept 
override  { OWeakObject::acquire(); }
-voidSAL_CALL release() noexcept 
override  { OWeakObject::release(); }
-
-// css::lang::XTypeProvider
-css::uno::Sequence< css::uno::Type >  SAL_CALL getTypes() override;
-css::uno::Sequence< sal_Int8 > SAL_CALL 
getImplementationId() override;
-
 // css::lang::XComponent
 void SAL_CALL dispose(  ) override;
 
@@ -244,8 +227,7 @@ public:
 
 //  class VCLXFixedHyperlink
 class VCLXFixedHyperlink final :
-public css::awt::XFixedHyperlink,
-public VCLXWindow
+public cppu::ImplInheritanceHelper
 {
 private:
 ActionListenerMultiplexer   maActionListeners;
@@ -259,18 +241,9 @@ public:
 VCLXFixedHyperlink();
 virtual ~VCLXFixedHyperlink() override;
 
-// css::uno::XInterface
-css::uno::Any  SAL_CALL queryInterface( const 
css::uno::Type & rType ) override;
-voidSAL_CALL acquire() noexcept 
override  { OWeakObject::acquire(); }
-voidSAL_CALL release() noexcept 
override  { OWeakObject::release(); }
-
 // css::lang::XComponent
 void SAL_CALL dispose(  ) override;
 
-// css::lang::XTypeProvider
-css::uno::Sequence< css::uno::Type >  SAL_CALL getTypes() override;
-css::uno::Sequence< sal_Int8 > SAL_CALL 
getImplementationId() override;
-
 // css::awt::XFixedHyperlink
 void SAL_CALL setText( const OUString& Text ) override;
 OUString SAL_CAL

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

2022-12-01 Thread Xisco Fauli (via logerrit)
 sd/qa/unit/import-tests2.cxx   |2 +-
 sd/qa/unit/sdmodeltestbase.hxx |   11 +++
 2 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit b3291a3c0e64fd759184c29848d4323e1384965e
Author: Xisco Fauli 
AuthorDate: Thu Dec 1 13:46:49 2022 +0100
Commit: Xisco Fauli 
CommitDate: Thu Dec 1 15:28:46 2022 +0100

sd: check files are loaded without any warning error

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

diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx
index 46d1966a2e1a..e704f0bcd783 100644
--- a/sd/qa/unit/import-tests2.cxx
+++ b/sd/qa/unit/import-tests2.cxx
@@ -229,7 +229,7 @@ public:
 
 void SdImportTest2::testTdf152186()
 {
-loadFromURL(u"pptx/tdf152186.pptx");
+createSdImpressDoc("pptx/tdf152186.pptx");
 saveAndReload("Impress MS PowerPoint 2007 XML");
 
 bool bHasShadow;
diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx
index 189bdda09718..08e3a8e7fbc3 100644
--- a/sd/qa/unit/sdmodeltestbase.hxx
+++ b/sd/qa/unit/sdmodeltestbase.hxx
@@ -56,6 +56,8 @@ public:
 uno::Reference xServiceInfo(mxComponent, 
uno::UNO_QUERY_THROW);
 CPPUNIT_ASSERT(
 
xServiceInfo->supportsService("com.sun.star.presentation.PresentationDocument"));
+
+CPPUNIT_ASSERT(!getSdDocShell()->GetMedium()->GetWarningError());
 }
 
 void createSdDrawDoc(const char* pName = nullptr, const char* pPassword = 
nullptr)
@@ -67,6 +69,15 @@ public:
 
 uno::Reference xServiceInfo(mxComponent, 
uno::UNO_QUERY_THROW);
 
CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.drawing.DrawingDocument"));
+
+CPPUNIT_ASSERT(!getSdDocShell()->GetMedium()->GetWarningError());
+}
+
+sd::DrawDocShell* getSdDocShell()
+{
+SdXImpressDocument* pImpressDocument = 
dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pImpressDocument);
+return pImpressDocument->GetDocShell();
 }
 
 uno::Reference getPage(int nPage)


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

2022-12-01 Thread Caolán McNamara (via logerrit)
 drawinglayer/source/primitive2d/textlayoutdevice.cxx |2 +-
 editeng/source/items/svxfont.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2b1d0d7b3d8df805abefdb4b4a80f8f17d6924cc
Author: Caolán McNamara 
AuthorDate: Thu Dec 1 11:24:49 2022 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 1 15:13:06 2022 +0100

OutputDevice::GetTextArray will always set the size of the vector anyway

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

diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx 
b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index 78e0c23189ad..fcc9b401fa48 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -308,7 +308,7 @@ std::vector TextLayouterDevice::getTextArray(const 
OUString& rText, sal_
 if (nTextLength)
 {
 aRetval.reserve(nTextLength);
-std::vector aArray(nTextLength);
+std::vector aArray;
 mrDevice.GetTextArray(rText, &aArray, nIndex, nTextLength);
 aRetval.assign(aArray.begin(), aArray.end());
 }
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index 9911beec85b0..b6f9617a4c27 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -441,7 +441,7 @@ Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, 
const OUString &rTxt,
 if( IsFixKerning() && ( nLen > 1 ) )
 {
 auto nKern = GetFixKerning();
-std::vector aDXArray(nLen);
+std::vector aDXArray;
 GetTextArray(pOut, rTxt, &aDXArray, nIdx, nLen);
 tools::Long nOldValue = aDXArray[0];
 sal_Int32 nSpaceCount = 0;


Minutes from the UX/design meeting 2022-Dec-01

2022-12-01 Thread Heiko Tietze

Present: Heiko
Comments: Rafael, Timur, Maxim, Eike, Mike, Dieter

Tickets/Topics

 * Impress: Table design icon without function
   + https://bugs.documentfoundation.org/show_bug.cgi?id=151185
   + issue will be obsolete if bug 101802 is done (consolidating
 table style across modules) (Rafael)
   + no alternative to access table styles if sidebar is not open (Timur)
   + sidebar does not toggle and table style has no own deck, which
 is a requirement to make this function work (Maxim)
   + make the command list TS management functions (Heiko) wont work
 for all modules as it was implemented for sd/ only (Maxim)
   => hide the command at the toolbar, keep it at the notebookbar since
 this usually runs with closed sidebar; create ticket for extra deck,
 if not exist

 * Can't change table row height without selecting the row
   + https://bugs.documentfoundation.org/show_bug.cgi?id=151337
   + no option to enter a precise value at all
   + would expect to get it via spacing before/after and minimum
 height but this doesn't work at all; and spacing between
 only adds on top (Heiko)
   + not really needed in the sd/ context
   => keep ticket with low priority

 * Consider removing Attribute Blinking in Find and Replace dialog
   + https://bugs.documentfoundation.org/show_bug.cgi?id=143886
   + UI access needed for legacy documents (Eike)
   + remove and show an infobar top turn it off (Mike)
   => reopen and follow Mike's idea

 * CHAPTER NUMBERING DIALOG: Add additional option in numbering sublevels
   + https://bugs.documentfoundation.org/show_bug.cgi?id=152256
   + use fields and/or manual input for the extra mile (Heiko)
   + introduce a checkbox "[ ] Apply numbers of this level to shown
 sublevels" (Mike, Dieter)
   => do it

 * Tools>Options>LibreOffice Writer>Table dialog, "Variable" setting
   does not work when resizing cells with keyboard shortcut
   + https://bugs.documentfoundation.org/show_bug.cgi?id=139977
   + cannot follow the issue, options work well (Heiko)
   + Label is not clear, better "Behavior of row/columns via shortcut
 (alt+)"
   + Documentation needs improvement too
   => do it


OpenPGP_signature
Description: OpenPGP digital signature


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

2022-12-01 Thread Rafael Lima (via logerrit)
 dbaccess/inc/helpids.h|3 +++
 dbaccess/source/ui/dlg/dbwizsetup.cxx |4 
 2 files changed, 7 insertions(+)

New commits:
commit 4a3964c904388c433066f7d1ab6f457374618182
Author: Rafael Lima 
AuthorDate: Thu Sep 22 01:18:20 2022 +0200
Commit: Rafael Lima 
CommitDate: Thu Dec 1 14:28:07 2022 +0100

tdf#149221 Handle HID on Database Wizard dialog

This patch sets a help ID (HID) for the Wizard roadmap, so that when the 
focus is not on any specific page the general dialog help page is called.

To finish this patch I'll create an additional patch in the "help" repo to 
define the target HID.

Change-Id: I0fdce25f3b1a92836190e5a03d70a0832e0f1feb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140332
Tested-by: Jenkins
Tested-by: Heiko Tietze 
Reviewed-by: Heiko Tietze 
Reviewed-by: Rafael Lima 

diff --git a/dbaccess/inc/helpids.h b/dbaccess/inc/helpids.h
index 86c233f9d619..2c013c173397 100644
--- a/dbaccess/inc/helpids.h
+++ b/dbaccess/inc/helpids.h
@@ -104,6 +104,9 @@ inline constexpr OStringLiteral HID_DBWIZ_PREVIOUS = 
"DBACCESS_HID_DBWIZ_PREVIOU
 inline constexpr OStringLiteral HID_DBWIZ_NEXT = "DBACCESS_HID_DBWIZ_NEXT";
 inline constexpr OStringLiteral HID_DBWIZ_CANCEL = "DBACCESS_HID_DBWIZ_CANCEL";
 inline constexpr OStringLiteral HID_DBWIZ_FINISH = "DBACCESS_HID_DBWIZ_FINISH";
+inline constexpr OStringLiteral HID_DBWIZ_HELP = "DBACCESS_HID_DBWIZ_HELP";
+
+inline constexpr OStringLiteral HID_DBWIZ_ROADMAP = 
"DBACCESS_HID_DBWIZ_ROADMAP";
 
 #endif
 
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx 
b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 93db6c8fa9d6..d3d4c1dbde16 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -153,10 +153,14 @@ 
ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(weld::Window* _pParent
 aPath.push_back(PAGE_DBSETUPWIZARD_INTRO);
 declarePath( static_cast(m_pCollection->size()+1), aPath);
 
+// Set general help ID for the roadmap
+SetRoadmapHelpId(HID_DBWIZ_ROADMAP);
+
 m_xPrevPage->set_help_id(HID_DBWIZ_PREVIOUS);
 m_xNextPage->set_help_id(HID_DBWIZ_NEXT);
 m_xCancel->set_help_id(HID_DBWIZ_CANCEL);
 m_xFinish->set_help_id(HID_DBWIZ_FINISH);
+m_xHelp->set_help_id(HID_DBWIZ_HELP);
 ActivatePage();
 setTitleBase(DBA_RES(STR_DBWIZARDTITLE));
 m_xAssistant->set_current_page(0);


Re: Installation from LibreOffice on MAC (arm64) with VENTURA.....

2022-12-01 Thread Alexander Thurgood

Le 01/12/2022 à 11:45, Christian Lohmaier a écrit :

Hi all,

I've just downloaded and installed

7.5.00.alpha aarch64

from:

https://dev-builds.libreoffice.org/daily/master/MacOSX-aarch64@tb93-TDF/current/

1st December 2022

I am experiencing the same behaviour as reported by Zhéxué on macOS 
Ventura 13.0 (M1 Silicon).



Selecting the app bundle, right-mouse button clicking and pressing the 
shift key while clicking on open, brings up an error message that 
LibreOfficeDev is damaged and can not be opened.




The same error message appears if I try to launch soffice from the terminal.

The DMG checksum passes "hdiutil verify":

hdiutil: verify: checksum of 
"/Users/alex/Downloads/LibreOfficeDev_7.5.0.0.alpha1_MacOS_aarch64.dmg" 
is VALID




Clearly, something else is wrong.



Alex







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

2022-12-01 Thread Caolán McNamara (via logerrit)
 canvas/source/cairo/cairo_textlayout.cxx |8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 5d4321803007e683968b5622a1685d8aef1e932c
Author: Caolán McNamara 
AuthorDate: Thu Dec 1 11:46:59 2022 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 1 13:57:39 2022 +0100

we only need aOffsets if maLogicalAdvancements.hasElements() is true

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

diff --git a/canvas/source/cairo/cairo_textlayout.cxx 
b/canvas/source/cairo/cairo_textlayout.cxx
index ab38c4458307..ebfcfe6dc11a 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -263,13 +263,11 @@ namespace cairocanvas
 ::osl::MutexGuard aGuard( m_aMutex );
 setupLayoutMode( rOutDev, mnTextDirection );
 
-std::vector aOffsets(maLogicalAdvancements.getLength());
-
-if( maLogicalAdvancements.hasElements() )
-setupTextOffsets( aOffsets.data(), maLogicalAdvancements, 
viewState, renderState );
-
 if (maLogicalAdvancements.hasElements())
 {
+std::vector aOffsets(maLogicalAdvancements.getLength());
+setupTextOffsets( aOffsets.data(), maLogicalAdvancements, 
viewState, renderState );
+
 rOutDev.DrawTextArray( rOutpos, maText.Text, aOffsets, {},

::canvas::tools::numeric_cast(maText.StartPosition),

::canvas::tools::numeric_cast(maText.Length) );


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

2022-12-01 Thread Caolán McNamara (via logerrit)
 vcl/unx/generic/gdi/cairotextrender.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit c27280c512683a52a19af6448f84f0533655d8fa
Author: Caolán McNamara 
AuthorDate: Thu Dec 1 09:45:47 2022 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 1 13:57:21 2022 +0100

ofz#53904 Indirect-leak

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

diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx 
b/vcl/unx/generic/gdi/cairotextrender.cxx
index 0a5ae547360c..3dbaa79cd1e5 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -19,8 +19,8 @@
 
 #include 
 
+#include 
 #include 
-
 #include 
 #include 
 #include 
@@ -180,6 +180,7 @@ void CairoTextRender::DrawTextLayout(const 
GenericSalLayout& rLayout, const SalG
 SAL_WARN("vcl", "no cairo context for text");
 return;
 }
+comphelper::ScopeGuard releaseContext([this, cr]() { 
releaseCairoContext(cr); });
 
 std::vector cairo_glyphs;
 std::vector glyph_extrarotation;
@@ -393,8 +394,6 @@ void CairoTextRender::DrawTextLayout(const 
GenericSalLayout& rLayout, const SalG
 aI = aNext;
 }
 
-releaseCairoContext(cr);
-
 #if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
 if (__lsan_enable)
 __lsan_enable();


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

2022-12-01 Thread offtkp (via logerrit)
 sc/qa/unit/data/xlsx/hiddenButton.xlsx|binary
 sc/qa/unit/subsequent_export_test2.cxx|   15 
 sc/source/filter/excel/excrecds.cxx   |   54 ++
 sc/source/filter/inc/autofilterbuffer.hxx |1 
 sc/source/filter/inc/excrecds.hxx |5 ++
 sc/source/filter/oox/autofilterbuffer.cxx |   18 +-
 6 files changed, 85 insertions(+), 8 deletions(-)

New commits:
commit 2942fdc8dbda375622d0add8c36df2d6679e321a
Author: offtkp 
AuthorDate: Fri Nov 25 15:16:53 2022 +0200
Commit: Tomaž Vajngerl 
CommitDate: Thu Dec 1 13:05:54 2022 +0100

tdf#144786 Implement XML_hiddenButton functionality

Now hides autofilter button when there's an XML_hiddenButton=true
or a XML_showButton=false attribute

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

diff --git a/sc/qa/unit/data/xlsx/hiddenButton.xlsx 
b/sc/qa/unit/data/xlsx/hiddenButton.xlsx
new file mode 100644
index ..20019f4d181b
Binary files /dev/null and b/sc/qa/unit/data/xlsx/hiddenButton.xlsx differ
diff --git a/sc/qa/unit/subsequent_export_test2.cxx 
b/sc/qa/unit/subsequent_export_test2.cxx
index 628401167d5a..77b033d042a3 100644
--- a/sc/qa/unit/subsequent_export_test2.cxx
+++ b/sc/qa/unit/subsequent_export_test2.cxx
@@ -189,6 +189,7 @@ public:
 void testTdf148820();
 void testEmbeddedTextInDecimal();
 void testTotalsRowFunction();
+void testAutofilterHiddenButton();
 
 CPPUNIT_TEST_SUITE(ScExportTest2);
 
@@ -315,6 +316,7 @@ public:
 CPPUNIT_TEST(testTdf148820);
 CPPUNIT_TEST(testEmbeddedTextInDecimal);
 CPPUNIT_TEST(testTotalsRowFunction);
+CPPUNIT_TEST(testAutofilterHiddenButton);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -2849,6 +2851,19 @@ void ScExportTest2::testTotalsRowFunction()
 }
 }
 
+void ScExportTest2::testAutofilterHiddenButton()
+{
+createScDoc("xlsx/hiddenButton.xlsx");
+saveAndReload("Calc Office Open XML");
+xmlDocUniquePtr pDocXml = parseExport("xl/tables/table1.xml");
+CPPUNIT_ASSERT(pDocXml);
+for (int i = 1; i <= 5; i++)
+{
+auto sPath = "/x:table/x:autoFilter/x:filterColumn[" + 
std::to_string(i) + "]";
+assertXPath(pDocXml, sPath.c_str(), "hiddenButton", "1");
+}
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest2);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sc/source/filter/excel/excrecds.cxx 
b/sc/source/filter/excel/excrecds.cxx
index b175445bc388..3feac86be5a2 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -47,6 +47,8 @@
 
 #include 
 #include 
+#include 
+#include 
 
 using namespace ::oox;
 
@@ -603,11 +605,12 @@ void ExcFilterCondition::SaveText( XclExpStream& rStrm )
 }
 }
 
-XclExpAutofilter::XclExpAutofilter( const XclExpRoot& rRoot, sal_uInt16 nC ) :
+XclExpAutofilter::XclExpAutofilter( const XclExpRoot& rRoot, sal_uInt16 nC, 
bool bIsEmpty ) :
 XclExpRecord( EXC_ID_AUTOFILTER, 24 ),
 XclExpRoot( rRoot ),
-meType(FilterCondition),
+meType(bIsEmpty ? Empty : FilterCondition),
 nCol( nC ),
+bIsButtonHidden( false ),
 nFlags( 0 ),
 bHasBlankValue( false )
 {
@@ -818,10 +821,13 @@ void XclExpAutofilter::SaveXml( XclExpXmlStream& rStrm )
 
 sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
 
+std::optional sHiddenButtonValue;
+if (bIsButtonHidden)
+sHiddenButtonValue = "1";
+
 rWorksheet->startElement( XML_filterColumn,
-XML_colId, OString::number(nCol)
-// OOXTODO: XML_hiddenButton,   AutoFilter12 fHideArrow?
-// OOXTODO: XML_showButton
+XML_colId, OString::number(nCol),
+XML_hiddenButton, sHiddenButtonValue
 );
 
 switch (meType)
@@ -911,6 +917,8 @@ void XclExpAutofilter::SaveXml( XclExpXmlStream& rStrm )
 rWorksheet->endElement(XML_filters);
 }
 break;
+// Used for constructing an empty filterColumn element for exporting 
the XML_hiddenButton attribute
+case Empty: break;
 }
 rWorksheet->endElement( XML_filterColumn );
 }
@@ -971,6 +979,8 @@ ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& 
rRoot, SCTAB nTab, const
 boolbContLoop   = true;
 boolbHasOr  = false;
 SCCOLROW nFirstField = aParam.GetEntry( 0 ).nField;
+ScDocument& rDoc = rRoot.GetDoc();
+SCROW nRow = aRange.aStart.Row();
 
 // create AUTOFILTER records for filtered columns
 for( SCSIZE nEntry = 0; !bConflict && bContLoop && (nEntry < 
aParam.GetEntryCount()); nEntry++ )
@@ -980,7 +990,11 @@ ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& 
rRoot, SCTAB nTab, const
 bContLoop = rEntry.bDoQuery;
 if( bContLoop )
 {
-XclExpAutofilter* pFilter = GetByCol( 
static_cast(rEntry.nField) - aRange.aS

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

2022-12-01 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/helper/qahelper.cxx  |5 -
 sc/qa/unit/helper/qahelper.hxx  |2 +-
 sc/qa/unit/subsequent_filters_test2.cxx |5 +++--
 sw/qa/inc/swmodeltestbase.hxx   |5 +
 sw/qa/unit/swmodeltestbase.cxx  |9 +++--
 5 files changed, 20 insertions(+), 6 deletions(-)

New commits:
commit 85fc28d328d7e53e6f263ac6d4ccbbf19d4db3c0
Author: Xisco Fauli 
AuthorDate: Thu Dec 1 11:30:45 2022 +0100
Commit: Xisco Fauli 
CommitDate: Thu Dec 1 13:03:02 2022 +0100

sw: check files are loaded without any warning error

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

diff --git a/sw/qa/inc/swmodeltestbase.hxx b/sw/qa/inc/swmodeltestbase.hxx
index 8b7775f1ae23..dda083f76539 100644
--- a/sw/qa/inc/swmodeltestbase.hxx
+++ b/sw/qa/inc/swmodeltestbase.hxx
@@ -330,6 +330,11 @@ protected:
  */
 SwDoc* getSwDoc();
 
+/**
+ * Gets SwDocShell from loaded component
+ */
+SwDocShell* getSwDocShell();
+
 /**
  * Wraps a reqif-xhtml fragment into an XHTML file, so an XML parser can
  * parse it.
diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx
index a8dfc83493f9..05918c52397a 100644
--- a/sw/qa/unit/swmodeltestbase.cxx
+++ b/sw/qa/unit/swmodeltestbase.cxx
@@ -17,6 +17,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -447,6 +448,8 @@ void SwModelTestBase::loadURL(OUString const& rURL, const 
char* pName, const cha
 
 UnoApiXmlTest::load(rURL, pPassword);
 
+CPPUNIT_ASSERT(!getSwDocShell()->GetMedium()->GetWarningError());
+
 discardDumpedLayout();
 if (pName && mustCalcLayoutOf(pName))
 calcLayout();
@@ -581,12 +584,14 @@ void SwModelTestBase::createSwGlobalDoc(const char* pName)
 
CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.GlobalDocument"));
 }
 
-SwDoc* SwModelTestBase::getSwDoc()
+SwDoc* SwModelTestBase::getSwDoc() { return getSwDocShell()->GetDoc(); }
+
+SwDocShell* SwModelTestBase::getSwDocShell()
 {
 SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
 CPPUNIT_ASSERT(pTextDoc);
 
-return pTextDoc->GetDocShell()->GetDoc();
+return pTextDoc->GetDocShell();
 }
 
 void SwModelTestBase::WrapReqifFromTempFile(SvMemoryStream& rStream)
commit 145dc0c5a00f7ee81cc839c2b506ecbe0f634ea7
Author: Xisco Fauli 
AuthorDate: Thu Dec 1 10:41:29 2022 +0100
Commit: Xisco Fauli 
CommitDate: Thu Dec 1 13:02:47 2022 +0100

sc: check files are loaded without any warning error

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

diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index 336fd5754a29..dd1c6e09708c 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -469,7 +469,7 @@ void ScUcalcTestBase::tearDown()
 test::BootstrapFixture::tearDown();
 }
 
-void ScModelTestBase::createScDoc(const char* pName, const char* pPassword)
+void ScModelTestBase::createScDoc(const char* pName, const char* pPassword, 
bool bCheckWarningError)
 {
 if (!pName)
 load("private:factory/scalc");
@@ -478,6 +478,9 @@ void ScModelTestBase::createScDoc(const char* pName, const 
char* pPassword)
 
 uno::Reference xServiceInfo(mxComponent, 
uno::UNO_QUERY_THROW);
 
CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.sheet.SpreadsheetDocument"));
+
+if (bCheckWarningError)
+CPPUNIT_ASSERT(!getScDocShell()->GetMedium()->GetWarningError());
 }
 
 ScDocument* ScModelTestBase::getScDoc()
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index a8b48f938e01..80e7d53fae1f 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -154,7 +154,7 @@ public:
 {
 }
 
-void createScDoc(const char* pName = nullptr, const char* pPassword = 
nullptr);
+void createScDoc(const char* pName = nullptr, const char* pPassword = 
nullptr, bool bCheckErrorCode = true);
 ScDocument* getScDoc();
 ScDocShell* getScDocShell();
 ScTabViewShell* getViewShell();
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx 
b/sc/qa/unit/subsequent_filters_test2.cxx
index e917d56ba836..d3744d33c86c 100644
--- a/sc/qa/unit/subsequent_filters_test2.cxx
+++ b/sc/qa/unit/subsequent_filters_test2.cxx
@@ -2880,7 +2880,7 @@ void ScFiltersTest2::testTooManyColsRows()
 {
 // The intentionally doc has cells beyond our MAXROW/MAXCOL, so there
 // should be a warning on load.
-createScDoc("ods/too-many-cols-rows.ods");
+createScDoc("ods/too-many-cols-rows.ods", /*pPassword*/ nullptr, 
/*bCheckWarningError*/ false);
 
 ScDocShell* pDocSh = getScDocShell();
 SfxMedium* pMedium = pDocSh->GetMedium();
@@ -2888,7 +2888,8 @@ void ScFiltersTest2::t

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

2022-12-01 Thread Caolán McNamara (via logerrit)
 sw/source/ui/config/optload.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 05776b4304485490760fb5213066a094c6e9600a
Author: Caolán McNamara 
AuthorDate: Thu Dec 1 09:14:48 2022 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Dec 1 12:48:37 2022 +0100

Resolves: tdf#152329 Caption preview font is black when using OS dark mode

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

diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 9f0531b77a67..1885c06ecf9d 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -375,10 +375,12 @@ SwCaptionPreview::SwCaptionPreview()
 
 void SwCaptionPreview::ApplySettings(vcl::RenderContext& rRenderContext)
 {
-Wallpaper 
aBack(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor());
+const StyleSettings& rSettings = 
rRenderContext.GetSettings().GetStyleSettings();
+Wallpaper aBack(rSettings.GetWindowColor());
 rRenderContext.SetBackground(aBack);
 rRenderContext.SetFillColor(aBack.GetColor());
 rRenderContext.SetLineColor(aBack.GetColor());
+rRenderContext.SetTextColor(rSettings.GetWindowTextColor());
 
 if (!mbFontInitialized)
 {


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

2022-12-01 Thread Xisco Fauli (via logerrit)
 include/sfx2/docfile.hxx|2 ++
 sc/qa/unit/filters-test.cxx |   25 -
 sc/qa/unit/subsequent_filters_test2.cxx |   24 
 sfx2/source/doc/docfile.cxx |   12 
 sfx2/source/doc/sfxbasemodel.cxx|2 ++
 5 files changed, 40 insertions(+), 25 deletions(-)

New commits:
commit 29dad1e4545c877bcf8e9bb23359d4eb39251938
Author: Xisco Fauli 
AuthorDate: Wed Nov 30 17:46:35 2022 +0100
Commit: Xisco Fauli 
CommitDate: Thu Dec 1 12:39:53 2022 +0100

sc: move test back where it belongs

This test was moved from sc/qa/unit/subsequent_filters_test2.cxx
to sc/qa/unit/filters-test.cxx in ad40ad91c5400391a0848832e91c596be8fbd811
"CppunitTest_sc_subsequent_filters_test2: inherit from UnoApiXmlTest".
As the commit message says:

I couldn't find a way to test testTooManyColsRows,
move it to sc/qa/unit/filters-test.cxx for the
time being

The problem is that using loadFromDestkop resets the Error in
sfx2/source/doc/sfxbasemodel.cxx:2005 - 
m_pData->m_pObjectShell->ResetError();
so add a way to log the WarningError in SfxMedium

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

diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index ff3ea024e19b..15ec85a5f928 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -146,9 +146,11 @@ public:
 ErrCode GetErrorCode() const;
 ErrCode GetError() const
 { return GetErrorCode().IgnoreWarning(); }
+ErrCode GetWarningError() const;
 ErrCode const & GetLastStorageCreationState() const;
 
 voidSetError(ErrCode nError);
+voidSetWarningError(ErrCode nWarningError);
 
 voidCloseInStream();
 voidCloseOutStream();
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index c165869a1afb..63ae46860c4d 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -53,13 +53,11 @@ public:
 void testCVEs();
 
 void testContentofz9704();
-void testTooManyColsRows();
 void testTdf90299();
 
 CPPUNIT_TEST_SUITE(ScFiltersTest);
 CPPUNIT_TEST(testCVEs);
 CPPUNIT_TEST(testContentofz9704);
-CPPUNIT_TEST(testTooManyColsRows);
 CPPUNIT_TEST(testTdf90299);
 
 CPPUNIT_TEST_SUITE_END();
@@ -133,29 +131,6 @@ void ScFiltersTest::testContentofz9704()
 TestImportWKS(aFileStream);
 }
 
-void ScFiltersTest::testTooManyColsRows()
-{
-// The intentionally doc has cells beyond our MAXROW/MAXCOL, so there
-// should be a warning on load.
-OUString aFileName;
-createFileURL(u"too-many-cols-rows.", u"ods", aFileName );
-ScDocShellRef xDocSh = loadDoc(aFileName, "calc8", OUString(), OUString(),
-ODS_FORMAT_TYPE, SotClipboardFormatId::STARCALC_8);
-
-CPPUNIT_ASSERT(xDocSh->GetErrorCode() == SCWARN_IMPORT_ROW_OVERFLOW
-   || xDocSh->GetErrorCode() == SCWARN_IMPORT_COLUMN_OVERFLOW);
-xDocSh->DoClose();
-
-createFileURL(u"too-many-cols-rows.", u"xlsx", aFileName );
-xDocSh = loadDoc(
-aFileName, "Calc Office Open XML", OUString(), OUString(),
-XLSX_FORMAT_TYPE, SotClipboardFormatId::STARCALC_8);
-
-CPPUNIT_ASSERT(xDocSh->GetErrorCode() == SCWARN_IMPORT_ROW_OVERFLOW
-   || xDocSh->GetErrorCode() == SCWARN_IMPORT_COLUMN_OVERFLOW);
-xDocSh->DoClose();
-}
-
 void ScFiltersTest::testTdf90299()
 {
 const OUString aTmpDirectory1URL = utl::CreateTempURL(nullptr, true);
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx 
b/sc/qa/unit/subsequent_filters_test2.cxx
index fbaef3eb464f..e917d56ba836 100644
--- a/sc/qa/unit/subsequent_filters_test2.cxx
+++ b/sc/qa/unit/subsequent_filters_test2.cxx
@@ -14,6 +14,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -187,6 +188,7 @@ public:
 void testTdf139763ShapeAnchor();
 void testAutofilterNamedRangesXLSX();
 void testInvalidBareBiff5();
+void testTooManyColsRows();
 void testTdf83671_SmartArt_import();
 void testTdf83671_SmartArt_import2();
 void testTdf151818_SmartArtFontColor();
@@ -306,6 +308,7 @@ public:
 CPPUNIT_TEST(testTdf139763ShapeAnchor);
 CPPUNIT_TEST(testAutofilterNamedRangesXLSX);
 CPPUNIT_TEST(testInvalidBareBiff5);
+CPPUNIT_TEST(testTooManyColsRows);
 CPPUNIT_TEST(testTdf83671_SmartArt_import);
 CPPUNIT_TEST(testTdf83671_SmartArt_import2);
 CPPUNIT_TEST(testTdf151818_SmartArtFontColor);
@@ -2873,6 +2876,27 @@ void ScFiltersTest2::testInvalidBareBiff5()
 CPPUNIT_ASSERT_EQUAL(OUString(), pDoc->GetString(aPos));
 }
 
+void ScFiltersTest2::testTooManyColsRows()
+{
+// The intentionally doc has cells beyond our MAXROW/MAX

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

2022-12-01 Thread Rafael Lima (via logerrit)
 basctl/sdi/baside.sdi|   11 
 basctl/source/basicide/baside2.hxx   |4 +
 basctl/source/basicide/baside2b.cxx  |   36 ++-
 basctl/source/basicide/basides1.cxx  |   54 +++
 basctl/source/basicide/basidesh.cxx  |   26 +++
 basctl/source/basicide/linenumberwindow.cxx  |5 +-
 basctl/source/inc/basidesh.hxx   |   13 +
 basctl/uiconfig/basicide/statusbar/statusbar.xml |2 
 include/sfx2/sfxsids.hrc |1 
 sfx2/sdi/sfx.sdi |   19 
 10 files changed, 165 insertions(+), 6 deletions(-)

New commits:
commit 0d9231f2133def9254e0220b8033a46e5fc17658
Author: Rafael Lima 
AuthorDate: Wed Nov 23 22:35:59 2022 +0100
Commit: Rafael Lima 
CommitDate: Thu Dec 1 12:33:45 2022 +0100

tdf#152078 Add a Zoom slider to the Basic IDE

This patch adds a ZoomSlider to thee Basic IDE. It has the following 
characteristics:
- The Zoom varies from 50% to 400% considering that 100% is the font size 
defined in Tools - Options - Fonts dialog.
- All open editor windows use the same Zoom factor
- The zoom level is saved and restored across sessions

Change-Id: I63df02d0dc828fca4360d61b8aa2c7af6610d4db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143159
Tested-by: Jenkins
Tested-by: Heiko Tietze 
Reviewed-by: Heiko Tietze 

diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index 192b6cdc06c4..c1fc9b4f39e3 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -331,6 +331,16 @@ shell basctl_Shell
 StateMethod = GetState;
 ]
 
+SID_ATTR_ZOOMSLIDER
+[
+ExecMethod  = ExecuteGlobal;
+StateMethod = GetState;
+]
+
+SID_BASICIDE_CURRENT_ZOOM
+[
+StateMethod = GetState;
+]
 
 // Only, when BasicWindow up
 
@@ -657,4 +667,3 @@ shell basctl_DocShell
 {
 import BasicIDEDocument;
 }
-
diff --git a/basctl/source/basicide/baside2.hxx 
b/basctl/source/basicide/baside2.hxx
index 38ca2aec6ea7..969f823b91a1 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -97,6 +97,7 @@ private:
 
 voidImpDoHighlight( sal_uInt32 nLineOff );
 voidImplSetFont();
+sal_uInt16  nCurrentZoomLevel;
 
 boolbHighlighting;
 boolbDoSyntaxHighlight;
@@ -154,6 +155,9 @@ public:
 voidChangeFontColor( Color aColor );
 voidUpdateSyntaxHighlighting ();
 
+voidSetEditorZoomLevel(sal_uInt16 nNewZoomLevel);
+sal_uInt16  GetCurrentZoom() { return nCurrentZoomLevel; }
+
 boolGetProcedureName(std::u16string_view rLine, OUString& 
rProcType, OUString& rProcName) const;
 
 FactoryFunction GetUITestFactory() const override;
diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 2f768ed3077c..89edcec40f32 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -262,6 +263,10 @@ EditorWindow::EditorWindow (vcl::Window* pParent, 
ModulWindow* pModulWindow) :
 std::unique_lock g(mutex_);
 notifier_ = n;
 }
+
+// The zoom level applied to the editor window is the zoom slider value in 
the shell
+nCurrentZoomLevel = GetShell()->GetCurrentZoomSliderValue();
+
 const Sequence aPropertyNames{"FontHeight", "FontName"};
 n->addPropertiesChangeListener(aPropertyNames, listener_);
 }
@@ -1232,6 +1237,7 @@ void EditorWindow::UpdateSyntaxHighlighting ()
 
 void EditorWindow::ImplSetFont()
 {
+// Get default font name and height defined in the Options dialog
 OUString 
sFontName(officecfg::Office::Common::Font::SourceViewFont::FontName::get().value_or(OUString()));
 if (sFontName.isEmpty())
 {
@@ -1240,7 +1246,12 @@ void EditorWindow::ImplSetFont()
 
GetDefaultFontFlags::NONE, GetOutDev()));
 sFontName = aTmpFont.GetFamilyName();
 }
-Size aFontSize(0, 
officecfg::Office::Common::Font::SourceViewFont::FontHeight::get());
+sal_uInt16 nDefaultFontHeight = 
officecfg::Office::Common::Font::SourceViewFont::FontHeight::get();
+
+// Calculate font size considering zoom level
+sal_uInt16 nNewFontHeight = nDefaultFontHeight * 
(static_cast(nCurrentZoomLevel) / 100);
+Size aFontSize(0, nNewFontHeight);
+
 vcl::Font aFont(sFontName, aFontSize);
 aFont.SetColor(rModulWindow.GetLayout().GetFontColor());
 SetPointFont(*GetOutDev(), aFont); // FIXME RenderContext
@@ -1248,6 +1259,7 @@ void EditorWindow::ImplSetFont()
 
 rModulWindow.GetBreakPointWindow().SetFont(aFont);
 rModulWindow.GetLineNumberWindow().SetFont(aFont);
+rModulWindow.Inva

Re: Installation from LibreOffice on MAC (arm64) with VENTURA.....

2022-12-01 Thread Christian Lohmaier
Hi *.

On Thu, Dec 1, 2022 at 10:20 AM Zhéxué M. Krawutschke
 wrote:
>
> Good morning, everyone.
>
> Thank you very much for the tip with the OPTION button; unfortunately it did 
> not work on my MAC today. Even with the latest version of 7.5.0 -alpha1. 
> I don't know what else could be the reason for this. I also tried to download 
> it from another computer and then install it there, but that didn't work 
> either…..

To be clear: to open the builds from the daily builders: Use
context-menu on the app, and hold down option key while selecting
"open" - that will show a "open anyway" along with the option to move
to trash or cancel the action. This is normal for stuff that is not
signed/notarized.

The builds in pre-releases folder, the ones officially provided by TDF
are signed and notarized, and should show the "Apple has checked for
malware and didn't find any" prompt asking whether you want to open it
or not.

so: https://dev-builds.libreoffice.org/daily/master/ ← daily builds
not signed, not notarized, need option-open (or going to security
settings and confirming the exception)

https://dev-builds.libreoffice.org/pre-releases/ ← staging directory
for official builds, signed and notarized.

So use the build here:
https://dev-builds.libreoffice.org/pre-releases/mac/aarch64/LibreOfficeDev_7.5.0.0.alpha1_MacOS_aarch64.dmg
and that should work just like 7.4.3

ciao
Christian


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

2022-12-01 Thread Caolán McNamara (via logerrit)
 sw/source/ui/config/optload.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit d45d65559f11ecb34b14e3b5c838391c62c8c694
Author: Caolán McNamara 
AuthorDate: Thu Dec 1 09:14:48 2022 +
Commit: Caolán McNamara 
CommitDate: Thu Dec 1 11:08:20 2022 +0100

Resolves: tdf#152329 Caption preview font is black when using OS dark mode

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

diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 9e3ba24a1f92..93d6b7e4dabe 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -375,10 +375,12 @@ SwCaptionPreview::SwCaptionPreview()
 
 void SwCaptionPreview::ApplySettings(vcl::RenderContext& rRenderContext)
 {
-Wallpaper 
aBack(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor());
+const StyleSettings& rSettings = 
rRenderContext.GetSettings().GetStyleSettings();
+Wallpaper aBack(rSettings.GetWindowColor());
 rRenderContext.SetBackground(aBack);
 rRenderContext.SetFillColor(aBack.GetColor());
 rRenderContext.SetLineColor(aBack.GetColor());
+rRenderContext.SetTextColor(rSettings.GetWindowTextColor());
 
 if (!mbFontInitialized)
 {


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

2022-12-01 Thread Maxim Monastirsky (via logerrit)
 sd/source/ui/table/TableDesignPane.cxx |   35 ++---
 1 file changed, 20 insertions(+), 15 deletions(-)

New commits:
commit 6d77d826c15807e80ccfff749908332e09c9f6f6
Author: Maxim Monastirsky 
AuthorDate: Wed Nov 30 22:47:04 2022 +0200
Commit: Maxim Monastirsky 
CommitDate: Thu Dec 1 10:59:54 2022 +0100

sd: sensible naming for created cell styles

Instead of "user1", "user2" etc. now we have
- e.g. magenta-dark-first-row,
which makes them a lot easier to identify.

Change-Id: I2db5e20f5f1d46d14034acb15b0f95c58a3f7611
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143514
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/sd/source/ui/table/TableDesignPane.cxx 
b/sd/source/ui/table/TableDesignPane.cxx
index aa331c3dcda1..cab67aa87f4f 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -97,6 +97,8 @@ const std::string_view gPropNames[CB_COUNT] =
 "UseBandingColumnStyle"
 };
 
+constexpr std::u16string_view aTableStyleBaseName = u"table";
+
 TableDesignWidget::TableDesignWidget(weld::Builder& rBuilder, ViewShellBase& 
rBase)
 : mrBase(rBase)
 , m_xMenu(rBuilder.weld_menu("menu"))
@@ -207,15 +209,14 @@ IMPL_LINK(TableDesignWidget, implContextMenuHandler, 
const Point*, pPoint, void)
 
 namespace
 {
-OUString getNewValidTableStyleName(const Reference& 
rTableFamily)
+OUString getNewStyleName(const Reference& rFamily, 
std::u16string_view rBaseName)
 {
-OUString aName;
+OUString aName(rBaseName);
 sal_Int32 nIndex = 1;
-do
+while(rFamily->hasByName(aName))
 {
-aName = "table" + OUString::number(nIndex++);
+aName = rBaseName + OUString::number(nIndex++);
 }
-while(rTableFamily->hasByName(aName));
 
 return aName;
 }
@@ -228,7 +229,7 @@ void TableDesignWidget::InsertStyle()
 Reference xFactory(mxTableFamily, 
UNO_QUERY_THROW);
 Reference xTableFamily(mxTableFamily, UNO_QUERY_THROW);
 Reference xTableStyle(xFactory->createInstance(), 
UNO_QUERY_THROW);
-const OUString aName(getNewValidTableStyleName(xTableFamily));
+const OUString aName(getNewStyleName(xTableFamily, 
aTableStyleBaseName));
 xTableFamily->insertByName(aName, Any(xTableStyle));
 
 Reference xCellStyle(mxCellFamily->getByName("default"), 
UNO_QUERY_THROW);
@@ -255,33 +256,35 @@ void TableDesignWidget::CloneStyle()
 {
 try
 {
-Reference 
xSrcTableStyle(mxTableFamily->getByIndex(m_xValueSet->GetSelectedItemId() - 1), 
UNO_QUERY_THROW);
+Reference 
xSrcTableStyle(mxTableFamily->getByIndex(m_xValueSet->GetSelectedItemId() - 1), 
UNO_QUERY_THROW);
 
 Reference xFactory(mxTableFamily, 
UNO_QUERY_THROW);
 Reference xTableFamily(mxTableFamily, UNO_QUERY_THROW);
-Reference xDestTableStyle(xFactory->createInstance(), 
UNO_QUERY_THROW);
-const OUString aName(getNewValidTableStyleName(xTableFamily));
+Reference xDestTableStyle(xFactory->createInstance(), 
UNO_QUERY_THROW);
+const OUString aName(getNewStyleName(xTableFamily, 
aTableStyleBaseName));
 xTableFamily->insertByName(aName, Any(xDestTableStyle));
 
-for (sal_Int32 i = 0; i < xDestTableStyle->getCount(); ++i)
+auto aNames(xSrcTableStyle->getElementNames());
+for (const auto& name : aNames)
 {
-Reference xSrcCellStyle(xSrcTableStyle->getByIndex(i), 
UNO_QUERY);
+Reference xSrcCellStyle(xSrcTableStyle->getByName(name), 
UNO_QUERY);
 if (xSrcCellStyle && xSrcCellStyle->isUserDefined())
 {
 Reference xCellFactory(mxCellFamily, 
UNO_QUERY_THROW);
 Reference 
xDestCellStyle(xCellFactory->createInstance(), UNO_QUERY_THROW);
 
xDestCellStyle->setParentStyle(xSrcCellStyle->getParentStyle());
-mxCellFamily->insertByName(xDestCellStyle->getName(), 
Any(xDestCellStyle));
+const OUString aStyleName(getNewStyleName(mxCellFamily, 
Concat2View(aName + "-" + name)));
+mxCellFamily->insertByName(aStyleName, Any(xDestCellStyle));
 
 rtl::Reference xSrcStyleSheet = 
static_cast(xSrcCellStyle.get());
 rtl::Reference xDestStyleSheet = 
static_cast(xDestCellStyle.get());
 
 
xDestStyleSheet->GetItemSet().Put(xSrcStyleSheet->GetItemSet());
 
-xDestTableStyle->replaceByIndex(i, Any(xDestCellStyle));
+xDestTableStyle->replaceByName(name, Any(xDestCellStyle));
 }
 else
-xDestTableStyle->replaceByIndex(i, Any(xSrcCellStyle));
+xDestTableStyle->replaceByName(name, Any(xSrcCellStyle));
 }
 
 updateControls();
@@ -386,7 +389,9 @@ void TableDesignWidget::EditStyle(std::string_view rCommand)
 
 if (!bUserDefi

Re: Installation from LibreOffice on MAC (arm64) with VENTURA.....

2022-12-01 Thread Zhéxué M. Krawutschke
...thank you very much, I have already tried that.

I always get the message that the software is "corrupted" and that I can't 
start it because of that. This is not the same as the error regarding unknown 
developers... This is really a different error...

--
Sent from Canary (https://canarymail.io)

> On Donnerstag, Dez. 01, 2022 at 10:21 AM, Ilmari Lauhakangas 
>  (mailto:ilmari.lauhakan...@libreoffice.org)> wrote:
> On 1.12.2022 11.19, Zhéxué M. Krawutschke wrote:
> > Good morning, everyone.
> >
> > Thank you very much for the tip with the OPTION button; unfortunately it
> > did not work on my MAC today. Even with the latest version of 7.5.0
> > -alpha1. I don't know what else could be the reason for this. I also
> > tried to download it from another computer and then install it there,
> > but that didn't work either…..
> >
> > best regards
> >
> >
> > Z. Matthias
> >
> >
> > --
> > Sent from Canary 
> >
> > On Donnerstag, Dez. 01, 2022 at 9:53 AM, Stephan Bergmann
> > mailto:sberg...@redhat.com>> wrote:
> > On 30/11/2022 13:58, Zhéxué M. Krawutschke wrote:
> > > Today  I wanted to install the 5.0.0
> > > alpha1 - version on my Macbook AIR (arm64) and with every version
> > > I get
> > > when starting the program that the program would be corrupted & it
> > > would
> > > be better to put the program in the "trash".
> >
> > Quoting from a #libreoffice-dev IRC conversation yesterday:
> >
> > > Nov 30 16:51:04  buovjaga: re mac 7.5.0 alpha1 that is easy
> > > - Poster used a daily build that is not signed nor notarized, so
> > > would need to hold down the option key while opening to be able to
> > > run nevertheless.
>
> Also check this:
> https://support.apple.com/guide/mac-help/open-a-mac-app-from-an-unidentified-developer-mh40616/13.0/mac/13.0
>
> Ilmari
>


signature.asc
Description: PGP signature


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

2022-12-01 Thread Daniel Lohmann (via logerrit)
 sdext/source/presenter/PresenterScreen.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 9db4f60bfc5aa90a9062e429a07889b60ae99e9c
Author: Daniel Lohmann 
AuthorDate: Sun Nov 27 19:54:15 2022 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Dec 1 10:53:32 2022 +0100

tdf#92717 Presenter screen on one monitor

If the presenter screen should be shown as normal window (not a
full screen window) the presenter screen can also be shown on one
monitor, as then the presenter screen can be minimized.

This is a follow up to a15bcda0e21be04bec424172192f2416b7f52422

Change-Id: I6fd19aa120a0b0e894b156b4bd10059741f91dc5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143355
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/sdext/source/presenter/PresenterScreen.cxx 
b/sdext/source/presenter/PresenterScreen.cxx
index c4f2cda50f3e..cf24a26f7bf1 100644
--- a/sdext/source/presenter/PresenterScreen.cxx
+++ b/sdext/source/presenter/PresenterScreen.cxx
@@ -465,17 +465,19 @@ sal_Int32 PresenterScreen::GetPresenterScreenNumber (
 // There is either only one screen or the full screen
 // presentation spans all available screens.  The presenter
 // screen is shown only when a special flag in the configuration
-// is set.
+// is set or when the presenter screen will be shown as
+// non-full screen window
 Reference xContext (mxContextWeak);
 PresenterConfigurationAccess aConfiguration (
 xContext,
 "/org.openoffice.Office.PresenterScreen/",
 PresenterConfigurationAccess::READ_ONLY);
 bool bStartAlways (false);
+bool bPresenterScreenFullScreen = 
isPresenterScreenFullScreen(xContext);
 if (aConfiguration.GetConfigurationNode(
 "Presenter/StartAlways") >>= bStartAlways)
 {
-if (bStartAlways)
+if (bStartAlways || !bPresenterScreenFullScreen)
 return GetPresenterScreenFromScreen(nScreenNumber);
 }
 return -1;


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

2022-12-01 Thread Armin Le Grand (allotropia) (via logerrit)
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit 082f0b250a04e16d608ce67e08e702874f390b15
Author: Armin Le Grand (allotropia) 
AuthorDate: Wed Nov 30 17:12:59 2022 +0100
Commit: Armin Le Grand 
CommitDate: Thu Dec 1 10:41:20 2022 +0100

Handle PolyPolygonGraphicPrimitive2D with used DefinitionRange correctly

If the range which defines the bitmap fill is defined and different from
the range of the defining geometry (e.g. used for FillStyle
UseSlideBackground) this cannot be expressed in a SvtGraphicFill data
package. Thus, just use decomposition here directly. See also
tdf#149754 in drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
and the comment there for more info.

Change-Id: I8e1b26fb2bf523e6fd7af1040166f8197747e7ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143503
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index e771d2466b1d..393fbfee9cfc 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1789,6 +1789,16 @@ void 
VclMetafileProcessor2D::processPolyPolygonGraphicPrimitive2D(
 // need to handle PolyPolygonGraphicPrimitive2D here to support 
XPATHFILL_SEQ_BEGIN/XPATHFILL_SEQ_END
 basegfx::B2DPolyPolygon 
aLocalPolyPolygon(rBitmapCandidate.getB2DPolyPolygon());
 
+if (!rBitmapCandidate.getDefinitionRange().isEmpty()
+&& aLocalPolyPolygon.getB2DRange() != 
rBitmapCandidate.getDefinitionRange())
+{
+// The range which defines the bitmap fill is defined and different 
from the
+// range of the defining geometry (e.g. used for FillStyle 
UseSlideBackground).
+// This cannot be done calling vcl, thus use decomposition here 
directly
+process(rBitmapCandidate);
+return;
+}
+
 fillPolyPolygonNeededToBeSplit(aLocalPolyPolygon);
 
 std::unique_ptr pSvtGraphicFill;


Re: Installation from LibreOffice on MAC (arm64) with VENTURA.....

2022-12-01 Thread Ilmari Lauhakangas

On 1.12.2022 11.19, Zhéxué M. Krawutschke wrote:

Good morning, everyone.

Thank you very much for the tip with the OPTION button; unfortunately it 
did not work on my MAC today. Even with the latest version of 7.5.0 
-alpha1. I don't know what else could be the reason for this. I also 
tried to download it from another computer and then install it there, 
but that didn't work either…..


best regards


Z. Matthias


--
Sent from Canary 

On Donnerstag, Dez. 01, 2022 at 9:53 AM, Stephan Bergmann
mailto:sberg...@redhat.com>> wrote:
On 30/11/2022 13:58, Zhéxué M. Krawutschke wrote:

Today  I wanted to install the 5.0.0
alpha1 - version on my Macbook AIR (arm64) and with every version
I get
when starting the program that the program would be corrupted & it
would
be better to put the program in the "trash".


Quoting from a #libreoffice-dev IRC conversation yesterday:


Nov 30 16:51:04  buovjaga: re mac 7.5.0 alpha1 that is easy
- Poster used a daily build that is not signed nor notarized, so
would need to hold down the option key while opening to be able to
run nevertheless.


Also check this: 
https://support.apple.com/guide/mac-help/open-a-mac-app-from-an-unidentified-developer-mh40616/13.0/mac/13.0


Ilmari


Re: Installation from LibreOffice on MAC (arm64) with VENTURA.....

2022-12-01 Thread Zhéxué M. Krawutschke
Good morning, everyone.

Thank you very much for the tip with the OPTION button; unfortunately it did 
not work on my MAC today. Even with the latest version of 7.5.0 -alpha1. I 
don't know what else could be the reason for this. I also tried to download it 
from another computer and then install it there, but that didn't work either…..

best regards

Z. Matthias

--
Sent from Canary (https://canarymail.io)

> On Donnerstag, Dez. 01, 2022 at 9:53 AM, Stephan Bergmann 
> mailto:sberg...@redhat.com)> wrote:
> On 30/11/2022 13:58, Zhéxué M. Krawutschke wrote:
> > Today  I wanted to install the 5.0.0
> > alpha1 - version on my Macbook AIR (arm64) and with every version I get
> > when starting the program that the program would be corrupted & it would
> > be better to put the program in the "trash".
>
> Quoting from a #libreoffice-dev IRC conversation yesterday:
>
> > Nov 30 16:51:04  buovjaga: re mac 7.5.0 alpha1 that is easy - Poster 
> > used a daily build that is not signed nor notarized, so would need to hold 
> > down the option key while opening to be able to run nevertheless.
>
>


signature.asc
Description: PGP signature


Re: Installation from LibreOffice on MAC (arm64) with VENTURA.....

2022-12-01 Thread Stephan Bergmann

On 30/11/2022 13:58, Zhéxué M. Krawutschke wrote:
Today  I wanted to install the 5.0.0 
alpha1 - version on my Macbook AIR (arm64) and with every version I get 
when starting the program that the program would be corrupted & it would 
be better to put the program in the "trash".


Quoting from a #libreoffice-dev IRC conversation yesterday:


Nov 30 16:51:04buovjaga: re mac 7.5.0 alpha1 that is easy -  Poster 
used a daily build that is not signed nor notarized, so would need to hold down the 
option key while opening to be able to run nevertheless.





Re: Installation from LibreOffice on MAC (arm64) with VENTURA.....

2022-12-01 Thread Stéphane Guillou

Hi Matthias

Thank you for the report.

Please have a look on Bugzilla to see if the issue has already been 
reported, and if not, please feel free to report the issue in a new one: 
https://bugs.documentfoundation.org/


Much appreciated!

On 30/11/22 13:58, Zhéxué M. Krawutschke wrote:

Hello all,

Today  I wanted to install the 5.0.0 
alpha1 - version on my Macbook AIR (arm64) and with every version I 
get when starting the program that the program would be corrupted & it 
would be better to put the program in the "trash".


However, version 4.3.x runs perfectly...
Since I would like to help you very much as a "BETA tester", I would 
be very happy if I can /may be of help to you here as well.


Kind regards from Berlin….



Z. Matthias Krawutschke


--
Stéphane Guillou
Quality Assurance Analyst | The Document Foundation

Email:stephane.guil...@libreoffice.org
Mobile (France): +33 7 79 67 18 72
Matrix: @stragu:matrix.org
Fediverse: @str...@mastodon.indie.host
Web:https://stragu.gitlab.io/