22#include <com/sun/star/beans/PropertyValue.hpp>
24#include <com/sun/star/io/XInputStream.hpp>
25#include <com/sun/star/ucb/ContentCreationException.hpp>
26#include <com/sun/star/uno/XComponentContext.hpp>
54 OUString aTypeName = aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_TYPENAME, OUString() );
55 uno::Reference< io::XInputStream > xInStream ( aMediaDesc[MediaDescriptor::PROP_INPUTSTREAM], uno::UNO_QUERY );
56 if ( !xInStream.is() )
64 if ( !pInStrm || pInStrm->
GetError() )
67 if ( aTypeName.startsWith(
"impress_MS_PowerPoint_97" ) )
80 if ( !aStorage->GetError() && aStorage->IsStream(
"PowerPoint Document" ) )
83 catch (
const css::ucb::ContentCreationException&)
91 const OUString aFileName( aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_URL, OUString() ) );
96 if( aCheckURL.
getExtension().equalsIgnoreAsciiCase(
"cgm") )
101 if ( ( n8 & 0xf0 ) == 0 )
104 return "impress_CGM_Computer_Graphics_Metafile";
113 if ( aShortName.equalsIgnoreAsciiCase(
"PCD" ) )
116 if ( aTypeName ==
"pcd_Photo_CD_Base4" )
118 else if ( aTypeName ==
"pcd_Photo_CD_Base16" )
120 FilterConfigItem aFilterConfigItem(
u"Office.Common/Filter/Graphic/Import/PCD" );
121 aFilterConfigItem.
WriteInt32(
"Resolution" , nBase );
127 return pFilter->GetRealTypeName();
137 return "com.sun.star.comp.draw.FormatDetector";
149 return {
"com.sun.star.frame.ExtendedTypeDetection" };
153extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
155 css::uno::Sequence<css::uno::Any>
const &)
constexpr OUStringLiteral sServiceName
void WriteInt32(const OUString &rKey, sal_Int32 nValue)
static OUString GetImportFormatShortName(GraphicFileFormat nFormat)
bool Detect(bool bExtendedInfo=false)
GraphicFileFormat GetFileFormat() const
static GraphicFilter & GetGraphicFilter()
sal_uInt16 GetImportFormatNumberForShortName(std::u16string_view rShortName)
OUString GetImportFormatTypeName(sal_uInt16 nFormat)
OUString getExtension(sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true, DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL supportsService(const OUString &sServiceName) override
virtual ~SdFilterDetect() override
virtual OUString SAL_CALL detect(css::uno::Sequence< css::beans::PropertyValue > &lDescriptor) override
virtual OUString SAL_CALL getImplementationName() override
std::shared_ptr< const SfxFilter > GetFilter4FilterName(const OUString &rName, SfxFilterFlags nMust=SfxFilterFlags::NONE, SfxFilterFlags nDont=SFX_FILTER_NOTINSTALLED) const
void setStreamToLoadFrom(const css::uno::Reference< css::io::XInputStream > &xInputStream, bool bIsReadOnly)
void UseInteractionHandler(bool)
sal_uInt64 Seek(sal_uInt64 nPos)
sal_uInt64 remainingSize()
SvStream & ReadUChar(unsigned char &rChar)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_draw_FormatDetector_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
#define STREAM_SEEK_TO_BEGIN