Rebased ref, commits from common ancestor: commit a13e62efd1c794805ef4fea70230278899751a43 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Fri Jul 17 15:09:49 2020 +0200 Commit: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> CommitDate: Tue Nov 24 15:00:17 2020 +0900
Revert "hack for gradients split into adjacent polygons (tdf#133016)" This reverts commit 777ac5456a1f24fea29931ede983b5b8ad9a063d. diff --git a/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx b/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx index 7c9eb8441306..9b9d258046cc 100644 --- a/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx @@ -30,7 +30,7 @@ #include <drawinglayer/geometry/viewinformation2d.hxx> #include <sal/log.hxx> #include <cmath> -#include <vcl/skia/SkiaHelper.hxx> + using namespace com::sun::star; @@ -868,12 +868,6 @@ namespace drawinglayer::primitive2d // use color distance and discrete lengths to calculate step count const sal_uInt32 nSteps(calculateStepsForSvgGradient(getColorA(), getColorB(), fDelta, fDiscreteUnit)); - // HACK: Splitting a gradient into adjacent polygons with gradually changing color is silly. - // If antialiasing is used to draw them, the AA-ed adjacent edges won't line up perfectly - // because of the AA (see SkiaSalGraphicsImpl::mergePolyPolygonToPrevious()). - // Make the polygons a bit wider, so they the partial overlap "fixes" this. - const double fixup = SkiaHelper::isVCLSkiaEnabled() ? fDiscreteUnit / 2 : 0; - // tdf#117949 Use a small amount of discrete overlap at the edges. Usually this // should be exactly 0.0 and 1.0, but there were cases when this gets clipped // against the mask polygon which got numerically problematic. @@ -887,7 +881,7 @@ namespace drawinglayer::primitive2d basegfx::B2DRange( getOffsetA() - fDiscreteUnit, -0.0001, // TTTT -> should be 0.0, see comment above - getOffsetA() + (fDelta / nSteps) + fDiscreteUnit + fixup, + getOffsetA() + (fDelta / nSteps) + fDiscreteUnit, 1.0001))); // TTTT -> should be 1.0, see comment above // prepare loop (inside to outside, [0.0 .. 1.0[) commit bd8068bf4df41c7e7c05a0f05c140da5f460fa92 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Mon Jun 15 19:39:35 2020 +0200 Commit: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> CommitDate: Tue Nov 24 15:00:17 2020 +0900 vcl: add a Bitmap interface to basegfx, BitmapEx implementing it Change-Id: I758f421d545191883e615f5016e9fc643459556e diff --git a/include/basegfx/bitmap/Bitmap.hxx b/include/basegfx/bitmap/Bitmap.hxx new file mode 100644 index 000000000000..b91b702aa212 --- /dev/null +++ b/include/basegfx/bitmap/Bitmap.hxx @@ -0,0 +1,23 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + */ + +#pragma once + +#include <basegfx/basegfxdllapi.h> + +namespace basegfx +{ +class BASEGFX_DLLPUBLIC IBitmap +{ +}; + +} // end of namespace basegfx + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx index dc9f8a837502..cb7d8c2df583 100644 --- a/include/vcl/bitmapex.hxx +++ b/include/vcl/bitmapex.hxx @@ -26,6 +26,8 @@ #include <tools/color.hxx> #include <tools/degree.hxx> +#include <basegfx/bitmap/Bitmap.hxx> + #include <sal/types.h> namespace com::sun::star::rendering { @@ -41,7 +43,7 @@ enum class TransparentType Bitmap }; -class SAL_WARN_UNUSED VCL_DLLPUBLIC BitmapEx +class SAL_WARN_UNUSED VCL_DLLPUBLIC BitmapEx : basegfx::IBitmap { public: commit ab0a42c7e8890ed4b3a970df91a5eb76489db28d Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Wed May 27 12:49:05 2020 +0200 Commit: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> CommitDate: Tue Nov 24 15:00:16 2020 +0900 add o3tl version of hash_combine to not depend on boost for this Change-Id: I081f8d116ef811baa8aa5de35a6cb51fa4de7d56 diff --git a/include/o3tl/hash_combine.hxx b/include/o3tl/hash_combine.hxx new file mode 100644 index 000000000000..17419b3e2c0f --- /dev/null +++ b/include/o3tl/hash_combine.hxx @@ -0,0 +1,29 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#pragma once + +namespace o3tl +{ +template <typename T, typename N, std::enable_if_t<(sizeof(N) == 4), bool> = false> +inline void hash_combine(N& nSeed, T const& nValue) +{ + static_assert(sizeof(nSeed) == 4); + nSeed ^= std::hash<T>{}(nValue) + 0x9E3779B9u + (nSeed << 6) + (nSeed >> 2); +} + +template <typename T, typename N, std::enable_if_t<(sizeof(N) == 8), bool> = false> +inline void hash_combine(N& nSeed, T const& nValue) +{ + static_assert(sizeof(nSeed) == 8); + nSeed ^= std::hash<T>{}(nValue) + 0x9E3779B97F4A7C15llu + (nSeed << 12) + (nSeed >> 4); +} +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/o3tl/qa/test-lru_map.cxx b/o3tl/qa/test-lru_map.cxx index ba9ee71835ce..ef46f44d17b9 100644 --- a/o3tl/qa/test-lru_map.cxx +++ b/o3tl/qa/test-lru_map.cxx @@ -15,7 +15,7 @@ #include <o3tl/lru_map.hxx> -#include <boost/functional/hash.hpp> +#include <o3tl/hash_combine.hxx> using namespace ::o3tl; @@ -202,8 +202,8 @@ struct TestClassKeyHashFunction std::size_t operator()(TestClassKey const& aKey) const { std::size_t seed = 0; - boost::hash_combine(seed, aKey.mA); - boost::hash_combine(seed, aKey.mB); + o3tl::hash_combine(seed, aKey.mA); + o3tl::hash_combine(seed, aKey.mB); return seed; } }; commit 62b8baac0b7aab6c0a093bf6a265ef3e0d1c5025 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Tue May 26 15:57:38 2020 +0200 Commit: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> CommitDate: Tue Nov 24 15:00:16 2020 +0900 GraphicAttributes: put const. and op. '=' into the header file Change-Id: I1bc38f89457c3593673b445e7571a4fd82d5960b diff --git a/include/vcl/GraphicAttributes.hxx b/include/vcl/GraphicAttributes.hxx index 559e3f9fc36c..df937b898d3d 100644 --- a/include/vcl/GraphicAttributes.hxx +++ b/include/vcl/GraphicAttributes.hxx @@ -52,9 +52,37 @@ private: GraphicDrawMode meDrawMode; public: - GraphicAttr(); + GraphicAttr() + : mfGamma(1.0) + , mnMirrFlags(basegfx::MirrorDirectionFlags::NONE) + , mnLeftCrop(0) + , mnTopCrop(0) + , mnRightCrop(0) + , mnBottomCrop(0) + , mnRotate10(0) + , mnContPercent(0) + , mnLumPercent(0) + , mnRPercent(0) + , mnGPercent(0) + , mnBPercent(0) + , mbInvert(false) + , mcTransparency(0) + , meDrawMode(GraphicDrawMode::Standard) + { + } + + bool operator==(const GraphicAttr& rAttr) const + { + return mfGamma == rAttr.mfGamma && mnMirrFlags == rAttr.mnMirrFlags + && mnLeftCrop == rAttr.mnLeftCrop && mnTopCrop == rAttr.mnTopCrop + && mnRightCrop == rAttr.mnRightCrop && mnBottomCrop == rAttr.mnBottomCrop + && mnRotate10 == rAttr.mnRotate10 && mnContPercent == rAttr.mnContPercent + && mnLumPercent == rAttr.mnLumPercent && mnRPercent == rAttr.mnRPercent + && mnGPercent == rAttr.mnGPercent && mnBPercent == rAttr.mnBPercent + && mbInvert == rAttr.mbInvert && mcTransparency == rAttr.mcTransparency + && meDrawMode == rAttr.meDrawMode; + } - bool operator==(const GraphicAttr& rAttr) const; bool operator!=(const GraphicAttr& rAttr) const { return !(*this == rAttr); } void SetDrawMode(GraphicDrawMode eDrawMode) { meDrawMode = eDrawMode; } diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 6b7ef7cd9a2f..bb44d3a1c3c0 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -329,7 +329,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/graphic/GraphicObject \ vcl/source/graphic/GraphicObject2 \ vcl/source/graphic/GraphicReader \ - vcl/source/graphic/grfattr \ vcl/source/graphic/Manager \ vcl/source/graphic/UnoGraphic \ vcl/source/graphic/UnoGraphicMapper \ diff --git a/vcl/source/graphic/grfattr.cxx b/vcl/source/graphic/grfattr.cxx deleted file mode 100644 index 36e8605b77de..000000000000 --- a/vcl/source/graphic/grfattr.cxx +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <vcl/GraphicAttributes.hxx> - -GraphicAttr::GraphicAttr() : - mfGamma ( 1.0 ), - mnMirrFlags ( basegfx::MirrorDirectionFlags::NONE ), - mnLeftCrop ( 0 ), - mnTopCrop ( 0 ), - mnRightCrop ( 0 ), - mnBottomCrop ( 0 ), - mnRotate10 ( 0 ), - mnContPercent ( 0 ), - mnLumPercent ( 0 ), - mnRPercent ( 0 ), - mnGPercent ( 0 ), - mnBPercent ( 0 ), - mbInvert ( false ), - mcTransparency ( 0 ), - meDrawMode ( GraphicDrawMode::Standard ) -{ -} - -bool GraphicAttr::operator==( const GraphicAttr& rAttr ) const -{ - return( ( mfGamma == rAttr.mfGamma ) && - ( mnMirrFlags == rAttr.mnMirrFlags ) && - ( mnLeftCrop == rAttr.mnLeftCrop ) && - ( mnTopCrop == rAttr.mnTopCrop ) && - ( mnRightCrop == rAttr.mnRightCrop ) && - ( mnBottomCrop == rAttr.mnBottomCrop ) && - ( mnRotate10 == rAttr.mnRotate10 ) && - ( mnContPercent == rAttr.mnContPercent ) && - ( mnLumPercent == rAttr.mnLumPercent ) && - ( mnRPercent == rAttr.mnRPercent ) && - ( mnGPercent == rAttr.mnGPercent ) && - ( mnBPercent == rAttr.mnBPercent ) && - ( mbInvert == rAttr.mbInvert ) && - ( mcTransparency == rAttr.mcTransparency ) && - ( meDrawMode == rAttr.meDrawMode ) ); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 35b6ed10c5683fb8465df56dc4589c10b05ea739 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Tue May 26 13:39:45 2020 +0200 Commit: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> CommitDate: Tue Nov 24 15:00:16 2020 +0900 basegfx::MirrorDirectionFlags as replacement for BmpMirrorFlags BmpMirrorFlags in Bitmap is an attribute for bitmap manipulation (mirroring). This change creates a copy of the flags in basegfx as MirrorDirectionFlags, which will be used in the fututre as a general repalcement for the BmpMirrorFlags, that will be changed step by step. For now we only use the flags in GraphicAttr to make it independent form vcl, and cast to/from BmpMirrorFLags and MirrorDirectionFlags where needed. Change-Id: I01a69a4d241caa22cff61bdbf87944af57684749 diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx index 9de4b8a80e64..8f801700ccf4 100644 --- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx @@ -49,8 +49,10 @@ void GraphicPrimitive2D::create2DDecomposition(Primitive2DContainer& rContainer, if (getGraphicAttr().IsMirrored()) { // content needs mirroring - const bool bHMirr(getGraphicAttr().GetMirrorFlags() & BmpMirrorFlags::Horizontal); - const bool bVMirr(getGraphicAttr().GetMirrorFlags() & BmpMirrorFlags::Vertical); + const bool bHMirr(getGraphicAttr().GetMirrorFlags() + & basegfx::MirrorDirectionFlags::Horizontal); + const bool bVMirr(getGraphicAttr().GetMirrorFlags() + & basegfx::MirrorDirectionFlags::Vertical); // mirror by applying negative scale to the unit primitive and // applying the object transformation on it. @@ -69,7 +71,7 @@ void GraphicPrimitive2D::create2DDecomposition(Primitive2DContainer& rContainer, aSuppressGraphicAttr.SetCrop(0, 0, 0, 0); aSuppressGraphicAttr.SetRotation(Degree10(0)); - aSuppressGraphicAttr.SetMirrorFlags(BmpMirrorFlags::NONE); + aSuppressGraphicAttr.SetMirrorFlags(basegfx::MirrorDirectionFlags::NONE); aSuppressGraphicAttr.SetTransparency(0); const GraphicObject& rGraphicObject = getGraphicObject(); diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 505e43d91fc1..d5a5b63dc83e 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1674,7 +1674,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(const uno::Reference<beans if(bMirrored) { - pGraphicAttr->SetMirrorFlags(BmpMirrorFlags::Horizontal); + pGraphicAttr->SetMirrorFlags(basegfx::MirrorDirectionFlags::Horizontal); } if(nTransparency) diff --git a/include/basegfx/bitmap/BitmapAttributes.hxx b/include/basegfx/bitmap/BitmapAttributes.hxx new file mode 100644 index 000000000000..d918d55faa99 --- /dev/null +++ b/include/basegfx/bitmap/BitmapAttributes.hxx @@ -0,0 +1,36 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + */ + +#pragma once + +#include <basegfx/basegfxdllapi.h> +#include <o3tl/typed_flags_set.hxx> + +namespace basegfx +{ +enum class MirrorDirectionFlags +{ + NONE = 0x00, + Horizontal = 0x01, + Vertical = 0x02, +}; + +} // end of namespace basegfx + +namespace o3tl +{ +template <> +struct typed_flags<basegfx::MirrorDirectionFlags> + : is_typed_flags<basegfx::MirrorDirectionFlags, 0x03> +{ +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/GraphicAttributes.hxx b/include/vcl/GraphicAttributes.hxx index 5216d2934166..559e3f9fc36c 100644 --- a/include/vcl/GraphicAttributes.hxx +++ b/include/vcl/GraphicAttributes.hxx @@ -22,6 +22,7 @@ #include <tools/degree.hxx> #include <vcl/dllapi.h> #include <vcl/bitmap.hxx> +#include <basegfx/bitmap/BitmapAttributes.hxx> enum class GraphicDrawMode { @@ -35,7 +36,7 @@ class VCL_DLLPUBLIC GraphicAttr { private: double mfGamma; - BmpMirrorFlags mnMirrFlags; + basegfx::MirrorDirectionFlags mnMirrFlags; tools::Long mnLeftCrop; tools::Long mnTopCrop; tools::Long mnRightCrop; @@ -59,8 +60,8 @@ public: void SetDrawMode(GraphicDrawMode eDrawMode) { meDrawMode = eDrawMode; } GraphicDrawMode GetDrawMode() const { return meDrawMode; } - void SetMirrorFlags(BmpMirrorFlags nMirrFlags) { mnMirrFlags = nMirrFlags; } - BmpMirrorFlags GetMirrorFlags() const { return mnMirrFlags; } + void SetMirrorFlags(basegfx::MirrorDirectionFlags nMirrFlags) { mnMirrFlags = nMirrFlags; } + basegfx::MirrorDirectionFlags GetMirrorFlags() const { return mnMirrFlags; } void SetCrop(tools::Long nLeft_100TH_MM, tools::Long nTop_100TH_MM, tools::Long nRight_100TH_MM, tools::Long nBottom_100TH_MM) @@ -103,7 +104,7 @@ public: sal_uInt8 GetTransparency() const { return mcTransparency; } bool IsSpecialDrawMode() const { return (meDrawMode != GraphicDrawMode::Standard); } - bool IsMirrored() const { return mnMirrFlags != BmpMirrorFlags::NONE; } + bool IsMirrored() const { return mnMirrFlags != basegfx::MirrorDirectionFlags::NONE; } bool IsCropped() const { return (mnLeftCrop != 0 || mnTopCrop != 0 || mnRightCrop != 0 || mnBottomCrop != 0); diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx index 8fceef864ae2..db24da9a5552 100644 --- a/svx/source/sdr/contact/viewcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx @@ -336,7 +336,9 @@ namespace sdr::contact if(bHMirr || bVMirr) { - aLocalGrafInfo.SetMirrorFlags((bHMirr ? BmpMirrorFlags::Horizontal : BmpMirrorFlags::NONE)|(bVMirr ? BmpMirrorFlags::Vertical : BmpMirrorFlags::NONE)); + basegfx::MirrorDirectionFlags eVertical = bVMirr ? basegfx::MirrorDirectionFlags::Vertical : basegfx::MirrorDirectionFlags::NONE; + basegfx::MirrorDirectionFlags eHorizontal = bHMirr ? basegfx::MirrorDirectionFlags::Horizontal : basegfx::MirrorDirectionFlags::NONE; + aLocalGrafInfo.SetMirrorFlags(eVertical | eHorizontal); } // fill object matrix diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index f175f9c33181..090682c936c8 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -377,7 +377,10 @@ GraphicAttr SdrGrafObj::GetGraphicAttr( SdrGrafObjTransformsAttrs nTransformFlag bool bHMirr = nMirrorCase == 2 || nMirrorCase == 4; bool bVMirr = nMirrorCase == 3 || nMirrorCase == 4; - aActAttr.SetMirrorFlags( ( bHMirr ? BmpMirrorFlags::Horizontal : BmpMirrorFlags::NONE ) | ( bVMirr ? BmpMirrorFlags::Vertical : BmpMirrorFlags::NONE ) ); + basegfx::MirrorDirectionFlags eVertical = bVMirr ? basegfx::MirrorDirectionFlags::Vertical : basegfx::MirrorDirectionFlags::NONE; + basegfx::MirrorDirectionFlags eHorizontal = bHMirr ? basegfx::MirrorDirectionFlags::Horizontal : basegfx::MirrorDirectionFlags::NONE; + + aActAttr.SetMirrorFlags(eVertical | eHorizontal); } if( bRotate ) diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index df244ccf1865..ea32213abaa4 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -734,22 +734,22 @@ GraphicAttr& SwGrfNode::GetGraphicAttr( GraphicAttr& rGA, rGA.SetDrawMode( rSet.GetDrawModeGrf().GetValue() ); const SwMirrorGrf & rMirror = rSet.GetMirrorGrf(); - BmpMirrorFlags nMirror = BmpMirrorFlags::NONE; + basegfx::MirrorDirectionFlags nMirror = basegfx::MirrorDirectionFlags::NONE; if( rMirror.IsGrfToggle() && pFrame && !pFrame->FindPageFrame()->OnRightPage() ) { switch( rMirror.GetValue() ) { case MirrorGraph::Dont: - nMirror = BmpMirrorFlags::Horizontal; + nMirror = basegfx::MirrorDirectionFlags::Horizontal; break; case MirrorGraph::Vertical: - nMirror = BmpMirrorFlags::NONE; + nMirror = basegfx::MirrorDirectionFlags::NONE; break; case MirrorGraph::Horizontal: - nMirror = BmpMirrorFlags::Horizontal|BmpMirrorFlags::Vertical; + nMirror = basegfx::MirrorDirectionFlags::Horizontal | basegfx::MirrorDirectionFlags::Vertical; break; default: - nMirror = BmpMirrorFlags::Vertical; + nMirror = basegfx::MirrorDirectionFlags::Vertical; break; } } @@ -757,13 +757,13 @@ GraphicAttr& SwGrfNode::GetGraphicAttr( GraphicAttr& rGA, switch( rMirror.GetValue() ) { case MirrorGraph::Both: - nMirror = BmpMirrorFlags::Horizontal|BmpMirrorFlags::Vertical; + nMirror = basegfx::MirrorDirectionFlags::Horizontal | basegfx::MirrorDirectionFlags::Vertical; break; case MirrorGraph::Vertical: - nMirror = BmpMirrorFlags::Horizontal; + nMirror = basegfx::MirrorDirectionFlags::Horizontal; break; case MirrorGraph::Horizontal: - nMirror = BmpMirrorFlags::Vertical; + nMirror = basegfx::MirrorDirectionFlags::Vertical; break; default: break; } diff --git a/vcl/source/graphic/GraphicObject.cxx b/vcl/source/graphic/GraphicObject.cxx index aa5435d3ad50..c60d325547b1 100644 --- a/vcl/source/graphic/GraphicObject.cxx +++ b/vcl/source/graphic/GraphicObject.cxx @@ -168,7 +168,7 @@ void lclImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, GraphicAdjustmen if( ( nAdjustmentFlags & GraphicAdjustmentFlags::MIRROR ) && aAttr.IsMirrored() ) { - rBmpEx.Mirror( aAttr.GetMirrorFlags() ); + rBmpEx.Mirror(BmpMirrorFlags(aAttr.GetMirrorFlags()) ); } if( ( nAdjustmentFlags & GraphicAdjustmentFlags::ROTATE ) && aAttr.IsRotated() ) @@ -219,7 +219,7 @@ void lclImplAdjust( GDIMetaFile& rMtf, const GraphicAttr& rAttr, GraphicAdjustme if( ( nAdjustmentFlags & GraphicAdjustmentFlags::MIRROR ) && aAttr.IsMirrored() ) { - rMtf.Mirror( aAttr.GetMirrorFlags() ); + rMtf.Mirror(BmpMirrorFlags(aAttr.GetMirrorFlags())); } if( ( nAdjustmentFlags & GraphicAdjustmentFlags::ROTATE ) && aAttr.IsRotated() ) @@ -270,7 +270,7 @@ void lclImplAdjust( Animation& rAnimation, const GraphicAttr& rAttr, GraphicAdju if( ( nAdjustmentFlags & GraphicAdjustmentFlags::MIRROR ) && aAttr.IsMirrored() ) { - rAnimation.Mirror( aAttr.GetMirrorFlags() ); + rAnimation.Mirror(BmpMirrorFlags(aAttr.GetMirrorFlags())); } if( ( nAdjustmentFlags & GraphicAdjustmentFlags::ROTATE ) && aAttr.IsRotated() ) @@ -383,7 +383,7 @@ bool GraphicObject::ImplGetCropParams( OutputDevice const * pOut, Point& rPt, Si if( !aSize100.IsEmpty() && nTotalWidth > 0 && nTotalHeight > 0 ) { double fScale = static_cast<double>(aSize100.Width()) / nTotalWidth; - const tools::Long nNewLeft = -FRound( ( ( pAttr->GetMirrorFlags() & BmpMirrorFlags::Horizontal ) ? pAttr->GetRightCrop() : pAttr->GetLeftCrop() ) * fScale ); + const tools::Long nNewLeft = -FRound( ( ( BmpMirrorFlags(pAttr->GetMirrorFlags()) & BmpMirrorFlags::Horizontal ) ? pAttr->GetRightCrop() : pAttr->GetLeftCrop() ) * fScale ); const tools::Long nNewRight = nNewLeft + FRound( aSize100.Width() * fScale ) - 1; fScale = static_cast<double>(rSz.Width()) / aSize100.Width(); @@ -391,7 +391,7 @@ bool GraphicObject::ImplGetCropParams( OutputDevice const * pOut, Point& rPt, Si rSz.setWidth( FRound( ( nNewRight - nNewLeft + 1 ) * fScale ) ); fScale = static_cast<double>(aSize100.Height()) / nTotalHeight; - const tools::Long nNewTop = -FRound( ( ( pAttr->GetMirrorFlags() & BmpMirrorFlags::Vertical ) ? pAttr->GetBottomCrop() : pAttr->GetTopCrop() ) * fScale ); + const tools::Long nNewTop = -FRound( ( ( BmpMirrorFlags(pAttr->GetMirrorFlags()) & BmpMirrorFlags::Vertical ) ? pAttr->GetBottomCrop() : pAttr->GetTopCrop() ) * fScale ); const tools::Long nNewBottom = nNewTop + FRound( aSize100.Height() * fScale ) - 1; fScale = static_cast<double>(rSz.Height()) / aSize100.Height(); @@ -473,7 +473,8 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, { aPt.AdjustX(aSz.Width() + 1 ); aSz.setWidth( -aSz.Width() ); - aAttr.SetMirrorFlags( aAttr.GetMirrorFlags() ^ BmpMirrorFlags::Horizontal ); + BmpMirrorFlags eFlags = BmpMirrorFlags(aAttr.GetMirrorFlags()) ^ BmpMirrorFlags::Horizontal; + aAttr.SetMirrorFlags(basegfx::MirrorDirectionFlags(eFlags)); } // mirrored vertically @@ -481,7 +482,8 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, { aPt.AdjustY(aSz.Height() + 1 ); aSz.setHeight( -aSz.Height() ); - aAttr.SetMirrorFlags( aAttr.GetMirrorFlags() ^ BmpMirrorFlags::Vertical ); + BmpMirrorFlags eFlags = BmpMirrorFlags(aAttr.GetMirrorFlags()) ^ BmpMirrorFlags::Vertical; + aAttr.SetMirrorFlags(basegfx::MirrorDirectionFlags(eFlags)); } if( bCropped ) diff --git a/vcl/source/graphic/grfattr.cxx b/vcl/source/graphic/grfattr.cxx index 35acaf50b841..36e8605b77de 100644 --- a/vcl/source/graphic/grfattr.cxx +++ b/vcl/source/graphic/grfattr.cxx @@ -21,7 +21,7 @@ GraphicAttr::GraphicAttr() : mfGamma ( 1.0 ), - mnMirrFlags ( BmpMirrorFlags::NONE ), + mnMirrFlags ( basegfx::MirrorDirectionFlags::NONE ), mnLeftCrop ( 0 ), mnTopCrop ( 0 ), mnRightCrop ( 0 ), commit 3b4ae6d1914fa3c8da0a737d78c1e542bf82342d Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Fri May 8 22:28:35 2020 +0200 Commit: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> CommitDate: Tue Nov 24 15:00:16 2020 +0900 Move some basic primitives to drawinglayer CORE Mostly which are easy to move and used in VclProcessor2D Change-Id: Ie1559e13a2a7cdb5225421def2f9145026ff9121 diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk index 4896c0ad0759..451a9b1e55d3 100644 --- a/drawinglayer/Library_drawinglayer.mk +++ b/drawinglayer/Library_drawinglayer.mk @@ -50,11 +50,6 @@ $(eval $(call gb_Library_use_libraries,drawinglayer,\ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\ drawinglayer/source/animation/animationtiming \ drawinglayer/source/attribute/fillgraphicattribute \ - drawinglayer/source/attribute/fillgradientattribute \ - drawinglayer/source/attribute/fillhatchattribute \ - drawinglayer/source/attribute/fontattribute \ - drawinglayer/source/attribute/lineattribute \ - drawinglayer/source/attribute/linestartendattribute \ drawinglayer/source/attribute/materialattribute3d \ drawinglayer/source/attribute/sdrallattribute3d \ drawinglayer/source/attribute/sdrfillattribute \ @@ -67,11 +62,9 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\ drawinglayer/source/attribute/sdrobjectattribute3d \ drawinglayer/source/attribute/sdrsceneattribute3d \ drawinglayer/source/attribute/sdrshadowattribute \ - drawinglayer/source/attribute/strokeattribute \ drawinglayer/source/geometry/viewinformation3d \ drawinglayer/source/primitive2d/animatedprimitive2d \ drawinglayer/source/primitive2d/backgroundcolorprimitive2d \ - drawinglayer/source/primitive2d/bitmapprimitive2d \ drawinglayer/source/primitive2d/borderlineprimitive2d \ drawinglayer/source/primitive2d/controlprimitive2d \ drawinglayer/source/primitive2d/cropprimitive2d \ @@ -80,54 +73,32 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\ drawinglayer/source/primitive2d/embedded3dprimitive2d \ drawinglayer/source/primitive2d/epsprimitive2d \ drawinglayer/source/primitive2d/fillgraphicprimitive2d \ - drawinglayer/source/primitive2d/fillgradientprimitive2d \ - drawinglayer/source/primitive2d/fillhatchprimitive2d \ drawinglayer/source/primitive2d/glowprimitive2d \ drawinglayer/source/primitive2d/graphicprimitivehelper2d \ drawinglayer/source/primitive2d/graphicprimitive2d \ drawinglayer/source/primitive2d/gridprimitive2d \ - drawinglayer/source/primitive2d/groupprimitive2d \ drawinglayer/source/primitive2d/helplineprimitive2d \ drawinglayer/source/primitive2d/hiddengeometryprimitive2d \ drawinglayer/source/primitive2d/invertprimitive2d \ drawinglayer/source/primitive2d/markerarrayprimitive2d \ - drawinglayer/source/primitive2d/maskprimitive2d \ drawinglayer/source/primitive2d/mediaprimitive2d \ drawinglayer/source/primitive2d/metafileprimitive2d \ - drawinglayer/source/primitive2d/modifiedcolorprimitive2d \ - drawinglayer/source/primitive2d/objectinfoprimitive2d \ drawinglayer/source/primitive2d/pagehierarchyprimitive2d \ - drawinglayer/source/primitive2d/pagepreviewprimitive2d \ drawinglayer/source/primitive2d/patternfillprimitive2d \ - drawinglayer/source/primitive2d/pointarrayprimitive2d \ - drawinglayer/source/primitive2d/polygonprimitive2d \ - drawinglayer/source/primitive2d/PolyPolygonHairlinePrimitive2D \ - drawinglayer/source/primitive2d/PolyPolygonMarkerPrimitive2D \ - drawinglayer/source/primitive2d/PolyPolygonStrokePrimitive2D \ - drawinglayer/source/primitive2d/PolyPolygonColorPrimitive2D \ - drawinglayer/source/primitive2d/PolyPolygonGradientPrimitive2D \ - drawinglayer/source/primitive2d/PolyPolygonHatchPrimitive2D \ drawinglayer/source/primitive2d/PolyPolygonGraphicPrimitive2D \ - drawinglayer/source/primitive2d/PolyPolygonSelectionPrimitive2D \ - drawinglayer/source/primitive2d/primitivetools2d \ drawinglayer/source/primitive2d/sceneprimitive2d \ drawinglayer/source/primitive2d/sdrdecompositiontools2d \ drawinglayer/source/primitive2d/shadowprimitive2d \ drawinglayer/source/primitive2d/softedgeprimitive2d \ drawinglayer/source/primitive2d/structuretagprimitive2d \ - drawinglayer/source/primitive2d/svggradientprimitive2d \ drawinglayer/source/primitive2d/textbreakuphelper \ drawinglayer/source/primitive2d/textdecoratedprimitive2d \ drawinglayer/source/primitive2d/texteffectprimitive2d \ - drawinglayer/source/primitive2d/textenumsprimitive2d \ drawinglayer/source/primitive2d/texthierarchyprimitive2d \ drawinglayer/source/primitive2d/textlayoutdevice \ drawinglayer/source/primitive2d/textlineprimitive2d \ drawinglayer/source/primitive2d/textprimitive2d \ drawinglayer/source/primitive2d/textstrikeoutprimitive2d \ - drawinglayer/source/primitive2d/transformprimitive2d \ - drawinglayer/source/primitive2d/transparenceprimitive2d \ - drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d \ drawinglayer/source/primitive2d/wallpaperprimitive2d \ drawinglayer/source/primitive2d/wrongspellprimitive2d \ drawinglayer/source/primitive3d/baseprimitive3d \ @@ -185,7 +156,6 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\ drawinglayer/source/tools/wmfemfhelper \ drawinglayer/source/tools/primitive2dxmldump \ drawinglayer/source/drawinglayeruno/xprimitive2drenderer \ - drawinglayer/source/texture/texture \ drawinglayer/source/dumper/XShapeDumper \ drawinglayer/source/dumper/EnhancedShapeDumper \ )) diff --git a/drawinglayer/Library_drawinglayercore.mk b/drawinglayer/Library_drawinglayercore.mk index f1643d27014d..972ac32f5388 100644 --- a/drawinglayer/Library_drawinglayercore.mk +++ b/drawinglayer/Library_drawinglayercore.mk @@ -40,10 +40,47 @@ $(eval $(call gb_Library_use_libraries,drawinglayercore,\ )) $(eval $(call gb_Library_add_exception_objects,drawinglayercore,\ + drawinglayer/source/attribute/lineattribute \ + drawinglayer/source/attribute/strokeattribute \ + drawinglayer/source/attribute/linestartendattribute \ + drawinglayer/source/attribute/fillgradientattribute \ + drawinglayer/source/attribute/fillhatchattribute \ + drawinglayer/source/attribute/fontattribute \ + drawinglayer/source/geometry/viewinformation2d \ + drawinglayer/source/texture/texture \ drawinglayer/source/primitive2d/baseprimitive2d \ drawinglayer/source/primitive2d/Primitive2DContainer \ drawinglayer/source/primitive2d/Tools \ - drawinglayer/source/geometry/viewinformation2d \ + drawinglayer/source/primitive2d/polygonprimitive2d \ + drawinglayer/source/primitive2d/PolyPolygonColorPrimitive2D \ + drawinglayer/source/primitive2d/PolyPolygonHairlinePrimitive2D \ + drawinglayer/source/primitive2d/PolyPolygonMarkerPrimitive2D \ + drawinglayer/source/primitive2d/PolyPolygonStrokePrimitive2D \ + drawinglayer/source/primitive2d/PolyPolygonGradientPrimitive2D \ + drawinglayer/source/primitive2d/PolyPolygonHatchPrimitive2D \ + drawinglayer/source/primitive2d/PolyPolygonSelectionPrimitive2D \ + drawinglayer/source/primitive2d/fillgradientprimitive2d \ + drawinglayer/source/primitive2d/maskprimitive2d \ + drawinglayer/source/primitive2d/groupprimitive2d \ + drawinglayer/source/primitive2d/fillhatchprimitive2d \ + drawinglayer/source/primitive2d/primitivetools2d \ + drawinglayer/source/primitive2d/pointarrayprimitive2d \ + drawinglayer/source/primitive2d/modifiedcolorprimitive2d \ + drawinglayer/source/primitive2d/bitmapprimitive2d \ + drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d \ + drawinglayer/source/primitive2d/transparenceprimitive2d \ + drawinglayer/source/primitive2d/pagepreviewprimitive2d \ + drawinglayer/source/primitive2d/transformprimitive2d \ + drawinglayer/source/primitive2d/svggradientprimitive2d \ + drawinglayer/source/primitive2d/objectinfoprimitive2d \ + drawinglayer/source/primitive2d/textenumsprimitive2d \ )) +# drawinglayer/source/primitive2d/epsprimitive2d \ +# drawinglayer/source/primitive2d/markerarrayprimitive2d \ +# drawinglayer/source/primitive2d/fillgraphicprimitive2d \ +# drawinglayer/source/primitive2d/textdecoratedprimitive2d \ +# drawinglayer/source/primitive2d/textprimitive2d \ + + # vim: set noet sw=4 ts=4: diff --git a/filter/Library_pdffilter.mk b/filter/Library_pdffilter.mk index a7cb47a65231..349883578482 100644 --- a/filter/Library_pdffilter.mk +++ b/filter/Library_pdffilter.mk @@ -49,6 +49,7 @@ $(eval $(call gb_Library_use_libraries,pdffilter,\ cppuhelper \ cppu \ sal \ + drawinglayercore \ drawinglayer \ )) commit e3a877962bd64914ea18abf139789d8adfbbe329 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Thu Aug 13 10:16:35 2020 +0200 Commit: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> CommitDate: Tue Nov 24 15:00:16 2020 +0900 drawinglayer: externalize PolygonWavePrimitive2D class Change-Id: I20a702c838ec68686b9c7e407be31ae9158cbef6 diff --git a/include/drawinglayer/primitive2d/polygonprimitive2d.hxx b/include/drawinglayer/primitive2d/polygonprimitive2d.hxx index ac56461e35b0..57a37b60814f 100644 --- a/include/drawinglayer/primitive2d/polygonprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/polygonprimitive2d.hxx @@ -39,7 +39,7 @@ namespace drawinglayer::primitive2d This is one of the non-decomposable primitives, so a renderer should process it. */ -class DRAWINGLAYER_DLLPUBLIC PolygonHairlinePrimitive2D final : public BasePrimitive2D +class DRAWINGLAYERCORE_DLLPUBLIC PolygonHairlinePrimitive2D final : public BasePrimitive2D { private: /// the hairline geometry @@ -76,7 +76,7 @@ public: It will be decomposed to the needed PolygonHairlinePrimitive2D if not handled directly by a renderer. */ -class DRAWINGLAYER_DLLPUBLIC PolygonMarkerPrimitive2D final +class DRAWINGLAYERCORE_DLLPUBLIC PolygonMarkerPrimitive2D final : public BufferedDecompositionPrimitive2D { private: @@ -131,7 +131,7 @@ public: and stroke attributes. It will be decomposed dependent on the definition to the needed primitives, e.g. filled PolyPolygons for fat lines. */ -class DRAWINGLAYER_DLLPUBLIC PolygonStrokePrimitive2D : public BufferedDecompositionPrimitive2D +class DRAWINGLAYERCORE_DLLPUBLIC PolygonStrokePrimitive2D : public BufferedDecompositionPrimitive2D { private: /// the line geometry @@ -180,7 +180,7 @@ public: This primitive defines a waveline based on a PolygonStrokePrimitive2D where the wave is defined by wave width and wave length. */ -class PolygonWavePrimitive2D final : public PolygonStrokePrimitive2D +class DRAWINGLAYERCORE_DLLPUBLIC PolygonWavePrimitive2D final : public PolygonStrokePrimitive2D { private: /// wave definition @@ -225,7 +225,8 @@ public: possibly extended by start and end definitions, which are normally used for arrows. */ -class DRAWINGLAYER_DLLPUBLIC PolygonStrokeArrowPrimitive2D final : public PolygonStrokePrimitive2D +class DRAWINGLAYERCORE_DLLPUBLIC PolygonStrokeArrowPrimitive2D final + : public PolygonStrokePrimitive2D { private: /// geometric definitions for line start and end commit 060f91b510ad45e75b8cd61f4a76cb1c0145a53e Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Fri May 8 20:50:29 2020 +0200 Commit: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> CommitDate: Tue Nov 24 15:00:15 2020 +0900 drawinglayer: externalize PointArrayPrimitive2D class Change-Id: I8ee993947bf2f4437cf3a429c43a81132fac0947 diff --git a/include/drawinglayer/primitive2d/pointarrayprimitive2d.hxx b/include/drawinglayer/primitive2d/pointarrayprimitive2d.hxx index 7e516555162a..ba4be8c5dcc4 100644 --- a/include/drawinglayer/primitive2d/pointarrayprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/pointarrayprimitive2d.hxx @@ -37,7 +37,7 @@ namespace drawinglayer::primitive2d should process it (Currently it is only used for grid visualisation, but this may change). */ - class PointArrayPrimitive2D final : public BasePrimitive2D + class DRAWINGLAYER_DLLPUBLIC PointArrayPrimitive2D final : public BasePrimitive2D { private: /// the array of positions commit 8952694f8d57733c2865f20d17c239f107dae10c Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Fri May 8 20:43:38 2020 +0200 Commit: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> CommitDate: Tue Nov 24 15:00:15 2020 +0900 drawinglayer: externalize classes in texture.hxx Change-Id: I1e49a6c896733ebebf16db23f3c2f8b06161d659 diff --git a/drawinglayer/inc/texture/texture.hxx b/drawinglayer/inc/texture/texture.hxx index 9cfb2d6d56f7..939323684f2b 100644 --- a/drawinglayer/inc/texture/texture.hxx +++ b/drawinglayer/inc/texture/texture.hxx @@ -28,7 +28,7 @@ namespace drawinglayer::texture { - class GeoTexSvx + class DRAWINGLAYER_DLLPUBLIC GeoTexSvx { public: GeoTexSvx(); @@ -51,7 +51,7 @@ namespace drawinglayer::texture basegfx::BColor maBColor; }; - class GeoTexSvxGradient : public GeoTexSvx + class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradient : public GeoTexSvx { protected: basegfx::ODFGradientInfo maGradientInfo; @@ -77,7 +77,7 @@ namespace drawinglayer::texture basegfx::BColor& rOuterColor) = 0; }; - class GeoTexSvxGradientLinear final : public GeoTexSvxGradient + class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientLinear final : public GeoTexSvxGradient { double mfUnitMinX; double mfUnitWidth; @@ -100,7 +100,7 @@ namespace drawinglayer::texture virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override; }; - class GeoTexSvxGradientAxial final : public GeoTexSvxGradient + class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientAxial final : public GeoTexSvxGradient { double mfUnitMinX; double mfUnitWidth; @@ -122,7 +122,7 @@ namespace drawinglayer::texture virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override; }; - class GeoTexSvxGradientRadial final : public GeoTexSvxGradient + class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientRadial final : public GeoTexSvxGradient { public: GeoTexSvxGradientRadial( @@ -141,7 +141,7 @@ namespace drawinglayer::texture virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override; }; - class GeoTexSvxGradientElliptical final : public GeoTexSvxGradient + class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientElliptical final : public GeoTexSvxGradient { public: GeoTexSvxGradientElliptical( @@ -161,7 +161,7 @@ namespace drawinglayer::texture virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override; }; - class GeoTexSvxGradientSquare final : public GeoTexSvxGradient + class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientSquare final : public GeoTexSvxGradient { public: GeoTexSvxGradientSquare( @@ -181,7 +181,7 @@ namespace drawinglayer::texture virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override; }; - class GeoTexSvxGradientRect final : public GeoTexSvxGradient + class DRAWINGLAYER_DLLPUBLIC GeoTexSvxGradientRect final : public GeoTexSvxGradient { public: GeoTexSvxGradientRect( @@ -201,7 +201,7 @@ namespace drawinglayer::texture virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const override; }; - class GeoTexSvxHatch final : public GeoTexSvx + class DRAWINGLAYER_DLLPUBLIC GeoTexSvxHatch final : public GeoTexSvx { basegfx::B2DRange maOutputRange; basegfx::B2DHomMatrix maTextureTransform; @@ -237,7 +237,7 @@ namespace drawinglayer::texture // given percentage value (offsetX has to be 0.0 <= offsetX <= 1.0). // Accordingly to offsetY. If both are given, offsetX is preferred // and offsetY is ignored. - class GeoTexSvxTiled final : public GeoTexSvx + class DRAWINGLAYER_DLLPUBLIC GeoTexSvxTiled final : public GeoTexSvx { basegfx::B2DRange maRange; double mfOffsetX; commit f7b0f2d835fd8afdab5f89b9c462ee90f75e3771 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Fri May 8 20:40:59 2020 +0200 Commit: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> CommitDate: Tue Nov 24 15:00:15 2020 +0900 drawinglayer: externalize FillHatchPrimitive2D class Change-Id: I9ad1f179a43bb6c501cb699c0f26523f47307829 diff --git a/include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx b/include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx index 03bc12139fcb..07399ce0e759 100644 --- a/include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/fillhatchprimitive2d.hxx @@ -24,9 +24,6 @@ #include <drawinglayer/attribute/fillhatchattribute.hxx> #include <basegfx/color/bcolor.hxx> - -// FillHatchPrimitive2D class - namespace drawinglayer::primitive2d { /** FillHatchPrimitive2D class @@ -43,7 +40,7 @@ namespace drawinglayer::primitive2d The decomposition will deliver the hatch lines. */ - class FillHatchPrimitive2D final : public DiscreteMetricDependentPrimitive2D + class DRAWINGLAYER_DLLPUBLIC FillHatchPrimitive2D final : public DiscreteMetricDependentPrimitive2D { private: /// the geometrically visible area commit 36ea6d4f9ed8a5829b68a61ceb567e07d66c5d07 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Wed Apr 1 13:00:25 2020 +0200 Commit: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> CommitDate: Tue Nov 24 15:00:15 2020 +0900 Add OutputDevice::drawPrimitive2D to OutputDevice Change-Id: Ifc22eca62df72bddd247ba097054f34756520614 diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 1b29dddf532b..599c3f7d6bf4 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -49,6 +49,8 @@ #include <com/sun/star/drawing/LineCap.hpp> #include <com/sun/star/uno/Reference.h> +#include <drawinglayer/primitive2d/Primitive2DContainer.hxx> + #include <memory> #include <vector> @@ -1955,6 +1957,9 @@ public: ///@} + bool drawPrimitive2D(drawinglayer::primitive2d::Primitive2DContainer & rPrimitive2D); + + /** @name Native Widget Rendering functions These all just call through to the private mpGraphics functions of the same name. diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index bc6b8f8f9af7..6b7ef7cd9a2f 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -80,6 +80,7 @@ $(eval $(call gb_Library_use_libraries,vcl,\ basegfx \ comphelper \ cppuhelper \ + drawinglayercore \ i18nlangtag \ i18nutil \ $(if $(filter OPENCL,$(BUILD_TYPE)),opencl) \ diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index e5bf4c4d21c6..510eff339d8e 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -699,4 +699,9 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize, return bDrawn; } +bool OutputDevice::drawPrimitive2D(drawinglayer::primitive2d::Primitive2DContainer & rPrimitive2D) +{ + return false; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 7d699002da118bcf7efd03b62cb89f3adfab0580 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Sat Mar 7 14:33:43 2020 +0100 Commit: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> CommitDate: Tue Nov 24 15:00:15 2020 +0900 Separate core drawinglayer func. into drawinglayercore library This separates the drawinglayer core functionallity into a separate library, to keep a strict separation what is backend dependent and what is not. More strict separation can be done at a later date. This will make it possible to push part of drawinglayer (part of processor2d) directly into VCL. Change-Id: Ibc26580067e50bf20d7cdd37fa0e44eb10200878 diff --git a/Repository.mk b/Repository.mk index c887d9b4297d..7bb1f03b09ae 100644 --- a/Repository.mk +++ b/Repository.mk @@ -350,6 +350,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ $(call gb_Helper_optional,SCRIPTING,dlgprov) \ $(if $(filter WNT,$(OS)),directx9canvas) \ $(if $(ENABLE_OPENGL_CANVAS),oglcanvas) \ + drawinglayercore \ drawinglayer \ editeng \ $(if $(filter WNT,$(OS)),emser) \ diff --git a/drawinglayer/CppunitTest_drawinglayer_border.mk b/drawinglayer/CppunitTest_drawinglayer_border.mk index fa2f715590cd..e00006c18dba 100644 --- a/drawinglayer/CppunitTest_drawinglayer_border.mk +++ b/drawinglayer/CppunitTest_drawinglayer_border.mk @@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,drawinglayer_border, \ sal \ salhelper \ drawinglayer \ + drawinglayercore \ vcl \ test \ tl \ diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk index 43a42b83b42c..4896c0ad0759 100644 --- a/drawinglayer/Library_drawinglayer.mk +++ b/drawinglayer/Library_drawinglayer.mk @@ -30,6 +30,7 @@ $(eval $(call gb_Library_use_externals,drawinglayer,\ )) $(eval $(call gb_Library_use_libraries,drawinglayer,\ + drawinglayercore \ basegfx \ canvastools \ comphelper \ @@ -67,11 +68,9 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\ drawinglayer/source/attribute/sdrsceneattribute3d \ drawinglayer/source/attribute/sdrshadowattribute \ drawinglayer/source/attribute/strokeattribute \ - drawinglayer/source/geometry/viewinformation2d \ drawinglayer/source/geometry/viewinformation3d \ drawinglayer/source/primitive2d/animatedprimitive2d \ drawinglayer/source/primitive2d/backgroundcolorprimitive2d \ - drawinglayer/source/primitive2d/baseprimitive2d \ drawinglayer/source/primitive2d/bitmapprimitive2d \ drawinglayer/source/primitive2d/borderlineprimitive2d \ drawinglayer/source/primitive2d/controlprimitive2d \ @@ -111,7 +110,6 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\ drawinglayer/source/primitive2d/PolyPolygonGraphicPrimitive2D \ drawinglayer/source/primitive2d/PolyPolygonSelectionPrimitive2D \ drawinglayer/source/primitive2d/primitivetools2d \ - drawinglayer/source/primitive2d/Primitive2DContainer \ drawinglayer/source/primitive2d/sceneprimitive2d \ drawinglayer/source/primitive2d/sdrdecompositiontools2d \ drawinglayer/source/primitive2d/shadowprimitive2d \ @@ -127,7 +125,6 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\ drawinglayer/source/primitive2d/textlineprimitive2d \ drawinglayer/source/primitive2d/textprimitive2d \ drawinglayer/source/primitive2d/textstrikeoutprimitive2d \ - drawinglayer/source/primitive2d/Tools \ drawinglayer/source/primitive2d/transformprimitive2d \ drawinglayer/source/primitive2d/transparenceprimitive2d \ drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d \ diff --git a/drawinglayer/Library_drawinglayercore.mk b/drawinglayer/Library_drawinglayercore.mk new file mode 100644 index 000000000000..f1643d27014d --- /dev/null +++ b/drawinglayer/Library_drawinglayercore.mk @@ -0,0 +1,49 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Library_Library,drawinglayercore)) + +$(eval $(call gb_Library_set_include,drawinglayercore,\ + $$(INCLUDE) \ + -I$(SRCDIR)/drawinglayer/inc \ +)) + +$(eval $(call gb_Library_add_defs,drawinglayercore,\ + -DDRAWINGLAYERCORE_DLLIMPLEMENTATION \ +)) + +$(eval $(call gb_Library_set_precompiled_header,drawinglayercore,drawinglayer/inc/pch/precompiled_drawinglayercore)) + +$(eval $(call gb_Library_use_sdk_api,drawinglayercore)) + +$(eval $(call gb_Library_use_externals,drawinglayercore,\ + boost_headers \ + libxml2 \ +)) + +$(eval $(call gb_Library_use_libraries,drawinglayercore,\ + basegfx \ + comphelper \ + cppu \ + cppuhelper \ + i18nlangtag \ + sal \ + salhelper \ + svl \ + tl \ +)) + +$(eval $(call gb_Library_add_exception_objects,drawinglayercore,\ + drawinglayer/source/primitive2d/baseprimitive2d \ + drawinglayer/source/primitive2d/Primitive2DContainer \ + drawinglayer/source/primitive2d/Tools \ + drawinglayer/source/geometry/viewinformation2d \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/drawinglayer/Module_drawinglayer.mk b/drawinglayer/Module_drawinglayer.mk index 6d329e95c60a..687cd9c2671f 100644 --- a/drawinglayer/Module_drawinglayer.mk +++ b/drawinglayer/Module_drawinglayer.mk @@ -10,6 +10,7 @@ $(eval $(call gb_Module_Module,drawinglayer)) $(eval $(call gb_Module_add_targets,drawinglayer,\ + Library_drawinglayercore \ Library_drawinglayer \ )) diff --git a/drawinglayer/inc/pch/precompiled_drawinglayer.hxx b/drawinglayer/inc/pch/precompiled_drawinglayer.hxx index f4a45f1757f2..47fb368aa3d8 100644 --- a/drawinglayer/inc/pch/precompiled_drawinglayer.hxx +++ b/drawinglayer/inc/pch/precompiled_drawinglayer.hxx @@ -91,7 +91,6 @@ #include <basegfx/range/basicrange.hxx> #include <basegfx/tuple/b2dtuple.hxx> #include <basegfx/tuple/b3dtuple.hxx> -#include <basegfx/utils/canvastools.hxx> #include <basegfx/vector/b2dvector.hxx> #include <basegfx/vector/b2enums.hxx> #include <basegfx/vector/b2ivector.hxx> @@ -103,7 +102,7 @@ #include <com/sun/star/drawing/TextureMode.hpp> #include <com/sun/star/drawing/TextureProjectionMode.hpp> #include <com/sun/star/graphic/XPrimitive3D.hpp> -#include <com/sun/star/util/XAccounting.hpp> +#include <com/sun/star/uno/Reference.hxx> #include <comphelper/comphelperdllapi.h> #include <comphelper/processfactory.hxx> #include <comphelper/sequence.hxx> @@ -137,7 +136,6 @@ #include <drawinglayer/drawinglayerdllapi.h> #include <drawinglayer/geometry/viewinformation2d.hxx> #include <drawinglayer/geometry/viewinformation3d.hxx> -#include <drawinglayer/primitive2d/CommonTypes.hxx> #include <drawinglayer/primitive2d/PolyPolygonColorPrimitive2D.hxx> #include <drawinglayer/primitive2d/PolyPolygonGradientPrimitive2D.hxx> #include <drawinglayer/primitive2d/PolyPolygonGraphicPrimitive2D.hxx> @@ -145,9 +143,6 @@ #include <drawinglayer/primitive2d/PolyPolygonHatchPrimitive2D.hxx> #include <drawinglayer/primitive2d/PolyPolygonMarkerPrimitive2D.hxx> #include <drawinglayer/primitive2d/PolyPolygonStrokePrimitive2D.hxx> -#include <drawinglayer/primitive2d/Primitive2DContainer.hxx> -#include <drawinglayer/primitive2d/Primitive2DVisitor.hxx> -#include <drawinglayer/primitive2d/Tools.hxx> #include <drawinglayer/primitive2d/baseprimitive2d.hxx> #include <drawinglayer/primitive2d/bitmapprimitive2d.hxx> #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> diff --git a/drawinglayer/inc/pch/precompiled_drawinglayercore.cxx b/drawinglayer/inc/pch/precompiled_drawinglayercore.cxx new file mode 100644 index 000000000000..4a8c23ea8e65 --- /dev/null +++ b/drawinglayer/inc/pch/precompiled_drawinglayercore.cxx @@ -0,0 +1,12 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "precompiled_drawinglayercore.hxx" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/drawinglayer/inc/pch/precompiled_drawinglayercore.hxx b/drawinglayer/inc/pch/precompiled_drawinglayercore.hxx new file mode 100644 index 000000000000..4cc5ca4612c9 --- /dev/null +++ b/drawinglayer/inc/pch/precompiled_drawinglayercore.hxx @@ -0,0 +1,46 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +/* + This file has been autogenerated by update_pch.sh. It is possible to edit it + manually (such as when an include file has been moved/renamed/removed). All such + manual changes will be rewritten by the next run of update_pch.sh (which presumably + also fixes all possible problems, so it's usually better to use it). + + Generated on 2020-03-07 12:37:18 using: + ./bin/update_pch drawinglayer drawinglayercore --cutoff=4 --exclude:system --exclude:module --exclude:local + + If after updating build fails, use the following command to locate conflicting headers: + ./bin/update_pch_bisect ./drawinglayer/inc/pch/precompiled_drawinglayercore.hxx "make drawinglayer.build" --find-conflicts +*/ + +#if PCH_LEVEL >= 1 +#include <ostream> +#include <vector> +#endif // PCH_LEVEL >= 1 +#if PCH_LEVEL >= 2 +#include <osl/diagnose.h> +#include <osl/interlck.h> +#include <sal/config.h> +#include <sal/types.h> +#endif // PCH_LEVEL >= 2 +#if PCH_LEVEL >= 3 +#include <basegfx/basegfxdllapi.h> +#include <basegfx/point/b2dpoint.hxx> +#include <basegfx/range/b2drange.hxx> +#include <basegfx/range/basicrange.hxx> +#include <basegfx/tuple/b2dtuple.hxx> +#include <basegfx/utils/canvastools.hxx> +#include <basegfx/vector/b2dvector.hxx> +#endif // PCH_LEVEL >= 3 +#if PCH_LEVEL >= 4 +#include <drawinglayer/geometry/viewinformation2d.hxx> +#endif // PCH_LEVEL >= 4 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/emfio/CppunitTest_emfio_emf.mk b/emfio/CppunitTest_emfio_emf.mk index 5b32187b7ea8..e8e90d7dddd4 100644 --- a/emfio/CppunitTest_emfio_emf.mk +++ b/emfio/CppunitTest_emfio_emf.mk @@ -23,6 +23,7 @@ $(eval $(call gb_CppunitTest_use_sdk_api,emfio_emf)) $(eval $(call gb_CppunitTest_use_libraries,emfio_emf,\ basegfx \ drawinglayer \ + drawinglayercore \ cppu \ cppuhelper \ comphelper \ diff --git a/emfio/Library_emfio.mk b/emfio/Library_emfio.mk index 281f077130f1..f923f2078e35 100644 --- a/emfio/Library_emfio.mk +++ b/emfio/Library_emfio.mk @@ -41,6 +41,7 @@ $(eval $(call gb_Library_use_sdk_api,emfio)) $(eval $(call gb_Library_use_libraries,emfio,\ basegfx \ + drawinglayercore \ drawinglayer \ cppu \ cppuhelper \ diff --git a/filter/Library_svgfilter.mk b/filter/Library_svgfilter.mk index 21318aa1fd03..1f0caf11758c 100644 --- a/filter/Library_svgfilter.mk +++ b/filter/Library_svgfilter.mk @@ -56,6 +56,7 @@ $(eval $(call gb_Library_use_libraries,svgfilter,\ sax \ salhelper \ comphelper \ + drawinglayercore \ drawinglayer \ basegfx \ cppuhelper \ diff --git a/include/drawinglayer/drawinglayerdllapi.h b/include/drawinglayer/drawinglayerdllapi.h index 0b3983504919..36a0d8abfea2 100644 --- a/include/drawinglayer/drawinglayerdllapi.h +++ b/include/drawinglayer/drawinglayerdllapi.h @@ -19,6 +19,12 @@ #endif #define DRAWINGLAYER_DLLPRIVATE SAL_DLLPRIVATE +#if defined(DRAWINGLAYERCORE_DLLIMPLEMENTATION) +#define DRAWINGLAYERCORE_DLLPUBLIC SAL_DLLPUBLIC_EXPORT +#else +#define DRAWINGLAYERCORE_DLLPUBLIC SAL_DLLPUBLIC_IMPORT +#endif + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/geometry/viewinformation2d.hxx b/include/drawinglayer/geometry/viewinformation2d.hxx index 95be29a72bda..06b17248d213 100644 --- a/include/drawinglayer/geometry/viewinformation2d.hxx +++ b/include/drawinglayer/geometry/viewinformation2d.hxx @@ -63,7 +63,7 @@ namespace drawinglayer::geometry It is an implementation to support the sequence of PropertyValues used in a css::graphic::XPrimitive2D for C++ implementations working with those */ -class DRAWINGLAYER_DLLPUBLIC ViewInformation2D +class DRAWINGLAYERCORE_DLLPUBLIC ViewInformation2D { public: typedef o3tl::cow_wrapper<ImpViewInformation2D, o3tl::ThreadSafeRefCountingPolicy> ImplType; diff --git a/include/drawinglayer/primitive2d/Primitive2DContainer.hxx b/include/drawinglayer/primitive2d/Primitive2DContainer.hxx index cca3a0a91485..c096e9a8cc2f 100644 --- a/include/drawinglayer/primitive2d/Primitive2DContainer.hxx +++ b/include/drawinglayer/primitive2d/Primitive2DContainer.hxx @@ -34,7 +34,7 @@ class ViewInformation2D; namespace drawinglayer::primitive2d { -class SAL_WARN_UNUSED DRAWINGLAYER_DLLPUBLIC Primitive2DContainer +class SAL_WARN_UNUSED DRAWINGLAYERCORE_DLLPUBLIC Primitive2DContainer : public std::deque<Primitive2DReference>, public Primitive2DDecompositionVisitor { diff --git a/include/drawinglayer/primitive2d/Primitive2DVisitor.hxx b/include/drawinglayer/primitive2d/Primitive2DVisitor.hxx index dfe04b32a320..e174d1e0878d 100644 --- a/include/drawinglayer/primitive2d/Primitive2DVisitor.hxx +++ b/include/drawinglayer/primitive2d/Primitive2DVisitor.hxx @@ -27,7 +27,7 @@ namespace drawinglayer::primitive2d class Primitive2DContainer; // Visitor class for walking a tree of Primitive2DReference -class DRAWINGLAYER_DLLPUBLIC Primitive2DDecompositionVisitor +class DRAWINGLAYERCORE_DLLPUBLIC Primitive2DDecompositionVisitor { public: virtual void append(const Primitive2DReference&) = 0; diff --git a/include/drawinglayer/primitive2d/Tools.hxx b/include/drawinglayer/primitive2d/Tools.hxx index fbb6f5717c01..1c30565c8c1b 100644 --- a/include/drawinglayer/primitive2d/Tools.hxx +++ b/include/drawinglayer/primitive2d/Tools.hxx @@ -31,16 +31,16 @@ class ViewInformation2D; namespace drawinglayer::primitive2d { /// get B2DRange from a given Primitive2DReference -basegfx::B2DRange DRAWINGLAYER_DLLPUBLIC getB2DRangeFromPrimitive2DReference( +basegfx::B2DRange DRAWINGLAYERCORE_DLLPUBLIC getB2DRangeFromPrimitive2DReference( const Primitive2DReference& rCandidate, const geometry::ViewInformation2D& aViewInformation); /** compare two Primitive2DReferences for equality, including trying to get implementations (BasePrimitive2D) and using compare operator */ -bool DRAWINGLAYER_DLLPUBLIC arePrimitive2DReferencesEqual(const Primitive2DReference& rA, - const Primitive2DReference& rB); +bool DRAWINGLAYERCORE_DLLPUBLIC arePrimitive2DReferencesEqual(const Primitive2DReference& rA, + const Primitive2DReference& rB); -OUString DRAWINGLAYER_DLLPUBLIC idToString(sal_uInt32 nId); +OUString DRAWINGLAYERCORE_DLLPUBLIC idToString(sal_uInt32 nId); } // end of namespace drawinglayer::primitive2d diff --git a/include/drawinglayer/primitive2d/baseprimitive2d.hxx b/include/drawinglayer/primitive2d/baseprimitive2d.hxx index 45d0e3519c40..5478309846cd 100644 --- a/include/drawinglayer/primitive2d/baseprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/baseprimitive2d.hxx @@ -119,8 +119,8 @@ typedef cppu::WeakComponentImplHelper<css::graphic::XPrimitive2D, css::util::XAc for view-independent primitives which are defined by not using ViewInformation2D in their get2DDecomposition/getB2DRange implementations. */ -class DRAWINGLAYER_DLLPUBLIC BasePrimitive2D : protected cppu::BaseMutex, - public BasePrimitive2DImplBase +class DRAWINGLAYERCORE_DLLPUBLIC BasePrimitive2D : protected cppu::BaseMutex, + public BasePrimitive2DImplBase { BasePrimitive2D(const BasePrimitive2D&) = delete; BasePrimitive2D& operator=(const BasePrimitive2D&) = delete; @@ -198,7 +198,7 @@ public: to identify if a new decomposition is needed at the next call (f) return maBuffered2DDecomposition */ -class DRAWINGLAYER_DLLPUBLIC BufferedDecompositionPrimitive2D : public BasePrimitive2D +class DRAWINGLAYERCORE_DLLPUBLIC BufferedDecompositionPrimitive2D : public BasePrimitive2D { private: /// a sequence used for buffering the last create2DDecomposition() result diff --git a/sc/CppunitTest_sc_parallelism.mk b/sc/CppunitTest_sc_parallelism.mk index eb7aaa446954..ff2cd6e25953 100644 --- a/sc/CppunitTest_sc_parallelism.mk +++ b/sc/CppunitTest_sc_parallelism.mk @@ -40,6 +40,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sc_parallelism, \ cppuhelper \ dbtools \ drawinglayer \ + drawinglayercore \ editeng \ for \ forui \ diff --git a/sc/CppunitTest_sc_ucalc.mk b/sc/CppunitTest_sc_ucalc.mk index 8943de7ab4c3..60fb6676dab9 100644 --- a/sc/CppunitTest_sc_ucalc.mk +++ b/sc/CppunitTest_sc_ucalc.mk @@ -49,6 +49,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sc_ucalc, \ cppuhelper \ dbtools \ drawinglayer \ + drawinglayercore \ editeng \ for \ forui \ diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk index 1b3cead83beb..04589a676eaa 100644 --- a/sc/Library_sc.mk +++ b/sc/Library_sc.mk @@ -70,6 +70,7 @@ $(eval $(call gb_Library_use_libraries,sc,\ cppu \ cppuhelper \ dbtools \ + drawinglayercore \ drawinglayer \ editeng \ for \ diff --git a/sd/CppunitTest_sd_uimpress.mk b/sd/CppunitTest_sd_uimpress.mk index 93426dfc3a55..63f143978231 100644 --- a/sd/CppunitTest_sd_uimpress.mk +++ b/sd/CppunitTest_sd_uimpress.mk @@ -27,6 +27,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sd_uimpress,\ cppu \ cppuhelper \ drawinglayer \ + drawinglayercore \ editeng \ i18nlangtag \ i18nutil \ diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk index 9d399e8e3f5a..ed9decbc75cc 100644 --- a/sd/Library_sd.mk +++ b/sd/Library_sd.mk @@ -74,6 +74,7 @@ $(eval $(call gb_Library_use_libraries,sd,\ cppcanvas \ cppu \ cppuhelper \ + drawinglayercore \ drawinglayer \ editeng \ i18nlangtag \ diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk index b7f69f1d8e5b..532b9127b9f8 100644 --- a/sfx2/Library_sfx.mk +++ b/sfx2/Library_sfx.mk @@ -49,6 +49,7 @@ $(eval $(call gb_Library_use_libraries,sfx,\ comphelper \ cppu \ cppuhelper \ + drawinglayercore \ drawinglayer \ fwk \ i18nlangtag \ diff --git a/svgio/CppunitTest_svgio.mk b/svgio/CppunitTest_svgio.mk index d690f2383116..e6708c916f34 100644 --- a/svgio/CppunitTest_svgio.mk +++ b/svgio/CppunitTest_svgio.mk @@ -30,6 +30,7 @@ $(eval $(call gb_CppunitTest_use_library_objects,svgio,\ $(eval $(call gb_CppunitTest_use_libraries,svgio,\ basegfx \ drawinglayer \ + drawinglayercore \ cppu \ cppuhelper \ comphelper \ diff --git a/svgio/Library_svgio.mk b/svgio/Library_svgio.mk index 83a8546bdc1a..d75508e0537e 100644 --- a/svgio/Library_svgio.mk +++ b/svgio/Library_svgio.mk @@ -33,6 +33,7 @@ $(eval $(call gb_Library_use_sdk_api,svgio)) $(eval $(call gb_Library_use_libraries,svgio,\ basegfx \ + drawinglayercore \ drawinglayer \ comphelper \ cppu \ diff --git a/svx/CppunitTest_svx_unit.mk b/svx/CppunitTest_svx_unit.mk index ac9f3e4531ad..4a51867ec189 100644 --- a/svx/CppunitTest_svx_unit.mk +++ b/svx/CppunitTest_svx_unit.mk @@ -36,6 +36,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,svx_unit, \ $(eval $(call gb_CppunitTest_use_libraries,svx_unit, \ basegfx \ drawinglayer \ + drawinglayercore \ sal \ sfx \ svxcore \ diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index f7b947934546..26cfabfe213e 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -50,6 +50,7 @@ $(eval $(call gb_Library_use_libraries,svx,\ crashreport) \ $(call gb_Helper_optional,DBCONNECTIVITY, \ dbtools) \ + drawinglayercore \ drawinglayer \ editeng \ fwk \ diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk index 3d4590d216a1..b31ce6ff5287 100644 --- a/svx/Library_svxcore.mk +++ b/svx/Library_svxcore.mk @@ -57,6 +57,7 @@ $(eval $(call gb_Library_use_libraries,svxcore,\ cppu \ $(call gb_Helper_optional,DBCONNECTIVITY, \ dbtools) \ + drawinglayercore \ drawinglayer \ editeng \ fwk \ diff --git a/sw/CppunitTest_sw_uwriter.mk b/sw/CppunitTest_sw_uwriter.mk index e6a490c5dff1..a716e51b0d23 100644 --- a/sw/CppunitTest_sw_uwriter.mk +++ b/sw/CppunitTest_sw_uwriter.mk @@ -33,6 +33,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_uwriter, \ $(call gb_Helper_optional,DBCONNECTIVITY, \ dbtools) \ drawinglayer \ + drawinglayercore \ editeng \ i18nlangtag \ i18nutil \ diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk index 65f4154bf12e..cb87858ab8ad 100644 --- a/sw/Library_sw.mk +++ b/sw/Library_sw.mk @@ -58,6 +58,7 @@ $(eval $(call gb_Library_use_libraries,sw,\ cppuhelper \ $(call gb_Helper_optional,DBCONNECTIVITY, \ dbtools) \ + drawinglayercore \ drawinglayer \ editeng \ i18nlangtag \ diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk index 99f1dd20ae3d..4c09d1cc4bda 100644 --- a/sw/Library_swui.mk +++ b/sw/Library_swui.mk @@ -75,6 +75,7 @@ $(eval $(call gb_Library_use_libraries,swui,\ ucbhelper \ utl \ vcl \ + drawinglayercore \ drawinglayer \ )) commit 356006712320c524515a959a022a0f2b02fa63bb Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Wed Oct 21 21:07:40 2020 +0200 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Tue Nov 24 06:44:56 2020 +0100 remove linestartendattribute.hxx from clang-format excludelist Change-Id: I2d6cef1d3dff33c6cb2695c645d4f30e899c4616 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106390 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/include/drawinglayer/attribute/linestartendattribute.hxx b/include/drawinglayer/attribute/linestartendattribute.hxx index ea2bf22235fd..f894a335da4c 100644 --- a/include/drawinglayer/attribute/linestartendattribute.hxx +++ b/include/drawinglayer/attribute/linestartendattribute.hxx @@ -22,48 +22,47 @@ #include <drawinglayer/drawinglayerdllapi.h> #include <o3tl/cow_wrapper.hxx> -namespace basegfx { - class B2DPolyPolygon; +namespace basegfx +{ +class B2DPolyPolygon; } -namespace drawinglayer::attribute { - class ImpLineStartEndAttribute; +namespace drawinglayer::attribute +{ +class ImpLineStartEndAttribute; } - namespace drawinglayer::attribute - { - class DRAWINGLAYER_DLLPUBLIC LineStartEndAttribute - { - public: - typedef o3tl::cow_wrapper< ImpLineStartEndAttribute > ImplType; +{ +class DRAWINGLAYER_DLLPUBLIC LineStartEndAttribute +{ +public: + typedef o3tl::cow_wrapper<ImpLineStartEndAttribute> ImplType; - private: - ImplType mpLineStartEndAttribute; +private: + ImplType mpLineStartEndAttribute; - public: - /// constructors/assignmentoperator/destructor - LineStartEndAttribute( - double fWidth, - const basegfx::B2DPolyPolygon& rPolyPolygon, - bool bCentered); - LineStartEndAttribute(); - LineStartEndAttribute(const LineStartEndAttribute&); - LineStartEndAttribute& operator=(const LineStartEndAttribute&); - ~LineStartEndAttribute(); +public: + /// constructors/assignmentoperator/destructor + LineStartEndAttribute(double fWidth, const basegfx::B2DPolyPolygon& rPolyPolygon, + bool bCentered); + LineStartEndAttribute(); + LineStartEndAttribute(const LineStartEndAttribute&); + LineStartEndAttribute& operator=(const LineStartEndAttribute&); + ~LineStartEndAttribute(); - // checks if the incarnation is default constructed - bool isDefault() const; + // checks if the incarnation is default constructed + bool isDefault() const; - // compare operator - bool operator==(const LineStartEndAttribute& rCandidate) const; + // compare operator + bool operator==(const LineStartEndAttribute& rCandidate) const; - // data read access - double getWidth() const; - const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const; - bool isCentered() const; - bool isActive() const; - }; + // data read access + double getWidth() const; + const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const; + bool isCentered() const; + bool isActive() const; +}; } // end of namespace drawinglayer::attribute diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index bcd9ff0ccb37..c7eee25f0f8c 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -5230,7 +5230,6 @@ include/dbaccess/genericcontroller.hxx include/desktop/crashreport.hxx include/drawinglayer/XShapeDumper.hxx include/drawinglayer/animation/animationtiming.hxx -include/drawinglayer/attribute/linestartendattribute.hxx include/drawinglayer/attribute/materialattribute3d.hxx include/drawinglayer/attribute/sdrallattribute3d.hxx include/drawinglayer/attribute/sdrfillattribute.hxx commit 1795cfde106c830bff513d3a9ff27d1759f9b227 Author: shubham656 <shubham656j...@gmail.com> AuthorDate: Tue Nov 24 02:09:30 2020 +0530 Commit: Jim Raykowski <rayk...@gmail.com> CommitDate: Tue Nov 24 06:38:50 2020 +0100 tdf#132860 Assign value to set_sensitive flag in m_xName Change-Id: I9438e1a18253d90ff26e71b3aab83e96468fb9d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106461 Tested-by: Jenkins Reviewed-by: Jim Raykowski <rayk...@gmail.com> diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 46536f3f4d8c..4ab0c2d2523c 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -123,6 +123,11 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(weld::Container* pPage, weld::D { m_xName->set_can_focus(true); m_xName->set_editable(true); + m_xName->set_sensitive(true); + } + else + { + m_xName->set_sensitive(false); } if ( pStyle->HasFollowSupport() && pPool ) commit 9c355a82881d8e13d6bc732e13b28d62962bf245 Author: Seth Chaiklin <sdc.bla...@youmail.dk> AuthorDate: Tue Nov 24 00:31:19 2020 +0100 Commit: Gerrit Code Review <ger...@gerrit.libreoffice.org> CommitDate: Tue Nov 24 00:31:19 2020 +0100 Update git submodules * Update helpcontent2 from branch 'master' to 5b768d6f04f57ea77e66be18136908b44ac65cde - tdf#103463 add explanation of what strings get autocorrected to hyperlinks ( shared/guide/autocorr_url.xhp ) + add table with examples of URLS * update to <h1>,<h2> ( shared/00/00000002.xhp ) * update to <h1>,<h2> Change-Id: I67150576098eeb0e4a2ada3e4edf910b234c1dda Reviewed-on: https://gerrit.libreoffice.org/c/help/+/106136 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hal...@libreoffice.org> diff --git a/helpcontent2 b/helpcontent2 index 66ed66b2168a..5b768d6f04f5 160000 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 66ed66b2168a36c8606abea78d1d3b1b6183b211 +Subproject commit 5b768d6f04f57ea77e66be18136908b44ac65cde commit 0eebe5de401a886fb1eb75d06d6a7775d1a63b78 Author: Olivier Hallot <olivier.hal...@libreoffice.org> AuthorDate: Mon Nov 23 18:51:12 2020 -0300 Commit: Gerrit Code Review <ger...@gerrit.libreoffice.org> CommitDate: Mon Nov 23 22:51:12 2020 +0100 Update git submodules * Update helpcontent2 from branch 'master' to 66ed66b2168a36c8606abea78d1d3b1b6183b211 - Review outline contents visibility help page. Change-Id: Icd54040eab3d5130ebcf495a3de9526c1fd0670c Reviewed-on: https://gerrit.libreoffice.org/c/help/+/106462 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hal...@libreoffice.org> diff --git a/helpcontent2 b/helpcontent2 index e4bc24515c94..66ed66b2168a 160000 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit e4bc24515c948609dd96488ec087b10f91ca5cd0 +Subproject commit 66ed66b2168a36c8606abea78d1d3b1b6183b211 commit 0944d6d9c2f3123ae80180eeac6eb4d9d616dd6b Author: Alain Romedenne <libreoffici...@sfr.fr> AuthorDate: Mon Nov 23 22:50:50 2020 +0100 Commit: Gerrit Code Review <ger...@gerrit.libreoffice.org> CommitDate: Mon Nov 23 22:50:50 2020 +0100 Update git submodules * Update helpcontent2 from branch 'master' to e4bc24515c948609dd96488ec087b10f91ca5cd0 - ScriptForge library help - WiP main page Change-Id: I27f9fc5d1731fd23a0130c52f372711a920a02d7 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/106433 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hal...@libreoffice.org> diff --git a/helpcontent2 b/helpcontent2 index 0dd71d6f5bb3..e4bc24515c94 160000 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 0dd71d6f5bb3d1357ac6d10d096cea6b062c67df +Subproject commit e4bc24515c948609dd96488ec087b10f91ca5cd0 commit 6c5fa6b299b1736bd37c7f0d901418b4a9401df0 Author: Rizal Muttaqin <riz_17_...@yahoo.co.id> AuthorDate: Mon Nov 23 13:25:27 2020 +0700 Commit: Rizal Muttaqin <riz_17_...@yahoo.co.id> CommitDate: Mon Nov 23 22:37:42 2020 +0100 Colibre: tdf#138350 fix wrong color from monoline color to these HEX color values: - black : 000000 - magenta : ff00ff - green: 00ff00 In order to obey color replacement function Change-Id: I575709a84b83e7bf61f089477d5edd8810f880ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106391 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_...@yahoo.co.id> diff --git a/icon-themes/colibre/svx/res/frmsel1.png b/icon-themes/colibre/svx/res/frmsel1.png index 9f2f36a82b95..1d34e0b697d2 100644 Binary files a/icon-themes/colibre/svx/res/frmsel1.png and b/icon-themes/colibre/svx/res/frmsel1.png differ diff --git a/icon-themes/colibre/svx/res/frmsel10.png b/icon-themes/colibre/svx/res/frmsel10.png index 1792b67ee86b..7d211082b8dc 100644 Binary files a/icon-themes/colibre/svx/res/frmsel10.png and b/icon-themes/colibre/svx/res/frmsel10.png differ diff --git a/icon-themes/colibre/svx/res/frmsel11.png b/icon-themes/colibre/svx/res/frmsel11.png index d8a152365020..ae5a7e7e7c66 100644 Binary files a/icon-themes/colibre/svx/res/frmsel11.png and b/icon-themes/colibre/svx/res/frmsel11.png differ diff --git a/icon-themes/colibre/svx/res/frmsel12.png b/icon-themes/colibre/svx/res/frmsel12.png index d8a152365020..ae5a7e7e7c66 100644 Binary files a/icon-themes/colibre/svx/res/frmsel12.png and b/icon-themes/colibre/svx/res/frmsel12.png differ diff --git a/icon-themes/colibre/svx/res/frmsel13.png b/icon-themes/colibre/svx/res/frmsel13.png index c0678046e847..f50c0bb1b904 100644 Binary files a/icon-themes/colibre/svx/res/frmsel13.png and b/icon-themes/colibre/svx/res/frmsel13.png differ diff --git a/icon-themes/colibre/svx/res/frmsel14.png b/icon-themes/colibre/svx/res/frmsel14.png index 9923387a50fc..5a1b52bbbd2c 100644 Binary files a/icon-themes/colibre/svx/res/frmsel14.png and b/icon-themes/colibre/svx/res/frmsel14.png differ diff --git a/icon-themes/colibre/svx/res/frmsel15.png b/icon-themes/colibre/svx/res/frmsel15.png index c14efaaefac3..0e5ee83eaea0 100644 Binary files a/icon-themes/colibre/svx/res/frmsel15.png and b/icon-themes/colibre/svx/res/frmsel15.png differ diff --git a/icon-themes/colibre/svx/res/frmsel16.png b/icon-themes/colibre/svx/res/frmsel16.png index b1659789373d..1358af1e48f1 100644 Binary files a/icon-themes/colibre/svx/res/frmsel16.png and b/icon-themes/colibre/svx/res/frmsel16.png differ diff --git a/icon-themes/colibre/svx/res/frmsel2.png b/icon-themes/colibre/svx/res/frmsel2.png index a187fc71fcbb..fef5d5efd35e 100644 Binary files a/icon-themes/colibre/svx/res/frmsel2.png and b/icon-themes/colibre/svx/res/frmsel2.png differ diff --git a/icon-themes/colibre/svx/res/frmsel3.png b/icon-themes/colibre/svx/res/frmsel3.png index f02b39262b93..4f12477e145f 100644 Binary files a/icon-themes/colibre/svx/res/frmsel3.png and b/icon-themes/colibre/svx/res/frmsel3.png differ diff --git a/icon-themes/colibre/svx/res/frmsel4.png b/icon-themes/colibre/svx/res/frmsel4.png index 232d53563870..ba9d32d3a2f9 100644 Binary files a/icon-themes/colibre/svx/res/frmsel4.png and b/icon-themes/colibre/svx/res/frmsel4.png differ diff --git a/icon-themes/colibre/svx/res/frmsel5.png b/icon-themes/colibre/svx/res/frmsel5.png index 42f537e3801c..615b90ddf29d 100644 Binary files a/icon-themes/colibre/svx/res/frmsel5.png and b/icon-themes/colibre/svx/res/frmsel5.png differ diff --git a/icon-themes/colibre/svx/res/frmsel6.png b/icon-themes/colibre/svx/res/frmsel6.png index a6901e4c0f8d..c61aa962646e 100644 Binary files a/icon-themes/colibre/svx/res/frmsel6.png and b/icon-themes/colibre/svx/res/frmsel6.png differ diff --git a/icon-themes/colibre/svx/res/frmsel7.png b/icon-themes/colibre/svx/res/frmsel7.png index 128e2b2f9bb4..e1f4417ed251 100644 Binary files a/icon-themes/colibre/svx/res/frmsel7.png and b/icon-themes/colibre/svx/res/frmsel7.png differ diff --git a/icon-themes/colibre/svx/res/frmsel8.png b/icon-themes/colibre/svx/res/frmsel8.png index d510fe9607b6..010e787ffa6a 100644 Binary files a/icon-themes/colibre/svx/res/frmsel8.png and b/icon-themes/colibre/svx/res/frmsel8.png differ diff --git a/icon-themes/colibre/svx/res/frmsel9.png b/icon-themes/colibre/svx/res/frmsel9.png index 1792b67ee86b..7d211082b8dc 100644 Binary files a/icon-themes/colibre/svx/res/frmsel9.png and b/icon-themes/colibre/svx/res/frmsel9.png differ diff --git a/icon-themes/colibre_svg/svx/res/frmsel1.svg b/icon-themes/colibre_svg/svx/res/frmsel1.svg index a6e4b8b09b57..485fb9c93224 100644 --- a/icon-themes/colibre_svg/svx/res/frmsel1.svg +++ b/icon-themes/colibre_svg/svx/res/frmsel1.svg @@ -1 +1 @@ -<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#a846b2"/><path d="m2 0v3h-2l3.5 4 3.5-4h-2v-3z" fill="#3a3a38"/></svg> \ No newline at end of file +<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#f0f"/><path d="m2 0v3h-2l3.5 4 3.5-4h-2v-3z"/></svg> \ No newline at end of file diff --git a/icon-themes/colibre_svg/svx/res/frmsel10.svg b/icon-themes/colibre_svg/svx/res/frmsel10.svg index d5d008a8b0f7..46ca50cc8be6 100644 --- a/icon-themes/colibre_svg/svx/res/frmsel10.svg +++ b/icon-themes/colibre_svg/svx/res/frmsel10.svg @@ -1 +1 @@ -<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#a846b2"/><path d="m3 0h1v7h-1z" fill="#18ab50"/></svg> \ No newline at end of file +<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#f0f"/><path d="m3 0h1v7h-1z" fill="#0f0"/></svg> \ No newline at end of file diff --git a/icon-themes/colibre_svg/svx/res/frmsel11.svg b/icon-themes/colibre_svg/svx/res/frmsel11.svg index 8da7af0acd3d..f1056d24129c 100644 --- a/icon-themes/colibre_svg/svx/res/frmsel11.svg +++ b/icon-themes/colibre_svg/svx/res/frmsel11.svg @@ -1 +1 @@ -<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#a846b2"/><path d="m3-7h1v7h-1z" fill="#18ab50" transform="rotate(90)"/></svg> \ No newline at end of file +<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#f0f"/><path d="m3-7h1v7h-1z" fill="#0f0" transform="rotate(90)"/></svg> \ No newline at end of file diff --git a/icon-themes/colibre_svg/svx/res/frmsel12.svg b/icon-themes/colibre_svg/svx/res/frmsel12.svg index 8da7af0acd3d..f1056d24129c 100644 --- a/icon-themes/colibre_svg/svx/res/frmsel12.svg +++ b/icon-themes/colibre_svg/svx/res/frmsel12.svg @@ -1 +1 @@ -<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#a846b2"/><path d="m3-7h1v7h-1z" fill="#18ab50" transform="rotate(90)"/></svg> \ No newline at end of file +<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#f0f"/><path d="m3-7h1v7h-1z" fill="#0f0" transform="rotate(90)"/></svg> \ No newline at end of file diff --git a/icon-themes/colibre_svg/svx/res/frmsel13.svg b/icon-themes/colibre_svg/svx/res/frmsel13.svg index a7e06c9c200d..6d36027dc9e5 100644 --- a/icon-themes/colibre_svg/svx/res/frmsel13.svg +++ b/icon-themes/colibre_svg/svx/res/frmsel13.svg @@ -1 +1 @@ -<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#a846b2"/><path d="m-.49999979-9.3994951h1v6.0749186h-1z" fill="#18ab50" transform="matrix(-.70710678 .70710678 -.70710678 -.70710678 0 0)"/></svg> \ No newline at end of file +<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#f0f"/><path d="m-.49999979-9.3994951h1v6.0749186h-1z" fill="#0f0" transform="matrix(-.70710678 .70710678 -.70710678 -.70710678 0 0)"/></svg> \ No newline at end of file diff --git a/icon-themes/colibre_svg/svx/res/frmsel14.svg b/icon-themes/colibre_svg/svx/res/frmsel14.svg index 862c953ae108..e84d38090d9e 100644 --- a/icon-themes/colibre_svg/svx/res/frmsel14.svg +++ b/icon-themes/colibre_svg/svx/res/frmsel14.svg @@ -1 +1 @@ -<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#a846b2"/><path d="m5.0027229 4.2956162-.7071068.7071068-4.2956161-4.2956162.70710678-.7071068z" fill="#18ab50"/></svg> \ No newline at end of file +<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#f0f"/><path d="m5.0027229 4.2956162-.7071068.7071068-4.2956161-4.2956162.70710678-.7071068z" fill="#0f0"/></svg> \ No newline at end of file diff --git a/icon-themes/colibre_svg/svx/res/frmsel15.svg b/icon-themes/colibre_svg/svx/res/frmsel15.svg index f8c74d83b233..fb5236072140 100644 --- a/icon-themes/colibre_svg/svx/res/frmsel15.svg +++ b/icon-themes/colibre_svg/svx/res/frmsel15.svg @@ -1 +1 @@ -<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#a846b2"/><path d="m1.9972771 4.2956162.7071068.7071068 4.2956161-4.2956162-.7071068-.7071068z" fill="#18ab50"/></svg> \ No newline at end of file +<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#f0f"/><path d="m1.9972771 4.2956162.7071068.7071068 4.2956161-4.2956162-.7071068-.7071068z" fill="#0f0"/></svg> \ No newline at end of file diff --git a/icon-themes/colibre_svg/svx/res/frmsel16.svg b/icon-themes/colibre_svg/svx/res/frmsel16.svg index ad866e71af35..7c4e8e432917 100644 --- a/icon-themes/colibre_svg/svx/res/frmsel16.svg +++ b/icon-themes/colibre_svg/svx/res/frmsel16.svg @@ -1 +1 @@ -<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#a846b2"/><path d="m0 6.2928932.7071068.7071068 4.2956161-4.2956162-.7071068-.7071068z" fill="#18ab50"/></svg> \ No newline at end of file +<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#f0f"/><path d="m0 6.2928932.7071068.7071068 4.2956161-4.2956162-.7071068-.7071068z" fill="#0f0"/></svg> \ No newline at end of file diff --git a/icon-themes/colibre_svg/svx/res/frmsel2.svg b/icon-themes/colibre_svg/svx/res/frmsel2.svg index 5f2d89d5ebc2..6d8da9fc897d 100644 --- a/icon-themes/colibre_svg/svx/res/frmsel2.svg +++ b/icon-themes/colibre_svg/svx/res/frmsel2.svg @@ -1 +1 @@ -<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#a846b2"/><path d="m5 7v-3h2l-3.5-4-3.5 4h2v3z" fill="#3a3a38"/></svg> \ No newline at end of file +<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#f0f"/><path d="m5 7v-3h2l-3.5-4-3.5 4h2v3z"/></svg> \ No newline at end of file diff --git a/icon-themes/colibre_svg/svx/res/frmsel3.svg b/icon-themes/colibre_svg/svx/res/frmsel3.svg index 44fd979327c5..badd01858337 100644 --- a/icon-themes/colibre_svg/svx/res/frmsel3.svg +++ b/icon-themes/colibre_svg/svx/res/frmsel3.svg @@ -1 +1 @@ -<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#a846b2"/><path d="m0 5h3v2l4-3.5-4-3.5v2h-3z" fill="#3a3a38"/></svg> \ No newline at end of file +<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#f0f"/><path d="m0 5h3v2l4-3.5-4-3.5v2h-3z"/></svg> \ No newline at end of file diff --git a/icon-themes/colibre_svg/svx/res/frmsel4.svg b/icon-themes/colibre_svg/svx/res/frmsel4.svg index e7704c402a8f..8c5c31053f1a 100644 --- a/icon-themes/colibre_svg/svx/res/frmsel4.svg +++ b/icon-themes/colibre_svg/svx/res/frmsel4.svg @@ -1 +1 @@ -<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#a846b2"/><path d="m7 5h-3v2l-4-3.5 4-3.5v2h3z" fill="#3a3a38"/></svg> \ No newline at end of file +<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#f0f"/><path d="m7 5h-3v2l-4-3.5 4-3.5v2h3z"/></svg> \ No newline at end of file diff --git a/icon-themes/colibre_svg/svx/res/frmsel5.svg b/icon-themes/colibre_svg/svx/res/frmsel5.svg index baaaafc9f8ff..9c2ed6c8d723 100644 --- a/icon-themes/colibre_svg/svx/res/frmsel5.svg +++ b/icon-themes/colibre_svg/svx/res/frmsel5.svg @@ -1 +1 @@ -<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#a846b2"/><path d="m7 7v-5.3183594l-1.3398438 1.4296875-2.1601562-2.1113281-1.25 1.25-1.25 1.25 2.1113281 2.1601562-1.4296875 1.3398438z" fill="#3a3a38"/></svg> \ No newline at end of file +<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#f0f"/><path d="m7 7v-5.3183594l-1.3398438 1.4296875-2.1601562-2.1113281-1.25 1.25-1.25 1.25 2.1113281 2.1601562-1.4296875 1.3398438z"/></svg> \ No newline at end of file diff --git a/icon-themes/colibre_svg/svx/res/frmsel6.svg b/icon-themes/colibre_svg/svx/res/frmsel6.svg index c739e8f85fa4..5178b84c6242 100644 --- a/icon-themes/colibre_svg/svx/res/frmsel6.svg +++ b/icon-themes/colibre_svg/svx/res/frmsel6.svg @@ -1 +1 @@ -<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#a846b2"/><path d="m0 0v5.3183594l1.3398438-1.4296875 2.1601562 2.1113281 1.25-1.25 1.25-1.25-2.1113281-2.1601562 1.4296875-1.3398438z" fill="#3a3a38"/></svg> \ No newline at end of file +<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#f0f"/><path d="m0 0v5.3183594l1.3398438-1.4296875 2.1601562 2.1113281 1.25-1.25 1.25-1.25-2.1113281-2.1601562 1.4296875-1.3398438z"/></svg> \ No newline at end of file diff --git a/icon-themes/colibre_svg/svx/res/frmsel7.svg b/icon-themes/colibre_svg/svx/res/frmsel7.svg index 7653383cdd80..cd9a8ffc1f4d 100644 --- a/icon-themes/colibre_svg/svx/res/frmsel7.svg +++ b/icon-themes/colibre_svg/svx/res/frmsel7.svg @@ -1 +1 @@ -<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#a846b2"/><path d="m7 0v5.3183594l-1.3398438-1.4296875-2.1601562 2.1113281-1.25-1.25-1.25-1.25 2.1113281-2.1601562-1.4296875-1.3398438z" fill="#3a3a38"/></svg> \ No newline at end of file +<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#f0f"/><path d="m7 0v5.3183594l-1.3398438-1.4296875-2.1601562 2.1113281-1.25-1.25-1.25-1.25 2.1113281-2.1601562-1.4296875-1.3398438z"/></svg> \ No newline at end of file diff --git a/icon-themes/colibre_svg/svx/res/frmsel8.svg b/icon-themes/colibre_svg/svx/res/frmsel8.svg index 0ed6e4b5c091..6f50a9b248d3 100644 --- a/icon-themes/colibre_svg/svx/res/frmsel8.svg +++ b/icon-themes/colibre_svg/svx/res/frmsel8.svg @@ -1 +1 @@ -<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#a846b2"/><path d="m0 7v-5.3183594l1.3398438 1.4296875 2.1601562-2.1113281 1.25 1.25 1.25 1.25-2.1113281 2.1601562 1.4296875 1.3398438z" fill="#3a3a38"/></svg> \ No newline at end of file +<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#f0f"/><path d="m0 7v-5.3183594l1.3398438 1.4296875 2.1601562-2.1113281 1.25 1.25 1.25 1.25-2.1113281 2.1601562 1.4296875 1.3398438z"/></svg> \ No newline at end of file diff --git a/icon-themes/colibre_svg/svx/res/frmsel9.svg b/icon-themes/colibre_svg/svx/res/frmsel9.svg index d5d008a8b0f7..46ca50cc8be6 100644 --- a/icon-themes/colibre_svg/svx/res/frmsel9.svg +++ b/icon-themes/colibre_svg/svx/res/frmsel9.svg @@ -1 +1 @@ -<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#a846b2"/><path d="m3 0h1v7h-1z" fill="#18ab50"/></svg> \ No newline at end of file +<svg height="7" viewBox="0 0 7 7" width="7" xmlns="http://www.w3.org/2000/svg"><path d="m0 0h7v7h-7z" fill="#f0f"/><path d="m3 0h1v7h-1z" fill="#0f0"/></svg> \ No newline at end of file commit da2206c29f0d11914e68332691ab7699b1fd9b45 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Mon Nov 23 15:51:09 2020 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Nov 23 22:09:14 2020 +0100 tdf#138374: sw_ooxmlexport15: Add unittest Change-Id: Ie0bb8fa230f092fa3b0c96e47af4d553c6ff2db5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106424 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/qa/extras/ooxmlexport/data/tdf138374.odt b/sw/qa/extras/ooxmlexport/data/tdf138374.odt new file mode 100644 index 000000000000..86e3f87099d2 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf138374.odt differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx index b9ae69668c6d..acc87b9199aa 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx @@ -679,6 +679,17 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf135655, "tdf135655.odt") CPPUNIT_ASSERT_EQUAL(OUString("#00A933"), sXFillColVal); } +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf138374, "tdf138374.odt") +{ + xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml"); + assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/w:pict/v:shape", "fillcolor", "#ffd320"); + assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/w:pict/v:shape", "coordsize", "1315,6116"); + assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/w:pict/v:shape", "path", + "m0,0l1314,0l1314,5914l416,5914l416,6115l106,5715l416,5415l416,5715l1014,5715l1014,224l0,224l0,16l0,0e"); + assertXPath(pXmlDocument, "/w:document/w:body/w:p[2]/w:r/w:pict/v:shape", "style", + "position:absolute;margin-left:394.3pt;margin-top:204pt;width:37.2pt;height:173.3pt;mso-wrap-style:none;v-text-anchor:middle"); +} + DECLARE_OOXMLEXPORT_TEST(testTdf134609_gridAfter, "tdf134609_gridAfter.docx") { uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY); commit 03ce6e2e4c5435d145463e29385c0b0db841ce77 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Nov 23 16:40:23 2020 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Nov 23 21:23:03 2020 +0100 tdf#138430 toolbar bullet dropdown should have a scrolledwindow as should the matching dialog pages Change-Id: Ib327d3c02d1bc5ae11a6a76d52c9e17803f05534 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106427 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 35674698a6b7..f158be94773e 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -163,7 +163,7 @@ SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(weld::Container* pPage, weld::D , bModified(false) , bPreset(false) , nNumItemId(SID_ATTR_NUMBERING_RULE) - , m_xExamplesVS(new SvxNumValueSet(nullptr)) + , m_xExamplesVS(new SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin"))) , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", *m_xExamplesVS)) { SetExchangeSupport(); @@ -342,7 +342,7 @@ SvxBulletPickTabPage::SvxBulletPickTabPage(weld::Container* pPage, weld::DialogC , bModified(false) , bPreset(false) , nNumItemId(SID_ATTR_NUMBERING_RULE) - , m_xExamplesVS(new SvxNumValueSet(nullptr)) + , m_xExamplesVS(new SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin"))) , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", *m_xExamplesVS)) { SetExchangeSupport(); @@ -491,7 +491,7 @@ SvxNumPickTabPage::SvxNumPickTabPage(weld::Container* pPage, weld::DialogControl , nNumItemId(SID_ATTR_NUMBERING_RULE) , bModified(false) , bPreset(false) - , m_xExamplesVS(new SvxNumValueSet(nullptr)) + , m_xExamplesVS(new SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin"))) , m_xExamplesVSWin(new weld::CustomWeld(*m_xBuilder, "valueset", *m_xExamplesVS)) { SetExchangeSupport(); diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx b/svx/source/tbxctrls/bulletsnumbering.cxx index 430ca197457d..d30a6aabcfd0 100644 --- a/svx/source/tbxctrls/bulletsnumbering.cxx +++ b/svx/source/tbxctrls/bulletsnumbering.cxx @@ -68,7 +68,7 @@ NumberingPopup::NumberingPopup(NumberingToolBoxControl& rController, : WeldToolbarPopup(rController.getFrameInterface(), pParent, "svx/ui/numberingwindow.ui", "NumberingWindow") , mePageType(ePageType) , mrController(rController) - , mxValueSet(new SvxNumValueSet(nullptr)) + , mxValueSet(new SvxNumValueSet(m_xBuilder->weld_scrolled_window("valuesetwin"))) , mxValueSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxValueSet)) , mxMoreButton(m_xBuilder->weld_button("more")) { commit f3e4a3a4b491daedd0d7e2d2bab2da30e36c345f Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Nov 23 14:33:06 2020 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Nov 23 20:58:30 2020 +0100 CVE-2020-25713 raptor2: malformed input file can lead to a segfault due to an out of bounds array access in raptor_xml_writer_start_element_common See: https://bugs.mageia.org/show_bug.cgi?id=27605 https://www.openwall.com/lists/oss-security/2020/11/13/1 Change-Id: Ida4783a61412ffce868eacf81310da338d3e2df1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106423 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/external/redland/UnpackedTarball_raptor.mk b/external/redland/UnpackedTarball_raptor.mk index 2e0ef98fa2b5..3a4d7f17a471 100644 --- a/external/redland/UnpackedTarball_raptor.mk +++ b/external/redland/UnpackedTarball_raptor.mk @@ -28,6 +28,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,raptor,\ $(if $(SYSTEM_LIBXML),,external/redland/raptor/rpath.patch) \ external/redland/raptor/xml2-config.patch \ external/redland/raptor/0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1 \ + external/redland/raptor/raptor-fix-oob.patch.1\ external/redland/raptor/libtool.patch \ external/redland/raptor/libxml-override.patch \ )) diff --git a/external/redland/raptor/raptor-fix-oob.patch.1 b/external/redland/raptor/raptor-fix-oob.patch.1 new file mode 100644 index 000000000000..04106dc9a70e --- /dev/null +++ b/external/redland/raptor/raptor-fix-oob.patch.1 @@ -0,0 +1,14 @@ +diff --git a/src/raptor_xml_writer.c b/src/raptor_xml_writer.c +index 56993dc3..163f34d5 100644 +--- a/src/raptor_xml_writer.c ++++ b/src/raptor_xml_writer.c +@@ -216,6 +216,9 @@ raptor_xml_writer_start_element_common(raptor_xml_writer* xml_writer, + + if(nstack && element->attributes) { + for(i = 0; i < element->attribute_count; i++) { ++ if (nspace_declarations_count > element->attribute_count) ++ goto error; ++ + /* qname */ + if(element->attributes[i]->nspace) { + /* Check if we need a namespace declaration attribute */ commit 943c108071c82541c619ea3071fe97634a7a8bab Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Nov 23 15:26:22 2020 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Nov 23 20:57:46 2020 +0100 ofz#27519 only generate bitmap preview when needed Change-Id: I35d20d65b607d6441b001c7d839a793349ef3b1f ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits