summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unodraw.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-06-03 11:26:39 +0000
committerKurt Zenker <kz@openoffice.org>2009-06-03 11:26:39 +0000
commit3182616f1ae5701a2f39cef90616a2f7d8ba61d0 (patch)
treec70b252ba21c55fa2d1a9c86cee960d5a7eb74d7 /sw/source/core/unocore/unodraw.cxx
parentd9c439850c6b5b515d2cd18b85a2861badc7dfaf (diff)
CWS-TOOLING: integrate CWS os128
2009-04-22 12:58:26 +0200 b_michaelsen r271093 : #i101084# using the frames enumeration for other SwXFrames-queries; also added a complex test to ensure the behavior to be the same 2009-04-20 14:53:03 +0200 mav r270987 : #i101219# adjust the testcases to test memory cache and temporary file cache 2009-04-20 14:52:09 +0200 mav r270986 : #i101219#,#i99077# use memory to cache data; no precopying on commit 2009-04-20 14:39:21 +0200 mav r270984 : #i101219# use memory to cache data 2009-04-20 14:39:08 +0200 mav r270983 : #i101219# use memory to cache data 2009-04-20 14:38:45 +0200 mav r270982 : #i101219# use memory to cache data 2009-04-17 07:37:52 +0200 os r270912 : CWS-TOOLING: rebase CWS os128 to trunk@270723 (milestone: DEV300:m46) 2009-04-15 14:54:18 +0200 b_michaelsen r270845 : #i101084# using frame enumerations for paragraph export for better performance 2009-04-15 14:52:54 +0200 b_michaelsen r270843 : #i101084# implemented XEnumerationAccess interface on framesets 2009-04-03 17:08:10 +0200 mav r270504 : #i100722# do not compress streams of known compressed types per default 2009-04-03 13:49:50 +0200 os r270484 : resync error fixed 2009-04-03 12:55:32 +0200 mav r270470 : #i100722# do not compress streams of known compressed types per default 2009-04-03 10:00:58 +0200 os r270463 : resync error fixed 2009-04-03 09:52:53 +0200 os r270462 : resync error fixed 2009-04-03 09:10:14 +0200 os r270449 : #i99568# string compare operator of hash_map changed 2009-04-03 09:03:49 +0200 os r270446 : #i100683# normalize file URLs 2009-04-02 11:09:27 +0200 os r270381 : #i100683# making URLs relative without file access 2009-04-02 09:04:42 +0200 os r270366 : CWS-TOOLING: rebase CWS os128 to trunk@270033 (milestone: DEV300:m45) 2009-03-31 08:08:37 +0200 os r270258 : #i100683# reducing calls to URIHelper::simpleNormalizeMakeRelative() 2009-03-19 17:06:22 +0100 os r269756 : #i99568# XTolerantMultiPropertySet activated 2009-03-16 11:46:14 +0100 os r269517 : wrong commit to #i97471# removed 2009-03-16 11:36:50 +0100 os r269514 : #i97471# SwDrawTextShell::Init(): mouse double click and key input in group objects at the same time: prevent crash 2009-03-13 11:08:54 +0100 os r269464 : #i99568# static SfxItemPropertySet 2009-03-13 11:03:22 +0100 os r269463 : #i99568# static SfxItemPropertySet 2009-03-11 12:59:27 +0100 os r269320 : #i99568# WhichId of properties handled from ScDocOptionsObj added 2009-03-06 09:09:58 +0100 os r268972 : #i99568# SfxItemPropertySet improvements 2009-03-05 20:54:43 +0100 os r268942 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 20:19:52 +0100 os r268941 : #i99568# SfxItemPropertySet improvements 2009-03-05 20:05:03 +0100 os r268940 : #i99568# SfxItemPropertySet improvements 2009-03-05 18:54:47 +0100 os r268936 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 17:51:38 +0100 os r268931 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 17:33:03 +0100 os r268930 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 15:53:00 +0100 os r268920 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 15:52:50 +0100 os r268919 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 15:50:41 +0100 os r268918 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 15:41:04 +0100 os r268916 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 15:40:40 +0100 os r268915 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 10:16:20 +0100 os r268881 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-05 10:15:55 +0100 os r268880 : #i99568# Sfx/SvxItemPropertySet improvements 2009-03-03 08:40:09 +0100 os r268704 : ScTableSheetObj::GetItemPropertyMap fixed 2009-03-03 07:50:00 +0100 os r268703 : SfxItemProperty set as pointer 2009-03-03 07:49:46 +0100 os r268702 : SfxItemProperty set as pointer 2009-03-02 08:15:37 +0100 os r268631 : minor fix 2009-03-02 07:58:38 +0100 os r268630 : minor fix 2009-02-27 13:03:25 +0100 os r268584 : exports 2009-02-27 11:17:04 +0100 os r268567 : debug code removed 2009-02-27 11:04:07 +0100 os r268565 : duplicate return removed 2009-02-27 10:17:37 +0100 os r268558 : syntax fixed 2009-02-27 09:56:14 +0100 os r268554 : #i99568# type mix fixed 2009-02-27 09:40:56 +0100 os r268553 : #i99568# exports changes reverted 2009-02-25 12:50:54 +0100 os r268433 : #i99568# SfxItemPropertySet rework 2009-02-25 12:13:39 +0100 os r268432 : #i99568# SfxItemPropertySet rework 2009-02-25 12:12:47 +0100 os r268431 : #i99568# SfxItemPropertySet rework 2009-02-25 12:10:27 +0100 os r268430 : #i99568# SfxItemPropertySet rework 2009-02-25 12:09:36 +0100 os r268429 : #i99568# SfxItemPropertySet rework 2009-02-25 12:07:39 +0100 os r268428 : #i99568# SfxItemPropertySet rework 2009-02-25 11:59:35 +0100 os r268427 : #i99568# SfxItemPropertySet rework 2009-02-25 11:52:52 +0100 os r268425 : #i99568# SfxItemPropertySet rework 2009-02-25 11:49:17 +0100 os r268424 : #i99568# SfxItemPropertySet rework 2009-02-25 11:45:17 +0100 os r268423 : #i99568# SfxItemPropertySet rework 2009-02-11 11:39:04 +0100 os r267587 : #i57008# use registration of index marks at SwUnoCallback
Diffstat (limited to 'sw/source/core/unocore/unodraw.cxx')
-rw-r--r--sw/source/core/unocore/unodraw.cxx180
1 files changed, 127 insertions, 53 deletions
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 19a1a84af546..8732c44598b7 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -67,6 +67,7 @@
#include <vos/mutex.hxx>
#include <comphelper/extract.hxx>
#include <comphelper/stl_types.hxx>
+#include <comphelper/makesequence.hxx>
#include <svx/scene3d.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
@@ -87,7 +88,10 @@
// <--
#include <vcl/svapp.hxx>
+#include <slist>
+#include <iterator>
+using ::rtl::OUString;
using namespace ::com::sun::star;
DECLARE_STL_USTRINGACCESS_MAP( uno::Sequence< sal_Int8 > *, SwShapeImplementationIdMap );
@@ -423,8 +427,83 @@ uno::Reference< drawing::XShape > SwFmDrawPage::_CreateShape( SdrObject *pObj )
}
/****************************************************************************
+ class SwXShapesEnumeration
+****************************************************************************/
+namespace
+{
+ class SwXShapesEnumeration : public SwSimpleEnumerationBaseClass
+ {
+ private:
+ typedef ::std::slist< ::com::sun::star::uno::Any > shapescontainer_t;
+ shapescontainer_t m_aShapes;
+ protected:
+ virtual ~SwXShapesEnumeration() {};
+ public:
+ SwXShapesEnumeration(SwXDrawPage* const pDrawPage);
+
+ //XEnumeration
+ virtual BOOL SAL_CALL hasMoreElements(void) throw(uno::RuntimeException);
+ virtual uno::Any SAL_CALL nextElement(void) throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException);
+
+ //XServiceInfo
+ virtual OUString SAL_CALL getImplementationName(void) throw(uno::RuntimeException);
+ virtual BOOL SAL_CALL supportsService(const OUString& ServiceName) throw(uno::RuntimeException);
+ virtual uno::Sequence<OUString> SAL_CALL getSupportedServiceNames(void) throw(uno::RuntimeException);
+ };
+}
+
+SwXShapesEnumeration::SwXShapesEnumeration(SwXDrawPage* const pDrawPage)
+ : m_aShapes()
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ ::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++)
+ {
+ uno::Reference<drawing::XShape> xShape = uno::Reference<drawing::XShape>(pDrawPage->getByIndex(nIdx), uno::UNO_QUERY);
+ *pInserter++ = uno::makeAny(xShape);
+ }
+}
+
+BOOL SwXShapesEnumeration::hasMoreElements(void) throw(uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ return !m_aShapes.empty();
+}
+
+uno::Any SwXShapesEnumeration::nextElement(void) throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ if(m_aShapes.empty())
+ throw container::NoSuchElementException();
+ uno::Any aResult = *m_aShapes.begin();
+ m_aShapes.pop_front();
+ return aResult;
+}
+
+OUString SwXShapesEnumeration::getImplementationName(void) throw(uno::RuntimeException)
+{
+ return C2U("SwXShapeEnumeration");
+}
+
+BOOL SwXShapesEnumeration::supportsService(const OUString& ServiceName) throw(uno::RuntimeException)
+{
+ return C2U("com.sun.star.container.XEnumeration") == ServiceName;
+}
+
+uno::Sequence< OUString > SwXShapesEnumeration::getSupportedServiceNames(void) throw(uno::RuntimeException)
+{
+ 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());
+ return uno::Reference< container::XEnumeration >(
+ new SwXShapesEnumeration(this));
+}
/* -----------------------------06.04.00 13:14--------------------------------
---------------------------------------------------------------------------*/
@@ -899,8 +978,8 @@ sal_Int64 SAL_CALL SwXShape::getSomething( const uno::Sequence< sal_Int8 >& rId
*
* --------------------------------------------------*/
SwXShape::SwXShape(uno::Reference< uno::XInterface > & xShape) :
- aPropSet(aSwMapProvider.GetPropertyMap(PROPERTY_MAP_TEXT_SHAPE)),
- _pMap(aSwMapProvider.GetPropertyMap(PROPERTY_MAP_TEXT_SHAPE)),
+ m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_SHAPE)),
+ m_pPropertyMapEntries(aSwMapProvider.GetPropertyMapEntries(PROPERTY_MAP_TEXT_SHAPE)),
pImplementationId(0),
pImpl(new SwShapeDescriptor_Impl),
m_bDescriptor(sal_True)
@@ -1063,11 +1142,11 @@ uno::Reference< beans::XPropertySetInfo > SwXShape::getPropertySetInfo(void) th
uno::Reference< beans::XPropertySetInfo > xInfo = xPrSet->getPropertySetInfo();
// PropertySetInfo verlaengern!
const uno::Sequence<beans::Property> aPropSeq = xInfo->getProperties();
- aRet = new SfxExtItemPropertySetInfo( _pMap, aPropSeq );
+ aRet = new SfxExtItemPropertySetInfo( m_pPropertyMapEntries, aPropSeq );
}
}
if(!aRet.is())
- aRet = new SfxItemPropertySetInfo( _pMap );
+ aRet = m_pPropSet->getPropertySetInfo();
return aRet;
}
/*-- 22.01.99 11:42:27---------------------------------------------------
@@ -1080,20 +1159,19 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
{
vos::OGuard aGuard(Application::GetSolarMutex());
SwFrmFmt* pFmt = GetFrmFmt();
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(
- _pMap, rPropertyName);
+ const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName( rPropertyName );
if(xShapeAgg.is())
{
- if(pMap)
+ if(pEntry)
{
- if ( pMap->nFlags & beans::PropertyAttribute::READONLY)
+ if ( pEntry->nFlags & beans::PropertyAttribute::READONLY)
throw beans::PropertyVetoException ( rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
//mit Layout kann der Anker umgesetzt werden, ohne dass sich die Position aendert
if(pFmt)
{
SwAttrSet aSet(pFmt->GetAttrSet());
SwDoc* pDoc = pFmt->GetDoc();
- if(RES_ANCHOR == pMap->nWID && MID_ANCHOR_ANCHORFRAME == pMap->nMemberId)
+ if(RES_ANCHOR == pEntry->nWID && MID_ANCHOR_ANCHORFRAME == pEntry->nMemberId)
{
sal_Bool bDone = sal_True;
uno::Reference<text::XTextFrame> xFrame;
@@ -1111,7 +1189,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
SfxItemSet aItemSet( pDoc->GetAttrPool(),
RES_FRMATR_BEGIN, RES_FRMATR_END - 1 );
aItemSet.SetParent(&pFmt->GetAttrSet());
- SwFmtAnchor aAnchor = (const SwFmtAnchor&)aItemSet.Get(pMap->nWID);
+ SwFmtAnchor aAnchor = (const SwFmtAnchor&)aItemSet.Get(pEntry->nWID);
SwPosition aPos(*pFrame->GetFrmFmt()->GetCntnt().GetCntntIdx());
aAnchor.SetAnchor(&aPos);
aAnchor.SetType(FLY_AT_FLY);
@@ -1123,7 +1201,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
if(!bDone)
throw lang::IllegalArgumentException();
}
- else if(RES_OPAQUE == pMap->nWID)
+ else if(RES_OPAQUE == pEntry->nWID)
{
SvxShape* pSvxShape = GetSvxShape();
DBG_ASSERT(pSvxShape, "No SvxShape found!");
@@ -1148,7 +1226,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
}
// OD 2004-04-22 #i26791# - special handling for property FN_TEXT_RANGE
- else if ( FN_TEXT_RANGE == pMap->nWID )
+ else if ( FN_TEXT_RANGE == pEntry->nWID )
{
SwFmtAnchor aAnchor( static_cast<const SwFmtAnchor&>(aSet.Get( RES_ANCHOR )) );
if ( aAnchor.GetAnchorId() == FLY_PAGE )
@@ -1204,7 +1282,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
}
}
// --> OD 2004-08-06 #i28749#
- else if ( FN_SHAPE_POSITION_LAYOUT_DIR == pMap->nWID )
+ else if ( FN_SHAPE_POSITION_LAYOUT_DIR == pEntry->nWID )
{
sal_Int16 nPositionLayoutDir = 0;
aValue >>= nPositionLayoutDir;
@@ -1214,7 +1292,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
else if( pDoc->GetRootFrm() )
{
UnoActionContext aCtx(pDoc);
- if(RES_ANCHOR == pMap->nWID && MID_ANCHOR_ANCHORTYPE == pMap->nMemberId)
+ if(RES_ANCHOR == pEntry->nWID && MID_ANCHOR_ANCHORTYPE == pEntry->nMemberId)
{
SdrObject* pObj = pFmt->FindSdrObject();
SdrMarkList aList;
@@ -1227,15 +1305,15 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
}
else
{
- aPropSet.setPropertyValue(*pMap, aValue, aSet);
+ m_pPropSet->setPropertyValue(*pEntry, aValue, aSet);
pFmt->SetFmtAttr(aSet);
}
}
else
{
- aPropSet.setPropertyValue(*pMap, aValue, aSet);
+ m_pPropSet->setPropertyValue( *pEntry, aValue, aSet );
- if(RES_ANCHOR == pMap->nWID && MID_ANCHOR_ANCHORTYPE == pMap->nMemberId)
+ if(RES_ANCHOR == pEntry->nWID && MID_ANCHOR_ANCHORTYPE == pEntry->nMemberId)
{
bool bSetAttr = true;
sal_Int32 eNewAnchor = SWUnoHelper::GetEnumAsInt32( aValue );
@@ -1311,7 +1389,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
else
{
SfxPoolItem* pItem = 0;
- switch(pMap->nWID)
+ switch(pEntry->nWID)
{
case RES_ANCHOR:
pItem = pImpl->GetAnchor(sal_True);
@@ -1368,7 +1446,7 @@ void SwXShape::setPropertyValue(const rtl::OUString& rPropertyName, const uno::A
// <--
}
if(pItem)
- ((SfxPoolItem*)pItem)->PutValue(aValue, pMap->nMemberId);
+ ((SfxPoolItem*)pItem)->PutValue(aValue, pEntry->nMemberId);
}
}
else
@@ -1438,13 +1516,12 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
SwFrmFmt* pFmt = GetFrmFmt();
if(xShapeAgg.is())
{
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(
- _pMap, rPropertyName);
- if(pMap)
+ const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName( rPropertyName );
+ if(pEntry)
{
if(pFmt)
{
- if(RES_OPAQUE == pMap->nWID)
+ if(RES_OPAQUE == pEntry->nWID)
{
SvxShape* pSvxShape = GetSvxShape();
DBG_ASSERT(pSvxShape, "No SvxShape found!");
@@ -1458,7 +1535,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
aRet.setValue(&bOpaque, ::getBooleanCppuType());
}
}
- else if(FN_ANCHOR_POSITION == pMap->nWID)
+ else if(FN_ANCHOR_POSITION == pEntry->nWID)
{
SvxShape* pSvxShape = GetSvxShape();
DBG_ASSERT(pSvxShape, "No SvxShape found!");
@@ -1472,7 +1549,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
}
}
// OD 2004-04-22 #i26791# - special handling for FN_TEXT_RANGE
- else if ( FN_TEXT_RANGE == pMap->nWID )
+ else if ( FN_TEXT_RANGE == pEntry->nWID )
{
const SwFmtAnchor aAnchor = pFmt->GetAnchor();
if ( aAnchor.GetAnchorId() == FLY_PAGE )
@@ -1502,25 +1579,25 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
}
}
// --> OD 2004-08-06 #i28749#
- else if ( FN_SHAPE_TRANSFORMATION_IN_HORI_L2R == pMap->nWID )
+ else if ( FN_SHAPE_TRANSFORMATION_IN_HORI_L2R == pEntry->nWID )
{
// get property <::drawing::Shape::Transformation>
// without conversion to layout direction as below
aRet = _getPropAtAggrObj( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Transformation")) );
}
- else if ( FN_SHAPE_POSITION_LAYOUT_DIR == pMap->nWID )
+ else if ( FN_SHAPE_POSITION_LAYOUT_DIR == pEntry->nWID )
{
aRet <<= pFmt->GetPositionLayoutDir();
}
// <--
// --> OD 2004-10-28 #i36248#
- else if ( FN_SHAPE_STARTPOSITION_IN_HORI_L2R == pMap->nWID )
+ else if ( FN_SHAPE_STARTPOSITION_IN_HORI_L2R == pEntry->nWID )
{
// get property <::drawing::Shape::StartPosition>
// without conversion to layout direction as below
aRet = _getPropAtAggrObj( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StartPosition")) );
}
- else if ( FN_SHAPE_ENDPOSITION_IN_HORI_L2R == pMap->nWID )
+ else if ( FN_SHAPE_ENDPOSITION_IN_HORI_L2R == pEntry->nWID )
{
// get property <::drawing::Shape::EndPosition>
// without conversion to layout direction as below
@@ -1530,13 +1607,13 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
else
{
const SwAttrSet& rSet = pFmt->GetAttrSet();
- aRet = aPropSet.getPropertyValue(*pMap, rSet);
+ m_pPropSet->getPropertyValue(*pEntry, rSet, aRet);
}
}
else
{
SfxPoolItem* pItem = 0;
- switch(pMap->nWID)
+ switch(pEntry->nWID)
{
case RES_ANCHOR:
pItem = pImpl->GetAnchor();
@@ -1612,7 +1689,7 @@ uno::Any SwXShape::getPropertyValue(const rtl::OUString& rPropertyName)
// <--
}
if(pItem)
- pItem->QueryValue(aRet, pMap->nMemberId);
+ pItem->QueryValue(aRet, pEntry->nMemberId);
}
}
else
@@ -1725,23 +1802,22 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
uno::Reference< XPropertyState > xShapePrState;
for(sal_Int32 nProperty = 0; nProperty < aPropertyNames.getLength(); nProperty++)
{
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(
- _pMap, pNames[nProperty]);
- if(pMap)
+ const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName( pNames[nProperty] );
+ if(pEntry)
{
- if(RES_OPAQUE == pMap->nWID)
+ if(RES_OPAQUE == pEntry->nWID)
pRet[nProperty] = bFormControl ?
beans::PropertyState_DEFAULT_VALUE : beans::PropertyState_DIRECT_VALUE;
- else if(FN_ANCHOR_POSITION == pMap->nWID)
+ else if(FN_ANCHOR_POSITION == pEntry->nWID)
pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
- else if(FN_TEXT_RANGE == pMap->nWID)
+ else if(FN_TEXT_RANGE == pEntry->nWID)
pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
else if(bGroupMember)
pRet[nProperty] = beans::PropertyState_DEFAULT_VALUE;
else if(pFmt)
{
const SwAttrSet& rSet = pFmt->GetAttrSet();
- SfxItemState eItemState = rSet.GetItemState(pMap->nWID, FALSE);
+ SfxItemState eItemState = rSet.GetItemState(pEntry->nWID, FALSE);
if(SFX_ITEM_SET == eItemState)
pRet[nProperty] = beans::PropertyState_DIRECT_VALUE;
@@ -1753,7 +1829,7 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
else
{
SfxPoolItem* pItem = 0;
- switch(pMap->nWID)
+ switch(pEntry->nWID)
{
case RES_ANCHOR:
pItem = pImpl->GetAnchor();
@@ -1814,23 +1890,22 @@ void SwXShape::setPropertyToDefault( const rtl::OUString& rPropertyName )
SwFrmFmt* pFmt = GetFrmFmt();
if(xShapeAgg.is())
{
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(
- _pMap, rPropertyName);
- if(pMap)
+ const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName( rPropertyName );
+ if(pEntry)
{
- if ( pMap->nFlags & beans::PropertyAttribute::READONLY)
+ if ( pEntry->nFlags & beans::PropertyAttribute::READONLY)
throw uno::RuntimeException( rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
if(pFmt)
{
const SfxItemSet& rSet = pFmt->GetAttrSet();
- SfxItemSet aSet(pFmt->GetDoc()->GetAttrPool(), pMap->nWID, pMap->nWID);
+ SfxItemSet aSet(pFmt->GetDoc()->GetAttrPool(), pEntry->nWID, pEntry->nWID);
aSet.SetParent(&rSet);
- aSet.ClearItem(pMap->nWID);
+ aSet.ClearItem(pEntry->nWID);
pFmt->GetDoc()->SetAttr(aSet, *pFmt);
}
else
{
- switch(pMap->nWID)
+ switch(pEntry->nWID)
{
case RES_ANCHOR: pImpl->RemoveAnchor(); break;
case RES_HORI_ORIENT: pImpl->RemoveHOrient(); break;
@@ -1881,15 +1956,14 @@ uno::Any SwXShape::getPropertyDefault( const rtl::OUString& rPropertyName )
uno::Any aRet;
if(xShapeAgg.is())
{
- const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(
- _pMap, rPropertyName);
- if(pMap)
+ const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap()->getByName( rPropertyName );
+ if(pEntry)
{
- if(pMap->nWID < RES_FRMATR_END && pFmt)
+ if(pEntry->nWID < RES_FRMATR_END && pFmt)
{
const SfxPoolItem& rDefItem =
- pFmt->GetDoc()->GetAttrPool().GetDefaultItem(pMap->nWID);
- rDefItem.QueryValue(aRet, pMap->nMemberId);
+ pFmt->GetDoc()->GetAttrPool().GetDefaultItem(pEntry->nWID);
+ rDefItem.QueryValue(aRet, pEntry->nMemberId);
}
else
throw uno::RuntimeException();