diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-22 16:39:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-04 06:38:03 +0000 |
commit | 5676ced82539d9e40bde6196d2aa3b2e4c7b3fdb (patch) | |
tree | db860b2365f8cb0e2fab4772e80e4e38d4d89b37 /filter | |
parent | 1a1d1a86e9129ec3885610b641179b30f9bf5e79 (diff) |
make UNO enums scoped for internal LO code
this modifies codemaker so that, for an UNO enum, we generate code
that effectively looks like:
#ifdef LIBO_INTERNAL_ONLY && HAVE_CX11_CONSTEXPR
enum class XXX {
ONE = 1
};
constexpr auto ONE = XXX_ONE;
#else
...the old normal way..
#endif
which means that for LO internal code, the enums are scoped.
The "constexpr auto" trick acts like an alias so we don't have to
use scoped naming everywhere.
Change-Id: I3054ecb230e8666ce98b4a9cb87b384df5f64fb4
Reviewed-on: https://gerrit.libreoffice.org/34546
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 2 | ||||
-rw-r--r-- | filter/source/svg/svgexport.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 87daad96ae83..ce47bfccd440 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -405,7 +405,7 @@ void EscherPropertyContainer::CreateGradientProperties( bWriteFillTo = true; } break; - case css::awt::GradientStyle_MAKE_FIXED_SIZE : break; + case css::awt::GradientStyle::GradientStyle_MAKE_FIXED_SIZE : break; } AddOpt( ESCHER_Prop_fillType, nFillType ); AddOpt( ESCHER_Prop_fillAngle, nAngle ); diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 31c21943d974..0687c2a3b73d 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -1725,11 +1725,11 @@ bool SVGFilter::implExportShape( const Reference< XShape >& rxShape, bool bMaste mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "visibility", "hidden" ); - sal_uInt16 nTextAdjust = ParagraphAdjust_LEFT; + sal_uInt16 nTextAdjust = (sal_uInt16)ParagraphAdjust_LEFT; OUString sTextAdjust; xShapePropSet->getPropertyValue( "ParaAdjust" ) >>= nTextAdjust; - switch( nTextAdjust ) + switch( (ParagraphAdjust)nTextAdjust ) { case ParagraphAdjust_LEFT: sTextAdjust = "left"; |