configure.ac | 2 - sc/qa/unit/helper/qahelper.cxx | 38 +++++++++++++++++++++++++++++++++ sc/source/core/data/dpoutput.cxx | 6 ++++- sc/source/ui/view/viewfun3.cxx | 2 + vcl/source/gdi/embeddedfontshelper.cxx | 31 +++++++++++++++++++++++++- 5 files changed, 75 insertions(+), 4 deletions(-)
New commits: commit cf0a4747cef76399d7acd30c4dcda7a78e7973c2 Author: Aron Budea <aron.bu...@collabora.com> AuthorDate: Fri Jul 7 00:19:06 2023 +0200 Commit: Aron Budea <aron.bu...@collabora.com> CommitDate: Fri Jul 7 00:19:06 2023 +0200 Bump version to 7.3.7.2.M5 Change-Id: Id24ff02237b8830a16a58483827f05951600dfe2 diff --git a/configure.ac b/configure.ac index 13379b00ccc1..52205e99ac64 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ dnl in order to create a configure script. # several non-alphanumeric characters, those are split off and used only for the # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea. -AC_INIT([LibreOffice],[7.3.7.2.M4],[],[],[http://documentfoundation.org/]) +AC_INIT([LibreOffice],[7.3.7.2.M5],[],[],[http://documentfoundation.org/]) dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just fine if it is installed dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails hard commit 4da8ce44a6e6a41d1506ba9087c28896c36a2722 Author: luigiiucci <luigi.iu...@collabora.com> AuthorDate: Tue Jun 13 22:10:00 2023 +0200 Commit: Aron Budea <aron.bu...@collabora.com> CommitDate: Thu Jul 6 23:27:04 2023 +0200 tdf#155486 Adding fonts to .odt when there is "no perfect match" Problem does not seem to have any relation with .otf files management. Problem arises when: - we use a font with setting certain family/bold/italic/pitch values - we have this font installed, but we don't have a version with matching family/bold/italic/pitch In this case the "not a perfect match" fonts were not saved in the .odt Change-Id: Ie4e2b9c34b79ac99f03c57bed4fdc5f4d718dcc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153007 Tested-by: Jenkins Reviewed-by: خالد حسني <kha...@libreoffice.org> (cherry picked from commit e7c885389bfb9387acf8a21ea38769e678a76aac) (cherry picked from commit a3a00555d4b0e07ee921f85ac088e7b17047c6cf) diff --git a/vcl/source/gdi/embeddedfontshelper.cxx b/vcl/source/gdi/embeddedfontshelper.cxx index 34d227e5f5b2..2ca5ccd3c1b7 100644 --- a/vcl/source/gdi/embeddedfontshelper.cxx +++ b/vcl/source/gdi/embeddedfontshelper.cxx @@ -261,6 +261,15 @@ OUString EmbeddedFontsHelper::fontFileUrl( std::u16string_view familyName, FontF graphics->GetDevFontList( &fonts ); std::unique_ptr< vcl::font::PhysicalFontFaceCollection > fontInfo( fonts.GetFontFaceCollection()); vcl::font::PhysicalFontFace* selected = nullptr; + + // Maybe we don't find the perfect match for the font. E.G. we have fonts with the same family name + // but not same bold or italic etc.. + // In this case we add all the fonts having the family name of tyhe used font: + // - we store all these fonts in familyNameFonts during loop + // - if we haven't found the perfect match we store all fonts in familyNameFonts + typedef std::vector<vcl::font::PhysicalFontFace*> FontList; + FontList familyNameFonts; + for( int i = 0; i < fontInfo->Count(); ++i ) @@ -288,12 +297,30 @@ OUString EmbeddedFontsHelper::fontFileUrl( std::u16string_view familyName, FontF { // Some fonts specify 'DONTKNOW' for some things, still a good match, if we don't find a better one. selected = f; } + // adding "not perfact match" to familyNameFonts vector + familyNameFonts.push_back(f); + } } - if( selected != nullptr ) + + // if we have found a perfect match we will add only "selected", otherwise all familyNameFonts + FontList fontsToAdd = (selected ? FontList(1, selected) : std::move(familyNameFonts)); + + for (vcl::font::PhysicalFontFace* f : fontsToAdd) { + if (!selected) { // recalculate file not for "not perfect match" + filename = OUString::Concat(familyName) + "_" + OUString::number(f->GetFamilyType()) + "_" + + OUString::number(f->GetItalic()) + "_" + OUString::number(f->GetWeight()) + "_" + + OUString::number(f->GetPitch()) + ".ttf"; // TODO is it always ttf? + url = path + filename; + if (osl::File(url).open(osl_File_OpenFlag_Read) == osl::File::E_None) // = exists() + { + // File with contents of the font file already exists, assume it's been created by a previous call. + continue; + } + } tools::Long size; - if (const void* data = graphics->GetEmbedFontData(selected, &size)) + if (const void* data = graphics->GetEmbedFontData(f, &size)) { if( sufficientTTFRights( data, size, rights )) { commit 689a2e36ebcb7f2184210dcd0abee10cd9fac7d3 Author: luigiiucci <luigi.iu...@collabora.com> AuthorDate: Wed May 17 11:02:37 2023 +0200 Commit: Aron Budea <aron.bu...@collabora.com> CommitDate: Thu Jul 6 23:26:52 2023 +0200 Header columns can disappear with filtered data in pivot tables When we set on a pivot table a filter that filters all the rows, the pivot table showed only the first header columns and computed column, but all the columns headers should still be shown so we can adjust the filter for the column. This fixes this issue. Also add more debug output and prevent a crash when running pivot table tests. Change-Id: I30b4ee72cf8436c4522ab4ba0781462b214816dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151871 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> (cherry picked from commit 3551d18404cb19cdaa8edb170a549f5c5405d0cb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153686 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> (cherry picked from commit 3a51b402f243eb32b544c16813f682617d88c0b9) diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index c1d42a2a1a6a..b5785b4fa510 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -42,6 +42,7 @@ #include <scitems.hxx> #include <stringutil.hxx> #include <tokenarray.hxx> +#include <o3tl/safeint.hxx> #include <orcus/csv_parser.hpp> @@ -523,6 +524,43 @@ bool checkOutput( svl::GridPrinter printer(e.Row() - s.Row() + 1, e.Col() - s.Col() + 1, CALC_DEBUG_OUTPUT != 0); SCROW nOutRowSize = e.Row() - s.Row() + 1; SCCOL nOutColSize = e.Col() - s.Col() + 1; + + // Check if expected size iz smaller than actual size (and prevent a crash) + if (aCheck.size() < o3tl::make_unsigned(nOutRowSize) || aCheck[0].size() < o3tl::make_unsigned(nOutColSize)) + { + // Dump the arrays to console, so we can compare + std::cout << "Expected data:" << std::endl; + for (size_t nRow = 0; nRow < aCheck.size(); ++nRow) + { + for (size_t nCol = 0; nCol < aCheck[nRow].size(); ++nCol) + { + const char* p = aCheck[nRow][nCol]; + if (p) + { + OUString aCheckVal = OUString::createFromAscii(p); + std::cout << "'" << aCheckVal << "', "; + } + else + std::cout << "null, "; + } + std::cout << std::endl; + } + + std::cout << "Actual data:" << std::endl; + for (SCROW nRow = 0; nRow < nOutRowSize; ++nRow) + { + for (SCCOL nCol = 0; nCol < nOutColSize; ++nCol) + { + OUString aVal = pDoc->GetString(nCol + s.Col(), nRow + s.Row(), s.Tab()); + std::cout << "'" << aVal << "', "; + } + std::cout << std::endl; + } + std::cout << std::endl; + + return false; + } + for (SCROW nRow = 0; nRow < nOutRowSize; ++nRow) { for (SCCOL nCol = 0; nCol < nOutColSize; ++nCol) diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index aedbea61a044..11a69b427146 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -600,7 +600,11 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS case sheet::DataPilotFieldOrientation_ROW: { uno::Sequence<sheet::MemberResult> aResult = xLevRes->getResults(); - if (!lcl_MemberEmpty(aResult)) + // We want only to remove the DATA column if it is empty + // and not any other empty columns (to still show the + // header columns) + bool bSkip = lcl_MemberEmpty(aResult) && bIsDataLayout; + if (!bSkip) { ScDPOutLevelData tmp(nDim, nHierarchy, nLev, nDimPos, nNumFmt, aResult, aName, aCaption, bHasHiddenMember, bIsDataLayout, false); commit c7c41372a5fe0743042a3664ec52fe2d41c39244 Author: Luigi Iucci <luigi.iu...@collabora.com> AuthorDate: Wed Jun 21 10:16:16 2023 +0200 Commit: Aron Budea <aron.bu...@collabora.com> CommitDate: Thu Jul 6 23:26:39 2023 +0200 problem pasting to calc an image copied from firefox (windows) Calc tries to paste the image as html. In case both HTML_SIMPLE and BITMAP flavors are present in the clipboard, we paste as BITMAP Change-Id: I2527bedf11eb6986b58329acaf360a397af03101 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153614 Tested-by: Jenkins Reviewed-by: Henry Castro <hcas...@collabora.com> (cherry picked from commit 46fa17b70db0d543518dde52908f46c85838ac12) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153668 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> (cherry picked from commit adaae622b67f525e0fb58af848a7cece8ac65f45) (cherry picked from commit 0d38ec8443312398f81aa1eac57e97211018022d) diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 679557d020b4..96c1a36e3f78 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -598,6 +598,8 @@ void ScViewFunc::PasteFromSystem() PasteFromSystem(SotClipboardFormatId::RICHTEXT); else if (aDataHelper.HasFormat(SotClipboardFormatId::HTML)) PasteFromSystem(SotClipboardFormatId::HTML); + else if (aDataHelper.HasFormat(SotClipboardFormatId::BITMAP)) + PasteFromSystem(SotClipboardFormatId::BITMAP); else if (aDataHelper.HasFormat(SotClipboardFormatId::HTML_SIMPLE)) PasteFromSystem(SotClipboardFormatId::HTML_SIMPLE); else if (aDataHelper.HasFormat(SotClipboardFormatId::SYLK))