summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-01-27 23:45:53 +0100
committerMichael Stahl <mstahl@redhat.com>2012-01-27 23:49:19 +0100
commit2ea8bbe1d381a8f12b163c0e2a17cf758a420a44 (patch)
tree1f8e070c05a680eeaf37fd944ffd5eeae071edd4
parent97400944bf9d68481a15e667812e24d47c8134fe (diff)
svtools: LineListBox: fix handling of "none" style
This was erroneously mapped to SOLID, thus effectively preventing the removal of borders via the list box.
-rw-r--r--svtools/inc/svtools/ctrlbox.hxx4
-rw-r--r--svtools/source/control/ctrlbox.cxx2
2 files changed, 5 insertions, 1 deletions
diff --git a/svtools/inc/svtools/ctrlbox.hxx b/svtools/inc/svtools/ctrlbox.hxx
index a4d9eff26625..3828cf7f7d06 100644
--- a/svtools/inc/svtools/ctrlbox.hxx
+++ b/svtools/inc/svtools/ctrlbox.hxx
@@ -48,9 +48,13 @@ typedef ::std::vector< ImplColorListData* > ImpColorList;
typedef ::std::vector< ImpLineListData* > ImpLineList;
typedef ::std::vector< ImplFontNameListData* > 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_NONE ( ( sal_uInt16 ) -1)
#define CHANGE_LINE1 ( ( sal_uInt16 ) 1 )
#define CHANGE_LINE2 ( ( sal_uInt16 ) 2 )
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index ce72cdcfd935..00cd75fc676f 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -854,7 +854,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_SOLID;
+ return ( pData ) ? pData->GetStyle() : STYLE_NONE;
}
// -----------------------------------------------------------------------