videditor/TrimForMms/src/TrimForMmsDocument.cpp
changeset 0 951a5db380a0
equal deleted inserted replaced
-1:000000000000 0:951a5db380a0
       
     1 /*
       
     2 * Copyright (c) 2010 Ixonos Plc.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the "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 * Ixonos Plc
       
    14 *
       
    15 * Description: 
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 /* ====================================================================
       
    21  * File: TrimForMmsDocument.cpp
       
    22  * Created: 04/18/06
       
    23  * Author: 
       
    24  * 
       
    25  * ==================================================================== */
       
    26 
       
    27 #include "TrimForMmsAppUi.h"
       
    28 #include "TrimForMmsDocument.h"
       
    29 #include <utf.h>
       
    30 
       
    31 
       
    32 // Standard Symbian OS construction sequence
       
    33 CTrimForMmsDocument* CTrimForMmsDocument::NewL(CEikApplication& aApp)
       
    34     {
       
    35     CTrimForMmsDocument* self = NewLC(aApp);
       
    36     CleanupStack::Pop(self);
       
    37     return self;
       
    38     }
       
    39 
       
    40 CTrimForMmsDocument* CTrimForMmsDocument::NewLC(CEikApplication& aApp)
       
    41     {
       
    42     CTrimForMmsDocument* self = new (ELeave) CTrimForMmsDocument(aApp);
       
    43     CleanupStack::PushL(self);
       
    44     self->ConstructL();
       
    45     return self;
       
    46     }
       
    47 
       
    48 void CTrimForMmsDocument::ConstructL()
       
    49     {
       
    50 	// no implementation required
       
    51     }    
       
    52 
       
    53 CTrimForMmsDocument::CTrimForMmsDocument(CEikApplication& aApp) : CAknDocument(aApp) 
       
    54     {
       
    55 	// no implementation required
       
    56     }
       
    57 
       
    58 CTrimForMmsDocument::~CTrimForMmsDocument()
       
    59     {
       
    60 	// no implementation required
       
    61     }
       
    62 
       
    63 CEikAppUi* CTrimForMmsDocument::CreateAppUiL()
       
    64     {
       
    65     // Create the application user interface, and return a pointer to it,
       
    66     // the framework takes ownership of this object
       
    67     CEikAppUi* appUi = new (ELeave) CTrimForMmsAppUi;
       
    68     return appUi;
       
    69     }
       
    70 
       
    71 void CTrimForMmsDocument::OpenFileL(CFileStore*& /*aFileStore*/, RFile& aFile)
       
    72  	{
       
    73  	TFileName file;
       
    74  	User::LeaveIfError(aFile.FullName(file)); 	
       
    75  	
       
    76  	TBuf8<KMaxFileName> conv8Filename;
       
    77 					CnvUtfConverter::ConvertFromUnicodeToUtf8( conv8Filename,file );
       
    78  	
       
    79  	STATIC_CAST( CTrimForMmsAppUi*, CCoeEnv::Static()->AppUi() )
       
    80  	    ->ActivateLocalViewL(TUid::Uid(0), TUid::Uid(0), conv8Filename);
       
    81  	
       
    82  	aFile.Close();
       
    83  	
       
    84  	}