[Libreoffice-commits] core.git: Branch 'feature/drawinglayercore' - 779 commits - accessibility/inc accessibility/source avmedia/source basctl/inc basctl/source basic/inc basic/qa basic/source bean/BUCK binaryurp/source bin/merge-app-bundles bridges/source BUCK canvas/inc canvas/Library_vclcanvas.mk canvas/source chart2/inc chart2/qa chart2/source chart2/workbench codemaker/source comphelper/inc comphelper/qa comphelper/source compilerplugins/clang config_host/config_oauth2.h.in config_host.mk.in configmgr/inc configmgr/source configure.ac connectivity/Configuration_mork.mk connectivity/CppunitTest_connectivity_mork.mk connectivity/Executable_mork_helper.mk connectivity/inc connectivity/IwyuFilter_connectivity.yaml connectivity/Library_mork.mk connectivity/Library_mozbootstrap.mk connectivity/Module_connectivity.mk connectivity/qa connectivity/registry connectivity/source cppcanvas/inc cppuhelper/inc cppu/source cpputools/source cui/inc cui/source cui/uiconfig dbaccess/inc dbaccess/qa dbaccess/so urce desktop/inc desktop/qa desktop/source desktop/win32 dictionaries download.lst drawinglayer/CppunitTest_drawinglayer_border.mk drawinglayer/inc drawinglayer/Library_drawinglayercore.mk drawinglayer/Library_drawinglayer.mk drawinglayer/Module_drawinglayer.mk drawinglayer/source editeng/inc editeng/qa editeng/source editeng/uiconfig embeddedobj/source emfio/CppunitTest_emfio_emf.mk emfio/inc emfio/Library_emfio.mk emfio/qa emfio/source extensions/source external/firebird external/gpgmepp external/libcmis external/mariadb-connector-c external/nss external/python3 external/redland external/skia extras/source filter/Library_pdffilter.mk filter/Library_svgfilter.mk filter/source forms/inc forms/source formula/source fpicker/source framework/inc framework/source hardened_runtime.xcent.in helpcompiler/source helpcontent2 hwpfilter/inc i18nlangtag/qa i18nlangtag/source i18npool/CustomTarget_breakiterator.mk i18npool/inc i18npool/qa i18npool/source icon-themes/colibre icon-themes/colibre_ svg icon-themes/elementary icon-themes/elementary_svg idlc/inc idlc/source idl/inc idl/source include/avmedia include/basegfx include/codemaker include/comphelper include/connectivity include/drawinglayer include/editeng include/formula include/framework include/helpcompiler include/i18nlangtag include/LibreOfficeKit include/linguistic include/o3tl include/oox include/rtl include/sal include/sax include/sfx2 include/sot include/svl include/svtools include/svx include/test include/tools include/unotools include/vcl include/xmloff javaunohelper/BUCK jurt/BUCK jvmfwk/inc jvmfwk/plugins jvmfwk/source l10ntools/source libreofficekit/qa lingucomponent/source linguistic/source lotuswordpro/inc lotuswordpro/source m4/README Makefile.fetch o3tl/qa odk/CustomTarget_check.mk odk/CustomTarget_unowinreg.mk odk/examples odk/Library_unowinreg.mk odk/Module_odk.mk odk/Package_unowinreg.mk odk/settings odk/source offapi/com offapi/UnoApi_offapi.mk officecfg/registry onlineupdate/source oox/inc oox/q a oox/source opencl/source osx/soffice.xcodeproj package/inc package/source postprocess/CustomTarget_registry.mk postprocess/qa postprocess/Rdb_services.mk pyuno/source readlicense_oo/license registry/source reportdesign/inc reportdesign/source RepositoryExternal.mk Repository.mk ridljar/BUCK ridljar/source sal/cppunittester sal/osl sal/qa sal/rtl sax/qa sax/source scaddins/IwyuFilter_scaddins.yaml scaddins/source sccomp/IwyuFilter_sccomp.yaml sc/CppunitTest_sc_parallelism.mk sc/CppunitTest_sc_ucalc.mk sc/inc sc/IwyuFilter_sc.yaml sc/Library_sc.mk sc/qa scripting/source sc/sdi sc/source sc/uiconfig sd/CppunitTest_sd_uimpress.mk sdext/inc sdext/source sd/inc sd/IwyuFilter_sd.yaml sd/Library_sd.mk sd/qa sd/source sd/uiconfig sfx2/inc sfx2/IwyuFilter_sfx2.yaml sfx2/Library_sfx.mk sfx2/sdi sfx2/source sfx2/uiconfig shell/inc shell/source slideshow/inc slideshow/IwyuFilter_slideshow.yaml slideshow/source solenv/bin solenv/buck solenv/clang-format solenv/flatpak-manifest.in solenv/gbuild solenv/maven solenv/sanitizers sot/inc sot/source starmath/inc starmath/IwyuFilter_starmath.yaml starmath/Library_sm.mk starmath/qa starmath/source stoc/IwyuFilter_stoc.yaml stoc/source svgio/CppunitTest_svgio.mk svgio/inc svgio/Library_svgio.mk svgio/source svl/inc svl/IwyuFilter_svl.yaml svl/source svtools/inc svtools/IwyuFilter_svtools.yaml svtools/Library_svt.mk svtools/qa svtools/source svtools/uiconfig svtools/UIConfig_svt.mk svx/CppunitTest_svx_unit.mk svx/inc svx/IwyuFilter_svx.yaml svx/Library_svxcore.mk svx/Library_svx.mk svx/Module_svx.mk svx/qa svx/source svx/uiconfig svx/UITest_svx_table.mk svx/util sw/CppunitTest_sw_ooxmlexport16.mk sw/CppunitTest_sw_uwriter.mk sw/inc sw/IwyuFilter_sw.yaml sw/Library_sw.mk sw/Library_swui.mk sw/Module_sw.mk sw/qa sw/sdi sw/source sw/uiconfig sw/UIConfig_swriter.mk test/source testtools/source toolkit/inc toolkit/source tools/inc tools/qa tools/source translations ucbhelper/source ucb/source UnoControls/source unodevtools/source unoidl/ source unotest/source unotools/inc unotools/source unoxml/inc unoxml/source uui/inc uui/source vbahelper/inc vbahelper/source vcl/headless vcl/inc vcl/jsdialog vcl/Library_vcl.mk vcl/Library_vclplug_gen.mk vcl/Library_vclplug_win.mk vcl/Module_vcl.mk vcl/opengl vcl/osx vcl/Package_opengl_denylist.mk vcl/Package_opengl_shader.mk vcl/Package_tipoftheday.mk vcl/qa vcl/qt5 vcl/quartz vcl/README.scheduler vcl/README.vars vcl/skia vcl/source vcl/unx vcl/win vcl/workben .vscode/vs-code-template.code-workspace.in winaccessibility/source wizards/Package_sfdialogs.mk wizards/source writerfilter/inc writerfilter/qa writerfilter/source writerperfect/qa writerperfect/source xmlhelp/source xmloff/inc xmloff/source xmlscript/source xmlsecurity/inc xmlsecurity/qa xmlsecurity/source xmlsecurity/workben
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Wed Dec 16 06:25:20 UTC 2020
Rebased ref, commits from common ancestor:
commit 22b7225cceaee0b957c78bedd2803199db8ffe70
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Fri Jul 17 15:09:49 2020 +0200
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Wed Dec 16 15:24: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 2cae142b9cbd9fee5284bbd04e178c73954f6f77
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Jun 15 19:39:35 2020 +0200
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Wed Dec 16 15:24:16 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 14bbee535485..41e59a90f5e9 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 85c57ef97924824aa40e337b7b07c9e5cf1a8c4c
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed May 27 12:49:05 2020 +0200
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Wed Dec 16 15:24:15 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 206308d5cdeef223e5262ddd92408fb330a19691
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Tue May 26 15:57:38 2020 +0200
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Wed Dec 16 15:24:15 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 6793c6268825..5798ce031c90 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -335,7 +335,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 fe90c2437133f563ec0c73bf2cdfe8ac79382966
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Tue May 26 13:39:45 2020 +0200
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Wed Dec 16 15:24:14 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 5446ba6eed00..00561b6be1f0 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -733,22 +733,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;
}
}
@@ -756,13 +756,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 444a6992b27dc98520e4b97437ef71c181a8edab
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Fri May 8 22:28:35 2020 +0200
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Wed Dec 16 15:24:14 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 a559c18dab1eeeaa5cbdb241ab7419d011a5d720
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Thu Aug 13 10:16:35 2020 +0200
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Wed Dec 16 15:24:13 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 0d094fbe4c1d3f724d3d0652806a06db2019c7ec
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Fri May 8 20:50:29 2020 +0200
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Wed Dec 16 15:24:12 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 39534581bd78dd8e610ecd65121356096732f391
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Fri May 8 20:43:38 2020 +0200
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Wed Dec 16 15:24:12 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 25b050a9b5c61e4d0d987989e9ae03ba1b3c7575
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Fri May 8 20:40:59 2020 +0200
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Wed Dec 16 15:24:11 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 b6754c95ac71e6d3ba4bbd43ddbf45b6645475b2
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed Apr 1 13:00:25 2020 +0200
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Wed Dec 16 15:24:10 2020 +0900
Add OutputDevice::drawPrimitive2D to OutputDevice
Change-Id: Ifc22eca62df72bddd247ba097054f34756520614
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index c11d1abc1875..7cb1fee55aba 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 ff8c4182af2f..6793c6268825 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 f2e19889d06b..5511fa7fc8d5 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -701,4 +701,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 d05d4fdfa9a34554fed7d4514c09947e14c86dc3
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sat Mar 7 14:33:43 2020 +0100
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Wed Dec 16 15:24:09 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 5311a5d1b84b..45f3bd70b06a 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -349,6 +349,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 68b621086090..fad21e270b9d 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>
@@ -139,15 +138,11 @@
#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>
#include <drawinglayer/primitive2d/PolyPolygonHairlinePrimitive2D.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 d70b5216fe05..9c236d828f5f 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 4673541ec989..f9d8cfbf4d37 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 b98a3cc12a6a..58e27bd2ea38 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 bfcd952dc7820c4cf8761c4222d29ede039391dc
Author: Justin Luth <justin.luth at collabora.com>
AuthorDate: Tue Dec 15 10:01:03 2020 +0300
Commit: Justin Luth <justin_luth at sil.org>
CommitDate: Wed Dec 16 06:04:18 2020 +0100
tdf#138892 writerfilter: cancel style list if bNoNumbering
This fixes 6.1 regression e24e2d2fb02239753c1520a0458b44683ea4cc2e.
Starting in 7.0 (tdf#131321), paragraph styles kept their
numbering property. But even before that, non-paragraphs
marked by bNoNumbering we having their direct numbering
removed, and then finishParagraph applied para-style
numbering since there was no direct numbering.
So, we need to pass the bNoNumbering to finishParagraph
so that it can cancel out a style-assigned numbering.
Change-Id: I0c24af4e9bd0ea3712179a47ed3550f91c8f44b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107738
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth at sil.org>
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index db388fdefd77..0b10ea4e335e 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -12413,6 +12413,7 @@ sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
diff --git a/sw/CppunitTest_sw_ooxmlexport16.mk b/sw/CppunitTest_sw_ooxmlexport16.mk
new file mode 100644
index 000000000000..4e78cef57760
--- /dev/null
+++ b/sw/CppunitTest_sw_ooxmlexport16.mk
@@ -0,0 +1,14 @@
+# -*- 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 sw_ooxmlexport_test,16))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 0142cf32fa33..947d3293aa51 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -82,6 +82,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
CppunitTest_sw_ooxmlexport13 \
CppunitTest_sw_ooxmlexport14 \
CppunitTest_sw_ooxmlexport15 \
+ CppunitTest_sw_ooxmlexport16 \
CppunitTest_sw_ooxmlexport_template \
CppunitTest_sw_ooxmlfieldexport \
CppunitTest_sw_ooxmllinks \
diff --git a/sw/qa/extras/ooxmlexport/data/tdf138892_noNumbering.docx b/sw/qa/extras/ooxmlexport/data/tdf138892_noNumbering.docx
new file mode 100644
index 000000000000..5c0a0176e37c
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf138892_noNumbering.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
new file mode 100644
index 000000000000..174f2f0f7330
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -0,0 +1,43 @@
+/* -*- 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 <swmodeltestbase.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/text/XTextTablesSupplier.hpp>
+
+char const DATA_DIRECTORY[] = "/sw/qa/extras/ooxmlexport/data/";
+
+class Test : public SwModelTestBase
+{
+public:
+ Test() : SwModelTestBase(DATA_DIRECTORY, "Office Open XML Text") {}
+
+protected:
+ /**
+ * Denylist handling
+ */
+ bool mustTestImportOf(const char* filename) const override {
+ // If the testcase is stored in some other format, it's pointless to test.
+ return OString(filename).endsWith(".docx");
+ }
+};
+
+DECLARE_OOXMLEXPORT_TEST(testTdf138892_noNumbering, "tdf138892_noNumbering.docx")
+{
+ CPPUNIT_ASSERT_MESSAGE("Para1: Bullet point", !getProperty<OUString>(getParagraph(1), "NumberingStyleName").isEmpty());
+ CPPUNIT_ASSERT_MESSAGE("Para2: <blank line>", getProperty<OUString>(getParagraph(2), "NumberingStyleName").isEmpty());
+ CPPUNIT_ASSERT_MESSAGE("Para3: <blank line>", getProperty<OUString>(getParagraph(3), "NumberingStyleName").isEmpty());
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index aff86268b215..c3d246523a12 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3580,7 +3580,7 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
xContext->Erase(PROP_NUMBERING_LEVEL);
}
m_pImpl->SetParaSectpr(false);
- finishParagraph(bRemove);
+ finishParagraph(bRemove, bNoNumbering);
if (bRemove)
m_pImpl->RemoveLastParagraph();
}
@@ -4067,11 +4067,11 @@ void DomainMapper::HandleRedline( Sprm& rSprm )
m_pImpl->SetCurrentRedlineIsRead();
}
-void DomainMapper::finishParagraph(const bool bRemove)
+void DomainMapper::finishParagraph(const bool bRemove, const bool bNoNumbering)
{
if (m_pImpl->m_pSdtHelper->validateDateFormat())
m_pImpl->m_pSdtHelper->createDateContentControl();
- m_pImpl->finishParagraph(m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH), bRemove);
+ m_pImpl->finishParagraph(m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH), bRemove, bNoNumbering);
}
} //namespace writerfilter
diff --git a/writerfilter/source/dmapper/DomainMapper.hxx b/writerfilter/source/dmapper/DomainMapper.hxx
index 9cc196621083..d2e08a0041aa 100644
--- a/writerfilter/source/dmapper/DomainMapper.hxx
+++ b/writerfilter/source/dmapper/DomainMapper.hxx
@@ -161,7 +161,7 @@ private:
// Table
virtual void lcl_entry(writerfilter::Reference<Properties>::Pointer_t ref) override;
- void finishParagraph(const bool bRemove = false);
+ void finishParagraph(const bool bRemove = false, const bool bNoNumbering = false);
static void handleUnderlineType(const Id nId, const ::tools::SvRef<PropertyMap>& rContext);
void handleParaJustification(const sal_Int32 nIntValue, const ::tools::SvRef<PropertyMap>& rContext, const bool bExchangeLeftRight);
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 8b030cf860f4..dfd398cbda37 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1393,7 +1393,7 @@ static sal_Int32 lcl_getListId(const StyleSheetEntryPtr& rEntry, const StyleShee
return lcl_getListId(pParent, rStyleTable, rNumberingFromBaseStyle);
}
-void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, const bool bRemove )
+void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, const bool bRemove, const bool bNoNumbering )
{
if (m_bDiscardHeaderFooter)
return;
@@ -1448,7 +1448,7 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
//apply numbering level/style to paragraph if it was set at the style, but only if the paragraph itself
//does not specify the numbering
const sal_Int16 nListLevel = pStyleSheetProperties->GetListLevel();
- if ( !isNumberingViaRule && nListLevel >= 0 )
+ if ( !bNoNumbering && !isNumberingViaRule && nListLevel >= 0 )
pParaContext->Insert( PROP_NUMBERING_LEVEL, uno::makeAny(nListLevel), false );
bool bNumberingFromBaseStyle = false;
@@ -1456,7 +1456,9 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
auto const pList(GetListTable()->GetList(nListId));
if (pList && nListId >= 0 && !pParaContext->isSet(PROP_NUMBERING_STYLE_NAME))
{
- if ( !isNumberingViaRule )
+ if ( bNoNumbering )
+ pParaContext->Insert( PROP_NUMBERING_STYLE_NAME, uno::makeAny(OUString()) );
+ else if ( !isNumberingViaRule )
{
isNumberingViaStyle = true;
// Since LO7.0/tdf#131321 fixed the loss of numbering in styles, this OUGHT to be obsolete,
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 4b08d13e9649..0a2b5cbd5e85 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -681,7 +681,7 @@ public:
void setParaSdtEndDeferred(bool bParaSdtEndDeferred);
bool isParaSdtEndDeferred() const;
- void finishParagraph( const PropertyMapPtr& pPropertyMap, const bool bRemove = false);
+ void finishParagraph( const PropertyMapPtr& pPropertyMap, const bool bRemove = false, const bool bNoNumbering = false);
void appendTextPortion( const OUString& rString, const PropertyMapPtr& pPropertyMap );
void appendTextContent(const css::uno::Reference<css::text::XTextContent>&, const css::uno::Sequence<css::beans::PropertyValue>&);
void appendOLE( const OUString& rStreamName, const std::shared_ptr<OLEHandler>& pOleHandler );
commit 59301a1cadd87a63276650975252d14e8477e632
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Dec 15 16:57:53 2020 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Tue Dec 15 23:21:00 2020 +0100
Accept iOS SDK 14.3
Change-Id: I7b13905840616fe84a1b9d23161c4c349d2e7f0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107778
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml at collabora.com>
diff --git a/configure.ac b/configure.ac
index 5836bbb58d4a..1458c394c9fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3380,8 +3380,8 @@ dnl ===================================================================
if test $_os = iOS; then
AC_MSG_CHECKING([what iOS SDK to use])
- current_sdk_ver=14.2
- older_sdk_vers="14.1 14.0 13.7 13.6 13.5 13.4 13.2 13.1 13.0 12.4 12.2"
+ current_sdk_ver=14.3
+ older_sdk_vers="14.2 14.1 14.0 13.7 13.6 13.5 13.4 13.2 13.1 13.0 12.4 12.2"
if test "$enable_ios_simulator" = "yes"; then
platform=iPhoneSimulator
versionmin=-mios-simulator-version-min=12.2
commit fdeb04f7c59cf8032fe17072ed779e70505cc6ab
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue Dec 15 17:17:56 2020 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Dec 15 22:41:14 2020 +0100
tdf#129961 svx: finish UI for table shadow as direct format
Normally properties on an SdrObject is set using SetAttributes(), but
that would take the selection controller into account, so we would call
SvxTableController::SetAttributes(), which sets the item set on the
selected cells instead. So use SetAttrToMarked() instead, which works on
the shape's item set, even in the table case. Don't replace all existing
items because we only have shadow properties here and also a disabled
shadow is still a (set) SdrOnOffItem (with value=false), so no old
SdrOnOffItem will be forgotten in the shape's item set.
Also add an outer undo grouping, so once the user presses OK in the
table properties dialog, we only create a single user-visible undo
action, not two.
Change-Id: I77b55ba1f07b8d0eeac5070e0ec07d39573d1f9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107781
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
Tested-by: Jenkins
diff --git a/include/svx/sdr/table/tablecontroller.hxx b/include/svx/sdr/table/tablecontroller.hxx
index f34499a05991..3d94dcfb08b7 100644
--- a/include/svx/sdr/table/tablecontroller.hxx
+++ b/include/svx/sdr/table/tablecontroller.hxx
@@ -85,6 +85,7 @@ public:
SVX_DLLPRIVATE void MergeAttrFromSelectedCells(SfxItemSet& rAttr, bool bOnlyHardAttr) const;
SVX_DLLPRIVATE void SetAttrToSelectedCells(const SfxItemSet& rAttr, bool bReplaceAll);
+ void SetAttrToSelectedShape(const SfxItemSet& rAttr);
/** Fill the values that are common for all selected cells.
*
* This lets the Borders dialog to display the line arrangement
diff --git a/svx/Module_svx.mk b/svx/Module_svx.mk
index 599f842d480e..20339da7c58e 100644
--- a/svx/Module_svx.mk
+++ b/svx/Module_svx.mk
@@ -57,6 +57,10 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,svx,\
JunitTest_svx_unoapi \
))
+$(eval $(call gb_Module_add_uicheck_targets,svx,\
+ UITest_svx_table \
+))
+
#todo: noopt for EnhanceCustomShapesFunctionParser.cxx on Solaris Sparc and MacOSX
#todo: -DUNICODE and -D_UNICODE on WNT for source/dialog
#todo: component file
diff --git a/svx/UITest_svx_table.mk b/svx/UITest_svx_table.mk
new file mode 100644
index 000000000000..df24798f59c4
--- /dev/null
+++ b/svx/UITest_svx_table.mk
@@ -0,0 +1,16 @@
+# -*- 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_UITest_UITest,svx_table))
+
+$(eval $(call gb_UITest_add_modules,svx_table,$(SRCDIR)/svx/qa/uitest,\
+ table/ \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/svx/qa/uitest/table/tablecontroller.py b/svx/qa/uitest/table/tablecontroller.py
new file mode 100644
index 000000000000..27ed4a1d7ccb
--- /dev/null
+++ b/svx/qa/uitest/table/tablecontroller.py
@@ -0,0 +1,45 @@
+#
+# 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/.
+#
+
+from uitest.framework import UITestCase
+from uitest.uihelper.common import select_pos
+
+
+# Test for SvxTableController.
+class SvxTableControllerTest(UITestCase):
+
+ def testOnFormatTable(self):
+ # Create an Impress document with a single table in it.
+ self.ui_test.create_doc_in_start_center("impress")
+ template = self.xUITest.getTopFocusWindow()
+ self.ui_test.close_dialog_through_button(template.getChild("cancel"))
+ self.xUITest.executeCommand(".uno:SelectAll")
+ self.xUITest.executeCommand(".uno:Delete")
+ self.xUITest.executeCommand(".uno:InsertTable?Columns:short=2&Rows:short=2")
+
+ # Enable shadow.
+ self.ui_test.execute_dialog_through_command(".uno:TableDialog")
+ tableDialog = self.xUITest.getTopFocusWindow()
+ tabs = tableDialog.getChild("tabcontrol")
+ # Select "shadow".
+ select_pos(tabs, "4")
+ shadowCheckbox = tableDialog.getChild("TSB_SHOW_SHADOW")
+ shadowCheckbox.executeAction("CLICK", tuple())
+ self.ui_test.close_dialog_through_button(tableDialog.getChild("ok"))
+
+ # Check if the shadow was enabled.
+ component = self.ui_test.get_component()
+ drawPage = component.getDrawPages().getByIndex(0)
+ shape = drawPage.getByIndex(0)
+ # Without the accompanying fix in place, this test would have failed with:
+ # AssertionError: False != True
+ # i.e. the table still had no shadow.
+ self.assertEqual(shape.Shadow, True)
+
+ # Close the document.
+ self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 1dce1dab81ec..429b2e58da43 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -977,7 +977,26 @@ void SvxTableController::onFormatTable(const SfxRequest& rReq)
if( aNewBoxItem.GetDistance( SvxBoxItemLine::BOTTOM ) != aBoxItem.GetDistance( SvxBoxItemLine::BOTTOM ) )
aNewSet.Put(makeSdrTextLowerDistItem( aNewBoxItem.GetDistance( SvxBoxItemLine::BOTTOM ) ) );
- this->SetAttrToSelectedCells(aNewSet, false);
+ if (checkTableObject() && mxTable.is())
+ {
+ // Create a single undo action when applying the result of the dialog.
+ SdrTableObj& rTableObject(*mxTableObj);
+ SdrModel& rSdrModel(rTableObject.getSdrModelFromSdrObject());
+ bool bUndo = rSdrModel.IsUndoEnabled();
+ if (bUndo)
+ {
+ rSdrModel.BegUndo(SvxResId(STR_TABLE_NUMFORMAT));
+ }
+
+ this->SetAttrToSelectedCells(aNewSet, false);
+
+ this->SetAttrToSelectedShape(aNewSet);
+
+ if (bUndo)
+ {
+ rSdrModel.EndUndo();
+ }
+ }
}
xDlg->disposeOnce();
@@ -2705,6 +2724,18 @@ void SvxTableController::SetAttrToSelectedCells(const SfxItemSet& rAttr, bool bR
rModel.EndUndo();
}
+void SvxTableController::SetAttrToSelectedShape(const SfxItemSet& rAttr)
+{
+ if (!checkTableObject() || !mxTable.is())
+ return;
+
+ // Filter out non-shadow items from rAttr.
+ SfxItemSet aSet(*rAttr.GetPool(), svl::Items<SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST>{});
+ aSet.Put(rAttr);
+
+ // Set shadow items on the marked shape.
+ mrView.SetAttrToMarked(aSet, /*bReplaceAll=*/false);
+}
bool SvxTableController::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const
{
commit 7763692e50191e2074f56e9bf698c843eed0ad00
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Dec 15 15:17:27 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Dec 15 21:12:28 2020 +0100
tdf#138701 leave current combobox cursor valid if the contents won't change
Change-Id: I6d7f5de7b79d447590fcfa325f4be7430eaffd5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107779
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 436f5b412e27..c5b03aa270e5 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -587,7 +587,10 @@ namespace pcr
{
OUString sText;
_rValue >>= sText;
- getTypedControlWindow()->set_entry_text( sText );
+ weld::ComboBox* pControlWindow = getTypedControlWindow();
+ // tdf#138701 leave current cursor valid if the contents won't change
+ if (pControlWindow->get_active_text() != sText)
+ pControlWindow->set_entry_text(sText);
}
Any SAL_CALL OComboboxControl::getValue()
commit 9fdc7384eff0e9627de2d9c2b59a7716f9e8af25
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Dec 15 14:33:32 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Dec 15 20:38:32 2020 +0100
tdf#138938 put the tooltip on the toolbar item instead of the toolbar
Change-Id: I69ff3813a726f26daa20a00ce3a0bb311a162c39
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107770
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index 0ac834b1318e..fc6124f79659 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -219,6 +219,7 @@ void TabBar::CreateTabItem(weld::Toolbar& rItem, const DeckDescriptor& rDeckDesc
rItem.set_accessible_name(rDeckDescriptor.msTitle);
rItem.set_accessible_description(rDeckDescriptor.msHelpText);
rItem.set_tooltip_text(rDeckDescriptor.msHelpText);
+ rItem.set_item_tooltip_text("toggle", rDeckDescriptor.msHelpText);
}
css::uno::Reference<css::graphic::XGraphic> TabBar::GetItemImage(const DeckDescriptor& rDeckDescriptor) const
commit 47cc520dcc7deec8ee527505da5f28be195e1fb6
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Dec 15 14:20:38 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Dec 15 20:38:05 2020 +0100
DrawGradient variant only called by FileDefinitionWidgetDraw
which doesn't do any mirroring on any of its drawing calls.
Change-Id: I4f531ee01147b34f36a6d4235f3340bd1a8e62ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107769
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/inc/FileDefinitionWidgetDraw.hxx b/vcl/inc/FileDefinitionWidgetDraw.hxx
index 0ca50c304aad..881316c2f4a2 100644
--- a/vcl/inc/FileDefinitionWidgetDraw.hxx
+++ b/vcl/inc/FileDefinitionWidgetDraw.hxx
@@ -69,6 +69,10 @@ public:
static void drawBitmap(SalGraphics& rGraphics, const SalTwoRect& rPosAry,
const SalBitmap& rSalBitmap, const SalBitmap& rTransparentBitmap);
+
+ static void implDrawGradient(SalGraphics& rGraphics,
+ const basegfx::B2DPolyPolygon& rPolyPolygon,
+ const SalGradient& rGradient);
};
} // end vcl namespace
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index ce31d808e98b..92a587841a9c 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -274,9 +274,6 @@ public:
const Gradient& rGradient,
const OutputDevice& rOutDev);
- bool DrawGradient(basegfx::B2DPolyPolygon const & rPolyPolygon,
- SalGradient const & rGradient);
-
// CopyArea --> No RasterOp, but ClipRegion
void CopyArea(
tools::Long nDestX, tools::Long nDestY,
diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
index 16a8fe52efbe..bcc999a79eac 100644
--- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
+++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
@@ -237,6 +237,13 @@ void FileDefinitionWidgetDraw::drawBitmap(SalGraphics& rGraphics, const SalTwoRe
rGraphics.drawBitmap(rPosAry, rSalBitmap, rTransparentBitmap);
}
+void FileDefinitionWidgetDraw::implDrawGradient(SalGraphics& rGraphics,
+ const basegfx::B2DPolyPolygon& rPolyPolygon,
+ const SalGradient& rGradient)
+{
+ rGraphics.implDrawGradient(rPolyPolygon, rGradient);
+}
+
namespace
{
void drawFromDrawCommands(gfx::DrawRoot const& rDrawRoot, SalGraphics& rGraphics, tools::Long nX,
@@ -319,7 +326,8 @@ void drawFromDrawCommands(gfx::DrawRoot const& rDrawRoot, SalGraphics& rGraphics
aColor.SetTransparency(rStop.mfOpacity * (1.0f - rRectangle.mnOpacity));
aGradient.maStops.emplace_back(aColor, rStop.mfOffset);
}
- rGraphics.DrawGradient(basegfx::B2DPolyPolygon(aB2DPolygon), aGradient);
+ FileDefinitionWidgetDraw::implDrawGradient(
+ rGraphics, basegfx::B2DPolyPolygon(aB2DPolygon), aGradient);
}
}
if (rRectangle.mpStrokeColor)
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 59ec974c2dd3..ed2a2ed21df2 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -557,18 +557,13 @@ bool SalGraphics::DrawGradient(const tools::PolyPolygon& rPolyPoly, const Gradie
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
{
- tools::PolyPolygon aFinal(mirror(rPolyPoly.getB2DPolyPolygon(), rOutDev));
- return drawGradient(aFinal, rGradient);
+ tools::PolyPolygon aMirrored(mirror(rPolyPoly.getB2DPolyPolygon(), rOutDev));
+ return drawGradient(aMirrored, rGradient);
}
return drawGradient( rPolyPoly, rGradient );
}
-bool SalGraphics::DrawGradient(basegfx::B2DPolyPolygon const & rPolyPolygon, SalGradient const & rSalGradient)
-{
- return implDrawGradient(rPolyPolygon, rSalGradient);
-}
-
void SalGraphics::CopyArea( tools::Long nDestX, tools::Long nDestY,
tools::Long nSrcX, tools::Long nSrcY,
tools::Long nSrcWidth, tools::Long nSrcHeight,
commit 9902a53ee9c6d74fef6ab0ae9f602cf7895fecfd
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Dec 15 11:55:29 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Dec 15 20:37:29 2020 +0100
tdf#138936 gradient missing under RTL from writer comment margins
Change-Id: I57533f033f9528b7c89162967b392eb5abb4d76a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107750
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index d43e3b632d45..ce31d808e98b 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -271,7 +271,8 @@ public:
bool DrawGradient(
const tools::PolyPolygon& rPolyPoly,
- const Gradient& rGradient );
+ const Gradient& rGradient,
+ const OutputDevice& rOutDev);
bool DrawGradient(basegfx::B2DPolyPolygon const & rPolyPolygon,
SalGradient const & rGradient);
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index e5fe48e851ab..59ec974c2dd3 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -553,8 +553,14 @@ bool SalGraphics::DrawPolyLine(
bPixelSnapHairline);
}
-bool SalGraphics::DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient )
+bool SalGraphics::DrawGradient(const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, const OutputDevice& rOutDev)
{
+ if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
+ {
+ tools::PolyPolygon aFinal(mirror(rPolyPoly.getB2DPolyPolygon(), rOutDev));
+ return drawGradient(aFinal, rGradient);
+ }
+
return drawGradient( rPolyPoly, rGradient );
}
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index f37bad807845..ea8e8b1ca703 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -107,7 +107,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
// try to draw gradient natively
if (!mbOutputClipped)
- bDrawn = mpGraphics->DrawGradient( aClixPolyPoly, aGradient );
+ bDrawn = mpGraphics->DrawGradient( aClixPolyPoly, aGradient, *this );
if (!bDrawn && !mbOutputClipped)
{
commit f012855cb6d845e8efcb6292d55542bd06273875
Author: Andrea Gelmini <andrea.gelmini at gelma.net>
AuthorDate: Mon Dec 14 11:18:01 2020 +0100
Commit: Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Tue Dec 15 20:20:24 2020 +0100
Fix typo
Change-Id: I41e1d5a251e29908d0001824d376966644c36c21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107680
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 59b287e66498..2bb64a561c99 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1957,7 +1957,7 @@ static bool hasA11yRelevantAttribute( const std::vector<sal_uInt16>& rWhichFmtAt
// as their implementation of SwClientNotify is SwClient's which calls Modify.
// Therefore we also don't need to call SwClient::SwClientNotify(rModify, rHint)
// because that's all it does, and this implementation calls
-// SwContentFrame::SwClientNotifyy() when appropriate.
+// SwContentFrame::SwClientNotify() when appropriate.
void SwTextFrame::SwClientNotify(SwModify const& rModify, SfxHint const& rHint)
{
SfxPoolItem const* pOld(nullptr);
commit f9af3a9807ef37ca888a4767d3abdc1078783106
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Dec 15 09:32:26 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Dec 15 17:31:19 2020 +0100
use GetParentWithLOKNotifier to get the frame LOKNotifier to reuse for menus
so it doesn't have to be explicitly set by the editview menu creator
If I force enable LibreOfficeKit::isActive and right click on a
mispelled word in impress, or in the writer comments-in-margin before or
after this change I see the same ILibreOfficeKitNotifier set on the
MenuFloatingWindow. Seeing as this is used in only the editview spell
checking menu give that a unique id 'editviewspellmenu' and only do
this for that id
SetLOKNotifier in vcl/source/window/menu.cxx added with:
commit 8938e8b153f32f3f5926baddb87cb76c8e72755a
Author: Jan Holesovsky <kendy at collabora.com>
Date: Thu Mar 8 21:07:40 2018 +0100
lokdialog: Tunnel the spell-checking context menu with recommendations.
Change-Id: I1a7952e88a3f89346c97d2516628b4a7a0423de6
Reviewed-on: https://gerrit.libreoffice.org/51062
Reviewed-by: pranavk <pranavk at collabora.co.uk>
Tested-by: pranavk <pranavk at collabora.co.uk>
Reviewed-on: https://gerrit.libreoffice.org/51166
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
SetLOKNotifier in editeng/source/editeng/editview.cxx added with:
commit 7c6fbd0ac3b5927b337aa69b132aba14e9b3103f
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
Date: Mon Apr 16 14:38:36 2018 +0200
sd lok: Impress: Right-click menu on misspelled word locks up session
Change-Id: Ib554eea7049c1ea244bc4789ee3d7d2adf87e283
Reviewed-on: https://gerrit.libreoffice.org/52977
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
Change-Id: I6c23ba4252eab3850b7cc4c8cad2d2f8adee2792
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107747
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index d7642736cf27..2212b526a572 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -920,7 +920,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
return;
VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "editeng/ui/spellmenu.ui", "");
- VclPtr<PopupMenu> aPopupMenu(aBuilder.get_menu("menu"));
+ VclPtr<PopupMenu> aPopupMenu(aBuilder.get_menu("editviewspellmenu"));
const sal_uInt16 nAutoCorrId = aPopupMenu->GetItemId("autocorrect");
PopupMenu *pAutoMenu = aPopupMenu->GetPopupMenu(nAutoCorrId);
const sal_uInt16 nInsertId = aPopupMenu->GetItemId("insert");
@@ -1104,8 +1104,6 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list