diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx index 3b1a8ae9a3cd..c80e407fb532 100644 --- a/sc/source/ui/vba/vbapagesetup.cxx +++ b/sc/source/ui/vba/vbapagesetup.cxx @@ -41,6 +41,7 @@ #include #include #include +#include using namespace ::com::sun::star; using namespace ::ooo::vba; @@ -665,7 +666,7 @@ static PaperSizeMap paperSizeMappings[] = { PAPER_ENV_12, ooo::vba::excel::XlPaperSize::xlPaperEnvelope12 } }; -static const int nMapSize = sizeof(paperSizeMappings) / sizeof(paperSizeMappings[0]); +static const int nMapSize = SAL_N_ELEMENTS(paperSizeMappings); sal_Int32 PaperSizeOOoToExcel(Paper ePaper) {