core.git: Branch 'distro/collabora/co-24.04' - sfx2/source

2024-05-08 Thread Hubert Figuière (via logerrit)
 sfx2/source/control/unoctitm.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 9bbe40cc2d39f89ffcae57875d4c7ef7688d83d7
Author: Hubert Figuière 
AuthorDate: Wed May 8 17:34:47 2024 -0400
Commit: Szymon Kłos 
CommitDate: Thu May 9 08:52:37 2024 +0200

lokit: Properly handle state update for .uno:ToggleSheetGrid

This is a follow up on cool#8066

Signed-off-by: Hubert Figuière 
Change-Id: I7d6ce4c9dfe7c2e9a2dda110e587c8c825c4df2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167370
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 

diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 6572761c11ea..d289cd2616a8 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -940,8 +940,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, 
SfxViewFrame* pViewFra
 aEvent.FeatureURL.Path == "SpacePara15" ||
 aEvent.FeatureURL.Path == "SpacePara2" ||
 aEvent.FeatureURL.Path == "DataFilterAutoFilter" ||
-aEvent.FeatureURL.Path == "CellProtection" ||
-aEvent.FeatureURL.Path == "ToggleSheetGrid")
+aEvent.FeatureURL.Path == "CellProtection")
 {
 bool bTemp = false;
 aEvent.State >>= bTemp;
@@ -1224,7 +1223,8 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, 
SfxViewFrame* pViewFra
 }
 }
 else if (aEvent.FeatureURL.Path == "ToggleMergeCells" ||
- aEvent.FeatureURL.Path == "SheetRightToLeft")
+ aEvent.FeatureURL.Path == "SheetRightToLeft" ||
+ aEvent.FeatureURL.Path == "ToggleSheetGrid")
 {
 bool aBool;
 


core.git: Branch 'distro/collabora/co-24.04' - 2 commits - chart2/source cui/source desktop/source include/svx sc/source sd/source sfx2/source sw/source vcl/jsdialog

2024-05-08 Thread Szymon Kłos (via logerrit)
 chart2/source/controller/main/ShapeController.cxx |   26 +++---
 cui/source/factory/dlgfact.cxx|8 +-
 cui/source/factory/dlgfact.hxx|6 -
 desktop/source/lib/init.cxx   |2 
 include/svx/svxdlg.hxx|2 
 sc/source/ui/drawfunc/drawsh5.cxx |   85 +++---
 sd/source/ui/view/drviews2.cxx|   65 ++--
 sd/source/ui/view/drviewsc.cxx|3 
 sfx2/source/control/unoctitm.cxx  |2 
 sw/source/uibase/shells/drwbassh.cxx  |   76 ---
 sw/source/uibase/shells/frmsh.cxx |   15 ++-
 vcl/jsdialog/enabled.cxx  |2 
 12 files changed, 171 insertions(+), 121 deletions(-)

New commits:
commit 48bfdbe7512a880983d04ec9143ae881dfae58f4
Author: Szymon Kłos 
AuthorDate: Tue May 7 21:59:04 2024 +0200
Commit: Szymon Kłos 
CommitDate: Thu May 9 08:47:21 2024 +0200

jsdialog: enable Object Name and Description dialog

and send uno command enable/disable status

Signed-off-by: Szymon Kłos 
Change-Id: Id643a27308809b6960be72fb368b9f078ff9cf6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167296
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index d5476cfe7666..962d676694ac 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3756,6 +3756,8 @@ static void doc_iniUnoCommands ()
 u".uno:Context"_ustr,
 u".uno:WrapText"_ustr,
 u".uno:ToggleMergeCells"_ustr,
+u".uno:NameGroup"_ustr,
+u".uno:ObjectTitleDescription"_ustr,
 u".uno:NumberFormatCurrency"_ustr,
 u".uno:NumberFormatPercent"_ustr,
 u".uno:NumberFormatDecimal"_ustr,
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index e327a9e0e949..a7ed100977bf 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -2657,7 +2657,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 if(1 == mpDrawView->GetMarkedObjectCount())
 {
 // #i68101#
-SdrObject* pSelected = mpDrawView->GetMarkedObjectByIndex(0);
+rtl::Reference pSelected = 
mpDrawView->GetMarkedObjectByIndex(0);
 OSL_ENSURE(pSelected, "DrawViewShell::FuTemp03: nMarkCount, 
but no object (!)");
 OUString aName(pSelected->GetName());
 
@@ -2675,7 +2675,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 
 SdPage* pPage = GetActualPage();
 if (pPage)
-pPage->notifyObjectRenamed(pSelected);
+pPage->notifyObjectRenamed(pSelected.get());
 }
 pDlg->disposeOnce();
 SfxBindings& rBindings = GetViewFrame()->GetBindings();
@@ -2695,25 +2695,36 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 {
 if(1 == mpDrawView->GetMarkedObjectCount())
 {
-SdrObject* pSelected = mpDrawView->GetMarkedObjectByIndex(0);
+rtl::Reference pSelected = 
mpDrawView->GetMarkedObjectByIndex(0);
 OSL_ENSURE(pSelected, "DrawViewShell::FuTemp03: nMarkCount, 
but no object (!)");
 OUString aTitle(pSelected->GetTitle());
 OUString aDescription(pSelected->GetDescription());
 bool isDecorative(pSelected->IsDecorative());
 
 SvxAbstractDialogFactory* pFact = 
SvxAbstractDialogFactory::Create();
-ScopedVclPtr 
pDlg(pFact->CreateSvxObjectTitleDescDialog(
+VclPtr 
pDlg(pFact->CreateSvxObjectTitleDescDialog(
 GetFrameWeld(), aTitle, aDescription, 
isDecorative));
 
-if(RET_OK == pDlg->Execute())
-{
-pDlg->GetTitle(aTitle);
-pDlg->GetDescription(aDescription);
-pDlg->IsDecorative(isDecorative);
-pSelected->SetTitle(aTitle);
-pSelected->SetDescription(aDescription);
-pSelected->SetDecorative(isDecorative);
-}
+pDlg->StartExecuteAsync(
+[pDlg, pSelected] (sal_Int32 nResult)->void
+{
+if (nResult == RET_OK)
+{
+OUString aTitle;
+OUString aDescription;
+bool isDecorative;
+
+pDlg->GetTitle(aTitle);
+pDlg->GetDescription(aDescription);
+pDlg->IsDecorative(isDecorative);
+
+pSelected->Se

core.git: helpcontent2

2024-05-08 Thread Stanislav Horacek (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ad1f0bdeac30fca1dc56a08803ef23f2aca4db05
Author: Stanislav Horacek 
AuthorDate: Thu May 9 01:52:46 2024 +0200
Commit: Gerrit Code Review 
CommitDate: Thu May 9 01:52:46 2024 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 761a64f3ca3e8f66c711bcadaa8c5ced105a99cd
  - fix row/column type of labels in description of their recognizing

Change-Id: I4b9dcd95b432aea717eeb017fc94fa02a3bc84d5
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/167247
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 3bc0152a9ce7..761a64f3ca3e 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 3bc0152a9ce77d7ac1c27331cc176cd80af96692
+Subproject commit 761a64f3ca3e8f66c711bcadaa8c5ced105a99cd


help.git: source/text

2024-05-08 Thread Stanislav Horacek (via logerrit)
 source/text/scalc/guide/address_auto.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 761a64f3ca3e8f66c711bcadaa8c5ced105a99cd
Author: Stanislav Horacek 
AuthorDate: Mon May 6 20:22:17 2024 +0200
Commit: Olivier Hallot 
CommitDate: Thu May 9 01:52:46 2024 +0200

fix row/column type of labels in description of their recognizing

Change-Id: I4b9dcd95b432aea717eeb017fc94fa02a3bc84d5
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/167247
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/scalc/guide/address_auto.xhp 
b/source/text/scalc/guide/address_auto.xhp
index f14b44d2f8..c946f723f0 100644
--- a/source/text/scalc/guide/address_auto.xhp
+++ b/source/text/scalc/guide/address_auto.xhp
@@ -43,7 +43,7 @@
 
 Recognizing Names as 
Addressing
 You can use cells with text to 
refer to the rows or to the columns that contain the 
cells.removed table as a workaround for issue 
108715
-If the resulting cell is 
below or above another cell containing text, %PRODUCTNAME Calc assumes the text 
as a row label, else %PRODUCTNAME Calc assumes the text as a column 
label.
+If the resulting cell is 
below or above another cell containing text, %PRODUCTNAME Calc assumes the text 
as a column label, else %PRODUCTNAME Calc assumes the text as a row 
label.
 Example 
spreadsheet
 In the example spreadsheet, you 
can use the string 'Column One' in a formula to 
refer to the cell range B3 to B5, or 'Column Two' for the 
cell range C2 to C5. 
You can also use 'Row One' for the cell range B3 to D3, or 'Row Two' for the cell range B4 to D4. The result of a 
formula that uses a cell name, for example, SUM('Column 
One'), is 600.
 Automatically finding labels is a legacy feature 
and deactivated by default as it can produce nondeterministic behavior 
depending on actual document content. To turn this function on, choose 
%PRODUCTNAME - 
PreferencesTools - 
Options - %PRODUCTNAME Calc - 
Calculate and mark the Automatically find column and row 
labels check box.


core.git: sd/source

2024-05-08 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/view/frmview.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 5ce5ffe817479faecf7889d0024e91c8a2ad6a2c
Author: Gabor Kelemen 
AuthorDate: Wed Apr 24 09:08:37 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Thu May 9 00:31:09 2024 +0200

Use less SdOptionsLayout->IsHandlesBezier in favor of officecfg

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

diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 1fa0c4eba45d..250a088bffb1 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -289,12 +289,14 @@ void FrameView::Update(SdOptions const * pOptions)
 mbRuler = officecfg::Office::Impress::Layout::Display::Ruler::get();
 SetDragStripes( 
officecfg::Office::Impress::Layout::Display::Guide::get() );
 SetNoDragXorPolys ( 
!officecfg::Office::Impress::Layout::Display::Contour::get() );
+SetPlusHandlesAlwaysVisible( 
officecfg::Office::Impress::Layout::Display::Bezier::get() );
 }
 else
 {
 mbRuler = officecfg::Office::Draw::Layout::Display::Ruler::get();
 SetDragStripes( officecfg::Office::Draw::Layout::Display::Guide::get() 
);
 SetNoDragXorPolys ( 
!officecfg::Office::Draw::Layout::Display::Contour::get() );
+SetPlusHandlesAlwaysVisible( 
officecfg::Office::Draw::Layout::Display::Bezier::get() );
 }
 
 SetGridVisible( pOptions->IsGridVisible() );
@@ -305,7 +307,6 @@ void FrameView::Update(SdOptions const * pOptions)
 SetOFrmSnap( pOptions->IsSnapFrame() );
 SetOPntSnap( pOptions->IsSnapPoints() );
 SetHlplVisible( pOptions->IsHelplines() );
-SetPlusHandlesAlwaysVisible( pOptions->IsHandlesBezier() );
 SetSnapMagneticPixel( pOptions->GetSnapArea() );
 SetMarkedHitMovesAlways( pOptions->IsMarkedHitMovesAlways() );
 SetMoveOnlyDragging( pOptions->IsMoveOnlyDragging() );


core.git: sd/source

2024-05-08 Thread Gabor Kelemen (via logerrit)
 sd/source/core/drawdoc.cxx  |   14 +++-
 sd/source/ui/app/sdmod.cxx  |   12 ---
 sd/source/ui/app/sdmod1.cxx |   36 -
 sd/source/ui/app/sdmod2.cxx |   48 +---
 4 files changed, 88 insertions(+), 22 deletions(-)

New commits:
commit 055e7d866680390dca6e18864ca4297cc0ebda84
Author: Gabor Kelemen 
AuthorDate: Tue Apr 23 20:04:43 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Thu May 9 00:30:52 2024 +0200

Use less SdOptionsLayout->GetMetric/SetMetric in favor of officecfg

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

diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 5def1937684d..b759f9b4e883 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -53,6 +54,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -156,12 +159,19 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, 
SfxObjectShell* pDrDocSh)
 sal_Int32 nX, nY;
 SdOptions* pOptions = SD_MOD()->GetSdOptions(meDocType);
 pOptions->GetScale( nX, nY );
+SvtSysLocale aSysLocale;
 
 // Allow UI scale only for draw documents.
 if( eType == DocumentType::Draw )
-SetUIUnit( static_cast(pOptions->GetMetric()), Fraction( 
nX, nY ) );  // user-defined
+if (aSysLocale.GetLocaleData().getMeasurementSystemEnum() == 
MeasurementSystem::Metric)
+SetUIUnit( 
static_cast(officecfg::Office::Draw::Layout::Other::MeasureUnit::Metric::get()),
 Fraction( nX, nY ) );  // user-defined
+else
+SetUIUnit( 
static_cast(officecfg::Office::Draw::Layout::Other::MeasureUnit::NonMetric::get()),
 Fraction( nX, nY ) );  // user-defined
 else
-SetUIUnit( static_cast(pOptions->GetMetric()), Fraction( 1, 
1 ) );// default
+if (aSysLocale.GetLocaleData().getMeasurementSystemEnum() == 
MeasurementSystem::Metric)
+SetUIUnit( 
static_cast(officecfg::Office::Impress::Layout::Other::MeasureUnit::Metric::get()),
 Fraction( 1, 1 ) );// default
+else
+SetUIUnit( 
static_cast(officecfg::Office::Impress::Layout::Other::MeasureUnit::NonMetric::get()),
 Fraction( 1, 1 ) );// default
 
 SetScaleUnit(MapUnit::Map100thMM);
 SetDefaultFontHeight(o3tl::convert(24, o3tl::Length::pt, 
o3tl::Length::mm100));
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index f18dd647a209..d534fe51aa23 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -141,18 +141,6 @@ SdOptions* SdModule::GetSdOptions(DocumentType eDocType)
 
 pOptions = pImpressOptions;
 }
-if( pOptions )
-{
-sal_uInt16 nMetric = pOptions->GetMetric();
-
-::sd::DrawDocShell* pDocSh = dynamic_cast< ::sd::DrawDocShell *>( 
SfxObjectShell::Current() );
-SdDrawDocument* pDoc = nullptr;
-if (pDocSh)
-pDoc = pDocSh->GetDoc();
-
-if( nMetric != 0x && pDoc && eDocType == pDoc->GetDocumentType() )
-PutItem( SfxUInt16Item( SID_ATTR_METRIC, nMetric ) );
-}
 
 return pOptions;
 }
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 14f507fb1a1d..023e44a7c1e6 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -21,7 +21,9 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -53,6 +55,9 @@
 #include 
 #include 
 
+#include 
+#include 
+
 using ::sd::framework::FrameworkHelper;
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::frame::XFrame;
@@ -126,9 +131,21 @@ void SdModule::Execute(SfxRequest& rReq)
 DocumentType eDocType = 
pDocSh->GetDoc()->GetDocumentType();
 
 PutItem( *pItem );
-SdOptions* pOptions = GetSdOptions( eDocType );
-if(pOptions)
-pOptions->SetMetric( 
static_cast(eUnit) );
+SvtSysLocale aSysLocale;
+
std::shared_ptr batch(
+
comphelper::ConfigurationChanges::create());
+
+if (eDocType == DocumentType::Impress)
+if 
(aSysLocale.GetLocaleData().getMeasurementSystemEnum() == 
MeasurementSystem::Metric)
+
officecfg::Office::Impress::Layout::Other::MeasureUnit::Metric::set(static_cast(eUnit),
 batch);
+else
+
officecfg::Office::Impress::Layout::Other::MeasureUnit::NonMetric::set(static_cast(eUnit),

core.git: fpicker/source

2024-05-08 Thread Noel Grandin (via logerrit)
 fpicker/source/office/OfficeFilePicker.cxx   |   10 +--
 fpicker/source/office/OfficeFolderPicker.cxx |4 -
 fpicker/source/office/RemoteFilesDialog.cxx  |   70 ++---
 fpicker/source/office/breadcrumb.cxx |   16 ++--
 fpicker/source/office/commonpicker.cxx   |4 -
 fpicker/source/office/contentenumeration.cxx |   28 
 fpicker/source/office/fileview.cxx   |   18 ++---
 fpicker/source/office/fpsmartcontent.cxx |4 -
 fpicker/source/office/iodlg.cxx  |   88 +--
 fpicker/source/office/iodlgimp.cxx   |2 
 10 files changed, 122 insertions(+), 122 deletions(-)

New commits:
commit d9427b9f0c291bd24e5e5e53e3f415c724dad746
Author: Noel Grandin 
AuthorDate: Wed May 8 11:57:48 2024 +0200
Commit: Noel Grandin 
CommitDate: Wed May 8 21:23:12 2024 +0200

loplugin:ostr in fpicker

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

diff --git a/fpicker/source/office/OfficeFilePicker.cxx 
b/fpicker/source/office/OfficeFilePicker.cxx
index c0ba40632a0c..e348789037e9 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -879,7 +879,7 @@ void SAL_CALL SvtFilePicker::appendFilterGroup( const 
OUString& sGroupTitle,
 // check the names
 if ( FilterNameExists( aFilters ) )
 throw IllegalArgumentException(
-"filter name exists",
+u"filter name exists"_ustr,
 getXWeak(), 1);
 
 // ensure that we have a filter list
@@ -1029,7 +1029,7 @@ bool SvtFilePicker::implHandleInitializationArgument( 
const OUString& _rName, co
 /* XServiceInfo */
 OUString SAL_CALL SvtFilePicker::getImplementationName()
 {
-return "com.sun.star.svtools.OfficeFilePicker";
+return u"com.sun.star.svtools.OfficeFilePicker"_ustr;
 }
 
 /* XServiceInfo */
@@ -1041,7 +1041,7 @@ sal_Bool SAL_CALL SvtFilePicker::supportsService( const 
OUString& sServiceName )
 /* XServiceInfo */
 Sequence< OUString > SAL_CALL SvtFilePicker::getSupportedServiceNames()
 {
-return { "com.sun.star.ui.dialogs.OfficeFilePicker" };
+return { u"com.sun.star.ui.dialogs.OfficeFilePicker"_ustr };
 }
 
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
@@ -1081,7 +1081,7 @@ std::shared_ptr 
SvtRemoteFilePicker::implCreateDialog(weld::
 /* XServiceInfo */
 OUString SAL_CALL SvtRemoteFilePicker::getImplementationName()
 {
-return "com.sun.star.svtools.RemoteFilePicker";
+return u"com.sun.star.svtools.RemoteFilePicker"_ustr;
 }
 
 /* XServiceInfo */
@@ -1093,7 +1093,7 @@ sal_Bool SAL_CALL SvtRemoteFilePicker::supportsService( 
const OUString& sService
 /* XServiceInfo */
 Sequence< OUString > SAL_CALL SvtRemoteFilePicker::getSupportedServiceNames()
 {
-return { "com.sun.star.ui.dialogs.RemoteFilePicker" };
+return { u"com.sun.star.ui.dialogs.RemoteFilePicker"_ustr };
 }
 
 
diff --git a/fpicker/source/office/OfficeFolderPicker.cxx 
b/fpicker/source/office/OfficeFolderPicker.cxx
index 779bbffda7ad..1c803e737820 100644
--- a/fpicker/source/office/OfficeFolderPicker.cxx
+++ b/fpicker/source/office/OfficeFolderPicker.cxx
@@ -149,7 +149,7 @@ void SvtFolderPicker::cancel()
 /* XServiceInfo */
 OUString SAL_CALL SvtFolderPicker::getImplementationName()
 {
-return "com.sun.star.svtools.OfficeFolderPicker";
+return u"com.sun.star.svtools.OfficeFolderPicker"_ustr;
 }
 
 /* XServiceInfo */
@@ -161,7 +161,7 @@ sal_Bool SAL_CALL SvtFolderPicker::supportsService( const 
OUString& sServiceName
 /* XServiceInfo */
 Sequence< OUString > SAL_CALL SvtFolderPicker::getSupportedServiceNames()
 {
-return { "com.sun.star.ui.dialogs.OfficeFolderPicker" };
+return { u"com.sun.star.ui.dialogs.OfficeFolderPicker"_ustr };
 }
 
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx 
b/fpicker/source/office/RemoteFilesDialog.cxx
index ad23cc0dd888..50c897f35b48 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -27,20 +27,20 @@
 using namespace ::svt;
 
 RemoteFilesDialog::RemoteFilesDialog( weld::Window* pParent, PickerFlags nBits 
)
-: SvtFileDialog_Base( pParent, "fps/ui/remotefilesdialog.ui", 
"RemoteFilesDialog" )
+: SvtFileDialog_Base( pParent, u"fps/ui/remotefilesdialog.ui"_ustr, 
u"RemoteFilesDialog"_ustr )
 , m_xContext( comphelper::getProcessComponentContext() )
 , m_xMasterPasswd( PasswordContainer::create( m_xContext ) )
 , m_bIsInExecute( false )
-, m_xOk_btn(m_xBuilder->weld_button("ok"))
-, m_xCancel_btn(m_xBuilder->weld_button("cancel"))
-, m_xManageServices(m_xBuilder->weld_menu_button("add_service_btn"))
-, m_xServices_lb(m_xBuilder->weld_combo_box("services_lb"))
-, m_xPathContainer(m_xBuilder->weld_container("breadcrumb_container"))
-, m_xNewFolder(

core.git: Branch 'feature/cib_contract49c' - 2 commits - officecfg/registry sd/Library_sd.mk sd/sdi sd/source

2024-05-08 Thread Sarper Akdemir (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Impress.xcs |   40 +
 sd/Library_sd.mk|1 
 sd/sdi/NotesPanelView.sdi   |   11 
 sd/source/ui/framework/module/ImpressModule.cxx |2 
 sd/source/ui/framework/module/ModuleController.cxx  |2 
 sd/source/ui/framework/module/NotesPaneModule.cxx   |  268 
 sd/source/ui/framework/module/NotesPaneModule.hxx   |   91 
 sd/source/ui/inc/framework/factories/BasicPaneFactory.hxx   |1 
 sd/source/ui/view/NotesPanelViewShell.cxx   |5 
 9 files changed, 405 insertions(+), 16 deletions(-)

New commits:
commit 8af78dc0de96daab6a23a21e152d5c91b93ee74c
Author: Sarper Akdemir 
AuthorDate: Wed May 8 17:36:01 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Wed May 8 20:55:44 2024 +0200

tdf#33603: do not block SID_SAVEDOC slots on NotesPanelViewShell

Change-Id: Icc7320b0960f0d73027359b7525a37b44bdd7ee7

diff --git a/sd/sdi/NotesPanelView.sdi b/sd/sdi/NotesPanelView.sdi
index 90217efaa4e8..b54addb52b8c 100644
--- a/sd/sdi/NotesPanelView.sdi
+++ b/sd/sdi/NotesPanelView.sdi
@@ -195,17 +195,6 @@ interface NotesPanelView
 ExecMethod = FuPermanent ;
 StateMethod = GetMenuState ;
 ]
-SID_SAVEDOC // ole : no, status : ?
-[
-ExecMethod = Execute ;
-StateMethod = GetMenuState ;
-GroupId = SfxGroupId::Document ;
-]
-SID_SAVEASDOC // ole : no, status : ?
-[
-ExecMethod = Execute ;
-GroupId = SfxGroupId::Document ;
-]
 SID_RULER // ole : no, status : ?
 [
 ExecMethod = FuSupport ;
diff --git a/sd/source/ui/view/NotesPanelViewShell.cxx 
b/sd/source/ui/view/NotesPanelViewShell.cxx
index 5b7bdcf6329f..7bc46a5464b6 100644
--- a/sd/source/ui/view/NotesPanelViewShell.cxx
+++ b/sd/source/ui/view/NotesPanelViewShell.cxx
@@ -1338,11 +1338,6 @@ void NotesPanelViewShell::Execute(SfxRequest& rReq)
 
 switch (rReq.GetSlot())
 {
-case SID_SAVEDOC:
-case SID_SAVEASDOC:
-PrepareClose();
-break;
-
 case SID_SEARCH_ITEM:
 // Forward this request to the common (old) code of the
 // document shell.
commit 537be0af79d95852eb66d7683908b683ce2b7f2f
Author: Sarper Akdemir 
AuthorDate: Wed May 8 14:14:58 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Wed May 8 20:54:36 2024 +0200

tdf#33603: sd: make state of notes pane persist across runs

Introduces new NotesPaneModule which manages the visibility
of NotesPane across modes and different runs.

Also introduces new three config values under
Office/Impress/MuliPaneGUI/NotesPane/Visible ImpressView,
OutlineView and NotesView.

Similar to what was there for SlideSorterBar.

Change-Id: Id540c508e81878e5a8e1aebd6544839e70b813c8

diff --git a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
index 876780d1bd09..54fec3bd1989 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
@@ -1308,6 +1308,46 @@
   
 
   
+  
+
+  Values related to the slide sorter.
+  Notes Pane Options
+
+
+  
+Options that control the visibility of the slide 
sorter.
+Notes Pane Visibility
+  
+  
+
+  Visibility of the Notes Pane in the Impress view.
+  Notes Pane Visibility ImpressView
+
+false
+  
+   
+
+  Visibility of the Notes Pane in the Outline view.
+  Notes Pane Visibility OutlineView
+
+false
+  
+  
+
+  Visibility of the Notes Pane in the Notes view.
+  Notes Pane Visibility NotesView
+
+false
+  
+  
+
+  Visibility of the Notes Pane in the Handout view.
+  Notes Pane Visibility HandoutView
+
+false
+  
+
+  
   
 
   Values related to the slide sorter.
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index b633ee26f7d6..0cb001c98e31 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -279,6 +279,7 @@ $(eval $(call gb_Library_add_exception_objects,sd,\
sd/source/ui/framework/module/DrawModule \
sd/source/ui/framework/module/ImpressModule \
sd/source/ui/framework/module/ModuleController \
+   sd/source/ui/framework/module/NotesPaneModule \
sd/source/ui/framework/module/PresentationModule \
sd/source/ui/framework/module/ShellStackGuard \
sd/source/ui/framework/module/SlideSorterModule \
diff --git a/sd/source/ui/framework/mod

Minutes from the UX/design meeting 2023-May-08

2024-05-08 Thread Heiko Tietze

Present:  Sahil, John, Hossein, Cor, Eyal, Heiko
Comments: Stuart, Stephane, Dieter

Tickets/Topics

 * Major design changes ongoing for "Better handling for multiline tabs
   + https://bugs.documentfoundation.org/show_bug.cgi?id=99528

 * List images in order of document appearance in Calc Navigator
   + https://bugs.documentfoundation.org/show_bug.cgi?id=160353
   + at least four different sort orders: row first, col first,
 alphabetically, by insertion time (Heiko)
   + limited use case (John)
   + Navigator lists objects from all sheets making the sort order
 problematic (John)
 + maybe reported somewhere; unclear if users accept when the
   Navigator restricts objects to the current sheet
   => keep with low priority

 * Icons for promote / demote outline level should be improved
   + https://bugs.documentfoundation.org/show_bug.cgi?id=158932
   + clear depiction of the action (Stuart)
   + there are issues with RTL UI (Hossein)
 + dup at https://bugs.documentfoundation.org/show_bug.cgi?id=154523
 + see also https://bugs.documentfoundation.org/show_bug.cgi?id=70102
   => duplicate

 * Print multiple non-contiguous print ranges on a single page in
   LibreOffice Calc
   + https://bugs.documentfoundation.org/show_bug.cgi?id=160610
   + prone to complications; (cumbersome) alternatives possible (Stephané)
   + hiding rows is possibly a proper workaround for the rare need (Cor)
   => suggest WF if there's no clear response

 * Print (or export) only tracked changes
   + https://bugs.documentfoundation.org/show_bug.cgi?id=160497
   + sidebar lists all TC (Dieter)
   + macro on ask.libo solves the use case (Heiko)
   + reasonable use case for some (Cor, John)
   + but macro is a good solution
   => resolve WF


OpenPGP_signature.asc
Description: OpenPGP digital signature


core.git: Branch 'feature/cib_contract49c' - 2 commits - include/svx svx/source sw/source

2024-05-08 Thread Michael Stahl (via logerrit)
 include/svx/svdobj.hxx |8 
 include/svx/svdovirt.hxx   |4 
 svx/source/svdraw/svdobj.cxx   |   10 ++
 svx/source/svdraw/svdovirt.cxx |   20 
 sw/source/core/draw/dcontact.cxx   |5 +++--
 sw/source/uibase/utlui/content.cxx |2 +-
 6 files changed, 42 insertions(+), 7 deletions(-)

New commits:
commit 5c9f940245e8f128979e6c45d3c5eb2192f4b8cc
Author: Michael Stahl 
AuthorDate: Wed May 8 14:20:26 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Wed May 8 20:54:07 2024 +0200

tdf#156484 svx,sw: fix visibility of shapes in header/footer

Similar to commit ae132145ff42a95dc24fb124847c04af4b8c8dab, also forward
IsVisible() and IsPrintable() from SdrVirtObj to its real object;
evidently the properties aren't copied when creating SdrVirtObj but
there is no reason for that to have these properties independent.

This triggers an assert in VOCOfDrawVirtObj::createPrimitive2DSequence()
because that is called during layout from getObjectRange(); the assert
was added in commit ae3ec0d53a22ae5d2b7fb244a6056d0627b71873 and
intended for painting, but this isn't painting, and it's not easily
possible to detect if the function is called during painting, so remove
the assert.

Change-Id: Id2a04a5d07f43b86eb9c524b30ba74ecaf6a95c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167364
Tested-by: allotropia jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 892beb56668c..396c09e8cd94 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -752,10 +752,10 @@ public:
 bool IsMoveProtect() const { return m_bMovProt;}
 void SetResizeProtect(bool bProt);
 bool IsResizeProtect() const { return m_bSizProt;}
-void SetPrintable(bool bPrn);
-bool IsPrintable() const { return !m_bNoPrint;}
-void SetVisible(bool bVisible);
-bool IsVisible() const { return mbVisible;}
+virtual void SetPrintable(bool isPrintable);
+virtual bool IsPrintable() const;
+virtual void SetVisible(bool isVisible);
+virtual bool IsVisible() const;
 void SetMarkProtect(bool bProt);
 bool IsMarkProtect() const { return m_bMarkProt;}
 virtual bool IsSdrTextObj() const { return false; }
diff --git a/include/svx/svdovirt.hxx b/include/svx/svdovirt.hxx
index 17c869313067..ca5f6858ecaa 100644
--- a/include/svx/svdovirt.hxx
+++ b/include/svx/svdovirt.hxx
@@ -61,6 +61,10 @@ public:
 const SdrObject& GetReferencedObj() const;
 virtual void NbcSetAnchorPos(const Point& rAnchorPos) override;
 
+virtual void SetPrintable(bool isPrintable) override;
+virtual bool IsPrintable() const override;
+virtual void SetVisible(bool isVisible) override;
+virtual bool IsVisible() const override;
 virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
 virtual SdrInventor GetObjInventor() const override;
 virtual SdrObjKind GetObjIdentifier() const override;
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index f4d13219db0d..b23e18a6a4d3 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -2675,6 +2675,11 @@ void SdrObject::SetResizeProtect(bool bProt)
 }
 }
 
+bool SdrObject::IsPrintable() const
+{
+return !m_bNoPrint;
+}
+
 void SdrObject::SetPrintable(bool bPrn)
 {
 if( bPrn == m_bNoPrint )
@@ -2689,6 +2694,11 @@ void SdrObject::SetPrintable(bool bPrn)
 }
 }
 
+bool SdrObject::IsVisible() const
+{
+return mbVisible;
+}
+
 void SdrObject::SetVisible(bool bVisible)
 {
 if( bVisible != mbVisible )
diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx
index b1fe6f5cb9bb..2e1641d3864e 100644
--- a/svx/source/svdraw/svdovirt.cxx
+++ b/svx/source/svdraw/svdovirt.cxx
@@ -97,6 +97,26 @@ void SdrVirtObj::NbcSetAnchorPos(const Point& rAnchorPos)
 m_aAnchor=rAnchorPos;
 }
 
+bool SdrVirtObj::IsPrintable() const
+{
+return mxRefObj->IsPrintable();
+}
+
+void SdrVirtObj::SetPrintable(bool const isPrintable)
+{
+mxRefObj->SetPrintable(isPrintable);
+}
+
+bool SdrVirtObj::IsVisible() const
+{
+return mxRefObj->IsVisible();
+}
+
+void SdrVirtObj::SetVisible(bool const isVisible)
+{
+mxRefObj->SetVisible(isVisible);
+}
+
 void SdrVirtObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
 {
 mxRefObj->TakeObjInfo(rInfo);
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index aac8f2393c61..115887a368dc 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -2216,8 +2216,9 @@ namespace sdr::contact
 
 void VOCOfDrawVirtObj::createPrimitive2DSequence(const DisplayInfo& 
rDisplayInfo, drawinglayer::primitive2d::Primitive2DDecompositionVisitor& 
rVisitor) const
 {
-// tdf#91260 have already checked top-level one is on the right 
page
-assert(isPrimitiv

core.git: forms/source

2024-05-08 Thread Armin Le Grand (allotropia) (via logerrit)
 forms/source/richtext/parametrizedattributedispatcher.cxx |   14 +++---
 forms/source/richtext/parametrizedattributedispatcher.hxx |6 +++---
 forms/source/richtext/specialdispatchers.cxx  |   14 ++
 forms/source/richtext/specialdispatchers.hxx  |2 +-
 4 files changed, 21 insertions(+), 15 deletions(-)

New commits:
commit 24d78fcb5399b2c783ab7908263a1b54bb687a22
Author: Armin Le Grand (allotropia) 
AuthorDate: Tue May 7 13:59:18 2024 +0200
Commit: Armin Le Grand 
CommitDate: Wed May 8 20:49:51 2024 +0200

tdf#160906 use SfxPoolItemHolder

to avoid handling already deleted SfxPoolItems.

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

diff --git a/forms/source/richtext/parametrizedattributedispatcher.cxx 
b/forms/source/richtext/parametrizedattributedispatcher.cxx
index 15b69b0888b6..a86441cd87dd 100644
--- a/forms/source/richtext/parametrizedattributedispatcher.cxx
+++ b/forms/source/richtext/parametrizedattributedispatcher.cxx
@@ -88,7 +88,7 @@ namespace frm
 }
 
 
-const SfxPoolItem* 
OParametrizedAttributeDispatcher::convertDispatchArgsToItem( const Sequence< 
PropertyValue >& _rArguments )
+SfxPoolItemHolder 
OParametrizedAttributeDispatcher::convertDispatchArgsToItem( const Sequence< 
PropertyValue >& _rArguments )
 {
 // get the real slot id. This may differ from our attribute id: for 
instance, both
 // SID_ATTR_CHAR_HEIGHT and SID_ATTR_CHAR_LATIN_HEIGHT are mapped to 
the same which id
@@ -97,16 +97,16 @@ namespace frm
 SfxAllItemSet aParameterSet( getEditView()->GetEmptyItemSet() );
 TransformParameters( nSlotId, _rArguments, aParameterSet );
 
-const SfxPoolItem* pArgument = nullptr;
 if ( aParameterSet.Count() )
 {
 OSL_ENSURE( aParameterSet.Count() == 1, 
"OParametrizedAttributeDispatcher::convertDispatchArgsToItem: Arguments which 
form more than 1 item? How this?" );
 WhichId nAttributeWhich = 
aParameterSet.GetPool()->GetWhichIDFromSlotID( nSlotId );
-pArgument = aParameterSet.GetItem( nAttributeWhich );
-OSL_ENSURE( pArgument, 
"OParametrizedAttributeDispatcher::convertDispatchArgsToItem: suspicious: there 
were arguments, but they're not for my slot!" );
+SfxPoolItemHolder aArgument(*aParameterSet.GetPool(), 
aParameterSet.GetItem(nAttributeWhich));
+OSL_ENSURE( aArgument.getItem(), 
"OParametrizedAttributeDispatcher::convertDispatchArgsToItem: suspicious: there 
were arguments, but they're not for my slot!" );
+return aArgument;
 }
 
-return pArgument;
+return SfxPoolItemHolder();
 }
 
 
@@ -116,8 +116,8 @@ namespace frm
 OSL_ENSURE( _rURL.Complete == getFeatureURL().Complete, 
"OParametrizedAttributeDispatcher::dispatch: invalid URL!" );
 if ( m_pMasterDispatcher )
 {
-const SfxPoolItem* pConvertedArgument = convertDispatchArgsToItem( 
_rArguments );
-m_pMasterDispatcher->executeAttribute( m_nAttributeId, 
pConvertedArgument );
+const SfxPoolItemHolder 
aConvertedArgument(convertDispatchArgsToItem(_rArguments));
+m_pMasterDispatcher->executeAttribute(m_nAttributeId, 
aConvertedArgument.getItem());
 }
 }
 
diff --git a/forms/source/richtext/parametrizedattributedispatcher.hxx 
b/forms/source/richtext/parametrizedattributedispatcher.hxx
index 69844731612e..8a68486c131b 100644
--- a/forms/source/richtext/parametrizedattributedispatcher.hxx
+++ b/forms/source/richtext/parametrizedattributedispatcher.hxx
@@ -21,7 +21,7 @@
 
 #include "attributedispatcher.hxx"
 
-class SfxPoolItem;
+class SfxPoolItemHolder;
 
 namespace frm
 {
@@ -47,10 +47,10 @@ namespace frm
 
 protected:
 // own overridables
-/** convert the arguments as got in a XDispatch::dispatch call into an 
SfxPoolItem, which can
+/** convert the arguments as got in a XDispatch::dispatch call into an 
SfxPoolItemHolder, which can
 be used with a IMultiAttributeDispatcher::executeAttribute
 */
-virtual const SfxPoolItem* convertDispatchArgsToItem(
+virtual SfxPoolItemHolder convertDispatchArgsToItem(
 const css::uno::Sequence< css::beans::PropertyValue >& _rArguments 
);
 };
 
diff --git a/forms/source/richtext/specialdispatchers.cxx 
b/forms/source/richtext/specialdispatchers.cxx
index 283f0db8e09a..b13d29aeeb98 100644
--- a/forms/source/richtext/specialdispatchers.cxx
+++ b/forms/source/richtext/specialdispatchers.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 
 
 namespace frm
@@ -139,7 +140,7 @@ namespace frm
 }
 
 
-const SfxPoolItem* OAsianFontLayoutDispatcher::convertDispatchArgsToItem( 
const Sequence< PropertyValue >& _rArguments )
+SfxPoolItemHolder 

GSoC: Adding support for remembering window size and position per document

2024-05-08 Thread Aung Khant Oo Gu Gu
Hi,

Nice to meet you. My name is Aung Khant Oo. I am very glad that I have been
selected by LibreOffice for this year's Google Summer Of Code program.

As someone new to open-source, I am very happy that I am warmly welcomed to
this community.

I would like to extend my gratitude to Heiko and Andreas for warmly
welcoming me and providing guidance for the direction of the project
proposal, as well as becoming my mentors. I would also like to express my
gratitude to IImari who first guided me.

In this program, I will be adding support for remembering window size and
position per document and its related things.

Gsoc Idea List -
https://wiki.documentfoundation.org/Development/GSoC/Ideas#Remember_window_size_per_document


Re: GSoC: Adding native support for histogram chart

2024-05-08 Thread Devansh Varshney
Hi everyone,

For this week, my top priority is to make the new Histogram chart type
selectable from the UI.

Initially, it will be a working copy of the existing basic bar/column chart
type.

Then, I'll make the required changes with each passing iteration.

Here's the link to the PR: https://gerrit.libreoffice.org/c/core/+/167068/


Best regards,

Devansh

On Tue, 7 May 2024 at 18:05, Devansh Varshney 
wrote:

> Hi everyone,
>
> I am Devansh and this year I have been selected for the* Google Summer of
> Code (GSoC) program with LibreOffice* to *Add the support for the
> Histogram Chart* - GSoC Idea list (
> https://wiki.documentfoundation.org/Development/GSoC/Ideas#Histogram_.28and_other_missing.29_Chart_Type
> ) and *Tomaž Vajngerl* is going to be* my mentor,* who has guided me
> throughout the proposal process and will continue to do so until the
> project's completion.
>
> I gravitated towards adding the support for the Histogram chart (and if
> time permits other missing charts also from the MS Office 2016) stems from
> my family background in science, engineering, and finance, where data
> visualization plays a crucial role. Working on this project allows me to
> connect with my family's work and explain my contributions in a meaningful
> way.
>
> Second, while preparing the proposal report I came across that the *CERN*
> also uses the LibreOffice for their work is doing a work around because of
> no native support of these new chart types. (
> https://indico.cern.ch/event/977476/contributions/4204938/attachments/2191304/3703670/EN-Plotting-a-histogram-in-libreoffice.pdf)
> which was the point where I can see the impact of this task. Not only this
> *IndiaMart*, a prominent B2B marketplace where my friends work told me
> that it also uses LibreOffice.
>
> Seeing the potential impact of this project on real-world users was a
> significant motivator for me. This project checks all the right boxes for
> me.
>
> I have been impressed by the LibreOffice community and documentation,
> which are among the best I've seen.
> I'd like to extend my gratitude to the community members who have helped
> me get started with my contributions, including Hossein, Heiko, Michael,
> Marco, and especially Ilmari, who was the first to guide me.
>
> Regards,
> Devansh 
> (IRC: devansh)
>


core.git: formula/inc formula/source include/formula sc/inc sc/qa sc/README.md sc/source

2024-05-08 Thread Balazs Varga (via logerrit)
 formula/inc/core_resource.hrc |6 
 formula/source/core/api/FormulaCompiler.cxx   |3 
 include/formula/compiler.hxx  |3 
 include/formula/opcode.hxx|2 
 sc/README.md  |1 
 sc/inc/helpids.h  |1 
 sc/inc/scfuncs.hrc|   16 
 sc/qa/extras/scfunctionlistobj.cxx|2 
 sc/qa/unit/data/functions/spreadsheet/fods/randarray.fods | 4106 ++
 sc/qa/unit/ucalc.cxx  |1 
 sc/source/core/data/funcdesc.cxx  |1 
 sc/source/core/inc/interpre.hxx   |2 
 sc/source/core/tool/interpr1.cxx  |   81 
 sc/source/core/tool/interpr4.cxx  |   10 
 sc/source/core/tool/parclass.cxx  |1 
 sc/source/core/tool/token.cxx |1 
 sc/source/filter/excel/xlformula.cxx  |3 
 sc/source/filter/oox/formulabase.cxx  |1 
 18 files changed, 4237 insertions(+), 4 deletions(-)

New commits:
commit d68f2394afc3372d867ea6157123e51b278ba81b
Author: Balazs Varga 
AuthorDate: Thu May 2 11:03:37 2024 +0200
Commit: Balazs Varga 
CommitDate: Wed May 8 17:45:36 2024 +0200

tdf#126573 Add Excel2021 array function RANDARRAY to Calc

Add new function called RANDARRAY to the function list.

(TODO: dynamic array in separate patch, oasis proposal)

Change-Id: I34bad3b7e8d631d649a0350d7c1170b26161331d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167003
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Balazs Varga 

diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index ec1f81699e7f..81c1e32fd38e 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -475,6 +475,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
 { "ORG.LIBREOFFICE.FOURIER", SC_OPCODE_FOURIER },
 { "ORG.LIBREOFFICE.RAND.NV" , SC_OPCODE_RANDOM_NV },
 { "ORG.LIBREOFFICE.RANDBETWEEN.NV" , SC_OPCODE_RANDBETWEEN_NV },
+{ "COM.MICROSOFT.RANDARRAY" , SC_OPCODE_RANDARRAY },
 { nullptr,  -1 }
 };
 
@@ -927,6 +928,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
 { "_xlfn.ORG.LIBREOFFICE.FOURIER", SC_OPCODE_FOURIER },
 { "_xlfn.ORG.LIBREOFFICE.RAND.NV" , SC_OPCODE_RANDOM_NV },
 { "_xlfn.ORG.LIBREOFFICE.RANDBETWEEN.NV" , SC_OPCODE_RANDBETWEEN_NV },
+{ "_xlfn.RANDARRAY" , SC_OPCODE_RANDARRAY },
 { nullptr,  -1 }
 };
 
@@ -1384,6 +1386,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
 { "FOURIER", SC_OPCODE_FOURIER },
 { "RAND.NV" , SC_OPCODE_RANDOM_NV },
 { "RANDBETWEEN.NV" , SC_OPCODE_RANDBETWEEN_NV },
+{ "RANDARRAY" , SC_OPCODE_RANDARRAY },
 { nullptr, -1 }
 };
 
@@ -1840,6 +1843,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
 { "FOURIER", SC_OPCODE_FOURIER },
 { "RAND.NV" , SC_OPCODE_RANDOM_NV },
 { "RANDBETWEEN.NV" , SC_OPCODE_RANDBETWEEN_NV },
+{ "RANDARRAY" , SC_OPCODE_RANDARRAY },
 { nullptr, -1 }
 };
 
@@ -2295,6 +2299,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
 { "FOURIER", SC_OPCODE_FOURIER },
 { "RAND.NV" , SC_OPCODE_RANDOM_NV },
 { "RANDBETWEEN.NV" , SC_OPCODE_RANDBETWEEN_NV },
+{ "RANDARRAY" , SC_OPCODE_RANDARRAY },
 { nullptr, -1 }
 };
 
@@ -2747,6 +2752,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES[] =
 { NC_("RID_STRLIST_FUNCTION_NAMES", "FOURIER"), SC_OPCODE_FOURIER },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "RAND.NV"), SC_OPCODE_RANDOM_NV },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "RANDBETWEEN.NV"), 
SC_OPCODE_RANDBETWEEN_NV },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "RANDARRAY"), SC_OPCODE_RANDARRAY },
 
 { {}, -1 }
 };
diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index 0f75df5cc184..3157e767c5aa 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1171,6 +1171,8 @@ bool FormulaCompiler::IsOpCodeVolatile( OpCode eOp )
 case ocOffset:
 // ocDebugVar shows internal value that may change as the internal 
state changes.
 case ocDebugVar:
+// ocRandArray is a volatile function.
+case ocRandArray:
 bRet = true;
 break;
 default:
@@ -1234,6 +1236,7 @@ bool FormulaCompiler::IsMatrixFunction( OpCode eOpCode )
 case ocFilter :
 case ocSort :
 case ocSortBy :
+case ocRandArray :
 return true;
 default:
 {
diff --git a/include/formula/compiler.hxx b/include/formula/compiler.hxx
index 3bb1ccdce126..4fe03f59cf95 100644

core.git: Changes to 'refs/tags/cp-24.04.2-1'

2024-05-08 Thread Miklos Vajna (via logerrit)
Tag 'cp-24.04.2-1' created by Aron Budea  at 
2024-05-08 15:21 +

cp-24.04.2-1

Changes since cp-24.04.1-4-81:
---
 0 files changed
---


core.git: framework/inc framework/qa framework/source

2024-05-08 Thread Noel Grandin (via logerrit)
 framework/inc/helper/statusindicatorfactory.hxx|4 
 framework/inc/services/layoutmanager.hxx   |4 
 framework/inc/uiconfiguration/imagemanager.hxx |4 
 framework/inc/uielement/uicommanddescription.hxx   |4 
 framework/inc/uifactory/menubarfactory.hxx |4 
 framework/qa/cppunit/dispatchtest.cxx  |   13 -
 framework/qa/cppunit/loadenv.cxx   |4 
 framework/qa/cppunit/services.cxx  |   29 +-
 framework/source/accelerators/acceleratorconfiguration.cxx |   42 +--
 framework/source/accelerators/documentacceleratorconfiguration.cxx |6 
 framework/source/accelerators/globalacceleratorconfiguration.cxx   |4 
 framework/source/accelerators/keymapping.cxx   |2 
 framework/source/accelerators/moduleacceleratorconfiguration.cxx   |8 
 framework/source/accelerators/presethandler.cxx|4 
 framework/source/dispatch/dispatchdisabler.cxx |4 
 framework/source/dispatch/interceptionhelper.cxx   |6 
 framework/source/dispatch/mailtodispatcher.cxx |2 
 framework/source/dispatch/oxt_handler.cxx  |6 
 framework/source/dispatch/popupmenudispatcher.cxx  |6 
 framework/source/dispatch/servicehandler.cxx   |2 
 framework/source/dispatch/systemexec.cxx   |2 
 framework/source/fwe/classes/actiontriggercontainer.cxx|2 
 framework/source/fwe/classes/actiontriggerpropertyset.cxx  |   10 
 framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx |2 
 framework/source/fwe/classes/addonsoptions.cxx |   14 -
 framework/source/fwe/classes/rootactiontriggercontainer.cxx|2 
 framework/source/fwe/helper/actiontriggerhelper.cxx|   26 +-
 framework/source/fwe/helper/titlehelper.cxx|2 
 framework/source/fwe/helper/undomanagerhelper.cxx  |   16 -
 framework/source/fwe/xml/menudocumenthandler.cxx   |2 
 framework/source/fwe/xml/toolboxdocumenthandler.cxx|8 
 framework/source/fwe/xml/xmlnamespaces.cxx |   10 
 framework/source/fwi/threadhelp/transactionmanager.cxx |4 
 framework/source/fwi/uielement/constitemcontainer.cxx  |2 
 framework/source/fwi/uielement/rootitemcontainer.cxx   |2 
 framework/source/helper/oframes.cxx|2 
 framework/source/helper/persistentwindowstate.cxx  |   12 -
 framework/source/helper/statusindicatorfactory.cxx |8 
 framework/source/helper/titlebarupdate.cxx |8 
 framework/source/helper/vclstatusindicator.cxx |2 
 framework/source/jobs/helponstartup.cxx|   14 -
 framework/source/jobs/job.cxx  |4 
 framework/source/jobs/jobdata.cxx  |   20 -
 framework/source/jobs/jobdispatch.cxx  |4 
 framework/source/jobs/jobexecutor.cxx  |6 
 framework/source/jobs/shelljob.cxx |   12 -
 framework/source/layoutmanager/helpers.cxx |2 
 framework/source/layoutmanager/layoutmanager.cxx   |   24 +-
 framework/source/layoutmanager/toolbarlayoutmanager.cxx|   18 -
 framework/source/loadenv/loadenv.cxx   |   38 +--
 framework/source/recording/dispatchrecorder.cxx|   10 
 framework/source/recording/dispatchrecordersupplier.cxx|8 
 framework/source/services/ContextChangeEventMultiplexer.cxx|   10 
 framework/source/services/autorecovery.cxx |   24 +-
 framework/source/services/desktop.cxx  |   18 -
 framework/source/services/dispatchhelper.cxx   |6 
 framework/source/services/frame.cxx|   46 +--
 framework/source/services/mediatypedetectionhelper.cxx |4 
 framework/source/services/modulemanager.cxx|   20 -
 framework/source/services/pathsettings.cxx |  116 
+-
 framework/source/services/sessionlistener.cxx  |   10 
 framework/source/services/substitutepathvars.cxx   |   12 -
 framework/source/services/taskcreatorsrv.cxx   |4 
 framework/source/services/uriabbreviation.cxx  |4 
 framework/source/services/urltransformer.cxx   |4 
 framework/source/ui

core.git: Branch 'libreoffice-24-2' - framework/source

2024-05-08 Thread Michael Stahl (via logerrit)
 framework/source/uielement/menubarmanager.cxx |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 5d996d2bcfcd16ae411c68be070967f4feae
Author: Michael Stahl 
AuthorDate: Wed Mar 20 21:42:50 2024 +0100
Commit: Thorsten Behrens 
CommitDate: Wed May 8 16:42:38 2024 +0200

framework: MenuBarManager: fix WNT crash if queryDispatch() throws

a Java extension throws RuntimeException from queryDispatch(), which is
translated to a C++ exception and thrown by the mscx_uno bridge, and this
is apparently not handled anywhere (Visual Studio says "Unhandled
Exception"), and what happens then apparently is the exception goes poof
and vanishes, and normal return from the mscx_uno bridge code happens,
but the out parameter used for the return value is never initialised, and
then the uno::Reference move assignment operator crashes.

Change-Id: I21535fcf0ab4ec30a712d01b5039b7e2fb7b09d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165081
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 
(cherry picked from commit 447a15f4772bcbc9366cfa43b92c55ae644e9b03)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165113
Reviewed-by: Thorsten Behrens 
Tested-by: Jenkins

diff --git a/framework/source/uielement/menubarmanager.cxx 
b/framework/source/uielement/menubarmanager.cxx
index 2abd58434827..fd9485a01909 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -660,7 +660,16 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu, bool )
 if ( aTargetURL.Complete.startsWith( ".uno:StyleApply?" ) )
 xMenuItemDispatch = new StyleDispatcher( m_xFrame, 
m_xURLTransformer, aTargetURL );
 else
-xMenuItemDispatch = xDispatchProvider->queryDispatch( 
aTargetURL, menuItemHandler->aTargetFrame, 0 );
+{
+try
+{
+xMenuItemDispatch = xDispatchProvider->queryDispatch( 
aTargetURL, menuItemHandler->aTargetFrame, 0 );
+}
+catch (uno::Exception const&)
+{
+TOOLS_WARN_EXCEPTION("fwk.uielement", 
"MenuBarManager::Activate(): exception from queryDispatch()");
+}
+}
 
 bool bPopupMenu( false );
 if ( !menuItemHandler->xPopupMenuController.is() &&


ESC meeting agenda: 2024-05-09 16:00 CEST

2024-05-08 Thread Miklos Vajna

Hi,

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

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

You can join using Jitsi here:

https://jitsi.documentfoundation.org/esc

Regards,

Miklos

---

* Present:
+

* Completed Action Items:

* Pending Action Items:

* Release Engineering update (Cloph)
+ 7.6: 7.6.7 release: this week?
+ 24.2: 24.2.4 RC1 in 1 week?
+ 24.8: first alpha this week?

* Documentation (Olivier)
+ Bugzilla Documentation statistics
263(263) bugs open
+ Updates:
BZ changes   1 week   1 month   3 months   12 months
   created 14(5)39(2) 107(7) 225(4)
 commented 20(10)   61(0) 255(5) 854(6)
  resolved  7(2)23(5)  54(6) 121(4)
+ top 10 contributors:
  Olivier Hallot made 42 changes in 1 month, and 239 changes in 1 year
  Stéphane Guillou made 28 changes in 1 month, and 253 changes in 1 year
  Vernon, Stuart Foote made 22 changes in 1 month, and 107 changes in 1 
year
  Ilmari Lauhakangas made 10 changes in 1 month, and 73 changes in 1 
year
  Kaganski, Mike made 8 changes in 1 month, and 74 changes in 1 year
  Nabet, Julien made 6 changes in 1 month, and 59 changes in 1 year
  Cor Nouws made 5 changes in 1 month, and 8 changes in 1 year
  Heiko Tietze made 4 changes in 1 month, and 76 changes in 1 year
  nobu made 4 changes in 1 month, and 16 changes in 1 year
  Kira Tubo made 2 changes in 1 month, and 2 changes in 1 year

* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
240(240) (topicUI) bugs open, 35(35) (needsUXEval) needs to be 
evaluated by the UXteam
+ Updates:
BZ changes   1 week   1 month   3 months   12 months
 added  4(-1)10(1) 15(-1)  21(-3)
 commented 64(48)   186(30)   525(-6)1761(-60)
   removed  0(-2) 4(-1) 5(0)   12(-1)
  resolved  8(2) 31(1) 79(-2) 308(-7)
+ top 10 contributors:
  Heiko Tietze made 110 changes in 1 month, and 1031 changes in 1 year
  Vernon, Stuart Foote made 108 changes in 1 month, and 317 changes in 
1 year
  Stéphane Guillou made 51 changes in 1 month, and 621 changes in 1 year
  Cor Nouws made 21 changes in 1 month, and 33 changes in 1 year
  Dieter made 18 changes in 1 month, and 139 changes in 1 year
  Ilmari Lauhakangas made 16 changes in 1 month, and 131 changes in 1 
year
  Eyal Rozenberg made 10 changes in 1 month, and 125 changes in 1 year
  Ady made 6 changes in 1 month, and 122 changes in 1 year
  jan d made 5 changes in 1 month, and 5 changes in 1 year
  *UNKNOWN* made 5 changes in 1 month, and 5 changes in 1 year

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

* Crash Reporting (Xisco)
+ 24.2.1.173(+3)
+ 24.2.1.213738(+798)
+ 24.2.2.28930(+1873)
+ 24.2.3.2487(+0)

* Mentoring (Hossein)
  committer...   1 week 1 month 3 months12 months
  open  81(-11)142(-21)178(-17) 178(-17)
   reviews 450(100)   1206(56)3718(76)12462(22)
merged 350(51)1140(127)   3369(127)   12593(81)
 abandoned  13(4)   55(-2) 172(-2)  656(-1)
   own commits 250(27) 827(103)   2303(119)9229(1)
review commits  51(3)  224(-8) 871(14) 3012(-51)
contributor...   1 week 1 month 3 months12 months
  open  37(4)   77(7)  103(8)   103(8)
   reviews 962(132)   2774(178)   7906(220)   29522(6)
merged  23(3)   98(-20)385(5)  1635(-61)
 abandoned   9(-4)  49(-5) 288(-10) 704(-3)
   own commits  25(0)  105(-8) 449(10) 1126(-7)
review commits   0(0)0(0)0(0) 0(0)
+ easyHack statistics:
   needsDevEval 8(8)   needsUXEval 1(1)   cleanup_comments 326(326)
   total 408(408)   assigned 26(26)   open 348(348)
+ top 10 contributors:
  Armin Le Grand (allotropia) made 7 patches in 1 month, and 87 patches 
in 1 year
  Ritobroto Mukherjee made 5 patches in 1 month, and 15 patches in 1 
year
made 4 patches in 1 month, and 7 patches in 1 year
  Kira Tubo made 4 patches in 1 month, and 14 patches in 1 year
  Jakub Kościelak made 4 patches in 1 month, and 4 patches in 1 year
  colton Garrett made 4 patches in 1 month, and 4 patches in 1 year
  Stéphane Guillou made 3 patches in 1 month, and 7 patches in 1 year
  Stéphane Guillou made 3 patches in 1 month, and 58 patches in 1 year
 

core.git: Branch 'feature/cib_contract49c' - sw/qa

2024-05-08 Thread Thorsten Behrens (via logerrit)
 sw/qa/uitest/writer_tests7/tdf150443.py |   48 ---
 sw/qa/uitest/writer_tests7/tdf156783.py |   63 --
 sw/qa/uitest/writer_tests7/tdf156784.py |   38 
 sw/qa/uitest/writer_tests7/tdf156900.py |   46 --
 sw/qa/uitest/writer_tests7/tdf46561.py  |   97 --
 sw/qa/uitest/writer_tests7/tdf90401.py  |  139 
 sw/qa/uitest/writer_tests8/tdf159102.py |   97 --
 7 files changed, 528 deletions(-)

New commits:
commit bff92c0c289b3dfe4d05e92b928c7c371307d0f2
Author: Thorsten Behrens 
AuthorDate: Tue May 7 23:39:36 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Wed May 8 15:58:55 2024 +0200

Remove known-problematic tests

Trying to address similar issues as on 7-6, via
https://gerrit.libreoffice.org/c/core/+/164714.

Change-Id: I43a3680c12d5e2d69e61854af6496fac24530524
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167297
Tested-by: allotropia jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/sw/qa/uitest/writer_tests7/tdf150443.py 
b/sw/qa/uitest/writer_tests7/tdf150443.py
deleted file mode 100644
index 91937551a4b3..
--- a/sw/qa/uitest/writer_tests7/tdf150443.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
-from libreoffice.uno.propertyvalue import mkPropertyValues
-
-class tdf150443(UITestCase):
-
-def test_tdf150443(self):
-with self.ui_test.load_file(get_url_for_data_file("tdf150443.docx")):
-xWriterDoc = self.xUITest.getTopFocusWindow()
-xWriterEdit = xWriterDoc.getChild("writer_edit")
-xToolkit = 
self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
-
-# search term "Jump here!"
-with 
self.ui_test.execute_modeless_dialog_through_command(".uno:SearchDialog", 
close_button="close") as xDialog:
-searchterm = xDialog.getChild("searchterm")
-searchterm.executeAction("TYPE", 
mkPropertyValues({"TEXT":"Jump here!"}))
-xsearch = xDialog.getChild("search")
-xsearch.executeAction("CLICK", tuple())  #first search
-xToolkit.processEventsToIdle()
-page = get_state_as_dict(xWriterEdit)["CurrentPage"]
-# page may depend on font subsitution, just check it moved
-self.assertTrue(page == "4" or page == "5")
-
-# reject the tracked table row in Manage Changes dialog window
-with 
self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptTrackedChanges",
 close_button="close") as xTrackDlg:
-changesList = xTrackDlg.getChild("writerchanges")
-
-items = len(changesList.getChildren())
-
-# select tree parent of the actual tracked row deletion in 
tree list
-changesList.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"LEFT"}))
-xToolkit.processEventsToIdle()
-
-# Without the fix in place, it would have crashed here
-xAccBtn = xTrackDlg.getChild("reject")
-xAccBtn.executeAction("CLICK", tuple())
-self.assertEqual(items - 1, len(changesList.getChildren()))
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests7/tdf156783.py 
b/sw/qa/uitest/writer_tests7/tdf156783.py
deleted file mode 100644
index 2ccdb7dcf6e1..
--- a/sw/qa/uitest/writer_tests7/tdf156783.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.common import get_url_for_data_file
-
-# Bug 156783 - crash fix: setting table border on a table without correct 
table cursor
-
-class tdf156783(UITestCase):
-def test_tdf156783(self):
-with 
self.ui_test.load_file(get_url_for_data_file("TC-table-del-add.docx")) as 
self.document:
-
-xToolkit = 
self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
-
-# accept all tracked changes
-self.xUITest.executeCommand(".

core.git: sw/inc sw/qa sw/source

2024-05-08 Thread Justin Luth (via logerrit)
 dev/null|binary
 sw/inc/crsrsh.hxx   |2 -
 sw/qa/uitest/writer_tests8/tdf150037.py |   43 
 sw/source/core/crsr/crbm.cxx|9 ++
 sw/source/uibase/docvw/edtwin.cxx   |6 
 sw/source/uibase/inc/edtwin.hxx |2 -
 sw/source/uibase/inc/wrtsh.hxx  |2 -
 sw/source/uibase/uitest/uiobject.cxx|   37 ---
 sw/source/uibase/wrtsh/wrtsh3.cxx   |4 +-
 9 files changed, 8 insertions(+), 97 deletions(-)

New commits:
commit 22dd422f7ccf7a1ce4dc7fe5b274263a55e464c7
Author: Justin Luth 
AuthorDate: Sat May 4 13:26:53 2024 -0400
Commit: Justin Luth 
CommitDate: Wed May 8 15:28:08 2024 +0200

Revert "tdf#150037 Writer: text fieldmark behaviour changed"

This reverts 24.8 commit 96323a10d3a55d212c350886e2a1344c0cd2ba95.
A mouse click selects the fieldmark to be able to overwrite
the field with the next text input.
But I did not revert:
Additionally the EN SPACE (0x2002) character is visualized
by the DEGREE symbol when 'View/Formatting Marks' is active.

The problem was that the field itself was also selected,
so not only was the placeholder text overwritten,
but so was the entire field.

Additionally, it is ONLY placeholder text that should be selected,
but this was also selecting non-placeholder
(i.e. custom user-entered text) that was being pre-selected
which is NOT what happens in MS Word.

The whole point of the patch in the first place was to
emulate MS Word's response to placeholder text,
so we should also be emulating what happens
to non-placeholder text. That would require tracking
whether the field's text was placeholder or not,
which is not currently track in legacy fields.

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

diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 23dd92da39e1..f5e52e398f3d 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -593,7 +593,7 @@ public:
 ::sw::mark::IFieldmark* GetCurrentFieldmark();
 sw::mark::IFieldmark* GetFieldmarkAfter();
 sw::mark::IFieldmark* GetFieldmarkBefore();
-bool GotoFieldmark( const ::sw::mark::IFieldmark* const pMark, bool 
completeSelection = false );
+bool GotoFieldmark(const ::sw::mark::IFieldmark* const pMark);
 
 // update Cursr, i.e. reset it into content should only be called when the
 // cursor was set to a random position e.g. when deleting frames
diff --git a/sw/qa/uitest/data/tdf150037.docx b/sw/qa/uitest/data/tdf150037.docx
deleted file mode 100644
index 4fcb18efd724..
Binary files a/sw/qa/uitest/data/tdf150037.docx and /dev/null differ
diff --git a/sw/qa/uitest/data/tdf150037.odt b/sw/qa/uitest/data/tdf150037.odt
deleted file mode 100644
index 15d75a694b0a..
Binary files a/sw/qa/uitest/data/tdf150037.odt and /dev/null differ
diff --git a/sw/qa/uitest/writer_tests8/tdf150037.py 
b/sw/qa/uitest/writer_tests8/tdf150037.py
deleted file mode 100644
index e81cf947affc..
--- a/sw/qa/uitest/writer_tests8/tdf150037.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-from uitest.framework import UITestCase
-from uitest.uihelper.common import get_url_for_data_file
-from libreoffice.uno.propertyvalue import mkPropertyValues
-
-class tdf150037(UITestCase):
-
-def test_tdf150037(self):
-
-with self.ui_test.load_file(get_url_for_data_file("tdf150037.docx")) 
as document:
-
-xWriterDoc = self.xUITest.getTopFocusWindow()
-xWriterEdit = xWriterDoc.getChild("writer_edit")
-
-xWriterEdit.executeAction("CLICK", mkPropertyValues({"START_POS": 
"14", "END_POS": "14"}))
-xWriterEdit.executeAction("TYPE", mkPropertyValues({"TEXT": 
"Replacement"}))
-xWriterEdit.executeAction("SELECT", mkPropertyValues({"START_POS": 
"0", "END_POS": "22"}))
-windowState = xWriterEdit.getState();
-self.assertEqual(windowState[14].Value, "Fieldmark: Replacement")
-
-def test_tdf150037_protected(self):
-
-with self.ui_test.load_file(get_url_for_data_file("tdf150037.odt")) as 
document:
-
-xWriterDoc = self.xUITest.getTopFocusWindow()
-xWriterEdit = xWriterDoc.getChild("writer_edit")
-
-xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"DOWN"}))
-xWriterEdit.executeAction("CLICK", mkPropertyValues({"START_POS": 
"14", "END_POS": "14

core.git: Branch 'distro/collabora/co-24.04' - sw/CppunitTest_sw_core_layout.mk sw/qa sw/source

2024-05-08 Thread Miklos Vajna (via logerrit)
 sw/CppunitTest_sw_core_layout.mk  |1 
 sw/qa/core/layout/calcmove.cxx|   44 ++
 sw/qa/core/layout/data/ignore-top-margin.docx |binary
 sw/source/core/inc/frame.hxx  |3 +
 sw/source/core/layout/calcmove.cxx|   32 ++
 sw/source/core/layout/flowfrm.cxx |5 ++
 6 files changed, 85 insertions(+)

New commits:
commit 4fe480d314ceb100f4679626fee3d60dd82a6bc6
Author: Miklos Vajna 
AuthorDate: Tue May 7 08:13:37 2024 +0200
Commit: Caolán McNamara 
CommitDate: Wed May 8 15:12:18 2024 +0200

tdf#160952 sw: ignore top margin of para on non-first pages with newer DOCX

The 2nd page of the bugdoc has a single paragraph, with a non-zero top
margin. This is ignored in Word, but wasn't ignored in Writer.

Experimenting with the document, it looks like old Word files also don't
ignore this top margin: it started when the compat mode is upgraded
(from binary DOC or Word 2010) to Word 2013 or newer. Also the top
margin is only ignored for the first paragraph on the page, and only in
case it's not on the first page.

Fix the problem by introducing a new SwFrame::IsCollapseUpper() function
to decide if the upper margin should be collapsed or not, and then by
using it in SwFlowFrame::CalcUpperSpace() at one place where we read the
top margin from the doc model. Take advantage of the fact that we have
related, existing compat flags that tell us if we're in "Word >= 2013"
compat mode: see e.g. GetFlyAnchorBottom(), which explains
DocumentSettingId::TAB_OVER_MARGIN is a good indicator that this is a
"Word <= 2010" document. Also, DocumentSettingId::TAB_OVER_SPACING is an
indicator that this is a Word document, so we want the "TabOverSpacing
&& !TabOverMargin" case.

This doesn't change all reads of the upper spacing of a text node, but
is enough to avoid the unwanted top spacing, as demonstrated by the
bugdoc.

(cherry picked from commit 6200d89b905d51776ff4f3c8a84f338655ffaa7f)

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

diff --git a/sw/CppunitTest_sw_core_layout.mk b/sw/CppunitTest_sw_core_layout.mk
index 5eb874400d53..d64a43f7d3fb 100644
--- a/sw/CppunitTest_sw_core_layout.mk
+++ b/sw/CppunitTest_sw_core_layout.mk
@@ -14,6 +14,7 @@ $(eval $(call gb_CppunitTest_CppunitTest,sw_core_layout))
 $(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_core_layout))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,sw_core_layout, \
+sw/qa/core/layout/calcmove \
 sw/qa/core/layout/fly \
 sw/qa/core/layout/flycnt \
 sw/qa/core/layout/frmtool \
diff --git a/sw/qa/core/layout/calcmove.cxx b/sw/qa/core/layout/calcmove.cxx
new file mode 100644
index ..3e4deec52ae8
--- /dev/null
+++ b/sw/qa/core/layout/calcmove.cxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+#include 
+
+namespace
+{
+/// Covers sw/source/core/layout/calcmove.cxx fixes.
+class Test : public SwModelTestBase
+{
+public:
+Test()
+: SwModelTestBase("/sw/qa/core/layout/data/")
+{
+}
+};
+
+CPPUNIT_TEST_FIXTURE(Test, testIgnoreTopMargin)
+{
+// Given a DOCX (>= Word 2013) file, with 2 pages:
+// When loading that document:
+createSwDoc("ignore-top-margin.docx");
+
+// Then make sure that the paragraph on the 2nd page has no top margin:
+xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+sal_Int32 nParaTopMargin
+= getXPath(pXmlDoc, "/root/page[2]/body/txt/infos/prtBounds"_ostr, 
"top"_ostr).toInt32();
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 0
+// - Actual  : 2400
+// i.e. the top margin in the first para of a non-first page wasn't 
ignored, like in Word.
+CPPUNIT_ASSERT_EQUAL(static_cast(0), nParaTopMargin);
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/layout/data/ignore-top-margin.docx 
b/sw/qa/core/layout/data/ignore-top-margin.docx
new file mode 100644
index ..d05a1358db1e
Binary files /dev/null and b/sw/qa/core/layout/data/ignore-top-margin.docx 
differ
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 604488a18c9f..a86358508182 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -948,6 +948,9 @@ public:
 virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const;
 void dumpChildrenAsXm

core.git: dbaccess/source extensions/source reportdesign/source

2024-05-08 Thread Caolán McNamara (via logerrit)
 dbaccess/source/core/api/column.cxx |2 -
 dbaccess/source/core/misc/dsntypes.cxx  |2 -
 dbaccess/source/ui/browser/unodatbr.cxx |6 ++--
 dbaccess/source/ui/dlg/DbAdminImpl.cxx  |   20 
 dbaccess/source/ui/dlg/sqlmessage.cxx   |2 -
 dbaccess/source/ui/querydesign/QTableConnectionData.cxx |4 +--
 dbaccess/source/ui/querydesign/QTableWindow.cxx |2 -
 dbaccess/source/ui/querydesign/QueryDesignView.cxx  |2 -
 dbaccess/source/ui/querydesign/QueryTableView.cxx   |4 +--
 dbaccess/source/ui/querydesign/TableWindowTitle.cxx |2 -
 extensions/source/dbpilots/commonpagesdbp.cxx   |2 -
 extensions/source/ole/unotypewrapper.cxx|2 -
 extensions/source/propctrlr/formcomponenthandler.cxx|2 -
 extensions/source/propctrlr/formmetadata.cxx|3 ++
 reportdesign/source/ui/inspection/metadata.cxx  |3 ++
 reportdesign/source/ui/report/ReportSection.cxx |2 -
 reportdesign/source/ui/report/propbrw.cxx   |1 
 17 files changed, 34 insertions(+), 27 deletions(-)

New commits:
commit a551290fc46d5f91b89615700c88b863a403bc7a
Author: Caolán McNamara 
AuthorDate: Wed May 8 09:39:25 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 8 15:11:42 2024 +0200

WaE: C6011 Dereferencing NULL pointer warnings

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

diff --git a/dbaccess/source/core/api/column.cxx 
b/dbaccess/source/core/api/column.cxx
index 58a8c1649cea..15378e22fd82 100644
--- a/dbaccess/source/core/api/column.cxx
+++ b/dbaccess/source/core/api/column.cxx
@@ -186,7 +186,7 @@ void OColumns::append( const OUString& _rName, OColumn* 
_pColumn )
 {
 MutexGuard aGuard(m_rMutex);
 
-OSL_ENSURE( _pColumn, "OColumns::append: invalid column!" );
+assert(_pColumn && "OColumns::append: invalid column!");
 OSL_ENSURE( !m_pElements->exists( _rName ),"OColumns::append: Column 
already exists");
 
 _pColumn->m_sName = _rName;
diff --git a/dbaccess/source/core/misc/dsntypes.cxx 
b/dbaccess/source/core/misc/dsntypes.cxx
index 2162c07240cb..0a25d603d4f1 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -509,7 +509,7 @@ ODsnTypeCollection::TypeIterator::TypeIterator(const 
ODsnTypeCollection* _pConta
 :m_pContainer(_pContainer)
 ,m_nPosition(_nInitialPos)
 {
-OSL_ENSURE(m_pContainer, "ODsnTypeCollection::TypeIterator::TypeIterator : 
invalid container!");
+assert(m_pContainer && "ODsnTypeCollection::TypeIterator::TypeIterator : 
invalid container!");
 #if OSL_DEBUG_LEVEL > 0
 ++const_cast(m_pContainer)->m_nLivingIterators;
 #endif
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx 
b/dbaccess/source/ui/browser/unodatbr.cxx
index bb226afc669f..e8c6f007719e 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1055,7 +1055,7 @@ OUString 
SbaTableQueryBrowser::getDataSourceAccessor(const weld::TreeIter& rData
 {
 weld::TreeView& rTreeView = m_pTreeView->GetWidget();
 DBTreeListUserData* pData = 
weld::fromId(rTreeView.get_id(rDataSourceEntry));
-OSL_ENSURE( pData, "SbaTableQueryBrowser::getDataSourceAccessor: invalid 
entry data!" );
+assert(pData && "SbaTableQueryBrowser::getDataSourceAccessor: invalid 
entry data!");
 OSL_ENSURE( pData->eType == etDatasource, 
"SbaTableQueryBrowser::getDataSourceAccessor: entry does not denote a data 
source!" );
 return !pData->sAccessor.isEmpty() ? pData->sAccessor : 
GetEntryText(rDataSourceEntry);
 }
@@ -2253,7 +2253,7 @@ bool SbaTableQueryBrowser::ensureEntryObject(const 
weld::TreeIter& rEntry)
 // the user data of the entry
 weld::TreeView& rTreeView = m_pTreeView->GetWidget();
 DBTreeListUserData* pEntryData = 
weld::fromId(rTreeView.get_id(rEntry));
-OSL_ENSURE(pEntryData,"ensureEntryObject: user data should already be 
set!");
+assert(pEntryData && "ensureEntryObject: user data should already be 
set!");
 
 std::unique_ptr xDataSourceEntry = 
m_pTreeView->GetRootLevelParent(&rEntry);
 
@@ -2759,7 +2759,7 @@ void SAL_CALL SbaTableQueryBrowser::elementInserted(const 
ContainerEvent& rEvent
 
 // insert the new entry into the tree
 DBTreeListUserData* pContainerData = 
weld::fromId(rTreeView.get_id(*xEntry));
-OSL_ENSURE(pContainerData, "elementInserted: There must be user data 
for this type!");
+assert(pContainerData && "elementInserted: There must be user data for 
this type!");
 
 DBTreeListUserData* pNewData = new DBTreeListUserData;
 bool bIsTable = etTableContainer == pContainerData->eType;
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx 
b/dbaccess/source/ui/dlg/DbAdminImpl.cxx

core.git: bridges/source

2024-05-08 Thread Stephan Bergmann (via logerrit)
 bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx |  315 +--
 1 file changed, 161 insertions(+), 154 deletions(-)

New commits:
commit 4fc4e24fb0ac549b7684aac8e020253c0cc76603
Author: Stephan Bergmann 
AuthorDate: Wed May 8 12:57:08 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed May 8 14:37:24 2024 +0200

Move call code out into a function of its own

...so that it can be reused in the future for attribute getters/setters

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

diff --git a/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx
index 41a471bcc9b0..a0fdd15e05e6 100644
--- a/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx
@@ -80,6 +80,165 @@ StructKind getKind(typelib_CompoundTypeDescription const* 
type)
 return StructKind::General;
 }
 }
+
+void call(bridges::cpp_uno::shared::UnoInterfaceProxy* proxy,
+  bridges::cpp_uno::shared::VtableSlot slot, 
typelib_TypeDescriptionReference* returnType,
+  sal_Int32 count, typelib_MethodParameter* parameters, void* 
returnValue, void** arguments,
+  uno_Any** exception)
+{
+OStringBuffer sig;
+std::vector args;
+switch (returnType->eTypeClass)
+{
+case typelib_TypeClass_VOID:
+sig.append('v');
+break;
+case typelib_TypeClass_BOOLEAN:
+case typelib_TypeClass_BYTE:
+case typelib_TypeClass_SHORT:
+case typelib_TypeClass_UNSIGNED_SHORT:
+case typelib_TypeClass_LONG:
+case typelib_TypeClass_UNSIGNED_LONG:
+case typelib_TypeClass_CHAR:
+case typelib_TypeClass_ENUM:
+sig.append('i');
+break;
+case typelib_TypeClass_HYPER:
+case typelib_TypeClass_UNSIGNED_HYPER:
+sig.append('j');
+break;
+case typelib_TypeClass_FLOAT:
+sig.append('f');
+break;
+case typelib_TypeClass_DOUBLE:
+sig.append('d');
+break;
+case typelib_TypeClass_STRING:
+case typelib_TypeClass_TYPE:
+case typelib_TypeClass_ANY:
+case typelib_TypeClass_SEQUENCE:
+case typelib_TypeClass_INTERFACE:
+sig.append("vi");
+args.push_back(reinterpret_cast(returnValue));
+break;
+case typelib_TypeClass_STRUCT:
+{
+typelib_TypeDescription* td = nullptr;
+css::uno::Type(returnType).getDescription(&td);
+switch (getKind(reinterpret_cast(td)))
+{
+case StructKind::Empty:
+break;
+case StructKind::I32:
+sig.append('i');
+break;
+case StructKind::I64:
+sig.append('j');
+break;
+case StructKind::F32:
+sig.append('f');
+break;
+case StructKind::F64:
+sig.append('d');
+break;
+case StructKind::General:
+sig.append("vi");
+args.push_back(reinterpret_cast(returnValue));
+break;
+}
+break;
+}
+default:
+O3TL_UNREACHABLE;
+}
+sig.append('i');
+args.push_back(reinterpret_cast(proxy->getCppI()));
+for (sal_Int32 i = 0; i != count; ++i)
+{
+if (parameters[i].bOut)
+{
+sig.append('i');
+args.push_back(reinterpret_cast(arguments[i]));
+}
+else
+{
+switch (parameters[i].pTypeRef->eTypeClass)
+{
+case typelib_TypeClass_BOOLEAN:
+sig.append('i');
+args.push_back(*reinterpret_cast(arguments[i]));
+break;
+case typelib_TypeClass_BYTE:
+sig.append('i');
+args.push_back(*reinterpret_cast(arguments[i]));
+break;
+case typelib_TypeClass_SHORT:
+sig.append('i');
+args.push_back(*reinterpret_cast(arguments[i]));
+break;
+case typelib_TypeClass_UNSIGNED_SHORT:
+sig.append('i');
+args.push_back(*reinterpret_cast(arguments[i]));
+break;
+case typelib_TypeClass_LONG:
+case typelib_TypeClass_ENUM:
+sig.append('i');
+args.push_back(*reinterpret_cast(arguments[i]));
+break;
+case typelib_TypeClass_UNSIGNED_LONG:
+sig.append('i');
+args.push_back

core.git: 2 commits - vcl/unx

2024-05-08 Thread Michael Weghorn (via logerrit)
 vcl/unx/gtk3/a11y/atkwrapper.cxx |   24 ++--
 1 file changed, 6 insertions(+), 18 deletions(-)

New commits:
commit 5e1aaaf07d70cb8eda1c7f14a458680d9323ff74
Author: Michael Weghorn 
AuthorDate: Wed May 8 10:26:55 2024 +0200
Commit: Michael Weghorn 
CommitDate: Wed May 8 13:56:16 2024 +0200

gtk3 a11y: Drop superfluous check

If `nStateSet` is 0, no states will be set int the
loop anyway, so the extra check is not needed.

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

diff --git a/vcl/unx/gtk3/a11y/atkwrapper.cxx b/vcl/unx/gtk3/a11y/atkwrapper.cxx
index a16e8f80834c..b83cf04d48b5 100644
--- a/vcl/unx/gtk3/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk3/a11y/atkwrapper.cxx
@@ -630,17 +630,13 @@ wrapper_ref_state_set( AtkObject *atk_obj )
 {
 try {
 sal_Int64 nStateSet = obj->mpContext->getAccessibleStateSet();
-
-if( nStateSet )
+for (int i = 0; i < 63; ++i)
 {
-for (int i=0; i<63; ++i)
-{
-// ATK_STATE_LAST_DEFINED is used to check if the state
-// is unmapped, do not report it to Atk
-sal_Int64 nState = sal_Int64(1) << i;
-if ( (nStateSet & nState) && mapAtkState( nState ) != 
ATK_STATE_LAST_DEFINED )
-atk_state_set_add_state( pSet, mapAtkState( nState ) );
-}
+// ATK_STATE_LAST_DEFINED is used to check if the state
+// is unmapped, do not report it to Atk
+sal_Int64 nState = sal_Int64(1) << i;
+if ((nStateSet & nState) && mapAtkState(nState) != 
ATK_STATE_LAST_DEFINED)
+atk_state_set_add_state(pSet, mapAtkState(nState));
 }
 }
 
commit addb7abeb8ec1a145d9ba35d3be8518f2502325b
Author: Michael Weghorn 
AuthorDate: Wed May 8 10:17:53 2024 +0200
Commit: Michael Weghorn 
CommitDate: Wed May 8 13:56:10 2024 +0200

gtk3 a11y: No longer manually add focused state for focus object

No longer manually add `ATK_STATE_FOCUSED` to the
ATK focus object.

The focused object should should have the
`css::accessbibility::AccessibleStateType::FOCUSED`
state set on UNO level, in which case this is already
mapped to the focused state in the lines above the
newly removed code, so explicitly addding it
again shouldn't be necessary.

If the state is missing, that most likely needs
to be fixed in the underlying `XAccessibleStateSet`
implementation.

Therefore, remove what looks like a workaround.
If any issues show up after this, let's rather take
a look at the underlying issues and try to fix things
there.

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

diff --git a/vcl/unx/gtk3/a11y/atkwrapper.cxx b/vcl/unx/gtk3/a11y/atkwrapper.cxx
index db0aa1dbc907..a16e8f80834c 100644
--- a/vcl/unx/gtk3/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk3/a11y/atkwrapper.cxx
@@ -641,14 +641,6 @@ wrapper_ref_state_set( AtkObject *atk_obj )
 if ( (nStateSet & nState) && mapAtkState( nState ) != 
ATK_STATE_LAST_DEFINED )
 atk_state_set_add_state( pSet, mapAtkState( nState ) );
 }
-
-// We need to emulate FOCUS state for menus, menu-items etc.
-if( atk_obj == atk_get_focus_object() )
-atk_state_set_add_state( pSet, ATK_STATE_FOCUSED );
-/* FIXME - should we do this ?
-else
-atk_state_set_remove_state( pSet, ATK_STATE_FOCUSED );
-*/
 }
 }
 


core.git: Branch 'libreoffice-24-2' - dbaccess/source

2024-05-08 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/relationdesign/RTableConnection.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3079e0c1ff781c77b0b279dea9ec97a5a24e5b92
Author: Caolán McNamara 
AuthorDate: Wed May 8 09:37:59 2024 +0100
Commit: Xisco Fauli 
CommitDate: Wed May 8 13:42:22 2024 +0200

return early on empty ORelationTableConnectionData*

we test for pData existing, but it it doesn't then we continue and
will typically dereference it, so test looks inverted

Change-Id: Iddcab25d5620942bb617bd1e9985322f5e497839
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167331
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins
(cherry picked from commit 0b97bfa88ffebf31778f0f68e883e046822cd264)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167313
Reviewed-by: Xisco Fauli 

diff --git a/dbaccess/source/ui/relationdesign/RTableConnection.cxx 
b/dbaccess/source/ui/relationdesign/RTableConnection.cxx
index ba60ae54661b..4b8086f5111f 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnection.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnection.cxx
@@ -51,7 +51,7 @@ void ORelationTableConnection::Draw(vcl::RenderContext& 
rRenderContext, const to
 {
 OTableConnection::Draw(rRenderContext, rRect);
 ORelationTableConnectionData* pData = static_cast< 
ORelationTableConnectionData* >(GetData().get());
-if (pData && (pData->GetCardinality() == Cardinality::Undefined))
+if (!pData || pData->GetCardinality() == Cardinality::Undefined)
 return;
 
 // search lines for top line


core.git: Branch 'distro/collabora/co-24.04' - 47 commits - bin/find-can-be-private-symbols.functions.results configure.ac cui/source cui/uiconfig dbaccess/source download.lst drawinglayer/source edit

2024-05-08 Thread Aron Budea (via logerrit)
 bin/find-can-be-private-symbols.functions.results  |5 
 configure.ac   |4 
 cui/source/tabpages/paragrph.cxx   |   10 
 cui/uiconfig/ui/optviewpage.ui |3 
 dbaccess/source/ui/relationdesign/RTableConnectionData.cxx |5 
 dbaccess/source/ui/relationdesign/RelationTableView.cxx|   10 
 download.lst   |8 
 drawinglayer/source/primitive2d/textlayoutdevice.cxx   |   67 
 drawinglayer/source/processor2d/vclprocessor2d.cxx |   28 
 editeng/source/editeng/impedit3.cxx|2 
 extras/source/tipoftheday/formdocuments.svg|2 
 include/drawinglayer/primitive2d/textlayoutdevice.hxx  |2 
 include/formula/tokenarray.hxx |2 
 include/svl/numformat.hxx  |   31 
 include/svl/zformat.hxx|   12 
 include/vcl/outdev.hxx |7 
 include/vcl/vcllayout.hxx  |5 
 odk/docs/install.html  |2 
 readlicense_oo/license/CREDITS.fodt| 3327 ++---
 sc/Module_sc.mk|7 
 sc/inc/interpretercontext.hxx  |4 
 sc/qa/uitest/pasteSpecial/tdf160765.py |  109 
 sc/qa/unit/data/ods/tdf160329_sortWithHiddenRows.ods   |binary
 sc/qa/unit/scshapetest.cxx |   37 
 sc/source/core/data/queryevaluator.cxx |2 
 sc/source/core/data/table3.cxx |   78 
 sc/source/core/tool/interpr4.cxx   |   49 
 sc/source/ui/miscdlgs/inscodlg.cxx |4 
 sc/source/ui/navipi/content.cxx|2 
 sc/source/ui/view/viewfun3.cxx |3 
 sc/uiconfig/scalc/ui/conditionalentry.ui   |  343 -
 sd/qa/unit/data/odg/adjust-to-contour.fodg |   52 
 sd/qa/unit/layout-tests.cxx|   48 
 sfx2/source/doc/objstor.cxx|6 
 svgio/inc/svgcharacternode.hxx |8 
 svgio/inc/svgstyleattributes.hxx   |8 
 svgio/qa/cppunit/SvgImportTest.cxx |  150 
 svgio/qa/cppunit/data/contextStroke.svg|   14 
 svgio/qa/cppunit/data/tdf160773.svg|5 
 svgio/source/svgreader/svgcharacternode.cxx|  115 
 svgio/source/svgreader/svgdocumenthandler.cxx  |   83 
 svgio/source/svgreader/svgmarkernode.cxx   |2 
 svgio/source/svgreader/svgstyleattributes.cxx  |   38 
 svl/source/items/itemset.cxx   |   18 
 svl/source/numbers/zforlist.cxx|   15 
 svl/source/numbers/zformat.cxx |   12 
 svx/source/dialog/svxruler.cxx |2 
 sw/qa/core/text/data/Broken indent demo.odt|binary
 sw/qa/core/text/data/tdf156146.fodt|  281 +
 sw/qa/core/text/text.cxx   |   62 
 sw/qa/extras/odfexport/odfexport2.cxx  |6 
 sw/qa/extras/uiwriter/data/table-in-table.fodt |   29 
 sw/qa/extras/uiwriter/uiwriter9.cxx|   14 
 sw/qa/uitest/writer_tests2/formatParagraph.py  |2 
 sw/source/core/crsr/crsrsh.cxx |   12 
 sw/source/core/text/inftxt.hxx |6 
 sw/source/core/text/itratr.hxx |2 
 sw/source/core/text/itrtxt.hxx |2 
 sw/source/filter/html/htmlctxt.cxx |3 
 sysui/desktop/menus/calc.desktop   |2 
 sysui/desktop/menus/draw.desktop   |2 
 sysui/desktop/menus/impress.desktop|2 
 sysui/desktop/menus/math.desktop   |2 
 sysui/desktop/menus/writer.desktop |2 
 vcl/inc/qt5/QtTransferable.hxx |   31 
 vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx |   12 
 vcl/qa/cppunit/pdfexport/pdfexport2.cxx|6 
 vcl/qt5/QtClipboard.cxx|2 
 vcl/qt5/QtTransferable.cxx |   81 
 vcl/skia/gdiimpl.cxx   |2 
 vcl/source/app/svapp.cxx   |1 
 vcl/source/bitmap/BitmapEx.cxx |   11 
 vcl/source/filter/webp/reader.cxx  |4 
 vcl/source/gdi/pdfw

core.git: bridges/CustomTarget_gcc3_wasm.mk bridges/inc bridges/Library_cpp_uno.mk bridges/Module_bridges.mk bridges/source offapi/org offapi/UnoApi_offapi.mk Repository.mk solenv/gbuild static/Execut

2024-05-08 Thread Stephan Bergmann (via logerrit)
 Repository.mk  |2 
 bridges/CustomTarget_gcc3_wasm.mk  |   26 
 bridges/Library_cpp_uno.mk |6 
 bridges/Module_bridges.mk  |1 
 bridges/inc/wasm/callvirtualfunction.hxx   |   21 
 bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx   |  226 +++
 offapi/UnoApi_offapi.mk|2 
 offapi/org/libreoffice/embindtest/StructLong.idl   |   18 
 offapi/org/libreoffice/embindtest/StructString.idl |   18 
 offapi/org/libreoffice/embindtest/XTest.idl|4 
 solenv/gbuild/extensions/pre_BuildTools.mk |2 
 static/Executable_wasmcallgen.mk   |   26 
 static/Module_static.mk|1 
 static/source/wasmcallgen/wasmcallgen.cxx  |  610 +
 unotest/source/embindtest/embindtest.cxx   |   23 
 unotest/source/embindtest/embindtest.js|  330 +++
 16 files changed, 1313 insertions(+), 3 deletions(-)

New commits:
commit a469aea9c0b532d928cd41e389c9c51de1af06f0
Author: Stephan Bergmann 
AuthorDate: Wed May 8 09:46:55 2024 +0200
Commit: Stephan Bergmann 
CommitDate: Wed May 8 13:01:04 2024 +0200

Emscripten: Towards a working C++ UNO bridge

...by making the general UNO -> C++ function call case work (modulo handling
exceptions, which I'll look into later).

Wasm call_indirect unfortunately needs to statically know the call target's
signature, so we statically need to know all possible signatures.  So 
introduce
wasmcallgen helper to scan the existing UNOIDL API upfront and generate the
relevant callvirtualfunction-wrapper.cxx and callvirtualfunction-inst.s 
code.
(The good thing is that the number of different signatures is somewhat 
limited,
each parameter can only be one of i32, i64, f32, or f64.  So even if 
3rd-party
extensions bring along new UNOIDL interface methods, chances are relatively 
high
that the signatures needed for them would already be covered by the existing
ones.)

Testing this can nicely be done in unotest/source/embindtest/embindtest.js 
via
css.script.Invocation (which internally exercises the relevant code).  
(Instead
of adding individual org.libreoffice.embindtest.StructLong/String etc., it 
would
be nicer to introduce some polymorphic StructOne, but the Emind UNO 
binding
does not support polymorphic structs, so the embindtest.js code would not 
work.)

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

diff --git a/Repository.mk b/Repository.mk
index e910b6d572b7..b6ebf64dcf39 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -33,7 +33,7 @@ $(eval $(call gb_Helper_register_executables,NONE, \
concat-deps \
cpp \
cppunittester \
-   $(if $(or $(filter EMSCRIPTEN,$(BUILD_TYPE_FOR_HOST)),$(filter 
EMSCRIPTEN,$(OS))),embindmaker) \
+   $(if $(or $(filter EMSCRIPTEN,$(BUILD_TYPE_FOR_HOST)),$(filter 
EMSCRIPTEN,$(OS))),embindmaker wasmcallgen) \
gbuildtojson \
$(if $(filter MSC,$(COM)), \
gcc-wrapper \
diff --git a/bridges/CustomTarget_gcc3_wasm.mk 
b/bridges/CustomTarget_gcc3_wasm.mk
new file mode 100644
index ..a88da8577282
--- /dev/null
+++ b/bridges/CustomTarget_gcc3_wasm.mk
@@ -0,0 +1,26 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 
100 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,bridges/gcc3_wasm))
+
+$(eval $(call gb_CustomTarget_register_targets,bridges/gcc3_wasm, \
+callvirtualfunction-wrapper.cxx \
+callvirtualfunction-impls.s \
+))
+
+$(gb_CustomTarget_workdir)/bridges/gcc3_wasm/callvirtualfunction-impls.s \
+$(gb_CustomTarget_workdir)/bridges/gcc3_wasm/callvirtualfunction-wrapper.cxx: \
+$(call gb_Executable_get_target_for_build,wasmcallgen) $(call 
gb_UnoApi_get_target,udkapi) \
+$(call gb_UnoApi_get_target,offapi)
+   $(call gb_Executable_get_command,wasmcallgen) \
+
$(gb_CustomTarget_workdir)/bridges/gcc3_wasm/callvirtualfunction-wrapper.cxx \
+
$(gb_CustomTarget_workdir)/bridges/gcc3_wasm/callvirtualfunction-impls.s \
++$(call gb_UnoApi_get_target,udkapi) +$(call 
gb_UnoApi_get_target,offapi)
+
+# vim: set noet sw=4 ts=4:
diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk
index dcf83cf34e5b..c42778f359c1 100644
--- a/bridges/Library_cpp_uno.mk
+++ b/bridges/Library_cpp_uno.mk
@@ -84,6 +84,12 @@ bridge_noopt_objects := except
 else ifeq ($(OS),EMSCRIPTEN)
 bridges_SELECTED_BRIDG

core.git: sw/inc sw/source

2024-05-08 Thread Miklos Vajna (via logerrit)
 sw/inc/ftninfo.hxx|5 +
 sw/source/core/doc/docftn.cxx |   19 +++
 sw/source/core/doc/docnew.cxx |1 +
 3 files changed, 25 insertions(+)

New commits:
commit 90f19126fa405a0632eae4ee8525b66bbce12625
Author: Miklos Vajna 
AuthorDate: Wed May 8 08:59:47 2024 +0200
Commit: Miklos Vajna 
CommitDate: Wed May 8 12:49:04 2024 +0200

tdf#160984 sw continuous endnotes: introduce an endnote section

Word lays out endnotes at the end of the document inline after body
text, Writer puts them on one or more separate endnote pages.

There was already an attempt in the past to resolve this difference, see
commit 4814e8caa5f06c4fe438dfd7d7315e4a2410ea18 (tdf#124601 sw: add
ContinuousEndnotes layout compat option, 2019-09-30). The approach back
then was to map such endnotes to footnotes, so the extra, unwanted page
doesn't appear. This turned out to be not working too well, the compat
option is only enabled for DOC, and even there commit
dc11f5b151e1a2ea2623fc8cf806a400763955d9 (tdf#143445 DOC import: limit
the usage of the CONTINUOUS_ENDNOTES compat flag, 2023-05-23) limited
the usage of the compat flag to 1 or 2 endnotes only.

Coming back to this, try a new approach: create a section that more or
less exists only at a layout level and put endnotes into that section.
This allows reusing all the complex logic on how to lay out endnotes
inline, on one or more pages. The plan is that this new approach is more
robust, can replace the old continuous endnotes layout code and then can
be enabled for DOCX as well.

This commit just introduces the backing section format and SwSection for
that special "endnotes section" (it's special because SwSection is
usually owned by an SwSectionNode, but here there is no doc model node
for the SwSection), SwFootnoteBossFrame::AppendFootnote() doesn't try to
use the new SwEndNoteInfo::GetSwSection() yet.

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

diff --git a/sw/inc/ftninfo.hxx b/sw/inc/ftninfo.hxx
index 17742687c944..c5490ed885d0 100644
--- a/sw/inc/ftninfo.hxx
+++ b/sw/inc/ftninfo.hxx
@@ -28,12 +28,14 @@ class SwTextFormatColl;
 class SwPageDesc;
 class SwCharFormat;
 class SwDoc;
+class SwSection;
 
 class SW_DLLPUBLIC SwEndNoteInfo : public SwClient
 {
 mutable sw::WriterMultiListener m_aDepends;
 mutable SwTextFormatColl* m_pTextFormatColl;
 mutable SwPageDesc* m_pPageDesc;
+mutable std::unique_ptr m_pSwSection;
 mutable SwCharFormat* m_pCharFormat;
 mutable SwCharFormat* m_pAnchorFormat;
 OUString m_sPrefix;
@@ -51,6 +53,9 @@ public:
 bool KnowsPageDesc() const;
 bool DependsOn(const SwPageDesc*) const;
 
+SwSection* GetSwSection(SwDoc& rDoc) const;
+void ResetSwSection();
+
 void SetFootnoteTextColl(SwTextFormatColl& rColl);
 SwTextFormatColl* GetFootnoteTextColl() const { return m_pTextFormatColl; 
} // can be 0.
 
diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx
index 16f6694c94c5..f211dcdcc9f4 100644
--- a/sw/source/core/doc/docftn.cxx
+++ b/sw/source/core/doc/docftn.cxx
@@ -35,6 +35,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 SwEndNoteInfo& SwEndNoteInfo::operator=(const SwEndNoteInfo& rInfo)
 {
@@ -130,6 +132,23 @@ void SwEndNoteInfo::ChgPageDesc(SwPageDesc* pDesc)
 m_aDepends.StartListening(m_pPageDesc);
 }
 
+SwSection* SwEndNoteInfo::GetSwSection(SwDoc& rDoc) const
+{
+if (!m_pSwSection)
+{
+SwSectionFormat* pFormat = rDoc.MakeSectionFormat();
+pFormat->SetFormatName(UNO_NAME_ENDNOTE);
+pFormat->SetFormatAttr(SwFormatEndAtTextEnd(FTNEND_ATTXTEND));
+m_pSwSection.reset(new SwSection(SectionType::Content, 
pFormat->GetName(), *pFormat));
+}
+return m_pSwSection.get();
+}
+
+void SwEndNoteInfo::ResetSwSection()
+{
+m_pSwSection.reset();
+}
+
 void SwEndNoteInfo::SetFootnoteTextColl(SwTextFormatColl& rFormat)
 {
 m_aDepends.EndListening(m_pTextFormatColl);
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index a56e7343e8f1..daef5f64be75 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -505,6 +505,7 @@ SwDoc::~SwDoc()
 // do not have any dependencies anymore.
 m_pNodes->DelNodes( SwNodeIndex(*m_pNodes), m_pNodes->Count() );
 rUndoNodes.DelNodes( SwNodeIndex( rUndoNodes ), rUndoNodes.Count() );
+mpEndNoteInfo->ResetSwSection();
 
 // clear TOX after nodes - TOXMarks are gone now so SwTOXType has no 
clients
 for (const auto& pType : *mpTOXTypes)


core.git: dbaccess/source

2024-05-08 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/relationdesign/RTableConnection.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0b97bfa88ffebf31778f0f68e883e046822cd264
Author: Caolán McNamara 
AuthorDate: Wed May 8 09:37:59 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 8 12:18:58 2024 +0200

return early on empty ORelationTableConnectionData*

we test for pData existing, but it it doesn't then we continue and
will typically dereference it, so test looks inverted

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

diff --git a/dbaccess/source/ui/relationdesign/RTableConnection.cxx 
b/dbaccess/source/ui/relationdesign/RTableConnection.cxx
index ba60ae54661b..4b8086f5111f 100644
--- a/dbaccess/source/ui/relationdesign/RTableConnection.cxx
+++ b/dbaccess/source/ui/relationdesign/RTableConnection.cxx
@@ -51,7 +51,7 @@ void ORelationTableConnection::Draw(vcl::RenderContext& 
rRenderContext, const to
 {
 OTableConnection::Draw(rRenderContext, rRect);
 ORelationTableConnectionData* pData = static_cast< 
ORelationTableConnectionData* >(GetData().get());
-if (pData && (pData->GetCardinality() == Cardinality::Undefined))
+if (!pData || pData->GetCardinality() == Cardinality::Undefined)
 return;
 
 // search lines for top line


core.git: Branch 'distro/collabora/co-23.05' - external/cairo

2024-05-08 Thread Caolán McNamara (via logerrit)
 external/cairo/cairo/cairo.GL_RGBA.patch |   60 +++
 1 file changed, 60 insertions(+)

New commits:
commit 1f993022c3e890e058e55fc2500b2ff3160fb612
Author: Caolán McNamara 
AuthorDate: Tue May 7 17:05:44 2024 +0100
Commit: Miklos Vajna 
CommitDate: Wed May 8 11:52:06 2024 +0200

cool#7015 fix rgba emojis

We initially added this for android so we could match the OpenGL GL_RGBA
layout available there. Later we made it available for all platforms via
--enable-cairo-rgba which is useful for the kit case.

But along the line color emoji support was added to cairo which wasn't
present at the time of the original patch, so now capture those uses
as well.

https: //github.com/CollaboraOnline/online/issues/7015
Change-Id: I6039607a46a58a7e9cbf5c052e6fb34234fd19b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167226
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins CollaboraOffice 

diff --git a/external/cairo/cairo/cairo.GL_RGBA.patch 
b/external/cairo/cairo/cairo.GL_RGBA.patch
index 648448e9de92..bad6a81ed541 100644
--- a/external/cairo/cairo/cairo.GL_RGBA.patch
+++ b/external/cairo/cairo/cairo.GL_RGBA.patch
@@ -58,3 +58,63 @@
break;
  }
  return ret;
+--- misc/cairo-1.10.2/src/cairo-ft-font.c
 misc/cairo-1.10.2/src/cairo-ft-font.c
+@@ -1318,6 +1321,19 @@
+   memcpy (data, bitmap->buffer, (size_t)stride * height);
+   }
+ 
++  {
++  /* swizzle to rgba */
++  unsigned int i, count = height * width;
++  unsigned char *p = data;
++  for (i = 0; i < count; i++)
++  {
++  unsigned char tmp = p[0];
++  p[0] = p[2];
++  p[2] = tmp;
++  p+=4;
++  }
++  }
++
+   if (!_cairo_is_little_endian ())
+   {
+   /* Byteswap. */
+@@ -2573,7 +2589,7 @@
+ if (unlikely (status))
+   return status;
+ 
+-if (pixman_image_get_format (surface->pixman_image) == PIXMAN_a8r8g8b8 &&
++if (pixman_image_get_format (surface->pixman_image) == PIXMAN_a8b8g8r8 &&
+   !pixman_image_get_component_alpha (surface->pixman_image)) {
+   _cairo_scaled_glyph_set_color_surface (scaled_glyph,
+  &scaled_font->base,
+--- misc/cairo-1.10.2/src/cairo-image-compositor.c
 misc/cairo-1.10.2/src/cairo-image-compositor.c
+@@ -1074,7 +1074,7 @@
+ format = PIXMAN_a8;
+ i = (info->extents.width + 3) & ~3;
+ if (scaled_glyph->surface->base.content & CAIRO_CONTENT_COLOR) {
+-  format = PIXMAN_a8r8g8b8;
++  format = PIXMAN_a8b8g8r8;
+   i = info->extents.width * 4;
+ }
+ 
+@@ -1126,7 +1126,7 @@
+   format == PIXMAN_a8) {
+   pixman_image_t *ca_mask;
+ 
+-  format = PIXMAN_a8r8g8b8;
++  format = PIXMAN_a8b8g8r8;
+   ca_mask = pixman_image_create_bits (format,
+   info->extents.width,
+   info->extents.height,
+@@ -1175,7 +1175,7 @@
+   }
+ }
+ 
+-if (format == PIXMAN_a8r8g8b8)
++if (format == PIXMAN_a8b8g8r8)
+   pixman_image_set_component_alpha (mask, TRUE);
+ 
+ pixman_image_composite32 (_pixman_operator (op),


core.git: Branch 'libreoffice-24-2' - cui/source

2024-05-08 Thread Bayram Çiçek (via logerrit)
 cui/source/inc/treeopt.hxx |4 ++--
 cui/source/options/treeopt.cxx |   22 +++---
 2 files changed, 5 insertions(+), 21 deletions(-)

New commits:
commit 0aef29521b824e61b81bb6be1079b8ddd77e39a9
Author: Bayram Çiçek 
AuthorDate: Thu May 2 22:40:22 2024 +0300
Commit: Thorsten Behrens 
CommitDate: Wed May 8 11:44:21 2024 +0200

tdf#159375: remove initialization on Tools>Options

- Initializing some dialogs at the startup of Options
makes it opening very slow on some low-power systems.

- This patch removes this initialization. This means,
all dialogs will be initialized at the time of search.
Therefore, we should wait a bit longer when typing
on the search bar to get the results...

- remove the default parameter "nNumberOfNode" from
initializeFirstNDialog()

- rename initializeFirstNDialog() to initializeAllDialogs()

Change-Id: I4fd9c5673f7edecfe6a6621b6018d5d405f112a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167023
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 
Reviewed-by: Moritz Duge 
(cherry picked from commit dd3953f705cc19aad4b0fcec7fd2961246b659e3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167222
Reviewed-by: Thorsten Behrens 

diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx
index 307c70f9edd5..1522ded3d7c4 100644
--- a/cui/source/inc/treeopt.hxx
+++ b/cui/source/inc/treeopt.hxx
@@ -229,8 +229,8 @@ public:
 voidActivatePage( const OUString& rPageURL );
 voidApplyItemSets();
 
-// default value initializes all dialogs
-void initializeFirstNDialog(sal_Int16 nNumberOfNode = -1);
+// initialize all dialogs in "Tools > Options"
+void initializeAllDialogs();
 
 // helper functions to call the Languages and Locales TabPage from the 
SpellDialog
 static void ApplyLanguageOptions(const SfxItemSet& rSet);
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index d8fe793e10b7..029c5f773f8f 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -790,7 +790,7 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, SearchUpdateHdl, 
weld::Entry&, void)
 
 IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void)
 {
-// initializeFirstNDialog() can take a long time, show wait cursor and 
disable input
+// initializeAllDialogs() can take a long time, show wait cursor and 
disable input
 std::unique_ptr xWait(m_pParent ? new 
weld::WaitObject(m_pParent) : nullptr);
 
 // Pause redraw
@@ -801,7 +801,7 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, 
Timer*, void)
 m_xSearchEdit->freeze();
 xTreeLB->hide();
 
-initializeFirstNDialog();
+initializeAllDialogs();
 
 m_xSearchEdit->thaw();
 xTreeLB->show();
@@ -847,10 +847,9 @@ void OfaTreeOptionsDialog::selectFirstEntry()
 }
 }
 
-void OfaTreeOptionsDialog::initializeFirstNDialog(sal_Int16 nNumberOfNode)
+void OfaTreeOptionsDialog::initializeAllDialogs()
 {
 std::unique_ptr xEntry;
-sal_Int16 nCount = 0;
 
 std::unique_ptr xTemp = xTreeLB->make_iterator();
 bool bTemp = xTreeLB->get_iter_first(*xTemp);
@@ -877,12 +876,6 @@ void 
OfaTreeOptionsDialog::initializeFirstNDialog(sal_Int16 nNumberOfNode)
 }
 }
 
-/* if nNumberOfNode is -1 (which is the default value if no parameter 
provided),
-   this function will initialize all dialogs since nCount always 
greater than -1 */
-if (nCount == nNumberOfNode)
-break;
-
-++nCount;
 bTemp = xTreeLB->iter_next(*xTemp);
 }
 }
@@ -1187,15 +1180,6 @@ void OfaTreeOptionsDialog::ActivateLastSelection()
 xTreeLB->select(*xEntry);
 m_xSearchEdit->grab_focus();
 SelectHdl_Impl();
-
-// initializeFirstNDialog() can take a long time, show wait cursor
-std::unique_ptr xWait(m_pParent ? new 
weld::WaitObject(m_pParent) : nullptr);
-
-/* initialize first 25 dialogs which are almost half of the dialogs
-in a row while Options dialog opens. then clear&reselect to avoid UI test 
failures. */
-initializeFirstNDialog(25);
-clearOptionsDialog();
-SelectHdl_Impl();
 }
 
 void OfaTreeOptionsDialog::InitItemSets(OptionsGroupInfo& rGroupInfo)


core.git: binaryurp/source comphelper/source cppuhelper/source desktop/source include/rtl oox/source package/inc package/source sal/rtl sc/source stoc/source svl/source sw/source xmlsecurity/source

2024-05-08 Thread Caolán McNamara (via logerrit)
 binaryurp/source/bridge.cxx|4 --
 comphelper/source/misc/docpasswordhelper.cxx   |4 --
 comphelper/source/misc/random.cxx  |4 --
 comphelper/source/misc/storagehelper.cxx   |6 
 comphelper/source/xml/xmltools.cxx |8 +
 cppuhelper/source/bootstrap.cxx|6 
 desktop/source/deployment/misc/dp_misc.cxx |5 ---
 include/rtl/random.h   |   29 +++--
 oox/source/crypto/Standard2007Engine.cxx   |4 --
 package/inc/ZipPackageEntry.hxx|4 --
 package/inc/ZipPackageFolder.hxx   |6 +---
 package/inc/ZipPackageStream.hxx   |3 --
 package/source/zippackage/ZipPackage.cxx   |   28 
 package/source/zippackage/ZipPackageFolder.cxx |   14 --
 package/source/zippackage/ZipPackageStream.cxx |7 ++---
 sal/rtl/random.cxx |5 +--
 sal/rtl/uuid.cxx   |   26 +++---
 sc/source/filter/excel/xeroot.cxx  |4 --
 sc/source/filter/excel/xestream.cxx|4 --
 stoc/source/javaloader/javaloader.cxx  |5 ---
 svl/source/passwordcontainer/passwordcontainer.cxx |3 --
 svl/source/passwordcontainer/passwordcontainer.hxx |   23 
 sw/source/filter/ww8/wrtww8.cxx|4 --
 sw/source/filter/ww8/ww8par.cxx|4 --
 xmlsecurity/source/xmlsec/nss/ciphercontext.cxx|4 --
 25 files changed, 54 insertions(+), 160 deletions(-)

New commits:
commit e5aa87aeeb66a8f8068b41275d23c491f2dbd0f2
Author: Caolán McNamara 
AuthorDate: Fri May 3 16:33:11 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 8 11:29:54 2024 +0200

drop requirement for rtl_random_getBytes to have "Pool" arg

Seeing as since:

commit e9531b792ddf0cfc2db11713b574c5fc7ae09e2c
Date:   Tue Feb 6 14:39:47 2024 +0100

sal: rtlRandomPool: require OS random device, abort if not present

Both rtl_random_createPool() and rtl_random_getBytes() first try to get
random data from the OS, via /dev/urandom or rand_s() (documented to
call RtlGenRandom(), see [1]).

we don't use the initial arg to rtl_random_getBytes anymore, drop the
requirement to have one. Then simplify our usages of that, and
addtionally deprecate rtl_random_createPool and rtl_random_destroyPool.

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

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index e755abc117fe..0f9832682648 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -74,9 +74,7 @@ namespace {
 
 sal_Int32 random() {
 sal_Int32 n;
-rtlRandomPool pool = rtl_random_createPool();
-(void)rtl_random_getBytes(pool, &n, sizeof n);
-rtl_random_destroyPool(pool);
+(void)rtl_random_getBytes(nullptr, &n, sizeof n);
 return n;
 }
 
diff --git a/comphelper/source/misc/docpasswordhelper.cxx 
b/comphelper/source/misc/docpasswordhelper.cxx
index e4327acb8e40..084fb0d36601 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -426,12 +426,10 @@ OUString DocPasswordHelper::GetOoxHashAsBase64(
 {
 uno::Sequence< sal_Int8 > aResult( nLength );
 
-rtlRandomPool aRandomPool = rtl_random_createPool ();
-if (rtl_random_getBytes(aRandomPool, aResult.getArray(), nLength) != 
rtl_Random_E_None)
+if (rtl_random_getBytes(nullptr, aResult.getArray(), nLength) != 
rtl_Random_E_None)
 {
 throw uno::RuntimeException(u"rtl_random_getBytes failed"_ustr);
 }
-rtl_random_destroyPool ( aRandomPool );
 
 return aResult;
 }
diff --git a/comphelper/source/misc/random.cxx 
b/comphelper/source/misc/random.cxx
index 058eb99813eb..5e763beb6c0a 100644
--- a/comphelper/source/misc/random.cxx
+++ b/comphelper/source/misc/random.cxx
@@ -60,10 +60,8 @@ struct RandomNumberGenerator
 }
 
 size_t seed = 0;
-rtlRandomPool aRandomPool = rtl_random_createPool();
-if (rtl_random_getBytes(aRandomPool, &seed, sizeof(seed)) != 
rtl_Random_E_None)
+if (rtl_random_getBytes(nullptr, &seed, sizeof(seed)) != 
rtl_Random_E_None)
 seed = 0;
-rtl_random_destroyPool(aRandomPool);
 
 // initialises the state of the global random number generator
 // should only be called once.
diff --git a/comphelper/source/misc/storagehelper.cxx 
b/comphelper/source/misc/storagehelper.cxx
index ab6f71c7c734..b00e8c543752 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -437,17 +437,13 @@ uno::Sequence< bea

core.git: 3 commits - filter/qa filter/source forms/source formula/source

2024-05-08 Thread Noel Grandin (via logerrit)
 filter/qa/cppunit/priority-test.cxx   |2 
 filter/qa/cppunit/xslt-test.cxx   |   30 -
 filter/qa/pdf.cxx |  104 +--
 filter/qa/unit/svg.cxx|   70 +-
 filter/qa/unit/textfilterdetect.cxx   |   43 -
 filter/source/config/cache/basecontainer.cxx  |   12 
 filter/source/config/cache/configflush.cxx|4 
 filter/source/config/cache/contenthandlerfactory.cxx  |4 
 filter/source/config/cache/filtercache.cxx|   30 -
 filter/source/config/cache/filterfactory.cxx  |6 
 filter/source/config/cache/frameloaderfactory.cxx |4 
 filter/source/config/cache/typedetection.cxx  |   26 
 filter/source/graphic/GraphicExportFilter.cxx |4 
 filter/source/graphicfilter/icgm/actimpr.cxx  |   92 +--
 filter/source/graphicfilter/icgm/cgm.cxx  |   10 
 filter/source/graphicfilter/icgm/class1.cxx   |4 
 filter/source/graphicfilter/icgm/class4.cxx   |6 
 filter/source/graphicfilter/icgm/class7.cxx   |   10 
 filter/source/msfilter/escherex.cxx   |  170 ++---
 filter/source/msfilter/eschesdo.cxx   |   52 -
 filter/source/msfilter/mscodec.cxx|   22 
 filter/source/msfilter/msdffimp.cxx   |   60 +-
 filter/source/msfilter/msocximex.cxx  |4 
 filter/source/msfilter/msoleexp.cxx   |   28 
 filter/source/msfilter/mstoolbar.cxx  |   10 
 filter/source/msfilter/msvbahelper.cxx|   14 
 filter/source/msfilter/rtfutil.cxx|6 
 filter/source/msfilter/svdfppt.cxx|  102 +--
 filter/source/msfilter/svxmsbas2.cxx  |2 
 filter/source/odfflatxml/OdfFlatXml.cxx   |6 
 filter/source/pdf/impdialog.cxx   |  540 +-
 filter/source/pdf/pdfdecomposer.cxx   |4 
 filter/source/pdf/pdfdialog.cxx   |4 
 filter/source/pdf/pdfexport.cxx   |   52 -
 filter/source/pdf/pdffilter.cxx   |   82 +-
 filter/source/pdf/pdfinteract.cxx |8 
 filter/source/storagefilterdetect/filterdetect.cxx|   66 +-
 filter/source/svg/svgexport.cxx   |  536 -
 filter/source/svg/svgfilter.cxx   |   18 
 filter/source/svg/svgfontexport.cxx   |   38 -
 filter/source/svg/svgwriter.cxx   |  220 +++
 filter/source/svg/svgwriter.hxx   |2 
 filter/source/t602/t602filter.cxx |  490 
 filter/source/textfilterdetect/filterdetect.cxx   |4 
 filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx   |   42 -
 filter/source/xmlfilterdetect/filterdetect.cxx|   10 
 filter/source/xsltdialog/typedetectionexport.cxx  |   22 
 filter/source/xsltdialog/typedetectionimport.cxx  |   12 
 filter/source/xsltdialog/xmlfilterdialogcomponent.cxx |4 
 filter/source/xsltdialog/xmlfilterjar.cxx |   20 
 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx  |   66 +-
 filter/source/xsltdialog/xmlfiltertabdialog.cxx   |   14 
 filter/source/xsltdialog/xmlfiltertabpagebasic.cxx|   14 
 filter/source/xsltdialog/xmlfiltertabpagexslt.cxx |   24 
 filter/source/xsltdialog/xmlfiltertestdialog.cxx  |   62 +-
 filter/source/xsltfilter/LibXSLTTransformer.cxx   |6 
 filter/source/xsltfilter/OleHandler.cxx   |4 
 filter/source/xsltfilter/XSLTFilter.cxx   |   32 -
 forms/source/component/Button.hxx |4 
 forms/source/component/CheckBox.hxx   |4 
 forms/source/component/ComboBox.cxx   |2 
 forms/source/component/ComboBox.hxx   |4 
 forms/source/component/Currency.hxx   |4 
 forms/source/component/DatabaseForm.cxx   |   24 
 forms/source/component/Date.hxx   |4 
 forms/source/component/Edit.cxx   |2 
 forms/source/component/Edit.hxx   |4 
 forms/source/component/File.hxx   |2 
 forms/source/component/Filter.cxx |   12 
 forms/source/component/FixedText.hxx  |2 
 forms/source/component/FormComponent.cxx  |   10 
 forms/source/component/FormattedField.cxx |4 
 forms/source/component/FormattedField.hxx |4 
 forms/source/component/FormattedFieldWrapper.cxx  |4 
 forms/source/component/FormsCollection.cxx|6 
 forms/source/component/Grid.hxx   |2 
 forms/source/component/GroupBox.hxx   |4 
 forms/source/component/GroupManager.cxx   |

core.git: desktop/inc desktop/source

2024-05-08 Thread Caolán McNamara (via logerrit)
 desktop/inc/lib/init.hxx|   20 +-
 desktop/source/lib/init.cxx |   62 +++-
 2 files changed, 36 insertions(+), 46 deletions(-)

New commits:
commit e22e7ca9488b160df4f00481b10993262a4db5d3
Author: Caolán McNamara 
AuthorDate: Fri May 3 13:59:44 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 8 11:13:52 2024 +0200

flush CallbackFlushHandler queue via PostUserEvent instead of Idle+Timer

Looking at when Invoke was called from Idle (or from auxiliary Timeout
if there was no chance to run the Idle within 100ms) and when duplicate
merging and modification of the queue is done before getting dispatched
and cleared; Then the pattern is that duplicates are collected and
merged during the current block of events to be processed, and
dispatching the flush via PostUserEvent instead gives the same results.

During startup, scheduling via PostUserEvent drops the need to have the
aux timeout, and while the number of messages seen in the first queue
flush (now via PostUserEvent instead of 100ms Timer) remain the same as
before, subsequent queue flushes can get processed earlier while
smaller, though typically at the same time as before once the document
is fully loaded.

Change-Id: I64c6bbc3dea9fb3a512c2a9521303a8f143d4a89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167064
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167307
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx
index 614ef404ddd2..25169b4e01a6 100644
--- a/desktop/inc/lib/init.hxx
+++ b/desktop/inc/lib/init.hxx
@@ -93,12 +93,11 @@ namespace desktop {
 };
 
 /// One instance of this per view, handles flushing callbacks
-class SAL_DLLPUBLIC_RTTI CallbackFlushHandler final : public Idle, public 
SfxLokCallbackInterface
+class SAL_DLLPUBLIC_RTTI CallbackFlushHandler final : public 
SfxLokCallbackInterface
 {
 public:
 DESKTOP_DLLPUBLIC explicit 
CallbackFlushHandler(LibreOfficeKitDocument* pDocument, LibreOfficeKitCallback 
pCallback, void* pData);
 DESKTOP_DLLPUBLIC virtual ~CallbackFlushHandler() override;
-virtual void Invoke() override;
 // TODO This should be dropped and the binary 
libreOfficeKitViewCallback() variants should be called?
 DESKTOP_DLLPUBLIC void queue(const int type, const OString& data);
 
@@ -189,7 +188,8 @@ namespace desktop {
 typedef std::vector queue_type1;
 typedef std::vector queue_type2;
 
-void startTimer();
+void scheduleFlush();
+void invoke();
 bool removeAll(int type);
 bool removeAll(int type, const std::function& rTestFunc);
 bool processInvalidateTilesEvent(int type, CallbackData& 
aCallbackData);
@@ -200,6 +200,8 @@ namespace desktop {
 void enqueueUpdatedTypes();
 void enqueueUpdatedType( int type, const SfxViewShell* 
sourceViewShell, int viewId );
 
+void stop();
+
 /** we frequently want to scan the queue, and mostly when we do so, we 
only care about the element type
 so we split the queue in 2 to make the scanning cache friendly. */
 queue_type1 m_queue1;
@@ -230,18 +232,12 @@ namespace desktop {
 LibreOfficeKitDocument* m_pDocument;
 int m_viewId = -1; // view id of the associated SfxViewShell
 LibreOfficeKitCallback m_pCallback;
+ImplSVEvent* m_pFlushEvent;
 void *m_pData;
 int m_nDisableCallbacks;
 std::recursive_mutex m_mutex;
-class TimeoutIdle : public Timer
-{
-public:
-TimeoutIdle( CallbackFlushHandler* handler );
-virtual void Invoke() override;
-private:
-CallbackFlushHandler* mHandler;
-};
-TimeoutIdle m_TimeoutIdle;
+
+DECL_LINK(FlushQueue, void*, void);
 };
 
 struct DESKTOP_DLLPUBLIC LibLODocument_Impl : public 
_LibreOfficeKitDocument
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 30d2d824e5c6..e093bf7ff4f2 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1502,32 +1502,14 @@ static OUString getGenerator()
 
 extern "C" {
 
-CallbackFlushHandler::TimeoutIdle::TimeoutIdle( CallbackFlushHandler* handler )
-: Timer( "lokit timer callback" )
-, mHandler( handler )
-{
-// A second timer with higher priority, it'll ensure we flush in 
reasonable time if we get too busy
-// to get POST_PAINT priority processing. Otherwise it could take a long 
time to flush.
-SetPriority(TaskPriority::DEFAULT);
-SetTimeout( 100 ); // 100 ms
-}
-
-void CallbackFlushHandler::TimeoutIdle::Invoke()
-{
-mHandler->Invoke();
-}
-
 // One of these is created per view to handle events cf. doc_registerCallback
 Callb

core.git: Branch 'distro/collabora/co-23.05' - sw/source

2024-05-08 Thread Mike Kaganski (via logerrit)
 sw/source/core/inc/unoflatpara.hxx |1 +
 sw/source/core/unocore/unoflatpara.cxx |3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 90b35f89efb96e17b511f1dde7b69c467d0fd2b6
Author: Mike Kaganski 
AuthorDate: Tue Nov 28 13:59:22 2023 +0300
Commit: Caolán McNamara 
CommitDate: Wed May 8 11:11:05 2024 +0200

tdf#153693: improve SwXFlatParagraph::isModified check

The response from LanguageTool server may take some seconds, during which
the user may type more characters of an unfinished word. A result of the
check started using an incomplete text should be discarded in this case.

The code in GrammarCheckingIterator::ProcessResult that applies the check
results first calls isModified to decide if it should apply the result,
or to discard it. Before the change, SwXFlatParagraph::isModified only
checked that its underlying node is still referenced; but it could only
get nullified in SwXTextMarkup::Impl::Notify (only when the node dies),
or in SwXTextMarkup::ClearTextNode, called in SwXFlatParagraph::changeText
and SwXFlatParagraph::changeAttributes. Any external changes of the node
didn't mark SwXFlatParagraph "modified".

This change stores the initial text of the paragraph, from the moment of
creation of SwXFlatParagraph; and then compares it to the current text of
the node in isModified.

Change-Id: Ia9a2e74b256152fe311db874c66f7e5347183f12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160021
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 708e52a551daa27932dfae072a16e3512c72cf92)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160032
Reviewed-by: Michael Stahl 
(cherry picked from commit 9810b3c06c709ffef15932fe24106b503ea4ff46)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167072
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins CollaboraOffice 

diff --git a/sw/source/core/inc/unoflatpara.hxx 
b/sw/source/core/inc/unoflatpara.hxx
index 2cc2c354c292..e0c820a009d7 100644
--- a/sw/source/core/inc/unoflatpara.hxx
+++ b/sw/source/core/inc/unoflatpara.hxx
@@ -105,6 +105,7 @@ private:
 SwXFlatParagraph & operator = ( const SwXFlatParagraph & ) = delete;
 
 OUString maExpandText;
+OUString maOrigText;
 };
 
 class SwXFlatParagraphIterator final :
diff --git a/sw/source/core/unocore/unoflatpara.cxx 
b/sw/source/core/unocore/unoflatpara.cxx
index d5f3c9c4130b..5d7e2d0f5bca 100644
--- a/sw/source/core/unocore/unoflatpara.cxx
+++ b/sw/source/core/unocore/unoflatpara.cxx
@@ -68,6 +68,7 @@ CreateFlatParagraphIterator(SwDoc & rDoc, sal_Int32 const 
nTextMarkupType,
 SwXFlatParagraph::SwXFlatParagraph( SwTextNode& rTextNode, OUString 
aExpandText, const ModelToViewHelper& rMap )
 : SwXFlatParagraph_Base(& rTextNode, rMap)
 , maExpandText(std::move(aExpandText))
+, maOrigText(rTextNode.GetText())
 {
 }
 
@@ -215,7 +216,7 @@ sal_Bool SAL_CALL SwXFlatParagraph::isChecked( ::sal_Int32 
nType )
 sal_Bool SAL_CALL SwXFlatParagraph::isModified()
 {
 SolarMutexGuard aGuard;
-return nullptr == GetTextNode();
+return !GetTextNode() || GetTextNode()->GetText() != maOrigText;
 }
 
 // text::XFlatParagraph:


core.git: Branch 'libreoffice-24-2' - sw/qa sw/source

2024-05-08 Thread Miklos Vajna (via logerrit)
 sw/qa/core/txtnode/data/plain-content-control-copy.docx |binary
 sw/qa/core/txtnode/txtnode.cxx  |   23 
 sw/source/core/txtnode/thints.cxx   |4 ++
 3 files changed, 26 insertions(+), 1 deletion(-)

New commits:
commit 32616609c788aa1cf0837af0f387390a23de1766
Author: Miklos Vajna 
AuthorDate: Tue Apr 30 08:44:59 2024 +0200
Commit: Xisco Fauli 
CommitDate: Wed May 8 10:57:56 2024 +0200

tdf#159683 sw content controls, plain text: fix crash with the clipboard doc

Regression from commit c804c5354855188b5a37219cfe11dc079dc235f4 (sw
content control: fix lost properties on copy&paste, 2023-03-10), select
a plain text content control, copy it to the clipboard, quit: assertion
fails during shutdown because the doc's "placeholder text" char style is
still referenced by a client.

What happens here is that the SwContentControl copy ctor copies the
plain text flag, and that flag is only read in SwTextNode::InsertHint(),
so that causes the problem. Note how that code is inconsistent: we avoid
the creation of dummy characters in the copy case, but we still try to
adjust the start/end of the content control attribute in the copy case,
which makes not much sense.

Fix the problem by not adjusting the content control attribute
boundaries in the copy case, since the original intention was to do
thees corrections only at a UI level, during interactive edit.

It's not clear why this inconsistency had an influence on the clients of
the char style, though.

Change-Id: I86b0516464f24fc453dcd97588dafb8afd010a9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166882
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins
(cherry picked from commit 06aeb9c61d50bba7edafe17f9d3513af26b0782f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167311
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/core/txtnode/data/plain-content-control-copy.docx 
b/sw/qa/core/txtnode/data/plain-content-control-copy.docx
new file mode 100644
index ..80fecae26d5b
Binary files /dev/null and 
b/sw/qa/core/txtnode/data/plain-content-control-copy.docx differ
diff --git a/sw/qa/core/txtnode/txtnode.cxx b/sw/qa/core/txtnode/txtnode.cxx
index c2df8a407e69..be4d97190251 100644
--- a/sw/qa/core/txtnode/txtnode.cxx
+++ b/sw/qa/core/txtnode/txtnode.cxx
@@ -539,6 +539,29 @@ CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, 
testSplitFlyAnchorSplit)
 CPPUNIT_ASSERT_EQUAL(OUString("PortionType::Fly"), aPortionType);
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testPlainContentControlCopy)
+{
+// Given a document with a plain text content control, all text selected 
and copied to the
+// clipboard:
+createSwDoc("plain-content-control-copy.docx");
+SwDocShell* pDocShell = getSwDocShell();
+SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+pWrtShell->SelAll();
+{
+rtl::Reference xTransfer = new 
SwTransferable(*pWrtShell);
+xTransfer->Copy();
+}
+
+// When closing that document, then make sure we don't crash on shutdown:
+uno::Reference xModel(mxComponent, uno::UNO_QUERY);
+uno::Reference 
xFrame(xModel->getCurrentController()->getFrame(),
+uno::UNO_QUERY);
+// Without the accompanying fix in place, this resulted in an assertion 
failure, a char style
+// still had clients by the time it was deleted.
+xFrame->close(false);
+mxComponent.clear();
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/thints.cxx 
b/sw/source/core/txtnode/thints.cxx
index cf5e1ff1cccf..c499294f4f26 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1700,7 +1700,9 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, 
const SetAttrMode nMode )
 // for all of its content.
 auto* pTextContentControl = static_txtattr_cast(
 GetTextAttrAt(pAttr->GetStart(), RES_TXTATR_CONTENTCONTROL, 
::sw::GetTextAttrMode::Parent));
-if (pTextContentControl)
+// If the caller is SwTextNode::CopyText, we just copy an existing 
attribute, no need to
+// correct it.
+if (pTextContentControl && !(nMode & SetAttrMode::NOTXTATRCHR))
 {
 auto& rFormatContentControl
 = 
static_cast(pTextContentControl->GetAttr());


core.git: Branch 'feature/cib_contract49c' - cui/source

2024-05-08 Thread Bayram Çiçek (via logerrit)
 cui/source/inc/treeopt.hxx |4 ++--
 cui/source/options/treeopt.cxx |   22 +++---
 2 files changed, 5 insertions(+), 21 deletions(-)

New commits:
commit a97b6e3426ad6bab862bb8ddb98ea367c5ee2e7f
Author: Bayram Çiçek 
AuthorDate: Thu May 2 22:40:22 2024 +0300
Commit: Thorsten Behrens 
CommitDate: Wed May 8 10:41:26 2024 +0200

tdf#159375: remove initialization on Tools>Options

- Initializing some dialogs at the startup of Options
makes it opening very slow on some low-power systems.

- This patch removes this initialization. This means,
all dialogs will be initialized at the time of search.
Therefore, we should wait a bit longer when typing
on the search bar to get the results...

- remove the default parameter "nNumberOfNode" from
initializeFirstNDialog()

- rename initializeFirstNDialog() to initializeAllDialogs()

Change-Id: I4fd9c5673f7edecfe6a6621b6018d5d405f112a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167023
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 
Reviewed-by: Moritz Duge 
(cherry picked from commit dd3953f705cc19aad4b0fcec7fd2961246b659e3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167223
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx
index 307c70f9edd5..1522ded3d7c4 100644
--- a/cui/source/inc/treeopt.hxx
+++ b/cui/source/inc/treeopt.hxx
@@ -229,8 +229,8 @@ public:
 voidActivatePage( const OUString& rPageURL );
 voidApplyItemSets();
 
-// default value initializes all dialogs
-void initializeFirstNDialog(sal_Int16 nNumberOfNode = -1);
+// initialize all dialogs in "Tools > Options"
+void initializeAllDialogs();
 
 // helper functions to call the Languages and Locales TabPage from the 
SpellDialog
 static void ApplyLanguageOptions(const SfxItemSet& rSet);
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index d8fe793e10b7..029c5f773f8f 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -790,7 +790,7 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, SearchUpdateHdl, 
weld::Entry&, void)
 
 IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void)
 {
-// initializeFirstNDialog() can take a long time, show wait cursor and 
disable input
+// initializeAllDialogs() can take a long time, show wait cursor and 
disable input
 std::unique_ptr xWait(m_pParent ? new 
weld::WaitObject(m_pParent) : nullptr);
 
 // Pause redraw
@@ -801,7 +801,7 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, 
Timer*, void)
 m_xSearchEdit->freeze();
 xTreeLB->hide();
 
-initializeFirstNDialog();
+initializeAllDialogs();
 
 m_xSearchEdit->thaw();
 xTreeLB->show();
@@ -847,10 +847,9 @@ void OfaTreeOptionsDialog::selectFirstEntry()
 }
 }
 
-void OfaTreeOptionsDialog::initializeFirstNDialog(sal_Int16 nNumberOfNode)
+void OfaTreeOptionsDialog::initializeAllDialogs()
 {
 std::unique_ptr xEntry;
-sal_Int16 nCount = 0;
 
 std::unique_ptr xTemp = xTreeLB->make_iterator();
 bool bTemp = xTreeLB->get_iter_first(*xTemp);
@@ -877,12 +876,6 @@ void 
OfaTreeOptionsDialog::initializeFirstNDialog(sal_Int16 nNumberOfNode)
 }
 }
 
-/* if nNumberOfNode is -1 (which is the default value if no parameter 
provided),
-   this function will initialize all dialogs since nCount always 
greater than -1 */
-if (nCount == nNumberOfNode)
-break;
-
-++nCount;
 bTemp = xTreeLB->iter_next(*xTemp);
 }
 }
@@ -1187,15 +1180,6 @@ void OfaTreeOptionsDialog::ActivateLastSelection()
 xTreeLB->select(*xEntry);
 m_xSearchEdit->grab_focus();
 SelectHdl_Impl();
-
-// initializeFirstNDialog() can take a long time, show wait cursor
-std::unique_ptr xWait(m_pParent ? new 
weld::WaitObject(m_pParent) : nullptr);
-
-/* initialize first 25 dialogs which are almost half of the dialogs
-in a row while Options dialog opens. then clear&reselect to avoid UI test 
failures. */
-initializeFirstNDialog(25);
-clearOptionsDialog();
-SelectHdl_Impl();
 }
 
 void OfaTreeOptionsDialog::InitItemSets(OptionsGroupInfo& rGroupInfo)


core.git: Branch 'feature/cib_contract49c' - sw/qa writerfilter/source

2024-05-08 Thread Michael Stahl (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx   |4 
 writerfilter/source/dmapper/StyleSheetTable.cxx |  417 +---
 2 files changed, 367 insertions(+), 54 deletions(-)

New commits:
commit 912ae920630be10983af506aa2bba5d2a274ef04
Author: Michael Stahl 
AuthorDate: Mon May 6 15:58:36 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Wed May 8 10:40:37 2024 +0200

tdf#160402 writerfilter: extend StyleMap with all Word styles

There doesn't appear to be an accurate and complete documentation of all
the Word built-in style names, but fortunately Word writes them all into
styles.xml in a w:latentStyles element anyway.

It turned out that a lot of the Writer built-in style names here were
obsoleted by renaming and did not match any more.

Change-Id: Ic69785a34524f667b83a06a267715b2c8b0165d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167242
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 72ea1005b987159a6a59f9379e63321e0b0dd44f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167261
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167292
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index ad3bba49df49..91f0deb4bb05 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -563,7 +563,7 @@ 
DECLARE_OOXMLEXPORT_TEST(testTdf104061_tableSectionColumns,"tdf104061_tableSecti
 
 //tdf#95114 - follow style is Text Body - DOCX test
 uno::Reference< beans::XPropertySet > 
properties(getStyles("ParagraphStyles")->getByName("annotation subject"), 
uno::UNO_QUERY);
-CPPUNIT_ASSERT_EQUAL(OUString("annotation text"), 
getProperty(properties, "FollowStyle"));
+CPPUNIT_ASSERT_EQUAL(OUString("Marginalia"), 
getProperty(properties, "FollowStyle"));
 }
 
 DECLARE_OOXMLEXPORT_TEST(testTdf46940_dontEquallyDistributeColumns, 
"tdf46940_dontEquallyDistributeColumns.docx")
@@ -690,7 +690,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf109310_endnoteStyleForMSO)
 xmlDocUniquePtr pXmlDoc = parseExport("word/endnotes.xml");
 // Check w:rStyle element has w:val attribute - note that w: is not 
specified for attribute
 assertXPath(pXmlDoc, 
"/w:endnotes/w:endnote[@w:id='2']/w:p/w:r[1]/w:rPr/w:rStyle"_ostr, "val"_ostr,
-"EndnoteCharacters");
+"EndnoteCharacters1");
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testTdf103389)
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx 
b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 6b1a79e66c04..d932be695b9f 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1561,10 +1561,18 @@ StyleSheetTable::ConvertStyleName(const OUString& 
rWWName)
 // will point to a style with specific RES_POOL* in its m_nPoolFormatId. 
Then on export, the
 // pool format id will map to a ww::sti enum value, and finally to a Word 
style name. Keep this
 // part in sync with the export functions mentioned above!
-// In addition to "standard" names, some case variations are handled here; 
and also there are
-// a number of strange mappings like "BodyTextIndentItalic" -> "Text body 
indent italic", which
-// map something unused in Word to something unused in Writer :-/
+// In addition to "standard" names, some case variations are handled here.
+// It's required to know all the Word paragraph/character styles for
+// STYLEREF/TOC fields; the ones that don't have a Writer equivalent have
+// an empty string in the map, and the code should return the original 
name.
+// Also very unclear: at least in DOCX, style names appear to be case
+// sensitive; if Word imports 2 styles that have the same case-insensitive
+// name as a built-in style, it renames one of them by appending a number.
+// These are from the w:latentStyles in the styles.xml of a Word 15.0 DOCX,
+// plus some pre-existing additions and variants.
 static const std::map< OUString, OUString> StyleNameMap {
+//FIXME: testFdo77716, testTdf129575_docDefault etc. fail with correct 
mapping
+//{ "Normal", "Default Paragraph Style" }, // RES_POOLCOLL_STANDARD
 { "Normal", "Standard" }, // RES_POOLCOLL_STANDARD
 { "heading 1", "Heading 1" }, // RES_POOLCOLL_HEADLINE1
 { "heading 2", "Heading 2" }, // RES_POOLCOLL_HEADLINE2
@@ -1587,12 +1595,21 @@ StyleSheetTable::ConvertStyleName(const OUString& 
rWWName)
 { "Index 1", "Index 1" }, // RES_POOLCOLL_TOX_IDX1
 { "Index 2", "Index 2" }, // RES_POOLCOLL_TOX_IDX2
 { "Index 3", "Index 3" }, // RES_POOLCOLL_TOX_IDX3
-//{ "Index 4", "" },
-//{ "Index 5", "" },
-//{ "Index 6", "" },
-//{ "Index 7", "" },
-//   

core.git: Branch 'feature/cib_contract49c' - 2 commits - editeng/qa editeng/source sw/inc sw/source sw/uiconfig

2024-05-08 Thread Thorsten Behrens (via logerrit)
 editeng/qa/unit/core-test.cxx|4 ++--
 editeng/source/editeng/impedit2.cxx  |3 ++-
 editeng/source/editeng/impedit4.cxx  |2 +-
 sw/inc/crsrsh.hxx|1 +
 sw/source/core/crsr/crstrvl1.cxx |5 +
 sw/source/core/crsr/swcrsr.cxx   |2 +-
 sw/source/uibase/inc/wrtsh.hxx   |2 +-
 sw/source/uibase/shells/textsh.cxx   |   14 --
 sw/source/uibase/wrtsh/select.cxx|4 ++--
 sw/uiconfig/swriter/ui/fldvarpage.ui |5 ++---
 10 files changed, 21 insertions(+), 21 deletions(-)

New commits:
commit cb47cc7d13057bbd54dac1a623fcb39320096cb3
Author: Thorsten Behrens 
AuthorDate: Wed May 8 10:36:23 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Wed May 8 10:36:23 2024 +0200

Fixup: Design change in variable page of the field dialog in Writer

Adding improvements from patchset 2, out of
https://gerrit.libreoffice.org/c/core/+/167285

Change-Id: I29cb1ab50dd3a59e842724005b443b4b6f1fe483

diff --git a/sw/uiconfig/swriter/ui/fldvarpage.ui 
b/sw/uiconfig/swriter/ui/fldvarpage.ui
index 5a4e42081221..9cfb4ce2bf8d 100644
--- a/sw/uiconfig/swriter/ui/fldvarpage.ui
+++ b/sw/uiconfig/swriter/ui/fldvarpage.ui
@@ -59,6 +59,8 @@
   
 True
 False
+False
+True
 6
 6
 
@@ -205,7 +207,6 @@
 True
 False
 True
-True
 0
 none
 
@@ -272,7 +273,6 @@
 True
 False
 True
-True
 0
 none
 
@@ -339,7 +339,6 @@
 True
 False
 True
-True
 0
 none
 
commit 9fa365b462524783dad84ba845cab30b4066d500
Author: Oliver Specht 
AuthorDate: Tue Apr 30 13:52:09 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Wed May 8 10:30:56 2024 +0200

Case Rotation in Impress and Writer improved

Word boundaries at the end of the paragraph are now correctly detected.
Sentence case is not applied without multi word selection in Writer anymore.

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

diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index b19382142f3d..10c61aec374b 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -2048,8 +2048,8 @@ void Test::testTransliterate()
 esel = ESelection(0, selStart, 0, selEnd);
 CPPUNIT_ASSERT_EQUAL(OUString(""), editEng.GetText(esel));
 CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
-CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
-CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe SMITH. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
 
 /* No selection tests. Cursor between the 'm' and 'e' in 'met'. */
 selStart = 12;
diff --git a/editeng/source/editeng/impedit2.cxx 
b/editeng/source/editeng/impedit2.cxx
index ccdcd1e0bbc1..664502f4cd71 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -1585,7 +1585,8 @@ EditSelection ImpEditEngine::SelectWord( const 
EditSelection& rCurSel, sal_Int16
 if ( nType == i18n::WordType::ANY_WORD )
 {
 i18n::Boundary aBoundary = _xBI->getWordBoundary(
-aPaM.GetNode()->GetString(), aPaM.GetIndex(), aLocale, nWordType, 
true);
+aPaM.GetNode()->GetString(), aPaM.GetIndex(), aLocale, nWordType,
+aPaM.GetNode()->GetString().getLength() == aPaM.GetIndex() ? false 
: true);
 
 // don't select when cursor at end of word
 if ( ( aBoundary.endPos > aPaM.GetIndex() || ( bAcceptEndOfWord && 
aBoundary.endPos == aPaM.GetIndex() ) ) &&
diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index 0258900725ea..f09a296e8f58 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2701,7 +2701,7 @@ EditSelection ImpEditEngine::TransliterateText( const 
EditSelection& rSelection,
 
 if ( !aSel.HasRange() )
 {
-aSel = SelectWord( aSel, 
css::i18n::WordType::ANYWORD_IGNOREWHITESPACES, true, true );
+aSel = SelectWord( aSel, css::i18n::WordType::WORD_COUNT, true, true );
 if (!aSel.HasRange() && aSel.Min().GetIndex() > 0 &&
 
OUString(".!?").indexOf(aSel.Min().GetNode()->GetChar(aSel.Min().GetIndex() - 
1)) > -1 )
 {
diff --gi

core.git: 2 commits - editeng/qa editeng/source sw/inc sw/source sw/uiconfig

2024-05-08 Thread Oliver Specht (via logerrit)
 editeng/qa/unit/core-test.cxx|4 ++--
 editeng/source/editeng/impedit2.cxx  |3 ++-
 editeng/source/editeng/impedit4.cxx  |2 +-
 sw/inc/crsrsh.hxx|1 +
 sw/source/core/crsr/crstrvl1.cxx |5 +
 sw/source/core/crsr/swcrsr.cxx   |2 +-
 sw/source/uibase/inc/wrtsh.hxx   |2 +-
 sw/source/uibase/shells/textsh.cxx   |   14 --
 sw/source/uibase/wrtsh/select.cxx|4 ++--
 sw/uiconfig/swriter/ui/fldvarpage.ui |   22 --
 10 files changed, 35 insertions(+), 24 deletions(-)

New commits:
commit 04dd541becd9232555e4d6d1e41462359f253993
Author: Oliver Specht 
AuthorDate: Tue May 7 14:33:10 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Wed May 8 10:25:23 2024 +0200

Design change in variable page of the field dialog in Writer

Improves the commit 8e86df886f84fe69f13cfc367a5dd843e6ea917c

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

diff --git a/sw/uiconfig/swriter/ui/fldvarpage.ui 
b/sw/uiconfig/swriter/ui/fldvarpage.ui
index 9fd8c8f8a306..9cfb4ce2bf8d 100644
--- a/sw/uiconfig/swriter/ui/fldvarpage.ui
+++ b/sw/uiconfig/swriter/ui/fldvarpage.ui
@@ -59,6 +59,8 @@
   
 True
 False
+False
+True
 6
 6
 
@@ -195,9 +197,9 @@
 
   
   
-1
+0
 1
-2
+3
   
 
 
@@ -205,7 +207,6 @@
 True
 False
 True
-True
 0
 none
 
@@ -227,6 +228,9 @@
 False
 0
 False
+
+  
+
 
   
 
@@ -262,7 +266,6 @@
   
 0
 0
-2
   
 
 
@@ -270,7 +273,6 @@
 True
 False
 True
-True
 0
 none
 
@@ -292,6 +294,9 @@
 False
 0
 False
+
+  
+
 
   
 
@@ -334,7 +339,6 @@
 True
 False
 True
-True
 0
 none
 
@@ -364,6 +368,9 @@
 False
 0
 False
+
+  
+
 
   
 
@@ -406,6 +413,9 @@
 False
 0
 False
+
+  
+
 
   
 
commit de8eaca887762568e158024ad5bdbfb21526b734
Author: Oliver Specht 
AuthorDate: Tue Apr 30 13:52:09 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Wed May 8 10:25:08 2024 +0200

Case Rotation in Impress and Writer improved

Word boundaries at the end of the paragraph are now correctly detected.
Sentence case is not applied without multi word selection in Writer anymore.

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

diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index b69f58df9e8f..e40d5f0bf4c9 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -1896,8 +1896,8 @@ void Test::testTransliterate()
 esel = ESelection(0, selStart, 0, selEnd);
 CPPUNIT_ASSERT_EQUAL(u""_ustr, editEng.GetText(esel));
 CPPUNIT_ASSERT_EQUAL(u"Mary Jones met joe Smith. Time Passed."_ustr, 
lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
-CPPUNIT_ASSERT_EQUAL(u"Mary Jones met joe Smith. Time Passed."_ustr, 
lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
-CPPUNIT_ASSERT_EQUAL(u"Mary Jones met joe Smith. Time Passed."_ustr, 
lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
+CPPUNIT_ASSERT_EQUAL(u"Mary Jones met joe SMITH. Time Passed."_ustr, 
lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
+CPPUNIT_ASSERT_EQUAL(u"Mary Jones met joe smith. Time Passed."_ustr, 
lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
 
 /* No selection tests. Cursor between the 'm' and 'e' in 'met'. */
 selStart = 12;
diff --git a/editeng/source/editeng/impedit2.cxx 
b/editeng/source/editeng/impedit2.cxx
index 1f5a97053ba7..4e56da97f706 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -1586,7 +1586,8 @@ EditSelection ImpEditEngine::SelectWord( const 
EditSelection& rCurSel, sal_Int16
 if ( nType == i18n::WordType::ANY_WORD )
 {
 i18n::Boundary aBoundary = _xBI->getWordBoundary(

core.git: 2 commits - desktop/source include/sfx2 sd/inc sd/qa sd/sdi sd/source sfx2/source

2024-05-08 Thread Justin Luth (via logerrit)
 desktop/source/app/app.cxx   |1 
 desktop/source/app/cmdlineargs.cxx   |4 ++-
 desktop/source/app/cmdlineargs.hxx   |2 +
 desktop/source/app/cmdlinehelp.cxx   |3 +-
 desktop/source/app/dispatchwatcher.cxx   |   10 
 desktop/source/app/dispatchwatcher.hxx   |2 -
 desktop/source/app/officeipcthread.cxx   |3 +-
 desktop/source/app/officeipcthread.hxx   |1 
 include/sfx2/sfxsids.hrc |2 -
 sd/inc/drawdoc.hxx   |8 +++---
 sd/qa/unit/tiledrendering/tiledrendering.cxx |2 -
 sd/sdi/sdraw.sdi |2 -
 sd/source/core/drawdoc.cxx   |6 ++--
 sd/source/ui/docshell/docshel4.cxx   |   33 ++-
 sd/source/ui/slideshow/slideshowimpl.cxx |7 +++--
 sd/source/ui/view/ViewShellBase.cxx  |   15 
 sd/source/ui/view/drviewse.cxx   |7 -
 sfx2/source/appl/appuno.cxx  |8 +++---
 sfx2/source/doc/objstor.cxx  |2 -
 19 files changed, 71 insertions(+), 47 deletions(-)

New commits:
commit 90eb9ea881a7497bb2ec348b3e4cba5aa5d51fa8
Author: Justin Luth 
AuthorDate: Fri May 3 08:32:27 2024 -0400
Commit: Miklos Vajna 
CommitDate: Wed May 8 09:38:59 2024 +0200

tdf#69192: add StartingSlide to SID_PRESENTATION and cmdline show=

Allow the user to start the presentation at a specific slide
using command-line parameters.

This patch depends on the previous variable renaming patch.

Change-Id: I87797cbccb463904e5d2fe9b078e3921be27c91a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167066
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Miklos Vajna 

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 1dcc49f56d7c..eff8b46d069f 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2094,6 +2094,7 @@ void Desktop::OpenClients()
 aRequest.aConversionParams = rArgs.GetConversionParams();
 aRequest.aConversionOut = rArgs.GetConversionOut();
 aRequest.aImageConversionType = rArgs.GetImageConversionType();
+aRequest.aStartListParams = rArgs.GetStartListParams();
 aRequest.aInFilter = rArgs.GetInFilter();
 aRequest.bTextCat = rArgs.IsTextCat();
 aRequest.bScriptCat = rArgs.IsScriptCat();
diff --git a/desktop/source/app/cmdlineargs.cxx 
b/desktop/source/app/cmdlineargs.cxx
index ba5a3da5a6c3..09a0cd212947 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -537,10 +537,12 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& 
supplier )
 // open in viewmode
 eCurrentEvent = CommandLineEvent::View;
 }
-else if ( oArg == "show" )
+else if (oArg == "show" || oArg.startsWith("show=", &rest))
 {
 // open in viewmode
 eCurrentEvent = CommandLineEvent::Start;
+// start on the first slide unless a valid starting slide # 
was provided
+m_startListParams = rest.toUInt32() > 0 ? rest : "1";
 }
 else if ( oArg == "display" )
 {
diff --git a/desktop/source/app/cmdlineargs.hxx 
b/desktop/source/app/cmdlineargs.hxx
index 59cd741a8c3f..d5d94abd67f2 100644
--- a/desktop/source/app/cmdlineargs.hxx
+++ b/desktop/source/app/cmdlineargs.hxx
@@ -114,6 +114,7 @@ class CommandLineArgs
 const OUString& GetConversionParams() const { return 
m_conversionparams;}
 OUStringGetConversionOut() const;
 OUString const &GetImageConversionType() const { return 
m_convertimages; }
+const OUString& GetStartListParams() const { return 
m_startListParams; }
 const OUString& GetPidfileName() const { return m_pidfile;}
 
 // Special analyzed states (does not match directly to a command line 
parameter!)
@@ -177,6 +178,7 @@ class CommandLineArgs
 OUString m_conversionparams;
 OUString m_conversionout; // contains external URIs
 OUString m_convertimages; // The format in which images should be 
converted
+OUString m_startListParams;
 std::vector< OUString > m_infilter;
 OUString m_language;
 OUString m_pidfile;
diff --git a/desktop/source/app/cmdlinehelp.cxx 
b/desktop/source/app/cmdlinehelp.cxx
index 9c9fd940f233..10b3e5c48cbb 100644
--- a/desktop/source/app/cmdlinehelp.cxx
+++ b/desktop/source/app/cmdlinehelp.cxx
@@ -145,8 +145,9 @@ namespace desktop
 "   not appear. If the file name contains spaces, 
then it   
"
 "   must be enclosed in quotation marks.   
 
"
 "   --view  Opens following files in viewer mode 
(read-only).   
"
-"   --show  Opens and starts the

core.git: Branch 'libreoffice-24-2' - sw/qa sw/source

2024-05-08 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ww8export/data/draw-obj-rtl-no-mirror-vml.docx |binary
 sw/qa/extras/ww8export/ww8export4.cxx   |   24 
 sw/source/filter/ww8/wrtw8esh.cxx   |6 +++
 3 files changed, 30 insertions(+)

New commits:
commit fe9395164bc4130c83ab75e0c471516f9da61bee
Author: Miklos Vajna 
AuthorDate: Fri May 3 13:54:02 2024 +0200
Commit: Xisco Fauli 
CommitDate: Wed May 8 09:34:09 2024 +0200

Related: tdf#160833 teach DOC export about DoNotMirrorRtlDrawObjs

See

,
no need to undo the import-time mapping in case we know that the
mirroring is avoided at a layout level.

Change-Id: Idbdc10ad327540dc5045e9b19dd42160b5139470
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167049
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins
(cherry picked from commit 9d95eb980ef12678f6fb978badcbe1cacbe0c4dc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167084
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/extras/ww8export/data/draw-obj-rtl-no-mirror-vml.docx 
b/sw/qa/extras/ww8export/data/draw-obj-rtl-no-mirror-vml.docx
new file mode 100644
index ..3b291901f72d
Binary files /dev/null and 
b/sw/qa/extras/ww8export/data/draw-obj-rtl-no-mirror-vml.docx differ
diff --git a/sw/qa/extras/ww8export/ww8export4.cxx 
b/sw/qa/extras/ww8export/ww8export4.cxx
index d31bf17a31f6..3fb0ae7b03a4 100644
--- a/sw/qa/extras/ww8export/ww8export4.cxx
+++ b/sw/qa/extras/ww8export/ww8export4.cxx
@@ -252,6 +252,30 @@ CPPUNIT_TEST_FIXTURE(Test, testLegalNumbering)
 verify();
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testDOCExportDoNotMirrorRtlDrawObjs)
+{
+// Given a document with a shape, anchored in an RTL paragraph, loaded 
from DOCX:
+createSwDoc("draw-obj-rtl-no-mirror-vml.docx");
+
+// When saving that to DOC:
+saveAndReload(mpFilter);
+
+// Then make sure the shape is on the right margin:
+xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+sal_Int32 nPageRight = getXPath(pXmlDoc, "//page/infos/bounds"_ostr, 
"right"_ostr).toInt32();
+sal_Int32 nBodyRight = getXPath(pXmlDoc, "//body/infos/bounds"_ostr, 
"right"_ostr).toInt32();
+sal_Int32 nShapeLeft
+= getXPath(pXmlDoc, "//SwAnchoredDrawObject/bounds"_ostr, 
"left"_ostr).toInt32();
+CPPUNIT_ASSERT_GREATER(nBodyRight, nShapeLeft);
+sal_Int32 nShapeRight
+= getXPath(pXmlDoc, "//SwAnchoredDrawObject/bounds"_ostr, 
"right"_ostr).toInt32();
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected less than: 12523
+// - Actual  : 12536
+// i.e. the shape was outside of the page right margin area, due to an 
unwanted mapping.
+CPPUNIT_ASSERT_LESS(nPageRight, nShapeRight);
+}
+
 DECLARE_WW8EXPORT_TEST(testNonInlinePageBreakFirstLine, 
"nonInlinePageBreakFirstLine.doc")
 {
 SwDoc* pDoc = getSwDoc();
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx 
b/sw/source/filter/ww8/wrtw8esh.cxx
index 19ac50ccf5c9..272e3bd27735 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -577,6 +577,12 @@ void WW8Export::MiserableRTLFrameFormatHack(SwTwips 
&rLeft, SwTwips &rRight,
 if (SvxFrameDirection::Horizontal_RL_TB != 
m_rDoc.GetTextDirection(rFrameFormat.GetPosition()))
 return;
 
+if 
(m_rDoc.getIDocumentSettingAccess().get(DocumentSettingId::DO_NOT_MIRROR_RTL_DRAW_OBJS))
+{
+// Swap is handled at a layout-level, no need to compensate for it at 
export time.
+return;
+}
+
 SwTwips nWidth = rRight - rLeft;
 SwTwips nPageLeft, nPageRight;
 SwTwips nPageSize = CurrentPageWidth(nPageLeft, nPageRight);


core.git: Branch 'libreoffice-24-2' - cui/source sw/source

2024-05-08 Thread Miklos Vajna (via logerrit)
 cui/source/inc/swpossizetabpage.hxx  |1 +
 cui/source/tabpages/swpossizetabpage.cxx |   27 +--
 sw/source/uibase/shells/drwbassh.cxx |   10 ++
 3 files changed, 32 insertions(+), 6 deletions(-)

New commits:
commit e74f2f3f259125434f7fb9f8d7c338123a0137ed
Author: Miklos Vajna 
AuthorDate: Fri May 3 08:08:29 2024 +0200
Commit: Xisco Fauli 
CommitDate: Wed May 8 09:33:44 2024 +0200

tdf#160833 sw DoNotMirrorRtlDrawObjs: add UI in cui/

The UI code at lcl_ChangeResIdToVerticalOrRTL() was aware that
SwAnchoredObjectPosition::CalcRelPosX() mirrors the position when the
anchor paragraph is RTL, so swapped the "from left" label to a "from
right" label.

Don't do this when the compat option is enabled, so not only we render
correctly but the UI now correctly explains why we came up with the
correct position.

Change-Id: I479ed1f085b249d10be47b66d7a656dc1bd4f936
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167031
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins
(cherry picked from commit 0f410680461d7ba5f70dd65b2a8263dec15ac357)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167083
Reviewed-by: Xisco Fauli 

diff --git a/cui/source/inc/swpossizetabpage.hxx 
b/cui/source/inc/swpossizetabpage.hxx
index eb73196986bf..ede7fd4231ae 100644
--- a/cui/source/inc/swpossizetabpage.hxx
+++ b/cui/source/inc/swpossizetabpage.hxx
@@ -52,6 +52,7 @@ class SvxSwPosSizeTabPage : public SfxTabPage
 boolm_bPositioningDisabled;
 boolm_bIsMultiSelection;
 boolm_bIsInRightToLeft;
+bool m_bDoNotMirrorRtlDrawObjs = false;
 TriStatem_nProtectSizeState;
 
 SwFrameExample m_aExampleWN;
diff --git a/cui/source/tabpages/swpossizetabpage.cxx 
b/cui/source/tabpages/swpossizetabpage.cxx
index 060f7b44ce9f..8de586a74df5 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -37,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star::text;
 
@@ -431,14 +432,16 @@ static std::size_t lcl_GetFrmMapCount(const FrmMap* pMap)
 }
 
 static SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(
-SvxSwFramePosString::StringId eStringId, bool bVertical, bool bRTL)
+SvxSwFramePosString::StringId eStringId, bool bVertical, bool 
bRTL, bool bDontMirrorRTL)
 {
 //special handling of STR_FROMLEFT
 if(SvxSwFramePosString::FROMLEFT == eStringId)
 {
+bool bMirrorRtlDrawObjs = !bDontMirrorRTL;
+bool bSwapLR = bRTL && bMirrorRtlDrawObjs;
 eStringId = bVertical ?
 bRTL ? SvxSwFramePosString::FROMBOTTOM : 
SvxSwFramePosString::FROMTOP :
-bRTL ? SvxSwFramePosString::FROMRIGHT : 
SvxSwFramePosString::FROMLEFT;
+bSwapLR ? SvxSwFramePosString::FROMRIGHT : 
SvxSwFramePosString::FROMLEFT;
 return eStringId;
 }
 if(bVertical)
@@ -728,7 +731,8 @@ WhichRangesContainer SvxSwPosSizeTabPage::GetRanges()
 SID_ATTR_TRANSFORM_AUTOWIDTH, SID_ATTR_TRANSFORM_VERT_ORIENT,
 SID_HTML_MODE, SID_HTML_MODE,
 SID_SW_FOLLOW_TEXT_FLOW, SID_SW_FOLLOW_TEXT_FLOW,
-SID_ATTR_TRANSFORM_HORI_POSITION, SID_ATTR_TRANSFORM_VERT_POSITION
+SID_ATTR_TRANSFORM_HORI_POSITION, SID_ATTR_TRANSFORM_VERT_POSITION,
+SID_ATTR_CHAR_GRABBAG, SID_ATTR_CHAR_GRABBAG
 >);
 return ranges;
 }
@@ -967,6 +971,17 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet* rSet)
 }
 m_xFollowCB->save_state();
 
+const SfxGrabBagItem* pGrabBag = GetItem(*rSet, SID_ATTR_CHAR_GRABBAG);
+if (pGrabBag)
+{
+const std::map& rMap = pGrabBag->GetGrabBag();
+auto it = rMap.find("DoNotMirrorRtlDrawObjs");
+if (it != rMap.end())
+{
+it->second >>= m_bDoNotMirrorRtlDrawObjs;
+}
+}
+
 if(m_bHtmlMode)
 {
 m_xHoriMirrorCB->hide();
@@ -1651,7 +1666,7 @@ void SvxSwPosSizeTabPage::FillRelLB(FrmMap const *pMap, 
sal_uInt16 nMapPos, sal_
 {
 SvxSwFramePosString::StringId sStrId1 = 
aAsCharRelationMap[nRelPos].eStrId;
 
-sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, 
m_bIsVerticalFrame, m_bIsInRightToLeft);
+sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, 
m_bIsVerticalFrame, m_bIsInRightToLeft, m_bDoNotMirrorRtlDrawObjs);
 OUString sEntry = 
SvxSwFramePosString::GetString(sStrId1);
 
rLB.append(weld::toId(&aAsCharRelationMap[nRelPos]), sEntry);
 if (pMap[_nMapPos].nAlign == nAlign)
@@ -1706,7 +1721,7 @@ void SvxSwPosSizeTabPage::FillRelLB(FrmMap const *pMap, 
sal_uInt16 nMapPos, sal_
 if (aRelationMap[nRelPos].nLBRelation == 
static_cast(nBit))
 {
 SvxSwFramePosString::S

core.git: sw/qa

2024-05-08 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/rtfexport/rtfexport6.cxx | 1115 ++
 1 file changed, 722 insertions(+), 393 deletions(-)

New commits:
commit af3d52e444595a4a3b50528c0f02fa798e7a2b08
Author: Miklos Vajna 
AuthorDate: Wed May 8 08:11:07 2024 +0200
Commit: Miklos Vajna 
CommitDate: Wed May 8 09:07:54 2024 +0200

CppunitTest_sw_rtfexport6: avoid DECLARE_RTFEXPORT_TEST

No need to go via Writer-specific macros here.

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

diff --git a/sw/qa/extras/rtfexport/rtfexport6.cxx 
b/sw/qa/extras/rtfexport/rtfexport6.cxx
index e943de10622b..f206c1ddadfb 100644
--- a/sw/qa/extras/rtfexport/rtfexport6.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport6.cxx
@@ -47,25 +47,43 @@ public:
 }
 };
 
-DECLARE_RTFEXPORT_TEST(testFdo85889pc, "fdo85889-pc.rtf")
+CPPUNIT_TEST_FIXTURE(Test, testFdo85889pc)
 {
-uno::Reference xTextRange = getRun(getParagraph(1), 1);
+auto verify = [this]() {
+uno::Reference xTextRange = getRun(getParagraph(1), 
1);
 
-CPPUNIT_ASSERT_EQUAL(u"\u00B1\u2265\u2264"_ustr, xTextRange->getString());
+CPPUNIT_ASSERT_EQUAL(u"\u00B1\u2265\u2264"_ustr, 
xTextRange->getString());
+};
+createSwDoc("fdo85889-pc.rtf");
+verify();
+saveAndReload(mpFilter);
+verify();
 }
 
-DECLARE_RTFEXPORT_TEST(testFdo85889pca, "fdo85889-pca.rtf")
+CPPUNIT_TEST_FIXTURE(Test, testFdo85889pca)
 {
-uno::Reference xTextRange = getRun(getParagraph(1), 1);
+auto verify = [this]() {
+uno::Reference xTextRange = getRun(getParagraph(1), 
1);
 
-CPPUNIT_ASSERT_EQUAL(u"\u00B1\u2017\u00BE"_ustr, xTextRange->getString());
+CPPUNIT_ASSERT_EQUAL(u"\u00B1\u2017\u00BE"_ustr, 
xTextRange->getString());
+};
+createSwDoc("fdo85889-pca.rtf");
+verify();
+saveAndReload(mpFilter);
+verify();
 }
 
-DECLARE_RTFEXPORT_TEST(testFdo85889mac, "fdo85889-mac.rtf")
+CPPUNIT_TEST_FIXTURE(Test, testFdo85889mac)
 {
-uno::Reference xTextRange = getRun(getParagraph(1), 1);
+auto verify = [this]() {
+uno::Reference xTextRange = getRun(getParagraph(1), 
1);
 
-CPPUNIT_ASSERT_EQUAL(u"\u00D2\u00DA\u00DB"_ustr, xTextRange->getString());
+CPPUNIT_ASSERT_EQUAL(u"\u00D2\u00DA\u00DB"_ustr, 
xTextRange->getString());
+};
+createSwDoc("fdo85889-mac.rtf");
+verify();
+saveAndReload(mpFilter);
+verify();
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testFdo72031)
@@ -86,63 +104,111 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo72031)
 verify();
 }
 
-DECLARE_RTFEXPORT_TEST(testFdo86750, "fdo86750.rtf")
+CPPUNIT_TEST_FIXTURE(Test, testFdo86750)
 {
-// This was 'HYPERLINK#anchor', the URL of the hyperlink had the field 
type as a prefix, leading to broken links.
-CPPUNIT_ASSERT_EQUAL(OUString("#anchor"),
- getProperty(getRun(getParagraph(1), 1), 
"HyperLinkURL"));
+auto verify = [this]() {
+// This was 'HYPERLINK#anchor', the URL of the hyperlink had the field 
type as a prefix, leading to broken links.
+CPPUNIT_ASSERT_EQUAL(OUString("#anchor"),
+ getProperty(getRun(getParagraph(1), 1), 
"HyperLinkURL"));
+};
+createSwDoc("fdo86750.rtf");
+verify();
+saveAndReload(mpFilter);
+verify();
 }
 
-DECLARE_RTFEXPORT_TEST(testTdf88811, "tdf88811.rtf")
+CPPUNIT_TEST_FIXTURE(Test, testTdf88811)
 {
-// The problem was that shapes anchored to the paragraph that is moved 
into a textframe were lost, so this was 2.
-CPPUNIT_ASSERT_EQUAL(4, getShapes());
+auto verify = [this]() {
+// The problem was that shapes anchored to the paragraph that is moved 
into a textframe were lost, so this was 2.
+CPPUNIT_ASSERT_EQUAL(4, getShapes());
+};
+createSwDoc("tdf88811.rtf");
+verify();
+saveAndReload(mpFilter);
+verify();
 }
 
-DECLARE_RTFEXPORT_TEST(testFdo49893_2, "fdo49893-2.rtf")
+CPPUNIT_TEST_FIXTURE(Test, testFdo49893_2)
 {
-// Ensure that header text exists on each page (especially on second page)
-CPPUNIT_ASSERT_EQUAL(OUString("HEADER"), 
parseDump("/root/page[1]/header/txt/text()"_ostr));
-CPPUNIT_ASSERT_EQUAL(OUString("HEADER"), 
parseDump("/root/page[2]/header/txt/text()"_ostr));
-CPPUNIT_ASSERT_EQUAL(OUString("HEADER"), 
parseDump("/root/page[3]/header/txt/text()"_ostr));
-CPPUNIT_ASSERT_EQUAL(OUString("HEADER"), 
parseDump("/root/page[4]/header/txt/text()"_ostr));
-CPPUNIT_ASSERT_EQUAL(OUString("HEADER"), 
parseDump("/root/page[5]/header/txt/text()"_ostr));
-CPPUNIT_ASSERT_EQUAL(5, getPages()); // Word has 5
+auto verify = [this]() {
+// Ensure that header text exists on each page (especially on second 
page)
+CPPUNIT_ASSERT_EQUAL(OUString("HEADER"), 
parseDump("/root/page[1]/header/txt/text()"_ostr));
+CPPUNIT_ASSERT_EQUAL(OUString("HEADER"), 
parseDump("/root/page[2]/hea