diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 66 | ||||
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 47 | ||||
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/dpoutput.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xestyle.cxx | 16 | ||||
-rw-r--r-- | sc/source/filter/excel/xistyle.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/html/htmlexp.cxx | 34 | ||||
-rw-r--r-- | sc/source/filter/html/htmlpars.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/inc/orcusinterface.hxx | 5 | ||||
-rw-r--r-- | sc/source/filter/lotus/lotattr.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/orcus/interface.cxx | 20 | ||||
-rw-r--r-- | sc/source/ui/sidebar/CellBorderStyleControl.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/sidebar/CellLineStyleControl.cxx | 13 | ||||
-rw-r--r-- | sc/source/ui/view/formatsh.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsh4.cxx | 3 |
15 files changed, 117 insertions, 111 deletions
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index ae588cc461bc..ffb3bbf15157 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -292,6 +292,12 @@ private: }; +std::ostream& operator<<(std::ostream& os, SvxBorderLineStyle n) +{ + os << (int)n; + return os; +} + void ScExportTest::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) { struct { xmlChar* pPrefix; xmlChar* pURI; } aNamespaces[] = @@ -1932,17 +1938,17 @@ void ScExportTest::testSheetProtectionXLSX() namespace { -const char* toBorderName( sal_Int16 eStyle ) +const char* toBorderName( SvxBorderLineStyle eStyle ) { switch (eStyle) { - case table::BorderLineStyle::SOLID: return "SOLID"; - case table::BorderLineStyle::DOTTED: return "DOTTED"; - case table::BorderLineStyle::DASHED: return "DASHED"; - case table::BorderLineStyle::DASH_DOT: return "DASH_DOT"; - case table::BorderLineStyle::DASH_DOT_DOT: return "DASH_DOT_DOT"; - case table::BorderLineStyle::DOUBLE_THIN: return "DOUBLE_THIN"; - case table::BorderLineStyle::FINE_DASHED: return "FINE_DASHED"; + case SvxBorderLineStyle::SOLID: return "SOLID"; + case SvxBorderLineStyle::DOTTED: return "DOTTED"; + case SvxBorderLineStyle::DASHED: return "DASHED"; + case SvxBorderLineStyle::DASH_DOT: return "DASH_DOT"; + case SvxBorderLineStyle::DASH_DOT_DOT: return "DASH_DOT_DOT"; + case SvxBorderLineStyle::DOUBLE_THIN: return "DOUBLE_THIN"; + case SvxBorderLineStyle::FINE_DASHED: return "FINE_DASHED"; default: ; } @@ -1957,21 +1963,21 @@ void ScExportTest::testExcelCellBorders( sal_uLong nFormatType ) struct { SCROW mnRow; - sal_Int16 mnStyle; + SvxBorderLineStyle mnStyle; long mnWidth; } aChecks[] = { - { 1, table::BorderLineStyle::SOLID, 1L }, // hair - { 3, table::BorderLineStyle::DOTTED, 15L }, // dotted - { 5, table::BorderLineStyle::DASH_DOT_DOT, 15L }, // dash dot dot - { 7, table::BorderLineStyle::DASH_DOT, 15L }, // dash dot - { 9, table::BorderLineStyle::FINE_DASHED, 15L }, // dashed - { 11, table::BorderLineStyle::SOLID, 15L }, // thin - { 13, table::BorderLineStyle::DASH_DOT_DOT, 35L }, // medium dash dot dot - { 17, table::BorderLineStyle::DASH_DOT, 35L }, // medium dash dot - { 19, table::BorderLineStyle::DASHED, 35L }, // medium dashed - { 21, table::BorderLineStyle::SOLID, 35L }, // medium - { 23, table::BorderLineStyle::SOLID, 50L }, // thick - { 25, table::BorderLineStyle::DOUBLE_THIN, -1L }, // double (don't check width) + { 1, SvxBorderLineStyle::SOLID, 1L }, // hair + { 3, SvxBorderLineStyle::DOTTED, 15L }, // dotted + { 5, SvxBorderLineStyle::DASH_DOT_DOT, 15L }, // dash dot dot + { 7, SvxBorderLineStyle::DASH_DOT, 15L }, // dash dot + { 9, SvxBorderLineStyle::FINE_DASHED, 15L }, // dashed + { 11, SvxBorderLineStyle::SOLID, 15L }, // thin + { 13, SvxBorderLineStyle::DASH_DOT_DOT, 35L }, // medium dash dot dot + { 17, SvxBorderLineStyle::DASH_DOT, 35L }, // medium dash dot + { 19, SvxBorderLineStyle::DASHED, 35L }, // medium dashed + { 21, SvxBorderLineStyle::SOLID, 35L }, // medium + { 23, SvxBorderLineStyle::SOLID, 50L }, // thick + { 25, SvxBorderLineStyle::DOUBLE_THIN, -1L }, // double (don't check width) }; ScDocShellRef xDocSh = loadDoc("cell-borders.", nFormatType); @@ -2021,21 +2027,21 @@ void ScExportTest::testBordersExchangeXLSX() // Document: sc/qa/unit/data/README.cellborders // short name for the table - const ::editeng::SvxBorderStyle None = table::BorderLineStyle::NONE; - const ::editeng::SvxBorderStyle Solid = table::BorderLineStyle::SOLID; - const ::editeng::SvxBorderStyle Dotted = table::BorderLineStyle::DOTTED; - const ::editeng::SvxBorderStyle Dashed = table::BorderLineStyle::DASHED; - const ::editeng::SvxBorderStyle FineDash = table::BorderLineStyle::FINE_DASHED; - const ::editeng::SvxBorderStyle DashDot = table::BorderLineStyle::DASH_DOT; - const ::editeng::SvxBorderStyle DashDoDo = table::BorderLineStyle::DASH_DOT_DOT; - const ::editeng::SvxBorderStyle DoubThin = table::BorderLineStyle::DOUBLE_THIN; + const SvxBorderLineStyle None = SvxBorderLineStyle::NONE; + const SvxBorderLineStyle Solid = SvxBorderLineStyle::SOLID; + const SvxBorderLineStyle Dotted = SvxBorderLineStyle::DOTTED; + const SvxBorderLineStyle Dashed = SvxBorderLineStyle::DASHED; + const SvxBorderLineStyle FineDash = SvxBorderLineStyle::FINE_DASHED; + const SvxBorderLineStyle DashDot = SvxBorderLineStyle::DASH_DOT; + const SvxBorderLineStyle DashDoDo = SvxBorderLineStyle::DASH_DOT_DOT; + const SvxBorderLineStyle DoubThin = SvxBorderLineStyle::DOUBLE_THIN; const size_t nMaxCol = 18; const size_t nMaxRow = 7; static struct { - ::editeng::SvxBorderStyle BorderStyleTop, BorderStyleBottom; + SvxBorderLineStyle BorderStyleTop, BorderStyleBottom; long WidthTop, WidthBottom; } aCheckBorderWidth[nMaxCol][nMaxRow] = { diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index a13964349f89..84dec1d0c83f 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -366,6 +366,11 @@ std::ostream& operator<<(std::ostream& rStrm, const SvxCellHorJustify& rCode) rStrm << static_cast<int>(rCode); return rStrm; } +std::ostream& operator<<(std::ostream& os, SvxBorderLineStyle n) +{ + os << (int)n; + return os; +} bool ScFiltersTest::load(const OUString &rFilter, const OUString &rURL, const OUString &rUserData, SfxFilterFlags nFilterFlags, @@ -936,7 +941,7 @@ void ScFiltersTest::testDoubleThinBorder() rDoc.GetBorderLines( 2, 2, 0, &pLeft, &pTop, &pRight, &pBottom ); CPPUNIT_ASSERT(pTop); CPPUNIT_ASSERT(pRight); - CPPUNIT_ASSERT_EQUAL( table::BorderLineStyle::DOUBLE_THIN, pRight->GetBorderLineStyle() ); + CPPUNIT_ASSERT_EQUAL( SvxBorderLineStyle::DOUBLE_THIN, pRight->GetBorderLineStyle() ); xDocSh->DoClose(); } @@ -957,8 +962,7 @@ void ScFiltersTest::testBorderODS() CPPUNIT_ASSERT(!pTop); CPPUNIT_ASSERT(!pBottom); CPPUNIT_ASSERT(pRight); - CPPUNIT_ASSERT_EQUAL( - table::BorderLineStyle::SOLID, pRight->GetBorderLineStyle()); + CPPUNIT_ASSERT_EQUAL(SvxBorderLineStyle::SOLID, pRight->GetBorderLineStyle()); rDoc.GetBorderLines( 2, 1, 0, &pLeft, &pTop, &pRight, &pBottom ); CPPUNIT_ASSERT(!pLeft); @@ -966,8 +970,7 @@ void ScFiltersTest::testBorderODS() CPPUNIT_ASSERT(!pBottom); CPPUNIT_ASSERT(pRight); - CPPUNIT_ASSERT_EQUAL( - table::BorderLineStyle::SOLID, pRight->GetBorderLineStyle()); + CPPUNIT_ASSERT_EQUAL(SvxBorderLineStyle::SOLID, pRight->GetBorderLineStyle()); CPPUNIT_ASSERT_EQUAL(20L, pRight->GetWidth()); rDoc.GetBorderLines( 2, 8, 0, &pLeft, &pTop, &pRight, &pBottom ); @@ -976,8 +979,7 @@ void ScFiltersTest::testBorderODS() CPPUNIT_ASSERT(pTop); CPPUNIT_ASSERT(pBottom); CPPUNIT_ASSERT(pRight); - CPPUNIT_ASSERT_EQUAL( - table::BorderLineStyle::SOLID, pRight->GetBorderLineStyle()); + CPPUNIT_ASSERT_EQUAL(SvxBorderLineStyle::SOLID, pRight->GetBorderLineStyle()); CPPUNIT_ASSERT_EQUAL(5L, pRight->GetWidth()); CPPUNIT_ASSERT_EQUAL(Color(COL_BLUE), pRight->GetColor()); @@ -1004,17 +1006,18 @@ struct Border sal_uInt16 bOutWidth; sal_uInt16 bInWidth; sal_uInt16 bDistance; - sal_Int32 lStyle; - sal_Int32 tStyle; - sal_Int32 rStyle; - sal_Int32 bStyle; + SvxBorderLineStyle lStyle; + SvxBorderLineStyle tStyle; + SvxBorderLineStyle rStyle; + SvxBorderLineStyle bStyle; // that's a monstrum Border(sal_Int16 col, sal_Int32 r, sal_Int32 lW, sal_Int32 tW, sal_Int32 rW, sal_Int32 bW, sal_uInt16 lOutW, sal_uInt16 lInW, sal_uInt16 lDist, sal_uInt16 tOutW, sal_uInt16 tInW, sal_uInt16 tDist, sal_uInt16 rOutW, sal_uInt16 rInW, sal_uInt16 rDist, - sal_uInt16 bOutW, sal_uInt16 bInW, sal_uInt16 bDist, sal_Int32 lSt, sal_Int32 tSt, sal_Int32 rSt, sal_Int32 bSt): + sal_uInt16 bOutW, sal_uInt16 bInW, sal_uInt16 bDist, sal_Int16 lSt, sal_Int16 tSt, sal_Int16 rSt, sal_Int16 bSt): column(col), row(r), leftWidth(lW), topWidth(tW), rightWidth(rW), bottomWidth(bW), lOutWidth(lOutW), lInWidth(lInW), lDistance(lDist), tOutWidth(tOutW), tInWidth(tInW), tDistance(tDist), rOutWidth(rOutW), rInWidth(rInW), rDistance(rDist), bOutWidth(bOutW), bInWidth(bInW), - bDistance(bDist), lStyle(lSt), tStyle(tSt), rStyle(rSt), bStyle(bSt) {}; + bDistance(bDist), + lStyle((SvxBorderLineStyle)lSt), tStyle((SvxBorderLineStyle)tSt), rStyle((SvxBorderLineStyle)rSt), bStyle((SvxBorderLineStyle)bSt) {}; }; void ScFiltersTest::testBordersOoo33() @@ -1073,7 +1076,7 @@ void ScFiltersTest::testBordersOoo33() CPPUNIT_ASSERT_EQUAL(borders[temp].bOutWidth, pBottom->GetOutWidth()); CPPUNIT_ASSERT_EQUAL(borders[temp].bInWidth, pBottom->GetInWidth()); CPPUNIT_ASSERT_EQUAL(borders[temp].bDistance, pBottom->GetDistance()); - sal_Int32 tempStyle = pLeft->GetBorderLineStyle(); + SvxBorderLineStyle tempStyle = pLeft->GetBorderLineStyle(); CPPUNIT_ASSERT_EQUAL(borders[temp].lStyle, tempStyle); tempStyle = pTop->GetBorderLineStyle(); CPPUNIT_ASSERT_EQUAL(borders[temp].tStyle, tempStyle); @@ -2865,10 +2868,10 @@ void ScFiltersTest::testOrcusODSStyleInterface() CPPUNIT_ASSERT_EQUAL(Color(255, 204, 18), pBoxItem->GetRight()->GetColor()); CPPUNIT_ASSERT_EQUAL(Color(255, 204, 18), pBoxItem->GetTop()->GetColor()); CPPUNIT_ASSERT_EQUAL(Color(255, 204, 18), pBoxItem->GetBottom()->GetColor()); - CPPUNIT_ASSERT_EQUAL(pBoxItem->GetLeft()->GetBorderLineStyle(), ::com::sun::star::table::BorderLineStyle::DOTTED); - CPPUNIT_ASSERT_EQUAL(pBoxItem->GetRight()->GetBorderLineStyle(), ::com::sun::star::table::BorderLineStyle::DOTTED); - CPPUNIT_ASSERT_EQUAL(pBoxItem->GetTop()->GetBorderLineStyle(), ::com::sun::star::table::BorderLineStyle::DOTTED); - CPPUNIT_ASSERT_EQUAL(pBoxItem->GetBottom()->GetBorderLineStyle(), ::com::sun::star::table::BorderLineStyle::DOTTED); + CPPUNIT_ASSERT_EQUAL(pBoxItem->GetLeft()->GetBorderLineStyle(), SvxBorderLineStyle::DOTTED); + CPPUNIT_ASSERT_EQUAL(pBoxItem->GetRight()->GetBorderLineStyle(), SvxBorderLineStyle::DOTTED); + CPPUNIT_ASSERT_EQUAL(pBoxItem->GetTop()->GetBorderLineStyle(), SvxBorderLineStyle::DOTTED); + CPPUNIT_ASSERT_EQUAL(pBoxItem->GetBottom()->GetBorderLineStyle(), SvxBorderLineStyle::DOTTED); ASSERT_DOUBLES_EQUAL_MESSAGE("Error with left width", 1, pBoxItem->GetLeft()->GetWidth()); ASSERT_DOUBLES_EQUAL_MESSAGE("Error with right width", 1, pBoxItem->GetRight()->GetWidth()); ASSERT_DOUBLES_EQUAL_MESSAGE("Error with top width", 1, pBoxItem->GetTop()->GetWidth()); @@ -2892,8 +2895,8 @@ void ScFiltersTest::testOrcusODSStyleInterface() pBoxItem = static_cast<const SvxBoxItem*>(pItem); CPPUNIT_ASSERT_EQUAL(Color(0, 0, 0), pBoxItem->GetLeft()->GetColor()); CPPUNIT_ASSERT_EQUAL(Color(255, 0, 0), pBoxItem->GetRight()->GetColor()); - CPPUNIT_ASSERT_EQUAL(pBoxItem->GetLeft()->GetBorderLineStyle(), ::com::sun::star::table::BorderLineStyle::SOLID); - CPPUNIT_ASSERT_EQUAL(pBoxItem->GetRight()->GetBorderLineStyle(), ::com::sun::star::table::BorderLineStyle::DOTTED); + CPPUNIT_ASSERT_EQUAL(pBoxItem->GetLeft()->GetBorderLineStyle(), SvxBorderLineStyle::SOLID); + CPPUNIT_ASSERT_EQUAL(pBoxItem->GetRight()->GetBorderLineStyle(), SvxBorderLineStyle::DOTTED); ASSERT_DOUBLES_EQUAL_MESSAGE("Error with left width", 0, pBoxItem->GetLeft()->GetWidth()); ASSERT_DOUBLES_EQUAL_MESSAGE("Error with right width", 14, pBoxItem->GetRight()->GetWidth()); @@ -2902,7 +2905,7 @@ void ScFiltersTest::testOrcusODSStyleInterface() const SvxLineItem* pTLBR= static_cast<const SvxLineItem*>(pItem); CPPUNIT_ASSERT_EQUAL(Color(18, 0, 0), pTLBR->GetLine()->GetColor()); - CPPUNIT_ASSERT_EQUAL(pTLBR->GetLine()->GetBorderLineStyle(), ::com::sun::star::table::BorderLineStyle::DASH_DOT); + CPPUNIT_ASSERT_EQUAL(pTLBR->GetLine()->GetBorderLineStyle(), SvxBorderLineStyle::DASH_DOT); ASSERT_DOUBLES_EQUAL_MESSAGE("Error with diagonal tl-br width", 14, pTLBR->GetLine()->GetWidth()); CPPUNIT_ASSERT_MESSAGE("Style Name2 : Doesn't have Attribute diagonal(bl-tr) border, but it should have.", @@ -2910,7 +2913,7 @@ void ScFiltersTest::testOrcusODSStyleInterface() const SvxLineItem* pBLTR= static_cast<const SvxLineItem*>(pItem); CPPUNIT_ASSERT_EQUAL(Color(255, 204, 238), pBLTR->GetLine()->GetColor()); - CPPUNIT_ASSERT_EQUAL(pBLTR->GetLine()->GetBorderLineStyle(), ::com::sun::star::table::BorderLineStyle::DASHED); + CPPUNIT_ASSERT_EQUAL(pBLTR->GetLine()->GetBorderLineStyle(), SvxBorderLineStyle::DASHED); ASSERT_DOUBLES_EQUAL_MESSAGE("Error with diagonal tl-br width", 34, pBLTR->GetLine()->GetWidth()); CPPUNIT_ASSERT_MESSAGE("Style Name2 : Has Attribute background, but it shouldn't.", diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 13d163e2e0af..b7a3be681357 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -2113,7 +2113,7 @@ void Test::testDataArea() CPPUNIT_ASSERT_MESSAGE("Sheet is expected to be empty.", m_pDoc->IsBlockEmpty(0, 0, 0, 100, 100)); // Now, set borders in some cells.... - ::editeng::SvxBorderLine aLine(nullptr, 50, table::BorderLineStyle::SOLID); + ::editeng::SvxBorderLine aLine(nullptr, 50, SvxBorderLineStyle::SOLID); SvxBoxItem aBorderItem(ATTR_BORDER); aBorderItem.SetLine(&aLine, SvxBoxItemLine::LEFT); aBorderItem.SetLine(&aLine, SvxBoxItemLine::RIGHT); 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); |