summaryrefslogtreecommitdiff
path: root/sw/source/uibase/lingu/hhcwrp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/lingu/hhcwrp.cxx')
-rw-r--r--sw/source/uibase/lingu/hhcwrp.cxx25
1 files changed, 12 insertions, 13 deletions
diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx
index 6cedaad79681..2d23fa468056 100644
--- a/sw/source/uibase/lingu/hhcwrp.cxx
+++ b/sw/source/uibase/lingu/hhcwrp.cxx
@@ -136,22 +136,21 @@ SwHHCWrapper::~SwHHCWrapper()
// finally for chinese translation we need to change the documents
// default language and font to the new ones to be used.
LanguageType nTargetLang = GetTargetLanguage();
- if (IsChinese( nTargetLang ))
- {
- SwDoc *pDoc = m_pView->GetDocShell()->GetDoc();
+ if (!IsChinese( nTargetLang ))
+ return;
- //!! Note: This also effects the default language of text boxes (EditEngine/EditView) !!
- pDoc->SetDefault( SvxLanguageItem( nTargetLang, RES_CHRATR_CJK_LANGUAGE ) );
+ SwDoc *pDoc = m_pView->GetDocShell()->GetDoc();
- const vcl::Font *pFont = GetTargetFont();
- if (pFont)
- {
- SvxFontItem aFontItem( pFont->GetFamilyType(), pFont->GetFamilyName(),
- pFont->GetStyleName(), pFont->GetPitch(),
- pFont->GetCharSet(), RES_CHRATR_CJK_FONT );
- pDoc->SetDefault( aFontItem );
- }
+ //!! Note: This also effects the default language of text boxes (EditEngine/EditView) !!
+ pDoc->SetDefault( SvxLanguageItem( nTargetLang, RES_CHRATR_CJK_LANGUAGE ) );
+ const vcl::Font *pFont = GetTargetFont();
+ if (pFont)
+ {
+ SvxFontItem aFontItem( pFont->GetFamilyType(), pFont->GetFamilyName(),
+ pFont->GetStyleName(), pFont->GetPitch(),
+ pFont->GetCharSet(), RES_CHRATR_CJK_FONT );
+ pDoc->SetDefault( aFontItem );
}
}