summaryrefslogtreecommitdiff
path: root/fpicker/source/office/fpsmartcontent.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'fpicker/source/office/fpsmartcontent.cxx')
-rw-r--r--fpicker/source/office/fpsmartcontent.cxx31
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& )
{