summaryrefslogtreecommitdiff
path: root/sc/source
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 /sc/source
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 'sc/source')
-rw-r--r--sc/source/core/data/dpoutput.cxx2
-rw-r--r--sc/source/filter/excel/xestyle.cxx16
-rw-r--r--sc/source/filter/excel/xistyle.cxx2
-rw-r--r--sc/source/filter/html/htmlexp.cxx34
-rw-r--r--sc/source/filter/html/htmlpars.cxx4
-rw-r--r--sc/source/filter/inc/orcusinterface.hxx5
-rw-r--r--sc/source/filter/lotus/lotattr.cxx4
-rw-r--r--sc/source/filter/orcus/interface.cxx20
-rw-r--r--sc/source/ui/sidebar/CellBorderStyleControl.cxx4
-rw-r--r--sc/source/ui/sidebar/CellLineStyleControl.cxx13
-rw-r--r--sc/source/ui/view/formatsh.cxx6
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx3
12 files changed, 55 insertions, 58 deletions
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index f22d222372e3..188bc8af4fbf 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -313,7 +313,7 @@ void lcl_SetFrame( ScDocument* pDoc, SCTAB nTab,
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
sal_uInt16 nWidth )
{
- ::editeng::SvxBorderLine aLine(nullptr, nWidth, table::BorderLineStyle::SOLID);
+ ::editeng::SvxBorderLine aLine(nullptr, nWidth, SvxBorderLineStyle::SOLID);
SvxBoxItem aBox( ATTR_BORDER );
aBox.SetLine(&aLine, SvxBoxItemLine::LEFT);
aBox.SetLine(&aLine, SvxBoxItemLine::TOP);
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index d1c50ea852b0..e0407cee0da7 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -1659,28 +1659,28 @@ void lclGetBorderLine(
switch (pLine->GetBorderLineStyle())
{
- case table::BorderLineStyle::NONE:
+ case SvxBorderLineStyle::NONE:
nStyleIndex = Idx_None;
break;
- case table::BorderLineStyle::SOLID:
+ case SvxBorderLineStyle::SOLID:
nStyleIndex = Idx_Solid;
break;
- case table::BorderLineStyle::DOTTED:
+ case SvxBorderLineStyle::DOTTED:
nStyleIndex = Idx_Dotted;
break;
- case table::BorderLineStyle::DASHED:
+ case SvxBorderLineStyle::DASHED:
nStyleIndex = Idx_Dashed;
break;
- case table::BorderLineStyle::FINE_DASHED:
+ case SvxBorderLineStyle::FINE_DASHED:
nStyleIndex = Idx_FineDashed;
break;
- case table::BorderLineStyle::DASH_DOT:
+ case SvxBorderLineStyle::DASH_DOT:
nStyleIndex = Idx_DashDot;
break;
- case table::BorderLineStyle::DASH_DOT_DOT:
+ case SvxBorderLineStyle::DASH_DOT_DOT:
nStyleIndex = Idx_DashDotDot;
break;
- case table::BorderLineStyle::DOUBLE_THIN:
+ case SvxBorderLineStyle::DOUBLE_THIN:
// the "nOuterWidth" is not right for this line type
// but at the moment width it not important for that
// the right function is nOuterWidth = (sal_uInt16) pLine->GetWidth();
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index d7e6c5a9ef82..576d809986d4 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -957,7 +957,7 @@ bool lclConvertBorderLine( ::editeng::SvxBorderLine& rLine, const XclImpPalette&
rLine.SetColor( rPalette.GetColor( nXclColor ) );
rLine.SetWidth( ppnLineParam[ nXclLine ][ 0 ] );
- rLine.SetBorderLineStyle( static_cast< ::editeng::SvxBorderStyle>(
+ rLine.SetBorderLineStyle( static_cast< SvxBorderLineStyle>(
ppnLineParam[ nXclLine ][ 1 ]) );
return true;
}
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index f0cccf5b212b..500efa900c36 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -511,37 +511,37 @@ OString ScHTMLExport::BorderToStyle(const char* pBorderName,
append("px ");
switch (pLine->GetBorderLineStyle())
{
- case table::BorderLineStyle::SOLID:
+ case SvxBorderLineStyle::SOLID:
aOut.append("solid");
break;
- case table::BorderLineStyle::DOTTED:
+ case SvxBorderLineStyle::DOTTED:
aOut.append("dotted");
break;
- case table::BorderLineStyle::DASHED:
- case table::BorderLineStyle::DASH_DOT:
- case table::BorderLineStyle::DASH_DOT_DOT:
+ case SvxBorderLineStyle::DASHED:
+ case SvxBorderLineStyle::DASH_DOT:
+ case SvxBorderLineStyle::DASH_DOT_DOT:
aOut.append("dashed");
break;
- case table::BorderLineStyle::DOUBLE:
- case table::BorderLineStyle::DOUBLE_THIN:
- case table::BorderLineStyle::THINTHICK_SMALLGAP:
- case table::BorderLineStyle::THINTHICK_MEDIUMGAP:
- case table::BorderLineStyle::THINTHICK_LARGEGAP:
- case table::BorderLineStyle::THICKTHIN_SMALLGAP:
- case table::BorderLineStyle::THICKTHIN_MEDIUMGAP:
- case table::BorderLineStyle::THICKTHIN_LARGEGAP:
+ case SvxBorderLineStyle::DOUBLE:
+ case SvxBorderLineStyle::DOUBLE_THIN:
+ case SvxBorderLineStyle::THINTHICK_SMALLGAP:
+ case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
+ case SvxBorderLineStyle::THINTHICK_LARGEGAP:
+ case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
+ case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
+ case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
aOut.append("double");
break;
- case table::BorderLineStyle::EMBOSSED:
+ case SvxBorderLineStyle::EMBOSSED:
aOut.append("ridge");
break;
- case table::BorderLineStyle::ENGRAVED:
+ case SvxBorderLineStyle::ENGRAVED:
aOut.append("groove");
break;
- case table::BorderLineStyle::OUTSET:
+ case SvxBorderLineStyle::OUTSET:
aOut.append("outset");
break;
- case table::BorderLineStyle::INSET:
+ case SvxBorderLineStyle::INSET:
aOut.append("inset");
break;
default:
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index f3f3a3132fa2..9675a0676795 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -2296,8 +2296,8 @@ void ScHTMLTable::ApplyCellBorders( ScDocument* pDoc, const ScAddress& rFirstPos
const SCROW nLastRow = maSize.mnRows - 1;
const long nOuterLine = DEF_LINE_WIDTH_2;
const long nInnerLine = DEF_LINE_WIDTH_0;
- SvxBorderLine aOuterLine(nullptr, nOuterLine, table::BorderLineStyle::SOLID);
- SvxBorderLine aInnerLine(nullptr, nInnerLine, table::BorderLineStyle::SOLID);
+ SvxBorderLine aOuterLine(nullptr, nOuterLine, SvxBorderLineStyle::SOLID);
+ SvxBorderLine aInnerLine(nullptr, nInnerLine, SvxBorderLineStyle::SOLID);
SvxBoxItem aBorderItem( ATTR_BORDER );
for( SCCOL nCol = 0; nCol <= nLastCol; ++nCol )
diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
index 28b214d8f9cc..8c1be9c65975 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -22,6 +22,7 @@
#include "conditio.hxx"
#include <rtl/strbuf.hxx>
+#include <editeng/borderline.hxx>
#define __ORCUS_STATIC_LIB
#include <orcus/spreadsheet/import_interface.hpp>
@@ -38,8 +39,6 @@ class ScOrcusFactory;
class ScRangeData;
class SfxItemSet;
-typedef sal_Int16 SvxBorderStyle;
-
namespace com { namespace sun { namespace star { namespace task {
class XStatusIndicator;
@@ -296,7 +295,7 @@ private:
{
struct border_line
{
- SvxBorderStyle mestyle;
+ SvxBorderLineStyle mestyle;
Color maColor;
double mnWidth;
diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx
index 55faff9b3741..bffa6c1c4cd0 100644
--- a/sc/source/filter/lotus/lotattr.cxx
+++ b/sc/source/filter/lotus/lotattr.cxx
@@ -156,12 +156,12 @@ void LotAttrCache::LotusToScBorderLine( sal_uInt8 nLine, ::editeng::SvxBorderLin
switch ( nLine )
{
- case 0: aBL.SetBorderLineStyle(table::BorderLineStyle::NONE); break;
+ case 0: aBL.SetBorderLineStyle(SvxBorderLineStyle::NONE); break;
case 1: aBL.SetWidth( DEF_LINE_WIDTH_1 ); break;
case 2: aBL.SetWidth( DEF_LINE_WIDTH_2 ); break;
case 3:
{
- aBL.SetBorderLineStyle(table::BorderLineStyle::DOUBLE_THIN);
+ aBL.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE_THIN);
aBL.SetWidth( DEF_LINE_WIDTH_1 );
}
break;
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index ec785beaaf21..dda51c924613 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -853,7 +853,7 @@ ScOrcusStyles::border::border():
}
ScOrcusStyles::border::border_line::border_line():
- mestyle(::com::sun::star::table::BorderLineStyle::SOLID),
+ mestyle(SvxBorderLineStyle::SOLID),
maColor(COL_WHITE),
mnWidth(0)
{
@@ -1300,32 +1300,32 @@ void ScOrcusStyles::set_border_style(
case orcus::spreadsheet::border_style_t::medium:
case orcus::spreadsheet::border_style_t::thick:
case orcus::spreadsheet::border_style_t::thin:
- current_line.mestyle = ::com::sun::star::table::BorderLineStyle::SOLID;
+ current_line.mestyle = SvxBorderLineStyle::SOLID;
break;
case orcus::spreadsheet::border_style_t::dash_dot:
- current_line.mestyle = ::com::sun::star::table::BorderLineStyle::DASH_DOT;
+ current_line.mestyle = SvxBorderLineStyle::DASH_DOT;
break;
case orcus::spreadsheet::border_style_t::dash_dot_dot:
- current_line.mestyle = ::com::sun::star::table::BorderLineStyle::DASH_DOT_DOT;
+ current_line.mestyle = SvxBorderLineStyle::DASH_DOT_DOT;
break;
case orcus::spreadsheet::border_style_t::dashed:
- current_line.mestyle = ::com::sun::star::table::BorderLineStyle::DASHED;
+ current_line.mestyle = SvxBorderLineStyle::DASHED;
break;
case orcus::spreadsheet::border_style_t::dotted:
- current_line.mestyle = ::com::sun::star::table::BorderLineStyle::DOTTED;
+ current_line.mestyle = SvxBorderLineStyle::DOTTED;
break;
case orcus::spreadsheet::border_style_t::double_border:
- current_line.mestyle = ::com::sun::star::table::BorderLineStyle::DOUBLE;
+ current_line.mestyle = SvxBorderLineStyle::DOUBLE;
break;
case orcus::spreadsheet::border_style_t::medium_dash_dot:
case orcus::spreadsheet::border_style_t::slant_dash_dot:
- current_line.mestyle = ::com::sun::star::table::BorderLineStyle::DASH_DOT;
+ current_line.mestyle = SvxBorderLineStyle::DASH_DOT;
break;
case orcus::spreadsheet::border_style_t::medium_dash_dot_dot:
- current_line.mestyle = ::com::sun::star::table::BorderLineStyle::DASH_DOT_DOT;
+ current_line.mestyle = SvxBorderLineStyle::DASH_DOT_DOT;
break;
case orcus::spreadsheet::border_style_t::medium_dashed:
- current_line.mestyle = ::com::sun::star::table::BorderLineStyle::DASHED;
+ current_line.mestyle = SvxBorderLineStyle::DASHED;
break;
default:
;
diff --git a/sc/source/ui/sidebar/CellBorderStyleControl.cxx b/sc/source/ui/sidebar/CellBorderStyleControl.cxx
index 8c554f4d1e32..85ddb65b6e8d 100644
--- a/sc/source/ui/sidebar/CellBorderStyleControl.cxx
+++ b/sc/source/ui/sidebar/CellBorderStyleControl.cxx
@@ -244,7 +244,7 @@ IMPL_LINK(CellBorderStylePopup, TB3SelectHdl, ToolBox *, pToolBox, void)
else if (nId == maTBBorder3->GetItemId("doublebottom"))
{
pBottom.reset(new editeng::SvxBorderLine(nullptr));
- pBottom->GuessLinesWidths(DOUBLE, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_1);
+ pBottom->GuessLinesWidths(SvxBorderLineStyle::DOUBLE, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_1);
nValidFlags |= FRM_VALID_BOTTOM;
}
else if (nId == maTBBorder3->GetItemId("topthickbottom"))
@@ -256,7 +256,7 @@ IMPL_LINK(CellBorderStylePopup, TB3SelectHdl, ToolBox *, pToolBox, void)
else if (nId == maTBBorder3->GetItemId("topdoublebottom"))
{
pBottom.reset(new editeng::SvxBorderLine(nullptr));
- pBottom->GuessLinesWidths(DOUBLE, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_1);
+ pBottom->GuessLinesWidths(SvxBorderLineStyle::DOUBLE, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_1);
pTop.reset(new editeng::SvxBorderLine(nullptr, 1));
nValidFlags |= FRM_VALID_BOTTOM|FRM_VALID_TOP;
}
diff --git a/sc/source/ui/sidebar/CellLineStyleControl.cxx b/sc/source/ui/sidebar/CellLineStyleControl.cxx
index 66abe88a57e8..f7a9261eab5f 100644
--- a/sc/source/ui/sidebar/CellLineStyleControl.cxx
+++ b/sc/source/ui/sidebar/CellLineStyleControl.cxx
@@ -105,8 +105,7 @@ IMPL_LINK(CellLineStylePopup, VSSelectHdl, ValueSet*, pControl, void)
{
const sal_uInt16 iPos(maCellLineStyleValueSet->GetSelectItemId());
SvxLineItem aLineItem(SID_FRAME_LINESTYLE);
- using namespace ::com::sun::star::table::BorderLineStyle;
- editeng::SvxBorderStyle nStyle = SOLID;
+ SvxBorderLineStyle nStyle = SvxBorderLineStyle::SOLID;
sal_uInt16 n1 = 0;
sal_uInt16 n2 = 0;
sal_uInt16 n3 = 0;
@@ -131,31 +130,31 @@ IMPL_LINK(CellLineStylePopup, VSSelectHdl, ValueSet*, pControl, void)
n1 = DEF_LINE_WIDTH_0;
n2 = DEF_LINE_WIDTH_0;
n3 = DEF_LINE_WIDTH_1;
- nStyle = DOUBLE;
+ nStyle = SvxBorderLineStyle::DOUBLE;
break;
case 6:
n1 = DEF_LINE_WIDTH_0;
n2 = DEF_LINE_WIDTH_0;
n3 = DEF_LINE_WIDTH_2;
- nStyle = DOUBLE;
+ nStyle = SvxBorderLineStyle::DOUBLE;
break;
case 7:
n1 = DEF_LINE_WIDTH_1;
n2 = DEF_LINE_WIDTH_2;
n3 = DEF_LINE_WIDTH_1;
- nStyle = DOUBLE;
+ nStyle = SvxBorderLineStyle::DOUBLE;
break;
case 8:
n1 = DEF_LINE_WIDTH_2;
n2 = DEF_LINE_WIDTH_0;
n3 = DEF_LINE_WIDTH_2;
- nStyle = DOUBLE;
+ nStyle = SvxBorderLineStyle::DOUBLE;
break;
case 9:
n1 = DEF_LINE_WIDTH_2;
n2 = DEF_LINE_WIDTH_2;
n3 = DEF_LINE_WIDTH_2;
- nStyle = DOUBLE;
+ nStyle = SvxBorderLineStyle::DOUBLE;
break;
default:
break;
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 3c2635c9599f..b22fbd8603da 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1806,7 +1806,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
{
Color aColorBlack( COL_BLACK );
::editeng::SvxBorderLine aDefLine( &aColorBlack, 20,
- table::BorderLineStyle::SOLID );
+ SvxBorderLineStyle::SOLID );
pTabViewShell->SetDefaultFrameLine( &aDefLine );
pTabViewShell->SetSelectionFrameLines( nullptr, false );
}
@@ -1829,7 +1829,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
else
{
::editeng::SvxBorderLine aDefLine( &rColor, 20,
- table::BorderLineStyle::SOLID );
+ SvxBorderLineStyle::SOLID );
pTabViewShell->SetDefaultFrameLine( &aDefLine );
pTabViewShell->SetSelectionFrameLines( &aDefLine, false );
}
@@ -2025,7 +2025,7 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
{
// handled together because both need the cell border information for decisions
Color aCol = 0;
- editeng::SvxBorderLine aLine(nullptr,0,0);
+ editeng::SvxBorderLine aLine(nullptr,0,SvxBorderLineStyle::SOLID);
bool bCol = false;
bool bColDisable = false, bStyleDisable = false;
SvxBoxItem aBoxItem(ATTR_BORDER);
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 166eae290c5d..faf166f2def1 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1451,8 +1451,7 @@ void ScTabViewShell::Construct( TriState nForceDesignMode )
SetPool( &SC_MOD()->GetPool() );
SetWindow( GetActiveWin() );
- pCurFrameLine = new ::editeng::SvxBorderLine(&aColBlack, 20,
- table::BorderLineStyle::SOLID);
+ pCurFrameLine = new ::editeng::SvxBorderLine(&aColBlack, 20, SvxBorderLineStyle::SOLID);
pPivotSource = new ScArea;
StartListening(*GetViewData().GetDocShell(),true);
StartListening(*GetViewFrame(),true);