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

2023-10-18 Thread Stephan Bergmann (via logerrit)
 sd/source/ui/sidebar/LayoutMenu.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 37298c29e775c0715c779e7d2be3902290556d17
Author: Stephan Bergmann 
AuthorDate: Wed Oct 18 20:52:41 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Oct 19 08:47:14 2023 +0200

Use std::u16string_view instead of OUStringLiteral

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

diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx 
b/sd/source/ui/sidebar/LayoutMenu.cxx
index fd6bc32c58bf..bf3ff1257e99 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -82,7 +82,7 @@ struct snew_slide_value_info
 
 }
 
-constexpr OUStringLiteral EMPTY = u"";
+constexpr std::u16string_view EMPTY = u"";
 
 constexpr snew_slide_value_info notes[] =
 {


Re: LLVM exit code 139 building git master on Xubuntu 22.04

2023-10-18 Thread Stephan Bergmann

On 10/18/23 23:08, David Gerard wrote:

I just tried again from a completely fresh git clone, and it's still
happening. Any ideas? Is there anything in the new C++20 conf that's
too new for llvm 14.0.0 Ubuntu version?


Smells like a bug in that particular version of Clang.  I'd follow the 
printed instructions to report it, either directly upstream at LLVM or 
(presumably better) at Ubuntu first.




[Libreoffice-commits] core.git: sc/UITest_calc_tests7.mk sc/UITest_calc_tests8.mk sc/UITest_calc_tests9.mk sc/UITest_search_replace.mk sd/UITest_impress_tests.mk sw/UITest_sw_findReplace.mk sw/UITest_

2023-10-18 Thread Miklos Vajna (via logerrit)
 sc/UITest_calc_tests7.mk|2 ++
 sc/UITest_calc_tests8.mk|2 ++
 sc/UITest_calc_tests9.mk|2 ++
 sc/UITest_search_replace.mk |3 +++
 sd/UITest_impress_tests.mk  |2 ++
 sw/UITest_sw_findReplace.mk |4 
 sw/UITest_sw_sidebar.mk |4 
 sw/UITest_sw_table.mk   |4 
 sw/UITest_writer_macro_tests.mk |4 
 sw/UITest_writer_tests.mk   |4 
 sw/UITest_writer_tests5.mk  |4 
 11 files changed, 35 insertions(+)

New commits:
commit 322044e128d86b1fd4a09c42f4950bf0f1cf4535
Author: Miklos Vajna 
AuthorDate: Wed Oct 18 20:06:36 2023 +0200
Commit: Miklos Vajna 
CommitDate: Thu Oct 19 08:21:51 2023 +0200

uitest oneprocess mode: explicitly avoid this in the remaining tests

These 11 suites depended on the UITest default to not use oneprocess
mode. Explicitly avoid that mode in these suites, because they currently
fail that way. This allows changing the default in the future, so new
suites automatically benefit from the oneprocess mode (it runs faster,
somewhat similar to cppunit).

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

diff --git a/sc/UITest_calc_tests7.mk b/sc/UITest_calc_tests7.mk
index b2e19b118ac0..8a6259c10550 100644
--- a/sc/UITest_calc_tests7.mk
+++ b/sc/UITest_calc_tests7.mk
@@ -17,4 +17,6 @@ $(eval $(call gb_UITest_set_defs,calc_tests7, \
 TDOC="$(SRCDIR)/sc/qa/uitest/data" \
 ))
 
+$(eval $(call gb_UITest_avoid_oneprocess,calc_tests7))
+
 # vim: set noet sw=4 ts=4:
diff --git a/sc/UITest_calc_tests8.mk b/sc/UITest_calc_tests8.mk
index 255dc2ec49d0..64167e45d0e7 100644
--- a/sc/UITest_calc_tests8.mk
+++ b/sc/UITest_calc_tests8.mk
@@ -17,4 +17,6 @@ $(eval $(call gb_UITest_set_defs,calc_tests8, \
 TDOC="$(SRCDIR)/sc/qa/uitest/data" \
 ))
 
+$(eval $(call gb_UITest_avoid_oneprocess,calc_tests8))
+
 # vim: set noet sw=4 ts=4:
diff --git a/sc/UITest_calc_tests9.mk b/sc/UITest_calc_tests9.mk
index bba170fdf80f..b84b25deb0de 100644
--- a/sc/UITest_calc_tests9.mk
+++ b/sc/UITest_calc_tests9.mk
@@ -17,4 +17,6 @@ $(eval $(call gb_UITest_set_defs,calc_tests9, \
 TDOC="$(SRCDIR)/sc/qa/uitest/data" \
 ))
 
+$(eval $(call gb_UITest_avoid_oneprocess,calc_tests9))
+
 # vim: set noet sw=4 ts=4:
diff --git a/sc/UITest_search_replace.mk b/sc/UITest_search_replace.mk
index 1400c8f27260..e737800cb4e8 100644
--- a/sc/UITest_search_replace.mk
+++ b/sc/UITest_search_replace.mk
@@ -16,4 +16,7 @@ $(eval $(call 
gb_UITest_add_modules,search_replace,$(SRCDIR)/sc/qa/uitest,\
 $(eval $(call gb_UITest_set_defs,search_replace, \
 TDOC="$(SRCDIR)/sc/qa/uitest/data/search_replace" \
 ))
+
+$(eval $(call gb_UITest_avoid_oneprocess,search_replace))
+
 # vim: set noet sw=4 ts=4:
diff --git a/sd/UITest_impress_tests.mk b/sd/UITest_impress_tests.mk
index e1f6c47ff2c7..f2c074fe5246 100644
--- a/sd/UITest_impress_tests.mk
+++ b/sd/UITest_impress_tests.mk
@@ -15,4 +15,6 @@ $(eval $(call gb_UITest_set_defs,impress_tests, \
 TDOC="$(SRCDIR)/sd/qa/uitest/data" \
 ))
 
+$(eval $(call gb_UITest_avoid_oneprocess,impress_tests))
+
 # vim: set noet sw=4 ts=4:
diff --git a/sw/UITest_sw_findReplace.mk b/sw/UITest_sw_findReplace.mk
index cfcf6e8218b5..72caa3cd9ed5 100644
--- a/sw/UITest_sw_findReplace.mk
+++ b/sw/UITest_sw_findReplace.mk
@@ -14,3 +14,7 @@ $(eval $(call 
gb_UITest_add_modules,sw_findReplace,$(SRCDIR)/sw/qa/uitest,\
 $(eval $(call gb_UITest_set_defs,sw_findReplace, \
 TDOC="$(SRCDIR)/sw/qa/uitest/data" \
 ))
+
+$(eval $(call gb_UITest_avoid_oneprocess,sw_findReplace))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/UITest_sw_sidebar.mk b/sw/UITest_sw_sidebar.mk
index 8a087e14fa43..3d73a4cf20ec 100644
--- a/sw/UITest_sw_sidebar.mk
+++ b/sw/UITest_sw_sidebar.mk
@@ -14,3 +14,7 @@ $(eval $(call 
gb_UITest_add_modules,sw_sidebar,$(SRCDIR)/sw/qa/uitest,\
 $(eval $(call gb_UITest_set_defs,sw_sidebar, \
 TDOC="$(SRCDIR)/sw/qa/uitest/data" \
 ))
+
+$(eval $(call gb_UITest_avoid_oneprocess,sw_findReplace))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/UITest_sw_table.mk b/sw/UITest_sw_table.mk
index ce4434ebfb0a..11d7f79a2983 100644
--- a/sw/UITest_sw_table.mk
+++ b/sw/UITest_sw_table.mk
@@ -14,3 +14,7 @@ $(eval $(call 
gb_UITest_add_modules,sw_table,$(SRCDIR)/sw/qa/uitest,\
 $(eval $(call gb_UITest_set_defs,sw_table, \
 TDOC="$(SRCDIR)/sw/qa/uitest/data" \
 ))
+
+$(eval $(call gb_UITest_avoid_oneprocess,sw_table))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/UITest_writer_macro_tests.mk b/sw/UITest_writer_macro_tests.mk
index 4fddf1627338..01f58cd10f58 100644
--- a/sw/UITest_writer_macro_tests.mk
+++ b/sw/UITest_writer_macro_tests.mk
@@ -14,3 +14,7 @@ $(eval $(call 
gb_UITest_add_modules,writer_macro_tests,$(SRCDIR)/sw/qa/uitest,\
 $(eval $(call gb_UITest_set_defs,writer_macro_tests, \
 TDOC="$(SRCDIR)/sw/qa/uitest/data" \
 ))
+
+$(ev

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sw/inc sw/qa sw/source writerfilter/source xmloff/source

2023-10-18 Thread Skyler Grey (via logerrit)
 sw/inc/reffld.hxx |   20 -
 sw/qa/core/fields/data/tdf86790.docx  |binary
 sw/qa/core/fields/fields.cxx  |  228 ++
 sw/qa/extras/uiwriter/uiwriter7.cxx   |   15 -
 sw/qa/extras/uiwriter/uiwriter8.cxx   |6 
 sw/source/core/fields/reffld.cxx  |   73 ++-
 sw/source/core/text/txtfld.cxx|7 
 sw/source/core/txtnode/atrfld.cxx |2 
 sw/source/core/unocore/unofield.cxx   |2 
 sw/source/filter/ww8/ww8par5.cxx  |8 
 sw/source/ui/fldui/fldref.cxx |6 
 sw/source/uibase/docvw/edtwin2.cxx|2 
 sw/source/uibase/fldui/fldmgr.cxx |   13 -
 sw/source/uibase/utlui/content.cxx|2 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |2 
 xmloff/source/text/txtfldi.cxx|4 
 16 files changed, 287 insertions(+), 103 deletions(-)

New commits:
commit 613249e2b208716aa71580ff0373bb201d9c2697
Author: Skyler Grey 
AuthorDate: Fri Oct 13 09:36:51 2023 +
Commit: Miklos Vajna 
CommitDate: Thu Oct 19 08:18:14 2023 +0200

Add tests for STYLEREF and fix STYLEREF bugs

- testTdf86790 tests that the "sample file with STYLEREF" document from
  tdf#86790 has the correct fields
- testStyleRefSearchUp tests that the STYLEREF searches up when there
  are bits of text both above and below it
- testStyleRefSearchDown tests that the STYLEREF searches down when
  there are bits of text below it only
- testMarginalStyleRef tests that the STYLEREF searches from the page
  top when it is placed in a footer
- testFootnotetyleRef tests that the STYLEREF searches from the
  reference mark when it is placed in a footnote

- As an artifact of changing the STYLEREF namespace from TEXT to LO_EXT
  partway through, some references to STYLEREF being in TEXT still
  remained. This caused STYLEREFs saved to ODF to vanish on import. This
  has been fixed

- Previously STYLEREF kept a pointer to the frame and text node
  containing it. Unfortunately, sometimes these could be destructed and
  the STYLEREF later asked to update which led to a crash due to
  use-after-free. STYLEREF no longer keeps a pointer to these values,
  instead preferring to not update when it is not given them

- As part of the review process for
  I25dd7a6940abee5651a784b9059fe23b32547d6c we added
  SearchForStyleAnchor, a function used only in reffld.cxx, to an
  anonymous namespace. Unfortunately we neglected to do the same for
  StyleRefElementType just above it. This has been fixed

Follow-Up-To: I25dd7a6940abee5651a784b9059fe23b32547d6c
Change-Id: I35dc36197b62fa53def4745da1d4755ece79ed22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157911
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx
index 28ced8dcc2cb..bf9d563ab2ac 100644
--- a/sw/inc/reffld.hxx
+++ b/sw/inc/reffld.hxx
@@ -99,22 +99,15 @@ private:
 /// reference to either a SwTextFootnote::m_nSeqNo or a 
SwSetExpField::mnSeqNo
 sal_uInt16 m_nSeqNo;
 
-SwTextNode* m_pTextNode; ///< a pointer to the text node which contains 
the field
-SwFrame* m_pFrame; ///< a pointer to the frame which contains the field
-/* m_pTextNode and m_pFrame are used for STYLEREF, for other subtypes 
these will often be nullptr */
-
 virtual OUStringExpandImpl(SwRootFrame const* pLayout) const override;
 virtual std::unique_ptr Copy() const override;
 
 public:
 SwGetRefField( SwGetRefFieldType*, OUString aSetRef, OUString 
aReferenceLanguage,
-sal_uInt16 nSubType, sal_uInt16 nSeqNo, sal_uLong nFormat,
-SwTextNode* pTextNode, SwFrame* pFrame );
+sal_uInt16 nSubType, sal_uInt16 nSeqNo, sal_uLong nFormat 
);
 
 virtual ~SwGetRefField() override;
 
-void ChangeExpansion(SwFrame* pFrame, const SwTextField* pField);
-
 virtual OUString GetFieldName() const override;
 
 const OUString& GetSetRefName() const { return m_sSetRefName; }
@@ -126,9 +119,9 @@ public:
and REF_STYLE.
Note: This instance may be NULL (field in Undo/Redo). This will cause
no update for these reference format types. */
-voidUpdateField( const SwTextField* pFieldTextAttr );
-voidUpdateField( const SwTextField* pFieldTextAttr, const 
SwRootFrame* const pLayout,
- OUString& rText );
+voidUpdateField( const SwTextField* pFieldTextAttr, 
SwFrame* pFrame );
+voidUpdateField( const SwTextField* pFieldTextAttr, 
SwFrame* pFrame,
+ const SwRootFrame* const pLayout, 
OUString& rText );
 
  

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

2023-10-18 Thread Noel Grandin (via logerrit)
 sd/source/core/drawdoc2.cxx |6 ++
 sd/source/core/drawdoc3.cxx |   18 +-
 sd/source/core/drawdoc4.cxx |   12 
 sd/source/core/sdpage.cxx   |   11 +--
 sd/source/core/sdpage2.cxx  |   13 -
 sd/source/filter/html/htmlex.cxx|   19 ---
 sd/source/filter/xml/sdtransform.cxx|9 ++---
 sd/source/ui/app/sdxfer.cxx |5 +
 sd/source/ui/dlg/animobjs.cxx   |3 +--
 sd/source/ui/docshell/docshel3.cxx  |8 ++--
 sd/source/ui/tools/GraphicSizeCheck.cxx |   10 +++---
 sd/source/ui/uitest/uiobject.cxx|   18 +-
 sd/source/ui/unoidl/unopage.cxx |4 +---
 sd/source/ui/view/DocumentRenderer.cxx  |   16 
 sd/source/ui/view/drawview.cxx  |   16 
 sd/source/ui/view/drviews2.cxx  |   10 --
 sd/source/ui/view/outlview.cxx  |   12 
 slideshow/source/engine/box2dtools.cxx  |6 ++
 18 files changed, 69 insertions(+), 127 deletions(-)

New commits:
commit f3e010829ab9d6b0b0ef48b67661774dd19f6de0
Author: Noel Grandin 
AuthorDate: Wed Oct 18 13:59:22 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Oct 19 08:09:38 2023 +0200

use more SdrObjList::begin/end in sd

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

diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index d591113fcca9..de82a8b95306 100644
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -244,10 +244,8 @@ void SdDrawDocument::UpdatePageObjectsInNotes(sal_uInt16 
nStartPos)
 // number
 if (pPage && pPage->GetPageKind() == PageKind::Notes)
 {
-const size_t nObjCount = pPage->GetObjCount();
-for (size_t nObj = 0; nObj < nObjCount; ++nObj)
+for (const rtl::Reference& pObj : *pPage)
 {
-SdrObject* pObj = pPage->GetObj(nObj);
 if (pObj->GetObjIdentifier() == SdrObjKind::Page &&
 pObj->GetObjInventor() == SdrInventor::Default)
 {
@@ -257,7 +255,7 @@ void SdDrawDocument::UpdatePageObjectsInNotes(sal_uInt16 
nStartPos)
 SAL_WARN_IF(nPage <= 1, "sd", "Page object must not be a 
handout.");
 
 if (nStartPos > 0 && nPage > 1)
-
static_cast(pObj)->SetReferencedPage(GetPage(nPage - 1));
+
static_cast(pObj.get())->SetReferencedPage(GetPage(nPage - 1));
 }
 }
 }
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 357858f46222..b3c6e0595c8a 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -927,17 +927,17 @@ bool SdDrawDocument::InsertBookmarkAsPage(
 {
 for(sal_uInt32 p = nInsertPos; p < sal_uInt32(nInsertPos) + 
sal_uInt32(nBMSdPageCount); p++)
 {
-SdPage *pPg = static_cast( GetPage(p) );
-for(size_t i = 0; pPg && (i < pPg->GetObjCount()); ++i)
-{
-if(pPg->GetObj(i)->GetStyleSheet())
+if (SdPage *pPg = static_cast( GetPage(p) ))
+for (const rtl::Reference& pObj : *pPg)
 {
-OUString aStyleName = 
pPg->GetObj(i)->GetStyleSheet()->GetName();
-SfxStyleSheet *pSheet = 
lcl_findStyle(aNewGraphicStyles, Concat2View(aStyleName + aRenameStr));
-if(pSheet != nullptr)
-pPg->GetObj(i)->SetStyleSheet(pSheet, true);
+if(pObj->GetStyleSheet())
+{
+OUString aStyleName = 
pObj->GetStyleSheet()->GetName();
+SfxStyleSheet *pSheet = 
lcl_findStyle(aNewGraphicStyles, Concat2View(aStyleName + aRenameStr));
+if(pSheet != nullptr)
+pObj->SetStyleSheet(pSheet, true);
+}
 }
-}
 }
 }
 catch(...)
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 91c4dc600703..577859d957bc 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -1067,10 +1067,8 @@ void SdDrawDocument::RenameLayoutTemplate(const 
OUString& rOldLayoutName, const
 {
 pPage->SetLayoutName(aPageLayoutName);
 
-for (size_t nObj = 0; nObj < pPage->GetObjCount(); ++nObj)
+for (const rtl::Reference& pObj : *pPage)
 {
-SdrObject* pObj = pPage->GetObj(nObj);
-
 if (pObj->GetObjInventor() == SdrInventor::Default)
 {

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

2023-10-18 Thread Julien Nabet (via logerrit)
 dbaccess/source/core/dataaccess/ModelImpl.cxx  |3 -
 dbaccess/source/core/dataaccess/datasource.cxx |   73 -
 dbaccess/source/core/inc/ModelImpl.hxx |   70 ++-
 3 files changed, 68 insertions(+), 78 deletions(-)

New commits:
commit 1c15934170341bbcfb4671fdbb01c2259265b3e1
Author: Julien Nabet 
AuthorDate: Wed Oct 18 10:45:36 2023 +0200
Commit: Mike Kaganski 
CommitDate: Thu Oct 19 07:45:34 2023 +0200

Related tdf#144256: remove m_pSharedConnectionManager

to only use "m_xSharedConnectionManager".
For this, it required some refactoring but except the removing, logic 
hasn't been changed.

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

diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx 
b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 3e21289dbe9a..66f8309ac657 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -370,7 +370,6 @@ ODatabaseModelImpl::ODatabaseModelImpl( const Reference< 
XComponentContext >& _r
 ,m_bModified(false)
 ,m_bDocumentReadOnly(false)
 ,m_bMacroCallsSeenWhileLoading(false)
-,m_pSharedConnectionManager(nullptr)
 ,m_nControllerLockCount(0)
 {
 // some kind of default
@@ -401,7 +400,6 @@ ODatabaseModelImpl::ODatabaseModelImpl(
 ,m_bModified(false)
 ,m_bDocumentReadOnly(false)
 ,m_bMacroCallsSeenWhileLoading(false)
-,m_pSharedConnectionManager(nullptr)
 ,m_nControllerLockCount(0)
 {
 impl_construct_nothrow();
@@ -624,7 +622,6 @@ void ODatabaseModelImpl::clearConnections()
 }
 }
 
-m_pSharedConnectionManager = nullptr;
 m_xSharedConnectionManager = nullptr;
 }
 
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx 
b/dbaccess/source/core/dataaccess/datasource.cxx
index e2c02d49c818..55c161b854d1 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -62,7 +62,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
@@ -250,69 +249,6 @@ void SAL_CALL 
OAuthenticationContinuation::setRememberAccount( RememberAuthentic
 SAL_WARN("dbaccess","OAuthenticationContinuation::setRememberAccount: not 
supported!");
 }
 
-namespace {
-
-/** The class OSharedConnectionManager implements a structure to share 
connections.
-It owns the master connections which will be disposed when the last 
connection proxy is gone.
-*/
-// need to hold the digest
-struct TDigestHolder
-{
-sal_uInt8 m_pBuffer[RTL_DIGEST_LENGTH_SHA1];
-TDigestHolder()
-{
-m_pBuffer[0] = 0;
-}
-
-};
-
-}
-
-class OSharedConnectionManager : public ::cppu::WeakImplHelper< XEventListener 
>
-{
-
- // contains the currently used master connections
-struct TConnectionHolder
-{
-Reference< XConnection >xMasterConnection;
-oslInterlockedCount nALiveCount;
-};
-
-// the less-compare functor, used for the stl::map
-struct TDigestLess
-{
-bool operator() (const TDigestHolder& x, const TDigestHolder& y) const
-{
-sal_uInt32 i;
-for(i=0;i < RTL_DIGEST_LENGTH_SHA1 && (x.m_pBuffer[i] >= 
y.m_pBuffer[i]); ++i)
-;
-return i < RTL_DIGEST_LENGTH_SHA1;
-}
-};
-
-typedef std::map< TDigestHolder,TConnectionHolder,TDigestLess>
TConnectionMap;  // holds the master connections
-typedef std::map< Reference< XConnection >,TConnectionMap::iterator>  
TSharedConnectionMap;// holds the shared connections
-
-::osl::Mutexm_aMutex;
-TConnectionMap  m_aConnections; // remember the master 
connection in conjunction with the digest
-TSharedConnectionMapm_aSharedConnection;// the shared 
connections with conjunction with an iterator into the connections map
-Reference< XProxyFactory >  m_xProxyFactory;
-
-protected:
-virtual ~OSharedConnectionManager() override;
-
-public:
-explicit OSharedConnectionManager(const Reference< XComponentContext >& 
_rxContext);
-
-void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
-Reference getConnection(   const OUString& url,
-const OUString& user,
-const OUString& password,
-const Sequence< PropertyValue >& 
_aInfo,
-ODatabaseSource* _pDataSource);
-void addEventListener(const Reference& _rxConnection, 
TConnectionMap::iterator const & _rIter);
-};
-
 OSharedConnectionManager::OSharedConnectionManager(const Reference< 
XComponentContext >& _rxContext)
 {
 m_xPr

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

2023-10-18 Thread Aml-Hassan-Abd-El-hamid (via logerrit)
 xmloff/inc/XMLEmbeddedObjectExportFilter.hxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit e0fd924cb3446f2c707ea173adc5b1aa81ac81c5
Author: Aml-Hassan-Abd-El-hamid 
AuthorDate: Tue Oct 17 07:42:13 2023 +0300
Commit: Ilmari Lauhakangas 
CommitDate: Thu Oct 19 06:39:35 2023 +0200

tdf#143148 Use pragma once instead of include guards

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

diff --git a/xmloff/inc/XMLEmbeddedObjectExportFilter.hxx 
b/xmloff/inc/XMLEmbeddedObjectExportFilter.hxx
index c21321321af6..cfbe5d9e7572 100644
--- a/xmloff/inc/XMLEmbeddedObjectExportFilter.hxx
+++ b/xmloff/inc/XMLEmbeddedObjectExportFilter.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef XMLOFF_INC_XMLEMBEDDEDOBJECTEXPORTFILTER_HXX
-#define XMLOFF_INC_XMLEMBEDDEDOBJECTEXPORTFILTER_HXX
+#pragma once
 
 #include 
 #include 
@@ -66,6 +65,4 @@ public:
 
 };
 
-#endif // XMLOFF_INC_XMLEMBEDDEDOBJECTEXPORTFILTER_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


Aml license statement

2023-10-18 Thread Aml Hassan
 All of my past & future contributions to LibreOffice may be
   licensed under the MPLv2/LGPLv3+ dual license.


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

2023-10-18 Thread Pranam Lashkari (via logerrit)
 desktop/source/lib/init.cxx  |3 ++-
 sfx2/source/control/unoctitm.cxx |3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit b83f069101f1e6d8aaac09a805f02bbc4c619e7a
Author: Pranam Lashkari 
AuthorDate: Wed Jul 26 16:39:49 2023 +0700
Commit: Pranam Lashkari 
CommitDate: Wed Oct 18 23:57:18 2023 +0200

LOK: send state of protected cells

Change-Id: I432a3af50b6089faa80a28804d95d816af6cd278
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154936
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-by: Pranam Lashkari 
(cherry picked from commit 5f13751cefd725cb2a38e66c9484046e6141c6c2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158150
Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 6d9697d60aed..416265df4099 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3842,7 +3842,8 @@ static void doc_iniUnoCommands ()
 OUString(".uno:InsertDropdownContentControl"),
 OUString(".uno:InsertPlainTextContentControl"),
 OUString(".uno:InsertPictureContentControl"),
-OUString(".uno:DataFilterAutoFilter")
+OUString(".uno:DataFilterAutoFilter"),
+OUString(".uno:CellProtection")
 };
 
 util::URL aCommandURL;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 89e94caff794..1f3f37f5fc1b 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -935,7 +935,8 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, 
SfxViewFrame* pViewFra
 aEvent.FeatureURL.Path == "SpacePara1" ||
 aEvent.FeatureURL.Path == "SpacePara15" ||
 aEvent.FeatureURL.Path == "SpacePara2" ||
-aEvent.FeatureURL.Path == "DataFilterAutoFilter")
+aEvent.FeatureURL.Path == "DataFilterAutoFilter" ||
+aEvent.FeatureURL.Path == "CellProtection")
 {
 bool bTemp = false;
 aEvent.State >>= bTemp;


Re: LLVM exit code 139 building git master on Xubuntu 22.04

2023-10-18 Thread David Gerard
On Tue, 17 Oct 2023 at 21:33, David Gerard  wrote:

> I pulled from git master today to build LO and got LLVM exit code 139
> - an error code I can't find the meaning of, but it's apparently an
> internal error.

I just tried again from a completely fresh git clone, and it's still
happening. Any ideas? Is there anything in the new C++20 conf that's
too new for llvm 14.0.0 Ubuntu version?


- d.


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

2023-10-18 Thread Pranam Lashkari (via logerrit)
 desktop/source/lib/init.cxx  |3 ++-
 sfx2/source/control/unoctitm.cxx |3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit f3c956ae8825abab59e7dbc1e39da4f5d4a1658c
Author: Pranam Lashkari 
AuthorDate: Wed Jul 26 16:39:49 2023 +0700
Commit: Pranam Lashkari 
CommitDate: Wed Oct 18 22:54:06 2023 +0200

LOK: send state of protected cells

Change-Id: I432a3af50b6089faa80a28804d95d816af6cd278
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154936
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-by: Pranam Lashkari 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 5b50b0d8181c..d4b507004a9d 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3846,7 +3846,8 @@ static void doc_iniUnoCommands ()
 OUString(".uno:InsertDropdownContentControl"),
 OUString(".uno:InsertPlainTextContentControl"),
 OUString(".uno:InsertPictureContentControl"),
-OUString(".uno:DataFilterAutoFilter")
+OUString(".uno:DataFilterAutoFilter"),
+OUString(".uno:CellProtection")
 };
 
 util::URL aCommandURL;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index fad61699db90..73d2d88ddc1b 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -951,7 +951,8 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, 
SfxViewFrame* pViewFra
 aEvent.FeatureURL.Path == "SpacePara1" ||
 aEvent.FeatureURL.Path == "SpacePara15" ||
 aEvent.FeatureURL.Path == "SpacePara2" ||
-aEvent.FeatureURL.Path == "DataFilterAutoFilter")
+aEvent.FeatureURL.Path == "DataFilterAutoFilter" ||
+aEvent.FeatureURL.Path == "CellProtection")
 {
 bool bTemp = false;
 aEvent.State >>= bTemp;


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

2023-10-18 Thread Michael Stahl (via logerrit)
 vcl/source/pdf/XmpMetadata.cxx |   83 -
 1 file changed, 82 insertions(+), 1 deletion(-)

New commits:
commit 72163db77aa1c160a63e64d5637de4a383966c76
Author: Michael Stahl 
AuthorDate: Wed Oct 18 14:23:48 2023 +0200
Commit: Caolán McNamara 
CommitDate: Wed Oct 18 22:26:36 2023 +0200

tdf#157517 vcl: PDF/UA export: add PDF/A extension schema to XMP

... if PDF/A is also enabled.  Thanks to Peter Wyatt for the example
document.

Change-Id: I2a5951e102ae28a4c998adafe8ab51caa2788e4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158118
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit a4971aab4d57bf9177c55c3fb0e163e0db7c48fd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158046
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/pdf/XmpMetadata.cxx b/vcl/source/pdf/XmpMetadata.cxx
index d4c58c23348b..bbe337de4146 100644
--- a/vcl/source/pdf/XmpMetadata.cxx
+++ b/vcl/source/pdf/XmpMetadata.cxx
@@ -107,8 +107,89 @@ void XmpMetadata::write()
 }
 
 // PDF/UA
-if (mbPDF_UA && mnPDF_A == 0) // veraPDF says this is not allowed in 
PDF/A-[123][ab]
+if (mbPDF_UA)
 {
+if (mnPDF_A != 0)
+{ // tdf#157517 PDF/A extension schema is required
+aXmlWriter.startElement("rdf:Description");
+aXmlWriter.attribute("rdf:about", OString(""));
+aXmlWriter.attribute("xmlns:pdfaExtension",
+ 
OString("http://www.aiim.org/pdfa/ns/extension/";));
+aXmlWriter.attribute("xmlns:pdfaSchema",
+ 
OString("http://www.aiim.org/pdfa/ns/schema#";));
+aXmlWriter.attribute("xmlns:pdfaProperty",
+ 
OString("http://www.aiim.org/pdfa/ns/property#";));
+aXmlWriter.startElement("pdfaExtension:schemas");
+aXmlWriter.startElement("rdf:Bag");
+aXmlWriter.startElement("rdf:li");
+aXmlWriter.attribute("rdf:parseType", OString("Resource"));
+aXmlWriter.startElement("pdfaSchema:namespaceURI");
+aXmlWriter.content("http://www.aiim.org/pdfua/ns/id/";);
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaSchema:prefix");
+aXmlWriter.content("pdfuaid");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaSchema:schema");
+aXmlWriter.content("PDF/UA identification schema");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaSchema:property");
+aXmlWriter.startElement("rdf:Seq");
+
+aXmlWriter.startElement("rdf:li");
+aXmlWriter.attribute("rdf:parseType", OString("Resource"));
+aXmlWriter.startElement("pdfaProperty:category");
+aXmlWriter.content("internal");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaProperty:description");
+aXmlWriter.content("PDF/UA version identifier");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaProperty:name");
+aXmlWriter.content("part");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaProperty:valueType");
+aXmlWriter.content("Integer");
+aXmlWriter.endElement();
+aXmlWriter.endElement(); // rdf:li
+
+aXmlWriter.startElement("rdf:li");
+aXmlWriter.attribute("rdf:parseType", OString("Resource"));
+aXmlWriter.startElement("pdfaProperty:category");
+aXmlWriter.content("internal");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaProperty:description");
+aXmlWriter.content("PDF/UA amendment identifier");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaProperty:name");
+aXmlWriter.content("amd");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaProperty:valueType");
+aXmlWriter.content("Text");
+aXmlWriter.endElement();
+aXmlWriter.endElement(); // rdf:li
+
+aXmlWriter.startElement("rdf:li");
+aXmlWriter.attribute("rdf:parseType", OString("Resource"));
+aXmlWriter.startElement("pdfaProperty:category");
+aXmlWriter.content("internal");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaProperty:description");
+aXmlWriter.content("PDF/UA corrigenda identifier");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaProperty:name");
+  

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

2023-10-18 Thread Michael Weghorn (via logerrit)
 sw/source/uibase/uiview/view2.cxx |   17 ++---
 1 file changed, 14 insertions(+), 3 deletions(-)

New commits:
commit 16940dc248068133363153a1c2d41cd2d0102460
Author: Michael Weghorn 
AuthorDate: Wed Oct 18 10:59:33 2023 +0200
Commit: Caolán McNamara 
CommitDate: Wed Oct 18 22:26:15 2023 +0200

tdf#156033 sw: Don't capture mouse when executing file dlg

When the mouse is captured in
`SwView::InsertGraphicDlg`, temporarily
release it while executing the file dialog,
so the user can use the mouse to interact with
the file dialog.

At least with qt5/qt6/kf5, this would otherwise
not work in the file dialog shown after clicking
on a previously inserted Picture Content Control,
because `QWidget::grabMouse()`'s "other widgets
get no mouse events at all" [1] apparently applies
for the file dialog and other running applications
as well.

[1] https://doc.qt.io/qt-6/qwidget.html#grabMouse

Change-Id: I80a81c57c80debc716a1b111a9c07eef0c005c65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158109
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
(cherry picked from commit 680ae3e989c3b665b29f536c2e30dd86bbc3edac)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158045
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sw/source/uibase/uiview/view2.cxx 
b/sw/source/uibase/uiview/view2.cxx
index f7cfb6563803..585f38b7cae1 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -441,11 +441,22 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
 
 const SfxStringItem* pName = 
rReq.GetArg(SID_INSERT_GRAPHIC);
 bool bShowError = !pName;
-if( pName
+
+bool bHaveName = pName != nullptr;
 #if HAVE_FEATURE_DESKTOP
-|| (!Application::IsHeadlessModeEnabled() && ERRCODE_NONE == 
pFileDlg->Execute())
+if (!bHaveName && !Application::IsHeadlessModeEnabled())
+{
+// execute file dialog, without capturing mouse (tdf#156033)
+vcl::Window* pWin = GetWindow();
+const bool bMouseCaptured = pWin && pWin->IsMouseCaptured();
+if (bMouseCaptured)
+pWin->ReleaseMouse();
+bHaveName =  ERRCODE_NONE == pFileDlg->Execute();
+if (bMouseCaptured)
+pWin->CaptureMouse();
+}
 #endif
-)
+if (bHaveName)
 {
 
 OUString aFileName, aFilterName;


[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - drawinglayer/source include/drawinglayer svx/source vcl/qa

2023-10-18 Thread Michael Stahl (via logerrit)
 drawinglayer/source/primitive2d/controlprimitive2d.cxx |4 
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |   20 
 include/drawinglayer/primitive2d/controlprimitive2d.hxx|8 +
 svx/source/sdr/contact/viewcontactofunocontrol.cxx |9 +
 svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx   |   10 +-
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |   63 +
 6 files changed, 109 insertions(+), 5 deletions(-)

New commits:
commit 2dbbc200e87b472e7a6daf1e1f658496fd569813
Author: Michael Stahl 
AuthorDate: Wed Oct 11 19:13:53 2023 +0200
Commit: Caolán McNamara 
CommitDate: Wed Oct 18 22:23:44 2023 +0200

drawinglayer,svx: PDF/UA export: put Form SE into anchor paragraph SE

This is like commit d467f1aa3d028f399826c97e2eecedcd79efcf65
and commit 6e5d59c2ca6969e9491f97cd7a00d094fc62cfb3 but for the
form controls, which have their own special ControlPrimitive2D.

Change-Id: I4b4ac45e81f490a7b625acd9e8753300d10bf119
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157847
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit d5c19ef9d30cde052e8cd2486ac9395e62d9c9a9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157874
Reviewed-by: Caolán McNamara 

diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx 
b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
index 372fb61244a0..c8448efa981f 100644
--- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
@@ -243,10 +243,12 @@ namespace drawinglayer::primitive2d
 uno::Reference< awt::XControlModel > xControlModel,
 uno::Reference xXControl,
 ::std::u16string_view const rTitle,
-::std::u16string_view const rDescription)
+::std::u16string_view const rDescription,
+void const*const pAnchorKey)
 :   maTransform(std::move(aTransform)),
 mxControlModel(std::move(xControlModel)),
 mxXControl(std::move(xXControl))
+, m_pAnchorStructureElementKey(pAnchorKey)
 {
 ::rtl::OUStringBuffer buf(rTitle);
 if (!rTitle.empty() && !rDescription.empty())
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index a5882e8b95cb..5b853d8152c1 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1101,6 +1101,18 @@ void VclMetafileProcessor2D::processControlPrimitive2D(
 if (!bIsPrintableControl)
 return;
 
+::std::optional oAnchorParent;
+if (mpPDFExtOutDevData)
+{
+if (rControlPrimitive.GetAnchorStructureElementKey())
+{
+sal_Int32 const id = mpPDFExtOutDevData->EnsureStructureElement(
+rControlPrimitive.GetAnchorStructureElementKey());
+
oAnchorParent.emplace(mpPDFExtOutDevData->GetCurrentStructureElement());
+mpPDFExtOutDevData->SetCurrentStructureElement(id);
+}
+}
+
 const bool bPDFExport(mpPDFExtOutDevData && 
mpPDFExtOutDevData->GetIsExportFormFields());
 bool bDoProcessRecursively(true);
 
@@ -1153,6 +1165,10 @@ void VclMetafileProcessor2D::processControlPrimitive2D(
 }
 mpPDFExtOutDevData->CreateControl(*pPDFControl);
 mpPDFExtOutDevData->EndStructureElement();
+if (oAnchorParent)
+{
+mpPDFExtOutDevData->SetCurrentStructureElement(*oAnchorParent);
+}
 
 // no normal paint needed (see original 
UnoControlPDFExportContact::do_PaintObject);
 // do not process recursively
@@ -1235,6 +1251,10 @@ void VclMetafileProcessor2D::processControlPrimitive2D(
 if (mpPDFExtOutDevData)
 {
 mpPDFExtOutDevData->EndStructureElement();
+if (oAnchorParent)
+{
+mpPDFExtOutDevData->SetCurrentStructureElement(*oAnchorParent);
+}
 }
 }
 
diff --git a/include/drawinglayer/primitive2d/controlprimitive2d.hxx 
b/include/drawinglayer/primitive2d/controlprimitive2d.hxx
index e33c26886cd9..a7128b7f7322 100644
--- a/include/drawinglayer/primitive2d/controlprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/controlprimitive2d.hxx
@@ -58,6 +58,9 @@ private:
 /// yet another special snowflake way to generate PDF Alt text
 OUString m_AltText;
 
+/// anchor structure element (Writer)
+void const* const m_pAnchorStructureElementKey;
+
 /** used from getXControl() to create a local awt::XControl which is 
remembered in mxXControl
 and from thereon always used and returned by getXControl()
  */
@@ -81,7 +84,8 @@ public:
 ControlPrimitive2D(basegfx::B2DHomMatrix aTransform,
css::uno::Reference 
xControlModel,
 

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

2023-10-18 Thread Michael Stahl (via logerrit)
 vcl/qa/cppunit/pdfexport/data/PDF_export_with_formcontrol.fodt |  174 ++
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |  258 
++
 vcl/source/gdi/pdfextoutdevdata.cxx|   20 
 3 files changed, 448 insertions(+), 4 deletions(-)

New commits:
commit 04dbdc1949e60f4dc674c2e728982af371f2f4da
Author: Michael Stahl 
AuthorDate: Tue Oct 10 18:20:04 2023 +0200
Commit: Caolán McNamara 
CommitDate: Wed Oct 18 22:22:58 2023 +0200

tdf#157397 vcl: PDF export: fix CreateControl replay

The problem is that the CreateLink and CreateControl actions are
replayed in a different order than they are recorded, because CreateLink
is a global action, and CreateControl a page action.

This means that the mCurId at the time when
PDFExtOutDevData::CreateControl() is called does not correspond to a
position in mParaIds when CreateControl is replayed; it will be inserted
too early and bump all the CreateLink ones to later indexes.

Avoid this by adding another global action CreateControlLink that is
added when CreateControl is being replayed, which appears to work.

(Another subtle problem is that, in case of PDF/A-1, the page actions
could be discarded completely; this should work in that case too.)

(regression from commit d4d471fc88fe4fd14f44dfccdfe360dec327d4f0)

Change-Id: I92d89ac08db6548e9f0d1480d984aeacb4d22262
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157767
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 2e32aa1e9fc240c9cd9854655106d0decbd3694a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157873
Reviewed-by: Caolán McNamara 

diff --git a/vcl/qa/cppunit/pdfexport/data/PDF_export_with_formcontrol.fodt 
b/vcl/qa/cppunit/pdfexport/data/PDF_export_with_formcontrol.fodt
new file mode 100644
index ..4aa4a92b6710
--- /dev/null
+++ b/vcl/qa/cppunit/pdfexport/data/PDF_export_with_formcontrol.fodt
@@ -0,0 +1,174 @@
+
+http://www.w3.org/TR/css3-text/"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; xmlns:c
 alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:officeooo="http://openoffice.org/2009/office"; 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:
 meta:1.0" 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ A. 
Spielhoff2020-09-12T10:51:34.4381175712023-10-11T12:40:15.543658302PT7H23M50S98LibreOfficeDev/7.5.7.0.0$Linux_X86_64
 
LibreOffice_project/0325c0aa2d3e6df97ff554ca540d316273fd149a2023-09-23T14:07:35.317591779PDF-Dateien:
 A Spielhoff
+ 
+  
+  
+  
+  
+ 
+  
+   
+   
+
+   
+   
+  
+  
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+  
+   
+  
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+
+ 
+
+   
+   
+
+ 
+
+   
+   
+
+ 
+
+   
+   
+
+ 
+
+   
+   
+
+ 
+
+   
+   
+
+ 
+
+   
+   
+
+ 
+
+   
+   
+
+ 
+
+   
+   
+
+ 
+
+   
+   
+
+ 
+
+   
+  
+  
+  
+  
+ 
+ 
+  
+   
+  
+  
+   
+  
+  
+   
+  
+

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

2023-10-18 Thread Michael Stahl (via logerrit)
 sw/source/core/crsr/crsrsh.cxx |   16 
 sw/source/core/crsr/swcrsr.cxx |   14 +++---
 2 files changed, 27 insertions(+), 3 deletions(-)

New commits:
commit 92d75686181349f4b79aef413a070ab8335f97b9
Author: Michael Stahl 
AuthorDate: Wed Oct 18 15:17:29 2023 +0200
Commit: Caolán McNamara 
CommitDate: Wed Oct 18 22:22:06 2023 +0200

sw: fix stack overflow on kde45196-1.html

Previously, the shell cursor was put onto a SwGrfNode in the top left
corner, which is invalid, but didn't crash immediately.

With commit b20ca8d951e8205c8b963c6b7407f984053b4094 the cursor is
instead put onto the first SwTextNode in the body, which happens to be
in a table, and the entire table is hidden; this causes an infinite
recursion in SwCursorShell::UpdateCursorPos() because
GetModelPositionForViewPoint() no longer moves it to SwGrfNode.

So try to move the cursor out of a hidden node, which requires an
additional change in SwCursor::IsSelOvr() to allow moving from a node
without a frame to another node without a frame.

Change-Id: Ia33c7b558755f7e8b65ea3ff2c46aea20be577dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158119
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 
(cherry picked from commit fa4fe53aa775cdc50eec715f4bd88469fe5e0d32)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158048
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 84f0ba59072a..04b263cda754 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1803,6 +1803,22 @@ void SwCursorShell::UpdateCursorPos()
 GetLayout()->GetModelPositionForViewPoint( pShellCursor->GetPoint(), 
pShellCursor->GetPtPos(),
  &aTmpState );
 pShellCursor->DeleteMark();
+// kde45196-1.html: try to get to a non-hidden paragraph, there must
+// be one in the document body
+while (isInHiddenTextFrame(pShellCursor))
+{
+if (!pShellCursor->MovePara(GoNextPara, fnParaStart))
+{
+break;
+}
+}
+while (isInHiddenTextFrame(pShellCursor))
+{
+if (!pShellCursor->MovePara(GoPrevPara, fnParaStart))
+{
+break;
+}
+}
 }
 auto* pDoc = GetDoc();
 if (pDoc)
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 4349fac21b2f..8d0246bed14f 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -331,6 +331,7 @@ bool SwCursor::IsSelOvr(SwCursorSelOverFlags const eFlags)
 if( pNd->IsContentNode() && !dynamic_cast(this) )
 {
 const SwContentFrame* pFrame = static_cast(pNd)->getLayoutFrame( 
rDoc.getIDocumentLayoutAccess().GetCurrentLayout() );
+// ^ null
 if ( (SwCursorSelOverFlags::ChangePos & eFlags)   //allowed to change 
position if it's a bad one
 && pFrame && pFrame->isFrameAreaDefinitionValid()
 && !pFrame->getFrameArea().Height() //a bad zero height 
position
@@ -400,9 +401,16 @@ bool SwCursor::IsSelOvr(SwCursorSelOverFlags const eFlags)
 
 if( !pFrame )
 {
-DeleteMark();
-RestoreSavePos();
-return true; // we need a frame
+assert(!m_vSavePos.empty());
+SwContentNode const*const 
pSaveNode(rNds[m_vSavePos.back().nNode]->GetContentNode());
+// if the old position already didn't have a frame, allow moving
+// anyway, hope the caller can handle that
+if (pSaveNode && 
pSaveNode->getLayoutFrame(rDoc.getIDocumentLayoutAccess().GetCurrentLayout()))
+{
+DeleteMark();
+RestoreSavePos();
+return true; // we need a frame
+}
 }
 }
 


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

2023-10-18 Thread Caolán McNamara (via logerrit)
 cui/source/dialogs/SpellDialog.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e7e5b43c4906d9f0e199f689addc29aa98916e6e
Author: Caolán McNamara 
AuthorDate: Wed Oct 18 16:47:20 2023 +0100
Commit: Caolán McNamara 
CommitDate: Wed Oct 18 22:02:37 2023 +0200

crashreporting: svx::SentenceEditWindow_Impl::CreateSpellPortions()

cui/source/dialogs/SpellDialog.cxx:2005
aRet[ aRet.size() - 1 ].sText += aLeftOverText;

presumably aRet is empty() here

a) don't bother appending if aLeftOverText is empty()
b) don't crah if aRet is empty() and aLeftOverText is not

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

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index 1e52d4e2aed3..67de5235d1ad 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -2066,7 +2066,7 @@ svx::SpellPortions 
SentenceEditWindow_Impl::CreateSpellPortions() const
 aPortion2.sText = aLeftOverText.makeStringAndClear();
 aRet.push_back( aPortion2 );
 }
-else
+else if (!aLeftOverText.isEmpty() && !aRet.empty())
 {   // we just need to append the left-over text to the last 
portion (which had no errors)
 aRet[ aRet.size() - 1 ].sText += aLeftOverText;
 }


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

2023-10-18 Thread Andrea Gelmini (via logerrit)
 include/vcl/accessibility/AccessibleTextAttributeHelper.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fdad35d096dc642c80998ae8f832ebca183f545e
Author: Andrea Gelmini 
AuthorDate: Wed Oct 18 17:59:02 2023 +0200
Commit: Julien Nabet 
CommitDate: Wed Oct 18 21:11:17 2023 +0200

Fix typo

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

diff --git a/include/vcl/accessibility/AccessibleTextAttributeHelper.hxx 
b/include/vcl/accessibility/AccessibleTextAttributeHelper.hxx
index 8c4b43b99e11..c5e02a04e85c 100644
--- a/include/vcl/accessibility/AccessibleTextAttributeHelper.hxx
+++ b/include/vcl/accessibility/AccessibleTextAttributeHelper.hxx
@@ -38,7 +38,7 @@ public:
 
 /**
  * Get the IAccessible2 text attributes and the span of the attributes at 
the given index.
- * @param xText The interace to query for the information.
+ * @param xText The interface to query for the information.
  * @param nOffset Character offset for which to retrieve the information.
  * @param rStartOffset Out param that is set to the start index of the 
attribute run.
  * @param rEndOffset Out param that is set to the end index of the 
attribute run.


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

2023-10-18 Thread Michael Stahl (via logerrit)
 sw/source/core/crsr/crsrsh.cxx |   16 
 sw/source/core/crsr/swcrsr.cxx |   14 +++---
 2 files changed, 27 insertions(+), 3 deletions(-)

New commits:
commit adef72f8411a49920a75d3ceee7c1dc61ca0a470
Author: Michael Stahl 
AuthorDate: Wed Oct 18 15:17:29 2023 +0200
Commit: Michael Stahl 
CommitDate: Wed Oct 18 20:18:03 2023 +0200

sw: fix stack overflow on kde45196-1.html

Previously, the shell cursor was put onto a SwGrfNode in the top left
corner, which is invalid, but didn't crash immediately.

With commit b20ca8d951e8205c8b963c6b7407f984053b4094 the cursor is
instead put onto the first SwTextNode in the body, which happens to be
in a table, and the entire table is hidden; this causes an infinite
recursion in SwCursorShell::UpdateCursorPos() because
GetModelPositionForViewPoint() no longer moves it to SwGrfNode.

So try to move the cursor out of a hidden node, which requires an
additional change in SwCursor::IsSelOvr() to allow moving from a node
without a frame to another node without a frame.

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

diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 84f0ba59072a..04b263cda754 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1803,6 +1803,22 @@ void SwCursorShell::UpdateCursorPos()
 GetLayout()->GetModelPositionForViewPoint( pShellCursor->GetPoint(), 
pShellCursor->GetPtPos(),
  &aTmpState );
 pShellCursor->DeleteMark();
+// kde45196-1.html: try to get to a non-hidden paragraph, there must
+// be one in the document body
+while (isInHiddenTextFrame(pShellCursor))
+{
+if (!pShellCursor->MovePara(GoNextPara, fnParaStart))
+{
+break;
+}
+}
+while (isInHiddenTextFrame(pShellCursor))
+{
+if (!pShellCursor->MovePara(GoPrevPara, fnParaStart))
+{
+break;
+}
+}
 }
 auto* pDoc = GetDoc();
 if (pDoc)
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 4349fac21b2f..8d0246bed14f 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -331,6 +331,7 @@ bool SwCursor::IsSelOvr(SwCursorSelOverFlags const eFlags)
 if( pNd->IsContentNode() && !dynamic_cast(this) )
 {
 const SwContentFrame* pFrame = static_cast(pNd)->getLayoutFrame( 
rDoc.getIDocumentLayoutAccess().GetCurrentLayout() );
+// ^ null
 if ( (SwCursorSelOverFlags::ChangePos & eFlags)   //allowed to change 
position if it's a bad one
 && pFrame && pFrame->isFrameAreaDefinitionValid()
 && !pFrame->getFrameArea().Height() //a bad zero height 
position
@@ -400,9 +401,16 @@ bool SwCursor::IsSelOvr(SwCursorSelOverFlags const eFlags)
 
 if( !pFrame )
 {
-DeleteMark();
-RestoreSavePos();
-return true; // we need a frame
+assert(!m_vSavePos.empty());
+SwContentNode const*const 
pSaveNode(rNds[m_vSavePos.back().nNode]->GetContentNode());
+// if the old position already didn't have a frame, allow moving
+// anyway, hope the caller can handle that
+if (pSaveNode && 
pSaveNode->getLayoutFrame(rDoc.getIDocumentLayoutAccess().GetCurrentLayout()))
+{
+DeleteMark();
+RestoreSavePos();
+return true; // we need a frame
+}
 }
 }
 


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

2023-10-18 Thread Xisco Fauli (via logerrit)
 sc/source/ui/app/inputhdl.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 51678d9cf57085bac3c7eba998e0a6d364d36cb2
Author: Xisco Fauli 
AuthorDate: Wed Oct 18 17:28:37 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Oct 18 20:08:47 2023 +0200

fix crash in ScInputHandler::ImplCreateEditEngine()

See 
https://crashreport.libreoffice.org/stats/crash_details/1b2c45b0-6053-4628-94cc-f639899ceb39

Regression from 5484657d2b1677b7e385ab6ef87ad64dcb9934e4
"tdf#156209 Font size increases when copying from cell in edit mode"

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

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index b4d56988ca0f..de6a7f47a8bc 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3080,7 +3080,8 @@ void ScInputHandler::EnterHandler( ScEnterMode 
nBlockMode, bool bBeforeSavingInL
 bInOwnChange = true; // disable ModifyHdl (reset below)
 mbPartialPrefix = false;
 
-ImplCreateEditEngine();
+if (pActiveViewSh)
+ImplCreateEditEngine();
 
 bool bMatrix = ( nBlockMode == ScEnterMode::MATRIX );
 


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

2023-10-18 Thread Noel Grandin (via logerrit)
 include/svx/svdpage.hxx|2 
 svx/source/dialog/connctrl.cxx |   11 --
 svx/source/engine3d/scene3d.cxx|   29 +++---
 svx/source/engine3d/view3d.cxx |   17 +--
 svx/source/engine3d/view3d1.cxx|4 
 svx/source/form/fmview.cxx |5 -
 svx/source/form/navigatortreemodel.cxx |5 -
 svx/source/sdr/contact/objectcontactofpageview.cxx |4 
 svx/source/sdr/properties/e3dsceneproperties.cxx   |   86 --
 svx/source/sdr/properties/groupproperties.cxx  |   88 +++
 svx/source/svdraw/sdrpagewindow.cxx|6 -
 svx/source/svdraw/svdmark.cxx  |   15 +--
 svx/source/svdraw/svdmrkv.cxx  |   21 +---
 svx/source/svdraw/svdobj.cxx   |   12 --
 svx/source/svdraw/svdogrp.cxx  |   97 +
 svx/source/svdraw/svdotext.cxx |   11 --
 svx/source/svdraw/svdpage.cxx  |   56 
 svx/source/svdraw/svdpagv.cxx  |5 -
 svx/source/svdraw/svdpntv.cxx  |6 -
 svx/source/svdraw/svdundo.cxx  |   11 --
 sw/source/core/access/accmap.cxx   |   13 +-
 sw/source/core/doc/docdraw.cxx |4 
 sw/source/core/doc/doclay.cxx  |6 -
 sw/source/core/doc/textboxhelper.cxx   |   25 ++---
 sw/source/core/draw/dcontact.cxx   |8 -
 sw/source/core/draw/drawdoc.cxx|4 
 sw/source/core/frmedt/fefly1.cxx   |8 -
 sw/source/core/frmedt/feshview.cxx |9 +
 sw/source/core/model/ModelTraverser.cxx|   10 --
 sw/source/core/model/SearchResultLocator.cxx   |   18 +--
 sw/source/core/undo/undraw.cxx |   19 +---
 sw/source/core/view/vdraw.cxx  |8 -
 sw/source/uibase/uiview/viewdraw.cxx   |6 -
 sw/source/uibase/uno/unotxdoc.cxx  |   15 +--
 sw/source/uibase/utlui/content.cxx |   25 +
 sw/source/uibase/wrtsh/move.cxx|6 -
 36 files changed, 255 insertions(+), 420 deletions(-)

New commits:
commit 6dc53be7d2eabc23e3d96bae94d38e56d37b2bb5
Author: Noel Grandin 
AuthorDate: Wed Oct 18 12:28:37 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Oct 18 20:08:31 2023 +0200

use more SdrObjList::begin/end in sw

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

diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 3babe9e879d0..9b3ac84876eb 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -1998,13 +1998,12 @@ void SwAccessibleMap::RemoveGroupContext(const 
SdrObject *pParentObj)
 // but also by visibility checks in svx, then it doesn't return children.
 if (mpShapeMap && pParentObj && pParentObj->IsGroupObject())
 {
-SdrObjList *const pChildren(pParentObj->GetSubList());
-for (size_t i = 0; pChildren && i < pChildren->GetObjCount(); ++i)
-{
-SdrObject *const pChild(pChildren->GetObj(i));
-assert(pChild);
-RemoveContext(pChild);
-}
+if (SdrObjList *const pChildren = pParentObj->GetSubList())
+for (const rtl::Reference& pChild : *pChildren)
+{
+assert(pChild);
+RemoveContext(pChild.get());
+}
 }
 }
 //End
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index cd1883ee346b..aecbe2ac824f 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -307,8 +307,8 @@ static void 
lcl_CollectTextBoxesForSubGroupObj(SwFrameFormat* pTargetFormat, std
SdrObject* pSourceObjs)
 {
 if (auto pChildrenObjs = pSourceObjs->getChildrenOfSdrObject())
-for (size_t i = 0; i < pChildrenObjs->GetObjCount(); ++i)
-lcl_CollectTextBoxesForSubGroupObj(pTargetFormat, pTextBoxNode, 
pChildrenObjs->GetObj(i));
+for (const rtl::Reference& pSubObj : *pChildrenObjs)
+lcl_CollectTextBoxesForSubGroupObj(pTargetFormat, pTextBoxNode, 
pSubObj.get());
 else
 {
 if (auto pTextBox = pTextBoxNode->GetTextBox(pSourceObjs))
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index c9881b848d29..ea643f042fe4 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -1303,12 +1303,8 @@ static void lcl_collectUsedNums(std::vector& rSetFlags, sal_Int32
 
 const SdrObjList* pSub(rObj.GetSubList());
 assert(pSub && "IsGroupObject is implemented as GetSubList !=

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

2023-10-18 Thread Stephan Bergmann (via logerrit)
 include/rtl/strbuf.hxx  |2 +-
 include/rtl/string.hxx  |2 +-
 include/rtl/stringutils.hxx |2 +-
 include/rtl/ustrbuf.hxx |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit ca58f649196ed6b4ce15d0db3935f7de4cb0f2ea
Author: Stephan Bergmann 
AuthorDate: Wed Oct 18 17:04:26 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Oct 18 19:33:52 2023 +0200

Extend /clr /std:c++20 char8_t workaround to old versions of VS 2022

On IRC, pppregin now reported that she ran into the issue addressed by
3c6de7e20e35e37cbddd2d35e065525616deac00 "Fix build against VS 2022 17.7.5" 
when
using (a presumably old version of) VS 2022.  And


suggests that older versions of VS 2022 used _MSV_VER values 1930...1936, so
cover those too here.

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

diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx
index e4e4eda1fecd..56f3e2abcc38 100644
--- a/include/rtl/strbuf.hxx
+++ b/include/rtl/strbuf.hxx
@@ -122,7 +122,7 @@ public:
 explicit OStringBuffer(bool) = delete;
 explicit OStringBuffer(char) = delete;
 explicit OStringBuffer(wchar_t) = delete;
-#if !(defined _MSC_VER && _MSC_VER >= 1937 && _MSC_VER <= 1938 && defined 
_MANAGED)
+#if !(defined _MSC_VER && _MSC_VER >= 1930 && _MSC_VER <= 1938 && defined 
_MANAGED)
 explicit OStringBuffer(char8_t) = delete;
 #endif
 explicit OStringBuffer(char16_t) = delete;
diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index a2be12ab320d..62bf0530e819 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -104,7 +104,7 @@ public:
 }
 }
 
-#if !(defined _MSC_VER && _MSC_VER >= 1937 && _MSC_VER <= 1938 && defined 
_MANAGED)
+#if !(defined _MSC_VER && _MSC_VER >= 1930 && _MSC_VER <= 1938 && defined 
_MANAGED)
 #if HAVE_CPP_CONSTEVAL
 consteval
 #else
diff --git a/include/rtl/stringutils.hxx b/include/rtl/stringutils.hxx
index 0239505be0d2..3cd66ee6c146 100644
--- a/include/rtl/stringutils.hxx
+++ b/include/rtl/stringutils.hxx
@@ -247,7 +247,7 @@ struct ConstCharArrayDetector< const char[ 1 ], T >
 #endif
 
 #if defined LIBO_INTERNAL_ONLY \
-&& !(defined _MSC_VER && _MSC_VER >= 1937 && _MSC_VER <= 1938 && defined 
_MANAGED)
+&& !(defined _MSC_VER && _MSC_VER >= 1930 && _MSC_VER <= 1938 && defined 
_MANAGED)
 template
 struct ConstCharArrayDetector {
 using Type = T;
diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx
index cd868b0c6d7b..f41e34aa9d5d 100644
--- a/include/rtl/ustrbuf.hxx
+++ b/include/rtl/ustrbuf.hxx
@@ -124,7 +124,7 @@ public:
 explicit OUStringBuffer(bool) = delete;
 explicit OUStringBuffer(char) = delete;
 explicit OUStringBuffer(wchar_t) = delete;
-#if !(defined _MSC_VER && _MSC_VER >= 1937 && _MSC_VER <= 1938 && defined 
_MANAGED)
+#if !(defined _MSC_VER && _MSC_VER >= 1930 && _MSC_VER <= 1938 && defined 
_MANAGED)
 explicit OUStringBuffer(char8_t) = delete;
 #endif
 explicit OUStringBuffer(char16_t) = delete;


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

2023-10-18 Thread Stephan Bergmann (via logerrit)
 connectivity/source/drivers/macab/MacabAddressBook.cxx |4 ++--
 connectivity/source/drivers/macab/MacabCatalog.cxx |2 +-
 connectivity/source/drivers/macab/MacabDriver.cxx  |2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit f8ad36a2ec1d60b96653cb5538ef6f6c34084583
Author: Stephan Bergmann 
AuthorDate: Wed Oct 18 16:57:34 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Oct 18 18:56:16 2023 +0200

loplugin:stringstatic

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

diff --git a/connectivity/source/drivers/macab/MacabAddressBook.cxx 
b/connectivity/source/drivers/macab/MacabAddressBook.cxx
index 02d4faf74290..7ade1ac0a830 100644
--- a/connectivity/source/drivers/macab/MacabAddressBook.cxx
+++ b/connectivity/source/drivers/macab/MacabAddressBook.cxx
@@ -113,8 +113,8 @@ MacabAddressBook::~MacabAddressBook()
 const OUString & MacabAddressBook::getDefaultTableName()
 {
 /* This string probably needs to be localized. */
-static const OUString aDefaultTableName
-(OUString("Address Book"));
+static constexpr OUString aDefaultTableName
+(u"Address Book"_ustr);
 
 return aDefaultTableName;
 }
diff --git a/connectivity/source/drivers/macab/MacabCatalog.cxx 
b/connectivity/source/drivers/macab/MacabCatalog.cxx
index 96ff62fd5b6a..d6485ab1c971 100644
--- a/connectivity/source/drivers/macab/MacabCatalog.cxx
+++ b/connectivity/source/drivers/macab/MacabCatalog.cxx
@@ -80,7 +80,7 @@ void MacabCatalog::refreshUsers()
 
 const OUString& MacabCatalog::getDot()
 {
-static const OUString sDot = ".";
+static constexpr OUString sDot = u"."_ustr;
 return sDot;
 }
 
diff --git a/connectivity/source/drivers/macab/MacabDriver.cxx 
b/connectivity/source/drivers/macab/MacabDriver.cxx
index f4527bc6094b..9c68e48f12a7 100644
--- a/connectivity/source/drivers/macab/MacabDriver.cxx
+++ b/connectivity/source/drivers/macab/MacabDriver.cxx
@@ -115,7 +115,7 @@ bool MacabImplModule::impl_loadModule()
 OSL_ENSURE( !m_hConnectorModule && !m_pConnectionFactoryFunc,
 "MacabImplModule::impl_loadModule: inconsistence: inconsistency (never 
attempted load before, but some values already set)!");
 
-const OUString sModuleName( SAL_MODULENAME( "macabdrv1" ) );
+constexpr OUString sModuleName( u"" SAL_MODULENAME( "macabdrv1" ) ""_ustr 
);
 m_hConnectorModule = osl_loadModuleRelative( &thisModule, 
sModuleName.pData, SAL_LOADMODULE_NOW );   // LAZY! #i61335#
 OSL_ENSURE( m_hConnectorModule, "MacabImplModule::impl_loadModule: could 
not load the implementation library!" );
 if ( !m_hConnectorModule )


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

2023-10-18 Thread Noel Grandin (via logerrit)
 sc/source/ui/inc/output.hxx   |9 +-
 sc/source/ui/view/output.cxx  |4 +
 sc/source/ui/view/output2.cxx |  148 --
 3 files changed, 94 insertions(+), 67 deletions(-)

New commits:
commit c546b33dde8760cdc8d9990e672cc8cb344e470e
Author: Noel Grandin 
AuthorDate: Fri Oct 13 09:49:57 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Oct 18 18:52:08 2023 +0200

cool#6893 cache the EditEngine for rendering

to avoid re-allocating one constantly

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

diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index 1a445f9e14e4..e4763767b7f5 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -240,6 +240,7 @@ private:
 // #i74769# use SdrPaintWindow direct, remember it during 
BeginDrawLayers/EndDrawLayers
 SdrPaintWindow* mpTargetPaintWindow;
 const sc::SpellCheckContext* mpSpellCheckCxt;
+std::unique_ptr mxOutputEditEngine;
 
 // private methods
 
@@ -278,7 +279,7 @@ private:
 void DrawEditStacked(DrawEditParam& rParam);
 void DrawEditAsianVertical(DrawEditParam& rParam);
 
-std::unique_ptr CreateOutputEditEngine();
+void InitOutputEditEngine();
 
 void SetClipMarks( OutputAreaParam &aAreaParam, ScCellInfo* pClipMarkCell,
SvxCellHorJustify eOutHorJust, tools::Long nLayoutSign 
);
@@ -318,14 +319,14 @@ public:
 voidSetSpellCheckContext( const sc::SpellCheckContext* pCxt );
 voidSetContentDevice( OutputDevice* pContentDev );
 
-voidSetRefDevice( OutputDevice* pRDev ) { mpRefDevice = pFmtDevice = 
pRDev; }
-voidSetFmtDevice( OutputDevice* pRDev ) { pFmtDevice = pRDev; }
+voidSetRefDevice( OutputDevice* pRDev );
+voidSetFmtDevice( OutputDevice* pRDev );
 voidSetViewShell( ScTabViewShell* pSh ) { pViewShell = pSh; }
 
 voidSetDrawView( FmFormView* pNew ) { pDrawView = pNew; }
 
 voidSetSolidBackground( bool bSet ) { bSolidBackground = bSet; }
-voidSetUseStyleColor( bool bSet )   { mbUseStyleColor = bSet; }
+voidSetUseStyleColor( bool bSet );
 
 voidSetEditCell( SCCOL nCol, SCROW nRow );
 voidSetSyntaxMode( bool bNewMode );
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index f3b4b3ca9be2..8461c446 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -61,6 +61,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -212,6 +213,7 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, 
ScOutputType eNewType,
 
 // always needed, so call at the end of the constructor
 SetCellRotations();
+InitOutputEditEngine();
 }
 
 ScOutputData::~ScOutputData()
@@ -262,6 +264,8 @@ void ScOutputData::SetShowFormulas( bool bSet )
 void ScOutputData::SetShowSpellErrors( bool bSet )
 {
 bShowSpellErrors = bSet;
+// reset EditEngine because it depends on bShowSpellErrors
+mxOutputEditEngine.reset();
 }
 
 void ScOutputData::SetSnapPixel()
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 6dbd218caf61..c80c6483bc5e 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -2177,27 +2177,56 @@ void ScOutputData::LayoutStrings(bool bPixelToLogic)
 ScProgress::DeleteInterpretProgress();
 }
 
-std::unique_ptr ScOutputData::CreateOutputEditEngine()
+void ScOutputData::SetRefDevice( OutputDevice* pRDev )
 {
-std::unique_ptr pEngine(new ScFieldEditEngine(mpDoc, 
mpDoc->GetEnginePool()));
-pEngine->SetUpdateLayout( false );
-pEngine->EnableUndo( false ); // don't need undo for painting purposes
-// a RefDevice always has to be set, otherwise EditEngine would create a 
VirtualDevice
-pEngine->SetRefDevice( pFmtDevice );
-EEControlBits nCtrl = pEngine->GetControlWord();
-if ( bShowSpellErrors )
-nCtrl |= EEControlBits::ONLINESPELLING;
-if ( eType == OUTTYPE_PRINTER )
-nCtrl &= ~EEControlBits::MARKFIELDS;
+mpRefDevice = pFmtDevice = pRDev;
+// reset EditEngine because it depends on pFmtDevice and mpRefDevice
+mxOutputEditEngine.reset();
+}
+
+void ScOutputData::SetFmtDevice( OutputDevice* pRDev )
+{
+pFmtDevice = pRDev;
+// reset EditEngine because it depends on pFmtDevice
+mxOutputEditEngine.reset();
+}
+
+void ScOutputData::SetUseStyleColor( bool bSet )
+{
+mbUseStyleColor = bSet;
+// reset EditEngine because it depends on mbUseStyleColor
+mxOutputEditEngine.reset();
+}
+
+void ScOutputData::InitOutputEditEngine()
+{
+if (!mxOutputEditEngine)
+{
+mxOutputEditEngine = std::make_unique(mpDoc, 
mpDoc->GetEnginePool());
+mxOutputEditEngine->SetUpdateLayout( false );
+mxOutputEditEngine->EnableUndo( 

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

2023-10-18 Thread Stephan Bergmann (via logerrit)
 stoc/source/javavm/javavm.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 871c37f782a53cec13bed724b90495197348aa29
Author: Stephan Bergmann 
AuthorDate: Wed Oct 18 16:57:14 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Oct 18 18:34:01 2023 +0200

loplugin:indentation

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

diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index fa5883ae3fa7..a41dde50f1ef 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -474,9 +474,9 @@ public:
 // current thread" calls to the JVM.
 if (CFRunLoopGetCurrent() != CFRunLoopGetMain())
 #endif
-if (m_jvm->DetachCurrentThread() != 0) {
-OSL_ASSERT(false);
-}
+if (m_jvm->DetachCurrentThread() != 0) {
+OSL_ASSERT(false);
+}
 }
 
 DetachCurrentThread(const DetachCurrentThread&) = delete;


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

2023-10-18 Thread Henry Castro (via logerrit)
 sc/source/ui/view/output2.cxx |   14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

New commits:
commit c9319cdfa269ff3e043f012731406bf3fd4e1810
Author: Henry Castro 
AuthorDate: Wed Oct 11 08:59:59 2023 -0400
Commit: Henry Castro 
CommitDate: Wed Oct 18 18:17:51 2023 +0200

sc: ui: fix cell bidi layout strings

The default constructor OutputDevice set the
layout text to "vcl::text::ComplexTextLayoutFlags::BiDiRtl"
for all strings, however the each cell string can be
mixed LTR and RTL.

Set the defaults to auto detect the correct text layout mode.
.

Signed-off-by: Henry Castro 
Change-Id: I0c451e8014fd13490db4213adca3d83ea4572819
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157831
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Caolán McNamara 
(cherry picked from commit f63e02b99691a0d8c8addba2518ecdf6b4319c52)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157952

diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 302f2db07a01..e944eb0e0a08 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -1521,14 +1521,22 @@ tools::Rectangle ScOutputData::LayoutStrings(bool 
bPixelToLogic, bool bPaint, co
 {
 bool bOrigIsInLayoutStrings = mpDoc->IsInLayoutStrings();
 mpDoc->SetLayoutStrings(true);
-comphelper::ScopeGuard g([this, bOrigIsInLayoutStrings] {
-mpDoc->SetLayoutStrings(bOrigIsInLayoutStrings);
-});
 
 OSL_ENSURE( mpDev == mpRefDevice ||
 mpDev->GetMapMode().GetMapUnit() == 
mpRefDevice->GetMapMode().GetMapUnit(),
 "LayoutStrings: different MapUnits ?!?!" );
 
+vcl::text::ComplexTextLayoutFlags eTextLayout = mpDev->GetLayoutMode();
+comphelper::ScopeGuard g([this, bOrigIsInLayoutStrings, eTextLayout] {
+mpDoc->SetLayoutStrings(bOrigIsInLayoutStrings);
+
+if (mpDev->GetLayoutMode() != eTextLayout)
+mpDev->SetLayoutMode(eTextLayout);
+});
+
+if (mpDev->GetLayoutMode() != vcl::text::ComplexTextLayoutFlags::Default)
+mpDev->SetLayoutMode(vcl::text::ComplexTextLayoutFlags::Default);
+
 sc::IdleSwitch aIdleSwitch(*mpDoc, false);
 
 // Try to limit interpreting to only visible cells. Calling e.g. IsValue()


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

2023-10-18 Thread Hossein (via logerrit)
 basctl/source/basicide/brkdlg.cxx |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit e94cbd7dbf4a8c82f17522806a9011c89bf20865
Author: Hossein 
AuthorDate: Wed Oct 18 10:29:22 2023 +0200
Commit: Hossein 
CommitDate: Wed Oct 18 17:41:52 2023 +0200

Remove obsolete comments in basctl

First comment was last updated with USHORT -> sal_uInt16 in
a2242be9c3551310027b341db53164ebd78bc6c8 but with the newer commit
68ec95b3f80408ae50897b043eed69a07d084df9 there is no remaining sal_uInt16
left, and thus the comment is no longer relevant.

Second comment was added in 1fac87f84723a3d6e7e13c091e39b09e0dea1aa5,
but with changes in 444c242c51e6b049598359ea6cf98e34f611838b it is no
longer relevant.

Third comment was also last updated with USHORT -> sal_uInt16 in
a2242be9c3551310027b341db53164ebd78bc6c8 but with the newer commit
444c242c51e6b049598359ea6cf98e34f611838b it is no longer relevant.

Change-Id: I9ed383f15a5b403740c0b8bcdd153d04bb1a2b0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158111
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/basctl/source/basicide/brkdlg.cxx 
b/basctl/source/basicide/brkdlg.cxx
index 37ba1dbb60ae..48522d11ac37 100644
--- a/basctl/source/basicide/brkdlg.cxx
+++ b/basctl/source/basicide/brkdlg.cxx
@@ -28,15 +28,11 @@
 
 namespace basctl
 {
-// FIXME  Why does BreakPointDialog allow only sal_uInt16 for break-point line
-// numbers, whereas BreakPoint supports sal_uLong?
-
 namespace
 {
 bool lcl_ParseText(OUString const& rText, size_t& rLineNr)
 {
-// aText should look like "# n" where
-// n > 0 && n < std::numeric_limits< sal_uInt16 >::max().
+// aText should look like "# n" where n > 0
 // All spaces are ignored, so there can even be spaces within the
 // number n.  (Maybe it would be better to ignore all whitespace instead
 // of just spaces.)
@@ -48,7 +44,6 @@ bool lcl_ParseText(OUString const& rText, size_t& rLineNr)
 return false;
 if (cFirst == '#')
 aText = aText.copy(1);
-// XXX Assumes that sal_uInt16 is contained within sal_Int32:
 sal_Int32 n = aText.toInt32();
 if (n <= 0)
 return false;


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

2023-10-18 Thread Laurent Balland (via logerrit)
 sc/inc/globstr.hrc |   14 
+-
 sc/inc/strings.hrc |2 -
 sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx |2 -
 sc/source/ui/view/cellsh.cxx   |   12 
 4 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 9a0018a356c89baf600a72eed8ee4ac927815b9b
Author: Laurent Balland 
AuthorDate: Wed Feb 22 23:01:01 2023 +0100
Commit: Laurent Balland 
CommitDate: Wed Oct 18 17:03:07 2023 +0200

Replace $baz by %foo for sanity checks

Tools for sanity-checks like
https://docs.weblate.org/en/latest/user/checks.html#percent-placeholders
looks for percent instead of dollar
Try to align with %1 as suggested by Chistian Lohmaier

Change-Id: I97d353f452316b939f2eaf7d30e68b9aab9f83e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147493
Tested-by: Jenkins
Reviewed-by: Laurent Balland 

diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 2b949cba8264..e8e45fc01b2e 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -157,14 +157,14 @@
 #define STR_PIVOT_GROUP NC_("STR_PIVOT_GROUP", "Group")
 #define STR_PIVOT_ROW_LABELSNC_("STR_PIVOT_ROW_LABELS", 
"Row Labels")
 #define STR_PIVOT_COL_LABELSNC_("STR_PIVOT_COL_LABELS", 
"Column Labels")
-/* To translators: $1 == will be replaced by STR_SELCOUNT_ROWARG, and $2 by 
STR_SELCOUNT_COLARG
+/* %1 will be replaced by STR_SELCOUNT_ROWARG, and %2 by STR_SELCOUNT_COLARG
e.g. Selected: 1 row, 2 columns */
-#define STR_SELCOUNTNC_("STR_SELCOUNT", "Selected: 
$1, $2")
-// To translators: STR_SELCOUNT_ROWARG is $1 of STR_SELCOUNT. $1 of 
STR_SELCOUNT_ROWARG is number of rows
-#define STR_SELCOUNT_ROWARG NNC_("STR_SELCOUNT_ROWARG", 
"$1 row", "$1 rows")
-// To translators: STR_SELCOUNT_COLARG is $1 of STR_SELCOUNT. $1 of 
STR_SELCOUNT_ROWARG is number of columns
-#define STR_SELCOUNT_COLARG NNC_("STR_SELCOUNT_COLARG", 
"$1 column", "$1 columns")
-#define STR_FILTER_SELCOUNT NC_("STR_FILTER_SELCOUNT", "$1 
of $2 records found")
+#define STR_SELCOUNTNC_("STR_SELCOUNT", "Selected: 
%1, %2")
+// STR_SELCOUNT_ROWARG is %1 of STR_SELCOUNT. %d of STR_SELCOUNT_ROWARG is 
number of rows
+#define STR_SELCOUNT_ROWARG NNC_("STR_SELCOUNT_ROWARG", 
"%d row", "%d rows")
+// STR_SELCOUNT_COLARG is %2 of STR_SELCOUNT. %d of STR_SELCOUNT_ROWARG is 
number of columns
+#define STR_SELCOUNT_COLARG NNC_("STR_SELCOUNT_COLARG", 
"%d column", "%d columns")
+#define STR_FILTER_SELCOUNT NC_("STR_FILTER_SELCOUNT", "%1 
of %2 records found")
 #define STR_COLUMN  NC_("STR_COLUMN", "Column")
 #define STR_ROW NC_("STR_ROW", "Row")
 #define STR_PAGENC_("STR_PAGE", "Page")
diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc
index b40ed197be4b..74c15b5b698b 100644
--- a/sc/inc/strings.hrc
+++ b/sc/inc/strings.hrc
@@ -259,7 +259,7 @@
 #define STRID_CALC_FIRST_QUARTILE   
NC_("STRID_CALC_FIRST_QUARTILE", "First Quartile")
 #define STRID_CALC_THIRD_QUARTILE   
NC_("STRID_CALC_THIRD_QUARTILE", "Third Quartile")
 /* RandomNumberGeneratorDialog */
-#define STR_UNDO_DISTRIBUTION_TEMPLATE  
NC_("STR_UNDO_DISTRIBUTION_TEMPLATE", "Random ($(DISTRIBUTION))")
+#define STR_UNDO_DISTRIBUTION_TEMPLATE  
NC_("STR_UNDO_DISTRIBUTION_TEMPLATE", "Random (%1)")
 #define STR_DISTRIBUTION_UNIFORM_REAL   
NC_("STR_DISTRIBUTION_UNIFORM_REAL", "Uniform")
 #define STR_DISTRIBUTION_UNIFORM_INTEGER
NC_("STR_DISTRIBUTION_UNIFORM_INTEGER", "Uniform Integer")
 #define STR_DISTRIBUTION_NORMAL 
NC_("STR_DISTRIBUTION_NORMAL", "Normal")
diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx 
b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
index 2490ebf47301..38894160eff1 100644
--- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
@@ -262,7 +262,7 @@ void ScRandomNumberGeneratorDialog::GenerateNumbers(RNG& 
randomGenerator, Transl
 {
 OUString aUndo = ScResId(STR_UNDO_DISTRIBUTION_TEMPLATE);
 OUString aDistributionName = ScResId(pDistributionStringId);
-aUndo = aUndo.replaceAll("$(DISTRIBUTION)",  aDistributionName);
+aUndo = aUndo.replaceAll("%1",  aDistributionName);
 
 ScDocShell* pDocShell = mrViewData.GetDocShell();
 SfxUndoManager* pUndoManager = pDocShell->GetUndoManager();
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 34c87d0e61c6..1a866df3c881 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/c

ESC meeting agenda: 2023-10-19 16:00 CEST

2023-10-18 Thread Miklos Vajna

Hi,

The prototype agenda is below. Extra items are appreciated either in
this document or as a reply to this mail:

https://pad.documentfoundation.org/p/esc

You can join using Jitsi here:

https://jitsi.documentfoundation.org/esc

Regards,

Miklos

---

* Present:
+

* Completed Action Items:

* Pending Action Items:
+ Set up a daily tinderbox for the python-based windows installer (Cloph)

* Release Engineering update (Cloph)
+ 7.6 status: 7.6.3 rc1 in 2 weeks?
+ 7.5 status: 7.5.8 rc2 in 1 week?

* Documentation (Olivier)
+ Bugzilla Documentation statistics
272(272) bugs open
+ Updates:
BZ changes   1 week   1 month   3 months   12 months
   created 4(-1)20(-1) 66(-8) 292(-2)
 commented 9(0) 43(-3)212(-25)   1080(-2)
  resolved 2(2)  5(-1) 29(-3) 157(-2)
+ top 10 contributors:
  Ilmari Lauhakangas made 15 changes in 1 month, and 125 changes in 1 
year
  Stéphane Guillou made 14 changes in 1 month, and 352 changes in 1 year
  Olivier Hallot made 9 changes in 1 month, and 429 changes in 1 year
  Kaganski, Mike made 8 changes in 1 month, and 78 changes in 1 year
  aswath t made 7 changes in 1 month, and 7 changes in 1 year
  Xisco Fauli made 4 changes in 1 month, and 14 changes in 1 year
  Rathke, Eike made 2 changes in 1 month, and 10 changes in 1 year
  Elisabeth Dapper made 1 changes in 1 month, and 1 changes in 1 year
  MISY Nyias made 1 changes in 1 month, and 1 changes in 1 year
  wrigh made 1 changes in 1 month, and 1 changes in 1 year

* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
254(254) (topicUI) bugs open, 56(56) (needsUXEval) needs to be 
evaluated by the UXteam
+ Updates:
BZ changes   1 week1 month3 months   12 months
 added  1(-18)17(-9) 19(-13) 42(-14)
 commented 41(-21)   141(-68)   400(-74)   2169(-93)
   removed  1(0)   2(1)   3(1)   20(0)
  resolved 11(8)  30(4)  86(2)  324(5)
+ top 10 contributors:
  Heiko Tietze made 110 changes in 1 month, and 1364 changes in 1 year
  Stéphane Guillou made 87 changes in 1 month, and 532 changes in 1 year
  Ilmari Lauhakangas made 27 changes in 1 month, and 229 changes in 1 
year
  Justin Luth made 22 changes in 1 month, and 114 changes in 1 year
  Eyal Rozenberg made 18 changes in 1 month, and 247 changes in 1 year
  Kelemen, Gabor made 18 changes in 1 month, and 24 changes in 1 year
  Bogdan B made 15 changes in 1 month, and 111 changes in 1 year
  Balazs Varga made 14 changes in 1 month, and 14 changes in 1 year
  Roman Kuznetsov made 6 changes in 1 month, and 123 changes in 1 year
  Dieter made 5 changes in 1 month, and 233 changes in 1 year

* Crash Testing (Caolan)
+ 6(-6) import failure, 0(+0) export failures
+ ??? coverity issues
+ Google / ossfuzz: ?? fuzzers active now

* Crash Reporting (Xisco)
+ 7.6.0.2110(+0)
+ 7.6.0.312800(+673)
+ 7.6.1.26140(+394)
+ 7.6.2.14348(+1292)

* Mentoring (Hossein)
  committer...   1 week1 month3 months12 months
  open  52(-9)83(-16)142(-15) 199(-17)
   reviews 332(18)   986(34)3306(58)11650(32)
merged 244(18)   909(62)2949(32)12751(33)
 abandoned  24(18)42(14) 156(15)  651(12)
   own commits 177(26)   638(64)2065(28) 9700(-1)
review commits  64(17)   206(32) 626(8)  3037(-13)
contributor...   1 week1 month 3 months   12 months
  open  41(22) 70(5)  103(5)  138(12)
   reviews 704(70)   2224(128)   6898(80)   30542(-10)
merged  16(8)  48(8)  178(-7)2033(-37)
 abandoned   7(2)  37(3)  211(7)  619(4)
   own commits  21(5)  74(8)  206(-2)1098(-9)
review commits   0(0)   0(0)0(0)0(0)
+ easyHack statistics:
   needsDevEval 8(8)   needsUXEval 1(1)   cleanup_comments 319(319)
   total 398(398)   assigned 20(20)   open 353(353)
+ top 10 contributors:
  Bogdan B made 6 patches in 1 month, and 100 patches in 1 year
  Stéphane Guillou made 6 patches in 1 month, and 37 patches in 1 year
  Ankit Kumar Jaipuriar made 5 patches in 1 month, and 5 patches in 1 
year
  Priyadarshi, Apurva made 2 patches in 1 month, and 2 patches in 1 year
  Srebotnjak, Martin made 2 patches in 1 month, and 20 patches in 1 year
  Hannah Meeks made 2 patches in 1 month, and 5 patches in 1 year
  Omkar Acharekar  made 2 patches in 1 month, and 6 patches in 1 year
  Darshan Upadhyay made 

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

2023-10-18 Thread Michael Stahl (via logerrit)
 vcl/source/pdf/XmpMetadata.cxx |   83 -
 1 file changed, 82 insertions(+), 1 deletion(-)

New commits:
commit a4971aab4d57bf9177c55c3fb0e163e0db7c48fd
Author: Michael Stahl 
AuthorDate: Wed Oct 18 14:23:48 2023 +0200
Commit: Michael Stahl 
CommitDate: Wed Oct 18 16:58:07 2023 +0200

tdf#157517 vcl: PDF/UA export: add PDF/A extension schema to XMP

... if PDF/A is also enabled.  Thanks to Peter Wyatt for the example
document.

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

diff --git a/vcl/source/pdf/XmpMetadata.cxx b/vcl/source/pdf/XmpMetadata.cxx
index cb88016365b3..e90befdc05b6 100644
--- a/vcl/source/pdf/XmpMetadata.cxx
+++ b/vcl/source/pdf/XmpMetadata.cxx
@@ -189,8 +189,89 @@ void XmpMetadata::write()
 }
 
 // PDF/UA
-if (mbPDF_UA && mnPDF_A == 0) // veraPDF says this is not allowed in 
PDF/A-[123][ab]
+if (mbPDF_UA)
 {
+if (mnPDF_A != 0)
+{ // tdf#157517 PDF/A extension schema is required
+aXmlWriter.startElement("rdf:Description");
+aXmlWriter.attribute("rdf:about", OString(""));
+aXmlWriter.attribute("xmlns:pdfaExtension",
+ 
OString("http://www.aiim.org/pdfa/ns/extension/";));
+aXmlWriter.attribute("xmlns:pdfaSchema",
+ 
OString("http://www.aiim.org/pdfa/ns/schema#";));
+aXmlWriter.attribute("xmlns:pdfaProperty",
+ 
OString("http://www.aiim.org/pdfa/ns/property#";));
+aXmlWriter.startElement("pdfaExtension:schemas");
+aXmlWriter.startElement("rdf:Bag");
+aXmlWriter.startElement("rdf:li");
+aXmlWriter.attribute("rdf:parseType", OString("Resource"));
+aXmlWriter.startElement("pdfaSchema:namespaceURI");
+aXmlWriter.content("http://www.aiim.org/pdfua/ns/id/";);
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaSchema:prefix");
+aXmlWriter.content("pdfuaid");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaSchema:schema");
+aXmlWriter.content("PDF/UA identification schema");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaSchema:property");
+aXmlWriter.startElement("rdf:Seq");
+
+aXmlWriter.startElement("rdf:li");
+aXmlWriter.attribute("rdf:parseType", OString("Resource"));
+aXmlWriter.startElement("pdfaProperty:category");
+aXmlWriter.content("internal");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaProperty:description");
+aXmlWriter.content("PDF/UA version identifier");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaProperty:name");
+aXmlWriter.content("part");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaProperty:valueType");
+aXmlWriter.content("Integer");
+aXmlWriter.endElement();
+aXmlWriter.endElement(); // rdf:li
+
+aXmlWriter.startElement("rdf:li");
+aXmlWriter.attribute("rdf:parseType", OString("Resource"));
+aXmlWriter.startElement("pdfaProperty:category");
+aXmlWriter.content("internal");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaProperty:description");
+aXmlWriter.content("PDF/UA amendment identifier");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaProperty:name");
+aXmlWriter.content("amd");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaProperty:valueType");
+aXmlWriter.content("Text");
+aXmlWriter.endElement();
+aXmlWriter.endElement(); // rdf:li
+
+aXmlWriter.startElement("rdf:li");
+aXmlWriter.attribute("rdf:parseType", OString("Resource"));
+aXmlWriter.startElement("pdfaProperty:category");
+aXmlWriter.content("internal");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaProperty:description");
+aXmlWriter.content("PDF/UA corrigenda identifier");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaProperty:name");
+aXmlWriter.content("corr");
+aXmlWriter.endElement();
+aXmlWriter.startElement("pdfaProperty:valueType");
+aXmlWriter.conte

Re: Some TBs need Java upgrade following Java 17 bump

2023-10-18 Thread Christian Lohmaier
Hi *,

On Wed, Oct 18, 2023 at 1:16 PM Julien Nabet  wrote:
>
> Hello Guilhem, Christian
>
> https://ci.libreoffice.org/view/tb%20platform%20status/ shows several
> TBs in red.
>
> Would it be possible to have them upgraded?

Thx, it is not the bots, but rather the jobs that need to have their
config adjusted, will take care of that...

> Remarks:
>
> 1) I thought about Redmine but had no feedback about
> https://redmine.documentfoundation.org/issues/3684 (WASM need at least
> GCC 12.0).

That is updated, but the job fails, if you check recent logs you'll
see that the problem is not gcc 12, but an older problem with the job.

> 2) it seems there's also Windows Jenkins pb, I had on different patches
> this:

tb77 ran out of disk space. In general it is better to report such bot
issues immediately on irc in #tdf-infra

ciao
Christian


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

2023-10-18 Thread Regina Henschel (via logerrit)
 cui/uiconfig/ui/connectortabpage.ui |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 6c32d052011132e891dab3254bf2a2ea6f31e888
Author: Regina Henschel 
AuthorDate: Mon Oct 9 13:31:06 2023 +0200
Commit: Regina Henschel 
CommitDate: Wed Oct 18 14:36:55 2023 +0200

tdf#132605 Negative skew values in connector dialog

The skew values of a standard connector can have negative values.
Those are possible in ODF, rendered in LO and produced by dragging the
handles. Only the dialog restricts the metric field to non negative
values. The patch allows negative values now.

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

diff --git a/cui/uiconfig/ui/connectortabpage.ui 
b/cui/uiconfig/ui/connectortabpage.ui
index a2f6aadf3e03..d82e643f4629 100644
--- a/cui/uiconfig/ui/connectortabpage.ui
+++ b/cui/uiconfig/ui/connectortabpage.ui
@@ -3,16 +3,19 @@
 
   
   
+-100
 100
 1
 10
   
   
+-100
 100
 1
 10
   
   
+-100
 100
 1
 10


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

2023-10-18 Thread Miklos Vajna (via logerrit)
 sw/source/core/layout/frmtool.cxx |   35 -
 sw/source/core/text/itrform2.cxx  |   45 ++
 2 files changed, 32 insertions(+), 48 deletions(-)

New commits:
commit 626fe9ab5ebebc4ef36e35f4aa597c03a3564d22
Author: Miklos Vajna 
AuthorDate: Wed Oct 18 08:52:44 2023 +0200
Commit: Miklos Vajna 
CommitDate: Wed Oct 18 14:20:37 2023 +0200

tdf#157573 sw floattable: fix incorrect lack of left margin after table

Regression from d477fa8ac1b0d3ee81427217bbb5950278ab16db (sw floattable:
unconditionally map  to SwFormatFlySplit, 2023-03-17), the
paragraph after the anchor of the floating table in the document lost
its left paragraph margin at a layout level.

Turns out the problem was there earlier, but it was hidden for this
specific document, because we used to map DOCX floating tables to Writer
inline tables in some cases before. The real problem was introduced
earlier, in my 50a1df360c907d8419ce49f098b6bc87a37a9956 (n#775899 sw:
add FloattableNomargins compat flag, 2012-08-23), even a TODO was added
to point out this will be problematic. The old bugdoc wants to get rid
of margins, because the floating table is already shifting text towards
the right, the new bugdoc wants to keep the original margin as the
paragraph after the anchor is not wrapping.

Fix the problem by reverting the older fix and re-fix the old document
differently. Don't do changes to the paragraph margin: that's not a good
idea. If there is enough anchor text, it'll lead to a visibly bad
paragraph margin anyway. Instead of reducing the paragraph margin,
reduce the width of the fly portion in the paragraphs that intersect
with the floating table. That's reasonly straightforward to do, because
SwTextFormatter::CalcFlyWidth() already has a case when we know we're
intersecting with a floating table and we also know that the floating
table is aligned to the left. In this case we can simply reduce the fly
portion width with the paragraph margin. This keeps the old bugdoc fixed
and fixes the new bugdoc.

It also means that DocumentSettingId::FLOATTABLE_NOMARGINS is now
effectively unused, but that's not yet removed in this change.

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

diff --git a/sw/source/core/layout/frmtool.cxx 
b/sw/source/core/layout/frmtool.cxx
index f7bfd409322a..c3fa35fcdc7b 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -2367,25 +2367,6 @@ tools::Long SwBorderAttrs::CalcRight( const SwFrame* 
pCaller ) const
 return nRight;
 }
 
-/// Tries to detect if this paragraph has a floating table attached.
-static bool lcl_hasTabFrame(const SwTextFrame* pTextFrame)
-{
-if (pTextFrame->GetDrawObjs())
-{
-const SwSortedObjs* pSortedObjs = pTextFrame->GetDrawObjs();
-if (pSortedObjs->size() > 0)
-{
-SwAnchoredObject* pObject = (*pSortedObjs)[0];
-if (auto pFly = pObject->DynCastFlyFrame())
-{
-if (pFly->Lower() && pFly->Lower()->IsTabFrame())
-return true;
-}
-}
-}
-return false;
-}
-
 tools::Long SwBorderAttrs::CalcLeft( const SwFrame *pCaller ) const
 {
 tools::Long nLeft=0;
@@ -2405,23 +2386,9 @@ tools::Long SwBorderAttrs::CalcLeft( const SwFrame 
*pCaller ) const
 nLeft += m_pRightMargin->GetRight();
 else
 {
-bool bIgnoreMargin = false;
 if (pCaller->IsTextFrame())
 {
-const SwTextFrame* pTextFrame = static_cast(pCaller);
-if 
(pTextFrame->GetDoc().GetDocumentSettingManager().get(DocumentSettingId::FLOATTABLE_NOMARGINS))
-{
-// If this is explicitly requested, ignore the margins next to 
the floating table.
-if (lcl_hasTabFrame(pTextFrame))
-bIgnoreMargin = true;
-// TODO here we only handle the first two paragraphs, would be 
nice to generalize this.
-else if (pTextFrame->FindPrev() && 
pTextFrame->FindPrev()->IsTextFrame() && lcl_hasTabFrame(static_cast(pTextFrame->FindPrev(
-bIgnoreMargin = true;
-}
-if (!bIgnoreMargin)
-{
-nLeft += m_pTextLeftMargin->GetLeft(*m_pFirstLineIndent);
-}
+nLeft += m_pTextLeftMargin->GetLeft(*m_pFirstLineIndent);
 }
 else
 nLeft += m_xLR->GetLeft();
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 7e4841fdb0c6..14d5d842e604 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -2779,13 +2779,42 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo 
&rInf

[Libreoffice-commits] dev-tools.git: esc-reporting/esc-analyze.py

2023-10-18 Thread Xisco Fauli (via logerrit)
 esc-reporting/esc-analyze.py |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ad9fdcbf7ae7f9f6fca0bbafe6f8c53eafe2b17c
Author: Xisco Fauli 
AuthorDate: Wed Oct 18 13:41:41 2023 +0200
Commit: Xisco Fauli 
CommitDate: Wed Oct 18 13:41:41 2023 +0200

esc-reporting: only abandon patches in core project.

For other project the script fails because it doesn't have permission

Change-Id: I5dcf9e59461f873480f21bd23f6a7266fbc0b7a5

diff --git a/esc-reporting/esc-analyze.py b/esc-reporting/esc-analyze.py
index 2dd329da..8289fceb 100755
--- a/esc-reporting/esc-analyze.py
+++ b/esc-reporting/esc-analyze.py
@@ -787,7 +787,7 @@ def analyze_reports():
 
 if xDate < cfg['1monthDate']:
   # gerrit cli sucks and doesn't accept changeset,patchrev but only 
uses numericID
-  if 'A polite ping' in txt:
+  if 'A polite ping' in txt and row['project'] == "core":
 automateList['gerrit']['to_abandon_abandon'][entry['id']] = 
patchset
   else:
 automateList['gerrit']['to_abandon_comment'][entry['id']] = 
patchset


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

2023-10-18 Thread Mike Kaganski (via logerrit)
 dbaccess/source/core/inc/ModelImpl.hxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit ae17d08c116e5865ba5448edfb415ea2d3f87c19
Author: Mike Kaganski 
AuthorDate: Wed Oct 18 11:52:13 2023 +0200
Commit: Mike Kaganski 
CommitDate: Wed Oct 18 14:12:56 2023 +0200

Drop duplicated forward declarations

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

diff --git a/dbaccess/source/core/inc/ModelImpl.hxx 
b/dbaccess/source/core/inc/ModelImpl.hxx
index fdaf89f1511d..3140c3c2bdc7 100644
--- a/dbaccess/source/core/inc/ModelImpl.hxx
+++ b/dbaccess/source/core/inc/ModelImpl.hxx
@@ -85,9 +85,6 @@ struct AsciiPropertyValue
 }
 };
 
-class ODatabaseContext;
-class OSharedConnectionManager;
-
 // ODatabaseModelImpl
 typedef ::utl::SharedUNOComponent< css::embed::XStorage >  SharedStorage;
 


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

2023-10-18 Thread Michael Weghorn (via logerrit)
 sw/source/uibase/uiview/view2.cxx |   17 ++---
 1 file changed, 14 insertions(+), 3 deletions(-)

New commits:
commit 680ae3e989c3b665b29f536c2e30dd86bbc3edac
Author: Michael Weghorn 
AuthorDate: Wed Oct 18 10:59:33 2023 +0200
Commit: Michael Weghorn 
CommitDate: Wed Oct 18 13:47:35 2023 +0200

tdf#156033 sw: Don't capture mouse when executing file dlg

When the mouse is captured in
`SwView::InsertGraphicDlg`, temporarily
release it while executing the file dialog,
so the user can use the mouse to interact with
the file dialog.

At least with qt5/qt6/kf5, this would otherwise
not work in the file dialog shown after clicking
on a previously inserted Picture Content Control,
because `QWidget::grabMouse()`'s "other widgets
get no mouse events at all" [1] apparently applies
for the file dialog and other running applications
as well.

[1] https://doc.qt.io/qt-6/qwidget.html#grabMouse

Change-Id: I80a81c57c80debc716a1b111a9c07eef0c005c65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158109
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/sw/source/uibase/uiview/view2.cxx 
b/sw/source/uibase/uiview/view2.cxx
index 143472a83042..8d6239497eb6 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -441,11 +441,22 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
 
 const SfxStringItem* pName = 
rReq.GetArg(SID_INSERT_GRAPHIC);
 bool bShowError = !pName;
-if( pName
+
+bool bHaveName = pName != nullptr;
 #if HAVE_FEATURE_DESKTOP
-|| (!Application::IsHeadlessModeEnabled() && ERRCODE_NONE == 
pFileDlg->Execute())
+if (!bHaveName && !Application::IsHeadlessModeEnabled())
+{
+// execute file dialog, without capturing mouse (tdf#156033)
+vcl::Window* pWin = GetWindow();
+const bool bMouseCaptured = pWin && pWin->IsMouseCaptured();
+if (bMouseCaptured)
+pWin->ReleaseMouse();
+bHaveName =  ERRCODE_NONE == pFileDlg->Execute();
+if (bMouseCaptured)
+pWin->CaptureMouse();
+}
 #endif
-)
+if (bHaveName)
 {
 
 OUString aFileName, aFilterName;


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

2023-10-18 Thread Noel Grandin (via logerrit)
 cppcanvas/source/mtfrenderer/implrenderer.cxx |2 +-
 drawinglayer/source/tools/wmfemfhelper.cxx|2 +-
 filter/source/msfilter/mstoolbar.cxx  |2 +-
 svx/source/dialog/_bmpmask.cxx|4 ++--
 svx/source/dialog/_contdlg.cxx|4 ++--
 vcl/source/graphic/GraphicObject2.cxx |2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 25f4ef5aa5488869b3bad045ba203c6b22b2e2f0
Author: Noel Grandin 
AuthorDate: Wed Oct 18 09:53:15 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Oct 18 13:38:36 2023 +0200

tdf#157792 followup

avoid doing some extra Invert() operations by creating an AlphaMask
instead of a Bitmap to pass to the BitmapEx constructor.

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

diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx 
b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 6bd99840f0a8..d3cfe793f45f 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -208,7 +208,7 @@ namespace
 aWhite, rMaskColor
 };
 
-Bitmap aMask( rBitmap.CreateMask( aWhite ));
+AlphaMask aMask( rBitmap.CreateAlphaMask( aWhite ));
 Bitmap aSolid( rBitmap.GetSizePixel(),
vcl::PixelFormat::N8_BPP,
&aBiLevelPalette );
diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx 
b/drawinglayer/source/tools/wmfemfhelper.cxx
index aa48149219f3..31bad2a0abd4 100644
--- a/drawinglayer/source/tools/wmfemfhelper.cxx
+++ b/drawinglayer/source/tools/wmfemfhelper.cxx
@@ -642,7 +642,7 @@ namespace wmfemfhelper
 aWhite, rMaskColor
 };
 
-Bitmap aMask(rBitmap.CreateMask(aWhite));
+AlphaMask aMask(rBitmap.CreateAlphaMask(aWhite));
 Bitmap aSolid(rBitmap.GetSizePixel(), vcl::PixelFormat::N8_BPP, 
&aBiLevelPalette);
 
 aSolid.Erase(rMaskColor);
diff --git a/filter/source/msfilter/mstoolbar.cxx 
b/filter/source/msfilter/mstoolbar.cxx
index aa781c4717c8..fa78dce52443 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -303,7 +303,7 @@ void TBCData::ImportToolBarControl( 
CustomToolBarImportHelper& helper, std::vect
 // according to the spec:
 // "the iconMask is white in all the areas in 
which the icon is
 // displayed as transparent and is black in all 
other areas."
-aBitEx = BitmapEx(aBitEx.GetBitmap(), 
rMaskBase.CreateMask(COL_WHITE));
+aBitEx = BitmapEx(aBitEx.GetBitmap(), 
rMaskBase.CreateAlphaMask(COL_WHITE));
 }
 }
 
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index ba11eeacd1da..1db7e661cdd7 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -612,10 +612,10 @@ BitmapEx SvxBmpMask::ImpMaskTransparent( const BitmapEx& 
rBitmapEx, const Color&
 EnterWait();
 
 BitmapExaBmpEx;
-Bitmap  aMask( rBitmapEx.GetBitmap().CreateMask( rColor, nTol ) );
+AlphaMask   aMask( rBitmapEx.GetBitmap().CreateAlphaMask( rColor, nTol ) );
 
 if( rBitmapEx.IsAlpha() )
-aMask.CombineOr( rBitmapEx.GetAlphaMask() );
+aMask.AlphaCombineOr( rBitmapEx.GetAlphaMask() );
 
 aBmpEx = BitmapEx( rBitmapEx.GetBitmap(), aMask );
 LeaveWait();
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index ec122e3b1373..725ce095c9ed 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -631,10 +631,10 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, 
ContourWindow&, rWnd, void )
 {
 const tools::Long  nTol = 
static_cast(m_xMtfTolerance->get_value(FieldUnit::PERCENT) * 255 / 
100);
 
-Bitmap aMask = aGraphic.GetBitmapEx().GetBitmap().CreateMask( 
rColor, nTol );
+AlphaMask aMask = 
aGraphic.GetBitmapEx().GetBitmap().CreateAlphaMask( rColor, nTol );
 
 if( aGraphic.IsTransparent() )
-aMask.CombineOr( aGraphic.GetBitmapEx().GetAlphaMask() );
+aMask.AlphaCombineOr( aGraphic.GetBitmapEx().GetAlphaMask() );
 
 if( !aMask.IsEmpty() )
 {
diff --git a/vcl/source/graphic/GraphicObject2.cxx 
b/vcl/source/graphic/GraphicObject2.cxx
index a654baeba6bf..02a9374759bf 100644
--- a/vcl/source/graphic/GraphicObject2.cxx
+++ b/vcl/source/graphic/GraphicObject2.cxx
@@ -321,7 +321,7 @@ bool GraphicObject::ImplDrawTiled(OutputDevice& rOut, const 
tools::Rectangle& rA
 AlphaMask( aVDev->GetBitmap( 
Point(0,0), aVDev->GetOutputSize() ) ) );
 else
 aTileBi

Some TBs need Java upgrade following Java 17 bump

2023-10-18 Thread Julien Nabet

Hello Guilhem, Christian

https://ci.libreoffice.org/view/tb%20platform%20status/ shows several 
TBs in red.


Would it be possible to have them upgraded?

Remarks:

1) I thought about Redmine but had no feedback about 
https://redmine.documentfoundation.org/issues/3684 (WASM need at least 
GCC 12.0).


2) it seems there's also Windows Jenkins pb, I had on different patches 
this:


ERROR: Error fetching remote repo 'origin'

eg:

https://ci.libreoffice.org/job/gerrit_master_ml/4247/

Julien




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

2023-10-18 Thread Michael Weghorn (via logerrit)
 include/vcl/accessibility/AccessibleTextAttributeHelper.hxx |   14 ++
 vcl/qt5/QtAccessibleWidget.cxx  |   11 --
 vcl/source/accessibility/AccessibleTextAttributeHelper.cxx  |   61 
 3 files changed, 77 insertions(+), 9 deletions(-)

New commits:
commit ec2e02cfa41510c3d30b118cbf7595c84a046d03
Author: Michael Weghorn 
AuthorDate: Tue Oct 17 14:36:58 2023 +0200
Commit: Michael Weghorn 
CommitDate: Wed Oct 18 12:48:57 2023 +0200

tdf#157696 a11y: Report spelling error via IA2 "invalid:spelling" attr

Let `AccessibleTextAttributeHelper::GetIAccessible2TextAttributes`
also report spelling errors as a text attribute, since the
"invalid:" text attribute with a value of "spelling" is specified
for that in the IAccessible2 tex attributes specification [1].

In order to adapt the start/end index for the attribute run,
iterate over all of the text markups that can be retrieved from
the `XAccessibleTextMarkup` interface instead of just deterining
whether the offset itself lies within a range of misspelled text
via `XAccessibleTextMarkup::getTextMarkupAtIndex`.
(This is strongly inspired by how the gtk3 a11y implementation
does it, s. `handle_text_markup_as_run_attribute` in
vcl/unx/gtk3/a11y/atktext.cxx.)

When using the qt6 VCL plugin on Linux, the attribute shows up as
expected in Accerciser and the Orca screen reader announces
"misspelled" when moving the cursor in front of a misspelled
word using the Arrow_Right key.

Announcement by NVDA works once winaccessibility and NVDA
have been switched over to use IAccessible2 text attributes
instead of custom LibreOffice ones.

[1] 
https://wiki.linuxfoundation.org/accessibility/iaccessible2/textattributes

Change-Id: I54e5bcbb4bef4c73068243f91a3ee69c10326460
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158089
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/vcl/source/accessibility/AccessibleTextAttributeHelper.cxx 
b/vcl/source/accessibility/AccessibleTextAttributeHelper.cxx
index 5862b96a86c6..f69b7483d9e5 100644
--- a/vcl/source/accessibility/AccessibleTextAttributeHelper.cxx
+++ b/vcl/source/accessibility/AccessibleTextAttributeHelper.cxx
@@ -20,10 +20,12 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -303,13 +305,53 @@ OUString 
AccessibleTextAttributeHelper::GetIAccessible2TextAttributes(
 
 const css::uno::Sequence attribs
 = xText->getCharacterAttributes(nOffset, 
css::uno::Sequence());
-const OUString sAttributes = 
ConvertUnoToIAccessible2TextAttributes(attribs);
+OUString sAttributes = ConvertUnoToIAccessible2TextAttributes(attribs);
 
 css::accessibility::TextSegment aAttributeRun
 = xText->getTextAtIndex(nOffset, 
css::accessibility::AccessibleTextType::ATTRIBUTE_RUN);
 rStartOffset = aAttributeRun.SegmentStart;
 rEndOffset = aAttributeRun.SegmentEnd;
 
+// report spelling error as "invalid:spelling;" IA2 text attribute and
+// adapt start/end index as necessary
+css::uno::Reference 
xTextMarkup(xText,
+   
css::uno::UNO_QUERY);
+if (xTextMarkup.is())
+{
+bool bInvalidSpelling = false;
+const sal_Int32 nMarkupCount(
+
xTextMarkup->getTextMarkupCount(css::text::TextMarkupType::SPELLCHECK));
+for (sal_Int32 nMarkupIndex = 0; nMarkupIndex < nMarkupCount; 
++nMarkupIndex)
+{
+const css::accessibility::TextSegment aTextSegment
+= xTextMarkup->getTextMarkup(nMarkupIndex, 
css::text::TextMarkupType::SPELLCHECK);
+const sal_Int32 nStartOffsetTextMarkup = aTextSegment.SegmentStart;
+const sal_Int32 nEndOffsetTextMarkup = aTextSegment.SegmentEnd;
+if (nStartOffsetTextMarkup <= nOffset)
+{
+if (nOffset < nEndOffsetTextMarkup)
+{
+// offset is inside invalid spelling
+rStartOffset = ::std::max(rStartOffset, 
nStartOffsetTextMarkup);
+rEndOffset = ::std::min(rEndOffset, nEndOffsetTextMarkup);
+bInvalidSpelling = true;
+break;
+}
+else
+{
+rStartOffset = ::std::max(rStartOffset, 
nEndOffsetTextMarkup);
+}
+}
+else
+{
+rEndOffset = ::std::min(rEndOffset, nStartOffsetTextMarkup);
+}
+}
+
+if (bInvalidSpelling)
+sAttributes += u"invalid:spelling;"_ustr;
+}
+
 return sAttributes;
 }
 
commit 15a6e23c4fc160c50a316da3d18980a02fc10ce8
Author: Michael Weghorn 
AuthorDate: Tue Oct 17 14:16:54 2023 +0200
Commit: Michael Weghorn 
CommitDate: Wed Oct 

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

2023-10-18 Thread Noel Grandin (via logerrit)
 include/svx/svdpage.hxx   |7 ++-
 svx/source/svdraw/svdogrp.cxx |8 
 2 files changed, 10 insertions(+), 5 deletions(-)

New commits:
commit 0280a9ef0d93bb2c8ec713b6dc36b77962b57e99
Author: Noel Grandin 
AuthorDate: Wed Oct 18 09:45:56 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Oct 18 12:11:14 2023 +0200

tdf#155410 shave 1% cost off SdrGroup::GetLayer

by avoiding repeated indexed lookup into the std::deque inside
SdrObjList

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

diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index 97142d661296..7ab37532c046 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -225,10 +225,15 @@ public:
 
 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
 
+typedef std::deque> SdrObjectDeque;
+
+SdrObjectDeque::const_iterator begin() const { return maList.begin(); }
+SdrObjectDeque::const_iterator end() const { return maList.end(); }
+
 private:
 tools::RectanglemaSdrObjListOutRect;
 tools::RectanglemaSdrObjListSnapRect;
-std::deque> maList;
+SdrObjectDeque maList;
 /// This list, if it exists, defines the navigation order. If it does
 /// not exist then maList defines the navigation order.
 std::optional>> 
mxNavigationOrder;
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index 6c63e258a963..8a518554827a 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -174,11 +174,11 @@ SdrObjKind SdrObjGroup::GetObjIdentifier() const
 
 SdrLayerID SdrObjGroup::GetLayer() const
 {
-bool b1st = true;
 SdrLayerID nLay = SdrObject::GetLayer();
-const size_t nObjCount(GetObjCount());
-for (size_t i=0; iGetLayer());
+bool b1st = true;
+for (const rtl::Reference& pObject : *this)
+{
+SdrLayerID nLay1(pObject->GetLayer());
 if (b1st) { nLay=nLay1; b1st = false; }
 else if (nLay1!=nLay) return SdrLayerID(0);
 }


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

2023-10-18 Thread Julien Nabet (via logerrit)
 dbaccess/source/core/dataaccess/SharedConnection.hxx |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 4f48baedb56589d46ec978ce897d8104b8c216d8
Author: Julien Nabet 
AuthorDate: Wed Oct 18 09:54:00 2023 +0200
Commit: Julien Nabet 
CommitDate: Wed Oct 18 11:54:22 2023 +0200

Replace useless typedef OSharedConnection_BASE2 and replace it by its value

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

diff --git a/dbaccess/source/core/dataaccess/SharedConnection.hxx 
b/dbaccess/source/core/dataaccess/SharedConnection.hxx
index ea6e961cf19d..2c88e58fd55d 100644
--- a/dbaccess/source/core/dataaccess/SharedConnection.hxx
+++ b/dbaccess/source/core/dataaccess/SharedConnection.hxx
@@ -34,11 +34,10 @@ namespace dbaccess
 // datasource is asked for not isolated connection.
 typedef ::cppu::WeakComponentImplHelper< css::sdbc::XConnection
> OSharedConnection_BASE;
-typedef ::connectivity::OConnectionWrapper  OSharedConnection_BASE2;
 
 class OSharedConnection :   public ::cppu::BaseMutex
   , public OSharedConnection_BASE
-  , public OSharedConnection_BASE2
+  , public ::connectivity::OConnectionWrapper
 {
 protected:
 virtual void SAL_CALL disposing() override;
@@ -54,7 +53,7 @@ namespace dbaccess
 {
 return ::comphelper::concatSequences(
 OSharedConnection_BASE::getTypes(),
-OSharedConnection_BASE2::getTypes()
+::connectivity::OConnectionWrapper::getTypes()
 );
 }
 
@@ -62,7 +61,7 @@ namespace dbaccess
 {
 css::uno::Any aReturn = 
OSharedConnection_BASE::queryInterface(_rType);
 if ( !aReturn.hasValue() )
-aReturn = OSharedConnection_BASE2::queryInterface(_rType);
+aReturn = 
::connectivity::OConnectionWrapper::queryInterface(_rType);
 return aReturn;
 }
 


[Libreoffice-commits] core.git: dbaccess/source extensions/source filter/source framework/source i18npool/source include/rtl include/xmloff linguistic/source reportdesign/source sc/source sd/source sf

2023-10-18 Thread Stephan Bergmann (via logerrit)
 dbaccess/source/ui/app/AppIconControl.cxx |2 
 dbaccess/source/ui/browser/dbloader.cxx   |2 
 extensions/source/propctrlr/defaultforminspection.cxx |6 -
 filter/source/config/cache/filtercache.cxx|2 
 framework/source/fwe/xml/toolboxdocumenthandler.cxx   |4 
 framework/source/uiconfiguration/windowstateconfiguration.cxx |4 
 framework/source/uielement/controlmenucontroller.cxx  |4 
 i18npool/source/localedata/LocaleNode.cxx |   44 +-
 include/rtl/ustring.hxx   |   38 
 include/xmloff/maptype.hxx|2 
 linguistic/source/lngsvcmgr.cxx   |4 
 reportdesign/source/ui/inspection/DataProviderHandler.cxx |2 
 sc/source/core/data/colorscale.cxx|   44 +-
 sc/source/ui/navipi/content.cxx   |6 -
 sc/source/ui/unoobj/targuno.cxx   |4 
 sc/source/ui/view/olinewin.cxx|4 
 sd/source/ui/controller/slidelayoutcontroller.cxx |   10 +-
 sd/source/ui/presenter/PresenterHelper.cxx|4 
 sd/source/ui/view/viewoverlaymanager.cxx  |8 -
 sfx2/source/appl/shutdowniconaqua.mm  |4 
 sfx2/source/appl/shutdowniconw32.cxx  |6 -
 sfx2/source/doc/SfxDocumentMetaData.cxx   |6 -
 sfx2/source/doc/doctempl.cxx  |2 
 starmath/source/dialog.cxx|4 
 svx/source/dialog/frmsel.cxx  |4 
 svx/source/fmcomp/fmgridif.cxx|6 -
 svx/source/form/fmdmod.cxx|2 
 svx/source/form/fmshimp.cxx   |2 
 svx/source/form/fmundo.cxx|5 -
 svx/source/gallery2/gallery1.cxx  |2 
 svx/source/tbxctrls/extrusioncontrols.cxx |   16 +--
 svx/source/tbxctrls/grafctrl.cxx  |4 
 svx/source/unodraw/unoprov.cxx|   40 -
 sw/source/uibase/ribbar/workctrl.cxx  |4 
 tools/source/fsys/urlobj.cxx  |   12 +-
 vcl/unx/generic/window/salframe.cxx   |6 -
 xmloff/source/forms/elementexport.cxx |   18 ++--
 37 files changed, 150 insertions(+), 187 deletions(-)

New commits:
commit b946842a744c2b869e5c01adf90335edf07f09ad
Author: Stephan Bergmann 
AuthorDate: Wed Oct 18 07:37:17 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Oct 18 11:26:44 2023 +0200

Clean up the remaining uses of OUStringConstExpr, and drop it

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

diff --git a/dbaccess/source/ui/app/AppIconControl.cxx 
b/dbaccess/source/ui/app/AppIconControl.cxx
index 58d4db27da8c..bd94d52c564b 100644
--- a/dbaccess/source/ui/app/AppIconControl.cxx
+++ b/dbaccess/source/ui/app/AppIconControl.cxx
@@ -73,7 +73,7 @@ void OApplicationIconControl::Fill()
 {
 TranslateId pLabelResId;
 ElementType eType;
-rtl::OUStringConstExpr aImageResId;
+OUString aImageResId;
 } aCategories[] = { { RID_STR_TABLES_CONTAINER, E_TABLE, 
BMP_TABLEFOLDER_TREE_L },
 { RID_STR_QUERIES_CONTAINER, E_QUERY, 
BMP_QUERYFOLDER_TREE_L },
 { RID_STR_FORMS_CONTAINER, E_FORM, 
BMP_FORMFOLDER_TREE_L },
diff --git a/dbaccess/source/ui/browser/dbloader.cxx 
b/dbaccess/source/ui/browser/dbloader.cxx
index f2dfd2a497f9..0eeba92634a5 100644
--- a/dbaccess/source/ui/browser/dbloader.cxx
+++ b/dbaccess/source/ui/browser/dbloader.cxx
@@ -116,7 +116,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame 
> & rFrame, const OU
 
 static constexpr struct ServiceNameToImplName
 {
-rtl::OUStringConstExpr sServiceName;
+OUString sServiceName;
 const char* pAsciiImplementationName;
 } aImplementations[] = {
 { URL_COMPONENT_FORMGRIDVIEW,  
"org.openoffice.comp.dbu.OFormGridView"},
diff --git a/extensions/source/propctrlr/defaultforminspection.cxx 
b/extensions/source/propctrlr/defaultforminspection.cxx
index 16371b302868..3fa7fa5658a5 100644
--- a/extensions/source/propctrlr/defaultforminspection.cxx
+++ b/extensions/source/propctrlr/defaultforminspection.cxx
@@ -130,8 +130,8 @@ namespace pcr
 {
 const char* programmaticName;
 TranslateId uiNameResId;
-rtl::OUStringConstExpr he

[Libreoffice-commits] core.git: config_host/config_vclplug.h.in configure.ac vcl/inc vcl/qt5

2023-10-18 Thread Michael Weghorn (via logerrit)
 config_host/config_vclplug.h.in |1 
 configure.ac|7 ---
 vcl/inc/qt5/QtFrame.hxx |2 -
 vcl/inc/qt5/QtX11Support.hxx|8 
 vcl/qt5/QtFrame.cxx |   23 ---
 vcl/qt5/QtX11Support.cxx|   79 
 6 files changed, 120 deletions(-)

New commits:
commit 35ea75e9c2be75a70298a3f4e7d703c1d0f9497e
Author: Michael Weghorn 
AuthorDate: Wed Oct 18 08:23:35 2023 +0200
Commit: Michael Weghorn 
CommitDate: Wed Oct 18 11:00:12 2023 +0200

qt: Drop now obsolete workaround for Qt < 5.12

This workaround was only applied for Qt < 5.12 and
is no longer needed now that support for Qt < 5.15 has
been dropped in

commit afb4c96d271958ced3175dfc2cf8bb9e8b0a9d3b
Author: Michael Weghorn 
Date:   Thu Aug 3 21:30:22 2023 +0200

qt: Drop code for Qt < 5.15

Commit originally adding the workaround:

commit fe2baf9e84e0ca9aeaa683e37076f57fa3f38dca
Author: Jan-Marek Glogowski 
Date:   Tue Dec 3 08:32:58 2019 +0100

Qt5 fix missing XCB_ICCCM_WM_HINT_WINDOW_GROUP

This is the application level equivalent of the Qt5 fix for bug
QTBUG-46626 / commit 0de4b32 ("xcb: fix issue with dialogs hidden
by other windows"), which was broken since Qt 5.4 and is just
fixed since Qt 5.12.

It is needed for some window managers, which don't know about the
WM_CLIENT_LEADER property. Both settings are the same, but just
the latter is set by older Qt5 releases. This probably isn't a
real problem, as GNOME or XFCE would use the gtk VCL plugin, but
since I already wrote the code when debugging tdf#129071, there
is also no reason to drop it (except: more code, more bugs...).

This fix is optional and needs development headers for xcb-icccm,
which can actually be compiled into Qt5. If missing configure will
just print a warning, since it's a runtime requirement and we
explicitly drop the linked Qt version symbol, so the potential
build Qt version won't matter.

Change-Id: Ifc5a8f8a40ee13779a911efb53e8b8b868614d0b
Reviewed-on: https://gerrit.libreoffice.org/84299
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
Reviewed-by: Jan-Marek Glogowski 

Change-Id: I56b708449cf686f787f55256c76673be604d31e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158102
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/config_host/config_vclplug.h.in b/config_host/config_vclplug.h.in
index 63dacb1bc10e..2334288cd49d 100644
--- a/config_host/config_vclplug.h.in
+++ b/config_host/config_vclplug.h.in
@@ -31,7 +31,6 @@ Settings about which desktops have support enabled.
 #define ENABLE_GSTREAMER_1_0 0
 #define QT5_HAVE_GOBJECT 0
 #define QT5_USING_X11 0
-#define QT5_HAVE_XCB_ICCCM 0
 #define QT6_USING_X11 0
 
 #endif
diff --git a/configure.ac b/configure.ac
index 39857bb25f6f..999ab64289e8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13119,13 +13119,6 @@ then
 
 if test "$USING_X11" = TRUE; then
 PKG_CHECK_MODULES(QT5_XCB,[xcb],,[AC_MSG_ERROR([XCB not found, which 
is needed for correct app grouping in X11.])])
-PKG_CHECK_MODULES(QT5_XCB_ICCCM,[xcb-icccm],[
-QT5_HAVE_XCB_ICCCM=1
-AC_DEFINE(QT5_HAVE_XCB_ICCCM)
-],[
-AC_MSG_WARN([XCB ICCCM not found, which is needed for old Qt 
versions (< 5.12) on some WMs to correctly group dialogs (like QTBUG-46626)])
-add_warning "XCB ICCCM not found, which is needed for Qt versions 
(< 5.12) on some WMs to correctly group dialogs (like QTBUG-46626)"
-])
 QT5_CFLAGS="$QT5_CFLAGS $QT5_XCB_CFLAGS $QT5_XCB_ICCCM_CFLAGS"
 QT5_LIBS="$QT5_LIBS $QT5_XCB_LIBS $QT5_XCB_ICCCM_LIBS -lQt5X11Extras"
 QT5_USING_X11=1
diff --git a/vcl/inc/qt5/QtFrame.hxx b/vcl/inc/qt5/QtFrame.hxx
index b5ae7508a506..b80818687c0e 100644
--- a/vcl/inc/qt5/QtFrame.hxx
+++ b/vcl/inc/qt5/QtFrame.hxx
@@ -132,8 +132,6 @@ class VCLPLUG_QT_PUBLIC QtFrame : public QObject, public 
SalFrame
 bool isMaximized() const;
 void SetWindowStateImpl(Qt::WindowStates eState);
 
-void fixICCCMwindowGroup();
-
 private Q_SLOTS:
 void screenChanged(QScreen*);
 
diff --git a/vcl/inc/qt5/QtX11Support.hxx b/vcl/inc/qt5/QtX11Support.hxx
index 2931e82e4d1a..17696a89529d 100644
--- a/vcl/inc/qt5/QtX11Support.hxx
+++ b/vcl/inc/qt5/QtX11Support.hxx
@@ -15,15 +15,7 @@
 
 class QtX11Support final
 {
-static constexpr const char* m_sWindowGroupName = "WM_CLIENT_LEADER\0";
-static xcb_atom_t m_nWindowGroupAtom;
-static bool m_bDidAtomLookups;
-
-static xcb_atom_t lookupAtom(xcb_connection_t*, const char* const 
sAtomName);
-static void fetchAtoms();
-

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

2023-10-18 Thread Jim Raykowski (via logerrit)
 sw/source/uibase/utlui/content.cxx |   43 -
 1 file changed, 15 insertions(+), 28 deletions(-)

New commits:
commit 5728686b2f133e7a0e23544ecaebc34bfdde434b
Author: Jim Raykowski 
AuthorDate: Sun Oct 8 23:13:51 2023 -0800
Commit: Michael Stahl 
CommitDate: Wed Oct 18 10:57:35 2023 +0200

SwNavigator: Fix Indexes tracking

Restores Indexes tracking when the document cursor is in TOX
content which was lost in commit
ca34204a39716ec9aa621e60ea50fb3c058c55f6.

Change-Id: Ib0fed4b7a20b5d08b5c52eef28d13cf0044d87d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157693
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 
(cherry picked from commit 79df80b642179fdd621538e8a7894a2f055ba16a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158031
Reviewed-by: Michael Stahl 

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 5114761fe939..cd6528752fef 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -3932,36 +3932,23 @@ void SwContentTree::UpdateTracking()
 return;
 }
 // hyperlinks
-if (SwContentAtPos aContentAtPos(IsAttrAtPos::InetAttr);
-
m_pActiveShell->GetContentAtPos(m_pActiveShell->GetCursorDocPos(), 
aContentAtPos) &&
-!(m_bIsRoot && m_nRootType != ContentTypeId::URLFIELD))
+// not in ToxContent tdf#148312
+if (const SwSection* pSection = m_pActiveShell->GetCurrSection(); 
!pSection
+|| (pSection && pSection->GetType() != SectionType::ToxContent))
 {
-// There is no need to search for hyperlinks in ToxContent 
tdf#148312
-if (const SwTextINetFormat* pTextINetFormat =
-static_txtattr_cast(aContentAtPos.pFndTextAttr))
-{
-if (const SwTextNode* pTextNode = 
pTextINetFormat->GetpTextNode())
-{
-if (const SwSectionNode* pSectNd = 
pTextNode->FindSectionNode())
-{
-SectionType eType = pSectNd->GetSection().GetType();
-if (SectionType::ToxContent == eType)
-{
-m_xTreeView->set_cursor(-1);
-Select();
-return;
-}
-}
-}
+if (SwContentAtPos aContentAtPos(IsAttrAtPos::InetAttr);
+
m_pActiveShell->GetContentAtPos(m_pActiveShell->GetCursorDocPos(), 
aContentAtPos)
+&& (!m_bIsRoot || m_nRootType == ContentTypeId::URLFIELD))
+{
+// Because hyperlink item names do not need to be unique, 
finding the corresponding
+// item in the tree by name may result in incorrect selection. 
Find the item in the
+// tree by comparing the SwTextINetFormat pointer at the 
document cursor position to
+// that stored in the item SwURLFieldContent.
+if (mTrackContentType[ContentTypeId::URLFIELD])
+lcl_SelectByContentTypeAndAddress(this, *m_xTreeView, 
ContentTypeId::URLFIELD,
+  
aContentAtPos.pFndTextAttr);
+return;
 }
-// Because hyperlink item names do not need to be unique, finding 
the corresponding item
-// in the tree by name may result in incorrect selection. Find the 
item in the tree by
-// comparing the SwTextINetFormat pointer at the document cursor 
position to that stored
-// in the item SwURLFieldContent.
-if (mTrackContentType[ContentTypeId::URLFIELD])
-lcl_SelectByContentTypeAndAddress(this, *m_xTreeView, 
ContentTypeId::URLFIELD,
-  aContentAtPos.pFndTextAttr);
-return;
 }
 // fields, comments
 if (SwField* pField = m_pActiveShell->GetCurField(); pField &&


[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - download.lst external/libffi external/python3

2023-10-18 Thread Taichi Haradaguchi (via logerrit)
 download.lst|4 ++--
 external/libffi/ExternalPackage_libffi.mk   |2 +-
 external/python3/UnpackedTarball_python3.mk |2 ++
 external/python3/python-3.8-msvc-libffi.patch.1 |   16 
 4 files changed, 21 insertions(+), 3 deletions(-)

New commits:
commit f298e4b24660e34e651a9b0ec349b542b661efa6
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Sat Oct 14 11:30:48 2023 +0900
Commit: Michael Stahl 
CommitDate: Wed Oct 18 10:55:27 2023 +0200

Upgrade libffi to 3.4.4

Change-Id: I417abc5d76db235c23195abff22d3d27f9c0fa77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157972
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp>
(cherry picked from commit 7359700d5dc847accd360e70f7dcc45d119577be)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158030
Reviewed-by: Michael Stahl 

diff --git a/download.lst b/download.lst
index 09c449b11a92..6c0684d07362 100644
--- a/download.lst
+++ b/download.lst
@@ -309,8 +309,8 @@ LIBEXTTEXTCAT_TARBALL := libexttextcat-3.4.6.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-LIBFFI_SHA256SUM := 
72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056
-LIBFFI_TARBALL := libffi-3.3.tar.gz
+LIBFFI_SHA256SUM := 
d66c56ad259a82cf2a9dfc408b32bf5da52371500b84745f7fb8b645712df676
+LIBFFI_TARBALL := libffi-3.4.4.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/libffi/ExternalPackage_libffi.mk 
b/external/libffi/ExternalPackage_libffi.mk
index 61b0a1ca460c..c524ef90289f 100644
--- a/external/libffi/ExternalPackage_libffi.mk
+++ b/external/libffi/ExternalPackage_libffi.mk
@@ -13,7 +13,7 @@ $(eval $(call 
gb_ExternalPackage_use_external_project,libffi,libffi))
 
 ifeq ($(COM),MSC)
 $(eval $(call 
gb_ExternalPackage_add_files,libffi,$(LIBO_LIB_FOLDER)/python-core-$(PYTHON_VERSION)/lib,
 \
-$(HOST_PLATFORM)/.libs/libffi-7.dll \
+$(HOST_PLATFORM)/.libs/libffi-8.dll \
 ))
 endif
 
diff --git a/external/python3/UnpackedTarball_python3.mk 
b/external/python3/UnpackedTarball_python3.mk
index 127dea4a8ee4..93cb9015c9a6 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,python3))
 $(eval $(call 
gb_UnpackedTarball_set_tarball,python3,$(PYTHON_TARBALL),,python3))
 
 $(eval $(call gb_UnpackedTarball_fix_end_of_line,python3,\
+   PCbuild/libffi.props \
PCbuild/pcbuild.sln \
 ))
 
@@ -19,6 +20,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/i100492-freebsd.patch.1 \
external/python3/python-3.3.0-darwin.patch.1 \
external/python3/python-3.8-msvc-sdk.patch.1 \
+   external/python3/python-3.8-msvc-libffi.patch.1 \
external/python3/python-3.7.6-msvc-ssl.patch.1 \
external/python3/python-3.5.4-msvc-disable.patch.1 \
external/python3/ubsan.patch.0 \
diff --git a/external/python3/python-3.8-msvc-libffi.patch.1 
b/external/python3/python-3.8-msvc-libffi.patch.1
new file mode 100644
index ..674043a7dca6
--- /dev/null
+++ b/external/python3/python-3.8-msvc-libffi.patch.1
@@ -0,0 +1,16 @@
+--- python3/PCbuild/libffi.props.orig  2023-08-25 04:36:32.0 +0900
 python3/PCbuild/libffi.props   2023-10-14 15:13:24.850511531 +0900
+@@ -6,11 +6,11 @@
+ 
+ 
+   
$(libffiOutDir);%(AdditionalLibraryDirectories)
+-  
libffi-7.lib;%(AdditionalDependencies)
++  
libffi-8.lib;%(AdditionalDependencies)
+ 
+   
+   
+-<_LIBFFIDLL Include="$(libffiOutDir)\libffi-7.dll" />
++<_LIBFFIDLL Include="$(libffiOutDir)\libffi-8.dll" />
+   
+   
+ 


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

2023-10-18 Thread Julien Nabet (via logerrit)
 dbaccess/source/core/dataaccess/SharedConnection.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 502fbd79f9d71d01a177c3cd77256ed6a5a544d8
Author: Julien Nabet 
AuthorDate: Tue Oct 17 22:17:00 2023 +0200
Commit: Julien Nabet 
CommitDate: Wed Oct 18 09:49:54 2023 +0200

Related tdf#144256: fix order of disposing in OSharedConnection

In dbaccess/source/core/dataaccess/SharedConnection.hxx, we got:
35  typedef ::cppu::WeakComponentImplHelper< css::sdbc::XConnection
36 > OSharedConnection_BASE;
37  typedef ::connectivity::OConnectionWrapper  OSharedConnection_BASE2;
38
39  class OSharedConnection :   public ::cppu::BaseMutex
40, public OSharedConnection_BASE
41, public OSharedConnection_BASE2

so first OSharedConnection_BASE ctr is called before OConnectionWrapper ctr
therefore OConnectionWrapper dtr should be called before 
OSharedConnection_BASE dtr

It doesn't fix the bug but investigating in all this mess, I'd like to fix 
these things since it may help.

Change-Id: I47255357b4ca02261f31ebf500f3f1ff55642e69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158096
Reviewed-by: Mike Kaganski 
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/dbaccess/source/core/dataaccess/SharedConnection.cxx 
b/dbaccess/source/core/dataaccess/SharedConnection.cxx
index 31a8e68ba7b1..d893a8e298b3 100644
--- a/dbaccess/source/core/dataaccess/SharedConnection.cxx
+++ b/dbaccess/source/core/dataaccess/SharedConnection.cxx
@@ -38,8 +38,8 @@ OSharedConnection::~OSharedConnection() {}
 
 void SAL_CALL OSharedConnection::disposing()
 {
-OSharedConnection_BASE::disposing();
 OConnectionWrapper::disposing();
+OSharedConnection_BASE::disposing();
 }
 
 Reference SAL_CALL OSharedConnection::createStatement()


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

2023-10-18 Thread Caolán McNamara (via logerrit)
 vcl/jsdialog/executor.cxx |   48 --
 1 file changed, 34 insertions(+), 14 deletions(-)

New commits:
commit 58c02b478df89dfd46f1b2a5a7c509f3a9ea4635
Author: Caolán McNamara 
AuthorDate: Mon Oct 16 10:47:05 2023 +0100
Commit: Caolán McNamara 
CommitDate: Wed Oct 18 09:29:48 2023 +0200

check return of get_iter_abs_pos

Change-Id: Ifdabd65dc9fa5bc6d0c5c6eee1318f99bf918cd2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158034
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Attila Szűcs 

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index ed424912f377..6ab4f9d35d2c 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -471,9 +471,14 @@ bool ExecuteAction(const std::string& nWindowId, const 
OString& rWidget, StringM
 pTreeView->unselect_all();
 
 std::unique_ptr 
itEntry(pTreeView->make_iterator());
-pTreeView->get_iter_abs_pos(*itEntry, nAbsPos);
-pTreeView->select(*itEntry);
-pTreeView->set_cursor_without_notify(*itEntry);
+if (pTreeView->get_iter_abs_pos(*itEntry, nAbsPos))
+{
+pTreeView->select(*itEntry);
+pTreeView->set_cursor_without_notify(*itEntry);
+}
+else
+SAL_WARN("vcl",
+ "No absolute position found for " << nAbsPos 
<< " in treeview");
 pTreeView->grab_focus();
 LOKTrigger::trigger_changed(*pTreeView);
 return true;
@@ -484,9 +489,14 @@ bool ExecuteAction(const std::string& nWindowId, const 
OString& rWidget, StringM
 
 pTreeView->unselect_all();
 std::unique_ptr 
itEntry(pTreeView->make_iterator());
-pTreeView->get_iter_abs_pos(*itEntry, nRow);
-pTreeView->select(nRow);
-pTreeView->set_cursor_without_notify(*itEntry);
+if (pTreeView->get_iter_abs_pos(*itEntry, nRow))
+{
+pTreeView->select(nRow);
+pTreeView->set_cursor_without_notify(*itEntry);
+}
+else
+SAL_WARN("vcl",
+ "No absolute position found for " << nRow << 
" in treeview");
 pTreeView->grab_focus();
 LOKTrigger::trigger_changed(*pTreeView);
 LOKTrigger::trigger_row_activated(*pTreeView);
@@ -496,20 +506,30 @@ bool ExecuteAction(const std::string& nWindowId, const 
OString& rWidget, StringM
 {
 sal_Int32 nAbsPos = o3tl::toInt32(rData["data"]);
 std::unique_ptr 
itEntry(pTreeView->make_iterator());
-pTreeView->get_iter_abs_pos(*itEntry, nAbsPos);
-pTreeView->set_cursor_without_notify(*itEntry);
-pTreeView->grab_focus();
-pTreeView->expand_row(*itEntry);
+if (pTreeView->get_iter_abs_pos(*itEntry, nAbsPos))
+{
+pTreeView->set_cursor_without_notify(*itEntry);
+pTreeView->grab_focus();
+pTreeView->expand_row(*itEntry);
+}
+else
+SAL_WARN("vcl",
+ "No absolute position found for " << nAbsPos 
<< " in treeview");
 return true;
 }
 else if (sAction == "collapse")
 {
 sal_Int32 nAbsPos = o3tl::toInt32(rData["data"]);
 std::unique_ptr 
itEntry(pTreeView->make_iterator());
-pTreeView->get_iter_abs_pos(*itEntry, nAbsPos);
-pTreeView->set_cursor_without_notify(*itEntry);
-pTreeView->grab_focus();
-pTreeView->collapse_row(*itEntry);
+if (pTreeView->get_iter_abs_pos(*itEntry, nAbsPos))
+{
+pTreeView->set_cursor_without_notify(*itEntry);
+pTreeView->grab_focus();
+pTreeView->collapse_row(*itEntry);
+}
+else
+SAL_WARN("vcl",
+ "No absolute position found for " << nAbsPos 
<< " in treeview");
 return true;
 }
 else if (sAction == "dragstart")