include/svx/svdobj.hxx                          |    8 
 svx/source/svdraw/svdmodel.cxx                  |   25 +--
 svx/source/svdraw/svdoashp.cxx                  |  198 +++++++++++-------------
 svx/source/svdraw/svdobj.cxx                    |  160 +++++++++++++------
 svx/source/svdraw/svdocirc.cxx                  |    8 
 svx/source/svdraw/svdoedge.cxx                  |   19 +-
 svx/source/svdraw/svdograf.cxx                  |   14 -
 svx/source/svdraw/svdogrp.cxx                   |   24 +-
 svx/source/svdraw/svdopage.cxx                  |    2 
 svx/source/svdraw/svdotextpathdecomposition.cxx |   24 +-
 svx/source/svdraw/svdotxtr.cxx                  |    8 
 svx/source/svdraw/svdovirt.cxx                  |   15 +
 sw/source/core/draw/dcontact.cxx                |    8 
 sw/source/core/draw/dflyobj.cxx                 |   41 +++-
 14 files changed, 311 insertions(+), 243 deletions(-)

New commits:
commit ce2003a672c410e9cd47bb6580688eee57165d7c
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Thu Jul 28 15:18:15 2022 +0200
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Fri Jul 29 20:48:49 2022 +0200

    svx: manipulate SdrObject::m_aOutRect indirectly
    
    Change-Id: I0d8a8e4df06595250c07a61181fbd76fe1da5662
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137571
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 2e350c49b0f4..daf6cde70319 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -885,7 +885,13 @@ public:
     void ForceMetricToItemPoolMetric(basegfx::B2DPolyPolygon& rPolyPolygon) 
const noexcept;
 
 protected:
-    mutable tools::Rectangle    m_aOutRect;     // surrounding rectangle for 
Paint (incl. LineWidth, ...)
+    tools::Rectangle getOutRectangle() const;
+    void setOutRectangleConst(tools::Rectangle const& rRectangle) const; // 
need to do something about this
+    void setOutRectangle(tools::Rectangle const& rRectangle);
+    void resetOutRectangle();
+    void moveOutRectangle(sal_Int32 nXDelta, sal_Int32 nYDelta);
+
+    mutable tools::Rectangle m_aOutRect;     // surrounding rectangle for 
Paint (incl. LineWidth, ...)
     Point                       m_aAnchor;      // anchor position (Writer)
     SdrObjUserCall*             m_pUserCall;
     std::unique_ptr<SdrObjPlusData>
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 640b8abf547c..7cd102252b60 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -2034,7 +2034,7 @@ void SdrObjCustomShape::DragMoveCustomShapeHdl( const 
Point& rDestination,
             sal_Int32 nYDiff = aPt.Y - aInteractionHandle.aPosition.Y;
 
             maRect.Move( nXDiff, nYDiff );
-            m_aOutRect.Move( nXDiff, nYDiff );
+            moveOutRectangle(nXDiff, nYDiff);
             maSnapRect.Move( nXDiff, nYDiff );
             SetBoundAndSnapRectsDirty(/*bNotMyself*/true);
             InvalidateRenderGeometry();
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index d503d68009ef..585988077edc 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1382,23 +1382,26 @@ bool SdrObject::BegCreate(SdrDragStat& rStat)
     tools::Rectangle aRect1(rStat.GetStart(), rStat.GetNow());
     aRect1.Justify();
     rStat.SetActionRect(aRect1);
-    m_aOutRect = aRect1;
+    setOutRectangle(aRect1);
     return true;
 }
 
 bool SdrObject::MovCreate(SdrDragStat& rStat)
 {
-    rStat.TakeCreateRect(m_aOutRect);
-    rStat.SetActionRect(m_aOutRect);
-    m_aOutRect.Justify();
-
+    tools::Rectangle aRectangle;
+    rStat.TakeCreateRect(aRectangle);
+    rStat.SetActionRect(aRectangle);
+    aRectangle.Justify();
+    setOutRectangle(aRectangle);
     return true;
 }
 
 bool SdrObject::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
 {
-    rStat.TakeCreateRect(m_aOutRect);
-    m_aOutRect.Justify();
+    tools::Rectangle aRectangle;
+    rStat.TakeCreateRect(aRectangle);
+    aRectangle.Justify();
+    setOutRectangle(aRectangle);
 
     return (eCmd==SdrCreateCmd::ForceEnd || rStat.GetPointCount()>=2);
 }
@@ -1429,9 +1432,9 @@ PointerStyle SdrObject::GetCreatePointer() const
 }
 
 // transformations
-void SdrObject::NbcMove(const Size& rSiz)
+void SdrObject::NbcMove(const Size& rSize)
 {
-    m_aOutRect.Move(rSiz);
+    moveOutRectangle(rSize.Width(), rSize.Height());
     SetBoundAndSnapRectsDirty();
 }
 
@@ -1452,7 +1455,10 @@ void SdrObject::NbcResize(const Point& rRef, const 
Fraction& xFact, const Fracti
             NbcMirrorGluePoints(aRef1,aRef2);
         }
     }
-    ResizeRect(m_aOutRect,rRef,xFact,yFact);
+    auto aRectangle = getOutRectangle();
+    ResizeRect(aRectangle, rRef, xFact, yFact);
+    setOutRectangle(aRectangle);
+
     SetBoundAndSnapRectsDirty();
 }
 
@@ -1465,60 +1471,85 @@ void SdrObject::NbcRotate(const Point& rRef, Degree100 
nAngle)
     }
 }
 
