summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-10-16 16:36:19 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-10-17 16:06:32 +0100
commitde661fd70a33010ff455a3909020c8df346b5743 (patch)
tree49ef870ba880a1db9b5a89b2cc588e3bb89bfff5 /svx
parentc648d4287877f62554cb4f940d565833fb46a2b3 (diff)
add a makeSwRulerValueSet for custom SwRulerValueSet widget
Change-Id: Id13086906e2f66de45356baa7593b6d0e7657714
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/svx/numvset.hxx9
-rw-r--r--svx/source/dialog/svxbmpnumvalueset.cxx38
2 files changed, 37 insertions, 10 deletions
diff --git a/svx/inc/svx/numvset.hxx b/svx/inc/svx/numvset.hxx
index 546644490226..442addc79cc6 100644
--- a/svx/inc/svx/numvset.hxx
+++ b/svx/inc/svx/numvset.hxx
@@ -64,8 +64,12 @@ class SVX_DLLPUBLIC SvxNumValueSet : public ValueSet
com::sun::star::uno::Sequence<
com::sun::star::uno::Reference<
com::sun::star::container::XIndexAccess> > aOutlineSettings;
+
+ void init(sal_uInt16 nType);
+
public:
SvxNumValueSet( Window* pParent, const ResId& rResId, sal_uInt16 nType );
+ SvxNumValueSet( Window* pParent, sal_uInt16 nType );
~SvxNumValueSet();
virtual void UserDraw( const UserDrawEvent& rUDEvt );
@@ -92,6 +96,8 @@ class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet
Timer aFormatTimer;
sal_Bool bGrfNotFound;
+ void init();
+
protected:
DECL_LINK(FormatHdl_Impl, void *);
@@ -101,7 +107,8 @@ class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet
Timer& GetFormatTimer() {return aFormatTimer;}
public:
- SvxBmpNumValueSet( Window* pParent, const ResId& rResId);
+ SvxBmpNumValueSet(Window* pParent, const ResId& rResId);
+ SvxBmpNumValueSet(Window* pParent);
~SvxBmpNumValueSet();
virtual void UserDraw( const UserDrawEvent& rUDEvt );
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx
index 13a2e344bb44..741caf9c9c23 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -402,15 +402,25 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
pDev->SetLineColor(aOldColor);
}
-SvxNumValueSet::SvxNumValueSet( Window* pParent, const ResId& rResId, sal_uInt16 nType ) :
+SvxNumValueSet::SvxNumValueSet( Window* pParent, const ResId& rResId, sal_uInt16 nType )
+ : ValueSet( pParent, rResId )
+{
+ init(nType);
+}
- ValueSet( pParent, rResId ),
+SvxNumValueSet::SvxNumValueSet( Window* pParent, sal_uInt16 nType )
+ : ValueSet( pParent )
+{
+ init(nType);
+}
- aLineColor ( COL_LIGHTGRAY ),
- nPageType ( nType ),
- bHTMLMode ( sal_False ),
- pVDev ( NULL )
+void SvxNumValueSet::init(sal_uInt16 nType)
{
+ aLineColor = COL_LIGHTGRAY;
+ nPageType = nType;
+ bHTMLMode = sal_False;
+ pVDev = NULL;
+
SetColCount( 4 );
SetLineCount( 2 );
SetStyle( GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER );
@@ -465,12 +475,21 @@ void SvxNumValueSet::SetOutlineNumberingSettings(
}
}
-SvxBmpNumValueSet::SvxBmpNumValueSet( Window* pParent, const ResId& rResId ) :
+SvxBmpNumValueSet::SvxBmpNumValueSet( Window* pParent, const ResId& rResId )
+ : SvxNumValueSet( pParent, rResId, NUM_PAGETYPE_BMP )
+{
+ init();
+}
- SvxNumValueSet( pParent, rResId, NUM_PAGETYPE_BMP ),
- bGrfNotFound( sal_False )
+SvxBmpNumValueSet::SvxBmpNumValueSet( Window* pParent )
+ : SvxNumValueSet( pParent, NUM_PAGETYPE_BMP )
+{
+ init();
+}
+void SvxBmpNumValueSet::init()
{
+ bGrfNotFound = sal_False;
GalleryExplorer::BeginLocking(GALLERY_THEME_BULLETS);
SetStyle( GetStyle() | WB_VSCROLL );
SetLineCount( 3 );
@@ -478,6 +497,7 @@ SvxBmpNumValueSet::SvxBmpNumValueSet( Window* pParent, const ResId& rResId ) :
aFormatTimer.SetTimeoutHdl(LINK(this, SvxBmpNumValueSet, FormatHdl_Impl));
}
+
SvxBmpNumValueSet::~SvxBmpNumValueSet()
{
GalleryExplorer::EndLocking(GALLERY_THEME_BULLETS);