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

2022-05-11 Thread Michael Warner (via logerrit)
 editeng/qa/unit/core-test.cxx   |   85 ++
 editeng/source/editeng/impedit4.cxx |7 ++
 sw/qa/extras/uiwriter/uiwriter4.cxx |  116 
 sw/source/core/txtnode/txtedt.cxx   |6 +
 4 files changed, 214 insertions(+)

New commits:
commit 49ddbc94a088344bf6945a0300342ea3f184
Author: Michael Warner 
AuthorDate: Mon Apr 11 00:18:25 2022 -0400
Commit: Xisco Fauli 
CommitDate: Wed May 11 22:59:59 2022 +0200

tdf#148148: Applying Title Case when selection contains only spaces

Previously, if the user's selection does not contain any word
characters, but the node does contain characters outside of
the user's selection, then searching for the word boundaries
when applying title case could result in start and end points
that were incorrect. In Writer this results in title case
being applied to non-selected characters. In Calc this results
in a debug assertion being hit.

This commit prevents those issues by skipping transliteration
on the node in this case.

Change-Id: I20c5ef44793741c5863f838c13ba222452346a97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132801
Tested-by: Jenkins
Tested-by: Julien Nabet 
Reviewed-by: Xisco Fauli 

diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index 8965b8c21ba6..2836c6ba81d6 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -99,6 +99,8 @@ public:
 
 void testTdf147196();
 
+void testTdf148148();
+
 DECL_STATIC_LINK( Test, CalcFieldValueHdl, EditFieldInfo*, void );
 
 CPPUNIT_TEST_SUITE(Test);
@@ -122,6 +124,7 @@ public:
 CPPUNIT_TEST(testLargeParaCopyPaste);
 CPPUNIT_TEST(testTransliterate);
 CPPUNIT_TEST(testTdf147196);
+CPPUNIT_TEST(testTdf148148);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -1889,6 +1892,88 @@ void Test::testTdf147196()
 CPPUNIT_ASSERT_EQUAL(OUString("2.2 Publication Of Information - 
Caa\nSection 4.2 Of A Ca\'s Certificate Policy And/Or Certification Practice 
Statement Shall State The Ca\'s Policy Or Practice On Processing Caa Records 
For Fully Qualified Domain Names; That Policy Shall Be Consistent With These 
Requirements. \n\nIt Shall Clearly Specify The Set Of Issuer Domain Names That 
The Ca Recognises In Caa \"Issue\" Or \"Issuewild\" Records As Permitting It To 
Issue. The Ca Shall Log All Actions Taken, If Any, Consistent With Its 
Processing Practice."), editEng.GetText());
 }
 
+void Test::testTdf148148()
+{
+using TF = TransliterationFlags;
+EditEngine editEng( mpItemPool.get() );
+
+/* Test what happens when node contains text but selection does not 
contain any text */
+int selStart = 0;
+int selEnd = 3;
+ESelection esel(0, selStart, 0, selEnd);
+const OUString sText1("   text");
+editEng.SetText(sText1);
+CPPUNIT_ASSERT_EQUAL(OUString("   "), editEng.GetText(esel));
+
+CPPUNIT_ASSERT_EQUAL(OUString("   text"), lcl_translitTest(editEng, 
sText1, esel, TF::SENTENCE_CASE));
+CPPUNIT_ASSERT_EQUAL(OUString("   text"), lcl_translitTest(editEng, 
sText1, esel, TF::TITLE_CASE));
+CPPUNIT_ASSERT_EQUAL(OUString("   text"), lcl_translitTest(editEng, 
sText1, esel, TF::LOWERCASE_UPPERCASE));
+CPPUNIT_ASSERT_EQUAL(OUString("   text"), lcl_translitTest(editEng, 
sText1, esel, TF::UPPERCASE_LOWERCASE));
+
+selStart = 4;
+selEnd = 8;
+esel = ESelection(0, selStart, 0, selEnd);
+const OUString sText2("text");
+editEng.SetText(sText2);
+CPPUNIT_ASSERT_EQUAL(OUString(""), editEng.GetText(esel));
+
+CPPUNIT_ASSERT_EQUAL(OUString("text"), lcl_translitTest(editEng, 
sText2, esel, TF::SENTENCE_CASE));
+CPPUNIT_ASSERT_EQUAL(OUString("text"), lcl_translitTest(editEng, 
sText2, esel, TF::TITLE_CASE));
+CPPUNIT_ASSERT_EQUAL(OUString("text"), lcl_translitTest(editEng, 
sText2, esel, TF::LOWERCASE_UPPERCASE));
+CPPUNIT_ASSERT_EQUAL(OUString("text"), lcl_translitTest(editEng, 
sText2, esel, TF::UPPERCASE_LOWERCASE));
+
+/* Test what happens when node contains only non-word text but selection 
does not contain any text */
+selStart = 0;
+selEnd = 3;
+esel = ESelection(0, selStart, 0, selEnd);
+const OUString sText3("   -1");
+editEng.SetText(sText3);
+CPPUNIT_ASSERT_EQUAL(OUString("   "), editEng.GetText(esel));
+
+CPPUNIT_ASSERT_EQUAL(OUString("   -1"), lcl_translitTest(editEng, sText3, 
esel, TF::SENTENCE_CASE));
+CPPUNIT_ASSERT_EQUAL(OUString("   -1"), lcl_translitTest(editEng, sText3, 
esel, TF::TITLE_CASE));
+CPPUNIT_ASSERT_EQUAL(OUString("   -1"), lcl_translitTest(editEng, sText3, 
esel, TF::LOWERCASE_UPPERCASE));
+CPPUNIT_ASSERT_EQUAL(OUString("   -1"), lcl_translitTest(editEng, sText3, 
esel, TF::UPPERCASE_LOWERCASE));
+
+selStart = 2;
+selEnd = 6;
+esel = ESelection(0, selStart, 0, selEnd);
+const OUString sText4("-1");
+

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

2022-02-17 Thread Michael Warner (via logerrit)
 editeng/qa/unit/core-test.cxx   |   22 ++
 editeng/source/editeng/impedit4.cxx |3 ---
 sw/qa/extras/uiwriter/uiwriter4.cxx |   34 ++
 sw/source/core/txtnode/txtedt.cxx   |3 ---
 4 files changed, 56 insertions(+), 6 deletions(-)

New commits:
commit b7308bda7212da5681b7047c02e2e13e36b2a98a
Author: Michael Warner 
AuthorDate: Sun Feb 13 22:45:48 2022 -0500
Commit: Xisco Fauli 
CommitDate: Thu Feb 17 17:15:16 2022 +0100

tdf#147196: Fix crash in editeng when applying title case format

Fixes a possiblity of crashing when applying title case format using the
edit engine.

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

diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index f3500e01ce26..ffdec6ffb2fe 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -97,6 +97,8 @@ public:
 
 void testTransliterate();
 
+void testTdf147196();
+
 DECL_STATIC_LINK( Test, CalcFieldValueHdl, EditFieldInfo*, void );
 
 CPPUNIT_TEST_SUITE(Test);
@@ -119,6 +121,7 @@ public:
 CPPUNIT_TEST(testSectionAttributes);
 CPPUNIT_TEST(testLargeParaCopyPaste);
 CPPUNIT_TEST(testTransliterate);
+CPPUNIT_TEST(testTdf147196);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -1830,6 +1833,17 @@ void Test::testTransliterate()
 CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones mET joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
 CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
 
+/* Test behavior when there is a selection that ends in the middle of a 
word */
+selStart = 11;
+selEnd = 13;
+esel = ESelection(0, selStart, 0, selEnd);
+CPPUNIT_ASSERT_EQUAL(OUString("me"), editEng.GetText(esel));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones Met joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::SENTENCE_CASE));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones Met joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones MEt joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
+
+
 /* Test behavior when there is a selection that crosses a word boundary: 
"nes met joe Sm" */
 selStart = 7;
 selEnd = 21;