-void SdrObject::NbcRotate(const Point& rRef,  Degree100 nAngle, double sn, 
double cs)
+namespace
 {
-    SetGlueReallyAbsolute(true);
-    m_aOutRect.Move(-rRef.X(),-rRef.Y());
-    tools::Rectangle R(m_aOutRect);
+
+tools::Rectangle lclRotateRectangle(tools::Rectangle const& rRectangle, Point 
const& rRef, double sn, double cs)
+{
+    tools::Rectangle aRectangle(rRectangle);
+    aRectangle.Move(-rRef.X(),-rRef.Y());
+    tools::Rectangle R(aRectangle);
     if (sn==1.0 && cs==0.0) { // 90deg
-        m_aOutRect.SetLeft(-R.Bottom() );
-        m_aOutRect.SetRight(-R.Top() );
-        m_aOutRect.SetTop(R.Left() );
-        m_aOutRect.SetBottom(R.Right() );
+        aRectangle.SetLeft(-R.Bottom() );
+        aRectangle.SetRight(-R.Top() );
+        aRectangle.SetTop(R.Left() );
+        aRectangle.SetBottom(R.Right() );
     } else if (sn==0.0 && cs==-1.0) { // 180deg
-        m_aOutRect.SetLeft(-R.Right() );
-        m_aOutRect.SetRight(-R.Left() );
-        m_aOutRect.SetTop(-R.Bottom() );
-        m_aOutRect.SetBottom(-R.Top() );
+        aRectangle.SetLeft(-R.Right() );
+        aRectangle.SetRight(-R.Left() );
+        aRectangle.SetTop(-R.Bottom() );
+        aRectangle.SetBottom(-R.Top() );
     } else if (sn==-1.0 && cs==0.0) { // 270deg
-        m_aOutRect.SetLeft(R.Top() );
-        m_aOutRect.SetRight(R.Bottom() );
-        m_aOutRect.SetTop(-R.Right() );
-        m_aOutRect.SetBottom(-R.Left() );
+        aRectangle.SetLeft(R.Top() );
+        aRectangle.SetRight(R.Bottom() );
+        aRectangle.SetTop(-R.Right() );
+        aRectangle.SetBottom(-R.Left() );
     }
-    m_aOutRect.Move(rRef.X(),rRef.Y());
-    m_aOutRect.Justify(); // just in case
-    SetBoundAndSnapRectsDirty();
-    NbcRotateGluePoints(rRef,nAngle,sn,cs);
-    SetGlueReallyAbsolute(false);
+    aRectangle.Move(rRef.X(),rRef.Y());
+    aRectangle.Justify(); // just in case
+    return aRectangle;
 }
 
-void SdrObject::NbcMirror(const Point& rRef1, const Point& rRef2)
+tools::Rectangle lclMirrorRectangle(tools::Rectangle const& rRectangle, Point 
const& rRef1, Point const& rRef2)
 {
-    SetGlueReallyAbsolute(true);
-    m_aOutRect.Move(-rRef1.X(),-rRef1.Y());
-    tools::Rectangle R(m_aOutRect);
+    tools::Rectangle aRectangle(rRectangle);
+    aRectangle.Move(-rRef1.X(),-rRef1.Y());
+    tools::Rectangle R(aRectangle);
     tools::Long dx=rRef2.X()-rRef1.X();
     tools::Long dy=rRef2.Y()-rRef1.Y();
     if (dx==0) {          // vertical axis
-        m_aOutRect.SetLeft(-R.Right() );
-        m_aOutRect.SetRight(-R.Left() );
+        aRectangle.SetLeft(-R.Right() );
+        aRectangle.SetRight(-R.Left() );
     } else if (dy==0) {   // horizontal axis
-        m_aOutRect.SetTop(-R.Bottom() );
-        m_aOutRect.SetBottom(-R.Top() );
+        aRectangle.SetTop(-R.Bottom() );
+        aRectangle.SetBottom(-R.Top() );
     } else if (dx==dy) {  // 45deg axis
-        m_aOutRect.SetLeft(R.Top() );
-        m_aOutRect.SetRight(R.Bottom() );
-        m_aOutRect.SetTop(R.Left() );
-        m_aOutRect.SetBottom(R.Right() );
+        aRectangle.SetLeft(R.Top() );
+        aRectangle.SetRight(R.Bottom() );
+        aRectangle.SetTop(R.Left() );
+        aRectangle.SetBottom(R.Right() );
     } else if (dx==-dy) { // 45deg axis
-        m_aOutRect.SetLeft(-R.Bottom() );
-        m_aOutRect.SetRight(-R.Top() );
-        m_aOutRect.SetTop(-R.Right() );
-        m_aOutRect.SetBottom(-R.Left() );
+        aRectangle.SetLeft(-R.Bottom() );
+        aRectangle.SetRight(-R.Top() );
+        aRectangle.SetTop(-R.Right() );
+        aRectangle.SetBottom(-R.Left() );
     }
-    m_aOutRect.Move(rRef1.X(),rRef1.Y());
-    m_aOutRect.Justify(); // just in case
+    aRectangle.Move(rRef1.X(),rRef1.Y());
+    aRectangle.Justify(); // just in case
+    return aRectangle;
+}
+
+} // end anonymous namespace
+
+void SdrObject::NbcRotate(const Point& rRef,  Degree100 nAngle, double sn, 
double cs)
+{
+    SetGlueReallyAbsolute(true);
+    tools::Rectangle aRectangle = getOutRectangle();
+    aRectangle = lclRotateRectangle(aRectangle, rRef, sn, cs);
+    setOutRectangle(aRectangle);
+    SetBoundAndSnapRectsDirty();
+    NbcRotateGluePoints(rRef, nAngle, sn, cs);
+    SetGlueReallyAbsolute(false);
+}
+
+void SdrObject::NbcMirror(const Point& rRef1, const Point& rRef2)
+{
+    SetGlueReallyAbsolute(true);
+
+    tools::Rectangle aRectangle = getOutRectangle();
+    aRectangle = lclMirrorRectangle(aRectangle, rRef1, rRef2);
+    setOutRectangle(aRectangle);
+
     SetBoundAndSnapRectsDirty();
     NbcMirrorGluePoints(rRef1,rRef2);
     SetGlueReallyAbsolute(false);
@@ -1669,7 +1700,7 @@ const tools::Rectangle& SdrObject::GetSnapRect() const
 
 void SdrObject::NbcSetSnapRect(const tools::Rectangle& rRect)
 {
-    m_aOutRect=rRect;
+    setOutRectangle(rRect);
 }
 
 const tools::Rectangle& SdrObject::GetLogicRect() const
@@ -1780,7 +1811,7 @@ void SdrObject::dumpAsXml(xmlTextWriterPtr pWriter) const
     (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("title"), "%s", 
BAD_CAST(GetTitle().toUtf8().getStr()));
     (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("description"), 
"%s", BAD_CAST(GetDescription().toUtf8().getStr()));
     (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("nOrdNum"), "%" 
SAL_PRIuUINT32, GetOrdNumDirect());
-    (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("aOutRect"), 
BAD_CAST(m_aOutRect.toString().getStr()));
+    (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("aOutRect"), 
BAD_CAST(getOutRectangle().toString().getStr()));
 
     if (m_pGrabBagItem)
     {
@@ -1926,7 +1957,7 @@ void SdrObject::SaveGeoData(SdrObjGeoData& rGeo) const
 void SdrObject::RestoreGeoData(const SdrObjGeoData& rGeo)
 {
     SetBoundAndSnapRectsDirty();
-    m_aOutRect      =rGeo.aBoundRect    ;
+    setOutRectangle(rGeo.aBoundRect);
     m_aAnchor       =rGeo.aAnchor       ;
     m_bMovProt      =rGeo.bMovProt      ;
     m_bSizProt      =rGeo.bSizProt      ;
@@ -3191,6 +3222,31 @@ void 
SdrObject::ForceMetricToItemPoolMetric(basegfx::B2DPolyPolygon& rPolyPolygo
     }
 }
 
+tools::Rectangle SdrObject::getOutRectangle() const
+{
+    return m_aOutRect;
+}
+
+void SdrObject::setOutRectangleConst(tools::Rectangle const& rRectangle) const
+{
+    m_aOutRect = rRectangle;
+}
+
+void SdrObject::setOutRectangle(tools::Rectangle const& rRectangle)
+{
+    m_aOutRect = rRectangle;
+}
+
+void SdrObject::resetOutRectangle()
+{
+    m_aOutRect = tools::Rectangle();
+}
+
+void SdrObject::moveOutRectangle(sal_Int32 nXDelta, sal_Int32 nYDelta)
+{
+    m_aOutRect.Move(nXDelta, nYDelta);
+}
+
 SdrObject* SdrObjFactory::CreateObjectFromFactory(SdrModel& rSdrModel, 
SdrInventor nInventor, SdrObjKind nObjIdentifier)
 {
     SdrObjCreatorParams aParams { nInventor, nObjIdentifier, rSdrModel };
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index 0204b2c2effe..bf253ceeee39 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -807,11 +807,11 @@ PointerStyle SdrCircObj::GetCreatePointer() const
     return PointerStyle::Cross;
 }
 
-void SdrCircObj::NbcMove(const Size& aSiz)
+void SdrCircObj::NbcMove(const Size& aSize)
 {
-    maRect.Move(aSiz);
-    m_aOutRect.Move(aSiz);
-    maSnapRect.Move(aSiz);
+    maRect.Move(aSize);
+    moveOutRectangle(aSize.Width(), aSize.Height());
+    maSnapRect.Move(aSize);
     SetXPolyDirty();
     SetBoundAndSnapRectsDirty(true);
 }
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 769a720c3339..92a5829af2c0 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -729,10 +729,13 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& 
rTrack0, SdrObjConnection&
         sal_uInt16 nSiz=rTrack0.GetPointCount();
         nSiz--;
         aPt2=rTrack0[nSiz];
-    } else {
-        if (!m_aOutRect.IsEmpty()) {
-            aPt1=m_aOutRect.TopLeft();
-            aPt2=m_aOutRect.BottomRight();
+    }
+    else
+    {
+        auto aRectangle = getOutRectangle();
+        if (!aRectangle.IsEmpty()) {
+            aPt1 = aRectangle.TopLeft();
+            aPt2 = aRectangle.BottomRight();
         }
     }
 
@@ -746,7 +749,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& 
rTrack0, SdrObjConnection&
         if (rCon1.pObj==static_cast<SdrObject const *>(this))
         {
             // check, just in case
-            aBoundRect1=m_aOutRect;
+            aBoundRect1 = getOutRectangle();
         }
         else
         {
@@ -773,7 +776,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& 
rTrack0, SdrObjConnection&
     {
         if (rCon2.pObj==static_cast<SdrObject const *>(this))
         { // check, just in case
-            aBoundRect2=m_aOutRect;
+            aBoundRect2 = getOutRectangle();
         }
         else
         {
@@ -2539,9 +2542,9 @@ Point SdrEdgeObj::GetTailPoint( bool bTail ) const
     else
     {
         if(bTail)
-            return m_aOutRect.TopLeft();
+            return getOutRectangle().TopLeft();
         else
-            return m_aOutRect.BottomRight();
+            return getOutRectangle().BottomRight();
     }
 
 }
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index 7fc8e0b12f80..d71ff03e1051 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -247,7 +247,7 @@ const tools::Rectangle& SdrObjGroup::GetCurrentBoundRect() 
const
     // <aOutRect> has to contain the bounding rectangle
     if(0 != GetObjCount())
     {
-        m_aOutRect = GetAllObjBoundRect();
+        setOutRectangleConst(GetAllObjBoundRect());
     }
 
     return m_aOutRect;
@@ -324,7 +324,7 @@ basegfx::B2DPolyPolygon SdrObjGroup::TakeXorPoly() const
 
     if(!aRetval.count())
     {
-        const basegfx::B2DRange aRange = 
vcl::unotools::b2DRectangleFromRectangle(m_aOutRect);
+        const basegfx::B2DRange aRange = 
vcl::unotools::b2DRectangleFromRectangle(getOutRectangle());
         aRetval.append(basegfx::utils::createPolygonFromRect(aRange));
     }
 
@@ -399,9 +399,9 @@ void SdrObjGroup::NbcSetLogicRect(const tools::Rectangle& 
rRect)
 }
 
 
-void SdrObjGroup::NbcMove(const Size& rSiz)
+void SdrObjGroup::NbcMove(const Size& rSize)
 {
-    maRefPoint.Move(rSiz);
+    maRefPoint.Move(rSize);
     const size_t nObjCount(GetObjCount());
 
     if(0 != nObjCount)
@@ -409,12 +409,12 @@ void SdrObjGroup::NbcMove(const Size& rSiz)
         for (size_t i=0; i<nObjCount; ++i)
         {
             SdrObject* pObj(GetObj(i));
-            pObj->NbcMove(rSiz);
+            pObj->NbcMove(rSize);
         }
     }
     else
     {
-        m_aOutRect.Move(rSiz);
+        moveOutRectangle(rSize.Width(), rSize.Height());
         SetBoundAndSnapRectsDirty();
     }
 }
@@ -451,7 +451,10 @@ void SdrObjGroup::NbcResize(const Point& rRef, const 
Fraction& xFact, const Frac
     }
     else
     {
-        ResizeRect(m_aOutRect,rRef,xFact,yFact);
+        auto aRectangle = getOutRectangle();
+        ResizeRect(aRectangle, rRef, xFact, yFact);
+        setOutRectangle(aRectangle);
+
         SetBoundAndSnapRectsDirty();
     }
 }
@@ -591,7 +594,7 @@ void SdrObjGroup::Move(const Size& rSiz)
     }
     else
     {
-        m_aOutRect.Move(rSiz);
+        moveOutRectangle(rSiz.Width(), rSiz.Height());
         SetBoundAndSnapRectsDirty();
     }
 
@@ -644,7 +647,10 @@ void SdrObjGroup::Resize(const Point& rRef, const 
Fraction& xFact, const Fractio
     }
     else
     {
-        ResizeRect(m_aOutRect,rRef,xFact,yFact);
+        auto aRectangle = getOutRectangle();
+        ResizeRect(aRectangle, rRef, xFact, yFact);
+        setOutRectangle(aRectangle);
+
         SetBoundAndSnapRectsDirty();
     }
 
diff --git a/svx/source/svdraw/svdopage.cxx b/svx/source/svdraw/svdopage.cxx
index 67c7a104e2f5..800102aba2c9 100644
--- a/svx/source/svdraw/svdopage.cxx
+++ b/svx/source/svdraw/svdopage.cxx
@@ -89,7 +89,7 @@ SdrPageObj::SdrPageObj(
         mpShownPage->AddPageUser(*this);
     }
 
-    m_aOutRect = rRect;
+    setOutRectangle(rRect);
 }
 
 SdrPageObj::~SdrPageObj()
diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx
index a9b2a6dbf476..7d1a54433dad 100644
--- a/svx/source/svdraw/svdotxtr.cxx
+++ b/svx/source/svdraw/svdotxtr.cxx
@@ -91,11 +91,11 @@ Degree100 SdrTextObj::GetShearAngle(bool /*bVertical*/) 
const
     return maGeo.nShearAngle;
 }
 
-void SdrTextObj::NbcMove(const Size& rSiz)
+void SdrTextObj::NbcMove(const Size& rSize)
 {
-    maRect.Move(rSiz);
-    m_aOutRect.Move(rSiz);
-    maSnapRect.Move(rSiz);
+    maRect.Move(rSize);
+    moveOutRectangle(rSize.Width(), rSize.Height());
+    maSnapRect.Move(rSize);
     SetBoundAndSnapRectsDirty(true);
 }
 
diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx
index 7d68e4840ff9..f43e1d554be8 100644
--- a/svx/source/svdraw/svdovirt.cxx
+++ b/svx/source/svdraw/svdovirt.cxx
@@ -113,22 +113,25 @@ SdrObjList* SdrVirtObj::GetSubList() const
 
 const tools::Rectangle& SdrVirtObj::GetCurrentBoundRect() const
 {
-    m_aOutRect = rRefObj.GetCurrentBoundRect(); // TODO: Optimize this.
-    m_aOutRect += m_aAnchor;
+    auto aRectangle = rRefObj.GetCurrentBoundRect(); // TODO: Optimize this.
+    aRectangle += m_aAnchor;
+    setOutRectangleConst(aRectangle);
     return m_aOutRect;
 }
 
 const tools::Rectangle& SdrVirtObj::GetLastBoundRect() const
 {
-    m_aOutRect = rRefObj.GetLastBoundRect(); // TODO: Optimize this.
-    m_aOutRect += m_aAnchor;
+    auto aRectangle = rRefObj.GetLastBoundRect(); // TODO: Optimize this.
+    aRectangle += m_aAnchor;
+    setOutRectangleConst(aRectangle);
     return m_aOutRect;
 }
 
 void SdrVirtObj::RecalcBoundRect()
 {
-    m_aOutRect=rRefObj.GetCurrentBoundRect();
-    m_aOutRect+=m_aAnchor;
+    tools::Rectangle aRectangle = rRefObj.GetCurrentBoundRect();
+    aRectangle += m_aAnchor;
+    setOutRectangle(aRectangle);
 }
 
 SdrVirtObj* SdrVirtObj::CloneSdrObject(SdrModel& rTargetModel) const
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 0a4c96b922eb..dba55c4e1974 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -2390,7 +2390,7 @@ void SwDrawVirtObj::NbcSetAnchorPos(const Point& rPnt)
 
 const tools::Rectangle& SwDrawVirtObj::GetCurrentBoundRect() const
 {
-    if(m_aOutRect.IsEmpty())
+    if (m_aOutRect.IsEmpty())
     {
         const_cast<SwDrawVirtObj*>(this)->RecalcBoundRect();
     }
@@ -2407,13 +2407,13 @@ Point SwDrawVirtObj::GetOffset() const
 {
     // do NOT use IsEmpty() here, there is already a useful offset
     // in the position
-    if(m_aOutRect == tools::Rectangle())
+    if (m_aOutRect == tools::Rectangle())
     {
         return Point();
     }
     else
     {
-        return m_aOutRect.TopLeft() - 
GetReferencedObj().GetCurrentBoundRect().TopLeft();
+        return getOutRectangle().TopLeft() - 
GetReferencedObj().GetCurrentBoundRect().TopLeft();
     }
 }
 
@@ -2429,7 +2429,7 @@ void SwDrawVirtObj::RecalcBoundRect()
     // its value by the 'BoundRect' of the referenced object.
 
     const Point aOffset(GetOffset());
-    m_aOutRect = ReferencedObj().GetCurrentBoundRect() + aOffset;
+    setOutRectangle(ReferencedObj().GetCurrentBoundRect() + aOffset);
 }
 
 basegfx::B2DPolyPolygon SwDrawVirtObj::TakeXorPoly() const
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index f082e456b5f2..a580b8c176f9 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -550,10 +550,11 @@ void SwVirtFlyDrawObj::TakeObjInfo( 
SdrObjTransformInfoRec& rInfo ) const
 
 void SwVirtFlyDrawObj::SetRect() const
 {
+    auto* pWritableThis = const_cast<SwVirtFlyDrawObj*>(this);
     if ( GetFlyFrame()->getFrameArea().HasArea() )
-        const_cast<SwVirtFlyDrawObj*>(this)->m_aOutRect = 
GetFlyFrame()->getFrameArea().SVRect();
+        pWritableThis->setOutRectangle(GetFlyFrame()->getFrameArea().SVRect());
     else
-        const_cast<SwVirtFlyDrawObj*>(this)->m_aOutRect = tools::Rectangle();
+        pWritableThis->resetOutRectangle();
 }
 
 const tools::Rectangle& SwVirtFlyDrawObj::GetCurrentBoundRect() const
@@ -640,13 +641,14 @@ void SwVirtFlyDrawObj::NbcMove(const Size& rSiz)
         // working properly. Restore FrameArea and use aOutRect from old 
FrameArea.
         TransformableSwFrame* 
pTransformableSwFrame(static_cast<SwFlyFreeFrame*>(GetFlyFrame())->getTransformableSwFrame());
         pTransformableSwFrame->restoreFrameAreas();
-        m_aOutRect = GetFlyFrame()->getFrameArea().SVRect();
+        setOutRectangle(GetFlyFrame()->getFrameArea().SVRect());
     }
 
-    m_aOutRect.Move( rSiz );
+    moveOutRectangle(rSiz.Width(), rSiz.Height());
+
     const Point aOldPos( GetFlyFrame()->getFrameArea().Pos() );
-    const Point aNewPos( m_aOutRect.TopLeft() );
-    const SwRect aFlyRect( m_aOutRect );
+    const Point aNewPos(getOutRectangle().TopLeft());
+    const SwRect aFlyRect(getOutRectangle());
 
     //If the Fly has an automatic align (right or top),
     //so preserve the automatic.
@@ -835,7 +837,7 @@ void SwVirtFlyDrawObj::NbcCrop(const basegfx::B2DPoint& 
rRef, double fxFact, dou
         // working properly. Restore FrameArea and use aOutRect from old 
FrameArea.
         TransformableSwFrame* 
pTransformableSwFrame(static_cast<SwFlyFreeFrame*>(GetFlyFrame())->getTransformableSwFrame());
         pTransformableSwFrame->restoreFrameAreas();
-        m_aOutRect = GetFlyFrame()->getFrameArea().SVRect();
+        setOutRectangle(GetFlyFrame()->getFrameArea().SVRect());
     }
 
     // Compute old and new rect. This will give us the deformation to apply to
@@ -906,8 +908,8 @@ void SwVirtFlyDrawObj::NbcCrop(const basegfx::B2DPoint& 
rRef, double fxFact, dou
     // Set new frame size
     SwFrameFormat *pFormat = GetFormat();
     SwFormatFrameSize aSz( pFormat->GetFrameSize() );
-    const tools::Long aNewWidth(aNewRect.GetWidth() + (m_aOutRect.GetWidth() - 
aOldRect.GetWidth()));
-    const tools::Long aNewHeight(aNewRect.GetHeight() + 
(m_aOutRect.GetHeight() - aOldRect.GetHeight()));
+    const tools::Long aNewWidth(aNewRect.GetWidth() + 
(getOutRectangle().GetWidth() - aOldRect.GetWidth()));
+    const tools::Long aNewHeight(aNewRect.GetHeight() + 
(getOutRectangle().GetHeight() - aOldRect.GetHeight()));
     aSz.SetWidth(aNewWidth);
     aSz.SetHeight(aNewHeight);
     pFormat->GetDoc()->SetAttr( aSz, *pFormat );
@@ -980,6 +982,8 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef, const 
Fraction& xFact, const
         GetFlyFrame()->IsFlyFreeFrame() &&
         static_cast< SwFlyFreeFrame* 
>(GetFlyFrame())->isTransformableSwFrame());
 
+    tools::Rectangle aRectangle;
+
     if(bIsTransformableSwFrame)
     {
         // When we have a change in transformed state, we need to fall back to 
the
@@ -1004,11 +1008,11 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef, 
const Fraction& xFact, const
         const basegfx::B2DVector aAbsScale(basegfx::absolute(aScale));
 
         // create new modified, but untransformed OutRect
-        m_aOutRect = tools::Rectangle(
+        setOutRectangle(tools::Rectangle(
             basegfx::fround(aCenter.getX() - (0.5 * aAbsScale.getX())),
             basegfx::fround(aCenter.getY() - (0.5 * aAbsScale.getY())),
             basegfx::fround(aCenter.getX() + (0.5 * aAbsScale.getX())),
-            basegfx::fround(aCenter.getY() + (0.5 * aAbsScale.getY())));
+            basegfx::fround(aCenter.getY() + (0.5 * aAbsScale.getY()))));
 
         // restore FrameAreas so that actions below not adapted to new
         // full transformations take the correct actions
@@ -1017,7 +1021,9 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef, const 
Fraction& xFact, const
     }
     else
     {
-        ResizeRect( m_aOutRect, rRef, xFact, yFact );
+        aRectangle = getOutRectangle();
+        ResizeRect(aRectangle, rRef, xFact, yFact);
+        setOutRectangle(aRectangle);
     }
 
     // Position may also change, remember old one. This is now already
@@ -1025,7 +1031,8 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef, const 
Fraction& xFact, const
     Point aOldPos(bUseRightEdge ? GetFlyFrame()->getFrameArea().TopRight() : 
GetFlyFrame()->getFrameArea().Pos());
 
     // get target size in old coordinate system
-    Size aSz( m_aOutRect.Right() - m_aOutRect.Left() + 1, m_aOutRect.Bottom()- 
m_aOutRect.Top()  + 1 );
+    aRectangle = getOutRectangle();
+    Size aSz(aRectangle.Right() - aRectangle.Left() + 1, aRectangle.Bottom() - 
aRectangle.Top() + 1);
 
     // compare with restored FrameArea
     if( aSz != GetFlyFrame()->getFrameArea().SSize() )
@@ -1093,7 +1100,8 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef, const 
Fraction& xFact, const
     }
 
     //Position can also be changed, get new one
-    const Point aNewPos(bUseRightEdge ? m_aOutRect.Right() + 1 : 
m_aOutRect.Left(), m_aOutRect.Top());
+    aRectangle = getOutRectangle();
+    const Point aNewPos(bUseRightEdge ? aRectangle.Right() + 1 : 
aRectangle.Left(), aRectangle.Top());
 
     if ( aNewPos == aOldPos )
         return;
@@ -1106,7 +1114,8 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef, const 
Fraction& xFact, const
     const Size aDeltaMove(
             aNewPos.X() - aOldPos.X(),
             aNewPos.Y() - aOldPos.Y());
-    m_aOutRect.Move(-aDeltaMove.Width(), -aDeltaMove.Height());
+
+    moveOutRectangle(-aDeltaMove.Width(), -aDeltaMove.Height());
 
     // Now, move as needed (no empty delta which was a hack anyways)
     if(bIsTransformableSwFrame)
@@ -1114,7 +1123,7 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef, const 
Fraction& xFact, const
         // need to save aOutRect to FrameArea, will be restored to aOutRect in
         // SwVirtFlyDrawObj::NbcMove currently for TransformableSwFrames
         SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*GetFlyFrame());
-        aFrm.setSwRect(SwRect(m_aOutRect));
+        aFrm.setSwRect(SwRect(getOutRectangle()));
     }
 
     // keep old hack - not clear what happens here
commit f1436b235c02a4bfda001208cbe712c2b457acfa
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Tue Jul 26 18:57:39 2022 +0200
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Fri Jul 29 20:48:35 2022 +0200

    svx: remove using namespace and unneeded "css::" ns declarations
    
    Change-Id: If2eb5f61798e4efbcc845957fc1345b1560bcbe6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137570
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index acf05bd94d21..27c4584d522d 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -74,9 +74,6 @@
 #include <svx/ColorSets.hxx>
 
 using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-
 
 struct SdrModelImpl
 {
@@ -225,12 +222,12 @@ SdrModel::~SdrModel()
     // the DrawingEngine may need it in its destructor
     if( mxStyleSheetPool.is() )
     {
-        Reference< XComponent > xComponent( static_cast< cppu::OWeakObject* >( 
mxStyleSheetPool.get() ), UNO_QUERY );
+        uno::Reference<lang::XComponent> xComponent( static_cast< 
cppu::OWeakObject* >( mxStyleSheetPool.get() ), uno::UNO_QUERY );
         if( xComponent.is() ) try
         {
             xComponent->dispose();
         }
-        catch( RuntimeException& )
+        catch (uno::RuntimeException&)
         {
         }
         mxStyleSheetPool.clear();
@@ -1585,7 +1582,7 @@ uno::Reference< uno::XInterface > const & 
SdrModel::getUnoModel()
     return mxUnoModel;
 }
 
-void SdrModel::setUnoModel( const css::uno::Reference< css::uno::XInterface >& 
xModel )
+void SdrModel::setUnoModel(const uno::Reference<uno::XInterface>& xModel)
 {
     mxUnoModel = xModel;
 }
@@ -1605,7 +1602,7 @@ void SdrModel::adaptSizeAndBorderForAllPages(
 uno::Reference< uno::XInterface > SdrModel::createUnoModel()
 {
     OSL_FAIL( "SdrModel::createUnoModel() - base implementation should not be 
called!" );
-    css::uno::Reference< css::uno::XInterface > xInt;
+    uno::Reference<uno::XInterface> xInt;
     return xInt;
 }
 
@@ -1759,7 +1756,7 @@ SvxNumType SdrModel::GetPageNumType() const
     return SVX_NUM_ARABIC;
 }
 
-void SdrModel::ReadUserDataSequenceValue(const css::beans::PropertyValue* 
pValue)
+void SdrModel::ReadUserDataSequenceValue(const beans::PropertyValue* pValue)
 {
     if (pValue->Name == "AnchoredTextOverflowLegacy")
     {
@@ -1772,20 +1769,20 @@ void SdrModel::ReadUserDataSequenceValue(const 
css::beans::PropertyValue* pValue
 }
 
 template <typename T>
-static void addPair(std::vector< std::pair< OUString, Any > >& aUserData, 
const OUString& name, const T val)
+static void addPair(std::vector< std::pair< OUString, uno::Any > >& aUserData, 
const OUString& name, const T val)
 {
-    aUserData.push_back(std::pair< OUString, Any >(name, css::uno::Any(val)));
+    aUserData.push_back(std::pair< OUString, uno::Any >(name, uno::Any(val)));
 }
 
-void SdrModel::WriteUserDataSequence(css::uno::Sequence < 
css::beans::PropertyValue >& rValues)
+void SdrModel::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& 
rValues)
 {
-    std::vector< std::pair< OUString, Any > > aUserData;
+    std::vector< std::pair< OUString, uno::Any > > aUserData;
     addPair(aUserData, "AnchoredTextOverflowLegacy", 
IsAnchoredTextOverflowLegacy());
 
     const sal_Int32 nOldLength = rValues.getLength();
     rValues.realloc(nOldLength + aUserData.size());
 
-    css::beans::PropertyValue* pValue = &(rValues.getArray()[nOldLength]);
+    beans::PropertyValue* pValue = &(rValues.getArray()[nOldLength]);
 
     for (const auto &aIter : aUserData)
     {
@@ -1899,7 +1896,7 @@ void SdrModel::dumpAsXml(xmlTextWriterPtr pWriter) const
     (void)xmlTextWriterEndElement(pWriter);
 }
 
-const css::uno::Sequence< sal_Int8 >& SdrModel::getUnoTunnelId()
+const uno::Sequence<sal_Int8>& SdrModel::getUnoTunnelId()
 {
     static const comphelper::UnoIdInit theSdrModelUnoTunnelImplementationId;
     return theSdrModelUnoTunnelImplementationId.getSeq();
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 16f5be67f7f3..640b8abf547c 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -88,84 +88,80 @@
 #include "presetooxhandleadjustmentrelations.hxx"
 
 using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::drawing;
 
-static void lcl_ShapeSegmentFromBinary( EnhancedCustomShapeSegment& rSegInfo, 
sal_uInt16 nSDat )
+static void lcl_ShapeSegmentFromBinary( drawing::EnhancedCustomShapeSegment& 
rSegInfo, sal_uInt16 nSDat )
 {
     switch( nSDat >> 8 )
     {
         case 0x00 :
-            rSegInfo.Command = EnhancedCustomShapeSegmentCommand::LINETO;
+            rSegInfo.Command = 
drawing::EnhancedCustomShapeSegmentCommand::LINETO;
             rSegInfo.Count   = nSDat & 0xff;
             if ( !rSegInfo.Count )
                 rSegInfo.Count = 1;
             break;
         case 0x20 :
-            rSegInfo.Command = EnhancedCustomShapeSegmentCommand::CURVETO;
+            rSegInfo.Command = 
drawing::EnhancedCustomShapeSegmentCommand::CURVETO;
             rSegInfo.Count   = nSDat & 0xff;
             if ( !rSegInfo.Count )
                 rSegInfo.Count = 1;
             break;
         case 0x40 :
-            rSegInfo.Command = EnhancedCustomShapeSegmentCommand::MOVETO;
+            rSegInfo.Command = 
drawing::EnhancedCustomShapeSegmentCommand::MOVETO;
             rSegInfo.Count   = nSDat & 0xff;
             if ( !rSegInfo.Count )
                 rSegInfo.Count = 1;
             break;
         case 0x60 :
-            rSegInfo.Command = EnhancedCustomShapeSegmentCommand::CLOSESUBPATH;
+            rSegInfo.Command = 
drawing::EnhancedCustomShapeSegmentCommand::CLOSESUBPATH;
             rSegInfo.Count   = 0;
             break;
         case 0x80 :
-            rSegInfo.Command = EnhancedCustomShapeSegmentCommand::ENDSUBPATH;
+            rSegInfo.Command = 
drawing::EnhancedCustomShapeSegmentCommand::ENDSUBPATH;
             rSegInfo.Count   = 0;
             break;
         case 0xa1 :
-            rSegInfo.Command = 
EnhancedCustomShapeSegmentCommand::ANGLEELLIPSETO;
+            rSegInfo.Command = 
drawing::EnhancedCustomShapeSegmentCommand::ANGLEELLIPSETO;
             rSegInfo.Count   = ( nSDat & 0xff ) / 3;
             break;
         case 0xa2 :
-            rSegInfo.Command = EnhancedCustomShapeSegmentCommand::ANGLEELLIPSE;
+            rSegInfo.Command = 
drawing::EnhancedCustomShapeSegmentCommand::ANGLEELLIPSE;
             rSegInfo.Count   = ( nSDat & 0xff ) / 3;
             break;
         case 0xa3 :
-            rSegInfo.Command = EnhancedCustomShapeSegmentCommand::ARCTO;
+            rSegInfo.Command = 
drawing::EnhancedCustomShapeSegmentCommand::ARCTO;
             rSegInfo.Count   = ( nSDat & 0xff ) >> 2;
             break;
         case 0xa4 :
-            rSegInfo.Command = EnhancedCustomShapeSegmentCommand::ARC;
+            rSegInfo.Command = drawing::EnhancedCustomShapeSegmentCommand::ARC;
             rSegInfo.Count   = ( nSDat & 0xff ) >> 2;
             break;
         case 0xa5 :
-            rSegInfo.Command = 
EnhancedCustomShapeSegmentCommand::CLOCKWISEARCTO;
+            rSegInfo.Command = 
drawing::EnhancedCustomShapeSegmentCommand::CLOCKWISEARCTO;
             rSegInfo.Count   = ( nSDat & 0xff ) >> 2;
             break;
         case 0xa6 :
-            rSegInfo.Command = EnhancedCustomShapeSegmentCommand::CLOCKWISEARC;
+            rSegInfo.Command = 
drawing::EnhancedCustomShapeSegmentCommand::CLOCKWISEARC;
             rSegInfo.Count   = ( nSDat & 0xff ) >> 2;
             break;
         case 0xa7 :
-            rSegInfo.Command = 
EnhancedCustomShapeSegmentCommand::ELLIPTICALQUADRANTX;
+            rSegInfo.Command = 
drawing::EnhancedCustomShapeSegmentCommand::ELLIPTICALQUADRANTX;
             rSegInfo.Count   = nSDat & 0xff;
             break;
         case 0xa8 :
-            rSegInfo.Command = 
EnhancedCustomShapeSegmentCommand::ELLIPTICALQUADRANTY;
+            rSegInfo.Command = 
drawing::EnhancedCustomShapeSegmentCommand::ELLIPTICALQUADRANTY;
             rSegInfo.Count   = nSDat & 0xff;
             break;
         case 0xaa :
-            rSegInfo.Command = EnhancedCustomShapeSegmentCommand::NOFILL;
+            rSegInfo.Command = 
drawing::EnhancedCustomShapeSegmentCommand::NOFILL;
             rSegInfo.Count   = 0;
             break;
         case 0xab :
-            rSegInfo.Command = EnhancedCustomShapeSegmentCommand::NOSTROKE;
+            rSegInfo.Command = 
drawing::EnhancedCustomShapeSegmentCommand::NOSTROKE;
             rSegInfo.Count   = 0;
             break;
         default:
         case 0xf8 :
-            rSegInfo.Command = EnhancedCustomShapeSegmentCommand::UNKNOWN;
+            rSegInfo.Command = 
drawing::EnhancedCustomShapeSegmentCommand::UNKNOWN;
             rSegInfo.Count   = nSDat;
             break;
     }
@@ -180,7 +176,7 @@ static MSO_SPT ImpGetCustomShapeType( const 
SdrObjCustomShape& rCustoShape )
     {
         OUString sShapeType;
         const SdrCustomShapeGeometryItem& rGeometryItem( 
rCustoShape.GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
-        const Any* pAny = rGeometryItem.GetPropertyValueByName( "Type" );
+        const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( "Type" );
         if ( pAny && ( *pAny >>= sShapeType ) )
             eRetValue = EnhancedCustomShapeTypeNames::Get( sShapeType );
     }
@@ -281,7 +277,7 @@ static SdrObject* ImpCreateShadowObjectClone(const 
SdrObject& rOriginal, const S
         // is creating a paraobject, but paraobjects can not be created 
without model. So
         // we are preventing the crash by setting the writing mode always left 
to right,
         // this is not bad since our shadow geometry does not contain text.
-        aTempSet.Put( SvxWritingModeItem( css::text::WritingMode_LR_TB, 
SDRATTR_TEXTDIRECTION ) );
+        aTempSet.Put(SvxWritingModeItem(text::WritingMode_LR_TB, 
SDRATTR_TEXTDIRECTION));
 
         // no shadow
         aTempSet.Put(makeSdrShadowItem(false));
@@ -370,16 +366,16 @@ static SdrObject* ImpCreateShadowObjectClone(const 
SdrObject& rOriginal, const S
 }
 
 
-Reference< XCustomShapeEngine > const & 
SdrObjCustomShape::GetCustomShapeEngine() const
+uno::Reference<drawing::XCustomShapeEngine> const & 
SdrObjCustomShape::GetCustomShapeEngine() const
 {
     if (mxCustomShapeEngine.is())
         return mxCustomShapeEngine;
 
-    Reference< XShape > aXShape = 
GetXShapeForSdrObject(const_cast<SdrObjCustomShape*>(this));
+    uno::Reference<drawing::XShape> aXShape = 
GetXShapeForSdrObject(const_cast<SdrObjCustomShape*>(this));
     if ( !aXShape )
         return mxCustomShapeEngine;
 
-    Reference< XComponentContext > xContext( 
::comphelper::getProcessComponentContext() );
+    uno::Reference<uno::XComponentContext> xContext( 
::comphelper::getProcessComponentContext() );
 
     OUString aEngine(GetMergedItem( SDRATTR_CUSTOMSHAPE_ENGINE ).GetValue());
     static constexpr OUStringLiteral sEnhancedCustomShapeEngine = 
u"com.sun.star.drawing.EnhancedCustomShapeEngine";
@@ -388,16 +384,16 @@ Reference< XCustomShapeEngine > const & 
SdrObjCustomShape::GetCustomShapeEngine(
 
     {
         static constexpr OUStringLiteral sCustomShape = u"CustomShape";
-        Sequence< PropertyValue > aPropValues{ 
comphelper::makePropertyValue(sCustomShape,
+        uno::Sequence<beans::PropertyValue> aPropValues{ 
comphelper::makePropertyValue(sCustomShape,
                                                                              
aXShape) };
-        Sequence< Any > aArgument{ Any(aPropValues) };
+        uno::Sequence<uno::Any> aArgument{ uno::Any(aPropValues) };
         try
         {
-            Reference<XInterface> 
xInterface(xContext->getServiceManager()->createInstanceWithArgumentsAndContext(aEngine,
 aArgument, xContext));
+            uno::Reference<uno::XInterface> 
xInterface(xContext->getServiceManager()->createInstanceWithArgumentsAndContext(aEngine,
 aArgument, xContext));
             if (xInterface.is())
-                mxCustomShapeEngine.set( xInterface, UNO_QUERY );
+                mxCustomShapeEngine.set(xInterface, uno::UNO_QUERY);
         }
-        catch (const css::loader::CannotActivateFactoryException&)
+        catch (const loader::CannotActivateFactoryException&)
         {
         }
     }
@@ -409,7 +405,7 @@ const SdrObject* 
SdrObjCustomShape::GetSdrObjectFromCustomShape() const
 {
     if ( !mXRenderedCustomShape.is() )
     {
-        Reference< XCustomShapeEngine > xCustomShapeEngine( 
GetCustomShapeEngine() );
+        uno::Reference<drawing::XCustomShapeEngine> xCustomShapeEngine( 
GetCustomShapeEngine() );
         if ( xCustomShapeEngine.is() )
             const_cast<SdrObjCustomShape*>(this)->mXRenderedCustomShape = 
xCustomShapeEngine->render();
     }
@@ -448,7 +444,7 @@ bool SdrObjCustomShape::IsTextPath() const
     static const OUStringLiteral sTextPath( u"TextPath" );
     bool bTextPathOn = false;
     const SdrCustomShapeGeometryItem& rGeometryItem = GetMergedItem( 
SDRATTR_CUSTOMSHAPE_GEOMETRY );
-    const Any* pAny = rGeometryItem.GetPropertyValueByName( sTextPath, 
sTextPath );
+    const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( sTextPath, 
sTextPath );
     if ( pAny )
         *pAny >>= bTextPathOn;
     return bTextPathOn;
@@ -460,7 +456,7 @@ bool SdrObjCustomShape::UseNoFillStyle() const
     OUString sShapeType;
     static const OUStringLiteral sType( u"Type" );
     const SdrCustomShapeGeometryItem& rGeometryItem( GetMergedItem( 
SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
-    const Any* pAny = rGeometryItem.GetPropertyValueByName( sType );
+    const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( sType );
     if ( pAny )
         *pAny >>= sShapeType;
     bRet = !IsCustomShapeFilledByDefault( EnhancedCustomShapeTypeNames::Get( 
sType ) );
@@ -472,7 +468,7 @@ bool SdrObjCustomShape::IsMirroredX() const
 {
     bool bMirroredX = false;
     const SdrCustomShapeGeometryItem & rGeometryItem( GetMergedItem( 
SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
-    const css::uno::Any* pAny = rGeometryItem.GetPropertyValueByName( 
"MirroredX" );
+    const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( "MirroredX" );
     if ( pAny )
         *pAny >>= bMirroredX;
     return bMirroredX;
@@ -481,7 +477,7 @@ bool SdrObjCustomShape::IsMirroredY() const
 {
     bool bMirroredY = false;
     const SdrCustomShapeGeometryItem & rGeometryItem( GetMergedItem( 
SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
-    const css::uno::Any* pAny = rGeometryItem.GetPropertyValueByName( 
"MirroredY" );
+    const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( "MirroredY" );
     if ( pAny )
         *pAny >>= bMirroredY;
     return bMirroredY;
@@ -489,7 +485,7 @@ bool SdrObjCustomShape::IsMirroredY() const
 void SdrObjCustomShape::SetMirroredX( const bool bMirrorX )
 {
     SdrCustomShapeGeometryItem aGeometryItem( GetMergedItem( 
SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
-    PropertyValue aPropVal;
+    beans::PropertyValue aPropVal;
     aPropVal.Name = "MirroredX";
     aPropVal.Value <<= bMirrorX;
     aGeometryItem.SetPropertyValue( aPropVal );
@@ -498,7 +494,7 @@ void SdrObjCustomShape::SetMirroredX( const bool bMirrorX )
 void SdrObjCustomShape::SetMirroredY( const bool bMirrorY )
 {
     SdrCustomShapeGeometryItem aGeometryItem( GetMergedItem( 
SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
-    PropertyValue aPropVal;
+    beans::PropertyValue aPropVal;
     aPropVal.Name = "MirroredY";
     aPropVal.Value <<= bMirrorY;
     aGeometryItem.SetPropertyValue( aPropVal );
@@ -507,7 +503,7 @@ void SdrObjCustomShape::SetMirroredY( const bool bMirrorY )
 
 double SdrObjCustomShape::GetExtraTextRotation( const bool bPreRotation ) const
 {
-    const css::uno::Any* pAny;
+    const uno::Any* pAny;
     const SdrCustomShapeGeometryItem& rGeometryItem = GetMergedItem( 
SDRATTR_CUSTOMSHAPE_GEOMETRY );
     pAny = rGeometryItem.GetPropertyValueByName( bPreRotation ? OUString( 
"TextPreRotateAngle" ) : OUString( "TextRotateAngle" ) );
     double fExtraTextRotateAngle = 0.0;
@@ -520,7 +516,7 @@ bool SdrObjCustomShape::GetTextBounds( tools::Rectangle& 
rTextBound ) const
 {
     bool bRet = false;
 
-    Reference< XCustomShapeEngine > xCustomShapeEngine( GetCustomShapeEngine() 
);
+    uno::Reference<drawing::XCustomShapeEngine> xCustomShapeEngine( 
GetCustomShapeEngine() );
     if ( xCustomShapeEngine.is() )
     {
         awt::Rectangle aR( xCustomShapeEngine->getTextBounds() );
@@ -535,10 +531,10 @@ bool SdrObjCustomShape::GetTextBounds( tools::Rectangle& 
rTextBound ) const
 basegfx::B2DPolyPolygon SdrObjCustomShape::GetLineGeometry( const bool 
bBezierAllowed ) const
 {
     basegfx::B2DPolyPolygon aRetval;
-    Reference< XCustomShapeEngine > xCustomShapeEngine( GetCustomShapeEngine() 
);
+    uno::Reference<drawing::XCustomShapeEngine> xCustomShapeEngine( 
GetCustomShapeEngine() );
     if ( xCustomShapeEngine.is() )
     {
-        css::drawing::PolyPolygonBezierCoords aBezierCoords = 
xCustomShapeEngine->getLineGeometry();
+        drawing::PolyPolygonBezierCoords aBezierCoords = 
xCustomShapeEngine->getLineGeometry();
         try
         {
             aRetval = 
basegfx::utils::UnoPolyPolygonBezierCoordsToB2DPolyPolygon( aBezierCoords );
@@ -547,7 +543,7 @@ basegfx::B2DPolyPolygon SdrObjCustomShape::GetLineGeometry( 
const bool bBezierAl
                 aRetval = basegfx::utils::adaptiveSubdivideByAngle(aRetval);
             }
         }
-        catch ( const css::lang::IllegalArgumentException & )
+        catch ( const lang::IllegalArgumentException & )
         {
         }
     }
@@ -559,11 +555,11 @@ std::vector< SdrCustomShapeInteraction > 
SdrObjCustomShape::GetInteractionHandle
     std::vector< SdrCustomShapeInteraction > aRet;
     try
     {
-        Reference< XCustomShapeEngine > xCustomShapeEngine( 
GetCustomShapeEngine() );
+        uno::Reference<drawing::XCustomShapeEngine> xCustomShapeEngine( 
GetCustomShapeEngine() );
         if ( xCustomShapeEngine.is() )
         {
             int i;
-            Sequence< Reference< XCustomShapeHandle > > xInteractionHandles( 
xCustomShapeEngine->getInteraction() );
+            uno::Sequence<uno::Reference<drawing::XCustomShapeHandle>> 
xInteractionHandles( xCustomShapeEngine->getInteraction() );
             for ( i = 0; i < xInteractionHandles.getLength(); i++ )
             {
                 if ( xInteractionHandles[ i ].is() )
@@ -689,7 +685,7 @@ static sal_Int32 GetNumberOfProperties ( const 
SvxMSDffHandle* pData )
     return nPropertiesNeeded;
 }
 
-static void lcl_ShapePropertiesFromDFF( const SvxMSDffHandle* pData, 
css::beans::PropertyValues& rPropValues )
+static void lcl_ShapePropertiesFromDFF( const SvxMSDffHandle* pData, 
beans::PropertyValues& rPropValues )
 {
     SvxMSDffHandleFlags nFlags = pData->nFlags;
     sal_Int32 n=0;
@@ -697,7 +693,7 @@ static void lcl_ShapePropertiesFromDFF( const 
SvxMSDffHandle* pData, css::beans:
 
     // POSITION
     {
-        css::drawing::EnhancedCustomShapeParameterPair aPosition;
+        drawing::EnhancedCustomShapeParameterPair aPosition;
         EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( 
aPosition.First, pData->nPositionX, true, true );
         EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( 
aPosition.Second, pData->nPositionY, true, false );
         pPropValues[ n ].Name = "Position";
@@ -720,7 +716,7 @@ static void lcl_ShapePropertiesFromDFF( const 
SvxMSDffHandle* pData, css::beans:
     }
     if ( nFlags & SvxMSDffHandleFlags::POLAR )
     {
-        css::drawing::EnhancedCustomShapeParameterPair aCenter;
+        drawing::EnhancedCustomShapeParameterPair aCenter;
         EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( 
aCenter.First, pData->nCenterX,
                            bool( nFlags & 
SvxMSDffHandleFlags::CENTER_X_IS_SPECIAL ), true  );
         EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( 
aCenter.Second, pData->nCenterY,
@@ -731,7 +727,7 @@ static void lcl_ShapePropertiesFromDFF( const 
SvxMSDffHandle* pData, css::beans:
         {
             if ( pData->nRangeXMin != DEFAULT_MINIMUM_SIGNED_COMPARE )
             {
-                css::drawing::EnhancedCustomShapeParameter aRadiusRangeMinimum;
+                drawing::EnhancedCustomShapeParameter aRadiusRangeMinimum;
                 EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( 
aRadiusRangeMinimum, pData->nRangeXMin,
                            bool( nFlags & 
SvxMSDffHandleFlags::RANGE_X_MIN_IS_SPECIAL ), true  );
                 pPropValues[ n ].Name = "RadiusRangeMinimum";
@@ -739,7 +735,7 @@ static void lcl_ShapePropertiesFromDFF( const 
SvxMSDffHandle* pData, css::beans:
             }
             if ( pData->nRangeXMax != DEFAULT_MAXIMUM_SIGNED_COMPARE )
             {
-                css::drawing::EnhancedCustomShapeParameter aRadiusRangeMaximum;
+                drawing::EnhancedCustomShapeParameter aRadiusRangeMaximum;
                 EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( 
aRadiusRangeMaximum, pData->nRangeXMax,
                            bool( nFlags & 
SvxMSDffHandleFlags::RANGE_X_MAX_IS_SPECIAL ), false );
                 pPropValues[ n ].Name = "RadiusRangeMaximum";
@@ -751,7 +747,7 @@ static void lcl_ShapePropertiesFromDFF( const 
SvxMSDffHandle* pData, css::beans:
     {
         if ( pData->nRangeXMin != DEFAULT_MINIMUM_SIGNED_COMPARE )
         {
-            css::drawing::EnhancedCustomShapeParameter aRangeXMinimum;
+            drawing::EnhancedCustomShapeParameter aRangeXMinimum;
             EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( 
aRangeXMinimum, pData->nRangeXMin,
                            bool( nFlags & 
SvxMSDffHandleFlags::RANGE_X_MIN_IS_SPECIAL ), true  );
             pPropValues[ n ].Name = "RangeXMinimum";
@@ -759,7 +755,7 @@ static void lcl_ShapePropertiesFromDFF( const 
SvxMSDffHandle* pData, css::beans:
         }
         if ( pData->nRangeXMax != DEFAULT_MAXIMUM_SIGNED_COMPARE )
         {
-            css::drawing::EnhancedCustomShapeParameter aRangeXMaximum;
+            drawing::EnhancedCustomShapeParameter aRangeXMaximum;
             EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( 
aRangeXMaximum, pData->nRangeXMax,
                            bool( nFlags & 
SvxMSDffHandleFlags::RANGE_X_MAX_IS_SPECIAL ), false );
             pPropValues[ n ].Name = "RangeXMaximum";
@@ -767,7 +763,7 @@ static void lcl_ShapePropertiesFromDFF( const 
SvxMSDffHandle* pData, css::beans:
         }
         if ( pData->nRangeYMin != DEFAULT_MINIMUM_SIGNED_COMPARE )
         {
-            css::drawing::EnhancedCustomShapeParameter aRangeYMinimum;
+            drawing::EnhancedCustomShapeParameter aRangeYMinimum;
             EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( 
aRangeYMinimum, pData->nRangeYMin,
                              bool( nFlags & 
SvxMSDffHandleFlags::RANGE_Y_MIN_IS_SPECIAL ), true );
             pPropValues[ n ].Name = "RangeYMinimum";
@@ -775,7 +771,7 @@ static void lcl_ShapePropertiesFromDFF( const 
SvxMSDffHandle* pData, css::beans:
         }
         if ( pData->nRangeYMax != DEFAULT_MAXIMUM_SIGNED_COMPARE )
         {
-            css::drawing::EnhancedCustomShapeParameter aRangeYMaximum;
+            drawing::EnhancedCustomShapeParameter aRangeYMaximum;
             EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( 
aRangeYMaximum, pData->nRangeYMax,
                              bool( nFlags & 
SvxMSDffHandleFlags::RANGE_Y_MAX_IS_SPECIAL ), false );
             pPropValues[ n ].Name = "RangeYMaximum";
@@ -822,7 +818,7 @@ SdrObjCustomShape::~SdrObjCustomShape()
 
 void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType )
 {
-    PropertyValue aPropVal;
+    beans::PropertyValue aPropVal;
     OUString sShapeType;
     static const OUStringLiteral sType( u"Type" );
     SdrCustomShapeGeometryItem aGeometryItem( GetMergedItem( 
SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
@@ -840,7 +836,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const 
OUString* pType )
     }
     else
     {
-        Any *pAny = aGeometryItem.GetPropertyValueByName( sType );
+        uno::Any *pAny = aGeometryItem.GetPropertyValueByName( sType );
         if ( pAny )
             *pAny >>= sShapeType;
     }
@@ -851,13 +847,13 @@ void SdrObjCustomShape::MergeDefaultAttributes( const 
OUString* pType )
     if ( pDefCustomShape )
         pDefData = pDefCustomShape->pDefData;
 
-    css::uno::Sequence< css::drawing::EnhancedCustomShapeAdjustmentValue > 
seqAdjustmentValues;
+    uno::Sequence<drawing::EnhancedCustomShapeAdjustmentValue> 
seqAdjustmentValues;
 
 
     // AdjustmentValues
 
     static const OUStringLiteral sAdjustmentValues( u"AdjustmentValues" );
-    const Any* pAny = aGeometryItem.GetPropertyValueByName( sAdjustmentValues 
);
+    const uno::Any* pAny = aGeometryItem.GetPropertyValueByName( 
sAdjustmentValues );
     if ( pAny )
         *pAny >>= seqAdjustmentValues;
     if ( pDefCustomShape && pDefData )  // now check if we have to default 
some adjustment values
@@ -871,16 +867,16 @@ void SdrObjCustomShape::MergeDefaultAttributes( const 
OUString* pType )
         for ( i = nAdjustmentValues; i < nAdjustmentDefaults; i++ )
         {
             pseqAdjustmentValues[ i ].Value <<= pDefData[ i ];
-            pseqAdjustmentValues[ i ].State = 
css::beans::PropertyState_DIRECT_VALUE;
+            pseqAdjustmentValues[ i ].State = 
beans::PropertyState_DIRECT_VALUE;
         }
         // check if there are defaulted adjustment values that should be 
filled the hard coded defaults (pDefValue)
         sal_Int32 nCount = std::min(nAdjustmentValues, nAdjustmentDefaults);
         for ( i = 0; i < nCount; i++ )
         {
-            if ( seqAdjustmentValues[ i ].State != 
css::beans::PropertyState_DIRECT_VALUE )
+            if ( seqAdjustmentValues[ i ].State != 
beans::PropertyState_DIRECT_VALUE )
             {
                 pseqAdjustmentValues[ i ].Value <<= pDefData[ i ];
-                pseqAdjustmentValues[ i ].State = 
css::beans::PropertyState_DIRECT_VALUE;
+                pseqAdjustmentValues[ i ].State = 
beans::PropertyState_DIRECT_VALUE;
             }
         }
     }
@@ -892,8 +888,8 @@ void SdrObjCustomShape::MergeDefaultAttributes( const 
OUString* pType )
     // Coordsize
 
     static const OUStringLiteral sViewBox( u"ViewBox" );
-    const Any* pViewBox = aGeometryItem.GetPropertyValueByName( sViewBox );
-    css::awt::Rectangle aViewBox;
+    const uno::Any* pViewBox = aGeometryItem.GetPropertyValueByName( sViewBox 
);
+    awt::Rectangle aViewBox;
     if ( !pViewBox || !(*pViewBox >>= aViewBox ) )
     {
         if ( pDefCustomShape )
@@ -918,7 +914,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const 
OUString* pType )
     if ( !pAny && pDefCustomShape && pDefCustomShape->nVertices && 
pDefCustomShape->pVertices )
     {
         sal_Int32 i, nCount = pDefCustomShape->nVertices;
-        css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair> 
seqCoordinates( nCount );
+        uno::Sequence<drawing::EnhancedCustomShapeParameterPair> 
seqCoordinates( nCount );
         auto pseqCoordinates = seqCoordinates.getArray();
         for ( i = 0; i < nCount; i++ )
         {
@@ -936,7 +932,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const 
OUString* pType )
     if ( !pAny && pDefCustomShape && pDefCustomShape->nGluePoints && 
pDefCustomShape->pGluePoints )
     {
         sal_Int32 i, nCount = pDefCustomShape->nGluePoints;
-        css::uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair> 
seqGluePoints( nCount );
+        uno::Sequence<drawing::EnhancedCustomShapeParameterPair> 
seqGluePoints( nCount );
         auto pseqGluePoints = seqGluePoints.getArray();
         for ( i = 0; i < nCount; i++ )
         {
@@ -954,11 +950,11 @@ void SdrObjCustomShape::MergeDefaultAttributes( const 
OUString* pType )
     if ( !pAny && pDefCustomShape && pDefCustomShape->nElements && 
pDefCustomShape->pElements )
     {
         sal_Int32 i, nCount = pDefCustomShape->nElements;
-        css::uno::Sequence< css::drawing::EnhancedCustomShapeSegment > 
seqSegments( nCount );
+        uno::Sequence<drawing::EnhancedCustomShapeSegment> seqSegments( nCount 
);
         auto pseqSegments = seqSegments.getArray();
         for ( i = 0; i < nCount; i++ )
         {
-            EnhancedCustomShapeSegment& rSegInfo = pseqSegments[ i ];
+            drawing::EnhancedCustomShapeSegment& rSegInfo = pseqSegments[ i ];
             sal_uInt16 nSDat = pDefCustomShape->pElements[ i ];
             lcl_ShapeSegmentFromBinary( rSegInfo, nSDat );
         }
@@ -1001,7 +997,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const 
OUString* pType )
     if ( !pAny && pDefCustomShape && pDefCustomShape->nTextRect && 
pDefCustomShape->pTextRect )
     {
         sal_Int32 i, nCount = pDefCustomShape->nTextRect;
-        css::uno::Sequence< css::drawing::EnhancedCustomShapeTextFrame > 
seqTextFrames( nCount );
+        uno::Sequence<drawing::EnhancedCustomShapeTextFrame> seqTextFrames( 
nCount );
         auto pseqTextFrames = seqTextFrames.getArray();
         const SvxMSDffTextRectangles* pRectangles = pDefCustomShape->pTextRect;
         for ( i = 0; i < nCount; i++, pRectangles++ )
@@ -1022,7 +1018,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const 
OUString* pType )
     if ( !pAny && pDefCustomShape && pDefCustomShape->nCalculation && 
pDefCustomShape->pCalculation )
     {
         sal_Int32 i, nCount = pDefCustomShape->nCalculation;
-        css::uno::Sequence< OUString > seqEquations( nCount );
+        uno::Sequence< OUString > seqEquations( nCount );
         auto pseqEquations = seqEquations.getArray();
         const SvxMSDffCalculationData* pData = pDefCustomShape->pCalculation;
         for ( i = 0; i < nCount; i++, pData++ )
@@ -1039,12 +1035,12 @@ void SdrObjCustomShape::MergeDefaultAttributes( const 
OUString* pType )
     {
         sal_Int32 i, nCount = pDefCustomShape->nHandles;
         const SvxMSDffHandle* pData = pDefCustomShape->pHandles;
-        css::uno::Sequence< css::beans::PropertyValues > seqHandles( nCount );
+        uno::Sequence<beans::PropertyValues> seqHandles( nCount );
         auto pseqHandles = seqHandles.getArray();
         for ( i = 0; i < nCount; i++, pData++ )
         {
             sal_Int32 nPropertiesNeeded;
-            css::beans::PropertyValues& rPropValues = pseqHandles[ i ];
+            beans::PropertyValues& rPropValues = pseqHandles[ i ];
             nPropertiesNeeded = GetNumberOfProperties( pData );
             rPropValues.realloc( nPropertiesNeeded );
             lcl_ShapePropertiesFromDFF( pData, rPropValues );
@@ -1059,7 +1055,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const 
OUString* pType )
         // value by name, e.g. attribute RefX="adj". So the information is 
lost, when exporting
         // a pptx to odp, for example. This part reconstructs this information 
for the
         // ooxml preset shapes from their definition.
-        css::uno::Sequence<css::beans::PropertyValues> seqHandles;
+        uno::Sequence<beans::PropertyValues> seqHandles;
         *pAny >>= seqHandles;
         auto seqHandlesRange = asNonConstRange(seqHandles);
         bool bChanged(false);
@@ -1102,7 +1098,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const 
DefaultType eDefaultType ) cons
     OUString sShapeType;
     const SdrCustomShapeGeometryItem & rGeometryItem( GetMergedItem( 
SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
 
-    const Any *pAny = rGeometryItem.GetPropertyValueByName( "Type" );
+    const uno::Any *pAny = rGeometryItem.GetPropertyValueByName( "Type" );
     if ( pAny )
         *pAny >>= sShapeType;
 
@@ -1114,8 +1110,8 @@ bool SdrObjCustomShape::IsDefaultGeometry( const 
DefaultType eDefaultType ) cons
     {
         case DefaultType::Viewbox :
         {
-            const Any* pViewBox = rGeometryItem.GetPropertyValueByName( 
"ViewBox" );
-            css::awt::Rectangle aViewBox;
+            const uno::Any* pViewBox = rGeometryItem.GetPropertyValueByName( 
"ViewBox" );
+            awt::Rectangle aViewBox;
             if (pViewBox && (*pViewBox >>= aViewBox) && pDefCustomShape)
             {
                 if ( ( aViewBox.Width == pDefCustomShape->nCoordWidth )
@@ -1130,11 +1126,11 @@ bool SdrObjCustomShape::IsDefaultGeometry( const 
DefaultType eDefaultType ) cons
             pAny = rGeometryItem.GetPropertyValueByName( sPath, "Coordinates" 
);
             if ( pAny && pDefCustomShape && pDefCustomShape->nVertices && 
pDefCustomShape->pVertices )
             {
-                css::uno::Sequence< 
css::drawing::EnhancedCustomShapeParameterPair> seqCoordinates1;
+                uno::Sequence<drawing::EnhancedCustomShapeParameterPair> 
seqCoordinates1;
                 if ( *pAny >>= seqCoordinates1 )
                 {
                     sal_Int32 i, nCount = pDefCustomShape->nVertices;
-                    css::uno::Sequence< 
css::drawing::EnhancedCustomShapeParameterPair> seqCoordinates2( nCount );
+                    uno::Sequence<drawing::EnhancedCustomShapeParameterPair> 
seqCoordinates2( nCount );
                     auto pseqCoordinates2 = seqCoordinates2.getArray();
                     for ( i = 0; i < nCount; i++ )
                     {
@@ -1155,11 +1151,11 @@ bool SdrObjCustomShape::IsDefaultGeometry( const 
DefaultType eDefaultType ) cons
             pAny = rGeometryItem.GetPropertyValueByName( sPath, "GluePoints" );
             if ( pAny && pDefCustomShape && pDefCustomShape->nGluePoints && 
pDefCustomShape->pGluePoints )
             {
-                css::uno::Sequence< 
css::drawing::EnhancedCustomShapeParameterPair> seqGluePoints1;
+                uno::Sequence<drawing::EnhancedCustomShapeParameterPair> 
seqGluePoints1;
                 if ( *pAny >>= seqGluePoints1 )
                 {
                     sal_Int32 i, nCount = pDefCustomShape->nGluePoints;
-                    css::uno::Sequence< 
css::drawing::EnhancedCustomShapeParameterPair> seqGluePoints2( nCount );
+                    uno::Sequence<drawing::EnhancedCustomShapeParameterPair> 
seqGluePoints2( nCount );
                     auto pseqGluePoints2 = seqGluePoints2.getArray();
                     for ( i = 0; i < nCount; i++ )
                     {
@@ -1181,7 +1177,7 @@ bool SdrObjCustomShape::IsDefaultGeometry( const 
DefaultType eDefaultType ) cons
             pAny = rGeometryItem.GetPropertyValueByName( sPath, "Segments" );
             if ( pAny )
             {
-                css::uno::Sequence< css::drawing::EnhancedCustomShapeSegment > 
seqSegments1;
+                uno::Sequence<drawing::EnhancedCustomShapeSegment> 
seqSegments1;
                 if ( *pAny >>= seqSegments1 )
                 {
                     if ( pDefCustomShape && pDefCustomShape->nElements && 
pDefCustomShape->pElements )
@@ -1189,11 +1185,11 @@ bool SdrObjCustomShape::IsDefaultGeometry( const 
DefaultType eDefaultType ) cons
                         sal_Int32 i, nCount = pDefCustomShape->nElements;
                         if ( nCount )
                         {
-                            css::uno::Sequence< 
css::drawing::EnhancedCustomShapeSegment > seqSegments2( nCount );
+                            uno::Sequence<drawing::EnhancedCustomShapeSegment> 
seqSegments2( nCount );
                             auto pseqSegments2 = seqSegments2.getArray();
                             for ( i = 0; i < nCount; i++ )
                             {
-                                EnhancedCustomShapeSegment& rSegInfo = 
pseqSegments2[ i ];
+                                drawing::EnhancedCustomShapeSegment& rSegInfo 
= pseqSegments2[ i ];
                                 sal_uInt16 nSDat = pDefCustomShape->pElements[ 
i ];
                                 lcl_ShapeSegmentFromBinary( rSegInfo, nSDat );
                             }
@@ -1206,10 +1202,10 @@ bool SdrObjCustomShape::IsDefaultGeometry( const 
DefaultType eDefaultType ) cons
                         // check if it's the default segment description ( M L 
Z N )
                         if ( seqSegments1.getLength() == 4 )
                         {
-                            if ( ( seqSegments1[ 0 ].Command == 
EnhancedCustomShapeSegmentCommand::MOVETO )
-                                && ( seqSegments1[ 1 ].Command == 
EnhancedCustomShapeSegmentCommand::LINETO )
-                                && ( seqSegments1[ 2 ].Command == 
EnhancedCustomShapeSegmentCommand::CLOSESUBPATH )
-                                && ( seqSegments1[ 3 ].Command == 
EnhancedCustomShapeSegmentCommand::ENDSUBPATH ) )
+                            if ( ( seqSegments1[ 0 ].Command == 
drawing::EnhancedCustomShapeSegmentCommand::MOVETO )
+                                && ( seqSegments1[ 1 ].Command == 
drawing::EnhancedCustomShapeSegmentCommand::LINETO )
+                                && ( seqSegments1[ 2 ].Command == 
drawing::EnhancedCustomShapeSegmentCommand::CLOSESUBPATH )
+                                && ( seqSegments1[ 3 ].Command == 
drawing::EnhancedCustomShapeSegmentCommand::ENDSUBPATH ) )
                                 bIsDefaultGeometry = true;
                         }
                     }
@@ -1259,11 +1255,11 @@ bool SdrObjCustomShape::IsDefaultGeometry( const 
DefaultType eDefaultType ) cons
             pAny = rGeometryItem.GetPropertyValueByName( "Equations" );
             if ( pAny && pDefCustomShape && pDefCustomShape->nCalculation && 
pDefCustomShape->pCalculation )
             {
-                css::uno::Sequence< OUString > seqEquations1;
+                uno::Sequence<OUString> seqEquations1;
                 if ( *pAny >>= seqEquations1 )
                 {
                     sal_Int32 i, nCount = pDefCustomShape->nCalculation;
-                    css::uno::Sequence< OUString > seqEquations2( nCount );
+                    uno::Sequence<OUString> seqEquations2( nCount );
                     auto pseqEquations2 = seqEquations2.getArray();
 
                     const SvxMSDffCalculationData* pData = 
pDefCustomShape->pCalculation;
@@ -1284,11 +1280,11 @@ bool SdrObjCustomShape::IsDefaultGeometry( const 
DefaultType eDefaultType ) cons
             pAny = rGeometryItem.GetPropertyValueByName( sPath, "TextFrames" );
             if ( pAny && pDefCustomShape && pDefCustomShape->nTextRect && 
pDefCustomShape->pTextRect )
             {
-                css::uno::Sequence< css::drawing::EnhancedCustomShapeTextFrame 
> seqTextFrames1;
+                uno::Sequence<drawing::EnhancedCustomShapeTextFrame> 
seqTextFrames1;
                 if ( *pAny >>= seqTextFrames1 )
                 {
                     sal_Int32 i, nCount = pDefCustomShape->nTextRect;
-                    css::uno::Sequence< 
css::drawing::EnhancedCustomShapeTextFrame > seqTextFrames2( nCount );
+                    uno::Sequence<drawing::EnhancedCustomShapeTextFrame> 
seqTextFrames2( nCount );
                     auto pseqTextFrames2 = seqTextFrames2.getArray();
                     const SvxMSDffTextRectangles* pRectangles = 
pDefCustomShape->pTextRect;
                     for ( i = 0; i < nCount; i++, pRectangles++ )
@@ -1529,17 +1525,17 @@ void SdrObjCustomShape::NbcResize( const Point& rRef, 
const Fraction& rxFact, co
             if ( rInteraction.nMode & 
CustomShapeHandleModes::RESIZE_ABSOLUTE_X )
             {
                 sal_Int32 nX = ( rInteraction.aPosition.X - aOld.Left() ) + 
maRect.Left();
-                rInteraction.xInteraction->setControllerPosition( 
css::awt::Point( nX, rInteraction.xInteraction->getPosition().Y ) );
+                
rInteraction.xInteraction->setControllerPosition(awt::Point(nX, 
rInteraction.xInteraction->getPosition().Y));
             }
             else if ( rInteraction.nMode & 
CustomShapeHandleModes::RESIZE_ABSOLUTE_NEGX )
             {
                 sal_Int32 nX = maRect.Right() - (aOld.Right() - 
rInteraction.aPosition.X);
-                rInteraction.xInteraction->setControllerPosition( 
css::awt::Point( nX, rInteraction.xInteraction->getPosition().Y ) );
+                
rInteraction.xInteraction->setControllerPosition(awt::Point(nX, 
rInteraction.xInteraction->getPosition().Y));
             }
             if ( rInteraction.nMode & 
CustomShapeHandleModes::RESIZE_ABSOLUTE_Y )
             {
                 sal_Int32 nY = ( rInteraction.aPosition.Y - aOld.Top() ) + 
maRect.Top();
-                rInteraction.xInteraction->setControllerPosition( 
css::awt::Point( rInteraction.xInteraction->getPosition().X, nY ) );
+                
rInteraction.xInteraction->setControllerPosition(awt::Point(rInteraction.xInteraction->getPosition().X,
 nY));
             }
         }
         catch ( const uno::RuntimeException& )
@@ -1863,7 +1859,7 @@ void SdrObjCustomShape::AddToHdlList(SdrHdlList& 
rHdlList) const
         {
             try
             {
-                css::awt::Point aPosition( 
rInteraction.xInteraction->getPosition() );
+                awt::Point aPosition( rInteraction.xInteraction->getPosition() 
);
                 std::unique_ptr<SdrHdl> pH(new SdrHdl( Point( aPosition.X, 
aPosition.Y ), SdrHdlKind::CustomShape1 ));
                 pH->SetPointNum( nCustomShapeHdlNum );
                 pH->SetObj( const_cast<SdrObjCustomShape*>(this) );
@@ -1988,7 +1984,7 @@ void SdrObjCustomShape::DragResizeCustomShape( const 
tools::Rectangle& rNewRect
                     else
                         nX += maRect.Left();
                 }
-                rInteraction.xInteraction->setControllerPosition( 
css::awt::Point( nX, rInteraction.xInteraction->getPosition().Y ) );
+                
rInteraction.xInteraction->setControllerPosition(awt::Point(nX, 
rInteraction.xInteraction->getPosition().Y));
             }
             if ( rInteraction.nMode & 
CustomShapeHandleModes::RESIZE_ABSOLUTE_Y )
             {
@@ -2009,7 +2005,7 @@ void SdrObjCustomShape::DragResizeCustomShape( const 
tools::Rectangle& rNewRect
                     else
                         nY += maRect.Top();
                 }
-                rInteraction.xInteraction->setControllerPosition( 
css::awt::Point( rInteraction.xInteraction->getPosition().X, nY ) );
+                
rInteraction.xInteraction->setControllerPosition(awt::Point(rInteraction.xInteraction->getPosition().X,
 nY));
             }
         }
         catch ( const uno::RuntimeException& )
@@ -2031,7 +2027,7 @@ void SdrObjCustomShape::DragMoveCustomShapeHdl( const 
Point& rDestination,
 
     try
     {
-        css::awt::Point aPt( rDestination.X(), rDestination.Y() );
+        awt::Point aPt( rDestination.X(), rDestination.Y() );
         if ( aInteractionHandle.nMode & CustomShapeHandleModes::MOVE_SHAPE && 
bMoveCalloutRectangle )
         {
             sal_Int32 nXDiff = aPt.X - aInteractionHandle.aPosition.X;
@@ -2890,7 +2886,7 @@ void SdrObjCustomShape::SaveGeoData(SdrObjGeoData& rGeo) 
const
     rAGeo.bMirroredX = IsMirroredX();
     rAGeo.bMirroredY = IsMirroredY();
 
-    const Any* pAny = GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY 
).GetPropertyValueByName( "AdjustmentValues" );
+    const uno::Any* pAny = GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY 
).GetPropertyValueByName( "AdjustmentValues" );
     if ( pAny )
         *pAny >>= rAGeo.aAdjustmentSeq;
 }
@@ -2904,7 +2900,7 @@ void SdrObjCustomShape::RestoreGeoData(const 
SdrObjGeoData& rGeo)
     SetMirroredY( rAGeo.bMirroredY );
 
     SdrCustomShapeGeometryItem rGeometryItem = GetMergedItem( 
SDRATTR_CUSTOMSHAPE_GEOMETRY );
-    PropertyValue aPropVal;
+    beans::PropertyValue aPropVal;
     aPropVal.Name = "AdjustmentValues";
     aPropVal.Value <<= rAGeo.aAdjustmentSeq;
     rGeometryItem.SetPropertyValue( aPropVal );
@@ -3235,7 +3231,7 @@ OUString SdrObjCustomShape::GetCustomShapeName() const
     {
         OUString sShapeType;
         const SdrCustomShapeGeometryItem& rGeometryItem( GetMergedItem( 
SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
-        const Any* pAny = rGeometryItem.GetPropertyValueByName( "Type" );
+        const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( "Type" );
         if ( pAny && ( *pAny >>= sShapeType ) )
             sShapeName = EnhancedCustomShapeTypeNames::GetAccName( sShapeType 
);
     }
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index c369c5fcc832..7691b104ab8e 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -55,8 +55,6 @@
 #include <memory>
 
 using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::io;
 
 class SdrGraphicLink : public sfx2::SvBaseLink
 {
@@ -68,7 +66,7 @@ public:
     virtual void        Closed() override;
 
     virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
-        const OUString& rMimeType, const css::uno::Any & rValue ) override;
+        const OUString& rMimeType, const uno::Any & rValue ) override;
 
     void                Connect() { GetRealObject(); }
 };
@@ -81,7 +79,7 @@ SdrGraphicLink::SdrGraphicLink(SdrGrafObj& rObj)
 }
 
 ::sfx2::SvBaseLink::UpdateResult SdrGraphicLink::DataChanged(
-    const OUString& rMimeType, const css::uno::Any & rValue )
+    const OUString& rMimeType, const uno::Any & rValue )
 {
     SdrModel& rModel(rGrafObj.getSdrModelFromSdrObject());
     sfx2::LinkManager* pLinkManager(rModel.GetLinkManager());
@@ -145,7 +143,7 @@ void SdrGrafObj::onGraphicChanged()
     if (rVectorGraphicDataPtr->getType() == VectorGraphicDataType::Pdf)
         return;
 
-    const std::deque<css::uno::Reference<css::graphic::XPrimitive2D>>& 
rContainer(rVectorGraphicDataPtr->getPrimitive2DSequence());
+    const std::deque<uno::Reference<graphic::XPrimitive2D>>& 
rContainer(rVectorGraphicDataPtr->getPrimitive2DSequence());
 
     if (rContainer.empty())
         return;
@@ -238,7 +236,7 @@ SdrGrafObj::SdrGrafObj(SdrModel& rSdrModel, SdrGrafObj 
const & rSource)
 
     if(rSource.mpBarCode)
     {
-        mpBarCode = 
std::make_unique<css::drawing::BarCode>(*rSource.mpBarCode);
+        mpBarCode = std::make_unique<drawing::BarCode>(*rSource.mpBarCode);
     }
     else
     {
@@ -1129,9 +1127,9 @@ void SdrGrafObj::SetGrafAnimationAllowed(bool bNew)
     }
 }
 
-Reference< XInputStream > SdrGrafObj::getInputStream() const
+uno::Reference<io::XInputStream> SdrGrafObj::getInputStream() const
 {
-    Reference< XInputStream > xStream;
+    uno::Reference<io::XInputStream> xStream;
 
     if (mpGraphicObject && GetGraphic().IsGfxLink())
     {
diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx 
b/svx/source/svdraw/svdotextpathdecomposition.cxx
index dd3d3af8b026..99a7169c1fe6 100644
--- a/svx/source/svdraw/svdotextpathdecomposition.cxx
+++ b/svx/source/svdraw/svdotextpathdecomposition.cxx
@@ -34,9 +34,7 @@
 #include <drawinglayer/primitive2d/textprimitive2d.hxx>
 #include <basegfx/color/bcolor.hxx>
 
-
 // primitive decomposition helpers
-
 #include <drawinglayer/attribute/strokeattribute.hxx>
 #include <drawinglayer/primitive2d/PolygonStrokePrimitive2D.hxx>
 #include <drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx>
@@ -45,11 +43,7 @@
 #include <sdr/attribute/sdrformtextoutlineattribute.hxx>
 #include <utility>
 
-
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::i18n;
-
+using namespace com::sun::star;
 
 // PathTextPortion helper
 
@@ -64,7 +58,7 @@ namespace
         sal_Int32                                   mnParagraph;
         SvxFont                                     maFont;
         ::std::vector< double >                     maDblDXArray;   // double 
DXArray, font size independent -> unit coordinate system
-        css::lang::Locale                           maLocale;
+        lang::Locale                           maLocale;
 
         bool                                        mbRTL : 1;
 
@@ -76,7 +70,7 @@ namespace
             mnTextLength(rInfo.mnTextLen),
             mnParagraph(rInfo.mnPara),
             maFont(rInfo.mrFont),
-            maLocale(rInfo.mpLocale ? *rInfo.mpLocale : css::lang::Locale()),
+            maLocale(rInfo.mpLocale ? *rInfo.mpLocale : lang::Locale()),
             mbRTL(!rInfo.mrFont.IsVertical() && rInfo.IsRTL())
         {
             if(mnTextLength && !rInfo.mpDXArray.empty())
@@ -113,7 +107,7 @@ namespace
         const SvxFont& getFont() const { return maFont; }
         bool isRTL() const { return mbRTL; }
         const ::std::vector< double >& getDoubleDXArray() const { return 
maDblDXArray; }
-        const css::lang::Locale& getLocale() const { return maLocale; }
+        const lang::Locale& getLocale() const { return maLocale; }
 
         sal_Int32 getPortionIndex(sal_Int32 nIndex, sal_Int32 nLength) const
         {
@@ -196,7 +190,7 @@ namespace
         const drawinglayer::attribute::SdrFormTextAttribute         
maSdrFormTextAttribute; // FormText parameters
         drawinglayer::primitive2d::Primitive2DContainer&            
mrDecomposition;        // destination primitive list
         drawinglayer::primitive2d::Primitive2DContainer&            
mrShadowDecomposition;  // destination primitive list for shadow
-        Reference < css::i18n::XBreakIterator >                     mxBreak;   
             // break iterator
+        uno::Reference<i18n::XBreakIterator>                     mxBreak;      
          // break iterator
 
         static double getParagraphTextLength(const ::std::vector< const 
impPathTextPortion* >& rTextPortions)
         {
@@ -215,7 +209,7 @@ namespace
             return fRetval;
         }
 
-        sal_Int32 getNextGlyphLen(const impPathTextPortion* pCandidate, 
sal_Int32 nPosition, const css::lang::Locale& rFontLocale)
+        sal_Int32 getNextGlyphLen(const impPathTextPortion* pCandidate, 
sal_Int32 nPosition, const lang::Locale& rFontLocale)
         {
             sal_Int32 nNextGlyphLen(1);
 
@@ -223,7 +217,7 @@ namespace
             {
                 sal_Int32 nDone(0);
                 nNextGlyphLen = mxBreak->nextCharacters(pCandidate->getText(), 
nPosition,
-                    rFontLocale, CharacterIteratorMode::SKIPCELL, 1, nDone) - 
nPosition;
+                    rFontLocale, i18n::CharacterIteratorMode::SKIPCELL, 1, 
nDone) - nPosition;
             }
 
             return nNextGlyphLen;
@@ -239,8 +233,8 @@ namespace
             mrShadowDecomposition(rShadowDecomposition)
         {
             // prepare BreakIterator
-            Reference < XComponentContext > xContext = 
::comphelper::getProcessComponentContext();
-            mxBreak = css::i18n::BreakIterator::create(xContext);
+            uno::Reference<uno::XComponentContext> xContext = 
::comphelper::getProcessComponentContext();
+            mxBreak = i18n::BreakIterator::create(xContext);
         }
 
         void HandlePair(const basegfx::B2DPolygon& rPolygonCandidate, const 
::std::vector< const impPathTextPortion* >& rTextPortions)

Reply via email to