From 11524988f1e5ceca372dd7f172a72636e3247f06 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 2 Apr 2012 22:48:48 -0400 Subject: Use initializer to initialize boolean's. --- editeng/source/editeng/impedit.hxx | 33 ++++++++++++++++----------------- editeng/source/editeng/impedit2.cxx | 35 ++++++++++++++++------------------- 2 files changed, 32 insertions(+), 36 deletions(-) (limited to 'editeng') diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 297bef58fd8a..7b85ca2b4a31 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -473,23 +473,6 @@ private: OnDemandLocaleDataWrapper xLocaleDataWrapper; OnDemandTransliterationWrapper xTransliterationWrapper; - bool bKernAsianPunctuation:1; - bool bAddExtLeading:1; - bool bIsFormatting:1; - bool bFormatted:1; - bool bInSelection:1; - bool bIsInUndo:1; - bool bUpdate:1; - bool bUndoEnabled:1; - bool bOwnerOfRefDev:1; - bool bDowning:1; - bool bUseAutoColor:1; - bool bForceAutoColor:1; - bool bCallParaInsertedOrDeleted:1; - bool bImpConvertFirstCall:1; // specifies if ImpConvert is called the very first time after Convert was called - bool bFirstWordCapitalization:1; // specifies if auto-correction should capitalize the first word or not - bool mbLastTryMerge:1; - // For Formatting / Update .... boost::ptr_vector aDeletedNodes; Rectangle aInvalidRec; @@ -517,6 +500,22 @@ private: rtl::Reference xForbiddenCharsTable; + bool bKernAsianPunctuation:1; + bool bAddExtLeading:1; + bool bIsFormatting:1; + bool bFormatted:1; + bool bInSelection:1; + bool bIsInUndo:1; + bool bUpdate:1; + bool bUndoEnabled:1; + bool bOwnerOfRefDev:1; + bool bDowning:1; + bool bUseAutoColor:1; + bool bForceAutoColor:1; + bool bCallParaInsertedOrDeleted:1; + bool bImpConvertFirstCall:1; // specifies if ImpConvert is called the very first time after Convert was called + bool bFirstWordCapitalization:1; // specifies if auto-correction should capitalize the first word or not + bool mbLastTryMerge:1; // ================================================================ // Methods... diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 5743dc33fc5f..8e2cd809b6a7 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -94,7 +94,22 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : aMaxAutoPaperSize( 0x7FFFFFFF, 0x7FFFFFFF ), aEditDoc( pItemPool ), aWordDelimiters( RTL_CONSTASCII_USTRINGPARAM( " .,;:-'`'?!_=\"{}()[]\0xFF" ) ), - aGroupChars( RTL_CONSTASCII_USTRINGPARAM( "{}()[]" ) ) + aGroupChars( RTL_CONSTASCII_USTRINGPARAM( "{}()[]" ) ), + bKernAsianPunctuation(false), + bAddExtLeading(false), + bIsFormatting(false), + bFormatted(false), + bIsInUndo(false), + bUpdate(true), + bUndoEnabled(true), + bOwnerOfRefDev(false), + bDowning(false), + bUseAutoColor(true), + bForceAutoColor(false), + bCallParaInsertedOrDeleted(false), + bImpConvertFirstCall(false), + bFirstWordCapitalization(true), + mbLastTryMerge(false) { pEditEngine = pEE; pRefDev = NULL; @@ -120,26 +135,10 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : nStretchX = 100; nStretchY = 100; - bInSelection = false; - bOwnerOfRefDev = false; - bDowning = false; - bIsInUndo = false; - bIsFormatting = false; - bFormatted = false; - bUpdate = true; - bUseAutoColor = true; - bForceAutoColor = false; - bAddExtLeading = false; - bUndoEnabled = true; - bCallParaInsertedOrDeleted = false; - bImpConvertFirstCall= false; - bFirstWordCapitalization = true; - eDefLanguage = LANGUAGE_DONTKNOW; maBackgroundColor = COL_AUTO; nAsianCompressionMode = text::CharacterCompressionType::NONE; - bKernAsianPunctuation = false; eDefaultHorizontalTextDirection = EE_HTEXTDIR_DEFAULT; @@ -169,8 +168,6 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : bCallParaInsertedOrDeleted = true; aEditDoc.SetModifyHdl( LINK( this, ImpEditEngine, DocModified ) ); - - mbLastTryMerge = false; } ImpEditEngine::~ImpEditEngine() -- cgit