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

2022-11-09 Thread Mike Kaganski (via logerrit)
 sw/source/ui/misc/pggrid.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e2f8558324091bddba0637942f4f000a24e673a7
Author: Mike Kaganski 
AuthorDate: Thu Nov 10 09:29:03 2022 +0300
Commit: Mike Kaganski 
CommitDate: Thu Nov 10 08:47:35 2022 +0100

Avoid double conversion

The division of twips by 56.7, that produces ~millimeters, appeared in 
commit
8fd87a90a5ebcc9d8c4ddc7ece6d20debd58e801 (cjk-character-units-imp.diff: add 
a
new unit 'character unit', Mon Sep 13 14:37:51 2010 +0200).
committer   Cédric BosdonnatMon Sep 13 
15:40:35 2010 +0200
tree96c24aabf9ef9aeed4af9920b4283ce2b6edba4c
parent  1f578e21a92b3532ddfd8e0fd007a7ec6b2ee240 [diff]

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

diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index f849f6dcc48a..95f7116670b9 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -254,8 +254,8 @@ void SwTextGridPage::PutGridItem(SfxItemSet& rSet)
 m_bHRulerChanged = true;
 }
 m_bVRulerChanged = true;
-
pView->GetHRuler().SetCharWidth(static_cast(m_xCharWidthMF->get_value(FieldUnit::TWIP)/56.7));
-
pView->GetVRuler().SetLineHeight(static_cast(m_xTextSizeMF->get_value(FieldUnit::TWIP)/56.7));
+
pView->GetHRuler().SetCharWidth(m_xCharWidthMF->get_value(FieldUnit::MM));
+
pView->GetVRuler().SetLineHeight(m_xTextSizeMF->get_value(FieldUnit::MM));
 }
 }
 


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

2022-11-09 Thread Samuel Mehrbrodt (via logerrit)
 cui/source/tabpages/chardlg.cxx |5 -
 cui/uiconfig/ui/positionpage.ui |2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 7f4f536ca9195c7d53463527f00897b65d062486
Author: Samuel Mehrbrodt 
AuthorDate: Mon Nov 7 15:01:53 2022 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Thu Nov 10 08:30:40 2022 +0100

tdf#107405 Allow kerning less than -2

Fallout from 9a745d54a5c7470180f41494283983a3b8b84a51

Change-Id: Ied4d83eb614830718cf304e7010f17516e4a9429
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142388
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index e34eca07485c..3d77e2a338fb 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -2775,10 +2775,13 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet 
)
 rCJKFont.SetFixKerning( static_cast(nKern) );
 rCTLFont.SetFixKerning( static_cast(nKern) );
 
-//the attribute value must be displayed also if it's above the maximum 
allowed value
+//the attribute value must be displayed also if it's above/below the 
maximum allowed value
 tools::Long nVal = 
static_cast(m_xKerningMF->get_max(FieldUnit::POINT));
 if(nVal < nKerning)
 m_xKerningMF->set_max(nKerning, FieldUnit::POINT);
+nVal = 
static_cast(m_xKerningMF->get_min(FieldUnit::POINT));
+if (nVal > nKerning)
+m_xKerningMF->set_min(nKerning, FieldUnit::POINT);
 m_xKerningMF->set_value(nKerning, FieldUnit::POINT);
 }
 else
diff --git a/cui/uiconfig/ui/positionpage.ui b/cui/uiconfig/ui/positionpage.ui
index 23d476bbe282..ad962316a73d 100644
--- a/cui/uiconfig/ui/positionpage.ui
+++ b/cui/uiconfig/ui/positionpage.ui
@@ -17,7 +17,7 @@
 10
   
   
--2
+-1000
 1000
 0.1
 1


[Libreoffice-commits] core.git: download.lst external/pdfium

2022-11-09 Thread Miklos Vajna (via logerrit)
 download.lst|  
  4 
 external/pdfium/Add-FPDFAnnot_GetFormAdditionalActionJavaScript-API.patch.1 |  
103 --
 external/pdfium/Add-FPDFAnnot_GetFormFieldAlternateName-API.patch.1 |  
 70 --
 external/pdfium/AndroidNDK19.patch.1|  
 16 -
 external/pdfium/Library_pdfium.mk   |  
 14 -
 external/pdfium/UnpackedTarball_pdfium.mk   |  
 28 --
 external/pdfium/build.patch.1   |  
 13 -
 external/pdfium/cg-instead-of-carbon.patch.1|  
 23 --
 external/pdfium/gcc-c++20-comparison.patch  |  
 18 -
 external/pdfium/inc/pch/precompiled_pdfium.hxx  |  
 25 --
 10 files changed, 13 insertions(+), 301 deletions(-)

New commits:
commit 5a69fd3052bb638857f30a4cfd5913634275d23d
Author: Miklos Vajna 
AuthorDate: Wed Nov 9 13:19:49 2022 +0100
Commit: Miklos Vajna 
CommitDate: Thu Nov 10 08:08:56 2022 +0100

Update pdfium to 5408

- drop cg-instead-of-carbon.patch.1, no longer needed after
  https://pdfium-review.googlesource.com/c/pdfium/+/99753

- drop AndroidNDK19.patch.1, no longer needed after
  https://pdfium-review.googlesource.com/c/pdfium/+/96530

- drop gcc-c++20-comparison.patch, no longer needed after
  

  "Fix interaction between RetainPtr and transparent comparisons" since
  chromium/5321

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

diff --git a/download.lst b/download.lst
index 98b46b17eb59..6889f8bcab45 100644
--- a/download.lst
+++ b/download.lst
@@ -200,8 +200,8 @@ export ORCUS_SHA256SUM := 
2a86c405a5929f749b27637509596421d46805753364ab258b035f
 export ORCUS_TARBALL := liborcus-0.17.2.tar.bz2
 export PAGEMAKER_SHA256SUM := 
66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d
 export PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz
-export PDFIUM_SHA256SUM := 
ecb9c2a0d777196949994946e3f24ed251ae5d3db8a9fa1e2827ef857151db13
-export PDFIUM_TARBALL := pdfium-5298.tar.bz2
+export PDFIUM_SHA256SUM := 
7db59b1e91f2bc0ab4c5e19d1a4f881e6a47dbb0d3b7e980a7358225b12a0f35
+export PDFIUM_TARBALL := pdfium-5408.tar.bz2
 export PIXMAN_SHA256SUM := 
6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc
 export PIXMAN_TARBALL := pixman-0.40.0.tar.gz
 export LIBPNG_SHA256SUM := 
b3683e8b8111ebf6f1ac004ebb6b0c975cd310ec469d98364388e9cedbfa68be
diff --git 
a/external/pdfium/Add-FPDFAnnot_GetFormAdditionalActionJavaScript-API.patch.1 
b/external/pdfium/Add-FPDFAnnot_GetFormAdditionalActionJavaScript-API.patch.1
deleted file mode 100644
index a0629bfc8fef..
--- 
a/external/pdfium/Add-FPDFAnnot_GetFormAdditionalActionJavaScript-API.patch.1
+++ /dev/null
@@ -1,103 +0,0 @@
-From f929f2ffbfdd92aea755ca1d3fd1a0bfe9e2827a Mon Sep 17 00:00:00 2001
-From: Miklos Vajna 
-Date: Fri, 16 Sep 2022 20:42:32 +
-Subject: [PATCH] Add FPDFAnnot_GetFormAdditionalActionJavaScript() API
-
-This is similar to FPDFAnnot_GetFormFieldType() and allows getting the
-JavaScript of a given event. Such JavaScripts are used e.g. on a text
-form which wants to accept dates.
-
-Bug: pdfium:1885
-Change-Id: Ieceb3042a309b9578e8a6751a60918c7e8d8f91d
-Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/97950
-Reviewed-by: Tom Sepez 
-Commit-Queue: Lei Zhang 
-Reviewed-by: Lei Zhang 

-
-diff --git a/fpdfsdk/fpdf_annot.cpp b/fpdfsdk/fpdf_annot.cpp
-index 349348583..75bdf6cd4 100644
 a/fpdfsdk/fpdf_annot.cpp
-+++ b/fpdfsdk/fpdf_annot.cpp
-@@ -1223,6 +1238,28 @@ FPDFAnnot_GetFormFieldType(FPDF_FORMHANDLE hHandle, 
FPDF_ANNOTATION annot) {
-   return pFormField ? static_cast(pFormField->GetFieldType()) : -1;
- }
- 
-+FPDF_EXPORT unsigned long FPDF_CALLCONV
-+FPDFAnnot_GetFormAdditionalActionJavaScript(FPDF_FORMHANDLE hHandle,
-+FPDF_ANNOTATION annot,
-+int event,
-+FPDF_WCHAR* buffer,
-+unsigned long buflen) {
-+  const CPDF_FormField* pFormField = GetFormField(hHandle, annot);
-+  if (!pFormField)
-+return 0;
-+
-+  if (event < FPDF_ANNOT_AACTION_KEY_STROKE ||
-+  event > FPDF_ANNOT_AACTION_CALCULATE) {
-+return 0;
-+  }
-+
-+  auto type = static_cast(event);
-+  CPDF_AAction additional_action = pFormField->GetAdditionalAction();
-+  CPDF_Action action = additional_action.GetAction(type);
-+  return Utf16EncodeMaybeCopyAndReturnLength(action.GetJavaScript(), buffer,
-+ buflen);
-+}
-+
- 

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

2022-11-09 Thread insanetree (via logerrit)
 xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx |6 
++---
 xmlsecurity/source/xmlsec/nss/nssinitializer.cxx  |   12 
+-
 xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx |2 -
 3 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 0cf5141b2233611286a27930d8030c562eb0d84b
Author: insanetree 
AuthorDate: Mon Oct 17 23:55:33 2022 +0200
Commit: Hossein 
CommitDate: Thu Nov 10 02:27:45 2022 +0100

tdf#147201 Use std::size() instead of SAL_N_ELEMENTS() macro

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

diff --git 
a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx 
b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index e51b84c40d73..a9e58a33c746 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
@@ -104,10 +104,10 @@ static void traceTrustStatus(DWORD err)
 {
 if (err == 0)
 SAL_INFO("xmlsecurity.xmlsec", "  " << arErrStrings[0].name);
-for (std::size_t i = 1; i < SAL_N_ELEMENTS(arErrStrings); i++)
+for (auto const & arErrStringIter : arErrStrings)
 {
-if (arErrStrings[i].error & err)
-SAL_INFO("xmlsecurity.xmlsec", "  " << arErrStrings[i].name);
+if (arErrStringIter.error & err)
+SAL_INFO("xmlsecurity.xmlsec", "  " << arErrStringIter.name);
 }
 }
 
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx 
b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index e26f72cd0e6a..71bff4dc5c0d 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -224,13 +224,13 @@ const OUString & 
ONSSInitializer::getMozillaCurrentProfile(const css::uno::Refer
 
 if (xMozillaBootstrap.is())
 {
-for (std::size_t i=0; igetDefaultProfile(productTypes[i]);
+OUString profile = 
xMozillaBootstrap->getDefaultProfile(productTypeIter);
 
 if (!profile.isEmpty())
 {
-OUString sProfilePath = 
xMozillaBootstrap->getProfilePath(productTypes[i], profile);
+OUString sProfilePath = 
xMozillaBootstrap->getProfilePath(productTypeIter, profile);
 if (m_sNSSPath.isEmpty())
 {
 SAL_INFO("xmlsecurity.xmlsec", "Using Mozilla profile " << 
sProfilePath);
@@ -264,12 +264,12 @@ css::uno::Sequence SAL_CALL 
ONSSInitializer::getNS
 
 if (xMozillaBootstrap.is())
 {
-for (std::size_t i=0; i aProductProfileList;
-xMozillaBootstrap->getProfileList(productTypes[i], 
aProductProfileList);
+xMozillaBootstrap->getProfileList(productTypeIter, 
aProductProfileList);
 for (const auto& sProfile : std::as_const(aProductProfileList))
-aProfileList.push_back({sProfile, 
xMozillaBootstrap->getProfilePath(productTypes[i], sProfile), productTypes[i]});
+aProfileList.push_back({sProfile, 
xMozillaBootstrap->getProfilePath(productTypeIter, sProfile), productTypeIter});
 }
 }
 
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx 
b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
index 990ea86a9bbb..8872dd96b05a 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
@@ -641,7 +641,7 @@ verifyCertificate( const Reference< csss::XCertificate >& 
aCert,
 arUsages[3] = UsageDescription( certificateUsageEmailSigner, 
"certificateUsageEmailSigner" );
 arUsages[4] = UsageDescription( certificateUsageEmailRecipient, 
"certificateUsageEmailRecipient" );
 
-int numUsages = SAL_N_ELEMENTS(arUsages);
+int numUsages = std::size(arUsages);
 for (int i = 0; i < numUsages; i++)
 {
 SAL_INFO("xmlsecurity.xmlsec", "Testing usage " << i+1 <<


[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - 34 commits - basctl/source basegfx/CppunitTest_basegfx.mk basegfx/test chart2/source cui/inc cui/source dbaccess/CppunitTest_dbacce

2022-11-09 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit ed0dad35ec234c7c60a69f0b1e33ae02010cec8d
Author: Tomaž Vajngerl 
AuthorDate: Wed Oct 26 20:21:37 2022 +0200
Commit: Tomaž Vajngerl 
CommitDate: Thu Nov 10 10:02:00 2022 +0900

svx: change PaperInfo to return gfx::Length paper sizes

Change-Id: Ie99a748ab9282893a852278be9793f7379522541

diff --git a/editeng/source/items/paperinf.cxx 
b/editeng/source/items/paperinf.cxx
index 86401e63f387..130e7c020a41 100644
--- a/editeng/source/items/paperinf.cxx
+++ b/editeng/source/items/paperinf.cxx
@@ -39,6 +39,12 @@ Size SvxPaperInfo::GetPaperSize( Paper ePaper, MapUnit eUnit 
)
 : OutputDevice::LogicToLogic(aRet, MapMode(MapUnit::Map100thMM), 
MapMode(eUnit));
 }
 
+gfx::Size2DL SvxPaperInfo::getPaperSize(Paper ePaper)
+{
+PaperInfo aInfo(ePaper);
+return { gfx::Length::hmm(aInfo.getWidth()), 
gfx::Length::hmm(aInfo.getHeight()) };
+}
+
 /*
  Description:   Return the paper size of the printer, aligned to our
 own sizes. If no Printer is set in the system, A4 portrait
@@ -108,6 +114,12 @@ Size SvxPaperInfo::GetDefaultPaperSize( MapUnit eUnit )
 : OutputDevice::LogicToLogic(aRet, MapMode(MapUnit::Map100thMM), 
MapMode(eUnit));
 }
 
+gfx::Size2DL SvxPaperInfo::getDefaultPaperSize()
+{
+PaperInfo aInfo(PaperInfo::getSystemDefaultPaper());
+return { gfx::Length::hmm(aInfo.getWidth()), 
gfx::Length::hmm(aInfo.getHeight()) };
+}
+
 /*
  Description:   String representation for the SV-defines of paper size
 */
diff --git a/include/editeng/paperinf.hxx b/include/editeng/paperinf.hxx
index 2ccc8fbf96fa..20bc1441ba74 100644
--- a/include/editeng/paperinf.hxx
+++ b/include/editeng/paperinf.hxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 // forward ---
@@ -42,6 +43,9 @@ public:
 static PaperGetSvxPaper( const Size &rSize, MapUnit eUnit );
 static tools::Long GetSloppyPaperDimension( tools::Long nSize );
 static OUString GetName( Paper ePaper );
+
+static gfx::Size2DL getPaperSize(Paper ePaper);
+static gfx::Size2DL getDefaultPaperSize();
 };
 
 // INLINE -
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index c9b38f1bbebf..c1a238f72c0f 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -371,6 +371,13 @@ public:
 , maLower(0_emu)
 {}
 
+Border(gfx::Length const& nLeft, gfx::Length const& nUpper, gfx::Length 
const& nRight, gfx::Length const& nLower)
+: maLeft(nLeft)
+, maRight(nRight)
+, maUpper(nUpper)
+, maLower(nLower)
+{}
+
 gfx::Length const& getLeft() const { return maLeft; }
 gfx::Length const& getRight() const { return maRight; }
 gfx::Length const& getUpper() const { return maUpper; }
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index a14e4382a8e0..4b8f8360e6ac 100644
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -499,7 +499,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument const 
* pRefDocument /* =
 return;
 
 // #i57181# Paper size depends on Language, like in Writer
-Size aDefSize = SvxPaperInfo::GetDefaultPaperSize( MapUnit::Map100thMM );
+gfx::Size2DL aDefaultSize = SvxPaperInfo::getDefaultPaperSize();
 
 // Insert handout page
 rtl::Reference pHandoutPage = AllocSdPage(false);
@@ -516,8 +516,8 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument const 
* pRefDocument /* =
 }
 else
 {
-pHandoutPage->setSize(gfx::length::fromSizeHmm(aDefSize));
-pHandoutPage->SetBorder(0, 0, 0, 0);
+pHandoutPage->setSize(aDefaultSize);
+pHandoutPage->setBorder(svx::Border());
 }
 
 pHandoutPage->SetPageKind(PageKind::Handout);
@@ -553,7 +553,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument const 
* pRefDocument /* =
 else if (meDocType == DocumentType::Draw)
 {
 // Draw: always use default size with margins
-pPage->setSize(gfx::length::fromSizeHmm(aDefSize));
+pPage->setSize(aDefaultSize);
 
 SfxPrinter* pPrinter = mpDocSh->GetPrinter(false);
 if (pPrinter && pPrinter->IsValid())
@@ -563,12 +563,12 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument 
const * pRefDocument /* =
 aPageOffset -= pPrinter->PixelToLogic( Point() );
 ::tools::Long nOffset = !aPageOffset.X() && !aPageOffset.Y() ? 
0 : PRINT_OFFSET;
 
-sal_uLong nTop= aPageOffset.Y();
-sal_uLong nLeft   = aPageOffset.X();
-sal_uLong nBottom = std::max(::tool

[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - 2 commits - editeng/source include/editeng include/svx sd/source svx/source

2022-11-09 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit ed05ec17833bbef42b33e8cd8dd408f6a8354cd8
Author: Tomaž Vajngerl 
AuthorDate: Wed Oct 26 20:21:37 2022 +0200
Commit: Tomaž Vajngerl 
CommitDate: Thu Nov 10 10:01:16 2022 +0900

svx: change PaperInfo to return gfx::Length paper sizes

Change-Id: Ie99a748ab9282893a852278be9793f7379522541

diff --git a/editeng/source/items/paperinf.cxx 
b/editeng/source/items/paperinf.cxx
index 86401e63f387..130e7c020a41 100644
--- a/editeng/source/items/paperinf.cxx
+++ b/editeng/source/items/paperinf.cxx
@@ -39,6 +39,12 @@ Size SvxPaperInfo::GetPaperSize( Paper ePaper, MapUnit eUnit 
)
 : OutputDevice::LogicToLogic(aRet, MapMode(MapUnit::Map100thMM), 
MapMode(eUnit));
 }
 
+gfx::Size2DL SvxPaperInfo::getPaperSize(Paper ePaper)
+{
+PaperInfo aInfo(ePaper);
+return { gfx::Length::hmm(aInfo.getWidth()), 
gfx::Length::hmm(aInfo.getHeight()) };
+}
+
 /*
  Description:   Return the paper size of the printer, aligned to our
 own sizes. If no Printer is set in the system, A4 portrait
@@ -108,6 +114,12 @@ Size SvxPaperInfo::GetDefaultPaperSize( MapUnit eUnit )
 : OutputDevice::LogicToLogic(aRet, MapMode(MapUnit::Map100thMM), 
MapMode(eUnit));
 }
 
+gfx::Size2DL SvxPaperInfo::getDefaultPaperSize()
+{
+PaperInfo aInfo(PaperInfo::getSystemDefaultPaper());
+return { gfx::Length::hmm(aInfo.getWidth()), 
gfx::Length::hmm(aInfo.getHeight()) };
+}
+
 /*
  Description:   String representation for the SV-defines of paper size
 */
diff --git a/include/editeng/paperinf.hxx b/include/editeng/paperinf.hxx
index 2ccc8fbf96fa..20bc1441ba74 100644
--- a/include/editeng/paperinf.hxx
+++ b/include/editeng/paperinf.hxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 // forward ---
@@ -42,6 +43,9 @@ public:
 static PaperGetSvxPaper( const Size &rSize, MapUnit eUnit );
 static tools::Long GetSloppyPaperDimension( tools::Long nSize );
 static OUString GetName( Paper ePaper );
+
+static gfx::Size2DL getPaperSize(Paper ePaper);
+static gfx::Size2DL getDefaultPaperSize();
 };
 
 // INLINE -
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index c9b38f1bbebf..c1a238f72c0f 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -371,6 +371,13 @@ public:
 , maLower(0_emu)
 {}
 
+Border(gfx::Length const& nLeft, gfx::Length const& nUpper, gfx::Length 
const& nRight, gfx::Length const& nLower)
+: maLeft(nLeft)
+, maRight(nRight)
+, maUpper(nUpper)
+, maLower(nLower)
+{}
+
 gfx::Length const& getLeft() const { return maLeft; }
 gfx::Length const& getRight() const { return maRight; }
 gfx::Length const& getUpper() const { return maUpper; }
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index a14e4382a8e0..4b8f8360e6ac 100644
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -499,7 +499,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument const 
* pRefDocument /* =
 return;
 
 // #i57181# Paper size depends on Language, like in Writer
-Size aDefSize = SvxPaperInfo::GetDefaultPaperSize( MapUnit::Map100thMM );
+gfx::Size2DL aDefaultSize = SvxPaperInfo::getDefaultPaperSize();
 
 // Insert handout page
 rtl::Reference pHandoutPage = AllocSdPage(false);
@@ -516,8 +516,8 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument const 
* pRefDocument /* =
 }
 else
 {
-pHandoutPage->setSize(gfx::length::fromSizeHmm(aDefSize));
-pHandoutPage->SetBorder(0, 0, 0, 0);
+pHandoutPage->setSize(aDefaultSize);
+pHandoutPage->setBorder(svx::Border());
 }
 
 pHandoutPage->SetPageKind(PageKind::Handout);
@@ -553,7 +553,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument const 
* pRefDocument /* =
 else if (meDocType == DocumentType::Draw)
 {
 // Draw: always use default size with margins
-pPage->setSize(gfx::length::fromSizeHmm(aDefSize));
+pPage->setSize(aDefaultSize);
 
 SfxPrinter* pPrinter = mpDocSh->GetPrinter(false);
 if (pPrinter && pPrinter->IsValid())
@@ -563,12 +563,12 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument 
const * pRefDocument /* =
 aPageOffset -= pPrinter->PixelToLogic( Point() );
 ::tools::Long nOffset = !aPageOffset.X() && !aPageOffset.Y() ? 
0 : PRINT_OFFSET;
 
-sal_uLong nTop= aPageOffset.Y();
-sal_uLong nLeft   = aPageOffset.X();
-sal_uLong nBottom = std::max(::tool

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

2022-11-09 Thread Miklos Vajna (via logerrit)
 sw/source/core/frmedt/feshview.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bc4969829fc227064bdf9e46e7e1cf88ff2d7b46
Author: Miklos Vajna 
AuthorDate: Tue Jun 7 12:54:12 2022 +0200
Commit: Aron Budea 
CommitDate: Thu Nov 10 01:57:07 2022 +0100

sw: fix crash in SwFEShell::SelectObj()

Fatal signal received: SIGSEGV code: 1 for address: 0x0

SwLayoutFrame::Lower() const
sw/source/core/inc/layfrm.hxx:101
SwFEShell::SelectObj(Point const&, unsigned char, SdrObject*)
sw/source/core/frmedt/feshview.cxx:317
SwEditWin::MouseButtonDown(MouseEvent const&)
sw/source/uibase/docvw/edtwin.cxx:?

Change-Id: I6c4076eef21dd80381b37ed89aa2dc8bc20fbc98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135469
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
(cherry picked from commit af666ed27485ea52b2d7ccd68c91e55b15fa419c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142452
Reviewed-by: Aron Budea 

diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index 5a2385e19cf5..faa05b391115 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -313,7 +313,7 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 
nFlag, SdrObject *pObj )
 {
 const SwFlyFrame *pTmp = GetFlyFromMarked( &rMrkList, this );
 OSL_ENSURE( pTmp, "Graphic without Fly" );
-if ( static_cast(pTmp->Lower())->HasAnimation() )
+if ( pTmp && static_cast(pTmp->Lower())->HasAnimation() )
 static_cast(pTmp->Lower())->StopAnimation( GetOut() );
 }
 }


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

2022-11-09 Thread Miklos Vajna (via logerrit)
 sw/source/uibase/docvw/HeaderFooterWin.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 620368baf0106083de526513b6c7f4c31876f2ed
Author: Miklos Vajna 
AuthorDate: Thu May 19 14:17:10 2022 +0200
Commit: Aron Budea 
CommitDate: Thu Nov 10 01:56:34 2022 +0100

sw: fix crash in SwHeaderFooterWin::IsEmptyHeaderFooter()

Crashreport signature:

Fatal signal received: SIGSEGV code: 1 for address: 0x0
program/../program/libswlo.so
SwPageFrame::GetPageDesc() const
sw/source/core/inc/pagefrm.hxx:144
program/../program/libswlo.so
SwHeaderFooterWin::IsEmptyHeaderFooter() const
sw/source/uibase/docvw/HeaderFooterWin.cxx:403
program/../program/libswlo.so
SwHeaderFooterWin::ShowAll(bool)
sw/source/uibase/docvw/HeaderFooterWin.cxx:273
program/../program/libswlo.so
SwFrameControl::ShowAll(bool)
sw/source/uibase/inc/FrameControl.hxx:49

Change-Id: I3c1a6f46c7a15c2ca1a3db69a14d49abbea8c879
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134640
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
(cherry picked from commit c60bbd7a90a9281b02496099759584109e931f2b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142453
Reviewed-by: Aron Budea 

diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx 
b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index f9a63c449a08..f6c37941869f 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -387,6 +387,11 @@ bool SwHeaderFooterWin::IsEmptyHeaderFooter( ) const
 {
 bool bResult = true;
 
+if (!GetPageFrame())
+{
+return bResult;
+}
+
 // Actually check it
 const SwPageDesc* pDesc = GetPageFrame()->GetPageDesc();
 


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

2022-11-09 Thread Miklos Vajna (via logerrit)
 vcl/source/filter/ipdf/pdfread.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit ad97feaeaead11295a899e38841e645ba39b0bfa
Author: Miklos Vajna 
AuthorDate: Mon Aug 1 09:31:48 2022 +0200
Commit: Aron Budea 
CommitDate: Thu Nov 10 01:55:21 2022 +0100

vcl: fix crash in vcl::ImportPDFUnloaded()

Crashreport signature:

SIG   Fatal signal received: SIGSEGV code: 1 for address: 0x0
program/libmergedlo.so
vcl::ImportPDFUnloaded(rtl::OUString const&, 
std::vector >&)
vcl/source/filter/ipdf/pdfread.cxx:256
program/../program/libsdlo.so
SdPdfFilter::Import()
sd/source/filter/pdf/sdpdffilter.cxx:55
program/../program/libsdlo.so
sd::DrawDocShell::ConvertFrom(SfxMedium&)
sd/source/ui/docshell/docshel4.cxx:500 (discriminator 1)
program/libmergedlo.so
SfxObjectShell::DoLoad(SfxMedium*)
sfx2/source/doc/objstor.cxx:768

Change-Id: I2fc635de696643af6a80a29aa5af4fa128f8776c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137669
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
(cherry picked from commit e7e6cd1f5e9723c2642075fed46e868342be0bf0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142451
Reviewed-by: Aron Budea 

diff --git a/vcl/source/filter/ipdf/pdfread.cxx 
b/vcl/source/filter/ipdf/pdfread.cxx
index 05b9a966fd02..e9c9af8b7223 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -163,6 +163,11 @@ std::vector
 findAnnotations(const std::unique_ptr& pPage, 
basegfx::B2DSize aPageSize)
 {
 std::vector aPDFGraphicAnnotations;
+if (!pPage)
+{
+return aPDFGraphicAnnotations;
+}
+
 for (int nAnnotation = 0; nAnnotation < pPage->getAnnotationCount(); 
nAnnotation++)
 {
 auto pAnnotation = pPage->getAnnotation(nAnnotation);


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

2022-11-09 Thread Miklos Vajna (via logerrit)
 sw/source/uibase/shells/textsh1.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 94647d0e903c90543e40d073e9896b1e26fd5d69
Author: Miklos Vajna 
AuthorDate: Mon Jul 18 08:21:43 2022 +0200
Commit: Aron Budea 
CommitDate: Thu Nov 10 00:13:15 2022 +0100

sw: fix crash in SwTextShell::Execute()

Crashreport signature:

SwTextShell::Execute(SfxRequest&)
sw/source/uibase/shells/textsh1.cxx:1540
SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, 
bool)
sfx2/source/control/dispatch.cxx:256
SfxDispatcher::Execute(unsigned short, SfxCallMode, SfxItemSet 
const*, SfxItemSet const*, unsigned short)
sfx2/source/control/dispatch.cxx:811
SfxDispatchController_Impl::dispatch(com::sun::star::util::URL 
const&, com::sun::star::uno::Sequence 
const&, 
com::sun::star::uno::Reference 
const&)
sfx2/source/control/unoctitm.cxx:671

This is the Grammar case, the Spelling case already checked for an empty
xDictionary reference.

Change-Id: If1f88e4bdf2d68d877fbb0bd89d0cadbd493771f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137161
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
(cherry picked from commit d5b0d5b1aa379d7cc758f6206ac9b3143868f75e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142450
Reviewed-by: Aron Budea 

diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index e8bae3666ca5..829b42c5a968 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1478,9 +1478,12 @@ void SwTextShell::Execute(SfxRequest &rReq)
 SwPaM *pPaM = rWrtSh.GetCursor();
 if (pPaM)
 SwEditShell::IgnoreGrammarErrorAt( *pPaM );
-// refresh the layout of all paragraphs (workaround to 
launch a dictionary event)
-xDictionary->setActive(false);
-xDictionary->setActive(true);
+if (xDictionary.is())
+{
+// refresh the layout of all paragraphs (workaround to 
launch a dictionary event)
+xDictionary->setActive(false);
+xDictionary->setActive(true);
+}
 }
 catch( const uno::Exception& )
 {


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

2022-11-09 Thread Paris Oplopoios (via logerrit)
 sw/inc/AccessibilityCheckStrings.hrc |1 
 sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx |   14 +++
 sw/qa/core/accessibilitycheck/data/TabsTest.odt  |binary
 sw/source/core/access/AccessibilityCheck.cxx |   68 ++-
 4 files changed, 64 insertions(+), 19 deletions(-)

New commits:
commit 3c0be5564afe1b9cc843a49aba88b72af74c43ab
Author: Paris Oplopoios 
AuthorDate: Mon Oct 24 14:12:44 2022 +0300
Commit: Tomaž Vajngerl 
CommitDate: Wed Nov 9 23:54:58 2022 +0100

a11y: Add check for tabs used for formatting

Add accessibility check and relevant test for a document that uses
tabs for formatting

Useful to detect fake tables made of tabs

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

diff --git a/sw/inc/AccessibilityCheckStrings.hrc 
b/sw/inc/AccessibilityCheckStrings.hrc
index 7245a2b8d3e0..baa61cbcb8ba 100644
--- a/sw/inc/AccessibilityCheckStrings.hrc
+++ b/sw/inc/AccessibilityCheckStrings.hrc
@@ -27,6 +27,7 @@
 #define STR_AVOID_BACKGROUND_IMAGES NC_("STR_AVOID_BACKGROUND_IMAGES", 
"Avoid background images.")
 #define STR_AVOID_NEWLINES_SPACENC_("STR_AVOID_NEWLINES_SPACE", "Avoid 
newlines to create space.")
 #define STR_AVOID_SPACES_SPACE  NC_("STR_AVOID_SPACES_SPACE", "Avoid 
spaces to create space.")
+#define STR_AVOID_TABS_FORMATTING   NC_("STR_AVOID_TABS_FORMATTING", 
"Avoid using tabs for formatting.")
 #define STR_HEADINGS_NOT_IN_ORDER   NC_("STR_HEADINGS_NOT_IN_ORDER", 
"Headings not in order.")
 #define STR_TEXT_FORMATTING_CONVEYS_MEANING 
NC_("STR_TEXT_FORMATTING_CONVEYS_MEANING", "The text formatting conveys 
additional meaning.")
 #define STR_NON_INTERACTIVE_FORMS   NC_("STR_NON_INTERACTIVE_FORMS", "An 
input form is not interactive.")
diff --git a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx 
b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
index cc8b3742be74..9397832bebf5 100644
--- a/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
+++ b/sw/qa/core/accessibilitycheck/AccessibilityCheckTest.cxx
@@ -168,6 +168,20 @@ CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, 
testCheckTableFormatting)
 CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TABLE_FORMATTING, 
aIssues[0]->m_eIssueID);
 }
 
+CPPUNIT_TEST_FIXTURE(AccessibilityCheckTest, testCheckTabsFormatting)
+{
+SwDoc* pDoc = createSwDoc("TabsTest.odt");
+CPPUNIT_ASSERT(pDoc);
+sw::AccessibilityCheck aCheck(pDoc);
+aCheck.check();
+auto& aIssues = aCheck.getIssueCollection().getIssues();
+CPPUNIT_ASSERT_EQUAL(size_t(4), aIssues.size());
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[0]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[1]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[2]->m_eIssueID);
+CPPUNIT_ASSERT_EQUAL(sfx::AccessibilityIssueID::TEXT_FORMATTING, 
aIssues[3]->m_eIssueID);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/accessibilitycheck/data/TabsTest.odt 
b/sw/qa/core/accessibilitycheck/data/TabsTest.odt
new file mode 100644
index ..29b415df87a7
Binary files /dev/null and b/sw/qa/core/accessibilitycheck/data/TabsTest.odt 
differ
diff --git a/sw/source/core/access/AccessibilityCheck.cxx 
b/sw/source/core/access/AccessibilityCheck.cxx
index ce0409d6ba5b..897ee0d43c58 100644
--- a/sw/source/core/access/AccessibilityCheck.cxx
+++ b/sw/source/core/access/AccessibilityCheck.cxx
@@ -791,33 +791,63 @@ public:
 const OUString& sParagraphText = pTextNode->GetText();
 sal_Int32 nSpaceCount = 0;
 sal_Int32 nSpaceStart = 0;
+sal_Int32 nTabCount = 0;
 bool bNonSpaceFound = false;
+bool bPreviousWasChar = false;
 for (sal_Int32 i = 0; i < nParagraphLength; i++)
 {
-if (sParagraphText[i] == ' ')
+switch (sParagraphText[i])
 {
-if (bNonSpaceFound)
+case ' ':
 {
-nSpaceCount++;
-if (nSpaceCount == 2)
-nSpaceStart = i;
+if (bNonSpaceFound)
+{
+nSpaceCount++;
+if (nSpaceCount == 2)
+nSpaceStart = i;
+}
+break;
 }
-}
-else
-{
-if (nSpaceCount >= 2)
+case '\t':
 {
-auto pIssue = lclAddIssue(m_rIssueCollection, 
SwResId(STR_AVOID_SPACES_SPACE),
-  
sfx::AccessibilityIssueID::TEXT_FORMATTING);
-pIs

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

2022-11-09 Thread Miklos Vajna (via logerrit)
 vcl/source/window/mouse.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 5a472b364062dd60434ac714ba3cd127b2a3ec30
Author: Miklos Vajna 
AuthorDate: Mon Nov 7 10:48:06 2022 +0100
Commit: Aron Budea 
CommitDate: Wed Nov 9 23:33:46 2022 +0100

vcl: fix crash in Window::LeaveWait()

Crashreport signature:

SIG   Fatal signal received: SIGSEGV code: 128 for address: 0x0
program/libmergedlo.so
vcl::Window::LeaveWait()
vcl/source/window/mouse.cxx:640
program/../program/libsclo.so
ScSpellingEngine::ShowTableWrapDialog()
sc/source/ui/view/spelleng.cxx:315
program/libsclo.so
ScConversionEngineBase::FindNextConversionCell()
sc/source/ui/view/spelleng.cxx:168
program/../program/libsclo.so
ScSpellDialogChildWindow::GetNextWrongSentence(bool)

/opt/rh/devtoolset-10/root/usr/include/c++/10/bits/unique_ptr.h:173

Seeing that e.g. Window::GetDropTarget() also handles a disposed
vcl::Window, let's do the same here.

Change-Id: Ia4ad312ae91dfef24266c5bd45751778acbee367
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142367
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit b763d57a023406049d2f6490a1a4b14c6a217463)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142443
Reviewed-by: Aron Budea 

diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 717713a68952..c1096c8bcd7c 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -637,6 +637,8 @@ void Window::EnterWait()
 
 void Window::LeaveWait()
 {
+if( !mpWindowImpl )
+return;
 
 if ( mpWindowImpl->mnWaitCount )
 {


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

2022-11-09 Thread Miklos Vajna (via logerrit)
 vcl/source/app/salvtables.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 9ff2d7bca7a52e22f8186f58ad14669cf78baadf
Author: Miklos Vajna 
AuthorDate: Thu Sep 8 13:48:01 2022 +0200
Commit: Aron Budea 
CommitDate: Wed Nov 9 22:46:13 2022 +0100

vcl: fix crash in SalInstanceWidget::set_busy_cursor()

Crashreport signature:

Fatal signal received: SIGSEGV code: 128 for address: 0x0

program/libmergedlo.so
vcl::Window::LeaveWait()
vcl/source/window/mouse.cxx:640
program/libsclo.so
ScSpellingEngine::ShowTableWrapDialog()
sc/source/ui/view/spelleng.cxx:315
program/libsclo.so
ScConversionEngineBase::FindNextConversionCell()
sc/source/ui/view/spelleng.cxx:168
program/libsclo.so
ScSpellDialogChildWindow::GetNextWrongSentence(bool)

/opt/rh/devtoolset-10/root/usr/include/c++/10/bits/unique_ptr.h:173

Change-Id: I298789211d6ee038bd5a9a7bff7cf9ae4f132a91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139652
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
(cherry picked from commit 3038c8b971940a3ff71a99e6de6cd6aa3c8ecd78)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142445
Reviewed-by: Aron Budea 

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index f3797237e1fa..8e0e05af8434 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -482,6 +482,11 @@ void SalInstanceWidget::thaw() { 
m_xWidget->SetUpdateMode(true); }
 
 void SalInstanceWidget::set_busy_cursor(bool bBusy)
 {
+if (!m_xWidget)
+{
+return;
+}
+
 if (bBusy)
 m_xWidget->EnterWait();
 else


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

2022-11-09 Thread Miklos Vajna (via logerrit)
 cui/source/dialogs/SpellDialog.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 2102886f0d79128d2628797c56d20254af2b12be
Author: Miklos Vajna 
AuthorDate: Mon Sep 26 08:51:10 2022 +0200
Commit: Aron Budea 
CommitDate: Wed Nov 9 22:45:02 2022 +0100

cui: fix crash in SpellDialog::SpellContinue_Impl

Crashreport signature:

Fatal signal received: SIGSEGV code: 128 for address: 0x0
program/libcuilo.so

svx::SpellDialog::GetNextSentence_Impl(std::unique_ptr >*, bool, bool)
include/com/sun/star/uno/Reference.hxx:114
program/libcuilo.so

svx::SpellDialog::SpellContinue_Impl(std::unique_ptr >*, bool, bool)
cui/source/dialogs/SpellDialog.cxx:355
program/libcuilo.so
svx::SpellDialog::ChangeHdl(weld::Button&)
include/rtl/ustring.hxx:527
program/libmergedlo.so
Control::ImplCallEventListenersAndHandler(VclEventId, 
std::function const&)
include/rtl/ref.hxx:208
program/libmergedlo.so
Button::Click()

/opt/rh/devtoolset-10/root/usr/include/c++/10/bits/std_function.h:244

Change-Id: I2c7267118213ea7d915a28d77badf93f8ff75683
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140586
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
(cherry picked from commit 5a4c34d325a6206b1a353d54eb4c216fc84c2886)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142444
Reviewed-by: Aron Budea 

diff --git a/cui/source/dialogs/SpellDialog.cxx 
b/cui/source/dialogs/SpellDialog.cxx
index bdb46b8bae29..6e98d7e5af01 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -351,6 +351,11 @@ void 
SpellDialog::SpellContinue_Impl(std::unique_ptr* pGua
 //then GetNextSentence() has to be called followed again by MarkNextError()
 //MarkNextError is not initially called if the UndoEdit mode is active
 bool bNextSentence = false;
+if (!m_xSentenceED)
+{
+return;
+}
+
 if(!((!m_xSentenceED->IsUndoEditMode() && m_xSentenceED->MarkNextError( 
bIgnoreCurrentError, xSpell )) ||
 ( bNextSentence = GetNextSentence_Impl(pGuard, bUseSavedSentence, 
m_xSentenceED->IsUndoEditMode()) && m_xSentenceED->MarkNextError( false, xSpell 

 return;


[Libreoffice-commits] core.git: helpcontent2

2022-11-09 Thread Olivier Hallot (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2e55962e5d07e425560592b016baff4964436be0
Author: Olivier Hallot 
AuthorDate: Wed Nov 9 18:01:33 2022 -0300
Commit: Gerrit Code Review 
CommitDate: Wed Nov 9 22:01:33 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 4f452d1d8432a93eb41d5d0f90c2e0b5947e0e53
  - tdf#146950 Clarify slide format "screen" and "on-screen show"

+ refactor page/slide format Help pages for slides and drawings
+ drop 2 now useless pages

Change-Id: If98458246f106da509d72a4087f365dbefd08607
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/142493
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index b13eb126bfcc..4f452d1d8432 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit b13eb126bfcc3ec1ececf01d5196d26fcc14e1c2
+Subproject commit 4f452d1d8432a93eb41d5d0f90c2e0b5947e0e53


[Libreoffice-commits] help.git: AllLangHelp_simpress.mk source/text

2022-11-09 Thread Olivier Hallot (via logerrit)
 AllLangHelp_simpress.mk  |2 
 source/text/sdraw/01/page_properties.xhp |8 +--
 source/text/shared/01/05040200.xhp   |   12 +++-
 source/text/shared/01/05210100.xhp   |5 +
 source/text/simpress/01/01180001.xhp |   70 ---
 source/text/simpress/01/01180002.xhp |   39 ---
 source/text/simpress/01/slide_properties.xhp |8 +--
 7 files changed, 20 insertions(+), 124 deletions(-)

New commits:
commit 4f452d1d8432a93eb41d5d0f90c2e0b5947e0e53
Author: Olivier Hallot 
AuthorDate: Wed Nov 9 12:29:19 2022 -0300
Commit: Olivier Hallot 
CommitDate: Wed Nov 9 22:01:31 2022 +0100

tdf#146950 Clarify slide format "screen" and "on-screen show"

+ refactor page/slide format Help pages for slides and drawings
+ drop 2 now useless pages

Change-Id: If98458246f106da509d72a4087f365dbefd08607
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/142493
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-by: Olivier Hallot 

diff --git a/AllLangHelp_simpress.mk b/AllLangHelp_simpress.mk
index db4e7f6c9b..7295d6968a 100644
--- a/AllLangHelp_simpress.mk
+++ b/AllLangHelp_simpress.mk
@@ -30,8 +30,6 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,simpress,\
 helpcontent2/source/text/simpress/00/slide_menu \
 helpcontent2/source/text/simpress/01/0117 \
 helpcontent2/source/text/simpress/01/slide_properties \
-helpcontent2/source/text/simpress/01/01180001 \
-helpcontent2/source/text/simpress/01/01180002 \
 helpcontent2/source/text/simpress/01/0211 \
 helpcontent2/source/text/simpress/01/0212 \
 helpcontent2/source/text/simpress/01/0213 \
diff --git a/source/text/sdraw/01/page_properties.xhp 
b/source/text/sdraw/01/page_properties.xhp
index 257f4f3d1d..1747bbd8a0 100644
--- a/source/text/sdraw/01/page_properties.xhp
+++ b/source/text/sdraw/01/page_properties.xhp
@@ -28,14 +28,14 @@
   
   
 
-Page
+Page
 Sets page orientation, page margins, background and other 
layout options.
 
   
 
 
-
-
-To 
change the background of all of the pages in the active file, select a 
background, click OK and click Yes in the Page 
Properties dialog.
+
+
+To change the background of all of the 
pages in the active file, select a background, click OK and click 
Yes in the Page Properties dialog.
   
 
diff --git a/source/text/shared/01/05040200.xhp 
b/source/text/shared/01/05040200.xhp
index 473fa35f9f..f9359b3eb2 100644
--- a/source/text/shared/01/05040200.xhp
+++ b/source/text/shared/01/05040200.xhp
@@ -25,7 +25,7 @@
 
 
 
-
+
 pages;formatting and 
numbering
 formatting;pages
 paper formats
@@ -43,7 +43,8 @@
 mw made "binding space;" a one level entry and added 
"gutter" and "margins;pages"
 
 
-Page
+
+SlidePage
 Allows you to define page layouts 
for single and multiple-page documents, as well as a numbering and paper 
formats.
 
 
@@ -55,7 +56,12 @@
 Select from a 
list of predefined paper sizes, or define a custom paper format.
 
 Format
-Select a predefined paper size, or 
create a custom format by entering the dimensions for the paper in the 
Height and Width boxes.
+Select a predefined paper size, or 
create a custom format by entering the dimensions for the paper in the 
Height and Widthboxes.
+
+
+Slides formats "On Screen Show 
(4:3)", "On Screen Show (16:9)" and "On Screen Show (16:10)" are used for 
Microsoft PowerPoint interoperability.
+
+
 
 Width
 Displays the width of the selected paper 
format. To define a custom format, enter a width here.
diff --git a/source/text/shared/01/05210100.xhp 
b/source/text/shared/01/05210100.xhp
index 9ba99f6b55..4fd88fdbe7 100644
--- a/source/text/shared/01/05210100.xhp
+++ b/source/text/shared/01/05210100.xhp
@@ -24,7 +24,7 @@
 
 
 
-
+
 
 areas; styles
 fill patterns for areas
@@ -40,8 +40,9 @@
 
 
 
+
 
-BackgroundArea
+AreaBackground
 Set the fill options for the selected 
drawing object or document element.
 This is not only for drawing objects, but pages, paragraphs and 
others too. Need better wording
 
diff --git a/source/text/simpress/01/01180001.xhp 
b/source/text/simpress/01/01180001.xhp
deleted file mode 100644
index ac6717fe50..00
--- a/source/text/simpress/01/01180001.xhp
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
-  
-
-  Page 
-  /text/simpress/01/01180001.xhp
-
-  
-  
-
-  
-slides; formatting
-formatting;slides
-  
-  
-Page
-  
-  Sets 
page orientation, page margins, background and other layout options.
-
-
-  
-
-Paper format
-Format
-Select a 
paper format supported by your printer. You can also create a custom page size 
by selecting User and entering the size dimensions in the 
Width and Height boxes.
-Width
-Shows the 
width of the paper format you selected in the Format box. If you 
selected the Us

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

2022-11-09 Thread Szymon Kłos (via logerrit)
 include/sfx2/lokhelper.hxx  |2 ++
 include/sfx2/viewsh.hxx |2 ++
 include/vcl/ITiledRenderable.hxx|   13 +
 sd/source/ui/inc/ViewShellBase.hxx  |4 
 sd/source/ui/inc/unomodel.hxx   |6 +-
 sd/source/ui/unoidl/unomodel.cxx|   23 +++
 sd/source/ui/view/ViewShellBase.cxx |   36 
 sfx2/source/view/lokhelper.cxx  |   10 +-
 sfx2/source/view/viewsh.cxx |5 +
 9 files changed, 99 insertions(+), 2 deletions(-)

New commits:
commit 4c0e5d0be02ba25be0e8b4748fbf0060491de93c
Author: Szymon Kłos 
AuthorDate: Mon Aug 29 08:40:14 2022 +0200
Commit: Szymon Kłos 
CommitDate: Wed Nov 9 21:49:09 2022 +0100

lok: masterpage: introduce EditMode setter and getter for ViewShell

Change-Id: I74d3307aab8fc038bd2409b5f10a2d08db885223
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138957
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142472
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index eaa7abe9785c..b2bf16aa99ab 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -58,6 +58,8 @@ public:
 static void destroyView(int nId);
 /// Set a view shell as current one.
 static void setView(int nId);
+/// Set the edit mode for a document with callbacks disabled.
+static void setEditMode(int nMode, vcl::ITiledRenderable* pDoc);
 /// Get view shell with id
 static SfxViewShell* getViewOfId(int nId);
 /// Get the currently active view.
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 5d1a44ff07be..6196faa4ca4a 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -365,6 +365,8 @@ public:
 void setTiledSearching(bool bTiledSearching);
 /// See lok::Document::getPart().
 virtual int getPart() const;
+/// See lok::Document::getMode().
+virtual int getEditMode() const;
 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
 /// See OutlinerViewShell::GetViewShellId().
 ViewShellId GetViewShellId() const override;
diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
index 2562ce8b187f..f06193172702 100644
--- a/include/vcl/ITiledRenderable.hxx
+++ b/include/vcl/ITiledRenderable.hxx
@@ -117,6 +117,19 @@ public:
 /// @see lok::Document::setPartMode().
 virtual void setPartMode(int) {}
 
+/**
+ * Get the currently used EditMode (supported in Impress).
+ */
+virtual int getEditMode()
+{
+return 0;
+}
+
+/**
+ * Set the currently used EditMode (supported in Impress).
+ */
+virtual void setEditMode(int) {}
+
 /**
  * Setup various document properties that are needed for the document to
  * be renderable via tiled rendering.
diff --git a/sd/source/ui/inc/ViewShellBase.hxx 
b/sd/source/ui/inc/ViewShellBase.hxx
index eab26ec8a1ba..7fc4af2a2da0 100644
--- a/sd/source/ui/inc/ViewShellBase.hxx
+++ b/sd/source/ui/inc/ViewShellBase.hxx
@@ -213,6 +213,10 @@ public:
 OUString RetrieveLabelFromCommand( const OUString& aCmdURL ) const;
 /// See SfxViewShell::getPart().
 int getPart() const override;
+/// See SfxViewShell::getEditMode().
+int getEditMode() const override;
+/// See SfxViewShell::setEditMode().
+void setEditMode(int nMode);
 /// See SfxViewShell::NotifyCursor().
 void NotifyCursor(SfxViewShell* pViewShell) const override;
 
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
index 74e21ed44131..98d5c4473f9b 100644
--- a/sd/source/ui/inc/unomodel.hxx
+++ b/sd/source/ui/inc/unomodel.hxx
@@ -240,8 +240,12 @@ public:
 virtual VclPtr getDocWindow() override;
 bool isMasterViewMode();
 
+/// @see vcl::ITiledRenderable::setPartMode().
 virtual void setPartMode( int nPartMode ) override;
-
+/// @see vcl::ITiledRenderable::getEditMode().
+virtual int getEditMode() override;
+/// @see vcl::ITiledRenderable::setEditMode().
+virtual void setEditMode(int) override;
 /// @see vcl::ITiledRenderable::initializeForTiledRendering().
 virtual void initializeForTiledRendering(const 
css::uno::Sequence& rArguments) override;
 /// @see vcl::ITiledRenderable::postKeyEvent().
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 990f9c84b625..2125fe109ed5 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2339,7 +2339,10 @@ OUString SdXImpressDocument::getPartInfo(int nPart)
 OUString::number(static_cast(bIsSelected)) +
 "\", \"masterPageCount\": \"" +
 OUString::number(nMasterPageCount) +
+"\", \"mode\": \"" +
+OUString::number(getEditMode()) +
 "\" }";
+
 return aPartInfo;
 }
 
@@ -2456,6 +2459,26 @@ 

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

2022-11-09 Thread Kevin Suo (via logerrit)
 sw/source/ui/misc/pggrid.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 875c27dc7975de9b007a215fe1d6f171b4ef090e
Author: Kevin Suo 
AuthorDate: Thu Nov 3 23:26:28 2022 +0800
Commit: Caolán McNamara 
CommitDate: Wed Nov 9 21:24:29 2022 +0100

tdf#151544: Page grid: ruby height should be zero when not in square page 
mode

Ruby height is used to show the ruby line in square page mode only (e.g. to 
show the
Pinyin etc above or below base line). When not in square page mode (i.e., 
when in
normal mode), the ruby height should be zero.

The code was trying to set the ruby height to zero by using the following:
m_xRubySizeMF->set_value(0, FieldUnit::TWIP);
and then pass this to aGridItem.SetRubyHeight in 
SwTextGridPage::PutGridItem.
However, there seems to be always a conversion loss, thus each line will 
have a tiny
ruby height, which makes the vertical space not enough to hold the desired 
number
of lines on the page.

Fix this by setting ruby height to zero directly in 
SwTextGridPage::PutGridItem if
we are not in square page mode.

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

diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index db3ade6edb6b..f849f6dcc48a 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -232,7 +232,12 @@ void SwTextGridPage::PutGridItem(SfxItemSet& rSet)
 aGridItem.SetBaseHeight( static_cast< sal_uInt16 >(
 m_bRubyUserValue ? m_nRubyUserValue :
 
m_xTextSizeMF->denormalize(m_xTextSizeMF->get_value(FieldUnit::TWIP))) );
-aGridItem.SetRubyHeight( static_cast< sal_uInt16 
>(m_xRubySizeMF->denormalize(m_xRubySizeMF->get_value(FieldUnit::TWIP))) );
+// Tdf#151544: set ruby height from the value get from UI only when in 
square page mode.
+// When in normal mode, the ruby height should be zero.
+if (m_bSquaredMode)
+
aGridItem.SetRubyHeight(static_cast(m_xRubySizeMF->denormalize(m_xRubySizeMF->get_value(FieldUnit::TWIP;
+else
+aGridItem.SetRubyHeight(0);
 aGridItem.SetBaseWidth( static_cast< sal_uInt16 
>(m_xCharWidthMF->denormalize(m_xCharWidthMF->get_value(FieldUnit::TWIP))) );
 aGridItem.SetRubyTextBelow(m_xRubyBelowCB->get_active());
 aGridItem.SetSquaredMode(m_bSquaredMode);
@@ -385,7 +390,6 @@ IMPL_LINK(SwTextGridPage, CharorLineChangedHdl, 
weld::SpinButton&, rField, void)
 assert(nValue && "div-by-zero");
 auto nHeight = m_aPageSize.Height() / nValue;
 m_xTextSizeMF->set_value(m_xTextSizeMF->normalize(nHeight), 
FieldUnit::TWIP);
-m_xRubySizeMF->set_value(0, FieldUnit::TWIP);
 SetLinesOrCharsRanges( *m_xLinesRangeFT , 
m_xLinesPerPageNF->get_max() );
 
 m_nRubyUserValue = nHeight;


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

2022-11-09 Thread Rafael Lima (via logerrit)
 svtools/source/control/ruler.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 2e9122f79b2573647a77bdfb2216934a5abda778
Author: Rafael Lima 
AuthorDate: Tue Oct 18 18:43:59 2022 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Nov 9 21:08:47 2022 +0100

tdf#151519 Make ticks in ruler visible again

As reported by the user, the ticks in the ruler are no longer visible. This 
patch draws them using the shadow color.

Tested with: gen, gtk3 and kf5

Change-Id: Ie80255544b88adfc331fac1365ce381dd90187cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141407
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
(cherry picked from commit aa8a8b36b73304431bacd7ed0f8803de8dfffe3e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142448
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 07e030aac109..89164e6ed8f2 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -417,6 +417,7 @@ void Ruler::ImplInvertLines(vcl::RenderContext& 
rRenderContext)
 
 void Ruler::ImplDrawTicks(vcl::RenderContext& rRenderContext, tools::Long 
nMin, tools::Long nMax, tools::Long nStart, tools::Long nTop, tools::Long 
nBottom)
 {
+const StyleSettings& rStyleSettings = 
rRenderContext.GetSettings().GetStyleSettings();
 double nCenter = nTop + ((nBottom - nTop) / 2);
 
 tools::Long nTickLength3 = (nBottom - nTop) * 0.5;
@@ -523,7 +524,7 @@ void Ruler::ImplDrawTicks(vcl::RenderContext& 
rRenderContext, tools::Long nMin,
 }
 else
 {
-
rRenderContext.SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetShadowColor());
+rRenderContext.SetLineColor(rStyleSettings.GetShadowColor());
 }
 
 if (bNoTicks)
@@ -576,6 +577,7 @@ void Ruler::ImplDrawTicks(vcl::RenderContext& 
rRenderContext, tools::Long nMin,
 double aStep = nTick / nTick4;
 double aRest = std::abs(aStep - std::floor(aStep));
 double nAcceptanceDelta = 0.0001;
+rRenderContext.SetFillColor(rStyleSettings.GetShadowColor());
 
 if (aRest < nAcceptanceDelta)
 {


Minutes from the UX/design meeting 2022-Nov-09

2022-11-09 Thread Heiko Tietze

Present: Heiko
Comments: Stuart, Rainer, Cor, Regina, Telesto

Tickets/Topics

 * Having "Enable word completion" and "Collect words" options separated
   doesn't make sense to me
   + https://bugs.documentfoundation.org/show_bug.cgi?id=145044
   + collect words without enabling word completion?
   + use collected words without collecting new (Cor)
   + and collect without word completion? (Heiko)
   => better keep it

 * There are no "Deletions in margin" and "Insertions in margin" items
   in some Edit-Track changes submenu
   + https://bugs.documentfoundation.org/show_bug.cgi?id=151665
   + menu access to show TC on/off plus inline vs. margin?
   + replacing the simple show by a choice of four options sounds wrong (Heiko)
   => better keep it simple

 * Better UX to insert and manage playing an audio stream/soundtrack
   in background for entire ODF presentation
   + https://bugs.documentfoundation.org/show_bug.cgi?id=151394
   + slide transition sounds is played until it ends which allows to
 use this feature as background music (Rainer)
   + the access is clunky and hard to figure out, however (Stuart)
 + effect must be finalized before applying the sound
 + must not be "Applied to all slides".
 + can only be applied to the first slide of a sequence
 + looping needs very precise timing
 + audio file is not embedded into the ODF presentation
   + what other features are needed?
 + showing in an automatic presentation until when exactly the music is
   playing having a use case in mind where photos are shown in a loop
 + driving the slide progress per audio with the idea to record a
   presentation
   => introduce an extra dialog/interaction, allow to stop and loop playback

 * Better distinguish shape text from shape name
   + https://bugs.documentfoundation.org/show_bug.cgi?id=151691
   + need to change the naming scheme " '': "
 or do some larger modification
   + don't see a problems here (Regina)
   + better distinguish shape text from shape name (Telesto)
   + replacing the type name with an icon or a thumbnail clutter the dialog
 too much; showing the information in multiple lines or in a tabular view
 might solve this problem - which is not relevant for many - and introduce
 other issues
   => better not change the view

 * Toolbar button for enclosing text in () brackets
   + https://bugs.documentfoundation.org/show_bug.cgi?id=151710
   + UNO command vs. autocorrect function or realize per extension
   + if possible, add as autocorrect function
 + put selected text into brackets with (), [], and {}
 + insert single character if nothing is selected
 + might be confusing that overwriting is not possible and should
   be off by default therefore
   => do it


OpenPGP_signature
Description: OpenPGP digital signature


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

2022-11-09 Thread Caolán McNamara (via logerrit)
 svtools/source/control/ctrlbox.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 9447d7dd2470693c57211be9231b4792dae9fb1b
Author: Caolán McNamara 
AuthorDate: Mon Nov 7 21:04:30 2022 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Nov 9 20:18:22 2022 +0100

Resolves: tdf#150273 use same bg as valueset

Change-Id: Idbe4bf6eaad64fdd0865a2734b4c9d0221801df9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142401
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
(cherry picked from commit c4fc1dda75fe7aefce50d77ad05319cd143e6e25)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142311
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/svtools/source/control/ctrlbox.cxx 
b/svtools/source/control/ctrlbox.cxx
index 37952f5336e2..af86920a5726 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -1617,6 +1617,8 @@ void SvtLineListBox::UpdatePreview()
 const auto nPos = (aVirDev->GetOutputSizePixel().Height() - 
aImage.GetSizePixel().Height()) / 2;
 aVirDev->Push(vcl::PushFlags::MAPMODE);
 aVirDev->SetMapMode(MapMode(MapUnit::MapPixel));
+const StyleSettings& rSettings = 
Application::GetSettings().GetStyleSettings();
+aVirDev->SetBackground(rSettings.GetFieldColor());
 aVirDev->Erase();
 aVirDev->DrawImage(Point(0, nPos), aImage);
 m_xControl->set_image(aVirDev.get());


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

2022-11-09 Thread Caolán McNamara (via logerrit)
 include/svx/svdobj.hxx  |3 ++-
 sd/source/ui/view/sdview.cxx|   24 
 svx/source/svdraw/svdotextdecomposition.cxx |4 +++-
 3 files changed, 25 insertions(+), 6 deletions(-)

New commits:
commit 76f8dbf386525ab33844a7fe71b978615247734f
Author: Caolán McNamara 
AuthorDate: Tue Nov 8 11:33:38 2022 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Nov 9 20:17:31 2022 +0100

Resolves: tdf#148140 get text auto color right in impress edit mode

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

diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 2e350c49b0f4..474f751d1c59 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -875,7 +875,8 @@ public:
 
 const css::uno::WeakReference< css::drawing::XShape >& getWeakUnoShape() 
const { return maWeakUnoShape; }
 
-void setSuitableOutlinerBg(Outliner& rOutliner) const;
+// return true if a bg was set, false otherwise
+bool setSuitableOutlinerBg(Outliner& rOutliner) const;
 // If fillstyle is drawing::FillStyle_BITMAP, returns the graphic.
 const Graphic* getFillGraphic() const;
 
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index e6173fdb9a09..f27622fd139c 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -444,6 +444,20 @@ void ViewRedirector::createRedirectedPrimitive2DSequence(
 }
 }
 
+namespace
+{
+void setOutlinerBgFromPage(::Outliner& rOutl, SdrPageView& rPgView, bool 
bScreenDisplay)
+{
+SdPage* pPage = static_cast(rPgView.GetPage());
+if (pPage)
+{
+// #i75566# Name change GetBackgroundColor -> 
GetPageBackgroundColor and
+// hint value if screen display. Only then the AutoColor 
mechanisms shall be applied
+rOutl.SetBackgroundColor(pPage->GetPageBackgroundColor(&rPgView, 
bScreenDisplay));
+}
+}
+}
+
 /**
  * The event will be forwarded to the View
  */
@@ -471,9 +485,7 @@ void View::CompleteRedraw(OutputDevice* pOutDev, const 
vcl::Region& rReg, sdr::c
 || (OUTDEV_PDF == pOutDev->GetOutDevType(
 bScreenDisplay = false;
 
-// #i75566# Name change GetBackgroundColor -> 
GetPageBackgroundColor and
-// hint value if screen display. Only then the AutoColor 
mechanisms shall be applied
-rOutl.SetBackgroundColor( pPage->GetPageBackgroundColor(pPgView, 
bScreenDisplay) );
+setOutlinerBgFromPage(rOutl, *pPgView, bScreenDisplay);
 }
 }
 
@@ -719,7 +731,11 @@ bool View::SdrBeginTextEdit(
 }
 else
 {
-pObj->setSuitableOutlinerBg(*pOL);
+// tdf#148140 Set the background to determine autocolor.
+// Use any explicit bg with fallback to underlying page if
+// none found
+if (!pObj->setSuitableOutlinerBg(*pOL) && pPV)
+setOutlinerBgFromPage(*pOL, *pPV, true);
 }
 }
 
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx 
b/svx/source/svdraw/svdotextdecomposition.cxx
index 890f59f84264..522375b1ffc3 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -861,7 +861,7 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive(
 
 // Resolves: fdo#35779 set background color of this shape as the editeng 
background if there
 // is one. Check the shape itself, then the host page, then that page's master 
page.
-void SdrObject::setSuitableOutlinerBg(::Outliner& rOutliner) const
+bool SdrObject::setSuitableOutlinerBg(::Outliner& rOutliner) const
 {
 const SfxItemSet* pBackgroundFillSet = getBackgroundFillSet();
 if (drawing::FillStyle_NONE != 
pBackgroundFillSet->Get(XATTR_FILLSTYLE).GetValue())
@@ -869,7 +869,9 @@ void SdrObject::setSuitableOutlinerBg(::Outliner& 
rOutliner) const
 Color aColor(rOutliner.GetBackgroundColor());
 GetDraftFillColor(*pBackgroundFillSet, aColor);
 rOutliner.SetBackgroundColor(aColor);
+return true;
 }
+return false;
 }
 
 const SfxItemSet* SdrObject::getBackgroundFillSet() const


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

2022-11-09 Thread László Németh (via logerrit)
 sw/qa/extras/uiwriter/data/tdf148799.docx |binary
 sw/qa/extras/uiwriter/uiwriter6.cxx   |   23 ++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |7 ++
 3 files changed, 30 insertions(+)

New commits:
commit d92c1bebb60b72a41af1e4fadccb365015d57031
Author: László Németh 
AuthorDate: Wed Nov 9 13:35:11 2022 +0100
Commit: Xisco Fauli 
CommitDate: Wed Nov 9 20:00:52 2022 +0100

tdf#148799 DOCX import: fix invalid formulas with comma

Writer formulas must contain decimal points instead of commas,
otherwise automatic update of the formulas, e.g. moving text
cursor in the table, results ** Expression is faulty ** instead
of the recalculated value. The only way to get standard
Writer formulas is to replace the commas with points in numbers
in writerfilter.

Note: only formula cells support comma localization,
but not formula fields yet, so the recalculated values show
decimal point instead of decimal comma.

Follow-up to commit 1abf4e6d07ca0ac31bc54f812df84efc82d2af1b
"DOCX import: don't throw away cached value of SwHiddenTextField ...",
see also tdf#136106.

Change-Id: Id5e6dc2b87afc4e8fda0d5c4347ba7942a8989b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142488
Tested-by: László Németh 
Reviewed-by: László Németh 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142495
Tested-by: Jenkins

diff --git a/sw/qa/extras/uiwriter/data/tdf148799.docx 
b/sw/qa/extras/uiwriter/data/tdf148799.docx
new file mode 100644
index ..280fa18c15b5
Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf148799.docx differ
diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx 
b/sw/qa/extras/uiwriter/uiwriter6.cxx
index fb3b53c179b8..5b98871bed91 100644
--- a/sw/qa/extras/uiwriter/uiwriter6.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter6.cxx
@@ -2171,6 +2171,29 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testCaptionShape)
 CPPUNIT_ASSERT_EQUAL(1, getShapes());
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf148799)
+{
+// load a document with table formulas with comman delimiter
+SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf148799.docx");
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+// check formula update
+// put cursor in the first table row
+pWrtShell->Down(/*bSelect=*/false, /*nCount=*/1);
+uno::Reference xTextTablesSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xTables(xTextTablesSupplier->getTextTables(),
+uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+uno::Reference xTextTable(xTables->getByIndex(0), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(5), xTextTable->getRows()->getCount());
+// These were "** Expression is faulty **"
+uno::Reference xCellA1(xTextTable->getCellByName("D3"), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("2.3"), xCellA1->getString());
+uno::Reference xCellA3(xTextTable->getCellByName("D4"), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("2345"), xCellA3->getString());
+uno::Reference xCellA4(xTextTable->getCellByName("D5"), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("23684.5"), xCellA4->getString());
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf151462)
 {
 createSwDoc(DATA_DIRECTORY, "tdf151462.odt");
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 990f854268a2..ca0803c53931 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -5498,6 +5498,13 @@ OUString DomainMapper_Impl::convertFieldFormula(const 
OUString& input) {
 icu::RegexMatcher rmatch6("\\b(ABOVE|BELOW|LEFT|RIGHT)\\b", usInput, 
rMatcherFlags, status);
 usInput = rmatch6.replaceAll(icu::UnicodeString(" $1 "), status);
 
+/* fix decimal separator */
+if ( m_pSettingsTable->GetDecimalSymbol() == "," )
+{
+icu::RegexMatcher rmatch7("\\b([0-9]+),([0-9]+([eE][-]?[0-9]+)?)\\b", 
usInput, rMatcherFlags, status);
+usInput = rmatch7.replaceAll(icu::UnicodeString("$1.$2"), status);
+}
+
 return OUString(usInput.getTerminatedBuffer());
 }
 


[Libreoffice-commits] core.git: include/test vcl/CppunitTest_vcl_pdfexport.mk vcl/qa

2022-11-09 Thread Xisco Fauli (via logerrit)
 include/test/unoapi_test.hxx   |3 
 vcl/CppunitTest_vcl_pdfexport.mk   |1 
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |  206 +
 3 files changed, 63 insertions(+), 147 deletions(-)

New commits:
commit 789872ad1b5916cc5b5abebe5221e80f77725445
Author: Xisco Fauli 
AuthorDate: Wed Nov 9 17:10:19 2022 +0100
Commit: Xisco Fauli 
CommitDate: Wed Nov 9 19:09:15 2022 +0100

CppunitTest_vcl_pdfexport: inherit from UnoApiTest

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

diff --git a/include/test/unoapi_test.hxx b/include/test/unoapi_test.hxx
index 8b7a6464f144..307d0f1a0589 100644
--- a/include/test/unoapi_test.hxx
+++ b/include/test/unoapi_test.hxx
@@ -52,11 +52,12 @@ protected:
 
 utl::TempFileNamed maTempFile;
 
+SvMemoryStream maMemory; // Underlying memory for parsed PDF files.
+
 private:
 bool mbSkipValidation;
 OUString m_aBaseString;
 OUString maFilterOptions;
-SvMemoryStream maMemory; // Underlying memory for parsed PDF files.
 };
 
 #endif // INCLUDED_TEST_UNOAPI_TEST_HXX
diff --git a/vcl/CppunitTest_vcl_pdfexport.mk b/vcl/CppunitTest_vcl_pdfexport.mk
index 533164c881d5..33716f5dad36 100644
--- a/vcl/CppunitTest_vcl_pdfexport.mk
+++ b/vcl/CppunitTest_vcl_pdfexport.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,vcl_pdfexport, \
cppu \
cppuhelper \
sal \
+   subsequenttest \
test \
unotest \
utl \
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 0e8c4fb05407..e5fd9c495859 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -31,8 +31,7 @@
 #include 
 #include 
 #include 
-#include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -61,61 +60,25 @@ static std::ostream& operator<<(std::ostream& rStrm, const 
Color& rColor)
 namespace
 {
 /// Tests the PDF export filter.
-class PdfExportTest : public test::BootstrapFixture, public unotest::MacrosTest
+class PdfExportTest : public UnoApiTest
 {
 protected:
-uno::Reference mxComponent;
-utl::TempFileNamed maTempFile;
-SvMemoryStream maMemory;
 utl::MediaDescriptor aMediaDescriptor;
-std::unique_ptr parseExport(const OString& 
rPassword = OString());
-std::shared_ptr mpPDFium;
 
 public:
-PdfExportTest();
-virtual void setUp() override;
-virtual void tearDown() override;
+PdfExportTest()
+: UnoApiTest("/vcl/qa/cppunit/pdfexport/data/")
+{
+}
+
 void saveAsPDF(std::u16string_view rFile);
 void load(std::u16string_view rFile, vcl::filter::PDFDocument& rDocument);
 };
 
-PdfExportTest::PdfExportTest() { maTempFile.EnableKillingFile(); }
-
-std::unique_ptr PdfExportTest::parseExport(const 
OString& rPassword)
-{
-SvFileStream aFile(maTempFile.GetURL(), StreamMode::READ);
-maMemory.WriteStream(aFile);
-std::shared_ptr pPDFium = vcl::pdf::PDFiumLibrary::get();
-std::unique_ptr pPdfDocument
-= pPDFium->openDocument(maMemory.GetData(), maMemory.GetSize(), 
rPassword);
-CPPUNIT_ASSERT(pPdfDocument);
-return pPdfDocument;
-}
-
-void PdfExportTest::setUp()
-{
-test::BootstrapFixture::setUp();
-
-mxDesktop.set(frame::Desktop::create(mxComponentContext));
-
-mpPDFium = vcl::pdf::PDFiumLibrary::get();
-}
-
-void PdfExportTest::tearDown()
-{
-if (mxComponent.is())
-mxComponent->dispose();
-
-test::BootstrapFixture::tearDown();
-}
-
-constexpr OUStringLiteral DATA_DIRECTORY = u"/vcl/qa/cppunit/pdfexport/data/";
-
 void PdfExportTest::saveAsPDF(std::u16string_view rFile)
 {
 // Import the bugdoc and export as PDF.
-OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + rFile;
-mxComponent = loadFromDesktop(aURL);
+loadFromURL(rFile);
 uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
 xStorable->storeToURL(maTempFile.GetURL(), 
aMediaDescriptor.getAsConstPropertyValueList());
 }
@@ -219,8 +182,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf105461)
 saveAsPDF(u"tdf105461.odp");
 
 // Parse the export result with pdfium.
-std::unique_ptr pPdfDocument = parseExport();
-CPPUNIT_ASSERT(pPdfDocument);
+std::unique_ptr pPdfDocument = parsePDFExport();
 
 // The document has one page.
 CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount());
@@ -252,8 +214,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf107868)
 #if !defined MACOSX && !defined _WIN32
 
 // Import the bugdoc and print to PDF.
-OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"tdf107868.odt";
-mxComponent = loadFromDesktop(aURL);
+loadFromURL(u"tdf107868.odt");
 uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
 uno::Reference xPrintable(mxComponent, uno::UNO_QUERY);
 CPPUNIT_ASSERT(xPrintable.is());
@@ -

[Libreoffice-commits] core.git: dbaccess/CppunitTest_dbaccess_firebird_test.mk dbaccess/CppunitTest_dbaccess_hsqldb_test.mk desktop/qa include/test oox/CppunitTest_oox_export.mk oox/CppunitTest_oox_ma

2022-11-09 Thread Xisco Fauli (via logerrit)
 dbaccess/CppunitTest_dbaccess_firebird_test.mk   |1 
 dbaccess/CppunitTest_dbaccess_hsqldb_test.mk |1 
 desktop/qa/desktop_lib/test_desktop_lib.cxx  |   51 ++---
 include/test/unoapi_test.hxx |4 
 oox/CppunitTest_oox_export.mk|1 
 oox/CppunitTest_oox_mathml.mk|1 
 oox/CppunitTest_oox_vml.mk   |1 
 sc/CppunitTest_sc_functionlistobj.mk |1 
 sc/common_unoapi_tests.mk|1 
 sc/qa/extras/scpdfexport.cxx |  122 +++
 sd/CppunitTest_sd_filter_eppt.mk |1 
 sd/qa/unit/SdrPdfImportTest.cxx  |8 -
 sfx2/CppunitTest_sfx2_classification.mk  |1 
 sfx2/CppunitTest_sfx2_doc.mk |1 
 sfx2/CppunitTest_sfx2_misc.mk|1 
 sfx2/CppunitTest_sfx2_view.mk|1 
 svx/CppunitTest_svx_styles.mk|1 
 svx/qa/unit/core.cxx |9 -
 svx/qa/unit/svdraw.cxx   |   11 --
 sw/qa/core/text/text.cxx |   16 +--
 sw/qa/extras/uiwriter/uiwriter2.cxx  |   13 --
 sw/qa/extras/uiwriter/uiwriter8.cxx  |8 -
 sw/qa/inc/swmodeltestbase.hxx|3 
 sw/qa/unit/swmodeltestbase.cxx   |   12 --
 test/source/unoapi_test.cxx  |   15 ++
 writerfilter/CppunitTest_writerfilter_dmapper.mk |1 
 writerfilter/CppunitTest_writerfilter_rtftok.mk  |1 
 xmloff/CppunitTest_xmloff_draw.mk|1 
 xmloff/CppunitTest_xmloff_style.mk   |1 
 xmloff/CppunitTest_xmloff_text.mk|1 
 30 files changed, 106 insertions(+), 184 deletions(-)

New commits:
commit 87dce617eb1cbbb650dda3e5dc557fa0a058e505
Author: Xisco Fauli 
AuthorDate: Wed Nov 9 14:22:09 2022 +0100
Commit: Xisco Fauli 
CommitDate: Wed Nov 9 19:08:32 2022 +0100

UnoApiTest: factor out common code

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

diff --git a/dbaccess/CppunitTest_dbaccess_firebird_test.mk 
b/dbaccess/CppunitTest_dbaccess_firebird_test.mk
index c9ca5b9bf4bb..9b7af21ff31b 100644
--- a/dbaccess/CppunitTest_dbaccess_firebird_test.mk
+++ b/dbaccess/CppunitTest_dbaccess_firebird_test.mk
@@ -24,6 +24,7 @@ $(eval $(call 
gb_CppunitTest_use_libraries,dbaccess_firebird_test, \
 subsequenttest \
 svt \
 test \
+tl \
 unotest \
 utl \
 xo \
diff --git a/dbaccess/CppunitTest_dbaccess_hsqldb_test.mk 
b/dbaccess/CppunitTest_dbaccess_hsqldb_test.mk
index 3cad59f2ad47..07b4f960b859 100644
--- a/dbaccess/CppunitTest_dbaccess_hsqldb_test.mk
+++ b/dbaccess/CppunitTest_dbaccess_hsqldb_test.mk
@@ -28,6 +28,7 @@ $(eval $(call 
gb_CppunitTest_use_libraries,dbaccess_hsqldb_test, \
 utl \
 test \
 tk \
+tl \
 unotest \
 xo \
 ))
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 2ac74ba74a87..0850a1cb884d 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -675,9 +675,7 @@ void DesktopLOKTest::testPaintTile()
 void DesktopLOKTest::testSaveAs()
 {
 LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
-utl::TempFileNamed aTempFile;
-aTempFile.EnableKillingFile();
-CPPUNIT_ASSERT(pDocument->pClass->saveAs(pDocument, 
aTempFile.GetURL().toUtf8().getStr(), "png", nullptr));
+CPPUNIT_ASSERT(pDocument->pClass->saveAs(pDocument, 
maTempFile.GetURL().toUtf8().getStr(), "png", nullptr));
 }
 
 void DesktopLOKTest::testSaveAsJsonOptions()
@@ -686,21 +684,12 @@ void DesktopLOKTest::testSaveAsJsonOptions()
 LibLODocument_Impl* pDocument = loadDoc("3page.odg");
 
 // When exporting that document to PDF, skipping the first page:
-utl::TempFileNamed aTempFile;
-aTempFile.EnableKillingFile();
 OString aOptions("{\"PageRange\":{\"type\":\"string\",\"value\":\"2-\"}}");
-CPPUNIT_ASSERT(pDocument->pClass->saveAs(pDocument, 
aTempFile.GetURL().toUtf8().getStr(), "pdf", aOptions.getStr()));
+CPPUNIT_ASSERT(pDocument->pClass->saveAs(pDocument, 
maTempFile.GetURL().toUtf8().getStr(), "pdf", aOptions.getStr()));
 
 // Then make sure the resulting PDF has 2 pages:
-SvFileStream aFile(aTempFile.GetURL(), StreamMode::READ);
-SvMemoryStream aMemory;
-aMemory.WriteStream(aFile);
-std::shared_ptr pPDFium = vcl::pdf::PDFiumLibrary::get();
-if (!pPDFium)
-return;
 std::unique_ptr pPdfDocument
-= pPDFium->openDocument(aMemory.GetData(), aMemory.GetSize(), 
OString());
-CPPUNIT_ASSERT(pPdfDocument);
+= parsePDFExport();
 // Without the accompanying fix in place, this test would have failed with:
 

[Libreoffice-commits] core.git: helpcontent2

2022-11-09 Thread Alain Romedenne (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7f8b79c21c3af20e443d487af0d40a36e611bda0
Author: Alain Romedenne 
AuthorDate: Wed Nov 9 19:16:23 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Nov 9 18:16:23 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to b13eb126bfcc3ec1ececf01d5196d26fcc14e1c2
  - Basic typo

Change-Id: I8fb221c1af3a3be26cb30f85fcb9732b2e03bcd8
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/142446
Tested-by: Jenkins
Reviewed-by: Alain Romedenne 

diff --git a/helpcontent2 b/helpcontent2
index cf59121b3e70..b13eb126bfcc 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit cf59121b3e70ffcc53436cb4d1071428d4daa391
+Subproject commit b13eb126bfcc3ec1ececf01d5196d26fcc14e1c2


[Libreoffice-commits] help.git: source/text

2022-11-09 Thread Alain Romedenne (via logerrit)
 source/text/sbasic/shared/doEvents.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b13eb126bfcc3ec1ececf01d5196d26fcc14e1c2
Author: Alain Romedenne 
AuthorDate: Wed Nov 9 19:14:28 2022 +0200
Commit: Alain Romedenne 
CommitDate: Wed Nov 9 18:16:22 2022 +0100

Basic typo

Change-Id: I8fb221c1af3a3be26cb30f85fcb9732b2e03bcd8
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/142446
Tested-by: Jenkins
Reviewed-by: Alain Romedenne 

diff --git a/source/text/sbasic/shared/doEvents.xhp 
b/source/text/sbasic/shared/doEvents.xhp
index 2900c44bf8..c95f18ec1e 100644
--- a/source/text/sbasic/shared/doEvents.xhp
+++ b/source/text/sbasic/shared/doEvents.xhp
@@ -43,7 +43,7 @@
 
 
   Sub DoEvents_example
- 
 Dim i As Long, uiDoc As Object
+ 
 Dim i As Long, ui As Object
  
 GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")
  
Set ui = CreateScriptService("SFDocuments.Calc", ThisComponent)
  
 For i = 1 To 2


[Libreoffice-commits] core.git: helpcontent2

2022-11-09 Thread Alain Romedenne (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 05f0dc93252b060fe5334ed6aa64f1f110336793
Author: Alain Romedenne 
AuthorDate: Wed Nov 9 19:12:14 2022 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Nov 9 18:12:14 2022 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to cf59121b3e70ffcc53436cb4d1071428d4daa391
  - tdf114263 DoEvents new help page

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

diff --git a/helpcontent2 b/helpcontent2
index 0e8131128326..cf59121b3e70 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 0e8131128326f9a2f8476bf3b72f9a7b45476750
+Subproject commit cf59121b3e70ffcc53436cb4d1071428d4daa391


[Libreoffice-commits] help.git: AllLangHelp_sbasic.mk source/auxiliary source/text

2022-11-09 Thread Alain Romedenne (via logerrit)
 AllLangHelp_sbasic.mk  |1 
 source/auxiliary/sbasic.tree   |1 
 source/text/sbasic/shared/doEvents.xhp |   61 +
 3 files changed, 63 insertions(+)

New commits:
commit cf59121b3e70ffcc53436cb4d1071428d4daa391
Author: Alain Romedenne 
AuthorDate: Fri Oct 28 19:21:16 2022 +0200
Commit: Alain Romedenne 
CommitDate: Wed Nov 9 18:12:11 2022 +0100

tdf114263 DoEvents new help page

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

diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk
index deab5e7f97..42de90dc28 100644
--- a/AllLangHelp_sbasic.mk
+++ b/AllLangHelp_sbasic.mk
@@ -406,6 +406,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\
 helpcontent2/source/text/sbasic/shared/CreateUnoSvcWithArgs \
 helpcontent2/source/text/sbasic/shared/conventions \
 helpcontent2/source/text/sbasic/shared/enum \
+helpcontent2/source/text/sbasic/shared/doEvents \
 helpcontent2/source/text/sbasic/shared/ErrVBA \
 helpcontent2/source/text/sbasic/shared/fragments \
 helpcontent2/source/text/sbasic/shared/partition \
diff --git a/source/auxiliary/sbasic.tree b/source/auxiliary/sbasic.tree
index 122ca55363..43f1b1eabf 100644
--- a/source/auxiliary/sbasic.tree
+++ b/source/auxiliary/sbasic.tree
@@ -137,6 +137,7 @@
   Dim 
Statement
   Dir 
Function
   Do...Loop 
Statement
+  DoEvents 
Function
   End 
Statement
   Enum Statement 
[VBA]
   Environ 
Function
diff --git a/source/text/sbasic/shared/doEvents.xhp 
b/source/text/sbasic/shared/doEvents.xhp
new file mode 100644
index 00..2900c44bf8
--- /dev/null
+++ b/source/text/sbasic/shared/doEvents.xhp
@@ -0,0 +1,61 @@
+
+
+
+
+
+DoEvents Function
+/text/sbasic/shared/doEvents.xhp
+
+
+
+
+
+
+DoEvents function
+
+
+DoEvents 
Function
+Transfers control to the 
operating system during macro execution, so that it can process the events in 
waiting.
+DoEvents provides 
compatibility with VBA. It always returns 0. Using it in %PRODUCTNAME is not 
necessary.
+
+  
+
+[Call] 
DoEvents[()] As Integer
+  
+  
+
+  Sub DoEventsExample
+ 
 Dim i As Long, sheet As Object, cell As Object
+ 
 sheet = ThisComponent.Sheets.getByIndex(0) ' sheet 1
+ 
 cell = sheet.getCellByPosition(0,0) ' cell A1
+ 
 For i = 1 To 2
+ 
 cell.setString(Str(i))
+ 
 DoEvents
+ 
 Next i
+  End Sub ' DoEventsExample
+
+
+  Sub DoEvents_example
+ 
 Dim i As Long, uiDoc As Object
+ 
 GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")
+ 
Set ui = CreateScriptService("SFDocuments.Calc", ThisComponent)
+ 
 For i = 1 To 2
+ 
 ui.SetValue("A1", i)
+ 
 DoEvents
+ 
 Next i
+ 
 ui.Dispose()
+  End Sub ' DoEvents_example
+
+   
+ 
+   
+
+
+


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

2022-11-09 Thread Julien Nabet (via logerrit)
 vcl/skia/skia_denylist_vulkan.xml |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit a0dec4bc9a48b263be182ad7bbe4ba3f8cbb27e1
Author: Julien Nabet 
AuthorDate: Wed Nov 9 13:57:08 2022 +0100
Commit: Julien Nabet 
CommitDate: Wed Nov 9 17:55:12 2022 +0100

tdf#151929: crash if video card changed (Win nVidia GTX 670)

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

diff --git a/vcl/skia/skia_denylist_vulkan.xml 
b/vcl/skia/skia_denylist_vulkan.xml
index 39163fc9a71e..8170f60febcc 100644
--- a/vcl/skia/skia_denylist_vulkan.xml
+++ b/vcl/skia/skia_denylist_vulkan.xml
@@ -36,6 +36,9 @@
 
 
 
+ 
+
+
  
 
 


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

2022-11-09 Thread Miklos Vajna (via logerrit)
 sfx2/source/doc/objserv.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit a828e6adbb334282b8405a42f20826f5924c58a2
Author: Miklos Vajna 
AuthorDate: Wed Nov 9 16:13:52 2022 +0100
Commit: Miklos Vajna 
CommitDate: Wed Nov 9 17:25:43 2022 +0100

sfx2: fix user-after-free in SfxObjectShell::ExecFile_Impl()

This happened even with an empty Writer document, on File -> Export As
-> Export Directly as PDF, since commit
1e007e8f1703851b01c68884e87c906f6bae5a5e (sw: fix merge mail to direct
export as pdf, 2022-10-18).

The problem is that SfxObjectShell::ExecFile_Impl() gets a SfxBoolItem*
returned by GetSlotState(), and then uses it before and after calling
SfxStoringHelper::GUIStoreModel(). But as part of opening the file
picker for save, ModelData_Impl::OutputFileDialog() indirectly calls
Dialog::Execute(), which starts to process user events on the main loop,
which leads to SfxItemDisruptor_Impl::Delete(), which deletes that
SfxBoolItem*.

Fix the problem by storing the bool value on the stack in
SfxObjectShell::ExecFile_Impl(), and work with that after our
SfxBoolItem* is gone.

The "freed by" backtrace from asan is cut quite early in the gtk3 case.
The "gen" case is more helpful, though it's still cut at frame 29.

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

diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 91493e2eb616..ed8c0bf81a5a 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -969,7 +969,10 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
 
 const SfxBoolItem *pItem = nId != SID_DIRECTEXPORTDOCASPDF ? 
nullptr :
 dynamic_cast( 
GetSlotState(SID_MAIL_PREPAREEXPORT) );
-if (pItem && pItem->GetValue())
+// Fetch value from the pool item early, because 
GUIStoreModel() can free the pool
+// item as part of spinning the main loop if a dialog is 
opened.
+bool bMailPrepareExport = pItem && pItem->GetValue();
+if (bMailPrepareExport)
 {
 SfxRequest aRequest(SID_MAIL_PREPAREEXPORT, 
SfxCallMode::SYNCHRON, GetPool());
 aRequest.AppendItem(SfxBoolItem(FN_PARAM_1, true));
@@ -982,7 +985,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
bPreselectPassword,
GetDocumentSignatureState() );
 
-if (pItem && pItem->GetValue())
+if (bMailPrepareExport)
 {
 SfxRequest aRequest(SID_MAIL_EXPORT_FINISHED, 
SfxCallMode::SYNCHRON, GetPool());
 ExecuteSlot(aRequest);


[Libreoffice-commits] core.git: offapi/com schema/libreoffice sw/inc sw/qa sw/source writerfilter/source xmloff/qa xmloff/source

2022-11-09 Thread Miklos Vajna (via logerrit)
 offapi/com/sun/star/text/ContentControl.idl |8 +-
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |6 +
 sw/inc/formatcontentcontrol.hxx |9 ++
 sw/inc/unoprnms.hxx |1 
 sw/qa/extras/ooxmlexport/ooxmlexport17.cxx  |1 
 sw/source/core/crsr/viscrs.cxx  |4 -
 sw/source/core/txtnode/attrcontentcontrol.cxx   |   17 +++--
 sw/source/core/unocore/unocontentcontrol.cxx|   40 
 sw/source/core/unocore/unomap1.cxx  |1 
 sw/source/filter/ww8/docxattributeoutput.cxx|2 
 sw/source/ui/misc/contentcontroldlg.cxx |2 
 sw/source/uibase/uno/unotxdoc.cxx   |2 
 sw/source/uibase/wrtsh/wrtsh1.cxx   |   13 ++-
 writerfilter/source/dmapper/DomainMapper_Impl.cxx   |6 +
 xmloff/qa/unit/data/content-control-dropdown.fodt   |2 
 xmloff/qa/unit/text.cxx |2 
 xmloff/source/text/txtparae.cxx |9 ++
 xmloff/source/text/xmlcontentcontrolcontext.cxx |   13 +++
 xmloff/source/text/xmlcontentcontrolcontext.hxx |1 
 19 files changed, 120 insertions(+), 19 deletions(-)

New commits:
commit 56db6406b0b63a2d2d99024e7c311ebd874f3893
Author: Miklos Vajna 
AuthorDate: Wed Nov 9 15:50:01 2022 +0100
Commit: Miklos Vajna 
CommitDate: Wed Nov 9 17:00:00 2022 +0100

sw content controls: allow no list items in a dropdown

- Replace SwContentControl::HasListItems(), which assumed that the type
  is dropdown if we have list items. This is not valid, it's OK to have
  a dropdown with no list items. Add a GetDropDown() instead to check
  for the type, explicitly.

- UNO API sets the dropdown bit when list items are set and the type is
  not expilcitly combo box or drop down, to keep backwards
  compatibility with existing documents.

- No change to the edit shell, SwDropDownContentControlButton already
  checked if items are empty and used STR_DROP_DOWN_EMPTY_LIST in that
  case, but that was dead code previously.

- ODT & DOCX filters are now updated, ODF has a new
   attribute to specify that
  the type is a dropdown, explicitly.

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

diff --git a/offapi/com/sun/star/text/ContentControl.idl 
b/offapi/com/sun/star/text/ContentControl.idl
index ae8a0e1a9396..7bdb39fa5101 100644
--- a/offapi/com/sun/star/text/ContentControl.idl
+++ b/offapi/com/sun/star/text/ContentControl.idl
@@ -43,8 +43,6 @@ service ContentControl
 [optional, property] string UncheckedState;
 
 /** List items of a dropdown: DisplayText + Value pairs with string values 
for each item.
-
-If the list is non-empty, a dropdown control is provided on the UI.
 */
 [optional, property] sequence< sequence< 
com::sun::star::beans::PropertyValue > > ListItems;
 
@@ -100,6 +98,12 @@ service ContentControl
 */
 [optional, property] boolean ComboBox;
 
+/** Drop-down that does not allow free-form text, i.e. not combo box.
+
+@since LibreOffice 7.5
+*/
+[optional, property] boolean DropDown;
+
 /** The alias: kind of a human-readable title / description, show up on 
the UI.
 
 @since LibreOffice 7.5
diff --git a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng 
b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
index d475e90319b4..3b2e0d4b2bbc 100644
--- a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
+++ b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
@@ -2992,6 +2992,12 @@ 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.
   
 
   
+  
+
+
+  
+
+  
   
 
   
diff --git a/sw/inc/formatcontentcontrol.hxx b/sw/inc/formatcontentcontrol.hxx
index adbc4c10a3e6..2d5676a1e3dd 100644
--- a/sw/inc/formatcontentcontrol.hxx
+++ b/sw/inc/formatcontentcontrol.hxx
@@ -152,6 +152,9 @@ class SW_DLLPUBLIC SwContentControl : public 
sw::BroadcastingModify
 /// Same as drop-down, but free-form input is also accepted.
 bool m_bComboBox = false;
 
+/// Same as combo box, but free-form input is not accepted.
+bool m_bDropDown = false;
+
 /// The placeholder's doc part: just remembered.
 OUString m_aPlaceholderDocPart;
 
@@ -234,8 +237,6 @@ public:
 
 const std::vector& GetListItems() const { return 
m_aListItems; }
 
-bool HasListItems() const { return !m_aListItems.empty(); }
-
 void SetListItems(const std::vector& rListItems)
 {
 m_aListItems = rListItems;
@@

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

2022-11-09 Thread Caolán McNamara (via logerrit)
 vcl/source/graphic/UnoGraphicProvider.cxx |6 +++---
 vcl/source/helper/commandinfoprovider.cxx |   11 ---
 2 files changed, 7 insertions(+), 10 deletions(-)

New commits:
commit cb8a05bfccf77d5217f4f2e20b5898d6a24f990d
Author: Caolán McNamara 
AuthorDate: Wed Nov 9 12:34:06 2022 +
Commit: Caolán McNamara 
CommitDate: Wed Nov 9 16:37:09 2022 +0100

Related: tdf#151898 set origin for implLoadRepositoryImage XGraphics

like we do when we get one from Image so we can treat these with the
same shortcuts we do for Image to have the option to pass the
underlying svg data to the final widget it ends up in

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

diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx 
b/vcl/source/graphic/UnoGraphicProvider.cxx
index 1f33a14ea1bc..f0e0d12e7895 100644
--- a/vcl/source/graphic/UnoGraphicProvider.cxx
+++ b/vcl/source/graphic/UnoGraphicProvider.cxx
@@ -143,7 +143,6 @@ uno::Reference< ::graphic::XGraphic > 
GraphicProvider::implLoadMemory( std::u16s
 return xRet;
 }
 
-
 uno::Reference< ::graphic::XGraphic > 
GraphicProvider::implLoadRepositoryImage( std::u16string_view rResourceURL )
 {
 uno::Reference< ::graphic::XGraphic >   xRet;
@@ -154,13 +153,14 @@ uno::Reference< ::graphic::XGraphic > 
GraphicProvider::implLoadRepositoryImage(
 BitmapEx aBitmap;
 if ( vcl::ImageRepository::loadImage( OUString(sPathName), aBitmap ) )
 {
-xRet = Graphic(aBitmap).GetXGraphic();
+Graphic aGraphic(aBitmap);
+aGraphic.setOriginURL(OUString(rResourceURL));
+xRet = aGraphic.GetXGraphic();
 }
 }
 return xRet;
 }
 
-
 uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadStandardImage( 
std::u16string_view rResourceURL )
 {
 uno::Reference< ::graphic::XGraphic >   xRet;
commit b2cde58886c8a08fe240f74af6c4f257c15d2835
Author: Caolán McNamara 
AuthorDate: Wed Nov 9 11:36:40 2022 +
Commit: Caolán McNamara 
CommitDate: Wed Nov 9 16:36:54 2022 +0100

don't need to ctor and assign, just ctor

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

diff --git a/vcl/source/helper/commandinfoprovider.cxx 
b/vcl/source/helper/commandinfoprovider.cxx
index 5c280bb663c3..eb964b34b8ee 100644
--- a/vcl/source/helper/commandinfoprovider.cxx
+++ b/vcl/source/helper/commandinfoprovider.cxx
@@ -360,10 +360,9 @@ Reference GetXGraphicForCommand(const 
OUString& rsCommandName
 Reference 
xDocUICfgMgr(xSupplier->getUIConfigurationManager());
 Reference 
xDocImgMgr(xDocUICfgMgr->getImageManager(), UNO_QUERY);
 
-Sequence< Reference > aGraphicSeq;
 Sequence aImageCmdSeq { rsCommandName };
 
-aGraphicSeq = xDocImgMgr->getImages( nImageType, aImageCmdSeq );
+Sequence> aGraphicSeq = 
xDocImgMgr->getImages(nImageType, aImageCmdSeq);
 Reference xGraphic = aGraphicSeq[0];
 if (xGraphic.is())
 return xGraphic;
@@ -373,17 +372,15 @@ Reference GetXGraphicForCommand(const 
OUString& rsCommandName
 {
 }
 
-try {
+try
+{
 Reference 
xModuleCfgMgrSupplier(GetModuleConfigurationSupplier());
 Reference 
xUICfgMgr(xModuleCfgMgrSupplier->getUIConfigurationManager(GetModuleIdentifier(rxFrame)));
-
-Sequence< Reference > aGraphicSeq;
 Reference 
xModuleImageManager(xUICfgMgr->getImageManager(), UNO_QUERY);
 
 Sequence aImageCmdSeq { rsCommandName };
 
-aGraphicSeq = xModuleImageManager->getImages(nImageType, aImageCmdSeq);
-
+Sequence> aGraphicSeq = 
xModuleImageManager->getImages(nImageType, aImageCmdSeq);
 Reference xGraphic(aGraphicSeq[0]);
 
 return xGraphic;


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

2022-11-09 Thread László Németh (via logerrit)
 sw/qa/extras/uiwriter/data/tdf148799.docx |binary
 sw/qa/extras/uiwriter/uiwriter8.cxx   |   31 ++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |7 
 3 files changed, 38 insertions(+)

New commits:
commit 94bf4908a6661101c270ef647e33dde09f16ac08
Author: László Németh 
AuthorDate: Wed Nov 9 13:35:11 2022 +0100
Commit: László Németh 
CommitDate: Wed Nov 9 16:34:48 2022 +0100

tdf#148799 DOCX import: fix invalid formulas with comma

Writer formulas must contain decimal points instead of commas,
otherwise automatic update of the formulas, e.g. moving text
cursor in the table, results ** Expression is faulty ** instead
of the recalculated value. The only way to get standard
Writer formulas is to replace the commas with points in numbers
in writerfilter.

Note: only formula cells support comma localization,
but not formula fields yet, so the recalculated values show
decimal point instead of decimal comma.

Follow-up to commit 1abf4e6d07ca0ac31bc54f812df84efc82d2af1b
"DOCX import: don't throw away cached value of SwHiddenTextField ...",
see also tdf#136106.

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

diff --git a/sw/qa/extras/uiwriter/data/tdf148799.docx 
b/sw/qa/extras/uiwriter/data/tdf148799.docx
new file mode 100644
index ..280fa18c15b5
Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf148799.docx differ
diff --git a/sw/qa/extras/uiwriter/uiwriter8.cxx 
b/sw/qa/extras/uiwriter/uiwriter8.cxx
index dbb1d4fda678..674747b6c0d7 100644
--- a/sw/qa/extras/uiwriter/uiwriter8.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter8.cxx
@@ -1382,6 +1382,37 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf146573)
 CPPUNIT_ASSERT_EQUAL(OUString("204"), xCellA4->getString());
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf148799)
+{
+// load a document with table formulas with comman delimiter
+SwDoc* pDoc = createSwDoc("tdf148799.docx");
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+// check formula update
+
+// put cursor in the first table row
+pWrtShell->Down(/*bSelect=*/false, /*nCount=*/1);
+
+uno::Reference xTextTablesSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xTables(xTextTablesSupplier->getTextTables(),
+uno::UNO_QUERY);
+
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+
+uno::Reference xTextTable(xTables->getByIndex(0), 
uno::UNO_QUERY);
+
+CPPUNIT_ASSERT_EQUAL(sal_Int32(5), xTextTable->getRows()->getCount());
+
+// These were "** Expression is faulty **"
+
+uno::Reference xCellA1(xTextTable->getCellByName("D3"), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("2.3"), xCellA1->getString());
+uno::Reference xCellA3(xTextTable->getCellByName("D4"), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("2345"), xCellA3->getString());
+uno::Reference xCellA4(xTextTable->getCellByName("D5"), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("23684.5"), xCellA4->getString());
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf148849)
 {
 // load a document with a table and an empty paragraph before the table
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index b5afddc7a494..0e436fe165b9 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -5552,6 +5552,13 @@ OUString DomainMapper_Impl::convertFieldFormula(const 
OUString& input) {
 icu::RegexMatcher rmatch6("\\b(ABOVE|BELOW|LEFT|RIGHT)\\b", usInput, 
rMatcherFlags, status);
 usInput = rmatch6.replaceAll(icu::UnicodeString(" $1 "), status);
 
+/* fix decimal separator */
+if ( m_pSettingsTable->GetDecimalSymbol() == "," )
+{
+icu::RegexMatcher rmatch7("\\b([0-9]+),([0-9]+([eE][-]?[0-9]+)?)\\b", 
usInput, rMatcherFlags, status);
+usInput = rmatch7.replaceAll(icu::UnicodeString("$1.$2"), status);
+}
+
 return OUString(usInput.getTerminatedBuffer());
 }
 


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

2022-11-09 Thread Balazs Varga (via logerrit)
 sc/source/filter/xml/xmlrowi.cxx |   29 +++--
 1 file changed, 27 insertions(+), 2 deletions(-)

New commits:
commit ba59e8e3544190f4c1464d2ce18b1386c0d8a678
Author: Balazs Varga 
AuthorDate: Tue Oct 11 09:43:20 2022 +0200
Commit: Eike Rathke 
CommitDate: Wed Nov 9 16:34:03 2022 +0100

tdf#124098: sc, ods import: do not recalculate row heights

if we have already optimal heights in the xml, because it is
not necessary and it takes a lot of time loading a file.

Citing here for completeness:
a) if there is no height attribute and the "use_optimal-row-height"
attribute is set then calculate the row height

b) if there is a height attribute just use it and do not recalculate.

Maybe TODO for later: optimize row height calculation more in sc

Change-Id: I9d964aad744970e5d36f239c0ce39ce98c00f273
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141204
Tested-by: Jenkins
Tested-by: Balazs Varga 
Reviewed-by: Balazs Varga 
(cherry picked from commit e8fae4d0fb2994a7b4ac00e9da35e1deccb296dd)
(cherry picked from commit b57307e8f3553fcb292c9c11fcf58bcef3a6cb3c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141317
Reviewed-by: Eike Rathke 

diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx
index fc6a3a7c36c4..d510d5557eed 100644
--- a/sc/source/filter/xml/xmlrowi.cxx
+++ b/sc/source/filter/xml/xmlrowi.cxx
@@ -21,6 +21,7 @@
 #include "xmlimprt.hxx"
 #include "xmlcelli.hxx"
 #include "xmlstyli.hxx"
+#include "xmlstyle.hxx"
 #include 
 #include 
 #include 
@@ -28,6 +29,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -166,6 +168,8 @@ void SAL_CALL 
ScXMLTableRowContext::endFastElement(sal_Int32 /*nElement*/)
 if (!xRowProperties.is())
 return;
 
+XMLTableStyleContext* ptmpStyle = nullptr;
+
 if (!sStyleName.isEmpty())
 {
 XMLTableStylesContext *pStyles(static_cast(rXMLImport.GetAutoStyles()));
@@ -183,6 +187,9 @@ void SAL_CALL 
ScXMLTableRowContext::endFastElement(sal_Int32 /*nElement*/)
 pSheetData->AddRowStyle( sStyleName, ScAddress( 0, 
static_cast(nFirstRow), nSheet ) );
 pStyle->SetLastSheet(nSheet);
 }
+
+// for later checking of optimal row height
+ptmpStyle = pStyle;
 }
 }
 }
@@ -209,14 +216,32 @@ void SAL_CALL 
ScXMLTableRowContext::endFastElement(sal_Int32 /*nElement*/)
 any >>= bOptionalHeight;
 if (bOptionalHeight)
 {
-// Save this row for later height update
+// Save this row for later height update, only if we have no already 
optimal row heights
+// If we have already optimal row heights, recalc only the first 200 
row in case of optimal document loading
 std::vector& rRecalcRanges = 
rXMLImport.GetRecalcRowRanges();
 while (static_cast(rRecalcRanges.size()) <= nSheet)
 {
 rRecalcRanges.emplace_back(0, pDoc->MaxRow());
 }
 rRecalcRanges.at(nSheet).mnTab = nSheet;
-rRecalcRanges.at(nSheet).maRanges.setTrue(nFirstRow, nCurrentRow);
+
+// check that, we already have valid optimal row heights
+if (nCurrentRow > 200 && ptmpStyle && 
!ptmpStyle->FindProperty(CTF_SC_ROWHEIGHT))
+{
+XMLPropertyState* pOptimalHeight = 
ptmpStyle->FindProperty(CTF_SC_ROWOPTIMALHEIGHT);
+if (pOptimalHeight && ::cppu::any2bool(pOptimalHeight->maValue))
+{
+rRecalcRanges.at(nSheet).maRanges.setFalse(nFirstRow, 
nCurrentRow);
+}
+else
+{
+rRecalcRanges.at(nSheet).maRanges.setTrue(nFirstRow, 
nCurrentRow);
+}
+}
+else
+{
+rRecalcRanges.at(nSheet).maRanges.setTrue(nFirstRow, nCurrentRow);
+}
 }
 }
 


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

2022-11-09 Thread Caolán McNamara (via logerrit)
 sc/source/filter/excel/xlstyle.cxx |   10 --
 sc/source/filter/inc/xlstyle.hxx   |2 --
 2 files changed, 4 insertions(+), 8 deletions(-)

New commits:
commit 61fb619b43534e47c5d3fbc125257b0e48499213
Author: Caolán McNamara 
AuthorDate: Tue Nov 8 09:53:26 2022 +
Commit: Eike Rathke 
CommitDate: Wed Nov 9 16:29:43 2022 +0100

tdf#122188 border colors should be the same regardless of the desktop theme

Change-Id: Ifc0297135981b315ce8646e0ca2fe8a899d49f32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142423
Tested-by: Jenkins
Reviewed-by: Eike Rathke 
(cherry picked from commit 2e97f7596c2d933e87391a5648341f885975c51b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142481

diff --git a/sc/source/filter/excel/xlstyle.cxx 
b/sc/source/filter/excel/xlstyle.cxx
index 886a3a657617..ae4a6f1f6f37 100644
--- a/sc/source/filter/excel/xlstyle.cxx
+++ b/sc/source/filter/excel/xlstyle.cxx
@@ -94,8 +94,6 @@ XclDefaultPalette::XclDefaultPalette( const XclRoot& rRoot ) :
 mnTableSize( 0 )
 {
 const StyleSettings& rSett = Application::GetSettings().GetStyleSettings();
-mnWindowText = rSett.GetWindowTextColor();
-mnWindowBack = rSett.GetWindowColor();
 mnFaceColor = rSett.GetFaceColor();
 // Don't use the system HelpBack and HelpText colours as it causes problems
 // with modern gnome. This is because mnNoteText and mnNoteBack are used
@@ -147,12 +145,12 @@ Color XclDefaultPalette::GetDefColor( sal_uInt16 
nXclIndex ) const
 else switch( nXclIndex )
 {
 case EXC_COLOR_WINDOWTEXT3:
-case EXC_COLOR_WINDOWTEXT:  nColor = mnWindowText;  break;
-case EXC_COLOR_WINDOWBACK3:
-case EXC_COLOR_WINDOWBACK:  nColor = mnWindowBack;  break;
-case EXC_COLOR_BUTTONBACK:  nColor = mnFaceColor;   break;
+case EXC_COLOR_WINDOWTEXT:
 case EXC_COLOR_CHWINDOWTEXT:nColor = COL_BLACK; break;
+case EXC_COLOR_WINDOWBACK3:
+case EXC_COLOR_WINDOWBACK:
 case EXC_COLOR_CHWINDOWBACK:nColor = COL_WHITE; break;
+case EXC_COLOR_BUTTONBACK:  nColor = mnFaceColor;   break;
 case EXC_COLOR_CHBORDERAUTO:nColor = COL_BLACK; break;  // 
TODO: really always black?
 case EXC_COLOR_NOTEBACK:nColor = mnNoteBack;break;
 case EXC_COLOR_NOTETEXT:nColor = mnNoteText;break;
diff --git a/sc/source/filter/inc/xlstyle.hxx b/sc/source/filter/inc/xlstyle.hxx
index 69f4f9dabc15..098d2d3346b8 100644
--- a/sc/source/filter/inc/xlstyle.hxx
+++ b/sc/source/filter/inc/xlstyle.hxx
@@ -263,8 +263,6 @@ public:
 
 private:
 const Color*mpnColorTable;  /// The table with RGB values.
-Color   mnWindowText;   /// System window text color.
-Color   mnWindowBack;   /// System window background color.
 Color   mnFaceColor;/// System button background color.
 Color   mnNoteText; /// Note text color.
 Color   mnNoteBack; /// Note background color.


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

2022-11-09 Thread Rafael Lima (via logerrit)
 svtools/source/control/ruler.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit aa8a8b36b73304431bacd7ed0f8803de8dfffe3e
Author: Rafael Lima 
AuthorDate: Tue Oct 18 18:43:59 2022 +0200
Commit: Rafael Lima 
CommitDate: Wed Nov 9 16:07:13 2022 +0100

tdf#151519 Make ticks in ruler visible again

As reported by the user, the ticks in the ruler are no longer visible. This 
patch draws them using the shadow color.

Tested with: gen, gtk3 and kf5

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

diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 340d29b27cfc..6ddac0ccd7d3 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -417,6 +417,7 @@ void Ruler::ImplInvertLines(vcl::RenderContext& 
rRenderContext)
 
 void Ruler::ImplDrawTicks(vcl::RenderContext& rRenderContext, tools::Long 
nMin, tools::Long nMax, tools::Long nStart, tools::Long nTop, tools::Long 
nBottom)
 {
+const StyleSettings& rStyleSettings = 
rRenderContext.GetSettings().GetStyleSettings();
 double nCenter = nTop + ((nBottom - nTop) / 2);
 
 tools::Long nTickLength3 = (nBottom - nTop) * 0.5;
@@ -523,7 +524,7 @@ void Ruler::ImplDrawTicks(vcl::RenderContext& 
rRenderContext, tools::Long nMin,
 }
 else
 {
-
rRenderContext.SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetShadowColor());
+rRenderContext.SetLineColor(rStyleSettings.GetShadowColor());
 }
 
 if (bNoTicks)
@@ -576,6 +577,7 @@ void Ruler::ImplDrawTicks(vcl::RenderContext& 
rRenderContext, tools::Long nMin,
 double aStep = nTick / nTick4;
 double aRest = std::abs(aStep - std::floor(aStep));
 double nAcceptanceDelta = 0.0001;
+rRenderContext.SetFillColor(rStyleSettings.GetShadowColor());
 
 if (aRest < nAcceptanceDelta)
 {


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

2022-11-09 Thread Rafael Lima (via logerrit)
 cui/inc/strings.hrc|2 ++
 cui/source/options/optlanguagetool.cxx |   25 +++--
 cui/source/options/optlanguagetool.hxx |3 +++
 3 files changed, 28 insertions(+), 2 deletions(-)

New commits:
commit 2c8a760a18501acaa6e4ff2a2dee76b0bad275f1
Author: Rafael Lima 
AuthorDate: Thu Nov 3 14:52:13 2022 +0200
Commit: Rafael Lima 
CommitDate: Wed Nov 9 16:06:12 2022 +0100

tdf#150494 LanguageTool: Add placeholder text with default value info

With this patch, the Language Tool dialog works as follows:

- The first time the tool is enabled, a default URL is entered as text

- If the URL is left empty, a placeholder text is shown saying that leaving 
this entry empty will cause the default URL to be used

- If another URL is defined by the user, than this is the one used

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

diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc
index cea0b183e33a..b4b232b9ac5d 100644
--- a/cui/inc/strings.hrc
+++ b/cui/inc/strings.hrc
@@ -403,4 +403,6 @@
 #define RID_CUISTR_ZIPFAIL  NC_("RID_CUISTR_ZIPFAIL", 
"Creation of ZIP file failed.")
 #define RID_CUISTR_SAVEDNC_("RID_CUISTR_SAVED", 
"The results have been successfully saved in the file 
'GraphicTestResults.zip'!")
 
+#define RID_LANGUAGETOOL_LEAVE_EMPTY
NC_("RID_LANGUAGETOOL_LEAVE_EMPTY", "Leave this field empty to use the free 
version")
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optlanguagetool.cxx 
b/cui/source/options/optlanguagetool.cxx
index 38807bc337d3..309ff2a09b52 100644
--- a/cui/source/options/optlanguagetool.cxx
+++ b/cui/source/options/optlanguagetool.cxx
@@ -20,6 +20,8 @@
 #include "optlanguagetool.hxx"
 #include 
 #include 
+#include 
+#include 
 
 OptLanguageToolTabPage::OptLanguageToolTabPage(weld::Container* pPage,
weld::DialogController* 
pController,
@@ -34,6 +36,11 @@ 
OptLanguageToolTabPage::OptLanguageToolTabPage(weld::Container* pPage,
 m_xActivateBox->connect_toggled(LINK(this, OptLanguageToolTabPage, 
CheckHdl));
 SvxLanguageToolOptions& rLanguageOpts = SvxLanguageToolOptions::Get();
 EnableControls(rLanguageOpts.getEnabled());
+
+// tdf#150494 Set default values as placeholder text
+m_xBaseURLED->set_placeholder_text(CuiResId(RID_LANGUAGETOOL_LEAVE_EMPTY));
+
m_xUsernameED->set_placeholder_text(CuiResId(RID_LANGUAGETOOL_LEAVE_EMPTY));
+m_xApiKeyED->set_placeholder_text(CuiResId(RID_LANGUAGETOOL_LEAVE_EMPTY));
 }
 
 OptLanguageToolTabPage::~OptLanguageToolTabPage() {}
@@ -54,7 +61,14 @@ IMPL_LINK_NOARG(OptLanguageToolTabPage, CheckHdl, 
weld::Toggleable&, void)
 void OptLanguageToolTabPage::Reset(const SfxItemSet*)
 {
 SvxLanguageToolOptions& rLanguageOpts = SvxLanguageToolOptions::Get();
-m_xBaseURLED->set_text(rLanguageOpts.getBaseURL());
+
+// tdf#150494 If no URL has been set, use the default URL
+OUString aBaseURL = rLanguageOpts.getBaseURL();
+if (aBaseURL.isEmpty())
+m_xBaseURLED->set_text(LANGUAGETOOL_DEFAULT_URL);
+else
+m_xBaseURLED->set_text(rLanguageOpts.getBaseURL());
+
 m_xUsernameED->set_text(rLanguageOpts.getUsername());
 m_xApiKeyED->set_text(rLanguageOpts.getApiKey());
 }
@@ -62,7 +76,14 @@ void OptLanguageToolTabPage::Reset(const SfxItemSet*)
 bool OptLanguageToolTabPage::FillItemSet(SfxItemSet*)
 {
 SvxLanguageToolOptions& rLanguageOpts = SvxLanguageToolOptions::Get();
-rLanguageOpts.setBaseURL(m_xBaseURLED->get_text());
+
+// tdf#150494 If no URL has been set, then save the default URL
+OUString aBaseURL = m_xBaseURLED->get_text();
+if (aBaseURL.isEmpty())
+rLanguageOpts.setBaseURL(LANGUAGETOOL_DEFAULT_URL);
+else
+rLanguageOpts.setBaseURL(aBaseURL);
+
 rLanguageOpts.setUsername(m_xUsernameED->get_text());
 rLanguageOpts.setApiKey(m_xApiKeyED->get_text());
 return false;
diff --git a/cui/source/options/optlanguagetool.hxx 
b/cui/source/options/optlanguagetool.hxx
index 46a60ecbe103..8ee83ed4e367 100644
--- a/cui/source/options/optlanguagetool.hxx
+++ b/cui/source/options/optlanguagetool.hxx
@@ -18,6 +18,9 @@
  */
 #pragma once
 #include 
+#include 
+
+inline constexpr OUStringLiteral LANGUAGETOOL_DEFAULT_URL = 
u"https://api.languagetool.org/v2";;
 
 class OptLanguageToolTabPage : public SfxTabPage
 {


[Libreoffice-commits] core.git: Branch 'private/tvajngerl/staging' - 162 commits - basctl/source basegfx/CppunitTest_basegfx.mk basegfx/test basic/source chart2/qa chart2/source chart2/uiconfig .clang

2022-11-09 Thread Tomaž Vajngerl (via logerrit)
Rebased ref, commits from common ancestor:
commit 98d609d4bba69815d0e972ee61383694372b32e4
Author: Tomaž Vajngerl 
AuthorDate: Wed Oct 26 20:21:37 2022 +0200
Commit: Tomaž Vajngerl 
CommitDate: Thu Nov 10 00:02:41 2022 +0900

svx: change PaperInfo to return gfx::Length paper sizes

Change-Id: Ie99a748ab9282893a852278be9793f7379522541

diff --git a/editeng/source/items/paperinf.cxx 
b/editeng/source/items/paperinf.cxx
index 86401e63f387..130e7c020a41 100644
--- a/editeng/source/items/paperinf.cxx
+++ b/editeng/source/items/paperinf.cxx
@@ -39,6 +39,12 @@ Size SvxPaperInfo::GetPaperSize( Paper ePaper, MapUnit eUnit 
)
 : OutputDevice::LogicToLogic(aRet, MapMode(MapUnit::Map100thMM), 
MapMode(eUnit));
 }
 
+gfx::Size2DL SvxPaperInfo::getPaperSize(Paper ePaper)
+{
+PaperInfo aInfo(ePaper);
+return { gfx::Length::hmm(aInfo.getWidth()), 
gfx::Length::hmm(aInfo.getHeight()) };
+}
+
 /*
  Description:   Return the paper size of the printer, aligned to our
 own sizes. If no Printer is set in the system, A4 portrait
@@ -108,6 +114,12 @@ Size SvxPaperInfo::GetDefaultPaperSize( MapUnit eUnit )
 : OutputDevice::LogicToLogic(aRet, MapMode(MapUnit::Map100thMM), 
MapMode(eUnit));
 }
 
+gfx::Size2DL SvxPaperInfo::getDefaultPaperSize()
+{
+PaperInfo aInfo(PaperInfo::getSystemDefaultPaper());
+return { gfx::Length::hmm(aInfo.getWidth()), 
gfx::Length::hmm(aInfo.getHeight()) };
+}
+
 /*
  Description:   String representation for the SV-defines of paper size
 */
diff --git a/include/editeng/paperinf.hxx b/include/editeng/paperinf.hxx
index 2ccc8fbf96fa..20bc1441ba74 100644
--- a/include/editeng/paperinf.hxx
+++ b/include/editeng/paperinf.hxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 // forward ---
@@ -42,6 +43,9 @@ public:
 static PaperGetSvxPaper( const Size &rSize, MapUnit eUnit );
 static tools::Long GetSloppyPaperDimension( tools::Long nSize );
 static OUString GetName( Paper ePaper );
+
+static gfx::Size2DL getPaperSize(Paper ePaper);
+static gfx::Size2DL getDefaultPaperSize();
 };
 
 // INLINE -
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index c9b38f1bbebf..c1a238f72c0f 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -371,6 +371,13 @@ public:
 , maLower(0_emu)
 {}
 
+Border(gfx::Length const& nLeft, gfx::Length const& nUpper, gfx::Length 
const& nRight, gfx::Length const& nLower)
+: maLeft(nLeft)
+, maRight(nRight)
+, maUpper(nUpper)
+, maLower(nLower)
+{}
+
 gfx::Length const& getLeft() const { return maLeft; }
 gfx::Length const& getRight() const { return maRight; }
 gfx::Length const& getUpper() const { return maUpper; }
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index a14e4382a8e0..4b8f8360e6ac 100644
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -499,7 +499,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument const 
* pRefDocument /* =
 return;
 
 // #i57181# Paper size depends on Language, like in Writer
-Size aDefSize = SvxPaperInfo::GetDefaultPaperSize( MapUnit::Map100thMM );
+gfx::Size2DL aDefaultSize = SvxPaperInfo::getDefaultPaperSize();
 
 // Insert handout page
 rtl::Reference pHandoutPage = AllocSdPage(false);
@@ -516,8 +516,8 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument const 
* pRefDocument /* =
 }
 else
 {
-pHandoutPage->setSize(gfx::length::fromSizeHmm(aDefSize));
-pHandoutPage->SetBorder(0, 0, 0, 0);
+pHandoutPage->setSize(aDefaultSize);
+pHandoutPage->setBorder(svx::Border());
 }
 
 pHandoutPage->SetPageKind(PageKind::Handout);
@@ -553,7 +553,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument const 
* pRefDocument /* =
 else if (meDocType == DocumentType::Draw)
 {
 // Draw: always use default size with margins
-pPage->setSize(gfx::length::fromSizeHmm(aDefSize));
+pPage->setSize(aDefaultSize);
 
 SfxPrinter* pPrinter = mpDocSh->GetPrinter(false);
 if (pPrinter && pPrinter->IsValid())
@@ -563,12 +563,12 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument 
const * pRefDocument /* =
 aPageOffset -= pPrinter->PixelToLogic( Point() );
 ::tools::Long nOffset = !aPageOffset.X() && !aPageOffset.Y() ? 
0 : PRINT_OFFSET;
 
-sal_uLong nTop= aPageOffset.Y();
-sal_uLong nLeft   = aPageOffset.X();
-sal_uLong nBottom = std::max(::tool

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

2022-11-09 Thread Paris Oplopoios (via logerrit)
 sc/source/filter/excel/xestream.cxx |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit 95cb9a01bfacf7d9f03194b0710ca3c249bb62fb
Author: Paris Oplopoios 
AuthorDate: Wed Nov 9 13:43:46 2022 +0200
Commit: Jan Holesovsky 
CommitDate: Wed Nov 9 16:01:13 2022 +0100

Get ScViewData through the current doc shell in headless mode

When using --convert-to, ScDocShell::GetViewData() would return nullptr
so we now get the ScViewData through an alternative route.

Change-Id: Ie71a4a1077b3c63c0aadd394fc0d966e679e8803
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142480
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky 

diff --git a/sc/source/filter/excel/xestream.cxx 
b/sc/source/filter/excel/xestream.cxx
index 0ee697dfeba8..33e6fa2a8838 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -56,6 +56,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
@@ -1050,6 +1051,16 @@ bool XclExpXmlStream::exportDocument()
 // Get the viewsettings before processing
 if( ScDocShell::GetViewData() )
 ScDocShell::GetViewData()->WriteExtOptions( mpRoot->GetExtDocOptions() 
);
+else
+{
+// Try to get ScViewData through the current ScDocShell
+ScTabViewShell* pTabViewShell = pShell->GetBestViewShell( false );
+if ( pTabViewShell )
+{
+ScViewData* pViewData = &pTabViewShell->GetViewData();
+pViewData->WriteExtOptions( mpRoot->GetExtDocOptions() );
+}
+}
 
 OUString const workbook = "xl/workbook.xml";
 const char* pWorkbookContentType = nullptr;


[Libreoffice-commits] core.git: filter/CppunitTest_filter_pdf.mk filter/qa

2022-11-09 Thread Xisco Fauli (via logerrit)
 filter/CppunitTest_filter_pdf.mk |1 
 filter/qa/pdf.cxx|   41 ---
 2 files changed, 18 insertions(+), 24 deletions(-)

New commits:
commit 7f6fd2bc9157c1f72ff04507986aee75ff6a1969
Author: Xisco Fauli 
AuthorDate: Wed Nov 9 14:10:59 2022 +0100
Commit: Xisco Fauli 
CommitDate: Wed Nov 9 15:24:00 2022 +0100

CppunitTest_filter_pdf: inherit from UnoApiTest

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

diff --git a/filter/CppunitTest_filter_pdf.mk b/filter/CppunitTest_filter_pdf.mk
index b85bbf45437c..e551ae6b9d07 100644
--- a/filter/CppunitTest_filter_pdf.mk
+++ b/filter/CppunitTest_filter_pdf.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_CppunitTest_use_libraries,filter_pdf, \
 cppu \
 cppuhelper \
 sal \
+subsequenttest \
 test \
 tl \
 unotest \
diff --git a/filter/qa/pdf.cxx b/filter/qa/pdf.cxx
index 29129f2b08f2..601f62a16bdb 100644
--- a/filter/qa/pdf.cxx
+++ b/filter/qa/pdf.cxx
@@ -7,8 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include 
-#include 
+#include 
 
 #include 
 #include 
@@ -28,35 +27,32 @@ using namespace ::com::sun::star;
 namespace
 {
 /// Covers filter/source/pdf/ fixes.
-class Test : public test::BootstrapFixture, public unotest::MacrosTest
+class Test : public UnoApiTest
 {
-private:
-uno::Reference mxComponent;
-
 public:
+Test()
+: UnoApiTest("/filter/qa/data/")
+{
+}
+
 void setUp() override;
 void tearDown() override;
-uno::Reference& getComponent() { return mxComponent; }
 };
 
 void Test::setUp()
 {
-test::BootstrapFixture::setUp();
-MacrosTest::setUpNssGpg(m_directories, "filter_pdf");
+UnoApiTest::setUp();
 
-mxDesktop.set(frame::Desktop::create(mxComponentContext));
+MacrosTest::setUpNssGpg(m_directories, "filter_pdf");
 }
 
 void Test::tearDown()
 {
-if (mxComponent.is())
-mxComponent->dispose();
+MacrosTest::tearDownNssGpg();
 
-test::BootstrapFixture::tearDown();
+UnoApiTest::tearDown();
 }
 
-constexpr OUStringLiteral DATA_DIRECTORY = u"/filter/qa/data/";
-
 CPPUNIT_TEST_FIXTURE(Test, testSignCertificateSubjectName)
 {
 std::shared_ptr pPDFium = vcl::pdf::PDFiumLibrary::get();
@@ -83,15 +79,14 @@ CPPUNIT_TEST_FIXTURE(Test, testSignCertificateSubjectName)
 }
 
 // Given an empty document:
-getComponent().set(
-loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument"));
+mxComponent.set(loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument"));
 
 // When exporting to PDF, and referring to a certificate using a subject 
name:
 uno::Reference xFactory = 
getMultiServiceFactory();
 uno::Reference xFilter(
 xFactory->createInstance("com.sun.star.document.PDFFilter"), 
uno::UNO_QUERY);
 uno::Reference xExporter(xFilter, uno::UNO_QUERY);
-xExporter->setSourceDocument(getComponent());
+xExporter->setSourceDocument(mxComponent);
 SvMemoryStream aStream;
 uno::Reference xOutputStream(new 
utl::OStreamWrapper(aStream));
 
@@ -118,18 +113,16 @@ CPPUNIT_TEST_FIXTURE(Test, testPdfDecompositionSize)
 return;
 
 // Given an empty Writer document:
-getComponent().set(
-loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument"));
+mxComponent.set(loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument"));
 
 // When inserting a 267 points wide PDF image into the document:
 uno::Sequence aArgs = {
-comphelper::makePropertyValue("FileName",
-  
m_directories.getURLFromSrc(DATA_DIRECTORY) + "picture.pdf"),
+comphelper::makePropertyValue("FileName", 
createFileURL(u"picture.pdf")),
 };
-dispatchCommand(getComponent(), ".uno:InsertGraphic", aArgs);
+dispatchCommand(mxComponent, ".uno:InsertGraphic", aArgs);
 
 // Then make sure that its size is correct:
-uno::Reference 
xDrawPageSupplier(getComponent(), uno::UNO_QUERY);
+uno::Reference xDrawPageSupplier(mxComponent, 
uno::UNO_QUERY);
 uno::Reference xDrawPage = 
xDrawPageSupplier->getDrawPage();
 uno::Reference xShape(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
 auto xGraphic = 
xShape->getPropertyValue("Graphic").get>();


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

2022-11-09 Thread Szymon Kłos (via logerrit)
 vcl/source/control/edit.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit ef7afe7859af21f3e851fefa4448de4c8df77805
Author: Szymon Kłos 
AuthorDate: Fri Oct 21 12:11:06 2022 +0200
Commit: Szymon Kłos 
CommitDate: Wed Nov 9 14:23:50 2022 +0100

jsdialog: send edit  widget's type information

Change-Id: I878603e18c2c0ac8b1e9a9ff7995b6c640e455b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141619
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142471
Tested-by: Jenkins

diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index a072a42ec467..d58decb6fedd 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2941,6 +2941,9 @@ void Edit::DumpAsPropertyTree(tools::JsonWriter& 
rJsonWriter)
 
 if (!maPlaceholderText.isEmpty())
 rJsonWriter.put("placeholder", maPlaceholderText);
+
+if (IsPassword())
+rJsonWriter.put("password", true);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2022-11-09 Thread Szymon Kłos (via logerrit)
 svx/source/svdraw/svdpntv.cxx |   29 -
 1 file changed, 16 insertions(+), 13 deletions(-)

New commits:
commit 2c700bfaa646fea37f55d7873bce9e35940b1abc
Author: Szymon Kłos 
AuthorDate: Thu Aug 25 10:44:51 2022 +0200
Commit: Szymon Kłos 
CommitDate: Wed Nov 9 14:23:27 2022 +0100

lok: masterpage: don't render text edits from different mode

In Impress we can have 2 different EditMode : Page and MasterPage.
Don't render text edits from other views in Page mode on Master Page.

Change-Id: I62341941215165281d2663af3d3b7cca034762a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138803
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142470
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 4047d4974fb4..4145229b0027 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -641,28 +641,31 @@ void SdrPaintView::EndCompleteRedraw(SdrPaintWindow& 
rPaintWindow, bool bPaintFo
 // look for active TextEdit. As long as this cannot be painted to a 
VDev,
 // it cannot get part of buffering. In that case, output evtl. 
prerender
 // early and paint text edit to window.
-if(IsTextEdit() && GetSdrPageView())
+SdrPageView* pPageView = GetSdrPageView();
+if(IsTextEdit() && pPageView)
 {
 if (!comphelper::LibreOfficeKit::isActive() || mbPaintTextEdit)
 static_cast< SdrView* >(this)->TextEditDrawing(rPaintWindow);
 }
 
-if (comphelper::LibreOfficeKit::isActive())
+if (comphelper::LibreOfficeKit::isActive() && mbPaintTextEdit && 
pPageView)
 {
 // Look for active text edits in other views showing the same page,
-// and show them as well.
-if (SdrPageView* pPageView = GetSdrPageView())
+// and show them as well. Show only if Page/MasterPage mode is 
matching.
+SdrViewIter aIter(pPageView->GetPage());
+bool bRequireMasterPage = pPageView->GetPage() ? 
pPageView->GetPage()->IsMasterPage() : false;
+for (SdrView* pView = aIter.FirstView(); pView; pView = 
aIter.NextView())
 {
-SdrViewIter aIter(pPageView->GetPage());
-for (SdrView* pView = aIter.FirstView(); pView; pView = 
aIter.NextView())
-{
-if (pView == this)
-continue;
+SdrPageView* pCurrentPageView = pView->GetSdrPageView();
+bool bIsCurrentMasterPage = (pCurrentPageView && 
pCurrentPageView->GetPage()) ?
+pCurrentPageView->GetPage()->IsMasterPage() : false;
 
-if (pView->IsTextEdit() && pView->GetSdrPageView())
-{
-pView->TextEditDrawing(rPaintWindow);
-}
+if (pView == this || bRequireMasterPage != 
bIsCurrentMasterPage)
+continue;
+
+if (pView->IsTextEdit() && pView->GetSdrPageView())
+{
+pView->TextEditDrawing(rPaintWindow);
 }
 }
 }


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

2022-11-09 Thread Andrea Gelmini (via logerrit)
 sd/source/ui/dlg/sdtreelb.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 8d8d2017de6b2de503ff1e386740d940cd29ee5a
Author: Andrea Gelmini 
AuthorDate: Wed Nov 9 12:25:09 2022 +0100
Commit: Julien Nabet 
CommitDate: Wed Nov 9 14:09:59 2022 +0100

Remove duplicated include

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

diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 0c0e5df03245..5a090a83391b 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -53,7 +53,6 @@
 #include 
 #include 
 
-#include 
 #include 
 
 using namespace com::sun::star;


[Libreoffice-commits] core.git: configure.ac

2022-11-09 Thread Jan Holesovsky (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e50cffea75456551382445c28fdd4cabd9c2e81b
Author: Jan Holesovsky 
AuthorDate: Wed Nov 9 12:23:25 2022 +0100
Commit: Jan Holesovsky 
CommitDate: Wed Nov 9 13:17:52 2022 +0100

Clarify the cairo warning in ./configure

To know what to expect.

Change-Id: Ia660a1ebdbb76c04aa96934cabc16e1cbfc4cfd1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142478
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky 

diff --git a/configure.ac b/configure.ac
index 0fa69d60a292..08c2ac634b71 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11774,7 +11774,7 @@ GTK3_LIBS=""
 ENABLE_GTKTILEDVIEWER=""
 if test "$test_gtk3" = yes -a "x$enable_gtk3" = "xyes" -o "x$enable_gtk3_kde5" 
= "xyes"; then
 if test "$with_system_cairo" = no; then
-add_warning 'Non-system cairo combined with gtk3 is assumed to cause 
trouble; proceed at your own risk.'
+add_warning 'Non-system cairo combined with gtk3 is known to cause 
trouble (eg. broken image in the splashscreen). Use --with-system-cairo unless 
you know what you are doing.'
 fi
 : ${with_system_cairo:=yes}
 PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.20 gtk+-unix-print-3.0 
gmodule-no-export-2.0 glib-2.0 >= 2.38 atk >= 2.28.1 cairo)


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

2022-11-09 Thread Miklos Vajna (via logerrit)
 offapi/UnoApi_offapi.mk   |2 
 offapi/com/sun/star/text/ContentControls.idl  |   39 ++
 offapi/com/sun/star/text/GenericTextDocument.idl  |3 
 offapi/com/sun/star/text/XContentControlsSupplier.idl |   36 +
 sw/inc/textcontentcontrol.hxx |3 
 sw/inc/unotxdoc.hxx   |6 +
 sw/qa/core/unocore/unocore.cxx|   50 
 sw/source/core/inc/unocontentcontrol.hxx  |   24 ++
 sw/source/core/txtnode/attrcontentcontrol.cxx |   19 
 sw/source/core/unocore/unocontentcontrol.cxx  |   70 ++
 sw/source/uibase/uno/unotxdoc.cxx |   20 +
 11 files changed, 272 insertions(+)

New commits:
commit 6b419811d46966e556e05024d240d050947ebb81
Author: Miklos Vajna 
AuthorDate: Tue Nov 8 16:45:00 2022 +0100
Commit: Miklos Vajna 
CommitDate: Wed Nov 9 13:09:01 2022 +0100

sw: introduce an UNO manager for content controls

This builds on top of commit ad950f10dc382ea169f94a0c301ca8c424e7103e
(sw: introduce a manager for content controls, 2022-11-08) and exposes
it on the UNO API:

- add a new css.text.ContentControls service, backed by 
SwContentControlManager

- add a new css.text.XContentControlsSupplier interface, implemented by
  SwXTextDocument

- implement XIndexAccess in ContentControls

This allows UNO (and later VBA) clients to have random access to the
content controls in a document, which is much easier than the relatively
complex traversal of the whole doc model.

(cherry picked from commit a8448ded947925b0e9ddb4aeea7043f03933)

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

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 65d28d7bc1de..b3eabdb25023 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -1347,6 +1347,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles_noheader,offapi,com/sun/star/text,\
ChainedTextFrame \
ChapterNumberingRule \
ContentControl \
+   ContentControls \
ContentIndex \
ContentIndexMark \
Defaults \
@@ -3784,6 +3785,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/text,\
XAutoTextGroup \
XBookmarkInsertTool \
XBookmarksSupplier \
+   XContentControlsSupplier \
XChapterNumberingSupplier \
XDefaultNumberingProvider \
XDependentTextField \
diff --git a/offapi/com/sun/star/text/ContentControls.idl 
b/offapi/com/sun/star/text/ContentControls.idl
new file mode 100644
index ..d544b4ee767f
--- /dev/null
+++ b/offapi/com/sun/star/text/ContentControls.idl
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+ module com {  module sun {  module star {  module text {
+
+/** provides access to the content controls of a (text)
+document.
+
+@since LibreOffice 7.5
+ */
+service ContentControls
+{
+
+/** provides access to the content controls of the document.
+ */
+interface com::sun::star::container::XIndexAccess;
+
+};
+
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/text/GenericTextDocument.idl 
b/offapi/com/sun/star/text/GenericTextDocument.idl
index f242f9979e02..d9c848d7bd7f 100644
--- a/offapi/com/sun/star/text/GenericTextDocument.idl
+++ b/offapi/com/sun/star/text/GenericTextDocument.idl
@@ -84,6 +84,9 @@ published service GenericTextDocument
 
 [optional] interface com::sun::star::text::XEndnotesSupplier;
 
+/** @since LibreOffice 7.5 */
+[optional] interface com::sun::star::text::XContentControlsSupplier;
+
 [optional] interface com::sun::star::util::XReplaceable;
 
 [optional] interface com::sun::star::text::XPagePrintable;
diff --git a/offapi/com/sun/star/text/XContentControlsSupplier.idl 
b/offapi/com/sun/star/text/XContentControl

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

2022-11-09 Thread Caolán McNamara (via logerrit)
 sc/source/filter/excel/xlstyle.cxx |8 
 sc/source/filter/inc/xlstyle.hxx   |4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit ba9780ab214b725122b211b5a9545ba0f8d5b430
Author: Caolán McNamara 
AuthorDate: Mon Nov 7 12:55:33 2022 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Nov 9 13:05:41 2022 +0100

tdf#151610 chart colors should be the same regardless of the desktop theme

Change-Id: I47ae80f744401bd13452ec8879cb8f420e35b9ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142383
Tested-by: Jenkins
Reviewed-by: Eike Rathke 
(cherry picked from commit f8ad054de38a6592b60ab850e938e6e81ec4cc0d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142310
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sc/source/filter/excel/xlstyle.cxx 
b/sc/source/filter/excel/xlstyle.cxx
index b5de24df06a4..886a3a657617 100644
--- a/sc/source/filter/excel/xlstyle.cxx
+++ b/sc/source/filter/excel/xlstyle.cxx
@@ -147,12 +147,12 @@ Color XclDefaultPalette::GetDefColor( sal_uInt16 
nXclIndex ) const
 else switch( nXclIndex )
 {
 case EXC_COLOR_WINDOWTEXT3:
-case EXC_COLOR_WINDOWTEXT:
-case EXC_COLOR_CHWINDOWTEXT:nColor = mnWindowText;  break;
+case EXC_COLOR_WINDOWTEXT:  nColor = mnWindowText;  break;
 case EXC_COLOR_WINDOWBACK3:
-case EXC_COLOR_WINDOWBACK:
-case EXC_COLOR_CHWINDOWBACK:nColor = mnWindowBack;  break;
+case EXC_COLOR_WINDOWBACK:  nColor = mnWindowBack;  break;
 case EXC_COLOR_BUTTONBACK:  nColor = mnFaceColor;   break;
+case EXC_COLOR_CHWINDOWTEXT:nColor = COL_BLACK; break;
+case EXC_COLOR_CHWINDOWBACK:nColor = COL_WHITE; break;
 case EXC_COLOR_CHBORDERAUTO:nColor = COL_BLACK; break;  // 
TODO: really always black?
 case EXC_COLOR_NOTEBACK:nColor = mnNoteBack;break;
 case EXC_COLOR_NOTETEXT:nColor = mnNoteText;break;
diff --git a/sc/source/filter/inc/xlstyle.hxx b/sc/source/filter/inc/xlstyle.hxx
index 3581f77f0162..69f4f9dabc15 100644
--- a/sc/source/filter/inc/xlstyle.hxx
+++ b/sc/source/filter/inc/xlstyle.hxx
@@ -207,8 +207,8 @@ const sal_uInt16 EXC_COLOR_WINDOWBACK3  = 25;   /// 
System window backgr
 const sal_uInt16 EXC_COLOR_WINDOWTEXT   = 64;   /// System window text 
color (>=BIFF5).
 const sal_uInt16 EXC_COLOR_WINDOWBACK   = 65;   /// System window 
background color (>=BIFF5).
 const sal_uInt16 EXC_COLOR_BUTTONBACK   = 67;   /// System button 
background color (face color).
-const sal_uInt16 EXC_COLOR_CHWINDOWTEXT = 77;   /// System window text 
color (BIFF8 charts).
-const sal_uInt16 EXC_COLOR_CHWINDOWBACK = 78;   /// System window 
background color (BIFF8 charts).
+const sal_uInt16 EXC_COLOR_CHWINDOWTEXT = 77;   /// Chart window text 
color (BIFF8 charts).
+const sal_uInt16 EXC_COLOR_CHWINDOWBACK = 78;   /// Chart window 
background color (BIFF8 charts).
 const sal_uInt16 EXC_COLOR_CHBORDERAUTO = 79;   /// Automatic frame 
border for series (BIFF8 charts).
 const sal_uInt16 EXC_COLOR_NOTEBACK = 80;   /// Note background 
color.
 const sal_uInt16 EXC_COLOR_NOTETEXT = 81;   /// Note text color.


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

2022-11-09 Thread Noel Grandin (via logerrit)
 vcl/inc/win/salinst.h   |1 +
 vcl/win/app/salinst.cxx |9 +
 2 files changed, 10 insertions(+)

New commits:
commit 4ff2ee082c5de428d3426005023e7362cb75200d
Author: Noel Grandin 
AuthorDate: Tue Nov 8 09:49:30 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Nov 9 12:26:01 2022 +0100

give main thread on Windows a name

to make it easier to find in profilers and debuggers

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

diff --git a/vcl/inc/win/salinst.h b/vcl/inc/win/salinst.h
index c62a68ae0455..35f2365fb166 100644
--- a/vcl/inc/win/salinst.h
+++ b/vcl/inc/win/salinst.h
@@ -43,6 +43,7 @@ public:
 WinSalInstance();
 virtual ~WinSalInstance() override;
 
+virtual void AfterAppInit() override;
 virtual SalFrame*   CreateChildFrame( SystemParentData* pParent, 
SalFrameStyleFlags nStyle ) override;
 virtual SalFrame*   CreateFrame( SalFrame* pParent, SalFrameStyleFlags 
nStyle ) override;
 virtual voidDestroyFrame( SalFrame* pFrame ) override;
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index b903247d2d85..5ba2f9cd50e6 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -458,6 +458,15 @@ WinSalInstance::~WinSalInstance()
 #endif
 }
 
+void WinSalInstance::AfterAppInit()
+{
+// (1) Ideally this would be done at the place that creates the thread, but 
since this thread is normally
+// just the default/main thread, that is not possible.
+// (2) Don't do this on unix, where it causes tools like pstree on Linux to
+// confusingly report soffice.bin as VCL Main instead.
+osl_setThreadName("VCL Main");
+}
+
 static LRESULT ImplSalDispatchMessage( const MSG* pMsg )
 {
 SalData* pSalData = GetSalData();


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

2022-11-09 Thread Caolán McNamara (via logerrit)
 sw/source/filter/ww8/ww8par.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 6da092245a0c61223c8fd0d4b2bd183ae3342a55
Author: Caolán McNamara 
AuthorDate: Wed Nov 9 09:31:49 2022 +
Commit: Caolán McNamara 
CommitDate: Wed Nov 9 11:57:51 2022 +0100

ofz#53154 Timeout

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

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 1d38928e0689..dca389d937a8 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -3636,6 +3636,7 @@ bool SwWW8ImplReader::ReadChar(tools::Long nPosCp, 
tools::Long nCpOfs)
 switch (nWCharVal)
 {
 case 0:
+if (!m_bFuzzing)
 {
 // Page number
 SwPageNumberField aField(
@@ -3643,6 +3644,11 @@ bool SwWW8ImplReader::ReadChar(tools::Long nPosCp, 
tools::Long nCpOfs)
 SwFieldIds::PageNumber )), PG_RANDOM, SVX_NUM_ARABIC);
 m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, 
SwFormatField(aField));
 }
+else
+{
+// extremely slow, so skip for fuzzing, and insert a space 
instead
+cInsert = ' ';
+}
 break;
 case 0xe:
 // if there is only one column word treats a column break like a 
pagebreak.


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

2022-11-09 Thread Caolán McNamara (via logerrit)
 slideshow/source/engine/tools.cxx |   30 +-
 1 file changed, 21 insertions(+), 9 deletions(-)

New commits:
commit d39303f7ea696d36c4ab65286d4b7d8d1bb9069a
Author: Caolán McNamara 
AuthorDate: Tue Nov 8 16:02:14 2022 +
Commit: Caolán McNamara 
CommitDate: Wed Nov 9 11:57:31 2022 +0100

Resolves: tdf#148884 impress slideshow uses white text on white in dark mode

In dark mode impress's auto text color assumes it will render against
the DOCCOLOR by default, so leaving this as white gives white on white,
this looks the simplest approach, propogate DOCCOLOR as the default
slideshow background instead of reformatting to render onto a white
slideshow

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

diff --git a/slideshow/source/engine/tools.cxx 
b/slideshow/source/engine/tools.cxx
index 3567fa5c146b..d48bda952462 100644
--- a/slideshow/source/engine/tools.cxx
+++ b/slideshow/source/engine/tools.cxx
@@ -42,6 +42,8 @@
 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 
@@ -688,19 +690,29 @@ namespace slideshow::internal
rSize.getY() ),
   0x00FFU );
 
-// fill the bounds rectangle in white. Subtract one pixel
-// from both width and height, because the slide size is
-// chosen one pixel larger than given by the drawing
-// layer. This is because shapes with line style, that
-// have the size of the slide would otherwise be cut
-// off. OTOH, every other slide background (solid fill,
-// gradient, bitmap) render one pixel less, thus revealing
-// ugly white pixel to the right and the bottom.
+// tdf#148884 in dark mode impress's auto text color assumes it 
will render against
+// the DOCCOLOR by default, so leaving this as white gives white 
on white, this
+// looks the simplest approach, propogate dark mode into slideshow 
mode instead
+// of reformatting to render onto a white slideshow
+svtools::ColorConfig aColorConfig;
+Color aApplicationDocumentColor = 
aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor;
+cppcanvas::IntSRGBA nCanvasColor = 
cppcanvas::makeColor(aApplicationDocumentColor.GetRed(),
+
aApplicationDocumentColor.GetGreen(),
+
aApplicationDocumentColor.GetBlue(),
+0xFF);
+
+// fill the bounds rectangle in DOCCOLOR (typically white).
+// Subtract one pixel from both width and height, because the slide
+// size is chosen one pixel larger than given by the drawing layer.
+// This is because shapes with line style, that have the size of
+// the slide would otherwise be cut off. OTOH, every other slide
+// background (solid fill, gradient, bitmap) render one pixel less,
+// thus revealing ugly white pixel to the right and the bottom.
 fillRect( pCanvas,
   ::basegfx::B2DRectangle( 0.0, 0.0,
rSize.getX()-1,
rSize.getY()-1 ),
-  0xU );
+  nCanvasColor );
 }
 
 ::basegfx::B2DRectangle getAPIShapeBounds( const uno::Reference< 
drawing::XShape >& xShape )


End-thread

2022-11-09 Thread Jan Holesovsky
Hi Amit,

I'm sorry you feel that way.

Either way, this mailing list is for technical discussions, so please
let's end this thread now, before people start offending each other
even more.

If you reconsider your position, happy to review your patches of
course.

All the best,
Kendy

A píše v St 09. 11. 2022 v 15:57 +0530:
> 
> Don't tell me where to contribute. I will decide that myself.
> 
> My patches are there in linux kernel. I am happy contributing to
> linux kernel.
> 
> As long as MS Office is in existence, libreoffice will be considered
> a failure.
> 
> I didn't hate libreoffice earlier but now I hate libreoffice because
> of egoist people like you.
> 
> Amit
> 
> 
> On Wed, Nov 9, 2022, 3:49 PM Tor Lillqvist  wrote:
> > Dear Amit, I suggest you contribute to Apache OpenOffice instead.
> > They
> > are a much more welcoming bunch, and you will share the hate of
> > LibreOffice! They are eager to welcome new contributors.
> > 
> > --tml



[Libreoffice-commits] core.git: include/test sw/CppunitTest_sw_core_accessibilitycheck.mk sw/CppunitTest_sw_core_attr.mk sw/CppunitTest_sw_core_crsr.mk sw/CppunitTest_sw_core_doc.mk sw/CppunitTest_sw_

2022-11-09 Thread Xisco Fauli (via logerrit)
 include/test/unoapi_test.hxx |2 
 sw/CppunitTest_sw_core_accessibilitycheck.mk |1 
 sw/CppunitTest_sw_core_attr.mk   |1 
 sw/CppunitTest_sw_core_crsr.mk   |1 
 sw/CppunitTest_sw_core_doc.mk|1 
 sw/CppunitTest_sw_core_docnode.mk|1 
 sw/CppunitTest_sw_core_draw.mk   |1 
 sw/CppunitTest_sw_core_edit.mk   |1 
 sw/CppunitTest_sw_core_fields.mk |1 
 sw/CppunitTest_sw_core_frmedt.mk |1 
 sw/CppunitTest_sw_core_layout.mk |1 
 sw/CppunitTest_sw_core_objectpositioning.mk  |1 
 sw/CppunitTest_sw_core_text.mk   |1 
 sw/CppunitTest_sw_core_tox.mk|1 
 sw/CppunitTest_sw_core_txtnode.mk|1 
 sw/CppunitTest_sw_core_undo.mk   |1 
 sw/CppunitTest_sw_core_unocore.mk|1 
 sw/CppunitTest_sw_core_view.mk   |1 
 sw/CppunitTest_sw_docbookexport.mk   |1 
 sw/CppunitTest_sw_filter_html.mk |1 
 sw/CppunitTest_sw_filter_ww8.mk  |1 
 sw/CppunitTest_sw_filters_test.mk|1 
 sw/CppunitTest_sw_filters_test2.mk   |1 
 sw/CppunitTest_sw_fodfexport.mk  |1 
 sw/CppunitTest_sw_globalfilter.mk|1 
 sw/CppunitTest_sw_htmlexport.mk  |1 
 sw/CppunitTest_sw_htmlimport.mk  |1 
 sw/CppunitTest_sw_indexingexport.mk  |1 
 sw/CppunitTest_sw_mailmerge.mk   |1 
 sw/CppunitTest_sw_mailmerge2.mk  |1 
 sw/CppunitTest_sw_odfexport.mk   |1 
 sw/CppunitTest_sw_odfexport2.mk  |1 
 sw/CppunitTest_sw_odfimport.mk   |1 
 sw/CppunitTest_sw_ooxmlexport8.mk|1 
 sw/CppunitTest_sw_ooxmlimport.mk |1 
 sw/CppunitTest_sw_ooxmlimport2.mk|1 
 sw/CppunitTest_sw_rtfimport.mk   |1 
 sw/CppunitTest_sw_tiledrendering.mk  |1 
 sw/CppunitTest_sw_txtencexport.mk|1 
 sw/CppunitTest_sw_txtexport.mk   |1 
 sw/CppunitTest_sw_txtimport.mk   |1 
 sw/CppunitTest_sw_uibase_dochdl.mk   |1 
 sw/CppunitTest_sw_uibase_docvw.mk|1 
 sw/CppunitTest_sw_uibase_fldui.mk|1 
 sw/CppunitTest_sw_uibase_frmdlg.mk   |1 
 sw/CppunitTest_sw_uibase_shells.mk   |1 
 sw/CppunitTest_sw_uibase_uiview.mk   |1 
 sw/CppunitTest_sw_uibase_uno.mk  |1 
 sw/CppunitTest_sw_uibase_wrtsh.mk|1 
 sw/CppunitTest_sw_unowriter.mk   |1 
 sw/CppunitTest_sw_ww8import.mk   |1 
 sw/CppunitTest_sw_xhtmlexport.mk |1 
 sw/Library_swqahelper.mk |1 
 sw/layoutwriter_setup.mk |1 
 sw/ooxmlexport_setup.mk  |1 
 sw/qa/inc/swmodeltestbase.hxx|   34 ---
 sw/qa/unit/swmodeltestbase.cxx   |   60 ++-
 sw/rtfexport_setup.mk|1 
 sw/uiwriter_setup.mk |1 
 sw/ww8export_setup.mk|1 
 test/source/unoapi_test.cxx  |   21 +
 61 files changed, 85 insertions(+), 89 deletions(-)

New commits:
commit 4170b94c443b3bd68b4cc75b8c344ecca3c249b0
Author: Xisco Fauli 
AuthorDate: Tue Nov 8 18:27:05 2022 +0100
Commit: Xisco Fauli 
CommitDate: Wed Nov 9 11:34:05 2022 +0100

SwModelTestBase: inherit from UnoApiXmlTest

it seems setUp/tearDown can also go as well.
See the discussion in gerrit.

Change-Id: I5e81dcdcb2e070eb4beb737f3cb25c86cb9d042b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142465
Tested-by: Xisco Fauli 
Reviewed-by: Xisco Fauli 

diff --git a/include/test/unoapi_test.hxx b/include/test/unoapi_test.hxx
index 90fc65ef6d08..ede9734776ad 100644
--- a/include/test/unoapi_test.hxx
+++ b/include/test/unoapi_test.hxx
@@ -36,7 +36,7 @@ public:
 css::uno::Any executeMacro(const OUString& rScriptURL,
const css::uno::Sequence& 
rParams = {});
 
-void save(const OUString& rFilter);
+void save(const OUString& rFilter, const char* pPassword = nullptr);
 void saveAndClose(const OUString& rFilter);
 void saveAndReload(const OUString& rFilter);
 
diff --git a/sw/CppunitTest_sw_core_accessibilitycheck.mk 
b/sw/CppunitTest_sw_core_accessibilitycheck.mk
index 1780c7c4bfc9..7cfa8b79770b 100644
--- a/sw/CppunitTest_sw_core_accessibilitycheck.mk
+++ b/sw/CppunitTest_sw_core_accessibilitycheck.mk
@@ -24,6 +24,7 @@ $(eval $(call 
gb_CppunitTest_use_libraries,sw_core_accessibilitycheck, \
 sal \
 svx \
 sfx \
+subsequenttest \
 sw \
swqahelper \
 test \
diff --git a/sw/CppunitTest_sw_core_attr.mk b/sw/CppunitTest_sw_core_attr.mk
index 7

Re: Wanted to contribute to libreoffice but decided not to after I got abused by some list members because I offered a suggestion which they didn't like.

2022-11-09 Thread A
Don't tell me where to contribute. I will decide that myself.

My patches are there in linux kernel. I am happy contributing to linux
kernel.

As long as MS Office is in existence, libreoffice will be considered a
failure.

I didn't hate libreoffice earlier but now I hate libreoffice because of
egoist people like you.

Amit


On Wed, Nov 9, 2022, 3:49 PM Tor Lillqvist  wrote:

> Dear Amit, I suggest you contribute to Apache OpenOffice instead. They
> are a much more welcoming bunch, and you will share the hate of
> LibreOffice! They are eager to welcome new contributors.
>
> --tml
>


[Libreoffice-commits] core.git: drawinglayer/Library_drawinglayercore.mk drawinglayer/source

2022-11-09 Thread Caolán McNamara (via logerrit)
 drawinglayer/Library_drawinglayercore.mk   |1 +
 drawinglayer/source/geometry/viewinformation2d.cxx |   10 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit d1e02f58a21dd745a54ae93114a56cfdda0c
Author: Caolán McNamara 
AuthorDate: Wed Nov 9 09:12:59 2022 +
Commit: Caolán McNamara 
CommitDate: Wed Nov 9 11:20:04 2022 +0100

ofz#53151 Abrt

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

diff --git a/drawinglayer/Library_drawinglayercore.mk 
b/drawinglayer/Library_drawinglayercore.mk
index 7ec954416a23..2eb24a40182d 100644
--- a/drawinglayer/Library_drawinglayercore.mk
+++ b/drawinglayer/Library_drawinglayercore.mk
@@ -37,6 +37,7 @@ $(eval $(call gb_Library_use_libraries,drawinglayercore,\
 salhelper \
 svl \
 tl \
+utl \
 ))
 
 $(eval $(call gb_Library_use_custom_headers,drawinglayercore,\
diff --git a/drawinglayer/source/geometry/viewinformation2d.cxx 
b/drawinglayer/source/geometry/viewinformation2d.cxx
index d23dda648bed..7e0240690a68 100644
--- a/drawinglayer/source/geometry/viewinformation2d.cxx
+++ b/drawinglayer/source/geometry/viewinformation2d.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 using namespace com::sun::star;
@@ -224,9 +225,12 @@ ViewInformation2D::ViewInformation2D()
 if (!bForwardsAreInitialized)
 {
 bForwardsAreInitialized = true;
-bForwardedAntiAliasing = 
officecfg::Office::Common::Drawinglayer::AntiAliasing::get();
-bForwardPixelSnapHairline
-= 
officecfg::Office::Common::Drawinglayer::SnapHorVerLinesToDiscrete::get();
+if (!utl::ConfigManager::IsFuzzing())
+{
+bForwardedAntiAliasing = 
officecfg::Office::Common::Drawinglayer::AntiAliasing::get();
+bForwardPixelSnapHairline
+= 
officecfg::Office::Common::Drawinglayer::SnapHorVerLinesToDiscrete::get();
+}
 }
 
 setUseAntiAliasing(bForwardedAntiAliasing);


Re: Wanted to contribute to libreoffice but decided not to after I got abused by some list members because I offered a suggestion which they didn't like.

2022-11-09 Thread Tor Lillqvist
Dear Amit, I suggest you contribute to Apache OpenOffice instead. They
are a much more welcoming bunch, and you will share the hate of
LibreOffice! They are eager to welcome new contributors.

--tml


Re: Wanted to contribute to libreoffice but decided not to after I got abused by some list members because I offered a suggestion which they didn't like.

2022-11-09 Thread A
Ha ha ha...libreoffice people are not going to learn...now, I will never
contribute to libreoffice.

I abused that guy because I got abused first.

You just picked one line. You should read the whole thread.

By the way, now I will say - fuck libreoffice.

By the way, many people in this world don't like libreoffice. If
libreoffice were that good then it would have swept the world and MS Office
would have gone extinct.

Fuck libreoffice.

Amit


On Wed, Nov 9, 2022, 3:38 PM Ilmari Lauhakangas <
ilmari.lauhakan...@libreoffice.org> wrote:

> On 9.11.2022 11.47, A wrote:
> > I wanted to contribute to libreoffice but decided not to after I got
> > abused by some list members because I offered a suggestion which they
> > didn't like.
>
> That's not how things went down, though. You told a developer to fuck
> off:
> https://lists.freedesktop.org/archives/libreoffice/2022-March/088664.html
>
> Ilmari
>


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

2022-11-09 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 33e6d65d917e2e9bb8749e506df25d892cf5
Author: Caolán McNamara 
AuthorDate: Fri Sep 30 11:20:28 2022 +0100
Commit: Michael Stahl 
CommitDate: Wed Nov 9 11:11:08 2022 +0100

gtk_tree_model_get_iter: assertion 'path->depth > 0' failed

seen in format, cells in calc

try an explicit depth

Change-Id: I395563d2b412b2ca8839292296f9dad6db704620
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140797
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 0c2d5312071a2de2ef2a9bdb997b8b8d4a91e9b4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142417
Reviewed-by: Michael Stahl 

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 886375486336..13c0a254a9a0 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -14950,7 +14950,7 @@ public:
 gtk_tree_view_scroll_to_cell(m_pTreeView, path, nullptr, false, 0, 
0);
 }
 else
-path = gtk_tree_path_new();
+path = gtk_tree_path_new_from_indices(G_MAXINT, -1);
 gtk_tree_view_set_cursor(m_pTreeView, path, nullptr, false);
 gtk_tree_path_free(path);
 enable_notify_events();
@@ -20840,7 +20840,7 @@ private:
 GtkTreePath* path;
 if (pos == -1)
 {
-path = gtk_tree_path_new();
+path = gtk_tree_path_new_from_indices(G_MAXINT, -1);
 
gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(m_pTreeView));
 if (m_pCellView)
 gtk_cell_view_set_displayed_row(m_pCellView, nullptr);


Re: Wanted to contribute to libreoffice but decided not to after I got abused by some list members because I offered a suggestion which they didn't like.

2022-11-09 Thread Ilmari Lauhakangas

On 9.11.2022 11.47, A wrote:

I wanted to contribute to libreoffice but decided not to after I got
abused by some list members because I offered a suggestion which they
didn't like.


That's not how things went down, though. You told a developer to fuck 
off: 
https://lists.freedesktop.org/archives/libreoffice/2022-March/088664.html


Ilmari


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

2022-11-09 Thread Miklos Vajna (via logerrit)
 vcl/source/window/mouse.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 7a7c76bb1e135b6de242e9fbd4b3b34adf3fc0ad
Author: Miklos Vajna 
AuthorDate: Mon Nov 7 10:48:06 2022 +0100
Commit: Caolán McNamara 
CommitDate: Wed Nov 9 10:58:41 2022 +0100

vcl: fix crash in Window::LeaveWait()

Crashreport signature:

SIG   Fatal signal received: SIGSEGV code: 128 for address: 0x0
program/libmergedlo.so
vcl::Window::LeaveWait()
vcl/source/window/mouse.cxx:640
program/../program/libsclo.so
ScSpellingEngine::ShowTableWrapDialog()
sc/source/ui/view/spelleng.cxx:315
program/libsclo.so
ScConversionEngineBase::FindNextConversionCell()
sc/source/ui/view/spelleng.cxx:168
program/../program/libsclo.so
ScSpellDialogChildWindow::GetNextWrongSentence(bool)

/opt/rh/devtoolset-10/root/usr/include/c++/10/bits/unique_ptr.h:173

Seeing that e.g. Window::GetDropTarget() also handles a disposed
vcl::Window, let's do the same here.

Change-Id: Ia4ad312ae91dfef24266c5bd45751778acbee367
Reviewed-by: Michael Meeks 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142473
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
(cherry picked from commit 3df3488014dc5f80756c24f584bb554845f4a2df)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142439
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 2f85ddbd39d6..de88cae1d837 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -637,6 +637,8 @@ void Window::EnterWait()
 
 void Window::LeaveWait()
 {
+if( !mpWindowImpl )
+return;
 
 if ( mpWindowImpl->mnWaitCount )
 {


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - editeng/source include/vcl sw/source vcl/osx vcl/source vcl/unx

2022-11-09 Thread Caolán McNamara (via logerrit)
 editeng/source/editeng/impedit3.cxx |2 ++
 include/vcl/commandevent.hxx|   19 ++-
 sw/source/core/text/redlnitr.cxx|2 ++
 vcl/osx/salframeview.mm |4 ++--
 vcl/source/control/edit.cxx |2 ++
 vcl/source/edit/texteng.cxx |2 ++
 vcl/unx/gtk3/gtkframe.cxx   |   17 +++--
 7 files changed, 35 insertions(+), 13 deletions(-)

New commits:
commit 8dc6896254dbca4f9cd56f55edf2af85b226b4fd
Author: Caolán McNamara 
AuthorDate: Thu Nov 3 10:08:35 2022 +
Commit: Michael Stahl 
CommitDate: Wed Nov 9 10:53:54 2022 +0100

Resolves: tdf#149932 honour preedit 
PANGO_UNDERLINE_NONE/PANGO_UNDERLINE_DOUBLE

a)

Related: tdf#149932 honour PANGO_UNDERLINE_NONE for preedit underline

at least don't show an underline for PANGO_UNDERLINE_NONE

Change-Id: I190f44e1dfb7da1c663ce588973278d0da591c46

b)

Related: tdf#149932 honour PANGO_UNDERLINE_DOUBLE for preedit underline

we already have support for double underline so that's an easy add

Change-Id: I1bba5620038e396765bd79050ff6a520096f9476

c)

Related: tdf#149932 map NSUnderlineStyleDouble to new DoubleUnderline

and NSUnderlineStyleThick to ExtTextInputAttr::BoldUnderline

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

diff --git a/editeng/source/editeng/impedit3.cxx 
b/editeng/source/editeng/impedit3.cxx
index f0f6c0e728d1..7d59b24f7599 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2894,6 +2894,8 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, 
sal_Int32 nPos, SvxFont& rFo
 ExtTextInputAttr nAttr = mpIMEInfos->pAttribs[ nPos - 
mpIMEInfos->aPos.GetIndex() - 1 ];
 if ( nAttr & ExtTextInputAttr::Underline )
 rFont.SetUnderline( LINESTYLE_SINGLE );
+else if ( nAttr & ExtTextInputAttr::DoubleUnderline )
+rFont.SetUnderline( LINESTYLE_DOUBLE );
 else if ( nAttr & ExtTextInputAttr::BoldUnderline )
 rFont.SetUnderline( LINESTYLE_BOLD );
 else if ( nAttr & ExtTextInputAttr::DottedUnderline )
diff --git a/include/vcl/commandevent.hxx b/include/vcl/commandevent.hxx
index 883147fad491..a22f751d6477 100644
--- a/include/vcl/commandevent.hxx
+++ b/include/vcl/commandevent.hxx
@@ -44,18 +44,19 @@ enum class CommandEventId;
 
 enum class ExtTextInputAttr {
 NONE  = 0x,
-GrayWaveline  = 0x0100,
-Underline = 0x0200,
-BoldUnderline = 0x0400,
-DottedUnderline   = 0x0800,
-DashDotUnderline  = 0x1000,
-Highlight = 0x2000,
-RedText   = 0x4000,
-HalfToneText  = 0x8000
+GrayWaveline  = 0x0010,
+Underline = 0x0020,
+BoldUnderline = 0x0040,
+DottedUnderline   = 0x0080,
+DashDotUnderline  = 0x0100,
+DoubleUnderline   = 0x0200,
+Highlight = 0x0400,
+RedText   = 0x0800,
+HalfToneText  = 0x1000
 };
 namespace o3tl
 {
-template<> struct typed_flags : 
is_typed_flags {};
+template<> struct typed_flags : 
is_typed_flags {};
 }
 
 #define EXTTEXTINPUT_CURSOR_INVISIBLE   (sal_uInt16(0x0001))
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index 352b642b294b..12e4fea9fc9c 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -1049,6 +1049,8 @@ void SwExtend::ActualizeFont( SwFont &rFnt, 
ExtTextInputAttr nAttr )
 {
 if ( nAttr & ExtTextInputAttr::Underline )
 rFnt.SetUnderline( LINESTYLE_SINGLE );
+else if ( nAttr & ExtTextInputAttr::DoubleUnderline )
+rFnt.SetUnderline( LINESTYLE_DOUBLE );
 else if ( nAttr & ExtTextInputAttr::BoldUnderline )
 rFnt.SetUnderline( LINESTYLE_BOLD );
 else if ( nAttr & ExtTextInputAttr::DottedUnderline )
diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index ee245af64820..2923e0f8ef1c 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -1578,10 +1578,10 @@ static AquaSalFrame* getMouseContainerFrame()
 aInputFlags[i] = ExtTextInputAttr::Underline;
 break;
 case NSUnderlineStyleThick:
-aInputFlags[i] = ExtTextInputAttr::Underline | 
ExtTextInputAttr::Highlight;
+aInputFlags[i] = ExtTextInputAttr::BoldUnderline;
 break;
 case NSUnderlineStyleDouble:
-aInputFlags[i] = ExtTextInputAttr::BoldUnderline;
+aInputFlags[i] = ExtTextInputAttr::DoubleUnderline;
 break;
 default:
 aInputFlags[i] = ExtTextInputAttr::Highlight;
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 7bcc11266719..7

[Libreoffice-commits] core.git: configure.ac

2022-11-09 Thread xuenhua (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a5f5846fcfe6c9b1f39e753a9d3bad49f34c22a9
Author: xuenhua 
AuthorDate: Wed Nov 9 11:09:21 2022 +0800
Commit: Tor Lillqvist 
CommitDate: Wed Nov 9 10:48:51 2022 +0100

Keep support for iOS SDK version 15.6

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

diff --git a/configure.ac b/configure.ac
index 0bc58a7c3259..0fa69d60a292 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3695,7 +3695,7 @@ dnl 
===
 if test $_os = iOS; then
 AC_MSG_CHECKING([what iOS SDK to use])
 current_sdk_ver=16.1
-older_sdk_vers="16.0"
+older_sdk_vers="16.0 15.6"
 if test "$enable_ios_simulator" = "yes"; then
 platform=iPhoneSimulator
 versionmin=-mios-simulator-version-min=14.5


Wanted to contribute to libreoffice but decided not to after I got abused by some list members because I offered a suggestion which they didn't like.

2022-11-09 Thread A
I wanted to contribute to libreoffice but decided not to after I got
abused by some list members because I offered a suggestion which they
didn't like.

So, I thought that why should I invest my time in libreoffice when
people in libreoffice can't handle negative feedback in a dignified
way.

It looked like libreoffice people have superiority complex.

In my opinion, all open source software require contributors to
succeed. So, they should try to get more and more contributors rather
than abusing people away who give negative feedback (which also
results in loss of future contributors).

Linux kernel is hugely successful because there if you give any
feedback, no one hits back and no one becomes defensive - instead they
say that "Why don't you fix it then?". In linux kernel world, this is
the standard - if you don't like something about the kernel then
please change it and submit a patch.

Libreoffice should adopt the same approach. Instead of becoming
defensive and abusive, people on libreoffice should say - "If you
don't like something about libreoffice, then please change it and send
a patch".

I still want to contribute to libreoffice but not until libreoffice
people tell me that I am welcome to contribute to libreoffice.

Amit


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

2022-11-09 Thread Samuel Mehrbrodt (via logerrit)
 sd/source/ui/view/drviews4.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 9d34b51efba7704beacc06cc93aa0bf6cf51a103
Author: Samuel Mehrbrodt 
AuthorDate: Mon Nov 7 13:43:48 2022 +0100
Commit: Michael Stahl 
CommitDate: Wed Nov 9 10:45:56 2022 +0100

tdf#144399 Don't allow editing in r/o mode

Fallout from ea9fff260129ccfa4755e96c08432252efbe5621

Change-Id: I0c73d13b79389db13bb04046731bdf18b4cf6005
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142382
Tested-by: Samuel Mehrbrodt 
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 429f3d8e3eddedb7ab183b6530220bc7491302e7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142308
Reviewed-by: Michael Stahl 
Tested-by: Jenkins

diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index b07279844265..df251880d6fd 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -254,11 +254,12 @@ bool DrawViewShell::KeyInput (const KeyEvent& rKEvt, 
::sd::Window* pWin)
FreshNavigatrTree();
 }
 }
+if (!bRet && !mbReadOnly) // tdf#139804
+{
+bRet = GetView()->KeyInput(rKEvt, pWin);
+}
 }
 
-if (!bRet)
-bRet = GetView()->KeyInput(rKEvt, pWin);
-
 return bRet;
 }
 


[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.0' - 6 commits - drawinglayer/source emfio/inc emfio/qa emfio/source

2022-11-09 Thread Paris Oplopoios (via logerrit)
 drawinglayer/source/tools/primitive2dxmldump.cxx |9 +
 emfio/inc/mtftools.hxx   |1 
 emfio/qa/cppunit/emf/EmfImportTest.cxx   |   46 +++
 emfio/qa/cppunit/emf/data/TestFillRegion.emf |binary
 emfio/qa/cppunit/emf/data/TestNegativeWinOrg.emf |binary
 emfio/source/reader/emfreader.cxx|  142 +++
 6 files changed, 150 insertions(+), 48 deletions(-)

New commits:
commit 060ad7663698611e11af2938178b23fc5c2a7d56
Author: Paris Oplopoios 
AuthorDate: Tue Nov 1 14:25:38 2022 +0200
Commit: Miklos Vajna 
CommitDate: Wed Nov 9 10:08:39 2022 +0100

tdf#151844 Make EMR_EXTSELECTCLIPRGN factor in WinOrg coordinates

EMR_EXTSELECTCLIPRGN would not factor in WinOrg coordinates which would
give the clip box wrong coordinates causing some graphics to look
chopped in the wrong way.

(cherry picked from commit b9eaed7a4c484dde0b5c61b34b4beb60a101f661)

Conflicts:
emfio/qa/cppunit/emf/EmfImportTest.cxx

Change-Id: I4f9a1b1c27fc276d188d0d865991795dab48dce5

diff --git a/emfio/inc/mtftools.hxx b/emfio/inc/mtftools.hxx
index 9506b4f5f31c..0bd2bb925bb8 100644
--- a/emfio/inc/mtftools.hxx
+++ b/emfio/inc/mtftools.hxx
@@ -551,6 +551,7 @@ namespace emfio
 voidScaleDevExt(double fX, double fY);
 
 voidSetWinOrg(const Point& rPoint, bool bIsEMF = 
false);
+Point   GetWinOrg() { return Point(mnWinOrgX, mnWinOrgY); }
 voidSetWinOrgOffset(sal_Int32 nX, sal_Int32 nY);
 voidSetWinExt(const Size& rSize, bool bIsEMF = false);
 voidScaleWinExt(double fX, double fY);
diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx 
b/emfio/qa/cppunit/emf/EmfImportTest.cxx
index c284b73db95c..2ece656beda4 100644
--- a/emfio/qa/cppunit/emf/EmfImportTest.cxx
+++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx
@@ -34,6 +34,8 @@ using drawinglayer::primitive2d::Primitive2DContainer;
 
 class Test : public test::BootstrapFixture, public XmlTestTools
 {
+const OString aXPathPrefix = "/primitive2D/metafile/transform/";
+
 void checkRectPrimitive(Primitive2DSequence const & rPrimitive);
 
 void testWorking();
@@ -42,6 +44,7 @@ class Test : public test::BootstrapFixture, public 
XmlTestTools
 void TestDrawLine();
 void TestLinearGradient();
 void TestFillRegion();
+void TestNegativeWinOrg();
 
 Primitive2DSequence parseEmf(const OUString& aSource);
 
@@ -53,6 +56,7 @@ public:
 CPPUNIT_TEST(TestDrawLine);
 CPPUNIT_TEST(TestLinearGradient);
 CPPUNIT_TEST(TestFillRegion);
+CPPUNIT_TEST(TestNegativeWinOrg);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -214,6 +218,24 @@ void Test::TestFillRegion()
 assertXPath(pDocument, 
"/primitive2D/metafile/transform/mask/polygonhairline[1]", "color", "#00");
 }
 
+void Test::TestNegativeWinOrg()
+{
+Primitive2DSequence aSequence = 
parseEmf(u"/emfio/qa/cppunit/emf/data/TestNegativeWinOrg.emf");
+CPPUNIT_ASSERT_EQUAL(1, static_cast(aSequence.getLength()));
+drawinglayer::tools::Primitive2dXmlDump dumper;
+xmlDocUniquePtr pDocument = 
dumper.dumpAndParse(comphelper::sequenceToContainer(aSequence));
+CPPUNIT_ASSERT(pDocument);
+
+// The crop box (EMR_EXTSELECTCLIPRGN) would not factor in WinOrg 
coordinates
+// and be lower and more to the right than it actually is which would cut 
the
+// text in the emf above in half.
+assertXPath(pDocument, aXPathPrefix + "mask/group[1]/mask/polypolygon", 1);
+assertXPath(pDocument, aXPathPrefix + "mask/group[1]/mask/polypolygon", 
"minx", "0");
+assertXPath(pDocument, aXPathPrefix + "mask/group[1]/mask/polypolygon", 
"miny", "272");
+assertXPath(pDocument, aXPathPrefix + "mask/group[1]/mask/polypolygon", 
"maxx", "6800");
+assertXPath(pDocument, aXPathPrefix + "mask/group[1]/mask/polypolygon", 
"maxy", "644");
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 }
diff --git a/emfio/qa/cppunit/emf/data/TestNegativeWinOrg.emf 
b/emfio/qa/cppunit/emf/data/TestNegativeWinOrg.emf
new file mode 100644
index ..d428f4caff11
Binary files /dev/null and b/emfio/qa/cppunit/emf/data/TestNegativeWinOrg.emf 
differ
diff --git a/emfio/source/reader/emfreader.cxx 
b/emfio/source/reader/emfreader.cxx
index d09b84a95532..caa445adb309 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -325,7 +325,7 @@ SvStream& operator>>(SvStream& rInStream, BLENDFUNCTION& 
rBlendFun)
 return rInStream;
 }
 
-bool ImplReadRegion( basegfx::B2DPolyPolygon& rPolyPoly, SvStream& rStream, 
sal_uInt32 nLen )
+bool ImplReadRegion( basegfx::B2DPolyPolygon& rPolyPoly, SvStream& rStream, 
sal_uInt32 nLen, Point aWinOrg )
 {
 if (nLen < 32) // 32 bytes - Size of RegionDataHeader
 return false;
@@ -362,6 +362,10 @@ bool ImplReadRegion( basegfx::B2DPolyPolygon& rPolyPoly, 
SvStream& rStream, sal_
 rStr

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

2022-11-09 Thread Tor Lillqvist (via logerrit)
 bridges/source/cpp_uno/gcc3_ios/uno2cpp.cxx |   51 
 1 file changed, 22 insertions(+), 29 deletions(-)

New commits:
commit a4262415d367ec1b75a89ddaed611ec45c060cc0
Author: Tor Lillqvist 
AuthorDate: Wed Sep 7 17:16:46 2022 +0300
Commit: Aron Budea 
CommitDate: Wed Nov 9 09:46:16 2022 +0100

Fix register clobber information and simplify in the C++/UNO bridge for iOS

Avoid the use of unnecessary local variables to temporarily keep
return values from a function called by the inline assembly. Instead
use the GPR and FPR arrays also to temporarily keep such return
values, like the Linux aarch64 code does.

This fixes https://github.com/CollaboraOnline/online/issues/5204

Change-Id: I11aac56e9c8cc8aff1a3653ced45bdf4844cbcca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139602
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 
(cherry picked from commit d896ad282b6d09666b87442863c2de9ac06daa06)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142304

diff --git a/bridges/source/cpp_uno/gcc3_ios/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_ios/uno2cpp.cxx
index 07ec8501f0df..2614fd041ae9 100644
--- a/bridges/source/cpp_uno/gcc3_ios/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios/uno2cpp.cxx
@@ -77,13 +77,13 @@ namespace arm
 }
 }
 
-void MapReturn(sal_uInt64 x0, sal_uInt64 x1, double d0, 
typelib_TypeDescriptionReference *pReturnType, sal_uInt64 *pRegisterReturn)
+void MapReturn(sal_uInt64 *pGPR, double *pFPR, 
typelib_TypeDescriptionReference *pReturnType, sal_uInt64 *pRegisterReturn)
 {
 switch( pReturnType->eTypeClass )
 {
 case typelib_TypeClass_HYPER:
 case typelib_TypeClass_UNSIGNED_HYPER:
-pRegisterReturn[1] = x1;
+pRegisterReturn[1] = pGPR[1];
 [[fallthrough]];
 case typelib_TypeClass_LONG:
 case typelib_TypeClass_UNSIGNED_LONG:
@@ -93,20 +93,20 @@ void MapReturn(sal_uInt64 x0, sal_uInt64 x1, double d0, 
typelib_TypeDescriptionR
 case typelib_TypeClass_UNSIGNED_SHORT:
 case typelib_TypeClass_BOOLEAN:
 case typelib_TypeClass_BYTE:
-pRegisterReturn[0] = x0;
+pRegisterReturn[0] = pGPR[0];
 break;
 case typelib_TypeClass_FLOAT:
-*(float*)pRegisterReturn = *(float*)&d0;
+*(float*)pRegisterReturn = *(float*)&pFPR[0];
 break;
 case typelib_TypeClass_DOUBLE:
-*(double*)pRegisterReturn = d0;
+*(double*)pRegisterReturn = pFPR[0];
 break;
 case typelib_TypeClass_STRUCT:
 case typelib_TypeClass_EXCEPTION:
 if (!arm::return_in_x8(pReturnType))
 {
-pRegisterReturn[0] = x0;
-pRegisterReturn[1] = x1;
+pRegisterReturn[0] = pGPR[0];
+pRegisterReturn[1] = pGPR[1];
 }
 break;
 default:
@@ -142,11 +142,6 @@ void callVirtualMethod(
 pMethod += 8 * nVtableIndex;
 pMethod = *((sal_uInt64 *)pMethod);
 
-// For value returned in registers
-sal_uInt64 x0;
-sal_uInt64 x1;
-double d0;
-
 __asm__ __volatile__
 (
  // Assembly string
@@ -160,27 +155,25 @@ void callVirtualMethod(
  "  ldp d4, d5, %[pfpr_4]\n"
  "  ldp d6, d7, %[pfpr_6]\n"
  "  blr %[pmethod]\n"
- "  str x0, %[x0]\n"
- "  str x1, %[x1]\n"
- "  str d0, %[d0]\n"
- // Output operands
- : [x0]"=m" (x0), [x1]"=m" (x1), [d0]"=m" (d0)
+ "  stp x0, x1, %[pgpr_0]\n"
+ "  str d0, %[pfpr_0]\n"
  // Input operands
- : [pgpr_0]"m" (pGPR[0]),
-   [pgpr_2]"m" (pGPR[2]),
-   [pgpr_4]"m" (pGPR[4]),
-   [pgpr_6]"m" (pGPR[6]),
-   [pregisterreturn]"m" (pRegisterReturn),
-   [pfpr_0]"m" (pFPR[0]),
-   [pfpr_2]"m" (pFPR[2]),
-   [pfpr_4]"m" (pFPR[4]),
-   [pfpr_6]"m" (pFPR[6]),
-   [pmethod]"r" (pMethod)
+ :: [pgpr_0]"m" (pGPR[0]),
+[pgpr_2]"m" (pGPR[2]),
+[pgpr_4]"m" (pGPR[4]),
+[pgpr_6]"m" (pGPR[6]),
+[pregisterreturn]"m" (pRegisterReturn),
+[pfpr_0]"m" (pFPR[0]),
+[pfpr_2]"m" (pFPR[2]),
+[pfpr_4]"m" (pFPR[4]),
+[pfpr_6]"m" (pFPR[6]),
+[pmethod]"r" (pMethod)
  // Clobbers
- : "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "d0", "d1", "d2", 
"d3", "d4", "d5", "d6", "d7"
+ : "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", 
"x11", "x12", "x13", "x14", "x15", "x16", "x17",
+   "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7"
  );
 
-MapReturn(x0, x1, d0, pReturnType, (sal_uInt64 *) pRegisterReturn);
+MapReturn(pGPR, pFPR, pReturnType, (sal_uInt64 *) pRegisterReturn);
 }
 }
 


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

2022-11-09 Thread Mike Kaganski (via logerrit)
 starmath/source/view.cxx |   30 ++
 1 file changed, 30 insertions(+)

New commits:
commit e33d8fd1ff466876e5e95c8495c73a08c454d8c9
Author: Mike Kaganski 
AuthorDate: Tue Sep 27 10:48:21 2022 +0300
Commit: Mike Kaganski 
CommitDate: Wed Nov 9 09:35:19 2022 +0100

lok: Register sidebar for frame explicitly

For some reason, it is needed in 22.05 (unlike master). Without this,
sidebar sometimes isn't shown in inline edit mode.

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

diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 4afb9a68a33c..1fd8d04acb2c 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -2124,6 +2124,24 @@ void SmViewShell::GetState(SfxItemSet &rSet)
 
 namespace
 {
+css::uno::Reference
+getSidebarFromModel(const css::uno::Reference& xModel)
+{
+css::uno::Reference xChild(xModel, 
css::uno::UNO_QUERY);
+if (!xChild.is())
+return nullptr;
+css::uno::Reference xParent(xChild->getParent(), 
css::uno::UNO_QUERY);
+if (!xParent.is())
+return nullptr;
+css::uno::Reference 
xController(xParent->getCurrentController(),
+  
css::uno::UNO_QUERY);
+if (!xController.is())
+return nullptr;
+css::uno::Reference xSidebarProvider = 
xController->getSidebar();
+if (!xSidebarProvider.is())
+return nullptr;
+return xSidebarProvider->getSidebar();
+}
 class SmController : public SfxBaseController
 {
 public:
@@ -2143,7 +2161,19 @@ public:
 SfxBaseController::attachFrame(xFrame);
 
 if (comphelper::LibreOfficeKit::isActive())
+{
 CopyLokViewCallbackFromFrameCreator();
+// In lok mode, DocumentHolder::ShowUI is not called on OLE 
in-place activation,
+// because respective code is skipped in 
OCommonEmbeddedObject::SwitchStateTo_Impl,
+// so sidebar controller does not get registered properly; do it 
here
+if (auto xSidebar = getSidebarFromModel(getModel()))
+{
+auto pSidebar = 
dynamic_cast(xSidebar.get());
+assert(pSidebar);
+pSidebar->registerSidebarForFrame(this);
+pSidebar->updateModel(getModel());
+}
+}
 
 // No need to call mpSelectionChangeHandler->Connect() unless 
SmController implements XSelectionSupplier
 mpSelectionChangeHandler->selectionChanged({}); // Installs the 
correct context


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

2022-11-09 Thread Miklos Vajna (via logerrit)
 vcl/source/window/mouse.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 3df3488014dc5f80756c24f584bb554845f4a2df
Author: Miklos Vajna 
AuthorDate: Mon Nov 7 10:48:06 2022 +0100
Commit: Miklos Vajna 
CommitDate: Wed Nov 9 09:08:16 2022 +0100

vcl: fix crash in Window::LeaveWait()

Crashreport signature:

SIG   Fatal signal received: SIGSEGV code: 128 for address: 0x0
program/libmergedlo.so
vcl::Window::LeaveWait()
vcl/source/window/mouse.cxx:640
program/../program/libsclo.so
ScSpellingEngine::ShowTableWrapDialog()
sc/source/ui/view/spelleng.cxx:315
program/libsclo.so
ScConversionEngineBase::FindNextConversionCell()
sc/source/ui/view/spelleng.cxx:168
program/../program/libsclo.so
ScSpellDialogChildWindow::GetNextWrongSentence(bool)

/opt/rh/devtoolset-10/root/usr/include/c++/10/bits/unique_ptr.h:173

Seeing that e.g. Window::GetDropTarget() also handles a disposed
vcl::Window, let's do the same here.

Change-Id: Ia4ad312ae91dfef24266c5bd45751778acbee367
Reviewed-by: Michael Meeks 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142473
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 9b86199fd03c..fe9e2b0f2444 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -637,6 +637,8 @@ void Window::EnterWait()
 
 void Window::LeaveWait()
 {
+if( !mpWindowImpl )
+return;
 
 if ( mpWindowImpl->mnWaitCount )
 {