[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.5' - vcl/qa vcl/source

2023-07-30 Thread Mike Kaganski (via logerrit)
 vcl/qa/cppunit/pdfexport/data/wide_page1.fodt |   40 ++
 vcl/qa/cppunit/pdfexport/pdfexport.cxx|   56 ++
 vcl/source/gdi/pdfwriter_impl.cxx |8 ---
 3 files changed, 98 insertions(+), 6 deletions(-)

New commits:
commit f399f2862b2d3be4c3c411c87216389a362349aa
Author: Mike Kaganski 
AuthorDate: Fri Jul 28 17:55:17 2023 +0300
Commit: Mike Kaganski 
CommitDate: Mon Jul 31 07:32:16 2023 +0300

tdf#156528: Fix handling PDF page scaling factor after large pages

The map mode wasn't set when current page's user unit was 1, which meant
that it used the unchanged value from the previous page, where it could
be different.

Change-Id: Id1f1515dceac25cddc12081a86fabf8b32d633f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155025
Tested-by: Mike Kaganski 
Reviewed-by: Mike Kaganski 

diff --git a/vcl/qa/cppunit/pdfexport/data/wide_page1.fodt 
b/vcl/qa/cppunit/pdfexport/data/wide_page1.fodt
new file mode 100644
index ..9e7390a8e22a
--- /dev/null
+++ b/vcl/qa/cppunit/pdfexport/data/wide_page1.fodt
@@ -0,0 +1,40 @@
+
+
+http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns
 :css3t="http://www.w3.org/TR/css3-text/"; 
xmlns:officeooo="http://openoffice.org/2009/office"; office:version="1.3" 
office:mimetype="application/vnd.oasis.opendocument.text">
+ 
+ 
+ 
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+ 
+ 
+  
+  
+ 
+ 
+  
+   
+ 
+ 
+
+   
+ 
+ 
+
+  
+ 
+
\ No newline at end of file
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 4cf31e708220..a1e04a3d2f65 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -4293,6 +4293,62 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, 
testRexportResourceItemReference)
 CPPUNIT_ASSERT(pFontWidths);
 }
 
+CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf156528)
+{
+aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+saveAsPDF(u"wide_page1.fodt");
+std::unique_ptr pPdfDocument = parsePDFExport();
+
+// The document has two pages
+CPPUNIT_ASSERT_EQUAL(2, pPdfDocument->getPageCount());
+
+// 1st page (5100 mm width x 210 mm high, UserUnit = 2)
+auto pPdfPage = pPdfDocument->openPage(0);
+CPPUNIT_ASSERT(pPdfPage);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(o3tl::convert(5100.0 / 2, o3tl::Length::mm, 
o3tl::Length::pt),
+ pPdfPage->getWidth(), 1);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(o3tl::convert(210.0 / 2, o3tl::Length::mm, 
o3tl::Length::pt),
+ pPdfPage->getHeight(), 1);
+
+// 1 object (rectangle 5060 mm width x 170 mm high, UserUnit = 2)
+CPPUNIT_ASSERT_EQUAL(1, pPdfPage->getObjectCount());
+auto pRect = pPdfPage->getObject(0);
+CPPUNIT_ASSERT(pRect);
+CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFPageObjectType::Path, pRect->getType());
+auto bounds = pRect->getBounds();
+CPPUNIT_ASSERT_DOUBLES_EQUAL(o3tl::convert(5060.0 / 2, o3tl::Length::mm, 
o3t

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

2023-07-30 Thread Stephan Bergmann (via logerrit)
 include/rtl/string.hxx  |   51 +++-
 include/rtl/ustring.hxx |   37 +-
 sal/qa/rtl/strings/test_ostring_stringliterals.cxx  |3 +
 sal/qa/rtl/strings/test_oustring_stringliterals.cxx |3 +
 4 files changed, 70 insertions(+), 24 deletions(-)

New commits:
commit 6fce450b8a66d7e98a4d39528f8591184277e9fa
Author: Stephan Bergmann 
AuthorDate: Fri Jul 21 14:20:57 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Jul 31 07:58:08 2023 +0200

Introduce "..."_tstr as a companion to "..."_ostr/u"..."_ustr in template 
code

...like

> *path = "/";

in

> template oslFileError getSystemPathFromFileUrl(
> OUString const & url, T * path, bool resolveHome)

in sal/osl/unx/file_url.cxx, where T is either OString or OUString.  That 
can
now be replaced with

> *path = "/"_tstr;

and for OString it will be a no-cost constexpr operation, while for 
OUString it
will still construct the OUString instance at runtime (as did the original 
code
for both OString and OUString).

(This change required moving the definition of rtl::detail::OStringHolder
around in include/rtl/string.hxx.  For consistency, I similarly moved 
around the
definition of rtl::detail::OUStringHolder in include/rtl/ustring.hxx, too.)

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

diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index aae291f46053..eae18bc30d0d 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -186,6 +186,18 @@ private:
 rtl_String* pData;
 };
 
+#if __cplusplus >= 202002L
+
+namespace detail {
+
+template struct OStringHolder {
+static constexpr auto & literal = L;
+};
+
+}
+
+#endif
+
 #endif
 
 /* === */
@@ -384,6 +396,12 @@ public:
 /// @endcond
 #endif
 
+#if defined LIBO_INTERNAL_ONLY && __cplusplus >= 202002L
+// For operator ""_tstr:
+template constexpr OString(detail::OStringHolder 
const & holder):
+pData(const_cast(&holder.literal.str)) {}
+#endif
+
 #if defined LIBO_INTERNAL_ONLY
 explicit OString(std::string_view sv) {
 if (sv.size() > sal_uInt32(std::numeric_limits::max())) {
@@ -2275,18 +2293,6 @@ inline bool operator !=(StringConcatenation const 
& lhs, OString const & r
 
 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
 
-#if __cplusplus >= 202002L
-
-namespace detail {
-
-template struct OStringHolder {
-static constexpr auto & literal = L;
-};
-
-}
-
-#endif
-
 /**
  @internal
 */
@@ -2409,6 +2415,27 @@ operator ""_ostr() {
 ::detail::OStringHolder::literal;
 }
 
+template<
+#if defined RTL_STRING_UNITTEST
+rtlunittest::
+#endif
+OStringLiteral L>
+constexpr
+#if defined RTL_STRING_UNITTEST
+rtlunittest
+#else
+rtl
+#endif
+::detail::OStringHolder operator ""_tstr() {
+return
+#if defined RTL_STRING_UNITTEST
+rtlunittest
+#else
+rtl
+#endif
+::detail::OStringHolder();
+}
+
 #endif
 
 /// @cond INTERNAL
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index 90b195754a17..c273c76ace6a 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -175,6 +175,18 @@ private:
 rtl_uString* pData;
 };
 
+#if __cplusplus >= 202002L
+
+namespace detail {
+
+template struct OUStringHolder {
+static constexpr auto & literal = L;
+};
+
+}
+
+#endif
+
 /// @endcond
 #endif
 
@@ -440,6 +452,19 @@ public:
 /// @endcond
 #endif
 
+#if defined LIBO_INTERNAL_ONLY && __cplusplus >= 202002L
+// For operator ""_tstr:
+template OUString(detail::OStringHolder const & 
holder) {
+pData = nullptr;
+if (holder.literal.getLength() == 0) {
+rtl_uString_new(&pData);
+} else {
+rtl_uString_newFromLiteral(
+&pData, holder.literal.getStr(), holder.literal.getLength(), 
0);
+}
+}
+#endif
+
 /**
   New string from an 8-Bit character buffer array.
 
@@ -3414,18 +3439,6 @@ inline bool operator !=(StringConcatenation 
const & lhs, OUString cons
 #if defined LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
 /// @cond INTERNAL
 
-#if __cplusplus >= 202002L
-
-namespace detail {
-
-template struct OUStringHolder {
-static constexpr auto & literal = L;
-};
-
-}
-
-#endif
-
 /**
  @internal
 */
diff --git a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx 
b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
index 8cfc3a65bdde..1017106e2800 100644
--- a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
@@ -280,6 +280,9 @@ void test::ostring::StringLiterals::checkOstr() {
 CPPUNIT_ASSERT_EQUAL(sal_Int32(0), ""_ostr.getLength());
 CPPUNIT_ASSERT_EQUAL(sa

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

2023-07-30 Thread Noel Grandin (via logerrit)
 vcl/inc/ppdparser.hxx  |8 --
 vcl/inc/printerinfomanager.hxx |5 
 vcl/inc/salinst.hxx|1 
 vcl/inc/strhelper.hxx  |   16 
 vcl/inc/unx/fontmanager.hxx|5 
 vcl/inc/unx/geninst.h  |1 
 vcl/inc/unx/genprn.h   |6 
 vcl/ios/dummies.cxx|4 ---
 vcl/null/printerinfomanager.cxx|2 -
 vcl/source/fontsubset/ttcr.hxx |6 
 vcl/unx/generic/print/genprnpsp.cxx|8 --
 vcl/unx/generic/printer/cupsmgr.cxx|   10 
 vcl/unx/generic/printer/ppdparser.cxx  |   31 -
 vcl/unx/generic/printer/printerinfomanager.cxx |3 --
 14 files changed, 106 deletions(-)

New commits:
commit 3564e11a41c8d3f06c8be387691d5997942e9738
Author: Noel Grandin 
AuthorDate: Sun Jul 30 23:20:36 2023 +0200
Commit: خالد حسني 
CommitDate: Mon Jul 31 02:18:25 2023 +0200

tdf#156230 remove now unused various bit and pieces

Change-Id: I0ad88d402329bbc6882f53f6c20c22b97189a27f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155077
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/vcl/inc/ppdparser.hxx b/vcl/inc/ppdparser.hxx
index 7ef864bc9cfc..6d2f8c060c5d 100644
--- a/vcl/inc/ppdparser.hxx
+++ b/vcl/inc/ppdparser.hxx
@@ -101,7 +101,6 @@ public:
 
 const OUString& getKey() const { return m_aKey; }
 boolisUIKey() const { return m_bUIOption; }
-SetupType   getSetupType() const { return m_eSetupType; }
 int getOrderDependency() const { return 
m_nOrderDependency; }
 };
 
@@ -145,9 +144,6 @@ private:
 // the full path of the PPD file
 OUStringm_aFile;
 // some basic attributes
-boolm_bColorDevice;
-boolm_bType42Capable;
-sal_uLong   m_nLanguageLevel;
 rtl_TextEncodingm_aFileEncoding;
 
 
@@ -192,10 +188,6 @@ public:
 
 const ::std::vector< PPDConstraint >& getConstraints() const { return 
m_aConstraints; }
 
-boolisColorDevice() const { return m_bColorDevice; }
-boolisType42Capable() const { return m_bType42Capable; }
-sal_uLong   getLanguageLevel() const { return m_nLanguageLevel; }
-
 OUStringgetDefaultPaperDimension() const;
 voidgetDefaultPaperDimension( int& rWidth, int& rHeight ) const
 { getPaperDimension( getDefaultPaperDimension(), rWidth, rHeight ); }
diff --git a/vcl/inc/printerinfomanager.hxx b/vcl/inc/printerinfomanager.hxx
index a89cff1118a5..67dd8e59b2e0 100644
--- a/vcl/inc/printerinfomanager.hxx
+++ b/vcl/inc/printerinfomanager.hxx
@@ -110,8 +110,6 @@ protected:
   m_pQueueInfo;
 
 Type  m_eType;
-bool  m_bUseIncludeFeature;
-bool  m_bUseJobPatch;
 OUString m_aSystemDefaultPaper;
 
 PrinterInfoManager( Type eType = Type::Default );
@@ -157,9 +155,6 @@ public:
 // returns true on success
 virtual bool endSpool( const OUString& rPrinterName, const OUString& 
rJobTitle, FILE* pFile, const JobData& rDocumentJobData, bool bBanner, const 
OUString &rFaxNumber );
 
-bool getUseIncludeFeature() const { return m_bUseIncludeFeature; }
-bool getUseJobPatch() const { return m_bUseJobPatch; }
-
 // check whether a printer's feature string contains a subfeature
 bool checkFeatureToken( const OUString& rPrinterName, std::string_view 
pToken ) const;
 
diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx
index 98e962d8c637..124118f4e609 100644
--- a/vcl/inc/salinst.hxx
+++ b/vcl/inc/salinst.hxx
@@ -195,7 +195,6 @@ public:
 
 // callbacks for printer updates
 virtual voidupdatePrinterUpdate() {}
-virtual voidjobStartedPrinterUpdate() {}
 virtual voidjobEndedPrinterUpdate() {}
 
 /// Set the app's (somewhat) magic/main-thread to this one.
diff --git a/vcl/inc/strhelper.hxx b/vcl/inc/strhelper.hxx
index c0cff31afc4f..8654400b 100644
--- a/vcl/inc/strhelper.hxx
+++ b/vcl/inc/strhelper.hxx
@@ -49,22 +49,6 @@ namespace psp
 return rtl::math::stringToDouble(rStr, u'.', u'\0');
 }
 
-inline double StringToDouble(std::string_view rStr)
-{
-return rtl::math::stringToDouble(rStr, '.', static_cast(0));
-}
-
-// fills a character buffer with the string representation of a double
-// the buffer has to be long enough (e.g. 128 bytes)
-// returns the string len
-inline int getValueOfDouble( char* pBuffer, double f, int nPrecision = 0)
-{
-OStri

Week #9 Report - GSoC 2023 - Search Field in Options

2023-07-30 Thread Bayram Çiçek

Hi all.

> Summary of Week #9 Report - GSoC 2023 - "Search Field in Options" project

- tested and confirmed that changing LO interface language also changes 
the .ui file strings. It is possible that we can overcome the 
localization issue by initializing sub-dialogs .


- working on some bugs/issues regarding ui dialogs that should run in 
the background.


--

Regards,
Bayram Çiçek


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - 2 commits - sc/qa sc/source

2023-07-30 Thread Caolán McNamara (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |3 +
 sc/source/core/data/table1.cxx   |   10 ++---
 sc/source/ui/inc/tabview.hxx |6 ++-
 sc/source/ui/view/cellsh4.cxx|8 ++--
 sc/source/ui/view/tabview2.cxx   |   47 +--
 sc/source/ui/view/tabview3.cxx   |4 +-
 6 files changed, 61 insertions(+), 17 deletions(-)

New commits:
commit 505d0759d86b65b122061329ae2f9f97d7a95307
Author: Caolán McNamara 
AuthorDate: Tue Jul 25 14:16:39 2023 +0100
Commit: Caolán McNamara 
CommitDate: Sun Jul 30 22:26:24 2023 +0200

cool#6931 on ctrl+[right/down] don't leap to the limits of the document

...when there is no more data, instead jump a generous block of emptiness.

Limit to direct interaction by user and the simple navigation case
(leaving block selection alone) and only for LibreOfficeKit::isActive

Change-Id: I66234394529785d3f0f8fe6a6524239dad8ffb32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154912
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Dennis Francis 

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 8b0b66ed34ef..58cb5732ea6b 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -2062,7 +2062,8 @@ void ScTiledRenderingTest::testJumpToLastRowInvalidation()
 Scheduler::ProcessEventsToIdle();
 CPPUNIT_ASSERT(aView1.m_bInvalidateTiles);
 CPPUNIT_ASSERT_EQUAL(size_t(1), aView1.m_aInvalidations.size());
-CPPUNIT_ASSERT_EQUAL(tools::Rectangle(0, 13005, 26775, 267386880), 
aView1.m_aInvalidations[0]);
+// 261375 because we limit how far we jump into empty space in online, 
267386880 if we don't limit
+CPPUNIT_ASSERT_EQUAL(tools::Rectangle(0, 13005, 26775, 261375), 
aView1.m_aInvalidations[0]);
 }
 
 // We need to ensure that views are not perterbed by rendering (!?) hmm ...
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 3f270770ec89..edb9dd991971 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -241,7 +241,8 @@ private:
 static tools::Long GetScrollBarPos( const ScrollAdaptor& rScroll );
 
 voidGetAreaMoveEndPosition(SCCOL nMovX, SCROW nMovY, 
ScFollowMode eMode,
-   SCCOL& rAreaX, SCROW& rAreaY, 
ScFollowMode& rMode);
+   SCCOL& rAreaX, SCROW& rAreaY, 
ScFollowMode& rMode,
+   bool bInteractiveByUser = false);
 
 voidSkipCursorHorizontal(SCCOL& rCurX, SCROW& rCurY, SCCOL 
nOldX, SCCOL nMovX);
 voidSkipCursorVertical(SCCOL& rCurX, SCROW& rCurY, SCROW 
nOldY, SCROW nMovY);
@@ -435,7 +436,8 @@ public:
 voidMoveCursorPage( SCCOL nMovX, SCROW nMovY, ScFollowMode 
eMode,
 bool bShift, bool bKeepSel = false );
 voidMoveCursorArea( SCCOL nMovX, SCROW nMovY, ScFollowMode 
eMode,
-bool bShift, bool bKeepSel = false );
+bool bShift, bool bKeepSel = false,
+bool bInteractiveByUser = false );
 voidMoveCursorEnd( SCCOL nMovX, SCROW nMovY, ScFollowMode 
eMode,
bool bShift, bool bKeepSel = false );
 voidMoveCursorScreen( SCCOL nMovX, SCROW nMovY, ScFollowMode 
eMode, bool bShift );
diff --git a/sc/source/ui/view/cellsh4.cxx b/sc/source/ui/view/cellsh4.cxx
index 13d6993634dd..066e6adfd6bc 100644
--- a/sc/source/ui/view/cellsh4.cxx
+++ b/sc/source/ui/view/cellsh4.cxx
@@ -137,7 +137,7 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq )
 break;
 
 case SID_CURSORBLKDOWN:
-pTabViewShell->MoveCursorArea( 0, nRepeat, SC_FOLLOW_JUMP, bSel, 
bKeep );
+pTabViewShell->MoveCursorArea( 0, nRepeat, SC_FOLLOW_JUMP, bSel, 
bKeep, !rReq.IsAPI() );
 break;
 
 case SID_CURSORUP:
@@ -148,7 +148,7 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq )
 break;
 
 case SID_CURSORBLKUP:
-pTabViewShell->MoveCursorArea( 0, -nRepeat, SC_FOLLOW_JUMP, bSel, 
bKeep );
+pTabViewShell->MoveCursorArea( 0, -nRepeat, SC_FOLLOW_JUMP, bSel, 
bKeep, !rReq.IsAPI() );
 break;
 
 case SID_CURSORLEFT:
@@ -159,7 +159,7 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq )
 break;
 
 case SID_CURSORBLKLEFT:
-pTabViewShell->MoveCursorArea( static_cast(-nRepeat * 
nRTLSign), 0, SC_FOLLOW_JUMP, bSel, bKeep );
+pTabViewShell->MoveCursorArea( static_cast(-nRepeat * 
nRTLSign), 0, SC_FOLLOW_JUMP, bSel, bKeep, !rReq.IsAPI() );
 break;
 
 case SID_CURSORRIGHT:
@@ -170,7 +170,7 @@ void ScCellShell::ExecuteC

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

2023-07-30 Thread Thorsten Behrens (via logerrit)
 scripting/source/pyprov/mailmerge.py |8 
 1 file changed, 8 insertions(+)

New commits:
commit d7b8dc9f3f866d65c2e1ae3727b3738ae954e325
Author: Thorsten Behrens 
AuthorDate: Sat Jul 29 05:17:10 2023 +0200
Commit: Thorsten Behrens 
CommitDate: Sun Jul 30 21:59:19 2023 +0200

Log SSL default verification path for mailmerge debug

related: follow python recommendation and pass SSL contexts

Change-Id: I992535a7fbe0bd21ff1de8241715babc0cb5cdc3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155050
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/scripting/source/pyprov/mailmerge.py 
b/scripting/source/pyprov/mailmerge.py
index 6bd80430d147..40be53b9366a 100644
--- a/scripting/source/pyprov/mailmerge.py
+++ b/scripting/source/pyprov/mailmerge.py
@@ -96,6 +96,8 @@ class PyMailSMTPService(unohelper.Base, XSmtpService):
if dbg:
print("Timeout: " + str(tout), file=sys.stderr)
if port == 465:
+   if dbg:
+   print("SSL config: " + 
str(ssl.get_default_verify_paths()), file=sys.stderr)
self.server = smtplib.SMTP_SSL(server, port, 
timeout=tout, context=ssl.create_default_context())
else:
self.server = smtplib.SMTP(server, port,timeout=tout)
@@ -107,6 +109,8 @@ class PyMailSMTPService(unohelper.Base, XSmtpService):
if dbg:
print("ConnectionType: " + connectiontype, 
file=sys.stderr)
if connectiontype.upper() == 'SSL' and port != 465:
+   if dbg:
+   print("SSL config: " + 
str(ssl.get_default_verify_paths()), file=sys.stderr)
self.server.ehlo()

self.server.starttls(context=ssl.create_default_context())
self.server.ehlo()
@@ -299,6 +303,8 @@ class PyMailIMAPService(unohelper.Base, XMailService):
print(connectiontype, file=sys.stderr)
print("BEFORE", file=sys.stderr)
if connectiontype.upper() == 'SSL':
+   if dbg:
+   print("SSL config: " + 
str(ssl.get_default_verify_paths()), file=sys.stderr)
self.server = imaplib.IMAP4_SSL(server, port, 
ssl_context=ssl.create_default_context())
else:
self.server = imaplib.IMAP4(server, port)
@@ -368,6 +374,8 @@ class PyMailPOP3Service(unohelper.Base, XMailService):
print(connectiontype, file=sys.stderr)
print("BEFORE", file=sys.stderr)
if connectiontype.upper() == 'SSL':
+   if dbg:
+   print("SSL config: " + 
str(ssl.get_default_verify_paths()), file=sys.stderr)
self.server = poplib.POP3_SSL(server, port, 
context=ssl.create_default_context())
else:
tout = xConnectionContext.getValueByName("Timeout")


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

2023-07-30 Thread Khaled Hosny (via logerrit)
 vcl/inc/unx/fontmanager.hxx |   13 -
 vcl/unx/generic/fontmanager/fontmanager.cxx |   67 
 2 files changed, 80 deletions(-)

New commits:
commit 3e563f6ed42224e5c7fbb11428604a7719e178af
Author: Khaled Hosny 
AuthorDate: Sun Jul 30 14:59:19 2023 +
Commit: خالد حسني 
CommitDate: Sun Jul 30 20:45:18 2023 +0200

Drop freshly unused PrintFontManager

Change-Id: If4cec80eaf1301907d144ecb8518a4de5acdeefb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155070
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/vcl/inc/unx/fontmanager.hxx b/vcl/inc/unx/fontmanager.hxx
index a7817652d9ae..1a9ef6e3be21 100644
--- a/vcl/inc/unx/fontmanager.hxx
+++ b/vcl/inc/unx/fontmanager.hxx
@@ -96,7 +96,6 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
 // font attributes
 OUString  m_aFamilyName;
 std::vector m_aAliases;
-OUString  m_aPSName;
 OUString  m_aStyleName;
 FontFamilym_eFamilyStyle;
 FontItalicm_eItalic;
@@ -104,9 +103,6 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
 FontWeightm_eWeight;
 FontPitch m_ePitch;
 rtl_TextEncoding  m_aEncoding;
-int   m_nAscend;
-int   m_nDescend;
-int   m_nLeading;
 
 int   m_nDirectory;   // atom containing system 
dependent path
 OString   m_aFontFile;// relative to directory
@@ -202,9 +198,6 @@ public:
 
 // routines to get font info in small pieces
 
