First public contribution.
2 * Copyright (c) 1997-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.
19 #if !defined(__WNGDOOR_H__)
22 #if !defined(__E32STD_H__)
26 #if !defined(__E32BASE_H__)
30 #if !defined(__APAMDR_H__)
36 class CWordModelHeader;
37 class TWordModelHeaderFactory;
38 class CWordModelHeaderV2;
39 class TWordModelHeaderFactoryV2;
43 class TWordModelStoreResolver;
45 /** Application UID for word processor application.
49 const TUid KUidWordApp = {0x10003A64};
53 // Takes ownership of the referenced word model
55 class CWordModelHeaderV2 : public CApaModelHeader
56 /** Wrapper for the word processor application engine.
58 The class provides the knowledge for internalising and externalising an application
59 model's data. It enables word processor documents to be embedded within rich
62 Compared to CWordModelHeader, it also provides restoration support for objects
63 embedded within embedded word documents.
67 friend class TWordModelHeaderFactoryV2;
69 IMPORT_C ~CWordModelHeaderV2();
70 public: // from CApaModelHeader
71 IMPORT_C void StoreL(CStreamStore& aStore,CStreamDictionary& aDict)const;
72 IMPORT_C TApaAppIdentifier AppId()const;
73 IMPORT_C void DetachFromStoreL(CPicture::TDetach aDegree);
75 IMPORT_C void RestoreL(const CStreamStore& aStore,const CStreamDictionary& aDict);
76 IMPORT_C CWordModel* Model();
77 void SetFactory(MApaModelHeaderFactory* aFactory); // takes ownership
79 CWordModelHeaderV2(CWordModel* aModel);
82 TWordModelStoreResolver* iResolver; // created during restore
83 MApaModelHeaderFactory* iHeaderFactory;
90 class TWordModelHeaderFactoryV2 : public MApaModelHeaderFactory
91 /** Factory to construct CWordModelHeaderV2 application wrapper objects.
96 IMPORT_C TWordModelHeaderFactoryV2(const TFileName& aPrintDriverPath);
97 IMPORT_C CApaModelHeader* NewHeaderL(const CStreamStore& aStore,const CStreamDictionary& aDict,
98 const TApaAppIdentifier& aAppId)const;
100 TFileName iPrintDriverPath;
105 class CWordModelHeaderV3 : public CApaModelHeader
106 /** Wrapper for the word processor application engine.
108 The class provides the knowledge for internalising and externalising an application
109 model's data. It enables word processor documents to be embedded within rich
112 Like CWordModelHeaderV2, it provides restoration support for objects embedded
113 within embedded word documents. Unlike that class, however, it does not restore
114 printer setup information, or process header and footer information.
118 friend class TWordModelHeaderFactoryV3;
120 IMPORT_C ~CWordModelHeaderV3();
121 public: // from CApaModelHeader
122 IMPORT_C void StoreL(CStreamStore& aStore,CStreamDictionary& aDict)const;
123 IMPORT_C TApaAppIdentifier AppId()const;
124 IMPORT_C void DetachFromStoreL(CPicture::TDetach aDegree);
126 IMPORT_C void RestoreL(const CStreamStore& aStore,const CStreamDictionary& aDict);
127 IMPORT_C CWordModel* Model();
128 void SetFactory(MApaModelHeaderFactory* aFactory); // takes ownership
130 CWordModelHeaderV3(CWordModel* aModel);
133 TWordModelStoreResolver* iResolver; // created during restore
134 MApaModelHeaderFactory* iHeaderFactory;
138 // Mimimal header factory for efficiency
139 // Does not restore header or footer information from the document
141 class TWordModelHeaderFactoryV3 : public MApaModelHeaderFactory
142 /** Factory to construct CWordModelHeaderV3 application wrapper objects.
147 IMPORT_C TWordModelHeaderFactoryV3();
148 IMPORT_C CApaModelHeader* NewHeaderL(const CStreamStore& aStore,const CStreamDictionary& aDict,
149 const TApaAppIdentifier& aAppId) const;