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

2023-01-09 Thread Vasily Melenchuk (via logerrit)
 sw/qa/extras/rtfexport/data/tdf152784_1.rtf |   20 
 sw/qa/extras/rtfexport/rtfexport3.cxx   |9 +
 writerfilter/source/rtftok/rtfsprm.cxx  |4 ++--
 3 files changed, 31 insertions(+), 2 deletions(-)

New commits:
commit 588ff9a228f4894142264c68392ed1e9800a4d7d
Author: Vasily Melenchuk 
AuthorDate: Tue Dec 27 15:31:37 2022 +0300
Commit: Miklos Vajna 
CommitDate: Tue Jan 10 07:15:00 2023 +

tdf#152784: RTF import: more default paragraph params

If numbering is not explicitly mentioned in para properties
it should not be used from referred paragraph style. So
default value of 0 (no numbering) is used by default.

Change-Id: If8e8f2aaf19190f64a557444188f67b24a699b54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144839
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145195

diff --git a/sw/qa/extras/rtfexport/data/tdf152784_1.rtf 
b/sw/qa/extras/rtfexport/data/tdf152784_1.rtf
new file mode 100644
index ..19dcaa36e4df
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/tdf152784_1.rtf
@@ -0,0 +1,20 @@
+{\rtf1
+
+{\stylesheet
+{\s3 \ls1\outlinelevel2  heading 3;}}
+{\*\listtable
+{\list\listtemplateid-374154644
+{\listlevel{\leveltext\'02\'00.;}{\levelnumbers\'01;}}
+{\listlevel{\leveltext\'02\'01.;}{\levelnumbers\'01;}}
+{\listlevel{\leveltext\'02\'02.;}{\levelnumbers\'01;}}
+{\listname ;}\listid773479173}
+}
+{\*\listoverridetable
+{\listoverride\listid773479173\listoverridecount0\ls1}
+}
+
+\pard\s3 Here should be no numbering!
+\par
+
+}
+
diff --git a/sw/qa/extras/rtfexport/rtfexport3.cxx 
b/sw/qa/extras/rtfexport/rtfexport3.cxx
index 5cbf173d35fb..8fcddf78dbb6 100644
--- a/sw/qa/extras/rtfexport/rtfexport3.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport3.cxx
@@ -544,6 +544,15 @@ DECLARE_RTFEXPORT_TEST(testInvalidParagraphStyle, 
"invalidParagraphStyle.rtf")
 CPPUNIT_ASSERT_EQUAL(style::NumberingType::ARABIC, numFormat);
 }
 
+DECLARE_RTFEXPORT_TEST(testTdf152784_1, "tdf152784_1.rtf")
+{
+// Ensure that paragraph having style with numbering does not have 
numbering
+// since it is not explitly defined in paragraph properties
+uno::Reference xPara(getParagraph(1, "Here should be 
no numbering!"),
+  uno::UNO_QUERY);
+CPPUNIT_ASSERT(getProperty(xPara, 
"NumberingStyleName").isEmpty());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/rtftok/rtfsprm.cxx 
b/writerfilter/source/rtftok/rtfsprm.cxx
index 90bc97001d27..7a3e4d454687 100644
--- a/writerfilter/source/rtftok/rtfsprm.cxx
+++ b/writerfilter/source/rtftok/rtfsprm.cxx
@@ -192,13 +192,13 @@ static RTFValue::Pointer_t getDefaultSPRM(Id const id, Id 
nStyleType)
 case NS_ooxml::LN_CT_Ind_right:
 case NS_ooxml::LN_CT_Ind_firstLine:
 return new RTFValue(0);
-
 case NS_ooxml::LN_CT_Spacing_lineRule:
 return new 
RTFValue(NS_ooxml::LN_Value_doc_ST_LineSpacingRule_auto);
 case NS_ooxml::LN_CT_Spacing_line:
 // presumably this means 100%, cf. static const int 
nSingleLineSpacing = 240;
 return new RTFValue(240);
-
+case NS_ooxml::LN_CT_NumPr_numId:
+return new RTFValue(0);
 case NS_ooxml::LN_CT_PrBase_pBdr:
 { // tdf#150382 default all paragraph borders to none
 RTFSprms attributes;


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

2023-01-09 Thread Dennis Francis (via logerrit)
 vcl/qa/cppunit/pdfexport/data/ref-to-kids.pdf |binary
 vcl/qa/cppunit/pdfexport/pdfexport.cxx|   46 ++
 vcl/source/gdi/pdfobjectcopier.cxx|   24 +
 3 files changed, 69 insertions(+), 1 deletion(-)

New commits:
commit cff10826774a7767cacfb2bf8fef0eea94615627
Author: Dennis Francis 
AuthorDate: Fri Dec 2 13:11:42 2022 +0530
Commit: Miklos Vajna 
CommitDate: Tue Jan 10 07:14:31 2023 +

vcl: Copy the resource kind object itself if...

some of the items in that resource are themselves dictionaries instead
of references.

Change-Id: I427386b14fe5507dfdfc9745dad27a8fceefd929
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143564
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
(cherry picked from commit 4cb521b28e8582eda1a63bc4d92061fd111a2e3d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144438
Tested-by: Jenkins
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145204

diff --git a/vcl/qa/cppunit/pdfexport/data/ref-to-kids.pdf 
b/vcl/qa/cppunit/pdfexport/data/ref-to-kids.pdf
index 0390ccad8410..fdda33f78231 100644
Binary files a/vcl/qa/cppunit/pdfexport/data/ref-to-kids.pdf and 
b/vcl/qa/cppunit/pdfexport/data/ref-to-kids.pdf differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index ce070a711911..4cf31e708220 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -4247,6 +4247,52 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, 
testRexportMediaBoxOrigin)
 }
 }
 
+CPPUNIT_TEST_FIXTURE(PdfExportTest, testRexportResourceItemReference)
+{
+// We need to enable PDFium import (and make sure to disable after the 
test)
+bool bResetEnvVar = false;
+if (getenv("LO_IMPORT_USE_PDFIUM") == nullptr)
+{
+bResetEnvVar = true;
+osl_setEnvironment(OUString("LO_IMPORT_USE_PDFIUM").pData, 
OUString("1").pData);
+}
+comphelper::ScopeGuard aPDFiumEnvVarGuard([&]() {
+if (bResetEnvVar)
+osl_clearEnvironment(OUString("LO_IMPORT_USE_PDFIUM").pData);
+});
+
+// Load the PDF and save as PDF
+vcl::filter::PDFDocument aDocument;
+load(u"ref-to-kids.pdf", aDocument);
+
+std::vector aPages = aDocument.GetPages();
+CPPUNIT_ASSERT_EQUAL(size_t(5), aPages.size());
+
+// Directly go to the inner XObject Im10 that has reference to Font in 
page 2.
+auto pInnerIm = aDocument.LookupObject(10);
+CPPUNIT_ASSERT(pInnerIm);
+
+auto pResources
+= 
dynamic_cast(pInnerIm->Lookup("Resources"));
+CPPUNIT_ASSERT(pResources);
+auto pFontsReference
+= 
dynamic_cast(pResources->LookupElement("Font"));
+CPPUNIT_ASSERT(pFontsReference);
+
+auto pFontsObject = pFontsReference->LookupObject();
+CPPUNIT_ASSERT(pFontsObject);
+
+auto pFontDict
+= 
dynamic_cast(pFontsObject->Lookup("FF132"));
+CPPUNIT_ASSERT(pFontDict);
+
+auto pFontDescriptor = pFontDict->LookupObject("FontDescriptor");
+CPPUNIT_ASSERT(pFontDescriptor);
+
+auto pFontWidths = pFontDict->LookupObject("Widths");
+CPPUNIT_ASSERT(pFontWidths);
+}
+
 } // end anonymous namespace
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/vcl/source/gdi/pdfobjectcopier.cxx 
b/vcl/source/gdi/pdfobjectcopier.cxx
index 67f70d10f2a9..2f32cdc27ce1 100644
--- a/vcl/source/gdi/pdfobjectcopier.cxx
+++ b/vcl/source/gdi/pdfobjectcopier.cxx
@@ -184,6 +184,7 @@ OString 
PDFObjectCopier::copyExternalResources(filter::PDFObjectElement& rPage,
 
 // Get the rKind subset of the resource dictionary.
 std::map aItems;
+filter::PDFObjectElement* pKindObject = nullptr;
 if (auto pResources = 
dynamic_cast(rPage.Lookup("Resources")))
 {
 // Resources is a direct dictionary.
@@ -202,6 +203,7 @@ OString 
PDFObjectCopier::copyExternalResources(filter::PDFObjectElement& rPage,
 return {};
 }
 
+pKindObject = pReferenced;
 aItems = pReferenced->GetDictionaryItems();
 }
 }
@@ -210,23 +212,37 @@ OString 
PDFObjectCopier::copyExternalResources(filter::PDFObjectElement& rPage,
 // Resources is an indirect object.
 filter::PDFElement* pValue = pPageResources->Lookup(rKind);
 if (auto pDictionary = 
dynamic_cast(pValue))
+{
 // Kind is a direct dictionary.
 aItems = pDictionary->GetItems();
+}
 else if (filter::PDFObjectElement* pObject = 
pPageResources->LookupObject(rKind))
+{
 // Kind is an indirect object.
 aItems = pObject->GetDictionaryItems();
+pKindObject = pObject;
+}
 }
 if (aItems.empty())
 return {};
 
 SvMemoryStream& rDocBuffer = rPage.GetDocument().GetEditBuffer();
+bool bHasDictValue = false;
 
 for (const auto& rItem : aItems)
 {
 // For each item copy 

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

2023-01-09 Thread Miklos Vajna (via logerrit)
 sw/qa/uibase/shells/shells.cxx  |9 +++--
 sw/source/uibase/shells/textsh1.cxx |2 +-
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit d2318503d559c3797965da777627e4ee45143043
Author: Miklos Vajna 
AuthorDate: Mon Jan 9 16:27:15 2023 +0100
Commit: Miklos Vajna 
CommitDate: Tue Jan 10 07:06:50 2023 +

sw, UpdateBookmarks: support renaming bookmarks

The problem was that the LOK API client wanted to change the name of the
bookmark, but nothing happened, because we had a sanity check that made
sure the provided vs existing bookmark names match.

The intention was that the bookmark name is just an ID (you can store
additional properties in per-doc custom properties, those can change),
so we can require that bookmarks never get renamed when using this
command.

Fix the problem by dropping this requirement and rather use renameMark()
to adjust the in-doc bookmark name if needed.

This also handles undo/redo for us.

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

diff --git a/sw/qa/uibase/shells/shells.cxx b/sw/qa/uibase/shells/shells.cxx
index a394221997cb..841a07993c98 100644
--- a/sw/qa/uibase/shells/shells.cxx
+++ b/sw/qa/uibase/shells/shells.cxx
@@ -467,7 +467,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, 
testUpdateBookmarks)
 {
 "Bookmark": {
 "type": "string",
-"value": "ZOTERO_BREF_GiQ7DAWQYWLy"
+"value": "ZOTERO_BREF_new1"
 },
 "BookmarkText": {
 "type": "string",
@@ -477,7 +477,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, 
testUpdateBookmarks)
 {
 "Bookmark": {
 "type": "string",
-"value": "ZOTERO_BREF_PRxDGUb4SWXF"
+"value": "ZOTERO_BREF_new2"
 },
 "BookmarkText": {
 "type": "string",
@@ -499,6 +499,11 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, 
testUpdateBookmarks)
 // - Actual  : ABCDE
 // i.e. the content was not updated.
 CPPUNIT_ASSERT_EQUAL(OUString("Anew result 1Cnew result 2E"), aActual);
+
+// Without the accompanying fix in place, this test would have failed, 
ZOTERO_BREF_GiQ7DAWQYWLy
+// was not renamed to ZOTERO_BREF_new1.
+auto it = pDoc->getIDocumentMarkAccess()->findMark("ZOTERO_BREF_new1");
+CPPUNIT_ASSERT(it != pDoc->getIDocumentMarkAccess()->getAllMarksEnd());
 }
 
 CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testInsertFieldmarkReadonly)
diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index f86621c78a56..400a9d39bce0 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -423,7 +423,7 @@ void UpdateBookmarks(SfxRequest& rReq, SwWrtShell& rWrtSh)
 comphelper::SequenceAsHashMap aMap(aBookmarks[nBookmarkIndex++]);
 if (aMap["Bookmark"].get() != pMark->GetName())
 {
-continue;
+rIDMA.renameMark(pMark, aMap["Bookmark"].get());
 }
 
 OUString aBookmarkText = aMap["BookmarkText"].get();


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

2023-01-09 Thread Miklos Vajna (via logerrit)
 desktop/source/lib/init.cxx   |2 +-
 include/vcl/ITiledRenderable.hxx  |2 +-
 sw/inc/unotxdoc.hxx   |4 ++--
 sw/source/uibase/uno/loktxdoc.cxx |2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 913b399a73c4d6dfd2c9f5983f56f612f3262fa7
Author: Miklos Vajna 
AuthorDate: Mon Jan 9 15:30:26 2023 +0100
Commit: Miklos Vajna 
CommitDate: Tue Jan 10 07:06:30 2023 +

vcl ITiledRenderable: rename supportsCommandValues() to supportsCommand()

It gets a single command (to determine if using it with
getCommandValues() is OK or not), so the plural was confusing, as
mentioned at

.

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 133531034c15..35070994d943 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -5878,7 +5878,7 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* 
pThis, const char* pCo
 {
 return getFontSubset(aCommand.substr(aFontSubset.getLength()));
 }
-else if 
(pDoc->supportsCommandValues(INetURLObject(OUString::fromUtf8(aCommand)).GetURLPath()))
+else if 
(pDoc->supportsCommand(INetURLObject(OUString::fromUtf8(aCommand)).GetURLPath()))
 {
 tools::JsonWriter aJsonWriter;
 pDoc->getCommandValues(aJsonWriter, aCommand);
diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
index 7d3f4b7aaf33..d110e33f7e19 100644
--- a/include/vcl/ITiledRenderable.hxx
+++ b/include/vcl/ITiledRenderable.hxx
@@ -370,7 +370,7 @@ public:
 virtual void setPaintTextEdit(bool) {}
 
 /// Decides if it's OK to call getCommandValues(rCommand).
-virtual bool supportsCommandValues(std::u16string_view /*rCommand*/) { 
return false; }
+virtual bool supportsCommand(std::u16string_view /*rCommand*/) { return 
false; }
 
 /// Returns a json mapping of the possible values for the given command.
 virtual void getCommandValues(tools::JsonWriter& /*rJsonWriter*/, 
std::string_view /*rCommand*/)
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index a7bbcb776f44..57cb3ccca589 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -462,8 +462,8 @@ public:
 /// @see vcl::ITiledRenderable::getCommandValues().
 void getCommandValues(tools::JsonWriter& rJsonWriter, std::string_view 
rCommand) override;
 
-/// @see vcl::ITiledRenderable::supportsCommandValues().
-bool supportsCommandValues(std::u16string_view rCommand) override;
+/// @see vcl::ITiledRenderable::supportsCommand().
+bool supportsCommand(std::u16string_view rCommand) override;
 
 voidInvalidate();
 voidReactivate(SwDocShell* pNewDocShell);
diff --git a/sw/source/uibase/uno/loktxdoc.cxx 
b/sw/source/uibase/uno/loktxdoc.cxx
index 9c92d071e27e..2291cf3f7ab5 100644
--- a/sw/source/uibase/uno/loktxdoc.cxx
+++ b/sw/source/uibase/uno/loktxdoc.cxx
@@ -322,7 +322,7 @@ void GetSections(tools::JsonWriter& rJsonWriter, 
SwDocShell* pDocShell,
 }
 }
 
-bool SwXTextDocument::supportsCommandValues(std::u16string_view rCommand)
+bool SwXTextDocument::supportsCommand(std::u16string_view rCommand)
 {
 static const std::initializer_list vForward
 = { u"TextFormFields", u"TextFormField", u"SetDocumentProperties",


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

2023-01-09 Thread Miklos Vajna (via logerrit)
 sw/qa/uibase/uno/uno.cxx  |   28 ++
 sw/source/uibase/inc/frmpage.hxx  |2 +
 sw/source/uibase/uno/loktxdoc.cxx |   40 --
 3 files changed, 68 insertions(+), 2 deletions(-)

New commits:
commit 2ddd41b420cea7f1b988f0b8acbca564b2811382
Author: Miklos Vajna 
AuthorDate: Mon Jan 9 13:53:35 2023 +0100
Commit: Miklos Vajna 
CommitDate: Tue Jan 10 07:06:00 2023 +

sw, lok: implement a getCommandValues(Sections)

There was no LOK API to get a list of all sections where the name
matches a certain prefix.

This is useful in case the API client wants to know what previously
inserted sections were deleted by the user as part of deleting text
content.

Add a new getCommandValues(".uno:Sections") that returns the names of
matching sections. Do not return the section text, assuming that would
be updated by the API client anyway.

In practice this is needed by Zotero in case it wants to model its
bibliography items with sections.

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

diff --git a/sw/qa/uibase/uno/uno.cxx b/sw/qa/uibase/uno/uno.cxx
index a23f6e0f4968..b9158c44426d 100644
--- a/sw/qa/uibase/uno/uno.cxx
+++ b/sw/qa/uibase/uno/uno.cxx
@@ -413,6 +413,34 @@ CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, testGetTextFormField)
  aTree.get("command"));
 }
 
+CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, testGetSections)
+{
+// Given a document with a section:
+createSwDoc();
+uno::Sequence aArgs = {
+comphelper::makePropertyValue(
+"RegionName", uno::Any(OUString("ZOTERO_BIBL {} CSL_BIBLIOGRAPHY 
RNDRfiit6mXBc"))),
+comphelper::makePropertyValue("Content", 
uno::Any(OUString("aaabbb"))),
+};
+dispatchCommand(mxComponent, ".uno:InsertSection", aArgs);
+
+// When asking for a list of section names:
+tools::JsonWriter aJsonWriter;
+std::string_view aCommand(".uno:Sections?namePrefix=ZOTERO_BIBL");
+auto pXTextDocument = dynamic_cast(mxComponent.get());
+pXTextDocument->getCommandValues(aJsonWriter, aCommand);
+
+// Make sure we find our just inserted section:
+std::unique_ptr 
pJSON(aJsonWriter.extractData());
+std::stringstream aStream(pJSON.get());
+boost::property_tree::ptree aTree;
+boost::property_tree::read_json(aStream, aTree);
+// Without the accompanying fix in place, this test would have failed with:
+// - No such node (sections)
+// i.e. the returned JSON was an empty object.
+CPPUNIT_ASSERT_EQUAL(static_cast(1), 
aTree.get_child("sections").count(""));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/uno/loktxdoc.cxx 
b/sw/source/uibase/uno/loktxdoc.cxx
index ec0e9303527d..9c92d071e27e 100644
--- a/sw/source/uibase/uno/loktxdoc.cxx
+++ b/sw/source/uibase/uno/loktxdoc.cxx
@@ -289,13 +289,44 @@ void GetFields(tools::JsonWriter& rJsonWriter, 
SwDocShell* pDocShell,
 rJsonWriter.put("name", pRefMark->GetRefName());
 }
 }
+
+/// Implements getCommandValues(".uno:Sections").
+///
+/// Parameters:
+///
+/// - namePrefix: field name prefix to not return all sections
+void GetSections(tools::JsonWriter& rJsonWriter, SwDocShell* pDocShell,
+ const std::map& rArguments)
+{
+OUString aNamePrefix;
+{
+auto it = rArguments.find("namePrefix");
+if (it != rArguments.end())
+{
+aNamePrefix = it->second;
+}
+}
+
+SwDoc* pDoc = pDocShell->GetDoc();
+tools::ScopedJsonWriterArray aBookmarks = 
rJsonWriter.startArray("sections");
+for (const auto& pSection : pDoc->GetSections())
+{
+if (!pSection->GetName().startsWith(aNamePrefix))
+{
+continue;
+}
+
+tools::ScopedJsonWriterStruct aProperty = rJsonWriter.startStruct();
+rJsonWriter.put("name", pSection->GetName());
+}
+}
 }
 
 bool SwXTextDocument::supportsCommandValues(std::u16string_view rCommand)
 {
 static const std::initializer_list vForward
-= { u"TextFormFields", u"TextFormField", u"SetDocumentProperties", 
u"Bookmarks",
-u"Fields" };
+= { u"TextFormFields", u"TextFormField", u"SetDocumentProperties",
+u"Bookmarks",  u"Fields",u"Sections" };
 
 return std::find(vForward.begin(), vForward.end(), rCommand) != 
vForward.end();
 }
@@ -309,6 +340,7 @@ void SwXTextDocument::getCommandValues(tools::JsonWriter& 
rJsonWriter, std::stri
 static constexpr OStringLiteral 
aSetDocumentProperties(".uno:SetDocumentProperties");
 static constexpr OStringLiteral aBookmarks(".uno:Bookmarks");
 static constexpr OStringLiteral aFields(".uno:Fields");
+static constexpr OStringLiteral aSections(".uno:Sections");
 
 I

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

2023-01-09 Thread Patrick Luby (via logerrit)
 vcl/osx/a11ytablewrapper.mm |   23 ---
 1 file changed, 16 insertions(+), 7 deletions(-)

New commits:
commit d96c98647511b6c1f1d1d9a969df39f859cc0696
Author: Patrick Luby 
AuthorDate: Mon Jan 9 18:00:11 2023 -0500
Commit: Noel Grandin 
CommitDate: Tue Jan 10 06:53:53 2023 +

tdf#152648 Handle overflow when multiplying rows and columns

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

diff --git a/vcl/osx/a11ytablewrapper.mm b/vcl/osx/a11ytablewrapper.mm
index 0cd98c7863dd..6f8775f0a4b5 100644
--- a/vcl/osx/a11ytablewrapper.mm
+++ b/vcl/osx/a11ytablewrapper.mm
@@ -39,8 +39,10 @@ using namespace ::com::sun::star::uno;
 {
 sal_Int32 nRows = accessibleTable->getAccessibleRowCount();
 sal_Int32 nCols = accessibleTable->getAccessibleColumnCount();
-
-if( nRows * nCols < MAXIMUM_ACCESSIBLE_TABLE_CELLS )
+
+// tdf#152648 Handle overflow when multiplying rows and columns
+sal_Int64 nCells = static_cast(nRows) * 
static_cast(nCols);
+if( nCells >= 0 && nCells < MAXIMUM_ACCESSIBLE_TABLE_CELLS )
 {
 // make all children visible to the hierarchy
 for ( sal_Int32 rowCount = 0; rowCount < nRows; rowCount++ )
@@ -111,9 +113,10 @@ using namespace ::com::sun::star::uno;
 {
 sal_Int32 nRows = accessibleTable->getAccessibleRowCount();
 sal_Int32 nCols = accessibleTable->getAccessibleColumnCount();
-
-
-if( nRows*nCols < MAXIMUM_ACCESSIBLE_TABLE_CELLS )
+
+// tdf#152648 Handle overflow when multiplying rows and columns
+sal_Int64 nCells = static_cast(nRows) * 
static_cast(nCols);
+if( nCells >= 0 && nCells < MAXIMUM_ACCESSIBLE_TABLE_CELLS )
 {
 [ attributeNames addObject: NSAccessibilityRowsAttribute ];
 [ attributeNames addObject: NSAccessibilityColumnsAttribute ];
@@ -130,7 +133,10 @@ using namespace ::com::sun::star::uno;
 {
 sal_Int32 nRows = accessibleTable->getAccessibleRowCount();
 sal_Int32 nCols = accessibleTable->getAccessibleColumnCount();
-if( nRows * nCols < MAXIMUM_ACCESSIBLE_TABLE_CELLS )
+
+// tdf#152648 Handle overflow when multiplying rows and columns
+sal_Int64 nCells = static_cast(nRows) * 
static_cast(nCols);
+if( nCells >= 0 && nCells < MAXIMUM_ACCESSIBLE_TABLE_CELLS )
 {
 NSMutableArray * cells = [ [ NSMutableArray alloc ] init ];
 try
@@ -168,7 +174,10 @@ using namespace ::com::sun::star::uno;
 {
 sal_Int32 nRows = accessibleTable->getAccessibleRowCount();
 sal_Int32 nCols = accessibleTable->getAccessibleColumnCount();
-if( nRows * nCols < MAXIMUM_ACCESSIBLE_TABLE_CELLS )
+
+// tdf#152648 Handle overflow when multiplying rows and columns
+sal_Int64 nCells = static_cast(nRows) * 
static_cast(nCols);
+if( nCells >= 0 && nCells < MAXIMUM_ACCESSIBLE_TABLE_CELLS )
 {
 NSMutableArray * cells = [ [ NSMutableArray alloc ] init ];
 try


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

2023-01-09 Thread Justin Luth (via logerrit)
 i18npool/source/localedata/data/en_US.xml |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 894efac210a3871214d95a52c322b0bee40f00ba
Author: Justin Luth 
AuthorDate: Mon Jan 9 10:22:13 2023 -0500
Commit: Justin Luth 
CommitDate: Tue Jan 10 01:09:27 2023 +

tdf#56258 i18npool en-US: partial revert 5th outline level

This reverts the change of A.I.a.i. -> A.I.a.i.1.
made by commit dd8ed1fdbc63499ac958d28536c3c5540455358b.

While it wasn't necessarily a bad change, it no longer has
any justification, since the complementary change in the
other outline definition was modified to become MLA compliant.

Rather than make any change at all, just revert back to the
original definition, and leave the level definition to the
normal 4 levels of numbering before the bullets start.

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

diff --git a/i18npool/source/localedata/data/en_US.xml 
b/i18npool/source/localedata/data/en_US.xml
index b2b8bc0d67de..b6e0924c8e97 100644
--- a/i18npool/source/localedata/data/en_US.xml
+++ b/i18npool/source/localedata/data/en_US.xml
@@ -608,12 +608,12 @@
   
   
 
-
+ 
   
   
   
   
-  
+  
   
 
  


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

2023-01-09 Thread Justin Luth (via logerrit)
 i18npool/source/localedata/data/en_US.xml |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 9993ccab05dd95dd0de0dc74fc72e5aee8a8cb61
Author: Justin Luth 
AuthorDate: Fri Jan 6 10:03:40 2023 -0500
Commit: Justin Luth 
CommitDate: Tue Jan 10 01:09:04 2023 +

tdf#56258 i18npool en-US: extend outline 1.a) to 4 levels

Change 1. a) -> 1) a) 1) A)

This is intended as a clean, modern style of outline
that has good visual spacing in LibreOffice.

This differentiates it a bit more from the first option,
and extends the numbered level to the typical depth of 4,
while still keeping a logical suffix pattern
and maintaining the general "theme" of the previous definition.

Yes, it is a bit odd to have a capital A following
a smaller case a. However, this is at the fourth
level, which isn't reached very often,
and I wanted to keep a choice that focuses on a small a.

Surprisingly, with the default 12pt/Liberation font, a
10) still fits in the allotted space before the tabstop,
so in most cases this outline will have proper visual spacing
all the way up to 99).

There are plenty of choices that start with 1 followed by a dot,
so I used this opportunity to create the only list
that starts with a ")" suffix. Google docs for example has a
1) a) i) choice, but for modern lists I don't think
we want to use roman numerals.

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

diff --git a/i18npool/source/localedata/data/en_US.xml 
b/i18npool/source/localedata/data/en_US.xml
index fed97bfa97f1..b2b8bc0d67de 100644
--- a/i18npool/source/localedata/data/en_US.xml
+++ b/i18npool/source/localedata/data/en_US.xml
@@ -576,11 +576,11 @@
   
   
 
-
-  
+ 
+  
   
-  
-  
+  
+  
   
   
 


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

2023-01-09 Thread Eike Rathke (via logerrit)
 sc/source/core/tool/addincol.cxx |   56 +--
 sc/source/core/tool/compiler.cxx |9 --
 2 files changed, 49 insertions(+), 16 deletions(-)

New commits:
commit b5cca905c6f3e090dae6e649381664925474a04a
Author: Eike Rathke 
AuthorDate: Mon Jan 9 23:18:35 2023 +0100
Commit: Eike Rathke 
CommitDate: Tue Jan 10 00:02:40 2023 +

Resolves: tdf#152948 Do not use GetExcelName() to obtain English function 
name

As the function name says, it's the Excel compatibility name and
not the Calc UI visible name and thus does not have the _ADD or
_EXCEL2003 suffixes. Theoretically the names may even be
completely different.

Change-Id: I5f52dee77009123ebc3762defe08c937a3a59a18
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145246
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index bf7d8652de1b..99f8061df3d2 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -739,10 +739,19 @@ void ScUnoAddInCollection::ReadFromAddIn( const 
uno::Reference&
 
 // Even if GetUseEnglishFunctionName() would return true, do not set the
 // locale to en-US to get English function names as that also would mix in
-// English descriptions and parameter names. English function names are now
-// handled below.
+// English descriptions and parameter names. Also, setting a locale will
+// reinitialize the Add-In completely, so switching back and forth isn't a
+// good idea either.
 xAddIn->setLocale( 
Application::GetSettings().GetUILanguageTag().getLocale());
 
+// Instead, in a second run with 'en-US' obtain English names.
+struct FuncNameData
+{
+OUStringaFuncU;
+ScUnoAddInFuncData* pData;
+};
+std::vector aFuncNameData;
+
 OUString aServiceName( xName->getServiceName() );
 ScUnoAddInHelpIdGenerator aHelpIdGenerator( aServiceName );
 
@@ -785,7 +794,6 @@ void ScUnoAddInCollection::ReadFromAddIn( const 
uno::Reference&
 if ( !pEnglishHashMap )
 pEnglishHashMap.reset( new ScAddInHashMap );
 
-const LanguageTag aEnglishLanguageTag(LANGUAGE_ENGLISH_US);
 const uno::Reference* pArray = 
aMethods.getConstArray();
 for (tools::Long nFuncPos=0; nFuncPos&
 pData->GetUpperLocal(),
 pData );
 
-OUString aEnglishName;
-if (!pData->GetExcelName( aEnglishLanguageTag, 
aEnglishName, false /*bFallbackToAny*/))
-SAL_WARN("sc.core", "no English name for " << 
aLocalName << " " << aFuncName);
-else
-{
-pEnglishHashMap->emplace(
-
ScCompiler::GetCharClassEnglish()->uppercase(aEnglishName),
-pData );
-}
-pData->SetEnglishName(aEnglishName);// takes care of 
handling empty
+aFuncNameData.push_back({aFuncU, pData});
 }
 }
 }
 }
+
+const LanguageTag aEnglishLanguageTag(LANGUAGE_ENGLISH_US);
+xAddIn->setLocale( aEnglishLanguageTag.getLocale());
+for (const auto& rFunc : aFuncNameData)
+{
+OUString aEnglishName;
+try
+{
+aEnglishName = xAddIn->getDisplayFunctionName( rFunc.aFuncU );
+}
+catch(uno::Exception&)
+{
+}
+if (aEnglishName.isEmpty()
+&& rFunc.pData->GetExcelName( aEnglishLanguageTag, 
aEnglishName, false /*bFallbackToAny*/))
+{
+// Check our known suffixes and append if not present. Note this
+// depends on localization (that should not add such suffix, but..)
+// and is really only a last resort.
+if (rFunc.pData->GetLocalName().endsWith("_ADD") && 
!aEnglishName.endsWith("_ADD"))
+aEnglishName += "_ADD";
+else if (rFunc.pData->GetLocalName().endsWith("_EXCEL2003") && 
!aEnglishName.endsWith("_EXCEL2003"))
+aEnglishName += "_EXCEL2003";
+SAL_WARN("sc.core", "obtaining English name for " << 
rFunc.pData->GetLocalName() << " "
+<< rFunc.pData->GetOriginalName() << " as ExcelName '" << 
aEnglishName << "'");
+}
+SAL_WARN_IF(aEnglishName.isEmpty(), "sc.core", "no English name for "
+<< rFunc.pData->GetLocalName() << " " << 
rFunc.pData->GetOriginalName());
+rFunc.pData->SetEnglishName(aEnglishName);  // takes care of handling 
empty
+pEnglishHashMap->emplace( rFunc.pData->GetUpperEnglish(), rFunc.pData);
+}
 }
 
 static void lcl_UpdateFunctionList( const ScFunctionList& rFunctionList, const 
ScUnoAddInFuncData& rFuncData,
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx

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

2023-01-09 Thread Vasily Melenchuk (via logerrit)
 sw/qa/extras/rtfexport/data/tdf148578.rtf|   12 
 sw/qa/extras/rtfexport/rtfexport3.cxx|   21 +++
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx |5 ---
 3 files changed, 34 insertions(+), 4 deletions(-)

New commits:
commit 78e91fd2bf7fe7d92020e7d9d9a2c6c25c8da830
Author: Vasily Melenchuk 
AuthorDate: Thu Jan 5 18:17:12 2023 +0300
Commit: Thorsten Behrens 
CommitDate: Mon Jan 9 23:45:03 2023 +

tdf#148578: Do not apply table shift for RTF

Table shift based on cell lect margin should be applied
for DOCX (earlier compat options) but not actual for RTF.

Maybe earlier RTF version did behave this way, but nowadays
this behavior does not match MS Word 365.

Change-Id: Icdc4fa6298167fe5f263c85164d7c4c4176be25f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145088
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145196

diff --git a/sw/qa/extras/rtfexport/data/tdf148578.rtf 
b/sw/qa/extras/rtfexport/data/tdf148578.rtf
new file mode 100644
index ..256d63898770
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/tdf148578.rtf
@@ -0,0 +1,12 @@
+{\rtf1
+
+\trowd
+\trgaph567
+\cellx1851
+\cellx9206
+\pard\plain\intbl 1000\cell
+\pard\plain\intbl XX_XX_XXX1\cell 
+\row
+
+\pard 
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport3.cxx 
b/sw/qa/extras/rtfexport/rtfexport3.cxx
index 6c1a4d524b7f..5cbf173d35fb 100644
--- a/sw/qa/extras/rtfexport/rtfexport3.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport3.cxx
@@ -514,6 +514,27 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf127806)
 CPPUNIT_ASSERT_EQUAL(static_cast(635), aSize.Width);
 }
 
