[Libreoffice-commits] core.git: Branch 'feature/drawinglayercore' - 19 commits - accessibility/source basctl/source compilerplugins/clang dbaccess/source desktop/source drawinglayer/CppunitTest_drawinglayer_border.mk drawinglayer/inc drawinglayer/Library_drawinglayercore.mk drawinglayer/Library_drawinglayer.mk drawinglayer/Module_drawinglayer.mk editeng/source emfio/CppunitTest_emfio_emf_test.mk emfio/Library_emfio.mk filter/Library_svgfilter.mk filter/source icon-themes/sifr icon-themes/sifr_dark icon-themes/sifr_dark_svg icon-themes/sifr_svg include/drawinglayer include/svx include/vcl reportdesign/source Repository.mk sc/CppunitTest_sc_ucalc.mk sc/Library_sc.mk sc/source sd/CppunitTest_sd_uimpress.mk sd/Library_sd.mk sd/qa sd/source sfx2/Library_sfx.mk sfx2/source solenv/clang-format starmath/source svgio/CppunitTest_svgio.mk svgio/Library_svgio.mk svtools/source svx/CppunitTest_svx_unit.mk svx/Library_svxcore.mk svx/Library_svx.mk svx/source sw/CppunitTest_sw_uwriter.mk sw/Library_sw.mk sw/Li brary_swui.mk sw/source toolkit/source vcl/inc vcl/Library_vcl.mk vcl/skia vcl/source vcl/workben writerfilter/source xmloff/source
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Sun Apr 12 09:35:53 UTC 2020
Rebased ref, commits from common ancestor:
commit ce721404ee9316b0f54be6818bfe2426acd8a0da
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: Sun Apr 12 11:35:01 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 25b2e7f66be1..6095bc856bb8 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -81,6 +81,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 3abc1847fb81c358737e1d4443f3e6bf83c7691d
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: Sun Apr 12 11:35:01 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 0ca31c3d5357..d35ae8aaa76f 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 d7a201ee95ffa10416290d8a1e0a2905664fb4ed
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sat Apr 11 12:02:47 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Sun Apr 12 11:34:07 2020 +0200
replace and remove VectorGraphicDataPtr typedef for the real type
There is no need to hide std::shared_ptr<VectorGraphicData> type
under an alias name. It doesn't make the code more understandble
and it usually is the exact opposite because we know with what
type we are dealing with.
Change-Id: Iec80ee99697ff2fe3a8275fc2787b5370510ebe6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92069
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx
index b7e6bcb66e53..0440ac94e1c9 100644
--- a/filter/source/svg/svgfilter.cxx
+++ b/filter/source/svg/svgfilter.cxx
@@ -254,7 +254,7 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto
// tdf#118232 Get the sequence of primitives and check if geometry is completely
// hidden. If so, there is no need to add a SdrObject at all
- const VectorGraphicDataPtr& rVectorGraphicData(aGraphic.getVectorGraphicData());
+ auto const & rVectorGraphicData(aGraphic.getVectorGraphicData());
bool bContainsNoGeometry(false);
if(bool(rVectorGraphicData) && VectorGraphicDataType::Svg == rVectorGraphicData->getVectorGraphicDataType())
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx
index 6e70f66731ac..b304cfb7ac97 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -99,7 +99,7 @@ public:
Graphic( const Bitmap& rBmp );
Graphic( const Image& rImage );
Graphic( const BitmapEx& rBmpEx );
- Graphic( const VectorGraphicDataPtr& rVectorGraphicDataPtr );
+ Graphic( const std::shared_ptr<VectorGraphicData>& rVectorGraphicDataPtr );
Graphic( const Animation& rAnimation );
Graphic( const GDIMetaFile& rMtf );
Graphic( const css::uno::Reference< css::graphic::XGraphic >& rxGraphic );
@@ -202,7 +202,7 @@ public:
public:
- const VectorGraphicDataPtr& getVectorGraphicData() const;
+ const std::shared_ptr<VectorGraphicData>& getVectorGraphicData() const;
/// Get the page number of the multi-page source this Graphic is rendered from.
sal_Int32 getPageNumber() const;
diff --git a/include/vcl/vectorgraphicdata.hxx b/include/vcl/vectorgraphicdata.hxx
index 7e272602f67f..f982537da67d 100644
--- a/include/vcl/vectorgraphicdata.hxx
+++ b/include/vcl/vectorgraphicdata.hxx
@@ -115,8 +115,6 @@ public:
bool isPrimitiveSequenceCreated() const { return mbSequenceCreated; }
};
-typedef std::shared_ptr< VectorGraphicData > VectorGraphicDataPtr;
-
#endif // INCLUDED_VCL_VECTORGRAPHICDATA_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx
index ab2b85786be9..e1278da3b5ab 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -67,11 +67,11 @@ namespace drawing = com::sun::star::drawing;
void GraphicHelper::GetPreferredExtension( OUString& rExtension, const Graphic& rGraphic )
{
OUString aExtension = "png";
- const VectorGraphicDataPtr& aVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
+ auto const & rVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
- if (aVectorGraphicDataPtr.get() && aVectorGraphicDataPtr->getVectorGraphicDataArrayLength())
+ if (rVectorGraphicDataPtr && rVectorGraphicDataPtr->getVectorGraphicDataArrayLength())
{
- switch (aVectorGraphicDataPtr->getVectorGraphicDataType())
+ switch (rVectorGraphicDataPtr->getVectorGraphicDataType())
{
case VectorGraphicDataType::Wmf:
aExtension = "wmf";
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 49c4c3175dd6..fc70e8bc1984 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -133,9 +133,9 @@ void SdrGrafObj::onGraphicChanged()
if (!mpGraphicObject || !mpGraphicObject->GetGraphic().isAvailable())
return;
- const VectorGraphicDataPtr& rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
+ auto const & rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
- if (!rVectorGraphicDataPtr.get())
+ if (!rVectorGraphicDataPtr)
return;
// Skip for PDF as it is only a bitmap primitive in a sequence and
@@ -282,9 +282,9 @@ const GraphicObject* SdrGrafObj::GetReplacementGraphicObject() const
{
if (!mpReplacementGraphicObject && mpGraphicObject)
{
- const VectorGraphicDataPtr& rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
+ auto const & rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
- if (rVectorGraphicDataPtr.get())
+ if (rVectorGraphicDataPtr)
{
const_cast< SdrGrafObj* >(this)->mpReplacementGraphicObject.reset(new GraphicObject(rVectorGraphicDataPtr->getReplacement()));
}
@@ -552,11 +552,11 @@ OUString SdrGrafObj::TakeObjNameSingul() const
if (!mpGraphicObject)
return OUString();
- const VectorGraphicDataPtr& rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
+ auto const & rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
OUStringBuffer sName;
- if(rVectorGraphicDataPtr.get())
+ if (rVectorGraphicDataPtr)
{
switch (rVectorGraphicDataPtr->getVectorGraphicDataType())
{
@@ -622,11 +622,11 @@ OUString SdrGrafObj::TakeObjNamePlural() const
if (!mpGraphicObject)
return OUString();
- const VectorGraphicDataPtr& rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
+ auto const & rVectorGraphicDataPtr = mpGraphicObject->GetGraphic().getVectorGraphicData();
OUStringBuffer sName;
- if(rVectorGraphicDataPtr.get())
+ if (rVectorGraphicDataPtr)
{
switch (rVectorGraphicDataPtr->getVectorGraphicDataType())
{
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 7eadfe7cacc4..500a30375c62 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -130,15 +130,14 @@ ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName,
}
// #i121128# use shortcut to write Vector Graphic Data data in original form (if possible)
- const VectorGraphicDataPtr& aVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
+ auto const & rVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
- if(aVectorGraphicDataPtr.get()
- && aVectorGraphicDataPtr->getVectorGraphicDataArrayLength())
+ if (rVectorGraphicDataPtr && rVectorGraphicDataPtr->getVectorGraphicDataArrayLength())
{
- const bool bIsSvg(rFilterName.equalsIgnoreAsciiCase("svg") && VectorGraphicDataType::Svg == aVectorGraphicDataPtr->getVectorGraphicDataType());
- const bool bIsWmf(rFilterName.equalsIgnoreAsciiCase("wmf") && VectorGraphicDataType::Wmf == aVectorGraphicDataPtr->getVectorGraphicDataType());
- const bool bIsEmf(rFilterName.equalsIgnoreAsciiCase("emf") && VectorGraphicDataType::Emf == aVectorGraphicDataPtr->getVectorGraphicDataType());
- const bool bIsPdf(rFilterName.equalsIgnoreAsciiCase("pdf") && VectorGraphicDataType::Pdf == aVectorGraphicDataPtr->getVectorGraphicDataType());
+ const bool bIsSvg(rFilterName.equalsIgnoreAsciiCase("svg") && VectorGraphicDataType::Svg == rVectorGraphicDataPtr->getVectorGraphicDataType());
+ const bool bIsWmf(rFilterName.equalsIgnoreAsciiCase("wmf") && VectorGraphicDataType::Wmf == rVectorGraphicDataPtr->getVectorGraphicDataType());
+ const bool bIsEmf(rFilterName.equalsIgnoreAsciiCase("emf") && VectorGraphicDataType::Emf == rVectorGraphicDataPtr->getVectorGraphicDataType());
+ const bool bIsPdf(rFilterName.equalsIgnoreAsciiCase("pdf") && VectorGraphicDataType::Pdf == rVectorGraphicDataPtr->getVectorGraphicDataType());
if (bIsSvg || bIsWmf || bIsEmf || bIsPdf)
{
@@ -153,7 +152,7 @@ ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName,
if (pOStm)
{
- pOStm->WriteBytes(aVectorGraphicDataPtr->getVectorGraphicDataArray().getConstArray(), aVectorGraphicDataPtr->getVectorGraphicDataArrayLength());
+ pOStm->WriteBytes(rVectorGraphicDataPtr->getVectorGraphicDataArray().getConstArray(), rVectorGraphicDataPtr->getVectorGraphicDataArrayLength());
aMedium.Commit();
if (!aMedium.GetError())
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 6e042765ab7c..bb39141cc49a 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -313,9 +313,9 @@ void SwGrfNode::onGraphicChanged()
OUString aName;
OUString aTitle;
OUString aDesc;
- const VectorGraphicDataPtr& rVectorGraphicDataPtr = GetGrf().getVectorGraphicData();
+ auto const & rVectorGraphicDataPtr = GetGrf().getVectorGraphicData();
- if(rVectorGraphicDataPtr.get())
+ if (rVectorGraphicDataPtr)
{
const drawinglayer::primitive2d::Primitive2DContainer aSequence(rVectorGraphicDataPtr->getPrimitive2DSequence());
@@ -375,9 +375,9 @@ const GraphicObject* SwGrfNode::GetReplacementGrfObj() const
{
if(!mpReplacementGraphic)
{
- const VectorGraphicDataPtr& rVectorGraphicDataPtr = GetGrfObj().GetGraphic().getVectorGraphicData();
+ auto const & rVectorGraphicDataPtr = GetGrfObj().GetGraphic().getVectorGraphicData();
- if(rVectorGraphicDataPtr.get())
+ if (rVectorGraphicDataPtr)
{
const_cast< SwGrfNode* >(this)->mpReplacementGraphic.reset( new GraphicObject(rVectorGraphicDataPtr->getReplacement()) );
}
diff --git a/vcl/inc/graphic/Manager.hxx b/vcl/inc/graphic/Manager.hxx
index d127201266f5..bb52a0cfcf8f 100644
--- a/vcl/inc/graphic/Manager.hxx
+++ b/vcl/inc/graphic/Manager.hxx
@@ -62,7 +62,8 @@ public:
std::shared_ptr<ImpGraphic> newInstance();
std::shared_ptr<ImpGraphic> newInstance(const Bitmap& rBitmap);
std::shared_ptr<ImpGraphic> newInstance(const BitmapEx& rBitmapEx);
- std::shared_ptr<ImpGraphic> newInstance(const VectorGraphicDataPtr& rVectorGraphicDataPtr);
+ std::shared_ptr<ImpGraphic>
+ newInstance(const std::shared_ptr<VectorGraphicData>& rVectorGraphicDataPtr);
std::shared_ptr<ImpGraphic> newInstance(const Animation& rAnimation);
std::shared_ptr<ImpGraphic> newInstance(const GDIMetaFile& rMtf);
std::shared_ptr<ImpGraphic> newInstance(const GraphicExternalLink& rGraphicLink);
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx
index a5435ee73b39..eaf691c10f1b 100644
--- a/vcl/inc/impgraph.hxx
+++ b/vcl/inc/impgraph.hxx
@@ -65,7 +65,7 @@ private:
mutable sal_uLong mnSizeBytes;
bool mbSwapOut;
bool mbDummyContext;
- VectorGraphicDataPtr maVectorGraphicData;
+ std::shared_ptr<VectorGraphicData> maVectorGraphicData;
// cache checksum computation
mutable BitmapChecksum mnChecksum = 0;
@@ -82,7 +82,7 @@ public:
ImpGraphic( const GraphicExternalLink& rExternalLink);
ImpGraphic( const Bitmap& rBmp );
ImpGraphic( const BitmapEx& rBmpEx );
- ImpGraphic(const VectorGraphicDataPtr& rVectorGraphicDataPtr);
+ ImpGraphic(const std::shared_ptr<VectorGraphicData>& rVectorGraphicDataPtr);
ImpGraphic( const Animation& rAnimation );
ImpGraphic( const GDIMetaFile& rMtf );
~ImpGraphic();
@@ -193,7 +193,7 @@ private:
friend void WriteImpGraphic(SvStream& rOStm, const ImpGraphic& rImpGraphic);
friend void ReadImpGraphic(SvStream& rIStm, ImpGraphic& rImpGraphic);
- const VectorGraphicDataPtr& getVectorGraphicData() const;
+ const std::shared_ptr<VectorGraphicData>& getVectorGraphicData() const;
bool ensureAvailable () const;
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index edd02257ad70..e69686a3d99e 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1573,7 +1573,7 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath,
if(!aMemStream.GetError() )
{
- VectorGraphicDataPtr aVectorGraphicDataPtr = std::make_shared<VectorGraphicData>(aNewData, rPath, VectorGraphicDataType::Svg);
+ auto aVectorGraphicDataPtr = std::make_shared<VectorGraphicData>(aNewData, rPath, VectorGraphicDataType::Svg);
rGraphic = Graphic(aVectorGraphicDataPtr);
bOkay = true;
}
@@ -1586,7 +1586,7 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath,
if(!rIStream.GetError())
{
- VectorGraphicDataPtr aVectorGraphicDataPtr = std::make_shared<VectorGraphicData>(aNewData, rPath, VectorGraphicDataType::Svg);
+ auto aVectorGraphicDataPtr = std::make_shared<VectorGraphicData>(aNewData, rPath, VectorGraphicDataType::Svg);
rGraphic = Graphic(aVectorGraphicDataPtr);
bOkay = true;
}
@@ -1656,7 +1656,7 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath,
{
const bool bIsWmf(aFilterName.equalsIgnoreAsciiCase(IMP_WMF));
const VectorGraphicDataType aDataType(bIsWmf ? VectorGraphicDataType::Wmf : VectorGraphicDataType::Emf);
- VectorGraphicDataPtr aVectorGraphicDataPtr =
+ auto aVectorGraphicDataPtr =
std::make_shared<VectorGraphicData>(
aNewData,
rPath,
@@ -1924,13 +1924,13 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r
bool bDone(false);
// do we have a native Vector Graphic Data RenderGraphic, whose data can be written directly?
- const VectorGraphicDataPtr& aVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
+ auto const & rVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
- if (aVectorGraphicDataPtr.get()
- && aVectorGraphicDataPtr->getVectorGraphicDataArrayLength()
- && VectorGraphicDataType::Wmf == aVectorGraphicDataPtr->getVectorGraphicDataType())
+ if (rVectorGraphicDataPtr
+ && rVectorGraphicDataPtr->getVectorGraphicDataArrayLength()
+ && VectorGraphicDataType::Wmf == rVectorGraphicDataPtr->getVectorGraphicDataType())
{
- rOStm.WriteBytes(aVectorGraphicDataPtr->getVectorGraphicDataArray().getConstArray(), aVectorGraphicDataPtr->getVectorGraphicDataArrayLength());
+ rOStm.WriteBytes(rVectorGraphicDataPtr->getVectorGraphicDataArray().getConstArray(), rVectorGraphicDataPtr->getVectorGraphicDataArrayLength());
if (rOStm.GetError())
{
@@ -1957,13 +1957,13 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r
bool bDone(false);
// do we have a native Vector Graphic Data RenderGraphic, whose data can be written directly?
- const VectorGraphicDataPtr& aVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
+ auto const & rVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
- if (aVectorGraphicDataPtr.get()
- && aVectorGraphicDataPtr->getVectorGraphicDataArrayLength()
- && VectorGraphicDataType::Emf == aVectorGraphicDataPtr->getVectorGraphicDataType())
+ if (rVectorGraphicDataPtr
+ && rVectorGraphicDataPtr->getVectorGraphicDataArrayLength()
+ && VectorGraphicDataType::Emf == rVectorGraphicDataPtr->getVectorGraphicDataType())
{
- rOStm.WriteBytes(aVectorGraphicDataPtr->getVectorGraphicDataArray().getConstArray(), aVectorGraphicDataPtr->getVectorGraphicDataArrayLength());
+ rOStm.WriteBytes(rVectorGraphicDataPtr->getVectorGraphicDataArray().getConstArray(), rVectorGraphicDataPtr->getVectorGraphicDataArrayLength());
if (rOStm.GetError())
{
@@ -2051,13 +2051,13 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r
bool bDone(false);
// do we have a native Vector Graphic Data RenderGraphic, whose data can be written directly?
- const VectorGraphicDataPtr& aVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
+ auto const & rVectorGraphicDataPtr(rGraphic.getVectorGraphicData());
- if (aVectorGraphicDataPtr.get()
- && aVectorGraphicDataPtr->getVectorGraphicDataArrayLength()
- && VectorGraphicDataType::Svg == aVectorGraphicDataPtr->getVectorGraphicDataType())
+ if (rVectorGraphicDataPtr
+ && rVectorGraphicDataPtr->getVectorGraphicDataArrayLength()
+ && VectorGraphicDataType::Svg == rVectorGraphicDataPtr->getVectorGraphicDataType())
{
- rOStm.WriteBytes(aVectorGraphicDataPtr->getVectorGraphicDataArray().getConstArray(), aVectorGraphicDataPtr->getVectorGraphicDataArrayLength());
+ rOStm.WriteBytes(rVectorGraphicDataPtr->getVectorGraphicDataArray().getConstArray(), rVectorGraphicDataPtr->getVectorGraphicDataArrayLength());
if( rOStm.GetError() )
{
diff --git a/vcl/source/filter/wmf/wmf.cxx b/vcl/source/filter/wmf/wmf.cxx
index 3b9156ac84a1..7818309ed6d1 100644
--- a/vcl/source/filter/wmf/wmf.cxx
+++ b/vcl/source/filter/wmf/wmf.cxx
@@ -49,7 +49,7 @@ bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF )
// Throw into VectorGraphicData to get the import. Do not care
// too much for type, this will be checked there. Also no path
// needed, it is a temporary object
- VectorGraphicDataPtr aVectorGraphicDataPtr =
+ auto aVectorGraphicDataPtr =
std::make_shared<VectorGraphicData>(
aNewData,
OUString(),
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index 96414b43ad3a..ee7a8797cde9 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -222,7 +222,7 @@ Graphic::Graphic(const Image& rImage)
mxImpGraphic->setOriginURL("private:graphicrepository/" + aStock);
}
-Graphic::Graphic(const VectorGraphicDataPtr& rVectorGraphicDataPtr)
+Graphic::Graphic(const std::shared_ptr<VectorGraphicData>& rVectorGraphicDataPtr)
: mxImpGraphic(vcl::graphic::Manager::get().newInstance(rVectorGraphicDataPtr))
{
}
@@ -555,7 +555,7 @@ void WriteGraphic( SvStream& rOStream, const Graphic& rGraphic )
WriteImpGraphic(rOStream, *rGraphic.mxImpGraphic);
}
-const VectorGraphicDataPtr& Graphic::getVectorGraphicData() const
+const std::shared_ptr<VectorGraphicData>& Graphic::getVectorGraphicData() const
{
return mxImpGraphic->getVectorGraphicData();
}
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index c6f08ec2130f..292c0bc6d1f9 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -151,7 +151,7 @@ ImpGraphic::ImpGraphic( const BitmapEx& rBitmapEx ) :
{
}
-ImpGraphic::ImpGraphic(const VectorGraphicDataPtr& rVectorGraphicDataPtr)
+ImpGraphic::ImpGraphic(const std::shared_ptr<VectorGraphicData>& rVectorGraphicDataPtr)
: meType( rVectorGraphicDataPtr.get() ? GraphicType::Bitmap : GraphicType::NONE ),
mnSizeBytes( 0 ),
mbSwapOut( false ),
@@ -320,7 +320,7 @@ bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const
return bRet;
}
-const VectorGraphicDataPtr& ImpGraphic::getVectorGraphicData() const
+const std::shared_ptr<VectorGraphicData>& ImpGraphic::getVectorGraphicData() const
{
ensureAvailable();
@@ -1716,7 +1716,7 @@ void ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic )
aDataType = VectorGraphicDataType::Pdf;
}
- VectorGraphicDataPtr aVectorGraphicDataPtr = std::make_shared<VectorGraphicData>(aNewData, aPath, aDataType);
+ auto aVectorGraphicDataPtr = std::make_shared<VectorGraphicData>(aNewData, aPath, aDataType);
rImpGraphic = aVectorGraphicDataPtr;
}
}
diff --git a/vcl/source/graphic/GraphicID.cxx b/vcl/source/graphic/GraphicID.cxx
index 15de2a0d6f0f..96f256cf45da 100644
--- a/vcl/source/graphic/GraphicID.cxx
+++ b/vcl/source/graphic/GraphicID.cxx
@@ -30,9 +30,9 @@ GraphicID::GraphicID(ImpGraphic const& rGraphic)
if (rGraphic.ImplGetType() == GraphicType::Bitmap)
{
- if (rGraphic.getVectorGraphicData().get())
+ auto const& rVectorGraphicDataPtr = rGraphic.getVectorGraphicData();
+ if (rVectorGraphicDataPtr)
{
- const VectorGraphicDataPtr& rVectorGraphicDataPtr = rGraphic.getVectorGraphicData();
const basegfx::B2DRange& rRange = rVectorGraphicDataPtr->getRange();
mnID1 |= rVectorGraphicDataPtr->getVectorGraphicDataArrayLength();
diff --git a/vcl/source/graphic/Manager.cxx b/vcl/source/graphic/Manager.cxx
index 783ff21f64e9..b019d5adceaa 100644
--- a/vcl/source/graphic/Manager.cxx
+++ b/vcl/source/graphic/Manager.cxx
@@ -199,7 +199,8 @@ std::shared_ptr<ImpGraphic> Manager::newInstance(const Animation& rAnimation)
return pReturn;
}
-std::shared_ptr<ImpGraphic> Manager::newInstance(const VectorGraphicDataPtr& rVectorGraphicDataPtr)
+std::shared_ptr<ImpGraphic>
+Manager::newInstance(const std::shared_ptr<VectorGraphicData>& rVectorGraphicDataPtr)
{
auto pReturn = std::make_shared<ImpGraphic>(rVectorGraphicDataPtr);
registerGraphic(pReturn, "VectorGraphic");
commit 65f5484dd7ad8036f617685f2a76e5e2c24be298
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sat Apr 11 12:12:19 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Sun Apr 12 11:33:44 2020 +0200
remove {line,stroke}attribute.hxx from clang-format blacklist
Change-Id: I4826b94da3982be8807c4eba63971cb7d3df9d8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92070
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/include/drawinglayer/attribute/lineattribute.hxx b/include/drawinglayer/attribute/lineattribute.hxx
index 90c50f904fe9..77828a15d21e 100644
--- a/include/drawinglayer/attribute/lineattribute.hxx
+++ b/include/drawinglayer/attribute/lineattribute.hxx
@@ -26,51 +26,50 @@
#include <com/sun/star/drawing/LineCap.hpp>
#include <o3tl/cow_wrapper.hxx>
-namespace basegfx {
- class BColor;
+namespace basegfx
+{
+class BColor;
}
-namespace drawinglayer::attribute {
- class ImpLineAttribute;
+namespace drawinglayer::attribute
+{
+class ImpLineAttribute;
}
namespace drawinglayer::attribute
{
- class DRAWINGLAYER_DLLPUBLIC LineAttribute
- {
- public:
- typedef o3tl::cow_wrapper< ImpLineAttribute > ImplType;
+class DRAWINGLAYER_DLLPUBLIC LineAttribute
+{
+public:
+ typedef o3tl::cow_wrapper<ImpLineAttribute> ImplType;
- private:
- ImplType mpLineAttribute;
+private:
+ ImplType mpLineAttribute;
- public:
- /// constructors/assignmentoperator/destructor
- explicit LineAttribute(
- const basegfx::BColor& rColor,
- double fWidth = 0.0,
- basegfx::B2DLineJoin aB2DLineJoin = basegfx::B2DLineJoin::Round,
- css::drawing::LineCap aLineCap = css::drawing::LineCap_BUTT,
- double fMiterMinimumAngle = basegfx::deg2rad(15.0));
- LineAttribute();
- LineAttribute(const LineAttribute&);
- LineAttribute& operator=(const LineAttribute&);
- ~LineAttribute();
+public:
+ /// constructors/assignmentoperator/destructor
+ explicit LineAttribute(const basegfx::BColor& rColor, double fWidth = 0.0,
+ basegfx::B2DLineJoin aB2DLineJoin = basegfx::B2DLineJoin::Round,
+ css::drawing::LineCap aLineCap = css::drawing::LineCap_BUTT,
+ double fMiterMinimumAngle = basegfx::deg2rad(15.0));
+ LineAttribute();
+ LineAttribute(const LineAttribute&);
+ LineAttribute& operator=(const LineAttribute&);
+ ~LineAttribute();
- // checks if the incarnation is default constructed
- bool isDefault() const;
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
- // compare operator
- bool operator==(const LineAttribute& rCandidate) const;
+ // compare operator
+ bool operator==(const LineAttribute& rCandidate) const;
- // data read access
- const basegfx::BColor& getColor() const;
- double getWidth() const;
- basegfx::B2DLineJoin getLineJoin() const;
- css::drawing::LineCap getLineCap() const;
- double getMiterMinimumAngle() const;
- };
+ // data read access
+ const basegfx::BColor& getColor() const;
+ double getWidth() const;
+ basegfx::B2DLineJoin getLineJoin() const;
+ css::drawing::LineCap getLineCap() const;
+ double getMiterMinimumAngle() const;
+};
} // end of namespace drawinglayer
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/drawinglayer/attribute/strokeattribute.hxx b/include/drawinglayer/attribute/strokeattribute.hxx
index fd9409e9519d..d5d825c54710 100644
--- a/include/drawinglayer/attribute/strokeattribute.hxx
+++ b/include/drawinglayer/attribute/strokeattribute.hxx
@@ -23,43 +23,42 @@
#include <o3tl/cow_wrapper.hxx>
#include <vector>
-namespace drawinglayer::attribute {
- class ImpStrokeAttribute;
+namespace drawinglayer::attribute
+{
+class ImpStrokeAttribute;
}
namespace drawinglayer::attribute
{
- class DRAWINGLAYER_DLLPUBLIC StrokeAttribute
- {
- public:
- typedef o3tl::cow_wrapper< ImpStrokeAttribute > ImplType;
+class DRAWINGLAYER_DLLPUBLIC StrokeAttribute
+{
+public:
+ typedef o3tl::cow_wrapper<ImpStrokeAttribute> ImplType;
- private:
- ImplType mpStrokeAttribute;
+private:
+ ImplType mpStrokeAttribute;
- public:
- /// constructors/assignmentoperator/destructor
- explicit StrokeAttribute(
- const ::std::vector< double >& rDotDashArray,
- double fFullDotDashLen = 0.0);
- StrokeAttribute();
- StrokeAttribute(const StrokeAttribute&);
- StrokeAttribute(StrokeAttribute&&);
- StrokeAttribute& operator=(const StrokeAttribute&);
- StrokeAttribute& operator=(StrokeAttribute&&);
- ~StrokeAttribute();
+public:
+ /// constructors/assignmentoperator/destructor
+ explicit StrokeAttribute(const ::std::vector<double>& rDotDashArray,
+ double fFullDotDashLen = 0.0);
+ StrokeAttribute();
+ StrokeAttribute(const StrokeAttribute&);
+ StrokeAttribute(StrokeAttribute&&);
+ StrokeAttribute& operator=(const StrokeAttribute&);
+ StrokeAttribute& operator=(StrokeAttribute&&);
+ ~StrokeAttribute();
- // checks if the incarnation is default constructed
- bool isDefault() const;
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
- // compare operator
- bool operator==(const StrokeAttribute& rCandidate) const;
+ // compare operator
+ bool operator==(const StrokeAttribute& rCandidate) const;
- // data read access
- const ::std::vector< double >& getDotDashArray() const;
- double getFullDotDashLen() const;
- };
+ // data read access
+ const ::std::vector<double>& getDotDashArray() const;
+ double getFullDotDashLen() const;
+};
} // end of namespace drawinglayer::attribute
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 95d4390ce95d..9c3867222c7a 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -5851,7 +5851,6 @@ include/drawinglayer/attribute/fillgradientattribute.hxx
include/drawinglayer/attribute/fillgraphicattribute.hxx
include/drawinglayer/attribute/fillhatchattribute.hxx
include/drawinglayer/attribute/fontattribute.hxx
-include/drawinglayer/attribute/lineattribute.hxx
include/drawinglayer/attribute/linestartendattribute.hxx
include/drawinglayer/attribute/materialattribute3d.hxx
include/drawinglayer/attribute/sdrallattribute3d.hxx
@@ -5864,7 +5863,6 @@ include/drawinglayer/attribute/sdrlinestartendattribute.hxx
include/drawinglayer/attribute/sdrobjectattribute3d.hxx
include/drawinglayer/attribute/sdrsceneattribute3d.hxx
include/drawinglayer/attribute/sdrshadowattribute.hxx
-include/drawinglayer/attribute/strokeattribute.hxx
include/drawinglayer/geometry/viewinformation3d.hxx
include/drawinglayer/primitive2d/discretebitmapprimitive2d.hxx
include/drawinglayer/primitive2d/discreteshadowprimitive2d.hxx
commit 0f586493da9a1ac359dff9fe9110e60880610eb6
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sat Apr 11 22:28:25 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Sun Apr 12 10:11:41 2020 +0200
graphic: use UCBContentHelper to delete files
Change-Id: Ibfec031daaa3b92d2286113c3ef981cfa6d09f05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92072
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 5751ecba700c..c6f08ec2130f 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -21,12 +21,11 @@
#include <sal/log.hxx>
#include <comphelper/fileformat.h>
-#include <comphelper/processfactory.hxx>
#include <tools/fract.hxx>
#include <tools/vcompat.hxx>
#include <tools/urlobj.hxx>
#include <tools/stream.hxx>
-#include <ucbhelper/content.hxx>
+#include <unotools/ucbhelper.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/tempfile.hxx>
#include <vcl/outdev.hxx>
@@ -37,8 +36,6 @@
#include <vcl/graph.hxx>
#include <vcl/metaact.hxx>
#include <impgraph.hxx>
-#include <com/sun/star/ucb/CommandAbortedException.hpp>
-#include <com/sun/star/ucb/ContentCreationException.hpp>
#include <com/sun/star/graphic/XPrimitive2D.hpp>
#include <vcl/dibtools.hxx>
#include <map>
@@ -355,26 +352,7 @@ void ImpGraphic::ImplClearGraphics()
ImpSwapFile::~ImpSwapFile()
{
- try
- {
- ::ucbhelper::Content aCnt( aSwapURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
- css::uno::Reference< css::ucb::XCommandEnvironment >(),
- comphelper::getProcessComponentContext() );
-
- aCnt.executeCommand( "delete", css::uno::makeAny( true ) );
- }
- catch( const css::ucb::ContentCreationException& )
- {
- }
- catch( const css::uno::RuntimeException& )
- {
- }
- catch( const css::ucb::CommandAbortedException& )
- {
- }
- catch( const css::uno::Exception& )
- {
- }
+ utl::UCBContentHelper::Kill(aSwapURL.GetMainURL(INetURLObject::DecodeMechanism::NONE));
}
void ImpGraphic::ImplSetPrepared(bool bAnimated, const Size* pSizeHint)
@@ -1335,27 +1313,7 @@ bool ImpGraphic::ImplSwapOut()
else
{
xOStm.reset();
-
- try
- {
- ::ucbhelper::Content aCnt( aTmpURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
- css::uno::Reference< css::ucb::XCommandEnvironment >(),
- comphelper::getProcessComponentContext() );
-
- aCnt.executeCommand( "delete", css::uno::makeAny( true ) );
- }
- catch( const css::ucb::ContentCreationException& )
- {
- }
- catch( const css::uno::RuntimeException& )
- {
- }
- catch( const css::ucb::CommandAbortedException& )
- {
- }
- catch( const css::uno::Exception& )
- {
- }
+ utl::UCBContentHelper::Kill(aTmpURL.GetMainURL(INetURLObject::DecodeMechanism::NONE));
}
}
}
commit cc2b4b89684d82c69e8c4e696e626949de17c963
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sat Apr 11 22:27:38 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Sun Apr 12 10:11:26 2020 +0200
remove unused includes in graphicfilter
Change-Id: I5e4ef6aadd25697beb0d3289ee22cef1e5ac433b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92071
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 0cc0e3abf80c..edd02257ad70 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -23,7 +23,6 @@
#include <osl/mutex.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/threadpool.hxx>
-#include <ucbhelper/content.hxx>
#include <cppuhelper/implbase.hxx>
#include <tools/fract.hxx>
#include <unotools/configmgr.hxx>
@@ -57,8 +56,6 @@
#include <com/sun/star/svg/XSVGWriter.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/xml/sax/Writer.hpp>
-#include <com/sun/star/ucb/CommandAbortedException.hpp>
-#include <com/sun/star/ucb/ContentCreationException.hpp>
#include <unotools/ucbstreamhelper.hxx>
#include <rtl/bootstrap.hxx>
#include <rtl/instance.hxx>
commit e1c1e832e99794f953c5736d97808ef83b349bce
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sat Apr 11 12:08:45 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Sun Apr 12 10:10:34 2020 +0200
clean-up NS and pragma once for LineAttribute, StrokeAttribute
Change-Id: Ic914fcb9a0bf9b30feff40ec39c1002ac6eae1cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92068
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/include/drawinglayer/attribute/lineattribute.hxx b/include/drawinglayer/attribute/lineattribute.hxx
index 4f01c1f574cb..90c50f904fe9 100644
--- a/include/drawinglayer/attribute/lineattribute.hxx
+++ b/include/drawinglayer/attribute/lineattribute.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINEATTRIBUTE_HXX
-#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINEATTRIBUTE_HXX
+#pragma once
#include <drawinglayer/drawinglayerdllapi.h>
@@ -27,22 +26,16 @@
#include <com/sun/star/drawing/LineCap.hpp>
#include <o3tl/cow_wrapper.hxx>
-
-// predefines
-
namespace basegfx {
class BColor;
}
-namespace drawinglayer { namespace attribute {
+namespace drawinglayer::attribute {
class ImpLineAttribute;
-}}
-
+}
-namespace drawinglayer
+namespace drawinglayer::attribute
{
- namespace attribute
- {
class DRAWINGLAYER_DLLPUBLIC LineAttribute
{
public:
@@ -77,10 +70,7 @@ namespace drawinglayer
css::drawing::LineCap getLineCap() const;
double getMiterMinimumAngle() const;
};
- } // end of namespace attribute
} // end of namespace drawinglayer
-#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINEATTRIBUTE_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/drawinglayer/attribute/strokeattribute.hxx b/include/drawinglayer/attribute/strokeattribute.hxx
index 40e15707b25f..fd9409e9519d 100644
--- a/include/drawinglayer/attribute/strokeattribute.hxx
+++ b/include/drawinglayer/attribute/strokeattribute.hxx
@@ -17,25 +17,18 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_STROKEATTRIBUTE_HXX
-#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_STROKEATTRIBUTE_HXX
+#pragma once
#include <drawinglayer/drawinglayerdllapi.h>
#include <o3tl/cow_wrapper.hxx>
#include <vector>
-
-// predefines
-
-namespace drawinglayer { namespace attribute {
+namespace drawinglayer::attribute {
class ImpStrokeAttribute;
-}}
+}
-
-namespace drawinglayer
+namespace drawinglayer::attribute
{
- namespace attribute
- {
class DRAWINGLAYER_DLLPUBLIC StrokeAttribute
{
public:
@@ -66,10 +59,7 @@ namespace drawinglayer
const ::std::vector< double >& getDotDashArray() const;
double getFullDotDashLen() const;
};
- } // end of namespace attribute
-} // end of namespace drawinglayer
-
+} // end of namespace drawinglayer::attribute
-#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_STROKEATTRIBUTE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 5079dc73cb7e2198ba77e5a6ac2758e9e1a8a370
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sat Apr 11 21:20:16 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Apr 12 08:50:47 2020 +0200
improve fastparser logging
so we print out the full namespace, which is quite handy when
tracking down attributes that are not being parsed.
Change-Id: I085d39b365d43c1a53a7c176b633ea38e6a7fb45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92064
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/dbaccess/source/filter/xml/xmlColumn.cxx b/dbaccess/source/filter/xml/xmlColumn.cxx
index 4816ed62936c..fdd343555cdf 100644
--- a/dbaccess/source/filter/xml/xmlColumn.cxx
+++ b/dbaccess/source/filter/xml/xmlColumn.cxx
@@ -81,7 +81,7 @@ OXMLColumn::OXMLColumn( ODBFilter& rImport
m_sCellStyleName = sValue;
break;
default:
- SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << " value=" << aIter.toString());
+ SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << " value=" << aIter.toString());
}
}
}
diff --git a/dbaccess/source/filter/xml/xmlComponent.cxx b/dbaccess/source/filter/xml/xmlComponent.cxx
index 17cd09eaaef3..f6498108e529 100644
--- a/dbaccess/source/filter/xml/xmlComponent.cxx
+++ b/dbaccess/source/filter/xml/xmlComponent.cxx
@@ -68,7 +68,7 @@ OXMLComponent::OXMLComponent( ODBFilter& rImport
bAsTemplate = sValue == s_sTRUE;
break;
default:
- SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << "=" << aIter.toString());
+ SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
}
}
if ( !sHREF.isEmpty() && !sName.isEmpty() && _xParentContainer.is() )
diff --git a/dbaccess/source/filter/xml/xmlConnectionResource.cxx b/dbaccess/source/filter/xml/xmlConnectionResource.cxx
index 7c48b9a00a84..2df56f371f8c 100644
--- a/dbaccess/source/filter/xml/xmlConnectionResource.cxx
+++ b/dbaccess/source/filter/xml/xmlConnectionResource.cxx
@@ -69,7 +69,7 @@ OXMLConnectionResource::OXMLConnectionResource( ODBFilter& rImport,
aProperty.Name = "Actuate";
break;
default:
- SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << " value=" << aIter.toString());
+ SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
}
if ( !aProperty.Name.isEmpty() )
{
diff --git a/dbaccess/source/filter/xml/xmlDataSource.cxx b/dbaccess/source/filter/xml/xmlDataSource.cxx
index bc3d7c85e0a1..550a77eb0c16 100644
--- a/dbaccess/source/filter/xml/xmlDataSource.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSource.cxx
@@ -150,7 +150,7 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport,
aProperty.Name = "JavaDriverClassPath";
break;
default:
- SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << " value=" << aIter.toString());
+ SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
}
if ( !aProperty.Name.isEmpty() )
{
diff --git a/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx b/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
index a5e1c0af0a7d..8f5c0dec4376 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx
@@ -74,7 +74,7 @@ OXMLDataSourceInfo::OXMLDataSourceInfo( ODBFilter& rImport
bFoundCharset = true;
break;
default:
- SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << " value=" << aIter.toString());
+ SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
}
if ( !aProperty.Name.isEmpty() )
{
diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
index dede8308877c..3432c33bbba7 100644
--- a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx
@@ -83,7 +83,7 @@ OXMLDataSourceSetting::OXMLDataSourceSetting( ODBFilter& rImport
m_aSetting.Name = sValue;
break;
default:
- SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << " value=" << aIter.toString());
+ SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
}
}
diff --git a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
index 79a0a91ac186..79fa94a4b2cc 100644
--- a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
+++ b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
@@ -80,7 +80,7 @@ OXMLFileBasedDatabase::OXMLFileBasedDatabase( ODBFilter& rImport,
sFileTypeExtension = sValue;
break;
default:
- SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << " value=" << aIter.toString());
+ SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
}
if ( !aProperty.Name.isEmpty() )
{
diff --git a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
index 5781454fd36a..cf616cf7a46d 100644
--- a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
+++ b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
@@ -58,7 +58,7 @@ OXMLHierarchyCollection::OXMLHierarchyCollection( ODBFilter& rImport
sName = sValue;
break;
default:
- SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << " value=" << aIter.toString());
+ SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
}
}
if ( !sName.isEmpty() && _xParentContainer.is() )
diff --git a/dbaccess/source/filter/xml/xmlLogin.cxx b/dbaccess/source/filter/xml/xmlLogin.cxx
index b3fe602ca38d..84a880ba1a19 100644
--- a/dbaccess/source/filter/xml/xmlLogin.cxx
+++ b/dbaccess/source/filter/xml/xmlLogin.cxx
@@ -95,7 +95,7 @@ OXMLLogin::OXMLLogin( ODBFilter& rImport,
}
break;
default:
- SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << " value=" << aIter.toString());
+ SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
}
}
catch(const Exception&)
diff --git a/dbaccess/source/filter/xml/xmlQuery.cxx b/dbaccess/source/filter/xml/xmlQuery.cxx
index 4b8f4fd6fbf8..cd52e183c08b 100644
--- a/dbaccess/source/filter/xml/xmlQuery.cxx
+++ b/dbaccess/source/filter/xml/xmlQuery.cxx
@@ -56,7 +56,7 @@ OXMLQuery::OXMLQuery( ODBFilter& rImport
m_bEscapeProcessing = sValue == "true";
break;
default:
- SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << " value=" << aIter.toString());
+ SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
}
}
}
diff --git a/dbaccess/source/filter/xml/xmlServerDatabase.cxx b/dbaccess/source/filter/xml/xmlServerDatabase.cxx
index 6aed4122000d..992803c5ed94 100644
--- a/dbaccess/source/filter/xml/xmlServerDatabase.cxx
+++ b/dbaccess/source/filter/xml/xmlServerDatabase.cxx
@@ -65,7 +65,7 @@ OXMLServerDatabase::OXMLServerDatabase( ODBFilter& rImport,
sDatabaseName = sValue;
break;
default:
- SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << " value=" << aIter.toString());
+ SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
}
}
}
diff --git a/dbaccess/source/filter/xml/xmlTable.cxx b/dbaccess/source/filter/xml/xmlTable.cxx
index 45685a8fe978..b728a88edaed 100644
--- a/dbaccess/source/filter/xml/xmlTable.cxx
+++ b/dbaccess/source/filter/xml/xmlTable.cxx
@@ -76,7 +76,7 @@ OXMLTable::OXMLTable( ODBFilter& _rImport
m_bApplyOrder = sValue == "true";
break;
default:
- SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << "=" << aIter.toString());
+ SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
}
}
uno::Sequence<uno::Any> aArguments(comphelper::InitAnyPropertySequence(
@@ -221,7 +221,7 @@ void OXMLTable::fillAttributes(const uno::Reference< XFastAttributeList > & _xAt
_rsTableName = sValue;
break;
default:
- SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << " value=" << aIter.toString());
+ SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
}
}
}
diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx
index 2d31ec749fee..deec843b3839 100644
--- a/sc/source/filter/xml/xmltabi.cxx
+++ b/sc/source/filter/xml/xmltabi.cxx
@@ -461,7 +461,7 @@ ScXMLTableProtectionContext::ScXMLTableProtectionContext(
bDeleteRows = IsXMLToken(aIter, XML_TRUE);
break;
default:
- SAL_WARN("sc", "unknown attribute: " << nToken);
+ SAL_WARN("sc", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(nToken) << "=" << aIter.toString());
}
}
}
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index f33fd934c0d4..ae0f4300d158 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -642,7 +642,7 @@ void SmXMLContext_Helper::RetrieveAttrs(const uno::Reference<
bMvFound = true;
break;
default:
- SAL_WARN("starmath", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << " value=" << aIter.toString());
+ SAL_WARN("starmath", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
break;
}
}
@@ -780,7 +780,7 @@ void SmXMLTokenAttrHelper::RetrieveAttrs(const uno::Reference<xml::sax::XFastAtt
mbMvFound = true;
break;
default:
- SAL_WARN("starmath", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << " value=" << aIter.toString());
+ SAL_WARN("starmath", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
break;
}
}
@@ -1092,7 +1092,7 @@ void SmXMLFencedContext_Impl::startFastElement(sal_Int32 /*nElement*/, const uno
cEnd = sValue[0];
break;
default:
- SAL_WARN("starmath", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << " value=" << aIter.toString());
+ SAL_WARN("starmath", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
/*Go to superclass*/
break;
}
@@ -1239,7 +1239,7 @@ void SmXMLAnnotationContext_Impl::startFastElement(sal_Int32 /*nElement*/, const
bIsStarMath= sValue == "StarMath 5.0";
break;
default:
- SAL_WARN("starmath", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << " value=" << aIter.toString());
+ SAL_WARN("starmath", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
break;
}
}
@@ -1454,7 +1454,7 @@ void SmXMLOperatorContext_Impl::startFastElement(sal_Int32 /*nElement*/, const u
bIsStretchy = sValue == GetXMLToken(XML_TRUE);
break;
default:
- SAL_WARN("starmath", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << " value=" << aIter.toString());
+ SAL_WARN("starmath", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
break;
}
}
@@ -1523,7 +1523,7 @@ void SmXMLSpaceContext_Impl::startFastElement(sal_Int32 /*nElement*/,
SAL_WARN("starmath", "ignore mspace's width: " << sValue);
break;
default:
- SAL_WARN("starmath", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << " value=" << aIter.toString());
+ SAL_WARN("starmath", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
break;
}
}
@@ -2573,7 +2573,7 @@ void SmXMLActionContext_Impl::startFastElement(sal_Int32 /*nElement*/, const uno
}
break;
default:
- SAL_WARN("starmath", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << " value=" << aIter.toString());
+ SAL_WARN("starmath", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
break;
}
}
commit b0b9d736fb9ed73e849f80800916466868dbce28
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Sat Apr 11 22:25:45 2020 +0200
Commit: Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Sat Apr 11 23:48:42 2020 +0200
tdf#106026: Add unittest
Change-Id: I9ac779a4b4a5578842a466bf5d03529ba658b6b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92066
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
diff --git a/sd/qa/unit/data/odp/tdf106026.odp b/sd/qa/unit/data/odp/tdf106026.odp
new file mode 100644
index 000000000000..0d77f755b081
Binary files /dev/null and b/sd/qa/unit/data/odp/tdf106026.odp differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 17c0ea5e5dca..d462fd3220b2 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -123,6 +123,7 @@ public:
void testTdf112333();
void testTdf112552();
void testTdf112557();
+ void testTdf106026();
void testTdf112334();
void testTdf112089();
void testTdf112086();
@@ -231,6 +232,7 @@ public:
CPPUNIT_TEST(testTdf112333);
CPPUNIT_TEST(testTdf112552);
CPPUNIT_TEST(testTdf112557);
+ CPPUNIT_TEST(testTdf106026);
CPPUNIT_TEST(testTdf112334);
CPPUNIT_TEST(testTdf112089);
CPPUNIT_TEST(testTdf112086);
@@ -1384,6 +1386,31 @@ void SdOOXMLExportTest2::testTdf112557()
xDocShRef->DoClose();
}
+void SdOOXMLExportTest2::testTdf106026()
+{
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf106026.odp"), ODP);
+ utl::TempFile tempFile;
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+
+ xmlDocPtr pXmlMasterContent = parseExport(tempFile, "ppt/slideMasters/slideMaster1.xml");
+ assertXPath(pXmlMasterContent, "/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[1]/a:pPr/a:spcBef/a:spcPts", "val", "1417");
+ assertXPath(pXmlMasterContent, "/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[2]/a:pPr/a:spcBef/a:spcPts", "val", "1134");
+ assertXPath(pXmlMasterContent, "/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[3]/a:pPr/a:spcBef/a:spcPts", "val", "850");
+ assertXPath(pXmlMasterContent, "/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[4]/a:pPr/a:spcBef/a:spcPts", "val", "567");
+ assertXPath(pXmlMasterContent, "/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[5]/a:pPr/a:spcBef/a:spcPts", "val", "283");
+ assertXPath(pXmlMasterContent, "/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[6]/a:pPr/a:spcBef/a:spcPts", "val", "283");
+ assertXPath(pXmlMasterContent, "/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[7]/a:pPr/a:spcBef/a:spcPts", "val", "283");
+
+ xmlDocPtr pXmlSlideContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ assertXPath(pXmlSlideContent,
+ "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[1]/a:pPr/a:spcAft/a:spcPts", "val", "11339");
+ assertXPath(pXmlSlideContent,
+ "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[2]/a:pPr/a:spcAft/a:spcPts", "val", "11339");
+ assertXPath(pXmlSlideContent,
+ "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[3]/a:pPr/a:spcAft/a:spcPts", "val", "11339");
+ xDocShRef->DoClose();
+}
+
void SdOOXMLExportTest2::testTdf112334()
{
::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf112334.pptx"), PPTX);
commit 95460224f4f8443547dbf5cedbea008ea2639337
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sat Apr 11 22:35:23 2020 +0200
Commit: Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Sat Apr 11 23:24:31 2020 +0200
tdf#131812: fix exporting to html doesn't preserve RTL property
Change-Id: I227e304c6868afe7a98dbd8e96487270d06ce1eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92067
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
diff --git a/filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl b/filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl
index da123b1e5146..dc07f7e2918b 100644
--- a/filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl
+++ b/filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl
@@ -123,10 +123,10 @@
<xsl:when test="contains(., 'end')">
<xsl:choose>
<xsl:when test="parent::*/@style:writing-mode and contains(parent::*/@style:writing-mode, 'rl')">
- <xsl:text>text-align:left ! important;</xsl:text>
+ <xsl:text>text-align:right ! important;</xsl:text>
</xsl:when>
<xsl:otherwise>
- <xsl:text>text-align:right ! important; </xsl:text>
+ <xsl:text>text-align:left ! important; </xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
@@ -290,8 +290,20 @@
</xsl:template>
<xsl:template match="@style:writing-mode">
<xsl:text>writing-mode:</xsl:text>
- <xsl:value-of select="."/>
- <xsl:text>; </xsl:text>
+ <xsl:choose>
+ <xsl:when test=".='rl-tb'">
+ <xsl:text>horizontal-tb; direction:rtl; </xsl:text>
+ </xsl:when>
+ <xsl:when test=".='lr-tb'">
+ <xsl:text>horizontal-tb; direction:ltr; </xsl:text>
+ </xsl:when>
+ <xsl:when test=".='tb-rl'">
+ <xsl:text>vertical-rl; </xsl:text>
+ </xsl:when>
+ <xsl:when test=".='tb-lr'">
+ <xsl:text>vertical-lr; </xsl:text>
+ </xsl:when>
+ </xsl:choose>
</xsl:template>
<!-- *** Properties with a no 'fo:' or 'style:' prefix *** -->
<xsl:template match="@table:align">
commit f53077423fe1d62eb4392dd393a9bf6df84bd517
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sat Apr 11 21:02:33 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Apr 11 21:46:18 2020 +0200
tdf#131931 No version history shown
regression from
commit 1872b44c9a2ee2bd00be54c6c310b72579d7a47f
use FastParser for the XMLVersionListImport
Change-Id: Ib6e9e14758c25c6ff090fe8f929984449e045c30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92063
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx
index 0055fb56d802..b1c7f001da4f 100644
--- a/xmloff/source/meta/xmlversion.cxx
+++ b/xmloff/source/meta/xmlversion.cxx
@@ -22,6 +22,7 @@
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmlmetae.hxx>
#include <osl/diagnose.h>
+#include <sal/log.hxx>
#include <xmloff/xmltoken.hxx>
#include <comphelper/processfactory.hxx>
@@ -105,8 +106,6 @@ XMLVersionListImport::XMLVersionListImport(
: SvXMLImport(rContext, ""),
maVersions( rVersions )
{
- GetNamespaceMap().Add( xmloff::token::GetXMLToken(xmloff::token::XML_NP_VERSIONS_LIST),
- xmloff::token::GetXMLToken(xmloff::token::XML_N_VERSIONS_LIST), XML_NAMESPACE_VERSIONS_LIST );
}
XMLVersionListImport::~XMLVersionListImport() throw()
@@ -139,7 +138,8 @@ XMLVersionListContext::createFastChildContext(sal_Int32 nElement,
{
SvXMLImportContext *pContext = nullptr;
- if ( nElement == XML_ELEMENT(FRAMEWORK, xmloff::token::XML_VERSION_ENTRY) )
+ if ( nElement == XML_ELEMENT(FRAMEWORK, xmloff::token::XML_VERSION_ENTRY)
+ || nElement == XML_ELEMENT(VERSIONS_LIST, xmloff::token::XML_VERSION_ENTRY) )
{
pContext = new XMLVersionContext( GetImport(), xAttrList );
}
@@ -161,16 +161,19 @@ XMLVersionContext::XMLVersionContext( XMLVersionListImport& rImport,
switch( aIter.getToken() )
{
case XML_ELEMENT(FRAMEWORK, xmloff::token::XML_TITLE):
+ case XML_ELEMENT(VERSIONS_LIST, xmloff::token::XML_TITLE):
{
aInfo.Identifier = aIter.toString();
break;
}
case XML_ELEMENT(FRAMEWORK, xmloff::token::XML_COMMENT):
+ case XML_ELEMENT(VERSIONS_LIST, xmloff::token::XML_COMMENT):
{
aInfo.Comment = aIter.toString();
break;
}
case XML_ELEMENT(FRAMEWORK, xmloff::token::XML_CREATOR):
+ case XML_ELEMENT(VERSIONS_LIST, xmloff::token::XML_CREATOR):
{
aInfo.Author = aIter.toString();
break;
@@ -182,6 +185,9 @@ XMLVersionContext::XMLVersionContext( XMLVersionListImport& rImport,
aInfo.TimeStamp = aTime;
break;
}
+ default:
+ SAL_WARN("xmloff", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
+ break;
}
}
commit c076b99dd21edae0364cf9319a221a1d6a4bd487
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sat Apr 11 20:21:22 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Apr 11 21:23:08 2020 +0200
tdf#131907 Crash: reject/clear formatting
regression from
commit 0ef5c47547bec6319b853326603f3b807407fe78
sc: rowcol: tdf#50916 convert core/tool
Change-Id: Ib8207f60d34e4257fc9a854f4e4d358951e24718
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92062
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 0b9f18ec3779..a29e21d244c0 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -2525,7 +2525,7 @@ void ScChangeTrack::AppendOneDeleteRange( const ScRange& rOrgRange,
aTrackRange.aStart.IncTab( -nDz );
aTrackRange.aEnd.IncTab( -nDz );
}
- ScChangeActionDel* pAct = new ScChangeActionDel( pRefDoc, aTrackRange, nDx, nDy,
+ ScChangeActionDel* pAct = new ScChangeActionDel( pDoc, aTrackRange, nDx, nDy,
this );
// TabDelete not Contents; they are in separate columns
if ( !(rOrgRange.aStart.Col() == 0 && rOrgRange.aStart.Row() == 0 &&
commit be53f32655973c7a18824d5145eed992be788d2f
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Mar 12 13:55:55 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Apr 11 17:56:01 2020 +0200
rename vcl::Window::Update to PaintImmediately
To make the code easier to read.
Change-Id: Iebc648150391939fba5d1cd815c72dbcf02ceec6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90378
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/accessibility/source/extended/accessibletabbarpagelist.cxx b/accessibility/source/extended/accessibletabbarpagelist.cxx
index 4c403812f0f6..6b8d03c2420a 100644
--- a/accessibility/source/extended/accessibletabbarpagelist.cxx
+++ b/accessibility/source/extended/accessibletabbarpagelist.cxx
@@ -615,7 +615,7 @@ namespace accessibility
if ( m_pTabBar )
{
m_pTabBar->SetCurPageId( m_pTabBar->GetPageId( static_cast<sal_uInt16>(nChildIndex) ) );
- m_pTabBar->Update();
+ m_pTabBar->PaintImmediately();
m_pTabBar->ActivatePage();
m_pTabBar->Select();
}
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index f9e8b2674eba..2aa29d74df71 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -437,7 +437,7 @@ void ModulWindow::LoadBasic()
GetEditEngine()->SetUpdateMode( false );
GetEditView()->Read( *pStream );
GetEditEngine()->SetUpdateMode( true );
- GetEditorWindow().Update();
+ GetEditorWindow().PaintImmediately();
GetEditorWindow().ForceSyntaxTimeout();
GetEditorWindow().DestroyProgress();
ErrCode nError = aMedium.GetError();
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index b8bdd5628726..83f09d64297e 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1002,7 +1002,7 @@ void EditorWindow::CreateEditEngine()
rModulWindow.GetBreakPointWindow().GetCurYOffset() = 0;
rModulWindow.GetLineNumberWindow().GetCurYOffset() = 0;
pEditEngine->SetUpdateMode(true);
- rModulWindow.Update(); // has only been invalidated at UpdateMode = true
+ rModulWindow.PaintImmediately(); // has only been invalidated at UpdateMode = true
pEditView->ShowCursor();
@@ -1412,7 +1412,7 @@ void BreakPointWindow::DoScroll( long nVertScroll )
void BreakPointWindow::SetMarkerPos( sal_uInt16 nLine, bool bError )
{
if ( SyncYOffset() )
- Update();
+ PaintImmediately();
nMarkerPos = nLine;
bErrorMarker = bError;
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 771823a2895d..26f5446227ad 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -308,7 +308,7 @@ void DlgEditor::DoScroll()
if( !nX && !nY )
return;
- rWindow.Update();
+ rWindow.PaintImmediately();
// #i31562#
// When scrolling, someone was rescuing the Wallpaper and forced the window scroll to
@@ -321,7 +321,7 @@ void DlgEditor::DoScroll()
rWindow.Scroll( -nX, -nY, ScrollFlags::Children);
aMap.SetOrigin( Point( -aScrollPos.Width(), -aScrollPos.Height() ) );
rWindow.SetMapMode( aMap );
- rWindow.Update();
+ rWindow.PaintImmediately();
DlgEdHint aHint( DlgEdHint::WINDOWSCROLLED );
Broadcast( aHint );
diff --git a/basctl/source/dlged/dlgedview.cxx b/basctl/source/dlged/dlgedview.cxx
index 3ec0f72e1fda..754ef71a7cc3 100644
--- a/basctl/source/dlged/dlgedview.cxx
+++ b/basctl/source/dlged/dlgedview.cxx
@@ -106,7 +106,7 @@ void DlgEdView::MakeVisible( const tools::Rectangle& rRect, vcl::Window& rWin )
nScrollY = -nVisTop;
// scroll window
- rWin.Update();
+ rWin.PaintImmediately();
rWin.Scroll( -nScrollX, -nScrollY );
aMap.SetOrigin( Point( aOrg.X() - nScrollX, aOrg.Y() - nScrollY ) );
rWin.SetMapMode( aMap );
diff --git a/basctl/source/inc/IDEComboBox.hxx b/basctl/source/inc/IDEComboBox.hxx
index 155256279906..2a9c46609fc2 100644
--- a/basctl/source/inc/IDEComboBox.hxx
+++ b/basctl/source/inc/IDEComboBox.hxx
@@ -137,7 +137,6 @@ public:
virtual ~LibBox() override;
virtual void dispose() override;
- using Window::Update;
/*!
* Update selection in ComboBox of macro and dialog Library
*
@@ -242,7 +241,6 @@ public:
virtual ~LanguageBox() override;
virtual void dispose() override;
- using Window::Update;
/*!
* Update selection in ComboBox of macro and dialog Library
*
diff --git a/basctl/source/inc/propbrw.hxx b/basctl/source/inc/propbrw.hxx
index 4f21e2ec7cfd..eb0f5be21eed 100644
--- a/basctl/source/inc/propbrw.hxx
+++ b/basctl/source/inc/propbrw.hxx
@@ -71,7 +71,6 @@ public:
explicit PropBrw (DialogWindowLayout&);
virtual ~PropBrw() override;
virtual void dispose() override;
- using Window::Update;
// note: changing the Context document to an instance other than the one given in the ctor is not supported
// currently
void Update( const SfxViewShell* pShell );
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 9a126059522d..4321e07dc9c9 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -1134,7 +1134,7 @@ IMPL_LINK_NOARG(OAppDetailPageHelper, OnDropdownClickHdl, ToolBox*, void)
MouseEvent aMove( aPoint, 0, MouseEventModifiers::SIMPLEMOVE | MouseEventModifiers::SYNTHETIC );
m_aTBPreview->MouseMove( aMove );
- m_aTBPreview->Update();
+ m_aTBPreview->PaintImmediately();
// execute the menu
css::uno::Reference<css::uno::XComponentContext> xContext(getBorderWin().getView()->getORB());
diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx
index f1bfbf0a2931..b724e866aa59 100644
--- a/dbaccess/source/ui/browser/brwview.cxx
+++ b/dbaccess/source/ui/browser/brwview.cxx
@@ -174,7 +174,7 @@ void UnoDataBrowserView::showStatus( const OUString& _rStatus )
m_pStatus->SetText(_rStatus);
m_pStatus->Show();
Resize();
- Update();
+ PaintImmediately();
}
}
@@ -185,7 +185,7 @@ void UnoDataBrowserView::hideStatus()
return;
m_pStatus->Hide();
Resize();
- Update();
+ PaintImmediately();
}
void UnoDataBrowserView::resizeDocumentView(tools::Rectangle& _rPlayground)
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index 5b1fd6cd772a..d9aa87f38ccd 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -797,7 +797,7 @@ void OJoinTableView::Tracking( const TrackingEvent& rTEvt )
{
Point aMousePos = rTEvt.GetMouseEvent().GetPosPixel();
m_aSizingRect = m_pSizingWin->getSizingRect(aMousePos,m_aOutputSize);
- Update();
+ PaintImmediately();
ShowTracking( m_aSizingRect, ShowTrackFlags::Small | ShowTrackFlags::TrackWindow );
}
}
@@ -1057,7 +1057,7 @@ void OJoinTableView::ScrollWhileDragging()
// redraw DraggingRect
m_aDragRect = tools::Rectangle(m_ptPrevDraggingPos - m_aDragOffset, m_pDragWin->GetSizePixel());
- Update();
+ PaintImmediately();
ShowTracking( m_aDragRect, ShowTrackFlags::Small | ShowTrackFlags::TrackWindow );
}
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index b90254ac7869..ab002e616915 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -820,7 +820,7 @@ bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc
pTabWin->Show();
- pTabWin->Update();
+ pTabWin->PaintImmediately();
// We must call Update() in order to show the connections in the window correctly. This sounds strange,
// but the Listbox has an internal Member which is initialized when the Listbox is first shown (after the Listbox
// is filled in Init). This Member will eventually be needed for
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 2fb7b048231f..888b6a139014 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2304,7 +2304,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
VclPtr<vcl::Window> pCompWindow = VCLUnoHelper::GetWindow(xBackingFrame->getComponentWindow());
if (pCompWindow)
- pCompWindow->Update();
+ pCompWindow->PaintImmediately();
}
}
}
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 0162856b0e36..7616a6dc9ae7 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1305,7 +1305,7 @@ Pair ImpEditView::Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck )
bool bVisCursor = pCrsr->IsVisible();
pCrsr->Hide();
if (pOutWin)
- pOutWin->Update();
+ pOutWin->PaintImmediately();
if ( !IsVertical() )
aVisDocStartPos.Move( -nRealDiffX, -nRealDiffY );
else
@@ -1333,7 +1333,7 @@ Pair ImpEditView::Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck )
}
if (pOutWin)
- pOutWin->Update();
+ pOutWin->PaintImmediately();
pCrsr->SetPos( pCrsr->GetPos() + Point( nRealDiffX, nRealDiffY ) );
if ( bVisCursor )
{
diff --git a/include/svx/float3d.hxx b/include/svx/float3d.hxx
index d6f985ae4912..fb24c7fa1e2a 100644
--- a/include/svx/float3d.hxx
+++ b/include/svx/float3d.hxx
@@ -79,7 +79,6 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC Svx3DWin final : public SfxDockingWindow
{
friend class Svx3DChildWindow;
friend class Svx3DCtrlItem;
- using Window::Update;
private:
std::unique_ptr<weld::ToggleButton> m_xBtnGeo;
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 1a67b8cd797a..e4406f9ef8cd 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1071,7 +1071,7 @@ public:
virtual void PixelInvalidate(const tools::Rectangle* pRectangle);
void Validate();
bool HasPaintEvent() const;
- void Update();
+ void PaintImmediately();
void Flush() override;
// toggles new docking support, enabled via toolkit
diff --git a/reportdesign/source/ui/inc/propbrw.hxx b/reportdesign/source/ui/inc/propbrw.hxx
index 4efe63e15f92..a19eedc0c74e 100644
--- a/reportdesign/source/ui/inc/propbrw.hxx
+++ b/reportdesign/source/ui/inc/propbrw.hxx
@@ -96,8 +96,6 @@ public:
void setCurrentPage(const OUString& _sLastActivePage);
::Size getMinimumSize() const;
-private:
- using Window::Update;
};
} // rptui
diff --git a/reportdesign/source/ui/report/SectionView.cxx b/reportdesign/source/ui/report/SectionView.cxx
index cd9f455d7829..2d35fb1e74aa 100644
--- a/reportdesign/source/ui/report/SectionView.cxx
+++ b/reportdesign/source/ui/report/SectionView.cxx
@@ -106,7 +106,7 @@ void OSectionView::MakeVisible( const tools::Rectangle& rRect, vcl::Window& rWin
nScrollY = -nVisTop;
// scroll window
- rWin.Update();
+ rWin.PaintImmediately();
rWin.Scroll( -nScrollX, -nScrollY );
aMap.SetOrigin( Point( aOrg.X() - nScrollX, aOrg.Y() - nScrollY ) );
rWin.SetMapMode( aMap );
diff --git a/sc/source/ui/view/colrowba.cxx b/sc/source/ui/view/colrowba.cxx
index 9f248168fc5a..ed16810c7065 100644
--- a/sc/source/ui/view/colrowba.cxx
+++ b/sc/source/ui/view/colrowba.cxx
@@ -190,7 +190,7 @@ bool ScColBar::ResizeAllowed() const
void ScColBar::DrawInvert( long nDragPosP )
{
tools::Rectangle aRect( nDragPosP,0, nDragPosP+HDR_SLIDERSIZE-1,GetOutputSizePixel().Width()-1 );
- Update();
+ PaintImmediately();
Invert(aRect);
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list