diff options
3 files changed, 116 insertions, 15 deletions
diff --git a/svtools/source/filter.vcl/filter/FilterConfigCache.cxx b/svtools/source/filter.vcl/filter/FilterConfigCache.cxx index 75b1b6749193..870601010bb7 100644 --- a/svtools/source/filter.vcl/filter/FilterConfigCache.cxx +++ b/svtools/source/filter.vcl/filter/FilterConfigCache.cxx @@ -2,9 +2,9 @@ * * $RCSfile: FilterConfigCache.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: sj $ $Date: 2001-03-28 15:17:08 $ + * last change: $Author: sj $ $Date: 2001-04-25 09:19:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -68,6 +68,8 @@ #ifndef _TOOLS_DEBUG_HXX #include <tools/debug.hxx> #endif + +#ifndef SVX_LIGHT #ifndef _COM_SUN_STAR_UNO_ANY_H_ #include <com/sun/star/uno/Any.h> #endif @@ -91,6 +93,7 @@ using namespace ::com::sun::star::container ; // XNameAccess using namespace ::com::sun::star::uno ; // Reference using namespace ::com::sun::star::beans ; // PropertyValue using namespace ::utl ; // getProcessServiceFactory(); +#endif SVX_LIGHT using namespace ::rtl ; const char* FilterConfigCache::FilterConfigCacheEntry::InternalPixelFilterNameList[] = @@ -141,15 +144,7 @@ sal_Bool FilterConfigCache::FilterConfigCacheEntry::CreateFilterName( const OUSt return sFilterName.Len() != 0; } -FilterConfigCache::FilterConfigCache() -{ - ImplInit(); -} - -FilterConfigCache::~FilterConfigCache() -{ - -} +#ifndef SVX_LIGHT sal_Bool FilterConfigCache::ImplIsOwnFilter( const Sequence< PropertyValue >& rFilterProperties ) { @@ -310,8 +305,94 @@ void FilterConfigCache::ImplInit() } }; +#else // SVX_LIGHT + +const char* FilterConfigCache::InternalFilterListForSvxLight[] = +{ + "bmp","1","SVBMP", + "bmp","2","SVBMP", + "dxf","1","idx", + "eps","1","ips", + "eps","2","eps", + "gif","1","SVIGIF", + "gif","2","egi", + "jpg","1","SVIJPEG", + "jpg","2","SVEJPEG", + "sgv","1","SVSGV", + "sgf","1","SVSGF", + "met","1","ime", + "met","2","eme", + "png","1","SVIPNG", + "png","2","epn", + "pct","1","ipt", + "pct","2","ept", + "pcd","1","icd", + "psd","1","ipd", + "pcx","1","ipx", + "pbm","1","ipb", + "pbm","2","epb", + "pgm","1","ipb", + "pgm","2","epg", + "ppm","1","ipb", + "ppm","2","epp", + "ras","1","ira", + "ras","2","era", + "svm","1","SVMETAFILE", + "svm","2","SVMETAFILE", + "tga","1","itg", + "tif","1","iti", + "tif","2","eti", + "emf","1","SVEMF", + "emf","2","SVEMF", + "wmf","1","SVWMF", + "wmf","2","SVWMF", + "xbm","1","SVIXBM", + "xpm","1","SVIXPM", + "xpm","2","exp", + "svg","2","SVESVG", + NULL +}; + +void FilterConfigCache::ImplInit() +{ + const char** pPtr; + for ( pPtr = InternalFilterListForSvxLight; *pPtr; pPtr++ ) + { + FilterConfigCacheEntry aEntry; + + OUString sExtension( RTL_CONSTASCII_USTRINGPARAM( *pPtr++ ) ); + + aEntry.sType = sExtension; + aEntry.sUIName = sExtension; + + ByteString sFlags( RTL_CONSTASCII_USTRINGPARAM( *pPtr++ ) ); + aEntry.nFlags = sFlags.ToInt32(); + + OUString sUserData( RTL_CONSTASCII_USTRINGPARAM( *pPtr ) ); + aEntry.CreateFilterName( sUserData ); + + aEntry.sExtension = sExtension; + if ( aEntry.nFlags & 1 ) + aImport.push_back( aEntry ); + if ( aEntry.nFlags & 2 ) + aExport.push_back( aEntry ); + } +} + +#endif + // ------------------------------------------------------------------------ +FilterConfigCache::FilterConfigCache() +{ + ImplInit(); +} + +FilterConfigCache::~FilterConfigCache() +{ + +} + String FilterConfigCache::GetImportFilterName( sal_uInt16 nFormat ) { CacheVector::iterator aIter( aImport.begin() + nFormat ); diff --git a/svtools/source/filter.vcl/filter/FilterConfigCache.hxx b/svtools/source/filter.vcl/filter/FilterConfigCache.hxx index 466a067ced74..9298978d0bc5 100644 --- a/svtools/source/filter.vcl/filter/FilterConfigCache.hxx +++ b/svtools/source/filter.vcl/filter/FilterConfigCache.hxx @@ -2,9 +2,9 @@ * * $RCSfile: FilterConfigCache.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: sj $ $Date: 2001-03-28 15:17:04 $ + * last change: $Author: sj $ $Date: 2001-04-25 09:19:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -65,6 +65,8 @@ #ifndef _STRING_HXX #include <tools/string.hxx> #endif + +#ifndef SVX_LIGHT #ifndef _COM_SUN_STAR_UNO_SEQUENCE_H_ #include <com/sun/star/uno/Sequence.h> #endif @@ -77,6 +79,8 @@ #ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_ #include <com/sun/star/container/XNameAccess.hpp> #endif +#endif // SVX_LIGHT + #include <vector> class FilterConfigCache @@ -113,12 +117,17 @@ class FilterConfigCache CacheVector aImport; CacheVector aExport; +#ifndef SVX_LIGHT + sal_Bool ImplIsOwnFilter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rFilterProperties ); sal_Bool ImplAddFilterEntry( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rFilterProperties, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xTypeAccess ); +#else + static const char* InternalFilterListForSvxLight[]; +#endif void ImplInit(); diff --git a/svtools/source/filter.vcl/filter/FilterConfigItem.cxx b/svtools/source/filter.vcl/filter/FilterConfigItem.cxx index 5861268e4354..c09bfdf18025 100644 --- a/svtools/source/filter.vcl/filter/FilterConfigItem.cxx +++ b/svtools/source/filter.vcl/filter/FilterConfigItem.cxx @@ -2,9 +2,9 @@ * * $RCSfile: FilterConfigItem.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: sj $ $Date: 2001-03-08 13:46:54 $ + * last change: $Author: sj $ $Date: 2001-04-25 09:17:53 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,6 +62,8 @@ #ifndef _FILTER_CONFIG_ITEM_HXX_ #include "FilterConfigItem.hxx" #endif + +#ifndef SVX_LIGHT #include <tools/debug.hxx> #ifndef _UTL_CONFIGMGR_HXX_ #include <unotools/configmgr.hxx> @@ -413,4 +415,13 @@ void FilterConfigItem::WriteSize( const OUString& rKey, const Size& rNewValue ) } } +#else + +FilterConfigItem::FilterConfigItem( const ::rtl::OUString& rSubTree ) +{ +}; + +#endif // SVX_LIGHT + + // ------------------------------------------------------------------------ |