+DECLARE_RTFEXPORT_TEST(testTdf148578, "tdf148578.rtf")
+{
+// \trgaph567 should affect only table cell margings (~1cm),
+// but do not shift table, since \trleft is not provided
+uno::Reference xTable(getParagraphOrTable(1), 
uno::UNO_QUERY);
+
+CPPUNIT_ASSERT_EQUAL(static_cast(0), 
getProperty(xTable, "LeftMargin"));
+
+uno::Reference xCell(xTable->getCellByName("A1"), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(static_cast(1000),
+ getProperty(xCell, "LeftBorderDistance"));
+CPPUNIT_ASSERT_EQUAL(static_cast(1000),
+ getProperty(xCell, "RightBorderDistance"));
+
+xCell.set(xTable->getCellByName("B1"), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(static_cast(1000),
+ getProperty(xCell, "LeftBorderDistance"));
+CPPUNIT_ASSERT_EQUAL(static_cast(1000),
+ getProperty(xCell, "RightBorderDistance"));
+}
+
 DECLARE_RTFEXPORT_TEST(testInvalidParagraphStyle, "invalidParagraphStyle.rtf")
 {
 // Given test has character style #30, but referred as paragraph style #30
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx 
b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 2e962260c79c..97fea78eba2a 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -618,12 +618,9 @@ TableStyleSheetEntry * 
DomainMapperTableHandler::endTableGetTableStyle(TableInfo
 
 // tdf#106742: since MS Word 2013 (compatibilityMode >= 15), top-level 
tables are handled the same as nested tables;
 // the default behavior when DOCX doesn't define "compatibilityMode" 
option is to add the cell spacing
-
-// Undefined should not be possible any more for DOCX, but it is for 
RTF.
-// In any case, continue to treat undefined as version 12 during 
import.
 sal_Int32 nMode = 
m_rDMapper_Impl.GetSettingsTable()->GetWordCompatibilityMode();
 
-if (((nMode < 0) || (0 < nMode && nMode <= 14)) && rInfo.nNestLevel == 
1)
+if (0 < nMode && nMode <= 14 && rInfo.nNestLevel == 1)
 {
 const sal_Int32 nAdjustedMargin = nLeftMargin - nGapHalf - 
rInfo.nLeftBorderDistance;
 m_aTableProperties->Insert( PROP_LEFT_MARGIN, uno::Any( 
nAdjustedMargin ) );


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

2023-01-09 Thread Vasily Melenchuk (via logerrit)
 sw/qa/extras/rtfexport/data/invalidParagraphStyle.rtf |   14 ++
 sw/qa/extras/rtfexport/rtfexport3.cxx |9 +
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   10 +-
 3 files changed, 32 insertions(+), 1 deletion(-)

New commits:
commit 466cc615de49a646c82af14657a05e240e4a640c
Author: Vasily Melenchuk 
AuthorDate: Wed Dec 28 23:52:10 2022 +0300
Commit: Thorsten Behrens 
CommitDate: Mon Jan 9 23:44:41 2023 +

ms format import: better handling for invalid styles

If referred paragraph style is not found or it is not a paragraph
style, this can lead to exceptions in writer core and thus current
paragraph can be not corretly initialized. For example, numbering
can be not applied because of exception of not found style earlier.
This is not a critical error, we should just not apply a style
we could not resolve.

Of course such documents are invalid but bit more tolerance to errors
will not harm.

Change-Id: I9150786e6357a7d6098440bac29ec501fc6aa802
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144852
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145194

diff --git a/sw/qa/extras/rtfexport/data/invalidParagraphStyle.rtf 
b/sw/qa/extras/rtfexport/data/invalidParagraphStyle.rtf
new file mode 100644
index ..cb5ec80eb3cf
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/invalidParagraphStyle.rtf
@@ -0,0 +1,14 @@
+{\rtf1
+
+{\stylesheet
+{\cs30\fs72 Super Duper Style;}}
+
+{\*\listtable
+{\list
+{\listlevel\levelstartat1{\leveltext\'02\'00.;}{\levelnumbers\'01;}}
+{\listname ;}\listid1235362366}}
+{\*\listoverridetable{\listoverride\listid1235362366\listoverridecount0\ls1}}
+
+\pard\s30\ls1\fs24 AAA BBB CCC\par 
+
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport3.cxx 
b/sw/qa/extras/rtfexport/rtfexport3.cxx
index 90adb69f2bf7..6c1a4d524b7f 100644
--- a/sw/qa/extras/rtfexport/rtfexport3.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport3.cxx
@@ -514,6 +514,15 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf127806)
 CPPUNIT_ASSERT_EQUAL(static_cast(635), aSize.Width);
 }
 
+DECLARE_RTFEXPORT_TEST(testInvalidParagraphStyle, "invalidParagraphStyle.rtf")
+{
+// Given test has character style #30, but referred as paragraph style #30
+// This was causing exception in finishParagraph(), so numbering and other
+// properties were not applied. Ensure numbering is still here
+sal_Int16 numFormat = getNumberingTypeOfParagraph(1);
+CPPUNIT_ASSERT_EQUAL(style::NumberingType::ARABIC, numFormat);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index f0fbd05209c5..bcfcbc7c72dd 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1934,13 +1934,21 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap, con
 #endif
 
 const StyleSheetEntryPtr pEntry = 
GetStyleSheetTable()->FindStyleSheetByConvertedStyleName( 
GetCurrentParaStyleName() );
-OSL_ENSURE( pEntry, "no style sheet found" );
+SAL_WARN_IF(!pEntry, "writerfilter.dmapper", "no style sheet found");
 const StyleSheetPropertyMap* pStyleSheetProperties = pEntry ? 
pEntry->pProperties.get() : nullptr;
 sal_Int32 nListId = pParaContext ? pParaContext->props().GetListId() : -1;
 bool isNumberingViaStyle(false);
 bool isNumberingViaRule = nListId > -1;
 if ( !bRemove && pStyleSheetProperties && pParaContext )
 {
+if (!pEntry || pEntry->nStyleTypeCode != StyleType::STYLE_TYPE_PARA) {
+// We could not resolve paragraph style or it is not a paragraph 
style
+// Remove this style reference, otherwise it will cause exceptions 
during further
+// processing and not all paragraph styles will be initialized.
+SAL_WARN("writerfilter.dmapper", "Paragraph style is incorrect. 
Ignored");
+pParaContext->Erase(PROP_PARA_STYLE_NAME);
+}
+
 bool bNumberingFromBaseStyle = false;
 if (!isNumberingViaRule)
 nListId = lcl_getListId(pEntry, GetStyleSheetTable(), 
bNumberingFromBaseStyle);


[no subject]

2023-01-09 Thread jill


[no subject]

2023-01-09 Thread Fred . Noce


[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - solenv/gbuild

2023-01-09 Thread Stephan Bergmann (via logerrit)
 solenv/gbuild/ExternalExecutable.mk |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit e4278360023b9bbefb62658086561c37ec88f2fc
Author: Stephan Bergmann 
AuthorDate: Wed Dec 14 09:42:04 2022 +0100
Commit: Xisco Fauli 
CommitDate: Mon Jan 9 20:16:58 2023 +

Fix prepending xargs to gb_ExternalExecutable_get_command, core part

...as was done in


"hid2file.js generation: process in batch, not each file one-by-one", 
causing my
build to fail with

> [XSL] CustomTarget/helpcontent2/help3xsl/hid2file.js
> xargs: 
LD_LIBRARY_PATH=/home/sbergman/gcc/trunk/inst/lib64:/home/sbergman/lo/core/instdir/program:/home/sbergman/lo/core/instdir/program:
 No such file or directory

Change-Id: I5a58874aa746de13cfc86b691c11349196092dce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144151
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 3d117dcc4a705f477c8223978200756ac9f83fe3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145132
Reviewed-by: Xisco Fauli 

diff --git a/solenv/gbuild/ExternalExecutable.mk 
b/solenv/gbuild/ExternalExecutable.mk
index 7a0fd996dd53..0982dd9b8e7f 100644
--- a/solenv/gbuild/ExternalExecutable.mk
+++ b/solenv/gbuild/ExternalExecutable.mk
@@ -185,6 +185,7 @@ endef
 define gb_ExternalExecutable__get_command
 $(call gb_ExternalExecutale__check_registration,$(1))
 $(gb_ExternalExecutable_$(1)_PRECOMMAND) \
+   $(2) \
$(call gb_ExternalExecutable__get_internal,$(1)) \
$(call gb_ExternalExecutable__get_executable,$(1)) \
$(gb_ExternalExecutable_$(1)_ARGUMENTS)
@@ -196,9 +197,12 @@ endef
 # LD_LIBRARY_PATH for internally built executables), and icerun wrapper
 # for limiting the maximum number of processes, if available.
 #
+# $2 is an optional part (like "xargs") to place between the setting of shell 
variables and the
+# command proper.
+#
 # gb_ExternalExecutable_get_command executable
 define gb_ExternalExecutable_get_command
-$(strip $(call gb_ExternalExecutable__get_command,$(1)))
+$(strip $(call gb_ExternalExecutable__get_command,$(1),$(2)))
 endef
 
 define gb_ExternalExecutable__get_dependencies


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

2023-01-09 Thread Andreas Heinisch (via logerrit)
 sc/qa/uitest/calc_tests6/moveCopySheet.py |   13 +
 sc/source/ui/miscdlgs/mvtabdlg.cxx|1 -
 vcl/source/uitest/uiobject.cxx|1 +
 3 files changed, 14 insertions(+), 1 deletion(-)

New commits:
commit b551acd0a370809fc12e6552dad87447fe5d9dfd
Author: Andreas Heinisch 
AuthorDate: Thu Jan 5 08:21:35 2023 +0100
Commit: Xisco Fauli 
CommitDate: Mon Jan 9 20:16:10 2023 +

tdf#56973 - Copy/paste (single) sheet is checked but not enabled

Enable the "copy" radio button in the move/copy sheet dialog, if there is 
just a single sheet in a spreadsheet document. Otherwise, users get the 
impression that a single sheet cannot be copied because the "copy" radio button 
is selected but not enabled, i.e., greyed out.

Change-Id: Icf98973585491b0c8c9a74aad3900f6cc2895d11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145064
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 
(cherry picked from commit a8d3b8985a79c216c3c132fb2e6bb0f85a27831a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145214
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/uitest/calc_tests6/moveCopySheet.py 
b/sc/qa/uitest/calc_tests6/moveCopySheet.py
index a80b7c329173..80bd9f830a27 100644
--- a/sc/qa/uitest/calc_tests6/moveCopySheet.py
+++ b/sc/qa/uitest/calc_tests6/moveCopySheet.py
@@ -63,6 +63,19 @@ class moveCopySheet(UITestCase):
 self.assertEqual(document.Sheets[1].Name, "Sheet1")
 self.assertEqual(document.Sheets[2].Name, "moveName")
 
+# tdf#56973 - copy/paste (single) sheet is checked but not enabled
+def test_tdf56973_copy_paste_inactive(self):
+with self.ui_test.create_doc_in_start_center("calc"):
+with self.ui_test.execute_dialog_through_command(".uno:Move") as 
xDialog:
+# A single sheet can only be copied
+xCopyButton = xDialog.getChild("copy")
+self.assertEqual(get_state_as_dict(xCopyButton)["Checked"], 
"true")
+self.assertEqual(get_state_as_dict(xCopyButton)["Enabled"], 
"true")
+# A single sheet can not be moved
+xMoveButton = xDialog.getChild("move")
+self.assertEqual(get_state_as_dict(xMoveButton)["Checked"], 
"false")
+self.assertEqual(get_state_as_dict(xMoveButton)["Enabled"], 
"false")
+
 #tdf#139464 Set OK button label to selected action: Move or Copy
 def test_tdf139464_move_sheet(self):
 with self.ui_test.create_doc_in_start_center("calc"):
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx 
b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 9cc587aa56e0..e64a29b6b471 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -74,7 +74,6 @@ void ScMoveTableDlg::SetForceCopyTable()
 {
 m_xBtnCopy->set_active(true);
 m_xBtnMove->set_sensitive(false);
-m_xBtnCopy->set_sensitive(false);
 SetOkBtnLabel();
 }
 
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index 0b55d4c96857..9b8616c3906b 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -1018,6 +1018,7 @@ StringMap RadioButtonUIObject::get_state()
 {
 StringMap aMap = WindowUIObject::get_state();
 aMap["Checked"] = OUString::boolean(mxRadioButton->IsChecked());
+aMap["Enabled"] = OUString::boolean(mxRadioButton->IsEnabled());
 
 return aMap;
 }


Subject : Help regarding Bug 90341 - Clean up excessive const_cast'ing

2023-01-09 Thread Siddharth Khattar
Hello,

So I did all the recommended changes (including cleaning up my unintended
mess of new patches) that were commented in the code in the file
"impastpl.cxx" but Jenkins is still giving me a build
error. Can someone please help me with it, the link to it on Gerrit is:
https://gerrit.libreoffice.org/c/core/+/144374/1  I tried a further commit
and investigated a few things by changing some static_cast back to
const_cast but couldn't figure it out, unfortunately. For reference, The
easy hack I'm referring to is:
https://bugs.documentfoundation.org/show_bug.cgi?id=90341

Thanks for reading this,
Siddharth


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

2023-01-09 Thread Miklos Vajna (via logerrit)
 sw/source/ui/vba/vbalistlevel.cxx |   40 +-
 sw/source/ui/vba/vbalistlevel.hxx |2 -
 sw/source/ui/vba/vbalistlevels.cxx|   18 +++
 sw/source/ui/vba/vbalistlevels.hxx|2 -
 sw/source/ui/vba/vbalisttemplates.cxx |   12 +-
 5 files changed, 37 insertions(+), 37 deletions(-)

New commits:
commit d24fc94281458b57368ff4fef1fe1182dadbea72
Author: Miklos Vajna 
AuthorDate: Mon Jan 9 13:51:37 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Jan 9 19:09:00 2023 +

sw: prefix members of ListLevelsEnumWrapper, ListTemplatesEnumWrapper, ...

... SwVbaListLevel and SwVbaListLevels

See tdf#94879 for motivation.

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

diff --git a/sw/source/ui/vba/vbalistlevel.cxx 
b/sw/source/ui/vba/vbalistlevel.cxx
index dcd06a2e998a..43f16e85243f 100644
--- a/sw/source/ui/vba/vbalistlevel.cxx
+++ b/sw/source/ui/vba/vbalistlevel.cxx
@@ -27,7 +27,7 @@
 using namespace ::ooo::vba;
 using namespace ::com::sun::star;
 
-SwVbaListLevel::SwVbaListLevel( const uno::Reference< 
ooo::vba::XHelperInterface >& rParent, const uno::Reference< 
uno::XComponentContext >& rContext, SwVbaListHelperRef  pHelper, sal_Int32 
nLevel ) : SwVbaListLevel_BASE( rParent, rContext ), pListHelper(std::move( 
pHelper )), mnLevel( nLevel )
+SwVbaListLevel::SwVbaListLevel( const uno::Reference< 
ooo::vba::XHelperInterface >& rParent, const uno::Reference< 
uno::XComponentContext >& rContext, SwVbaListHelperRef  pHelper, sal_Int32 
nLevel ) : SwVbaListLevel_BASE( rParent, rContext ), m_pListHelper(std::move( 
pHelper )), mnLevel( nLevel )
 {
 }
 
@@ -38,7 +38,7 @@ SwVbaListLevel::~SwVbaListLevel()
 ::sal_Int32 SAL_CALL SwVbaListLevel::getAlignment()
 {
 sal_Int16 nAlignment = 0;
-pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "Adjust" ) >>= 
nAlignment;
+m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "Adjust" ) >>= 
nAlignment;
 switch( nAlignment )
 {
 case text::HoriOrientation::LEFT:
@@ -89,7 +89,7 @@ void SAL_CALL SwVbaListLevel::setAlignment( ::sal_Int32 
_alignment )
 throw uno::RuntimeException();
 }
 }
-pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "Adjust", 
uno::Any( nAlignment ) );
+m_pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "Adjust", 
uno::Any( nAlignment ) );
 }
 
 uno::Reference< ::ooo::vba::word::XFont > SAL_CALL SwVbaListLevel::getFont()
@@ -134,8 +134,8 @@ float SAL_CALL SwVbaListLevel::getNumberPosition()
 // indentAt + firstlineindent
 sal_Int32 nIndentAt = 0;
 sal_Int32 nFirstLineIndent = 0;
-pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "IndentAt" ) >>= 
nIndentAt;
-pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "FirstLineIndent" 
) >>= nFirstLineIndent;
+m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "IndentAt" ) >>= 
nIndentAt;
+m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, 
"FirstLineIndent" ) >>= nFirstLineIndent;
 
 sal_Int32 nResult = nIndentAt + nFirstLineIndent;
 
@@ -147,16 +147,16 @@ void SAL_CALL SwVbaListLevel::setNumberPosition( float 
_numberposition )
 sal_Int32 nNumberPosition = Millimeter::getInHundredthsOfOneMillimeter( 
_numberposition );
 
 sal_Int32 nIndentAt = 0;
-pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "IndentAt" ) >>= 
nIndentAt;
+m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "IndentAt" ) >>= 
nIndentAt;
 
 sal_Int32 nFirstLineIndent = nNumberPosition - nIndentAt;
-pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "FirstLineIndent", 
uno::Any( nFirstLineIndent ) );
+m_pListHelper->setPropertyValueWithNameAndLevel( mnLevel, 
"FirstLineIndent", uno::Any( nFirstLineIndent ) );
 }
 
 ::sal_Int32 SAL_CALL SwVbaListLevel::getNumberStyle()
 {
 sal_Int16 nNumberingType = 0;
-pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "NumberingType" ) 
>>= nNumberingType;
+m_pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "NumberingType" 
) >>= nNumberingType;
 switch( nNumberingType )
 {
 case style::NumberingType::CHAR_SPECIAL:
@@ -288,7 +288,7 @@ void SAL_CALL SwVbaListLevel::setNumberStyle( ::sal_Int32 
_numberstyle )
 }
 }
 
-pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "NumberingType", 
uno::Any( nNumberingType ) );
+m_pListHelper->setPropertyValueWithNameAndLevel( mnLevel, "NumberingType", 
uno::Any( nNumberingType ) );
 }
 
 ::sal_Int32 SAL_CALL SwVbaListLevel::getResetOnHigher()
@@ -305,20 +305,20 @@ void SAL_CALL SwVbaListLevel::setResetOnHigher( 
::sal_Int32 /*_resetonhigher*/ )
 ::sal_Int32 SAL_CALL SwVbaListLevel::getStartAt()
 {
 sal_Int16 nStartWith = 0;
-pListHelper->getPropertyValueWithNameAndLevel( mnLevel, "StartWith" ) >>= 
nSt

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

2023-01-09 Thread Xisco Fauli (via logerrit)
 basic/qa/basic_coverage/test_converttofromurl_methods.bas |   29 +++---
 1 file changed, 23 insertions(+), 6 deletions(-)

New commits:
commit 3c7cba927bb5d234d6d72f65e063754590a7b584
Author: Xisco Fauli 
AuthorDate: Mon Jan 9 10:05:05 2023 +0100
Commit: Xisco Fauli 
CommitDate: Mon Jan 9 19:08:03 2023 +

tdf#152917: basic_macros: Add unittest

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

diff --git a/basic/qa/basic_coverage/test_converttofromurl_methods.bas 
b/basic/qa/basic_coverage/test_converttofromurl_methods.bas
index d1dbcfc5ff73..c17d17e631e3 100644
--- a/basic/qa/basic_coverage/test_converttofromurl_methods.bas
+++ b/basic/qa/basic_coverage/test_converttofromurl_methods.bas
@@ -7,11 +7,28 @@
 
 Option Explicit
 
-Function doUnitTest as String
-' ConvertFromUrl ConvertToUrl
-If ( ConvertToUrl( ConvertFromUrl("") ) <> "") Then
-doUnitTest = "FAIL"
+Function doUnitTest() As String
+TestUtil.TestInit
+verify_testConvertToFromUrl
+doUnitTest = TestUtil.GetResult()
+End Function
+
+Sub verify_testConvertToFromUrl
+On Error GoTo errorHandler
+
+TestUtil.AssertEqual( ConvertToUrl( ConvertFromUrl("") ), "", 
"ConvertToUrl( ConvertFromUrl("") )")
+
+' tdf#152917: Without the fix in place, this test would have failed with
+' Failed: ConvertFromUrl("file:///foo/bar/test.txt") returned , expected 
/foo/bar/test.txt
+If (GetGUIType() <> 1) Then
+'Linux
+TestUtil.AssertEqual( ConvertFromUrl("file:///foo/bar/test.txt"), 
"/foo/bar/test.txt", "ConvertFromUrl(""file:///foo/bar/test.txt"")")
 Else
-doUnitTest = "OK"
+'Windows
+TestUtil.AssertEqual( ConvertFromUrl("file://foo/bar/test.txt"), 
"\\foo\bar\test.txt", "ConvertFromUrl(""file://foo/bar/test.txt"")")
 End If
-End Function
+
+Exit Sub
+errorHandler:
+TestUtil.ReportErrorHandler("verify_testConvertToFromUrl", Err, Error$, 
Erl)
+End Sub


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

2023-01-09 Thread Stephan Bergmann (via logerrit)
 vcl/osx/salframeview.mm |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9cc91e17172709c65742c092d3f312bce48ac6d9
Author: Stephan Bergmann 
AuthorDate: Mon Jan 9 15:48:27 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Jan 9 18:54:13 2023 +

loplugin:fakebool

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

diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index c5136b9359bc..4833af8fda9e 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -323,7 +323,7 @@ static AquaSalFrame* getMouseContainerFrame()
 mpFrame->UpdateFrameGeometry();
 mpFrame->CallCallback( SalEvent::Resize, nullptr );
 
-BOOL bInLiveResize = [self inLiveResize];
+bool bInLiveResize = [self inLiveResize];
 if ( bInLiveResize || mbInLiveResize )
 {
 mbInLiveResize = bInLiveResize;


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

2023-01-09 Thread Dennis Francis (via logerrit)
 vcl/qa/cppunit/pdfexport/data/ref-to-kids.pdf |binary
 vcl/qa/cppunit/pdfexport/pdfexport.cxx|   61 ++
 vcl/source/gdi/pdfwriter_impl.cxx |   29 ++--
 3 files changed, 85 insertions(+), 5 deletions(-)

New commits:
commit d9cab7dc6dbbbe3d80aa765cfd0b3c9f85d73c06
Author: Dennis Francis 
AuthorDate: Thu Dec 1 11:47:12 2022 +0530
Commit: Xisco Fauli 
CommitDate: Mon Jan 9 17:08:24 2023 +

vcl: use /MediaBox origin in the ctm...

of the inner XObject, else the clip polypolygon may clip out partly or
whole contents. Adjusting the clip polypolygon is not straightforward.

Change-Id: If3b208ba850c3579c9e16c15e4fb2f947dad4406
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143561
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
(cherry picked from commit a67dcc248a103098de883a4dd2fa9ff2e1cc1f90)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144436
Tested-by: Jenkins
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145202

diff --git a/vcl/qa/cppunit/pdfexport/data/ref-to-kids.pdf 
b/vcl/qa/cppunit/pdfexport/data/ref-to-kids.pdf
index 598358a636aa..0390ccad8410 100644
Binary files a/vcl/qa/cppunit/pdfexport/data/ref-to-kids.pdf and 
b/vcl/qa/cppunit/pdfexport/data/ref-to-kids.pdf differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 428f9d5a132a..ce070a711911 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -4186,6 +4186,67 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, 
testRexportFilterSingletonArray)
 CPPUNIT_ASSERT(it != pEnd);
 }
 
