diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-02-14 13:26:23 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-02-14 19:33:15 +0100 |
commit | 07d92d7c67822a7645deadd38729d03e14d55158 (patch) | |
tree | 540e60d3e0d99acf02063461637c2aa1cb58e14c /writerfilter | |
parent | 64440bee7fdab52f2b913b5d37edd7bcc5b0e412 (diff) |
writerfilter: turn RTFFormFieldTypes into a C++11 scoped enumeration
Change-Id: Ic99f1f30d799433e42ccc51a2e2019c60038222a
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 18 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.hxx | 12 |
2 files changed, 15 insertions, 15 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index c3f5f767171d..0b124a5d3d69 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -249,7 +249,7 @@ RTFDocumentImpl::RTFDocumentImpl(uno::Reference<uno::XComponentContext> const& x m_aAuthors(), m_aFormfieldSprms(), m_aFormfieldAttributes(), - m_nFormFieldType(FORMFIELD_NONE), + m_nFormFieldType(RTFFormFieldType::NONE), m_aObjectSprms(), m_aObjectAttributes(), m_bObject(false), @@ -4354,29 +4354,29 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) switch (nParam) { case 0: - m_nFormFieldType = FORMFIELD_TEXT; + m_nFormFieldType = RTFFormFieldType::TEXT; break; case 1: - m_nFormFieldType = FORMFIELD_CHECKBOX; + m_nFormFieldType = RTFFormFieldType::CHECKBOX; break; case 2: - m_nFormFieldType = FORMFIELD_LIST; + m_nFormFieldType = RTFFormFieldType::LIST; break; default: - m_nFormFieldType = FORMFIELD_NONE; + m_nFormFieldType = RTFFormFieldType::NONE; break; } break; case RTF_FFDEFRES: - if (m_nFormFieldType == FORMFIELD_CHECKBOX) + if (m_nFormFieldType == RTFFormFieldType::CHECKBOX) m_aFormfieldSprms.set(NS_ooxml::LN_CT_FFCheckBox_default, pIntValue); - else if (m_nFormFieldType == FORMFIELD_LIST) + else if (m_nFormFieldType == RTFFormFieldType::LIST) m_aFormfieldSprms.set(NS_ooxml::LN_CT_FFDDList_default, pIntValue); break; case RTF_FFRES: - if (m_nFormFieldType == FORMFIELD_CHECKBOX) + if (m_nFormFieldType == RTFFormFieldType::CHECKBOX) m_aFormfieldSprms.set(NS_ooxml::LN_CT_FFCheckBox_checked, pIntValue); - else if (m_nFormFieldType == FORMFIELD_LIST) + else if (m_nFormFieldType == RTFFormFieldType::LIST) m_aFormfieldSprms.set(NS_ooxml::LN_CT_FFDDList_result, pIntValue); break; case RTF_EDMINS: diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index 09bd60d15df5..b59ac377ce39 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -61,12 +61,12 @@ enum RTFBufferTypes }; /// Form field types -enum RTFFormFieldTypes +enum class RTFFormFieldType { - FORMFIELD_NONE, - FORMFIELD_TEXT, - FORMFIELD_CHECKBOX, - FORMFIELD_LIST + NONE, + TEXT, + CHECKBOX, + LIST }; enum class RTFBmpStyle @@ -537,7 +537,7 @@ private: RTFSprms m_aFormfieldSprms; RTFSprms m_aFormfieldAttributes; - RTFFormFieldTypes m_nFormFieldType; + RTFFormFieldType m_nFormFieldType; RTFSprms m_aObjectSprms; RTFSprms m_aObjectAttributes; |