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

2021-11-15 Thread Noel Grandin (via logerrit)
 linguistic/source/convdiclist.cxx |   14 +---
 linguistic/source/gciterator.cxx  |   44 +-
 linguistic/source/gciterator.hxx  |3 --
 linguistic/source/misc.cxx|   15 ++--
 4 files changed, 35 insertions(+), 41 deletions(-)

New commits:
commit 1badef89c0794167b9b84ea44d4a7df5645de8a7
Author: Noel Grandin 
AuthorDate: Sun Nov 14 22:12:55 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 15 09:25:13 2021 +0100

rtl::Static->thread-safe static in linguistic

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

diff --git a/linguistic/source/convdiclist.cxx 
b/linguistic/source/convdiclist.cxx
index 43d75141bc01..54517960f062 100644
--- a/linguistic/source/convdiclist.cxx
+++ b/linguistic/source/convdiclist.cxx
@@ -33,7 +33,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -312,18 +311,17 @@ void ConvDicNameContainer::AddConvDics(
 
 namespace
 {
-struct StaticConvDicList : public rtl::StaticWithInit<
-rtl::Reference, StaticConvDicList> {
-rtl::Reference operator () () {
-return new ConvDicList;
-}
+rtl::Reference& StaticConvDicList()
+{
+static rtl::Reference SINGLETON = new ConvDicList;
+return SINGLETON;
 };
 }
 
 void ConvDicList::MyAppExitListener::AtExit()
 {
 rMyDicList.FlushDics();
-StaticConvDicList::get().clear();
+StaticConvDicList().clear();
 }
 
 ConvDicList::ConvDicList() :
@@ -535,7 +533,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
 linguistic_ConvDicList_get_implementation(
 css::uno::XComponentContext* , css::uno::Sequence const&)
 {
-return cppu::acquire(StaticConvDicList::get().get());
+return cppu::acquire(StaticConvDicList().get());
 }
 
 
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index b915dee3033a..28336c5184a4 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -272,13 +272,19 @@ css::uno::Any SAL_CALL 
LngXStringKeyMap::getValueByIndex(::sal_Int32 nIndex)
 }
 
 
+osl::Mutex& GrammarCheckingIterator::MyMutex()
+{
+static osl::Mutex SINGLETON;
+return SINGLETON;
+}
+
 GrammarCheckingIterator::GrammarCheckingIterator() :
 m_bEnd( false ),
 m_bGCServicesChecked( false ),
 m_nDocIdCounter( 0 ),
 m_thread(nullptr),
-m_aEventListeners( MyMutex::get() ),
-m_aNotifyListeners( MyMutex::get() )
+m_aEventListeners( MyMutex() ),
+m_aNotifyListeners( MyMutex() )
 {
 }
 
@@ -292,7 +298,7 @@ void GrammarCheckingIterator::TerminateThread()
 {
 oslThread t;
 {
-::osl::Guard< ::osl::Mutex > aGuard( MyMutex::get() );
+::osl::Guard< ::osl::Mutex > aGuard( MyMutex() );
 t = m_thread;
 m_thread = nullptr;
 m_bEnd = true;
@@ -307,7 +313,7 @@ void GrammarCheckingIterator::TerminateThread()
 
 sal_Int32 GrammarCheckingIterator::NextDocId()
 {
-::osl::Guard< ::osl::Mutex > aGuard( MyMutex::get() );
+::osl::Guard< ::osl::Mutex > aGuard( MyMutex() );
 m_nDocIdCounter += 1;
 return m_nDocIdCounter;
 }
@@ -359,7 +365,7 @@ void GrammarCheckingIterator::AddEntry(
 aNewFPEntry.m_bAutomatic= bAutomatic;
 
 // add new entry to the end of this queue
-::osl::Guard< ::osl::Mutex > aGuard( MyMutex::get() );
+::osl::Guard< ::osl::Mutex > aGuard( MyMutex() );
 if (!m_thread)
 m_thread = osl_createThread( lcl_workerfunc, this );
 m_aFPEntriesQueue.push_back( aNewFPEntry );
@@ -488,7 +494,7 @@ uno::Reference< linguistic2::XProofreader > 
GrammarCheckingIterator::GetGrammarC
 uno::Reference< linguistic2::XProofreader > xRes;
 
 //  THREAD SAFE START 
-::osl::Guard< ::osl::Mutex > aGuard( MyMutex::get() );
+::osl::Guard< ::osl::Mutex > aGuard( MyMutex() );
 
 // check supported locales for each grammarchecker if not already done
 if (!m_bGCServicesChecked)
@@ -562,7 +568,7 @@ void GrammarCheckingIterator::DequeueAndCheck()
 //  THREAD SAFE START 
 bool bQueueEmpty = false;
 {
-::osl::Guard< ::osl::Mutex > aGuard( MyMutex::get() );
+::osl::Guard< ::osl::Mutex > aGuard( MyMutex() );
 if (m_bEnd)
 {
 break;
@@ -579,7 +585,7 @@ void GrammarCheckingIterator::DequeueAndCheck()
 OUString aCurDocId;
 //  THREAD SAFE START 
 {
-::osl::Guard< ::osl::Mutex > aGuard( MyMutex::get() );
+::osl::Guard< ::osl::Mutex > aGuard( MyMutex() );
 aFPEntryItem= m_aFPEntriesQueue.front();
 xFPIterator = aFPEntryItem.m_xParaIterator;
 xFlatPara   = aFPEntryItem.m_xPara;
@@ -604,7 +610,7 @@ void GrammarCheckingIterator::DequeueAndChec

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

2021-11-15 Thread László Németh (via logerrit)
 sw/qa/extras/uiwriter/data/tdf145091.docx|binary
 sw/qa/extras/uiwriter/uiwriter2.cxx  |   50 
 sw/source/filter/ww8/docxattributeoutput.cxx |   66 +--
 3 files changed, 72 insertions(+), 44 deletions(-)

New commits:
commit dbc2bdffbec9b3f7eba485652cdd43634458b5a6
Author: László Németh 
AuthorDate: Fri Nov 12 12:38:35 2021 +0100
Commit: László Németh 
CommitDate: Mon Nov 15 09:26:00 2021 +0100

tdf#145091 DOCX: don't export obsolete table row change data

Rejection of table deletion or accepting table insertion
imported from a DOCX document kept row changes in DOCX export.
Use SwExtraRedlineTable/SwTableRowRedline data only if it's
not obsolete.

Follow-up of commit 05366b8e6683363688de8708a3d88cf144c7a2bf
"tdf#60382 sw offapi: add change tracking of table/row deletion".

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

diff --git a/sw/qa/extras/uiwriter/data/tdf145091.docx 
b/sw/qa/extras/uiwriter/data/tdf145091.docx
new file mode 100644
index ..f248d5d62605
Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf145091.docx differ
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 7fd1ffb9a546..9666efe9a49e 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -4942,6 +4942,56 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, 
testTdf145089_RedlineTableRowInsertionDOCX
 assertXPath(pXmlDoc, "//page[1]//body/tab/row", 1);
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf145091)
+{
+// load a deleted table, reject them, and delete only its text and export 
to DOCX
+SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf145091.docx");
+
+// turn on red-lining and show changes
+pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | 
RedlineFlags::ShowDelete
+  | 
RedlineFlags::ShowInsert);
+CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+   pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+CPPUNIT_ASSERT_MESSAGE(
+"redlines should be visible",
+
IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+// reject all redlines
+SwEditShell* const pEditShell(pDoc->GetEditShell());
+CPPUNIT_ASSERT_EQUAL(static_cast(3), 
pEditShell->GetRedlineCount());
+while (pEditShell->GetRedlineCount() > 0)
+pEditShell->RejectRedline(0);
+CPPUNIT_ASSERT_EQUAL(static_cast(0), 
pEditShell->GetRedlineCount());
+
+// delete only table text, but not table
+dispatchCommand(mxComponent, ".uno:SelectAll", {});
+dispatchCommand(mxComponent, ".uno:SelectAll", {});
+dispatchCommand(mxComponent, ".uno:Delete", {});
+CPPUNIT_ASSERT(pEditShell->GetRedlineCount() > 0);
+
+// save it to DOCX
+reload("Office Open XML Text", "tdf145091.docx");
+SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
+SwViewShell* pViewShell
+= 
pTextDoc->GetDocShell()->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell();
+pViewShell->Reformat();
+discardDumpedLayout();
+xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+assertXPath(pXmlDoc, "//page[1]//body/tab");
+assertXPath(pXmlDoc, "//page[1]//body/tab/row", 3);
+
+// accept all redlines
+dispatchCommand(mxComponent, ".uno:AcceptAllTrackedChanges", {});
+
+discardDumpedLayout();
+
+pXmlDoc = parseLayoutDump();
+// This was false (deleted table with accepting deletions)
+assertXPath(pXmlDoc, "//page[1]//body/tab");
+assertXPath(pXmlDoc, "//page[1]//body/tab/row", 3);
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf128603)
 {
 // Load the bugdoc, which has 3 textboxes.
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index de61bb748814..4d49f2bf95a8 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4392,7 +4392,28 @@ void DocxAttributeOutput::TableRowRedline( 
ww8::WW8TableNodeInfoInner::Pointer_t
 {
 const SwRedlineTable& aRedlineTable = 
m_rExport.m_rDoc.getIDocumentRedlineAccess().GetRedlineTable();
 const SwRangeRedline* pRedline = aRedlineTable[ nChange ];
-const SwRedlineData& aRedlineData = pRedline->GetRedlineData();
+SwTableRowRedline* pTableRowRedline = nullptr;
+bool bIsInExtra = false;
+
+// use the original DOCX redline data stored in ExtraRedlineTable,
+// if it exists and its type wasn't changed
+const SwExtraRedlineTable& aExtraRedlineTable = 
m_rExport.m_rDoc.getIDocumentRedlineAccess().GetExtraRedlineTable();
+for(sal_uInt16 nCurRedlinePos = 0; nCurRedlinePos < 
aExtraRedline

[Libreoffice-commits] core.git: compilerplugins/clang

2021-11-15 Thread Stephan Bergmann (via logerrit)
 compilerplugins/clang/test/stringconcatauto.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 71ac0dac9a585b4383460c4f34314a6083a87685
Author: Stephan Bergmann 
AuthorDate: Mon Nov 15 08:09:29 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Nov 15 09:53:18 2021 +0100

Adapt CompilerTest_compilerplugins_clang

...to Clang 14 trunk


"[clang] retain type sugar in auto / template argument deduction"

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

diff --git a/compilerplugins/clang/test/stringconcatauto.cxx 
b/compilerplugins/clang/test/stringconcatauto.cxx
index 8318e3c4a26f..dc450503d25e 100644
--- a/compilerplugins/clang/test/stringconcatauto.cxx
+++ b/compilerplugins/clang/test/stringconcatauto.cxx
@@ -14,17 +14,17 @@
 void foo()
 {
 auto str1 = "str1" + OUString::number(10);
-// expected-error-re@-1 {{creating a variable of type 
'rtl::OUStringConcat<{{.*}}>' will make it reference temporaries}}
+// expected-error-re@-1 {{creating a variable of type {{.+}} will make it 
reference temporaries}}
 // expected-note@-2 {{use OUString instead}}
 OUString str2 = "str2" + OUString::number(20) + "ing";
 const auto& str3 = "str3" + OUString::number(30);
-// expected-error-re@-1 {{creating a variable of type 'const 
rtl::OUStringConcat<{{.*}}> &' will make it reference temporaries}}
+// expected-error-re@-1 {{creating a variable of type {{.+}} will make it 
reference temporaries}}
 // expected-note@-2 {{use OUString instead}}
 const auto str4 = "str4" + OString::number(40);
-// expected-error-re@-1 {{creating a variable of type 'const 
rtl::OStringConcat<{{.*}}>' will make it reference temporaries}}
+// expected-error-re@-1 {{creating a variable of type {{.+}} will make it 
reference temporaries}}
 // expected-note@-2 {{use OString instead}}
 auto str5 = OUString::number(50);
-// expected-error-re@-1 {{creating a variable of type 
'rtl::OUStringNumber<{{.*}}>' will make it reference temporaries}}
+// expected-error-re@-1 {{creating a variable of type 
'{{(rtl::)?}}OUStringNumber<{{.*}}>' will make it reference temporaries}}
 // expected-note@-2 {{use OUString instead}}
 (void)str1;
 (void)str2;
@@ -36,13 +36,13 @@ void foo()
 struct A
 {
 auto bar()
-// expected-error-re@-1 {{returning a variable of type 
'rtl::OStringConcat<{{.*}}>' will make it reference temporaries}}
+// expected-error-re@-1 {{returning a variable of type {{.+}} will make it 
reference temporaries}}
 // expected-note@-2 {{use OString instead}}
 {
 return "bar" + OString::number(110);
 }
 auto baz()
-// expected-error-re@-1 {{returning a variable of type 
'rtl::OStringNumber<{{.*}}>' will make it reference temporaries}}
+// expected-error-re@-1 {{returning a variable of type 
'{{(rtl::)?}}OStringNumber<{{.*}}>' will make it reference temporaries}}
 // expected-note@-2 {{use OString instead}}
 {
 return OString::number(120);


Re: Test failed `TestBreakIterator::testLao` with icu 70

2021-11-15 Thread Caolán McNamara
On Sat, 2021-11-13 at 19:56 +, oxalica wrote:
> Hello,
> 
> I'm on NixOS and we recently updated a libreoffice dependency `icu`
> to 70.
...
> > /build/libreoffice-
> > 7.2.2.2/i18npool/qa/cppunit/test_breakiterator.cxx:865:TestBreakIte
> > rator::testLao
> > equality assertion failed
> > - Expected: 9
> > - Actual  : 12
> 
> I can confirm that downgrading `icu` back to 69.0 fixes the test 
> failure. But I'm not sure what is this test doing and I cannot read
> Lao.

The test is querying where the words in a Lao sentence are considered
to start and end. Lao, like Thai and a few others, don't typically use
spaces between words which makes figuring that out trickier than for
other languages.

> Does the test need updating, or there it's an issue of the new `icu`
> 70.0?

I have no idea, but its one or the other :-). If you disable/comment-
out the test and carry on, the outcome is that there will be a
difference in where a paragraph breaks when it word wraps from icu69 to
icu70 for Lao text.



[Libreoffice-commits] core.git: vcl/Executable_fftester.mk vcl/Executable_icontest.mk vcl/Executable_lo_kde5filepicker.mk vcl/Executable_mtfdemo.mk vcl/Executable_svdemo.mk vcl/Executable_svpclient.mk

2021-11-15 Thread Hossein (via logerrit)
 vcl/Executable_fftester.mk  |2 --
 vcl/Executable_icontest.mk  |4 
 vcl/Executable_lo_kde5filepicker.mk |1 -
 vcl/Executable_mtfdemo.mk   |2 --
 vcl/Executable_svdemo.mk|2 --
 vcl/Executable_svpclient.mk |2 --
 vcl/Executable_svptest.mk   |2 --
 vcl/Executable_ui-previewer.mk  |2 --
 vcl/Executable_vcldemo.mk   |5 -
 vcl/Executable_visualbackendtest.mk |2 --
 vcl/workben/icontest.cxx|2 --
 11 files changed, 26 deletions(-)

New commits:
commit 3780e283f47159b078f332604a3914efcc2a73e8
Author: Hossein 
AuthorDate: Sun Nov 14 22:19:06 2021 +0100
Commit: Mike Kaganski 
CommitDate: Mon Nov 15 10:03:11 2021 +0100

Remove unused header path: vcl workben makefiles

Removed boost and other unused header paths from vcl workbench
makefiles.

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

diff --git a/vcl/Executable_fftester.mk b/vcl/Executable_fftester.mk
index 0eaa4e39c3c2..0c3ff92be3a7 100644
--- a/vcl/Executable_fftester.mk
+++ b/vcl/Executable_fftester.mk
@@ -15,8 +15,6 @@ $(eval $(call gb_Executable_use_api,fftester,\
 udkapi \
 ))
 