+CPPUNIT_TEST_FIXTURE(PdfExportTest, testRexportMediaBoxOrigin)
+{
+// We need to enable PDFium import (and make sure to disable after the 
test)
+bool bResetEnvVar = false;
+if (getenv("LO_IMPORT_USE_PDFIUM") == nullptr)
+{
+bResetEnvVar = true;
+osl_setEnvironment(OUString("LO_IMPORT_USE_PDFIUM").pData, 
OUString("1").pData);
+}
+comphelper::ScopeGuard aPDFiumEnvVarGuard([&]() {
+if (bResetEnvVar)
+osl_clearEnvironment(OUString("LO_IMPORT_USE_PDFIUM").pData);
+});
+
+// Load the PDF and save as PDF
+vcl::filter::PDFDocument aDocument;
+load(u"ref-to-kids.pdf", aDocument);
+
+std::vector aPages = aDocument.GetPages();
+CPPUNIT_ASSERT_EQUAL(size_t(5), aPages.size());
+
+// Directly go to the inner XObject Im10 that contains the rectangle 
drawings in page 2.
+auto pInnerIm = aDocument.LookupObject(10);
+CPPUNIT_ASSERT(pInnerIm);
+
+constexpr sal_Int32 aOrigin[2] = { -800, -600 };
+sal_Int32 aSize[2] = { 0, 0 };
+
+auto pBBox = 
dynamic_cast(pInnerIm->Lookup("BBox"));
+CPPUNIT_ASSERT(pBBox);
+const auto& rElements2 = pBBox->GetElements();
+CPPUNIT_ASSERT_EQUAL(static_cast(4), rElements2.size());
+for (sal_Int32 nIdx = 0; nIdx < 4; ++nIdx)
+{
+const auto* pNumElement = 
dynamic_cast(rElements2[nIdx]);
+CPPUNIT_ASSERT(pNumElement);
+if (nIdx < 2)
+CPPUNIT_ASSERT_EQUAL(aOrigin[nIdx], 
static_cast(pNumElement->GetValue()));
+else
+aSize[nIdx - 2] = static_cast(pNumElement->GetValue()) 
- aOrigin[nIdx - 2];
+}
+
+auto pMatrix = 
dynamic_cast(pInnerIm->Lookup("Matrix"));
+CPPUNIT_ASSERT(pMatrix);
+const auto& rElements = pMatrix->GetElements();
+CPPUNIT_ASSERT_EQUAL(static_cast(6), rElements.size());
+sal_Int32 aMatTranslate[6]
+= { // Rotation by $\theta$ $cos(\theta), sin(\theta), -sin(\theta), 
cos(\theta)$
+0, -1, 1, 0,
+// Translate x,y
+-aOrigin[1] - aSize[1] / 2 + aSize[0] / 2, aOrigin[0] + aSize[0] / 
2 + aSize[1] / 2
+  };
+
+for (sal_Int32 nIdx = 0; nIdx < 6; ++nIdx)
+{
+const auto* pNumElement = 
dynamic_cast(rElements[nIdx]);
+CPPUNIT_ASSERT(pNumElement);
+CPPUNIT_ASSERT_EQUAL(aMatTranslate[nIdx], 
static_cast(pNumElement->GetValue()));
+}
+}
+
 } // end anonymous namespace
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index f4a3145c5085..d95a74aeb6af 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -8873,6 +8873,21 @@ void PDFWriterImpl::writeReferenceXObject(const 
ReferenceXObjectEmit& rEmit)
 return;
 }
 
