27#include <com/sun/star/beans/XPropertySet.hpp>
28#include <com/sun/star/embed/XStorage.hpp>
37 maFilterName(
std::move(aFilterName)),
38 maProvider(
std::move(aProvider)),
47 std::u16string_view rWildCard,
53 OUString _aServiceName,
55 aWildCard(rWildCard,
';'),
56 aTypeName(
std::move(aTypNm)),
57 aUserData(
std::move(aUsrDat)),
68 sal_Int32 nLen{ aExts.getLength() };
78 const sal_Int32 nIdx{ aExts.indexOf(
";;") };
81 else if (aExts[nLen-1]==
';')
83 if (nLen<aExts.getLength())
100 aRet = aRet.replaceAll(
"*.",
"" );
101 aRet = aRet.replaceAll(
";",
"," );
123 const char* pType=
nullptr;
124 if ( rStg.
IsStream(
"WordDocument" ) )
127 pType =
"writer_MS_Word_97";
129 pType =
"writer_MS_Word_95";
133 pType =
"calc_MS_Excel_95";
135 else if ( rStg.
IsStream(
"Workbook" ) )
137 pType =
"calc_MS_Excel_97";
139 else if ( rStg.
IsStream(
"PowerPoint Document" ) )
141 pType =
"impress_MS_PowerPoint_97";
143 else if ( rStg.
IsStream(
"Equation Native" ) )
145 pType =
"math_MathType_3x";
150 if ( nClipId != SotClipboardFormatId::NONE )
154 return pFilter->GetTypeName();
158 return pType ? OUString::createFromAscii(pType) : OUString();
162 const uno::Reference<embed::XStorage>& xStorage )
166 css::uno::Reference< css::beans::XPropertySet > xProps( xStorage, css::uno::UNO_QUERY );
170 xProps->getPropertyValue(
"MediaType") >>= aMediaType;
171 if ( !aMediaType.isEmpty() )
173 css::datatransfer::DataFlavor aDataFlavor;
174 aDataFlavor.MimeType = aMediaType;
176 if ( nClipId != SotClipboardFormatId::NONE )
191 return pFilter->GetTypeName();
const sal_uInt16 nVersion
static SAL_DLLPRIVATE std::shared_ptr< const SfxFilter > GetDefaultFilter_Impl(std::u16string_view)
std::shared_ptr< const SfxFilter > GetFilter4FilterName(const OUString &rName, SfxFilterFlags nMust=SfxFilterFlags::NONE, SfxFilterFlags nDont=SFX_FILTER_NOTINSTALLED) const
std::shared_ptr< const SfxFilter > GetFilter4ClipBoardId(SotClipboardFormatId nId, SfxFilterFlags nMust=SfxFilterFlags::IMPORT, SfxFilterFlags nDont=SFX_FILTER_NOTINSTALLED) const
SfxFilter(OUString aProvider, OUString aFilterName)
static std::shared_ptr< const SfxFilter > GetDefaultFilter(std::u16string_view rName)
SotClipboardFormatId GetFormat() const
OUString GetSuffixes() const
static std::shared_ptr< const SfxFilter > GetDefaultFilterFromFactory(const OUString &rServiceName)
static std::shared_ptr< const SfxFilter > GetFilterByName(const OUString &rName)
const WildCard & GetWildcard() const
OUString GetDefaultExtension() const
static OUString GetTypeFromStorage(const SotStorage &rStg)
static OUString GetServiceNameFromFactory(const OUString &rFact)
static SotClipboardFormatId GetFormat(const css::datatransfer::DataFlavor &rFlavor)
bool IsStream(const OUString &rEleName) const
const OUString & getGlob() const
void setGlob(std::u16string_view rString)
#define SFX_FILTER_NOTINSTALLED
const sal_Unicode *const aMimeType[]