summaryrefslogtreecommitdiff
path: root/vcl/source/filter
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2013-01-02 22:07:41 +0100
committerPetr Mladek <pmladek@suse.cz>2013-01-08 16:12:45 +0100
commit9dc87d40c88e4ff13cb124b356f648aebff9b3a3 (patch)
tree40eaf53907b3ba8899a99bf21f6626445533f297 /vcl/source/filter
parent3a571a93df6dc4be855ac5c6433f28e57531fae5 (diff)
Make LO buildable again after the GraphicFilter move.
Conflicts: svtools/Library_svt.mk q# Change-Id: I3455a7294b136400f32163626d5a7a7f2bfa898c Signed-off-by: Cor Nouws <oolst@nouenoff.nl> Signed-off-by: Olivier Hallot <olivier.hallot@documentfoundation.org> Signed-off-by: Adolfo Jayme Barrientos <fitoschido@ubuntu.com> Signed-off-by: Michael Meeks <michael.meeks@suse.com>
Diffstat (limited to 'vcl/source/filter')
-rw-r--r--vcl/source/filter/FilterConfigCache.cxx5
-rw-r--r--vcl/source/filter/FilterConfigCache.hxx183
-rw-r--r--vcl/source/filter/FilterConfigItem.cxx2
-rw-r--r--vcl/source/filter/graphicfilter.cxx89
-rw-r--r--vcl/source/filter/graphicfilter2.cxx3
-rw-r--r--vcl/source/filter/jpeg/jpeg.cxx8
-rw-r--r--vcl/source/filter/jpeg/jpegc.c4
-rw-r--r--vcl/source/filter/sgvmain.cxx2
-rw-r--r--vcl/source/filter/sgvtext.cxx2
-rw-r--r--vcl/source/filter/wmf/winwmf.cxx2
-rw-r--r--vcl/source/filter/wmf/wmf.cxx2
11 files changed, 125 insertions, 177 deletions
diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx
index dc4b7c740cdf..705daed4f783 100644
--- a/vcl/source/filter/FilterConfigCache.cxx
+++ b/vcl/source/filter/FilterConfigCache.cxx
@@ -18,20 +18,21 @@
*/
#include "FilterConfigCache.hxx"
-#include <svtools/filter.hxx>
+
+#include <vcl/graphicfilter.hxx>
#include <com/sun/star/uno/Any.h>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/configuration/theDefaultProvider.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
using namespace ::com::sun::star::lang ; // XMultiServiceFactory
using namespace ::com::sun::star::container ; // XNameAccess
using namespace ::com::sun::star::uno ; // Reference
using namespace ::com::sun::star::beans ; // PropertyValue
using namespace ::com::sun::star::configuration ;
-using ::rtl::OUString;
const char* FilterConfigCache::FilterConfigCacheEntry::InternalPixelFilterNameList[] =
{
diff --git a/vcl/source/filter/FilterConfigCache.hxx b/vcl/source/filter/FilterConfigCache.hxx
index b3f0022b05bb..829122fb88f1 100644
--- a/vcl/source/filter/FilterConfigCache.hxx
+++ b/vcl/source/filter/FilterConfigCache.hxx
@@ -28,102 +28,101 @@
#include <vector>
+/** Cache to keep list of graphic filters + the filters themselves. */
class FilterConfigCache
{
- struct FilterConfigCacheEntry
- {
- ::rtl::OUString sInternalFilterName;
- ::rtl::OUString sType;
- ::com::sun::star::uno::Sequence< ::rtl::OUString > lExtensionList;
- ::rtl::OUString sUIName;
- ::rtl::OUString sDocumentService;
- ::rtl::OUString sFilterService;
- ::rtl::OUString sTemplateName;
-
- ::rtl::OUString sMediaType;
- ::rtl::OUString sFilterType;
-
- sal_Int32 nFlags;
- sal_Int32 nFileFormatVersion;
-
- // user data
- String sFilterName;
- sal_Bool bHasDialog : 1;
- sal_Bool bIsInternalFilter : 1;
- sal_Bool bIsPixelFormat : 1;
-
- sal_Bool CreateFilterName( const ::rtl::OUString& rUserDataEntry );
- String GetShortName( );
-
- static const char* InternalPixelFilterNameList[];
- static const char* InternalVectorFilterNameList[];
- static const char* ExternalPixelFilterNameList[];
- };
-
- typedef std::vector< FilterConfigCacheEntry > CacheVector;
-
-
- CacheVector aImport;
- CacheVector aExport;
- sal_Bool bUseConfig;
-
- static sal_Bool bInitialized;
- static sal_Int32 nIndType;
- static sal_Int32 nIndUIName;
- static sal_Int32 nIndDocumentService;
- static sal_Int32 nIndFilterService;
- static sal_Int32 nIndFlags;
- static sal_Int32 nIndUserData;
- static sal_Int32 nIndFileFormatVersion;
- static sal_Int32 nIndTemplateName;
-
- static const char* InternalFilterListForSvxLight[];
-
- void ImplInit();
- void ImplInitSmart();
-
- public :
-
- sal_uInt16 GetImportFormatCount() const
+ struct FilterConfigCacheEntry
+ {
+ OUString sInternalFilterName;
+ OUString sType;
+ ::com::sun::star::uno::Sequence< OUString > lExtensionList;
+ OUString sUIName;
+ OUString sDocumentService;
+ OUString sFilterService;
+ OUString sTemplateName;
+
+ OUString sMediaType;
+ OUString sFilterType;
+
+ sal_Int32 nFlags;
+ sal_Int32 nFileFormatVersion;
+
+ // user data
+ String sFilterName;
+ sal_Bool bHasDialog : 1;
+ sal_Bool bIsInternalFilter : 1;
+ sal_Bool bIsPixelFormat : 1;
+
+ sal_Bool CreateFilterName( const OUString& rUserDataEntry );
+ String GetShortName( );
+
+ static const char* InternalPixelFilterNameList[];
+ static const char* InternalVectorFilterNameList[];
+ static const char* ExternalPixelFilterNameList[];
+ };
+
+ typedef std::vector< FilterConfigCacheEntry > CacheVector;
+
+ CacheVector aImport;
+ CacheVector aExport;
+ sal_Bool bUseConfig;
+
+ static sal_Bool bInitialized;
+ static sal_Int32 nIndType;
+ static sal_Int32 nIndUIName;
+ static sal_Int32 nIndDocumentService;
+ static sal_Int32 nIndFilterService;
+ static sal_Int32 nIndFlags;
+ static sal_Int32 nIndUserData;
+ static sal_Int32 nIndFileFormatVersion;
+ static sal_Int32 nIndTemplateName;
+
+ static const char* InternalFilterListForSvxLight[];
+
+ void ImplInit();
+ void ImplInitSmart();
+
+public:
+
+ sal_uInt16 GetImportFormatCount() const
{ return sal::static_int_cast< sal_uInt16 >(aImport.size()); };
- sal_uInt16 GetImportFormatNumber( const String& rFormatName );
- sal_uInt16 GetImportFormatNumberForMediaType( const String& rMediaType );
- sal_uInt16 GetImportFormatNumberForShortName( const String& rShortName );
- sal_uInt16 GetImportFormatNumberForTypeName( const String& rType );
- String GetImportFilterName( sal_uInt16 nFormat );
- String GetImportFormatName( sal_uInt16 nFormat );
- String GetImportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0);
- String GetImportFormatMediaType( sal_uInt16 nFormat );
- String GetImportFormatShortName( sal_uInt16 nFormat );
- String GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry );
- String GetImportFilterType( sal_uInt16 nFormat );
- String GetImportFilterTypeName( sal_uInt16 nFormat );
-
- sal_Bool IsImportInternalFilter( sal_uInt16 nFormat );
- sal_Bool IsImportPixelFormat( sal_uInt16 nFormat );
-
- sal_uInt16 GetExportFormatCount() const
+ sal_uInt16 GetImportFormatNumber( const String& rFormatName );
+ sal_uInt16 GetImportFormatNumberForMediaType( const String& rMediaType );
+ sal_uInt16 GetImportFormatNumberForShortName( const String& rShortName );
+ sal_uInt16 GetImportFormatNumberForTypeName( const String& rType );
+ String GetImportFilterName( sal_uInt16 nFormat );
+ String GetImportFormatName( sal_uInt16 nFormat );
+ String GetImportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0);
+ String GetImportFormatMediaType( sal_uInt16 nFormat );
+ String GetImportFormatShortName( sal_uInt16 nFormat );
+ String GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry );
+ String GetImportFilterType( sal_uInt16 nFormat );
+ String GetImportFilterTypeName( sal_uInt16 nFormat );
+
+ sal_Bool IsImportInternalFilter( sal_uInt16 nFormat );
+ sal_Bool IsImportPixelFormat( sal_uInt16 nFormat );
+
+ sal_uInt16 GetExportFormatCount() const
{ return sal::static_int_cast< sal_uInt16 >(aExport.size()); };
- sal_uInt16 GetExportFormatNumber( const String& rFormatName );
- sal_uInt16 GetExportFormatNumberForMediaType( const String& rMediaType );
- sal_uInt16 GetExportFormatNumberForShortName( const String& rShortName );
- sal_uInt16 GetExportFormatNumberForTypeName( const String& rType );
- String GetExportFilterName( sal_uInt16 nFormat );
- String GetExportFormatName( sal_uInt16 nFormat );
- String GetExportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0 );
- String GetExportFormatMediaType( sal_uInt16 nFormat );
- String GetExportFormatShortName( sal_uInt16 nFormat );
- String GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry );
- String GetExportFilterTypeName( sal_uInt16 nFormat );
- String GetExportInternalFilterName( sal_uInt16 nFormat );
-
- sal_Bool IsExportInternalFilter( sal_uInt16 nFormat );
- sal_Bool IsExportPixelFormat( sal_uInt16 nFormat );
- sal_Bool IsExportDialog( sal_uInt16 nFormat );
-
- FilterConfigCache( sal_Bool bUseConfig );
- ~FilterConfigCache();
-
+ sal_uInt16 GetExportFormatNumber( const String& rFormatName );
+ sal_uInt16 GetExportFormatNumberForMediaType( const String& rMediaType );
+ sal_uInt16 GetExportFormatNumberForShortName( const String& rShortName );
+ sal_uInt16 GetExportFormatNumberForTypeName( const String& rType );
+ String GetExportFilterName( sal_uInt16 nFormat );
+ String GetExportFormatName( sal_uInt16 nFormat );
+ String GetExportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0 );
+ String GetExportFormatMediaType( sal_uInt16 nFormat );
+ String GetExportFormatShortName( sal_uInt16 nFormat );
+ String GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry );
+ String GetExportFilterTypeName( sal_uInt16 nFormat );
+ String GetExportInternalFilterName( sal_uInt16 nFormat );
+
+ sal_Bool IsExportInternalFilter( sal_uInt16 nFormat );
+ sal_Bool IsExportPixelFormat( sal_uInt16 nFormat );
+ sal_Bool IsExportDialog( sal_uInt16 nFormat );
+
+ FilterConfigCache( sal_Bool bUseConfig );
+ ~FilterConfigCache();
};
#endif // _FILTER_CONFIG_CACHE_HXX_
diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx
index 91310b367bed..bd7d7c5985c0 100644
--- a/vcl/source/filter/FilterConfigItem.cxx
+++ b/vcl/source/filter/FilterConfigItem.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <svtools/FilterConfigItem.hxx>
+#include <vcl/FilterConfigItem.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/processfactory.hxx>
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 4839dfa1cc44..3a68acd31c5a 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -30,17 +30,14 @@
#include <vcl/virdev.hxx>
#include <vcl/svapp.hxx>
#include <osl/file.hxx>
-#include <svtools/filter.hxx>
-#include "FilterConfigCache.hxx"
-#include <svtools/FilterConfigItem.hxx>
-#include <svtools/fltcall.hxx>
-#include <svtools/wmf.hxx>
-#include "gifread.hxx"
-#include "jpeg.hxx"
-#include "xbmread.hxx"
-#include "xpmread.hxx"
+#include <vcl/graphicfilter.hxx>
+#include <vcl/FilterConfigItem.hxx>
+#include <vcl/wmf.hxx>
+#include "igif/gifread.hxx"
+#include "jpeg/jpeg.hxx"
+#include "ixbm/xbmread.hxx"
+#include "ixpm/xpmread.hxx"
#include <svl/solar.hrc>
-#include <svtools/svtools.hrc>
#include "sgffilt.hxx"
#include "osl/module.hxx"
#include <com/sun/star/uno/Reference.h>
@@ -64,7 +61,7 @@
#include <vcl/metaact.hxx>
#include <vector>
-#include "SvFilterOptionsDialog.hxx"
+#include "FilterConfigCache.hxx"
#define PMGCHUNG_msOG 0x6d734f47 // Microsoft Office Animated GIF
@@ -110,7 +107,7 @@ public:
~ImpFilterOutputStream() {}
};
-sal_Bool ImplDirEntryHelper::Exists( const INetURLObject& rObj )
+static sal_Bool DirEntryExists( const INetURLObject& rObj )
{
sal_Bool bExists = sal_False;
@@ -139,7 +136,7 @@ sal_Bool ImplDirEntryHelper::Exists( const INetURLObject& rObj )
// -----------------------------------------------------------------------------
-void ImplDirEntryHelper::Kill( const String& rMainUrl )
+static void KillDirEntry( const String& rMainUrl )
{
try
{
@@ -1323,6 +1320,13 @@ sal_uInt16 GraphicFilter::GetExportFormatNumberForShortName( const String& rShor
// ------------------------------------------------------------------------
+String GraphicFilter::GetExportInternalFilterName( sal_uInt16 nFormat )
+{
+ return pConfig->GetExportInternalFilterName( nFormat );
+}
+
+// ------------------------------------------------------------------------
+
sal_uInt16 GraphicFilter::GetExportFormatNumberForTypeName( const String& rType )
{
return pConfig->GetExportFormatNumberForTypeName( rType );
@@ -1855,7 +1859,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const INetURLO
RTL_LOGFILE_CONTEXT( aLog, "GraphicFilter::ExportGraphic() (thb)" );
sal_uInt16 nRetValue = GRFILTER_FORMATERROR;
DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::ExportGraphic() : ProtType == INET_PROT_NOT_VALID" );
- sal_Bool bAlreadyExists = ImplDirEntryHelper::Exists( rPath );
+ sal_Bool bAlreadyExists = DirEntryExists( rPath );
String aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) );
SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aMainUrl, STREAM_WRITE | STREAM_TRUNC );
@@ -1865,7 +1869,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const INetURLO
delete pStream;
if( ( GRFILTER_OK != nRetValue ) && !bAlreadyExists )
- ImplDirEntryHelper::Kill( aMainUrl );
+ KillDirEntry( aMainUrl );
}
return nRetValue;
#endif
@@ -2268,61 +2272,6 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String&
// ------------------------------------------------------------------------
-sal_Bool GraphicFilter::Setup( sal_uInt16 )
-{
- return sal_False;
-}
-
-// ------------------------------------------------------------------------
-
-sal_Bool GraphicFilter::HasExportDialog( sal_uInt16 nFormat )
-{
- return pConfig->IsExportDialog( nFormat );
-}
-
-// ------------------------------------------------------------------------
-
-sal_Bool GraphicFilter::DoExportDialog( Window* pWindow, sal_uInt16 nFormat )
-{
- return DoExportDialog( pWindow, nFormat, FUNIT_MM );
-}
-
-sal_Bool GraphicFilter::DoExportDialog( Window*, sal_uInt16 nFormat, FieldUnit )
-{
-#ifdef DISABLE_EXPORT
- (void) nFormat;
-
- return sal_False;
-#else
- sal_Bool bRet = sal_False;
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
- xSMgr( ::comphelper::getProcessServiceFactory() );
-
- uno::Reference< com::sun::star::uno::XInterface > xFilterOptionsDialog
- ( xSMgr->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svtools.SvFilterOptionsDialog" )) ),
- com::sun::star::uno::UNO_QUERY );
- if ( xFilterOptionsDialog.is() )
- {
- com::sun::star::uno::Reference< com::sun::star::ui::dialogs::XExecutableDialog > xExecutableDialog
- ( xFilterOptionsDialog, ::com::sun::star::uno::UNO_QUERY );
- com::sun::star::uno::Reference< com::sun::star::beans::XPropertyAccess > xPropertyAccess
- ( xFilterOptionsDialog, ::com::sun::star::uno::UNO_QUERY );
- if ( xExecutableDialog.is() && xPropertyAccess.is() )
- {
- com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aMediaDescriptor( 1 );
- aMediaDescriptor[ 0 ].Name = String( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ) );
- rtl::OUString aStr( pConfig->GetExportInternalFilterName( nFormat ) );
- aMediaDescriptor[ 0 ].Value <<= aStr;
- xPropertyAccess->setPropertyValues( aMediaDescriptor );
- bRet = xExecutableDialog->execute() == com::sun::star::ui::dialogs::ExecutableDialogResults::OK;
- }
- }
- return bRet;
-#endif
-}
-
-// ------------------------------------------------------------------------
-
const FilterErrorEx& GraphicFilter::GetLastError() const
{
return *pErrorEx;
diff --git a/vcl/source/filter/graphicfilter2.cxx b/vcl/source/filter/graphicfilter2.cxx
index 3cf7abfef5a1..22bb1891bef4 100644
--- a/vcl/source/filter/graphicfilter2.cxx
+++ b/vcl/source/filter/graphicfilter2.cxx
@@ -22,8 +22,7 @@
#include <stdio.h>
#include <tools/stream.hxx>
#include <vcl/outdev.hxx>
-#include <svtools/filter.hxx>
-#include "FilterConfigCache.hxx"
+#include <vcl/graphicfilter.hxx>
#include <unotools/ucbstreamhelper.hxx>
#define DATA_SIZE 640
diff --git a/vcl/source/filter/jpeg/jpeg.cxx b/vcl/source/filter/jpeg/jpeg.cxx
index 6bd130d9a727..3c0fe9c429dc 100644
--- a/vcl/source/filter/jpeg/jpeg.cxx
+++ b/vcl/source/filter/jpeg/jpeg.cxx
@@ -24,15 +24,15 @@ extern "C"
{
#include "stdio.h"
#include "jpeg.h"
- #include "jpeglib.h"
- #include "jerror.h"
+ #include <jpeg/jpeglib.h>
+ #include <jpeg/jerror.h>
}
#define _JPEGPRIVATE
#include <vcl/bmpacc.hxx>
#include "jpeg.hxx"
-#include <svtools/FilterConfigItem.hxx>
-#include <svtools/filter.hxx>
+#include <vcl/FilterConfigItem.hxx>
+#include <vcl/graphicfilter.hxx>
// -----------
// - Defines -
diff --git a/vcl/source/filter/jpeg/jpegc.c b/vcl/source/filter/jpeg/jpegc.c
index 528e19e51216..f9bcc07ca3df 100644
--- a/vcl/source/filter/jpeg/jpegc.c
+++ b/vcl/source/filter/jpeg/jpegc.c
@@ -20,8 +20,8 @@
#include <stdio.h>
#include <stdlib.h>
#include "setjmp.h"
-#include "jpeglib.h"
-#include "jerror.h"
+#include "jpeg/jpeglib.h"
+#include "jpeg/jerror.h"
#include "jpeg.h"
#include "rtl/alloc.h"
#include "osl/diagnose.h"
diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx
index 667856464164..aea90fbb9ee1 100644
--- a/vcl/source/filter/sgvmain.cxx
+++ b/vcl/source/filter/sgvmain.cxx
@@ -22,7 +22,7 @@
#include <osl/endian.h>
#include <vcl/graph.hxx>
#include <tools/poly.hxx>
-#include <svtools/filter.hxx>
+#include <vcl/graphicfilter.hxx>
#include "sgffilt.hxx"
#include "sgfbram.hxx"
#include "sgvmain.hxx"
diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx
index 235f36808298..ed4846b3bf17 100644
--- a/vcl/source/filter/sgvtext.cxx
+++ b/vcl/source/filter/sgvtext.cxx
@@ -21,7 +21,7 @@
#include <rtl/math.h>
#include <comphelper/string.hxx>
#include <tools/config.hxx>
-#include <svtools/filter.hxx>
+#include <vcl/graphicfilter.hxx>
#include "sgffilt.hxx"
#include "sgfbram.hxx"
#include "sgvmain.hxx"
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index f9f38e09eb92..0d6276a8f3df 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -21,7 +21,7 @@
#include "winmtf.hxx"
#include <boost/scoped_array.hpp>
#include <vcl/gdimtf.hxx>
-#include <svtools/wmf.hxx>
+#include <vcl/wmf.hxx>
#include <rtl/crc.h>
#include <rtl/tencinfo.h>
#include <osl/endian.h>
diff --git a/vcl/source/filter/wmf/wmf.cxx b/vcl/source/filter/wmf/wmf.cxx
index 9c3b7e6dc0e7..26f7a1a0ba81 100644
--- a/vcl/source/filter/wmf/wmf.cxx
+++ b/vcl/source/filter/wmf/wmf.cxx
@@ -21,7 +21,7 @@
#include "winmtf.hxx"
#include "emfwr.hxx"
#include "wmfwr.hxx"
-#include <svtools/wmf.hxx>
+#include <vcl/wmf.hxx>
#include <comphelper/scopeguard.hxx>
// -----------------------------------------------------------------------------