-// get a specific fonts PSName name
-OUString getPSName( fontID nFontID );
-
 // get a specific fonts system dependent filename
 OString getFontFileSysPath( fontID nFontID ) const
 {
@@ -217,12 +210,6 @@ public:
 // get the ttc face variation
 int getFontFaceVariation( fontID nFontID ) const;
 
-// get a specific fonts ascend
-int getFontAscend( fontID nFontID );
-
-// get a specific fonts descent
-int getFontDescend( fontID nFontID );
-
 // font administration functions
 
 /*  system dependent font matching
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx 
b/vcl/unx/generic/fontmanager/fontmanager.cxx
index d7b6a211df13..1927071bb802 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -87,9 +87,6 @@ PrintFontManager::PrintFont::PrintFont()
 ,   m_eWeight(WEIGHT_DONTKNOW)
 ,   m_ePitch(PITCH_DONTKNOW)
 ,   m_aEncoding(RTL_TEXTENCODING_DONTKNOW)
-,   m_nAscend(0)
-,   m_nDescend(0)
-,   m_nLeading(0)
 ,   m_nDirectory(0)
 ,   m_nCollectionEntry(0)
 ,   m_nVariationEntry(0)
@@ -563,12 +560,6 @@ bool PrintFontManager::analyzeSfntFile( PrintFont& rFont ) 
const
 if( !aInfo.usubfamily.isEmpty() )
 rFont.m_aStyleName = aInfo.usubfamily;
 
-SAL_WARN_IF( aInfo.psname.isEmpty(), "vcl.fonts", "No PostScript name 
in font:" << aFile );
-
-rFont.m_aPSName = !aInfo.psname.isEmpty() ?
-OStringToOUString(aInfo.psname, aEncoding) :
-rFont.m_aFamilyName; // poor font does not have a postscript name
-
 rFont.m_eFamilyStyle = matchFamilyName(rFont.m_aFamilyName);
 
 switch( aInfo.weight )
@@ -610,33 +601,6 @@ bool PrintFontManager::analyzeSfntFile( PrintFont& rFont ) 
const
 
 rFont.m_aEncoding = aInfo.microsoftSymbolEncoded ? 
RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UCS2;
 
-if( aInfo.ascender && aInfo.descender )
-{
-rFont.m_nLeading   = aInfo.linegap;
-rFont.m_nAscend= aInfo.ascender;
-rFont.m_nDescend   = -aInfo.descender;
-}
-else if( aInfo.typoAscender && aInfo.typoDescender )
-{
-rFont.m_nLeading   = aInfo.typoLineGap;
-rFont.m_nAscend= aInfo.typoAscender;
-rFont.m_nDescend   = -aInfo.typoDescender;
-}
-else if( aInfo.winAscent && aInfo.winDescent )
-{
-rFont.m_nAscend= aInfo.winAscent;
-rFont.m_nDescend   = aInfo.winDescent;
-rFont.m_nLeading   = rFont.m_nAscend + rFont.m_nDescend - 1000;
-}
-
-// last try: font bounding box
-if( rFont.m_nAscend == 0 )
-rFont.m_nAscend = aInfo.yMax;
-if( rFont.m_nDescend == 0 )
-rFont.m_nDescend = -aInfo.yMin;
-if( rFont.m_nLeading == 0 )
-rFont.m_nLeading = 15 * (rFont.m_nAscend+rFont.m_nDescend) / 100;
-
 CloseTTFont( pTTFont );
 bSuccess = true;
 }
@@ -846,35 +810,4 @@ OString PrintFontManager::getFontFile(const PrintFont& 
rFont) const
 return aPath;
 }
 
-OUString PrintFontManager::getPSName( fontID nFontID )
-{
-PrintFont* pFont = getFont( nFontID );
-if (pFont && pFont->m_aPSName.isEmpty())
-{
-analyzeSfntFile(*pFont);
-}
-
-return pFont ? pFont->m_aPSName : OUString();
-}

[Libreoffice-commits] core.git: 3 commits - vcl/inc vcl/Library_vcl.mk vcl/source vcl/unx

2023-07-30 Thread Khaled Hosny (via logerrit)
 vcl/Library_vcl.mk |6 
 vcl/inc/fontsubset.hxx |5 
 vcl/inc/jobdata.hxx|2 
 vcl/inc/sft.hxx|   47 
 vcl/inc/unx/printergfx.hxx |  346 --
 vcl/inc/unx/printerjob.hxx |  129 --
 vcl/source/fontsubset/fontsubset.cxx   |   63 -
 vcl/source/fontsubset/sft.cxx  |  710 
 vcl/unx/generic/print/bitmap_gfx.cxx   |  674 
 vcl/unx/generic/print/common_gfx.cxx   | 1152 -
 vcl/unx/generic/print/glyphset.cxx |  297 -
 vcl/unx/generic/print/glyphset.hxx |   81 -
 vcl/unx/generic/print/printerjob.cxx   |  969 -
 vcl/unx/generic/print/psputil.cxx  |  184 ---
 vcl/unx/generic/print/psputil.hxx  |   55 -
 vcl/unx/generic/print/text_gfx.cxx |  158 --
 vcl/unx/generic/printer/configuration/psprint.conf |5 
 vcl/unx/generic/printer/jobdata.cxx|   12 
 vcl/unx/generic/printer/printerinfomanager.cxx |8 
 19 files changed, 2 insertions(+), 4901 deletions(-)

New commits:
commit 3a01df55db376ecbed0d89ebb4dd9d2d2f4b520f
Author: Khaled Hosny 
AuthorDate: Sun Jul 30 14:23:58 2023 +
Commit: خالد حسني 
CommitDate: Sun Jul 30 20:45:12 2023 +0200

Drop freshly unused font subsetting code

These output font formats were for PostScript that is now gone.

Change-Id: Ib29f921fe25432aaa558ba842ee77fe1e8023d47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155069
Reviewed-by: خالد حسني 
Tested-by: خالد حسني 

diff --git a/vcl/inc/fontsubset.hxx b/vcl/inc/fontsubset.hxx
index a1ba31aa58d8..1b218ed2e389 100644
--- a/vcl/inc/fontsubset.hxx
+++ b/vcl/inc/fontsubset.hxx
@@ -38,8 +38,6 @@ enum class FontType {
 TYPE1_PFA   = 1<<3, ///< PSType1 Postscript Font Ascii
 TYPE1_PFB   = 1<<4, ///< PSType1 Postscript Font Binary
 CFF_FONT= 1<<5, ///< CFF-container with PSType2 
glyphs
-TYPE3_FONT  = 1<<6, ///< PSType3 Postscript font
-TYPE42_FONT = 1<<7, ///< PSType42 wrapper for an 
SFNT_TTF
 ANY_SFNT= SFNT_TTF | SFNT_CFF,
 ANY_TYPE1   = TYPE1_PFA | TYPE1_PFB
 };
@@ -55,7 +53,6 @@ public:
 
 voidLoadFont( FontType eInFontType,
 const unsigned char* pFontBytes, int nByteLength );
-voidLoadFont( vcl::TrueTypeFont* pSftTrueTypeFont );
 
 boolCreateFontSubset( FontType nOutFontTypeMask,
 SvStream* pOutFile, const char* pOutFontName,
@@ -77,7 +74,6 @@ private:
 unsigned const char*mpInFontBytes;
 int mnInByteLength;
 FontTypemeInFontType;   ///< allowed mask of input 
font-types
-vcl::TrueTypeFont*  mpSftTTFont;
 
 // subset-request details
 FontTypemnReqFontTypeMask;  ///< allowed subset-target 
font types
@@ -88,7 +84,6 @@ private:
 int mnReqGlyphCount;
 
 boolCreateFontSubsetFromCff();
-boolCreateFontSubsetFromSfnt();
 };
 
 int VCL_DLLPUBLIC TestFontSubset(const void* data, sal_uInt32 size);
diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx
index b5fc71b44530..339914e4fb73 100644
--- a/vcl/inc/sft.hxx
+++ b/vcl/inc/sft.hxx
@@ -61,7 +61,7 @@ namespace vcl
 typedef sal_Int32   F16Dot16;   /**< fixed: 16.16 */
 /*@}*/
 
-/** Return value of OpenTTFont() and CreateT3FromTTGlyphs() */
+/** Return value of OpenTTFont() */
 enum class SFErrCodes {
 Ok,  /**< no error 
*/
 BadFile, /**< file not found   
*/
@@ -565,25 +565,6 @@ class TrueTypeFont;
 
 void GetTTNameRecords(AbstractTrueTypeFont const *ttf, 
std::vector& nr);
 
-/**
- * Generates a new PostScript Type 3 font and dumps it to outf file.
- * This function substitutes glyph 0 for all glyphIDs that are not found in 
the font.
- * @param ttf pointer to the TrueTypeFont structure
- * @param outfthe resulting font is written to this stream
- * @param fname   font name for the new font. If it is NULL the PostScript 
name of the
- *original font will be used
- * @param glyphArray  pointer to an array of glyphs that are to be extracted 
from ttf
- * @param encodingarray of encoding values. encoding[i] specifies the 
position of the glyph
- *glyphArray[i] in the encoding vector of the resulting 
Type3 font
- * @param nGlyphs number of glyph IDs in glyphArray and encoding values in 
encoding
- * @param wmode   writing mode for the output file: 0 - horizontal, 1 - 
vertical
- * @return

[Libreoffice-commits] core.git: 3 commits - vcl/headless vcl/inc vcl/Library_vcl.mk vcl/unx

2023-07-30 Thread Khaled Hosny (via logerrit)
 vcl/Library_vcl.mk |1 
 vcl/headless/svpprn.cxx|1 
 vcl/inc/salprn.hxx |2 
 vcl/inc/unx/GenPspGfxBackend.hxx   |  126 
 vcl/inc/unx/genprn.h   |3 
 vcl/inc/unx/genpspgraphics.h   |   16 -
 vcl/unx/generic/app/sm.cxx |1 
 vcl/unx/generic/print/GenPspGfxBackend.cxx |  410 -
 vcl/unx/generic/print/genprnpsp.cxx|4 
 vcl/unx/generic/print/genpspgraphics.cxx   |  120 
 vcl/unx/gtk3/gtkinst.cxx   |1 
 11 files changed, 28 insertions(+), 657 deletions(-)

New commits:
commit 4998de76ed1da4039e30718941d50d6f1dfe4f82
Author: Khaled Hosny 
AuthorDate: Sun Jul 30 07:40:48 2023 +
Commit: خالد حسني 
CommitDate: Sun Jul 30 20:44:50 2023 +0200

tdf#156230: Drop freshly unused GenPspGfxBackend

Change-Id: Idfc4364b99ed605462aae58391e98960be6021b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155064
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 1c18f470cfeb..6293e292b25e 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -564,7 +564,6 @@ vcl_headless_freetype_code=\
 vcl/unx/generic/print/glyphset \
 vcl/unx/generic/print/printerjob \
 vcl/unx/generic/print/psputil \
-vcl/unx/generic/print/GenPspGfxBackend \
 vcl/unx/generic/print/genpspgraphics \
 vcl/unx/generic/print/genprnpsp \
 vcl/unx/generic/print/prtsetup \
diff --git a/vcl/inc/unx/GenPspGfxBackend.hxx b/vcl/inc/unx/GenPspGfxBackend.hxx
deleted file mode 100644
index 31d85290361c..
--- a/vcl/inc/unx/GenPspGfxBackend.hxx
+++ /dev/null
@@ -1,126 +0,0 @@
-/* -*- 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/.
- *
- */
-
-#pragma once
-
-#include 
-
-namespace psp
-{
-class PrinterGfx;
-}
-
-class GenPspGfxBackend final : public SalGraphicsImpl
-{
-private:
-psp::PrinterGfx* m_pPrinterGfx;
-
-public:
-GenPspGfxBackend(psp::PrinterGfx* pPrinterGfx);
-~GenPspGfxBackend() override;
-
-void Init() override;
-void freeResources() override;
-OUString getRenderBackendName() const override { return "genpsp"; }
-
-void setClipRegion(vcl::Region const& rRegion) override;
-void ResetClipRegion() override;
-
-sal_uInt16 GetBitCount() const override;
-
-tools::Long GetGraphicsWidth() const override;
-
-void SetLineColor() override;
-void SetLineColor(Color nColor) override;
-void SetFillColor() override;
-void SetFillColor(Color nColor) override;
-void SetXORMode(bool bSet, bool bInvertOnly) override;
-void SetROPLineColor(SalROPColor nROPColor) override;
-void SetROPFillColor(SalROPColor nROPColor) override;
-
-void drawPixel(tools::Long nX, tools::Long nY) override;
-void drawPixel(tools::Long nX, tools::Long nY, Color nColor) override;
-
-void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, 
tools::Long nY2) override;
-void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, 
tools::Long nHeight) override;
-void drawPolyLine(sal_uInt32 nPoints, const Point* pPointArray) override;
-void drawPolygon(sal_uInt32 nPoints, const Point* pPointArray) override;
-void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32* pPoints,
- const Point** pPointArray) override;
-
-bool drawPolyPolygon(const basegfx::B2DHomMatrix& rObjectToDevice,
- const basegfx::B2DPolyPolygon&, double fTransparency) 
override;
-
-bool drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDevice, const 
basegfx::B2DPolygon&,
-  double fTransparency, double fLineWidth, const 
std::vector* pStroke,
-  basegfx::B2DLineJoin, css::drawing::LineCap, double 
fMiterMinimumAngle,
-  bool bPixelSnapHairline) override;
-
-bool drawPolyLineBezier(sal_uInt32 nPoints, const Point* pPointArray,
-const PolyFlags* pFlagArray) override;
-
-bool drawPolygonBezier(sal_uInt32 nPoints, const Point* pPointArray,
-   const PolyFlags* pFlagArray) override;
-
-bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32* pPoints,
-   const Point* const* pPointArray,
-   const PolyFlags* const* pFlagArray) override;
-
-void copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, 
tools::Long nSrcY,
-  tools::Long nSrcWidth, tools::Long nSrcHeight, bool 
bWindowInvalidate) override;
-
-void copyBits(const SalTwoRect& rP

[Libreoffice-commits] core.git: 3 commits - bin/find-can-be-private-symbols.functions.results include/vcl officecfg/registry svtools/source vcl/inc vcl/source vcl/unx

2023-07-30 Thread Khaled Hosny (via logerrit)
 bin/find-can-be-private-symbols.functions.results  |2 
 include/vcl/printer/Options.hxx|4 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   12 
 svtools/source/config/printoptions.cxx |6 
 vcl/inc/jobdata.hxx|4 
 vcl/inc/unx/genprn.h   |3 
 vcl/source/printer/Options.cxx |2 
 vcl/unx/generic/print/genprnpsp.cxx|  222 -
 vcl/unx/generic/printer/cpdmgr.cxx |3 
 vcl/unx/generic/printer/cupsmgr.cxx|9 
 vcl/unx/generic/printer/jobdata.cxx|   55 ---
 vcl/unx/generic/printer/printerinfomanager.cxx |   11 
 12 files changed, 24 insertions(+), 309 deletions(-)

New commits:
commit 4a0c8c722289f9a94e87cbc90eca17e1b865be64
Author: Khaled Hosny 
AuthorDate: Wed Jul 26 15:13:56 2023 +
Commit: خالد حسني 
CommitDate: Sun Jul 30 20:44:29 2023 +0200

tdf#156230: Drop freshly dead PspSalPrinter code

Change-Id: I272c8f3a4d70ef9d5d03eecc8c91ee8423c52ccc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154976
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/vcl/inc/unx/genprn.h b/vcl/inc/unx/genprn.h
index 0c92446d5286..67bf42bf9547 100644
--- a/vcl/inc/unx/genprn.h
+++ b/vcl/inc/unx/genprn.h
@@ -22,7 +22,6 @@
 
 #include 
 #include 
-#include 
 #include 
 
 class GenPspGraphics;
@@ -59,8 +58,6 @@ public:
 OUString  m_aFileName;
 OUString  m_aTmpFile;
 SalInfoPrinter* m_pInfoPrinter;
-std::unique_ptr m_xGraphics;
-psp::PrinterJob m_aPrintJob;
 psp::JobDatam_aJobData;
 psp::PrinterGfx m_aPrinterGfx;
 sal_uInt32  m_nCopies;
diff --git a/vcl/unx/generic/print/genprnpsp.cxx 
b/vcl/unx/generic/print/genprnpsp.cxx
index 84de26e1f9cc..560f0f4ec62f 100644
--- a/vcl/unx/generic/print/genprnpsp.cxx
+++ b/vcl/unx/generic/print/genprnpsp.cxx
@@ -243,93 +243,6 @@ static void copyJobDataToJobSetup( ImplJobSetup* 
pJobSetup, JobData& rData )
 pJobSetup->SetPapersizeFromSetup( rData.m_bPapersizeFromSetup );
 }
 
-// Needs a cleaner abstraction ...
-static bool passFileToCommandLine( const OUString& rFilename, const OUString& 
rCommandLine )
-{
-bool bSuccess = false;
-
-rtl_TextEncoding aEncoding = osl_getThreadTextEncoding();
-OString aCmdLine(OUStringToOString(rCommandLine, aEncoding));
-OString aFilename(OUStringToOString(rFilename, aEncoding));
-
-bool bPipe = aCmdLine.indexOf( "(TMP)" ) == -1;
-
-// setup command line for exec
-if( ! bPipe )
-aCmdLine = aCmdLine.replaceAll("(TMP)", aFilename);
-
-#if OSL_DEBUG_LEVEL > 1
-SAL_INFO("vcl.unx.print", (bPipe ? "piping to" : "executing")
-<< " commandline: \"" << aCmdLine << "\".");
-struct stat aStat;
-SAL_WARN_IF(stat( aFilename.getStr(), &aStat ),
-"vcl.unx.print", "stat( " << aFilename << " ) failed.");
-SAL_INFO("vcl.unx.print", "Tmp file " << aFilename
-<< " has modes: "
-<< std::showbase << std::oct
-<< (long)aStat.st_mode);
-#endif
-const char* argv[4];
-if( ! ( argv[ 0 ] = getenv( "SHELL" ) ) )
-argv[ 0 ] = "/bin/sh";
-argv[ 1 ] = "-c";
-argv[ 2 ] = aCmdLine.getStr();
-argv[ 3 ] = nullptr;
-
-bool bHavePipes = false;
-int pid, fd[2];
-
-if( bPipe )
-bHavePipes = pipe( fd ) == 0;
-if( ( pid = fork() ) > 0 )
-{
-if( bPipe && bHavePipes )
-{
-close( fd[0] );
-char aBuffer[ 2048 ];
-FILE* fp = fopen( aFilename.getStr(), "r" );
-while (fp && !feof(fp))
-{
-size_t nBytesRead = fread(aBuffer, 1, sizeof( aBuffer ), fp);
-if (nBytesRead )
-{
-size_t nBytesWritten = write(fd[1], aBuffer, nBytesRead);
-OSL_ENSURE(nBytesWritten == nBytesRead, "short write");
-if (nBytesWritten != nBytesRead)
-break;
-}
-}
-fclose( fp );
-close( fd[ 1 ] );
-}
-int status = 0;
-if(waitpid( pid, &status, 0 ) != -1)
-{
-if( ! status )
-bSuccess = true;
-}
-}
-else if( ! pid )
-{
-if( bPipe && bHavePipes )
-{
-close( fd[1] );
-if( fd[0] != STDIN_FILENO ) // not probable, but who knows :)
-dup2( fd[0], STDIN_FILENO );
-}
-execv( argv[0], const_cast(argv) );
-fprintf( stderr, "failed to execute \"%s\"\n", aCmdLine.getStr() );
-_exit( 1 );
-}
-else
-fprintf( stderr, "failed to fork\n" );
-
-// clean up the mess
-unlink( aFilename

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

2023-07-30 Thread Mike Kaganski (via logerrit)
 vcl/qa/cppunit/pdfexport/data/wide_page1.fodt |   40 ++
 vcl/qa/cppunit/pdfexport/pdfexport.cxx|   56 ++
 vcl/source/gdi/pdfwriter_impl.cxx |8 ---
 3 files changed, 98 insertions(+), 6 deletions(-)

New commits:
commit e80e2a8dbed8a6cea71eca333564a9fa75b5cfbc
Author: Mike Kaganski 
AuthorDate: Fri Jul 28 17:55:17 2023 +0300
Commit: Mike Kaganski 
CommitDate: Sun Jul 30 20:08:04 2023 +0200

tdf#156528: Fix handling PDF page scaling factor after large pages

The map mode wasn't set when current page's user unit was 1, which meant
that it used the unchanged value from the previous page, where it could
be different.

Change-Id: Id1f1515dceac25cddc12081a86fabf8b32d633f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155025
Tested-by: Mike Kaganski 
Reviewed-by: Mike Kaganski 

diff --git a/vcl/qa/cppunit/pdfexport/data/wide_page1.fodt 
b/vcl/qa/cppunit/pdfexport/data/wide_page1.fodt
new file mode 100644
index ..9e7390a8e22a
--- /dev/null
+++ b/vcl/qa/cppunit/pdfexport/data/wide_page1.fodt
@@ -0,0 +1,40 @@
+
+
+http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns
 :css3t="http://www.w3.org/TR/css3-text/"; 
xmlns:officeooo="http://openoffice.org/2009/office"; office:version="1.3" 
office:mimetype="application/vnd.oasis.opendocument.text">
+ 
+ 
+ 
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+  
+ 
+ 
+  
+  
+ 
+ 
+  
+   
+ 
+ 
+
+   
+ 
+ 
+
+  
+ 
+
\ No newline at end of file
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index aaf3998eb99a..2ac143029c07 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -5423,6 +5423,62 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf48707_2)
 }
 }
 
+CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf156528)
+{
+aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+saveAsPDF(u"wide_page1.fodt");
+std::unique_ptr pPdfDocument = parsePDFExport();
+
+// The document has two pages
+CPPUNIT_ASSERT_EQUAL(2, pPdfDocument->getPageCount());
+
+// 1st page (5100 mm width x 210 mm high, UserUnit = 2)
+auto pPdfPage = pPdfDocument->openPage(0);
+CPPUNIT_ASSERT(pPdfPage);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(o3tl::convert(5100.0 / 2, o3tl::Length::mm, 
o3tl::Length::pt),
+ pPdfPage->getWidth(), 1);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(o3tl::convert(210.0 / 2, o3tl::Length::mm, 
o3tl::Length::pt),
+ pPdfPage->getHeight(), 1);
+
+// 1 object (rectangle 5060 mm width x 170 mm high, UserUnit = 2)
+CPPUNIT_ASSERT_EQUAL(1, pPdfPage->getObjectCount());
+auto pRect = pPdfPage->getObject(0);
+CPPUNIT_ASSERT(pRect);
+CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFPageObjectType::Path, pRect->getType());
+auto bounds = pRect->getBounds();
+CPPUNIT_ASSERT_DOUBLES_EQUAL(o3tl::convert(5060.0 / 2, o3tl::Length::mm, 
o3tl::Length::pt),
+ 

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

2023-07-30 Thread Patrick Luby (via logerrit)
 sc/source/ui/view/cellsh.cxx |   12 
 1 file changed, 12 deletions(-)

New commits:
commit 5662bb4eec10ac62aea79272047ed49cfa264d27
Author: Patrick Luby 
AuthorDate: Sun Jul 30 09:04:19 2023 -0400
Commit: Patrick Luby 
CommitDate: Sun Jul 30 19:36:31 2023 +0200

tdf#156506 Fix failure to draw copy border on Windows

Revert portion of commit 9d68c794d67259a38de1465090f6f1e7fb588d62
that stops the animated border when a copy action is performed in
a different document by cancelling the animated border.

While the change worked on macOS and Linux, on Windows it stops
the currently active copy border so revert this fix.

Change-Id: I0dbdc8b1bf3077eecadbbe591a27e60ef3d48b7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155038
Reviewed-by: Michael Weghorn 
Tested-by: Jenkins
Reviewed-by: Patrick Luby 

diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 1a8216e6a1ba..ec5914a2224b 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -557,18 +557,6 @@ IMPL_LINK( ScCellShell, ClipboardChanged, 
TransferableDataHelper*, pDataHelper,
 rBindings.Invalidate( SID_PASTE_AS_LINK );
 rBindings.Invalidate( SID_PASTE_TEXTIMPORT_DIALOG );
 rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
-
-// Fix failure to stop the animated border when a copy action is
-// performed in a different document by cancelling the animated border.
-// This transferable has lost ownership of the system clipboard so,
-// in essence, the previous copy action that created this transferable
-// has been cancelled.
-if ( !GetViewData().IsAnyFillMode() )
-{
-GetViewData().SetPasteMode( ScPasteFlags::NONE );
-// Clear CopySourceOverlay in each window of a split/frozen tabview
-GetViewData().GetView()->UpdateCopySourceOverlay();
-}
 }
 
 namespace {


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

2023-07-30 Thread Jean-Pierre Ledure (via logerrit)
 wizards/source/scriptforge/SF_Session.xba |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit bd640d338b6c8a1a4915c4b88b52ac1cc48f7dd0
Author: Jean-Pierre Ledure 
AuthorDate: Sun Jul 30 15:03:15 2023 +0200
Commit: Jean-Pierre Ledure 
CommitDate: Sun Jul 30 18:28:48 2023 +0200

ScriptForge (SF_Session) fix SendMail() w/o attachment

Fix error message when no attachment
passed to the method.

Execution continues now without trouble.

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

diff --git a/wizards/source/scriptforge/SF_Session.xba 
b/wizards/source/scriptforge/SF_Session.xba
index b4292f36ea83..2bde313194b1 100644
--- a/wizards/source/scriptforge/SF_Session.xba
+++ b/wizards/source/scriptforge/SF_Session.xba
@@ -679,6 +679,8 @@ Check:
If Not SF_FileSystem.FileExists(sFile) Then GoTo 
CatchNotExists
vFileNames(i) = ConvertToUrl(sFile)
Next i
+   Else
+   vFileNames = Array()
End If
 
 Try:


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

2023-07-30 Thread Patrick Luby (via logerrit)
 sc/source/ui/view/cellsh.cxx |   12 
 1 file changed, 12 deletions(-)

New commits:
commit f324cba8600f9aa2c13e8531e1ce5467442b097b
Author: Patrick Luby 
AuthorDate: Sun Jul 30 09:04:19 2023 -0400
Commit: Patrick Luby 
CommitDate: Sun Jul 30 16:37:22 2023 +0200

tdf#156506 Fix failure to draw copy border on Windows

Revert portion of commit 9d68c794d67259a38de1465090f6f1e7fb588d62
that stops the animated border when a copy action is performed in
a different document by cancelling the animated border.

While the change worked on macOS and Linux, on Windows it stops
the currently active copy border so revert this fix.

Change-Id: I0dbdc8b1bf3077eecadbbe591a27e60ef3d48b7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155067
Tested-by: Jenkins
Reviewed-by: Patrick Luby 

diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 1a8216e6a1ba..ec5914a2224b 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -557,18 +557,6 @@ IMPL_LINK( ScCellShell, ClipboardChanged, 
TransferableDataHelper*, pDataHelper,
 rBindings.Invalidate( SID_PASTE_AS_LINK );
 rBindings.Invalidate( SID_PASTE_TEXTIMPORT_DIALOG );
 rBindings.Invalidate( SID_CLIPBOARD_FORMAT_ITEMS );
-
-// Fix failure to stop the animated border when a copy action is
-// performed in a different document by cancelling the animated border.
-// This transferable has lost ownership of the system clipboard so,
-// in essence, the previous copy action that created this transferable
-// has been cancelled.
-if ( !GetViewData().IsAnyFillMode() )
-{
-GetViewData().SetPasteMode( ScPasteFlags::NONE );
-// Clear CopySourceOverlay in each window of a split/frozen tabview
-GetViewData().GetView()->UpdateCopySourceOverlay();
-}
 }
 
 namespace {


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

2023-07-30 Thread Aron Budea (via logerrit)
 desktop/source/lib/init.cxx  |3 +++
 sfx2/source/control/unoctitm.cxx |3 +++
 2 files changed, 6 insertions(+)

New commits:
commit c93267f2901805aa6fe7b7ea44d4ba24e47233da
Author: Aron Budea 
AuthorDate: Mon Jul 17 03:37:05 2023 +0200
Commit: Aron Budea 
CommitDate: Sun Jul 30 14:51:39 2023 +0200

Send Calc pivot table command state changes to LOK

Change-Id: I0d9e04b0a0452f66cb9703d9f34fe6cb44d724c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154506
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Aron Budea 
(cherry picked from commit b62f9f484a0fc9215e34153daac4a8bdb9698d4b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155034
Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 6e8c0db99223..08609ef442d9 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3606,6 +3606,9 @@ static void doc_iniUnoCommands ()
 OUString(".uno:GroupSparklines"),
 OUString(".uno:UngroupSparklines"),
 OUString(".uno:FormatSparklineMenu"),
+OUString(".uno:DataDataPilotRun"),
+OUString(".uno:RecalcPivotTable"),
+OUString(".uno:DeletePivotTable"),
 OUString(".uno:Protect"),
 OUString(".uno:UnsetCellsReadOnly"),
 OUString(".uno:ContentControlProperties"),
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 20ae855ab6f3..9b75d0a51118 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1097,6 +1097,9 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, 
SfxViewFrame* pViewFra
  aEvent.FeatureURL.Path == "GroupSparklines" ||
  aEvent.FeatureURL.Path == "UngroupSparklines" ||
  aEvent.FeatureURL.Path == "FormatSparklineMenu" ||
+ aEvent.FeatureURL.Path == "DataDataPilotRun" ||
+ aEvent.FeatureURL.Path == "RecalcPivotTable" ||
+ aEvent.FeatureURL.Path == "DeletePivotTable" ||
  aEvent.FeatureURL.Path == "NumberFormatDecDecimals" ||
  aEvent.FeatureURL.Path == "NumberFormatIncDecimals" ||
  aEvent.FeatureURL.Path == "Protect" ||


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

2023-07-30 Thread Paris Oplopoios (via logerrit)
 dev/null |binary
 sw/qa/extras/ww8import/ww8import.cxx |   24 
 sw/source/filter/ww8/ww8par.cxx  |3 ---
 3 files changed, 27 deletions(-)

New commits:
commit 4065aaacffc0eef12f4e974def3e1ed1ddebd38b
Author: Paris Oplopoios 
AuthorDate: Tue Jul 18 01:58:14 2023 +0300
Commit: Paris Oplopoios 
CommitDate: Sun Jul 30 14:20:49 2023 +0200

Revert "ww8import create a pagedesc if continuous section changes margins"

This reverts commit c5ed52b1cd6f22787c94bec035ceecf9e1da3271.

The reverted commit would insert a pagebreak on section breaks if the
margin before and after the section break was different. While this
means a table after the section break will get the correct margin, it
would also create a page which is very breaking - it shouldn't be the
case in documents that have multiple continuous section breaks in a
single page that a new page is created for each of those breaks if the
margins are different - there are documents where this happens and in
those documents a single page gets converted to multiple messy pages.
Thus the table margins being correct after a section break with a margin
change should be fixed in a different way.

Change-Id: Ia5d5b98ddbd021803a6a9f80762b97db5808509f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154565
Tested-by: Jenkins
Tested-by: Paris Oplopoios 
Reviewed-by: Paris Oplopoios 
(cherry picked from commit df00cd5cf77eb2322f53b80296862940ba815d9a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154624
Tested-by: Jenkins CollaboraOffice 

diff --git a/sw/qa/extras/ww8import/data/floating-table-section-margins.doc 
b/sw/qa/extras/ww8import/data/floating-table-section-margins.doc
deleted file mode 100644
index f414be7f1ec8..
Binary files a/sw/qa/extras/ww8import/data/floating-table-section-margins.doc 
and /dev/null differ
diff --git a/sw/qa/extras/ww8import/ww8import.cxx 
b/sw/qa/extras/ww8import/ww8import.cxx
index f5f679da1f04..47a9e41f5352 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -37,30 +37,6 @@ public:
 }
 };
 
-CPPUNIT_TEST_FIXTURE(Test, testFloatingTableSectionMargins)
-{
-createSwDoc("floating-table-section-margins.doc");
-sal_Int32 pageLeft = parseDump("/root/page[2]/infos/bounds", 
"left").toInt32();
-sal_Int32 pageWidth = parseDump("/root/page[2]/infos/bounds", 
"width").toInt32();
-sal_Int32 tableLeft = parseDump("//tab/infos/bounds", "left").toInt32();
-sal_Int32 tableWidth = parseDump("//tab/infos/bounds", "width").toInt32();
-CPPUNIT_ASSERT( pageWidth > 0 );
-CPPUNIT_ASSERT( tableWidth > 0 );
-// The table's resulting position should be roughly centered.
-CPPUNIT_ASSERT( abs(( pageLeft + pageWidth / 2 ) - ( tableLeft + 
tableWidth / 2 )) < 20 );
-
-uno::Reference xTextSection = getProperty< 
uno::Reference >(getParagraph(2), "TextSection");
-CPPUNIT_ASSERT(xTextSection.is());
-uno::Reference xTextColumns = getProperty< 
uno::Reference >(xTextSection, "TextColumns");
-OUString pageStyleName = getProperty(getParagraph(2), 
"PageStyleName");
-uno::Reference pageStyle( 
getStyles("PageStyles")->getByName(pageStyleName), uno::UNO_QUERY);
-uno::Reference 
xPageStyle(getStyles("PageStyles")->getByName(pageStyleName), uno::UNO_QUERY);
-uno::Reference xPageColumns = getProperty< 
uno::Reference >(xPageStyle, "TextColumns");
-
-//either one or the other should get the column's, not both.
-CPPUNIT_ASSERT( xTextColumns->getColumnCount() != 
xPageColumns->getColumnCount());
-}
-
 CPPUNIT_TEST_FIXTURE(Test, testN816593)
 {
 createSwDoc("n816593.doc");
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 7bc6170730f4..80c6938f72a7 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4481,9 +4481,6 @@ void wwSectionManager::InsertSegments()
 
 bool bInsertSection = (aIter != aStart) && aIter->IsContinuous() &&  
bThisAndPreviousAreCompatible;
 bool bInsertPageDesc = !bInsertSection;
-// HACK Force new pagedesc if left/right margins change, otherwise 
e.g. floating tables may be anchored improperly.
-if( aIter->maSep.dxaLeft != aPrev->maSep.dxaLeft || 
aIter->maSep.dxaRight != aPrev->maSep.dxaRight )
-bInsertPageDesc = true;
 bool bProtected = SectionIsProtected(*aIter); // do we really  need 
this ?? I guess I have a different logic in editshell which disables this...
 
 if (bInsertPageDesc)


[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.5' - sw/qa sw/source

2023-07-30 Thread Mike Kaganski (via logerrit)
 sw/qa/extras/htmlexport/htmlexport.cxx |   48 +++
 sw/source/core/doc/doclay.cxx  |   25 ++-
 sw/source/filter/basflt/shellio.cxx|   14 ++--
 sw/source/filter/html/htmlplug.cxx |   91 ++--
 sw/source/filter/html/wrthtml.cxx  |  104 ++---
 sw/source/filter/html/wrthtml.hxx  |2 
 sw/source/uibase/app/docsh.cxx |   14 +++-
 7 files changed, 195 insertions(+), 103 deletions(-)

New commits:
commit cf04fc6747d2824bea3014e8c338f4bb14808de9
Author: Mike Kaganski 
AuthorDate: Fri Jul 28 13:06:08 2023 +0300
Commit: Mike Kaganski 
CommitDate: Sun Jul 30 13:02:27 2023 +0300

ReqIF: allow to output a single selected OLE object

To do that, "SelectionOnly" boolean propertyvalue is supported in the
store arguments.

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

diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index 7400eb34c556..59b98f44144d 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -2595,6 +2596,53 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testReqIF_FrameTextAsObjectAltText)
"Some text in frame & ");
 }
 
+CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testSingleOleExport)
+{
+// Given a document containing an embedded OLE object:
+createSwDoc("ole2.odt");
+
+// Create a selection for that object:
+uno::Reference 
xDrawPageSupplier(mxComponent,
+  
uno::UNO_QUERY_THROW);
+auto xDrawPage(xDrawPageSupplier->getDrawPage());
+uno::Reference xModel(mxComponent, 
uno::UNO_QUERY_THROW);
+uno::Reference 
xController(xModel->getCurrentController(),
+  
uno::UNO_QUERY_THROW);
+xController->select(xDrawPage->getByIndex(0));
+
+// Store only the selection
+uno::Reference xStorable(mxComponent, 
uno::UNO_QUERY_THROW);
+css::uno::Sequence aStoreProperties = {
+comphelper::makePropertyValue("FilterName", OUString("HTML 
(StarWriter)")),
+comphelper::makePropertyValue("FilterOptions", 
OUString("xhtmlns=reqif-xhtml")),
+comphelper::makePropertyValue("RTFOLEMimeType", OUString("text/rtf")),
+comphelper::makePropertyValue("SelectionOnly", true),
+};
+xStorable->storeToURL(maTempFile.GetURL(), aStoreProperties);
+
+SvMemoryStream aStream;
+WrapReqifFromTempFile(aStream);
+xmlDocUniquePtr pXmlDoc = parseXmlStream(&aStream);
+
+// The root element must be reqif-xhtml:object
+assertXPath(pXmlDoc, "/reqif-xhtml:html/reqif-xhtml:object", "type", 
"text/rtf");
+// It has no children
+assertXPathChildren(pXmlDoc, "/reqif-xhtml:html/reqif-xhtml:object", 0);
+// And the content is empty
+assertXPathContent(pXmlDoc, "/reqif-xhtml:html/reqif-xhtml:object", "");
+
+OUString aRtfData = getXPath(pXmlDoc, 
"/reqif-xhtml:html/reqif-xhtml:object", "data");
+INetURLObject aUrl(maTempFile.GetURL());
+aUrl.setName(aRtfData);
+SvMemoryStream aRtf;
+
HtmlExportTest::wrapRtfFragment(aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE),
 aRtf);
+tools::SvRef xReader(new TestReqIfRtfReader(aRtf));
+// The RTF OLE exports correctly
+CPPUNIT_ASSERT(xReader->CallParser() != SvParserState::Error);
+CPPUNIT_ASSERT_EQUAL(tools::Long(9358), xReader->GetObjw());
+CPPUNIT_ASSERT_EQUAL(tools::Long(450), xReader->GetObjh());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 457ff80b517b..49e0ec239c94 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -499,6 +499,13 @@ SwPosFlyFrames SwDoc::GetAllFlyFormats( const SwPaM* 
pCmpRange, bool bDrawAlso,
bool bAsCharAlso ) const
 {
 SwPosFlyFrames aRetval;
+const SwStartNode* pDirectFly = nullptr;
+if (pCmpRange && *pCmpRange->GetPoint() == *pCmpRange->GetMark()
+&& (pCmpRange->GetPoint()->GetNode().IsOLENode()
+|| pCmpRange->GetPoint()->GetNode().IsGrfNode()))
+{
+pDirectFly = pCmpRange->GetPoint()->GetNode().FindFlyStartNode();
+}
 
 // collect all anchored somehow to paragraphs
 for( auto pFly : *GetSpzFrameFormats() )
@@ -509,11 +516,23 @@ SwPosFlyFrames SwDoc::GetAllFlyFormats( const SwPaM* 
pCmpRange, bool bDrawAlso,
 {
 const SwFormatAnchor& rAnchor = pFly->GetAnchor();
 SwNode const*const pAnchorNode = rAnchor.GetAnchorNode();
-if (pAnchorNode &&
-((RndStdIds::FLY_AT_PARA == rAnchor

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

2023-07-30 Thread Heiko Tietze (via logerrit)
 sw/source/core/text/inftxt.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 4d7a98b582dc70bbffc78e6622969e218f108433
Author: Heiko Tietze 
AuthorDate: Fri Jul 28 14:38:44 2023 +0200
Commit: Heiko Tietze 
CommitDate: Sun Jul 30 10:52:51 2023 +0200

Related tdf#58434 - Treat ZWSP and WJ as hard space

U+200B ZERO WIDTH SPACE and U+2060 WORD JOINER are not highlighted
anymore if Formatting Aids > Non-breaking spaces is off

Change-Id: Id35fb725bbfa14683ceb31d2043848a66328b364
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155019
Tested-by: Heiko Tietze 
Reviewed-by: خالد حسني 
Reviewed-by: Heiko Tietze 

diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 715780f65269..7544868bc2ee 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1494,6 +1494,7 @@ void SwTextPaintInfo::DrawViewOpt( const SwLinePortion 
&rPor,
 {
 bDraw = PortionType::Footnote != nWhich || 
m_pFrame->IsFootnoteAllowed();
 }
+bDraw &= GetOpt().IsHardBlank();
 break;
 case PortionType::Bookmark:
 // no shading


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

2023-07-30 Thread Khaled Hosny (via logerrit)
 vcl/inc/sallayout.hxx  |4 +++-
 vcl/qa/cppunit/complextext.cxx |   33 +
 vcl/source/gdi/CommonSalLayout.cxx |   15 +++
 3 files changed, 51 insertions(+), 1 deletion(-)

New commits:
commit d4653fa961b1aa1cd4bf568e7d1fe50ae97df484
Author: Khaled Hosny 
AuthorDate: Sun Jul 30 07:12:53 2023 +0300
Commit: خالد حسني 
CommitDate: Sun Jul 30 09:50:11 2023 +0200

tdf#107612: Include NNBSP and Mongolian characters in the same fallback run

When a Mongolian character is preceded by a Narrow No Break Space
(NNBSP), it is used to trigger special letter forms, but when we do font
fallback NNBSP is always taken from the main font (HarfBuzz synthesises
it when missing from the font, so we almost never use font fallback for
it).

We now check if the start of the fallback run is a Mongolian character
and the previous is NNBSP and extend the fallback run to include it.

Change-Id: I7607dba37ee51ff62bc9e86c3dbc555cd77e8d5d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155060
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index dbe3000f8a83..94f0086b1517 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -57,7 +57,7 @@ namespace vcl::text {
 class TextLayoutCache;
 }
 
-class MultiSalLayout final : public SalLayout
+class VCL_DLLPUBLIC MultiSalLayout final : public SalLayout
 {
 public:
 voidDrawText(SalGraphics&) const override;
@@ -86,6 +86,8 @@ public:
   vcl::text::ImplLayoutArgs& 
rMultiArgs,
   const double* pMultiDXArray);
 
+SAL_DLLPRIVATE ImplLayoutRuns* GetFallbackRuns() { return maFallbackRuns; }
+
 virtual ~MultiSalLayout() override;
 
 private:
diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx
index bcb0c9622361..ec6ce0ccd0e2 100644
--- a/vcl/qa/cppunit/complextext.cxx
+++ b/vcl/qa/cppunit/complextext.cxx
@@ -540,4 +540,37 @@ CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testTdf107718)
 #endif
 }
 
+CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testTdf107612)
+{
+#if HAVE_MORE_FONTS
+vcl::Font aFont(u"DejaVu Sans", u"Book", Size(0, 72));
+
+ScopedVclPtrInstance pOutDev;
+pOutDev->SetFont(aFont);
+
+auto pLayout = pOutDev->ImplLayout(u"a\u202F\u1823", 0, -1, Point(0, 0), 
0, {}, {});
+
+// If font fallback happened, then the returned layout must be a
+// MultiSalLayout instance.
+auto pMultiLayout = dynamic_cast(pLayout.get());
+CPPUNIT_ASSERT(pMultiLayout);
+
+auto pFallbackRuns = pMultiLayout->GetFallbackRuns();
+CPPUNIT_ASSERT(!pFallbackRuns->IsEmpty());
+
+bool bRTL;
+int nCharPos = -1;
+std::vector aFallbacks;
+while (pFallbackRuns->GetNextPos(&nCharPos, &bRTL))
+aFallbacks.push_back(nCharPos);
+
+// Assert that U+202F is included in the fallback run.
+// Without the fix this fails with:
+// - Expected: { 2 }
+// - Actual  : { 1, 2 }
+std::vector aExpctedFallbacks = { 1, 2 };
+CPPUNIT_ASSERT_EQUAL(aFallbacks, aExpctedFallbacks);
+#endif
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/CommonSalLayout.cxx 
b/vcl/source/gdi/CommonSalLayout.cxx
index 3a5fdbef0ad0..79f1a0d2c40c 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -128,6 +128,21 @@ void 
GenericSalLayout::SetNeedFallback(vcl::text::ImplLayoutArgs& rArgs, sal_Int
 mxBreak->previousCharacters(rArgs.mrStr, nCharPos, aLocale,
 i18n::CharacterIteratorMode::SKIPCELL, 1, nDone);
 
+// tdf#107612
+// If the start of the fallback run is Mongolian character and the previous
+// character is NNBSP, we want to include the NNBSP in the fallback since
+// it has special uses in Mongolian and have to be in the same text run to
+// work.
+sal_Int32 nTempPos = nGraphemeStartPos;
+if (nGraphemeStartPos > 0)
+{
+auto nCurrChar = rArgs.mrStr.iterateCodePoints(&nTempPos, 0);
+auto nPrevChar = rArgs.mrStr.iterateCodePoints(&nTempPos, -1);
+if (nPrevChar == 0x202F
+&& u_getIntPropertyValue(nCurrChar, UCHAR_SCRIPT) == 
USCRIPT_MONGOLIAN)
+nGraphemeStartPos = nTempPos;
+}
+
 //stay inside the Layout range (e.g. with tdf124116-1.odt)
 nGraphemeStartPos = std::max(rArgs.mnMinCharPos, nGraphemeStartPos);
 nGraphemeEndPos = std::min(rArgs.mnEndCharPos, nGraphemeEndPos);


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

2023-07-30 Thread Andrea Gelmini (via logerrit)
 wizards/source/scriptforge/SF_Platform.xba |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 49fc6598426fb4552904c66702cddc6534124227
Author: Andrea Gelmini 
AuthorDate: Sun Jul 30 00:18:43 2023 +0200
Commit: Julien Nabet 
CommitDate: Sun Jul 30 09:32:01 2023 +0200

Fix typo

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

diff --git a/wizards/source/scriptforge/SF_Platform.xba 
b/wizards/source/scriptforge/SF_Platform.xba
index 8e8aa5330a9d..742d138de9ce 100644
--- a/wizards/source/scriptforge/SF_Platform.xba
+++ b/wizards/source/scriptforge/SF_Platform.xba
@@ -464,7 +464,7 @@ Const cstSubArgs = ""
)
'  Get the UserData page from the Options database
vUserDataOptions = 
SF_Utils._GetRegistryKeyContent("org.openoffice.UserProfile/Data")
-   '  Create and feed the ouput dictionary
+   '  Create and feed the output dictionary
vUserData = 
CreateScriptService("ScriptForge.Dictionary")
For i = 0 To UBound(vUserDataExternal)
vUserData.Add(vUserDataExternal(i), 
vUserDataOptions.getByName(vUserDataInternal(i)))


[Libreoffice-commits] core.git: configure.ac external/bzip2 external/python3 RepositoryExternal.mk

2023-07-30 Thread Taichi Haradaguchi (via logerrit)
 RepositoryExternal.mk  |4 +---
 configure.ac   |   16 
 external/bzip2/ExternalProject_bzip2.mk|1 +
 external/python3/ExternalPackage_python3.mk|1 +
 external/python3/ExternalProject_python3.mk|4 
 external/python3/python-3.5.4-msvc-disable.patch.1 |   12 ++--
 6 files changed, 21 insertions(+), 17 deletions(-)

New commits:
commit 5e3510dbb62229cfb01da371d39ecc27b0d44880
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Wed Sep 7 11:57:48 2022 +0200
Commit: Taichi Haradaguchi <20001...@ymail.ne.jp>
CommitDate: Sun Jul 30 09:20:29 2023 +0200

tdf#116412: include bz2 in internal python

Change-Id: Ie257446692227ae689fad2e61a42405a68e4f665
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139580
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp>

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 0d70c7e966fb..e272cf7e991e 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -4136,7 +4136,6 @@ endef
 
 endif
 
-ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
 ifneq ($(SYSTEM_BZIP2),)
 
 define gb_LinkTarget__use_bzip2
@@ -4175,8 +4174,7 @@ define gb_ExternalProject__use_bzip2
 $(call gb_ExternalProject_use_external_project,$(1),bzip2)
 endef
 
-endif
-endif
+endif # SYSTEM_BZIP2
 
 define gb_LinkTarget__use_clew
 $(call gb_LinkTarget_set_include,$(1), \
diff --git a/configure.ac b/configure.ac
index ca0bdbcadfe7..7e60bd70cc02 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2194,7 +2194,8 @@ AC_ARG_WITH(system-libs,
 
 AC_ARG_WITH(system-bzip2,
 AS_HELP_STRING([--with-system-bzip2],
-[Use bzip2 already on system. Used only when 
--enable-online-update=mar]),,
+[Use bzip2 already on system. Used when --enable-online-update=mar
+ or --enable-python=internal]),,
 [with_system_bzip2="$with_system_libs"])
 
 AC_ARG_WITH(system-headers,
@@ -13551,17 +13552,16 @@ AC_SUBST(PRIVACY_POLICY_URL)
 dnl ===
 dnl Test whether we need bzip2
 dnl ===
-SYSTEM_BZIP2=
-if test "$ENABLE_ONLINE_UPDATE_MAR" = "TRUE"; then
+if test "$ENABLE_ONLINE_UPDATE_MAR" = "TRUE" -o "$enable_python" = "internal"; 
then
 AC_MSG_CHECKING([whether to use system bzip2])
 if test "$with_system_bzip2" = yes; then
+AC_MSG_RESULT([external])
 SYSTEM_BZIP2=TRUE
-AC_MSG_RESULT([yes])
-PKG_CHECK_MODULES(BZIP2, bzip2)
-FilterLibs "${BZIP2_LIBS}"
-BZIP2_LIBS="${filteredlibs}"
+AC_CHECK_HEADER(bzlib.h, [], [AC_MSG_ERROR(bzlib.h not found. please 
install bzip2.)], [])
+AC_CHECK_LIB([bz2], [BZ2_bzDecompressInit], [:], [AC_MSG_ERROR(libbz2 
not found or functional.)], [])
 else
-AC_MSG_RESULT([no])
+AC_MSG_RESULT([internal])
+SYSTEM_BZIP2=
 BUILD_TYPE="$BUILD_TYPE BZIP2"
 fi
 fi
diff --git a/external/bzip2/ExternalProject_bzip2.mk 
b/external/bzip2/ExternalProject_bzip2.mk
index 8b37bcd27151..b4c93a356ccc 100644
--- a/external/bzip2/ExternalProject_bzip2.mk
+++ b/external/bzip2/ExternalProject_bzip2.mk
@@ -27,6 +27,7 @@ $(call gb_ExternalProject_get_state_target,bzip2,build):
$(call gb_Trace_StartRange,bzip2,EXTERNAL)
$(call gb_ExternalProject_run,build,\
$(MAKE) \
+   CC="$(CC) -fPIC" \
)
$(call gb_Trace_EndRange,bzip2,EXTERNAL)
 endif
diff --git a/external/python3/ExternalPackage_python3.mk 
b/external/python3/ExternalPackage_python3.mk
index 1f29c9efbebb..5b67765bc930 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -65,6 +65,7 @@ python3_EXTENSION_MODULES= \
LO_lib/binascii.$(python3_EXTENSION_MODULE_SUFFIX).so \
LO_lib/_bisect.$(python3_EXTENSION_MODULE_SUFFIX).so \
LO_lib/_blake2.$(python3_EXTENSION_MODULE_SUFFIX).so \
+   LO_lib/_bz2.$(python3_EXTENSION_MODULE_SUFFIX).so \
LO_lib/cmath.$(python3_EXTENSION_MODULE_SUFFIX).so \
LO_lib/_codecs_cn.$(python3_EXTENSION_MODULE_SUFFIX).so \
LO_lib/_codecs_hk.$(python3_EXTENSION_MODULE_SUFFIX).so \
diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index f1c5f6d9b4a5..0b91f0774886 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -10,6 +10,7 @@
 $(eval $(call gb_ExternalProject_ExternalProject,python3))
 
 $(eval $(call gb_ExternalProject_use_externals,python3,\
+   bzip2 \
expat \
$(if $(filter WNT LINUX,$(OS)),libffi) \
openssl \
@@ -36,6 +37,7 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
$(call gb_Trace_StartRange,python3,EXTERNAL)
$(call gb_ExternalProject_run,build,\