summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-01-13 17:13:35 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-01-17 11:33:11 -0500
commit5cdb7a5934877f9820429f9b8ff4c7814f0fa65e (patch)
tree23dc6b524a741a7221783cf012fdeec22ade282a
parent1051a7bedca4a5207e08152f0498df589cfa2257 (diff)
Remove STYLE_* and use css::table::BorderLineStyle instead.
Change-Id: I187511dbf85ecdfe0c5d05c6f77cf4ac93363051
-rw-r--r--include/drawinglayer/primitive2d/borderlineprimitive2d.hxx5
-rw-r--r--include/svtools/ctrlbox.hxx17
-rw-r--r--svtools/source/control/ctrlbox.cxx14
3 files changed, 16 insertions, 20 deletions
diff --git a/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx b/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx
index c0f225e36ca3..3e85b3a5e845 100644
--- a/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx
@@ -26,7 +26,8 @@
#include <basegfx/color/bcolor.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
-#include <svtools/ctrlbox.hxx>
+
+#include <com/sun/star/table/BorderLineStyle.hpp>
//////////////////////////////////////////////////////////////////////////////
@@ -74,7 +75,7 @@ namespace drawinglayer
bool isSolidLine() const
{
- return (mnStyle==STYLE_SOLID);
+ return mnStyle == com::sun::star::table::BorderLineStyle::SOLID;
}
bool isInsideUsed() const
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index 19eea12b24b1..29fee682a516 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -29,6 +29,8 @@
#include <vcl/metric.hxx>
#include <vcl/field.hxx>
+#include <com/sun/star/table/BorderLineStyle.hpp>
+
class FontList;
class ImplColorListData;
class ImpLineListData;
@@ -37,15 +39,6 @@ typedef ::std::vector< ImplColorListData* > ImpColorList;
typedef ::std::vector< ImpLineListData* > ImpLineList;
typedef ::std::vector< FontInfo > ImplFontList;
-// FIXME: STYLE_* duplicate values from editeng::SvxBorderStyle,
-// which in turn duplicates values from com::sun::star::table::BorderLineStyle:
-// this needs cleaning up on master
-#define STYLE_SOLID ( ( sal_uInt16 ) 0 )
-#define STYLE_DOTTED ( ( sal_uInt16 ) 1 )
-#define STYLE_DASHED ( ( sal_uInt16 ) 2 )
-#define STYLE_FINE_DASHED ( ( sal_uInt16 ) 14 )
-#define STYLE_NONE ( ( sal_uInt16 ) -1)
-
#define CHANGE_LINE1 ( ( sal_uInt16 ) 1 )
#define CHANGE_LINE2 ( ( sal_uInt16 ) 2 )
#define CHANGE_DIST ( ( sal_uInt16 ) 4 )
@@ -339,17 +332,17 @@ public:
virtual void Clear();
using ListBox::GetEntryPos;
- virtual sal_uInt16 GetEntryPos( sal_uInt16 nStyle = STYLE_SOLID ) const;
+ virtual sal_uInt16 GetEntryPos( sal_uInt16 nStyle = com::sun::star::table::BorderLineStyle::SOLID ) const;
sal_uInt16 GetEntryStyle( sal_uInt16 nPos ) const;
void SelectEntry( const OUString& rStr, sal_Bool bSelect = sal_True ) { ListBox::SelectEntry( rStr, bSelect ); }
- void SelectEntry( sal_uInt16 nStyle = STYLE_SOLID, sal_Bool bSelect = sal_True );
+ void SelectEntry( sal_uInt16 nStyle = com::sun::star::table::BorderLineStyle::SOLID, sal_Bool bSelect = sal_True );
sal_uInt16 GetSelectEntryStyle( sal_uInt16 nSelIndex = 0 ) const;
bool IsEntrySelected(const OUString& rStr) const
{
return ListBox::IsEntrySelected(rStr);
}
- bool IsEntrySelected(sal_uInt16 nStyle = STYLE_SOLID) const
+ bool IsEntrySelected( sal_uInt16 nStyle = com::sun::star::table::BorderLineStyle::SOLID ) const
{
sal_uInt16 nPos = GetEntryPos( nStyle );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 2078cd5fc30b..15751030845c 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -41,6 +41,8 @@
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <com/sun/star/table/BorderLineStyle.hpp>
+
#include <rtl/bootstrap.hxx>
#if OSL_DEBUG_LEVEL > 1
@@ -527,7 +529,7 @@ Color ImpLineListData::GetColorDist( const Color& rMain, const Color& rDefault )
sal_uInt16 LineListBox::GetSelectEntryStyle( sal_uInt16 nSelIndex ) const
{
- sal_uInt16 nStyle = STYLE_SOLID;
+ sal_uInt16 nStyle = table::BorderLineStyle::SOLID;
sal_uInt16 nPos = GetSelectEntryPos( nSelIndex );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -588,7 +590,7 @@ namespace svtools
::std::vector < double >aPattern;
switch ( nDashing )
{
- case STYLE_DOTTED:
+ case table::BorderLineStyle::DOTTED:
if ( eUnit == MAP_TWIP )
{
aPattern.push_back( 30.0 );
@@ -605,7 +607,7 @@ namespace svtools
aPattern.push_back( 3.0 );
}
break;
- case STYLE_DASHED:
+ case table::BorderLineStyle::DASHED:
if ( eUnit == MAP_TWIP )
{
aPattern.push_back( 110 );
@@ -622,7 +624,7 @@ namespace svtools
aPattern.push_back( 20 );
}
break;
- case STYLE_FINE_DASHED:
+ case table::BorderLineStyle::FINE_DASHED:
if ( eUnit == MAP_PIXEL )
{
aPattern.push_back( 8 );
@@ -748,7 +750,7 @@ void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance,
{
double y2 = n1 + nDist + double( n2 ) / 2;
aVirDev.SetFillColor( aColor2 );
- svtools::DrawLine( aVirDev, basegfx::B2DPoint( 0, y2 ), basegfx::B2DPoint( aSize.Width(), y2 ), n2, STYLE_SOLID );
+ svtools::DrawLine( aVirDev, basegfx::B2DPoint( 0, y2 ), basegfx::B2DPoint( aSize.Width(), y2 ), n2, table::BorderLineStyle::SOLID );
}
rBmp = aVirDev.GetBitmap( Point(), Size( aSize.Width(), n1+nDist+n2 ) );
}
@@ -923,7 +925,7 @@ sal_uInt16 LineListBox::GetEntryPos( sal_uInt16 nStyle ) const
sal_uInt16 LineListBox::GetEntryStyle( sal_uInt16 nPos ) const
{
ImpLineListData* pData = (nPos < pLineList->size()) ? (*pLineList)[ nPos ] : NULL;
- return ( pData ) ? pData->GetStyle() : STYLE_NONE;
+ return ( pData ) ? pData->GetStyle() : table::BorderLineStyle::NONE;
}
// -----------------------------------------------------------------------