@@ -1865,9 +1879,17 @@ void Test::testTransliterate()
 CPPUNIT_ASSERT_EQUAL(OUString("CURRENT IS EQUAL TO 10 A"), 
lcl_translitTest(editEng, sText3, esel, TF::LOWERCASE_UPPERCASE));
 CPPUNIT_ASSERT_EQUAL(OUString("current is equal to 10 A"), 
lcl_translitTest(editEng, sText3, esel, TF::UPPERCASE_LOWERCASE));
 
+}
 
+void Test::testTdf147196()
+{
+EditEngine editEng( mpItemPool.get() );
+editEng.SetText("2.2 Publication of information - CAA\nSection 4.2 of a 
CA\'s Certificate Policy and/or Certification Practice Statement SHALL state 
the CA\'s policy or practice on processing CAA Records for Fully Qualified 
Domain Names; that policy shall be consistent with these Requirements. \n\nIt 
shall clearly specify the set of Issuer Domain Names that the CA recognises in 
CAA \"issue\" or \"issuewild\" records as permitting it to issue. The CA SHALL 
log all actions taken, if any, consistent with its processing practice.");
+editEng.TransliterateText(ESelection(0, 0, 3, 232), 
TransliterationFlags::TITLE_CASE);
+CPPUNIT_ASSERT_EQUAL(OUString("2.2 Publication Of Information - 
Caa\nSection 4.2 Of A Ca\'s Certificate Policy And/Or Certification Practice 
Statement Shall State The Ca\'s Policy Or Practice On Processing Caa Records 
For Fully Qualified Domain Names; That Policy Shall Be Consistent With These 
Requirements. \n\nIt Shall Clearly Specify The Set Of Issuer Domain Names That 
The Ca Recognises In Caa \"Issue\" Or \"Issuewild\" Records As Permitting It To 
Issue. The Ca Shall Log All Actions Taken, If Any, Consistent With Its 
Processing Practice."), editEng.GetText());
 }
 
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 }
diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index 1228924dc634..d2a37e990846 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2776,9 +2776,6 @@ EditSelection ImpEditEngine::TransliterateText( const 
EditSelection& rSelection,
 aCurWordBndry = _xBI->nextWord(aNodeStr, nCurrentStart,
 GetLocale( EditPaM( pNode, nCurrentStart + 1 ) ),
 nWordType);
-
-/* Selection may end in the middle of a word */
- 

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

2022-02-01 Thread Michael Warner (via logerrit)
 editeng/qa/unit/core-test.cxx   |   12 +++-
 editeng/source/editeng/impedit4.cxx |   11 +++
 sw/qa/extras/uiwriter/uiwriter4.cxx |   23 ++-
 sw/source/core/txtnode/txtedt.cxx   |8 
 4 files changed, 52 insertions(+), 2 deletions(-)

New commits:
commit de5aa409353c839483df21d47254fd2a508ab7d9
Author: Michael Warner 
AuthorDate: Sat Oct 2 09:34:34 2021 -0400
Commit: Heiko Tietze 
CommitDate: Tue Feb 1 11:16:27 2022 +0100

tdf#144851 Honor Selection When Applying Title Case Format

Prevents Title Case formmating from occuring outside of a
user's selection. This is relevant if the user has started
or ended a selection in the middle of a word.

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

diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index 896fa59810eb..f3500e01ce26 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -1820,13 +1820,23 @@ void Test::testTransliterate()
 CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones MET joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
 CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
 
+/* Test behavior when there is a selection that does not begin at a word 
boundary: "et" */
+selStart = 12;
+selEnd = 14;
+esel = ESelection(0, selStart, 0, selEnd);
+CPPUNIT_ASSERT_EQUAL(OUString("et"), editEng.GetText(esel));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones mEt joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::SENTENCE_CASE));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones mEt joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones mET joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
+
 /* Test behavior when there is a selection that crosses a word boundary: 
"nes met joe Sm" */
 selStart = 7;
 selEnd = 21;
 esel = ESelection(0, selStart, 0, selEnd);
 CPPUNIT_ASSERT_EQUAL(OUString("nes met joe Sm"), editEng.GetText(esel));
 CPPUNIT_ASSERT_EQUAL(OUString("Mary JoNes met joe smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::SENTENCE_CASE));
-CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones Met Joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary JoNes Met Joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
 CPPUNIT_ASSERT_EQUAL(OUString("Mary JoNES MET JOE SMith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
 CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
 
diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index 3012504bb028..1228924dc634 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2738,6 +2738,14 @@ EditSelection ImpEditEngine::TransliterateText( const 
EditSelection& rSelection,
 nWordType);
 }
 
+// prevent going outside of the user's selection, which may
+// start or end in the middle of a word
+if (nNode == nStartNode) {
+aSttBndry.startPos = std::max(aSttBndry.startPos, 
aSel.Min().GetIndex());
+aSttBndry.endPos   = std::min(aSttBndry.endPos,   
aSel.Max().GetIndex());
+aEndBndry.startPos = std::max(aEndBndry.startPos, 
aSttBndry.startPos);
+aEndBndry.endPos   = std::min(aEndBndry.endPos,   
aSel.Max().GetIndex());
+}
 i18n::Boundary aCurWordBndry( aSttBndry );
 while (aCurWordBndry.endPos && aCurWordBndry.startPos <= 
aEndBndry.startPos)
 {
@@ -2768,6 +2776,9 @@ EditSelection ImpEditEngine::TransliterateText( const 
EditSelection& rSelection,
 aCurWordBndry = _xBI->nextWord(aNodeStr, nCurrentStart,
 GetLocale( EditPaM( pNode, nCurrentStart + 1 ) ),
 nWordType);
+
+/* Selection may end in the middle of a word */
+aCurWordBndry.endPos = std::min(aCurWordBndry.endPos,   
aSel.Max().GetIndex());
 }
 DBG_ASSERT( nCurrentEnd >= aEndBndry.endPos, "failed to reach end 
of transliteration" );
 }
diff --git a/sw/qa/extras/uiwriter/uiwriter4.cxx 

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

2021-11-26 Thread Michael Warner (via logerrit)
 editeng/qa/unit/core-test.cxx   |  112 ++
 editeng/source/editeng/impedit4.cxx |   14 +
 sw/qa/extras/uiwriter/uiwriter3.cxx |8 
 sw/qa/extras/uiwriter/uiwriter4.cxx |  163 
 sw/source/core/doc/DocumentContentOperationsManager.cxx |   26 +-
 sw/source/core/txtnode/txtedt.cxx   |   22 +-
 6 files changed, 326 insertions(+), 19 deletions(-)

New commits:
commit cb699fd9c749d5fe621406918fa6458896c09239
Author: Michael Warner 
AuthorDate: Fri Aug 27 17:37:28 2021 -0400
Commit: Heiko Tietze 
CommitDate: Fri Nov 26 16:40:55 2021 +0100

tdf#49033 Honor Selection When Applying Sentence Case Format

Prevents Sentence Case formatting from occuring outside of a user's
selection.

This commit does not prevent Title Case formatting from
adjusting the first letter of a word, even if the selection does
not include that letter.

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

diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index 8215c451118a..8bdd43d926f1 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -31,6 +31,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 
@@ -1745,15 +1747,117 @@ void Test::testLargeParaCopyPaste()
 CPPUNIT_ASSERT_EQUAL( aTenthPara, rDoc.GetParaAsString(sal_Int32(11)) );
 }
 
+OUString lcl_translitTest(EditEngine& aEditEngine, const OUString& text, const 
ESelection& esel, const TransliterationFlags nType)
+{
+aEditEngine.SetText(text);
+aEditEngine.TransliterateText(esel, nType);
+return aEditEngine.GetText();
+}
+
+
 void Test::testTransliterate()
 {
 // Create EditEngine's instance
-EditEngine aEditEngine( mpItemPool.get() );
+EditEngine editEng( mpItemPool.get() );
 
 OUString sText("one (two) three");
-aEditEngine.SetText(sText);
-aEditEngine.TransliterateText(ESelection(0, 0, 0, sText.getLength()), 
TransliterationFlags::TITLE_CASE);
-CPPUNIT_ASSERT_EQUAL(OUString("One (Two) Three"), aEditEngine.GetText());
+editEng.SetText(sText);
+editEng.TransliterateText(ESelection(0, 0, 0, sText.getLength()), 
TransliterationFlags::TITLE_CASE);
+CPPUNIT_ASSERT_EQUAL(OUString("One (Two) Three"), editEng.GetText());
+
+using TF = TransliterationFlags;
+const OUString sText2 = "Mary Jones met joe Smith. Time Passed.";
+int selStart = 12;
+int selEnd = 12;
+ESelection esel(0, selStart, 0, selEnd);
+
+/* DocumentContentOperationsManager checks if the cursor is inside of a 
word before transliterating,
+ * but Edit Engine has no such check. Therefore, behavior is different 
between these two when the
+ * cursor is on a word boundary. */
+
+/* No selection tests. Cursor between the ' ' and 'm' before 'met'. */
+CPPUNIT_ASSERT_EQUAL(OUString(""), editEng.GetText(esel));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary jones met joe smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::SENTENCE_CASE));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones Met joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones MET joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
+
+/* No selection tests. Cursor between the 't' and the ' ' after 'met'. */
+selStart = 14;
+selEnd = 14;
+esel = ESelection(0, selStart, 0, selEnd);
+CPPUNIT_ASSERT_EQUAL(OUString(""), editEng.GetText(esel));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary jones met joe smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::SENTENCE_CASE));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
+
+/* No selection tests. Cursor between the 'h' and the '.' after 'Smith'. */
+selStart = 24;
+selEnd = 24;
+esel = ESelection(0, selStart, 0, selEnd);
+CPPUNIT_ASSERT_EQUAL(OUString(""), editEng.GetText(esel));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary jones met joe smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::SENTENCE_CASE));
+CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), 
lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
+

