diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-08 08:58:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-08 09:07:34 +0000 |
commit | 1f4e0359d3cee2780944f64025a63c208720c74d (patch) | |
tree | f99934a01892ede88b5213655de481919e5edfab /sw | |
parent | 9cacb6ad9f5a012bc892cf9893cd8d37a2a5f304 (diff) |
convert SvxShadowLocation to scoped enum
Change-Id: Ie51995579312328538263172cd3173641df89bca
Reviewed-on: https://gerrit.libreoffice.org/34965
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/inc/swfont.hxx | 16 | ||||
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 26 | ||||
-rw-r--r-- | sw/source/core/layout/ssfrm.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/txtnode/swfont.cxx | 80 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 18 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxsdrexport.cxx | 42 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 22 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8gr.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8graf.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par6.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlexpit.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlimpit.cxx | 12 |
15 files changed, 128 insertions, 128 deletions
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx index 4b94ff256bdb..39a302fc6cde 100644 --- a/sw/source/core/inc/swfont.hxx +++ b/sw/source/core/inc/swfont.hxx @@ -872,8 +872,8 @@ inline sal_uInt16 SwFont::GetTopBorderSpace() const { nRet += m_aTopBorder.get().GetScaledWidth() + m_nTopBorderDist; } - if( m_aShadowLocation == SVX_SHADOW_TOPLEFT || - m_aShadowLocation == SVX_SHADOW_TOPRIGHT ) + if( m_aShadowLocation == SvxShadowLocation::TopLeft || + m_aShadowLocation == SvxShadowLocation::TopRight ) { nRet += m_nShadowWidth; } @@ -887,8 +887,8 @@ inline sal_uInt16 SwFont::GetBottomBorderSpace() const { nRet += m_aBottomBorder.get().GetScaledWidth() + m_nBottomBorderDist; } - if( m_aShadowLocation == SVX_SHADOW_BOTTOMLEFT || - m_aShadowLocation == SVX_SHADOW_BOTTOMRIGHT ) + if( m_aShadowLocation == SvxShadowLocation::BottomLeft || + m_aShadowLocation == SvxShadowLocation::BottomRight ) { nRet += m_nShadowWidth; } @@ -902,8 +902,8 @@ inline sal_uInt16 SwFont::GetRightBorderSpace() const { nRet += m_aRightBorder.get().GetScaledWidth() + m_nRightBorderDist; } - if( m_aShadowLocation == SVX_SHADOW_TOPRIGHT || - m_aShadowLocation == SVX_SHADOW_BOTTOMRIGHT ) + if( m_aShadowLocation == SvxShadowLocation::TopRight || + m_aShadowLocation == SvxShadowLocation::BottomRight ) { nRet += m_nShadowWidth; } @@ -917,8 +917,8 @@ inline sal_uInt16 SwFont::GetLeftBorderSpace() const { nRet += m_aLeftBorder.get().GetScaledWidth() + m_nLeftBorderDist; } - if( m_aShadowLocation == SVX_SHADOW_TOPLEFT || - m_aShadowLocation == SVX_SHADOW_BOTTOMLEFT ) + if( m_aShadowLocation == SvxShadowLocation::TopLeft || + m_aShadowLocation == SvxShadowLocation::BottomLeft ) { nRet += m_nShadowWidth; } diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index bbefcde3393c..3f9598e89944 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1439,7 +1439,7 @@ static void lcl_CalcBorderRect( SwRect &rRect, const SwFrame *pFrame, rRect.Pos() += pFrame->Frame().Pos(); if ( rAttrs.IsLine() || rAttrs.IsBorderDist() || - (bShadow && rAttrs.GetShadow().GetLocation() != SVX_SHADOW_NONE) ) + (bShadow && rAttrs.GetShadow().GetLocation() != SvxShadowLocation::NONE) ) { SwRectFn fnRect = pFrame->IsVertical() ? ( pFrame->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; @@ -1492,7 +1492,7 @@ static void lcl_CalcBorderRect( SwRect &rRect, const SwFrame *pFrame, // Increase of distance by one twip is incorrect. (rRect.*fnRect->fnAddRight)( rBox.GetDistance( SvxBoxItemLine::RIGHT ) ); - if ( bShadow && rAttrs.GetShadow().GetLocation() != SVX_SHADOW_NONE ) + if ( bShadow && rAttrs.GetShadow().GetLocation() != SvxShadowLocation::NONE ) { const SvxShadowItem &rShadow = rAttrs.GetShadow(); if ( bTop ) @@ -4361,7 +4361,7 @@ void SwTabFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, const SwBorderAttrs &rAttrs = *aAccess.Get(); // paint shadow - if ( rAttrs.GetShadow().GetLocation() != SVX_SHADOW_NONE ) + if ( rAttrs.GetShadow().GetLocation() != SvxShadowLocation::NONE ) { SwRect aRect; ::lcl_CalcBorderRect( aRect, this, rAttrs, true, gProp ); @@ -4414,7 +4414,7 @@ static void lcl_PaintShadow( const SwRect& rRect, SwRect& rOutRect, switch ( rShadow.GetLocation() ) { - case SVX_SHADOW_BOTTOMRIGHT: + case SvxShadowLocation::BottomRight: { if ( bDrawFullShadowRectangle ) { @@ -4451,7 +4451,7 @@ static void lcl_PaintShadow( const SwRect& rRect, SwRect& rOutRect, rOutRect.Bottom( rOutRect.Bottom()- nHeight ); } break; - case SVX_SHADOW_TOPLEFT: + case SvxShadowLocation::TopLeft: { if ( bDrawFullShadowRectangle ) { @@ -4488,7 +4488,7 @@ static void lcl_PaintShadow( const SwRect& rRect, SwRect& rOutRect, rOutRect.Top( rOutRect.Top() + nHeight ); } break; - case SVX_SHADOW_TOPRIGHT: + case SvxShadowLocation::TopRight: { if ( bDrawFullShadowRectangle ) { @@ -4525,7 +4525,7 @@ static void lcl_PaintShadow( const SwRect& rRect, SwRect& rOutRect, rOutRect.Top( rOutRect.Top() + nHeight ); } break; - case SVX_SHADOW_BOTTOMLEFT: + case SvxShadowLocation::BottomLeft: { if ( bDrawFullShadowRectangle ) { @@ -4622,10 +4622,10 @@ void SwFrame::PaintShadow( const SwRect& rRect, SwRect& rOutRect, { switch( rShadow.GetLocation() ) { - case SVX_SHADOW_BOTTOMRIGHT: rShadow.SetLocation(SVX_SHADOW_BOTTOMLEFT); break; - case SVX_SHADOW_TOPLEFT: rShadow.SetLocation(SVX_SHADOW_TOPRIGHT); break; - case SVX_SHADOW_TOPRIGHT: rShadow.SetLocation(SVX_SHADOW_BOTTOMRIGHT); break; - case SVX_SHADOW_BOTTOMLEFT: rShadow.SetLocation(SVX_SHADOW_TOPLEFT); break; + case SvxShadowLocation::BottomRight: rShadow.SetLocation(SvxShadowLocation::BottomLeft); break; + case SvxShadowLocation::TopLeft: rShadow.SetLocation(SvxShadowLocation::TopRight); break; + case SvxShadowLocation::TopRight: rShadow.SetLocation(SvxShadowLocation::BottomRight); break; + case SvxShadowLocation::BottomLeft: rShadow.SetLocation(SvxShadowLocation::TopLeft); break; default: break; } } @@ -5090,7 +5090,7 @@ void PaintCharacterBorder( 0, &rFont.GetShadowColor(), rFont.GetShadowWidth(), rFont.GetAbsShadowLocation(bVerticalLayout)); - if( aShadow.GetLocation() != SVX_SHADOW_NONE ) + if( aShadow.GetLocation() != SvxShadowLocation::NONE ) { lcl_PaintShadow( SwRect(aAlignedRect), aAlignedRect, aShadow, false, bTop, bBottom, bLeft, bRight, gProp); @@ -5423,7 +5423,7 @@ void SwFrame::PaintBorder( const SwRect& rRect, const SwPageFrame *pPage, } const bool bLine = rAttrs.IsLine(); - const bool bShadow = rAttrs.GetShadow().GetLocation() != SVX_SHADOW_NONE; + const bool bShadow = rAttrs.GetShadow().GetLocation() != SvxShadowLocation::NONE; // - flag to control, //-hack has to be used. diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index 1898c05a2d29..2a4fd7421347 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -677,7 +677,7 @@ const SwRect SwFrame::UnionFrame( bool bBorder ) const nAdd += rBox.CalcLineSpace( SvxBoxItemLine::RIGHT ); else if ( rAttrs.IsBorderDist() ) nAdd += rBox.GetDistance( SvxBoxItemLine::RIGHT ) + 1; - if( rAttrs.GetShadow().GetLocation() != SVX_SHADOW_NONE ) + if( rAttrs.GetShadow().GetLocation() != SvxShadowLocation::NONE ) { const SvxShadowItem &rShadow = rAttrs.GetShadow(); nLeft -= rShadow.CalcShadowSpace( SvxShadowItemSide::LEFT ); diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index 8f99dea53f5f..c091ca5c881e 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -224,7 +224,7 @@ SwFont::GetAbsRightBorder( const bool bVertLayout ) const SvxShadowLocation SwFont::GetAbsShadowLocation( const bool bVertLayout ) const { - SvxShadowLocation aLocation = SVX_SHADOW_NONE; + SvxShadowLocation aLocation = SvxShadowLocation::NONE; switch( GetOrientation( bVertLayout ) ) { case 0: @@ -234,20 +234,20 @@ SvxShadowLocation SwFont::GetAbsShadowLocation( const bool bVertLayout ) const case 900: switch ( m_aShadowLocation ) { - case SVX_SHADOW_TOPLEFT: - aLocation = SVX_SHADOW_BOTTOMLEFT; + case SvxShadowLocation::TopLeft: + aLocation = SvxShadowLocation::BottomLeft; break; - case SVX_SHADOW_TOPRIGHT: - aLocation = SVX_SHADOW_TOPLEFT; + case SvxShadowLocation::TopRight: + aLocation = SvxShadowLocation::TopLeft; break; - case SVX_SHADOW_BOTTOMLEFT: - aLocation = SVX_SHADOW_BOTTOMRIGHT; + case SvxShadowLocation::BottomLeft: + aLocation = SvxShadowLocation::BottomRight; break; - case SVX_SHADOW_BOTTOMRIGHT: - aLocation = SVX_SHADOW_TOPRIGHT; + case SvxShadowLocation::BottomRight: + aLocation = SvxShadowLocation::TopRight; break; - case SVX_SHADOW_NONE: - case SVX_SHADOW_END: + case SvxShadowLocation::NONE: + case SvxShadowLocation::End: aLocation = m_aShadowLocation; break; } @@ -256,20 +256,20 @@ SvxShadowLocation SwFont::GetAbsShadowLocation( const bool bVertLayout ) const case 1800: switch ( m_aShadowLocation ) { - case SVX_SHADOW_TOPLEFT: - aLocation = SVX_SHADOW_BOTTOMRIGHT; + case SvxShadowLocation::TopLeft: + aLocation = SvxShadowLocation::BottomRight; break; - case SVX_SHADOW_TOPRIGHT: - aLocation = SVX_SHADOW_BOTTOMLEFT; + case SvxShadowLocation::TopRight: + aLocation = SvxShadowLocation::BottomLeft; break; - case SVX_SHADOW_BOTTOMLEFT: - aLocation = SVX_SHADOW_TOPRIGHT; + case SvxShadowLocation::BottomLeft: + aLocation = SvxShadowLocation::TopRight; break; - case SVX_SHADOW_BOTTOMRIGHT: - aLocation = SVX_SHADOW_TOPLEFT; + case SvxShadowLocation::BottomRight: + aLocation = SvxShadowLocation::TopLeft; break; - case SVX_SHADOW_NONE: - case SVX_SHADOW_END: + case SvxShadowLocation::NONE: + case SvxShadowLocation::End: aLocation = m_aShadowLocation; break; } @@ -278,20 +278,20 @@ SvxShadowLocation SwFont::GetAbsShadowLocation( const bool bVertLayout ) const case 2700: switch ( m_aShadowLocation ) { - case SVX_SHADOW_TOPLEFT: - aLocation = SVX_SHADOW_TOPRIGHT; + case SvxShadowLocation::TopLeft: + aLocation = SvxShadowLocation::TopRight; break; - case SVX_SHADOW_TOPRIGHT: - aLocation = SVX_SHADOW_BOTTOMRIGHT; + case SvxShadowLocation::TopRight: + aLocation = SvxShadowLocation::BottomRight; break; - case SVX_SHADOW_BOTTOMLEFT: - aLocation = SVX_SHADOW_TOPLEFT; + case SvxShadowLocation::BottomLeft: + aLocation = SvxShadowLocation::TopLeft; break; - case SVX_SHADOW_BOTTOMRIGHT: - aLocation = SVX_SHADOW_BOTTOMLEFT; + case SvxShadowLocation::BottomRight: + aLocation = SvxShadowLocation::BottomLeft; break; - case SVX_SHADOW_NONE: - case SVX_SHADOW_END: + case SvxShadowLocation::NONE: + case SvxShadowLocation::End: aLocation = m_aShadowLocation; break; } @@ -314,8 +314,8 @@ sal_uInt16 SwFont::CalcShadowSpace( switch( nShadow ) { case SvxShadowItemSide::TOP: - if(( aLoc == SVX_SHADOW_TOPLEFT || - aLoc == SVX_SHADOW_TOPRIGHT ) && + if(( aLoc == SvxShadowLocation::TopLeft || + aLoc == SvxShadowLocation::TopRight ) && ( nOrient == 0 || nOrient == 1800 || ( nOrient == 900 && !bSkipRight ) || ( nOrient == 2700 && !bSkipLeft ))) @@ -325,8 +325,8 @@ sal_uInt16 SwFont::CalcShadowSpace( break; case SvxShadowItemSide::BOTTOM: - if(( aLoc == SVX_SHADOW_BOTTOMLEFT || - aLoc == SVX_SHADOW_BOTTOMRIGHT ) && + if(( aLoc == SvxShadowLocation::BottomLeft || + aLoc == SvxShadowLocation::BottomRight ) && ( nOrient == 0 || nOrient == 1800 || ( nOrient == 900 && !bSkipLeft ) || ( nOrient == 2700 && !bSkipRight ))) @@ -336,8 +336,8 @@ sal_uInt16 SwFont::CalcShadowSpace( break; case SvxShadowItemSide::LEFT: - if(( aLoc == SVX_SHADOW_TOPLEFT || - aLoc == SVX_SHADOW_BOTTOMLEFT ) && + if(( aLoc == SvxShadowLocation::TopLeft || + aLoc == SvxShadowLocation::BottomLeft ) && ( nOrient == 900 || nOrient == 2700 || ( nOrient == 0 && !bSkipLeft ) || ( nOrient == 1800 && !bSkipRight ))) @@ -347,8 +347,8 @@ sal_uInt16 SwFont::CalcShadowSpace( break; case SvxShadowItemSide::RIGHT: - if(( aLoc == SVX_SHADOW_TOPRIGHT || - aLoc == SVX_SHADOW_BOTTOMRIGHT ) && + if(( aLoc == SvxShadowLocation::TopRight || + aLoc == SvxShadowLocation::BottomRight ) && ( nOrient == 900 || nOrient == 2700 || ( nOrient == 0 && !bSkipRight ) || ( nOrient == 1800 && !bSkipLeft ))) @@ -878,7 +878,7 @@ SwFont::SwFont( const SwAttrSet* pAttrSet, { SetShadowColor(COL_TRANSPARENT); SetShadowWidth(0); - SetShadowLocation(SVX_SHADOW_NONE); + SetShadowLocation(SvxShadowLocation::NONE); } const SvxTwoLinesItem& rTwoLinesItem = pAttrSet->Get2Lines(); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 14fc18c160e4..7614eaf01a4a 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2748,7 +2748,7 @@ static OutputBorderOptions lcl_getTableDefaultBorderOptions(bool bEcma) rOptions.bWriteTag = true; rOptions.bWriteInsideHV = true; rOptions.bWriteDistance = false; - rOptions.aShadowLocation = SVX_SHADOW_NONE; + rOptions.aShadowLocation = SvxShadowLocation::NONE; rOptions.bCheckDistanceSize = false; return rOptions; @@ -2763,7 +2763,7 @@ static OutputBorderOptions lcl_getTableCellBorderOptions(bool bEcma) rOptions.bWriteTag = true; rOptions.bWriteInsideHV = true; rOptions.bWriteDistance = false; - rOptions.aShadowLocation = SVX_SHADOW_NONE; + rOptions.aShadowLocation = SvxShadowLocation::NONE; rOptions.bCheckDistanceSize = false; return rOptions; @@ -2778,7 +2778,7 @@ static OutputBorderOptions lcl_getBoxBorderOptions() rOptions.bWriteTag = false; rOptions.bWriteInsideHV = false; rOptions.bWriteDistance = true; - rOptions.aShadowLocation = SVX_SHADOW_NONE; + rOptions.aShadowLocation = SvxShadowLocation::NONE; rOptions.bCheckDistanceSize = false; return rOptions; @@ -2838,11 +2838,11 @@ static void impl_borders( FSHelperPtr const & pSerializer, const SvxBoxItem& rBo } bool bWriteShadow = false; - if (rOptions.aShadowLocation == SVX_SHADOW_NONE) + if (rOptions.aShadowLocation == SvxShadowLocation::NONE) { // The border has no shadow } - else if (rOptions.aShadowLocation == SVX_SHADOW_BOTTOMRIGHT) + else if (rOptions.aShadowLocation == SvxShadowLocation::BottomRight) { // Special case of 'Bottom-Right' shadow: // If the shadow location is 'Bottom-Right' - then turn on the shadow @@ -2857,10 +2857,10 @@ static void impl_borders( FSHelperPtr const & pSerializer, const SvxBoxItem& rBo // If there is a shadow, and it's not the regular 'Bottom-Right', // then write only the 'shadowed' sides of the border if ( - ( ( rOptions.aShadowLocation == SVX_SHADOW_TOPLEFT || rOptions.aShadowLocation == SVX_SHADOW_TOPRIGHT ) && *pBrd == SvxBoxItemLine::TOP ) || - ( ( rOptions.aShadowLocation == SVX_SHADOW_TOPLEFT || rOptions.aShadowLocation == SVX_SHADOW_BOTTOMLEFT ) && *pBrd == SvxBoxItemLine::LEFT ) || - ( ( rOptions.aShadowLocation == SVX_SHADOW_BOTTOMLEFT || rOptions.aShadowLocation == SVX_SHADOW_BOTTOMRIGHT ) && *pBrd == SvxBoxItemLine::BOTTOM) || - ( ( rOptions.aShadowLocation == SVX_SHADOW_TOPRIGHT || rOptions.aShadowLocation == SVX_SHADOW_BOTTOMRIGHT ) && *pBrd == SvxBoxItemLine::RIGHT ) + ( ( rOptions.aShadowLocation == SvxShadowLocation::TopLeft || rOptions.aShadowLocation == SvxShadowLocation::TopRight ) && *pBrd == SvxBoxItemLine::TOP ) || + ( ( rOptions.aShadowLocation == SvxShadowLocation::TopLeft || rOptions.aShadowLocation == SvxShadowLocation::BottomLeft ) && *pBrd == SvxBoxItemLine::LEFT ) || + ( ( rOptions.aShadowLocation == SvxShadowLocation::BottomLeft || rOptions.aShadowLocation == SvxShadowLocation::BottomRight ) && *pBrd == SvxBoxItemLine::BOTTOM) || + ( ( rOptions.aShadowLocation == SvxShadowLocation::TopRight || rOptions.aShadowLocation == SvxShadowLocation::BottomRight ) && *pBrd == SvxBoxItemLine::RIGHT ) ) { bWriteShadow = true; diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index a870c1765a3e..4cb05b0b470b 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -87,7 +87,7 @@ struct OutputBorderOptions SvxShadowLocation aShadowLocation; bool bCheckDistanceSize; - OutputBorderOptions() : tag(0), bUseStartEnd(false), bWriteTag(true), bWriteInsideHV(false), bWriteDistance(false), aShadowLocation(SVX_SHADOW_NONE), bCheckDistanceSize(false) {} + OutputBorderOptions() : tag(0), bUseStartEnd(false), bWriteTag(true), bWriteInsideHV(false), bWriteDistance(false), aShadowLocation(SvxShadowLocation::NONE), bCheckDistanceSize(false) {} }; /** diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 4a71fe2c2506..c4b2e8b63dc1 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -298,25 +298,25 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons // Count effectExtent values, their value is needed before dist{T,B,L,R} is written. SvxShadowItem aShadowItem = pFrameFormat->GetShadow(); sal_Int32 nLeftExt = 0, nRightExt = 0, nTopExt = 0, nBottomExt = 0; - if (aShadowItem.GetLocation() != SVX_SHADOW_NONE) + if (aShadowItem.GetLocation() != SvxShadowLocation::NONE) { sal_Int32 nShadowWidth(TwipsToEMU(aShadowItem.GetWidth())); switch (aShadowItem.GetLocation()) { - case SVX_SHADOW_TOPLEFT: + case SvxShadowLocation::TopLeft: nTopExt = nLeftExt = nShadowWidth; break; - case SVX_SHADOW_TOPRIGHT: + case SvxShadowLocation::TopRight: nTopExt = nRightExt = nShadowWidth; break; - case SVX_SHADOW_BOTTOMLEFT: + case SvxShadowLocation::BottomLeft: nBottomExt = nLeftExt = nShadowWidth; break; - case SVX_SHADOW_BOTTOMRIGHT: + case SvxShadowLocation::BottomRight: nBottomExt = nRightExt = nShadowWidth; break; - case SVX_SHADOW_NONE: - case SVX_SHADOW_END: + case SvxShadowLocation::NONE: + case SvxShadowLocation::End: break; } } @@ -882,27 +882,27 @@ void DocxSdrExport::writeDMLDrawing(const SdrObject* pSdrObject, const SwFrameFo void DocxSdrExport::Impl::textFrameShadow(const SwFrameFormat& rFrameFormat) { const SvxShadowItem& aShadowItem = rFrameFormat.GetShadow(); - if (aShadowItem.GetLocation() == SVX_SHADOW_NONE) + if (aShadowItem.GetLocation() == SvxShadowLocation::NONE) return; OString aShadowWidth(OString::number(double(aShadowItem.GetWidth()) / 20) + "pt"); OString aOffset; switch (aShadowItem.GetLocation()) { - case SVX_SHADOW_TOPLEFT: + case SvxShadowLocation::TopLeft: aOffset = "-" + aShadowWidth + ",-" + aShadowWidth; break; - case SVX_SHADOW_TOPRIGHT: + case SvxShadowLocation::TopRight: aOffset = aShadowWidth + ",-" + aShadowWidth; break; - case SVX_SHADOW_BOTTOMLEFT: + case SvxShadowLocation::BottomLeft: aOffset = "-" + aShadowWidth + "," + aShadowWidth; break; - case SVX_SHADOW_BOTTOMRIGHT: + case SvxShadowLocation::BottomRight: aOffset = aShadowWidth + "," + aShadowWidth; break; - case SVX_SHADOW_NONE: - case SVX_SHADOW_END: + case SvxShadowLocation::NONE: + case SvxShadowLocation::End: break; } if (aOffset.isEmpty()) @@ -985,7 +985,7 @@ void DocxSdrExport::writeDMLEffectLst(const SwFrameFormat& rFrameFormat) const SvxShadowItem& aShadowItem = rFrameFormat.GetShadow(); // Output effects - if (aShadowItem.GetLocation() != SVX_SHADOW_NONE) + if (aShadowItem.GetLocation() != SvxShadowLocation::NONE) { // Distance is measured diagonally from corner double nShadowDist = sqrt((double)aShadowItem.GetWidth()*aShadowItem.GetWidth()*2.0); @@ -995,20 +995,20 @@ void DocxSdrExport::writeDMLEffectLst(const SwFrameFormat& rFrameFormat) sal_uInt32 nShadowDir = 0; switch (aShadowItem.GetLocation()) { - case SVX_SHADOW_TOPLEFT: + case SvxShadowLocation::TopLeft: nShadowDir = 13500000; break; - case SVX_SHADOW_TOPRIGHT: + case SvxShadowLocation::TopRight: nShadowDir = 18900000; break; - case SVX_SHADOW_BOTTOMLEFT: + case SvxShadowLocation::BottomLeft: nShadowDir = 8100000; break; - case SVX_SHADOW_BOTTOMRIGHT: + case SvxShadowLocation::BottomRight: nShadowDir = 2700000; break; - case SVX_SHADOW_NONE: - case SVX_SHADOW_END: + case SvxShadowLocation::NONE: + case SvxShadowLocation::End: break; } OString aShadowDir(OString::number(nShadowDir)); diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index b56eeefc696a..6d790ce9dee6 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -164,13 +164,13 @@ static OString OutTBLBorderLine(RtfExport& rExport, const editeng::SvxBorderLine } static OString OutBorderLine(RtfExport& rExport, const editeng::SvxBorderLine* pLine, - const sal_Char* pStr, sal_uInt16 nDist, SvxShadowLocation eShadowLocation = SVX_SHADOW_NONE) + const sal_Char* pStr, sal_uInt16 nDist, SvxShadowLocation eShadowLocation = SvxShadowLocation::NONE) { OStringBuffer aRet; aRet.append(OutTBLBorderLine(rExport, pLine, pStr)); aRet.append(OOO_STRING_SVTOOLS_RTF_BRSP); aRet.append((sal_Int32)nDist); - if (eShadowLocation == SVX_SHADOW_BOTTOMRIGHT) + if (eShadowLocation == SvxShadowLocation::BottomRight) aRet.append(LO_STRING_SVTOOLS_RTF_BRDRSH); return aRet.makeStringAndClear(); } @@ -1685,7 +1685,7 @@ namespace void lcl_TextFrameShadow(std::vector< std::pair<OString, OString> >& rFlyProperties, const SwFrameFormat& rFrameFormat) { const SvxShadowItem& aShadowItem = rFrameFormat.GetShadow(); - if (aShadowItem.GetLocation() == SVX_SHADOW_NONE) + if (aShadowItem.GetLocation() == SvxShadowLocation::NONE) return; rFlyProperties.push_back(std::make_pair<OString, OString>("fShadow", OString::number(1))); @@ -1700,24 +1700,24 @@ void lcl_TextFrameShadow(std::vector< std::pair<OString, OString> >& rFlyPropert OString aOffsetY; switch (aShadowItem.GetLocation()) { - case SVX_SHADOW_TOPLEFT: + case SvxShadowLocation::TopLeft: aOffsetX = "-" + aShadowWidth; aOffsetY = "-" + aShadowWidth; break; - case SVX_SHADOW_TOPRIGHT: + case SvxShadowLocation::TopRight: aOffsetX = aShadowWidth; aOffsetY = "-" + aShadowWidth; break; - case SVX_SHADOW_BOTTOMLEFT: + case SvxShadowLocation::BottomLeft: aOffsetX = "-" + aShadowWidth; aOffsetY = aShadowWidth; break; - case SVX_SHADOW_BOTTOMRIGHT: + case SvxShadowLocation::BottomRight: aOffsetX = aShadowWidth; aOffsetY = aShadowWidth; break; - case SVX_SHADOW_NONE: - case SVX_SHADOW_END: + case SvxShadowLocation::NONE: + case SvxShadowLocation::End: break; } if (!aOffsetX.isEmpty()) @@ -2606,7 +2606,7 @@ void RtfAttributeOutput::CharHidden(const SvxCharHiddenItem& rHidden) void RtfAttributeOutput::CharBorder(const editeng::SvxBorderLine* pAllBorder, const sal_uInt16 nDist, const bool bShadow) { - m_aStyles.append(OutBorderLine(m_rExport, pAllBorder, OOO_STRING_SVTOOLS_RTF_CHBRDR, nDist, bShadow ? SVX_SHADOW_BOTTOMRIGHT : SVX_SHADOW_NONE)); + m_aStyles.append(OutBorderLine(m_rExport, pAllBorder, OOO_STRING_SVTOOLS_RTF_CHBRDR, nDist, bShadow ? SvxShadowLocation::BottomRight : SvxShadowLocation::NONE)); } void RtfAttributeOutput::CharHighlight(const SvxBrushItem& rBrush) @@ -3302,7 +3302,7 @@ void RtfAttributeOutput::FormatBox(const SvxBoxItem& rBox) m_aSectionBreaks.append(OutBorderLine(m_rExport, rBox.GetTop(), OOO_STRING_SVTOOLS_RTF_BOX, nDist)); else { - SvxShadowLocation eShadowLocation = SVX_SHADOW_NONE; + SvxShadowLocation eShadowLocation = SvxShadowLocation::NONE; if (const SfxPoolItem* pItem = GetExport().HasItem(RES_SHADOW)) eShadowLocation = static_cast<const SvxShadowItem*>(pItem)->GetLocation(); diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 3b7707d267d5..b6d7771cdcbe 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -2085,27 +2085,27 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrameFormat& rFormat, sal_uInt32 nShadow = nShadowType; SvxShadowLocation eLocation = pSI->GetLocation(); - if( (eLocation!=SVX_SHADOW_NONE) && (pSI->GetWidth()!=0) ) + if( (eLocation!=SvxShadowLocation::NONE) && (pSI->GetWidth()!=0) ) { switch( eLocation ) { - case SVX_SHADOW_TOPLEFT: + case SvxShadowLocation::TopLeft: { nOffX = -nOffX; nOffY = -nOffY; } break; - case SVX_SHADOW_TOPRIGHT: + case SvxShadowLocation::TopRight: { nOffY = -nOffY; } break; - case SVX_SHADOW_BOTTOMLEFT: + case SvxShadowLocation::BottomLeft: { nOffX = -nOffX; } break; - case SVX_SHADOW_BOTTOMRIGHT: + case SvxShadowLocation::BottomRight: break; default: break; diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index 04c30bc3e7a0..166a078dcf39 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -529,7 +529,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const ww8::Frame &rFly, bool bShadow = false; // Shadow ? if (const SvxShadowItem* pSI = rAttrSet.GetItem<SvxShadowItem>(RES_SHADOW)) { - bShadow = (pSI->GetLocation() != SVX_SHADOW_NONE) && + bShadow = (pSI->GetLocation() != SvxShadowLocation::NONE) && (pSI->GetWidth() != 0); } diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index bc00c9bfeca6..e463164a4077 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -4121,7 +4121,7 @@ void WW8AttributeOutput::FormatBox( const SvxBoxItem& rBox ) if ( pItem ) { const SvxShadowItem* p = static_cast<const SvxShadowItem*>(pItem); - bShadow = ( p->GetLocation() != SVX_SHADOW_NONE ) + bShadow = ( p->GetLocation() != SvxShadowLocation::NONE ) && ( p->GetWidth() != 0 ); } @@ -5116,7 +5116,7 @@ void AttributeOutputBase::FormatCharBorder( const SvxBoxItem& rBox ) const SfxPoolItem* pItem = GetExport().HasItem( RES_CHRATR_SHADOW ); const SvxShadowItem* pShadowItem = static_cast<const SvxShadowItem*>(pItem); const bool bShadow = - pShadowItem && pShadowItem->GetLocation() != SVX_SHADOW_NONE && + pShadowItem && pShadowItem->GetLocation() != SvxShadowLocation::NONE && pShadowItem->GetWidth() > 0; CharBorder( pBorderLine, nDist, bShadow ); diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 1ad44eb97329..7ab52cf733cb 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -1758,16 +1758,16 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, if( 0 <= nShdDistX ) { if( 0 <= nShdDistY ) - eShdPosi = SVX_SHADOW_BOTTOMRIGHT; + eShdPosi = SvxShadowLocation::BottomRight; else - eShdPosi = SVX_SHADOW_TOPRIGHT; + eShdPosi = SvxShadowLocation::TopRight; } else { if( 0 <= nShdDistY ) - eShdPosi = SVX_SHADOW_BOTTOMLEFT; + eShdPosi = SvxShadowLocation::BottomLeft; else - eShdPosi = SVX_SHADOW_TOPLEFT; + eShdPosi = SvxShadowLocation::TopLeft; } aShadow.SetLocation( eShdPosi ); diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index dbe11d3d7e75..57ac9b2c7ed3 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -1436,7 +1436,7 @@ bool SwWW8ImplReader::SetShadow(SvxShadowItem& rShadow, const short *pSizeArray, if (nVal < 0x10) nVal = 0x10; rShadow.SetWidth(nVal); - rShadow.SetLocation(SVX_SHADOW_BOTTOMRIGHT); + rShadow.SetLocation(SvxShadowLocation::BottomRight); bRet = true; } return bRet; diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx index 58f8de8111a8..59be80af8307 100644 --- a/sw/source/filter/xml/xmlexpit.cxx +++ b/sw/source/filter/xml/xmlexpit.cxx @@ -500,19 +500,19 @@ bool SvXMLExportItemMapper::QueryXMLValue( sal_Int32 nX = 1, nY = 1; switch( pShadow->GetLocation() ) { - case SVX_SHADOW_TOPLEFT: + case SvxShadowLocation::TopLeft: nX = -1; nY = -1; break; - case SVX_SHADOW_TOPRIGHT: + case SvxShadowLocation::TopRight: nY = -1; break; - case SVX_SHADOW_BOTTOMLEFT: + case SvxShadowLocation::BottomLeft: nX = -1; break; - case SVX_SHADOW_BOTTOMRIGHT: + case SvxShadowLocation::BottomRight: break; - case SVX_SHADOW_NONE: + case SvxShadowLocation::NONE: default: rValue = GetXMLToken(XML_NONE); return true; diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index b695f721786c..e9af97b7634b 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -360,14 +360,14 @@ bool SvXMLImportItemMapper::PutXMLValue( SvXMLTokenEnumerator aTokenEnum( rValue ); Color aColor( 128,128, 128 ); - rShadow.SetLocation( SVX_SHADOW_BOTTOMRIGHT ); + rShadow.SetLocation( SvxShadowLocation::BottomRight ); OUString aToken; while( aTokenEnum.getNextToken( aToken ) ) { if( IsXMLToken( aToken, XML_NONE ) ) { - rShadow.SetLocation( SVX_SHADOW_NONE ); + rShadow.SetLocation( SvxShadowLocation::NONE ); bOk = true; } else if( !bColorFound && aToken.startsWith("#") ) @@ -394,22 +394,22 @@ bool SvXMLImportItemMapper::PutXMLValue( { if( nY < 0 ) { - rShadow.SetLocation( SVX_SHADOW_TOPLEFT ); + rShadow.SetLocation( SvxShadowLocation::TopLeft ); } else { - rShadow.SetLocation( SVX_SHADOW_BOTTOMLEFT ); + rShadow.SetLocation( SvxShadowLocation::BottomLeft ); } } else { if( nY < 0 ) { - rShadow.SetLocation( SVX_SHADOW_TOPRIGHT ); + rShadow.SetLocation( SvxShadowLocation::TopRight ); } else { - rShadow.SetLocation( SVX_SHADOW_BOTTOMRIGHT ); + rShadow.SetLocation( SvxShadowLocation::BottomRight ); } } |