[Libreoffice-commits] core.git: sc/qa
sc/qa/unit/subsequent_filters_test3.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 0e536abc286b50de171ecb0b6a57dad37467a516 Author: Andreas Heinisch AuthorDate: Wed Mar 29 18:18:14 2023 +0200 Commit: Andreas Heinisch CommitDate: Thu Mar 30 07:29:04 2023 + tdf#108188 - Use constant string for default page style Change-Id: I7c398c3dec044722e4552527de8553506cda54f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149730 Tested-by: Andreas Heinisch Reviewed-by: Andreas Heinisch diff --git a/sc/qa/unit/subsequent_filters_test3.cxx b/sc/qa/unit/subsequent_filters_test3.cxx index 7b2407c304b0..400a2fbcdd2c 100644 --- a/sc/qa/unit/subsequent_filters_test3.cxx +++ b/sc/qa/unit/subsequent_filters_test3.cxx @@ -34,6 +34,8 @@ #include #include #include +#include +#include #include #include @@ -1732,7 +1734,8 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest3, testTdf108188_pagestyle) // Without the accompanying fix in place, the page styles are always used ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); CPPUNIT_ASSERT(pStylePool->Find(aTestPageStyle, SfxStyleFamily::Page)->IsUsed()); -CPPUNIT_ASSERT(!pStylePool->Find("Default", SfxStyleFamily::Page)->IsUsed()); +CPPUNIT_ASSERT( +!pStylePool->Find(ScResId(STR_STYLENAME_STANDARD), SfxStyleFamily::Page)->IsUsed()); } CPPUNIT_PLUGIN_IMPLEMENT();
[Libreoffice-commits] core.git: include/svx svx/source sw/qa sw/source
include/svx/xoutbmp.hxx|3 - svx/source/xoutdev/_xoutbmp.cxx| 12 - sw/qa/extras/htmlexport/data/reqif-transparent-tif-img.odt |binary sw/qa/extras/htmlexport/htmlexport.cxx | 23 + sw/source/filter/html/htmlflywriter.cxx| 31 +++-- 5 files changed, 55 insertions(+), 14 deletions(-) New commits: commit 8e97ef854fb225dac37185c1911894b7d206fa8d Author: Mike Kaganski AuthorDate: Thu Mar 30 09:24:26 2023 +0300 Commit: Mike Kaganski CommitDate: Thu Mar 30 07:53:15 2023 + sw reqif-xhtml export: fix export of transparent TIF Since commit 22b50f1937de67e4ad9e692d6964aa5b8d33af7a (use libtiff for tiff import, 2022-05-21), transparent TIFs are imported correctly. As the result, reqif export started to output the transparent TIF images as GIFs, because XOutFlags::UseGifIfSensible handles case of transparency, and XOutFlags::UseNativeIfPossible didn't handle TIF. Additionally, the resulting mediatype was reported incorrectly: 1. Handle TIFs in XOutBitmap::WriteGraphic when XOutFlags::UseNativeIfPossible is specified. 2. Return the corrected mediatype from XOutBitmap::WriteGraphic, to inform the caller about the possible change. 3. Remove the XOutFlags::UseGifIfSensible flag when doing the reqif export, to avoid the format change at all. Change-Id: I99f7cfb8d12ef66d372700ec810bd8b269868ffd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149744 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/include/svx/xoutbmp.hxx b/include/svx/xoutbmp.hxx index 43a666d06277..d2137f670c8a 100644 --- a/include/svx/xoutbmp.hxx +++ b/include/svx/xoutbmp.hxx @@ -59,7 +59,8 @@ public: static ErrCode WriteGraphic( const Graphic& rGraphic, OUString& rFileName, const OUString& rFilterName, const XOutFlags nFlags, const Size* pMtfSize_100TH_MM = nullptr, - const css::uno::Sequence< css::beans::PropertyValue >* pFilterData = nullptr); + const css::uno::Sequence< css::beans::PropertyValue >* pFilterData = nullptr, + OUString* pMediaType = nullptr ); static bool GraphicToBase64(const Graphic& rGraphic, OUString& rOUString, bool bAddPrefix = true, ConvertDataFormat aTargetFormat = ConvertDataFormat::Unknown); diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx index 7241fedfe043..d392426defb5 100644 --- a/svx/source/xoutdev/_xoutbmp.cxx +++ b/svx/source/xoutdev/_xoutbmp.cxx @@ -30,10 +30,13 @@ #include #include +#include + constexpr OUStringLiteral FORMAT_BMP = u"bmp"; constexpr OUStringLiteral FORMAT_GIF = u"gif"; constexpr OUStringLiteral FORMAT_JPG = u"jpg"; constexpr OUStringLiteral FORMAT_PNG = u"png"; +constexpr OUStringLiteral FORMAT_TIF = u"tif"; constexpr OUStringLiteral FORMAT_WEBP = u"webp"; using namespace com::sun::star; @@ -104,7 +107,8 @@ Graphic XOutBitmap::MirrorGraphic( const Graphic& rGraphic, const BmpMirrorFlags ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName, const OUString& rFilterName, const XOutFlags nFlags, const Size* pMtfSize_100TH_MM, - const css::uno::Sequence< css::beans::PropertyValue >* pFilterData ) + const css::uno::Sequence< css::beans::PropertyValue >* pFilterData, + OUString* pMediaType ) { if( rGraphic.GetType() == GraphicType::NONE ) return ERRCODE_NONE; @@ -183,6 +187,7 @@ ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName, case GfxLinkType::NativeJpg: aExt = FORMAT_JPG; break; case GfxLinkType::NativePng: aExt = FORMAT_PNG; break; +case GfxLinkType::NativeTif: aExt = FORMAT_TIF; break; case GfxLinkType::NativeWebp: aExt = FORMAT_WEBP; break; default: @@ -197,6 +202,9 @@ ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName, if( !(nFlags & XOutFlags::DontAddExtension) ) aURL.setExtension( aExt ); rFileName = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ); +if (pMediaType) +if (auto xGraphic = rGraphic.GetXGraphic().query()) +xGraphic->getPropertyValue("MimeType") >>= *pMediaType; SfxMedium aMedium(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::WRITE | StreamMode::SHARE_DENYNONE | StreamMode::TRUNC); SvStream* pOStm = aMedium.GetOutStream(); @@
[Libreoffice-commits] core.git: include/svx svx/source
include/svx/strings.hrc |3 +-- svx/source/tbxctrls/bulletsnumbering.cxx | 11 +-- 2 files changed, 2 insertions(+), 12 deletions(-) New commits: commit 2ca71b5c6e0374254e7c75c75e54fa6a8caebfde Author: Arvind K AuthorDate: Fri Mar 3 01:05:54 2023 +0530 Commit: Heiko Tietze CommitDate: Thu Mar 30 08:10:34 2023 + tdf#146748 Change 'More Numbering/Bullets' options to 'Customize' Change-Id: Ia9ae20b8c73ddd762424c99eedbaf145fed81935 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148142 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc index c54d99529ee3..b5b64bfd6304 100644 --- a/include/svx/strings.hrc +++ b/include/svx/strings.hrc @@ -1107,8 +1107,7 @@ #define RID_SVXSTR_DEFAULT NC_("RID_SVXSTR_DEFAULT", "Default") #define RID_SVXSTR_FRAME NC_("RID_SVXSTR_FRAME", "Borders") #define RID_SVXSTR_FRAME_STYLE NC_("RID_SVXSTR_FRAME_STYLE", "Border Style") -#define RID_SVXSTR_MORENUMBERING NC_("RID_SVXSTR_MORENUMBERING", "More Numbering...") -#define RID_SVXSTR_MOREBULLETS NC_("RID_SVXSTR_MOREBULLETS", "More Bullets...") +#define RID_SVXSTR_CUSTOMIZE NC_("RID_SVXSTR_CUSTOMIZE", "Customize...") #define RID_SVXSTR_BY_AUTHOR NC_("RID_SVXSTR_BY_AUTHOR", "By author") #define RID_SVXSTR_PAGES NC_("RID_SVXSTR_PAGES", "Pages") #define RID_SVXSTR_CLEARFORM NC_("RID_SVXSTR_CLEARFORM", "Clear formatting") diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx b/svx/source/tbxctrls/bulletsnumbering.cxx index a9195cd5a695..1a8636380921 100644 --- a/svx/source/tbxctrls/bulletsnumbering.cxx +++ b/svx/source/tbxctrls/bulletsnumbering.cxx @@ -107,22 +107,13 @@ NumberingPopup::NumberingPopup(NumberingToolBoxControl& rController, mxValueSet->SetOutputSizePixel(aSize); mxValueSet->SetColor(Application::GetSettings().GetStyleSettings().GetFieldColor()); -OUString aMoreItemText; +OUString aMoreItemText = SvxResId( RID_SVXSTR_CUSTOMIZE ); if ( mePageType == NumberingPageType::BULLET ) -{ -aMoreItemText = SvxResId( RID_SVXSTR_MOREBULLETS ); AddStatusListener( ".uno:CurrentBulletListType" ); -} else if ( mePageType == NumberingPageType::SINGLENUM ) -{ -aMoreItemText = SvxResId( RID_SVXSTR_MORENUMBERING ); AddStatusListener( ".uno:CurrentNumListType" ); -} else -{ -aMoreItemText = SvxResId( RID_SVXSTR_MORE ); AddStatusListener( ".uno:CurrentOutlineType" ); -} auto xImage = vcl::CommandInfoProvider::GetXGraphicForCommand(".uno:OutlineBullet", mrController.getFrameInterface()); mxMoreButton->set_image(xImage);
[Libreoffice-commits] core.git: starmath/source stoc/source svl/qa svl/source
starmath/source/ooxmlimport.cxx|9 +--- starmath/source/utility.cxx|6 -- stoc/source/inspect/introspection.cxx |4 - stoc/source/security/permissions.cxx | 14 ++ stoc/source/uriproc/UriReference.cxx |6 -- stoc/source/uriproc/UriReferenceFactory.cxx| 18 ++-- svl/qa/unit/test_URIHelper.cxx | 41 +++ svl/source/misc/gridprinter.cxx|3 - svl/source/misc/urihelper.cxx |3 - svl/source/numbers/zforlist.cxx| 45 ++--- svl/source/numbers/zformat.cxx | 16 ++- svl/source/passwordcontainer/passwordcontainer.cxx |7 +-- 12 files changed, 63 insertions(+), 109 deletions(-) New commits: commit aa8fb790e8d3f975c7ffadcb5a4fa390186c6d5d Author: Noel Grandin AuthorDate: Thu Mar 30 10:19:35 2023 +0200 Commit: Noel Grandin CommitDate: Thu Mar 30 09:26:58 2023 + loplugin:stringadd in starmath..svl when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: Id8f229c3a5223dee8d2710caf15d4612594fc763 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149748 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx index f040265ad31d..4023a5e652ac 100644 --- a/starmath/source/ooxmlimport.cxx +++ b/starmath/source/ooxmlimport.cxx @@ -355,8 +355,7 @@ OUString SmOoxmlImport::handleD() opening = "left none "; if( closing.isEmpty()) closing = " right none"; -OUStringBuffer ret; -ret.append( opening ); +OUStringBuffer ret( opening ); bool first = true; while( m_rStream.findTag( OPENING( M_TOKEN( e { @@ -378,9 +377,9 @@ OUString SmOoxmlImport::handleEqArr() { // there must be at least one m:e if( !ret.isEmpty()) ret.append("#"); -ret.append(" "); -ret.append(readOMathArgInElement( M_TOKEN( e ))); -ret.append(" "); +ret.append(" " ++ readOMathArgInElement( M_TOKEN( e )) ++ " "); } while( !m_rStream.atEnd() && m_rStream.findTag( OPENING( M_TOKEN( e ; m_rStream.ensureClosingTag( M_TOKEN( eqArr )); return "stack {" + ret + "}"; diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx index 5c957899092e..4a9225f6b363 100644 --- a/starmath/source/utility.cxx +++ b/starmath/source/utility.cxx @@ -82,13 +82,11 @@ OUString lcl_GetStringItem(const vcl::Font &rFont) if (IsItalic( rFont )) { -aString.append(", "); -aString.append(SmResId(RID_FONTITALIC)); +aString.append(", " + SmResId(RID_FONTITALIC)); } if (IsBold( rFont )) { -aString.append(", "); -aString.append(SmResId(RID_FONTBOLD)); +aString.append(", " + SmResId(RID_FONTBOLD)); } return aString.makeStringAndClear(); diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index c219e8030f0c..e6c44c4748ba 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -1441,8 +1441,8 @@ struct TypeKey { // those matches, too: OUStringBuffer b(static_cast(theTypes.size() * 64)); for (const css::uno::Type& rType : theTypes) { -b.append(rType.getTypeName()); -b.append('*'); // arbitrary delimiter not used by type grammar +b.append(rType.getTypeName() ++ "*"); // arbitrary delimiter not used by type grammar } types = b.makeStringAndClear(); } diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx index 12f39ce3d83a..48a1f907f01c 100644 --- a/stoc/source/security/permissions.cxx +++ b/stoc/source/security/permissions.cxx @@ -238,13 +238,11 @@ OUString SocketPermission::toString() const { OUStringBuffer buf( 48 ); // host -buf.append( "com.sun.star.connection.SocketPermission (host=\"" ); -buf.append( m_host ); +buf.append( "com.sun.star.connection.SocketPermission (host=\"" ++ m_host ); if (m_resolvedHost) { -buf.append( '[' ); -buf.append( m_ip ); -buf.append( ']' ); +buf.append( "[" + m_ip + "]" ); } // port if (0 != m_lowerPort || 65535 != m_upperPort) @@ -260,9 +258,9 @@ OUString SocketPermission::toString() const } } // actions -buf.append( "\", actions=\"" ); -buf.append( makeStrings( m_actions, s_actions ) ); -buf.append( "\")" ); +buf.append( "\", actions=\"" ++ makeStrings( m_actions, s_actions ) ++ "\")" ); return buf.makeStringAndClear(); } diff --git a/stoc/source/uriproc/UriReference.cxx b/stoc/source/uriproc/UriReference.cxx index 9c7c7962c66a..fc272014143a 100644 --- a/s
[Libreoffice-commits] core.git: svx/source sw/source vcl/inc vcl/source
svx/source/xoutdev/_xoutbmp.cxx |4 + sw/source/filter/html/htmlflywriter.cxx |6 - vcl/inc/graphic/UnoGraphicDescriptor.hxx| 50 +++ vcl/source/graphic/UnoGraphicDescriptor.cxx | 90 +--- 4 files changed, 72 insertions(+), 78 deletions(-) New commits: commit ab07ba6a9f89aedf4c33fbe911ed8a7d55ced1dd Author: Mike Kaganski AuthorDate: Thu Mar 30 10:13:12 2023 +0300 Commit: Mike Kaganski CommitDate: Thu Mar 30 09:39:32 2023 + Report correct mimetypes for TIF and EMF Change-Id: I2eeb07780e3581eea29a9ad98b493de4e78a5d65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149745 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx index d392426defb5..9fbb4d5690b5 100644 --- a/svx/source/xoutdev/_xoutbmp.cxx +++ b/svx/source/xoutdev/_xoutbmp.cxx @@ -155,6 +155,10 @@ ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName, } rFileName = aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE); +if (pMediaType) +if (auto xGraphic = rGraphic.GetXGraphic().query()) +xGraphic->getPropertyValue("MimeType") >>= *pMediaType; + SfxMedium aMedium(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::WRITE | StreamMode::SHARE_DENYNONE | StreamMode::TRUNC); SvStream* pOStm = aMedium.GetOutStream(); diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx index acfeec1edaec..85cae063cda5 100644 --- a/sw/source/filter/html/htmlflywriter.cxx +++ b/sw/source/filter/html/htmlflywriter.cxx @@ -1974,8 +1974,6 @@ static SwHTMLWriter& OutHTML_FrameFormatGrfNode( SwHTMLWriter& rWrt, const SwFra if (!rGraphic.isAvailable()) const_cast(rGraphic).makeAvailable(); -OUString aMimeTypeOverride; - if (rWrt.mbReqIF && bWritePNGFallback) { // ReqIF: force native data if possible. @@ -1987,7 +1985,6 @@ static SwHTMLWriter& OutHTML_FrameFormatGrfNode( SwHTMLWriter& rWrt, const SwFra else if (rGraphic.GetGfxLink().IsEMF()) { aFilterName = "emf"; -aMimeTypeOverride = "image/x-emf"; // avoid image/x-wmf } else if (pVectorGraphicData && pVectorGraphicData->getType() == VectorGraphicDataType::Wmf) { @@ -1996,7 +1993,6 @@ static SwHTMLWriter& OutHTML_FrameFormatGrfNode( SwHTMLWriter& rWrt, const SwFra else if (rGraphic.GetGfxLink().GetType() == GfxLinkType::NativeTif) { aFilterName = "tif"; -aMimeTypeOverride = "image/tiff"; // avoid image/x-vclgraphic } } @@ -2010,8 +2006,6 @@ static SwHTMLWriter& OutHTML_FrameFormatGrfNode( SwHTMLWriter& rWrt, const SwFra aGraphicURL = URIHelper::SmartRel2Abs( INetURLObject(rWrt.GetBaseURL()), aGraphicURL, URIHelper::GetMaybeFileHdl() ); -if (!aMimeTypeOverride.isEmpty()) -aMimeType = aMimeTypeOverride; } else { diff --git a/vcl/inc/graphic/UnoGraphicDescriptor.hxx b/vcl/inc/graphic/UnoGraphicDescriptor.hxx index d57bb3a65d28..98b953b443e5 100644 --- a/vcl/inc/graphic/UnoGraphicDescriptor.hxx +++ b/vcl/inc/graphic/UnoGraphicDescriptor.hxx @@ -27,31 +27,31 @@ #include #include -#define MIMETYPE_BMP"image/x-MS-bmp" -#define MIMETYPE_GIF"image/gif" -#define MIMETYPE_JPG"image/jpeg" -#define MIMETYPE_PCD"image/x-photo-cd" -#define MIMETYPE_PCX"image/x-pcx" -#define MIMETYPE_PNG"image/png" -#define MIMETYPE_TIF"image/tiff" -#define MIMETYPE_XBM"image/x-xbitmap" -#define MIMETYPE_XPM"image/x-xpixmap" -#define MIMETYPE_PBM"image/x-portable-bitmap" -#define MIMETYPE_PGM"image/x-portable-graymap" -#define MIMETYPE_PPM"image/x-portable-pixmap" -#define MIMETYPE_RAS"image/x-cmu-raster" -#define MIMETYPE_TGA"image/x-targa" -#define MIMETYPE_PSD"image/vnd.adobe.photoshop" -#define MIMETYPE_EPS"image/x-eps" -#define MIMETYPE_DXF"image/vnd.dxf" -#define MIMETYPE_MET"image/x-met" -#define MIMETYPE_PCT"image/x-pict" -#define MIMETYPE_SVM"image/x-svm" -#define MIMETYPE_WMF"image/x-wmf" -#define MIMETYPE_EMF"image/x-emf" -#define MIMETYPE_SVG"image/svg+xml" -#define MIMETYPE_PDF"application/pdf" -#define MIMETYPE_WEBP "image/webp" +inline constexpr OUStringLiteral MIMETYPE_BMP = u"image/x-MS-bmp"; +inline constexpr OUStringLiteral MIMETYPE_GIF = u"image/gif"; +inline constexpr OUStringLiteral MIMETYPE_JPG = u"image/jpeg"; +inline constexpr OUStringLiteral
[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.5' - include/svx svx/source sw/qa sw/source
include/svx/xoutbmp.hxx|3 - svx/source/xoutdev/_xoutbmp.cxx| 12 - sw/qa/extras/htmlexport/data/reqif-transparent-tif-img.odt |binary sw/qa/extras/htmlexport/htmlexport.cxx | 23 + sw/source/filter/html/htmlflywriter.cxx| 31 +++-- 5 files changed, 55 insertions(+), 14 deletions(-) New commits: commit a222008d5452c2ace6779b38d06539d085bd3a66 Author: Mike Kaganski AuthorDate: Thu Mar 30 09:24:26 2023 +0300 Commit: Mike Kaganski CommitDate: Thu Mar 30 09:44:18 2023 + sw reqif-xhtml export: fix export of transparent TIF Since commit 22b50f1937de67e4ad9e692d6964aa5b8d33af7a (use libtiff for tiff import, 2022-05-21), transparent TIFs are imported correctly. As the result, reqif export started to output the transparent TIF images as GIFs, because XOutFlags::UseGifIfSensible handles case of transparency, and XOutFlags::UseNativeIfPossible didn't handle TIF. Additionally, the resulting mediatype was reported incorrectly: 1. Handle TIFs in XOutBitmap::WriteGraphic when XOutFlags::UseNativeIfPossible is specified. 2. Return the corrected mediatype from XOutBitmap::WriteGraphic, to inform the caller about the possible change. 3. Remove the XOutFlags::UseGifIfSensible flag when doing the reqif export, to avoid the format change at all. Change-Id: I99f7cfb8d12ef66d372700ec810bd8b269868ffd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149744 Tested-by: Jenkins Reviewed-by: Mike Kaganski Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149758 Tested-by: Mike Kaganski diff --git a/include/svx/xoutbmp.hxx b/include/svx/xoutbmp.hxx index 43a666d06277..d2137f670c8a 100644 --- a/include/svx/xoutbmp.hxx +++ b/include/svx/xoutbmp.hxx @@ -59,7 +59,8 @@ public: static ErrCode WriteGraphic( const Graphic& rGraphic, OUString& rFileName, const OUString& rFilterName, const XOutFlags nFlags, const Size* pMtfSize_100TH_MM = nullptr, - const css::uno::Sequence< css::beans::PropertyValue >* pFilterData = nullptr); + const css::uno::Sequence< css::beans::PropertyValue >* pFilterData = nullptr, + OUString* pMediaType = nullptr ); static bool GraphicToBase64(const Graphic& rGraphic, OUString& rOUString, bool bAddPrefix = true, ConvertDataFormat aTargetFormat = ConvertDataFormat::Unknown); diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx index 7241fedfe043..a67b2b4da277 100644 --- a/svx/source/xoutdev/_xoutbmp.cxx +++ b/svx/source/xoutdev/_xoutbmp.cxx @@ -30,10 +30,13 @@ #include #include +#include + constexpr OUStringLiteral FORMAT_BMP = u"bmp"; constexpr OUStringLiteral FORMAT_GIF = u"gif"; constexpr OUStringLiteral FORMAT_JPG = u"jpg"; constexpr OUStringLiteral FORMAT_PNG = u"png"; +constexpr OUStringLiteral FORMAT_TIF = u"tif"; constexpr OUStringLiteral FORMAT_WEBP = u"webp"; using namespace com::sun::star; @@ -104,7 +107,8 @@ Graphic XOutBitmap::MirrorGraphic( const Graphic& rGraphic, const BmpMirrorFlags ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName, const OUString& rFilterName, const XOutFlags nFlags, const Size* pMtfSize_100TH_MM, - const css::uno::Sequence< css::beans::PropertyValue >* pFilterData ) + const css::uno::Sequence< css::beans::PropertyValue >* pFilterData, + OUString* pMediaType ) { if( rGraphic.GetType() == GraphicType::NONE ) return ERRCODE_NONE; @@ -183,6 +187,7 @@ ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName, case GfxLinkType::NativeJpg: aExt = FORMAT_JPG; break; case GfxLinkType::NativePng: aExt = FORMAT_PNG; break; +case GfxLinkType::NativeTif: aExt = FORMAT_TIF; break; case GfxLinkType::NativeWebp: aExt = FORMAT_WEBP; break; default: @@ -197,6 +202,9 @@ ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName, if( !(nFlags & XOutFlags::DontAddExtension) ) aURL.setExtension( aExt ); rFileName = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ); +if (pMediaType) +if (uno::Reference xGraphic{ rGraphic.GetXGraphic(), uno::UNO_QUERY }) +xGraphic->getPropertyValue("MimeType") >>= *pMediaType; SfxMedium aMedium(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), StreamMode::WRI
[Libreoffice-commits] core.git: sfx2/source
sfx2/source/appl/linkmgr2.cxx |6 ++ sfx2/source/appl/newhelp.cxx | 11 +++ sfx2/source/appl/sfxhelp.cxx |5 + sfx2/source/control/unoctitm.cxx |4 +--- sfx2/source/dialog/splitwin.cxx| 15 +++ sfx2/source/doc/DocumentMetadataAccess.cxx |3 +-- sfx2/source/view/viewfrm.cxx | 10 +- 7 files changed, 20 insertions(+), 34 deletions(-) New commits: commit 1c8d43d8a9062dbe2cff52b61414e8be6d3b646d Author: Noel Grandin AuthorDate: Thu Mar 30 10:17:04 2023 +0200 Commit: Noel Grandin CommitDate: Thu Mar 30 09:45:16 2023 + loplugin:stringadd in sfx2 when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: I72c2afa0b6bddfe00fe09f34eb1b1bf2177461d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149747 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx index 977ed98518fe..aeefbf10da20 100644 --- a/sfx2/source/appl/linkmgr2.cxx +++ b/sfx2/source/appl/linkmgr2.cxx @@ -458,16 +458,14 @@ void LinkManager::InsertFileLink( return; OUStringBuffer aBuf(64); -aBuf.append(rFileNm); -aBuf.append(sfx2::cTokenSeparator); +aBuf.append(rFileNm + OUStringChar(sfx2::cTokenSeparator)); if (pRange) aBuf.append(*pRange); if (pFilterNm) { -aBuf.append(sfx2::cTokenSeparator); -aBuf.append(*pFilterNm); +aBuf.append(OUStringChar(sfx2::cTokenSeparator) + *pFilterNm); } OUString aCmd = aBuf.makeStringAndClear(); diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index fe84c8f44a17..dcd710e16704 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -575,8 +575,7 @@ void IndexTabPage_Impl::InitializeIndex() try { -OUStringBuffer aURL(HELP_URL); -aURL.append(sFactory); +OUStringBuffer aURL(HELP_URL + sFactory); AppendConfigToken(aURL, true); Content aCnt( aURL.makeStringAndClear(), Reference< css::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); @@ -1002,9 +1001,7 @@ void SearchTabPage_Impl::Search() std::unique_ptr xWaitCursor(new weld::WaitObject(m_pIdxWin->GetFrameWeld())); ClearSearchResults(); RememberSearchText( aSearchText ); -OUStringBuffer aSearchURL(HELP_URL); -aSearchURL.append(aFactory); -aSearchURL.append(HELP_SEARCH_TAG); +OUStringBuffer aSearchURL(HELP_URL + aFactory + HELP_SEARCH_TAG); if (!m_xFullWordsCB->get_active()) aSearchText = sfx2::PrepareSearchString( aSearchText, xBreakIterator, true ); aSearchURL.append(aSearchText); @@ -1216,9 +1213,7 @@ OUString SfxHelpWindow_Impl::buildHelpURL(std::u16string_view sFactory, std::u16string_view sAnchor) { OUStringBuffer sHelpURL(256); -sHelpURL.append(HELP_URL); -sHelpURL.append(sFactory); -sHelpURL.append(sContent); +sHelpURL.append(HELP_URL + sFactory + sContent); AppendConfigToken(sHelpURL, true/*bUseQuestionMark*/); if (!sAnchor.empty()) sHelpURL.append(sAnchor); diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 01b35d5ca0c9..d49c76e822a8 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -524,10 +524,7 @@ OUString SfxHelp::CreateHelpURL_Impl( const OUString& aCommandURL, const OUStrin AppendConfigToken( aHelpURL, true ); if ( bHasAnchor ) -{ -aHelpURL.append('#'); -aHelpURL.append(aAnchor); -} +aHelpURL.append("#" + aAnchor); return aHelpURL.makeStringAndClear(); } diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index c340db4005fe..346528d4b0d9 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -893,9 +893,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra if (!comphelper::LibreOfficeKit::isActive()) return; -OUStringBuffer aBuffer; -aBuffer.append(aEvent.FeatureURL.Complete); -aBuffer.append(u'='); +OUStringBuffer aBuffer(aEvent.FeatureURL.Complete + "="); if (aEvent.FeatureURL.Path == "Bold" || aEvent.FeatureURL.Path == "CenterPara" || diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index 2abedce119a4..aac6c294b7ff 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -298,12 +298,12 @@ void SfxSplitWindow::dispose() void SfxSplitWindow::SaveConfig_Impl() { // Save configuration -OUStringBuffer aWinData; -aWinData.append('V'); -aWinData.append(static_cast(VERSION)); -aWinData.append(','); -aWinData.append(static_cast(pEmptyWin->nState)); -aWinData.append(','); +OUStringBuffer aWinData =
[Libreoffice-commits] core.git: chart2/source
chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx |2 chart2/source/controller/dialogs/DataBrowserModel.cxx |2 chart2/source/inc/DataSeriesHelper.hxx | 20 -- chart2/source/inc/DiagramHelper.hxx |2 chart2/source/tools/DataSeriesHelper.cxx| 70 ++ chart2/source/tools/DiagramHelper.cxx |2 6 files changed, 29 insertions(+), 69 deletions(-) New commits: commit efbbc141b0db77510b41b452bf3931fc3c9ecc7e Author: Noel Grandin AuthorDate: Wed Mar 29 16:45:20 2023 +0200 Commit: Noel Grandin CommitDate: Thu Mar 30 11:14:30 2023 + use more concrete types in chart2 Change-Id: Iaefad282d40c83f58758b41db9b14f6e95552354 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149742 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx index ed742df89d88..ac9a53ce331f 100644 --- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx @@ -295,7 +295,7 @@ Any WrappedAttachedAxisProperty::getPropertyValue( const Reference< beans::XProp { Any aRet; -uno::Reference< chart2::XDataSeries > xDataSeries( xInnerPropertySet, uno::UNO_QUERY ); +rtl::Reference< ::chart::DataSeries > xDataSeries( dynamic_cast<::chart::DataSeries*>(xInnerPropertySet.get()) ); bool bAttachedToMainAxis = ::chart::DiagramHelper::isSeriesAttachedToMainAxis( xDataSeries ); if( bAttachedToMainAxis ) aRet <<= css::chart::ChartAxisAssign::PRIMARY_Y; diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx index c0a89a2621d2..63ec6f31fc16 100644 --- a/chart2/source/controller/dialogs/DataBrowserModel.cxx +++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx @@ -460,7 +460,7 @@ void DataBrowserModel::removeDataSeriesOrComplexCategoryLevel( sal_Int32 nAtColu // Collect all the remaining data sequences in the same chart type. The // deleted data series is already gone by this point. std::vector > aAllDataSeqs = -DataSeriesHelper::getAllDataSequences(xSeriesCnt->getDataSeries()); +DataSeriesHelper::getAllDataSequences(xSeriesCnt->getDataSeries2()); // Check if the sequences to be deleted are still referenced by any of // the other data series. If not, mark them for deletion. diff --git a/chart2/source/inc/DataSeriesHelper.hxx b/chart2/source/inc/DataSeriesHelper.hxx index 2de09db7cd76..16bd9d771973 100644 --- a/chart2/source/inc/DataSeriesHelper.hxx +++ b/chart2/source/inc/DataSeriesHelper.hxx @@ -84,10 +84,6 @@ OOO_DLLPUBLIC_CHARTTOOLS std::vector< OOO_DLLPUBLIC_CHARTTOOLS std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > -getAllDataSequences( -const css::uno::Sequence >& aSeries ); -OOO_DLLPUBLIC_CHARTTOOLS -std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > getAllDataSequences( const std::vector >& aSeries ); @@ -109,11 +105,11 @@ OOO_DLLPUBLIC_CHARTTOOLS void setStackModeAtSeries( StackMode eStackMode ); OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 getAttachedAxisIndex( -const css::uno::Reference< css::chart2::XDataSeries > & xSeries ); +const rtl::Reference< ::chart::DataSeries > & xSeries ); /// @param nAxisIndex, if -1 it is determined by the given data series via getAttachedAxisIndex OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 getNumberFormatKeyFromAxis( -const css::uno::Reference< css::chart2::XDataSeries > & xSeries, +const rtl::Reference< ::chart::DataSeries > & xSeries, const rtl::Reference< ::chart::BaseCoordinateSystem > & xCorrespondingCoordinateSystem, sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex = -1 ); @@ -121,7 +117,7 @@ OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 getNumberFormatKeyFromAxis( OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference< ::chart::BaseCoordinateSystem > getCoordinateSystemOfSeries( -const css::uno::Reference< css::chart2::XDataSeries > & xSeries, +const rtl::Reference< ::chart::DataSeries > & xSeries, const rtl::Reference< ::chart::Diagram > & xDiagram ); OOO_DLLPUBLIC_CHARTTOOLS @@ -135,20 +131,16 @@ OOO_DLLPUBLIC_CHARTTOOLS void deleteSeries( const rtl::Reference< ::chart::ChartType > & xChartType ); OOO_DLLPUBLIC_CHARTTOOLS void switchSymbolsOnOrOff( -const css::uno::Reference< css::beans::XPropertySet > & xSeriesProperties, +const rtl::Reference< ::chart::DataSeries > & xSeries, bool bSymbolsOn, sal_Int32 nSeriesIndex ); OOO_DLLPUBLIC_CHARTTOOLS void switchLinesOnOrOff( -const css::uno::Reference< css::beans::XPropertySet > & xSeriesProperties, +const rtl::Reference< ::ch
[Libreoffice-commits] core.git: include/editeng
include/editeng/tstpitem.hxx |1 + 1 file changed, 1 insertion(+) New commits: commit 6b19f32252f8ba5540ce3b1e38f8ac6112421906 Author: Sarper Akdemir AuthorDate: Thu Mar 30 01:37:07 2023 +0300 Commit: Sarper Akdemir CommitDate: Thu Mar 30 11:30:10 2023 + add docstring for unclear default distance property in SvxTabStopItem Change-Id: I6c9eef0a2167f738cdab8171d082becfca401d25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149740 Tested-by: Jenkins Reviewed-by: Sarper Akdemir diff --git a/include/editeng/tstpitem.hxx b/include/editeng/tstpitem.hxx index 4c015d6677ec..037e76636641 100644 --- a/include/editeng/tstpitem.hxx +++ b/include/editeng/tstpitem.hxx @@ -92,6 +92,7 @@ typedef o3tl::sorted_vector SvxTabStopArr; class EDITENG_DLLPUBLIC SvxTabStopItem final : public SfxPoolItem { SvxTabStopArr maTabStops; +/// Defines default tab width for tabs without dedicated tab stop in the paragraph. sal_Int32 mnDefaultDistance = 0; public:
[Libreoffice-commits] core.git: 2 commits - sdext/source sd/source ucbhelper/source unotools/source unoxml/source uui/source
sd/source/console/PresenterToolBar.cxx|4 sd/source/filter/html/htmlex.cxx | 380 ++ sd/source/filter/ppt/pptinanimations.cxx |3 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx | 40 - sd/source/ui/framework/tools/FrameworkHelper.cxx |3 sd/source/ui/remotecontrol/ImagePreparer.cxx |6 sd/source/ui/unoidl/unopage.cxx |8 sdext/source/pdfimport/odf/odfemitter.cxx |6 sdext/source/pdfimport/pdfparse/pdfentries.cxx| 16 sdext/source/pdfimport/sax/emitcontext.cxx| 13 sdext/source/pdfimport/test/pdfunzip.cxx | 17 sdext/source/pdfimport/tree/drawtreevisiting.cxx | 43 - sdext/source/pdfimport/tree/style.cxx |6 sdext/source/pdfimport/tree/writertreevisiting.cxx| 40 - ucbhelper/source/client/proxydecider.cxx | 23 unotools/source/config/docinfohelper.cxx |9 unotools/source/i18n/localedatawrapper.cxx| 110 +--- unotools/source/i18n/textsearch.cxx |6 unotools/source/misc/datetime.cxx | 12 unoxml/source/xpath/xpathapi.cxx |8 uui/source/iahndl-authentication.cxx |3 uui/source/secmacrowarnings.cxx |4 22 files changed, 321 insertions(+), 439 deletions(-) New commits: commit f24d38de3c23479e79768cd3fcfe37692cee27e4 Author: Noel Grandin AuthorDate: Thu Mar 30 10:15:51 2023 +0200 Commit: Noel Grandin CommitDate: Thu Mar 30 11:38:07 2023 + loplugin:stringadd in sd/sdext when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: Ic95e72e1c857c6814d6e25b9820494cdfa535465 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149746 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sd/source/console/PresenterToolBar.cxx b/sd/source/console/PresenterToolBar.cxx index e05b0d44194b..5e7c770df208 100644 --- a/sd/source/console/PresenterToolBar.cxx +++ b/sd/source/console/PresenterToolBar.cxx @@ -1698,9 +1698,7 @@ OUString TimeFormatter::FormatTime (const oslDateTime& rTime) const sal_Int32 nMinutes (sal::static_int_cast(rTime.Minutes)); const sal_Int32 nSeconds(sal::static_int_cast(rTime.Seconds)); // Hours -sText.append(nHours); - -sText.append(":"); +sText.append(OUString::number(nHours) + ":"); // Minutes const OUString sMinutes (OUString::number(nMinutes)); diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 7b1cd3a4b6a6..e5cf1951b4f4 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -629,11 +629,11 @@ void HtmlExport::ExportSingleDocument() mnPagesWritten = 0; InitProgress(mnSdPageCount); -OUStringBuffer aStr(gaHTMLHeader); -aStr.append(DocumentMetadata()); -aStr.append("\r\n"); -aStr.append("\r\n"); -aStr.append(CreateBodyTag()); +OUStringBuffer aStr(gaHTMLHeader ++ DocumentMetadata() ++ "\r\n" +"\r\n" ++ CreateBodyTag()); for(sal_uInt16 nSdPage = 0; nSdPage < mnSdPageCount; ++nSdPage) { @@ -655,8 +655,7 @@ void HtmlExport::ExportSingleDocument() lclAppendStyle(aStr, u"h1", sStyle); -aStr.append(sTitleText); -aStr.append("\r\n"); +aStr.append(sTitleText + "\r\n"); // write outline text aStr.append(CreateTextForPage( pOutliner, pPage, true, pPage->GetPageBackgroundColor() )); @@ -669,11 +668,10 @@ void HtmlExport::ExportSingleDocument() if (!aNotesStr.isEmpty()) { -aStr.append("\r\n"); -aStr.append(RESTOHTML(STR_HTMLEXP_NOTES)); -aStr.append(":\r\n"); - -aStr.append(aNotesStr); +aStr.append("\r\n" ++ RESTOHTML(STR_HTMLEXP_NOTES) ++ ":\r\n" ++ aNotesStr); } } @@ -1089,13 +1087,13 @@ bool HtmlExport::CreateHtmlTextForPresPages() } // HTML head -OUStringBuffer aStr(gaHTMLHeader); -aStr.append(CreateMetaCharset()); -aStr.append(" "); -aStr.append(StringToHTMLString(maPageNames[nSdPage])); -aStr.append("\r\n"); -aStr.append("\r\n"); -aStr.append(CreateBodyTag()); +OUStringBuffer aStr(gaHTMLHeader ++ CreateMetaCharset() ++ " " ++ StringToHTMLString(maPageNames[nSdPage]) ++ "\r\n" +"\r\n" ++ CreateBodyTag()); // navigation bar aStr.append(CreateNavBar(nSdPage, true)); @@ -1103,8 +1101,7 @@ bool HtmlExport::CreateHtmlTextForPresPages() // page title
[Libreoffice-commits] core.git: test/source tools/source
test/source/a11y/AccessibilityTools.cxx |7 + test/source/lokcallback.cxx |6 +--- tools/source/fsys/urlobj.cxx| 44 tools/source/inet/inetmime.cxx | 18 +++-- 4 files changed, 31 insertions(+), 44 deletions(-) New commits: commit 8ad0669955228b2da64ecce34ea71d761d066864 Author: Noel Grandin AuthorDate: Thu Mar 30 10:23:07 2023 +0200 Commit: Noel Grandin CommitDate: Thu Mar 30 11:56:56 2023 + loplugin:stringadd in test..tools when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: I8619fa3280338afdfe75bdbfda6cb118d396e1c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149749 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/test/source/a11y/AccessibilityTools.cxx b/test/source/a11y/AccessibilityTools.cxx index b754f46d2f69..15a7cec17bc3 100644 --- a/test/source/a11y/AccessibilityTools.cxx +++ b/test/source/a11y/AccessibilityTools.cxx @@ -660,9 +660,7 @@ OUString AccessibilityTools::debugName(accessibility::XAccessibleAction* xAct) if (i > 0) r.append(", "); -r.append("description=\""); -r.append(xAct->getAccessibleActionDescription(i)); -r.append('"'); +r.append("description=\"" + xAct->getAccessibleActionDescription(i) + "\""); const auto& xKeyBinding = xAct->getAccessibleActionKeyBinding(i); if (xKeyBinding) @@ -689,8 +687,7 @@ OUString AccessibilityTools::debugName(accessibility::XAccessibleAction* xAct) r.append(""); if (keyStroke.Modifiers & awt::KeyModifier::SHIFT) r.append(""); -r.append(keyStroke.KeyChar); -r.append('"'); +r.append(OUStringChar(keyStroke.KeyChar) + "\""); } } r.append("]"); diff --git a/test/source/lokcallback.cxx b/test/source/lokcallback.cxx index 5af844f089ad..323b263b7e76 100644 --- a/test/source/lokcallback.cxx +++ b/test/source/lokcallback.cxx @@ -68,10 +68,8 @@ void TestLokCallbackWrapper::libreOfficeKitViewInvalidateTilesCallback( buf.append("EMPTY"); if (comphelper::LibreOfficeKit::isPartInInvalidation()) { -buf.append(", "); -buf.append(static_cast(nPart)); -buf.append(", "); -buf.append(static_cast(nMode)); +buf.append(", " + OString::number(static_cast(nPart)) + ", " + + OString::number(static_cast(nMode))); } callCallback(LOK_CALLBACK_INVALIDATE_TILES, buf.makeStringAndClear().getStr(), NO_VIEWID); } diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index 417618acbc94..ca5a014ecc56 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -2062,15 +2062,13 @@ bool INetURLObject::convertAbsToRel(OUString const & rTheAbsURIRef, // to the new relative URL: if (aSubject.m_aQuery.isPresent()) { -aSynRelURIRef.append('?'); -aSynRelURIRef.append(aSubject.decode(aSubject.m_aQuery, - eDecodeMechanism, eCharset)); +aSynRelURIRef.append("?" ++ aSubject.decode(aSubject.m_aQuery, eDecodeMechanism, eCharset)); } if (aSubject.m_aFragment.isPresent()) { -aSynRelURIRef.append('#'); -aSynRelURIRef.append(aSubject.decode(aSubject.m_aFragment, -eDecodeMechanism, eCharset)); +aSynRelURIRef.append("#" ++ aSubject.decode(aSubject.m_aFragment, eDecodeMechanism, eCharset)); } rTheRelURIRef = aSynRelURIRef.makeStringAndClear(); @@ -3354,8 +3352,9 @@ bool INetURLObject::insertName(std::u16string_view rTheName, } OUStringBuffer aNewPath(256); -aNewPath.append(pPathBegin, pPrefixEnd - pPathBegin); -aNewPath.append('/'); +aNewPath.append( +OUString::Concat(std::u16string_view(pPathBegin, pPrefixEnd - pPathBegin)) ++ "/"); encodeText(aNewPath, rTheName, PART_PCHAR, eMechanism, eCharset, true); if (bInsertSlash) { @@ -3607,9 +3606,7 @@ INetURLObject::getAbbreviated( OUStringBuffer aResult(aBuffer); if (pSuffixEnd != pBegin) aResult.append("..."); -aResult.append(aSegment); -aResult.append(aTrailer); -aResult.append(aRest); +aResult.append(aSegment + aTrailer + aRest); if (rStringWidth-> queryStringWidth(aResult.makeStringAndClear()) <= nWidth) @@ -3644,12 +3641,10 @@ INetURLObject::getAbbreviated( eMechanism, eCharset)); pPrefixBegin = p; -OUStringBuffer aResult(aBuffer); -aResult.append(aSegment); +
[Libreoffice-commits] core.git: officecfg/registry sc/uiconfig
officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |8 sc/uiconfig/scalc/popupmenu/freezepanes.xml |1 sc/uiconfig/scalc/ui/notebookbar.ui | 532 -- 3 files changed, 443 insertions(+), 98 deletions(-) New commits: commit 04ed7cbe53243a042ceeecc62212e73a910d7aef Author: Rafael Lima AuthorDate: Tue Mar 28 11:58:41 2023 -0300 Commit: Rafael Lima CommitDate: Thu Mar 30 13:28:39 2023 + tdf#150471 Remove duplicated Freeze commands from the Tabbed UI As discussed in the ticket, the commands "Freeze First Column" and "Freeze First Row" are duplicated in the Tabbed UI (under the View tab), since there's already a "Freeze Rows and Columns" command that already offers these 2 options. So this patch removes the "Freeze First Column" and "Freeze First Row" entries and keep the "Freeze Rows and Columns" comand. The label of the ".uno:FreezePanes" is also changed to "Freeze Panes" so that it doesn't occupy so much space in the tab. I set the ContextLabel to "Freeze Rows and Columns", so in the menu and context menus, the text shown remains "Freeze Rows and Columns". Change-Id: I57e6b22b103c2316ca0722878491b719e93b9bb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149650 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu index af796b0d2ed1..c5fc5aa8a68f 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu @@ -104,7 +104,13 @@ - Freeze ~Rows and Columns + Freeze Panes + + + Freeze Rows and Columns + + + Freeze Rows and Columns 1 diff --git a/sc/uiconfig/scalc/popupmenu/freezepanes.xml b/sc/uiconfig/scalc/popupmenu/freezepanes.xml index de32001b8fa1..85a5670c8509 100644 --- a/sc/uiconfig/scalc/popupmenu/freezepanes.xml +++ b/sc/uiconfig/scalc/popupmenu/freezepanes.xml @@ -8,6 +8,7 @@ * --> http://openoffice.org/2001/menu";> + diff --git a/sc/uiconfig/scalc/ui/notebookbar.ui b/sc/uiconfig/scalc/ui/notebookbar.ui index 304440b77467..f0749244a2db 100644 --- a/sc/uiconfig/scalc/ui/notebookbar.ui +++ b/sc/uiconfig/scalc/ui/notebookbar.ui @@ -1,5 +1,5 @@ - + @@ -2113,6 +2113,7 @@ False cmd/lc_insertfieldctrl.png + True False @@ -2155,6 +2156,7 @@ True +False .uno:AddDirect @@ -2197,6 +2199,7 @@ True +False .uno:NewDoc True @@ -2221,6 +2224,7 @@ True +False .uno:SaveAsTemplate True @@ -2286,6 +2290,7 @@ True +False .uno:Open True @@ -2345,6 +2350,7 @@ True +False .uno:OpenRemote True @@ -2410,6 +2416,7 @@ True +False .uno:Save True @@ -2453,6 +2460,7 @@ True +False .uno:SaveAs True @@ -2477,6 +2485,7 @@ True +False .uno:SaveAsRemote True @@ -254
[Libreoffice-commits] core.git: ucb/source
ucb/source/core/ucb.cxx | 15 +-- ucb/source/core/ucbstore.cxx |3 +-- ucb/source/regexp/regexp.cxx |6 ++ ucb/source/ucp/ext/ucpext_provider.cxx|6 ++ ucb/source/ucp/ftp/ftpurl.cxx |7 ++- ucb/source/ucp/hierarchy/hierarchydata.cxx|6 ++ ucb/source/ucp/inc/urihelper.hxx | 10 ++ ucb/source/ucp/tdoc/tdoc_content.cxx | 10 ++ ucb/source/ucp/webdav-curl/CurlSession.cxx|6 +++--- ucb/source/ucp/webdav-curl/CurlUri.cxx|7 ++- ucb/source/ucp/webdav-curl/webdavdatasupplier.cxx | 13 + 11 files changed, 28 insertions(+), 61 deletions(-) New commits: commit 6ffdcbdd29f014fcce290dfdb969fb6ff66a95ed Author: Noel Grandin AuthorDate: Thu Mar 30 10:23:19 2023 +0200 Commit: Noel Grandin CommitDate: Thu Mar 30 13:36:11 2023 + loplugin:stringadd in ucb when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: I2445a69dc46314c73f54c190a0c498c0309be06b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149750 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx index 26476a90562b..27c49c229c75 100644 --- a/ucb/source/core/ucb.cxx +++ b/ucb/source/core/ucb.cxx @@ -78,24 +78,21 @@ bool fillPlaceholders(OUString const & rInput, && p[0] == 'a' && p[1] == 'm' && p[2] == 'p' && p[3] == ';') { -aBuffer.append(pCopy, p - 1 - pCopy); -aBuffer.append('&'); +aBuffer.append(OUString::Concat(std::u16string_view(pCopy, p - 1 - pCopy)) + "&"); p += 4; pCopy = p; } else if (pEnd - p >= 3 && p[0] == 'l' && p[1] == 't' && p[2] == ';') { -aBuffer.append(pCopy, p - 1 - pCopy); -aBuffer.append('<'); +aBuffer.append(OUString::Concat(std::u16string_view(pCopy, p - 1 - pCopy)) + "<"); p += 3; pCopy = p; } else if (pEnd - p >= 3 && p[0] == 'g' && p[1] == 't' && p[2] == ';') { -aBuffer.append(pCopy, p - 1 - pCopy); -aBuffer.append('>'); +aBuffer.append(OUString::Concat(std::u16string_view(pCopy, p - 1 - pCopy)) + ">"); p += 3; pCopy = p; } @@ -124,8 +121,7 @@ bool fillPlaceholders(OUString const & rInput, } if (!bFound) return false; -aBuffer.append(pCopy, p - 1 - pCopy); -aBuffer.append(aValue); +aBuffer.append(std::u16string_view(pCopy, p - 1 - pCopy) + aValue); p = q + 1; pCopy = p; break; @@ -827,8 +823,7 @@ bool UniversalContentBroker::getContentProviderData( ContentProviderData aInfo; -OUStringBuffer aElemBuffer; -aElemBuffer.append( "['" ); +OUStringBuffer aElemBuffer( "['" ); makeAndAppendXMLName( aElemBuffer, rElem ); aElemBuffer.append( "']" ); diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx index 7a090788f776..882e0773ddd6 100644 --- a/ucb/source/core/ucbstore.cxx +++ b/ucb/source/core/ucbstore.cxx @@ -61,8 +61,7 @@ using namespace cppu; static OUString makeHierarchalNameSegment( std::u16string_view rIn ) { -OUStringBuffer aBuffer; -aBuffer.append( "['" ); +OUStringBuffer aBuffer( "['" ); size_t nCount = rIn.size(); for ( size_t n = 0; n < nCount; ++n ) diff --git a/ucb/source/regexp/regexp.cxx b/ucb/source/regexp/regexp.cxx index 0eeac4a4a80f..8b8dcbc85b8f 100644 --- a/ucb/source/regexp/regexp.cxx +++ b/ucb/source/regexp/regexp.cxx @@ -189,8 +189,7 @@ OUString Regexp::getRegexp() const break; case KIND_DOMAIN: -aBuffer.append("([^/?#]"); -aBuffer.append(sal_Unicode(m_bEmptyDomain ? '*' : '+')); +aBuffer.append("([^/?#]" + OUStringChar(sal_Unicode(m_bEmptyDomain ? '*' : '+'))); if (!m_aInfix.isEmpty()) appendStringLiteral(&aBuffer, m_aInfix); aBuffer.append("([/?#].*)?)"); @@ -220,8 +219,7 @@ OUString Regexp::getRegexp() const break; case KIND_DOMAIN: -aBuffer.append("[^/?#]"); -aBuffer.append( m_bEmptyDomain ? '*' : '+' ); +aBuffer.append("[^/?#]" + OUStringChar( m_bEmptyDomain ? '*' : '+'
[Libreoffice-commits] core.git: vcl/qa vcl/source vcl/unx
vcl/qa/cppunit/BitmapTest.cxx | 10 vcl/source/app/svmain.cxx | 14 vcl/source/control/field.cxx |9 vcl/source/control/fmtfield.cxx| 26 - vcl/source/control/throbber.cxx| 12 vcl/source/filter/ipdf/pdfdocument.cxx | 40 +- vcl/source/gdi/mtfxmldump.cxx |5 vcl/source/gdi/pdfobjectcopier.cxx |8 vcl/source/gdi/pdfwriter_impl.cxx | 530 +++-- vcl/source/gdi/print3.cxx |3 vcl/source/treelist/headbar.cxx|3 vcl/source/treelist/imap2.cxx |3 vcl/source/treelist/transfer.cxx | 10 vcl/source/window/printdlg.cxx |7 vcl/unx/generic/fontmanager/helper.cxx |7 vcl/unx/generic/print/glyphset.cxx |6 vcl/unx/generic/print/printerjob.cxx | 38 +- vcl/unx/generic/printer/jobdata.cxx| 55 +-- vcl/unx/generic/printer/ppdparser.cxx | 18 - vcl/unx/gtk3/gtkinst.cxx |6 20 files changed, 359 insertions(+), 451 deletions(-) New commits: commit a5084d15e1b72e303e1628fbff84432036b014a9 Author: Noel Grandin AuthorDate: Thu Mar 30 10:42:07 2023 +0200 Commit: Noel Grandin CommitDate: Thu Mar 30 13:36:59 2023 + loplugin:stringadd in vcl when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: I44ce7183e4b292269fac1e3d2217286bf5abe823 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149752 Tested-by: Noel Grandin Reviewed-by: Noel Grandin diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx index 98fabd569f24..dfcf44a8f6a7 100644 --- a/vcl/qa/cppunit/BitmapTest.cxx +++ b/vcl/qa/cppunit/BitmapTest.cxx @@ -330,13 +330,9 @@ void checkAndInsert(CRCHash& rHash, sal_uInt64 nCRC, const char* pLocation) auto it = rHash.find(nCRC); if (it != rHash.end()) { -OStringBuffer aBuf("CRC collision between "); -aBuf.append(pLocation); -aBuf.append(" and "); -aBuf.append(it->second); -aBuf.append(" hash is 0x"); -aBuf.append(static_cast(nCRC), 16); -CPPUNIT_FAIL(aBuf.toString().getStr()); +OString aBuf = OString::Concat("CRC collision between ") + pLocation + " and " + it->second + + " hash is 0x" + OString::number(static_cast(nCRC), 16); +CPPUNIT_FAIL(aBuf.getStr()); } rHash[nCRC] = pLocation; } diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 571be29579bc..ab461912724f 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -456,13 +456,13 @@ void DeInitVCL() nBadTopWindows--; else { -aBuf.append( "text = \"" ); -aBuf.append( OUStringToOString( pWin->GetText(), osl_getThreadTextEncoding() ) ); -aBuf.append( "\" type = \"" ); -aBuf.append( typeid(*pWin).name() ); -aBuf.append( "\", ptr = 0x" ); -aBuf.append( reinterpret_cast( pWin ), 16 ); -aBuf.append( "\n" ); +aBuf.append( "text = \"" ++ OUStringToOString( pWin->GetText(), osl_getThreadTextEncoding() ) ++ "\" type = \"" ++ typeid(*pWin).name() ++ "\", ptr = 0x" ++ OString::number(reinterpret_cast( pWin ), 16 ) ++ "\n" ); } } SAL_WARN_IF( nBadTopWindows!=0, "vcl", aBuf.getStr() ); diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 0bd9ebab713e..3de0eaf50165 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -314,8 +314,7 @@ bool ImplNumericGetValue( const OUString& rStr, sal_Int64& rValue, sal_Int64 nDenom = o3tl::toInt64(aStrDenom); if (nDenom == 0) return false; // Division by zero double nFrac2Dec = nWholeNum + static_cast(nNum)/nDenom; // Convert to double for floating point precision -OUStringBuffer aStrFrac; -aStrFrac.append(nFrac2Dec); +OUStringBuffer aStrFrac(OUString::number(nFrac2Dec)); // Reconvert division result to string and parse nDecPos = aStrFrac.indexOf('.'); if ( nDecPos >= 0) @@ -383,14 +382,12 @@ void ImplUpdateSeparatorString( OUString& io_rText, || (nIndexTh != -1 && nIndexDec == -1) ) { -aBuf.append( pBuffer + nIndex, nIndexTh - nIndex ); -aBuf.append( rNewThSep ); +aBuf.append( OUString::Concat(std::u16string_view(pBuffer + nIndex, nIndexTh - nIndex )) + rNewThSep ); nIndex = nIndexTh + rOldThSep.size(); } else if( nIndexDec != -1 ) { -aBuf.append( pBuffer + nIndex, nIndexDec - nIndex ); -aBuf.append( rNewDecSep ); +aBuf.append( OUString::Concat(std::u16string_view(pBuffer + nIndex, nIndexDec - nIndex )) + rNewDecSep ); nIndex = nIndexDec + rOldDec
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - sw/qa sw/source
sw/qa/extras/ooxmlexport/data/tdf147892.fodt | 25 ++ sw/qa/extras/ooxmlexport/ooxmlexport12.cxx | 10 + sw/source/filter/ww8/docxattributeoutput.cxx | 30 ++- sw/source/filter/ww8/docxattributeoutput.hxx |4 +-- 4 files changed, 53 insertions(+), 16 deletions(-) New commits: commit 4c05f5b45ce8449adee81aeac355fae652b97786 Author: László Németh AuthorDate: Fri Feb 10 13:43:40 2023 +0100 Commit: László Németh CommitDate: Thu Mar 30 13:37:18 2023 + tdf#147892 DOCX: fix corrupt export at para marker revision history OOXML export of tracked deletion of tracked paragraph insertion resulted invalid document.xml, because change tracking history of paragraph markers isn't supported by OOXML. Export the tracked deletion of the last run of paragraphs without history (tracked insertion). This way w:p/w:pPr/w:rPr contains only w:del or w:ins, not both of them (with broken tag order). Note: it's possible to optimize the fix to keep the change tracking history of the characters of the last run of the paragraph, except the paragraph marker. Regression from commit 19b3fcf8b0374c361c7f6c285fd5c89b5a2f "tdf#142387 DOCX track changes: export w:del in w:ins". Minimal unit test document was created by Miklós Vajna. Change-Id: I425f4d63c8c6ac29ccd807c1574748c7b9b39e80 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146782 Tested-by: László Németh Reviewed-by: László Németh (cherry-picked from commit 382892341a63e400f221e1a533fd5a5d6b4d9d70) Conflicts: sw/source/filter/ww8/docxattributeoutput.cxx Change-Id: I0e29195512d8786ac5f6a145ed88a9261f1c456e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149763 Reviewed-by: Stéphane Guillou Tested-by: Jenkins Reviewed-by: László Németh Tested-by: László Németh diff --git a/sw/qa/extras/ooxmlexport/data/tdf147892.fodt b/sw/qa/extras/ooxmlexport/data/tdf147892.fodt new file mode 100644 index ..bb3ffc324dc1 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf147892.fodt @@ -0,0 +1,25 @@ + +http://purl.org/dc/elements/1.1/"; xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + + + + + + + Bob + 2023-01-02T00:00:00 + + + + + Alice + 2023-01-01T00:00:00 + + + + + + + + + diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx index f831fd3ad61e..25a9932101ee 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx @@ -2023,6 +2023,16 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf142387) assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:ins/w:del/w:r/w:delText", "inserts "); } +CPPUNIT_TEST_FIXTURE(Test, testTdf147892) +{ +loadAndSave("tdf147892.fodt"); +xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"); +// w:del in w:ins is exported correctly +// (both w:del and w:ins were exported for para marker) +assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:rPr/w:del", 1); +assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:rPr/w:ins", 0); +} + DECLARE_OOXMLEXPORT_TEST(testTdf123054, "tdf123054.docx") { CPPUNIT_ASSERT_EQUAL(OUString("No Spacing"), diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 70c21933ebdd..b3866fbeca4d 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1466,13 +1466,13 @@ void DocxAttributeOutput::EndParagraphProperties(const SfxItemSet& rParagraphMar if ( pRedlineParagraphMarkerDeleted ) { -StartRedline( pRedlineParagraphMarkerDeleted ); -EndRedline( pRedlineParagraphMarkerDeleted ); +StartRedline( pRedlineParagraphMarkerDeleted, /*bLastRun=*/true ); +EndRedline( pRedlineParagraphMarkerDeleted, /*bLastRun=*/true ); } if ( pRedlineParagraphMarkerInserted ) { -StartRedline( pRedlineParagraphMarkerInserted ); -EndRedline( pRedlineParagraphMarkerInserted ); +StartRedline( pRedlineParagraphMarkerInserted, /*bLastRun=*/true ); +EndRedline( pRedlineParagraphMarkerInserted, /*bLastRun=*/true ); } // mergeTopMarks() after paragraph mark properties child elements. @@ -1575,7 +1575,7 @@ void DocxAttributeOutput::StartRun( const SwRedlineData* pRedlineData, sal_Int32 m_pSerializer->mark(Tag_StartRun_3); // let's call it "postponed text" } -void DocxAttributeOutput::EndRun(const SwTextNode* pNode, sal_Int32 nPos, bool /*bLastRun*/) +void DocxAttributeOutput::EndRun(const SwTextN
[Libreoffice-commits] core.git: xmloff/source
xmloff/source/core/DomExport.cxx | 12 +-- xmloff/source/core/namespacemap.cxx | 29 ++- xmloff/source/core/xmlerror.cxx | 43 --- xmloff/source/core/xmluconv.cxx |6 - xmloff/source/draw/propimp0.cxx |3 xmloff/source/draw/sdxmlexp.cxx |9 -- xmloff/source/meta/xmlmetae.cxx |6 - xmloff/source/style/XMLBitmapRepeatOffsetPropertyHandler.cxx |3 xmloff/source/style/XMLClipPropertyHandler.cxx |3 xmloff/source/style/bordrhdl.cxx |4 - xmloff/source/style/chrhghdl.cxx |3 xmloff/source/style/fonthdl.cxx |5 - xmloff/source/style/impastpl.cxx | 40 -- xmloff/source/style/xmlnumfe.cxx | 13 +-- xmloff/source/text/XMLTextListAutoStylePool.cxx |5 - xmloff/source/text/txtprhdl.cxx |3 xmloff/source/transform/TransformerBase.cxx |6 - 17 files changed, 72 insertions(+), 121 deletions(-) New commits: commit 5988a3cf91e2cb5bf1628b88965e3652932e4eb6 Author: Noel Grandin AuthorDate: Thu Mar 30 10:57:25 2023 +0200 Commit: Noel Grandin CommitDate: Thu Mar 30 13:53:28 2023 + loplugin:stringadd in xmloff when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: Id38d983e59386554c61e9bdcd9333554bbf4665c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149756 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/xmloff/source/core/DomExport.cxx b/xmloff/source/core/DomExport.cxx index 9d26d68b1cee..585c2b4572b4 100644 --- a/xmloff/source/core/DomExport.cxx +++ b/xmloff/source/core/DomExport.cxx @@ -128,7 +128,7 @@ class DomExport: public DomVisitor void pushNamespace(); void addNamespace( const OUString& sPrefix, const OUString& sURI ); OUString qualifiedName( const OUString& sPrefix, const OUString& sURI, -std::u16string_view sLocalName ); +const OUString& sLocalName ); OUString qualifiedName( const Reference& ); OUString qualifiedName( const Reference& ); void addAttribute( const Reference& ); @@ -181,17 +181,15 @@ void DomExport::addNamespace( const OUString& sPrefix, const OUString& sURI ) OUString DomExport::qualifiedName( const OUString& sPrefix, const OUString& sURI, - std::u16string_view sLocalName ) + const OUString& sLocalName ) { -OUStringBuffer sBuffer; if( !sPrefix.isEmpty() && !sURI.isEmpty() ) { addNamespace( sPrefix, sURI ); -sBuffer.append( sPrefix ); -sBuffer.append( ':' ); +return sPrefix + ":" + sLocalName; } -sBuffer.append( sLocalName ); -return sBuffer.makeStringAndClear(); +else +return sLocalName; } OUString DomExport::qualifiedName( const Reference& xElement ) diff --git a/xmloff/source/core/namespacemap.cxx b/xmloff/source/core/namespacemap.cxx index 84668a612dfe..c64f28087f36 100644 --- a/xmloff/source/core/namespacemap.cxx +++ b/xmloff/source/core/namespacemap.cxx @@ -212,14 +212,10 @@ OUString SvXMLNamespaceMap::GetQNameByKey( sal_uInt16 nKey, { // ...if it's in the xmlns namespace, make the prefix // don't bother caching this, it rarely happens -OUStringBuffer sQName; -sQName.append ( m_sXMLNS ); if (!rLocalName.isEmpty()) // not default namespace -{ -sQName.append ( ':' ); -sQName.append ( rLocalName ); -} -return sQName.makeStringAndClear(); +return m_sXMLNS + ":" + rLocalName; +else +return m_sXMLNS; } case XML_NAMESPACE_XML: { @@ -242,21 +238,14 @@ OUString SvXMLNamespaceMap::GetQNameByKey( sal_uInt16 nKey, { // ...if it's in our map, make the prefix const OUString & prefix( (*aIter).second.sPrefix ); -OUStringBuffer sQName(prefix.getLength() + 1 + rLocalName.getLength()); +OUString sQName; if (!prefix.isEmpty()) // not default namespace -{ -sQName.append( prefix ); -sQName.append( ':' ); -} -sQName.append ( rLocalName ); -if (bCache) -{ -OUString sString(sQName.makeStringAndClear()); -m_aQNameCache.emplace(QNamePair(nKey, rLocalName),
[Libreoffice-commits] core.git: sw/source
sw/source/filter/ww8/docxattributeoutput.cxx |4 ++-- sw/source/filter/ww8/docxtableexport.cxx | 14 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) New commits: commit 8d00f6c851b7680f18f602b10ca19a1c9223d276 Author: Noel Grandin AuthorDate: Thu Mar 30 11:06:19 2023 +0200 Commit: Noel Grandin CommitDate: Thu Mar 30 14:13:53 2023 + no need to make copies of the GrabBag map Change-Id: I5cd697d0cfaf65a9ad581d4d7571a69e6214cbb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149757 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 60f93917117e..dadd4125c0fe 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -385,9 +385,9 @@ static void checkAndWriteFloatingTables(DocxAttributeOutput& rDocxAttributeOutpu SwTable& rTable = pTableNode->GetTable(); SwFrameFormat* pTableFormat = rTable.GetFrameFormat(); const SfxGrabBagItem* pTableGrabBag = pTableFormat->GetAttrSet().GetItem(RES_FRMATR_GRABBAG); -std::map aTableGrabBag = pTableGrabBag->GetGrabBag(); +const std::map & rTableGrabBag = pTableGrabBag->GetGrabBag(); // no grabbag? -if (aTableGrabBag.find("TablePosition") == aTableGrabBag.end()) +if (rTableGrabBag.find("TablePosition") == rTableGrabBag.end()) { if (pFrameFormat->GetFlySplit().GetValue()) { diff --git a/sw/source/filter/ww8/docxtableexport.cxx b/sw/source/filter/ww8/docxtableexport.cxx index 1f4f06a41aa3..2ac6e2db0597 100644 --- a/sw/source/filter/ww8/docxtableexport.cxx +++ b/sw/source/filter/ww8/docxtableexport.cxx @@ -263,7 +263,7 @@ void DocxAttributeOutput::TableDefinition( m_pSerializer->singleElementNS(XML_w, XML_tblLayout, FSNS(XML_w, XML_type), "fixed"); // Look for the table style property in the table grab bag -std::map aGrabBag +const std::map& rGrabBag = pTableFormat->GetAttrSet().GetItem(RES_FRMATR_GRABBAG)->GetGrabBag(); // We should clear the TableStyle map. In case of Table inside multiple tables it contains the @@ -284,7 +284,7 @@ void DocxAttributeOutput::TableDefinition( } // Extract properties from grab bag -for (const auto& rGrabBagElement : aGrabBag) +for (const auto& rGrabBagElement : rGrabBag) { if (rGrabBagElement.first == "TableStyleName") { @@ -564,14 +564,14 @@ void DocxAttributeOutput::TableBackgrounds( const OString sColor = msfilter::util::ConvertColor(aColor); -std::map aGrabBag +const std::map& rGrabBag = pFormat->GetAttrSet().GetItem(RES_FRMATR_GRABBAG)->GetGrabBag(); OString sOriginalColor; -std::map::iterator aGrabBagElement = aGrabBag.find("originalColor"); -if (aGrabBagElement != aGrabBag.end()) +auto aGrabBagIt = rGrabBag.find("originalColor"); +if (aGrabBagIt != rGrabBag.end()) sOriginalColor -= OUStringToOString(aGrabBagElement->second.get(), RTL_TEXTENCODING_UTF8); += OUStringToOString(aGrabBagIt->second.get(), RTL_TEXTENCODING_UTF8); if (sOriginalColor != sColor) { @@ -586,7 +586,7 @@ void DocxAttributeOutput::TableBackgrounds( { rtl::Reference pAttrList; -for (const auto& rGrabBagElement : aGrabBag) +for (const auto& rGrabBagElement : rGrabBag) { if (!rGrabBagElement.second.has()) continue;
[Libreoffice-commits] dev-tools.git: bibisect/buildWinReleasesRepository.sh
bibisect/buildWinReleasesRepository.sh | 154 + 1 file changed, 154 insertions(+) New commits: commit b7f4b60aa94cd1be4ca456e5b6ab93c093824bcd Author: Xisco Fauli AuthorDate: Thu Mar 30 16:17:04 2023 +0200 Commit: Xisco Fauli CommitDate: Thu Mar 30 16:17:04 2023 +0200 Add script for building win-86-releases Change-Id: Ic08cdceb78086d6832fdd834a8b87e32760888a5 diff --git a/bibisect/buildWinReleasesRepository.sh b/bibisect/buildWinReleasesRepository.sh new file mode 100755 index ..301f560a --- /dev/null +++ b/bibisect/buildWinReleasesRepository.sh @@ -0,0 +1,154 @@ +#!/bin/bash + +#Sample: ./buildWinReleasesRepository.sh 6.3.0.0.alpha1 6.3.0.0.beta1 6.3.0.0.beta2 6.3.0.1 6.3.0.2 6.3.0.3 6.3.0.4 + +#Path to the folder where the msi/exe files are downloaded +rootDir= + +#Path to the folder where 'win-86-releases' is +targetDir= + +removeOriginFolders () { +echo "*** Removing files in origin" +rm -rf $rootDir/instdir +rm -rf $rootDir/output +} + +for var in "$@" +do +isExeFile=0 +date +cd $rootDir +input=$var +if [[ $input = *"alpha"* || $input = *"beta"* ]]; then +if [[ $input = "4.0."* ]]; then +file="LibreOfficeDev_${input}_Win_x86_install_multi.msi" +else +file="LibreOfficeDev_${input}_Win_x86.msi" +fi +else +if [[ $input = "3.3."* ]]; then +file="LibO_${input::-2}_Win_x86_install_all_lang.exe" +isExeFile=1 +elif [[ $input = "3.4."* ]]; then +file="LibO_${input::-2}_Win_x86_install_multi.exe" +isExeFile=1 +elif [[ $input = "3.5"* ]]; then +file="LibO_${input::-2}_Win_x86_install_multi.msi" +elif [[ $input = "3."* ]]; then +file="LibO_${input}_Win_x86_install_multi.msi" +else +file="LibreOffice_${input}_Win_x86.msi" +fi +fi +if [ ! -f $rootDir/$file ]; then +echo "File $rootDir/$file not found!" + url="https://downloadarchive.documentfoundation.org/libreoffice/old/${input}/win/x86/${file}"; +echo "*** Downloading " +if wget -c ${url} -O $rootDir/${file}.tmp; then +mv $rootDir/${file}.tmp $rootDir/${file} +else +if [ $isExeFile -eq 1 ]; then +extension=".exe" +else +extension=".msi" +fi +# try harder +# In the past, some files used rcX. e.g: LibO_3.4.0rc1 +file="LibO_${input::-2}rc${input: -1}_Win_x86_install_multi${extension}" + url="https://downloadarchive.documentfoundation.org/libreoffice/old/${input}/win/x86/${file}"; +if wget -c ${url} -O $rootDir/${file}.tmp; then +mv $rootDir/${file}.tmp $rootDir/${file} +else +echo "$url doesn\'t exists" +break +fi +fi +else +echo "File $rootDir/$file found!" +fi + +if [ $isExeFile -eq 1 ]; then +echo "*** Uncompressing exe file" +7z x $rootDir/${file} -o$rootDir/exeData +echo "*** Extracting msi" +msiextract $rootDir/exeData/libreoffice3*.msi -C $rootDir/output &>/dev/null +echo "*** Cleaning exe folder" +rm -rf $rootDir/exeData/ +else +echo "*** Extracting msi" +msiextract $rootDir/${file} -C $rootDir/output &>/dev/null +fi + +if [[ ! -d $rootDir/output/Program\ Files/ ]]; then +echo "$rootDir/output/Program\ Files doesn't exists" +removeOriginFolders +break +fi + +echo "*** Moving files to instdir folder" +mv $rootDir/output/Program\ Files/* $rootDir/instdir + +echo "*** Moving files to program" +if [[ ! -d $rootDir/instdir/URE/bin/ ]]; then +echo "$rootDir/instdir/URE/bin/ doesn't exists" +removeOriginFolders +break +fi +mv $rootDir/instdir/URE/bin/*.dll $rootDir/instdir/program/ + +if [[ ! -d $rootDir/instdir/URE/misc/ ]]; then +echo "$rootDir/instdir/URE/misc/ doesn't exists" +removeOriginFolders +break +fi +mv $rootDir/instdir/URE/misc/*.rdb $rootDir/instdir/program/ + +# msvcp* and msvcr libraries +mv $rootDir/output/Win/System/*.dll $rootDir/instdir/program/ + +echo "*** Writing to uno.ini" +echo "[Bootstrap] +URE_INTERNAL_LIB_DIR=\${ORIGIN} +URE_INTERNAL_JAVA_DIR=\${ORIGIN}/classes +URE_INTERNAL_JAVA_CLASSPATH=\${URE_MORE_JAVA_TYPES} +UNO_TYPES=\${ORIGIN}/types.rdb \${URE_MORE_TYPES} +UNO_SERVICES=\${ORIGIN}/services.rdb \${URE_MORE_SERVICES}" >> $rootDir/instdir/program/uno.ini + +echo "*** Changing bootstrap.ini" +sed -i '/UserInstallation/d' $rootDir/instdir/program/bootstrap.ini +echo "UserInstallation=\$ORIGIN/.." >> $rootDir/instdir/program/bootstrap.ini + +echo "*** Cleaning destination" +rm -rf ${targetDir}/instdir/ +mkdir ${targetDir}/instdir/ +echo "
[Libreoffice-commits] core.git: sw/source
sw/source/filter/html/htmlflywriter.cxx | 30 +++--- sw/source/filter/html/wrthtml.hxx |2 +- 2 files changed, 16 insertions(+), 16 deletions(-) New commits: commit b26a65bb108e2c681e0721bfe590e68f2fe5a602 Author: Mike Kaganski AuthorDate: Thu Mar 30 12:49:23 2023 +0300 Commit: Mike Kaganski CommitDate: Thu Mar 30 14:27:02 2023 + Simplify some calls to HtmlWriter::attribute Change-Id: I608efc6cf7ae05df5a0db3282e0a55315e286718 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149759 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx index 85cae063cda5..faa5f1067b33 100644 --- a/sw/source/filter/html/htmlflywriter.cxx +++ b/sw/source/filter/html/htmlflywriter.cxx @@ -819,7 +819,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma } // align -const char* pAlignString = nullptr; +std::string_view pAlignString; RndStdIds eAnchorId = rFrameFormat.GetAnchor().GetAnchorId(); if( (nFrameOptions & HtmlFrmOpts::Align) && ((RndStdIds::FLY_AT_PARA == eAnchorId) || (RndStdIds::FLY_AT_CHAR == eAnchorId)) && !bReplacement) @@ -830,12 +830,12 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma text::RelOrientation::PRINT_AREA == rHoriOri.GetRelationOrient() ) { pAlignString = text::HoriOrientation::RIGHT == rHoriOri.GetHoriOrient() -? OOO_STRING_SVTOOLS_HTML_AL_right -: OOO_STRING_SVTOOLS_HTML_AL_left; +? std::string_view(OOO_STRING_SVTOOLS_HTML_AL_right) +: std::string_view(OOO_STRING_SVTOOLS_HTML_AL_left); } } const SwFormatVertOrient* pVertOrient; -if( (nFrameOptions & HtmlFrmOpts::Align) && !pAlignString && +if( (nFrameOptions & HtmlFrmOpts::Align) && pAlignString.empty() && ( !(nFrameOptions & HtmlFrmOpts::SAlign) || (RndStdIds::FLY_AS_CHAR == eAnchorId) ) && (pVertOrient = rItemSet.GetItemIfSet( RES_VERT_ORIENT )) ) @@ -854,7 +854,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma case text::VertOrientation::NONE: break; } } -if (pAlignString && !bReplacement) +if (!pAlignString.empty() && !bReplacement) { aHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_align, pAlignString); } @@ -1047,7 +1047,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma if (!pSurround) return; -const char* pSurroundString = nullptr; +std::string_view pSurroundString; sal_Int16 eHoriOri = rFrameFormat.GetHoriOrient().GetHoriOrient(); css::text::WrapTextMode eSurround = pSurround->GetSurround(); @@ -1095,7 +1095,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameForma break; } -if (pSurroundString) +if (!pSurroundString.empty()) { aHtml.start(OOO_STRING_SVTOOLS_HTML_linebreak); aHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_clear, pSurroundString); @@ -1238,7 +1238,7 @@ SwHTMLWriter& OutHTML_ImageStart( HtmlWriter& rHtml, SwHTMLWriter& rWrt, const S const Size &rRealSize, HtmlFrmOpts nFrameOpts, const char *pMarkType, const ImageMap *pAltImgMap, - const OUString& rMimeType ) + std::u16string_view rMimeType ) { // instead of bool bReplacement = (nFrameOpts & HtmlFrmOpts::Replacement) || rWrt.mbReqIF; @@ -1297,17 +1297,17 @@ SwHTMLWriter& OutHTML_ImageStart( HtmlWriter& rHtml, SwHTMLWriter& rWrt, const S // Output "href" element if a link or macro exists if( !aMapURL.isEmpty() || bEvents ) { -rHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_href, OUStringToOString(rWrt.convertHyperlinkHRefValue(aMapURL), RTL_TEXTENCODING_UTF8)); +rHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_href, rWrt.convertHyperlinkHRefValue(aMapURL)); } if( !aName.isEmpty() ) { -rHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_name, OUStringToOString(aName, RTL_TEXTENCODING_UTF8)); +rHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_name, aName); } if( !aTarget.isEmpty() ) { -rHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_target, OUStringToOString(aTarget, RTL_TEXTENCODING_UTF8)); +rHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_target, aTarget); } if( pMacItem ) @@ -1399,7 +1399,7 @@ SwHTMLWriter& OutHTML_ImageStart( HtmlWriter& rHtml, SwHTMLWriter& rWrt, const S OString sBuffer(OString::Concat(OOO_STRING_SVTOOLS_HTML_O_data)
ESC meeting minutes: 2023-03-30
* Present: + Heiko, Ilmari, Olivier, Eike, Stéphane, Cloph, Xisco, * Completed Action Items: + file an easy hack for faster ui tests (Xisco) - https://bugs.documentfoundation.org/show_bug.cgi?id=154451 + take the list of certified developers to Italo (Stephan) - done (Stephan) * Pending Action Items: + get marketing to announce the “next version is 8.0” decision on their mailing list (Heiko) + has been posted to the lists, there was some pushback + alpha end of May, UI freeze in July, so still some time + there likely won't be any huge changes in future either + would need new splash/new design for version bump (so waiting until last minute is a nogo) * could reuse the redesigned artwork whenever we make the switch + keep it with 7.6 and move to 8.0 for February/Fosdem? * Release Engineering update (Cloph) + 7.5 status: 7.5.2 released today + 7.5.3 rc1 in two weeks + 7.4 status: 7.4.7 rc1 in 3 weeks * Documentation (Olivier) + Helpcontents + Updates, fixes and housekeeping (ohallot, R. Lima, S. Chaiklin, stragu, L. Balland) + Too many enhancements/changes not earmarked for document update, + please heads-up + Checkbox in gerrit "Need doc update"? + how to do it until we have such a checkbox? → bugzilla ticket for now in documentation project, direct assignment not necessary + API documentation + Please comment/approve https://gerrit.libreoffice.org/c/core/+/149590 + Doxygen API is shallow on examples, occasional end-user lost in reading API + sample snippets to help understand, illustrate usage + language agnostic is 1 more language, use basic/python + Guides + Work in progress for current release + Bugzilla Documentation statistics 262(262) bugs open + Updates: BZ changes 1 week1 month3 months 12 months created 8(-7) 46(-18) 117(2) 318(0) commented 13(-24) 119(-28) 310(10)1091(10) resolved 3(0) 15(-12)56(3) 193(1) + top 10 contributors: Seth Chaiklin made 86 changes in 1 month, and 490 changes in 1 year Olivier Hallot made 53 changes in 1 month, and 493 changes in 1 year Stéphane Guillou made 29 changes in 1 month, and 155 changes in 1 year Kaganski, Mike made 9 changes in 1 month, and 115 changes in 1 year Heiko Tietze made 7 changes in 1 month, and 100 changes in 1 year Adolfo Jayme Barrientos made 6 changes in 1 month, and 47 changes in 1 year Vernon, Stuart Foote made 6 changes in 1 month, and 39 changes in 1 year Dieter made 5 changes in 1 month, and 71 changes in 1 year Vladimir Sokolinskiy made 4 changes in 1 month, and 7 changes in 1 year ady made 3 changes in 1 month, and 5 changes in 1 year * UX Update (Heiko) + Bugzilla (topicUI) statistics 277(277) (topicUI) bugs open, 91(91) (needsUXEval) needs to be evaluated by the UXteam + Updates: BZ changes 1 week 1 month 3 months 12 months added 8(-2)31(-2)45(-2) 81(-3) commented 82(-6) 341(5)714(6) 2290(14) removed 2(0) 6(2) 6(2) 29(-1) resolved 8(-2)35(-2)94(3) 289(3) + top 10 contributors: Heiko Tietze made 218 changes in 1 month, and 1447 changes in 1 year Eyal Rozenberg made 90 changes in 1 month, and 312 changes in 1 year Vernon, Stuart Foote made 63 changes in 1 month, and 262 changes in 1 year Dieter made 57 changes in 1 month, and 219 changes in 1 year Ilmari Lauhakangas made 56 changes in 1 month, and 227 changes in 1 year Stéphane Guillou made 48 changes in 1 month, and 201 changes in 1 year Rafael Lima made 21 changes in 1 month, and 268 changes in 1 year Telesto made 19 changes in 1 month, and 118 changes in 1 year Eivind Samseth made 18 changes in 1 month, and 18 changes in 1 year Roman Kuznetsov made 16 changes in 1 month, and 179 changes in 1 year + [Bug 154472] Add app color scheme swith + [Bug 154211] Allow selecting a range between current cursor position and an element in Navigator with Shift + click (EDITING) + [Bug 98232] Missing help for control points of shapes + [Bug 154429] Suggestions for Default settings for new installs + [Bug 153847] Change label for .uno:InsertIndexesEntry and label and tooltip for .uno:IndexEntryDialog + [Bug 80281] FORMATTING: "Keep aspect ratio" checkbox of images or photos not always honoured + [Bug 154410] Improve Calc's Format > Align Text menu's contents and labels + [Bug 154389] No option to select "Delete Comment" via a letter press in the context menu + [Bug 154387] Provide a possibility to change the striket
Re: Libreoffice and Webdav behind HAProxy
Le 30/03/2023 à 13:53, Stéphane Guillou a écrit : Can you please test a recent master build, or 7.5.2 that was just released, or the upcoming 7.4.7? A couple of webDAV / curl fixes were made it in these versions. See reports: * https://bugs.documentfoundation.org/show_bug.cgi?id=154224 * https://bugs.documentfoundation.org/show_bug.cgi?id=152493 * https://bugs.documentfoundation.org/show_bug.cgi?id=154223 I tried with version 7.5.2 and the problem is still there. Version: 7.5.2.2 (X86_64) / LibreOffice Community Build ID: 53bb9681a964705cf672590721dbc85eb4d0c3a2 CPU threads: 8; OS: Linux 5.19; UI render: default; VCL: gtk3 Locale: fr-FR (fr_FR.UTF-8); UI: en-US Calc: threaded
Re: Libreoffice and Webdav behind HAProxy
On 30/3/23 17:02, Jean-Max Reymond wrote: Le 30/03/2023 à 13:53, Stéphane Guillou a écrit : Can you please test a recent master build, or 7.5.2 that was just released, or the upcoming 7.4.7? A couple of webDAV / curl fixes were made it in these versions. See reports: * https://bugs.documentfoundation.org/show_bug.cgi?id=154224 * https://bugs.documentfoundation.org/show_bug.cgi?id=152493 * https://bugs.documentfoundation.org/show_bug.cgi?id=154223 I tried with version 7.5.2 and the problem is still there. Version: 7.5.2.2 (X86_64) / LibreOffice Community Build ID: 53bb9681a964705cf672590721dbc85eb4d0c3a2 CPU threads: 8; OS: Linux 5.19; UI render: default; VCL: gtk3 Locale: fr-FR (fr_FR.UTF-8); UI: en-US Calc: threaded Thank you, Jean-Max. Please report it on Bugzilla then: https://bugs.documentfoundation.org/enter_bug.cgi?product=LibreOffice;bug_status=UNCONFIRMED;version=? Thank you! -- Stéphane Guillou Quality Assurance Analyst | The Document Foundation Email: stephane.guil...@libreoffice.org Mobile (France): +33 7 79 67 18 72 Matrix: @stragu:matrix.org Fediverse: @str...@mastodon.indie.host Web: https://stragu.gitlab.io/
[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-4' - sc/inc sc/source
sc/inc/document.hxx |3 +- sc/inc/table.hxx |3 +- sc/source/core/data/document.cxx | 12 -- sc/source/core/data/drwlayer.cxx |7 +- sc/source/core/data/table5.cxx | 44 --- 5 files changed, 48 insertions(+), 21 deletions(-) New commits: commit a1b4eca5fc9898b9741325de52b89f406635b52a Author: Balazs Varga AuthorDate: Sat Mar 25 18:57:08 2023 +0100 Commit: Thorsten Behrens CommitDate: Thu Mar 30 16:14:52 2023 + Related: tdf#154005 sc ods fileopen: fix dropdown form control size Fixing the crashtesting assert/crash after the original change. Also a little clean-up. Change-Id: I35453fbc55b3d5d4064179e84755334c2d3a01ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149583 Tested-by: Jenkins Reviewed-by: Caolán McNamara Reviewed-by: Balazs Varga Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149683 Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 03a4345ead15..6c0c58b001b2 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1919,7 +1919,8 @@ public: SC_DLLPUBLIC SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const; SC_DLLPUBLIC SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const; SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const; -SCCOL CountVisibleCols(SCROW nStartCol, SCROW nEndCol, SCTAB nTab) const; +SCROW CountHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const; +SCCOL CountHiddenCols(SCROW nStartCol, SCROW nEndCol, SCTAB nTab) const; boolRowFiltered(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const; boolHasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const; diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index cc90bd31b980..96f31c9ca2a6 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -905,8 +905,9 @@ public: SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow) const; SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow) const; SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow) const; -SCCOL CountVisibleCols(SCCOL nStartCol, SCCOL nEndCol) const; +SCROW CountHiddenRows(SCROW nStartRow, SCROW nEndRow) const; sal_uInt32 GetTotalRowHeight(SCROW nStartRow, SCROW nEndRow, bool bHiddenAsZero = true) const; +SCCOL CountHiddenCols(SCCOL nStartCol, SCCOL nEndCol) const; SCCOLROWLastHiddenColRow(SCCOLROW nPos, bool bCol) const; diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index a9c794fab7ec..c5b65d0a37fd 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -4483,12 +4483,20 @@ SCROW ScDocument::CountVisibleRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) c return maTabs[nTab]->CountVisibleRows(nStartRow, nEndRow); } -SCCOL ScDocument::CountVisibleCols(SCROW nStartCol, SCROW nEndCol, SCTAB nTab) const +SCROW ScDocument::CountHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const { if (!ValidTab(nTab) || nTab >= static_cast(maTabs.size()) || !maTabs[nTab]) return 0; -return maTabs[nTab]->CountVisibleCols(nStartCol, nEndCol); +return maTabs[nTab]->CountHiddenRows(nStartRow, nEndRow); +} + +SCCOL ScDocument::CountHiddenCols(SCROW nStartCol, SCROW nEndCol, SCTAB nTab) const +{ +if (!ValidTab(nTab) || nTab >= static_cast(maTabs.size()) || !maTabs[nTab]) +return 0; + +return maTabs[nTab]->CountHiddenCols(nStartCol, nEndCol); } bool ScDocument::RowFiltered(SCROW nRow, SCTAB nTab, SCROW* pFirstRow, SCROW* pLastRow) const diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 03d30c914dad..8dd013f1a817 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -671,11 +671,8 @@ void lcl_SetLogicRectFromAnchor(SdrObject* pObj, ScDrawObjData& rAnchor, ScDocum // tdf#154005: Handle hidden row/col: remove hidden row/cols size from the ScDrawObjData shape size in case of forms if (pObj->GetObjIdentifier() == SdrObjKind::OBJ_UNO && pObj->GetObjInventor() == SdrInventor::FmForm) { -nHiddenRows = ((rAnchor.maEnd.Row() - rAnchor.maStart.Row()) + 1) - -(pDoc->CountVisibleRows(rAnchor.maStart.Row(), rAnchor.maEnd.Row(), rAnchor.maStart.Tab())); - -nHiddenCols = ((rAnchor.maEnd.Col() - rAnchor.maStart.Col()) + 1) - -(pDoc->CountVisibleCols(rAnchor.maStart.Col(), rAnchor.maEnd.Col(), rAnchor.maStart.Tab())); +nHiddenRows = pDoc->CountHiddenRows(rAnchor.maStart.Row(), rAnchor.maEnd.Row(), rAnchor.maStart.Tab());
[Libreoffice-commits] core.git: officecfg/registry
officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |7 +++ 1 file changed, 7 insertions(+) New commits: commit 6896c12ddeb00210629396046678bc1d83d45644 Author: Julien Nabet AuthorDate: Wed Mar 15 14:53:03 2023 +0100 Commit: Julien Nabet CommitDate: Thu Mar 30 16:25:35 2023 + Related tdf#129547: add Excel shortcuts insert time/date in Calc for German UI For German UI and locale German layout keyboard (based from https://en.wikipedia.org/wiki/German_keyboard_layout) https://www.traens.com/tipps/microsoft/datum-uhrzeit-excel.html indicates: " Einfügen eines statischen Datums in Excel Drücken Sie STRG + . (Strg und Punkt) Einfügen der aktuellen Uhrzeit in eine Excel Tabelle Drücken Sie STRG+UMSCHALT+. (Strg, Umschalt, Punkt) " so I added (specifically for "de"): POINT_MOD1 for InsertCurrentDate COLON_SHIFT_MOD1 for InsertCurrentTime Change-Id: I2523dddf918f9680f87c82c174e20462620948ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148931 Tested-by: Jenkins Reviewed-by: Caolán McNamara Reviewed-by: Julien Nabet diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu index 0e9fd02928c1..637236a601b5 100644 --- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu @@ -1265,9 +1265,16 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some emoji thing .uno:InsertCurrentTime + + +I10N SHORTCUTS - NO TRANSLATE +.uno:InsertCurrentTime + + I10N SHORTCUTS - NO TRANSLATE +.uno:InsertCurrentDate .uno:InsertCurrentDate
[Libreoffice-commits] dev-tools.git: bibisect/buildWinReleasesRepository.sh
bibisect/buildWinReleasesRepository.sh | 48 +++-- 1 file changed, 29 insertions(+), 19 deletions(-) New commits: commit 629208e0a83bed8a62f9391c6d288bda19c4f860 Author: Xisco Fauli AuthorDate: Thu Mar 30 19:51:48 2023 +0200 Commit: Xisco Fauli CommitDate: Thu Mar 30 19:52:57 2023 +0200 Adapt code for 5.x releases Change-Id: I1184c0ca46231f28e8fa8fd68df5640cd266e38d diff --git a/bibisect/buildWinReleasesRepository.sh b/bibisect/buildWinReleasesRepository.sh index 301f560a..97a4856c 100755 --- a/bibisect/buildWinReleasesRepository.sh +++ b/bibisect/buildWinReleasesRepository.sh @@ -89,32 +89,38 @@ do echo "*** Moving files to instdir folder" mv $rootDir/output/Program\ Files/* $rootDir/instdir -echo "*** Moving files to program" -if [[ ! -d $rootDir/instdir/URE/bin/ ]]; then -echo "$rootDir/instdir/URE/bin/ doesn't exists" -removeOriginFolders -break -fi -mv $rootDir/instdir/URE/bin/*.dll $rootDir/instdir/program/ +if [[ $input = "3."* || $input = "4."* ]]; then +echo "*** Moving files to program" +if [[ ! -d $rootDir/instdir/URE/bin/ ]]; then +echo "$rootDir/instdir/URE/bin/ doesn't exists" +removeOriginFolders +break +fi +mv $rootDir/instdir/URE/bin/*.dll $rootDir/instdir/program/ -if [[ ! -d $rootDir/instdir/URE/misc/ ]]; then -echo "$rootDir/instdir/URE/misc/ doesn't exists" -removeOriginFolders -break -fi -mv $rootDir/instdir/URE/misc/*.rdb $rootDir/instdir/program/ +if [[ ! -d $rootDir/instdir/URE/misc/ ]]; then +echo "$rootDir/instdir/URE/misc/ doesn't exists" +removeOriginFolders +break +fi +mv $rootDir/instdir/URE/misc/*.rdb $rootDir/instdir/program/ -# msvcp* and msvcr libraries -mv $rootDir/output/Win/System/*.dll $rootDir/instdir/program/ +# msvcp* and msvcr libraries +mv $rootDir/output/Win/System/*.dll $rootDir/instdir/program/ -echo "*** Writing to uno.ini" -echo "[Bootstrap] +echo "*** Writing to uno.ini" +echo "[Bootstrap] URE_INTERNAL_LIB_DIR=\${ORIGIN} URE_INTERNAL_JAVA_DIR=\${ORIGIN}/classes URE_INTERNAL_JAVA_CLASSPATH=\${URE_MORE_JAVA_TYPES} UNO_TYPES=\${ORIGIN}/types.rdb \${URE_MORE_TYPES} UNO_SERVICES=\${ORIGIN}/services.rdb \${URE_MORE_SERVICES}" >> $rootDir/instdir/program/uno.ini +else +# msvcp* and msvcr libraries +mv $rootDir/output/System/*.dll $rootDir/instdir/program/ +fi + echo "*** Changing bootstrap.ini" sed -i '/UserInstallation/d' $rootDir/instdir/program/bootstrap.ini echo "UserInstallation=\$ORIGIN/.." >> $rootDir/instdir/program/bootstrap.ini @@ -122,6 +128,7 @@ UNO_SERVICES=\${ORIGIN}/services.rdb \${URE_MORE_SERVICES}" >> $rootDir/instdir echo "*** Cleaning destination" rm -rf ${targetDir}/instdir/ mkdir ${targetDir}/instdir/ + echo "*** Moving files to destination" mv $rootDir/instdir/program ${targetDir}/instdir/program if [ $isExeFile -eq 1 ]; then @@ -131,12 +138,15 @@ UNO_SERVICES=\${ORIGIN}/services.rdb \${URE_MORE_SERVICES}" >> $rootDir/instdir mv $rootDir/instdir/share ${targetDir}/instdir/share mv $rootDir/instdir/presets ${targetDir}/instdir/presets -# it makes .exe files to work -touch ${targetDir}/instdir/ure-link +if [[ $input = "3."* || $input = "4."* ]]; then +# it makes .exe files to work +touch ${targetDir}/instdir/ure-link +fi echo "*** Removing extensions" rm -rf ${targetDir}/instdir/share/extensions/ fi + removeOriginFolders cd ${targetDir}
[Libreoffice-commits] help.git: source/text
source/text/swriter/main0104.xhp |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6a882aaf39f3c8f80c40f460565c51e5265b2b58 Author: Bogdan B AuthorDate: Thu Mar 30 19:33:04 2023 + Commit: Olivier Hallot CommitDate: Thu Mar 30 19:56:06 2023 + related tdf#152011 Typo in Insert description Change-Id: I20fb5670621cb2a496fdf099d7f7c5599330fe5f Reviewed-on: https://gerrit.libreoffice.org/c/help/+/149703 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/source/text/swriter/main0104.xhp b/source/text/swriter/main0104.xhp index f87454ab76..581a9e7d51 100644 --- a/source/text/swriter/main0104.xhp +++ b/source/text/swriter/main0104.xhp @@ -29,7 +29,7 @@ Insert -The Insert menu contains commands for inserting new elements in your document. This includes images, media, charts, objects from other applications, hyperlink, comments, symbols, footnotes, and sections. +The Insert menu contains commands for inserting new elements in your document. This includes images, media, charts, objects from other applications, hyperlinks, comments, symbols, footnotes, and sections. Page Break Inserts a manual page break at the current cursor position and places the cursor at the beginning of the next page.
[Libreoffice-commits] core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7d8ffcc587dc54764e3fc67b8622b7b0c088297e Author: Bogdan B AuthorDate: Thu Mar 30 19:56:06 2023 + Commit: Gerrit Code Review CommitDate: Thu Mar 30 19:56:06 2023 + Update git submodules * Update helpcontent2 from branch 'master' to 6a882aaf39f3c8f80c40f460565c51e5265b2b58 - related tdf#152011 Typo in Insert description Change-Id: I20fb5670621cb2a496fdf099d7f7c5599330fe5f Reviewed-on: https://gerrit.libreoffice.org/c/help/+/149703 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index 1a24e9d015c2..6a882aaf39f3 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 1a24e9d015c2747c37533c9edec8a081318d6e96 +Subproject commit 6a882aaf39f3c8f80c40f460565c51e5265b2b58
[Libreoffice-commits] core.git: i18npool/source i18nutil/source idl/source include/comphelper jvmfwk/plugins slideshow/source unodevtools/source writerfilter/source xmlsecurity/source
i18npool/source/characterclassification/cclass_unicode_parser.cxx | 10 +++-- i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |3 - i18nutil/source/utility/unicode.cxx |3 - idl/source/prj/database.cxx | 13 +++--- include/comphelper/traceevent.hxx |9 +--- jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx |6 +-- slideshow/source/engine/rehearsetimingsactivity.cxx |6 +-- unodevtools/source/skeletonmaker/cppcompskeleton.cxx | 20 -- writerfilter/source/dmapper/DomainMapper_Impl.cxx |3 - writerfilter/source/rtftok/rtfsprm.cxx|4 -- xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx |3 - 11 files changed, 32 insertions(+), 48 deletions(-) New commits: commit db7f33af1438538bb51b376242294ecd3bfcb055 Author: Noel Grandin AuthorDate: Thu Mar 30 16:10:11 2023 +0200 Commit: Noel Grandin CommitDate: Thu Mar 30 20:03:41 2023 + loplugin:stringadd in various when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: I8cf6a47ad357ddc73e2c430d966be72d5efd1485 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149767 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx b/i18npool/source/characterclassification/cclass_unicode_parser.cxx index 313e42a0f2fe..aed29ea1ce5b 100644 --- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx +++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx @@ -906,8 +906,9 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 { if ( cLast == '\\' ) { // escaped -aSymbol.append(rText.subView(postSymbolIndex, nextCharIndex - postSymbolIndex - 2)); -aSymbol.append(OUString(¤t, 1)); +aSymbol.append( + OUString::Concat(rText.subView(postSymbolIndex, nextCharIndex - postSymbolIndex - 2)) ++ OUString(¤t, 1)); } else { @@ -931,8 +932,9 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 { if ( cLast == '\\' ) { // escaped -aSymbol.append(rText.subView(postSymbolIndex, nextCharIndex - postSymbolIndex - 2)); -aSymbol.append(OUString(¤t, 1)); +aSymbol.append( +rText.subView(postSymbolIndex, nextCharIndex - postSymbolIndex - 2) ++ OUString(¤t, 1)); } else if (current == nextChar && !(nContTypes & KParseTokens::TWO_DOUBLE_QUOTES_BREAK_STRING) ) diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index 8ab363672f9e..29be9856a02d 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -1129,8 +1129,7 @@ OUString DefaultNumberingProvider::makeNumberingIdentifier(sal_Int16 index) aPropertiesRange[1].Name = "Value"; for (sal_Int32 j = 1; j <= 3; j++) { aPropertiesRange[1].Value <<= j; -result.append( makeNumberingString( aProperties, aLocale ) ); -result.append(", "); +result.append( makeNumberingString( aProperties, aLocale ) + ", " ); } result.append("..."); // Make known duplicate generated identifiers unique. diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx index 730b5105d52c..35bfb25f728f 100644 --- a/i18nutil/source/utility/unicode.cxx +++ b/i18nutil/source/utility/unicode.cxx @@ -1127,8 +1127,7 @@ OUString ToggleUnicodeCodepoint::ReplacementString() //pad with zeros - minimum length of 4. for( sal_Int32 i = 4 - aTmp.getLength(); i > 0; --i ) aTmp.insert( 0,"0" ); -output.append( "U+" ); -output.append( aTmp ); +output.append( "U+" + aTmp ); } } return output.makeStringAndClear(); diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx index 9aba715edaf4..229696b021ec 100644 --- a/idl/source/prj/database.cxx +++ b/idl/source/prj/database.cxx @@ -417,8 +417,7 @@ void SvIdlDataBase::WriteError( SvTokenStream & rInStm ) // error text if( !
[Libreoffice-commits] core.git: vcl/source
vcl/source/app/settings.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit a1f6628e0b73556e0f9fa5f4110068ab7096af1a Author: Caolán McNamara AuthorDate: Thu Mar 30 20:50:01 2023 +0100 Commit: Caolán McNamara CommitDate: Thu Mar 30 20:19:11 2023 + ofz#57526 Abrt Change-Id: Ic165f012e6fc21e4be6833ccbfd6ad70e522cc11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149772 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 7981a2310c2f..5cb172ab8276 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -2785,6 +2785,8 @@ void MiscSettings::SetDarkMode(int nMode) int MiscSettings::GetAppColorMode() { +if (utl::ConfigManager::IsFuzzing()) +return 0; return officecfg::Office::Common::Misc::ApplicationAppearance::get(); }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - external/openssl
external/openssl/0001-x509-excessive-resource-use-verifying-policy-constra.patch.1 | 221 ++ external/openssl/UnpackedTarball_openssl.mk |1 2 files changed, 222 insertions(+) New commits: commit 5394a5e0889faf7ed2b9f48426105d637855bfb4 Author: Taichi Haradaguchi <20001...@ymail.ne.jp> AuthorDate: Mon Mar 27 19:17:10 2023 +0900 Commit: Caolán McNamara CommitDate: Thu Mar 30 20:25:59 2023 + [3.0] external/openssl: add patch for CVE-2023-0464 this issue should be fixed in release 3.0.9 Severity: Low Security Advisary: https://www.openssl.org/news/secadv/20230322.txt Change-Id: I8d34acd72ac8eb7e9e83b241eb1235a93111884a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149609 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/external/openssl/0001-x509-excessive-resource-use-verifying-policy-constra.patch.1 b/external/openssl/0001-x509-excessive-resource-use-verifying-policy-constra.patch.1 new file mode 100644 index ..d96d1d76883e --- /dev/null +++ b/external/openssl/0001-x509-excessive-resource-use-verifying-policy-constra.patch.1 @@ -0,0 +1,221 @@ +From 959c59c7a0164117e7f8366466a32bb1f8d77ff1 Mon Sep 17 00:00:00 2001 +From: Pauli +Date: Wed, 8 Mar 2023 15:28:20 +1100 +Subject: [PATCH] x509: excessive resource use verifying policy constraints + +A security vulnerability has been identified in all supported versions +of OpenSSL related to the verification of X.509 certificate chains +that include policy constraints. Attackers may be able to exploit this +vulnerability by creating a malicious certificate chain that triggers +exponential use of computational resources, leading to a denial-of-service +(DoS) attack on affected systems. + +Fixes CVE-2023-0464 + +Reviewed-by: Tomas Mraz +Reviewed-by: Shane Lontis +(Merged from https://github.com/openssl/openssl/pull/20568) +--- + crypto/x509/pcy_local.h | 8 +++- + crypto/x509/pcy_node.c | 12 +--- + crypto/x509/pcy_tree.c | 36 ++-- + 3 files changed, 42 insertions(+), 14 deletions(-) + +diff --git a/crypto/x509/pcy_local.h b/crypto/x509/pcy_local.h +index 18b53cc09e..cba107ca03 100644 +--- a/crypto/x509/pcy_local.h b/crypto/x509/pcy_local.h +@@ -111,6 +111,11 @@ struct X509_POLICY_LEVEL_st { + }; + + struct X509_POLICY_TREE_st { ++/* The number of nodes in the tree */ ++size_t node_count; ++/* The maximum number of nodes in the tree */ ++size_t node_maximum; ++ + /* This is the tree 'level' data */ + X509_POLICY_LEVEL *levels; + int nlevel; +@@ -157,7 +162,8 @@ X509_POLICY_NODE *ossl_policy_tree_find_sk(STACK_OF(X509_POLICY_NODE) *sk, + X509_POLICY_NODE *ossl_policy_level_add_node(X509_POLICY_LEVEL *level, + X509_POLICY_DATA *data, + X509_POLICY_NODE *parent, +- X509_POLICY_TREE *tree); ++ X509_POLICY_TREE *tree, ++ int extra_data); + void ossl_policy_node_free(X509_POLICY_NODE *node); + int ossl_policy_node_match(const X509_POLICY_LEVEL *lvl, +const X509_POLICY_NODE *node, const ASN1_OBJECT *oid); +diff --git a/crypto/x509/pcy_node.c b/crypto/x509/pcy_node.c +index 9d9a7ea179..450f95a655 100644 +--- a/crypto/x509/pcy_node.c b/crypto/x509/pcy_node.c +@@ -59,10 +59,15 @@ X509_POLICY_NODE *ossl_policy_level_find_node(const X509_POLICY_LEVEL *level, + X509_POLICY_NODE *ossl_policy_level_add_node(X509_POLICY_LEVEL *level, + X509_POLICY_DATA *data, + X509_POLICY_NODE *parent, +- X509_POLICY_TREE *tree) ++ X509_POLICY_TREE *tree, ++ int extra_data) + { + X509_POLICY_NODE *node; + ++/* Verify that the tree isn't too large. This mitigates CVE-2023-0464 */ ++if (tree->node_maximum > 0 && tree->node_count >= tree->node_maximum) ++return NULL; ++ + node = OPENSSL_zalloc(sizeof(*node)); + if (node == NULL) { + ERR_raise(ERR_LIB_X509V3, ERR_R_MALLOC_FAILURE); +@@ -70,7 +75,7 @@ X509_POLICY_NODE *ossl_policy_level_add_node(X509_POLICY_LEVEL *level, + } + node->data = data; + node->parent = parent; +-if (level) { ++if (level != NULL) { + if (OBJ_obj2nid(data->valid_policy) == NID_any_policy) { + if (level->anyPolicy) + goto node_error; +@@ -90,7 +95,7 @@ X509_POLICY_NODE *ossl_policy_level_add_node(X509_POLICY_LEVEL *level, + } + } + +-if (tree) { ++if (extra_data) { + if (tree->extra_data == NULL) + tree->extra_data = sk_X509_POLICY_DATA_new_n
[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/IDocumentFieldsAccess.hxx |3 +- sw/inc/cellatr.hxx | 15 +- sw/inc/hintids.hxx |1 sw/inc/hints.hxx |2 - sw/source/core/attr/cellatr.cxx | 39 --- sw/source/core/attr/hints.cxx|9 +++--- sw/source/core/doc/DocumentFieldsManager.cxx | 31 ++--- sw/source/core/docnode/ndtbl.cxx |3 -- sw/source/core/edit/edtab.cxx|3 -- sw/source/core/inc/DocumentFieldsManager.hxx |2 - sw/source/core/table/swtable.cxx |4 -- sw/source/core/undo/untbl.cxx|3 -- sw/source/core/unocore/unotbl.cxx|6 +--- 13 files changed, 39 insertions(+), 82 deletions(-) New commits: commit 1bdd92bceb5997d5d0ed27b59734c88f7546a4da Author: Bjoern Michaelsen AuthorDate: Wed Mar 22 23:18:27 2023 +0100 Commit: Bjoern Michaelsen CommitDate: Thu Mar 30 21:49:59 2023 + SwTableFormulaUpdate: SwMsgPoolItem no more - get rid of legacy call with unused WhichId (TABLEFML_UPDATE) - simplify and inlune ChangeSate, by now only handling TBL_CALC - simplify params for UpdateTableFields (explictly just one SwTable*) Change-Id: Ie356c2a17eab0b557efb54719d33e278b887eef5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149591 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen diff --git a/sw/inc/IDocumentFieldsAccess.hxx b/sw/inc/IDocumentFieldsAccess.hxx index c31e6a646ed0..d0bdfe34589b 100644 --- a/sw/inc/IDocumentFieldsAccess.hxx +++ b/sw/inc/IDocumentFieldsAccess.hxx @@ -38,6 +38,7 @@ class SwMsgPoolItem; class DateTime; class SetGetExpField; class SwNode; +class SwTable; enum class SwFieldIds : sal_uInt16; template class SwHashTable; struct HashStr; @@ -95,7 +96,7 @@ namespace com::sun::star::uno { class Any; } virtual void UpdateRefFields() = 0; -virtual void UpdateTableFields(SfxPoolItem* pHt) = 0; +virtual void UpdateTableFields(const SwTable* pTable) = 0; virtual void UpdateExpFields(SwTextField* pField, bool bUpdateRefFields) = 0; diff --git a/sw/inc/cellatr.hxx b/sw/inc/cellatr.hxx index 2d85015a8901..05b1e965ef0b 100644 --- a/sw/inc/cellatr.hxx +++ b/sw/inc/cellatr.hxx @@ -26,6 +26,7 @@ #include "format.hxx" #include "hintids.hxx" #include "cellfml.hxx" +#include "node.hxx" class SwHistory; @@ -75,7 +76,19 @@ public: void TryBoxNmToPtr(); void ToSplitMergeBoxNmWithHistory(SwTableFormulaUpdate& rUpdate, SwHistory* pHistory); -void ChangeState( const SfxPoolItem* pItem ); +void ChangeState() +{ +if(!m_pDefinedIn) +return; +// detect table that contains this attribute +const SwNode* pNd = GetNodeOfFormula(); +if(!pNd) // || &pNd->GetNodes() != &pNd->GetDoc().GetNodes()) +return; +const SwTableNode* pTableNd = pNd->FindTableNode(); +if(pTableNd == nullptr) +return; +ChgValid(false); +} void Calc( SwTableCalcPara& rCalcPara, double& rValue ); }; diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx index 330b0042b3a9..a8418566f5ec 100644 --- a/sw/inc/hintids.hxx +++ b/sw/inc/hintids.hxx @@ -433,7 +433,6 @@ constexpr TypedWhichId RES_FMT_CHG(168); constexpr TypedWhichId RES_ATTRSET_CHG(169); constexpr TypedWhichId RES_UPDATE_ATTR(170); constexpr TypedWhichId RES_REFMARKFLD_UPDATE(171); -constexpr TypedWhichId RES_TABLEFML_UPDATE(173); constexpr TypedWhichId RES_UPDATEDDETBL(174); constexpr TypedWhichId RES_TBLHEADLINECHG(175); constexpr TypedWhichId RES_AUTOFMT_DOCNODE(176); diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx index 2b870373dcf1..6b993795c058 100644 --- a/sw/inc/hints.hxx +++ b/sw/inc/hints.hxx @@ -299,7 +299,7 @@ enum TableFormulaUpdateFlags { TBL_CALC = 0, TBL_MERGETBL, TBL_SPLITTBL }; -class SwTableFormulaUpdate final : public SwMsgPoolItem +class SwTableFormulaUpdate final { public: const SwTable* m_pTable; ///< Pointer to the current table diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx index 1c445bb03067..9023cca2f793 100644 --- a/sw/source/core/attr/cellatr.cxx +++ b/sw/source/core/attr/cellatr.cxx @@ -126,45 +126,6 @@ void SwTableBoxFormula::ToSplitMergeBoxNmWithHistory(SwTableFormulaUpdate& rUpda pNd->FindTableBoxStartNode()->GetIndex()); } } -void SwTableBoxFormula::ChangeState( const SfxPoolItem* pItem ) -{ -if( !m_pDefinedIn ) -return ; - -SwTableFormulaUpdate* pUpdateField; -if( !pItem || RES_TABLEFML_UPDATE != pItem->Which() ) -{ -// reset value flag -ChgValid( false ); -return ; -} - -pUpdateField = const_cast(static_cast(pItem)); - -// detect table that contains this attribute -const SwTableNode* pTableN
[Libreoffice-commits] core.git: 2 commits - package/source vcl/source
package/source/zipapi/XUnbufferedStream.cxx |9 +++-- vcl/source/outdev/textline.cxx |2 +- 2 files changed, 8 insertions(+), 3 deletions(-) New commits: commit df6bf128ae89d9b4a85fc8300ff7c5e0769e8055 Author: Caolán McNamara AuthorDate: Thu Mar 30 21:07:40 2023 +0100 Commit: Caolán McNamara CommitDate: Thu Mar 30 22:02:16 2023 + ofz#57493 Timeout Change-Id: I7d4776d77385dc46f496b873c75e2be25840f86b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149774 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx index 4481ca8011c3..77d77a9349fb 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -277,7 +277,7 @@ void OutputDevice::ImplDrawWaveTextLine( tools::Long nBaseX, tools::Long nBaseY, bool bIsAbove ) { static bool bFuzzing = utl::ConfigManager::IsFuzzing(); -if (bFuzzing && nWidth > 10) +if (bFuzzing && nWidth > 2) { SAL_WARN("vcl.gdi", "drawLine, skipping suspicious WaveTextLine of length: " << nWidth << " for fuzzing performance"); commit 397e2d5118dcc5ebd8dedfe731de02fb4277960f Author: Caolán McNamara AuthorDate: Thu Mar 30 21:03:01 2023 +0100 Commit: Caolán McNamara CommitDate: Thu Mar 30 22:02:08 2023 + ofz#57529 Integer-overflow Change-Id: I93775299aa340e2e645a04be5d0bc36a9caea103 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149773 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/package/source/zipapi/XUnbufferedStream.cxx b/package/source/zipapi/XUnbufferedStream.cxx index b0a18cc0a683..e3c31d5fca1c 100644 --- a/package/source/zipapi/XUnbufferedStream.cxx +++ b/package/source/zipapi/XUnbufferedStream.cxx @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -65,20 +66,24 @@ XUnbufferedStream::XUnbufferedStream( , mbCheckCRC(!bRecoveryMode) { mnZipCurrent = maEntry.nOffset; +sal_Int64 nSize; if ( mbRawStream ) { mnZipSize = maEntry.nMethod == DEFLATED ? maEntry.nCompressedSize : maEntry.nSize; -mnZipEnd = maEntry.nOffset + mnZipSize; +nSize = mnZipSize; } else { mnZipSize = maEntry.nSize; -mnZipEnd = maEntry.nMethod == DEFLATED ? maEntry.nOffset + maEntry.nCompressedSize : maEntry.nOffset + maEntry.nSize; +nSize = maEntry.nMethod == DEFLATED ? maEntry.nCompressedSize : maEntry.nSize; } if (mnZipSize < 0) throw ZipIOException("The stream seems to be broken!"); +if (o3tl::checked_add(maEntry.nOffset, nSize, mnZipEnd)) +throw ZipIOException("Integer-overflow"); + bool bHaveEncryptData = rData.is() && rData->m_aInitVector.hasElements() && ((rData->m_aSalt.hasElements() && rData->m_nIterationCount != 0) ||
[Libreoffice-commits] core.git: 2 commits - svx/source vcl/source
svx/source/svdraw/svdotext.cxx | 14 ++- vcl/source/gdi/metaact.cxx | 51 + 2 files changed, 30 insertions(+), 35 deletions(-) New commits: commit 4ceb287c6d42940adf887f36c4f88abae44e0022 Author: Caolán McNamara AuthorDate: Thu Mar 30 21:16:43 2023 +0100 Commit: Caolán McNamara CommitDate: Thu Mar 30 22:02:31 2023 + cid#1524600 Logically dead code since: commit 628275acb1b9652e65b8c5c013549dce5ad6f5bf Date: Thu Mar 23 11:24:30 2023 +0900 tdf#90407 Change the auto-fit alg. to match better with OOXML Change-Id: Ib315d7543229b6ddae0e3282be8cfdfb3f1bad13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149776 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 65f1dab7db65..52bf41312eed 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1290,17 +1290,9 @@ void SdrTextObj::ImpAutoFitText(SdrOutliner& rOutliner, const Size& rTextSize, { const Size aCurrTextSize = rOutliner.CalcTextSizeNTP(); double fFactor = 1.0; -if( bIsVerticalWriting ) -{ -if (aCurrTextSize.Width() != 0) -{ -fFactor = double(rTextSize.Width())/aCurrTextSize.Width(); -} -} -else if (aCurrTextSize.Height() != 0) -{ -fFactor = double(rTextSize.Height())/aCurrTextSize.Height(); -} +if (aCurrTextSize.Width() != 0) +fFactor = double(rTextSize.Width())/aCurrTextSize.Width(); + // fFactor scales in both x and y directions // - this is fine for bulleted words // - but it scales too much for a long paragraph commit 5af55a4b4ce86c61cb227822c016f0d51e03c009 Author: Caolán McNamara AuthorDate: Thu Mar 30 21:10:40 2023 +0100 Commit: Caolán McNamara CommitDate: Thu Mar 30 22:02:23 2023 + ofz#57483 Out-of-memory Change-Id: Id5e920c16f005512a14e41d453f435826a9e7053 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149775 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 2b8f0809b9fa..d410dfe35181 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -463,8 +463,35 @@ MetaPolyLineAction::MetaPolyLineAction( tools::Polygon aPoly, LineInfo aLineInfo maPoly (std::move( aPoly )) {} +static bool AllowDim(tools::Long nDim) +{ +static bool bFuzzing = utl::ConfigManager::IsFuzzing(); +if (bFuzzing) +{ +if (nDim > 0x2000 || nDim < -0x2000) +{ +SAL_WARN("vcl", "skipping huge dimension: " << nDim); +return false; +} +} +return true; +} + +static bool AllowPoint(const Point& rPoint) +{ +return AllowDim(rPoint.X()) && AllowDim(rPoint.Y()); +} + +static bool AllowRect(const tools::Rectangle& rRect) +{ +return AllowPoint(rRect.TopLeft()) && AllowPoint(rRect.BottomRight()); +} + void MetaPolyLineAction::Execute( OutputDevice* pOut ) { +if (!AllowRect(pOut->LogicToPixel(maPoly.GetBoundRect( +return; + if( maLineInfo.IsDefault() ) pOut->DrawPolyLine( maPoly ); else @@ -570,30 +597,6 @@ MetaTextAction::MetaTextAction( const Point& rPt, OUString aStr, mnLen ( nLen ) {} -static bool AllowDim(tools::Long nDim) -{ -static bool bFuzzing = utl::ConfigManager::IsFuzzing(); -if (bFuzzing) -{ -if (nDim > 0x2000 || nDim < -0x2000) -{ -SAL_WARN("vcl", "skipping huge dimension: " << nDim); -return false; -} -} -return true; -} - -static bool AllowPoint(const Point& rPoint) -{ -return AllowDim(rPoint.X()) && AllowDim(rPoint.Y()); -} - -static bool AllowRect(const tools::Rectangle& rRect) -{ -return AllowPoint(rRect.TopLeft()) && AllowPoint(rRect.BottomRight()); -} - void MetaTextAction::Execute( OutputDevice* pOut ) { if (!AllowDim(pOut->LogicToPixel(maPt).Y()))
[Libreoffice-commits] core.git: 2 commits - sc/inc sc/source svx/source
sc/inc/drwlayer.hxx |1 sc/inc/stlpool.hxx|6 ++- sc/source/core/data/documen9.cxx |8 sc/source/core/data/drwlayer.cxx | 18 - sc/source/core/data/postit.cxx|5 ++ sc/source/core/data/stlpool.cxx | 42 -- sc/source/core/tool/stylehelper.cxx | 10 + sc/source/ui/app/drwtrans.cxx | 22 --- sc/source/ui/app/transobj.cxx |6 +-- sc/source/ui/view/viewfun5.cxx| 12 ++ sc/source/ui/view/viewfun7.cxx| 10 - svx/source/sdr/properties/attributeproperties.cxx |2 - svx/source/sdr/properties/graphicproperties.cxx |1 svx/source/sdr/properties/oleproperties.cxx |1 14 files changed, 119 insertions(+), 25 deletions(-) New commits: commit 685a864cfc40227559ed55f6273fd118174e8e6e Author: Maxim Monastirsky AuthorDate: Sun Mar 26 22:23:52 2023 +0300 Commit: Maxim Monastirsky CommitDate: Thu Mar 30 22:43:23 2023 + sc drawstyles: Clipboard support - Paste as Calc's own format (default in Calc, results with an OLE object elsewhere), should preserve style assignment. This can be in one of two ways: Either copy the shape itself, or a cell range that includes a shape. - Similarly, copying or moving a whole sheet to another document should also preserve the style. - Paste as drawing format (default in other apps, also default in Calc when copying shapes from other apps), should preserve the formatting as direct formatting. Pasting into Calc will also assign the default style to that shape. Change-Id: Icb951dad1a77ba9ced706c33c928980d1ec7f8ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149753 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky diff --git a/sc/inc/stlpool.hxx b/sc/inc/stlpool.hxx index 51694a405202..131b82c749ef 100644 --- a/sc/inc/stlpool.hxx +++ b/sc/inc/stlpool.hxx @@ -45,8 +45,10 @@ public: voidCreateStandardStyles(); voidCopyStdStylesFrom( ScStyleSheetPool* pSrcPool ); -voidCopyStyleFrom( ScStyleSheetPool* pSrcPool, - const OUString& rName, SfxStyleFamily eFamily ); +voidCopyUsedGraphicStylesFrom( SfxStyleSheetBasePool* pSrcPool ); +voidCopyStyleFrom( SfxStyleSheetBasePool* pSrcPool, + const OUString& rName, SfxStyleFamily eFamily, + bool bNewStyleHierarchy = false ); boolHasStandardStyles() const { return bHasStandardStyles; } diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx index 34c25c761db4..f63c1ee4d1f1 100644 --- a/sc/source/core/data/documen9.cxx +++ b/sc/source/core/data/documen9.cxx @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -76,6 +77,12 @@ void ScDocument::TransferDrawPage(const ScDocument& rSrcDoc, SCTAB nSrcPos, SCTA SdrObject* pOldObject = aIter.Next(); while (pOldObject) { +// Copy style sheet +auto pStyleSheet = pOldObject->GetStyleSheet(); +if (pStyleSheet) + GetStyleSheetPool()->CopyStyleFrom(rSrcDoc.GetStyleSheetPool(), + pStyleSheet->GetName(), pStyleSheet->GetFamily(), true); + // Clone to target SdrModel rtl::Reference pNewObject(pOldObject->CloneSdrObject(*mpDrawLayer)); pNewObject->NbcMove(Size(0,0)); diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 263c5698c15a..a3162055d386 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -385,8 +385,11 @@ SdrModel* ScDrawLayer::AllocModel() const { // Allocated model (for clipboard etc) must not have a pointer // to the original model's document, pass NULL as document: +auto pNewModel = std::make_unique(nullptr, aName); +auto pNewPool = static_cast(pNewModel->GetStyleSheetPool()); +pNewPool->CopyUsedGraphicStylesFrom(GetStyleSheetPool()); -return new ScDrawLayer( nullptr, aName ); +return pNewModel.release(); } bool ScDrawLayer::ScAddPage( SCTAB nTab ) @@ -1930,6 +1933,12 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const if (bObjectInArea && (pOldObject->GetLayer() != SC_LAYER_INTERN) && !IsNoteCaption(pOldObject)) { +// Copy style sheet +auto pStyleSheet = pOldObject->GetStyleSheet(); +if (pStyleSheet && !bSameDoc) + pDoc->GetStyleSh
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/bitmaps.hlst|1 + sc/inc/scstyles.hrc|9 + sc/source/ui/app/scmod.cxx |5 + 3 files changed, 15 insertions(+) New commits: commit 1b463f697405e64a03378fb38a32172c4d3c25e6 Author: Maxim Monastirsky AuthorDate: Fri Mar 17 14:56:04 2023 +0200 Commit: Maxim Monastirsky CommitDate: Thu Mar 30 22:43:36 2023 + sc drawstyles: Enable the UI I believe it's in a usable state now. But keep in mind that the work isn't finished yet. For example, there is only one base default style, and the work to support styles for comments wasn't merged yet. Change-Id: I1ad3a4803ad91773906743e19a35405d5cd3255d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149754 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky diff --git a/sc/inc/bitmaps.hlst b/sc/inc/bitmaps.hlst index 1b24f4b28851..422ed5ddeb63 100644 --- a/sc/inc/bitmaps.hlst +++ b/sc/inc/bitmaps.hlst @@ -61,6 +61,7 @@ inline constexpr OUStringLiteral RID_BMP_INPUT_OK = u"sc/res/sc26051.png"; inline constexpr OUStringLiteral BMP_STYLES_FAMILY_CELL = u"sc/res/sf01.png"; inline constexpr OUStringLiteral BMP_STYLES_FAMILY_PAGE = u"sc/res/sf02.png"; +inline constexpr OUStringLiteral BMP_STYLES_FAMILY_GRAPHICS = u"sd/res/sf01.png"; inline constexpr OUStringLiteral BMP_ICON_SET_CIRCLES1_GRAY = u"sc/res/icon-set-circles1-gray.png"; inline constexpr OUStringLiteral BMP_ICON_SET_CIRCLES1_GREEN = u"sc/res/icon-set-circles1-green.png"; diff --git a/sc/inc/scstyles.hrc b/sc/inc/scstyles.hrc index 4e4c449d69c9..224f2cd475ac 100644 --- a/sc/inc/scstyles.hrc +++ b/sc/inc/scstyles.hrc @@ -41,4 +41,13 @@ const std::pair RID_PAGESTYLEFAMILY[] = { {}, SfxStyleSearchBits::Auto } }; +const std::pair RID_GRAPHICSTYLEFAMILY[] = +{ +{ NC_("RID_GRAPHICSTYLEFAMILY", "All Styles") , SfxStyleSearchBits::AllVisible }, +{ NC_("RID_GRAPHICSTYLEFAMILY", "Hidden Styles") , SfxStyleSearchBits::Hidden }, +{ NC_("RID_GRAPHICSTYLEFAMILY", "Applied Styles") , SfxStyleSearchBits::Used }, +{ NC_("RID_GRAPHICSTYLEFAMILY", "Custom Styles") , SfxStyleSearchBits::UserDefined }, +{ {}, SfxStyleSearchBits::Auto } +}; + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 18aa0845088c..2f84555fd3ca 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -2308,6 +2308,11 @@ std::optional ScModule::CreateStyleFamilies() BMP_STYLES_FAMILY_PAGE, RID_PAGESTYLEFAMILY, SC_MOD()->GetResLocale())); +aStyleFamilies.emplace_back(SfxStyleFamilyItem(SfxStyleFamily::Frame, + ScResId(STR_STYLE_FAMILY_GRAPHICS), +BMP_STYLES_FAMILY_GRAPHICS, +RID_GRAPHICSTYLEFAMILY, SC_MOD()->GetResLocale())); + return aStyleFamilies; }
Re: Re: OpenLDAP (with OpenSSL) build fails on Jenkins.
I changed gcc to version 7.5.0 and OpenSSL to 3.1.0 and built again without libssl-dev installed, but could not reproduce the problem in this case either. --- m...@libreoffice.org wrote: > On 09.03.23 01:06, taichi wrote: > > Hi, > > > > Yes, libssl-dev(libssl and libcrypto) installed on Ubuntu. > > that could be the problem actually: maybe on your system the bundled > openldap finds the system openssl libraries and it happens to work, but > it must find the bundled openssl libraries in workdir in TDF builds. > > try uninstalling those packages, make sure you have "SYSTEM_OPENSSL=" in > config_host.mk, and try if you can reproduce the problem then. >
[Libreoffice-commits] core.git: sw/source
sw/source/core/inc/UndoAttribute.hxx |1 sw/source/core/layout/atrfrm.cxx | 61 +-- sw/source/core/undo/unattr.cxx | 11 ++ sw/source/core/unocore/unoframe.cxx |6 +-- sw/source/ui/frmdlg/frmpage.cxx |4 +- sw/source/uibase/frmdlg/frmmgr.cxx |2 - sw/source/uibase/shells/basesh.cxx |2 - 7 files changed, 51 insertions(+), 36 deletions(-) New commits: commit 3db0ff0c49159f9856c259167256f6c5f89931e0 Author: Noel Grandin AuthorDate: Thu Mar 30 14:17:18 2023 +0200 Commit: Noel Grandin CommitDate: Fri Mar 31 05:52:47 2023 + add some asserts in SwFormatAnchor Which flushes out some dodgy behaviour. Particularly in SwUndoFormatAttr, which was storing a sal_Int32 content offset in a sal_uInt16 page field. In this case, rather just store the value on SwUndoFormatAttr itself, the same way it does for other things. Change-Id: I5890353f5d51d82037bf7e0e77a16cf3b0dff565 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149764 Tested-by: Noel Grandin Reviewed-by: Noel Grandin diff --git a/sw/source/core/inc/UndoAttribute.hxx b/sw/source/core/inc/UndoAttribute.hxx index 178a17f5a2fd..7fbbb5b522cd 100644 --- a/sw/source/core/inc/UndoAttribute.hxx +++ b/sw/source/core/inc/UndoAttribute.hxx @@ -87,6 +87,7 @@ class SwUndoFormatAttr final : public SwUndo friend class SwUndoDefaultAttr; OUString m_sFormatName; std::optional m_oOldSet; // old attributes +sal_Int32 m_nAnchorContentOffset; SwNodeOffset m_nNodeIndex; const sal_uInt16 m_nFormatWhich; const bool m_bSaveDrawPt; diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index b53683e780e2..b976f6ee1377 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -1560,20 +1560,27 @@ void SwFormatHoriOrient::dumpAsXml(xmlTextWriterPtr pWriter) const (void)xmlTextWriterEndElement(pWriter); } -// Partially implemented inline in hxx SwFormatAnchor::SwFormatAnchor( RndStdIds nRnd, sal_uInt16 nPage ) : SfxPoolItem( RES_ANCHOR ), m_eAnchorId( nRnd ), m_nPageNumber( nPage ), // OD 2004-05-05 #i28701# - get always new increased order number m_nOrder( ++s_nOrderCounter ) -{} +{ +assert( m_eAnchorId == RndStdIds::FLY_AT_PARA +|| m_eAnchorId == RndStdIds::FLY_AS_CHAR +|| m_eAnchorId == RndStdIds::FLY_AT_PAGE +|| m_eAnchorId == RndStdIds::FLY_AT_FLY +|| m_eAnchorId == RndStdIds::FLY_AT_CHAR); +// only FLY_AT_PAGE should have a valid page +assert( m_eAnchorId == RndStdIds::FLY_AT_PAGE || nPage == 0 ); +} SwFormatAnchor::SwFormatAnchor( const SwFormatAnchor &rCpy ) : SfxPoolItem( RES_ANCHOR ) , m_oContentAnchor( rCpy.m_oContentAnchor ) -, m_eAnchorId( rCpy.GetAnchorId() ) -, m_nPageNumber( rCpy.GetPageNum() ) +, m_eAnchorId( rCpy.m_eAnchorId ) +, m_nPageNumber( rCpy.m_nPageNumber ) // OD 2004-05-05 #i28701# - get always new increased order number , m_nOrder( ++s_nOrderCounter ) { @@ -1585,22 +1592,23 @@ SwFormatAnchor::~SwFormatAnchor() void SwFormatAnchor::SetAnchor( const SwPosition *pPos ) { +if (!pPos) +{ +m_oContentAnchor.reset(); +return; +} // anchor only to paragraphs, or start nodes in case of RndStdIds::FLY_AT_FLY // also allow table node, this is used when a table is selected and is converted to a frame by the UI -assert(!pPos -|| (RndStdIds::FLY_AT_FLY == m_eAnchorId && pPos->GetNode().GetStartNode()) +assert((RndStdIds::FLY_AT_FLY == m_eAnchorId && pPos->GetNode().GetStartNode()) || (RndStdIds::FLY_AT_PARA == m_eAnchorId && pPos->GetNode().GetTableNode()) || pPos->GetNode().GetTextNode()); -if (pPos) -m_oContentAnchor.emplace(*pPos); -else -m_oContentAnchor.reset(); +// verify that the SwPosition being passed to us is not screwy +assert(!pPos->nContent.GetContentNode() +|| &pPos->nNode.GetNode() == pPos->nContent.GetContentNode()); +m_oContentAnchor.emplace(*pPos); // Flys anchored AT paragraph should not point into the paragraph content -if (m_oContentAnchor && -((RndStdIds::FLY_AT_PARA == m_eAnchorId) || (RndStdIds::FLY_AT_FLY == m_eAnchorId))) -{ +if ((RndStdIds::FLY_AT_PARA == m_eAnchorId) || (RndStdIds::FLY_AT_FLY == m_eAnchorId)) m_oContentAnchor->nContent.Assign( nullptr, 0 ); -} } SwNode* SwFormatAnchor::GetAnchorNode() const @@ -1633,8 +1641,8 @@ SwFormatAnchor& SwFormatAnchor::operator=(const SwFormatAnchor& rAnchor) { if (this != &rAnchor) { -m_eAnchorId = rAnchor.GetAnchorId(); -m_nPageNumber = rAnchor.GetPageNum(); +m_eAnchorId = rAnchor.m_eAnchorId; +m_nPageNumber = rAnchor.m_nPageNumber; // OD 2004-05-05 #i28701# - get always new increased order number m
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - sw/qa sw/source
sw/qa/extras/ooxmlexport/ooxmlexport10.cxx |6 + sw/source/core/doc/DocumentContentOperationsManager.cxx | 18 sw/source/core/inc/DocumentContentOperationsManager.hxx |3 +- 3 files changed, 22 insertions(+), 5 deletions(-) New commits: commit f08bd56cff961cb53f0c2b695513781bbc3e91e4 Author: Justin Luth AuthorDate: Fri Mar 24 20:45:29 2023 -0400 Commit: Miklos Vajna CommitDate: Fri Mar 31 06:02:25 2023 + sw CopyBookmarks: ensure that Move copies can rename The problem was that a reference to the bookmark name was failing - since the move was adding a "Copy 1" at the end. That rename line is very deceptive because AFAICS it fails every time. I'm going to look at removing it in a followup commit. Two other unit tests also found with make sw.check -tdf149089.docx -tdf149507.docx but they also didn't have references to the bookmark to visually notice. make CppunitTest_sw_ooxmlexport10 CPPUNIT_TEST_NAME=testTdf92157 Change-Id: Idd695ec4a89057b28a68bc051b73f17fd4c3de56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149574 Tested-by: Jenkins Reviewed-by: Justin Luth Reviewed-by: Miklos Vajna Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149641 Tested-by: Justin Luth Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149766 Tested-by: Jenkins CollaboraOffice diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx index cfeafa71170b..937beb548e6d 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx @@ -1177,6 +1177,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf95775, "tdf95775.docx") DECLARE_OOXMLEXPORT_TEST(testTdf92157, "tdf92157.docx") { // A graphic with dimensions 0,0 should not fail on load + +// Additionally, the bookmark names should not change (they got a "1" appended when copied) +uno::Reference xBookmarksSupplier(mxComponent, uno::UNO_QUERY); +uno::Reference xBookmarksByName = xBookmarksSupplier->getBookmarks(); +CPPUNIT_ASSERT(xBookmarksByName->hasByName("referentiegegevens")); +CPPUNIT_ASSERT(xBookmarksByName->hasByName("referentiegegevens_bk")); } DECLARE_OOXMLEXPORT_TEST(testTdf97417, "section_break_numbering.docx") diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index c368ada50194..9e383db67190 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -230,7 +230,7 @@ namespace namespace sw { // TODO: use SaveBookmark (from DelBookmarks) -void CopyBookmarks(const SwPaM& rPam, const SwPosition& rCpyPam) +void CopyBookmarks(const SwPaM& rPam, const SwPosition& rCpyPam, SwCopyFlags flags) { const SwDoc& rSrcDoc = rPam.GetDoc(); SwDoc& rDestDoc = rCpyPam.GetDoc(); @@ -293,9 +293,19 @@ namespace sw lcl_SetCpyPos(pMark->GetOtherMarkPos(), rStt, *pCpyStt, *aTmpPam.GetMark(), nDelCount); } +OUString sRequestedName = pMark->GetName(); +if (flags & SwCopyFlags::IsMoveToFly) +{ +assert(&rSrcDoc == &rDestDoc); +// Ensure the name can be given to NewMark, since this is ultimately a move +auto pSoonToBeDeletedMark = const_cast(pMark); + rDestDoc.getIDocumentMarkAccess()->renameMark(pSoonToBeDeletedMark, + sRequestedName + "COPY_IS_MOVE"); +} + ::sw::mark::IMark* const pNewMark = rDestDoc.getIDocumentMarkAccess()->makeMark( aTmpPam, -pMark->GetName(), +sRequestedName, IDocumentMarkAccess::GetType(*pMark), ::sw::mark::InsertMode::CopyText); // Explicitly try to get exactly the same name as in the source @@ -306,7 +316,7 @@ namespace sw || IDocumentMarkAccess::GetType(*pMark) == IDocumentMarkAccess::MarkType::CROSSREF_HEADING_BOOKMARK); continue; // can't insert duplicate cross reference mark } -rDestDoc.getIDocumentMarkAccess()->renameMark(pNewMark, pMark->GetName()); +rDestDoc.getIDocumentMarkAccess()->renameMark(pNewMark, sRequestedName); // copying additional attributes for bookmarks or fieldmarks ::sw::mark::IBookmark* const pNewBookmark = @@ -3683,7 +3693,7 @@ void DocumentContentOperationsManager::CopyWithFlyInFly( targetPos = pCopiedPaM->second; } -sw::CopyBookmarks(pCopiedPaM ? pCopiedPaM->first : aRgTmp, targetPos); +sw::CopyBookmarks(pCopiedPaM ? pCopiedPaM->first : aRgTmp, targetPos, flags); } if (rRg.aStart != rRg.aEnd) diff --git a/sw/source
[Libreoffice-commits] core.git: sw/source
sw/source/core/inc/ftnfrm.hxx |2 ++ sw/source/core/layout/paintfrm.cxx | 13 + sw/source/core/text/xmldump.cxx|3 --- 3 files changed, 15 insertions(+), 3 deletions(-) New commits: commit ad811b4441f6f9f8f42114640fea39cf0f3156a5 Author: Miklos Vajna AuthorDate: Fri Mar 31 07:04:21 2023 +0200 Commit: Miklos Vajna CommitDate: Fri Mar 31 06:02:34 2023 + sw layout xml dump: extract SwFootnoteContFrame::dumpAsXml() from SwFrame Ideally SwFrame should not really know anything about footnote container frames. Change-Id: I2745cb74ff503288863439a15b37cec06766d208 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149814 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sw/source/core/inc/ftnfrm.hxx b/sw/source/core/inc/ftnfrm.hxx index a6835c9a71ba..56061d97c21f 100644 --- a/sw/source/core/inc/ftnfrm.hxx +++ b/sw/source/core/inc/ftnfrm.hxx @@ -64,6 +64,8 @@ public: const SwBorderAttrs&) const override; virtual void PaintSubsidiaryLines( const SwPageFrame*, const SwRect& ) const override; voidPaintLine( const SwRect &, const SwPageFrame * ) const; + +void dumpAsXml(xmlTextWriterPtr writer = nullptr) const override; }; inline SwFootnoteFrame* SwFootnoteContFrame::AppendChained(SwFrame* pThis, bool bDefaultFormat) diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 37a53417f1c8..66612ba3b840 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -5503,6 +5503,19 @@ void SwFootnoteContFrame::PaintLine( const SwRect& rRect, rInf.GetLineStyle() ); } +void SwFootnoteContFrame::dumpAsXml(xmlTextWriterPtr writer) const +{ +(void)xmlTextWriterStartElement(writer, reinterpret_cast("ftncont")); +dumpAsXmlAttributes(writer); + +(void)xmlTextWriterStartElement(writer, BAD_CAST("infos")); +dumpInfosAsXml(writer); +(void)xmlTextWriterEndElement(writer); +dumpChildrenAsXml(writer); + +(void)xmlTextWriterEndElement(writer); +} + /// Paints the separator line for inside columns void SwLayoutFrame::PaintColLines( const SwRect &rRect, const SwFormatCol &rFormatCol, const SwPageFrame *pPage ) const diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx index 5544943f3dd0..8344ddbea178 100644 --- a/sw/source/core/text/xmldump.cxx +++ b/sw/source/core/text/xmldump.cxx @@ -174,9 +174,6 @@ void SwFrame::dumpAsXml( xmlTextWriterPtr writer ) const switch ( GetType( ) ) { -case SwFrameType::FtnCont: -name = "ftncont"; -break; case SwFrameType::Ftn: name = "ftn"; break;
Re: [libreoffice-marketing] Moving to LibreOffice 8?
Hi y'all, Uwe Altmann wrote: > Am 29.03.23 um 12:28 schrieb Clocked Modular: > > Is it an option to stick to 7 as long as there are no major changes? > > With a six monthly release plan it is not that easy to have major changes ;-) > Yes, I believe that's the important point. No single release of LibreOffice will ever have the massive pack of new features, that e.g. MSO major release have. In the past, we usually did the following: * look at the full version cycle (7.0 -> 7.5) as the field of change * favouring the spring release over the summer one (since gsoc usually provided a number of visible features) * or piggy-back on hard-to-plan events, like ODF releases One more reason to seriously consider year-based names, since it better matches our way of development. Cheers, -- Thorsten signature.asc Description: PGP signature
Re: [libreoffice-marketing] Re: Moving to LibreOffice 8?
Hi László, all, Németh László wrote: > The next release has already got major improvements. My favorites ( > https://wiki.documentfoundation.org/ReleaseNotes/7.6): > Two more in-progress features of, I believe, some importance: * theme support in Impress (Tomaž, Collabora) * multi-color gradients (Armin, allotropia) Cheers, -- Thorsten signature.asc Description: PGP signature