diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-02 16:09:36 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-03 12:13:44 +0000 |
commit | 1cfedbc960d25ee322b0a0e7aae8dc73758b406e (patch) | |
tree | 1bcaac3e77e9693f9c3897d7c091acd603aff3fa /sw/source/filter/html | |
parent | f1ea8c43a8ab6b8d158d4d8f3a0039b3a2ac2c37 (diff) |
drop SvxNumType and rename SvxExtNumType->SvxNumType
Both of them are abstractions over the css::style::NumberingType
constants.
SvxNumType serves no useful purpose, since it's just a typedef to
sal_Int16.
At least SvxExtNumType wraps up the css::style::NumberingType constants
in a nice enum.
Change-Id: I7b3f97cd42b0aa23aff7a4db4930da86149d4f4e
Reviewed-on: https://gerrit.libreoffice.org/34816
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/html')
-rw-r--r-- | sw/source/filter/html/htmlfld.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/html/htmlfldw.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/html/svxcss1.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/svxcss1.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.hxx | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx index 03574fb32451..bdd3961d6bde 100644 --- a/sw/source/filter/html/htmlfld.cxx +++ b/sw/source/filter/html/htmlfld.cxx @@ -190,13 +190,13 @@ static HTMLOptionEnum aHTMLFileNameFieldFormatTable[] = { nullptr, 0 } }; -SvxExtNumType SwHTMLParser::GetNumType( const OUString& rStr, SvxExtNumType nDfltType ) +SvxNumType SwHTMLParser::GetNumType( const OUString& rStr, SvxNumType nDfltType ) { const HTMLOptionEnum *pOptEnums = aHTMLPageNumFieldFormatTable; while( pOptEnums->pName ) { if( rStr.equalsIgnoreAsciiCaseAscii( pOptEnums->pName ) ) - return (SvxExtNumType)pOptEnums->nValue; + return (SvxNumType)pOptEnums->nValue; pOptEnums++; } return nDfltType; @@ -411,19 +411,19 @@ void SwHTMLParser::NewField() short nOff = 0; - if( (SvxExtNumType)nFormat!=SVX_NUM_CHAR_SPECIAL && !aValue.isEmpty() ) + if( (SvxNumType)nFormat!=SVX_NUM_CHAR_SPECIAL && !aValue.isEmpty() ) nOff = (short)aValue.toInt32(); else if( (SwPageNumSubType)nSub == PG_NEXT ) nOff = 1; else if( (SwPageNumSubType)nSub == PG_PREV ) nOff = -1; - if( (SvxExtNumType)nFormat==SVX_NUM_CHAR_SPECIAL && + if( (SvxNumType)nFormat==SVX_NUM_CHAR_SPECIAL && (SwPageNumSubType)nSub==PG_RANDOM ) nFormat = SVX_NUM_PAGEDESC; pNewField = new SwPageNumberField(static_cast<SwPageNumberFieldType*>(pType), nSub, nFormat, nOff); - if ((SvxExtNumType)nFormat == SVX_NUM_CHAR_SPECIAL) + if ((SvxNumType)nFormat == SVX_NUM_CHAR_SPECIAL) static_cast<SwPageNumberField *>(pNewField)->SetUserString(aValue); } } diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx index 30c822fbdd3e..0ee31b9ef8ba 100644 --- a/sw/source/filter/html/htmlfldw.cxx +++ b/sw/source/filter/html/htmlfldw.cxx @@ -41,7 +41,7 @@ const sal_Char *SwHTMLWriter::GetNumFormat( sal_uInt16 nFormat ) { const sal_Char *pFormatStr = nullptr; - switch( (SvxExtNumType)nFormat ) + switch( (SvxNumType)nFormat ) { case SVX_NUM_CHARS_UPPER_LETTER: pFormatStr = OOO_STRING_SW_HTML_FF_uletter; break; case SVX_NUM_CHARS_LOWER_LETTER: pFormatStr = OOO_STRING_SW_HTML_FF_lletter; break; @@ -141,7 +141,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pField, OSL_ENSURE( pSubStr, "ubekannter Subtyp fuer SwPageNumberField" ); pFormatStr = SwHTMLWriter::GetNumFormat( static_cast< sal_uInt16 >(nFormat) ); - if( (SvxExtNumType)nFormat==SVX_NUM_CHAR_SPECIAL ) + if( (SvxNumType)nFormat==SVX_NUM_CHAR_SPECIAL ) { aValue = static_cast<const SwPageNumberField *>(pField)->GetUserString(); } diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx index 976aefa809dc..9d2d62573991 100644 --- a/sw/source/filter/html/svxcss1.cxx +++ b/sw/source/filter/html/svxcss1.cxx @@ -1718,7 +1718,7 @@ static void ParseCSS1_list_style_type( const CSS1Expression *pExpr, if( SvxCSS1Parser::GetEnum( aNumberStyleTable, rValue, nEnum ) ) { rPropInfo.m_bNumbering = true; - rPropInfo.m_nNumberingType = (SvxExtNumType)nEnum; + rPropInfo.m_nNumberingType = (SvxNumType)nEnum; } if( SvxCSS1Parser::GetEnum( aBulletStyleTable, rValue, nEnum ) ) { diff --git a/sw/source/filter/html/svxcss1.hxx b/sw/source/filter/html/svxcss1.hxx index 6d37d3e7f38e..41559fdcdd21 100644 --- a/sw/source/filter/html/svxcss1.hxx +++ b/sw/source/filter/html/svxcss1.hxx @@ -121,7 +121,7 @@ public: sal_uInt16 m_nLeftBorderDistance; sal_uInt16 m_nRightBorderDistance; - SvxExtNumType m_nNumberingType; + SvxNumType m_nNumberingType; sal_Unicode m_cBulletChar; sal_uInt16 m_nColumnCount; diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index c2a5ef372e03..cb16c4c9ac33 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -647,7 +647,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient // <SDFIELD> public: - static SvxExtNumType GetNumType( const OUString& rStr, SvxExtNumType eDfltType ); + static SvxNumType GetNumType( const OUString& rStr, SvxNumType eDfltType ); private: void NewField(); void EndField(); |