diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-07-03 21:26:13 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-07-04 17:55:45 +0200 |
commit | 8b4593948582c3b5b3d013bd751bb19ffd37a31b (patch) | |
tree | d12df351290b85abc5b55440106560aca3bad8e8 /sc | |
parent | 8dd6a23b6b44902d1c1ae4e24360463ffcf1015d (diff) |
replace enum SvxBorderStyle with css::table::BorderLineSyle
Change-Id: I1dadb53f46b23f92d34061ef78dda872bdbcda67
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/subsequent_filters-test.cxx | 18 | ||||
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/attarray.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/dpoutput.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xestyle.cxx | 9 | ||||
-rw-r--r-- | sc/source/filter/excel/xistyle.cxx | 30 | ||||
-rw-r--r-- | sc/source/filter/html/htmlexp.cxx | 32 | ||||
-rw-r--r-- | sc/source/filter/html/htmlpars.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/lotus/lotattr.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/view/formatsh.cxx | 13 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsh4.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsh8.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun2.cxx | 4 |
13 files changed, 74 insertions, 55 deletions
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index b9b24fc914a7..62a99709b90f 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -583,7 +583,8 @@ void ScFiltersTest::testBorderODS() CPPUNIT_ASSERT(!pTop); CPPUNIT_ASSERT(!pBottom); CPPUNIT_ASSERT(pRight); - CPPUNIT_ASSERT_EQUAL(pRight->GetSvxBorderStyle(),editeng::SOLID); + CPPUNIT_ASSERT_EQUAL(pRight->GetBorderLineStyle(), + table::BorderLineStyle::SOLID); pDoc->GetBorderLines( 2, 1, 0, &pLeft, &pTop, &pRight, &pBottom ); CPPUNIT_ASSERT(!pLeft); @@ -591,7 +592,8 @@ void ScFiltersTest::testBorderODS() CPPUNIT_ASSERT(!pBottom); CPPUNIT_ASSERT(pRight); - CPPUNIT_ASSERT_EQUAL(pRight->GetSvxBorderStyle(),editeng::SOLID); + CPPUNIT_ASSERT_EQUAL(pRight->GetBorderLineStyle(), + table::BorderLineStyle::SOLID); CPPUNIT_ASSERT_EQUAL(pRight->GetWidth(),20L); pDoc->GetBorderLines( 2, 8, 0, &pLeft, &pTop, &pRight, &pBottom ); @@ -600,7 +602,8 @@ void ScFiltersTest::testBorderODS() CPPUNIT_ASSERT(pTop); CPPUNIT_ASSERT(pBottom); CPPUNIT_ASSERT(pRight); - CPPUNIT_ASSERT_EQUAL(pRight->GetSvxBorderStyle(),editeng::SOLID); + CPPUNIT_ASSERT_EQUAL(pRight->GetBorderLineStyle(), + table::BorderLineStyle::SOLID); CPPUNIT_ASSERT_EQUAL(pRight->GetWidth(),5L); CPPUNIT_ASSERT(pRight->GetColor() == Color(COL_BLUE)); @@ -622,17 +625,20 @@ void ScFiltersTest::testBorderXLS() pDoc->GetBorderLines( 2, 3, 0, &pLeft, &pTop, &pRight, &pBottom ); CPPUNIT_ASSERT(pRight); - CPPUNIT_ASSERT_EQUAL(pRight->GetSvxBorderStyle(),editeng::SOLID); + CPPUNIT_ASSERT_EQUAL(pRight->GetBorderLineStyle(), + table::BorderLineStyle::SOLID); CPPUNIT_ASSERT_EQUAL(pRight->GetWidth(),6L); pDoc->GetBorderLines( 3, 5, 0, &pLeft, &pTop, &pRight, &pBottom ); CPPUNIT_ASSERT(pRight); - CPPUNIT_ASSERT_EQUAL(pRight->GetSvxBorderStyle(),editeng::SOLID); + CPPUNIT_ASSERT_EQUAL(pRight->GetBorderLineStyle(), + table::BorderLineStyle::SOLID); CPPUNIT_ASSERT_EQUAL(pRight->GetWidth(),18L); pDoc->GetBorderLines( 5, 7, 0, &pLeft, &pTop, &pRight, &pBottom ); CPPUNIT_ASSERT(pRight); - CPPUNIT_ASSERT_EQUAL(pRight->GetSvxBorderStyle(),editeng::SOLID); + CPPUNIT_ASSERT_EQUAL(pRight->GetBorderLineStyle(), + table::BorderLineStyle::SOLID); CPPUNIT_ASSERT_EQUAL(pRight->GetWidth(),24L); } diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index a86a3a0bcfd0..43c160793ad9 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -3097,7 +3097,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(NULL, 50, ::editeng::SOLID); + ::editeng::SvxBorderLine aLine(NULL, 50, table::BorderLineStyle::SOLID); SvxBoxItem aBorderItem(ATTR_BORDER); aBorderItem.SetLine(&aLine, BOX_LINE_LEFT); aBorderItem.SetLine(&aLine, BOX_LINE_RIGHT); diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx index 6dd3547d2155..6cf487fb612b 100644 --- a/sc/source/core/data/attarray.cxx +++ b/sc/source/core/data/attarray.cxx @@ -570,7 +570,7 @@ void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet* if ((dest)) \ { \ SvxBorderLine* pCast = (SvxBorderLine*)(dest); \ - pCast->SetSvxBorderStyle( (src)->GetSvxBorderStyle() ); \ + pCast->SetBorderLineStyle( (src)->GetBorderLineStyle() ); \ pCast->SetWidth( (src)->GetWidth( ) ); \ } diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index 1e22a8da0091..b57d639be7e9 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -326,7 +326,7 @@ void lcl_SetFrame( ScDocument* pDoc, SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uInt16 nWidth ) { - ::editeng::SvxBorderLine aLine( NULL, nWidth, ::editeng::SOLID ); + ::editeng::SvxBorderLine aLine(0, nWidth, table::BorderLineStyle::SOLID); SvxBoxItem aBox( ATTR_BORDER ); aBox.SetLine(&aLine, BOX_LINE_LEFT); aBox.SetLine(&aLine, BOX_LINE_TOP); diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 881b2b25af3f..5e2e0117c00c 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -63,6 +63,7 @@ using ::rtl::OString; using ::rtl::OUString; +using namespace ::com::sun::star; using namespace oox; // PALETTE record - color information ========================================= @@ -1571,18 +1572,18 @@ void lclGetBorderLine( else if( nOuterWidth >= EXC_BORDER_MEDIUM ) { rnXclLine = EXC_LINE_MEDIUM; - if (pLine->GetSvxBorderStyle( ) == ::editeng::DASHED) + if (pLine->GetBorderLineStyle( ) == table::BorderLineStyle::DASHED) rnXclLine = EXC_LINE_MEDIUMDASHED; } else if( nOuterWidth >= EXC_BORDER_THIN ) { rnXclLine = EXC_LINE_THIN; - switch (pLine->GetSvxBorderStyle()) + switch (pLine->GetBorderLineStyle()) { - case ::editeng::DASHED: + case table::BorderLineStyle::DASHED: rnXclLine = EXC_LINE_DASHED; break; - case ::editeng::DOTTED: + case table::BorderLineStyle::DOTTED: rnXclLine = EXC_LINE_DOTTED; break; default: diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index 7c146cbc088b..b6ecf6d1e873 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -896,20 +896,20 @@ bool lclConvertBorderLine( ::editeng::SvxBorderLine& rLine, const XclImpPalette& static const sal_uInt16 ppnLineParam[][ 4 ] = { // outer width, type - { 0, ::editeng::SOLID }, // 0 = none - { EXC_BORDER_THIN, ::editeng::SOLID }, // 1 = thin - { EXC_BORDER_MEDIUM, ::editeng::SOLID }, // 2 = medium - { EXC_BORDER_THIN, ::editeng::DASHED }, // 3 = dashed - { EXC_BORDER_THIN, ::editeng::DOTTED }, // 4 = dotted - { EXC_BORDER_THICK, ::editeng::SOLID }, // 5 = thick - { EXC_BORDER_THIN, ::editeng::DOUBLE }, // 6 = double - { EXC_BORDER_HAIR, ::editeng::SOLID }, // 7 = hair - { EXC_BORDER_MEDIUM, ::editeng::DASHED }, // 8 = med dash - { EXC_BORDER_THIN, ::editeng::SOLID }, // 9 = thin dashdot - { EXC_BORDER_MEDIUM, ::editeng::SOLID }, // A = med dashdot - { EXC_BORDER_THIN, ::editeng::SOLID }, // B = thin dashdotdot - { EXC_BORDER_MEDIUM, ::editeng::SOLID }, // C = med dashdotdot - { EXC_BORDER_MEDIUM, ::editeng::SOLID } // D = med slant dashdot + { 0, table::BorderLineStyle::SOLID }, // 0 = none + { EXC_BORDER_THIN, table::BorderLineStyle::SOLID }, // 1 = thin + { EXC_BORDER_MEDIUM, table::BorderLineStyle::SOLID }, // 2 = medium + { EXC_BORDER_THIN, table::BorderLineStyle::DASHED }, // 3 = dashed + { EXC_BORDER_THIN, table::BorderLineStyle::DOTTED }, // 4 = dotted + { EXC_BORDER_THICK, table::BorderLineStyle::SOLID }, // 5 = thick + { EXC_BORDER_THIN, table::BorderLineStyle::DOUBLE }, // 6 = double + { EXC_BORDER_HAIR, table::BorderLineStyle::SOLID }, // 7 = hair + { EXC_BORDER_MEDIUM, table::BorderLineStyle::DASHED }, // 8 = med dash + { EXC_BORDER_THIN, table::BorderLineStyle::SOLID }, // 9 = thin dashdot + { EXC_BORDER_MEDIUM, table::BorderLineStyle::SOLID }, // A = med dashdot + { EXC_BORDER_THIN, table::BorderLineStyle::SOLID }, // B = thin dashdotdot + { EXC_BORDER_MEDIUM, table::BorderLineStyle::SOLID }, // C = med dashdotdot + { EXC_BORDER_MEDIUM, table::BorderLineStyle::SOLID } // D = med slant dashdot }; if( nXclLine == EXC_LINE_NONE ) @@ -919,7 +919,7 @@ bool lclConvertBorderLine( ::editeng::SvxBorderLine& rLine, const XclImpPalette& rLine.SetColor( rPalette.GetColor( nXclColor ) ); rLine.SetWidth( ppnLineParam[ nXclLine ][ 0 ] ); - rLine.SetSvxBorderStyle( static_cast< ::editeng::SvxBorderStyle>( + rLine.SetBorderLineStyle( static_cast< ::editeng::SvxBorderStyle>( ppnLineParam[ nXclLine ][ 1 ]) ); return true; } diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index e4bbe2581eeb..ed69e118c934 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -92,7 +92,9 @@ #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> #include <rtl/strbuf.hxx> + using ::editeng::SvxBorderLine; +using namespace ::com::sun::star; //======================================================================== @@ -520,36 +522,36 @@ rtl::OString ScHTMLExport::BorderToStyle(const char* pBorderName, std::max(int(nWidth / TWIPS_PER_PIXEL), 1) : 0; aOut.append(static_cast<sal_Int32>(nPxWidth)). append(RTL_CONSTASCII_STRINGPARAM("px ")); - switch (pLine->GetSvxBorderStyle()) + switch (pLine->GetBorderLineStyle()) { - case ::editeng::SOLID: + case table::BorderLineStyle::SOLID: aOut.append(RTL_CONSTASCII_STRINGPARAM("solid")); break; - case ::editeng::DOTTED: + case table::BorderLineStyle::DOTTED: aOut.append(RTL_CONSTASCII_STRINGPARAM("dotted")); break; - case ::editeng::DASHED: + case table::BorderLineStyle::DASHED: aOut.append(RTL_CONSTASCII_STRINGPARAM("dashed")); break; - case ::editeng::DOUBLE: - case ::editeng::THINTHICK_SMALLGAP: - case ::editeng::THINTHICK_MEDIUMGAP: - case ::editeng::THINTHICK_LARGEGAP: - case ::editeng::THICKTHIN_SMALLGAP: - case ::editeng::THICKTHIN_MEDIUMGAP: - case ::editeng::THICKTHIN_LARGEGAP: + case table::BorderLineStyle::DOUBLE: + 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: aOut.append(RTL_CONSTASCII_STRINGPARAM("double")); break; - case ::editeng::EMBOSSED: + case table::BorderLineStyle::EMBOSSED: aOut.append(RTL_CONSTASCII_STRINGPARAM("ridge")); break; - case ::editeng::ENGRAVED: + case table::BorderLineStyle::ENGRAVED: aOut.append(RTL_CONSTASCII_STRINGPARAM("groove")); break; - case ::editeng::OUTSET: + case table::BorderLineStyle::OUTSET: aOut.append(RTL_CONSTASCII_STRINGPARAM("outset")); break; - case ::editeng::INSET: + case table::BorderLineStyle::INSET: aOut.append(RTL_CONSTASCII_STRINGPARAM("inset")); break; default: diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index cde5dd1f6de2..7bdd8d2c0654 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -2390,8 +2390,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( NULL, nOuterLine, ::editeng::SOLID ); - SvxBorderLine aInnerLine( NULL, nInnerLine, ::editeng::SOLID ); + SvxBorderLine aOuterLine(0, nOuterLine, table::BorderLineStyle::SOLID); + SvxBorderLine aInnerLine(0, nInnerLine, table::BorderLineStyle::SOLID); SvxBoxItem aBorderItem( ATTR_BORDER ); for( SCCOL nCol = 0; nCol <= nLastCol; ++nCol ) diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx index 2d53cd4bb481..e21e84778278 100644 --- a/sc/source/filter/lotus/lotattr.cxx +++ b/sc/source/filter/lotus/lotattr.cxx @@ -44,6 +44,10 @@ #include "root.hxx" #include "scitems.hxx" + +using namespace ::com::sun::star; + + LotAttrCache::ENTRY::ENTRY (ScPatternAttr* p) : pPattAttr(p) { @@ -168,12 +172,12 @@ void LotAttrCache::LotusToScBorderLine( sal_uInt8 nLine, ::editeng::SvxBorderLin switch ( nLine ) { default: - case 0: aBL.SetSvxBorderStyle( ::editeng::NO_STYLE ); break; + case 0: aBL.SetBorderLineStyle(table::BorderLineStyle::NONE); break; case 1: aBL.SetWidth( DEF_LINE_WIDTH_1 ); break; case 2: aBL.SetWidth( DEF_LINE_WIDTH_2 ); break; case 3: { - aBL.SetSvxBorderStyle( ::editeng::DOUBLE ); + aBL.SetBorderLineStyle(table::BorderLineStyle::DOUBLE); aBL.SetWidth( DEF_LINE_WIDTH_1 ); } break; diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 8e8a65719687..7d2cd76e88ad 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -89,6 +89,9 @@ #include "scabstdlg.hxx" + +using namespace ::com::sun::star; + namespace { SvxCellHorJustify lclConvertSlotToHAlign( sal_uInt16 nSlot ) @@ -1492,8 +1495,8 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) if ( pDefLine ) { - pDefLine->SetSvxBorderStyle( - pLine->GetSvxBorderStyle()); + pDefLine->SetBorderLineStyle( + pLine->GetBorderLineStyle()); pDefLine->SetWidth( pLine->GetWidth( ) ); pTabViewShell->SetSelectionFrameLines( pDefLine, false ); } @@ -1507,7 +1510,8 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) else { Color aColorBlack( COL_BLACK ); - ::editeng::SvxBorderLine aDefLine( &aColorBlack, 20, ::editeng::SOLID ); + ::editeng::SvxBorderLine aDefLine( &aColorBlack, 20, + table::BorderLineStyle::SOLID ); pTabViewShell->SetDefaultFrameLine( &aDefLine ); pTabViewShell->SetSelectionFrameLines( NULL, false ); } @@ -1529,7 +1533,8 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) } else { - ::editeng::SvxBorderLine aDefLine( &rColor, 20, ::editeng::SOLID ); + ::editeng::SvxBorderLine aDefLine( &rColor, 20, + table::BorderLineStyle::SOLID ); pTabViewShell->SetDefaultFrameLine( &aDefLine ); pTabViewShell->SetSelectionFrameLines( &aDefLine, false ); } diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index 1f0f4a3e8b5e..7afb032060b8 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -1511,7 +1511,8 @@ void ScTabViewShell::Construct( sal_uInt8 nForceDesignMode ) SetPool( &SC_MOD()->GetPool() ); SetWindow( GetActiveWin() ); - pCurFrameLine = new ::editeng::SvxBorderLine( &aColBlack, 20, ::editeng::SOLID ); + pCurFrameLine = new ::editeng::SvxBorderLine(&aColBlack, 20, + table::BorderLineStyle::SOLID); pPivotSource = new ScArea; StartListening(*GetViewData()->GetDocShell(),sal_True); StartListening(*GetViewFrame(),sal_True); diff --git a/sc/source/ui/view/tabvwsh8.cxx b/sc/source/ui/view/tabvwsh8.cxx index 0015f9dfdd2a..f2820cb45036 100644 --- a/sc/source/ui/view/tabvwsh8.cxx +++ b/sc/source/ui/view/tabvwsh8.cxx @@ -42,7 +42,7 @@ void ScTabViewShell::SetDefaultFrameLine( const ::editeng::SvxBorderLine* pLine delete pCurFrameLine; pCurFrameLine = new ::editeng::SvxBorderLine( &pLine->GetColor(), pLine->GetWidth(), - pLine->GetSvxBorderStyle() ); + pLine->GetBorderLineStyle() ); } else if ( pCurFrameLine ) { diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 1303b72a5d09..3fb60ab644ac 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -2926,13 +2926,13 @@ void ScViewFunc::UpdateLineAttrs( SvxBorderLine& rLine, if ( bColor ) { rLine.SetColor ( pSrcLine->GetColor() ); - rLine.SetSvxBorderStyle(pDestLine->GetSvxBorderStyle()); + rLine.SetBorderLineStyle(pDestLine->GetBorderLineStyle()); rLine.SetWidth ( pDestLine->GetWidth() ); } else { rLine.SetColor ( pDestLine->GetColor() ); - rLine.SetSvxBorderStyle(pSrcLine->GetSvxBorderStyle()); + rLine.SetBorderLineStyle(pSrcLine->GetBorderLineStyle()); rLine.SetWidth ( pSrcLine->GetWidth() ); } } |