summaryrefslogtreecommitdiff
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
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>
-rw-r--r--cui/source/inc/border.hxx4
-rw-r--r--cui/source/tabpages/border.cxx52
-rw-r--r--drawinglayer/qa/unit/border.cxx5
-rw-r--r--drawinglayer/source/primitive2d/borderlineprimitive2d.cxx5
-rw-r--r--drawinglayer/source/primitive2d/clippedborderlineprimitive2d.cxx2
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.cxx19
-rw-r--r--editeng/qa/items/borderline_test.cxx30
-rw-r--r--editeng/source/items/borderline.cxx214
-rw-r--r--editeng/source/items/frmitems.cxx26
-rw-r--r--editeng/source/rtf/rtfitem.cxx28
-rw-r--r--include/drawinglayer/primitive2d/borderlineprimitive2d.hxx9
-rw-r--r--include/drawinglayer/primitive2d/clippedborderlineprimitive2d.hxx2
-rw-r--r--include/editeng/borderline.hxx313
-rw-r--r--include/svtools/borderhelper.hxx10
-rw-r--r--include/svtools/ctrlbox.hxx17
-rw-r--r--include/svx/framelink.hxx12
-rw-r--r--include/svx/frmsel.hxx4
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx66
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx47
-rw-r--r--sc/qa/unit/ucalc.cxx2
-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
-rw-r--r--sd/source/core/drawdoc4.cxx2
-rw-r--r--svtools/source/control/ctrlbox.cxx51
-rw-r--r--svx/source/dialog/framelink.cxx16
-rw-r--r--svx/source/dialog/frmsel.cxx6
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx31
-rw-r--r--sw/inc/fmtclds.hxx6
-rw-r--r--sw/inc/pagedesc.hxx6
-rw-r--r--sw/source/core/doc/DocumentStylePoolManager.cxx2
-rw-r--r--sw/source/core/docnode/ndtbl.cxx2
-rw-r--r--sw/source/core/edit/autofmt.cxx12
-rw-r--r--sw/source/core/inc/frame.hxx2
-rw-r--r--sw/source/core/layout/atrfrm.cxx12
-rw-r--r--sw/source/core/layout/pagedesc.cxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx32
-rw-r--r--sw/source/core/unocore/unosett.cxx6
-rw-r--r--sw/source/core/unocore/unotbl.cxx2
-rw-r--r--sw/source/filter/html/css1atr.cxx28
-rw-r--r--sw/source/filter/html/htmltab.cxx9
-rw-r--r--sw/source/filter/html/svxcss1.cxx18
-rw-r--r--sw/source/filter/html/swhtml.cxx4
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx40
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx2
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx32
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx6
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx36
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx18
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx6
-rw-r--r--sw/source/filter/xml/xmlexpit.cxx50
-rw-r--r--sw/source/filter/xml/xmlithlp.cxx8
-rw-r--r--sw/source/ui/frmdlg/column.cxx14
-rw-r--r--sw/source/ui/misc/pgfnote.cxx14
-rw-r--r--sw/source/uibase/frmdlg/colmgr.cxx2
-rw-r--r--sw/source/uibase/inc/colmgr.hxx6
-rw-r--r--sw/source/uibase/shells/frmsh.cxx2
-rw-r--r--sw/source/uibase/shells/tabsh.cxx2
-rw-r--r--sw/source/uibase/utlui/uiitems.cxx16
-rw-r--r--writerfilter/source/dmapper/ConversionHelper.cxx6
69 files changed, 793 insertions, 696 deletions
diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index 081b7d1c529e..7e5d12c596fc 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -117,7 +117,7 @@ private:
bool mbRemoveAdjacentCellBorders;
bool bIsCalcDoc;
- std::set<sal_Int16> maUsedBorderStyles;
+ std::set<SvxBorderLineStyle> maUsedBorderStyles;
// Handler
DECL_LINK( SelStyleHdl_Impl, ListBox&, void );
@@ -145,7 +145,7 @@ private:
const editeng::SvxBorderLine* pCurLine,
bool bValid );
- bool IsBorderLineStyleAllowed( sal_Int16 nStyle ) const;
+ bool IsBorderLineStyleAllowed( SvxBorderLineStyle nStyle ) const;
void UpdateRemoveAdjCellBorderCB( sal_uInt16 nPreset );
};
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index c5a08f68428d..0c1a5dbe874f 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -199,7 +199,7 @@ SvxBorderTabPage::SvxBorderTabPage(vcl::Window* pParent, const SfxItemSet& rCore
const SfxIntegerListItem* p = static_cast<const SfxIntegerListItem*>(pItem);
std::vector<sal_Int32> aUsedStyles = p->GetList();
for (int aUsedStyle : aUsedStyles)
- maUsedBorderStyles.insert(static_cast<sal_Int16>(aUsedStyle));
+ maUsedBorderStyles.insert(static_cast<SvxBorderLineStyle>(aUsedStyle));
}
if (rCoreAttrs.HasItem(SID_ATTR_BORDER_DEFAULT_WIDTH, &pItem))
@@ -405,7 +405,7 @@ void SvxBorderTabPage::ResetFrameLine_Impl( svx::FrameBorderType eBorder, const
}
}
-bool SvxBorderTabPage::IsBorderLineStyleAllowed( sal_Int16 nStyle ) const
+bool SvxBorderTabPage::IsBorderLineStyleAllowed( SvxBorderLineStyle nStyle ) const
{
if (maUsedBorderStyles.empty())
// All border styles are allowed.
@@ -533,7 +533,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet )
{
// Do all visible lines show the same line widths?
long nWidth;
- SvxBorderStyle nStyle;
+ SvxBorderLineStyle nStyle;
bool bWidthEq = m_pFrameSel->GetVisibleWidth( nWidth, nStyle );
if( bWidthEq )
{
@@ -912,7 +912,7 @@ IMPL_LINK_NOARG(SvxBorderTabPage, ModifyWidthHdl_Impl, Edit&, void)
m_pLbLineStyle->SetWidth( nVal );
m_pFrameSel->SetStyleToSelection( nVal,
- SvxBorderStyle( m_pLbLineStyle->GetSelectEntryStyle() ) );
+ SvxBorderLineStyle( m_pLbLineStyle->GetSelectEntryStyle() ) );
}
@@ -925,7 +925,7 @@ IMPL_LINK( SvxBorderTabPage, SelStyleHdl_Impl, ListBox&, rLb, void )
m_pLineWidthMF->GetDecimalDigits( ),
m_pLineWidthMF->GetUnit(), MapUnit::MapTwip ));
m_pFrameSel->SetStyleToSelection ( nVal,
- SvxBorderStyle( m_pLbLineStyle->GetSelectEntryStyle() ) );
+ SvxBorderLineStyle( m_pLbLineStyle->GetSelectEntryStyle() ) );
}
}
@@ -1057,35 +1057,35 @@ void SvxBorderTabPage::FillLineListBox_Impl()
using namespace ::com::sun::star::table::BorderLineStyle;
struct {
- sal_Int16 mnStyle;
+ SvxBorderLineStyle mnStyle;
long mnMinWidth;
LineListBox::ColorFunc mpColor1Fn;
LineListBox::ColorFunc mpColor2Fn;
LineListBox::ColorDistFunc mpColorDistFn;
} aLines[] = {
// Simple lines
- { SOLID, 0, &sameColor, &sameColor, &sameDistColor },
- { DOTTED, 0, &sameColor, &sameColor, &sameDistColor },
- { DASHED, 0, &sameColor, &sameColor, &sameDistColor },
- { FINE_DASHED, 0, &sameColor, &sameColor, &sameDistColor },
- { DASH_DOT, 0, &sameColor, &sameColor, &sameDistColor },
- { DASH_DOT_DOT, 0, &sameColor, &sameColor, &sameDistColor },
+ { SvxBorderLineStyle::SOLID, 0, &sameColor, &sameColor, &sameDistColor },
+ { SvxBorderLineStyle::DOTTED, 0, &sameColor, &sameColor, &sameDistColor },
+ { SvxBorderLineStyle::DASHED, 0, &sameColor, &sameColor, &sameDistColor },
+ { SvxBorderLineStyle::FINE_DASHED, 0, &sameColor, &sameColor, &sameDistColor },
+ { SvxBorderLineStyle::DASH_DOT, 0, &sameColor, &sameColor, &sameDistColor },
+ { SvxBorderLineStyle::DASH_DOT_DOT, 0, &sameColor, &sameColor, &sameDistColor },
// Double lines
- { DOUBLE, 10, &sameColor, &sameColor, &sameDistColor },
- { DOUBLE_THIN, 10, &sameColor, &sameColor, &sameDistColor },
- { THINTHICK_SMALLGAP, 20, &sameColor, &sameColor, &sameDistColor },
- { THINTHICK_MEDIUMGAP, 0, &sameColor, &sameColor, &sameDistColor },
- { THINTHICK_LARGEGAP, 0, &sameColor, &sameColor, &sameDistColor },
- { THICKTHIN_SMALLGAP, 20, &sameColor, &sameColor, &sameDistColor },
- { THICKTHIN_MEDIUMGAP, 0, &sameColor, &sameColor, &sameDistColor },
- { THICKTHIN_LARGEGAP, 0, &sameColor, &sameColor, &sameDistColor },
-
- { EMBOSSED, 15, &SvxBorderLine::threeDLightColor, &SvxBorderLine::threeDDarkColor, &lcl_mediumColor },
- { ENGRAVED, 15, &SvxBorderLine::threeDDarkColor, &SvxBorderLine::threeDLightColor, &lcl_mediumColor },
-
- { OUTSET, 10, &SvxBorderLine::lightColor, &SvxBorderLine::darkColor, &sameDistColor },
- { INSET, 10, &SvxBorderLine::darkColor, &SvxBorderLine::lightColor, &sameDistColor }
+ { SvxBorderLineStyle::DOUBLE, 10, &sameColor, &sameColor, &sameDistColor },
+ { SvxBorderLineStyle::DOUBLE_THIN, 10, &sameColor, &sameColor, &sameDistColor },
+ { SvxBorderLineStyle::THINTHICK_SMALLGAP, 20, &sameColor, &sameColor, &sameDistColor },
+ { SvxBorderLineStyle::THINTHICK_MEDIUMGAP, 0, &sameColor, &sameColor, &sameDistColor },
+ { SvxBorderLineStyle::THINTHICK_LARGEGAP, 0, &sameColor, &sameColor, &sameDistColor },
+ { SvxBorderLineStyle::THICKTHIN_SMALLGAP, 20, &sameColor, &sameColor, &sameDistColor },
+ { SvxBorderLineStyle::THICKTHIN_MEDIUMGAP, 0, &sameColor, &sameColor, &sameDistColor },
+ { SvxBorderLineStyle::THICKTHIN_LARGEGAP, 0, &sameColor, &sameColor, &sameDistColor },
+
+ { SvxBorderLineStyle::EMBOSSED, 15, &SvxBorderLine::threeDLightColor, &SvxBorderLine::threeDDarkColor, &lcl_mediumColor },
+ { SvxBorderLineStyle::ENGRAVED, 15, &SvxBorderLine::threeDDarkColor, &SvxBorderLine::threeDLightColor, &lcl_mediumColor },
+
+ { SvxBorderLineStyle::OUTSET, 10, &SvxBorderLine::lightColor, &SvxBorderLine::darkColor, &sameDistColor },
+ { SvxBorderLineStyle::INSET, 10, &SvxBorderLine::darkColor, &SvxBorderLine::lightColor, &sameDistColor }
};
m_pLbLineStyle->SetSourceUnit( FUNIT_TWIP );
diff --git a/drawinglayer/qa/unit/border.cxx b/drawinglayer/qa/unit/border.cxx
index 60a698927143..0df10ac5e42b 100644
--- a/drawinglayer/qa/unit/border.cxx
+++ b/drawinglayer/qa/unit/border.cxx
@@ -22,6 +22,7 @@
#include <test/bootstrapfixture.hxx>
#include <vcl/vclptr.hxx>
#include <vcl/virdev.hxx>
+#include <editeng/borderline.hxx>
using namespace com::sun::star;
@@ -57,7 +58,7 @@ void DrawinglayerBorderTest::testDoubleDecompositionSolid()
basegfx::BColor aColorLeft;
basegfx::BColor aColorGap;
bool bHasGapColor = false;
- sal_Int16 nStyle = table::BorderLineStyle::DOUBLE;
+ SvxBorderLineStyle nStyle = SvxBorderLineStyle::DOUBLE;
rtl::Reference<drawinglayer::primitive2d::BorderLinePrimitive2D> aBorder(new drawinglayer::primitive2d::BorderLinePrimitive2D(aStart, aEnd, fLeftWidth, fDistance, fRightWidth, fExtendLeftStart, fExtendLeftEnd, fExtendRightStart, fExtendRightEnd, aColorRight, aColorLeft, aColorGap, bHasGapColor, nStyle));
// Decompose it into polygons.
@@ -107,7 +108,7 @@ void DrawinglayerBorderTest::testDoublePixelProcessing()
basegfx::BColor aColorLeft;
basegfx::BColor aColorGap;
bool bHasGapColor = false;
- sal_Int16 nStyle = table::BorderLineStyle::DOUBLE;
+ SvxBorderLineStyle nStyle = SvxBorderLineStyle::DOUBLE;
rtl::Reference<drawinglayer::primitive2d::BorderLinePrimitive2D> xBorder(new drawinglayer::primitive2d::BorderLinePrimitive2D(aStart, aEnd, fLeftWidth, fDistance, fRightWidth, fExtendLeftStart, fExtendLeftEnd, fExtendRightStart, fExtendRightEnd, aColorRight, aColorLeft, aColorGap, bHasGapColor, nStyle));
drawinglayer::primitive2d::Primitive2DContainer aPrimitives;
aPrimitives.push_back(drawinglayer::primitive2d::Primitive2DReference(xBorder.get()));
diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
index 3db5cb2d799e..c6ea4a5c41f7 100644
--- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
@@ -25,6 +25,7 @@
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
#include <svtools/borderhelper.hxx>
+#include <editeng/borderline.hxx>
#include <algorithm>
#include <cmath>
@@ -240,7 +241,7 @@ primitive2d::Primitive2DReference makeSolidLinePrimitive(
const basegfx::B2DPoint aTmpEnd(getEnd() + (fExt * aVector));
// Get which is the line to show
- bool bIsSolidline = mnStyle == css::table::BorderLineStyle::SOLID;
+ bool bIsSolidline = mnStyle == SvxBorderLineStyle::SOLID;
double nWidth = getLeftWidth();
basegfx::BColor aColor = getRGBColorLeft();
if ( basegfx::fTools::equal( 0.0, mfLeftWidth ) )
@@ -333,7 +334,7 @@ primitive2d::Primitive2DReference makeSolidLinePrimitive(
const basegfx::BColor& rRGBColorLeft,
const basegfx::BColor& rRGBColorGap,
bool bHasGapColor,
- const short nStyle,
+ SvxBorderLineStyle nStyle,
double fPatternScale)
: BufferedDecompositionPrimitive2D(),
maStart(rStart),
diff --git a/drawinglayer/source/primitive2d/clippedborderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/clippedborderlineprimitive2d.cxx
index 5a19ee88fc5a..ca44a2838909 100644
--- a/drawinglayer/source/primitive2d/clippedborderlineprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/clippedborderlineprimitive2d.cxx
@@ -33,7 +33,7 @@ namespace drawinglayer
const basegfx::BColor& rRGBColorLeft,
const basegfx::BColor& rRGBColorGap,
bool bHasGapColor,
- const short nStyle,
+ SvxBorderLineStyle nStyle,
double fPatternScale)
: BorderLinePrimitive2D( rStart, rEnd, fLeftWidth,fDistance, fRightWidth,
0.0, 0.0, 0.0, 0.0, rRGBColorRight, rRGBColorLeft,
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 65b77187b5d0..a212fb8b4460 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -53,6 +53,7 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/window.hxx>
#include <svtools/borderhelper.hxx>
+#include <editeng/borderline.hxx>
#include <com/sun/star/table/BorderLineStyle.hpp>
@@ -337,14 +338,14 @@ namespace drawinglayer
switch (rSource.getStyle())
{
- case table::BorderLineStyle::SOLID:
- case table::BorderLineStyle::DOUBLE_THIN:
+ case SvxBorderLineStyle::SOLID:
+ case SvxBorderLineStyle::DOUBLE_THIN:
{
const basegfx::BColor aLineColor =
maBColorModifierStack.getModifiedColor(rSource.getRGBColorLeft());
double nThick = rtl::math::round(rSource.getLeftWidth());
- bool bDouble = rSource.getStyle() == table::BorderLineStyle::DOUBLE_THIN;
+ bool bDouble = rSource.getStyle() == SvxBorderLineStyle::DOUBLE_THIN;
basegfx::B2DPolygon aTarget;
@@ -441,11 +442,11 @@ namespace drawinglayer
return true;
}
break;
- case table::BorderLineStyle::DOTTED:
- case table::BorderLineStyle::DASHED:
- case table::BorderLineStyle::DASH_DOT:
- case table::BorderLineStyle::DASH_DOT_DOT:
- case table::BorderLineStyle::FINE_DASHED:
+ case SvxBorderLineStyle::DOTTED:
+ case SvxBorderLineStyle::DASHED:
+ case SvxBorderLineStyle::DASH_DOT:
+ case SvxBorderLineStyle::DASH_DOT_DOT:
+ case SvxBorderLineStyle::FINE_DASHED:
{
std::vector<double> aPattern =
svtools::GetLineDashing(rSource.getStyle(), rSource.getPatternScale()*10.0);
@@ -1268,7 +1269,7 @@ namespace drawinglayer
if (!tryDrawBorderLinePrimitive2DDirect(rBorder))
{
- if (rBorder.getStyle() == table::BorderLineStyle::DOUBLE)
+ if (rBorder.getStyle() == SvxBorderLineStyle::DOUBLE)
{
primitive2d::Primitive2DContainer aContainer;
rBorder.createDecomposition(aContainer, getViewInformation2D(), true);
diff --git a/editeng/qa/items/borderline_test.cxx b/editeng/qa/items/borderline_test.cxx
index 58a46ffc8b01..a44c2927d4cb 100644
--- a/editeng/qa/items/borderline_test.cxx
+++ b/editeng/qa/items/borderline_test.cxx
@@ -30,14 +30,14 @@ using namespace editeng;
CPPUNIT_NS_BEGIN
-template<> struct assertion_traits<SvxBorderStyle>
+template<> struct assertion_traits<SvxBorderLineStyle>
{
- static bool equal( SvxBorderStyle x, SvxBorderStyle y )
+ static bool equal( SvxBorderLineStyle x, SvxBorderLineStyle y )
{
return x == y;
}
- static std::string toString( SvxBorderStyle x )
+ static std::string toString( SvxBorderLineStyle x )
{
OStringStream ost;
ost << static_cast<unsigned int>(x);
@@ -75,8 +75,8 @@ void BorderLineTest::testGuessWidthDouble()
{
// Normal double case
SvxBorderLine line;
- line.GuessLinesWidths( DOUBLE, TEST_WIDTH, TEST_WIDTH, TEST_WIDTH );
- CPPUNIT_ASSERT_EQUAL( DOUBLE, line.GetBorderLineStyle() );
+ line.GuessLinesWidths( SvxBorderLineStyle::DOUBLE, TEST_WIDTH, TEST_WIDTH, TEST_WIDTH );
+ CPPUNIT_ASSERT_EQUAL( SvxBorderLineStyle::DOUBLE, line.GetBorderLineStyle() );
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, static_cast<long>(line.GetOutWidth()) );
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, static_cast<long>(line.GetInWidth()) );
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, static_cast<long>(line.GetDistance()) );
@@ -86,9 +86,9 @@ void BorderLineTest::testGuessWidthDouble()
void BorderLineTest::testGuessWidthNoMatch()
{
SvxBorderLine line;
- line.GuessLinesWidths( DOUBLE,
+ line.GuessLinesWidths( SvxBorderLineStyle::DOUBLE,
TEST_WIDTH + 1, TEST_WIDTH + 2, TEST_WIDTH + 3 );
- CPPUNIT_ASSERT_EQUAL( DOUBLE, line.GetBorderLineStyle() );
+ CPPUNIT_ASSERT_EQUAL( SvxBorderLineStyle::DOUBLE, line.GetBorderLineStyle() );
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH+1, static_cast<long>(line.GetOutWidth()) );
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH+2, static_cast<long>(line.GetInWidth()) );
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH+3, static_cast<long>(line.GetDistance()));
@@ -98,11 +98,11 @@ void BorderLineTest::testGuessWidthNoMatch()
void BorderLineTest::testGuessWidthThinthickSmallgap()
{
SvxBorderLine line;
- line.GuessLinesWidths( DOUBLE,
+ line.GuessLinesWidths( SvxBorderLineStyle::DOUBLE,
THINTHICKSG_OUT_WIDTH,
THINTHICKSG_IN_WIDTH,
THINTHICKSG_DIST_WIDTH );
- CPPUNIT_ASSERT_EQUAL( THINTHICK_SMALLGAP, line.GetBorderLineStyle() );
+ CPPUNIT_ASSERT_EQUAL( SvxBorderLineStyle::THINTHICK_SMALLGAP, line.GetBorderLineStyle() );
CPPUNIT_ASSERT_EQUAL( THINTHICKSG_OUT_WIDTH,
static_cast<long>(line.GetOutWidth()) );
CPPUNIT_ASSERT_EQUAL( THINTHICKSG_IN_WIDTH,
@@ -116,11 +116,11 @@ void BorderLineTest::testGuessWidthThinthickSmallgap()
void BorderLineTest::testGuessWidthThinthickLargegap()
{
SvxBorderLine line;
- line.GuessLinesWidths( DOUBLE,
+ line.GuessLinesWidths( SvxBorderLineStyle::DOUBLE,
THINTHICKLG_OUT_WIDTH,
THINTHICKLG_IN_WIDTH,
THINTHICKLG_DIST_WIDTH );
- CPPUNIT_ASSERT_EQUAL( THINTHICK_LARGEGAP, line.GetBorderLineStyle() );
+ CPPUNIT_ASSERT_EQUAL( SvxBorderLineStyle::THINTHICK_LARGEGAP, line.GetBorderLineStyle() );
CPPUNIT_ASSERT_EQUAL( THINTHICKLG_OUT_WIDTH,
static_cast<long>(line.GetOutWidth()) );
CPPUNIT_ASSERT_EQUAL( THINTHICKLG_IN_WIDTH,
@@ -134,11 +134,11 @@ void BorderLineTest::testGuessWidthThinthickLargegap()
void BorderLineTest::testGuessWidthNostyleDouble()
{
SvxBorderLine line;
- line.GuessLinesWidths( css::table::BorderLineStyle::NONE,
+ line.GuessLinesWidths( SvxBorderLineStyle::NONE,
THINTHICKLG_OUT_WIDTH,
THINTHICKLG_IN_WIDTH,
THINTHICKLG_DIST_WIDTH );
- CPPUNIT_ASSERT_EQUAL( THINTHICK_LARGEGAP, line.GetBorderLineStyle() );
+ CPPUNIT_ASSERT_EQUAL( SvxBorderLineStyle::THINTHICK_LARGEGAP, line.GetBorderLineStyle() );
CPPUNIT_ASSERT_EQUAL( THINTHICKLG_OUT_WIDTH,
static_cast<long>(line.GetOutWidth()) );
CPPUNIT_ASSERT_EQUAL( THINTHICKLG_IN_WIDTH,
@@ -152,8 +152,8 @@ void BorderLineTest::testGuessWidthNostyleDouble()
void BorderLineTest::testGuessWidthNostyleSingle()
{
SvxBorderLine line;
- line.GuessLinesWidths( css::table::BorderLineStyle::NONE, TEST_WIDTH );
- CPPUNIT_ASSERT_EQUAL( SOLID, line.GetBorderLineStyle() );
+ line.GuessLinesWidths( SvxBorderLineStyle::NONE, TEST_WIDTH );
+ CPPUNIT_ASSERT_EQUAL( SvxBorderLineStyle::SOLID, line.GetBorderLineStyle() );
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, line.GetWidth() );
}
diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx
index 41aaf8f0bbbd..6b766b4b85ab 100644
--- a/editeng/source/items/borderline.cxx
+++ b/editeng/source/items/borderline.cxx
@@ -90,7 +90,7 @@ Color SvxBorderLine::threeDMediumColor( Color aMain )
}
SvxBorderLine::SvxBorderLine( const Color *pCol, long nWidth,
- SvxBorderStyle nStyle,
+ SvxBorderLineStyle nStyle,
Color (*pColorOutFn)( Color ), Color (*pColorInFn)( Color ) )
: m_nWidth( nWidth )
, m_bMirrorWidths( false )
@@ -108,7 +108,7 @@ SvxBorderLine::SvxBorderLine( const Color *pCol, long nWidth,
}
-SvxBorderStyle
+SvxBorderLineStyle
ConvertBorderStyleFromWord(int const nWordLineStyle)
{
switch (nWordLineStyle)
@@ -119,50 +119,50 @@ ConvertBorderStyleFromWord(int const nWordLineStyle)
case 5: // hairline
// and the unsupported special cases which we map to a single line
case 20:
- return SOLID;
+ return SvxBorderLineStyle::SOLID;
case 6:
- return DOTTED;
+ return SvxBorderLineStyle::DOTTED;
case 7:
- return DASHED;
+ return SvxBorderLineStyle::DASHED;
case 22:
- return FINE_DASHED;
+ return SvxBorderLineStyle::FINE_DASHED;
case 8:
- return DASH_DOT;
+ return SvxBorderLineStyle::DASH_DOT;
case 9:
- return DASH_DOT_DOT;
+ return SvxBorderLineStyle::DASH_DOT_DOT;
// then the shading beams which we represent by a double line
case 23:
- return DOUBLE;
+ return SvxBorderLineStyle::DOUBLE;
// then the double lines, for which we have good matches
case 3:
case 10: // Don't have triple so use double
case 21: // Don't have double wave: use double instead
- return DOUBLE;
+ return SvxBorderLineStyle::DOUBLE;
case 11:
- return THINTHICK_SMALLGAP;
+ return SvxBorderLineStyle::THINTHICK_SMALLGAP;
case 12:
case 13: // Don't have thin thick thin, so use thick thin
- return THICKTHIN_SMALLGAP;
+ return SvxBorderLineStyle::THICKTHIN_SMALLGAP;
case 14:
- return THINTHICK_MEDIUMGAP;
+ return SvxBorderLineStyle::THINTHICK_MEDIUMGAP;
case 15:
case 16: // Don't have thin thick thin, so use thick thin
- return THICKTHIN_MEDIUMGAP;
+ return SvxBorderLineStyle::THICKTHIN_MEDIUMGAP;
case 17:
- return THINTHICK_LARGEGAP;
+ return SvxBorderLineStyle::THINTHICK_LARGEGAP;
case 18:
case 19: // Don't have thin thick thin, so use thick thin
- return THICKTHIN_LARGEGAP;
+ return SvxBorderLineStyle::THICKTHIN_LARGEGAP;
case 24:
- return EMBOSSED;
+ return SvxBorderLineStyle::EMBOSSED;
case 25:
- return ENGRAVED;
+ return SvxBorderLineStyle::ENGRAVED;
case 26:
- return OUTSET;
+ return SvxBorderLineStyle::OUTSET;
case 27:
- return INSET;
+ return SvxBorderLineStyle::INSET;
default:
- return css::table::BorderLineStyle::NONE;
+ return SvxBorderLineStyle::NONE;
}
}
@@ -178,7 +178,7 @@ static const double OUTSET_line1 = 15.0;
static const double INSET_line2 = 15.0;
double
-ConvertBorderWidthFromWord(SvxBorderStyle const eStyle, double const i_fWidth,
+ConvertBorderWidthFromWord(SvxBorderLineStyle const eStyle, double const i_fWidth,
int const nWordLineStyle)
{
// fdo#68779: at least for RTF, 0.75pt is the default if width is missing
@@ -186,7 +186,7 @@ ConvertBorderWidthFromWord(SvxBorderStyle const eStyle, double const i_fWidth,
switch (eStyle)
{
// Single lines
- case SOLID:
+ case SvxBorderLineStyle::SOLID:
switch (nWordLineStyle)
{
case 2:
@@ -198,42 +198,42 @@ ConvertBorderWidthFromWord(SvxBorderStyle const eStyle, double const i_fWidth,
}
break;
- case DOTTED:
- case DASHED:
- case DASH_DOT:
- case DASH_DOT_DOT:
+ case SvxBorderLineStyle::DOTTED:
+ case SvxBorderLineStyle::DASHED:
+ case SvxBorderLineStyle::DASH_DOT:
+ case SvxBorderLineStyle::DASH_DOT_DOT:
return fWidth;
// Display a minimum effective border width of 1pt
- case FINE_DASHED:
+ case SvxBorderLineStyle::FINE_DASHED:
return (fWidth > 0 && fWidth < 20) ? 20 : fWidth;
// Double lines
- case DOUBLE:
+ case SvxBorderLineStyle::DOUBLE:
return fWidth * 3.0;
- case THINTHICK_MEDIUMGAP:
- case THICKTHIN_MEDIUMGAP:
- case EMBOSSED:
- case ENGRAVED:
+ case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
+ case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
+ case SvxBorderLineStyle::EMBOSSED:
+ case SvxBorderLineStyle::ENGRAVED:
return fWidth * 2.0;
- case THINTHICK_SMALLGAP:
+ case SvxBorderLineStyle::THINTHICK_SMALLGAP:
return fWidth + THINTHICK_SMALLGAP_line2 + THINTHICK_SMALLGAP_gap;
- case THINTHICK_LARGEGAP:
+ case SvxBorderLineStyle::THINTHICK_LARGEGAP:
return fWidth + THINTHICK_LARGEGAP_line1 + THINTHICK_LARGEGAP_line2;
- case THICKTHIN_SMALLGAP:
+ case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
return fWidth + THICKTHIN_SMALLGAP_line1 + THICKTHIN_SMALLGAP_gap;
- case THICKTHIN_LARGEGAP:
+ case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
return fWidth + THICKTHIN_LARGEGAP_line1 + THICKTHIN_LARGEGAP_line2;
- case OUTSET:
+ case SvxBorderLineStyle::OUTSET:
return (fWidth * 2.0) + OUTSET_line1;
- case INSET:
+ case SvxBorderLineStyle::INSET:
return (fWidth * 2.0) + INSET_line2;
default:
@@ -243,49 +243,49 @@ ConvertBorderWidthFromWord(SvxBorderStyle const eStyle, double const i_fWidth,
}
double
-ConvertBorderWidthToWord(SvxBorderStyle const eStyle, double const fWidth)
+ConvertBorderWidthToWord(SvxBorderLineStyle const eStyle, double const fWidth)
{
switch (eStyle)
{
// Single lines
- case SOLID:
- case DOTTED:
- case DASHED:
- case FINE_DASHED:
- case DASH_DOT:
- case DASH_DOT_DOT:
+ case SvxBorderLineStyle::SOLID:
+ case SvxBorderLineStyle::DOTTED:
+ case SvxBorderLineStyle::DASHED:
+ case SvxBorderLineStyle::FINE_DASHED:
+ case SvxBorderLineStyle::DASH_DOT:
+ case SvxBorderLineStyle::DASH_DOT_DOT:
return fWidth;
// Double lines
- case DOUBLE:
- case DOUBLE_THIN:
+ case SvxBorderLineStyle::DOUBLE:
+ case SvxBorderLineStyle::DOUBLE_THIN:
return fWidth / 3.0;
- case THINTHICK_MEDIUMGAP:
- case THICKTHIN_MEDIUMGAP:
- case EMBOSSED:
- case ENGRAVED:
+ case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
+ case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
+ case SvxBorderLineStyle::EMBOSSED:
+ case SvxBorderLineStyle::ENGRAVED:
return fWidth / 2.0;
- case THINTHICK_SMALLGAP:
+ case SvxBorderLineStyle::THINTHICK_SMALLGAP:
return fWidth - THINTHICK_SMALLGAP_line2 - THINTHICK_SMALLGAP_gap;
- case THINTHICK_LARGEGAP:
+ case SvxBorderLineStyle::THINTHICK_LARGEGAP:
return fWidth - THINTHICK_LARGEGAP_line1 - THINTHICK_LARGEGAP_line2;
- case THICKTHIN_SMALLGAP:
+ case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
return fWidth - THICKTHIN_SMALLGAP_line1 - THICKTHIN_SMALLGAP_gap;
- case THICKTHIN_LARGEGAP:
+ case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
return fWidth - THICKTHIN_LARGEGAP_line1 - THICKTHIN_LARGEGAP_line2;
- case OUTSET:
+ case SvxBorderLineStyle::OUTSET:
return (fWidth - OUTSET_line1) / 2.0;
- case INSET:
+ case SvxBorderLineStyle::INSET:
return (fWidth - INSET_line2) / 2.0;
- case css::table::BorderLineStyle::NONE:
+ case SvxBorderLineStyle::NONE:
return 0;
default:
@@ -298,30 +298,30 @@ ConvertBorderWidthToWord(SvxBorderStyle const eStyle, double const fWidth)
units handled by the resulting object are Twips and the
BorderWidthImpl::GetLine1() corresponds to the Outer Line.
*/
-BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
+BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderLineStyle nStyle )
{
BorderWidthImpl aImpl;
switch ( nStyle )
{
// No line: no width
- case css::table::BorderLineStyle::NONE:
+ case SvxBorderLineStyle::NONE:
aImpl = BorderWidthImpl( BorderWidthImplFlags::FIXED, 0.0 );
break;
// Single lines
- case SOLID:
- case DOTTED:
- case DASHED:
- case FINE_DASHED:
- case DASH_DOT:
- case DASH_DOT_DOT:
+ case SvxBorderLineStyle::SOLID:
+ case SvxBorderLineStyle::DOTTED:
+ case SvxBorderLineStyle::DASHED:
+ case SvxBorderLineStyle::FINE_DASHED:
+ case SvxBorderLineStyle::DASH_DOT:
+ case SvxBorderLineStyle::DASH_DOT_DOT:
aImpl = BorderWidthImpl( BorderWidthImplFlags::CHANGE_LINE1, 1.0 );
break;
// Double lines
- case DOUBLE:
+ case SvxBorderLineStyle::DOUBLE:
aImpl = BorderWidthImpl(
BorderWidthImplFlags::CHANGE_LINE1 | BorderWidthImplFlags::CHANGE_LINE2 | BorderWidthImplFlags::CHANGE_DIST,
// fdo#46112 fdo#38542 fdo#43249:
@@ -329,38 +329,38 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
1.0/3.0, 1.0/3.0, 1.0/3.0 );
break;
- case DOUBLE_THIN:
+ case SvxBorderLineStyle::DOUBLE_THIN:
aImpl = BorderWidthImpl(BorderWidthImplFlags::CHANGE_DIST, 10.0, 10.0, 1.0);
break;
- case THINTHICK_SMALLGAP:
+ case SvxBorderLineStyle::THINTHICK_SMALLGAP:
aImpl = BorderWidthImpl( BorderWidthImplFlags::CHANGE_LINE1, 1.0,
THINTHICK_SMALLGAP_line2, THINTHICK_SMALLGAP_gap );
break;
- case THINTHICK_MEDIUMGAP:
+ case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
aImpl = BorderWidthImpl(
BorderWidthImplFlags::CHANGE_LINE1 | BorderWidthImplFlags::CHANGE_LINE2 | BorderWidthImplFlags::CHANGE_DIST,
0.5, 0.25, 0.25 );
break;
- case THINTHICK_LARGEGAP:
+ case SvxBorderLineStyle::THINTHICK_LARGEGAP:
aImpl = BorderWidthImpl( BorderWidthImplFlags::CHANGE_DIST,
THINTHICK_LARGEGAP_line1, THINTHICK_LARGEGAP_line2, 1.0 );
break;
- case THICKTHIN_SMALLGAP:
+ case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
aImpl = BorderWidthImpl( BorderWidthImplFlags::CHANGE_LINE2, THICKTHIN_SMALLGAP_line1,
1.0, THICKTHIN_SMALLGAP_gap );
break;
- case THICKTHIN_MEDIUMGAP:
+ case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
aImpl = BorderWidthImpl(
BorderWidthImplFlags::CHANGE_LINE1 | BorderWidthImplFlags::CHANGE_LINE2 | BorderWidthImplFlags::CHANGE_DIST,
0.25, 0.5, 0.25 );
break;
- case THICKTHIN_LARGEGAP:
+ case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
aImpl = BorderWidthImpl( BorderWidthImplFlags::CHANGE_DIST, THICKTHIN_LARGEGAP_line1,
THICKTHIN_LARGEGAP_line2, 1.0 );
break;
@@ -371,8 +371,8 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
* 0.75pt up to 3pt and then 3pt
*/
- case EMBOSSED:
- case ENGRAVED:
+ case SvxBorderLineStyle::EMBOSSED:
+ case SvxBorderLineStyle::ENGRAVED:
aImpl = BorderWidthImpl(
BorderWidthImplFlags::CHANGE_LINE1 | BorderWidthImplFlags::CHANGE_LINE2 | BorderWidthImplFlags::CHANGE_DIST,
0.25, 0.25, 0.5 );
@@ -383,13 +383,13 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
* Word compat: the gap width should be measured relatively to the biggest width for the
* row or column.
*/
- case OUTSET:
+ case SvxBorderLineStyle::OUTSET:
aImpl = BorderWidthImpl(
BorderWidthImplFlags::CHANGE_LINE2 | BorderWidthImplFlags::CHANGE_DIST,
OUTSET_line1, 0.5, 0.5 );
break;
- case INSET:
+ case SvxBorderLineStyle::INSET:
aImpl = BorderWidthImpl(
BorderWidthImplFlags::CHANGE_LINE1 | BorderWidthImplFlags::CHANGE_DIST,
0.5, INSET_line2, 0.5 );
@@ -429,32 +429,32 @@ void SvxBorderLine::ScaleMetrics( long nMult, long nDiv )
m_nDiv = nDiv;
}
-void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sal_uInt16 nIn, sal_uInt16 nDist )
+void SvxBorderLine::GuessLinesWidths( SvxBorderLineStyle nStyle, sal_uInt16 nOut, sal_uInt16 nIn, sal_uInt16 nDist )
{
- if (css::table::BorderLineStyle::NONE == nStyle)
+ if (SvxBorderLineStyle::NONE == nStyle)
{
- nStyle = SOLID;
+ nStyle = SvxBorderLineStyle::SOLID;
if ( nOut > 0 && nIn > 0 )
- nStyle = DOUBLE;
+ nStyle = SvxBorderLineStyle::DOUBLE;
}
- if ( nStyle == DOUBLE )
+ if ( nStyle == SvxBorderLineStyle::DOUBLE )
{
- static const SvxBorderStyle aDoubleStyles[] =
+ static const SvxBorderLineStyle aDoubleStyles[] =
{
- DOUBLE,
- DOUBLE_THIN,
- THINTHICK_SMALLGAP,
- THINTHICK_MEDIUMGAP,
- THINTHICK_LARGEGAP,
- THICKTHIN_SMALLGAP,
- THICKTHIN_MEDIUMGAP,
- THICKTHIN_LARGEGAP
+ SvxBorderLineStyle::DOUBLE,
+ SvxBorderLineStyle::DOUBLE_THIN,
+ SvxBorderLineStyle::THINTHICK_SMALLGAP,
+ SvxBorderLineStyle::THINTHICK_MEDIUMGAP,
+ SvxBorderLineStyle::THINTHICK_LARGEGAP,
+ SvxBorderLineStyle::THICKTHIN_SMALLGAP,
+ SvxBorderLineStyle::THICKTHIN_MEDIUMGAP,
+ SvxBorderLineStyle::THICKTHIN_LARGEGAP
};
static size_t const len = SAL_N_ELEMENTS(aDoubleStyles);
long nWidth = 0;
- SvxBorderStyle nTestStyle(css::table::BorderLineStyle::NONE);
+ SvxBorderLineStyle nTestStyle(SvxBorderLineStyle::NONE);
for (size_t i = 0; i < len && nWidth == 0; ++i)
{
nTestStyle = aDoubleStyles[i];
@@ -494,12 +494,12 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa
// and returns a 0 width.
switch (nStyle)
{
- case SOLID:
- case DOTTED:
- case DASHED:
- case FINE_DASHED:
- case DASH_DOT:
- case DASH_DOT_DOT:
+ case SvxBorderLineStyle::SOLID:
+ case SvxBorderLineStyle::DOTTED:
+ case SvxBorderLineStyle::DASHED:
+ case SvxBorderLineStyle::FINE_DASHED:
+ case SvxBorderLineStyle::DASH_DOT:
+ case SvxBorderLineStyle::DASH_DOT_DOT:
std::swap( nOut, nIn);
break;
default:
@@ -545,32 +545,32 @@ bool SvxBorderLine::operator==( const SvxBorderLine& rCmp ) const
( m_pColorGapFn == rCmp.m_pColorGapFn ) );
}
-void SvxBorderLine::SetBorderLineStyle( SvxBorderStyle nNew )
+void SvxBorderLine::SetBorderLineStyle( SvxBorderLineStyle nNew )
{
m_nStyle = nNew;
m_aWidthImpl = getWidthImpl( m_nStyle );
switch ( nNew )
{
- case EMBOSSED:
+ case SvxBorderLineStyle::EMBOSSED:
m_pColorOutFn = threeDLightColor;
m_pColorInFn = threeDDarkColor;
m_pColorGapFn = threeDMediumColor;
m_bUseLeftTop = true;
break;
- case ENGRAVED:
+ case SvxBorderLineStyle::ENGRAVED:
m_pColorOutFn = threeDDarkColor;
m_pColorInFn = threeDLightColor;
m_pColorGapFn = threeDMediumColor;
m_bUseLeftTop = true;
break;
- case OUTSET:
+ case SvxBorderLineStyle::OUTSET:
m_pColorOutFn = lightColor;
m_pColorInFn = darkColor;
m_bUseLeftTop = true;
m_pColorGapFn = nullptr;
break;
- case INSET:
+ case SvxBorderLineStyle::INSET:
m_pColorOutFn = darkColor;
m_pColorInFn = lightColor;
m_bUseLeftTop = true;
@@ -660,9 +660,9 @@ OUString SvxBorderLine::GetValueString(MapUnit eSrcUnit,
};
OUString aStr = "(" + ::GetColorString( aColor ) + OUString(cpDelim);
- if ( m_nStyle < int(SAL_N_ELEMENTS(aStyleIds)) )
+ if ( (int)m_nStyle < int(SAL_N_ELEMENTS(aStyleIds)) )
{
- sal_uInt16 nResId = aStyleIds[m_nStyle];
+ sal_uInt16 nResId = aStyleIds[(int)m_nStyle];
aStr += EE_RESSTR(nResId);
}
else
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 88d319099f65..9dd99b8792e5 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -111,7 +111,7 @@ namespace
.WriteUInt16( l.GetDistance() );
if (version >= BORDER_LINE_WITH_STYLE_VERSION)
- stream.WriteUInt16( l.GetBorderLineStyle() );
+ stream.WriteUInt16( (sal_uInt16)l.GetBorderLineStyle() );
return stream;
}
@@ -129,7 +129,7 @@ namespace
stream.ReadUInt16( nStyle );
SvxBorderLine border(&aColor);
- border.GuessLinesWidths(nStyle, nOutline, nInline, nDistance);
+ border.GuessLinesWidths((SvxBorderLineStyle)nStyle, nOutline, nInline, nDistance);
return border;
}
@@ -1671,7 +1671,7 @@ table::BorderLine2 SvxBoxItem::SvxLineToLine(const SvxBorderLine* pLine, bool bC
aLine.InnerLineWidth = sal_uInt16( bConvert ? convertTwipToMm100(pLine->GetInWidth() ): pLine->GetInWidth() );
aLine.OuterLineWidth = sal_uInt16( bConvert ? convertTwipToMm100(pLine->GetOutWidth()): pLine->GetOutWidth() );
aLine.LineDistance = sal_uInt16( bConvert ? convertTwipToMm100(pLine->GetDistance()): pLine->GetDistance() );
- aLine.LineStyle = pLine->GetBorderLineStyle();
+ aLine.LineStyle = sal_Int16(pLine->GetBorderLineStyle());
aLine.LineWidth = sal_uInt32( bConvert ? convertTwipToMm100( pLine->GetWidth( ) ) : pLine->GetWidth( ) );
}
else
@@ -1786,10 +1786,10 @@ bool SvxBoxItem::LineToSvxLine(const css::table::BorderLine& rLine, SvxBorderLin
bool
SvxBoxItem::LineToSvxLine(const css::table::BorderLine2& rLine, SvxBorderLine& rSvxLine, bool bConvert)
{
- SvxBorderStyle const nStyle =
+ SvxBorderLineStyle const nStyle =
(rLine.LineStyle < 0 || BORDER_LINE_STYLE_MAX < rLine.LineStyle)
- ? SOLID // default
- : rLine.LineStyle;
+ ? SvxBorderLineStyle::SOLID // default
+ : (SvxBorderLineStyle)rLine.LineStyle;
rSvxLine.SetBorderLineStyle( nStyle );
@@ -1799,7 +1799,7 @@ SvxBoxItem::LineToSvxLine(const css::table::BorderLine2& rLine, SvxBorderLine& r
rSvxLine.SetWidth( bConvert? convertMm100ToTwip( rLine.LineWidth ) : rLine.LineWidth );
// fdo#46112: double does not necessarily mean symmetric
// for backwards compatibility
- bGuessWidth = ((DOUBLE == nStyle || DOUBLE_THIN == nStyle)) &&
+ bGuessWidth = ((SvxBorderLineStyle::DOUBLE == nStyle || SvxBorderLineStyle::DOUBLE_THIN == nStyle)) &&
(rLine.InnerLineWidth > 0) && (rLine.OuterLineWidth > 0);
}
@@ -1924,17 +1924,17 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
drawing::LineStyle eDrawingStyle;
rVal >>= eDrawingStyle;
- editeng::SvxBorderStyle eBorderStyle = css::table::BorderLineStyle::NONE;
+ SvxBorderLineStyle eBorderStyle = SvxBorderLineStyle::NONE;
switch ( eDrawingStyle )
{
default:
case drawing::LineStyle_NONE:
break;
case drawing::LineStyle_SOLID:
- eBorderStyle = SOLID;
+ eBorderStyle = SvxBorderLineStyle::SOLID;
break;
case drawing::LineStyle_DASH:
- eBorderStyle = DASHED;
+ eBorderStyle = SvxBorderLineStyle::DASHED;
break;
}
@@ -2669,7 +2669,7 @@ SfxPoolItem* SvxBoxInfoItem::Create( SvStream& rStrm, sal_uInt16 ) const
Color aColor;
ReadColor( rStrm, aColor ).ReadInt16( nOutline ).ReadInt16( nInline ).ReadInt16( nDistance );
SvxBorderLine aBorder( &aColor );
- aBorder.GuessLinesWidths(css::table::BorderLineStyle::NONE, nOutline, nInline, nDistance);
+ aBorder.GuessLinesWidths(SvxBorderLineStyle::NONE, nOutline, nInline, nDistance);
switch( cLine )
{
@@ -3166,7 +3166,7 @@ bool SvxLineItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemId )
{
case MID_FG_COLOR: pLine->SetColor( Color(nVal) ); break;
case MID_LINE_STYLE:
- pLine->SetBorderLineStyle(static_cast<SvxBorderStyle>(nVal));
+ pLine->SetBorderLineStyle(static_cast<SvxBorderLineStyle>(nVal));
break;
default:
OSL_FAIL( "Wrong MemberId" );
@@ -3237,7 +3237,7 @@ SfxPoolItem* SvxLineItem::Create( SvStream& rStrm, sal_uInt16 ) const
if( nOutline )
{
SvxBorderLine aLine( &aColor );
- aLine.GuessLinesWidths(css::table::BorderLineStyle::NONE, nOutline, nInline, nDistance);
+ aLine.GuessLinesWidths(SvxBorderLineStyle::NONE, nOutline, nInline, nDistance);
_pLine->SetLine( &aLine );
}
return _pLine;
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index f0d9f32ced68..584fc1ddcbdc 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -1453,49 +1453,49 @@ void SvxRTFParser::ReadBorderAttr( int nToken, SfxItemSet& rSet,
}
case RTF_BRDRDOT: // dotted border
- aBrd.SetBorderLineStyle(table::BorderLineStyle::DOTTED);
+ aBrd.SetBorderLineStyle(SvxBorderLineStyle::DOTTED);
break;
case RTF_BRDRDASH: // dashed border
- aBrd.SetBorderLineStyle(table::BorderLineStyle::DASHED);
+ aBrd.SetBorderLineStyle(SvxBorderLineStyle::DASHED);
break;
case RTF_BRDRHAIR: // hairline border
{
- aBrd.SetBorderLineStyle( table::BorderLineStyle::SOLID);
+ aBrd.SetBorderLineStyle( SvxBorderLineStyle::SOLID);
aBrd.SetWidth( DEF_LINE_WIDTH_0 );
}
break;
case RTF_BRDRDB: // Double border
- aBrd.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
+ aBrd.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
break;
case RTF_BRDRINSET: // inset border
- aBrd.SetBorderLineStyle(table::BorderLineStyle::INSET);
+ aBrd.SetBorderLineStyle(SvxBorderLineStyle::INSET);
break;
case RTF_BRDROUTSET: // outset border
- aBrd.SetBorderLineStyle(table::BorderLineStyle::OUTSET);
+ aBrd.SetBorderLineStyle(SvxBorderLineStyle::OUTSET);
break;
case RTF_BRDRTNTHSG: // ThinThick Small gap
- aBrd.SetBorderLineStyle(table::BorderLineStyle::THINTHICK_SMALLGAP);
+ aBrd.SetBorderLineStyle(SvxBorderLineStyle::THINTHICK_SMALLGAP);
break;
case RTF_BRDRTNTHMG: // ThinThick Medium gap
- aBrd.SetBorderLineStyle(table::BorderLineStyle::THINTHICK_MEDIUMGAP);
+ aBrd.SetBorderLineStyle(SvxBorderLineStyle::THINTHICK_MEDIUMGAP);
break;
case RTF_BRDRTNTHLG: // ThinThick Large gap
- aBrd.SetBorderLineStyle(table::BorderLineStyle::THINTHICK_LARGEGAP);
+ aBrd.SetBorderLineStyle(SvxBorderLineStyle::THINTHICK_LARGEGAP);
break;
case RTF_BRDRTHTNSG: // ThickThin Small gap
- aBrd.SetBorderLineStyle(table::BorderLineStyle::THICKTHIN_SMALLGAP);
+ aBrd.SetBorderLineStyle(SvxBorderLineStyle::THICKTHIN_SMALLGAP);
break;
case RTF_BRDRTHTNMG: // ThickThin Medium gap
- aBrd.SetBorderLineStyle(table::BorderLineStyle::THICKTHIN_MEDIUMGAP);
+ aBrd.SetBorderLineStyle(SvxBorderLineStyle::THICKTHIN_MEDIUMGAP);
break;
case RTF_BRDRTHTNLG: // ThickThin Large gap
- aBrd.SetBorderLineStyle(table::BorderLineStyle::THICKTHIN_LARGEGAP);
+ aBrd.SetBorderLineStyle(SvxBorderLineStyle::THICKTHIN_LARGEGAP);
break;
case RTF_BRDREMBOSS: // Embossed border
- aBrd.SetBorderLineStyle(table::BorderLineStyle::EMBOSSED);
+ aBrd.SetBorderLineStyle(SvxBorderLineStyle::EMBOSSED);
break;
case RTF_BRDRENGRAVE: // Engraved border
- aBrd.SetBorderLineStyle(table::BorderLineStyle::ENGRAVED);
+ aBrd.SetBorderLineStyle(SvxBorderLineStyle::ENGRAVED);
break;
case RTF_BRDRS: // single thickness border
diff --git a/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx b/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx
index bd10add60aa9..4ac0a1045585 100644
--- a/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx
@@ -27,8 +27,7 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
-#include <com/sun/star/table/BorderLineStyle.hpp>
-
+enum class SvxBorderLineStyle : sal_Int16;
namespace drawinglayer
{
@@ -66,7 +65,7 @@ namespace drawinglayer
basegfx::BColor maRGBColorGap;
bool mbHasGapColor;
- short mnStyle;
+ SvxBorderLineStyle mnStyle;
double mfPatternScale;
@@ -107,7 +106,7 @@ namespace drawinglayer
const basegfx::BColor& rRGBColorLeft,
const basegfx::BColor& rRGBColorGap,
bool bHasGapColor,
- const short nStyle,
+ SvxBorderLineStyle nStyle,
double fPatternScale = 1.0 );
/// data read access
@@ -124,7 +123,7 @@ namespace drawinglayer
const basegfx::BColor& getRGBColorLeft () const { return maRGBColorLeft; }
const basegfx::BColor& getRGBColorGap () const { return maRGBColorGap; }
bool hasGapColor( ) const { return mbHasGapColor; }
- short getStyle () const { return mnStyle; }
+ SvxBorderLineStyle getStyle () const { return mnStyle; }
double getPatternScale() const { return mfPatternScale; }
/// Same as create2DDecomposition(), but can do pixel correction if requested.
void createDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation, bool bPixelCorrection) const;
diff --git a/include/drawinglayer/primitive2d/clippedborderlineprimitive2d.hxx b/include/drawinglayer/primitive2d/clippedborderlineprimitive2d.hxx
index 5b4a1414f747..3fe2813be9a9 100644
--- a/include/drawinglayer/primitive2d/clippedborderlineprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/clippedborderlineprimitive2d.hxx
@@ -46,7 +46,7 @@ namespace drawinglayer
const basegfx::BColor& rRGBColorLeft,
const basegfx::BColor& rRGBColorGap,
bool bHasGapColor,
- const short nStyle,
+ SvxBorderLineStyle nStyle,
double fPatternScale );
/// compare operator
diff --git a/include/editeng/borderline.hxx b/include/editeng/borderline.hxx
index 98e2245b0729..fd356b489546 100644
--- a/include/editeng/borderline.hxx
+++ b/include/editeng/borderline.hxx
@@ -37,118 +37,206 @@
#define DEF_LINE_WIDTH_5 10
-namespace editeng {
-
- // values from css::table::BorderLineStyle
- typedef sal_Int16 SvxBorderStyle;
-
- // convert border style between Word formats and LO
- SvxBorderStyle EDITENG_DLLPUBLIC ConvertBorderStyleFromWord(int);
- /// convert border width in twips between Word formats and LO
- double EDITENG_DLLPUBLIC ConvertBorderWidthToWord(SvxBorderStyle, double);
- double EDITENG_DLLPUBLIC ConvertBorderWidthFromWord(SvxBorderStyle,
- double, int);
-
- class EDITENG_DLLPUBLIC SvxBorderLine
- {
- protected:
- Color aColor;
-
- long m_nWidth;
- bool m_bMirrorWidths;
- BorderWidthImpl m_aWidthImpl;
- long m_nMult;
- long m_nDiv;
-
- SvxBorderStyle m_nStyle;
-
- bool m_bUseLeftTop;
- Color (*m_pColorOutFn)( Color );
- Color (*m_pColorInFn)( Color );
- Color (*m_pColorGapFn)( Color );
-
- public:
- SvxBorderLine( const Color *pCol = nullptr,
- long nWidth = 0,
- SvxBorderStyle nStyle = css::table::BorderLineStyle::SOLID,
- Color (*pColorOutFn)( Color ) = &darkColor,
- Color (*pColorInFn)( Color ) = &darkColor );
- SvxBorderLine( const SvxBorderLine& r );
-
- SvxBorderLine& operator=( const SvxBorderLine& r );
-
- const Color& GetColor() const { return aColor; }
- Color GetColorOut( bool bLeftOrTop = true ) const;
- Color GetColorIn( bool bLeftOrTop = true ) const;
- bool HasGapColor() const { return m_pColorGapFn != nullptr; }
- Color GetColorGap() const;
-
- void SetWidth( long nWidth );
- /** Guess the style and width from the three lines widths values.
-
- When the value of nStyle is SvxBorderLine::DOUBLE, the style set will be guessed
- using the three values to match the best possible style among the following:
- - SvxBorderLine::DOUBLE
- - SvxBorderLine::THINTHICK_SMALLGAP
- - SvxBorderLine::THINTHICK_MEDIUMGAP
- - SvxBorderLine::THINTHICK_LARGEGAP
- - SvxBorderLine::THICKTHIN_SMALLGAP
- - SvxBorderLine::THICKTHIN_MEDIUMGAP
- - SvxBorderLine::THICKTHIN_LARGEGAP
-
- If no styles matches the width, then the width is set to 0.
-
- There is one known case that could fit several styles: \a nIn = \a nDist = 0.75 pt,
- \a nOut = 1.5 pt. This case fits SvxBorderLine::THINTHICK_SMALLGAP and
- SvxBorderLine::THINTHICK_MEDIUMGAP with a 1.5 pt width and
- SvxBorderLine::THINTHICK_LARGEGAP with a 0.75 pt width. The same case happens
- also for thick-thin styles.
-
- \param nStyle the border style used to guess the width.
- \param nIn the width of the inner line in 1th pt
- \param nOut the width of the outer line in 1th pt
- \param nDist the width of the gap between the lines in 1th pt
- */
- void GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sal_uInt16 nIn = 0, sal_uInt16 nDist = 0 );
-
- // TODO Hacky method to mirror lines in only a few cases
- void SetMirrorWidths() { m_bMirrorWidths = true; }
- long GetWidth( ) const { return m_nWidth; }
- sal_uInt16 GetOutWidth() const;
- sal_uInt16 GetInWidth() const;
- sal_uInt16 GetDistance() const;
-
- SvxBorderStyle GetBorderLineStyle() const { return m_nStyle; }
-
- void SetColor( const Color &rColor ) { aColor = rColor; }
- void SetBorderLineStyle( SvxBorderStyle nNew );
- void ScaleMetrics( long nMult, long nDiv );
-
- bool operator==( const SvxBorderLine &rCmp ) const;
-
- OUString GetValueString( MapUnit eSrcUnit, MapUnit eDestUnit,
- const IntlWrapper* pIntl,
- bool bMetricStr = false ) const;
-
- bool HasPriority( const SvxBorderLine& rOtherLine ) const;
-
- bool isEmpty() const {
- return m_aWidthImpl.IsEmpty()
- || m_nStyle == css::table::BorderLineStyle::NONE
- || m_nWidth == 0;
- }
- bool isDouble() const { return m_aWidthImpl.IsDouble(); }
- sal_uInt16 GetScaledWidth() const { return GetOutWidth() + GetInWidth() + GetDistance(); }
-
- static Color darkColor( Color aMain );
- static Color lightColor( Color aMain );
-
- static Color threeDLightColor( Color aMain );
- static Color threeDMediumColor( Color aMain );
- static Color threeDDarkColor( Color aMain );
-
- static BorderWidthImpl getWidthImpl( SvxBorderStyle nStyle );
- };
+// Abstracts over values from css::table::BorderLineStyle
+enum class SvxBorderLineStyle : sal_Int16
+{
+ /** No border line
+ */
+ NONE = css::table::BorderLineStyle::NONE,
+
+ /** Solid border line.
+ */
+ SOLID = css::table::BorderLineStyle::SOLID,
+
+ /** Dotted border line.
+ */
+ DOTTED = css::table::BorderLineStyle::DOTTED,
+
+ /** Dashed border line.
+ */
+ DASHED = css::table::BorderLineStyle::DASHED,
+
+ /** Double border line. Widths of the lines and the gap are all equal,
+ and vary equally with the total width.
+ */
+ DOUBLE = css::table::BorderLineStyle::DOUBLE,
+
+ /** Double border line with a thin line outside and a thick line
+ inside separated by a small gap.
+ */
+ THINTHICK_SMALLGAP = css::table::BorderLineStyle::THINTHICK_SMALLGAP,
+
+ /** Double border line with a thin line outside and a thick line
+ inside separated by a medium gap.
+ */
+ THINTHICK_MEDIUMGAP = css::table::BorderLineStyle::THINTHICK_MEDIUMGAP,
+
+ /** Double border line with a thin line outside and a thick line
+ inside separated by a large gap.
+ */
+ THINTHICK_LARGEGAP = css::table::BorderLineStyle::THINTHICK_LARGEGAP,
+
+ /** Double border line with a thick line outside and a thin line
+ inside separated by a small gap.
+ */
+ THICKTHIN_SMALLGAP = css::table::BorderLineStyle::THICKTHIN_SMALLGAP,
+
+ /** Double border line with a thick line outside and a thin line
+ inside separated by a medium gap.
+ */
+ THICKTHIN_MEDIUMGAP = css::table::BorderLineStyle::THICKTHIN_MEDIUMGAP,
+
+ /** Double border line with a thick line outside and a thin line
+ inside separated by a large gap.
+ */
+ THICKTHIN_LARGEGAP = css::table::BorderLineStyle::THICKTHIN_LARGEGAP,
+
+ /** 3D embossed border line.
+ */
+ EMBOSSED = css::table::BorderLineStyle::EMBOSSED,
+
+ /** 3D engraved border line.
+ */
+ ENGRAVED = css::table::BorderLineStyle::ENGRAVED,
+
+ /** Outset border line.
+ */
+ OUTSET = css::table::BorderLineStyle::OUTSET,
+
+ /** Inset border line.
+ */
+ INSET = css::table::BorderLineStyle::INSET,
+
+ /** Finely dashed border line.
+ */
+ FINE_DASHED = css::table::BorderLineStyle::FINE_DASHED,
+
+ /** Double border line consisting of two fixed thin lines separated by a
+ variable gap.
+ */
+ DOUBLE_THIN = css::table::BorderLineStyle::DOUBLE_THIN,
+
+ /** Line consisting of a repetition of one dash and one dot. */
+ DASH_DOT = css::table::BorderLineStyle::DASH_DOT,
+
+ /** Line consisting of a repetition of one dash and 2 dots. */
+ DASH_DOT_DOT = css::table::BorderLineStyle::DASH_DOT_DOT,
+
+ /** Maximum valid border line style value.
+ */
+ BORDER_LINE_STYLE_MAX = css::table::BorderLineStyle::BORDER_LINE_STYLE_MAX,
+};
+
+namespace editeng
+{
+
+// convert border style between Word formats and LO
+SvxBorderLineStyle EDITENG_DLLPUBLIC ConvertBorderStyleFromWord(int);
+/// convert border width in twips between Word formats and LO
+double EDITENG_DLLPUBLIC ConvertBorderWidthToWord(SvxBorderLineStyle, double);
+double EDITENG_DLLPUBLIC ConvertBorderWidthFromWord(SvxBorderLineStyle,
+ double, int);
+
+class EDITENG_DLLPUBLIC SvxBorderLine
+{
+protected:
+ Color aColor;
+
+ long m_nWidth;
+ bool m_bMirrorWidths;
+ BorderWidthImpl m_aWidthImpl;
+ long m_nMult;
+ long m_nDiv;
+
+ SvxBorderLineStyle m_nStyle;
+
+ bool m_bUseLeftTop;
+ Color (*m_pColorOutFn)( Color );
+ Color (*m_pColorInFn)( Color );
+ Color (*m_pColorGapFn)( Color );
+
+public:
+ SvxBorderLine( const Color *pCol = nullptr,
+ long nWidth = 0,
+ SvxBorderLineStyle nStyle = SvxBorderLineStyle::SOLID,
+ Color (*pColorOutFn)( Color ) = &darkColor,
+ Color (*pColorInFn)( Color ) = &darkColor );
+ SvxBorderLine( const SvxBorderLine& r );
+
+ SvxBorderLine& operator=( const SvxBorderLine& r );
+
+ const Color& GetColor() const { return aColor; }
+ Color GetColorOut( bool bLeftOrTop = true ) const;
+ Color GetColorIn( bool bLeftOrTop = true ) const;
+ bool HasGapColor() const { return m_pColorGapFn != nullptr; }
+ Color GetColorGap() const;
+
+ void SetWidth( long nWidth );
+ /** Guess the style and width from the three lines widths values.
+
+ When the value of nStyle is SvxBorderLine::DOUBLE, the style set will be guessed
+ using the three values to match the best possible style among the following:
+ - SvxBorderLine::DOUBLE
+ - SvxBorderLine::THINTHICK_SMALLGAP
+ - SvxBorderLine::THINTHICK_MEDIUMGAP
+ - SvxBorderLine::THINTHICK_LARGEGAP
+ - SvxBorderLine::THICKTHIN_SMALLGAP
+ - SvxBorderLine::THICKTHIN_MEDIUMGAP
+ - SvxBorderLine::THICKTHIN_LARGEGAP
+
+ If no styles matches the width, then the width is set to 0.
+
+ There is one known case that could fit several styles: \a nIn = \a nDist = 0.75 pt,
+ \a nOut = 1.5 pt. This case fits SvxBorderLine::THINTHICK_SMALLGAP and
+ SvxBorderLine::THINTHICK_MEDIUMGAP with a 1.5 pt width and
+ SvxBorderLine::THINTHICK_LARGEGAP with a 0.75 pt width. The same case happens
+ also for thick-thin styles.
+
+ \param nStyle the border style used to guess the width.
+ \param nIn the width of the inner line in 1th pt
+ \param nOut the width of the outer line in 1th pt
+ \param nDist the width of the gap between the lines in 1th pt
+ */
+ void GuessLinesWidths( SvxBorderLineStyle nStyle, sal_uInt16 nOut, sal_uInt16 nIn = 0, sal_uInt16 nDist = 0 );
+
+ // TODO Hacky method to mirror lines in only a few cases
+ void SetMirrorWidths() { m_bMirrorWidths = true; }
+ long GetWidth( ) const { return m_nWidth; }
+ sal_uInt16 GetOutWidth() const;
+ sal_uInt16 GetInWidth() const;
+ sal_uInt16 GetDistance() const;
+
+ SvxBorderLineStyle GetBorderLineStyle() const { return m_nStyle; }
+
+ void SetColor( const Color &rColor ) { aColor = rColor; }
+ void SetBorderLineStyle( SvxBorderLineStyle nNew );
+ void ScaleMetrics( long nMult, long nDiv );
+
+ bool operator==( const SvxBorderLine &rCmp ) const;
+
+ OUString GetValueString( MapUnit eSrcUnit, MapUnit eDestUnit,
+ const IntlWrapper* pIntl,
+ bool bMetricStr = false ) const;
+
+ bool HasPriority( const SvxBorderLine& rOtherLine ) const;
+
+ bool isEmpty() const {
+ return m_aWidthImpl.IsEmpty()
+ || m_nStyle == SvxBorderLineStyle::NONE
+ || m_nWidth == 0;
+ }
+ bool isDouble() const { return m_aWidthImpl.IsDouble(); }
+ sal_uInt16 GetScaledWidth() const { return GetOutWidth() + GetInWidth() + GetDistance(); }
+
+ static Color darkColor( Color aMain );
+ static Color lightColor( Color aMain );
+
+ static Color threeDLightColor( Color aMain );
+ static Color threeDMediumColor( Color aMain );
+ static Color threeDDarkColor( Color aMain );
+
+ static BorderWidthImpl getWidthImpl( SvxBorderLineStyle nStyle );
+};
EDITENG_DLLPUBLIC bool operator!=( const SvxBorderLine& rLeft, const SvxBorderLine& rRight );
@@ -156,4 +244,3 @@ EDITENG_DLLPUBLIC bool operator!=( const SvxBorderLine& rLeft, const SvxBorderLi
#endif
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svtools/borderhelper.hxx b/include/svtools/borderhelper.hxx
index 5e4328dfd147..43d757be80b0 100644
--- a/include/svtools/borderhelper.hxx
+++ b/include/svtools/borderhelper.hxx
@@ -27,18 +27,20 @@
#include <basegfx/point/b2dpoint.hxx>
#include <vcl/outdev.hxx>
+enum class SvxBorderLineStyle : sal_Int16;
+
namespace svtools {
-SVT_DLLPUBLIC std::vector<double> GetLineDashing( sal_uInt16 nDashing, double fScale );
+SVT_DLLPUBLIC std::vector<double> GetLineDashing( SvxBorderLineStyle nDashing, double fScale );
SVT_DLLPUBLIC basegfx::B2DPolyPolygon ApplyLineDashing(
- const basegfx::B2DPolygon& rPolygon, sal_uInt16 nDashing, double fScale );
+ const basegfx::B2DPolygon& rPolygon, SvxBorderLineStyle nDashing, double fScale );
SVT_DLLPUBLIC void DrawLine( OutputDevice& rDev, const basegfx::B2DPoint& rBeg,
- const basegfx::B2DPoint& rEnd, sal_uInt32 nWidth, sal_uInt16 nDashing );
+ const basegfx::B2DPoint& rEnd, sal_uInt32 nWidth, SvxBorderLineStyle nDashing );
SVT_DLLPUBLIC void DrawLine( OutputDevice& rDev, const Point& rBeg,
- const Point& rEnd, sal_uInt32 nWidth, sal_uInt16 nDashing );
+ const Point& rEnd, sal_uInt32 nWidth, SvxBorderLineStyle nDashing );
}
#endif
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index b226137f9da3..b2179d4c5b65 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -34,6 +34,7 @@
class FontList;
class ImpLineListData;
+enum class SvxBorderLineStyle : sal_Int16;
typedef ::std::vector< ImpLineListData* > ImpLineList;
typedef ::std::vector< FontMetric > ImplFontList;
@@ -206,7 +207,7 @@ class SVT_DLLPUBLIC LineListBox : public ListBox
SVT_DLLPRIVATE void ImpGetLine( long nLine1, long nLine2, long nDistance,
Color nColor1, Color nColor2, Color nColorDist,
- sal_uInt16 nStyle, Bitmap& rBmp );
+ SvxBorderLineStyle nStyle, Bitmap& rBmp );
using Window::ImplInit;
SVT_DLLPRIVATE void ImplInit();
void UpdatePaintLineColor(); // returns sal_True if maPaintCol has changed
@@ -231,21 +232,21 @@ public:
using ListBox::InsertEntry;
/** Insert a listbox entry with all widths in Twips. */
void InsertEntry(const BorderWidthImpl& rWidthImpl,
- sal_uInt16 nStyle, long nMinWidth = 0,
+ SvxBorderLineStyle nStyle, long nMinWidth = 0,
ColorFunc pColor1Fn = &sameColor,
ColorFunc pColor2Fn = &sameColor,
ColorDistFunc pColorDistFn = &sameDistColor);
using ListBox::GetEntryPos;
- sal_Int32 GetEntryPos( sal_uInt16 nStyle ) const;
- sal_uInt16 GetEntryStyle( sal_Int32 nPos ) const;
+ sal_Int32 GetEntryPos( SvxBorderLineStyle nStyle ) const;
+ SvxBorderLineStyle GetEntryStyle( sal_Int32 nPos ) const;
- void SelectEntry( sal_uInt16 nStyle, bool bSelect = true );
- sal_uInt16 GetSelectEntryStyle() const;
+ void SelectEntry( SvxBorderLineStyle nStyle, bool bSelect = true );
+ SvxBorderLineStyle GetSelectEntryStyle() const;
- void SetUnit( FieldUnit eNewUnit ) { eUnit = eNewUnit; }
+ void SetUnit( FieldUnit eNewUnit ) { eUnit = eNewUnit; }
- void SetSourceUnit( FieldUnit eNewUnit ) { eSourceUnit = eNewUnit; }
+ void SetSourceUnit( FieldUnit eNewUnit ) { eSourceUnit = eNewUnit; }
void SetColor( const Color& rColor );
const Color& GetColor() const { return aColor; }
diff --git a/include/svx/framelink.hxx b/include/svx/framelink.hxx
index 7520faf6ca21..eacf64633d73 100644
--- a/include/svx/framelink.hxx
+++ b/include/svx/framelink.hxx
@@ -110,10 +110,10 @@ public:
/** Constructs an invisible frame style. */
explicit Style();
/** Constructs a frame style with passed line widths. */
- explicit Style( double nP, double nD, double nS, editeng::SvxBorderStyle nType );
+ explicit Style( double nP, double nD, double nS, SvxBorderLineStyle nType );
/** Constructs a frame style with passed color and line widths. */
explicit 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 );
/** Constructs a frame style from the passed SvxBorderLine struct. Clears the style, if pBorder is 0. */
explicit Style( const editeng::SvxBorderLine* pBorder, double fScale = 1.0 );
@@ -127,7 +127,7 @@ public:
double Secn() const { return mfSecn; }
double PatternScale() const { return mfPatternScale;}
void SetPatternScale( double fScale );
- editeng::SvxBorderStyle Type() const { return mnType; }
+ SvxBorderLineStyle Type() const { return mnType; }
/** Returns the total width of this frame style. */
double GetWidth() const { return mfPrim + mfDist + mfSecn; }
@@ -150,7 +150,7 @@ public:
void SetColorPrim( const Color& rColor ) { maColorPrim = rColor; }
void SetColorSecn( const Color& rColor ) { maColorSecn = rColor; }
/** Sets whether to use dotted style for single hair lines. */
- void SetType( editeng::SvxBorderStyle nType ) { mnType = nType; }
+ void SetType( SvxBorderLineStyle nType ) { mnType = nType; }
/** Mirrors this style (exchanges primary and secondary), if it is a double frame style. */
Style& MirrorSelf();
@@ -166,8 +166,8 @@ private:
double mfPrim; /// Width of primary (single, left, or top) line.
double mfDist; /// Distance between primary and secondary line.
double mfSecn; /// Width of secondary (right or bottom) line.
- double mfPatternScale; /// Scale used for line pattern spacing.
- editeng::SvxBorderStyle mnType;
+ double mfPatternScale; /// Scale used for line pattern spacing.
+ SvxBorderLineStyle mnType;
};
bool operator==( const Style& rL, const Style& rR );
diff --git a/include/svx/frmsel.hxx b/include/svx/frmsel.hxx
index cbe6f7186bea..3221512f8c44 100644
--- a/include/svx/frmsel.hxx
+++ b/include/svx/frmsel.hxx
@@ -121,7 +121,7 @@ public:
/** Returns true, if all visible frame borders have equal widths.
@descr Ignores hidden and "don't care" frame borders. On success,
returns the width in the passed parameter. */
- bool GetVisibleWidth( long& rnWidth, editeng::SvxBorderStyle& rnStyle ) const;
+ bool GetVisibleWidth( long& rnWidth, SvxBorderLineStyle& rnStyle ) const;
/** Returns true, if all visible frame borders have equal color.
@descr Ignores hidden and "don't care" frame borders. On success,
returns the color in the passed parameter. */
@@ -149,7 +149,7 @@ public:
void SelectAllVisibleBorders();
/** Sets the passed line widths to all selected frame borders (in twips). */
- void SetStyleToSelection( long nWidth, editeng::SvxBorderStyle nStyle );
+ void SetStyleToSelection( long nWidth, SvxBorderLineStyle nStyle );
/** Sets the passed color to all selected frame borders. */
void SetColorToSelection( const Color& rColor );
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);
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index e7aea5c78439..d3b07489413b 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -596,7 +596,7 @@ void SdDrawDocument::CreateDefaultCellStyles()
Color aWhite( COL_WHITE );
::editeng::SvxBorderLine aBorderLine(
- &aWhite, 1, table::BorderLineStyle::SOLID);
+ &aWhite, 1, SvxBorderLineStyle::SOLID);
SvxBoxItem aBoxItem( SDRATTR_TABLE_BORDER );
aBoxItem.SetLine( &aBorderLine, SvxBoxItemLine::TOP );
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 5109ad69ace5..d13af25aee57 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -42,6 +42,7 @@
#include <vcl/fontcapabilities.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <editeng/borderline.hxx>
#include <com/sun/star/table/BorderLineStyle.hpp>
@@ -208,10 +209,10 @@ private:
Color ( *m_pColorDistFn )( Color, Color );
long m_nMinWidth;
- sal_uInt16 m_nStyle;
+ SvxBorderLineStyle m_nStyle;
public:
- ImpLineListData( BorderWidthImpl aWidthImpl, sal_uInt16 nStyle,
+ ImpLineListData( BorderWidthImpl aWidthImpl, SvxBorderLineStyle nStyle,
long nMinWidth,
Color ( *pColor1Fn ) ( Color ),
Color ( *pColor2Fn ) ( Color ),
@@ -232,11 +233,11 @@ public:
/** Returns the minimum width in twips */
long GetMinWidth( ) { return m_nMinWidth;}
- sal_uInt16 GetStyle( ) { return m_nStyle;}
+ SvxBorderLineStyle GetStyle( ) { return m_nStyle;}
};
ImpLineListData::ImpLineListData( BorderWidthImpl aWidthImpl,
- sal_uInt16 nStyle, long nMinWidth, Color ( *pColor1Fn )( Color ),
+ SvxBorderLineStyle nStyle, long nMinWidth, Color ( *pColor1Fn )( Color ),
Color ( *pColor2Fn )( Color ), Color ( *pColorDistFn )( Color, Color ) ) :
m_aWidthImpl( aWidthImpl ),
m_pColor1Fn( pColor1Fn ),
@@ -263,9 +264,9 @@ Color ImpLineListData::GetColorDist( const Color& rMain, const Color& rDefault )
return ( *m_pColorDistFn )( rMain, rDefault );
}
-sal_uInt16 LineListBox::GetSelectEntryStyle() const
+SvxBorderLineStyle LineListBox::GetSelectEntryStyle() const
{
- sal_uInt16 nStyle = css::table::BorderLineStyle::SOLID;
+ SvxBorderLineStyle nStyle = SvxBorderLineStyle::SOLID;
sal_Int32 nPos = GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -278,7 +279,7 @@ sal_uInt16 LineListBox::GetSelectEntryStyle() const
}
-void lclDrawPolygon( OutputDevice& rDev, const basegfx::B2DPolygon& rPolygon, long nWidth, sal_uInt16 nDashing )
+void lclDrawPolygon( OutputDevice& rDev, const basegfx::B2DPolygon& rPolygon, long nWidth, SvxBorderLineStyle nDashing )
{
AntialiasingFlags nOldAA = rDev.GetAntialiasing();
rDev.SetAntialiasing( nOldAA & ~AntialiasingFlags::EnableB2dDraw );
@@ -319,30 +320,30 @@ namespace svtools {
/**
* Dashing array must start with a line width and end with a blank width.
*/
-std::vector<double> GetDashing( sal_uInt16 nDashing )
+std::vector<double> GetDashing( SvxBorderLineStyle nDashing )
{
std::vector<double> aPattern;
switch (nDashing)
{
- case css::table::BorderLineStyle::DOTTED:
+ case SvxBorderLineStyle::DOTTED:
aPattern.push_back( 1.0 ); // line
aPattern.push_back( 2.0 ); // blank
break;
- case css::table::BorderLineStyle::DASHED:
+ case SvxBorderLineStyle::DASHED:
aPattern.push_back( 16.0 ); // line
aPattern.push_back( 5.0 ); // blank
break;
- case css::table::BorderLineStyle::FINE_DASHED:
+ case SvxBorderLineStyle::FINE_DASHED:
aPattern.push_back( 6.0 ); // line
aPattern.push_back( 2.0 ); // blank
break;
- case css::table::BorderLineStyle::DASH_DOT:
+ case SvxBorderLineStyle::DASH_DOT:
aPattern.push_back( 16.0 ); // line
aPattern.push_back( 5.0 ); // blank
aPattern.push_back( 5.0 ); // line
aPattern.push_back( 5.0 ); // blank
break;
- case css::table::BorderLineStyle::DASH_DOT_DOT:
+ case SvxBorderLineStyle::DASH_DOT_DOT:
aPattern.push_back( 16.0 ); // line
aPattern.push_back( 5.0 ); // blank
aPattern.push_back( 5.0 ); // line
@@ -372,14 +373,14 @@ public:
}
-std::vector<double> GetLineDashing( sal_uInt16 nDashing, double fScale )
+std::vector<double> GetLineDashing( SvxBorderLineStyle nDashing, double fScale )
{
std::vector<double> aPattern = GetDashing(nDashing);
std::for_each(aPattern.begin(), aPattern.end(), ApplyScale(fScale));
return aPattern;
}
-basegfx::B2DPolyPolygon ApplyLineDashing( const basegfx::B2DPolygon& rPolygon, sal_uInt16 nDashing, double fScale )
+basegfx::B2DPolyPolygon ApplyLineDashing( const basegfx::B2DPolygon& rPolygon, SvxBorderLineStyle nDashing, double fScale )
{
std::vector<double> aPattern = GetDashing(nDashing);
std::for_each(aPattern.begin(), aPattern.end(), ApplyScale(fScale));
@@ -395,14 +396,14 @@ basegfx::B2DPolyPolygon ApplyLineDashing( const basegfx::B2DPolygon& rPolygon, s
}
void DrawLine( OutputDevice& rDev, const Point& rP1, const Point& rP2,
- sal_uInt32 nWidth, sal_uInt16 nDashing )
+ sal_uInt32 nWidth, SvxBorderLineStyle nDashing )
{
DrawLine( rDev, basegfx::B2DPoint( rP1.X(), rP1.Y() ),
basegfx::B2DPoint( rP2.X(), rP2.Y( ) ), nWidth, nDashing );
}
void DrawLine( OutputDevice& rDev, const basegfx::B2DPoint& rP1, const basegfx::B2DPoint& rP2,
- sal_uInt32 nWidth, sal_uInt16 nDashing )
+ sal_uInt32 nWidth, SvxBorderLineStyle nDashing )
{
basegfx::B2DPolygon aPolygon;
aPolygon.append( rP1 );
@@ -414,7 +415,7 @@ void DrawLine( OutputDevice& rDev, const basegfx::B2DPoint& rP1, const basegfx::
void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance,
Color aColor1, Color aColor2, Color aColorDist,
- sal_uInt16 nStyle, Bitmap& rBmp )
+ SvxBorderLineStyle nStyle, Bitmap& rBmp )
{
//TODO, rather than including the " " text to force
//the line height, better would be do drop
@@ -472,7 +473,7 @@ void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance,
{
double y2 = n1 + nDist + double( n2 ) / 2;
aVirDev->SetFillColor( aColor2 );
- svtools::DrawLine( *aVirDev.get(), basegfx::B2DPoint( 0, y2 ), basegfx::B2DPoint( aSize.Width(), y2 ), n2, css::table::BorderLineStyle::SOLID );
+ svtools::DrawLine( *aVirDev.get(), basegfx::B2DPoint( 0, y2 ), basegfx::B2DPoint( aSize.Width(), y2 ), n2, SvxBorderLineStyle::SOLID );
}
rBmp = aVirDev->GetBitmap( Point(), Size( aSize.Width(), n1+nDist+n2 ) );
}
@@ -553,7 +554,7 @@ sal_Int32 LineListBox::GetStylePos( sal_Int32 nListPos, long nWidth )
return nPos;
}
-void LineListBox::SelectEntry( sal_uInt16 nStyle, bool bSelect )
+void LineListBox::SelectEntry( SvxBorderLineStyle nStyle, bool bSelect )
{
sal_Int32 nPos = GetEntryPos( nStyle );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
@@ -561,7 +562,7 @@ void LineListBox::SelectEntry( sal_uInt16 nStyle, bool bSelect )
}
void LineListBox::InsertEntry(
- const BorderWidthImpl& rWidthImpl, sal_uInt16 nStyle, long nMinWidth,
+ const BorderWidthImpl& rWidthImpl, SvxBorderLineStyle nStyle, long nMinWidth,
ColorFunc pColor1Fn, ColorFunc pColor2Fn, ColorDistFunc pColorDistFn )
{
ImpLineListData* pData = new ImpLineListData(
@@ -569,9 +570,9 @@ void LineListBox::InsertEntry(
pLineList->push_back( pData );
}
-sal_Int32 LineListBox::GetEntryPos( sal_uInt16 nStyle ) const
+sal_Int32 LineListBox::GetEntryPos( SvxBorderLineStyle nStyle ) const
{
- if(nStyle == css::table::BorderLineStyle::NONE && !m_sNone.isEmpty())
+ if(nStyle == SvxBorderLineStyle::NONE && !m_sNone.isEmpty())
return 0;
for ( size_t i = 0, n = pLineList->size(); i < n; ++i ) {
ImpLineListData* pData = (*pLineList)[ i ];
@@ -589,10 +590,10 @@ sal_Int32 LineListBox::GetEntryPos( sal_uInt16 nStyle ) const
return LISTBOX_ENTRY_NOTFOUND;
}
-sal_uInt16 LineListBox::GetEntryStyle( sal_Int32 nPos ) const
+SvxBorderLineStyle LineListBox::GetEntryStyle( sal_Int32 nPos ) const
{
ImpLineListData* pData = (0 <= nPos && static_cast<size_t>(nPos) < pLineList->size()) ? (*pLineList)[ nPos ] : nullptr;
- return ( pData ) ? pData->GetStyle() : css::table::BorderLineStyle::NONE;
+ return ( pData ) ? pData->GetStyle() : SvxBorderLineStyle::NONE;
}
void LineListBox::UpdatePaintLineColor()
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 )
{
diff --git a/sw/inc/fmtclds.hxx b/sw/inc/fmtclds.hxx
index 0b904800de38..e493ed087935 100644
--- a/sw/inc/fmtclds.hxx
+++ b/sw/inc/fmtclds.hxx
@@ -65,7 +65,7 @@ enum SwColLineAdj
class SW_DLLPUBLIC SwFormatCol : public SfxPoolItem
{
- editeng::SvxBorderStyle m_eLineStyle; ///< style of the separator line
+ SvxBorderLineStyle m_eLineStyle; ///< style of the separator line
sal_uLong m_nLineWidth; ///< Width of the separator line.
Color m_aLineColor; ///< Color of the separator line.
@@ -112,7 +112,7 @@ public:
SwColumns &GetColumns() { return m_aColumns; }
sal_uInt16 GetNumCols() const { return m_aColumns.size(); }
- editeng::SvxBorderStyle GetLineStyle() const { return m_eLineStyle;}
+ SvxBorderLineStyle GetLineStyle() const { return m_eLineStyle;}
sal_uLong GetLineWidth() const { return m_nLineWidth;}
const Color& GetLineColor() const { return m_aLineColor;}
@@ -125,7 +125,7 @@ public:
@return smallest width if bMin is true. */
sal_uInt16 GetGutterWidth( bool bMin = false ) const;
- void SetLineStyle(editeng::SvxBorderStyle eStyle) { m_eLineStyle = eStyle;}
+ void SetLineStyle(SvxBorderLineStyle eStyle) { m_eLineStyle = eStyle;}
void SetLineWidth(sal_uLong nLWidth) { m_nLineWidth = nLWidth;}
void SetLineColor(const Color& rCol ) { m_aLineColor = rCol;}
void SetLineHeight( sal_uInt8 nNew ) { m_nLineHeight = nNew; }
diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index c259e37ce64d..49ac0c92d8ad 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -49,7 +49,7 @@ class SW_DLLPUBLIC SwPageFootnoteInfo
private:
SwTwips m_nMaxHeight; ///< maximum height of the footnote area.
sal_uLong m_nLineWidth; ///< width of separator line
- editeng::SvxBorderStyle m_eLineStyle; ///< Style of the separator line
+ SvxBorderLineStyle m_eLineStyle; ///< Style of the separator line
Color m_LineColor; ///< color of the separator line
Fraction m_Width; ///< percentage width of the separator line.
css::text::HorizontalAdjust m_eAdjust; ///< line adjustment.
@@ -60,7 +60,7 @@ public:
SwTwips GetHeight() const { return m_nMaxHeight; }
sal_uLong GetLineWidth() const { return m_nLineWidth; }
const Color& GetLineColor() const { return m_LineColor;}
- editeng::SvxBorderStyle GetLineStyle() const { return m_eLineStyle; }
+ SvxBorderLineStyle GetLineStyle() const { return m_eLineStyle; }
const Fraction& GetWidth() const { return m_Width; }
css::text::HorizontalAdjust GetAdj() const { return m_eAdjust; }
SwTwips GetTopDist() const { return m_nTopDist; }
@@ -68,7 +68,7 @@ public:
void SetHeight(SwTwips const nNew) { m_nMaxHeight = nNew; }
void SetLineWidth(sal_uLong const nSet) { m_nLineWidth = nSet; }
- void SetLineStyle(editeng::SvxBorderStyle const eSet) {m_eLineStyle = eSet;}
+ void SetLineStyle(SvxBorderLineStyle const eSet) {m_eLineStyle = eSet;}
void SetLineColor(const Color& rCol) { m_LineColor = rCol;}
void SetWidth(const Fraction & rNew) { m_Width = rNew; }
void SetAdj(css::text::HorizontalAdjust const eNew) { m_eAdjust = eNew; }
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index d495d85698ad..9ee0154171b0 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -1028,7 +1028,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
{
SvxBoxItem aBox( RES_BOX );
Color aColor( COL_GRAY );
- SvxBorderLine aNew(&aColor, 1, table::BorderLineStyle::DOUBLE);
+ SvxBorderLine aNew(&aColor, 1, SvxBorderLineStyle::DOUBLE);
aBox.SetLine( &aNew, SvxBoxItemLine::BOTTOM );
aSet.Put( aBox );
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index c0269df09910..a30650c3bdd4 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -121,7 +121,7 @@ static void lcl_SetDfltBoxAttr( SwFrameFormat& rFormat, sal_uInt8 nId )
SvxBorderLine aLine( &aCol, DEF_LINE_WIDTH_0 );
if ( bHTML )
{
- aLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
+ aLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
aLine.SetWidth( DEF_LINE_WIDTH_0 );
}
SvxBoxItem aBox(RES_BOX);
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index b3dd522da1e3..9a094f7dacce 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -553,27 +553,27 @@ bool SwAutoFormat::DoUnderline()
switch( eState )
{
case 1: // single, 0.05 pt
- aLine.SetBorderLineStyle(table::BorderLineStyle::SOLID);
+ aLine.SetBorderLineStyle(SvxBorderLineStyle::SOLID);
aLine.SetWidth( DEF_LINE_WIDTH_0 );
break;
case 2: // single, 1.0 pt
- aLine.SetBorderLineStyle(table::BorderLineStyle::SOLID);
+ aLine.SetBorderLineStyle(SvxBorderLineStyle::SOLID);
aLine.SetWidth( DEF_LINE_WIDTH_1 );
break;
case 3: // double, 1.0 pt
- aLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
+ aLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
aLine.SetWidth( DEF_LINE_WIDTH_1 );
break;
case 4: // double (thick/thin), 4.0 pt
- aLine.SetBorderLineStyle(table::BorderLineStyle::THICKTHIN_SMALLGAP);
+ aLine.SetBorderLineStyle(SvxBorderLineStyle::THICKTHIN_SMALLGAP);
aLine.SetWidth( DEF_LINE_WIDTH_3 );
break;
case 5: // double (thin/thick), 4.0 pt
- aLine.SetBorderLineStyle(table::BorderLineStyle::THINTHICK_SMALLGAP);
+ aLine.SetBorderLineStyle(SvxBorderLineStyle::THINTHICK_SMALLGAP);
aLine.SetWidth( DEF_LINE_WIDTH_3 );
break;
case 6: // double, 2.5 pt
- aLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
+ aLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
aLine.SetWidth( DEF_LINE_WIDTH_2 );
break;
}
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 25d733db62a2..83c98a5a5126 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -394,7 +394,7 @@ public:
const bool bOnlyTextBackground = false ) const;
void PaintBorderLine( const SwRect&, const SwRect&, const SwPageFrame*,
const Color *pColor,
- const editeng::SvxBorderStyle = css::table::BorderLineStyle::SOLID ) const;
+ const SvxBorderLineStyle = SvxBorderLineStyle::SOLID ) const;
drawinglayer::processor2d::BaseProcessor2D * CreateProcessor2D( ) const;
void ProcessPrimitives( const drawinglayer::primitive2d::Primitive2DContainer& rSequence ) const;
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index b3306a0d3563..dacb82753760 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -841,7 +841,7 @@ SwFormatCol& SwFormatCol::operator=( const SwFormatCol& rCpy )
SwFormatCol::SwFormatCol()
: SfxPoolItem( RES_COL )
- , m_eLineStyle( table::BorderLineStyle::NONE)
+ , m_eLineStyle( SvxBorderLineStyle::NONE)
,
m_nLineWidth(0),
m_nLineHeight( 100 ),
@@ -1100,10 +1100,10 @@ bool SwFormatCol::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
switch ( pSwColums->GetSepLineStyle() )
{
default:
- case 0: m_eLineStyle = table::BorderLineStyle::NONE; break;
- case 1: m_eLineStyle = table::BorderLineStyle::SOLID; break;
- case 2: m_eLineStyle = table::BorderLineStyle::DOTTED; break;
- case 3: m_eLineStyle = table::BorderLineStyle::DASHED; break;
+ case 0: m_eLineStyle = SvxBorderLineStyle::NONE; break;
+ case 1: m_eLineStyle = SvxBorderLineStyle::SOLID; break;
+ case 2: m_eLineStyle = SvxBorderLineStyle::DOTTED; break;
+ case 3: m_eLineStyle = SvxBorderLineStyle::DASHED; break;
}
if(!pSwColums->GetSepLineIsOn())
m_eAdj = COLADJ_NONE;
@@ -1124,7 +1124,7 @@ void SwFormatCol::dumpAsXml(xmlTextWriterPtr pWriter) const
{
xmlTextWriterStartElement(pWriter, BAD_CAST("SwFormatCol"));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eLineStyle"), BAD_CAST(OString::number(m_eLineStyle).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eLineStyle"), BAD_CAST(OString::number((sal_Int16)m_eLineStyle).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nLineWidth"), BAD_CAST(OString::number(m_nLineWidth).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("aLineColor"), BAD_CAST(m_aLineColor.AsRGBHexString().toUtf8().getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nLineHeight"), BAD_CAST(OString::number(m_nLineHeight).getStr()));
diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx
index 0644928619a9..7ce20eadb2cf 100644
--- a/sw/source/core/layout/pagedesc.cxx
+++ b/sw/source/core/layout/pagedesc.cxx
@@ -377,7 +377,7 @@ SwPageDesc* SwPageDesc::GetByName(SwDoc& rDoc, const OUString& rName)
SwPageFootnoteInfo::SwPageFootnoteInfo()
: m_nMaxHeight( 0 )
, m_nLineWidth(10)
- , m_eLineStyle( table::BorderLineStyle::SOLID )
+ , m_eLineStyle( SvxBorderLineStyle::SOLID )
, m_Width( 25, 100 )
, m_nTopDist( 57 ) //1mm
, m_nBottomDist( 57 )
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 8841a2de4a0a..69510b6aa757 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -145,17 +145,17 @@ namespace o3tl {
class SwLineRect : public SwRect
{
Color aColor;
- SvxBorderStyle nStyle;
+ SvxBorderLineStyle nStyle;
const SwTabFrame *pTab;
SubColFlags nSubColor; //colorize subsidiary lines
bool bPainted; //already painted?
sal_uInt8 nLock; //To distinguish the line and the hell layer.
public:
- SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyle,
+ SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderLineStyle nStyle,
const SwTabFrame *pT , const SubColFlags nSCol );
const Color& GetColor() const { return aColor;}
- SvxBorderStyle GetStyle() const { return nStyle; }
+ SvxBorderLineStyle GetStyle() const { return nStyle; }
const SwTabFrame *GetTab() const { return pTab; }
void SetPainted() { bPainted = true; }
void Lock( bool bLock ) { if ( bLock )
@@ -198,7 +198,7 @@ public:
dummy_function();
#endif
}
- void AddLineRect( const SwRect& rRect, const Color *pColor, const SvxBorderStyle nStyle,
+ void AddLineRect( const SwRect& rRect, const Color *pColor, const SvxBorderLineStyle nStyle,
const SwTabFrame *pTab, const SubColFlags nSCol, SwPaintProperties &properties );
void ConnectEdges( OutputDevice *pOut, SwPaintProperties &properties );
void PaintLines ( OutputDevice *pOut, SwPaintProperties &properties );
@@ -625,7 +625,7 @@ void BorderLines::AddBorderLine(
m_Lines.push_back(xLine);
}
-SwLineRect::SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyl,
+SwLineRect::SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderLineStyle nStyl,
const SwTabFrame *pT, const SubColFlags nSCol ) :
SwRect( rRect ),
nStyle( nStyl ),
@@ -675,7 +675,7 @@ bool SwLineRect::MakeUnion( const SwRect &rRect, SwPaintProperties& properties)
return false;
}
-void SwLineRects::AddLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyle,
+void SwLineRects::AddLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderLineStyle nStyle,
const SwTabFrame *pTab, const SubColFlags nSCol, SwPaintProperties& properties )
{
// Loop backwards because lines which can be combined, can usually be painted
@@ -800,7 +800,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut, SwPaintProperties& propertie
if ( !rL1.IsInside( aIns ) )
continue;
aLineRects.push_back( SwLineRect( aIns, &rL1.GetColor(),
- table::BorderLineStyle::SOLID,
+ SvxBorderLineStyle::SOLID,
rL1.GetTab(), SubColFlags::Tab ) );
if ( isFull() )
{
@@ -841,7 +841,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut, SwPaintProperties& propertie
if ( !rL1.IsInside( aIns ) )
continue;
aLineRects.push_back( SwLineRect( aIns, &rL1.GetColor(),
- table::BorderLineStyle::SOLID,
+ SvxBorderLineStyle::SOLID,
rL1.GetTab(), SubColFlags::Tab ) );
if ( isFull() )
{
@@ -2668,7 +2668,7 @@ void SwTabFramePainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) cons
if (isTableBoundariesEnabled() && gProp.pSGlobalShell->GetWin())
aStyles[ 0 ].Set( rCol, rCol, rCol, false, 1, 0, 0 );
else
- aStyles[0].SetType(table::BorderLineStyle::NONE);
+ aStyles[0].SetType(SvxBorderLineStyle::NONE);
}
else
pTmpColor = pHCColor;
@@ -4650,7 +4650,7 @@ void SwFrame::PaintBorderLine( const SwRect& rRect,
const SwRect& rOutRect,
const SwPageFrame * pPage,
const Color *pColor,
- const SvxBorderStyle nStyle ) const
+ const SvxBorderLineStyle nStyle ) const
{
if ( !rOutRect.IsOver( rRect ) )
return;
@@ -5588,7 +5588,7 @@ void SwFootnoteContFrame::PaintLine( const SwRect& rRect,
nX), Size( nLineWidth, nWidth ) )
: SwRect( Point( nX, Frame().Pos().Y() + rInf.GetTopDist() ),
Size( nWidth, rInf.GetLineWidth()));
- if ( aLineRect.HasArea() && rInf.GetLineStyle() != css::table::BorderLineStyle::NONE)
+ if ( aLineRect.HasArea() && rInf.GetLineStyle() != SvxBorderLineStyle::NONE)
PaintBorderLine( rRect, aLineRect , pPage, &rInf.GetLineColor(),
rInf.GetLineStyle() );
}
@@ -6868,7 +6868,7 @@ static void lcl_RefreshLine( const SwLayoutFrame *pLay,
SwRect aRect( aP1, aP2 );
// OD 18.11.2002 #99672# - use parameter <pSubsLines> instead of
// global variable <gProp.pSSubsLines>.
- pSubsLines->AddLineRect( aRect, nullptr, table::BorderLineStyle::SOLID,
+ pSubsLines->AddLineRect( aRect, nullptr, SvxBorderLineStyle::SOLID,
nullptr, nSubColor, gProp );
}
aP1 = aP2;
@@ -7178,14 +7178,14 @@ void SwLayoutFrame::PaintSubsidiaryLines( const SwPageFrame *pPage,
{
const SwRect aRect( aOut.Pos(), aLB );
pUsedSubsLines->AddLineRect( aRect, nullptr,
- table::BorderLineStyle::SOLID, nullptr, nSubColor, gProp );
+ SvxBorderLineStyle::SOLID, nullptr, nSubColor, gProp );
}
// OD 14.11.2002 #104821# - in vertical layout set page/column break at right
if ( aOriginal.Right() == nRight )
{
const SwRect aRect( aRT, aRB );
pUsedSubsLines->AddLineRect( aRect, nullptr,
- table::BorderLineStyle::SOLID, nullptr, nSubColor, gProp );
+ SvxBorderLineStyle::SOLID, nullptr, nSubColor, gProp );
}
}
// OD 14.11.2002 #104822# - adjust control for drawing top and bottom lines
@@ -7196,13 +7196,13 @@ void SwLayoutFrame::PaintSubsidiaryLines( const SwPageFrame *pPage,
// OD 14.11.2002 #104821# - in horizontal layout set page/column break at top
const SwRect aRect( aOut.Pos(), aRT );
pUsedSubsLines->AddLineRect( aRect, nullptr,
- table::BorderLineStyle::SOLID, nullptr, nSubColor, gProp );
+ SvxBorderLineStyle::SOLID, nullptr, nSubColor, gProp );
}
if ( aOriginal.Bottom() == nBottom )
{
const SwRect aRect( aLB, aRB );
pUsedSubsLines->AddLineRect( aRect, nullptr,
- table::BorderLineStyle::SOLID, nullptr, nSubColor, gProp );
+ SvxBorderLineStyle::SOLID, nullptr, nSubColor, gProp );
}
}
}
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index ab4e5a5a6926..a93842984e58 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -2336,9 +2336,9 @@ SwXTextColumns::SwXTextColumns(const SwFormatCol& rFormatCol) :
sal_Int8 nStyle = API_COL_LINE_NONE;
switch (rFormatCol.GetLineStyle())
{
- case table::BorderLineStyle::SOLID: nStyle = API_COL_LINE_SOLID; break;
- case table::BorderLineStyle::DOTTED: nStyle= API_COL_LINE_DOTTED; break;
- case table::BorderLineStyle::DASHED: nStyle= API_COL_LINE_DASHED; break;
+ case SvxBorderLineStyle::SOLID: nStyle = API_COL_LINE_SOLID; break;
+ case SvxBorderLineStyle::DOTTED: nStyle= API_COL_LINE_DOTTED; break;
+ case SvxBorderLineStyle::DASHED: nStyle= API_COL_LINE_DASHED; break;
default: break;
}
nSepLineStyle = nStyle;
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 23a26c681d3f..9267ed93ffc5 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -200,7 +200,7 @@ static bool lcl_LineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSv
{
rSvxLine.SetColor(Color(rLine.Color));
- rSvxLine.GuessLinesWidths( table::BorderLineStyle::NONE,
+ rSvxLine.GuessLinesWidths( SvxBorderLineStyle::NONE,
convertMm100ToTwip( rLine.OuterLineWidth ),
convertMm100ToTwip( rLine.InnerLineWidth ),
convertMm100ToTwip( rLine.LineDistance ) );
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 7ffb743014b8..bfe7e6b74dcc 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -3333,34 +3333,34 @@ static void OutCSS1_SvxBorderLine( SwHTMLWriter& rHTMLWrt,
sOut.append(' ');
switch (pLine->GetBorderLineStyle())
{
- case table::BorderLineStyle::SOLID:
+ case SvxBorderLineStyle::SOLID:
sOut.append(sCSS1_PV_solid);
break;
- case table::BorderLineStyle::DOTTED:
+ case SvxBorderLineStyle::DOTTED:
sOut.append(sCSS1_PV_dotted);
break;
- case table::BorderLineStyle::DASHED:
+ case SvxBorderLineStyle::DASHED:
sOut.append(sCSS1_PV_dashed);
break;
- 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:
+ case SvxBorderLineStyle::DOUBLE:
+ case SvxBorderLineStyle::THINTHICK_SMALLGAP:
+ case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
+ case SvxBorderLineStyle::THINTHICK_LARGEGAP:
+ case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
+ case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
+ case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
sOut.append(sCSS1_PV_double);
break;
- case table::BorderLineStyle::EMBOSSED:
+ case SvxBorderLineStyle::EMBOSSED:
sOut.append(sCSS1_PV_ridge);
break;
- case table::BorderLineStyle::ENGRAVED:
+ case SvxBorderLineStyle::ENGRAVED:
sOut.append(sCSS1_PV_groove);
break;
- case table::BorderLineStyle::INSET:
+ case SvxBorderLineStyle::INSET:
sOut.append(sCSS1_PV_inset);
break;
- case table::BorderLineStyle::OUTSET:
+ case SvxBorderLineStyle::OUTSET:
sOut.append(sCSS1_PV_outset);
break;
default:
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index bb2296e9eaa7..7faf6a253c1b 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -970,7 +970,7 @@ void HTMLTable::InitCtor( const HTMLTableOptions *pOptions )
if ( pOptions->nCellSpacing != 0 )
{
- m_aTopBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
+ m_aTopBorderLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
}
m_aTopBorderLine.SetWidth( nPHeight );
m_aTopBorderLine.SetColor( rBorderColor );
@@ -984,7 +984,7 @@ void HTMLTable::InitCtor( const HTMLTableOptions *pOptions )
{
if ( pOptions->nCellSpacing != 0 )
{
- m_aLeftBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
+ m_aLeftBorderLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
}
m_aLeftBorderLine.SetWidth( nPWidth );
m_aLeftBorderLine.SetColor( rBorderColor );
@@ -993,7 +993,7 @@ void HTMLTable::InitCtor( const HTMLTableOptions *pOptions )
if( pOptions->nCellSpacing != 0 )
{
- m_aBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
+ m_aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
m_aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
}
else
@@ -1378,8 +1378,7 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox,
sal_uInt16 nBorderWidth = m_aBorderLine.GetOutWidth();
nBorderWidth *= (nEmptyRows + 1);
- aThickBorderLine.SetBorderLineStyle(
- table::BorderLineStyle::SOLID);
+ aThickBorderLine.SetBorderLineStyle(SvxBorderLineStyle::SOLID);
aThickBorderLine.SetWidth( nBorderWidth );
aBoxItem.SetLine( &aThickBorderLine, SvxBoxItemLine::BOTTOM );
}
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index f2c33fef1bed..16062a05047e 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -323,31 +323,31 @@ void SvxCSS1BorderInfo::SetBorderLine( SvxBoxItemLine nLine, SvxBoxItem &rBoxIte
switch ( eStyle )
{
case CSS1_BS_SINGLE:
- aBorderLine.SetBorderLineStyle(table::BorderLineStyle::SOLID);
+ aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::SOLID);
break;
case CSS1_BS_DOUBLE:
- aBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
+ aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
break;
case CSS1_BS_DOTTED:
- aBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOTTED);
+ aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::DOTTED);
break;
case CSS1_BS_DASHED:
- aBorderLine.SetBorderLineStyle(table::BorderLineStyle::DASHED);
+ aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::DASHED);
break;
case CSS1_BS_GROOVE:
- aBorderLine.SetBorderLineStyle(table::BorderLineStyle::ENGRAVED);
+ aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::ENGRAVED);
break;
case CSS1_BS_RIDGE:
- aBorderLine.SetBorderLineStyle(table::BorderLineStyle::EMBOSSED);
+ aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::EMBOSSED);
break;
case CSS1_BS_INSET:
- aBorderLine.SetBorderLineStyle(table::BorderLineStyle::INSET);
+ aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::INSET);
break;
case CSS1_BS_OUTSET:
- aBorderLine.SetBorderLineStyle(table::BorderLineStyle::OUTSET);
+ aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::OUTSET);
break;
default:
- aBorderLine.SetBorderLineStyle(table::BorderLineStyle::NONE);
+ aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::NONE);
break;
}
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index e4f63e2d5b52..49f9e7ee4f05 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -5260,7 +5260,7 @@ void SwHTMLParser::InsertHorzRule()
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
if ( !bNoShade )
{
- aBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
+ aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
}
aBorderLine.SetWidth( nPHeight );
}
@@ -5270,7 +5270,7 @@ void SwHTMLParser::InsertHorzRule()
}
else
{
- aBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
+ aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
}
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 24ccdb069299..c4057cd4766b 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2636,52 +2636,52 @@ static void impl_borderLine( FSHelperPtr const & pSerializer, sal_Int32 elementT
{
switch (pBorderLine->GetBorderLineStyle())
{
- case table::BorderLineStyle::SOLID:
+ case SvxBorderLineStyle::SOLID:
pVal = "single";
break;
- case table::BorderLineStyle::DOTTED:
+ case SvxBorderLineStyle::DOTTED:
pVal = "dotted";
break;
- case table::BorderLineStyle::DASHED:
+ case SvxBorderLineStyle::DASHED:
pVal = "dashed";
break;
- case table::BorderLineStyle::DOUBLE:
+ case SvxBorderLineStyle::DOUBLE:
pVal = "double";
break;
- case table::BorderLineStyle::THINTHICK_SMALLGAP:
+ case SvxBorderLineStyle::THINTHICK_SMALLGAP:
pVal = "thinThickSmallGap";
break;
- case table::BorderLineStyle::THINTHICK_MEDIUMGAP:
+ case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
pVal = "thinThickMediumGap";
break;
- case table::BorderLineStyle::THINTHICK_LARGEGAP:
+ case SvxBorderLineStyle::THINTHICK_LARGEGAP:
pVal = "thinThickLargeGap";
break;
- case table::BorderLineStyle::THICKTHIN_SMALLGAP:
+ case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
pVal = "thickThinSmallGap";
break;
- case table::BorderLineStyle::THICKTHIN_MEDIUMGAP:
+ case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
pVal = "thickThinMediumGap";
break;
- case table::BorderLineStyle::THICKTHIN_LARGEGAP:
+ case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
pVal = "thickThinLargeGap";
break;
- case table::BorderLineStyle::EMBOSSED:
+ case SvxBorderLineStyle::EMBOSSED:
pVal = "threeDEmboss";
break;
- case table::BorderLineStyle::ENGRAVED:
+ case SvxBorderLineStyle::ENGRAVED:
pVal = "threeDEngrave";
break;
- case table::BorderLineStyle::OUTSET:
+ case SvxBorderLineStyle::OUTSET:
pVal = "outset";
break;
- case table::BorderLineStyle::INSET:
+ case SvxBorderLineStyle::INSET:
pVal = "inset";
break;
- case table::BorderLineStyle::FINE_DASHED:
+ case SvxBorderLineStyle::FINE_DASHED:
pVal = "dashSmallGap";
break;
- case table::BorderLineStyle::NONE:
+ case SvxBorderLineStyle::NONE:
default:
break;
}
@@ -2695,7 +2695,7 @@ static void impl_borderLine( FSHelperPtr const & pSerializer, sal_Int32 elementT
// if they are equal, it means that they were style-defined and there is
// no need to write them.
if( rStyleProps != nullptr && pBorderLine && !pBorderLine->isEmpty() &&
- pBorderLine->GetBorderLineStyle() == rStyleProps->LineStyle &&
+ pBorderLine->GetBorderLineStyle() == (SvxBorderLineStyle)rStyleProps->LineStyle &&
pBorderLine->GetColor() == rStyleProps->Color &&
pBorderLine->GetWidth() == convertMm100ToTwip( rStyleProps->LineWidth ) )
return;
@@ -7882,8 +7882,8 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox )
*pLeft == *pRight && *pLeft == *pTop && *pLeft == *pBottom)
{
// Check border style
- editeng::SvxBorderStyle eBorderStyle = pTop->GetBorderLineStyle();
- if (eBorderStyle == table::BorderLineStyle::NONE)
+ SvxBorderLineStyle eBorderStyle = pTop->GetBorderLineStyle();
+ if (eBorderStyle == SvxBorderLineStyle::NONE)
{
if (m_rExport.SdrExporter().getTextFrameSyntax())
{
@@ -7904,7 +7904,7 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox )
AddToAttrList( m_rExport.SdrExporter().getFlyAttrList(), 2,
XML_strokecolor, sColor.getStr(),
XML_strokeweight, sWidth.getStr() );
- if( drawing::LineStyle_DASH == pTop->GetBorderLineStyle() ) // Line Style is Dash type
+ if( SvxBorderLineStyle::DASHED == pTop->GetBorderLineStyle() ) // Line Style is Dash type
AddToAttrList( m_rExport.SdrExporter().getDashLineStyle(),
XML_dashstyle, "dash" );
}
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index c4b2e8b63dc1..291ca1c5bcd4 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -1352,7 +1352,7 @@ void DocxSdrExport::writeBoxItemLine(const SvxBoxItem& rBox)
FSEND);
pFS->endElementNS(XML_a, XML_solidFill);
- if (drawing::LineStyle_DASH == pBorderLine->GetBorderLineStyle()) // Line Style is Dash type
+ if (SvxBorderLineStyle::DASHED == pBorderLine->GetBorderLineStyle()) // Line Style is Dash type
pFS->singleElementNS(XML_a, XML_prstDash, XML_val, "dash", FSEND);
pFS->endElementNS(XML_a, XML_ln);
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 59452abc62c3..1de97d181fd8 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -92,7 +92,7 @@ static OString OutTBLBorderLine(RtfExport& rExport, const editeng::SvxBorderLine
// single line
switch (pLine->GetBorderLineStyle())
{
- case table::BorderLineStyle::SOLID:
+ case SvxBorderLineStyle::SOLID:
{
if (DEF_LINE_WIDTH_0 == pLine->GetWidth())
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRHAIR);
@@ -100,46 +100,46 @@ static OString OutTBLBorderLine(RtfExport& rExport, const editeng::SvxBorderLine
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRS);
}
break;
- case table::BorderLineStyle::DOTTED:
+ case SvxBorderLineStyle::DOTTED:
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRDOT);
break;
- case table::BorderLineStyle::DASHED:
+ case SvxBorderLineStyle::DASHED:
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRDASH);
break;
- case table::BorderLineStyle::DOUBLE:
+ case SvxBorderLineStyle::DOUBLE:
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRDB);
break;
- case table::BorderLineStyle::THINTHICK_SMALLGAP:
+ case SvxBorderLineStyle::THINTHICK_SMALLGAP:
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTNTHSG);
break;
- case table::BorderLineStyle::THINTHICK_MEDIUMGAP:
+ case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTNTHMG);
break;
- case table::BorderLineStyle::THINTHICK_LARGEGAP:
+ case SvxBorderLineStyle::THINTHICK_LARGEGAP:
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTNTHLG);
break;
- case table::BorderLineStyle::THICKTHIN_SMALLGAP:
+ case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTHTNSG);
break;
- case table::BorderLineStyle::THICKTHIN_MEDIUMGAP:
+ case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTHTNMG);
break;
- case table::BorderLineStyle::THICKTHIN_LARGEGAP:
+ case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTHTNLG);
break;
- case table::BorderLineStyle::EMBOSSED:
+ case SvxBorderLineStyle::EMBOSSED:
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDREMBOSS);
break;
- case table::BorderLineStyle::ENGRAVED:
+ case SvxBorderLineStyle::ENGRAVED:
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRENGRAVE);
break;
- case table::BorderLineStyle::OUTSET:
+ case SvxBorderLineStyle::OUTSET:
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDROUTSET);
break;
- case table::BorderLineStyle::INSET:
+ case SvxBorderLineStyle::INSET:
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRINSET);
break;
- case table::BorderLineStyle::NONE:
+ case SvxBorderLineStyle::NONE:
default:
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRNONE);
break;
@@ -3276,7 +3276,7 @@ void RtfAttributeOutput::FormatBox(const SvxBoxItem& rBox)
// We in fact need RGB to BGR, but the transformation is symmetric.
m_aFlyProperties.push_back(std::make_pair<OString, OString>("lineColor", OString::number(msfilter::util::BGRToRGB(rColor.GetColor()))));
- if (pTop->GetBorderLineStyle() != table::BorderLineStyle::NONE)
+ if (pTop->GetBorderLineStyle() != SvxBorderLineStyle::NONE)
{
double const fConverted(editeng::ConvertBorderWidthToWord(pTop->GetBorderLineStyle(), pTop->GetWidth()));
sal_Int32 nWidth = fConverted * 635; // Twips -> EMUs
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index d122ffbd1243..ad17d1b31516 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -2028,13 +2028,13 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrameFormat& rFormat,
MSO_LineDashing eDashing = mso_lineSolid;
switch (pLine->GetBorderLineStyle())
{
- case table::BorderLineStyle::DASHED:
+ case SvxBorderLineStyle::DASHED:
eDashing = mso_lineDashGEL;
break;
- case table::BorderLineStyle::DOTTED:
+ case SvxBorderLineStyle::DOTTED:
eDashing = mso_lineDotGEL;
break;
- case table::BorderLineStyle::SOLID:
+ case SvxBorderLineStyle::SOLID:
default:
break;
}
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 1f4c3e255edc..f9a55701ef61 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -3886,7 +3886,7 @@ WW8_BRCVer9 WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
// http://msdn.microsoft.com/en-us/library/dd908142%28v=office.12%29.aspx
switch (rLine.GetBorderLineStyle())
{
- case table::BorderLineStyle::SOLID:
+ case SvxBorderLineStyle::SOLID:
{
if ( rLine.GetWidth( ) == DEF_LINE_WIDTH_0 )
brcType = 5;
@@ -3894,52 +3894,52 @@ WW8_BRCVer9 WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
brcType = 1;
}
break;
- case table::BorderLineStyle::DOTTED:
+ case SvxBorderLineStyle::DOTTED:
brcType = 6;
break;
- case table::BorderLineStyle::DASHED:
+ case SvxBorderLineStyle::DASHED:
brcType = 7;
break;
- case table::BorderLineStyle::DOUBLE:
+ case SvxBorderLineStyle::DOUBLE:
brcType = 3;
break;
- case table::BorderLineStyle::THINTHICK_SMALLGAP:
+ case SvxBorderLineStyle::THINTHICK_SMALLGAP:
brcType = 11;
break;
- case table::BorderLineStyle::THINTHICK_MEDIUMGAP:
+ case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
brcType = 14;
break;
- case table::BorderLineStyle::THINTHICK_LARGEGAP:
+ case SvxBorderLineStyle::THINTHICK_LARGEGAP:
brcType = 17;
break;
- case table::BorderLineStyle::THICKTHIN_SMALLGAP:
+ case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
brcType = 12;
break;
- case table::BorderLineStyle::THICKTHIN_MEDIUMGAP:
+ case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
brcType = 15;
break;
- case table::BorderLineStyle::THICKTHIN_LARGEGAP:
+ case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
brcType = 18;
break;
- case table::BorderLineStyle::EMBOSSED:
+ case SvxBorderLineStyle::EMBOSSED:
brcType = 24;
break;
- case table::BorderLineStyle::ENGRAVED:
+ case SvxBorderLineStyle::ENGRAVED:
brcType = 25;
break;
- case table::BorderLineStyle::OUTSET:
+ case SvxBorderLineStyle::OUTSET:
brcType = 26;
break;
- case table::BorderLineStyle::INSET:
+ case SvxBorderLineStyle::INSET:
brcType = 27;
break;
- case table::BorderLineStyle::FINE_DASHED:
+ case SvxBorderLineStyle::FINE_DASHED:
brcType = 22;
break;
- case table::BorderLineStyle::DASH_DOT:
+ case SvxBorderLineStyle::DASH_DOT:
brcType = 8;
break;
- case table::BorderLineStyle::DASH_DOT_DOT:
+ case SvxBorderLineStyle::DASH_DOT_DOT:
brcType = 9;
break;
default:
@@ -3986,7 +3986,7 @@ void WW8Export::Out_BorderLine(ww::bytes& rO, const SvxBorderLine* pLine,
WW8_BRCVer9 aBrcVer9;
WW8_BRC aBrcVer8;
- if( pLine && pLine->GetBorderLineStyle() != table::BorderLineStyle::NONE )
+ if( pLine && pLine->GetBorderLineStyle() != SvxBorderLineStyle::NONE )
{
aBrcVer9 = TranslateBorderLine( *pLine, nDist, bShadow );
sal_uInt8 ico = msfilter::util::TransColToIco( msfilter::util::BGRToRGB(aBrcVer9.cv()) );
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index f88d91c87219..edc942f985a2 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1531,7 +1531,7 @@ sal_Int32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
if( !rLineThick )
return nOutsideThick;
- ::editeng::SvxBorderStyle nIdx = table::BorderLineStyle::NONE;
+ SvxBorderLineStyle nIdx = SvxBorderLineStyle::NONE;
sal_Int32 nLineThick=rLineThick;
nOutsideThick = SwMSDffManager::GetEscherLineMatch(eLineStyle,
@@ -1552,21 +1552,21 @@ sal_Int32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
{
// zuerst die Einzel-Linien
case mso_lineSimple:
- nIdx = table::BorderLineStyle::SOLID;
+ nIdx = SvxBorderLineStyle::SOLID;
break;
// dann die Doppel-Linien, fuer die wir feine Entsprechungen haben :-)))
case mso_lineDouble:
- nIdx = table::BorderLineStyle::DOUBLE;
+ nIdx = SvxBorderLineStyle::DOUBLE;
break;
case mso_lineThickThin:
- nIdx = table::BorderLineStyle::THICKTHIN_SMALLGAP;
+ nIdx = SvxBorderLineStyle::THICKTHIN_SMALLGAP;
break;
case mso_lineThinThick:
- nIdx = table::BorderLineStyle::THINTHICK_SMALLGAP;
+ nIdx = SvxBorderLineStyle::THINTHICK_SMALLGAP;
break;
// We have no triple border, use double instead.
case mso_lineTriple:
- nIdx = table::BorderLineStyle::DOUBLE;
+ nIdx = SvxBorderLineStyle::DOUBLE;
break;
// no line style is set
case (MSO_LineStyle)USHRT_MAX:
@@ -1580,16 +1580,16 @@ sal_Int32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
switch( eDashing )
{
case mso_lineDashGEL:
- nIdx = table::BorderLineStyle::DASHED;
+ nIdx = SvxBorderLineStyle::DASHED;
break;
case mso_lineDotGEL:
- nIdx = table::BorderLineStyle::DOTTED;
+ nIdx = SvxBorderLineStyle::DOTTED;
break;
default:
break;
}
- if (table::BorderLineStyle::NONE != nIdx)
+ if (SvxBorderLineStyle::NONE != nIdx)
{
SvxBorderLine aLine;
aLine.SetColor( rLineColor );
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index f421246c03f7..952975d03e43 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -1335,12 +1335,12 @@ void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace,
cv = 0xc0c0c0;
}
- ::editeng::SvxBorderStyle const eStyle(
+ SvxBorderLineStyle const eStyle(
::editeng::ConvertBorderStyleFromWord(nIdx));
::editeng::SvxBorderLine aLine;
aLine.SetBorderLineStyle( eStyle );
- double const fConverted( (table::BorderLineStyle::NONE == eStyle) ? 0.0 :
+ double const fConverted( (SvxBorderLineStyle::NONE == eStyle) ? 0.0 :
::editeng::ConvertBorderWidthFromWord(eStyle, nLineThickness, nIdx));
aLine.SetWidth(fConverted);
@@ -4890,7 +4890,7 @@ void SwWW8ImplReader::Read_CharBorder(sal_uInt16 nId, const sal_uInt8* pData, sh
SetWW8_BRC(nBrcVer, aBrc, pData);
// Border style is none -> no border, no shadow
- if( editeng::ConvertBorderStyleFromWord(aBrc.brcType()) != table::BorderLineStyle::NONE )
+ if( editeng::ConvertBorderStyleFromWord(aBrc.brcType()) != SvxBorderLineStyle::NONE )
{
Set1Border(aBoxItem, aBrc, SvxBoxItemLine::TOP, 0, nullptr, true);
Set1Border(aBoxItem, aBrc, SvxBoxItemLine::BOTTOM, 0, nullptr, true);
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index df5556215b21..acd99833b6b1 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -355,13 +355,13 @@ static bool lcl_isOdfDoubleLine( const SvxBorderLine* pLine )
bool bIsOdfDouble = false;
switch (pLine->GetBorderLineStyle())
{
- 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:
+ case SvxBorderLineStyle::DOUBLE:
+ case SvxBorderLineStyle::THINTHICK_SMALLGAP:
+ case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
+ case SvxBorderLineStyle::THINTHICK_LARGEGAP:
+ case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
+ case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
+ case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
bIsOdfDouble = true;
break;
default:
@@ -733,46 +733,46 @@ bool SvXMLExportItemMapper::QueryXMLValue(
bool bNoBorder = false;
switch (pLine->GetBorderLineStyle())
{
- case table::BorderLineStyle::SOLID:
+ case SvxBorderLineStyle::SOLID:
eStyle = XML_SOLID;
break;
- case table::BorderLineStyle::DOTTED:
+ case SvxBorderLineStyle::DOTTED:
eStyle = XML_DOTTED;
break;
- case table::BorderLineStyle::DASHED:
+ case SvxBorderLineStyle::DASHED:
eStyle = XML_DASHED;
break;
- case table::BorderLineStyle::FINE_DASHED:
+ case SvxBorderLineStyle::FINE_DASHED:
eStyle = XML_FINE_DASHED;
break;
- case table::BorderLineStyle::DASH_DOT:
+ case SvxBorderLineStyle::DASH_DOT:
eStyle = XML_DASH_DOT;
break;
- case table::BorderLineStyle::DASH_DOT_DOT:
+ case SvxBorderLineStyle::DASH_DOT_DOT:
eStyle = XML_DASH_DOT_DOT;
break;
- case table::BorderLineStyle::DOUBLE_THIN:
+ case SvxBorderLineStyle::DOUBLE_THIN:
eStyle = XML_DOUBLE_THIN;
break;
- 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:
+ case SvxBorderLineStyle::DOUBLE:
+ case SvxBorderLineStyle::THINTHICK_SMALLGAP:
+ case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
+ case SvxBorderLineStyle::THINTHICK_LARGEGAP:
+ case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
+ case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
+ case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
eStyle = XML_DOUBLE;
break;
- case table::BorderLineStyle::EMBOSSED:
+ case SvxBorderLineStyle::EMBOSSED:
eStyle = XML_RIDGE;
break;
- case table::BorderLineStyle::ENGRAVED:
+ case SvxBorderLineStyle::ENGRAVED:
eStyle = XML_GROOVE;
break;
- case table::BorderLineStyle::INSET:
+ case SvxBorderLineStyle::INSET:
eStyle = XML_INSET;
break;
- case table::BorderLineStyle::OUTSET:
+ case SvxBorderLineStyle::OUTSET:
eStyle = XML_OUTSET;
break;
default:
diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx
index ea3922e085da..d1e46fd31ad0 100644
--- a/sw/source/filter/xml/xmlithlp.cxx
+++ b/sw/source/filter/xml/xmlithlp.cxx
@@ -149,9 +149,9 @@ bool sw_frmitems_parseXMLBorder( const OUString& rValue,
void sw_frmitems_setXMLBorderStyle( SvxBorderLine& rLine, sal_uInt16 nStyle )
{
- ::editeng::SvxBorderStyle eStyle = table::BorderLineStyle::NONE;
+ SvxBorderLineStyle eStyle = SvxBorderLineStyle::NONE;
if ( nStyle != API_LINE_NONE )
- eStyle = ::editeng::SvxBorderStyle( nStyle );
+ eStyle = SvxBorderLineStyle( nStyle );
rLine.SetBorderLineStyle(eStyle);
}
@@ -201,7 +201,7 @@ bool sw_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
{
if (bDouble)
{
- rpLine->SetBorderLineStyle( table::BorderLineStyle::DOUBLE );
+ rpLine->SetBorderLineStyle( SvxBorderLineStyle::DOUBLE );
}
rpLine->SetWidth( aBorderWidths[nNamedWidth] );
}
@@ -233,7 +233,7 @@ void sw_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
if( nWidth > 0 )
rpLine->SetWidth( nWidth );
else
- rpLine->GuessLinesWidths(table::BorderLineStyle::DOUBLE,
+ rpLine->GuessLinesWidths(SvxBorderLineStyle::DOUBLE,
nOutWidth, nInWidth, nDistance);
}
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 5b5f3c855672..01a3f7fb0ade 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -499,14 +499,14 @@ SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet)
// Fill the line styles listbox
m_pLineTypeDLB->SetNone( SVX_RESSTR( RID_SVXSTR_NONE ) );
m_pLineTypeDLB->InsertEntry(
- ::editeng::SvxBorderLine::getWidthImpl(table::BorderLineStyle::SOLID),
- table::BorderLineStyle::SOLID );
+ ::editeng::SvxBorderLine::getWidthImpl(SvxBorderLineStyle::SOLID),
+ SvxBorderLineStyle::SOLID );
m_pLineTypeDLB->InsertEntry(
- ::editeng::SvxBorderLine::getWidthImpl(table::BorderLineStyle::DOTTED),
- table::BorderLineStyle::DOTTED );
+ ::editeng::SvxBorderLine::getWidthImpl(SvxBorderLineStyle::DOTTED),
+ SvxBorderLineStyle::DOTTED );
m_pLineTypeDLB->InsertEntry(
- ::editeng::SvxBorderLine::getWidthImpl(table::BorderLineStyle::DASHED),
- table::BorderLineStyle::DASHED );
+ ::editeng::SvxBorderLine::getWidthImpl(SvxBorderLineStyle::DASHED),
+ SvxBorderLineStyle::DASHED );
long nLineWidth = static_cast<long>(MetricField::ConvertDoubleValue(
m_pLineWidthEdit->GetValue( ),
@@ -733,7 +733,7 @@ IMPL_LINK_NOARG( SwColumnPage, UpdateColMgr, Edit&, void )
else
{
m_pColMgr->SetLineWidthAndColor(
- ::editeng::SvxBorderStyle( m_pLineTypeDLB->GetSelectEntryStyle( ) ),
+ SvxBorderLineStyle( m_pLineTypeDLB->GetSelectEntryStyle( ) ),
nLineWidth,
m_pLineColorDLB->GetSelectEntryColor() );
m_pColMgr->SetAdjust( SwColLineAdj(
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 70e109c215a7..82aeb6d88379 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -200,14 +200,14 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet)
m_pLineTypeBox->SetNone(SW_RESSTR(SW_STR_NONE));
m_pLineTypeBox->InsertEntry(
- ::editeng::SvxBorderLine::getWidthImpl(table::BorderLineStyle::SOLID),
- table::BorderLineStyle::SOLID );
+ ::editeng::SvxBorderLine::getWidthImpl(SvxBorderLineStyle::SOLID),
+ SvxBorderLineStyle::SOLID );
m_pLineTypeBox->InsertEntry(
- ::editeng::SvxBorderLine::getWidthImpl(table::BorderLineStyle::DOTTED),
- table::BorderLineStyle::DOTTED );
+ ::editeng::SvxBorderLine::getWidthImpl(SvxBorderLineStyle::DOTTED),
+ SvxBorderLineStyle::DOTTED );
m_pLineTypeBox->InsertEntry(
- ::editeng::SvxBorderLine::getWidthImpl(table::BorderLineStyle::DASHED),
- table::BorderLineStyle::DASHED );
+ ::editeng::SvxBorderLine::getWidthImpl(SvxBorderLineStyle::DASHED),
+ SvxBorderLineStyle::DASHED );
m_pLineTypeBox->SetWidth( pFootnoteInfo->GetLineWidth( ) );
m_pLineTypeBox->SelectEntry( pFootnoteInfo->GetLineStyle() );
@@ -253,7 +253,7 @@ bool SwFootNotePage::FillItemSet(SfxItemSet *rSet)
m_pLineDistEdit->Denormalize(m_pLineDistEdit->GetValue(FUNIT_TWIP))));
// Separator style
- rFootnoteInfo.SetLineStyle( ::editeng::SvxBorderStyle( m_pLineTypeBox->GetSelectEntryStyle() ) );
+ rFootnoteInfo.SetLineStyle( SvxBorderLineStyle( m_pLineTypeBox->GetSelectEntryStyle() ) );
// Separator width
long nWidth = static_cast<long>(MetricField::ConvertDoubleValue(
diff --git a/sw/source/uibase/frmdlg/colmgr.cxx b/sw/source/uibase/frmdlg/colmgr.cxx
index 9b38ce677547..e632db2041fc 100644
--- a/sw/source/uibase/frmdlg/colmgr.cxx
+++ b/sw/source/uibase/frmdlg/colmgr.cxx
@@ -125,7 +125,7 @@ SwColMgr::~SwColMgr()
{
}
-void SwColMgr::SetLineWidthAndColor(::editeng::SvxBorderStyle eStyle, sal_uLong nLWidth, const Color& rCol)
+void SwColMgr::SetLineWidthAndColor(SvxBorderLineStyle eStyle, sal_uLong nLWidth, const Color& rCol)
{
aFormatCol.SetLineStyle(eStyle);
aFormatCol.SetLineWidth(nLWidth);
diff --git a/sw/source/uibase/inc/colmgr.hxx b/sw/source/uibase/inc/colmgr.hxx
index 53cc566e1dd7..b9f55292d183 100644
--- a/sw/source/uibase/inc/colmgr.hxx
+++ b/sw/source/uibase/inc/colmgr.hxx
@@ -45,8 +45,8 @@ public:
inline bool HasLine() const;
inline void SetNoLine();
- void SetLineWidthAndColor(::editeng::SvxBorderStyle eStyle, sal_uLong nWidth, const Color& rCol);
- inline ::editeng::SvxBorderStyle GetLineStyle() const;
+ void SetLineWidthAndColor(SvxBorderLineStyle eStyle, sal_uLong nWidth, const Color& rCol);
+ inline SvxBorderLineStyle GetLineStyle() const;
inline sal_uLong GetLineWidth() const;
inline const Color& GetLineColor() const;
@@ -73,7 +73,7 @@ inline sal_uInt16 SwColMgr::GetCount() const
return aFormatCol.GetNumCols();
}
-inline ::editeng::SvxBorderStyle SwColMgr::GetLineStyle() const
+inline SvxBorderLineStyle SwColMgr::GetLineStyle() const
{
return aFormatCol.GetLineStyle();
}
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 91d0c8e77dbb..42107d5cba12 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -1024,7 +1024,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
if(aBorderLine.GetOutWidth() == 0)
{
aBorderLine.SetBorderLineStyle(
- table::BorderLineStyle::SOLID);
+ SvxBorderLineStyle::SOLID);
aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
}
//Set distance only if the request is received from the controller.
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 8d529b410c6e..a53986bd8ea4 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -530,7 +530,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
if(aBorderLine.GetOutWidth() == 0)
{
- aBorderLine.SetBorderLineStyle(table::BorderLineStyle::SOLID);
+ aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::SOLID);
aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
}
diff --git a/sw/source/uibase/utlui/uiitems.cxx b/sw/source/uibase/utlui/uiitems.cxx
index c8dd123f05b0..2f4ec2022413 100644
--- a/sw/source/uibase/utlui/uiitems.cxx
+++ b/sw/source/uibase/utlui/uiitems.cxx
@@ -101,10 +101,10 @@ bool SwPageFootnoteInfoItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
switch ( aFootnoteInfo.GetLineStyle( ) )
{
default:
- case table::BorderLineStyle::NONE : rVal <<= sal_Int8(0); break;
- case table::BorderLineStyle::SOLID: rVal <<= sal_Int8(1); break;
- case table::BorderLineStyle::DOTTED: rVal <<= sal_Int8(2); break;
- case table::BorderLineStyle::DASHED: rVal <<= sal_Int8(3); break;
+ case SvxBorderLineStyle::NONE : rVal <<= sal_Int8(0); break;
+ case SvxBorderLineStyle::SOLID: rVal <<= sal_Int8(1); break;
+ case SvxBorderLineStyle::DOTTED: rVal <<= sal_Int8(2); break;
+ case SvxBorderLineStyle::DASHED: rVal <<= sal_Int8(3); break;
}
break;
}
@@ -173,14 +173,14 @@ bool SwPageFootnoteInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId)
break;
case MID_FTN_LINE_STYLE:
{
- ::editeng::SvxBorderStyle eStyle = table::BorderLineStyle::NONE;
+ SvxBorderLineStyle eStyle = SvxBorderLineStyle::NONE;
sal_Int8 nSet = 0;
rVal >>= nSet;
switch ( nSet )
{
- case 1: eStyle = table::BorderLineStyle::SOLID; break;
- case 2: eStyle = table::BorderLineStyle::DOTTED; break;
- case 3: eStyle = table::BorderLineStyle::DASHED; break;
+ case 1: eStyle = SvxBorderLineStyle::SOLID; break;
+ case 2: eStyle = SvxBorderLineStyle::DOTTED; break;
+ case 3: eStyle = SvxBorderLineStyle::DASHED; break;
default: break;
}
aFootnoteInfo.SetLineStyle( eStyle );
diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx
index 3e342ebd3395..805bac53d2e0 100644
--- a/writerfilter/source/dmapper/ConversionHelper.cxx
+++ b/writerfilter/source/dmapper/ConversionHelper.cxx
@@ -263,10 +263,10 @@ void MakeBorderLine( sal_Int32 nLineThickness, sal_Int32 nLineToken,
// thickness, or one of smaller thickness. If too small we
// can make the deficit up in additional white space or
// object size
- ::editeng::SvxBorderStyle const nLineStyle(
+ SvxBorderLineStyle const nLineStyle(
::editeng::ConvertBorderStyleFromWord(nLineType));
- rToFill.LineStyle = nLineStyle;
- double const fConverted( (table::BorderLineStyle::NONE == nLineStyle) ? 0.0 :
+ rToFill.LineStyle = (sal_Int16)nLineStyle;
+ double const fConverted( (SvxBorderLineStyle::NONE == nLineStyle) ? 0.0 :
::editeng::ConvertBorderWidthFromWord(nLineStyle, nLineThickness,
nLineType));
rToFill.LineWidth = convertTwipToMM100(fConverted);