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

2023-07-17 Thread Andreas Heinisch (via logerrit)
 sd/inc/strings.hrc  |2 
 sd/qa/unit/uiimpress.cxx|   58 ++
 sd/source/ui/inc/unmodpg.hxx|   28 
 sd/source/ui/slidesorter/controller/SlsPageSelector.cxx |   18 +++
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx  |9 +
 sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx |   14 ++
 sd/source/ui/view/unmodpg.cxx   |   69 
 7 files changed, 198 insertions(+)

New commits:
commit 2b3a950e937efe77ad39b034819c9f7a707fe29e
Author: Andreas Heinisch 
AuthorDate: Wed Jun 21 10:07:02 2023 +0200
Commit: Andreas Heinisch 
CommitDate: Mon Jul 17 09:11:29 2023 +0200

tdf#130581 - Add undo command for hide/show slides

Change-Id: I7305e222df65fda6523940ca63f5759857c94bea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153375
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 0d9303e18bea..afcf1d4e3be3 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -130,6 +130,8 @@
 #define STR_UNDO_INSERT_FILE
NC_("STR_UNDO_INSERT_FILE", "Insert file")
 #define STR_UNDO_INSERT_SPECCHAR
NC_("STR_UNDO_INSERT_SPECCHAR", "Insert special character")
 #define STR_UNDO_SET_PRESLAYOUT 
NC_("STR_UNDO_SET_PRESLAYOUT", "Apply presentation layout")
+#define STR_UNDO_HIDE_SLIDE 
NC_("STR_UNDO_HIDE_SLIDE", "Hide slide")
+#define STR_UNDO_SHOW_SLIDE 
NC_("STR_UNDO_SHOW_SLIDE", "Show slide")
 #define STR_PLAYNC_("STR_PLAY", 
"~Play")
 #define STR_STOPNC_("STR_STOP", 
"Sto~p")
 #define STR_UNDO_ORIGINALSIZE   
NC_("STR_UNDO_ORIGINALSIZE", "Original Size")
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index c4cdc0a5e338..3a1c2ad911aa 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -56,6 +56,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -491,6 +493,62 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf100950)
 CPPUNIT_ASSERT(rPageSelector.IsPageSelected(2));
 }
 
+CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf130581)
+{
+createSdImpressDoc();
+
+// Hide slide and check the number of available undo actions
+dispatchCommand(mxComponent, ".uno:ShowSlide", {});
+dispatchCommand(mxComponent, ".uno:HideSlide", {});
+
+// There should be a single undo action, i.e., hide slide
+auto pXImpressDocument = 
dynamic_cast(mxComponent.get());
+SdDrawDocument* pDocument = pXImpressDocument->GetDoc();
+sd::UndoManager* pUndoManager = pDocument->GetUndoManager();
+// Without the fix in place, this test would have failed with
+// - Expected: 1
+// - Actual  : 0
+CPPUNIT_ASSERT_EQUAL(static_cast(1), 
pUndoManager->GetUndoActionCount());
+CPPUNIT_ASSERT_EQUAL(SdResId(STR_UNDO_HIDE_SLIDE), 
pUndoManager->GetUndoActionComment());
+sd::slidesorter::SlideSorterViewShell* pSSVS = getSlideSorterViewShell();
+
+// Check if the page is actually hidden
+auto& rSSController = pSSVS->GetSlideSorter().GetController();
+auto& rPageSelector = rSSController.GetPageSelector();
+CPPUNIT_ASSERT_EQUAL(true, rPageSelector.IsPageExcluded(0));
+
+// Undo hide slide action and check the number of available redo actions
+dispatchCommand(mxComponent, ".uno:Undo", {});
+// Without the fix in place, this test would have failed with
+// - Expected: 1
+// - Actual  : 0
+CPPUNIT_ASSERT_EQUAL(static_cast(1), 
pUndoManager->GetRedoActionCount());
+CPPUNIT_ASSERT_EQUAL(SdResId(STR_UNDO_HIDE_SLIDE), 
pUndoManager->GetRedoActionComment());
+CPPUNIT_ASSERT_EQUAL(false, rPageSelector.IsPageExcluded(0));
+
+// Show slide and check the number of available undo actions
+dispatchCommand(mxComponent, ".uno:Redo", {});
+CPPUNIT_ASSERT_EQUAL(true, rPageSelector.IsPageExcluded(0));
+dispatchCommand(mxComponent, ".uno:ShowSlide", {});
+// Without the fix in place, this test would have failed with
+// - Expected: 2
+// - Actual  : 0
+CPPUNIT_ASSERT_EQUAL(static_cast(2), 
pUndoManager->GetUndoActionCount());
+CPPUNIT_ASSERT_EQUAL(SdResId(STR_UNDO_SHOW_SLIDE), 
pUndoManager->GetUndoActionComment());
+CPPUNIT_ASSERT_EQUAL(false, rPageSelector.IsPageExcluded(0));
+
+// Undo show slide action and check the number of available undo/redo 
actions
+dispatchCommand(mxComponent, ".uno:Undo", {});
+// Without the fix in place, this test would have failed with
+// - Expected: 1
+// - Actual  : 0
+CPPUNIT_ASSERT_EQUAL(static_cast(1), 
pUndoManager->GetUndoActionCount());
+CPPUNIT_ASSERT_EQUAL(SdResId(STR_UNDO_HIDE_SLIDE), 
pUndoManager->GetUnd

Re: Skia GPU default

2023-07-17 Thread Noel Grandin
Hi

What I want to do is change it on master, so that if we are

(1) Running on Windows 10 or better, use the Skia/DirectX backend
(2) Otherwise use the Skia/Raster backend

And see how that goes in terms of problems.

My reasoning is that the Vulkan API in Windows graphics drivers is less
likely to be well-tested (at this point in time), compared to the DirectX
API.

Regards, Noel Grandin


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

2023-07-17 Thread Sarper Akdemir (via logerrit)
 vcl/win/window/salframe.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit dc5163af166cb2afb9811dbf0443e1fcceafbb9a
Author: Sarper Akdemir 
AuthorDate: Fri Jul 14 18:04:35 2023 +0300
Commit: Sarper Akdemir 
CommitDate: Mon Jul 17 10:09:04 2023 +0200

tdf#90023: vcl: fix tooltip displaying over two monitors on Windows

To determine the WorkArea correctly in ImplSalGetWorkArea,
pass in the mouse pointer as pParentRect.

Similarly to how it has been done on:
vcl/win/window/salframe.cxx:1393

Change-Id: I43123be315c5ea146c118e8e2a582ceaaab0a35e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154442
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir 

diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 2e60f38c1f11..c911fff0840f 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -1590,7 +1590,14 @@ void WinSalFrame::SetPluginParent( SystemParentData* 
pNewParent )
 void WinSalFrame::GetWorkArea( tools::Rectangle &rRect )
 {
 RECT aRect;
-ImplSalGetWorkArea( mhWnd, &aRect, nullptr );
+
+// pass cursor's position to ImplSalGetWorkArea to determine work area on
+// multi monitor setups correctly.
+POINT aPoint;
+GetCursorPos(&aPoint);
+RECT aRect2{ aPoint.x, aPoint.y, aPoint.x + 2, aPoint.y + 2 };
+
+ImplSalGetWorkArea( mhWnd, &aRect, &aRect2 );
 rRect.SetLeft( aRect.left );
 rRect.SetRight( aRect.right-1 );
 rRect.SetTop( aRect.top );


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

2023-07-17 Thread Arnaud VERSINI (via logerrit)
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

New commits:
commit d22ab7b444a4e16dc2bd1f7d15fa36a848eaaaed
Author: Arnaud VERSINI 
AuthorDate: Mon Jul 10 21:26:15 2023 +0200
Commit: Arnaud Versini 
CommitDate: Mon Jul 17 10:58:27 2023 +0200

xmlsecurity : simplify DigitalSignaturesDialog::canAddRemove.

(!a && b) || (a && b) => b

Change-Id: Iee9ae38d9dc5f6aa94eaff61b3937633f5da7af1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154285
Tested-by: Jenkins
Reviewed-by: Arnaud Versini 

diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx 
b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 9a6222c59e1e..2e14e609773f 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -91,11 +91,6 @@ namespace
 public:
 virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames 
) override;
 SaveODFItem();
-//See group ODF in Common.xcs
-bool isLessODF1_2() const
-{
-return m_nODF < 3;
-}
 };
 
 void SaveODFItem::ImplCommit() {}
@@ -295,13 +290,12 @@ bool DigitalSignaturesDialog::canAddRemove()
 OSL_ASSERT(maSignatureManager.getStore().is());
 bool bDoc1_1 = DocumentSignatureHelper::isODFPre_1_2(m_sODFVersion);
 SaveODFItem item;
-bool bSave1_1 = item.isLessODF1_2();
 
 // see specification
 //cvs: specs/www/appwide/security/Electronic_Signatures_and_Security.sxw
 //Paragraph 'Behavior with regard to ODF 1.2'
 //For both, macro and document
-if ( (!bSave1_1  && bDoc1_1) || (bSave1_1 && bDoc1_1) )
+if ( bDoc1_1 )
 {
 //#4
 std::unique_ptr 
xBox(Application::CreateMessageDialog(m_xDialog.get(),


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

2023-07-17 Thread Miklos Vajna (via logerrit)
 include/svx/sdasitm.hxx  |   10 +-
 include/svx/svdtrans.hxx |   24 +++---
 svx/source/items/customshapeitem.cxx |  128 +--
 svx/source/svdraw/svdtrans.cxx   |   24 +++---
 4 files changed, 93 insertions(+), 93 deletions(-)

New commits:
commit 107ab712725e92fc527b54e91f317f932b78146a
Author: Miklos Vajna 
AuthorDate: Mon Jul 17 08:09:53 2023 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jul 17 11:20:22 2023 +0200

svx: prefix members of SdrCustomShapeGeometryItem and SdrFormatter

See tdf#94879 for motivation.

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

diff --git a/include/svx/sdasitm.hxx b/include/svx/sdasitm.hxx
index ee1c05ebc634..e53e9c3604a2 100644
--- a/include/svx/sdasitm.hxx
+++ b/include/svx/sdasitm.hxx
@@ -43,16 +43,16 @@ private:
 typedef std::unordered_map  
PropertyPairHashMap;
 typedef std::unordered_map PropertyHashMap;
 
-PropertyHashMap aPropHashMap;
-PropertyPairHashMap aPropPairHashMap;
+PropertyHashMap m_aPropHashMap;
+PropertyPairHashMap m_aPropPairHashMap;
 
-css::uno::Sequence< css::beans::PropertyValue > aPropSeq;
+css::uno::Sequence< css::beans::PropertyValue > m_aPropSeq;
 
 // For fast comparisons keep a hash of the content, computed on demand
 // (unusable state is if anyToHash() returns no hash).
 enum HashState { Unknown, Valid, Unusable };
-mutable HashState aHashState = HashState::Unknown;
-mutable size_t aHash = 0xdeadbeef;
+mutable HashState m_aHashState = HashState::Unknown;
+mutable size_t m_aHash = 0xdeadbeef;
 
 void SetPropSeq( const css::uno::Sequence< css::beans::PropertyValue >& 
rPropSeq );
 inline void UpdateHash() const;
diff --git a/include/svx/svdtrans.hxx b/include/svx/svdtrans.hxx
index aa8992a34bd3..ae225426afd6 100644
--- a/include/svx/svdtrans.hxx
+++ b/include/svx/svdtrans.hxx
@@ -264,22 +264,22 @@ inline bool IsInch(FieldUnit eU) {
 }
 
 class SVXCORE_DLLPUBLIC SdrFormatter {
-tools::Long  nMul_;
-tools::Long  nDiv_;
-short nComma_;
-bool  bDirty;
-MapUnit   eSrcMU;
-MapUnit   eDstMU;
+tools::Long  m_nMul;
+tools::Long  m_nDiv;
+short m_nComma;
+bool  m_bDirty;
+MapUnit   m_eSrcMU;
+MapUnit   m_eDstMU;
 private:
 SVX_DLLPRIVATE void Undirty();
 public:
 SdrFormatter(MapUnit eSrc, MapUnit eDst)
-: nMul_(0)
-, nDiv_(0)
-, nComma_(0)
-, bDirty(true)
-, eSrcMU(eSrc)
-, eDstMU(eDst)
+: m_nMul(0)
+, m_nDiv(0)
+, m_nComma(0)
+, m_bDirty(true)
+, m_eSrcMU(eSrc)
+, m_eDstMU(eDst)
 {
 }
 OUString GetStr(tools::Long nVal) const;
diff --git a/svx/source/items/customshapeitem.cxx 
b/svx/source/items/customshapeitem.cxx
index 5f2ef96a251b..1aaa0e7ff02b 100644
--- a/svx/source/items/customshapeitem.cxx
+++ b/svx/source/items/customshapeitem.cxx
@@ -42,18 +42,18 @@ SdrCustomShapeGeometryItem::SdrCustomShapeGeometryItem( 
const uno::Sequence< bea
 css::uno::Any* SdrCustomShapeGeometryItem::GetPropertyValueByName( const 
OUString& rPropName )
 {
 css::uno::Any* pRet = nullptr;
-PropertyHashMap::iterator aHashIter( aPropHashMap.find( rPropName ) );
-if ( aHashIter != aPropHashMap.end() )
-pRet = &aPropSeq.getArray()[ (*aHashIter).second ].Value;
+PropertyHashMap::iterator aHashIter( m_aPropHashMap.find( rPropName ) );
+if ( aHashIter != m_aPropHashMap.end() )
+pRet = &m_aPropSeq.getArray()[ (*aHashIter).second ].Value;
 return pRet;
 }
 
 const css::uno::Any* SdrCustomShapeGeometryItem::GetPropertyValueByName( const 
OUString& rPropName ) const
 {
 const css::uno::Any* pRet = nullptr;
-PropertyHashMap::const_iterator aHashIter( aPropHashMap.find( rPropName ) 
);
-if ( aHashIter != aPropHashMap.end() )
-pRet = &aPropSeq[ (*aHashIter).second ].Value;
+PropertyHashMap::const_iterator aHashIter( m_aPropHashMap.find( rPropName 
) );
+if ( aHashIter != m_aPropHashMap.end() )
+pRet = &m_aPropSeq[ (*aHashIter).second ].Value;
 return pRet;
 }
 
@@ -65,8 +65,8 @@ css::uno::Any* 
SdrCustomShapeGeometryItem::GetPropertyValueByName( const OUStrin
 {
 if ( auto rSecSequence = 
o3tl::tryAccess>(*pSeqAny) )
 {
-PropertyPairHashMap::iterator aHashIter( aPropPairHashMap.find( 
PropertyPair( rSequenceName, rPropName ) ) );
-if ( aHashIter != aPropPairHashMap.end() )
+PropertyPairHashMap::iterator aHashIter( m_aPropPairHashMap.find( 
PropertyPair( rSequenceName, rPropName ) ) );
+if ( aHashIter != m_aPropPairHashMap.end() )
 {
 pRet = 
&const_cast 
&>(*rSecSequence).getArray()[ (*aHashIter).second ].Value;
 }
@@ -83,8 +83,8 @

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

2023-07-17 Thread Miklos Vajna (via logerrit)
 sw/qa/core/text/data/floattable-wrap-empty-para-legacy.docx |binary
 sw/qa/core/text/itrform2.cxx|   28 
 sw/qa/core/text/text.cxx|4 -
 sw/source/core/inc/txtfly.hxx   |3 +
 sw/source/core/text/itrform2.cxx|   10 ++--
 sw/source/core/text/txtfly.cxx  |3 -
 6 files changed, 38 insertions(+), 10 deletions(-)

New commits:
commit a4af5432753408c4eea8a8d56c2f48202160c5fe
Author: Miklos Vajna 
AuthorDate: Mon Jul 17 09:00:33 2023 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jul 17 11:21:32 2023 +0200

tdf#120262 sw floattable, legacy: fix text wrap around fly when no content 
fits

The bugdoc is created from DOC (so tables are shifted to the left,
slightly) and has 2 floating tables on 2 pages. Writer puts them to a
single page, so they overlap, which is not wanted.

The trouble is that there is some space (but not much) on the right of
the floating table on page 1, and Writer wraps the empty anchor of the
floating table on the right of the floating table, while Word puts it
below the table, so no overlap happens.

Fix the problem by extending the work from commit
8f8b31abd02876c3601e343b8b3274754f8a61b6 (compatibility setting for MS
Word wrapping text in less space (bnc#822908), 2013-08-06), and work
with that limit in SwTextFormatter::CalcFlyWidth(). This way Writer
keeps its behavior that PARALLEL wrap text mode requires no minimal text
width for existing documents, but correctly ~300 twips minimal text
width (Word formats).

The bugdoc still has a footer vs floating table overlap, but at least no
2 floating tables overlap now.

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

diff --git a/sw/qa/core/text/data/floattable-wrap-empty-para-legacy.docx 
b/sw/qa/core/text/data/floattable-wrap-empty-para-legacy.docx
new file mode 100644
index ..c62a25a193a7
Binary files /dev/null and 
b/sw/qa/core/text/data/floattable-wrap-empty-para-legacy.docx differ
diff --git a/sw/qa/core/text/itrform2.cxx b/sw/qa/core/text/itrform2.cxx
index 066a8fb331a6..e190bed46f33 100644
--- a/sw/qa/core/text/itrform2.cxx
+++ b/sw/qa/core/text/itrform2.cxx
@@ -54,6 +54,34 @@ CPPUNIT_TEST_FIXTURE(Test, testFloattableWrapEmptyParagraph)
 const SwSortedObjs& rPageObjs2 = *pPage2->GetSortedObjs();
 CPPUNIT_ASSERT_EQUAL(static_cast(1), rPageObjs2.size());
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testFloattableLegacyWrapEmptyParagraph)
+{
+// Given a document with 2 pages, a floating table on both pages (from 
DOC, so the table is
+// shifted towards the left page edge slightly):
+createSwDoc("floattable-wrap-empty-para-legacy.docx");
+
+// When calculating the layout:
+calcLayout();
+
+// Then make sure that each page has exactly 1 floating table:
+SwDoc* pDoc = getSwDoc();
+SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+auto pPage = dynamic_cast(pLayout->Lower());
+CPPUNIT_ASSERT(pPage);
+CPPUNIT_ASSERT(pPage->GetSortedObjs());
+const SwSortedObjs& rPageObjs = *pPage->GetSortedObjs();
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 1
+// - Actual  : 2
+// i.e. both tables were on page 1, leading to an overlap.
+CPPUNIT_ASSERT_EQUAL(static_cast(1), rPageObjs.size());
+auto pPage2 = dynamic_cast(pPage->GetNext());
+CPPUNIT_ASSERT(pPage2);
+CPPUNIT_ASSERT(pPage2->GetSortedObjs());
+const SwSortedObjs& rPageObjs2 = *pPage2->GetSortedObjs();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), rPageObjs2.size());
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx
index 5e0c387ad8ac..308098c85699 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -1419,10 +1419,10 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, 
testParaUpperMarginFlyIntersect)
 nHeight += getXPath(pXmlDoc, xPath, "height").toInt32();
 }
 // Without the accompanying fix in place, this test would have failed with:
-// - Expected: 521 (~500)
+// - Expected: 542 (~500)
 // - Actual  : 857 (~1000)
 // I.e. both upper and lower margin was taken into account.
-CPPUNIT_ASSERT_EQUAL(521, nHeight);
+CPPUNIT_ASSERT_EQUAL(542, nHeight);
 }
 
 CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf129810)
diff --git a/sw/source/core/inc/txtfly.hxx b/sw/source/core/inc/txtfly.hxx
index 95d70198f858..fe0782dcf938 100644
--- a/sw/source/core/inc/txtfly.hxx
+++ b/sw/source/core/inc/txtfly.hxx
@@ -86,6 +86,9 @@ public:
const bool bRight );
 };
 
+// MS Word wraps on sides with even less space (va

GSoC'23 Week 5 & 6 Report: Customized Certificate Managers and Certificate Chooser UI Improvements

2023-07-17 Thread Ahmed Gamal Eltokhy
Dear all,

I hope this email finds you well. I'm thrilled to share the latest progress
in GSoC for the last two weeks. You can find the complete report on my blog
at the following link:

https://tokiesan.github.io/blogposts/gsoc/week_5_6_report.html

TL;DR: Implemented customized certificate managers, improved the
certificate chooser dialog, and started working on search and filter
functionalities for enhanced certificate management in LibreOffice.

I would like to express my utmost gratitude to Thorsten Behrens, Heiko
Tietze, and Hossein Nourikhah for their unwavering support and guidance
throughout this whole process. I would also like to thank Arnaud Versini
for his recent patches that help simplify various parts of handling digital
signatures!

As always, stay tuned for more updates in the upcoming weeks and do not
hesitate to reach out to me in case you have suggestions, questions, or
just want to chat!

Best regards,

Tokhy


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

2023-07-17 Thread Tomaž Vajngerl (via logerrit)
 sfx2/source/notebookbar/SfxNotebookBar.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 0cda4c31c6c7881ea7b5089b04ad5147b28117af
Author: Tomaž Vajngerl 
AuthorDate: Mon Jul 17 17:14:21 2023 +0900
Commit: Michael Meeks 
CommitDate: Mon Jul 17 11:43:06 2023 +0200

disable add-ons for NotebookBar in LOKit - perf. issues

Searching for add-ons to use in NotebookBar causes perf. issues,
so disable them for now. This was discovered during a editing
session and the flame-graph showed up the NotebookbarAddonValues
method. See COOL GitHub ticket [1] for more details.

[1] https://github.com/CollaboraOnline/online/issues/6896

Change-Id: I4b2ced2be966de1cd1282f801a4410bc1625f0f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154513
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx 
b/sfx2/source/notebookbar/SfxNotebookBar.cxx
index e8ea6c684794..30b4548ee44e 100644
--- a/sfx2/source/notebookbar/SfxNotebookBar.cxx
+++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx
@@ -49,6 +49,9 @@ static void NotebookbarAddonValues(
 
std::vector>>&
 aExtensionValues)
 {
+if (comphelper::LibreOfficeKit::isActive())
+return;
+
 framework::AddonsOptions aAddonsItems;
 
 for (int nIdx = 0; nIdx < aAddonsItems.GetAddonsNotebookBarCount(); nIdx++)


Failed to build libreoffice with libgpg-error-1.47 on Windows

2023-07-17 Thread taichi
* { font-size: 13px; font-family: 'MS Pゴシック', sans-serif;}p, ul, ol, blockquote 
{ margin: 0;}a { color: #0064c8; text-decoration: none;}a:hover { color: 
#0057af; text-decoration: underline;}a:active { color: #004c98;}



Hi, everyone.




I build LibreOffice from source on Windows 11 (22H2) and it failed to build 
libgpg-error.

However, if the version of libgpg-error to be built is 1.44 or 1.45, the 
following error didn't occur and the build succeeded.




(In build.log)

 begin compiler messages ---

***

*** Please note that your compiler does not support the GCC style

*** aligned attribute. Using this software may evoke bus errors.

***

Making all in m4

Making all in src

mkheader.c

mkerrcodes.c

./gpg-error.h.in:508: note: including './syscfg/lock-obj-pub.mingw32.h'

strsource-sym.c

strerror-sym.c

gpg-error.c

libtool: compile: C:/sources/core/workdir/LinkTarget/Executable/gcc-wrapper.exe 
-DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -c 
w32-gettext.c -o libgpg_error_la-w32-gettext.obj

w32-gettext.c

libtool: compile: C:/sources/core/workdir/LinkTarget/Executable/gcc-wrapper.exe 
-DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -c 
w32-lock.c -o libgpg_error_la-w32-lock.obj

w32-lock.c

libtool: compile: C:/sources/core/workdir/LinkTarget/Executable/gcc-wrapper.exe 
-DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -c 
w32-thread.c -o libgpg_error_la-w32-thread.obj

w32-thread.c

libtool: compile: C:/sources/core/workdir/LinkTarget/Executable/gcc-wrapper.exe 
-DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -c 
w32-iconv.c -o libgpg_error_la-w32-iconv.obj

w32-iconv.c

libtool: compile: C:/sources/core/workdir/LinkTarget/Executable/gcc-wrapper.exe 
-DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -c 
w32-estream.c -o libgpg_error_la-w32-estream.obj

w32-estream.c

libtool: compile: C:/sources/core/workdir/LinkTarget/Executable/gcc-wrapper.exe 
-DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -c 
w32-reg.c -o libgpg_error_la-w32-reg.obj

w32-reg.c

libtool: compile: C:/sources/core/workdir/LinkTarget/Executable/gcc-wrapper.exe 
-DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -c 
spawn-w32.c -o libgpg_error_la-spawn-w32.obj

spawn-w32.c

libtool: compile: C:/sources/core/workdir/LinkTarget/Executable/gcc-wrapper.exe 
-DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -c init.c 
-o libgpg_error_la-init.obj

init.c

libtool: compile: C:/sources/core/workdir/LinkTarget/Executable/gcc-wrapper.exe 
-DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -c 
version.c -o libgpg_error_la-version.obj

version.c

libtool: compile: C:/sources/core/workdir/LinkTarget/Executable/gcc-wrapper.exe 
-DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -c 
estream.c -o libgpg_error_la-estream.obj

estream.c

libtool: compile: C:/sources/core/workdir/LinkTarget/Executable/gcc-wrapper.exe 
-DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -c 
estream-printf.c -o libgpg_error_la-estream-printf.obj

estream-printf.c

libtool: compile: C:/sources/core/workdir/LinkTarget/Executable/gcc-wrapper.exe 
-DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -c 
strsource.c -o libgpg_error_la-strsource.obj

strsource.c

libtool: compile: C:/sources/core/workdir/LinkTarget/Executable/gcc-wrapper.exe 
-DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -c 
strerror.c -o libgpg_error_la-strerror.obj

strerror.c

libtool: compile: C:/sources/core/workdir/LinkTarget/Executable/gcc-wrapper.exe 
-DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -c 
code-to-errno.c -o libgpg_error_la-code-to-errno.obj

code-to-errno.c

libtool: compile: C:/sources/core/workdir/LinkTarget/Executable/gcc-wrapper.exe 
-DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -c 
code-from-errno.c -o libgpg_error_la-code-from-errno.obj

code-from-errno.c

libtool: compile: C:/sources/core/workdir/LinkTarget/Executable/gcc-wrapper.exe 
-DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -c 
visibility.c -o libgpg_error_la-visibility.obj

visibility.c

libtool: compile: C:/sources/core/workdir/LinkTarget/Executable/gcc-wrapper.exe 
-DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -c 
sysutils.c -o libgpg_error_la-sysutils.obj

sysutils.c

libtool: compile: C:/sources/core/workdir/LinkTarget/Executable/gcc-wrapper.exe 
-DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -c 
stringutils.c -o libgpg_error_la-stringutils.obj

stringutils.c

libtool: compile: C:/sources/core/workdir/LinkTarget/Executable/gcc-wrapper.exe 
-DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -g -c 
syscall-clamp.c -o libgpg_error_la-syscall-clamp.obj

syscall-clamp.c

libtool: compile: C:/sources/core/workdir/LinkTarget/Executable/gcc-wrapper.exe 
-DHAVE_

Re: Bringing multi-page floating tables to ODF

2023-07-17 Thread Michael Stahl

On 17/07/2023 08:51, Miklos Vajna wrote:

Hi Regina,

On Sun, Jul 16, 2023 at 07:31:22PM +0200, Regina Henschel 
 wrote:

(4) The interaction with the fo:max-height frame-attribute, the
draw:auto-grow-height style-attribute and the style:overflow-behavior
style-attribute is missing.


- the intention is that these frames don't limit their height (you can
   always create a next page and split), so fo:max-height is not meant to
   be used if it's OK to split

- draw:auto-grow-height=false is not meant to be used if it's OK to
   split, because the idea is to try to grow, then split if you can't
   grow further

- style:overflow-behavior: oh, I was not aware of this attribute. This
   is quite close to the one I propose, though the small (but important)
   difference is that style:overflow-behavior would create a text frame
   on the next page with the same position as the original; while a split
   frame would start at the top of the next page, to minimize the amount
   of frames necessary to present the text. Also, the dimension can be
   different on a next page, e.g. 10cm height on current page, then
   split, then 5cm height (minimum necessary) on the next page.


i was not aware of this either; apparently LO is able to import this 
property since this year commit a925476352b3cb32f6384e7b0fb07e323bb6e64f 
but the interesting value "auto-create-new-frame" isn't implemented.


also it looks to me that "auto-create-new-frame" with these restrictions 
(same position and dimensions) only makes sense for Impress.


apparently this attribute exists in the ODF 1.0 schema, i wonder why it 
was added when it was never implemented in OOo/LO.





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

2023-07-17 Thread Sarper Akdemir (via logerrit)
 vcl/win/window/salframe.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 2d3892f2bc51390825d6775c5f193c4864005a06
Author: Sarper Akdemir 
AuthorDate: Fri Jul 14 18:04:35 2023 +0300
Commit: Thorsten Behrens 
CommitDate: Mon Jul 17 13:18:22 2023 +0200

tdf#90023: vcl: fix tooltip displaying over two monitors on Windows

To determine the WorkArea correctly in ImplSalGetWorkArea,
pass in the mouse pointer as pParentRect.

Similarly to how it has been done on:
vcl/win/window/salframe.cxx:1393

Change-Id: I43123be315c5ea146c118e8e2a582ceaaab0a35e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154442
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir 
(cherry picked from commit dc5163af166cb2afb9811dbf0443e1fcceafbb9a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154463
Reviewed-by: Thorsten Behrens 

diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 2e60f38c1f11..c911fff0840f 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -1590,7 +1590,14 @@ void WinSalFrame::SetPluginParent( SystemParentData* 
pNewParent )
 void WinSalFrame::GetWorkArea( tools::Rectangle &rRect )
 {
 RECT aRect;
-ImplSalGetWorkArea( mhWnd, &aRect, nullptr );
+
+// pass cursor's position to ImplSalGetWorkArea to determine work area on
+// multi monitor setups correctly.
+POINT aPoint;
+GetCursorPos(&aPoint);
+RECT aRect2{ aPoint.x, aPoint.y, aPoint.x + 2, aPoint.y + 2 };
+
+ImplSalGetWorkArea( mhWnd, &aRect, &aRect2 );
 rRect.SetLeft( aRect.left );
 rRect.SetRight( aRect.right-1 );
 rRect.SetTop( aRect.top );


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

2023-07-17 Thread Julien Nabet (via logerrit)
 extensions/inc/helpids.h  |1 
 extensions/inc/strings.hrc|3 
 extensions/source/update/check/actionlistener.hxx |1 
 extensions/source/update/check/updatecheck.cxx|  109 --
 extensions/source/update/check/updatecheck.hxx|1 
 extensions/source/update/check/updatehdl.cxx  |   32 --
 extensions/source/update/check/updatehdl.hxx  |5 -
 7 files changed, 152 deletions(-)

New commits:
commit e43d5776fee7c89029389fcc3b8011d041033108
Author: Julien Nabet 
AuthorDate: Mon Jul 17 10:54:28 2023 +0200
Commit: Julien Nabet 
CommitDate: Mon Jul 17 13:40:29 2023 +0200

tdf#74934: remove Install button and related

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

diff --git a/extensions/inc/helpids.h b/extensions/inc/helpids.h
index b16b8506d161..6f989407a135 100644
--- a/extensions/inc/helpids.h
+++ b/extensions/inc/helpids.h
@@ -317,7 +317,6 @@ inline constexpr OUStringLiteral 
HID_PROP_INACTIVESELECTIONTEXTCOLOR = u"EXTENSI
 #define HID_CHECK_FOR_UPD_RESUME
"EXTENSIONS_HID_CHECK_FOR_UPD_RESUME"
 #define HID_CHECK_FOR_UPD_DOWNLOAD  
"EXTENSIONS_HID_CHECK_FOR_UPD_DOWNLOAD"
 #define HID_CHECK_FOR_UPD_DOWNLOAD2 
"EXTENSIONS_HID_CHECK_FOR_UPD_DOWNLOAD2"
-#define HID_CHECK_FOR_UPD_INSTALL   
"EXTENSIONS_HID_CHECK_FOR_UPD_INSTALL"
 #define HID_CHECK_FOR_UPD_STATUS
"EXTENSIONS_HID_CHECK_FOR_UPD_STATUS"
 #define HID_CHECK_FOR_UPD_DESCRIPTION   
"EXTENSIONS_HID_CHECK_FOR_UPD_DESCRIPTION"
 #define HID_CHECK_FOR_UPD_CANCEL
"EXTENSIONS_HID_CHECK_FOR_UPD_CANCEL"
diff --git a/extensions/inc/strings.hrc b/extensions/inc/strings.hrc
index 8d6ed0580256..510afa6d671e 100644
--- a/extensions/inc/strings.hrc
+++ b/extensions/inc/strings.hrc
@@ -305,8 +305,6 @@
 #define RID_UPDATE_STR_DOWNLOADING  
NC_("RID_UPDATE_STR_DOWNLOADING", "Downloading %PRODUCTNAME %NEXTVERSION...")
 #define RID_UPDATE_STR_READY_INSTALL
NC_("RID_UPDATE_STR_READY_INSTALL", "Download of %PRODUCTNAME %NEXTVERSION 
completed. Ready for installation.")
 #define RID_UPDATE_STR_CANCEL_DOWNLOAD  
NC_("RID_UPDATE_STR_CANCEL_DOWNLOAD", "Do you really want to cancel the 
download?")
-#define RID_UPDATE_STR_BEGIN_INSTALL
NC_("RID_UPDATE_STR_BEGIN_INSTALL", "To install the update, %PRODUCTNAME 
%PRODUCTVERSION needs to be closed. Do you want to install the update now?")
-#define RID_UPDATE_STR_INSTALL_ERROR
NC_("RID_UPDATE_STR_INSTALL_ERROR", "Could not run the installer application, 
please run %FILE_NAME in %DOWNLOAD_PATH manually.")
 #define RID_UPDATE_STR_OVERWRITE_WARNING
NC_("RID_UPDATE_STR_OVERWRITE_WARNING", "A file with that name already exists! 
Do you want to overwrite the existing file?")
 #define RID_UPDATE_STR_RELOAD_WARNING   
NC_("RID_UPDATE_STR_RELOAD_WARNING", "A file with the name '%FILENAME' already 
exists in '%DOWNLOAD_PATH'! Do you want to continue with the download or delete 
and reload the file?")
 #define RID_UPDATE_STR_RELOAD_RELOAD
NC_("RID_UPDATE_STR_RELOAD_RELOAD", "Reload File")
@@ -316,7 +314,6 @@
 #define RID_UPDATE_FT_DESCRIPTION   
NC_("RID_UPDATE_FT_DESCRIPTION", "Description")
 #define RID_UPDATE_BTN_CLOSENC_("RID_UPDATE_BTN_CLOSE", 
"Close")
 #define RID_UPDATE_BTN_DOWNLOAD NC_("RID_UPDATE_BTN_DOWNLOAD", 
"~Download")
-#define RID_UPDATE_BTN_INSTALL  NC_("RID_UPDATE_BTN_INSTALL", 
"~Install")
 #define RID_UPDATE_BTN_PAUSENC_("RID_UPDATE_BTN_PAUSE", 
"~Pause")
 #define RID_UPDATE_BTN_RESUME   NC_("RID_UPDATE_BTN_RESUME", 
"~Resume")
 #define RID_UPDATE_BTN_CANCEL   NC_("RID_UPDATE_BTN_CANCEL", 
"Cancel")
diff --git a/extensions/source/update/check/actionlistener.hxx 
b/extensions/source/update/check/actionlistener.hxx
index 8fdfd1565da6..63c5ac1cb019 100644
--- a/extensions/source/update/check/actionlistener.hxx
+++ b/extensions/source/update/check/actionlistener.hxx
@@ -27,7 +27,6 @@ class IActionListener : public virtual 
salhelper::SimpleReferenceObject
 
 virtual voidcancel() = 0;
 virtual voiddownload() = 0;
-virtual voidinstall() = 0;
 virtual voidpause() = 0;
 virtual voidresume() = 0;
 virtual voidcloseAfterFailure() = 0;
diff --git a/extensions/source/update/check/updatecheck.cxx 
b/extensions/source/update/check/updatecheck.cxx
index 3bde028f96b1..1cac902eaccb 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -96,16 +96,6 @@ OUString getBuildId()
 }
 
 
-#if (defined LINUX || defined 

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

2023-07-17 Thread Gülşah Köse (via logerrit)
 svx/source/dialog/ThemeDialog.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit e73b2bc4e6fdaba3098fa2c701342e1df112514c
Author: Gülşah Köse 
AuthorDate: Mon Jul 17 11:27:08 2023 +0300
Commit: Tomaž Vajngerl 
CommitDate: Mon Jul 17 13:53:20 2023 +0200

Prevent to open multiple Theme Color Edit dialog

Signed-off-by: Gülşah Köse 
Change-Id: Ibf4db096b44ce941140a12d003b89b636f5e7224
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154514
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/svx/source/dialog/ThemeDialog.cxx 
b/svx/source/dialog/ThemeDialog.cxx
index 8af6f5975df2..cda60a457b04 100644
--- a/svx/source/dialog/ThemeDialog.cxx
+++ b/svx/source/dialog/ThemeDialog.cxx
@@ -88,7 +88,10 @@ void ThemeDialog::runThemeColorEditDialog()
 auto pDialog = std::make_shared(mpWindow, 
*mpCurrentColorSet);
 weld::DialogController::runAsync(pDialog, [this, pDialog](sal_uInt32 
nResult) {
 if (nResult != RET_OK)
+{
+mxAdd->set_sensitive(true);
 return;
+}
 auto aColorSet = pDialog->getColorSet();
 if (!aColorSet.getName().isEmpty())
 {
@@ -102,6 +105,7 @@ void ThemeDialog::runThemeColorEditDialog()
 mpCurrentColorSet
 = 
std::make_shared(maColorSets[maColorSets.size() - 1]);
 }
+mxAdd->set_sensitive(true);
 });
 }
 
@@ -110,6 +114,7 @@ IMPL_LINK(ThemeDialog, ButtonClicked, weld::Button&, 
rButton, void)
 if (mpCurrentColorSet && mxAdd.get() == &rButton)
 {
 runThemeColorEditDialog();
+mxAdd->set_sensitive(false);
 }
 }
 


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

2023-07-17 Thread Mike Kaganski (via logerrit)
 sw/source/core/draw/dcontact.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 72cb68b958f4b037a35bc21f6d6338b19b20fa96
Author: Mike Kaganski 
AuthorDate: Fri Jul 14 18:51:41 2023 +0300
Commit: Miklos Vajna 
CommitDate: Mon Jul 17 13:57:01 2023 +0200

tdf#156287: don't try to move objects to pages other than their anchor

Objects may have offset moving them outside of the current page, where
their anchor is. This doesn't mean that they would move to another page,
just that they will be clipped.

Without this taken into account, objects which rectangle would be on
another page, would trigger infinite loop because of their position
invalidation in SwLayAction::FormatContent's cleanup code, where they
will move to their correct page; and then their off-page rectangle
would move them to another page again.

Change-Id: I2b818403163041a49a3bc1640b1af9a1705fd671
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/15
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 8fc1162d3e7f894adf225fa65ec09bbb83bb17fb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154451
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
(cherry picked from commit 25feffa49576564d7fe70fb20597855d33ac8492)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154465

diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index a467e53174fc..332f82f0f767 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -2042,10 +2042,12 @@ void SwDrawContact::ChkPage()
 }
 
 // --> #i28701#
+// tdf#156287: use anchor page, not current bound rectangle's page,
+// because an object can't move to a page other than its anchor anyway
 SwPageFrame* pPg = ( maAnchoredDrawObj.GetAnchorFrame() &&
maAnchoredDrawObj.GetAnchorFrame()->IsPageFrame() )
  ? GetPageFrame()
- : FindPage( SwRect(GetMaster()->GetCurrentBoundRect()) );
+ : maAnchoredDrawObj.FindPageFrameOfAnchor();
 if ( GetPageFrame() == pPg )
 return;
 


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

2023-07-17 Thread Miklos Vajna (via logerrit)
 sw/qa/core/text/data/floattable-avoid-manip-ofst.docx |binary
 sw/qa/core/text/frmform.cxx   |   20 ++
 sw/source/core/text/frmform.cxx   |8 +++
 3 files changed, 28 insertions(+)

New commits:
commit 389637212194adc6206295f4952d395211cda4d2
Author: Miklos Vajna 
AuthorDate: Wed Jul 12 14:00:20 2023 +0200
Commit: Mike Kaganski 
CommitDate: Mon Jul 17 14:23:23 2023 +0200

cool#6857 sw floattable: try harder to keep anchor text in the last follow

The bugdoc has a single floating table, spanning over 6 pages. Loading
results in a layout loop, SwFrame::GetNextFlyLeaf() never finishes as
the last follow fly has no anchor, which should never happen.

The root of the problem seems to be already on page 3. The 6 fly frames
are meant to have 6 matching anchor frames, where the offset of these
text frames is all 0, i.e. the anchor frame's text goes to the last
follow, since commit 73bada774ef37efd5a4498ccc083b1358314557d (sw
floattable, crashtesting: fix PDF export of fdo72790-1.docx, part 3,
2023-04-26).

Fix the problem by improving SwTextFrame::FormatAdjust(), so it never
sets the offset of a follow anchor frame to non-zero when the current
frame has a non-last split fly. All the negative fly frame heights and
the final layout loop was a result of this.

Note that there are still calls to ManipOfst() on the follow frame after
this, but all such calls are from SwTextFrame::RemoveFootnote(), and
that always just sets a non-zero offset + restores it, so that is not a
problem for us.

(cherry picked from commit d59704b6b8c7e5395c0606fa01f37392afc4b2cd)

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

diff --git a/sw/qa/core/text/data/floattable-avoid-manip-ofst.docx 
b/sw/qa/core/text/data/floattable-avoid-manip-ofst.docx
new file mode 100644
index ..b4d85b5f8ac4
Binary files /dev/null and 
b/sw/qa/core/text/data/floattable-avoid-manip-ofst.docx differ
diff --git a/sw/qa/core/text/frmform.cxx b/sw/qa/core/text/frmform.cxx
index 3c1a16a99444..d23611a7eb05 100644
--- a/sw/qa/core/text/frmform.cxx
+++ b/sw/qa/core/text/frmform.cxx
@@ -16,6 +16,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace
 {
@@ -59,6 +60,25 @@ CPPUNIT_TEST_FIXTURE(Test, testFloattableNegativeVertOffset)
 // 2nd paragraph.
 CPPUNIT_ASSERT_LESS(pPara2->getFrameArea().Top(), rFlyRect.Bottom());
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testFloattableAvoidManipOfst)
+{
+// Given a document with a 6-page floating table and some anchor text:
+createSwDoc("floattable-avoid-manip-ofst.docx");
+
+// When laying out that document:
+calcLayout();
+
+// Then make sure all anchor text is on the last page:
+SwDoc* pDoc = getSwDoc();
+SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
+SwPageFrame* pLastPage = pLayout->GetLastPage();
+SwLayoutFrame* pBodyFrame = pLastPage->FindBodyCont();
+SwTextFrame* pAnchor = pBodyFrame->GetLower()->DynCastTextFrame();
+// If this is not 0, that means some of the anchor text is shifted to a 
previous page, while
+// anchors of non-last split fly frames should contain no text.
+CPPUNIT_ASSERT_EQUAL(static_cast(0), 
pAnchor->GetOffset().get());
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 231825ff89e6..131f138ea683 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -1190,6 +1190,14 @@ void SwTextFrame::FormatAdjust( SwTextFormatter &rLine,
 RemoveFootnote(nOld, nEnd - nOld);
 }
 ChangeOffset( GetFollow(), nEnd );
+
+if (HasNonLastSplitFlyDrawObj())
+{
+// Make sure content from the last floating table anchor is 
not shifted to previous
+// anchors.
+nEnd = TextFrameIndex(0);
+}
+
 GetFollow()->ManipOfst( nEnd );
 }
 else


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

2023-07-17 Thread Vasily Melenchuk (via logerrit)
 sw/qa/extras/rtfexport/data/tdf156030.rtf |   11 ++
 sw/qa/extras/rtfexport/rtfexport7.cxx |   38 ++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   30 -
 3 files changed, 78 insertions(+), 1 deletion(-)

New commits:
commit da2e7b1e0b58aed20d44b7c588ee86d922d614a8
Author: Vasily Melenchuk 
AuthorDate: Thu Jul 6 12:45:11 2023 +0300
Commit: Thorsten Behrens 
CommitDate: Mon Jul 17 15:56:14 2023 +0200

tdf#156030: sw: better import of IF field for RTF and DOCX

Since long time IF field was converted to ConditionalText, but no
parameters were given. So condition, then text and else text were
lost during import.

Change-Id: I9b45e8ab394f3c53bb34370bf3ea15a939a400fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154101
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/sw/qa/extras/rtfexport/data/tdf156030.rtf 
b/sw/qa/extras/rtfexport/data/tdf156030.rtf
new file mode 100644
index ..db501d5bffac
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/tdf156030.rtf
@@ -0,0 +1,11 @@
+{\rtf1
+{\field{\*\fldinst IF 1 = 2 "true value 1" "false value 1"}}\par
+{\field{\*\fldinst IF 1 == 2 "true value 2" "false value 2"}}\par
+{\field{\*\fldinst IF 1 != 2 "true value 3" "false value 3"}}\par
+{\field{\*\fldinst IF 1 <> 2 "true value 4" "false value 4"}}\par
+{\field{\*\fldinst IF 1 > 2 "true value 5" "false value 5"}}\par
+{\field{\*\fldinst IF 1 < 2 "true value 6" "false value 6"}}\par
+{\field{\*\fldinst IF 1 1 = 1 2 1 true value 7 false value 7}}\par
+{\field{\*\fldinst IF 1 1 = "1 2 1 true value 8 fal"se "value 8}}\par
+{\field{\*\fldinst IF a}}\par
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport7.cxx 
b/sw/qa/extras/rtfexport/rtfexport7.cxx
index 11eaadee6a88..ad9249bedeb8 100644
--- a/sw/qa/extras/rtfexport/rtfexport7.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport7.cxx
@@ -683,6 +683,44 @@ DECLARE_RTFEXPORT_TEST(testTdf113202, "tdf113202.rtf")
 CPPUNIT_ASSERT(getProperty(getParagraph(4), "ParaContextMargin"));
 }
 
+DECLARE_RTFEXPORT_TEST(testTdf156030, "tdf156030.rtf")
+{
+uno::Reference xTextFieldsSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xFieldsAccess(
+xTextFieldsSupplier->getTextFields());
+uno::Reference 
xFields(xFieldsAccess->createEnumeration());
+
+// As usual, fields given by FieldsAccess are not in same order as in the 
document
+std::vector> aExpectedValues = {
+{ "1 FORMULA 2", "true value 1", "false value 1" }, // #1, condition 
should be 1 = 2
+{ "", "", "" }, // #9, not enough field params
+{ "1 1 FORMULA 1 2 1 true value 8 fal", "se", "value 8" }, // #8, 
nonsense in field params
+{ "1 1 FORMULA 1 2 1 true value 7 false", "value", "7" }, // #7, 
another parse error
+{ "1 < 2", "true value 6", "false value 6" }, // #6
+{ "1 > 2", "true value 5", "false value 5" }, // #5
+{ "1 <> 2", "true value 4", "false value 4" }, // #4
+{ "1 != 2", "true value 3", "false value 3" }, // #3
+{ "1 FORMULA FORMULA 2", "true value 2", "false value 2" }, // #2, 
condition expected 1 == 2
+};
+uno::Reference xPropertySet;
+OUString sValue;
+
+for (const auto& aValues : aExpectedValues)
+{
+xPropertySet.set(xFields->nextElement(), uno::UNO_QUERY_THROW);
+CPPUNIT_ASSERT(xPropertySet.is());
+CPPUNIT_ASSERT(xPropertySet->getPropertyValue("Condition") >>= sValue);
+CPPUNIT_ASSERT_EQUAL(aValues[0], sValue);
+CPPUNIT_ASSERT(xPropertySet->getPropertyValue("TrueContent") >>= 
sValue);
+CPPUNIT_ASSERT_EQUAL(aValues[1], sValue);
+CPPUNIT_ASSERT(xPropertySet->getPropertyValue("FalseContent") >>= 
sValue);
+CPPUNIT_ASSERT_EQUAL(aValues[2], sValue);
+}
+
+// No more fields
+CPPUNIT_ASSERT(!xFields->hasMoreElements());
+}
+
 DECLARE_RTFEXPORT_TEST(testTdf153195, "tdf153195.rtf")
 {
 uno::Reference xTextTablesSupplier(mxComponent, 
uno::UNO_QUERY);
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 491c755206b7..bf433e2b8d33 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -7447,7 +7447,35 @@ void DomainMapper_Impl::CloseFieldCommand()
 pContext->SetHyperlinkTarget(sTarget);
 }
 break;
-case FIELD_IF   : break;
+case FIELD_IF:
+{
+if (vArguments.size() < 3)
+{
+SAL_WARN("writerfilter.dmapper", "IF field requires at 
lest 3 parameters!");
+break;
+}
+
+if (xFieldProperties.is())
+{
+// Following code assumes that last argument in field 
is false value
+

Week 6 & 7 Report : GSOC 2023 - Convert Writer's Java UNO API Tests to C++

2023-07-17 Thread Dipam Turkar
Hey Everyone,
I want to submit the project report for Week #6 & Week #7.

The tests converted this week are as mentioned below.
1. SwXParagraphEnumeration.java
2. SwXReferenceMark.java
3. SwXReferenceMarks.java
4. SwXTableCellText.java
5. SwXTextFieldTypes.java
6. SwXTextFrameText.java
7. SwXTextPortionEnumeration.java
8. SwXTextRanges.java
9. SwXTextSearch.java

The converted tests, if not committed, will be committed soon.

Thanks and regards
Dipam Turkar


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

2023-07-17 Thread Noel Grandin (via logerrit)
 sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx |3 ++-
 sw/source/uibase/docvw/AnnotationWin2.cxx|2 +-
 vcl/source/outdev/transparent.cxx|2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 0821457cdb6476b2b1860c8aeda718b130ab808e
Author: Noel Grandin 
AuthorDate: Mon Jul 17 13:03:22 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 17 16:27:35 2023 +0200

simply some LogicToPixel calculation sites

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

diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx 
b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 077bdaead1db..09e01e939693 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -1027,7 +1027,8 @@ void ScShapeChildren::FillShapes(const tools::Rectangle& 
aPixelPaintRect, const
 uno::Reference< drawing::XShape > xShape(pObj->getUnoShape(), 
uno::UNO_QUERY);
 if (xShape.is())
 {
-tools::Rectangle 
aRect(pWin->LogicToPixel(VCLPoint(xShape->getPosition()), aMapMode), 
pWin->LogicToPixel(VCLSize(xShape->getSize()), aMapMode));
+tools::Rectangle aRect(pWin->LogicToPixel(
+tools::Rectangle(VCLPoint(xShape->getPosition()), 
VCLSize(xShape->getSize())), aMapMode));
 if(!aClippedPixelPaintRect.GetIntersection(aRect).IsEmpty())
 {
 ScShapeChild aShape;
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx 
b/sw/source/uibase/docvw/AnnotationWin2.cxx
index ae52f1c21075..8c7a26bc1b10 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -147,7 +147,7 @@ void SwAnnotationWin::PaintTile(vcl::RenderContext& 
rRenderContext, const tools:
 
 bool SwAnnotationWin::IsHitWindow(const Point& rPointLogic)
 {
-tools::Rectangle aRectangleLogic(EditWin().PixelToLogic(GetPosPixel()), 
EditWin().PixelToLogic(GetSizePixel()));
+tools::Rectangle 
aRectangleLogic(EditWin().PixelToLogic(tools::Rectangle(GetPosPixel(),GetSizePixel(;
 return aRectangleLogic.Contains(rPointLogic);
 }
 
diff --git a/vcl/source/outdev/transparent.cxx 
b/vcl/source/outdev/transparent.cxx
index 4a4b6b5a54bb..793b26e2e581 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -585,7 +585,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& 
rMtf, const Point& rPos,
 else
 {
 GDIMetaFile* pOldMetaFile = mpMetaFile;
-tools::Rectangle aOutRect( LogicToPixel( rPos ), LogicToPixel( rSize ) 
);
+tools::Rectangle aOutRect( LogicToPixel( tools::Rectangle(rPos, rSize) 
) );
 Point aPoint;
 tools::Rectangle aDstRect( aPoint, GetOutputSizePixel() );
 


[Libreoffice-commits] core.git: solenv/gdb

2023-07-17 Thread Michael Stahl (via logerrit)
 solenv/gdb/libreoffice/sw.py |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 2c524ab87e336418c3ee7370f76284a53dff1c82
Author: Michael Stahl 
AuthorDate: Mon Jul 17 14:16:24 2023 +0200
Commit: Michael Stahl 
CommitDate: Mon Jul 17 16:39:16 2023 +0200

solenv: gdb: BigPtrArrayPrinter, try both 0 and 0ul

Apparently commit ea858ca92488309789e8381a358af1d9f6f6 broke it on
Fedora 38, where i now get:
  gdb.error: No type named std::_Head_base<0ul, BlockInfo**, false>.

So try both variants.

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

diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py
index 2b5cc7c7278b..50d0f2221f2e 100644
--- a/solenv/gdb/libreoffice/sw.py
+++ b/solenv/gdb/libreoffice/sw.py
@@ -194,7 +194,12 @@ class BigPtrArrayPrinter(object):
 # libstdc++ unique_ptr is a std::tuple which contains multiple
 # _M_head_impl members and gdb may pick the wrong one by default
 # so have to manually cast it to the one that contains the array
-self.blocks = 
array['m_ppInf']['_M_t']['_M_t'].cast(gdb.lookup_type("std::_Head_base<0ul, 
BlockInfo**, false>"))['_M_head_impl']
+try:
+# supposedly works on Debian gdb 13.2
+self.blocks = 
array['m_ppInf']['_M_t']['_M_t'].cast(gdb.lookup_type("std::_Head_base<0ul, 
BlockInfo**, false>"))['_M_head_impl']
+except gdb.error:
+# works on Fedora gdb 13.2
+self.blocks = 
array['m_ppInf']['_M_t']['_M_t'].cast(gdb.lookup_type("std::_Head_base<0, 
BlockInfo**, false>"))['_M_head_impl']
 self.count = array['m_nSize']
 self.pos = 0
 self.block_count = array['m_nBlock']


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - 6 commits - sw/qa sw/source

2023-07-17 Thread Mike Kaganski (via logerrit)
 sw/qa/extras/layout/data/s4_min2.fodt   |  360 
 sw/qa/extras/layout/data/tdf150606-1-min.odt|binary
 sw/qa/extras/layout/data/tdf152983-1-min.docx   |binary
 sw/qa/extras/layout/layout.cxx  |   86 +++
 sw/source/core/doc/DocumentContentOperationsManager.cxx |2 
 sw/source/core/layout/flowfrm.cxx   |2 
 sw/source/core/layout/fly.cxx   |6 
 sw/source/core/layout/newfrm.cxx|5 
 sw/source/core/layout/wsfrm.cxx |8 
 9 files changed, 463 insertions(+), 6 deletions(-)

New commits:
commit b1707fea5936557688864124654ef6eeb5c0beb4
Author: Mike Kaganski 
AuthorDate: Sun May 7 17:11:21 2023 +0300
Commit: Michael Stahl 
CommitDate: Mon Jul 17 11:52:17 2023 +0200

tdf#137972: when correcting PaMs, move them to the end

The cursor position is pushed in SwView::ExecSpellPopup, and popped
in the end, to restore the changed position e.g. when the action is
cancelled.

In the replacement, the PaM of the pushed cursor is updated in
DocumentContentOperationsManager::ReplaceRangeImpl, likely to avoid
several updates during the further processing. The stated goal is
to move all PaMs out of the deleted range, but the direction is not
stated explicitly.

If this correction is removed, the cursor PaM gets corrected anyway,
and arrives at the end of the replaced text. So, to fix the bug, and
to be compliant with the default case, let's correct to the end of
the range, instead of the random direction (GetPoint() may return a
position at either end, depending how PaM was created).

Change-Id: I83bcf01bcc0bf7277a9a34263b524b1212785814
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151462
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 4f93995f2262cde0b16bacc83f4ba3c6161ada7f)

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 315cf5cdeefa..975a35965d17 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -4317,7 +4317,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( 
SwPaM& rPam, const OUSt
 // the other views out of the deletion range.
 // Except for itself!
 SwPaM aDelPam( *rPam.GetMark(), *rPam.GetPoint() );
-::PaMCorrAbs( aDelPam, *aDelPam.GetPoint() );
+::PaMCorrAbs( aDelPam, *aDelPam.End() );
 
 SwPosition *pStt = aDelPam.Start(),
*pEnd = aDelPam.End();
commit d87c3775acdd0bf9b08444069b51e350a5d91359
Author: Michael Stahl 
AuthorDate: Wed Jun 28 17:19:02 2023 +0200
Commit: Michael Stahl 
CommitDate: Mon Jul 17 11:52:17 2023 +0200

tdf#156077 sw: layout: call AssertFlyPages() in Init()

The bugdoc has 3 pages, and there are at-page flys anchored to the 3rd
page, and these are not displayed - simply missing from the layout.

In LO 6.1, this worked because the layout-cache was read from the file,
and 3 pages were created in SwRootFrame::Init() calling InsertCnt_().

But now this creates only 2 pages, and later SwLayAction creates the 2nd
page between the existing ones on some MoveFwd(), but despite page nr 2
becoming page nr 3 nothing attaches the at-page flys to the now-page-3.

If a document is loaded containing at-page flys, then all pages that
have flys anchored to them should be created in SwRootFrame::Init()
already.

(regression from commit 7e8b4756d95057f069467b34e7849f9354856578)

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153720
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit ff8ec4cfe5df1e15c3e9f6adc843dfe31358e097)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153699
Reviewed-by: Caolán McNamara 
(cherry picked from commit c34e72ff817b07403f908a9098dd513b96c30ad1)

Change-Id: I4792c483a7620efd81211e6ad0d9220152367d68

diff --git a/sw/qa/extras/layout/data/s4_min2.fodt 
b/sw/qa/extras/layout/data/s4_min2.fodt
new file mode 100644
index ..e1317de597d8
--- /dev/null
+++ b/sw/qa/extras/layout/data/s4_min2.fodt
@@ -0,0 +1,360 @@
+
+http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle: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:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xm

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

2023-07-17 Thread Hossein (via logerrit)
 sfx2/source/sidebar/ResourceManager.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 4ea4ce78d116757638b08a389d9c509c523085f3
Author: Hossein 
AuthorDate: Mon Jul 17 11:39:58 2023 +0200
Commit: Hossein 
CommitDate: Mon Jul 17 18:38:08 2023 +0200

Remove leftover debug code

This fprintf was leftover from 1653bb9bffaa84a40b7d81a8277e887ea28df4e4
which came up with attachment 94167 from tdf#75059 in terminal output
with just opening and closing in the official 7.5.1.2 binaries.

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

diff --git a/sfx2/source/sidebar/ResourceManager.cxx 
b/sfx2/source/sidebar/ResourceManager.cxx
index 5974e20af488..7989d2820263 100644
--- a/sfx2/source/sidebar/ResourceManager.cxx
+++ b/sfx2/source/sidebar/ResourceManager.cxx
@@ -699,7 +699,6 @@ void ResourceManager::ReadLegacyAddons (const 
Reference& rxC
 rPanelDescriptor.mbShowForReadOnlyDocuments = false;
 rPanelDescriptor.mbWantsCanvas = false;
 rPanelDescriptor.mbWantsAWT = true;
-fprintf(stderr, "THIS PLACE\n");
 
rPanelDescriptor.maContextList.AddContextDescription(Context(sModuleName, 
"any"), true, OUString());
 }
 }


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

2023-07-17 Thread Mike Kaganski (via logerrit)
 framework/source/services/autorecovery.cxx |   27 +--
 1 file changed, 13 insertions(+), 14 deletions(-)

New commits:
commit 8362ec6646df330629b1c6c2e28b634487d55612
Author: Mike Kaganski 
AuthorDate: Sun Jul 16 22:04:37 2023 +0200
Commit: Mike Kaganski 
CommitDate: Mon Jul 17 18:40:16 2023 +0200

Small simplification

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

diff --git a/framework/source/services/autorecovery.cxx 
b/framework/source/services/autorecovery.cxx
index a0ef83d3a9da..07ea3184476f 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -1801,7 +1801,6 @@ void AutoRecovery::implts_readConfig()
 
 css::uno::Reference xRecoveryList(
 officecfg::Office::Recovery::RecoveryList::get());
-const OUString 
sRECOVERY_ITEM_BASE_IDENTIFIER(RECOVERY_ITEM_BASE_IDENTIFIER);
 const css::uno::Sequence< OUString > lItems = 
xRecoveryList->getElementNames();
 const OUString*  pItems = lItems.getConstArray();
 sal_Int32c  = lItems.getLength();
@@ -1833,9 +1832,9 @@ void AutoRecovery::implts_readConfig()
 implts_specifyAppModuleAndFactory(aInfo);
 implts_specifyDefaultFilterAndExtension(aInfo);
 
-if (pItems[i].startsWith(sRECOVERY_ITEM_BASE_IDENTIFIER))
+if (pItems[i].startsWith(RECOVERY_ITEM_BASE_IDENTIFIER))
 {
-std::u16string_view sID = 
pItems[i].subView(sRECOVERY_ITEM_BASE_IDENTIFIER.getLength());
+std::u16string_view sID = 
pItems[i].subView(RECOVERY_ITEM_BASE_IDENTIFIER.getLength());
 aInfo.ID = o3tl::toInt32(sID);
 /* SAFE */ {
 osl::MutexGuard 
g(cppu::WeakComponentImplHelperBase::rBHelper.rMutex);
@@ -1935,8 +1934,8 @@ void 
AutoRecovery::implts_specifyAppModuleAndFactory(AutoRecovery::TDocumentInfo
 rInfo.AppModule = xManager->identify(rInfo.Document);
 
 ::comphelper::SequenceAsHashMap 
lModuleDescription(xManager->getByName(rInfo.AppModule));
-lModuleDescription[OUString(CFG_ENTRY_PROP_EMPTYDOCUMENTURL)] >>= 
rInfo.FactoryURL;
-lModuleDescription[OUString(CFG_ENTRY_PROP_FACTORYSERVICE)] >>= 
rInfo.FactoryService;
+lModuleDescription[CFG_ENTRY_PROP_EMPTYDOCUMENTURL] >>= rInfo.FactoryURL;
+lModuleDescription[CFG_ENTRY_PROP_FACTORYSERVICE] >>= rInfo.FactoryService;
 }
 
 void AutoRecovery::implts_collectActiveViewNames( AutoRecovery::TDocumentInfo& 
i_rInfo )
@@ -3590,15 +3589,15 @@ css::frame::FeatureStateEvent 
AutoRecovery::implst_createFeatureStateEvent(
 {
 // pack rInfo for transport via UNO
 ::comphelper::NamedValueCollection aInfo;
-aInfo.put( OUString(CFG_ENTRY_PROP_ID), pInfo->ID );
-aInfo.put( OUString(CFG_ENTRY_PROP_ORIGINALURL), pInfo->OrgURL );
-aInfo.put( OUString(CFG_ENTRY_PROP_FACTORYURL), pInfo->FactoryURL );
-aInfo.put( OUString(CFG_ENTRY_PROP_TEMPLATEURL), pInfo->TemplateURL );
-aInfo.put( OUString(CFG_ENTRY_PROP_TEMPURL), 
pInfo->OldTempURL.isEmpty() ? pInfo->NewTempURL : pInfo->OldTempURL );
-aInfo.put( OUString(CFG_ENTRY_PROP_MODULE), pInfo->AppModule);
-aInfo.put( OUString(CFG_ENTRY_PROP_TITLE), pInfo->Title);
-aInfo.put( OUString(CFG_ENTRY_PROP_VIEWNAMES), pInfo->ViewNames);
-aInfo.put( OUString(CFG_ENTRY_PROP_DOCUMENTSTATE), 
sal_Int32(pInfo->DocumentState));
+aInfo.put( CFG_ENTRY_PROP_ID, pInfo->ID );
+aInfo.put( CFG_ENTRY_PROP_ORIGINALURL, pInfo->OrgURL );
+aInfo.put( CFG_ENTRY_PROP_FACTORYURL, pInfo->FactoryURL );
+aInfo.put( CFG_ENTRY_PROP_TEMPLATEURL, pInfo->TemplateURL );
+aInfo.put( CFG_ENTRY_PROP_TEMPURL, pInfo->OldTempURL.isEmpty() ? 
pInfo->NewTempURL : pInfo->OldTempURL );
+aInfo.put( CFG_ENTRY_PROP_MODULE, pInfo->AppModule);
+aInfo.put( CFG_ENTRY_PROP_TITLE, pInfo->Title);
+aInfo.put( CFG_ENTRY_PROP_VIEWNAMES, pInfo->ViewNames);
+aInfo.put( CFG_ENTRY_PROP_DOCUMENTSTATE, 
sal_Int32(pInfo->DocumentState));
 
 aEvent.State <<= aInfo.getPropertyValues();
 }


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

2023-07-17 Thread Michael Stahl (via logerrit)
 sw/source/core/docnode/nodes.cxx |   55 +--
 1 file changed, 31 insertions(+), 24 deletions(-)

New commits:
commit faf2d9e2cb13c3750ac359338f8f31fc1afce368
Author: Michael Stahl 
AuthorDate: Mon Jul 17 17:32:07 2023 +0200
Commit: Michael Stahl 
CommitDate: Mon Jul 17 19:33:41 2023 +0200

sw: handle sequence of sections containing only table

SwNodes::FindPrvNxtFrameNode() still relies on the special-case code at
the end to handle this situation, which exists only in the forward
direction, and since commit af4e20426ad24c6f2c0164b37472f2b7b54ecd30
there's an assert which is triggered by forum-de3-11230.odt

Add the handling to the loop, both backwards and forwards.

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

diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 06a50c4de33b..45a02bf5d5a0 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -2242,6 +2242,22 @@ SwNode* SwNodes::FindPrvNxtFrameNode( const SwNode& 
rFrameNd,
 else
 {
 pFrameNd = GoPrevSection( &aIdx, true, false );
+// did we move *into* a table?
+if (pFrameNd)
+{
+for (SwTableNode * pTable = pFrameNd->FindTableNode();
+pTable && pTable->EndOfSectionIndex() < 
rFrameNd.GetIndex();
+pTable = pTable->StartOfSectionNode()->FindTableNode())
+{
+pFrameNd = pTable->EndOfSectionNode();
+}
+if (pFrameNd->IsEndNode())
+{   // GoPrevSection() checks that text node isn't 
section-hidden,
+// so table node between can't be section-hidden either
+assert(pFrameNd->StartOfSectionNode()->IsTableNode());
+continue; // check other hidden conditions on next 
iteration
+}
+}
 if ( nullptr != pFrameNd && !(
 ::CheckNodesRange( aIdx.GetNode(), rFrameNd, true ) &&
 // Never out of the table at the start
@@ -2299,6 +2315,21 @@ SwNode* SwNodes::FindPrvNxtFrameNode( const SwNode& 
rFrameNd,
 else
 {
 pFrameNd = GoNextSection( &aIdx, true, false );
+// did we move *into* a table?
+if (pFrameNd)
+{
+for (SwTableNode * pTable = pFrameNd->FindTableNode();
+pTable && pEnd->GetIndex() < pTable->GetIndex();
+pTable = pTable->StartOfSectionNode()->FindTableNode())
+{
+pFrameNd = pTable;
+}
+if (pFrameNd->IsTableNode())
+{   // GoNextSection() checks that text node isn't 
section-hidden,
+// so table node between can't be section-hidden either
+continue; // check other hidden conditions on next 
iteration
+}
+}
 // NEVER leave the section when doing this!
 if (pFrameNd
 && !(::CheckNodesRange(aIdx.GetNode(), rFrameNd, true)
@@ -2316,30 +2347,6 @@ SwNode* SwNodes::FindPrvNxtFrameNode( const SwNode& 
rFrameNd,
 }
 while (pFrameNd != nullptr);
 
-// probably this is dead code, because the GoNextSection()
-// should have ended up in the first text node in the table and
-// then checked it's in a table?
-{
-aIdx = pEnd->GetIndex() + 1;
-
-pFrameNd = nullptr;
-
-// is there some sectionnodes before a tablenode?
-while( aIdx.GetNode().IsSectionNode() )
-{
-const SwSection& rSect = aIdx.GetNode().
-GetSectionNode()->GetSection();
-if( rSect.IsHiddenFlag() )
-aIdx = aIdx.GetNode().EndOfSectionIndex()+1;
-else
-++aIdx;
-}
-if( aIdx.GetNode().IsTableNode() )
-{
-pFrameNd = &aIdx.GetNode();
-assert(!"this isn't dead code?");
-}
-}
 return pFrameNd;
 }
 


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

2023-07-17 Thread Julien Nabet (via logerrit)
 connectivity/source/parse/sqlbison.y |4 
 1 file changed, 4 insertions(+)

New commits:
commit 77a2fe5a649d089d7c09c5558c42c2ea38116fd7
Author: Julien Nabet 
AuthorDate: Mon Jul 17 13:42:25 2023 +0200
Commit: Julien Nabet 
CommitDate: Mon Jul 17 19:54:28 2023 +0200

tdf#118817: add WEEK, WEEKDAY, YEARDAY AND MILLISECOND for EXTRACT

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

diff --git a/connectivity/source/parse/sqlbison.y 
b/connectivity/source/parse/sqlbison.y
index 0c5d359d083e..8263535dc82b 100644
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -2957,10 +2957,14 @@ interval_value_exp:
 */
 non_second_datetime_field:
SQL_TOKEN_YEAR
+   |   SQL_TOKEN_YEARDAY
|   SQL_TOKEN_MONTH
+   |   SQL_TOKEN_WEEK
+   |   SQL_TOKEN_WEEKDAY
|   SQL_TOKEN_DAY
|   SQL_TOKEN_HOUR
|   SQL_TOKEN_MINUTE
+   |   SQL_TOKEN_MILLISECOND
;
 start_field:
non_second_datetime_field opt_paren_precision


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

2023-07-17 Thread Mike Kaganski (via logerrit)
 svl/source/items/slstitm.cxx |   40 +---
 1 file changed, 9 insertions(+), 31 deletions(-)

New commits:
commit 5c97c320338da4bb33ea3cf2479079923d8723e3
Author: Mike Kaganski 
AuthorDate: Mon Jul 17 19:29:22 2023 +0200
Commit: Mike Kaganski 
CommitDate: Mon Jul 17 20:27:07 2023 +0200

Simplify a bit

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

diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx
index bf0e37684ba7..02784446ca52 100644
--- a/svl/source/items/slstitm.cxx
+++ b/svl/source/items/slstitm.cxx
@@ -41,8 +41,7 @@ SfxStringListItem::SfxStringListItem( sal_uInt16 which, const 
std::vectorCount() */ )
 {
-mpList = std::make_shared>();
-*mpList = *pList;
+mpList = std::make_shared>(*pList);
 }
 }
 
@@ -97,26 +96,10 @@ void SfxStringListItem::SetString( const OUString& rStr )
 {
 mpList = std::make_shared>();
 
-sal_Int32 nStart = 0;
 OUString aStr(convertLineEnd(rStr, LINEEND_CR));
-for (;;)
-{
-const sal_Int32 nDelimPos = aStr.indexOf( '\r', nStart );
-if ( nDelimPos < 0 )
-{
-if (nStartpush_back(aStr.copy(nStart));
-}
-break;
-}
-
-mpList->push_back(aStr.copy(nStart, nDelimPos-nStart));
-
-// skip both inserted string and delimiter
-nStart = nDelimPos + 1 ;
-}
+// put last string only if not empty
+for (sal_Int32 nStart = 0; nStart >= 0 && nStart < aStr.getLength();)
+mpList->push_back(aStr.getToken(0, '\r', nStart));
 }
 
 
@@ -133,19 +116,17 @@ OUString SfxStringListItem::GetString()
 if (iter == end)
 break;
 
-aStr.append("\r");
+aStr.append(SAL_NEWLINE_STRING);
 }
 }
-return convertLineEnd(aStr.makeStringAndClear(), GetSystemLineEnd());
+return aStr.makeStringAndClear();
 }
 
 
 void SfxStringListItem::SetStringList( const css::uno::Sequence< OUString >& 
rList )
 {
-mpList = std::make_shared>();
-
-// String belongs to the list
-comphelper::sequenceToContainer(*mpList, rList);
+mpList = std::make_shared>(
+comphelper::sequenceToContainer>(rList));
 }
 
 void SfxStringListItem::GetStringList( css::uno::Sequence< OUString >& rList ) 
const
@@ -175,11 +156,8 @@ bool SfxStringListItem::PutValue( const css::uno::Any& 
rVal, sal_uInt8 )
 // virtual
 bool SfxStringListItem::QueryValue( css::uno::Any& rVal, sal_uInt8 ) const
 {
-// GetString() is not const!!!
-SfxStringListItem* pThis = const_cast< SfxStringListItem * >( this );
-
 css::uno::Sequence< OUString > aStringList;
-pThis->GetStringList( aStringList );
+GetStringList( aStringList );
 rVal <<= aStringList;
 return true;
 }


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

2023-07-17 Thread Mike Kaganski (via logerrit)
 comphelper/source/misc/configuration.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bb7387236a9fe19656e86de6d00d02beceb7d84b
Author: Mike Kaganski 
AuthorDate: Mon Jul 17 19:24:59 2023 +0200
Commit: Mike Kaganski 
CommitDate: Mon Jul 17 20:27:26 2023 +0200

Simplify a bit

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

diff --git a/comphelper/source/misc/configuration.cxx 
b/comphelper/source/misc/configuration.cxx
index f91e85852831..f4ee4e0298bb 100644
--- a/comphelper/source/misc/configuration.cxx
+++ b/comphelper/source/misc/configuration.cxx
@@ -153,7 +153,7 @@ 
comphelper::detail::ConfigurationWrapper::ConfigurationWrapper():
 
 maNotifier = css::uno::Reference< css::util::XChangesNotifier >(xCfg, 
css::uno::UNO_QUERY);
 assert(maNotifier.is());
-maListener = css::uno::Reference< ConfigurationChangesListener >(new 
ConfigurationChangesListener(*this));
+maListener.set(new ConfigurationChangesListener(*this));
 maNotifier->addChangesListener(maListener);
 }
 catch(const css::uno::Exception&)


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

2023-07-17 Thread Arnaud VERSINI (via logerrit)
 sc/source/filter/xml/xmlcelli.cxx |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 71f2aea3151b82ba4793eb21a2251d587e425511
Author: Arnaud VERSINI 
AuthorDate: Mon Apr 17 20:47:31 2023 +0200
Commit: Arnaud Versini 
CommitDate: Mon Jul 17 20:30:14 2023 +0200

sc : small simplification in ScXMLTableRowCellContext::IsPossibleErrorString

Change-Id: I3c5bd6b53528b1cc1d695fb48f89b6f19f5c0f6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150532
Tested-by: Jenkins
Reviewed-by: Arnaud Versini 

diff --git a/sc/source/filter/xml/xmlcelli.cxx 
b/sc/source/filter/xml/xmlcelli.cxx
index c041251c0119..3e94b576c679 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -1489,10 +1489,9 @@ void 
ScXMLTableRowCellContext::HasSpecialCaseFormulaText()
 
 bool ScXMLTableRowCellContext::IsPossibleErrorString() const
 {
-if(mbNewValueType && !mbErrorValue)
-return false;
-else if(mbNewValueType && mbErrorValue)
-return true;
+if(mbNewValueType)
+return mbErrorValue;
+
 return mbPossibleErrorCell || (mbCheckWithCompilerForError && 
maStringValue &&
 GetScImport().GetFormulaErrorConstant(*maStringValue) != 
FormulaError::NONE);
 }


[Libreoffice-commits] core.git: cui/source framework/source officecfg/registry officecfg/util sd/source sfx2/source

2023-07-17 Thread Mike Kaganski (via logerrit)
 cui/source/options/optsave.cxx   |8 +--
 framework/source/services/autorecovery.cxx   |   18 ---
 officecfg/registry/schema/org/openoffice/Office/Common.xcs   |   21 -
 officecfg/registry/schema/org/openoffice/Office/Recovery.xcs |   25 +--
 officecfg/util/sanity.xsl|2 
 sd/source/ui/slideshow/slideshowimpl.cxx |4 -
 sfx2/source/appl/appcfg.cxx  |   12 ++---
 7 files changed, 38 insertions(+), 52 deletions(-)

New commits:
commit 3c41b32562d5ccdd306000484c5b16245b2b4a4f
Author: Mike Kaganski 
AuthorDate: Sun Jul 16 18:17:21 2023 +0300
Commit: Mike Kaganski 
CommitDate: Mon Jul 17 21:14:24 2023 +0200

tdf#156308: Restore use of /org.openoffice.Office.Recovery/AutoSave

... instead of respective values from 
/org.openoffice.Office.Common/Save/Document

The history of the problem:

d0f9685d2cfc3927add412b276c804dcc20cb6a5 (2004-11-26)
  made SvtSaveOptions use org.openoffice.Office.Recovery/AutoSave,
  *in addition* to org.openoffice.Office.Common/Save/Document/*,
  as "forward AutoSave/AutoSaveTime to new config location" part
  of i#27726; at this point, org.openoffice.Office.Recovery/AutoSave/*
  took precedence (they were read last).

8e6031e126782ced6d7527b19cf817395e9b63e4 (2004-11-26)
  implemented autorecovery.cxx, already reading
  org.openoffice.Office.Recovery/AutoSave/*

d5b9283985633fdb423269cab961bba2acc3539e (2021-07-25)
  made SvxSaveTabPage and SfxApplication::SetOptions_Impl use
  officecfg::Office::Common::Save::Document::* instead of
  SvtSaveOptions.

134f40136a9bea265d8f2fedfdb41a1e65d81b49 (2021-07-25)
  dropped SvtSaveOptions_Impl::ImplCommit, and its saving of
  officecfg::Office::Recovery::AutoSave::* (which likely
  detached officecfg::Office::Recovery::AutoSave from
  officecfg::Office::Common::Save::Document, making UI edits
  not stored to the former).

aeb8a0076cd5ec2836b3dfc1adffcced432f995f (2022-05-23)
  made AutoRecovery::implts_readAutoSaveConfig read
  officecfg::Office::Common::Save::Document::* instead of
  proper officecfg::Office::Recovery::AutoSave::*.

This change restores the intended use, and deprecates corresponding
values in /org.openoffice.Office.Common/Save/Document.

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

diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 2772c6d60944..743c6015b1d5 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -475,8 +475,8 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
 
m_xBackupCB->set_active(officecfg::Office::Common::Save::Document::CreateBackup::get());
 
m_xBackupCB->set_sensitive(!officecfg::Office::Common::Save::Document::CreateBackup::isReadOnly());
 
-
m_xAutoSaveCB->set_active(officecfg::Office::Common::Save::Document::AutoSave::get());
-
m_xAutoSaveCB->set_sensitive(!officecfg::Office::Common::Save::Document::AutoSave::isReadOnly());
+
m_xAutoSaveCB->set_active(officecfg::Office::Recovery::AutoSave::Enabled::get());
+
m_xAutoSaveCB->set_sensitive(!officecfg::Office::Recovery::AutoSave::Enabled::isReadOnly());
 
 
m_xUserAutoSaveCB->set_active(officecfg::Office::Recovery::AutoSave::UserAutoSaveEnabled::get());
 
m_xUserAutoSaveCB->set_sensitive(!officecfg::Office::Recovery::AutoSave::UserAutoSaveEnabled::isReadOnly());
@@ -484,8 +484,8 @@ void SvxSaveTabPage::Reset( const SfxItemSet* )
 
m_xWarnAlienFormatCB->set_active(officecfg::Office::Common::Save::Document::WarnAlienFormat::get());
 
m_xWarnAlienFormatCB->set_sensitive(!officecfg::Office::Common::Save::Document::WarnAlienFormat::isReadOnly());
 
-
m_xAutoSaveEdit->set_value(officecfg::Office::Common::Save::Document::AutoSaveTimeIntervall::get());
-
m_xAutoSaveEdit->set_sensitive(!officecfg::Office::Common::Save::Document::AutoSaveTimeIntervall::isReadOnly());
+
m_xAutoSaveEdit->set_value(officecfg::Office::Recovery::AutoSave::TimeIntervall::get());
+
m_xAutoSaveEdit->set_sensitive(!officecfg::Office::Recovery::AutoSave::TimeIntervall::isReadOnly());
 
 // save relatively
 
m_xRelativeFsysCB->set_active(officecfg::Office::Common::Save::URL::FileSystem::get());
diff --git a/framework/source/services/autorecovery.cxx 
b/framework/source/services/autorecovery.cxx
index 07ea3184476f..a1a984e7617e 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -386,11 +386,6 @@ private:
 bool m_bListenForDocEvents;
 bool m_bListenForConfigChanges;
 
-/** @short  specify the time interval between two save actions.
-@descr  tools::Time 

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

2023-07-17 Thread Mike Kaganski (via logerrit)
 sfx2/source/appl/appcfg.cxx |  542 ++--
 1 file changed, 183 insertions(+), 359 deletions(-)

New commits:
commit ca460e654a1ee17d755cff6943f07bfa88da9a27
Author: Mike Kaganski 
AuthorDate: Mon Jul 17 19:39:02 2023 +0200
Commit: Mike Kaganski 
CommitDate: Mon Jul 17 22:21:50 2023 +0200

Simplify a bit

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

diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 41603134a225..3c8fe3c124f6 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -106,246 +107,156 @@ IMPL_LINK(SfxEventAsyncer_Impl, IdleHdl, Timer*, 
pAsyncIdle, void)
 delete this;
 }
 
-
-void SfxApplication::GetOptions( SfxItemSet& rSet )
+namespace
+{
+template  bool toSet(SfxItemSet& rSet, 
TypedWhichId wid)
 {
-bool bRet = false;
+return rSet.Put(Item(wid, Cfg::get()));
+}
+template 
+bool toSet_withDefault(SfxItemSet& rSet, TypedWhichId wid, Val&& defVal)
+{
+return rSet.Put(Item(wid, Cfg::get().value_or(std::move(defVal;
+}
+template  bool toSet_ifRW(SfxItemSet& rSet, 
TypedWhichId wid)
+{
+return Cfg::isReadOnly() || toSet(rSet, wid);
+}
 
-const WhichRangesContainer& pRanges = rSet.GetRanges();
+template 
+void toCfg_ifSet(const SfxItemSet& rSet, TypedWhichId wid,
+ std::shared_ptr const& 
batch)
+{
+if (const auto* pItem = rSet.GetItemIfSet(wid))
+Cfg::set(pItem->GetValue(), batch);
+}
+}
 
-for (auto const & pRange : pRanges)
+void SfxApplication::GetOptions( SfxItemSet& rSet )
+{
+SfxWhichIter iter(rSet);
+for (auto nWhich = iter.FirstWhich(); nWhich; nWhich = iter.NextWhich())
 {
-for(sal_uInt16 nWhich = pRange.first; nWhich <= pRange.second; 
++nWhich)
+bool bRet = false;
+switch(nWhich)
 {
-switch(nWhich)
-{
-case SID_ATTR_BUTTON_BIGSIZE :
+case SID_ATTR_BUTTON_BIGSIZE:
+if( rSet.Put( SfxBoolItem( SID_ATTR_BUTTON_BIGSIZE, 
SvtMiscOptions::AreCurrentSymbolsLarge() ) ) )
+bRet = true;
+break;
+case SID_ATTR_BACKUP:
+bRet = true;
+if 
(!officecfg::Office::Common::Save::Document::CreateBackup::isReadOnly())
+if (!rSet.Put( SfxBoolItem( SID_ATTR_BACKUP,
+
(officecfg::Office::Common::Save::Document::CreateBackup::get() && 
!comphelper::LibreOfficeKit::isActive()) )))
+bRet = false;
+break;
+case SID_ATTR_PRETTYPRINTING:
+bRet = 
toSet_ifRW(
+rSet, SID_ATTR_PRETTYPRINTING);
+break;
+case SID_ATTR_WARNALIENFORMAT:
+bRet = 
toSet_ifRW(
+rSet, SID_ATTR_WARNALIENFORMAT);
+break;
+case SID_ATTR_AUTOSAVE:
+bRet = 
toSet_ifRW(
+rSet, SID_ATTR_AUTOSAVE);
+break;
+case SID_ATTR_AUTOSAVEPROMPT:
+bRet = 
toSet_ifRW(
+rSet, SID_ATTR_AUTOSAVEPROMPT);
+break;
+case SID_ATTR_AUTOSAVEMINUTE:
+bRet = 
toSet_ifRW(
+rSet, SID_ATTR_AUTOSAVEMINUTE);
+break;
+case SID_ATTR_USERAUTOSAVE:
+bRet = 
toSet_ifRW(
+rSet, SID_ATTR_USERAUTOSAVE);
+break;
+case SID_ATTR_DOCINFO:
+bRet = 
toSet_ifRW(
+rSet, SID_ATTR_DOCINFO);
+break;
+case SID_ATTR_WORKINGSET:
+bRet = toSet_ifRW(
+rSet, SID_ATTR_WORKINGSET);
+break;
+case SID_ATTR_SAVEDOCVIEW:
+bRet = 
toSet_ifRW(
+rSet, SID_ATTR_SAVEDOCVIEW);
+break;
+case SID_ATTR_METRIC:
+break;
+case SID_HELPBALLOONS:
+bRet = 
toSet(rSet, SID_HELPBALLOONS);
+break;
+case SID_HELPTIPS :
+bRet = toSet(rSet, 
SID_HELPTIPS);
+break;
+case SID_HELP_STYLESHEET:
+bRet = 
toSet(rSet,
+  
SID_HELP_STYLESHEET);
+break;
+case SID_ATTR_UNDO_COUNT:
+bRet = toSet(rSet, 
SID_ATTR_UNDO_COUNT);
+break;
+case SID_ATTR_QUICKLAUNCHER:
+if ( ShutdownIcon::IsQuickstarterInstalled() )
 {
-if( rSet.Put( SfxBoolItem( SID_ATTR_BUTTON_BIGSIZE, 
SvtMiscOptions::AreCurrentSymbolsLa

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

2023-07-17 Thread Stephan Bergmann (via logerrit)
 external/clucene/patches/binary_function.patch |   23 +++
 1 file changed, 23 insertions(+)

New commits:
commit 39927fa6a9744b89b8ddf3abed0fd905510a9675
Author: Stephan Bergmann 
AuthorDate: Mon Jul 17 17:11:37 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Jul 17 23:21:02 2023 +0200

external/clucene: More uses of obsolete std::binary_function

...as seen at least when building against VS 2022 Preview 17.7.0 Preview 
3.0 and
--with-latest-c++,

> workdir\UnpackedTarball\clucene\src\core\CLucene/util/_Arrays.h(128): 
error C2039: 'binary_function': is not a member of 'std'
> 
C:\PROGRA~1\MICROS~3\2022\Preview\VC\Tools\MSVC\1437~1.328\Include\vector(26): 
note: see declaration of 'std'
> workdir\UnpackedTarball\clucene\src\core\CLucene/util/_Arrays.h(153): 
note: see reference to class template instantiation 
'lucene::util::CLListEquals<_kt,_comparator,class1,class2>' being compiled

etc.

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

diff --git a/external/clucene/patches/binary_function.patch 
b/external/clucene/patches/binary_function.patch
index 5b6f8ece9bee..a7e4b867d0c7 100644
--- a/external/clucene/patches/binary_function.patch
+++ b/external/clucene/patches/binary_function.patch
@@ -1,3 +1,26 @@
+--- src/core/CLucene/search/BooleanQuery.cpp
 src/core/CLucene/search/BooleanQuery.cpp
+@@ -25,7 +25,7 @@
+ CL_NS_USE(util)
+ CL_NS_DEF(search)
+ 
+-  class BooleanClause_Compare:public CL_NS_STD(binary_function)
++  class BooleanClause_Compare
+   {
+   public:
+   bool operator()( const BooleanClause* val1, const 
BooleanClause* val2 ) const {
+--- src/core/CLucene/util/_Arrays.h
 src/core/CLucene/util/_Arrays.h
+@@ -124,8 +124,7 @@
+   
+   template 
+-  class CLListEquals:
+-  public CL_NS_STD(binary_function)
++  class CLListEquals
+   {
+   typedef typename class1::const_iterator _itr1;
+   typedef typename class2::const_iterator _itr2;
 --- src/core/CLucene/util/Equators.h
 +++ src/core/CLucene/util/Equators.h
 @@ -22,19 +22,19 @@


Transition of already implemented features to ODF 1.4

2023-07-17 Thread Regina Henschel

Hi all,

I'm going to add the topic "Transition of already implemented features 
to ODF 1.4" to https://wiki.documentfoundation.org/Development/Budget2024


For that the RNG schemas have to be adapted to ODF 1.4 before. Should I 
include that in the above item or should that become a separate item or 
will that be done by TDF stuff?


Kind regards,
Regina



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

2023-07-17 Thread Andrea Gelmini (via logerrit)
 sc/source/core/data/table2.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7120a54129804d08b7ea0594ffcebe3e28dd5064
Author: Andrea Gelmini 
AuthorDate: Fri Jun 9 21:13:56 2023 +0200
Commit: László Németh 
CommitDate: Mon Jul 17 23:57:06 2023 +0200

Fix typo

Change-Id: I93f8dc6746a9173847e96f1ba16e5fdc4a817ced
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152804
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 
(cherry picked from commit 97a4e4582698c74fa4fa5c2fed3cd48d4c66da8b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154537
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index b35caa7459bb..ee65a31ab6bf 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -400,7 +400,7 @@ void ScTable::DeleteCol(
 {
 for (SCCOL nCol = nStartCol + nSize; nCol < aCol.size(); ++nCol)
 aCol[nCol].SwapCol(aCol[nCol - nSize]);
-// When delete column(s), inicialize the last columns from the default 
attributes
+// When delete column(s), initialize the last columns from the default 
attributes
 for (SCCOL nCol = aCol.size() - nSize; nCol < aCol.size(); ++nCol)
 aCol[nCol].Init(nCol, aCol[nCol].GetTab(), rDocument, false);
 }


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

2023-07-17 Thread László Németh (via logerrit)
 sc/source/core/data/table2.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2198fd843b71ea6c8152f882b107eac7b3edd647
Author: László Németh 
AuthorDate: Fri Jul 14 18:41:31 2023 +0200
Commit: László Németh 
CommitDate: Mon Jul 17 23:57:33 2023 +0200

tdf#156286 sc: fix crash with column deletion

Skip negative indices, which caused the crash, when
more columns were deleted, than the remaining columns
before them.

Regression from commit dd8e061406fac581d399da088c7f0187278035dc
"tdf#153437 sc: fix broken formatting without performance regression".

Change-Id: I223e2fbb321fc4bd2ddb7a67a16a64c69e1e7872
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154445
Reviewed-by: Czeber László 
Tested-by: Jenkins
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit e4ae409b8e57f5efe53af7bacd08b0d226a0d96f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154538

diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index ee65a31ab6bf..027e2b424544 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -401,7 +401,7 @@ void ScTable::DeleteCol(
 for (SCCOL nCol = nStartCol + nSize; nCol < aCol.size(); ++nCol)
 aCol[nCol].SwapCol(aCol[nCol - nSize]);
 // When delete column(s), initialize the last columns from the default 
attributes
-for (SCCOL nCol = aCol.size() - nSize; nCol < aCol.size(); ++nCol)
+for (SCCOL nCol = aCol.size() < static_cast(nSize) ? 0 : 
aCol.size() - nSize; nCol < aCol.size(); ++nCol)
 aCol[nCol].Init(nCol, aCol[nCol].GetTab(), rDocument, false);
 }
 else


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

2023-07-17 Thread Justin Luth (via logerrit)
 sfx2/source/view/viewfrm.cxx |   18 --
 1 file changed, 16 insertions(+), 2 deletions(-)

New commits:
commit ef1484c731140699f26d15f4cda36f1a81e73abe
Author: Justin Luth 
AuthorDate: Fri Jul 7 13:53:01 2023 -0400
Commit: Justin Luth 
CommitDate: Tue Jul 18 00:00:15 2023 +0200

Revert "Revert "tdf#126006 sc SID_RELOAD: restart notebookbar""

This reverts commit d0bbc16b1715a3711d872a36c7e525e8d3811669.

My laptop is failing to complete UITests all the time,
so likely this patch wasn't to blame after all.

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

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 196a18d3d335..0766eec86088 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -838,8 +838,18 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
 
 UpdateDocument_Impl();
 
-if 
(vcl::CommandInfoProvider::GetModuleIdentifier(GetFrame().GetFrameInterface()) 
== "com.sun.star.text.TextDocument")
-
sfx2::SfxNotebookBar::ReloadNotebookBar(u"modules/swriter/ui/");
+auto sModule = 
vcl::CommandInfoProvider::GetModuleIdentifier(GetFrame().GetFrameInterface());
+OUString sReloadNotebookBar;
+if (sModule == "com.sun.star.text.TextDocument")
+sReloadNotebookBar = u"modules/swriter/ui/";
+else if (sModule == 
"com.sun.star.sheet.SpreadsheetDocument")
+sReloadNotebookBar = u"modules/scalc/ui/";
+else if (sfx2::SfxNotebookBar::IsActive()
+ && sModule != "presentation.PresentationDocument"
+ && sModule != 
"com.sun.star.drawing.DrawingDocument")
+{
+assert(false && "SID_RELOAD Notebookbar active, but 
not refreshed here");
+}
 
 try
 {
@@ -878,6 +888,10 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
 
 // Propagate document closure.
 SfxGetpApp()->NotifyEvent( SfxEventHint( 
SfxEventHintId::CloseDoc, GlobalEventConfig::GetEventName( 
GlobalEventId::CLOSEDOC ), xOldObj ) );
+
+// tdf#126006 Calc needs to reload the notebookbar after 
closing the document
+if (!sReloadNotebookBar.isEmpty())
+
sfx2::SfxNotebookBar::ReloadNotebookBar(sReloadNotebookBar);
 }
 
 // Record as done


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

2023-07-17 Thread Justin Luth (via logerrit)
 include/svx/sidebar/ValueSetWithTextControl.hxx  |1 +
 svx/source/sidebar/tools/ValueSetWithTextControl.cxx |9 +
 sw/source/uibase/sidebar/PageSizeControl.cxx |1 +
 3 files changed, 11 insertions(+)

New commits:
commit 1876feb8a8805b2f80537e2828c152ccbdf67fe2
Author: Justin Luth 
AuthorDate: Mon Jul 10 15:27:29 2023 -0400
Commit: Justin Luth 
CommitDate: Tue Jul 18 01:22:41 2023 +0200

tdf#136905 NBB: let ValueSetWithTextControl set optimal height

There was no way to specify a "good font size" to use
for .uno:AttributePageSize in the notebookbar.
The font "resized to match to size of the box"
which is hard-coded to aSize(250, 300).

(Even if ValueSet::SetOptimalSize worked, it would set an
inadequate height.)

So it seems like the best thing to do is simply add a function
that allows the box height to be modified.

Using the fontsize from GetDefaultFont is not correct.
Use the OS-defined label font size instead, which seems to be
the most common choice - GetPushButtonFont would has also worked.

I verified that the label font size is controled by
the OS' font preference.

The ability to define the box's optimal height
is still (somewhat) necessary. It isn't good enough
to just "use the system font size".
I tested with an OS font size of 48 (instead of 11),
and in that case the box height was too small
(but with the font only using 4/9's of a 12pt space,
even a 24pt font looked OK without adjusting optimal height).

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

diff --git a/include/svx/sidebar/ValueSetWithTextControl.hxx 
b/include/svx/sidebar/ValueSetWithTextControl.hxx
index ac397f9fdab6..407e9606757f 100644
--- a/include/svx/sidebar/ValueSetWithTextControl.hxx
+++ b/include/svx/sidebar/ValueSetWithTextControl.hxx
@@ -40,6 +40,7 @@ public:
 
 SVX_DLLPRIVATE virtual void SetDrawingArea(weld::DrawingArea* 
pDrawingArea) override;
 
+void SetOptimalDrawingAreaHeight();
 void AddItem(const OUString& rItemText, const OUString& rItemText2);
 
 SVX_DLLPRIVATE virtual void UserDraw(const UserDrawEvent& rUDEvt) override;
diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx 
b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
index 1b6ca2d42979..77b260272264 100644
--- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
+++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
@@ -43,6 +43,15 @@ void 
ValueSetWithTextControl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
 SetColCount();
 }
 
+void ValueSetWithTextControl::SetOptimalDrawingAreaHeight()
+{
+const vcl::Font 
aFont(Application::GetSettings().GetStyleSettings().GetLabelFont());
+const sal_Int32 nRowHeight = aFont.GetFontSize().Height() * 9 / 4; // see 
UserDraw()
+const Size aSize(GetOutputSizePixel().Width(), nRowHeight * 
maItems.size());
+GetDrawingArea()->set_size_request(aSize.Width(), aSize.Height());
+SetOutputSizePixel(aSize);
+}
+
 void ValueSetWithTextControl::AddItem(
 const OUString& rItemText,
 const OUString& rItemText2 )
diff --git a/sw/source/uibase/sidebar/PageSizeControl.cxx 
b/sw/source/uibase/sidebar/PageSizeControl.cxx
index 211ebece9e5e..a85848ad753d 100644
--- a/sw/source/uibase/sidebar/PageSizeControl.cxx
+++ b/sw/source/uibase/sidebar/PageSizeControl.cxx
@@ -165,6 +165,7 @@ PageSizeControl::PageSizeControl(PageSizePopup* pControl, 
weld::Widget* pParent)
 }
 mxSizeValueSet->SetNoSelection();
 mxSizeValueSet->SetSelectHdl( LINK(this, PageSizeControl, ImplSizeHdl ) );
+mxSizeValueSet->SetOptimalDrawingAreaHeight();
 mxSizeValueSet->Show();
 mxSizeValueSet->Resize();
 


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

2023-07-17 Thread Justin Luth (via logerrit)
 sd/uiconfig/sdraw/ui/notebookbar.ui|   67 +++--
 sd/uiconfig/simpress/ui/notebookbar.ui |   67 +++--
 2 files changed, 32 insertions(+), 102 deletions(-)

New commits:
commit 1de07de0cb063760474df70d0e4b6a7976ac2a8a
Author: Justin Luth 
AuthorDate: Mon Jul 17 16:40:03 2023 -0400
Commit: Justin Luth 
CommitDate: Tue Jul 18 02:26:57 2023 +0200

related tdf#126095 sd notebookbar: give room to .uno:AVMediaToolBox

There are lots of controls on the media player (like mute, position etc)
that are obviously not accessible if the control is squished to a small 
size.

Giving full access is especially important if we do not show
the extra toolbar, but depend on this notebookbar context switch.

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

diff --git a/sd/uiconfig/sdraw/ui/notebookbar.ui 
b/sd/uiconfig/sdraw/ui/notebookbar.ui
index e95a36ed176b..ea430f492fb3 100644
--- a/sd/uiconfig/sdraw/ui/notebookbar.ui
+++ b/sd/uiconfig/sdraw/ui/notebookbar.ui
@@ -14860,66 +14860,31 @@
   
 
 
-  
+
+148
 True
-False
-vertical
-
-  
-148
-True
-True
-False
-
-  
-True
-.uno:AVMediaToolBox
-  
-  
-False
-True
-  
-
-  
-  
-False
-True
-0
-  
-
+True
+False
 
-  
+
 True
-True
-both-horiz
-False
-
-  
-True
-.uno:AVMediaPlayer
-  
-  
-False
-True
-  
-
-  
-  
+.uno:AVMediaToolBox
+
+
 False
-True
-1
-  
+True
+
 
-  
-  
-False
+
+
+True
 True
-1
-  
+0
+
 
   
   
-False
+True
 True
 1
   
diff --git a/sd/uiconfig/simpress/ui/notebookbar.ui 
b/sd/uiconfig/simpress/ui/notebookbar.ui
index 5f4a85dc0d21..3e761fd8a2f9 100644
--- a/sd/uiconfig/simpress/ui/notebookbar.ui
+++ b/sd/uiconfig/simpress/ui/notebookbar.ui
@@ -14881,66 +14881,31 @@
   
 
 
-  
+
+148
 True
-False
-vertical
-
-  
-148
-True
-True
-False
-
-  
-True
-.uno:AVMediaToolBox
-  
-   

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

2023-07-17 Thread Justin Luth (via logerrit)
 sd/source/ui/view/ToolBarManager.cxx |   66 +++
 1 file changed, 36 insertions(+), 30 deletions(-)

New commits:
commit e58e251756ecb0312cb6891d4df23e17ef8f6fcb
Author: Justin Luth 
AuthorDate: Mon Jul 17 15:43:39 2023 -0400
Commit: Justin Luth 
CommitDate: Tue Jul 18 02:33:24 2023 +0200

tdf#126095 sd notebookbar: don't force table/media toolbar

Perhaps the entire function could return early
in case the notebookbar is active, but only if all of them
have a context notebookbar tab.
Some of them I can't check since I don't know how to trigger them.

Images, media, and tables all do have a context bar.
(Media's bar is missing useful things like location, mute,
and even file-location path.
(Those will come separately in another commit.)

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

diff --git a/sd/source/ui/view/ToolBarManager.cxx 
b/sd/source/ui/view/ToolBarManager.cxx
index edd39c73110b..0db84b25a3b4 100644
--- a/sd/source/ui/view/ToolBarManager.cxx
+++ b/sd/source/ui/view/ToolBarManager.cxx
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1043,42 +1044,47 @@ void ToolBarRules::SelectionHasChanged (
 
 mpToolBarManager->ResetToolBars(ToolBarManager::ToolBarGroup::Function);
 
-switch (rView.GetContext())
+if (!sfx2::SfxNotebookBar::IsActive())
 {
-case SdrViewContext::Graphic:
-if( !bTextEdit )
-
mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function, 
ToolbarId::Draw_Graf_Toolbox);
-break;
+switch (rView.GetContext())
+{
+case SdrViewContext::Graphic:
+if (!bTextEdit)
+
mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function,
+  
ToolbarId::Draw_Graf_Toolbox);
+break;
 
-case SdrViewContext::Media:
-if( !bTextEdit )
-
mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function, 
ToolbarId::Draw_Media_Toolbox);
-break;
+case SdrViewContext::Media:
+if (!bTextEdit)
+
mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function,
+  
ToolbarId::Draw_Media_Toolbox);
+break;
 
-case SdrViewContext::Table:
-
mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function, 
ToolbarId::Draw_Table_Toolbox);
-bTextEdit = true;
-break;
+case SdrViewContext::Table:
+
mpToolBarManager->SetToolBarShell(ToolBarManager::ToolBarGroup::Function,
+  
ToolbarId::Draw_Table_Toolbox);
+bTextEdit = true;
+break;
 
-case SdrViewContext::Standard:
-default:
-if( !bTextEdit )
-{
-switch(rViewShell.GetShellType())
+case SdrViewContext::Standard:
+default:
+if (!bTextEdit)
 {
-case ::sd::ViewShell::ST_IMPRESS:
-case ::sd::ViewShell::ST_DRAW:
-case ::sd::ViewShell::ST_NOTES:
-case ::sd::ViewShell::ST_HANDOUT:
-mpToolBarManager->SetToolBar(
-ToolBarManager::ToolBarGroup::Function,
-ToolBarManager::msDrawingObjectToolBar);
-break;
-default:
-break;
+switch(rViewShell.GetShellType())
+{
+case ::sd::ViewShell::ST_IMPRESS:
+case ::sd::ViewShell::ST_DRAW:
+case ::sd::ViewShell::ST_NOTES:
+case ::sd::ViewShell::ST_HANDOUT:
+
mpToolBarManager->SetToolBar(ToolBarManager::ToolBarGroup::Function,
+ 
ToolBarManager::msDrawingObjectToolBar);
+break;
+default:
+break;
+}
+break;
 }
-break;
-}
+}
 }
 
 if( bTextEdit )


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

2023-07-17 Thread Justin Luth (via logerrit)
 svx/source/sidebar/tools/ValueSetWithTextControl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6256d5fe2e7cb1bb002d5fe59527d3a3fbf6963f
Author: Justin Luth 
AuthorDate: Mon Jul 10 15:27:29 2023 -0400
Commit: Justin Luth 
CommitDate: Tue Jul 18 02:40:08 2023 +0200

tdf#136905 NBB: use label font in ValueSetWithTextControl

The label font is taken from the system settings,
and doing this matched the "more options" button font
as well as the nearby "margins" and "columns"
as well as pretty much everything else in the notebookbar.

I tested this by changing "Font Selection" in my Ubuntu Cinnamon
to a flowery font. Prior to the patch it was a normalish font,
but after the change it was using the flowery font.

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

diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx 
b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
index 77b260272264..91cea51325e6 100644
--- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
+++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
@@ -75,7 +75,7 @@ void ValueSetWithTextControl::UserDraw( const UserDrawEvent& 
rUDEvt )
 
 const tools::Long nRectHeight = aRect.GetHeight();
 
-vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, 
MsLangId::getConfiguredSystemLanguage(), GetDefaultFontFlags::OnlyOne));
+vcl::Font 
aFont(Application::GetSettings().GetStyleSettings().GetLabelFont());
 {
 Size aSize = aFont.GetFontSize();
 aSize.setHeight( (nRectHeight*4)/9 );


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

2023-07-17 Thread Aron Budea (via logerrit)
 vcl/skia/gdiimpl.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4202dfcae19ee47e9a3fda02fac34c18cb0d16ff
Author: Aron Budea 
AuthorDate: Sun Jul 16 17:25:55 2023 +0200
Commit: Tomaž Vajngerl 
CommitDate: Tue Jul 18 06:50:30 2023 +0200

tdf#155661 Apply border from center point not from whole size

Regression from 6965bb07bb33429a7663a3f3ebe58ed89c4327d9
and 8b8a988f38b704e466211bb91a3269756c34222b.

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

diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 3c0957be4806..45f3fc1c1b97 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -2049,8 +2049,8 @@ bool SkiaSalGraphicsImpl::drawGradient(const 
tools::PolyPolygon& rPolyPolygon,
   SkPoint::Make(toSkX(aPoly[1].X()), 
toSkY(aPoly[1].Y())) };
 SkColor colors[3] = { endColor, startColor, endColor };
 SkScalar border = SkDoubleToScalar(aGradient.GetBorder() / 100.0);
-SkScalar pos[3]
-= { std::min(border, 0.5), 0.5, std::max(1 - 
border, 0.5) };
+SkScalar pos[3] = { std::min(border * 0.5f, 0.5f), 0.5f,
+std::max(1 - border * 0.5f, 0.5f) };
 shader = SkGradientShader::MakeLinear(points, colors, pos, 3, 
SkTileMode::kClamp);
 }
 else


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

2023-07-17 Thread Mike Kaganski (via logerrit)
 configmgr/source/broadcaster.cxx |   25 -
 configmgr/source/broadcaster.hxx |3 ++-
 configmgr/source/rootaccess.cxx  |2 +-
 3 files changed, 19 insertions(+), 11 deletions(-)

New commits:
commit 8e9b3abce97f6ec1851cb7e3464e63107fad2793
Author: Mike Kaganski 
AuthorDate: Tue Jul 18 00:28:41 2023 +0300
Commit: Mike Kaganski 
CommitDate: Tue Jul 18 06:54:47 2023 +0200

Make sure that root listeners are notified first

The problem appeared when in a configuration listener's changesOccurred,
a configuration value was read using officecfg machinery, which could
return the old value of the configuration, or an updated one, at random.

This was caused by use of a cached value in
comphelper::detail::ConfigurationWrapper::getPropertyValue, which is
cleaned in ConfigurationChangesListener::changesOccurred; but the order
in which the listeners' changesOccurred methods were called depended on
the implementation detail of configmgr::Components::roots_, which was
previously a std::set of pointers, and now is a sorted vector. This
made the pointers sorted in order of the pointers' addresses (basically
random), and when a broadcaster's common list of change listeners was
prepared in Components::initGlobalBroadcaster, ConfigurationWrapper's
listener could arrive last. This meant, that the cache could be cleaned
too late, after its obsolete content was already used in a previous
listener.

The problem could be partially mitigated by clearing the cache in the
comphelper::detail::ConfigurationWrapper::setPropertyValue, but that
would only handle cases of config modifications using comphelper.

Instead, take into account that ConfigurationWrapper listens on the
root of configuration tree; and introduce a separate container in
configmgr::Broadcaster for root listeners. They would be triggered
first, before all other listeners.

Still, this would not guarantee the proper order, if another listener
is registered on root. To handle all cases, a special listener category
could be used, which could be filled using a dedicated internal API, so
comphelper could use it to register its privileged listener close to
the heart of the broadcaster :) This might be implemented later.

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

diff --git a/configmgr/source/broadcaster.cxx b/configmgr/source/broadcaster.cxx
index 03bcf8f273de..365e25f9eb02 100644
--- a/configmgr/source/broadcaster.cxx
+++ b/configmgr/source/broadcaster.cxx
@@ -97,9 +97,12 @@ void Broadcaster::addPropertiesChangeNotification(
 
 void Broadcaster::addChangesNotification(
 css::uno::Reference< css::util::XChangesListener > const & listener,
-css::util::ChangesEvent const & event)
+css::util::ChangesEvent const & event, bool bRootListener)
 {
-changesNotifications_.emplace_back(listener, event);
+if (bRootListener)
+rootChangesNotifications_.emplace_back(listener, event);
+else
+changesNotifications_.emplace_back(listener, event);
 }
 
 void Broadcaster::send() {
@@ -164,13 +167,17 @@ void Broadcaster::send() {
 appendMessage(messages, e);
 }
 }
-for (auto& rNotification : changesNotifications_) {
-try {
-rNotification.listener->changesOccurred(rNotification.event);
-} catch (css::lang::DisposedException &) {
-} catch (css::uno::Exception & e) {
-exception = cppu::getCaughtException();
-appendMessage(messages, e);
+// First root listeners, then the rest
+for (const auto& container : { rootChangesNotifications_ , 
changesNotifications_})
+{
+for (auto& rNotification : container) {
+try {
+rNotification.listener->changesOccurred(rNotification.event);
+} catch (css::lang::DisposedException &) {
+} catch (css::uno::Exception & e) {
+exception = cppu::getCaughtException();
+appendMessage(messages, e);
+}
 }
 }
 if (exception.hasValue()) {
diff --git a/configmgr/source/broadcaster.hxx b/configmgr/source/broadcaster.hxx
index d0c461e731d8..711e7a83bd9e 100644
--- a/configmgr/source/broadcaster.hxx
+++ b/configmgr/source/broadcaster.hxx
@@ -72,7 +72,7 @@ public:
 
 void addChangesNotification(
 css::uno::Reference< css::util::XChangesListener > const & listener,
-css::util::ChangesEvent const & event);
+css::util::ChangesEvent const & event, bool bRootListener);
 
 void send();
 
@@ -131,6 +131,7 @@ private:
 std::vector< ContainerNotification > 
containerElementReplacedNotifications_;
 std::vector< PropertyChangeNotification > propertyChangeNotifications_;
 std::vector< PropertiesChan

[Help] Exception occurred, When debugging LibreOffice by VS Code on ubuntu (gnome desktop) . can't debug by vscode nomally.

2023-07-17 Thread 赵 晓东
[ENV]
OS: Ubuntu 22.04.2 LTS
LibreOffice: 7.5.5.1
VS Code: 1.80.1

[Compile Command]
./autogen.sh --enable-debug  --disable-ldap
make

[GDB Debug is OK]
make debug
run --writer

[When running libreoffice on VS Code terminal, exception occurred]
it@it-hp-desktop02:~/dev/libreoffice_dev/libreoffice-7.5.5.1$ 
./instdir/program/soffice
/home/it/dev/libreoffice_dev/libreoffice-7.5.5.1/instdir/program/soffice.bin: 
symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: 
undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE

[When debugging by VS Code, exception occurred]

Thread 1 "soffice.bin" hit Breakpoint 4, InitVCL () at 
/home/it/dev/libreoffice_dev/libreoffice-7.5.5.1/vcl/source/app/svmain.cxx:357
357   pSVData->mpDefInst->AfterAppInit();
Loaded 
'/home/it/dev/libreoffice_dev/libreoffice-7.5.5.1/instdir/program/libvclplug_gtk3lo.so'.
 Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libgtk-3.so.0'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libgdk-3.so.0'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libpango-1.0.so.0'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libatk-1.0.so.0'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libXi.so.6'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libXfixes.so.3'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libcairo-gobject.so.2'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libepoxy.so.0'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libfribidi.so.0'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libharfbuzz.so.0'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libXinerama.so.1'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libXrandr.so.2'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libXcursor.so.1'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libXcomposite.so.1'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libXdamage.so.1'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libxkbcommon.so.0'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libwayland-cursor.so.0'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libwayland-egl.so.1'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libwayland-client.so.0'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libthai.so.0'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libjpeg.so.8'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libatspi.so.0'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libgraphite2.so.3'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libdatrie.so.1'. Symbols loaded.
Loaded 
'/home/it/dev/libreoffice_dev/libreoffice-7.5.5.1/instdir/program/libgcc3_uno.so'.
 Symbols loaded.
Loaded 
'/home/it/dev/libreoffice_dev/libreoffice-7.5.5.1/instdir/program/../program/libconfigmgrlo.so'.
 Symbols loaded.
Loaded 
'/home/it/dev/libreoffice_dev/libreoffice-7.5.5.1/instdir/program/../program/liblocalebe1lo.so'.
 Symbols loaded.
Thread 1 "soffice.bin" hit Breakpoint 2, GtkSalData::Init (this=0x555ee330) 
at /home/it/dev/libreoffice_dev/libreoffice-7.5.5.1/vcl/unx/gtk3/gtkdata.cxx:544
544gtk_init_check( &nParams, &pCmdLineAry );
[Thread 0x7fffe66d6640 (LWP 8690) exited]
=library-unloaded,id="/home/it/snap/code/common/.cache/gio-modules/libgiolibproxy.so",target-name="/home/it/snap/code/common/.cache/gio-modules/libgiolibproxy.so",host-name="/home/it/snap/code/common/.cache/gio-modules/libgiolibproxy.so",thread-group="i1"
=library-unloaded,id="/lib/x86_64-linux-gnu/libproxy.so.1",target-name="/lib/x86_64-linux-gnu/libproxy.so.1",host-name="/lib/x86_64-linux-gnu/libproxy.so.1",thread-group="i1"
[Thread 0x7fffefbd7100 (LWP 8609) exited]
[Thread 0x7fffe5ed5640 (LWP 8691) exited]
[New process 8609]
[Inferior 1 (process 8609) exited with code 0177]
The program 
'/home/it/dev/libreoffice_dev/libreoffice-7.5.5.1/instdir/program/soffice.bin' 
has exited with code 177 (0x00b1).






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

2023-07-17 Thread Miklos Vajna (via logerrit)
 sw/inc/fmtftn.hxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit de9aeed35461b0884c55318519333070b7726c2b
Author: Miklos Vajna 
AuthorDate: Mon Jul 17 20:10:04 2023 +0200
Commit: Miklos Vajna 
CommitDate: Tue Jul 18 08:05:06 2023 +0200

sw: document SwFormatFootnote

Explain this is just the anchor side, the content side is described by
the SwTextFootnote around us.

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

diff --git a/sw/inc/fmtftn.hxx b/sw/inc/fmtftn.hxx
index a34b2b83b482..009b75c3f98f 100644
--- a/sw/inc/fmtftn.hxx
+++ b/sw/inc/fmtftn.hxx
@@ -39,6 +39,8 @@ class SwXFootnote;
 
 // ATT_FTN
 
+/// SfxPoolItem subclass for footnotes and endnotes, stored in the anchor text 
node. The start node
+/// for the footnote content is defined by m_pTextAttr.
 class SW_DLLPUBLIC SwFormatFootnote final
 : public SfxPoolItem
 , public sw::BroadcastingModify


[Libreoffice-commits] core.git: solenv/gbuild

2023-07-17 Thread Stephan Bergmann (via logerrit)
 solenv/gbuild/platform/com_MSC_defs.mk |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 33eb52e005eb67856137475ff761ce4df006bd57
Author: Stephan Bergmann 
AuthorDate: Mon Jul 17 17:16:03 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Jul 18 08:14:20 2023 +0200

MSVC: Silence C++23 std::numeric_limits::has_denorm deprecation warning

...as seen at least when building against VS 2022 Preview 17.7.0 Preview 
3.0 and
--with-latest-c++,

> [build CXX] connectivity/source/commontools/RowFunctionParser.cxx
> 
workdir\UnpackedTarball\boost\boost/spirit/home/classic/core/primitives/impl/numerics.ipp(199):
 error C2220: the following warning is treated as an error
> 
workdir\UnpackedTarball\boost\boost/spirit/home/classic/core/primitives/impl/numerics.ipp(199):
 warning C4996: 'std::_Num_base::has_denorm': warning STL4042: 
std::float_denorm_style, std::numeric_limits::has_denorm, and 
std::numeric_limits::has_denorm_loss are deprecated in C++23. You can define 
_SILENCE_CXX23_DENORM_DEPRECATION_WARNING or 
_SILENCE_ALL_CXX23_DEPRECATION_WARNINGS to suppress this warning.
> 
workdir\UnpackedTarball\boost\boost/spirit/home/classic/core/primitives/impl/numerics.ipp(193):
 note: while compiling class template member function 'bool 
boost::spirit::classic::impl::negative_accumulate::add(T &,T)'
> with
> [
> T=int
> ]
[...]

etc.

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

diff --git a/solenv/gbuild/platform/com_MSC_defs.mk 
b/solenv/gbuild/platform/com_MSC_defs.mk
index ad425e9b5fdd..407ca991007d 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -40,6 +40,11 @@ ifneq ($(origin CXX),default)
 gb_CXX := $(CXX)
 endif
 
+# _SILENCE_CXX23_DENORM_DEPRECATION_WARNING is needed at least with Boost 
1.82.0 using
+# std::numeric_limits::has_denorm in
+# 
workdir/UnpackedTarball/boost/boost/spirit/home/classic/core/primitives/impl/numerics.ipp,
 in turn
+# included from boost/spirit/include/classic_core.hpp as included from various 
of our code files:
+
 # _SCL_SECURE_NO_WARNINGS avoids deprecation warnings for STL algorithms
 # like std::copy, std::transform (when MSVC_USE_DEBUG_RUNTIME is enabled)
 
@@ -50,6 +55,7 @@ gb_COMPILERDEFS := \
-D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING \
-D_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING \
-D_SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING \
+   -D_SILENCE_CXX23_DENORM_DEPRECATION_WARNING \
-D_CRT_NON_CONFORMING_SWPRINTFS \
-D_CRT_NONSTDC_NO_DEPRECATE \
-D_CRT_SECURE_NO_DEPRECATE \


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

2023-07-17 Thread Mike Kaganski (via logerrit)
 sfx2/source/appl/appcfg.cxx |   18 +-
 1 file changed, 5 insertions(+), 13 deletions(-)

New commits:
commit c5ae73c8f3abdb067e3cef0cb5565e1f00ae08ea
Author: Mike Kaganski 
AuthorDate: Sun Jul 16 14:03:48 2023 +0200
Commit: Mike Kaganski 
CommitDate: Tue Jul 18 08:52:05 2023 +0200

Drop aSendSet

... which was never used, since its introduction in the initial import.

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

diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 3c8fe3c124f6..681d4e2bd576 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -446,21 +446,15 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& 
rSet )
 
 void SfxApplication::SetOptions(const SfxItemSet &rSet)
 {
-SvtPathOptions aPathOptions;
-
-// Data is saved in DocInfo and IniManager
-
-SfxAllItemSet aSendSet( rSet );
-
 // PathName
 if ( const SfxAllEnumItem* pEnumItem = 
rSet.GetItemIfSet(SID_ATTR_PATHNAME))
 {
-sal_uInt32 nCount = pEnumItem->GetTextCount();
-OUString aNoChangeStr( ' ' );
-for( sal_uInt32 nPath=0; nPathGetTextCount();
+SvtPathOptions aPathOptions;
+for( sal_uInt16 nPath=0; nPathGetTextByPos(static_cast(nPath));
-if ( sValue != aNoChangeStr )
+const OUString& sValue = pEnumItem->GetTextByPos(nPath);
+if ( sValue != " " ) // "No change" string
 {
 switch( static_cast(nPath) )
 {
@@ -531,8 +525,6 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet)
 }
 }
 }
-
-aSendSet.ClearItem( SID_ATTR_PATHNAME );
 }
 
 SetOptions_Impl( rSet );