[Libreoffice-commits] core.git: 2 commits - cui/source include/vcl svtools/source svx/source vcl/source vcl/workben
Noel Grandin
noel.grandin at collabora.co.uk
Thu Dec 22 06:43:43 UTC 2016
cui/source/dialogs/cuigrfflt.cxx | 24 ++++++++++----------
include/vcl/bitmap.hxx | 38 ++++++++++++++++-----------------
include/vcl/layout.hxx | 16 ++++++-------
svtools/source/graphic/transformer.cxx | 2 -
svx/source/dialog/grfflt.cxx | 16 ++++++-------
vcl/source/gdi/bitmap4.cxx | 32 +++++++++++++--------------
vcl/source/window/layout.cxx | 26 +++++++++++-----------
vcl/workben/outdevgrind.cxx | 2 -
vcl/workben/vcldemo.cxx | 2 -
9 files changed, 79 insertions(+), 79 deletions(-)
New commits:
commit 41f7878ccbc457ef0431c999d38d9d77265d5dc7
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Wed Dec 21 17:06:15 2016 +0200
convert BmpFilter to scoped enum
Change-Id: I22c5b49f108d4ce103dea5098a2a0dc9d6bc854c
Reviewed-on: https://gerrit.libreoffice.org/32292
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index f90faf9..947a7e8 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -242,10 +242,10 @@ Graphic GraphicFilterMosaic::GetFilteredGraphic( const Graphic& rGraphic,
{
Animation aAnim( rGraphic.GetAnimation() );
- if( aAnim.Filter( BMP_FILTER_MOSAIC, &aParam ) )
+ if( aAnim.Filter( BmpFilter::Mosaic, &aParam ) )
{
if( IsEnhanceEdges() )
- aAnim.Filter( BMP_FILTER_SHARPEN );
+ aAnim.Filter( BmpFilter::Sharpen );
aRet = aAnim;
}
@@ -254,10 +254,10 @@ Graphic GraphicFilterMosaic::GetFilteredGraphic( const Graphic& rGraphic,
{
BitmapEx aBmpEx( rGraphic.GetBitmapEx() );
- if( aBmpEx.Filter( BMP_FILTER_MOSAIC, &aParam ) )
+ if( aBmpEx.Filter( BmpFilter::Mosaic, &aParam ) )
{
if( IsEnhanceEdges() )
- (void)aBmpEx.Filter( BMP_FILTER_SHARPEN );
+ (void)aBmpEx.Filter( BmpFilter::Sharpen );
aRet = aBmpEx;
}
@@ -308,7 +308,7 @@ Graphic GraphicFilterSmooth::GetFilteredGraphic( const Graphic& rGraphic, double
{
Animation aAnim( rGraphic.GetAnimation() );
- if( aAnim.Filter( BMP_FILTER_SMOOTH, &aParam ) )
+ if( aAnim.Filter( BmpFilter::Smooth, &aParam ) )
{
aRet = aAnim;
}
@@ -317,7 +317,7 @@ Graphic GraphicFilterSmooth::GetFilteredGraphic( const Graphic& rGraphic, double
{
BitmapEx aBmpEx( rGraphic.GetBitmapEx() );
- if( aBmpEx.Filter( BMP_FILTER_SMOOTH, &aParam ) )
+ if( aBmpEx.Filter( BmpFilter::Smooth, &aParam ) )
{
aRet = aBmpEx;
}
@@ -379,7 +379,7 @@ Graphic GraphicFilterSolarize::GetFilteredGraphic( const Graphic& rGraphic, doub
{
Animation aAnim( rGraphic.GetAnimation() );
- if( aAnim.Filter( BMP_FILTER_SOLARIZE, &aParam ) )
+ if( aAnim.Filter( BmpFilter::Solarize, &aParam ) )
{
if( IsInvert() )
aAnim.Invert();
@@ -391,7 +391,7 @@ Graphic GraphicFilterSolarize::GetFilteredGraphic( const Graphic& rGraphic, doub
{
BitmapEx aBmpEx( rGraphic.GetBitmapEx() );
- if( aBmpEx.Filter( BMP_FILTER_SOLARIZE, &aParam ) )
+ if( aBmpEx.Filter( BmpFilter::Solarize, &aParam ) )
{
if( IsInvert() )
aBmpEx.Invert();
@@ -441,14 +441,14 @@ Graphic GraphicFilterSepia::GetFilteredGraphic( const Graphic& rGraphic, double,
{
Animation aAnim( rGraphic.GetAnimation() );
- if( aAnim.Filter( BMP_FILTER_SEPIA, &aParam ) )
+ if( aAnim.Filter( BmpFilter::Sepia, &aParam ) )
aRet = aAnim;
}
else
{
BitmapEx aBmpEx( rGraphic.GetBitmapEx() );
- if( aBmpEx.Filter( BMP_FILTER_SEPIA, &aParam ) )
+ if( aBmpEx.Filter( BmpFilter::Sepia, &aParam ) )
aRet = aBmpEx;
}
@@ -584,14 +584,14 @@ Graphic GraphicFilterEmboss::GetFilteredGraphic( const Graphic& rGraphic, double
{
Animation aAnim( rGraphic.GetAnimation() );
- if( aAnim.Filter( BMP_FILTER_EMBOSS_GREY, &aParam ) )
+ if( aAnim.Filter( BmpFilter::EmbossGrey, &aParam ) )
aRet = aAnim;
}
else
{
BitmapEx aBmpEx( rGraphic.GetBitmapEx() );
- if( aBmpEx.Filter( BMP_FILTER_EMBOSS_GREY, &aParam ) )
+ if( aBmpEx.Filter( BmpFilter::EmbossGrey, &aParam ) )
aRet = aBmpEx;
}
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index 95f715d..751fa9a 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -106,20 +106,20 @@ enum BmpReduce
BMP_REDUCE_POPULAR = 1
};
-enum BmpFilter
+enum class BmpFilter
{
- BMP_FILTER_SMOOTH = 0,
- BMP_FILTER_SHARPEN = 1,
- BMP_FILTER_REMOVENOISE = 2,
- BMP_FILTER_SOBEL_GREY = 3,
- BMP_FILTER_EMBOSS_GREY = 4,
- BMP_FILTER_SOLARIZE = 5,
- BMP_FILTER_SEPIA = 6,
- BMP_FILTER_MOSAIC = 7,
- BMP_FILTER_POPART = 8,
- BMP_FILTER_DUOTONE = 9,
-
- BMP_FILTER_UNKNOWN = 65535
+ Smooth = 0,
+ Sharpen = 1,
+ RemoveNoise = 2,
+ SobelGrey = 3,
+ EmbossGrey = 4,
+ Solarize = 5,
+ Sepia = 6,
+ Mosaic = 7,
+ PopArt = 8,
+ DuoTone = 9,
+
+ Unknown = 65535
};
class VCL_DLLPUBLIC BmpFilterParam
@@ -127,32 +127,32 @@ class VCL_DLLPUBLIC BmpFilterParam
public:
BmpFilterParam( sal_uLong nProgressStart = 0, sal_uLong nProgressEnd = 0 ) :
- meFilter( BMP_FILTER_UNKNOWN ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd ) {}
+ meFilter( BmpFilter::Unknown ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd ) {}
BmpFilterParam( sal_uInt8 cSolarGreyThreshold, sal_uLong nProgressStart = 0, sal_uLong nProgressEnd = 0 ) :
- meFilter( BMP_FILTER_SOLARIZE ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd ),
+ meFilter( BmpFilter::Solarize ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd ),
mcSolarGreyThreshold( cSolarGreyThreshold ) {}
BmpFilterParam( double nRadius, sal_uLong nProgressStart = 0, sal_uLong nProgressEnd = 0 ) :
- meFilter( BMP_FILTER_SMOOTH ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd ),
+ meFilter( BmpFilter::Smooth ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd ),
mnRadius( nRadius ) {}
BmpFilterParam( sal_uInt16 nSepiaPercent, sal_uLong nProgressStart = 0, sal_uLong nProgressEnd = 0 ) :
- meFilter( BMP_FILTER_SEPIA ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd ),
+ meFilter( BmpFilter::Sepia ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd ),
mnSepiaPercent( nSepiaPercent )
{
assert(nSepiaPercent<=100);
}
BmpFilterParam( const Size& rMosaicTileSize, sal_uLong nProgressStart = 0, sal_uLong nProgressEnd = 0 ) :
- meFilter( BMP_FILTER_MOSAIC ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd )
+ meFilter( BmpFilter::Mosaic ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd )
{
maMosaicTileSize.mnTileWidth = rMosaicTileSize.Width();
maMosaicTileSize.mnTileHeight= rMosaicTileSize.Height();
}
BmpFilterParam( sal_uInt16 nEmbossAzimuthAngle100, sal_uInt16 nEmbossElevationAngle100,
sal_uLong nProgressStart = 0, sal_uLong nProgressEnd = 0 ) :
- meFilter( BMP_FILTER_EMBOSS_GREY ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd )
+ meFilter( BmpFilter::EmbossGrey ), mnProgressStart( nProgressStart ), mnProgressEnd( nProgressEnd )
{
maEmbossAngles.mnAzimuthAngle100 = nEmbossAzimuthAngle100;
maEmbossAngles.mnElevationAngle100 = nEmbossElevationAngle100;
diff --git a/svtools/source/graphic/transformer.cxx b/svtools/source/graphic/transformer.cxx
index 0de58a3..4375cae 100644
--- a/svtools/source/graphic/transformer.cxx
+++ b/svtools/source/graphic/transformer.cxx
@@ -145,7 +145,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL GraphicTransformer::applyDuotone(
AlphaMask aMask( aBitmapEx.GetAlpha() );
Bitmap aBitmap( aBitmapEx.GetBitmap() );
BmpFilterParam aFilter( (sal_uLong) nColorOne, (sal_uLong) nColorTwo );
- aBitmap.Filter( BMP_FILTER_DUOTONE, &aFilter );
+ aBitmap.Filter( BmpFilter::DuoTone, &aFilter );
aGraphic = ::Graphic( BitmapEx( aBitmap, aMask ) );
::unographic::Graphic* pUnoGraphic = new ::unographic::Graphic();
diff --git a/svx/source/dialog/grfflt.cxx b/svx/source/dialog/grfflt.cxx
index df6eb08..c8858fd 100644
--- a/svx/source/dialog/grfflt.cxx
+++ b/svx/source/dialog/grfflt.cxx
@@ -91,14 +91,14 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj
{
Animation aAnimation( rGraphic.GetAnimation() );
- if( aAnimation.Filter( BMP_FILTER_SHARPEN ) )
+ if( aAnimation.Filter( BmpFilter::Sharpen ) )
aGraphic = aAnimation;
}
else
{
BitmapEx aBmpEx( rGraphic.GetBitmapEx() );
- if( aBmpEx.Filter( BMP_FILTER_SHARPEN ) )
+ if( aBmpEx.Filter( BmpFilter::Sharpen ) )
aGraphic = aBmpEx;
}
@@ -116,14 +116,14 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj
{
Animation aAnimation( rGraphic.GetAnimation() );
- if( aAnimation.Filter( BMP_FILTER_REMOVENOISE ) )
+ if( aAnimation.Filter( BmpFilter::RemoveNoise ) )
aGraphic = aAnimation;
}
else
{
BitmapEx aBmpEx( rGraphic.GetBitmapEx() );
- if( aBmpEx.Filter( BMP_FILTER_REMOVENOISE ) )
+ if( aBmpEx.Filter( BmpFilter::RemoveNoise ) )
aGraphic = aBmpEx;
}
@@ -141,14 +141,14 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj
{
Animation aAnimation( rGraphic.GetAnimation() );
- if( aAnimation.Filter( BMP_FILTER_SOBEL_GREY ) )
+ if( aAnimation.Filter( BmpFilter::SobelGrey ) )
aGraphic = aAnimation;
}
else
{
BitmapEx aBmpEx( rGraphic.GetBitmapEx() );
- if( aBmpEx.Filter( BMP_FILTER_SOBEL_GREY ) )
+ if( aBmpEx.Filter( BmpFilter::SobelGrey ) )
aGraphic = aBmpEx;
}
@@ -205,14 +205,14 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj
{
Animation aAnimation( rGraphic.GetAnimation() );
- if( aAnimation.Filter( BMP_FILTER_POPART ) )
+ if( aAnimation.Filter( BmpFilter::PopArt ) )
aGraphic = aAnimation;
}
else
{
BitmapEx aBmpEx( rGraphic.GetBitmapEx() );
- if( aBmpEx.Filter( BMP_FILTER_POPART ) )
+ if( aBmpEx.Filter( BmpFilter::PopArt ) )
aGraphic = aBmpEx;
}
diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx
index 63940bd..e516541 100644
--- a/vcl/source/gdi/bitmap4.cxx
+++ b/vcl/source/gdi/bitmap4.cxx
@@ -44,7 +44,7 @@ bool Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam )
switch( eFilter )
{
- case BMP_FILTER_SMOOTH:
+ case BmpFilter::Smooth:
{
// Blur for positive values of mnRadius
if (pFilterParam->mnRadius > 0.0)
@@ -63,42 +63,42 @@ bool Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam )
}
break;
- case BMP_FILTER_SHARPEN:
+ case BmpFilter::Sharpen:
{
const long pSharpenMatrix[] = { -1, -1, -1, -1, 16, -1, -1, -1, -1 };
bRet = ImplConvolute3( &pSharpenMatrix[ 0 ] );
}
break;
- case BMP_FILTER_REMOVENOISE:
+ case BmpFilter::RemoveNoise:
bRet = ImplMedianFilter();
break;
- case BMP_FILTER_SOBEL_GREY:
+ case BmpFilter::SobelGrey:
bRet = ImplSobelGrey();
break;
- case BMP_FILTER_SOLARIZE:
+ case BmpFilter::Solarize:
bRet = ImplSolarize( pFilterParam );
break;
- case BMP_FILTER_SEPIA:
+ case BmpFilter::Sepia:
bRet = ImplSepia( pFilterParam );
break;
- case BMP_FILTER_MOSAIC:
+ case BmpFilter::Mosaic:
bRet = ImplMosaic( pFilterParam );
break;
- case BMP_FILTER_EMBOSS_GREY:
+ case BmpFilter::EmbossGrey:
bRet = ImplEmbossGrey( pFilterParam );
break;
- case BMP_FILTER_POPART:
+ case BmpFilter::PopArt:
bRet = ImplPopArt();
break;
- case BMP_FILTER_DUOTONE:
+ case BmpFilter::DuoTone:
bRet = ImplDuotoneFilter( pFilterParam->mnProgressStart, pFilterParam->mnProgressEnd );
break;
@@ -576,9 +576,9 @@ bool Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam )
long nGrey11, nGrey12, nGrey13;
long nGrey21, nGrey22, nGrey23;
long nGrey31, nGrey32, nGrey33;
- double fAzim = ( ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_EMBOSS_GREY ) ?
+ double fAzim = ( ( pFilterParam && pFilterParam->meFilter == BmpFilter::EmbossGrey ) ?
( pFilterParam->maEmbossAngles.mnAzimuthAngle100 * 0.01 ) : 0.0 ) * F_PI180;
- double fElev = ( ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_EMBOSS_GREY ) ?
+ double fElev = ( ( pFilterParam && pFilterParam->meFilter == BmpFilter::EmbossGrey ) ?
( pFilterParam->maEmbossAngles.mnElevationAngle100 * 0.01 ) : 90.0 ) * F_PI180;
long* pHMap = new long[ nWidth + 2 ];
long* pVMap = new long[ nHeight + 2 ];
@@ -672,7 +672,7 @@ bool Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam )
if( pWriteAcc )
{
- const sal_uInt8 cThreshold = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_SOLARIZE ) ?
+ const sal_uInt8 cThreshold = ( pFilterParam && pFilterParam->meFilter == BmpFilter::Solarize ) ?
pFilterParam->mcSolarGreyThreshold : 128;
if( pWriteAcc->HasPalette() )
@@ -720,7 +720,7 @@ bool Bitmap::ImplSepia( const BmpFilterParam* pFilterParam )
if( pReadAcc )
{
- long nSepiaPercent = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_SEPIA ) ?
+ long nSepiaPercent = ( pFilterParam && pFilterParam->meFilter == BmpFilter::Sepia ) ?
pFilterParam->mnSepiaPercent : 10;
const long nSepia = 10000 - 100 * SAL_BOUND( nSepiaPercent, 0, 100 );
BitmapPalette aSepiaPal( 256 );
@@ -798,9 +798,9 @@ bool Bitmap::ImplSepia( const BmpFilterParam* pFilterParam )
bool Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam )
{
- sal_uLong nTileWidth = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
+ sal_uLong nTileWidth = ( pFilterParam && pFilterParam->meFilter == BmpFilter::Mosaic ) ?
pFilterParam->maMosaicTileSize.mnTileWidth : 4;
- sal_uLong nTileHeight = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
+ sal_uLong nTileHeight = ( pFilterParam && pFilterParam->meFilter == BmpFilter::Mosaic ) ?
pFilterParam->maMosaicTileSize.mnTileHeight : 4;
bool bRet = false;
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index 562f4d1..0e0e19d 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -127,7 +127,7 @@ void setupMethodStubs( functor_vector_type& res )
const Bitmap aBitmap( aIntro.GetBitmap() );
Bitmap aBitmapBW( aBitmap );
- aBitmapBW.Filter( BMP_FILTER_EMBOSS_GREY );
+ aBitmapBW.Filter( BmpFilter::EmbossGrey );
Bitmap aBitmapAlien( Size( 100, 100 ), 8 );
aBitmapAlien.Erase( COL_RED );
#endif
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 964904f..40e2e7d 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -143,7 +143,7 @@ public:
Application::Abort("Failed to load intro image");
maIntroBW = maIntro.GetBitmap();
- maIntroBW.Filter(BMP_FILTER_EMBOSS_GREY);
+ maIntroBW.Filter(BmpFilter::EmbossGrey);
InitRenderers();
mnSegmentsY = rtl::math::round(std::sqrt(maRenderers.size()), 0,
commit 7444355f1d544e015083c2412696e1df6f295e2d
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Wed Dec 21 15:53:33 2016 +0200
convert VclButtonBoxStyle to scoped enum
Change-Id: If3d02c9be54a509f85214acbf4a1e6cfd8955dc4
Reviewed-on: https://gerrit.libreoffice.org/32291
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index d487a9e..3e03ca2 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -186,14 +186,14 @@ protected:
}
};
-enum VclButtonBoxStyle
+enum class VclButtonBoxStyle
{
- VCL_BUTTONBOX_DEFAULT_STYLE,
- VCL_BUTTONBOX_SPREAD,
- VCL_BUTTONBOX_EDGE,
- VCL_BUTTONBOX_START,
- VCL_BUTTONBOX_END,
- VCL_BUTTONBOX_CENTER
+ Default,
+ Spread,
+ Edge,
+ Start,
+ End,
+ Center
};
class VCL_DLLPUBLIC VclButtonBox : public VclBox
@@ -201,7 +201,7 @@ class VCL_DLLPUBLIC VclButtonBox : public VclBox
public:
VclButtonBox(vcl::Window *pParent)
: VclBox(pParent, false, 0/*nSpacing*/)
- , m_eLayoutStyle(VCL_BUTTONBOX_DEFAULT_STYLE)
+ , m_eLayoutStyle(VclButtonBoxStyle::Default)
{
}
virtual bool set_property(const OString &rKey, const OString &rValue) override;
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 0b8795a..fef9d4e 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -595,7 +595,7 @@ VclButtonBox::Requisition VclButtonBox::calculatePrimarySecondaryRequisitions()
long nMainGroupSecondary = getSecondaryDimension(aMainGroupSize);
long nSubGroupSecondary = getSecondaryDimension(aSubGroupSize);
- bool bIgnoreSecondaryPacking = (m_eLayoutStyle == VCL_BUTTONBOX_SPREAD || m_eLayoutStyle == VCL_BUTTONBOX_CENTER);
+ bool bIgnoreSecondaryPacking = (m_eLayoutStyle == VclButtonBoxStyle::Spread || m_eLayoutStyle == VclButtonBoxStyle::Center);
std::vector<long> aMainGroupSizes;
std::vector<bool> aMainGroupNonHomogeneous;
@@ -709,17 +709,17 @@ bool VclButtonBox::set_property(const OString &rKey, const OString &rValue)
{
if (rKey == "layout-style")
{
- VclButtonBoxStyle eStyle = VCL_BUTTONBOX_DEFAULT_STYLE;
+ VclButtonBoxStyle eStyle = VclButtonBoxStyle::Default;
if (rValue == "spread")
- eStyle = VCL_BUTTONBOX_SPREAD;
+ eStyle = VclButtonBoxStyle::Spread;
else if (rValue == "edge")
- eStyle = VCL_BUTTONBOX_EDGE;
+ eStyle = VclButtonBoxStyle::Edge;
else if (rValue == "start")
- eStyle = VCL_BUTTONBOX_START;
+ eStyle = VclButtonBoxStyle::Start;
else if (rValue == "end")
- eStyle = VCL_BUTTONBOX_END;
+ eStyle = VclButtonBoxStyle::End;
else if (rValue == "center")
- eStyle = VCL_BUTTONBOX_CENTER;
+ eStyle = VclButtonBoxStyle::Center;
else
{
SAL_WARN("vcl.layout", "unknown layout style " << rValue.getStr());
@@ -746,7 +746,7 @@ void VclButtonBox::setAllocation(const Size &rAllocation)
//To-Do, other layout styles
switch (m_eLayoutStyle)
{
- case VCL_BUTTONBOX_START:
+ case VclButtonBoxStyle::Start:
if (!aReq.m_aSubGroupDimensions.empty())
{
long nOtherPrimaryDimension = getPrimaryDimension(
@@ -755,7 +755,7 @@ void VclButtonBox::setAllocation(const Size &rAllocation)
nAllocPrimaryDimension - nOtherPrimaryDimension);
}
break;
- case VCL_BUTTONBOX_SPREAD:
+ case VclButtonBoxStyle::Spread:
if (!aReq.m_aMainGroupDimensions.empty())
{
long nMainPrimaryDimension = getPrimaryDimension(
@@ -766,7 +766,7 @@ void VclButtonBox::setAllocation(const Size &rAllocation)
setPrimaryCoordinate(aMainGroupPos, nSpacing);
}
break;
- case VCL_BUTTONBOX_CENTER:
+ case VclButtonBoxStyle::Center:
if (!aReq.m_aMainGroupDimensions.empty())
{
long nMainPrimaryDimension = getPrimaryDimension(
@@ -778,8 +778,8 @@ void VclButtonBox::setAllocation(const Size &rAllocation)
default:
SAL_WARN("vcl.layout", "todo unimplemented layout style");
SAL_FALLTHROUGH;
- case VCL_BUTTONBOX_DEFAULT_STYLE:
- case VCL_BUTTONBOX_END:
+ case VclButtonBoxStyle::Default:
+ case VclButtonBoxStyle::End:
if (!aReq.m_aMainGroupDimensions.empty())
{
long nMainPrimaryDimension = getPrimaryDimension(
@@ -795,7 +795,7 @@ void VclButtonBox::setAllocation(const Size &rAllocation)
std::vector<long>::const_iterator aPrimaryI = aReq.m_aMainGroupDimensions.begin();
std::vector<long>::const_iterator aSecondaryI = aReq.m_aSubGroupDimensions.begin();
- bool bIgnoreSecondaryPacking = (m_eLayoutStyle == VCL_BUTTONBOX_SPREAD || m_eLayoutStyle == VCL_BUTTONBOX_CENTER);
+ bool bIgnoreSecondaryPacking = (m_eLayoutStyle == VclButtonBoxStyle::Spread || m_eLayoutStyle == VclButtonBoxStyle::Center);
for (vcl::Window *pChild = GetWindow(GetWindowType::FirstChild); pChild; pChild = pChild->GetWindow(GetWindowType::Next))
{
if (!pChild->IsVisible())
More information about the Libreoffice-commits
mailing list