+double aOrigin[2] = { 0.0, 0.0 };
+if (auto* pArray = 
dynamic_cast(pPage->Lookup("MediaBox")))
+{
+const auto& rElements = pArray->GetElements();
+if (rElements.size() >= 4)
+{
+// get x1, y1 of the rectangle.
+for (sal_Int32 nIdx = 0; nIdx < 2; ++nIdx)
+{
+if (const auto* pNumElement = 
dynamic_cast(rElements[nIdx]))
+aOrigin[nId

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

2023-01-09 Thread Szymon Kłos (via logerrit)
 sw/qa/filter/ww8/ww8.cxx |   30 
 sw/source/filter/ww8/attributeoutputbase.hxx |2 -
 sw/source/filter/ww8/docxattributeoutput.cxx |   33 ++-
 sw/source/filter/ww8/docxattributeoutput.hxx |2 -
 sw/source/filter/ww8/rtfattributeoutput.cxx  |3 +-
 sw/source/filter/ww8/rtfattributeoutput.hxx  |3 +-
 sw/source/filter/ww8/wrtw8nds.cxx|   31 ++---
 sw/source/filter/ww8/ww8atr.cxx  |2 -
 sw/source/filter/ww8/ww8attributeoutput.hxx  |2 -
 9 files changed, 89 insertions(+), 19 deletions(-)

New commits:
commit ae1e1d0910f4724d661cb6be26773ae51fac33e2
Author: Szymon Kłos 
AuthorDate: Tue Nov 29 10:09:10 2022 +0100
Commit: Xisco Fauli 
CommitDate: Mon Jan 9 16:45:50 2023 +

docx: export symbol characters correctly

Previously we had:
after save: 
original content: 

This patch checks if paragraph has symbol font used and exports
content using w:sym mark in that case

Change-Id: I74f4bb0d249cbf5dfc930e931f7d91bd0d2e9821
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143455
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144949
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 
(cherry picked from commit 87e82f80e87bb4a216ea83383864d494f3e92eea)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145219
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/filter/ww8/ww8.cxx b/sw/qa/filter/ww8/ww8.cxx
index 8a2f97438d7b..611d63259ae8 100644
--- a/sw/qa/filter/ww8/ww8.cxx
+++ b/sw/qa/filter/ww8/ww8.cxx
@@ -9,6 +9,7 @@
 
 #include 
 
+#include 
 #include 
 
 #include 
@@ -159,6 +160,35 @@ CPPUNIT_TEST_FIXTURE(Test, 
testDocxContentControlDropdownEmptyDisplayText)
 // i.e. we wrote an empty attribute instead of omitting it.
 assertXPathNoAttribute(pXmlDoc, 
"//w:sdt/w:sdtPr/w:dropDownList/w:listItem", "displayText");
 }
+
+CPPUNIT_TEST_FIXTURE(Test, testDocxSymbolFontExport)
+{
+// Create document with symbol character and font Wingdings
+mxComponent = loadFromDesktop("private:factory/swriter");
+uno::Reference xMSF(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xText = xTextDocument->getText();
+uno::Reference xCursor = xText->createTextCursor();
+
+xText->insertString(xCursor, u"", true);
+
+uno::Reference xRange = xCursor;
+uno::Reference xTextProps(xRange, uno::UNO_QUERY);
+xTextProps->setPropertyValue("CharFontName", 
uno::Any(OUString("Wingdings")));
+xTextProps->setPropertyValue("CharFontNameAsian", 
uno::Any(OUString("Wingdings")));
+xTextProps->setPropertyValue("CharFontNameComplex", 
uno::Any(OUString("Wingdings")));
+xTextProps->setPropertyValue("CharFontCharSet", 
uno::Any(awt::CharSet::SYMBOL));
+
+// When exporting to DOCX:
+save("Office Open XML Text");
+
+// Then make sure the expected markup is used:
+xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+
+assertXPath(pXmlDoc, "//w:p/w:r/w:sym", 1);
+assertXPath(pXmlDoc, "//w:p/w:r/w:sym[1]", "font", "Wingdings");
+assertXPath(pXmlDoc, "//w:p/w:r/w:sym[1]", "char", "f0e0");
+}
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx 
b/sw/source/filter/ww8/attributeoutputbase.hxx
index ac3164ae2de6..99cae10812cc 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -191,7 +191,7 @@ public:
 virtual void WritePostitFieldReference() {};
 
 /// Output text (inside a run).
-virtual void RunText( const OUString& rText, rtl_TextEncoding eCharSet = 
RTL_TEXTENCODING_UTF8 ) = 0;
+virtual void RunText( const OUString& rText, rtl_TextEncoding eCharSet = 
RTL_TEXTENCODING_UTF8, const OUString& rSymbolFont = OUString() ) = 0;
 
 /// Output text (without markup).
 virtual void RawText(const OUString& rText, rtl_TextEncoding eCharSet) = 0;
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 4f527862bf0a..80f09a85562f 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3425,7 +3425,8 @@ bool DocxAttributeOutput::FootnoteEndnoteRefTag()
 the switch in DocxAttributeOutput::RunText() nicer ;-)
  */
 static bool impl_WriteRunText( FSHelperPtr const & pSerializer, sal_Int32 
nTextToken,
-const sal_Unicode* &rBegin, const sal_Unicode* pEnd, bool bMove = true 
)
+const sal_Unicode* &rBegin, const sal_Unicode* pEnd, bool bMove = true,
+const OUString& rSymbolFont = OUString() )
 {
 const sal_Unicode *pBegin = rBegin;
 
@@ -3436,22 +3437,34 @@ static bool impl_WriteRunText( FSHelperPtr const & 
pSerializer, sal_Int32 nTextT
 if ( pBegin >= pEnd )
 return false; // we

[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - basctl/source

2023-01-09 Thread Rafael Lima (via logerrit)
 basctl/source/dlged/dlged.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 555dfdd35f662489df481485e5cd866f67e27a70
Author: Rafael Lima 
AuthorDate: Tue Dec 20 13:37:53 2022 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Jan 9 15:57:45 2023 +

tdf#152531 Fix background color of Dialog Editor in dark mode

Change-Id: I7006ff472dae5ce8d4b52c108f742c3c6d9b0b61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144603
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
(cherry picked from commit 9c6aa7f2918819af670c6d6ed25645c725c91667)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145220
Tested-by: Adolfo Jayme Barrientos 
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 306555489df5..77ed2e8042db 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -550,8 +550,9 @@ void DlgEditor::Paint(vcl::RenderContext& rRenderContext, 
const tools::Rectangle
 // #i79128# ...and use correct OutDev for that
 if (pTargetPaintWindow)
 {
+Color maBackColor = 
rRenderContext.GetSettings().GetStyleSettings().GetLightColor();
 OutputDevice& rTargetOutDev = 
pTargetPaintWindow->GetTargetOutputDevice();
-rTargetOutDev.DrawWallpaper(aPaintRect, Wallpaper(COL_WHITE));
+rTargetOutDev.DrawWallpaper(aPaintRect, Wallpaper(maBackColor));
 }
 
 // do paint (unbuffered) and mark repaint end


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

2023-01-09 Thread Miklos Vajna (via logerrit)
 sw/source/uibase/shells/textfld.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 8336c61ba059551cb74df5ec53d2b45a3cf41814
Author: Miklos Vajna 
AuthorDate: Mon Jan 9 09:52:32 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Jan 9 15:48:35 2023 +

sw: document FN_UPDATE_TEXT_FORMFIELD and FN_UPDATE_TEXT_FORMFIELDS

If you don't read the commit message or the code, it wasn't really
obvious that FN_UPDATE_TEXT_FORMFIELD works based on the current cursor.

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

diff --git a/sw/source/uibase/shells/textfld.cxx 
b/sw/source/uibase/shells/textfld.cxx
index dffea8e924ee..71e57ba0ae47 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -862,6 +862,8 @@ FIELD_INSERT:
 break;
 case FN_UPDATE_TEXT_FORMFIELDS:
 {
+// This updates multiple fieldmarks in a document, based on their 
field name & field command
+// prefix.
 OUString aFieldType;
 const SfxStringItem* pFieldType = 
rReq.GetArg(FN_PARAM_1);
 if (pFieldType)
@@ -1013,6 +1015,7 @@ FIELD_INSERT:
 break;
 case FN_UPDATE_TEXT_FORMFIELD:
 {
+// This updates a single fieldmarks under the current cursor.
 OUString aFieldType;
 const SfxStringItem* pFieldType = 
rReq.GetArg(FN_PARAM_1);
 if (pFieldType)


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

2023-01-09 Thread Stephan Bergmann (via logerrit)
 include/toolkit/awt/vclxaccessiblecomponent.hxx |   10 --
 toolkit/source/awt/vclxaccessiblecomponent.cxx  |   14 +++---
 2 files changed, 3 insertions(+), 21 deletions(-)

New commits:
commit a58abb4296c50228ebd5510e50363072e9a96774
Author: Stephan Bergmann 
AuthorDate: Mon Jan 9 11:43:36 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Jan 9 15:15:41 2023 +

Clean up VCLXAccessibleComponent::getAccessibleParent

...after 21e0d8162a0e683558c4d042ce688fc9a6833809 "loplugin:unusedfields" 
had
dropped the base class
OAccessibleImplementationAccess::implGetForeignControlledParent

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

diff --git a/include/toolkit/awt/vclxaccessiblecomponent.hxx 
b/include/toolkit/awt/vclxaccessiblecomponent.hxx
index 7c299edf6d65..b69f62b6871f 100644
--- a/include/toolkit/awt/vclxaccessiblecomponent.hxx
+++ b/include/toolkit/awt/vclxaccessiblecomponent.hxx
@@ -117,16 +117,6 @@ public:
 protected:
 // base class overridables
 css::awt::Rectangle implGetBounds(  ) override;
-
-private:
-/** we may be reparented (if external components use 
OAccessibleImplementationAccess base class),
-so this method here returns the parent in the VCL world, in opposite 
to the parent
-an external component gave us
-@precond
-the caller must ensure thread safety, i.e. our mutex must be locked
-*/
-css::uno::Reference< css::accessibility::XAccessible >
-getVclParent() const;
 };
 
 /* --
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx 
b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index aef0eb1c3852..666ba75bde6a 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -553,8 +553,10 @@ uno::Reference< accessibility::XAccessible > 
VCLXAccessibleComponent::getAccessi
 return xAcc;
 }
 
-uno::Reference< accessibility::XAccessible > 
VCLXAccessibleComponent::getVclParent() const
+uno::Reference< accessibility::XAccessible > 
VCLXAccessibleComponent::getAccessibleParent(  )
 {
+OExternalLockGuard aGuard( this );
+
 uno::Reference< accessibility::XAccessible > xAcc;
 if ( GetWindow() )
 {
@@ -565,16 +567,6 @@ uno::Reference< accessibility::XAccessible > 
VCLXAccessibleComponent::getVclPare
 return xAcc;
 }
 
-uno::Reference< accessibility::XAccessible > 
VCLXAccessibleComponent::getAccessibleParent(  )
-{
-OExternalLockGuard aGuard( this );
-
-// we do _not_ have a foreign-controlled parent -> default to our VCL 
parent
-uno::Reference< accessibility::XAccessible > xAcc = getVclParent();
-
-return xAcc;
-}
-
 sal_Int64 VCLXAccessibleComponent::getAccessibleIndexInParent(  )
 {
 OExternalLockGuard aGuard( this );


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

2023-01-09 Thread Justin Luth (via logerrit)
 i18npool/source/localedata/data/en_US.xml |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2570eb7265fbae840bf9f2d83463b0bee09beaef
Author: Justin Luth 
AuthorDate: Fri Jan 6 12:20:55 2023 -0500
Commit: Justin Luth 
CommitDate: Mon Jan 9 15:06:12 2023 +

tdf#56258 i18npool en-US: document ISO 2145 compliant outline list format

Change-Id: I27c2c3621434a4dbbcdd032672c668632494
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145158
Tested-by: Jenkins
Reviewed-by: Vernon, Stuart Foote 
Reviewed-by: Justin Luth 

diff --git a/i18npool/source/localedata/data/en_US.xml 
b/i18npool/source/localedata/data/en_US.xml
index 154c8791a9d2..fed97bfa97f1 100644
--- a/i18npool/source/localedata/data/en_US.xml
+++ b/i18npool/source/localedata/data/en_US.xml
@@ -616,7 +616,7 @@
   
   
 
-
+ 
   
   
   


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

2023-01-09 Thread Justin Luth (via logerrit)
 i18npool/source/localedata/data/en_US.xml |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 5297528b85652d3f5a85e75ff6bcb406ba9b34d3
Author: Justin Luth 
AuthorDate: Fri Jan 6 10:31:41 2023 -0500
Commit: Justin Luth 
CommitDate: Mon Jan 9 15:05:27 2023 +

tdf#56258 i18npool en-US: replace illogical outline 1.(a).i.A

Change 1.(a).i.A. -> A.1.a.1.

This is intended as a clean, modern style of outline
that has good visual spacing in LibreOffice.

It provides a simple alternative to the second style,
reversing the order while still keeping a logical suffix pattern.

This design will easily allow large/long lists
to fit in the allotted space before the tabstop.

There was no attempt to match the theme of the
previous definition, since it neither looked
good in LO's default spacing, nor was it consistent/logical.

Change-Id: If7de1302110a3c97922bd2eeba7a917444110b27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145156
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Vernon, Stuart Foote 

diff --git a/i18npool/source/localedata/data/en_US.xml 
b/i18npool/source/localedata/data/en_US.xml
index 40d86de5bcf3..154c8791a9d2 100644
--- a/i18npool/source/localedata/data/en_US.xml
+++ b/i18npool/source/localedata/data/en_US.xml
@@ -584,11 +584,11 @@
   
   
 
-
-  
-  
-  
-  
+ 
+  
+  
+  
+  
   
   
 


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

2023-01-09 Thread Justin Luth (via logerrit)
 i18npool/source/localedata/data/en_US.xml |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c3964de14cb14099b49e1c55370a5f98e773e03d
Author: Justin Luth 
AuthorDate: Fri Jan 6 09:05:39 2023 -0500
Commit: Justin Luth 
CommitDate: Mon Jan 9 15:04:57 2023 +

tdf#56258 i18npool en-US: change outline order to match MLA style

Changed I.A.i.a) -> I.A.1.a.i.

The overwhelming result of a google search for
"official/correct outline list format"
indicates that the third level should be a 1, not an i.

MLA Handbook (according to wikipedia) uses the order
I.A.1.a.i. (a) (1) i)

Chicago Mode of Style is usually interpreted as
I.A.1.a) or I.A.1.a. with varying lower sublevels/suffixes.

Wikipedia also suggest the logical order of
I.A.1.a.i.I) A) 1) a) i) (I) (A) (1) (a) (i)

Change-Id: I7fcc8a1ee727d6cddca4bf0c6a8461538769cf5d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145147
Tested-by: Justin Luth 
Reviewed-by: Justin Luth 

diff --git a/i18npool/source/localedata/data/en_US.xml 
b/i18npool/source/localedata/data/en_US.xml
index aaf853353985..40d86de5bcf3 100644
--- a/i18npool/source/localedata/data/en_US.xml
+++ b/i18npool/source/localedata/data/en_US.xml
@@ -600,12 +600,12 @@
   
   
 
-
+ 
   
   
-  
-  
-  
+  
+  
+  
   
 
 


[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - translations

2023-01-09 Thread Martin Srebotnjak (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 75d3c2d855182dfdbd2a9319f09fbd2326dbd146
Author: Martin Srebotnjak 
AuthorDate: Mon Jan 9 15:51:08 2023 +0100
Commit: Gerrit Code Review 
CommitDate: Mon Jan 9 14:51:08 2023 +

Update git submodules

* Update translations from branch 'libreoffice-7-5'
  to 8b465b54d8bb3a9bfb75f93ed628f2f6097cde56
  - Updated Slovenian translation

Change-Id: Iec474d1c3da3531eba722e6a6b4f9a146883e52f

diff --git a/translations b/translations
index 8ffb49605e95..8b465b54d8bb 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 8ffb49605e9526ddbea8c0735a2c350d5e908f40
+Subproject commit 8b465b54d8bb3a9bfb75f93ed628f2f6097cde56


[Libreoffice-commits] translations.git: Branch 'libreoffice-7-5' - source/sl

2023-01-09 Thread Martin Srebotnjak (via logerrit)
 source/sl/cui/messages.po  |   18 +--
 source/sl/extensions/messages.po   |8 -
 source/sl/extras/source/gallery/share.po   |4 
 source/sl/formula/messages.po  |4 
 source/sl/helpcontent2/source/auxiliary.po |   16 +--
 source/sl/helpcontent2/source/text/sbasic/shared.po|   12 +-
 source/sl/helpcontent2/source/text/sbasic/shared/03.po |   90 +++--
 source/sl/helpcontent2/source/text/scalc/01.po |4 
 source/sl/helpcontent2/source/text/shared.po   |4 
 source/sl/helpcontent2/source/text/shared/01.po|4 
 source/sl/helpcontent2/source/text/shared/02.po|   16 +--
 source/sl/helpcontent2/source/text/shared/guide.po |   10 -
 source/sl/helpcontent2/source/text/swriter/01.po   |6 -
 source/sl/helpcontent2/source/text/swriter/02.po   |4 
 source/sl/helpcontent2/source/text/swriter/guide.po|   10 -
 source/sl/sd/messages.po   |4 
 source/sl/sfx2/messages.po |   18 +--
 source/sl/svtools/messages.po  |4 
 source/sl/svx/messages.po  |4 
 source/sl/sysui/desktop/share.po   |4 
 20 files changed, 98 insertions(+), 146 deletions(-)

New commits:
commit 8b465b54d8bb3a9bfb75f93ed628f2f6097cde56
Author: Martin Srebotnjak 
AuthorDate: Mon Jan 9 15:51:02 2023 +0100
Commit: Andras Timar 
CommitDate: Mon Jan 9 15:51:02 2023 +0100

Updated Slovenian translation

Change-Id: Iec474d1c3da3531eba722e6a6b4f9a146883e52f

diff --git a/source/sl/cui/messages.po b/source/sl/cui/messages.po
index 07111366ebe..cac94e5f101 100644
--- a/source/sl/cui/messages.po
+++ b/source/sl/cui/messages.po
@@ -3,14 +3,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: LibreOffice 7.5\n"
 "Report-Msgid-Bugs-To: 
https://bugs.libreoffice.org/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED&component=UI\n";
-"POT-Creation-Date: 2022-12-23 13:23+0100\n"
-"PO-Revision-Date: 2022-12-18 22:38+0200\n"
+"POT-Creation-Date: 2023-01-09 09:30+0100\n"
+"PO-Revision-Date: 2023-01-09 10:36+0200\n"
 "Last-Translator: Martin Srebotnjak \n"
 "Language-Team: sl.libreoffice.org\n"
+"Language: sl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Language: sl\n"
 "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || 
n%100==4 ? 2 : 3);\n"
 "X-Generator: Virtaal 0.7.1\n"
 "X-Accelerator-Marker: ~\n"
@@ -714,7 +714,7 @@ msgstr "Tipka pritisnjena"
 #: cui/inc/strings.hrc:150
 msgctxt "RID_SVXSTR_EVENT_KEYUP"
 msgid "Key released"
-msgstr "Tipka spuščena"
+msgstr "Tipka sproščena"
 
 #: cui/inc/strings.hrc:151
 msgctxt "RID_SVXSTR_EVENT_LOADED"
@@ -759,7 +759,7 @@ msgstr "Miškin gumb pritisnjen"
 #: cui/inc/strings.hrc:159
 msgctxt "RID_SVXSTR_EVENT_MOUSERELEASED"
 msgid "Mouse button released"
-msgstr "Miškin gumb spuščen"
+msgstr "Miškin gumb sproščen"
 
 #: cui/inc/strings.hrc:160
 msgctxt "RID_SVXSTR_EVENT_POSITIONING"
@@ -1669,8 +1669,8 @@ msgstr "Naslova URL <%1> ni mogoče pretvoriti v pot 
datotečnega sistema."
 
 #: cui/inc/strings.hrc:368
 msgctxt "aboutdialog|copyright"
-msgid "Copyright © 2000–2022 LibreOffice contributors."
-msgstr "Copyright © 2000 – 2022 avtorji prispevkov LibreOffice."
+msgid "Copyright © 2000–2023 LibreOffice contributors."
+msgstr "Copyright © 2000 – 2023 avtorji prispevkov LibreOffice."
 
 #: cui/inc/strings.hrc:369
 msgctxt "aboutdialog|vendor"
@@ -8247,8 +8247,8 @@ msgstr "Vnesite navpični odmik za preliv, pri čemer 0 % 
ustreza trenutnemu nav
 
 #: cui/uiconfig/ui/gradientpage.ui:393
 msgctxt "gradientpage|borderft"
-msgid "Mid_point:"
-msgstr "_Srednja točka:"
+msgid "_Border:"
+msgstr "O_broba:"
 
 #: cui/uiconfig/ui/gradientpage.ui:427
 msgctxt "gradientpage|extended_tip|bordermtr"
diff --git a/source/sl/extensions/messages.po b/source/sl/extensions/messages.po
index 3029f954376..c4117c94557 100644
--- a/source/sl/extensions/messages.po
+++ b/source/sl/extensions/messages.po
@@ -3,8 +3,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: LibreOffice 7.4\n"
 "Report-Msgid-Bugs-To: 
https://bugs.libreoffice.org/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED&component=UI\n";
-"POT-Creation-Date: 2022-06-07 09:29+0200\n"
-"PO-Revision-Date: 2022-06-06 19:27+0200\n"
+"POT-Creation-Date: 2023-01-06 18:18+0100\n"
+"PO-Revision-Date: 2022-12-27 01:28+0200\n"
 "Last-Translator: Martin Srebotnjak \n"
 "Language-Team: sl.libreoffice.org\n"
 "MIME-Version: 1.0\n"
@@ -1252,7 +1252,7 @@ msgstr "Tipka pritisnjena"
 #: extensions/inc/strings.hrc:141
 msgctxt "RID_STR_EVT_KEYUP"
 msgid "Key released"
-msgstr "Tipka spuščena"
+msgstr "Tipka sproščena"
 
 #: extensions/inc/strings.hrc:142
 msgctxt "RID_STR_EVT_LOADED"
@@ -1297,7 +1297,7 @@ msgstr "Miškin gumb pritisnjen"
 #: extensions/inc/strings.hrc:150
 msgctxt "RID

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

2023-01-09 Thread Jim Raykowski (via logerrit)
 sw/qa/extras/uiwriter/data/cursor_position_after_undo.odt |binary
 sw/qa/extras/uiwriter/uiwriter8.cxx   |   41 ++
 sw/source/core/edit/edundo.cxx|4 -
 sw/source/uibase/inc/wrtsh.hxx|   12 +++-
 sw/source/uibase/shells/basesh.cxx|2 
 5 files changed, 53 insertions(+), 6 deletions(-)

New commits:
commit 8aa39da7f223f38474b4f7e2b22f6c54f019c433
Author: Jim Raykowski 
AuthorDate: Tue Dec 27 10:00:01 2022 -0900
Commit: Xisco Fauli 
CommitDate: Mon Jan 9 14:45:05 2023 +

Outline folding: Fix cursor position after undo redo

This patch makes the cursor position to be the same after undo redo as
when outline folding is not active.

Change-Id: I9e1f827455afb2675f3085c1560b1e2a246f4524
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144873
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 
(cherry picked from commit 156fd06dbca2fcca3246dba964a58a7ef698cf21)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145133
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/extras/uiwriter/data/cursor_position_after_undo.odt 
b/sw/qa/extras/uiwriter/data/cursor_position_after_undo.odt
new file mode 100644
index ..d6c300be61c0
Binary files /dev/null and 
b/sw/qa/extras/uiwriter/data/cursor_position_after_undo.odt differ
diff --git a/sw/qa/extras/uiwriter/uiwriter8.cxx 
b/sw/qa/extras/uiwriter/uiwriter8.cxx
index a5f41319c65f..42eaad1fb53a 100644
--- a/sw/qa/extras/uiwriter/uiwriter8.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter8.cxx
@@ -2547,6 +2547,47 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf151801)
 CPPUNIT_ASSERT_EQUAL(sReplaced, getParagraph(1)->getString());
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testCursorPositionAfterUndo)
+{
+createSwDoc("cursor_position_after_undo.odt");
+SwDoc* pDoc = getSwDoc();
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+// switch on "Outline Folding" mode
+dispatchCommand(mxComponent, ".uno:ShowOutlineContentVisibilityButton", 
{});
+
CPPUNIT_ASSERT(pWrtShell->GetViewOptions()->IsShowOutlineContentVisibilityButton());
+
+// move the cursor to the beginning of the 3rd word in the 3rd paragraph, 
"tincidunt"
+pWrtShell->FwdPara();
+pWrtShell->FwdPara();
+pWrtShell->Right(SwCursorSkipMode::Chars, /*bSelect=*/false, 16, 
/*bBasicCall=*/false);
+
+// select the word
+dispatchCommand(mxComponent, ".uno:SelectWord", {});
+
+// check the word is select
+SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false);
+CPPUNIT_ASSERT_EQUAL(OUString("tincidunt"), pShellCursor->GetText());
+
+// remember the cursor position for comparsion
+SwPosition aCursorPos(*pWrtShell->GetCursor()->GetPoint());
+
+// delete the selected word
+pWrtShell->Delete();
+
+// undo delete
+dispatchCommand(mxComponent, ".uno:Undo", {});
+
+// without the fix in place, the cursor would have been set to the start 
of the outline node
+// - Expected: SwPosition (node 11, offset 25)
+// - Actual  : SwPosition (node 9, offset 0)
+CPPUNIT_ASSERT_EQUAL(aCursorPos, *pWrtShell->GetCursor()->GetPoint());
+
+// switch off "Outline Folding" mode
+dispatchCommand(mxComponent, ".uno:ShowOutlineContentVisibilityButton", 
{});
+
CPPUNIT_ASSERT(!pWrtShell->GetViewOptions()->IsShowOutlineContentVisibilityButton());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx
index 9516488cbc61..576b092214df 100644
--- a/sw/source/core/edit/edundo.cxx
+++ b/sw/source/core/edit/edundo.cxx
@@ -104,7 +104,7 @@ void 
SwEditShell::HandleUndoRedoContext(::sw::UndoRedoContext & rContext)
 
 void SwEditShell::Undo(sal_uInt16 const nCount, sal_uInt16 nOffset)
 {
-MakeAllOutlineContentTemporarilyVisible a(GetDoc());
+MakeAllOutlineContentTemporarilyVisible a(GetDoc(), true);
 
 CurrShell aCurr( this );
 
@@ -161,7 +161,7 @@ void SwEditShell::Undo(sal_uInt16 const nCount, sal_uInt16 
nOffset)
 
 void SwEditShell::Redo(sal_uInt16 const nCount)
 {
-MakeAllOutlineContentTemporarilyVisible a(GetDoc());
+MakeAllOutlineContentTemporarilyVisible a(GetDoc(), true);
 
 CurrShell aCurr( this );
 
diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx
index 98b3d9038204..801e52bef7ab 100644
--- a/sw/source/uibase/inc/wrtsh.hxx
+++ b/sw/source/uibase/inc/wrtsh.hxx
@@ -681,9 +681,10 @@ class MakeAllOutlineContentTemporarilyVisible
 private:
 SwWrtShell* m_pWrtSh = nullptr;
 bool m_bDone = false;
+bool m_bScrollToCursor = false;
 public:
 static sal_uInt32 nLock;
-MakeAllOutlineContentTemporarilyVisible(SwDoc* pDoc)
+MakeAllOutlineContentTemporarilyVisible(SwDoc* pDoc, bool bScrollToCursor 
= false)
 {
 ++nLock;
 if (nLock > 1)
@@ -692,8 +693,10 @@ publ

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

2023-01-09 Thread Noel Grandin (via logerrit)
 include/unotools/compatibility.hxx   |   11 ---
 sw/source/ui/config/optcomp.cxx  |   10 --
 unotools/source/config/compatibility.cxx |2 --
 3 files changed, 8 insertions(+), 15 deletions(-)

New commits:
commit 73cd20ec950f631a5ddfb73ee57f49a5ad2beb0a
Author: Noel Grandin 
AuthorDate: Sat Dec 31 08:52:53 2022 +0200
Commit: Xisco Fauli 
CommitDate: Mon Jan 9 14:31:47 2023 +

tdf#152676 Writer: Compatibility options no longer saved as default

regression from
commit 78adf246d5e99d0f5d91d2e03c1379b154289d8d
Date:   Mon Jul 26 10:54:36 2021 +0200
return SvtCompatibilityEntry from SvtCompatibilityOptions::GetList

where I mistakenly assumed that the bIsDefault flag in
SvtCompatibilityEntry was being set by the SvtCompatibilityOptions
code. Rather remove this field if it is not going to be maintained
properly.

Change-Id: I23963ae885563d5abc8a99cfd144d7fe00c6f192
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144882
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit c6f756e968bbb72522bd01dea283288a61a286a7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145217
Reviewed-by: Xisco Fauli 

diff --git a/include/unotools/compatibility.hxx 
b/include/unotools/compatibility.hxx
index c5dc3fb14746..b929771b5744 100644
--- a/include/unotools/compatibility.hxx
+++ b/include/unotools/compatibility.hxx
@@ -130,19 +130,8 @@ class SvtCompatibilityEntry
 setValue(rIdx, css::uno::Any(rValue));
 }
 
-bool isDefaultEntry() const
-{
-return m_bDefaultEntry;
-}
-
-void setDefaultEntry( bool rValue )
-{
-m_bDefaultEntry = rValue;
-}
-
 private:
 std::vector m_aPropertyValue;
-bool   m_bDefaultEntry;
 };
 
 
/*-
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 663faf7be2c6..ec8ac3ddfb33 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -209,10 +209,11 @@ void SwCompatibilityOptPage::InitControls( const 
SfxItemSet& rSet )
 {
 const OUString sEntryName = rEntry.getValue( 
SvtCompatibilityEntry::Index::Name );
 const bool bIsUserEntry= ( sEntryName == 
SvtCompatibilityEntry::USER_ENTRY_NAME );
+const bool bIsDefaultEntry = ( sEntryName == 
SvtCompatibilityEntry::DEFAULT_ENTRY_NAME );
 
 m_pImpl->m_aList.push_back( rEntry );
 
-if ( rEntry.isDefaultEntry() )
+if ( bIsDefaultEntry )
 continue;
 
 OUString sNewEntry;
@@ -265,7 +266,12 @@ IMPL_LINK_NOARG(SwCompatibilityOptPage, UseAsDefaultHdl, 
weld::Button&, void)
 return;
 
 auto pItem = std::find_if(m_pImpl->m_aList.begin(), m_pImpl->m_aList.end(),
-[](const SvtCompatibilityEntry& rItem) { return 
rItem.isDefaultEntry(); });
+[](const SvtCompatibilityEntry& rItem)
+{
+const OUString sEntryName = rItem.getValue( 
SvtCompatibilityEntry::Index::Name );
+const bool bIsDefaultEntry = ( sEntryName == 
SvtCompatibilityEntry::DEFAULT_ENTRY_NAME );
+return bIsDefaultEntry;
+});
 if (pItem != m_pImpl->m_aList.end())
 {
 const sal_Int32 nCount = m_xOptionsLB->n_children();
diff --git a/unotools/source/config/compatibility.cxx 
b/unotools/source/config/compatibility.cxx
index affcaf5a38e0..95bcc2dc59b6 100644
--- a/unotools/source/config/compatibility.cxx
+++ b/unotools/source/config/compatibility.cxx
@@ -66,8 +66,6 @@ SvtCompatibilityEntry::SvtCompatibilityEntry()
 setValue( Index::SubtractFlysAnchoredAtFlys, false );
 setValue( Index::EmptyDbFieldHidesPara, true );
 setValue( Index::AddTableLineSpacing, false );
-
-setDefaultEntry( false );
 }
 
 OUString SvtCompatibilityEntry::getName( const Index rIdx )


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

2023-01-09 Thread Szymon Kłos (via logerrit)
 vcl/source/treelist/svtabbx.cxx |   13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

New commits:
commit aff880740311e37740b8b0231bb7a7947ad922d7
Author: Szymon Kłos 
AuthorDate: Wed Jan 4 15:28:34 2023 +0100
Commit: Szymon Kłos 
CommitDate: Mon Jan 9 14:14:47 2023 +

jsdialog: don't export collapsed/expanded icons when empty

Change-Id: Iec56c11fdba066f9b62b2d5d56ad011a821e4087
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145040
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145066
Tested-by: Jenkins

diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx
index f766cde70559..9ef0e145ed6d 100644
--- a/vcl/source/treelist/svtabbx.cxx
+++ b/vcl/source/treelist/svtabbx.cxx
@@ -75,9 +75,16 @@ static void lcl_DumpEntryAndSiblings(tools::JsonWriter& 
rJsonWriter,
 const SvLBoxContextBmp* pBmpItem = dynamic_cast(&rItem);
 if (pBmpItem)
 {
-auto aColumn = rJsonWriter.startStruct();
-rJsonWriter.put("collapsed", 
pBmpItem->GetBitmap1().GetStock());
-rJsonWriter.put("expanded", 
pBmpItem->GetBitmap2().GetStock());
+const OUString& rCollapsed = 
pBmpItem->GetBitmap1().GetStock();
+const OUString& rExpanded = 
pBmpItem->GetBitmap2().GetStock();
+if (!rCollapsed.trim().isEmpty() || 
!rExpanded.trim().isEmpty())
+{
+auto aColumn = rJsonWriter.startStruct();
+if (!rCollapsed.trim().isEmpty())
+rJsonWriter.put("collapsed", rCollapsed);
+if (!rExpanded.trim().isEmpty())
+rJsonWriter.put("expanded", rExpanded);
+}
 }
 }
 }


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sw/uiconfig

2023-01-09 Thread Gabor Kelemen (via logerrit)
 sw/uiconfig/sglobal/popupmenu/table.xml |1 +
 sw/uiconfig/sweb/popupmenu/table.xml|1 +
 sw/uiconfig/swform/popupmenu/table.xml  |1 +
 sw/uiconfig/swriter/popupmenu/table.xml |1 +
 sw/uiconfig/swxform/popupmenu/table.xml |1 +
 5 files changed, 5 insertions(+)

New commits:
commit c6eef4b7a9849d5aa8dfeab0bf9dada833fee01d
Author: Gabor Kelemen 
AuthorDate: Mon Jan 9 15:11:16 2023 +0100
Commit: Gabor Kelemen 
CommitDate: Mon Jan 9 15:11:16 2023 +0100

tdf#131046 Add back Number Format item to Writer table context menus

Change-Id: I9b7ed2ebe808f05c778b8a993b4df4fdd4f6a151

diff --git a/sw/uiconfig/sglobal/popupmenu/table.xml 
b/sw/uiconfig/sglobal/popupmenu/table.xml
index 7f3cbb6ebe6e..3ae9ad5f688e 100644
--- a/sw/uiconfig/sglobal/popupmenu/table.xml
+++ b/sw/uiconfig/sglobal/popupmenu/table.xml
@@ -135,6 +135,7 @@
   
   
   
+  
   
   
 
diff --git a/sw/uiconfig/sweb/popupmenu/table.xml 
b/sw/uiconfig/sweb/popupmenu/table.xml
index 7f3cbb6ebe6e..3ae9ad5f688e 100644
--- a/sw/uiconfig/sweb/popupmenu/table.xml
+++ b/sw/uiconfig/sweb/popupmenu/table.xml
@@ -135,6 +135,7 @@
   
   
   
+  
   
   
 
diff --git a/sw/uiconfig/swform/popupmenu/table.xml 
b/sw/uiconfig/swform/popupmenu/table.xml
index 7f3cbb6ebe6e..3ae9ad5f688e 100644
--- a/sw/uiconfig/swform/popupmenu/table.xml
+++ b/sw/uiconfig/swform/popupmenu/table.xml
@@ -135,6 +135,7 @@
   
   
   
+  
   
   
 
diff --git a/sw/uiconfig/swriter/popupmenu/table.xml 
b/sw/uiconfig/swriter/popupmenu/table.xml
index 7d501545f160..1f8ca8ee499c 100644
--- a/sw/uiconfig/swriter/popupmenu/table.xml
+++ b/sw/uiconfig/swriter/popupmenu/table.xml
@@ -138,6 +138,7 @@
   
   
   
+  
   
   
 
diff --git a/sw/uiconfig/swxform/popupmenu/table.xml 
b/sw/uiconfig/swxform/popupmenu/table.xml
index 7f3cbb6ebe6e..3ae9ad5f688e 100644
--- a/sw/uiconfig/swxform/popupmenu/table.xml
+++ b/sw/uiconfig/swxform/popupmenu/table.xml
@@ -135,6 +135,7 @@
   
   
   
+  
   
   
 


Re: Files hid2file.js and /bookmark.js not delivered in 'libreoffice-7-5' branch

2023-01-09 Thread Stéphane Guillou

On 9/1/23 12:37, Christian Lohmaier wrote:

On Sat, Dec 31, 2022 at 11:00 AM Olivier Hallot
 wrote:

Note: no build issue with master branch

7-5 is missing the change that made xargs an optional argument to the
wrapper call https://gerrit.libreoffice.org/c/core/+/145132 should fix
it.

ciao
Christian


Could this be related to why many dialog help links lead to a 404 
currently for 7.5, or am I way off? Couple of reports on Bugzilla:


https://bugs.documentfoundation.org/show_bug.cgi?id=152733

https://bugs.documentfoundation.org/show_bug.cgi?id=152942

Cheers

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

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



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

2023-01-09 Thread Miklos Vajna (via logerrit)
 sw/inc/cmdid.h  |1 
 sw/qa/uibase/shells/shells.cxx  |   61 +
 sw/sdi/_textsh.sdi  |6 +++
 sw/sdi/swriter.sdi  |   14 +++
 sw/source/uibase/shells/textfld.cxx |   66 
 5 files changed, 148 insertions(+)

New commits:
commit 1293d212a148338eee4b62893e51ed0428f2fde5
Author: Miklos Vajna 
AuthorDate: Fri Jan 6 10:08:00 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Jan 9 12:54:53 2023 +

sw: add a new .uno:UpdateTextFormField UNO command

It is possible to update all fieldsmarks (of a certion type, of a
certain field command prefix), but one can't update the fieldmark under
the cursor, which is needed for Zotero citation clusters.

To make this more complex, insertion inside an existing fieldmark is
explicitly not wanted, see commit
a178a2ac6df8dc63a7ab8d4a19b90ae8a17baca4 (sw UI: fix crash on inserting
a fieldmark inside a fieldmark, 2023-01-02).

Fix the problem by adding a new .uno:UpdateTextFormField UNO command
that can update the (innermost) fieldmark under the current cursor.

The uno command is intentionally hidden from the customize dialog since
it only makes sense to invoke it from a macro / API with parameters, not
interactively.

(cherry picked from commit 337416dafb66ed8f930d2d69e83fae438fc85f3c)

Conflicts:
sw/source/uibase/shells/textfld.cxx

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

diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index dfd22f400459..7ae4a76c3bff 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -305,6 +305,7 @@
 #define FN_PROTECT_BOOKMARKS(FN_INSERT2 + 27)
 
 #define FN_UPDATE_TEXT_FORMFIELDS   (FN_INSERT2 + 28)
+#define FN_UPDATE_TEXT_FORMFIELD(FN_INSERT2 + 29)
 
 // clipboard table content
 #define FN_PASTE_NESTED_TABLE   (FN_INSERT2 + 30)  /* instead of the 
cell-by-cell copy between source and target tables */
diff --git a/sw/qa/uibase/shells/shells.cxx b/sw/qa/uibase/shells/shells.cxx
index ced0157284ae..794932e8cf25 100644
--- a/sw/qa/uibase/shells/shells.cxx
+++ b/sw/qa/uibase/shells/shells.cxx
@@ -531,6 +531,67 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, 
testUpdateRefmarks)
 CPPUNIT_ASSERT_EQUAL(OUString("new content"), pTextNode->GetText());
 }
 
+CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testUpdateFieldmark)
+{
+// Given a document with a fieldmark:
+SwDoc* pDoc = createSwDoc();
+uno::Sequence aArgs = {
+comphelper::makePropertyValue("FieldType", 
uno::Any(OUString(ODF_UNHANDLED))),
+comphelper::makePropertyValue("FieldCommand",
+  uno::Any(OUString("ADDIN ZOTERO_ITEM old 
command 1"))),
+comphelper::makePropertyValue("FieldResult", uno::Any(OUString("old 
result 1"))),
+};
+dispatchCommand(mxComponent, ".uno:TextFormField", aArgs);
+
+// When updating that fieldmark to have new field command & result:
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+pWrtShell->SttEndDoc(/*bStt=*/false);
+pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, 
/*bBasicCall=*/false);
+std::vector aArgsVec = 
comphelper::JsonToPropertyValues(R"json(
+{
+"FieldType": {
+"type": "string",
+"value": "vnd.oasis.opendocument.field.UNHANDLED"
+},
+"FieldCommandPrefix": {
+"type": "string",
+"value": "ADDIN ZOTERO_ITEM"
+},
+"Field": {
+"type": "[]com.sun.star.beans.PropertyValue",
+"value": {
+"FieldType": {
+"type": "string",
+"value": "vnd.oasis.opendocument.field.UNHANDLED"
+},
+"FieldCommand": {
+"type": "string",
+"value": "ADDIN ZOTERO_ITEM new command 1"
+},
+"FieldResult": {
+"type": "string",
+"value": "new result 1"
+}
+}
+}
+}
+)json");
+aArgs = comphelper::containerToSequence(aArgsVec);
+dispatchCommand(mxComponent, ".uno:UpdateTextFormField", aArgs);
+
+// Then make sure that the document text is updated accordingly:
+SwCursor* pCursor = pWrtShell->GetCursor();
+OUString aActual = pCursor->Start()->GetNode().GetTextNode()->GetText();
+static sal_Unicode const aForbidden[]
+= { CH_TXT_ATR_FIELDSTART, CH_TXT_ATR_FIELDSEP, CH_TXT_ATR_FIELDEND, 0 
};
+aActual = comphelper::string::removeAny(aActual, aForbidden);
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: new result 1
+// - Actual  : old result 1
+// i.e. the document text was not updated.
+CPPUNIT_ASSERT_EQUAL(OUString("new result 1"), aActual);
+}

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - desktop/source include/vcl sw/inc sw/qa sw/source

2023-01-09 Thread Miklos Vajna (via logerrit)
 desktop/source/lib/init.cxx   |   44 ---
 include/vcl/ITiledRenderable.hxx  |3 +
 sw/inc/unotxdoc.hxx   |3 +
 sw/qa/uibase/uno/uno.cxx  |   37 
 sw/source/uibase/uno/loktxdoc.cxx |   70 +-
 5 files changed, 120 insertions(+), 37 deletions(-)

New commits:
commit 707b8dc3c034e798513faf3ede22e71438b8d0f5
Author: Miklos Vajna 
AuthorDate: Thu Jan 5 08:13:21 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Jan 9 12:54:27 2023 +

sw lok: expose field type & command of fieldmark under cursor

It was possible to get the properties of all fieldmarks, but you could
not get the properties of the fieldmark under the current cursor.

Getting the properties of the current fieldmark is useful for Zotero: if
we already have a citation and want to insert one more, then we should
turn the current citation into a citation cluster.

Fix the problem by adding API similar to what commit
24219cc1e9829f82a533667aef0f51b6a7df6fc2 (sw lok, .uno:TextFormFields:
expose field code of fieldmarks, 2022-11-25), did: but here we return
properties of the innermost fieldmark, not all fieldmarks.

Also introduce a ITiledRenderable::supportsCommandValues(), this way
next time a command value getter is added in sw/sc/sd, no need to touch
desktop/ anymore.

(cherry picked from commit bb20dee2ef1b0804065e1cda2c834d257fdd90ed)

Conflicts:
sw/source/uibase/uno/loktxdoc.cxx

Change-Id: I7f1a7064307034a18527ab5e985d2eac56807cb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145082
Tested-by: Miklos Vajna 
Reviewed-by: Miklos Vajna 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index edaf0ad75477..c4aa15270fa3 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -5727,12 +5727,13 @@ static char* 
doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
 static constexpr OStringLiteral 
aSheetGeometryData(".uno:SheetGeometryData");
 static constexpr OStringLiteral aCellCursor(".uno:CellCursor");
 static constexpr OStringLiteral aFontSubset(".uno:FontSubset&name=");
-static const std::initializer_list vForward = {
-u"TextFormFields",
-u"SetDocumentProperties",
-u"Bookmarks",
-u"Fields"
-};
+
+ITiledRenderable* pDoc = getTiledRenderable(pThis);
+if (!pDoc)
+{
+SetLastExceptionMsg("Document doesn't support tiled rendering");
+return nullptr;
+}
 
 if (!strcmp(pCommand, ".uno:LanguageStatus"))
 {
@@ -5776,13 +5777,6 @@ static char* 
doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
 }
 else if (aCommand.startsWith(aViewRowColumnHeaders))
 {
-ITiledRenderable* pDoc = getTiledRenderable(pThis);
-if (!pDoc)
-{
-SetLastExceptionMsg("Document doesn't support tiled rendering");
-return nullptr;
-}
-
 tools::Rectangle aRectangle;
 if (aCommand.getLength() > aViewRowColumnHeaders.getLength())
 {
@@ -5828,13 +5822,6 @@ static char* 
doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
 }
 else if (aCommand.startsWith(aSheetGeometryData))
 {
-ITiledRenderable* pDoc = getTiledRenderable(pThis);
-if (!pDoc)
-{
-SetLastExceptionMsg("Document doesn't support tiled rendering");
-return nullptr;
-}
-
 bool bColumns = true;
 bool bRows = true;
 bool bSizes = true;
@@ -5894,12 +5881,6 @@ static char* 
doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
 }
 else if (aCommand.startsWith(aCellCursor))
 {
-ITiledRenderable* pDoc = getTiledRenderable(pThis);
-if (!pDoc)
-{
-SetLastExceptionMsg("Document doesn't support tiled rendering");
-return nullptr;
-}
 // Ignore command's deprecated parameters.
 tools::JsonWriter aJsonWriter;
 pDoc->getCellCursor(aJsonWriter);
@@ -5909,17 +5890,8 @@ static char* 
doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
 {
 return getFontSubset(std::string_view(pCommand + 
aFontSubset.getLength()));
 }
-else if (std::find(vForward.begin(), vForward.end(),
-   
INetURLObject(OUString::fromUtf8(aCommand)).GetURLPath())
- != vForward.end())
+else if 
(pDoc->supportsCommandValues(INetURLObject(OUString::fromUtf8(aCommand)).GetURLPath()))
 {
-ITiledRenderable* pDoc = getTiledRenderable(pThis);
-if (!pDoc)
-{
-SetLastExceptionMsg("Document doesn't support tiled rendering");
-return nullptr;
-}
-
 tools::JsonWriter aJsonWriter;
 pDoc->getCommandValues(aJsonWriter, aCommand);
 return aJsonW

[Libreoffice-commits] core.git: sw/CppunitTest_sw_uibase_dialog.mk sw/Module_sw.mk sw/qa sw/sdi sw/source

2023-01-09 Thread Miklos Vajna (via logerrit)
 sw/CppunitTest_sw_uibase_dialog.mk   |   76 +++
 sw/Module_sw.mk  |1 
 sw/qa/uibase/dialog/dialog.cxx   |   59 +++
 sw/sdi/swriter.sdi   |2 
 sw/source/uibase/dialog/regionsw.cxx |   27 
 5 files changed, 164 insertions(+), 1 deletion(-)

New commits:
commit dd775cd630c907bc7d8bcd6f57ffd3f66115a5ba
Author: Miklos Vajna 
AuthorDate: Mon Jan 9 11:08:42 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Jan 9 12:25:12 2023 +

sw, .uno:InsertSection: add a new Content parameter and accept HTML there

When Zotero uses refmarks to represent citations, then a section is used
for the bibliography. While it was possible to insert refmarks with a
given name & content, inserting a section with a provided HTML content
was not possible.

A section (and not a refmark) is needed for the bibliography, as a
refmark is a text attribute, so it must start and end in the same
paragraph.

Fix this by adding a new, optional Content parameter to
.uno:InsertSection, which allows providing multi-paragraph, formatted
text.

This is somewhat similar to what commit
fa82e151d80d15eeb6dfae434f1dbb3b68907188 (sw, .uno:InsertBookmark: add a
new BookmarkText parameter and accept HTML there, 2022-12-06) did for
the bookmark case.

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

diff --git a/sw/CppunitTest_sw_uibase_dialog.mk 
b/sw/CppunitTest_sw_uibase_dialog.mk
new file mode 100644
index ..eaecfc5abeb6
--- /dev/null
+++ b/sw/CppunitTest_sw_uibase_dialog.mk
@@ -0,0 +1,76 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*
+
+$(eval $(call gb_CppunitTest_CppunitTest,sw_uibase_dialog))
+
+$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_uibase_dialog))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sw_uibase_dialog, \
+sw/qa/uibase/dialog/dialog \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sw_uibase_dialog, \
+comphelper \
+cppu \
+cppuhelper \
+editeng \
+sal \
+sfx \
+subsequenttest \
+svl \
+svx \
+svxcore \
+sw \
+   swqahelper \
+test \
+unotest \
+utl \
+vcl \
+tl \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sw_uibase_dialog,\
+boost_headers \
+libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sw_uibase_dialog,\
+-I$(SRCDIR)/sw/inc \
+-I$(SRCDIR)/sw/source/core/inc \
+-I$(SRCDIR)/sw/source/uibase/inc \
+-I$(SRCDIR)/sw/qa/inc \
+$$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sw_uibase_dialog,\
+   udkapi \
+   offapi \
+   oovbaapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sw_uibase_dialog))
+$(eval $(call gb_CppunitTest_use_vcl,sw_uibase_dialog))
+
+$(eval $(call gb_CppunitTest_use_rdb,sw_uibase_dialog,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,sw_uibase_dialog,\
+officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sw_uibase_dialog))
+
+$(eval $(call gb_CppunitTest_use_uiconfigs,sw_uibase_dialog, \
+modules/swriter \
+))
+
+$(eval $(call gb_CppunitTest_use_more_fonts,sw_uibase_dialog))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index a15763330763..44d5bc4e8d22 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -134,6 +134,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
 CppunitTest_sw_uibase_docvw \
 CppunitTest_sw_uibase_frmdlg \
 CppunitTest_sw_uibase_uno \
+CppunitTest_sw_uibase_dialog \
 CppunitTest_sw_uibase_wrtsh \
 CppunitTest_sw_core_accessibilitycheck \
 CppunitTest_sw_core_layout \
diff --git a/sw/qa/uibase/dialog/dialog.cxx b/sw/qa/uibase/dialog/dialog.cxx
new file mode 100644
index ..b7c1f766c3f0
--- /dev/null
+++ b/sw/qa/uibase/dialog/dialog.cxx
@@ -0,0 +1,59 @@
+/* -*- 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 
+
+#include 
+#include 
+
+namespace
+{
+/// Covers sw/source/uibase/dialog/ fixes.
+class Test : public SwModelTestBase
+{
+public:
+  

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

2023-01-09 Thread Szymon Kłos (via logerrit)
 vcl/source/treelist/svtabbx.cxx |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit 60f6b0e363a4bb38f249a26609a4fc219b001c87
Author: Szymon Kłos 
AuthorDate: Thu Dec 15 14:22:37 2022 +0100
Commit: Szymon Kłos 
CommitDate: Mon Jan 9 11:54:26 2023 +

jsdialog: dump stock images id in TreeView

Change-Id: I11342e1d7963a7e4d1ef139f504fc44dd6c89d90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144223
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Rashesh Padia 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145065
Tested-by: Jenkins

diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx
index b305e791e167..f766cde70559 100644
--- a/vcl/source/treelist/svtabbx.cxx
+++ b/vcl/source/treelist/svtabbx.cxx
@@ -70,6 +70,16 @@ static void lcl_DumpEntryAndSiblings(tools::JsonWriter& 
rJsonWriter,
 rJsonWriter.put("text", pStringItem->GetText());
 }
 }
+else if (rItem.GetType() == SvLBoxItemType::ContextBmp)
+{
+const SvLBoxContextBmp* pBmpItem = dynamic_cast(&rItem);
+if (pBmpItem)
+{
+auto aColumn = rJsonWriter.startStruct();
+rJsonWriter.put("collapsed", 
pBmpItem->GetBitmap1().GetStock());
+rJsonWriter.put("expanded", 
pBmpItem->GetBitmap2().GetStock());
+}
+}
 }
 }
 


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

2023-01-09 Thread Rafael Lima (via logerrit)
 basctl/source/dlged/dlged.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 9c6aa7f2918819af670c6d6ed25645c725c91667
Author: Rafael Lima 
AuthorDate: Tue Dec 20 13:37:53 2022 +
Commit: Rafael Lima 
CommitDate: Mon Jan 9 11:53:59 2023 +

tdf#152531 Fix background color of Dialog Editor in dark mode

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

diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 306555489df5..77ed2e8042db 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -550,8 +550,9 @@ void DlgEditor::Paint(vcl::RenderContext& rRenderContext, 
const tools::Rectangle
 // #i79128# ...and use correct OutDev for that
 if (pTargetPaintWindow)
 {
+Color maBackColor = 
rRenderContext.GetSettings().GetStyleSettings().GetLightColor();
 OutputDevice& rTargetOutDev = 
pTargetPaintWindow->GetTargetOutputDevice();
-rTargetOutDev.DrawWallpaper(aPaintRect, Wallpaper(COL_WHITE));
+rTargetOutDev.DrawWallpaper(aPaintRect, Wallpaper(maBackColor));
 }
 
 // do paint (unbuffered) and mark repaint end


Re: Files hid2file.js and /bookmark.js not delivered in 'libreoffice-7-5' branch

2023-01-09 Thread Christian Lohmaier
On Sat, Dec 31, 2022 at 11:00 AM Olivier Hallot
 wrote:
> Note: no build issue with master branch

7-5 is missing the change that made xargs an optional argument to the
wrapper call https://gerrit.libreoffice.org/c/core/+/145132 should fix
it.

ciao
Christian


[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - translations

2023-01-09 Thread Christian Lohmaier (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bf6072fd1866bfccee6147bbb776ffcc466c308d
Author: Christian Lohmaier 
AuthorDate: Mon Jan 9 12:15:36 2023 +0100
Commit: Gerrit Code Review 
CommitDate: Mon Jan 9 11:15:36 2023 +

Update git submodules

* Update translations from branch 'libreoffice-7-5'
  to 8ffb49605e9526ddbea8c0735a2c350d5e908f40
  - update translations for 7.5.0 rc2 / master

and force-fix errors using pocheck

Change-Id: Ia0f91e00129cb802164fd4323b3072cf8a76cb5c
(cherry picked from commit fd1416ef15091d8b08ea7dbad77148e68e4d89f9)

diff --git a/translations b/translations
index 54263c9be22b..8ffb49605e95 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 54263c9be22b0706be386769488b593a0f74ec27
+Subproject commit 8ffb49605e9526ddbea8c0735a2c350d5e908f40


[Libreoffice-commits] core.git: translations

2023-01-09 Thread Christian Lohmaier (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 522b3ce2eefa3401a857bcd8076d7cd57faee801
Author: Christian Lohmaier 
AuthorDate: Mon Jan 9 12:14:31 2023 +0100
Commit: Gerrit Code Review 
CommitDate: Mon Jan 9 11:14:31 2023 +

Update git submodules

* Update translations from branch 'master'
  to fd1416ef15091d8b08ea7dbad77148e68e4d89f9
  - update translations for 7.5.0 rc2 / master

and force-fix errors using pocheck

Change-Id: Ia0f91e00129cb802164fd4323b3072cf8a76cb5c

diff --git a/translations b/translations
index 642fe8324e02..fd1416ef1509 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 642fe8324e026e226c7e8e06e9d332d4f6181726
+Subproject commit fd1416ef15091d8b08ea7dbad77148e68e4d89f9


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

2023-01-09 Thread Julien Nabet (via logerrit)
 desktop/source/app/updater.cxx  |2 +-
 extensions/source/update/check/download.cxx |8 
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 6410fafc6f4d58062d82f86549303f4ae2eec32a
Author: Julien Nabet 
AuthorDate: Mon Jan 9 09:01:41 2023 +0100
Commit: Julien Nabet 
CommitDate: Mon Jan 9 10:40:19 2023 +

Fix deprecated Curl elements for update part

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

diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx
index e0d5bcd832b5..9f60a64d7235 100644
--- a/desktop/source/app/updater.cxx
+++ b/desktop/source/app/updater.cxx
@@ -563,7 +563,7 @@ std::string download_content(const OString& rURL, bool 
bFile, OUString& rHash)
 curl_easy_setopt(curl.get(), CURLOPT_HTTPHEADER, headerlist);
 curl_easy_setopt(curl.get(), CURLOPT_FOLLOWLOCATION, 1); // follow 
redirects
 // only allow redirect to http:// and https://
-curl_easy_setopt(curl.get(), CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | 
CURLPROTO_HTTPS);
+curl_easy_setopt(curl.get(), CURLOPT_REDIR_PROTOCOLS_STR, CURLPROTO_HTTP | 
CURLPROTO_HTTPS);
 
 std::string response_body;
 utl::TempFileNamed aTempFile;
diff --git a/extensions/source/update/check/download.cxx 
b/extensions/source/update/check/download.cxx
index 387c1efd7a4f..3b76f9cc8a27 100644
--- a/extensions/source/update/check/download.cxx
+++ b/extensions/source/update/check/download.cxx
@@ -61,7 +61,7 @@ static void openFile( OutData& out )
 curl_easy_getinfo(out.curl, CURLINFO_EFFECTIVE_URL, &effective_url);
 
 double fDownloadSize;
-curl_easy_getinfo(out.curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, 
&fDownloadSize);
+curl_easy_getinfo(out.curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, 
&fDownloadSize);
 
 OString aURL(effective_url);
 
@@ -233,7 +233,7 @@ static bool curl_run(std::u16string_view rURL, OutData& 
out, const OString& aPro
 // enable redirection
 (void)curl_easy_setopt(pCURL, CURLOPT_FOLLOWLOCATION, 1);
 // only allow redirect to http:// and https://
-(void)curl_easy_setopt(pCURL, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP 
| CURLPROTO_HTTPS);
+(void)curl_easy_setopt(pCURL, CURLOPT_REDIR_PROTOCOLS_STR, 
CURLPROTO_HTTP | CURLPROTO_HTTPS);
 
 // write function
 (void)curl_easy_setopt(pCURL, CURLOPT_WRITEDATA, &out);
@@ -241,7 +241,7 @@ static bool curl_run(std::u16string_view rURL, OutData& 
out, const OString& aPro
 
 // progress handler - Condition::check unfortunately is not defined 
const
 (void)curl_easy_setopt(pCURL, CURLOPT_NOPROGRESS, 0);
-(void)curl_easy_setopt(pCURL, CURLOPT_PROGRESSFUNCTION, 
&progress_callback);
+(void)curl_easy_setopt(pCURL, CURLOPT_XFERINFOFUNCTION, 
&progress_callback);
 (void)curl_easy_setopt(pCURL, CURLOPT_PROGRESSDATA, &out);
 
 // proxy
@@ -275,7 +275,7 @@ static bool curl_run(std::u16string_view rURL, OutData& 
out, const OString& aPro
 // this sometimes happens, when a user throws away his user data, 
but has already
 // completed the download of an update.
 double fDownloadSize;
-curl_easy_getinfo( pCURL, CURLINFO_CONTENT_LENGTH_DOWNLOAD, 
&fDownloadSize );
+curl_easy_getinfo( pCURL, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, 
&fDownloadSize );
 if ( -1 == fDownloadSize )
 {
 out.Handler->downloadFinished(out.File);


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

2023-01-09 Thread Pranam Lashkari (via logerrit)
 sw/source/uibase/shells/basesh.cxx |   21 +++--
 1 file changed, 19 insertions(+), 2 deletions(-)

New commits:
commit e65b27e79f177d27131479c46d089cad33df557b
Author: Pranam Lashkari 
AuthorDate: Sat Jan 7 02:39:38 2023 +0530
Commit: Miklos Vajna 
CommitDate: Mon Jan 9 10:18:52 2023 +

sw, UpdateFields: update in sorted order

This was using the order used by GetItemSurrogates() which can be hard to 
predict

So it used to update field in uncertain ways

Now it updates field in order of the fields in file

Change-Id: I7fc39b476cae6ed6a7fb7186803d4205832d7a73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145167
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
(cherry picked from commit 83f5340538d8aa8c469de3fee6012e83f8b56317)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145129
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/sw/source/uibase/shells/basesh.cxx 
b/sw/source/uibase/shells/basesh.cxx
index 9d2b17182daf..d6d4ac2ff8bb 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -801,10 +801,27 @@ bool UpdateFieldContents(SfxRequest& rReq, SwWrtShell& 
rWrtSh)
 SwDoc* pDoc = rWrtSh.GetDoc();
 pDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::INSBOOKMARK, nullptr);
 rWrtSh.StartAction();
+
+std::vector aRefMarks;
+
+for (sal_uInt16 i = 0; i < pDoc->GetRefMarks(); ++i)
+{
+aRefMarks.push_back(pDoc->GetRefMark(i));
+}
+
+std::sort(aRefMarks.begin(), aRefMarks.end(),
+  [](const SwFormatRefMark* pMark1, const SwFormatRefMark* pMark2) 
-> bool {
+  const SwTextRefMark* pTextRefMark1 = 
pMark1->GetTextRefMark();
+  const SwTextRefMark* pTextRefMark2 = 
pMark2->GetTextRefMark();
+  SwPosition aPos1(pTextRefMark1->GetTextNode(), 
pTextRefMark1->GetStart());
+  SwPosition aPos2(pTextRefMark2->GetTextNode(), 
pTextRefMark2->GetStart());
+  return aPos1 < aPos2;
+  });
+
 sal_uInt16 nFieldIndex = 0;
-for (sal_uInt16 nRefMark = 0; nRefMark < pDoc->GetRefMarks(); ++nRefMark)
+for (auto& pIntermediateRefMark : aRefMarks)
 {
-auto pRefMark = 
const_cast(pDoc->GetRefMark(nRefMark));
+auto pRefMark = const_cast(pIntermediateRefMark);
 if (!pRefMark->GetRefName().startsWith(rNamePrefix))
 {
 continue;


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

2023-01-09 Thread Andrea Gelmini (via logerrit)
 sw/qa/extras/rtfexport/rtfexport3.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 71cd508c068e662f06b984810d68868787223ab1
Author: Andrea Gelmini 
AuthorDate: Mon Jan 9 10:52:11 2023 +0100
Commit: Julien Nabet 
CommitDate: Mon Jan 9 09:54:28 2023 +

Fix typo

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

diff --git a/sw/qa/extras/rtfexport/rtfexport3.cxx 
b/sw/qa/extras/rtfexport/rtfexport3.cxx
index a79e92814222..e47212c82f86 100644
--- a/sw/qa/extras/rtfexport/rtfexport3.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport3.cxx
@@ -516,7 +516,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf127806)
 
 DECLARE_RTFEXPORT_TEST(testTdf148578, "tdf148578.rtf")
 {
-// \trgaph567 should affect only table cell margings (~1cm),
+// \trgaph567 should affect only table cell margins (~1cm),
 // but do not shift table, since \trleft is not provided
 uno::Reference xTable(getParagraphOrTable(1), 
uno::UNO_QUERY);
 


[Libreoffice-commits] core.git: officecfg/registry

2023-01-09 Thread Bogdan B (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |   19 
--
 1 file changed, 17 insertions(+), 2 deletions(-)

New commits:
commit 3dbaeb2edffa7147fde02643f527c5d71465af37
Author: Bogdan B 
AuthorDate: Wed Nov 2 21:58:22 2022 +0200
Commit: Heiko Tietze 
CommitDate: Mon Jan 9 09:43:53 2023 +

tdf#143977 Consistent hide/show in Toolbars

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

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 5f9ca119eeba..b6754f123ab4 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -361,10 +361,13 @@
   
   
 
-  ~Show
+  Show Track Changes
+
+
+  Show
 
 
-  Show Track Changes
+  Show track changes
 
 
   1
@@ -2915,6 +2918,12 @@
 
   Hide Whitespac~e
 
+
+  Whitespac~e
+
+
+  Hide whitespace between pages
+
 
   1
 
@@ -2923,6 +2932,12 @@
 
   Show Whitespac~e
 
+
+  Whitespac~e
+
+
+  Show whitespace between pages
+
 
   1
 


Re: problem with vml-shape-types file

2023-01-09 Thread Miklos Vajna
Hi Regina,

On Sat, Jan 07, 2023 at 10:11:46PM +0100, Regina Henschel 
 wrote:
> The vml-shape-types file is used, when a shape is exported to VML. If I
> understand it correctly, then this file is generated from
> presetShapeDefinitions.xml and presetTextWarpDefinitions.xml respectively by
> preset-definitions-to-shape-types.pl script. The file itself is located in
> /share/filter, not in repository (Why?).

preset-definitions-to-shape-types.pl generates vml-shape-types from XML
files which are part of the OOXML spec. It seems logical to generate
such data only once at build-time (as opposed to generating it every
time at runtime), but we tend to not add such generated data to git.

> This file does not work for handles in Fontwork shapes. The problem is the
> position attribute of a handle:
> (A) The reference to the adjustment value is made by a reference to a
> formula (@), but it needs to be a reference to the adjustment value itself
> (#).
> (B) The positions left, right, top, bottom, center are written with numbers
> 0, 10800 and 21600. But it need to be topLeft, center, bottomRight.
> 
> VML is needed for export of Fontwork shapes with fill other than solid or
> gradient, because such fill cannot be expressed with Words "abc Transform".
> Therefore I need a way to get correct VML shapetype markup for Fontwork
> shapes. There exist 40 types of Fontwork shapes in
> presetTextWarpDefinitions.xml. All of them have handles.
> There are 8 binary WordArt shapes, where the relationship to the shapes in
> presetTextWarpDefinitions.xml is unclear.
> 
> I could manually make a file for the markup of the WordArt shapetypes and
> use that. I'm not familiar with Perl scripts.
> 
> Better ideas or suggestions?

I'm not an expert in perl, either, but hopefully with a bit of
experimenting you can tweak
oox/source/export/preset-definitions-to-shape-types.pl so that when it's
invoked with the --vml-shape-types-data switch, then it outputs the
markup that you would want.

My expectation is that the tricky part is not perl but to find out how
the mapping from drawingML presets to VML markup goes wrong.

> BTW, Word uses VML WordArt, when it opens a doc file with binary WordArt or
> opens an odt file with custom-shape with textpath on. And it keeps it as
> VML, when converting the file to docx, even if it would be possible to use
> "abc Transform". But that is a -not jet fixed- import problem and not
> effected by the above mentioned file.

I guess it affects the VML export all the time, just Word >= 2010
ignores VML if there is drawingML for a shape.

Regards,

Miklos


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

2023-01-09 Thread Leonid Ryzhov (via logerrit)
 svx/source/dialog/dialcontrol.cxx |2 +-
 tools/source/generic/poly.cxx |2 +-
 vcl/source/treelist/imap.cxx  |9 +
 vcl/source/treelist/imap2.cxx |3 +--
 4 files changed, 4 insertions(+), 12 deletions(-)

New commits:
commit 1b44a4c558fdf597bf66c1c671248ca58e145e9e
Author: Leonid Ryzhov 
AuthorDate: Thu Jan 5 18:14:16 2023 +0300
Commit: Hossein 
CommitDate: Mon Jan 9 09:18:12 2023 +

tdf#147906 Use std::hypot for Pythagorean addition

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

diff --git a/svx/source/dialog/dialcontrol.cxx 
b/svx/source/dialog/dialcontrol.cxx
index e6c7c8e43b3b..d16c0b4d92cc 100644
--- a/svx/source/dialog/dialcontrol.cxx
+++ b/svx/source/dialog/dialcontrol.cxx
@@ -448,7 +448,7 @@ void DialControl::HandleMouseEvent( const Point& rPos, bool 
bInitial )
 {
 tools::Long nX = rPos.X() - mpImpl->mnCenterX;
 tools::Long nY = mpImpl->mnCenterY - rPos.Y();
-double fH = sqrt( static_cast< double >( nX ) * nX + static_cast< double 
>( nY ) * nY );
+double fH = std::hypot( nX, nY );
 if( fH != 0.0 )
 {
 double fAngle = acos( nX / fH );
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 2665b0381571..efd04b9b3e3d 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1037,7 +1037,7 @@ double Polygon::CalcDistance( sal_uInt16 nP1, sal_uInt16 
nP2 ) const
 const double fDx = rP2.X() - rP1.X();
 const double fDy = rP2.Y() - rP1.Y();
 
-return sqrt( fDx * fDx + fDy * fDy );
+return std::hypot( fDx, fDy );
 }
 
 void Polygon::Optimize( PolyOptimizeFlags nOptimizeFlags )
diff --git a/vcl/source/treelist/imap.cxx b/vcl/source/treelist/imap.cxx
index 034d9655f7af..09cc9f4f0647 100644
--- a/vcl/source/treelist/imap.cxx
+++ b/vcl/source/treelist/imap.cxx
@@ -320,15 +320,8 @@ IMapObjectType IMapCircleObject::GetType() const
 bool IMapCircleObject::IsHit( const Point& rPoint ) const
 {
 const Point aPoint( aCenter - rPoint );
-boolbRet = false;
 
-if ( static_cast(sqrt( static_cast(aPoint.X()) * 
aPoint.X() +
-   aPoint.Y() * aPoint.Y() )) <= nRadius )
-{
-bRet = true;
-}
-
-return bRet;
+return static_cast( std::hypot( aPoint.X(), aPoint.Y() ) ) <= 
nRadius;
 }
 
 Point IMapCircleObject::GetCenter( bool bPixelCoords ) const
diff --git a/vcl/source/treelist/imap2.cxx b/vcl/source/treelist/imap2.cxx
index 980dae3eee48..f0e3c6913f47 100644
--- a/vcl/source/treelist/imap2.cxx
+++ b/vcl/source/treelist/imap2.cxx
@@ -411,8 +411,7 @@ void ImageMap::ImpReadNCSALine( std::string_view rLine )
 const OUString  aURL( ImpReadNCSAURL( &pStr ) );
 const Point aCenter( ImpReadNCSACoords( &pStr ) );
 const Point aDX( aCenter - ImpReadNCSACoords( &pStr ) );
-tools::LongnRadius = static_cast(sqrt( 
static_cast(aDX.X()) * aDX.X() +
-   static_cast(aDX.Y()) * 
aDX.Y() ));
+tools::LongnRadius = static_cast(std::hypot( 
aDX.X(), aDX.Y()));
 
 maList.emplace_back( new IMapCircleObject( aCenter, nRadius, aURL, 
OUString(), OUString(), OUString(), OUString() ) );
 }


[Libreoffice-commits] core.git: offapi/com

2023-01-09 Thread offtkp (via logerrit)
 offapi/com/sun/star/text/ContentControl.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2dd45d5d81afdd5c550b9929dde42ac04d9dd176
Author: offtkp 
AuthorDate: Tue Jan 3 15:26:51 2023 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jan 9 09:01:55 2023 +

Fix wrong version in comment

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

diff --git a/offapi/com/sun/star/text/ContentControl.idl 
b/offapi/com/sun/star/text/ContentControl.idl
index c2fe46757656..34beff3cb127 100644
--- a/offapi/com/sun/star/text/ContentControl.idl
+++ b/offapi/com/sun/star/text/ContentControl.idl
@@ -94,7 +94,7 @@ service ContentControl
 
 /** The appearance: just remembered.
 
-@since LibreOffice 7.5
+@since LibreOffice 7.6
 */
 [optional, property] string Appearance;
 


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

2023-01-09 Thread offtkp (via logerrit)
 sw/source/ui/dialog/swdlgfact.hxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 5e5631a8f6a9b14ab7f088f61f4780948c41761d
Author: offtkp 
AuthorDate: Fri Jan 6 22:59:35 2023 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jan 9 09:01:33 2023 +

Add comment for new class

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

diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index 929063a2dab5..55aac3c8c858 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -153,6 +153,7 @@ public:
 virtual void FillOptions( SwAsciiOptions& rOptions ) override;
 };
 
+/// Interface implementation for the insert -> fields -> page number wizard 
dialog
 class AbstractSwPageNumberDlg_Impl : public AbstractSwPageNumberDlg
 {
 std::shared_ptr m_xDlg;


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - desktop/source officecfg/registry sfx2/source sw/inc sw/Library_swui.mk sw/sdi sw/source sw/uiconfig sw/UIConfig_swriter.mk vcl/inc

2023-01-09 Thread offtkp (via logerrit)
 desktop/source/lib/init.cxx |1 
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |5 
 sfx2/source/control/unoctitm.cxx|1 
 sw/Library_swui.mk  |1 
 sw/UIConfig_swriter.mk  |1 
 sw/inc/cmdid.h  |1 
 sw/inc/strings.hrc  |1 
 sw/inc/swabstdlg.hxx|   11 
 sw/inc/swundo.hxx   |1 
 sw/sdi/_textsh.sdi  |7 
 sw/sdi/swriter.sdi  |   18 
 sw/source/core/undo/undobj.cxx  |3 
 sw/source/ui/dialog/swdlgfact.cxx   |   26 +
 sw/source/ui/dialog/swdlgfact.hxx   |   16 
 sw/source/ui/misc/pagenumberdlg.cxx |   92 
 sw/source/uibase/inc/pagenumberdlg.hxx  |   51 ++
 sw/source/uibase/shells/textfld.cxx |   81 +++
 sw/uiconfig/swriter/menubar/menubar.xml |2 
 sw/uiconfig/swriter/ui/pagenumberdlg.ui |  222 
++
 vcl/inc/jsdialog/jsdialogbuilder.hxx|2 
 vcl/jsdialog/enabled.cxx|1 
 vcl/jsdialog/jsdialogbuilder.cxx|   12 
 22 files changed, 555 insertions(+), 1 deletion(-)

New commits:
commit 19820c3db7a704e22f5db72b91bf10d85cc48897
Author: offtkp 
AuthorDate: Wed Dec 21 14:29:59 2022 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jan 9 08:59:01 2023 +

tdf#86630 sw: Add one-step page number insertion wizard

Add a one-step wizard for easy insertion of the page number to the
header/footer.

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 0c3be4b25743..edaf0ad75477 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3337,6 +3337,7 @@ static void doc_iniUnoCommands ()
 OUString(".uno:InsertAuthoritiesEntry"),
 OUString(".uno:InsertMultiIndex"),
 OUString(".uno:InsertField"),
+OUString(".uno:PageNumberWizard"),
 OUString(".uno:InsertPageNumberField"),
 OUString(".uno:InsertPageCountField"),
 OUString(".uno:InsertDateField"),
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 9247374da3f6..59a66a8382a8 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -1003,6 +1003,11 @@
   1
 
   
+  
+
+  ~Page Number...
+
+  
   
 
   ~Page Number
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 868d7749f32b..30538c614772 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1091,6 +1091,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, 
SfxViewFrame* pViewFra
  aEvent.FeatureURL.Path == "InsertAuthoritiesEntry" ||
  aEvent.FeatureURL.Path == "InsertMultiIndex" ||
  aEvent.FeatureURL.Path == "InsertField" ||
+ aEvent.FeatureURL.Path == "PageNumberWizard" ||
  aEvent.FeatureURL.Path == "InsertPageNumberField" ||
  aEvent.FeatureURL.Path == "InsertPageCountField" ||
  aEvent.FeatureURL.Path == "InsertDateField" ||
diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk
index 532617295808..c34451317dd7 100644
--- a/sw/Library_swui.mk
+++ b/sw/Library_swui.mk
@@ -141,6 +141,7 @@ $(eval $(call gb_Library_add_exception_objects,swui,\
 sw/source/ui/misc/bookmark \
 sw/source/ui/misc/contentcontroldlg \
 sw/source/ui/misc/contentcontrollistitemdlg \
+sw/source/ui/misc/pagenumberdlg \
 sw/source/ui/misc/docfnote \
 sw/source/ui/misc/glosbib \
 sw/source/ui/misc/glossary \
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 22b91c7f57c9..b5fab9613f66 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -243,6 +243,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/notebookbar_online \
sw/uiconfig/swriter/ui/pagecolumncontrol \
sw/uiconfig/swriter/ui/pagemargincontrol \
+   sw/ui

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

2023-01-09 Thread Caolán McNamara (via logerrit)
 vcl/unx/generic/gdi/gdiimpl.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 72a08a55791a1c17c0ec15b2ab5c7294c23e2831
Author: Caolán McNamara 
AuthorDate: Sun Jan 8 21:21:13 2023 +
Commit: Caolán McNamara 
CommitDate: Mon Jan 9 08:55:22 2023 +

tdf#152931 deref of moPenColor std::optional on launching writer

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

diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx
index 4b3b128b7442..7f8672f07735 100644
--- a/vcl/unx/generic/gdi/gdiimpl.cxx
+++ b/vcl/unx/generic/gdi/gdiimpl.cxx
@@ -152,8 +152,8 @@ X11SalGraphicsImpl::~X11SalGraphicsImpl()
 
 void X11SalGraphicsImpl::Init()
 {
-mnPenPixel = mrParent.GetPixel( *moPenColor );
-mnBrushPixel = mrParent.GetPixel( *moBrushColor );
+mnPenPixel = moPenColor ? mrParent.GetPixel(*moPenColor) : 0;
+mnBrushPixel = moBrushColor ? mrParent.GetPixel(*moBrushColor) : 0;
 }
 
 XID X11SalGraphicsImpl::GetXRenderPicture()


[Libreoffice-commits] core.git: cppuhelper/source desktop/source package/source slideshow/source stoc/source sw/source testtools/source toolkit/source ucb/source vcl/source vcl/unx vcl/workben

2023-01-09 Thread Arnaud VERSINI (via logerrit)
 cppuhelper/source/bootstrap.cxx   |3 ++-
 desktop/source/app/officeipcthread.cxx|   16 
 desktop/source/deployment/misc/dp_misc.cxx|3 ++-
 package/source/zipapi/ZipOutputStream.cxx |4 +++-
 slideshow/source/engine/slideshowimpl.cxx |3 ++-
 stoc/source/javaloader/javaloader.cxx |5 +++--
 sw/source/core/docnode/finalthreadmanager.cxx |5 +++--
 testtools/source/bridgetest/cppobj.cxx|3 ++-
 toolkit/source/awt/vclxtoolkit.cxx|3 ++-
 ucb/source/ucp/webdav-curl/SerfLockStore.cxx  |7 +++
 vcl/source/opengl/OpenGLContext.cxx   |3 ++-
 vcl/unx/generic/dtrans/X11_selection.cxx  |5 +++--
 vcl/workben/vcldemo.cxx   |3 ++-
 13 files changed, 33 insertions(+), 30 deletions(-)

New commits:
commit 555f4333182abd0ca4aa06b354763f6dfbc3eb20
Author: Arnaud VERSINI 
AuthorDate: Sun Nov 6 17:04:20 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Jan 9 08:37:35 2023 +

use std::this_thread::sleep_for instead of osl equivalent

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

diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx
index f468518ba456..bd975460f06c 100644
--- a/cppuhelper/source/bootstrap.cxx
+++ b/cppuhelper/source/bootstrap.cxx
@@ -21,6 +21,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -215,7 +216,7 @@ Reference< XComponentContext > SAL_CALL bootstrap()
 catch ( connection::NoConnectException & )
 {
 // wait 500 ms, then try to connect again
-::osl::Thread::wait( std::chrono::milliseconds(500) );
+std::this_thread::sleep_for(std::chrono::milliseconds(500));
 }
 }
 }
diff --git a/desktop/source/app/officeipcthread.cxx 
b/desktop/source/app/officeipcthread.cxx
index 45b8906c3b42..74f838939bfa 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -48,6 +48,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #if ENABLE_DBUS
 #include 
@@ -792,10 +793,7 @@ RequestHandler::Status 
PipeIpcThread::enable(rtl::Reference * thread)
 else
 {
 // Pipe connection failed (other office exited or crashed)
-TimeValue tval;
-tval.Seconds = 0;
-tval.Nanosec = 5;
-salhelper::Thread::wait( tval );
+std::this_thread::sleep_for( std::chrono::milliseconds(500) );
 }
 }
 else
@@ -805,10 +803,7 @@ RequestHandler::Status 
PipeIpcThread::enable(rtl::Reference * thread)
 return RequestHandler::IPC_STATUS_PIPE_ERROR;
 
 // Wait for second office to be ready
-TimeValue aTimeValue;
-aTimeValue.Seconds = 0;
-aTimeValue.Nanosec = 1000; // 10ms
-salhelper::Thread::wait( aTimeValue );
+std::this_thread::sleep_for( std::chrono::milliseconds(10) );
 }
 
 } while ( nPipeMode == PIPEMODE_DONTKNOW );
@@ -1206,10 +1201,7 @@ void PipeIpcThread::execute()
 }
 
 SAL_WARN( "desktop.app", "Error on accept: " << 
static_cast(nError));
-TimeValue tval;
-tval.Seconds = 1;
-tval.Nanosec = 0;
-salhelper::Thread::wait( tval );
+std::this_thread::sleep_for( std::chrono::seconds(1) );
 }
 } while( schedule() );
 }
