[Libreoffice-commits] core.git: Branch 'feature/drawinglayercore' - 17 commits - drawinglayer/CppunitTest_drawinglayer_border.mk drawinglayer/inc drawinglayer/Library_drawinglayercore.mk drawinglayer/Library_drawinglayer.mk drawinglayer/Module_drawinglayer.mk drawinglayer/source emfio/CppunitTest_emfio_emf_test.mk emfio/Library_emfio.mk extras/Package_gallmytheme.mk extras/source filter/Library_svgfilter.mk include/drawinglayer include/svx include/vcl Repository.mk sc/CppunitTest_sc_ucalc.mk sc/Library_sc.mk sc/qa sd/CppunitTest_sd_uimpress.mk sd/Library_sd.mk sfx2/Library_sfx.mk solenv/clang-format svgio/CppunitTest_svgio.mk svgio/Library_svgio.mk svx/CppunitTest_svx_unit.mk svx/inc svx/Library_svxcore.mk svx/Library_svx.mk svx/source sw/CppunitTest_sw_uwriter.mk sw/Library_sw.mk sw/Library_swui.mk sw/qa vcl/Library_vcl.mk vcl/source
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Wed Apr 15 05:22:21 UTC 2020
Rebased ref, commits from common ancestor:
commit 0d16c1b2f76ac5d6424cb0bfb66ecb3b15521213
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Tue Apr 14 20:48:56 2020 +0200
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Wed Apr 15 07:21:36 2020 +0200
use pragma once
Change-Id: Ia78cc4ee565a5f39835499764b1f2d0a2a72c5ba
diff --git a/include/vcl/GraphicNativeMetadata.hxx b/include/vcl/GraphicNativeMetadata.hxx
index b6b162556e76..118efa480df8 100644
--- a/include/vcl/GraphicNativeMetadata.hxx
+++ b/include/vcl/GraphicNativeMetadata.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_VCL_GRAPHICNATIVEMETADATA_HXX
-#define INCLUDED_VCL_GRAPHICNATIVEMETADATA_HXX
+#pragma once
#include <vcl/graph.hxx>
@@ -34,6 +33,4 @@ public:
sal_uInt16 getRotation() const { return mRotation;}
};
-#endif // INCLUDED_VCL_GRAPHICNATIVEMETADATA_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/GraphicNativeTransform.hxx b/include/vcl/GraphicNativeTransform.hxx
index c8203377dc55..318327bf5b66 100644
--- a/include/vcl/GraphicNativeTransform.hxx
+++ b/include/vcl/GraphicNativeTransform.hxx
@@ -17,12 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_VCL_GRAPHICNATIVETRANSFORM_HXX
-#define INCLUDED_VCL_GRAPHICNATIVETRANSFORM_HXX
+#pragma once
#include <rtl/ustring.hxx>
#include <sal/types.h>
#include <vcl/dllapi.h>
+
class Graphic;
class VCL_DLLPUBLIC GraphicNativeTransform final
@@ -40,6 +40,4 @@ public:
void rotate(sal_uInt16 aRotation);
};
-#endif // INCLUDED_VCL_GRAPHICNATIVETRANSFORM_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/jpeg/Exif.hxx b/vcl/source/filter/jpeg/Exif.hxx
index 47c34e427810..6052a44842da 100644
--- a/vcl/source/filter/jpeg/Exif.hxx
+++ b/vcl/source/filter/jpeg/Exif.hxx
@@ -17,12 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_VCL_SOURCE_FILTER_JPEG_EXIF_HXX
-#define INCLUDED_VCL_SOURCE_FILTER_JPEG_EXIF_HXX
+#pragma once
#include <tools/stream.hxx>
namespace exif {
+
enum Orientation {
TOP_LEFT = 1,
TOP_RIGHT = 2,
@@ -80,6 +80,4 @@ public:
};
-#endif // INCLUDED_VCL_SOURCE_FILTER_JPEG_EXIF_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 43ec84a47744b41ad9499d5764fa17b752d59f62
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 Apr 15 07:21:36 2020 +0200
Add OutputDevice::drawPrimitive2D to OutputDevice
Change-Id: Ifc22eca62df72bddd247ba097054f34756520614
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index e4430b2415f3..44aa8f821dae 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 50bdf3b3ca72..3be86dd6c72b 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 0dcdd84a5d0a..52f31234caa3 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -713,4 +713,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 945d20aca842c5571755162aa259b163797dd683
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 Apr 15 07:21:36 2020 +0200
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 83e8ffa6d885..52b4db88e46e 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -351,6 +351,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 2a0f1030a789..46f21f56b6b6 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 \
@@ -126,7 +124,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 25a23a7d3a9e..df6a684135ed 100644
--- a/drawinglayer/inc/pch/precompiled_drawinglayer.hxx
+++ b/drawinglayer/inc/pch/precompiled_drawinglayer.hxx
@@ -13,7 +13,7 @@
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-04-02 22:28:40 using:
+ Generated on 2020-04-03 17:41:44 using:
./bin/update_pch drawinglayer drawinglayer --cutoff=4 --exclude:system --exclude:module --exclude:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -92,7 +92,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>
@@ -104,7 +103,7 @@
#include <com/sun/star/drawing/TextureMode.hpp>
#include <com/sun/star/drawing/TextureProjectionMode.hpp>
#include <com/sun/star/graphic/XPrimitive3D.hpp>
-#include <com/sun/star/util/XAccounting.hpp>
+#include <com/sun/star/uno/Reference.hxx>
#include <comphelper/comphelperdllapi.h>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
@@ -137,7 +136,6 @@
#include <drawinglayer/drawinglayerdllapi.h>
#include <drawinglayer/geometry/viewinformation2d.hxx>
#include <drawinglayer/geometry/viewinformation3d.hxx>
-#include <drawinglayer/primitive2d/CommonTypes.hxx>
#include <drawinglayer/primitive2d/PolyPolygonColorPrimitive2D.hxx>
#include <drawinglayer/primitive2d/PolyPolygonGradientPrimitive2D.hxx>
#include <drawinglayer/primitive2d/PolyPolygonGraphicPrimitive2D.hxx>
@@ -145,9 +143,6 @@
#include <drawinglayer/primitive2d/PolyPolygonHatchPrimitive2D.hxx>
#include <drawinglayer/primitive2d/PolyPolygonMarkerPrimitive2D.hxx>
#include <drawinglayer/primitive2d/PolyPolygonStrokePrimitive2D.hxx>
-#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
-#include <drawinglayer/primitive2d/Primitive2DVisitor.hxx>
-#include <drawinglayer/primitive2d/Tools.hxx>
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
diff --git a/drawinglayer/inc/pch/precompiled_drawinglayercore.cxx b/drawinglayer/inc/pch/precompiled_drawinglayercore.cxx
new file mode 100644
index 000000000000..4a8c23ea8e65
--- /dev/null
+++ b/drawinglayer/inc/pch/precompiled_drawinglayercore.cxx
@@ -0,0 +1,12 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "precompiled_drawinglayercore.hxx"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/inc/pch/precompiled_drawinglayercore.hxx b/drawinglayer/inc/pch/precompiled_drawinglayercore.hxx
new file mode 100644
index 000000000000..4cc5ca4612c9
--- /dev/null
+++ b/drawinglayer/inc/pch/precompiled_drawinglayercore.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+/*
+ This file has been autogenerated by update_pch.sh. It is possible to edit it
+ manually (such as when an include file has been moved/renamed/removed). All such
+ manual changes will be rewritten by the next run of update_pch.sh (which presumably
+ also fixes all possible problems, so it's usually better to use it).
+
+ Generated on 2020-03-07 12:37:18 using:
+ ./bin/update_pch drawinglayer drawinglayercore --cutoff=4 --exclude:system --exclude:module --exclude:local
+
+ If after updating build fails, use the following command to locate conflicting headers:
+ ./bin/update_pch_bisect ./drawinglayer/inc/pch/precompiled_drawinglayercore.hxx "make drawinglayer.build" --find-conflicts
+*/
+
+#if PCH_LEVEL >= 1
+#include <ostream>
+#include <vector>
+#endif // PCH_LEVEL >= 1
+#if PCH_LEVEL >= 2
+#include <osl/diagnose.h>
+#include <osl/interlck.h>
+#include <sal/config.h>
+#include <sal/types.h>
+#endif // PCH_LEVEL >= 2
+#if PCH_LEVEL >= 3
+#include <basegfx/basegfxdllapi.h>
+#include <basegfx/point/b2dpoint.hxx>
+#include <basegfx/range/b2drange.hxx>
+#include <basegfx/range/basicrange.hxx>
+#include <basegfx/tuple/b2dtuple.hxx>
+#include <basegfx/utils/canvastools.hxx>
+#include <basegfx/vector/b2dvector.hxx>
+#endif // PCH_LEVEL >= 3
+#if PCH_LEVEL >= 4
+#include <drawinglayer/geometry/viewinformation2d.hxx>
+#endif // PCH_LEVEL >= 4
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/emfio/CppunitTest_emfio_emf_test.mk b/emfio/CppunitTest_emfio_emf_test.mk
index 123e4b3549bd..2679c0a604d9 100644
--- a/emfio/CppunitTest_emfio_emf_test.mk
+++ b/emfio/CppunitTest_emfio_emf_test.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 52fde14885b3..89add50b781a 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 5e1a96429ff3..8818cdd0bcde 100644
--- a/include/drawinglayer/primitive2d/baseprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
@@ -121,8 +121,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;
@@ -200,7 +200,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_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 997b14c0add9..b540b27c9834 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 43b168be8d8c..24520633e77f 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 e04cad7e6667..d6e445744152 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 \
fwe \
i18nlangtag \
diff --git a/svgio/CppunitTest_svgio.mk b/svgio/CppunitTest_svgio.mk
index c6f4db91fc60..24fb7a39af32 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 449c17f61196..7ef1aeb19513 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 92feb45d6578..c78b8d7769eb 100644
--- a/svx/CppunitTest_svx_unit.mk
+++ b/svx/CppunitTest_svx_unit.mk
@@ -35,6 +35,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 d3eff20b6769..9ccba33a748c 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 \
fwe \
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index 80fcdae920f3..fdf5f0165249 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 \
fwe \
diff --git a/sw/CppunitTest_sw_uwriter.mk b/sw/CppunitTest_sw_uwriter.mk
index 6b9ffa4ba683..a881587735e4 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 b6d75fd890bf..d99c59a58a4b 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 eae4bd69727bcdb15b9951061fd997f48ddf0ea4
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sun Apr 12 13:30:56 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Wed Apr 15 07:21:04 2020 +0200
move GlowPrimitive processing in VclPixelProcessor to own method
The new method is processGlowPrimitive.
Change-Id: I3e7eb9fc5ac45095dd0f6c3bff7d036e05864d89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92224
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 9102230f4305..e94637a9a7fe 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -40,6 +40,7 @@
#include <drawinglayer/primitive2d/transparenceprimitive2d.hxx>
#include <drawinglayer/primitive2d/transformprimitive2d.hxx>
#include <drawinglayer/primitive2d/markerarrayprimitive2d.hxx>
+#include <drawinglayer/primitive2d/glowprimitive2d.hxx>
#include <primitive2d/pointarrayprimitive2d.hxx>
#include <drawinglayer/primitive2d/wrongspellprimitive2d.hxx>
#include <drawinglayer/primitive2d/controlprimitive2d.hxx>
@@ -356,43 +357,7 @@ namespace drawinglayer::processor2d
}
case PRIMITIVE2D_ID_GLOWPRIMITIVE2D:
{
- basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D()));
- aRange.transform(maCurrentTransformation);
- aRange.grow(10.0);
- impBufferDevice aBufferDevice(*mpOutputDevice, aRange);
- if(aBufferDevice.isVisible())
- {
- // remember last OutDev and set to content
- OutputDevice* pLastOutputDevice = mpOutputDevice;
- mpOutputDevice = &aBufferDevice.getTransparence();
- // paint content to virtual device
- mpOutputDevice->Erase();
- process(rCandidate);
-
- // obtain result as a bitmap
- auto bitmap = mpOutputDevice->GetBitmapEx(Point(aRange.getMinX(), aRange.getMinY()), Size(aRange.getWidth(), aRange.getHeight()));
- constexpr double nRadius = 5.0;
- bitmap.Scale(Size(aRange.getWidth()-nRadius, aRange.getHeight()-nRadius));
- // use bitmap later as mask
- auto mask = bitmap.GetBitmap();
-
- mpOutputDevice = &aBufferDevice.getContent();
- process(rCandidate);
- bitmap = mpOutputDevice->GetBitmapEx(Point(aRange.getMinX(), aRange.getMinY()), Size(aRange.getWidth(), aRange.getHeight()));
- bitmap.Scale(Size(aRange.getWidth()-nRadius, aRange.getHeight()-nRadius));
-
- // calculate blurry effect
- BitmapFilterStackBlur glowFilter(nRadius);
- BitmapFilter::Filter(bitmap, glowFilter);
- // back to old OutDev
- mpOutputDevice = pLastOutputDevice;
- mpOutputDevice->DrawBitmapEx(Point(aRange.getMinX()-nRadius/2, aRange.getMinY()-nRadius/2), BitmapEx(bitmap.GetBitmap(), mask));
-
- // paint result
- //aBufferDevice.paint();
- }
- else
- SAL_WARN("drawinglayer", "Temporary buffered virtual device is not visible");
+ processGlowPrimitive2D(static_cast<const drawinglayer::primitive2d::GlowPrimitive2D&>(rCandidate));
break;
}
default :
@@ -880,6 +845,46 @@ namespace drawinglayer::processor2d
}
}
+ void VclPixelProcessor2D::processGlowPrimitive2D(const primitive2d::GlowPrimitive2D& rCandidate)
+ {
+ basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D()));
+ aRange.transform(maCurrentTransformation);
+ aRange.grow(10.0);
+ impBufferDevice aBufferDevice(*mpOutputDevice, aRange);
+ if (aBufferDevice.isVisible())
+ {
+ // remember last OutDev and set to content
+ OutputDevice* pLastOutputDevice = mpOutputDevice;
+ mpOutputDevice = &aBufferDevice.getTransparence();
+ // paint content to virtual device
+ mpOutputDevice->Erase();
+ process(rCandidate);
+
+ // obtain result as a bitmap
+ auto bitmap = mpOutputDevice->GetBitmapEx(Point(aRange.getMinX(), aRange.getMinY()), Size(aRange.getWidth(), aRange.getHeight()));
+ constexpr double nRadius = 5.0;
+ bitmap.Scale(Size(aRange.getWidth()-nRadius, aRange.getHeight()-nRadius));
+ // use bitmap later as mask
+ auto mask = bitmap.GetBitmap();
+
+ mpOutputDevice = &aBufferDevice.getContent();
+ process(rCandidate);
+ bitmap = mpOutputDevice->GetBitmapEx(Point(aRange.getMinX(), aRange.getMinY()), Size(aRange.getWidth(), aRange.getHeight()));
+ bitmap.Scale(Size(aRange.getWidth()-nRadius, aRange.getHeight()-nRadius));
+
+ // calculate blurry effect
+ BitmapFilterStackBlur glowFilter(nRadius);
+ BitmapFilter::Filter(bitmap, glowFilter);
+ // back to old OutDev
+ mpOutputDevice = pLastOutputDevice;
+ mpOutputDevice->DrawBitmapEx(Point(aRange.getMinX()-nRadius/2, aRange.getMinY()-nRadius/2), BitmapEx(bitmap.GetBitmap(), mask));
+
+ // paint result
+ //aBufferDevice.paint();
+ }
+ else
+ SAL_WARN("drawinglayer", "Temporary buffered virtual device is not visible");
+ }
} // end of namespace
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
index 5c834056c947..fd72efe41d16 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
@@ -39,6 +39,7 @@ class PolygonStrokePrimitive2D;
class FillHatchPrimitive2D;
class BackgroundColorPrimitive2D;
class BorderLinePrimitive2D;
+class GlowPrimitive2D;
}
namespace drawinglayer::processor2d
@@ -93,6 +94,7 @@ class VclPixelProcessor2D final : public VclProcessor2D
processBorderLinePrimitive2D(const drawinglayer::primitive2d::BorderLinePrimitive2D& rBorder);
void processInvertPrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
void processMetaFilePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
+ void processGlowPrimitive2D(const primitive2d::GlowPrimitive2D& rCandidate);
public:
/// constructor/destructor
commit 0208021a66c26e781321b1f49f91d1d6b48dd523
Author: andreas kainz <kainz.a at gmail.com>
AuthorDate: Wed Apr 15 00:21:40 2020 +0200
Commit: andreas_kainz <kainz.a at gmail.com>
CommitDate: Wed Apr 15 01:09:16 2020 +0200
tdf#131787 Update diagrams gallery with real shapes
Change-Id: I9c9f3323be624ef56a917ca54975f66f020e8e51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92234
Tested-by: Jenkins
Reviewed-by: andreas_kainz <kainz.a at gmail.com>
diff --git a/extras/Package_gallmytheme.mk b/extras/Package_gallmytheme.mk
index b19f4e170189..c4e8744ddf44 100644
--- a/extras/Package_gallmytheme.mk
+++ b/extras/Package_gallmytheme.mk
@@ -30,4 +30,7 @@ $(eval $(call gb_Package_add_files,extras_gallmytheme,$(LIBO_SHARE_PRESETS_FOLDE
network.sdg \
network.sdv \
network.thm \
+ diagrams.sdg \
+ diagrams.sdv \
+ diagrams.thm \
))
diff --git a/extras/source/gallery/gallery_mytheme/diagrams.sdg b/extras/source/gallery/gallery_mytheme/diagrams.sdg
new file mode 100644
index 000000000000..882b0b7d23c6
Binary files /dev/null and b/extras/source/gallery/gallery_mytheme/diagrams.sdg differ
diff --git a/extras/source/gallery/gallery_mytheme/diagrams.sdv b/extras/source/gallery/gallery_mytheme/diagrams.sdv
new file mode 100644
index 000000000000..72635ae8ad14
Binary files /dev/null and b/extras/source/gallery/gallery_mytheme/diagrams.sdv differ
diff --git a/extras/source/gallery/gallery_mytheme/diagrams.thm b/extras/source/gallery/gallery_mytheme/diagrams.thm
new file mode 100644
index 000000000000..412bb6632c3d
Binary files /dev/null and b/extras/source/gallery/gallery_mytheme/diagrams.thm differ
commit d0e65ec5d48a1d1febfe6a2a25df2e6916e2a843
Author: andreas kainz <kainz.a at gmail.com>
AuthorDate: Tue Apr 14 23:57:19 2020 +0200
Commit: andreas_kainz <kainz.a at gmail.com>
CommitDate: Wed Apr 15 00:38:37 2020 +0200
Add Area fill bitmap presets
Change-Id: I3093f03d4d43008563fa038c1e49c33009eba289
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92232
Tested-by: Jenkins
Reviewed-by: andreas_kainz <kainz.a at gmail.com>
diff --git a/extras/source/palettes/standard.sob b/extras/source/palettes/standard.sob
index 9fb99079d7a7..1acb3fec453f 100644
Binary files a/extras/source/palettes/standard.sob and b/extras/source/palettes/standard.sob differ
diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index 09d0f5b8d4d3..ee7a4031ade0 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -826,6 +826,20 @@
#define RID_SVXSTR_BMP19 NC_("RID_SVXSTR_BMP19", "Night Sky")
#define RID_SVXSTR_BMP20 NC_("RID_SVXSTR_BMP20", "Pool")
#define RID_SVXSTR_BMP21 NC_("RID_SVXSTR_BMP21", "Bitmap")
+#define RID_SVXSTR_BMP79 NC_("RID_SVXSTR_BMP79", "Invoiced Paper")
+#define RID_SVXSTR_BMP80 NC_("RID_SVXSTR_BMP80", "Concrete")
+#define RID_SVXSTR_BMP81 NC_("RID_SVXSTR_BMP81", "Brick Wall")
+#define RID_SVXSTR_BMP82 NC_("RID_SVXSTR_BMP82", "Stone Wall")
+#define RID_SVXSTR_BMP83 NC_("RID_SVXSTR_BMP83", "Floral")
+#define RID_SVXSTR_BMP84 NC_("RID_SVXSTR_BMP84", "Space")
+#define RID_SVXSTR_BMP85 NC_("RID_SVXSTR_BMP85", "Ice light")
+#define RID_SVXSTR_BMP86 NC_("RID_SVXSTR_BMP86", "Marble")
+#define RID_SVXSTR_BMP87 NC_("RID_SVXSTR_BMP87", "Sand light")
+#define RID_SVXSTR_BMP88 NC_("RID_SVXSTR_BMP88", "Stone")
+#define RID_SVXSTR_BMP89 NC_("RID_SVXSTR_BMP89", "White Diffusion")
+#define RID_SVXSTR_BMP90 NC_("RID_SVXSTR_BMP90", "Surface")
+#define RID_SVXSTR_BMP91 NC_("RID_SVXSTR_BMP91", "Cardboard")
+#define RID_SVXSTR_BMP92 NC_("RID_SVXSTR_BMP92", "Studio")
#define RID_SVXSTR_BMP22 NC_("RID_SVXSTR_BMP22", "5 Percent")
#define RID_SVXSTR_BMP23 NC_("RID_SVXSTR_BMP23", "10 Percent")
#define RID_SVXSTR_BMP24 NC_("RID_SVXSTR_BMP24", "20 Percent")
diff --git a/svx/inc/strings.hxx b/svx/inc/strings.hxx
index 517040ea3701..7c7e5a40ae4c 100644
--- a/svx/inc/strings.hxx
+++ b/svx/inc/strings.hxx
@@ -238,6 +238,20 @@
#define RID_SVXSTR_BMP19_DEF "Night Sky"
#define RID_SVXSTR_BMP20_DEF "Pool"
#define RID_SVXSTR_BMP21_DEF "Bitmap"
+#define RID_SVXSTR_BMP79_DEF "Invoiced Paper"
+#define RID_SVXSTR_BMP80_DEF "Concrete"
+#define RID_SVXSTR_BMP81_DEF "Brick Wall"
+#define RID_SVXSTR_BMP82_DEF "Stone Wall"
+#define RID_SVXSTR_BMP83_DEF "Floral"
+#define RID_SVXSTR_BMP84_DEF "Space"
+#define RID_SVXSTR_BMP85_DEF "Ice light"
+#define RID_SVXSTR_BMP86_DEF "Marble"
+#define RID_SVXSTR_BMP87_DEF "Sand light"
+#define RID_SVXSTR_BMP88_DEF "Stone"
+#define RID_SVXSTR_BMP89_DEF "White Diffusion"
+#define RID_SVXSTR_BMP90_DEF "Surface"
+#define RID_SVXSTR_BMP91_DEF "Cardboard"
+#define RID_SVXSTR_BMP92_DEF "Studio"
// Reference strings for patterns - they are a variation of bitmaps
#define RID_SVXSTR_BMP22_DEF "5 Percent"
#define RID_SVXSTR_BMP23_DEF "10 Percent"
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index 60db1d865e5f..3630ec2d65b2 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -1094,7 +1094,24 @@ static const char* RID_SVXSTR_BMP_DEF[] =
RID_SVXSTR_BMP72_DEF,
RID_SVXSTR_BMP73_DEF,
RID_SVXSTR_BMP74_DEF,
- RID_SVXSTR_BMP75_DEF
+ RID_SVXSTR_BMP75_DEF,
+ RID_SVXSTR_BMP76_DEF,
+ RID_SVXSTR_BMP77_DEF,
+ RID_SVXSTR_BMP78_DEF,
+ RID_SVXSTR_BMP79_DEF,
+ RID_SVXSTR_BMP80_DEF,
+ RID_SVXSTR_BMP81_DEF,
+ RID_SVXSTR_BMP82_DEF,
+ RID_SVXSTR_BMP83_DEF,
+ RID_SVXSTR_BMP84_DEF,
+ RID_SVXSTR_BMP85_DEF,
+ RID_SVXSTR_BMP86_DEF,
+ RID_SVXSTR_BMP87_DEF,
+ RID_SVXSTR_BMP88_DEF,
+ RID_SVXSTR_BMP89_DEF,
+ RID_SVXSTR_BMP90_DEF,
+ RID_SVXSTR_BMP91_DEF,
+ RID_SVXSTR_BMP92_DEF
};
static const char* RID_SVXSTR_BMP[] =
@@ -1174,7 +1191,24 @@ static const char* RID_SVXSTR_BMP[] =
RID_SVXSTR_BMP72,
RID_SVXSTR_BMP73,
RID_SVXSTR_BMP74,
- RID_SVXSTR_BMP75
+ RID_SVXSTR_BMP75,
+ RID_SVXSTR_BMP76,
+ RID_SVXSTR_BMP77,
+ RID_SVXSTR_BMP78,
+ RID_SVXSTR_BMP79,
+ RID_SVXSTR_BMP80,
+ RID_SVXSTR_BMP81,
+ RID_SVXSTR_BMP82,
+ RID_SVXSTR_BMP83,
+ RID_SVXSTR_BMP84,
+ RID_SVXSTR_BMP85,
+ RID_SVXSTR_BMP86,
+ RID_SVXSTR_BMP87,
+ RID_SVXSTR_BMP88,
+ RID_SVXSTR_BMP89,
+ RID_SVXSTR_BMP90,
+ RID_SVXSTR_BMP91,
+ RID_SVXSTR_BMP92
};
static const char* RID_SVXSTR_DASH_DEF[] =
commit 3ee27693301b50cdebd6a47e35b6621f0ac50cfe
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Tue Apr 14 20:45:49 2020 +0200
Commit: Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Wed Apr 15 00:21:54 2020 +0200
tdf#131684: Add unittest
Change-Id: Ic59d922700b4046a1ec94be5365b46dc8a021a00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92226
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
diff --git a/sw/qa/extras/uiwriter/data3/tdf131684.docx b/sw/qa/extras/uiwriter/data3/tdf131684.docx
new file mode 100644
index 000000000000..7d3397dfba60
Binary files /dev/null and b/sw/qa/extras/uiwriter/data3/tdf131684.docx differ
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx
index 2bafcd233e8f..2dc50a068445 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -374,6 +374,37 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf130680)
//CPPUNIT_ASSERT_EQUAL(sal_Int32(23), xIndexAccess->getCount());
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf131684)
+{
+ load(DATA_DIRECTORY, "tdf131684.docx");
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+
+ //Use selectAll 3 times in a row
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+
+ dispatchCommand(mxComponent, ".uno:Paste", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+
+ // without the fix, it crashes
+ dispatchCommand(mxComponent, ".uno:Undo", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+}
+
CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf80663)
{
mxComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
commit 7a5b499dd25d7d1e077974053b52b72ee7f44ebc
Author: Mert Tumer <mert.tumer at collabora.com>
AuthorDate: Fri Apr 3 15:34:37 2020 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Tue Apr 14 23:28:49 2020 +0200
mobile: cannot change linestyle on impress
Change-Id: I6e63c951f7a7d4fc70eed424cc2f7da60dbad9b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91632
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
(cherry picked from commit e4f28d0642e4663d558a55e99ec1cc2ea9ad27ed)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92172
Tested-by: Jenkins
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index 206b6a32e3b3..737979b29a82 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -22,6 +22,7 @@
#include <vcl/uitest/logger.hxx>
#include <comphelper/string.hxx>
+#include <comphelper/lok.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
@@ -995,7 +996,11 @@ ListBoxUIObject::~ListBoxUIObject()
void ListBoxUIObject::execute(const OUString& rAction,
const StringMap& rParameters)
{
- if (!mxListBox->IsEnabled() || !mxListBox->IsReallyVisible())
+ if (!mxListBox->IsEnabled())
+ return;
+
+ bool isTiledRendering = comphelper::LibreOfficeKit::isActive();
+ if (!isTiledRendering && !mxListBox->IsReallyVisible())
return;
if (rAction == "SELECT")
commit 38c5cfa1da8f0a615e479a68f3bcb238395109a8
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sun Apr 12 13:22:26 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Apr 14 23:23:50 2020 +0200
fdo#43157: VclPixelProcessor2D replace OSL_ENSURE with SAL_WARN_IF
Change-Id: I4a6c46f9054f9a32d52f1f60f5f7547e62cf7a5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92223
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 972c08481040..9102230f4305 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -581,7 +581,7 @@ namespace drawinglayer::processor2d
{
// single transparent tools::PolyPolygon identified, use directly
const primitive2d::PolyPolygonColorPrimitive2D* pPoPoColor = static_cast< const primitive2d::PolyPolygonColorPrimitive2D* >(pBasePrimitive);
- OSL_ENSURE(pPoPoColor, "OOps, PrimitiveID and PrimitiveType do not match (!)");
+ SAL_WARN_IF(!pPoPoColor, "drawinglayer", "OOps, PrimitiveID and PrimitiveType do not match (!)");
bDrawTransparentUsed = true;
tryDrawPolyPolygonColorPrimitive2DDirect(*pPoPoColor, rUniTransparenceCandidate.getTransparence());
break;
@@ -590,7 +590,7 @@ namespace drawinglayer::processor2d
{
// single transparent PolygonHairlinePrimitive2D identified, use directly
const primitive2d::PolygonHairlinePrimitive2D* pPoHair = static_cast< const primitive2d::PolygonHairlinePrimitive2D* >(pBasePrimitive);
- OSL_ENSURE(pPoHair, "OOps, PrimitiveID and PrimitiveType do not match (!)");
+ SAL_WARN_IF(!pPoHair, "drawinglayer", "OOps, PrimitiveID and PrimitiveType do not match (!)");
// do no tallow by default - problem is that self-overlapping parts of this geometry will
// not be in an all-same transparency but will already alpha-cover themselves with blending.
@@ -604,7 +604,7 @@ namespace drawinglayer::processor2d
{
// single transparent PolygonStrokePrimitive2D identified, use directly
const primitive2d::PolygonStrokePrimitive2D* pPoStroke = static_cast< const primitive2d::PolygonStrokePrimitive2D* >(pBasePrimitive);
- OSL_ENSURE(pPoStroke, "OOps, PrimitiveID and PrimitiveType do not match (!)");
+ SAL_WARN_IF(!pPoStroke, "drawinglayer", "OOps, PrimitiveID and PrimitiveType do not match (!)");
// do no tallow by default - problem is that self-overlapping parts of this geometry will
// not be in an all-same transparency but will already alpha-cover themselves with blending.
commit b753515b0e6f24193d70dd64506df1b484e65423
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sun Apr 12 13:17:28 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Apr 14 23:23:32 2020 +0200
remove vclpixelprocessor2d.hxx from clang-format blacklist
Change-Id: I5fe33322ff0df5191f57f1364a2d32eefc889d68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92222
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
index 1ee765ab1e51..5c834056c947 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
@@ -24,69 +24,81 @@
#include <memory>
-namespace drawinglayer::primitive2d {
- class PolyPolygonColorPrimitive2D;
- class PolygonHairlinePrimitive2D;
- class PolygonStrokePrimitive2D;
- class WrongSpellPrimitive2D;
- class TextSimplePortionPrimitive;
- class BitmapPrimitive2D;
- class PolyPolygonGradientPrimitive2D;
- class UnifiedTransparencePrimitive2D;
- class ControlPrimitive2D;
- class PolygonStrokePrimitive2D;
- class FillHatchPrimitive2D;
- class BackgroundColorPrimitive2D;
- class BorderLinePrimitive2D;
+namespace drawinglayer::primitive2d
+{
+class PolyPolygonColorPrimitive2D;
+class PolygonHairlinePrimitive2D;
+class PolygonStrokePrimitive2D;
+class WrongSpellPrimitive2D;
+class TextSimplePortionPrimitive;
+class BitmapPrimitive2D;
+class PolyPolygonGradientPrimitive2D;
+class UnifiedTransparencePrimitive2D;
+class ControlPrimitive2D;
+class PolygonStrokePrimitive2D;
+class FillHatchPrimitive2D;
+class BackgroundColorPrimitive2D;
+class BorderLinePrimitive2D;
}
namespace drawinglayer::processor2d
{
- /** VclPixelProcessor2D class
+/** VclPixelProcessor2D class
- This processor derived from VclProcessor2D is the base class for rendering
- all fed primitives to a VCL Window. It is the currently used renderer
- for all VCL editing output from the DrawingLayer.
- */
- class VclPixelProcessor2D final : public VclProcessor2D
- {
- struct Impl;
- std::unique_ptr<Impl> m_pImpl;
+ This processor derived from VclProcessor2D is the base class for rendering
+ all fed primitives to a VCL Window. It is the currently used renderer
+ for all VCL editing output from the DrawingLayer.
+ */
+class VclPixelProcessor2D final : public VclProcessor2D
+{
+ struct Impl;
+ std::unique_ptr<Impl> m_pImpl;
- /* the local processor for BasePrimitive2D-Implementation based primitives,
- called from the common process()-implementation
- */
- virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) override;
+ /* the local processor for BasePrimitive2D-Implementation based primitives,
+ called from the common process()-implementation
+ */
+ virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) override;
- // some helpers to try direct paints (shortcuts)
- void tryDrawPolyPolygonColorPrimitive2DDirect(const drawinglayer::primitive2d::PolyPolygonColorPrimitive2D& rSource, double fTransparency);
- bool tryDrawPolygonHairlinePrimitive2DDirect(const drawinglayer::primitive2d::PolygonHairlinePrimitive2D& rSource, double fTransparency);
- bool tryDrawPolygonStrokePrimitive2DDirect(const drawinglayer::primitive2d::PolygonStrokePrimitive2D& rSource, double fTransparency);
+ // some helpers to try direct paints (shortcuts)
+ void tryDrawPolyPolygonColorPrimitive2DDirect(
+ const primitive2d::PolyPolygonColorPrimitive2D& rSource, double fTransparency);
+ bool
+ tryDrawPolygonHairlinePrimitive2DDirect(const primitive2d::PolygonHairlinePrimitive2D& rSource,
+ double fTransparency);
+ bool tryDrawPolygonStrokePrimitive2DDirect(const primitive2d::PolygonStrokePrimitive2D& rSource,
+ double fTransparency);
- void processWrongSpellPrimitive2D(const primitive2d::WrongSpellPrimitive2D& rWrongSpellPrimitive);
- void processTextSimplePortionPrimitive2D(const primitive2d::TextSimplePortionPrimitive2D& rCandidate);
- void processTextDecoratedPortionPrimitive2D(const primitive2d::TextSimplePortionPrimitive2D& rCandidate);
- void processPolygonHairlinePrimitive2D(const primitive2d::PolygonHairlinePrimitive2D& rPolygonHairlinePrimitive2D);
- void processBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate);
- void processPolyPolygonGradientPrimitive2D(const primitive2d::PolyPolygonGradientPrimitive2D& rPolygonCandidate);
- void processPolyPolygonColorPrimitive2D(const primitive2d::PolyPolygonColorPrimitive2D& rPolyPolygonColorPrimitive2D);
- void processUnifiedTransparencePrimitive2D(const primitive2d::UnifiedTransparencePrimitive2D& rUniTransparenceCandidate);
- void processControlPrimitive2D(const primitive2d::ControlPrimitive2D& rControlPrimitive);
- void processPolygonStrokePrimitive2D(const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokePrimitive2D);
- void processFillHatchPrimitive2D(const primitive2d::FillHatchPrimitive2D& rFillHatchPrimitive);
- void processBackgroundColorPrimitive2D(const primitive2d::BackgroundColorPrimitive2D& rPrimitive);
- void processBorderLinePrimitive2D(const drawinglayer::primitive2d::BorderLinePrimitive2D& rBorder);
- void processInvertPrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
- void processMetaFilePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
+ void
+ processWrongSpellPrimitive2D(const primitive2d::WrongSpellPrimitive2D& rWrongSpellPrimitive);
+ void processTextSimplePortionPrimitive2D(
+ const primitive2d::TextSimplePortionPrimitive2D& rCandidate);
+ void processTextDecoratedPortionPrimitive2D(
+ const primitive2d::TextSimplePortionPrimitive2D& rCandidate);
+ void processPolygonHairlinePrimitive2D(
+ const primitive2d::PolygonHairlinePrimitive2D& rPolygonHairlinePrimitive2D);
+ void processBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate);
+ void processPolyPolygonGradientPrimitive2D(
+ const primitive2d::PolyPolygonGradientPrimitive2D& rPolygonCandidate);
+ void processPolyPolygonColorPrimitive2D(
+ const primitive2d::PolyPolygonColorPrimitive2D& rPolyPolygonColorPrimitive2D);
+ void processUnifiedTransparencePrimitive2D(
+ const primitive2d::UnifiedTransparencePrimitive2D& rUniTransparenceCandidate);
+ void processControlPrimitive2D(const primitive2d::ControlPrimitive2D& rControlPrimitive);
+ void processPolygonStrokePrimitive2D(
+ const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokePrimitive2D);
+ void processFillHatchPrimitive2D(const primitive2d::FillHatchPrimitive2D& rFillHatchPrimitive);
+ void
+ processBackgroundColorPrimitive2D(const primitive2d::BackgroundColorPrimitive2D& rPrimitive);
+ void
+ processBorderLinePrimitive2D(const drawinglayer::primitive2d::BorderLinePrimitive2D& rBorder);
+ void processInvertPrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
+ void processMetaFilePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
- public:
- /// constructor/destructor
- VclPixelProcessor2D(
- const geometry::ViewInformation2D& rViewInformation,
- OutputDevice& rOutDev);
- virtual ~VclPixelProcessor2D() override;
- };
+public:
+ /// constructor/destructor
+ VclPixelProcessor2D(const geometry::ViewInformation2D& rViewInformation, OutputDevice& rOutDev);
+ virtual ~VclPixelProcessor2D() override;
+};
} // end of namespace drawinglayer::processor2d
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 7da40d322789..d92622eb77a1 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -3757,7 +3757,6 @@ drawinglayer/source/processor2d/vclhelperbufferdevice.hxx
drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx
drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
-drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
drawinglayer/source/processor2d/vclprocessor2d.cxx
drawinglayer/source/processor3d/baseprocessor3d.cxx
drawinglayer/source/processor3d/cutfindprocessor3d.cxx
commit 53d7d35b6b065ced89a7533afbea710e8c5b99bc
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sun Apr 12 13:09:36 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Apr 14 23:23:17 2020 +0200
remove vclprocessor2d.hxx from clang-format blacklist
Change-Id: I4fda4b3431c63d5870f074be15cff6064dc1ff95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92221
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.hxx b/drawinglayer/source/processor2d/vclprocessor2d.hxx
index 73cf8d5b1a8d..3b1b997a7cc4 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.hxx
@@ -27,99 +27,111 @@
class OutputDevice;
-namespace drawinglayer::primitive2d {
- class TextSimplePortionPrimitive2D;
- class PolygonHairlinePrimitive2D;
- class BitmapPrimitive2D;
- class FillGraphicPrimitive2D;
- class PolyPolygonGradientPrimitive2D;
- class PolyPolygonGraphicPrimitive2D;
- class MetafilePrimitive2D;
- class MaskPrimitive2D;
- class UnifiedTransparencePrimitive2D;
- class TransparencePrimitive2D;
- class TransformPrimitive2D;
- class MarkerArrayPrimitive2D;
- class PointArrayPrimitive2D;
- class ModifiedColorPrimitive2D;
- class PolygonStrokePrimitive2D;
- class ControlPrimitive2D;
- class PagePreviewPrimitive2D;
- class EpsPrimitive2D;
- class ObjectInfoPrimitive2D;
- class SvgLinearAtomPrimitive2D;
- class SvgRadialAtomPrimitive2D;
+namespace drawinglayer::primitive2d
+{
+class TextSimplePortionPrimitive2D;
+class PolygonHairlinePrimitive2D;
+class BitmapPrimitive2D;
+class FillGraphicPrimitive2D;
+class PolyPolygonGradientPrimitive2D;
+class PolyPolygonGraphicPrimitive2D;
+class MetafilePrimitive2D;
+class MaskPrimitive2D;
+class UnifiedTransparencePrimitive2D;
+class TransparencePrimitive2D;
+class TransformPrimitive2D;
+class MarkerArrayPrimitive2D;
+class PointArrayPrimitive2D;
+class ModifiedColorPrimitive2D;
+class PolygonStrokePrimitive2D;
+class ControlPrimitive2D;
+class PagePreviewPrimitive2D;
+class EpsPrimitive2D;
+class ObjectInfoPrimitive2D;
+class SvgLinearAtomPrimitive2D;
+class SvgRadialAtomPrimitive2D;
}
namespace drawinglayer::processor2d
{
- /** VclProcessor2D class
-
- This processor is the base class for VCL-Based processors. It has no
- processBasePrimitive2D implementation and thus is not usable directly.
- */
- class VclProcessor2D : public BaseProcessor2D
- {
- protected:
- // the destination OutDev
- VclPtr<OutputDevice> mpOutputDevice;
-
- // the modifiedColorPrimitive stack
- basegfx::BColorModifierStack maBColorModifierStack;
-
- // the current transformation. Since VCL pixel renderer transforms to pixels
- // and VCL MetaFile renderer to World (logic) coordinates, the local
- // ViewInformation2D cannot directly be used, but needs to be kept up to date
- basegfx::B2DHomMatrix maCurrentTransformation;
-
- // SvtOptionsDrawinglayer incarnation to react on diverse settings
- const SvtOptionsDrawinglayer maDrawinglayerOpt;
-
- // stack value (increment and decrement) to count how deep we are in
- // PolygonStrokePrimitive2D's decompositions (normally only one)
- sal_uInt32 mnPolygonStrokePrimitive2D;
-
- // currently used ObjectInfoPrimitive2D
- const primitive2d::ObjectInfoPrimitive2D* mpObjectInfoPrimitive2D;
-
- // common VCL rendering support
- void RenderTextSimpleOrDecoratedPortionPrimitive2D(const primitive2d::TextSimplePortionPrimitive2D& rTextCandidate);
- void RenderPolygonHairlinePrimitive2D(const primitive2d::PolygonHairlinePrimitive2D& rPolygonCandidate, bool bPixelBased);
- void RenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate);
- void RenderFillGraphicPrimitive2D(const primitive2d::FillGraphicPrimitive2D& rFillBitmapCandidate);
- void RenderPolyPolygonGraphicPrimitive2D(const primitive2d::PolyPolygonGraphicPrimitive2D& rPolygonCandidate);
- void RenderMaskPrimitive2DPixel(const primitive2d::MaskPrimitive2D& rMaskCandidate);
- void RenderModifiedColorPrimitive2D(const primitive2d::ModifiedColorPrimitive2D& rModifiedCandidate);
- void RenderUnifiedTransparencePrimitive2D(const primitive2d::UnifiedTransparencePrimitive2D& rTransCandidate);
- void RenderTransparencePrimitive2D(const primitive2d::TransparencePrimitive2D& rTransCandidate);
- void RenderTransformPrimitive2D(const primitive2d::TransformPrimitive2D& rTransformCandidate);
- void RenderPagePreviewPrimitive2D(const primitive2d::PagePreviewPrimitive2D& rPagePreviewCandidate);
- void RenderMarkerArrayPrimitive2D(const primitive2d::MarkerArrayPrimitive2D& rMarkerArrayCandidate);
- void RenderPointArrayPrimitive2D(const primitive2d::PointArrayPrimitive2D& rPointArrayCandidate);
- void RenderPolygonStrokePrimitive2D(const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokeCandidate);
- void RenderEpsPrimitive2D(const primitive2d::EpsPrimitive2D& rEpsPrimitive2D);
- void RenderObjectInfoPrimitive2D(const primitive2d::ObjectInfoPrimitive2D& rObjectInfoPrimitive2D);
- void RenderSvgLinearAtomPrimitive2D(const primitive2d::SvgLinearAtomPrimitive2D& rCandidate);
- void RenderSvgRadialAtomPrimitive2D(const primitive2d::SvgRadialAtomPrimitive2D& rCandidate);
-
- // DrawMode adaptation support
- void adaptLineToFillDrawMode() const;
- void adaptTextToFillDrawMode() const;
-
- public:
- // constructor/destructor
- VclProcessor2D(
- const geometry::ViewInformation2D& rViewInformation,
- OutputDevice& rOutDev);
- virtual ~VclProcessor2D() override;
-
- // access to Drawinglayer configuration options
- const SvtOptionsDrawinglayer& getOptionsDrawinglayer() const { return maDrawinglayerOpt; }
-
- // access to currently used ObjectInfoPrimitive2D
- const primitive2d::ObjectInfoPrimitive2D* getObjectInfoPrimitive2D() const { return mpObjectInfoPrimitive2D; }
- };
-} // end of namespace drawinglayer::processor2d
+/** VclProcessor2D class
+ This processor is the base class for VCL-Based processors. It has no
+ processBasePrimitive2D implementation and thus is not usable directly.
+ */
+class VclProcessor2D : public BaseProcessor2D
+{
+protected:
+ // the destination OutDev
+ VclPtr<OutputDevice> mpOutputDevice;
+
+ // the modifiedColorPrimitive stack
+ basegfx::BColorModifierStack maBColorModifierStack;
+
+ // the current transformation. Since VCL pixel renderer transforms to pixels
+ // and VCL MetaFile renderer to World (logic) coordinates, the local
+ // ViewInformation2D cannot directly be used, but needs to be kept up to date
+ basegfx::B2DHomMatrix maCurrentTransformation;
+
+ // SvtOptionsDrawinglayer incarnation to react on diverse settings
+ const SvtOptionsDrawinglayer maDrawinglayerOpt;
+
+ // stack value (increment and decrement) to count how deep we are in
+ // PolygonStrokePrimitive2D's decompositions (normally only one)
+ sal_uInt32 mnPolygonStrokePrimitive2D;
+
+ // currently used ObjectInfoPrimitive2D
+ const primitive2d::ObjectInfoPrimitive2D* mpObjectInfoPrimitive2D;
+
+ // common VCL rendering support
+ void RenderTextSimpleOrDecoratedPortionPrimitive2D(
+ const primitive2d::TextSimplePortionPrimitive2D& rTextCandidate);
+ void RenderPolygonHairlinePrimitive2D(
+ const primitive2d::PolygonHairlinePrimitive2D& rPolygonCandidate, bool bPixelBased);
+ void RenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate);
+ void
+ RenderFillGraphicPrimitive2D(const primitive2d::FillGraphicPrimitive2D& rFillBitmapCandidate);
+ void RenderPolyPolygonGraphicPrimitive2D(
+ const primitive2d::PolyPolygonGraphicPrimitive2D& rPolygonCandidate);
+ void RenderMaskPrimitive2DPixel(const primitive2d::MaskPrimitive2D& rMaskCandidate);
+ void
+ RenderModifiedColorPrimitive2D(const primitive2d::ModifiedColorPrimitive2D& rModifiedCandidate);
+ void RenderUnifiedTransparencePrimitive2D(
+ const primitive2d::UnifiedTransparencePrimitive2D& rTransCandidate);
+ void RenderTransparencePrimitive2D(const primitive2d::TransparencePrimitive2D& rTransCandidate);
+ void RenderTransformPrimitive2D(const primitive2d::TransformPrimitive2D& rTransformCandidate);
+ void
+ RenderPagePreviewPrimitive2D(const primitive2d::PagePreviewPrimitive2D& rPagePreviewCandidate);
+ void
+ RenderMarkerArrayPrimitive2D(const primitive2d::MarkerArrayPrimitive2D& rMarkerArrayCandidate);
+ void
+ RenderPointArrayPrimitive2D(const primitive2d::PointArrayPrimitive2D& rPointArrayCandidate);
+ void RenderPolygonStrokePrimitive2D(
+ const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokeCandidate);
+ void RenderEpsPrimitive2D(const primitive2d::EpsPrimitive2D& rEpsPrimitive2D);
+ void
+ RenderObjectInfoPrimitive2D(const primitive2d::ObjectInfoPrimitive2D& rObjectInfoPrimitive2D);
+ void RenderSvgLinearAtomPrimitive2D(const primitive2d::SvgLinearAtomPrimitive2D& rCandidate);
+ void RenderSvgRadialAtomPrimitive2D(const primitive2d::SvgRadialAtomPrimitive2D& rCandidate);
+
+ // DrawMode adaptation support
+ void adaptLineToFillDrawMode() const;
+ void adaptTextToFillDrawMode() const;
+
+public:
+ // constructor/destructor
+ VclProcessor2D(const geometry::ViewInformation2D& rViewInformation, OutputDevice& rOutDev);
+ virtual ~VclProcessor2D() override;
+
+ // access to Drawinglayer configuration options
+ const SvtOptionsDrawinglayer& getOptionsDrawinglayer() const { return maDrawinglayerOpt; }
+
+ // access to currently used ObjectInfoPrimitive2D
+ const primitive2d::ObjectInfoPrimitive2D* getObjectInfoPrimitive2D() const
+ {
+ return mpObjectInfoPrimitive2D;
+ }
+};
+} // end of namespace drawinglayer::processor2d
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 58eb54478155..7da40d322789 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -3759,7 +3759,6 @@ drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx
drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
drawinglayer/source/processor2d/vclprocessor2d.cxx
-drawinglayer/source/processor2d/vclprocessor2d.hxx
drawinglayer/source/processor3d/baseprocessor3d.cxx
drawinglayer/source/processor3d/cutfindprocessor3d.cxx
drawinglayer/source/processor3d/defaultprocessor3d.cxx
commit c32844c53a33bc41beeaea4acf7e62d0a0001aa0
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sun Apr 12 13:05:17 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Apr 14 23:23:01 2020 +0200
clean-up namespaces and pragma once for VclPixelProcessor2D
Change-Id: I34fa0dc5cadbdfff8f70171715bc7cff462f7034
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92220
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
index b1c7c47c2386..1ee765ab1e51 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
@@ -17,18 +17,14 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_DRAWINGLAYER_SOURCE_PROCESSOR2D_VCLPIXELPROCESSOR2D_HXX
-#define INCLUDED_DRAWINGLAYER_SOURCE_PROCESSOR2D_VCLPIXELPROCESSOR2D_HXX
+#pragma once
#include "vclprocessor2d.hxx"
#include <vcl/outdev.hxx>
#include <memory>
-
-// predefines
-
-namespace drawinglayer { namespace primitive2d {
+namespace drawinglayer::primitive2d {
class PolyPolygonColorPrimitive2D;
class PolygonHairlinePrimitive2D;
class PolygonStrokePrimitive2D;
@@ -42,12 +38,10 @@ namespace drawinglayer { namespace primitive2d {
class FillHatchPrimitive2D;
class BackgroundColorPrimitive2D;
class BorderLinePrimitive2D;
-}}
+}
-namespace drawinglayer
+namespace drawinglayer::processor2d
{
- namespace processor2d
- {
/** VclPixelProcessor2D class
This processor derived from VclProcessor2D is the base class for rendering
@@ -92,10 +86,7 @@ namespace drawinglayer
OutputDevice& rOutDev);
virtual ~VclPixelProcessor2D() override;
};
- } // end of namespace processor2d
-} // end of namespace drawinglayer
-
+} // end of namespace drawinglayer::processor2d
-#endif // INCLUDED_DRAWINGLAYER_SOURCE_PROCESSOR2D_VCLPIXELPROCESSOR2D_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 5163eccc8be832fdc5eee5fd8d66549550e5f53d
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sun Apr 12 13:04:55 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Tue Apr 14 23:22:42 2020 +0200
clean-up namespaces and pragma once for VclProcessor2D
Change-Id: I9518a0bc6c30e0a544a52f1e996bfe8195e63cdf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92219
Tested-by: Tomaž Vajngerl <quikee at gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.hxx b/drawinglayer/source/processor2d/vclprocessor2d.hxx
index 46b9682d1383..73cf8d5b1a8d 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_DRAWINGLAYER_SOURCE_PROCESSOR2D_VCLPROCESSOR2D_HXX
-#define INCLUDED_DRAWINGLAYER_SOURCE_PROCESSOR2D_VCLPROCESSOR2D_HXX
+#pragma once
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
@@ -26,11 +25,9 @@
#include <svtools/optionsdrawinglayer.hxx>
#include <vcl/vclptr.hxx>
-
-// predefines
class OutputDevice;
-namespace drawinglayer { namespace primitive2d {
+namespace drawinglayer::primitive2d {
class TextSimplePortionPrimitive2D;
class PolygonHairlinePrimitive2D;
class BitmapPrimitive2D;
@@ -52,13 +49,10 @@ namespace drawinglayer { namespace primitive2d {
class ObjectInfoPrimitive2D;
class SvgLinearAtomPrimitive2D;
class SvgRadialAtomPrimitive2D;
-}}
-
+}
-namespace drawinglayer
+namespace drawinglayer::processor2d
{
- namespace processor2d
- {
/** VclProcessor2D class
This processor is the base class for VCL-Based processors. It has no
@@ -125,10 +119,7 @@ namespace drawinglayer
// access to currently used ObjectInfoPrimitive2D
const primitive2d::ObjectInfoPrimitive2D* getObjectInfoPrimitive2D() const { return mpObjectInfoPrimitive2D; }
};
- } // end of namespace processor2d
-} // end of namespace drawinglayer
-
+} // end of namespace drawinglayer::processor2d
-#endif // INCLUDED_DRAWINGLAYER_SOURCE_PROCESSOR2D_VCLPROCESSOR2D_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 4a581f12e0d0fa105f053904300b729acb18194a
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Tue Apr 14 19:57:17 2020 +0200
Commit: Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Tue Apr 14 22:20:13 2020 +0200
tdf#130960: Add UItest
Change-Id: I41f5bd8c8b9183138b673a5f40d8a29abe9874df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92218
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
diff --git a/sc/qa/uitest/calc_tests/data/tdf130960.odt b/sc/qa/uitest/calc_tests/data/tdf130960.odt
new file mode 100644
index 000000000000..2a08fa54b7a1
Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf130960.odt differ
diff --git a/sc/qa/uitest/calc_tests4/trackedChanges.py b/sc/qa/uitest/calc_tests4/trackedChanges.py
index 13cdb1319088..ca446e66d0a2 100644
--- a/sc/qa/uitest/calc_tests4/trackedChanges.py
+++ b/sc/qa/uitest/calc_tests4/trackedChanges.py
@@ -11,10 +11,40 @@ from libreoffice.calc.document import get_cell_by_position
from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.calc import enter_text_to_cell
from uitest.uihelper.common import get_state_as_dict
+from uitest.path import get_srcdir_url
import datetime
+
+def get_url_for_data_file(file_name):
+ return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name
+
class CalcTrackedChanges(UITestCase):
+ def test_tdf131907(self):
+ calc_doc = self.ui_test.load_file(get_url_for_data_file("tdf130960.odt"))
+ xCalcDoc = self.xUITest.getTopFocusWindow()
+ self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptChanges")
+ xTrackDlg = self.xUITest.getTopFocusWindow()
+
+ xChangesList = xTrackDlg.getChild("calcchanges")
+ self.assertEqual(1, len(xChangesList.getChildren()))
+
+ text = "Row inserted \tSheet1.1:1\t \t04/05/2020 17:01:10\t (Row 1:1 inserted)"
+ self.assertEqual(get_state_as_dict(xChangesList.getChild('0'))["Text"], text)
+
+ #it would crash here
+ xRejBtn = xTrackDlg.getChild("reject")
+ xRejBtn.executeAction("CLICK", tuple())
+
+ self.assertEqual(2, len(xChangesList.getChildren()))
+ self.assertEqual(get_state_as_dict(xChangesList.getChild('0'))["Text"], "Accepted")
+ self.assertEqual(get_state_as_dict(xChangesList.getChild('1'))["Text"], "Rejected")
+
+ xCancBtn = xTrackDlg.getChild("close")
+ xCancBtn.executeAction("CLICK", tuple())
+
+ self.ui_test.close_doc()
+
def test_tdf66263_Protect_Records(self):
calc_doc = self.ui_test.create_doc_in_start_center("calc")
xCalcDoc = self.xUITest.getTopFocusWindow()
commit 39f45e8a0f04fb5f8641d57fbc09c531987967e8
Author: andreas kainz <kainz.a at gmail.com>
AuthorDate: Tue Apr 14 16:14:04 2020 +0200
Commit: andreas_kainz <kainz.a at gmail.com>
CommitDate: Tue Apr 14 22:08:12 2020 +0200
tdf#131308 add network gallery
Change-Id: I808d4e7dbc68e4962bf8c8fd1dfc045f9058ebed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92199
Tested-by: Jenkins
Reviewed-by: andreas_kainz <kainz.a at gmail.com>
diff --git a/extras/Package_gallmytheme.mk b/extras/Package_gallmytheme.mk
index 7cfce91a3ad6..b19f4e170189 100644
--- a/extras/Package_gallmytheme.mk
+++ b/extras/Package_gallmytheme.mk
@@ -27,4 +27,7 @@ $(eval $(call gb_Package_add_files,extras_gallmytheme,$(LIBO_SHARE_PRESETS_FOLDE
shapes.sdg \
shapes.sdv \
shapes.thm \
+ network.sdg \
+ network.sdv \
+ network.thm \
))
diff --git a/extras/source/gallery/gallery_mytheme/network.sdg b/extras/source/gallery/gallery_mytheme/network.sdg
new file mode 100644
index 000000000000..78701a42e87b
Binary files /dev/null and b/extras/source/gallery/gallery_mytheme/network.sdg differ
diff --git a/extras/source/gallery/gallery_mytheme/network.sdv b/extras/source/gallery/gallery_mytheme/network.sdv
new file mode 100644
index 000000000000..b64111dcf12a
Binary files /dev/null and b/extras/source/gallery/gallery_mytheme/network.sdv differ
diff --git a/extras/source/gallery/gallery_mytheme/network.thm b/extras/source/gallery/gallery_mytheme/network.thm
new file mode 100644
index 000000000000..5387602bdc63
Binary files /dev/null and b/extras/source/gallery/gallery_mytheme/network.thm differ
commit e185830c823c62926aeaee5842db6495706fe231
Author: andreas kainz <kainz.a at gmail.com>
AuthorDate: Tue Apr 14 16:14:53 2020 +0200
Commit: andreas_kainz <kainz.a at gmail.com>
CommitDate: Tue Apr 14 22:07:42 2020 +0200
add more icon gallery shapes
Change-Id: Ia5c536cff68c3da5dbcbc95928afdf8c37205ad2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92200
Tested-by: Jenkins
Reviewed-by: andreas_kainz <kainz.a at gmail.com>
diff --git a/extras/source/gallery/gallery_mytheme/icons.sdg b/extras/source/gallery/gallery_mytheme/icons.sdg
index 4ac5fbcfbdec..f135a13d9892 100644
Binary files a/extras/source/gallery/gallery_mytheme/icons.sdg and b/extras/source/gallery/gallery_mytheme/icons.sdg differ
diff --git a/extras/source/gallery/gallery_mytheme/icons.sdv b/extras/source/gallery/gallery_mytheme/icons.sdv
index 2c320ff29618..cb6dfbb34530 100644
Binary files a/extras/source/gallery/gallery_mytheme/icons.sdv and b/extras/source/gallery/gallery_mytheme/icons.sdv differ
diff --git a/extras/source/gallery/gallery_mytheme/icons.thm b/extras/source/gallery/gallery_mytheme/icons.thm
index bd44166b44a2..b26e8ee9e219 100644
Binary files a/extras/source/gallery/gallery_mytheme/icons.thm and b/extras/source/gallery/gallery_mytheme/icons.thm differ
commit b752631d18b5c8d68616de8eb4a5f28bd751b748
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Tue Apr 14 19:19:37 2020 +0200
Commit: Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Tue Apr 14 21:03:57 2020 +0200
uitest: improve tests in trackedChanges.py
Change-Id: I644a6e64ab7da002915a43745a35517a144b6cf5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92217
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
diff --git a/sc/qa/uitest/calc_tests4/trackedChanges.py b/sc/qa/uitest/calc_tests4/trackedChanges.py
index 2cc737ae18e0..13cdb1319088 100644
--- a/sc/qa/uitest/calc_tests4/trackedChanges.py
+++ b/sc/qa/uitest/calc_tests4/trackedChanges.py
@@ -8,9 +8,10 @@
from uitest.framework import UITestCase
from uitest.debug import sleep
from libreoffice.calc.document import get_cell_by_position
-import time
from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.uihelper.calc import enter_text_to_cell
+from uitest.uihelper.common import get_state_as_dict
+import datetime
class CalcTrackedChanges(UITestCase):
@@ -48,11 +49,45 @@ class CalcTrackedChanges(UITestCase):
#track changes; enter text to cell
self.xUITest.executeCommand(".uno:TraceChangeMode")
enter_text_to_cell(gridwin, "A1", "Test LibreOffice")
+ enter_text_to_cell(gridwin, "A2", "Test LibreOffice")
#accept tracked changes
self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptChanges")
xTrackDlg = self.xUITest.getTopFocusWindow()
+
+ xChangesList = xTrackDlg.getChild("calcchanges")
+ self.assertEqual(2, len(xChangesList.getChildren()))
+
+ textStart = "Changed contents\tSheet1.A1\t \t" + datetime.datetime.now().strftime("%m/%d/%Y")
+ textEnd = "(Cell A1 changed from '<empty>' to 'Test LibreOffice')"
+ textStart2 = "Changed contents\tSheet1.A2\t \t" + datetime.datetime.now().strftime("%m/%d/%Y")
+ textEnd2 = "(Cell A2 changed from '<empty>' to 'Test LibreOffice')"
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0'))["Text"].startswith(textStart))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0'))["Text"].endswith(textEnd))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('1'))["Text"].startswith(textStart2))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('1'))["Text"].endswith(textEnd2))
+
xAccBtn = xTrackDlg.getChild("accept")
xAccBtn.executeAction("CLICK", tuple())
+
+ self.assertEqual(2, len(xChangesList.getChildren()))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0'))["Text"].startswith(textStart2))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0'))["Text"].endswith(textEnd2))
+ self.assertEqual(get_state_as_dict(xChangesList.getChild('1'))["Text"], "Accepted")
+
+ xAccBtn = xTrackDlg.getChild("accept")
+ xAccBtn.executeAction("CLICK", tuple())
+
+ self.assertEqual(1, len(xChangesList.getChildren()))
+ self.assertEqual(get_state_as_dict(xChangesList.getChild('0'))["Text"], "Accepted")
+ xChangesList.getChild('0').executeAction("EXPAND", tuple())
+
+ self.assertEqual(2, len(xChangesList.getChild('0').getChildren()))
+
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0').getChild('0'))["Text"].startswith(textStart))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0').getChild('0'))["Text"].endswith(textEnd))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0').getChild('1'))["Text"].startswith(textStart2))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0').getChild('1'))["Text"].endswith(textEnd2))
+
xCancBtn = xTrackDlg.getChild("close")
xCancBtn.executeAction("CLICK", tuple())
@@ -68,12 +103,37 @@ class CalcTrackedChanges(UITestCase):
#track changes; enter text to cell
self.xUITest.executeCommand(".uno:TraceChangeMode")
enter_text_to_cell(gridwin, "A1", "Test LibreOffice")
+ enter_text_to_cell(gridwin, "A2", "Test LibreOffice")
#accept All tracked changes
self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptChanges")
xTrackDlg = self.xUITest.getTopFocusWindow()
+ xChangesList = xTrackDlg.getChild("calcchanges")
+ self.assertEqual(2, len(xChangesList.getChildren()))
+
+ textStart = "Changed contents\tSheet1.A1\t \t" + datetime.datetime.now().strftime("%m/%d/%Y")
+ textEnd = "(Cell A1 changed from '<empty>' to 'Test LibreOffice')"
+ textStart2 = "Changed contents\tSheet1.A2\t \t" + datetime.datetime.now().strftime("%m/%d/%Y")
+ textEnd2 = "(Cell A2 changed from '<empty>' to 'Test LibreOffice')"
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0'))["Text"].startswith(textStart))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0'))["Text"].endswith(textEnd))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('1'))["Text"].startswith(textStart2))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('1'))["Text"].endswith(textEnd2))
+
xAccBtn = xTrackDlg.getChild("acceptall")
xAccBtn.executeAction("CLICK", tuple())
+
+ self.assertEqual(1, len(xChangesList.getChildren()))
+ self.assertEqual(get_state_as_dict(xChangesList.getChild('0'))["Text"], "Accepted")
+ xChangesList.getChild('0').executeAction("EXPAND", tuple())
+
+ self.assertEqual(2, len(xChangesList.getChild('0').getChildren()))
+
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0').getChild('0'))["Text"].startswith(textStart))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0').getChild('0'))["Text"].endswith(textEnd))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0').getChild('1'))["Text"].startswith(textStart2))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0').getChild('1'))["Text"].endswith(textEnd2))
+
xCancBtn = xTrackDlg.getChild("close")
xCancBtn.executeAction("CLICK", tuple())
@@ -89,12 +149,57 @@ class CalcTrackedChanges(UITestCase):
#track changes; enter text to cell
self.xUITest.executeCommand(".uno:TraceChangeMode")
enter_text_to_cell(gridwin, "A1", "Test LibreOffice")
+ enter_text_to_cell(gridwin, "A2", "Test LibreOffice")
#accept tracked changes
self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptChanges")
xTrackDlg = self.xUITest.getTopFocusWindow()
+ xChangesList = xTrackDlg.getChild("calcchanges")
+ self.assertEqual(2, len(xChangesList.getChildren()))
+
+ textStart = "Changed contents\tSheet1.A1\t \t" + datetime.datetime.now().strftime("%m/%d/%Y")
+ textEnd = "(Cell A1 changed from '<empty>' to 'Test LibreOffice')"
+ textStart2 = "Changed contents\tSheet1.A2\t \t" + datetime.datetime.now().strftime("%m/%d/%Y")
+ textEnd2 = "(Cell A2 changed from '<empty>' to 'Test LibreOffice')"
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0'))["Text"].startswith(textStart))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0'))["Text"].endswith(textEnd))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('1'))["Text"].startswith(textStart2))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('1'))["Text"].endswith(textEnd2))
+
xRejBtn = xTrackDlg.getChild("reject")
xRejBtn.executeAction("CLICK", tuple())
+
+ self.assertEqual(3, len(xChangesList.getChildren()))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0'))["Text"].startswith(textStart2))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0'))["Text"].endswith(textEnd2))
+ self.assertEqual(get_state_as_dict(xChangesList.getChild('1'))["Text"], "Accepted")
+ self.assertEqual(get_state_as_dict(xChangesList.getChild('2'))["Text"], "Rejected")
+
+ xAccBtn = xTrackDlg.getChild("reject")
+ xAccBtn.executeAction("CLICK", tuple())
+
+ self.assertEqual(2, len(xChangesList.getChildren()))
+ self.assertEqual(get_state_as_dict(xChangesList.getChild('0'))["Text"], "Accepted")
+ self.assertEqual(get_state_as_dict(xChangesList.getChild('1'))["Text"], "Rejected")
+
+ xChangesList.getChild('0').executeAction("EXPAND", tuple())
+ self.assertEqual(2, len(xChangesList.getChild('0').getChildren()))
+
+ textEnd3 = "(Cell A1 changed from 'Test LibreOffice' to '<empty>')"
+ textEnd4 = "(Cell A2 changed from 'Test LibreOffice' to '<empty>')"
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0').getChild('0'))["Text"].startswith(textStart))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0').getChild('0'))["Text"].endswith(textEnd3))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0').getChild('1'))["Text"].startswith(textStart2))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0').getChild('1'))["Text"].endswith(textEnd4))
+
+ xChangesList.getChild('1').executeAction("EXPAND", tuple())
+ self.assertEqual(2, len(xChangesList.getChild('1').getChildren()))
+
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('1').getChild('0'))["Text"].startswith(textStart))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('1').getChild('0'))["Text"].endswith(textEnd))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('1').getChild('1'))["Text"].startswith(textStart2))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('1').getChild('1'))["Text"].endswith(textEnd2))
+
xCancBtn = xTrackDlg.getChild("close")
xCancBtn.executeAction("CLICK", tuple())
@@ -103,8 +208,6 @@ class CalcTrackedChanges(UITestCase):
def test_tracked_changes_rejectall(self):
- # FIXME flaky test, passed once, but broke multiple times.
- return
calc_doc = self.ui_test.create_doc_in_start_center("calc")
xCalcDoc = self.xUITest.getTopFocusWindow()
gridwin = xCalcDoc.getChild("grid_window")
@@ -112,16 +215,52 @@ class CalcTrackedChanges(UITestCase):
#track changes; enter text to cell
self.xUITest.executeCommand(".uno:TraceChangeMode")
enter_text_to_cell(gridwin, "A1", "Test LibreOffice")
+ enter_text_to_cell(gridwin, "A2", "Test LibreOffice")
#accept tracked changes
self.ui_test.execute_modeless_dialog_through_command(".uno:AcceptChanges")
xTrackDlg = self.xUITest.getTopFocusWindow()
+ xChangesList = xTrackDlg.getChild("calcchanges")
+ self.assertEqual(2, len(xChangesList.getChildren()))
+
+ textStart = "Changed contents\tSheet1.A1\t \t" + datetime.datetime.now().strftime("%m/%d/%Y")
+ textEnd = "(Cell A1 changed from '<empty>' to 'Test LibreOffice')"
+ textStart2 = "Changed contents\tSheet1.A2\t \t" + datetime.datetime.now().strftime("%m/%d/%Y")
+ textEnd2 = "(Cell A2 changed from '<empty>' to 'Test LibreOffice')"
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0'))["Text"].startswith(textStart))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0'))["Text"].endswith(textEnd))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('1'))["Text"].startswith(textStart2))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('1'))["Text"].endswith(textEnd2))
+
xAccBtn = xTrackDlg.getChild("rejectall")
xAccBtn.executeAction("CLICK", tuple())
+
+ self.assertEqual(2, len(xChangesList.getChildren()))
+ self.assertEqual(get_state_as_dict(xChangesList.getChild('0'))["Text"], "Accepted")
+ self.assertEqual(get_state_as_dict(xChangesList.getChild('1'))["Text"], "Rejected")
+
+ xChangesList.getChild('0').executeAction("EXPAND", tuple())
+ self.assertEqual(2, len(xChangesList.getChild('0').getChildren()))
+
+ textEnd3 = "(Cell A1 changed from 'Test LibreOffice' to '<empty>')"
+ textEnd4 = "(Cell A2 changed from 'Test LibreOffice' to '<empty>')"
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0').getChild('0'))["Text"].startswith(textStart2))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0').getChild('0'))["Text"].endswith(textEnd4))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0').getChild('1'))["Text"].startswith(textStart))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('0').getChild('1'))["Text"].endswith(textEnd3))
+
+ xChangesList.getChild('1').executeAction("EXPAND", tuple())
+ self.assertEqual(2, len(xChangesList.getChild('1').getChildren()))
+
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('1').getChild('0'))["Text"].startswith(textStart))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('1').getChild('0'))["Text"].endswith(textEnd))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('1').getChild('1'))["Text"].startswith(textStart2))
+ self.assertTrue(get_state_as_dict(xChangesList.getChild('1').getChild('1'))["Text"].endswith(textEnd2))
+
xCancBtn = xTrackDlg.getChild("close")
xCancBtn.executeAction("CLICK", tuple())
self.assertEqual(get_cell_by_position(document, 0, 0, 0).getString(), "")
self.ui_test.close_doc()
-# vim: set shiftwidth=4 softtabstop=4 expandtab:
\ No newline at end of file
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
More information about the Libreoffice-commits
mailing list