diff options
author | Malte Timmermann [mt] <malte.timmermann@oracle.com> | 2011-02-15 17:14:59 +0100 |
---|---|---|
committer | Malte Timmermann [mt] <malte.timmermann@oracle.com> | 2011-02-15 17:14:59 +0100 |
commit | 6aa45bbe9dbaa96e1b365f22969e1ad3d7ce9553 (patch) | |
tree | 46f9ccd7d99842ee5ed4f3683686783d2e17590d /svx/source/dialog/srchdlg.cxx | |
parent | 72f6e25f3d79a789caaa3ba190a85dbf1b65a693 (diff) | |
parent | cd0d6a5a6775f197fdb7e78b54c8133074a7a236 (diff) |
accfixes: merged to m100
Diffstat (limited to 'svx/source/dialog/srchdlg.cxx')
-rw-r--r-- | svx/source/dialog/srchdlg.cxx | 272 |
1 files changed, 136 insertions, 136 deletions
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 23fd4cc69aaa..97dc2cfaf76d 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -107,7 +107,7 @@ SV_IMPL_VARARR(SrchAttrItemList, SearchAttrItem); // rBindings.ExecuteSynchron( nId, (const SfxPoolItem**)&pSearchItem, 0L ) #define GetCheckBoxValue( rBox ) \ - rBox.IsEnabled() ? rBox.IsChecked() : FALSE + rBox.IsEnabled() ? rBox.IsChecked() : sal_False #if ENABLE_LAYOUT #undef SVX_RES @@ -119,11 +119,11 @@ struct SearchDlg_Impl FixedText aSearchFormats; FixedText aReplaceFormats; - BOOL bMultiLineEdit : 1, + sal_Bool bMultiLineEdit : 1, bSaveToModule : 1, bFocusOnSearch : 1, bDeltaCalculated : 1; - USHORT* pRanges; + sal_uInt16* pRanges; Timer aSelectionTimer; uno::Reference< frame::XDispatch > xCommand1Dispatch; @@ -138,10 +138,10 @@ struct SearchDlg_Impl #endif /* !ENABLE_LAYOUT */ aSearchFormats ( pParent, SVX_RES( FT_SEARCH_FORMATS ) ), aReplaceFormats ( pParent, SVX_RES( FT_REPLACE_FORMATS ) ), - bMultiLineEdit ( FALSE ), - bSaveToModule ( TRUE ), - bFocusOnSearch ( TRUE ), - bDeltaCalculated( FALSE ), + bMultiLineEdit ( sal_False ), + bSaveToModule ( sal_True ), + bFocusOnSearch ( sal_True ), + bDeltaCalculated( sal_False ), pRanges ( NULL ) { aCommand1URL.Complete = aCommand1URL.Main = rtl::OUString::createFromAscii("vnd.sun.search:SearchViaComponent1"); @@ -156,14 +156,14 @@ struct SearchDlg_Impl // ----------------------------------------------------------------------- -void ListToStrArr_Impl( USHORT nId, SvStringsDtor& rStrLst, ComboBox& rCBox ) +void ListToStrArr_Impl( sal_uInt16 nId, SvStringsDtor& rStrLst, ComboBox& rCBox ) { SfxStringListItem* pSrchItem = (SfxStringListItem*)SFX_APP()->GetItem( nId ); List* pLst = pSrchItem ? pSrchItem->GetList() : 0; if ( pLst ) - for ( USHORT i = 0; i < pLst->Count(); ++i ) + for ( sal_uInt16 i = 0; i < pLst->Count(); ++i ) { String* pTmp = new String( *(String*)( pLst->GetObject(i) ) ); rStrLst.Insert( pTmp, rStrLst.Count() ); @@ -173,12 +173,12 @@ void ListToStrArr_Impl( USHORT nId, SvStringsDtor& rStrLst, ComboBox& rCBox ) // ----------------------------------------------------------------------- -void StrArrToList_Impl( USHORT nId, const SvStringsDtor& rStrLst ) +void StrArrToList_Impl( sal_uInt16 nId, const SvStringsDtor& rStrLst ) { DBG_ASSERT( rStrLst.Count(), "vorher abpruefen!!" ); List aLst; - for ( USHORT i = 0; i < rStrLst.Count(); ++i ) + for ( sal_uInt16 i = 0; i < rStrLst.Count(); ++i ) aLst.Insert( rStrLst[ i ], LIST_APPEND ); SFX_APP()->PutItem( SfxStringListItem( nId, &aLst ) ); @@ -188,13 +188,13 @@ void StrArrToList_Impl( USHORT nId, const SvStringsDtor& rStrLst ) SearchAttrItemList::SearchAttrItemList( const SearchAttrItemList& rList ) : - SrchAttrItemList( (BYTE)rList.Count() ) + SrchAttrItemList( (sal_uInt8)rList.Count() ) { SrchAttrItemList::Insert( &rList, 0 ); SearchAttrItem* _pData = (SearchAttrItem*)GetData(); - for ( USHORT i = Count(); i; --i, ++_pData ) + for ( sal_uInt16 i = Count(); i; --i, ++_pData ) if ( !IsInvalidItem( _pData->pItem ) ) _pData->pItem = _pData->pItem->Clone(); } @@ -217,9 +217,9 @@ void SearchAttrItemList::Put( const SfxItemSet& rSet ) SfxItemIter aIter( rSet ); SearchAttrItem aItem; const SfxPoolItem* pItem = aIter.GetCurItem(); - USHORT nWhich; + sal_uInt16 nWhich; - while ( TRUE ) + while ( sal_True ) { // nur testen, ob vorhanden ist ? if( IsInvalidItem( pItem ) ) @@ -249,7 +249,7 @@ SfxItemSet& SearchAttrItemList::Get( SfxItemSet& rSet ) SfxItemPool* pPool = rSet.GetPool(); SearchAttrItem* _pData = (SearchAttrItem*)GetData(); - for ( USHORT i = Count(); i; --i, ++_pData ) + for ( sal_uInt16 i = Count(); i; --i, ++_pData ) if ( IsInvalidItem( _pData->pItem ) ) rSet.InvalidateItem( pPool->GetWhich( _pData->nSlot ) ); else @@ -263,7 +263,7 @@ void SearchAttrItemList::Clear() { SearchAttrItem* _pData = (SearchAttrItem*)GetData(); - for ( USHORT i = Count(); i; --i, ++_pData ) + for ( sal_uInt16 i = Count(); i; --i, ++_pData ) if ( !IsInvalidItem( _pData->pItem ) ) delete _pData->pItem; SrchAttrItemList::Remove( 0, Count() ); @@ -272,13 +272,13 @@ void SearchAttrItemList::Clear() // ----------------------------------------------------------------------- // l"oscht die Pointer auf die Items -void SearchAttrItemList::Remove( USHORT nPos, USHORT nLen ) +void SearchAttrItemList::Remove( sal_uInt16 nPos, sal_uInt16 nLen ) { if ( nPos + nLen > Count() ) nLen = Count() - nPos; SearchAttrItem* _pData = (SearchAttrItem*)GetData() + nPos; - for ( USHORT n = nLen; n; --n, ++_pData ) + for ( sal_uInt16 n = nLen; n; --n, ++_pData ) if ( !IsInvalidItem( _pData->pItem ) ) delete _pData->pItem; @@ -341,13 +341,13 @@ void SearchAttrItemList::Remove( USHORT nPos, USHORT nLen ) aColumnsBtn ( this, SVX_RES( RB_CALC_COLUMNS ) ), \ aAllSheetsCB ( this, SVX_RES( CB_ALL_SHEETS ) ), \ rBindings ( rBind ), \ - bWriter ( FALSE ), \ - bSearch ( TRUE ), \ - bFormat ( FALSE ), \ + bWriter ( sal_False ), \ + bSearch ( sal_True ), \ + bFormat ( sal_False ), \ nOptions ( USHRT_MAX ), \ - bSet ( FALSE ), \ - bReadOnly ( FALSE ), \ - bConstruct ( TRUE ), \ + bSet ( sal_False ), \ + bReadOnly ( sal_False ), \ + bConstruct ( sal_True ), \ nModifyFlag ( 0 ), \ aCalcStr ( THIS_SVX_RES( STR_WORDCALC ) ), \ pImpl ( NULL ), \ @@ -486,7 +486,7 @@ void SvxSearchDialog::Construct_Impl() SvtCJKOptions aCJKOptions; if(!aCJKOptions.IsJapaneseFindEnabled()) { - aJapOptionsCB.Check( FALSE ); + aJapOptionsCB.Check( sal_False ); aJapOptionsCB.Hide(); aJapOptionsBtn.Hide(); } @@ -624,7 +624,7 @@ void SvxSearchDialog::Construct_Impl() // ----------------------------------------------------------------------- -BOOL SvxSearchDialog::Close() +sal_Bool SvxSearchDialog::Close() { // remember strings speichern if ( aSearchStrings.Count() ) @@ -649,12 +649,12 @@ BOOL SvxSearchDialog::Close() rBindings.GetDispatcher()->Execute( FID_SEARCH_OFF, SFX_CALLMODE_SLOT, ppArgs ); rBindings.Execute( SID_SEARCH_DLG ); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- -INT32 SvxSearchDialog::GetTransliterationFlags() const +sal_Int32 SvxSearchDialog::GetTransliterationFlags() const { if (!aMatchCaseCB.IsChecked()) nTransliterationFlags |= TransliterationModules_IGNORE_CASE; @@ -669,10 +669,10 @@ INT32 SvxSearchDialog::GetTransliterationFlags() const // ----------------------------------------------------------------------- -void SvxSearchDialog::ApplyTransliterationFlags_Impl( INT32 nSettings ) +void SvxSearchDialog::ApplyTransliterationFlags_Impl( sal_Int32 nSettings ) { nTransliterationFlags = nSettings; - BOOL bVal = 0 != (nSettings & TransliterationModules_IGNORE_CASE); + sal_Bool bVal = 0 != (nSettings & TransliterationModules_IGNORE_CASE); aMatchCaseCB .Check(!bVal ); bVal = 0 != (nSettings & TransliterationModules_IGNORE_WIDTH); aJapMatchFullHalfWidthCB.Check( !bVal ); @@ -696,9 +696,9 @@ void SvxSearchDialog::Activate() void SvxSearchDialog::InitControls_Impl() { // CaseSensitives AutoComplete - aSearchLB.EnableAutocomplete( TRUE, TRUE ); + aSearchLB.EnableAutocomplete( sal_True, sal_True ); aSearchLB.Show(); - aReplaceLB.EnableAutocomplete( TRUE, TRUE ); + aReplaceLB.EnableAutocomplete( sal_True, sal_True ); aReplaceLB.Show(); aFormatBtn.Disable(); @@ -798,9 +798,9 @@ void SvxSearchDialog::CalculateDelta_Impl() if ( pImpl->bDeltaCalculated ) return; else - pImpl->bDeltaCalculated = TRUE; + pImpl->bDeltaCalculated = sal_True; - ULONG nDelta = 187, nOffset = 0; + sal_uIntPtr nDelta = 187, nOffset = 0; SvtCJKOptions aCJKOptions; pMoreBtn->AddWindow( &aOptionsFL ); @@ -939,7 +939,7 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern ) DBG_ASSERT( pSearchItem, "SearchItem == 0" ); bWriter = ( pSearchItem->GetAppFlag() == SVX_SEARCHAPP_WRITER ); - pImpl->bMultiLineEdit = FALSE; + pImpl->bMultiLineEdit = sal_False; if ( !pImpl->bMultiLineEdit ) { @@ -987,7 +987,7 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern ) CalculateDelta_Impl(); - FASTBOOL bDraw = FALSE; + bool bDraw = sal_False; if ( pSearchItem->GetAppFlag() == SVX_SEARCHAPP_CALC ) { Link aLink = LINK( this, SvxSearchDialog, FlagHdl_Impl ); @@ -1045,7 +1045,7 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern ) aFormatBtn.Hide(); aNoFormatBtn.Hide(); aAttributeBtn.Hide(); - bDraw = TRUE; + bDraw = sal_True; } else { @@ -1071,7 +1071,7 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern ) aAttributeBtn.Show(); */ } -// pMoreBtn->SetState( FALSE ); +// pMoreBtn->SetState( sal_False ); // pMoreBtn->Hide(); } @@ -1084,25 +1084,25 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern ) // "Ahnlichkeitssuche? if ( ( nModifyFlag & MODIFY_SIMILARITY ) == 0 ) aSimilarityBox.Check( pSearchItem->IsLevenshtein() ); - bSet = TRUE; + bSet = sal_True; - pImpl->bSaveToModule = FALSE; + pImpl->bSaveToModule = sal_False; FlagHdl_Impl( &aSimilarityBox ); FlagHdl_Impl( &aJapOptionsCB ); - pImpl->bSaveToModule = TRUE; + pImpl->bSaveToModule = sal_True; - FASTBOOL bDisableSearch = FALSE; + bool bDisableSearch = sal_False; SfxViewShell* pViewShell = SfxViewShell::Current(); if ( pViewShell ) { - BOOL bText = !bSearchPattern; + sal_Bool bText = !bSearchPattern; if ( pViewShell->HasSelection( bText ) ) EnableControl_Impl( &aSelectionBtn ); else { - aSelectionBtn.Check( FALSE ); + aSelectionBtn.Check( sal_False ); aSelectionBtn.Disable(); } } @@ -1150,14 +1150,14 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern ) } else { - FASTBOOL bSetSearch = ( ( nModifyFlag & MODIFY_SEARCH ) == 0 ); - FASTBOOL bSetReplace = ( ( nModifyFlag & MODIFY_REPLACE ) == 0 ); + bool bSetSearch = ( ( nModifyFlag & MODIFY_SEARCH ) == 0 ); + bool bSetReplace = ( ( nModifyFlag & MODIFY_REPLACE ) == 0 ); if ( pSearchItem->GetSearchString().Len() && bSetSearch ) aSearchLB.SetText( pSearchItem->GetSearchString() ); else if ( aSearchStrings.Count() ) { - FASTBOOL bAttributes = + bool bAttributes = ( ( pSearchList && pSearchList->Count() ) || ( pReplaceList && pReplaceList->Count() ) ); @@ -1240,9 +1240,9 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern ) if ( aLayoutBtn.IsChecked() ) { - pImpl->bSaveToModule = FALSE; + pImpl->bSaveToModule = sal_False; TemplateHdl_Impl( &aLayoutBtn ); - pImpl->bSaveToModule = TRUE; + pImpl->bSaveToModule = sal_True; } } @@ -1257,8 +1257,8 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet, if ( !pImpl->pRanges && pSSet ) { sal_sSize nCnt = 0; - const USHORT* pPtr = pSSet->GetRanges(); - const USHORT* pTmp = pPtr; + const sal_uInt16* pPtr = pSSet->GetRanges(); + const sal_uInt16* pTmp = pPtr; while( *pPtr ) { @@ -1266,8 +1266,8 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet, pPtr += 2; } nCnt = pPtr - pTmp + 1; - pImpl->pRanges = new USHORT[nCnt]; - memcpy( pImpl->pRanges, pTmp, sizeof(USHORT) * nCnt ); + pImpl->pRanges = new sal_uInt16[nCnt]; + memcpy( pImpl->pRanges, pTmp, sizeof(sal_uInt16) * nCnt ); } // sorge daf"ur, das die Texte der Attribute richtig stehen @@ -1283,12 +1283,12 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet, pSearchList->Put( *pSSet ); if ( !pImpl->bMultiLineEdit ) - aSearchAttrText.SetText( BuildAttrText_Impl( aDesc, TRUE ) ); + aSearchAttrText.SetText( BuildAttrText_Impl( aDesc, sal_True ) ); else - pImpl->aSearchFormats.SetText( BuildAttrText_Impl( aDesc, TRUE ) ); + pImpl->aSearchFormats.SetText( BuildAttrText_Impl( aDesc, sal_True ) ); if ( aDesc.Len() ) - bFormat |= TRUE; + bFormat |= sal_True; } } @@ -1302,12 +1302,12 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet, pReplaceList->Put( *pRSet ); if ( !pImpl->bMultiLineEdit ) - aReplaceAttrText.SetText( BuildAttrText_Impl( aDesc, FALSE ) ); + aReplaceAttrText.SetText( BuildAttrText_Impl( aDesc, sal_False ) ); else - pImpl->aReplaceFormats.SetText( BuildAttrText_Impl( aDesc, FALSE ) ); + pImpl->aReplaceFormats.SetText( BuildAttrText_Impl( aDesc, sal_False ) ); if ( aDesc.Len() ) - bFormat |= TRUE; + bFormat |= sal_True; } } } @@ -1319,23 +1319,23 @@ IMPL_LINK( SvxSearchDialog, FlagHdl_Impl, Control *, pCtrl ) if ( pCtrl && !bSet ) SetModifyFlag_Impl( pCtrl ); else - bSet = FALSE; + bSet = sal_False; if ( pCtrl == &aSimilarityBox ) { - BOOL bIsChecked = aSimilarityBox.IsChecked(); + sal_Bool bIsChecked = aSimilarityBox.IsChecked(); if ( bIsChecked ) { aSimilarityBtn.Enable(); - aRegExpBtn.Check( FALSE ); + aRegExpBtn.Check( sal_False ); aRegExpBtn.Disable(); EnableControl_Impl( &aWordBtn ); if ( aLayoutBtn.IsChecked() ) { EnableControl_Impl( &aMatchCaseCB ); - aLayoutBtn.Check( FALSE ); + aLayoutBtn.Check( sal_False ); } aRegExpBtn.Disable(); aLayoutBtn.Disable(); @@ -1373,11 +1373,11 @@ IMPL_LINK( SvxSearchDialog, FlagHdl_Impl, Control *, pCtrl ) { if ( aLayoutBtn.IsChecked() && !bFormat ) { - aWordBtn.Check( FALSE ); + aWordBtn.Check( sal_False ); aWordBtn.Disable(); - aRegExpBtn.Check( FALSE ); + aRegExpBtn.Check( sal_False ); aRegExpBtn.Disable(); - aMatchCaseCB.Check( FALSE ); + aMatchCaseCB.Check( sal_False ); aMatchCaseCB.Disable(); aNotesBtn.Disable(); @@ -1397,7 +1397,7 @@ IMPL_LINK( SvxSearchDialog, FlagHdl_Impl, Control *, pCtrl ) if ( aRegExpBtn.IsChecked() ) { - aWordBtn.Check( FALSE ); + aWordBtn.Check( sal_False ); aWordBtn.Disable(); aSimilarityBox.Disable(); aSimilarityBtn.Disable(); @@ -1409,7 +1409,7 @@ IMPL_LINK( SvxSearchDialog, FlagHdl_Impl, Control *, pCtrl ) } // Such-String vorhanden? dann Buttons enablen - bSet = TRUE; + bSet = sal_True; ModifyHdl_Impl( &aSearchLB ); } } @@ -1420,14 +1420,14 @@ IMPL_LINK( SvxSearchDialog, FlagHdl_Impl, Control *, pCtrl ) aSearchAllBtn.Disable(); else { - bSet = TRUE; + bSet = sal_True; ModifyHdl_Impl( &aSearchLB ); } } if ( &aJapOptionsCB == pCtrl ) { - BOOL bEnableJapOpt = aJapOptionsCB.IsChecked(); + sal_Bool bEnableJapOpt = aJapOptionsCB.IsChecked(); aMatchCaseCB .Enable(!bEnableJapOpt ); aJapMatchFullHalfWidthCB.Enable(!bEnableJapOpt ); aJapOptionsBtn .Enable( bEnableJapOpt ); @@ -1442,7 +1442,7 @@ IMPL_LINK( SvxSearchDialog, FlagHdl_Impl, Control *, pCtrl ) IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn ) { - FASTBOOL bInclusive = ( aLayoutBtn.GetText() == aLayoutStr ); + bool bInclusive = ( aLayoutBtn.GetText() == aLayoutStr ); if ( ( pBtn == &aSearchBtn ) || ( pBtn == &aSearchAllBtn ) || @@ -1460,22 +1460,22 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn ) pSearchItem->SetReplaceString( aReplaceLB.GetText() ); if ( pBtn == &aReplaceBtn ) - Remember_Impl( aReplaceLB.GetText(), FALSE ); + Remember_Impl( aReplaceLB.GetText(), sal_False ); else { - Remember_Impl( aSearchLB.GetText(), TRUE ); + Remember_Impl( aSearchLB.GetText(), sal_True ); if ( pBtn == &aReplaceAllBtn ) - Remember_Impl( aReplaceLB.GetText(), FALSE ); + Remember_Impl( aReplaceLB.GetText(), sal_False ); } } - pSearchItem->SetRegExp( FALSE ); - pSearchItem->SetLevenshtein( FALSE ); + pSearchItem->SetRegExp( sal_False ); + pSearchItem->SetLevenshtein( sal_False ); if (GetCheckBoxValue( aRegExpBtn )) - pSearchItem->SetRegExp( TRUE ); + pSearchItem->SetRegExp( sal_True ); else if (GetCheckBoxValue( aSimilarityBox )) - pSearchItem->SetLevenshtein( TRUE ); + pSearchItem->SetLevenshtein( sal_True ); pSearchItem->SetWordOnly( GetCheckBoxValue( aWordBtn ) ); pSearchItem->SetBackward( GetCheckBoxValue( aBackwardsBtn ) ); @@ -1484,7 +1484,7 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn ) pSearchItem->SetSelection( GetCheckBoxValue( aSelectionBtn ) ); pSearchItem->SetUseAsianOptions( GetCheckBoxValue( aJapOptionsCB ) ); - INT32 nFlags = GetTransliterationFlags(); + sal_Int32 nFlags = GetTransliterationFlags(); if( !pSearchItem->IsUseAsianOptions()) nFlags &= (TransliterationModules_IGNORE_CASE | TransliterationModules_IGNORE_WIDTH ); @@ -1528,11 +1528,11 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn ) String aStr( aSearchLB.GetText() ); if ( aStr.Len() ) - Remember_Impl( aStr, TRUE ); + Remember_Impl( aStr, sal_True ); aStr = aReplaceLB.GetText(); if ( aStr.Len() ) - Remember_Impl( aStr, FALSE ); + Remember_Impl( aStr, sal_False ); } SaveToModule_Impl(); Close(); @@ -1578,7 +1578,7 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn ) int nRet = aDlg->Execute(); //CHINA001 int nRet = aDlg.Execute(); if (RET_OK == nRet) //! true only if FillItemSet of SvxJSearchOptionsPage returns true { - INT32 nFlags = aDlg->GetTransliterationFlags(); //CHINA001 INT32 nFlags = aDlg.GetTransliterationFlags(); + sal_Int32 nFlags = aDlg->GetTransliterationFlags(); //CHINA001 sal_Int32 nFlags = aDlg.GetTransliterationFlags(); pSearchItem->SetTransliterationFlags( nFlags ); ApplyTransliterationFlags_Impl( nFlags ); } @@ -1615,7 +1615,7 @@ IMPL_LINK( SvxSearchDialog, ModifyHdl_Impl, ComboBox *, pEd ) if ( !bSet ) SetModifyFlag_Impl( pEd ); else - bSet = FALSE; + bSet = sal_False; if ( pEd == &aSearchLB || pEd == &aReplaceLB ) { @@ -1665,7 +1665,7 @@ IMPL_LINK( SvxSearchDialog, TemplateHdl_Impl, Button *, EMPTYARG ) { if ( !pFamilyController ) { - USHORT nId = 0; + sal_uInt16 nId = 0; // Vorlagen-Controller enablen switch ( pSearchItem->GetFamily() ) @@ -1732,13 +1732,13 @@ IMPL_LINK( SvxSearchDialog, TemplateHdl_Impl, Button *, EMPTYARG ) if ( !pImpl->bMultiLineEdit ) { - aSearchAttrText.SetText( BuildAttrText_Impl( sDesc, TRUE ) ); - aReplaceAttrText.SetText( BuildAttrText_Impl( sDesc, FALSE ) ); + aSearchAttrText.SetText( BuildAttrText_Impl( sDesc, sal_True ) ); + aReplaceAttrText.SetText( BuildAttrText_Impl( sDesc, sal_False ) ); } else { - pImpl->aSearchFormats.SetText( BuildAttrText_Impl( sDesc, TRUE ) ); - pImpl->aReplaceFormats.SetText( BuildAttrText_Impl( sDesc, FALSE ) ); + pImpl->aSearchFormats.SetText( BuildAttrText_Impl( sDesc, sal_True ) ); + pImpl->aReplaceFormats.SetText( BuildAttrText_Impl( sDesc, sal_False ) ); } EnableControl_Impl( &aFormatBtn ); @@ -1747,16 +1747,16 @@ IMPL_LINK( SvxSearchDialog, TemplateHdl_Impl, Button *, EMPTYARG ) FocusHdl_Impl( bSearch ? &aSearchLB : &aReplaceLB ); } - bSet = TRUE; - pImpl->bSaveToModule = FALSE; + bSet = sal_True; + pImpl->bSaveToModule = sal_False; FlagHdl_Impl( &aLayoutBtn ); - pImpl->bSaveToModule = TRUE; + pImpl->bSaveToModule = sal_True; return 0; } // ----------------------------------------------------------------------- -void SvxSearchDialog::Remember_Impl( const String &rStr,BOOL _bSearch ) +void SvxSearchDialog::Remember_Impl( const String &rStr,sal_Bool _bSearch ) { if ( !rStr.Len() ) return; @@ -1765,7 +1765,7 @@ void SvxSearchDialog::Remember_Impl( const String &rStr,BOOL _bSearch ) ComboBox* pListBox = _bSearch ? &aSearchLB : &aReplaceLB; // identische Strings ignorieren - for ( USHORT i = 0; i < pArr->Count(); ++i ) + for ( sal_uInt16 i = 0; i < pArr->Count(); ++i ) { if ( COMPARE_EQUAL == (*pArr)[i]->CompareTo( rStr ) ) return; @@ -1777,7 +1777,7 @@ void SvxSearchDialog::Remember_Impl( const String &rStr,BOOL _bSearch ) if ( pArr->Count() >= REMEMBER_SIZE ) { pInsStr = (*pArr)[REMEMBER_SIZE - 1]; - pListBox->RemoveEntry( USHORT(REMEMBER_SIZE - 1) ); + pListBox->RemoveEntry( sal_uInt16(REMEMBER_SIZE - 1) ); pArr->Remove( REMEMBER_SIZE - 1 ); *pInsStr = rStr; } @@ -1792,14 +1792,14 @@ void SvxSearchDialog::Remember_Impl( const String &rStr,BOOL _bSearch ) void SvxSearchDialog::TemplatesChanged_Impl( SfxStyleSheetBasePool& rPool ) { -// SetUpdateMode( FALSE ); +// SetUpdateMode( sal_False ); String aOldSrch( aSearchTmplLB .GetSelectEntry() ); String aOldRepl( aReplaceTmplLB.GetSelectEntry() ); aSearchTmplLB .Clear(); aReplaceTmplLB.Clear(); rPool.SetSearchMask( pSearchItem->GetFamily(), SFXSTYLEBIT_ALL ); - aSearchTmplLB.SetUpdateMode( FALSE ); - aReplaceTmplLB.SetUpdateMode( FALSE ); + aSearchTmplLB.SetUpdateMode( sal_False ); + aReplaceTmplLB.SetUpdateMode( sal_False ); SfxStyleSheetBase* pBase = rPool.First(); while ( pBase ) @@ -1809,8 +1809,8 @@ void SvxSearchDialog::TemplatesChanged_Impl( SfxStyleSheetBasePool& rPool ) aReplaceTmplLB.InsertEntry( pBase->GetName() ); pBase = rPool.Next(); } - aSearchTmplLB.SetUpdateMode( TRUE ); - aReplaceTmplLB.SetUpdateMode( TRUE ); + aSearchTmplLB.SetUpdateMode( sal_True ); + aReplaceTmplLB.SetUpdateMode( sal_True ); aSearchTmplLB.SelectEntryPos(0); if ( aOldSrch.Len() ) @@ -1828,12 +1828,12 @@ void SvxSearchDialog::TemplatesChanged_Impl( SfxStyleSheetBasePool& rPool ) EnableControl_Impl( &aReplaceAllBtn ); } // FlagHdl_Impl(0); -// SetUpdateMode( TRUE ); +// SetUpdateMode( sal_True ); } // ----------------------------------------------------------------------- -void SvxSearchDialog::EnableControls_Impl( const USHORT nFlags ) +void SvxSearchDialog::EnableControls_Impl( const sal_uInt16 nFlags ) { if ( nFlags == nOptions ) return; @@ -1850,19 +1850,19 @@ void SvxSearchDialog::EnableControls_Impl( const USHORT nFlags ) } else if ( !IsVisible() ) Show(); - FASTBOOL bNoSearch = TRUE; + bool bNoSearch = sal_True; sal_Bool bEnableSearch = ( SEARCH_OPTIONS_SEARCH & nOptions ) != 0; aSearchBtn.Enable(bEnableSearch); if( bEnableSearch ) - bNoSearch = FALSE; + bNoSearch = sal_False; if ( ( SEARCH_OPTIONS_SEARCH_ALL & nOptions ) != 0 ) { aSearchAllBtn.Enable(); - bNoSearch = FALSE; + bNoSearch = sal_False; } else aSearchAllBtn.Disable(); @@ -1872,7 +1872,7 @@ void SvxSearchDialog::EnableControls_Impl( const USHORT nFlags ) aReplaceText.Enable(); aReplaceLB.Enable(); aReplaceTmplLB.Enable(); - bNoSearch = FALSE; + bNoSearch = sal_False; } else { @@ -1884,7 +1884,7 @@ void SvxSearchDialog::EnableControls_Impl( const USHORT nFlags ) if ( ( SEARCH_OPTIONS_REPLACE_ALL & nOptions ) != 0 ) { aReplaceAllBtn.Enable(); - bNoSearch = FALSE; + bNoSearch = sal_False; } else aReplaceAllBtn.Disable(); @@ -1941,7 +1941,7 @@ void SvxSearchDialog::EnableControls_Impl( const USHORT nFlags ) pMoreBtn->Enable(); else { - pMoreBtn->SetState( FALSE ); + pMoreBtn->SetState( sal_False ); pMoreBtn->Disable(); } */ @@ -2080,9 +2080,9 @@ IMPL_LINK( SvxSearchDialog, FocusHdl_Impl, Control *, pCtrl ) if ( pCtrl == &aSearchLB || pCtrl == &pImpl->aSearchFormats ) { if ( pCtrl->HasChildPathFocus() ) - pImpl->bFocusOnSearch = TRUE; + pImpl->bFocusOnSearch = sal_True; pCtrl = &aSearchLB; - bSearch = TRUE; + bSearch = sal_True; if( nTxtLen ) EnableControl_Impl( &aNoFormatBtn ); @@ -2092,9 +2092,9 @@ IMPL_LINK( SvxSearchDialog, FocusHdl_Impl, Control *, pCtrl ) } else { - pImpl->bFocusOnSearch = FALSE; + pImpl->bFocusOnSearch = sal_False; pCtrl = &aReplaceLB; - bSearch = FALSE; + bSearch = sal_False; if ( ( !pImpl->bMultiLineEdit && aReplaceAttrText.GetText().Len() ) || ( pImpl->bMultiLineEdit && pImpl->aReplaceFormats.GetText().Len() ) ) @@ -2103,7 +2103,7 @@ IMPL_LINK( SvxSearchDialog, FocusHdl_Impl, Control *, pCtrl ) aNoFormatBtn.Disable(); aAttributeBtn.Disable(); } - bSet = TRUE; + bSet = sal_True; aSearchLB.SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) ); @@ -2133,14 +2133,14 @@ IMPL_LINK( SvxSearchDialog, FormatHdl_Impl, Button *, EMPTYARG ) return 0; sal_sSize nCnt = 0; - const USHORT* pPtr = pImpl->pRanges; - const USHORT* pTmp = pPtr; + const sal_uInt16* pPtr = pImpl->pRanges; + const sal_uInt16* pTmp = pPtr; while( *pTmp ) pTmp++; nCnt = pTmp - pPtr + 7; - USHORT* pWhRanges = new USHORT[nCnt]; - USHORT nPos = 0; + sal_uInt16* pWhRanges = new sal_uInt16[nCnt]; + sal_uInt16 nPos = 0; while( *pPtr ) { @@ -2150,7 +2150,7 @@ IMPL_LINK( SvxSearchDialog, FormatHdl_Impl, Button *, EMPTYARG ) pWhRanges[nPos++] = SID_ATTR_PARA_MODEL; pWhRanges[nPos++] = SID_ATTR_PARA_MODEL; - USHORT nBrushWhich = pSh->GetPool().GetWhich(SID_ATTR_BRUSH); + sal_uInt16 nBrushWhich = pSh->GetPool().GetWhich(SID_ATTR_BRUSH); pWhRanges[nPos++] = nBrushWhich; pWhRanges[nPos++] = nBrushWhich; pWhRanges[nPos++] = SID_PARA_BACKGRND_DESTINATION; @@ -2196,10 +2196,10 @@ IMPL_LINK( SvxSearchDialog, FormatHdl_Impl, Button *, EMPTYARG ) SearchAttrItem* pAItem; const SfxPoolItem* pItem; - for( USHORT n = 0; n < pList->Count(); ++n ) + for( sal_uInt16 n = 0; n < pList->Count(); ++n ) if( !IsInvalidItem( (pAItem = &pList->GetObject(n))->pItem ) && SFX_ITEM_SET == aOutSet.GetItemState( - pAItem->pItem->Which(), FALSE, &pItem ) ) + pAItem->pItem->Which(), sal_False, &pItem ) ) { delete pAItem->pItem; pAItem->pItem = pItem->Clone(); @@ -2222,8 +2222,8 @@ IMPL_LINK( SvxSearchDialog, FormatHdl_Impl, Button *, EMPTYARG ) IMPL_LINK( SvxSearchDialog, NoFormatHdl_Impl, Button *, EMPTYARG ) { aLayoutBtn.SetText( aStylesStr ); - bFormat = FALSE; - aLayoutBtn.Check( FALSE ); + bFormat = sal_False; + aLayoutBtn.Check( sal_False ); if ( bSearch ) { @@ -2241,9 +2241,9 @@ IMPL_LINK( SvxSearchDialog, NoFormatHdl_Impl, Button *, EMPTYARG ) pImpl->aReplaceFormats.SetText( String() ); pReplaceList->Clear(); } - pImpl->bSaveToModule = FALSE; + pImpl->bSaveToModule = sal_False; TemplateHdl_Impl( &aLayoutBtn ); - pImpl->bSaveToModule = TRUE; + pImpl->bSaveToModule = sal_True; aNoFormatBtn.Disable(); return 0; } @@ -2280,7 +2280,7 @@ IMPL_LINK( SvxSearchDialog, TimeoutHdl_Impl, Timer *, pTimer ) EnableControl_Impl( &aSelectionBtn ); else { - aSelectionBtn.Check( FALSE ); + aSelectionBtn.Check( sal_False ); aSelectionBtn.Disable(); } } @@ -2322,7 +2322,7 @@ void SvxSearchDialog::GetReplaceItems( SfxItemSet& rSet ) // ----------------------------------------------------------------------- String& SvxSearchDialog::BuildAttrText_Impl( String& rStr, - BOOL bSrchFlag ) const + sal_Bool bSrchFlag ) const { if ( rStr.Len() ) rStr.Erase(); @@ -2360,7 +2360,7 @@ String& SvxSearchDialog::BuildAttrText_Impl( String& rStr, ResStringArray aAttrNames( SVX_RES( RID_ATTR_NAMES ) ); - for ( USHORT i = 0; i < pList->Count(); ++i ) + for ( sal_uInt16 i = 0; i < pList->Count(); ++i ) { const SearchAttrItem& rItem = pList->GetObject(i); @@ -2398,7 +2398,7 @@ void SvxSearchDialog::PaintAttrText_Impl() BuildAttrText_Impl( aDesc, bSearch ); if ( !bFormat && aDesc.Len() ) - bFormat = TRUE; + bFormat = sal_True; if ( bSearch ) { @@ -2472,15 +2472,15 @@ void SvxSearchDialog::SaveToModule_Impl() { pSearchItem->SetSearchString ( aSearchLB.GetText() ); pSearchItem->SetReplaceString( aReplaceLB.GetText() ); - Remember_Impl( aSearchLB.GetText(), TRUE ); + Remember_Impl( aSearchLB.GetText(), sal_True ); } - pSearchItem->SetRegExp( FALSE ); - pSearchItem->SetLevenshtein( FALSE ); + pSearchItem->SetRegExp( sal_False ); + pSearchItem->SetLevenshtein( sal_False ); if (GetCheckBoxValue( aRegExpBtn )) - pSearchItem->SetRegExp( TRUE ); + pSearchItem->SetRegExp( sal_True ); else if (GetCheckBoxValue( aSimilarityBox )) - pSearchItem->SetLevenshtein( TRUE ); + pSearchItem->SetLevenshtein( sal_True ); pSearchItem->SetWordOnly( GetCheckBoxValue( aWordBtn ) ); pSearchItem->SetBackward( GetCheckBoxValue( aBackwardsBtn ) ); @@ -2489,7 +2489,7 @@ void SvxSearchDialog::SaveToModule_Impl() pSearchItem->SetSelection( GetCheckBoxValue( aSelectionBtn ) ); pSearchItem->SetUseAsianOptions( GetCheckBoxValue( aJapOptionsCB ) ); - INT32 nFlags = GetTransliterationFlags(); + sal_Int32 nFlags = GetTransliterationFlags(); if( !pSearchItem->IsUseAsianOptions()) nFlags &= (TransliterationModules_IGNORE_CASE | TransliterationModules_IGNORE_WIDTH ); @@ -2516,7 +2516,7 @@ SFX_IMPL_CHILDWINDOW(SvxSearchDialogWrapper, SID_SEARCH_DLG); // ----------------------------------------------------------------------- -SvxSearchDialogWrapper::SvxSearchDialogWrapper( Window* _pParent, USHORT nId, +SvxSearchDialogWrapper::SvxSearchDialogWrapper( Window* _pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ) : SfxChildWindow( _pParent, nId ) @@ -2530,7 +2530,7 @@ SvxSearchDialogWrapper::SvxSearchDialogWrapper( Window* _pParent, USHORT nId, pBindings->Update( SID_SEARCH_SEARCHSET ); pBindings->Update( SID_SEARCH_REPLACESET ); eChildAlignment = SFX_ALIGN_NOALIGNMENT; - dialog->bConstruct = FALSE; + dialog->bConstruct = sal_False; } SvxSearchDialogWrapper::~SvxSearchDialogWrapper () |