summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-16 12:44:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-17 06:04:30 +0000
commitf2a873cd13adf0b74d18af203676f2de86d1cb2e (patch)
tree8b0f044b217e86db3c7320855e4df133fbabf3ae /svx
parent1bffa5e110772a7d6183ac64e56c23f2c3019f93 (diff)
convert SvxBorderStyle to scoped enum
and rename to SvxBorderLineStyle Change-Id: I19e530f162e4ca6290a0ad076e7fe3d5775ae6bc Reviewed-on: https://gerrit.libreoffice.org/35265 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/framelink.cxx16
-rw-r--r--svx/source/dialog/frmsel.cxx6
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx31
3 files changed, 26 insertions, 27 deletions
diff --git a/svx/source/dialog/framelink.cxx b/svx/source/dialog/framelink.cxx
index 76ba40623f01..83c68d44dd58 100644
--- a/svx/source/dialog/framelink.cxx
+++ b/svx/source/dialog/framelink.cxx
@@ -756,7 +756,7 @@ void lclDrawHorLine(
OutputDevice& rDev,
const Point& rLPos, const LineEndResult& rLRes,
const Point& rRPos, const LineEndResult& rRRes,
- long nTOffs, long nBOffs, SvxBorderStyle nDashing )
+ long nTOffs, long nBOffs, SvxBorderLineStyle nDashing )
{
LinePoints aTPoints( rLPos + lclToMapUnit( rLRes.mnOffs1, nTOffs ), rRPos + lclToMapUnit( rRRes.mnOffs1, nTOffs ) );
LinePoints aBPoints( rLPos + lclToMapUnit( rLRes.mnOffs2, nBOffs ), rRPos + lclToMapUnit( rRRes.mnOffs2, nBOffs ) );
@@ -826,7 +826,7 @@ void lclDrawVerLine(
OutputDevice& rDev,
const Point& rTPos, const LineEndResult& rTRes,
const Point& rBPos, const LineEndResult& rBRes,
- long nLOffs, long nROffs, SvxBorderStyle nDashing )
+ long nLOffs, long nROffs, SvxBorderLineStyle nDashing )
{
LinePoints aLPoints( rTPos + lclToMapUnit( nLOffs, rTRes.mnOffs1 ), rBPos + lclToMapUnit( nLOffs, rBRes.mnOffs1 ) );
LinePoints aRPoints( rTPos + lclToMapUnit( nROffs, rTRes.mnOffs2 ), rBPos + lclToMapUnit( nROffs, rBRes.mnOffs2 ) );
@@ -1011,7 +1011,7 @@ void lclPushCrossingClipRegion( OutputDevice& rDev, const Rectangle& rRect, bool
*/
void lclDrawDiagLine(
OutputDevice& rDev, const Rectangle& rRect, bool bTLBR,
- const DiagLineResult& rResult, long nDiagOffs1, long nDiagOffs2, SvxBorderStyle nDashing )
+ const DiagLineResult& rResult, long nDiagOffs1, long nDiagOffs2, SvxBorderLineStyle nDashing )
{
lclPushDiagClipRect( rDev, rRect, rResult );
LinePoints aLPoints( lclGetDiagLineEnds( rRect, bTLBR, nDiagOffs1 ) );
@@ -1122,12 +1122,12 @@ void lclDrawDiagFrameBorders(
Style::Style() :
meRefMode(RefMode::Centered),
mfPatternScale(1.0),
- mnType(table::BorderLineStyle::SOLID)
+ mnType(SvxBorderLineStyle::SOLID)
{
Clear();
}
-Style::Style( double nP, double nD, double nS, editeng::SvxBorderStyle nType ) :
+Style::Style( double nP, double nD, double nS, SvxBorderLineStyle nType ) :
meRefMode(RefMode::Centered),
mfPatternScale(1.0),
mnType(nType)
@@ -1137,7 +1137,7 @@ Style::Style( double nP, double nD, double nS, editeng::SvxBorderStyle nType ) :
}
Style::Style( const Color& rColorPrim, const Color& rColorSecn, const Color& rColorGap, bool bUseGapColor,
- double nP, double nD, double nS, editeng::SvxBorderStyle nType ) :
+ double nP, double nD, double nS, SvxBorderLineStyle nType ) :
meRefMode(RefMode::Centered),
mfPatternScale(1.0),
mnType(nType)
@@ -1244,7 +1244,7 @@ void Style::Set( const SvxBorderLine* pBorder, double fScale, sal_uInt16 nMaxWid
else
{
Clear();
- mnType = table::BorderLineStyle::SOLID;
+ mnType = SvxBorderLineStyle::SOLID;
}
}
@@ -1284,7 +1284,7 @@ bool operator<( const Style& rL, const Style& rR )
if( (rL.Secn() && rR.Secn()) && !rtl::math::approxEqual(rL.Dist(), rR.Dist()) ) return rL.Dist() > rR.Dist();
// both lines single and 1 unit thick, only one is dotted -> rL<rR, if rL is dotted
- if( (nLW == 1) && (rL.Type() != rR.Type()) ) return rL.Type();
+ if( (nLW == 1) && (rL.Type() != rR.Type()) ) return rL.Type() != SvxBorderLineStyle::SOLID;
// seem to be equal
return false;
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index c5bf0f0a519a..bd63f944ab4b 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -150,7 +150,7 @@ void FrameBorder::SetState( FrameBorderState eState )
break;
case FrameBorderState::DontCare:
maCoreStyle = SvxBorderLine();
- maUIStyle = frame::Style(3, 0, 0, table::BorderLineStyle::SOLID); //OBJ_FRAMESTYLE_DONTCARE
+ maUIStyle = frame::Style(3, 0, 0, SvxBorderLineStyle::SOLID); //OBJ_FRAMESTYLE_DONTCARE
break;
}
}
@@ -895,7 +895,7 @@ void FrameSelector::HideAllBorders()
mxImpl->SetBorderState( **aIt, FrameBorderState::Hide );
}
-bool FrameSelector::GetVisibleWidth( long& rnWidth, SvxBorderStyle& rnStyle ) const
+bool FrameSelector::GetVisibleWidth( long& rnWidth, SvxBorderLineStyle& rnStyle ) const
{
VisFrameBorderCIter aIt( mxImpl->maEnabBorders );
if( !aIt.Is() )
@@ -986,7 +986,7 @@ void FrameSelector::SelectAllVisibleBorders()
mxImpl->SelectBorder( **aIt, true/*bSelect*/ );
}
-void FrameSelector::SetStyleToSelection( long nWidth, SvxBorderStyle nStyle )
+void FrameSelector::SetStyleToSelection( long nWidth, SvxBorderLineStyle nStyle )
{
mxImpl->maCurrStyle.SetBorderLineStyle( nStyle );
mxImpl->maCurrStyle.SetWidth( nWidth );
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 28f17997f6d9..aeab85cdb3c8 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2070,32 +2070,31 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( svt::ToolboxController& rController, vcl
m_aLineStyleLb->SetSourceUnit( FUNIT_TWIP );
m_aLineStyleLb->SetNone( SVX_RESSTR(RID_SVXSTR_NONE) );
- using namespace table::BorderLineStyle;
- m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SOLID ), SOLID );
- m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( DOTTED ), DOTTED );
- m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( DASHED ), DASHED );
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::SOLID ), SvxBorderLineStyle::SOLID );
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::DOTTED ), SvxBorderLineStyle::DOTTED );
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::DASHED ), SvxBorderLineStyle::DASHED );
// Double lines
- m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( DOUBLE ), DOUBLE );
- m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_SMALLGAP ), THINTHICK_SMALLGAP, 20 );
- m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_MEDIUMGAP ), THINTHICK_MEDIUMGAP );
- m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_LARGEGAP ), THINTHICK_LARGEGAP );
- m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_SMALLGAP ), THICKTHIN_SMALLGAP, 20 );
- m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_MEDIUMGAP ), THICKTHIN_MEDIUMGAP );
- m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_LARGEGAP ), THICKTHIN_LARGEGAP );
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::DOUBLE ), SvxBorderLineStyle::DOUBLE );
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::THINTHICK_SMALLGAP ), SvxBorderLineStyle::THINTHICK_SMALLGAP, 20 );
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::THINTHICK_MEDIUMGAP ), SvxBorderLineStyle::THINTHICK_MEDIUMGAP );
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::THINTHICK_LARGEGAP ), SvxBorderLineStyle::THINTHICK_LARGEGAP );
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::THICKTHIN_SMALLGAP ), SvxBorderLineStyle::THICKTHIN_SMALLGAP, 20 );
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::THICKTHIN_MEDIUMGAP ), SvxBorderLineStyle::THICKTHIN_MEDIUMGAP );
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::THICKTHIN_LARGEGAP ), SvxBorderLineStyle::THICKTHIN_LARGEGAP );
// Engraved / Embossed
- m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( EMBOSSED ), EMBOSSED, 15,
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::EMBOSSED ), SvxBorderLineStyle::EMBOSSED, 15,
&SvxBorderLine::threeDLightColor, &SvxBorderLine::threeDDarkColor,
&lcl_mediumColor );
- m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( ENGRAVED ), ENGRAVED, 15,
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::ENGRAVED ), SvxBorderLineStyle::ENGRAVED, 15,
&SvxBorderLine::threeDDarkColor, &SvxBorderLine::threeDLightColor,
&lcl_mediumColor );
// Inset / Outset
- m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( OUTSET ), OUTSET, 10,
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::OUTSET ), SvxBorderLineStyle::OUTSET, 10,
&SvxBorderLine::lightColor, &SvxBorderLine::darkColor );
- m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( INSET ), INSET, 10,
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::INSET ), SvxBorderLineStyle::INSET, 10,
&SvxBorderLine::darkColor, &SvxBorderLine::lightColor );
m_aLineStyleLb->SetWidth( 20 ); // 1pt by default
@@ -2127,7 +2126,7 @@ IMPL_LINK_NOARG(SvxLineWindow_Impl, SelectHdl, ListBox&, void)
VclPtr<SvxLineWindow_Impl> xThis(this);
SvxLineItem aLineItem( SID_FRAME_LINESTYLE );
- SvxBorderStyle nStyle = SvxBorderStyle( m_aLineStyleLb->GetSelectEntryStyle() );
+ SvxBorderLineStyle nStyle = SvxBorderLineStyle( m_aLineStyleLb->GetSelectEntryStyle() );
if ( m_aLineStyleLb->GetSelectEntryPos( ) > 0 )
{