williamr@2
|
1 |
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@2
|
4 |
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@2
|
6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
//
|
williamr@2
|
15 |
|
williamr@2
|
16 |
#if !defined(__WNGMODEL_H__)
|
williamr@2
|
17 |
#define __WNGMODEL_H__
|
williamr@2
|
18 |
|
williamr@2
|
19 |
#if !defined(__E32STD_H__)
|
williamr@2
|
20 |
#include <e32std.h>
|
williamr@2
|
21 |
#endif
|
williamr@2
|
22 |
#if !defined(__E32BASE_H__)
|
williamr@2
|
23 |
#include <e32base.h>
|
williamr@2
|
24 |
#endif
|
williamr@2
|
25 |
|
williamr@2
|
26 |
#if !defined(__F32FILE_H__)
|
williamr@2
|
27 |
#include <f32file.h>
|
williamr@2
|
28 |
#endif
|
williamr@2
|
29 |
|
williamr@2
|
30 |
#if !defined(__S32STD_H__)
|
williamr@2
|
31 |
#include <s32std.h>
|
williamr@2
|
32 |
#endif
|
williamr@2
|
33 |
|
williamr@2
|
34 |
#include <gdi.h>
|
williamr@2
|
35 |
|
williamr@2
|
36 |
//
|
williamr@2
|
37 |
// Classed decalred in this file
|
williamr@2
|
38 |
class CWordModel;
|
williamr@2
|
39 |
class CWordProfileModel;
|
williamr@2
|
40 |
//
|
williamr@2
|
41 |
// Classes referenced
|
williamr@2
|
42 |
class RReadStream;
|
williamr@2
|
43 |
class RWriteStream;
|
williamr@2
|
44 |
class CSecureStore;
|
williamr@2
|
45 |
class CParaFormatLayer;
|
williamr@2
|
46 |
class CCharFormatLayer;
|
williamr@2
|
47 |
class CRichText;
|
williamr@2
|
48 |
class CStyleList;
|
williamr@2
|
49 |
class CPrintSetup;
|
williamr@2
|
50 |
class MFieldFileNameInfo;
|
williamr@2
|
51 |
class MFieldNumPagesInfo;
|
williamr@2
|
52 |
class CStreamStore;
|
williamr@2
|
53 |
class CStreamDictionary;
|
williamr@2
|
54 |
|
williamr@2
|
55 |
/** Type for an array of style short cuts.
|
williamr@2
|
56 |
|
williamr@2
|
57 |
@see CWordModel::StyleShortCutList()
|
williamr@2
|
58 |
@publishedAll
|
williamr@2
|
59 |
@deprecated
|
williamr@2
|
60 |
*/
|
williamr@2
|
61 |
typedef CArrayFixFlat<TChar> CStyleShortCutList;
|
williamr@2
|
62 |
|
williamr@2
|
63 |
|
williamr@2
|
64 |
|
williamr@2
|
65 |
class CWordModel : public CBase
|
williamr@2
|
66 |
/** Word processor engine interface.
|
williamr@2
|
67 |
|
williamr@2
|
68 |
This is essentially a thin layer over the rich text support (CRichText etc.)
|
williamr@2
|
69 |
provided by the Application Framework's ETEXT component.
|
williamr@2
|
70 |
@publishedAll
|
williamr@2
|
71 |
@deprecated
|
williamr@2
|
72 |
*/
|
williamr@2
|
73 |
{
|
williamr@2
|
74 |
public:
|
williamr@2
|
75 |
IMPORT_C static CWordModel* NewL(const MFieldFileNameInfo* aFileNameInfo,const MFieldNumPagesInfo* aFieldNumPagesInfo,const TDesC& aDriverPath);
|
williamr@2
|
76 |
IMPORT_C static CWordModel* NewL(const MFieldFileNameInfo* aFileNameInfo,const MFieldNumPagesInfo* aFieldNumPagesInfo);
|
williamr@2
|
77 |
// Performs no initialisation at all.
|
williamr@2
|
78 |
//
|
williamr@2
|
79 |
IMPORT_C ~CWordModel();
|
williamr@2
|
80 |
//
|
williamr@2
|
81 |
// Save/Load
|
williamr@2
|
82 |
#ifndef __SECURE_API__
|
williamr@2
|
83 |
IMPORT_C void StoreL(CStreamStore& aStore,CStreamDictionary& aStreamDic,const CSecurityBase* aSecurity)const;
|
williamr@2
|
84 |
IMPORT_C void RestoreL(const CStreamStore& aStore,const CStreamDictionary& aStreamDic,const CSecurityBase* aSecurity,
|
williamr@2
|
85 |
const MFieldFileNameInfo* aFileNameInfo=NULL,const MFieldNumPagesInfo* aNumPagesInfo=NULL,
|
williamr@2
|
86 |
MPictureFactory* aPictureFactory=NULL);
|
williamr@2
|
87 |
IMPORT_C void RestoreMinimalL(const CStreamStore& aStore,const CStreamDictionary& aStreamDic,const CSecurityBase* aSecurity,
|
williamr@2
|
88 |
const MFieldFileNameInfo* aFileNameInfo=NULL,const MFieldNumPagesInfo* aNumPagesInfo=NULL,
|
williamr@2
|
89 |
MPictureFactory* aPictureFactory=NULL);
|
williamr@2
|
90 |
#else
|
williamr@2
|
91 |
IMPORT_C void StoreL(CStreamStore& aStore,CStreamDictionary& aStreamDic,const TAny* aSecurity)const;
|
williamr@2
|
92 |
IMPORT_C void RestoreL(const CStreamStore& aStore,const CStreamDictionary& aStreamDic,const TAny* aSecurity,
|
williamr@2
|
93 |
const MFieldFileNameInfo* aFileNameInfo=NULL,const MFieldNumPagesInfo* aNumPagesInfo=NULL,
|
williamr@2
|
94 |
MPictureFactory* aPictureFactory=NULL);
|
williamr@2
|
95 |
IMPORT_C void RestoreMinimalL(const CStreamStore& aStore,const CStreamDictionary& aStreamDic,const TAny* aSecurity,
|
williamr@2
|
96 |
const MFieldFileNameInfo* aFileNameInfo=NULL,const MFieldNumPagesInfo* aNumPagesInfo=NULL,
|
williamr@2
|
97 |
MPictureFactory* aPictureFactory=NULL);
|
williamr@2
|
98 |
#endif
|
williamr@2
|
99 |
|
williamr@2
|
100 |
//
|
williamr@2
|
101 |
// Handles
|
williamr@2
|
102 |
inline CRichText* Text();
|
williamr@2
|
103 |
inline CStyleList* StyleList();
|
williamr@2
|
104 |
inline CPrintSetup* PrintSetup();
|
williamr@2
|
105 |
inline CArrayFix<TInt>* PageTable();
|
williamr@2
|
106 |
inline CStyleShortCutList* StyleShortCutList();
|
williamr@2
|
107 |
inline TChar& NormalStyleShortCut();
|
williamr@2
|
108 |
protected:
|
williamr@2
|
109 |
IMPORT_C CWordModel();
|
williamr@2
|
110 |
IMPORT_C void ConstructL(const MFieldFileNameInfo* aFileNameInfo,const MFieldNumPagesInfo* aNumPagesInfo);
|
williamr@2
|
111 |
IMPORT_C void ConstructMinimalL(const MFieldFileNameInfo* aFileNameInfo,const MFieldNumPagesInfo* aFieldNumPagesInfo,const TDesC& aDriverPath);
|
williamr@2
|
112 |
void ConstructGlobalLayersL();
|
williamr@2
|
113 |
//
|
williamr@2
|
114 |
TStreamId StoreStylesL(CStreamStore& aStore)const;
|
williamr@2
|
115 |
void RestoreStylesL(const CStreamStore& aStore,TStreamId aId);
|
williamr@2
|
116 |
//
|
williamr@2
|
117 |
TStreamId StoreFieldDataL(CStreamStore& aStore)const;
|
williamr@2
|
118 |
void RestoreFieldDataL(const CStreamStore& aStore,TStreamId aId);
|
williamr@2
|
119 |
#ifndef __SECURE_API__
|
williamr@2
|
120 |
TStreamId StoreTextDataL(CStreamStore& aStore,const CSecurityBase* aSecurity)const;
|
williamr@2
|
121 |
void RestoreTextDataL(const CStreamStore& aStore,TStreamId aId,const CSecurityBase* aSecurity);
|
williamr@2
|
122 |
#else
|
williamr@2
|
123 |
TStreamId StoreTextDataL(CStreamStore& aStore,const TAny* aSecurity)const;
|
williamr@2
|
124 |
void RestoreTextDataL(const CStreamStore& aStore,TStreamId aId,const TAny* aSecurity);
|
williamr@2
|
125 |
#endif
|
williamr@2
|
126 |
|
williamr@2
|
127 |
TStreamId StoreMarkupDataL(CStreamStore& aStore)const;
|
williamr@2
|
128 |
void RestoreMarkupDataL(const CStreamStore& aStore,TStreamId aId);
|
williamr@2
|
129 |
private:
|
williamr@2
|
130 |
void InitPrintSetupL(const MFieldFileNameInfo* aFileNameInfo,const MFieldNumPagesInfo* aNumPagesInfo,const TDesC& aDriverPath);
|
williamr@2
|
131 |
private:
|
williamr@2
|
132 |
CParaFormatLayer* iParaFormatLayer;
|
williamr@2
|
133 |
CCharFormatLayer* iCharFormatLayer;
|
williamr@2
|
134 |
CRichText* iText;
|
williamr@2
|
135 |
CStyleList* iStyleList;
|
williamr@2
|
136 |
CPrintSetup* iPrintSetup;
|
williamr@2
|
137 |
CStyleShortCutList* iStyleShortCutList;
|
williamr@2
|
138 |
TChar iNormalStyleShortCut;
|
williamr@2
|
139 |
CArrayFix<TInt>* iPageTable;
|
williamr@2
|
140 |
};
|
williamr@2
|
141 |
|
williamr@2
|
142 |
|
williamr@2
|
143 |
#include <wngmodel.inl>
|
williamr@2
|
144 |
|
williamr@2
|
145 |
|
williamr@2
|
146 |
#endif
|