-$(eval $(call gb_Executable_use_external,fftester,boost_headers))
-
 $(eval $(call gb_Executable_set_include,fftester,\
 $$(INCLUDE) \
 -I$(SRCDIR)/vcl/inc \
diff --git a/vcl/Executable_icontest.mk b/vcl/Executable_icontest.mk
index 6fb4a4648614..630198237907 100644
--- a/vcl/Executable_icontest.mk
+++ b/vcl/Executable_icontest.mk
@@ -9,10 +9,6 @@
 
 $(eval $(call gb_Executable_Executable,icontest))
 
-$(eval $(call gb_Executable_use_externals,icontest,\
-boost_headers \
-   glm_headers \
-))
 ifeq ($(DISABLE_GUI),)
 $(eval $(call gb_Executable_use_externals,icontest,\
 epoxy \
diff --git a/vcl/Executable_lo_kde5filepicker.mk 
b/vcl/Executable_lo_kde5filepicker.mk
index 27fd77e45901..1e7d48b0a5e2 100644
--- a/vcl/Executable_lo_kde5filepicker.mk
+++ b/vcl/Executable_lo_kde5filepicker.mk
@@ -63,7 +63,6 @@ $(eval $(call gb_Executable_use_libraries,lo_kde5filepicker,\
 ))
 
 $(eval $(call gb_Executable_use_externals,lo_kde5filepicker,\
-   boost_headers \
epoxy \
qt5 \
kf5 \
diff --git a/vcl/Executable_mtfdemo.mk b/vcl/Executable_mtfdemo.mk
index a4d4d9354b20..92a37af1858f 100644
--- a/vcl/Executable_mtfdemo.mk
+++ b/vcl/Executable_mtfdemo.mk
@@ -15,8 +15,6 @@ $(eval $(call gb_Executable_use_api,mtfdemo,\
 udkapi \
 ))
 
-$(eval $(call gb_Executable_use_external,mtfdemo,boost_headers))
-
 $(eval $(call gb_Executable_set_include,mtfdemo,\
 $$(INCLUDE) \
 -I$(SRCDIR)/vcl/inc \
diff --git a/vcl/Executable_svdemo.mk b/vcl/Executable_svdemo.mk
index 0a958a286691..00083247b934 100644
--- a/vcl/Executable_svdemo.mk
+++ b/vcl/Executable_svdemo.mk
@@ -15,8 +15,6 @@ $(eval $(call gb_Executable_use_api,svdemo,\
 udkapi \
 ))
 
-$(eval $(call gb_Executable_use_external,svdemo,boost_headers))
-
 $(eval $(call gb_Executable_set_include,svdemo,\
 $$(INCLUDE) \
 -I$(SRCDIR)/vcl/inc \
diff --git a/vcl/Executable_svpclient.mk b/vcl/Executable_svpclient.mk
index 3861cd16e5fa..eb20033fe7a0 100644
--- a/vcl/Executable_svpclient.mk
+++ b/vcl/Executable_svpclient.mk
@@ -15,8 +15,6 @@ $(eval $(call gb_Executable_use_api,svpclient,\
 udkapi \
 ))
 
-$(eval $(call gb_Executable_use_external,svpclient,boost_headers))
-
 $(eval $(call gb_Executable_set_include,svpclient,\
 $$(INCLUDE) \
 -I$(SRCDIR)/vcl/inc \
diff --git a/vcl/Executable_svptest.mk b/vcl/Executable_svptest.mk
index c373aa66f717..8651a27ac74d 100644
--- a/vcl/Executable_svptest.mk
+++ b/vcl/Executable_svptest.mk
@@ -15,8 +15,6 @@ $(eval $(call gb_Executable_use_api,svptest,\
 udkapi \
 ))
 
-$(eval $(call gb_Executable_use_external,svptest,boost_headers))
-
 $(eval $(call gb_Executable_set_include,svptest,\
 $$(INCLUDE) \
 -I$(SRCDIR)/vcl/inc \
diff --git a/vcl/Executable_ui-previewer.mk b/vcl/Executable_ui-previewer.mk
index 6cabf4f6710b..a028f8ea014b 100644
--- a/vcl/Executable_ui-previewer.mk
+++ b/vcl/Executable_ui-previewer.mk
@@ -9,8 +9,6 @@
 
 $(eval $(call gb_Executable_Executable,ui-previewer))
 
-$(eval $(call gb_Executable_use_external,ui-previewer,boost_headers))
-
 $(eval $(call gb_Executable_use_api,ui-previewer,\
 offapi \
 udkapi \
diff --git a/vcl/Executable_vcldemo.mk b/vcl/Executable_vcldemo.mk
index b4701dc7c0a6..19b7ee655af9 100644
--- a/vcl/Executable_vcldemo.mk
+++ b/vcl/Executable_vcldemo.mk
@@ -15,11 +15,6 @@ $(eval $(call gb_Executable_use_api,vcldemo,\
 udkapi \
 ))
 
-$(eval $(call gb_Executable_use_externals,vcldemo,\
-   boost_headers \
-   glm_headers \
-   harfbuzz \
-))
 ifeq ($(DISABLE_GUI),)
 $(eval $(call gb_Executable_use_externals,vcldemo,\
 epoxy \
diff --git a/vcl/Executable_visualbackendtest.mk 
b/vcl

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

2021-11-15 Thread Noel Grandin (via logerrit)
 xmloff/source/chart/PropertyMap.hxx  |  299 --
 xmloff/source/chart/PropertyMaps.cxx |  300 ++-
 2 files changed, 294 insertions(+), 305 deletions(-)

New commits:
commit 8c45639a19b277eaaeb1be3798574f91aac5b022
Author: Noel Grandin 
AuthorDate: Mon Nov 15 09:05:46 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 15 10:08:14 2021 +0100

move xmloff chart tables into cxx file

instead of playing games with #define

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

diff --git a/xmloff/source/chart/PropertyMap.hxx 
b/xmloff/source/chart/PropertyMap.hxx
index 60d414bad5c8..f9a3dc4e3b8e 100644
--- a/xmloff/source/chart/PropertyMap.hxx
+++ b/xmloff/source/chart/PropertyMap.hxx
@@ -85,304 +85,5 @@
 #define XML_SCH_CONTEXT_SPECIAL_DATA_LABEL_SERIES   ( XML_SCH_CTF_START + 27 )
 #define XML_SCH_CONTEXT_SPECIAL_MOVING_AVERAGE_TYPE ( XML_SCH_CTF_START + 28 )
 
-#define MAP_FULL( ApiName, NameSpace, XMLTokenName, XMLType, ContextId, 
EarliestODFVersionForExport ) { ApiName, XML_NAMESPACE_##NameSpace, 
xmloff::token::XMLTokenName, XMLType|XML_TYPE_PROP_CHART, ContextId, 
EarliestODFVersionForExport, false }
-#define MAP_ENTRY( a, ns, nm, t ){ a, XML_NAMESPACE_##ns, 
xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFSVER_010, false 
}
-#define MAP_ENTRY_ODF12( a, ns, nm, t )  { a, XML_NAMESPACE_##ns, 
xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFSVER_012, false 
}
-#define MAP_ENTRY_ODF13( a, ns, nm, t )  { a, ns, xmloff::token::nm, 
t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFSVER_013, false }
-#define MAP_ENTRY_ODF_EXT( a, ns, nm, t ){ a, XML_NAMESPACE_##ns, 
xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, 
SvtSaveOptions::ODFSVER_FUTURE_EXTENDED, false }
-#define MAP_ENTRY_ODF_EXT_IMPORT( a, ns, nm, t ) { a, XML_NAMESPACE_##ns, 
xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, 
SvtSaveOptions::ODFSVER_FUTURE_EXTENDED, true }
-#define MAP_CONTEXT( a, ns, nm, t, c )   { a, XML_NAMESPACE_##ns, 
xmloff::token::nm, t|XML_TYPE_PROP_CHART, c, SvtSaveOptions::ODFSVER_010, false 
}
-#define MAP_SPECIAL( a, ns, nm, t, c )   { a, XML_NAMESPACE_##ns, 
xmloff::token::nm, t|XML_TYPE_PROP_CHART | MID_FLAG_SPECIAL_ITEM, c, 
SvtSaveOptions::ODFSVER_010, false }
-#define MAP_SPECIAL_ODF12( a, ns, nm, t, c ) { a, XML_NAMESPACE_##ns, 
xmloff::token::nm, t|XML_TYPE_PROP_CHART | MID_FLAG_SPECIAL_ITEM, c, 
SvtSaveOptions::ODFSVER_012, false }
-#define MAP_SPECIAL_ODF13( a, ns, nm, t, c ) { a, XML_NAMESPACE_##ns, 
xmloff::token::nm, t|XML_TYPE_PROP_CHART | MID_FLAG_SPECIAL_ITEM, c, 
SvtSaveOptions::ODFSVER_013, false }
-#define MAP_ENTRY_END { 
nullptr,0,xmloff::token::XML_TOKEN_INVALID,0,0,SvtSaveOptions::ODFSVER_010, 
false }
-
-// PropertyMap for Chart properties drawing- and
-// textproperties are added later using the chaining
-// mechanism
-
-// only create maps once!
-// this define is set in PropertyMaps.cxx
-
-#ifdef XML_SCH_CREATE_GLOBAL_MAPS
-
-const XMLPropertyMapEntry aXMLChartPropMap[] =
-{
-// chart subtypes
-MAP_ENTRY( "UpDown", CHART, XML_JAPANESE_CANDLE_STICK, XML_TYPE_BOOL ), // 
formerly XML_STOCK_UPDOWN_BARS
-MAP_CONTEXT( "Volume", CHART, XML_STOCK_WITH_VOLUME, XML_TYPE_BOOL, 
XML_SCH_CONTEXT_STOCK_WITH_VOLUME ),
-MAP_ENTRY( "Dim3D", CHART, XML_THREE_DIMENSIONAL, XML_TYPE_BOOL ),
-MAP_ENTRY( "Deep", CHART, XML_DEEP, XML_TYPE_BOOL ),
-MAP_ENTRY( "Lines", CHART, XML_LINES, XML_TYPE_BOOL ),
-MAP_ENTRY( "Percent", CHART, XML_PERCENTAGE, XML_TYPE_BOOL ),
-MAP_ENTRY( "SolidType", CHART, XML_SOLID_TYPE, XML_SCH_TYPE_SOLID_TYPE ),
-// ODF 1.3 OFFICE-3662 added values
-MAP_ENTRY( "SplineType", CHART, XML_INTERPOLATION, 
XML_SCH_TYPE_INTERPOLATION ),
-MAP_ENTRY( "Stacked", CHART, XML_STACKED, XML_TYPE_BOOL ),
-// type: "none", "automatic", "named-symbol" or "image"
-MAP_ENTRY( "SymbolType", CHART, XML_SYMBOL_TYPE, XML_SCH_TYPE_SYMBOL_TYPE 
| MID_FLAG_MULTI_PROPERTY ),
-// if type=="named-symbol" => name of symbol (square, diamond, ...)
-MAP_ENTRY( "SymbolType", CHART, XML_SYMBOL_NAME, XML_SCH_TYPE_NAMED_SYMBOL 
| MID_FLAG_MULTI_PROPERTY ),
-// if type=="image" => an xlink:href element with a linked (package) URI
-MAP_SPECIAL( "SymbolBitmap", CHART, XML_SYMBOL_IMAGE, XML_TYPE_STRING | 
MID_FLAG_ELEMENT_ITEM, XML_SCH_CONTEXT_SPECIAL_SYMBOL_IMAGE ),
-MAP_SPECIAL( "SymbolSize", CHART, XML_SYMBOL_WIDTH, XML_TYPE_MEASURE | 
MID_FLAG_MERGE_PROPERTY, XML_SCH_CONTEXT_SPECIAL_SYMBOL_WIDTH ),
-MAP_SPECIAL( "SymbolSize", CHART, XML_SYMBOL_HEIGHT, XML_TYPE_MEASURE | 
MID_FLAG_MERGE_PROPERTY, XML_SCH_CONTEXT_SPECIAL_SYMBOL_HEIGHT ),
-MAP_ENTRY( "Vertical", CHART, XML_VERTICAL, XML_TYPE_BOOL ),
-// #i32368# property should no longer be used as XML-property (in OASIS
-// format), but is

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

2021-11-15 Thread Miklos Vajna (via logerrit)
 oox/qa/unit/data/chart-theme-override.pptx |binary
 oox/qa/unit/drawingml.cxx  |   29 +
 oox/source/drawingml/shape.cxx |   22 ++
 3 files changed, 47 insertions(+), 4 deletions(-)

New commits:
commit e6968f0485cfb2f6c941d11c438386e14a47095d
Author: Miklos Vajna 
AuthorDate: Mon Nov 15 09:23:20 2021 +0100
Commit: Miklos Vajna 
CommitDate: Mon Nov 15 10:41:16 2021 +0100

PPTX import: fix handling of theme overrides in the chart import

A problem since commit 08818d8a45e034ad825c7fafbb76766f106f1d1d
(bnc#882383: Do not ignore themeOverride for charts in .pptx,
2014-07-04), an override for one chart should not affect later drawingML
objects.

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

diff --git a/oox/qa/unit/data/chart-theme-override.pptx 
b/oox/qa/unit/data/chart-theme-override.pptx
new file mode 100644
index ..85243b678bdf
Binary files /dev/null and b/oox/qa/unit/data/chart-theme-override.pptx differ
diff --git a/oox/qa/unit/drawingml.cxx b/oox/qa/unit/drawingml.cxx
index c7ba5ac61730..57e02545eb62 100644
--- a/oox/qa/unit/drawingml.cxx
+++ b/oox/qa/unit/drawingml.cxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -368,6 +369,34 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, 
testTdf142605_CurveSize)
 CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(5699), aBoundRect.Y, 1);
 }
 
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testChartThemeOverride)
+{
+// Given a document with 2 slides, slide1 has a chart with a theme 
override and slide2 has a
+// shape:
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"chart-theme-override.pptx";
+
+// When loading that document:
+load(aURL);
+
+// Then make sure that the slide 2 shape's text color is blue, not red:
+uno::Reference 
xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+uno::Reference 
xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(1),
+ uno::UNO_QUERY);
+uno::Reference xShape(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+uno::Reference xText(xShape->getText(), 
uno::UNO_QUERY);
+uno::Reference 
xPara(xText->createEnumeration()->nextElement(),
+uno::UNO_QUERY);
+uno::Reference 
xPortion(xPara->createEnumeration()->nextElement(),
+ uno::UNO_QUERY);
+sal_Int32 nActual{ 0 };
+xPortion->getPropertyValue("CharColor") >>= nActual;
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 4485828 (0x4472c4)
+// - Actual  : 16711680 (0xff)
+// i.e. the text color was red, not blue.
+CPPUNIT_ASSERT_EQUAL(static_cast(0x4472C4), nActual);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index bc72e01dead6..69bf775ee5da 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1921,14 +1921,22 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, 
const Reference< XShapes >&
 rFilter.importFragment( pChartSpaceFragment );
 ::oox::ppt::PowerPointImport *pPowerPointImport =
 dynamic_cast< ::oox::ppt::PowerPointImport* >(&rFilter);
+
+// The original theme.
+ThemePtr pTheme;
+
 if (!aThemeOverrideFragmentPath.isEmpty() && pPowerPointImport)
 {
+// Handle theme override.
 uno::Reference< xml::sax::XFastSAXSerializable > xDoc(
 
rFilter.importFragment(aThemeOverrideFragmentPath), uno::UNO_QUERY_THROW);
-ThemePtr pTheme = 
pPowerPointImport->getActualSlidePersist()->getTheme();
-rFilter.importFragment(new ThemeOverrideFragmentHandler(
-rFilter, aThemeOverrideFragmentPath, *pTheme), 
xDoc);
-
pPowerPointImport->getActualSlidePersist()->setTheme(pTheme);
+pTheme = 
pPowerPointImport->getActualSlidePersist()->getTheme();
+auto pThemeOverride = std::make_shared(*pTheme);
+rFilter.importFragment(
+new ThemeOverrideFragmentHandler(rFilter, 
aThemeOverrideFragmentPath,
+ *pThemeOverride),
+xDoc);
+
pPowerPointImport->getActualSlidePersist()->setTheme(pThemeOverride);
 }
 
 // convert imported chart model to chart document
@@ -1952,6 +1960,12 @@ void Shape::finalizeXShape( XmlFilterBase& rFilte

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

2021-11-15 Thread Stephan Bergmann (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 32334811f09592d669576de00af778c86f637f3e
Author: Stephan Bergmann 
AuthorDate: Mon Nov 15 08:11:49 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Nov 15 11:14:41 2021 +0100

loplugin:fakebool

..."use "bool" instead of 'gboolean' (aka 'int')" after Clang 14 trunk


"[clang] retain type sugar in auto / template argument deduction".  
Arguably,
the plugin should not warn about uses of `auto`, but then again there is a 
very
similar case a few lines above that already uses `bool` instead of `auto`, 
so
clean this one up as well.

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 56126820b94f..bb34db67447c 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -15037,7 +15037,7 @@ public:
 {
 GtkInstanceTreeIter& rGtkIter = 
static_cast(rIter);
 GtkTreeIter tmp;
-auto ret = gtk_tree_model_iter_parent(m_pTreeModel, &tmp, 
&rGtkIter.iter);
+bool ret = gtk_tree_model_iter_parent(m_pTreeModel, &tmp, 
&rGtkIter.iter);
 rGtkIter.iter = tmp;
 return ret;
 }


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

2021-11-15 Thread Caolán McNamara (via logerrit)
 cui/uiconfig/ui/breaknumberoption.ui |   18 --
 cui/uiconfig/ui/calloutpage.ui   |   14 --
 svtools/uiconfig/ui/graphicexport.ui |   18 --
 svx/uiconfig/ui/compressgraphicdialog.ui |   26 --
 svx/uiconfig/ui/sidebareffect.ui |7 ++-
 5 files changed, 70 insertions(+), 13 deletions(-)

New commits:
commit 093eb46aea59c2359d122bc8d2c2a7411e9b8a23
Author: Caolán McNamara 
AuthorDate: Sun Nov 14 14:59:38 2021 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 15 11:20:27 2021 +0100

Resolves: tdf#140250 don't share adjustments between differerent spinbuttons

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

diff --git a/cui/uiconfig/ui/breaknumberoption.ui 
b/cui/uiconfig/ui/breaknumberoption.ui
index 9400ddfac773..71fa24cb7c5b 100644
--- a/cui/uiconfig/ui/breaknumberoption.ui
+++ b/cui/uiconfig/ui/breaknumberoption.ui
@@ -9,6 +9,20 @@
 1
 10
   
+  
+2
+9
+1
+1
+10
+  
+  
+2
+9
+1
+1
+10
+  
   
 False
 6
@@ -122,7 +136,7 @@
 True
 start
 True
-adjustment1
+adjustment2
 12
 6
 True
@@ -161,7 +175,7 @@
 True
 start
 True
-adjustment1
+adjustment3
 12
 6
 True
diff --git a/cui/uiconfig/ui/calloutpage.ui b/cui/uiconfig/ui/calloutpage.ui
index 62c393d9ef01..d1e6f3e801ea 100644
--- a/cui/uiconfig/ui/calloutpage.ui
+++ b/cui/uiconfig/ui/calloutpage.ui
@@ -7,6 +7,16 @@
 0.5
 10
   
+  
+2400
+0.5
+10
+  
+  
+2400
+0.5
+10
+  
   
 True
 False
@@ -230,7 +240,7 @@
 True
 True
 0.00
-adjustment1
+adjustment2
 2
 True
 
@@ -276,7 +286,7 @@
 True
 True
 0.00
-adjustment1
+adjustment3
 2
 True
 
diff --git a/svtools/uiconfig/ui/graphicexport.ui 
b/svtools/uiconfig/ui/graphicexport.ui
index b14a8869a25c..223dd3dd456c 100644
--- a/svtools/uiconfig/ui/graphicexport.ui
+++ b/svtools/uiconfig/ui/graphicexport.ui
@@ -31,6 +31,20 @@
 1
 10
   
+  
+1
+100
+75
+1
+10
+  
+  
+1
+9
+9
+1
+10
+  
   
 False
 6
@@ -391,7 +405,7 @@
 True
 center
 True
-adjustment1
+adjustment6
 0
   
   
@@ -456,7 +470,7 @@
 True
 center
 True
-adjustment2
+adjustment7
 0
   
   
diff --git a/svx/uiconfig/ui/compressgraphicdialog.ui 
b/svx/uiconfig/ui/compressgraphicdialog.ui
index 3ecab9735f41..e86d6f476e7d 100644
--- a/svx/uiconfig/ui/compressgraphicdialog.ui
+++ b/svx/uiconfig/ui/compressgraphicdialog.ui
@@ -2,7 +2,14 @@
 
 
   
-  
+  
+1
+9
+6
+1
+1
+  
+  
 1
 9
 6
@@ -16,7 +23,14 @@
 100
 100
   
-  
+  
+1
+99
+80
+1
+5
+  
+  
 1
 99
 80
@@ -178,7 +192,7 @@
 True
 True
 True
-quality-adjustment
+quality-adjustment-scale
 0
 False
 right
@@ -196,7 +210,7 @@
 True
 True
 True
-quality-adjustment
+quality-adjustment-spin
 True
 True
 
@@ -226,7 +240,7 @@
 150
 True
 True
-compression-adjustment
+compression-adjustment-scale
 0
 False
 right
@@ -245,7 +259,7 @@
 True
 True
 6
-compression-adjustment
+compression-adjustment-spin
 True

[Libreoffice-commits] core.git: bin/ui-rules-enforcer.py chart2/uiconfig cui/uiconfig dbaccess/uiconfig reportdesign/uiconfig sc/uiconfig sd/uiconfig sfx2/uiconfig svtools/uiconfig svx/uiconfig sw/uic

2021-11-15 Thread Caolán McNamara (via logerrit)
 bin/ui-rules-enforcer.py|   28 
 chart2/uiconfig/ui/dlg_InsertErrorBars.ui   |2 +
 chart2/uiconfig/ui/tp_DataSource.ui |2 +
 chart2/uiconfig/ui/tp_ErrorBars.ui  |2 +
 chart2/uiconfig/ui/tp_RangeChooser.ui   |1 
 cui/uiconfig/ui/aboutdialog.ui  |1 
 cui/uiconfig/ui/comment.ui  |2 +
 cui/uiconfig/ui/hyperlinkdocpage.ui |2 +
 cui/uiconfig/ui/hyperlinkmailpage.ui|1 
 cui/uiconfig/ui/hyperlinknewdocpage.ui  |1 
 cui/uiconfig/ui/hyphenate.ui|2 +
 cui/uiconfig/ui/lineendstabpage.ui  |2 +
 cui/uiconfig/ui/linestyletabpage.ui |2 +
 cui/uiconfig/ui/menuassignpage.ui   |2 +
 cui/uiconfig/ui/numberingformatpage.ui  |3 ++
 cui/uiconfig/ui/optfontspage.ui |2 +
 cui/uiconfig/ui/thesaurus.ui|1 
 cui/uiconfig/ui/toolbarmodedialog.ui|1 
 dbaccess/uiconfig/ui/applycolpage.ui|4 ++
 dbaccess/uiconfig/ui/dbaseindexdialog.ui|4 ++
 reportdesign/uiconfig/dbreport/ui/conditionwin.ui   |2 +
 sc/uiconfig/scalc/ui/functionpanel.ui   |1 
 sc/uiconfig/scalc/ui/headerfootercontent.ui |6 
 sc/uiconfig/scalc/ui/notebookbar_groups.ui  |5 +++
 sc/uiconfig/scalc/ui/standardfilterdialog.ui|4 ++
 sc/uiconfig/scalc/ui/xmlsourcedialog.ui |1 
 sd/uiconfig/simpress/ui/customanimationeffecttab.ui |1 
 sd/uiconfig/simpress/ui/dockinganimation.ui |9 ++
 sd/uiconfig/simpress/ui/notebookbar_groups.ui   |   14 ++
 sfx2/uiconfig/ui/linefragment.ui|1 
 svtools/uiconfig/ui/placeedit.ui|1 
 svx/uiconfig/ui/docking3deffects.ui |8 +
 svx/uiconfig/ui/redlinefilterpage.ui|2 +
 sw/uiconfig/swriter/ui/addressblockdialog.ui|6 
 sw/uiconfig/swriter/ui/assignstylesdialog.ui|2 +
 sw/uiconfig/swriter/ui/columnpage.ui|2 +
 sw/uiconfig/swriter/ui/customizeaddrlistdialog.ui   |2 +
 sw/uiconfig/swriter/ui/editfielddialog.ui   |2 +
 sw/uiconfig/swriter/ui/fldvarpage.ui|2 +
 sw/uiconfig/swriter/ui/indexentry.ui|6 
 sw/uiconfig/swriter/ui/insertdbcolumnsdialog.ui |5 +++
 sw/uiconfig/swriter/ui/insertfootnote.ui|2 +
 sw/uiconfig/swriter/ui/insertscript.ui  |2 +
 sw/uiconfig/swriter/ui/mmaddressblockpage.ui|2 +
 sw/uiconfig/swriter/ui/mmsalutationpage.ui  |2 +
 sw/uiconfig/swriter/ui/notebookbar_groups.ui|   14 ++
 sw/uiconfig/swriter/ui/tocstylespage.ui |1 
 sw/uiconfig/swriter/ui/tokenwidget.ui   |2 +
 vcl/uiconfig/ui/printdialog.ui  |4 ++
 49 files changed, 176 insertions(+)

New commits:
commit fcf0d983801603250aa7ce4539951c6b049ad079
Author: Caolán McNamara 
AuthorDate: Sun Nov 14 16:23:34 2021 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 15 11:20:49 2021 +0100

add a rule to enforce always-show-image of True if an image is used

If not set, then gtk3 will show the image if there is no text, but only
the text if there's an image. For simplicity sake just enforce it as
true if an image is referenced.

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

diff --git a/bin/ui-rules-enforcer.py b/bin/ui-rules-enforcer.py
index 718bb82bd35b..fe1709bf36da 100755
--- a/bin/ui-rules-enforcer.py
+++ b/bin/ui-rules-enforcer.py
@@ -486,6 +486,33 @@ def 
enforce_entry_text_column_id_column_for_gtkcombobox(current):
   idcolumn.text = "1"
   current.insert(insertpos, idcolumn)
 
+def enforce_button_always_show_image(current):
+  image = None
+  always_show_image = None
+  isbutton = current.get('class') == "GtkButton"
+  insertpos = 0
+  for child in current:
+enforce_button_always_show_image(child)
+if not isbutton:
+continue
+if child.tag == "property":
+  insertpos = insertpos + 1;
+  attributes = child.attrib
+  if attributes.get("name") == "always_show_image" or 
attributes.get("name") == "always-show-image":
+always_show_image = child
+  elif attributes.get("name") == "image":
+image = child
+
+  if isbutton and image is not None:
+if always_show_image == None:
+  always_show_image = etree.Element("property")
+  attributes = always_show_image.attrib
+  attributes["name"] = "always-show-image"
+  always_show_image.text = "True"
+  current.insert(insertpos, always_show_image)

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

2021-11-15 Thread Miklos Vajna (via logerrit)
 sw/inc/dlelstnr.hxx |6 +++---
 sw/source/uibase/inc/idxmrk.hxx |2 +-
 sw/source/uibase/inc/swcont.hxx |6 +++---
 sw/source/uibase/inc/tmplctrl.hxx   |2 +-
 sw/source/uibase/index/idxmrk.cxx   |6 +++---
 sw/source/uibase/uno/dlelstnr.cxx   |   32 
 sw/source/uibase/utlui/tmplctrl.cxx |4 ++--
 7 files changed, 29 insertions(+), 29 deletions(-)

New commits:
commit c858a59158ed638642139aeda3a720b6a847ff95
Author: Miklos Vajna 
AuthorDate: Mon Nov 15 08:22:20 2021 +0100
Commit: Miklos Vajna 
CommitDate: Mon Nov 15 11:25:24 2021 +0100

sw: prefix members of SwInsertIdxMarkWrapper, ...

... SwLinguServiceEventListener, SwTemplateControl and SwTypeNumber

See tdf#94879 for motivation.

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

diff --git a/sw/inc/dlelstnr.hxx b/sw/inc/dlelstnr.hxx
index f431bbda8821..ca4ef456def4 100644
--- a/sw/inc/dlelstnr.hxx
+++ b/sw/inc/dlelstnr.hxx
@@ -46,9 +46,9 @@ class SwLinguServiceEventListener final :
 css::frame::XTerminateListener
 >
 {
-css::uno::Reference  xDesktop;
-css::uno::Reference
xLngSvcMgr;
-css::uno::Reference
xGCIterator;
+css::uno::Reference  
m_xDesktop;
+css::uno::Reference
m_xLngSvcMgr;
+css::uno::Reference
m_xGCIterator;
 
 SwLinguServiceEventListener(const SwLinguServiceEventListener &) = delete;
 SwLinguServiceEventListener & operator = (const 
SwLinguServiceEventListener &) = delete;
diff --git a/sw/source/uibase/inc/idxmrk.hxx b/sw/source/uibase/inc/idxmrk.hxx
index 5e4e8d973dce..37dfa76c1bc2 100644
--- a/sw/source/uibase/inc/idxmrk.hxx
+++ b/sw/source/uibase/inc/idxmrk.hxx
@@ -27,7 +27,7 @@ class SwWrtShell;
 
 class SwInsertIdxMarkWrapper final : public SfxChildWindow
 {
-ScopedVclPtr xAbstDlg;
+ScopedVclPtr m_xAbstDlg;
 
 public:
 SwInsertIdxMarkWrapper(vcl::Window *pParentWindow,
diff --git a/sw/source/uibase/inc/swcont.hxx b/sw/source/uibase/inc/swcont.hxx
index 19d17ebe6598..751c4549a484 100644
--- a/sw/source/uibase/inc/swcont.hxx
+++ b/sw/source/uibase/inc/swcont.hxx
@@ -61,13 +61,13 @@ enum class RegionMode
 //mini rtti
 class SwTypeNumber
 {
-sal_uInt8 nTypeId;
+sal_uInt8 m_nTypeId;
 
 public:
-SwTypeNumber(sal_uInt8 nId) :nTypeId(nId){}
+SwTypeNumber(sal_uInt8 nId) :m_nTypeId(nId){}
 virtual ~SwTypeNumber();
 
-sal_uInt8 GetTypeId() const { return nTypeId;}
+sal_uInt8 GetTypeId() const { return m_nTypeId;}
 };
 
 class SwContent : public SwTypeNumber
diff --git a/sw/source/uibase/inc/tmplctrl.hxx 
b/sw/source/uibase/inc/tmplctrl.hxx
index df8ed5170b04..0b60c3a6be22 100644
--- a/sw/source/uibase/inc/tmplctrl.hxx
+++ b/sw/source/uibase/inc/tmplctrl.hxx
@@ -36,7 +36,7 @@ public:
 virtual ~SwTemplateControl() override;
 
 private:
-OUString sTemplate;
+OUString m_sTemplate;
 };
 
 #endif
diff --git a/sw/source/uibase/index/idxmrk.cxx 
b/sw/source/uibase/index/idxmrk.cxx
index 65ec830c3f0d..142d9fedad1a 100644
--- a/sw/source/uibase/index/idxmrk.cxx
+++ b/sw/source/uibase/index/idxmrk.cxx
@@ -30,8 +30,8 @@ SwInsertIdxMarkWrapper::SwInsertIdxMarkWrapper( vcl::Window 
*pParentWindow,
 SfxChildWindow(pParentWindow, nId)
 {
 SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
-xAbstDlg = pFact->CreateIndexMarkFloatDlg(pBindings, this, 
pParentWindow->GetFrameWeld(), pInfo);
-SetController(xAbstDlg->GetController());
+m_xAbstDlg = pFact->CreateIndexMarkFloatDlg(pBindings, this, 
pParentWindow->GetFrameWeld(), pInfo);
+SetController(m_xAbstDlg->GetController());
 }
 
 SfxChildWinInfo SwInsertIdxMarkWrapper::GetInfo() const
@@ -43,7 +43,7 @@ SfxChildWinInfo SwInsertIdxMarkWrapper::GetInfo() const
 
 void SwInsertIdxMarkWrapper::ReInitDlg(SwWrtShell& rWrtShell)
 {
-xAbstDlg->ReInitDlg(rWrtShell);
+m_xAbstDlg->ReInitDlg(rWrtShell);
 }
 
 SFX_IMPL_CHILDWINDOW_WITHID(SwInsertAuthMarkWrapper, FN_INSERT_AUTH_ENTRY_DLG)
diff --git a/sw/source/uibase/uno/dlelstnr.cxx 
b/sw/source/uibase/uno/dlelstnr.cxx
index 19a0aa34efb2..60b11fc4d8ac 100644
--- a/sw/source/uibase/uno/dlelstnr.cxx
+++ b/sw/source/uibase/uno/dlelstnr.cxx
@@ -47,16 +47,16 @@ SwLinguServiceEventListener::SwLinguServiceEventListener()
 Reference< XComponentContext > xContext( 
comphelper::getProcessComponentContext() );
 try
 {
-xDesktop = frame::Desktop::create(xContext);
-xDesktop->addTerminateListener( this );
+m_xDesktop = frame::Desktop::create(xContext);
+m_xDesktop->addTerminateListener( this );
 
-xLngSvcMgr = LinguServiceManager::create(xContext);
-xLngSvcMgr->addLinguServiceManagerListener( 
static_cast(this) );
+m_xLngSvcMgr = LinguServiceManager::create(xContext)

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

2021-11-15 Thread Miklos Vajna (via logerrit)
 svl/source/undo/undo.cxx |   16 +++-
 1 file changed, 7 insertions(+), 9 deletions(-)

New commits:
commit 2a8506c2f20f18c948fb4dc5beb42b1010ad6999
Author: Miklos Vajna 
AuthorDate: Mon Nov 15 09:41:23 2021 +0100
Commit: Miklos Vajna 
CommitDate: Mon Nov 15 11:39:56 2021 +0100

svl: use std::rotate() in SfxUndoManager::ImplUndo()

Instead of manually moving out, moving a range and then moving in.

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

diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index e820a3cbb9d1..773d17313cea 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -689,15 +689,13 @@ bool SfxUndoManager::ImplUndo( SfxUndoContext* 
i_contextOrNull )
 size_t nOffset = i_contextOrNull->GetUndoOffset();
 if (nCurrent >= nOffset + 1)
 {
-// Move out the action we want to execute.
-MarkedUndoAction aAction
-= std::move(m_xData->pActUndoArray->maUndoActions[nCurrent - 1 
- nOffset]);
-// Move the actions after aAction down by one.
-std::move(m_xData->pActUndoArray->maUndoActions.data() + nCurrent 
- nOffset,
-  m_xData->pActUndoArray->maUndoActions.data() + nCurrent,
-  m_xData->pActUndoArray->maUndoActions.data() + nCurrent 
- nOffset - 1);
-// Move aAction to the top.
-m_xData->pActUndoArray->maUndoActions[nCurrent - 1] = 
std::move(aAction);
+// Move the action we want to execute to the top of the undo stack.
+// data() + nCurrent - nOffset - 1 is the start, data() + nCurrent 
- nOffset is what we
+// want to move to the top, maUndoActions.data() + nCurrent is 
past the end/top of the
+// undo stack.
+std::rotate(m_xData->pActUndoArray->maUndoActions.data() + 
nCurrent - nOffset - 1,
+m_xData->pActUndoArray->maUndoActions.data() + 
nCurrent - nOffset,
+m_xData->pActUndoArray->maUndoActions.data() + 
nCurrent);
 }
 }
 


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

2021-11-15 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit ac3c1de61e7cf069d3022907570832130235fa32
Author: Caolán McNamara 
AuthorDate: Sat Nov 6 21:32:21 2021 +
Commit: Xisco Fauli 
CommitDate: Mon Nov 15 12:31:41 2021 +0100

Resolves: tdf#145567 restore focus to the usual frame focus widget

when tearing down the start center. Don't leave the focus in an
arbitrary widget.

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 6b592b341ea0..78c3b09789c1 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -21803,6 +21803,14 @@ private:
 // rehook handler and let vcl cycle its own way through this widget's
 // children
 pFrame->AllowCycleFocusOut();
+
+// tdf#145567 if the focus is in this hierarchy then, now that we are 
tearing down,
+// move focus to the usual focus candidate for the frame
+GtkWindow* pFocusWin = get_active_window();
+GtkWidget* pFocus = pFocusWin ? gtk_window_get_focus(pFocusWin) : 
nullptr;
+bool bHasFocus = pFocus && gtk_widget_is_ancestor(pFocus, pTopLevel);
+if (bHasFocus)
+pFrame->GrabFocus();
 }
 
 static void signalUnmap(GtkWidget*, gpointer user_data)


[Libreoffice-commits] core.git: bin/ui-rules-enforcer.py

2021-11-15 Thread Caolán McNamara (via logerrit)
 bin/ui-rules-enforcer.py |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit 90705b67729c849acc7cf196fffa8a2d3c86dc13
Author: Caolán McNamara 
AuthorDate: Sun Nov 14 16:43:40 2021 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 15 12:35:08 2021 +0100

add a rule to enforce not sharing adjustments between widgets

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

diff --git a/bin/ui-rules-enforcer.py b/bin/ui-rules-enforcer.py
index fe1709bf36da..7c20ee0a6db7 100755
--- a/bin/ui-rules-enforcer.py
+++ b/bin/ui-rules-enforcer.py
@@ -513,6 +513,16 @@ def enforce_button_always_show_image(current):
 else:
   always_show_image.text = "True"
 
+def enforce_noshared_adjustments(current, adjustments):
+  for child in current:
+enforce_noshared_adjustments(child, adjustments)
+if child.tag == "property":
+  attributes = child.attrib
+  if attributes.get("name") == "adjustment":
+if child.text in adjustments:
+  raise Exception(sys.argv[1] + ': adjustment used more than once', 
child.text)
+adjustments.add(child.text)
+
 with open(sys.argv[1], encoding="utf-8") as f:
   header = f.readline()
   f.seek(0)
@@ -549,6 +559,7 @@ remove_skip_pager_hint(root)
 remove_toolbutton_focus(root)
 enforce_toolbar_can_focus(root)
 enforce_button_always_show_image(root)
+enforce_noshared_adjustments(root, set())
 
 with open(sys.argv[1], 'wb') as o:
   # without encoding='unicode' (and the matching encode("utf8")) we get &# 
replacements for non-ascii characters


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

2021-11-15 Thread Andras Timar (via logerrit)
 chart2/source/inc/ChartTypeHelper.hxx   |1 +
 chart2/source/tools/ChartTypeHelper.cxx |   13 +
 chart2/source/view/main/ChartView.cxx   |9 +++--
 3 files changed, 21 insertions(+), 2 deletions(-)

New commits:
commit 80ada110c56398e984d3f2d1f0ae1f30e8a73690
Author: Andras Timar 
AuthorDate: Tue Nov 9 23:36:32 2021 +0100
Commit: Xisco Fauli 
CommitDate: Mon Nov 15 12:37:02 2021 +0100

tdf#136111 fix scaling problem on chart driven by a macro

Change-Id: I9a55bcfceb9259f0d5dc944c00a34b3e4a891e0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124940
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Dennis Francis 
(cherry picked from commit 0644f44daef7caa8a246221d762fbc0f6af3672c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124864
Tested-by: Jenkins
Reviewed-by: Andras Timar 
(cherry picked from commit 453363ae1384a6d6f2c77052170b39a1ebf567a6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124970
Reviewed-by: Xisco Fauli 

diff --git a/chart2/source/inc/ChartTypeHelper.hxx 
b/chart2/source/inc/ChartTypeHelper.hxx
index 1a6345321825..d4917be283fb 100644
--- a/chart2/source/inc/ChartTypeHelper.hxx
+++ b/chart2/source/inc/ChartTypeHelper.hxx
@@ -49,6 +49,7 @@ public:
 static bool isSupportingDateAxis( const css::uno::Reference< 
css::chart2::XChartType >& xChartType, sal_Int32 nDimensionIndex );
 static bool isSupportingComplexCategory( const css::uno::Reference< 
css::chart2::XChartType >& xChartType );
 static bool isSupportingCategoryPositioning( const css::uno::Reference< 
css::chart2::XChartType >& xChartType, sal_Int32 nDimensionCount );
+static bool shiftCategoryPosAtXAxisPerDefault( const 
css::uno::Reference< css::chart2::XChartType >& xChartType );
 
 //returns sequence of css::chart::DataLabelPlacement
 static css::uno::Sequence < sal_Int32 > getSupportedLabelPlacements(
diff --git a/chart2/source/tools/ChartTypeHelper.cxx 
b/chart2/source/tools/ChartTypeHelper.cxx
index a4b8059ffb19..a260636a0604 100644
--- a/chart2/source/tools/ChartTypeHelper.cxx
+++ b/chart2/source/tools/ChartTypeHelper.cxx
@@ -464,6 +464,19 @@ bool ChartTypeHelper::isSupportingCategoryPositioning( 
const uno::Reference< cha
 return false;
 }
 
+bool ChartTypeHelper::shiftCategoryPosAtXAxisPerDefault( const uno::Reference< 
chart2::XChartType >& xChartType )
+{
+if(xChartType.is())
+{
+OUString aChartTypeName = xChartType->getChartType();
+if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_COLUMN)
+|| aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_BAR)
+|| aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK) 
)
+return true;
+}
+return false;
+}
+
 bool ChartTypeHelper::noBordersForSimpleScheme( const uno::Reference< 
chart2::XChartType >& xChartType )
 {
 if(xChartType.is())
diff --git a/chart2/source/view/main/ChartView.cxx 
b/chart2/source/view/main/ChartView.cxx
index f6642c920968..5cfee64f0641 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -323,7 +323,7 @@ public:
 
 void AdaptScaleOfYAxisWithoutAttachedSeries( ChartModel& rModel );
 
-static bool isCategoryPositionShifted(
+bool isCategoryPositionShifted(
 const chart2::ScaleData& rSourceScale, bool bHasComplexCategories );
 
 private:
@@ -348,12 +348,14 @@ private:
  */
 sal_Int32 m_nMaxAxisIndex;
 
+bool m_bChartTypeUsesShiftedCategoryPositionPerDefault;
 sal_Int32 m_nDefaultDateNumberFormat;
 };
 
 SeriesPlotterContainer::SeriesPlotterContainer( std::vector< 
std::unique_ptr >& rVCooSysList )
 : m_rVCooSysList( rVCooSysList )
 , m_nMaxAxisIndex(0)
+, m_bChartTypeUsesShiftedCategoryPositionPerDefault(false)
 , m_nDefaultDateNumberFormat(0)
 {
 }
@@ -517,6 +519,9 @@ void 
SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(
 }
 }
 
+if(nT==0)
+m_bChartTypeUsesShiftedCategoryPositionPerDefault = 
ChartTypeHelper::shiftCategoryPosAtXAxisPerDefault( xChartType );
+
 bool bExcludingPositioning = 
DiagramHelper::getDiagramPositioningMode( xDiagram ) == 
DiagramPositioningMode_EXCLUDING;
 VSeriesPlotter* pPlotter = VSeriesPlotter::createSeriesPlotter( 
xChartType, nDimensionCount, bExcludingPositioning );
 if( !pPlotter )
@@ -628,7 +633,7 @@ bool SeriesPlotterContainer::isCategoryPositionShifted(
 const chart2::ScaleData& rSourceScale, bool bHasComplexCategories )
 {
 if (rSourceScale.AxisType == AxisType::CATEGORY)
-return bHasComplexCategories || rSourceScale.ShiftedCategoryPosition;
+return bHasComplexCategories || rSourceScale.ShiftedCategoryPosition 
|| m_bChartTypeUsesShiftedCategoryPositionPerDefault;
 
 if (rSourceScale.AxisType == AxisType::DATE)
 return rSourceScale.ShiftedCategoryPosition;


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

2021-11-15 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/control/sqledit.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 7cffe43f0dc063b90e60f1698c30444297fb6f6a
Author: Caolán McNamara 
AuthorDate: Fri Nov 12 10:05:34 2021 +
Commit: Xisco Fauli 
CommitDate: Mon Nov 15 12:37:55 2021 +0100

Resolves: tdf#145582 modify called too often

a problem since:

commit 5b98dd53c7dc101d3a5ff693d3f0520ec1abd3d1
Date:   Tue Aug 3 12:28:23 2021 +0100

tdf#143657 'execute' button doesn't get enabled when contents changed

which was a fix for the problem since:

commit 73c9ef661d9ef6237d3fd3c259fd040a545b44cf
Date:   Tue Jul 6 18:51:38 2021 +0200

tdf#132740 don't broadcast if modified status has not changed

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

diff --git a/dbaccess/source/ui/control/sqledit.cxx 
b/dbaccess/source/ui/control/sqledit.cxx
index 92af2e8bd03b..5c801effdbcb 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -194,6 +194,7 @@ void SQLEditView::UpdateData()
 m_bInUpdate = true;
 EditEngine& rEditEngine = *GetEditEngine();
 
+bool bModified = rEditEngine.IsModified();
 bool bUndoEnabled = rEditEngine.IsUndoEnabled();
 rEditEngine.EnableUndo(false);
 
@@ -224,7 +225,8 @@ void SQLEditView::UpdateData()
 
 rEditEngine.EnableUndo(bUndoEnabled);
 
-m_aModifyLink.Call(nullptr);
+if (bModified)
+m_aModifyLink.Call(nullptr);
 
 Invalidate();
 }


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

2021-11-15 Thread Gabor Kelemen (via logerrit)
 cui/source/options/optgdlg.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit c9bfb849aef0de759edcd5f3137ff07d913a1cf5
Author: Gabor Kelemen 
AuthorDate: Mon Nov 1 19:14:06 2021 +0100
Commit: Xisco Fauli 
CommitDate: Mon Nov 15 12:41:18 2021 +0100

tdf#145128 "Perform file extension check" should be disabled if finalized

Change-Id: I7181ab8dde28fd5580a90fb267b31eaffd6a9878
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124567
Tested-by: Jenkins
Reviewed-by: Andras Timar 
(cherry picked from commit a2f0d457c8addeeef768a93f6a174617094a0254)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124850
Reviewed-by: Xisco Fauli 

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index baa96ad3166c..161a47de401d 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -336,6 +336,7 @@ void OfaMiscTabPage::Reset( const SfxItemSet* rSet )
 m_xPerformFileExtCheck->set_active(
 officecfg::Office::Common::Misc::PerformFileExtCheck::get());
 m_xPerformFileExtCheck->save_state();
+
m_xPerformFileExtCheck->set_sensitive(!officecfg::Office::Common::Misc::PerformFileExtCheck::isReadOnly());
 #endif
 }
 


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

2021-11-15 Thread Michael Weghorn (via logerrit)
 filter/uiconfig/ui/pdfgeneralpage.ui |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 5470514db7993b4c9f079a961adc30d70fb77fba
Author: Michael Weghorn 
AuthorDate: Fri Nov 12 13:56:22 2021 +0100
Commit: Michael Weghorn 
CommitDate: Mon Nov 15 13:01:15 2021 +0100

tdf#139031 Better align dropdowns in PDF export dialog

* set "hexpand" to True for the "PDF/A version"
  and the "Submit format" comboboxes (and relevant
  containers) and add a 6px margin for the parent container
  ("frame4"), so the comboboxes expand to the right
  and still have a proper margin at the right

* Set "halign" to "start" for the "PDF/A version" label,
  as is the case for the "Submit format" one

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

diff --git a/filter/uiconfig/ui/pdfgeneralpage.ui 
b/filter/uiconfig/ui/pdfgeneralpage.ui
index 9773934d65ae..ebfa097c0358 100644
--- a/filter/uiconfig/ui/pdfgeneralpage.ui
+++ b/filter/uiconfig/ui/pdfgeneralpage.ui
@@ -484,6 +484,7 @@
   
 True
 False
+6
 0
 none
 
@@ -563,6 +564,7 @@
 True
 False
 18
+True
 6
 12
 
@@ -590,6 +592,7 @@
   
 True
 False
+True
 
   FDF
   PDF
@@ -676,11 +679,13 @@
 True
 False
 18
+True
 14
 
   
 True
 False
+True
 3
 
   PDF/A-1b
@@ -705,6 +710,7 @@
   
 True
 False
+start
 baseline
 True
 PDF_/A version:


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

2021-11-15 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 28fc57ee7dcd26284649c5fefbf5d06abd9b70ca
Author: Caolán McNamara 
AuthorDate: Mon Nov 15 10:26:53 2021 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 15 13:38:04 2021 +0100

gtk4: implement something meaningful for get_monitor_workarea

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index bb34db67447c..ef1a817d1de1 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -6040,16 +6040,18 @@ namespace
 
 tools::Rectangle get_monitor_workarea(GtkWidget* pWindow)
 {
+GdkRectangle aRect;
 #if !GTK_CHECK_VERSION(4, 0, 0)
 GdkScreen* pScreen = gtk_widget_get_screen(pWindow);
 gint nMonitor = gdk_screen_get_monitor_at_window(pScreen, 
widget_get_surface(pWindow));
-GdkRectangle aRect;
 gdk_screen_get_monitor_workarea(pScreen, nMonitor, &aRect);
-return tools::Rectangle(aRect.x, aRect.y, aRect.x + aRect.width, 
aRect.y + aRect.height);
 #else
-(void)pWindow;
-return tools::Rectangle();
+GdkDisplay* pDisplay = gtk_widget_get_display(pWindow);
+GdkSurface* gdkWindow = widget_get_surface(pWindow);
+GdkMonitor* pMonitor = gdk_display_get_monitor_at_surface(pDisplay, 
gdkWindow);
+gdk_monitor_get_geometry(pMonitor, &aRect);
 #endif
+return tools::Rectangle(aRect.x, aRect.y, aRect.x + aRect.width, 
aRect.y + aRect.height);
 }
 
 


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

2021-11-15 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |   35 ---
 1 file changed, 24 insertions(+), 11 deletions(-)

New commits:
commit 97c59688a074dc24092c2887ed665b6940f4c97f
Author: Caolán McNamara 
AuthorDate: Mon Nov 15 10:44:20 2021 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 15 13:38:37 2021 +0100

gtk4: fill in some missing parts of Widget::draw

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 2d4e2c4fb8b9..27429d2db702 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -4428,6 +4428,13 @@ public:
 
 #if !GTK_CHECK_VERSION(4, 0, 0)
 gtk_widget_draw(m_pWidget, cr);
+#else
+GtkSnapshot* pSnapshot = gtk_snapshot_new();
+GtkWidgetClass* pWidgetClass = GTK_WIDGET_GET_CLASS(m_pWidget);
+pWidgetClass->snapshot(m_pWidget, pSnapshot);
+GskRenderNode* pNode = gtk_snapshot_free_to_node(pSnapshot);
+gsk_render_node_draw(pNode, cr);
+gsk_render_node_unref(pNode);
 #endif
 
 cairo_destroy(cr);
commit e3f9e4beae47a168416f032f1354a26cb2be0d67
Author: Caolán McNamara 
AuthorDate: Mon Nov 15 10:41:05 2021 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 15 13:38:23 2021 +0100

gtk4: implement screenshot

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index ef1a817d1de1..2d4e2c4fb8b9 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -5985,29 +5985,24 @@ public:
 
 namespace
 {
-#if !GTK_CHECK_VERSION(4, 0, 0)
 Point get_csd_offset(GtkWidget* pTopLevel)
 {
-#if !GTK_CHECK_VERSION(4, 0, 0)
 // try and omit drawing CSD under wayland
 GtkWidget* pChild = widget_get_first_child(pTopLevel);
 
 gtk_coord x, y;
 gtk_widget_translate_coordinates(pChild, pTopLevel, 0, 0, &x, &y);
 
+#if !GTK_CHECK_VERSION(4, 0, 0)
 int innerborder = 
gtk_container_get_border_width(GTK_CONTAINER(pChild));
 int outerborder = 
gtk_container_get_border_width(GTK_CONTAINER(pTopLevel));
 int totalborder = outerborder + innerborder;
 x -= totalborder;
 y -= totalborder;
+#endif
 
 return Point(x, y);
-#else
-(void)pTopLevel;
-return Point(0, 0);
-#endif
 }
-#endif
 
 #if !GTK_CHECK_VERSION(4, 0, 0)
 void do_collect_screenshot_data(GtkWidget* pItem, gpointer data)
@@ -6311,24 +6306,29 @@ public:
 
 virtual VclPtr screenshot() override
 {
-#if !GTK_CHECK_VERSION(4, 0, 0)
 // detect if we have to manually setup its size
 bool bAlreadyRealized = gtk_widget_get_realized(GTK_WIDGET(m_pWindow));
 // has to be visible for draw to work
 bool bAlreadyVisible = gtk_widget_get_visible(GTK_WIDGET(m_pWindow));
+#if !GTK_CHECK_VERSION(4, 0, 0)
 if (!bAlreadyVisible)
 {
 if (GTK_IS_DIALOG(m_pWindow))
 
sort_native_button_order(GTK_BOX(gtk_dialog_get_action_area(GTK_DIALOG(m_pWindow;
 gtk_widget_show(GTK_WIDGET(m_pWindow));
 }
+#endif
 
 if (!bAlreadyRealized)
 {
 GtkAllocation allocation;
 gtk_widget_realize(GTK_WIDGET(m_pWindow));
 gtk_widget_get_allocation(GTK_WIDGET(m_pWindow), &allocation);
+#if !GTK_CHECK_VERSION(4, 0, 0)
 gtk_widget_size_allocate(GTK_WIDGET(m_pWindow), &allocation);
+#else
+gtk_widget_size_allocate(GTK_WIDGET(m_pWindow), &allocation, 0);
+#endif
 }
 
 VclPtr 
xOutput(VclPtr::Create(DeviceFormat::DEFAULT));
@@ -6340,7 +6340,16 @@ public:
 
 cairo_translate(cr, -aOffset.X(), -aOffset.Y());
 
+#if !GTK_CHECK_VERSION(4, 0, 0)
 gtk_widget_draw(GTK_WIDGET(m_pWindow), cr);
+#else
+GtkSnapshot* pSnapshot = gtk_snapshot_new();
+GtkWidgetClass* pWidgetClass = 
GTK_WIDGET_GET_CLASS(GTK_WIDGET(m_pWindow));
+pWidgetClass->snapshot(GTK_WIDGET(m_pWindow), pSnapshot);
+GskRenderNode* pNode = gtk_snapshot_free_to_node(pSnapshot);
+gsk_render_node_draw(pNode, cr);
+gsk_render_node_unref(pNode);
+#endif
 
 cairo_destroy(cr);
 
@@ -6350,9 +6359,6 @@ public:
 gtk_widget_unrealize(GTK_WIDGET(m_pWindow));
 
 return xOutput;
-#else
-return nullptr;
-#endif
 }
 
 virtual weld::ScreenShotCollection collect_screenshot_data() override


[Libreoffice-commits] core.git: wizards/Package_sfdocuments.mk wizards/source

2021-11-15 Thread Jean-Pierre Ledure (via logerrit)
 wizards/Package_sfdocuments.mk |1 
 wizards/source/scriptforge/python/scriptforge.py   |3 
 wizards/source/sfdocuments/SF_Calc.xba |   82 +++
 wizards/source/sfdocuments/SF_DocumentListener.xba |  114 +
 wizards/source/sfdocuments/script.xlb  |1 
 5 files changed, 201 insertions(+)

New commits:
commit 6b4f02396b1c0e113be88c82126e23099dc78737
Author: Jean-Pierre Ledure 
AuthorDate: Sun Nov 14 17:28:04 2021 +0100
Commit: Jean-Pierre Ledure 
CommitDate: Mon Nov 15 13:47:26 2021 +0100

ScriptForge - (SF_Calc) new OpenRangeSelector() method

The method activates the Calc document, opens a non-modal dialog
with a text box, let the user make a selection in the current
or another sheet and returns the selected area as a string.
This method does not change the current selection.

Arguments:
 Title: the title to display on the top of the dialog
 Selection: a default preselection as a String.
   When absent, the first element of the current selection is preselected.
 SingleCell: When True, only a single cell may be selected. Default = False
 CloseAfterSelect: When True (default-, the dialog is closed immediately
   after the selection. When False, the user may change his/her mind
   and must close the dialog manually.
Returns:
 The selected range as a string, or the empty string
 when the user cancelled the request (close window button)

Example:
 Dim sSelect As String, vValues As Variant
 sSelect = oDoc.OpenRangeSelector("Select a range ...")
 If sSelect = "" Then Exit Function
 vValues = oDoc.GetValue(sSelect)

The implementation requires a new module: SF_DocumentListener.xba

The method is available for Basic and Python user scripts.

Change-Id: I2d67a9c900ea8ac661cd6b6fb43bb4a34e6abd8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125201
Tested-by: Jean-Pierre Ledure 
Reviewed-by: Jean-Pierre Ledure 

diff --git a/wizards/Package_sfdocuments.mk b/wizards/Package_sfdocuments.mk
index bec0d11f5a9a..a2a03178736a 100644
--- a/wizards/Package_sfdocuments.mk
+++ b/wizards/Package_sfdocuments.mk
@@ -24,6 +24,7 @@ $(eval $(call 
gb_Package_add_files,wizards_basicsrvsfdocuments,$(LIBO_SHARE_FOLD
SF_Calc.xba \
SF_Chart.xba \
SF_Document.xba \
+   SF_DocumentListener.xba \
SF_Form.xba \
SF_FormControl.xba \
SF_Register.xba \
diff --git a/wizards/source/scriptforge/python/scriptforge.py 
b/wizards/source/scriptforge/python/scriptforge.py
index 8b6af8ecdc99..9dc95d21f715 100644
--- a/wizards/source/scriptforge/python/scriptforge.py
+++ b/wizards/source/scriptforge/python/scriptforge.py
@@ -2010,6 +2010,9 @@ class SFDocuments:
width = ScriptForge.cstSymEmpty):
 return self.ExecMethod(self.vbMethod, 'Offset', range, rows, 
columns, height, width)
 
+def OpenRangeSelector(self, title = '', selection = '~', singlecell = 
False, closeafterselect = True):
+return self.ExecMethod(self.vbMethod, 'OpenRangeSelector', title, 
selection, singlecell, closeafterselect)
+
 def Printf(self, inputstr, range, tokencharacter = '%'):
 return self.ExecMethod(self.vbMethod, 'Printf', inputstr, range, 
tokencharacter)
 
diff --git a/wizards/source/sfdocuments/SF_Calc.xba 
b/wizards/source/sfdocuments/SF_Calc.xba
index 56fc83c18cb4..0eca75aa25f3 100644
--- a/wizards/source/sfdocuments/SF_Calc.xba
+++ b/wizards/source/sfdocuments/SF_Calc.xba
@@ -1662,6 +1662,7 @@ Public Function Methods() As Variant
, "MoveRange" _
, "MoveSheet" _
, "Offset" _
+   , "OpenRangeSelector" _
, "Printf" _
, "PrintOut" _
, "RemoveSheet" _
@@ -1861,6 +1862,87 @@ Catch:
GoTo Finally
 End Function   '  SF_Documents.SF_Calc.Offset
 
+REM 
-
+Public Function OpenRangeSelector(Optional ByVal Title As Variant _
+   , Optional 
ByVal Selection As Variant _
+   , Optional 
ByVal SingleCell As Variant _
+   , Optional 
ByVal CloseAfterSelect As Variant _
+   ) As String
+''' Activates the Calc document, opens a non-modal dialog 
with a text box,
+''' let the user make a selection in the current or another 
sheet and
+''' returns the selected area as a string.
+''' This method does not change the current selection.
+''' 

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

2021-11-15 Thread Dr. David Alan Gilbert (via logerrit)
 stoc/test/testcorefl.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a00fab4e6b7b62a2d9447127a0454da06c83ed54
Author: Dr. David Alan Gilbert 
AuthorDate: Thu Nov 11 00:24:08 2021 +
Commit: Michael Stahl 
CommitDate: Mon Nov 15 14:44:07 2021 +0100

test_corefl: Fix OSL_ENSURE bracketing

cppcheck spotted a couple of misplaced brackets where the
error text was ,'d after the end of OSL_ENSURE

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

diff --git a/stoc/test/testcorefl.cxx b/stoc/test/testcorefl.cxx
index 26e469c64063..cd873670b733 100644
--- a/stoc/test/testcorefl.cxx
+++ b/stoc/test/testcorefl.cxx
@@ -139,10 +139,10 @@ static sal_Bool test_corefl( const Reference< 
XIdlReflection > & xRefl )
 typelib_typedescription_release( pTD );
 
 OSL_ENSURE(xClass->getSuperclasses().getLength() == 1, 
"test_RegCoreReflection(): error 9");
-OSL_ENSURE(xClass->getSuperclasses().getArray()[0]->getName() == 
"ModuleC.XInterfaceA"), "test_RegCoreReflection(): error 10";
+OSL_ENSURE(xClass->getSuperclasses().getArray()[0]->getName() == 
"ModuleC.XInterfaceA", "test_RegCoreReflection(): error 10");
 OSL_ENSURE(xClass->getMethods().getLength() == 7, 
"test_RegCoreReflection(): error 11");
 OSL_ENSURE(xA->getMethods().getLength() == 7, "test_RegCoreReflection(): 
error 11a");
-OSL_ENSURE(xClass->getMethods().getArray()[3]->getName() == "methodA"), 
"test_RegCoreReflection(): 12";
+OSL_ENSURE(xClass->getMethods().getArray()[3]->getName() == "methodA", 
"test_RegCoreReflection(): 12");
 
OSL_ENSURE(xClass->getMethods().getArray()[3]->getReturnType()->getTypeClass() 
== TypeClass_VOID, "test_RegCoreReflection(): error 13");
 
OSL_ENSURE(xClass->getMethods().getArray()[3]->getParameterTypes().getLength() 
== 0, "test_RegCoreReflection(): error 14");
 
OSL_ENSURE(xClass->getMethods().getArray()[3]->getExceptionTypes().getLength() 
== 0, "test_RegCoreReflection(): error 15");


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

2021-11-15 Thread Vasily Melenchuk (via logerrit)
 sw/qa/uitest/chapterNumbering/tdf145215.py |1 +
 1 file changed, 1 insertion(+)

New commits:
commit e140caf2638b7718cd0bebdaaf86373f0828cbf4
Author: Vasily Melenchuk 
AuthorDate: Mon Nov 15 12:29:06 2021 +0300
Commit: Vasily Melenchuk 
CommitDate: Mon Nov 15 14:59:20 2021 +0100

UITest: refresh fields for test to ensure we check calculated value

Change-Id: I696d24ba087c2e7d19e9818f4f653e09eca7f32e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125222
Tested-by: Jenkins
Reviewed-by: Vasily Melenchuk 

diff --git a/sw/qa/uitest/chapterNumbering/tdf145215.py 
b/sw/qa/uitest/chapterNumbering/tdf145215.py
index 74d473fc7287..21cdedf554a2 100644
--- a/sw/qa/uitest/chapterNumbering/tdf145215.py
+++ b/sw/qa/uitest/chapterNumbering/tdf145215.py
@@ -27,6 +27,7 @@ class Tdf145215(UITestCase):
 
 # Check field value (there is only one field)
 textfields = writer_doc.getTextFields()
+textfields.refresh()
 for textfield in textfields:
 
self.assertTrue(textfield.supportsService("com.sun.star.text.TextField.GetReference"))
 self.assertEqual(textfield.CurrentPresentation, "1.2.1(i)")


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

2021-11-15 Thread Noel Grandin (via logerrit)
 reportdesign/source/core/sdr/RptObject.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5894c98b7cddc9429167bf5f2ef492aabdcf9fb1
Author: Noel Grandin 
AuthorDate: Sun Nov 14 16:30:39 2021 +0200
Commit: Xisco Fauli 
CommitDate: Mon Nov 15 15:14:51 2021 +0100

tdf#145323 reportbuilder Moving a field corrupts the field

regression from
commit 09cb778b6eb7d3a5b9029965a1320b49c90e7295
clean up SdrObject cloning

Change-Id: I7f234dee1dca704195eeebba874c80e73c7abe91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125196
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 
(cherry picked from commit 92857b181a715de08bd4264f4dc4161367d2b3c7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125134
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/reportdesign/source/core/sdr/RptObject.cxx 
b/reportdesign/source/core/sdr/RptObject.cxx
index fa079f3f72c4..ab2a1fa18b79 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -587,7 +587,7 @@ OUnoObject::OUnoObject(
 
 OUnoObject::OUnoObject(
 SdrModel& rSdrModel, OUnoObject const & rSource)
-:   SdrUnoObj(rSdrModel, rSource.getUnoControlModelTypeName())
+:   SdrUnoObj(rSdrModel, rSource)
 ,OObjectBase(rSource.getServiceName())
 ,m_nObjectType(rSource.m_nObjectType)
 // tdf#119067


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

2021-11-15 Thread Stephan Bergmann (via logerrit)
 include/oox/drawingml/shape.hxx |2 ++
 include/oox/drawingml/theme.hxx |3 ---
 oox/source/drawingml/theme.cxx  |8 
 3 files changed, 2 insertions(+), 11 deletions(-)

New commits:
commit 829ea811e19fead7ad35049342136b592077674b
Author: Stephan Bergmann 
AuthorDate: Mon Nov 15 12:22:11 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Nov 15 15:28:25 2021 +0100

Avoid some -Werror,-Wdeprecated-copy-with-user-provided-dtor

...after e6968f0485cfb2f6c941d11c438386e14a47095d "PPTX import: fix 
handling of
theme overrides in the chart import" introduced a use of 
std::make_shared

Change-Id: I5f6384b81e02034b6b2fdf3a3bad0148de4eb584
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125228
Tested-by: Tor Lillqvist 
Reviewed-by: Tor Lillqvist 

diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx
index 96686f26f03c..57a47cbdb4e5 100644
--- a/include/oox/drawingml/shape.hxx
+++ b/include/oox/drawingml/shape.hxx
@@ -107,7 +107,9 @@ public:
 
 explicit Shape( const char* pServiceType = nullptr, bool bDefaultHeight = 
true );
 explicit Shape( const ShapePtr& pSourceShape );
+Shape(Shape const &) = default;
 virtual ~Shape();
+Shape & operator =(Shape const &) = default;
 
 OUString&  getServiceName(){ return msServiceName; }
 voidsetServiceName( const char* pServiceName );
diff --git a/include/oox/drawingml/theme.hxx b/include/oox/drawingml/theme.hxx
index 6d64649f3a69..944e58b6e79c 100644
--- a/include/oox/drawingml/theme.hxx
+++ b/include/oox/drawingml/theme.hxx
@@ -56,9 +56,6 @@ class TextFont;
 class OOX_DLLPUBLIC Theme
 {
 public:
-Theme();
-~Theme();
-
 void setStyleName( const OUString& rStyleName ) { 
maStyleName = rStyleName; }
 
 ClrScheme&   getClrScheme() { return maClrScheme; }
diff --git a/oox/source/drawingml/theme.cxx b/oox/source/drawingml/theme.cxx
index ca26f389904e..036779d21711 100644
--- a/oox/source/drawingml/theme.cxx
+++ b/oox/source/drawingml/theme.cxx
@@ -23,14 +23,6 @@
 
 namespace oox::drawingml {
 
-Theme::Theme()
-{
-}
-
-Theme::~Theme()
-{
-}
-
 namespace {
 
 template< typename Type >


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

2021-11-15 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit a63dbd76888043bc12ae1b3b6780a10291a34b38
Author: Caolán McNamara 
AuthorDate: Mon Nov 15 12:11:55 2021 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 15 15:42:23 2021 +0100

gtk4: fill in more of the assistant code

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 27429d2db702..45f3639a2a7f 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -7208,11 +7208,17 @@ private:
 GtkAllocation allocation;
 
 int nPageIndex = 0;
-#if !GTK_CHECK_VERSION(4, 0, 0)
+
+#if GTK_CHECK_VERSION(4, 0, 0)
+for (GtkWidget* pWidget = gtk_widget_get_first_child(m_pSidebar);
+ pWidget; pWidget = gtk_widget_get_next_sibling(pChild))
+{
+#else
 GList* pChildren = 
gtk_container_get_children(GTK_CONTAINER(m_pSidebar));
 for (GList* pChild = g_list_first(pChildren); pChild; pChild = 
g_list_next(pChild))
 {
 GtkWidget* pWidget = static_cast(pChild->data);
+#endif
 if (!gtk_widget_get_visible(pWidget))
 continue;
 
@@ -7243,6 +7249,7 @@ private:
 
 ++nPageIndex;
 }
+#if !GTK_CHECK_VERSION(4, 0, 0)
 g_list_free(pChildren);
 #endif
 


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

2021-11-15 Thread Caolán McNamara (via logerrit)
 vcl/inc/unx/gtk/gtkdata.hxx |3 +++
 vcl/unx/gtk3/gtkdata.cxx|   40 
 vcl/unx/gtk3/gtkframe.cxx   |   27 +--
 vcl/unx/gtk3/gtkinst.cxx|   40 
 4 files changed, 64 insertions(+), 46 deletions(-)

New commits:
commit 4836e15ba980ea3bdccd3c063eb94f52e35646b0
Author: Caolán McNamara 
AuthorDate: Mon Nov 15 11:27:37 2021 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 15 16:17:25 2021 +0100

gtk4: implement CreateChildFrame

which gets the extension options tab pages working, e.g.
"English Sentence Checking"

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

diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index 5299d15a2088..0c6b73cabadc 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -195,6 +195,9 @@ inline GdkGLContext* surface_create_gl_context(GdkSurface* 
pSurface)
 void set_buildable_id(GtkBuildable* pWidget, const OString& rId);
 OString get_buildable_id(GtkBuildable* pWidget);
 
+void container_remove(GtkWidget* pContainer, GtkWidget* pChild);
+void container_add(GtkWidget* pContainer, GtkWidget* pChild);
+
 #if !GTK_CHECK_VERSION(4, 0, 0)
 typedef GtkClipboard GdkClipboard;
 #endif
diff --git a/vcl/unx/gtk3/gtkdata.cxx b/vcl/unx/gtk3/gtkdata.cxx
index 8f2afb4dc5a4..861ae6e64743 100644
--- a/vcl/unx/gtk3/gtkdata.cxx
+++ b/vcl/unx/gtk3/gtkdata.cxx
@@ -925,4 +925,44 @@ int getButtonPriority(std::string_view rType)
 return -1;
 }
 
+void container_remove(GtkWidget* pContainer, GtkWidget* pChild)
+{
+#if !GTK_CHECK_VERSION(4, 0, 0)
+gtk_container_remove(GTK_CONTAINER(pContainer), pChild);
+#else
+assert(GTK_IS_BOX(pContainer) || GTK_IS_GRID(pContainer) || 
GTK_IS_POPOVER(pContainer) ||
+   GTK_IS_FIXED(pContainer) || GTK_IS_WINDOW(pContainer));
+if (GTK_IS_BOX(pContainer))
+gtk_box_remove(GTK_BOX(pContainer), pChild);
+else if (GTK_IS_GRID(pContainer))
+gtk_grid_remove(GTK_GRID(pContainer), pChild);
+else if (GTK_IS_POPOVER(pContainer))
+gtk_popover_set_child(GTK_POPOVER(pContainer), nullptr);
+else if (GTK_IS_WINDOW(pContainer))
+gtk_window_set_child(GTK_WINDOW(pContainer), nullptr);
+else if (GTK_IS_FIXED(pContainer))
+gtk_fixed_remove(GTK_FIXED(pContainer), pChild);
+#endif
+}
+
+void container_add(GtkWidget* pContainer, GtkWidget* pChild)
+{
+#if !GTK_CHECK_VERSION(4, 0, 0)
+gtk_container_add(GTK_CONTAINER(pContainer), pChild);
+#else
+assert(GTK_IS_BOX(pContainer) || GTK_IS_GRID(pContainer) || 
GTK_IS_POPOVER(pContainer) ||
+   GTK_IS_FIXED(pContainer) || GTK_IS_WINDOW(pContainer));
+if (GTK_IS_BOX(pContainer))
+gtk_box_append(GTK_BOX(pContainer), pChild);
+else if (GTK_IS_GRID(pContainer))
+gtk_grid_attach(GTK_GRID(pContainer), pChild, 0, 0, 1, 1);
+else if (GTK_IS_POPOVER(pContainer))
+gtk_popover_set_child(GTK_POPOVER(pContainer), pChild);
+else if (GTK_IS_WINDOW(pContainer))
+gtk_window_set_child(GTK_WINDOW(pContainer), pChild);
+else if (GTK_IS_FIXED(pContainer))
+gtk_fixed_put(GTK_FIXED(pContainer), pChild, 0, 0);
+#endif
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index a4463bde6d06..a42a745aa988 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -735,7 +735,10 @@ GtkSalFrame::~GtkSalFrame()
 #if !GTK_CHECK_VERSION(4,0,0)
 gtk_widget_destroy( m_pWindow );
 #else
-gtk_window_destroy(GTK_WINDOW(m_pWindow));
+if (GTK_IS_WINDOW(m_pWindow))
+gtk_window_destroy(GTK_WINDOW(m_pWindow));
+else
+g_clear_pointer(&m_pWindow, gtk_widget_unparent);
 #endif
 }
 }
@@ -906,17 +909,15 @@ void GtkSalFrame::InitCommon()
 #endif
 
 m_pTopLevelGrid = GTK_GRID(gtk_grid_new());
-#if !GTK_CHECK_VERSION(4,0,0)
-gtk_container_add(GTK_CONTAINER(m_pWindow), GTK_WIDGET(m_pTopLevelGrid));
+container_add(m_pWindow, GTK_WIDGET(m_pTopLevelGrid));
 
+#if !GTK_CHECK_VERSION(4,0,0)
 m_pEventBox = GTK_EVENT_BOX(gtk_event_box_new());
 gtk_widget_add_events( GTK_WIDGET(m_pEventBox),
GDK_ALL_EVENTS_MASK );
 gtk_widget_set_vexpand(GTK_WIDGET(m_pEventBox), true);
 gtk_widget_set_hexpand(GTK_WIDGET(m_pEventBox), true);
 gtk_grid_attach(m_pTopLevelGrid, GTK_WIDGET(m_pEventBox), 0, 0, 1, 1);
-#else
-gtk_window_set_child(GTK_WINDOW(m_pWindow),  GTK_WIDGET(m_pTopLevelGrid));
 #endif
 
 // add the fixed container child,
@@ -1064,7 +1065,8 @@ void GtkSalFrame::InitCommon()
 #else
 g_signal_connect( G_OBJECT(m_pWindow), "map", G_CALLBACK(signalMap), this 
);
 g_signal_connect( G_OBJECT(m_pWindow), "unma

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

2021-11-15 Thread Caolán McNamara (via logerrit)
 chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c2cdae9c87cead2a7901b0c173a9561e24162678
Author: Caolán McNamara 
AuthorDate: Sun Nov 14 19:46:47 2021 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 15 16:17:55 2021 +0100

Resolves: tdf#145663 nL is the index of the light to set to the model

don't reuse the variable in another loop before its finally set to the
model

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

diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx 
b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
index 878f3fa0b204..74c2de00b5b9 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -433,20 +433,20 @@ IMPL_LINK(ThreeD_SceneIllumination_TabPage, 
ClickLightSourceButtonHdl, weld::But
 bool bIsChecked = pInfo->pButton->get_prev_active();
 
 ControllerLockGuardUNO aGuard( m_xChartModel );
-for( nL=0; nL<8; nL++)
+for (sal_Int32 i = 0; i < 8; ++i)
 {
-LightButton* pLightButton = m_pLightSourceInfoList[nL].pButton;
+LightButton* pLightButton = m_pLightSourceInfoList[i].pButton;
 if (pLightButton == pButton)
 {
 pLightButton->set_active(true);
 if (!pLightButton->get_widget()->has_focus())
 pLightButton->get_widget()->grab_focus();
-m_pLightSourceInfoList[nL].pButton->set_prev_active(true);
+m_pLightSourceInfoList[i].pButton->set_prev_active(true);
 }
 else
 {
 pLightButton->set_active(false);
-m_pLightSourceInfoList[nL].pButton->set_prev_active(false);
+m_pLightSourceInfoList[i].pButton->set_prev_active(false);
 }
 }
 


[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: sc/qa

2021-11-15 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/uicalc/data/tdf145640.ods |binary
 sc/qa/unit/uicalc/uicalc.cxx |   36 +++
 2 files changed, 36 insertions(+)

New commits:
commit 499b6d679866a952e40e16ce16f997ecb5ec5853
Author: Xisco Fauli 
AuthorDate: Mon Nov 15 13:26:58 2021 +0100
Commit: Xisco Fauli 
CommitDate: Mon Nov 15 16:42:12 2021 +0100

tdf#145640: sc_uicalc: Add unittest

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

diff --git a/sc/qa/unit/uicalc/data/tdf145640.ods 
b/sc/qa/unit/uicalc/data/tdf145640.ods
new file mode 100644
index ..34b501792723
Binary files /dev/null and b/sc/qa/unit/uicalc/data/tdf145640.ods differ
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index a06dd66b5117..72b1c6ea1c7b 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -355,6 +355,42 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf100582)
 pMod->SetInputOptions(aInputOption);
 }
 
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf145640)
+{
+ScModelObj* pModelObj = createDoc("tdf145640.ods");
+ScDocument* pDoc = pModelObj->GetDocument();
+CPPUNIT_ASSERT(pDoc);
+
+// Enable sorting with update reference
+ScModule* pMod = SC_MOD();
+ScInputOptions aInputOption = pMod->GetInputOptions();
+bool bOldStatus = aInputOption.GetSortRefUpdate();
+aInputOption.SetSortRefUpdate(true);
+pMod->SetInputOptions(aInputOption);
+
+goToCell("A2:F17");
+
+dispatchCommand(mxComponent, ".uno:SortDescending", {});
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT_EQUAL(OUString("=SUM(A15:B15:C15:D15:E15:F15)"), 
pDoc->GetFormula(6, 3, 0));
+
+// Without the fix in place, this test would have failed with
+// - Expected: 10
+// - Actual  : 0
+CPPUNIT_ASSERT_EQUAL(10.0, pDoc->GetValue(ScAddress(6, 3, 0)));
+
+dispatchCommand(mxComponent, ".uno:Undo", {});
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT_EQUAL(OUString("=SUM(A4:B4:C4:D4:E4:F4)"), 
pDoc->GetFormula(6, 3, 0));
+CPPUNIT_ASSERT_EQUAL(10.0, pDoc->GetValue(ScAddress(6, 3, 0)));
+
+// Restore previous status
+aInputOption.SetSortRefUpdate(bOldStatus);
+pMod->SetInputOptions(aInputOption);
+}
+
 CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf97215)
 {
 ScModelObj* pModelObj = createDoc("tdf97215.ods");


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

2021-11-15 Thread Luboš Luňák (via logerrit)
 sw/source/core/layout/paintfrm.cxx |   33 ++---
 1 file changed, 18 insertions(+), 15 deletions(-)

New commits:
commit 1b03d81bca698f0d1fa2dff7038c5d43196f8b61
Author: Luboš Luňák 
AuthorDate: Mon Nov 15 11:36:39 2021 +0100
Commit: Luboš Luňák 
CommitDate: Mon Nov 15 16:52:27 2021 +0100

disable Writer shadow hack in LOK case

LOK redraws always with new content, so there's no need to rewrite
any possible previous content, and this breaks transparency in LOK
case.

Change-Id: I1df3fe738f5ac1290720f0e18d6d391e220eb8ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125225
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Luboš Luňák 

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 4eb886a644f7..82d1d4fbcbb7 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -5776,25 +5776,28 @@ enum PaintArea {LEFT, RIGHT, TOP, BOTTOM};
 /// Wrapper around pOut->DrawBitmapEx.
 static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& 
aPoint, const Size& aSize, const BitmapEx& rBitmapEx, PaintArea eArea)
 {
-// The problem is that if we get called multiple times and the color is
-// partly transparent, then the result will get darker and darker. To avoid
-// this, always paint the background color before doing the real paint.
-tools::Rectangle aRect(aPoint, aSize);
-
-if (!aRect.IsEmpty())
+if(!comphelper::LibreOfficeKit::isActive())
 {
-switch (eArea)
+// The problem is that if we get called multiple times and the color is
+// partly transparent, then the result will get darker and darker. To 
avoid
+// this, always paint the background color before doing the real paint.
+tools::Rectangle aRect(aPoint, aSize);
+
+if (!aRect.IsEmpty())
 {
-case LEFT: aRect.SetLeft( aRect.Right() - 1 ); break;
-case RIGHT: aRect.SetRight( aRect.Left() + 1 ); break;
-case TOP: aRect.SetTop( aRect.Bottom() - 1 ); break;
-case BOTTOM: aRect.SetBottom( aRect.Top() + 1 ); break;
+switch (eArea)
+{
+case LEFT: aRect.SetLeft( aRect.Right() - 1 ); break;
+case RIGHT: aRect.SetRight( aRect.Left() + 1 ); break;
+case TOP: aRect.SetTop( aRect.Bottom() - 1 ); break;
+case BOTTOM: aRect.SetBottom( aRect.Top() + 1 ); break;
+}
 }
-}
 
-pOut->SetFillColor(SwViewOption::GetAppBackgroundColor());
-pOut->SetLineColor();
-pOut->DrawRect(pOut->PixelToLogic(aRect));
+pOut->SetFillColor(SwViewOption::GetAppBackgroundColor());
+pOut->SetLineColor();
+pOut->DrawRect(pOut->PixelToLogic(aRect));
+}
 
 // Tiled render if necessary
 tools::Rectangle aComplete(aPoint, aSize);


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

2021-11-15 Thread Luboš Luňák (via logerrit)
 sw/source/core/layout/paintfrm.cxx |   33 ++---
 1 file changed, 18 insertions(+), 15 deletions(-)

New commits:
commit 8cfc86c652bc02eca2733498d4459bd24de2158b
Author: Luboš Luňák 
AuthorDate: Mon Nov 15 11:36:39 2021 +0100
Commit: Luboš Luňák 
CommitDate: Mon Nov 15 16:53:53 2021 +0100

disable Writer shadow hack in LOK case

LOK redraws always with new content, so there's no need to rewrite
any possible previous content, and this breaks transparency in LOK
case.

Change-Id: I1df3fe738f5ac1290720f0e18d6d391e220eb8ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125133
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 554ddc4bbc44..9abc517a2a4f 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -5851,25 +5851,28 @@ enum PaintArea {LEFT, RIGHT, TOP, BOTTOM};
 /// Wrapper around pOut->DrawBitmapEx.
 static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& 
aPoint, const Size& aSize, const BitmapEx& rBitmapEx, PaintArea eArea)
 {
-// The problem is that if we get called multiple times and the color is
-// partly transparent, then the result will get darker and darker. To avoid
-// this, always paint the background color before doing the real paint.
-tools::Rectangle aRect(aPoint, aSize);
-
-if (!aRect.IsEmpty())
+if(!comphelper::LibreOfficeKit::isActive())
 {
-switch (eArea)
+// The problem is that if we get called multiple times and the color is
+// partly transparent, then the result will get darker and darker. To 
avoid
+// this, always paint the background color before doing the real paint.
+tools::Rectangle aRect(aPoint, aSize);
+
+if (!aRect.IsEmpty())
 {
-case LEFT: aRect.SetLeft( aRect.Right() - 1 ); break;
-case RIGHT: aRect.SetRight( aRect.Left() + 1 ); break;
-case TOP: aRect.SetTop( aRect.Bottom() - 1 ); break;
-case BOTTOM: aRect.SetBottom( aRect.Top() + 1 ); break;
+switch (eArea)
+{
+case LEFT: aRect.SetLeft( aRect.Right() - 1 ); break;
+case RIGHT: aRect.SetRight( aRect.Left() + 1 ); break;
+case TOP: aRect.SetTop( aRect.Bottom() - 1 ); break;
+case BOTTOM: aRect.SetBottom( aRect.Top() + 1 ); break;
+}
 }
-}
 
-pOut->SetFillColor(SwViewOption::GetAppBackgroundColor());
-pOut->SetLineColor();
-pOut->DrawRect(pOut->PixelToLogic(aRect));
+pOut->SetFillColor(SwViewOption::GetAppBackgroundColor());
+pOut->SetLineColor();
+pOut->DrawRect(pOut->PixelToLogic(aRect));
+}
 
 // Tiled render if necessary
 tools::Rectangle aComplete(aPoint, aSize);


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

2021-11-15 Thread Caolán McNamara (via logerrit)
 sw/inc/HandleAnchorNodeChg.hxx |4 +++-
 sw/source/core/frmedt/fefly1.cxx   |2 +-
 sw/source/core/frmedt/feshview.cxx |2 +-
 sw/source/core/layout/atrfrm.cxx   |7 ++-
 4 files changed, 11 insertions(+), 4 deletions(-)

New commits:
commit acb3638afd79472851bdf92a2c023f44bf67
Author: Caolán McNamara 
AuthorDate: Mon Nov 15 09:10:36 2021 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 15 17:17:42 2021 +0100

replace an ugly coverity warning suppression

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

diff --git a/sw/inc/HandleAnchorNodeChg.hxx b/sw/inc/HandleAnchorNodeChg.hxx
index ae46c7e2cc89..446f9ac710a6 100644
--- a/sw/inc/HandleAnchorNodeChg.hxx
+++ b/sw/inc/HandleAnchorNodeChg.hxx
@@ -53,7 +53,7 @@ public:
   SwFlyFrame const* _pKeepThisFlyFrame = nullptr);
 
 /** calls , if re-creation of fly frames is 
necessary. */
-~SwHandleAnchorNodeChg() COVERITY_NOEXCEPT_FALSE;
+~SwHandleAnchorNodeChg();
 
 private:
 // fly frame format, which is tracked for an anchor node change.
@@ -67,6 +67,8 @@ private:
 
 SwWrtShell* mpWrtShell;
 
+void ImplDestroy();
+
 SwHandleAnchorNodeChg(const SwHandleAnchorNodeChg&) = delete;
 void operator=(const SwHandleAnchorNodeChg) = delete;
 };
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 7043681704d9..8158359458b7 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -605,7 +605,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool 
bMoveIt )
 // re-created. Thus, delete all fly frames except the 
 before the
 // anchor attribute is change and re-create them 
afterwards.
 {
-std::unique_ptr> pHandleAnchorNodeChg;
+std::unique_ptr 
pHandleAnchorNodeChg;
 SwFlyFrameFormat* pFlyFrameFormat( 
dynamic_cast(&rFormat) );
 if ( pFlyFrameFormat )
 {
diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index 24a9655945f3..1e3c8f2ff150 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -567,7 +567,7 @@ bool SwFEShell::MoveAnchor( SwMove nDir )
 // re-created. Thus, delete all fly frames except the  
before the
 // anchor attribute is change and re-create them afterwards.
 {
-std::unique_ptr> pHandleAnchorNodeChg;
+std::unique_ptr pHandleAnchorNodeChg;
 SwFlyFrameFormat* pFlyFrameFormat( 
dynamic_cast(&rFormat) );
 if ( pFlyFrameFormat )
 {
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index bc77bcf38f14..4791fda80169 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -3374,7 +3374,7 @@ SwHandleAnchorNodeChg::SwHandleAnchorNodeChg( 
SwFlyFrameFormat& _rFlyFrameFormat
 }
 }
 
-SwHandleAnchorNodeChg::~SwHandleAnchorNodeChg() COVERITY_NOEXCEPT_FALSE
+void SwHandleAnchorNodeChg::ImplDestroy()
 {
 if ( mbAnchorNodeChanged )
 {
@@ -3430,6 +3430,11 @@ SwHandleAnchorNodeChg::~SwHandleAnchorNodeChg() 
COVERITY_NOEXCEPT_FALSE
 mpWrtShell->Pop(SwCursorShell::PopMode::DeleteCurrent);
 }
 
+SwHandleAnchorNodeChg::~SwHandleAnchorNodeChg()
+{
+suppress_fun_call_w_exception(ImplDestroy());
+}
+
 namespace sw
 {
 DrawFrameFormatHint::~DrawFrameFormatHint() {}


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

2021-11-15 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |   18 ++
 1 file changed, 14 insertions(+), 4 deletions(-)

New commits:
commit 82dab2e8c72c024794862b487d6988ad576e57d6
Author: Caolán McNamara 
AuthorDate: Mon Nov 15 12:06:58 2021 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 15 17:30:56 2021 +0100

gtk4: complete do_collect_screenshot_data

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 8960b70aa34c..3a7b2f86fd72 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -5979,7 +5979,6 @@ namespace
 return Point(x, y);
 }
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
 void do_collect_screenshot_data(GtkWidget* pItem, gpointer data)
 {
 GtkWidget* pTopLevel = widget_get_toplevel(pItem);
@@ -6001,12 +6000,17 @@ namespace
 pCollection->emplace_back(::get_help_id(pItem), aCurrentRange);
 }
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
+#if GTK_CHECK_VERSION(4, 0, 0)
+for (GtkWidget* pChild = gtk_widget_get_first_child(pItem);
+ pChild; pChild = gtk_widget_get_next_sibling(pChild))
+{
+do_collect_screenshot_data(pChild, data);
+}
+#else
 if (GTK_IS_CONTAINER(pItem))
 gtk_container_forall(GTK_CONTAINER(pItem), 
do_collect_screenshot_data, data);
 #endif
 }
-#endif
 
 tools::Rectangle get_monitor_workarea(GtkWidget* pWindow)
 {
@@ -6340,7 +6344,13 @@ public:
 {
 weld::ScreenShotCollection aRet;
 
-#if !GTK_CHECK_VERSION(4, 0, 0)
+#if GTK_CHECK_VERSION(4, 0, 0)
+for (GtkWidget* pChild = 
gtk_widget_get_first_child(GTK_WIDGET(m_pWindow));
+ pChild; pChild = gtk_widget_get_next_sibling(pChild))
+{
+do_collect_screenshot_data(pChild, &aRet);
+}
+#else
 gtk_container_foreach(GTK_CONTAINER(m_pWindow), 
do_collect_screenshot_data, &aRet);
 #endif
 


[Libreoffice-commits] core.git: solenv/Executable_gbuildtojson.mk solenv/Executable_gcc-wrapper.mk solenv/Executable_g++-wrapper.mk solenv/StaticLibrary_wrapper.mk

2021-11-15 Thread Luboš Luňák (via logerrit)
 solenv/Executable_g++-wrapper.mk  |2 +-
 solenv/Executable_gbuildtojson.mk |2 +-
 solenv/Executable_gcc-wrapper.mk  |2 +-
 solenv/StaticLibrary_wrapper.mk   |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit f0b745e59f150ea33fc09eb88d682f8cbc085f7c
Author: Luboš Luňák 
AuthorDate: Mon Nov 15 12:22:59 2021 +0100
Commit: Luboš Luňák 
CommitDate: Mon Nov 15 17:55:53 2021 +0100

build all solenv build tools always as optimized

Because they are tools used during the build.

Change-Id: I66ef65c16551a5242dcc687e200c81cdab7b463f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125251
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/solenv/Executable_g++-wrapper.mk b/solenv/Executable_g++-wrapper.mk
index 526ff3aafb74..1c4eb8dae489 100644
--- a/solenv/Executable_g++-wrapper.mk
+++ b/solenv/Executable_g++-wrapper.mk
@@ -10,7 +10,7 @@
 $(eval $(call gb_Executable_Executable,g++-wrapper))
 
 $(eval $(call gb_Executable_add_exception_objects,g++-wrapper,\
-   solenv/gcc-wrappers/g++ \
+   solenv/gcc-wrappers/g++, $(gb_COMPILEROPTFLAGS) \
 ))
 
 $(eval $(call gb_Executable_use_static_libraries,g++-wrapper,\
diff --git a/solenv/Executable_gbuildtojson.mk 
b/solenv/Executable_gbuildtojson.mk
index 6797bf3ac83e..bffc9904920e 100644
--- a/solenv/Executable_gbuildtojson.mk
+++ b/solenv/Executable_gbuildtojson.mk
@@ -10,7 +10,7 @@
 $(eval $(call gb_Executable_Executable,gbuildtojson))
 
 $(eval $(call gb_Executable_add_exception_objects,gbuildtojson,\
-   solenv/gbuildtojson/gbuildtojson \
+   solenv/gbuildtojson/gbuildtojson, $(gb_COMPILEROPTFLAGS) \
 ))
 
 # vim:set noet sw=4 ts=4:
diff --git a/solenv/Executable_gcc-wrapper.mk b/solenv/Executable_gcc-wrapper.mk
index ae76a3376b95..207e9158455d 100644
--- a/solenv/Executable_gcc-wrapper.mk
+++ b/solenv/Executable_gcc-wrapper.mk
@@ -10,7 +10,7 @@
 $(eval $(call gb_Executable_Executable,gcc-wrapper))
 
 $(eval $(call gb_Executable_add_exception_objects,gcc-wrapper,\
-   solenv/gcc-wrappers/gcc \
+   solenv/gcc-wrappers/gcc, $(gb_COMPILEROPTFLAGS) \
 ))
 
 $(eval $(call gb_Executable_use_static_libraries,gcc-wrapper,\
diff --git a/solenv/StaticLibrary_wrapper.mk b/solenv/StaticLibrary_wrapper.mk
index 8fe81ef7f8c4..403c66c6893e 100644
--- a/solenv/StaticLibrary_wrapper.mk
+++ b/solenv/StaticLibrary_wrapper.mk
@@ -10,7 +10,7 @@
 $(eval $(call gb_StaticLibrary_StaticLibrary,wrapper))
 
 $(eval $(call gb_StaticLibrary_add_exception_objects,wrapper,\
-   solenv/gcc-wrappers/wrapper \
+   solenv/gcc-wrappers/wrapper, $(gb_COMPILEROPTFLAGS) \
 ))
 
 # vim:set noet sw=4 ts=4:


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

2021-11-15 Thread Luboš Luňák (via logerrit)
 sc/source/core/data/table3.cxx |   10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

New commits:
commit b90a5d0f23ffdf1b43c752db424c65bec6f0e8f1
Author: Luboš Luňák 
AuthorDate: Mon Nov 15 14:53:50 2021 +0100
Commit: Luboš Luňák 
CommitDate: Mon Nov 15 17:56:14 2021 +0100

Revert "improve performance of cell equality comparisons)" (tdf#139612)

This reverts commit 5e9c2677e8fcd19b289d947b94ceba52b138728b.

Reason for revert: I based this on code that tdf#139612 talks about, and 
which is possibly incorrect.

Change-Id: Ie9e46a19ac8fe10bbf6cf6f429741200684d5bfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125138
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 02c2619624b5..9c7417278658 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -2705,12 +2705,6 @@ public:
 // Simple string matching i.e. no regexp match.
 if (isTextMatchOp(rEntry))
 {
-bool matchWholeCell = bMatchWholeCell;
-// When comparing for (in)equality, we can simply compare the 
whole cell
-// even when not explicitly asked, and that code is faster 
(it's simpler,
-// no SharedString temporary, etc.).
-if( rEntry.eOp == SC_EQUAL || rEntry.eOp == SC_NOT_EQUAL )
-matchWholeCell = true;
 if (rItem.meType != ScQueryEntry::ByString && 
rItem.maString.isEmpty())
 {
 // #i18374# When used from functions (match, countif, 
sumif, vlookup, hlookup, lookup),
@@ -2720,7 +2714,7 @@ public:
 if ( rEntry.eOp == SC_NOT_EQUAL )
 bOk = !bOk;
 }
-else if ( matchWholeCell )
+else if ( bMatchWholeCell )
 {
 if (pValueSource1)
 {
@@ -2758,7 +2752,7 @@ public:
 sal_Int32 nStrPos;
 
 if (!mbCaseSensitive)
-{
+{ // Common case for vlookup etc.
 const svl::SharedString rSource(pValueSource1? 
*pValueSource1 : mrStrPool.intern(*pValueSource2));
 
 const rtl_uString *pQuer = 
rItem.maString.getDataIgnoreCase();


[Libreoffice-commits] core.git: Branch 'libreoffice-7-2-3' - reportdesign/source

2021-11-15 Thread Noel Grandin (via logerrit)
 reportdesign/source/core/sdr/RptObject.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c95ddfc252c57dd2454a7e37b8abfe2b6fa74a84
Author: Noel Grandin 
AuthorDate: Sun Nov 14 16:30:39 2021 +0200
Commit: Caolán McNamara 
CommitDate: Mon Nov 15 18:14:02 2021 +0100

tdf#145323 reportbuilder Moving a field corrupts the field

regression from
commit 09cb778b6eb7d3a5b9029965a1320b49c90e7295
clean up SdrObject cloning

Change-Id: I7f234dee1dca704195eeebba874c80e73c7abe91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125196
Tested-by: Noel Grandin 
Reviewed-by: Noel Grandin 
(cherry picked from commit 92857b181a715de08bd4264f4dc4161367d2b3c7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125134
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
(cherry picked from commit 5894c98b7cddc9429167bf5f2ef492aabdcf9fb1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125139
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/reportdesign/source/core/sdr/RptObject.cxx 
b/reportdesign/source/core/sdr/RptObject.cxx
index fa079f3f72c4..ab2a1fa18b79 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -587,7 +587,7 @@ OUnoObject::OUnoObject(
 
 OUnoObject::OUnoObject(
 SdrModel& rSdrModel, OUnoObject const & rSource)
-:   SdrUnoObj(rSdrModel, rSource.getUnoControlModelTypeName())
+:   SdrUnoObj(rSdrModel, rSource)
 ,OObjectBase(rSource.getServiceName())
 ,m_nObjectType(rSource.m_nObjectType)
 // tdf#119067


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

2021-11-15 Thread Vasily Melenchuk (via logerrit)
 editeng/source/items/numitem.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 6b4b57286644174351e5d77e8a6ef46e37d5f832
Author: Vasily Melenchuk 
AuthorDate: Thu Nov 11 10:33:08 2021 +0300
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Nov 15 18:24:08 2021 +0100

tdf#145610: lists should not have includeUpperLevels < 1

Unlike its name, this variable stores *total* amount of levels
to includes, so during conversion even empty list format to
prefix/suffix/includeupperlevels we should keep last one above
zero so list even in future will not have issues with levels
to display.

Change-Id: I4992c1ac0194f381df9f7b965ecdb2d688892b30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125022
Tested-by: Jenkins
Reviewed-by: Vasily Melenchuk 
(cherry picked from commit a4485bd8e03ad4487fe47a4480a9aacfbaf61980)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125135
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 5d493df6d878..b875138c9c3b 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -637,6 +637,13 @@ void 
SvxNumberFormat::SetListFormat(std::optional oSet)
 nPercents++;
 }
 nInclUpperLevels = nPercents/2;
+if (nInclUpperLevels < 1)
+{
+// There should be always at least one level. This will be not required
+// in future (when we get rid of prefix/suffix), but nowadays there
+// are too many conversions "list format" <-> 
"prefix/suffix/inclUpperLevel"
+nInclUpperLevels = 1;
+}
 }
 
 OUString SvxNumberFormat::GetListFormat(bool bIncludePrefixSuffix /*= true*/) 
const


[Libreoffice-commits] core.git: Branch 'feature/wasm' - android/default-document static/CustomTarget_wasm_fs_image.mk static/soffice_args.js

2021-11-15 Thread Armin Le Grand (Allotropia) (via logerrit)
 android/default-document/example2.odt |binary
 static/CustomTarget_wasm_fs_image.mk  |5 -
 static/soffice_args.js|2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 3036804848ddb97b99201e5d241125f57c8c4622
Author: Armin Le Grand (Allotropia) 
AuthorDate: Mon Nov 15 18:28:05 2021 +0100
Commit: Armin Le Grand (Allotropia) 
CommitDate: Mon Nov 15 18:28:05 2021 +0100

WASM: Add extended example file & content for FontWork insert dialog

Change-Id: I484b2f2c6b86c1b728abc51c27f52fea4ddd4304

diff --git a/android/default-document/example2.odt 
b/android/default-document/example2.odt
new file mode 100644
index ..4ace37fed4d2
Binary files /dev/null and b/android/default-document/example2.odt differ
diff --git a/static/CustomTarget_wasm_fs_image.mk 
b/static/CustomTarget_wasm_fs_image.mk
index 54400cc2b219..0fb310ab8854 100644
--- a/static/CustomTarget_wasm_fs_image.mk
+++ b/static/CustomTarget_wasm_fs_image.mk
@@ -1121,7 +1121,10 @@ gb_wasm_image_filelist := \
 $(INSTROOT)/share/config/soffice.cfg/sfx/ui/templatepanel.ui \
 $(INSTROOT)/share/config/soffice.cfg/sfx/ui/floatingrecord.ui \
 $(INSTROOT)/share/config/images_breeze.zip \
-$(SRCDIR)/android/default-document/example.odt \
+$(INSTROOT)/share/gallery/fontwork.sdg \
+$(INSTROOT)/share/gallery/fontwork.sdv \
+$(INSTROOT)/share/gallery/fontwork.thm \
+$(SRCDIR)/android/default-document/example2.odt \
 
 wasm_fs_image_WORKDIR := $(call 
gb_CustomTarget_get_workdir,static/wasm_fs_image)
 
diff --git a/static/soffice_args.js b/static/soffice_args.js
index 4db43905aa07..7b214dd6aaf1 100644
--- a/static/soffice_args.js
+++ b/static/soffice_args.js
@@ -1 +1 @@
-Module['arguments'] = ['/android/default-document/example.odt'];
+Module['arguments'] = ['/android/default-document/example2.odt'];


[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: svx/inc

2021-11-15 Thread Adolfo Jayme Barrientos (via logerrit)
 svx/inc/numberingtype.hrc |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a2f6043f26e8b4025c2143972fbe533b17c40257
Author: Adolfo Jayme Barrientos 
AuthorDate: Mon Nov 15 11:54:42 2021 -0600
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Nov 15 11:54:42 2021 -0600

Just remove these pointless apostils

None of the other items in the list have “Upper” or “Lower” [sic]; the 
strings
are self-explanatory.

Follow-up of commit 3165f0ff32b002a6efbc61af4f778ba4075b496e

Change-Id: I3ba88cfca080708daeb76ba3af0a1ae196b2fd85

diff --git a/svx/inc/numberingtype.hrc b/svx/inc/numberingtype.hrc
index 5ba335ae4eae..b66c86d35459 100644
--- a/svx/inc/numberingtype.hrc
+++ b/svx/inc/numberingtype.hrc
@@ -54,8 +54,8 @@ const std::pair 
RID_SVXSTRARY_NUMBERINGTYPE[] =
 { /* CHARS_CYRILLIC_LOWER_LETTER_SR   */ 
NC_("RID_SVXSTRARY_NUMBERINGTYPE", "а, б, .., аа, аб, ... (Serbian)") , 49 
},
 { /* CHARS_CYRILLIC_UPPER_LETTER_N_SR */ 
NC_("RID_SVXSTRARY_NUMBERINGTYPE", "А, Б, .., Аа, Бб, ... (Serbian)") , 50 
},
 { /* CHARS_CYRILLIC_LOWER_LETTER_N_SR */ 
NC_("RID_SVXSTRARY_NUMBERINGTYPE", "а, б, .., аа, бб, ... (Serbian)") , 51 
},
-{ /* CHARS_GREEK_UPPER_LETTER */ 
NC_("RID_SVXSTRARY_NUMBERINGTYPE", "Α, Β, Γ, ... (Greek Upper Numerals)"),
52 },
-{ /* CHARS_GREEK_LOWER_LETTER */ 
NC_("RID_SVXSTRARY_NUMBERINGTYPE", "α, β, γ, ... (Greek Lower Numerals)"),
53 },
+{ /* CHARS_GREEK_UPPER_LETTER */ 
NC_("RID_SVXSTRARY_NUMBERINGTYPE", "Α, Β, Γ, ... (Greek)"),52 },
+{ /* CHARS_GREEK_LOWER_LETTER */ 
NC_("RID_SVXSTRARY_NUMBERINGTYPE", "α, β, γ, ... (Greek)"),53 },
 { /* NUMBER_HEBREW*/ 
NC_("RID_SVXSTRARY_NUMBERINGTYPE", "א...י, יא...כ, ...") ,  56 
},
 { /* CHARS_HEBREW */ 
NC_("RID_SVXSTRARY_NUMBERINGTYPE", "א...ת, אא...תת, ...") , 33 
},
 { /* NUMBER_ARABIC_INDIC  */ 
NC_("RID_SVXSTRARY_NUMBERINGTYPE", "١, ٢, ٣, ٤, ... (Arabic)"), 57 
},


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

2021-11-15 Thread Stephan Bergmann (via logerrit)
 ucb/source/ucp/webdav-curl/CurlSession.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b56ff590a3bd2d09b8f72f0ec1030505e59f9008
Author: Stephan Bergmann 
AuthorDate: Mon Nov 15 17:11:53 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Nov 15 19:32:01 2021 +0100

fix typo in comment

Change-Id: I267390e6d7251ec59c6374ca904ccba16f2a94bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125253
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Jenkins

diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx 
b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index 8be732e592a6..16cd1c0a6081 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -149,7 +149,7 @@ struct CurlOption
 #if SAL_TYPES_SIZEOFLONG == 4
 // According to mst this might get used "if one of the options to set 
stream size like
 // CURLOPT_INFILESIZE_LARGE were used but it's not the case currently", so 
keep this ctor
-// around as deleted in case it would ever becomes necessary to extend 
Value with a curl_off_t
+// around as deleted in case it would ever become necessary to extend 
Value with a curl_off_t
 // case:
 CurlOption(CURLoption, curl_off_t, char const*) = delete;
 #endif


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

2021-11-15 Thread Julien Nabet (via logerrit)
 sc/qa/perf/scperfobj.cxx |   58 ++-
 1 file changed, 28 insertions(+), 30 deletions(-)

New commits:
commit b6f8611cf9ae565d4cdf8b6d41f444ad63e3502f
Author: Julien Nabet 
AuthorDate: Sat Nov 6 14:03:11 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Nov 15 19:32:35 2021 +0100

loplugin:simplifyconstruct/elidestringvar/stringviewparam in scperfobj.cxx

make sc.perfcheck
=>
/home/julien/lo/libreoffice/sc/qa/perf/scperfobj.cxx:212:24: error: 
simplify [loplugin:simplifyconstruct]
table::CellAddress aBaseAddress = table::CellAddress(0,0,0);

/home/julien/lo/libreoffice/sc/qa/perf/scperfobj.cxx:222:29: error: 
simplify [loplugin:simplifyconstruct]
table::CellRangeAddress aCellRangeAddress = 
table::CellRangeAddress(0,1,0,2,999);

^~~~
/home/julien/lo/libreoffice/sc/qa/perf/scperfobj.cxx:192:83: error: replace 
single use of literal 'rtl::OUString' variable with a literal 
[loplugin:elidestringvar]
uno::Reference< sheet::XNamedRanges > 
xNamedRanges(xPropSet->getPropertyValue(aNamedRangesPropertyString), 
UNO_QUERY_THROW);

  ^~
/home/julien/lo/libreoffice/sc/qa/perf/scperfobj.cxx:191:14: note: literal 
'rtl::OUString' variable defined here [loplugin:elidestringvar]
OUString aNamedRangesPropertyString("NamedRanges");
/home/julien/lo/libreoffice/sc/qa/perf/scperfobj.cxx:217:40: error: replace 
single use of literal 'rtl::OUString' variable with a literal 
[loplugin:elidestringvar]
xNamedRanges->addNewByName(aName1, aContent1, aBaseAddress, nType);
   ^
/home/julien/lo/libreoffice/sc/qa/perf/scperfobj.cxx:214:14: note: literal 
'rtl::OUString' variable defined here [loplugin:elidestringvar]
OUString aContent1("B4999");
~^~
/home/julien/lo/libreoffice/sc/qa/perf/scperfobj.cxx:217:32: error: replace 
single use of literal 'rtl::OUString' variable with a literal 
[loplugin:elidestringvar]
xNamedRanges->addNewByName(aName1, aContent1, aBaseAddress, nType);
   ^~
/home/julien/lo/libreoffice/sc/qa/perf/scperfobj.cxx:215:14: note: literal 
'rtl::OUString' variable defined here [loplugin:elidestringvar]
OUString aName1("single_added");
~^~
/home/julien/lo/libreoffice/sc/qa/perf/scperfobj.cxx:244:25: error: replace 
single use of literal 'rtl::OUString' variable with a literal 
[loplugin:elidestringvar]
xSheets->copyByName(aSourceSheetName, aTargetSheetName, 70);
^~~~
/home/julien/lo/libreoffice/sc/qa/perf/scperfobj.cxx:240:14: note: literal 
'rtl::OUString' variable defined here [loplugin:elidestringvar]
OUString aSourceSheetName = "aSheet_2";
~^
/home/julien/lo/libreoffice/sc/qa/perf/scperfobj.cxx:244:43: error: replace 
single use of literal 'rtl::OUString' variable with a literal 
[loplugin:elidestringvar]
xSheets->copyByName(aSourceSheetName, aTargetSheetName, 70);
  ^~~~
/home/julien/lo/libreoffice/sc/qa/perf/scperfobj.cxx:241:14: note: literal 
'rtl::OUString' variable defined here [loplugin:elidestringvar]
OUString aTargetSheetName = "aCopiedSheet";

/home/julien/lo/libreoffice/sc/qa/perf/scperfobj.cxx:110:67: error: replace 
function parameter of type 'const rtl::OUString &' with 'std::u16string_view' 
[loplugin:stringviewparam]
uno::Reference< uno::XInterface > ScPerfObj::init(const OUString& aFileName)
  ^
/home/julien/lo/libreoffice/sc/qa/perf/scperfobj.cxx:59:60: note: previous 
declaration is here [loplugin:stringviewparam]
uno::Reference< uno::XInterface > init(const OUString& aFileName);
   ^

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

diff --git a/sc/qa/perf/scperfobj.cxx b/sc/qa/perf/scperfobj.cxx
index 3a45daabbae2..575327e7eab0 100644
--- a/sc/qa/perf/scperfobj.cxx
+++ b/sc/qa/perf/scperfobj.cxx
@@ -7,6 +7,10 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
+
+#include 
+
 #include 
 
 #include 
@@ -56,7 +60,7 @@ public:
 
 virtual void tearDown() override;
 
-uno::Reference< uno::XInterface > init(const OUString& aFileName);
+uno::Reference< uno::XInterface > init(std::u16string_view aFileName);
 
 CPPUNIT_TEST_SUITE(ScPerfObj);
 CPPUNIT_TEST(testSheetFin

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

2021-11-15 Thread Michael Weghorn (via logerrit)
 vcl/source/app/salplug.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 584934b70de97dcbbb91c5a30a5401f6ed57f29b
Author: Michael Weghorn 
AuthorDate: Mon Nov 15 17:11:45 2021 +0100
Commit: Michael Weghorn 
CommitDate: Mon Nov 15 19:44:44 2021 +0100

qt6: Fix crash on exit

Extend the solution from

commit fd4bcd5f33fed46cacaa00f90a271b18b6355345
Date:   Fri Jun 11 11:50:39 2021 +0200

qt5/kf5: Fix crash on exit

to qt6 as well, after seeing equivalent crashes there.

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

diff --git a/vcl/source/app/salplug.cxx b/vcl/source/app/salplug.cxx
index d2cfc91e3c57..7c2a91cec471 100644
--- a/vcl/source/app/salplug.cxx
+++ b/vcl/source/app/salplug.cxx
@@ -108,7 +108,8 @@ SalInstance* tryInstance( const OUString& rModuleBase, bool 
bForce = false )
  */
 if (aUsedModuleBase == "gtk4" || aUsedModuleBase == "gtk3" ||
 aUsedModuleBase == "gtk3_kde5" || aUsedModuleBase == "kf5" 
||
-aUsedModuleBase == "qt5" || aUsedModuleBase == "win")
+aUsedModuleBase == "qt5" || aUsedModuleBase == "qt6" ||
+aUsedModuleBase == "win")
 {
 pCloseModule = nullptr;
 }


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

2021-11-15 Thread Andrea Gelmini (via logerrit)
 vcl/qa/cppunit/physicalfontcollection.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e84592e551d27d5f09e2db26b1495ba2e4069c96
Author: Andrea Gelmini 
AuthorDate: Sun Nov 14 19:54:07 2021 +0100
Commit: Julien Nabet 
CommitDate: Mon Nov 15 20:24:14 2021 +0100

Fix typo in code

Change-Id: Idf4fcf16a11f62334ad77db05974a55b5de5d718
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125206
Reviewed-by: Chris Sherlock 
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/vcl/qa/cppunit/physicalfontcollection.cxx 
b/vcl/qa/cppunit/physicalfontcollection.cxx
index 98ac902032ff..a147fb1dea4f 100644
--- a/vcl/qa/cppunit/physicalfontcollection.cxx
+++ b/vcl/qa/cppunit/physicalfontcollection.cxx
@@ -449,7 +449,7 @@ void 
VclPhysicalFontCollectionTest::testShouldMatchDecorativeFamily()
 = aFontCollection.FindOrCreateFontFamily("decorative");
 
 FontAttributes aFontAttr;
-aFontAttr.SetFamilyName("decoractive");
+aFontAttr.SetFamilyName("decorative");
 aFontAttr.SetFamilyType(FAMILY_DECORATIVE);
 aFontAttr.SetWeight(WEIGHT_MEDIUM);
 TestFontFace* pFontFace = new TestFontFace(aFontAttr, FONTID);


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

2021-11-15 Thread Noel Grandin (via logerrit)
 include/rtl/ustring.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit fe65c692cfbf128d55c75207f6d1452713fd72f6
Author: Noel Grandin 
AuthorDate: Mon Nov 15 15:56:05 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 15 20:58:51 2021 +0100

OUStringConstExpr should convert to 'const OUString&'

to avoid creating unnecessary temporaries

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

diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index 6cf92e1d3599..e5b58be8c52d 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -161,7 +161,7 @@ public:
 // no destructor necessary because we know we are pointing at a 
compile-time
 // constant OUStringLiteral, which bypasses ref-counting.
 
-inline operator OUString() const;
+inline operator const OUString&() const;
 
 private:
 rtl_uString* pData;
@@ -3299,7 +3299,7 @@ private:
 
 #if defined LIBO_INTERNAL_ONLY
 // Can only define this after we define OUString
-inline OUStringConstExpr::operator OUString() const { return 
OUString::unacquired(&pData); }
+inline OUStringConstExpr::operator const OUString &() const { return 
OUString::unacquired(&pData); }
 #endif
 
 #if defined LIBO_INTERNAL_ONLY


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

2021-11-15 Thread Noel Grandin (via logerrit)
 filter/source/svg/svgexport.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit b947e1899e8c3bacd134418870a0fd6bee4101bc
Author: Noel Grandin 
AuthorDate: Mon Nov 15 15:56:22 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Nov 15 20:59:10 2021 +0100

use OUStringLiteral in SVGFilter

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

diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index bda6aa46cc8c..a9d02b3142ca 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -210,7 +210,7 @@ public:
 }
 virtual void growCharSet( SVGFilter::UCharSetMapMap & aTextFieldCharSets ) 
const override
 {
-static const OUString sFieldId = aOOOAttrFooterField;
+static constexpr OUStringLiteral sFieldId = aOOOAttrFooterField;
 implGrowCharSet( aTextFieldCharSets, text, sFieldId );
 }
 };
@@ -2649,9 +2649,9 @@ IMPL_LINK( SVGFilter, CalcFieldHdl, EditFieldInfo*, 
pInfo, void )
 }
 bool bHasCharSetMap = mTextFieldCharSets.find( 
mCreateOjectsCurrentMasterPage ) != mTextFieldCharSets.end();
 
-static const OUString aHeaderId( NSPREFIX "header-field" );
-static const OUString aFooterId( aOOOAttrFooterField );
-static const OUString aDateTimeId( aOOOAttrDateTimeField );
+static constexpr OUStringLiteral aHeaderId( NSPREFIX 
"header-field" );
+static constexpr OUStringLiteral aFooterId( aOOOAttrFooterField );
+static constexpr OUStringLiteral aDateTimeId( 
aOOOAttrDateTimeField );
 static const OUString aVariableDateTimeId( aOOOAttrDateTimeField + 
"-variable" );
 
 const UCharSet * pCharSet = nullptr;


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

2021-11-15 Thread Caolán McNamara (via logerrit)
 sw/source/core/unocore/unochart.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2429b8f17ed1d1eb77e314e4bd0b3aae6d4f9acf
Author: Caolán McNamara 
AuthorDate: Mon Nov 15 09:07:56 2021 +
Commit: Caolán McNamara 
CommitDate: Mon Nov 15 21:14:56 2021 +0100

cid#1401328 silence Uncaught exception

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

diff --git a/sw/source/core/unocore/unochart.cxx 
b/sw/source/core/unocore/unochart.cxx
index 44d1f19e9dcf..e5116fed96cf 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -93,7 +93,7 @@ SwChartLockController_Helper::SwChartLockController_Helper( 
SwDoc *pDocument ) :
 SwChartLockController_Helper::~SwChartLockController_Helper()
 {
 if (m_pDoc)   // still connected?
-Disconnect();
+suppress_fun_call_w_exception(Disconnect());
 }
 
 void SwChartLockController_Helper::StartOrContinueLocking()


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

2021-11-15 Thread Michael Stahl (via logerrit)
 sw/source/core/docnode/ndnum.cxx |2 ++
 sw/source/core/docnode/nodes.cxx |   18 --
 2 files changed, 14 insertions(+), 6 deletions(-)

New commits:
commit d405d73c60d9a86631f592ba4b4cc97ee43fec38
Author: Michael Stahl 
AuthorDate: Mon Nov 15 17:29:59 2021 +0100
Commit: Caolán McNamara 
CommitDate: Mon Nov 15 21:15:48 2021 +0100

tdf#121546 sw: don't use undo array's m_pOutlineNodes

It's pointless.

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

diff --git a/sw/source/core/docnode/ndnum.cxx b/sw/source/core/docnode/ndnum.cxx
index e27755f9ed33..89a7acb098b7 100644
--- a/sw/source/core/docnode/ndnum.cxx
+++ b/sw/source/core/docnode/ndnum.cxx
@@ -38,6 +38,8 @@ bool SwOutlineNodes::Seek_Entry(SwNode* rP, size_type* pnPos) 
const
 
 void SwNodes::UpdateOutlineNode(SwNode & rNd)
 {
+assert(IsDocNodes()); // no point in m_pOutlineNodes for undo nodes
+
 SwTextNode * pTextNd = rNd.GetTextNode();
 
 if (!pTextNd || !pTextNd->IsOutlineStateChanged())
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 5942ddb65569..aa9dd63f4bfd 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -110,6 +110,16 @@ SwNodes::~SwNodes()
 m_pEndOfContent.reset();
 }
 
+static bool IsInsertOutline(SwNodes const& rNodes, SwNodeOffset const nIndex)
+{
+if (!rNodes.IsDocNodes())
+{
+return false;
+}
+return nIndex < rNodes.GetEndOfRedlines().StartOfSectionNode()->GetIndex()
+|| rNodes.GetEndOfRedlines().GetIndex() < nIndex;
+}
+
 void SwNodes::ChgNode( SwNodeIndex const & rDelPos, SwNodeOffset nSz,
 SwNodeIndex& rInsPos, bool bNewFrames )
 {
@@ -125,9 +135,7 @@ void SwNodes::ChgNode( SwNodeIndex const & rDelPos, 
SwNodeOffset nSz,
 
 // NEVER include nodes from the RedLineArea
 SwNodeOffset nNd = rInsPos.GetIndex();
-bool bInsOutlineIdx = (
-rNds.GetEndOfRedlines().StartOfSectionNode()->GetIndex() >= nNd ||
-nNd >= rNds.GetEndOfRedlines().GetIndex() );
+bool const bInsOutlineIdx = IsInsertOutline(rNds, nNd);
 
 if( &rNds == this ) // if in the same node array -> move
 {
@@ -484,9 +492,7 @@ bool SwNodes::MoveNodes( const SwNodeRange& aRange, SwNodes 
& rNodes,
 
 // NEVER include nodes from the RedLineArea
 SwNodeOffset nNd = aIdx.GetIndex();
-bool bInsOutlineIdx = ( rNodes.GetEndOfRedlines().
-StartOfSectionNode()->GetIndex() >= nNd ||
-nNd >= rNodes.GetEndOfRedlines().GetIndex() );
+bool const bInsOutlineIdx = IsInsertOutline(rNodes, nNd);
 
 if( bNewFrames )
 // delete all frames


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

2021-11-15 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/calc_tests9/pivotTable.py |   35 -
 sc/qa/uitest/data/pivotTable.ods   |binary
 sc/source/ui/uitest/uiobject.cxx   |   19 +
 3 files changed, 53 insertions(+), 1 deletion(-)

New commits:
commit 35d9d085436e159bdeb6cba9c94865d6346af530
Author: Xisco Fauli 
AuthorDate: Mon Nov 15 21:07:01 2021 +0100
Commit: Xisco Fauli 
CommitDate: Mon Nov 15 22:32:54 2021 +0100

uitest: sc: add support for pivot table popup

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

diff --git a/sc/qa/uitest/calc_tests9/pivotTable.py 
b/sc/qa/uitest/calc_tests9/pivotTable.py
index b7a4fd328b2a..559073ab0507 100644
--- a/sc/qa/uitest/calc_tests9/pivotTable.py
+++ b/sc/qa/uitest/calc_tests9/pivotTable.py
@@ -7,10 +7,11 @@
 from uitest.framework import UITestCase
 from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.uihelper.common import get_state_as_dict, get_url_for_data_file
+from libreoffice.calc.document import get_cell_by_position
 
 class pivotTable(UITestCase):
 
-   def test_cancelButton(self):
+def test_cancelButton(self):
 
 # This is basically a test for cf93998eb5abc193d95ae5433bf4dfd11a9d62d8
 # Without the fix in place, this test would have crashed
@@ -60,4 +61,36 @@ class pivotTable(UITestCase):
 
 self.assertEqual('true', 
get_state_as_dict(xEmptyLine)['Selected'])
 
+def test_popup(self):
+with self.ui_test.load_file(get_url_for_data_file("pivotTable.ods")) 
as calc_doc:
+
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+
+self.assertEqual("a", get_cell_by_position(calc_doc, 0, 3, 
1).getString())
+self.assertEqual("b", get_cell_by_position(calc_doc, 0, 3, 
2).getString())
+self.assertEqual("m", get_cell_by_position(calc_doc, 0, 4, 
1).getString())
+self.assertEqual("n", get_cell_by_position(calc_doc, 0, 4, 
2).getString())
+self.assertEqual("1", get_cell_by_position(calc_doc, 0, 5, 
1).getString())
+self.assertEqual("1", get_cell_by_position(calc_doc, 0, 5, 
2).getString())
+
+gridwin.executeAction("LAUNCH", mkPropertyValues({"PIVOTTABLE": 
"", "COL": "3", "ROW": "0"}))
+xFloatWindow = self.xUITest.getFloatWindow()
+xCheckListMenu = xFloatWindow.getChild("check_list_menu")
+
+xTreeList = xCheckListMenu.getChild("check_list_box")
+xFirstEntry = xTreeList.getChild("0")
+
+xFirstEntry.executeAction("CLICK", tuple())
+
+xOkBtn = xFloatWindow.getChild("ok")
+xOkBtn.executeAction("CLICK", tuple())
+
+self.assertEqual("b", get_cell_by_position(calc_doc, 0, 3, 
1).getString())
+self.assertEqual("Total Result", get_cell_by_position(calc_doc, 0, 
3, 2).getString())
+self.assertEqual("n", get_cell_by_position(calc_doc, 0, 4, 
1).getString())
+self.assertEqual("", get_cell_by_position(calc_doc, 0, 4, 
2).getString())
+self.assertEqual("1", get_cell_by_position(calc_doc, 0, 5, 
1).getString())
+self.assertEqual("1", get_cell_by_position(calc_doc, 0, 5, 
2).getString())
+
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/data/pivotTable.ods b/sc/qa/uitest/data/pivotTable.ods
new file mode 100644
index ..cbb773857605
Binary files /dev/null and b/sc/qa/uitest/data/pivotTable.ods differ
diff --git a/sc/source/ui/uitest/uiobject.cxx b/sc/source/ui/uitest/uiobject.cxx
index d93da2619a77..14e464c0bf20 100644
--- a/sc/source/ui/uitest/uiobject.cxx
+++ b/sc/source/ui/uitest/uiobject.cxx
@@ -234,6 +234,25 @@ void ScGridWinUIObject::execute(const OUString& rAction,
 SCCOL nCol = itrCol->second.toUInt32();
 mxGridWindow->LaunchAutoFilterMenu(nCol, nRow);
 }
+else if ( rParameters.find("PIVOTTABLE") != rParameters.end())
+{
+auto itrCol = rParameters.find("COL");
+if (itrCol == rParameters.end())
+{
+SAL_WARN("sc.uitest", "missing COL parameter");
+return;
+}
+
+auto itrRow = rParameters.find("ROW");
+if (itrRow == rParameters.end())
+{
+SAL_WARN("sc.uitest", "missing ROW parameter");
+return;
+}
+SCROW nRow = itrRow->second.toUInt32();
+SCCOL nCol = itrCol->second.toUInt32();
+mxGridWindow->LaunchDPFieldMenu(nCol, nRow);
+}
 else if ( rParameters.find("SELECTMENU") != rParameters.end())
 {
 auto itrCol = rParameters.find("COL");


[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-7-0' - sd/source

2021-11-15 Thread Tor Lillqvist (via logerrit)
 sd/source/ui/view/DocumentRenderer.cxx |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 28389a78c38535f0b4229ebc43797bd90d7a15a2
Author: Tor Lillqvist 
AuthorDate: Wed Nov 10 14:34:39 2021 +0200
Commit: Aron Budea 
CommitDate: Tue Nov 16 03:28:33 2021 +0100

tdf#145354: Revert "tdf#91362: Use document paper size for printing slides"

Reverting it has been suggested a couple of times over the years, for
instance in
https://bugs.documentfoundation.org/show_bug.cgi?id=91362#c23 and in
https://bugs.documentfoundation.org/show_bug.cgi?id=145354#c41 .

The paper size for a presentation document is typically just made-up
dimensions with no connection to any actual paper size. (Or
transparency size.) What matters is the aspect ratio.

This reverts commit 57991f885e60d04e93bf5004d4fdceee7d29f3d8

Change-Id: I5099039f5fdb836694f2b100fb28093584e8294b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125111
Tested-by: Aron Budea 
Reviewed-by: Aron Budea 

diff --git a/sd/source/ui/view/DocumentRenderer.cxx 
b/sd/source/ui/view/DocumentRenderer.cxx
index 3c3f44de011d..53fe6770bb5a 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -153,7 +153,7 @@ namespace {
 return nQuality;
 }
 
-bool IsPaperSize() const
+bool IsPageSize() const
 {
 return GetBoolValue("PageOptions", sal_Int32(1));
 }
@@ -173,10 +173,10 @@ namespace {
 return GetBoolValue("PrintProspect", false);
 }
 
-bool IsPrinterPreferred() const
+bool IsPrinterPreferred(DocumentType eDocType) const
 {
-return IsTilePage() || IsPaperSize() || IsBooklet() ||
-IsNotes() || IsHandout() || IsOutline();
+bool bIsDraw = eDocType == DocumentType::Draw;
+return IsTilePage() || IsPageSize() || IsBooklet() || (!bIsDraw && 
!IsNotes());
 }
 
 bool IsPrintExcluded() const
@@ -1374,7 +1374,7 @@ private:
 
 // Draw and Notes should usually abide by their specified paper size
 Size aPaperSize;
-if (!mpOptions->IsPrinterPreferred())
+if (!mpOptions->IsPrinterPreferred(pDocument->GetDocumentType()))
 {
 aPaperSize.setWidth(rInfo.maPageSize.Width());
 aPaperSize.setHeight(rInfo.maPageSize.Height());
@@ -1387,7 +1387,7 @@ private:
 
 maPrintSize = awt::Size(aPaperSize.Width(), aPaperSize.Height());
 
-if (mpOptions->IsPrinterPreferred())
+if (mpOptions->IsPrinterPreferred(pDocument->GetDocumentType()))
 {
 if( (rInfo.meOrientation == Orientation::Landscape &&
   (aPaperSize.Width() < aPaperSize.Height()))
@@ -1448,7 +1448,7 @@ private:
 aInfo.msTimeDate += GetSdrGlobalData().GetLocaleData()->getTime( 
::tools::Time( ::tools::Time::SYSTEM ), false );
 
 // Draw and Notes should usually use specified paper size when printing
-if (!mpOptions->IsPrinterPreferred())
+if 
(!mpOptions->IsPrinterPreferred(mrBase.GetDocShell()->GetDocumentType()))
 {
 aInfo.maPrintSize = mrBase.GetDocument()->GetSdPage(0, 
PageKind::Standard)->GetSize();
 maPrintSize = awt::Size(aInfo.maPrintSize.Width(),
@@ -1770,7 +1770,7 @@ private:
 OSL_ASSERT(pDocument != nullptr);
 SdPage& rHandoutPage (*pDocument->GetSdPage(0, PageKind::Handout));
 
-const bool bScalePage (mpOptions->IsPaperSize());
+const bool bScalePage (mpOptions->IsPageSize());
 
 sal_uInt16 nPaperBin;
 if ( ! mpOptions->IsPaperBin())
@@ -1930,7 +1930,7 @@ private:
 // is it possible that the page size changed?
 const Size aPageSize = pPage->GetSize();
 
-if (mpOptions->IsPrinterPreferred())
+if (mpOptions->IsPageSize())
 {
 const double fHorz 
(static_cast(rInfo.maPrintSize.Width())  / aPageSize.Width());
 const double fVert 
(static_cast(rInfo.maPrintSize.Height()) / aPageSize.Height());
@@ -2159,7 +2159,7 @@ private:
 //(without the unprintable borders).
 // 3. Split the page into parts of the size of the
 // printable area.
-const bool bScalePage (mpOptions->IsPaperSize());
+const bool bScalePage (mpOptions->IsPageSize());
 const bool bCutPage (mpOptions->IsCutPage());
 MapMode aMap (rInfo.maMap);
 if ( (bScalePage || bCutPage) && CheckForFrontBackPages( nPageIndex ) )


[Libreoffice-commits] core.git: icon-themes/colibre icon-themes/colibre_svg

2021-11-15 Thread Rizal Muttaqin (via logerrit)
 icon-themes/colibre/cmd/32/developmenttoolsdockingwindow.png |binary
 icon-themes/colibre/cmd/lc_developmenttoolsdockingwindow.png |binary
 icon-themes/colibre/cmd/sc_developmenttoolsdockingwindow.png |binary
 icon-themes/colibre_svg/cmd/32/developmenttoolsdockingwindow.svg |1 +
 icon-themes/colibre_svg/cmd/lc_developmenttoolsdockingwindow.svg |1 +
 icon-themes/colibre_svg/cmd/sc_developmenttoolsdockingwindow.svg |1 +
 6 files changed, 3 insertions(+)

New commits:
commit b40877d31e8d7d0102ac7dedc67eb6e91067d27d
Author: Rizal Muttaqin 
AuthorDate: Tue Nov 16 06:42:55 2021 +0700
Commit: Rizal Muttaqin 
CommitDate: Tue Nov 16 05:45:15 2021 +0100

Colibre: tdf#144036 add UNO Object Inspector

Change-Id: Ic753ee4d3f4d23bc08b299dba2b6edd43bc0162f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125266
Tested-by: Jenkins
Reviewed-by: Rizal Muttaqin 

diff --git a/icon-themes/colibre/cmd/32/developmenttoolsdockingwindow.png 
b/icon-themes/colibre/cmd/32/developmenttoolsdockingwindow.png
new file mode 100644
index ..1537eb2886ff
Binary files /dev/null and 
b/icon-themes/colibre/cmd/32/developmenttoolsdockingwindow.png differ
diff --git a/icon-themes/colibre/cmd/lc_developmenttoolsdockingwindow.png 
b/icon-themes/colibre/cmd/lc_developmenttoolsdockingwindow.png
new file mode 100644
index ..0a44c934e7a8
Binary files /dev/null and 
b/icon-themes/colibre/cmd/lc_developmenttoolsdockingwindow.png differ
diff --git a/icon-themes/colibre/cmd/sc_developmenttoolsdockingwindow.png 
b/icon-themes/colibre/cmd/sc_developmenttoolsdockingwindow.png
new file mode 100644
index ..1964c2767ead
Binary files /dev/null and 
b/icon-themes/colibre/cmd/sc_developmenttoolsdockingwindow.png differ
diff --git a/icon-themes/colibre_svg/cmd/32/developmenttoolsdockingwindow.svg 
b/icon-themes/colibre_svg/cmd/32/developmenttoolsdockingwindow.svg
new file mode 100644
index ..dcfc239f1b46
--- /dev/null
+++ b/icon-themes/colibre_svg/cmd/32/developmenttoolsdockingwindow.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg";>
\ No newline at end of file
diff --git a/icon-themes/colibre_svg/cmd/lc_developmenttoolsdockingwindow.svg 
b/icon-themes/colibre_svg/cmd/lc_developmenttoolsdockingwindow.svg
new file mode 100644
index ..2b276e4af5aa
--- /dev/null
+++ b/icon-themes/colibre_svg/cmd/lc_developmenttoolsdockingwindow.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg";>
\ No newline at end of file
diff --git a/icon-themes/colibre_svg/cmd/sc_developmenttoolsdockingwindow.svg 
b/icon-themes/colibre_svg/cmd/sc_developmenttoolsdockingwindow.svg
new file mode 100644
index ..09c2fa9a12ae
--- /dev/null
+++ b/icon-themes/colibre_svg/cmd/sc_developmenttoolsdockingwindow.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg";>
\ No newline at end of file


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

2021-11-15 Thread Miklos Vajna (via logerrit)
 chart2/source/inc/chartview/ExplicitScaleValues.hxx |2 +-
 chart2/source/view/axes/ScaleAutomatism.cxx |   12 ++--
 chart2/source/view/axes/VAxisBase.cxx   |2 +-
 chart2/source/view/axes/VCartesianAxis.cxx  |4 ++--
 chart2/source/view/inc/PlottingPositionHelper.hxx   |8 
 chart2/source/view/main/ChartView.cxx   |2 +-
 6 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 1c90d26f455cf5f7a066eeb4fdcbd6fca2cf60cd
Author: Miklos Vajna 
AuthorDate: Mon Nov 15 20:20:52 2021 +0100
Commit: Miklos Vajna 
CommitDate: Tue Nov 16 08:05:42 2021 +0100

chart2: disambiguate ShiftedCategoryPosition

There are two of these: one sal_Bool in a .idl file and a bool in a .hxx
file. They need to be printed differently with SAL_DEBUG(), so rename
the C++ one to avoid confusion.

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

diff --git a/chart2/source/inc/chartview/ExplicitScaleValues.hxx 
b/chart2/source/inc/chartview/ExplicitScaleValues.hxx
index 1aa9a26c46d6..a49dddeb6658 100644
--- a/chart2/source/inc/chartview/ExplicitScaleValues.hxx
+++ b/chart2/source/inc/chartview/ExplicitScaleValues.hxx
@@ -48,7 +48,7 @@ struct OOO_DLLPUBLIC_CHARTVIEW ExplicitScaleData
 css::uno::Reference Scaling;
 
 sal_Int32 AxisType; //see css::chart2::AxisType
-bool ShiftedCategoryPosition;
+bool m_bShiftedCategoryPosition;
 sal_Int32 TimeResolution; //constant of type 
css::chart::TimeUnit
 Date NullDate;
 };
diff --git a/chart2/source/view/axes/ScaleAutomatism.cxx 
b/chart2/source/view/axes/ScaleAutomatism.cxx
index 7748df078ec6..24195c8fdc93 100644
--- a/chart2/source/view/axes/ScaleAutomatism.cxx
+++ b/chart2/source/view/axes/ScaleAutomatism.cxx
@@ -65,7 +65,7 @@ ExplicitScaleData::ExplicitScaleData()
 , Origin(0.0)
 , Orientation(css::chart2::AxisOrientation_MATHEMATICAL)
 , AxisType(css::chart2::AxisType::REALNUMBER)
-, ShiftedCategoryPosition(false)
+, m_bShiftedCategoryPosition(false)
 , TimeResolution(css::chart::TimeUnit::DAY)
 , NullDate(30,12,1899)
 {
@@ -202,7 +202,7 @@ void ScaleAutomatism::calculateExplicitScaleAndIncrement(
 
 //fill explicit increment
 
-rExplicitScale.ShiftedCategoryPosition = 
m_aSourceScale.ShiftedCategoryPosition;
+rExplicitScale.m_bShiftedCategoryPosition = 
m_aSourceScale.ShiftedCategoryPosition;
 bool bIsLogarithm = false;
 
 //minimum and maximum of the ExplicitScaleData may be changed if allowed
@@ -242,7 +242,7 @@ void 
ScaleAutomatism::calculateExplicitIncrementAndScaleForCategory(
 // no scaling for categories
 rExplicitScale.Scaling.clear();
 
-if( rExplicitScale.ShiftedCategoryPosition )
+if( rExplicitScale.m_bShiftedCategoryPosition )
 rExplicitScale.Maximum += 1.0;
 
 // ensure that at least one category is visible
@@ -565,13 +565,13 @@ void 
ScaleAutomatism::calculateExplicitIncrementAndScaleForDateTimeAxis(
 switch( rExplicitScale.TimeResolution )
 {
 case DAY:
-if( rExplicitScale.ShiftedCategoryPosition )
+if( rExplicitScale.m_bShiftedCategoryPosition )
 ++aMaxDate; //for explicit scales we need one interval more 
(maximum excluded)
 break;
 case MONTH:
 aMinDate.SetDay(1);
 aMaxDate.SetDay(1);
-if( rExplicitScale.ShiftedCategoryPosition )
+if( rExplicitScale.m_bShiftedCategoryPosition )
 aMaxDate = DateHelper::GetDateSomeMonthsAway(aMaxDate,1);//for 
explicit scales we need one interval more (maximum excluded)
 if( DateHelper::IsLessThanOneMonthAway( aMinDate, aMaxDate ) )
 {
@@ -586,7 +586,7 @@ void 
ScaleAutomatism::calculateExplicitIncrementAndScaleForDateTimeAxis(
 aMinDate.SetMonth(1);
 aMaxDate.SetDay(1);
 aMaxDate.SetMonth(1);
-if( rExplicitScale.ShiftedCategoryPosition )
+if( rExplicitScale.m_bShiftedCategoryPosition )
 aMaxDate = DateHelper::GetDateSomeYearsAway(aMaxDate,1);//for 
explicit scales we need one interval more (maximum excluded)
 if( DateHelper::IsLessThanOneYearAway( aMinDate, aMaxDate ) )
 {
diff --git a/chart2/source/view/axes/VAxisBase.cxx 
b/chart2/source/view/axes/VAxisBase.cxx
index 6e6f40b65684..32a0458ea325 100644
--- a/chart2/source/view/axes/VAxisBase.cxx
+++ b/chart2/source/view/axes/VAxisBase.cxx
@@ -159,7 +159,7 @@ void VAxisBase::setExplicitScaleAndIncrement(
 void VAxisBase::createAllTickInfos( TickInfoArraysType& rAllTickInfos )
 {
 std::unique_ptr< TickFactory > apTickFactory( createTickFactory() );
-if( m_aScale.ShiftedCategoryPosition )
+if( m_aScale.m_bShiftedCategoryPosition )
 apTickFactory->getAllTicksShifted( rAllTickInfos );
 else
 apTickFactory->getAllTicks( rAllTickInfos );
diff --git a/ch