[Libreoffice-commits] core.git: toolkit/README

2021-03-12 Thread Tor Lillqvist (via logerrit)
 toolkit/README |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d5e215289b816742ed7a6d423565bf1d59a1d117
Author: Tor Lillqvist 
AuthorDate: Sat Mar 13 09:42:32 2021 +0200
Commit: Tor Lillqvist 
CommitDate: Sat Mar 13 09:42:59 2021 +0200

Minor improvement

Change-Id: I0814fe7e732715e73ad56e3b2c91618ba04ae35b

diff --git a/toolkit/README b/toolkit/README
index ea40b4d26590..b67f037b08cc 100644
--- a/toolkit/README
+++ b/toolkit/README
@@ -1,4 +1,4 @@
-"Abstract" windowing thing, UNO implementations of windowing stuff so that it
+"Abstract" windowing thing. UNO implementations of windowing stuff so that it
 can be used from Basic or Java. But also stuff that has no connection to Basic
 or Java.
 
@@ -7,5 +7,5 @@ might be inspired by it API-wise, perhaps. (If you know 
differently, feel free
 to improve this README file.)
 
 Note that toolkit/ is itself not really a toolkit, it is at root a
-reasonably simple wrapper of vcl/ - if you came here looking for a
-toolkit, please checkout vcl/ instead.
+reasonably simple wrapper of vcl/. If you came here looking for a
+toolkit, please look at vcl/ instead.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: breaking yield loops on forced quit.

2021-03-12 Thread Noel Grandin
Something like this:
https://gerrit.libreoffice.org/c/core/+/112409
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/inc vcl/qa vcl/source

2021-03-12 Thread Tomaž Vajngerl (via logerrit)
 vcl/inc/pdf/ExternalPDFStreams.hxx   |   12 
 vcl/qa/cppunit/PDFDocumentTest.cxx   |   12 
 vcl/qa/cppunit/data/DocumentWithNull.pdf |binary
 vcl/source/filter/ipdf/pdfdocument.cxx   |   12 +---
 vcl/source/gdi/pdfwriter_impl.cxx|   12 +---
 5 files changed, 38 insertions(+), 10 deletions(-)

New commits:
commit 90267d3dee8c0afe937c9aecb8561f6f158977f9
Author: Tomaž Vajngerl 
AuthorDate: Tue Mar 2 18:57:46 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Sat Mar 13 03:49:41 2021 +0100

tdf#140606 make PDF parsing more lenient and prevent a crash

If the external document can't be opened, it tried to continue
with the export anyway, which eventually lead to a crash. This
is fixed by handling this situation and prevent a crash, however
the part of the document in this case isn't exported.

The document couldn't be opened because of a parsing error - there
was a unexpected null character instead of a whitespace, which
made the parser panic. Fix this by making the parser more lenient
in such a situation when there is an unexpected null and try to
continue parsing.

Bug document seems to be created with a buggy PDF writer, but other
PDF readers don't complain when parsing the document so it looks to
be a valid. qpdf --check doesn't complain either.

Added a test that checks a document with a null parses.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111820
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 2c1ed5a5dad827cde032f27a4348e81be15889bc)

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

diff --git a/vcl/inc/pdf/ExternalPDFStreams.hxx 
b/vcl/inc/pdf/ExternalPDFStreams.hxx
index 3bd59478c212..de0819539e76 100644
--- a/vcl/inc/pdf/ExternalPDFStreams.hxx
+++ b/vcl/inc/pdf/ExternalPDFStreams.hxx
@@ -29,21 +29,25 @@ struct VCL_DLLPUBLIC ExternalPDFStream
 
 std::map& getCopiedResources() { return 
maCopiedResources; }
 
-filter::PDFDocument& getPDFDocument()
+std::shared_ptr& getPDFDocument()
 {
 if (!mpPDFDocument)
 {
 SvMemoryStream aPDFStream;
 aPDFStream.WriteBytes(maData.data(), maData.size());
 aPDFStream.Seek(0);
-mpPDFDocument = std::make_unique();
-if (!mpPDFDocument->Read(aPDFStream))
+auto pPDFDocument = std::make_shared();
+if (!pPDFDocument->Read(aPDFStream))
 {
 SAL_WARN("vcl.pdfwriter",
  "PDFWriterImpl::writeReferenceXObject: reading the 
PDF document failed");
 }
+else
+{
+mpPDFDocument = pPDFDocument;
+}
 }
-return *mpPDFDocument;
+return mpPDFDocument;
 }
 };
 
diff --git a/vcl/qa/cppunit/PDFDocumentTest.cxx 
b/vcl/qa/cppunit/PDFDocumentTest.cxx
index 66de7dfc77d4..9b0374f00341 100644
--- a/vcl/qa/cppunit/PDFDocumentTest.cxx
+++ b/vcl/qa/cppunit/PDFDocumentTest.cxx
@@ -156,6 +156,18 @@ CPPUNIT_TEST_FIXTURE(PDFDocumentTest, testParseBasicPDF)
 }
 }
 
