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

2021-08-28 Thread Tomaž Vajngerl (via logerrit)
 vcl/Library_vcl.mk |1 +
 vcl/inc/pdf/PdfConfig.hxx  |   18 ++
 vcl/source/filter/ipdf/pdfread.cxx |   20 +++-
 vcl/source/gdi/pdfwriter_impl.cxx  |   10 +++---
 vcl/source/pdf/PdfConfig.cxx   |   32 
 5 files changed, 61 insertions(+), 20 deletions(-)

New commits:
commit 825b08a9b5df984bf5091ec94fbfe78721c15a45
Author: Tomaž Vajngerl 
AuthorDate: Thu Aug 26 16:47:31 2021 +0900
Commit: Andras Timar 
CommitDate: Sun Aug 29 08:59:13 2021 +0200

Take the PDF graphic rendering DPI into account when exporting

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

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 082cc64dcef4..1916292b5c36 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -318,6 +318,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/gdi/scrptrun \
 vcl/source/gdi/CommonSalLayout \
 vcl/source/gdi/TypeSerializer \
+vcl/source/pdf/PdfConfig \
 vcl/source/pdf/PDFiumLibrary \
 vcl/source/pdf/ExternalPDFStreams \
 vcl/source/graphic/GraphicID \
diff --git a/vcl/inc/pdf/PdfConfig.hxx b/vcl/inc/pdf/PdfConfig.hxx
new file mode 100644
index ..235fd008ea2b
--- /dev/null
+++ b/vcl/inc/pdf/PdfConfig.hxx
@@ -0,0 +1,18 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#pragma once
+
+namespace vcl::pdf
+{
+double getDefaultPdfResolutionDpi();
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/ipdf/pdfread.cxx 
b/vcl/source/filter/ipdf/pdfread.cxx
index acc45bc4d9e4..ef8862c0d1a3 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -18,6 +18,7 @@
 #include 
 #endif
 
+#include 
 #include 
 #include 
 #include 
@@ -147,27 +148,12 @@ VectorGraphicDataArray 
createVectorGraphicDataArray(SvStream& rStream)
 
 namespace vcl
 {
-/// Get the default PDF rendering resolution in DPI.
-static double getDefaultPdfResolutionDpi()
-{
-// If an overriding default is set, use it.
-const char* envar = ::getenv("PDFIMPORT_RESOLUTION_DPI");
-if (envar)
-{
-const double dpi = atof(envar);
-if (dpi > 0)
-return dpi;
-}
-
-// Fallback to a sensible default.
-return 96.;
-}
-
 size_t RenderPDFBitmaps(const void* pBuffer, int nSize, std::vector& 
rBitmaps,
 const size_t nFirstPage, int nPages, const 
basegfx::B2DTuple* pSizeHint)
 {
 #if HAVE_FEATURE_PDFIUM
-static const double fResolutionDPI = getDefaultPdfResolutionDpi();
+static const double fResolutionDPI = 
vcl::pdf::getDefaultPdfResolutionDpi();
+
 auto pPdfium = vcl::pdf::PDFiumLibrary::get();
 
 // Load the buffer using pdfium.
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 70038fa3fb2d..8b435678f93d 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -75,6 +75,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "pdfwriter_impl.hxx"
 
@@ -8666,11 +8667,14 @@ void 
PDFWriterImpl::writeReferenceXObject(ReferenceXObjectEmit& rEmit)
 return;
 
 // Count /Matrix and /BBox.
-// vcl::ImportPDF() works with 96 DPI so use the same values here, too.
+// vcl::ImportPDF() uses getDefaultPdfResolutionDpi to set the desired
+// rendering DPI so we have to take into account that here too.
+static const double fResolutionDPI = 
vcl::pdf::getDefaultPdfResolutionDpi();
+
 sal_Int32 nOldDPIX = GetDPIX();
-SetDPIX(96);
 sal_Int32 nOldDPIY = GetDPIY();
-SetDPIY(96);
+SetDPIX(fResolutionDPI);
+SetDPIY(fResolutionDPI);
 Size aSize = PixelToLogic(rEmit.m_aPixelSize, 
MapMode(m_aMapMode.GetMapUnit()));
 SetDPIX(nOldDPIX);
 SetDPIY(nOldDPIY);
diff --git a/vcl/source/pdf/PdfConfig.cxx b/vcl/source/pdf/PdfConfig.cxx
new file mode 100644
index ..52859c7b1f6e
--- /dev/null
+++ b/vcl/source/pdf/PdfConfig.cxx
@@ -0,0 +1,32 @@
+/* -*- 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/.
+ *
+ */
+
+#include 
+
+namespace vcl::pdf
+{
+/// Get the default PDF rendering resolution in DPI.
+double getDefaultPdfResolutionDpi()
+{
+// If an overriding default is set, 

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

2021-08-28 Thread Arnaud Versini (via logerrit)
 basic/source/basmgr/basmgr.cxx |  107 -
 include/basic/basmgr.hxx   |   11 ++--
 2 files changed, 49 insertions(+), 69 deletions(-)

New commits:
commit 34cba9eefa710b053da817dd2642d2376691824e
Author: Arnaud Versini 
AuthorDate: Sun Aug 22 14:48:38 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Aug 29 08:52:48 2021 +0200

basic : remove BasicManagerImpl

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

diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 1cbd407f2171..03fe6ef6597c 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -95,19 +95,6 @@ constexpr OStringLiteral szCryptingKey = "CryptedBasic";
 const StreamMode eStreamReadMode = StreamMode::READ | StreamMode::NOCREATE | 
StreamMode::SHARE_DENYALL;
 const StreamMode eStorageReadMode = StreamMode::READ | 
StreamMode::SHARE_DENYWRITE;
 
-
-// BasicManager impl data
-struct BasicManagerImpl
-{
-LibraryContainerInfomaContainerInfo;
-
-std::vector> aLibs;
-OUString aBasicLibPath;
-
-BasicManagerImpl()
-{}
-};
-
 // BasMgrContainerListenerImpl
 
 
@@ -435,11 +422,9 @@ BasicLibInfo* BasicLibInfo::Create( SotStorageStream& 
rSStream )
 
 BasicManager::BasicManager( SotStorage& rStorage, const OUString& rBaseURL, 
StarBASIC* pParentFromStdLib, OUString const * pLibPath, bool bDocMgr ) : 
mbDocMgr( bDocMgr )
 {
-Init();
-
 if( pLibPath )
 {
-mpImpl->aBasicLibPath = *pLibPath;
+aBasicLibPath = *pLibPath;
 }
 OUString aStorName( rStorage.GetName() );
 maStorageName = INetURLObject(aStorName, INetProtocol::File).GetMainURL( 
INetURLObject::DecodeMechanism::NONE );
@@ -457,10 +442,10 @@ BasicManager::BasicManager( SotStorage& rStorage, const 
OUString& rBaseURL, Star
 // Should never happen, but if it happens we won't crash...
 pStdLib = new StarBASIC( nullptr, mbDocMgr );
 
-if (mpImpl->aLibs.empty())
+if (maLibs.empty())
 CreateLibInfo();
 
-BasicLibInfo& rStdLibInfo = *mpImpl->aLibs.front();
+BasicLibInfo& rStdLibInfo = *maLibs.front();
 
 rStdLibInfo.SetLib( pStdLib );
 StarBASICRef xStdLib = rStdLibInfo.GetLib();
@@ -526,19 +511,19 @@ static void copyToLibraryContainer( StarBASIC* pBasic, 
const LibraryContainerInf
 
 const uno::Reference< script::XPersistentLibraryContainer >& 
BasicManager::GetDialogLibraryContainer()  const
 {
-return mpImpl->maContainerInfo.mxDialogCont;
+return maContainerInfo.mxDialogCont;
 }
 
 const uno::Reference< script::XPersistentLibraryContainer >& 
BasicManager::GetScriptLibraryContainer()  const
 {
-return mpImpl->maContainerInfo.mxScriptCont;
+return maContainerInfo.mxScriptCont;
 }
 
 void BasicManager::SetLibraryContainerInfo( const LibraryContainerInfo& rInfo )
 {
-mpImpl->maContainerInfo = rInfo;
+maContainerInfo = rInfo;
 
-uno::Reference< script::XLibraryContainer > xScriptCont( 
mpImpl->maContainerInfo.mxScriptCont );
+uno::Reference< script::XLibraryContainer > xScriptCont( 
maContainerInfo.mxScriptCont );
 if( xScriptCont.is() )
 {
 // Register listener for lib container
@@ -566,7 +551,7 @@ void BasicManager::SetLibraryContainerInfo( const 
LibraryContainerInfo& rInfo )
 else
 {
 // No libs? Maybe an 5.2 document already loaded
-for (auto const& rpBasLibInfo : mpImpl->aLibs)
+for (auto const& rpBasLibInfo : maLibs)
 {
 StarBASIC* pLib = rpBasLibInfo->GetLib().get();
 if( !pLib )
@@ -577,11 +562,11 @@ void BasicManager::SetLibraryContainerInfo( const 
LibraryContainerInfo& rInfo )
 }
 if( pLib )
 {
-copyToLibraryContainer( pLib, mpImpl->maContainerInfo );
+copyToLibraryContainer( pLib, maContainerInfo );
 if (rpBasLibInfo->HasPassword())
 {
 OldBasicPassword* pOldBasicPassword =
-mpImpl->maContainerInfo.mpOldBasicPassword;
+maContainerInfo.mpOldBasicPassword;
 if( pOldBasicPassword )
 {
 pOldBasicPassword->setLibraryPassword(
@@ -593,18 +578,17 @@ void BasicManager::SetLibraryContainerInfo( const 
LibraryContainerInfo& rInfo )
 }
 }
 
-SetGlobalUNOConstant( "BasicLibraries", uno::Any( 
mpImpl->maContainerInfo.mxScriptCont ) );
-SetGlobalUNOConstant( "DialogLibraries", uno::Any( 
mpImpl->maContainerInfo.mxDialogCont ) );
+SetGlobalUNOConstant( "BasicLibraries", uno::Any( 
maContainerInfo.mxScriptCont ) );
+SetGlobalUNOConstant( "DialogLibrar

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

2021-08-28 Thread Noel Grandin (via logerrit)
 sw/source/core/text/porlay.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 0d25d7418d66ce17900f68623dd69e3f6789392e
Author: Noel Grandin 
AuthorDate: Sat Aug 28 19:06:27 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Aug 29 08:50:42 2021 +0200

micro-opt: prevent some vector re-allocs

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

diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 5a2ee141a67d..9c214ac714ce 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -1100,6 +1100,7 @@ void SwScriptInfo::InitScriptInfo(const SwTextNode& rNode,
 }
 }
 
+m_HiddenChg.reserve( aHiddenMulti.GetRangeCount() * 2 );
 for (sal_Int32 i = 0; i < aHiddenMulti.GetRangeCount(); ++i)
 {
 const Range& rRange = aHiddenMulti.GetRange( i );


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

2021-08-28 Thread Aron Budea (via logerrit)
 svx/source/tbxctrls/fontworkgallery.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2eca9fda89bb200cd1f34f5a272f2197a564a364
Author: Aron Budea 
AuthorDate: Sun Aug 29 03:18:43 2021 +0200
Commit: Aron Budea 
CommitDate: Sun Aug 29 06:24:33 2021 +0200

fix -Werror -Wsign-compare error on Android

Change-Id: I08ce05fa25af17d1df4ba17cae89ac11d860494a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121215
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Aron Budea 

diff --git a/svx/source/tbxctrls/fontworkgallery.cxx 
b/svx/source/tbxctrls/fontworkgallery.cxx
index afd2da9f8dfa..5834979d5152 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -215,7 +215,7 @@ void FontWorkGalleryDialog::insertSelectedFontwork()
 aPagePos.setX(convertTwipToMm100(aPagePos.X()));
 aPagePos.setY(convertTwipToMm100(aPagePos.Y()));
 
-sal_uInt32 nLOKViewWidth = 0.8 * 
convertTwipToMm100(pViewShell->getLOKVisibleArea().getWidth());
+sal_Int32 nLOKViewWidth = 0.8 * 
convertTwipToMm100(pViewShell->getLOKVisibleArea().getWidth());
 if (aFontworkSize.getWidth() > nLOKViewWidth)
 {
 double fScale = 
static_cast(aFontworkSize.getWidth()) / nLOKViewWidth;


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

2021-08-28 Thread Rizal Muttaqin (via logerrit)
 svx/inc/bitmaps.hlst |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 17ea551989005433bab1a9351ecd6fb6c283caea
Author: Rizal Muttaqin 
AuthorDate: Sat Aug 28 16:16:05 2021 +0700
Commit: Rizal Muttaqin 
CommitDate: Sun Aug 29 05:11:57 2021 +0200

tdf#143919 Revise Criss-cross diagonal border

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

diff --git a/svx/inc/bitmaps.hlst b/svx/inc/bitmaps.hlst
index 78b5509c52f5..b96076c0622d 100644
--- a/svx/inc/bitmaps.hlst
+++ b/svx/inc/bitmaps.hlst
@@ -274,7 +274,7 @@
 #define RID_SVXBMP_FRAME12  "svx/res/fr012.png"
 #define RID_SVXBMP_FRAME13  "svx/res/fr013.png"
 #define RID_SVXBMP_FRAME14  "svx/res/fr014.png"
-#define RID_SVXBMP_FRAME15  "svx/res/pr06.png"
+#define RID_SVXBMP_FRAME15  "svx/res/fr015.png"
 #define RID_SVXBMP_GRAF_RED "res/sc10865.png"
 #define RID_SVXBMP_GRAF_GREEN   "res/sc10866.png"
 #define RID_SVXBMP_GRAF_BLUE"res/sc10867.png"


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

2021-08-28 Thread Julien Nabet (via logerrit)
 include/vcl/outdevstate.hxx   |3 +--
 vcl/source/gdi/mtfxmldump.cxx |2 --
 2 files changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 74d35e143d557a7e65c4443f5b80cb9d406b1fa1
Author: Julien Nabet 
AuthorDate: Sat Aug 28 12:19:06 2021 +0200
Commit: Julien Nabet 
CommitDate: Sat Aug 28 20:17:46 2021 +0200

No need to keep PUSH_ALLTEXT (vcl)

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

diff --git a/include/vcl/outdevstate.hxx b/include/vcl/outdevstate.hxx
index b1104a28f34f..e058ad7dd45d 100644
--- a/include/vcl/outdevstate.hxx
+++ b/include/vcl/outdevstate.hxx
@@ -57,8 +57,7 @@ namespace o3tl
 {
 template<> struct typed_flags : is_typed_flags {};
 }
-#define PUSH_ALLTEXT  (PushFlags::TEXTCOLOR | PushFlags::TEXTFILLCOLOR | 
PushFlags::TEXTLINECOLOR | PushFlags::OVERLINECOLOR | PushFlags::TEXTALIGN | 
PushFlags::TEXTLAYOUTMODE | PushFlags::TEXTLANGUAGE)
-#define PUSH_ALLFONT  (PUSH_ALLTEXT | PushFlags::FONT)
+#define PUSH_ALLFONT  (PushFlags::TEXTCOLOR | PushFlags::TEXTFILLCOLOR | 
PushFlags::TEXTLINECOLOR | PushFlags::OVERLINECOLOR | PushFlags::TEXTALIGN | 
PushFlags::TEXTLAYOUTMODE | PushFlags::TEXTLANGUAGE | PushFlags::FONT)
 
 // Layout flags for Complex Text Layout
 // These are flag values, i.e they can be combined
diff --git a/vcl/source/gdi/mtfxmldump.cxx b/vcl/source/gdi/mtfxmldump.cxx
index 64df808a..4ad870cb019c 100644
--- a/vcl/source/gdi/mtfxmldump.cxx
+++ b/vcl/source/gdi/mtfxmldump.cxx
@@ -27,8 +27,6 @@ OUString collectPushFlags(PushFlags nFlags)
 return "PushAll";
 else if ((nFlags & PUSH_ALLFONT) == PUSH_ALLFONT)
 return "PushAllFont";
-else if ((nFlags & PUSH_ALLTEXT) == PUSH_ALLTEXT)
-return "PushAllText";
 
 std::vector aStrings;
 


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

2021-08-28 Thread Noel Grandin (via logerrit)
 filter/source/msfilter/util.cxx  |   47 ---
 include/filter/msfilter/util.hxx |1 
 writerfilter/source/dmapper/BorderHandler.cxx|2 
 writerfilter/source/dmapper/CellColorHandler.cxx |6 +-
 writerfilter/source/dmapper/DomainMapper.cxx |2 
 writerfilter/source/dmapper/TDefTableHandler.cxx |2 
 writerfilter/source/rtftok/rtfsdrimport.cxx  |   14 +++---
 7 files changed, 47 insertions(+), 27 deletions(-)

New commits:
commit 30bd841e2d8f47e49711d928d600573339708b03
Author: Noel Grandin 
AuthorDate: Fri Aug 27 20:50:59 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat Aug 28 16:10:04 2021 +0200

avoid unnecessary OString to OUString conversion

speeds up loading some writer files

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

diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx
index 148f165d3fb1..23b4de1e87be 100644
--- a/filter/source/msfilter/util.cxx
+++ b/filter/source/msfilter/util.cxx
@@ -125,23 +125,42 @@ sal_Unicode bestFitOpenSymbolToMSFont(sal_Unicode cChar,
 
 OString ConvertColor( const Color &rColor )
 {
-OString color( "auto" );
+static constexpr OStringLiteral AUTO( "auto" );
 
-if ( rColor != COL_AUTO )
-{
-const char pHexDigits[] = "0123456789ABCDEF";
-char pBuffer[] = "00";
+if ( rColor == COL_AUTO )
+return AUTO;
 
-pBuffer[0] = pHexDigits[ ( rColor.GetRed()   >> 4 ) & 0x0F ];
-pBuffer[1] = pHexDigits[   rColor.GetRed()  & 0x0F ];
-pBuffer[2] = pHexDigits[ ( rColor.GetGreen() >> 4 ) & 0x0F ];
-pBuffer[3] = pHexDigits[   rColor.GetGreen()& 0x0F ];
-pBuffer[4] = pHexDigits[ ( rColor.GetBlue()  >> 4 ) & 0x0F ];
-pBuffer[5] = pHexDigits[   rColor.GetBlue() & 0x0F ];
+const char pHexDigits[] = "0123456789ABCDEF";
+char pBuffer[] = "00";
 
-color = OString( pBuffer );
-}
-return color;
+pBuffer[0] = pHexDigits[ ( rColor.GetRed()   >> 4 ) & 0x0F ];
+pBuffer[1] = pHexDigits[   rColor.GetRed()  & 0x0F ];
+pBuffer[2] = pHexDigits[ ( rColor.GetGreen() >> 4 ) & 0x0F ];
+pBuffer[3] = pHexDigits[   rColor.GetGreen()& 0x0F ];
+pBuffer[4] = pHexDigits[ ( rColor.GetBlue()  >> 4 ) & 0x0F ];
+pBuffer[5] = pHexDigits[   rColor.GetBlue() & 0x0F ];
+
+return OString( pBuffer );
+}
+
+OUString ConvertColorOU( const Color &rColor )
+{
+static constexpr OUStringLiteral AUTO( u"auto" );
+
+if ( rColor == COL_AUTO )
+return AUTO;
+
+const char pHexDigits[] = "0123456789ABCDEF";
+sal_Unicode pBuffer[] = u"00";
+
+pBuffer[0] = pHexDigits[ ( rColor.GetRed()   >> 4 ) & 0x0F ];
+pBuffer[1] = pHexDigits[   rColor.GetRed()  & 0x0F ];
+pBuffer[2] = pHexDigits[ ( rColor.GetGreen() >> 4 ) & 0x0F ];
+pBuffer[3] = pHexDigits[   rColor.GetGreen()& 0x0F ];
+pBuffer[4] = pHexDigits[ ( rColor.GetBlue()  >> 4 ) & 0x0F ];
+pBuffer[5] = pHexDigits[   rColor.GetBlue() & 0x0F ];
+
+return OUString( pBuffer );
 }
 
 #define IN2MM100( v )static_cast< sal_Int32 >( (v) * 2540.0 + 0.5 )
diff --git a/include/filter/msfilter/util.hxx b/include/filter/msfilter/util.hxx
index 7e25e701420d..f2c2a0dbfcfe 100644
--- a/include/filter/msfilter/util.hxx
+++ b/include/filter/msfilter/util.hxx
@@ -62,6 +62,7 @@ MSFILTER_DLLPUBLIC sal_Unicode 
bestFitOpenSymbolToMSFont(sal_Unicode cBullet,
  * @param rColor color to convert
  */
 MSFILTER_DLLPUBLIC OString ConvertColor( const Color &rColor );
+MSFILTER_DLLPUBLIC OUString ConvertColorOU( const Color &rColor );
 
 
 /** Paper size in 1/100 millimeters. */
diff --git a/writerfilter/source/dmapper/BorderHandler.cxx 
b/writerfilter/source/dmapper/BorderHandler.cxx
index 0045805d6e85..c9c793ca35ff 100644
--- a/writerfilter/source/dmapper/BorderHandler.cxx
+++ b/writerfilter/source/dmapper/BorderHandler.cxx
@@ -66,7 +66,7 @@ void BorderHandler::lcl_attribute(Id rName, Value & rVal)
 break;
 case NS_ooxml::LN_CT_Border_color:
 m_nLineColor = nIntValue;
-appendGrabBag("color", 
OUString::fromUtf8(msfilter::util::ConvertColor(Color(ColorTransparency, 
nIntValue;
+appendGrabBag("color", 
msfilter::util::ConvertColorOU(Color(ColorTransparency, nIntValue)));
 break;
 case NS_ooxml::LN_CT_Border_space: // border distance in points
 m_nLineDistance = ConversionHelper::convertTwipToMM100( nIntValue 
* 20 );
diff --git a/writerfilter/source/dmapper/CellColorHandler.cxx 
b/writerfilter/source/dmapper/CellColorHandler.cxx
index 193477a31fc2..765d5a3a5273 100644
--- a/writerfilter/source/dmapper/CellColorHandler.cxx
+++ b/writerfilter/source/dmapper/CellColorHandler.cxx
@@ -107,7 +107,7 @@ void CellColorHa

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

2021-08-28 Thread Noel Grandin (via logerrit)
 sw/source/core/access/accmap.cxx|6 +
 sw/source/core/access/accpara.cxx   |4 +--
 sw/source/core/docnode/ndsect.cxx   |8 +++---
 sw/source/core/docnode/ndtbl.cxx|8 +++---
 sw/source/core/docnode/node.cxx |8 +++---
 sw/source/core/frmedt/feshview.cxx  |3 --
 sw/source/core/frmedt/fews.cxx  |2 -
 sw/source/core/inc/frame.hxx|3 ++
 sw/source/core/layout/anchoreddrawobject.cxx|2 -
 sw/source/core/layout/calcmove.cxx  |2 -
 sw/source/core/layout/findfrm.cxx   |   10 
 sw/source/core/layout/flycnt.cxx|2 -
 sw/source/core/layout/frmtool.cxx   |   14 ++--
 sw/source/core/layout/sectfrm.cxx   |4 +--
 sw/source/core/objectpositioning/anchoredobjectposition.cxx |2 -
 sw/source/core/text/frmform.cxx |4 +--
 16 files changed, 46 insertions(+), 36 deletions(-)

New commits:
commit 426930d0c4bd6f782a04a92e8a36e92cd65e186f
Author: Noel Grandin 
AuthorDate: Sat Aug 28 08:35:29 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat Aug 28 15:13:20 2021 +0200

speedup dynamic_cast to SwTextFrame

which is a hotspot in loading some documents

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

diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index a79863f65047..60ec8cf53996 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -3419,8 +3419,7 @@ void SwAccessibleMap::InvalidateTextSelectionOfAllParas()
 static_cast( xAcc.get() 
) );
 if ( xAccImpl.is() && xAccImpl->GetFrame() )
 {
-const SwTextFrame* pTextFrame(
-dynamic_cast(xAccImpl->GetFrame()) );
+const SwTextFrame* pTextFrame = 
xAccImpl->GetFrame()->DynCastTextFrame();
 OSL_ENSURE( pTextFrame,
 
" - unexpected type of 
frame" );
 if ( pTextFrame )
@@ -3448,8 +3447,7 @@ void SwAccessibleMap::InvalidateTextSelectionOfAllParas()
 static_cast( xAcc.get() ) );
 if ( xAccImpl.is() && xAccImpl->GetFrame() )
 {
-const SwTextFrame* pTextFrame(
-dynamic_cast(xAccImpl->GetFrame()) 
);
+const SwTextFrame* pTextFrame = 
xAccImpl->GetFrame()->DynCastTextFrame();
 OSL_ENSURE( pTextFrame,
 
" - unexpected type of 
frame" );
 if ( pTextFrame )
diff --git a/sw/source/core/access/accpara.cxx 
b/sw/source/core/access/accpara.cxx
index 7d6ec354244b..3c471c702f30 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -718,7 +718,7 @@ lang::Locale SAL_CALL SwAccessibleParagraph::getLocale()
 {
 SolarMutexGuard aGuard;
 
-const SwTextFrame *pTextFrame = dynamic_cast( 
GetFrame()  );
+const SwTextFrame *pTextFrame = GetFrame()->DynCastTextFrame();
 if( !pTextFrame )
 {
 throw uno::RuntimeException("no SwTextFrame", 
static_cast(this));
@@ -738,7 +738,7 @@ uno::Reference SAL_CALL 
SwAccessibleParagraph::getAccess
 
 rtl::Reference pHelper = new 
utl::AccessibleRelationSetHelper();
 
-const SwTextFrame* pTextFrame = dynamic_cast(GetFrame());
+const SwTextFrame* pTextFrame = GetFrame()->DynCastTextFrame();
 OSL_ENSURE( pTextFrame,
 " - missing 
text frame");
 if ( pTextFrame )
diff --git a/sw/source/core/docnode/ndsect.cxx 
b/sw/source/core/docnode/ndsect.cxx
index 26647f2355cf..627475de7e89 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -1122,8 +1122,8 @@ void 
SwSectionNode::MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx)
  pViewShell->GetLayout()->IsAnyShellAccessible() )
 {
 pViewShell->InvalidateAccessibleParaFlowRelation(
-dynamic_cast(pNew->FindNextCnt( true 
)),
-dynamic_cast(pNew->FindPrevCnt()) );
+pNew->FindNextCnt( true )->DynCastTextFrame(),
+pNew->FindPrevCnt()->DynCastTextFrame() );
 }
 }
 pNew = pSct;
@@ -1148,8 +1148,8 @@ void 
SwSectionNode::MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx)
  pViewShell->GetLayout()->IsAnyShellAccessible() )

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

2021-08-28 Thread Noel Grandin (via logerrit)
 sw/inc/calbck.hxx  |   34 +-
 sw/source/core/inc/cellfrm.hxx |1 +
 sw/source/core/inc/rowfrm.hxx  |1 +
 sw/source/core/inc/tabfrm.hxx  |1 +
 4 files changed, 36 insertions(+), 1 deletion(-)

New commits:
commit 69e0567e118f00f299b6aac645c249521eb0629f
Author: Noel Grandin 
AuthorDate: Sat Aug 28 12:21:13 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat Aug 28 15:13:01 2021 +0200

tdf#135683  speed up layout of large writer tables

by making dynamic_cast to some SwTable* types faster

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

diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index 2d873107e069..7f2224671813 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -36,6 +36,9 @@ class SwModify;
 class SwFormat;
 class SfxPoolItem;
 class SwAttrSet;
+class SwCellFrame;
+class SwTabFrame;
+class SwRowFrame;
 
 /*
 SwModify and SwClient cooperate in propagating attribute changes.
@@ -118,6 +121,9 @@ namespace sw
 virtual void SwClientNotify( const SwModify&, const SfxHint& 
rHint) =0;
 public:
 bool IsLast() const { return !m_pLeft && !m_pRight; }
+virtual const SwCellFrame* DynCastCellFrame() const { return 
nullptr; }
+virtual const SwTabFrame* DynCastTabFrame() const { return 
nullptr; }
+virtual const SwRowFrame* DynCastRowFrame() const { return 
nullptr; }
 };
 enum class IteratorMode { Exact, UnwrapMulti };
 }
@@ -313,6 +319,32 @@ namespace sw
 };
 }
 
+namespace sw::detail
+{
+// Dynamic casting can be expensive when used a lot, so for certain type 
combinations,
+// we have faster routines.
+template
+inline const CastDest * internal_dyn_cast(const sw::WriterListener * 
pSource)
+{
+return dynamic_cast(pSource);
+}
+template<>
+inline const SwCellFrame* internal_dyn_cast(const sw::WriterListener * 
pSource)
+{
+return pSource->DynCastCellFrame();
+}
+template<>
+inline const SwTabFrame* internal_dyn_cast(const sw::WriterListener * 
pSource)
+{
+return pSource->DynCastTabFrame();
+}
+template<>
+inline const SwRowFrame* internal_dyn_cast(const sw::WriterListener * 
pSource)
+{
+return pSource->DynCastRowFrame();
+}
+} // namespace sw::detail
+
 template class SwIterator 
final
 : private sw::ClientIteratorBase
@@ -344,7 +376,7 @@ public:
 pCurrent = pLE->m_pToTell;
 }
 }
-if (dynamic_cast(pCurrent) == nullptr)
+if (sw::detail::internal_dyn_cast(pCurrent) == 
nullptr)
 {
 m_pPosition = GetRightOfPos();
 pCurrent = m_pPosition;
diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx
index 7a3f393880df..2e34b8a2fddf 100644
--- a/sw/source/core/inc/cellfrm.hxx
+++ b/sw/source/core/inc/cellfrm.hxx
@@ -36,6 +36,7 @@ class SwCellFrame final : public SwLayoutFrame
 
 virtual void Format( vcl::RenderContext* pRenderContext, const 
SwBorderAttrs *pAttrs = nullptr ) override;
 virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
+virtual const SwCellFrame* DynCastCellFrame() const override { return 
this; }
 
 public:
 SwCellFrame( const SwTableBox &, SwFrame*, bool bInsertContent );
diff --git a/sw/source/core/inc/rowfrm.hxx b/sw/source/core/inc/rowfrm.hxx
index 99c12107c64b..ebaae2e1dbc9 100644
--- a/sw/source/core/inc/rowfrm.hxx
+++ b/sw/source/core/inc/rowfrm.hxx
@@ -52,6 +52,7 @@ class SwRowFrame final : public SwLayoutFrame
 
 virtual void MakeAll(vcl::RenderContext* pRenderContext) override;
 virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
+virtual const SwRowFrame* DynCastRowFrame() const override { return this; }
 
 public:
 SwRowFrame(const SwTableLine&, SwFrame*, bool bInsertContent = true);
diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index 11e61f7c5b31..9df5aac42571 100644
--- a/sw/source/core/inc/tabfrm.hxx
+++ b/sw/source/core/inc/tabfrm.hxx
@@ -124,6 +124,7 @@ class SwTabFrame final: public SwLayoutFrame, public 
SwFlowFrame
 virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
 // only changes the Framesize, not the PrtArea size
 virtual SwTwips GrowFrame  ( SwTwips, bool bTst = false, bool bInfo = 
false ) override;
+virtual const SwTabFrame* DynCastTabFrame() const override { return this; }
 
 public:
 SwTabFrame( SwTable &, SwFrame* );  // calling RegistFlys always after 
creation _and_pasting!


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

2021-08-28 Thread Chris Sherlock (via logerrit)
 vcl/CppunitTest_vcl_text.mk|1 
 vcl/inc/TextLayoutCache.hxx|   63 +
 vcl/inc/scrptrun.h |4 +-
 vcl/qa/cppunit/text.cxx|   28 ++--
 vcl/source/gdi/CommonSalLayout.cxx |   59 +++---
 5 files changed, 104 insertions(+), 51 deletions(-)

New commits:
commit 9ca9faabd4009698096ccde03c45e9c203804c80
Author: Chris Sherlock 
AuthorDate: Sun Mar 7 13:19:55 2021 +1100
Commit: Tomaž Vajngerl 
CommitDate: Sat Aug 28 15:09:12 2021 +0200

vcl: move TextLayoutCache to own module header

Add a unit test for TextLayoutClass - it basically tests that script
runs work as intended.

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

diff --git a/vcl/CppunitTest_vcl_text.mk b/vcl/CppunitTest_vcl_text.mk
index 0b07e5df02a7..ffc307e094f1 100644
--- a/vcl/CppunitTest_vcl_text.mk
+++ b/vcl/CppunitTest_vcl_text.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,vcl_text, \
 $(eval $(call gb_CppunitTest_use_externals,vcl_text,\
boost_headers \
harfbuzz \
+   icu_headers \
 ))
 
 $(eval $(call gb_CppunitTest_use_libraries,vcl_text, \
diff --git a/vcl/inc/TextLayoutCache.hxx b/vcl/inc/TextLayoutCache.hxx
new file mode 100644
index ..0118ba32fed8
--- /dev/null
+++ b/vcl/inc/TextLayoutCache.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * 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 
+
+#include "scrptrun.h"
+
+#include 
+
+#include 
+
+namespace vcl
+{
+struct Run
+{
+int32_t nStart;
+int32_t nEnd;
+UScriptCode nCode;
+Run(int32_t nStart_, int32_t nEnd_, UScriptCode nCode_)
+: nStart(nStart_)
+, nEnd(nEnd_)
+, nCode(nCode_)
+{
+}
+};
+
+class TextLayoutCache
+{
+public:
+std::vector runs;
+TextLayoutCache(sal_Unicode const* pStr, sal_Int32 const nEnd)
+{
+vcl::ScriptRun aScriptRun(reinterpret_cast(pStr), nEnd);
+while (aScriptRun.next())
+{
+runs.emplace_back(aScriptRun.getScriptStart(), 
aScriptRun.getScriptEnd(),
+  aScriptRun.getScriptCode());
+}
+}
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/inc/scrptrun.h b/vcl/inc/scrptrun.h
index 0d64109b6fe9..d2dee3e155a7 100644
--- a/vcl/inc/scrptrun.h
+++ b/vcl/inc/scrptrun.h
@@ -39,6 +39,8 @@
 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 
@@ -56,7 +58,7 @@ struct ParenStackEntry
 }
 };
 
-class ScriptRun final : public icu::UObject
+class VCL_DLLPUBLIC ScriptRun final : public icu::UObject
 {
 public:
 ScriptRun(const UChar chars[], int32_t length);
diff --git a/vcl/qa/cppunit/text.cxx b/vcl/qa/cppunit/text.cxx
index 19e5da942932..0db15435a675 100644
--- a/vcl/qa/cppunit/text.cxx
+++ b/vcl/qa/cppunit/text.cxx
@@ -8,14 +8,16 @@
  */
 
 #include 
+#include 
 #include 
+
 #include 
 #include 
-#include 
-#include 
 #include 
-#include 
+#include 
+#include 
 
+#include 
 #include 
 
 class VclTextTest : public test::BootstrapFixture
@@ -42,10 +44,12 @@ public:
 
 void testSimpleText();
 void testVerticalText();
+void testTextLayoutCache();
 
 CPPUNIT_TEST_SUITE(VclTextTest);
 CPPUNIT_TEST(testSimpleText);
 CPPUNIT_TEST(testVerticalText);
+CPPUNIT_TEST(testTextLayoutCache);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -375,6 +379,24 @@ void VclTextTest::testVerticalText()
 CPPUNIT_ASSERT_DOUBLES_EQUAL(width36, width36pct50, 2);
 }
 
+void VclTextTest::testTextLayoutCache()
+{
+OUString sTestString = u"The quick brown fox\n jumped over the lazy 
dogالعاشر";
+vcl::TextLayoutCache cache(sTestString.getStr(), sTestString.getLength());
+
+vcl::Run run1 = cache.runs[0];
+vcl::Run run2 = cache.runs[1];
+
+bool bCorrectRuns = (cache.runs.size() == 2);
+CPPUNIT_ASSERT_MESSAGE("Wrong number of runs", bCorrectRuns

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

2021-08-28 Thread Chris Sherlock (via logerrit)
 include/vcl/outdev.hxx|   10 ++
 vcl/source/gdi/pdfwriter_impl.cxx |   14 ++
 vcl/source/gdi/pdfwriter_impl.hxx |1 +
 vcl/source/outdev/font.cxx|9 -
 4 files changed, 21 insertions(+), 13 deletions(-)

New commits:
commit 9a58ec3f6f65da27e3b26e1173b6661b743e66a4
Author: Chris Sherlock 
AuthorDate: Sun Mar 7 11:19:29 2021 +1100
Commit: Tomaž Vajngerl 
CommitDate: Sat Aug 28 14:10:51 2021 +0200

tdf#74702 vcl: remove GetOutDevType() from ImplNewFont()

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

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 011fc5445e0c..144a52308a3e 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -177,8 +177,6 @@ private:
 mutable VclPtrmpNextGraphics; ///< Next output 
device in list
 GDIMetaFile*mpMetaFile;
 mutable rtl::Reference mpFontInstance;
-mutable std::shared_ptr mxFontCache;
-mutable std::shared_ptr mxFontCollection;
 mutable std::unique_ptr mpDeviceFontList;
 mutable std::unique_ptr mpDeviceFontSizeList;
 std::vectormaOutDevStateStack;
@@ -253,6 +251,10 @@ private:
 mutable boolmbRefPoint : 1;
 mutable boolmbEnableRTL : 1;
 
+protected:
+mutable std::shared_ptr mxFontCollection;
+mutable std::shared_ptr mxFontCache;
+
 /** @name Initialization and accessor functions
  */
 ///@{
@@ -1178,12 +1180,12 @@ protected:
 void SetFontCollectionFromSVData();
 void ResetNewFontCache();
 
+SAL_DLLPRIVATE bool ImplNewFont() const;
+
 private:
 
 typedef void ( OutputDevice::* FontUpdateHandler_t )( bool );
 
-SAL_DLLPRIVATE bool ImplNewFont() const;
-
 SAL_DLLPRIVATE static void  ImplUpdateFontDataForAllFrames( 
FontUpdateHandler_t pHdl, bool bNewFontLists );
 
 static
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 41fc6b88d4ef..a099ef87bde1 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -68,6 +68,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -1341,6 +1342,19 @@ void PDFWriterImpl::dispose()
 VirtualDevice::dispose();
 }
 
+bool PDFWriterImpl::ImplNewFont() const
+{
+const ImplSVData* pSVData = ImplGetSVData();
+
+if( mxFontCollection == pSVData->maGDIData.mxScreenFontList
+||  mxFontCache == pSVData->maGDIData.mxScreenFontCache )
+{
+const_cast(*this).ImplUpdateFontData();
+}
+
+return OutputDevice::ImplNewFont();
+}
+
 void PDFWriterImpl::setupDocInfo()
 {
 std::vector< sal_uInt8 > aId;
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx 
b/vcl/source/gdi/pdfwriter_impl.hxx
index 43a55ad23196..e594d6332683 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -643,6 +643,7 @@ public:
 static void convertLineInfoToExtLineInfo( const LineInfo& rIn, 
PDFWriter::ExtLineInfo& rOut );
 
 protected:
+bool ImplNewFont() const;
 void ImplClearFontData(bool bNewFontLists) override;
 void ImplRefreshFontData(bool bNewFontLists) override;
 vcl::Region ClipToDeviceBounds(vcl::Region aRegion) const override;
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 1db0ad16207f..bfaa0226b1ce 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -914,15 +914,6 @@ bool OutputDevice::ImplNewFont() const
 {
 DBG_TESTSOLARMUTEX();
 
-// get correct font list on the PDF writer if necessary
-if (GetOutDevType() == OUTDEV_PDF)
-{
-const ImplSVData* pSVData = ImplGetSVData();
-if( mxFontCollection == pSVData->maGDIData.mxScreenFontList
-||  mxFontCache == pSVData->maGDIData.mxScreenFontCache )
-const_cast(*this).ImplUpdateFontData();
-}
-
 if ( !mbNewFont )
 return true;
 


GSoC - Final Report

2021-08-28 Thread Akshit
Hey everyone,
Here's the link to my final project report:
https://theproglevblog.blogspot.com/2021/08/google-summer-of-code-2021-project.html,
do check it out.
I am highly obliged to my mentors and the LibreOffice community for giving
me the wonderful opportunity to work on this project. The period of GSoC
has been an awesome ride for me altogether and thanks to this program, I
have a lot of takeaways with me, be it learning to maneuver through the
large code-base or be it learning a lot of new things about C++ that I
don't think I would've learned otherwise, the list just goes on. The most
important part of the program although for me was that I got to work under
the mentorship of my brilliant mentors - Tomaz Vajngerl and Lubos Lunak. I
am highly grateful to both of them, specially Tomaz Vajngerl, for being
super supportive and helpful and without whom it would not have been
possible to complete the project successfully. I also would like to
thank Ilmari Lauhakangas for helping and guiding me when I was a rookie to
LibreOffice's development. Lastly, I would like to assert that I am very
privileged to be a part of this wonderful community and even after GSoC, I
still will try to continue my contributions further to LibreOffice.
Thanks to the best community ever,
Akshit


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


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

2021-08-28 Thread Caolán McNamara (via logerrit)
 lotuswordpro/qa/cppunit/data/fail/ofz26357-1.lwp |binary
 lotuswordpro/source/filter/lwprowlayout.cxx  |2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bd555ee0ebc94bfffa41ac5d5eede580f330a7f7
Author: Caolán McNamara 
AuthorDate: Fri Aug 27 20:30:37 2021 +0100
Commit: Caolán McNamara 
CommitDate: Sat Aug 28 10:52:00 2021 +0200

ofz#26357 Infinite loop

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

diff --git a/lotuswordpro/qa/cppunit/data/fail/ofz26357-1.lwp 
b/lotuswordpro/qa/cppunit/data/fail/ofz26357-1.lwp
new file mode 100644
index ..4c087b6dfadb
Binary files /dev/null and b/lotuswordpro/qa/cppunit/data/fail/ofz26357-1.lwp 
differ
diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx 
b/lotuswordpro/source/filter/lwprowlayout.cxx
index 9590e41d9670..e37086960e2c 100644
--- a/lotuswordpro/source/filter/lwprowlayout.cxx
+++ b/lotuswordpro/source/filter/lwprowlayout.cxx
@@ -384,7 +384,7 @@ void LwpRowLayout::ConvertCommonRow(rtl::Reference 
const & pXFTable, sa
 
 sal_uInt8 nCellStartCol,nCellEndCol;
 
-for (sal_uInt8 i = nStartCol; i < nEndCol ; i++)
+for (sal_uInt16 i = nStartCol; i < nEndCol; i++)
 {
 // add row to table
 LwpObjectID *pCellID= &GetChildHead();


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

2021-08-28 Thread Dennis Francis (via logerrit)
 sc/source/filter/oox/richstring.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 084271de40eacdcfa2d789d421e6dee341a692ba
Author: Dennis Francis 
AuthorDate: Mon Aug 23 10:40:09 2021 +0530
Commit: Andras Timar 
CommitDate: Sat Aug 28 09:39:06 2021 +0200

cid#1490403: fix wrong initial flag bFound

Change-Id: I502653985e54c82198034534bb878d06787f8c94
Signed-off-by: Dennis Francis 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120859
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/sc/source/filter/oox/richstring.cxx 
b/sc/source/filter/oox/richstring.cxx
index 1b8126f933f6..ef40b919e908 100644
--- a/sc/source/filter/oox/richstring.cxx
+++ b/sc/source/filter/oox/richstring.cxx
@@ -86,7 +86,7 @@ OUString lcl_unEscapeUnicodeChars(const OUString& rSrc)
 return rSrc;
 
 sal_Int32 nStart = 0;
-bool bFound = true;
+bool bFound = false;
 const OUString aPrefix = "_x";
 sal_Int32 nPrefixStart = rSrc.indexOf(aPrefix, nStart);