summaryrefslogtreecommitdiff
path: root/sw/source/filter/html/htmlcss1.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-12 17:12:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-15 19:22:21 +0200
commiteaf0c263eb1a72a58d2a67cc0506ab022d7c4be4 (patch)
tree4c732e95b560235e83c6de4b5b96260b638fa88d /sw/source/filter/html/htmlcss1.cxx
parent921ae49cd7e332d7e1ad702efe2198b2780cc829 (diff)
loplugin:staticconstfield improvements
And fix ScXMLCachedRowAttrAccess::Cache which was never setting its mnTab field, and hence would never be hit. And fix oox::xls::CellBlockBuffer, which was never setting mnCurrRow. Change-Id: I2c46aa050b9ebe3c2dc2e52579555f97945dd61c Reviewed-on: https://gerrit.libreoffice.org/61772 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/html/htmlcss1.cxx')
-rw-r--r--sw/source/filter/html/htmlcss1.cxx19
1 files changed, 6 insertions, 13 deletions
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 36bbdbafce18..ded8ff86c16b 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -72,19 +72,12 @@ using namespace ::com::sun::star;
static void lcl_swcss1_setEncoding( SwFormat& rFormat, rtl_TextEncoding eEnc );
// Implementation of SwCSS1Parsers (actually swcss1.cxx)
-static struct SwCSS1ItemIds
+static const sal_uInt16 aItemIds[] =
{
- sal_uInt16 const nFormatBreak;
- sal_uInt16 const nFormatPageDesc;
- sal_uInt16 const nFormatKeep;
-
- SwCSS1ItemIds() :
- nFormatBreak( RES_BREAK ),
- nFormatPageDesc( RES_PAGEDESC ),
- nFormatKeep( RES_KEEP )
- {}
-
-} aItemIds;
+ RES_BREAK,
+ RES_PAGEDESC,
+ RES_KEEP,
+};
void SwCSS1Parser::ChgPageDesc( const SwPageDesc *pPageDesc,
const SwPageDesc& rNewPageDesc )
@@ -98,7 +91,7 @@ void SwCSS1Parser::ChgPageDesc( const SwPageDesc *pPageDesc,
SwCSS1Parser::SwCSS1Parser( SwDoc *pD, const sal_uInt32 aFHeights[7], const OUString& rBaseURL, bool bNewDoc ) :
SvxCSS1Parser( pD->GetAttrPool(), rBaseURL,
- reinterpret_cast<sal_uInt16*>(&aItemIds), sizeof(aItemIds) / sizeof(sal_uInt16) ),
+ aItemIds, SAL_N_ELEMENTS(aItemIds)),
m_pDoc( pD ),
m_nDropCapCnt( 0 ),
m_bIsNewDoc( bNewDoc ),