+CPPUNIT_TEST_FIXTURE(PDFDocumentTest, testParseDocumentWithNullAsWhitespace)
+{
+// tdf#140606
+// Bug document contained a null, which cause the parser to panic,
+// but other PDF readers can handle the file well.
+
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"DocumentWithNull.pdf";
+vcl::filter::PDFDocument aDocument;
+SvFileStream aStream(aURL, StreamMode::READ);
+CPPUNIT_ASSERT(aDocument.Read(aStream));
+}
+
 namespace
 {
 vcl::filter::PDFObjectElement*
diff --git a/vcl/qa/cppunit/data/DocumentWithNull.pdf 
b/vcl/qa/cppunit/data/DocumentWithNull.pdf
new file mode 100644
index ..f6d926957366
Binary files /dev/null and b/vcl/qa/cppunit/data/DocumentWithNull.pdf differ
diff --git a/vcl/source/filter/ipdf/pdfdocument.cxx 
b/vcl/source/filter/ipdf/pdfdocument.cxx
index dd1355d924a8..64cf9dc4ef90 100644
--- a/vcl/source/filter/ipdf/pdfdocument.cxx
+++ b/vcl/source/filter/ipdf/pdfdocument.cxx
@@ -1327,12 +1327,18 @@ bool PDFDocument::Tokenize(SvStream& rStream, 
TokenizeMode eMode,
 }
 else
 {
-if (!rtl::isAsciiWhiteSpace(static_cast(ch)))
+auto uChar = static_cast(ch);
+// Be more lenient and allow unexpected null char
+if (!rtl::isAsciiWhiteSpace(uChar) && uChar != 0)
 {
-SAL_WARN("vcl.filter", "PDFDocument::Tokenize: 
unexpected character: "
-   << ch << " at byte position 
" << rStream.Tell());
+SAL_WARN("vcl.filter",
+ "P

[Libreoffice-commits] core.git: Branch 'feature/wasm' - 526 commits - accessibility/inc accessibility/Library_acc.mk accessibility/source autogen.sh avmedia/source basctl/inc basctl/source basegfx/inc

2021-03-12 Thread Jan-Marek Glogowski (via logerrit)
Rebased ref, commits from common ancestor:
commit ad7e5176410a5b56d39fe4cbefb959277ed0f865
Author: Jan-Marek Glogowski 
AuthorDate: Sat Mar 13 00:13:30 2021 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Sat Mar 13 00:13:30 2021 +0100

catchall

Change-Id: I8b4dea6870dc6698a03cd2607f98eb57971eca4b

diff --git a/Repository.mk b/Repository.mk
index fc40d0819ad6..139ae14ede47 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -201,9 +201,7 @@ $(eval $(call 
gb_Helper_register_executables_for_install,OOO,ooo, \
gengal \
$(if $(filter WNT,$(OS)),,uri-encode) \
$(if $(ENABLE_MACOSX_SANDBOX),, \
-   $(if $(DISABLE_GUI),, \
ui-previewer \
-   ) \
) \
$(if $(filter WNT,$(OS)), \
senddoc \
@@ -326,7 +324,6 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,ogltrans, \
 ))
 
 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
-   acc \
$(call gb_Helper_optional,AVMEDIA,avmedia) \
$(if $(filter MACOSX,$(OS)),\
avmediaMacAVF \
@@ -345,10 +342,8 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
$(call gb_Helper_optional,OPENCL,clew) \
$(if $(filter $(OS),WNT),,cmdmail) \
cppcanvas \
-   $(if $(filter $(OS),EMSCRIPTEN),components) \
configmgr \
ctl \
-   cui \
dba \
dbahsql \
$(call gb_Helper_optional,DBCONNECTIVITY, \
@@ -479,12 +474,15 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
 ))
 
 $(eval $(call gb_Helper_register_plugins_for_install,OOOLIBS,ooo, \
+acc \
+$(if $(DISABLE_DYNLOADING),components) \
+cui \
 gie \
 sdui \
 $(if $(USING_X11),vclplug_gen) \
 $(if $(filter $(OS),WNT),vclplug_win) \
 $(if $(filter $(OS),MACOSX),vclplug_osx) \
-$(if $(filter EMSCRIPTEN,$(OS)),vclplug_qt5) \
+vclplug_qt5 \
 ))
 
 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,postgresqlsdbc, 
\
diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index 741f6bbfee21..5f149631919a 100644
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -69,11 +69,6 @@ else
 # libpyuno_wrapper.so => pyuno.so
 gb_Library_FILENAMES := $(patsubst 
pyuno_wrapper:libpyuno_wrapper.so,pyuno_wrapper:pyuno.so,$(gb_Library_FILENAMES))
 endif
-
-ifneq ($(OS),ANDROID)
-gb_Library_FILENAMES := $(patsubst 
unobootstrapprotector:libuno%,unobootstrapprotector:uno%,$(gb_Library_FILENAMES))
-gb_Library_FILENAMES := $(patsubst 
unoexceptionprotector:libuno%,unoexceptionprotector:uno%,$(gb_Library_FILENAMES))
-endif
 endif
 
 ifeq ($(OS),WNT)
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index 64068ffc0e49..ff07e415e25f 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -111,6 +111,7 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
solenv \
soltools \
sot \
+   static \
stoc \
store \
svl \
@@ -140,20 +141,20 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
uui \
vbahelper \
vcl \
-   wasm \
wasm-qt \
winaccessibility \
wizards \
writerfilter \
writerperfect \
xmerge \
-   $(call gb_Helper_optional,DESKTOP,xmlhelp) \
+   $(call gb_Helper_optional,DESKTOP,$(if $(DISABLE_DYNLOADING),,xmlhelp)) 
\
xmloff \
xmlreader \
xmlscript \
xmlsecurity \
 ))
 
+ifeq (,$(DISABLE_DYNLOADING))
 # Especially when building everything with symbols, the linking of the largest
 # libraries takes enormous amounts of RAM. To prevent annoying OOM 
situations
 # etc., try to prevent linking these in parallel by adding artificial build
@@ -186,5 +187,6 @@ $(eval $(call repositorymodule_serialize,\
svx svxcore xo sfx fwk svt vcl) \
 ))
 endif
+endif # !$(DISABLE_DYNLOADING)
 
 # vim: set noet sw=4 ts=4:
diff --git a/accessibility/Library_acc.mk b/accessibility/Library_acc.mk
index 6e4c90eba50d..cf63cf5836a8 100644
--- a/accessibility/Library_acc.mk
+++ b/accessibility/Library_acc.mk
@@ -9,6 +9,8 @@
 
 $(eval $(call gb_Library_Library,acc))
 
+$(eval $(call gb_Library_set_plugin_for,acc,tk))
+
 $(eval $(call gb_Library_set_include,acc,\
 $$(INCLUDE) \
 -I$(SRCDIR)/accessibility/inc \
@@ -31,7 +33,6 @@ $(eval $(call gb_Library_use_libraries,acc,\
 sot \
 svl \
 svt \
-tk \
 tl \
 utl \
 vcl \
diff --git a/bin/run b/bin/run
index 523da3c0e178..ea3a551d9e50 100755
--- a/bin/run
+++ b/bin/run
@@ -71,6 +71,7 @@ fi
 # echo "setting search path to: ${SEARCH_PATH}"
 # echo "execing: ${exedir}/$1"
 
+env | sort
 exec ${LO_TRACE} "${exedir}/$@"
 
 # vi:set shiftwidth=4 expandtab:
diff --git a/chart2/Module_chart2.mk b/chart2/Module_chart2.mk
index 37acfdc3730f..02a56e276205 100644
--- a/chart2/Module_chart2.mk
+++ b/chart2/Module_chart2.mk
@@ -24,23 +24,6 @@ $(eval $(call g

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

2021-03-12 Thread Xisco Fauli (via logerrit)
 vcl/qa/cppunit/pdfexport/data/tdf127217.odt |binary
 vcl/qa/cppunit/pdfexport/pdfexport.cxx  |   33 
 2 files changed, 33 insertions(+)

New commits:
commit 3faaad6d16881dbbd70e34dcb0445a3373f8ddad
Author: Xisco Fauli 
AuthorDate: Fri Mar 12 21:49:33 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Mar 12 23:51:50 2021 +0100

tdf#127217: vcl_pdfexport: Add unittest

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

diff --git a/vcl/qa/cppunit/pdfexport/data/tdf127217.odt 
b/vcl/qa/cppunit/pdfexport/data/tdf127217.odt
new file mode 100644
index ..470600a0aa87
Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf127217.odt differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 514ea6ef73bc..1074e0d1aa95 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -402,6 +402,39 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf106206)
 CPPUNIT_ASSERT(bool(it == pEnd));
 }
 
+CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf127217)
+{
+// Import the bugdoc and export as PDF.
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"tdf127217.odt";
+mxComponent = loadFromDesktop(aURL);
+
+uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
+utl::MediaDescriptor aMediaDescriptor;
+aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+xStorable->storeToURL(maTempFile.GetURL(), 
aMediaDescriptor.getAsConstPropertyValueList());
+
+// Parse the export result with pdfium.
+SvFileStream aFile(maTempFile.GetURL(), StreamMode::READ);
+SvMemoryStream aMemory;
+aMemory.WriteStream(aFile);
+std::shared_ptr pPDFium = vcl::pdf::PDFiumLibrary::get();
+std::unique_ptr pPdfDocument
+= pPDFium->openDocument(aMemory.GetData(), aMemory.GetSize());
+CPPUNIT_ASSERT(pPdfDocument);
+
+// The document has one page.
+CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount());
+std::unique_ptr pPdfPage = 
pPdfDocument->openPage(/*nIndex=*/0);
+CPPUNIT_ASSERT(pPdfPage);
+
+// The page has one annotation.
+CPPUNIT_ASSERT_EQUAL(1, pPdfPage->getAnnotationCount());
+std::unique_ptr pAnnot = 
pPdfPage->getAnnotation(0);
+
+// Without the fix in place, this test would have failed here
+CPPUNIT_ASSERT(!pAnnot->hasKey("DA"));
+}
+
 CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf109143)
 {
 // Import the bugdoc and export as PDF.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - cui/inc

2021-03-12 Thread Xisco Fauli (via logerrit)
 cui/inc/tipoftheday.hrc |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 82273325969bfe85422ed5123d0007b5a28fa75d
Author: Xisco Fauli 
AuthorDate: Fri Mar 12 12:11:10 2021 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Mar 12 22:35:00 2021 +0100

TipOfTheDay: remove odd tip regarding GSOC

Change-Id: I4d7111de1fb734c51e6449913caa52adaf43b594
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112381
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 
(cherry picked from commit 6cae56fe25a51c9c0ec05253be8508940a013eee)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112415

diff --git a/cui/inc/tipoftheday.hrc b/cui/inc/tipoftheday.hrc
index 95806eb9bff1..5aed00daf374 100644
--- a/cui/inc/tipoftheday.hrc
+++ b/cui/inc/tipoftheday.hrc
@@ -104,7 +104,6 @@ const std::tuple 
TIPOFTHEDAY_STRINGARRAY[] =
  { NC_("RID_CUI_TIPOFTHEDAY", "To enable macro recording, check Tools ▸ 
Options ▸ %PRODUCTNAME ▸ Advanced ▸ Enable macro recording."), "", ""},
  { NC_("RID_CUI_TIPOFTHEDAY", "Want to insert a placeholder for an image 
in a Writer template? Use Insert ▸ Fields ▸ More fields, click Functions tab, 
choose PlaceHolder for Type and Image for Format."), "", "tipoftheday_w.png"},
  { NC_("RID_CUI_TIPOFTHEDAY", "%PRODUCTNAME supports four macro security 
levels (from low to very high) and trusted sources."), 
"cui/ui/optsecuritypage/OptSecurityPage", ""}, // 
https://help.libreoffice.org/%PRODUCTVERSION/%LANGUAGENAME/text/shared/optionen/01030300.html
- { NC_("RID_CUI_TIPOFTHEDAY", "%PRODUCTNAME intends to apply as an 
organization for Google Summer of Code (GSoC) see:"), 
"https://wiki.documentfoundation.org/Development/GSoC";, ""},
  { NC_("RID_CUI_TIPOFTHEDAY", "Did you know that you can attach comments 
to portions of text? Just use the shortcut %MOD1+%MOD2+C."), "", ""},
  { NC_("RID_CUI_TIPOFTHEDAY", "Need to move one or more paragraphs? No 
need to cut and paste: Use the keyboard shortcut %MOD1+%MOD2+Arrow (Up/Down)"), 
"", "tipoftheday_w.png"},
  { NC_("RID_CUI_TIPOFTHEDAY", "Change the basic fonts for the predefined 
template or current document per Tools ▸ Options ▸ %PRODUCTNAME Writer ▸ Basic 
Fonts."), "modules/swriter/ui/optfonttabpage/OptFontTabPage", 
"tipoftheday_w.png"}, 
//https://help.libreoffice.org/%PRODUCTVERSION/%LANGUAGENAME/text/shared/optionen/01040300.html
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Luboš Luňák (via logerrit)
 vcl/skia/salbmp.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 43390c8642d575b2ebe02f9aae78d7350246119e
Author: Luboš Luňák 
AuthorDate: Fri Mar 12 15:53:54 2021 +0100
Commit: Luboš Luňák 
CommitDate: Fri Mar 12 22:28:27 2021 +0100

convert to/from premultiplied alpha if needed

A mistake from bf2ba0f39be62978b512d6ed101219b9dd0dc6e4.

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

diff --git a/vcl/skia/salbmp.cxx b/vcl/skia/salbmp.cxx
index e8266f86990e..0fa95deb39db 100644
--- a/vcl/skia/salbmp.cxx
+++ b/vcl/skia/salbmp.cxx
@@ -1118,8 +1118,11 @@ void SkiaSalBitmap::EnsureBitmapData()
 #endif
 SkBitmap bitmap;
 SkPixmap pixmap;
-if (mSize == mPixelsSize && mImage->peekPixels(&pixmap))
+if (mSize == mPixelsSize && mImage->imageInfo().alphaType() == alphaType
+&& mImage->peekPixels(&pixmap))
+{
 bitmap.installPixels(pixmap);
+}
 else
 {
 if (!bitmap.tryAllocPixels(SkImageInfo::MakeS32(mSize.Width(), 
mSize.Height(), alphaType)))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Julien Nabet (via logerrit)
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 3ee6dcfacf283af71bce93423be43d1dcbb2c12e
Author: Julien Nabet 
AuthorDate: Fri Mar 12 19:26:43 2021 +0100
Commit: Julien Nabet 
CommitDate: Fri Mar 12 21:22:25 2021 +0100

loplugin:elidestringvar in sfx2/devtools

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

diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index 58f14e16274a..33f2b5c90e85 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -468,12 +468,11 @@ public:
 {
 int nLength = mxIdlArray->getLen(maAny);
 
-OUString aValue = "";
 OUString aType = getAnyType(maAny).replaceAll(u"[]", u"");
 aType += u"[" + OUString::number(nLength) + u"]";
 
 return {
-{ 1, aValue },
+{ 1, "" },
 { 2, aType },
 };
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


GSoC 2021

2021-03-12 Thread Dipanshu Garg
Hi

My name is Dipanshu Garg. I am a second year Computer Science
undergraduate at Indian Institute of Technology, Kanpur. I am good at C,
C++ and Python.

I have been working on some easy hacks for the past few days.

I look forward to work with libreoffice this summer.

Thanks,
Dipanshu Garg
Email - dipan...@iitk.ac.in , dipanshugarg...@gmail.com
IRC nickname - dipanshu

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2021-03-12 Thread Justin Luth (via logerrit)
 sw/source/core/text/txtfld.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit c44b0df04c798e0a0fa094b14b9ed62ebc7594df
Author: Justin Luth 
AuthorDate: Sat Feb 27 11:33:50 2021 +0200
Commit: Justin Luth 
CommitDate: Fri Mar 12 20:10:08 2021 +0100

tdf#135774 Char highlight: numbering: don't clear existing mxBackColor

If the numbering had a specified w:shd in numbering.xml,
then that character background should apply to the bullet point.
However, SetDiffFnt automatically clears mxBackColor (and I'm not
sure why - but that has been true since way back to original import).
Well, in this section the paragraph marker properties should
only apply if the numbering doesn't have direct formatting already.

So a special step is needed to check if the font has an mxBackColor,
and since that direct formatting has priority, re-apply it
after SetDiffFnt has finished.

(P.S. This had been done earlier for GetHighlightColor, but it was
reverted in 7.0. From my testing, I haven't seen an example where
it was needed, but it too is reset to null - only it isn't optional.)

Again, a unit test will be challenging here, since this is a
visual change only.

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

diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 7e5073eb9d6f..3d1bd5845bce 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -521,7 +521,15 @@ static void 
checkApplyParagraphMarkFormatToNumbering(SwFont* pNumFnt, SwTextForm
 }
 pItem = aIter.NextItem();
 };
+
+// SetDiffFnt resets the background color (why?), so capture it and 
re-apply if it had a value,
+// because an existing value should override anything inherited from the 
paragraph marker.
+const std::optional oFontBackColor = pNumFnt->GetBackColor();
+
 pNumFnt->SetDiffFnt(pCleanedSet.get(), pIDSA);
+
+if (oFontBackColor)
+pNumFnt->SetBackColor(oFontBackColor);
 }
 
 static const SwRangeRedline* lcl_GetRedlineAtNodeInsertionOrDeletion( const 
SwTextNode& rTextNode )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Xisco Fauli (via logerrit)
 cui/inc/tipoftheday.hrc |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 6cae56fe25a51c9c0ec05253be8508940a013eee
Author: Xisco Fauli 
AuthorDate: Fri Mar 12 12:11:10 2021 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Mar 12 19:59:16 2021 +0100

TipOfTheDay: remove odd tip regarding GSOC

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

diff --git a/cui/inc/tipoftheday.hrc b/cui/inc/tipoftheday.hrc
index d809446acf6d..6483d0335f61 100644
--- a/cui/inc/tipoftheday.hrc
+++ b/cui/inc/tipoftheday.hrc
@@ -107,7 +107,6 @@ const std::tuple 
TIPOFTHEDAY_STRINGARRAY[] =
  { NC_("RID_CUI_TIPOFTHEDAY", "To enable macro recording, check Tools ▸ 
Options ▸ %PRODUCTNAME ▸ Advanced ▸ Enable macro recording."), "", ""},
  { NC_("RID_CUI_TIPOFTHEDAY", "Want to insert a placeholder for an image 
in a Writer template? Use Insert ▸ Fields ▸ More fields, click Functions tab, 
choose PlaceHolder for Type and Image for Format."), "", "tipoftheday_w.png"},
  { NC_("RID_CUI_TIPOFTHEDAY", "%PRODUCTNAME supports four macro security 
levels (from low to very high) and trusted sources."), 
"cui/ui/optsecuritypage/OptSecurityPage", ""}, // 
https://help.libreoffice.org/%PRODUCTVERSION/%LANGUAGENAME/text/shared/optionen/01030300.html
- { NC_("RID_CUI_TIPOFTHEDAY", "%PRODUCTNAME intends to apply as an 
organization for Google Summer of Code (GSoC) see:"), 
"https://wiki.documentfoundation.org/Development/GSoC";, ""},
  { NC_("RID_CUI_TIPOFTHEDAY", "Did you know that you can attach comments 
to portions of text? Just use the shortcut %MOD1+%MOD2+C."), "", ""},
  { NC_("RID_CUI_TIPOFTHEDAY", "Need to move one or more paragraphs? No 
need to cut and paste: Use the keyboard shortcut %MOD1+%MOD2+Arrow (Up/Down)"), 
"", "tipoftheday_w.png"},
  { NC_("RID_CUI_TIPOFTHEDAY", "Change the basic fonts for the predefined 
template or current document per Tools ▸ Options ▸ %PRODUCTNAME Writer ▸ Basic 
Fonts."), "modules/swriter/ui/optfonttabpage/OptFontTabPage", 
"tipoftheday_w.png"}, 
//https://help.libreoffice.org/%PRODUCTVERSION/%LANGUAGENAME/text/shared/optionen/01040300.html
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Andrea Gelmini (via logerrit)
 sal/osl/w32/file.cxx|2 +-
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5e404d6289f433e72218e13ed5a083b59dbc307b
Author: Andrea Gelmini 
AuthorDate: Fri Mar 12 17:19:32 2021 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Mar 12 19:54:29 2021 +0100

Fix typos

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

diff --git a/sal/osl/w32/file.cxx b/sal/osl/w32/file.cxx
index 44b8ac97ba09..1c13b6211779 100644
--- a/sal/osl/w32/file.cxx
+++ b/sal/osl/w32/file.cxx
@@ -657,7 +657,7 @@ oslFileError SAL_CALL osl_openFile(
 if (result != osl_File_E_None)
 return result;
 
-// tdf126742 use FILE_SHARE_WRITE to get closer to non-Windows plattform 
behavoiur,
+// tdf126742 use FILE_SHARE_WRITE to get closer to non-Windows platform 
behaviour,
 // for details and discussion see task please
 DWORD dwAccess = GENERIC_READ, dwShare = FILE_SHARE_READ | 
FILE_SHARE_WRITE, dwCreation = 0;
 
diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index 6b6a1bdfcc1d..58f14e16274a 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -442,7 +442,7 @@ public:
 
 bool shouldShowExpander() override
 {
-// Show expnder only if the sequence has elements
+// Show expander only if the sequence has elements
 int nLength = mxIdlArray->getLen(maAny);
 return nLength > 0;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/shells/tabsh.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit f71efcdc4c8525bdf93becfc66b57bccd47f88c4
Author: Caolán McNamara 
AuthorDate: Fri Mar 12 12:57:57 2021 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Mar 12 19:53:27 2021 +0100

tdf#140977 drop possible table-cursor before setting the new one

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

diff --git a/sw/source/uibase/shells/tabsh.cxx 
b/sw/source/uibase/shells/tabsh.cxx
index 34d98f61edd9..036274546d04 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -600,6 +600,9 @@ void SwTableShell::Execute(SfxRequest &rReq)
 pDlg->StartExecuteAsync([pDlg, pRequest, pTableRep, 
&rBindings, &rSh, vCursors](sal_Int32 nResult){
 if (RET_OK == nResult)
 {
+if (rSh.IsTableMode()) // tdf#140977 drop possible 
table-cursor before setting the new one
+rSh.TableCursorToCursor();
+
 rSh.SetSelection(*vCursors->front()); // tdf#135636 
set the table selected at dialog launch as current selection
 
 const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Miklos Vajna (via logerrit)
 sw/qa/core/objectpositioning/data/inside-outside-vert-align.docx   
  |binary
 sw/qa/core/objectpositioning/objectpositioning.cxx 
  |4 ++--
 sw/qa/extras/layout/data/tdf116486.docx
  |binary
 sw/qa/extras/ooxmlexport/data/effectextent-margin.docx 
  |binary
 
sw/qa/extras/ooxmlexport/data/tdf133045_TestShapeAlignmentRelativeFromTopMargin.docx
 |binary
 sw/qa/extras/ooxmlexport/data/textframe-gradient.docx  
  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport6.cxx  
  |6 +++---
 7 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 0fc76a646233bebebbca3f86144f30eb32a5d60c
Author: Miklos Vajna 
AuthorDate: Fri Mar 12 18:12:11 2021 +0100
Commit: Miklos Vajna 
CommitDate: Fri Mar 12 19:40:15 2021 +0100

CppunitTest_sw_ooxmlexport: clean up testEffectExtentMargin

The shape had line information, but the intent was to test what happens
when the shape has some non-zero effect extent, line information is not
needed for that.

And do the same for a bunch of other tests: a test document should
ideally have line information only if it's relevant for a test.

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

diff --git a/sw/qa/core/objectpositioning/data/inside-outside-vert-align.docx 
b/sw/qa/core/objectpositioning/data/inside-outside-vert-align.docx
index 15d2dca0775e..1308e1f6a8a5 100644
Binary files a/sw/qa/core/objectpositioning/data/inside-outside-vert-align.docx 
and b/sw/qa/core/objectpositioning/data/inside-outside-vert-align.docx differ
diff --git a/sw/qa/core/objectpositioning/objectpositioning.cxx 
b/sw/qa/core/objectpositioning/objectpositioning.cxx
index 7b9a3eca2831..9817b9b05233 100644
--- a/sw/qa/core/objectpositioning/objectpositioning.cxx
+++ b/sw/qa/core/objectpositioning/objectpositioning.cxx
@@ -227,9 +227,9 @@ CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, 
testInsideOutsideVertAlignBott
 = getXPath(pXmlDoc, "//SwAnchoredDrawObject[2]/bounds", 
"top").toInt32(); //15694
 
 // Verify that the distance between the bottom of page and bottom of first 
shape is around 0cm. (align=outside)
-CPPUNIT_ASSERT_EQUAL(static_cast(23), nPageBottom - 
nFirstShapeOutside);
+CPPUNIT_ASSERT_EQUAL(static_cast(3), nPageBottom - 
nFirstShapeOutside);
 // Verify that the distance between the bottom of body and top of second 
shape is around 0cm. (align=inside)
-CPPUNIT_ASSERT_EQUAL(static_cast(10), nBodyBottom - 
nSecondShapeInside);
+CPPUNIT_ASSERT_EQUAL(static_cast(0), nBodyBottom - 
nSecondShapeInside);
 }
 
 CPPUNIT_TEST_FIXTURE(SwCoreObjectpositioningTest, testVMLVertAlignBottomMargin)
diff --git a/sw/qa/extras/layout/data/tdf116486.docx 
b/sw/qa/extras/layout/data/tdf116486.docx
index c6a4891b0cf4..825b0ef33a55 100644
Binary files a/sw/qa/extras/layout/data/tdf116486.docx and 
b/sw/qa/extras/layout/data/tdf116486.docx differ
diff --git a/sw/qa/extras/ooxmlexport/data/effectextent-margin.docx 
b/sw/qa/extras/ooxmlexport/data/effectextent-margin.docx
index 22db162a78b0..5dccf967fe7a 100644
Binary files a/sw/qa/extras/ooxmlexport/data/effectextent-margin.docx and 
b/sw/qa/extras/ooxmlexport/data/effectextent-margin.docx differ
diff --git 
a/sw/qa/extras/ooxmlexport/data/tdf133045_TestShapeAlignmentRelativeFromTopMargin.docx
 
b/sw/qa/extras/ooxmlexport/data/tdf133045_TestShapeAlignmentRelativeFromTopMargin.docx
index 2cd299ff211a..aa976e7cc925 100644
Binary files 
a/sw/qa/extras/ooxmlexport/data/tdf133045_TestShapeAlignmentRelativeFromTopMargin.docx
 and 
b/sw/qa/extras/ooxmlexport/data/tdf133045_TestShapeAlignmentRelativeFromTopMargin.docx
 differ
diff --git a/sw/qa/extras/ooxmlexport/data/textframe-gradient.docx 
b/sw/qa/extras/ooxmlexport/data/textframe-gradient.docx
index e5ed0689d251..edbfe53b1627 100644
Binary files a/sw/qa/extras/ooxmlexport/data/textframe-gradient.docx and 
b/sw/qa/extras/ooxmlexport/data/textframe-gradient.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
index 72dc978a4c8e..935c047dad21 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
@@ -1008,9 +1008,9 @@ 
DECLARE_OOXMLEXPORT_TEST(testRelativeAlignmentFromTopMargin,
 return;
 
 xmlDocUniquePtr pXmlDoc = parseLayoutDump();
-assertXPath(pXmlDoc, "//SwAnchoredDrawObject[1]/bounds", "top", "1487"); 
// center
-assertXPath(pXmlDoc, "//SwAnchoredDrawObject[2]/bounds", "top", "2668"); 
// bottom
-assertXPath(pXmlDoc, "//SwAnchoredDrawObject[3]/bounds", "top", "298");  
// top
+assertXPath(pXmlDoc, "//SwAnchoredDrawObject[1]/bounds", "top", "1502"); 
// center
+assertXPath(pXmlDoc, "//SwAncho

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

2021-03-12 Thread Miklos Vajna (via logerrit)
 sw/inc/authfld.hxx |2 +
 sw/qa/core/tox/tox.cxx |   46 +
 sw/source/core/fields/authfld.cxx  |9 +--
 sw/source/core/fields/fldbas.cxx   |9 +++
 sw/source/uibase/docvw/edtwin.cxx  |2 -
 sw/source/uibase/docvw/edtwin2.cxx |7 +
 sw/source/uibase/inc/wrtsh.hxx |2 -
 sw/source/uibase/shells/basesh.cxx |2 -
 sw/source/uibase/wrtsh/wrtsh2.cxx  |   21 
 9 files changed, 94 insertions(+), 6 deletions(-)

New commits:
commit 64ffabbdb2725e93de997171708bb31c33c93a55
Author: Miklos Vajna 
AuthorDate: Fri Mar 12 17:51:07 2021 +0100
Commit: Miklos Vajna 
CommitDate: Fri Mar 12 19:32:19 2021 +0100

sw bibliography, refer to a page: make the biblio field clickable

- add support for this in SwWrtShell::ClickToField()

- restrict this to ctrl-click by default (similar to hyperlinks)

- ignore empty URLs

- extend the tooltip to hint the URL

- change pointer to hint that the field is clickable

- downgrade the assert to SAL_WARN in
  SwAuthorityFieldType::RemoveField(), that currently fires every time a
  biblio field is de-selected

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

diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx
index cdfcf7f9f55a..c9c7fd880b7b 100644
--- a/sw/inc/authfld.hxx
+++ b/sw/inc/authfld.hxx
@@ -185,6 +185,8 @@ public:
 /// Returns the line matching the source's default row in the ToX.
 OUString GetAuthority(const SwTextAttr* pTextAttr, const SwRootFrame* 
pLayout) const;
 
+bool HasURL() const;
+
 void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 };
 
diff --git a/sw/qa/core/tox/tox.cxx b/sw/qa/core/tox/tox.cxx
index 127cb4b06e7f..0862b6403638 100644
--- a/sw/qa/core/tox/tox.cxx
+++ b/sw/qa/core/tox/tox.cxx
@@ -16,6 +16,9 @@
 
 #include 
 
+#include 
+#include 
+
 namespace
 {
 /// Covers sw/source/core/tox/ fixes.
@@ -108,6 +111,49 @@ CPPUNIT_TEST_FIXTURE(Test, testAuthorityTableEntryURL)
 CPPUNIT_ASSERT_EQUAL(OUString("http://www.example.com/test.pdf";), aActual);
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testAuthorityTableEntryClick)
+{
+// Given an empty document:
+SwDoc* pDoc = createSwDoc();
+
+// When inserting a biblio entry field with an URL:
+uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xField(
+xFactory->createInstance("com.sun.star.text.TextField.Bibliography"), 
uno::UNO_QUERY);
+uno::Sequence aFields = {
+comphelper::makePropertyValue("BibiliographicType", 
text::BibliographyDataType::WWW),
+comphelper::makePropertyValue("Identifier", OUString("AT")),
+comphelper::makePropertyValue("Author", OUString("Author")),
+comphelper::makePropertyValue("Title", OUString("Title")),
+comphelper::makePropertyValue("URL", 
OUString("http://www.example.com/test.pdf#page=1";)),
+};
+xField->setPropertyValue("Fields", uno::makeAny(aFields));
+uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xText = xTextDocument->getText();
+uno::Reference xCursor = xText->createTextCursor();
+uno::Reference xContent(xField, uno::UNO_QUERY);
+xText->insertTextContent(xCursor, xContent, /*bAbsorb=*/false);
+
+// Then make sure that the field is clickable, since the page part will 
not be part of the
+// bibliography table:
+const SwFieldTypes* pTypes = 
pDoc->getIDocumentFieldsAccess().GetFieldTypes();
+auto it = std::find_if(pTypes->begin(), pTypes->end(),
+   [](const std::unique_ptr& pType) {
+   return pType->Which() == 
SwFieldIds::TableOfAuthorities;
+   });
+CPPUNIT_ASSERT(it != pTypes->end());
+const SwFieldType* pType = it->get();
+std::vector aFormatFields;
+pType->GatherFields(aFormatFields);
+CPPUNIT_ASSERT_EQUAL(static_cast(1), aFormatFields.size());
+SwField* pField = aFormatFields[0]->GetField();
+// Without the accompanying fix in place, this test would have failed, as 
the field was not
+// clickable.
+CPPUNIT_ASSERT(pField->IsClickable());
+// This is needed, so the mouse has the correct RefHand pointer style.
+CPPUNIT_ASSERT(pField->HasClickHdl());
+}
+
 CPPUNIT_TEST_FIXTURE(Test, testAuthorityTableURLDeduplication)
 {
 // Given a document with 3 bibliography references (of type WWW) in it:
diff --git a/sw/source/core/fields/authfld.cxx 
b/sw/source/core/fields/authfld.cxx
index ad60d02db173..8812d70d2db6 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -99,8 +99,7 @@ void SwAuthorityFieldType::RemoveField(const SwAuthEntry* 
pEntry)
 return;
 }
 }
-assert(false);
-OSL_FAIL("Field unknown" );
+

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

2021-03-12 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/shells/tabsh.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 6db71f70a3b200d4074f6cda8ce445e9861d3296
Author: Caolán McNamara 
AuthorDate: Fri Mar 12 12:57:57 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 17:17:35 2021 +0100

tdf#140977 drop possible table-cursor before setting the new one

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

diff --git a/sw/source/uibase/shells/tabsh.cxx 
b/sw/source/uibase/shells/tabsh.cxx
index 34d98f61edd9..036274546d04 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -600,6 +600,9 @@ void SwTableShell::Execute(SfxRequest &rReq)
 pDlg->StartExecuteAsync([pDlg, pRequest, pTableRep, 
&rBindings, &rSh, vCursors](sal_Int32 nResult){
 if (RET_OK == nResult)
 {
+if (rSh.IsTableMode()) // tdf#140977 drop possible 
table-cursor before setting the new one
+rSh.TableCursorToCursor();
+
 rSh.SetSelection(*vCursors->front()); // tdf#135636 
set the table selected at dialog launch as current selection
 
 const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread ViswaasLP (via logerrit)
 sw/source/uibase/inc/abstract.hxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit ce69ab8d61975d5d49142469115798b5b3688a63
Author: ViswaasLP 
AuthorDate: Thu Mar 11 22:12:51 2021 -0800
Commit: Ilmari Lauhakangas 
CommitDate: Fri Mar 12 17:05:26 2021 +0100

tdf#124176 Use pragma once in sw/source/uibase/inc

Change-Id: I74c85b0327005ba7b2d07169f052a903381eb1f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112373
Reviewed-by: Ilmari Lauhakangas 
Tested-by: Ilmari Lauhakangas 

diff --git a/sw/source/uibase/inc/abstract.hxx 
b/sw/source/uibase/inc/abstract.hxx
index 2bba7126debe..3a9e16f9888e 100644
--- a/sw/source/uibase/inc/abstract.hxx
+++ b/sw/source/uibase/inc/abstract.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_ABSTRACT_HXX
-#define INCLUDED_SW_SOURCE_UIBASE_INC_ABSTRACT_HXX
+#pragma once
 
 #include 
 
@@ -34,6 +33,4 @@ public:
 sal_uInt8 GetPara() const;
 };
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Caolán McNamara (via logerrit)
 reportdesign/source/ui/inc/UITools.hxx  |2 +-
 reportdesign/source/ui/misc/UITools.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2f8e96ccdc062c76a596e626d2b605f3cc9b539e
Author: Caolán McNamara 
AuthorDate: Fri Mar 12 12:07:46 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 17:01:16 2021 +0100

we just use the OutputDevice api for setZoomFactor

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

diff --git a/reportdesign/source/ui/inc/UITools.hxx 
b/reportdesign/source/ui/inc/UITools.hxx
index 13aafb14fc90..5fe175440e61 100644
--- a/reportdesign/source/ui/inc/UITools.hxx
+++ b/reportdesign/source/ui/inc/UITools.hxx
@@ -174,7 +174,7 @@ namespace rptui
 @param  _aZoom  the zoom scale
 @param  _rWindowwhere to set the map mode
 */
-void setZoomFactor(const Fraction& _aZoom, vcl::Window& _rWindow);
+void setZoomFactor(const Fraction& _aZoom, OutputDevice& _rWindow);
 }
 #endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_UITOOLS_HXX
 
diff --git a/reportdesign/source/ui/misc/UITools.cxx 
b/reportdesign/source/ui/misc/UITools.cxx
index 3a96710a2a5b..92785547d4d3 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -1020,7 +1020,7 @@ void correctOverlapping(SdrObject* 
_pControl,OReportSection const & _aReportSect
 
rSectionView.InsertObjectAtView(_pControl,*rSectionView.GetSdrPageView(), 
SdrInsertFlags::ADDMARK);
 }
 
-void setZoomFactor(const Fraction& _aZoom, vcl::Window& _rWindow)
+void setZoomFactor(const Fraction& _aZoom, OutputDevice& _rWindow)
 {
 MapMode aMapMode( _rWindow.GetMapMode() );
 aMapMode.SetScaleX(_aZoom);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Caolán McNamara (via logerrit)
 sw/inc/viewopt.hxx  |3 +--
 sw/source/uibase/config/viewopt.cxx |2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit df0c80eef320ceeedacfab27f4da4c4ddbebb4bf
Author: Caolán McNamara 
AuthorDate: Fri Mar 12 12:03:35 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 16:47:29 2021 +0100

we just use the OutputDevice api for SwViewOption::Init

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

diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index 006a3f9b3dd3..c1ae8daa452f 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -30,7 +30,6 @@
 #include "swdllapi.h"
 
 class SwRect;
-namespace vcl { class Window; }
 class OutputDevice;
 class SwDocShell;
 namespace svtools{ class ColorConfig;}
@@ -201,7 +200,7 @@ public:
 SwViewOption(const SwViewOption&);
 ~SwViewOption();
 
-static void Init( vcl::Window const *pWin );// Initializing of 
static data.
+static void Init(const OutputDevice* pWin);// Initializing of 
static data.
 
 ViewOptFlags1   GetCoreOptions() const {return m_nCoreOptions;}
 inline void SetUIOptions( const SwViewOption& );
diff --git a/sw/source/uibase/config/viewopt.cxx 
b/sw/source/uibase/config/viewopt.cxx
index c58e734f83ab..99ad4caf97a1 100644
--- a/sw/source/uibase/config/viewopt.cxx
+++ b/sw/source/uibase/config/viewopt.cxx
@@ -323,7 +323,7 @@ SwViewOption::~SwViewOption()
 {
 }
 
-void SwViewOption::Init( vcl::Window const *pWin )
+void SwViewOption::Init(const OutputDevice* pWin)
 {
 if( !s_nPixelTwips && pWin )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Caolán McNamara (via logerrit)
 sd/qa/unit/misc-tests.cxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 9d1eea8f21907a86f23736fd739d1b032e410711
Author: Caolán McNamara 
AuthorDate: Fri Mar 12 12:01:06 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 16:47:08 2021 +0100

can call XWindow::setVisible instead of extracting its vcl::Window

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

diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index f23ee5b5cea5..0ae169ce4431 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -50,7 +50,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -148,9 +147,7 @@ sd::DrawDocShellRef SdMiscTest::Load(const OUString& rURL, 
sal_Int32 nFormat)
 uno::Reference xContainerWindow = 
xTargetFrame->getContainerWindow();
 CPPUNIT_ASSERT(xContainerWindow.is());
 xContainerWindow->setPosSize(0, 0, 1024, 768, awt::PosSize::SIZE);
-VclPtr pContainerWindow = 
VCLUnoHelper::GetWindow(xContainerWindow);
-CPPUNIT_ASSERT(pContainerWindow);
-pContainerWindow->Show(true);
+xContainerWindow->setVisible(true);
 
 // 1. Open the document
 sd::DrawDocShellRef xDocSh = loadURL(rURL, nFormat);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Caolán McNamara (via logerrit)
 sc/source/ui/drawfunc/drtxtob.cxx |2 +-
 sc/source/ui/inc/viewutil.hxx |4 ++--
 sc/source/ui/view/editsh.cxx  |2 +-
 sc/source/ui/view/viewutil.cxx|9 +
 4 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit b9190aca7ddd1fa7daa30eed0c8770196ca7c08e
Author: Caolán McNamara 
AuthorDate: Fri Mar 12 11:49:04 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 16:46:28 2021 +0100

use ScTabViewShell to get toplevel dialog parent

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

diff --git a/sc/source/ui/drawfunc/drtxtob.cxx 
b/sc/source/ui/drawfunc/drtxtob.cxx
index 117e47a5bd02..d0fb849b31e6 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -233,7 +233,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
 }
 }
 else
-ScViewUtil::ExecuteCharMap( rItem, 
*mrViewData.GetViewShell()->GetViewFrame() );
+ScViewUtil::ExecuteCharMap(rItem, 
*mrViewData.GetViewShell());
 
 if ( !aString.isEmpty() )
 {
diff --git a/sc/source/ui/inc/viewutil.hxx b/sc/source/ui/inc/viewutil.hxx
index 6dd0a49a2b28..834802f06d0c 100644
--- a/sc/source/ui/inc/viewutil.hxx
+++ b/sc/source/ui/inc/viewutil.hxx
@@ -32,6 +32,7 @@ class ScChangeAction;
 class ScChangeViewSettings;
 class ScDocument;
 class ScMarkData;
+class ScTabViewShell;
 enum class SvtScriptType;
 enum class TransliterationFlags;
 
@@ -41,8 +42,7 @@ enum class ScUpdateMode { All, Marks };
 class SC_DLLPUBLIC ScViewUtil
 {
 public:
-static void ExecuteCharMap( const SvxFontItem&  rOldFont,
-SfxViewFrame&   rFrame );
+static void ExecuteCharMap(const SvxFontItem& rOldFont, ScTabViewShell& 
rShell);
 
 static bool IsActionShown( const ScChangeAction& rAction,
 const ScChangeViewSettings& rSettings,
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 4a7ed8e09415..68a186f1dd5d 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -420,7 +420,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
 }
 else
 {
-ScViewUtil::ExecuteCharMap( rItem, 
*rViewData.GetViewShell()->GetViewFrame() );
+ScViewUtil::ExecuteCharMap(rItem, 
*rViewData.GetViewShell());
 
 // while the dialog was open, edit mode may have been 
stopped
 if (!SC_MOD()->IsInputMode())
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index 7d87902175b2..f94d24ab1210 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -30,7 +30,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -41,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -317,15 +317,16 @@ void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, 
SfxBindings& rBindings, sal
 rSet.DisableItem( nSlotId );
 }
 
-void ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont,
- SfxViewFrame& rFrame )
+void ScViewUtil::ExecuteCharMap(const SvxFontItem& rOldFont,
+ScTabViewShell& rShell)
 {
 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+SfxViewFrame& rFrame = *rShell.GetViewFrame();
 SfxAllItemSet aSet( rFrame.GetObjectShell()->GetPool() );
 aSet.Put( SfxBoolItem( FN_PARAM_1, false ) );
 aSet.Put( SvxFontItem( rOldFont.GetFamily(), rOldFont.GetFamilyName(), 
rOldFont.GetStyleName(), rOldFont.GetPitch(), rOldFont.GetCharSet(), 
aSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT ) ) );
 auto xFrame = rFrame.GetFrame().GetFrameInterface();
-ScopedVclPtr 
pDlg(pFact->CreateCharMapDialog(rFrame.GetWindow().GetFrameWeld(), aSet, 
xFrame));
+ScopedVclPtr 
pDlg(pFact->CreateCharMapDialog(rShell.GetFrameWeld(), aSet, xFrame));
 pDlg->Execute();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Michael Stahl (via logerrit)
 sw/qa/extras/ooxmlexport/data/fly_fieldmark.fodt |   60 +++
 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx|   12 
 sw/source/filter/ww8/wrtw8nds.cxx|   23 +++-
 sw/source/filter/ww8/wrtww8.hxx  |1 
 4 files changed, 92 insertions(+), 4 deletions(-)

New commits:
commit e79c637f291d552bfe8f32ccfc23300c67f51fcc
Author: Michael Stahl 
AuthorDate: Wed Mar 10 11:26:07 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 16:14:09 2021 +0100

sw: DOCX export: put fly before fieldmark start into its own run

If a fly starts at the same position as a CH_TXT_ATR_FIELDSTART, it is
anchored before the field, and written in OutFlys() before the field is
written in EndRun(), but the DOCX export reorders things in confusing
ways.

StartField_Impl() and CmdField_Impl() will actually end the current run
(after putting the field char in it) and start a new one.

So do something similar in this situation and create a new run if flys
have been processed.

Restrict this extra run to when there is actually a fly, because
otherwise a dozen tests break; this requires a new FLY_NONE result for
OutFlys() because FLY_PROCESSED is returned even if there are no flys.

Change-Id: Id469c53d07eacad3992c7c0e451ab3756e02c8fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112267
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 3eced2d52415abeac266804ab682bee022322a19)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112230
Reviewed-by: Caolán McNamara 

diff --git a/sw/qa/extras/ooxmlexport/data/fly_fieldmark.fodt 
b/sw/qa/extras/ooxmlexport/data/fly_fieldmark.fodt
new file mode 100644
index ..af1ae9a86243
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fly_fieldmark.fodt
@@ -0,0 +1,60 @@
+
+
+http://openoffice.org/2009/office"; 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns
 :config:1.0" xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="ur
 n:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:xforms="http://www.w3.org/2002/xforms"; office:version="1.3" 
office:mimetype="application/vnd.oasis.opendocument.text">
+
+ 
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+
+   
+   
+  
+  
+   
+   
+  
+  
+ 
+ 
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+
+   
+   
+   
+  
+ 
+ 
+  
+ 
+ 
+  
+   
+
+
+   
+   
+ 
+ 
+foobar
+  
+ 
+
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index 240678318f9a..40f93ab67664 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -484,6 +484,18 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testEditTime, 
"fdo81341.docx")
 assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[5]/w:fldChar", 
"fldCharType", "end");
 }
 
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFlyFieldmark, "fly_fieldmark.fodt")
+{
+// the problem was that the flys were written after the field start
+xmlDocUniquePtr pXmlDoc = parseExport("word/do

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

2021-03-12 Thread Tomaž Vajngerl (via logerrit)
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |5 ++
 sfx2/uiconfig/ui/developmenttool.ui |   40 +---
 2 files changed, 40 insertions(+), 5 deletions(-)

New commits:
commit cd2e32cae86f31e7dff8b350e3c5e551c79f4bc1
Author: Tomaž Vajngerl 
AuthorDate: Thu Mar 11 12:26:38 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Mar 12 16:04:26 2021 +0100

devtools: make all columns sorted in all tree views

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

diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index e0f2b4ae9d5d..6b6a1bdfcc1d 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -736,6 +736,11 @@ ObjectInspectorTreeHandler::ObjectInspectorTreeHandler(
 mpPropertiesTreeView->connect_changed(LINK(this, 
ObjectInspectorTreeHandler, SelectionChanged));
 mpMethodsTreeView->connect_changed(LINK(this, ObjectInspectorTreeHandler, 
SelectionChanged));
 
+mpInterfacesTreeView->make_sorted();
+mpServicesTreeView->make_sorted();
+mpPropertiesTreeView->make_sorted();
+mpMethodsTreeView->make_sorted();
+
 mpObjectInspectorToolbar->connect_clicked(
 LINK(this, ObjectInspectorTreeHandler, ToolbarButtonClicked));
 mpObjectInspectorToolbar->set_item_sensitive("inspect", false);
diff --git a/sfx2/uiconfig/ui/developmenttool.ui 
b/sfx2/uiconfig/ui/developmenttool.ui
index 22c1f5f315f1..9f23752d7f26 100644
--- a/sfx2/uiconfig/ui/developmenttool.ui
+++ b/sfx2/uiconfig/ui/developmenttool.ui
@@ -174,9 +174,12 @@
   
 
 
-  
+  
 True
 Name
+True
+True
+0
 
   
   
@@ -223,6 +226,9 @@
   
 True
 Name
+True
+True
+0
 
   
   
@@ -273,6 +279,9 @@
   
 True
 Object
+True
+True
+0
 
   
   
@@ -285,6 +294,9 @@
   
 True
 Value
+True
+True
+1
 
   
   
@@ -297,6 +309,9 @@
   
 True
 Type
+True
+True
+2
 
   
   
@@ -309,6 +324,9 @@
   
 True
 Info
+True
+True
+3
 
   
   
@@ -356,9 +374,12 @@
   
 
 
-  
+  
 True
 Method
+True
+True
+0
 
   
   
@@ -368,9 +389,12 @@
   
 
 
-  
+  
 True
 Return Type
+True
+True
+1
 
   
   
@@ -380,9 +404,12 @@
   
 
 
-  
+  
 True
 Parameters
+True
+True
+2
 
   
   
@

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

2021-03-12 Thread Tomaž Vajngerl (via logerrit)
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |  125 
 sfx2/uiconfig/ui/developmenttool.ui |   22 ++-
 2 files changed, 118 insertions(+), 29 deletions(-)

New commits:
commit 8d1888fca3147520c6f049ba4335932f69caf358
Author: Tomaž Vajngerl 
AuthorDate: Fri Mar 5 22:28:40 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Mar 12 16:03:58 2021 +0100

devtools: new column "Info" for properties in object inspector

Adds additional column "info" for properties, where additional
property attributes are written. Currently these are mostly
constants from beans::PropertyAttribute, but they can be others
too (anything that is useful to the users for the current property,
struct, sequence).

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

diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index 0466f252166e..e0f2b4ae9d5d 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -349,15 +350,18 @@ class BasicValueNode : public SimpleStringNode
 {
 protected:
 uno::Any maAny;
+OUString mrInfo;
 uno::Reference mxContext;
 
-ObjectInspectorNodeInterface* createNodeObjectForAny(OUString const& 
rName, uno::Any& rAny);
+ObjectInspectorNodeInterface* createNodeObjectForAny(OUString const& 
rName, uno::Any& rAny,
+ OUString const& 
mrInfo);
 
 public:
-BasicValueNode(OUString const& rName, uno::Any const& rAny,
+BasicValueNode(OUString const& rName, uno::Any const& rAny, OUString 
const& rInfo,
uno::Reference const& xContext)
 : SimpleStringNode(rName)
 , maAny(rAny)
+, mrInfo(rInfo)
 , mxContext(xContext)
 {
 }
@@ -389,19 +393,16 @@ public:
 OUString aValue = AnyToString(maAny, mxContext);
 OUString aType = getAnyType(maAny);
 
-return {
-{ 1, aValue },
-{ 2, aType },
-};
+return { { 1, aValue }, { 2, aType }, { 3, mrInfo } };
 }
 };
 
 class GenericPropertiesNode : public BasicValueNode
 {
 public:
-GenericPropertiesNode(OUString const& rName, uno::Any const& rAny,
+GenericPropertiesNode(OUString const& rName, uno::Any const& rAny, 
OUString const& rInfo,
   uno::Reference const& 
xContext)
-: BasicValueNode(rName, rAny, xContext)
+: BasicValueNode(rName, rAny, rInfo, xContext)
 {
 }
 
@@ -412,9 +413,9 @@ public:
 class StructNode : public BasicValueNode
 {
 public:
-StructNode(OUString const& rName, uno::Any const& rAny,
+StructNode(OUString const& rName, uno::Any const& rAny, OUString const& 
rInfo,
uno::Reference const& xContext)
-: BasicValueNode(rName, rAny, xContext)
+: BasicValueNode(rName, rAny, rInfo, xContext)
 {
 }
 
@@ -429,9 +430,9 @@ class SequenceNode : public BasicValueNode
 uno::Reference mxIdlArray;
 
 public:
-SequenceNode(OUString const& rName, uno::Any const& rAny,
+SequenceNode(OUString const& rName, uno::Any const& rAny, OUString const& 
rInfo,
  uno::Reference const& xContext)
-: BasicValueNode(rName, rAny, xContext)
+: BasicValueNode(rName, rAny, rInfo, xContext)
 {
 auto xReflection = reflection::theCoreReflection::get(mxContext);
 OUString aTypeName = maAny.getValueType().getTypeName();
@@ -456,7 +457,8 @@ public:
 uno::Any aArrayValue = mxIdlArray->get(maAny, i);
 uno::Reference xCurrent;
 
-auto* pObjectInspectorNode = 
createNodeObjectForAny(OUString::number(i), aArrayValue);
+auto* pObjectInspectorNode
+= createNodeObjectForAny(OUString::number(i), aArrayValue, "");
 if (pObjectInspectorNode)
 lclAppendNodeToParent(pTree, pParent, pObjectInspectorNode);
 }
@@ -490,7 +492,8 @@ void 
GenericPropertiesNode::fillChildren(std::unique_ptr& pTree,
 for (OUString const& rName : aNames)
 {
 uno::Any aAny = xNameAccess->getByName(rName);
-auto* pObjectInspectorNode = createNodeObjectForAny("@" + rName, 
aAny);
+auto* pObjectInspectorNode
+= createNodeObjectForAny(u"@" + rName, aAny, u"name 
container");
 lclAppendNodeToParent(pTree, pParent, pObjectInspectorNode);
 }
 }
@@ -502,7 +505,7 @@ void 
GenericPropertiesNode::fillChildren(std::unique_ptr& pTree,
 {
 uno::Any aAny = xIndexAccess->getByIndex(nIndex);
 auto* pObjectInspectorNode
-= createNodeObjectForAn

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

2021-03-12 Thread Tomaž Vajngerl (via logerrit)
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |   46 +---
 1 file changed, 21 insertions(+), 25 deletions(-)

New commits:
commit 9f72f662d7ac2fbd5131ecf65be93aa001b720c9
Author: Tomaž Vajngerl 
AuthorDate: Fri Mar 5 19:53:28 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Mar 12 16:03:12 2021 +0100

devtools: use XInvocation2 to get the available properties

XIntrospection is not needed as XInvocation can provide a list of
available properties by itself and we need XInvocation to get the
property value. So this change removes XIntrospection and
simplifies the code a bit.

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

diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index 5dbbb00a0844..0466f252166e 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -34,8 +34,9 @@
 #include 
 #include 
 
-#include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -522,40 +523,35 @@ void 
GenericPropertiesNode::fillChildren(std::unique_ptr& pTree,
 }
 }
 
-uno::Reference xIntrospection = 
beans::theIntrospection::get(mxContext);
-if (!xIntrospection.is())
-return;
-
-auto xIntrospectionAccess = xIntrospection->inspect(maAny);
-if (!xIntrospectionAccess.is())
-return;
-
 auto xInvocationFactory = css::script::Invocation::create(mxContext);
 uno::Sequence aParameters = { maAny };
 auto xInvocationInterface = 
xInvocationFactory->createInstanceWithArguments(aParameters);
-uno::Reference xInvocation(xInvocationInterface, 
uno::UNO_QUERY);
+if (!xInvocationInterface.is())
+return;
 
-const auto xProperties = xIntrospectionAccess->getProperties(
-beans::PropertyConcept::ALL - beans::PropertyConcept::DANGEROUS);
+uno::Reference xInvocation(xInvocationInterface, 
uno::UNO_QUERY);
+if (!xInvocation.is())
+return;
 
-for (auto const& xProperty : xProperties)
+const auto aInvocationInfoSequence = xInvocation->getInfo();
+for (auto const& aInvocationInfo : aInvocationInfoSequence)
 {
-uno::Any aCurrentAny;
-
-try
+if (aInvocationInfo.eMemberType == script::MemberType_PROPERTY)
 {
-if (xInvocation->hasProperty(xProperty.Name))
+uno::Any aCurrentAny;
+auto const& aPropertyName = aInvocationInfo.aName;
+try
+{
+aCurrentAny = xInvocation->getValue(aPropertyName);
+}
+catch (...)
 {
-aCurrentAny = xInvocation->getValue(xProperty.Name);
 }
-}
-catch (...)
-{
-}
 
-auto* pObjectInspectorNode = createNodeObjectForAny(xProperty.Name, 
aCurrentAny);
-if (pObjectInspectorNode)
-lclAppendNodeToParent(pTree, pParent, pObjectInspectorNode);
+auto* pObjectInspectorNode = createNodeObjectForAny(aPropertyName, 
aCurrentAny);
+if (pObjectInspectorNode)
+lclAppendNodeToParent(pTree, pParent, pObjectInspectorNode);
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Tomaž Vajngerl (via logerrit)
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |   29 ++--
 1 file changed, 15 insertions(+), 14 deletions(-)

New commits:
commit 7aec678ff4f34bfe76ac64c8be8bae944ea508a8
Author: Tomaž Vajngerl 
AuthorDate: Thu Mar 4 22:36:55 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Mar 12 16:02:29 2021 +0100

devtools: show expander for the sequence only if it has elements

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

diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index f6a863b24aaf..5dbbb00a0844 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -425,28 +425,34 @@ public:
 
 class SequenceNode : public BasicValueNode
 {
+uno::Reference mxIdlArray;
+
 public:
 SequenceNode(OUString const& rName, uno::Any const& rAny,
  uno::Reference const& xContext)
 : BasicValueNode(rName, rAny, xContext)
 {
+auto xReflection = reflection::theCoreReflection::get(mxContext);
+OUString aTypeName = maAny.getValueType().getTypeName();
+auto xClass = xReflection->forName(aTypeName);
+mxIdlArray = xClass->getArray();
 }
 
-bool shouldShowExpander() override { return true; }
+bool shouldShowExpander() override
+{
+// Show expnder only if the sequence has elements
+int nLength = mxIdlArray->getLen(maAny);
+return nLength > 0;
+}
 
 void fillChildren(std::unique_ptr& pTree,
   const weld::TreeIter* pParent) override
 {
-auto xReflection = reflection::theCoreReflection::get(mxContext);
-uno::Reference xClass
-= xReflection->forName(maAny.getValueType().getTypeName());
-uno::Reference xIdlArray = xClass->getArray();
-
-int nLength = xIdlArray->getLen(maAny);
+int nLength = mxIdlArray->getLen(maAny);
 
 for (int i = 0; i < nLength; i++)
 {
-uno::Any aArrayValue = xIdlArray->get(maAny, i);
+uno::Any aArrayValue = mxIdlArray->get(maAny, i);
 uno::Reference xCurrent;
 
 auto* pObjectInspectorNode = 
createNodeObjectForAny(OUString::number(i), aArrayValue);
@@ -457,12 +463,7 @@ public:
 
 std::vector> getColumnValues() override
 {
-auto xReflection = reflection::theCoreReflection::get(mxContext);
-uno::Reference xClass
-= xReflection->forName(maAny.getValueType().getTypeName());
-uno::Reference xIdlArray = xClass->getArray();
-
-int nLength = xIdlArray->getLen(maAny);
+int nLength = mxIdlArray->getLen(maAny);
 
 OUString aValue = "";
 OUString aType = getAnyType(maAny).replaceAll(u"[]", u"");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Tomaž Vajngerl (via logerrit)
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |   11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit d1d7390596400aaeb401e98f6ba7242742b0921a
Author: Tomaž Vajngerl 
AuthorDate: Thu Mar 4 22:19:11 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Mar 12 16:01:49 2021 +0100

devtools: shorter type names, improve sequence type name

This change modifies the type names to a shorter form by replacing
"com.sun.star" with "css". Sequence type names are also changed
so that it shows the number of elements in the type name.

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

diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index 42d5f163e75b..f6a863b24aaf 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -182,7 +182,11 @@ OUString AnyToString(const uno::Any& aValue, const 
uno::ReferencegetLen(maAny);
 
-OUString aValue = "0 to " + OUString::number(nLength - 1);
-OUString aType = getAnyType(maAny);
+OUString aValue = "";
+OUString aType = getAnyType(maAny).replaceAll(u"[]", u"");
+aType += u"[" + OUString::number(nLength) + u"]";
 
 return {
 { 1, aValue },
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Tomaž Vajngerl (via logerrit)
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit ee88afa23e86c20a355ccf00e5d7321d44ad56db
Author: Tomaž Vajngerl 
AuthorDate: Thu Mar 4 22:11:56 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Mar 12 16:00:58 2021 +0100

devtools: don't show the expander if the object has no value

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

diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index ea864bb7a8f1..42d5f163e75b 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -366,6 +366,10 @@ public:
 switch (maAny.getValueType().getTypeClass())
 {
 case uno::TypeClass_INTERFACE:
+{
+uno::Reference xInterface(maAny, 
uno::UNO_QUERY);
+return xInterface.is();
+}
 case uno::TypeClass_SEQUENCE:
 return true;
 default:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Tomaž Vajngerl (via logerrit)
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |   27 ++--
 1 file changed, 3 insertions(+), 24 deletions(-)

New commits:
commit 4acad9bad5f17991c2e426348704fc5cdaabd8ec
Author: Tomaž Vajngerl 
AuthorDate: Thu Mar 4 22:08:32 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Mar 12 16:00:32 2021 +0100

devtools: simplify getting the type name for Any object

We actually don't need the XIdlClass to get the name for the type.

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

diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index 1977a30ce473..ea864bb7a8f1 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -50,22 +50,6 @@ namespace
 constexpr OUStringLiteral constTypeDescriptionManagerSingletonName
 = u"/singletons/com.sun.star.reflection.theTypeDescriptionManager";
 
-uno::Reference
-TypeToIdlClass(const uno::Type& rType, const 
uno::Reference& xContext)
-{
-auto xReflection = reflection::theCoreReflection::get(xContext);
-
-uno::Reference xRetClass;
-typelib_TypeDescription* pTD = nullptr;
-rType.getDescription(&pTD);
-if (pTD)
-{
-OUString sOWName(pTD->pTypeName);
-xRetClass = xReflection->forName(sOWName);
-}
-return xRetClass;
-}
-
 OUString AnyToString(const uno::Any& aValue, const 
uno::Reference& xContext)
 {
 OUString aRetStr;
@@ -198,12 +182,7 @@ OUString AnyToString(const uno::Any& aValue, const 
uno::Reference& xContext)
-{
-uno::Type aValType = aValue.getValueType();
-auto xIdlClass = TypeToIdlClass(aValType, xContext);
-return xIdlClass->getName();
-}
+OUString getAnyType(const uno::Any& aValue) { return 
aValue.getValueType().getTypeName(); }
 
 // Object inspector nodes
 
@@ -399,7 +378,7 @@ public:
 std::vector> getColumnValues() override
 {
 OUString aValue = AnyToString(maAny, mxContext);
-OUString aType = getAnyType(maAny, mxContext);
+OUString aType = getAnyType(maAny);
 
 return {
 { 1, aValue },
@@ -478,7 +457,7 @@ public:
 int nLength = xIdlArray->getLen(maAny);
 
 OUString aValue = "0 to " + OUString::number(nLength - 1);
-OUString aType = getAnyType(maAny, mxContext);
+OUString aType = getAnyType(maAny);
 
 return {
 { 1, aValue },
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Tomaž Vajngerl (via logerrit)
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |   28 
 1 file changed, 12 insertions(+), 16 deletions(-)

New commits:
commit 46035be60691ba799910565456a5425dd1af3e14
Author: Tomaž Vajngerl 
AuthorDate: Thu Mar 4 22:02:33 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Mar 12 16:00:15 2021 +0100

devtools: allow an Any without value in object inspector

If an Any doesn't have a value, still create the object so it will
be added to the object inspector, but with "NULL" string as the
value. This is needed to show that the property is available in
this object, but it hasn't been set to a value.

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

diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index a9687635c380..1977a30ce473 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -72,7 +72,7 @@ OUString AnyToString(const uno::Any& aValue, const 
uno::Reference xInterface(aValue, uno::UNO_QUERY);
+if (!xInterface.is())
+aRetStr = "NULL";
+else
+aRetStr = "";
 break;
 }
 case uno::TypeClass_STRUCT:
@@ -394,18 +398,13 @@ public:
 
 std::vector> getColumnValues() override
 {
-if (maAny.hasValue())
-{
-OUString aValue = AnyToString(maAny, mxContext);
-OUString aType = getAnyType(maAny, mxContext);
-
-return {
-{ 1, aValue },
-{ 2, aType },
-};
-}
+OUString aValue = AnyToString(maAny, mxContext);
+OUString aType = getAnyType(maAny, mxContext);
 
-return ObjectInspectorNodeInterface::getColumnValues();
+return {
+{ 1, aValue },
+{ 2, aType },
+};
 }
 };
 
@@ -595,9 +594,6 @@ void 
StructNode::fillChildren(std::unique_ptr& pTree, const weld
 ObjectInspectorNodeInterface* BasicValueNode::createNodeObjectForAny(OUString 
const& rName,
  uno::Any& 
rAny)
 {
-if (!rAny.hasValue())
-return nullptr;
-
 switch (rAny.getValueType().getTypeClass())
 {
 case uno::TypeClass_INTERFACE:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Luboš Luňák (via logerrit)
 cppuhelper/source/servicemanager.hxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit bd0dd2589c435078d8d974e3b37da5edb5f74f9f
Author: Luboš Luňák 
AuthorDate: Wed Mar 10 19:19:26 2021 +0100
Commit: Luboš Luňák 
CommitDate: Fri Mar 12 15:44:13 2021 +0100

use std::unordered_map in cppuhelper ServiceManager

It's faster and I do not see any reason for the map to be sorted.
cppuhelper::ServiceManager::findServiceImplementation() may be called
quite often e.g. during text layout by i18npool::BreakIterator.

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

diff --git a/cppuhelper/source/servicemanager.hxx 
b/cppuhelper/source/servicemanager.hxx
index f6a505492be8..d086a8d65ead 100644
--- a/cppuhelper/source/servicemanager.hxx
+++ b/cppuhelper/source/servicemanager.hxx
@@ -12,7 +12,7 @@
 #include 
 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -164,17 +164,17 @@ public:
 css::uno::Reference const & instance);
 };
 
-typedef std::map< OUString, std::shared_ptr< Implementation > >
+typedef std::unordered_map< OUString, std::shared_ptr< Implementation 
> >
 NamedImplementations;
 
 typedef
-std::map<
+std::unordered_map<
 css::uno::Reference< css::lang::XServiceInfo >,
 std::shared_ptr< Implementation > >
 DynamicImplementations;
 
 typedef
-std::map<
+std::unordered_map<
 OUString,
 std::vector< std::shared_ptr< Implementation > > >
 ImplementationMap;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Caolán McNamara (via logerrit)
 sc/source/ui/view/tabcont.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2502b80e57eb2116fd7043603833ff38f9da1320
Author: Caolán McNamara 
AuthorDate: Fri Mar 12 11:31:20 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 15:39:37 2021 +0100

query the DocShell if we have entered modal mode

rather than using Application::IsInModalMode()

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

diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index c96f3424a511..31628bc9c342 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -621,7 +621,7 @@ TabBarAllowRenamingReturnCode ScTabControl::AllowRenaming()
 OSL_FAIL("ScTabControl::AllowRenaming: nested calls");
 nRet = TABBAR_RENAMING_NO;
 }
-else if ( Application::IsInModalMode() )
+else if (pViewData->GetDocShell()->IsInModalMode())
 {
 //  don't show error message above any modal dialog
 //  instead cancel renaming without error message
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/fpicker/SalGtkPicker.cxx |   18 ++
 1 file changed, 18 insertions(+)

New commits:
commit ba123c6b03545f9c111c997d21b7dddf50399bf2
Author: Caolán McNamara 
AuthorDate: Fri Mar 12 11:21:12 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 15:39:17 2021 +0100

[Inc/Dec]ModalCount on parent frame so it knows it is in modal mode

which is something we do on welded dialog already, but the prior
native file dialog integration lacked this to date

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

diff --git a/vcl/unx/gtk3/fpicker/SalGtkPicker.cxx 
b/vcl/unx/gtk3/fpicker/SalGtkPicker.cxx
index f1bcbfc4d265..7502d5af290b 100644
--- a/vcl/unx/gtk3/fpicker/SalGtkPicker.cxx
+++ b/vcl/unx/gtk3/fpicker/SalGtkPicker.cxx
@@ -187,7 +187,25 @@ gint RunDialog::run()
 mxToolkit->addTopWindowListener(this);
 
 mxDesktop->addTerminateListener(this);
+
+// [Inc/Dec]ModalCount on parent frame so it knows it is in modal mode
+GtkWindow* pParent = gtk_window_get_transient_for(GTK_WINDOW(mpDialog));
+GtkSalFrame* pFrame = pParent ? 
GtkSalFrame::getFromWindow(GTK_WIDGET(pParent)) : nullptr;
+VclPtr xFrameWindow = pFrame ? pFrame->GetWindow() : nullptr;
+if (xFrameWindow)
+{
+xFrameWindow->IncModalCount();
+xFrameWindow->ImplGetFrame()->NotifyModalHierarchy(true);
+}
+
 gint nStatus = gtk_dialog_run(GTK_DIALOG(mpDialog));
+
+if (xFrameWindow)
+{
+xFrameWindow->DecModalCount();
+xFrameWindow->ImplGetFrame()->NotifyModalHierarchy(false);
+}
+
 mxDesktop->removeTerminateListener(this);
 
 if (mxToolkit.is())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Caolán McNamara (via logerrit)
 sc/source/ui/view/tabcont.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit e1dbdfc133a81eb065fb1426a2bd0f36244f5346
Author: Caolán McNamara 
AuthorDate: Fri Mar 12 11:01:12 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 15:38:50 2021 +0100

document how this ScTabControl::AllowRenaming condition can be reached

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

diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index 2bb97d065cf8..c96f3424a511 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -625,6 +625,9 @@ TabBarAllowRenamingReturnCode ScTabControl::AllowRenaming()
 {
 //  don't show error message above any modal dialog
 //  instead cancel renaming without error message
+//  e.g. start with default Sheet1, add another sheet
+//  alt+left click on Sheet2 tab, edit to say Sheet1
+//  ctrl+S to trigger modal file save dialog
 nRet = TABBAR_RENAMING_CANCEL;
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Luboš Luňák (via logerrit)
 vcl/source/filter/png/PngImageReader.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 16638bb53b93d9b3ad356c2774532fca4699f041
Author: Luboš Luňák 
AuthorDate: Tue Mar 9 16:54:38 2021 +0100
Commit: Luboš Luňák 
CommitDate: Fri Mar 12 15:37:48 2021 +0100

make vcl::PngImageReader ignore crc if fuzzing

Similarly to the way vcl::PNGReader did.

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

diff --git a/vcl/source/filter/png/PngImageReader.cxx 
b/vcl/source/filter/png/PngImageReader.cxx
index 1f1b632bbd0d..b385ba90a508 100644
--- a/vcl/source/filter/png/PngImageReader.cxx
+++ b/vcl/source/filter/png/PngImageReader.cxx
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -101,7 +102,10 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, bool 
bUseBitmap32)
 
 png_set_read_fn(pPng, &rStream, lclReadStream);
 
-png_set_crc_action(pPng, PNG_CRC_ERROR_QUIT, PNG_CRC_WARN_DISCARD);
+if (!utl::ConfigManager::IsFuzzing())
+png_set_crc_action(pPng, PNG_CRC_ERROR_QUIT, PNG_CRC_WARN_DISCARD);
+else
+png_set_crc_action(pPng, PNG_CRC_QUIET_USE, PNG_CRC_QUIET_USE);
 
 png_set_sig_bytes(pPng, PNG_SIGNATURE_SIZE);
 
@@ -360,6 +364,7 @@ std::unique_ptr getMsGifChunk(SvStream& 
rStream, sal_Int32* chunkSi
 // try to get it using libpng.
 // https://en.wikipedia.org/wiki/Portable_Network_Graphics#File_format
 // Each chunk is: 4 bytes length, 4 bytes type,  bytes, 4 bytes crc
+bool ignoreCrc = utl::ConfigManager::IsFuzzing();
 for (;;)
 {
 sal_uInt32 length, type, crc;
@@ -392,7 +397,7 @@ std::unique_ptr getMsGifChunk(SvStream& 
rStream, sal_Int32* chunkSi
 return nullptr;
 computedCrc = rtl_crc32(computedCrc, chunk.get(), length);
 rStream.ReadUInt32(crc);
-if (crc != computedCrc)
+if (!ignoreCrc && crc != computedCrc)
 continue; // invalid chunk, ignore
 if (chunkSize)
 *chunkSize = length;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: framework/source include/vcl sd/qa sd/source sfx2/source sw/qa vcl/Library_vcl.mk vcl/qa vcl/source vcl/workben

2021-03-12 Thread Luboš Luňák (via logerrit)
 framework/source/uiconfiguration/imagemanagerimpl.cxx  |6 
 include/vcl/filter/PngImageReader.hxx  |4 
 include/vcl/pngread.hxx|   59 
 sd/qa/unit/export-tests-ooxml1.cxx |6 
 sd/qa/unit/import-tests.cxx|   16 
 sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx |6 
 sfx2/source/control/recentdocsview.cxx |6 
 sfx2/source/control/thumbnailview.cxx  |6 
 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx |6 
 vcl/Library_vcl.mk |1 
 vcl/source/app/brand.cxx   |7 
 vcl/source/filter/graphicfilter.cxx|   70 
 vcl/source/filter/png/PngImageReader.cxx   |7 
 vcl/source/filter/png/pngread.cxx  | 1708 -
 vcl/source/treelist/transfer.cxx   |7 
 vcl/workben/fftester.cxx   |6 
 vcl/workben/pngfuzzer.cxx  |6 
 vcl/workben/vcldemo.cxx|1 
 18 files changed, 63 insertions(+), 1865 deletions(-)

New commits:
commit e1d0846e060d2b3faedfe1a5877303037d8cf4d6
Author: Luboš Luňák 
AuthorDate: Fri Mar 5 19:55:43 2021 +0100
Commit: Luboš Luňák 
CommitDate: Fri Mar 12 15:37:21 2021 +0100

drop PNGReader and use only PngImageReader

PNGReader is a home-made PNG reader that does not use libpng,
so it's more code, presumably less optimized and it apparently also
doesn't always map colors properly.
The only two features it has that PngImageReader doesn't are explicit
chunk reading (used only for reading Microsoft's GIF in PNG, I
implemented that for PngImageReader in a previous commit), and it
loads paletted images as BitmapEx with a palette instead of
converting to direct-color 24/32bpp or 8bpp-gray. The latter is even
questional if nowadays that's feature or a misfeature, as it saves
memory at the expense of speed. I can implement that if somebody
misses it.
I had to adjust some tests:
- CVE-2016-0952-1.png - invalid CRC of the PNG header, neither Gimp
  nor Gwenview can display that, it should fail
- afl-sample-Z_NEED_DICT.png - failure while decompressing data,
  but the loader considers that only a partially broken image since
  the header is correct, so it "passes" (like in Gimp or Gwenview)
- SdImportTest::testTdf134210() and
  testPictureWithSchemeColor::Load_Verify_Reload_Verify()
  need the colors tested changed, because apparently gamma correction
  or something is now applied correctly, and it wasn't before (again
  checked the loaded images with Gimp)

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

diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx 
b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index 64cf3a53342c..8b7733aac91e 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -42,7 +42,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -333,8 +333,8 @@ void ImageManagerImpl::implts_loadUserImages(
 BitmapEx aUserBitmap;
 {
 std::unique_ptr 
pSvStream(utl::UcbStreamHelper::CreateStream( xBitmapStream ));
-vcl::PNGReader aPngReader( *pSvStream );
-aUserBitmap = aPngReader.Read();
+vcl::PngImageReader aPngReader( *pSvStream );
+aUserBitmap = aPngReader.read();
 }
 
 // Delete old image list and create a new one from the 
read bitmap
diff --git a/include/vcl/filter/PngImageReader.hxx 
b/include/vcl/filter/PngImageReader.hxx
index 2cd57549cf49..2615fd961bd4 100644
--- a/include/vcl/filter/PngImageReader.hxx
+++ b/include/vcl/filter/PngImageReader.hxx
@@ -33,7 +33,11 @@ class VCL_DLLPUBLIC PngImageReader
 public:
 PngImageReader(SvStream& rStream);
 
+// Returns true if image was successfully read without errors.
+// A usable bitmap may be returned even if there were errors (e.g. 
incomplete image).
 bool read(BitmapEx& rBitmap);
+// Returns a bitmap without indicating if there were errors.
+BitmapEx read();
 
 // Returns the contents of the msOG chunk (containing a Gif image), if it 
exists.
 // Does not change position in the stream.
diff --git a/include/vcl/pngread.hxx b/include/vcl/pngread.hxx
deleted file mode 100644
index d3fa1942ee57..
--- a/include/vcl/pngread.hxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode:

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

2021-03-12 Thread Luboš Luňák (via logerrit)
 include/vcl/filter/PngImageReader.hxx|5 +
 vcl/source/filter/png/PngImageReader.cxx |   87 ---
 2 files changed, 85 insertions(+), 7 deletions(-)

New commits:
commit e286bd791bfaa00746ea143303761f76e0af1f0d
Author: Luboš Luňák 
AuthorDate: Fri Mar 5 19:42:41 2021 +0100
Commit: Luboš Luňák 
CommitDate: Fri Mar 12 15:36:32 2021 +0100

add support for Microsoft Gif chunk to PngImageReader

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

diff --git a/include/vcl/filter/PngImageReader.hxx 
b/include/vcl/filter/PngImageReader.hxx
index 97b2616883b2..2cd57549cf49 100644
--- a/include/vcl/filter/PngImageReader.hxx
+++ b/include/vcl/filter/PngImageReader.hxx
@@ -34,6 +34,11 @@ public:
 PngImageReader(SvStream& rStream);
 
 bool read(BitmapEx& rBitmap);
+
+// Returns the contents of the msOG chunk (containing a Gif image), if it 
exists.
+// Does not change position in the stream.
+static std::unique_ptr getMicrosoftGifChunk(SvStream& rStream,
+ sal_Int32* 
chunkSize = nullptr);
 };
 
 } // namespace vcl
diff --git a/vcl/source/filter/png/PngImageReader.cxx 
b/vcl/source/filter/png/PngImageReader.cxx
index 3351e314b3fe..829f3dd45bca 100644
--- a/vcl/source/filter/png/PngImageReader.cxx
+++ b/vcl/source/filter/png/PngImageReader.cxx
@@ -10,6 +10,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -40,18 +41,20 @@ void lclReadStream(png_structp pPng, png_bytep pOutBytes, 
png_size_t nBytesToRea
 }
 }
 
-bool reader(SvStream& rStream, BitmapEx& rBitmapEx, bool bUseBitmap32)
-{
-enum
-{
-PNG_SIGNATURE_SIZE = 8
-};
+constexpr int PNG_SIGNATURE_SIZE = 8;
 
+bool isPng(SvStream& rStream)
+{
 // Check signature bytes
 sal_uInt8 aHeader[PNG_SIGNATURE_SIZE];
 rStream.ReadBytes(aHeader, PNG_SIGNATURE_SIZE);
 
-if (png_sig_cmp(aHeader, 0, PNG_SIGNATURE_SIZE))
+return png_sig_cmp(aHeader, 0, PNG_SIGNATURE_SIZE) == 0;
+}
+
+bool reader(SvStream& rStream, BitmapEx& rBitmapEx, bool bUseBitmap32)
+{
+if (!isPng(rStream))
 return false;
 
 png_structp pPng = png_create_read_struct(PNG_LIBPNG_VER_STRING, nullptr, 
nullptr, nullptr);
@@ -347,6 +350,64 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, bool 
bUseBitmap32)
 return true;
 }
 
+std::unique_ptr getMsGifChunk(SvStream& rStream, sal_Int32* 
chunkSize)
+{
+if (chunkSize)
+*chunkSize = 0;
+if (!isPng(rStream))
+return nullptr;
+// It's easier to read manually the contents and find the chunk than
+// try to get it using libpng.
+// https://en.wikipedia.org/wiki/Portable_Network_Graphics#File_format
+// Each chunk is: 4 bytes length, 4 bytes type,  bytes, 4 bytes crc
+for (;;)
+{
+sal_uInt32 length, type, crc;
+rStream.ReadUInt32(length);
+rStream.ReadUInt32(type);
+if (!rStream.good())
+return nullptr;
+constexpr sal_uInt32 PNGCHUNK_msOG = 0x6d734f47; // Microsoft Office 
Animated GIF
+constexpr sal_uInt64 MSGifHeaderSize = 11; // "MSOFFICE9.0"
+if (type == PNGCHUNK_msOG && length > MSGifHeaderSize)
+{
+// calculate chunktype CRC (swap it back to original byte order)
+sal_uInt32 typeForCrc = type;
+#if defined(__LITTLEENDIAN) || defined(OSL_LITENDIAN)
+typeForCrc = OSL_SWAPDWORD(typeForCrc);
+#endif
+sal_uInt32 computedCrc = rtl_crc32(0, &typeForCrc, 4);
+const sal_uInt64 pos = rStream.Tell();
+if (pos + length >= rStream.TellEnd())
+return nullptr; // broken PNG
+
+char msHeader[MSGifHeaderSize];
+if (rStream.ReadBytes(msHeader, MSGifHeaderSize) != 
MSGifHeaderSize)
+return nullptr;
+computedCrc = rtl_crc32(computedCrc, msHeader, MSGifHeaderSize);
+length -= MSGifHeaderSize;
+
+std::unique_ptr chunk(new sal_uInt8[length]);
+if (rStream.ReadBytes(chunk.get(), length) != length)
+return nullptr;
+computedCrc = rtl_crc32(computedCrc, chunk.get(), length);
+rStream.ReadUInt32(crc);
+if (crc != computedCrc)
+continue; // invalid chunk, ignore
+if (chunkSize)
+*chunkSize = length;
+return chunk;
+}
+if (rStream.remainingSize() < length)
+return nullptr;
+rStream.SeekRel(length);
+rStream.ReadUInt32(crc);
+constexpr sal_uInt32 PNGCHUNK_IEND = 0x49454e44;
+if (type == PNGCHUNK_IEND)
+return nullptr;
+}
+}
+
 } // anonymous namespace
 
 namespace vcl
@@ -364,6 +425,18 @@ bool PngImageReader::read(BitmapEx& rBitmapEx)
 return reader(mrStream, rBitmapEx, bSupports

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

2021-03-12 Thread Luboš Luňák (via logerrit)
 vcl/source/filter/png/PngImageReader.cxx |   37 +--
 1 file changed, 35 insertions(+), 2 deletions(-)

New commits:
commit 12eac05c8088cefadace2629efce5473212662eb
Author: Luboš Luňák 
AuthorDate: Fri Mar 5 21:45:11 2021 +0100
Commit: Luboš Luňák 
CommitDate: Fri Mar 12 15:36:05 2021 +0100

make PngImageReader read grayscale images as 8bpp, not 24bpp

Grayscale is still a direct-color format, so it can save memory
while not being slow (well, at least with Skia I made sure it's
fast). PNGReader also reads grayscale images this way.

Change-Id: I896f9901aca4defc8263fdcea6d2bebd574d1e8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112040
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
Reviewed-by: Luboš Luňák 

diff --git a/vcl/source/filter/png/PngImageReader.cxx 
b/vcl/source/filter/png/PngImageReader.cxx
index a510c6704686..3351e314b3fe 100644
--- a/vcl/source/filter/png/PngImageReader.cxx
+++ b/vcl/source/filter/png/PngImageReader.cxx
@@ -134,7 +134,9 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, bool 
bUseBitmap32)
 if (bitDepth < 8)
 png_set_packing(pPng);
 
-if (colorType == PNG_COLOR_TYPE_GRAY || colorType == 
PNG_COLOR_TYPE_GRAY_ALPHA)
+// Convert gray+alpha to RGBA, keep gray as gray.
+if (colorType == PNG_COLOR_TYPE_GRAY_ALPHA
+|| (colorType == PNG_COLOR_TYPE_GRAY && png_get_valid(pPng, pInfo, 
PNG_INFO_tRNS)))
 {
 png_set_gray_to_rgb(pPng);
 }
@@ -154,7 +156,9 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, bool 
bUseBitmap32)
 return false;
 }
 
-if (bitDepth != 8 || (colorType != PNG_COLOR_TYPE_RGB && colorType != 
PNG_COLOR_TYPE_RGB_ALPHA))
+if (bitDepth != 8
+|| (colorType != PNG_COLOR_TYPE_RGB && colorType != 
PNG_COLOR_TYPE_RGB_ALPHA
+&& colorType != PNG_COLOR_TYPE_GRAY))
 {
 png_destroy_read_struct(&pPng, &pInfo, nullptr);
 return false;
@@ -299,6 +303,35 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, bool 
bUseBitmap32)
 rBitmapEx = BitmapEx(aBitmap, aBitmapAlpha);
 }
 }
+else if (colorType == PNG_COLOR_TYPE_GRAY)
+{
+size_t aRowSizeBytes = png_get_rowbytes(pPng, pInfo);
+
+aBitmap = Bitmap(Size(width, height), 8, 
&Bitmap::GetGreyPalette(256));
+aBitmap.Erase(COL_WHITE);
+{
+pWriteAccess = BitmapScopedWriteAccess(aBitmap);
+
+aRows = std::vector>(height);
+for (auto& rRow : aRows)
+rRow.resize(aRowSizeBytes, 0);
+
+for (int pass = 0; pass < nNumberOfPasses; pass++)
+{
+for (png_uint_32 y = 0; y < height; y++)
+{
+Scanline pScanline = pWriteAccess->GetScanline(y);
+png_bytep pRow = aRows[y].data();
+png_read_row(pPng, pRow, nullptr);
+size_t iColor = 0;
+for (size_t i = 0; i < aRowSizeBytes; ++i)
+pScanline[iColor++] = pRow[i];
+}
+}
+pWriteAccess.reset();
+}
+rBitmapEx = BitmapEx(aBitmap);
+}
 }
 
 png_read_end(pPng, pInfo);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Luboš Luňák (via logerrit)
 vcl/source/filter/png/PngImageReader.cxx |4 
 1 file changed, 4 deletions(-)

New commits:
commit 750f9f2ac4f713115b07c6ab8db014ff6e3270a9
Author: Luboš Luňák 
AuthorDate: Thu Mar 11 11:28:27 2021 +0100
Commit: Luboš Luňák 
CommitDate: Fri Mar 12 15:35:33 2021 +0100

do not clear bitmaps in png loader just for broken images

As Tomaž pointed out, this is optimizing for a rare scenario.
The clearing is actually a memset(), so it's not that expensive,
but fair enough, a broken image is a broken image.

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

diff --git a/vcl/source/filter/png/PngImageReader.cxx 
b/vcl/source/filter/png/PngImageReader.cxx
index ad778bce6aba..a510c6704686 100644
--- a/vcl/source/filter/png/PngImageReader.cxx
+++ b/vcl/source/filter/png/PngImageReader.cxx
@@ -177,7 +177,6 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, bool 
bUseBitmap32)
 size_t aRowSizeBytes = png_get_rowbytes(pPng, pInfo);
 
 aBitmap = Bitmap(Size(width, height), 24);
-aBitmap.Erase(COL_WHITE);
 {
 pWriteAccess = BitmapScopedWriteAccess(aBitmap);
 ScanlineFormat eFormat = pWriteAccess->GetScanlineFormat();
@@ -215,7 +214,6 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, bool 
bUseBitmap32)
 if (bUseBitmap32)
 {
 aBitmap = Bitmap(Size(width, height), 32);
-aBitmap.Erase(COL_WHITE);
 {
 pWriteAccess = BitmapScopedWriteAccess(aBitmap);
 ScanlineFormat eFormat = pWriteAccess->GetScanlineFormat();
@@ -264,8 +262,6 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, bool 
bUseBitmap32)
 {
 aBitmap = Bitmap(Size(width, height), 24);
 aBitmapAlpha = AlphaMask(Size(width, height), nullptr);
-aBitmap.Erase(COL_WHITE);
-aBitmapAlpha.Erase(0xff); // transparent
 {
 pWriteAccess = BitmapScopedWriteAccess(aBitmap);
 ScanlineFormat eFormat = pWriteAccess->GetScanlineFormat();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Luboš Luňák (via logerrit)
 vcl/source/filter/png/PngImageReader.cxx |   60 ---
 1 file changed, 47 insertions(+), 13 deletions(-)

New commits:
commit da4de084d20116f0ae49b43cd454188fde2ddac9
Author: Luboš Luňák 
AuthorDate: Fri Mar 5 19:38:07 2021 +0100
Commit: Luboš Luňák 
CommitDate: Fri Mar 12 15:35:16 2021 +0100

make PngImageReader return partially broken images

This makes it consistent with PNGReader, which is capable of reading
in e.g. the invalid-chunk.png test file.

Change-Id: Ia3b5553e588ac5778fad6de5bc284d5822febbda
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112038
Reviewed-by: Tomaž Vajngerl 
Reviewed-by: Luboš Luňák 
Tested-by: Jenkins

diff --git a/vcl/source/filter/png/PngImageReader.cxx 
b/vcl/source/filter/png/PngImageReader.cxx
index be94f99b04d2..ad778bce6aba 100644
--- a/vcl/source/filter/png/PngImageReader.cxx
+++ b/vcl/source/filter/png/PngImageReader.cxx
@@ -33,7 +33,11 @@ void lclReadStream(png_structp pPng, png_bytep pOutBytes, 
png_size_t nBytesToRea
 sal_Size nBytesRead = pStream->ReadBytes(pOutBytes, nBytesToRead);
 
 if (nBytesRead != nBytesToRead)
-png_error(pPng, "Error reading");
+{
+// Make sure to not reuse old data (could cause infinite loop).
+memset(pOutBytes + nBytesRead, 0, nBytesToRead - nBytesRead);
+png_warning(pPng, "Error reading");
+}
 }
 
 bool reader(SvStream& rStream, BitmapEx& rBitmapEx, bool bUseBitmap32)
@@ -61,9 +65,32 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, bool 
bUseBitmap32)
 return false;
 }
 
+// All variables holding resources need to be declared here in order to be
+// properly cleaned up in case of an error, otherwise libpng's longjmp()
+// jumps over the destructor calls.
+Bitmap aBitmap;
+AlphaMask aBitmapAlpha;
+Size prefSize;
+BitmapScopedWriteAccess pWriteAccess;
+AlphaScopedWriteAccess pWriteAccessAlpha;
+std::vector> aRows;
+
 if (setjmp(png_jmpbuf(pPng)))
 {
 png_destroy_read_struct(&pPng, &pInfo, nullptr);
+// Set the bitmap if it contains something, even on failure. This 
allows
+// reading images that are only partially broken.
+pWriteAccess.reset();
+pWriteAccessAlpha.reset();
+if (!aBitmap.IsEmpty() && !aBitmapAlpha.IsEmpty())
+rBitmapEx = BitmapEx(aBitmap, aBitmapAlpha);
+else if (!aBitmap.IsEmpty())
+rBitmapEx = BitmapEx(aBitmap);
+if (!rBitmapEx.IsEmpty() && !prefSize.IsEmpty())
+{
+rBitmapEx.SetPrefMapMode(MapMode(MapUnit::Map100thMM));
+rBitmapEx.SetPrefSize(prefSize);
+}
 return false;
 }
 
@@ -133,7 +160,6 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, bool 
bUseBitmap32)
 return false;
 }
 
-Size prefSize;
 png_uint_32 res_x = 0;
 png_uint_32 res_y = 0;
 int unit_type = 0;
@@ -150,14 +176,15 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, bool 
bUseBitmap32)
 {
 size_t aRowSizeBytes = png_get_rowbytes(pPng, pInfo);
 
-Bitmap aBitmap(Size(width, height), 24);
+aBitmap = Bitmap(Size(width, height), 24);
+aBitmap.Erase(COL_WHITE);
 {
-BitmapScopedWriteAccess pWriteAccess(aBitmap);
+pWriteAccess = BitmapScopedWriteAccess(aBitmap);
 ScanlineFormat eFormat = pWriteAccess->GetScanlineFormat();
 if (eFormat == ScanlineFormat::N24BitTcBgr)
 png_set_bgr(pPng);
 
-std::vector> aRows(height);
+aRows = std::vector>(height);
 for (auto& rRow : aRows)
 rRow.resize(aRowSizeBytes, 0);
 
@@ -177,6 +204,7 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, bool 
bUseBitmap32)
 }
 }
 }
+pWriteAccess.reset();
 }
 rBitmapEx = BitmapEx(aBitmap);
 }
@@ -186,9 +214,10 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, bool 
bUseBitmap32)
 
 if (bUseBitmap32)
 {
-Bitmap aBitmap(Size(width, height), 32);
+aBitmap = Bitmap(Size(width, height), 32);
+aBitmap.Erase(COL_WHITE);
 {
-BitmapScopedWriteAccess pWriteAccess(aBitmap);
+pWriteAccess = BitmapScopedWriteAccess(aBitmap);
 ScanlineFormat eFormat = pWriteAccess->GetScanlineFormat();
 if (eFormat == ScanlineFormat::N32BitTcAbgr
 || eFormat == ScanlineFormat::N32BitTcBgra)
@@ -196,7 +225,7 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, bool 
bUseBitmap32)
 png_set_bgr(pPng);
 }
 
-std::vector> aRows(height);
+aRows = std::vector>(height);
 

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

2021-03-12 Thread Xisco Fauli (via logerrit)
 vcl/qa/cppunit/pdfexport/data/tdf129085.docx |binary
 vcl/qa/cppunit/pdfexport/pdfexport.cxx   |   43 +++
 2 files changed, 43 insertions(+)

New commits:
commit f4f6ec04544059910ab5ec47817fad2287dd3f5a
Author: Xisco Fauli 
AuthorDate: Thu Mar 11 14:00:26 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Mar 12 15:33:41 2021 +0100

tdf#129085: vcl_pdfexport: Add unittest

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

diff --git a/vcl/qa/cppunit/pdfexport/data/tdf129085.docx 
b/vcl/qa/cppunit/pdfexport/data/tdf129085.docx
new file mode 100644
index ..6ac21d8f28b8
Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf129085.docx differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index a15832aeabff..514ea6ef73bc 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -1780,6 +1780,49 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf121615)
 CPPUNIT_ASSERT_EQUAL(COL_BLACK, aBitmap.GetPixelColor(199, 299));
 }
 
+CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf129085)
+{
+vcl::filter::PDFDocument aDocument;
+load(u"tdf129085.docx", aDocument);
+
+// The document has one page.
+std::vector aPages = aDocument.GetPages();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), aPages.size());
+
+// Get access to the only image on the only page.
+vcl::filter::PDFObjectElement* pResources = 
aPages[0]->LookupObject("Resources");
+CPPUNIT_ASSERT(pResources);
+auto pXObjects
+= 
dynamic_cast(pResources->Lookup("XObject"));
+
+// Without the fix in place, this test would have failed here
+CPPUNIT_ASSERT(pXObjects);
+CPPUNIT_ASSERT_EQUAL(static_cast(1), pXObjects->GetItems().size());
+vcl::filter::PDFObjectElement* pXObject
+= pXObjects->LookupObject(pXObjects->GetItems().begin()->first);
+CPPUNIT_ASSERT(pXObject);
+vcl::filter::PDFStreamElement* pStream = pXObject->GetStream();
+CPPUNIT_ASSERT(pStream);
+SvMemoryStream& rObjectStream = pStream->GetMemory();
+
+// Load the embedded image.
+rObjectStream.Seek(0);
+GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
+Graphic aGraphic;
+sal_uInt16 format;
+ErrCode bResult = rFilter.ImportGraphic(aGraphic, OUString("import"), 
rObjectStream,
+GRFILTER_FORMAT_DONTKNOW, &format);
+CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
+
+sal_uInt16 jpegFormat = 
rFilter.GetImportFormatNumberForShortName(JPG_SHORTNAME);
+CPPUNIT_ASSERT(jpegFormat != GRFILTER_FORMAT_NOTFOUND);
+CPPUNIT_ASSERT_EQUAL(jpegFormat, format);
+BitmapEx aBitmap = aGraphic.GetBitmapEx();
+CPPUNIT_ASSERT_EQUAL(tools::Long(884), aBitmap.GetSizePixel().Width());
+CPPUNIT_ASSERT_EQUAL(tools::Long(925), aBitmap.GetSizePixel().Height());
+CPPUNIT_ASSERT_EQUAL(24, int(aBitmap.GetBitCount()));
+}
+
 CPPUNIT_TEST_FIXTURE(PdfExportTest, testTocLink)
 {
 // Load the Writer document.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Xisco Fauli (via logerrit)
 vcl/qa/cppunit/pdfexport/data/tdf124272.odt |binary
 vcl/qa/cppunit/pdfexport/pdfexport.cxx  |   44 
 2 files changed, 44 insertions(+)

New commits:
commit 2f1e74c77eb13b53a7d4b5d31a7f2ac9ff8f
Author: Xisco Fauli 
AuthorDate: Thu Mar 11 13:21:49 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Mar 12 15:33:03 2021 +0100

tdf#124272: vcl_pdfexport: Add unittest

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

diff --git a/vcl/qa/cppunit/pdfexport/data/tdf124272.odt 
b/vcl/qa/cppunit/pdfexport/data/tdf124272.odt
new file mode 100644
index ..54d4dcb2a1a4
Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf124272.odt differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 365a9a0955c1..a15832aeabff 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -1688,6 +1688,50 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf115967)
 CPPUNIT_ASSERT_EQUAL(OUString("m=750abc"), sText);
 }
 
+CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf124272)
+{
+// Import the bugdoc and export as PDF.
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"tdf124272.odt";
+mxComponent = loadFromDesktop(aURL);
+
+uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
+utl::MediaDescriptor aMediaDescriptor;
+aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+xStorable->storeToURL(maTempFile.GetURL(), 
aMediaDescriptor.getAsConstPropertyValueList());
+
+// Parse the export result.
+vcl::filter::PDFDocument aDocument;
+SvFileStream aStream(maTempFile.GetURL(), StreamMode::READ);
+CPPUNIT_ASSERT(aDocument.Read(aStream));
+
+// The document has one page.
+std::vector aPages = aDocument.GetPages();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), aPages.size());
+
+// The page has a stream.
+vcl::filter::PDFObjectElement* pContents = 
aPages[0]->LookupObject("Contents");
+CPPUNIT_ASSERT(pContents);
+vcl::filter::PDFStreamElement* pStream = pContents->GetStream();
+CPPUNIT_ASSERT(pStream);
+SvMemoryStream& rObjectStream = pStream->GetMemory();
+// Uncompress it.
+SvMemoryStream aUncompressed;
+ZCodec aZCodec;
+aZCodec.BeginCompression();
+rObjectStream.Seek(0);
+aZCodec.Decompress(rObjectStream, aUncompressed);
+CPPUNIT_ASSERT(aZCodec.EndCompression());
+
+OString aBitmap("Q q 299.899 782.189 m\n"
+"55.2 435.889 l 299.899 435.889 l 299.899 782.189 l\n"
+"h");
+
+auto pStart = static_cast(aUncompressed.GetData());
+const char* pEnd = pStart + aUncompressed.GetSize();
+auto it = std::search(pStart, pEnd, aBitmap.getStr(), aBitmap.getStr() + 
aBitmap.getLength());
+CPPUNIT_ASSERT(it != pEnd);
+}
+
 CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf121615)
 {
 vcl::filter::PDFDocument aDocument;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Caolán McNamara (via logerrit)
 xmlsecurity/source/helper/xmlsignaturehelper.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit c0ec7d342bd715d9910cf28afe10a6bfa3ba28cb
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 20:23:31 2021 +
Commit: Miklos Vajna 
CommitDate: Fri Mar 12 15:29:47 2021 +0100

do same set error state as ReadAndVerifySignature does

this function is nearly exactly the same as ReadAndVerifySignature
except it doesn't set error-state on exception during parse

Change-Id: Ife881f639a11d3185920ca62cc2cd22812fae36d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112366
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
Reviewed-by: Miklos Vajna 

diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx 
b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index d91a02ad8124..18ed40ce6ac5 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -406,6 +406,7 @@ bool 
XMLSignatureHelper::ReadAndVerifySignatureStorageStream(const css::uno::Ref
 catch(const uno::Exception&)
 {
 DBG_UNHANDLED_EXCEPTION("xmlsecurity.helper");
+mbError = true;
 }
 
 // release the signature reader
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/calc_tests2/tdf105268.py |   35 --
 sc/qa/unit/ucalc.cxx  |   14 +
 2 files changed, 14 insertions(+), 35 deletions(-)

New commits:
commit 1af1458fa44c6ed9f73a68696f494657ef8e2bc5
Author: Xisco Fauli 
AuthorDate: Fri Mar 12 12:09:42 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Mar 12 15:24:25 2021 +0100

tdf#105268: sc: move UItest to CppUnittest

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

diff --git a/sc/qa/uitest/calc_tests2/tdf105268.py 
b/sc/qa/uitest/calc_tests2/tdf105268.py
deleted file mode 100644
index f501e3511048..
--- a/sc/qa/uitest/calc_tests2/tdf105268.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict
-from uitest.uihelper.common import select_pos
-from uitest.uihelper.calc import enter_text_to_cell
-from libreoffice.calc.document import get_cell_by_position
-from libreoffice.uno.propertyvalue import mkPropertyValues
-#Bug 105268 - Auto Fill: The Next Value for "001-001-001" is "001-001-002" 
Rather than "001-001000"
-
-class tdf105268(UITestCase):
-def test_tdf105268(self):
-calc_doc = self.ui_test.create_doc_in_start_center("calc")
-xCalcDoc = self.xUITest.getTopFocusWindow()
-gridwin = xCalcDoc.getChild("grid_window")
-document = self.ui_test.get_component()
-enter_text_to_cell(gridwin, "A1", "001-001-001")
-gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A3"}))
-self.ui_test.execute_dialog_through_command(".uno:FillSeries")
-xDialog = self.xUITest.getTopFocusWindow()
-xautofill = xDialog.getChild("autofill")
-xautofill.executeAction("CLICK", tuple())
-xOK = xDialog.getChild("ok")
-self.ui_test.close_dialog_through_button(xOK)
-self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), 
"001-001-001")
-self.assertEqual(get_cell_by_position(document, 0, 0, 1).getString(), 
"001-001-002")
-self.assertEqual(get_cell_by_position(document, 0, 0, 2).getString(), 
"001-001-003")
-
-self.ui_test.close_doc()
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
\ No newline at end of file
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 57525bea2c3a..5fab68bcf3f1 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4989,6 +4989,20 @@ void Test::testAutoFill()
 CPPUNIT_ASSERT_EQUAL( OUString("4.5"), m_pDoc->GetString( 0, 65, 0 ) );
 CPPUNIT_ASSERT_EQUAL( OUString("4.6"), m_pDoc->GetString( 0, 66, 0 ) );
 
+// Clear column A for a new test.
+clearRange(m_pDoc, ScRange(0,0,0,0,MAXROW,0));
+m_pDoc->SetRowHidden(0, MAXROW, 0, false); // Show all rows.
+
+m_pDoc->SetString( 0, 70, 0, "001-001-001" );
+m_pDoc->Fill( 0, 70, 0, 70, nullptr, aMarkData, 3, FILL_TO_BOTTOM, 
FILL_AUTO );
+
+// tdf#105268: Without the fix in place, this test would have failed with
+// - Expected: 001-001-002
+// - Actual  : 001-001000
+CPPUNIT_ASSERT_EQUAL( OUString("001-001-002"), m_pDoc->GetString( 0, 71, 0 
) );
+CPPUNIT_ASSERT_EQUAL( OUString("001-001-003"), m_pDoc->GetString( 0, 72, 0 
) );
+CPPUNIT_ASSERT_EQUAL( OUString("001-001-004"), m_pDoc->GetString( 0, 73, 0 
) );
+
 m_pDoc->DeleteTab(0);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 4 commits - external/cairo

2021-03-12 Thread Miklos Vajna (via logerrit)
 external/cairo/ExternalProject_cairo.mk |1 
 external/cairo/UnpackedTarball_cairo.mk |3 
 external/cairo/cairo/cairo.oldfreetype.patch|  112 ++--
 external/cairo/cairo/cairo.oldfreetypecentos6.patch |   78 +
 4 files changed, 119 insertions(+), 75 deletions(-)

New commits:
commit 3fb1632217a1d7aa05d28482c1291123daee0da1
Author: Miklos Vajna 
AuthorDate: Thu Sep 24 10:39:01 2020 +0200
Commit: Andras Timar 
CommitDate: Fri Mar 12 14:54:08 2021 +0100

cairo: avoid linking to freetype-2.8-only FT_Get_Var_Design_Coordinates

This is meant to help producing binaries which run on Ubuntu 16.04.

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

diff --git a/external/cairo/cairo/cairo.oldfreetype.patch 
b/external/cairo/cairo/cairo.oldfreetype.patch
index 2ccc1908fa22..a25c8bbdd030 100644
--- a/external/cairo/cairo/cairo.oldfreetype.patch
+++ b/external/cairo/cairo/cairo.oldfreetype.patch
@@ -9,3 +9,34 @@
/* If FT_Get_Var_Blend_Coordinates() is available, we can check if the
 * current design coordinates are the default coordinates. In this case
 * the current outlines match the font tables.
+--- a/cairo/src/cairo-ft-font.c2020-09-24 10:35:25.391941702 +0200
 b/cairo/src/cairo-ft-font.c2020-09-24 10:35:39.900126419 +0200
+@@ -451,7 +451,7 @@
+ unscaled->have_color = FT_HAS_COLOR (face) != 0;
+ unscaled->have_color_set = TRUE;
+ 
+-#ifdef HAVE_FT_GET_VAR_DESIGN_COORDINATES
++#if 0
+   {
+   FT_MM_Var *ft_mm_var;
+   if (0 == FT_Get_MM_Var (face, &ft_mm_var))
+@@ -2377,7 +2377,7 @@
+ }
+ 
+ current_coords = malloc (sizeof (FT_Fixed) * ft_mm_var->num_axis);
+-#ifdef HAVE_FT_GET_VAR_DESIGN_COORDINATES
++#if 0
+ ret = FT_Get_Var_Design_Coordinates (face, ft_mm_var->num_axis, 
current_coords);
+ if (ret == 0) {
+ for (i = 0; i < ft_mm_var->num_axis; i++) {
+--- a/cairo/test/font-variations.c 2020-09-24 10:36:01.592402635 +0200
 b/cairo/test/font-variations.c 2020-09-24 10:36:08.728493510 +0200
+@@ -117,7 +117,7 @@
+ return CAIRO_TEST_FAILURE;
+ }
+ 
+-#ifdef HAVE_FT_GET_VAR_DESIGN_COORDINATES
++#if 0
+ ret = FT_Get_Var_Design_Coordinates (ft_face, 20, coords);
+ if (ret != 0) {
+ cairo_test_log (ctx, "Failed to get coords");
commit 6a25c5a13b510d78ed96b6d14a251a9de335a2e1
Author: Miklos Vajna 
AuthorDate: Wed Sep 23 13:48:11 2020 +0200
Commit: Andras Timar 
CommitDate: Fri Mar 12 14:53:43 2021 +0100

cairo: avoid linking to freetype-2.8 symbols

This is meant to help producing binaries which run on Ubuntu 16.04.

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

diff --git a/external/cairo/UnpackedTarball_cairo.mk 
b/external/cairo/UnpackedTarball_cairo.mk
index 186971410840..b31c61bac5f5 100644
--- a/external/cairo/UnpackedTarball_cairo.mk
+++ b/external/cairo/UnpackedTarball_cairo.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,cairo,\
external/cairo/cairo/cairo-1.10.2.patch \
external/cairo/cairo/cairo.oldfreetypecentos6.patch \
external/cairo/cairo/cairo-libtool-rpath.patch.1 \
+   external/cairo/cairo/cairo.oldfreetype.patch \
 ))
 
 ifeq ($(OS),iOS)
diff --git a/external/cairo/cairo/cairo.oldfreetype.patch 
b/external/cairo/cairo/cairo.oldfreetype.patch
new file mode 100644
index ..2ccc1908fa22
--- /dev/null
+++ b/external/cairo/cairo/cairo.oldfreetype.patch
@@ -0,0 +1,11 @@
+--- a/cairo/src/cairo-ft-font.c2020-09-23 15:27:09.114619562 +0200
 b/cairo/src/cairo-ft-font.c2020-09-23 15:27:22.602808705 +0200
+@@ -2838,7 +2838,7 @@
+   goto cleanup;
+   }
+ 
+-#if FREETYPE_MAJOR > 2 || ( FREETYPE_MAJOR == 2 &&  FREETYPE_MINOR >= 8)
++#if 0
+   /* If FT_Get_Var_Blend_Coordinates() is available, we can check if the
+* current design coordinates are the default coordinates. In this case
+* the current outlines match the font tables.
commit eda42b714c0e5db7bbb8565e0a25ad5e31e5b546
Author: Andras Timar 
AuthorDate: Fri Mar 12 14:53:23 2021 +0100
Commit: Andras Timar 
CommitDate: Fri Mar 12 14:53:23 2021 +0100

rename a cairo patch to make room for the next patch

Change-Id: If1964ebfec41074e8d1ef83428e6e51a4b68df52

diff --git a/external/cairo/UnpackedTarball_cairo.mk 
b/external/cairo/UnpackedTarball_cairo.mk
index 7d3537bbc4fb..186971410840 100644
--- a/external/cairo/UnpackedTarball_cairo.mk
+++ b/external/cairo/UnpackedTarball_cairo.mk
@@ -13,7 +13,7 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,cairo,$(CAIRO_TARBALL),,cairo))
 
 $(e

Re: breaking yield loops on forced quit.

2021-03-12 Thread Jan-Marek Glogowski

Hi *,

Am 12.03.21 um 12:16 schrieb Michael Meeks:

We've recently had problems with dialogs running in Online Kit
processes that are not cleaning up properly when the process is asked
to quit by the core.

The proximate fix is/was to hard kill the remote process =)
but - I'd love to do better if possible.


... regression?


If you see vcl's:

Dialog::Execute () ...

 // Yield util EndDialog is called or dialog gets destroyed
 // (the latter should not happen, but better safe than sorry
 while ( !xWindow->IsDisposed() && mbInExecute )
 Application::Yield();

You see one of these:

while (condition)
Application::Yield();

archetypes. Of which there a dozen+ scattered around the code eg.

sfx2/source/doc/printhelper.cxx-while( m_pPrinter->IsPrinting() 
)
sfx2/source/doc/printhelper.cxx:Application::Yield();

etc. etc.

Not least because Application:Yield becomes an instant-return when
we're trying to quit. So - we could add a flag:

while (condition && !(new Application::mbAppQuit accessor))

to all suspicious looking call-sites.

Perhaps it'd be nicer to have a:

Application::YieldWhile([]{ return m_pPrinter->IsPrinting(); });

or somesuch - so we can add that this just once (?)


There is also:

static void Quit();
static void EndYield();

so we can add

bool Application::IsQuit()
{
return ImplGetSVData()->maAppData.mbAppQuit;
}

From my POV and your example, whatever IsPrinting is testing (I assume 
some thread or OS API), should return earlier / cancel processing / 
check IsQuit / imply called EndYield. I don't think trying to "beef up" 
Application::Yield in whatever direction will help, but might introduce 
other problems, like un-joined threads, missing cleanup and whatnot.


Adding a !Application::IsQuit to a yield loop, might be the right fix in 
some cases, but not generally. Application::Quit already sets mbAppQuit 
and calls PostUserEvent to wake up yield.


JMG
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Adding Dictionary for Central Kurdish (ckb)

2021-03-12 Thread Eike Rathke
Hi Jwtiyar,

On Friday, 2021-03-12 13:09:04 +0300, Jwtiyar ali wrote:

> I have both .aff and .dic files for central kurdish which required to add
> dictionary for a specific language

Probably best to create a dictionary extension and upload to
https://extensions.libreoffice.org/

For a simple example see the Icelandic spellchecker
https://extensions.libreoffice.org/en/extensions/show/hunspell-is-the-icelandic-spelling-dictionary-project

There's also some old technical documentation at
https://wiki.openoffice.org/wiki/Extension_Dictionaries
Take it with a grain of salt but most should still be valid.

  Eike

-- 
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A


signature.asc
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2021-03-12 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/calc_tests3/tdf64001.py |   40 ---
 sc/qa/unit/ucalc.cxx |   27 +++
 sc/qa/unit/ucalc.hxx |2 +
 3 files changed, 29 insertions(+), 40 deletions(-)

New commits:
commit 3eac1691aae5d788269c538fbf609e625fac0c84
Author: Xisco Fauli 
AuthorDate: Fri Mar 12 11:33:43 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Mar 12 12:38:10 2021 +0100

tdf#64001: sc: move UItest to CppUnittest

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

diff --git a/sc/qa/uitest/calc_tests3/tdf64001.py 
b/sc/qa/uitest/calc_tests3/tdf64001.py
deleted file mode 100644
index 4c19f32c9adc..
--- a/sc/qa/uitest/calc_tests3/tdf64001.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict
-from uitest.uihelper.calc import enter_text_to_cell
-from uitest.debug import sleep
-from libreoffice.calc.document import get_cell_by_position
-from libreoffice.uno.propertyvalue import mkPropertyValues
-
-class tdf64001(UITestCase):
-
-def test_tdf64001(self):
-calc_doc = self.ui_test.create_doc_in_start_center("calc")
-xCalcDoc = self.xUITest.getTopFocusWindow()
-gridwin = xCalcDoc.getChild("grid_window")
-document = self.ui_test.get_component()
-#1) Type TRUE in cell A1
-enter_text_to_cell(gridwin, "A1", "TRUE")
-#2) Autofill/drag A1 to A10, all cells show TRUE
-gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A10"}))
-self.ui_test.execute_dialog_through_command(".uno:FillSeries")
-xDialog = self.xUITest.getTopFocusWindow()
-xautofill = xDialog.getChild("autofill")
-xautofill.executeAction("CLICK", tuple())
-xOK = xDialog.getChild("ok")
-self.ui_test.close_dialog_through_button(xOK)
-#3) Type FALSE in A11
-enter_text_to_cell(gridwin, "A11", "FALSE")
-#4) Enter in B1: =COUNTIF(A1:A11,TRUE) , hit enter
-enter_text_to_cell(gridwin, "B1", "=COUNTIF(A1:A11,TRUE)")
-#The formula changes to =COUNTIF(A1:A11,1) and displays result of 1 
not 10.
-gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "C1"}))
-self.assertEqual(get_cell_by_position(document, 0, 1, 0).getValue(), 
10)
-self.ui_test.close_doc()
-
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
\ No newline at end of file
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 04fabd9f5414..57525bea2c3a 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4804,6 +4804,33 @@ void Test::testJumpToPrecedentsDependents()
 m_pDoc->DeleteTab(0);
 }
 
+void Test::testTdf64001()
+{
+m_pDoc->InsertTab(0, "test");
+
+ScMarkData aMarkData(m_pDoc->GetSheetLimits());
+aMarkData.SelectTable(0, true);
+
+m_pDoc->SetString( 0, 0, 0, "TRUE" );
+m_pDoc->Fill( 0, 0, 0, 0, nullptr, aMarkData, 9, FILL_TO_BOTTOM, FILL_AUTO 
);
+
+for (SCCOL i = 0; i < 10; ++i)
+{
+CPPUNIT_ASSERT_EQUAL( OUString("TRUE"), m_pDoc->GetString( 0, i, 0 ) );
+}
+
+m_pDoc->SetString( 0, 10, 0, "FALSE" );
+
+m_pDoc->SetString( 1, 0, 0, "=COUNTIF(A1:A11;TRUE)" );
+
+// Without the fix in place, this test would have failed with
+// - Expected: 10
+// - Actual  : 1
+CPPUNIT_ASSERT_EQUAL( 10.0, m_pDoc->GetValue( 1, 0, 0 ) );
+
+m_pDoc->DeleteTab(0);
+}
+
 void Test::testAutoFill()
 {
 m_pDoc->InsertTab(0, "test");
diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 9c9b381315ab..5b0a1f2dff3f 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -461,6 +461,7 @@ public:
 void testSetBackgroundColor();
 void testRenameTable();
 
+void testTdf64001();
 void testAutoFill();
 void testAutoFillSimple();
 void testCopyPasteFormulas();
@@ -796,6 +797,7 @@ public:
 CPPUNIT_TEST(testJumpToPrecedentsDependents);
 CPPUNIT_TEST(testSetBackgroundColor);
 CPPUNIT_TEST(testRenameTable);
+CPPUNIT_TEST(testTdf64001);
 CPPUNIT_TEST(testAutoFill);
 CPPUNIT_TEST(testAutoFillSimple);
 CPPUNIT_TEST(testCopyPasteFormulas);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Balazs Varga (via logerrit)
 sc/qa/uitest/autofilter/autofilter.py   |   15 
 sc/qa/uitest/data/autofilter/tdf137626.xlsx |binary
 sc/source/core/data/column3.cxx |8 ++
 sc/source/filter/oox/autofilterbuffer.cxx   |   33 +---
 sc/source/ui/unoobj/datauno.cxx |5 ++--
 5 files changed, 56 insertions(+), 5 deletions(-)

New commits:
commit 26032e63abd01c3d5941a2728ef024da290d6b0a
Author: Balazs Varga 
AuthorDate: Tue Mar 2 22:46:33 2021 +0100
Commit: László Németh 
CommitDate: Fri Mar 12 12:20:48 2021 +0100

tdf#137626 XLSX import: fix missing datetime filters

by convert string representation of the datetime data
to ISO 8601 (with blank instead of T) datetime to
eliminate locale dependent behaviour when filtering
for datetimes.

Follow-up of commit 0e751d0cb816197f15a2448ec36c57df17387e40
(tdf#116818 sc,offapi,XLSX import: fix autofiltered date columns).

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

diff --git a/sc/qa/uitest/autofilter/autofilter.py 
b/sc/qa/uitest/autofilter/autofilter.py
index ca1871ee933c..2c4f36947929 100644
--- a/sc/qa/uitest/autofilter/autofilter.py
+++ b/sc/qa/uitest/autofilter/autofilter.py
@@ -308,5 +308,20 @@ class AutofilterTest(UITestCase):
 xOkBtn = xFloatWindow.getChild("cancel")
 xOkBtn.executeAction("CLICK", tuple())
 
+self.ui_test.close_doc()
+
+def test_tdf137626(self):
+doc = self.ui_test.load_file(get_url_for_data_file("tdf137626.xlsx"))
+
+xGridWin = self.xUITest.getTopFocusWindow().getChild("grid_window")
+
+xGridWin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", 
"COL": "1", "ROW": "0"}))
+xFloatWindow = self.xUITest.getFloatWindow()
+xCheckListMenu = xFloatWindow.getChild("check_list_menu")
+xTreeList = xCheckListMenu.getChild("check_list_box")
+self.assertEqual(3, len(xTreeList.getChildren()))
+xOkBtn = xFloatWindow.getChild("cancel")
+xOkBtn.executeAction("CLICK", tuple())
+
 self.ui_test.close_doc()
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/uitest/data/autofilter/tdf137626.xlsx 
b/sc/qa/uitest/data/autofilter/tdf137626.xlsx
new file mode 100644
index ..eb5ce4da7b98
Binary files /dev/null and b/sc/qa/uitest/data/autofilter/tdf137626.xlsx differ
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index edf99f02bef5..2285a859d75b 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2472,6 +2472,14 @@ class FilterEntriesHandler
 sal_uInt32 nIndex = pFormatter->GetFormatIndex( 
NF_DATE_DIN_MMDD);
 pFormatter->GetInputLineString( fVal, nIndex, aStr);
 }
+else if (nType == SvNumFormatType::DATETIME)
+{
+// special case for datetime values.
+// Convert string representation to ISO 8601 (with blank instead 
of T) datetime
+// to eliminate locale dependent behaviour later when filtering 
for datetimes.
+sal_uInt32 nIndex = 
pFormatter->GetFormatIndex(NF_DATETIME_ISO_MMDD_HHMMSS);
+pFormatter->GetInputLineString(fVal, nIndex, aStr);
+}
 // maybe extend ScTypedStrData enum is also an option here
 mrFilterEntries.push_back(ScTypedStrData(aStr, fVal, 
ScTypedStrData::Value,bDate));
 }
diff --git a/sc/source/filter/oox/autofilterbuffer.cxx 
b/sc/source/filter/oox/autofilterbuffer.cxx
index a9ec62c4e655..e09bd084e7f3 100644
--- a/sc/source/filter/oox/autofilterbuffer.cxx
+++ b/sc/source/filter/oox/autofilterbuffer.cxx
@@ -240,23 +240,50 @@ void DiscreteFilter::importAttribs( sal_Int32 nElement, 
const AttributeList& rAt
 // it is just a fallback, we do not need the XML_day as default 
value,
 // because if the dateGroupItem exists also XML_dateTimeGrouping 
exists!
 sal_uInt16 nToken = rAttribs.getToken(XML_dateTimeGrouping, 
XML_day);
-if( nToken == XML_year || nToken == XML_month || nToken == XML_day 
)
+if( nToken == XML_year || nToken == XML_month || nToken == XML_day 
||
+nToken == XML_hour || nToken == XML_min || nToken == 
XML_second )
 {
 aDateValue = rAttribs.getString(XML_year, OUString());
 
-if( nToken == XML_month || nToken == XML_day )
+if( nToken == XML_month || nToken == XML_day || nToken == 
XML_hour ||
+nToken == XML_min || nToken == XML_second )
 {
 OUString aMonthName = rAttribs.getString(XML_month, 
OUString());
 if( aMonthName.getLength() == 1 )
 aMonthName = "0" + aMonthName;
 aDateValue += "-" + aMonthName;
 
-  

breaking yield loops on forced quit.

2021-03-12 Thread Michael Meeks
Hi Noel,

We've recently had problems with dialogs running in Online Kit
processes that are not cleaning up properly when the process is asked
to quit by the core.

The proximate fix is/was to hard kill the remote process =)
but - I'd love to do better if possible.

If you see vcl's:

Dialog::Execute () ...

// Yield util EndDialog is called or dialog gets destroyed
// (the latter should not happen, but better safe than sorry
while ( !xWindow->IsDisposed() && mbInExecute )
Application::Yield();

You see one of these:

while (condition)
Application::Yield();

archetypes. Of which there a dozen+ scattered around the code eg.

sfx2/source/doc/printhelper.cxx-while( m_pPrinter->IsPrinting() 
)
sfx2/source/doc/printhelper.cxx:Application::Yield();

etc. etc.

We really want to forcibly exit these loops when we have our
VCL quit flag set cf.

vcl/headless/svpinst.cxx-// External poll.
vcl/headless/svpinst.cxx-if (pSVData->mpPollClosure != nullptr 
&&
vcl/headless/svpinst.cxx:
pSVData->mpPollCallback(pSVData->mpPollClosure, nTimeoutMicroS) < 0)
vcl/headless/svpinst.cxx-pSVData->maAppData.mbAppQuit = 
true;

Not least because Application:Yield becomes an instant-return when
we're trying to quit. So - we could add a flag:

while (condition && !(new Application::mbAppQuit accessor)) 

to all suspicious looking call-sites.

Perhaps it'd be nicer to have a:

Application::YieldWhile([]{ return m_pPrinter->IsPrinting(); });

or somesuch - so we can add that this just once (?)

Thoughts appreciated =)

Michael.

-- 
michael.me...@collabora.com <><, GM Collabora Productivity
Hangout: mejme...@gmail.com, Skype: mmeeks
(M) +44 7795 666 147 - timezone usually UK / Europe
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-03-12 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/executor.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 2225d8530b4a7fa29e551f9354d679da78be6435
Author: Szymon Kłos 
AuthorDate: Fri Mar 12 09:35:30 2021 +0100
Commit: Andras Timar 
CommitDate: Fri Mar 12 11:37:01 2021 +0100

jsdialog: unselect treeview entry by iterator

avoid crash when using relative position from
deeper levels returned by get_selected_index
to unselect entry using unselect function
on root level

Change-Id: Iaaddb131031eb5273cb06412c976f310f7323f52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112374
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index bca3d0a98ea7..aa71178a6605 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -242,7 +242,10 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 {
 OString nRowString
 = OUStringToOString(rData["data"], 
RTL_TEXTENCODING_ASCII_US);
-pTreeView->unselect(pTreeView->get_selected_index());
+
+std::unique_ptr 
itSelected(pTreeView->make_iterator());
+pTreeView->get_selected(itSelected.get());
+pTreeView->unselect(*itSelected);
 
 int nAbsPos = std::atoi(nRowString.getStr());
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/ucalc.cxx |   27 +++
 1 file changed, 27 insertions(+)

New commits:
commit 2fce798d70bb39fe1b1dc95e2661e5836026de1a
Author: Xisco Fauli 
AuthorDate: Fri Mar 12 10:53:25 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Mar 12 11:36:41 2021 +0100

tdf#37424: sc_ucalc: Add unittest

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

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index b7e89b71fb94..04fabd9f5414 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4935,6 +4935,33 @@ void Test::testAutoFill()
 CPPUNIT_ASSERT_EQUAL( OUString("2012-10-31"), m_pDoc->GetString( 0, 103, 0 
) );
 CPPUNIT_ASSERT_EQUAL( OUString("2012-10-31"), m_pDoc->GetString( 0, 104, 0 
) );
 
+// Clear column A for a new test.
+clearRange(m_pDoc, ScRange(0,0,0,0,MAXROW,0));
+m_pDoc->SetRowHidden(0, MAXROW, 0, false); // Show all rows.
+
+m_pDoc->SetString( 0, 50, 0, "1.0" );
+m_pDoc->SetString( 0, 51, 0, "1.1" );
+m_pDoc->SetString( 0, 52, 0, "1.2" );
+m_pDoc->SetString( 0, 53, 0, "1.3" );
+m_pDoc->Fill( 0, 50, 0, 53, nullptr, aMarkData, 3, FILL_TO_BOTTOM, 
FILL_AUTO );
+
+CPPUNIT_ASSERT_EQUAL( OUString("1.4"), m_pDoc->GetString( 0, 54, 0 ) );
+CPPUNIT_ASSERT_EQUAL( OUString("1.5"), m_pDoc->GetString( 0, 55, 0 ) );
+CPPUNIT_ASSERT_EQUAL( OUString("1.6"), m_pDoc->GetString( 0, 56, 0 ) );
+
+m_pDoc->SetString( 0, 60, 0, "4.0" );
+m_pDoc->SetString( 0, 61, 0, "4.1" );
+m_pDoc->SetString( 0, 62, 0, "4.2" );
+m_pDoc->SetString( 0, 63, 0, "4.3" );
+m_pDoc->Fill( 0, 60, 0, 63, nullptr, aMarkData, 3, FILL_TO_BOTTOM, 
FILL_AUTO );
+
+// tdf#37424: Without the fix in place, this test would have failed with
+// - Expected: 4.4
+// - Actual  : 5
+CPPUNIT_ASSERT_EQUAL( OUString("4.4"), m_pDoc->GetString( 0, 64, 0 ) );
+CPPUNIT_ASSERT_EQUAL( OUString("4.5"), m_pDoc->GetString( 0, 65, 0 ) );
+CPPUNIT_ASSERT_EQUAL( OUString("4.6"), m_pDoc->GetString( 0, 66, 0 ) );
+
 m_pDoc->DeleteTab(0);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Luboš Luňák (via logerrit)
 external/libpng/StaticLibrary_libpng.mk |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit c900de3b01ee0f445dd55d529f35ce25df37160a
Author: Luboš Luňák 
AuthorDate: Thu Mar 11 18:58:32 2021 +0100
Commit: Luboš Luňák 
CommitDate: Fri Mar 12 11:36:09 2021 +0100

enable libpng hardware optimizations (such as SSE)

The implementation is rather poor, but it's still something.

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

diff --git a/external/libpng/StaticLibrary_libpng.mk 
b/external/libpng/StaticLibrary_libpng.mk
index 77f1b29dc00a..bc23354fa113 100644
--- a/external/libpng/StaticLibrary_libpng.mk
+++ b/external/libpng/StaticLibrary_libpng.mk
@@ -42,6 +42,16 @@ $(eval $(call 
gb_StaticLibrary_add_generated_cobjects,libpng,\
UnpackedTarball/libpng/powerpc/powerpc_init \
UnpackedTarball/libpng/powerpc/filter_vsx_intrinsics \
) \
+   $(if $(filter INTEL X86_64,$(CPUNAME)), \
+   UnpackedTarball/libpng/intel/intel_init \
+   UnpackedTarball/libpng/intel/filter_sse2_intrinsics \
+   ) \
+))
+
+$(eval $(call gb_StaticLibrary_add_defs,libpng,\
+   $(if $(filter ARM AARCH64 ARM64,$(CPUNAME)), -DPNG_ARM_NEON) \
+   $(if $(filter POWERPC POWERPC64,$(CPUNAME)), -DPNG_POWERPC_VSX ) \
+   $(if $(filter INTEL X86_64,$(CPUNAME)), -DPNG_INTEL_SSE_OPT) \
 ))
 
 # At least on Linux, with --enable-lto, when building both this 
external/libpng and external/skia,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtk3gtkinst.cxx |8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 9aa60d592925e2e9d5219799c26639eec3fb4a53
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 13:50:09 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 11:23:58 2021 +0100

Avoid modifying then restoring this const iterator, its copy is trivial

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

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index f1e99eccca07..bdebc7985ba4 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -11902,12 +11902,8 @@ public:
 
 virtual bool iter_has_child(const weld::TreeIter& rIter) const override
 {
-weld::TreeIter& rNonConstIter = const_cast(rIter);
-GtkInstanceTreeIter& rGtkIter = 
static_cast(rNonConstIter);
-GtkTreeIter restore(rGtkIter.iter);
-bool ret = iter_children(rNonConstIter);
-rGtkIter.iter = restore;
-return ret;
+GtkInstanceTreeIter aTempCopy(static_cast(&rIter));
+return iter_children(aTempCopy);
 }
 
 virtual bool get_row_expanded(const weld::TreeIter& rIter) const override
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Eike Rathke (via logerrit)
 xmloff/source/style/xmlnumfe.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1d0b2ae1423142f3688de00d9938917329e958af
Author: Eike Rathke 
AuthorDate: Thu Mar 11 16:55:14 2021 +0100
Commit: Eike Rathke 
CommitDate: Fri Mar 12 11:16:19 2021 +0100

ODF save: write explicit "gregorian" calendar, not empty if default

Other implementations may have different opinions about default
calendars and the context here is to switch to Gregorian.

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

diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 24c0524a4239..1392c4e0f2f7 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -1651,12 +1651,12 @@ void SvXMLNumFmtExport::ExportPart_Impl( const 
SvNumberformat& rFormat, sal_uInt
 // Calendar attribute for E and EE and R is set in
 // first loop. If set and not an explicit calendar and
 // YY or  is encountered, switch temporarily to
-// Gregorian, i.e. empty calendar name.
+// Gregorian.
 bool bLong = ( nElemType == NF_KEY_ || nElemType 
== NF_KEY_EEC ||
 nElemType == NF_KEY_R );
 WriteYearElement_Impl(
 ((bImplicitOtherCalendar && !bExplicitCalendar
-  && (nElemType == NF_KEY_YY || nElemType == 
NF_KEY_)) ? OUString() : aCalendar),
+  && (nElemType == NF_KEY_YY || nElemType == 
NF_KEY_)) ? "gregorian" : aCalendar),
 (bSystemDate ? bLongSysDate : bLong));
 bAnyContent = true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Adding Dictionary for Central Kurdish (ckb)

2021-03-12 Thread Jwtiyar ali
Hey
I have both .aff and .dic files for central kurdish which required to add
dictionary for a specific language, As you may know central kurdish(ckb)
language is added to libreoffice from version 7 but there is no dictionary
for it.
Any instruction to work on?


Best Regards.

Jwtiyar Nariman
Ex-Regional Leader At Gmaps
*Physical Lab. / Internal Auditor (ISO 9001:2015)*

*Mass Iraq Co. for cement industry *
My Blog 
Why Linux Is Better 
Freedom For Abdullah Ocalan  (APO) 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2021-03-12 Thread Noel Grandin (via logerrit)
 sw/source/uibase/config/StoredChapterNumbering.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit db05fd646fce8f41a1056761ccf6bc716cda3b77
Author: Noel Grandin 
AuthorDate: Tue Mar 9 18:59:16 2021 +0200
Commit: Michael Stahl 
CommitDate: Fri Mar 12 10:48:29 2021 +0100

tdf#140590 Crash in Save-As dialog in Tools>Chapter Numbering

This would only affect assert builds. The assert condition
here did not match the condition in createFastChildContext
several lines below.

Bug since this code was introduced in
commit 1535f39388223de53e4b923c6f7bb71ee32c1858
Date:   Fri Nov 7 19:11:11 2014 +0100
sw: store Outline Numbering as ODF fragment instead of SfxPoolItems

Change-Id: I3f6a0b91e3c17f4ca358a75116481fc38c01e94e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112233
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 677a18c2e16c5c1ae6be8d30e1a967f41fbf67a0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112303
Reviewed-by: Michael Stahl 

diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx 
b/sw/source/uibase/config/StoredChapterNumbering.cxx
index eb97b1cbcee9..07e68841ed93 100644
--- a/sw/source/uibase/config/StoredChapterNumbering.cxx
+++ b/sw/source/uibase/config/StoredChapterNumbering.cxx
@@ -320,7 +320,7 @@ public:
 
 virtual void SAL_CALL endFastElement(sal_Int32 /*Element*/) override
 {
-assert(m_Contexts.size() < SwChapterNumRules::nMaxRules);
+assert(m_Contexts.size() <= SwChapterNumRules::nMaxRules);
 for (auto iter = m_Contexts.begin(); iter != m_Contexts.end(); ++iter)
 {
 uno::Reference const xRule(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Xisco Fauli (via logerrit)
 sw/source/core/doc/notxtfrm.cxx |   52 
 1 file changed, 1 insertion(+), 51 deletions(-)

New commits:
commit 2e334998f4a821ea05ce25dc6346b556bcb1347b
Author: Xisco Fauli 
AuthorDate: Thu Mar 11 12:42:47 2021 +0100
Commit: Xisco Fauli 
CommitDate: Fri Mar 12 10:41:49 2021 +0100

Revert "tdf#114076: Expand ClipRange to next PixelBound" ...

and "tdf#124272 use ClipRegion's geometry if not a rectangle"

This commit reverts c1230cede19ae3633e51c7ca780cb34d9dbaa20f
and 362c1cf2bd580f6dc8bf27bdcd79174111bc1b5c

tdf#114076, or any of its duplicates, is not reproducible in master
if c1230cede19ae3633e51c7ca780cb34d9dbaa20f
("tdf#114076: Expand ClipRange to next PixelBound") is reverted.
(Tested on Linux and Windows)
So, if we revert it, we no longer need
362c1cf2bd580f6dc8bf27bdcd79174111bc1b5c
("tdf#124272 use ClipRegion's geometry if not a rectangle"), which
was a follow-up fix for a regression introduced by the first commit.

This also fixes tdf#129085 and all the duplicates, which were
introduced by the follow-up commit.

I plan to add the unittests in a different commit

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

diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index ca834fdb7b23..dd93b15e9aaf 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -973,60 +973,10 @@ void paintGraphicUsingPrimitivesHelper(
 
 if(0 != aClip.count())
 {
-// tdf#114076: Expand ClipRange to next PixelBound
-// Do this by going to basegfx::B2DRange, adding a
-// single pixel size and using floor/ceil to go to
-// full integer (as needed for pixels). Also need
-// to go back to basegfx::B2DPolyPolygon for the
-// creation of the needed MaskPrimitive2D.
-// The general problem is that Writer is scrolling
-// using blitting the unchanged parts, this forces
-// this part of the scroll to pixel coordinate steps,
-// while the ViewTransformation for paint nowadays has
-// a sub-pixel precision. This results in an offset
-// up to one pixel in radius. To solve this for now,
-// we need to expand to the next outer pixel bound.
-// Hopefully in the future we will someday be able to
-// stay on the full available precision, but this
-// will need a change in the repaint/scroll paradigm.
-const basegfx::B2DRange aClipRange(aClip.getB2DRange());
-const basegfx::B2DVector 
aSinglePixelXY(rOutputDevice.GetInverseViewTransformation() * 
basegfx::B2DVector(1.0, 1.0));
-const basegfx::B2DRange aExpandedClipRange(
-floor(aClipRange.getMinX() - aSinglePixelXY.getX()),
-floor(aClipRange.getMinY() - aSinglePixelXY.getY()),
-ceil(aClipRange.getMaxX() + aSinglePixelXY.getX()),
-ceil(aClipRange.getMaxY() + aSinglePixelXY.getY()));
-
-// create the enclosing rectangle as polygon
-basegfx::B2DPolyPolygon 
aTarget(basegfx::utils::createPolygonFromRect(aExpandedClipRange));
-
-// tdf#124272 the fix above (tdf#114076) was too rough - the
-// clip region used may be a PolyPolygon. In that case that
-// PolyPolygon would have to be scaled to mentioned PixelBounds.
-// Since that is not really possible geometrically (would need
-// more some 'grow in outside direction' but with unequal grow
-// values in all directions - just maaany problems
-// involved), use a graphical trick: The topology of the
-// PolyPolygon uses the standard FillRule, so adding the now
-// guaranteed to be bigger or equal bounding (enclosing)
-// rectangle twice as polygon will expand the BoundRange, but
-// not change the geometry visualization at all
-if(!rOutputDevice.GetClipRegion().IsRectangle())
-{
-// double the outer rectangle range polygon to have it
-// included twice
-aTarget.append(aTarget.getB2DPolygon(0));
-
-// add the original clip 'inside' (due to being smaller
-// or equal). That PolyPolygon may have an unknown number
-// of polygons (>=1)
-aTarget.append(aClip);
-}
-
 rContent.resize(1);
 rContent[0] =
 new drawinglayer::primitive2d::MaskPrimitive2D(
-aTarget,
+aClip,
 rContent);
 }
 }
___
Libreof

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

2021-03-12 Thread Caolán McNamara (via logerrit)
 xmlsecurity/qa/unit/signing/signing.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 1aaa14a63a2678397a2b34abdf0d9c896fd5c760
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 19:50:57 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 10:25:05 2021 +0100

explicitly assert that xSignatureInfo shouldn't be empty

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

diff --git a/xmlsecurity/qa/unit/signing/signing.cxx 
b/xmlsecurity/qa/unit/signing/signing.cxx
index 5908f9059ffc..d9661d348138 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -918,6 +918,8 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testSignatureLineOOXML)
 = xSignatures->verifyScriptingContentSignatures(xStorage,
 
uno::Reference());
 
+CPPUNIT_ASSERT(xSignatureInfo.getLength());
+
 // The signature should have a valid signature, and signature line with 
two valid images
 CPPUNIT_ASSERT(xSignatureInfo[0].SignatureIsValid);
 CPPUNIT_ASSERT_EQUAL(OUString("{DEE0514B-13E8-4674-A831-46E3CDB18BB4}"),
@@ -937,6 +939,8 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testSignatureLineODF)
 uno::Sequence xSignatureInfo
 = pObjectShell->GetDocumentSignatureInformation(false);
 
+CPPUNIT_ASSERT(xSignatureInfo.getLength());
+
 CPPUNIT_ASSERT(xSignatureInfo[0].SignatureIsValid);
 CPPUNIT_ASSERT_EQUAL(OUString("{41CF56EE-331B-4125-97D8-2F5669DD3AAC}"),
  xSignatureInfo[0].SignatureLineId);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Attila Szűcs (via logerrit)
 include/vcl/toolkit/treelistbox.hxx |1 
 vcl/source/treelist/treelistbox.cxx |   41 +++-
 2 files changed, 41 insertions(+), 1 deletion(-)

New commits:
commit 216f32464ccb0f096e5fdf77f82baf30ae7bab5f
Author: Attila Szűcs 
AuthorDate: Fri Feb 26 21:09:10 2021 +0100
Commit: László Németh 
CommitDate: Fri Mar 12 10:22:48 2021 +0100

tdf#140136 sc: fix tree list expansion in AutoFilter

Now clicking on +/- buttons (i.e. before the checkbox)
only expands/collapses the tree without toggling the
associated checkboxes, using the new GetItemPos() to get
the position (and width) of the checkbox in the actual
list item.

Regression from commit 2471d6f44c7e8ecbe86a90eeb593b899a08a7408
"tdf#116675 vcl tree list: toggle by label click (e.g. in AutoFilter)".

Note: Use generic VCL plugin to test it on Linux:

SAL_USE_VCLPLUGIN=gen instdir/program/soffice

Co-authored-by: Tibor Nagy (NISZ)

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

diff --git a/include/vcl/toolkit/treelistbox.hxx 
b/include/vcl/toolkit/treelistbox.hxx
index d11a006d4c1a..bc7fcd81ccc3 100644
--- a/include/vcl/toolkit/treelistbox.hxx
+++ b/include/vcl/toolkit/treelistbox.hxx
@@ -637,6 +637,7 @@ public:
 voidInvalidateEntry( SvTreeListEntry* );
 SvLBoxItem* GetItem( SvTreeListEntry*, tools::Long nX, SvLBoxTab** 
ppTab);
 SvLBoxItem* GetItem( SvTreeListEntry*, tools::Long nX );
+std::pair GetItemPos(SvTreeListEntry* pEntry, 
sal_uInt16 nTabIdx);
 
 voidSetDragDropMode( DragDropMode );
 voidSetSelectionMode( SelectionMode );
diff --git a/vcl/source/treelist/treelistbox.cxx 
b/vcl/source/treelist/treelistbox.cxx
index 4cc062295d1c..9af367f2f460 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -2304,7 +2304,7 @@ void SvTreeListBox::MouseButtonUp( const MouseEvent& 
rMEvt )
 {
 SvLBoxButton* pItemCheckBox
 = 
static_cast(pEntry->GetFirstItem(SvLBoxItemType::Button));
-if (pItemCheckBox)
+if (pItemCheckBox && GetItemPos(pEntry, 0).first < aPnt.X() - 
GetMapMode().GetOrigin().X())
 {
 pItemCheckBox->ClickHdl(pEntry);
 InvalidateEntry(pEntry);
@@ -3035,6 +3035,45 @@ SvLBoxItem* SvTreeListBox::GetItem_Impl( 
SvTreeListEntry* pEntry, tools::Long nX
 return pItemClicked;
 }
 
+std::pair SvTreeListBox::GetItemPos(SvTreeListEntry* 
pEntry, sal_uInt16 nTabIdx)
+{
+sal_uInt16 nTabCount = aTabs.size();
+sal_uInt16 nItemCount = pEntry->ItemCount();
+if (nTabIdx >= nItemCount || nTabIdx >= nTabCount)
+return std::make_pair(-1, -1);
+
+SvLBoxTab* pTab = aTabs.front().get();
+SvLBoxItem* pItem = &pEntry->GetItem(nTabIdx);
+sal_uInt16 nNextItem = nTabIdx + 1;
+
+tools::Long nRealWidth = pImpl->GetOutputSize().Width();
+nRealWidth -= GetMapMode().GetOrigin().X();
+
+SvLBoxTab* pNextTab = nNextItem < nTabCount ? aTabs[nNextItem].get() : 
nullptr;
+tools::Long nStart = GetTabPos(pEntry, pTab);
+
+tools::Long nNextTabPos;
+if (pNextTab)
+nNextTabPos = GetTabPos(pEntry, pNextTab);
+else
+{
+nNextTabPos = nRealWidth;
+if (nStart > nRealWidth)
+nNextTabPos += 50;
+}
+
+auto nItemWidth(pItem->GetWidth(this, pEntry));
+nStart += pTab->CalcOffset(nItemWidth, nNextTabPos - nStart);
+auto nLen = nItemWidth;
+if (pNextTab)
+{
+tools::Long nTabWidth = GetTabPos(pEntry, pNextTab) - nStart;
+if (nTabWidth < nLen)
+nLen = nTabWidth;
+}
+return std::make_pair(nStart, nLen);
+}
+
 tools::Long SvTreeListBox::getPreferredDimensions(std::vector 
&rWidths) const
 {
 tools::Long nHeight = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Caolán McNamara (via logerrit)
 sfx2/source/doc/objserv.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 6ca61953caa030574ea15a607ec1ed8c12920acd
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 19:56:49 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 10:09:53 2021 +0100

log if there was an exception in GetDocumentSignatureInformation

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

diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index f9c1605c25a1..f5d5cd441831 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1733,6 +1733,7 @@ uno::Sequence< security::DocumentSignatureInformation > 
SfxObjectShell::GetDocum
 }
 catch( css::uno::Exception& )
 {
+TOOLS_WARN_EXCEPTION("sfx.doc", "Failed to get document signature 
information");
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Caolán McNamara (via logerrit)
 xmlsecurity/source/helper/xmlsignaturehelper.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit b344ecfa6d9b9296b1f765490d4ad3e487c33cd4
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 20:22:25 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 10:09:21 2021 +0100

do same logging as ReadAndVerifySignature does

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

diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx 
b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index 94a128b05d75..d91a02ad8124 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -270,13 +270,14 @@ bool XMLSignatureHelper::ReadAndVerifySignature( const 
css::uno::Reference< css:
 // Parser -> SignatureReader
 xParser->setDocumentHandler( xHandler );
 
-// parser the stream
+// Parse the stream.
 try
 {
 xParser->parseStream( aParserInput );
 }
 catch( uno::Exception& )
 {
+DBG_UNHANDLED_EXCEPTION("xmlsecurity.helper");
 mbError = true;
 }
 
@@ -407,6 +408,7 @@ bool 
XMLSignatureHelper::ReadAndVerifySignatureStorageStream(const css::uno::Ref
 DBG_UNHANDLED_EXCEPTION("xmlsecurity.helper");
 }
 
+// release the signature reader
 mpXSecController->releaseSignatureReader();
 
 return !mbError;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Caolán McNamara (via logerrit)
 winaccessibility/source/service/AccEventListener.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit e70b5fc8fa325d56d3da4edba11dc1aed6280e2f
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 15:14:07 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 10:08:44 2021 +0100

drop unneeded include

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

diff --git a/winaccessibility/source/service/AccEventListener.cxx 
b/winaccessibility/source/service/AccEventListener.cxx
index d7bf74390765..3168476c5935 100644
--- a/winaccessibility/source/service/AccEventListener.cxx
+++ b/winaccessibility/source/service/AccEventListener.cxx
@@ -23,8 +23,6 @@
 
 #include 
 
-#include 
-
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Caolán McNamara (via logerrit)
 canvas/source/directx/dx_devicehelper.cxx |1 -
 canvas/source/directx/dx_spritecanvas.cxx |1 -
 2 files changed, 2 deletions(-)

New commits:
commit 1aa2b3241c1389b9a7f67d3380cc58250cbab7a3
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 20:39:08 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 10:08:20 2021 +0100

drop unneeded include

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

diff --git a/canvas/source/directx/dx_devicehelper.cxx 
b/canvas/source/directx/dx_devicehelper.cxx
index 1c724bca5513..a1b116f99a4b 100644
--- a/canvas/source/directx/dx_devicehelper.cxx
+++ b/canvas/source/directx/dx_devicehelper.cxx
@@ -27,7 +27,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 
diff --git a/canvas/source/directx/dx_spritecanvas.cxx 
b/canvas/source/directx/dx_spritecanvas.cxx
index 24e8ffa1b545..0a16f2ae9562 100644
--- a/canvas/source/directx/dx_spritecanvas.cxx
+++ b/canvas/source/directx/dx_spritecanvas.cxx
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Caolán McNamara (via logerrit)
 sw/source/filter/inc/fltshell.hxx |8 
 sw/source/filter/ww8/ww8par.cxx   |   15 +++
 sw/source/filter/ww8/ww8par.hxx   |   20 +++-
 sw/source/filter/ww8/ww8par5.cxx  |   10 ++
 4 files changed, 40 insertions(+), 13 deletions(-)

New commits:
commit ef6caa5de612c3c3f0a4fd9b7a30dfcb618cab29
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 17:03:17 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 10:07:36 2021 +0100

Revert "merge sw::hack::Position and SwFltPosition"

This reverts commit 4f35958c64d5e63c30e67434936c3a0352f57698.
(which was an attempt at groundwork at fixing ofz#31538)

because ooo46246-1.doc fails to load in crashtesting

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

diff --git a/sw/source/filter/inc/fltshell.hxx 
b/sw/source/filter/inc/fltshell.hxx
index 4019c2c0ff9c..4fb13a48e06c 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -74,14 +74,6 @@ public:
 m_nNode = rPos.nNode.GetIndex()-1;
 m_nContent = rPos.nContent.GetIndex();
 }
-
-SwPosition ToSwPosition() const
-{
-SwNodeIndex m_nCorrectNode(m_nNode, +1);
-SwPosition aRet(m_nCorrectNode);
-aRet.nContent.Assign(m_nCorrectNode.GetNode().GetContentNode(), 
m_nContent);
-return aRet;
-}
 };
 
 // Stack entry for the attributes. It is always pointers to new attributes 
that are passed.
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index b95e5e2795af..66203d696493 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -6651,6 +6651,21 @@ bool SwWW8ImplReader::InEqualApo(int nLvl) const
 return m_aApos[nLvl];
 }
 
+namespace sw::hack
+{
+Position::Position(const SwPosition &rPos)
+: maPtNode(rPos.nNode), mnPtContent(rPos.nContent.GetIndex())
+{
+}
+
+Position::operator SwPosition() const
+{
+SwPosition aRet(maPtNode);
+aRet.nContent.Assign(maPtNode.GetNode().GetContentNode(), 
mnPtContent);
+return aRet;
+}
+}
+
 SwMacroInfo::SwMacroInfo()
 : SdrObjUserData( SdrInventor::ScOrSwDraw, SW_UD_IMAPDATA )
 , mnShapeId(-1)
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index bb05228159fd..fcfac3503ad1 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -543,6 +543,21 @@ struct HyperLinksTable
 
 namespace sw
 {
+namespace hack
+{
+class Position
+{
+private:
+SwNodeIndex maPtNode;
+sal_Int32 mnPtContent;
+public:
+explicit Position(const SwPosition &rPos);
+operator SwPosition() const;
+const SwNodeIndex& GetPtNode() const { return maPtNode; };
+sal_Int32 GetPtContent() const { return mnPtContent; };
+};
+}
+
 auto FilterControlChars(OUString const& rString) -> OUString;
 }
 
@@ -555,7 +570,7 @@ class WW8FieldEntry
 ::sw::mark::IFieldmark::parameter_map_t maParams;
 
 public:
-SwFltPosition maStartPos;
+sw::hack::Position maStartPos;
 sal_uInt16 mnFieldId;
 sal_uLong mnObjLocFc;
 WW8FieldEntry(SwPosition const &rPos, sal_uInt16 nFieldId) throw();
@@ -563,6 +578,9 @@ class WW8FieldEntry
 WW8FieldEntry &operator=(const WW8FieldEntry &rOther) throw();
 void Swap(WW8FieldEntry &rOther) throw();
 
+SwNodeIndex GetPtNode() const { return maStartPos.GetPtNode(); };
+sal_Int32 GetPtContent() const { return maStartPos.GetPtContent(); };
+
 const OUString& GetBookmarkName() const { return msBookmarkName;}
 const OUString& GetBookmarkCode() const { return msMarkCode;}
 void SetBookmarkName(const OUString& bookmarkName);
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 202f9a2d629f..88b952099e6a 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -220,7 +220,7 @@ tools::Long SwWW8ImplReader::Read_Book(WW8PLCFManResult*)
 if (!m_aFieldStack.empty())
 {
 const WW8FieldEntry &rTest = m_aFieldStack.back();
-aStart = rTest.maStartPos.ToSwPosition();
+aStart = rTest.maStartPos;
 }
 
 const OUString sOrigName = BookmarkToWriter(*pName);
@@ -522,7 +522,7 @@ sal_uInt16 SwWW8ImplReader::End_Field()
 case ww::eFORMTEXT:
 if (bUseEnhFields && m_pPaM!=nullptr && m_pPaM->GetPoint()!=nullptr) {
 SwPosition aEndPos = *m_pPaM->GetPoint();
-SwPaM aFieldPam(m_aFieldStack.back().maStartPos.ToSwPosition(), 
aEndPos);
+SwPaM aFieldPam( m_aFieldStack.back().GetPtNode(), 
m_aFieldStack.back().GetPtContent(), aEndPos.nNode, 
aEndPos.n

[Libreoffice-commits] core.git: solenv/bin solenv/clang-format svtools/Library_svt.mk svtools/source svtools/util toolkit/Library_tk.mk toolkit/source toolkit/util

2021-03-12 Thread Caolán McNamara (via logerrit)
 solenv/bin/native-code.py |3 +--
 solenv/clang-format/excludelist   |   12 ++--
 svtools/Library_svt.mk|4 
 svtools/util/svt.component|5 -
 toolkit/Library_tk.mk |4 
 toolkit/source/hatchwindow/hatchwindow.cxx|2 +-
 toolkit/source/hatchwindow/hatchwindowfactory.cxx |2 +-
 toolkit/source/hatchwindow/ipwin.cxx  |2 +-
 toolkit/util/tk.component |5 +
 9 files changed, 19 insertions(+), 20 deletions(-)

New commits:
commit 837f6e6f341758bacc70f40c0f7deecca5de0087
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 14:22:27 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 10:06:56 2021 +0100

move hatchwindow to toolkit

because it wants to use toolkit headers

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

diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 2cfccbfa705b..9832da71bd0a 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -334,8 +334,6 @@ core_constructor_list = [
 "com_sun_star_comp_Math_MathTypeFilter_get_implementation",
 # svl/source/fsstor/fsstorage.component
 "svl_FSStorageFactory_get_implementation",
-# svtools/util/svt.component
-"com_sun_star_comp_embed_HatchWindowFactory_get_implementation",
 # vcl/vcl.android.component
 "com_sun_star_graphic_GraphicObject_get_implementation",
 "com_sun_star_comp_graphic_GraphicMapper_get_implementation",
@@ -361,6 +359,7 @@ core_constructor_list = [
 "com_sun_star_comp_svx_StyleToolBoxControl_get_implementation",
 "com_sun_star_comp_svx_StylesPreviewToolBoxControl_get_implementation",
 # toolkit/util/tk.component
+"com_sun_star_comp_embed_HatchWindowFactory_get_implementation",
 "stardiv_Toolkit_StdTabController_get_implementation",
 "stardiv_Toolkit_UnoButtonControl_get_implementation",
 "stardiv_Toolkit_UnoCheckBoxControl_get_implementation",
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 6ef8f3ad2039..bd07aeebc58f 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -11323,12 +11323,6 @@ svtools/source/filter/SvFilterOptionsDialog.cxx
 svtools/source/filter/exportdialog.cxx
 svtools/source/filter/exportdialog.hxx
 svtools/source/graphic/renderer.cxx
-svtools/source/hatchwindow/documentcloser.cxx
-svtools/source/hatchwindow/hatchwindow.cxx
-svtools/source/hatchwindow/hatchwindowfactory.cxx
-svtools/source/hatchwindow/ipwin.cxx
-svtools/source/hatchwindow/ipwin.hxx
-svtools/source/inc/hatchwindow.hxx
 svtools/source/java/javacontext.cxx
 svtools/source/java/javainteractionhandler.cxx
 svtools/source/misc/acceleratorexecute.cxx
@@ -13776,6 +13770,12 @@ toolkit/source/controls/unocontrolcontainer.cxx
 toolkit/source/controls/unocontrolcontainermodel.cxx
 toolkit/source/controls/unocontrolmodel.cxx
 toolkit/source/controls/unocontrols.cxx
+toolkit/source/hatchwindow/documentcloser.cxx
+toolkit/source/hatchwindow/hatchwindow.cxx
+toolkit/source/hatchwindow/hatchwindow.hxx
+toolkit/source/hatchwindow/hatchwindowfactory.cxx
+toolkit/source/hatchwindow/ipwin.cxx
+toolkit/source/hatchwindow/ipwin.hxx
 toolkit/source/helper/accessibilityclient.cxx
 toolkit/source/helper/btndlg.cxx
 toolkit/source/helper/formpdfexport.cxx
diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk
index adaa6b1bc99d..ee4361331125 100644
--- a/svtools/Library_svt.mk
+++ b/svtools/Library_svt.mk
@@ -113,10 +113,6 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
 svtools/source/filter/DocumentToGraphicRenderer \
 svtools/source/filter/exportdialog \
 svtools/source/graphic/renderer \
-svtools/source/hatchwindow/documentcloser \
-svtools/source/hatchwindow/hatchwindow \
-svtools/source/hatchwindow/hatchwindowfactory \
-svtools/source/hatchwindow/ipwin \
 $(if $(ENABLE_JAVA), \
 svtools/source/java/javacontext \
 svtools/source/java/javainteractionhandler) \
diff --git a/svtools/util/svt.component b/svtools/util/svt.component
index f840548d9d3e..fabe9e6c7c87 100644
--- a/svtools/util/svt.component
+++ b/svtools/util/svt.component
@@ -45,9 +45,4 @@
   constructor="com_sun_star_comp_embed_DocumentCloser_get_implementation">
 
   
-  
-
-
-  
 
diff --git a/toolkit/Library_tk.mk b/toolkit/Library_tk.mk
index 88013385ccbe..b6186e66c962 100644
--- a/toolkit/Library_tk.mk
+++ b/toolkit/Library_tk.mk
@@ -112,6 +112,10 @@ $(eval $(call gb_Library_add_exception_objects,tk,\
 toolkit/source/controls/unocontrolcontainermodel \
 toolkit/source/controls/unocontrolmodel \
 toolkit/source/controls/unocontrols \
+toolkit/source/hatchwindow/documentcloser \
+toolkit/source/hatchwi

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

2021-03-12 Thread Caolán McNamara (via logerrit)
 include/svx/contdlg.hxx |1 -
 include/svx/svdpntv.hxx |9 +
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 3a3ad2b03dd24c49b6cf778fa63c0b4a5e39f7d5
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 14:23:16 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 10:06:33 2021 +0100

use some forward declares to avoid including vcl/window.hxx

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

diff --git a/include/svx/contdlg.hxx b/include/svx/contdlg.hxx
index 4ad26c70816d..cb3034fd6636 100644
--- a/include/svx/contdlg.hxx
+++ b/include/svx/contdlg.hxx
@@ -26,7 +26,6 @@
 #include 
 #include 
 #include 
-#include 
 
 class SfxBindings;
 class SfxModule;
diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx
index ad68da20dec2..7fe2bcc9a23d 100644
--- a/include/svx/svdpntv.hxx
+++ b/include/svx/svdpntv.hxx
@@ -25,14 +25,14 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 
 
@@ -57,7 +57,6 @@ namespace sdr::contact {
 class ViewObjectContactRedirector;
 }
 
-
 // Defines for AnimationMode
 enum class SdrAnimationMode
 {
@@ -65,10 +64,12 @@ enum class SdrAnimationMode
 Disable
 };
 
-
 class SdrPaintView;
 namespace sdr::contact { class ViewObjectContactRedirector; }
 
+namespace vcl {
+class Window;
+}
 
 
 class SvxViewChangedHint final : public SfxHint
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/source framework/source include/sfx2 include/vcl sfx2/source vcl/source

2021-03-12 Thread Caolán McNamara (via logerrit)
 desktop/source/app/app.cxx  |4 ++--
 framework/source/jobs/helponstartup.cxx |2 +-
 include/sfx2/sfxhelp.hxx|7 ---
 include/vcl/help.hxx|7 ---
 sfx2/source/appl/sfxhelp.cxx|2 +-
 vcl/source/window/menuwindow.cxx|4 ++--
 6 files changed, 14 insertions(+), 12 deletions(-)

New commits:
commit ce83d1f448ae28f30c98a607a83ff3e012538d36
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 12:54:33 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 10:06:05 2021 +0100

use preferred variant when window arg is null

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

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index b6bc634757e9..90a98d0506b0 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1936,7 +1936,7 @@ void Desktop::OpenClients()
 #elif defined _WIN32
 aHelpURL += "&System=WIN";
 #endif
-Application::GetHelp()->Start(aHelpURL, static_cast(nullptr));
+Application::GetHelp()->Start(aHelpURL);
 return;
 }
 }
@@ -2292,7 +2292,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& 
rAppEvent )
 break;
 case ApplicationEvent::Type::OpenHelpUrl:
 // start help for a specific URL
-Application::GetHelp()->Start(rAppEvent.GetStringData(), 
static_cast(nullptr));
+Application::GetHelp()->Start(rAppEvent.GetStringData());
 break;
 case ApplicationEvent::Type::Print:
 {
diff --git a/framework/source/jobs/helponstartup.cxx 
b/framework/source/jobs/helponstartup.cxx
index f022cbb73e05..41c6c3dc3e1e 100644
--- a/framework/source/jobs/helponstartup.cxx
+++ b/framework/source/jobs/helponstartup.cxx
@@ -124,7 +124,7 @@ css::uno::Any SAL_CALL HelpOnStartup::execute(const 
css::uno::Sequence< css::bea
 // Note: The help window brings itself to front ...
 Help* pHelp = Application::GetHelp();
 if (pHelp)
-pHelp->Start(sModuleDependentHelpURL, 
static_cast(nullptr));
+pHelp->Start(sModuleDependentHelpURL);
 }
 }
 
diff --git a/include/sfx2/sfxhelp.hxx b/include/sfx2/sfxhelp.hxx
index 7f4d687b102d..f07c2017287f 100644
--- a/include/sfx2/sfxhelp.hxx
+++ b/include/sfx2/sfxhelp.hxx
@@ -30,14 +30,15 @@ class SFX2_DLLPUBLIC SfxHelp final : public Help
 boolbIsDebug;
 
 private:
-SAL_DLLPRIVATE static bool Start_Impl( const OUString& rURL, const 
vcl::Window* pWindow, const OUString& rKeyword );
 SAL_DLLPRIVATE static bool Start_Impl(const OUString& rURL, weld::Widget* 
pWidget, const OUString& rKeyword);
 SAL_DLLPRIVATE virtual void SearchKeyword( const OUString& rKeyWord ) 
override;
-SAL_DLLPRIVATE virtual bool Start( const OUString& rURL, const 
vcl::Window* pWindow ) override;
-SAL_DLLPRIVATE virtual bool Start(const OUString& rURL, weld::Widget* 
pWidget) override;
+SAL_DLLPRIVATE virtual bool Start(const OUString& rURL, weld::Widget* 
pWidget = nullptr) override;
 SAL_DLLPRIVATE static OUString GetHelpModuleName_Impl(const OUString 
&rHelpId);
 SAL_DLLPRIVATE static OUString CreateHelpURL_Impl( const OUString& 
aCommandURL, const OUString& rModuleName );
 
+SAL_DLLPRIVATE static bool Start_Impl( const OUString& rURL, const 
vcl::Window* pWindow, const OUString& rKeyword );
+SAL_DLLPRIVATE virtual bool Start( const OUString& rURL, const 
vcl::Window* pWindow ) override;
+
 public:
 SfxHelp();
 virtual ~SfxHelp() override;
diff --git a/include/vcl/help.hxx b/include/vcl/help.hxx
index 83b2bdbe569f..7dc848a42e0c 100644
--- a/include/vcl/help.hxx
+++ b/include/vcl/help.hxx
@@ -63,12 +63,13 @@ public:
 Help();
 virtual ~Help();
 
-virtual boolStart(const OUString& rHelpId, const vcl::Window* 
pWindow);
-virtual boolStart(const OUString& rHelpId, weld::Widget* pWidget);
+virtual boolStart(const OUString& rHelpId, weld::Widget* pWidget = 
nullptr);
 virtual voidSearchKeyword( const OUString& rKeyWord );
-virtual OUStringGetHelpText(const OUString& aHelpURL, const 
vcl::Window* pWindow);
 virtual OUStringGetHelpText(const OUString& aHelpURL, const 
weld::Widget* pWidget);
 
+virtual boolStart(const OUString& rHelpId, const vcl::Window* 
pWindow);
+virtual OUStringGetHelpText(const OUString& aHelpURL, const 
vcl::Window* pWindow);
+
 static void EnableContextHelp();
 static void DisableContextHelp();
 static bool IsContextHelpEnabled();
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 2e3e80680feb..6732fb5b0e63 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -686,7 +68

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

2021-03-12 Thread Caolán McNamara (via logerrit)
 sc/source/ui/docshell/arealink.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 14d1f276b488b0a7cad107e3fb9612d96d4e764d
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 11:56:54 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 10:05:37 2021 +0100

use the DocShell GetDialogParent as explicit dialog parent

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

diff --git a/sc/source/ui/docshell/arealink.cxx 
b/sc/source/ui/docshell/arealink.cxx
index 791c2a3b4085..9acacb21a810 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -463,8 +463,8 @@ bool ScAreaLink::Refresh( const OUString& rNewFile, const 
OUString& rNewFilter,
 
 //! Link dialog must set default parent
 //  "cannot insert rows"
-vcl::Window* pWin = Application::GetDefDialogParent();
-std::unique_ptr 
xInfoBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
+weld::Window* pWin = 
Application::GetFrameWeld(m_pDocSh->GetDialogParent());
+std::unique_ptr 
xInfoBox(Application::CreateMessageDialog(pWin,
   VclMessageType::Info, 
VclButtonsType::Ok,
   
ScResId(STR_MSSG_DOSUBTOTALS_2)));
 xInfoBox->run();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Caolán McNamara (via logerrit)
 sfx2/source/appl/appserv.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit f31f0038f5fd9254584a06665066faf9715d1cd8
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 11:49:53 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 10:05:13 2021 +0100

use the parent available from the SfxRequest

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

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 43f36d187bfd..74c3767c405e 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -52,7 +52,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -572,7 +571,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
 Help* pHelp = Application::GetHelp();
 if ( pHelp )
 {
-pHelp->Start(".uno:HelpIndex", 
Application::GetDefDialogParent()); // show start page
+pHelp->Start(".uno:HelpIndex", rReq.GetFrameWeld()); // show 
start page
 bDone = true;
 }
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Caolán McNamara (via logerrit)
 include/svx/fmtools.hxx|   10 +-
 svx/source/fmcomp/gridcell.cxx |2 +-
 svx/source/form/filtnav.cxx|5 +++--
 svx/source/form/fmtools.cxx|   25 -
 svx/source/form/fmvwimp.cxx|2 +-
 svx/source/form/formcontroller.cxx |   19 +--
 svx/source/inc/formcontroller.hxx  |3 ++-
 7 files changed, 29 insertions(+), 37 deletions(-)

New commits:
commit 4d807017749855281f1268ac477b780befbcad9e
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 11:34:03 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 10:04:52 2021 +0100

transport error dialog parent as awt::XWindow earlier

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

diff --git a/include/svx/fmtools.hxx b/include/svx/fmtools.hxx
index 97d6fcff0d05..5ed09267aac7 100644
--- a/include/svx/fmtools.hxx
+++ b/include/svx/fmtools.hxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 
+namespace com::sun::star::awt { class XWindow; }
 namespace com::sun::star::beans { class XPropertySet; }
 namespace com::sun::star::container { class XIndexAccess; }
 namespace com::sun::star::container { class XNameAccess; }
@@ -42,17 +43,16 @@ namespace com::sun::star::sdbc { class SQLException; }
 namespace com::sun::star::sdbc { class XRowSet; }
 namespace com::sun::star::sdb { class SQLContext; }
 namespace com::sun::star::sdb { struct SQLErrorEvent; }
-namespace vcl { class Window; }
 
 
 // common types
 
 // displaying a database exception for the user
 // display info about a simple css::sdbc::SQLException
-void displayException(const css::sdbc::SQLException&, vcl::Window* _pParent);
-SVXCORE_DLLPUBLIC void displayException(const css::sdb::SQLContext&, 
vcl::Window* _pParent);
-void displayException(const css::sdb::SQLErrorEvent&, vcl::Window* _pParent);
-void displayException(const css::uno::Any&, vcl::Window* _pParent);
+void displayException(const css::sdbc::SQLException&, const 
css::uno::Reference& rParent);
+SVXCORE_DLLPUBLIC void displayException(const css::sdb::SQLContext&, const 
css::uno::Reference& rParent);
+void displayException(const css::sdb::SQLErrorEvent&, const 
css::uno::Reference& rParent);
+void displayException(const css::uno::Any&, const 
css::uno::Reference& rParent);
 
 sal_Int32 getElementPos(const css::uno::Reference< 
css::container::XIndexAccess>& xCont, const css::uno::Reference< 
css::uno::XInterface>& xElement);
 
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index ccb3b4469b3c..bf29a63a6670 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -2872,7 +2872,7 @@ bool DbFilterField::commitControl()
 
 SQLException aError;
 aError.Message = aErrorMsg;
-displayException(aError, m_pWindow->GetParent());
+displayException(aError, 
VCLUnoHelper::GetInterface(m_pWindow->GetParent()));
 // TODO: transport the title
 
 return false;
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 2e5ba4b0db38..98f829767261 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -43,10 +43,11 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -1154,7 +1155,7 @@ IMPL_LINK(FmFilterNavigator, EditedEntryHdl, const 
IterString&, rIterString, boo
 SQLContext aError;
 aError.Message = SvxResId(RID_STR_SYNTAXERROR);
 aError.Details = aErrorMsg;
-displayException(aError, m_xTopLevel);
+displayException(aError, VCLUnoHelper::GetInterface(m_xTopLevel));
 
 return false;
 }
diff --git a/svx/source/form/fmtools.cxx b/svx/source/form/fmtools.cxx
index 99e82fca3a33..e9f641309d0b 100644
--- a/svx/source/form/fmtools.cxx
+++ b/svx/source/form/fmtools.cxx
@@ -83,8 +83,7 @@ namespace
 }
 }
 
-
-void displayException(const Any& _rExcept, vcl::Window* _pParent)
+void displayException(const Any& _rExcept, const 
css::uno::Reference& rParent)
 {
 // check whether we need to display it
 if ( !lcl_shouldDisplayError( _rExcept ) )
@@ -92,11 +91,7 @@ void displayException(const Any& _rExcept, vcl::Window* 
_pParent)
 
 try
 {
-// the parent window
-vcl::Window* pParentWindow = _pParent ? _pParent : 
Application::GetDefDialogParent();
-Reference< XWindow > xParentWindow = 
VCLUnoHelper::GetInterface(pParentWindow);
-
-Reference< XExecutableDialog > xErrorDialog = 
ErrorMessageDialog::create(::comphelper::getProcessComponentContext(), "", 
xParentWindow, _rExcept);
+Reference< XExecutableDialog > xErrorDialog = 
ErrorMessageDialog::create(::comphelper::getProcessComponentContext(), "", 
rParent, _rExcept);
 xErrorDialog->execute

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

2021-03-12 Thread Caolán McNamara (via logerrit)
 extensions/source/propctrlr/propcontroller.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 32b7c32aa84dc51d3acd75bde5db7655868e5ad9
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 15:48:09 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 10:04:11 2021 +0100

use VCLUnoHelper::GetWindow

instead of directly using VCLXWindow

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

diff --git a/extensions/source/propctrlr/propcontroller.cxx 
b/extensions/source/propctrlr/propcontroller.cxx
index 1835501e5525..d9166b64dff6 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -38,7 +38,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -344,8 +344,7 @@ namespace pcr
 }
 else
 {
-VCLXWindow* pContainerWindow = 
comphelper::getUnoTunnelImplementation(xContainerWindow);
-VclPtr pParentWin = pContainerWindow ? 
pContainerWindow->GetWindow() : nullptr;
+VclPtr pParentWin = 
VCLUnoHelper::GetWindow(xContainerWindow);
 if (!pParentWin)
 throw RuntimeException("The frame is invalid. Unable to 
extract the container window.",*this);
 xBuilder.reset(Application::CreateInterimBuilder(pParentWin, 
sUIFile, true));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Caolán McNamara (via logerrit)
 extensions/source/bibliography/bibload.cxx |9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 07d278c911d738f06c3bbb6354336ac03c8146e1
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 15:39:43 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 10:03:32 2021 +0100

awt::XWindow has setVisible so don't need to fetch VCLXWindow to do that

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

diff --git a/extensions/source/bibliography/bibload.cxx 
b/extensions/source/bibliography/bibload.cxx
index 2bacc3c31477..cb1edd54fef4 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -38,7 +38,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -211,9 +210,7 @@ void BibliographyLoader::loadView(const Reference< XFrame > 
& rFrame,
 
 m_xDatMan->createDatabaseForm( aBibDesc );
 
-Reference< awt::XWindow >  aWindow = rFrame->getContainerWindow();
-VCLXWindow* pParentComponent = 
comphelper::getUnoTunnelImplementation(aWindow);
-assert(pParentComponent);
+Reference aWindow = rFrame->getContainerWindow();
 
 VclPtr pParent = VCLUnoHelper::GetWindow( aWindow );
 
@@ -238,10 +235,10 @@ void BibliographyLoader::loadView(const Reference< XFrame 
> & rFrame,
 rFrame->setComponent( xWin, xCtrRef);
 pBeamer->SetXController(xCtrRef);
 
-if (pParentComponent)
+if (aWindow)
 {
 // not earlier because SetFocus() is triggered in setVisible()
-pParentComponent->setVisible(true);
+aWindow->setVisible(true);
 }
 
 Reference(m_xDatMan)->load();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/browser/genericcontroller.cxx |7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 1c056790e8075196cf5dd77fc7b51de7cc397f02
Author: Caolán McNamara 
AuthorDate: Thu Mar 11 15:34:41 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 12 10:03:02 2021 +0100

use VCLUnoHelper::GetWindow

instead of directly using VCLXWindow

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

diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx 
b/dbaccess/source/ui/browser/genericcontroller.cxx
index cb7957556ecb..83876d1bd0fd 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -18,7 +18,6 @@
  */
 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -219,7 +218,6 @@ void SAL_CALL OGenericUnoController::initialize( const 
Sequence< Any >& aArgumen
 SolarMutexGuard aSolarGuard;
 ::osl::MutexGuard aGuard( getMutex() );
 
-Reference< XWindow >xParent;
 Reference< XFrame > xFrame;
 
 PropertyValue aValue;
@@ -243,9 +241,8 @@ void SAL_CALL OGenericUnoController::initialize( const 
Sequence< Any >& aArgumen
 if ( !xFrame.is() )
 throw IllegalArgumentException("need a frame", *this, 1 );
 
-xParent = xFrame->getContainerWindow();
-VCLXWindow* pParentComponent = 
comphelper::getUnoTunnelImplementation(xParent);
-VclPtr< vcl::Window > pParentWin = pParentComponent ? 
pParentComponent->GetWindow() : nullptr;
+Reference xParent = xFrame->getContainerWindow();
+VclPtr pParentWin = VCLUnoHelper::GetWindow(xParent);
 if (!pParentWin)
 {
 throw IllegalArgumentException("Parent window is null", *this, 1 );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sal/osl

2021-03-12 Thread Armin Le Grand (Allotropia) (via logerrit)
 sal/osl/w32/file.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 2b4cd99d3360ccffb9829a02412824864d045753
Author: Armin Le Grand (Allotropia) 
AuthorDate: Tue Mar 9 19:53:25 2021 +0100
Commit: Armin Le Grand 
CommitDate: Fri Mar 12 10:01:33 2021 +0100

tdf#126742 make Windows file handling more unx-like

The bug mentioned happens due to a system-dependent
difference: Unx-systems allow files to be opened for
write multiple times while our windows implementation
until now did prevent that.
For that reason an embedded OLE which is still opened
in the same LO instance behaves wrong/strange - the
e.g. changed size cannot be written (to the file).
Since we already have unx-like handling and in that
scenario useful sync has to be done anyways, no new
scenario will be created. Only Windows implemenation
will change to behave closer to unx-like behaviour,
I already test-built that on gerrit to make sure all
tests for Windows work as before.
I thought about this for quite some time, but see no
too big risk. For thoughts/discussion please refer
to the task.

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

diff --git a/sal/osl/w32/file.cxx b/sal/osl/w32/file.cxx
index ca31d714dfef..44b8ac97ba09 100644
--- a/sal/osl/w32/file.cxx
+++ b/sal/osl/w32/file.cxx
@@ -657,15 +657,15 @@ oslFileError SAL_CALL osl_openFile(
 if (result != osl_File_E_None)
 return result;
 
-DWORD dwAccess = GENERIC_READ, dwShare = FILE_SHARE_READ, dwCreation = 0;
+// tdf126742 use FILE_SHARE_WRITE to get closer to non-Windows plattform 
behavoiur,
+// for details and discussion see task please
+DWORD dwAccess = GENERIC_READ, dwShare = FILE_SHARE_READ | 
FILE_SHARE_WRITE, dwCreation = 0;
 
 if (uFlags & osl_File_OpenFlag_Write)
 dwAccess |= GENERIC_WRITE;
-else
-dwShare  |= FILE_SHARE_WRITE;
 
 if (uFlags & osl_File_OpenFlag_NoLock)
-dwShare  |= FILE_SHARE_WRITE | FILE_SHARE_DELETE;
+dwShare  |= FILE_SHARE_DELETE;
 
 if (uFlags & osl_File_OpenFlag_Create)
 dwCreation |= CREATE_NEW;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-12 Thread Seth Chaiklin (via logerrit)
 sw/inc/strings.hrc |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bded8ae22230da161377846caea0010f038e69a1
Author: Seth Chaiklin 
AuthorDate: Thu Mar 11 16:23:47 2021 +0100
Commit: Seth Chaiklin 
CommitDate: Fri Mar 12 09:50:14 2021 +0100

tdf#128469 rename "Standard" to "Reset to Parent" plus tooltip

Change-Id: I73ad5450450c328911d8464924a163faaba9b70c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112301
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin 

diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index 008b077781a1..b32f025965e5 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -24,8 +24,8 @@
 #define NNC_(Context, StringSingular, StringPlural) reinterpret_cast(Context "\004" u8##StringSingular "\004" u8##StringPlural)
 
 // Dialog buttons
-#define STR_STANDARD_LABEL  NC_("STR_STANDARD_LABEL", "Set 
to ~Parent")
-#define STR_STANDARD_TOOLTIPNC_("STR_STANDARD_TOOLTIP", "")
+#define STR_STANDARD_LABEL  NC_("STR_STANDARD_LABEL", 
"Reset to ~Parent")
+#define STR_STANDARD_TOOLTIPNC_("STR_STANDARD_TOOLTIP", 
"Values on this tab specified in “Contains” in Organizer are removed.")
 #define STR_STANDARD_EXTENDEDTIP
NC_("STR_STANDARD_EXTENDEDTIP", "")
 #define STR_RESET_LABEL NC_("STR_RESET_LABEL", "Reset")
 #define STR_RESET_TOOLTIP   NC_("STR_RESET_TOOLTIP", 
"Unsaved modifications to this tab are reverted.")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Contributing to LibreOffice

2021-03-12 Thread Ilmari Lauhakangas

On 11.3.2021 23.19, Ankur Khandelwal wrote:

Hey there!
This is Ankur Khandelwal. I am a second-year Computer Engineering 
student at the International Institute of Information Technology, 
Bhubaneswar.


I would like to be a part of the developer community of LibreOffice.

I am sending this mail as a formal introduction as mentioned on the page 
https://summerofcode.withgoogle.com/organizations/6596812015665152/ 



My nickname on the #libreoffice-dev IRC channel at freenode.net 
 is Ankur.


I have invited you to an orienting interview.

Ilmari
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: oox/qa svx/qa sw/qa vcl/source writerfilter/qa writerfilter/source xmlsecurity/qa xmlsecurity/source

2021-03-12 Thread Miklos Vajna (via logerrit)
 oox/qa/unit/vml.cxx|1 -
 svx/qa/unit/svdraw.cxx |1 -
 sw/qa/extras/layout/layout2.cxx|1 -
 vcl/source/filter/ipdf/pdfread.cxx |2 --
 writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx  |3 ---
 writerfilter/source/rtftok/rtfsdrimport.cxx|1 -
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx  |1 -
 xmlsecurity/source/helper/documentsignaturemanager.cxx |1 -
 xmlsecurity/source/helper/pdfsignaturehelper.cxx   |1 -
 9 files changed, 12 deletions(-)

New commits:
commit 2c2a03340fbbe6747d0ae46d42c97ecd7a3a3d89
Author: Miklos Vajna 
AuthorDate: Thu Mar 11 21:01:55 2021 +0100
Commit: Miklos Vajna 
CommitDate: Fri Mar 12 09:06:20 2021 +0100

Drop some unused includes

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

diff --git a/oox/qa/unit/vml.cxx b/oox/qa/unit/vml.cxx
index 01c45b64f3ae..0306333adcb0 100644
--- a/oox/qa/unit/vml.cxx
+++ b/oox/qa/unit/vml.cxx
@@ -19,7 +19,6 @@
 #include 
 #include 
 #include 
-#include 
 
 using namespace ::com::sun::star;
 
diff --git a/svx/qa/unit/svdraw.cxx b/svx/qa/unit/svdraw.cxx
index 95aaea7f659d..d6e43d6f9887 100644
--- a/svx/qa/unit/svdraw.cxx
+++ b/svx/qa/unit/svdraw.cxx
@@ -33,7 +33,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 
diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx
index 12eb3b77e9c0..ed0db4a81ee8 100644
--- a/sw/qa/extras/layout/layout2.cxx
+++ b/sw/qa/extras/layout/layout2.cxx
@@ -26,7 +26,6 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/vcl/source/filter/ipdf/pdfread.cxx 
b/vcl/source/filter/ipdf/pdfread.cxx
index f2730dbfe811..a9b8b1b8630e 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -12,8 +12,6 @@
 #include 
 
 #if HAVE_FEATURE_PDFIUM
-#include 
-#include 
 #include 
 #endif
 
diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx 
b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
index f89779ff131a..88ba238fae29 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx
@@ -13,9 +13,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
 
 #include 
 
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx 
b/writerfilter/source/rtftok/rtfsdrimport.cxx
index 56b586c9e7c5..2308fdaf54c7 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -36,7 +36,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include "rtfreferenceproperties.hxx"
 #include 
diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx 
b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index 27a094d70ad7..c612962f86e3 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -14,7 +14,6 @@
 #include 
 #include 
 
-#include 
 #include 
 #include 
 #include 
diff --git a/xmlsecurity/source/helper/documentsignaturemanager.cxx 
b/xmlsecurity/source/helper/documentsignaturemanager.cxx
index d0ac3d0fc11a..78c2b4d59afa 100644
--- a/xmlsecurity/source/helper/documentsignaturemanager.cxx
+++ b/xmlsecurity/source/helper/documentsignaturemanager.cxx
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/xmlsecurity/source/helper/pdfsignaturehelper.cxx 
b/xmlsecurity/source/helper/pdfsignaturehelper.cxx
index 1ce8bf08cf41..39d0ea1e12a7 100644
--- a/xmlsecurity/source/helper/pdfsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/pdfsignaturehelper.cxx
@@ -31,7 +31,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits