cui/source/tabpages/border.src | 2 +- editeng/source/items/borderline.cxx | 6 ++---- svtools/inc/svtools/ctrlbox.hxx | 4 ++++ svtools/source/control/ctrlbox.cxx | 2 +- svx/source/dialog/rulritem.cxx | 1 - 5 files changed, 8 insertions(+), 7 deletions(-)
New commits: commit 2ea8bbe1d381a8f12b163c0e2a17cf758a420a44 Author: Michael Stahl <[email protected]> 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. diff --git a/svtools/inc/svtools/ctrlbox.hxx b/svtools/inc/svtools/ctrlbox.hxx index a4d9eff..3828cf7 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 ce72cdc..00cd75f 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; } // ----------------------------------------------------------------------- commit 97400944bf9d68481a15e667812e24d47c8134fe Author: Michael Stahl <[email protected]> Date: Fri Jan 27 23:44:26 2012 +0100 SvxBorderTabPage: the minimal border width is 1 twip diff --git a/cui/source/tabpages/border.src b/cui/source/tabpages/border.src index 8496f18..45b412d 100644 --- a/cui/source/tabpages/border.src +++ b/cui/source/tabpages/border.src @@ -116,7 +116,7 @@ TabPage RID_SVXPAGE_BORDER First = 25 ; Last = 900 ; Maximum = 900 ; - Minimum = 25 ; + Minimum = 5 ; DecimalDigits = 2 ; Unit = FUNIT_POINT ; }; commit b61abf6b1374d2de98f0936b4c1e2cc32294922a Author: Michael Stahl <[email protected]> Date: Fri Jan 27 23:39:36 2012 +0100 SvxColumnItem: fix buggy STL conversion: In the copy ctor, the vector must not be initialized with the constructor that takes an integer, because that causes it to have that many elements, which together with the loop that copies all source elements leads to a vector with twice as many elements. This causes a crash in writer when dragging the row separator line in a table, because that code doesn't expect the item to have more elements than the table has rows. (regression from d319387526870f34c49b3ef337b1b0d55767f3fe) diff --git a/svx/source/dialog/rulritem.cxx b/svx/source/dialog/rulritem.cxx index 1be621b..dc9af26 100644 --- a/svx/source/dialog/rulritem.cxx +++ b/svx/source/dialog/rulritem.cxx @@ -505,7 +505,6 @@ SvxColumnItem::SvxColumnItem( sal_uInt16 nActCol, sal_uInt16 left, sal_uInt16 ri SvxColumnItem::SvxColumnItem( const SvxColumnItem& rCopy ) : SfxPoolItem( rCopy ), - aColumns ( (sal_uInt8)rCopy.Count() ), nLeft ( rCopy.nLeft ), nRight ( rCopy.nRight ), nActColumn( rCopy.nActColumn ), commit 4512de034a0eabc2e66fd9516581bba94aa20a08 Author: Michael Stahl <[email protected]> Date: Wed Jan 25 19:34:12 2012 +0100 SvxBorderLine::GuessLinesWidths: use SAL_N_ELEMENTS diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx index 61cecce..8d073c6 100644 --- a/editeng/source/items/borderline.cxx +++ b/editeng/source/items/borderline.cxx @@ -263,16 +263,14 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa THICKTHIN_LARGEGAP }; - - int i = 0, len = sizeof( aDoubleStyles ) / sizeof( SvxBorderStyle ); + size_t const len = SAL_N_ELEMENTS(aDoubleStyles); long nWidth = 0; SvxBorderStyle nTestStyle(NO_STYLE); - while ( i < len && nWidth == 0 ) + for (size_t i = 0; i < len && nWidth == 0; ++i) { nTestStyle = aDoubleStyles[i]; BorderWidthImpl aWidthImpl = getWidthImpl( nTestStyle ); nWidth = aWidthImpl.GuessWidth( nOut, nIn, nDist ); - i++; } // If anything matched, then set it _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
