summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-01-27 23:45:53 +0100
committerNoel Power <noel.power@novell.com>2012-01-30 11:29:37 +0000
commitc59ecb9a758cb61f1b146d8a844030fcd085eb65 (patch)
tree1e810148e8c66d34aaada14d1db9874707fac053
parent1bdf3ff2b4499a08c62c43e7698038c07489a9d0 (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. Signed-off-by: Noel Power <noel.power@novell.com>
-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 267a104aa7..8813820799 100644
--- a/svtools/inc/svtools/ctrlbox.hxx
+++ b/svtools/inc/svtools/ctrlbox.hxx
@@ -47,9 +47,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 70a040e6c8..68047af4c9 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -866,7 +866,7 @@ long LineListBox::GetEntryDistance( sal_uInt16 nPos ) 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;
}
// -----------------------------------------------------------------------