Re: Build fail in mariadb on fedora 40

2024-05-18 Thread Dr. David Alan Gilbert
* Julien Nabet (serval2...@yahoo.fr) wrote:
> On 17/05/2024 15:47, Dr. David Alan Gilbert wrote:
> > Hi,
> >I'm getting:
> > 
> > workdir/UnpackedTarball/mariadb-connector-c/libmariadb/ma_client_plugin.c:87:207:
> >  error: initialization of ‘struct st_mysql_client_plugin *’ from 
> > incompatible pointer type ‘struct st_mysql_client_plugin_AUTHENTICATION *’ 
> > [-Wincompatible-pointer-types]
> > 87 |(struct st_mysql_client_plugin *)_socket_client_plugin, 
> > (struct st_mysql_client_plugin *)_sha2_password_client_plugin, 
> > (struct st_mysql_client_plugin *)_native_password_client_plugin, 
> > (struct st_mysql_client_plugin_AUTHENTICATION 
> > *)_gssapi_client_client_plugin,
> >|
> > 
> >^
> > /discs/fast/core/workdir/UnpackedTarball/mariadb-connector-c/libmariadb/ma_client_plugin.c:87:207:
> >  note: (near initialization for ‘mysql_client_builtins[3]’)
> > make[1]: *** [/discs/fast/core/solenv/gbuild/LinkTarget.mk:366: 
> > /discs/fast/core/workdir/GenCObject/UnpackedTarball/mariadb-connector-c/libmariadb/ma_client_plugin.o]
> >  Error 1
> > make[1]: *** Waiting for unfinished jobs
> > make: *** [Makefile:294: build] Error 2
> > 
> > Host: Fedora 40, x86-64
> > configured with:
> > ./configure --srcdir=/discs/fast/core --enable-option-checking=fatal 
> > --enable-debug
> > 
> > using --with-system-mariadb fixed it.
> 
> Hello David,

Hi Julien,
  Thanks for the reply.

> Sorry, I don't  know why you encounter this :-(

It looks like others started hitting it; see:
  https://gerrit.libreoffice.org/c/core/+/167806
(I believe as a windows user)

> If it can help, here's the content of my autogen.input:
> 
> CC=clang
> CXX=clang++

Hmm I'm using gcc instead, but I don't see how the cast
would be valid:

UnpackedTarball/mariadb-connector-c/include/mysql/client_plugin.h has:

#include 

struct st_mysql_client_plugin_AUTHENTICATION
{
  MYSQL_CLIENT_PLUGIN_HEADER
  int (*authenticate_user)(MYSQL_PLUGIN_VIO *vio, struct st_mysql *mysql);
};

although, hmm, that header also defines:
#define mysql_declare_client_plugin(X)  \
 struct st_mysql_client_plugin_ ## X\
_mysql_client_plugin_declaration_ = {   \
  MYSQL_CLIENT_ ## X ## _PLUGIN,\
  MYSQL_CLIENT_ ## X ## _PLUGIN_INTERFACE_VERSION,
#define mysql_end_client_plugin }

which is curiously different from the system 
/usr/include/mysql/server/mysql/client_plugin.h

#define mysql_declare_client_plugin(X)  \
 C_MODE_START MYSQL_PLUGIN_EXPORT_C \
struct st_mysql_client_plugin_ ## X\
_mysql_client_plugin_declaration_ = {   \
  MYSQL_CLIENT_ ## X ## _PLUGIN,\
  MYSQL_CLIENT_ ## X ## _PLUGIN_INTERFACE_VERSION,
#define mysql_end_client_plugin }; C_MODE_END

so those C_MODE_START/END make me think someone is doing something
funky with the compiler anyway.

Dave


> --enable-ld=lld
> --enable-online-update
> --enable-dbgutil
> --enable-evolution2
> --enable-gtk4
> --enable-qt5
> --enable-kf5
> --enable-gtk3-kde5
> --enable-skia=debug
> --enable-ext-nlpsolver
> --enable-ext-numbertext
> --enable-ext-wiki-publisher
> --enable-dbus
> --enable-werror
> --enable-dependency-tracking
> --enable-python=fully-internal
> --without-system-mariadb
> --enable-bundle-mariadb
> --enable-symbols
> --enable-avahi
> --enable-eot
> --enable-odk
> --with-lang=en-US de es fr hu it ja nl pt pt-BR ru nb nn
> --with-myspell-dicts
> 
> Julien
> 
-- 
 -Open up your eyes, open up your mind, open up your code ---   
/ Dr. David Alan Gilbert|   Running GNU/Linux   | Happy  \ 
\dave @ treblig.org |   | In Hex /
 \ _|_ http://www.treblig.org   |___/


Build fail in mariadb on fedora 40

2024-05-17 Thread Dr. David Alan Gilbert
Hi,
  I'm getting:

workdir/UnpackedTarball/mariadb-connector-c/libmariadb/ma_client_plugin.c:87:207:
 error: initialization of ‘struct st_mysql_client_plugin *’ from incompatible 
pointer type ‘struct st_mysql_client_plugin_AUTHENTICATION *’ 
[-Wincompatible-pointer-types]
   87 |(struct st_mysql_client_plugin *)_socket_client_plugin, (struct 
st_mysql_client_plugin *)_sha2_password_client_plugin, (struct 
st_mysql_client_plugin *)_native_password_client_plugin, (struct 
st_mysql_client_plugin_AUTHENTICATION *)_gssapi_client_client_plugin,
  | 

  ^
/discs/fast/core/workdir/UnpackedTarball/mariadb-connector-c/libmariadb/ma_client_plugin.c:87:207:
 note: (near initialization for ‘mysql_client_builtins[3]’)
make[1]: *** [/discs/fast/core/solenv/gbuild/LinkTarget.mk:366: 
/discs/fast/core/workdir/GenCObject/UnpackedTarball/mariadb-connector-c/libmariadb/ma_client_plugin.o]
 Error 1
make[1]: *** Waiting for unfinished jobs
make: *** [Makefile:294: build] Error 2

Host: Fedora 40, x86-64
configured with:
./configure --srcdir=/discs/fast/core --enable-option-checking=fatal 
--enable-debug

using --with-system-mariadb fixed it.

  I originally filed this as:

https://bugs.documentfoundation.org/show_bug.cgi?id=161141

However Ilmari pointed out that being a build bug it should be
here.
See the bug for my config.log.

(cc'ing Julien since I see they did some stuff around there.)

Dave
-- 
 -Open up your eyes, open up your mind, open up your code ---   
/ Dr. David Alan Gilbert|   Running GNU/Linux   | Happy  \ 
\dave @ treblig.org |   | In Hex /
 \ _|_ http://www.treblig.org   |___/


Re: Isolating qa data?

2024-04-05 Thread Dr. David Alan Gilbert
* Miklos Vajna (vmik...@collabora.com) wrote:
> Hi Dave,
> 
> On Wed, Apr 03, 2024 at 03:26:42PM +0000, "Dr. David Alan Gilbert" 
>  wrote:
> >   What I'm thinking is that a cautious packager could set it up so
> > that during the build qa/data wasn't readable, then having built and
> > copied their installation out, then they could perform a make check
> > having reenabled access to qa/data/
> 
> I wonder if this would be doable also at the current setup. Something
> like search for all "data" directories under */qa/, delete them, do the
> build, 'git checkout -f' to do undo the delete and then 'make check'?

Yeh, I guess possible; I'm not sure what's easiest for packagers.
(I was thinking along the lines of a permissions or blank directory mounted
over it).

Actually, a quick hunt for where we have docs shows they're a bit more
spread around; e.g. 
  ./sw/qa/core/exportdata/rtf/pass
  ./sc/qa/extras/testdocuments
  ./odk/examples/basic/sheet
  ./pyuno/qa/pytests/testdocuments

so a simplefind . -path .*qa/*/data
isn't sufficient.

Dave

> 
> Regards,
> 
> Miklos
-- 
 -----Open up your eyes, open up your mind, open up your code ---   
/ Dr. David Alan Gilbert|   Running GNU/Linux   | Happy  \ 
\dave @ treblig.org |   | In Hex /
 \ _|_ http://www.treblig.org   |___/


Isolating qa data?

2024-04-03 Thread Dr. David Alan Gilbert
Hi,
  Given the xz hack, would it make sense to isolate the qa data files
under a single directory, e.g. qa/data/vcl/cppunit/pdfexport rather
than vcl/qa/cppunit/pdfexport ?

  What I'm thinking is that a cautious packager could set it up so
that during the build qa/data wasn't readable, then having built and
copied their installation out, then they could perform a make check
having reenabled access to qa/data/

 To be clear I'm not worrying particularly about LO,
but fundamentally a lot of the test files start off as random bug reports
and it's rare to look inside the test files for anything odd.

 Just an idea,

Dave
-- 
 -Open up your eyes, open up your mind, open up your code ---   
/ Dr. David Alan Gilbert|   Running GNU/Linux   | Happy  \ 
\dave @ treblig.org |   | In Hex /
 \ _|_ http://www.treblig.org   |___/


David Carter License statement

2024-03-16 Thread David
All of my past & future contributions to LibreOffice may be
   licensed under the MPLv2/LGPLv3+ dual license.

Very Respectfully,

David Carter


core.git: sdext/source

2024-03-06 Thread Dr. David Alan Gilbert (via logerrit)
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |   42 --
 1 file changed, 20 insertions(+), 22 deletions(-)

New commits:
commit 1a7f06f01315992b9dfb05e1f9c46307cd72dac8
Author: Dr. David Alan Gilbert 
AuthorDate: Mon Mar 4 01:56:56 2024 +
Commit: Noel Grandin 
CommitDate: Thu Mar 7 07:04:08 2024 +0100

sdext.pdfimport: Use std::unique_ptr

as per Noel's suggestion - this also ends up fixing some leaks as well.

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

diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx 
b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index ec2632b74899..603155a2036e 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -453,8 +453,8 @@ static void flipSplashBitmap(SplashBitmap *pBitmap)
 auto nRowSize = static_cast(pBitmap->getRowSize());
 auto nAlphaRowSize = static_cast(pBitmap->getAlphaRowSize());
 
-auto aTmpRow = new unsigned char[nRowSize];
-auto aTmpAlphaRow = new unsigned char[nAlphaRowSize];
+std::unique_ptr aTmpRow(new unsigned char[nRowSize]);
+std::unique_ptr aTmpAlphaRow(new unsigned 
char[nAlphaRowSize]);
 
 auto pBitmapData = pBitmap->getDataPtr();
 auto pAlphaData = pBitmap->getAlphaPtr();
@@ -470,16 +470,14 @@ static void flipSplashBitmap(SplashBitmap *pBitmap)
  nCur++, pCurRowA+=nRowSize, pCurRowB-=nRowSize,
  pCurAlphaA+=nAlphaRowSize, pCurAlphaB-=nAlphaRowSize)
 {
-memcpy(aTmpRow, pCurRowA, nRowSize);
+memcpy(aTmpRow.get(), pCurRowA, nRowSize);
 memcpy(pCurRowA, pCurRowB, nRowSize);
-memcpy(pCurRowB, aTmpRow, nRowSize);
+memcpy(pCurRowB, aTmpRow.get(), nRowSize);
 
-memcpy(aTmpAlphaRow, pCurAlphaA, nAlphaRowSize);
+memcpy(aTmpAlphaRow.get(), pCurAlphaA, nAlphaRowSize);
 memcpy(pCurAlphaA, pCurAlphaB, nAlphaRowSize);
-memcpy(pCurAlphaB, aTmpAlphaRow, nAlphaRowSize);
+memcpy(pCurAlphaB, aTmpAlphaRow.get(), nAlphaRowSize);
 }
-delete[] aTmpRow;
-delete[] aTmpAlphaRow;
 }
 
 int PDFOutDev::parseFont( long long nNewId, GfxFont* gfxFont, const GfxState* 
state ) const
@@ -1268,13 +1266,15 @@ poppler_bool PDFOutDev::tilingPatternFill(GfxState 
*state, Gfx *, Catalog *,
 
 auto pSplashGfx = new Gfx(m_pDoc, pSplashOut, pResDict, , nullptr);
 pSplashGfx->display(aStr);
-auto pSplashBitmap = pSplashOut->takeBitmap();
+std::unique_ptr pSplashBitmap(pSplashOut->takeBitmap());
+// Poppler tells us to free the splash device immediately after taking the
+// bitmap
 delete pSplashGfxState;
 delete pSplashGfx;
 delete pSplashOut;
 
 // Add a vertical flip, we can't do this in LO for an image filled poly
-flipSplashBitmap(pSplashBitmap);
+flipSplashBitmap(pSplashBitmap.get());
 
 auto nBitmapWidth = static_cast(pSplashBitmap->getWidth());
 auto nBitmapHeight = static_cast(pSplashBitmap->getHeight());
@@ -1300,23 +1300,21 @@ poppler_bool PDFOutDev::tilingPatternFill(GfxState 
*state, Gfx *, Catalog *,
 }
 }
 
-auto pRgbStr = new MemStream(pBitmapData, 0,
-nBitmapWidth * nBitmapHeight * 3, Object(objNull));
-auto pAlphaStr = new MemStream(reinterpret_cast(pSplashBitmap->getAlphaPtr()), 0,
-nBitmapWidth * nBitmapHeight, Object(objNull));
+std::unique_ptr pRgbStr(new MemStream(pBitmapData, 0,
+nBitmapWidth * nBitmapHeight * 3, Object(objNull)));
+std::unique_ptr pAlphaStr(new MemStream(reinterpret_cast(pSplashBitmap->getAlphaPtr()),
+0, nBitmapWidth * nBitmapHeight, Object(objNull)));
 auto aDecode = Object(objNull);
-auto pRgbIdentityColorMap = new GfxImageColorMap(8, , new 
GfxDeviceRGBColorSpace());
-auto pGrayIdentityColorMap = new GfxImageColorMap(8, , new 
GfxDeviceGrayColorSpace());
+std::unique_ptr pRgbIdentityColorMap(new 
GfxImageColorMap(8, ,
+new GfxDeviceRGBColorSpace()));
+std::unique_ptr pGrayIdentityColorMap(new 
GfxImageColorMap(8, ,
+new GfxDeviceGrayColorSpace()));
 
 OutputBuffer aBuf; initBuf(aBuf);
-writePng_(aBuf, pRgbStr, nBitmapWidth, nBitmapHeight, pRgbIdentityColorMap,
-pAlphaStr, nBitmapWidth, nBitmapHeight, pGrayIdentityColorMap);
+writePng_(aBuf, pRgbStr.get(), nBitmapWidth, nBitmapHeight, 
pRgbIdentityColorMap.get(),
+pAlphaStr.get(), nBitmapWidth, nBitmapHeight, 
pGrayIdentityColorMap.get());
 writeBinaryBuffer(aBuf);
 
-delete pAlphaStr;
-delete pRgbStr;
-delete pSplashBitmap;
-
 // If we return false here we can fall back to the slow path
 return true;
 }


core.git: sdext/source

2024-02-28 Thread Dr. David Alan Gilbert (via logerrit)
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cf776a6fa697924deb7df5c0561e12bbd7cda16a
Author: Dr. David Alan Gilbert 
AuthorDate: Sun Feb 18 22:01:43 2024 +
Commit: Noel Grandin 
CommitDate: Thu Feb 29 08:28:48 2024 +0100

tdf#113050 sdext.pdfimport: Enable tilingPatternFill

Now we've got everything wired up, turn it on.

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

diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx 
b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
index f38bf423423b..2a8078422def 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
@@ -284,7 +284,7 @@ namespace pdfi
 static void setPageNum( int nNumPages );
 void setSkipImages ( bool bSkipImages );
 #if POPPLER_CHECK_VERSION(21, 3, 0)
-poppler_bool useTilingPatternFill() override { return false; };
+poppler_bool useTilingPatternFill() override { return true; };
 poppler_bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat,
GfxTilingPattern *tPat, const double 
*mat,
int x0, int y0, int x1, int y1,


core.git: sdext/source

2024-02-28 Thread Dr. David Alan Gilbert (via logerrit)
 sdext/source/pdfimport/tree/drawtreevisiting.cxx   |2 ++
 sdext/source/pdfimport/tree/pdfiprocessor.cxx  |7 ++-
 sdext/source/pdfimport/tree/writertreevisiting.cxx |3 ++-
 3 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 81fbaf4bb9ddc385d4452257d731e4097dfed079
Author: Dr. David Alan Gilbert 
AuthorDate: Thu Feb 15 00:18:01 2024 +
Commit: Noel Grandin 
CommitDate: Thu Feb 29 08:28:31 2024 +0100

tdf#113050 sdext.pdfimport: Set and write TileWidth/Height

Set the tile width/height from the step size and write it into the
draw:fill-image-width/height properties.

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

diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx 
b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
index 2c02adde8874..7897dbae9d08 100644
--- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
@@ -826,6 +826,8 @@ void DrawXmlFinalizer::visit( PolyPolyElement& elem, const 
std::list< std::uniqu
 aGCProps[ "draw:fill-image-name" ] =
 m_rStyleContainer.getStyleName(
 m_rStyleContainer.getStyleId(style));
+aGCProps[ "draw:fill-image-width" ] = 
unitMMString(convPx2mm(elem.TileWidth));
+aGCProps[ "draw:fill-image-height" ] = 
unitMMString(convPx2mm(elem.TileHeight));
 
 }
 
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx 
b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
index 6f4b45f21a40..2483144250b8 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
@@ -428,12 +428,17 @@ void PDFIProcessor::tilingPatternFill(int nX0, int nY0, 
int nX1, int nY1,
 }
 // TODO: That clipping might shift the fill pattern offsets
 
+double transformedxStep = nxStep * rMat.m00 + nyStep * rMat.m01;
+double transformedyStep = nxStep * rMat.m10 + nyStep * rMat.m11;
+
 auto pPolyElement = ElementFactory::createPolyPolyElement(
 m_pCurElement,
 getGCId(getCurrentContext()),
 aB2DPoly,
 PATH_EOFILL, // Hmm how do I know if this should be EO or not?
-nTile, 0, 0 );
+nTile,
+transformedxStep * aScale.getX(),
+transformedyStep * -aScale.getY());
 pPolyElement->updateGeometry();
 pPolyElement->ZOrder = m_nNextZOrder++;
 }
diff --git a/sdext/source/pdfimport/tree/writertreevisiting.cxx 
b/sdext/source/pdfimport/tree/writertreevisiting.cxx
index 746fc9e77eb2..9012aaa21038 100644
--- a/sdext/source/pdfimport/tree/writertreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/writertreevisiting.cxx
@@ -1004,7 +1004,8 @@ void WriterXmlFinalizer::visit( PolyPolyElement& elem, 
const std::list< std::uni
 aGCProps[ "draw:fill-image-name" ] =
 m_rStyleContainer.getStyleName(
 m_rStyleContainer.getStyleId(style));
-
+aGCProps[ "draw:fill-image-width" ] = 
unitMMString(convPx2mm(elem.TileWidth));
+aGCProps[ "draw:fill-image-height" ] = 
unitMMString(convPx2mm(elem.TileHeight));
 }
 
 // TODO(F1): check whether stuff could be emulated by gradient/bitmap/hatch


core.git: sdext/source

2024-02-28 Thread Dr. David Alan Gilbert (via logerrit)
 sdext/source/pdfimport/inc/genericelements.hxx  |   11 ---
 sdext/source/pdfimport/tree/genericelements.cxx |8 ++--
 sdext/source/pdfimport/tree/pdfiprocessor.cxx   |8 
 3 files changed, 18 insertions(+), 9 deletions(-)

New commits:
commit 784696e47c7f28dac111b95e61f06a9a1f7cdc97
Author: Dr. David Alan Gilbert 
AuthorDate: Wed Feb 14 00:25:13 2024 +
Commit: Noel Grandin 
CommitDate: Thu Feb 29 08:28:08 2024 +0100

tdf#113050 sdext.pdfimport: Add TileWidth and TileHeight fields

We need to scale the tiled image that fills our polygon, so add
width and height fields, we'll fill in and process them in subsequent
patches.

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

diff --git a/sdext/source/pdfimport/inc/genericelements.hxx 
b/sdext/source/pdfimport/inc/genericelements.hxx
index 4332d4f1372b..705773b9893a 100644
--- a/sdext/source/pdfimport/inc/genericelements.hxx
+++ b/sdext/source/pdfimport/inc/genericelements.hxx
@@ -213,7 +213,8 @@ namespace pdfi
 friend class ElementFactory;
 PolyPolyElement( Element* pParent, sal_Int32 nGCId,
  const basegfx::B2DPolyPolygon& rPolyPoly,
- sal_Int8 nAction, ImageId nFillImage );
+ sal_Int8 nAction, ImageId nFillImage,
+ double nTileWidth, double nTileHeight );
 public:
 virtual void visitedBy( ElementTreeVisitor&, const std::list< 
std::unique_ptr >::const_iterator& rParentIt ) override;
 
@@ -226,6 +227,8 @@ namespace pdfi
 basegfx::B2DPolyPolygon PolyPoly;
 sal_Int8Action;
 ImageId FillImage;
+double  TileWidth;
+double  TileHeight;
 };
 
 struct ImageElement final : public DrawElement
@@ -300,8 +303,10 @@ namespace pdfi
 createPolyPolyElement( Element* pParent,
sal_Int32 nGCId,
const basegfx::B2DPolyPolygon& rPolyPoly,
-   sal_Int8 nAction, ImageId nFillImage )
-{ return new PolyPolyElement( pParent, nGCId, rPolyPoly, nAction, 
nFillImage ); }
+   sal_Int8 nAction, ImageId nFillImage,
+   double nTileWidth, double nTileHeight )
+{ return new PolyPolyElement( pParent, nGCId, rPolyPoly, nAction,
+  nFillImage, nTileWidth, nTileHeight ); }
 static ImageElement* createImageElement( Element* pParent, sal_Int32 
nGCId, ImageId nImage )
 { return new ImageElement( pParent, nGCId, nImage ); }
 
diff --git a/sdext/source/pdfimport/tree/genericelements.cxx 
b/sdext/source/pdfimport/tree/genericelements.cxx
index 100e145608aa..aec9c999fcf6 100644
--- a/sdext/source/pdfimport/tree/genericelements.cxx
+++ b/sdext/source/pdfimport/tree/genericelements.cxx
@@ -125,11 +125,15 @@ PolyPolyElement::PolyPolyElement( Element*
   pParent,
   sal_Int32  nGCId,
   const basegfx::B2DPolyPolygon& rPolyPoly,
   sal_Int8   nAction,
-  ImageIdnFillImage )
+  ImageIdnFillImage,
+  double nTileWidth,
+  double nTileHeight )
 : DrawElement( pParent, nGCId ),
   PolyPoly( rPolyPoly ),
   Action( nAction ),
-  FillImage( nFillImage )
+  FillImage( nFillImage ),
+  TileWidth( nTileWidth ),
+  TileHeight( nTileHeight )
 {
 }
 
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx 
b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
index 0ef30a176ed2..6f4b45f21a40 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
@@ -433,7 +433,7 @@ void PDFIProcessor::tilingPatternFill(int nX0, int nY0, int 
nX1, int nY1,
 getGCId(getCurrentContext()),
 aB2DPoly,
 PATH_EOFILL, // Hmm how do I know if this should be EO or not?
-nTile );
+nTile, 0, 0 );
 pPolyElement->updateGeometry();
 pPolyElement->ZOrder = m_nNextZOrder++;
 }
@@ -448,7 +448,7 @@ void PDFIProcessor::strokePath( const uno::Reference< 
rendering::XPolyPolygon2D
 getGCId(getCurrentContext()),
 aPoly,
 PATH_STROKE,
--1 );
+-1, 0, 0 );
 pPoly->updateGeometry();
 pPoly->ZOrder = m_nNextZOrder++;
 }
@@ -463,7 +463,7 @@ void PDFIProcessor::fillPath( const uno::Reference< 
rendering::XPolyPol

core.git: sdext/source

2024-02-28 Thread Dr. David Alan Gilbert (via logerrit)
 sdext/source/pdfimport/tree/drawtreevisiting.cxx   |   21 -
 sdext/source/pdfimport/tree/writertreevisiting.cxx |   21 -
 2 files changed, 40 insertions(+), 2 deletions(-)

New commits:
commit 4b295b1b77b33c9a5b5fcfab58132ca0dcb7f90b
Author: Dr. David Alan Gilbert 
AuthorDate: Mon Feb 12 01:24:07 2024 +
Commit: Noel Grandin 
CommitDate: Thu Feb 29 08:27:48 2024 +0100

tdf#113050 sdext.pdfimport: Create the fill-image style and use it

In a poly which is being image filled, we need to create a style
with the actual image definition in the 'Contents'
and then set the (automatically created) name of this in
the prop on the main style.
Also we need to set draw:fill to "bitmap" rather than "solid"

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

diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx 
b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
index 5aae54415800..2c02adde8874 100644
--- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
@@ -817,10 +817,29 @@ void DrawXmlFinalizer::visit( PolyPolyElement& elem, 
const std::list< std::uniqu
 aGCProps[ "draw:stroke" ] = "none";
 }
 
+if (elem.FillImage != -1)
+{
+PropertyMap props;
+// The image isn't actually in a prop, it's in an extra chunk inside.
+StyleContainer::Style style("draw:fill-image"_ostr, std::move(props));
+style.Contents = 
m_rProcessor.getImages().asBase64EncodedString(elem.FillImage);
+aGCProps[ "draw:fill-image-name" ] =
+m_rStyleContainer.getStyleName(
+m_rStyleContainer.getStyleId(style));
+
+}
+
 // TODO(F1): check whether stuff could be emulated by gradient/bitmap/hatch
 if( elem.Action & (PATH_FILL | PATH_EOFILL) )
 {
-aGCProps[ "draw:fill" ]   = "solid";
+if (elem.FillImage == -1)
+{
+aGCProps[ "draw:fill" ]   = "solid";
+}
+else
+{
+aGCProps[ "draw:fill" ]   = "bitmap";
+}
 aGCProps[ "draw:fill-color" ] = getColorString(rGC.FillColor);
 if (rGC.FillColor.Alpha != 1.0)
 aGCProps["draw:opacity"] = getPercentString(rGC.FillColor.Alpha * 
100.0);
diff --git a/sdext/source/pdfimport/tree/writertreevisiting.cxx 
b/sdext/source/pdfimport/tree/writertreevisiting.cxx
index 9ecce8f48be4..746fc9e77eb2 100644
--- a/sdext/source/pdfimport/tree/writertreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/writertreevisiting.cxx
@@ -995,10 +995,29 @@ void WriterXmlFinalizer::visit( PolyPolyElement& elem, 
const std::list< std::uni
 aGCProps[ "draw:stroke" ] = "none";
 }
 
+if (elem.FillImage != -1)
+{
+PropertyMap props;
+// The image isn't actually in a prop, it's in an extra chunk inside.
+StyleContainer::Style style("draw:fill-image"_ostr, std::move(props));
+style.Contents = 
m_rProcessor.getImages().asBase64EncodedString(elem.FillImage);
+aGCProps[ "draw:fill-image-name" ] =
+m_rStyleContainer.getStyleName(
+m_rStyleContainer.getStyleId(style));
+
+}
+
 // TODO(F1): check whether stuff could be emulated by gradient/bitmap/hatch
 if( elem.Action & (PATH_FILL | PATH_EOFILL) )
 {
-aGCProps[ "draw:fill" ]   = "solid";
+if (elem.FillImage == -1)
+{
+aGCProps[ "draw:fill" ]   = "solid";
+}
+else
+{
+aGCProps[ "draw:fill" ]   = "bitmap";
+}
 aGCProps[ "draw:fill-color" ] = getColorString( rGC.FillColor );
 }
 else


core.git: sdext/source

2024-02-28 Thread Dr. David Alan Gilbert (via logerrit)
 sdext/source/pdfimport/inc/pdfiprocessor.hxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 9f21f816a16914e06ff141a800a63f0966e387b2
Author: Dr. David Alan Gilbert 
AuthorDate: Mon Feb 12 01:29:38 2024 +
Commit: Noel Grandin 
CommitDate: Thu Feb 29 08:26:58 2024 +0100

tdf#113050 sdext.pdfimport: Expose the ImageContainer const

I need the finalisers to be able to read an image, they have
a ref to the processor but not the emitter; so allow the container
to be read via the processor reference.

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

diff --git a/sdext/source/pdfimport/inc/pdfiprocessor.hxx 
b/sdext/source/pdfimport/inc/pdfiprocessor.hxx
index 40cdbfdd48c9..89a09d1780bf 100644
--- a/sdext/source/pdfimport/inc/pdfiprocessor.hxx
+++ b/sdext/source/pdfimport/inc/pdfiprocessor.hxx
@@ -71,6 +71,7 @@ namespace pdfi
 const GraphicsContext& getGraphicsContext( sal_Int32 nGCId ) const;
 GraphicsContext& getCurrentContext() { return m_aGCStack.back(); }
 const GraphicsContext& getCurrentContext() const { return 
m_aGCStack.back(); }
+const ImageContainer& getImages() const { return m_aImages; };
 
 const css::uno::Reference< css::task::XStatusIndicator >& 
getStatusIndicator() const
 { return m_xStatusIndicator; }


core.git: sdext/source

2024-02-28 Thread Dr. David Alan Gilbert (via logerrit)
 sdext/source/pdfimport/inc/genericelements.hxx  |7 ---
 sdext/source/pdfimport/tree/genericelements.cxx |6 --
 sdext/source/pdfimport/tree/pdfiprocessor.cxx   |   15 ++-
 3 files changed, 18 insertions(+), 10 deletions(-)

New commits:
commit 2bf5664823e7ef71d917fe95a2c3d92e46d77c32
Author: Dr. David Alan Gilbert 
AuthorDate: Mon Feb 12 01:14:06 2024 +
Commit: Noel Grandin 
CommitDate: Thu Feb 29 08:26:40 2024 +0100

tdf#113050 sdext.pdfimport: Add FillImage field to PolyPolyElement

Use -1 to mean the existing solid fill, otherwise it's the ID
of the image to use as the fill.

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

diff --git a/sdext/source/pdfimport/inc/genericelements.hxx 
b/sdext/source/pdfimport/inc/genericelements.hxx
index 6d1459a1f032..4332d4f1372b 100644
--- a/sdext/source/pdfimport/inc/genericelements.hxx
+++ b/sdext/source/pdfimport/inc/genericelements.hxx
@@ -213,7 +213,7 @@ namespace pdfi
 friend class ElementFactory;
 PolyPolyElement( Element* pParent, sal_Int32 nGCId,
  const basegfx::B2DPolyPolygon& rPolyPoly,
- sal_Int8 nAction );
+ sal_Int8 nAction, ImageId nFillImage );
 public:
 virtual void visitedBy( ElementTreeVisitor&, const std::list< 
std::unique_ptr >::const_iterator& rParentIt ) override;
 
@@ -225,6 +225,7 @@ namespace pdfi
 
 basegfx::B2DPolyPolygon PolyPoly;
 sal_Int8Action;
+ImageId FillImage;
 };
 
 struct ImageElement final : public DrawElement
@@ -299,8 +300,8 @@ namespace pdfi
 createPolyPolyElement( Element* pParent,
sal_Int32 nGCId,
const basegfx::B2DPolyPolygon& rPolyPoly,
-   sal_Int8 nAction)
-{ return new PolyPolyElement( pParent, nGCId, rPolyPoly, nAction ); }
+   sal_Int8 nAction, ImageId nFillImage )
+{ return new PolyPolyElement( pParent, nGCId, rPolyPoly, nAction, 
nFillImage ); }
 static ImageElement* createImageElement( Element* pParent, sal_Int32 
nGCId, ImageId nImage )
 { return new ImageElement( pParent, nGCId, nImage ); }
 
diff --git a/sdext/source/pdfimport/tree/genericelements.cxx 
b/sdext/source/pdfimport/tree/genericelements.cxx
index 1d11cd0d914e..100e145608aa 100644
--- a/sdext/source/pdfimport/tree/genericelements.cxx
+++ b/sdext/source/pdfimport/tree/genericelements.cxx
@@ -124,10 +124,12 @@ void ImageElement::visitedBy( ElementTreeVisitor& 
 rVisi
 PolyPolyElement::PolyPolyElement( Element*   pParent,
   sal_Int32  nGCId,
   const basegfx::B2DPolyPolygon& rPolyPoly,
-  sal_Int8   nAction )
+  sal_Int8   nAction,
+  ImageIdnFillImage )
 : DrawElement( pParent, nGCId ),
   PolyPoly( rPolyPoly ),
-  Action( nAction )
+  Action( nAction ),
+  FillImage( nFillImage )
 {
 }
 
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx 
b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
index 32280f8fd110..0ef30a176ed2 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
@@ -389,9 +389,10 @@ void PDFIProcessor::tilingPatternFill(int nX0, int nY0, 
int nX1, int nY1,
   double nxStep, double nyStep,
   int /* nPaintType */,
   css::geometry::AffineMatrix2D& rMat,
-  const 
css::uno::Sequence& /*xTile*/)
+  const 
css::uno::Sequence& xTile)
 {
 const GraphicsContext& rGC(getCurrentContext());
+auto nTile = m_aImages.addImage(xTile);
 
 basegfx::B2DTuple aScale, aTranslation;
 double fRotate, fShearX;
@@ -431,7 +432,8 @@ void PDFIProcessor::tilingPatternFill(int nX0, int nY0, int 
nX1, int nY1,
 m_pCurElement,
 getGCId(getCurrentContext()),
 aB2DPoly,
-PATH_EOFILL ); // Hmm how do I know if this should be EO or not?
+PATH_EOFILL, // Hmm how do I know if this should be EO or not?
+nTile );
 pPolyElement->updateGeometry();
 pPolyElement->ZOrder = m_nNextZOrder++;
 }
@@ -445,7 +447,8 @@ void PDFIProcessor::strokePath( const uno::Reference< 
rendering::XPolyPolygon2D
 m_pCurElement,
 getGCId(getCurrentContext()),
 aPoly,
-PATH_ST

core.git: sdext/source

2024-02-28 Thread Dr. David Alan Gilbert (via logerrit)
 sdext/source/pdfimport/inc/imagecontainer.hxx  |1 
 sdext/source/pdfimport/tree/imagecontainer.cxx |   31 +
 2 files changed, 32 insertions(+)

New commits:
commit d7e5eae44e18ab89e85a0e6ed633853ede70ec71
Author: Dr. David Alan Gilbert 
AuthorDate: Mon Feb 12 00:44:31 2024 +
Commit: Noel Grandin 
CommitDate: Thu Feb 29 08:26:04 2024 +0100

tdf#113050 sdext.pdfimport: Add ImageContainer::asBase64EncodedString'

For fill-images we need the image as a string.

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

diff --git a/sdext/source/pdfimport/inc/imagecontainer.hxx 
b/sdext/source/pdfimport/inc/imagecontainer.hxx
index d21ed7504f63..03672e8ca8b2 100644
--- a/sdext/source/pdfimport/inc/imagecontainer.hxx
+++ b/sdext/source/pdfimport/inc/imagecontainer.hxx
@@ -42,6 +42,7 @@ namespace pdfi
 ImageId addImage( const css::uno::Sequence<
 css::beans::PropertyValue>& xBitmap );
 void writeBase64EncodedStream( ImageId nImageId, EmitContext& rContext 
);
+OUString asBase64EncodedString( ImageId nId ) const;
 };
 }
 
diff --git a/sdext/source/pdfimport/tree/imagecontainer.cxx 
b/sdext/source/pdfimport/tree/imagecontainer.cxx
index a7154164d771..b9f7ef52e061 100644
--- a/sdext/source/pdfimport/tree/imagecontainer.cxx
+++ b/sdext/source/pdfimport/tree/imagecontainer.cxx
@@ -141,6 +141,37 @@ void ImageContainer::writeBase64EncodedStream( ImageId 
nId, EmitContext& rContex
 rContext.rEmitter.write( encodeBase64( aData.getConstArray(), 
aData.getLength() ));
 }
 
+OUString ImageContainer::asBase64EncodedString( ImageId nId ) const
+{
+OSL_ASSERT( nId >= 0 && o3tl::make_unsigned(nId) < m_aImages.size() );
+
+const uno::Sequence& rEntry( m_aImages[nId] );
+
+// find "InputSequence" property
+const beans::PropertyValue* pAry(rEntry.getConstArray());
+const sal_Int32 nLen(rEntry.getLength());
+const beans::PropertyValue* pValue(
+std::find_if(pAry, pAry+nLen,
+[] (beans::PropertyValue const& v) -> bool {
+return v.Name == "InputSequence";
+}));
+
+if (pValue == pAry + nLen )
+{
+SAL_WARN("sdext.pdfimport", "InputSequence not found");
+return "";
+}
+
+uno::Sequence aData;
+if( !(pValue->Value >>= aData) )
+{
+SAL_WARN("sdext.pdfimport", "Wrong data type");
+return "";
+}
+
+return encodeBase64( aData.getConstArray(), aData.getLength() );
+}
+
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


core.git: sdext/source

2024-02-28 Thread Dr. David Alan Gilbert (via logerrit)
 sdext/source/pdfimport/tree/style.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit ff160e93d32c62e09b28393979b3535e01057cdc
Author: Dr. David Alan Gilbert 
AuthorDate: Mon Feb 12 00:38:42 2024 +
Commit: Noel Grandin 
CommitDate: Thu Feb 29 08:25:35 2024 +0100

tdf#113050 sdext.pdfimport: In styles wrap 'Contents'

For draw:fill-image we need output like:


  Base64stuff
  
https://gerrit.libreoffice.org/c/core/+/163568
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sdext/source/pdfimport/tree/style.cxx 
b/sdext/source/pdfimport/tree/style.cxx
index b97b1d3e9cdf..969fdc0e9648 100644
--- a/sdext/source/pdfimport/tree/style.cxx
+++ b/sdext/source/pdfimport/tree/style.cxx
@@ -197,7 +197,11 @@ void StyleContainer::impl_emitStyle( sal_Int32   
nStyleId,
 for(sal_Int32 nSubStyle : rStyle.SubStyles)
 impl_emitStyle( nSubStyle, rContext, rContainedElemVisitor );
 if( !rStyle.Contents.isEmpty() )
+{
+rContext.rEmitter.beginTag( "office:binary-data", PropertyMap() );
 rContext.rEmitter.write( rStyle.Contents );
+rContext.rEmitter.endTag( "office:binary-data" );
+}
 if( rStyle.ContainedElement )
 rStyle.ContainedElement->visitedBy( rContainedElemVisitor,
 
std::list>::iterator() );


core.git: sdext/source

2024-02-28 Thread Dr. David Alan Gilbert (via logerrit)
 sdext/source/pdfimport/tree/style.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bc5bd022a9ea8128bd5e9ba02bda48332dccbbe4
Author: Dr. David Alan Gilbert 
AuthorDate: Sat Feb 10 01:00:18 2024 +
Commit: Noel Grandin 
CommitDate: Thu Feb 29 08:25:08 2024 +0100

tdf#113050 sdext.pdfimport: In styles Specialise draw:fill-image

Like stroke-dash, draw:fill-image needs the name setting in
the draw:name attribute.

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

diff --git a/sdext/source/pdfimport/tree/style.cxx 
b/sdext/source/pdfimport/tree/style.cxx
index 3f1d20eb4244..b97b1d3e9cdf 100644
--- a/sdext/source/pdfimport/tree/style.cxx
+++ b/sdext/source/pdfimport/tree/style.cxx
@@ -190,7 +190,7 @@ void StyleContainer::impl_emitStyle( sal_Int32   
nStyleId,
 PropertyMap aProps( rStyle.Properties );
 if( !rStyle.IsSubStyle )
 aProps[ "style:name" ] = getStyleName( nStyleId );
-if (rStyle.Name == "draw:stroke-dash")
+if (rStyle.Name == "draw:stroke-dash" || rStyle.Name == "draw:fill-image")
 aProps[ "draw:name" ] = aProps[ "style:name" ];
 rContext.rEmitter.beginTag( rStyle.Name.getStr(), aProps );
 


core.git: sdext/source

2024-02-28 Thread Dr. David Alan Gilbert (via logerrit)
 sdext/source/pdfimport/tree/pdfiprocessor.cxx |   52 --
 1 file changed, 48 insertions(+), 4 deletions(-)

New commits:
commit 2350357d5cc2ac1787816ce887af6e9f36b8d252
Author: Dr. David Alan Gilbert 
AuthorDate: Fri Feb 9 02:42:30 2024 +
Commit: Noel Grandin 
CommitDate: Thu Feb 29 08:24:48 2024 +0100

tdf#113050 sdext.pdfimport: Create poly for tiling pattern

Create a poly for the tiling pattern fill.

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

diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx 
b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
index cf65223f167a..32280f8fd110 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
@@ -28,6 +28,8 @@
 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 
@@ -383,13 +385,55 @@ void PDFIProcessor::drawAlphaMaskedImage(const 
uno::Sequence& /*xTile*/)
 {
-// TODO
+const GraphicsContext& rGC(getCurrentContext());
+
+basegfx::B2DTuple aScale, aTranslation;
+double fRotate, fShearX;
+auto rTfm = rGC.Transformation;
+rTfm.decompose(aScale, aTranslation, fRotate, fShearX);
+
+// Build a poly covering the whole fill area
+double np0x = nX0 * nxStep;
+double np0y = nY0 * nyStep;
+double np1x = nX1 * nxStep;
+double np1y = nY1 * nyStep;
+
+// Transform with the rMat passed in
+double tmpx, tmpy;
+tmpx = np0x * rMat.m00 + np0y * rMat.m01 + rMat.m02;
+tmpy = np0x * rMat.m10 + np0y * rMat.m11 + rMat.m12;
+np0x = tmpx;
+np0y = tmpy;
+tmpx = np1x * rMat.m00 + np1y * rMat.m01 + rMat.m02;
+tmpy = np1x * rMat.m10 + np1y * rMat.m11 + rMat.m12;
+np1x = tmpx;
+np1y = tmpy;
+
+auto aB2DPoly = 
basegfx::B2DPolyPolygon(basegfx::utils::createPolygonFromRect(basegfx::B2DRange(np0x,
 np0y, np1x, np1y)));
+aB2DPoly.transform(getCurrentContext().Transformation);
+
+// Clip against current clip path, if any
+basegfx::B2DPolyPolygon aCurClip = getCurrentContext().Clip;
+if( aCurClip.count() ) {
+aB2DPoly = basegfx::utils::clipPolyPolygonOnPolyPolygon( aB2DPoly, 
aCurClip,
+   true, /* bInside, keep parts inside the clip */
+   false /* bStroke, filled not stroked */ );
+}
+// TODO: That clipping might shift the fill pattern offsets
+
+auto pPolyElement = ElementFactory::createPolyPolyElement(
+m_pCurElement,
+getGCId(getCurrentContext()),
+aB2DPoly,
+PATH_EOFILL ); // Hmm how do I know if this should be EO or not?
+pPolyElement->updateGeometry();
+pPolyElement->ZOrder = m_nNextZOrder++;
 }
 
 void PDFIProcessor::strokePath( const uno::Reference< 
rendering::XPolyPolygon2D >& rPath )


core.git: sdext/qa sdext/source

2024-02-28 Thread Dr. David Alan Gilbert (via logerrit)
 sdext/qa/unit/pdfimport.cxx   |8 
 sdext/source/pdfimport/inc/contentsink.hxx|5 +
 sdext/source/pdfimport/inc/pdfiprocessor.hxx  |6 ++
 sdext/source/pdfimport/tree/pdfiprocessor.cxx |9 +
 sdext/source/pdfimport/wrapper/wrapper.cxx|   11 +++
 5 files changed, 35 insertions(+), 4 deletions(-)

New commits:
commit 4a13e1890e8a0ed81e8fb17009185fa2b15ebff7
Author: Dr. David Alan Gilbert 
AuthorDate: Sun Feb 18 22:06:02 2024 +
Commit: Noel Grandin 
CommitDate: Thu Feb 29 08:24:17 2024 +0100

tdf#113050 sdext.pdfimport: Plumb tiling pattern fill to pdfiprocessor

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

diff --git a/sdext/qa/unit/pdfimport.cxx b/sdext/qa/unit/pdfimport.cxx
index 377d08d351f8..18988d6845de 100644
--- a/sdext/qa/unit/pdfimport.cxx
+++ b/sdext/qa/unit/pdfimport.cxx
@@ -428,6 +428,14 @@ namespace
 {
 }
 
+virtual void tilingPatternFill(int, int, int, int,
+   double, double,
+   int,
+   css::geometry::AffineMatrix2D&,
+   const 
css::uno::Sequence&) override
+{
+}
+
 typedef std::unordered_map IdToFontMap;
 typedef std::unordered_map 
FontToIdMap;
 
diff --git a/sdext/source/pdfimport/inc/contentsink.hxx 
b/sdext/source/pdfimport/inc/contentsink.hxx
index 44f609c3caaa..5354e4370f14 100644
--- a/sdext/source/pdfimport/inc/contentsink.hxx
+++ b/sdext/source/pdfimport/inc/contentsink.hxx
@@ -171,6 +171,11 @@ namespace pdfi
 css::beans::PropertyValue>& 
xImage,
   const css::uno::Sequence<
 css::beans::PropertyValue>& 
xMask) = 0;
+virtual void tilingPatternFill(int nX0, int nY0, int nX1, int nY1,
+   double nxStep, double nyStep,
+   int nPaintType,
+   css::geometry::AffineMatrix2D& rMat,
+   const 
css::uno::Sequence& xTile) = 0;
 };
 
 typedef std::shared_ptr ContentSinkSharedPtr;
diff --git a/sdext/source/pdfimport/inc/pdfiprocessor.hxx 
b/sdext/source/pdfimport/inc/pdfiprocessor.hxx
index 3fdc146716b3..40cdbfdd48c9 100644
--- a/sdext/source/pdfimport/inc/pdfiprocessor.hxx
+++ b/sdext/source/pdfimport/inc/pdfiprocessor.hxx
@@ -150,6 +150,12 @@ namespace pdfi
   const css::uno::Sequence<
 css::beans::PropertyValue>& 
xMask) override;
 
+virtual void tilingPatternFill(int nX0, int nY0, int nX1, int nY1,
+   double nxStep, double nyStep,
+   int nPaintType,
+   css::geometry::AffineMatrix2D& rMat,
+   const 
css::uno::Sequence& xTile) override;
+
 void startIndicator( const OUString& rText );
 void endIndicator();
 
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx 
b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
index 44485f4c2525..cf65223f167a 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
@@ -383,6 +383,15 @@ void PDFIProcessor::drawAlphaMaskedImage(const 
uno::Sequence& /*xTile*/)
+{
+// TODO
+}
+
 void PDFIProcessor::strokePath( const uno::Reference< 
rendering::XPolyPolygon2D >& rPath )
 {
 basegfx::B2DPolyPolygon 
aPoly=basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(rPath);
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx 
b/sdext/source/pdfimport/wrapper/wrapper.cxx
index 6094bfabcbbc..d99103b9867a 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -838,10 +838,13 @@ void LineParser::readTilingPatternFill()
 readDouble(aMat.m12);
 
 // The tile is an image with alpha
-[[maybe_unused]]const uno::Sequence aTile ( 
readImageImpl() );
-(void)aTile; // Unused until later patch
-// TODO
-//   use the parsed data
+const uno::Sequence aTile ( readImageImpl() );
+
+m_parser.m_pSink->tilingPatternFill( nX0, nY0, nX1, nY1,
+ nXStep, nYStep,
+ nPaintType,
+ aMat,
+ aTile );
 }
 
 void Parser::parseLine( std::string_view aLine )


core.git: sdext/source

2024-02-28 Thread Dr. David Alan Gilbert (via logerrit)
 sdext/source/pdfimport/wrapper/keyword_list |1 
 sdext/source/pdfimport/wrapper/wrapper.cxx  |   33 
 2 files changed, 34 insertions(+)

New commits:
commit ec0b9062dc8dba82509183eb865da55827bde4d5
Author: Dr. David Alan Gilbert 
AuthorDate: Wed Jan 24 02:10:18 2024 +
Commit: Noel Grandin 
CommitDate: Thu Feb 29 08:23:54 2024 +0100

tdf#113050 sdext.pdfimport Tiling pattern fill parser

Add a parser for the TilingPatternFill entry from the poppler wrapper.

This doesn't get triggered yet until the wrapper enables the
tilingPatternFill.

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

diff --git a/sdext/source/pdfimport/wrapper/keyword_list 
b/sdext/source/pdfimport/wrapper/keyword_list
index bf15ddb2460f..4d1e6d2d4013 100644
--- a/sdext/source/pdfimport/wrapper/keyword_list
+++ b/sdext/source/pdfimport/wrapper/keyword_list
@@ -38,6 +38,7 @@ setTextRenderMode,SETTEXTRENDERMODE
 setTransformation,SETTRANSFORMATION
 startPage,STARTPAGE
 strokePath,STROKEPATH
+tilingPatternFill,TILINGPATTERNFILL
 updateBlendMode,UPDATEBLENDMODE
 updateCtm,UPDATECTM
 updateFillColor,UPDATEFILLCOLOR
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx 
b/sdext/source/pdfimport/wrapper/wrapper.cxx
index ade4dc5edb6b..6094bfabcbbc 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -107,6 +107,7 @@ enum parseKey {
 SETTRANSFORMATION,
 STARTPAGE,
 STROKEPATH,
+TILINGPATTERNFILL,
 UPDATEBLENDMODE,
 UPDATECTM,
 UPDATEFILLCOLOR,
@@ -195,6 +196,7 @@ public:
 void readLink();
 void readMaskedImage();
 void readSoftMaskedImage();
+void readTilingPatternFill();
 };
 
 /** Unescapes line-ending characters in input string. These
@@ -813,6 +815,35 @@ void LineParser::readSoftMaskedImage()
 m_parser.m_pSink->drawAlphaMaskedImage( aImage, aMask );
 }
 
+void LineParser::readTilingPatternFill()
+{
+sal_Int32 nX0, nY0, nX1, nY1, nPaintType;
+double nXStep, nYStep;
+geometry::AffineMatrix2D aMat;
+readInt32(nX0);
+readInt32(nY0);
+readInt32(nX1);
+readInt32(nY1);
+
+readDouble(nXStep);
+readDouble(nYStep);
+
+readInt32(nPaintType);
+
+readDouble(aMat.m00);
+readDouble(aMat.m10);
+readDouble(aMat.m01);
+readDouble(aMat.m11);
+readDouble(aMat.m02);
+readDouble(aMat.m12);
+
+// The tile is an image with alpha
+[[maybe_unused]]const uno::Sequence aTile ( 
readImageImpl() );
+(void)aTile; // Unused until later patch
+// TODO
+//   use the parsed data
+}
+
 void Parser::parseLine( std::string_view aLine )
 {
 OSL_PRECOND( m_pSink, "Invalid sink" );
@@ -865,6 +896,8 @@ void Parser::parseLine( std::string_view aLine )
 }
 case STROKEPATH:
 m_pSink->strokePath(lp.readPath()); break;
+case TILINGPATTERNFILL:
+lp.readTilingPatternFill(); break;
 case UPDATECTM:
 lp.readTransformation(); break;
 case UPDATEFILLCOLOR:


core.git: sdext/source

2024-02-28 Thread Dr. David Alan Gilbert (via logerrit)
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |   44 +-
 1 file changed, 42 insertions(+), 2 deletions(-)

New commits:
commit b7a63d26466bac7eb7b25233a5a53788bed88c81
Author: Dr. David Alan Gilbert 
AuthorDate: Sun Feb 18 22:00:37 2024 +
Commit: Noel Grandin 
CommitDate: Thu Feb 29 08:23:28 2024 +0100

tdf#113050 sdext.pdfimport: Flip bitmap

We need to flip the bitmap between the wrapper and LO, but there's no
easy way to do this in a Poly image fill in LO, so do it as a simple
bitmap flip in the wrapper.

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

diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx 
b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 57eb30092141..ec2632b74899 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -432,8 +432,6 @@ static void writeImage_( OutputBuffer& o_rOutputBuf,
 }
 
 // forwarders
-
-
 static void writeImageLF( OutputBuffer& o_rOutputBuf,
   Stream*   str,
   int   width,
@@ -445,6 +443,45 @@ static void writeMaskLF( OutputBuffer& o_rOutputBuf,
  int   height,
  bool  bInvert ) { 
writeMask_(o_rOutputBuf,str,width,height,bInvert); }
 
+// Vertically flip the bitmap
+static void flipSplashBitmap(SplashBitmap *pBitmap)
+{
+if (pBitmap->getRowSize() <= 0)
+return;
+
+auto nBitmapHeight = static_cast(pBitmap->getHeight());
+auto nRowSize = static_cast(pBitmap->getRowSize());
+auto nAlphaRowSize = static_cast(pBitmap->getAlphaRowSize());
+
+auto aTmpRow = new unsigned char[nRowSize];
+auto aTmpAlphaRow = new unsigned char[nAlphaRowSize];
+
+auto pBitmapData = pBitmap->getDataPtr();
+auto pAlphaData = pBitmap->getAlphaPtr();
+
+// Set up pairs of pointers working from each end of the bitmap
+auto pCurRowA = pBitmapData;
+auto pCurAlphaA = pAlphaData;
+auto pCurRowB = pBitmapData+nRowSize*(nBitmapHeight-1);
+auto pCurAlphaB = pAlphaData+nAlphaRowSize*(nBitmapHeight-1);
+
+for (size_t nCur = 0;
+ nCur < nBitmapHeight/2;
+ nCur++, pCurRowA+=nRowSize, pCurRowB-=nRowSize,
+ pCurAlphaA+=nAlphaRowSize, pCurAlphaB-=nAlphaRowSize)
+{
+memcpy(aTmpRow, pCurRowA, nRowSize);
+memcpy(pCurRowA, pCurRowB, nRowSize);
+memcpy(pCurRowB, aTmpRow, nRowSize);
+
+memcpy(aTmpAlphaRow, pCurAlphaA, nAlphaRowSize);
+memcpy(pCurAlphaA, pCurAlphaB, nAlphaRowSize);
+memcpy(pCurAlphaB, aTmpAlphaRow, nAlphaRowSize);
+}
+delete[] aTmpRow;
+delete[] aTmpAlphaRow;
+}
+
 int PDFOutDev::parseFont( long long nNewId, GfxFont* gfxFont, const GfxState* 
state ) const
 {
 FontAttributes aNewFont;
@@ -1236,6 +1273,9 @@ poppler_bool PDFOutDev::tilingPatternFill(GfxState 
*state, Gfx *, Catalog *,
 delete pSplashGfx;
 delete pSplashOut;
 
+// Add a vertical flip, we can't do this in LO for an image filled poly
+flipSplashBitmap(pSplashBitmap);
+
 auto nBitmapWidth = static_cast(pSplashBitmap->getWidth());
 auto nBitmapHeight = static_cast(pSplashBitmap->getHeight());
 


core.git: sdext/source

2024-02-28 Thread Dr. David Alan Gilbert (via logerrit)
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |   64 +-
 1 file changed, 62 insertions(+), 2 deletions(-)

New commits:
commit 8ac5f40b330c6cd248073b8686c05f566ecd7195
Author: Dr. David Alan Gilbert 
AuthorDate: Sun Feb 18 21:45:42 2024 +
Commit: Noel Grandin 
CommitDate: Thu Feb 29 08:22:38 2024 +0100

tdf#113050 sdext.pdfimport: Write the tiling pattern image

Render the tile down to a common format using Splash
and write it to the stream.

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

diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx 
b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index e7afe67afef4..57eb30092141 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -1182,13 +1182,15 @@ void PDFOutDev::setSkipImages( bool bSkipImages )
 }
 
 #if POPPLER_CHECK_VERSION(21, 3, 0)
-poppler_bool PDFOutDev::tilingPatternFill(GfxState *, Gfx *, Catalog *,
+poppler_bool PDFOutDev::tilingPatternFill(GfxState *state, Gfx *, Catalog *,
   GfxTilingPattern *tPat, const double 
*mat,
   int x0, int y0, int x1, int y1,
   double xStep, double yStep)
 {
 const double *pBbox = tPat->getBBox();
 const int nPaintType = tPat->getPaintType();
+Dict *pResDict = tPat->getResDict();
+Object *aStr = tPat->getContentStream();
 double nWidth = pBbox[2] - pBbox[0];
 double nHeight = pBbox[3] - pBbox[1];
 
@@ -1215,7 +1217,65 @@ poppler_bool PDFOutDev::tilingPatternFill(GfxState *, 
Gfx *, Catalog *,
 normalize(mat[4]), normalize(mat[5])
 );
 
-// TODO: Write the image
+PDFRectangle aBox;
+aBox.x1 = pBbox[0];
+aBox.y1 = pBbox[1];
+aBox.x2 = pBbox[2];
+aBox.y2 = pBbox[3];
+
+const int nDPI = 72; // GfxState seems to have 72.0 as magic for some 
reason
+auto pSplashGfxState = new GfxState(nDPI, nDPI, , 0, false);
+auto pSplashOut = new SplashOutputDev(splashModeRGB8, 1, false, nullptr);
+pSplashOut->setEnableFreeType(false);
+pSplashOut->startPage(0 /* pageNum */, pSplashGfxState, nullptr /* xref 
*/);
+
+auto pSplashGfx = new Gfx(m_pDoc, pSplashOut, pResDict, , nullptr);
+pSplashGfx->display(aStr);
+auto pSplashBitmap = pSplashOut->takeBitmap();
+delete pSplashGfxState;
+delete pSplashGfx;
+delete pSplashOut;
+
+auto nBitmapWidth = static_cast(pSplashBitmap->getWidth());
+auto nBitmapHeight = static_cast(pSplashBitmap->getHeight());
+
+char *pBitmapData = reinterpret_cast(pSplashBitmap->getDataPtr());
+if (nPaintType == 2)
+{
+// My understanding is Type 2 fills are just bitmaps of *what* to fill
+// in the current fill colour.
+// sending it to LO as a flat colour image with the alpha map is 
easiest
+GfxRGB aCurFill;
+unsigned char r,g,b;
+state->getFillColorSpace()->getRGB(state->getFillColor(), );
+r = colToByte(aCurFill.r);
+g = colToByte(aCurFill.g);
+b = colToByte(aCurFill.b);
+
+for(size_t i=0; i < (nBitmapWidth * nBitmapHeight * 3); i+=3)
+{
+pBitmapData[i  ] = r;
+pBitmapData[i+1] = g;
+pBitmapData[i+2] = b;
+}
+}
+
+auto pRgbStr = new MemStream(pBitmapData, 0,
+nBitmapWidth * nBitmapHeight * 3, Object(objNull));
+auto pAlphaStr = new MemStream(reinterpret_cast(pSplashBitmap->getAlphaPtr()), 0,
+nBitmapWidth * nBitmapHeight, Object(objNull));
+auto aDecode = Object(objNull);
+auto pRgbIdentityColorMap = new GfxImageColorMap(8, , new 
GfxDeviceRGBColorSpace());
+auto pGrayIdentityColorMap = new GfxImageColorMap(8, , new 
GfxDeviceGrayColorSpace());
+
+OutputBuffer aBuf; initBuf(aBuf);
+writePng_(aBuf, pRgbStr, nBitmapWidth, nBitmapHeight, pRgbIdentityColorMap,
+pAlphaStr, nBitmapWidth, nBitmapHeight, pGrayIdentityColorMap);
+writeBinaryBuffer(aBuf);
+
+delete pAlphaStr;
+delete pRgbStr;
+delete pSplashBitmap;
 
 // If we return false here we can fall back to the slow path
 return true;


core.git: sdext/source

2024-02-28 Thread Dr. David Alan Gilbert (via logerrit)
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |   64 +-
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx |7 +
 2 files changed, 70 insertions(+), 1 deletion(-)

New commits:
commit 8e4a351f12d777ad9102086298741d0a97e5eeb9
Author: Dr. David Alan Gilbert 
AuthorDate: Mon Jan 15 02:09:39 2024 +
Commit: Noel Grandin 
CommitDate: Thu Feb 29 08:21:09 2024 +0100

tdf#113050 sdext.pdfimport: Write the tiling pattern header

Add the 'tilingPatternFill' hook to our output device, but don't enable
it yet; we can do that at the end of the series.

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

diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx 
b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 2517618e1019..e7afe67afef4 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -20,6 +20,25 @@
 #include "pdfioutdev_gpl.hxx"
 #include "pnghelper.hxx"
 
+#if defined __GNUC__ || defined __clang__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wunused-parameter"
+#elif defined _MSC_VER
+#pragma warning(push)
+#pragma warning(disable : 4100) // unreferenced formal parameter
+#pragma warning(disable : 4121) // alignment of a member was sensitive to 
packing in Gfx.h/Operator
+#endif
+
+#include 
+#include 
+#include 
+#if defined __GNUC__ || defined __clang__
+# pragma GCC diagnostic pop
+#elif defined _MSC_VER
+#pragma warning(pop)
+#endif
+
+
 #include 
 #include 
 #include 
@@ -426,7 +445,6 @@ static void writeMaskLF( OutputBuffer& o_rOutputBuf,
  int   height,
  bool  bInvert ) { 
writeMask_(o_rOutputBuf,str,width,height,bInvert); }
 
-
 int PDFOutDev::parseFont( long long nNewId, GfxFont* gfxFont, const GfxState* 
state ) const
 {
 FontAttributes aNewFont;
@@ -1163,6 +1181,50 @@ void PDFOutDev::setSkipImages( bool bSkipImages )
 m_bSkipImages = bSkipImages;
 }
 
+#if POPPLER_CHECK_VERSION(21, 3, 0)
+poppler_bool PDFOutDev::tilingPatternFill(GfxState *, Gfx *, Catalog *,
+  GfxTilingPattern *tPat, const double 
*mat,
+  int x0, int y0, int x1, int y1,
+  double xStep, double yStep)
+{
+const double *pBbox = tPat->getBBox();
+const int nPaintType = tPat->getPaintType();
+double nWidth = pBbox[2] - pBbox[0];
+double nHeight = pBbox[3] - pBbox[1];
+
+// If our wrapper is skipping images then we don't need to do anything
+// but return 'true' so that Poppler doesn't do the slow method
+if (m_bSkipImages)
+return true;
+
+// Copied from the Cairo output dev; I think this is patterns
+// with gaps, let poppler do the slow method for now.
+if (xStep != nWidth || yStep != nHeight)
+return false;
+
+printf( "tilingPatternFill %d %d %d %d %f %f "
+"%d "
+"%f %f %f %f %f %f", // No ending space!
+
+x0, y0, x1, y1, normalize(xStep), normalize(yStep),
+
+nPaintType,
+
+normalize(mat[0]), normalize(mat[1]),
+normalize(mat[2]), normalize(mat[3]),
+normalize(mat[4]), normalize(mat[5])
+);
+
+// TODO: Write the image
+
+// If we return false here we can fall back to the slow path
+return true;
+}
+
+// This could be implemented for earlier versions, but the interface keeps
+// changing a little; not having it is only a problem for inputs with
+// large patterns.
+#endif
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx 
b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
index b34fad1ba90a..f38bf423423b 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
@@ -283,6 +283,13 @@ namespace pdfi
 
 static void setPageNum( int nNumPages );
 void setSkipImages ( bool bSkipImages );
+#if POPPLER_CHECK_VERSION(21, 3, 0)
+poppler_bool useTilingPatternFill() override { return false; };
+poppler_bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat,
+   GfxTilingPattern *tPat, const double 
*mat,
+   int x0, int y0, int x1, int y1,
+   double xStep, double yStep) override;
+#endif
 };
 }
 


core.git: external/poppler

2024-02-28 Thread Dr. David Alan Gilbert (via logerrit)
 external/poppler/StaticLibrary_poppler.mk |   13 +
 external/poppler/disable-freetype.patch.1 |   68 ++
 external/poppler/poppler-config.patch.1   |2 
 3 files changed, 82 insertions(+), 1 deletion(-)

New commits:
commit 18a1c3d6c98348d4e3da6e6c9740d6923ab2fba1
Author: Dr. David Alan Gilbert 
AuthorDate: Thu Jan 11 01:26:04 2024 +
Commit: Noel Grandin 
CommitDate: Thu Feb 29 08:20:20 2024 +0100

tdf#113050 poppler: Enable splash

Enable the splash module, to be used in the xpdf conversion
for tiled patterns.

I've jumped through a couple of hoops to avoid splash
bringing in freetype, extending the existing hack.
This might cause us problems if someone tries to use
text as a tile, but otherwise isOK.

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

diff --git a/external/poppler/StaticLibrary_poppler.mk 
b/external/poppler/StaticLibrary_poppler.mk
index 7b6f958245ac..726663d983a4 100644
--- a/external/poppler/StaticLibrary_poppler.mk
+++ b/external/poppler/StaticLibrary_poppler.mk
@@ -136,6 +136,7 @@ $(eval $(call 
gb_StaticLibrary_add_generated_exception_objects,poppler,\
UnpackedTarball/poppler/poppler/SecurityHandler \
UnpackedTarball/poppler/poppler/SignatureInfo \
UnpackedTarball/poppler/poppler/Sound \
+   UnpackedTarball/poppler/poppler/SplashOutputDev \
UnpackedTarball/poppler/poppler/Stream \
UnpackedTarball/poppler/poppler/StructElement \
UnpackedTarball/poppler/poppler/StructTreeRoot \
@@ -146,7 +147,19 @@ $(eval $(call 
gb_StaticLibrary_add_generated_exception_objects,poppler,\
UnpackedTarball/poppler/poppler/UnicodeTypeTable \
UnpackedTarball/poppler/poppler/ViewerPreferences \
UnpackedTarball/poppler/poppler/XRef \
+   UnpackedTarball/poppler/splash/Splash \
UnpackedTarball/poppler/splash/SplashBitmap \
+   UnpackedTarball/poppler/splash/SplashClip \
+   UnpackedTarball/poppler/splash/SplashFont \
+   UnpackedTarball/poppler/splash/SplashFontEngine \
+   UnpackedTarball/poppler/splash/SplashFontFile \
+   UnpackedTarball/poppler/splash/SplashFontFileID \
+   UnpackedTarball/poppler/splash/SplashPath \
+   UnpackedTarball/poppler/splash/SplashPattern \
+   UnpackedTarball/poppler/splash/SplashScreen \
+   UnpackedTarball/poppler/splash/SplashState \
+   UnpackedTarball/poppler/splash/SplashXPath \
+   UnpackedTarball/poppler/splash/SplashXPathScanner \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/poppler/disable-freetype.patch.1 
b/external/poppler/disable-freetype.patch.1
index 3c4d1d0f7a8a..d12374f088f9 100644
--- a/external/poppler/disable-freetype.patch.1
+++ b/external/poppler/disable-freetype.patch.1
@@ -39,3 +39,71 @@ disable freetype dependent code
  }
  
  std::string Form::getFallbackFontForChar(Unicode uChar, const GfxFont 
) const
+--- poppler/splash/SplashFontEngine.cc.orig2024-02-21 01:28:10.479645185 
+
 popller/splash/SplashFontEngine.cc 2023-09-05 22:15:14.0 +0100
+@@ -66,9 +66,9 @@
+ delete font;
+ }
+ 
+-if (ftEngine) {
+-delete ftEngine;
+-}
++//if (ftEngine) {
++//delete ftEngine;
++//}
+ }
+ 
+ SplashFontFile *SplashFontEngine::getFontFile(SplashFontFileID *id)
+--- poppler/splash/SplashFTFontEngine.h.orig   2023-09-05 22:15:14.0 
+0100
 poppler/splash/SplashFTFontEngine.h2024-02-21 13:53:29.715423742 
+
+@@ -26,8 +26,8 @@
+ #ifndef SPLASHFTFONTENGINE_H
+ #define SPLASHFTFONTENGINE_H
+ 
+-#include 
+-#include FT_FREETYPE_H
++//#include 
++//#include FT_FREETYPE_H
+ 
+ class SplashFontFile;
+ class SplashFontFileID;
+@@ -40,7 +40,7 @@
+ class SplashFTFontEngine
+ {
+ public:
+-static SplashFTFontEngine *init(bool aaA, bool enableFreeTypeHintingA, 
bool enableSlightHinting);
++static SplashFTFontEngine *init(bool aaA, bool enableFreeTypeHintingA, 
bool enableSlightHinting) { return nullptr; };
+ 
+ ~SplashFTFontEngine();
+ 
+@@ -48,22 +48,22 @@
+ SplashFTFontEngine =(const SplashFTFontEngine &) = delete;
+ 
+ // Load fonts.
+-SplashFontFile *loadType1Font(SplashFontFileID *idA, SplashFontSrc *src, 
const char **enc);
+-SplashFontFile *loadType1CFont(SplashFontFileID *idA, SplashFontSrc *src, 
const char **enc);
+-SplashFontFile *loadOpenTypeT1CFont(SplashFontFileID *idA, SplashFontSrc 
*src, const char **enc);
+-SplashFontFile *loadCIDFont(SplashFontFileID *idA, SplashFontSrc *src);
+-SplashFontFile *loadOpenTypeCFFFont(SplashFontFileID *idA, SplashFontSrc 
*src, int *codeToGID, int codeToGIDLen);
+-SplashFontFile *loadTrueTypeFont(SplashFontFileID *idA, SplashFontSrc 
*src, int *codeToGID, int codeToGIDLen, int faceIndex = 0);
++SplashFontFile *loadType1Font(SplashFontFileID 

core.git: sw/CppunitTest_sw_pdf_test.mk

2024-02-23 Thread Dr. David Alan Gilbert (via logerrit)
 sw/CppunitTest_sw_pdf_test.mk |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 56f45bf76f6cd6683e81b9d30131a7a4c5696340
Author: Dr. David Alan Gilbert 
AuthorDate: Thu Feb 22 11:36:14 2024 +
Commit: Mike Kaganski 
CommitDate: Fri Feb 23 17:02:25 2024 +0100

CppunitTest_sw_pdf_test: Add dependency on xpdfimport

The missing dependency would trigger the failure in:

::HybridPdfTest::testNoHybridDataInPDF
   warn:sal.osl:3173303:3173368:sal/osl/unx/process.cxx:349: Failed to 
launch child process, child reports ENOENT
  ? Couldn't exec xpdfimport?

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

diff --git a/sw/CppunitTest_sw_pdf_test.mk b/sw/CppunitTest_sw_pdf_test.mk
index 0d9fd16985e7..6e4126fd3b06 100644
--- a/sw/CppunitTest_sw_pdf_test.mk
+++ b/sw/CppunitTest_sw_pdf_test.mk
@@ -43,6 +43,8 @@ $(eval $(call gb_CppunitTest_use_externals,sw_pdf_test,\
 libxml2 \
 ))
 
+$(eval $(call gb_CppunitTest_use_executable,sw_pdf_test,xpdfimport))
+
 $(eval $(call gb_CppunitTest_set_include,sw_pdf_test,\
 -I$(SRCDIR)/sw/inc \
 -I$(SRCDIR)/sw/source/core/inc \


Re: Is it still possible to compile LibreOffice 24 for Linux 32-bit? (part 2)

2024-02-09 Thread Dr. David Alan Gilbert
* Escuelas Linux (escuelasli...@gmail.com) wrote:
> Thanks to Dan Horák and Rene Engelhard for their answers!

Best to keep the reply on the thread!

> Dan said:
> 
> 
> -"Because 32-bit system means max 4GB address space for a process and ld
> runs as a single process".
> 
> 
> I installed a PAE kernel, so it can effectively use more than 4 GB.

PAE isn't quite that powerful.  It can let the system use more than 4GB
total, but any one process can't use more than 2 or 3GB.  So it doesn't
help if, say your linker process, decides it needs loads of RAM.
Fundamentally that's a limit of using 32bit address space.

> 
> -"You can try disabling or reducing the size of debuginfo to reduce the
> size of the *.o files if it's used, you can disable LTO and there are some
> options for ld to reduce its memory usage a bit".
> 
> 
> I tried several permutations to reduce the amount of memory used. One of
> them was to reduce the number of processors in my autogen.input:
> 
> 
> --with-parallelism=1

Good.

> Another one was to add this parameter when running make:
> 
> 
> make LDFLAGS="-Wl,--reduce-memory-overheads"

That looks like it's a specific trade off; not any of the specific
things mentioned about debuginfo and ensuring LTO is disabled.

If possible you should probably also include the exact command line
of the process that dies.

> 
> I also increased the available memory on the VM from 12 to 15 GB. But no
> results, always got the exhausted memory message.

Right, see what I said above about PAE not being that smart.

> I also tried several other possible solutions, but it feels like going on a
> wild goose chase without knowing exactly what to do, relying on some
> general random advices found on the web.

Dave

> 
> -
> 
> Rene said:
> 
> 
> -"Debian still ships LibreOffice on 32bit archs, as do other distributions."
> 
> 
> Oh! Thanks for the tip! I was not aware that Debian even has binary
> LibreOffice 24.2 32-bit packages, albeit in the unstable branch.
> 
> I was even able to build LibreOffice from source:
> 
> 
> apt-get --build source libreoffice
> 
> 
> This proves to me that the LibreOffice source code has not dropped 32-bit
> support, but I still don't know why my own compilation attempts always
> failed with a memory exhausted message, even with the same VM configuration.
> 
> Would it be possible for me to just use the Debian LibreOffice 24.2
> binaries or its source packages? Not quite, as they also have a lot of
> dependencies on packages that are only available in the unstable branch, so
> they would not be suitable for a distribution intended for a stable Debian
> 12 bookworm base.
> 
> 
> -"I do -g1 in Debian. LTO works".
> 
> 
> Where should I add the -g1 parameter?
> 
> 
> -"make check fails. I do a minimal set (testtools bridgetest, smoketest,
> sal, the other public libraries) to at least not get something
> fundamentally broken".
> 
> 
> My autogen.input file is:
> 
> --with-parallelism=16
> 
> --with-distro=LibreOfficeLinux
> 
> --with-lang=es
> 
> --with-myspell-dicts
> 
> --enable-release-build
> 
> --with-package-format=deb
> 
> --disable-dependency-tracking
> 
> --with-jdk-home=/usr/lib/jvm/java-11-openjdk-i386/
> 
> --with-privacy-policy-url=NO-URL
> 
> 
> -"And somehow the testtools bridgetest fails when building with gcc >= 13,
> 12 works. Haven't found a solution yet.)"
> 
> 
> I'm using gcc 13! Maybe this could be the cause of my compilation failures?
> 
> I'll make some more attempts to compile LibreOffice 32-bit now using gcc
> 12, any additional ideas or suggestions would be more than welcome.
> 
> 
> Thanks again.
-- 
 -Open up your eyes, open up your mind, open up your code ---   
/ Dr. David Alan Gilbert|   Running GNU/Linux   | Happy  \ 
\dave @ treblig.org |   | In Hex /
 \ _|_ http://www.treblig.org   |___/


core.git: filter/source include/svx svx/source

2023-12-12 Thread Dr. David Alan Gilbert (via logerrit)
 filter/source/msfilter/escherex.cxx |8 
 filter/source/msfilter/msdffimp.cxx |9 
 include/svx/EnhancedCustomShapeGeometry.hxx |3 
 svx/source/customshapes/EnhancedCustomShapeGeometry.cxx |  376 
 svx/source/svdraw/svdoashp.cxx  |8 
 5 files changed, 202 insertions(+), 202 deletions(-)

New commits:
commit 80785bb26a1f96d5f5bced7940473d22af00cb60
Author: Dr. David Alan Gilbert 
AuthorDate: Mon Jul 3 18:31:26 2023 +0100
Commit: Hossein 
CommitDate: Tue Dec 12 10:57:20 2023 +0100

tdf#147021 Use std::span to avoid SAL_N_ELEMENTS in CustomShape

The final set of these, nailing the 'handles'.

Again, most of the changes are mechanical

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

diff --git a/filter/source/msfilter/escherex.cxx 
b/filter/source/msfilter/escherex.cxx
index caf07865941e..2e2e957e6cf0 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -2539,13 +2539,13 @@ bool EscherPropertyContainer::IsDefaultObject(
 void EscherPropertyContainer::LookForPolarHandles( const MSO_SPT eShapeType, 
sal_Int32& nAdjustmentsWhichNeedsToBeConverted )
 {
 const mso_CustomShape* pDefCustomShape = GetCustomShapeContent( eShapeType 
);
-if ( !(pDefCustomShape && pDefCustomShape->nHandles && 
pDefCustomShape->pHandles) )
+if ( !pDefCustomShape || pDefCustomShape->pHandles.empty() )
 return;
 
-sal_Int32 k, nkCount = pDefCustomShape->nHandles;
-const SvxMSDffHandle* pData = pDefCustomShape->pHandles;
-for ( k = 0; k < nkCount; k++, pData++ )
+sal_Int32 k, nkCount = pDefCustomShape->pHandles.size();
+for (k = 0; k < nkCount; k++)
 {
+const SvxMSDffHandle* pData = >pHandles[k];
 if ( pData->nFlags & SvxMSDffHandleFlags::POLAR )
 {
 if ( ( pData->nPositionY >= 0x256 ) || ( pData->nPositionY <= 
0x107 ) )
diff --git a/filter/source/msfilter/msdffimp.cxx 
b/filter/source/msfilter/msdffimp.cxx
index 0c9875cf43af..e0e378f53430 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -2175,12 +2175,13 @@ void 
DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
 else
 {
 const mso_CustomShape* pDefCustomShape = GetCustomShapeContent( 
rObjData.eShapeType );
-if ( pDefCustomShape && pDefCustomShape->nHandles && 
pDefCustomShape->pHandles )
+if (pDefCustomShape && !pDefCustomShape->pHandles.empty())
 {
-sal_uInt32 i, nCnt = pDefCustomShape->nHandles;
-const SvxMSDffHandle* pData = pDefCustomShape->pHandles;
-for ( i = 0; i < nCnt; i++, pData++ )
+// TODO: This is very similar to 
EscherPropertyContainer::LookForPolarHandles
+sal_uInt32 i, nCnt = pDefCustomShape->pHandles.size();
+for (i = 0; i < nCnt; i++)
 {
+const SvxMSDffHandle* pData = >pHandles[i];
 if ( pData->nFlags & SvxMSDffHandleFlags::POLAR )
 {
 if ( ( pData->nPositionY >= 0x256 ) || ( pData->nPositionY 
<= 0x107 ) )
diff --git a/include/svx/EnhancedCustomShapeGeometry.hxx 
b/include/svx/EnhancedCustomShapeGeometry.hxx
index b95501c288c3..626cede2a88d 100644
--- a/include/svx/EnhancedCustomShapeGeometry.hxx
+++ b/include/svx/EnhancedCustomShapeGeometry.hxx
@@ -81,8 +81,7 @@ struct mso_CustomShape
 sal_Int32   nXRef;
 sal_Int32   nYRef;
 std::span   pGluePoints;
-SvxMSDffHandle* pHandles;
-sal_uInt32  nHandles;
+std::span pHandles;
 };
 
 #define MSO_I | sal_Int32(0x8000)
diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx 
b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
index a70b25292e33..7db0ff931ac4 100644
--- a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
@@ -135,7 +135,7 @@ const mso_CustomShape msoArc =
 21600, 21600,
 MIN_INT32, MIN_INT32,
 std::span(),
-const_cast(mso_sptArcHandle), SAL_N_ELEMENTS( 
mso_sptArcHandle )// handles
+std::span(mso_sptArcHandle),
 };
 
 const SvxMSDffVertPair mso_sptTextSimpleVert[] =
@@ -152,7 +152,7 @@ const mso_CustomShape msoTextSimple =
 21600, 21600,
 MIN_INT32, MIN_INT32,
 std::span(),
-nullptr, 0 // handles
+std::span() // handles
 };
 
 const SvxMSDffVertPair mso_sptRectangleVert[] =
@@ -169,7 +169,7 @@ const mso_CustomShape msoRectangle =
 21600, 2160

core.git: include/svx svx/source

2023-12-08 Thread Dr. David Alan Gilbert (via logerrit)
 include/svx/EnhancedCustomShapeGeometry.hxx |3 
 svx/source/customshapes/EnhancedCustomShapeGeometry.cxx |  376 
 svx/source/svdraw/svdoashp.cxx  |   18 
 3 files changed, 198 insertions(+), 199 deletions(-)

New commits:
commit abdb93ce28febd7c4b4e5dad164ee8a394b499b9
Author: Dr. David Alan Gilbert 
AuthorDate: Mon Jul 3 15:42:09 2023 +0100
Commit: Hossein 
CommitDate: Sat Dec 9 00:51:23 2023 +0100

tdf#147021 Use std::span to avoid SAL_N_ELEMENTS in CustomShape

as for previous set, this time for TextRectangles

Again the data is mechanically search/replaced.

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

diff --git a/include/svx/EnhancedCustomShapeGeometry.hxx 
b/include/svx/EnhancedCustomShapeGeometry.hxx
index c776daff606a..b95501c288c3 100644
--- a/include/svx/EnhancedCustomShapeGeometry.hxx
+++ b/include/svx/EnhancedCustomShapeGeometry.hxx
@@ -75,8 +75,7 @@ struct mso_CustomShape
 sal_uInt32  nElements;
 std::span pCalculation;
 sal_Int32*  pDefData;
-SvxMSDffTextRectangles* pTextRect;
-sal_uInt32  nTextRect;
+std::span pTextRect;
 sal_Int32   nCoordWidth;
 sal_Int32   nCoordHeight;
 sal_Int32   nXRef;
diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx 
b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
index 31085c48b9a2..a70b25292e33 100644
--- a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
@@ -131,7 +131,7 @@ const mso_CustomShape msoArc =
 const_cast(mso_sptArcSegm), sizeof( mso_sptArcSegm ) >> 1,
 std::span(mso_sptArcCalc),
 const_cast(mso_sptArcDefault),
-nullptr, 0,
+std::span(),
 21600, 21600,
 MIN_INT32, MIN_INT32,
 std::span(),
@@ -148,7 +148,7 @@ const mso_CustomShape msoTextSimple =
 nullptr, 0,
 std::span(),
 nullptr,
-nullptr, 0,
+std::span(),
 21600, 21600,
 MIN_INT32, MIN_INT32,
 std::span(),
@@ -165,7 +165,7 @@ const mso_CustomShape msoRectangle =
 nullptr, 0,
 std::span(),
 nullptr,
-nullptr, 0,
+std::span(),
 21600, 21600,
 MIN_INT32, MIN_INT32,
 std::span(),
@@ -210,7 +210,7 @@ const mso_CustomShape msoRoundRectangle =
 const_cast(mso_sptRoundRectangleSegm), sizeof( 
mso_sptRoundRectangleSegm ) >> 1,
 std::span(mso_sptRoundRectangleCalc),
 const_cast(mso_sptDefault3600),
-const_cast(mso_sptRoundRectangleTextRect), 
SAL_N_ELEMENTS( mso_sptRoundRectangleTextRect ),
+std::span(mso_sptRoundRectangleTextRect),
 21600, 21600,
 10800, 10800,
 std::span(),
@@ -235,7 +235,7 @@ const mso_CustomShape msoRightTriangle =
 nullptr, 0,
 std::span(),
 nullptr,
-const_cast(mso_sptRightTriangleTextRect), 
SAL_N_ELEMENTS( mso_sptRightTriangleTextRect ),
+std::span(mso_sptRightTriangleTextRect),
 21600, 21600,
 MIN_INT32, MIN_INT32,
 std::span(mso_sptRightTriangleGluePoints),
@@ -264,7 +264,7 @@ const mso_CustomShape msoEllipse =
 const_cast(mso_sptEllipseSegm), sizeof( mso_sptEllipseSegm ) 
>> 1,
 std::span(),
 nullptr,
-const_cast(mso_sptEllipseTextRect), 
SAL_N_ELEMENTS( mso_sptEllipseTextRect ),
+std::span(mso_sptEllipseTextRect),
 21600, 21600,
 MIN_INT32, MIN_INT32,
 std::span(mso_sptEllipseGluePoints),
@@ -315,7 +315,7 @@ const mso_CustomShape msoParallelogram =
 const_cast(mso_sptParallelogramSegm), sizeof( 
mso_sptParallelogramSegm ) >> 1,
 std::span(mso_sptParallelogramCalc),
 const_cast(mso_sptDefault5400),
-const_cast(mso_sptParallelogramTextRect), 
SAL_N_ELEMENTS( mso_sptParallelogramTextRect ),
+std::span(mso_sptParallelogramTextRect),
 21600, 21600,
 MIN_INT32, MIN_INT32,
 std::span(mso_sptParallelogramGluePoints),
@@ -336,7 +336,7 @@ const mso_CustomShape msoDiamond =
 nullptr, 0,
 std::span(),
 nullptr,
-const_cast(mso_sptDiamondTextRect), 
SAL_N_ELEMENTS( mso_sptDiamondTextRect ),
+std::span(mso_sptDiamondTextRect),
 21600, 21600,
 MIN_INT32, MIN_INT32,
 std::span(mso_sptStandardGluePoints),
@@ -380,7 +380,7 @@ const mso_CustomShape msoTrapezoid =
 const_cast(mso_sptTrapezoidSegm), sizeof( 
mso_sptTrapezoidSegm ) >> 1,
 std::span(mso_sptTrapezoidCalc),
 const_cast(mso_sptDefault5400),
-const_cast(mso_sptTrapezoidTextRect), 
SAL_N_ELEMENTS( mso_sptTrapezoidTextRect ),
+std::span(mso_sptTrapezoidTextRect),
 21600, 21600,
 MIN_INT32, MIN_INT32,
 std::span(mso_sptTrapezoidGluePoints),
@@ -471,7 +471,7 @@ const mso_CustomShape msoOctagon =

core.git: include/svx svx/source

2023-12-08 Thread Dr. David Alan Gilbert (via logerrit)
 include/svx/EnhancedCustomShapeGeometry.hxx |3 
 svx/source/customshapes/EnhancedCustomShapeGeometry.cxx |  377 +++-
 svx/source/svdraw/svdoashp.cxx  |   22 
 3 files changed, 202 insertions(+), 200 deletions(-)

New commits:
commit 4a49d7a3a98ccdca52ea0a4475d05235a111ec0a
Author: Dr. David Alan Gilbert 
AuthorDate: Mon Jul 3 15:30:04 2023 +0100
Commit: Hossein 
CommitDate: Sat Dec 9 00:47:13 2023 +0100

tdf#147021 Use std::span to avoid SAL_N_ELEMENTS in CustomShape

as for previous set, this time for Calculations.

Again the size is mostly mechanical:

In vim load into a:

:+4,+4s/const_cast[(]\([^)]*\)[)],.*/o3tl::span(\1),/
:+4,+4s/nullptr, 0/o3tl::span()

and run
:%g/^const mso_C.*=/@a
(But has had some fixups after conversion from o3tl to std)

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

diff --git a/include/svx/EnhancedCustomShapeGeometry.hxx 
b/include/svx/EnhancedCustomShapeGeometry.hxx
index 3191f1e5d14f..c776daff606a 100644
--- a/include/svx/EnhancedCustomShapeGeometry.hxx
+++ b/include/svx/EnhancedCustomShapeGeometry.hxx
@@ -73,8 +73,7 @@ struct mso_CustomShape
 std::span   pVertices;
 sal_uInt16* pElements;
 sal_uInt32  nElements;
-SvxMSDffCalculationData*pCalculation;
-sal_uInt32  nCalculation;
+std::span pCalculation;
 sal_Int32*  pDefData;
 SvxMSDffTextRectangles* pTextRect;
 sal_uInt32  nTextRect;
diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx 
b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
index ad87e34d5da3..31085c48b9a2 100644
--- a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
 #include 
 
 #include 
@@ -130,7 +129,7 @@ const mso_CustomShape msoArc =
 {
 std::span(mso_sptArcVert),
 const_cast(mso_sptArcSegm), sizeof( mso_sptArcSegm ) >> 1,
-const_cast(mso_sptArcCalc), SAL_N_ELEMENTS( 
mso_sptArcCalc ),
+std::span(mso_sptArcCalc),
 const_cast(mso_sptArcDefault),
 nullptr, 0,
 21600, 21600,
@@ -147,7 +146,7 @@ const mso_CustomShape msoTextSimple =
 {
 std::span(mso_sptTextSimpleVert),
 nullptr, 0,
-nullptr, 0,
+std::span(),
 nullptr,
 nullptr, 0,
 21600, 21600,
@@ -164,7 +163,7 @@ const mso_CustomShape msoRectangle =
 {
 std::span(mso_sptRectangleVert),
 nullptr, 0,
-nullptr, 0,
+std::span(),
 nullptr,
 nullptr, 0,
 21600, 21600,
@@ -209,7 +208,7 @@ const mso_CustomShape msoRoundRectangle =
 {
 std::span(mso_sptRoundRectangleVert),
 const_cast(mso_sptRoundRectangleSegm), sizeof( 
mso_sptRoundRectangleSegm ) >> 1,
-const_cast(mso_sptRoundRectangleCalc), 
SAL_N_ELEMENTS( mso_sptRoundRectangleCalc ),
+std::span(mso_sptRoundRectangleCalc),
 const_cast(mso_sptDefault3600),
 const_cast(mso_sptRoundRectangleTextRect), 
SAL_N_ELEMENTS( mso_sptRoundRectangleTextRect ),
 21600, 21600,
@@ -234,7 +233,7 @@ const mso_CustomShape msoRightTriangle =
 {
 std::span(mso_sptRightTriangleVert),
 nullptr, 0,
-nullptr, 0,
+std::span(),
 nullptr,
 const_cast(mso_sptRightTriangleTextRect), 
SAL_N_ELEMENTS( mso_sptRightTriangleTextRect ),
 21600, 21600,
@@ -263,7 +262,7 @@ const mso_CustomShape msoEllipse =
 {
 std::span(mso_sptEllipseVert),
 const_cast(mso_sptEllipseSegm), sizeof( mso_sptEllipseSegm ) 
>> 1,
-nullptr, 0,
+std::span(),
 nullptr,
 const_cast(mso_sptEllipseTextRect), 
SAL_N_ELEMENTS( mso_sptEllipseTextRect ),
 21600, 21600,
@@ -314,7 +313,7 @@ const mso_CustomShape msoParallelogram =
 {
 std::span(mso_sptParallelogramVert),
 const_cast(mso_sptParallelogramSegm), sizeof( 
mso_sptParallelogramSegm ) >> 1,
-const_cast(mso_sptParallelogramCalc), 
SAL_N_ELEMENTS( mso_sptParallelogramCalc ),
+std::span(mso_sptParallelogramCalc),
 const_cast(mso_sptDefault5400),
 const_cast(mso_sptParallelogramTextRect), 
SAL_N_ELEMENTS( mso_sptParallelogramTextRect ),
 21600, 21600,
@@ -335,7 +334,7 @@ const mso_CustomShape msoDiamond =
 {
 std::span(mso_sptDiamondVert),
 nullptr, 0,
-nullptr, 0,
+std::span(),
 nullptr,
 const_cast(mso_sptDiamondTextRect), 
SAL_N_ELEMENTS( mso_sptDiamondTextRect ),
 21600, 21600,
@@ -379,7 +378,7 @@ const mso_CustomShape msoTrapezoid =
 {
 std::span(mso_sptTrapezoidVert),
 const_cast(mso_sptTrapezoidSegm), sizeof( 
mso_sptTrapezoidSegm ) >> 1,
-const_cast(mso_sptT

core.git: include/svx svx/source

2023-12-08 Thread Dr. David Alan Gilbert (via logerrit)
 include/svx/EnhancedCustomShapeGeometry.hxx |3 
 svx/source/customshapes/EnhancedCustomShapeGeometry.cxx |  379 
 svx/source/svdraw/svdoashp.cxx  |   10 
 3 files changed, 196 insertions(+), 196 deletions(-)

New commits:
commit 82f30ac55a90a0f0915d4016c760c5c38db087f1
Author: Dr. David Alan Gilbert 
AuthorDate: Mon Jul 3 15:05:03 2023 +0100
Commit: Hossein 
CommitDate: Sat Dec 9 00:46:06 2023 +0100

tdf#147021 Use std::span to avoid SAL_N_ELEMENTS in CustomShape

as for previous set, this time the GluePoints.

Again the size is mostly mechanical:

In vim into the A register:
:+9,+9s/const_cast[(]\([^)]*\)[)],.*/o3tl::span(\1),/
:+9,+9s/nullptr, 0/o3tl::span()

and then:
:%g/^const mso_C.*=/@a

for the tables.
(But has had some fixups since switching from o3tl to std)

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

diff --git a/include/svx/EnhancedCustomShapeGeometry.hxx 
b/include/svx/EnhancedCustomShapeGeometry.hxx
index db8fe5a5944f..3191f1e5d14f 100644
--- a/include/svx/EnhancedCustomShapeGeometry.hxx
+++ b/include/svx/EnhancedCustomShapeGeometry.hxx
@@ -82,8 +82,7 @@ struct mso_CustomShape
 sal_Int32   nCoordHeight;
 sal_Int32   nXRef;
 sal_Int32   nYRef;
-SvxMSDffVertPair*   pGluePoints;
-sal_uInt32  nGluePoints;
+std::span   pGluePoints;
 SvxMSDffHandle* pHandles;
 sal_uInt32  nHandles;
 };
diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx 
b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
index 2fa97e30b32d..ad87e34d5da3 100644
--- a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+
 #include 
 
 #include 
@@ -134,7 +135,7 @@ const mso_CustomShape msoArc =
 nullptr, 0,
 21600, 21600,
 MIN_INT32, MIN_INT32,
-nullptr, 0,
+std::span(),
 const_cast(mso_sptArcHandle), SAL_N_ELEMENTS( 
mso_sptArcHandle )// handles
 };
 
@@ -151,7 +152,7 @@ const mso_CustomShape msoTextSimple =
 nullptr, 0,
 21600, 21600,
 MIN_INT32, MIN_INT32,
-nullptr, 0,
+std::span(),
 nullptr, 0 // handles
 };
 
@@ -168,7 +169,7 @@ const mso_CustomShape msoRectangle =
 nullptr, 0,
 21600, 21600,
 MIN_INT32, MIN_INT32,
-nullptr, 0,
+std::span(),
 nullptr, 0 // handles
 };
 
@@ -213,7 +214,7 @@ const mso_CustomShape msoRoundRectangle =
 const_cast(mso_sptRoundRectangleTextRect), 
SAL_N_ELEMENTS( mso_sptRoundRectangleTextRect ),
 21600, 21600,
 10800, 10800,
-nullptr, 0,
+std::span(),
 const_cast(mso_sptRoundRectangleHandle), SAL_N_ELEMENTS( 
mso_sptRoundRectangleHandle )  // handles
 };
 
@@ -238,7 +239,7 @@ const mso_CustomShape msoRightTriangle =
 const_cast(mso_sptRightTriangleTextRect), 
SAL_N_ELEMENTS( mso_sptRightTriangleTextRect ),
 21600, 21600,
 MIN_INT32, MIN_INT32,
-const_cast(mso_sptRightTriangleGluePoints), 
SAL_N_ELEMENTS( mso_sptRightTriangleGluePoints ),
+std::span(mso_sptRightTriangleGluePoints),
 nullptr, 0 // handles
 };
 
@@ -267,7 +268,7 @@ const mso_CustomShape msoEllipse =
 const_cast(mso_sptEllipseTextRect), 
SAL_N_ELEMENTS( mso_sptEllipseTextRect ),
 21600, 21600,
 MIN_INT32, MIN_INT32,
-const_cast(mso_sptEllipseGluePoints), SAL_N_ELEMENTS( 
mso_sptEllipseGluePoints ),
+std::span(mso_sptEllipseGluePoints),
 nullptr, 0 // handles
 };
 
@@ -318,7 +319,7 @@ const mso_CustomShape msoParallelogram =
 const_cast(mso_sptParallelogramTextRect), 
SAL_N_ELEMENTS( mso_sptParallelogramTextRect ),
 21600, 21600,
 MIN_INT32, MIN_INT32,
-const_cast(mso_sptParallelogramGluePoints), 
SAL_N_ELEMENTS( mso_sptParallelogramGluePoints ),
+std::span(mso_sptParallelogramGluePoints),
 const_cast(mso_sptParallelogramHandle), SAL_N_ELEMENTS( 
mso_sptParallelogramHandle )// handles
 };
 
@@ -339,7 +340,7 @@ const mso_CustomShape msoDiamond =
 const_cast(mso_sptDiamondTextRect), 
SAL_N_ELEMENTS( mso_sptDiamondTextRect ),
 21600, 21600,
 MIN_INT32, MIN_INT32,
-const_cast(mso_sptStandardGluePoints), SAL_N_ELEMENTS( 
mso_sptStandardGluePoints ),
+std::span(mso_sptStandardGluePoints),
 nullptr, 0 // handles
 };
 
@@ -383,7 +384,7 @@ const mso_CustomShape msoTrapezoid =
 const_cast(mso_sptTrapezoidTextRect), 
SAL_N_ELEMENTS( mso_sptTrapezoidTextRect ),
 21600, 21600,
 MIN_INT32, MIN_INT32,
-const_cast(mso_sptTrapezoidGluePoints), SAL_N_ELEMENTS

core.git: include/svx svx/source

2023-12-08 Thread Dr. David Alan Gilbert (via logerrit)
 include/svx/EnhancedCustomShapeGeometry.hxx |3 
 svx/source/customshapes/EnhancedCustomShapeGeometry.cxx |  377 
 svx/source/svdraw/svdoashp.cxx  |   10 
 3 files changed, 195 insertions(+), 195 deletions(-)

New commits:
commit 9924561a094f1b3b2b78700bd1f1638d9608f881
Author: Dr. David Alan Gilbert 
AuthorDate: Mon Jul 3 13:16:42 2023 +0100
Commit: Hossein 
CommitDate: Fri Dec 8 17:13:53 2023 +0100

tdf#147021 Use std::span to avoid SAL_N_ELEMENTS in CustomShape

EnhancedCustomShapeGeometry has a set of predefined shapes
defined with classic arrays and each is used in a structure
initialisation like:

 const mso_CustomShape msoArc =
 {
-const_cast(mso_sptArcVert), SAL_N_ELEMENTS( 
mso_sptArcVert ),

by using a span we can turn that into:
+std::span(mso_sptArcVert),

There's potential to get rid of some numbered loops later as well.

The patch is large mostly because of mechanical replacement
Loading EnhancedCustomShapeGeometry.cxx into vim then:

into register A put:
:+2,+2s/const_cast[(]\([^)]*\)[)],.*/o3tl::span(\1),/

and do:
:%g/^const mso_C.*=/@a

(since fixed up to std:: )
Change-Id: Ia670b6aa7cc9f662650de2af76ee271a4469f1f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153882
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/include/svx/EnhancedCustomShapeGeometry.hxx 
b/include/svx/EnhancedCustomShapeGeometry.hxx
index a52dc4820b6e..db8fe5a5944f 100644
--- a/include/svx/EnhancedCustomShapeGeometry.hxx
+++ b/include/svx/EnhancedCustomShapeGeometry.hxx
@@ -70,8 +70,7 @@ struct SvxMSDffHandle
 };
 struct mso_CustomShape
 {
-SvxMSDffVertPair*   pVertices;
-sal_uInt32  nVertices;
+std::span   pVertices;
 sal_uInt16* pElements;
 sal_uInt32  nElements;
 SvxMSDffCalculationData*pCalculation;
diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx 
b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
index 8e9ee89fb716..2fa97e30b32d 100644
--- a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
@@ -21,6 +21,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -126,7 +127,7 @@ const SvxMSDffHandle mso_sptArcHandle[] =
 };
 const mso_CustomShape msoArc =
 {
-const_cast(mso_sptArcVert), SAL_N_ELEMENTS( 
mso_sptArcVert ),
+std::span(mso_sptArcVert),
 const_cast(mso_sptArcSegm), sizeof( mso_sptArcSegm ) >> 1,
 const_cast(mso_sptArcCalc), SAL_N_ELEMENTS( 
mso_sptArcCalc ),
 const_cast(mso_sptArcDefault),
@@ -143,7 +144,7 @@ const SvxMSDffVertPair mso_sptTextSimpleVert[] =
 };
 const mso_CustomShape msoTextSimple =
 {
-const_cast(mso_sptTextSimpleVert), SAL_N_ELEMENTS( 
mso_sptTextSimpleVert ),
+std::span(mso_sptTextSimpleVert),
 nullptr, 0,
 nullptr, 0,
 nullptr,
@@ -160,7 +161,7 @@ const SvxMSDffVertPair mso_sptRectangleVert[] =
 };
 const mso_CustomShape msoRectangle =
 {
-const_cast(mso_sptRectangleVert), SAL_N_ELEMENTS( 
mso_sptRectangleVert ),
+std::span(mso_sptRectangleVert),
 nullptr, 0,
 nullptr, 0,
 nullptr,
@@ -205,7 +206,7 @@ const SvxMSDffHandle mso_sptRoundRectangleHandle[] =
 };
 const mso_CustomShape msoRoundRectangle =
 {
-const_cast(mso_sptRoundRectangleVert), SAL_N_ELEMENTS( 
mso_sptRoundRectangleVert ),
+std::span(mso_sptRoundRectangleVert),
 const_cast(mso_sptRoundRectangleSegm), sizeof( 
mso_sptRoundRectangleSegm ) >> 1,
 const_cast(mso_sptRoundRectangleCalc), 
SAL_N_ELEMENTS( mso_sptRoundRectangleCalc ),
 const_cast(mso_sptDefault3600),
@@ -230,7 +231,7 @@ const SvxMSDffVertPair mso_sptRightTriangleGluePoints[] =
 };
 const mso_CustomShape msoRightTriangle =
 {
-const_cast(mso_sptRightTriangleVert), SAL_N_ELEMENTS( 
mso_sptRightTriangleVert ),
+std::span(mso_sptRightTriangleVert),
 nullptr, 0,
 nullptr, 0,
 nullptr,
@@ -259,7 +260,7 @@ const SvxMSDffVertPair mso_sptEllipseGluePoints[] =
 };
 const mso_CustomShape msoEllipse =
 {
-const_cast(mso_sptEllipseVert), SAL_N_ELEMENTS( 
mso_sptEllipseVert ),
+std::span(mso_sptEllipseVert),
 const_cast(mso_sptEllipseSegm), sizeof( mso_sptEllipseSegm ) 
>> 1,
 nullptr, 0,
 nullptr,
@@ -310,7 +311,7 @@ const SvxMSDffHandle mso_sptParallelogramHandle[] =
 };
 const mso_CustomShape msoParallelogram =
 {
-const_cast(mso_sptParallelogramVert), SAL_N_ELEMENTS( 
mso_sptParallelogramVert ),
+std::span(mso_sptParallelogramVert),
 const_cast(mso_sptParallelogramSegm), sizeof( 
mso_sptParallelogramSegm ) >> 1,
 const_cast(mso_sptParallelogramCalc), 
SAL_N_ELEMENTS( mso_sptParallelogramCalc ),
 const_cast(mso_sptDefault5400),
@@ -331,7 +332,7 @@ cons

Re: LLVM exit code 139 building git master on Xubuntu 22.04

2023-10-19 Thread David Gerard
On Thu, 19 Oct 2023 at 07:26, Stephan Bergmann  wrote:
> On 10/18/23 23:08, David Gerard wrote:

> > I just tried again from a completely fresh git clone, and it's still
> > happening. Any ideas? Is there anything in the new C++20 conf that's
> > too new for llvm 14.0.0 Ubuntu version?

> Smells like a bug in that particular version of Clang.  I'd follow the
> printed instructions to report it, either directly upstream at LLVM or
> (presumably better) at Ubuntu first.


So rather than file a bug and wait, I first tried a newer version of
clang, and clang-15 worked. Hooray!

Here's what I did:

# Become root

sudo -s

# install clang-15

apt remove llvm-14 clang-14 libclang-cpp14 libclang1-14
apt autoremove
apt install clang-15 llvm-15 libclang-cpp15 libclang1-15

# put its binaries in the path - no, there doesn't seem to be a more elegant way

cd /usr/lib/llvm-15/bin
for f in *; do rm -f /usr/bin/$f; ln -s ../lib/llvm-15/bin/$f /usr/bin/$f; done

and then get out of root and ./autogen.sh


- d.


Re: LLVM exit code 139 building git master on Xubuntu 22.04

2023-10-18 Thread David Gerard
On Tue, 17 Oct 2023 at 21:33, David Gerard  wrote:

> I pulled from git master today to build LO and got LLVM exit code 139
> - an error code I can't find the meaning of, but it's apparently an
> internal error.

I just tried again from a completely fresh git clone, and it's still
happening. Any ideas? Is there anything in the new C++20 conf that's
too new for llvm 14.0.0 Ubuntu version?


- d.


LLVM exit code 139 building git master on Xubuntu 22.04

2023-10-17 Thread David Gerard
I pulled from git master today to build LO and got LLVM exit code 139
- an error code I can't find the meaning of, but it's apparently an
internal error.

The build ends like this, even after a make clean (I've cut the stack dump):

...
[CXX] sal/osl/unx/tempfile.cxx
[CXX] sal/osl/unx/thread.cxx
[CXX] sal/osl/unx/time.cxx
[CXX] sal/osl/unx/uunxapi.cxx
[CXX] sal/osl/unx/system.cxx
PLEASE submit a bug report to
https://github.com/llvm/llvm-project/issues/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.Program arguments: /usr/bin/c++ -DBOOST_ERROR_CODE_HEADER_ONLY
-DBOOST_SYSTEM_NO_DEPRECATED -DCPPU_ENV=gcc3 -DLINUX -DNDEBUG
-DOSL_DEBUG_LEVEL=0 -DUNIX -DUNX -DX86_64 -D_PTHREADS -D_REENTRANT
-DSAL_DLLIMPLEMENTATION -DRTL_OS=\"Linux\" -DRTL_ARCH=\"X86_64\"
-DSRCDIR=\"/home/fun/libreoffice\" -DCOND_LIB_SAL_TEXTENC
-DSYSTEM_ZLIB -DZLIB_CONST -fvisibility=hidden -Wall
-Wno-missing-braces -Wendif-labels -Wextra -Wundef -Wunreachable-code
-Wshadow -Wunused-macros -Wembedded-directive -finput-charset=UTF-8
-fmessage-length=0 -fno-common -pipe -fstack-protector-strong
-Wdeprecated-copy-dtor -Wimplicit-fallthrough
-Wunused-exception-parameter -Wrange-loop-analysis
-fvisibility-inlines-hidden -fPIC -Wshadow -Woverloaded-virtual
-std=c++20 -pthread -O2 -fexceptions -DLIBO_INTERNAL_ONLY -c
/home/fun/libreoffice/sal/osl/all/debugbase.cxx -o
/home/fun/libreoffice/workdir/CxxObject/sal/osl/all/debugbase.o -MMD
-MT /home/fun/libreoffice/workdir/CxxObject/sal/osl/all/debugbase.o
-MP -MF /home/fun/libreoffice/workdir/Dep/CxxObject/sal/osl/all/debugbase.d_
-I/home/fun/libreoffice/workdir/UnpackedTarball/dtoa/include/
-I/home/fun/libreoffice/workdir/UnpackedTarball/dragonbox/include/
-I/home/fun/libreoffice/include
-I/usr/lib/jvm/java-17-openjdk-amd64/include
-I/usr/lib/jvm/java-17-openjdk-amd64/include/linux
-I/home/fun/libreoffice/config_host -I/home/fun/libreoffice/sal/inc
-fcolor-diagnostics
1./home/fun/libreoffice/sal/osl/all/debugbase.cxx:52:8: current
parser token ';'
2./home/fun/libreoffice/sal/osl/all/debugbase.cxx:30:1: parsing
namespace '(anonymous)'
3./home/fun/libreoffice/sal/osl/all/debugbase.cxx:33:1: parsing
function body '(anonymous namespace)::StaticDebugBaseAddressFilter'
4./home/fun/libreoffice/sal/osl/all/debugbase.cxx:33:1: in
compound statement ('{}')
Stack dump without symbol names (ensure you have llvm-symbolizer in
your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point
to it):

[...]

clang: error: clang frontend command failed with exit code 139 (use -v
to see invocation)
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin


I don't see everyone else complaining about this, so I expect it's
something special in my setup. Does anyone have any idea?


- thanks, David.


Re: LO 24.2 C++20 baseline

2023-09-23 Thread David Gerard
On Sun, 24 Sept 2023 at 00:33, David Gerard  wrote:
> On Sun, 24 Sept 2023 at 00:20, David Gerard  wrote:

> > For gcc 12, as i understand it I'd have to try to bodge in the debs
> > from 22.10 (the current experimental version) or compile it from
> > source.

> sorry, I mean debs from 22.10 or later - 22.10 and 23.04 supply gcc12,
> 23.10 supplies gcc13, so I'm guessing 24.04 will supply gcc13 as well.


OK, never mind me! The following works:

sudo apt remove gcc# removes gcc-11, g++-11, build-essential
sudo apt install gcc-12 g++-12

So far it's compiling ...


- d.


Re: LO 24.2 C++20 baseline

2023-09-23 Thread David Gerard
On Sun, 24 Sept 2023 at 00:20, David Gerard  wrote:

> For gcc 12, as i understand it I'd have to try to bodge in the debs
> from 22.10 (the current experimental version) or compile it from
> source.

sorry, I mean debs from 22.10 or later - 22.10 and 23.04 supply gcc12,
23.10 supplies gcc13, so I'm guessing 24.04 will supply gcc13 as well.


- d.


Re: LO 24.2 C++20 baseline

2023-09-23 Thread David Gerard
> I just submitted
> 
> "Bump baseline to C++20" to master.  I will let it sit like that for a
> few more days, to see if anything breaks (Coverity? Linux distros'
> needs? etc.), before cleaning up now-unnecessary `#if __cplusplus <
> 202002L` etc., and before potentially unleashing the rewriting Clang
> plugin to mass-introduce uses of u""_ustr that I talked about
> yesterday at 
> 
"> If I Had C++20".

Unfortunately, this breaks the current Ubuntu LTS, 22.04 - LibreOffice
can't be compiled on it any more:

configure: error: GCC 11.4.0 is too old, must be at least GCC 12
Error running configure at /home/fun/libreoffice/autogen.sh line 321.
make: *** [Makefile:56: /home/fun/libreoffice/config_host.mk] Error 1

$ gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

For gcc 12, as i understand it I'd have to try to bodge in the debs
from 22.10 (the current experimental version) or compile it from
source.

The next Ubuntu LTS is 24.04.


- d.


Making it easier to start contributing to LibreOffice development

2023-08-09 Thread David Booth

SUMMARY:
I think it would help if it were easier to get started on contributing 
to LibreOffice development.   I tried, but gave up after 4+ hours.  I 
don't know where is the best place to make this suggestion.


BACKGROUND:
A few months ago I ran into a problem using LibreOffice.  Since I have 
experience with software development -- I'm a software architect with 
multiple degrees in Computer Science -- I wanted to help improve it.  I 
followed instructions as I could find them, but found them them unclear. 
 After spending 4+ hours I was unable to reach the point of being able 
to get started and had to stop, due to other priorities.


Perhaps if I get another burst of volunteer energy I could try again 
someday.  And if I do, maybe a good first task would be to improve the 
instructions for contributing to LibreOffice development.   In the 
meantime I thought I should at least share my experience, in case 
someone else might be inspired to improve the instructions.


Thanks,
David Booth



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

2023-07-16 Thread Dr. David Alan Gilbert (via logerrit)
 editeng/source/editeng/impedit3.cxx |   32 ++--
 1 file changed, 6 insertions(+), 26 deletions(-)

New commits:
commit ab42fe0c09a4f5fefe9ba46b3be11dff4deff472
Author: Dr. David Alan Gilbert 
AuthorDate: Thu Jul 13 15:25:29 2023 +0100
Commit: Noel Grandin 
CommitDate: Sun Jul 16 12:55:52 2023 +0200

editeng: Use RotateAround rather than another copy

Replace lcl_ImplCalcRotatedPos by Tools::Point's RotateAround.

Signed-off-by: Dr. David Alan Gilbert 
Change-Id: Id1d8baebafb019f1bc574acc71078150442f20dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154394
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/editeng/source/editeng/impedit3.cxx 
b/editeng/source/editeng/impedit3.cxx
index dff400a5517d..0052fb5e720d 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -226,22 +226,6 @@ static void lcl_DrawRedLines( OutputDevice& rOutDev,
 }
 }
 
-static Point lcl_ImplCalcRotatedPos( Point rPos, Point rOrigin, double nSin, 
double nCos )
-{
-Point aRotatedPos;
-// Translation...
-Point aTranslatedPos( rPos);
-aTranslatedPos -= rOrigin;
-
-aRotatedPos.setX( static_cast( nCos*aTranslatedPos.X() + 
nSin*aTranslatedPos.Y() ) );
-aRotatedPos.setY( static_cast(- ( nSin*aTranslatedPos.X() - 
nCos*aTranslatedPos.Y() )) );
-aTranslatedPos = aRotatedPos;
-// Translation...
-aTranslatedPos += rOrigin;
-
-return aTranslatedPos;
-}
-
 // For Kashidas from sw/source/core/text/porlay.cxx
 
 #define IS_JOINING_GROUP(c, g) ( u_getIntPropertyValue( (c), 
UCHAR_JOINING_GROUP ) == U_JG_##g )
@@ -3327,13 +3311,6 @@ void ImpEditEngine::Paint( OutputDevice& rOutDev, 
tools::Rectangle aClipRect, Po
 // un-scrolled.
 // The rectangle is infinite.
 const Point aOrigin( aStartPos );
-double nCos = 0.0, nSin = 0.0;
-if ( nOrientation )
-{
-double nRealOrientation = toRadians(nOrientation);
-nCos = cos( nRealOrientation );
-nSin = sin( nRealOrientation );
-}
 
 // #110496# Added some more optional metafile comments. This
 // change: factored out some duplicated code.
@@ -3797,7 +3774,7 @@ void ImpEditEngine::Paint( OutputDevice& rOutDev, 
tools::Rectangle aClipRect, Po
 aTmpFont.SetEscapement( 0 );
 }
 
-aOutPos = lcl_ImplCalcRotatedPos( 
aOutPos, aOrigin, nSin, nCos );
+aOrigin.RotateAround(aOutPos, 
nOrientation);
 aTmpFont.SetOrientation( 
aTmpFont.GetOrientation()+nOrientation );
 aTmpFont.SetPhysFont(rOutDev);
 
@@ -3845,7 +3822,10 @@ void ImpEditEngine::Paint( OutputDevice& rOutDev, 
tools::Rectangle aClipRect, Po
 
comphelper::string::padToLength( aBlanks, nTextLen, ' ' );
 Point aUnderlinePos( aOutPos );
 if ( nOrientation )
-aUnderlinePos = 
lcl_ImplCalcRotatedPos( aTmpPos, aOrigin, nSin, nCos );
+{
+aUnderlinePos = aTmpPos;
+
aOrigin.RotateAround(aUnderlinePos, nOrientation);
+}
 rOutDev.DrawStretchText( 
aUnderlinePos, aSz.Width(), aBlanks.makeStringAndClear(), 0, nTextLen );
 
 aTmpFont.SetUnderline( 
LINESTYLE_NONE );
@@ -3879,7 +3859,7 @@ void ImpEditEngine::Paint( OutputDevice& rOutDev, 
tools::Rectangle aClipRect, Po
 Point aTopLeft( aTmpPos );
 aTopLeft.AdjustY( 
-(pLine->GetMaxAscent()) );
 if ( nOrientation )
-aTopLeft = 
lcl_ImplCalcRotatedPos( aTopLeft, aOrigin, nSin, nCos );
+aOrigin.RotateAround(aTopLeft, 
nOrientation);
 tools::Rectangle aRect( aTopLeft, 
rTextPortion.GetSize() );
 rOutDev.DrawRect( aRect );
 }


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

2023-07-16 Thread Dr. David Alan Gilbert (via logerrit)
 editeng/source/outliner/outliner.cxx |   14 ++
 1 file changed, 2 insertions(+), 12 deletions(-)

New commits:
commit 80b4e90e055825e3fef6fa11796bf4f40627c478
Author: Dr. David Alan Gilbert 
AuthorDate: Thu Jul 13 14:52:07 2023 +0100
Commit: Noel Grandin 
CommitDate: Sun Jul 16 12:55:19 2023 +0200

editeng/Outliner: Use RotateAround rather than open coding

In PaintBullet, use Tools::Point's RotateAround instead of open coding.

Signed-off-by: Dr. David Alan Gilbert 
Change-Id: I4f5a50a70d8fcadd2e5af60e365de80f2e9a271e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154393
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/editeng/source/outliner/outliner.cxx 
b/editeng/source/outliner/outliner.cxx
index 04f55eb7dbdb..5af4573bf659 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -945,18 +945,8 @@ void Outliner::PaintBullet(sal_Int32 nPara, const Point& 
rStartPos, const Point&
 {
 // Both TopLeft and bottom left is not quite correct,
 // since in EditEngine baseline ...
-double nRealOrientation = toRadians(nOrientation);
-double nCos = cos( nRealOrientation );
-double nSin = sin( nRealOrientation );
-Point aRotatedPos;
-// Translation...
-aTextPos -= rOrigin;
-// Rotation...
-aRotatedPos.setX(static_cast(nCos*aTextPos.X() + 
nSin*aTextPos.Y()) );
-aRotatedPos.setY(static_cast(- (nSin*aTextPos.X() 
- nCos*aTextPos.Y())) );
-aTextPos = aRotatedPos;
-// Translation...
-aTextPos += rOrigin;
+rOrigin.RotateAround(aTextPos, nOrientation);
+
 vcl::Font aRotatedFont( aBulletFont );
 aRotatedFont.SetOrientation( nOrientation );
 rOutDev.SetFont( aRotatedFont );


[Libreoffice-commits] core.git: editeng/source include/tools slideshow/Library_OGLTrans.mk vcl/CppunitTest_vcl_animation.mk

2023-07-16 Thread Dr. David Alan Gilbert (via logerrit)
 editeng/source/editeng/editeng.cxx  |2 +-
 editeng/source/editeng/impedit.hxx  |1 -
 editeng/source/editeng/impedit3.cxx |   26 ++
 include/tools/gen.hxx   |3 ++-
 slideshow/Library_OGLTrans.mk   |1 +
 vcl/CppunitTest_vcl_animation.mk|1 +
 6 files changed, 7 insertions(+), 27 deletions(-)

New commits:
commit 38372f103aa5035ec32570972e55656e07647791
Author: Dr. David Alan Gilbert 
AuthorDate: Thu Jul 13 14:32:44 2023 +0100
Commit: Noel Grandin 
CommitDate: Sun Jul 16 12:54:58 2023 +0200

editeng: Use Tools::Point::RotateAround instead of our own

Remove our own Rotate function by calls to Tools::Point's
RotateAround method.
Add a comment on RotateAround to emphasise that the point rotated
is the parameter and the This object is used as the origin.

Using TOOLS_DLLPUBLIC to fix link error (as suggested by Arnaud)
Added tl to slideshow (from Neil)

Signed-off-by: Dr. David Alan Gilbert 
Change-Id: I296bbdf910d262401bfa18f0fc4f431b9e79b8f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154392
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/editeng/source/editeng/editeng.cxx 
b/editeng/source/editeng/editeng.cxx
index 19ed11229645..9e6696cd5546 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -217,7 +217,7 @@ void EditEngine::Draw( OutputDevice& rOutDev, const Point& 
rStartPos, Degree10 n
 if ( IsEffectivelyVertical() )
 {
 aStartPos.AdjustX(GetPaperSize().Width() );
-aStartPos = Rotate( aStartPos, nOrientation, rStartPos );
+rStartPos.RotateAround(aStartPos, nOrientation);
 }
 pImpEditEngine->Paint(rOutDev, aBigRect, aStartPos, false, nOrientation);
 if( rOutDev.GetConnectMetaFile() )
diff --git a/editeng/source/editeng/impedit.hxx 
b/editeng/source/editeng/impedit.hxx
index b59d934beadf..815c42328ba8 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -1360,7 +1360,6 @@ inline vcl::Cursor* ImpEditView::GetCursor()
 void ConvertItem( std::unique_ptr& rPoolItem, MapUnit 
eSourceUnit, MapUnit eDestUnit );
 void ConvertAndPutItems( SfxItemSet& rDest, const SfxItemSet& rSource, const 
MapUnit* pSourceUnit = nullptr, const MapUnit* pDestUnit = nullptr );
 AsianCompressionFlags GetCharTypeForCompression( sal_Unicode cChar );
-Point Rotate( const Point& rPoint, Degree10 nOrientation, const Point& rOrigin 
);
 
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/editeng/impedit3.cxx 
b/editeng/source/editeng/impedit3.cxx
index ba7c2ed04ae3..dff400a5517d 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -114,28 +114,6 @@ struct TabInfo
 
 }
 
-Point Rotate( const Point& rPoint, Degree10 nOrientation, const Point& rOrigin 
)
-{
-double nRealOrientation = toRadians(nOrientation);
-double nCos = cos( nRealOrientation );
-double nSin = sin( nRealOrientation );
-
-Point aRotatedPos;
-Point aTranslatedPos( rPoint );
-
-// Translation
-aTranslatedPos -= rOrigin;
-
-// Rotation...
-aRotatedPos.setX( static_cast( nCos*aTranslatedPos.X() + 
nSin*aTranslatedPos.Y() ) );
-aRotatedPos.setY( static_cast(- ( nSin*aTranslatedPos.X() - 
nCos*aTranslatedPos.Y() )) );
-aTranslatedPos = aRotatedPos;
-
-// Translation...
-aTranslatedPos += rOrigin;
-return aTranslatedPos;
-}
-
 AsianCompressionFlags GetCharTypeForCompression( sal_Unicode cChar )
 {
 switch ( cChar )
@@ -231,8 +209,8 @@ static void lcl_DrawRedLines( OutputDevice& rOutDev,
 
 if (nOrientation)
 {
-aPoint1 = Rotate(aPoint1, nOrientation, rOrigin);
-aPoint2 = Rotate(aPoint2, nOrientation, rOrigin);
+rOrigin.RotateAround(aPoint1, nOrientation);
+rOrigin.RotateAround(aPoint2, nOrientation);
 }
 
 {
diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index 11d26b0372f2..c6372d7c92dc 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -74,7 +74,7 @@ inline bool equal(Pair const & p1, Pair const & p2)
 // Point
 
 class Size;
-class SAL_WARN_UNUSED UNLESS_MERGELIBS(SAL_DLLPUBLIC_EXPORT) Point final : 
protected Pair
+class SAL_WARN_UNUSED TOOLS_DLLPUBLIC Point final : protected Pair
 {
 public:
 constexpr Point() {}
@@ -88,6 +88,7 @@ public:
 tools::LongAdjustX( tools::Long nHorzMove ) { mnA += 
nHorzMove; return mnA; }
 tools::LongAdjustY( tools::Long nVertMove ) { mnB += 
nVertMove; return mnB; }
 
+// Rotate parameter point using This as origin; store result back into 
parameter point
 voidRotateAround( tools::Long& rX, tools::Long& rY, 
Degree10 nOrientation ) const;
 voidRotateAround( Point&, Degree10 nOrientation ) 

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

2023-07-03 Thread Dr. David Alan Gilbert (via logerrit)
 include/svx/constructhelper.hxx   |6 ++
 sd/source/ui/func/fuconrec.cxx|   31 ---
 svx/source/svdraw/constructhelper.cxx |9 +
 3 files changed, 15 insertions(+), 31 deletions(-)

New commits:
commit a780c820f5cf3bfbb5d88bd5c6ca670e0a0c730f
Author: Dr. David Alan Gilbert 
AuthorDate: Sat Jul 1 14:34:19 2023 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jul 3 22:21:18 2023 +0200

tdf#155630 Use common getPolygon for sd

Unfortunately the SetLineEnds in sw is different enough from sw and sc
to make sharing it a pain.  However we can share the GetPolygon function
we already moved into svx.
Expose the svx function into the header and use it in sd.

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

diff --git a/include/svx/constructhelper.hxx b/include/svx/constructhelper.hxx
index 449a7ba7d1d0..928e6b1d3c68 100644
--- a/include/svx/constructhelper.hxx
+++ b/include/svx/constructhelper.hxx
@@ -19,15 +19,21 @@
 
 #pragma once
 
+#include 
 #include 
 #include 
+#include 
 
+class SdrModel;
 class SdrObject;
 class SfxItemSet;
 
 class SVXCORE_DLLPUBLIC ConstructHelper
 {
 public:
+// Helper to find the shape for a given line end
+static ::basegfx::B2DPolyPolygon GetLineEndPoly(TranslateId pResId, const 
SdrModel& rModel);
+
 // set line starts and ends for newly created objects
 static void SetLineEnds(SfxItemSet& rAttr, const SdrObject& rObj, 
sal_uInt16 nSlotId,
 tools::Long nWidth);
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index a1f4e5f3c6cf..3561a6eb8c47 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -26,6 +26,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -666,30 +667,6 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& 
rAttr, SdrObject* pObj)
 /**
  * set line starts and ends for the object to be created
  */
-static ::basegfx::B2DPolyPolygon getPolygon(TranslateId pResId, const 
SdrModel& rModel)
-{
-::basegfx::B2DPolyPolygon aRetval;
-XLineEndListRef pLineEndList(rModel.GetLineEndList());
-
-if( pLineEndList.is() )
-{
-OUString aArrowName(SvxResId(pResId));
-::tools::Long nCount = pLineEndList->Count();
-::tools::Long nIndex;
-for( nIndex = 0; nIndex < nCount; nIndex++ )
-{
-const XLineEndEntry* pEntry = pLineEndList->GetLineEnd(nIndex);
-if( pEntry->GetName() == aArrowName )
-{
-aRetval = pEntry->GetLineEnd();
-break;
-}
-}
-}
-
-return aRetval;
-}
-
 void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject const & 
rObj)
 {
 if ( !((rObj.GetObjIdentifier() == SdrObjKind::Edge &&
@@ -710,7 +687,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, 
SdrObject const & rObj
 SdrModel& rModel(rObj.getSdrModelFromSdrObject());
 
 // arrowhead
-::basegfx::B2DPolyPolygon aArrow( getPolygon( RID_SVXSTR_ARROW, rModel ) );
+::basegfx::B2DPolyPolygon 
aArrow(ConstructHelper::GetLineEndPoly(RID_SVXSTR_ARROW, rModel));
 if( !aArrow.count() )
 {
 ::basegfx::B2DPolygon aNewArrow;
@@ -722,7 +699,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, 
SdrObject const & rObj
 }
 
 // Circles
-::basegfx::B2DPolyPolygon aCircle( getPolygon( RID_SVXSTR_CIRCLE, rModel ) 
);
+::basegfx::B2DPolyPolygon 
aCircle(ConstructHelper::GetLineEndPoly(RID_SVXSTR_CIRCLE, rModel));
 if( !aCircle.count() )
 {
 ::basegfx::B2DPolygon aNewCircle = 
::basegfx::utils::createPolygonFromEllipse(::basegfx::B2DPoint(0.0, 0.0), 
250.0, 250.0);
@@ -731,7 +708,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, 
SdrObject const & rObj
 }
 
 // Square
-::basegfx::B2DPolyPolygon aSquare( getPolygon( RID_SVXSTR_SQUARE, rModel ) 
);
+::basegfx::B2DPolyPolygon 
aSquare(ConstructHelper::GetLineEndPoly(RID_SVXSTR_SQUARE, rModel));
 if( !aSquare.count() )
 {
 ::basegfx::B2DPolygon aNewSquare;
diff --git a/svx/source/svdraw/constructhelper.cxx 
b/svx/source/svdraw/constructhelper.cxx
index f09d11787809..d7c7f20a5cc8 100644
--- a/svx/source/svdraw/constructhelper.cxx
+++ b/svx/source/svdraw/constructhelper.cxx
@@ -34,7 +34,8 @@
 
 //using namespace ::com::sun::star;
 
-static ::basegfx::B2DPolyPolygon lcl_getPolygon(TranslateId pResId, const 
SdrModel& rModel)
+::basegfx::B2DPolyPolygon ConstructHelper::GetLineEndPoly(TranslateId pResId,
+  const SdrModel& 
rModel)
 {
 ::basegfx::B2DPolyPolygon aRetval;
 XLineEndListRef pLineEndList(rModel.GetLineE

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

2023-07-03 Thread Dr. David Alan Gilbert (via logerrit)
 sw/source/core/frmedt/feshview.cxx |  163 -
 1 file changed, 2 insertions(+), 161 deletions(-)

New commits:
commit f239b3dec1acbe7ad70df31e8264bb16ac095502
Author: Dr. David Alan Gilbert 
AuthorDate: Sat Jul 1 00:05:32 2023 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jul 3 21:34:23 2023 +0200

tdf#155630 Use common SetLineEnds in sw

Use the shared SetLineEnds code from sw.

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

diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index 1c19ffb4eca4..537070f08c24 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -105,38 +106,6 @@
 
 using namespace com::sun::star;
 
-/**
- * set line starts and ends for the object to be created
- */
-
-namespace {
-
-::basegfx::B2DPolyPolygon getPolygon(TranslateId pResId, const SdrModel& 
rModel)
-{
-::basegfx::B2DPolyPolygon aRetval;
-XLineEndListRef pLineEndList(rModel.GetLineEndList());
-
-if( pLineEndList.is() )
-{
-OUString aArrowName( SvxResId(pResId) );
-tools::Long nCount = pLineEndList->Count();
-tools::Long nIndex;
-for( nIndex = 0; nIndex < nCount; nIndex++ )
-{
-const XLineEndEntry* pEntry = pLineEndList->GetLineEnd(nIndex);
-if( pEntry->GetName() == aArrowName )
-{
-aRetval = pEntry->GetLineEnd();
-break;
-}
-}
-}
-
-return aRetval;
-}
-
-}
-
 SwFlyFrame *GetFlyFromMarked( const SdrMarkList *pLst, SwViewShell *pSh )
 {
 if ( !pLst )
@@ -953,135 +922,7 @@ static void lcl_NotifyNeighbours( const SdrMarkList *pLst 
)
 
 void SwFEShell::SetLineEnds(SfxItemSet& rAttr, SdrObject const & rObj, 
sal_uInt16 nSlotId)
 {
-SdrModel& rModel(rObj.getSdrModelFromSdrObject());
-
-if ( !(nSlotId == SID_LINE_ARROW_START  ||
-  nSlotId == SID_LINE_ARROW_END||
-  nSlotId == SID_LINE_ARROWS   ||
-  nSlotId == SID_LINE_ARROW_CIRCLE ||
-  nSlotId == SID_LINE_CIRCLE_ARROW ||
-  nSlotId == SID_LINE_ARROW_SQUARE ||
-  nSlotId == SID_LINE_SQUARE_ARROW ||
-  nSlotId == SID_DRAW_MEASURELINE) )
-return;
-
-// set attributes of line start and ends
-
-// arrowhead
-::basegfx::B2DPolyPolygon aArrow( getPolygon( RID_SVXSTR_ARROW, rModel ) );
-if( !aArrow.count() )
-{
-::basegfx::B2DPolygon aNewArrow;
-aNewArrow.append(::basegfx::B2DPoint(10.0, 0.0));
-aNewArrow.append(::basegfx::B2DPoint(0.0, 30.0));
-aNewArrow.append(::basegfx::B2DPoint(20.0, 30.0));
-aNewArrow.setClosed(true);
-aArrow.append(aNewArrow);
-}
-
-// Circles
-::basegfx::B2DPolyPolygon aCircle( getPolygon( RID_SVXSTR_CIRCLE, rModel ) 
);
-if( !aCircle.count() )
-{
-::basegfx::B2DPolygon aNewCircle = 
::basegfx::utils::createPolygonFromEllipse(::basegfx::B2DPoint(0.0, 0.0), 
250.0, 250.0);
-aNewCircle.setClosed(true);
-aCircle.append(aNewCircle);
-}
-
-// Square
-::basegfx::B2DPolyPolygon aSquare( getPolygon( RID_SVXSTR_SQUARE, rModel ) 
);
-if( !aSquare.count() )
-{
-::basegfx::B2DPolygon aNewSquare;
-aNewSquare.append(::basegfx::B2DPoint(0.0, 0.0));
-aNewSquare.append(::basegfx::B2DPoint(10.0, 0.0));
-aNewSquare.append(::basegfx::B2DPoint(10.0, 10.0));
-aNewSquare.append(::basegfx::B2DPoint(0.0, 10.0));
-aNewSquare.setClosed(true);
-aSquare.append(aNewSquare);
-}
-
-SfxItemSet aSet( rModel.GetItemPool() );
-tools::Long nWidth = 100; // (1/100th mm)
-
-// determine line width and calculate with it the line end width
-if( aSet.GetItemState( XATTR_LINEWIDTH ) != SfxItemState::DONTCARE )
-{
-tools::Long nValue = aSet.Get( XATTR_LINEWIDTH ).GetValue();
-if( nValue > 0 )
-nWidth = nValue * 3;
-}
-
-switch (nSlotId)
-{
-case SID_LINE_ARROWS:
-case SID_DRAW_MEASURELINE:
-{
-// connector with arrow ends
-rAttr.Put(XLineStartItem(SvxResId(RID_SVXSTR_ARROW), aArrow));
-rAttr.Put(XLineStartWidthItem(nWidth));
-rAttr.Put(XLineEndItem(SvxResId(RID_SVXSTR_ARROW), aArrow));
-rAttr.Put(XLineEndWidthItem(nWidth));
-}
-break;
-
-case SID_LINE_ARROW_START:
-case SID_LINE_ARROW_CIRCLE:
-case SID_LINE_ARROW_SQUARE:
-{
-// connector with arrow start
-rAttr.Put(XLineStartItem(SvxResId(RID_SVXSTR_ARROW), aArrow));
-rAttr.Put(XLineStartWidthItem(n

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

2023-07-03 Thread Dr. David Alan Gilbert (via logerrit)
 include/svx/constructhelper.hxx   |   37 ++
 sc/source/ui/drawfunc/fuconrec.cxx|  163 -
 svx/Library_svxcore.mk|3 
 svx/source/svdraw/constructhelper.cxx |  190 ++
 4 files changed, 231 insertions(+), 162 deletions(-)

New commits:
commit 32fd602d3918be032d79322f76021c6ebc27ccba
Author: Dr. David Alan Gilbert 
AuthorDate: Fri Jun 30 23:41:15 2023 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jul 3 21:33:44 2023 +0200

tdf#155630 Move sc's SetLineEnds into svx

SetLineEnds is duped in sc,sd and sw.  Swing SetLineEnds into
svx where we'll share it.

Note: a) We also move it's helper function getPolygon
  b) sc, sd and sw use different values for the magic nWidth value
 so parameterise
Change-Id: I6011b41d9db7b7fab364038227e1866fb9d64b02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153826
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/include/svx/constructhelper.hxx b/include/svx/constructhelper.hxx
new file mode 100644
index ..449a7ba7d1d0
--- /dev/null
+++ b/include/svx/constructhelper.hxx
@@ -0,0 +1,37 @@
+/* -*- 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 .
+ */
+
+#pragma once
+
+#include 
+#include 
+
+class SdrObject;
+class SfxItemSet;
+
+class SVXCORE_DLLPUBLIC ConstructHelper
+{
+public:
+// set line starts and ends for newly created objects
+static void SetLineEnds(SfxItemSet& rAttr, const SdrObject& rObj, 
sal_uInt16 nSlotId,
+tools::Long nWidth);
+};
+
+//
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/drawfunc/fuconrec.cxx 
b/sc/source/ui/drawfunc/fuconrec.cxx
index d73915ca450e..0f06de3d82db 100644
--- a/sc/source/ui/drawfunc/fuconrec.cxx
+++ b/sc/source/ui/drawfunc/fuconrec.cxx
@@ -22,6 +22,7 @@
 #include 
 
 #include 
+#include 
 // Create default drawing objects via keyboard
 #include 
 #include 
@@ -50,38 +51,6 @@ FuConstRectangle::~FuConstRectangle()
 {
 }
 
-/**
- * set line starts and ends for the object to be created
- */
-
-namespace {
-
-::basegfx::B2DPolyPolygon getPolygon(TranslateId pResId, const SdrModel& 
rModel)
-{
-::basegfx::B2DPolyPolygon aRetval;
-XLineEndListRef pLineEndList(rModel.GetLineEndList());
-
-if( pLineEndList.is() )
-{
-OUString aArrowName( SvxResId(pResId) );
-tools::Long nCount = pLineEndList->Count();
-tools::Long nIndex;
-for( nIndex = 0; nIndex < nCount; nIndex++ )
-{
-const XLineEndEntry* pEntry = pLineEndList->GetLineEnd(nIndex);
-if( pEntry->GetName() == aArrowName )
-{
-aRetval = pEntry->GetLineEnd();
-break;
-}
-}
-}
-
-return aRetval;
-}
-
-}
-
 bool FuConstRectangle::MouseButtonDown(const MouseEvent& rMEvt)
 {
 // remember button state for creation of own MouseEvents
@@ -206,135 +175,7 @@ void FuConstRectangle::Activate()
 
 void FuConstRectangle::SetLineEnds(SfxItemSet& rAttr, const SdrObject& rObj, 
sal_uInt16 nSlotId)
 {
-SdrModel& rModel(rObj.getSdrModelFromSdrObject());
-
-if ( !(nSlotId == SID_LINE_ARROW_START  ||
- nSlotId == SID_LINE_ARROW_END||
- nSlotId == SID_LINE_ARROWS   ||
- nSlotId == SID_LINE_ARROW_CIRCLE ||
- nSlotId == SID_LINE_CIRCLE_ARROW ||
- nSlotId == SID_LINE_ARROW_SQUARE ||
- nSlotId == SID_LINE_SQUARE_ARROW ||
- nSlotId == SID_DRAW_MEASURELINE) )
-return;
-
-
-// set attributes of line start and ends
-
-// arrowhead
-::basegfx::B2DPolyPolygon aArrow( getPolygon( RID_SVXSTR_ARROW, rModel ) );
-if( !aArrow.count() )
-{
-::basegfx::B2DPolygon aNewArrow;
-aNewArrow.append(::basegfx::B2DPoint(10.0, 0.0));
-aNewArrow.append(::basegfx::B2DPoint(0.0, 30.0));
-aNewArrow.append(::basegfx::B2D

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

2023-06-13 Thread Dr. David Alan Gilbert (via logerrit)
 sc/source/filter/excel/xlformula.cxx |   22 +++---
 sc/source/filter/oox/formulabase.cxx |   22 +++---
 2 files changed, 22 insertions(+), 22 deletions(-)

New commits:
commit c437ccaab235320995af8c272705ac7c01784dd8
Author: Dr. David Alan Gilbert 
AuthorDate: Sat Jun 10 01:58:09 2023 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jun 13 16:24:55 2023 +0200

tdf#147021: sc/source/filter SAL_N_ELEMENTS usage

Two blocks that just use SAL_N_ELEMENTS in a form:

  func(array, array+SAL_N_ELEMENTS(array))

just use std::end for the end of it; I'm not seeing an easier
way to pass the whole array in one.

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

diff --git a/sc/source/filter/excel/xlformula.cxx 
b/sc/source/filter/excel/xlformula.cxx
index e2e082ac2651..2612f0d3dc45 100644
--- a/sc/source/filter/excel/xlformula.cxx
+++ b/sc/source/filter/excel/xlformula.cxx
@@ -656,21 +656,21 @@ XclFunctionProvider::XclFunctionProvider( const XclRoot& 
rRoot )
 from earlier tables. */
 XclBiff eBiff = rRoot.GetBiff();
 if( eBiff >= EXC_BIFF2 )
-(this->*pFillFunc)(saFuncTable_2, saFuncTable_2 + 
SAL_N_ELEMENTS(saFuncTable_2));
+(this->*pFillFunc)(saFuncTable_2, std::end(saFuncTable_2));
 if( eBiff >= EXC_BIFF3 )
-(this->*pFillFunc)(saFuncTable_3, saFuncTable_3 + 
SAL_N_ELEMENTS(saFuncTable_3));
+(this->*pFillFunc)(saFuncTable_3, std::end(saFuncTable_3));
 if( eBiff >= EXC_BIFF4 )
-(this->*pFillFunc)(saFuncTable_4, saFuncTable_4 + 
SAL_N_ELEMENTS(saFuncTable_4));
+(this->*pFillFunc)(saFuncTable_4, std::end(saFuncTable_4));
 if( eBiff >= EXC_BIFF5 )
-(this->*pFillFunc)(saFuncTable_5, saFuncTable_5 + 
SAL_N_ELEMENTS(saFuncTable_5));
+(this->*pFillFunc)(saFuncTable_5, std::end(saFuncTable_5));
 if( eBiff >= EXC_BIFF8 )
-(this->*pFillFunc)(saFuncTable_8, saFuncTable_8 + 
SAL_N_ELEMENTS(saFuncTable_8));
-(this->*pFillFunc)(saFuncTable_Oox, saFuncTable_Oox + 
SAL_N_ELEMENTS(saFuncTable_Oox));
-(this->*pFillFunc)(saFuncTable_2010, saFuncTable_2010 + 
SAL_N_ELEMENTS(saFuncTable_2010));
-(this->*pFillFunc)(saFuncTable_2013, saFuncTable_2013 + 
SAL_N_ELEMENTS(saFuncTable_2013));
-(this->*pFillFunc)(saFuncTable_2016, saFuncTable_2016 + 
SAL_N_ELEMENTS(saFuncTable_2016));
-(this->*pFillFunc)(saFuncTable_Odf, saFuncTable_Odf + 
SAL_N_ELEMENTS(saFuncTable_Odf));
-(this->*pFillFunc)(saFuncTable_OOoLO, saFuncTable_OOoLO + 
SAL_N_ELEMENTS(saFuncTable_OOoLO));
+(this->*pFillFunc)(saFuncTable_8, std::end(saFuncTable_8));
+(this->*pFillFunc)(saFuncTable_Oox, std::end(saFuncTable_Oox));
+(this->*pFillFunc)(saFuncTable_2010, std::end(saFuncTable_2010));
+(this->*pFillFunc)(saFuncTable_2013, std::end(saFuncTable_2013));
+(this->*pFillFunc)(saFuncTable_2016, std::end(saFuncTable_2016));
+(this->*pFillFunc)(saFuncTable_Odf, std::end(saFuncTable_Odf));
+(this->*pFillFunc)(saFuncTable_OOoLO, std::end(saFuncTable_OOoLO));
 }
 
 const XclFunctionInfo* XclFunctionProvider::GetFuncInfoFromXclFunc( sal_uInt16 
nXclFunc ) const
diff --git a/sc/source/filter/oox/formulabase.cxx 
b/sc/source/filter/oox/formulabase.cxx
index 8594bce693b8..7603d0f17833 100644
--- a/sc/source/filter/oox/formulabase.cxx
+++ b/sc/source/filter/oox/formulabase.cxx
@@ -999,17 +999,17 @@ FunctionProviderImpl::FunctionProviderImpl( bool 
bImportFilter )
 /*  Add functions supported in the current BIFF version only. Function
 tables from later BIFF versions may overwrite single functions from
 earlier tables. */
-initFuncs(saFuncTableBiff2, saFuncTableBiff2 + 
SAL_N_ELEMENTS(saFuncTableBiff2), bImportFilter);
-initFuncs(saFuncTableBiff3, saFuncTableBiff3 + 
SAL_N_ELEMENTS(saFuncTableBiff3), bImportFilter);
-initFuncs(saFuncTableBiff4, saFuncTableBiff4 + 
SAL_N_ELEMENTS(saFuncTableBiff4), bImportFilter);
-initFuncs(saFuncTableBiff5, saFuncTableBiff5 + 
SAL_N_ELEMENTS(saFuncTableBiff5), bImportFilter);
-initFuncs(saFuncTableBiff8, saFuncTableBiff8 + 
SAL_N_ELEMENTS(saFuncTableBiff8), bImportFilter);
-initFuncs(saFuncTableOox  , saFuncTableOox   + 
SAL_N_ELEMENTS(saFuncTableOox  ), bImportFilter);
-initFuncs(saFuncTable2010 , saFuncTable2010  + 
SAL_N_ELEMENTS(saFuncTable2010 ), bImportFilter);
-initFuncs(saFuncTable2013 , saFuncTable2013  + 
SAL_N_ELEMENTS(saFuncTable2013 ), bImportFilter);
-initFuncs(saFuncTable2016 , saFuncTable2016  + 
SAL_N_ELEMENTS(saFuncTable2016 ), bImportFilter);
-initFuncs(saFuncTableOdf  , saFuncTableOdf   + 
SAL_N_ELEMENTS(saFuncTableOdf  ), bImportFilter);
-initFuncs(saFuncTableOOoLO, saFuncTableOOoLO + 
SAL_N_ELEMENTS(saFuncTableOOoLO), bImpo

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

2023-06-13 Thread Dr. David Alan Gilbert (via logerrit)
 vcl/unx/generic/app/keysymnames.cxx |   30 +++---
 vcl/win/window/keynames.cxx |   14 +++---
 2 files changed, 22 insertions(+), 22 deletions(-)

New commits:
commit 880bc4255099132557fe8d7d36a50c06f05cf5a1
Author: Dr. David Alan Gilbert 
AuthorDate: Thu Jun 8 21:56:02 2023 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jun 13 16:22:27 2023 +0200

tdf#147021: vcl/* KeyboardReplacements SAL_N_ELEMENTS removal

A couple more tables using SAL_N_ELEMENTS.
(I do wonder why these are separate).
Note, I've not attacked the 'for' use of SAL_N_ELEMENTS in these files
since they require some separate thinking about their indexing.

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

diff --git a/vcl/unx/generic/app/keysymnames.cxx 
b/vcl/unx/generic/app/keysymnames.cxx
index 16ffaa4b91c6..d4842df95589 100644
--- a/vcl/unx/generic/app/keysymnames.cxx
+++ b/vcl/unx/generic/app/keysymnames.cxx
@@ -461,21 +461,21 @@ namespace vcl_sal {
 
 const struct KeyboardReplacements aKeyboards[] =
 {
-{ "ca", aImplReplacements_Catalan, 
SAL_N_ELEMENTS(aImplReplacements_Catalan) },
-{ "de", aImplReplacements_German, 
SAL_N_ELEMENTS(aImplReplacements_German) },
-{ "sl", aImplReplacements_Slovenian, 
SAL_N_ELEMENTS(aImplReplacements_Slovenian) },
-{ "es", aImplReplacements_Spanish, 
SAL_N_ELEMENTS(aImplReplacements_Spanish) },
-{ "et", aImplReplacements_Estonian, 
SAL_N_ELEMENTS(aImplReplacements_Estonian) },
-{ "fr", aImplReplacements_French, 
SAL_N_ELEMENTS(aImplReplacements_French) },
-{ "hu", aImplReplacements_Hungarian, 
SAL_N_ELEMENTS(aImplReplacements_Hungarian) },
-{ "it", aImplReplacements_Italian, 
SAL_N_ELEMENTS(aImplReplacements_Italian) },
-{ "lt", aImplReplacements_Lithuanian, 
SAL_N_ELEMENTS(aImplReplacements_Lithuanian) },
-{ "nl", aImplReplacements_Dutch, 
SAL_N_ELEMENTS(aImplReplacements_Dutch) },
-{ "no", aImplReplacements_Norwegian, 
SAL_N_ELEMENTS(aImplReplacements_Norwegian) },
-{ "pt", aImplReplacements_Portuguese, 
SAL_N_ELEMENTS(aImplReplacements_Portuguese) },
-{ "ru", aImplReplacements_Russian, 
SAL_N_ELEMENTS(aImplReplacements_Russian) },
-{ "sv", aImplReplacements_Swedish, 
SAL_N_ELEMENTS(aImplReplacements_Swedish) },
-{ "tr", aImplReplacements_Turkish, 
SAL_N_ELEMENTS(aImplReplacements_Turkish) },
+{ "ca", aImplReplacements_Catalan, 
std::size(aImplReplacements_Catalan) },
+{ "de", aImplReplacements_German, std::size(aImplReplacements_German) 
},
+{ "sl", aImplReplacements_Slovenian, 
std::size(aImplReplacements_Slovenian) },
+{ "es", aImplReplacements_Spanish, 
std::size(aImplReplacements_Spanish) },
+{ "et", aImplReplacements_Estonian, 
std::size(aImplReplacements_Estonian) },
+{ "fr", aImplReplacements_French, std::size(aImplReplacements_French) 
},
+{ "hu", aImplReplacements_Hungarian, 
std::size(aImplReplacements_Hungarian) },
+{ "it", aImplReplacements_Italian, 
std::size(aImplReplacements_Italian) },
+{ "lt", aImplReplacements_Lithuanian, 
std::size(aImplReplacements_Lithuanian) },
+{ "nl", aImplReplacements_Dutch, std::size(aImplReplacements_Dutch) },
+{ "no", aImplReplacements_Norwegian, 
std::size(aImplReplacements_Norwegian) },
+{ "pt", aImplReplacements_Portuguese, 
std::size(aImplReplacements_Portuguese) },
+{ "ru", aImplReplacements_Russian, 
std::size(aImplReplacements_Russian) },
+{ "sv", aImplReplacements_Swedish, 
std::size(aImplReplacements_Swedish) },
+{ "tr", aImplReplacements_Turkish, 
std::size(aImplReplacements_Turkish) },
 };
 
 // translate keycodes, used within the displayed menu shortcuts
diff --git a/vcl/win/window/keynames.cxx b/vcl/win/window/keynames.cxx
index 8f0996445cb6..e30f7284caa4 100644
--- a/vcl/win/window/keynames.cxx
+++ b/vcl/win/window/keynames.cxx
@@ -192,13 +192,13 @@ namespace vcl_sal {
 
 const struct KeyboardReplacements aKeyboards[] =
 {
-{ "ast",aImplReplacements_Asturian, 
SAL_N_ELEMENTS(aImplReplacements_Asturian) },
-{ "ca", aImplReplacements_Catalan, 
SAL_N_ELEMENTS(aImplReplacements_Catalan) },
-{ "et", aImplReplacements_Estonian, 
SAL_N_ELEMENTS(aImplReplacements_Estonian) },
-{ "hu", aImplReplacements_Hungarian, 
SAL_N_ELEMENTS(aImplReplacements_Hungarian) },
-{ "lt", aImplReplaceme

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

2023-06-13 Thread Dr. David Alan Gilbert (via logerrit)
 sw/source/ui/frmdlg/frmpage.cxx   |   84 +++---
 sw/source/uibase/fldui/fldmgr.cxx |   78 +--
 2 files changed, 81 insertions(+), 81 deletions(-)

New commits:
commit 9bc3c4fa8d380bd7ae5689692cc80f815bed4707
Author: Dr. David Alan Gilbert 
AuthorDate: Thu Jun 8 21:43:15 2023 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jun 13 16:22:00 2023 +0200

tdf#147021: sw/source use std::size() instead of SAL_N_ELEMENTS

Three big chunks of repeated use of SAL_N_ELEMENTS.

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

diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index dc4e98da5b84..19bed7ba0476 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -407,46 +407,46 @@ static size_t lcl_GetFrameMapCount( const FrameMap* pMap)
 if ( pMap )
 {
 if( pMap == aVParaHtmlMap)
-return SAL_N_ELEMENTS(aVParaHtmlMap);
+return std::size(aVParaHtmlMap);
 if( pMap == aVAsCharHtmlMap)
-return SAL_N_ELEMENTS(aVAsCharHtmlMap);
+return std::size(aVAsCharHtmlMap);
 if( pMap == aHParaHtmlMap)
-return SAL_N_ELEMENTS(aHParaHtmlMap);
+return std::size(aHParaHtmlMap);
 if( pMap == aHParaHtmlAbsMap)
-return SAL_N_ELEMENTS(aHParaHtmlAbsMap);
+return std::size(aHParaHtmlAbsMap);
 if ( pMap == aVPageMap )
-return SAL_N_ELEMENTS(aVPageMap);
+return std::size(aVPageMap);
 if ( pMap == aVPageHtmlMap )
-return SAL_N_ELEMENTS(aVPageHtmlMap);
+return std::size(aVPageHtmlMap);
 if ( pMap == aVAsCharMap )
-return SAL_N_ELEMENTS(aVAsCharMap);
+return std::size(aVAsCharMap);
 if ( pMap == aVParaMap )
-return SAL_N_ELEMENTS(aVParaMap);
+return std::size(aVParaMap);
 if ( pMap == aHParaMap )
-return SAL_N_ELEMENTS(aHParaMap);
+return std::size(aHParaMap);
 if ( pMap == aHFrameMap )
-return SAL_N_ELEMENTS(aHFrameMap);
+return std::size(aHFrameMap);
 if ( pMap == aVFrameMap )
-return SAL_N_ELEMENTS(aVFrameMap);
+return std::size(aVFrameMap);
 if ( pMap == aHCharMap )
-return SAL_N_ELEMENTS(aHCharMap);
+return std::size(aHCharMap);
 if ( pMap == aHCharHtmlMap )
-return SAL_N_ELEMENTS(aHCharHtmlMap);
+return std::size(aHCharHtmlMap);
 if ( pMap == aHCharHtmlAbsMap )
-return SAL_N_ELEMENTS(aHCharHtmlAbsMap);
+return std::size(aHCharHtmlAbsMap);
 if ( pMap == aVCharMap )
-return SAL_N_ELEMENTS(aVCharMap);
+return std::size(aVCharMap);
 if ( pMap == aVCharHtmlMap )
-return SAL_N_ELEMENTS(aVCharHtmlMap);
+return std::size(aVCharHtmlMap);
 if ( pMap == aVCharHtmlAbsMap )
-return SAL_N_ELEMENTS(aVCharHtmlAbsMap);
+return std::size(aVCharHtmlAbsMap);
 if ( pMap == aHPageHtmlMap )
-return SAL_N_ELEMENTS(aHPageHtmlMap);
+return std::size(aHPageHtmlMap);
 if ( pMap == aHFlyHtmlMap )
-return SAL_N_ELEMENTS(aHFlyHtmlMap);
+return std::size(aHFlyHtmlMap);
 if ( pMap == aVFlyHtmlMap )
-return SAL_N_ELEMENTS(aVFlyHtmlMap);
-return SAL_N_ELEMENTS(aHPageMap);
+return std::size(aVFlyHtmlMap);
+return std::size(aHPageMap);
 }
 return 0;
 }
@@ -742,27 +742,27 @@ namespace
 void SwFramePage::setOptimalFrameWidth()
 {
 static FrameMaps const aMaps[] = {
-{ aHPageMap, SAL_N_ELEMENTS(aHPageMap) },
-{ aHPageHtmlMap, SAL_N_ELEMENTS(aHPageHtmlMap) },
-{ aVPageMap, SAL_N_ELEMENTS(aVPageMap) },
-{ aVPageHtmlMap, SAL_N_ELEMENTS(aVPageHtmlMap) },
-{ aHFrameMap, SAL_N_ELEMENTS(aHFrameMap) },
-{ aHFlyHtmlMap, SAL_N_ELEMENTS(aHFlyHtmlMap) },
-{ aVFrameMap, SAL_N_ELEMENTS(aVFrameMap) },
-{ aVFlyHtmlMap, SAL_N_ELEMENTS(aVFlyHtmlMap) },
-{ aHParaMap, SAL_N_ELEMENTS(aHParaMap) },
-{ aHParaHtmlMap, SAL_N_ELEMENTS(aHParaHtmlMap) },
-{ aHParaHtmlAbsMap, SAL_N_ELEMENTS(aHParaHtmlAbsMap) },
-{ aVParaMap, SAL_N_ELEMENTS(aVParaMap) },
-{ aVParaHtmlMap, SAL_N_ELEMENTS(aVParaHtmlMap) },
-{ aHCharMap, SAL_N_ELEMENTS(aHCharMap) },
-{ aHCharHtmlMap, SAL_N_ELEMENTS(aHCharHtmlMap) },
-{ aHCharHtmlAbsMap, SAL_N_ELEMENTS(aHCharHtmlAbsMap) },
-{ aVCharMap, SAL_N_ELEMENTS(aVCharMap) },
-{ aVCharHtmlMap, SAL_N_ELEMENTS(aVCharHtmlMap) },
-{ aVCharHtmlAbsMap, SAL_N_ELEMENTS(aVCharHtmlAbsMap) },
-{ aVAsCharMap

[Libreoffice-commits] core.git: filter/qa sal/qa sc/qa svl/qa sw/qa xmloff/qa

2023-06-02 Thread Dr. David Alan Gilbert (via logerrit)
 filter/qa/cppunit/priority-test.cxx   |   13 +--
 sal/qa/rtl/strings/test_oustring_convert.cxx  |4 
 sal/qa/rtl/strings/test_oustring_endswith.cxx |   19 +---
 sal/qa/rtl/textenc/rtl_textcvt.cxx|   71 +
 sal/qa/rtl/uri/rtl_testuri.cxx|   34 +++-
 sc/qa/unit/subsequent_export_test.cxx |   22 ++---
 svl/qa/unit/svl.cxx   |   24 ++---
 svl/qa/unit/test_URIHelper.cxx|  105 +++---
 sw/qa/core/macros-test.cxx|6 -
 sw/qa/extras/odfexport/odfexport2.cxx |4 
 xmloff/qa/unit/uxmloff.cxx|   13 +--
 11 files changed, 146 insertions(+), 169 deletions(-)

New commits:
commit 7bec1689fcbe9102aa220739b6113118d9a8dd1f
Author: Dr. David Alan Gilbert 
AuthorDate: Wed May 31 01:58:18 2023 +0100
Commit: Mike Kaganski 
CommitDate: Fri Jun 2 16:58:57 2023 +0200

tdf#145538,tdf#147021: qa: range based loops

A bunch of range based loop changes in various qa
sections that also take out about 1% of SAL_N_ELEMENTS

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

diff --git a/filter/qa/cppunit/priority-test.cxx 
b/filter/qa/cppunit/priority-test.cxx
index 18e63c3188ee..7b37ce07e6ee 100644
--- a/filter/qa/cppunit/priority-test.cxx
+++ b/filter/qa/cppunit/priority-test.cxx
@@ -50,20 +50,17 @@ void PriorityFilterTest::testPriority()
 // TODO: expand this to check more of these priorities
 };
 
-for (size_t i = 0; i < SAL_N_ELEMENTS(aToCheck); i++)
+for (auto const[pURL, pFormat] : aToCheck)
 {
-OUString aURL = OUString::createFromAscii(aToCheck[i].pURL);
+OUString aURL = OUString::createFromAscii(pURL);
 try
 {
 OUString aTypeName = xDetection->queryTypeByURL(aURL);
 
-OUString aFormatCorrect = 
OUString::createFromAscii(aToCheck[i].pFormat);
+OUString aFormatCorrect = OUString::createFromAscii(pFormat);
 OUString aMsg = "Mis-matching formats "
-"'" +
-aTypeName +
-"' should be '" +
-aFormatCorrect +
-"'";
+"'" +
+aTypeName + "' should be '" + aFormatCorrect + "'";
 CPPUNIT_ASSERT_EQUAL_MESSAGE(OUStringToOString(aMsg,
   
RTL_TEXTENCODING_UTF8).getStr(),
aFormatCorrect, aTypeName);
diff --git a/sal/qa/rtl/strings/test_oustring_convert.cxx 
b/sal/qa/rtl/strings/test_oustring_convert.cxx
index da930a03f244..e74276a11b0f 100644
--- a/sal/qa/rtl/strings/test_oustring_convert.cxx
+++ b/sal/qa/rtl/strings/test_oustring_convert.cxx
@@ -170,8 +170,8 @@ void test::oustring::Convert::convertToString()
   OUSTRING_TO_OSTRING_CVTFLAGS,
   "A?B",
   "A?B" } };
-for (size_t i = 0; i < SAL_N_ELEMENTS(aTests); ++i)
-testConvertToString(aTests[i]);
+for (auto const& aTest : aTests)
+testConvertToString(aTest);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/qa/rtl/strings/test_oustring_endswith.cxx 
b/sal/qa/rtl/strings/test_oustring_endswith.cxx
index bf01577e28be..9ec08fa55045 100644
--- a/sal/qa/rtl/strings/test_oustring_endswith.cxx
+++ b/sal/qa/rtl/strings/test_oustring_endswith.cxx
@@ -93,20 +93,17 @@ void test::oustring::EndsWith::endsWith()
   RTL_CONSTASCII_STRINGPARAM("b\0c"), true },
 { RTL_CONSTASCII_STRINGPARAM("a\0b\0c"),
   RTL_CONSTASCII_STRINGPARAM("b"), false } };
-for (size_t i = 0; i < SAL_N_ELEMENTS(data); ++i) {
+for (auto const[pStr1, nStr1Len, pStr2, nStr2Len, bEndsWith] : data)
+{
 OStringBuffer msg;
-appendString(msg, OString(data[i].str1, data[i].str1Len));
+appendString(msg, OString(pStr1, nStr1Len));
 msg.append(".endsWithIgnoreAsciiCaseAsciiL(");
-appendString(msg, OString(data[i].str2, data[i].str2Len));
+appendString(msg, OString(pStr2, nStr2Len));
 msg.append(") == ");
-msg.append(data[i].endsWith);
-CPPUNIT_ASSERT_EQUAL_MESSAGE(
-msg.getStr(),
-data[i].endsWith,
-OUString(
-data[i].str1, data[i].str1Len,
-RTL_TEXTENCODING_ASCII_US).endsWithIgnoreAsciiCaseAsciiL(
-data[i].str2, data[i].str2Len));
+msg.append(bEndsWith);
+CPPUNIT_ASSERT_EQUAL_MESSAGE(msg.getStr(), bEndsWith,
+ OUString(pStr1, nStr1Len, 
RTL_TEXTENCODING_ASCII_US)
+ 

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

2023-05-30 Thread Dr. David Alan Gilbert (via logerrit)
 sc/source/core/data/conditio.cxx |2 ++
 sw/source/core/unocore/unofield.cxx  |6 +++---
 sw/source/ui/dbui/mmaddressblockpage.cxx |8 
 sw/source/ui/fldui/flddinf.cxx   |4 ++--
 sw/source/ui/fldui/fldref.cxx|6 +++---
 sw/source/ui/misc/outline.cxx|4 ++--
 sw/source/uibase/dbui/mmconfigitem.cxx   |4 ++--
 sw/source/uibase/sidebar/PageFormatPanel.cxx |   12 ++--
 sw/source/uibase/utlui/initui.cxx|4 ++--
 sw/source/uibase/utlui/unotools.cxx  |   17 -
 10 files changed, 30 insertions(+), 37 deletions(-)

New commits:
commit 4998370216bbea3bcaff7fac2d62cbb4ac978c5d
Author: Dr. David Alan Gilbert 
AuthorDate: Thu May 25 02:44:21 2023 +0100
Commit: Mike Kaganski 
CommitDate: Tue May 30 15:37:47 2023 +0200

tdf#145538,tdf#147021: sw/source: range based loops

A bunch of range based loop changes in sw/source

that also take out SAL_N_ELEMENTS usages

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

diff --git a/sw/source/core/unocore/unofield.cxx 
b/sw/source/core/unocore/unofield.cxx
index 36a4f5b27bc6..78b43b3158bd 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -183,9 +183,9 @@ const ServiceIdResId aServiceToRes[] =
 
 static SwFieldIds lcl_ServiceIdToResId(SwServiceType nServiceId)
 {
-for (size_t i=0; i 0
 OSL_FAIL("service id not found");
 #endif
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx 
b/sw/source/ui/dbui/mmaddressblockpage.cxx
index ad4a7bfc4b83..48d4e3dce117 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -494,10 +494,10 @@ 
SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog(
 m_xAddressElementsLB->append(OUString::number(USER_DATA_SALUTATION), 
SwResId(ST_SALUTATION));
 m_xAddressElementsLB->append(OUString::number(USER_DATA_PUNCTUATION), 
SwResId(ST_PUNCTUATION));
 m_xAddressElementsLB->append(OUString::number(USER_DATA_TEXT), 
SwResId(ST_TEXT));
-for (size_t i = 0; i < SAL_N_ELEMENTS(RA_SALUTATION); ++i)
-m_aSalutations.push_back(SwResId(RA_SALUTATION[i]));
-for (size_t i = 0; i < SAL_N_ELEMENTS(RA_PUNCTUATION); ++i)
-m_aPunctuations.push_back(SwResId(RA_PUNCTUATION[i]));
+for (auto const& aID : RA_SALUTATION)
+m_aSalutations.push_back(SwResId(aID));
+for (auto const& aID : RA_PUNCTUATION)
+m_aPunctuations.push_back(SwResId(aID));
 m_xDragED->SetText("");
 m_xDialog->set_title(SwResId(eType == GREETING_MALE ? ST_TITLE_MALE : 
ST_TITLE_FEMALE));
 m_xAddressElementsFT->set_label(SwResId(ST_SALUTATIONELEMENTS));
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 3fa401211b1f..7cb69c1d0e49 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -46,8 +46,8 @@ using namespace com::sun::star;
 
 void FillFieldSelect(weld::TreeView& rListBox)
 {
-for (size_t i = 0; i < SAL_N_ELEMENTS(FLD_SELECT); ++i)
-rListBox.append_text(SwResId(FLD_SELECT[i]));
+for (auto const& aID : FLD_SELECT)
+rListBox.append_text(SwResId(aID));
 }
 
 SwFieldDokInfPage::SwFieldDokInfPage(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet *const pCoreSet)
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index bd6fef539478..54f9c9fc98dc 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -70,10 +70,10 @@ SwFieldRefPage::SwFieldRefPage(weld::Container* pPage, 
weld::DialogController* p
 {
 m_xSelectionLB->make_sorted();
 // #i83479#
-for (size_t i = 0; i < SAL_N_ELEMENTS(FLD_REF_PAGE_TYPES); ++i)
+for (auto const& aID : FLD_REF_PAGE_TYPES)
 {
-m_xTypeLB->append_text(SwResId(FLD_REF_PAGE_TYPES[i]));
-m_xFormatLB->append_text(SwResId(FLD_REF_PAGE_TYPES[i]));
+m_xTypeLB->append_text(SwResId(aID));
+m_xFormatLB->append_text(SwResId(aID));
 }
 
 m_sBookmarkText = m_xTypeLB->get_text(0);
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 429cfb71915c..6500bfdd6eca 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -118,8 +118,8 @@ SwNumNamesDlg::SwNumNamesDlg(weld::Window *pParent)
 , m_xFormBox(m_xBuilder->weld_tree_view("form"))
 , m_xOKBtn(m_xBuilder->weld_button("ok"))
 {
-for (size_t i = 0; i < SAL_N_ELEMENTS(OUTLINE_STYLE); ++i)
-m_xFormBox->append_text(SwResId(OUTLINE_STYLE[i]));
+for (auto const& aID : OUTLINE_ST

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

2023-05-29 Thread Dr. David Alan Gilbert (via logerrit)
 vcl/qa/cppunit/timer.cxx |   13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

New commits:
commit b20eb3367436de4fb189dc82d14412539c02d30c
Author: Dr. David Alan Gilbert 
AuthorDate: Thu May 25 01:31:11 2023 +0100
Commit: Noel Grandin 
CommitDate: Mon May 29 14:48:37 2023 +0200

cppunit/timer: Use a range based loop and cleanup

Use a range based loop in testDurations re

tdf#145538

which also nails a SAL_N_ELEMENTS
tdf#147021

and takes out a sal_uLong
tdf#114441

while here, clean out the rest of the sal_uLong's in that file
to be sal_uInt64 to match timer.hxx which was changed by 9c7016b5b5
way back in 2015.

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

diff --git a/vcl/qa/cppunit/timer.cxx b/vcl/qa/cppunit/timer.cxx
index 15493b953639..467d7b1a776d 100644
--- a/vcl/qa/cppunit/timer.cxx
+++ b/vcl/qa/cppunit/timer.cxx
@@ -160,7 +160,7 @@ class TimerBool : public Timer
 {
 bool 
 public:
-TimerBool( sal_uLong nMS, bool  ) :
+TimerBool( sal_uInt64 nMS, bool  ) :
 Timer( "TimerBool" ), mrBool( rBool )
 {
 SetTimeout( nMS );
@@ -178,11 +178,10 @@ public:
 
 void TimerTest::testDurations()
 {
-static const sal_uLong aDurations[] = { 0, 1, 500, 1000 };
-for (size_t i = 0; i < SAL_N_ELEMENTS( aDurations ); i++)
+for (auto const nDuration : { 0, 1, 500, 1000 })
 {
 bool bDone = false;
-TimerBool aTimer( aDurations[i], bDone );
+TimerBool aTimer( nDuration, bDone );
 // coverity[loop_top] - Application::Yield allows the timer to fire 
and toggle bDone
 while( !bDone )
 {
@@ -199,7 +198,7 @@ class AutoTimerCount : public AutoTimer
 const sal_Int32 mnMaxCount;
 
 public:
-AutoTimerCount( sal_uLong nMS, sal_Int32 ,
+AutoTimerCount( sal_uInt64 nMS, sal_Int32 ,
 const sal_Int32 nMaxCount = -1 )
 : AutoTimer( "AutoTimerCount" )
 , mrCount( rCount )
@@ -340,7 +339,7 @@ namespace {
 class YieldTimer : public Timer
 {
 public:
-explicit YieldTimer( sal_uLong nMS ) : Timer( "YieldTimer" )
+explicit YieldTimer( sal_uInt64 nMS ) : Timer( "YieldTimer" )
 {
 SetTimeout( nMS );
 Start();
@@ -370,7 +369,7 @@ class SlowCallbackTimer : public Timer
 {
 bool 
 public:
-SlowCallbackTimer( sal_uLong nMS, bool  ) :
+SlowCallbackTimer( sal_uInt64 nMS, bool  ) :
 Timer( "SlowCallbackTimer" ), mbSlow( bBeenSlow )
 {
 SetTimeout( nMS );


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

2023-05-29 Thread Dr. David Alan Gilbert (via logerrit)
 sc/source/core/data/documen3.cxx |   12 
 svx/source/dialog/langbox.cxx|4 ++--
 2 files changed, 6 insertions(+), 10 deletions(-)

New commits:
commit da398ad3bb511e33451f9d3bf24b0c5abd55ce25
Author: Dr. David Alan Gilbert 
AuthorDate: Wed May 24 13:57:16 2023 +0100
Commit: Noel Grandin 
CommitDate: Mon May 29 14:48:04 2023 +0200

replace find_if by any_of

A few cases where find_if is used just to test if there are any
matches; use any_of as per

tdf#153109

In document3 we can merge two identical loops.
In langbox we can optimise the arg capture (Arkadiy's suggestion)

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

diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 72839483dae6..b1cf5fe81b8c 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -87,10 +87,6 @@ void sortAndRemoveDuplicates(std::vector& 
rStrings, bool bCaseSe
 std::vector::iterator it =
 std::unique(rStrings.begin(), rStrings.end(), 
ScTypedStrData::EqualCaseSensitive());
 rStrings.erase(it, rStrings.end());
-if (std::find_if(rStrings.begin(), rStrings.end(),
-[](ScTypedStrData& rString) { return rString.IsHiddenByFilter(); 
}) != rStrings.end()) {
-std::stable_sort(rStrings.begin(), rStrings.end(), 
ScTypedStrData::LessHiddenRows());
-}
 }
 else
 {
@@ -98,10 +94,10 @@ void sortAndRemoveDuplicates(std::vector& 
rStrings, bool bCaseSe
 std::vector::iterator it =
 std::unique(rStrings.begin(), rStrings.end(), 
ScTypedStrData::EqualCaseInsensitive());
 rStrings.erase(it, rStrings.end());
-if (std::find_if(rStrings.begin(), rStrings.end(),
-[](ScTypedStrData& rString) { return rString.IsHiddenByFilter(); 
}) != rStrings.end()) {
-std::stable_sort(rStrings.begin(), rStrings.end(), 
ScTypedStrData::LessHiddenRows());
-}
+}
+if (std::any_of(rStrings.begin(), rStrings.end(),
+[](ScTypedStrData& rString) { return rString.IsHiddenByFilter(); })) {
+std::stable_sort(rStrings.begin(), rStrings.end(), 
ScTypedStrData::LessHiddenRows());
 }
 }
 
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 76d9b3de1fe5..b489ea58a546 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -183,8 +183,8 @@ void SvxLanguageBox::AddLanguages(const std::vector< 
LanguageType >& rLanguageTy
 weld::ComboBoxEntry aNewEntry(BuildEntry(nLang));
 if (aNewEntry.sString.isEmpty())
 continue;
-if (std::find_if(rEntries.begin(), rEntries.end(),
- [=](const weld::ComboBoxEntry& rEntry){ 
return rEntry.sId == aNewEntry.sId; }) != rEntries.end())
+if (std::any_of(rEntries.begin(), rEntries.end(),
+ [&](const weld::ComboBoxEntry& rEntry){ 
return rEntry.sId == aNewEntry.sId; }))
 continue;
 rEntries.push_back(aNewEntry);
 }


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

2023-05-26 Thread Dr. David Alan Gilbert (via logerrit)
 comphelper/source/misc/docpasswordhelper.cxx |5 ++---
 sc/source/ui/app/scmod.cxx   |4 ++--
 vcl/source/filter/graphicfilter.cxx  |2 +-
 3 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit b480552d9c4ac9be1f53edc6cac21bc45cfe29ca
Author: Dr. David Alan Gilbert 
AuthorDate: Wed May 24 13:47:22 2023 +0100
Commit: Noel Grandin 
CommitDate: Fri May 26 12:49:14 2023 +0200

replace find_if by none_of

A set of cases where find_if is used just to test if there are no
matches; use none_of  as per

tdf#153109

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

diff --git a/comphelper/source/misc/docpasswordhelper.cxx 
b/comphelper/source/misc/docpasswordhelper.cxx
index d26a30e0ff20..5489690fae6a 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -621,11 +621,10 @@ OUString DocPasswordHelper::GetOoxHashAsBase64(
 
 if (eResult == DocPasswordVerifierResult::OK && !aPassword.isEmpty())
 {
-if (std::find_if(std::cbegin(aEncData), std::cend(aEncData),
+if (std::none_of(std::cbegin(aEncData), std::cend(aEncData),
  [](const css::beans::NamedValue& val) {
  return val.Name == 
PACKAGE_ENCRYPTIONDATA_SHA256UTF8;
- })
-== std::cend(aEncData))
+ }))
 {
 // tdf#118639: We need ODF encryption data for autorecovery, where 
password
 // will already be unavailable, so generate and append it here
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 2f84555fd3ca..93b74d70e68e 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -2192,11 +2192,11 @@ void ScModule::RegisterRefController(sal_uInt16 
nSlotId, std::shared_ptr, 
weld::Window*>> & rlRefWindow = m_mapRefController[nSlotId];
 
-if (std::find_if(rlRefWindow.begin(), rlRefWindow.end(),
+if (std::none_of(rlRefWindow.begin(), rlRefWindow.end(),
  [rWnd](const 
std::pair, weld::Window*>& rCandidate)
  {
  return rCandidate.first.get() == rWnd.get();
- }) == rlRefWindow.end())
+ }))
 {
 rlRefWindow.emplace_back(rWnd, pWndAncestor);
 }
diff --git a/vcl/source/filter/graphicfilter.cxx 
b/vcl/source/filter/graphicfilter.cxx
index 441d32a28adf..bb478922b5a5 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -691,7 +691,7 @@ void 
GraphicFilter::MakeGraphicsAvailableThreaded(std::vector& graphic
 {
 // Graphic objects share internal ImpGraphic, do not process any 
of those twice.
 const auto predicate = [graphic](Graphic* item) { return 
item->ImplGetImpGraphic() == graphic->ImplGetImpGraphic(); };
-if( std::find_if(toLoad.begin(), toLoad.end(), predicate ) == 
toLoad.end())
+if( std::none_of(toLoad.begin(), toLoad.end(), predicate ))
 toLoad.push_back( graphic );
 }
 }


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

2023-05-24 Thread Dr. David Alan Gilbert (via logerrit)
 svx/source/svdraw/clonelist.cxx |   50 
 1 file changed, 15 insertions(+), 35 deletions(-)

New commits:
commit 69384d208a2c40c14de73d67d3620596678bf502
Author: Dr. David Alan Gilbert 
AuthorDate: Sun May 21 18:29:16 2023 +0100
Commit: Noel Grandin 
CommitDate: Wed May 24 08:13:16 2023 +0200

CloneList::CopyConnections: Replace duplicated code by loop

There's a chunk of code copied for the two ends of the connection;
replace it by a loop with the original code.

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

diff --git a/svx/source/svdraw/clonelist.cxx b/svx/source/svdraw/clonelist.cxx
index 1fe6bd99e478..ffb1ccc6766c 100644
--- a/svx/source/svdraw/clonelist.cxx
+++ b/svx/source/svdraw/clonelist.cxx
@@ -78,46 +78,26 @@ void CloneList::CopyConnections() const
 
 if(pOriginalEdge && pCloneEdge)
 {
-SdrObject* pOriginalNode1 = pOriginalEdge->GetConnectedNode(true);
-SdrObject* pOriginalNode2 = pOriginalEdge->GetConnectedNode(false);
-
-if(pOriginalNode1)
+for (bool bTail1 : { true, false })
 {
-std::vector::const_iterator it = 
std::find(maOriginalList.begin(),
- 
maOriginalList.end(),
- 
pOriginalNode1);
-
-sal_uInt32 nPos = it - maOriginalList.begin();
-
-if(it != maOriginalList.end())
+SdrObject* pOriginalNode = 
pOriginalEdge->GetConnectedNode(bTail1);
+if (pOriginalNode)
 {
-SdrObject *cObj = nullptr;
+std::vector::const_iterator it = 
std::find(maOriginalList.begin(),
+ 
maOriginalList.end(),
+ 
pOriginalNode);
 
-if (nPos < cloneCount)
-cObj = GetClone(nPos);
-
-if(pOriginalEdge->GetConnectedNode(true) != cObj)
-pCloneEdge->ConnectToNode(true, cObj);
-}
-}
-
-if(pOriginalNode2)
-{
-std::vector::const_iterator it = 
std::find(maOriginalList.begin(),
- 
maOriginalList.end(),
- 
pOriginalNode2);
-
-sal_uInt32 nPos = it - maOriginalList.begin();
-
-if(it != maOriginalList.end())
-{
-SdrObject *cObj = nullptr;
+if(it != maOriginalList.end())
+{
+sal_uInt32 nPos = it - maOriginalList.begin();
+SdrObject *cObj = nullptr;
 
-if (nPos < cloneCount)
-cObj = GetClone(nPos);
+if (nPos < cloneCount)
+cObj = GetClone(nPos);
 
-if(pOriginalEdge->GetConnectedNode(false) != cObj)
-pCloneEdge->ConnectToNode(false, cObj);
+if(pOriginalNode != cObj)
+pCloneEdge->ConnectToNode(bTail1, cObj);
+}
 }
 }
 }


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

2023-05-23 Thread Dr. David Alan Gilbert (via logerrit)
 svx/source/svdraw/svdpage.cxx |   58 ++
 1 file changed, 9 insertions(+), 49 deletions(-)

New commits:
commit 26b0870f4e16a8ce53129045d6feea4f8139487f
Author: Dr. David Alan Gilbert 
AuthorDate: Sun May 21 13:44:49 2023 +0100
Commit: Noel Grandin 
CommitDate: Tue May 23 15:05:05 2023 +0200

tdf#120283 CopyObjects: Use CloneList to wire up connectors

Remove the old connector wiring code and replace it by CloneList.
The copy/paste code uses CloneList to do this work, and CloneList
knows how to deal with groups; and not dealing with groups
is the cause of

tdf#120283

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

diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index b2a839a3c785..55d3e7f5aa6b 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -51,6 +51,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -131,6 +132,8 @@ SdrObject* SdrObjList::getSdrObjectFromSdrObjList() const
 
 void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
 {
+CloneList aCloneList;
+
 // clear SdrObjects with broadcasting
 ClearSdrObjList();
 
@@ -157,6 +160,7 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
 if(pDO)
 {
 NbcInsertObject(pDO.get(), SAL_MAX_SIZE);
+aCloneList.AddPair(pSO, pDO.get());
 }
 else
 {
@@ -164,53 +168,11 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
 }
 }
 
-// and now for the Connectors
-// The new objects would be shown in the rSrcList
-// and then the object connections are made.
-// Similar implementation are setup as the following:
-//void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
-//SdrModel* SdrExchangeView::CreateMarkedObjModel() const
-//BOOL SdrExchangeView::Paste(const SdrModel& rMod,...)
-//void SdrEditView::CopyMarked()
-if (nCloneErrCnt==0) {
-for (size_t no=0; no( pSrcOb 
);
-if (pSrcEdge!=nullptr) {
-SdrObject* pSrcNode1=pSrcEdge->GetConnectedNode(true);
-SdrObject* pSrcNode2=pSrcEdge->GetConnectedNode(false);
-if (pSrcNode1!=nullptr && 
pSrcNode1->getParentSdrObjListFromSdrObject()!=pSrcEdge->getParentSdrObjListFromSdrObject())
 pSrcNode1=nullptr; // can't do this
-if (pSrcNode2!=nullptr && 
pSrcNode2->getParentSdrObjListFromSdrObject()!=pSrcEdge->getParentSdrObjListFromSdrObject())
 pSrcNode2=nullptr; // across all lists (yet)
-if (pSrcNode1!=nullptr || pSrcNode2!=nullptr) {
-SdrObject* pEdgeObjTmp=GetObj(no);
-SdrEdgeObj* pDstEdge=dynamic_cast( 
pEdgeObjTmp );
-if (pDstEdge!=nullptr) {
-if (pSrcNode1!=nullptr) {
-sal_uInt32 nDstNode1=pSrcNode1->GetOrdNum();
-SdrObject* pDstNode1=GetObj(nDstNode1);
-if (pDstNode1!=nullptr) { // else we get an error!
-pDstEdge->ConnectToNode(true,pDstNode1);
-} else {
-OSL_FAIL("SdrObjList::operator=(): 
pDstNode1==NULL!");
-}
-}
-if (pSrcNode2!=nullptr) {
-sal_uInt32 nDstNode2=pSrcNode2->GetOrdNum();
-SdrObject* pDstNode2=GetObj(nDstNode2);
-if (pDstNode2!=nullptr) { // else the node was 
probably not selected
-pDstEdge->ConnectToNode(false,pDstNode2);
-} else {
-OSL_FAIL("SdrObjList::operator=(): 
pDstNode2==NULL!");
-}
-}
-} else {
-OSL_FAIL("SdrObjList::operator=(): pDstEdge==NULL!");
-}
-}
-}
-}
-} else {
+// Wires up the connections
+aCloneList.CopyConnections();
 #ifdef DBG_UTIL
+if (nCloneErrCnt != 0)
+{
 OStringBuffer aStr("SdrObjList::operator=(): Error when cloning ");
 
 if(nCloneErrCnt == 1)
@@ -223,11 +185,9 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList)
 + " drawing objects.");
 }
 
-aStr.append(" Not copying connectors.");
-
 OSL_FAIL(aStr.getStr());
-#endif
 }
+#endif
 }
 
 void SdrObjList::RecalcObjOrdNums()


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

2023-05-13 Thread Dr. David Alan Gilbert (via logerrit)
 sw/source/core/doc/doccomp.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit fb41d0d2969726a00bcb5ac381ca77f4cb7230bd
Author: Dr. David Alan Gilbert 
AuthorDate: Thu May 11 00:49:17 2023 +0100
Commit: Julien Nabet 
CommitDate: Sat May 13 08:42:53 2023 +0200

tdf#148251 doccomp: Use std::swap instead of using temporary values

Another swap case in LgstCommonSubseq::FindL

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

diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index 2941112bc5d8..32ec6bb85aaa 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -2475,9 +2475,7 @@ void LgstCommonSubseq::FindL( int *pL, int nStt1, int 
nEnd1,
 else
 currL[j] = std::max( currL[j - 1], prevL[j] );
 }
-int *tmp = currL;
-currL = prevL;
-prevL = tmp;
+std::swap( currL, prevL );
 }
 memcpy( pL, prevL, ( nLen2 + 1 ) * sizeof( *prevL ) );
 }


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

2023-05-12 Thread Dr. David Alan Gilbert (via logerrit)
 vcl/qt5/QtGraphics_GDI.cxx |   13 ++---
 1 file changed, 2 insertions(+), 11 deletions(-)

New commits:
commit 389b801cea9c9f3c311dcbe9d32df62a66e5ea4a
Author: Dr. David Alan Gilbert 
AuthorDate: Wed May 10 23:55:14 2023 +0100
Commit: Michael Weghorn 
CommitDate: Sat May 13 06:36:47 2023 +0200

tdf#148251 qt: Use std::swap instead of using temporary values

Another std::swap case in drawLine

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

diff --git a/vcl/qt5/QtGraphics_GDI.cxx b/vcl/qt5/QtGraphics_GDI.cxx
index 08116f85a529..28bab34a7cca 100644
--- a/vcl/qt5/QtGraphics_GDI.cxx
+++ b/vcl/qt5/QtGraphics_GDI.cxx
@@ -198,19 +198,10 @@ void QtGraphicsBackend::drawLine(tools::Long nX1, 
tools::Long nY1, tools::Long n
 QtPainter aPainter(*this);
 aPainter.drawLine(nX1, nY1, nX2, nY2);
 
-tools::Long tmp;
 if (nX1 > nX2)
-{
-tmp = nX1;
-nX1 = nX2;
-nX2 = tmp;
-}
+std::swap(nX1, nX2);
 if (nY1 > nY2)
-{
-tmp = nY1;
-nY1 = nY2;
-nY2 = tmp;
-}
+std::swap(nY1, nY2);
 aPainter.update(nX1, nY1, nX2 - nX1 + 1, nY2 - nY1 + 1);
 }
 


Re: ESC tendering policy changes ...

2023-04-21 Thread Dr. David Alan Gilbert
asily.
> 
> + and otherwise to completely ignore this step, or
> at least explain what extra purpose it tries to solve
> 
> + Obvious hostages to fortune:
> 
> "Only non-Conflicted Members can vote in the ESC."
> 
> + this needs to be profoundly (and redundantly)
>   specialized - in the text - to avoid its mis-use,
>   and mis-quoting outside the context of this policy.
> 
> + please add many more un-necessary words - Carlo
> has made a nice neat text, but the messy political
> reality is of constant word twisting at TDF.
> 
> + the sign that we need a 'Note:' here to stop
>   people panic-ing - is a good one that this
>   will cause problems and mis-understandings
>   in future.
> 
> + wherever there is a note - make the text
>   more verbose, and clearer as to scope at
>   the expense of redundancy.
> 
> + this will save much acrimony & discussion
>   in future - the definition of Conflicted here
> is excessively broad for no obvious reason, it
> should not be widely applied.
> 
> With those fixed, it looks fine - plenty of non-controversial & well
> drafted stuff in there. In fact - I'm rather pleased with the tone, approach
> and balance in general - it's refreshing.
> 
> Since the ESC has (as yet) not been poisoned, and still works by
> consensus - it seems good to build a social solution on top of that here
> that can work well to avoid the (AFAICS) totally theoretical problem of
> people advising the board to invest in one thing or another.
> 
> As I said in the call, there are ideas to have simpler ways to avoid all
> of this legalese: for example having the Trustees vote on things they
> particularly like / want - although - generally (having helped to run the
> ranking in the past) - it is like pulling teeth even getting enough
> individuals of the ESC to spend the hour(s) it takes to read all the
> proposals, give them a fair hearing and provide a sensible ranking for them.
> Possibly this could be a bonus for membership.
> 
> Then again the ESC has traditionally focused on on-sexy, technical debt
> type things that we can be sure no-one else will be able to do for fun /
> afford.
> 
> Regards,
> 
> Michael.
> 
> -- 
> michael.me...@collabora.com <><, GM Collabora Productivity
> Hangout: mejme...@gmail.com, Skype: mmeeks
> (M) +44 7795 666 147 - timezone usually UK / Europe
-- 
 -Open up your eyes, open up your mind, open up your code ---   
/ Dr. David Alan Gilbert|   Running GNU/Linux   | Happy  \ 
\dave @ treblig.org |   | In Hex /
 \ _|_ http://www.treblig.org   |___/


Re: Moving to LibreOffice 8?

2023-03-28 Thread Dr. David Alan Gilbert
* Italo Vignoli (it...@libreoffice.org) wrote:
> Moving to LibreOffice 8 (instead of 7.6) makes sense for marketing purposes,
> as media is looking at LibreOffice as the real innovator in the open source
> office suite market, and the feeling of journalists is that we are forever
> stuck at 7.x.
> 
> We all know that the next version will not include any significant
> innovation which can justify the change of version, apart from the new build
> system for Windows and the availability of LibreOffice for Arm processors on
> Windows (which has not been announced).

Some time ago, I suggested some cleanups (replacement of sal_Int* types
by their standardised versions).   Someone pointed out at the time it
wasn't possible because it would be an API break, but perhaps we could
do it on a major version bump.  This was when 7.x was young.

So, I'm saying if you are going to bump the major version, it would
benefit from some planning ahead rather than a last minute number change
so that any other incompatibilities people want to tidy up can be put
in.
(Irrespective of whether people like my particular change suggestion)

Dave

> Playing with the number 8, which can be rotated 90° to become the "infinite"
> symbol, we can frame the next version as LibreOffice for an infinite number
> of users, as we cover all hardware platforms and all operating systems for
> personal productivity.
> 
> This is my opinion. If the community wants to stick with 7.6, I won't
> insist. I have received enough insults both public and private for the
> marketing plan, and I am still receiving them from a few people, that I am
> not willing to enter into that process again (even if the decision on the
> "community" tag has not been mine, but it looks like people have a very
> short memory).
> 
> Looking forward to your thoughts.
> -- 
> Italo Vignoli - LibreOffice Marketing & PR
> mobile/signal +39.348.5653829 - email it...@libreoffice.org
> hangout/jabber italo.vign...@gmail.com
> GPG Key ID - 0xAAB8D5C0
> DB75 1534 3FD0 EA5F 56B5 FDA6 DE82 934C AAB8 D5C0
> 
-- 
 -Open up your eyes, open up your mind, open up your code ---   
/ Dr. David Alan Gilbert|   Running GNU/Linux   | Happy  \ 
\dave @ treblig.org |   | In Hex /
 \ _|_ http://www.treblig.org   |___/


Remove da...@gradwell.com

2023-03-16 Thread David Gradwell

Good morning,

Please can you remove da...@gradwell.com<mailto:da...@gradwell.com> from the 
Libre Office mailing lists.

Thank you.

David JL Gradwell, M.A. (Cantab), F.B.C.S.
Chartered Information Systems Practitioner

Managing Director
Gradwell Business Solutions Limited
16, Tekels Avenue, Camberley, Surrey, GU15 2LB
Tel: 01276-81-81-81
Mobile: 07920-143-639
Email: da...@gradwell.com<mailto:da...@gradwell.com>




Re: Won't save my spread sheets

2023-01-28 Thread Dr. David Alan Gilbert
* Yve Betar (yvecbe...@gmail.com) wrote:
> Help! I’ve been using libreoffice on my Mac laptop for a few years 
> successfully, then yesterday it started refusing to save my files. So I 
> downloaded an update. But it still won’t “save" or "save as".
> 
> I downloaded java. Still won’t save.
> 
> I’d like to keep using g it, but can’t if it won’t save.  Any suggestions?

When you say 'won't save' what happens if you try?

Dave

> Thanks! Yve
-- 
 -Open up your eyes, open up your mind, open up your code ---   
/ Dr. David Alan Gilbert|   Running GNU/Linux   | Happy  \ 
\dave @ treblig.org |   | In Hex /
 \ _|_ http://www.treblig.org   |___/


Re: Question re the uno-skeletonmaker'-t' CLI qualifier

2023-01-26 Thread David
On 25/1/23 20:05, Stephan Bergmann wrote:
> On 25/01/2023 05:14, David [minor edit] wrote:
>> However treating the '-t' option as a service rather than an interface, as 
>> follows, works.  An  directory tree is created in 
>> the directory where the skeletonmaker CLI command was run, and a very 
>> plausible skeleton CalcDL1.java file was created in  though I haven't 
>> been through it in detail.
>> Your comment "[...] So I would assume that -t must specify that interface 
>> type." is what I'd expect too.  That's reinforced by the HELP text which 
>> states:  "-t  specifies a UNOIDL type name, e.g. 
>> com.sun.star.text.XText (can be used more than once". Not much doubt 
>> there... 
> So the uno-skeletonmaker help and diagnostic output apparently uses, somewhat 
> consistently but maybe also somewhat confusingly, the term "type" to mean 
> both UNOIDL interfaces and UNOIDL services. 

That's the problem in a nutshell.

In common programming terminology, the word "type" refers to a single variable 
or symbol.  A strongly-typed language will flag a compilation error if 
incompatible types are used, for example 'i=x' where 'i' is declared to be an 
integer type and 'x' is declared floating-point.  Extending this concept of 
"type" to a complex structure like a UNOIDL interface, which may include many 
different atomic types, makes sense.  But I can't see how it can possibly refer 
to a "service".

An IDL interface and an IDL service are different things entirely, 
conventionally distinguished by prefixing 'X' to interface names.

And in the case of the uno-skeletonmaker 'calc-add-in command', specifying a 
service works but specifying an interface fails.  So I argue that the 
documentation and HELP text are plainly wrong and should be corrected.  After 
all, skeletonmaker is only at version 0.4!

Perhaps it would be worthwhile checking that this inconsistency doesn't hide 
some deeper problem.  It feels to me like the result of a misunderstanding or a 
sudden change of design which may have further ramifications.

D.


Re: Question re the uno-skeletonmaker'-t' CLI qualifier

2023-01-25 Thread David
I think we're getting somewhere...!

On 24/1/23 18:03, Stephan Bergmann wrote:
> I don't know much about skeletonmaker or Calc add-ins, but
> <https://wiki.documentfoundation.org/Documentation/DevGuide/Spreadsheet_Documents#Spreadsheet_Add-Ins>
>  
> <<https://wiki.documentfoundation.org/Documentation/DevGuide/Spreadsheet_Documents#Spreadsheet_Add-Ins>>
>  says "The functions that the add-in component exports to the spreadsheet 
> application have to be defined in a new interface." So I would assume that -t 
> must specify that interface type. And one or more -l will be needed to make 
> available that interface type and all the other UNOIDL entities recursively 
> referenced from it. So if you have your own type com.example.XMyAddIn in your 
> own local mytypes.rdb, you'd probably need something like
>> -t com.example.XMyAddIn -l "$OFFICE_HOME"/program/types.rdb -l 
>> "$OFFICE_HOME"/program/types/offapi.rdb -l mytypes.rdb 

Using the three '-l' options shown above and in the following test command with 
*no**'-t' option* results in a skeletonmaker error, presumably because '-t' and 
'-n' are mandatory in the 'calc-add-in' command (BUG: the '-t' is displayed in 
upper case, which can be misleading given case-sensitivity):

david@anon:~> "$OFFICE_HOME"/sdk/bin/uno-skeletonmaker calc-add-in --java5 -l 
"$OFFICE_PROGRAM_PATH"/types.rdb -l "$OFFICE_HOME"/program/types/offapi.rdb -l 
/home/david/<...path...>/XCalcDL1.rdb -n org.openoffice.adl.util.CalcDL1
        Error: no type is specified, use the -T option at least once

Changing the last '-l' to '-t' results in:
        ERROR: Unknown entity '/home/david/<...path...>/XCalcDL1.rdb'

However treating the '-t' option as a service rather than an interface, as 
follows, works.  An  directory tree is created in the 
directory where the skeletonmaker CLI command was run, and a very plausible 
skeleton CalcDL1.java file was created in  though I haven't been through 
it in detail.

david@anon:~> "$OFFICE_HOME"/sdk/bin/uno-skeletonmaker calc-add-in --java5 -l 
"$OFFICE_PROGRAM_PATH"/types.rdb -l "$OFFICE_HOME"/program/types/offapi.rdb -l 
/home/david/<...path...>/XCalcDL1.rdb -n org.openoffice.adl.util.CalcDL1 -t 
org.openoffice.adl.util.CalcDL1
david@anon:~>

*COMMENTS*

Your comment "[...] So I would assume that -t must specify that interface 
type." is what I'd expect too.  That's reinforced by the HELP text which 
states:  "-t  specifies a UNOIDL type name, e.g. com.sun.star.text.XText 
(can be used more than once".  Not much doubt there...

There's evidently a discrepancy between the LibreOffice Developer's Guide, the 
skeletonmaker HELP text, introductory comments in the skeletonmaker source 
code, all other API guides which repeat the HELP text, and what actually works.

Most of the initial command & option validation seems to be done by 
'skeletonmaker.cxx' which calls generatePackage() in 'javacompskeleton.cxx' to 
do the work.  But as I mentioned in an earlier email, I've come across a 
suggestion somewhere that '-t' defines a service, not an interface; maybe a 
change was made which hasn't been reflected in the Developer's Guide?

I don't have the time and expertise in C to untangle the source code and in any 
case the sources I've looked at are completely devoid of comments (without 
which ongoing maintenance is far more difficult and unreliable!) apart from the 
introduction to skeletonmaker.cxx.  Should I post another bug report in 
Bugzilla?  - the first was marked NOTABUG.

Thanks for your help, Stephan.

_David Lochrin

_

Re: Question re the uno-skeletonmaker'-t' CLI qualifier

2023-01-23 Thread David
Hello Stephan, Yes, this is a Linux system and I'm invoking uno-skeletonmaker 
thus:

david@anon:~> "$OFFICE_HOME"/sdk/bin/uno-skeletonmaker calc-add-in --java5 -l 
"$OFFICE_PROGRAM_PATH"/types.rdb -n org.openoffice.adl.util.CalcDL1 -t CalcDL1
ERROR: Unknown entity 'CalcDL1'
david@anon:~>

I'd already found the '-l' trap for the unwary the hard way (and it also occurs 
in 'javamaker')!  My problem now is that a value for '-t' is apparently 
mandatory for the 'calc-add-in' command but I don't understand what to put 
there.

The uno-skeletonmaker source code, its help text, and every other reference 
have identical wording:  "-t  specifies a UNOIDL type name, e.g. 
com.sun.star.text.XText (can be used more than once)”.

Since '-l' already points to types.rdb you'd think '-t' wouldn't be needed.  
The phrasing "-t CalcDL1" was just a guess as I'd read some source code which 
seemed to imply a service-name was required.
_
__Regards, David_


On 24/1/23 01:15, Stephan Bergmann wrote:
> On 23/01/2023 03:45, David wrote:
>> According to 
>> https://api.libreoffice.org/docs/tools.html#uno-skeletonmaker the 
>> argument ‘-t’  “specifies a UNOIDL type name, e.g. 
>> com.sun.star.text.XText (can be used more than once)”.  This wording is 
>> the same as both the uno-skeletonmaker command-line ‘help’ and the 
>> introductory comments in the source code for 'skeletonmaker.cxx'.
>>
>> However I don't understand which entity the UNOIDL type name is intended 
>> to qualify.  For example, is it the type of the skeleton code to be 
>> generated (presumably not, since that’s defined by the ‘calc-add-in’ 
>> command), the type of each value returned by the Java methods 
>> implemented in this addIn, or something else? Anything I've tried 
>> results in an "unknown entity" diagnostic.
> uno-skeletonmaker apparently needs to be explicitly told where to find 
> any referenced UNOIDL entities, via the -l option.  So adding something like
>> -l "$OFFICE_HOME"/program/types.rdb -l 
>> "$OFFICE_HOME"/program/types/offapi.rdb
> should work (in an SDK shell, on Linux at least).
>

Question re the uno-skeletonmaker'-t' CLI qualifier

2023-01-23 Thread David
Hello,

I've been referred to this mailing list for an answer to the following 
question, originally posted at 
https://ask.libreoffice.org/t/the-sdk-uno-skeletonmaker-t-argument/86641

According to https://api.libreoffice.org/docs/tools.html#uno-skeletonmaker the 
argument ‘-t’  “specifies a UNOIDL type name, e.g. com.sun.star.text.XText (can 
be used more than once)”.  This wording is the same as both the 
uno-skeletonmaker command-line ‘help’ and the introductory comments in the 
source code for 'skeletonmaker.cxx'.

However I don't understand which entity the UNOIDL type name is intended to 
qualify.  For example, is it the type of the skeleton code to be generated 
(presumably not, since that’s defined by the ‘calc-add-in’ command), the type 
of each value returned by the Java methods implemented in this addIn, or 
something else?  Anything I've tried results in an "unknown entity" diagnostic.

About seven years ago I wrote an addIn which works well, but it was developed 
by hand-coding everything from scratch and modifying the 'make' file given in 
the SDK examples.  My reference document was the "OpenOffice.org 3.1 
Developer's Guide" published by Sun Microsystems in 2009.  I'm now attempting 
to recompile this addIn using the LO SDK toolset before embarking on a new 
project.

I'd be grateful for any light which members of this list can shed.

Regards,
David Lochrin


Re: Crash test update

2022-11-27 Thread Dr. David Alan Gilbert
* crashtest (nore...@documentfoundation.org) wrote:
> Hi,
> 
> New crashtest update available at 
> <https://dev-builds.libreoffice.org/crashtest/9bef99518e910db078149bef08e300afc8b4aaf2/>.

Are there any docs on this script? It would be nice if 
this mail included a pointer to:
  a) The script
  b) The test documents (some are easier to find than others)
  c) Some pointers to how to debug, if those pointers exist.

I was looking through the backtraces/ dir and other than
looking through the backtrace for the name of the doc file
it's not obvious how to associate them.

Is this test run with --enable-debug builds? If so it would
be nice to capture diag from failed runs.

(Out of the 3 I've tried so far, only one fails for me locally,
the import from ooo 84576/laisvos_programos-vaiku_lavinimui.odt
dies from command line, gives a pretty error from the gui, and either
way gives 'MarkManager::makeMark(..) - refusing to create mark on non-textnode' 
)

Dave

> 38 files have crashed during import.
> 
> 16 files have crashed during export.
> 
> 0 files have differences compared to the baseline, which is core.git commit .
> (17764 files are excluded.)
> 
> - Your friendly crashtest bot





-- 
 -Open up your eyes, open up your mind, open up your code ---   
/ Dr. David Alan Gilbert|   Running GNU/Linux   | Happy  \ 
\dave @ treblig.org |   | In Hex /
 \ _|_ http://www.treblig.org   |___/


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4-3' - sal/osl

2022-11-16 Thread Dr. David Alan Gilbert (via logerrit)
 sal/osl/unx/tempfile.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit df994d621261141ae024ead711f2ee957347476b
Author: Dr. David Alan Gilbert 
AuthorDate: Sat Nov 5 18:44:05 2022 +
Commit: Christian Lohmaier 
CommitDate: Wed Nov 16 18:23:17 2022 +0100

TempFile: clear handle on close

If we close the file on error, then clear the handle we returned to
the caller so it doesn't try and close it again or do anything else
with it.

Change-Id: Idd054f92f4f3cbc3427896ec9795e588471292d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142344
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 0d9613b77fc653c6144b5e4f0136c0536300c0db)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142306
Reviewed-by: Michael Stahl 
(cherry picked from commit 84d292960bee73f24450857ff141953be2570094)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142434
Reviewed-by: Eike Rathke 
Reviewed-by: Xisco Fauli 
Tested-by: Christian Lohmaier 
Reviewed-by: Christian Lohmaier 

diff --git a/sal/osl/unx/tempfile.cxx b/sal/osl/unx/tempfile.cxx
index 29a4d453f80c..3a7138b5218d 100644
--- a/sal/osl/unx/tempfile.cxx
+++ b/sal/osl/unx/tempfile.cxx
@@ -330,7 +330,13 @@ oslFileError SAL_CALL osl_createTempFile(
 }
 
 if (temp_file_handle)
+{
 osl_closeFile(temp_file_handle);
+if (pHandle)
+{
+*pHandle = nullptr;
+}
+}
 
 rtl_uString_release(base_directory);
 


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

2022-11-16 Thread Dr. David Alan Gilbert (via logerrit)
 comphelper/source/misc/backupfilehelper.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 47f7a2bd06e8a1cbdc20196aeef54d74636c8b20
Author: Dr. David Alan Gilbert 
AuthorDate: Sat Nov 5 18:33:07 2022 +
Commit: Christian Lohmaier 
CommitDate: Wed Nov 16 18:14:45 2022 +0100

TempFile: Initialise handle

If the tempfile creation fails, the handle is left uninitialised
but we still try and close it, and we explode with various
pthread locking corruptions.

I think this could be the cause of a bunch of the:
https://crashreport.libreoffice.org/stats/signature/osl_closeFile

I can trigger it on Linux by setting TMPDIR to a bogus value,
but I don't think that's all the cases that we see in the crash reports.

Initialising it to null makes the close take a safe path.

Change-Id: If66c5629b6bce62e6c4b18a97ecb901abedd4ea3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142343
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit fa40ea19dbea5f0618d86da8626c35e734bb5220)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142305
Reviewed-by: Michael Stahl 
(cherry picked from commit f7adc60d6a17f43c14496560e9fbfcc638ff4c41)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142435
Reviewed-by: Eike Rathke 
Reviewed-by: Xisco Fauli 
Tested-by: Christian Lohmaier 
Reviewed-by: Christian Lohmaier 

diff --git a/comphelper/source/misc/backupfilehelper.cxx 
b/comphelper/source/misc/backupfilehelper.cxx
index d225b9f301d9..e9b173a47369 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -1244,7 +1244,7 @@ namespace
 {
 // need to create a new pack file, do this in a temp file to 
which data
 // will be copied from local file (so keep it here until this 
is done)
-oslFileHandle aHandle;
+oslFileHandle aHandle = nullptr;
 OUString aTempURL;
 
 // open target temp file - it exists until deleted


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

2022-11-08 Thread Dr. David Alan Gilbert (via logerrit)
 comphelper/source/misc/backupfilehelper.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f7adc60d6a17f43c14496560e9fbfcc638ff4c41
Author: Dr. David Alan Gilbert 
AuthorDate: Sat Nov 5 18:33:07 2022 +
Commit: Michael Stahl 
CommitDate: Tue Nov 8 11:00:14 2022 +0100

TempFile: Initialise handle

If the tempfile creation fails, the handle is left uninitialised
but we still try and close it, and we explode with various
pthread locking corruptions.

I think this could be the cause of a bunch of the:
https://crashreport.libreoffice.org/stats/signature/osl_closeFile

I can trigger it on Linux by setting TMPDIR to a bogus value,
but I don't think that's all the cases that we see in the crash reports.

Initialising it to null makes the close take a safe path.

Change-Id: If66c5629b6bce62e6c4b18a97ecb901abedd4ea3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142343
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit fa40ea19dbea5f0618d86da8626c35e734bb5220)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142305
Reviewed-by: Michael Stahl 

diff --git a/comphelper/source/misc/backupfilehelper.cxx 
b/comphelper/source/misc/backupfilehelper.cxx
index d225b9f301d9..e9b173a47369 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -1244,7 +1244,7 @@ namespace
 {
 // need to create a new pack file, do this in a temp file to 
which data
 // will be copied from local file (so keep it here until this 
is done)
-oslFileHandle aHandle;
+oslFileHandle aHandle = nullptr;
 OUString aTempURL;
 
 // open target temp file - it exists until deleted


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - sal/osl

2022-11-08 Thread Dr. David Alan Gilbert (via logerrit)
 sal/osl/unx/tempfile.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 84d292960bee73f24450857ff141953be2570094
Author: Dr. David Alan Gilbert 
AuthorDate: Sat Nov 5 18:44:05 2022 +
Commit: Michael Stahl 
CommitDate: Tue Nov 8 10:59:22 2022 +0100

TempFile: clear handle on close

If we close the file on error, then clear the handle we returned to
the caller so it doesn't try and close it again or do anything else
with it.

Change-Id: Idd054f92f4f3cbc3427896ec9795e588471292d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142344
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 0d9613b77fc653c6144b5e4f0136c0536300c0db)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142306
Reviewed-by: Michael Stahl 

diff --git a/sal/osl/unx/tempfile.cxx b/sal/osl/unx/tempfile.cxx
index 29a4d453f80c..3a7138b5218d 100644
--- a/sal/osl/unx/tempfile.cxx
+++ b/sal/osl/unx/tempfile.cxx
@@ -330,7 +330,13 @@ oslFileError SAL_CALL osl_createTempFile(
 }
 
 if (temp_file_handle)
+{
 osl_closeFile(temp_file_handle);
+if (pHandle)
+{
+*pHandle = nullptr;
+}
+}
 
 rtl_uString_release(base_directory);
 


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

2022-11-07 Thread Dr. David Alan Gilbert (via logerrit)
 sal/osl/unx/file.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 503195ad4df320da568fe089b4d0de2f761be660
Author: Dr. David Alan Gilbert 
AuthorDate: Sat Nov 5 18:50:15 2022 +
Commit: Noel Grandin 
CommitDate: Mon Nov 7 09:11:30 2022 +0100

file: Use calloc

Current code does, malloc->memset,  that's what calloc is for.

Change-Id: Ie3a4872249f78442b96f98c9dad9d7170afe784c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142345
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index ac93ffacd13f..a39365b9b115 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -202,9 +202,7 @@ FileHandle_Impl::FileHandle_Impl(int fd, enum Kind kind, 
OString path)
 if (pagesize != size_t(-1))
 {
 m_bufsiz = pagesize;
-m_buffer = static_cast(malloc(m_bufsiz));
-if (m_buffer)
-memset(m_buffer, 0, m_bufsiz);
+m_buffer = static_cast(calloc(1, m_bufsiz));
 }
 }
 }


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

2022-11-07 Thread Dr. David Alan Gilbert (via logerrit)
 sal/osl/unx/tempfile.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 0d9613b77fc653c6144b5e4f0136c0536300c0db
Author: Dr. David Alan Gilbert 
AuthorDate: Sat Nov 5 18:44:05 2022 +
Commit: Noel Grandin 
CommitDate: Mon Nov 7 09:11:04 2022 +0100

TempFile: clear handle on close

If we close the file on error, then clear the handle we returned to
the caller so it doesn't try and close it again or do anything else
with it.

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

diff --git a/sal/osl/unx/tempfile.cxx b/sal/osl/unx/tempfile.cxx
index 29a4d453f80c..3a7138b5218d 100644
--- a/sal/osl/unx/tempfile.cxx
+++ b/sal/osl/unx/tempfile.cxx
@@ -330,7 +330,13 @@ oslFileError SAL_CALL osl_createTempFile(
 }
 
 if (temp_file_handle)
+{
 osl_closeFile(temp_file_handle);
+if (pHandle)
+{
+*pHandle = nullptr;
+}
+}
 
 rtl_uString_release(base_directory);
 


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

2022-11-07 Thread Dr. David Alan Gilbert (via logerrit)
 comphelper/source/misc/backupfilehelper.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fa40ea19dbea5f0618d86da8626c35e734bb5220
Author: Dr. David Alan Gilbert 
AuthorDate: Sat Nov 5 18:33:07 2022 +
Commit: Noel Grandin 
CommitDate: Mon Nov 7 09:09:14 2022 +0100

TempFile: Initialise handle

If the tempfile creation fails, the handle is left uninitialised
but we still try and close it, and we explode with various
pthread locking corruptions.

I think this could be the cause of a bunch of the:
https://crashreport.libreoffice.org/stats/signature/osl_closeFile

I can trigger it on Linux by setting TMPDIR to a bogus value,
but I don't think that's all the cases that we see in the crash reports.

Initialising it to null makes the close take a safe path.

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

diff --git a/comphelper/source/misc/backupfilehelper.cxx 
b/comphelper/source/misc/backupfilehelper.cxx
index d225b9f301d9..e9b173a47369 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -1244,7 +1244,7 @@ namespace
 {
 // need to create a new pack file, do this in a temp file to 
which data
 // will be copied from local file (so keep it here until this 
is done)
-oslFileHandle aHandle;
+oslFileHandle aHandle = nullptr;
 OUString aTempURL;
 
 // open target temp file - it exists until deleted


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

2022-03-10 Thread Dr. David Alan Gilbert (via logerrit)
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |6 ++
 vcl/source/gdi/pdfwriter_impl.cxx  |   16 ++--
 2 files changed, 16 insertions(+), 6 deletions(-)

New commits:
commit da7b06425155938fb0d02c6c178d63fd95ad0cd4
Author: Dr. David Alan Gilbert 
AuthorDate: Sat Nov 13 01:33:06 2021 +
Commit: Xisco Fauli 
CommitDate: Thu Mar 10 10:26:23 2022 +0100

tdf#143216: pdfwriter: Don't treat semi-valid URIs as local paths

Currently the PDF writer treats URIs that are rejected by INetURIObject,
as local files, and prepends a path to them.  For URIs that are valid
according to the basic URI syntax, but unhandled by INetURIObject
(such as http://user:password@domain) this produces a confusing result
with a ./uri in the PDF.

Avoid the prefixing where the URI follows the basic URI syntax, even
if INetURIObject didn't like it.

Change-Id: I87c599885a40fd7101c678ae79f83f594d0f23ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125202
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131259

diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index b6e251509d06..8934e11c0e9f 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -2962,6 +2962,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testURIs)
 "file://localfile.odt/",
 true,
 },
+{
+// tdf 143216
+"http://username:passw...@example.com;,
+"http://username:passw...@example.com;,
+true,
+},
 {
 "git://git.example.org/project/example",
 "git://git.example.org/project/example",
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index b5e94882a0fb..141c4f823fc1 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -47,6 +47,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -3280,6 +3281,7 @@ we check in the following sequence:
 boolbTargetHasPDFExtension = false;
 INetProtocol eTargetProtocol = aTargetURL.GetProtocol();
 boolbIsUNCPath = false;
+boolbUnparsedURI = false;
 
 // check if the protocol is a known one, or if there is no 
protocol at all (on target only)
 // if there is no protocol, make the target relative to the 
current document directory
@@ -3292,14 +3294,14 @@ we check in the following sequence:
 }
 else
 {
-INetURLObject aNewBase( aDocumentURL );//duplicate 
document URL
-aNewBase.removeSegment(); //remove last segment from it, 
obtaining the base URL of the
-  //target document
-aNewBase.insertName( url );
-aTargetURL = aNewBase;//reassign the new target URL
+INetURLObject 
aNewURL(rtl::Uri::convertRelToAbs(m_aContext.BaseURL, url));
+aTargetURL = aNewURL; //reassign the new target URL
+
 //recompute the target protocol, with the new URL
 //normal URL processing resumes
 eTargetProtocol = aTargetURL.GetProtocol();
+
+bUnparsedURI = eTargetProtocol == INetProtocol::NotValid;
 }
 }
 
@@ -3415,7 +3417,9 @@ we check in the following sequence:
 //substitute the fragment
 aTargetURL.SetMark( 
OStringToOUString(aLineLoc.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US) );
 }
-OUString aURL = aTargetURL.GetMainURL( bFileSpec ? 
INetURLObject::DecodeMechanism::WithCharset : 
INetURLObject::DecodeMechanism::NONE );
+OUString aURL = bUnparsedURI ? url :
+   aTargetURL.GetMainURL( 
bFileSpec ? INetURLObject::DecodeMechanism::WithCharset :
+   
   INetURLObject::DecodeMechanism::NONE );
 appendLiteralStringEncrypt(bSetRelative ? 
INetURLObject::GetRelURL( m_aContext.BaseURL, aURL,

 INetURLObject::EncodeMechanism::WasEncoded,

 bFileSpec ? INetURLObject::DecodeMechanism::WithCharset : 
INetURLObject::DecodeMechanism::NONE


[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - vcl/qa

2022-03-10 Thread Dr. David Alan Gilbert (via logerrit)
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |   73 +++--
 1 file changed, 44 insertions(+), 29 deletions(-)

New commits:
commit cc86bc599c8b3ce786e05246e8255917ab12
Author: Dr. David Alan Gilbert 
AuthorDate: Sat Feb 19 15:13:01 2022 +
Commit: Xisco Fauli 
CommitDate: Thu Mar 10 10:25:56 2022 +0100

pdfwriter: Add check without relativeFsys

Set relativeFsys on a per-test basis and add a test with
relativeFsys off.

Change-Id: I43b1d82200aca37b2cf8ac71d77a4aa61df543ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130197
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131258

diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 62f4c56efcb9..b6e251509d06 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -2950,28 +2950,43 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testURIs)
 {
 OUString in;
 OString out;
-} URIs[] = { {
- "http://example.com/;,
- "http://example.com/;,
- },
- {
- "file://localfile.odt/",
- "file://localfile.odt/",
- },
- {
- "git://git.example.org/project/example",
- "git://git.example.org/project/example",
- },
- {
- // The odt/pdf gets substituted due to 
'ConvertOOoTargetToPDFTarget'
- "filebypath.odt",
- "filebypath.pdf",
- },
- {
- // This also gets made relative due to 
'ExportLinksRelativeFsys'
- utl::TempFile::GetTempNameBaseDirectory() + 
"fileintempdir.odt",
- "fileintempdir.pdf",
- } };
+bool relativeFsys;
+} URIs[]
+= { {
+"http://example.com/;,
+"http://example.com/;,
+true,
+},
+{
+"file://localfile.odt/",
+"file://localfile.odt/",
+true,
+},
+{
+"git://git.example.org/project/example",
+"git://git.example.org/project/example",
+true,
+},
+{
+// The odt/pdf gets substituted due to 
'ConvertOOoTargetToPDFTarget'
+"filebypath.odt",
+"filebypath.pdf",
+true,
+},
+{
+// The odt/pdf gets substituted due to 
'ConvertOOoTargetToPDFTarget'
+// but this time with ExportLinksRelativeFsys off the path is 
added
+"filebypath.odt",
+OUStringToOString(utl::TempFile::GetTempNameBaseDirectory(), 
RTL_TEXTENCODING_UTF8)
++ "filebypath.pdf",
+false,
+},
+{
+// This also gets made relative due to 
'ExportLinksRelativeFsys'
+utl::TempFile::GetTempNameBaseDirectory() + 
"fileintempdir.odt",
+"fileintempdir.pdf",
+true,
+} };
 
 // Create an empty document.
 // Note: The test harness gets very upset if we try and create multiple
@@ -2986,15 +3001,15 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testURIs)
 uno::Reference xModel(mxComponent, uno::UNO_QUERY);
 xModel->attachResource(maTempFile.GetURL(), xModel->getArgs());
 
-// Test the filename rewriting
-uno::Sequence 
aFilterData(comphelper::InitPropertySequence({
-{ "ExportLinksRelativeFsys", uno::makeAny(true) },
-{ "ConvertOOoTargetToPDFTarget", uno::makeAny(true) },
-}));
-aMediaDescriptor["FilterData"] <<= aFilterData;
-
 for (unsigned int i = 0; i < (sizeof(URIs) / sizeof(URIs[0])); i++)
 {
+// Test the filename rewriting
+uno::Sequence 
aFilterData(comphelper::InitPropertySequence({
+{ "ExportLinksRelativeFsys", uno::makeAny(URIs[i].relativeFsys) },
+{ "ConvertOOoTargetToPDFTarget", uno::makeAny(true) },
+}));
+aMediaDescriptor["FilterData"] <<= aFilterData;
+
 // Add a link (based on testNestedHyperlink in rtfexport3)
 xCursor->gotoStart(/*bExpand=*/false);
 xCursor->gotoEnd(/*bExpand=*/true);


[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - vcl/qa

2022-03-10 Thread Dr. David Alan Gilbert (via logerrit)
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |   96 +
 1 file changed, 96 insertions(+)

New commits:
commit 0e6e1f37ee1d9fb6de41f6f18759b12d17344310
Author: Dr. David Alan Gilbert 
AuthorDate: Sun Nov 14 15:26:51 2021 +
Commit: Xisco Fauli 
CommitDate: Thu Mar 10 10:25:40 2022 +0100

pdfwriter: Check URIs exported

Check the URIs that are exported.

Change-Id: I2d8b00f767a61c5abdb9163701fe497bb258c790
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125203
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131257

diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 4050c8a5d7e9..62f4c56efcb9 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -2944,6 +2944,102 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, 
testPdfImageHyperlink)
 #endif
 }
 
+CPPUNIT_TEST_FIXTURE(PdfExportTest, testURIs)
+{
+struct
+{
+OUString in;
+OString out;
+} URIs[] = { {
+ "http://example.com/;,
+ "http://example.com/;,
+ },
+ {
+ "file://localfile.odt/",
+ "file://localfile.odt/",
+ },
+ {
+ "git://git.example.org/project/example",
+ "git://git.example.org/project/example",
+ },
+ {
+ // The odt/pdf gets substituted due to 
'ConvertOOoTargetToPDFTarget'
+ "filebypath.odt",
+ "filebypath.pdf",
+ },
+ {
+ // This also gets made relative due to 
'ExportLinksRelativeFsys'
+ utl::TempFile::GetTempNameBaseDirectory() + 
"fileintempdir.odt",
+ "fileintempdir.pdf",
+ } };
+
+// Create an empty document.
+// Note: The test harness gets very upset if we try and create multiple
+// documents, or recreate it; so reuse one instance for all the links
+mxComponent = loadFromDesktop("private:factory/swriter");
+uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xText = xTextDocument->getText();
+uno::Reference xCursor = xText->createTextCursor();
+xText->insertString(xCursor, "Test pdf", /*bAbsorb=*/false);
+
+// Set the name so it can do relative name replacement
+uno::Reference xModel(mxComponent, uno::UNO_QUERY);
+xModel->attachResource(maTempFile.GetURL(), xModel->getArgs());
+
+// Test the filename rewriting
+uno::Sequence 
aFilterData(comphelper::InitPropertySequence({
+{ "ExportLinksRelativeFsys", uno::makeAny(true) },
+{ "ConvertOOoTargetToPDFTarget", uno::makeAny(true) },
+}));
+aMediaDescriptor["FilterData"] <<= aFilterData;
+
+for (unsigned int i = 0; i < (sizeof(URIs) / sizeof(URIs[0])); i++)
+{
+// Add a link (based on testNestedHyperlink in rtfexport3)
+xCursor->gotoStart(/*bExpand=*/false);
+xCursor->gotoEnd(/*bExpand=*/true);
+uno::Reference xCursorProps(xCursor, 
uno::UNO_QUERY);
+xCursorProps->setPropertyValue("HyperLinkURL", 
uno::makeAny(URIs[i].in));
+
+// Save as PDF.
+uno::Reference xStorable(mxComponent, 
uno::UNO_QUERY);
+aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+xStorable->storeToURL(maTempFile.GetURL(), 
aMediaDescriptor.getAsConstPropertyValueList());
+
+// Use the filter rather than the pdfium route, as per the tdf105093 
test, it's
+// easier to parse the annotations
+vcl::filter::PDFDocument aDocument;
+
+// Parse the export result.
+SvFileStream aStream(maTempFile.GetURL(), StreamMode::READ);
+CPPUNIT_ASSERT(aDocument.Read(aStream));
+
+// The document has one page.
+std::vector aPages = 
aDocument.GetPages();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), aPages.size());
+auto pAnnots = 
dynamic_cast(aPages[0]->Lookup("Annots"));
+CPPUNIT_ASSERT(pAnnots);
+
+// There should be one annotation
+CPPUNIT_ASSERT_EQUAL(static_cast(1), 
pAnnots->GetElements().size());
+auto pAnnotReference
+= 
dynamic_cast(pAnnots->GetElements()[0]);
+CPPUNIT_ASSERT(pAnnotReference);
+vcl::filter::PDFObjectElement* pAnnot = 
pAnnotReference->LookupObject();
+CPPUNIT_ASSERT(pAnnot);
+// We're expecting something like /Type /Annot /A << /Type /Action /S 
/URI /URI (path)
+CPPUNIT_ASSERT_EQUAL(

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

2022-03-09 Thread Dr. David Alan Gilbert (via logerrit)
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |6 ++
 vcl/source/gdi/pdfwriter_impl.cxx  |   16 ++--
 2 files changed, 16 insertions(+), 6 deletions(-)

New commits:
commit 9579737b36e5055d5eb72abc0ace2b9b65600c76
Author: Dr. David Alan Gilbert 
AuthorDate: Sat Nov 13 01:33:06 2021 +
Commit: Stephan Bergmann 
CommitDate: Wed Mar 9 14:05:27 2022 +0100

tdf#143216: pdfwriter: Don't treat semi-valid URIs as local paths

Currently the PDF writer treats URIs that are rejected by INetURIObject,
as local files, and prepends a path to them.  For URIs that are valid
according to the basic URI syntax, but unhandled by INetURIObject
(such as http://user:password@domain) this produces a confusing result
with a ./uri in the PDF.

Avoid the prefixing where the URI follows the basic URI syntax, even
if INetURIObject didn't like it.

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

diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 35ca1c9bc051..e7f2354b9118 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -3049,6 +3049,12 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testURIs)
 "file://localfile.odt/",
 true,
 },
+{
+// tdf 143216
+"http://username:passw...@example.com;,
+"http://username:passw...@example.com;,
+true,
+},
 {
 "git://git.example.org/project/example",
 "git://git.example.org/project/example",
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 21f085fe2660..51291604fe51 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -47,6 +47,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -3280,6 +3281,7 @@ we check in the following sequence:
 boolbTargetHasPDFExtension = false;
 INetProtocol eTargetProtocol = aTargetURL.GetProtocol();
 boolbIsUNCPath = false;
+boolbUnparsedURI = false;
 
 // check if the protocol is a known one, or if there is no 
protocol at all (on target only)
 // if there is no protocol, make the target relative to the 
current document directory
@@ -3292,14 +3294,14 @@ we check in the following sequence:
 }
 else
 {
-INetURLObject aNewBase( aDocumentURL );//duplicate 
document URL
-aNewBase.removeSegment(); //remove last segment from it, 
obtaining the base URL of the
-  //target document
-aNewBase.insertName( url );
-aTargetURL = aNewBase;//reassign the new target URL
+INetURLObject 
aNewURL(rtl::Uri::convertRelToAbs(m_aContext.BaseURL, url));
+aTargetURL = aNewURL; //reassign the new target URL
+
 //recompute the target protocol, with the new URL
 //normal URL processing resumes
 eTargetProtocol = aTargetURL.GetProtocol();
+
+bUnparsedURI = eTargetProtocol == INetProtocol::NotValid;
 }
 }
 
@@ -3415,7 +3417,9 @@ we check in the following sequence:
 //substitute the fragment
 aTargetURL.SetMark( 
OStringToOUString(aLineLoc.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US) );
 }
-OUString aURL = aTargetURL.GetMainURL( bFileSpec ? 
INetURLObject::DecodeMechanism::WithCharset : 
INetURLObject::DecodeMechanism::NONE );
+OUString aURL = bUnparsedURI ? url :
+   aTargetURL.GetMainURL( 
bFileSpec ? INetURLObject::DecodeMechanism::WithCharset :
+   
   INetURLObject::DecodeMechanism::NONE );
 appendLiteralStringEncrypt(bSetRelative ? 
INetURLObject::GetRelURL( m_aContext.BaseURL, aURL,

 INetURLObject::EncodeMechanism::WasEncoded,

 bFileSpec ? INetURLObject::DecodeMechanism::WithCharset : 
INetURLObject::DecodeMechanism::NONE


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

2022-03-09 Thread Dr. David Alan Gilbert (via logerrit)
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |   73 +++--
 1 file changed, 44 insertions(+), 29 deletions(-)

New commits:
commit d8c5fdcb3f1e2fdaacc6a7e403a2077d93207c82
Author: Dr. David Alan Gilbert 
AuthorDate: Sat Feb 19 15:13:01 2022 +
Commit: Stephan Bergmann 
CommitDate: Wed Mar 9 14:05:03 2022 +0100

pdfwriter: Add check without relativeFsys

Set relativeFsys on a per-test basis and add a test with
relativeFsys off.

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

diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 60ac42adf707..35ca1c9bc051 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -3037,28 +3037,43 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testURIs)
 {
 OUString in;
 OString out;
-} URIs[] = { {
- "http://example.com/;,
- "http://example.com/;,
- },
- {
- "file://localfile.odt/",
- "file://localfile.odt/",
- },
- {
- "git://git.example.org/project/example",
- "git://git.example.org/project/example",
- },
- {
- // The odt/pdf gets substituted due to 
'ConvertOOoTargetToPDFTarget'
- "filebypath.odt",
- "filebypath.pdf",
- },
- {
- // This also gets made relative due to 
'ExportLinksRelativeFsys'
- utl::TempFile::GetTempNameBaseDirectory() + 
"fileintempdir.odt",
- "fileintempdir.pdf",
- } };
+bool relativeFsys;
+} URIs[]
+= { {
+"http://example.com/;,
+"http://example.com/;,
+true,
+},
+{
+"file://localfile.odt/",
+"file://localfile.odt/",
+true,
+},
+{
+"git://git.example.org/project/example",
+"git://git.example.org/project/example",
+true,
+},
+{
+// The odt/pdf gets substituted due to 
'ConvertOOoTargetToPDFTarget'
+"filebypath.odt",
+"filebypath.pdf",
+true,
+},
+{
+// The odt/pdf gets substituted due to 
'ConvertOOoTargetToPDFTarget'
+// but this time with ExportLinksRelativeFsys off the path is 
added
+"filebypath.odt",
+OUStringToOString(utl::TempFile::GetTempNameBaseDirectory(), 
RTL_TEXTENCODING_UTF8)
++ "filebypath.pdf",
+false,
+},
+{
+// This also gets made relative due to 
'ExportLinksRelativeFsys'
+utl::TempFile::GetTempNameBaseDirectory() + 
"fileintempdir.odt",
+"fileintempdir.pdf",
+true,
+} };
 
 // Create an empty document.
 // Note: The test harness gets very upset if we try and create multiple
@@ -3073,15 +3088,15 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testURIs)
 uno::Reference xModel(mxComponent, uno::UNO_QUERY);
 xModel->attachResource(maTempFile.GetURL(), xModel->getArgs());
 
-// Test the filename rewriting
-uno::Sequence 
aFilterData(comphelper::InitPropertySequence({
-{ "ExportLinksRelativeFsys", uno::makeAny(true) },
-{ "ConvertOOoTargetToPDFTarget", uno::makeAny(true) },
-}));
-aMediaDescriptor["FilterData"] <<= aFilterData;
-
 for (unsigned int i = 0; i < (sizeof(URIs) / sizeof(URIs[0])); i++)
 {
+// Test the filename rewriting
+uno::Sequence 
aFilterData(comphelper::InitPropertySequence({
+{ "ExportLinksRelativeFsys", uno::makeAny(URIs[i].relativeFsys) },
+{ "ConvertOOoTargetToPDFTarget", uno::makeAny(true) },
+}));
+aMediaDescriptor["FilterData"] <<= aFilterData;
+
 // Add a link (based on testNestedHyperlink in rtfexport3)
 xCursor->gotoStart(/*bExpand=*/false);
 xCursor->gotoEnd(/*bExpand=*/true);


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

2022-02-07 Thread Dr. David Alan Gilbert (via logerrit)
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |   96 +
 1 file changed, 96 insertions(+)

New commits:
commit 2a57ef5512a018bfcfac85a8cd63f2e528f7cdca
Author: Dr. David Alan Gilbert 
AuthorDate: Sun Nov 14 15:26:51 2021 +
Commit: Stephan Bergmann 
CommitDate: Mon Feb 7 11:40:48 2022 +0100

pdfwriter: Check URIs exported

Check the URIs that are exported.

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

diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 9bc315fcb2bd..4326b53b80bb 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -2978,6 +2978,102 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, 
testPdfImageHyperlink)
 #endif
 }
 
+CPPUNIT_TEST_FIXTURE(PdfExportTest, testURIs)
+{
+struct
+{
+OUString in;
+OString out;
+} URIs[] = { {
+ "http://example.com/;,
+ "http://example.com/;,
+ },
+ {
+ "file://localfile.odt/",
+ "file://localfile.odt/",
+ },
+ {
+ "git://git.example.org/project/example",
+ "git://git.example.org/project/example",
+ },
+ {
+ // The odt/pdf gets substituted due to 
'ConvertOOoTargetToPDFTarget'
+ "filebypath.odt",
+ "filebypath.pdf",
+ },
+ {
+ // This also gets made relative due to 
'ExportLinksRelativeFsys'
+ utl::TempFile::GetTempNameBaseDirectory() + 
"fileintempdir.odt",
+ "fileintempdir.pdf",
+ } };
+
+// Create an empty document.
+// Note: The test harness gets very upset if we try and create multiple
+// documents, or recreate it; so reuse one instance for all the links
+mxComponent = loadFromDesktop("private:factory/swriter");
+uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xText = xTextDocument->getText();
+uno::Reference xCursor = xText->createTextCursor();
+xText->insertString(xCursor, "Test pdf", /*bAbsorb=*/false);
+
+// Set the name so it can do relative name replacement
+uno::Reference xModel(mxComponent, uno::UNO_QUERY);
+xModel->attachResource(maTempFile.GetURL(), xModel->getArgs());
+
+// Test the filename rewriting
+uno::Sequence 
aFilterData(comphelper::InitPropertySequence({
+{ "ExportLinksRelativeFsys", uno::makeAny(true) },
+{ "ConvertOOoTargetToPDFTarget", uno::makeAny(true) },
+}));
+aMediaDescriptor["FilterData"] <<= aFilterData;
+
+for (unsigned int i = 0; i < (sizeof(URIs) / sizeof(URIs[0])); i++)
+{
+// Add a link (based on testNestedHyperlink in rtfexport3)
+xCursor->gotoStart(/*bExpand=*/false);
+xCursor->gotoEnd(/*bExpand=*/true);
+uno::Reference xCursorProps(xCursor, 
uno::UNO_QUERY);
+xCursorProps->setPropertyValue("HyperLinkURL", 
uno::makeAny(URIs[i].in));
+
+// Save as PDF.
+uno::Reference xStorable(mxComponent, 
uno::UNO_QUERY);
+aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+xStorable->storeToURL(maTempFile.GetURL(), 
aMediaDescriptor.getAsConstPropertyValueList());
+
+// Use the filter rather than the pdfium route, as per the tdf105093 
test, it's
+// easier to parse the annotations
+vcl::filter::PDFDocument aDocument;
+
+// Parse the export result.
+SvFileStream aStream(maTempFile.GetURL(), StreamMode::READ);
+CPPUNIT_ASSERT(aDocument.Read(aStream));
+
+// The document has one page.
+std::vector aPages = 
aDocument.GetPages();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), aPages.size());
+auto pAnnots = 
dynamic_cast(aPages[0]->Lookup("Annots"));
+CPPUNIT_ASSERT(pAnnots);
+
+// There should be one annotation
+CPPUNIT_ASSERT_EQUAL(static_cast(1), 
pAnnots->GetElements().size());
+auto pAnnotReference
+= 
dynamic_cast(pAnnots->GetElements()[0]);
+CPPUNIT_ASSERT(pAnnotReference);
+vcl::filter::PDFObjectElement* pAnnot = 
pAnnotReference->LookupObject();
+CPPUNIT_ASSERT(pAnnot);
+// We're expecting something like /Type /Annot /A << /Type /Action /S 
/URI /URI (path)
+CPPUNIT_ASSERT_EQUAL(
+OString("Annot"),
+
static_cast(pAnnot->Lookup("Type&

[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - configure.ac download.lst external/libmwaw writerperfect/qa

2021-12-14 Thread David Tardon (via logerrit)
 configure.ac  |2 +-
 download.lst  |4 ++--
 external/libmwaw/Library_mwaw.mk  |3 +++
 writerperfect/qa/unit/WpftDrawFilterTest.cxx  |2 ++
 writerperfect/qa/unit/WpftWriterFilterTest.cxx|1 +
 writerperfect/qa/unit/data/draw/libmwaw/pass/ReadySetGo_1 |binary
 writerperfect/qa/unit/data/draw/libmwaw/pass/Scoop_1  |binary
 writerperfect/qa/unit/data/writer/libmwaw/pass/ScriptWriter_1 |binary
 8 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 85ef4efeb27546b252ed59c80efe8352adcc2cc3
Author: David Tardon 
AuthorDate: Mon Dec 13 21:39:46 2021 +0100
Commit: Xisco Fauli 
CommitDate: Tue Dec 14 15:45:50 2021 +0100

upload libmwaw 0.3.21

Change-Id: Id28cd361237ce67b76a865ad4291ccece521af85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126768
Tested-by: Jenkins
Reviewed-by: David Tardon 
(cherry picked from commit c74d59a8b47bb8228c297a60e6b5b0cc5e08aa53)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126809
Reviewed-by: Xisco Fauli 

diff --git a/configure.ac b/configure.ac
index bbd326b84321..96cb249fb7d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9361,7 +9361,7 @@ libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.1])
 libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.1])
 
 libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.1])
-libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.20])
+libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.21])
 
 libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.1])
 libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.10])
diff --git a/download.lst b/download.lst
index 1a70e6a44ba0..8ec9ac8c3082 100644
--- a/download.lst
+++ b/download.lst
@@ -184,8 +184,8 @@ export MDNSRESPONDER_SHA256SUM := 
e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e39
 export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
 export MSPUB_SHA256SUM := 
ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba
 export MSPUB_TARBALL := libmspub-0.1.4.tar.xz
-export MWAW_SHA256SUM := 
14c38b06214f277ccd1450e22e6e32648955018d7695896bc560165748c8cd21
-export MWAW_VERSION_MICRO := 20
+export MWAW_SHA256SUM := 
e8750123a78d61b943cef78b7736c8a7f20bb0a649aa112402124fba794fc21c
+export MWAW_VERSION_MICRO := 21
 export MWAW_TARBALL := libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.xz
 export MYTHES_SHA256SUM := 
1e81f395d8c851c3e4e75b568e20fa2fa549354e75ab397f9de4b0e0790a305f
 export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
diff --git a/external/libmwaw/Library_mwaw.mk b/external/libmwaw/Library_mwaw.mk
index 2f27a6113485..58d433f9d093 100644
--- a/external/libmwaw/Library_mwaw.mk
+++ b/external/libmwaw/Library_mwaw.mk
@@ -201,6 +201,9 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,mwaw,\
UnpackedTarball/libmwaw/src/lib/RagTimeSpreadsheet \
UnpackedTarball/libmwaw/src/lib/RagTimeStruct \
UnpackedTarball/libmwaw/src/lib/RagTimeText \
+   UnpackedTarball/libmwaw/src/lib/ReadySetGoParser \
+   UnpackedTarball/libmwaw/src/lib/ScoopParser \
+   UnpackedTarball/libmwaw/src/lib/ScriptWriterParser \
UnpackedTarball/libmwaw/src/lib/StudentWritingCParser \
UnpackedTarball/libmwaw/src/lib/StyleParser \
UnpackedTarball/libmwaw/src/lib/SuperPaintParser \
diff --git a/writerperfect/qa/unit/WpftDrawFilterTest.cxx 
b/writerperfect/qa/unit/WpftDrawFilterTest.cxx
index 3786315c4620..78168cdb9ce0 100644
--- a/writerperfect/qa/unit/WpftDrawFilterTest.cxx
+++ b/writerperfect/qa/unit/WpftDrawFilterTest.cxx
@@ -46,6 +46,8 @@ void WpftDrawFilterTest::test()
 { "MacDraw_1.hqx", REQUIRE_MWAW_VERSION(0, 3, 2) },
 { "MacDraw_II.hqx", REQUIRE_MWAW_VERSION(0, 3, 3) },
 { "MacDraw_Pro_1.0.hqx", REQUIRE_MWAW_VERSION(0, 3, 4) },
+{ "ReadySetGo_1", REQUIRE_MWAW_VERSION(0, 3, 21) },
+{ "Scoop_1", REQUIRE_MWAW_VERSION(0, 3, 21) },
 };
 const writerperfect::test::WpftOptionalMap_t aStarOfficeOptional{
 { "Draw_3.1.sda", REQUIRE_STAROFFICE_VERSION(0, 0, 1) },
diff --git a/writerperfect/qa/unit/WpftWriterFilterTest.cxx 
b/writerperfect/qa/unit/WpftWriterFilterTest.cxx
index 543146169253..78d24dc99b17 100644
--- a/writerperfect/qa/unit/WpftWriterFilterTest.cxx
+++ b/writerperfect/qa/unit/WpftWriterFilterTest.cxx
@@ -44,6 +44,7 @@ void WpftWriterFilterTest::test()
 { "RagTime_2.1.hqx", REQUIRE_MWAW_VERSION(0, 3, 2) },
 { "RagTime_3.2.hqx", REQUIRE_MWAW_VERSION(0, 3, 2) },
 { "RagTime_5.5.rag", REQUIRE_MWAW_VERSION(0, 3, 6) },
+{ "ScriptWriter", REQUIRE_MWAW_VERSION(0, 3, 21) },
 { "StudentWritingCenter", REQUIRE_MWAW_VERSION(0, 3, 20) },
 { "WordMaker

[Libreoffice-commits] core.git: configure.ac download.lst external/libmwaw writerperfect/qa

2021-12-13 Thread David Tardon (via logerrit)
 configure.ac  |2 +-
 download.lst  |4 ++--
 external/libmwaw/Library_mwaw.mk  |3 +++
 writerperfect/qa/unit/WpftDrawFilterTest.cxx  |2 ++
 writerperfect/qa/unit/WpftWriterFilterTest.cxx|1 +
 writerperfect/qa/unit/data/draw/libmwaw/pass/ReadySetGo_1 |binary
 writerperfect/qa/unit/data/draw/libmwaw/pass/Scoop_1  |binary
 writerperfect/qa/unit/data/writer/libmwaw/pass/ScriptWriter_1 |binary
 8 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit c74d59a8b47bb8228c297a60e6b5b0cc5e08aa53
Author: David Tardon 
AuthorDate: Mon Dec 13 21:39:46 2021 +0100
Commit: David Tardon 
CommitDate: Tue Dec 14 08:08:46 2021 +0100

upload libmwaw 0.3.21

Change-Id: Id28cd361237ce67b76a865ad4291ccece521af85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126768
Tested-by: Jenkins
Reviewed-by: David Tardon 

diff --git a/configure.ac b/configure.ac
index c213ebfb6693..099817d7a1ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9397,7 +9397,7 @@ libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.1])
 libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.1])
 
 libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.1])
-libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.20])
+libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.21])
 
 libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.1])
 libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.10])
diff --git a/download.lst b/download.lst
index 0e93fecf0e9d..8dd656fd5de9 100644
--- a/download.lst
+++ b/download.lst
@@ -184,8 +184,8 @@ export MDNSRESPONDER_SHA256SUM := 
e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e39
 export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
 export MSPUB_SHA256SUM := 
ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba
 export MSPUB_TARBALL := libmspub-0.1.4.tar.xz
-export MWAW_SHA256SUM := 
14c38b06214f277ccd1450e22e6e32648955018d7695896bc560165748c8cd21
-export MWAW_VERSION_MICRO := 20
+export MWAW_SHA256SUM := 
e8750123a78d61b943cef78b7736c8a7f20bb0a649aa112402124fba794fc21c
+export MWAW_VERSION_MICRO := 21
 export MWAW_TARBALL := libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.xz
 export MYTHES_SHA256SUM := 
1e81f395d8c851c3e4e75b568e20fa2fa549354e75ab397f9de4b0e0790a305f
 export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
diff --git a/external/libmwaw/Library_mwaw.mk b/external/libmwaw/Library_mwaw.mk
index 2f27a6113485..58d433f9d093 100644
--- a/external/libmwaw/Library_mwaw.mk
+++ b/external/libmwaw/Library_mwaw.mk
@@ -201,6 +201,9 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,mwaw,\
UnpackedTarball/libmwaw/src/lib/RagTimeSpreadsheet \
UnpackedTarball/libmwaw/src/lib/RagTimeStruct \
UnpackedTarball/libmwaw/src/lib/RagTimeText \
+   UnpackedTarball/libmwaw/src/lib/ReadySetGoParser \
+   UnpackedTarball/libmwaw/src/lib/ScoopParser \
+   UnpackedTarball/libmwaw/src/lib/ScriptWriterParser \
UnpackedTarball/libmwaw/src/lib/StudentWritingCParser \
UnpackedTarball/libmwaw/src/lib/StyleParser \
UnpackedTarball/libmwaw/src/lib/SuperPaintParser \
diff --git a/writerperfect/qa/unit/WpftDrawFilterTest.cxx 
b/writerperfect/qa/unit/WpftDrawFilterTest.cxx
index 3786315c4620..78168cdb9ce0 100644
--- a/writerperfect/qa/unit/WpftDrawFilterTest.cxx
+++ b/writerperfect/qa/unit/WpftDrawFilterTest.cxx
@@ -46,6 +46,8 @@ void WpftDrawFilterTest::test()
 { "MacDraw_1.hqx", REQUIRE_MWAW_VERSION(0, 3, 2) },
 { "MacDraw_II.hqx", REQUIRE_MWAW_VERSION(0, 3, 3) },
 { "MacDraw_Pro_1.0.hqx", REQUIRE_MWAW_VERSION(0, 3, 4) },
+{ "ReadySetGo_1", REQUIRE_MWAW_VERSION(0, 3, 21) },
+{ "Scoop_1", REQUIRE_MWAW_VERSION(0, 3, 21) },
 };
 const writerperfect::test::WpftOptionalMap_t aStarOfficeOptional{
 { "Draw_3.1.sda", REQUIRE_STAROFFICE_VERSION(0, 0, 1) },
diff --git a/writerperfect/qa/unit/WpftWriterFilterTest.cxx 
b/writerperfect/qa/unit/WpftWriterFilterTest.cxx
index 543146169253..78d24dc99b17 100644
--- a/writerperfect/qa/unit/WpftWriterFilterTest.cxx
+++ b/writerperfect/qa/unit/WpftWriterFilterTest.cxx
@@ -44,6 +44,7 @@ void WpftWriterFilterTest::test()
 { "RagTime_2.1.hqx", REQUIRE_MWAW_VERSION(0, 3, 2) },
 { "RagTime_3.2.hqx", REQUIRE_MWAW_VERSION(0, 3, 2) },
 { "RagTime_5.5.rag", REQUIRE_MWAW_VERSION(0, 3, 6) },
+{ "ScriptWriter", REQUIRE_MWAW_VERSION(0, 3, 21) },
 { "StudentWritingCenter", REQUIRE_MWAW_VERSION(0, 3, 20) },
 { "WordMaker", REQUIRE_MWAW_VERSION(0, 3, 20) },
 };
diff --git a/writerperfect/qa/unit/data/draw/libmwaw/pass/ReadySetGo_1 
b/writerperfect/qa/unit/data/draw/libmwaw/pass/

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

2021-11-22 Thread Dr. David Alan Gilbert (via logerrit)
 svx/source/stbctrls/pszctrl.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 4c577a0ada8c47483fb8a80a97478ffd3e2b37d3
Author: Dr. David Alan Gilbert 
AuthorDate: Wed Nov 10 21:44:40 2021 +
Commit: Stephan Bergmann 
CommitDate: Mon Nov 22 10:03:22 2021 +0100

pszctrl: cppcheck undefined shift

cppcheck noticed that the shift in:

for ( sal_uInt16 nCheck = 1; nCheck < 32; ++nCheck )
if ( nCheckEncoded & (1 << nCheck) )

is undefined since 1 << 31 is implementation defined.
Make it 1u, and the others around.
(Not that we define bits that high, but we are explicitly checking it)

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

diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index f273afcdbc61..129ac67eb085 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -162,7 +162,7 @@ FunctionPopup_Impl::FunctionPopup_Impl(sal_uInt32 
nCheckEncoded)
 , m_nSelected(nCheckEncoded)
 {
 for ( sal_uInt16 nCheck = 1; nCheck < 32; ++nCheck )
-if ( nCheckEncoded & (1 << nCheck) )
+if ( nCheckEncoded & (1u << nCheck) )
 m_xMenu->set_active(function_to_id(nCheck), true);
 }
 
@@ -174,10 +174,10 @@ sal_uInt32 
FunctionPopup_Impl::GetSelected(std::string_view curident) const
 nSelected = ( 1 << PSZ_FUNC_NONE );
 else
 {
-nSelected &= (~( 1 << PSZ_FUNC_NONE )); // Clear the "None" bit
-nSelected ^= ( 1 << nCurItemId ); // Toggle the bit corresponding to 
nCurItemId
+nSelected &= (~( 1u << PSZ_FUNC_NONE )); // Clear the "None" bit
+nSelected ^= ( 1u << nCurItemId ); // Toggle the bit corresponding to 
nCurItemId
 if ( !nSelected )
-nSelected = ( 1 << PSZ_FUNC_NONE );
+nSelected = ( 1u << PSZ_FUNC_NONE );
 }
 return nSelected;
 }


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

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

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

test_corefl: Fix OSL_ENSURE bracketing

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

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

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


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - download.lst external/libwpd solenv/flatpak-manifest.in

2021-11-12 Thread David Tardon (via logerrit)
 download.lst  |4 ++--
 external/libwpd/Library_wpd.mk|2 ++
 external/libwpd/include.patch |4 ++--
 external/libwpd/libwpd-bundled-soname.patch.0 |3 +--
 solenv/flatpak-manifest.in|6 +++---
 5 files changed, 10 insertions(+), 9 deletions(-)

New commits:
commit 4a565c374377d56f40c4f3c953b39bdd159efd8e
Author: David Tardon 
AuthorDate: Sat Dec 29 14:14:13 2018 +0100
Commit: Michael Stahl 
CommitDate: Fri Nov 12 10:30:25 2021 +0100

upload libwpd 0.10.3

Reviewed-on: https://gerrit.libreoffice.org/65714
Tested-by: Jenkins
Reviewed-by: David Tardon 
(cherry picked from commit 87742f16e2d3f1c58534508b724268b9ce675c8e)

Change-Id: I68e3791f50b95956bfe6aae743978994a5f232b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125064
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/download.lst b/download.lst
index a377b09e3d4c..b7145a9822c5 100644
--- a/download.lst
+++ b/download.lst
@@ -238,8 +238,8 @@ export UCPP_SHA256SUM := 
983941d31ee8d366085cadf28db75eb1f5cb03ba1e5853b98f12f7f
 export UCPP_TARBALL := 0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
 export VISIO_SHA256SUM := 
8faf8df870cb27b09a787a1959d6c646faa44d0d8ab151883df408b7166bea4c
 export VISIO_TARBALL := libvisio-0.1.7.tar.xz
-export WPD_SHA256SUM := 
323f68beaf4f35e5a4d7daffb4703d0566698280109210fa4eaa90dea27d6610
-export WPD_VERSION_MICRO := 2
+export WPD_SHA256SUM := 
2465b0b662fdc5d4e3bebcdc9a79027713fb629ca2bff04a3c9251fdec42dd09
+export WPD_VERSION_MICRO := 3
 export WPD_TARBALL := libwpd-0.10.$(WPD_VERSION_MICRO).tar.xz
 export WPG_SHA256SUM := 
57faf1ab97d63d57383ac5d7875e992a3d190436732f4083310c0471e72f8c33
 export WPG_VERSION_MICRO := 2
diff --git a/external/libwpd/Library_wpd.mk b/external/libwpd/Library_wpd.mk
index 62285858468f..2c84a5b5bb24 100644
--- a/external/libwpd/Library_wpd.mk
+++ b/external/libwpd/Library_wpd.mk
@@ -192,6 +192,7 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,wpd,\
UnpackedTarball/libwpd/src/lib/WPXContentListener \
UnpackedTarball/libwpd/src/lib/WPXEncryption \
UnpackedTarball/libwpd/src/lib/WPXHeader \
+   UnpackedTarball/libwpd/src/lib/WPXHeaderFooter \
UnpackedTarball/libwpd/src/lib/WPXListener \
UnpackedTarball/libwpd/src/lib/WPXMemoryStream \
UnpackedTarball/libwpd/src/lib/WPXPageSpan \
@@ -199,6 +200,7 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,wpd,\
UnpackedTarball/libwpd/src/lib/WPXStylesListener \
UnpackedTarball/libwpd/src/lib/WPXSubDocument \
UnpackedTarball/libwpd/src/lib/WPXTable \
+   UnpackedTarball/libwpd/src/lib/WPXTableList \
UnpackedTarball/libwpd/src/lib/libwpd_internal \
UnpackedTarball/libwpd/src/lib/libwpd_math \
 ))
diff --git a/external/libwpd/include.patch b/external/libwpd/include.patch
index ca68e8bdb22a..57f52b4b0aa5 100644
--- a/external/libwpd/include.patch
+++ b/external/libwpd/include.patch
@@ -1,10 +1,10 @@
 --- src/lib/WPXTable.h
 +++ src/lib/WPXTable.h
 @@ -36,6 +36,7 @@
- 
  #ifndef _WPXTABLE_H
  #define _WPXTABLE_H
+ 
 +#include 
  #include 
- #include 
  
+ struct WPXTableCell
diff --git a/external/libwpd/libwpd-bundled-soname.patch.0 
b/external/libwpd/libwpd-bundled-soname.patch.0
index 04661f2d464b..2a669748f21d 100644
--- a/external/libwpd/libwpd-bundled-soname.patch.0
+++ b/external/libwpd/libwpd-bundled-soname.patch.0
@@ -1,7 +1,6 @@
 --- src/lib/Makefile.in.orig   2015-08-06 21:41:41.073622494 +0200
 +++ src/lib/Makefile.in2015-08-06 21:42:09.377622009 +0200
-@@ -429,7 +429,7 @@
- AM_CXXFLAGS = -I$(top_srcdir)/inc $(REVENGE_CFLAGS) $(DEBUG_CXXFLAGS) 
-DLIBWPD_BUILD=1
+@@ -429,6 +429,6 @@
  libwpd_@WPD_MAJOR_VERSION@_@WPD_MINOR_VERSION@_la_LIBADD = $(REVENGE_LIBS) 
@LIBWPD_WIN32_RESOURCE@
  libwpd_@WPD_MAJOR_VERSION@_@WPD_MINOR_VERSION@_la_DEPENDENCIES = 
@LIBWPD_WIN32_RESOURCE@
 -libwpd_@WPD_MAJOR_VERSION@_@WPD_MINOR_VERSION@_la_LDFLAGS = $(version_info) 
-export-dynamic $(no_undefined)
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index bc911dbf91db..77765e353346 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -340,10 +340,10 @@
 "dest-filename": "external/tarballs/libvisio-0.1.7.tar.xz"
 },
 {
-"url": 
"https://dev-www.libreoffice.org/src/libwpd-0.10.2.tar.xz;,
-"sha256": 
"323f68beaf4f35e5a4d7daffb4703d0566698280109210fa4eaa90dea27d6610",
+"url": 
"https://dev-www.libreoffice.org/src/libwpd-0.10.3.tar.xz;,
+"sha256": 
"2465b0b662fdc5d4e3bebcdc9a79027713fb629ca2bff04a3c9251fdec42dd09",
 "type": "file",
-"dest-filenam

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - download.lst external/libvisio solenv/flatpak-manifest.in

2021-11-12 Thread David Tardon (via logerrit)
 download.lst   |4 +-
 external/libvisio/0001-fix-debug-build.patch.1 |   40 -
 external/libvisio/UnpackedTarball_libvisio.mk  |1 
 external/libvisio/ubsan.patch  |4 +-
 solenv/flatpak-manifest.in |6 +--
 5 files changed, 7 insertions(+), 48 deletions(-)

New commits:
commit a3858ab58111a2b489f122652755e034ca427822
Author: David Tardon 
AuthorDate: Sat Aug 17 17:06:07 2019 +0200
Commit: Michael Stahl 
CommitDate: Fri Nov 12 10:30:07 2021 +0100

upload libvisio 0.1.7

Reviewed-on: https://gerrit.libreoffice.org/77640
Tested-by: Jenkins
Reviewed-by: David Tardon 
(cherry picked from commit d83472ab6fde650772307f7f93a0a4b96e7ea6a8)

Change-Id: I4eb115c7c085b325370e9cd8f80e1b03f16f5033
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125063
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/download.lst b/download.lst
index 9303f0b830de..a377b09e3d4c 100644
--- a/download.lst
+++ b/download.lst
@@ -236,8 +236,8 @@ export TWAIN_DSM_SHA256SUM := 
82c818be771f242388457aa8c807e4b52aa84dc22b21c6c561
 export TWAIN_DSM_TARBALL := twaindsm_2.4.1.orig.tar.gz
 export UCPP_SHA256SUM := 
983941d31ee8d366085cadf28db75eb1f5cb03ba1e5853b98f12f7f51c63b776
 export UCPP_TARBALL := 0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
-export VISIO_SHA256SUM := 
fe1002d3671d53c09bc65e47ec948ec7b67e6fb112ed1cd10966e211a8bb50f9
-export VISIO_TARBALL := libvisio-0.1.6.tar.xz
+export VISIO_SHA256SUM := 
8faf8df870cb27b09a787a1959d6c646faa44d0d8ab151883df408b7166bea4c
+export VISIO_TARBALL := libvisio-0.1.7.tar.xz
 export WPD_SHA256SUM := 
323f68beaf4f35e5a4d7daffb4703d0566698280109210fa4eaa90dea27d6610
 export WPD_VERSION_MICRO := 2
 export WPD_TARBALL := libwpd-0.10.$(WPD_VERSION_MICRO).tar.xz
diff --git a/external/libvisio/0001-fix-debug-build.patch.1 
b/external/libvisio/0001-fix-debug-build.patch.1
deleted file mode 100644
index 4146e6e8bfe7..
--- a/external/libvisio/0001-fix-debug-build.patch.1
+++ /dev/null
@@ -1,40 +0,0 @@
-From 15f3774513d0181ad90da382297c175cc3424462 Mon Sep 17 00:00:00 2001
-From: David Tardon 
-Date: Sun, 22 Oct 2017 21:24:43 +0200
-Subject: [PATCH] fix debug build
-
-Change-Id: I860b6034e5d833900652aec8c3647eeae185e538

- src/lib/VDXParser.cpp  | 2 +-
- src/lib/VSDXParser.cpp | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/lib/VDXParser.cpp b/src/lib/VDXParser.cpp
-index f2f3154..0f07efd 100644
 a/src/lib/VDXParser.cpp
-+++ b/src/lib/VDXParser.cpp
-@@ -916,7 +916,7 @@ xmlChar 
*libvisio::VDXParser::readStringData(xmlTextReaderPtr reader)
- ret = xmlTextReaderRead(reader);
- if (1 == ret && stringValue)
- {
--  VSD_DEBUG_MSG(("VDXParser::readStringData stringValue %s\n", (const 
char *)stringValue));
-+  VSD_DEBUG_MSG(("VDXParser::readStringData stringValue %s\n", (const 
char *)stringValue.get()));
-   return stringValue.release();
- }
-   }
-diff --git a/src/lib/VSDXParser.cpp b/src/lib/VSDXParser.cpp
-index 488be3a..efd46b9 100644
 a/src/lib/VSDXParser.cpp
-+++ b/src/lib/VSDXParser.cpp
-@@ -555,7 +555,7 @@ xmlChar 
*libvisio::VSDXParser::readStringData(xmlTextReaderPtr reader)
-   std::unique_ptr 
stringValue(xmlTextReaderGetAttribute(reader, BAD_CAST("V")), xmlFree);
-   if (stringValue)
-   {
--VSD_DEBUG_MSG(("VSDXParser::readStringData stringValue %s\n", (const char 
*)stringValue));
-+VSD_DEBUG_MSG(("VSDXParser::readStringData stringValue %s\n", (const char 
*)stringValue.get()));
- return stringValue.release();
-   }
-   return nullptr;
--- 
-2.14.1
-
diff --git a/external/libvisio/UnpackedTarball_libvisio.mk 
b/external/libvisio/UnpackedTarball_libvisio.mk
index 1ab8b392c4e8..eba43f3b7a6e 100644
--- a/external/libvisio/UnpackedTarball_libvisio.mk
+++ b/external/libvisio/UnpackedTarball_libvisio.mk
@@ -17,7 +17,6 @@ $(eval $(call 
gb_UnpackedTarball_update_autoconf_configs,libvisio))
 
 $(eval $(call gb_UnpackedTarball_add_patches,libvisio, \
 external/libvisio/ubsan.patch \
-external/libvisio/0001-fix-debug-build.patch.1 \
 ))
 
 ifeq ($(COM_IS_CLANG),TRUE)
diff --git a/external/libvisio/ubsan.patch b/external/libvisio/ubsan.patch
index 7bba63fda7a1..c9ffbd98f4b6 100644
--- a/external/libvisio/ubsan.patch
+++ b/external/libvisio/ubsan.patch
@@ -4,8 +4,8 @@
  }
  if (U_SUCCESS(status) && conv)
  {
--  const char *src = (const char *)[0];
-+  const char *src = (const char *)characters.data();
+-  const auto *src = (const char *)[0];
++  const auto *src = (const char *)characters.data();
const char *srcLimit = (const char *)src + characters.size();
while (src < srcLimit)
{
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 847f28d3d2fd..bc911dbf91db 100644
--- a/solenv/fl

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - download.lst solenv/flatpak-manifest.in

2021-11-11 Thread David Tardon (via logerrit)
 download.lst   |4 ++--
 solenv/flatpak-manifest.in |6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 5f29aea808517e24056fedcebb344d32941f2d16
Author: David Tardon 
AuthorDate: Sat Dec 29 20:23:26 2018 +0100
Commit: Michael Stahl 
CommitDate: Thu Nov 11 17:56:32 2021 +0100

upload libqxp 0.0.2

Reviewed-on: https://gerrit.libreoffice.org/65725
Tested-by: Jenkins
Reviewed-by: David Tardon 
(cherry picked from commit 6aaed7c5165ea87c3a263fd9582c97892345120f)

Change-Id: Idda6c0ce0c087a3be2e7fe31999a7d5a6fde4835
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125062
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/download.lst b/download.lst
index de0c5e16ee16..9303f0b830de 100644
--- a/download.lst
+++ b/download.lst
@@ -212,8 +212,8 @@ export POSTGRESQL_SHA256SUM := 
12345c83b89aa29808568977f5200d6da00f88a035517f925
 export POSTGRESQL_TARBALL := postgresql-13.1.tar.bz2
 export PYTHON_SHA256SUM := 
c24a37c63a67f53bdd09c5f287b5cff8e8b98f857bf348c577d454d3f74db049
 export PYTHON_TARBALL := Python-3.5.9.tar.xz
-export QXP_SHA256SUM := 
8c257f6184ff94aefa7c9fa1cfae82083d55a49247266905c71c53e013f95c73
-export QXP_TARBALL := libqxp-0.0.1.tar.xz
+export QXP_SHA256SUM := 
e137b6b110120a52c98edd02ebdc4095ee08d0d5295a94316a981750095a945c
+export QXP_TARBALL := libqxp-0.0.2.tar.xz
 export RAPTOR_SHA256SUM := 
ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed
 export RAPTOR_TARBALL := a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz
 export RASQAL_SHA256SUM := 
6924c9ac6570bd241a9669f83b467c728a322470bf34f4b2da4f69492ccfd97c
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 1d41d12523e2..847f28d3d2fd 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -449,10 +449,10 @@
 "dest-filename": 
"external/tarballs/libepubgen-0.1.1.tar.xz"
 },
 {
-"url": 
"https://dev-www.libreoffice.org/src/libqxp-0.0.1.tar.xz;,
-"sha256": 
"8c257f6184ff94aefa7c9fa1cfae82083d55a49247266905c71c53e013f95c73",
+"url": 
"https://dev-www.libreoffice.org/src/libqxp-0.0.2.tar.xz;,
+"sha256": 
"e137b6b110120a52c98edd02ebdc4095ee08d0d5295a94316a981750095a945c",
 "type": "file",
-"dest-filename": "external/tarballs/libqxp-0.0.1.tar.xz"
+"dest-filename": "external/tarballs/libqxp-0.0.2.tar.xz"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/alef-1.001.tar.gz;,


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

2021-11-11 Thread Dr. David Alan Gilbert (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport6.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f75974f95f04efef92c2a17eed498d9dd189c7a0
Author: Dr. David Alan Gilbert 
AuthorDate: Thu Nov 11 00:02:31 2021 +
Commit: Xisco Fauli 
CommitDate: Thu Nov 11 15:42:03 2021 +0100

ooxmlexport test: fix ?: identical values

cppcheck spotted a pair of:

CPPUNIT_ASSERT_EQUAL(sal_Int32(mbExported ? 11331 : 11331), 
xChildGroup->getPosition().Y);

where the ?: has the same values; from 
https://gerrit.libreoffice.org/c/core/+/115668

squash the ?:

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
index 2cc4334b4a4a..9c9604cd9c8b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
@@ -368,12 +368,12 @@ DECLARE_OOXMLEXPORT_TEST(testDMLGroupShapeChildPosition, 
"dml-groupshape-childpo
 uno::Reference xGroup(getShape(1), uno::UNO_QUERY);
 uno::Reference xChildGroup(xGroup->getByIndex(1), 
uno::UNO_QUERY);
 CPPUNIT_ASSERT_EQUAL(sal_Int32(-2123), xChildGroup->getPosition().X);
-CPPUNIT_ASSERT_EQUAL(sal_Int32(mbExported ? 11331 : 11331), 
xChildGroup->getPosition().Y);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(11331), xChildGroup->getPosition().Y);
 
 xGroup.set(xChildGroup, uno::UNO_QUERY);
 xChildGroup.set(xGroup->getByIndex(0), uno::UNO_QUERY);
 CPPUNIT_ASSERT_EQUAL(sal_Int32(-1859), xChildGroup->getPosition().X);
-CPPUNIT_ASSERT_EQUAL(sal_Int32(mbExported ? 11331 : 11331), 
xChildGroup->getPosition().Y);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(11331), xChildGroup->getPosition().Y);
 
 xChildGroup.set(xGroup->getByIndex(1), uno::UNO_QUERY);
 CPPUNIT_ASSERT_EQUAL(sal_Int32(-2123), xChildGroup->getPosition().X);


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - download.lst external/libodfgen solenv/flatpak-manifest.in

2021-11-09 Thread David Tardon (via logerrit)
 download.lst   
  |6 -
 
external/libodfgen/0001-tdf-101077-make-double-string-conversion-locale-agno.patch.1
 |   58 --
 external/libodfgen/ExternalProject_libodfgen.mk
  |4 
 external/libodfgen/Library_odfgen.mk   
  |3 
 external/libodfgen/UnpackedTarball_libodfgen.mk
  |4 
 external/libodfgen/libodfgen-bundled-soname.patch.0
  |5 
 solenv/flatpak-manifest.in 
  |6 -
 7 files changed, 13 insertions(+), 73 deletions(-)

New commits:
commit 6db70032300c58ce510342852eb9b8013ace4565
Author: David Tardon 
AuthorDate: Sun Jan 17 16:27:55 2021 +0100
Commit: Michael Stahl 
CommitDate: Tue Nov 9 11:34:26 2021 +0100

upload libodfgen 0.1.8

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109840
Tested-by: Jenkins
Reviewed-by: David Tardon 
(cherry picked from commit f341a9da2eb63ea40ccc5a17d7c9dc557682469f)

Change-Id: Ibc59469b74d54a2b307ea708ea5c4a752532f0b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124882
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/download.lst b/download.lst
index 0dcb91c97f77..70e9db0f6772 100644
--- a/download.lst
+++ b/download.lst
@@ -183,9 +183,9 @@ export NEON_SHA256SUM := 
db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d
 export NEON_TARBALL := neon-0.30.2.tar.gz
 export NSS_SHA256SUM := 
ec6032d78663c6ef90b4b83eb552dedf721d2bce208cec3bf527b8f637db7e45
 export NSS_TARBALL := nss-3.55-with-nspr-4.27.tar.gz
-export ODFGEN_SHA256SUM := 
2c7b21892f84a4c67546f84611eccdad6259875c971e98ddb027da66ea0ac9c2
-export ODFGEN_VERSION_MICRO := 6
-export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
+export ODFGEN_SHA256SUM := 
55200027fd46623b9b38d275e7452d1b0ff8aeddcad6f9ae6dc25f610625
+export ODFGEN_VERSION_MICRO := 8
+export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.xz
 export ODFVALIDATOR_SHA256SUM := 
702413413a5d8076c17fe79c0808dfba145a7260020f6c8627ea529a0cf83769
 export ODFVALIDATOR_JAR := 
odfvalidator-1.2.0-incubating-SNAPSHOT-jar-with-dependencies+ODFTOOLKIT-460+ODFTOOLKIT-475.jar
 export OFFICEOTRON_SHA256SUM := 
f2443f27561af52324eee03a1892d9f569adc8db9e7bca55614898bc2a13a770
diff --git 
a/external/libodfgen/0001-tdf-101077-make-double-string-conversion-locale-agno.patch.1
 
b/external/libodfgen/0001-tdf-101077-make-double-string-conversion-locale-agno.patch.1
deleted file mode 100644
index 1fc4e6b9d261..
--- 
a/external/libodfgen/0001-tdf-101077-make-double-string-conversion-locale-agno.patch.1
+++ /dev/null
@@ -1,58 +0,0 @@
-From 68e0c8e4c834df57bc9a0e8da72151f69ff5e7a6 Mon Sep 17 00:00:00 2001
-From: David Tardon 
-Date: Fri, 12 Aug 2016 12:50:39 +0200
-Subject: [PATCH] tdf#101077 make double->string conversion locale-agnostic
-

- src/OdsGenerator.cxx | 19 +--
- 1 file changed, 17 insertions(+), 2 deletions(-)
-
-diff --git a/src/OdsGenerator.cxx b/src/OdsGenerator.cxx
-index 52e135e..8cb7203 100644
 a/src/OdsGenerator.cxx
-+++ b/src/OdsGenerator.cxx
-@@ -26,6 +26,8 @@
- 
- #include 
- 
-+#include 
-+#include 
- #include 
- #include 
- #include 
-@@ -46,6 +48,19 @@
- #include "OdcGenerator.hxx"
- #include "OdfGenerator.hxx"
- 
-+namespace
-+{
-+
-+librevenge::RVNGString makePreciseStr(const double value)
-+{
-+  std::ostringstream os;
-+  os.imbue(std::locale::classic());
-+  os << std::fixed << std::setprecision(8) << value;
-+  return os.str().c_str();
-+}
-+
-+}
-+
- class OdsGeneratorPrivate : public OdfGenerator
- {
- public:
-@@ -968,10 +983,10 @@ void OdsGenerator::openSheetCell(const 
librevenge::RVNGPropertyList )
-   // we need the maximum precision here, 
so we must avoid getStr() when possible
-   librevenge::RVNGString value;
-   if 
(propList["librevenge:value"]->getUnit()==librevenge::RVNG_GENERIC)
--  value.sprintf("%.8f", 
propList["librevenge:value"]->getDouble());
-+  value = 
makePreciseStr(propList["librevenge:value"]->getDouble());
-   else if 
(propList["librevenge:value"]->getUnit()==librevenge::RVNG_PERCENT)
-   {
--  value.sprintf("%.8f", 
propList["librevenge:value"]->getDouble()*100.);
-+  value = 
makePreciseStr(propList["librevenge:value"]->getDouble()*100.);
- 

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - download.lst external/libodfgen solenv/flatpak-manifest.in

2021-11-08 Thread David Tardon (via logerrit)
 download.lst   
  |6 -
 
external/libodfgen/0001-tdf-101077-make-double-string-conversion-locale-agno.patch.1
 |   58 --
 external/libodfgen/ExternalProject_libodfgen.mk
  |4 
 external/libodfgen/Library_odfgen.mk   
  |3 
 external/libodfgen/UnpackedTarball_libodfgen.mk
  |8 -
 external/libodfgen/c++11.patch 
  |   44 ---
 external/libodfgen/libodfgen-bundled-soname.patch.0
  |5 
 solenv/flatpak-manifest.in 
  |6 -
 8 files changed, 13 insertions(+), 121 deletions(-)

New commits:
commit 928d07ce11d58706ca4d3bd9d1311506b12faaf3
Author: David Tardon 
AuthorDate: Sun Jan 17 16:27:55 2021 +0100
Commit: Michael Stahl 
CommitDate: Mon Nov 8 21:35:28 2021 +0100

upload libodfgen 0.1.8

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109840
Tested-by: Jenkins
Reviewed-by: David Tardon 
(cherry picked from commit f341a9da2eb63ea40ccc5a17d7c9dc557682469f)

Change-Id: Ibc59469b74d54a2b307ea708ea5c4a752532f0b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124879
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/download.lst b/download.lst
index f85f8089e958..481559e229a3 100644
--- a/download.lst
+++ b/download.lst
@@ -185,9 +185,9 @@ export NEON_SHA256SUM := 
db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d
 export NEON_TARBALL := neon-0.30.2.tar.gz
 export NSS_SHA256SUM := 
ec6032d78663c6ef90b4b83eb552dedf721d2bce208cec3bf527b8f637db7e45
 export NSS_TARBALL := nss-3.55-with-nspr-4.27.tar.gz
-export ODFGEN_SHA256SUM := 
2c7b21892f84a4c67546f84611eccdad6259875c971e98ddb027da66ea0ac9c2
-export ODFGEN_VERSION_MICRO := 6
-export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
+export ODFGEN_SHA256SUM := 
55200027fd46623b9b38d275e7452d1b0ff8aeddcad6f9ae6dc25f610625
+export ODFGEN_VERSION_MICRO := 8
+export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.xz
 export ODFVALIDATOR_SHA256SUM := 
984f2a479df79e27e7b01a5815ac53ae64e07746b882262d8a64566494515504
 export ODFVALIDATOR_JAR := 
odfvalidator-1.2.0-incubating-SNAPSHOT-jar-with-dependencies-971c54fd38a968f5860014b44301872706f9e540.jar
 export OFFICEOTRON_SHA256SUM := 
f2443f27561af52324eee03a1892d9f569adc8db9e7bca55614898bc2a13a770
diff --git 
a/external/libodfgen/0001-tdf-101077-make-double-string-conversion-locale-agno.patch.1
 
b/external/libodfgen/0001-tdf-101077-make-double-string-conversion-locale-agno.patch.1
deleted file mode 100644
index 1fc4e6b9d261..
--- 
a/external/libodfgen/0001-tdf-101077-make-double-string-conversion-locale-agno.patch.1
+++ /dev/null
@@ -1,58 +0,0 @@
-From 68e0c8e4c834df57bc9a0e8da72151f69ff5e7a6 Mon Sep 17 00:00:00 2001
-From: David Tardon 
-Date: Fri, 12 Aug 2016 12:50:39 +0200
-Subject: [PATCH] tdf#101077 make double->string conversion locale-agnostic
-

- src/OdsGenerator.cxx | 19 +--
- 1 file changed, 17 insertions(+), 2 deletions(-)
-
-diff --git a/src/OdsGenerator.cxx b/src/OdsGenerator.cxx
-index 52e135e..8cb7203 100644
 a/src/OdsGenerator.cxx
-+++ b/src/OdsGenerator.cxx
-@@ -26,6 +26,8 @@
- 
- #include 
- 
-+#include 
-+#include 
- #include 
- #include 
- #include 
-@@ -46,6 +48,19 @@
- #include "OdcGenerator.hxx"
- #include "OdfGenerator.hxx"
- 
-+namespace
-+{
-+
-+librevenge::RVNGString makePreciseStr(const double value)
-+{
-+  std::ostringstream os;
-+  os.imbue(std::locale::classic());
-+  os << std::fixed << std::setprecision(8) << value;
-+  return os.str().c_str();
-+}
-+
-+}
-+
- class OdsGeneratorPrivate : public OdfGenerator
- {
- public:
-@@ -968,10 +983,10 @@ void OdsGenerator::openSheetCell(const 
librevenge::RVNGPropertyList )
-   // we need the maximum precision here, 
so we must avoid getStr() when possible
-   librevenge::RVNGString value;
-   if 
(propList["librevenge:value"]->getUnit()==librevenge::RVNG_GENERIC)
--  value.sprintf("%.8f", 
propList["librevenge:value"]->getDouble());
-+  value = 
makePreciseStr(propList["librevenge:value"]->getDouble());
-   else if 
(propList["librevenge:value"]->getUnit()==librevenge::RVNG_PERCENT)
-   {
--  value.sprintf("%.8f", 
propList["librevenge:value"]->getDouble(

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - configure.ac download.lst external/libmwaw solenv/flatpak-manifest.in

2021-11-08 Thread David Tardon (via logerrit)
 configure.ac |2 +-
 download.lst |4 ++--
 external/libmwaw/Library_mwaw.mk |4 
 solenv/flatpak-manifest.in   |6 +++---
 4 files changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 71c36bcb7fb64c4b0d542444f63ef174884a075b
Author: David Tardon 
AuthorDate: Sat Apr 18 13:54:18 2020 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 8 20:18:48 2021 +0100

upload libmwaw 0.3.16

Change-Id: Idc7ed6bbcd3298138fb92c81ddf7dd6278d201dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92472
Tested-by: Jenkins
Reviewed-by: David Tardon 
(cherry picked from commit 56c638c0ebb21711b02d1ff235a3ffd3f232)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124875
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/configure.ac b/configure.ac
index 31f1868e47d9..a5ff058240e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7908,7 +7908,7 @@ libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.1])
 libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.1])
 
 libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.1])
-libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.15])
+libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.16])
 
 libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.1])
 libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.8])
diff --git a/download.lst b/download.lst
index c0cf41682685..0dcb91c97f77 100644
--- a/download.lst
+++ b/download.lst
@@ -172,8 +172,8 @@ export MDNSRESPONDER_SHA256SUM := 
e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e39
 export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
 export MSPUB_SHA256SUM := 
ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba
 export MSPUB_TARBALL := libmspub-0.1.4.tar.xz
-export MWAW_SHA256SUM := 
0440bb09f05e3419423d8dfa36ee847056ebfd837f9cbc091fdb5b057daab0b1
-export MWAW_VERSION_MICRO := 15
+export MWAW_SHA256SUM := 
0c639edba5297bde5575193bf5b5f2f469956beaff5c0206d91ce9df6bde1868
+export MWAW_VERSION_MICRO := 16
 export MWAW_TARBALL := libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.xz
 export MYSQL_CONNECTOR_CPP_SHA256SUM := 
a25f14dad39e93a2f9cdf09166ee53981f7212dce829e4208e07a522963a8585
 export MYSQL_CONNECTOR_CPP_TARBALL := 
7239a4430efd4d0189c4f24df67f08e5-mysql-connector-c++-1.1.4.tar.gz
diff --git a/external/libmwaw/Library_mwaw.mk b/external/libmwaw/Library_mwaw.mk
index 4c9a8b43c56f..2e7d1e2246fa 100644
--- a/external/libmwaw/Library_mwaw.mk
+++ b/external/libmwaw/Library_mwaw.mk
@@ -119,6 +119,7 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,mwaw,\
UnpackedTarball/libmwaw/src/lib/MWAWSpreadsheetDecoder \
UnpackedTarball/libmwaw/src/lib/MWAWSpreadsheetEncoder \
UnpackedTarball/libmwaw/src/lib/MWAWSpreadsheetListener \
+   UnpackedTarball/libmwaw/src/lib/MWAWStream \
UnpackedTarball/libmwaw/src/lib/MWAWStringStream \
UnpackedTarball/libmwaw/src/lib/MWAWSubDocument \
UnpackedTarball/libmwaw/src/lib/MWAWTable \
@@ -172,10 +173,13 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,mwaw,\
UnpackedTarball/libmwaw/src/lib/PowerPoint7Text \
UnpackedTarball/libmwaw/src/lib/RagTime5Chart \
UnpackedTarball/libmwaw/src/lib/RagTime5ClusterManager \
+   UnpackedTarball/libmwaw/src/lib/RagTime5Document \
+   UnpackedTarball/libmwaw/src/lib/RagTime5Formula \
UnpackedTarball/libmwaw/src/lib/RagTime5Graph \
UnpackedTarball/libmwaw/src/lib/RagTime5Layout \
UnpackedTarball/libmwaw/src/lib/RagTime5Parser \
UnpackedTarball/libmwaw/src/lib/RagTime5Pipeline \
+   UnpackedTarball/libmwaw/src/lib/RagTime5SSParser \
UnpackedTarball/libmwaw/src/lib/RagTime5Spreadsheet \
UnpackedTarball/libmwaw/src/lib/RagTime5StructManager \
UnpackedTarball/libmwaw/src/lib/RagTime5StyleManager \
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index e0bc79e80a38..fca238659291 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -297,10 +297,10 @@
 "dest-filename": "external/tarballs/libmspub-0.1.4.tar.xz"
 },
 {
-"url": 
"https://dev-www.libreoffice.org/src/libmwaw-0.3.15.tar.xz;,
-"sha256": 
"0440bb09f05e3419423d8dfa36ee847056ebfd837f9cbc091fdb5b057daab0b1",
+"url": 
"https://dev-www.libreoffice.org/src/libmwaw-0.3.16.tar.xz;,
+"sha256": 
"0c639edba5297bde5575193bf5b5f2f469956beaff5c0206d91ce9df6bde1868",
 "type": "file",
-"dest-filename": "external/tarballs/libmwaw-0.3.15.tar.xz"
+"dest-filename": "external/tarballs/libmwaw-0.3.16.tar.xz"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/libodfgen-0.1.6.tar.bz2;,


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - configure.ac download.lst external/libmwaw solenv/flatpak-manifest.in writerperfect/qa

2021-11-08 Thread David Tardon (via logerrit)
 configure.ac|2 
 download.lst|4 -
 external/libmwaw/0001-ssize_t-is-not-std-type.patch.1   |   27 
--
 external/libmwaw/Library_mwaw.mk|1 
 external/libmwaw/UnpackedTarball_libmwaw.mk |4 -
 external/libmwaw/libmwaw-bundled-soname.patch.0 |6 +-
 solenv/flatpak-manifest.in  |6 +-
 writerperfect/qa/unit/WpftDrawFilterTest.cxx|2 
 writerperfect/qa/unit/data/draw/libmwaw/pass/CorelPainter_10|binary
 writerperfect/qa/unit/data/draw/libmwaw/pass/CorelPainter_3_win.rif |binary
 10 files changed, 12 insertions(+), 40 deletions(-)

New commits:
commit 4a9013dacf084b6f6cc147956de7bd620840e4d8
Author: David Tardon 
AuthorDate: Thu Apr 18 20:04:51 2019 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 8 19:13:13 2021 +0100

upload libmwaw 0.3.15

Change-Id: I496204ead6c495c4fee2cee18a5b9d0fd22eb8c0
Reviewed-on: https://gerrit.libreoffice.org/70951
Tested-by: Jenkins
Reviewed-by: David Tardon 
(cherry picked from commit d077b19a3f617f5ef3d65fc20a136a9107c47199)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124874
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/configure.ac b/configure.ac
index da7e24c30b47..31f1868e47d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7908,7 +7908,7 @@ libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.1])
 libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.1])
 
 libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.1])
-libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.14])
+libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.15])
 
 libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.1])
 libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.8])
diff --git a/download.lst b/download.lst
index 64c45aaadbd0..c0cf41682685 100644
--- a/download.lst
+++ b/download.lst
@@ -172,8 +172,8 @@ export MDNSRESPONDER_SHA256SUM := 
e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e39
 export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
 export MSPUB_SHA256SUM := 
ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba
 export MSPUB_TARBALL := libmspub-0.1.4.tar.xz
-export MWAW_SHA256SUM := 
aca8bf1ce55ed83adbea82c70d4c8bebe8139f334b3481bf5a6e407f91f33ce9
-export MWAW_VERSION_MICRO := 14
+export MWAW_SHA256SUM := 
0440bb09f05e3419423d8dfa36ee847056ebfd837f9cbc091fdb5b057daab0b1
+export MWAW_VERSION_MICRO := 15
 export MWAW_TARBALL := libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.xz
 export MYSQL_CONNECTOR_CPP_SHA256SUM := 
a25f14dad39e93a2f9cdf09166ee53981f7212dce829e4208e07a522963a8585
 export MYSQL_CONNECTOR_CPP_TARBALL := 
7239a4430efd4d0189c4f24df67f08e5-mysql-connector-c++-1.1.4.tar.gz
diff --git a/external/libmwaw/0001-ssize_t-is-not-std-type.patch.1 
b/external/libmwaw/0001-ssize_t-is-not-std-type.patch.1
deleted file mode 100644
index e33f2a19d560..
--- a/external/libmwaw/0001-ssize_t-is-not-std-type.patch.1
+++ /dev/null
@@ -1,27 +0,0 @@
-From 4458a5e93736a324251a356362f0e80e7c42d5be Mon Sep 17 00:00:00 2001
-From: David Tardon 
-Date: Wed, 25 Apr 2018 12:53:37 +0200
-Subject: [PATCH] ssize_t is not std type
-

- src/lib/WriterPlsParser.cxx | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/lib/WriterPlsParser.cxx b/src/lib/WriterPlsParser.cxx
-index 00dc969b..33b1fa49 100644
 a/src/lib/WriterPlsParser.cxx
-+++ b/src/lib/WriterPlsParser.cxx
-@@ -316,8 +316,8 @@ bool WindowsInfo::getColumnLimitsFor(int line, 
std::vector )
- if (m_columns[i].m_firstLine == line+2) {
-   numCols=m_columns[i].m_numCol;
-   firstColumn = i;
--  if (numCols > ssize_t(numColumns - firstColumn))
--numCols = int(ssize_t(numColumns - firstColumn));
-+  if (numCols > int(unsigned(numColumns - firstColumn)))
-+numCols = int(unsigned(numColumns - firstColumn));
-   if (numCols <= 1 || m_columns[i].m_col != 1) return false;
-   break;
- }
--- 
-2.14.3
-
diff --git a/external/libmwaw/Library_mwaw.mk b/external/libmwaw/Library_mwaw.mk
index 0b28836cdb80..4c9a8b43c56f 100644
--- a/external/libmwaw/Library_mwaw.mk
+++ b/external/libmwaw/Library_mwaw.mk
@@ -58,6 +58,7 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,mwaw,\
UnpackedTarball/libmwaw/src/lib/ClarisWksStyleManager \
UnpackedTarball/libmwaw/src/lib/ClarisWksTable \
UnpackedTarball/libmwaw/src/lib/ClarisWksText \
+   UnpackedTarball/libmwaw/src/lib/CorelPainterParser \
UnpackedTarball/libmwaw/src/lib/CricketDrawParser \
UnpackedTarball/libmwaw/src/lib/DocMkrParser \
UnpackedTarball/libmwaw/src/lib/DocMkrText \
diff --git a/external/libmwaw/UnpackedTarball_libmwaw.mk 
b/external/libmwaw/UnpackedTarbal

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - configure.ac download.lst external/libmwaw solenv/flatpak-manifest.in

2021-11-08 Thread David Tardon (via logerrit)
 configure.ac |2 +-
 download.lst |4 ++--
 external/libmwaw/Library_mwaw.mk |4 
 solenv/flatpak-manifest.in   |6 +++---
 4 files changed, 10 insertions(+), 6 deletions(-)

New commits:
commit fde5f09c1eb4b69d7756c2ebfa65a4dbb9610996
Author: David Tardon 
AuthorDate: Sat Apr 18 13:54:18 2020 +0200
Commit: Michael Stahl 
CommitDate: Mon Nov 8 19:12:01 2021 +0100

upload libmwaw 0.3.16

Change-Id: Idc7ed6bbcd3298138fb92c81ddf7dd6278d201dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92472
Tested-by: Jenkins
Reviewed-by: David Tardon 
(cherry picked from commit 56c638c0ebb21711b02d1ff235a3ffd3f232)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124873
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/configure.ac b/configure.ac
index a8056fdeaa6f..91f129ef76a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8390,7 +8390,7 @@ libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.1])
 libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.1])
 
 libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.1])
-libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.15])
+libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.16])
 
 libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.1])
 libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.8])
diff --git a/download.lst b/download.lst
index 25c5083ec2f1..f85f8089e958 100644
--- a/download.lst
+++ b/download.lst
@@ -176,8 +176,8 @@ export MDNSRESPONDER_SHA256SUM := 
e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e39
 export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
 export MSPUB_SHA256SUM := 
ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba
 export MSPUB_TARBALL := libmspub-0.1.4.tar.xz
-export MWAW_SHA256SUM := 
0440bb09f05e3419423d8dfa36ee847056ebfd837f9cbc091fdb5b057daab0b1
-export MWAW_VERSION_MICRO := 15
+export MWAW_SHA256SUM := 
0c639edba5297bde5575193bf5b5f2f469956beaff5c0206d91ce9df6bde1868
+export MWAW_VERSION_MICRO := 16
 export MWAW_TARBALL := libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.xz
 export MYTHES_SHA256SUM := 
1e81f395d8c851c3e4e75b568e20fa2fa549354e75ab397f9de4b0e0790a305f
 export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
diff --git a/external/libmwaw/Library_mwaw.mk b/external/libmwaw/Library_mwaw.mk
index fc874fcb5e45..880a70861e24 100644
--- a/external/libmwaw/Library_mwaw.mk
+++ b/external/libmwaw/Library_mwaw.mk
@@ -120,6 +120,7 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,mwaw,\
UnpackedTarball/libmwaw/src/lib/MWAWSpreadsheetDecoder \
UnpackedTarball/libmwaw/src/lib/MWAWSpreadsheetEncoder \
UnpackedTarball/libmwaw/src/lib/MWAWSpreadsheetListener \
+   UnpackedTarball/libmwaw/src/lib/MWAWStream \
UnpackedTarball/libmwaw/src/lib/MWAWStringStream \
UnpackedTarball/libmwaw/src/lib/MWAWSubDocument \
UnpackedTarball/libmwaw/src/lib/MWAWTable \
@@ -173,10 +174,13 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,mwaw,\
UnpackedTarball/libmwaw/src/lib/PowerPoint7Text \
UnpackedTarball/libmwaw/src/lib/RagTime5Chart \
UnpackedTarball/libmwaw/src/lib/RagTime5ClusterManager \
+   UnpackedTarball/libmwaw/src/lib/RagTime5Document \
+   UnpackedTarball/libmwaw/src/lib/RagTime5Formula \
UnpackedTarball/libmwaw/src/lib/RagTime5Graph \
UnpackedTarball/libmwaw/src/lib/RagTime5Layout \
UnpackedTarball/libmwaw/src/lib/RagTime5Parser \
UnpackedTarball/libmwaw/src/lib/RagTime5Pipeline \
+   UnpackedTarball/libmwaw/src/lib/RagTime5SSParser \
UnpackedTarball/libmwaw/src/lib/RagTime5Spreadsheet \
UnpackedTarball/libmwaw/src/lib/RagTime5StructManager \
UnpackedTarball/libmwaw/src/lib/RagTime5StyleManager \
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index c5f7d8f4ae16..547d680a7a42 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -267,10 +267,10 @@
 "dest-filename": "external/tarballs/libmspub-0.1.4.tar.xz"
 },
 {
-"url": 
"https://dev-www.libreoffice.org/src/libmwaw-0.3.15.tar.xz;,
-"sha256": 
"0440bb09f05e3419423d8dfa36ee847056ebfd837f9cbc091fdb5b057daab0b1",
+"url": 
"https://dev-www.libreoffice.org/src/libmwaw-0.3.16.tar.xz;,
+"sha256": 
"0c639edba5297bde5575193bf5b5f2f469956beaff5c0206d91ce9df6bde1868",
 "type": "file",
-"dest-filename": "external/tarballs/libmwaw-0.3.15.tar.xz"
+"dest-filename": "external/tarballs/libmwaw-0.3.16.tar.xz"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/libodfgen-0.1.6.tar.bz2;,


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - 2 commits - download.lst external/libabw external/libcdr solenv/flatpak-manifest.in

2021-11-05 Thread David Tardon (via logerrit)
 download.lst|8 ++--
 external/libabw/UnpackedTarball_libabw.mk   |4 --
 external/libabw/libabw-msvc.patch.1 |   46 
 external/libcdr/UnpackedTarball_libcdr.mk   |4 ++
 external/libcdr/libcdr-visibility-win.patch |   11 ++
 solenv/flatpak-manifest.in  |   12 +++
 6 files changed, 25 insertions(+), 60 deletions(-)

New commits:
commit 8268439d9ad9d167e4cc4cdbe74e39644a32b7c4
Author: David Tardon 
AuthorDate: Sat Dec 29 14:53:07 2018 +0100
Commit: Thorsten Behrens 
CommitDate: Sat Nov 6 00:38:58 2021 +0100

upload libcdr 0.1.5

Reviewed-on: https://gerrit.libreoffice.org/65715
Tested-by: Jenkins
Reviewed-by: David Tardon 
(cherry picked from commit a8965ebc1b29ba578fc3e9cd6915e85e807d9fd6)

Change-Id: I01454cc35baf96743bd19e64dd3a7269c58621bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124772
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/download.lst b/download.lst
index fcf9c059a7d2..712ea9d0ba52 100644
--- a/download.lst
+++ b/download.lst
@@ -17,8 +17,8 @@ export BZIP2_TARBALL := 
00b516f4704d4a7cb50a1d97e6e8e15b-bzip2-1.0.6.tar.gz
 export CAIRO_SHA256SUM := 
5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331
 export CAIRO_VERSION_MICRO := 0
 export CAIRO_TARBALL := cairo-1.16.$(CAIRO_VERSION_MICRO).tar.xz
-export CDR_SHA256SUM := 
e7a7e8b00a3df5798110024d7061fe9d1c3330277d2e4fa9213294f966a4a66d
-export CDR_TARBALL := libcdr-0.1.4.tar.xz
+export CDR_SHA256SUM := 
6ace5c499a8be34ad871e825442ce388614ae2d8675c4381756a7319429e3a48
+export CDR_TARBALL := libcdr-0.1.5.tar.xz
 export CLUCENE_SHA256SUM := 
ddfdc433dd8ad31b5c5819cc4404a8d2127472a3b720d3e744e8c51d79732eab
 export CLUCENE_TARBALL := 
48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz
 export LIBCMIS_SHA256SUM := 
6acbdf22ecdbaba37728729b75bfc085ee5a4b49a6024757cfb86ccd3da27b0e
diff --git a/external/libcdr/UnpackedTarball_libcdr.mk 
b/external/libcdr/UnpackedTarball_libcdr.mk
index 4ca54804e6aa..23874f7d01b5 100644
--- a/external/libcdr/UnpackedTarball_libcdr.mk
+++ b/external/libcdr/UnpackedTarball_libcdr.mk
@@ -15,6 +15,10 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libcdr,0))
 
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libcdr))
 
+$(eval $(call gb_UnpackedTarball_add_patches,libcdr, \
+external/libcdr/libcdr-visibility-win.patch \
+))
+
 ifeq ($(COM_IS_CLANG),TRUE)
 ifneq ($(filter -fsanitize=%,$(CC)),)
 $(eval $(call gb_UnpackedTarball_add_patches,libcdr, \
diff --git a/external/libcdr/libcdr-visibility-win.patch 
b/external/libcdr/libcdr-visibility-win.patch
new file mode 100644
index ..7700cfd32f2f
--- /dev/null
+++ b/external/libcdr/libcdr-visibility-win.patch
@@ -0,0 +1,11 @@
+--- configure.dt   2018-12-29 16:23:02.355271146 +0100
 configure  2018-12-29 16:23:21.644060142 +0100
+@@ -19116,6 +19116,8 @@
+ 
+ 
+ if test $platform_win32 = yes; then :
++  HAVE_VISIBILITY_TRUE='#'
++  HAVE_VISIBILITY_FALSE=
+ 
+ else
+ 
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 7233a24bdaa8..7db6021ece3c 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -243,10 +243,10 @@
 "dest-filename": "external/tarballs/libabw-0.1.3.tar.xz"
 },
 {
-"url": 
"https://dev-www.libreoffice.org/src/libcdr-0.1.4.tar.xz;,
-"sha256": 
"e7a7e8b00a3df5798110024d7061fe9d1c3330277d2e4fa9213294f966a4a66d",
+"url": 
"https://dev-www.libreoffice.org/src/libcdr-0.1.5.tar.xz;,
+"sha256": 
"6ace5c499a8be34ad871e825442ce388614ae2d8675c4381756a7319429e3a48",
 "type": "file",
-"dest-filename": "external/tarballs/libcdr-0.1.4.tar.xz"
+"dest-filename": "external/tarballs/libcdr-0.1.5.tar.xz"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/libcmis-0.5.1.tar.gz;,
commit 6cf9a05b42fb59fa5ebb06d792d7e733790bdb5d
Author: David Tardon 
AuthorDate: Sat Aug 17 16:46:47 2019 +0200
Commit: Thorsten Behrens 
CommitDate: Sat Nov 6 00:38:49 2021 +0100

upload libabw 0.1.3

Reviewed-on: https://gerrit.libreoffice.org/77639
Tested-by: Jenkins
Reviewed-by: David Tardon 
(cherry picked from commit 2a733f30cc994ead8cc3d1e64947bba6e8fe3924)

Change-Id: Ibb45a473f49a9ba8f9cf53593dead375ac8a1951
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124771
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/download.lst b/download.lst
index b4f7df8d263c..fcf9c059a7d2 100644
--- a/download.lst
+++ b/download.lst
@@ -1,

[Libreoffice-commits] core.git: Branch 'distro/mimo/mimo-6-0' - 12 commits - download.lst external/lcms2 external/libxml2 external/mdnsresponder external/poppler external/python3 postprocess/CustomTar

2021-10-09 Thread David Tardon (via logerrit)
 download.lst   
|   20 -
 external/lcms2/0001-Added-an-extra-check-to-MLU-bounds.patch.1 
|   25 -
 external/lcms2/0017-Upgrade-Visual-studio-2017-15.8.patch.1
|  172 ++
 external/lcms2/UnpackedTarball_lcms2.mk
|2 
 external/libxml2/libxml2-android.patch 
|   12 
 external/libxml2/libxml2-global-symbols.patch  
|4 
 external/mdnsresponder/UnpackedTarball_mDNSResponder.mk
|5 
 external/mdnsresponder/mDNSResponder_Win32_SOCKET.patch.1  
|   85 
 external/mdnsresponder/mDNSResponder_Win32_buildfix.patch.1
|   16 
 external/poppler/StaticLibrary_poppler.mk  
|6 
 external/poppler/UnpackedTarball_poppler.mk
|   11 
 external/poppler/poppler-c++11.patch.1 
|   31 +
 external/poppler/poppler-config.patch.1
|   12 
 
external/python3/0001-3.6-bpo-17239-Disable-external-entities-in-SAX-parse.patch.1
 |   59 +++
 external/python3/UnpackedTarball_python3.mk
|1 
 postprocess/CustomTarget_signing.mk
|2 
 postprocess/signing/signing.pl 
|3 
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx  
|   38 +-
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx  
|   49 +-
 sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx   
|6 
 sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx 
|4 
 solenv/bin/modules/installer.pm
|2 
 solenv/bin/modules/installer/windows/msp.pm
|2 
 23 files changed, 362 insertions(+), 205 deletions(-)

New commits:
commit 47e55ccd60c6701571dd71891fb092e1c537f89a
Author: David Tardon 
AuthorDate: Thu Mar 29 09:20:19 2018 +0200
Commit: Andras Timar 
CommitDate: Sat Oct 9 23:40:56 2021 +0200

upload openssl 1.0.2o

Change-Id: Ib44570ff53d754d1d568378ef0dac4d4789f2042
Reviewed-on: https://gerrit.libreoffice.org/52051
Tested-by: Jenkins 
Reviewed-by: David Tardon 

diff --git a/download.lst b/download.lst
index e826a49d6647..2a6a43bac53f 100644
--- a/download.lst
+++ b/download.lst
@@ -188,8 +188,8 @@ export OFFICEOTRON_SHA256SUM := 
f2443f27561af52324eee03a1892d9f569adc8db9e7bca55
 export OFFICEOTRON_JAR := 
8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar
 export OPENLDAP_SHA256SUM := 
cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb897cd5626df3824
 export OPENLDAP_TARBALL := openldap-2.4.45.tgz
-export OPENSSL_SHA256SUM := 
8c6ff15ec6b319b50788f42c7abc2890c08ba5a1cdcd3810eb9092deada37b0f
-export OPENSSL_TARBALL := openssl-1.0.2m.tar.gz
+export OPENSSL_SHA256SUM := 
ec3f5c9714ba0fd45cb4e087301eb1336c317e0d20b575a125050470e8089e4d
+export OPENSSL_TARBALL := openssl-1.0.2o.tar.gz
 export ORCUS_SHA256SUM := 
62e76de1fd3101e77118732b860354121b40a87bbb1ebfeb8203477fffac16e9
 export ORCUS_TARBALL := liborcus-0.13.3.tar.gz
 export OWNCLOUD_ANDROID_LIB_SHA256SUM := 
b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb
commit a3a6de809afb4ea2c58b0d8f05819612f421032a
Author: Michael Stahl 
AuthorDate: Wed Feb 20 15:23:11 2019 +0100
Commit: Andras Timar 
CommitDate: Sat Oct 9 23:39:33 2021 +0200

mDNSResponder: upgrade to release 878.200.35

Apple can't afford the costly GPG licenses to sign releases apparently,
but the sha256 matches some OpenWRT and FreshPorts repos...

Fixes CVE-2015-7988.

Removing windows build patches, fixed upstream (except for the last hunk
of the SOCKET patch, but that is in code that is only used on MacOSX).

Reviewed-on: https://gerrit.libreoffice.org/68092
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 3a85c2db176db708c0ff9401c40858eb60e80f1e)
Reviewed-on: https://gerrit.libreoffice.org/68139
Reviewed-by: Thorsten Behrens 

Change-Id: I9fdba5929badb75f995c66da0850d188780e7beb

diff --git a/download.lst b/download.lst
index d8c899a69cc5..e826a49d6647 100644
--- a/download.lst
+++ b/download.lst
@@ -164,8 +164,8 @@ export MARIADB_CONNECTOR_C_SHA256SUM := 
fd2f751dea049c1907735eb236aeace1d811d6a8
 export MARIADB_CONNECTOR_C_TARBALL := 
a233181e03d3c307668b4c722d881661-mariadb_client-2.0.0-src.tar.gz
 export MDDS_SHA256SUM := 
dcb8cd2425567a5a5ec164afea475bce57784bca3e352ad4cbdd3d1a7e08e5a1
 export MDDS_TARBALL := mdds-1.3.1.tar.bz2
-export

[Libreoffice-commits] core.git: configure.ac download.lst external/libmwaw solenv/flatpak-manifest.in writerperfect/qa

2021-08-23 Thread David Tardon (via logerrit)
 configure.ac|2 +-
 download.lst|4 ++--
 external/libmwaw/Library_mwaw.mk|2 ++
 solenv/flatpak-manifest.in  |6 
+++---
 writerperfect/qa/unit/WpftWriterFilterTest.cxx  |2 ++
 writerperfect/qa/unit/data/writer/libmwaw/pass/StudentWritingCenter |binary
 writerperfect/qa/unit/data/writer/libmwaw/pass/WordMaker|binary
 7 files changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 65d717368cb3ada843421700aadc00a1b71598c5
Author: David Tardon 
AuthorDate: Tue Aug 17 20:13:50 2021 +0200
Commit: David Tardon 
CommitDate: Tue Aug 24 07:10:00 2021 +0200

upload libmwaw 0.3.20

Change-Id: Ia73117e06f843bcdd228da018fe3f34af6405653
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120621
Tested-by: Jenkins
Reviewed-by: David Tardon 

diff --git a/configure.ac b/configure.ac
index ac226fd46ace..6be3e031c348 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9335,7 +9335,7 @@ libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.1])
 libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.1])
 
 libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.1])
-libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.19])
+libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.20])
 
 libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.1])
 libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.10])
diff --git a/download.lst b/download.lst
index cfeb4bd27fed..8c3f9a41fd1f 100644
--- a/download.lst
+++ b/download.lst
@@ -184,8 +184,8 @@ export MDNSRESPONDER_SHA256SUM := 
e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e39
 export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
 export MSPUB_SHA256SUM := 
ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba
 export MSPUB_TARBALL := libmspub-0.1.4.tar.xz
-export MWAW_SHA256SUM := 
b272e234eefc828c4bb8344af0f047a62e070f530e9e2fba11b04c8db8eda5af
-export MWAW_VERSION_MICRO := 19
+export MWAW_SHA256SUM := 
14c38b06214f277ccd1450e22e6e32648955018d7695896bc560165748c8cd21
+export MWAW_VERSION_MICRO := 20
 export MWAW_TARBALL := libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.xz
 export MYTHES_SHA256SUM := 
1e81f395d8c851c3e4e75b568e20fa2fa549354e75ab397f9de4b0e0790a305f
 export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
diff --git a/external/libmwaw/Library_mwaw.mk b/external/libmwaw/Library_mwaw.mk
index 6fdcded16190..2f27a6113485 100644
--- a/external/libmwaw/Library_mwaw.mk
+++ b/external/libmwaw/Library_mwaw.mk
@@ -201,11 +201,13 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,mwaw,\
UnpackedTarball/libmwaw/src/lib/RagTimeSpreadsheet \
UnpackedTarball/libmwaw/src/lib/RagTimeStruct \
UnpackedTarball/libmwaw/src/lib/RagTimeText \
+   UnpackedTarball/libmwaw/src/lib/StudentWritingCParser \
UnpackedTarball/libmwaw/src/lib/StyleParser \
UnpackedTarball/libmwaw/src/lib/SuperPaintParser \
UnpackedTarball/libmwaw/src/lib/TeachTxtParser \
UnpackedTarball/libmwaw/src/lib/WingzGraph \
UnpackedTarball/libmwaw/src/lib/WingzParser \
+   UnpackedTarball/libmwaw/src/lib/WordMakerParser \
UnpackedTarball/libmwaw/src/lib/WriteNowEntry \
UnpackedTarball/libmwaw/src/lib/WriteNowParser \
UnpackedTarball/libmwaw/src/lib/WriteNowText \
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index dd2fe0e7c0f6..6f623a7ce3c5 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -306,11 +306,11 @@
 "dest-filename": "libmspub-0.1.4.tar.xz"
 },
 {
-"url": 
"https://dev-www.libreoffice.org/src/libmwaw-0.3.19.tar.xz;,
-"sha256": 
"b272e234eefc828c4bb8344af0f047a62e070f530e9e2fba11b04c8db8eda5af",
+"url": 
"https://dev-www.libreoffice.org/src/libmwaw-0.3.20.tar.xz;,
+"sha256": 
"14c38b06214f277ccd1450e22e6e32648955018d7695896bc560165748c8cd21",
 "type": "file",
 "dest": "external/tarballs",
-"dest-filename": "libmwaw-0.3.19.tar.xz"
+"dest-filename": "libmwaw-0.3.20.tar.xz"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/libodfgen-0.1.8.tar.xz;,
diff --git a/writerperfect/qa/unit/WpftWriterFilterTest.cxx 
b/writerperfect/qa/unit/WpftWriterFilterTest.cxx
index d0a4ae68cdcf..543146169253 100644
--- a/writerperfect/qa/unit/WpftWriterFilterTest.cxx
+++ b/writerperfect/qa/unit/WpftWriterFilterTest.cxx
@@ -44,6 +44,8 @@

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - configure.ac download.lst external/libetonyek solenv/flatpak-manifest.in

2021-08-19 Thread David Tardon (via logerrit)
 configure.ac   
 |2 
 download.lst   
 |4 
 external/libetonyek/0001-add-missing-include-for-std-for_each.patch
 |   33 -
 external/libetonyek/0001-fix-build-with-MSVC.patch.1   
 |   28 
 external/libetonyek/0002-fix-build-with-MSVC.patch.1   
 |   55 
 external/libetonyek/Library_etonyek.mk 
 |1 
 external/libetonyek/UnpackedTarball_libetonyek.mk  
 |4 
 
external/libetonyek/glm-force-dmat3-initialization-needed-from-v0.9.9.0.patch.1 
|   62 --
 solenv/flatpak-manifest.in 
 |6 
 9 files changed, 92 insertions(+), 103 deletions(-)

New commits:
commit eaa73b86648e2c6017ef66868c6ce2fe5302390d
Author: David Tardon 
AuthorDate: Tue May 18 20:18:42 2021 +0200
Commit: Aron Budea 
CommitDate: Fri Aug 20 00:43:36 2021 +0200

upload libetonyek 0.1.10

Change-Id: Iad586802e89b19701a20bebff06b238b617af2a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115769
Tested-by: Jenkins
Reviewed-by: David Tardon 
(cherry picked from commit 5471dc3238e8005fa146cfa0a81c5784ea018e95)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120734
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Aron Budea 

diff --git a/configure.ac b/configure.ac
index 5d991218cef4..6b0e72a5d573 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9115,7 +9115,7 @@ libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 
0.3.1])
 libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.17])
 
 libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.1])
-libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.8])
+libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.10])
 
 libo_CHECK_SYSTEM_MODULE([libfreehand],[FREEHAND],[libfreehand-0.1])
 
diff --git a/download.lst b/download.lst
index 043112285902..a2a08016976e 100644
--- a/download.lst
+++ b/download.lst
@@ -49,8 +49,8 @@ export EPM_SHA256SUM := 
b3fc4c5445de6c9a801504a3ea3efb2d4ea9d5a622c9427e716736e7
 export EPM_TARBALL := 3ade8cfe7e59ca8e65052644fed9fca4-epm-3.7.tar.gz
 export EPUBGEN_SHA256SUM := 
03e084b994cbeffc8c3dd13303b2cb805f44d8f2c3b79f7690d7e3fc7f6215ad
 export EPUBGEN_TARBALL := libepubgen-0.1.1.tar.xz
-export ETONYEK_SHA256SUM := 
e61677e8799ce6e55b25afc11aa5339113f6a49cff031f336e32fa58635b1a4a
-export ETONYEK_VERSION_MICRO := 9
+export ETONYEK_SHA256SUM := 
b430435a6e8487888b761dc848b7981626eb814884963ffe25eb26a139301e9a
+export ETONYEK_VERSION_MICRO := 10
 export ETONYEK_TARBALL := libetonyek-0.1.$(ETONYEK_VERSION_MICRO).tar.xz
 export EXPAT_SHA256SUM := 
2f9b6a580b94577b150a7d5617ad4643a4301a6616ff459307df3e225bcfbf40
 export EXPAT_TARBALL := expat-2.4.1.tar.bz2
diff --git 
a/external/libetonyek/0001-add-missing-include-for-std-for_each.patch 
b/external/libetonyek/0001-add-missing-include-for-std-for_each.patch
deleted file mode 100644
index 09aaba58b7e3..
--- a/external/libetonyek/0001-add-missing-include-for-std-for_each.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 4b4d879a6db69ea05b89fdf99df8cb5d902d16b6 Mon Sep 17 00:00:00 2001
-From: Roland Illig 
-Date: Tue, 19 May 2020 08:43:39 +0200
-Subject: [PATCH] add missing include for std::for_each
-
-On NetBSD 8.0 x86_64, gcc complains:
- NUM3Parser.cpp: In member function 'virtual bool 
libetonyek::NUM3Parser::parseDocument()':
- NUM3Parser.cpp:46:3: error: 'for_each' is not a member of 'std'
-   std::for_each(sheetListRefs.begin(), sheetListRefs.end(), 
std::bind(::parseSheet, this, std::placeholders::_1));
-
-Change-Id: I723ba1bcbd10ed9215ceea8c5b224fdc5242be65
-Reviewed-on: https://gerrit.libreoffice.org/c/libetonyek/+/94450
-Tested-by: Thorsten Behrens 
-Reviewed-by: Thorsten Behrens 

- src/lib/NUM3Parser.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git src/lib/NUM3Parser.cpp src/lib/NUM3Parser.cpp
-index 66fb195..c19b611 100644
 src/lib/NUM3Parser.cpp
-+++ src/lib/NUM3Parser.cpp
-@@ -7,6 +7,7 @@
-  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
-  */
- 
-+#include 
- #include 
- 
- #include "NUM3Parser.h"
--- 
-2.28.0
-
diff --git a/external/libetonyek/0001-fix-build-with-MSVC.patch.1 
b/external/libetonyek/0001-fix-build-with-MSVC.patch.1
new file mode 100644
index ..2a72844dc79a
--- /dev/null
+++ b/external/libetonyek/0001-fix-build-with-MSVC.patch.1
@@ -0,0 +1,28 @@
+From 1aa22c746b41a688296f4daf4fc35710d2045a33 Mon Sep 17 00:00:00 2001
+From: David Tardon 
+Date: Wed, 19 May 2021 19:43:43 +0200
+Subject: [PATCH] fix build with MSVC
+
+error C2664: 'libetonyek::IWORKFormula::IWORKFormula(const 
boost::optional &)': cannot convert argument 1 from 'int' to 
'const boost::optional &'
+
+Change-Id: Iaa3de2d0ef8f960495e5d5afebb75c5063955177
+---
+ src/lib/IWAParse

David Childers license statement

2021-06-02 Thread David Childers
   All of my past & future contributions to LibreOffice may be
   licensed under the MPLv2/LGPLv3+ dual license.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: configure.ac download.lst external/libetonyek solenv/flatpak-manifest.in

2021-05-20 Thread David Tardon (via logerrit)
 configure.ac   
 |2 
 download.lst   
 |4 
 external/libetonyek/0001-add-missing-include-for-std-for_each.patch
 |   33 -
 external/libetonyek/0001-fix-build-with-MSVC.patch.1   
 |   28 
 external/libetonyek/0002-fix-build-with-MSVC.patch.1   
 |   55 
 external/libetonyek/Library_etonyek.mk 
 |1 
 external/libetonyek/UnpackedTarball_libetonyek.mk  
 |4 
 
external/libetonyek/glm-force-dmat3-initialization-needed-from-v0.9.9.0.patch.1 
|   62 --
 solenv/flatpak-manifest.in 
 |6 
 9 files changed, 92 insertions(+), 103 deletions(-)

New commits:
commit 5471dc3238e8005fa146cfa0a81c5784ea018e95
Author: David Tardon 
AuthorDate: Tue May 18 20:18:42 2021 +0200
Commit: David Tardon 
CommitDate: Thu May 20 08:46:37 2021 +0200

upload libetonyek 0.1.10

Change-Id: Iad586802e89b19701a20bebff06b238b617af2a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115769
Tested-by: Jenkins
Reviewed-by: David Tardon 

diff --git a/configure.ac b/configure.ac
index 3d14c5e4258c..faa4d810e8da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9237,7 +9237,7 @@ libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 
0.3.1])
 libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.19])
 
 libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.1])
-libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.8])
+libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.10])
 
 libo_CHECK_SYSTEM_MODULE([libfreehand],[FREEHAND],[libfreehand-0.1])
 
diff --git a/download.lst b/download.lst
index e43c9cfe86e8..0da12b5b88cf 100644
--- a/download.lst
+++ b/download.lst
@@ -47,8 +47,8 @@ export EPM_SHA256SUM := 
b3fc4c5445de6c9a801504a3ea3efb2d4ea9d5a622c9427e716736e7
 export EPM_TARBALL := 3ade8cfe7e59ca8e65052644fed9fca4-epm-3.7.tar.gz
 export EPUBGEN_SHA256SUM := 
03e084b994cbeffc8c3dd13303b2cb805f44d8f2c3b79f7690d7e3fc7f6215ad
 export EPUBGEN_TARBALL := libepubgen-0.1.1.tar.xz
-export ETONYEK_SHA256SUM := 
e61677e8799ce6e55b25afc11aa5339113f6a49cff031f336e32fa58635b1a4a
-export ETONYEK_VERSION_MICRO := 9
+export ETONYEK_SHA256SUM := 
b430435a6e8487888b761dc848b7981626eb814884963ffe25eb26a139301e9a
+export ETONYEK_VERSION_MICRO := 10
 export ETONYEK_TARBALL := libetonyek-0.1.$(ETONYEK_VERSION_MICRO).tar.xz
 export EXPAT_SHA256SUM := 
9a130948b05a82da34e4171d5f5ae5d321d9630277af02c8fa51e431f6475102
 export EXPAT_TARBALL := expat-2.2.8.tar.bz2
diff --git 
a/external/libetonyek/0001-add-missing-include-for-std-for_each.patch 
b/external/libetonyek/0001-add-missing-include-for-std-for_each.patch
deleted file mode 100644
index 09aaba58b7e3..
--- a/external/libetonyek/0001-add-missing-include-for-std-for_each.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 4b4d879a6db69ea05b89fdf99df8cb5d902d16b6 Mon Sep 17 00:00:00 2001
-From: Roland Illig 
-Date: Tue, 19 May 2020 08:43:39 +0200
-Subject: [PATCH] add missing include for std::for_each
-
-On NetBSD 8.0 x86_64, gcc complains:
- NUM3Parser.cpp: In member function 'virtual bool 
libetonyek::NUM3Parser::parseDocument()':
- NUM3Parser.cpp:46:3: error: 'for_each' is not a member of 'std'
-   std::for_each(sheetListRefs.begin(), sheetListRefs.end(), 
std::bind(::parseSheet, this, std::placeholders::_1));
-
-Change-Id: I723ba1bcbd10ed9215ceea8c5b224fdc5242be65
-Reviewed-on: https://gerrit.libreoffice.org/c/libetonyek/+/94450
-Tested-by: Thorsten Behrens 
-Reviewed-by: Thorsten Behrens 

- src/lib/NUM3Parser.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git src/lib/NUM3Parser.cpp src/lib/NUM3Parser.cpp
-index 66fb195..c19b611 100644
 src/lib/NUM3Parser.cpp
-+++ src/lib/NUM3Parser.cpp
-@@ -7,6 +7,7 @@
-  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
-  */
- 
-+#include 
- #include 
- 
- #include "NUM3Parser.h"
--- 
-2.28.0
-
diff --git a/external/libetonyek/0001-fix-build-with-MSVC.patch.1 
b/external/libetonyek/0001-fix-build-with-MSVC.patch.1
new file mode 100644
index ..2a72844dc79a
--- /dev/null
+++ b/external/libetonyek/0001-fix-build-with-MSVC.patch.1
@@ -0,0 +1,28 @@
+From 1aa22c746b41a688296f4daf4fc35710d2045a33 Mon Sep 17 00:00:00 2001
+From: David Tardon 
+Date: Wed, 19 May 2021 19:43:43 +0200
+Subject: [PATCH] fix build with MSVC
+
+error C2664: 'libetonyek::IWORKFormula::IWORKFormula(const 
boost::optional &)': cannot convert argument 1 from 'int' to 
'const boost::optional &'
+
+Change-Id: Iaa3de2d0ef8f960495e5d5afebb75c5063955177
+---
+ src/lib/IWAParser.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lib/IWAParser.cpp b/src/lib/IWAParser.cpp
+index 7fd95c3..a2bd292 100644
+--- a/src/lib/IWAParser.cpp
 b/src/lib/IWAP

[Libreoffice-commits] core.git: configure.ac download.lst external/libmwaw solenv/flatpak-manifest.in

2021-05-10 Thread David Tardon (via logerrit)
 configure.ac|2 -
 download.lst|4 +--
 external/libmwaw/0001-drop-unneeded-include.patch.1 |   25 
 external/libmwaw/Library_mwaw.mk|2 +
 external/libmwaw/UnpackedTarball_libmwaw.mk |4 ---
 solenv/flatpak-manifest.in  |6 ++--
 6 files changed, 8 insertions(+), 35 deletions(-)

New commits:
commit 158737c2aa29904b726829399f9f5b24345dd013
Author: David Tardon 
AuthorDate: Mon May 10 19:16:20 2021 +0200
Commit: David Tardon 
CommitDate: Mon May 10 20:19:45 2021 +0200

upload libmwaw 0.3.19

Change-Id: Ibb26390e6cc13c925f499bf95cfc6177d8c9b735
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115355
Tested-by: Jenkins
Reviewed-by: David Tardon 

diff --git a/configure.ac b/configure.ac
index f40314d09853..34e8d0535d65 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9235,7 +9235,7 @@ libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.1])
 libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.1])
 
 libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.1])
-libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.18])
+libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.19])
 
 libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.1])
 libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.8])
diff --git a/download.lst b/download.lst
index 974b54cb67ed..df523338840d 100644
--- a/download.lst
+++ b/download.lst
@@ -184,8 +184,8 @@ export MDNSRESPONDER_SHA256SUM := 
e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e39
 export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
 export MSPUB_SHA256SUM := 
ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba
 export MSPUB_TARBALL := libmspub-0.1.4.tar.xz
-export MWAW_SHA256SUM := 
fc5d051680f8000be64ffebc0b0c58716b1c9bf06003ec399387b109d1ed1e0f
-export MWAW_VERSION_MICRO := 18
+export MWAW_SHA256SUM := 
b272e234eefc828c4bb8344af0f047a62e070f530e9e2fba11b04c8db8eda5af
+export MWAW_VERSION_MICRO := 19
 export MWAW_TARBALL := libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.xz
 export MYTHES_SHA256SUM := 
1e81f395d8c851c3e4e75b568e20fa2fa549354e75ab397f9de4b0e0790a305f
 export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
diff --git a/external/libmwaw/0001-drop-unneeded-include.patch.1 
b/external/libmwaw/0001-drop-unneeded-include.patch.1
deleted file mode 100644
index 505f38daf80a..
--- a/external/libmwaw/0001-drop-unneeded-include.patch.1
+++ /dev/null
@@ -1,25 +0,0 @@
-From db0450c5bacdf0f3970a8838ff989b7e5390 Mon Sep 17 00:00:00 2001
-From: David Tardon 
-Date: Thu, 8 Apr 2021 23:07:13 +0200
-Subject: [PATCH] drop unneeded include
-

- src/lib/Canvas5StyleManager.cxx | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/src/lib/Canvas5StyleManager.cxx b/src/lib/Canvas5StyleManager.cxx
-index 7cb368f0..f6b3338a 100644
 a/src/lib/Canvas5StyleManager.cxx
-+++ b/src/lib/Canvas5StyleManager.cxx
-@@ -31,8 +31,6 @@
- * instead of those above.
- */
- 
--#include 
--
- #include 
- #include 
- #include 
--- 
-2.30.2
-
diff --git a/external/libmwaw/Library_mwaw.mk b/external/libmwaw/Library_mwaw.mk
index d92a1b729b81..6fdcded16190 100644
--- a/external/libmwaw/Library_mwaw.mk
+++ b/external/libmwaw/Library_mwaw.mk
@@ -41,7 +41,9 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,mwaw,\
UnpackedTarball/libmwaw/src/lib/BeagleWksSSParser \
UnpackedTarball/libmwaw/src/lib/BeagleWksStructManager \
UnpackedTarball/libmwaw/src/lib/BeagleWksText \
+   UnpackedTarball/libmwaw/src/lib/Canvas5BMParser \
UnpackedTarball/libmwaw/src/lib/Canvas5Graph \
+   UnpackedTarball/libmwaw/src/lib/Canvas5Image \
UnpackedTarball/libmwaw/src/lib/Canvas5Parser \
UnpackedTarball/libmwaw/src/lib/Canvas5Structure \
UnpackedTarball/libmwaw/src/lib/Canvas5StyleManager \
diff --git a/external/libmwaw/UnpackedTarball_libmwaw.mk 
b/external/libmwaw/UnpackedTarball_libmwaw.mk
index e15768e91623..935cbc1eb1c3 100644
--- a/external/libmwaw/UnpackedTarball_libmwaw.mk
+++ b/external/libmwaw/UnpackedTarball_libmwaw.mk
@@ -15,10 +15,6 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libmwaw,0))
 
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libmwaw))
 
-$(eval $(call gb_UnpackedTarball_add_patches,libmwaw, \
-   external/libmwaw/0001-drop-unneeded-include.patch.1 \
-))
-
 ifneq ($(OS),MACOSX)
 ifneq ($(OS),WNT)
 $(eval $(call gb_UnpackedTarball_add_patches,libmwaw, \
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 734e72c5dfc6..032806239230 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -273,10 +273,10 @@
 "dest-filename": "external/tarballs/libmspub-0.1.4.tar.xz"
 },
 {
-"url": 
"https://dev-www.lib

[Libreoffice-commits] core.git: configure.ac download.lst external/libmwaw solenv/flatpak-manifest.in

2021-04-08 Thread David Tardon (via logerrit)
 configure.ac|2 -
 download.lst|4 +--
 external/libmwaw/0001-drop-unneeded-include.patch.1 |   25 
 external/libmwaw/Library_mwaw.mk|4 +++
 external/libmwaw/UnpackedTarball_libmwaw.mk |4 +++
 solenv/flatpak-manifest.in  |6 ++--
 6 files changed, 39 insertions(+), 6 deletions(-)

New commits:
commit 5e27230f45c7ecf32a98076302179d96f4f65219
Author: David Tardon 
AuthorDate: Thu Apr 8 20:32:19 2021 +0200
Commit: David Tardon 
CommitDate: Fri Apr 9 07:58:09 2021 +0200

upload libmwaw 0.3.18

Change-Id: I6ffa01f092455f79bb3690875e1b286ae2298832
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113819
Tested-by: Jenkins
Reviewed-by: David Tardon 

diff --git a/configure.ac b/configure.ac
index 3df488a662c2..3a03dd38290f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9116,7 +9116,7 @@ libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.1])
 libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.1])
 
 libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.1])
-libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.17])
+libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.18])
 
 libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.1])
 libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.8])
diff --git a/download.lst b/download.lst
index 3c3462552d74..45fdc3a0e5ff 100644
--- a/download.lst
+++ b/download.lst
@@ -186,8 +186,8 @@ export MDNSRESPONDER_SHA256SUM := 
e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e39
 export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
 export MSPUB_SHA256SUM := 
ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba
 export MSPUB_TARBALL := libmspub-0.1.4.tar.xz
-export MWAW_SHA256SUM := 
8e1537eb1de1b4714f4bf0a20478f342c5d71a65bf99307a694b1e9e30bb911c
-export MWAW_VERSION_MICRO := 17
+export MWAW_SHA256SUM := 
fc5d051680f8000be64ffebc0b0c58716b1c9bf06003ec399387b109d1ed1e0f
+export MWAW_VERSION_MICRO := 18
 export MWAW_TARBALL := libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.xz
 export MYTHES_SHA256SUM := 
1e81f395d8c851c3e4e75b568e20fa2fa549354e75ab397f9de4b0e0790a305f
 export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
diff --git a/external/libmwaw/0001-drop-unneeded-include.patch.1 
b/external/libmwaw/0001-drop-unneeded-include.patch.1
new file mode 100644
index ..505f38daf80a
--- /dev/null
+++ b/external/libmwaw/0001-drop-unneeded-include.patch.1
@@ -0,0 +1,25 @@
+From db0450c5bacdf0f3970a8838ff989b7e5390 Mon Sep 17 00:00:00 2001
+From: David Tardon 
+Date: Thu, 8 Apr 2021 23:07:13 +0200
+Subject: [PATCH] drop unneeded include
+
+---
+ src/lib/Canvas5StyleManager.cxx | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/lib/Canvas5StyleManager.cxx b/src/lib/Canvas5StyleManager.cxx
+index 7cb368f0..f6b3338a 100644
+--- a/src/lib/Canvas5StyleManager.cxx
 b/src/lib/Canvas5StyleManager.cxx
+@@ -31,8 +31,6 @@
+ * instead of those above.
+ */
+ 
+-#include 
+-
+ #include 
+ #include 
+ #include 
+-- 
+2.30.2
+
diff --git a/external/libmwaw/Library_mwaw.mk b/external/libmwaw/Library_mwaw.mk
index bb1a880fd9ce..d92a1b729b81 100644
--- a/external/libmwaw/Library_mwaw.mk
+++ b/external/libmwaw/Library_mwaw.mk
@@ -41,6 +41,10 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,mwaw,\
UnpackedTarball/libmwaw/src/lib/BeagleWksSSParser \
UnpackedTarball/libmwaw/src/lib/BeagleWksStructManager \
UnpackedTarball/libmwaw/src/lib/BeagleWksText \
+   UnpackedTarball/libmwaw/src/lib/Canvas5Graph \
+   UnpackedTarball/libmwaw/src/lib/Canvas5Parser \
+   UnpackedTarball/libmwaw/src/lib/Canvas5Structure \
+   UnpackedTarball/libmwaw/src/lib/Canvas5StyleManager \
UnpackedTarball/libmwaw/src/lib/CanvasGraph \
UnpackedTarball/libmwaw/src/lib/CanvasParser \
UnpackedTarball/libmwaw/src/lib/CanvasStyleManager \
diff --git a/external/libmwaw/UnpackedTarball_libmwaw.mk 
b/external/libmwaw/UnpackedTarball_libmwaw.mk
index 935cbc1eb1c3..e15768e91623 100644
--- a/external/libmwaw/UnpackedTarball_libmwaw.mk
+++ b/external/libmwaw/UnpackedTarball_libmwaw.mk
@@ -15,6 +15,10 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libmwaw,0))
 
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libmwaw))
 
+$(eval $(call gb_UnpackedTarball_add_patches,libmwaw, \
+   external/libmwaw/0001-drop-unneeded-include.patch.1 \
+))
+
 ifneq ($(OS),MACOSX)
 ifneq ($(OS),WNT)
 $(eval $(call gb_UnpackedTarball_add_patches,libmwaw, \
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 152c3775828f..7904d7fe15ad 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -273,10 +273,10 @@
 "dest-filename": "external/tarballs/libmspub-0.1.4.tar.xz"
 },
 {
- 

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

2021-04-02 Thread David Blatter (via logerrit)
 package/source/zipapi/ZipFile.cxx |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 24fad8bf168beb56855d97ede2d4a1dec2a46220
Author: David Blatter 
AuthorDate: Wed Mar 31 15:57:44 2021 +0200
Commit: Michael Stahl 
CommitDate: Fri Apr 2 12:51:29 2021 +0200

fix detection of encrypted zip entries

if a zip entry is encrypted, bit 1 of the flags field is set. previously
bit 1 of the version field was checked. a valid zip with a required version
of e.g. 45 generated a 'file is corrupt' error

see: https://pkware.cachefly.net/webdocs/APPNOTE/APPNOTE-6.3.3.TXT
(sections 4.4.3 and 4.4.4)

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

diff --git a/package/source/zipapi/ZipFile.cxx 
b/package/source/zipapi/ZipFile.cxx
index 6ee7bdc0d43d..fb90ef02e4e1 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -921,11 +921,11 @@ sal_Int32 ZipFile::readCEN()
 
 aMemGrabber.skipBytes ( 2 );
 aEntry.nVersion = aMemGrabber.ReadInt16();
+aEntry.nFlag = aMemGrabber.ReadInt16();
 
-if ( ( aEntry.nVersion & 1 ) == 1 )
+if ( ( aEntry.nFlag & 1 ) == 1 )
 throw ZipException("Invalid CEN header (encrypted entry)" );
 
-aEntry.nFlag = aMemGrabber.ReadInt16();
 aEntry.nMethod = aMemGrabber.ReadInt16();
 
 if ( aEntry.nMethod != STORED && aEntry.nMethod != DEFLATED)
@@ -1025,9 +1025,10 @@ void ZipFile::recover()
 MemoryByteGrabber aMemGrabber(aTmpBuffer);
 
 aEntry.nVersion = aMemGrabber.ReadInt16();
-if ( ( aEntry.nVersion & 1 ) != 1 )
+aEntry.nFlag = aMemGrabber.ReadInt16();
+
+if ( ( aEntry.nFlag & 1 ) != 1 )
 {
-aEntry.nFlag = aMemGrabber.ReadInt16();
 aEntry.nMethod = aMemGrabber.ReadInt16();
 
 if ( aEntry.nMethod == STORED || aEntry.nMethod == 
DEFLATED )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


David Blatter license statement

2021-04-01 Thread David Blatter
All of my past & future contributions to LibreOffice may be licensed under the 
MPLv2/LGPLv3+ dual license.


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


[Libreoffice-commits] core.git: download.lst external/libcdr solenv/flatpak-manifest.in

2021-03-30 Thread David Tardon (via logerrit)
 download.lst  |4 ++--
 external/libcdr/UnpackedTarball_libcdr.mk |1 -
 external/libcdr/libcdr-no-icu-boolean.patch.1 |   12 
 solenv/flatpak-manifest.in|6 +++---
 4 files changed, 5 insertions(+), 18 deletions(-)

New commits:
commit 64788738db595cb642b7efd49340cae33d92698e
Author: David Tardon 
AuthorDate: Tue Mar 30 17:36:05 2021 +0200
Commit: David Tardon 
CommitDate: Tue Mar 30 19:46:50 2021 +0200

upload libcdr 0.1.7

Change-Id: Ie01fdee7379c398fe7df7c140e2f0059bea71abe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113380
Tested-by: Jenkins
Reviewed-by: David Tardon 

diff --git a/download.lst b/download.lst
index fcb5e165473c..adf73ca23d30 100644
--- a/download.lst
+++ b/download.lst
@@ -25,8 +25,8 @@ export BZIP2_TARBALL := 
00b516f4704d4a7cb50a1d97e6e8e15b-bzip2-1.0.6.tar.gz
 export CAIRO_SHA256SUM := 
5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331
 export CAIRO_VERSION_MICRO := 0
 export CAIRO_TARBALL := cairo-1.16.$(CAIRO_VERSION_MICRO).tar.xz
-export CDR_SHA256SUM := 
01cd00b04a030977e544433c2d127c997205332cd9b8e35ec0ee17110da7f861
-export CDR_TARBALL := libcdr-0.1.6.tar.xz
+export CDR_SHA256SUM := 
5666249d613466b9aa1e987ea4109c04365866e9277d80f6cd9663e86b8ecdd4
+export CDR_TARBALL := libcdr-0.1.7.tar.xz
 export CLUCENE_SHA256SUM := 
ddfdc433dd8ad31b5c5819cc4404a8d2127472a3b720d3e744e8c51d79732eab
 export CLUCENE_TARBALL := 
48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz
 export DTOA_SHA256SUM := 
0082d0684f7db6f62361b76c4b7faba19e0c7ce5cb8e36c4b65fea8281e711b4
diff --git a/external/libcdr/UnpackedTarball_libcdr.mk 
b/external/libcdr/UnpackedTarball_libcdr.mk
index d8742f3c5f5a..f0e80f06f05f 100644
--- a/external/libcdr/UnpackedTarball_libcdr.mk
+++ b/external/libcdr/UnpackedTarball_libcdr.mk
@@ -17,7 +17,6 @@ $(eval $(call 
gb_UnpackedTarball_update_autoconf_configs,libcdr))
 
 $(eval $(call gb_UnpackedTarball_add_patches,libcdr, \
 external/libcdr/libcdr-visibility-win.patch \
-external/libcdr/libcdr-no-icu-boolean.patch.1 \
 external/libcdr/ax_gcc_func_attribute.m4.patch \
 ))
 
diff --git a/external/libcdr/libcdr-no-icu-boolean.patch.1 
b/external/libcdr/libcdr-no-icu-boolean.patch.1
deleted file mode 100644
index 65884fbbf873..
--- a/external/libcdr/libcdr-no-icu-boolean.patch.1
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur libcdr.org/src/lib/libcdr_utils.cpp libcdr/src/lib/libcdr_utils.cpp
 libcdr.org/src/lib/libcdr_utils.cpp2020-02-02 16:30:44.0 
+0100
-+++ libcdr/src/lib/libcdr_utils.cpp2020-11-16 21:08:04.092927628 +0100
-@@ -108,7 +108,7 @@
- csd = ucsdet_open();
- if (U_FAILURE(status) || !csd)
-   return 0;
--ucsdet_enableInputFilter(csd, TRUE);
-+ucsdet_enableInputFilter(csd, true);
- ucsdet_setText(csd, (const char *)buffer, bufferLength, );
- if (U_FAILURE(status))
-   throw libcdr::EncodingException();
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 369184ce7f0a..c86fc663388f 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -219,10 +219,10 @@
 "dest-filename": "external/tarballs/libabw-0.1.3.tar.xz"
 },
 {
-"url": 
"https://dev-www.libreoffice.org/src/libcdr-0.1.6.tar.xz;,
-"sha256": 
"01cd00b04a030977e544433c2d127c997205332cd9b8e35ec0ee17110da7f861",
+"url": 
"https://dev-www.libreoffice.org/src/libcdr-0.1.7.tar.xz;,
+"sha256": 
"5666249d613466b9aa1e987ea4109c04365866e9277d80f6cd9663e86b8ecdd4",
 "type": "file",
-"dest-filename": "external/tarballs/libcdr-0.1.6.tar.xz"
+"dest-filename": "external/tarballs/libcdr-0.1.7.tar.xz"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/libcmis-0.5.2.tar.xz;,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


  1   2   3   4   5   6   7   8   9   10   >