summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-16 16:16:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-20 09:43:25 +0100
commit0f0049d77a0ee6ae936922213c7290d0bc4fee29 (patch)
tree21ec8c68606453166de7557afa394054907d9c85 /filter
parent21e85d591f344958c3ebee9422ba15dbd931f2cc (diff)
TypedWhichId for XATTR* constants
Change-Id: Ie9d637d701b77a549de3b00956f9c74ee8bd08c1 Reviewed-on: https://gerrit.libreoffice.org/44830 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.cxx4
-rw-r--r--filter/source/msfilter/svdfppt.cxx20
2 files changed, 12 insertions, 12 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 79624155282e..d404bf3b1df4 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -553,7 +553,7 @@ void EscherPropertyContainer::CreateFillProperties(
SfxItemSet aAttr( pObj->GetMergedItemSet() );
// tranparency with gradient. Means the third setting in transparency page is set
bool bTransparentGradient = ( aAttr.GetItemState( XATTR_FILLFLOATTRANSPARENCE ) == SfxItemState::SET ) &&
- static_cast<const XFillFloatTransparenceItem&>( aAttr.Get( XATTR_FILLFLOATTRANSPARENCE ) ).IsEnabled();
+ aAttr.Get( XATTR_FILLFLOATTRANSPARENCE ).IsEnabled();
CreateFillProperties( rXPropSet, bEdge, bTransparentGradient );
}
}
@@ -851,7 +851,7 @@ bool EscherPropertyContainer::GetLineArrow( const bool bLineStart,
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, sLineName ) )
{
OUString aArrowStartName = *o3tl::doAccess<OUString>(aAny);
- sal_Int16 nWhich = bLineStart ? XATTR_LINESTART : XATTR_LINEEND;
+ sal_uInt16 nWhich = bLineStart ? sal_uInt16(XATTR_LINESTART) : sal_uInt16(XATTR_LINEEND);
OUString aApiName = SvxUnogetApiNameForItem(nWhich, aArrowStartName);
bool bIsMapped = true;
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index c8a34061a990..27e0de3d2962 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -7412,14 +7412,14 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell > const & xCel
{//vertical writing
xPropSet->setPropertyValue( "TextWritingMode" , Any( css::text::WritingMode_TB_RL ) );
}
- drawing::FillStyle eFillStyle(static_cast<const XFillStyleItem&>(pObj->GetMergedItem( XATTR_FILLSTYLE )).GetValue());
+ drawing::FillStyle eFillStyle(pObj->GetMergedItem( XATTR_FILLSTYLE ).GetValue());
css::drawing::FillStyle eFS( css::drawing::FillStyle_NONE );
switch( eFillStyle )
{
case drawing::FillStyle_SOLID :
{
eFS = css::drawing::FillStyle_SOLID;
- Color aFillColor( static_cast<const XFillColorItem&>(pObj->GetMergedItem( XATTR_FILLCOLOR )).GetColorValue() );
+ Color aFillColor( pObj->GetMergedItem( XATTR_FILLCOLOR ).GetColorValue() );
sal_Int32 nFillColor( aFillColor.GetColor() );
xPropSet->setPropertyValue( "FillColor", Any( nFillColor ) );
}
@@ -7427,7 +7427,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell > const & xCel
case drawing::FillStyle_GRADIENT :
{
eFS = css::drawing::FillStyle_GRADIENT;
- XGradient aXGradient(static_cast<const XFillGradientItem&>(pObj->GetMergedItem(XATTR_FILLGRADIENT)).GetGradientValue());
+ XGradient aXGradient(pObj->GetMergedItem(XATTR_FILLGRADIENT).GetGradientValue());
css::awt::Gradient aGradient;
aGradient.Style = (awt::GradientStyle) aXGradient.GetGradientStyle();
@@ -7451,7 +7451,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell > const & xCel
{
eFS = css::drawing::FillStyle_BITMAP;
- const XFillBitmapItem aXFillBitmapItem(static_cast<const XFillBitmapItem&>(pObj->GetMergedItem( XATTR_FILLBITMAP )));
+ const XFillBitmapItem aXFillBitmapItem(pObj->GetMergedItem( XATTR_FILLBITMAP ));
OUString aURL( UNO_NAME_GRAPHOBJ_URLPREFIX);
aURL += OStringToOUString(
aXFillBitmapItem.GetGraphicObject().GetUniqueID(),
@@ -7459,8 +7459,8 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell > const & xCel
xPropSet->setPropertyValue("FillBitmapURL", Any( aURL ) );
- const XFillBmpStretchItem aStretchItem(static_cast<const XFillBmpStretchItem&>(pObj->GetMergedItem( XATTR_FILLBMP_STRETCH )));
- const XFillBmpTileItem aTileItem(static_cast<const XFillBmpTileItem&>(pObj->GetMergedItem( XATTR_FILLBMP_TILE )));
+ const XFillBmpStretchItem aStretchItem(pObj->GetMergedItem( XATTR_FILLBMP_STRETCH ));
+ const XFillBmpTileItem aTileItem(pObj->GetMergedItem( XATTR_FILLBMP_TILE ));
if( aTileItem.GetValue() )
xPropSet->setPropertyValue( "FillBitmapMode", Any( css::drawing::BitmapMode_REPEAT ) );
else if( aStretchItem.GetValue() )
@@ -7478,7 +7478,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell > const & xCel
xPropSet->setPropertyValue( "FillStyle", Any( eFS ) );
if ( eFillStyle != drawing::FillStyle_NONE )
{
- sal_Int16 nFillTransparence( static_cast<const XFillTransparenceItem&>(pObj->GetMergedItem( XATTR_FILLTRANSPARENCE ) ).GetValue() );
+ sal_Int16 nFillTransparence( pObj->GetMergedItem( XATTR_FILLTRANSPARENCE ).GetValue() );
xPropSet->setPropertyValue( "FillTransparence", Any( nFillTransparence ) );
}
}
@@ -7491,17 +7491,17 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable > const
{
try
{
- drawing::LineStyle eLineStyle(static_cast<const XLineStyleItem&>(pLine->GetMergedItem( XATTR_LINESTYLE )).GetValue());
+ drawing::LineStyle eLineStyle(pLine->GetMergedItem( XATTR_LINESTYLE ).GetValue());
css::table::BorderLine2 aBorderLine;
switch( eLineStyle )
{
case drawing::LineStyle_DASH :
case drawing::LineStyle_SOLID :
{
- Color aLineColor( static_cast<const XLineColorItem&>(pLine->GetMergedItem( XATTR_LINECOLOR )).GetColorValue() );
+ Color aLineColor( pLine->GetMergedItem( XATTR_LINECOLOR ).GetColorValue() );
aBorderLine.Color = aLineColor.GetColor();
// Avoid width = 0, the min value should be 1.
- sal_Int32 nLineWidth = std::max(sal_Int32(1), static_cast<const XLineWidthItem&>(pLine->GetMergedItem(XATTR_LINEWIDTH)) .GetValue() / 4);
+ sal_Int32 nLineWidth = std::max(sal_Int32(1), pLine->GetMergedItem(XATTR_LINEWIDTH) .GetValue() / 4);
aBorderLine.LineWidth = static_cast< sal_Int16 >( nLineWidth );
aBorderLine.LineStyle = eLineStyle == drawing::LineStyle_SOLID ? table::BorderLineStyle::SOLID : table::BorderLineStyle::DASHED;
}