diff --git a/desktop/source/deployment/misc/dp_misc.cxx 
b/desktop/source/deployment/misc/dp_misc.cxx
index 2983de24b959..bbe3a085fc68 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -46,6 +46,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -447,7 +448,7 @@ Reference resolveUnoURL(
 catch (const connection::NoConnectException &) {
 if (i < 40)
 {
-::osl::Thread::wait( std::chrono::milliseconds(500) );
+std::this_thread::sleep_for( std::chrono::milliseconds(500) );
 }
 else throw;
 }
diff --git a/package/source/zipapi/ZipOutputStream.cxx 
b/package/source/zipapi/ZipOutputStream.cxx
index 9b582c4691e8..df21f1ffeb13 100644
--- a/package/source/zipapi/ZipOutputStream.cxx
+++ b/package/source/zipapi/ZipOutputStream.cxx
@@ -32,6 +32,8 @@
 #include 
 #include 
 
+#include 
+
 using namespace com::sun::star;
 using namespace com::sun::star::io;
 using namespace com::sun::star::uno;
@@ -151,7 +153,7 @@ void 
ZipOutputStream::reduceScheduledThreadTasksToGivenNumberOrLess(std::size_t
 
 if(m_aEntries.size() > nThreadTasks)
 {
-osl::Thread::wait(std::chrono::microseconds(100));
+std::this_thread::sle

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

2023-01-09 Thread Stephan Bergmann (via logerrit)
 libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 42d9077fc4ffc35d769412a979d91e836adb2536
Author: Stephan Bergmann 
AuthorDate: Mon Jan 9 08:26:45 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Jan 9 08:26:19 2023 +

Missing include

...as reported at


"boost 1.81 breaks libetonyek and gtv-calc-header-bar.cxx",

> 
/home/etna/Tmpbuild/libreoffice/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx:36:25:
 error: implicit instantiation of undefined template 'std::vector<(anonymous 
namespace)::GtvCalcHeaderBarPrivateImpl::Header>'
> std::vector m_aHeaders;
> ^
> 
/home/etna/Runtime/BuildSystem/LLVM13WithWASM/bin/../include/c++/v1/iosfwd:251:28:
 note: template is declared here
> class _LIBCPP_TEMPLATE_VIS vector;
>^

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

diff --git a/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx 
b/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
index 22aadbe2f337..6019050236e8 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
@@ -11,6 +11,7 @@
 
 #include 
 #include 
+#include 
 
 #include "gtv-calc-header-bar.hxx"