[Libreoffice-commits] core.git: Branch 'feature/drawinglayercore' - 3308 commits - accessibility/inc accessibility/Library_acc.mk accessibility/source android/source animations/source apple_remote/source autogen.sh avmedia/source basctl/inc basctl/source basctl/uiconfig basegfx/CppunitTest_basegfx.mk basegfx/Library_basegfx.mk basegfx/source basegfx/test basic/CppunitTest_basic_macros.mk basic/inc basic/qa basic/source binaryurp/source bin/check-missing-unittests.py bin/find-can-be-private-symbols.classes.results bin/find-headers-to-move-inside-modules.py bin/find-unneeded-includes bin/find-unused-typedefs.py bin/oss-fuzz-build.sh bin/symbolstore.py bin/ui-converter-skeleton.py bin/ui-rules-enforcer.py bridges/inc bridges/Library_cpp_uno.mk bridges/Module_bridges.mk bridges/source canvas/CppunitTest_canvas_test.mk canvas/Executable_canvasdemo.mk canvas/Library_directx9canvas.mk canvas/Library_gdipluscanvas.mk canvas/Module_canvas.mk canvas/qa canvas/source canvas/StaticLibrary_directxcanvas.mk ca nvas/workben chart2/CppunitTest_chart2_export2.mk chart2/CppunitTest_chart2_export.mk chart2/CppunitTest_chart2_import2.mk chart2/CppunitTest_chart2_import.mk chart2/CppunitTest_chart2_pivot_chart_test.mk chart2/export_setup.mk chart2/import_setup.mk chart2/inc chart2/IwyuFilter_chart2.yaml chart2/Library_chartcore.mk chart2/Module_chart2.mk chart2/qa chart2/source chart2/uiconfig codemaker/source comphelper/qa comphelper/source compilerplugins/clang config_host/config_crypto.h.in config_host/config_features.h.in config_host/config_firebird.h.in config_host/config_oauth2.h.in config_host/config_vclplug.h.in config_host.mk.in configmgr/source configure.ac connectivity/inc connectivity/Module_connectivity.mk connectivity/qa connectivity/source cppcanvas/qa cppcanvas/source cppuhelper/source cppu/qa cppu/source cpputools/source cui/inc cui/Library_cui.mk cui/qa cui/source cui/uiconfig cui/UIConfig_cui.mk dbaccess/CppunitTest_dbaccess_firebird_regression_test.mk dbaccess/CppunitTest_dba ccess_firebird_test.mk dbaccess/inc dbaccess/Module_dbaccess.mk dbaccess/qa dbaccess/source dbaccess/uiconfig desktop/CppunitTest_desktop_app.mk desktop/CppunitTest_desktop_lib.mk desktop/inc desktop/Library_deployment.mk desktop/Library_sofficeapp.mk desktop/qa desktop/source desktop/unx dictionaries distro-configs/CPAndroidBranding.conf distro-configs/Jenkins distro-configs/LibreOfficeAndroidAarch64.conf distro-configs/LibreOfficeAndroid.conf distro-configs/LibreOfficeAndroidX86_64.conf distro-configs/LibreOfficeAndroidX86.conf distro-configs/LibreOfficeCoverity.conf distro-configs/LibreOfficeFlatpak.conf distro-configs/LibreOfficeHaiku.conf distro-configs/LibreOfficeiOS.conf distro-configs/LibreOfficeiOS_Sim.conf distro-configs/LibreOfficeMacOSX.conf distro-configs/LibreOfficeOssFuzz.conf distro-configs/LibreOfficeWASM32.conf distro-configs/LibreOfficeWin32.conf distro-configs/LibreOfficeWin64.conf distro-configs/LibreOfficeWinArm64.conf download.lst drawinglayer/CppunitTest_draw inglayer_border.mk drawinglayer/CppunitTest_drawinglayer_processors.mk drawinglayer/inc drawinglayer/Library_drawinglayercore.mk drawinglayer/Library_drawinglayer.mk drawinglayer/Module_drawinglayer.mk drawinglayer/qa drawinglayer/source editeng/inc editeng/qa editeng/source embeddedobj/CppunitTest_embeddedobj_msole.mk embeddedobj/Module_embeddedobj.mk embeddedobj/qa embeddedobj/source embeddedobj/test embedserv/source emfio/CppunitTest_emfio_emf.mk emfio/inc emfio/Library_emfio.mk emfio/qa emfio/source eventattacher/source extensions/inc extensions/Library_bib.mk extensions/source extensions/uiconfig external/apr external/boost external/breakpad external/cairo external/clucene external/coinmp external/cppunit external/ct2n external/curl external/epm external/expat external/firebird external/fontconfig external/freetype external/gpgmepp external/harfbuzz external/hunspell external/hyphen external/icu external/lcms2 external/libabw external/libassuan external/libatomic_ops external/l ibcdr external/libcmis external/libebook external/libeot external/libepubgen external/libetonyek external/libexttextcat external/libffi external/libfreehand external/libgpg-error external/libjpeg-turbo external/liblangtag external/libmspub external/libmwaw external/libnumbertext external/libodfgen external/liborcus external/libpagemaker external/libqxp external/librevenge external/libstaroffice external/libvisio external/libwpd external/libwpg external/libwps external/libxml2 external/libxslt external/libzmf external/mdds external/mythes external/neon external/openldap external/openssl external/pdfium external/poppler external/postgresql external/python3 external/redland external/skia external/xmlsec external/zxing extras/CustomTarget_tpldraw.mk extras/Package_tpldraw.mk extras/source filter/Configuration_filter.mk filter/Library_pdffilter.mk filter/Library_svgfilter.mk filter/qa filter/source filter/uiconfig forms/inc forms/source formula/inc formula/source fpicker/inc fpicker/sour ce framework/dtd framework/inc framework/Library_fwk.mk framework/qa framework/source g .git-blame-ignore-revs .gitignore .gitpod.dockerfile helpcompiler/Module_helpcompiler.mk helpcompiler/source helpcontent2 hwpfilter/source i18nlangtag/qa i18nlangtag/source i18npool/inc i18npool/Library_localedata_en.mk i18npool/Library_localedata_others.mk i18npool/qa i18npool/source i18nutil/source icon-themes/breeze icon-themes/breeze_dark icon-themes/breeze_dark_svg icon-themes/breeze_svg icon-themes/colibre icon-themes/colibre_svg icon-themes/elementary icon-themes/elementary_svg icon-themes/sifr icon-themes/sifr_dark icon-themes/sifr_dark_svg icon-themes/sifr_svg icon-themes/sukapura icon-themes/sukapura_svg idlc/source idl/source include/avmedia include/basegfx include/basic include/codemaker include/com include/comphelper include/connectivity include/cppuhelper include/dbaccess include/desktop include/drawinglayer include/editeng include/filter include/formula include/framework include/i1 8nlangtag include/i18nutil include/IwyuFilter_include.yaml include/LibreOfficeKit include/o3tl include/oox include/osl include/registry include/rtl include/sal include/sfx2 include/sot include/svl include/svtools include/svx include/test include/toolkit include/tools include/ucbhelper include/uno include/unoidl include/unotest include/unotools include/vbahelper include/vcl include/xmloff include/xmlreader instsetoo_native/util io/Executable_io-testconnection.mk io/Module_io.mk io/source io/test jvmfwk/CppunitTest_jvmfwk_sunversion.mk jvmfwk/Module_jvmfwk.mk jvmfwk/plugins jvmfwk/qa l10ntools/source leak-suppress.txt lingucomponent/source linguistic/source logerrit lotuswordpro/source Makefile.fetch Makefile.in nlpsolver/src nlpsolver/ThirdParty o3tl/qa odk/CustomTarget_build-examples.mk odk/docs odk/examples odk/Package_examples.mk offapi/com offapi/UnoApi_offapi.mk officecfg/registry oox/CppunitTest_oox_drawingml.mk oox/inc oox/Library_oox.mk oox/qa oox/README.md oox/source oox/uti l package/dtd package/inc package/qa package/source postprocess/CustomTarget_registry.mk postprocess/Rdb_services.mk qadevOOo/qa qadevOOo/tests readlicense_oo/license README.help.md README.md README.wasm registry/source reportbuilder/java reportdesign/inc reportdesign/Library_rpt.mk reportdesign/Library_rptxml.mk reportdesign/source reportdesign/uiconfig reportdesign/util RepositoryExternal.mk RepositoryFixes.mk Repository.mk RepositoryModule_build.mk RepositoryModule_host.mk sal/cppunittester sal/CppunitTest_sal_osl.mk sal/Executable_cppunittester.mk sal/osl sal/qa sal/rtl sax/source scaddins/source sccomp/qa sccomp/source sc/CppunitTest_sc_bugfix_test.mk sc/CppunitTest_sc_filters_test.mk sc/CppunitTest_sc_macros_test.mk sc/CppunitTest_sc_parallelism.mk sc/CppunitTest_sc_pdf_export.mk sc/CppunitTest_sc_pivottable_filters_test.mk sc/CppunitTest_sc_subsequent_export-test2.mk sc/CppunitTest_sc_subsequent_export-test.mk sc/CppunitTest_sc_subsequent_export_test.mk sc/CppunitTest_sc_subs equent_filters-test2.mk sc/CppunitTest_sc_subsequent_filters-test.mk sc/CppunitTest_sc_subsequent_filters_test.mk sc/CppunitTest_sc_ucalc_condformat.mk sc/CppunitTest_sc_ucalc_copypaste.mk sc/CppunitTest_sc_ucalc_formula.mk sc/CppunitTest_sc_ucalc.mk sc/CppunitTest_sc_ucalc_pivottable.mk sc/CppunitTest_sc_ucalc_sharedformula.mk sc/CppunitTest_sc_ucalc_sort.mk sc/CppunitTest_sc_uicalc.mk schema/libreoffice schema/odf1.3 sc/inc sc/Library_sc.mk sc/Module_sc.mk scp2/source sc/qa scripting/source sc/sdi sc/source sc/subsequent_setup.mk sc/ucalc_setup.mk sc/uiconfig sc/UIConfig_scalc.mk sc/UITest_csv_dialog.mk sc/UITest_pasteSpecial.mk sc/UITest_textToColumns.mk sd/CppunitTest_sd_export_ooxml1.mk sd/CppunitTest_sd_export_ooxml2.mk sd/CppunitTest_sd_export_tests.mk sd/CppunitTest_sd_export_tests-ooxml1.mk sd/CppunitTest_sd_export_tests-ooxml2.mk sd/CppunitTest_sd_export_tests-ooxml3.mk sd/CppunitTest_sd_import_tests.mk sd/CppunitTest_sd_import_tests_smartart.mk sd/CppunitTest_sd_misc_test s.mk sd/CppunitTest_sd_pdf_import_test.mk sd/CppunitTest_sd_tiledrendering.mk sd/CppunitTest_sd_uimpress.mk sd/export_setup.mk sdext/CppunitTest_sdext_pdfimport.mk sdext/Executable_xpdfimport.mk sdext/source sd/inc sd/Library_sd.mk sd/Module_sd.mk sd/qa sd/sdi sd/source sd/uiconfig sd/UIConfig_simpress.mk sfx2/classification sfx2/inc sfx2/Library_sfx.mk sfx2/Package_classification.mk sfx2/qa sfx2/sdi sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk shell/qa shell/source slideshow/inc slideshow/source solenv/bin solenv/clang-format solenv/CompilerTest_compilerplugins_clang.mk solenv/flatpak-manifest.in solenv/gbuild solenv/gcc-wrappers solenv/gdb solenv/sanitizers solenv/vs soltools/cpp soltools/mkdepend sot/qa sot/source starmath/CppunitTest_starmath_qa_cppunit.mk starmath/inc starmath/Library_sm.mk starmath/qa starmath/source starmath/uiconfig stoc/source stoc/test svgio/CppunitTest_svgio.mk svgio/Library_svgio.mk svgio/qa svgio/source svl/CppunitTest_svl_adrparse.mk svl/CppunitTest_ svl_itempool.mk svl/CppunitTest_svl_items.mk svl/Library_svl.mk svl/Module_svl.mk svl/qa svl/source svtools/inc svtools/IwyuFilter_svtools.yaml svtools/Library_svt.mk svtools/qa svtools/source svtools/uiconfig svx/CppunitTest_svx_removewhichrange.mk svx/CppunitTest_svx_unit.mk svx/Executable_gengal.mk svx/inc svx/Library_svxcore.mk svx/Library_svx.mk svx/Module_svx.mk svx/qa svx/sdi svx/source svx/uiconfig svx/UIConfig_svx.mk svx/util sw/CppunitTest_sw_indexingexport.mk sw/CppunitTest_sw_layoutwriter2.mk sw/CppunitTest_sw_layoutwriter.mk sw/CppunitTest_sw_odfexport2.mk sw/CppunitTest_sw_odfexport.mk sw/CppunitTest_sw_odfimport.mk sw/CppunitTest_sw_ooxmllinks.mk sw/CppunitTest_sw_rtfexport2.mk sw/CppunitTest_sw_rtfexport3.mk sw/CppunitTest_sw_rtfexport4.mk sw/CppunitTest_sw_rtfexport5.mk sw/CppunitTest_sw_rtfexport.mk sw/CppunitTest_sw_txtencexport.mk sw/CppunitTest_sw_uiwriter2.mk sw/CppunitTest_sw_uiwriter3.mk sw/CppunitTest_sw_uiwriter4.mk sw/CppunitTest_sw_uiwriter.mk sw/CppunitT est_sw_uwriter.mk sw/CppunitTest_sw_ww8export2.mk sw/CppunitTest_sw_ww8export3.mk sw/CppunitTest_sw_ww8export.mk sw/inc sw/layoutwriter_setup.mk sw/Library_sw.mk sw/Library_swui.mk sw/Module_sw.mk sw/ooxmlexport_setup.mk sw/qa sw/rtfexport_setup.mk sw/sdi sw/source sw/uiconfig sw/UIConfig_swriter.mk sw/UITest_sw_chart.mk sw/uiwriter_setup.mk sw/util sw/ww8export_setup.mk sysui/desktop test/qa test/source testtools/com testtools/source toolkit/inc toolkit/qa toolkit/source tools/CppunitTest_tools_test.mk tools/inc tools/qa tools/source translations ucbhelper/source ucb/source uitest/demo_ui uitest/impress_tests uitest/math_tests uitest/test_main.py uitest/uitest UnoControls/inc UnoControls/source unodevtools/source unoidl/source unotest/source unotools/Library_utl.mk unotools/qa unotools/source unoxml/inc unoxml/source ure/source uui/inc uui/Library_uui.mk uui/source vbahelper/inc vbahelper/source vcl/android vcl/backendtest vcl/commonfuzzer.mk vcl/CppunitTest_vcl_complextext.mk vcl/ CppunitTest_vcl_svm_test.mk vcl/CppunitTest_vcl_text.mk vcl/Executable_icontest.mk vcl/Executable_mtfdemo.mk vcl/Executable_ui-previewer.mk vcl/Executable_vcldemo.mk vcl/Executable_visualbackendtest.mk vcl/headless vcl/inc vcl/ios vcl/jsdialog vcl/Library_vcl.mk vcl/Library_vclplug_gtk3_kde5.mk vcl/Library_vclplug_gtk3.mk vcl/Library_vclplug_gtk4.mk vcl/Module_vcl.mk vcl/null vcl/osx vcl/qa vcl/qt5 vcl/quartz vcl/skia vcl/source vcl/StaticLibrary_fuzzerstubs.mk vcl/uiconfig vcl/unx vcl/win vcl/WinResTarget_vcl.mk vcl/workben .vscode/vs-code-template.code-workspace.in wasm-qt/CustomTarget_wasm-qt5-mandelbrot_moc.mk wasm-qt/Executable_wasm-qt5-mandelbrot.mk wasm-qt/Makefile wasm-qt/Module_wasm-qt.mk wasm-qt/README wasm-qt/source winaccessibility/source wizards/com wizards/Package_scriptforge.mk wizards/Package_sfdocuments.mk wizards/source writerfilter/CppunitTest_writerfilter_rtftok.mk writerfilter/inc writerfilter/qa writerfilter/source writerperfect/inc writerperfect/qa writerperfe ct/source xmerge/source xmlhelp/README.md xmlhelp/source xmloff/dtd xmloff/inc xmloff/qa xmloff/source xmlscript/dtd xmlscript/qa xmlscript/source xmlsecurity/CppunitTest_xmlsecurity_signing.mk xmlsecurity/inc xmlsecurity/IwyuFilter_xmlsecurity.yaml xmlsecurity/Library_xmlsecurity.mk xmlsecurity/Library_xsec_xmlsec.mk xmlsecurity/Module_xmlsecurity.mk xmlsecurity/qa xmlsecurity/source xmlsecurity/workben
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jul 30 13:38:58 UTC 2021
Rebased ref, commits from common ancestor:
commit 5ecce4ae4e4e8ba4735c36b9d94292cbd769bdf6
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Fri Apr 2 16:11:50 2021 +0900
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Fri Jul 30 22:36:50 2021 +0900
drawinglayer: ITextLayouter and use it as a VisitingParameter
Change-Id: I04aa42716c2bde4a2652d10892b6b2392a20fb3b
diff --git a/basegfx/Library_basegfx.mk b/basegfx/Library_basegfx.mk
index 8359969ae80c..957f1b45ac08 100644
--- a/basegfx/Library_basegfx.mk
+++ b/basegfx/Library_basegfx.mk
@@ -80,6 +80,7 @@ $(eval $(call gb_Library_add_exception_objects,basegfx,\
basegfx/source/vector/b2dvector \
basegfx/source/vector/b2ivector \
basegfx/source/vector/b3dvector \
+ basegfx/source/text/UnoTextLayouter \
))
diff --git a/basegfx/source/text/UnoTextLayouter.cxx b/basegfx/source/text/UnoTextLayouter.cxx
new file mode 100644
index 000000000000..e3f48264c624
--- /dev/null
+++ b/basegfx/source/text/UnoTextLayouter.cxx
@@ -0,0 +1,33 @@
+/* -*- 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 <basegfx/text/UnoTextLayouter.hxx>
+#include <cppuhelper/queryinterface.hxx>
+
+using namespace css;
+
+namespace gfx
+{
+// css::lang::XUnoTunnel
+UNO3_GETIMPLEMENTATION_IMPL(UnoTextLayouter);
+
+std::shared_ptr<gfx::ITextLayouter>
+getTextLayouterFromUno(uno::Reference<graphic::XTextLayouter> const& xTextLayouter)
+{
+ gfx::UnoTextLayouter* pUnoTextLayouter
+ = comphelper::getUnoTunnelImplementation<gfx::UnoTextLayouter>(xTextLayouter);
+ if (pUnoTextLayouter)
+ return pUnoTextLayouter->getTextLayouter();
+
+ return std::shared_ptr<gfx::ITextLayouter>();
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/attribute/fontattribute.cxx b/drawinglayer/source/attribute/fontattribute.cxx
index e423b8367f1c..b14397fe9d87 100644
--- a/drawinglayer/source/attribute/fontattribute.cxx
+++ b/drawinglayer/source/attribute/fontattribute.cxx
@@ -112,15 +112,31 @@ FontAttribute::FontAttribute()
{
}
-FontAttribute::FontAttribute(const FontAttribute&) = default;
+FontAttribute::FontAttribute(const FontAttribute& rOther)
+ : mpFontAttribute(rOther.mpFontAttribute)
+{
+}
+
+FontAttribute::FontAttribute(FontAttribute&& rOther) noexcept
+ : mpFontAttribute(std::move(rOther.mpFontAttribute))
+{
+}
-FontAttribute::FontAttribute(FontAttribute&&) = default;
+FontAttribute::~FontAttribute() {}
-FontAttribute::~FontAttribute() = default;
+FontAttribute& FontAttribute::operator=(const FontAttribute& rOther)
+{
+ mpFontAttribute = rOther.mpFontAttribute;
-FontAttribute& FontAttribute::operator=(const FontAttribute&) = default;
+ return *this;
+}
-FontAttribute& FontAttribute::operator=(FontAttribute&&) = default;
+FontAttribute& FontAttribute::operator=(FontAttribute&& rOther) noexcept
+{
+ mpFontAttribute = std::move(rOther.mpFontAttribute);
+
+ return *this;
+}
bool FontAttribute::operator==(const FontAttribute& rCandidate) const
{
diff --git a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
index f0e677c0cedb..78e2ea02a0eb 100644
--- a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
+++ b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/geometry/RealRectangle2D.hpp>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <drawinglayer/primitive2d/transformprimitive2d.hxx>
+#include <drawinglayer/processor2d/textlayoutdevice.hxx>
#include <drawinglayer/converters.hxx>
#include <comphelper/sequenceashashmap.hxx>
@@ -118,7 +119,8 @@ namespace drawinglayer::unorenderer
}
const geometry::ViewInformation2D aViewInformation2D(aViewInformationSequence);
- primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D);
+ auto pTextLayouter = std::make_shared<drawinglayer::processor2d::TextLayouterDevice>();
+ primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D, pTextLayouter);
const sal_uInt32 nDiscreteWidth(basegfx::fround(o3tl::convert(fWidth, eRangeUnit, o3tl::Length::in) * DPI_X));
const sal_uInt32 nDiscreteHeight(basegfx::fround(o3tl::convert(fHeight, eRangeUnit, o3tl::Length::in) * DPI_Y));
diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx
index 085ccc1b8c58..7ec09582886f 100644
--- a/drawinglayer/source/primitive2d/baseprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/baseprimitive2d.cxx
@@ -23,7 +23,10 @@
#include <drawinglayer/primitive2d/Tools.hxx>
#include <drawinglayer/geometry/viewinformation2d.hxx>
#include <basegfx/utils/canvastools.hxx>
+#include <basegfx/text/UnoTextLayouter.hxx>
#include <comphelper/sequence.hxx>
+#include <drawinglayer/geometry/viewinformation2d.hxx>
+#include <com/sun/star/graphic/XTextLayouter.hpp>
using namespace css;
@@ -85,12 +88,39 @@ void BasePrimitive2D::get2DDecomposition(Primitive2DDecompositionVisitor& /*rVis
{
}
+namespace
+{
+std::shared_ptr<gfx::ITextLayouter>
+getTextLayouter(const uno::Sequence<beans::PropertyValue>& rProperties)
+{
+ std::shared_ptr<gfx::ITextLayouter> pTextLayouter;
+
+ if (!rProperties.hasElements())
+ return pTextLayouter;
+
+ for (const beans::PropertyValue& rProperty : rProperties)
+ {
+ if (rProperty.Name == "TextLayouter")
+ {
+ uno::Reference<graphic::XTextLayouter> xTextLayouter;
+ rProperty.Value >>= xTextLayouter;
+ if (xTextLayouter.is())
+ pTextLayouter = gfx::getTextLayouterFromUno(xTextLayouter);
+ return pTextLayouter;
+ }
+ }
+ return pTextLayouter;
+}
+
+} // end anonymous namespace
+
css::uno::Sequence<::css::uno::Reference<::css::graphic::XPrimitive2D>> SAL_CALL
BasePrimitive2D::getDecomposition(const uno::Sequence<beans::PropertyValue>& rViewParameters)
{
Primitive2DContainer aContainer;
geometry::ViewInformation2D aViewInformation2D(rViewParameters);
- VisitingParameters aParameters(aViewInformation2D);
+ std::shared_ptr<gfx::ITextLayouter> pTextLayouter = getTextLayouter(rViewParameters);
+ VisitingParameters aParameters(aViewInformation2D, pTextLayouter);
get2DDecomposition(aContainer, aParameters);
return comphelper::containerToSequence(aContainer);
}
@@ -99,7 +129,8 @@ css::geometry::RealRectangle2D SAL_CALL
BasePrimitive2D::getRange(const uno::Sequence<beans::PropertyValue>& rViewParameters)
{
geometry::ViewInformation2D aViewInformation2D(rViewParameters);
- VisitingParameters aParameters(aViewInformation2D);
+ std::shared_ptr<gfx::ITextLayouter> pTextLayouter = getTextLayouter(rViewParameters);
+ VisitingParameters aParameters(aViewInformation2D, pTextLayouter);
return basegfx::unotools::rectangle2DFromB2DRectangle(getB2DRange(aParameters));
}
diff --git a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
index 0cfa014bb13e..09ae46a2230f 100644
--- a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
@@ -107,7 +107,7 @@ namespace drawinglayer::primitive2d
const primitive2d::Primitive2DContainer xEmbedSeq { xEmbedRef };
const geometry::ViewInformation2D aViewInformation2D;
- primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D);
+ primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D, rParameters.getTextLayouter());
const BitmapEx aBitmapEx(
convertToBitmapEx(
diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx
index fdf81482aa32..e3b25a1f1beb 100644
--- a/drawinglayer/source/primitive2d/textprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx
@@ -111,9 +111,10 @@ void TextSimplePortionPrimitive2D::getTextOutlinesAndTransformation(
const basegfx::B2DVector aFontScale(getCorrectedScaleAndFontScale(aScale));
// prepare textlayoutdevice
- drawinglayer::processor2d::TextLayouterDevice aTextLayouter;
- aTextLayouter.setFontAttribute(getFontAttribute(), aFontScale.getX(), aFontScale.getY(),
- getLocale());
+ std::unique_ptr<gfx::ITextLayouter> pTextLayouter
+ = std::make_unique<drawinglayer::processor2d::TextLayouterDevice>();
+ pTextLayouter->setFontAttribute(getFontAttribute(), aFontScale.getX(), aFontScale.getY(),
+ getLocale());
// When getting outlines from stretched text (aScale.getX() != 1.0) it
// is necessary to inverse-scale the DXArray (if used) to not get the
@@ -129,14 +130,14 @@ void TextSimplePortionPrimitive2D::getTextOutlinesAndTransformation(
}
// get the text outlines
- aTextLayouter.getTextOutlines(rTarget, getText(), getTextPosition(), getTextLength(),
- aScaledDXArray);
+ pTextLayouter->getTextOutlines(rTarget, getText(), getTextPosition(), getTextLength(),
+ aScaledDXArray);
}
else
{
// get the text outlines
- aTextLayouter.getTextOutlines(rTarget, getText(), getTextPosition(), getTextLength(),
- getDXArray());
+ pTextLayouter->getTextOutlines(rTarget, getText(), getTextPosition(), getTextLength(),
+ getDXArray());
}
// create primitives for the outlines
diff --git a/drawinglayer/source/processor2d/contourextractor2d.cxx b/drawinglayer/source/processor2d/contourextractor2d.cxx
index 5b9adf4c0ab1..919c09cfe430 100644
--- a/drawinglayer/source/processor2d/contourextractor2d.cxx
+++ b/drawinglayer/source/processor2d/contourextractor2d.cxx
@@ -131,7 +131,7 @@ namespace drawinglayer::processor2d
getViewInformation2D().getVisualizedPage(),
getViewInformation2D().getViewTime(),
getViewInformation2D().getExtendedInformationSequence());
- primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D);
+ primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D, maVisitingParameters.getTextLayouter());
updateVisitingParameters(aVisitingParameters);
// process content
diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
index a41037426b09..ffc6c466064f 100644
--- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
@@ -240,7 +240,7 @@ namespace drawinglayer::processor2d
getViewInformation2D().getVisualizedPage(),
getViewInformation2D().getViewTime(),
getViewInformation2D().getExtendedInformationSequence());
- primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D);
+ primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D, maVisitingParameters.getTextLayouter());
updateVisitingParameters(aVisitingParameters);
// process child content recursively
diff --git a/drawinglayer/source/processor2d/linegeometryextractor2d.cxx b/drawinglayer/source/processor2d/linegeometryextractor2d.cxx
index cd4593b2a3a9..8a173b21fd01 100644
--- a/drawinglayer/source/processor2d/linegeometryextractor2d.cxx
+++ b/drawinglayer/source/processor2d/linegeometryextractor2d.cxx
@@ -94,7 +94,7 @@ namespace drawinglayer::processor2d
getViewInformation2D().getViewTime(),
getViewInformation2D().getExtendedInformationSequence());
- primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D);
+ primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D, maVisitingParameters.getTextLayouter());
updateVisitingParameters(aVisitingParameters);
// process content
diff --git a/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx b/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx
index 5eb6c9f9c8ff..bc60998f2d03 100644
--- a/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx
+++ b/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx
@@ -185,7 +185,7 @@ namespace drawinglayer::processor2d
getViewInformation2D().getViewTime(),
getViewInformation2D().getExtendedInformationSequence());
- primitive2d::VisitingParameters aParameters(aViewInformation2D);
+ primitive2d::VisitingParameters aParameters(aViewInformation2D, maVisitingParameters.getTextLayouter());
updateVisitingParameters(aParameters);
// process content
diff --git a/drawinglayer/source/processor2d/textlayoutdevice.cxx b/drawinglayer/source/processor2d/textlayoutdevice.cxx
index 759a5757c8a2..1af699d766ee 100644
--- a/drawinglayer/source/processor2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/processor2d/textlayoutdevice.cxx
@@ -164,6 +164,14 @@ TextLayouterDevice::~TextLayouterDevice() COVERITY_NOEXCEPT_FALSE { releaseGloba
void TextLayouterDevice::setFont(const vcl::Font& rFont) { mrDevice.SetFont(rFont); }
+void TextLayouterDevice::setFontAttribute(const gfx::IFontAttribute& rFontAttribute,
+ double fFontScaleX, double fFontScaleY,
+ const css::lang::Locale& rLocale)
+{
+ auto rFontA = dynamic_cast<attribute::FontAttribute const&>(rFontAttribute);
+ setFontAttribute(rFontA, fFontScaleX, fFontScaleY, rLocale);
+}
+
void TextLayouterDevice::setFontAttribute(const attribute::FontAttribute& rFontAttribute,
double fFontScaleX, double fFontScaleY,
const css::lang::Locale& rLocale)
@@ -342,8 +350,8 @@ std::vector<double> TextLayouterDevice::getCaretPositions(const OUString& rText,
// helper methods for vcl font handling
-vcl::Font getVclFontFromFontAttribute(const attribute::FontAttribute& rFontAttribute,
- double fFontScaleX, double fFontScaleY, double fFontRotation,
+vcl::Font getVclFontFromFontAttribute(const gfx::IFontAttribute& rFontAttribute, double fFontScaleX,
+ double fFontScaleY, double fFontRotation,
const css::lang::Locale& rLocale)
{
// detect FontScaling
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 042bb4e5f54c..25a72a44fbba 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -2311,7 +2311,8 @@ void VclMetafileProcessor2D::processTransparencePrimitive2D(
getViewInformation2D().getVisualizedPage(), getViewInformation2D().getViewTime(),
getViewInformation2D().getExtendedInformationSequence());
- primitive2d::VisitingParameters aVisitingParameters(aViewInfo);
+ primitive2d::VisitingParameters aVisitingParameters(
+ aViewInfo, maVisitingParameters.getTextLayouter());
VclPixelProcessor2D aBufferProcessor(aVisitingParameters, *aBufferDevice);
@@ -2451,7 +2452,8 @@ void VclMetafileProcessor2D::processPrimitive2DOnPixelProcessor(
auto pBufferDevice(CreateBufferDevice(aViewRange, aViewInfo, aRectLogic, aSizePixel));
if (pBufferDevice)
{
- primitive2d::VisitingParameters aVisitingParameters(aViewInfo);
+ primitive2d::VisitingParameters aVisitingParameters(aViewInfo,
+ maVisitingParameters.getTextLayouter());
VclPixelProcessor2D aBufferProcessor(aVisitingParameters, *pBufferDevice,
maBColorModifierStack);
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 5489e56d0c19..a2a33986a3c9 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -907,7 +907,8 @@ void VclProcessor2D::RenderTransformPrimitive2D(
getViewInformation2D().getViewTransformation(), getViewInformation2D().getViewport(),
getViewInformation2D().getVisualizedPage(), getViewInformation2D().getViewTime(),
getViewInformation2D().getExtendedInformationSequence());
- primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D);
+ primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D,
+ maVisitingParameters.getTextLayouter());
updateVisitingParameters(aVisitingParameters);
// process content
@@ -931,7 +932,8 @@ void VclProcessor2D::RenderPagePreviewPrimitive2D(
getViewInformation2D().getViewTransformation(), getViewInformation2D().getViewport(),
rPagePreviewCandidate.getXDrawPage(), getViewInformation2D().getViewTime(),
getViewInformation2D().getExtendedInformationSequence());
- primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D);
+ primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D,
+ maVisitingParameters.getTextLayouter());
updateVisitingParameters(aVisitingParameters);
// process decomposed content
diff --git a/drawinglayer/source/tools/primitive2dxmldump.cxx b/drawinglayer/source/tools/primitive2dxmldump.cxx
index e347e102c616..8c18973e1b8a 100644
--- a/drawinglayer/source/tools/primitive2dxmldump.cxx
+++ b/drawinglayer/source/tools/primitive2dxmldump.cxx
@@ -36,6 +36,7 @@
#include <drawinglayer/geometry/viewinformation2d.hxx>
#include <drawinglayer/attribute/lineattribute.hxx>
#include <drawinglayer/attribute/fontattribute.hxx>
+#include <drawinglayer/processor2d/textlayoutdevice.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
@@ -209,7 +210,8 @@ void Primitive2dXmlDump::decomposeAndWrite(
::tools::XmlWriter& rWriter)
{
drawinglayer::geometry::ViewInformation2D aInfo;
- drawinglayer::primitive2d::VisitingParameters aVisitingParameters(aInfo);
+ auto pTextLayouter = std::make_shared<drawinglayer::processor2d::TextLayouterDevice>();
+ drawinglayer::primitive2d::VisitingParameters aVisitingParameters(aInfo, pTextLayouter);
for (size_t i = 0; i < rPrimitive2DSequence.size(); i++)
{
diff --git a/include/basegfx/text/ITextLayouter.hxx b/include/basegfx/text/ITextLayouter.hxx
new file mode 100644
index 000000000000..26ce4697e275
--- /dev/null
+++ b/include/basegfx/text/ITextLayouter.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#pragma once
+
+#include <sal/config.h>
+#include <basegfx/basegfxdllapi.h>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+
+namespace com::sun::star::lang
+{
+struct Locale;
+}
+
+namespace gfx
+{
+class BASEGFX_DLLPUBLIC IFontAttribute
+{
+public:
+ virtual ~IFontAttribute() {}
+
+ virtual const OUString& getFamilyName() const = 0;
+ virtual const OUString& getStyleName() const = 0;
+ virtual sal_uInt16 getWeight() const = 0;
+ virtual bool getSymbol() const = 0;
+ virtual bool getVertical() const = 0;
+ virtual bool getItalic() const = 0;
+ virtual bool getOutline() const = 0;
+ virtual bool getRTL() const = 0;
+ virtual bool getBiDiStrong() const = 0;
+ virtual bool getMonospaced() const = 0;
+};
+
+class BASEGFX_DLLPUBLIC ITextLayouter
+{
+public:
+ virtual ~ITextLayouter() {}
+
+ virtual void setFontAttribute(IFontAttribute const& rFontAttribute, double fFontScaleX,
+ double fFontScaleY, const css::lang::Locale& rLocale)
+ = 0;
+
+ virtual void getTextOutlines(basegfx::B2DPolyPolygonVector& rB2DPolyPolyVector,
+ const OUString& rText, sal_uInt32 nIndex, sal_uInt32 nLength,
+ const std::vector<double>& rDXArray) const = 0;
+};
+
+} // end namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/basegfx/text/UnoTextLayouter.hxx b/include/basegfx/text/UnoTextLayouter.hxx
new file mode 100644
index 000000000000..f8b0f250edee
--- /dev/null
+++ b/include/basegfx/text/UnoTextLayouter.hxx
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#pragma once
+
+#include <cppuhelper/implbase.hxx>
+#include <cppuhelper/supportsservice.hxx>
+#include <comphelper/servicehelper.hxx>
+
+#include <com/sun/star/graphic/XTextLayouter.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+
+#include <basegfx/text/ITextLayouter.hxx>
+#include <basegfx/basegfxdllapi.h>
+
+namespace gfx
+{
+BASEGFX_DLLPUBLIC std::shared_ptr<gfx::ITextLayouter>
+getTextLayouterFromUno(css::uno::Reference<css::graphic::XTextLayouter> const& xTextLayouter);
+
+class UnoTextLayouter final
+ : public cppu::WeakImplHelper<css::graphic::XTextLayouter, css::lang::XUnoTunnel>
+{
+private:
+ std::shared_ptr<gfx::ITextLayouter> mpTextLayouter;
+
+public:
+ UnoTextLayouter() {}
+
+ UnoTextLayouter(std::shared_ptr<gfx::ITextLayouter> const& rTextLayouter)
+ : mpTextLayouter(rTextLayouter)
+ {
+ }
+
+ std::shared_ptr<gfx::ITextLayouter> const& getTextLayouter() const { return mpTextLayouter; }
+
+ void setTextLayouter(std::shared_ptr<gfx::ITextLayouter> const& rTextLayouter)
+ {
+ mpTextLayouter = rTextLayouter;
+ }
+
+ UNO3_GETIMPLEMENTATION_DECL(UnoTextLayouter)
+};
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/drawinglayer/attribute/fontattribute.hxx b/include/drawinglayer/attribute/fontattribute.hxx
index 1a7250170b6e..ed0be642f615 100644
--- a/include/drawinglayer/attribute/fontattribute.hxx
+++ b/include/drawinglayer/attribute/fontattribute.hxx
@@ -23,6 +23,8 @@
#include <o3tl/cow_wrapper.hxx>
#include <rtl/ustring.hxx>
+#include <basegfx/text/ITextLayouter.hxx>
+
namespace drawinglayer::attribute
{
class ImpFontAttribute;
@@ -35,7 +37,7 @@ namespace drawinglayer::attribute
This attribute class is able to hold all parameters needed/used
to completely define the parametrisation of a text portion.
*/
-class DRAWINGLAYER_DLLPUBLIC FontAttribute
+class DRAWINGLAYER_DLLPUBLIC FontAttribute : public gfx::IFontAttribute
{
public:
typedef o3tl::cow_wrapper<ImpFontAttribute> ImplType;
@@ -50,26 +52,26 @@ public:
bool bMonospaced = false, bool bOutline = false, bool bRTL = false,
bool bBiDiStrong = false);
FontAttribute();
- FontAttribute(const FontAttribute&);
- FontAttribute(FontAttribute&&);
- FontAttribute& operator=(const FontAttribute&);
- FontAttribute& operator=(FontAttribute&&);
- ~FontAttribute();
+ FontAttribute(const FontAttribute& rOther);
+ FontAttribute(FontAttribute&& rOther) noexcept;
+ FontAttribute& operator=(const FontAttribute& rOther);
+ FontAttribute& operator=(FontAttribute&& rOther) noexcept;
+ virtual ~FontAttribute();
// compare operator
bool operator==(const FontAttribute& rCandidate) const;
/// data read access
- const OUString& getFamilyName() const;
- const OUString& getStyleName() const;
- sal_uInt16 getWeight() const;
- bool getSymbol() const;
- bool getVertical() const;
- bool getItalic() const;
- bool getOutline() const;
- bool getRTL() const;
- bool getBiDiStrong() const;
- bool getMonospaced() const;
+ const OUString& getFamilyName() const override;
+ const OUString& getStyleName() const override;
+ sal_uInt16 getWeight() const override;
+ bool getSymbol() const override;
+ bool getVertical() const override;
+ bool getItalic() const override;
+ bool getOutline() const override;
+ bool getRTL() const override;
+ bool getBiDiStrong() const override;
+ bool getMonospaced() const override;
};
} // end of namespace drawinglayer::attribute
diff --git a/include/drawinglayer/primitive2d/baseprimitive2d.hxx b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
index 486bf031daf7..69ff76ae0c4c 100644
--- a/include/drawinglayer/primitive2d/baseprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
@@ -30,6 +30,7 @@
#include <cppuhelper/basemutex.hxx>
#include <basegfx/range/b2drange.hxx>
#include <com/sun/star/graphic/XPrimitive2D.hpp>
+#include <basegfx/text/ITextLayouter.hxx>
#include <drawinglayer/geometry/viewinformation2d.hxx>
@@ -39,10 +40,13 @@ class DRAWINGLAYERCORE_DLLPUBLIC VisitingParameters
{
private:
geometry::ViewInformation2D maViewInformation;
+ std::shared_ptr<gfx::ITextLayouter> mpTextLayouter;
public:
- explicit VisitingParameters(const geometry::ViewInformation2D& rViewInformation)
+ explicit VisitingParameters(geometry::ViewInformation2D const& rViewInformation,
+ std::shared_ptr<gfx::ITextLayouter> const& pTextLayouter)
: maViewInformation(rViewInformation)
+ , mpTextLayouter(pTextLayouter)
{
}
@@ -54,6 +58,8 @@ public:
}
const geometry::ViewInformation2D& getViewInformation() const { return maViewInformation; }
+
+ const std::shared_ptr<gfx::ITextLayouter>& getTextLayouter() const { return mpTextLayouter; }
};
typedef cppu::WeakComponentImplHelper<css::graphic::XPrimitive2D, css::util::XAccounting>
diff --git a/include/drawinglayer/processor2d/baseprocessor2d.hxx b/include/drawinglayer/processor2d/baseprocessor2d.hxx
index 802434fd9009..c723c5c0c619 100644
--- a/include/drawinglayer/processor2d/baseprocessor2d.hxx
+++ b/include/drawinglayer/processor2d/baseprocessor2d.hxx
@@ -24,7 +24,7 @@
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
#include <drawinglayer/geometry/viewinformation2d.hxx>
-
+#include <basegfx/text/ITextLayouter.hxx>
namespace drawinglayer::processor2d
{
diff --git a/include/drawinglayer/processor2d/textlayoutdevice.hxx b/include/drawinglayer/processor2d/textlayoutdevice.hxx
index ddcdf06bc0dd..edcefec190e1 100644
--- a/include/drawinglayer/processor2d/textlayoutdevice.hxx
+++ b/include/drawinglayer/processor2d/textlayoutdevice.hxx
@@ -25,6 +25,7 @@
#include <vector>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <vcl/svapp.hxx>
+#include <basegfx/text/ITextLayouter.hxx>
// predefines
class VirtualDevice;
@@ -58,7 +59,7 @@ namespace drawinglayer::processor2d
When in the future FontHandling may move to an own library independent
from VCL, primitives will be prepared.
*/
-class DRAWINGLAYER_DLLPUBLIC TextLayouterDevice
+class DRAWINGLAYER_DLLPUBLIC TextLayouterDevice : public gfx::ITextLayouter
{
/// internally used VirtualDevice
SolarMutexGuard maSolarGuard;
@@ -71,6 +72,10 @@ public:
/// tooling methods
void setFont(const vcl::Font& rFont);
+
+ void setFontAttribute(const gfx::IFontAttribute& rFontAttribute, double fFontScaleX,
+ double fFontScaleY, const css::lang::Locale& rLocale) override;
+
void setFontAttribute(const attribute::FontAttribute& rFontAttribute, double fFontScaleX,
double fFontScaleY, const css::lang::Locale& rLocale);
@@ -84,7 +89,7 @@ public:
double getTextWidth(const OUString& rText, sal_uInt32 nIndex, sal_uInt32 nLength) const;
void getTextOutlines(basegfx::B2DPolyPolygonVector&, const OUString& rText, sal_uInt32 nIndex,
- sal_uInt32 nLength, const ::std::vector<double>& rDXArray) const;
+ sal_uInt32 nLength, const ::std::vector<double>& rDXArray) const override;
basegfx::B2DRange getTextBoundRect(const OUString& rText, sal_uInt32 nIndex,
sal_uInt32 nLength) const;
@@ -111,7 +116,7 @@ public:
fFontScaleY == fFontScaleX
*/
vcl::Font DRAWINGLAYER_DLLPUBLIC getVclFontFromFontAttribute(
- const attribute::FontAttribute& rFontAttribute, double fFontScaleX, double fFontScaleY,
+ const gfx::IFontAttribute& rFontAttribute, double fFontScaleX, double fFontScaleY,
double fFontRotation, const css::lang::Locale& rLocale);
/** Generate FontAttribute DataSet derived from the given VCL-Font.
diff --git a/offapi/com/sun/star/graphic/XTextLayouter.idl b/offapi/com/sun/star/graphic/XTextLayouter.idl
new file mode 100644
index 000000000000..c518558d49cf
--- /dev/null
+++ b/offapi/com/sun/star/graphic/XTextLayouter.idl
@@ -0,0 +1,30 @@
+/* -*- 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/.
+ *
+ */
+
+#ifndef com_sun_star_graphic_XTextLayouter_idl
+#define com_sun_star_graphic_XTextLayouter_idl
+
+#include <com/sun/star/uno/XInterface.idl>
+
+module com { module sun { module star { module graphic
+{
+
+/** Text layouter interface
+*/
+
+interface XTextLayouter : ::com::sun::star::uno::XInterface
+{
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit ad9c13b339dfa3a20dd6f53f3f71e71dfd952d43
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Fri Feb 19 17:37:22 2021 +0900
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Fri Jul 30 22:34:49 2021 +0900
drawinglayer: move TextLayouter to processor2d
Change-Id: I87c7fafb51f108dcf58e7ddb97595f6488d884a0
diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk
index fcb5a876dd8c..f000ac78f692 100644
--- a/drawinglayer/Library_drawinglayer.mk
+++ b/drawinglayer/Library_drawinglayer.mk
@@ -96,7 +96,6 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
drawinglayer/source/primitive2d/textdecoratedprimitive2d \
drawinglayer/source/primitive2d/texteffectprimitive2d \
drawinglayer/source/primitive2d/texthierarchyprimitive2d \
- drawinglayer/source/primitive2d/textlayoutdevice \
drawinglayer/source/primitive2d/textlineprimitive2d \
drawinglayer/source/primitive2d/textprimitive2d \
drawinglayer/source/primitive2d/textstrikeoutprimitive2d \
@@ -131,6 +130,7 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
drawinglayer/source/processor2d/objectinfoextractor2d \
drawinglayer/source/processor2d/processorfromoutputdevice \
drawinglayer/source/processor2d/textaspolygonextractor2d \
+ drawinglayer/source/processor2d/textlayoutdevice \
drawinglayer/source/processor2d/vclhelperbufferdevice \
drawinglayer/source/processor2d/vclmetafileprocessor2d \
drawinglayer/source/processor2d/vclpixelprocessor2d \
diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
index 0c146648feae..1fc071004d7a 100644
--- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
@@ -59,7 +59,7 @@ namespace drawinglayer::primitive2d
return;
// common preparations
- TextLayouterDevice aTextLayouter;
+ drawinglayer::processor2d::TextLayouterDevice aTextLayouter;
// TextLayouterDevice is needed to get metrics for text decorations like
// underline/strikeout/emphasis marks from it. For setup, the font size is needed
diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx
index dd146316f810..fdf81482aa32 100644
--- a/drawinglayer/source/primitive2d/textprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx
@@ -18,7 +18,7 @@
*/
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
-#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
+#include <drawinglayer/processor2d/textlayoutdevice.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <drawinglayer/primitive2d/PolyPolygonColorPrimitive2D.hxx>
#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
@@ -111,7 +111,7 @@ void TextSimplePortionPrimitive2D::getTextOutlinesAndTransformation(
const basegfx::B2DVector aFontScale(getCorrectedScaleAndFontScale(aScale));
// prepare textlayoutdevice
- TextLayouterDevice aTextLayouter;
+ drawinglayer::processor2d::TextLayouterDevice aTextLayouter;
aTextLayouter.setFontAttribute(getFontAttribute(), aFontScale.getX(), aFontScale.getY(),
getLocale());
@@ -271,7 +271,7 @@ TextSimplePortionPrimitive2D::getB2DRange(VisitingParameters const& /*rParameter
const basegfx::B2DVector aFontScale(getCorrectedScaleAndFontScale(aScale));
// prepare textlayoutdevice
- TextLayouterDevice aTextLayouter;
+ drawinglayer::processor2d::TextLayouterDevice aTextLayouter;
aTextLayouter.setFontAttribute(getFontAttribute(), aFontScale.getX(), aFontScale.getY(),
getLocale());
diff --git a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx
index 49593bee4632..8ab796df0462 100644
--- a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx
@@ -18,7 +18,7 @@
*/
#include <primitive2d/textstrikeoutprimitive2d.hxx>
-#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
+#include <drawinglayer/processor2d/textlayoutdevice.hxx>
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
@@ -68,7 +68,7 @@ namespace drawinglayer::primitive2d
getObjectTransformation().decompose(aScale, aTranslate, fRotate, fShearX);
// prepare TextLayouter
- TextLayouterDevice aTextLayouter;
+ drawinglayer::processor2d::TextLayouterDevice aTextLayouter;
aTextLayouter.setFontAttribute(
getFontAttribute(),
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/processor2d/textlayoutdevice.cxx
similarity index 99%
rename from drawinglayer/source/primitive2d/textlayoutdevice.cxx
rename to drawinglayer/source/processor2d/textlayoutdevice.cxx
index 933476b2045a..759a5757c8a2 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/processor2d/textlayoutdevice.cxx
@@ -23,7 +23,7 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <drawinglayer/attribute/fontattribute.hxx>
-#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
+#include <drawinglayer/processor2d/textlayoutdevice.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/unique_disposing_ptr.hxx>
#include <osl/diagnose.h>
@@ -36,7 +36,7 @@
#include <i18nlangtag/languagetag.hxx>
#include <vcl/svapp.hxx>
-namespace drawinglayer::primitive2d
+namespace drawinglayer::processor2d
{
namespace
{
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index f62bfeaf4dbe..5489e56d0c19 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -53,7 +53,7 @@
// for support of Title/Description in all apps when embedding pictures
#include <drawinglayer/primitive2d/objectinfoprimitive2d.hxx>
// control support
-#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
+#include <drawinglayer/processor2d/textlayoutdevice.hxx>
#include <drawinglayer/primitive2d/pointarrayprimitive2d.hxx>
#include <drawinglayer/primitive2d/epsprimitive2d.hxx>
@@ -125,7 +125,7 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
&& basegfx::fTools::more(aFontScaling.getY(), 0.0))
{
// Get the VCL font (use FontHeight as FontWidth)
- vcl::Font aFont(primitive2d::getVclFontFromFontAttribute(
+ vcl::Font aFont(processor2d::getVclFontFromFontAttribute(
rTextCandidate.getFontAttribute(), aFontScaling.getX(), aFontScaling.getY(),
fRotate, rTextCandidate.getLocale()));
diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx b/drawinglayer/source/tools/wmfemfhelper.cxx
index ea7cd1d395be..5be052c0f64f 100644
--- a/drawinglayer/source/tools/wmfemfhelper.cxx
+++ b/drawinglayer/source/tools/wmfemfhelper.cxx
@@ -39,7 +39,7 @@
#include <drawinglayer/primitive2d/invertprimitive2d.hxx>
#include <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx>
#include <primitive2d/wallpaperprimitive2d.hxx>
-#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
+#include <drawinglayer/processor2d/textlayoutdevice.hxx>
#include <drawinglayer/primitive2d/textdecoratedprimitive2d.hxx>
#include <primitive2d/textlineprimitive2d.hxx>
#include <primitive2d/textstrikeoutprimitive2d.hxx>
@@ -1067,7 +1067,7 @@ namespace wmfemfhelper
const vcl::Font& rFont = rProperty.getFont();
basegfx::B2DVector aFontScaling;
- rFontAttribute = drawinglayer::primitive2d::getFontAttributeFromVclFont(
+ rFontAttribute = drawinglayer::processor2d::getFontAttributeFromVclFont(
aFontScaling,
rFont,
bool(rProperty.getLayoutMode() & ComplexTextLayoutFlags::BiDiRtl),
@@ -1079,7 +1079,7 @@ namespace wmfemfhelper
// take text align into account
if(ALIGN_BASELINE != rFont.GetAlignment())
{
- drawinglayer::primitive2d::TextLayouterDevice aTextLayouterDevice;
+ drawinglayer::processor2d::TextLayouterDevice aTextLayouterDevice;
aTextLayouterDevice.setFont(rFont);
if(ALIGN_TOP == rFont.GetAlignment())
@@ -1231,7 +1231,7 @@ namespace wmfemfhelper
if(pResult && rProperty.getTextFillColorActive())
{
// text background is requested, add and encapsulate both to new primitive
- drawinglayer::primitive2d::TextLayouterDevice aTextLayouterDevice;
+ drawinglayer::processor2d::TextLayouterDevice aTextLayouterDevice;
aTextLayouterDevice.setFont(rFont);
// get text width
@@ -1341,7 +1341,7 @@ namespace wmfemfhelper
aTextTransform.translate(rAction.GetStartPoint().X(), rAction.GetStartPoint().Y());
// prepare TextLayouter (used in most cases)
- drawinglayer::primitive2d::TextLayouterDevice aTextLayouter;
+ drawinglayer::processor2d::TextLayouterDevice aTextLayouter;
aTextLayouter.setFont(rProperty.getFont());
if(bOverlineUsed)
@@ -1885,7 +1885,7 @@ namespace wmfemfhelper
if(nTextLength && rPropertyHolders.Current().getTextColorActive())
{
- drawinglayer::primitive2d::TextLayouterDevice aTextLayouterDevice;
+ drawinglayer::processor2d::TextLayouterDevice aTextLayouterDevice;
aTextLayouterDevice.setFont(rPropertyHolders.Current().getFont());
std::vector< double > aTextArray(
@@ -1947,7 +1947,7 @@ namespace wmfemfhelper
// Since AddTextRectActions is the only way as long as we do not have
// a simple text layouter available, i will try to add it to the
// TextLayouterDevice isolation.
- drawinglayer::primitive2d::TextLayouterDevice aTextLayouterDevice;
+ drawinglayer::processor2d::TextLayouterDevice aTextLayouterDevice;
aTextLayouterDevice.setFont(rPropertyHolders.Current().getFont());
GDIMetaFile aGDIMetaFile;
diff --git a/include/drawinglayer/primitive2d/textbreakuphelper.hxx b/include/drawinglayer/primitive2d/textbreakuphelper.hxx
index de233da8ea07..afe15f45f711 100644
--- a/include/drawinglayer/primitive2d/textbreakuphelper.hxx
+++ b/include/drawinglayer/primitive2d/textbreakuphelper.hxx
@@ -21,7 +21,7 @@
#include <drawinglayer/drawinglayerdllapi.h>
#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
-#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
+#include <drawinglayer/processor2d/textlayoutdevice.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
namespace drawinglayer::primitive2d { class TextSimplePortionPrimitive2D; }
@@ -40,7 +40,7 @@ namespace drawinglayer::primitive2d
private:
const TextSimplePortionPrimitive2D& mrSource;
Primitive2DContainer mxResult;
- TextLayouterDevice maTextLayouter;
+ drawinglayer::processor2d::TextLayouterDevice maTextLayouter;
basegfx::utils::B2DHomMatrixBufferedOnDemandDecompose maDecTrans;
bool mbNoDXArray : 1;
@@ -58,7 +58,7 @@ namespace drawinglayer::primitive2d
virtual bool allowChange(sal_uInt32 nCount, basegfx::B2DHomMatrix& rNewTransform, sal_uInt32 nIndex, sal_uInt32 nLength);
/// allow read access to evtl. useful local parts
- const TextLayouterDevice& getTextLayouter() const { return maTextLayouter; }
+ const drawinglayer::processor2d::TextLayouterDevice& getTextLayouter() const { return maTextLayouter; }
const TextSimplePortionPrimitive2D& getSource() const { return mrSource; }
public:
diff --git a/include/drawinglayer/primitive2d/textlayoutdevice.hxx b/include/drawinglayer/processor2d/textlayoutdevice.hxx
similarity index 98%
rename from include/drawinglayer/primitive2d/textlayoutdevice.hxx
rename to include/drawinglayer/processor2d/textlayoutdevice.hxx
index 93587769c449..ddcdf06bc0dd 100644
--- a/include/drawinglayer/primitive2d/textlayoutdevice.hxx
+++ b/include/drawinglayer/processor2d/textlayoutdevice.hxx
@@ -49,7 +49,7 @@ struct Locale;
// access to one global impTimedRefDev incarnation in namespace drawinglayer::primitive
-namespace drawinglayer::primitive2d
+namespace drawinglayer::processor2d
{
/** TextLayouterDevice class
@@ -122,6 +122,6 @@ vcl::Font DRAWINGLAYER_DLLPUBLIC getVclFontFromFontAttribute(
attribute::FontAttribute DRAWINGLAYER_DLLPUBLIC getFontAttributeFromVclFont(
basegfx::B2DVector& o_rSize, const vcl::Font& rFont, bool bRTL, bool bBiDiStrong);
-} // end of namespace drawinglayer::primitive2d
+} // end of namespace drawinglayer::processor2d
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/hintwin.cxx b/sc/source/ui/view/hintwin.cxx
index 4dfa976816a4..747cf5d2f642 100644
--- a/sc/source/ui/view/hintwin.cxx
+++ b/sc/source/ui/view/hintwin.cxx
@@ -23,7 +23,7 @@
#include <drawinglayer/geometry/viewinformation2d.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/PolyPolygonColorPrimitive2D.hxx>
-#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
+#include <drawinglayer/processor2d/textlayoutdevice.hxx>
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
@@ -66,7 +66,7 @@ drawinglayer::primitive2d::Primitive2DContainer ScOverlayHint::createOverlaySequ
// Create the text primitive for the title
basegfx::B2DVector aFontSize;
drawinglayer::attribute::FontAttribute aFontAttr =
- drawinglayer::primitive2d::getFontAttributeFromVclFont(aFontSize, aHeadFont, false, false);
+ drawinglayer::processor2d::getFontAttributeFromVclFont(aFontSize, aHeadFont, false, false);
FontMetric aFontMetric = pDefaultDev->GetFontMetric(aHeadFont);
Size aHintMargin = pDefaultDev->PixelToLogic(Size(HINT_MARGIN, HINT_MARGIN), rMapMode);
@@ -100,7 +100,7 @@ drawinglayer::primitive2d::Primitive2DContainer ScOverlayHint::createOverlaySequ
nTextOffsetY = aFontMetric.GetAscent();
sal_Int32 nLineHeight = aFontMetric.GetLineHeight();
- aFontAttr = drawinglayer::primitive2d::getFontAttributeFromVclFont(aFontSize, aTextFont, false, false);
+ aFontAttr = drawinglayer::processor2d::getFontAttributeFromVclFont(aFontSize, aTextFont, false, false);
sal_Int32 nIndex = 0;
Point aLineStart = aTextStart;
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index d2b9816f40e9..982b8a29a6c5 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -69,7 +69,7 @@
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/color/bcolor.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
-#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
+#include <drawinglayer/processor2d/textlayoutdevice.hxx>
#include <svx/sdr/contact/objectcontact.hxx>
#include <svx/sdr/table/tablecontroller.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
@@ -364,7 +364,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected
aScaledVclFont.SetFontHeight( 500 * nTextSizeFactor );
// get basic geometry and get text size
- drawinglayer::primitive2d::TextLayouterDevice aTextLayouter;
+ drawinglayer::processor2d::TextLayouterDevice aTextLayouter;
aTextLayouter.setFont(aScaledVclFont);
const sal_Int32 nTextLength(aObjectString.getLength());
@@ -388,7 +388,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected
aVclFont.SetFontHeight( 500 );
const drawinglayer::attribute::FontAttribute aFontAttribute(
- drawinglayer::primitive2d::getFontAttributeFromVclFont(
+ drawinglayer::processor2d::getFontAttributeFromVclFont(
aTextSizeAttribute,
aVclFont,
false,
diff --git a/sfx2/source/control/emojiviewitem.cxx b/sfx2/source/control/emojiviewitem.cxx
index f9394ea9435c..5878aef883fd 100644
--- a/sfx2/source/control/emojiviewitem.cxx
+++ b/sfx2/source/control/emojiviewitem.cxx
@@ -11,7 +11,7 @@
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <drawinglayer/primitive2d/PolyPolygonSelectionPrimitive2D.hxx>
-#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
+#include <drawinglayer/processor2d/textlayoutdevice.hxx>
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
#include <com/sun/star/lang/Locale.hpp>
#include <rtl/ustrbuf.hxx>
@@ -36,7 +36,7 @@ void EmojiViewItem::calculateItemsPosition (const tools::Long /*nThumbnailHeight
const tools::Long /*nPadding*/, sal_uInt32 nMaxTextLength,
const ThumbnailItemAttributes *pAttrs)
{
- drawinglayer::primitive2d::TextLayouterDevice aTextDev;
+ drawinglayer::processor2d::TextLayouterDevice aTextDev;
aTextDev.setFontAttribute(pAttrs->aFontAttr,
pAttrs->aFontSize.getX(), pAttrs->aFontSize.getY(),
css::lang::Locale() );
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index 161a9c4cc0d9..9dde1cdcdba7 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -18,7 +18,7 @@
#include <comphelper/processfactory.hxx>
#include <drawinglayer/attribute/fontattribute.hxx>
#include <drawinglayer/primitive2d/PolyPolygonColorPrimitive2D.hxx>
-#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
+#include <drawinglayer/processor2d/textlayoutdevice.hxx>
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
#include <drawinglayer/processor2d/processorfromoutputdevice.hxx>
#include <o3tl/safeint.hxx>
@@ -875,7 +875,7 @@ void ThumbnailView::SetDrawingArea(weld::DrawingArea* pDrawingArea)
OutputDevice& rDevice = pDrawingArea->get_ref_device();
weld::SetPointFont(rDevice, pDrawingArea->get_font());
- mpItemAttrs->aFontAttr = getFontAttributeFromVclFont(mpItemAttrs->aFontSize, rDevice.GetFont(), false, true);
+ mpItemAttrs->aFontAttr = drawinglayer::processor2d::getFontAttributeFromVclFont(mpItemAttrs->aFontSize, rDevice.GetFont(), false, true);
SetOutputSizePixel(pDrawingArea->get_preferred_size());
}
diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx
index e5ed6e3cb7f4..5f2a45e3aeab 100644
--- a/sfx2/source/control/thumbnailviewitem.cxx
+++ b/sfx2/source/control/thumbnailviewitem.cxx
@@ -27,7 +27,7 @@
#include <drawinglayer/primitive2d/fillgraphicprimitive2d.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/PolyPolygonSelectionPrimitive2D.hxx>
-#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
+#include <drawinglayer/processor2d/textlayoutdevice.hxx>
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
#include <vcl/graph.hxx>
@@ -120,7 +120,7 @@ void ThumbnailViewItem::calculateItemsPosition (const tools::Long nThumbnailHeig
const tools::Long nPadding, sal_uInt32 nMaxTextLength,
const ThumbnailItemAttributes *pAttrs)
{
- drawinglayer::primitive2d::TextLayouterDevice aTextDev;
+ drawinglayer::processor2d::TextLayouterDevice aTextDev;
aTextDev.setFontAttribute(pAttrs->aFontAttr,
pAttrs->aFontSize.getX(), pAttrs->aFontSize.getY(),
css::lang::Locale() );
@@ -205,7 +205,7 @@ void ThumbnailViewItem::Paint (drawinglayer::processor2d::BaseProcessor2D *pProc
void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const ThumbnailItemAttributes *pAttrs, Point aPos, drawinglayer::primitive2d::Primitive2DContainer& rSeq)
{
// adjust text drawing position according to text font
- drawinglayer::primitive2d::TextLayouterDevice aTextDev;
+ drawinglayer::processor2d::TextLayouterDevice aTextDev;
aTextDev.setFontAttribute(
pAttrs->aFontAttr,
pAttrs->aFontSize.getX(),
@@ -218,7 +218,7 @@ void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const Thumbnai
OUString aOrigText(mrParent.isDrawMnemonic() ? OutputDevice::GetNonMnemonicString(rText, nMnemonicPos) : rText);
TextEngine aTextEngine;
- aTextEngine.SetFont(getVclFontFromFontAttribute(pAttrs->aFontAttr,
+ aTextEngine.SetFont(drawinglayer::processor2d::getVclFontFromFontAttribute(pAttrs->aFontAttr,
pAttrs->aFontSize.getX(), pAttrs->aFontSize.getY(), 0,
css::lang::Locale()));
aTextEngine.SetMaxTextWidth(maDrawArea.getWidth());
diff --git a/svgio/source/svgreader/svgcharacternode.cxx b/svgio/source/svgreader/svgcharacternode.cxx
index eb7037d17f2c..8bb66c28ef83 100644
--- a/svgio/source/svgreader/svgcharacternode.cxx
+++ b/svgio/source/svgreader/svgcharacternode.cxx
@@ -21,7 +21,7 @@
#include <svgstyleattributes.hxx>
#include <drawinglayer/attribute/fontattribute.hxx>
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
-#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
+#include <drawinglayer/processor2d/textlayoutdevice.hxx>
#include <drawinglayer/primitive2d/textbreakuphelper.hxx>
#include <drawinglayer/primitive2d/textdecoratedprimitive2d.hxx>
@@ -258,7 +258,7 @@ namespace svgio::svgreader
css::lang::Locale aLocale;
// prepare TextLayouterDevice
- drawinglayer::primitive2d::TextLayouterDevice aTextLayouterDevice;
+ drawinglayer::processor2d::TextLayouterDevice aTextLayouterDevice;
aTextLayouterDevice.setFontAttribute(aFontAttribute, fFontWidth, fFontHeight, aLocale);
// prepare TextArray
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index a1e885c0e009..c8f059eb9d19 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -51,7 +51,7 @@
#include <drawinglayer/primitive2d/texthierarchyprimitive2d.hxx>
#include <drawinglayer/primitive2d/wrongspellprimitive2d.hxx>
#include <drawinglayer/primitive2d/graphicprimitive2d.hxx>
-#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
+#include <drawinglayer/processor2d/textlayoutdevice.hxx>
#include <drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx>
#include <svx/unoapi.hxx>
#include <drawinglayer/geometry/viewinformation2d.hxx>
@@ -162,7 +162,7 @@ namespace
OUString caseMappedText = rInfo.mrFont.CalcCaseMap( rInfo.maText );
basegfx::B2DVector aFontScaling;
drawinglayer::attribute::FontAttribute aFontAttribute(
- drawinglayer::primitive2d::getFontAttributeFromVclFont(
+ drawinglayer::processor2d::getFontAttributeFromVclFont(
aFontScaling,
rInfo.mrFont,
rInfo.IsRTL(),
@@ -593,7 +593,7 @@ namespace
}
// Start position is inside. Get TextBoundRect and TopLeft next
- drawinglayer::primitive2d::TextLayouterDevice aTextLayouterDevice;
+ drawinglayer::processor2d::TextLayouterDevice aTextLayouterDevice;
aTextLayouterDevice.setFont(pInfo->mrFont);
const basegfx::B2DRange aTextBoundRect(
diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx
index 44f72ec8de07..450183049bce 100644
--- a/svx/source/svdraw/svdotextpathdecomposition.cxx
+++ b/svx/source/svdraw/svdotextpathdecomposition.cxx
@@ -31,7 +31,7 @@
#include <com/sun/star/i18n/BreakIterator.hpp>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/i18n/CharacterIteratorMode.hpp>
-#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
+#include <drawinglayer/processor2d/textlayoutdevice.hxx>
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
#include <basegfx/color/bcolor.hxx>
@@ -130,7 +130,7 @@ namespace
double getDisplayLength(sal_Int32 nIndex, sal_Int32 nLength) const
{
- drawinglayer::primitive2d::TextLayouterDevice aTextLayouter;
+ drawinglayer::processor2d::TextLayouterDevice aTextLayouter;
double fRetval(0.0);
if(maFont.IsVertical())
@@ -201,7 +201,7 @@ namespace
static double getParagraphTextLength(const ::std::vector< const impPathTextPortion* >& rTextPortions)
{
- drawinglayer::primitive2d::TextLayouterDevice aTextLayouter;
+ drawinglayer::processor2d::TextLayouterDevice aTextLayouter;
double fRetval(0.0);
for(const impPathTextPortion* pCandidate : rTextPortions)
@@ -328,13 +328,13 @@ namespace
if(pCandidate && pCandidate->getTextLength())
{
const drawinglayer::attribute::FontAttribute aCandidateFontAttribute(
- drawinglayer::primitive2d::getFontAttributeFromVclFont(
+ drawinglayer::processor2d::getFontAttributeFromVclFont(
aFontScaling,
pCandidate->getFont(),
pCandidate->isRTL(),
false));
- drawinglayer::primitive2d::TextLayouterDevice aTextLayouter;
+ drawinglayer::processor2d::TextLayouterDevice aTextLayouter;
aTextLayouter.setFont(pCandidate->getFont());
sal_Int32 nUsedTextLength(0);
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index a6608d6ded39..ca1e63be4e81 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -92,7 +92,7 @@
#include <drawinglayer/primitive2d/discreteshadowprimitive2d.hxx>
#include <drawinglayer/primitive2d/maskprimitive2d.hxx>
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
-#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
+#include <drawinglayer/processor2d/textlayoutdevice.hxx>
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
#include <drawinglayer/processor2d/processorfromoutputdevice.hxx>
#include <svx/unoapi.hxx>
@@ -3700,7 +3700,7 @@ void SwColumnFrame::PaintBreak( ) const
vcl::Font aFont = pOut->GetSettings().GetStyleSettings().GetToolFont();
aFont.SetFontHeight( 8 * 20 );
pOut->SetFont( aFont );
- drawinglayer::attribute::FontAttribute aFontAttr = drawinglayer::primitive2d::getFontAttributeFromVclFont(
+ drawinglayer::attribute::FontAttribute aFontAttr = drawinglayer::processor2d::getFontAttributeFromVclFont(
aFontSize, aFont, IsRightToLeft(), false );
tools::Rectangle aTextRect;
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index 929a919c9bbd..30193655f48b 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -35,8 +35,8 @@
#include <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/PolyPolygonColorPrimitive2D.hxx>
-#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
+#include <drawinglayer/processor2d/textlayoutdevice.hxx>
#include <editeng/boxitem.hxx>
#include <svx/hdft.hxx>
#include <sfx2/bindings.hxx>
@@ -306,7 +306,7 @@ void SwHeaderFooterWin::PaintButton()
// Create the text primitive
basegfx::BColor aLineColor = SwViewOption::GetHeaderFooterMarkColor().getBColor();
B2DVector aFontSize;
- FontAttribute aFontAttr = drawinglayer::primitive2d::getFontAttributeFromVclFont(aFontSize, m_xVirDev->GetFont(), false, false);
+ FontAttribute aFontAttr = drawinglayer::processor2d::getFontAttributeFromVclFont(aFontSize, m_xVirDev->GetFont(), false, false);
FontMetric aFontMetric = m_xVirDev->GetFontMetric(m_xVirDev->GetFont());
double nTextOffsetY = aFontMetric.GetAscent() + TEXT_PADDING;
diff --git a/sw/source/uibase/docvw/UnfloatTableButton.cxx b/sw/source/uibase/docvw/UnfloatTableButton.cxx
index 3542129e790c..b54cb3421373 100644
--- a/sw/source/uibase/docvw/UnfloatTableButton.cxx
+++ b/sw/source/uibase/docvw/UnfloatTableButton.cxx
@@ -34,7 +34,7 @@
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
#include <drawinglayer/attribute/fontattribute.hxx>
-#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
+#include <drawinglayer/processor2d/textlayoutdevice.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <drawinglayer/processor2d/processorfromoutputdevice.hxx>
#include <basegfx/vector/b2dvector.hxx>
@@ -209,7 +209,7 @@ void UnfloatTableButton::PaintButton()
basegfx::BColor aLineColor = SwViewOption::GetHeaderFooterMarkColor().getBColor();
basegfx::B2DVector aFontSize;
drawinglayer::attribute::FontAttribute aFontAttr
- = drawinglayer::primitive2d::getFontAttributeFromVclFont(aFontSize, m_xVirDev->GetFont(),
+ = drawinglayer::processor2d::getFontAttributeFromVclFont(aFontSize, m_xVirDev->GetFont(),
false, false);
FontMetric aFontMetric = m_xVirDev->GetFontMetric(m_xVirDev->GetFont());
commit 0345fe0e98a75bcb3e5e50a5f88d81557ae8f275
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Tue Feb 23 13:23:32 2021 +0900
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Fri Jul 30 22:34:47 2021 +0900
drawinglayer: make VisitingParameters constructor explicit
This discovers a bunch of cases where previously the
ViewInformation was implicitly converted into a VisitingParameter.
Change-Id: Ice233e9d3c9d12c5da284e190281a1d94059f49f
diff --git a/drawinglayer/qa/unit/border.cxx b/drawinglayer/qa/unit/border.cxx
index a3f7029b7350..801912f75825 100644
--- a/drawinglayer/qa/unit/border.cxx
+++ b/drawinglayer/qa/unit/border.cxx
@@ -66,9 +66,10 @@ CPPUNIT_TEST_FIXTURE(DrawinglayerBorderTest, testDoubleDecompositionSolid)
aStrokeAttribute));
// Decompose it into polygons.
- drawinglayer::geometry::ViewInformation2D aView;
+ const drawinglayer::geometry::ViewInformation2D aView;
+ const drawinglayer::primitive2d::VisitingParameters aVisitingParameters(aView);
drawinglayer::primitive2d::Primitive2DContainer aContainer;
- aBorder->get2DDecomposition(aContainer, aView);
+ aBorder->get2DDecomposition(aContainer, aVisitingParameters);
// Make sure it results in two borders as it's a double one.
CPPUNIT_ASSERT_EQUAL(static_cast<std::size_t>(2), aContainer.size());
@@ -91,8 +92,9 @@ CPPUNIT_TEST_FIXTURE(DrawinglayerBorderTest, testDoublePixelProcessing)
// Create a pixel processor.
ScopedVclPtrInstance<VirtualDevice> pDev;
drawinglayer::geometry::ViewInformation2D aView;
- std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor(
- drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(*pDev, aView));
+ const drawinglayer::primitive2d::VisitingParameters aVisitingParameters(aView);
+ auto pProcessor = drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(
+ *pDev, aVisitingParameters);
CPPUNIT_ASSERT(pProcessor);
GDIMetaFile aMetaFile;
// Start recording after the processor is created, so we can test the pixel processor.
diff --git a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
index 63b4ffd6986d..f0e677c0cedb 100644
--- a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
+++ b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
@@ -118,6 +118,7 @@ namespace drawinglayer::unorenderer
}
const geometry::ViewInformation2D aViewInformation2D(aViewInformationSequence);
+ primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D);
const sal_uInt32 nDiscreteWidth(basegfx::fround(o3tl::convert(fWidth, eRangeUnit, o3tl::Length::in) * DPI_X));
const sal_uInt32 nDiscreteHeight(basegfx::fround(o3tl::convert(fHeight, eRangeUnit, o3tl::Length::in) * DPI_Y));
@@ -139,7 +140,7 @@ namespace drawinglayer::unorenderer
BitmapEx aBitmapEx(
convertToBitmapEx(
xEmbedSeq,
- aViewInformation2D,
+ aVisitingParameters,
nDiscreteWidth,
nDiscreteHeight,
MaximumQuadraticPixels));
diff --git a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
index 42559bfd4390..0cfa014bb13e 100644
--- a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx
@@ -100,17 +100,19 @@ namespace drawinglayer::primitive2d
// see if buffering is wanted. If so, create buffered content in given resolution
if(0 != mnDiscreteWidth && 0 != mnDiscreteHeight)
{
- const geometry::ViewInformation2D aViewInformation2D;
const primitive2d::Primitive2DReference xEmbedRef(
new primitive2d::TransformPrimitive2D(
basegfx::utils::createScaleB2DHomMatrix(mnDiscreteWidth, mnDiscreteHeight),
getChildren()));
const primitive2d::Primitive2DContainer xEmbedSeq { xEmbedRef };
+ const geometry::ViewInformation2D aViewInformation2D;
+ primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D);
+
const BitmapEx aBitmapEx(
convertToBitmapEx(
xEmbedSeq,
- aViewInformation2D,
+ aVisitingParameters,
mnDiscreteWidth,
mnDiscreteHeight,
mnDiscreteWidth * mnDiscreteHeight));
diff --git a/drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx b/drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx
index cbe3ecf81bfe..514a2f5da880 100644
--- a/drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/unifiedtransparenceprimitive2d.cxx
@@ -84,7 +84,7 @@ namespace drawinglayer::primitive2d
// I will take the last one here. The small overhead of two primitives will only be
// used when UnifiedTransparencePrimitive2D is not handled directly.
- const basegfx::B2DRange aPolygonRange(getChildren().getB2DRange(rParameters.getViewInformation()));
+ const basegfx::B2DRange aPolygonRange(getChildren().getB2DRange(rParameters));
const basegfx::B2DPolygon aPolygon(basegfx::utils::createPolygonFromRect(aPolygonRange));
const basegfx::BColor aGray(getTransparence(), getTransparence(), getTransparence());
Primitive2DContainer aTransparenceContent(2);
diff --git a/drawinglayer/source/processor2d/baseprocessor2d.cxx b/drawinglayer/source/processor2d/baseprocessor2d.cxx
index 9d1671dcf959..39b72feec77f 100644
--- a/drawinglayer/source/processor2d/baseprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/baseprocessor2d.cxx
@@ -30,8 +30,8 @@ namespace drawinglayer::processor2d
{
}
- BaseProcessor2D::BaseProcessor2D(const geometry::ViewInformation2D& rViewInformation)
- : maViewInformation2D(rViewInformation)
+ BaseProcessor2D::BaseProcessor2D(primitive2d::VisitingParameters const & rVisitingParameters)
+ : maVisitingParameters(rVisitingParameters)
{
}
@@ -42,7 +42,7 @@ namespace drawinglayer::processor2d
void BaseProcessor2D::process(const primitive2d::BasePrimitive2D& rCandidate)
{
primitive2d::Primitive2DContainer aContainer;
- rCandidate.get2DDecomposition(aContainer, getViewInformation2D());
+ rCandidate.get2DDecomposition(aContainer, maVisitingParameters);
process(aContainer);
}
@@ -71,7 +71,7 @@ namespace drawinglayer::processor2d
else
{
// unknown implementation, use UNO API call instead and process recursively
- const uno::Sequence< beans::PropertyValue >& rViewParameters(getViewInformation2D().getViewInformationSequence());
+ const uno::Sequence<beans::PropertyValue>& rViewParameters(maVisitingParameters.getUnoProperties());
process(comphelper::sequenceToContainer<primitive2d::Primitive2DContainer>(xReference->getDecomposition(rViewParameters)));
}
}
diff --git a/drawinglayer/source/processor2d/contourextractor2d.cxx b/drawinglayer/source/processor2d/contourextractor2d.cxx
index 8abec2f50f9d..5b9adf4c0ab1 100644
--- a/drawinglayer/source/processor2d/contourextractor2d.cxx
+++ b/drawinglayer/source/processor2d/contourextractor2d.cxx
@@ -36,9 +36,9 @@ using namespace com::sun::star;
namespace drawinglayer::processor2d
{
ContourExtractor2D::ContourExtractor2D(
- const geometry::ViewInformation2D& rViewInformation,
+ primitive2d::VisitingParameters const& rVisitingParameters,
bool bExtractFillOnly)
- : BaseProcessor2D(rViewInformation),
+ : BaseProcessor2D(rVisitingParameters),
maExtractedContour(),
mbExtractFillOnly(bExtractFillOnly)
{
@@ -121,7 +121,7 @@ namespace drawinglayer::processor2d
{
// remember current ViewInformation2D
const primitive2d::TransformPrimitive2D& rTransformCandidate(static_cast< const primitive2d::TransformPrimitive2D& >(rCandidate));
- const geometry::ViewInformation2D aLastViewInformation2D(getViewInformation2D());
+ primitive2d::VisitingParameters aLastVisitingParameters(maVisitingParameters);
// create new local ViewInformation2D
const geometry::ViewInformation2D aViewInformation2D(
@@ -131,13 +131,14 @@ namespace drawinglayer::processor2d
getViewInformation2D().getVisualizedPage(),
getViewInformation2D().getViewTime(),
getViewInformation2D().getExtendedInformationSequence());
- updateViewInformation(aViewInformation2D);
+ primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D);
+ updateVisitingParameters(aVisitingParameters);
// process content
process(rTransformCandidate.getChildren());
// restore transformations
- updateViewInformation(aLastViewInformation2D);
+ updateVisitingParameters(aLastVisitingParameters);
break;
}
@@ -173,7 +174,7 @@ namespace drawinglayer::processor2d
case PRIMITIVE2D_ID_TEXTDECORATEDPORTIONPRIMITIVE2D :
{
// primitives who's BoundRect will be added in world coordinates
- basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D()));
+ basegfx::B2DRange aRange(rCandidate.getB2DRange(maVisitingParameters));
if (!aRange.isEmpty())
{
aRange.transform(getViewInformation2D().getObjectTransformation());
diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
index 04505489c6f2..a41037426b09 100644
--- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
@@ -37,11 +37,11 @@
namespace drawinglayer::processor2d
{
- HitTestProcessor2D::HitTestProcessor2D(const geometry::ViewInformation2D& rViewInformation,
+ HitTestProcessor2D::HitTestProcessor2D(primitive2d::VisitingParameters const& rVisitingParameters,
const basegfx::B2DPoint& rLogicHitPosition,
double fLogicHitTolerance,
bool bHitTextOnly)
- : BaseProcessor2D(rViewInformation),
+ : BaseProcessor2D(rVisitingParameters),
maDiscreteHitPosition(),
mfDiscreteHitTolerance(0.0),
maHitStack(),
@@ -230,7 +230,7 @@ namespace drawinglayer::processor2d
{
// remember current ViewInformation2D
const primitive2d::TransformPrimitive2D& rTransformCandidate(static_cast< const primitive2d::TransformPrimitive2D& >(rCandidate));
- const geometry::ViewInformation2D aLastViewInformation2D(getViewInformation2D());
+ primitive2d::VisitingParameters aLastVisitingParameters(maVisitingParameters);
// create new local ViewInformation2D containing transformation
const geometry::ViewInformation2D aViewInformation2D(
@@ -240,13 +240,14 @@ namespace drawinglayer::processor2d
getViewInformation2D().getVisualizedPage(),
getViewInformation2D().getViewTime(),
getViewInformation2D().getExtendedInformationSequence());
- updateViewInformation(aViewInformation2D);
+ primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D);
+ updateVisitingParameters(aVisitingParameters);
// process child content recursively
process(rTransformCandidate.getChildren());
// restore transformations
- updateViewInformation(aLastViewInformation2D);
+ updateVisitingParameters(aLastVisitingParameters);
break;
}
@@ -411,7 +412,7 @@ namespace drawinglayer::processor2d
case PRIMITIVE2D_ID_TEXTDECORATEDPORTIONPRIMITIVE2D :
{
// for text use the BoundRect of the primitive itself
- const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D()));
+ const basegfx::B2DRange aRange(rCandidate.getB2DRange(maVisitingParameters));
if(!aRange.isEmpty())
{
@@ -428,7 +429,7 @@ namespace drawinglayer::processor2d
// The recently added BitmapEx::GetTransparency() makes it easy to extend
// the BitmapPrimitive2D HitTest to take the contained BitmapEx and it's
// transparency into account
- const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D()));
+ const basegfx::B2DRange aRange(rCandidate.getB2DRange(maVisitingParameters));
if(!aRange.isEmpty())
{
@@ -482,7 +483,7 @@ namespace drawinglayer::processor2d
// This may be refined in the future, e.g:
// - For Bitmaps, the mask and/or transparence information may be used
// - For MetaFiles, the MetaFile content may be used
- const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D()));
+ const basegfx::B2DRange aRange(rCandidate.getB2DRange(maVisitingParameters));
if(!aRange.isEmpty())
{
diff --git a/drawinglayer/source/processor2d/linegeometryextractor2d.cxx b/drawinglayer/source/processor2d/linegeometryextractor2d.cxx
index 9262e23e4509..cd4593b2a3a9 100644
--- a/drawinglayer/source/processor2d/linegeometryextractor2d.cxx
+++ b/drawinglayer/source/processor2d/linegeometryextractor2d.cxx
@@ -29,8 +29,8 @@ using namespace com::sun::star;
namespace drawinglayer::processor2d
{
- LineGeometryExtractor2D::LineGeometryExtractor2D(const geometry::ViewInformation2D& rViewInformation)
- : BaseProcessor2D(rViewInformation),
+ LineGeometryExtractor2D::LineGeometryExtractor2D(primitive2d::VisitingParameters const& rVisitingParameters)
+ : BaseProcessor2D(rVisitingParameters),
maExtractedHairlines(),
maExtractedLineFills(),
mbInLineGeometry(false)
@@ -83,7 +83,7 @@ namespace drawinglayer::processor2d
{
// remember current transformation and ViewInformation
const primitive2d::TransformPrimitive2D& rTransformCandidate(static_cast< const primitive2d::TransformPrimitive2D& >(rCandidate));
- const geometry::ViewInformation2D aLastViewInformation2D(getViewInformation2D());
+ primitive2d::VisitingParameters aLastVisitingParameters(maVisitingParameters);
// create new transformations for CurrentTransformation and for local ViewInformation2D
const geometry::ViewInformation2D aViewInformation2D(
@@ -93,13 +93,15 @@ namespace drawinglayer::processor2d
getViewInformation2D().getVisualizedPage(),
getViewInformation2D().getViewTime(),
getViewInformation2D().getExtendedInformationSequence());
- updateViewInformation(aViewInformation2D);
+
+ primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D);
+ updateVisitingParameters(aVisitingParameters);
// process content
process(rTransformCandidate.getChildren());
// restore transformations
- updateViewInformation(aLastViewInformation2D);
+ updateVisitingParameters(aLastVisitingParameters);
break;
}
diff --git a/drawinglayer/source/processor2d/objectinfoextractor2d.cxx b/drawinglayer/source/processor2d/objectinfoextractor2d.cxx
index 552406d53f68..4d3eb0188c14 100644
--- a/drawinglayer/source/processor2d/objectinfoextractor2d.cxx
+++ b/drawinglayer/source/processor2d/objectinfoextractor2d.cxx
@@ -62,8 +62,8 @@ namespace drawinglayer::processor2d
}
}
- ObjectInfoPrimitiveExtractor2D::ObjectInfoPrimitiveExtractor2D(const geometry::ViewInformation2D& rViewInformation)
- : BaseProcessor2D(rViewInformation),
+ ObjectInfoPrimitiveExtractor2D::ObjectInfoPrimitiveExtractor2D(primitive2d::VisitingParameters const& rVisitingParameters)
+ : BaseProcessor2D(rVisitingParameters),
mpFound(nullptr)
{
}
diff --git a/drawinglayer/source/processor2d/processor2dtools.cxx b/drawinglayer/source/processor2d/processor2dtools.cxx
index 7bc0f5fa0536..921ec4af81c3 100644
--- a/drawinglayer/source/processor2d/processor2dtools.cxx
+++ b/drawinglayer/source/processor2d/processor2dtools.cxx
@@ -29,15 +29,15 @@ namespace drawinglayer::processor2d
{
std::unique_ptr<BaseProcessor2D> createPixelProcessor2DFromOutputDevice(
OutputDevice& rTargetOutDev,
- const drawinglayer::geometry::ViewInformation2D& rViewInformation2D)
+ const drawinglayer::primitive2d::VisitingParameters& rParameters)
{
// create Pixel Vcl-Processor
- return std::make_unique<VclPixelProcessor2D>(rViewInformation2D, rTargetOutDev);
+ return std::make_unique<VclPixelProcessor2D>(rParameters, rTargetOutDev);
}
std::unique_ptr<BaseProcessor2D> createProcessor2DFromOutputDevice(
OutputDevice& rTargetOutDev,
- const drawinglayer::geometry::ViewInformation2D& rViewInformation2D)
+ const drawinglayer::primitive2d::VisitingParameters& rParameters)
{
const GDIMetaFile* pMetaFile = rTargetOutDev.GetConnectMetaFile();
const bool bOutputToRecordingMetaFile(pMetaFile && pMetaFile->IsRecord() && !pMetaFile->IsPause());
@@ -45,14 +45,12 @@ namespace drawinglayer::processor2d
if(bOutputToRecordingMetaFile)
{
// create MetaFile Vcl-Processor and process
- return std::make_unique<VclMetafileProcessor2D>(rViewInformation2D, rTargetOutDev);
+ return std::make_unique<VclMetafileProcessor2D>(rParameters, rTargetOutDev);
}
else
{
// create Pixel Vcl-Processor
- return createPixelProcessor2DFromOutputDevice(
- rTargetOutDev,
- rViewInformation2D);
+ return createPixelProcessor2DFromOutputDevice(rTargetOutDev, rParameters);
}
}
diff --git a/drawinglayer/source/processor2d/processorfromoutputdevice.cxx b/drawinglayer/source/processor2d/processorfromoutputdevice.cxx
index c8433753aeff..f16ad46faadb 100644
--- a/drawinglayer/source/processor2d/processorfromoutputdevice.cxx
+++ b/drawinglayer/source/processor2d/processorfromoutputdevice.cxx
@@ -29,7 +29,7 @@ namespace drawinglayer::processor2d
{
std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> createBaseProcessor2DFromOutputDevice(
OutputDevice& rTargetOutDev,
- const drawinglayer::geometry::ViewInformation2D& rViewInformation2D)
+ drawinglayer::primitive2d::VisitingParameters const& rParameters)
{
const GDIMetaFile* pMetaFile = rTargetOutDev.GetConnectMetaFile();
const bool bOutputToRecordingMetaFile(pMetaFile && pMetaFile->IsRecord() && !pMetaFile->IsPause());
@@ -37,12 +37,12 @@ namespace drawinglayer::processor2d
if(bOutputToRecordingMetaFile)
{
// create MetaFile Vcl-Processor and process
- return std::make_unique<drawinglayer::processor2d::VclMetafileProcessor2D>(rViewInformation2D, rTargetOutDev);
+ return std::make_unique<drawinglayer::processor2d::VclMetafileProcessor2D>(rParameters, rTargetOutDev);
}
else
{
// create Pixel Vcl-Processor
- return std::make_unique<drawinglayer::processor2d::VclPixelProcessor2D>(rViewInformation2D, rTargetOutDev);
+ return std::make_unique<drawinglayer::processor2d::VclPixelProcessor2D>(rParameters, rTargetOutDev);
}
}
} // end of namespace
diff --git a/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx b/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx
index e3a584f86172..5eb6c9f9c8ff 100644
--- a/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx
+++ b/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx
@@ -174,7 +174,7 @@ namespace drawinglayer::processor2d
{
// remember current transformation and ViewInformation
const primitive2d::TransformPrimitive2D& rTransformCandidate(static_cast< const primitive2d::TransformPrimitive2D& >(rCandidate));
- const geometry::ViewInformation2D aLastViewInformation2D(getViewInformation2D());
+ primitive2d::VisitingParameters aLastParameters(maVisitingParameters);
// create new transformations for CurrentTransformation and for local ViewInformation2D
const geometry::ViewInformation2D aViewInformation2D(
@@ -184,13 +184,15 @@ namespace drawinglayer::processor2d
getViewInformation2D().getVisualizedPage(),
getViewInformation2D().getViewTime(),
getViewInformation2D().getExtendedInformationSequence());
- updateViewInformation(aViewInformation2D);
+
+ primitive2d::VisitingParameters aParameters(aViewInformation2D);
+ updateVisitingParameters(aParameters);
// process content
process(rTransformCandidate.getChildren());
// restore transformations
- updateViewInformation(aLastViewInformation2D);
+ updateVisitingParameters(aLastParameters);
break;
}
@@ -216,8 +218,8 @@ namespace drawinglayer::processor2d
}
}
- TextAsPolygonExtractor2D::TextAsPolygonExtractor2D(const geometry::ViewInformation2D& rViewInformation)
- : BaseProcessor2D(rViewInformation),
+ TextAsPolygonExtractor2D::TextAsPolygonExtractor2D(primitive2d::VisitingParameters const& rVisitingParameters)
+ : BaseProcessor2D(rVisitingParameters),
maTarget(),
maBColorModifierStack(),
mnInText(0)
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index f08d17f2f002..042bb4e5f54c 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -214,7 +214,7 @@ VclMetafileProcessor2D::impDumpToMetaFile(const primitive2d::Primitive2DContaine
// Prepare VDev, MetaFile and connections
OutputDevice* pLastOutputDevice = mpOutputDevice;
GDIMetaFile* pLastMetafile = mpMetaFile;
- basegfx::B2DRange aPrimitiveRange(rContent.getB2DRange(getViewInformation2D()));
+ basegfx::B2DRange aPrimitiveRange(rContent.getB2DRange(maVisitingParameters));
// transform primitive range with current transformation (e.g shadow offset)
aPrimitiveRange.transform(maCurrentTransformation);
@@ -548,9 +548,9 @@ void VclMetafileProcessor2D::popList()
// init static break iterator
uno::Reference<css::i18n::XBreakIterator> VclMetafileProcessor2D::mxBreakIterator;
-VclMetafileProcessor2D::VclMetafileProcessor2D(const geometry::ViewInformation2D& rViewInformation,
- OutputDevice& rOutDev)
- : VclProcessor2D(rViewInformation, rOutDev)
+VclMetafileProcessor2D::VclMetafileProcessor2D(
+ drawinglayer::primitive2d::VisitingParameters const& rParameters, OutputDevice& rOutDev)
+ : VclProcessor2D(rParameters, rOutDev)
, mpMetaFile(rOutDev.GetConnectMetaFile())
, mnSvtGraphicFillCount(0)
, mnSvtGraphicStrokeCount(0)
@@ -564,7 +564,7 @@ VclMetafileProcessor2D::VclMetafileProcessor2D(const geometry::ViewInformation2D
"VclMetafileProcessor2D: Used on OutDev which has no MetaFile Target (!)");
// draw to logic coordinates, do not initialize maCurrentTransformation to viewTransformation
// but only to ObjectTransformation. Do not change MapMode of destination.
- maCurrentTransformation = rViewInformation.getObjectTransformation();
+ maCurrentTransformation = rParameters.getViewInformation().getObjectTransformation();
}
VclMetafileProcessor2D::~VclMetafileProcessor2D()
@@ -1123,7 +1123,7 @@ void VclMetafileProcessor2D::processControlPrimitive2D(
{
// still need to fill in the location (is a class Rectangle)
const basegfx::B2DRange aRangeLogic(
- rControlPrimitive.getB2DRange(getViewInformation2D()));
+ rControlPrimitive.getB2DRange(maVisitingParameters));
const tools::Rectangle aRectLogic(static_cast<sal_Int32>(floor(aRangeLogic.getMinX())),
static_cast<sal_Int32>(floor(aRangeLogic.getMinY())),
static_cast<sal_Int32>(ceil(aRangeLogic.getMaxX())),
@@ -1234,7 +1234,7 @@ void VclMetafileProcessor2D::processTextHierarchyFieldPrimitive2D(
// process recursively
primitive2d::Primitive2DContainer rContent;
- rFieldPrimitive.get2DDecomposition(rContent, getViewInformation2D());
+ rFieldPrimitive.get2DDecomposition(rContent, maVisitingParameters);
process(rContent);
// for the end comment the type is not relevant yet, they are all the same. Just add.
@@ -1245,7 +1245,7 @@ void VclMetafileProcessor2D::processTextHierarchyFieldPrimitive2D(
return;
// emulate data handling from ImpEditEngine::Paint
- const basegfx::B2DRange aViewRange(rContent.getB2DRange(getViewInformation2D()));
+ const basegfx::B2DRange aViewRange(rContent.getB2DRange(maVisitingParameters));
const tools::Rectangle aRectLogic(static_cast<sal_Int32>(floor(aViewRange.getMinX())),
static_cast<sal_Int32>(floor(aViewRange.getMinY())),
static_cast<sal_Int32>(ceil(aViewRange.getMaxX())),
@@ -2251,7 +2251,7 @@ void VclMetafileProcessor2D::processTransparencePrimitive2D(
// transparence primitives with non-trivial transparence content) i will for now not
// refine to tiling here.
- basegfx::B2DRange aViewRange(rContent.getB2DRange(getViewInformation2D()));
+ basegfx::B2DRange aViewRange(rContent.getB2DRange(maVisitingParameters));
aViewRange.transform(maCurrentTransformation);
const tools::Rectangle aRectLogic(static_cast<sal_Int32>(floor(aViewRange.getMinX())),
static_cast<sal_Int32>(floor(aViewRange.getMinY())),
@@ -2311,7 +2311,9 @@ void VclMetafileProcessor2D::processTransparencePrimitive2D(
getViewInformation2D().getVisualizedPage(), getViewInformation2D().getViewTime(),
getViewInformation2D().getExtendedInformationSequence());
- VclPixelProcessor2D aBufferProcessor(aViewInfo, *aBufferDevice);
+ primitive2d::VisitingParameters aVisitingParameters(aViewInfo);
+
+ VclPixelProcessor2D aBufferProcessor(aVisitingParameters, *aBufferDevice);
// draw content using pixel renderer
const Point aEmptyPoint;
@@ -2442,14 +2444,16 @@ VclMetafileProcessor2D::CreateBufferDevice(const basegfx::B2DRange& rCandidateRa
void VclMetafileProcessor2D::processPrimitive2DOnPixelProcessor(
const primitive2d::BasePrimitive2D& rCandidate)
{
- basegfx::B2DRange aViewRange(rCandidate.getB2DRange(getViewInformation2D()));
+ basegfx::B2DRange aViewRange(rCandidate.getB2DRange(maVisitingParameters));
geometry::ViewInformation2D aViewInfo;
tools::Rectangle aRectLogic;
Size aSizePixel;
auto pBufferDevice(CreateBufferDevice(aViewRange, aViewInfo, aRectLogic, aSizePixel));
if (pBufferDevice)
{
- VclPixelProcessor2D aBufferProcessor(aViewInfo, *pBufferDevice, maBColorModifierStack);
+ primitive2d::VisitingParameters aVisitingParameters(aViewInfo);
+ VclPixelProcessor2D aBufferProcessor(aVisitingParameters, *pBufferDevice,
+ maBColorModifierStack);
// draw content using pixel renderer
primitive2d::Primitive2DReference aRef(
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx
index 67a79ca307cc..4e3f812f3a06 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx
@@ -203,7 +203,7 @@ protected:
public:
/// constructor/destructor
- VclMetafileProcessor2D(const geometry::ViewInformation2D& rViewInformation,
+ VclMetafileProcessor2D(drawinglayer::primitive2d::VisitingParameters const& rParameters,
OutputDevice& rOutDev);
virtual ~VclMetafileProcessor2D() override;
};
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index a0990edf7645..28c6d6f9ffdb 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -78,14 +78,15 @@ struct VclPixelProcessor2D::Impl
}
};
-VclPixelProcessor2D::VclPixelProcessor2D(const geometry::ViewInformation2D& rViewInformation,
+VclPixelProcessor2D::VclPixelProcessor2D(primitive2d::VisitingParameters const& rVisitingParameters,
OutputDevice& rOutDev,
const basegfx::BColorModifierStack& rInitStack)
- : VclProcessor2D(rViewInformation, rOutDev, rInitStack)
+ : VclProcessor2D(rVisitingParameters, rOutDev, rInitStack)
, m_pImpl(new Impl(rOutDev))
{
// prepare maCurrentTransformation matrix with viewTransformation to target directly to pixels
- maCurrentTransformation = rViewInformation.getObjectToViewTransformation();
+ maCurrentTransformation
+ = rVisitingParameters.getViewInformation().getObjectToViewTransformation();
// prepare output directly to pixels
mpOutputDevice->Push(PushFlags::MAPMODE);
@@ -1024,7 +1025,7 @@ AlphaMask ProcessAndBlurAlphaMask(const Bitmap& rMask, double fErodeDilateRadius
void VclPixelProcessor2D::processGlowPrimitive2D(const primitive2d::GlowPrimitive2D& rCandidate)
{
- basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D()));
+ basegfx::B2DRange aRange(rCandidate.getB2DRange(maVisitingParameters));
aRange.transform(maCurrentTransformation);
basegfx::B2DVector aGlowRadiusVector(rCandidate.getGlowRadius(), 0);
// Calculate the pixel size of glow radius in current transformation
@@ -1092,7 +1093,7 @@ void VclPixelProcessor2D::processSoftEdgePrimitive2D(
// borders, where they don't end. Ideally, process the full object once at maximal reasonable
// resolution, and store the resulting alpha mask in primitive's cache; then reuse it later,
// applying the transform.
- basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D()));
+ basegfx::B2DRange aRange(rCandidate.getB2DRange(maVisitingParameters));
aRange.transform(maCurrentTransformation);
basegfx::B2DVector aRadiusVector(rCandidate.getRadius(), 0);
// Calculate the pixel size of soft edge radius in current transformation
@@ -1152,7 +1153,7 @@ void VclPixelProcessor2D::processShadowPrimitive2D(const primitive2d::ShadowPrim
return;
}
- basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D()));
+ basegfx::B2DRange aRange(rCandidate.getB2DRange(maVisitingParameters));
aRange.transform(maCurrentTransformation);
basegfx::B2DVector aBlurRadiusVector(rCandidate.getShadowBlur(), 0);
aBlurRadiusVector *= maCurrentTransformation;
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
index 480fdcaa6e18..6a1b23db61fe 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
@@ -104,7 +104,8 @@ class VclPixelProcessor2D final : public VclProcessor2D
public:
/// constructor/destructor
- VclPixelProcessor2D(const geometry::ViewInformation2D& rViewInformation, OutputDevice& rOutDev,
+ VclPixelProcessor2D(primitive2d::VisitingParameters const& rVisitingParameters,
+ OutputDevice& rOutDev,
const basegfx::BColorModifierStack& rInitStack
= basegfx::BColorModifierStack());
virtual ~VclPixelProcessor2D() override;
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index bd6af1b27221..f62bfeaf4dbe 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -828,7 +828,7 @@ void VclProcessor2D::RenderUnifiedTransparencePrimitive2D(
else if (rTransCandidate.getTransparence() > 0.0 && rTransCandidate.getTransparence() < 1.0)
{
// transparence is in visible range
- basegfx::B2DRange aRange(rTransCandidate.getChildren().getB2DRange(getViewInformation2D()));
+ basegfx::B2DRange aRange(rTransCandidate.getChildren().getB2DRange(maVisitingParameters));
aRange.transform(maCurrentTransformation);
impBufferDevice aBufferDevice(*mpOutputDevice, aRange);
@@ -857,7 +857,7 @@ void VclProcessor2D::RenderTransparencePrimitive2D(
if (rTransCandidate.getChildren().empty())
return;
- basegfx::B2DRange aRange(rTransCandidate.getChildren().getB2DRange(getViewInformation2D()));
+ basegfx::B2DRange aRange(rTransCandidate.getChildren().getB2DRange(maVisitingParameters));
aRange.transform(maCurrentTransformation);
impBufferDevice aBufferDevice(*mpOutputDevice, aRange);
@@ -897,7 +897,7 @@ void VclProcessor2D::RenderTransformPrimitive2D(
{
// remember current transformation and ViewInformation
const basegfx::B2DHomMatrix aLastCurrentTransformation(maCurrentTransformation);
- const geometry::ViewInformation2D aLastViewInformation2D(getViewInformation2D());
+ primitive2d::VisitingParameters aLastVisitingParameters(maVisitingParameters);
// create new transformations for CurrentTransformation
// and for local ViewInformation2D
@@ -907,14 +907,15 @@ void VclProcessor2D::RenderTransformPrimitive2D(
getViewInformation2D().getViewTransformation(), getViewInformation2D().getViewport(),
getViewInformation2D().getVisualizedPage(), getViewInformation2D().getViewTime(),
getViewInformation2D().getExtendedInformationSequence());
- updateViewInformation(aViewInformation2D);
+ primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D);
+ updateVisitingParameters(aVisitingParameters);
// process content
process(rTransformCandidate.getChildren());
// restore transformations
maCurrentTransformation = aLastCurrentTransformation;
- updateViewInformation(aLastViewInformation2D);
+ updateVisitingParameters(aLastVisitingParameters);
}
// new XDrawPage for ViewInformation2D
@@ -922,7 +923,7 @@ void VclProcessor2D::RenderPagePreviewPrimitive2D(
const primitive2d::PagePreviewPrimitive2D& rPagePreviewCandidate)
{
// remember current transformation and ViewInformation
- const geometry::ViewInformation2D aLastViewInformation2D(getViewInformation2D());
+ primitive2d::VisitingParameters aLastVisitingParameters(maVisitingParameters);
// create new local ViewInformation2D
const geometry::ViewInformation2D aViewInformation2D(
@@ -930,13 +931,14 @@ void VclProcessor2D::RenderPagePreviewPrimitive2D(
getViewInformation2D().getViewTransformation(), getViewInformation2D().getViewport(),
rPagePreviewCandidate.getXDrawPage(), getViewInformation2D().getViewTime(),
getViewInformation2D().getExtendedInformationSequence());
- updateViewInformation(aViewInformation2D);
+ primitive2d::VisitingParameters aVisitingParameters(aViewInformation2D);
+ updateVisitingParameters(aVisitingParameters);
// process decomposed content
process(rPagePreviewCandidate);
// restore transformations
- updateViewInformation(aLastViewInformation2D);
+ updateVisitingParameters(aLastVisitingParameters);
}
// marker
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list