diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-13 08:17:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-13 08:17:42 +0200 |
commit | b8d977c0178f8ac4ee299722d50c1481a15b45c8 (patch) | |
tree | 6cd8560661bb8b713e4373379052e85ab30598dd /sw/source/uibase | |
parent | 80d2fa87fdaf67615d7b8128f3c05b239a1f1c05 (diff) |
convert CharCompressType to scoped enum
and move it to svl, where it belongs
Change-Id: Ic4d846419dfe2dd85de5ade8ed1a041867bbf1dc
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/app/docshini.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uno/SwXDocumentSettings.cxx | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx index 23361fcff200..a547c945bb92 100644 --- a/sw/source/uibase/app/docshini.cxx +++ b/sw/source/uibase/app/docshini.cxx @@ -138,7 +138,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) } m_pDoc->getIDocumentSettingAccess().set(DocumentSettingId::KERN_ASIAN_PUNCTUATION, !aAsian.IsKerningWesternTextOnly()); - m_pDoc->getIDocumentSettingAccess().setCharacterCompressionType(static_cast<SwCharCompressType>(aAsian.GetCharDistanceCompression())); + m_pDoc->getIDocumentSettingAccess().setCharacterCompressionType(aAsian.GetCharDistanceCompression()); m_pDoc->getIDocumentDeviceAccess().setPrintData(*SW_MOD()->GetPrtOptions(bWeb)); } diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx index f207b3a205b8..660046dc3288 100644 --- a/sw/source/uibase/uno/SwXDocumentSettings.cxx +++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx @@ -44,6 +44,7 @@ #include <sfx2/zoomitem.hxx> #include <unomod.hxx> #include <vcl/svapp.hxx> +#include <svl/asiancfg.hxx> #include <comphelper/servicehelper.hxx> #include "swmodule.hxx" @@ -449,16 +450,16 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf { sal_Int16 nMode = 0; rValue >>= nMode; - switch (nMode) + switch ((CharCompressType)nMode) { - case CHARCOMPRESS_NONE: - case CHARCOMPRESS_PUNCTUATION: - case CHARCOMPRESS_PUNCTUATION_KANA: + case CharCompressType::NONE: + case CharCompressType::PunctuationOnly: + case CharCompressType::PunctuationAndKana: break; default: throw IllegalArgumentException(); } - mpDoc->getIDocumentSettingAccess().setCharacterCompressionType(static_cast < SwCharCompressType > (nMode) ); + mpDoc->getIDocumentSettingAccess().setCharacterCompressionType((CharCompressType)nMode); } break; case HANDLE_APPLY_USER_DATA: |