[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - RepositoryExternal.mk

2021-11-15 Thread Michael Warner (via logerrit)
 RepositoryExternal.mk |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit b635846280c8fb4fb4d68f95af383ef1337eb430
Author: Michael Warner 
AuthorDate: Fri Nov 12 08:13:16 2021 -0500
Commit: Caolán McNamara 
CommitDate: Mon Nov 15 18:36:10 2021 +0100

tdf#141709 Register poppler_data for install

Added call to gb_Helper_register_packages_for_install to 
RepositoryExternal.mk
for poppler_data.

Change-Id: Ie65ff0083d2c731486254066db2034e3bd4a99a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125108
Reviewed-by: Michael Stahl 
Tested-by: Jenkins
(cherry picked from commit 6ea7ca45782a7e1b46e18e994534ec0a7c71951b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125140
Reviewed-by: Michael Warner 
Reviewed-by: Caolán McNamara 

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 7a87e2c7324f..d64fb8ffd57a 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -2806,6 +2806,10 @@ endef
 
 else # !SYSTEM_POPPLER
 
+$(eval $(call gb_Helper_register_packages_for_install,pdfimport,\
+   poppler_data \
+))
+
 define gb_LinkTarget__use_poppler
 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
 $(call gb_LinkTarget_use_package,$(1),poppler_data)
@@ -2817,7 +2821,6 @@ $(call gb_LinkTarget_set_include,$(1),\
 )
 
 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
-
 $(call gb_LinkTarget_use_external,$(1),libjpeg)
 
 ifeq ($(OS),MACOSX)


[Libreoffice-commits] core.git: RepositoryExternal.mk

2021-11-15 Thread Michael Warner (via logerrit)
 RepositoryExternal.mk |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 6ea7ca45782a7e1b46e18e994534ec0a7c71951b
Author: Michael Warner 
AuthorDate: Fri Nov 12 08:13:16 2021 -0500
Commit: Michael Stahl 
CommitDate: Mon Nov 15 16:27:54 2021 +0100

tdf#141709 Register poppler_data for install

Added call to gb_Helper_register_packages_for_install to 
RepositoryExternal.mk
for poppler_data.

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

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index a2a7212aa837..e63ab24dba27 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -2815,6 +2815,10 @@ endef
 
 else # !SYSTEM_POPPLER
 
+$(eval $(call gb_Helper_register_packages_for_install,pdfimport,\
+   poppler_data \
+))
+
 define gb_LinkTarget__use_poppler
 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
 $(call gb_LinkTarget_use_package,$(1),poppler_data)
@@ -2826,7 +2830,6 @@ $(call gb_LinkTarget_set_include,$(1),\
 )
 
 $(call gb_LinkTarget_use_static_libraries,$(1),poppler)
-
 $(call gb_LinkTarget_use_external,$(1),libjpeg)
 
 ifeq ($(OS),MACOSX)


[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - comphelper/source extensions/Library_oleautobridge.mk extensions/source include/comphelper vbahelper/source

2021-08-25 Thread Michael Warner (via logerrit)
 comphelper/source/misc/asyncquithandler.cxx   |9 --
 extensions/Library_oleautobridge.mk   |1 
 extensions/source/ole/unoobjw.cxx |   68 --
 include/comphelper/asyncquithandler.hxx   |8 --
 vbahelper/source/vbahelper/vbaapplicationbase.cxx |4 -
 5 files changed, 1 insertion(+), 89 deletions(-)

New commits:
commit 1e3f7a0370b13ba0da69385103f6419d55ff487b
Author: Michael Warner 
AuthorDate: Wed Jul 7 21:12:28 2021 -0400
Commit: Xisco Fauli 
CommitDate: Wed Aug 25 15:57:54 2021 +0200

tdf#141097 Revert "Veto process exit while an OLE client is connected"

This reverts changes that were made to prevent process exit when an
OLE client is connected. These commits had the side effect of preventing
the use case of creating a document via OLE, and then allowing
the user to view/edit and ultimately quit from the GUI.

Revert "More hacks for quit requests from an OLE Automation client"

This reverts commit 05e03911cd1f8a355b6410d3997cffc2c794a1e9.

Revert "Veto process exit while an OLE client is connected"

This reverts commit 89f883bd90a50587868a57397b6350ed9559a20f.

Change-Id: I29a1e42a830815bc8d1ff0056c22d86b8f98cc1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118596
(cherry picked from commit 080e4550257a90597c241f83fd766b99c83ba6e8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120877
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/comphelper/source/misc/asyncquithandler.cxx 
b/comphelper/source/misc/asyncquithandler.cxx
index fd53cbd9bf4b..a04534ec92e8 100644
--- a/comphelper/source/misc/asyncquithandler.cxx
+++ b/comphelper/source/misc/asyncquithandler.cxx
@@ -24,10 +24,7 @@
 #include 
 #include 
 
-AsyncQuitHandler::AsyncQuitHandler()
-: mbForceQuit(false)
-{
-}
+AsyncQuitHandler::AsyncQuitHandler() {}
 
 AsyncQuitHandler& AsyncQuitHandler::instance()
 {
@@ -42,10 +39,6 @@ void AsyncQuitHandler::QuitApplication()
 xDesktop->terminate();
 }
 
-void AsyncQuitHandler::SetForceQuit() { mbForceQuit = true; }
-
-bool AsyncQuitHandler::IsForceQuit() const { return mbForceQuit; }
-
 IMPL_STATIC_LINK_NOARG(AsyncQuitHandler, OnAsyncQuit, void*, void) { 
QuitApplication(); }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/Library_oleautobridge.mk 
b/extensions/Library_oleautobridge.mk
index 6aafe250..ec59f715c504 100644
--- a/extensions/Library_oleautobridge.mk
+++ b/extensions/Library_oleautobridge.mk
@@ -35,7 +35,6 @@ $(eval $(call gb_Library_use_libraries,oleautobridge,\
cppuhelper \
cppu \
sal \
-   tl \
 ))
 
 $(eval $(call gb_Library_use_system_win32_libs,oleautobridge,\
diff --git a/extensions/source/ole/unoobjw.cxx 
b/extensions/source/ole/unoobjw.cxx
index 2d935f8d9583..c7af25b06715 100644
--- a/extensions/source/ole/unoobjw.cxx
+++ b/extensions/source/ole/unoobjw.cxx
@@ -57,13 +57,9 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
@@ -86,7 +82,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -117,64 +112,6 @@ static bool writeBackOutParameter(VARIANTARG* pDest, 
VARIANT* pSource);
 static bool writeBackOutParameter2( VARIANTARG* pDest, VARIANT* pSource);
 static HRESULT mapCannotConvertException(const CannotConvertException , 
unsigned int * puArgErr);
 
-namespace {
-
-class TerminationVetoer : public WeakImplHelper
-{
-public:
-int mnCount;
-
-private:
-TerminationVetoer()
-: mnCount(0)
-{
-try
-{
-Reference< css::frame::XDesktop > xDesktop =
-css::frame::Desktop::create( 
comphelper::getProcessComponentContext() );
-xDesktop->addTerminateListener( this );
-}
-catch ( const Exception& )
-{
-DBG_UNHANDLED_EXCEPTION("extensions.olebridge");
-}
-}
-
-public:
-static rtl::Reference< TerminationVetoer > get()
-{
-static rtl::Reference< TerminationVetoer > aInstance( new 
TerminationVetoer );
-
-return aInstance;
-}
-
-// XTerminateListener
-void SAL_CALL queryTermination( const EventObject& ) override
-{
-SAL_INFO("extensions.olebridge", "TerminationVetoer::queryTermination: 
count=" << mnCount);
-// Always veto termination while an OLE object is active, except if it 
is an OLE object that
-// has asked us to quit.
-if (!AsyncQuitHandler::instance().IsForceQuit() && mnCount > 0)
-{
-SAL_INFO("extensions.olebridge", 
"TerminationVetoer::queryTermination: Throwing!");
-throw css::frame::TerminationVetoException();
-}
-}
-
-void SAL_CALL notifyTermination( const EventObject& ) override
-{
-// ???
-}
-
-// XEventListener
-void SAL_CALL disposing( const 

[Libreoffice-commits] core.git: comphelper/source extensions/Library_oleautobridge.mk extensions/source include/comphelper vbahelper/source

2021-08-20 Thread Michael Warner (via logerrit)
 comphelper/source/misc/asyncquithandler.cxx   |9 --
 extensions/Library_oleautobridge.mk   |1 
 extensions/source/ole/unoobjw.cxx |   68 --
 include/comphelper/asyncquithandler.hxx   |8 --
 vbahelper/source/vbahelper/vbaapplicationbase.cxx |4 -
 5 files changed, 1 insertion(+), 89 deletions(-)

New commits:
commit 080e4550257a90597c241f83fd766b99c83ba6e8
Author: Michael Warner 
AuthorDate: Wed Jul 7 21:12:28 2021 -0400
Commit: Julien Nabet 
CommitDate: Fri Aug 20 11:43:06 2021 +0200

tdf#141097 Revert "Veto process exit while an OLE client is connected"

This reverts changes that were made to prevent process exit when an
OLE client is connected. These commits had the side effect of preventing
the use case of creating a document via OLE, and then allowing
the user to view/edit and ultimately quit from the GUI.

Revert "More hacks for quit requests from an OLE Automation client"

This reverts commit 05e03911cd1f8a355b6410d3997cffc2c794a1e9.

Revert "Veto process exit while an OLE client is connected"

This reverts commit 89f883bd90a50587868a57397b6350ed9559a20f.

Change-Id: I29a1e42a830815bc8d1ff0056c22d86b8f98cc1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118596
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/comphelper/source/misc/asyncquithandler.cxx 
b/comphelper/source/misc/asyncquithandler.cxx
index fd53cbd9bf4b..a04534ec92e8 100644
--- a/comphelper/source/misc/asyncquithandler.cxx
+++ b/comphelper/source/misc/asyncquithandler.cxx
@@ -24,10 +24,7 @@
 #include 
 #include 
 
-AsyncQuitHandler::AsyncQuitHandler()
-: mbForceQuit(false)
-{
-}
+AsyncQuitHandler::AsyncQuitHandler() {}
 
 AsyncQuitHandler& AsyncQuitHandler::instance()
 {
@@ -42,10 +39,6 @@ void AsyncQuitHandler::QuitApplication()
 xDesktop->terminate();
 }
 
-void AsyncQuitHandler::SetForceQuit() { mbForceQuit = true; }
-
-bool AsyncQuitHandler::IsForceQuit() const { return mbForceQuit; }
-
 IMPL_STATIC_LINK_NOARG(AsyncQuitHandler, OnAsyncQuit, void*, void) { 
QuitApplication(); }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/Library_oleautobridge.mk 
b/extensions/Library_oleautobridge.mk
index 6aafe250..ec59f715c504 100644
--- a/extensions/Library_oleautobridge.mk
+++ b/extensions/Library_oleautobridge.mk
@@ -35,7 +35,6 @@ $(eval $(call gb_Library_use_libraries,oleautobridge,\
cppuhelper \
cppu \
sal \
-   tl \
 ))
 
 $(eval $(call gb_Library_use_system_win32_libs,oleautobridge,\
diff --git a/extensions/source/ole/unoobjw.cxx 
b/extensions/source/ole/unoobjw.cxx
index 595d4276e3c4..a6cd0677d6ae 100644
--- a/extensions/source/ole/unoobjw.cxx
+++ b/extensions/source/ole/unoobjw.cxx
@@ -57,13 +57,9 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
@@ -86,7 +82,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -117,64 +112,6 @@ static bool writeBackOutParameter(VARIANTARG* pDest, 
VARIANT* pSource);
 static bool writeBackOutParameter2( VARIANTARG* pDest, VARIANT* pSource);
 static HRESULT mapCannotConvertException(const CannotConvertException , 
unsigned int * puArgErr);
 
-namespace {
-
-class TerminationVetoer : public WeakImplHelper
-{
-public:
-int mnCount;
-
-private:
-TerminationVetoer()
-: mnCount(0)
-{
-try
-{
-Reference< css::frame::XDesktop > xDesktop =
-css::frame::Desktop::create( 
comphelper::getProcessComponentContext() );
-xDesktop->addTerminateListener( this );
-}
-catch ( const Exception& )
-{
-DBG_UNHANDLED_EXCEPTION("extensions.olebridge");
-}
-}
-
-public:
-static rtl::Reference< TerminationVetoer > get()
-{
-static rtl::Reference< TerminationVetoer > aInstance( new 
TerminationVetoer );
-
-return aInstance;
-}
-
-// XTerminateListener
-void SAL_CALL queryTermination( const EventObject& ) override
-{
-SAL_INFO("extensions.olebridge", "TerminationVetoer::queryTermination: 
count=" << mnCount);
-// Always veto termination while an OLE object is active, except if it 
is an OLE object that
-// has asked us to quit.
-if (!AsyncQuitHandler::instance().IsForceQuit() && mnCount > 0)
-{
-SAL_INFO("extensions.olebridge", 
"TerminationVetoer::queryTermination: Throwing!");
-throw css::frame::TerminationVetoException();
-}
-}
-
-void SAL_CALL notifyTermination( const EventObject& ) override
-{
-// ???
-}
-
-// XEventListener
-void SAL_CALL disposing( const css::lang::EventObject& ) override
-{
-// ???
-}
-};
-
-}
-
 /* Does not throw any exceptions.
Param pInfo can be NULL.

[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - download.lst external/poppler Makefile.fetch readlicense_oo/license RepositoryExternal.mk sdext/Executable_xpdfimport.mk sdext/source solenv/

2021-06-23 Thread Michael Warner (via logerrit)
 Makefile.fetch |1 
 RepositoryExternal.mk  |2 
 download.lst   |2 
 external/poppler/ExternalPackage_poppler_data.mk   |  297 +
 external/poppler/Module_poppler.mk |2 
 external/poppler/UnpackedTarball_poppler_data.mk   |   13 
 readlicense_oo/license/license.xml |   33 ++
 sdext/Executable_xpdfimport.mk |7 
 sdext/source/pdfimport/test/testTdf141709.pdf  |binary
 sdext/source/pdfimport/test/tests.cxx  |   29 ++
 sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx |   23 +
 solenv/flatpak-manifest.in |7 
 12 files changed, 413 insertions(+), 3 deletions(-)

New commits:
commit 98be6ca36a6e509303b69514d85471032d0dffce
Author: Michael Warner 
AuthorDate: Tue May 11 09:22:27 2021 -0400
Commit: Michael Stahl 
CommitDate: Wed Jun 23 13:08:29 2021 +0200

tdf#141709: Use poppler_data

Bundle the files from poppler_data and provide the path to them to
poppler when the bundled poppler library is used.

Change-Id: I13a2ef861303a0be17aa0a861ef8ac96ed8a93be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117523
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 648e4106cc002ff5b8184a8c104f93cb06e4b540)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117714

diff --git a/Makefile.fetch b/Makefile.fetch
index 550a9603c6bd..3c5b7ed1ee01 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -203,6 +203,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk 
$(SRCDIR)/download.lst $(S
$(call fetch_Optional,PAGEMAKER,PAGEMAKER_TARBALL) \
$(call fetch_Optional,PDFIUM,PDFIUM_TARBALL) \
$(call fetch_Optional,POPPLER,POPPLER_TARBALL) \
+   $(call fetch_Optional,POPPLER,POPPLER_DATA_TARBALL) \
$(call fetch_Optional,POSTGRESQL,POSTGRESQL_TARBALL) \
$(call fetch_Optional,PYTHON,PYTHON_TARBALL) \
$(call fetch_Optional,QXP,QXP_TARBALL) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 36c74ee95985..e79c9393828b 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -2808,7 +2808,7 @@ else # !SYSTEM_POPPLER
 
 define gb_LinkTarget__use_poppler
 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
-
+$(call gb_LinkTarget_use_package,$(1),poppler_data)
 $(call gb_LinkTarget_set_include,$(1),\
-I$(call gb_UnpackedTarball_get_dir,poppler) \
-I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
diff --git a/download.lst b/download.lst
index 3352c6fbc3c7..503c666b1ce6 100644
--- a/download.lst
+++ b/download.lst
@@ -216,6 +216,8 @@ export LIBPNG_SHA256SUM := 
505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201f
 export LIBPNG_TARBALL := libpng-1.6.37.tar.xz
 export POPPLER_SHA256SUM := 
016dde34e5f868ea98a32ca99b643325a9682281500942b7113f4ec88d20e2f3
 export POPPLER_TARBALL := poppler-21.01.0.tar.xz
+export POPPLER_DATA_SHA256SUM := 
6e2fcef66ec8c44625f94292ccf8af9f1d918b410d5aa69c274ce67387967b30
+export POPPLER_DATA_TARBALL := poppler-data-0.4.10.tar.gz
 export POSTGRESQL_SHA256SUM := 
12345c83b89aa29808568977f5200d6da00f88a035517f925293355432ffe61f
 export POSTGRESQL_TARBALL := postgresql-13.1.tar.bz2
 export PYTHON_SHA256SUM := 
bd746ed1ad9ccfa9b2a8d13736a5c452025c3600913d78e6ed1df3d767b6
diff --git a/external/poppler/ExternalPackage_poppler_data.mk 
b/external/poppler/ExternalPackage_poppler_data.mk
new file mode 100644
index ..78024d3fec8b
--- /dev/null
+++ b/external/poppler/ExternalPackage_poppler_data.mk
@@ -0,0 +1,297 @@
+# -*- 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_ExternalPackage_ExternalPackage,poppler_data,poppler_data))
+
+poppler_unicode-map-files = \
+   unicodeMap/Big5 \
+   unicodeMap/Big5ascii\
+   unicodeMap/EUC-CN   \
+   unicodeMap/EUC-JP   \
+   unicodeMap/GBK  \
+   unicodeMap/ISO-2022-CN  \
+   unicodeMap/ISO-2022-JP  \
+   unicodeMap/ISO-2022-KR  \
+   unicodeMap/ISO-8859-6   \
+   unicodeMap/ISO-8859-7   \
+   unicodeMap/ISO-8859-8   \
+   unicodeMap/ISO-8859-9   \
+   unicodeMap/KOI8-R   \
+   unicodeMap/Latin2   \
+   unicodeMap/Shift-JIS\
+   unicodeMap/TIS-620  \
+   unicodeMap/Windows-1255
+
+
+poppler_cmap-files =\
+   cMap/Adobe-CNS1/Adobe-CNS1-0\
+   cMap/Adobe-CNS1/Adobe-CNS1-1

[Libreoffice-commits] core.git: download.lst external/poppler Makefile.fetch readlicense_oo/license RepositoryExternal.mk sdext/Executable_xpdfimport.mk sdext/source solenv/flatpak-manifest.in

2021-06-23 Thread Michael Warner (via logerrit)
 Makefile.fetch |1 
 RepositoryExternal.mk  |2 
 download.lst   |2 
 external/poppler/ExternalPackage_poppler_data.mk   |  297 +
 external/poppler/Module_poppler.mk |2 
 external/poppler/UnpackedTarball_poppler_data.mk   |   13 
 readlicense_oo/license/license.xml |   33 ++
 sdext/Executable_xpdfimport.mk |7 
 sdext/source/pdfimport/test/testTdf141709.pdf  |binary
 sdext/source/pdfimport/test/tests.cxx  |   29 ++
 sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx |   23 +
 solenv/flatpak-manifest.in |7 
 12 files changed, 413 insertions(+), 3 deletions(-)

New commits:
commit 648e4106cc002ff5b8184a8c104f93cb06e4b540
Author: Michael Warner 
AuthorDate: Tue May 11 09:22:27 2021 -0400
Commit: Michael Stahl 
CommitDate: Wed Jun 23 11:21:00 2021 +0200

tdf#141709: Use poppler_data

Bundle the files from poppler_data and provide the path to them to
poppler when the bundled poppler library is used.

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

diff --git a/Makefile.fetch b/Makefile.fetch
index 550a9603c6bd..3c5b7ed1ee01 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -203,6 +203,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk 
$(SRCDIR)/download.lst $(S
$(call fetch_Optional,PAGEMAKER,PAGEMAKER_TARBALL) \
$(call fetch_Optional,PDFIUM,PDFIUM_TARBALL) \
$(call fetch_Optional,POPPLER,POPPLER_TARBALL) \
+   $(call fetch_Optional,POPPLER,POPPLER_DATA_TARBALL) \
$(call fetch_Optional,POSTGRESQL,POSTGRESQL_TARBALL) \
$(call fetch_Optional,PYTHON,PYTHON_TARBALL) \
$(call fetch_Optional,QXP,QXP_TARBALL) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 36c74ee95985..e79c9393828b 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -2808,7 +2808,7 @@ else # !SYSTEM_POPPLER
 
 define gb_LinkTarget__use_poppler
 $(call gb_LinkTarget_use_external_project,$(1),poppler,full)
-
+$(call gb_LinkTarget_use_package,$(1),poppler_data)
 $(call gb_LinkTarget_set_include,$(1),\
-I$(call gb_UnpackedTarball_get_dir,poppler) \
-I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
diff --git a/download.lst b/download.lst
index 3352c6fbc3c7..503c666b1ce6 100644
--- a/download.lst
+++ b/download.lst
@@ -216,6 +216,8 @@ export LIBPNG_SHA256SUM := 
505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201f
 export LIBPNG_TARBALL := libpng-1.6.37.tar.xz
 export POPPLER_SHA256SUM := 
016dde34e5f868ea98a32ca99b643325a9682281500942b7113f4ec88d20e2f3
 export POPPLER_TARBALL := poppler-21.01.0.tar.xz
+export POPPLER_DATA_SHA256SUM := 
6e2fcef66ec8c44625f94292ccf8af9f1d918b410d5aa69c274ce67387967b30
+export POPPLER_DATA_TARBALL := poppler-data-0.4.10.tar.gz
 export POSTGRESQL_SHA256SUM := 
12345c83b89aa29808568977f5200d6da00f88a035517f925293355432ffe61f
 export POSTGRESQL_TARBALL := postgresql-13.1.tar.bz2
 export PYTHON_SHA256SUM := 
bd746ed1ad9ccfa9b2a8d13736a5c452025c3600913d78e6ed1df3d767b6
diff --git a/external/poppler/ExternalPackage_poppler_data.mk 
b/external/poppler/ExternalPackage_poppler_data.mk
new file mode 100644
index ..78024d3fec8b
--- /dev/null
+++ b/external/poppler/ExternalPackage_poppler_data.mk
@@ -0,0 +1,297 @@
+# -*- 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_ExternalPackage_ExternalPackage,poppler_data,poppler_data))
+
+poppler_unicode-map-files = \
+   unicodeMap/Big5 \
+   unicodeMap/Big5ascii\
+   unicodeMap/EUC-CN   \
+   unicodeMap/EUC-JP   \
+   unicodeMap/GBK  \
+   unicodeMap/ISO-2022-CN  \
+   unicodeMap/ISO-2022-JP  \
+   unicodeMap/ISO-2022-KR  \
+   unicodeMap/ISO-8859-6   \
+   unicodeMap/ISO-8859-7   \
+   unicodeMap/ISO-8859-8   \
+   unicodeMap/ISO-8859-9   \
+   unicodeMap/KOI8-R   \
+   unicodeMap/Latin2   \
+   unicodeMap/Shift-JIS\
+   unicodeMap/TIS-620  \
+   unicodeMap/Windows-1255
+
+
+poppler_cmap-files =\
+   cMap/Adobe-CNS1/Adobe-CNS1-0\
+   cMap/Adobe-CNS1/Adobe-CNS1-1\
+   cMap/Adobe-CNS1/Adobe-CNS1-2\
+   cMap/Adobe-CNS1/Adobe-CNS1-3\
+   

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sw/qa writerfilter/Library_writerfilter.mk writerfilter/source

2020-11-09 Thread Michael Warner (via logerrit)
 sw/qa/extras/ooxmlimport/data/tdf123386.docx |binary
 sw/qa/extras/ooxmlimport/data/tdf123389.docx |binary
 sw/qa/extras/ooxmlimport/data/tdf133647.docx |binary
 sw/qa/extras/ooxmlimport/data/tdf133647_unicode.docx |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx |  155 +++
 writerfilter/Library_writerfilter.mk |4 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|   70 
 writerfilter/source/dmapper/DomainMapper_Impl.hxx|3 
 writerfilter/source/dmapper/SettingsTable.cxx|   17 ++
 writerfilter/source/dmapper/SettingsTable.hxx|3 
 10 files changed, 249 insertions(+), 3 deletions(-)

New commits:
commit b4716b277268a4a24b1a83b81b0255b852072c6a
Author: Michael Warner 
AuthorDate: Fri Jul 3 10:18:33 2020 -0400
Commit: Miklos Vajna 
CommitDate: Mon Nov 9 16:02:50 2020 +0100

tdf133647 tdf123386 tdf123389 Improved .docx table formula import

Converts table formula syntax from MS Word to LibreOffice.
This version uses the list separator of the document for the
formula regexen; however, it does not convert the decimal or
list separators in the case where the person opening the document
is using a different locale from the author.

(cherry picked from commit 68e74bdf63e992666016c790e8e4cfd5b28d6abe)

Conflicts:
writerfilter/source/dmapper/DomainMapper_Impl.cxx
writerfilter/source/dmapper/SettingsTable.cxx

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

diff --git a/sw/qa/extras/ooxmlimport/data/tdf123386.docx 
b/sw/qa/extras/ooxmlimport/data/tdf123386.docx
new file mode 100644
index ..1278068ddedf
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf123386.docx differ
diff --git a/sw/qa/extras/ooxmlimport/data/tdf123389.docx 
b/sw/qa/extras/ooxmlimport/data/tdf123389.docx
new file mode 100644
index ..4245464b820d
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf123389.docx differ
diff --git a/sw/qa/extras/ooxmlimport/data/tdf133647.docx 
b/sw/qa/extras/ooxmlimport/data/tdf133647.docx
new file mode 100644
index ..fb525446c7fc
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf133647.docx differ
diff --git a/sw/qa/extras/ooxmlimport/data/tdf133647_unicode.docx 
b/sw/qa/extras/ooxmlimport/data/tdf133647_unicode.docx
new file mode 100644
index ..d5749f89de53
Binary files /dev/null and 
b/sw/qa/extras/ooxmlimport/data/tdf133647_unicode.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 4b2c4cc814bf..24a8a21263a2 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -746,6 +746,161 @@ DECLARE_OOXMLIMPORT_TEST(testTdf105975formula, 
"tdf105975.docx")
 CPPUNIT_ASSERT_EQUAL(OUString("25"), 
xEnumerationAccess->getPresentation(false).trim());
 }
 
+DECLARE_OOXMLIMPORT_TEST(testTdf133647, "tdf133647.docx")
+{
+/* Tests that argument lists, cell references, and cell ranges are 
translated correctly
+ * when importing table formulae from MS Word */
+uno::Reference xTextFieldsSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xFieldsAccess(xTextFieldsSupplier->getTextFields());
+uno::Reference 
xFields(xFieldsAccess->createEnumeration());
+
+if( !xFields->hasMoreElements() ) {
+CPPUNIT_ASSERT(false);
+return;
+}
+
+uno::Reference 
xEnumerationAccess1(xFields->nextElement(), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("SUM(1|2|3)"), 
xEnumerationAccess1->getPresentation(true).trim());
+CPPUNIT_ASSERT_EQUAL(OUString("6"), 
xEnumerationAccess1->getPresentation(false).trim());
+
+uno::Reference 
xEnumerationAccess2(xFields->nextElement(), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("sum(|)"), 
xEnumerationAccess2->getPresentation(true).trim());
+CPPUNIT_ASSERT_EQUAL(OUString("3"), 
xEnumerationAccess2->getPresentation(false).trim());
+
+uno::Reference 
xEnumerationAccess3(xFields->nextElement(), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("(SUM(|5)*(2+7))*(3+SUM(1|))"), 
xEnumerationAccess3->getPresentation(true).trim());
+CPPUNIT_ASSERT_EQUAL(OUString("432"), 
xEnumerationAccess3->getPresentation(false).trim());
+
+uno::Reference 
xEnumerationAccess4(xFields->nextElement(), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("1+(SUM(1|2))"), 
xEnumerationAccess4->getPresentation(true).trim());
+CPPUNIT_ASSERT_EQUAL(OUString("4"), 
xEnumerationAccess4->getPresentation(false).trim());
+
+uno::Reference 
xEnumerationAccess5(xFields->nextElement(), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("3*(2+SUM()+7)"), 
xEnumerationAccess5->getPresentation(true).trim());
+

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

2020-08-31 Thread Michael Warner (via logerrit)
 sw/qa/extras/ooxmlimport/data/tdf123386.docx |binary
 sw/qa/extras/ooxmlimport/data/tdf123389.docx |binary
 sw/qa/extras/ooxmlimport/data/tdf133647.docx |binary
 sw/qa/extras/ooxmlimport/data/tdf133647_unicode.docx |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx |  155 +++
 writerfilter/Library_writerfilter.mk |4 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|   71 
 writerfilter/source/dmapper/DomainMapper_Impl.hxx|3 
 writerfilter/source/dmapper/SettingsTable.cxx|   17 ++
 writerfilter/source/dmapper/SettingsTable.hxx|3 
 10 files changed, 250 insertions(+), 3 deletions(-)

New commits:
commit a8dbdf4c41d0299aee6e155323f217e2fa1565c9
Author: Michael Warner 
AuthorDate: Fri Jul 3 10:18:33 2020 -0400
Commit: Xisco Fauli 
CommitDate: Mon Aug 31 19:32:31 2020 +0200

tdf133647 tdf123386 tdf123389 Improved .docx table formula import

Converts table formula syntax from MS Word to LibreOffice.
This version uses the list separator of the document for the
formula regexen; however, it does not convert the decimal or
list separators in the case where the person opening the document
is using a different locale from the author.

Change-Id: I9600a0bea060a76705a7ad6b051ed4fdd50b9d40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98614
Tested-by: Jenkins
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit 68e74bdf63e992666016c790e8e4cfd5b28d6abe)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101676
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/extras/ooxmlimport/data/tdf123386.docx 
b/sw/qa/extras/ooxmlimport/data/tdf123386.docx
new file mode 100644
index ..1278068ddedf
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf123386.docx differ
diff --git a/sw/qa/extras/ooxmlimport/data/tdf123389.docx 
b/sw/qa/extras/ooxmlimport/data/tdf123389.docx
new file mode 100644
index ..4245464b820d
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf123389.docx differ
diff --git a/sw/qa/extras/ooxmlimport/data/tdf133647.docx 
b/sw/qa/extras/ooxmlimport/data/tdf133647.docx
new file mode 100644
index ..fb525446c7fc
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf133647.docx differ
diff --git a/sw/qa/extras/ooxmlimport/data/tdf133647_unicode.docx 
b/sw/qa/extras/ooxmlimport/data/tdf133647_unicode.docx
new file mode 100644
index ..d5749f89de53
Binary files /dev/null and 
b/sw/qa/extras/ooxmlimport/data/tdf133647_unicode.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 343c08a94d89..fb71f67fe794 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -748,6 +748,161 @@ DECLARE_OOXMLIMPORT_TEST(testTdf105975formula, 
"tdf105975.docx")
 CPPUNIT_ASSERT_EQUAL(OUString("25"), 
xEnumerationAccess->getPresentation(false).trim());
 }
 
+DECLARE_OOXMLIMPORT_TEST(testTdf133647, "tdf133647.docx")
+{
+/* Tests that argument lists, cell references, and cell ranges are 
translated correctly
+ * when importing table formulae from MS Word */
+uno::Reference xTextFieldsSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xFieldsAccess(xTextFieldsSupplier->getTextFields());
+uno::Reference 
xFields(xFieldsAccess->createEnumeration());
+
+if( !xFields->hasMoreElements() ) {
+CPPUNIT_ASSERT(false);
+return;
+}
+
+uno::Reference 
xEnumerationAccess1(xFields->nextElement(), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("SUM(1|2|3)"), 
xEnumerationAccess1->getPresentation(true).trim());
+CPPUNIT_ASSERT_EQUAL(OUString("6"), 
xEnumerationAccess1->getPresentation(false).trim());
+
+uno::Reference 
xEnumerationAccess2(xFields->nextElement(), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("sum(|)"), 
xEnumerationAccess2->getPresentation(true).trim());
+CPPUNIT_ASSERT_EQUAL(OUString("3"), 
xEnumerationAccess2->getPresentation(false).trim());
+
+uno::Reference 
xEnumerationAccess3(xFields->nextElement(), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("(SUM(|5)*(2+7))*(3+SUM(1|))"), 
xEnumerationAccess3->getPresentation(true).trim());
+CPPUNIT_ASSERT_EQUAL(OUString("432"), 
xEnumerationAccess3->getPresentation(false).trim());
+
+uno::Reference 
xEnumerationAccess4(xFields->nextElement(), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("1+(SUM(1|2))"), 
xEnumerationAccess4->getPresentation(true).trim());
+CPPUNIT_ASSERT_EQUAL(OUString("4"), 
xEnumerationAccess4->getPresentation(false).trim());
+
+uno::Reference 
xEnumerationAccess5(xFields->nextElement(), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("3*(2+SUM()+7)"), 
xEnumerationAccess5->getPresentation(true).trim());
+CPPUNIT_ASSERT_EQUAL(OUString("45"), 

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

2020-08-17 Thread Michael Warner (via logerrit)
 sw/qa/extras/ooxmlimport/data/tdf123386.docx |binary
 sw/qa/extras/ooxmlimport/data/tdf123389.docx |binary
 sw/qa/extras/ooxmlimport/data/tdf133647.docx |binary
 sw/qa/extras/ooxmlimport/data/tdf133647_unicode.docx |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx |  155 +++
 writerfilter/Library_writerfilter.mk |4 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|   71 
 writerfilter/source/dmapper/DomainMapper_Impl.hxx|3 
 writerfilter/source/dmapper/SettingsTable.cxx|   17 ++
 writerfilter/source/dmapper/SettingsTable.hxx|3 
 10 files changed, 250 insertions(+), 3 deletions(-)

New commits:
commit 68e74bdf63e992666016c790e8e4cfd5b28d6abe
Author: Michael Warner 
AuthorDate: Fri Jul 3 10:18:33 2020 -0400
Commit: László Németh 
CommitDate: Mon Aug 17 11:15:25 2020 +0200

tdf133647 tdf123386 tdf123389 Improved .docx table formula import

Converts table formula syntax from MS Word to LibreOffice.
This version uses the list separator of the document for the
formula regexen; however, it does not convert the decimal or
list separators in the case where the person opening the document
is using a different locale from the author.

Change-Id: I9600a0bea060a76705a7ad6b051ed4fdd50b9d40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98614
Tested-by: Jenkins
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/sw/qa/extras/ooxmlimport/data/tdf123386.docx 
b/sw/qa/extras/ooxmlimport/data/tdf123386.docx
new file mode 100644
index ..1278068ddedf
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf123386.docx differ
diff --git a/sw/qa/extras/ooxmlimport/data/tdf123389.docx 
b/sw/qa/extras/ooxmlimport/data/tdf123389.docx
new file mode 100644
index ..4245464b820d
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf123389.docx differ
diff --git a/sw/qa/extras/ooxmlimport/data/tdf133647.docx 
b/sw/qa/extras/ooxmlimport/data/tdf133647.docx
new file mode 100644
index ..fb525446c7fc
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf133647.docx differ
diff --git a/sw/qa/extras/ooxmlimport/data/tdf133647_unicode.docx 
b/sw/qa/extras/ooxmlimport/data/tdf133647_unicode.docx
new file mode 100644
index ..d5749f89de53
Binary files /dev/null and 
b/sw/qa/extras/ooxmlimport/data/tdf133647_unicode.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 1f534cb2fbbf..7079fd8bfd19 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -796,6 +796,161 @@ DECLARE_OOXMLIMPORT_TEST(testTdf105975formula, 
"tdf105975.docx")
 CPPUNIT_ASSERT_EQUAL(OUString("25"), 
xEnumerationAccess->getPresentation(false).trim());
 }
 
+DECLARE_OOXMLIMPORT_TEST(testTdf133647, "tdf133647.docx")
+{
+/* Tests that argument lists, cell references, and cell ranges are 
translated correctly
+ * when importing table formulae from MS Word */
+uno::Reference xTextFieldsSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xFieldsAccess(xTextFieldsSupplier->getTextFields());
+uno::Reference 
xFields(xFieldsAccess->createEnumeration());
+
+if( !xFields->hasMoreElements() ) {
+CPPUNIT_ASSERT(false);
+return;
+}
+
+uno::Reference 
xEnumerationAccess1(xFields->nextElement(), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("SUM(1|2|3)"), 
xEnumerationAccess1->getPresentation(true).trim());
+CPPUNIT_ASSERT_EQUAL(OUString("6"), 
xEnumerationAccess1->getPresentation(false).trim());
+
+uno::Reference 
xEnumerationAccess2(xFields->nextElement(), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("sum(|)"), 
xEnumerationAccess2->getPresentation(true).trim());
+CPPUNIT_ASSERT_EQUAL(OUString("3"), 
xEnumerationAccess2->getPresentation(false).trim());
+
+uno::Reference 
xEnumerationAccess3(xFields->nextElement(), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("(SUM(|5)*(2+7))*(3+SUM(1|))"), 
xEnumerationAccess3->getPresentation(true).trim());
+CPPUNIT_ASSERT_EQUAL(OUString("432"), 
xEnumerationAccess3->getPresentation(false).trim());
+
+uno::Reference 
xEnumerationAccess4(xFields->nextElement(), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("1+(SUM(1|2))"), 
xEnumerationAccess4->getPresentation(true).trim());
+CPPUNIT_ASSERT_EQUAL(OUString("4"), 
xEnumerationAccess4->getPresentation(false).trim());
+
+uno::Reference 
xEnumerationAccess5(xFields->nextElement(), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("3*(2+SUM()+7)"), 
xEnumerationAccess5->getPresentation(true).trim());
+CPPUNIT_ASSERT_EQUAL(OUString("45"), 
xEnumerationAccess5->getPresentation(false).trim());
+
+uno::Reference 
xEnumerationAccess6(xFields->nextElement(), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("(1+2)*SUM(|)"), 

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

2020-06-10 Thread Michael Warner (via logerrit)
 forms/source/component/Date.cxx   |   43 --
 sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx |9 
 svx/source/accessibility/AccessibleGraphicShape.cxx   |   12 
 svx/source/accessibility/AccessibleOLEShape.cxx   |   12 
 svx/source/accessibility/AccessibleShape.cxx  |   45 --
 svx/source/table/accessiblecell.cxx   |   13 
 toolkit/source/controls/tkspinbutton.cxx  |   12 
 toolkit/source/controls/unocontrols.cxx   |  252 --
 8 files changed, 117 insertions(+), 281 deletions(-)

New commits:
commit 8d414f3a8de5c25bcd830b1d4d8a7be3c34a2ed4
Author: Michael Warner 
AuthorDate: Sat May 30 22:18:29 2020 -0400
Commit: Stephan Bergmann 
CommitDate: Wed Jun 10 08:17:31 2020 +0200

tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor

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

diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx
index cca3e06821d7..1d16109ce672 100644
--- a/forms/source/component/Date.cxx
+++ b/forms/source/component/Date.cxx
@@ -55,16 +55,10 @@ Sequence ODateControl::_getTypes()
 return OBoundControl::_getTypes();
 }
 
-
 css::uno::Sequence SAL_CALL ODateControl::getSupportedServiceNames()
 {
-css::uno::Sequence aSupported = 
OBoundControl::getSupportedServiceNames();
-aSupported.realloc(aSupported.getLength() + 2);
-
-OUString*pArray = aSupported.getArray();
-pArray[aSupported.getLength()-1] = FRM_SUN_CONTROL_DATEFIELD;
-pArray[aSupported.getLength()-2] = STARDIV_ONE_FORM_CONTROL_DATEFIELD;
-return aSupported;
+const css::uno::Sequence vals { FRM_SUN_CONTROL_DATEFIELD, 
STARDIV_ONE_FORM_CONTROL_DATEFIELD };
+return 
comphelper::concatSequences(OBoundControl::getSupportedServiceNames(), vals);
 }
 
 
@@ -122,26 +116,19 @@ IMPLEMENT_DEFAULT_CLONING( ODateModel )
 
 css::uno::Sequence SAL_CALL ODateModel::getSupportedServiceNames()
 {
-css::uno::Sequence aSupported = 
OBoundControlModel::getSupportedServiceNames();
-
-sal_Int32 nOldLen = aSupported.getLength();
-aSupported.realloc( nOldLen + 9 );
-OUString* pStoreTo = aSupported.getArray() + nOldLen;
-
-*pStoreTo++ = BINDABLE_CONTROL_MODEL;
-*pStoreTo++ = DATA_AWARE_CONTROL_MODEL;
-*pStoreTo++ = VALIDATABLE_CONTROL_MODEL;
-
-*pStoreTo++ = BINDABLE_DATA_AWARE_CONTROL_MODEL;
-*pStoreTo++ = VALIDATABLE_BINDABLE_CONTROL_MODEL;
-
-*pStoreTo++ = FRM_SUN_COMPONENT_DATEFIELD;
-*pStoreTo++ = FRM_SUN_COMPONENT_DATABASE_DATEFIELD;
-*pStoreTo++ = BINDABLE_DATABASE_DATE_FIELD;
-
-*pStoreTo++ = FRM_COMPONENT_DATEFIELD;
-
-return aSupported;
+const css::uno::Sequence vals {
+   BINDABLE_CONTROL_MODEL,
+   DATA_AWARE_CONTROL_MODEL,
+   VALIDATABLE_CONTROL_MODEL,
+   BINDABLE_DATA_AWARE_CONTROL_MODEL,
+   VALIDATABLE_BINDABLE_CONTROL_MODEL,
+   FRM_SUN_COMPONENT_DATEFIELD,
+   FRM_SUN_COMPONENT_DATABASE_DATEFIELD,
+   BINDABLE_DATABASE_DATE_FIELD,
+   FRM_COMPONENT_DATEFIELD
+};
+
+return 
comphelper::concatSequences(OBoundControlModel::getSupportedServiceNames(), 
vals);
 }
 
 
diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx 
b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
index 6d13f723e14c..c042eac6254f 100644
--- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
+++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
@@ -383,16 +383,11 @@ css::uno::Sequence< OUString> SAL_CALL
 AccessibleDrawDocumentView::getSupportedServiceNames()
 {
 ThrowIfDisposed();
-// Get list of supported service names from base class...
+const css::uno::Sequence vals { 
"com.sun.star.drawing.AccessibleDrawDocumentView" };
 uno::Sequence aServiceNames =
 AccessibleDocumentViewBase::getSupportedServiceNames();
-sal_Int32 nCount (aServiceNames.getLength());
 
-// ...and add additional names.
-aServiceNames.realloc (nCount + 1);
-aServiceNames[nCount] = "com.sun.star.drawing.AccessibleDrawDocumentView";
-
-return aServiceNames;
+return comphelper::concatSequences(aServiceNames, vals);
 }
 
 //=  XInterface  ==
diff --git a/svx/source/accessibility/AccessibleGraphicShape.cxx 
b/svx/source/accessibility/AccessibleGraphicShape.cxx
index 10f4d8b2..c7fe3c6fe40b 100644
--- a/svx/source/accessibility/AccessibleGraphicShape.cxx
+++ b/svx/source/accessibility/AccessibleGraphicShape.cxx
@@ -104,16 +104,8 @@ css::uno::Sequence< OUString> SAL_CALL
 AccessibleGraphicShape::getSupportedServiceNames()
 {
 ThrowIfDisposed ();
-// Get list of supported service names from base class...
-uno::Sequence aServiceNames =
-AccessibleShape::getSupportedServiceNames();
-   

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

2020-05-27 Thread Michael Warner (via logerrit)
 solenv/bin/concat-deps.c |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 2af600f16fa59490f701a6a02e77c6739b5a
Author: Michael Warner 
AuthorDate: Sat May 23 21:49:14 2020 -0400
Commit: Noel Grandin 
CommitDate: Wed May 27 14:48:17 2020 +0200

tdf#11: Added explicit type casts to resolve -fpermissive errors

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

diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c
index 946270998c08..09416f103515 100644
--- a/solenv/bin/concat-deps.c
+++ b/solenv/bin/concat-deps.c
@@ -445,7 +445,7 @@ static struct hash* hash_create(unsigned int size)
 struct hash* hash;
 
 assert(size > 0);
-hash = calloc(1, sizeof(struct hash));
+hash = (struct hash*)(calloc(1, sizeof(struct hash)));
 if(hash)
 {
 size += (size >> 2) + 1; /* ~ 75% load factor */
@@ -495,7 +495,7 @@ static void hash_resize(struct hash* hash)
 {
 return;
 }
-array = calloc(hash->size + 1, sizeof(struct hash_elem*));
+array = (struct hash_elem**)calloc(hash->size + 1, sizeof(struct 
hash_elem*));
 if(array)
 {
 hash->load_limit = hash->size - (hash->size >> 2);
@@ -555,7 +555,7 @@ static int hash_store(struct hash* hash, const char* key, 
int key_len)
 
 if(!hash_elem)
 {
-hash_elem = pool_alloc(hash->elems_pool);
+hash_elem = (struct hash_elem*)pool_alloc(hash->elems_pool);
 if(hash_elem)
 {
 hash_elem->key = key;
@@ -634,7 +634,7 @@ static char* file_load(const char* name, off_t* size, int* 
return_rc)
 fd = open(name, FILE_O_RDONLY | FILE_O_BINARY);
 if (!(fd == -1))
 {
-buffer = malloc((size_t)(*size + 1));
+buffer = (char*)malloc((size_t)(*size + 1));
 #if !ENABLE_RUNTIME_OPTIMIZATIONS
 if (buffer != NULL)
 {
@@ -1143,7 +1143,7 @@ int main(int argc, char** argv)
 if(get_var(_dir, "SRCDIR") || get_var(_dir, "WORKDIR"))
 return 1;
 work_dir_len = strlen(work_dir);
-phony_content_buffer = malloc(PHONY_TARGET_BUFFER);
+phony_content_buffer = (char*)malloc(PHONY_TARGET_BUFFER);
 assert(phony_content_buffer); // Don't handle OOM conditions
 strcpy(phony_content_buffer, work_dir);
 phony_content_buffer[work_dir_len] = '/';
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits