summaryrefslogtreecommitdiff
path: root/cui/source/options/optdict.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/options/optdict.cxx')
-rw-r--r--cui/source/options/optdict.cxx42
1 files changed, 24 insertions, 18 deletions
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index 43a88bbe75b5..8eb8916e169d 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -99,12 +99,12 @@ SvxNewDictionaryDialog::SvxNewDictionaryDialog( Window* pParent,
ModalDialog( pParent, CUI_RES( RID_SFXDLG_NEWDICT ) ),
+ aNewDictBox ( this, CUI_RES( GB_NEWDICT ) ),
aNameText ( this, CUI_RES( FT_DICTNAME ) ),
aNameEdit ( this, CUI_RES( ED_DICTNAME ) ),
aLanguageText ( this, CUI_RES( FT_DICTLANG ) ),
aLanguageLB ( this, CUI_RES( LB_DICTLANG ) ),
aExceptBtn ( this, CUI_RES( BTN_EXCEPT ) ),
- aNewDictBox ( this, CUI_RES( GB_NEWDICT ) ),
aOKBtn ( this, CUI_RES( BTN_NEWDICT_OK ) ),
aCancelBtn ( this, CUI_RES( BTN_NEWDICT_ESC ) ),
aHelpBtn ( this, CUI_RES( BTN_NEWDICT_HLP ) ),
@@ -116,9 +116,14 @@ SvxNewDictionaryDialog::SvxNewDictionaryDialog( Window* pParent,
aOKBtn.SetClickHdl( LINK( this, SvxNewDictionaryDialog, OKHdl_Impl ) );
// Sprachen anzeigen
- aLanguageLB.SetLanguageList( LANG_LIST_ALL, TRUE, TRUE );
+ aLanguageLB.SetLanguageList( LANG_LIST_ALL, sal_True, sal_True );
aLanguageLB.SelectEntryPos(0);
+ aNameText.SetAccessibleRelationMemberOf( &aNewDictBox );
+ aNameEdit.SetAccessibleRelationMemberOf( &aNewDictBox );
+ aLanguageText.SetAccessibleRelationMemberOf( &aNewDictBox );
+ aLanguageLB.SetAccessibleRelationMemberOf( &aNewDictBox );
+
FreeResource();
}
@@ -228,6 +233,7 @@ SvxEditDictionaryDialog::SvxEditDictionaryDialog(
aAllDictsLB ( this, CUI_RES( LB_ALLDICTS ) ),
aLangFT ( this, CUI_RES( FT_DICTLANG ) ),
aLangLB ( this, CUI_RES( LB_DICTLANG ) ),
+
aWordFT ( this, CUI_RES( FT_WORD ) ),
aWordED ( this, CUI_RES( ED_WORD ) ),
aReplaceFT ( this, CUI_RES( FT_REPLACE ) ),
@@ -236,8 +242,8 @@ SvxEditDictionaryDialog::SvxEditDictionaryDialog(
aNewReplacePB ( this, CUI_RES( PB_NEW_REPLACE ) ),
aDeletePB ( this, CUI_RES( PB_DELETE_REPLACE ) ),
aEditDictsBox ( this, CUI_RES( GB_EDITDICTS ) ),
- aCloseBtn ( this, CUI_RES( BTN_EDITCLOSE ) ),
aHelpBtn ( this, CUI_RES( BTN_EDITHELP ) ),
+ aCloseBtn ( this, CUI_RES( BTN_EDITCLOSE ) ),
sModify (CUI_RES(STR_MODIFY)),
sNew (aNewReplacePB.GetText()),
aDecoView ( this),
@@ -254,7 +260,7 @@ SvxEditDictionaryDialog::SvxEditDictionaryDialog(
aWordsLB.SetTabs(nStaticTabs);
//! we use an algorithm of our own to insert elements sorted
- aWordsLB.SetWindowBits(/*WB_SORT|*/WB_HSCROLL|WB_CLIPCHILDREN);
+ aWordsLB.SetStyle(aWordsLB.GetStyle()|/*WB_SORT|*/WB_HSCROLL|WB_CLIPCHILDREN);
nWidth=aWordED.GetSizePixel().Width();
@@ -296,7 +302,7 @@ SvxEditDictionaryDialog::SvxEditDictionaryDialog(
}
}
- aLangLB.SetLanguageList( LANG_LIST_ALL, TRUE, TRUE );
+ aLangLB.SetLanguageList( LANG_LIST_ALL, sal_True, sal_True );
aReplaceED.SetSpaces(sal_True);
aWordED.SetSpaces(sal_True);
@@ -380,13 +386,13 @@ void SvxEditDictionaryDialog::SetLanguage_Impl( util::Language nLanguage )
aLangLB.SelectLanguage( nLanguage );
}
-USHORT SvxEditDictionaryDialog::GetLBInsertPos(const String &rDicWord)
+sal_uInt16 SvxEditDictionaryDialog::GetLBInsertPos(const String &rDicWord)
{
- USHORT nPos = USHRT_MAX;
+ sal_uInt16 nPos = USHRT_MAX;
IntlWrapper aIntlWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
const CollatorWrapper* pCollator = aIntlWrapper.getCollator();
- USHORT j;
+ sal_uInt16 j;
for( j = 0; j < aWordsLB.GetEntryCount(); j++ )
{
SvLBoxEntry* pEntry = aWordsLB.GetEntry(j);
@@ -451,7 +457,7 @@ IMPL_LINK( SvxEditDictionaryDialog, SelectLangHdl_Impl, ListBox *, EMPTYARG )
sal_uInt16 nDicPos = aAllDictsLB.GetSelectEntryPos();
sal_uInt16 nLang = aLangLB.GetSelectLanguage();
Reference< XDictionary > xDic( aDics.getConstArray()[ nDicPos ], UNO_QUERY );
- INT16 nOldLang = SvxLocaleToLanguage( xDic->getLocale() );
+ sal_Int16 nOldLang = SvxLocaleToLanguage( xDic->getLocale() );
if ( nLang != nOldLang )
{
@@ -533,7 +539,7 @@ void SvxEditDictionaryDialog::ShowWords_Impl( sal_uInt16 nId )
for (sal_Int32 i = 0; i < nCount; i++)
{
aStr = String(pEntry[i]->getDictionaryWord());
- USHORT nPos = GetLBInsertPos( aStr );
+ sal_uInt16 nPos = GetLBInsertPos( aStr );
if(pEntry[i]->isNegative())
{
aStr += '\t';
@@ -687,8 +693,8 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt)
xub_StrLen nWordLen=rEntry.Len();
const String& rRepString = aReplaceED.GetText();
- BOOL bEnableNewReplace = FALSE;
- BOOL bEnableDelete = FALSE;
+ sal_Bool bEnableNewReplace = sal_False;
+ sal_Bool bEnableDelete = sal_False;
String aNewReplaceText = sNew;
if(pEdt == &aWordED)
@@ -717,7 +723,7 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt)
if (CDE_SIMILAR == eCmpRes)
{
aNewReplaceText = sModify;
- bEnableNewReplace = TRUE;
+ bEnableNewReplace = sal_True;
}
bFound= sal_True;
break;
@@ -732,7 +738,7 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt)
bTmpSelEntry=sal_True;
aNewReplaceText = sNew;
- bEnableNewReplace = TRUE;
+ bEnableNewReplace = sal_True;
}
}
@@ -742,7 +748,7 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt)
pFirstSel = 0;
aNewReplaceText = sNew;
- bEnableNewReplace = TRUE;
+ bEnableNewReplace = sal_True;
}
bEnableDelete = CDE_DIFFERENT != eCmpRes;
}
@@ -764,13 +770,13 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt)
aReplaceText = aWordsLB.GetEntryText( pFirstSel, 1 );
aNewReplaceText = sModify;
- bEnableDelete = TRUE;
+ bEnableDelete = sal_True;
}
- BOOL bIsChange =
+ sal_Bool bIsChange =
CDE_EQUAL != cmpDicEntry_Impl(aWordED.GetText(), aWordText)
|| CDE_EQUAL != cmpDicEntry_Impl(aReplaceED.GetText(), aReplaceText);
if (aWordED.GetText().Len() && bIsChange)
- bEnableNewReplace = TRUE;
+ bEnableNewReplace = sal_True;
}
aNewReplacePB.SetText( aNewReplaceText );