diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-15 09:36:39 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-04-17 07:21:08 +0000 |
commit | a7b7c64afc523cfd9ff4e724b3efbec6567fc1c8 (patch) | |
tree | 52fd05ef3292f3dab172864cbc3be96a8d44a9d0 /include/editeng | |
parent | add7eeb7dbd0eefa0c5ae5430490864079add801 (diff) |
convert SCRIPTTYPE_ constants to scoped enum
Change-Id: I5be3980ac865162d8d7626556ca47eca4b0ee433
Reviewed-on: https://gerrit.libreoffice.org/15344
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include/editeng')
-rw-r--r-- | include/editeng/editeng.hxx | 7 | ||||
-rw-r--r-- | include/editeng/editobj.hxx | 3 | ||||
-rw-r--r-- | include/editeng/editview.hxx | 3 | ||||
-rw-r--r-- | include/editeng/outliner.hxx | 7 | ||||
-rw-r--r-- | include/editeng/scripttypeitem.hxx | 12 |
5 files changed, 16 insertions, 16 deletions
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index d3ed4b69dcb2..d38536878977 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -37,6 +37,7 @@ #include <editeng/eedata.hxx> #include <o3tl/typed_flags_set.hxx> +#include <svl/languageoptions.hxx> namespace com { namespace sun { namespace star { namespace linguistic2 { @@ -243,7 +244,7 @@ public: void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir ); EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const; - sal_uInt16 GetScriptType( const ESelection& rSelection ) const; + SvtScriptType GetScriptType( const ESelection& rSelection ) const; LanguageType GetLanguage(const EditPaM& rPaM) const; LanguageType GetLanguage( sal_Int32 nPara, sal_Int32 nPos ) const; @@ -513,7 +514,7 @@ public: static bool IsSimpleCharInput( const KeyEvent& rKeyEvent ); static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const vcl::Font& rFont ); static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const SvxFont& rFont ); - static vcl::Font CreateFontFromItemSet( const SfxItemSet& rItemSet, sal_uInt16 nScriptType ); + static vcl::Font CreateFontFromItemSet( const SfxItemSet& rItemSet, SvtScriptType nScriptType ); static SvxFont CreateSvxFontFromItemSet( const SfxItemSet& rItemSet ); static bool IsPrintable( sal_Unicode c ) { return ( ( c >= 32 ) && ( c != 127 ) ); } static bool HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable ); @@ -573,7 +574,7 @@ public: OUString GetSelected(const EditSelection& rSel, const LineEnd eParaSep = LINEEND_LF) const; EditPaM DeleteSelected(const EditSelection& rSel); - sal_uInt16 GetScriptType(const EditSelection& rSel) const; + SvtScriptType GetScriptType(const EditSelection& rSel) const; void RemoveParaPortion(sal_Int32 nNode); diff --git a/include/editeng/editobj.hxx b/include/editeng/editobj.hxx index 09c757402cf8..a11d052bc48d 100644 --- a/include/editeng/editobj.hxx +++ b/include/editeng/editobj.hxx @@ -28,6 +28,7 @@ #include <editeng/editdata.hxx> #include <editeng/editengdllapi.h> #include <editeng/macros.hxx> +#include <svl/languageoptions.hxx> #include <com/sun/star/text/textfield/Type.hpp> @@ -92,7 +93,7 @@ public: bool IsVertical() const; void SetVertical( bool bVertical ); - sal_uInt16 GetScriptType() const; + SvtScriptType GetScriptType() const; EditTextObject* Clone() const; diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx index 3e2fb1a4d1f0..aec7f03c9939 100644 --- a/include/editeng/editview.hxx +++ b/include/editeng/editview.hxx @@ -28,6 +28,7 @@ #include <tools/gen.hxx> #include <vcl/cursor.hxx> #include <editeng/editstat.hxx> +#include <svl/languageoptions.hxx> #define LOK_USE_UNSTABLE_API #include <LibreOfficeKit/LibreOfficeKitTypes.h> @@ -121,7 +122,7 @@ public: OUString GetSelected(); void DeleteSelected(); - sal_uInt16 GetSelectedScriptType() const; + SvtScriptType GetSelectedScriptType() const; // VisArea position of the Output window. // A size change also affects the VisArea diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index cc00d310e555..960caa8752df 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -25,6 +25,7 @@ #include <i18nlangtag/lang.h> #include <rtl/ustring.hxx> #include <svl/SfxBroadcaster.hxx> +#include <svl/languageoptions.hxx> #include <tools/gen.hxx> #include <tools/color.hxx> #include <tools/contnr.hxx> @@ -302,9 +303,9 @@ public: void TransliterateText( sal_Int32 nTransliterationMode ); - ESelection GetSelection(); + ESelection GetSelection(); - sal_uInt16 GetSelectedScriptType() const; + SvtScriptType GetSelectedScriptType() const; void SetVisArea( const Rectangle& rRect ); void SetSelection( const ESelection& ); @@ -689,7 +690,7 @@ public: void SetDefaultHorizontalTextDirection( EEHorizontalTextDirection eHTextDir ); EEHorizontalTextDirection GetDefaultHorizontalTextDirection() const; - sal_uInt16 GetScriptType( const ESelection& rSelection ) const; + SvtScriptType GetScriptType( const ESelection& rSelection ) const; LanguageType GetLanguage( sal_Int32 nPara, sal_Int32 nPos ) const; void SetAsianCompressionMode( sal_uInt16 nCompressionMode ); diff --git a/include/editeng/scripttypeitem.hxx b/include/editeng/scripttypeitem.hxx index 6e098b05d3e8..f9ab9103a178 100644 --- a/include/editeng/scripttypeitem.hxx +++ b/include/editeng/scripttypeitem.hxx @@ -31,16 +31,12 @@ used for the user interface. */ -EDITENG_DLLPUBLIC sal_uInt16 GetI18NScriptTypeOfLanguage( sal_uInt16 nLang ); -sal_uInt16 GetItemScriptType( short nI18NType ); -short GetI18NScriptType( sal_uInt16 nItemType ); - class EDITENG_DLLPUBLIC SvxScriptTypeItem : public SfxUInt16Item { public: TYPEINFO_OVERRIDE(); - explicit SvxScriptTypeItem( sal_uInt16 nType = SCRIPTTYPE_LATIN ); + explicit SvxScriptTypeItem( SvtScriptType nType = SvtScriptType::LATIN ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE; }; @@ -60,11 +56,11 @@ public: inline const SfxPoolItem* GetItemOfScriptSet( sal_uInt16 _nWhich ) const { return SvxScriptSetItem::GetItemOfScriptSet( GetItemSet(), _nWhich ); } - static const SfxPoolItem* GetItemOfScript( sal_uInt16 nSlotId, const SfxItemSet& rSet, sal_uInt16 nScript ); + static const SfxPoolItem* GetItemOfScript( sal_uInt16 nSlotId, const SfxItemSet& rSet, SvtScriptType nScript ); - const SfxPoolItem* GetItemOfScript( sal_uInt16 nScript ) const; + const SfxPoolItem* GetItemOfScript( SvtScriptType nScript ) const; - void PutItemForScriptType( sal_uInt16 nScriptType, const SfxPoolItem& rItem ); + void PutItemForScriptType( SvtScriptType nScriptType, const SfxPoolItem& rItem ); static void GetWhichIds( sal_uInt16 nSlotId, const SfxItemSet& rSet, sal_uInt16& rLatin, sal_uInt16& rAsian, sal_uInt16& rComplex); |