[Libreoffice-commits] .: Branch 'libreoffice-3-4' - svtools/inc svtools/source

Noel Power noelp at kemper.freedesktop.org
Mon Jan 30 03:35:59 PST 2012


 svtools/inc/svtools/ctrlbox.hxx    |    4 ++++
 svtools/source/control/ctrlbox.cxx |    2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit c59ecb9a758cb61f1b146d8a844030fcd085eb65
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Jan 27 23:45:53 2012 +0100

    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 at novell.com>

diff --git a/svtools/inc/svtools/ctrlbox.hxx b/svtools/inc/svtools/ctrlbox.hxx
index 267a104..8813820 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 70a040e..68047af 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;
 }
 
 // -----------------------------------------------------------------------


More information about the Libreoffice-commits mailing list