notepad/notepad1/inc/NpdEdwinBase.inl
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     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:  Inline functions of customized editor control.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <frmtlay.h>
       
    20 
       
    21 #define KNotepadBandFormattingThreshold 500
       
    22 
       
    23 // -----------------------------------------------------------------------------
       
    24 // CNotepadEdwin::SetAmountToFormat
       
    25 // -----------------------------------------------------------------------------
       
    26 //
       
    27 inline void CNotepadEdwinBase::SetAmountToFormat(TInt aDocumentSizeInCharacters )
       
    28     {
       
    29     if ( aDocumentSizeInCharacters < KNotepadBandFormattingThreshold )
       
    30         {
       
    31         iEdwinExposer->GetLayout().SetAmountToFormat(CTextLayout::EFFormatAllText); // Slower, but better for short documents
       
    32         }
       
    33     else
       
    34         {
       
    35         iEdwinExposer->GetLayout().SetAmountToFormat(); // default parameter is to format band        
       
    36         }
       
    37     }
       
    38 
       
    39 // End of file