diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2007-01-30 14:23:24 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2007-01-30 14:23:24 +0000 |
commit | 4948380a214daa55a1349780fcb5dba5981cbf4e (patch) | |
tree | 7ee4949c10de117cf88baaa15af872d33f57e752 /sw/source/core/unocore/unoport.cxx | |
parent | c5a96063c525e71991ae8ec7889acfe7d0b6566d (diff) |
INTEGRATION: CWS tl25 (1.35.16); FILE MERGED
2006/11/10 08:56:58 tl 1.35.16.3: #i69366# merge conflict solved
2006/11/08 23:44:37 tl 1.35.16.2: RESYNC: (1.35-1.36); FILE MERGED
2006/09/13 12:56:48 tl 1.35.16.1: #i69366# SwXTextPortion does not try to check for support of some service anymore. This is because a previous change in handling of those objects
Diffstat (limited to 'sw/source/core/unocore/unoport.cxx')
-rw-r--r-- | sw/source/core/unocore/unoport.cxx | 58 |
1 files changed, 2 insertions, 56 deletions
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index 7b1921441949..b799436b0bc2 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -4,9 +4,9 @@ * * $RCSfile: unoport.cxx,v $ * - * $Revision: 1.36 $ + * $Revision: 1.37 $ * - * last change: $Author: obo $ $Date: 2006-09-16 21:59:02 $ + * last change: $Author: rt $ $Date: 2007-01-30 15:23:24 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1086,32 +1086,7 @@ sal_Bool SwXTextPortion::supportsService(const OUString& rServiceName) throw( un bRet = sal_True; else if(COMPARE_EQUAL == rServiceName.compareToAscii("com.sun.star.text.TextField")) bRet = 0 != GetFldFmt(); - else - { - SwFrmFmt* pCurFrmFmt = pFrameFmt; - if(!pCurFrmFmt && !pUnoCrsr->HasMark() && pUnoCrsr->GetCntntNode()->Len()) - { - // hier die zeichengebundenen am Cursor suchen - hier kann es nur einen geben - SwTxtAttr* pTxtAttr = pUnoCrsr->GetNode()->GetTxtNode()->GetTxtAttr( - pUnoCrsr->GetPoint()->nContent, RES_TXTATR_FLYCNT); - DBG_ASSERT(pTxtAttr, "Hier muss doch ein Fly-Attribut zu finden sein!") - if(pTxtAttr) - { - const SwFmtFlyCnt& rFlyCnt = pTxtAttr->GetFlyCnt(); - pCurFrmFmt = rFlyCnt.GetFrmFmt(); - } - } - if(pCurFrmFmt) - { - const SwNodeIndex* pIdx = pCurFrmFmt->GetCntnt().GetCntntIdx(); - const SwNode* pNd = GetCrsr()->GetDoc()->GetNodes()[ pIdx->GetIndex() + 1 ]; - if((!pNd->IsNoTxtNode() && COMPARE_EQUAL == rServiceName.compareToAscii("com.sun.star.text.TextFrame"))|| - (pNd->IsGrfNode() && COMPARE_EQUAL == rServiceName.compareToAscii("com.sun.star.text.TextGraphicObject")) || - (pNd->IsOLENode() && COMPARE_EQUAL == rServiceName.compareToAscii("com.sun.star.text.TextEmbeddedObject"))) - bRet = sal_True; - } - } return bRet; } /* --------------------------------------------------------------------------- @@ -1137,35 +1112,6 @@ uno::Sequence< OUString > SwXTextPortion::getSupportedServiceNames(void) pArray[6] = C2U("com.sun.star.style.ParagraphPropertiesComplex"); if(bField) pArray[7] = C2U("com.sun.star.text.TextField"); - else - { - SwFrmFmt* pCurFrmFmt = pFrameFmt; - if(!pCurFrmFmt && !pUnoCrsr->HasMark()) - { - // hier die zeichengebundenen am Cursor suchen - hier kann es nur einen geben - SwTxtAttr* pTxtAttr = pUnoCrsr->GetNode()->GetTxtNode()->GetTxtAttr( - pUnoCrsr->GetPoint()->nContent, RES_TXTATR_FLYCNT); - // if any - it could also be an empty paragraph - if(pTxtAttr) - { - const SwFmtFlyCnt& rFlyCnt = pTxtAttr->GetFlyCnt(); - pCurFrmFmt = rFlyCnt.GetFrmFmt(); - } - } - if(pCurFrmFmt) - { - aRet.realloc(8); - pArray = aRet.getArray(); - const SwNodeIndex* pIdx = pCurFrmFmt->GetCntnt().GetCntntIdx(); - const SwNode* pNd = GetCrsr()->GetDoc()->GetNodes()[ pIdx->GetIndex() + 1 ]; - if(!pNd->IsNoTxtNode()) - pArray[7] = C2U("com.sun.star.text.TextFrame"); - else if(pNd->IsGrfNode()) - pArray[7] = C2U("com.sun.star.text.TextGraphicObject"); - else - pArray[7] = C2U("com.sun.star.text.TextEmbeddedObject"); - } - } return aRet; } /*-- 11.12.98 09:57:01--------------------------------------------------- |