diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Sun.COM> | 2010-02-03 15:34:13 +0100 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Sun.COM> | 2010-02-03 15:34:13 +0100 |
commit | 97e7595c5083e66680bbb84cbffad9a2737e1139 (patch) | |
tree | b8802a850069e4b3144ba94023d71a3b6859b93d /fpicker | |
parent | rebase to DEV300m70 (diff) | |
parent | CWS-TOOLING: integrate CWS l10ntools (diff) | |
download | core-97e7595c5083e66680bbb84cbffad9a2737e1139.tar.gz core-97e7595c5083e66680bbb84cbffad9a2737e1139.zip |
merge with 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& ) { |