diff options
author | Oliver Specht <os@openoffice.org> | 2000-11-17 13:25:35 +0000 |
---|---|---|
committer | Oliver Specht <os@openoffice.org> | 2000-11-17 13:25:35 +0000 |
commit | 6e33a9a2c9e3cb674c406727ceb378d84960abc4 (patch) | |
tree | ccc98b08acd340a5adc2f4f38fd4b890f06fe183 | |
parent | 11adca29577f11895d7bbd963e2e20cb7d4a326f (diff) |
SwXCell: TextSection property added
-rw-r--r-- | sw/source/core/unocore/unotbl.cxx | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 963721c26049..5ed5b335cc88 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unotbl.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: os $ $Date: 2000-11-17 14:06:06 $ + * last change: $Author: os $ $Date: 2000-11-17 14:25:35 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -998,15 +998,35 @@ void SwXCell::setPropertyValue(const OUString& rPropertyName, const uno::Any& aV /*-- 11.12.98 10:56:34--------------------------------------------------- -----------------------------------------------------------------------*/ -uno::Any SwXCell::getPropertyValue(const OUString& rPropertyName) throw( beans::UnknownPropertyException, WrappedTargetException, uno::RuntimeException ) +uno::Any SwXCell::getPropertyValue(const OUString& rPropertyName) + throw( beans::UnknownPropertyException, WrappedTargetException, uno::RuntimeException ) { vos::OGuard aGuard(Application::GetSolarMutex()); uno::Any aRet; if(IsValid()) { - SwFrmFmt* pBoxFmt = pBox->ClaimFrmFmt(); - const SwAttrSet& rSet = pBoxFmt->GetAttrSet(); - aRet = aPropSet.getPropertyValue(rPropertyName, rSet); + if(rPropertyName.equalsAsciiL( + UNO_NAME_TEXT_SECTION.pName, UNO_NAME_TEXT_SECTION.nNameLen)) + { + SwFrmFmt* pTblFmt = GetFrmFmt(); + SwDoc* pDoc = pTblFmt->GetDoc(); + SwTable* pTable = SwTable::FindTable( pTblFmt ); + SwTableNode* pTblNode = pTable->GetTableNode(); + SwSectionNode* pSectionNode = pTblNode->FindSectionNode(); + if(pSectionNode) + { + const SwSection& rSect = pSectionNode->GetSection(); + Reference< XTextSection > xSect = + SwXTextSections::GetObject( *rSect.GetFmt() ); + aRet <<= xSect; + } + } + else + { + SwFrmFmt* pBoxFmt = pBox->ClaimFrmFmt(); + const SwAttrSet& rSet = pBoxFmt->GetAttrSet(); + aRet = aPropSet.getPropertyValue(rPropertyName, rSet); + } } return aRet; } |