From 93551bdf06411cbb37acf68192c94a41c146a03c Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Wed, 6 Jan 2010 16:46:36 +0100 Subject: #i61429# - Adapted UCB clients to deprecated XContentCreator interface. --- fpicker/source/office/fpsmartcontent.cxx | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) (limited to 'fpicker') diff --git a/fpicker/source/office/fpsmartcontent.cxx b/fpicker/source/office/fpsmartcontent.cxx index 34be031fdf6e..3ee5166fed9b 100644 --- a/fpicker/source/office/fpsmartcontent.cxx +++ b/fpicker/source/office/fpsmartcontent.cxx @@ -33,14 +33,13 @@ #include "fpsmartcontent.hxx" /** === begin UNO includes === **/ -#include #include +#include #include +#include /** === end UNO includes === **/ -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include -#endif #include #include #include @@ -282,25 +281,21 @@ namespace svt sal_Bool bRet = sal_False; try { - Reference< XContentCreator > xCreator = Reference< XContentCreator >( m_pContent->get(), UNO_QUERY ); - if ( xCreator.is() ) + Sequence< ContentInfo > aInfo = m_pContent->queryCreatableContentsInfo(); + const ContentInfo* pInfo = aInfo.getConstArray(); + sal_Int32 nCount = aInfo.getLength(); + for ( sal_Int32 i = 0; i < nCount; ++i, ++pInfo ) { - Sequence< ContentInfo > aInfo = xCreator->queryCreatableContentsInfo(); - const ContentInfo* pInfo = aInfo.getConstArray(); - sal_Int32 nCount = aInfo.getLength(); - for ( sal_Int32 i = 0; i < nCount; ++i, ++pInfo ) + // Simply look for the first KIND_FOLDER... + if ( pInfo->Attributes & ContentInfoAttribute::KIND_FOLDER ) { - // Simply look for the first KIND_FOLDER... - if ( pInfo->Attributes & ContentInfoAttribute::KIND_FOLDER ) - { - bRet = sal_True; - break; - } + bRet = sal_True; + break; } - - // now we're definately valid - m_eState = VALID; } + + // now we're definately valid + m_eState = VALID; } catch( Exception& ) { -- cgit