|
1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
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". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementation of Notepad Viewer Document class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "NpdViewerDocument.h" |
|
21 #include "NpdViewerAppUi.h" |
|
22 #include <eikdoc.h> |
|
23 #include <s32file.h> |
|
24 |
|
25 // ============================ MEMBER FUNCTIONS =============================== |
|
26 |
|
27 // ----------------------------------------------------------------------------- |
|
28 // CNotepadViewerDocument() |
|
29 // Constructor. |
|
30 // ----------------------------------------------------------------------------- |
|
31 // |
|
32 CNotepadViewerDocument::CNotepadViewerDocument( |
|
33 CEikApplication& aApp ) |
|
34 : CEikDocument(aApp) |
|
35 { |
|
36 } |
|
37 |
|
38 // ----------------------------------------------------------------------------- |
|
39 // --------------------------------------------------------- |
|
40 // CNotepadViewerDocument::CreateAppUiL() |
|
41 // constructs CNotepadViewerAppUi |
|
42 // ----------------------------------------------------------------------------- |
|
43 // |
|
44 CEikAppUi* CNotepadViewerDocument::CreateAppUiL() |
|
45 { |
|
46 return new(ELeave) CNotepadViewerAppUi; |
|
47 } |
|
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // CNotepadViewerDocument::OpenFileL |
|
51 // ----------------------------------------------------------------------------- |
|
52 // |
|
53 CFileStore* CNotepadViewerDocument::OpenFileL( |
|
54 TBool /*aDoOpen*/, |
|
55 const TDesC& aFilename, |
|
56 RFs& /*aFs*/) |
|
57 { |
|
58 iAppUi->OpenFileL(aFilename); |
|
59 return NULL; |
|
60 } |
|
61 |
|
62 // ----------------------------------------------------------------------------- |
|
63 // void CNotepadViewerDocument::OpenFileL(CFileStore*& aFileStore, RFile& aFile) |
|
64 // ----------------------------------------------------------------------------- |
|
65 // |
|
66 |
|
67 void CNotepadViewerDocument::OpenFileL( |
|
68 CFileStore*& /*aFileStore*/, |
|
69 RFile& aFile) |
|
70 { |
|
71 ((CNotepadViewerAppUi*) iAppUi)->OpenFileL(aFile); |
|
72 } |
|
73 // End of File |