diff options
Diffstat (limited to 'svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx')
-rw-r--r-- | svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx index 783272ebd8..3e2864dc73 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,8 +47,8 @@ // header for define RET_OK #include <vcl/msgbox.hxx> // header for class SvtLinguConfigItem -#include <svtools/lingucfg.hxx> -#include <svtools/linguprops.hxx> +#include <unotools/lingucfg.hxx> +#include <unotools/linguprops.hxx> // header for class IntlWrapper #include <unotools/intlwrapper.hxx> #ifndef _UNOTOOLS_PROCESSFACTORY_HXX @@ -77,7 +77,7 @@ using namespace ::com::sun::star::uno; DictionaryList::DictionaryList( Window* pParent, const ResId& rResId) : SvHeaderTabListBox( pParent, rResId ) - , m_xDictionary(0) + , m_xDictionary(0) , m_pHeaderBar(0) , m_pPropertyTypeNameListBox(0) , m_aToBeDeleted() @@ -140,7 +140,7 @@ void DictionaryList::save() sal_Int32 nN; DictionaryEntry* pE; - + for( nN = m_aToBeDeleted.size(); nN--; ) { pE = m_aToBeDeleted[nN]; @@ -186,12 +186,12 @@ void DictionaryList::refillFromDictionary( sal_Int32 nTextConversionOptions ) if(!m_xDictionary.is()) return; - + Sequence< rtl::OUString > aLeftList( m_xDictionary->getConversionEntries( linguistic2::ConversionDirection_FROM_LEFT ) ); sal_Int32 nCount = aLeftList.getLength(); Reference< linguistic2::XConversionPropertyType > xPropertyType( m_xDictionary, uno::UNO_QUERY ); - + rtl::OUString aLeft, aRight; sal_Int16 nConversionPropertyType; @@ -201,7 +201,7 @@ void DictionaryList::refillFromDictionary( sal_Int32 nTextConversionOptions ) Sequence< rtl::OUString > aRightList( m_xDictionary->getConversions( aLeft, 0, aLeft.getLength() , linguistic2::ConversionDirection_FROM_LEFT, nTextConversionOptions ) ); - + if(aRightList.getLength()!=1) { OSL_ASSERT("The Chinese Translation Dictionary should have exactly one Mapping for each term."); @@ -339,7 +339,7 @@ HeaderBar* DictionaryList::createHeaderBar( const String& rColumn1, const String HeaderBarItemBits nBits = HEADER_BAR_BITS; pHeaderBar->InsertItem( 1, rColumn1, nWidth1, nBits | HIB_UPARROW ); pHeaderBar->InsertItem( 2, rColumn2, nWidth2, nBits ); - pHeaderBar->InsertItem( 3, rColumn3, nWidth3, nBits ); + pHeaderBar->InsertItem( 3, rColumn3, nWidth3, nBits ); pHeaderBar->Show(); return pHeaderBar; @@ -352,7 +352,7 @@ void DictionaryList::Resize() if ( !aBoxSize.Width() ) return; - + Size aBarSize = m_pHeaderBar->GetSizePixel(); aBarSize.Width() = GetSizePixel().Width(); m_pHeaderBar->SetSizePixel( aBarSize ); @@ -500,7 +500,7 @@ ChineseDictionaryDialog::ChineseDictionaryDialog( Window* pParent ) m_aRB_To_Traditional.SetHelpId( HID_SVX_CHINESE_DICTIONARY_RB_CONVERSION_TO_TRADITIONAL ); m_aCB_Reverse.SetHelpId( HID_SVX_CHINESE_DICTIONARY_CB_REVERSE ); - + m_aCT_DictionaryToSimplified.SetHelpId( HID_SVX_CHINESE_DICTIONARY_LB_TO_SIMPLIFIED ); m_aCT_DictionaryToTraditional.SetHelpId( HID_SVX_CHINESE_DICTIONARY_LB_TO_TRADITIONAL ); @@ -512,7 +512,7 @@ ChineseDictionaryDialog::ChineseDictionaryDialog( Window* pParent ) m_aLB_Property.SetDropDownLineCount( m_aLB_Property.GetEntryCount() ); m_aLB_Property.SelectEntryPos(0); - + Reference< linguistic2::XConversionDictionary > xDictionary_To_Simplified(0); Reference< linguistic2::XConversionDictionary > xDictionary_To_Traditional(0); //get dictionaries @@ -538,7 +538,7 @@ ChineseDictionaryDialog::ChineseDictionaryDialog( Window* pParent ) rtl::OUString aNameTo_Traditional( rtl::OUString::createFromAscii("ChineseS2T") ); lang::Locale aLocale; aLocale.Language = rtl::OUString::createFromAscii("zh"); - + if( xContainer->hasByName( aNameTo_Simplified ) ) xDictionary_To_Simplified = Reference< linguistic2::XConversionDictionary >( xContainer->getByName( aNameTo_Simplified ), UNO_QUERY ); @@ -567,7 +567,7 @@ ChineseDictionaryDialog::ChineseDictionaryDialog( Window* pParent ) } if (xDictionary_To_Traditional.is()) xDictionary_To_Traditional->setActive( sal_True ); - + } catch( uno::Exception& ) { @@ -605,7 +605,7 @@ ChineseDictionaryDialog::ChineseDictionaryDialog( Window* pParent ) // updateAfterDirectionChange(); - + //set hdl if(m_pHeaderBar) m_pHeaderBar->SetSelectHdl( LINK( this, ChineseDictionaryDialog, HeaderBarClick ) ); @@ -619,7 +619,7 @@ ChineseDictionaryDialog::ChineseDictionaryDialog( Window* pParent ) m_aCT_DictionaryToSimplified.SetSelectHdl( LINK( this, ChineseDictionaryDialog, MappingSelectHdl )); m_aCT_DictionaryToTraditional.SetSelectHdl( LINK( this, ChineseDictionaryDialog, MappingSelectHdl )); - + m_aPB_Add.SetClickHdl( LINK( this, ChineseDictionaryDialog, AddHdl ) ); m_aPB_Modify.SetClickHdl( LINK( this, ChineseDictionaryDialog, ModifyHdl ) ); m_aPB_Delete.SetClickHdl( LINK( this, ChineseDictionaryDialog, DeleteHdl ) ); @@ -634,7 +634,7 @@ ChineseDictionaryDialog::~ChineseDictionaryDialog() void ChineseDictionaryDialog::setDirectionAndTextConversionOptions( bool bDirectionToSimplified, sal_Int32 nTextConversionOptions /*i18n::TextConversionOption*/ ) { - if( bDirectionToSimplified == bool(m_aRB_To_Simplified.IsChecked()) + if( bDirectionToSimplified == bool(m_aRB_To_Simplified.IsChecked()) && nTextConversionOptions == m_nTextConversionOptions ) return; @@ -665,7 +665,7 @@ void ChineseDictionaryDialog::updateAfterDirectionChange() } else { - m_aCT_DictionaryToTraditional.activate( m_pHeaderBar ); + m_aCT_DictionaryToTraditional.activate( m_pHeaderBar ); m_aCT_DictionaryToSimplified.Hide(); xDictionary = m_aCT_DictionaryToTraditional.m_xDictionary; } @@ -751,7 +751,7 @@ void ChineseDictionaryDialog::updateButtons() m_aPB_Add.Enable( bAdd ); m_aPB_Delete.Enable( !bAdd && getActiveDictionary().GetSelectedRowCount()>0 ); - + // DictionaryEntry* pFirstSelectedEntry = getActiveDictionary().getFirstSelectedEntry(); bool bModify = false; @@ -791,13 +791,13 @@ IMPL_LINK( ChineseDictionaryDialog, ModifyHdl, void*, EMPTYARG ) DictionaryList& rActive = getActiveDictionary(); DictionaryList& rReverse = getReverseDictionary(); - + DictionaryEntry* pE = rActive.getFirstSelectedEntry(); if( pE->m_aTerm != aTerm ) return 0; if( pE ) - { + { if( pE->m_aMapping != aMapping || pE->m_nConversionPropertyType != nConversionPropertyType ) { if( m_aCB_Reverse.IsChecked() ) @@ -852,7 +852,7 @@ short ChineseDictionaryDialog::Execute() sal_Int32 nTextConversionOptions = m_nTextConversionOptions; if(m_nTextConversionOptions | i18n::TextConversionOption::USE_CHARACTER_VARIANTS ) nTextConversionOptions = nTextConversionOptions^i18n::TextConversionOption::USE_CHARACTER_VARIANTS ; - + m_aCT_DictionaryToSimplified.refillFromDictionary( nTextConversionOptions ); m_aCT_DictionaryToTraditional.refillFromDictionary( m_nTextConversionOptions ); @@ -890,7 +890,7 @@ IMPL_LINK( ChineseDictionaryDialog, HeaderBarClick, void*, EMPTYARG ) m_pHeaderBar->SetItemBits( nId, HEADER_BAR_BITS | HIB_DOWNARROW ); else m_pHeaderBar->SetItemBits( nId, HEADER_BAR_BITS | HIB_UPARROW ); - + //sort lists nBits = m_pHeaderBar->GetItemBits(nId); bool bSortAtoZ = nBits & HIB_UPARROW; |