include/vcl_canvas/canvastools.hxx                   |  547 +++++++++++++++++++
 include/vcl_canvas/canvastoolsdllapi.h               |   35 +
 include/vcl_canvas/elapsedtime.hxx                   |  160 +++++
 vcl/canvas_inc/base/basemutexhelper.hxx              |    2 
 vcl/canvas_inc/base/bitmapcanvasbase.hxx             |    2 
 vcl/canvas_inc/base/bufferedgraphicdevicebase.hxx    |    4 
 vcl/canvas_inc/base/cachedprimitivebase.hxx          |    4 
 vcl/canvas_inc/base/canvasbase.hxx                   |    2 
 vcl/canvas_inc/base/canvascustomspritebase.hxx       |    2 
 vcl/canvas_inc/base/canvascustomspritehelper.hxx     |    4 
 vcl/canvas_inc/base/disambiguationhelper.hxx         |    2 
 vcl/canvas_inc/base/graphicdevicebase.hxx            |    2 
 vcl/canvas_inc/base/integerbitmapbase.hxx            |    2 
 vcl/canvas_inc/base/sprite.hxx                       |    2 
 vcl/canvas_inc/base/spritecanvasbase.hxx             |    2 
 vcl/canvas_inc/base/spritesurface.hxx                |    2 
 vcl/canvas_inc/parametricpolypolygon.hxx             |    4 
 vcl/canvas_inc/propertysethelper.hxx                 |    6 
 vcl/canvas_inc/rendering/icolorbuffer.hxx            |    2 
 vcl/canvas_inc/rendering/irendermodule.hxx           |    2 
 vcl/canvas_inc/rendering/isurface.hxx                |    2 
 vcl/canvas_inc/rendering/isurfaceproxy.hxx           |    2 
 vcl/canvas_inc/rendering/isurfaceproxymanager.hxx    |    4 
 vcl/canvas_inc/spriteredrawmanager.hxx               |    4 
 vcl/canvas_inc/vclwrapper.hxx                        |    2 
 vcl/canvas_inc/verifyinput.hxx                       |    4 
 vcl/source/canvas/cairo/cairo_cachedbitmap.cxx       |    2 
 vcl/source/canvas/cairo/cairo_cachedbitmap.hxx       |    4 
 vcl/source/canvas/cairo/cairo_canvas.cxx             |    4 
 vcl/source/canvas/cairo/cairo_canvas.hxx             |    8 
 vcl/source/canvas/cairo/cairo_canvasbitmap.cxx       |    2 
 vcl/source/canvas/cairo/cairo_canvasbitmap.hxx       |    8 
 vcl/source/canvas/cairo/cairo_canvascustomsprite.cxx |    8 
 vcl/source/canvas/cairo/cairo_canvascustomsprite.hxx |    6 
 vcl/source/canvas/cairo/cairo_canvasfont.cxx         |    6 
 vcl/source/canvas/cairo/cairo_canvasfont.hxx         |    4 
 vcl/source/canvas/cairo/cairo_canvashelper.cxx       |   20 
 vcl/source/canvas/cairo/cairo_canvashelper.hxx       |    2 
 vcl/source/canvas/cairo/cairo_canvashelper_text.cxx  |   10 
 vcl/source/canvas/cairo/cairo_devicehelper.cxx       |    6 
 vcl/source/canvas/cairo/cairo_devicehelper.hxx       |    2 
 vcl/source/canvas/cairo/cairo_repainttarget.hxx      |    2 
 vcl/source/canvas/cairo/cairo_sprite.hxx             |    4 
 vcl/source/canvas/cairo/cairo_spritecanvas.cxx       |    4 
 vcl/source/canvas/cairo/cairo_spritecanvas.hxx       |    8 
 vcl/source/canvas/cairo/cairo_spritecanvashelper.cxx |   32 -
 vcl/source/canvas/cairo/cairo_spritecanvashelper.hxx |   12 
 vcl/source/canvas/cairo/cairo_spritedevicehelper.cxx |    2 
 vcl/source/canvas/cairo/cairo_spritedevicehelper.hxx |    2 
 vcl/source/canvas/cairo/cairo_spritehelper.cxx       |    2 
 vcl/source/canvas/cairo/cairo_spritehelper.hxx       |    4 
 vcl/source/canvas/cairo/cairo_surfaceprovider.hxx    |    2 
 vcl/source/canvas/cairo/cairo_textlayout.cxx         |   18 
 vcl/source/canvas/cairo/cairo_textlayout.hxx         |    2 
 vcl/source/canvas/tools/cachedprimitivebase.cxx      |    2 
 vcl/source/canvas/tools/canvascustomspritehelper.cxx |   12 
 vcl/source/canvas/tools/canvastools.cxx              |    8 
 vcl/source/canvas/tools/elapsedtime.cxx              |    4 
 vcl/source/canvas/tools/page.cxx                     |    2 
 vcl/source/canvas/tools/page.hxx                     |    2 
 vcl/source/canvas/tools/pagemanager.cxx              |    2 
 vcl/source/canvas/tools/pagemanager.hxx              |    8 
 vcl/source/canvas/tools/parametricpolypolygon.cxx    |    2 
 vcl/source/canvas/tools/propertysethelper.cxx        |    2 
 vcl/source/canvas/tools/spriteredrawmanager.cxx      |    2 
 vcl/source/canvas/tools/surface.cxx                  |   14 
 vcl/source/canvas/tools/surface.hxx                  |    2 
 vcl/source/canvas/tools/surfaceproxy.cxx             |    4 
 vcl/source/canvas/tools/surfaceproxy.hxx             |    6 
 vcl/source/canvas/tools/surfaceproxymanager.cxx      |    2 
 vcl/source/canvas/tools/surfacerect.hxx              |    2 
 vcl/source/canvas/tools/verifyinput.cxx              |    2 
 72 files changed, 906 insertions(+), 164 deletions(-)

New commits:
commit 36b7400cc3e5a3d30d95c5421a3b4b78bb1278ee
Author:     Shardul Vikram Singh <shardulvi...@gmail.com>
AuthorDate: Sun Jul 13 01:27:04 2025 +0530
Commit:     Shardul Vikram Singh <shardulvi...@gmail.com>
CommitDate: Sun Jul 13 01:28:53 2025 +0530

    change canvas namespace to vcl_canvas
    
    in the transferred code to vcl

