diff options
Diffstat (limited to 'sw/source/ui/uno/unotxdoc.cxx')
-rw-r--r-- | sw/source/ui/uno/unotxdoc.cxx | 69 |
1 files changed, 32 insertions, 37 deletions
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 9479350620b3..ed997c6392ba 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -329,7 +329,7 @@ SwXTextDocument::SwXTextDocument(SwDocShell* pShell) : aRefreshCont ( static_cast < XTextDocument* > ( this ) ), - aPropSet(aSwMapProvider.GetPropertyMap(PROPERTY_MAP_TEXT_DOCUMENT)), + pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_DOCUMENT)), pDocShell(pShell), @@ -1942,7 +1942,7 @@ Reference< XIndexAccess > SwXTextDocument::getDocumentIndexes(void) throw( Runt -----------------------------------------------------------------------*/ Reference< XPropertySetInfo > SwXTextDocument::getPropertySetInfo(void) throw( RuntimeException ) { - static Reference< XPropertySetInfo > xRet = aPropSet.getPropertySetInfo(); + static Reference< XPropertySetInfo > xRet = pPropSet->getPropertySetInfo(); return xRet; } /*-- 10.05.99 13:58:58--------------------------------------------------- @@ -1956,14 +1956,13 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, ::vos::OGuard aGuard(Application::GetSolarMutex()); if(!IsValid()) throw RuntimeException(); - const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName( - aPropSet.getPropertyMap(), rPropertyName); + const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap()->getByName( rPropertyName); - if(!pMap) + if(!pEntry) throw UnknownPropertyException(); - if(pMap->nFlags & PropertyAttribute::READONLY) + if(pEntry->nFlags & PropertyAttribute::READONLY) throw PropertyVetoException(); - switch(pMap->nWID) + switch(pEntry->nWID) { case WID_DOC_CHAR_COUNT : case WID_DOC_PARA_COUNT : @@ -1981,14 +1980,14 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, { sal_Bool bSet = *(sal_Bool*)aValue.getValue(); sal_uInt16 eMode = pDocShell->GetDoc()->GetRedlineMode(); - if(WID_DOC_CHANGES_SHOW == pMap->nWID) + if(WID_DOC_CHANGES_SHOW == pEntry->nWID) { eMode &= ~(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE); eMode |= nsRedlineMode_t::REDLINE_SHOW_INSERT; if( bSet ) eMode |= nsRedlineMode_t::REDLINE_SHOW_DELETE; } - else if(WID_DOC_CHANGES_RECORD == pMap->nWID) + else if(WID_DOC_CHANGES_RECORD == pEntry->nWID) { eMode = bSet ? eMode|nsRedlineMode_t::REDLINE_ON : eMode&~nsRedlineMode_t::REDLINE_ON; } @@ -2118,9 +2117,9 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, default: { - const SfxPoolItem& rItem = pDocShell->GetDoc()->GetDefault(pMap->nWID); + const SfxPoolItem& rItem = pDocShell->GetDoc()->GetDefault(pEntry->nWID); SfxPoolItem* pNewItem = rItem.Clone(); - pNewItem->PutValue(aValue, pMap->nMemberId); + pNewItem->PutValue(aValue, pEntry->nMemberId); pDocShell->GetDoc()->SetDefault(*pNewItem); delete pNewItem; } @@ -2135,13 +2134,12 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName) ::vos::OGuard aGuard(Application::GetSolarMutex()); if(!IsValid()) throw RuntimeException(); - const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName( - aPropSet.getPropertyMap(), rPropertyName); + const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap()->getByName( rPropertyName); - if(!pMap) + if(!pEntry) throw UnknownPropertyException(); Any aAny; - switch(pMap->nWID) + switch(pEntry->nWID) { case WID_DOC_CHAR_COUNT : case WID_DOC_PARA_COUNT : @@ -2151,7 +2149,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName) if(aStat.bModified) pDocShell->GetDoc()->UpdateDocStat( aStat ); sal_Int32 nValue; - switch(pMap->nWID) + switch(pEntry->nWID) { case WID_DOC_CHAR_COUNT :nValue = aStat.nChar;break; case WID_DOC_PARA_COUNT :nValue = aStat.nPara;break; @@ -2170,12 +2168,12 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName) { sal_uInt16 eMode = pDocShell->GetDoc()->GetRedlineMode(); sal_Bool bSet = sal_False; - if(WID_DOC_CHANGES_SHOW == pMap->nWID) + if(WID_DOC_CHANGES_SHOW == pEntry->nWID) { sal_uInt16 nMask = nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE; bSet = (eMode & nMask) == nMask; } - else if(WID_DOC_CHANGES_RECORD == pMap->nWID) + else if(WID_DOC_CHANGES_RECORD == pEntry->nWID) { bSet = (eMode& nsRedlineMode_t::REDLINE_ON) != 0; } @@ -2273,8 +2271,8 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName) default: { - const SfxPoolItem& rItem = pDocShell->GetDoc()->GetDefault(pMap->nWID); - rItem.QueryValue(aAny, pMap->nMemberId); + const SfxPoolItem& rItem = pDocShell->GetDoc()->GetDefault(pEntry->nWID); + rItem.QueryValue(aAny, pEntry->nMemberId); } } return aAny; @@ -2397,13 +2395,12 @@ PropertyState SAL_CALL SwXTextDocument::getPropertyState( const OUString& rPrope PropertyState eRet = PropertyState_DIRECT_VALUE; if(!IsValid()) throw RuntimeException(); - const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName( - aPropSet.getPropertyMap(), rPropertyName); + const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap()->getByName( rPropertyName); - if(!pMap) + if(!pEntry) throw UnknownPropertyException(); Any aAny; - switch(pMap->nWID) + switch(pEntry->nWID) { case 0:default:break; } @@ -2428,11 +2425,10 @@ void SAL_CALL SwXTextDocument::setPropertyToDefault( const OUString& rPropertyNa ::vos::OGuard aGuard(Application::GetSolarMutex()); if(!IsValid()) throw RuntimeException(); - const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName( - aPropSet.getPropertyMap(), rPropertyName); - if(!pMap) + const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap()->getByName( rPropertyName); + if(!pEntry) throw UnknownPropertyException(); - switch(pMap->nWID) + switch(pEntry->nWID) { case 0:default:break; } @@ -2443,12 +2439,11 @@ Any SAL_CALL SwXTextDocument::getPropertyDefault( const OUString& rPropertyName ::vos::OGuard aGuard(Application::GetSolarMutex()); if(!IsValid()) throw RuntimeException(); - const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName( - aPropSet.getPropertyMap(), rPropertyName); - if(!pMap) + const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMap()->getByName( rPropertyName); + if(!pEntry) throw UnknownPropertyException(); Any aAny; - switch(pMap->nWID) + switch(pEntry->nWID) { case 0:default:break; } @@ -3253,7 +3248,7 @@ Sequence< OUString > SwXLinkTargetSupplier::getSupportedServiceNames(void) SwXLinkNameAccessWrapper::SwXLinkNameAccessWrapper( Reference< XNameAccess > xAccess, const String& rLinkDisplayName, String sSuffix ) : xRealAccess(xAccess), - aPropSet(aSwMapProvider.GetPropertyMap(PROPERTY_MAP_LINK_TARGET)), + pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_LINK_TARGET)), sLinkSuffix(sSuffix), sLinkDisplayName(rLinkDisplayName), pxDoc(0) @@ -3264,7 +3259,7 @@ SwXLinkNameAccessWrapper::SwXLinkNameAccessWrapper( --------------------------------------------------*/ SwXLinkNameAccessWrapper::SwXLinkNameAccessWrapper(SwXTextDocument& rxDoc, const String& rLinkDisplayName, String sSuffix) : - aPropSet(aSwMapProvider.GetPropertyMap(PROPERTY_MAP_LINK_TARGET)), + pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_LINK_TARGET)), sLinkSuffix(sSuffix), sLinkDisplayName(rLinkDisplayName), xDoc(&rxDoc), @@ -3442,7 +3437,7 @@ sal_Bool SwXLinkNameAccessWrapper::hasElements(void) throw( RuntimeException ) Reference< XPropertySetInfo > SwXLinkNameAccessWrapper::getPropertySetInfo(void) throw( RuntimeException ) { - static Reference< XPropertySetInfo > xRet = aPropSet.getPropertySetInfo(); + static Reference< XPropertySetInfo > xRet = pPropSet->getPropertySetInfo(); return xRet; } /*-- 26.10.99 09:16:26--------------------------------------------------- @@ -3583,7 +3578,7 @@ Sequence< OUString > SwXLinkNameAccessWrapper::getSupportedServiceNames(void) --------------------------------------------------*/ SwXOutlineTarget::SwXOutlineTarget(const String& rOutlineText) : - aPropSet(aSwMapProvider.GetPropertyMap(PROPERTY_MAP_LINK_TARGET)), + pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_LINK_TARGET)), sOutlineText(rOutlineText) { } @@ -3598,7 +3593,7 @@ SwXOutlineTarget::~SwXOutlineTarget() -----------------------------------------------------------------------*/ Reference< XPropertySetInfo > SwXOutlineTarget::getPropertySetInfo(void) throw( RuntimeException ) { - static Reference< XPropertySetInfo > xRet = aPropSet.getPropertySetInfo(); + static Reference< XPropertySetInfo > xRet = pPropSet->getPropertySetInfo(); return xRet; } /*-- 26.10.99 15:51:46--------------------------------------------------- |