summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unodraw.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/unocore/unodraw.cxx')
-rw-r--r--sw/source/core/unocore/unodraw.cxx560
1 files changed, 155 insertions, 405 deletions
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 2a2e1e497d13..8e02bfce696d 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,14 +62,14 @@
#include <fmtornt.hxx>
#include <fmtanchr.hxx>
#include <fmtsrnd.hxx>
-// OD 2004-04-21 #i26791#
+// #i26791#
#include <fmtfollowtextflow.hxx>
#include <rootfrm.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/ulspitem.hxx>
#include <svx/shapepropertynotifier.hxx>
#include <crstate.hxx>
-#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
#include <comphelper/extract.hxx>
#include <comphelper/stl_types.hxx>
#include <comphelper/makesequence.hxx>
@@ -85,7 +86,7 @@
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <com/sun/star/drawing/PointSequence.hpp>
#include <vcl/svapp.hxx>
-#include <slist>
+#include <list>
#include <iterator>
using ::rtl::OUString;
@@ -95,9 +96,6 @@ DECLARE_STL_USTRINGACCESS_MAP( uno::Sequence< sal_Int8 > *, SwShapeImplementati
static SwShapeImplementationIdMap aImplementationIdMap;
-/* -----------------22.01.99 13:19-------------------
- *
- * --------------------------------------------------*/
class SwShapeDescriptor_Impl
{
SwFmtHoriOrient* pHOrient;
@@ -108,37 +106,33 @@ class SwShapeDescriptor_Impl
SvxLRSpaceItem* pLRSpace;
sal_Bool bOpaque;
uno::Reference< text::XTextRange > xTextRange;
- // OD 2004-04-21 #i26791#
+ // #i26791#
SwFmtFollowTextFlow* mpFollowTextFlow;
- // OD 2004-05-05 #i28701# - add property 'WrapInfluenceOnObjPos'
+ // #i28701#
SwFmtWrapInfluenceOnObjPos* pWrapInfluenceOnObjPos;
- // --> OD 2004-08-06 #i28749#
+ // #i28749#
sal_Int16 mnPositionLayoutDir;
- // <--
public:
bool bInitializedPropertyNotifier;
public:
SwShapeDescriptor_Impl() :
- // --> OD 2004-08-18 #i32349# - no defaults, in order to determine on
+ // #i32349# - no defaults, in order to determine on
// adding a shape, if positioning attributes are set or not.
pHOrient( 0L ),
pVOrient( 0L ),
- // <--
pAnchor(0),
pSurround(0),
pULSpace(0),
pLRSpace(0),
bOpaque(sal_False),
- // OD 2004-04-21 #i26791#
+ // #i26791#
mpFollowTextFlow( new SwFmtFollowTextFlow( sal_False ) ),
- // OD 2004-05-05 #i28701#
- // --> OD 2004-10-18 #i35017# - constant name has changed
+ // #i28701# #i35017#
pWrapInfluenceOnObjPos( new SwFmtWrapInfluenceOnObjPos(
text::WrapInfluenceOnPosition::ONCE_CONCURRENT ) ),
- // <--
- // --> OD 2004-08-06 #i28749#
+ // #i28749#
mnPositionLayoutDir( text::PositionLayoutDir::PositionInLayoutDirOfAnchor ),
bInitializedPropertyNotifier(false)
{}
@@ -151,9 +145,9 @@ public:
delete pSurround;
delete pULSpace;
delete pLRSpace;
- // OD 2004-04-22 #i26791#
+ // #i26791#
delete mpFollowTextFlow;
- // OD 2004-05-05 #i28701#
+ // #i28701#
delete pWrapInfluenceOnObjPos;
}
SwFmtAnchor* GetAnchor(sal_Bool bCreate = sal_False)
@@ -168,7 +162,7 @@ public:
{
if (bCreate && !pHOrient)
{
- // OD 2004-06-03 #i26791# - change default
+ // #i26791#
pHOrient = new SwFmtHoriOrient( 0, text::HoriOrientation::NONE, text::RelOrientation::FRAME );
}
return pHOrient;
@@ -177,7 +171,7 @@ public:
{
if(bCreate && !pVOrient)
{
- // OD 2004-04-21 #i26791# - change default
+ // #i26791#
pVOrient = new SwFmtVertOrient( 0, text::VertOrientation::NONE, text::RelOrientation::FRAME );
}
return pVOrient;
@@ -205,11 +199,11 @@ public:
{
return xTextRange;
}
- sal_Bool IsOpaque()
+ sal_Bool IsOpaque() const
{
return bOpaque;
}
- const sal_Bool& GetOpaque()
+ const sal_Bool& GetOpaque() const
{
return bOpaque;
}
@@ -221,7 +215,7 @@ public:
void RemoveLRSpace(){DELETEZ(pLRSpace);}
void SetOpaque(sal_Bool bSet){bOpaque = bSet;}
- // OD 2004-04-21 #i26791#
+ // #i26791#
SwFmtFollowTextFlow* GetFollowTextFlow( sal_Bool _bCreate = sal_False )
{
if ( _bCreate && !mpFollowTextFlow )
@@ -233,7 +227,7 @@ public:
DELETEZ(mpFollowTextFlow);
}
- // --> OD 2004-08-06 #i28749#
+ // #i28749#
sal_Int16 GetPositionLayoutDir() const
{
return mnPositionLayoutDir;
@@ -250,7 +244,7 @@ public:
break;
default:
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwShapeDescriptor_Impl::SetPositionLayoutDir(..)> - invalid attribute value." );
}
}
@@ -259,18 +253,16 @@ public:
{
mnPositionLayoutDir = text::PositionLayoutDir::PositionInLayoutDirOfAnchor;
}
- // <--
- // OD 2004-05-05 #i28701#
+ // #i28701#
inline SwFmtWrapInfluenceOnObjPos* GetWrapInfluenceOnObjPos(
const sal_Bool _bCreate = sal_False )
{
if ( _bCreate && !pWrapInfluenceOnObjPos )
{
pWrapInfluenceOnObjPos = new SwFmtWrapInfluenceOnObjPos(
- // --> OD 2004-10-18 #i35017# - constant name has changed
+ // #i35017#
text::WrapInfluenceOnPosition::ONCE_CONCURRENT );
- // <--
}
return pWrapInfluenceOnObjPos;
}
@@ -279,63 +271,47 @@ public:
DELETEZ(pWrapInfluenceOnObjPos);
}
};
+
/****************************************************************************
class SwFmDrawPage
****************************************************************************/
-
-/* -----------------28.01.99 12:03-------------------
- *
- * --------------------------------------------------*/
SwFmDrawPage::SwFmDrawPage( SdrPage* pPage ) :
SvxFmDrawPage( pPage ), pPageView(0)
{
}
-/*-- 22.01.99 11:13:07---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwFmDrawPage::~SwFmDrawPage() throw ()
{
RemovePageView();
}
-/*-- 22.01.99 11:13:07---------------------------------------------------
- -----------------------------------------------------------------------*/
const SdrMarkList& SwFmDrawPage::PreGroup(const uno::Reference< drawing::XShapes > & xShapes)
{
_SelectObjectsInView( xShapes, GetPageView() );
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
return rMarkList;
}
-/*-- 22.01.99 11:13:08---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwFmDrawPage::PreUnGroup(const uno::Reference< drawing::XShapeGroup > xShapeGroup)
{
uno::Reference< drawing::XShape > xShape( xShapeGroup, uno::UNO_QUERY);
_SelectObjectInView( xShape, GetPageView() );
}
-/*-- 22.01.99 11:13:08---------------------------------------------------
- -----------------------------------------------------------------------*/
SdrPageView* SwFmDrawPage::GetPageView()
{
if(!pPageView)
pPageView = mpView->ShowSdrPage( mpPage );
return pPageView;
}
-/*-- 22.01.99 11:13:08---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwFmDrawPage::RemovePageView()
{
if(pPageView && mpView)
mpView->HideSdrPage();
pPageView = 0;
}
-/*-- 22.01.99 11:13:09---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< uno::XInterface > SwFmDrawPage::GetInterface( SdrObject* pObj )
{
uno::Reference< XInterface > xShape;
@@ -353,17 +329,12 @@ uno::Reference< uno::XInterface > SwFmDrawPage::GetInterface( SdrObject* pObj
}
return xShape;
}
-/*-- 22.01.99 11:13:09---------------------------------------------------
- -----------------------------------------------------------------------*/
SdrObject* SwFmDrawPage::_CreateSdrObject( const uno::Reference< drawing::XShape > & xShape ) throw ()
{
//TODO: stimmt das so - kann die Methode weg?
return SvxFmDrawPage::_CreateSdrObject( xShape );
}
-/*-- 22.01.99 11:13:09---------------------------------------------------
-
- -----------------------------------------------------------------------*/
uno::Reference< drawing::XShape > SwFmDrawPage::_CreateShape( SdrObject *pObj ) const throw ()
{
@@ -392,7 +363,7 @@ uno::Reference< drawing::XShape > SwFmDrawPage::_CreateShape( SdrObject *pObj )
}
else
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwFmDrawPage::_CreateShape(..)> - could not retrieve type. Thus, no shape created." );
return xRet;
}
@@ -438,7 +409,7 @@ namespace
: public SwSimpleEnumeration_Base
{
private:
- typedef ::std::slist< ::com::sun::star::uno::Any > shapescontainer_t;
+ typedef ::std::list< ::com::sun::star::uno::Any > shapescontainer_t;
shapescontainer_t m_aShapes;
protected:
virtual ~SwXShapesEnumeration() {};
@@ -459,7 +430,7 @@ namespace
SwXShapesEnumeration::SwXShapesEnumeration(SwXDrawPage* const pDrawPage)
: m_aShapes()
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
::std::insert_iterator<shapescontainer_t> pInserter = ::std::insert_iterator<shapescontainer_t>(m_aShapes, m_aShapes.begin());
sal_Int32 nCount = pDrawPage->getCount();
for(sal_Int32 nIdx = 0; nIdx < nCount; nIdx++)
@@ -471,13 +442,13 @@ SwXShapesEnumeration::SwXShapesEnumeration(SwXDrawPage* const pDrawPage)
sal_Bool SwXShapesEnumeration::hasMoreElements(void) throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return !m_aShapes.empty();
}
uno::Any SwXShapesEnumeration::nextElement(void) throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(m_aShapes.empty())
throw container::NoSuchElementException();
uno::Any aResult = *m_aShapes.begin();
@@ -499,32 +470,27 @@ uno::Sequence< OUString > SwXShapesEnumeration::getSupportedServiceNames(void) t
{
return ::comphelper::makeSequence(C2U("com.sun.star.container.XEnumeration"));
}
+
/****************************************************************************
class SwXDrawPage
****************************************************************************/
uno::Reference< container::XEnumeration > SwXDrawPage::createEnumeration(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
return uno::Reference< container::XEnumeration >(
new SwXShapesEnumeration(this));
}
-/* -----------------------------06.04.00 13:14--------------------------------
- ---------------------------------------------------------------------------*/
rtl::OUString SwXDrawPage::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXDrawPage");
}
-/* -----------------------------06.04.00 13:14--------------------------------
- ---------------------------------------------------------------------------*/
sal_Bool SwXDrawPage::supportsService(const rtl::OUString& rServiceName) throw( uno::RuntimeException )
{
return C2U("com.sun.star.drawing.GenericDrawPage") == rServiceName;
}
-/* -----------------------------06.04.00 13:14--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< rtl::OUString > SwXDrawPage::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< rtl::OUString > aRet(1);
@@ -532,17 +498,13 @@ uno::Sequence< rtl::OUString > SwXDrawPage::getSupportedServiceNames(void) throw
pArray[0] = C2U("com.sun.star.drawing.GenericDrawPage");
return aRet;
}
-/*-- 22.01.99 11:22:25---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXDrawPage::SwXDrawPage(SwDoc* pDc) :
pDoc(pDc),
pDrawPage(0)
{
}
-/*-- 22.01.99 11:22:25---------------------------------------------------
- -----------------------------------------------------------------------*/
SwXDrawPage::~SwXDrawPage()
{
if(xPageAgg.is())
@@ -551,9 +513,7 @@ SwXDrawPage::~SwXDrawPage()
xPageAgg->setDelegator(xInt);
}
}
-/* -----------------------------15.06.00 15:00--------------------------------
- ---------------------------------------------------------------------------*/
uno::Any SwXDrawPage::queryInterface( const uno::Type& aType )
throw( uno::RuntimeException )
{
@@ -573,9 +533,7 @@ uno::Any SwXDrawPage::queryInterface( const uno::Type& aType )
}
return aRet;
}
-/* -----------------------------15.06.00 15:01--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< uno::Type > SwXDrawPage::getTypes() throw( uno::RuntimeException )
{
uno::Sequence< uno::Type > aPageTypes = SwXDrawPageBaseClass::getTypes();
@@ -594,12 +552,10 @@ uno::Sequence< uno::Type > SwXDrawPage::getTypes() throw( uno::RuntimeException
pPageTypes[nIndex] = ::getCppuType((uno::Reference<form::XFormsSupplier2>*)0);
return aPageTypes;
}
-/*-- 22.01.99 11:33:44---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwXDrawPage::getCount(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!pDoc)
throw uno::RuntimeException();
if(!pDoc->GetDrawModel())
@@ -610,14 +566,12 @@ sal_Int32 SwXDrawPage::getCount(void) throw( uno::RuntimeException )
return pDrawPage->getCount();
}
}
-/*-- 22.01.99 11:33:46---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXDrawPage::getByIndex(sal_Int32 nIndex)
throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException,
uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!pDoc)
throw uno::RuntimeException();
if(!pDoc->GetDrawModel())
@@ -626,19 +580,15 @@ uno::Any SwXDrawPage::getByIndex(sal_Int32 nIndex)
((SwXDrawPage*)this)->GetSvxPage();
return pDrawPage->getByIndex( nIndex );
}
-/* -----------------22.01.99 13:13-------------------
- *
- * --------------------------------------------------*/
+
uno::Type SwXDrawPage::getElementType(void) throw( uno::RuntimeException )
{
return ::getCppuType((const uno::Reference<drawing::XShape>*)0);
}
-/* -----------------22.01.99 13:13-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SwXDrawPage::hasElements(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!pDoc)
throw uno::RuntimeException();
if(!pDoc->GetDrawModel())
@@ -647,13 +597,10 @@ sal_Bool SwXDrawPage::hasElements(void) throw( uno::RuntimeException )
return ((SwXDrawPage*)this)->GetSvxPage()->hasElements();
}
-/* -----------------22.01.99 12:42-------------------
- *
- * --------------------------------------------------*/
void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!pDoc)
throw uno::RuntimeException();
uno::Reference< lang::XUnoTunnel > xShapeTunnel(xShape, uno::UNO_QUERY);
@@ -677,7 +624,6 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
throw aExcept;
}
- // --> OD, HB
if ( pSvxShape->GetSdrObject() )
{
if ( pSvxShape->GetSdrObject()->IsInserted() )
@@ -685,7 +631,6 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
return;
}
}
- // <--
GetSvxPage()->add(xShape);
uno::Reference< uno::XAggregation > xAgg = pShape->GetAggregationInterface();
@@ -717,27 +662,25 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
if(pDesc->GetAnchor())
aAnchor = *pDesc->GetAnchor();
- // --> OD 2004-08-18 #i32349# - if no horizontal position exists, create one
+ // #i32349# - if no horizontal position exists, create one
if ( !pDesc->GetHOrient() )
{
SwFmtHoriOrient* pHori = pDesc->GetHOrient( sal_True );
SwTwips nHoriPos = MM100_TO_TWIP(aMM100Pos.X);
pHori->SetPos( nHoriPos );
}
- // <--
{
if(pDesc->GetHOrient()->GetHoriOrient() == text::HoriOrientation::NONE)
aMM100Pos.X = TWIP_TO_MM100(pDesc->GetHOrient()->GetPos());
aSet.Put( *pDesc->GetHOrient() );
}
- // --> OD 2004-08-18 #i32349# - if no vertical position exists, create one
+ // #i32349# - if no vertical position exists, create one
if ( !pDesc->GetVOrient() )
{
SwFmtVertOrient* pVert = pDesc->GetVOrient( sal_True );
SwTwips nVertPos = MM100_TO_TWIP(aMM100Pos.Y);
pVert->SetPos( nVertPos );
}
- // <--
{
if(pDesc->GetVOrient()->GetVertOrient() == text::VertOrientation::NONE)
aMM100Pos.Y = TWIP_TO_MM100(pDesc->GetVOrient()->GetPos());
@@ -748,13 +691,13 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
aSet.Put( *pDesc->GetSurround());
bOpaque = pDesc->IsOpaque();
- // OD 2004-04-22 #i26791#
+ // #i26791#
if ( pDesc->GetFollowTextFlow() )
{
aSet.Put( *pDesc->GetFollowTextFlow() );
}
- // OD 2004-05-05 #i28701#
+ // #i28701#
if ( pDesc->GetWrapInfluenceOnObjPos() )
{
aSet.Put( *pDesc->GetWrapInfluenceOnObjPos() );
@@ -763,7 +706,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
pSvxShape->setPosition(aMM100Pos);
SdrObject* pObj = pSvxShape->GetSdrObject();
- // OD 25.06.2003 #108784# - set layer of new drawing object to corresponding
+ // #108784# - set layer of new drawing object to corresponding
// invisible layer.
if(FmFormInventor != pObj->GetObjInventor())
pObj->SetLayer( bOpaque ? pDoc->GetInvisibleHeavenId() : pDoc->GetInvisibleHellId() );
@@ -798,14 +741,14 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
pDoc->GetRootFrm()->GetCrsrOfst( pPam->GetPoint(), aTmp, &aState );
aAnchor.SetAnchor( pPam->GetPoint() );
- // --> OD 2004-08-18 #i32349# - adjustment of vertical positioning
+ // #i32349# - adjustment of vertical positioning
// attributes no longer needed, because its already got a default.
}
else
{
aAnchor.SetType(FLY_AT_PAGE);
- // --> OD 2004-08-18 #i32349# - adjustment of vertical positioning
+ // #i32349# - adjustment of vertical positioning
// attributes no longer needed, because its already got a default.
}
aSet.Put(aAnchor);
@@ -822,23 +765,19 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
delete pPam;
delete pInternalPam;
}
-/* -----------------22.01.99 12:42-------------------
- *
- * --------------------------------------------------*/
+
void SwXDrawPage::remove(const uno::Reference< drawing::XShape > & xShape) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!pDoc)
throw uno::RuntimeException();
uno::Reference<lang::XComponent> xComp(xShape, uno::UNO_QUERY);
xComp->dispose();
}
-/* -----------------17.02.99 10:38-------------------
- *
- * --------------------------------------------------*/
+
uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference< drawing::XShapes > & xShapes) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!pDoc || !xShapes.is())
throw uno::RuntimeException();
uno::Reference< drawing::XShapeGroup > xRet;
@@ -889,12 +828,10 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference<
}
return xRet;
}
-/* -----------------17.02.99 10:38-------------------
- *
- * --------------------------------------------------*/
+
void SwXDrawPage::ungroup(const uno::Reference< drawing::XShapeGroup > & xShapeGroup) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
if(!pDoc)
throw uno::RuntimeException();
if(xPageAgg.is())
@@ -915,17 +852,14 @@ void SwXDrawPage::ungroup(const uno::Reference< drawing::XShapeGroup > & xShapeG
pPage->RemovePageView();
}
}
-/* -----------------05.05.98 17:05-------------------
- *
- * --------------------------------------------------*/
+
SwFmDrawPage* SwXDrawPage::GetSvxPage()
{
if(!xPageAgg.is() && pDoc)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
- // --> OD 2005-08-08 #i52858# - method name changed
+ SolarMutexGuard aGuard;
+ // #i52858#
SdrModel* pModel = pDoc->GetOrCreateDrawModel();
- // <--
SdrPage* pPage = pModel->GetPage( 0 );
{
@@ -949,21 +883,14 @@ void SwXDrawPage::InvalidateSwDoc()
pDoc = 0;
}
-/****************************************************************************
-
-****************************************************************************/
TYPEINIT1(SwXShape, SwClient);
-/* -----------------------------10.03.00 18:02--------------------------------
- ---------------------------------------------------------------------------*/
const uno::Sequence< sal_Int8 > & SwXShape::getUnoTunnelId()
{
static uno::Sequence< sal_Int8 > aSeq = ::CreateUnoTunnelId();
return aSeq;
}
-/* -----------------------------10.03.00 18:04--------------------------------
- ---------------------------------------------------------------------------*/
sal_Int64 SAL_CALL SwXShape::getSomething( const uno::Sequence< sal_Int8 >& rId )
throw(uno::RuntimeException)
{
@@ -997,9 +924,6 @@ namespace
}
}
-/* -----------------01.02.99 11:38-------------------
- *
- * --------------------------------------------------*/
SwXShape::SwXShape(uno::Reference< uno::XInterface > & xShape) :
m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_SHAPE)),
m_pPropertyMapEntries(aSwMapProvider.GetPropertyMapEntries(PROPERTY_MAP_TEXT_SHAPE)),
@@ -1015,11 +939,11 @@ SwXShape::SwXShape(uno::Reference< uno::XInterface > & xShape) :
uno::Any aAgg = xShape->queryInterface(rAggType);
if(aAgg.getValueType() == rAggType)
xShapeAgg = *(uno::Reference< uno::XAggregation >*)aAgg.getValue();
- // --> OD 2004-07-23 #i31698#
+ // #i31698#
if ( xShapeAgg.is() )
{
xShapeAgg->queryAggregation( ::getCppuType((uno::Reference< drawing::XShape >*)0) ) >>= mxShape;
- ASSERT( mxShape.is(),
+ OSL_ENSURE( mxShape.is(),
"<SwXShape::SwXShape(..)> - no XShape found at <xShapeAgg>" );
}
// <--
@@ -1049,9 +973,6 @@ SwXShape::SwXShape(uno::Reference< uno::XInterface > & xShape) :
}
}
-/*-- 09.04.09 15:06:13---------------------------------------------------
-
- -----------------------------------------------------------------------*/
void SwXShape::AddExistingShapeToFmt( SdrObject& _rObj )
{
SdrObjListIter aIter( _rObj, IM_DEEPNOGROUPS );
@@ -1086,9 +1007,6 @@ void SwXShape::AddExistingShapeToFmt( SdrObject& _rObj )
}
}
-/*-- 22.01.99 11:42:26---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXShape::~SwXShape()
{
if (xShapeAgg.is())
@@ -1098,13 +1016,11 @@ SwXShape::~SwXShape()
}
delete pImpl;
}
-/* -----------------------------16.06.00 12:21--------------------------------
- ---------------------------------------------------------------------------*/
uno::Any SwXShape::queryInterface( const uno::Type& aType ) throw( uno::RuntimeException )
{
uno::Any aRet = SwXShapeBaseClass::queryInterface(aType);
- // --> OD 2005-08-15 #i53320# - follow-up of #i31698#
+ // #i53320# - follow-up of #i31698#
// interface drawing::XShape is overloaded. Thus, provide
// correct object instance.
if(!aRet.hasValue() && xShapeAgg.is())
@@ -1114,12 +1030,9 @@ uno::Any SwXShape::queryInterface( const uno::Type& aType ) throw( uno::RuntimeE
else
aRet = xShapeAgg->queryAggregation(aType);
}
- // <--
return aRet;
}
-/* -----------------------------16.06.00 12:21--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< uno::Type > SwXShape::getTypes( ) throw(uno::RuntimeException)
{
uno::Sequence< uno::Type > aRet = SwXShapeBaseClass::getTypes();
@@ -1143,12 +1056,10 @@ uno::Sequence< uno::Type > SwXShape::getTypes( ) throw(uno::RuntimeException)
}
return aRet;
}
-/* -----------------------------04.04.01 07:37--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< sal_Int8 > SwXShape::getImplementationId( ) throw(uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aGuard;
// do we need to compute the implementation id for this instance?
if( !pImplementationId && xShapeAgg.is())
{
@@ -1179,7 +1090,7 @@ uno::Sequence< sal_Int8 > SwXShape::getImplementationId( ) throw(uno::RuntimeEx
}
if( NULL == pImplementationId )
{
- DBG_ERROR( "Could not create an implementation id for a SwXShape!" );
+ OSL_FAIL( "Could not create an implementation id for a SwXShape!" );
return uno::Sequence< sal_Int8 > ();
}
else
@@ -1187,12 +1098,10 @@ uno::Sequence< sal_Int8 > SwXShape::getImplementationId( ) throw(uno::RuntimeEx
return *pImplementationId;
}
}
-/*-- 22.01.99 11:42:26---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Reference< beans::XPropertySetInfo > SwXShape::getPropertySetInfo(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< beans::XPropertySetInfo > aRet;
if(xShapeAgg.is())
{
@@ -1212,15 +1121,13 @@ uno::Reference< beans::XPropertySetInfo > SwXShape::getPropertySetInfo(void) th
aRet = m_pPropSet->getPropertySetInfo();
return aRet;
}
-/*-- 22.01.99 11:42:27---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::Any& aValue)
throw( beans::UnknownPropertyException, beans::PropertyVetoException,
lang::IllegalArgumentException, lang::WrappedTargetException,
uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName( rPropertyName );
if(xShapeAgg.is())
@@ -1271,7 +1178,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
if(pSvxShape)
{
SdrObject* pObj = pSvxShape->GetSdrObject();
- // OD 25.06.2003 #108784# - set layer of new drawing
+ // set layer of new drawing
// object to corresponding invisible layer.
bool bIsVisible = pDoc->IsVisibleLayerId( pObj->GetLayer() );
if(FmFormInventor != pObj->GetObjInventor())
@@ -1288,7 +1195,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
}
}
- // OD 2004-04-22 #i26791# - special handling for property FN_TEXT_RANGE
+ // #i26791# - special handling for property FN_TEXT_RANGE
else if ( FN_TEXT_RANGE == pEntry->nWID )
{
SwFmtAnchor aAnchor( static_cast<const SwFmtAnchor&>(aSet.Get( RES_ANCHOR )) );
@@ -1313,7 +1220,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
//To prevent this the connection between format and attribute has to be broken before.
const SwPosition *pPos = aAnchor.GetCntntAnchor();
SwTxtNode *pTxtNode = pPos->nNode.GetNode().GetTxtNode();
- ASSERT( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
+ OSL_ENSURE( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
const xub_StrLen nIdx = pPos->nContent.GetIndex();
SwTxtAttr * const pHnt =
pTxtNode->GetTxtAttrForCharAt(
@@ -1349,14 +1256,13 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
delete pInternalPam;
}
}
- // --> OD 2004-08-06 #i28749#
+ // #i28749#
else if ( FN_SHAPE_POSITION_LAYOUT_DIR == pEntry->nWID )
{
sal_Int16 nPositionLayoutDir = 0;
aValue >>= nPositionLayoutDir;
pFmt->SetPositionLayoutDir( nPositionLayoutDir );
}
- // <--
else if( pDoc->GetRootFrm() )
{
UnoActionContext aCtx(pDoc);
@@ -1400,7 +1306,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
//To prevent this the connection between format and attribute has to be broken before.
const SwPosition *pPos = rOldAnchor.GetCntntAnchor();
SwTxtNode *pTxtNode = pPos->nNode.GetNode().GetTxtNode();
- ASSERT( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
+ OSL_ENSURE( pTxtNode->HasHints(), "Missing FlyInCnt-Hint." );
const xub_StrLen nIdx = pPos->nContent.GetIndex();
SwTxtAttr * const pHnt =
pTxtNode->GetTxtAttrForCharAt(
@@ -1495,19 +1401,19 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
case RES_OPAQUE :
pImpl->SetOpaque(*(sal_Bool*)aValue.getValue());
break;
- // OD 2004-04-22 #i26791#
+ // #i26791#
case RES_FOLLOW_TEXT_FLOW:
{
pItem = pImpl->GetFollowTextFlow( sal_True );
}
break;
- // OD 2004-05-05 #i28701#
+ // #i28701#
case RES_WRAP_INFLUENCE_ON_OBJPOS:
{
pItem = pImpl->GetWrapInfluenceOnObjPos( sal_True );
}
break;
- // --> OD 2004-08-06 #i28749#
+ // #i28749#
case FN_SHAPE_POSITION_LAYOUT_DIR :
{
sal_Int16 nPositionLayoutDir = 0;
@@ -1515,7 +1421,6 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
pImpl->SetPositionLayoutDir( nPositionLayoutDir );
}
break;
- // <--
}
if(pItem)
((SfxPoolItem*)pItem)->PutValue(aValue, pEntry->nMemberId);
@@ -1530,7 +1435,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
if(aPSet.getValueType() != rPSetType || !aPSet.getValue())
throw uno::RuntimeException();
xPrSet = *(uno::Reference< beans::XPropertySet >*)aPSet.getValue();
- // --> OD 2004-08-05 #i31698# - setting the caption point of a
+ // #i31698# - setting the caption point of a
// caption object doesn't have to change the object position.
// Thus, keep the position, before the caption point is set and
// restore it afterwards.
@@ -1540,7 +1445,6 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
{
aKeepedPosition = getPosition();
}
- // <--
if( pFmt && pFmt->GetDoc()->GetRootFrm() )
{
UnoActionContext aCtx(pFmt->GetDoc());
@@ -1548,26 +1452,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
}
else
xPrSet->setPropertyValue(rPropertyName, aValue);
- // --> OD 2004-11-11 #i35007# - adjustment of the position
- // attributes, if the transformation is set, causes wrong alignments
- // and is no longer needed.
- // The position attributes are set, if the drawing object is added
- // to the draw page - see <SwXDrawPage::add(..)> - and on its first
- // positioning - see <SwAnchoredDrawObject::MakeObjPos().
-// // --> OD 2004-07-28 #i31698# - additionally adjust the position
-// // properties of the shape, if the transformation is set and
-// // the shape isn't a group member.
-// if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Transformation"))) &&
-// !_GetTopGroupObj() )
-// {
-// drawing::HomogenMatrix3 aMatrix;
-// aValue >>= aMatrix;
-// awt::Point aNewPos( basegfx::fround( aMatrix.Line1.Column3 ),
-// basegfx::fround( aMatrix.Line2.Column3 ) );
-// _AdjustPositionProperties( aNewPos );
-// }
- // --> OD 2004-08-05 #i31698# - restore object position, if caption
- // point is set.
+ // #i31698# - restore object position, if caption point is set.
if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CaptionPoint"))) &&
getShapeType().equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CaptionShape"))) )
{
@@ -1576,14 +1461,12 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
}
}
}
-/*-- 22.01.99 11:42:27---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
throw( beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Any aRet;
SwFrmFmt* pFmt = GetFrmFmt();
if(xShapeAgg.is())
@@ -1600,7 +1483,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
if(pSvxShape)
{
SdrObject* pObj = pSvxShape->GetSdrObject();
- // OD 02.07.2003 #108784# - consider invisible layers
+ // consider invisible layers
sal_Bool bOpaque =
( pObj->GetLayer() != pFmt->GetDoc()->GetHellId() &&
pObj->GetLayer() != pFmt->GetDoc()->GetInvisibleHellId() );
@@ -1620,7 +1503,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
aRet.setValue(&aPoint, ::getCppuType( (awt::Point*)0 ));
}
}
- // OD 2004-04-22 #i26791# - special handling for FN_TEXT_RANGE
+ // #i26791# - special handling for FN_TEXT_RANGE
else if ( FN_TEXT_RANGE == pEntry->nWID )
{
const SwFmtAnchor aAnchor = pFmt->GetAnchor();
@@ -1650,7 +1533,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
}
}
}
- // --> OD 2004-08-06 #i28749#
+ // #i28749#
else if ( FN_SHAPE_TRANSFORMATION_IN_HORI_L2R == pEntry->nWID )
{
// get property <::drawing::Shape::Transformation>
@@ -1661,8 +1544,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
{
aRet <<= pFmt->GetPositionLayoutDir();
}
- // <--
- // --> OD 2004-10-28 #i36248#
+ // #i36248#
else if ( FN_SHAPE_STARTPOSITION_IN_HORI_L2R == pEntry->nWID )
{
// get property <::drawing::Shape::StartPosition>
@@ -1675,7 +1557,6 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
// without conversion to layout direction as below
aRet = _getPropAtAggrObj( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EndPosition")) );
}
- // <--
else
{
const SwAttrSet& rSet = pFmt->GetAttrSet();
@@ -1717,19 +1598,19 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
aRet.setValue(&aPoint, ::getCppuType( (awt::Point*)0 ));
}
break;
- // OD 2004-04-22 #i26791#
+ // #i26791#
case RES_FOLLOW_TEXT_FLOW :
{
pItem = pImpl->GetFollowTextFlow();
}
break;
- // OD 2004-05-05 #i28701#
+ // #i28701#
case RES_WRAP_INFLUENCE_ON_OBJPOS:
{
pItem = pImpl->GetWrapInfluenceOnObjPos();
}
break;
- // --> OD 2004-08-06 #i28749#
+ // #i28749#
case FN_SHAPE_TRANSFORMATION_IN_HORI_L2R:
{
// get property <::drawing::Shape::Transformation>
@@ -1742,8 +1623,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
aRet <<= pImpl->GetPositionLayoutDir();
}
break;
- // <--
- // --> OD 2004-08-06 #i36248#
+ // #i36248#
case FN_SHAPE_STARTPOSITION_IN_HORI_L2R:
{
// get property <::drawing::Shape::StartPosition>
@@ -1758,7 +1638,6 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
aRet = _getPropAtAggrObj( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EndPosition")) );
}
break;
- // <--
}
if(pItem)
pItem->QueryValue(aRet, pEntry->nMemberId);
@@ -1768,7 +1647,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
{
aRet = _getPropAtAggrObj( rPropertyName );
- // --> OD 2004-07-28 #i31698# - convert the position (translation)
+ // #i31698# - convert the position (translation)
// of the drawing object in the transformation
if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Transformation"))) )
{
@@ -1776,43 +1655,35 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
aRet >>= aMatrix;
aRet <<= _ConvertTransformationToLayoutDir( aMatrix );
}
- // <--
- // --> OD 2004-10-28 #i36248#
+ // #i36248#
else if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StartPosition"))) )
{
awt::Point aStartPos;
aRet >>= aStartPos;
- // --> OD 2009-01-12 #i59051#
+ // #i59051#
aRet <<= _ConvertStartOrEndPosToLayoutDir( aStartPos );
- // <--
}
else if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EndPosition"))) )
{
awt::Point aEndPos;
aRet >>= aEndPos;
- // --> OD 2009-01-12 #i59051#
+ // #i59051#
aRet <<= _ConvertStartOrEndPosToLayoutDir( aEndPos );
- // <--
}
- // --> OD 2009-01-16 #i59051#
+ // #i59051#
else if ( rPropertyName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PolyPolygonBezier"))) )
{
drawing::PolyPolygonBezierCoords aPath;
aRet >>= aPath;
aRet <<= _ConvertPolyPolygonBezierToLayoutDir( aPath );
- // <--
}
- // <--
}
}
return aRet;
}
/** method to get property from aggregation object
-
- OD 2004-10-28 #i36248#
-
- @author OD
+ #i36248#
*/
uno::Any SwXShape::_getPropAtAggrObj( const ::rtl::OUString& _rPropertyName )
throw( beans::UnknownPropertyException, lang::WrappedTargetException,
@@ -1834,28 +1705,22 @@ uno::Any SwXShape::_getPropAtAggrObj( const ::rtl::OUString& _rPropertyName )
return aRet;
}
-
-/* -----------------------------02.11.00 09:41--------------------------------
-
- ---------------------------------------------------------------------------*/
beans::PropertyState SwXShape::getPropertyState( const rtl::OUString& rPropertyName )
throw(beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Sequence< rtl::OUString > aNames(1);
rtl::OUString* pStrings = aNames.getArray();
pStrings[0] = rPropertyName;
uno::Sequence< beans::PropertyState > aStates = getPropertyStates(aNames);
return aStates.getConstArray()[0];
}
-/* -----------------------------02.11.00 09:41--------------------------------
- ---------------------------------------------------------------------------*/
uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
const uno::Sequence< rtl::OUString >& aPropertyNames )
throw(beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
uno::Sequence< beans::PropertyState > aRet(aPropertyNames.getLength());
if(xShapeAgg.is())
@@ -1921,7 +1786,7 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
case RES_SURROUND:
pItem = pImpl->GetSurround();
break;
- // OD 2004-05-05 #i28701#
+ // #i28701#
case RES_WRAP_INFLUENCE_ON_OBJPOS:
{
pItem = pImpl->GetWrapInfluenceOnObjPos();
@@ -1952,13 +1817,11 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
throw uno::RuntimeException();
return aRet;
}
-/* -----------------------------02.11.00 09:41--------------------------------
- ---------------------------------------------------------------------------*/
void SwXShape::setPropertyToDefault( const rtl::OUString& rPropertyName )
throw(beans::UnknownPropertyException, uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
if(xShapeAgg.is())
{
@@ -1988,13 +1851,13 @@ void SwXShape::setPropertyToDefault( const rtl::OUString& rPropertyName )
case RES_OPAQUE : pImpl->SetOpaque(sal_False); break;
case FN_TEXT_RANGE :
break;
- // OD 2004-04-22 #i26791#
+ // #i26791#
case RES_FOLLOW_TEXT_FLOW:
{
pImpl->RemoveFollowTextFlow();
}
break;
- // OD 2004-05-05 #i28701#
+ // #i28701#
case RES_WRAP_INFLUENCE_ON_OBJPOS:
{
pImpl->RemoveWrapInfluenceOnObjPos();
@@ -2016,14 +1879,12 @@ void SwXShape::setPropertyToDefault( const rtl::OUString& rPropertyName )
else
throw uno::RuntimeException();
}
-/* -----------------------------02.11.00 09:41--------------------------------
- ---------------------------------------------------------------------------*/
uno::Any SwXShape::getPropertyDefault( const rtl::OUString& rPropertyName )
throw( beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
uno::Any aRet;
if(xShapeAgg.is())
@@ -2054,9 +1915,7 @@ uno::Any SwXShape::getPropertyDefault( const rtl::OUString& rPropertyName )
throw uno::RuntimeException();
return aRet;
}
-/*-- 22.01.99 11:42:27---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXShape::addPropertyChangeListener(
const rtl::OUString& _propertyName,
const uno::Reference< beans::XPropertyChangeListener > & _listener )
@@ -2071,9 +1930,7 @@ void SwXShape::addPropertyChangeListener(
if ( xShapeAgg->queryAggregation( beans::XPropertySet::static_type() ) >>= xShapeProps )
xShapeProps->addPropertyChangeListener( _propertyName, _listener );
}
-/*-- 22.01.99 11:42:27---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXShape::removePropertyChangeListener(
const rtl::OUString& _propertyName,
const uno::Reference< beans::XPropertyChangeListener > & _listener)
@@ -2088,9 +1945,7 @@ void SwXShape::removePropertyChangeListener(
if ( xShapeAgg->queryAggregation( beans::XPropertySet::static_type() ) >>= xShapeProps )
xShapeProps->removePropertyChangeListener( _propertyName, _listener );
}
-/*-- 22.01.99 11:42:28---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXShape::addVetoableChangeListener(
const rtl::OUString& /*PropertyName*/,
const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/ )
@@ -2099,9 +1954,7 @@ void SwXShape::addVetoableChangeListener(
{
DBG_WARNING("not implemented");
}
-/*-- 22.01.99 11:42:28---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXShape::removeVetoableChangeListener(
const rtl::OUString& /*PropertyName*/,
const uno::Reference< beans::XVetoableChangeListener > & /*aListener*/)
@@ -2110,20 +1963,16 @@ void SwXShape::removeVetoableChangeListener(
{
DBG_WARNING("not implemented");
}
-/*-- 22.01.99 11:42:28---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXShape::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
{
ClientModify(this, pOld, pNew);
}
-/* -----------------14.04.99 13:02-------------------
- *
- * --------------------------------------------------*/
+
void SwXShape::attach(const uno::Reference< text::XTextRange > & xTextRange)
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
// get access to SwDoc
// (see also SwXTextRange::XTextRangeToSwPaM)
@@ -2187,12 +2036,10 @@ void SwXShape::attach(const uno::Reference< text::XTextRange > & xTextRange)
}
}
}
-/* -----------------14.04.99 13:02-------------------
- *
- * --------------------------------------------------*/
+
uno::Reference< text::XTextRange > SwXShape::getAnchor(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference< text::XTextRange > aRef;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
@@ -2211,38 +2058,32 @@ uno::Reference< text::XTextRange > SwXShape::getAnchor(void) throw( uno::Runtim
aRef = pImpl->GetTextRange();
return aRef;
}
-/* -----------------14.04.99 13:02-------------------
- *
- * --------------------------------------------------*/
+
void SwXShape::dispose(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SwFrmFmt* pFmt = GetFrmFmt();
if(pFmt)
{
- // OD 10.07.2003 #110742# - determine correct <SdrObject>
- //SdrObject* pObj = pFmt->FindSdrObject();
+ // determine correct <SdrObject>
SdrObject* pObj = GetSvxShape()->GetSdrObject();
- // OD 10.07.2003 #110742# - safety assertion:
+ // safety assertion:
// <pObj> must be the same as <pFmt->FindSdrObject()>, if <pObj> isn't
// a 'virtual' drawing object.
- // OD 25.08.2003 #111713# - refine assertion for safety reason.
- // --> OD 2005-02-02 #119236# - correct assertion and refine it.
- ASSERT( !pObj ||
+ // correct assertion and refine it for safety reason.
+ OSL_ENSURE( !pObj ||
pObj->ISA(SwDrawVirtObj) ||
pObj->GetUpGroup() ||
pObj == pFmt->FindSdrObject(),
"<SwXShape::dispose(..) - different 'master' drawing objects!!" );
- // <--
- // OD 10.07.2003 #110742# - perform delete of draw frame format *not*
+ // perform delete of draw frame format *not*
// for 'virtual' drawing objects.
- // --> OD 2005-02-02 #119236# - no delete of draw format for members
+ // no delete of draw format for members
// of a group
if ( pObj &&
!pObj->ISA(SwDrawVirtObj) &&
!pObj->GetUpGroup() &&
pObj->IsInserted() )
- // <--
{
if (pFmt->GetAnchor().GetAnchorId() == FLY_AS_CHAR)
{
@@ -2264,9 +2105,7 @@ void SwXShape::dispose(void) throw( uno::RuntimeException )
xComp->dispose();
}
}
-/* -----------------14.04.99 13:02-------------------
- *
- * --------------------------------------------------*/
+
void SwXShape::addEventListener(
const uno::Reference< lang::XEventListener > & aListener)
throw( uno::RuntimeException )
@@ -2276,9 +2115,7 @@ void SwXShape::addEventListener(
if(pSvxShape)
pSvxShape->addEventListener(aListener);
}
-/* -----------------14.04.99 13:02-------------------
- *
- * --------------------------------------------------*/
+
void SwXShape::removeEventListener(
const uno::Reference< lang::XEventListener > & aListener)
throw( uno::RuntimeException )
@@ -2287,16 +2124,12 @@ void SwXShape::removeEventListener(
if(pSvxShape)
pSvxShape->removeEventListener(aListener);
}
-/* -----------------03.06.99 08:53-------------------
- *
- * --------------------------------------------------*/
+
rtl::OUString SwXShape::getImplementationName(void) throw( uno::RuntimeException )
{
return C2U("SwXShape");
}
-/* -----------------03.06.99 08:53-------------------
- *
- * --------------------------------------------------*/
+
sal_Bool SwXShape::supportsService(const rtl::OUString& rServiceName) throw( uno::RuntimeException )
{
sal_Bool bRet = sal_False;
@@ -2310,9 +2143,7 @@ sal_Bool SwXShape::supportsService(const rtl::OUString& rServiceName) throw( uno
}
return bRet;
}
-/* -----------------03.06.99 08:53-------------------
- *
- * --------------------------------------------------*/
+
uno::Sequence< rtl::OUString > SwXShape::getSupportedServiceNames(void) throw( uno::RuntimeException )
{
uno::Sequence< rtl::OUString > aSeq;
@@ -2330,9 +2161,7 @@ uno::Sequence< rtl::OUString > SwXShape::getSupportedServiceNames(void) throw( u
}
return aSeq;
}
-/* -----------------------------15.03.00 14:54--------------------------------
- ---------------------------------------------------------------------------*/
SvxShape* SwXShape::GetSvxShape()
{
SvxShape* pSvxShape = 0;
@@ -2346,7 +2175,7 @@ SvxShape* SwXShape::GetSvxShape()
return pSvxShape;
}
-// --> OD 2004-07-22 #i31698# -
+// #i31698#
// implementation of virtual methods from drawing::XShape
awt::Point SAL_CALL SwXShape::getPosition() throw ( uno::RuntimeException )
{
@@ -2359,7 +2188,7 @@ awt::Point SAL_CALL SwXShape::getPosition() throw ( uno::RuntimeException )
SdrObject* pTopGroupObj = _GetTopGroupObj( pSvxShape );
if ( pTopGroupObj )
{
- // --> OD 2004-10-01 #i34750# - get attribute position of top group
+ // #i34750# - get attribute position of top group
// shape and add offset between top group object and group member
uno::Reference< drawing::XShape > xGroupShape =
uno::Reference< drawing::XShape >( pTopGroupObj->getUnoShape(),
@@ -2367,65 +2196,39 @@ awt::Point SAL_CALL SwXShape::getPosition() throw ( uno::RuntimeException )
aPos = xGroupShape->getPosition();
// add offset between top group object and group member
// to the determined attribute position
- // --> OD 2004-10-01 #i34750# - correction:
+ // #i34750#:
// consider the layout direction
const Rectangle aMemberObjRect = GetSvxShape()->GetSdrObject()->GetSnapRect();
const Rectangle aGroupObjRect = pTopGroupObj->GetSnapRect();
- // --> OD 2005-08-16 #i53320# - relative position of group member and
+ // #i53320# - relative position of group member and
// top group object is always given in horizontal left-to-right layout.
-// const SwFrmFmt::tLayoutDir eLayoutDir = GetFrmFmt()
-// ? GetFrmFmt()->GetLayoutDir()
-// : SwFrmFmt::HORI_L2R;
awt::Point aOffset( 0, 0 );
-// switch ( eLayoutDir )
-// {
-// case SwFrmFmt::HORI_L2R:
{
aOffset.X = ( aMemberObjRect.Left() - aGroupObjRect.Left() );
aOffset.Y = ( aMemberObjRect.Top() - aGroupObjRect.Top() );
}
-// break;
-// case SwFrmFmt::HORI_R2L:
-// {
-// aOffset.X = ( aGroupObjRect.Right() - aMemberObjRect.Right() );
-// aOffset.Y = ( aMemberObjRect.Top() - aGroupObjRect.Top() );
-// }
-// break;
-// case SwFrmFmt::VERT_R2L:
-// {
-// aOffset.X = ( aMemberObjRect.Top() - aGroupObjRect.Top() );
-// aOffset.Y = ( aGroupObjRect.Right() - aMemberObjRect.Right() );
-// }
-// break;
-// default:
-// {
-// ASSERT( false,
-// "<SwXShape::getPosition()> - unsupported layout direction" );
-// }
-// }
- // <--
aOffset.X = TWIP_TO_MM100(aOffset.X);
aOffset.Y = TWIP_TO_MM100(aOffset.Y);
aPos.X += aOffset.X;
aPos.Y += aOffset.Y;
- // <--
}
}
return aPos;
}
+
void SAL_CALL SwXShape::setPosition( const awt::Point& aPosition )
throw ( uno::RuntimeException )
{
SdrObject* pTopGroupObj = _GetTopGroupObj();
if ( !pTopGroupObj )
{
- // --> OD 2005-02-10 #i37877# - no adjustment of position attributes,
+ // #i37877# - no adjustment of position attributes,
// if the position also has to be applied at the drawing object and
// a contact object is already registered at the drawing object.
bool bApplyPosAtDrawObj(false);
bool bNoAdjustOfPosProp(false);
- // --> OD 2004-10-19 #i35798# - apply position also to drawing object,
+ // #i35798# - apply position also to drawing object,
// if drawing object has no anchor position set.
if ( mxShape.is() )
{
@@ -2446,7 +2249,6 @@ void SAL_CALL SwXShape::setPosition( const awt::Point& aPosition )
}
}
}
- // <--
// shape isn't a group member. Thus, set positioning attributes
if ( !bNoAdjustOfPosProp )
{
@@ -2456,7 +2258,6 @@ void SAL_CALL SwXShape::setPosition( const awt::Point& aPosition )
{
mxShape->setPosition( aPosition );
}
- // <--
}
else if ( mxShape.is() )
{
@@ -2476,20 +2277,19 @@ void SAL_CALL SwXShape::setPosition( const awt::Point& aPosition )
uno::Reference< drawing::XShape >( pTopGroupObj->getUnoShape(),
uno::UNO_QUERY );
{
- // --> OD 2004-09-29 #i34750# - correction:
+ // #i34750#
// use method <xGroupShape->getPosition()> to get the correct
// position of the top group object.
awt::Point aAttrPosInHoriL2R(
_ConvertPositionToHoriL2R( xGroupShape->getPosition(),
xGroupShape->getSize() ) );
- // <--
aNewPos.X -= aAttrPosInHoriL2R.X;
aNewPos.Y -= aAttrPosInHoriL2R.Y;
}
// convert relative position in horizontal left-to-right layout into
// absolute position in horizontal left-to-right layout
{
- // --> OD 2004-10-01 #i34750# - correction:
+ // #i34750#
// use method <SvxShape->getPosition()> to get the correct
// 'Drawing layer' position of the top group shape.
uno::Reference< lang::XUnoTunnel > xGrpShapeTunnel(
@@ -2500,12 +2300,12 @@ void SAL_CALL SwXShape::setPosition( const awt::Point& aPosition )
const awt::Point aGroupPos = pSvxGroupShape->getPosition();
aNewPos.X += aGroupPos.X;
aNewPos.Y += aGroupPos.Y;
- // <--
}
// set position
mxShape->setPosition( aNewPos );
}
}
+
awt::Size SAL_CALL SwXShape::getSize() throw ( uno::RuntimeException )
{
awt::Size aSize;
@@ -2515,6 +2315,7 @@ awt::Size SAL_CALL SwXShape::getSize() throw ( uno::RuntimeException )
}
return aSize;
}
+
void SAL_CALL SwXShape::setSize( const awt::Size& aSize )
throw ( beans::PropertyVetoException,
uno::RuntimeException )
@@ -2524,8 +2325,7 @@ void SAL_CALL SwXShape::setSize( const awt::Size& aSize )
mxShape->setSize( aSize );
}
}
-// <--
-// --> OD 2004-07-22 #i31698# -
+// #i31698#
// implementation of virtual methods from drawing::XShapeDescriptor
::rtl::OUString SAL_CALL SwXShape::getShapeType() throw ( uno::RuntimeException )
{
@@ -2536,12 +2336,8 @@ void SAL_CALL SwXShape::setSize( const awt::Size& aSize )
}
return aType;
}
-// <--
/** method to determine top group object
-
- OD 2004-08-03 #i31698#
-
- @author OD
+ #i31698#
*/
SdrObject* SwXShape::_GetTopGroupObj( SvxShape* _pSvxShape )
{
@@ -2565,10 +2361,7 @@ SdrObject* SwXShape::_GetTopGroupObj( SvxShape* _pSvxShape )
}
/** method to determine position according to the positioning attributes
-
- OD 2004-08-03 #i31698#
-
- @author OD
+ #i31698#
*/
awt::Point SwXShape::_GetAttrPosition()
{
@@ -2578,7 +2371,7 @@ awt::Point SwXShape::_GetAttrPosition()
aHoriPos >>= aAttrPos.X;
uno::Any aVertPos( getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrientPosition")) ) );
aVertPos >>= aAttrPos.Y;
- // --> OD 2004-10-19 #i35798# - fallback, if attribute position is (0,0)
+ // #i35798# - fallback, if attribute position is (0,0)
// and no anchor position is applied to the drawing object
SvxShape* pSvxShape = GetSvxShape();
if ( pSvxShape )
@@ -2594,8 +2387,7 @@ awt::Point SwXShape::_GetAttrPosition()
aAttrPos.Y = TWIP_TO_MM100(aObjRect.Top());
}
}
- // <--
- // --> OD 2004-11-10 #i35007# - If drawing object is anchored as-character,
+ // #i35007# - If drawing object is anchored as-character,
// it's x-position isn't sensible. Thus, return the x-position as zero in this case.
text::TextContentAnchorType eTextAnchorType =
text::TextContentAnchorType_AT_PARAGRAPH;
@@ -2608,17 +2400,13 @@ awt::Point SwXShape::_GetAttrPosition()
{
aAttrPos.X = 0;
}
- // <--
return aAttrPos;
}
/** method to convert the position (translation) of the drawing object to
the layout direction horizontal left-to-right.
-
- OD 2004-07-27 #i31698#
-
- @author OD
+ #i31698#
*/
awt::Point SwXShape::_ConvertPositionToHoriL2R( const awt::Point _aObjPos,
const awt::Size _aObjSize )
@@ -2649,7 +2437,7 @@ awt::Point SwXShape::_ConvertPositionToHoriL2R( const awt::Point _aObjPos,
break;
default:
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwXShape::_ConvertPositionToHoriL2R(..)> - unsupported layout direction" );
}
}
@@ -2657,28 +2445,26 @@ awt::Point SwXShape::_ConvertPositionToHoriL2R( const awt::Point _aObjPos,
return aObjPosInHoriL2R;
}
+
/** method to convert the transformation of the drawing object to the layout
direction, the drawing object is in
-
- OD 2004-07-27 #i31698#
-
- @author OD
+ #i31698#
*/
drawing::HomogenMatrix3 SwXShape::_ConvertTransformationToLayoutDir(
drawing::HomogenMatrix3 _aMatrixInHoriL2R )
{
drawing::HomogenMatrix3 aMatrix( _aMatrixInHoriL2R );
- // --> OD 2005-03-10 #i44334#, #i44681# - direct manipulation of the
+ // #i44334#, #i44681# - direct manipulation of the
// tranformation structure isn't valid, if it contains rotation.
SvxShape* pSvxShape = GetSvxShape();
- ASSERT( pSvxShape,
- "<SwXShape::_ConvertTransformationToLayoutDir(..)> - no SvxShape found!")
+ OSL_ENSURE( pSvxShape,
+ "<SwXShape::_ConvertTransformationToLayoutDir(..)> - no SvxShape found!");
if ( pSvxShape )
{
const SdrObject* pObj = pSvxShape->GetSdrObject();
- ASSERT( pObj,
- "<SwXShape::_ConvertTransformationToLayoutDir(..)> - no SdrObject found!")
+ OSL_ENSURE( pObj,
+ "<SwXShape::_ConvertTransformationToLayoutDir(..)> - no SdrObject found!");
if ( pObj )
{
// get position of object in Writer coordinate system.
@@ -2695,9 +2481,8 @@ drawing::HomogenMatrix3 SwXShape::_ConvertTransformationToLayoutDir(
// apply translation difference to transformation matrix.
if ( aTranslateDiff.X != 0 || aTranslateDiff.Y != 0 )
{
- // --> OD 2007-01-03 #i73079# - use correct matrix type
+ // #i73079# - use correct matrix type
::basegfx::B2DHomMatrix aTempMatrix;
- // <--
aTempMatrix.set(0, 0, aMatrix.Line1.Column1 );
aTempMatrix.set(0, 1, aMatrix.Line1.Column2 );
@@ -2708,11 +2493,8 @@ drawing::HomogenMatrix3 SwXShape::_ConvertTransformationToLayoutDir(
aTempMatrix.set(2, 0, aMatrix.Line3.Column1 );
aTempMatrix.set(2, 1, aMatrix.Line3.Column2 );
aTempMatrix.set(2, 2, aMatrix.Line3.Column3 );
-
- // --> OD 2007-01-03 #i73079#
+ // #i73079#
aTempMatrix.translate( aTranslateDiff.X, aTranslateDiff.Y );
- // <--
-
aMatrix.Line1.Column1 = aTempMatrix.get(0, 0);
aMatrix.Line1.Column2 = aTempMatrix.get(0, 1);
aMatrix.Line1.Column3 = aTempMatrix.get(0, 2);
@@ -2725,21 +2507,17 @@ drawing::HomogenMatrix3 SwXShape::_ConvertTransformationToLayoutDir(
}
}
}
- // <--
return aMatrix;
}
/** method to adjust the positioning properties
-
- OD 2004-08-02 #i31698#
-
- @author OD
+ #i31698#
*/
void SwXShape::_AdjustPositionProperties( const awt::Point _aPosition )
{
// handle x-position
- // --> OD 2004-11-10 #i35007# - no handling of x-position, if drawing
+ // #i35007# - no handling of x-position, if drawing
// object is anchored as-character, because it doesn't make sense.
text::TextContentAnchorType eTextAnchorType =
text::TextContentAnchorType_AT_PARAGRAPH;
@@ -2749,7 +2527,6 @@ void SwXShape::_AdjustPositionProperties( const awt::Point _aPosition )
aAny >>= eTextAnchorType;
}
if ( eTextAnchorType != text::TextContentAnchorType_AS_CHARACTER )
- // <--
{
// determine current x-postion
rtl::OUString aHoriPosPropStr( RTL_CONSTASCII_USTRINGPARAM("HoriOrientPosition") );
@@ -2812,10 +2589,7 @@ void SwXShape::_AdjustPositionProperties( const awt::Point _aPosition )
/** method to convert start or end position of the drawing object to the
Writer specific position, which is the attribute position in layout direction
-
- OD 2009-01-12 #i59051#
-
- @author OD
+ #i59051#
*/
::com::sun::star::awt::Point SwXShape::_ConvertStartOrEndPosToLayoutDir(
const ::com::sun::star::awt::Point& aStartOrEndPos )
@@ -2823,13 +2597,13 @@ void SwXShape::_AdjustPositionProperties( const awt::Point _aPosition )
awt::Point aConvertedPos( aStartOrEndPos );
SvxShape* pSvxShape = GetSvxShape();
- ASSERT( pSvxShape,
- "<SwXShape::_ConvertStartOrEndPosToLayoutDir(..)> - no SvxShape found!")
+ OSL_ENSURE( pSvxShape,
+ "<SwXShape::_ConvertStartOrEndPosToLayoutDir(..)> - no SvxShape found!");
if ( pSvxShape )
{
const SdrObject* pObj = pSvxShape->GetSdrObject();
- ASSERT( pObj,
- "<SwXShape::_ConvertStartOrEndPosToLayoutDir(..)> - no SdrObject found!")
+ OSL_ENSURE( pObj,
+ "<SwXShape::_ConvertStartOrEndPosToLayoutDir(..)> - no SdrObject found!");
if ( pObj )
{
// get position of object in Writer coordinate system.
@@ -2861,13 +2635,13 @@ void SwXShape::_AdjustPositionProperties( const awt::Point _aPosition )
drawing::PolyPolygonBezierCoords aConvertedPath( aPath );
SvxShape* pSvxShape = GetSvxShape();
- ASSERT( pSvxShape,
- "<SwXShape::_ConvertStartOrEndPosToLayoutDir(..)> - no SvxShape found!")
+ OSL_ENSURE( pSvxShape,
+ "<SwXShape::_ConvertStartOrEndPosToLayoutDir(..)> - no SvxShape found!");
if ( pSvxShape )
{
const SdrObject* pObj = pSvxShape->GetSdrObject();
- ASSERT( pObj,
- "<SwXShape::_ConvertStartOrEndPosToLayoutDir(..)> - no SdrObject found!")
+ OSL_ENSURE( pObj,
+ "<SwXShape::_ConvertStartOrEndPosToLayoutDir(..)> - no SdrObject found!");
if ( pObj )
{
// get position of object in Writer coordinate system.
@@ -2910,27 +2684,19 @@ void SwXShape::_AdjustPositionProperties( const awt::Point _aPosition )
return aConvertedPath;
}
-/*-- 31.05.01 09:59:19---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXGroupShape::SwXGroupShape(uno::Reference< XInterface > & xShape) :
SwXShape(xShape)
{
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
uno::Reference<XShapes> xShapes(xShapeAgg, uno::UNO_QUERY);
DBG_ASSERT(xShapes.is(), "no SvxShape found or shape is not a group shape");
#endif
}
-/*-- 31.05.01 09:59:19---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwXGroupShape::~SwXGroupShape()
{
}
-/*-- 31.05.01 09:59:19---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXGroupShape::queryInterface( const uno::Type& rType ) throw(uno::RuntimeException)
{
uno::Any aRet;
@@ -2940,26 +2706,20 @@ uno::Any SwXGroupShape::queryInterface( const uno::Type& rType ) throw(uno::Runt
aRet = SwXShape::queryInterface(rType);
return aRet;
}
-/*-- 31.05.01 09:59:19---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXGroupShape::acquire( ) throw()
{
SwXShape::acquire();
}
-/*-- 31.05.01 09:59:19---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXGroupShape::release( ) throw()
{
SwXShape::release();
}
-/*-- 31.05.01 09:59:19---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXGroupShape::add( const uno::Reference< XShape >& xShape ) throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
SvxShape* pSvxShape = GetSvxShape();
SwFrmFmt* pFmt = GetFrmFmt();
if(pSvxShape && pFmt)
@@ -2991,7 +2751,7 @@ void SwXGroupShape::add( const uno::Reference< XShape >& xShape ) throw (uno::Ru
if(pObj)
{
SwDoc* pDoc = pFmt->GetDoc();
- // OD 25.06.2003 #108784# - set layer of new drawing
+ // set layer of new drawing
// object to corresponding invisible layer.
if( FmFormInventor != pObj->GetObjInventor())
{
@@ -3015,12 +2775,10 @@ void SwXGroupShape::add( const uno::Reference< XShape >& xShape ) throw (uno::Ru
else
throw uno::RuntimeException();
}
-/*-- 31.05.01 09:59:20---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwXGroupShape::remove( const uno::Reference< XShape >& xShape ) throw (uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference<XShapes> xShapes;
if( xShapeAgg.is() )
{
@@ -3032,12 +2790,10 @@ void SwXGroupShape::remove( const uno::Reference< XShape >& xShape ) throw (uno:
throw uno::RuntimeException();
xShapes->remove(xShape);
}
-/*-- 31.05.01 09:59:20---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Int32 SwXGroupShape::getCount(void) throw( uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference<XIndexAccess> xAcc;
if( xShapeAgg.is() )
{
@@ -3049,14 +2805,12 @@ sal_Int32 SwXGroupShape::getCount(void) throw( uno::RuntimeException )
throw uno::RuntimeException();
return xAcc->getCount();
}
-/*-- 31.05.01 09:59:20---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Any SwXGroupShape::getByIndex(sal_Int32 nIndex)
throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException,
uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference<XIndexAccess> xAcc;
if( xShapeAgg.is() )
{
@@ -3068,12 +2822,10 @@ uno::Any SwXGroupShape::getByIndex(sal_Int32 nIndex)
throw uno::RuntimeException();
return xAcc->getByIndex(nIndex);
}
-/*-- 31.05.01 09:59:20---------------------------------------------------
- -----------------------------------------------------------------------*/
uno::Type SwXGroupShape::getElementType( ) throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference<XIndexAccess> xAcc;
if( xShapeAgg.is() )
{
@@ -3085,12 +2837,10 @@ uno::Type SwXGroupShape::getElementType( ) throw(uno::RuntimeException)
throw uno::RuntimeException();
return xAcc->getElementType();
}
-/*-- 31.05.01 09:59:22---------------------------------------------------
- -----------------------------------------------------------------------*/
sal_Bool SwXGroupShape::hasElements( ) throw(uno::RuntimeException)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
+ SolarMutexGuard aGuard;
uno::Reference<XIndexAccess> xAcc;
if( xShapeAgg.is() )
{
@@ -3103,4 +2853,4 @@ sal_Bool SwXGroupShape::hasElements( ) throw(uno::RuntimeException)
return xAcc->hasElements();
}
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */