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 | ffa6c2520c51f7b1d575aab4232747dee8646058 (patch) | |
tree | 990516d934c13e151f60893a51b88eebd96491f4 /fpicker | |
parent | caa069a5f854ab2b53ad5bd8dbb314b668c233f1 (diff) | |
parent | 1813942ec2be139a3cd7992f9e25671b2280334c (diff) |
sb111: merged in DEV300_m71
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/office/fpsmartcontent.cxx | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/fpicker/source/office/fpsmartcontent.cxx b/fpicker/source/office/fpsmartcontent.cxx index 32a699895f..3ee5166fed 100644 --- a/fpicker/source/office/fpsmartcontent.cxx +++ b/fpicker/source/office/fpsmartcontent.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -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> @@ -127,7 +126,7 @@ namespace svt if (!m_xCmdEnv.is()) return IHT_NONE; - + return IHT_DEFAULT; } @@ -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& ) { |