From d8fec570c21c5e45ba593ee96cc1ba5d45d77fc8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 26 Jul 2021 14:45:46 +0200 Subject: use officecfg for SvtCJKOptions and remove some unused options Change-Id: I487a233de4f7414012e5405f2c2e1f9c8b8fb4f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119554 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sd/source/ui/controller/slidelayoutcontroller.cxx | 2 +- sd/source/ui/dlg/paragr.cxx | 3 +-- sd/source/ui/dlg/prltempl.cxx | 3 +-- sd/source/ui/dlg/tabtempl.cxx | 3 +-- sd/source/ui/docshell/docshell.cxx | 2 +- sd/source/ui/sidebar/LayoutMenu.cxx | 2 +- sd/source/ui/view/drtxtob.cxx | 2 +- sd/source/ui/view/drviews7.cxx | 2 +- sd/source/ui/view/drviewsf.cxx | 6 ++---- sd/source/ui/view/outlnvsh.cxx | 3 +-- 10 files changed, 11 insertions(+), 17 deletions(-) (limited to 'sd/source/ui') diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx index 989dd9493db5..41ab38cad0b1 100644 --- a/sd/source/ui/controller/slidelayoutcontroller.cxx +++ b/sd/source/ui/controller/slidelayoutcontroller.cxx @@ -181,7 +181,7 @@ LayoutToolbarMenu::LayoutToolbarMenu(SlideLayoutController* pControl, weld::Widg OSL_ASSERT(false); } - const bool bVerticalEnabled = SvtCJKOptions().IsVerticalTextEnabled(); + const bool bVerticalEnabled = SvtCJKOptions::IsVerticalTextEnabled(); mxLayoutSet1->SetSelectHdl( LINK( this, LayoutToolbarMenu, SelectValueSetHdl ) ); diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx index 35a5df67a2d5..2918fbb22c77 100644 --- a/sd/source/ui/dlg/paragr.cxx +++ b/sd/source/ui/dlg/paragr.cxx @@ -139,8 +139,7 @@ SdParagraphDlg::SdParagraphDlg(weld::Window* pParent, const SfxItemSet* pAttr) { AddTabPage( "labelTP_PARA_STD", RID_SVXPAGE_STD_PARAGRAPH); - SvtCJKOptions aCJKOptions; - if( aCJKOptions.IsAsianTypographyEnabled() ) + if( SvtCJKOptions::IsAsianTypographyEnabled() ) AddTabPage( "labelTP_PARA_ASIAN", RID_SVXPAGE_PARA_ASIAN); else RemoveTabPage( "labelTP_PARA_ASIAN" ); diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx index 8271b39608ba..f922c7440c49 100644 --- a/sd/source/ui/dlg/prltempl.cxx +++ b/sd/source/ui/dlg/prltempl.cxx @@ -141,8 +141,7 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg(SfxObjectShell const * pDocSh, AddTabPage( "RID_SVXPAGE_ALIGN_PARAGRAPH", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGN_PARAGRAPH ), nullptr ); AddTabPage( "RID_SVXPAGE_BKG", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), nullptr); - SvtCJKOptions aCJKOptions; - if( !aCJKOptions.IsAsianTypographyEnabled() ) + if( !SvtCJKOptions::IsAsianTypographyEnabled() ) RemoveTabPage( "RID_SVXPAGE_PARA_ASIAN" ); if (bBackground) diff --git a/sd/source/ui/dlg/tabtempl.cxx b/sd/source/ui/dlg/tabtempl.cxx index a730fb91c8de..e5db39e68ed6 100644 --- a/sd/source/ui/dlg/tabtempl.cxx +++ b/sd/source/ui/dlg/tabtempl.cxx @@ -69,8 +69,7 @@ SdTabTemplateDlg::SdTabTemplateDlg(weld::Window* pParent, AddTabPage("connector", RID_SVXPAGE_CONNECTION); AddTabPage("alignment", RID_SVXPAGE_ALIGN_PARAGRAPH); AddTabPage("tabs", RID_SVXPAGE_TABULATOR); - SvtCJKOptions aCJKOptions; - if( aCJKOptions.IsAsianTypographyEnabled() ) + if( SvtCJKOptions::IsAsianTypographyEnabled() ) AddTabPage("asiantypo", RID_SVXPAGE_PARA_ASIAN); else RemoveTabPage("asiantypo"); diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index 5b343b64288a..886efb0f7acb 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -256,7 +256,7 @@ void DrawDocShell::GetState(SfxItemSet &rSet) case SID_CHINESE_CONVERSION: case SID_HANGUL_HANJA_CONVERSION: { - rSet.Put(SfxVisibilityItem(nWhich, SvtCJKOptions().IsAnyEnabled())); + rSet.Put(SfxVisibilityItem(nWhich, SvtCJKOptions::IsAnyEnabled())); } break; case SID_LANGUAGE_STATUS: diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx index 4f4ee2ca59b5..0e2e8aae890f 100644 --- a/sd/source/ui/sidebar/LayoutMenu.cxx +++ b/sd/source/ui/sidebar/LayoutMenu.cxx @@ -497,7 +497,7 @@ SfxRequest LayoutMenu::CreateRequest ( void LayoutMenu::Fill() { - bool bVertical = SvtCJKOptions().IsVerticalTextEnabled(); + bool bVertical = SvtCJKOptions::IsVerticalTextEnabled(); SdDrawDocument* pDocument = mrBase.GetDocument(); bool bRightToLeft = (pDocument!=nullptr && pDocument->GetDefaultWritingMode() == WritingMode_RL_TB); diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index 312e08f29521..01e5675a96c7 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -145,7 +145,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) sal_uInt16 nWhich = aIter.FirstWhich(); SfxItemSet aAttrSet( mpView->GetDoc().GetPool() ); bool bDisableParagraphTextDirection = !SvtCTLOptions().IsCTLFontEnabled(); - bool bDisableVerticalText = !SvtCJKOptions().IsVerticalTextEnabled(); + bool bDisableVerticalText = !SvtCJKOptions::IsVerticalTextEnabled(); mpView->GetAttributes( aAttrSet ); diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 1f1263fd99bb..d9a1acf7ae99 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -332,7 +332,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } ViewShell::GetMenuState(rSet); - bool bDisableVerticalText = !SvtCJKOptions().IsVerticalTextEnabled(); + bool bDisableVerticalText = !SvtCJKOptions::IsVerticalTextEnabled(); if ( bDisableVerticalText ) { diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 220fb33ab6bf..9b67f5d89dbd 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -206,8 +206,7 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) if ( !GetView()->GetTextEditOutliner() ) { - SvtCJKOptions aCJKOptions; - if( !aCJKOptions.IsChangeCaseMapEnabled() ) + if( !SvtCJKOptions::IsChangeCaseMapEnabled() ) { GetViewFrame()->GetBindings().SetVisibleState( SID_TRANSLITERATE_HALFWIDTH, false ); GetViewFrame()->GetBindings().SetVisibleState( SID_TRANSLITERATE_FULLWIDTH, false ); @@ -234,8 +233,7 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) } else { - SvtCJKOptions aCJKOptions; - if( !aCJKOptions.IsChangeCaseMapEnabled() ) + if( !SvtCJKOptions::IsChangeCaseMapEnabled() ) { GetViewFrame()->GetBindings().SetVisibleState( SID_TRANSLITERATE_HALFWIDTH, false ); GetViewFrame()->GetBindings().SetVisibleState( SID_TRANSLITERATE_FULLWIDTH, false ); diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 7a423c0d96df..7a77c2a7275e 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -381,8 +381,7 @@ void OutlineViewShell::GetCtrlState(SfxItemSet &rSet) SfxItemState::DEFAULT == rSet.GetItemState(SID_TRANSLITERATE_KATAKANA)) ) return; - SvtCJKOptions aCJKOptions; - if( !aCJKOptions.IsChangeCaseMapEnabled() ) + if( !SvtCJKOptions::IsChangeCaseMapEnabled() ) { GetViewFrame()->GetBindings().SetVisibleState( SID_TRANSLITERATE_HALFWIDTH, false ); GetViewFrame()->GetBindings().SetVisibleState( SID_TRANSLITERATE_FULLWIDTH, false ); -- cgit