summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.cz>2011-04-05 20:06:07 +0200
committerPetr Mladek <pmladek@suse.cz>2011-04-05 20:06:07 +0200
commit1e84a9292f87ad9c52fa5fadac4b656250713777 (patch)
treeb867eca6ce5dbef4ee82091d5441546c06d34efc
parentf048183de102118b190a8cd7026ab020529a4db5 (diff)
parentc82fb9b9ceec701f49024c9fd3c3de146fae9588 (diff)
Merge remote-tracking branch 'origin/libreoffice-3-3' into libreoffice-3-4
Conflicts: basic/source/runtime/dllmgr.cxx drawinglayer/source/processor2d/vclpixelprocessor2d.cxx editeng/inc/editeng/boxitem.hxx editeng/source/items/frmitems.cxx sfx2/workben/custompanel/makefile.mk
-rwxr-xr-xdesktop/unx/source/splashx.c3
-rw-r--r--editeng/inc/editeng/boxitem.hxx1
-rw-r--r--editeng/source/items/frmitems.cxx59
3 files changed, 59 insertions, 4 deletions
diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
index d7d8b1df461c..711671fe28d4 100755
--- a/desktop/unx/source/splashx.c
+++ b/desktop/unx/source/splashx.c
@@ -336,6 +336,7 @@ static void create_pixmap()
int x, y; \
for ( y = 0; y < height; ++y ) \
{ \
+ out = data + y * bytes_per_line; \
unsigned long red_delta = 0, green_delta = 0, blue_delta = 0; \
color_t *in = (color_t *)bitmap_rows[y]; \
for ( x = 0; x < width; ++x, ++in ) \
@@ -379,7 +380,7 @@ static void create_pixmap()
{
if ( machine_byte_order == byte_order && byte_order == LSBFirst )
COPY_IN_OUT( 3, *( (color_t *)out ) = *( (color_t *)( &pixel ) ); out += 3; )
- if ( machine_byte_order == byte_order && byte_order == MSBFirst )
+ else if ( machine_byte_order == byte_order && byte_order == MSBFirst )
COPY_IN_OUT( 3, uint32_t tmp = pixel;
*( (uint8_t *)out ) = *( (uint8_t *)(&tmp) + 1 );
*( (uint8_t *)out + 1 ) = *( (uint8_t *)(&tmp) + 2 );
diff --git a/editeng/inc/editeng/boxitem.hxx b/editeng/inc/editeng/boxitem.hxx
index 46597705fc92..c3c88345e21c 100644
--- a/editeng/inc/editeng/boxitem.hxx
+++ b/editeng/inc/editeng/boxitem.hxx
@@ -109,6 +109,7 @@ public:
static com::sun::star::table::BorderLine2 SvxLineToLine( const editeng::SvxBorderLine* pLine, sal_Bool bConvert );
static sal_Bool LineToSvxLine(const ::com::sun::star::table::BorderLine& rLine, editeng::SvxBorderLine& rSvxLine, sal_Bool bConvert);
static sal_Bool LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, editeng::SvxBorderLine& rSvxLine, sal_Bool bConvert);
+ static sal_Bool LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert);
};
inline void SvxBoxItem::SetDistance( sal_uInt16 nNew )
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 6f2a8ca1989c..ca3163c1b079 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -1743,17 +1743,31 @@ lcl_lineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_B
}
-// -----------------------------------------------------------------------
-sal_Bool SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert)
+namespace
+{
+
+sal_Bool
+lcl_lineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert)
{
return lcl_lineToSvxLine(rLine, rSvxLine, bConvert, sal_True);
}
+ return bRet;
+}
sal_Bool
SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert)
+// -----------------------------------------------------------------------
+sal_Bool SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert)
{
SvxBorderStyle nStyle = NO_STYLE;
switch ( rLine.LineStyle )
+
+sal_Bool
+SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert)
+{
+ const bool bRet(lcl_lineToSvxLine(rLine, rSvxLine, bConvert));
+
+ switch ( rLine.LineStyle )
{
default:
case table::BorderLineStyle::SOLID:
@@ -1806,7 +1820,6 @@ SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, Svx
{
rSvxLine.SetWidth( bConvert? MM100_TO_TWIP_UNSIGNED( rLine.LineWidth ) : rLine.LineWidth );
bGuessWidth = sal_False;
- }
return lcl_lineToSvxLine(rLine, rSvxLine, bConvert, bGuessWidth);
}
@@ -1838,6 +1851,46 @@ lcl_extractBorderLine(const uno::Any& rAny, table::BorderLine2& rLine)
template<typename Item>
bool
+lcl_setLine(const uno::Any& rAny, Item& rItem, USHORT nLine, const bool bConvert)
+{
+ bool bDone = false;
+ table::BorderLine2 aBorderLine;
+ if (lcl_extractBorderLine(rAny, aBorderLine))
+ {
+ SvxBorderLine aLine;
+ bool bSet = SvxBoxItem::LineToSvxLine(aBorderLine, aLine, bConvert);
+ rItem.SetLine( bSet ? &aLine : NULL, nLine);
+ bDone = true;
+ }
+ return bDone;
+}
+
+}
+
+{
+
+bool
+lcl_extractBorderLine(const uno::Any& rAny, table::BorderLine2& rLine)
+{
+ if (rAny >>= rLine)
+ return true;
+
+ table::BorderLine aBorderLine;
+ if (rAny >>= aBorderLine)
+ {
+ rLine.Color = aBorderLine.Color;
+ rLine.InnerLineWidth = aBorderLine.InnerLineWidth;
+ rLine.OuterLineWidth = aBorderLine.OuterLineWidth;
+ rLine.LineDistance = aBorderLine.LineDistance;
+ rLine.LineStyle = table::BorderLineStyle::SOLID;
+ return true;
+ }
+
+ return false;
+}
+
+template<typename Item>
+bool
lcl_setLine(const uno::Any& rAny, Item& rItem, sal_uInt16 nLine, const bool bConvert)
{
bool bDone = false;