First public contribution.
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Needs the following libraries in the MMP:
16 * euser.lib etext.lib fbscli.lib bitgdi.lib form.lib EFSRV.LIB imageconversion.lib ezip.lib
26 #include <imageconversion.h>
29 // Complete richtext document class that uses a file-based
30 // bitmap instead of a screen device allowing the creation,
31 // saving and comparing of what would normally be screen-shots
32 class CTestBitmapFile : public CActive
36 // Optionally specify screen size and font/ fontsize
37 IMPORT_C static CTestBitmapFile* NewLC(const TRect& aDisplayRect = TRect(0, 0, 252, 94),
38 TCharFormat aCharFormat = TCharFormat(_L("NewTimes"),300));
39 IMPORT_C ~CTestBitmapFile();
41 // Load/save operations
42 IMPORT_C TBool CompareL(const TDes8& aData);
43 IMPORT_C void SaveFileL(const TDesC& aFileName);
46 inline CRichText* DocModel() {return iDocModel;}
47 inline CTextView* View() {return iView;}
48 inline CTextLayout* Layout() {return iLayout;}
50 IMPORT_C void AppendL(const TDesC&);
51 IMPORT_C void AppendL(CPicture* aPic);
61 // Active object interface
67 CImageEncoder* iSaveUtil;
70 CFbsBitmapDevice* iDevice;
71 CParaFormat* iParaFormat;
72 TParaFormatMask iParaFormatMask;
73 CParaFormatLayer* iParaFormatLayer;
74 TCharFormat iCharFormat;
75 TCharFormatMask iCharFormatMask;
76 CCharFormatLayer* iCharFormatLayer;
83 //Extracts zipped bitmap files into descriptors for convenient comparison
84 class CTestBitmapZipFileExtractor : public CBase
88 IMPORT_C static CTestBitmapZipFileExtractor* NewLC(const TDesC& aZipFile);
89 IMPORT_C ~CTestBitmapZipFileExtractor();
90 // Bitmap file extractor and descriptor converter
91 IMPORT_C TPtr8 BitmapFileL(const TDesC& aFilename);
95 CTestBitmapZipFileExtractor();
96 void ConstructL(const TDesC& aZipFile);
102 //temporary buffer for descriptor conversion