summaryrefslogtreecommitdiff
path: root/goodies
diff options
context:
space:
mode:
authorSven Jacobi <sj@openoffice.org>2001-03-08 13:59:19 +0000
committerSven Jacobi <sj@openoffice.org>2001-03-08 13:59:19 +0000
commita96c3cbdf9c6934ed2146a96610c354f36918e93 (patch)
tree7005ec4f2c73b4d8b2992fda80e00d29a3335dd8 /goodies
parent5f4d3ce7eaa8fcd20b247eec84d081a58e700da8 (diff)
api changes, GraphicFilter now using Configuration Management
Diffstat (limited to 'goodies')
-rw-r--r--goodies/source/filter.vcl/ipcd/ipcd.cxx58
-rw-r--r--goodies/source/filter.vcl/ipcd/makefile.mk9
2 files changed, 25 insertions, 42 deletions
diff --git a/goodies/source/filter.vcl/ipcd/ipcd.cxx b/goodies/source/filter.vcl/ipcd/ipcd.cxx
index d6ba8ff488c3..a4363c8ae54e 100644
--- a/goodies/source/filter.vcl/ipcd/ipcd.cxx
+++ b/goodies/source/filter.vcl/ipcd/ipcd.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ipcd.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 16:30:15 $
+ * last change: $Author: sj $ $Date: 2001-03-08 14:59:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -62,10 +62,10 @@
#include <tools/new.hxx>
#include <vcl/graph.hxx>
#include <vcl/bmpacc.hxx>
-#include <vcl/config.hxx>
#include <vcl/svapp.hxx>
#include <svtools/fltcall.hxx>
#include <svtools/solar.hrc>
+#include <svtools/FilterConfigItem.hxx>
#include "strings.hrc"
#include "dlgipcd.hrc"
#include "dlgipcd.hxx"
@@ -83,14 +83,6 @@ enum PCDResolution {
PCDRES_16BASE // 3072 x 3072
};
-
-// Schluesselworte in der INI-Datei:
-#define PCDINI_RES_KEY "PCD-IMPORT-RESOLUTION"
-#define PCDINI_RES_BASE16 "BASE/16"
-#define PCDINI_RES_BASE4 "BASE/4"
-#define PCDINI_RES_BASE "BASE"
-
-
class PCDReader {
private:
@@ -135,16 +127,16 @@ public:
PCDReader() {}
~PCDReader() {}
- BOOL ReadPCD(SvStream & rPCD, Graphic & rGraphic,
- PFilterCallback pcallback, void * pcallerdata,
- Config * pConfig);
+ BOOL ReadPCD( SvStream & rPCD, Graphic & rGraphic,
+ PFilterCallback pcallback, void * pcallerdata,
+ FilterConfigItem* pConfigItem );
};
//=================== Methoden von PCDReader ==============================
-BOOL PCDReader::ReadPCD(SvStream & rPCD, Graphic & rGraphic,
- PFilterCallback pcallback, void * pcallerdata,
- Config * pConfig)
+BOOL PCDReader::ReadPCD( SvStream & rPCD, Graphic & rGraphic,
+ PFilterCallback pcallback, void * pcallerdata,
+ FilterConfigItem* pConfigItem )
{
Bitmap aBmp;
@@ -163,23 +155,15 @@ BOOL PCDReader::ReadPCD(SvStream & rPCD, Graphic & rGraphic,
ReadOrientation();
// Welche Aufloesung wollen wir ?:
- if ( pConfig == NULL )
- eResolution = PCDRES_BASE;
- else
+ eResolution = PCDRES_BASE;
+ if ( pConfigItem )
{
- String aStr;
-
- pConfig->Update();
- aStr = UniString( pConfig->ReadKey( PCDINI_RES_KEY, PCDINI_RES_BASE ), RTL_TEXTENCODING_UTF8 );
- aStr.ToUpperAscii();
- if ( aStr.CompareToAscii( PCDINI_RES_BASE16 ) == COMPARE_EQUAL )
- eResolution = PCDRES_BASE16;
- else if ( aStr.CompareToAscii( PCDINI_RES_BASE4 ) == COMPARE_EQUAL )
+ sal_Int32 nResolution = pConfigItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Resolution" ) ), 2 );
+ if ( nResolution == 1 )
eResolution = PCDRES_BASE4;
- else
- eResolution = PCDRES_BASE;
+ else if ( nResolution == 2 )
+ eResolution = PCDRES_BASE16;
}
-
// Groesse und Position (Position in PCD-Datei) des Bildes bestimmen:
switch (eResolution)
{
@@ -444,16 +428,16 @@ void PCDReader::ReadImage(ULONG nMinPercent, ULONG nMaxPercent)
#ifdef WNT
extern "C" BOOL _cdecl GraphicImport(SvStream & rStream, Graphic & rGraphic,
- PFilterCallback pCallback, void * pCallerData,
- Config * pOptionsConfig, BOOL)
+ PFilterCallback pCallback, void * pCallerData,
+ FilterConfigItem* pConfigItem, BOOL)
#else
extern "C" BOOL GraphicImport(SvStream & rStream, Graphic & rGraphic,
- PFilterCallback pCallback, void * pCallerData,
- Config * pOptionsConfig, BOOL)
+ PFilterCallback pCallback, void * pCallerData,
+ FilterConfigItem* pConfigItem, BOOL)
#endif
{
PCDReader aPCDReader;
- return aPCDReader.ReadPCD( rStream, rGraphic, pCallback, pCallerData, pOptionsConfig );
+ return aPCDReader.ReadPCD( rStream, rGraphic, pCallback, pCallerData, pConfigItem );
}
//================== GraphicDialog - die exportierte Funktion ================
@@ -462,7 +446,7 @@ extern "C" BOOL SAL_CALL DoImportDialog( FltCallDialogParameter& rPara )
{
BOOL bRet = FALSE;
- if ( rPara.pWindow && rPara.pCfg )
+ if ( rPara.pWindow )
{
ByteString aResMgrName( "icd" );
ResMgr* pResMgr;
diff --git a/goodies/source/filter.vcl/ipcd/makefile.mk b/goodies/source/filter.vcl/ipcd/makefile.mk
index 82ff6efde9e4..b3652b01b3ca 100644
--- a/goodies/source/filter.vcl/ipcd/makefile.mk
+++ b/goodies/source/filter.vcl/ipcd/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.1.1.1 $
+# $Revision: 1.2 $
#
-# last change: $Author: hr $ $Date: 2000-09-18 16:30:15 $
+# last change: $Author: sj $ $Date: 2001-03-08 14:59:19 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -86,8 +86,7 @@ PROJECTPCHSOURCE=eeng_pch
CDEFS+= -DEDITDEBUG
.ENDIF
-SRCFILES = dlgipcd.src \
- ipcdstr.src
+SRCFILES = dlgipcd.src
SLOFILES = $(SLO)$/ipcd.obj \
$(SLO)$/dlgipcd.obj
@@ -101,7 +100,7 @@ RESLIB1SRSFILES=\
SHL1TARGET= icd$(UPD)$(DLLPOSTFIX)
SHL1IMPLIB= ipcd
-SHL1STDLIBS= $(TOOLSLIB) $(SVLIB) $(CPPULIB)
+SHL1STDLIBS= $(TOOLSLIB) $(SVTOOLLIB) $(SVLIB) $(CPPULIB) $(SALLIB)
SHL1DEPN= $(LB)$/ipcd.lib
SHL1LIBS= $(SLB)$/ipcd.lib # $(LB)$/rtftoken.lib