summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comphelper/inc/comphelper/TypeGeneration.hxx1
-rw-r--r--comphelper/source/property/TypeGeneration.cxx2
-rwxr-xr-xediteng/inc/editeng/memberids.hrc2
-rw-r--r--editeng/source/items/frmitems.cxx48
-rw-r--r--sw/inc/unoprnms.hxx6
-rw-r--r--sw/source/core/unocore/unoframe.cxx13
-rw-r--r--sw/source/core/unocore/unomap.cxx4
-rw-r--r--sw/source/core/unocore/unoprnms.cxx3
8 files changed, 75 insertions, 4 deletions
diff --git a/comphelper/inc/comphelper/TypeGeneration.hxx b/comphelper/inc/comphelper/TypeGeneration.hxx
index c987b2adbe50..9492ac8ba6fb 100644
--- a/comphelper/inc/comphelper/TypeGeneration.hxx
+++ b/comphelper/inc/comphelper/TypeGeneration.hxx
@@ -71,6 +71,7 @@ namespace comphelper
CPPUTYPE_SEQDEPTXTFLD, //getCppuType( (Sequence<Reference<XDependentTextField> >*)0 )
CPPUTYPE_TXTCNTANCHOR, //getCppuType( (text::TextContentAnchorType*)0 )
CPPUTYPE_WRAPTXTMODE, //getCppuType( (text::WrapTextMode*)0 )
+ CPPUTYPE_LINESTYLE, //getCppuType( (drawing::LineStyle*)0 )
CPPUTYPE_COLORMODE, //getCppuType( (drawing::ColorMode*)0 )
CPPUTYPE_PAGESTYLELAY, //getCppuType( (style::PageStyleLayout*)0 )
CPPUTYPE_VERTALIGN, //getCppuType( (style::VerticalAlignment*)0 )
diff --git a/comphelper/source/property/TypeGeneration.cxx b/comphelper/source/property/TypeGeneration.cxx
index 62c6d0578d91..93c255ca5d62 100644
--- a/comphelper/source/property/TypeGeneration.cxx
+++ b/comphelper/source/property/TypeGeneration.cxx
@@ -128,6 +128,7 @@
#include <com/sun/star/drawing/HomogenMatrix3.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <com/sun/star/drawing/LineStyle.hpp>
using ::rtl::OUString;
using namespace ::com::sun::star;
@@ -225,6 +226,7 @@ namespace comphelper
case CPPUTYPE_REFXGRAPHIC: pType = &::getCppuType( (Reference< graphic::XGraphic >*)0); break;
case CPPUTYPE_TABLEBORDERDISTANCES: pType = &::getCppuType( (table::TableBorderDistances*)0 ); break;
case CPPUTPYE_REFEMBEDDEDOBJECT: pType = &embed::XEmbeddedObject::static_type(); break;
+ case CPPUTYPE_LINESTYLE: pType = &::getCppuType( (drawing::LineStyle*)0 ); break;
default:
OSL_FAIL( "Unknown CPPU type" );
}
diff --git a/editeng/inc/editeng/memberids.hrc b/editeng/inc/editeng/memberids.hrc
index fa57ab11793a..b53276ccb6e2 100755
--- a/editeng/inc/editeng/memberids.hrc
+++ b/editeng/inc/editeng/memberids.hrc
@@ -168,6 +168,8 @@
#define MID_RIGHT_BORDER 11
#define MID_TOP_BORDER 12
#define MID_BOTTOM_BORDER 13
+#define LINE_STYLE 14
+#define LINE_WIDTH 15
//BrushItem
#define MID_BACK_COLOR 0
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 50484b832df9..b10218d770b3 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -29,6 +29,7 @@
// include ---------------------------------------------------------------
#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/script/XTypeConverter.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/table/ShadowLocation.hpp>
@@ -1920,6 +1921,53 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
case MID_TOP_BORDER:
nLine = BOX_LINE_TOP;
break;
+ case LINE_STYLE:
+ {
+ drawing::LineStyle eDrawingStyle;
+ rVal >>= eDrawingStyle;
+ editeng::SvxBorderStyle eBorderStyle = editeng::NO_STYLE;
+ switch ( eDrawingStyle )
+ {
+ default:
+ case drawing::LineStyle_NONE:
+ eBorderStyle = editeng::NO_STYLE;
+ break;
+ case drawing::LineStyle_SOLID:
+ eBorderStyle = editeng::SOLID;
+ break;
+ case drawing::LineStyle_DASH:
+ eBorderStyle = editeng::DASHED;
+ break;
+ }
+
+ // Set the line style on all borders
+ const sal_uInt16 aBorders[] = { BOX_LINE_LEFT, BOX_LINE_RIGHT, BOX_LINE_BOTTOM, BOX_LINE_TOP };
+ for (int n(0); n != SAL_N_ELEMENTS(aBorders); ++n)
+ {
+ editeng::SvxBorderLine* pLine = const_cast< editeng::SvxBorderLine* >( GetLine( aBorders[n] ) );
+ pLine->SetStyle( eBorderStyle );
+ }
+ return sal_True;
+ }
+ break;
+ case LINE_WIDTH:
+ {
+ // Set the line width on all borders
+ long nWidth;
+ rVal >>= nWidth;
+ if( bConvert )
+ nWidth = MM100_TO_TWIP( nWidth );
+
+ // Set the line Width on all borders
+ const sal_uInt16 aBorders[] = { BOX_LINE_LEFT, BOX_LINE_RIGHT, BOX_LINE_BOTTOM, BOX_LINE_TOP };
+ for (int n(0); n != SAL_N_ELEMENTS(aBorders); ++n)
+ {
+ editeng::SvxBorderLine* pLine = const_cast< editeng::SvxBorderLine* >( GetLine( aBorders[n] ) );
+ pLine->SetWidth( nWidth );
+ }
+ }
+ return sal_True;
+ break;
}
if( bDistMember || nMemberId == BORDER_DISTANCE )
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index e70963a19ccd..8114f91d365f 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -808,7 +808,11 @@ enum SwPropNameIds
/* 0744 */ UNO_NAME_EMBEDDED_OBJECT,
/* 0745 */ UNO_NAME_RSID,
/* 0746 */ UNO_NAME_PARRSID,
-/* 0747 */ SW_PROPNAME_END
+
+/* 0747 */ UNO_NAME_LINE_STYLE,
+/* 0748 */ UNO_NAME_LINE_WIDTH,
+
+/* 0749 */ SW_PROPNAME_END
// new items in this array must match SwPropNameTab aPropNameTab
};
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index ebf73ac348e1..60e66fcbfd26 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -385,8 +385,13 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
GetProperty(RES_BOX, CONVERT_TWIPS|TOP_BORDER_DISTANCE, pTopDistance);
const ::uno::Any* pBottomDistance = 0;
GetProperty(RES_BOX, CONVERT_TWIPS|BOTTOM_BORDER_DISTANCE, pBottomDistance);
+ const ::uno::Any* pLineStyle = 0;
+ GetProperty(RES_BOX, LINE_STYLE, pLineStyle);
+ const ::uno::Any* pLineWidth = 0;
+ GetProperty(RES_BOX, LINE_WIDTH, pLineWidth);
if( pLeft || pRight || pTop || pBottom || pDistance ||
- pLeftDistance || pRightDistance || pTopDistance || pBottomDistance )
+ pLeftDistance || pRightDistance || pTopDistance || pBottomDistance ||
+ pLineStyle || pLineWidth )
{
SvxBoxItem aBox ( static_cast < const :: SvxBoxItem & > ( rFromSet.Get ( RES_BOX ) ) );
if( pLeft )
@@ -407,6 +412,10 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
bRet &= ((SfxPoolItem&)aBox).PutValue(*pTopDistance, CONVERT_TWIPS|TOP_BORDER_DISTANCE);
if( pBottomDistance )
bRet &= ((SfxPoolItem&)aBox).PutValue(*pBottomDistance, CONVERT_TWIPS|BOTTOM_BORDER_DISTANCE);
+ if( pLineStyle )
+ bRet &= ((SfxPoolItem&)aBox).PutValue(*pLineStyle, LINE_STYLE);
+ if( pLineWidth )
+ bRet &= ((SfxPoolItem&)aBox).PutValue(*pLineWidth, LINE_WIDTH|CONVERT_TWIPS);
rToSet.Put(aBox);
}
{
@@ -2386,7 +2395,7 @@ awt::Point SwXFrame::getPosition(void) throw( uno::RuntimeException )
throw aRuntime;
}
-void SwXFrame::setPosition(const awt::Point& /*aPosition*/) throw( uno::RuntimeException )
+void SwXFrame::setPosition(const awt::Point& aPosition) throw( uno::RuntimeException )
{
SolarMutexGuard aGuard;
uno::RuntimeException aRuntime;
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index 4e6a17c0a80e..ca85a1801751 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -350,7 +350,9 @@ SwUnoPropertyMapProvider::~SwUnoPropertyMapProvider()
{ SW_PROP_NMID(UNO_NAME_WRAP_INFLUENCE_ON_POSITION), RES_WRAP_INFLUENCE_ON_OBJPOS, CPPU_E2T(CPPUTYPE_INT8), PROPERTY_NONE, MID_WRAP_INFLUENCE}, \
{ SW_PROP_NMID(UNO_NAME_TITLE), FN_UNO_TITLE, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE, 0}, \
{ SW_PROP_NMID(UNO_NAME_DESCRIPTION), FN_UNO_DESCRIPTION, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE, 0}, \
- { SW_PROP_NMID(UNO_NAME_LAYOUT_SIZE), WID_LAYOUT_SIZE, CPPU_E2T(CPPUTYPE_AWTSIZE), PropertyAttribute::MAYBEVOID | PropertyAttribute::READONLY, 0 },
+ { SW_PROP_NMID(UNO_NAME_LAYOUT_SIZE), WID_LAYOUT_SIZE, CPPU_E2T(CPPUTYPE_AWTSIZE), PropertyAttribute::MAYBEVOID | PropertyAttribute::READONLY, 0 }, \
+ { SW_PROP_NMID(UNO_NAME_LINE_STYLE), RES_BOX, CPPU_E2T(CPPUTYPE_LINESTYLE), 0, LINE_STYLE }, \
+ { SW_PROP_NMID(UNO_NAME_LINE_WIDTH), RES_BOX, CPPU_E2T(CPPUTYPE_INT32), 0, LINE_WIDTH |CONVERT_TWIPS },
diff --git a/sw/source/core/unocore/unoprnms.cxx b/sw/source/core/unocore/unoprnms.cxx
index 0c0479c8c797..a3f84d469b8c 100644
--- a/sw/source/core/unocore/unoprnms.cxx
+++ b/sw/source/core/unocore/unoprnms.cxx
@@ -784,6 +784,9 @@ const SwPropNameTab aPropNameTab = {
/* 0745 UNO_NAME_RSID */ {MAP_CHAR_LEN("Rsid")},
/* 0746 UNO_NAME_PARRSID */ {MAP_CHAR_LEN("ParRsid")},
+/* 0747 UNO_NAME_LINE_STYLE */ {MAP_CHAR_LEN("LineStyle")},
+/* 0748 UNO_NAME_LINE_WIDTH */ {MAP_CHAR_LEN("LineWidth")},
+
// new items in this array must match enum SwPropNameIds
};