diff --git a/include/vcl_canvas/canvastools.hxx 
b/include/vcl_canvas/canvastools.hxx
new file mode 100644
index 000000000000..00091852e0b1
--- /dev/null
+++ b/include/vcl_canvas/canvastools.hxx
@@ -0,0 +1,547 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <rtl/ustring.hxx>
+#include <sal/log.hxx>
+
+#include <math.h>
+#include <string.h>
+#include <vector>
+#include <limits>
+
+#include <canvas/canvastoolsdllapi.h>
+
+namespace basegfx
+{
+    class B2DHomMatrix;
+    class B2DRange;
+    class B2IRange;
+    class B2IPoint;
+    class B2DPolyPolygon;
+}
+
+namespace com::sun::star::geometry
+{
+    struct RealSize2D;
+    struct IntegerSize2D;
+    struct AffineMatrix2D;
+    struct Matrix2D;
+}
+
+namespace com::sun::star::rendering
+{
+    struct RenderState;
+    struct ViewState;
+    struct IntegerBitmapLayout;
+    class  XCanvas;
+    struct Texture;
+    class  XIntegerBitmapColorSpace;
+}
+
+namespace com::sun::star::awt
+{
+    struct Rectangle;
+    class  XWindow2;
+}
+
+namespace com::sun::star::beans {
+    struct PropertyValue;
+}
+
+class Color;
+class OutputDevice;
+
+namespace vcl_canvas
+{
+    namespace tools
+    {
+        /** Compute the next highest power of 2 of a 32-bit value
+
+            Code devised by Sean Anderson, in good ole HAKMEM
+            tradition.
+
+            @return 1 << (lg(x - 1) + 1)
+        */
+        inline sal_uInt32 nextPow2( sal_uInt32 x )
+        {
+            --x;
+            x |= x >> 1;
+            x |= x >> 2;
+            x |= x >> 4;
+            x |= x >> 8;
+            x |= x >> 16;
+
+            return ++x;
+        }
+
+        /**
+         *
+         * Count the number of 1-bits of a n-bit value
+         *
+         */
+
+        /** Round given floating point value down to next integer
+         */
+        inline sal_Int32 roundDown( const double& rVal )
+        {
+            return static_cast< sal_Int32 >( floor( rVal ) );
+        }
+
+        /** Round given floating point value up to next integer
+         */
+        inline sal_Int32 roundUp( const double& rVal )
+        {
+            return static_cast< sal_Int32 >( ceil( rVal ) );
+        }
+
+        /** Create a RealSize2D with both coordinate values set to +infinity
+         */
+        CANVASTOOLS_DLLPUBLIC css::geometry::RealSize2D createInfiniteSize2D();
+
+
+        // View- and RenderState utilities
+
+
+        CANVASTOOLS_DLLPUBLIC css::rendering::RenderState&
+            initRenderState( css::rendering::RenderState&                      
renderState );
+
+        CANVASTOOLS_DLLPUBLIC css::rendering::ViewState&
+            initViewState( css::rendering::ViewState&                          
viewState );
+
+        CANVASTOOLS_DLLPUBLIC ::basegfx::B2DHomMatrix
+            getViewStateTransform( const css::rendering::ViewState&            
viewState );
+
+        CANVASTOOLS_DLLPUBLIC css::rendering::ViewState&
+            setViewStateTransform( css::rendering::ViewState&                  
viewState,
+                                   const ::basegfx::B2DHomMatrix&              
transform );
+
+        CANVASTOOLS_DLLPUBLIC ::basegfx::B2DHomMatrix
+            getRenderStateTransform( const css::rendering::RenderState&        
renderState );
+
+        CANVASTOOLS_DLLPUBLIC css::rendering::RenderState&
+            setRenderStateTransform( css::rendering::RenderState&              
renderState,
+                                     const ::basegfx::B2DHomMatrix&            
transform );
+
+        CANVASTOOLS_DLLPUBLIC css::rendering::RenderState&
+            appendToRenderState( css::rendering::RenderState&                  
renderState,
+                                 const ::basegfx::B2DHomMatrix&                
transform );
+
+        CANVASTOOLS_DLLPUBLIC css::rendering::RenderState&
+            prependToRenderState( css::rendering::RenderState&                 
renderState,
+                                  const ::basegfx::B2DHomMatrix&               
transform );
+
+        CANVASTOOLS_DLLPUBLIC ::basegfx::B2DHomMatrix&
+            mergeViewAndRenderTransform( ::basegfx::B2DHomMatrix&              
transform,
+                                         const css::rendering::ViewState&      
viewState,
+                                         const css::rendering::RenderState&    
renderState );
+
+
+        // Matrix utilities
+
+
+        CANVASTOOLS_DLLPUBLIC css::geometry::AffineMatrix2D&
+            setIdentityAffineMatrix2D( css::geometry::AffineMatrix2D&  matrix 
);
+
+        CANVASTOOLS_DLLPUBLIC css::geometry::Matrix2D&
+            setIdentityMatrix2D( css::geometry::Matrix2D&              matrix 
);
+
+
+        // Special utilities
+
+
+        /** Calc the bounding rectangle of a transformed rectangle.
+
+            The method applies the given transformation to the
+            specified input rectangle, and returns the bounding box of
+            the resulting output area.
+
+            @param i_Rect
+            Input rectangle
+
+            @param i_Transformation
+            Transformation to apply to the input rectangle
+
+            @return the resulting rectangle
+         */
+        CANVASTOOLS_DLLPUBLIC ::basegfx::B2DRange calcTransformedRectBounds(
+                                                        const 
::basegfx::B2DRange&      i_Rect,
+                                                        const 
::basegfx::B2DHomMatrix&  i_Transformation );
+
+        /** Calc a transform that maps the upper, left corner of a
+             rectangle to the origin.
+
+            The method is a specialized version of
+            calcRectToRectTransform() (Removed now), mapping the input 
rectangle's
+            the upper, left corner to the origin, and leaving the size
+            untouched.
+
+            @param i_srcRect
+            Input parameter, specifies the original source
+            rectangle. The resulting transformation will exactly map
+            the source rectangle's upper, left corner to the origin.
+
+            @param i_transformation
+            The original transformation matrix. This is changed with
+            translations (if necessary), to exactly map the source
+            rectangle to the origin.
+
+            @return the resulting transformation matrix
+
+            @see calcRectToRectTransform()
+            @see calcTransformedRectBounds()
+        */
+        CANVASTOOLS_DLLPUBLIC ::basegfx::B2DHomMatrix 
calcRectToOriginTransform(
+                                                            const 
::basegfx::B2DRange&      i_srcRect,
+                                                            const 
::basegfx::B2DHomMatrix&  i_transformation );
+
+        /** Check whether a given rectangle is within another
+            transformed rectangle.
+
+            This method checks for polygonal containedness, i.e. the
+            transformed rectangle is not represented as an axis-aligned
+            rectangle anymore (like calcTransformedRectBounds()), but
+            polygonal. Thus, the insideness test is based on tight
+            bounds.
+
+            @param rContainedRect
+            This rectangle is checked, whether it is fully within the
+            transformed rTransformRect.
+
+            @param rTransformRect
+            This rectangle is transformed, and then checked whether it
+            fully contains rContainedRect.
+
+            @param rTransformation
+            This transformation is applied to rTransformRect
+         */
+        CANVASTOOLS_DLLPUBLIC bool isInside( const ::basegfx::B2DRange&        
 rContainedRect,
+                       const ::basegfx::B2DRange&       rTransformRect,
+                       const ::basegfx::B2DHomMatrix&   rTransformation );
+
+        /** Clip a scroll to the given bound rect
+
+            @param io_rSourceArea
+            Source area to scroll. The resulting clipped source area
+            is returned therein.
+
+            @param io_rDestPoint
+            Destination point of the scroll (upper, left corner of
+            rSourceArea after the scroll). The new, resulting
+            destination point is returned therein.q
+
+            @param o_ClippedAreas
+            Vector of rectangles in the <em>destination</em> area
+            coordinate system, which are clipped away from the source
+            area, and thus need extra updates (i.e. they are not
+            correctly copy from the scroll operation, since there was
+            no information about them in the source).
+
+            @param rBounds
+            Bounds to clip against.
+
+            @return false, if the resulting scroll area is empty
+         */
+        CANVASTOOLS_DLLPUBLIC bool clipScrollArea( ::basegfx::B2IRange&        
          io_rSourceArea,
+                             ::basegfx::B2IPoint&                  
io_rDestPoint,
+                             ::std::vector< ::basegfx::B2IRange >& 
o_ClippedAreas,
+                             const ::basegfx::B2IRange&            rBounds );
+
+        /** Clip a blit between two differently surfaces.
+
+            This method clips source and dest rect for a clip between
+            two differently clipped surfaces, such that the resulting
+            blit rects are fully within both clip areas.
+
+            @param io_rSourceArea
+            Source area of the blit. Returned therein is the computed
+            clipped source area.
+
+            @param io_rDestPoint
+            Dest area of the blit. Returned therein is the computed
+            clipped dest area.
+
+            @param rSourceBounds
+            Clip bounds of the source surface
+
+            @param rDestBounds
+            Clip bounds of the dest surface
+
+            @return false, if the resulting blit is empty, i.e. fully
+            clipped away.
+         */
+        CANVASTOOLS_DLLPUBLIC ::basegfx::B2IRange spritePixelAreaFromB2DRange( 
const ::basegfx::B2DRange& rRange );
+
+        /** Retrieve various internal properties of the actual canvas 
implementation.
+
+            This method retrieves a bunch of internal, implementation-
+            and platform-dependent values from the canvas
+            implementation. Among them are for example operating
+            system window handles. The actual layout and content of
+            the returned sequence is dependent on the component
+            implementation, undocumented and subject to change.
+
+            @param i_rxCanvas
+            Input parameter, the canvas representation for which the device 
information
+            is to be retrieved
+
+            @param o_rxParams
+            Output parameter, the sequence of Anys that hold the device 
parameters. Layout is as described above
+
+            @return A reference to the resulting sequence of parameters
+        */
+        CANVASTOOLS_DLLPUBLIC css::uno::Sequence< css::uno::Any >& 
getDeviceInfo(
+            const css::uno::Reference< css::rendering::XCanvas >& i_rxCanvas,
+            css::uno::Sequence< css::uno::Any >& o_rxParams );
+
+        /** Return a color space for a default RGBA integer format
+
+            Use this method for dead-simple bitmap implementations,
+            that map all their formats to 8888 RGBA color.
+         */
+        CANVASTOOLS_DLLPUBLIC css::uno::Reference< 
css::rendering::XIntegerBitmapColorSpace> const & getStdColorSpace();
+
+        /** Return a color space for a default RGB integer format
+
+            Use this method for dead-simple bitmap implementations,
+            that map all their formats to 8888 RGB color (the last byte
+            is unused).
+         */
+        CANVASTOOLS_DLLPUBLIC css::uno::Reference< 
css::rendering::XIntegerBitmapColorSpace> const & 
getStdColorSpaceWithoutAlpha();
+
+        /** Return a memory layout for a default RGBA integer format
+
+            Use this method for dead-simple bitmap implementations,
+            that map all their formats to 8888 RGBA color.
+         */
+        CANVASTOOLS_DLLPUBLIC css::rendering::IntegerBitmapLayout 
getStdMemoryLayout(
+            const css::geometry::IntegerSize2D& rBitmapSize );
+
+        /// Convert standard 8888 RGBA color to vcl color
+        CANVASTOOLS_DLLPUBLIC css::uno::Sequence<sal_Int8> 
colorToStdIntSequence( const ::Color& rColor );
+
+        // Modelled closely after boost::numeric_cast, only that we
+        // issue some trace output here and throw a RuntimeException
+
+        /** Cast numeric value into another (numeric) data type
+
+            Apart from converting the numeric value, this template
+            also checks if any overflow, underflow, or sign
+            information is lost (if yes, it throws an
+            uno::RuntimeException.
+         */
+        template< typename Target, typename Source > inline Target 
numeric_cast( Source arg )
+        {
+            // typedefs abbreviating respective trait classes
+            typedef ::std::numeric_limits< Source > SourceLimits;
+            typedef ::std::numeric_limits< Target > TargetLimits;
+
+#undef min
+#undef max
+
+            if( ( arg<0 && !TargetLimits::is_signed) ||                     // 
losing the sign here
+                ( SourceLimits::is_signed && arg<TargetLimits::min()) ||    // 
underflow will happen
+                ( arg>TargetLimits::max() ) )                               // 
overflow will happen
+            {
+# if OSL_DEBUG_LEVEL > 2
+                SAL_WARN("canvas", "numeric_cast detected data loss");
+#endif
+                throw css::uno::RuntimeException(
+                    u"numeric_cast detected data loss"_ustr,
+                    nullptr );
+            }
+
+            return static_cast<Target>(arg);
+        }
+
+        CANVASTOOLS_DLLPUBLIC css::awt::Rectangle getAbsoluteWindowRect(
+            const css::awt::Rectangle&                       rRect,
+            const css::uno::Reference< css::awt::XWindow2 >& xWin  );
+
+        /** Retrieve for small bound marks around each corner of the given 
rectangle
+         */
+        CANVASTOOLS_DLLPUBLIC ::basegfx::B2DPolyPolygon 
getBoundMarksPolyPolygon( const ::basegfx::B2DRange& rRange );
+
+        /** Calculate number of gradient "strips" to generate (takes
+           into account device resolution)
+
+           @param nColorSteps
+           Maximal integer difference between all color stops, needed
+           for smooth gradient color differences
+         */
+        CANVASTOOLS_DLLPUBLIC int calcGradientStepCount( 
::basegfx::B2DHomMatrix&   rTotalTransform,
+                                   const css::rendering::ViewState&   
viewState,
+                                   const css::rendering::RenderState& 
renderState,
+                                   const css::rendering::Texture&     texture,
+                                   int                                
nColorSteps );
+
+        /** A very simplistic map for ASCII strings and arbitrary value
+            types.
+
+            This class internally references a constant, static array of
+            sorted MapEntries, and performs a binary search to look up
+            values for a given query string. Note that this map is static,
+            i.e. not meant to be extended at runtime.
+
+            @tpl ValueType
+            The value type this map should store, associated with an ASCII
+            string.
+        */
+        template< typename ValueType > class ValueMap
+        {
+        public:
+            struct MapEntry
+            {
+                const char*     maKey;
+                ValueType       maValue;
+            };
+
+            /** Create a ValueMap for the given array of MapEntries.
+
+                @param pMap
+                Pointer to a <em>static</em> array of MapEntries. Must
+                live longer than this object! Make absolutely sure that
+                the string entries passed via pMap are ASCII-only -
+                everything else might not yield correct string
+                comparisons, and thus will result in undefined behaviour.
+
+                @param nEntries
+                Number of entries for pMap
+
+                @param bCaseSensitive
+                Whether the map query should be performed case sensitive
+                or not. When bCaseSensitive is false, all MapEntry strings
+                must be lowercase!
+            */
+            ValueMap( const MapEntry*   pMap,
+                      ::std::size_t     nEntries,
+                      bool              bCaseSensitive ) :
+                mpMap( pMap ),
+                mnEntries( nEntries ),
+                mbCaseSensitive( bCaseSensitive )
+            {
+#ifdef DBG_UTIL
+                // Ensure that map entries are sorted (and all lowercase, if 
this
+                // map is case insensitive)
+                const OString aStr( pMap->maKey );
+                if( !mbCaseSensitive &&
+                    aStr != aStr.toAsciiLowerCase() )
+                {
+                    SAL_WARN("canvas", "ValueMap::ValueMap(): Key is not 
lowercase " << pMap->maKey);
+                }
+
+                if( mnEntries <= 1 )
+                    return;
+
+                for( ::std::size_t i=0; i<mnEntries-1; ++i, ++pMap )
+                {
+                    if( !mapComparator(pMap[0], pMap[1]) &&
+                        mapComparator(pMap[1], pMap[0]) )
+                    {
+                        SAL_WARN("canvas", "ValueMap::ValueMap(): Map is not 
sorted, keys are wrong, "
+                                  << pMap[0].maKey << " and " << 
pMap[1].maKey);
+                        SAL_WARN("canvas", "ValueMap::ValueMap(): Map is not 
sorted" );
+                    }
+
+                    const OString aStr2( pMap[1].maKey );
+                    if( !mbCaseSensitive &&
+                        aStr2 != aStr2.toAsciiLowerCase() )
+                    {
+                        SAL_WARN("canvas", "ValueMap::ValueMap(): Key is not 
lowercase" << pMap[1].maKey);
+                    }
+                }
+#endif
+            }
+
+            /** Lookup a value for the given query string
+
+                @param rName
+                The string to lookup. If the map was created with the case
+                insensitive flag, the lookup is performed
+                case-insensitive, otherwise, case-sensitive.
+
+                @param o_rResult
+                Output parameter, which receives the value associated with
+                the query string. If no value was found, the referenced
+                object is kept unmodified.
+
+                @return true, if a matching entry was found.
+            */
+            bool lookup( const OUString& rName,
+                         ValueType&             o_rResult ) const
+            {
+                // rName is required to contain only ASCII characters.
+                // TODO(Q1): Enforce this at upper layers
+                OString aKey( OUStringToOString( mbCaseSensitive ? rName : 
rName.toAsciiLowerCase(),
+                                                               
RTL_TEXTENCODING_ASCII_US ) );
+                MapEntry aSearchKey =
+                    {
+                        aKey.getStr(),
+                        ValueType()
+                    };
+
+                const MapEntry* pEnd = mpMap+mnEntries;
+                const MapEntry* pRes = ::std::lower_bound( mpMap,
+                                              pEnd,
+                                              aSearchKey,
+                                              &mapComparator );
+                if( pRes != pEnd )
+                {
+                    // place to _insert before_ found - is it equal to
+                    // the search key?
+                    if( strcmp( pRes->maKey, aSearchKey.maKey ) == 0 )
+                    {
+                        // yep, correct entry found
+                        o_rResult = pRes->maValue;
+                        return true;
+                    }
+                }
+
+                // not found
+                return false;
+            }
+
+        private:
+            static bool mapComparator( const MapEntry& rLHS,
+                                       const MapEntry& rRHS )
+            {
+                return strcmp( rLHS.maKey,
+                               rRHS.maKey ) < 0;
+            }
+
+            const MapEntry*     mpMap;
+            ::std::size_t       mnEntries;
+            bool                mbCaseSensitive;
+        };
+
+        CANVASTOOLS_DLLPUBLIC void clipOutDev(const css::rendering::ViewState& 
viewState,
+                        const css::rendering::RenderState& renderState,
+                        OutputDevice& rOutDev,
+                        OutputDevice* p2ndOutDev=nullptr);
+
+        CANVASTOOLS_DLLPUBLIC void extractExtraFontProperties(const 
css::uno::Sequence<css::beans::PropertyValue>& rExtraFontProperties,
+                        sal_uInt32& rEmphasisMark);
+    }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl_canvas/canvastoolsdllapi.h 
b/include/vcl_canvas/canvastoolsdllapi.h
new file mode 100644
index 000000000000..a3748371a9e2
--- /dev/null
+++ b/include/vcl_canvas/canvastoolsdllapi.h
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_CANVAS_CANVASTOOLSDLLAPI_H
+#define INCLUDED_CANVAS_CANVASTOOLSDLLAPI_H
+
+#include <sal/config.h>
+#include <sal/types.h>
+
+#if defined(CANVASTOOLS_DLLIMPLEMENTATION)
+#define CANVASTOOLS_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define CANVASTOOLS_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+#define CANVASTOOLS_DLLPRIVATE SAL_DLLPRIVATE
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl_canvas/elapsedtime.hxx 
b/include/vcl_canvas/elapsedtime.hxx
new file mode 100644
index 000000000000..32b9a55d8a6a
--- /dev/null
+++ b/include/vcl_canvas/elapsedtime.hxx
@@ -0,0 +1,160 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <canvas/canvastoolsdllapi.h>
+#include <memory>
+
+namespace vcl_canvas::tools
+{
+        /** Calculate elapsed time.
+
+            This class provides several time-measurement and
+            -management functions. In its simplest use-case, it
+            measures the time from its creation.
+         */
+        class CANVASTOOLS_DLLPUBLIC ElapsedTime
+        {
+        public:
+            /** Create a new ElapsedTime object
+
+                The moment of construction starts the time
+                measurement. That means, a subsequent getElapsedTime()
+                call will return the time difference between object
+                creation and getElapsedTime() call.
+             */
+            ElapsedTime();
+
+            /** Creates a new ElapsedTime object based on another
+                timer.
+
+                The moment of construction starts the time
+                measurement. That means, a subsequent getElapsedTime()
+                call will return the time difference between object
+                creation and getElapsedTime() call. All time values
+                are not taken from the system's time base, but from
+                the provided timer.
+             */
+            ElapsedTime( std::shared_ptr<ElapsedTime> xTimeBase );
+
+            /** Reset the time
+
+                The instance of the reset() call starts the time
+                measurement from scratch. That means, a subsequent
+                getElapsedTime() call will return the time difference
+                between reset() and getElapsedTime() call.
+             */
+            void reset();
+
+            /** Query the elapsed time
+
+                This method returns the elapsed time in seconds
+                between either the construction of this object, or the
+                last reset() call, if any (but see the time modulation
+                methods below, for means to modify the otherwise
+                continuous flow of time).
+
+                @return the elapsed time in seconds.
+             */
+            double getElapsedTime() const;
+
+            /** Pauses the running timer.
+
+                This method stops the time, as returned by this
+                object, until continueTimer() is called. During this
+                period, getElapsedTime() will always return the same
+                time value (i.e. the instant when pauseTimer() was
+                called).
+             */
+            void pauseTimer();
+
+            /** Continues the paused timer.
+
+                This method re-enables the time flow, that is, time
+                starts running again for clients calling
+                getElapsedTime(). The (subtle) difference to the
+                holdTimer/releaseTimer() methods below is, that there
+                is no perceived time 'jump' between the pauseTimer()
+                call and the continueTimer() call, i.e. the time
+                starts over with the same value it has stopped on
+                pauseTimer().
+             */
+            void continueTimer();
+
+            /** Adjusts the timer, hold and pause times.
+
+                This method modifies the time as returned by this
+                object by the specified amount. This affects the time
+                as returned by getElapsedTime(), regardless of the
+                mode (e.g. paused, or on hold).
+
+                @param fOffset
+                This value will be added to the current time, i.e. the
+                next call to getElapsedTime() (when performed
+                immediately) will be adjusted by fOffset.
+            */
+            void adjustTimer( double fOffset );
+
+            /** Holds the current time.
+
+                This call makes the timer hold the current time
+                (e.g. getElapsedTime() will return the time when
+                holdTimer() was called), while the underlying time is
+                running on. When releaseTimer() is called, the time
+                will 'jump' to the then-current, underlying time. This
+                is equivalent to pressing the "interim time" button on
+                a stop watch, which shows this stopped time, while the
+                clock keeps running internally.
+            */
+            void holdTimer();
+
+            /** Releases a held timer.
+
+                After this call, the timer again returns the running
+                time on getElapsedTime().
+             */
+            void releaseTimer();
+
+        private:
+            static double getSystemTime();
+            double getCurrentTime() const;
+            double getElapsedTimeImpl() const; // does not set 
m_fLastQueriedTime
+
+            const std::shared_ptr<ElapsedTime>  m_pTimeBase;
+
+            /// To validate adjustTimer() calls with 
bLimitToLastQueriedTime=true
+            mutable double                          m_fLastQueriedTime;
+
+            /// Start time, from which the difference to the time base is 
returned
+            double                                  m_fStartTime;
+
+            /// Instant, when last pause or hold started, relative to 
m_fStartTime
+            double                                  m_fFrozenTime;
+
+            /// True, when in pause mode
+            bool                                    m_bInPauseMode;
+
+            /// True, when in hold mode
+            bool                                    m_bInHoldMode;
+        };
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/canvas_inc/base/basemutexhelper.hxx 
b/vcl/canvas_inc/base/basemutexhelper.hxx
index eba03cd9ae01..8c0da01fc501 100644
--- a/vcl/canvas_inc/base/basemutexhelper.hxx
+++ b/vcl/canvas_inc/base/basemutexhelper.hxx
@@ -25,7 +25,7 @@
 
 /* Definition of the BaseMutexHelper class */
 
-namespace canvas
+namespace vcl_canvas
 {
     /** Base class, initializing its own baseclass with m_aMutex.
 
diff --git a/vcl/canvas_inc/base/bitmapcanvasbase.hxx 
b/vcl/canvas_inc/base/bitmapcanvasbase.hxx
index 1293f301fdb1..0ccf87be7a30 100644
--- a/vcl/canvas_inc/base/bitmapcanvasbase.hxx
+++ b/vcl/canvas_inc/base/bitmapcanvasbase.hxx
@@ -24,7 +24,7 @@
 
 namespace com::sun::star::rendering { class XBitmapCanvas; }
 
-namespace canvas
+namespace vcl_canvas
 {
     /** Helper template to handle XBitmapCanvas method forwarding to
         BitmapCanvasHelper
diff --git a/vcl/canvas_inc/base/bufferedgraphicdevicebase.hxx 
b/vcl/canvas_inc/base/bufferedgraphicdevicebase.hxx
index f07c8de23099..9b4670f3f7cb 100644
--- a/vcl/canvas_inc/base/bufferedgraphicdevicebase.hxx
+++ b/vcl/canvas_inc/base/bufferedgraphicdevicebase.hxx
@@ -21,7 +21,7 @@
 
 #include <com/sun/star/awt/XWindow2.hpp>
 
-#include <canvas/canvastools.hxx>
+#include <vcl_canvas/canvastools.hxx>
 #include <base/graphicdevicebase.hxx>
 
 namespace com::sun::star::awt { class XTopWindow; }
@@ -29,7 +29,7 @@ namespace com::sun::star::awt { class XTopWindow; }
 
 /* Definition of BufferedGraphicDeviceBase class */
 
-namespace canvas
+namespace vcl_canvas
 {
     /** Helper template base class for XGraphicDevice implementations
         on windows.
diff --git a/vcl/canvas_inc/base/cachedprimitivebase.hxx 
b/vcl/canvas_inc/base/cachedprimitivebase.hxx
index d5003e78b850..9384a62ff4fb 100644
--- a/vcl/canvas_inc/base/cachedprimitivebase.hxx
+++ b/vcl/canvas_inc/base/cachedprimitivebase.hxx
@@ -25,13 +25,13 @@
 #include <com/sun/star/rendering/ViewState.hpp>
 #include <comphelper/compbase.hxx>
 
-#include <canvas/canvastoolsdllapi.h>
+#include <vcl_canvas/canvastoolsdllapi.h>
 
 namespace com::sun::star::rendering { class XCanvas; }
 
 /* Definition of CachedPrimitiveBase class */
 
-namespace canvas
+namespace vcl_canvas
 {
     typedef comphelper::WeakComponentImplHelper< 
css::rendering::XCachedPrimitive,
                                            css::lang::XServiceInfo > 
CachedPrimitiveBase_Base;
diff --git a/vcl/canvas_inc/base/canvasbase.hxx 
b/vcl/canvas_inc/base/canvasbase.hxx
index 24737f784d59..48ce5cb0cefa 100644
--- a/vcl/canvas_inc/base/canvasbase.hxx
+++ b/vcl/canvas_inc/base/canvasbase.hxx
@@ -37,7 +37,7 @@ namespace com::sun::star::rendering { struct FontInfo; }
 namespace com::sun::star::rendering { struct StringContext; }
 
 
-namespace canvas
+namespace vcl_canvas
 {
     /** Helper template to handle XCanvas method forwarding to CanvasHelper
 
diff --git a/vcl/canvas_inc/base/canvascustomspritebase.hxx 
b/vcl/canvas_inc/base/canvascustomspritebase.hxx
index 8379a54d935b..11d8baa7fe57 100644
--- a/vcl/canvas_inc/base/canvascustomspritebase.hxx
+++ b/vcl/canvas_inc/base/canvascustomspritebase.hxx
@@ -29,7 +29,7 @@
 
 namespace com::sun::star::rendering { class XPolyPolygon2D; }
 
-namespace canvas
+namespace vcl_canvas
 {
     /** Helper template to handle XCustomSprite method forwarding to
         CanvasCustomSpriteHelper
diff --git a/vcl/canvas_inc/base/canvascustomspritehelper.hxx 
b/vcl/canvas_inc/base/canvascustomspritehelper.hxx
index 32fcf6452a99..2e02beae5e54 100644
--- a/vcl/canvas_inc/base/canvascustomspritehelper.hxx
+++ b/vcl/canvas_inc/base/canvascustomspritehelper.hxx
@@ -25,7 +25,7 @@
 #include <basegfx/range/b2drange.hxx>
 #include <basegfx/vector/b2dvector.hxx>
 #include <base/spritesurface.hxx>
-#include <canvas/canvastoolsdllapi.h>
+#include <vcl_canvas/canvastoolsdllapi.h>
 
 namespace com::sun::star::geometry { struct AffineMatrix2D; }
 namespace com::sun::star::geometry { struct RealPoint2D; }
@@ -36,7 +36,7 @@ namespace com::sun::star::rendering { struct RenderState; }
 namespace com::sun::star::rendering { struct ViewState; }
 
 
-namespace canvas
+namespace vcl_canvas
 {
     /* Definition of CanvasCustomSpriteHelper class */
 
diff --git a/vcl/canvas_inc/base/disambiguationhelper.hxx 
b/vcl/canvas_inc/base/disambiguationhelper.hxx
index 06e6f9af0431..b0218d0392dd 100644
--- a/vcl/canvas_inc/base/disambiguationhelper.hxx
+++ b/vcl/canvas_inc/base/disambiguationhelper.hxx
@@ -25,7 +25,7 @@
 
 /* Definition of the DisambiguationHelper class */
 
-namespace canvas
+namespace vcl_canvas
 {
     /** Base class, initializing its own baseclass with m_aMutex.
 
diff --git a/vcl/canvas_inc/base/graphicdevicebase.hxx 
b/vcl/canvas_inc/base/graphicdevicebase.hxx
index 03aec9a85203..11b2a84de2fa 100644
--- a/vcl/canvas_inc/base/graphicdevicebase.hxx
+++ b/vcl/canvas_inc/base/graphicdevicebase.hxx
@@ -38,7 +38,7 @@ namespace com::sun::star::rendering { class XColorSpace; }
 
 /* Definition of GraphicDeviceBase class */
 
-namespace canvas
+namespace vcl_canvas
 {
     /** Helper template base class for XGraphicDevice implementations.
 
diff --git a/vcl/canvas_inc/base/integerbitmapbase.hxx 
b/vcl/canvas_inc/base/integerbitmapbase.hxx
index 43c4401c5ac5..a90953bf89dd 100644
--- a/vcl/canvas_inc/base/integerbitmapbase.hxx
+++ b/vcl/canvas_inc/base/integerbitmapbase.hxx
@@ -23,7 +23,7 @@
 #include <verifyinput.hxx>
 
 
-namespace canvas
+namespace vcl_canvas
 {
     /** Helper template to handle XIntegerBitmap method forwarding to
         BitmapCanvasHelper
diff --git a/vcl/canvas_inc/base/sprite.hxx b/vcl/canvas_inc/base/sprite.hxx
index 8a89c945429d..e01d90dc449d 100644
--- a/vcl/canvas_inc/base/sprite.hxx
+++ b/vcl/canvas_inc/base/sprite.hxx
@@ -29,7 +29,7 @@ namespace basegfx
     class B2DRange;
 }
 
-namespace canvas
+namespace vcl_canvas
 {
     /* Definition of Sprite interface (as we mix with UNO here, has to
        be XInterface - reference holders to a Sprite must be able to
diff --git a/vcl/canvas_inc/base/spritecanvasbase.hxx 
b/vcl/canvas_inc/base/spritecanvasbase.hxx
index 0a0d952a2955..0f5e9ab01197 100644
--- a/vcl/canvas_inc/base/spritecanvasbase.hxx
+++ b/vcl/canvas_inc/base/spritecanvasbase.hxx
@@ -31,7 +31,7 @@ namespace com::sun::star::rendering { class XCustomSprite; }
 namespace com::sun::star::rendering { class XSprite; }
 
 
-namespace canvas
+namespace vcl_canvas
 {
     /** Helper template to handle XIntegerBitmap method forwarding to
         BitmapCanvasHelper
diff --git a/vcl/canvas_inc/base/spritesurface.hxx 
b/vcl/canvas_inc/base/spritesurface.hxx
index e49c82699c84..44328a5dc6ef 100644
--- a/vcl/canvas_inc/base/spritesurface.hxx
+++ b/vcl/canvas_inc/base/spritesurface.hxx
@@ -21,7 +21,7 @@
 
 #include <base/sprite.hxx>
 
-namespace canvas
+namespace vcl_canvas
 {
     /* Definition of the SpriteSurface interface */
 
diff --git a/vcl/canvas_inc/parametricpolypolygon.hxx 
b/vcl/canvas_inc/parametricpolypolygon.hxx
index 511ff2baff91..f0089eb58e60 100644
--- a/vcl/canvas_inc/parametricpolypolygon.hxx
+++ b/vcl/canvas_inc/parametricpolypolygon.hxx
@@ -24,7 +24,7 @@
 #include <comphelper/compbase.hxx>
 #include <basegfx/polygon/b2dpolygon.hxx>
 
-#include <canvas/canvastoolsdllapi.h>
+#include <vcl_canvas/canvastoolsdllapi.h>
 #include <rtl/ref.hxx>
 #include <utility>
 
@@ -33,7 +33,7 @@ namespace com::sun::star::rendering { class XGraphicDevice; }
 
 /* Definition of ParametricPolyPolygon class */
 
-namespace canvas
+namespace vcl_canvas
 {
     typedef comphelper::WeakComponentImplHelper< 
css::rendering::XParametricPolyPolygon2D,
                                            css::lang::XServiceInfo > 
ParametricPolyPolygon_Base;
diff --git a/vcl/canvas_inc/propertysethelper.hxx 
b/vcl/canvas_inc/propertysethelper.hxx
index aebcbe049e20..afe475d423ee 100644
--- a/vcl/canvas_inc/propertysethelper.hxx
+++ b/vcl/canvas_inc/propertysethelper.hxx
@@ -19,19 +19,19 @@
 
 #pragma once
 
-#include <canvas/canvastools.hxx>
+#include <vcl_canvas/canvastools.hxx>
 
 #include <functional>
 #include <vector>
 #include <memory>
 
-#include <canvas/canvastoolsdllapi.h>
+#include <vcl_canvas/canvastoolsdllapi.h>
 
 namespace com::sun::star::beans { class XPropertyChangeListener; }
 namespace com::sun::star::beans { class XPropertySetInfo; }
 namespace com::sun::star::beans { class XVetoableChangeListener; }
 
-namespace canvas
+namespace vcl_canvas
 {
     /** Really simplistic XPropertySet helper for properties.
 
diff --git a/vcl/canvas_inc/rendering/icolorbuffer.hxx 
b/vcl/canvas_inc/rendering/icolorbuffer.hxx
index 6e0c250c5baa..4f03b184affa 100644
--- a/vcl/canvas_inc/rendering/icolorbuffer.hxx
+++ b/vcl/canvas_inc/rendering/icolorbuffer.hxx
@@ -21,7 +21,7 @@
 
 #include <sal/types.h>
 
-namespace canvas
+namespace vcl_canvas
 {
     /** Interface for a raw memory pixel container
 
diff --git a/vcl/canvas_inc/rendering/irendermodule.hxx 
b/vcl/canvas_inc/rendering/irendermodule.hxx
index ed16f7eb6a00..1a060d3a889d 100644
--- a/vcl/canvas_inc/rendering/irendermodule.hxx
+++ b/vcl/canvas_inc/rendering/irendermodule.hxx
@@ -27,7 +27,7 @@ namespace basegfx
     class B2IVector;
 }
 
-namespace canvas
+namespace vcl_canvas
 {
     struct ISurface;
 
diff --git a/vcl/canvas_inc/rendering/isurface.hxx 
b/vcl/canvas_inc/rendering/isurface.hxx
index f3d3beaf0b1b..708d7fd1fb87 100644
--- a/vcl/canvas_inc/rendering/isurface.hxx
+++ b/vcl/canvas_inc/rendering/isurface.hxx
@@ -25,7 +25,7 @@ namespace basegfx
     class B2IPoint;
 }
 
-namespace canvas
+namespace vcl_canvas
 {
     struct IColorBuffer;
 
diff --git a/vcl/canvas_inc/rendering/isurfaceproxy.hxx 
b/vcl/canvas_inc/rendering/isurfaceproxy.hxx
index ebe8abc10fe1..62c28b8ffed4 100644
--- a/vcl/canvas_inc/rendering/isurfaceproxy.hxx
+++ b/vcl/canvas_inc/rendering/isurfaceproxy.hxx
@@ -27,7 +27,7 @@ namespace basegfx
     class B2DHomMatrix;
 }
 
-namespace canvas
+namespace vcl_canvas
 {
     struct ISurfaceProxy
     {
diff --git a/vcl/canvas_inc/rendering/isurfaceproxymanager.hxx 
b/vcl/canvas_inc/rendering/isurfaceproxymanager.hxx
index 71b12b29e729..0d3d64644bca 100644
--- a/vcl/canvas_inc/rendering/isurfaceproxymanager.hxx
+++ b/vcl/canvas_inc/rendering/isurfaceproxymanager.hxx
@@ -19,10 +19,10 @@
 
 #pragma once
 
-#include <canvas/canvastoolsdllapi.h>
+#include <vcl_canvas/canvastoolsdllapi.h>
 #include <memory>
 
-namespace canvas
+namespace vcl_canvas
 {
     struct ISurfaceProxy;
     struct IColorBuffer;
diff --git a/vcl/canvas_inc/spriteredrawmanager.hxx 
b/vcl/canvas_inc/spriteredrawmanager.hxx
index 8e4e49e7a7d5..29575ab599f1 100644
--- a/vcl/canvas_inc/spriteredrawmanager.hxx
+++ b/vcl/canvas_inc/spriteredrawmanager.hxx
@@ -30,11 +30,11 @@
 #include <algorithm>
 
 #include "base/sprite.hxx"
-#include <canvas/canvastoolsdllapi.h>
+#include <vcl_canvas/canvastoolsdllapi.h>
 
 /* Definition of SpriteRedrawManager class */
 
-namespace canvas
+namespace vcl_canvas
 {
     /** This class manages smooth SpriteCanvas updates
 
diff --git a/vcl/canvas_inc/vclwrapper.hxx b/vcl/canvas_inc/vclwrapper.hxx
index 3c1dfbf2d686..6f69973eb911 100644
--- a/vcl/canvas_inc/vclwrapper.hxx
+++ b/vcl/canvas_inc/vclwrapper.hxx
@@ -22,7 +22,7 @@
 #include <vcl/svapp.hxx>
 #include <memory>
 
-namespace canvas
+namespace vcl_canvas
 {
     namespace vcltools
     {
diff --git a/vcl/canvas_inc/verifyinput.hxx b/vcl/canvas_inc/verifyinput.hxx
index 7dd956c92882..f754d2699064 100644
--- a/vcl/canvas_inc/verifyinput.hxx
+++ b/vcl/canvas_inc/verifyinput.hxx
@@ -22,7 +22,7 @@
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
 
-#include <canvas/canvastoolsdllapi.h>
+#include <vcl_canvas/canvastoolsdllapi.h>
 
 namespace com::sun::star::geometry
 {
@@ -49,7 +49,7 @@ namespace com::sun::star::rendering
 
 namespace com::sun::star::uno { template <class E> class Sequence; }
 
-namespace canvas
+namespace vcl_canvas
 {
     namespace tools
     {
diff --git a/vcl/source/canvas/cairo/cairo_cachedbitmap.hxx 
b/vcl/source/canvas/cairo/cairo_cachedbitmap.hxx
index a2de0d0bf4ac..ca418aa5853d 100644
--- a/vcl/source/canvas/cairo/cairo_cachedbitmap.hxx
+++ b/vcl/source/canvas/cairo/cairo_cachedbitmap.hxx
@@ -28,7 +28,7 @@
 
 namespace vcl_cairocanvas
 {
-    class CachedBitmap : public ::canvas::CachedPrimitiveBase
+    class CachedBitmap : public ::vcl_canvas::CachedPrimitiveBase
     {
     public:
 
diff --git a/vcl/source/canvas/cairo/cairo_canvas.hxx 
b/vcl/source/canvas/cairo/cairo_canvas.hxx
index 01abb7de9049..c6d2d52c988f 100644
--- a/vcl/source/canvas/cairo/cairo_canvas.hxx
+++ b/vcl/source/canvas/cairo/cairo_canvas.hxx
@@ -51,7 +51,7 @@ namespace vcl_cairocanvas
                                              css::beans::XPropertySet,
                                              css::lang::XServiceName,
                                              css::lang::XServiceInfo >  
GraphicDeviceBase_Base;
-    typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< 
GraphicDeviceBase_Base >,
+    typedef ::vcl_canvas::GraphicDeviceBase< ::vcl_canvas::BaseMutexHelper< 
GraphicDeviceBase_Base >,
                                                  DeviceHelper,
                                                  ::osl::MutexGuard,
                                                  ::cppu::OWeakObject > 
CanvasBase_Base;
@@ -76,8 +76,8 @@ namespace vcl_cairocanvas
     {
     };
 
-    typedef ::canvas::IntegerBitmapBase<
-        canvas::BitmapCanvasBase2<
+    typedef ::vcl_canvas::IntegerBitmapBase<
+        vcl_canvas::BitmapCanvasBase2<
             CanvasBaseSurfaceProvider_Base,
             CanvasHelper,
             ::osl::MutexGuard,
diff --git a/vcl/source/canvas/cairo/cairo_canvasbitmap.hxx 
b/vcl/source/canvas/cairo/cairo_canvasbitmap.hxx
index 8009ccaf74d2..ac842c7fffe6 100644
--- a/vcl/source/canvas/cairo/cairo_canvasbitmap.hxx
+++ b/vcl/source/canvas/cairo/cairo_canvasbitmap.hxx
@@ -44,13 +44,13 @@ namespace vcl_cairocanvas
                                              css::lang::XServiceInfo,
                                              css::beans::XFastPropertySet >   
CanvasBitmapBase_Base;
     class CanvasBitmapSpriteSurface_Base :
-        public ::canvas::BaseMutexHelper<CanvasBitmapBase_Base>,
+        public ::vcl_canvas::BaseMutexHelper<CanvasBitmapBase_Base>,
         public SurfaceProvider
     {
     };
 
-    typedef ::canvas::IntegerBitmapBase<
-        canvas::BitmapCanvasBase2<
+    typedef ::vcl_canvas::IntegerBitmapBase<
+        vcl_canvas::BitmapCanvasBase2<
             CanvasBitmapSpriteSurface_Base,
             CanvasHelper,
             ::osl::MutexGuard,
diff --git a/vcl/source/canvas/cairo/cairo_canvascustomsprite.cxx 
b/vcl/source/canvas/cairo/cairo_canvascustomsprite.cxx
index 8e97c703d4aa..baebf9be88e8 100644
--- a/vcl/source/canvas/cairo/cairo_canvascustomsprite.cxx
+++ b/vcl/source/canvas/cairo/cairo_canvascustomsprite.cxx
@@ -39,13 +39,13 @@ namespace vcl_cairocanvas
     CanvasCustomSprite::CanvasCustomSprite( const css::geometry::RealSize2D&   
rSpriteSize,
                                             const SpriteCanvasRef&             
             rRefDevice ) :
         mpSpriteCanvas( rRefDevice ),
-        maSize( ::canvas::tools::roundUp( rSpriteSize.Width ),
-                ::canvas::tools::roundUp( rSpriteSize.Height ) )
+        maSize( ::vcl_canvas::tools::roundUp( rSpriteSize.Width ),
+                ::vcl_canvas::tools::roundUp( rSpriteSize.Height ) )
     {
         ENSURE_OR_THROW( rRefDevice,
                           "CanvasCustomSprite::CanvasCustomSprite(): Invalid 
sprite canvas" );
 
-        SAL_INFO( "canvas.cairo", "sprite size: " << ::canvas::tools::roundUp( 
rSpriteSize.Width ) << ", " << ::canvas::tools::roundUp( rSpriteSize.Height ));
+        SAL_INFO( "canvas.cairo", "sprite size: " << 
::vcl_canvas::tools::roundUp( rSpriteSize.Width ) << ", " << 
::vcl_canvas::tools::roundUp( rSpriteSize.Height ));
 
         mpBufferSurface = mpSpriteCanvas->createSurface( maSize, 
CAIRO_CONTENT_COLOR_ALPHA );
 
diff --git a/vcl/source/canvas/cairo/cairo_canvascustomsprite.hxx 
b/vcl/source/canvas/cairo/cairo_canvascustomsprite.hxx
index b6c9046ed010..8adde88597ee 100644
--- a/vcl/source/canvas/cairo/cairo_canvascustomsprite.hxx
+++ b/vcl/source/canvas/cairo/cairo_canvascustomsprite.hxx
@@ -64,13 +64,13 @@ namespace vcl_cairocanvas
         remain a base class that provides implementation, not to
         enforce any specific interface on its derivees.
      */
-    class CanvasCustomSpriteSpriteBase_Base : public 
::canvas::BaseMutexHelper< CanvasCustomSpriteBase_Base >,
+    class CanvasCustomSpriteSpriteBase_Base : public 
::vcl_canvas::BaseMutexHelper< CanvasCustomSpriteBase_Base >,
                                                  public Sprite,
                                               public SurfaceProvider
     {
     };
 
-    typedef ::canvas::CanvasCustomSpriteBase< 
CanvasCustomSpriteSpriteBase_Base,
+    typedef ::vcl_canvas::CanvasCustomSpriteBase< 
CanvasCustomSpriteSpriteBase_Base,
                                               SpriteHelper,
                                               CanvasHelper,
                                               ::osl::MutexGuard,
diff --git a/vcl/source/canvas/cairo/cairo_canvasfont.cxx 
b/vcl/source/canvas/cairo/cairo_canvasfont.cxx
index e6d20efe150c..8c1c6ae97239 100644
--- a/vcl/source/canvas/cairo/cairo_canvasfont.cxx
+++ b/vcl/source/canvas/cairo/cairo_canvasfont.cxx
@@ -27,7 +27,7 @@
 #include <utility>
 #include <vcl/metric.hxx>
 
-#include <canvas/canvastools.hxx>
+#include <vcl_canvas/canvastools.hxx>
 
 #include "cairo_canvasfont.hxx"
 #include "cairo_textlayout.hxx"
@@ -48,7 +48,7 @@ namespace vcl_cairocanvas
         mpRefDevice(std::move( rDevice )),
         mnEmphasisMark(0)
     {
-        ::canvas::tools::extractExtraFontProperties(rExtraFontProperties, 
mnEmphasisMark);
+        ::vcl_canvas::tools::extractExtraFontProperties(rExtraFontProperties, 
mnEmphasisMark);
 
         maFont->SetAlignment( ALIGN_BASELINE );
         maFont->SetCharSet( 
(rFontRequest.FontDescription.IsSymbolFont==css::util::TriState_YES) ? 
RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
diff --git a/vcl/source/canvas/cairo/cairo_canvasfont.hxx 
b/vcl/source/canvas/cairo/cairo_canvasfont.hxx
index 6280bb6f46c3..65c6e168e610 100644
--- a/vcl/source/canvas/cairo/cairo_canvasfont.hxx
+++ b/vcl/source/canvas/cairo/cairo_canvasfont.hxx
@@ -73,7 +73,7 @@ namespace vcl_cairocanvas
         sal_uInt32 getEmphasisMark() const { return mnEmphasisMark; }
 
     private:
-        ::canvas::vcltools::VCLObject<vcl::Font> maFont;
+        ::vcl_canvas::vcltools::VCLObject<vcl::Font> maFont;
         css::rendering::FontRequest              maFontRequest;
         SurfaceProviderRef                       mpRefDevice;
         sal_uInt32                               mnEmphasisMark;
diff --git a/vcl/source/canvas/cairo/cairo_canvashelper.cxx 
b/vcl/source/canvas/cairo/cairo_canvashelper.cxx
index 22b0b6dfa78b..04c1985abea0 100644
--- a/vcl/source/canvas/cairo/cairo_canvashelper.cxx
+++ b/vcl/source/canvas/cairo/cairo_canvashelper.cxx
@@ -48,7 +48,7 @@
 #include <vcl/canvastools.hxx>
 #include <vcl/virdev.hxx>
 
-#include <canvas/canvastools.hxx>
+#include <vcl_canvas/canvastools.hxx>
 #include <parametricpolypolygon.hxx>
 #include <cairo.h>
 
@@ -418,15 +418,15 @@ constexpr OUStringLiteral 
PARAMETRICPOLYPOLYGON_IMPLEMENTATION_NAME = u"Canvas::
         return {};
     }
 
-    static cairo_pattern_t* patternFromParametricPolyPolygon( 
::canvas::ParametricPolyPolygon const & rPolygon )
+    static cairo_pattern_t* patternFromParametricPolyPolygon( 
::vcl_canvas::ParametricPolyPolygon const & rPolygon )
     {
         cairo_pattern_t* pPattern = nullptr;
-        const ::canvas::ParametricPolyPolygon::Values& aValues = 
rPolygon.getValues();
+        const ::vcl_canvas::ParametricPolyPolygon::Values& aValues = 
rPolygon.getValues();
         double x0, x1, y0, y1, cx, cy, r0, r1;
 
         switch( aValues.meType )
         {
-            case ::canvas::ParametricPolyPolygon::GradientType::Linear:
+            case ::vcl_canvas::ParametricPolyPolygon::GradientType::Linear:
                 x0 = 0;
                 y0 = 0;
                 x1 = 1;
@@ -435,7 +435,7 @@ constexpr OUStringLiteral 
PARAMETRICPOLYPOLYGON_IMPLEMENTATION_NAME = u"Canvas::
                 addColorStops( pPattern, aValues.maColors, aValues.maStops, 
false );
                 break;
 
-            case ::canvas::ParametricPolyPolygon::GradientType::Elliptical:
+            case ::vcl_canvas::ParametricPolyPolygon::GradientType::Elliptical:
                 cx = 0;
                 cy = 0;
                 r0 = 0;
@@ -544,14 +544,14 @@ constexpr OUStringLiteral 
PARAMETRICPOLYPOLYGON_IMPLEMENTATION_NAME = u"Canvas::
                             // TODO(F1): FillRule
                             SAL_INFO( "canvas.cairo", "known implementation" );
 
-                            ::canvas::ParametricPolyPolygon* pPolyImpl = 
static_cast< ::canvas::ParametricPolyPolygon* >( aTexture.Gradient.get() );
+                            ::vcl_canvas::ParametricPolyPolygon* pPolyImpl = 
static_cast< ::vcl_canvas::ParametricPolyPolygon* >( aTexture.Gradient.get() );
                             css::geometry::AffineMatrix2D aTransform( 
aTexture.AffineTransform );
                             cairo_matrix_t aTextureMatrix;
 
                             cairo_matrix_init( &aTextureMatrix,
                                                aTransform.m00, aTransform.m10, 
aTransform.m01,
                                                aTransform.m11, aTransform.m02, 
aTransform.m12);
-                            if( pPolyImpl->getValues().meType == 
canvas::ParametricPolyPolygon::GradientType::Rectangular )
+                            if( pPolyImpl->getValues().meType == 
vcl_canvas::ParametricPolyPolygon::GradientType::Rectangular )
                             {
                                 // no general path gradient yet in cairo; 
emulate then
                                 cairo_save( pCairo );
@@ -1288,8 +1288,8 @@ constexpr OUStringLiteral 
PARAMETRICPOLYPOLYGON_IMPLEMENTATION_NAME = u"Canvas::
 
         if( mpCairo )
         {
-            return uno::Reference< rendering::XBitmap >( new CanvasBitmap( 
::basegfx::B2ISize( ::canvas::tools::roundUp( newSize.Width ),
-                                                                               
                ::canvas::tools::roundUp( newSize.Height ) ),
+            return uno::Reference< rendering::XBitmap >( new CanvasBitmap( 
::basegfx::B2ISize( ::vcl_canvas::tools::roundUp( newSize.Width ),
+                                                                               
                ::vcl_canvas::tools::roundUp( newSize.Height ) ),
                                                                            
mpSurfaceProvider, mpDevice, false ) );
         }
         else
diff --git a/vcl/source/canvas/cairo/cairo_canvashelper_text.cxx 
b/vcl/source/canvas/cairo/cairo_canvashelper_text.cxx
index e45231f8d1d8..3fca5978523f 100644
--- a/vcl/source/canvas/cairo/cairo_canvashelper_text.cxx
+++ b/vcl/source/canvas/cairo/cairo_canvashelper_text.cxx
@@ -28,7 +28,7 @@
 #include <vcl/metric.hxx>
 #include <vcl/virdev.hxx>
 
-#include <canvas/canvastools.hxx>
+#include <vcl_canvas/canvastools.hxx>
 #include <verifyinput.hxx>
 
 #include "cairo_canvasfont.hxx"
@@ -65,7 +65,7 @@ namespace vcl_cairocanvas
     {
         ::basegfx::B2DHomMatrix aMatrix;
 
-        ::canvas::tools::mergeViewAndRenderTransform(aMatrix,
+        ::vcl_canvas::tools::mergeViewAndRenderTransform(aMatrix,
                                                      rViewState,
                                                      rRenderState);
 
@@ -114,7 +114,7 @@ namespace vcl_cairocanvas
                       const rendering::ViewState&   viewState,
                       const rendering::RenderState& renderState )
     {
-        ::canvas::tools::verifyInput( renderState,
+        ::vcl_canvas::tools::verifyInput( renderState,
                                       __func__,
                                       const_cast<rendering::XCanvas*>(pOwner), 
// only for refcount
                                       2,
@@ -122,7 +122,7 @@ namespace vcl_cairocanvas
 
         // TODO(P2): Don't change clipping all the time, maintain current clip
         // state and change only when update is necessary
-        ::canvas::tools::clipOutDev(viewState, renderState, rOutDev);
+        ::vcl_canvas::tools::clipOutDev(viewState, renderState, rOutDev);
 
         Color aColor( COL_WHITE );
 
diff --git a/vcl/source/canvas/cairo/cairo_devicehelper.cxx 
b/vcl/source/canvas/cairo/cairo_devicehelper.cxx
index b0c51bbec863..aacdb20d5a0e 100644
--- a/vcl/source/canvas/cairo/cairo_devicehelper.cxx
+++ b/vcl/source/canvas/cairo/cairo_devicehelper.cxx
@@ -27,7 +27,7 @@
 #include <vcl/canvastools.hxx>
 #include <vcl/dibtools.hxx>
 
-#include <canvas/canvastools.hxx>
+#include <vcl_canvas/canvastools.hxx>
 
 #include "cairo_canvasbitmap.hxx"
 #include "cairo_devicehelper.hxx"
@@ -111,7 +111,7 @@ namespace vcl_cairocanvas
     geometry::RealSize2D DeviceHelper::getPhysicalSize()
     {
         if( !mpRefDevice )
-            return ::canvas::tools::createInfiniteSize2D(); // we're disposed
+            return ::vcl_canvas::tools::createInfiniteSize2D(); // we're 
disposed
 
         // Map the pixel dimensions of the output window to millimeter
         const MapMode aOldMapMode( mpRefDevice->GetMapMode() );
diff --git a/vcl/source/canvas/cairo/cairo_sprite.hxx 
b/vcl/source/canvas/cairo/cairo_sprite.hxx
index b7da6e8a2750..8ccfb4b3381d 100644
--- a/vcl/source/canvas/cairo/cairo_sprite.hxx
+++ b/vcl/source/canvas/cairo/cairo_sprite.hxx
@@ -28,7 +28,7 @@ namespace vcl_cairocanvas
     /** Specialization of ::canvas::Sprite interface, to also provide
         redraw methods.
      */
-    class Sprite : public ::canvas::Sprite
+    class Sprite : public ::vcl_canvas::Sprite
     {
     public:
 
diff --git a/vcl/source/canvas/cairo/cairo_spritecanvas.hxx 
b/vcl/source/canvas/cairo/cairo_spritecanvas.hxx
index a05168ebcb73..0f728f67d5aa 100644
--- a/vcl/source/canvas/cairo/cairo_spritecanvas.hxx
+++ b/vcl/source/canvas/cairo/cairo_spritecanvas.hxx
@@ -55,7 +55,7 @@ namespace vcl_cairocanvas
                                              css::beans::XPropertySet,
                                              css::lang::XServiceName,
                                              css::lang::XServiceInfo >  
WindowGraphicDeviceBase_Base;
-    typedef ::canvas::BufferedGraphicDeviceBase< 
::canvas::DisambiguationHelper< WindowGraphicDeviceBase_Base >,
+    typedef ::vcl_canvas::BufferedGraphicDeviceBase< 
::vcl_canvas::DisambiguationHelper< WindowGraphicDeviceBase_Base >,
                                                  SpriteDeviceHelper,
                                                  ::osl::MutexGuard,
                                                  ::cppu::OWeakObject > 
SpriteCanvasBase_Base;
@@ -77,12 +77,12 @@ namespace vcl_cairocanvas
         enforce any specific interface on its derivees.
      */
     class SpriteCanvasBaseSpriteSurface_Base : public SpriteCanvasBase_Base,
-                                               public ::canvas::SpriteSurface,
+                                               public 
::vcl_canvas::SpriteSurface,
                                                public SurfaceProvider
     {
     };
 
-    typedef ::canvas::SpriteCanvasBase< SpriteCanvasBaseSpriteSurface_Base,
+    typedef ::vcl_canvas::SpriteCanvasBase< SpriteCanvasBaseSpriteSurface_Base,
                                         SpriteCanvasHelper,
                                         ::osl::MutexGuard,
                                         ::cppu::OWeakObject >           
SpriteCanvasBaseT;
diff --git a/vcl/source/canvas/cairo/cairo_spritecanvashelper.cxx 
b/vcl/source/canvas/cairo/cairo_spritecanvashelper.cxx
index 84405c2a7183..440c34cd1d05 100644
--- a/vcl/source/canvas/cairo/cairo_spritecanvashelper.cxx
+++ b/vcl/source/canvas/cairo/cairo_spritecanvashelper.cxx
@@ -25,7 +25,7 @@
 #include <basegfx/range/b2irange.hxx>
 #include <comphelper/diagnose_ex.hxx>
 
-#include <canvas/canvastools.hxx>
+#include <vcl_canvas/canvastools.hxx>
 
 #include <cairo.h>
 
@@ -45,7 +45,7 @@ namespace vcl_cairocanvas
             sprites)
          */
         void spriteRedraw( const CairoSharedPtr& pCairo,
-                           const ::canvas::Sprite::Reference& rSprite )
+                           const ::vcl_canvas::Sprite::Reference& rSprite )
         {
             // downcast to derived cairocanvas::Sprite interface, which
             // provides the actual redraw methods.
@@ -66,7 +66,7 @@ namespace vcl_cairocanvas
             cairo_restore( pCairo.get() );
         }
 
-        void opaqueUpdateSpriteArea( const ::canvas::Sprite::Reference& 
rSprite,
+        void opaqueUpdateSpriteArea( const ::vcl_canvas::Sprite::Reference& 
rSprite,
                                      const CairoSharedPtr&              pCairo,
                                      const ::basegfx::B2IRange&         rArea )
         {
@@ -95,7 +95,7 @@ namespace vcl_cairocanvas
     {
     }
 
-    void SpriteCanvasHelper::init( ::canvas::SpriteRedrawManager& rManager,
+    void SpriteCanvasHelper::init( ::vcl_canvas::SpriteRedrawManager& rManager,
                                    SpriteCanvas&                  rDevice,
                                    const ::basegfx::B2ISize&      rSize )
     {
@@ -235,7 +235,7 @@ namespace vcl_cairocanvas
 
     void SpriteCanvasHelper::scrollUpdate( const ::basegfx::B2DRange&          
             rMoveStart,
                                            const ::basegfx::B2DRange&          
             rMoveEnd,
-                                           const 
::canvas::SpriteRedrawManager::UpdateArea& rUpdateArea )
+                                           const 
::vcl_canvas::SpriteRedrawManager::UpdateArea& rUpdateArea )
     {
         ENSURE_OR_THROW( mpOwningSpriteCanvas &&
                           mpOwningSpriteCanvas->getBufferSurface(),
@@ -259,9 +259,9 @@ namespace vcl_cairocanvas
         // would copy pixel that are not supposed to be part of
         // the sprite.
         ::basegfx::B2IRange aSourceRect(
-            ::canvas::tools::spritePixelAreaFromB2DRange( rMoveStart ) );
+            ::vcl_canvas::tools::spritePixelAreaFromB2DRange( rMoveStart ) );
         const ::basegfx::B2IRange aDestRect(
-            ::canvas::tools::spritePixelAreaFromB2DRange( rMoveEnd ) );
+            ::vcl_canvas::tools::spritePixelAreaFromB2DRange( rMoveEnd ) );
         ::basegfx::B2IPoint aDestPos( aDestRect.getMinimum() );
 
         std::vector< ::basegfx::B2IRange > aUnscrollableAreas;
@@ -272,7 +272,7 @@ namespace vcl_cairocanvas
 
         // clip to output bounds (cannot properly scroll stuff
         // _outside_ our screen area)
-        if( !::canvas::tools::clipScrollArea( aSourceRect,
+        if( !::vcl_canvas::tools::clipScrollArea( aSourceRect,
                                               aDestPos,
                                               aUnscrollableAreas,
                                               aOutputBounds ) )
@@ -285,7 +285,7 @@ namespace vcl_cairocanvas
             // repaint all affected sprites directly to output device
             for( const auto& rComponent : rUpdateArea.maComponentList )
             {
-                const ::canvas::Sprite::Reference& rSprite( 
rComponent.second.getSprite() );
+                const ::vcl_canvas::Sprite::Reference& rSprite( 
rComponent.second.getSprite() );
                 if( rSprite.is() )
                     ::boost::polymorphic_downcast< Sprite* >( rSprite.get() 
)->redraw(
                         pCompositingCairo, true );
@@ -331,9 +331,9 @@ namespace vcl_cairocanvas
             cairo_paint( pCompositingCairo.get() );
             cairo_restore( pCompositingCairo.get() );
 
-            const 
::canvas::SpriteRedrawManager::SpriteConnectedRanges::ComponentListType::const_iterator
+            const 
::vcl_canvas::SpriteRedrawManager::SpriteConnectedRanges::ComponentListType::const_iterator
                 aFirst( rUpdateArea.maComponentList.begin() );
-            
::canvas::SpriteRedrawManager::SpriteConnectedRanges::ComponentListType::const_iterator
+            
::vcl_canvas::SpriteRedrawManager::SpriteConnectedRanges::ComponentListType::const_iterator
                   aSecond( aFirst );
             ++aSecond;
 
@@ -369,7 +369,7 @@ namespace vcl_cairocanvas
     }
 
     void SpriteCanvasHelper::opaqueUpdate( const ::basegfx::B2DRange&          
                rTotalArea,
-                                           const std::vector< 
::canvas::Sprite::Reference >& rSortedUpdateSprites )
+                                           const std::vector< 
::vcl_canvas::Sprite::Reference >& rSortedUpdateSprites )
     {
         ENSURE_OR_THROW( mpOwningSpriteCanvas &&
                           mpOwningSpriteCanvas->getBufferSurface(),
@@ -414,7 +414,7 @@ namespace vcl_cairocanvas
     }
 
     void SpriteCanvasHelper::genericUpdate( const ::basegfx::B2DRange&         
                 rRequestedArea,
-                                            const std::vector< 
::canvas::Sprite::Reference >& rSortedUpdateSprites )
+                                            const std::vector< 
::vcl_canvas::Sprite::Reference >& rSortedUpdateSprites )
     {
         // TODO
         SAL_INFO("canvas.cairo", "SpriteCanvasHelper::genericUpdate called");
@@ -445,9 +445,9 @@ namespace vcl_cairocanvas
         // device's area.
         const Size  aOutputSize(
             std::min( rSize.getWidth(),
-                        ::canvas::tools::roundUp( rRequestedArea.getMaxX() - 
aOutputPosition.X()) ),
+                        ::vcl_canvas::tools::roundUp( rRequestedArea.getMaxX() 
- aOutputPosition.X()) ),
             std::min( rSize.getHeight(),
-                        ::canvas::tools::roundUp( rRequestedArea.getMaxY() - 
aOutputPosition.Y()) ) );
+                        ::vcl_canvas::tools::roundUp( rRequestedArea.getMaxY() 
- aOutputPosition.Y()) ) );
 
         cairo_rectangle( pCompositingCairo.get(), aOutputPosition.X(), 
aOutputPosition.Y(), aOutputSize.Width(), aOutputSize.Height() );
         cairo_clip( pCompositingCairo.get() );
diff --git a/vcl/source/canvas/cairo/cairo_spritecanvashelper.hxx 
b/vcl/source/canvas/cairo/cairo_spritecanvashelper.hxx
index efe0ca9d9507..19221fc06d09 100644
--- a/vcl/source/canvas/cairo/cairo_spritecanvashelper.hxx
+++ b/vcl/source/canvas/cairo/cairo_spritecanvashelper.hxx
@@ -42,7 +42,7 @@ namespace vcl_cairocanvas
     public:
         SpriteCanvasHelper();
 
-        void init( ::canvas::SpriteRedrawManager& rManager,
+        void init( ::vcl_canvas::SpriteRedrawManager& rManager,
                    SpriteCanvas&                  rOwningSpriteCanvas,
                    const ::basegfx::B2ISize&      rSize );
 
@@ -108,13 +108,13 @@ namespace vcl_cairocanvas
          */
         void scrollUpdate( const ::basegfx::B2DRange&                          
 rMoveStart,
                            const ::basegfx::B2DRange&                          
 rMoveEnd,
-                           const ::canvas::SpriteRedrawManager::UpdateArea&    
 rUpdateArea );
+                           const 
::vcl_canvas::SpriteRedrawManager::UpdateArea&     rUpdateArea );
 
         void opaqueUpdate( const ::basegfx::B2DRange&                          
rTotalArea,
-                           const std::vector< ::canvas::Sprite::Reference >& 
rSortedUpdateSprites );
+                           const std::vector< ::vcl_canvas::Sprite::Reference 
>& rSortedUpdateSprites );
 
         void genericUpdate( const ::basegfx::B2DRange&                         
 rTotalArea,
-                            const std::vector< ::canvas::Sprite::Reference >& 
rSortedUpdateSprites );
+                            const std::vector< ::vcl_canvas::Sprite::Reference 
>& rSortedUpdateSprites );
 
     private:
         ::cairo::SurfaceSharedPtr const & getCompositingSurface( const 
::basegfx::B2ISize& rNeededSize );
@@ -122,7 +122,7 @@ namespace vcl_cairocanvas
         ::cairo::SurfaceSharedPtr createSurface( const ::basegfx::B2ISize& 
rNeededSize ) const;
 
         /// Set from the SpriteCanvas: instance coordinating sprite redraw
-        ::canvas::SpriteRedrawManager*  mpRedrawManager;
+        ::vcl_canvas::SpriteRedrawManager*  mpRedrawManager;
 
         /// Set from the init method. used to generate sprites
         SpriteCanvas*                   mpOwningSpriteCanvas;
diff --git a/vcl/source/canvas/cairo/cairo_spritehelper.hxx 
b/vcl/source/canvas/cairo/cairo_spritehelper.hxx
index 2b65be077e4a..67070365a23f 100644
--- a/vcl/source/canvas/cairo/cairo_spritehelper.hxx
+++ b/vcl/source/canvas/cairo/cairo_spritehelper.hxx
@@ -35,7 +35,7 @@ namespace vcl_cairocanvas
         This class implements all sprite-related functionality, like
         that available on the XSprite interface.
      */
-    class SpriteHelper : public ::canvas::CanvasCustomSpriteHelper
+    class SpriteHelper : public ::vcl_canvas::CanvasCustomSpriteHelper
     {
     public:
         /** Create sprite helper
diff --git a/vcl/source/canvas/cairo/cairo_textlayout.cxx 
b/vcl/source/canvas/cairo/cairo_textlayout.cxx
index 950aa2de951e..c9764ce97e83 100644
--- a/vcl/source/canvas/cairo/cairo_textlayout.cxx
+++ b/vcl/source/canvas/cairo/cairo_textlayout.cxx
@@ -23,7 +23,7 @@
 #include <math.h>
 
 #include <com/sun/star/rendering/TextDirection.hpp>
-#include <canvas/canvastools.hxx>
+#include <vcl_canvas/canvastools.hxx>
 #include <basegfx/matrix/b2dhommatrix.hxx>
 #include <basegfx/numeric/ftools.hxx>
 #include <cppuhelper/supportsservice.hxx>
@@ -182,8 +182,8 @@ namespace vcl_cairocanvas
             return geometry::RealRectangle2D( 0, nAboveBaseline,
                                               pVDev->GetTextWidth(
                                                   maText.Text,
-                                                  
::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
-                                                  
::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) ),
+                                                  
::vcl_canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+                                                  
::vcl_canvas::tools::numeric_cast<sal_uInt16>(maText.Length) ),
                                               nBelowBaseline );
         }
     }
@@ -282,14 +282,14 @@ namespace vcl_cairocanvas
             std::span<const sal_Bool> 
aKashidaArray(maKashidaPositions.getConstArray(), 
maKashidaPositions.getLength());
 
             rOutDev.DrawTextArray( rOutpos, maText.Text, aOffsets, 
aKashidaArray,
-                                   
::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
-                                   
::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) );
+                                   
::vcl_canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+                                   
::vcl_canvas::tools::numeric_cast<sal_uInt16>(maText.Length) );
         }
         else
         {
             rOutDev.DrawText( rOutpos, maText.Text,
-                              
::canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
-                              
::canvas::tools::numeric_cast<sal_uInt16>(maText.Length) );
+                              
::vcl_canvas::tools::numeric_cast<sal_uInt16>(maText.StartPosition),
+                              
::vcl_canvas::tools::numeric_cast<sal_uInt16>(maText.Length) );
         }
     }
 
@@ -332,7 +332,7 @@ namespace vcl_cairocanvas
     {
         ::basegfx::B2DHomMatrix aMatrix;
 
-        ::canvas::tools::mergeViewAndRenderTransform(aMatrix,
+        ::vcl_canvas::tools::mergeViewAndRenderTransform(aMatrix,
                                                      viewState,
                                                      renderState);
 
diff --git a/vcl/source/canvas/tools/cachedprimitivebase.cxx 
b/vcl/source/canvas/tools/cachedprimitivebase.cxx
index 73b09758dce2..2bec29d2738d 100644
--- a/vcl/source/canvas/tools/cachedprimitivebase.cxx
+++ b/vcl/source/canvas/tools/cachedprimitivebase.cxx
@@ -30,7 +30,7 @@
 
 using namespace ::com::sun::star;
 
-namespace canvas
+namespace vcl_canvas
 {
     CachedPrimitiveBase::CachedPrimitiveBase( rendering::ViewState             
       aUsedViewState,
                                               uno::Reference< 
rendering::XCanvas >    xTarget ) :
diff --git a/vcl/source/canvas/tools/canvascustomspritehelper.cxx 
b/vcl/source/canvas/tools/canvascustomspritehelper.cxx
index d6aa4e06f0f5..5ca659d44960 100644
--- a/vcl/source/canvas/tools/canvascustomspritehelper.cxx
+++ b/vcl/source/canvas/tools/canvascustomspritehelper.cxx
@@ -33,12 +33,12 @@
 #include <comphelper/diagnose_ex.hxx>
 
 #include <base/canvascustomspritehelper.hxx>
-#include <canvas/canvastools.hxx>
+#include <vcl_canvas/canvastools.hxx>
 
 using namespace ::com::sun::star;
 
 
-namespace canvas
+namespace vcl_canvas
 {
     bool CanvasCustomSpriteHelper::updateClipState( const Sprite::Reference& 
rSprite )
     {
@@ -70,7 +70,7 @@ namespace canvas
 
             // rectangular area which is actually covered by the sprite.
             // coordinates are relative to the sprite origin.
-            ::basegfx::B2DRectangle aSpriteRectPixel = 
::canvas::tools::calcTransformedRectBounds(
+            ::basegfx::B2DRectangle aSpriteRectPixel = 
::vcl_canvas::tools::calcTransformedRectBounds(
                                                         aBounds,
                                                         maTransform );
 
@@ -201,7 +201,7 @@ namespace canvas
                 ::basegfx::B2DRectangle( 0.0,0.0,
                                          aInputSize.Width,
                                          aInputSize.Height ),
-                ::canvas::tools::mergeViewAndRenderTransform(aTransform,
+                ::vcl_canvas::tools::mergeViewAndRenderTransform(aTransform,
                                                              viewState,
                                                              renderState) ) )
         {
@@ -239,7 +239,7 @@ namespace canvas
             return; // we're disposed
 
         ::basegfx::B2DHomMatrix aTransform;
-        ::canvas::tools::mergeViewAndRenderTransform(aTransform,
+        ::vcl_canvas::tools::mergeViewAndRenderTransform(aTransform,
                                                      viewState,
                                                      renderState);
 
@@ -412,7 +412,7 @@ namespace canvas
 
         // transform bounds at origin, as the sprite transformation is
         // formulated that way
-        return ::canvas::tools::calcTransformedRectBounds(
+        return ::vcl_canvas::tools::calcTransformedRectBounds(
                                                            rBounds,
                                                            aTransform );
     }
diff --git a/vcl/source/canvas/tools/canvastools.cxx 
b/vcl/source/canvas/tools/canvastools.cxx
index 553e6dc5562c..b11811df909f 100644
--- a/vcl/source/canvas/tools/canvastools.cxx
+++ b/vcl/source/canvas/tools/canvastools.cxx
@@ -58,12 +58,12 @@
 #include <vcl/canvastools.hxx>
 #include <vcl/window.hxx>
 
-#include <canvas/canvastools.hxx>
+#include <vcl_canvas/canvastools.hxx>
 
 
 using namespace ::com::sun::star;
 
-namespace canvas::tools
+namespace vcl_canvas::tools
 {
         geometry::RealSize2D createInfiniteSize2D()
         {
@@ -1100,7 +1100,7 @@ namespace canvas::tools
             rTotalTransform.identity();
             ::basegfx::unotools::homMatrixFromAffineMatrix( rTotalTransform,
                                                             
texture.AffineTransform );
-            ::canvas::tools::mergeViewAndRenderTransform(aMatrix,
+            ::vcl_canvas::tools::mergeViewAndRenderTransform(aMatrix,
                                                          viewState,
                                                          renderState);
             rTotalTransform *= aMatrix; // prepend total view/render 
transformation
@@ -1172,7 +1172,7 @@ namespace canvas::tools
 
                 ::basegfx::B2DHomMatrix aMatrix;
                 aClipPoly.transform(
-                    ::canvas::tools::mergeViewAndRenderTransform( aMatrix,
+                    ::vcl_canvas::tools::mergeViewAndRenderTransform( aMatrix,
                                                                   viewState,
                                                                   renderState 
) );
 
diff --git a/vcl/source/canvas/tools/elapsedtime.cxx 
b/vcl/source/canvas/tools/elapsedtime.cxx
index 46167dd9a851..55e8759c5a17 100644
--- a/vcl/source/canvas/tools/elapsedtime.cxx
+++ b/vcl/source/canvas/tools/elapsedtime.cxx
@@ -19,12 +19,12 @@
 
 #include <sal/config.h>
 
-#include <canvas/elapsedtime.hxx>
+#include <vcl_canvas/elapsedtime.hxx>
 
 #include <tools/time.hxx>
 #include <utility>
 
-namespace canvas::tools {
+namespace vcl_canvas::tools {
 
 double ElapsedTime::getSystemTime()
 {
diff --git a/vcl/source/canvas/tools/page.cxx b/vcl/source/canvas/tools/page.cxx
index 32eedb71b29f..f785256562bb 100644
--- a/vcl/source/canvas/tools/page.cxx
+++ b/vcl/source/canvas/tools/page.cxx
@@ -21,7 +21,7 @@
 #include <basegfx/vector/b2ivector.hxx>
 #include "page.hxx"
 
-namespace canvas
+namespace vcl_canvas
 {
     Page::Page( const std::shared_ptr<IRenderModule> &rRenderModule ) :
         mpRenderModule(rRenderModule),
diff --git a/vcl/source/canvas/tools/page.hxx b/vcl/source/canvas/tools/page.hxx
index 6af4bf0f6be8..ff60284a17e5 100644
--- a/vcl/source/canvas/tools/page.hxx
+++ b/vcl/source/canvas/tools/page.hxx
@@ -30,7 +30,7 @@
 #include <vector>
 #include "surfacerect.hxx"
 
-namespace canvas
+namespace vcl_canvas
 {
     class PageFragment;
 
diff --git a/vcl/source/canvas/tools/pagemanager.cxx 
b/vcl/source/canvas/tools/pagemanager.cxx
index 4ee7df76ed7e..342698bf9398 100644
--- a/vcl/source/canvas/tools/pagemanager.cxx
+++ b/vcl/source/canvas/tools/pagemanager.cxx
@@ -21,7 +21,7 @@
 #include <basegfx/vector/b2ivector.hxx>
 #include "pagemanager.hxx"
 
-namespace canvas
+namespace vcl_canvas
 {
     FragmentSharedPtr PageManager::allocateSpace( const ::basegfx::B2ISize& 
rSize )
     {
diff --git a/vcl/source/canvas/tools/pagemanager.hxx 
b/vcl/source/canvas/tools/pagemanager.hxx
index 57de912a12ba..d8f485758b29 100644
--- a/vcl/source/canvas/tools/pagemanager.hxx
+++ b/vcl/source/canvas/tools/pagemanager.hxx
@@ -25,13 +25,13 @@
 
 #include "page.hxx"
 
-namespace canvas
+namespace vcl_canvas
 {
     // PageManager
     class PageManager
     {
     public:
-        explicit PageManager(std::shared_ptr<canvas::IRenderModule> 
xRenderModule)
+        explicit PageManager(std::shared_ptr<IRenderModule> xRenderModule)
             : mpRenderModule(std::move(xRenderModule))
         {
         }
@@ -40,7 +40,7 @@ namespace canvas
         // accelerated page, e.g. OpenGL texture.
         ::basegfx::B2ISize getPageSize() const;
 
-        const std::shared_ptr<canvas::IRenderModule>& getRenderModule() const 
{ return mpRenderModule; }
+        const std::shared_ptr<IRenderModule>& getRenderModule() const { return 
mpRenderModule; }
 
         FragmentSharedPtr allocateSpace( const ::basegfx::B2ISize& rSize );
         void              free( const FragmentSharedPtr& pFragment );
@@ -52,7 +52,7 @@ namespace canvas
     private:
         // the pagemanager needs access to the rendermodule
         // since we query for system resources from it.
-        std::shared_ptr<canvas::IRenderModule> mpRenderModule;
+        std::shared_ptr<IRenderModule> mpRenderModule;
 
         // here we collect all fragments that will be created
         // since we need them for relocation purposes.
diff --git a/vcl/source/canvas/tools/parametricpolypolygon.cxx 
b/vcl/source/canvas/tools/parametricpolypolygon.cxx
index cb948e095277..8993a0b00bdc 100644
--- a/vcl/source/canvas/tools/parametricpolypolygon.cxx
+++ b/vcl/source/canvas/tools/parametricpolypolygon.cxx
@@ -31,7 +31,7 @@
 
 using namespace ::com::sun::star;
 
-namespace canvas
+namespace vcl_canvas
 {
     uno::Sequence<OUString> ParametricPolyPolygon::getAvailableServiceNames()
     {
diff --git a/vcl/source/canvas/tools/propertysethelper.cxx 
b/vcl/source/canvas/tools/propertysethelper.cxx
index 24a07cb7dc25..d032fb840833 100644
--- a/vcl/source/canvas/tools/propertysethelper.cxx
+++ b/vcl/source/canvas/tools/propertysethelper.cxx
@@ -27,7 +27,7 @@
 
 using namespace ::com::sun::star;
 
-namespace canvas
+namespace vcl_canvas
 {
     namespace
     {
diff --git a/vcl/source/canvas/tools/spriteredrawmanager.cxx 
b/vcl/source/canvas/tools/spriteredrawmanager.cxx
index 26a1d67f8836..dfaffeb18c38 100644
--- a/vcl/source/canvas/tools/spriteredrawmanager.cxx
+++ b/vcl/source/canvas/tools/spriteredrawmanager.cxx
@@ -30,7 +30,7 @@
 #include <boost/range/adaptor/reversed.hpp>
 #include <utility>
 
-namespace canvas
+namespace vcl_canvas
 {
     namespace
     {
diff --git a/vcl/source/canvas/tools/surface.cxx 
b/vcl/source/canvas/tools/surface.cxx
index c197f6d251a5..e757085446a5 100644
--- a/vcl/source/canvas/tools/surface.cxx
+++ b/vcl/source/canvas/tools/surface.cxx
@@ -26,7 +26,7 @@
 
 #include "surface.hxx"
 
-namespace canvas
+namespace vcl_canvas
 {
     Surface::Surface( PageManagerSharedPtr         rPageManager,
                       std::shared_ptr<IColorBuffer> xColorBuffer,
@@ -149,7 +149,7 @@ namespace canvas
         const ::basegfx::B2DPoint p2(aTransform * 
::basegfx::B2DPoint(0.0,0.0));
         const ::basegfx::B2DPoint p3(aTransform * 
::basegfx::B2DPoint(maSize.getWidth(),0.0));
 
-        canvas::Vertex vertex;
+        vcl_canvas::Vertex vertex;
         vertex.r = 1.0f;
         vertex.g = 1.0f;
         vertex.b = 1.0f;
@@ -157,7 +157,7 @@ namespace canvas
         vertex.z = 0.0f;
 
         {
-            pRenderModule->beginPrimitive( 
canvas::IRenderModule::PrimitiveType::Quad );
+            pRenderModule->beginPrimitive( 
vcl_canvas::IRenderModule::PrimitiveType::Quad );
 
             // issue an endPrimitive() when leaving the scope
             const ::comphelper::ScopeGuard aScopeGuard(
@@ -269,7 +269,7 @@ namespace canvas
         const ::basegfx::B2DPoint p2(aTransform * ::basegfx::B2DPoint(0.0,     
    0.0));
         const ::basegfx::B2DPoint p3(aTransform * 
::basegfx::B2DPoint(aSize.getX(),0.0));
 
-        canvas::Vertex vertex;
+        vcl_canvas::Vertex vertex;
         vertex.r = 1.0f;
         vertex.g = 1.0f;
         vertex.b = 1.0f;
@@ -277,7 +277,7 @@ namespace canvas
         vertex.z = 0.0f;
 
         {
-            pRenderModule->beginPrimitive( 
canvas::IRenderModule::PrimitiveType::Quad );
+            pRenderModule->beginPrimitive( 
vcl_canvas::IRenderModule::PrimitiveType::Quad );
 
             // issue an endPrimitive() when leaving the scope
             const ::comphelper::ScopeGuard aScopeGuard(
@@ -368,14 +368,14 @@ namespace canvas
         // Push vertices to backend renderer
         if(const sal_uInt32 nVertexCount = rTriangleList.count())
         {
-            canvas::Vertex vertex;
+            vcl_canvas::Vertex vertex;
             vertex.r = 1.0f;
             vertex.g = 1.0f;
             vertex.b = 1.0f;
             vertex.a = static_cast<float>(fAlpha);
             vertex.z = 0.0f;
 
-            pRenderModule->beginPrimitive( 
canvas::IRenderModule::PrimitiveType::Triangle );
+            pRenderModule->beginPrimitive( 
vcl_canvas::IRenderModule::PrimitiveType::Triangle );
 
             // issue an endPrimitive() when leaving the scope
             const ::comphelper::ScopeGuard aScopeGuard(
diff --git a/vcl/source/canvas/tools/surface.hxx 
b/vcl/source/canvas/tools/surface.hxx
index e78925292f27..08a261501715 100644
--- a/vcl/source/canvas/tools/surface.hxx
+++ b/vcl/source/canvas/tools/surface.hxx
@@ -29,7 +29,7 @@
 
 #include "pagemanager.hxx"
 
-namespace canvas
+namespace vcl_canvas
 {
     /** surfaces denote occupied areas within pages.
 
diff --git a/vcl/source/canvas/tools/surfaceproxy.cxx 
b/vcl/source/canvas/tools/surfaceproxy.cxx
index b5cd289d9f62..b27686d1e833 100644
--- a/vcl/source/canvas/tools/surfaceproxy.cxx
+++ b/vcl/source/canvas/tools/surfaceproxy.cxx
@@ -27,9 +27,9 @@
 
 #include "surfaceproxy.hxx"
 
-namespace canvas
+namespace vcl_canvas
 {
-    SurfaceProxy::SurfaceProxy( std::shared_ptr<canvas::IColorBuffer> xBuffer,
+    SurfaceProxy::SurfaceProxy( std::shared_ptr<IColorBuffer> xBuffer,
                                 PageManagerSharedPtr           xPageManager ) :
         mpPageManager(std::move( xPageManager )),
         mpBuffer(std::move( xBuffer ))
diff --git a/vcl/source/canvas/tools/surfaceproxy.hxx 
b/vcl/source/canvas/tools/surfaceproxy.hxx
index 72841d754e0a..c5d484ed454c 100644
--- a/vcl/source/canvas/tools/surfaceproxy.hxx
+++ b/vcl/source/canvas/tools/surfaceproxy.hxx
@@ -25,7 +25,7 @@
 #include "pagemanager.hxx"
 #include "surface.hxx"
 
-namespace canvas
+namespace vcl_canvas
 {
     /** Definition of the surface proxy class.
 
@@ -38,7 +38,7 @@ namespace canvas
     {
     public:
 
-        SurfaceProxy( std::shared_ptr<canvas::IColorBuffer> xBuffer,
+        SurfaceProxy( std::shared_ptr<IColorBuffer> xBuffer,
                       PageManagerSharedPtr xPageManager );
 
         // ISurfaceProxy interface
@@ -111,7 +111,7 @@ namespace canvas
         // pointer to the source of image data
         // which always is stored in system memory,
         // 32bit rgba and can have any size.
-        std::shared_ptr<canvas::IColorBuffer> mpBuffer;
+        std::shared_ptr<IColorBuffer> mpBuffer;
     };
 }
 
diff --git a/vcl/source/canvas/tools/surfaceproxymanager.cxx 
b/vcl/source/canvas/tools/surfaceproxymanager.cxx
index b60c5ecb485b..5990fe3b1cfb 100644
--- a/vcl/source/canvas/tools/surfaceproxymanager.cxx
+++ b/vcl/source/canvas/tools/surfaceproxymanager.cxx
@@ -24,7 +24,7 @@
 
 #include "surfaceproxy.hxx"
 
-namespace canvas
+namespace vcl_canvas
 {
     namespace {
 
diff --git a/vcl/source/canvas/tools/surfacerect.hxx 
b/vcl/source/canvas/tools/surfacerect.hxx
index 0925fa8e6f4b..06cf5d1b6783 100644
--- a/vcl/source/canvas/tools/surfacerect.hxx
+++ b/vcl/source/canvas/tools/surfacerect.hxx
@@ -22,7 +22,7 @@
 #include <basegfx/point/b2ipoint.hxx>
 #include <basegfx/vector/b2isize.hxx>
 
-namespace canvas
+namespace vcl_canvas
 {
     /**
      * This implements some equivalent to basegfx::B2IBox, but instead of two
diff --git a/vcl/source/canvas/tools/verifyinput.cxx 
b/vcl/source/canvas/tools/verifyinput.cxx
index ae0704d81d57..76b695640703 100644
--- a/vcl/source/canvas/tools/verifyinput.cxx
+++ b/vcl/source/canvas/tools/verifyinput.cxx
@@ -46,7 +46,7 @@
 
 using namespace ::com::sun::star;
 
-namespace canvas::tools
+namespace vcl_canvas::tools
 {
         void verifyInput( const geometry::RealPoint2D&              rPoint,
                           const char*                               pStr,
commit f936ad5033c10dbbd0bf7801da586dc39ec04f41
Author:     Shardul Vikram Singh <shardulvi...@gmail.com>
AuthorDate: Sat Jul 12 13:17:44 2025 +0530
Commit:     Shardul Vikram Singh <shardulvi...@gmail.com>
CommitDate: Sat Jul 12 13:17:44 2025 +0530

    change cairocanvas namespace to vcl_cairocanvas
    
    in the transferred code to vcl

diff --git a/vcl/source/canvas/cairo/cairo_cachedbitmap.cxx 
b/vcl/source/canvas/cairo/cairo_cachedbitmap.cxx
index e548778b2fe4..83c89aad50a8 100644
--- a/vcl/source/canvas/cairo/cairo_cachedbitmap.cxx
+++ b/vcl/source/canvas/cairo/cairo_cachedbitmap.cxx
@@ -31,7 +31,7 @@
 using namespace ::cairo;
 using namespace ::com::sun::star;
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     CachedBitmap::CachedBitmap( SurfaceSharedPtr                            
pSurface,
                                 const rendering::ViewState&                 
rUsedViewState,
diff --git a/vcl/source/canvas/cairo/cairo_cachedbitmap.hxx 
b/vcl/source/canvas/cairo/cairo_cachedbitmap.hxx
index d7f4c58ef681..a2de0d0bf4ac 100644
--- a/vcl/source/canvas/cairo/cairo_cachedbitmap.hxx
+++ b/vcl/source/canvas/cairo/cairo_cachedbitmap.hxx
@@ -26,7 +26,7 @@
 
 /* Definition of CachedBitmap class */
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     class CachedBitmap : public ::canvas::CachedPrimitiveBase
     {
diff --git a/vcl/source/canvas/cairo/cairo_canvas.cxx 
b/vcl/source/canvas/cairo/cairo_canvas.cxx
index 4078e95deb63..931a3180bcce 100644
--- a/vcl/source/canvas/cairo/cairo_canvas.cxx
+++ b/vcl/source/canvas/cairo/cairo_canvas.cxx
@@ -33,7 +33,7 @@
 using namespace ::cairo;
 using namespace ::com::sun::star;
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     Canvas::Canvas( const uno::Sequence< uno::Any >&                aArguments,
                     const uno::Reference< uno::XComponentContext >& 
/*rxContext*/ ) :
@@ -175,7 +175,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
 com_sun_star_comp_rendering_Canvas_Cairo_get_implementation(
     css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> 
const& args)
 {
-    rtl::Reference<cairocanvas::Canvas> p = new cairocanvas::Canvas(args, 
context);
+    rtl::Reference<vcl_cairocanvas::Canvas> p = new 
vcl_cairocanvas::Canvas(args, context);
     try {
         p->initialize();
     } catch (css::uno::Exception&) {
diff --git a/vcl/source/canvas/cairo/cairo_canvas.hxx 
b/vcl/source/canvas/cairo/cairo_canvas.hxx
index 0c41a8a5c0d3..01abb7de9049 100644
--- a/vcl/source/canvas/cairo/cairo_canvas.hxx
+++ b/vcl/source/canvas/cairo/cairo_canvas.hxx
@@ -41,7 +41,7 @@
 #include "cairo_repainttarget.hxx"
 #include "cairo_surfaceprovider.hxx"
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     typedef ::cppu::WeakComponentImplHelper< css::rendering::XBitmapCanvas,
                                              css::rendering::XIntegerBitmap,
diff --git a/vcl/source/canvas/cairo/cairo_canvasbitmap.cxx 
b/vcl/source/canvas/cairo/cairo_canvasbitmap.cxx
index c4de75ee2fce..c58a66b799c5 100644
--- a/vcl/source/canvas/cairo/cairo_canvasbitmap.cxx
+++ b/vcl/source/canvas/cairo/cairo_canvasbitmap.cxx
@@ -33,7 +33,7 @@
 using namespace ::cairo;
 using namespace ::com::sun::star;
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     CanvasBitmap::CanvasBitmap( const ::basegfx::B2ISize&  rSize,
                                 SurfaceProviderRef         rSurfaceProvider,
diff --git a/vcl/source/canvas/cairo/cairo_canvasbitmap.hxx 
b/vcl/source/canvas/cairo/cairo_canvasbitmap.hxx
index f2371821023f..8009ccaf74d2 100644
--- a/vcl/source/canvas/cairo/cairo_canvasbitmap.hxx
+++ b/vcl/source/canvas/cairo/cairo_canvasbitmap.hxx
@@ -37,7 +37,7 @@
 
 /* Definition of CanvasBitmap class */
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     typedef ::cppu::WeakComponentImplHelper< css::rendering::XBitmapCanvas,
                                              css::rendering::XIntegerBitmap,
diff --git a/vcl/source/canvas/cairo/cairo_canvascustomsprite.cxx 
b/vcl/source/canvas/cairo/cairo_canvascustomsprite.cxx
index 72fb291ebf35..8e97c703d4aa 100644
--- a/vcl/source/canvas/cairo/cairo_canvascustomsprite.cxx
+++ b/vcl/source/canvas/cairo/cairo_canvascustomsprite.cxx
@@ -34,7 +34,7 @@
 using namespace ::cairo;
 using namespace ::com::sun::star;
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     CanvasCustomSprite::CanvasCustomSprite( const css::geometry::RealSize2D&   
rSpriteSize,
                                             const SpriteCanvasRef&             
             rRefDevice ) :
diff --git a/vcl/source/canvas/cairo/cairo_canvascustomsprite.hxx 
b/vcl/source/canvas/cairo/cairo_canvascustomsprite.hxx
index ffe766ab0966..b6c9046ed010 100644
--- a/vcl/source/canvas/cairo/cairo_canvascustomsprite.hxx
+++ b/vcl/source/canvas/cairo/cairo_canvascustomsprite.hxx
@@ -41,7 +41,7 @@
 #include "cairo_spritecanvas.hxx"
 
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     typedef ::cppu::WeakComponentImplHelper< css::rendering::XCustomSprite,
                                              css::rendering::XBitmapCanvas,
diff --git a/vcl/source/canvas/cairo/cairo_canvasfont.cxx 
b/vcl/source/canvas/cairo/cairo_canvasfont.cxx
index a2650811b721..e6d20efe150c 100644
--- a/vcl/source/canvas/cairo/cairo_canvasfont.cxx
+++ b/vcl/source/canvas/cairo/cairo_canvasfont.cxx
@@ -34,7 +34,7 @@
 
 using namespace ::com::sun::star;
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
 
     CanvasFont::CanvasFont( const rendering::FontRequest&                   
rFontRequest,
diff --git a/vcl/source/canvas/cairo/cairo_canvasfont.hxx 
b/vcl/source/canvas/cairo/cairo_canvasfont.hxx
index d5e015006c98..6280bb6f46c3 100644
--- a/vcl/source/canvas/cairo/cairo_canvasfont.hxx
+++ b/vcl/source/canvas/cairo/cairo_canvasfont.hxx
@@ -35,7 +35,7 @@
 
 /* Definition of CanvasFont class */
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     typedef ::comphelper::WeakComponentImplHelper< css::rendering::XCanvasFont,
                                              css::lang::XServiceInfo > 
CanvasFont_Base;
diff --git a/vcl/source/canvas/cairo/cairo_canvashelper.cxx 
b/vcl/source/canvas/cairo/cairo_canvashelper.cxx
index 701ad1e47859..22b0b6dfa78b 100644
--- a/vcl/source/canvas/cairo/cairo_canvashelper.cxx
+++ b/vcl/source/canvas/cairo/cairo_canvashelper.cxx
@@ -59,7 +59,7 @@
 using namespace ::cairo;
 using namespace ::com::sun::star;
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     CanvasHelper::CanvasHelper() :
         mpSurfaceProvider(nullptr),
diff --git a/vcl/source/canvas/cairo/cairo_canvashelper.hxx 
b/vcl/source/canvas/cairo/cairo_canvashelper.hxx
index 37a054f24c36..f9f69a4c33ad 100644
--- a/vcl/source/canvas/cairo/cairo_canvashelper.hxx
+++ b/vcl/source/canvas/cairo/cairo_canvashelper.hxx
@@ -36,7 +36,7 @@ namespace basegfx {
     class B2DPolyPolygon;
 }
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
 
     enum Operation {
diff --git a/vcl/source/canvas/cairo/cairo_canvashelper_text.cxx 
b/vcl/source/canvas/cairo/cairo_canvashelper_text.cxx
index c8498bddf3b7..e45231f8d1d8 100644
--- a/vcl/source/canvas/cairo/cairo_canvashelper_text.cxx
+++ b/vcl/source/canvas/cairo/cairo_canvashelper_text.cxx
@@ -38,7 +38,7 @@
 using namespace ::cairo;
 using namespace ::com::sun::star;
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     uno::Reference< rendering::XCanvasFont > CanvasHelper::createFont( const 
rendering::XCanvas*                    ,
                                                                        const 
rendering::FontRequest&                fontRequest,
diff --git a/vcl/source/canvas/cairo/cairo_devicehelper.cxx 
b/vcl/source/canvas/cairo/cairo_devicehelper.cxx
index 3d3f7ef8301c..b0c51bbec863 100644
--- a/vcl/source/canvas/cairo/cairo_devicehelper.cxx
+++ b/vcl/source/canvas/cairo/cairo_devicehelper.cxx
@@ -35,7 +35,7 @@
 using namespace ::cairo;
 using namespace ::com::sun::star;
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     DeviceHelper::DeviceHelper() :
         mpSurfaceProvider( nullptr ),
diff --git a/vcl/source/canvas/cairo/cairo_devicehelper.hxx 
b/vcl/source/canvas/cairo/cairo_devicehelper.hxx
index eede77844d3a..3597c8d888ff 100644
--- a/vcl/source/canvas/cairo/cairo_devicehelper.hxx
+++ b/vcl/source/canvas/cairo/cairo_devicehelper.hxx
@@ -27,7 +27,7 @@
 
 /* Definition of DeviceHelper class */
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     class DeviceHelper
     {
diff --git a/vcl/source/canvas/cairo/cairo_repainttarget.hxx 
b/vcl/source/canvas/cairo/cairo_repainttarget.hxx
index 94d3d3845b3e..b9416be9a8b7 100644
--- a/vcl/source/canvas/cairo/cairo_repainttarget.hxx
+++ b/vcl/source/canvas/cairo/cairo_repainttarget.hxx
@@ -24,7 +24,7 @@
 
 #include <vcl/cairo.hxx>
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     /* Definition of RepaintTarget interface */
 
diff --git a/vcl/source/canvas/cairo/cairo_sprite.hxx 
b/vcl/source/canvas/cairo/cairo_sprite.hxx
index 513283e308c9..b7da6e8a2750 100644
--- a/vcl/source/canvas/cairo/cairo_sprite.hxx
+++ b/vcl/source/canvas/cairo/cairo_sprite.hxx
@@ -23,7 +23,7 @@
 
 #include <vcl/cairo.hxx>
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     /** Specialization of ::canvas::Sprite interface, to also provide
         redraw methods.
diff --git a/vcl/source/canvas/cairo/cairo_spritecanvas.cxx 
b/vcl/source/canvas/cairo/cairo_spritecanvas.cxx
index 76cd936862ea..8c161cf3af1d 100644
--- a/vcl/source/canvas/cairo/cairo_spritecanvas.cxx
+++ b/vcl/source/canvas/cairo/cairo_spritecanvas.cxx
@@ -36,7 +36,7 @@
 using namespace ::cairo;
 using namespace ::com::sun::star;
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     SpriteCanvas::SpriteCanvas( const uno::Sequence< uno::Any >&               
 aArguments,
                                 const uno::Reference< uno::XComponentContext 
>& /*rxContext*/ ) :
@@ -226,7 +226,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
 com_sun_star_comp_rendering_SpriteCanvas_Cairo_get_implementation(
     css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> 
const& args)
 {
-    rtl::Reference<cairocanvas::SpriteCanvas> p = new 
cairocanvas::SpriteCanvas(args, context);
+    rtl::Reference<vcl_cairocanvas::SpriteCanvas> p = new 
vcl_cairocanvas::SpriteCanvas(args, context);
     p->initialize();
     return cppu::acquire(p.get());
 }
diff --git a/vcl/source/canvas/cairo/cairo_spritecanvas.hxx 
b/vcl/source/canvas/cairo/cairo_spritecanvas.hxx
index 7790e68904b0..a05168ebcb73 100644
--- a/vcl/source/canvas/cairo/cairo_spritecanvas.hxx
+++ b/vcl/source/canvas/cairo/cairo_spritecanvas.hxx
@@ -43,7 +43,7 @@
 #include "cairo_surfaceprovider.hxx"
 #include "cairo_spritecanvashelper.hxx"
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     typedef ::cppu::WeakComponentImplHelper< css::rendering::XSpriteCanvas,
                                              css::rendering::XIntegerBitmap,
diff --git a/vcl/source/canvas/cairo/cairo_spritecanvashelper.cxx 
b/vcl/source/canvas/cairo/cairo_spritecanvashelper.cxx
index 45a594545663..84405c2a7183 100644
--- a/vcl/source/canvas/cairo/cairo_spritecanvashelper.cxx
+++ b/vcl/source/canvas/cairo/cairo_spritecanvashelper.cxx
@@ -35,7 +35,7 @@
 using namespace ::cairo;
 using namespace ::com::sun::star;
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     namespace
     {
diff --git a/vcl/source/canvas/cairo/cairo_spritecanvashelper.hxx 
b/vcl/source/canvas/cairo/cairo_spritecanvashelper.hxx
index 2b11f1bcf0ac..efe0ca9d9507 100644
--- a/vcl/source/canvas/cairo/cairo_spritecanvashelper.hxx
+++ b/vcl/source/canvas/cairo/cairo_spritecanvashelper.hxx
@@ -33,7 +33,7 @@ namespace basegfx
     class B2IRange;
 }
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     class SpriteCanvas;
 
diff --git a/vcl/source/canvas/cairo/cairo_spritedevicehelper.cxx 
b/vcl/source/canvas/cairo/cairo_spritedevicehelper.cxx
index 69a057c9918f..33db9231a8fd 100644
--- a/vcl/source/canvas/cairo/cairo_spritedevicehelper.cxx
+++ b/vcl/source/canvas/cairo/cairo_spritedevicehelper.cxx
@@ -30,7 +30,7 @@
 using namespace ::cairo;
 using namespace ::com::sun::star;
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
 
     SpriteDeviceHelper::SpriteDeviceHelper() :
diff --git a/vcl/source/canvas/cairo/cairo_spritedevicehelper.hxx 
b/vcl/source/canvas/cairo/cairo_spritedevicehelper.hxx
index 63e9d13039f5..0e8dec3269f2 100644
--- a/vcl/source/canvas/cairo/cairo_spritedevicehelper.hxx
+++ b/vcl/source/canvas/cairo/cairo_spritedevicehelper.hxx
@@ -28,7 +28,7 @@
 
 /* Definition of DeviceHelper class */
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     class SpriteCanvas;
 
diff --git a/vcl/source/canvas/cairo/cairo_spritehelper.cxx 
b/vcl/source/canvas/cairo/cairo_spritehelper.cxx
index 4e536261989c..b20651209fa6 100644
--- a/vcl/source/canvas/cairo/cairo_spritehelper.cxx
+++ b/vcl/source/canvas/cairo/cairo_spritehelper.cxx
@@ -35,7 +35,7 @@
 using namespace ::cairo;
 using namespace ::com::sun::star;
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     SpriteHelper::SpriteHelper() :
         mbTextureDirty(true)
diff --git a/vcl/source/canvas/cairo/cairo_spritehelper.hxx 
b/vcl/source/canvas/cairo/cairo_spritehelper.hxx
index df0919e7fd6a..2b65be077e4a 100644
--- a/vcl/source/canvas/cairo/cairo_spritehelper.hxx
+++ b/vcl/source/canvas/cairo/cairo_spritehelper.hxx
@@ -26,7 +26,7 @@
 #include "cairo_spritecanvas.hxx"
 
 
-namespace cairocanvas
+namespace vcl_cairocanvas
 {
     /* Definition of SpriteHelper class */
 
diff --git a/vcl/source/canvas/cairo/cairo_surfaceprovider.hxx 
b/vcl/source/canvas/cairo/cairo_surfaceprovider.hxx
index 1ff6f2aa7d3f..16b5c8b5e2e4 100644
--- a/vcl/source/canvas/cairo/cairo_surfaceprovider.hxx
+++ b/vcl/source/canvas/cairo/cairo_surfaceprovider.hxx
@@ -28,7 +28,7 @@
 class OutputDevice;
 class Bitmap;
 
-namespace cairocanvas
-e 
... etc. - the rest is truncated

Reply via email to