diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-09-26 15:31:01 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-09-28 08:48:54 +0100 |
commit | 2f6e8daf883fe67a1cebc2cdf9d54e41b064a55c (patch) | |
tree | 9bb4ec91a3b96fd8b8a535b69bed30ed46d9101c /svx | |
parent | de43297de3b81fd60894e4aed8574d51c68a4800 (diff) |
adapt insert character dialog to new layout
Change-Id: I5561c2684d0957b65aef0d139e9210ebdd703153
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/svx/charmap.hxx | 5 | ||||
-rw-r--r-- | svx/source/dialog/charmap.cxx | 39 |
2 files changed, 39 insertions, 5 deletions
diff --git a/svx/inc/svx/charmap.hxx b/svx/inc/svx/charmap.hxx index c3efd8ebbddd..9fe90497b3d6 100644 --- a/svx/inc/svx/charmap.hxx +++ b/svx/inc/svx/charmap.hxx @@ -53,6 +53,7 @@ class SVX_DLLPUBLIC SvxShowCharSet : public Control { public: SvxShowCharSet( Window* pParent, const ResId& rResId ); + SvxShowCharSet( Window* pParent ); ~SvxShowCharSet(); void SetFont( const Font& rFont ); @@ -87,6 +88,8 @@ public: sal_Int32 getMaxCharCount() const; #endif // _SVX_CHARMAP_CXX_ + virtual void Resize(); + protected: virtual void Paint( const Rectangle& ); virtual void MouseButtonDown( const MouseEvent& rMEvt ); @@ -130,6 +133,8 @@ private: // abstraction layers are: Unicode<->MapIndex<->Pixel Point MapIndexToPixel( int) const; DECL_LINK(VscrollHdl, void *); + + void init(); }; #endif diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 409d5cba61af..45590db46dc4 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -65,10 +65,25 @@ sal_uInt32& SvxShowCharSet::getSelectedChar() #define SBWIDTH 16 -SvxShowCharSet::SvxShowCharSet( Window* pParent, const ResId& rResId ) : - Control( pParent, rResId ) - ,m_pAccessible(NULL) - ,aVscrollSB( this, WB_VERT) +SvxShowCharSet::SvxShowCharSet(Window* pParent, const ResId& rResId) + : Control(pParent, rResId) + , m_pAccessible(NULL) + , aVscrollSB(this, WB_VERT) +{ + init(); + InitSettings( sal_True, sal_True ); +} + +SvxShowCharSet::SvxShowCharSet(Window* pParent) + : Control(pParent) + , m_pAccessible(NULL) + , aVscrollSB( this, WB_VERT) +{ + init(); + InitSettings( sal_True, sal_True ); +} + +void SvxShowCharSet::init() { nSelectedIndex = -1; // TODO: move into init list when it is no longer static @@ -81,7 +96,21 @@ SvxShowCharSet::SvxShowCharSet( Window* pParent, const ResId& rResId ) : // other settings like aVscroll depend on selected font => see SetFont bDrag = sal_False; - InitSettings( sal_True, sal_True ); +} + +void SvxShowCharSet::Resize() +{ + aOrigSize = GetOutputSizePixel(); + aOrigPos = GetPosPixel(); + + Control::Resize(); + + SetFont(GetFont()); //force recalculation of correct fontsize +} + +extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxShowCharSet(Window *pParent, VclBuilder::stringmap &) +{ + return new SvxShowCharSet(pParent); } // ----------------------------------------------------------------------- |