From 6e33a9a2c9e3cb674c406727ceb378d84960abc4 Mon Sep 17 00:00:00 2001 From: Oliver Specht Date: Fri, 17 Nov 2000 13:25:35 +0000 Subject: SwXCell: TextSection property added --- sw/source/core/unocore/unotbl.cxx | 32 ++++++++++++++++++++++++++------ 1 file 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; } -- cgit v1.2.3