diff options
author | sb <sb@openoffice.org> | 2010-02-05 09:17:48 +0100 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-02-05 09:17:48 +0100 |
commit | 0210a8d911856ff3206bea7d2640f4690b162799 (patch) | |
tree | 7787c46db295e13ee6892cef14d22571f8b73d7c /fpicker | |
parent | b2953f29a427012bfdc92ba662cb773cf213aa1a (diff) | |
parent | 3c550e9f7bdd8c9f1f75f4148f516ddc94290f92 (diff) |
sb111: merged in DEV300_m71
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/office/fpsmartcontent.cxx | 31 |
1 files changed, 13 insertions, 18 deletions
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 <com/sun/star/ucb/XContentCreator.hpp> #include <com/sun/star/container/XChild.hpp> +#include <com/sun/star/ucb/ContentInfo.hpp> #include <com/sun/star/ucb/ContentInfoAttribute.hpp> +#include <com/sun/star/ucb/XContent.hpp> /** === end UNO includes === **/ -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> -#endif #include <ucbhelper/commandenvironment.hxx> #include <tools/solar.h> #include <tools/debug.hxx> @@ -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& ) { |