summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-01-13 14:52:40 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-09 21:21:05 +0100
commited2cea3e5087b90cd3686d8fd9da7e74981c8da6 (patch)
treeacf3852fcd4550285a8ebc014ac5134ff045035a /svx
parent232eec872bdaf1dd6d87df97baa3b9ad432a7acd (diff)
vcl: VclPtr conversion in svx.
Change-Id: I3a1000baa049b11728c46efbc2f0af0d8f34cf2b Conflicts: include/svx/charmap.hxx include/svx/float3d.hxx include/svx/fontwork.hxx include/svx/galctrl.hxx svx/inc/svdibrow.hxx svx/source/dialog/dlgctl3d.cxx svx/source/dialog/fontwork.cxx svx/source/engine3d/float3d.cxx svx/source/fmcomp/gridctrl.cxx svx/source/gallery2/galbrws1.cxx svx/source/inc/docrecovery.hxx
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/GalleryControl.hxx1
-rw-r--r--svx/inc/galbrws2.hxx10
-rw-r--r--svx/inc/svdibrow.hxx12
-rw-r--r--svx/inc/tbunosearchcontrollers.hxx1
-rw-r--r--svx/source/dialog/_bmpmask.cxx6
-rw-r--r--svx/source/dialog/_contdlg.cxx10
-rw-r--r--svx/source/dialog/charmap.cxx55
-rw-r--r--svx/source/dialog/checklbx.cxx6
-rw-r--r--svx/source/dialog/compressgraphicdialog.cxx4
-rw-r--r--svx/source/dialog/connctrl.cxx6
-rw-r--r--svx/source/dialog/contimp.hxx1
-rw-r--r--svx/source/dialog/contwnd.cxx4
-rw-r--r--svx/source/dialog/contwnd.hxx1
-rw-r--r--svx/source/dialog/ctredlin.cxx18
-rw-r--r--svx/source/dialog/dialcontrol.cxx4
-rw-r--r--svx/source/dialog/dlgctl3d.cxx134
-rw-r--r--svx/source/dialog/dlgctrl.cxx44
-rw-r--r--svx/source/dialog/docrecovery.cxx21
-rw-r--r--svx/source/dialog/fntctrl.cxx6
-rw-r--r--svx/source/dialog/fontwork.cxx344
-rw-r--r--svx/source/dialog/frmdirlbox.cxx4
-rw-r--r--svx/source/dialog/frmsel.cxx5
-rw-r--r--svx/source/dialog/graphctl.cxx6
-rw-r--r--svx/source/dialog/hdft.cxx6
-rw-r--r--svx/source/dialog/imapdlg.cxx6
-rw-r--r--svx/source/dialog/imapwnd.cxx6
-rw-r--r--svx/source/dialog/imapwnd.hxx1
-rw-r--r--svx/source/dialog/langbox.cxx10
-rw-r--r--svx/source/dialog/linkwarn.cxx6
-rw-r--r--svx/source/dialog/measctrl.cxx6
-rw-r--r--svx/source/dialog/pagectrl.cxx6
-rw-r--r--svx/source/dialog/passwd.cxx7
-rw-r--r--svx/source/dialog/prtqry.cxx5
-rw-r--r--svx/source/dialog/rubydialog.cxx6
-rw-r--r--svx/source/dialog/srchdlg.cxx6
-rw-r--r--svx/source/dialog/stddlg.cxx4
-rw-r--r--svx/source/dialog/svxbmpnumvalueset.cxx12
-rw-r--r--svx/source/dialog/svxruler.cxx6
-rw-r--r--svx/source/dialog/swframeexample.cxx4
-rw-r--r--svx/source/dialog/txencbox.cxx6
-rw-r--r--svx/source/engine3d/float3d.cxx17
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx6
-rw-r--r--svx/source/fmcomp/gridctrl.cxx328
-rw-r--r--svx/source/form/datanavi.cxx48
-rw-r--r--svx/source/form/filtnav.cxx12
-rw-r--r--svx/source/form/fmPropBrw.cxx6
-rw-r--r--svx/source/form/fmexpl.cxx6
-rw-r--r--svx/source/form/navigatortree.cxx6
-rw-r--r--svx/source/form/tabwin.cxx11
-rw-r--r--svx/source/form/tbxform.cxx5
-rw-r--r--svx/source/gallery2/GalleryControl.cxx18
-rw-r--r--svx/source/gallery2/galbrws1.cxx29
-rw-r--r--svx/source/gallery2/galbrws1.hxx5
-rw-r--r--svx/source/gallery2/galbrws2.cxx112
-rw-r--r--svx/source/gallery2/galctrl.cxx8
-rw-r--r--svx/source/inc/datanavi.hxx11
-rw-r--r--svx/source/inc/docrecovery.hxx10
-rw-r--r--svx/source/inc/filtnav.hxx2
-rw-r--r--svx/source/inc/fmPropBrw.hxx1
-rw-r--r--svx/source/inc/fmexpl.hxx2
-rw-r--r--svx/source/inc/tabwin.hxx2
-rw-r--r--svx/source/inc/tbxform.hxx1
-rw-r--r--svx/source/sidebar/EmptyPanel.cxx18
-rw-r--r--svx/source/sidebar/EmptyPanel.hxx7
-rw-r--r--svx/source/sidebar/PanelLayout.cxx6
-rw-r--r--svx/source/sidebar/area/AreaPropertyPanel.cxx6
-rw-r--r--svx/source/sidebar/area/AreaPropertyPanel.hxx1
-rw-r--r--svx/source/sidebar/area/AreaTransparencyGradientControl.cxx274
-rw-r--r--svx/source/sidebar/area/AreaTransparencyGradientControl.hxx31
-rw-r--r--svx/source/sidebar/graphic/GraphicPropertyPanel.cxx6
-rw-r--r--svx/source/sidebar/graphic/GraphicPropertyPanel.hxx1
-rw-r--r--svx/source/sidebar/insert/InsertPropertyPanel.cxx8
-rw-r--r--svx/source/sidebar/insert/InsertPropertyPanel.hxx3
-rw-r--r--svx/source/sidebar/line/LinePropertyPanel.cxx4
-rw-r--r--svx/source/sidebar/line/LinePropertyPanel.hxx1
-rw-r--r--svx/source/sidebar/line/LineWidthControl.cxx152
-rw-r--r--svx/source/sidebar/line/LineWidthControl.hxx13
-rw-r--r--svx/source/sidebar/line/LineWidthValueSet.cxx8
-rw-r--r--svx/source/sidebar/line/LineWidthValueSet.hxx3
-rw-r--r--svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx4
-rw-r--r--svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx1
-rw-r--r--svx/source/sidebar/paragraph/ParaPropertyPanel.cxx4
-rw-r--r--svx/source/sidebar/paragraph/ParaPropertyPanel.hxx1
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.cxx4
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.hxx1
-rw-r--r--svx/source/sidebar/possize/SidebarDialControl.cxx4
-rw-r--r--svx/source/sidebar/text/TextCharacterSpacingControl.cxx235
-rw-r--r--svx/source/sidebar/text/TextCharacterSpacingControl.hxx13
-rw-r--r--svx/source/sidebar/text/TextPropertyPanel.cxx4
-rw-r--r--svx/source/sidebar/text/TextPropertyPanel.hxx1
-rw-r--r--svx/source/sidebar/text/TextUnderlineControl.cxx166
-rw-r--r--svx/source/sidebar/text/TextUnderlineControl.hxx4
-rw-r--r--svx/source/sidebar/tools/PopupContainer.cxx7
-rw-r--r--svx/source/sidebar/tools/PopupControl.cxx7
-rw-r--r--svx/source/sidebar/tools/ValueSetWithTextControl.cxx5
-rw-r--r--svx/source/svdraw/svdibrow.cxx28
-rw-r--r--svx/source/tbxctrls/colorwindow.hxx1
-rw-r--r--svx/source/tbxctrls/colrctrl.cxx63
-rw-r--r--svx/source/tbxctrls/fillctrl.cxx6
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx6
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx51
-rw-r--r--svx/source/tbxctrls/itemwin.cxx24
-rw-r--r--svx/source/tbxctrls/layctrl.cxx20
-rw-r--r--svx/source/tbxctrls/linectrl.cxx57
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx134
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx4
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx6
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx1
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx6
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx1
-rw-r--r--svx/workben/pixelctl.cxx17
111 files changed, 1744 insertions, 1136 deletions
diff --git a/svx/inc/GalleryControl.hxx b/svx/inc/GalleryControl.hxx
index 8b58d7639ac5..11445db6e727 100644
--- a/svx/inc/GalleryControl.hxx
+++ b/svx/inc/GalleryControl.hxx
@@ -43,7 +43,6 @@ public:
GalleryControl (
SfxBindings* pBindings,
vcl::Window* pParentWindow);
- virtual ~GalleryControl (void);
bool GalleryKeyInput( const KeyEvent& rKEvt, vcl::Window* pWindow);
diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx
index 4a7760392f64..5d1b8a90c469 100644
--- a/svx/inc/galbrws2.hxx
+++ b/svx/inc/galbrws2.hxx
@@ -80,7 +80,6 @@ private:
public:
GalleryToolBox( GalleryBrowser2* pParent );
- virtual ~GalleryToolBox();
};
@@ -113,11 +112,11 @@ private:
GalleryIconView* mpIconView;
GalleryListView* mpListView;
GalleryPreview* mpPreview;
- GalleryToolBox maViewBox;
- FixedLine maSeparator;
- FixedText maInfoBar;
+ VclPtr<GalleryToolBox> maViewBox;
+ VclPtr<FixedLine> maSeparator;
+ VclPtr<FixedText> maInfoBar;
Point maDragStartPos;
- sal_uIntPtr mnCurActionPos;
+ sal_uIntPtr mnCurActionPos;
GalleryBrowserMode meMode;
GalleryBrowserMode meLastMode;
@@ -154,6 +153,7 @@ public:
GalleryBrowser2(vcl::Window* pParent, Gallery* pGallery);
virtual ~GalleryBrowser2();
+ virtual void dispose() SAL_OVERRIDE;
void SelectTheme( const OUString& rThemeName );
diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx
index 2e44db53db50..9583d43f018e 100644
--- a/svx/inc/svdibrow.hxx
+++ b/svx/inc/svdibrow.hxx
@@ -69,6 +69,7 @@ protected:
public:
_SdrItemBrowserControl(vcl::Window* pParent, WinBits nBits=WB_3DLOOK|WB_BORDER|WB_TABSTOP);
virtual ~_SdrItemBrowserControl();
+ virtual void dispose() SAL_OVERRIDE;
void Clear();
void SetAttributes(const SfxItemSet* pAttr, const SfxItemSet* p2ndSet=NULL);
sal_uIntPtr GetCurrentPos() const;
@@ -99,16 +100,17 @@ public:
#define WB_STDSIZEABLEFLOATWIN (WB_STDFLOATWIN|WB_3DLOOK|WB_CLOSEABLE|WB_SIZEMOVE)
class _SdrItemBrowserWindow: public FloatingWindow {
- _SdrItemBrowserControl aBrowse;
+ VclPtr<_SdrItemBrowserControl> aBrowse;
public:
_SdrItemBrowserWindow(vcl::Window* pParent, WinBits nBits=WB_STDSIZEABLEDOCKWIN);
virtual ~_SdrItemBrowserWindow();
+ virtual void dispose() SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
virtual void GetFocus() SAL_OVERRIDE;
- void Clear() { aBrowse.Clear(); }
- void SetAttributes(const SfxItemSet* pAttr, const SfxItemSet* p2ndSet=NULL) { aBrowse.SetAttributes(pAttr,p2ndSet); }
- const _SdrItemBrowserControl& GetBrowserControl() const { return aBrowse; }
- _SdrItemBrowserControl& GetBrowserControl() { return aBrowse; }
+ void Clear() { aBrowse->Clear(); }
+ void SetAttributes(const SfxItemSet* pAttr, const SfxItemSet* p2ndSet=NULL) { aBrowse->SetAttributes(pAttr,p2ndSet); }
+ const _SdrItemBrowserControl& GetBrowserControl() const { return aBrowse.get(); }
+ _SdrItemBrowserControl& GetBrowserControl() { return aBrowse.get(); }
};
class SdrView;
diff --git a/svx/inc/tbunosearchcontrollers.hxx b/svx/inc/tbunosearchcontrollers.hxx
index a7657eedeeaf..dd97162222cb 100644
--- a/svx/inc/tbunosearchcontrollers.hxx
+++ b/svx/inc/tbunosearchcontrollers.hxx
@@ -47,7 +47,6 @@ public:
FindTextFieldControl( vcl::Window* pParent, WinBits nStyle,
css::uno::Reference< css::frame::XFrame >& xFrame,
const css::uno::Reference< css::uno::XComponentContext >& xContext );
- virtual ~FindTextFieldControl();
virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 215869e6d376..4f79f3a4d715 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -485,12 +485,18 @@ SvxBmpMask::SvxBmpMask(SfxBindings *pBindinx, SfxChildWindow *pCW, vcl::Window*
SvxBmpMask::~SvxBmpMask()
{
+ dispose();
+}
+
+void SvxBmpMask::dispose()
+{
delete m_pQSet1;
delete m_pQSet2;
delete m_pQSet3;
delete m_pQSet4;
delete m_pCtlPipette;
delete pData;
+ SfxDockingWindow::dispose();
}
/** is called by a MaskSet when it is selected */
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index c94ed569173f..25016d30e241 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -86,10 +86,6 @@ SvxContourDlg::SvxContourDlg(SfxBindings* _pBindings, SfxChildWindow* pCW,
{
}
-SvxContourDlg::~SvxContourDlg()
-{
-}
-
tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic,
const Rectangle* pRect,
const sal_uIntPtr nFlags )
@@ -282,9 +278,15 @@ SvxSuperContourDlg::SvxSuperContourDlg(SfxBindings *_pBindings, SfxChildWindow *
SvxSuperContourDlg::~SvxSuperContourDlg()
{
+ dispose();
+}
+
+void SvxSuperContourDlg::dispose()
+{
SvtMiscOptions aMiscOptions;
aMiscOptions.RemoveListenerLink( LINK(this, SvxSuperContourDlg, MiscHdl) );
delete m_pContourWnd;
+ SvxContourDlg::dispose();
}
bool SvxSuperContourDlg::Close()
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 75ec603653b3..e9d4ffae61ca 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -56,7 +56,7 @@ sal_uInt32& SvxShowCharSet::getSelectedChar()
SvxShowCharSet::SvxShowCharSet(vcl::Window* pParent)
: Control(pParent, WB_TABSTOP | WB_BORDER)
, m_pAccessible(NULL)
- , aVscrollSB( this, WB_VERT)
+ , aVscrollSB( new ScrollBar(this, WB_VERT) )
{
init();
InitSettings( true, true );
@@ -69,8 +69,8 @@ void SvxShowCharSet::init()
m_nYGap = 0;
SetStyle( GetStyle() | WB_CLIPCHILDREN );
- aVscrollSB.SetScrollHdl( LINK( this, SvxShowCharSet, VscrollHdl ) );
- aVscrollSB.EnableDrag( true );
+ aVscrollSB->SetScrollHdl( LINK( this, SvxShowCharSet, VscrollHdl ) );
+ aVscrollSB->EnableDrag( true );
// other settings like aVscroll depend on selected font => see SetFont
bDrag = false;
@@ -190,7 +190,7 @@ void SvxShowCharSet::MouseMove( const MouseEvent& rMEvt )
void SvxShowCharSet::Command( const CommandEvent& rCEvt )
{
- if( !HandleScrollCommand( rCEvt, 0, &aVscrollSB ) )
+ if( !HandleScrollCommand( rCEvt, 0, aVscrollSB.get() ) )
Control::Command( rCEvt );
}
@@ -213,8 +213,8 @@ sal_uInt16 SvxShowCharSet::GetColumnPos(sal_uInt16 _nPos) const
int SvxShowCharSet::FirstInView( void ) const
{
int nIndex = 0;
- if( aVscrollSB.IsVisible() )
- nIndex += aVscrollSB.GetThumbPos() * COLUMN_COUNT;
+ if( aVscrollSB->IsVisible() )
+ nIndex += aVscrollSB->GetThumbPos() * COLUMN_COUNT;
return nIndex;
}
@@ -365,8 +365,8 @@ void SvxShowCharSet::DrawChars_Impl( int n1, int n2 )
return;
Size aOutputSize = GetOutputSizePixel();
- if (aVscrollSB.IsVisible())
- aOutputSize.Width() -= aVscrollSB.GetOptimalSize().Width();
+ if (aVscrollSB->IsVisible())
+ aOutputSize.Width() -= aVscrollSB->GetOptimalSize().Width();
int i;
for ( i = 1; i < COLUMN_COUNT; ++i )
@@ -513,7 +513,7 @@ void SvxShowCharSet::SetFont( const vcl::Font& rFont )
getSelectedChar() = mpFontCharMap->GetCharFromIndex( nSelectedIndex );
Size aSize = GetOutputSizePixel();
- long nSBWidth = aVscrollSB.GetOptimalSize().Width();
+ long nSBWidth = aVscrollSB->GetOptimalSize().Width();
aSize.Width() -= nSBWidth;
vcl::Font aFont = rFont;
@@ -528,18 +528,18 @@ void SvxShowCharSet::SetFont( const vcl::Font& rFont )
nX = aSize.Width() / COLUMN_COUNT;
nY = aSize.Height() / ROW_COUNT;
- aVscrollSB.setPosSizePixel( aSize.Width(), 0, nSBWidth, aSize.Height() );
- aVscrollSB.SetRangeMin( 0 );
+ aVscrollSB->setPosSizePixel( aSize.Width(), 0, nSBWidth, aSize.Height() );
+ aVscrollSB->SetRangeMin( 0 );
int nLastRow = (mpFontCharMap->GetCharCount() - 1 + COLUMN_COUNT) / COLUMN_COUNT;
- aVscrollSB.SetRangeMax( nLastRow );
- aVscrollSB.SetPageSize( ROW_COUNT-1 );
- aVscrollSB.SetVisibleSize( ROW_COUNT );
+ aVscrollSB->SetRangeMax( nLastRow );
+ aVscrollSB->SetPageSize( ROW_COUNT-1 );
+ aVscrollSB->SetVisibleSize( ROW_COUNT );
// restore last selected unicode
int nMapIndex = mpFontCharMap->GetIndexFromChar( getSelectedChar() );
SelectIndex( nMapIndex );
- aVscrollSB.Show();
+ aVscrollSB->Show();
// rearrange CharSet element in sync with nX- and nY-multiples
Size aDrawSize(nX * COLUMN_COUNT, nY * ROW_COUNT);
@@ -559,7 +559,7 @@ void SvxShowCharSet::SelectIndex( int nNewIndex, bool bFocus )
sal_uInt32 cPrev = mpFontCharMap->GetPrevChar( getSelectedChar() );
int nMapIndex = mpFontCharMap->GetIndexFromChar( cPrev );
int nNewPos = nMapIndex / COLUMN_COUNT;
- aVscrollSB.SetThumbPos( nNewPos );
+ aVscrollSB->SetThumbPos( nNewPos );
nSelectedIndex = bFocus ? nMapIndex+1 : -1;
Invalidate();
Update();
@@ -567,9 +567,9 @@ void SvxShowCharSet::SelectIndex( int nNewIndex, bool bFocus )
else if( nNewIndex < FirstInView() )
{
// need to scroll up to see selected item
- int nOldPos = aVscrollSB.GetThumbPos();
+ int nOldPos = aVscrollSB->GetThumbPos();
int nDelta = (FirstInView() - nNewIndex + COLUMN_COUNT-1) / COLUMN_COUNT;
- aVscrollSB.SetThumbPos( nOldPos - nDelta );
+ aVscrollSB->SetThumbPos( nOldPos - nDelta );
nSelectedIndex = nNewIndex;
Invalidate();
if( nDelta )
@@ -578,15 +578,15 @@ void SvxShowCharSet::SelectIndex( int nNewIndex, bool bFocus )
else if( nNewIndex > LastInView() )
{
// need to scroll down to see selected item
- int nOldPos = aVscrollSB.GetThumbPos();
+ int nOldPos = aVscrollSB->GetThumbPos();
int nDelta = (nNewIndex - LastInView() + COLUMN_COUNT) / COLUMN_COUNT;
- aVscrollSB.SetThumbPos( nOldPos + nDelta );
+ aVscrollSB->SetThumbPos( nOldPos + nDelta );
if( nNewIndex < mpFontCharMap->GetCharCount() )
{
nSelectedIndex = nNewIndex;
Invalidate();
}
- if( nOldPos != aVscrollSB.GetThumbPos() )
+ if( nOldPos != aVscrollSB->GetThumbPos() )
{
Invalidate();
Update();
@@ -603,8 +603,8 @@ void SvxShowCharSet::SelectIndex( int nNewIndex, bool bFocus )
Point aOldPixel = MapIndexToPixel( nSelectedIndex );
aOldPixel.Move( +1, +1);
Size aOutputSize = GetOutputSizePixel();
- if (aVscrollSB.IsVisible())
- aOutputSize.Width() -= aVscrollSB.GetOptimalSize().Width();
+ if (aVscrollSB->IsVisible())
+ aOutputSize.Width() -= aVscrollSB->GetOptimalSize().Width();
DrawRect( getGridRectangle(aOldPixel, aOutputSize) );
SetLineColor( aLineCol );
SetFillColor( aFillCol );
@@ -655,7 +655,7 @@ void SvxShowCharSet::SelectCharacter( sal_UCS4 cNew, bool bFocus )
if( !bFocus )
{
// move selected item to top row if not in focus
- aVscrollSB.SetThumbPos( nMapIndex / COLUMN_COUNT );
+ aVscrollSB->SetThumbPos( nMapIndex / COLUMN_COUNT );
Invalidate();
}
}
@@ -691,8 +691,15 @@ IMPL_LINK_NOARG(SvxShowCharSet, VscrollHdl)
SvxShowCharSet::~SvxShowCharSet()
{
+ dispose();
+}
+
+void SvxShowCharSet::dispose()
+{
if ( m_pAccessible )
ReleaseAccessible();
+ aVscrollSB.disposeAndClear();
+ Control::dispose();
}
void SvxShowCharSet::ReleaseAccessible()
diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx
index e7f3542e9887..514e3dec682e 100644
--- a/svx/source/dialog/checklbx.cxx
+++ b/svx/source/dialog/checklbx.cxx
@@ -50,7 +50,13 @@ void SvxCheckListBox::SetNormalStaticImage(const Image& rNormalStaticImage)
SvxCheckListBox::~SvxCheckListBox()
{
+ dispose();
+}
+
+void SvxCheckListBox::dispose()
+{
delete pCheckButton;
+ SvTreeListBox::dispose();
}
void SvxCheckListBox::Init_Impl()
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx
index 70b82e578a4a..336bfdc9268b 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -105,10 +105,6 @@ void CompressGraphicsDialog::Initialize()
Update();
}
-CompressGraphicsDialog::~CompressGraphicsDialog()
-{
-}
-
void CompressGraphicsDialog::Update()
{
GfxLinkType aLinkType = m_aGraphic.GetLink().GetType();
diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx
index 6cb31753ab37..2b636c289956 100644
--- a/svx/source/dialog/connctrl.cxx
+++ b/svx/source/dialog/connctrl.cxx
@@ -57,7 +57,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxXConnectionPreview(
SvxXConnectionPreview::~SvxXConnectionPreview()
{
+ dispose();
+}
+
+void SvxXConnectionPreview::dispose()
+{
delete pObjList;
+ Control::dispose();
}
void SvxXConnectionPreview::Resize()
diff --git a/svx/source/dialog/contimp.hxx b/svx/source/dialog/contimp.hxx
index 7b73b2829732..13bc7be668ee 100644
--- a/svx/source/dialog/contimp.hxx
+++ b/svx/source/dialog/contimp.hxx
@@ -84,6 +84,7 @@ public:
SvxSuperContourDlg(SfxBindings *pBindings, SfxChildWindow *pCW,
vcl::Window* pParent);
virtual ~SvxSuperContourDlg();
+ virtual void dispose() SAL_OVERRIDE;
void SetExecState( bool bEnable );
diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx
index cea52c2aa502..8b4fded5ab8b 100644
--- a/svx/source/dialog/contwnd.cxx
+++ b/svx/source/dialog/contwnd.cxx
@@ -43,10 +43,6 @@ ContourWindow::ContourWindow( vcl::Window* pParent, WinBits nBits ) :
SetWinStyle( WB_SDRMODE );
}
-ContourWindow::~ContourWindow()
-{
-}
-
void ContourWindow::SetPolyPolygon( const tools::PolyPolygon& rPolyPoly )
{
SdrPage* pPage = (SdrPage*) pModel->GetPage( 0 );
diff --git a/svx/source/dialog/contwnd.hxx b/svx/source/dialog/contwnd.hxx
index 2bbf9a6f2feb..e96118c8527c 100644
--- a/svx/source/dialog/contwnd.hxx
+++ b/svx/source/dialog/contwnd.hxx
@@ -50,7 +50,6 @@ protected:
public:
ContourWindow(vcl::Window* pParent, WinBits nBits);
- virtual ~ContourWindow();
void SetPolyPolygon( const tools::PolyPolygon& rPolyPoly );
const tools::PolyPolygon& GetPolyPolygon();
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index 3cd2d2628c2b..48b50b005173 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -112,7 +112,13 @@ SvxRedlinTable::SvxRedlinTable(SvSimpleTableContainer& rParent, WinBits nBits)
SvxRedlinTable::~SvxRedlinTable()
{
+ dispose();
+}
+
+void SvxRedlinTable::dispose()
+{
delete pCommentSearcher;
+ SvSimpleTable::dispose();
}
sal_Int32 SvxRedlinTable::ColCompare(SvTreeListEntry* pLeft,SvTreeListEntry* pRight)
@@ -411,7 +417,13 @@ void SvxTPView::DeactivatePage()
SvxTPView::~SvxTPView()
{
+ dispose();
+}
+
+void SvxTPView::dispose()
+{
delete m_pViewData;
+ TabPage::dispose();
}
void SvxTPView::InsertWriterHeader()
@@ -1066,8 +1078,14 @@ SvxAcceptChgCtr::SvxAcceptChgCtr(vcl::Window* pParent, VclBuilderContainer* pTop
SvxAcceptChgCtr::~SvxAcceptChgCtr()
{
+ dispose();
+}
+
+void SvxAcceptChgCtr::dispose()
+{
delete pTPView;
delete pTPFilter;
+ TabControl::dispose();
}
void SvxAcceptChgCtr::ShowFilterPage()
diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx
index 55016d24cc10..514dd1568b8e 100644
--- a/svx/source/dialog/dialcontrol.cxx
+++ b/svx/source/dialog/dialcontrol.cxx
@@ -267,10 +267,6 @@ DialControl::DialControl( vcl::Window* pParent, WinBits nBits ) :
Init( GetOutputSizePixel() );
}
-DialControl::~DialControl()
-{
-}
-
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeDialControl(vcl::Window *pParent, VclBuilder::stringmap &)
{
return new DialControl(pParent, WB_TABSTOP);
diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx
index ce4358124f81..8cf27409c106 100644
--- a/svx/source/dialog/dlgctl3d.cxx
+++ b/svx/source/dialog/dlgctl3d.cxx
@@ -69,8 +69,14 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvx3DPreviewControl(vc
Svx3DPreviewControl::~Svx3DPreviewControl()
{
+ dispose();
+}
+
+void Svx3DPreviewControl::dispose()
+{
delete mp3DView;
delete mpModel;
+ Control::dispose();
}
void Svx3DPreviewControl::Construct()
@@ -272,12 +278,6 @@ Svx3DLightControl::Svx3DLightControl(vcl::Window* pParent, WinBits nStyle)
Construct2();
}
-Svx3DLightControl::~Svx3DLightControl()
-{
- // SdrObjects like mpExpansionObject and mpLampBottomObject/mpLampShaftObject get deleted
- // with deletion of the DrawingLayer and model
-}
-
void Svx3DLightControl::Construct2()
{
{
@@ -948,10 +948,10 @@ basegfx::B3DVector Svx3DLightControl::GetLightDirection(sal_uInt32 nNum) const
SvxLightCtl3D::SvxLightCtl3D( vcl::Window* pParent)
: Control(pParent, WB_BORDER | WB_TABSTOP),
- maLightControl(this, 0),
- maHorScroller(this, WB_HORZ | WB_DRAG),
- maVerScroller(this, WB_VERT | WB_DRAG),
- maSwitcher(this, 0)
+ maLightControl(new Svx3DLightControl(this, 0)),
+ maHorScroller(new ScrollBar(this, WB_HORZ | WB_DRAG)),
+ maVerScroller(new ScrollBar(this, WB_VERT | WB_DRAG)),
+ maSwitcher(new PushButton(this, 0))
{
// init members
Init();
@@ -970,33 +970,33 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxLightCtl3D(vcl::Win
void SvxLightCtl3D::Init()
{
// #i58240# set HelpIDs for scrollbars and switcher
- maHorScroller.SetHelpId(HID_CTRL3D_HSCROLL);
- maVerScroller.SetHelpId(HID_CTRL3D_VSCROLL);
- maSwitcher.SetHelpId(HID_CTRL3D_SWITCHER);
- maSwitcher.SetAccessibleName(SVX_RESSTR(STR_SWITCH));
+ maHorScroller->SetHelpId(HID_CTRL3D_HSCROLL);
+ maVerScroller->SetHelpId(HID_CTRL3D_VSCROLL);
+ maSwitcher->SetHelpId(HID_CTRL3D_SWITCHER);
+ maSwitcher->SetAccessibleName(SVX_RESSTR(STR_SWITCH));
// Light preview
- maLightControl.Show();
- maLightControl.SetChangeCallback( LINK(this, SvxLightCtl3D, InternalInteractiveChange) );
- maLightControl.SetSelectionChangeCallback( LINK(this, SvxLightCtl3D, InternalSelectionChange) );
+ maLightControl->Show();
+ maLightControl->SetChangeCallback( LINK(this, SvxLightCtl3D, InternalInteractiveChange) );
+ maLightControl->SetSelectionChangeCallback( LINK(this, SvxLightCtl3D, InternalSelectionChange) );
// Horiz Scrollbar
- maHorScroller.Show();
- maHorScroller.SetRange(Range(0, 36000));
- maHorScroller.SetLineSize(100);
- maHorScroller.SetPageSize(1000);
- maHorScroller.SetScrollHdl( LINK(this, SvxLightCtl3D, ScrollBarMove) );
+ maHorScroller->Show();
+ maHorScroller->SetRange(Range(0, 36000));
+ maHorScroller->SetLineSize(100);
+ maHorScroller->SetPageSize(1000);
+ maHorScroller->SetScrollHdl( LINK(this, SvxLightCtl3D, ScrollBarMove) );
// Vert Scrollbar
- maVerScroller.Show();
- maVerScroller.SetRange(Range(0, 18000));
- maVerScroller.SetLineSize(100);
- maVerScroller.SetPageSize(1000);
- maVerScroller.SetScrollHdl( LINK(this, SvxLightCtl3D, ScrollBarMove) );
+ maVerScroller->Show();
+ maVerScroller->SetRange(Range(0, 18000));
+ maVerScroller->SetLineSize(100);
+ maVerScroller->SetPageSize(1000);
+ maVerScroller->SetScrollHdl( LINK(this, SvxLightCtl3D, ScrollBarMove) );
// Switch Button
- maSwitcher.Show();
- maSwitcher.SetClickHdl( LINK(this, SvxLightCtl3D, ButtonPress) );
+ maSwitcher->Show();
+ maSwitcher->SetClickHdl( LINK(this, SvxLightCtl3D, ButtonPress) );
// check selection
CheckSelection();
@@ -1007,6 +1007,16 @@ void SvxLightCtl3D::Init()
SvxLightCtl3D::~SvxLightCtl3D()
{
+ dispose();
+}
+
+void SvxLightCtl3D::dispose()
+{
+ maLightControl.disposeAndClear();
+ maHorScroller.disposeAndClear();
+ maVerScroller.disposeAndClear();
+ maSwitcher.disposeAndClear();
+ Control::dispose();
}
void SvxLightCtl3D::Resize()
@@ -1022,43 +1032,43 @@ void SvxLightCtl3D::NewLayout()
{
// Layout members
const Size aSize(GetOutputSizePixel());
- const sal_Int32 nScrollSize(maHorScroller.GetSizePixel().Height());
+ const sal_Int32 nScrollSize(maHorScroller->GetSizePixel().Height());
// Preview control
Point aPoint(0, 0);
Size aDestSize(aSize.Width() - nScrollSize, aSize.Height() - nScrollSize);
- maLightControl.SetPosSizePixel(aPoint, aDestSize);
+ maLightControl->SetPosSizePixel(aPoint, aDestSize);
// hor scrollbar
aPoint.Y() = aSize.Height() - nScrollSize;
aDestSize.Height() = nScrollSize;
- maHorScroller.SetPosSizePixel(aPoint, aDestSize);
+ maHorScroller->SetPosSizePixel(aPoint, aDestSize);
// vert scrollbar
aPoint.X() = aSize.Width() - nScrollSize;
aPoint.Y() = 0;
aDestSize.Width() = nScrollSize;
aDestSize.Height() = aSize.Height() - nScrollSize;
- maVerScroller.SetPosSizePixel(aPoint, aDestSize);
+ maVerScroller->SetPosSizePixel(aPoint, aDestSize);
// button
aPoint.Y() = aSize.Height() - nScrollSize;
aDestSize.Height() = nScrollSize;
- maSwitcher.SetPosSizePixel(aPoint, aDestSize);
+ maSwitcher->SetPosSizePixel(aPoint, aDestSize);
}
void SvxLightCtl3D::CheckSelection()
{
- const bool bSelectionValid(maLightControl.IsSelectionValid() || maLightControl.IsGeometrySelected());
- maHorScroller.Enable(bSelectionValid);
- maVerScroller.Enable(bSelectionValid);
+ const bool bSelectionValid(maLightControl->IsSelectionValid() || maLightControl->IsGeometrySelected());
+ maHorScroller->Enable(bSelectionValid);
+ maVerScroller->Enable(bSelectionValid);
if(bSelectionValid)
{
double fHor(0.0), fVer(0.0);
- maLightControl.GetPosition(fHor, fVer);
- maHorScroller.SetThumbPos( sal_Int32(fHor * 100.0) );
- maVerScroller.SetThumbPos( 18000 - sal_Int32((fVer + 90.0) * 100.0) );
+ maLightControl->GetPosition(fHor, fVer);
+ maHorScroller->SetThumbPos( sal_Int32(fHor * 100.0) );
+ maVerScroller->SetThumbPos( 18000 - sal_Int32((fVer + 90.0) * 100.0) );
}
}
@@ -1066,7 +1076,7 @@ void SvxLightCtl3D::move( double fDeltaHor, double fDeltaVer )
{
double fHor(0.0), fVer(0.0);
- maLightControl.GetPosition(fHor, fVer);
+ maLightControl->GetPosition(fHor, fVer);
fHor += fDeltaHor;
fVer += fDeltaVer;
@@ -1076,9 +1086,9 @@ void SvxLightCtl3D::move( double fDeltaHor, double fDeltaVer )
if ( fVer < -90.0 )
return;
- maLightControl.SetPosition(fHor, fVer);
- maHorScroller.SetThumbPos( sal_Int32(fHor * 100.0) );
- maVerScroller.SetThumbPos( 18000 - sal_Int32((fVer + 90.0) * 100.0) );
+ maLightControl->SetPosition(fHor, fVer);
+ maHorScroller->SetThumbPos( sal_Int32(fHor * 100.0) );
+ maVerScroller->SetThumbPos( 18000 - sal_Int32((fVer + 90.0) * 100.0) );
if(maUserInteractiveChangeCallback.IsSet())
{
@@ -1124,9 +1134,9 @@ void SvxLightCtl3D::KeyInput( const KeyEvent& rKEvt )
}
case KEY_PAGEUP:
{
- sal_Int32 nLight(maLightControl.GetSelectedLight() - 1);
+ sal_Int32 nLight(maLightControl->GetSelectedLight() - 1);
- while((nLight >= 0) && !maLightControl.GetLightOnOff(nLight))
+ while((nLight >= 0) && !maLightControl->GetLightOnOff(nLight))
{
nLight--;
}
@@ -1135,7 +1145,7 @@ void SvxLightCtl3D::KeyInput( const KeyEvent& rKEvt )
{
nLight = 7;
- while((nLight >= 0) && !maLightControl.GetLightOnOff(nLight))
+ while((nLight >= 0) && !maLightControl->GetLightOnOff(nLight))
{
nLight--;
}
@@ -1143,7 +1153,7 @@ void SvxLightCtl3D::KeyInput( const KeyEvent& rKEvt )
if(nLight >= 0)
{
- maLightControl.SelectLight(nLight);
+ maLightControl->SelectLight(nLight);
CheckSelection();
if(maUserSelectionChangeCallback.IsSet())
@@ -1156,9 +1166,9 @@ void SvxLightCtl3D::KeyInput( const KeyEvent& rKEvt )
}
case KEY_PAGEDOWN:
{
- sal_Int32 nLight(maLightControl.GetSelectedLight() - 1);
+ sal_Int32 nLight(maLightControl->GetSelectedLight() - 1);
- while(nLight <= 7 && !maLightControl.GetLightOnOff(nLight))
+ while(nLight <= 7 && !maLightControl->GetLightOnOff(nLight))
{
nLight++;
}
@@ -1167,7 +1177,7 @@ void SvxLightCtl3D::KeyInput( const KeyEvent& rKEvt )
{
nLight = 0;
- while(nLight <= 7 && !maLightControl.GetLightOnOff(nLight))
+ while(nLight <= 7 && !maLightControl->GetLightOnOff(nLight))
{
nLight++;
}
@@ -1175,7 +1185,7 @@ void SvxLightCtl3D::KeyInput( const KeyEvent& rKEvt )
if(nLight <= 7)
{
- maLightControl.SelectLight(nLight);
+ maLightControl->SelectLight(nLight);
CheckSelection();
if(maUserSelectionChangeCallback.IsSet())
@@ -1202,16 +1212,16 @@ void SvxLightCtl3D::GetFocus()
{
CheckSelection();
- Size aFocusSize = maLightControl.GetOutputSizePixel();
+ Size aFocusSize = maLightControl->GetOutputSizePixel();
aFocusSize.Width() -= 4;
aFocusSize.Height() -= 4;
Rectangle aFocusRect( Point( 2, 2 ), aFocusSize );
- aFocusRect = maLightControl.PixelToLogic( aFocusRect );
+ aFocusRect = maLightControl->PixelToLogic( aFocusRect );
- maLightControl.ShowFocus( aFocusRect );
+ maLightControl->ShowFocus( aFocusRect );
}
}
@@ -1219,15 +1229,15 @@ void SvxLightCtl3D::LoseFocus()
{
Control::LoseFocus();
- maLightControl.HideFocus();
+ maLightControl->HideFocus();
}
IMPL_LINK_NOARG(SvxLightCtl3D, ScrollBarMove)
{
- const sal_Int32 nHor(maHorScroller.GetThumbPos());
- const sal_Int32 nVer(maVerScroller.GetThumbPos());
+ const sal_Int32 nHor(maHorScroller->GetThumbPos());
+ const sal_Int32 nVer(maVerScroller->GetThumbPos());
- maLightControl.SetPosition(
+ maLightControl->SetPosition(
((double)nHor) / 100.0,
((double)((18000 - nVer) - 9000)) / 100.0);
@@ -1257,9 +1267,9 @@ IMPL_LINK_NOARG(SvxLightCtl3D, InternalInteractiveChange)
{
double fHor(0.0), fVer(0.0);
- maLightControl.GetPosition(fHor, fVer);
- maHorScroller.SetThumbPos( sal_Int32(fHor * 100.0) );
- maVerScroller.SetThumbPos( 18000 - sal_Int32((fVer + 90.0) * 100.0) );
+ maLightControl->GetPosition(fHor, fVer);
+ maHorScroller->SetThumbPos( sal_Int32(fHor * 100.0) );
+ maVerScroller->SetThumbPos( 18000 - sal_Int32((fVer + 90.0) * 100.0) );
if(maUserInteractiveChangeCallback.IsSet())
{
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 075cc89b29ae..46890c6996b9 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -106,10 +106,16 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxRectCtl(vcl::Window
SvxRectCtl::~SvxRectCtl()
{
+ dispose();
+}
+
+void SvxRectCtl::dispose()
+{
delete pBitmap;
if( pAccContext )
pAccContext->release();
+ Control::dispose();
}
@@ -841,7 +847,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxPixelCtl(vcl::Windo
SvxPixelCtl::~SvxPixelCtl( )
{
+ dispose();
+}
+
+void SvxPixelCtl::dispose()
+{
delete []pPixel;
+ Control::dispose();
}
// Changes the foreground or Background color
@@ -1594,10 +1606,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeLineLB(vcl::Window *pP
return pListBox;
}
-LineLB::~LineLB()
-{
-}
-
void LineLB::setAddStandardFields(bool bNew)
{
if(getAddStandardFields() != bNew)
@@ -1696,10 +1704,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeLineEndLB(vcl::Window
return pListBox;
}
-LineEndLB::~LineEndLB(void)
-{
-}
-
void LineEndLB::Fill( const XLineEndListRef &pList, bool bStart )
{
if( !pList.is() )
@@ -1833,8 +1837,14 @@ SvxPreviewBase::SvxPreviewBase(vcl::Window* pParent)
SvxPreviewBase::~SvxPreviewBase()
{
+ dispose();
+}
+
+void SvxPreviewBase::dispose()
+{
delete mpModel;
delete mpBufferDevice;
+ Control::dispose();
}
void SvxPreviewBase::LocalPrePaint()
@@ -1988,12 +1998,18 @@ Size SvxXLinePreview::GetOptimalSize() const
SvxXLinePreview::~SvxXLinePreview()
{
+ dispose();
+}
+
+void SvxXLinePreview::dispose()
+{
SdrObject *pFoo = mpLineObjA;
SdrObject::Free( pFoo );
pFoo = mpLineObjB;
SdrObject::Free( pFoo );
pFoo = mpLineObjC;
SdrObject::Free( pFoo );
+ SvxPreviewBase::dispose();
}
@@ -2094,7 +2110,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxXRectPreview(vcl::W
SvxXRectPreview::~SvxXRectPreview()
{
+ dispose();
+}
+
+void SvxXRectPreview::dispose()
+{
SdrObject::Free(mpRectangleObject);
+ SvxPreviewBase::dispose();
}
void SvxXRectPreview::SetAttributes(const SfxItemSet& rItemSet)
@@ -2149,8 +2171,14 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxXShadowPreview (vcl
SvxXShadowPreview::~SvxXShadowPreview()
{
+ dispose();
+}
+
+void SvxXShadowPreview::dispose()
+{
SdrObject::Free(mpRectangleObject);
SdrObject::Free(mpRectangleShadow);
+ SvxPreviewBase::dispose();
}
void SvxXShadowPreview::SetRectangleAttributes(const SfxItemSet& rItemSet)
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index b0a0653429d0..274bbaacd530 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -539,8 +539,14 @@ PluginProgressWindow::PluginProgressWindow( vcl::Window*
PluginProgressWindow::~PluginProgressWindow()
{
+ dispose();
+}
+
+void PluginProgressWindow::dispose()
+{
if (m_xProgress.is())
m_xProgress->dispose();
+ vcl::Window::dispose();
}
@@ -808,10 +814,6 @@ RecovDocList::RecovDocList(SvSimpleTableContainer& rParent, ResMgr &rResMgr)
{
}
-RecovDocList::~RecovDocList()
-{
-}
-
void RecovDocList::InitEntry(SvTreeListEntry* pEntry,
const OUString& rText,
const Image& rImage1,
@@ -901,7 +903,13 @@ RecoveryDialog::RecoveryDialog(vcl::Window* pParent, RecoveryCore* pCore)
RecoveryDialog::~RecoveryDialog()
{
+ dispose();
+}
+
+void RecoveryDialog::dispose()
+{
delete m_pFileListLB;
+ Dialog::dispose();
}
short RecoveryDialog::execute()
@@ -1232,11 +1240,6 @@ BrokenRecoveryDialog::BrokenRecoveryDialog(vcl::Window* pParent ,
}
-BrokenRecoveryDialog::~BrokenRecoveryDialog()
-{
-}
-
-
void BrokenRecoveryDialog::impl_refresh()
{
m_bExecutionNeeded = false;
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index 98a054b417d8..66ad4cf9f123 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -502,7 +502,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxFontPrevWindow(vcl:
SvxFontPrevWindow::~SvxFontPrevWindow()
{
+ dispose();
+}
+
+void SvxFontPrevWindow::dispose()
+{
delete pImpl;
+ vcl::Window::dispose();
}
diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx
index 27a067725c45..9a4777c516db 100644
--- a/svx/source/dialog/fontwork.cxx
+++ b/svx/source/dialog/fontwork.cxx
@@ -243,6 +243,7 @@ SvxFontWorkDialog::SvxFontWorkDialog(SfxBindings *pBindinx,
pCtrlItems[9] = new SvxFontWorkControllerItem(SID_FORMTEXT_SHDWXVAL, *this, rBindings);
pCtrlItems[10] = new SvxFontWorkControllerItem(SID_FORMTEXT_SHDWYVAL, *this, rBindings);
+<<<<<<< HEAD
Size aSize = m_pTbxStyle->CalcWindowSizePixel();
m_pTbxStyle->SetSizePixel(aSize);
m_pTbxStyle->SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectStyleHdl_Impl) );
@@ -281,6 +282,46 @@ SvxFontWorkDialog::SvxFontWorkDialog(SfxBindings *pBindinx,
}
m_pShadowColorLB->SetSelectHdl( LINK(this, SvxFontWorkDialog, ColorSelectHdl_Impl) );
+=======
+ Size aSize = aTbxStyle->CalcWindowSizePixel();
+ aTbxStyle->SetSizePixel(aSize);
+ aTbxStyle->SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectStyleHdl_Impl) );
+
+ aTbxAdjust->SetSizePixel(aSize);
+ aTbxAdjust->SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectAdjustHdl_Impl) );
+
+ aTbxShadow->SetSizePixel(aSize);
+ aTbxShadow->SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectShadowHdl_Impl) );
+
+ Link aLink = LINK(this, SvxFontWorkDialog, ModifyInputHdl_Impl);
+ aMtrFldDistance->SetModifyHdl( aLink );
+ aMtrFldTextStart->SetModifyHdl( aLink );
+ aMtrFldShadowX->SetModifyHdl( aLink );
+ aMtrFldShadowY->SetModifyHdl( aLink );
+
+ // Set System metric
+ const FieldUnit eDlgUnit = rBindings.GetDispatcher()->GetModule()->GetFieldUnit();
+ SetFieldUnit( *aMtrFldDistance.get(), eDlgUnit, true );
+ SetFieldUnit( *aMtrFldTextStart.get(), eDlgUnit, true );
+ SetFieldUnit( *aMtrFldShadowX.get(), eDlgUnit, true );
+ SetFieldUnit( *aMtrFldShadowY.get(), eDlgUnit, true );
+ if( eDlgUnit == FUNIT_MM )
+ {
+ aMtrFldDistance->SetSpinSize( 50 );
+ aMtrFldTextStart->SetSpinSize( 50 );
+ aMtrFldShadowX->SetSpinSize( 50 );
+ aMtrFldShadowY->SetSpinSize( 50 );
+ }
+ else
+ {
+ aMtrFldDistance->SetSpinSize( 10 );
+ aMtrFldTextStart->SetSpinSize( 10 );
+ aMtrFldShadowX->SetSpinSize( 10 );
+ aMtrFldShadowY->SetSpinSize( 10 );
+ }
+
+ aShadowColorLB->SetSelectHdl( LINK(this, SvxFontWorkDialog, ColorSelectHdl_Impl) );
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
aInputIdle.SetPriority(SchedulerPriority::LOWEST);
aInputIdle.SetIdleHdl(LINK(this, SvxFontWorkDialog, InputTimoutHdl_Impl));
@@ -288,8 +329,26 @@ SvxFontWorkDialog::SvxFontWorkDialog(SfxBindings *pBindinx,
SvxFontWorkDialog::~SvxFontWorkDialog()
{
+ dispose();
+}
+
+void SvxFontWorkDialog::dispose()
+{
for (sal_uInt16 i = 0; i < CONTROLLER_COUNT; i++)
DELETEZ(pCtrlItems[i]);
+ aTbxStyle.disposeAndClear();
+ aTbxAdjust.disposeAndClear();
+ aFbDistance.disposeAndClear();
+ aMtrFldDistance.disposeAndClear();
+ aFbTextStart.disposeAndClear();
+ aMtrFldTextStart.disposeAndClear();
+ aTbxShadow.disposeAndClear();
+ aFbShadowX.disposeAndClear();
+ aMtrFldShadowX.disposeAndClear();
+ aFbShadowY.disposeAndClear();
+ aMtrFldShadowY.disposeAndClear();
+ aShadowColorLB.disposeAndClear();
+ SfxDockingWindow::dispose();
}
SfxChildAlignment SvxFontWorkDialog::CheckAlignment( SfxChildAlignment eActAlign,
@@ -347,11 +406,16 @@ void SvxFontWorkDialog::SetStyle_Impl(const XFormTextStyleItem* pItem)
case XFT_SLANTY : nId = nStyleSlantYId; break;
default: ;//prevent warning
}
+<<<<<<< HEAD
m_pTbxStyle->Enable();
+=======
+ aTbxStyle->Enable();
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
// Make sure that there is always exactly one checked toolbox item.
if ( pItem->GetValue() == XFT_NONE )
{
+<<<<<<< HEAD
m_pTbxStyle->CheckItem(nStyleRotateId, false);
m_pTbxStyle->CheckItem(nStyleUprightId, false);
m_pTbxStyle->CheckItem(nStyleSlantXId, false);
@@ -363,12 +427,29 @@ void SvxFontWorkDialog::SetStyle_Impl(const XFormTextStyleItem* pItem)
{
m_pTbxStyle->CheckItem(nStyleOffId, false);
m_pTbxStyle->CheckItem(nId);
+=======
+ aTbxStyle->CheckItem(TBI_STYLE_ROTATE, false);
+ aTbxStyle->CheckItem(TBI_STYLE_UPRIGHT, false);
+ aTbxStyle->CheckItem(TBI_STYLE_SLANTX, false);
+ aTbxStyle->CheckItem(TBI_STYLE_SLANTY, false);
+
+ aTbxStyle->CheckItem(TBI_STYLE_OFF, true);
+ }
+ else
+ {
+ aTbxStyle->CheckItem(TBI_STYLE_OFF, false);
+ aTbxStyle->CheckItem(nId);
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
nLastStyleTbxId = nId;
}
else
+<<<<<<< HEAD
m_pTbxStyle->Disable();
+=======
+ aTbxStyle->Disable();
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
// Set adjust buttons
@@ -379,6 +460,7 @@ void SvxFontWorkDialog::SetAdjust_Impl(const XFormTextAdjustItem* pItem)
{
sal_uInt16 nId;
+<<<<<<< HEAD
m_pTbxAdjust->Enable();
m_pMtrFldDistance->Enable();
@@ -398,14 +480,41 @@ void SvxFontWorkDialog::SetAdjust_Impl(const XFormTextAdjustItem* pItem)
if ( !m_pTbxAdjust->IsItemChecked(nId) )
{
m_pTbxAdjust->CheckItem(nId);
+=======
+ aTbxAdjust->Enable();
+ aMtrFldDistance->Enable();
+
+ if ( pItem->GetValue() == XFT_LEFT || pItem->GetValue() == XFT_RIGHT )
+ {
+ if ( pItem->GetValue() == XFT_LEFT ) nId = TBI_ADJUST_LEFT;
+ else nId = TBI_ADJUST_RIGHT;
+ aMtrFldTextStart->Enable();
+ }
+ else
+ {
+ if ( pItem->GetValue() == XFT_CENTER ) nId = TBI_ADJUST_CENTER;
+ else nId = TBI_ADJUST_AUTOSIZE;
+ aMtrFldTextStart->Disable();
+ }
+
+ if ( !aTbxAdjust->IsItemChecked(nId) )
+ {
+ aTbxAdjust->CheckItem(nId);
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
nLastAdjustTbxId = nId;
}
else
{
+<<<<<<< HEAD
m_pTbxAdjust->Disable();
m_pMtrFldTextStart->Disable();
m_pMtrFldDistance->Disable();
+=======
+ aTbxAdjust->Disable();
+ aMtrFldTextStart->Disable();
+ aMtrFldDistance->Disable();
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
@@ -414,9 +523,15 @@ void SvxFontWorkDialog::SetAdjust_Impl(const XFormTextAdjustItem* pItem)
void SvxFontWorkDialog::SetDistance_Impl(const XFormTextDistanceItem* pItem)
{
// Use HasChildPathFocus() instead of HasFocus() at SpinFields
+<<<<<<< HEAD
if ( pItem && !m_pMtrFldDistance->HasChildPathFocus() )
{
SetMetricValue(*m_pMtrFldDistance, pItem->GetValue(), SFX_MAPUNIT_100TH_MM);
+=======
+ if ( pItem && !aMtrFldDistance->HasChildPathFocus() )
+ {
+ SetMetricValue( *aMtrFldDistance.get(), pItem->GetValue(), SFX_MAPUNIT_100TH_MM );
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
@@ -425,9 +540,15 @@ void SvxFontWorkDialog::SetDistance_Impl(const XFormTextDistanceItem* pItem)
void SvxFontWorkDialog::SetStart_Impl(const XFormTextStartItem* pItem)
{
// Use HasChildPathFocus() instead of HasFocus() at SpinFields
+<<<<<<< HEAD
if ( pItem && !m_pMtrFldTextStart->HasChildPathFocus() )
{
SetMetricValue(*m_pMtrFldTextStart, pItem->GetValue(), SFX_MAPUNIT_100TH_MM);
+=======
+ if ( pItem && !aMtrFldTextStart->HasChildPathFocus() )
+ {
+ SetMetricValue( *aMtrFldTextStart.get(), pItem->GetValue(), SFX_MAPUNIT_100TH_MM );
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
@@ -436,7 +557,11 @@ void SvxFontWorkDialog::SetStart_Impl(const XFormTextStartItem* pItem)
void SvxFontWorkDialog::SetMirror_Impl(const XFormTextMirrorItem* pItem)
{
if ( pItem )
+<<<<<<< HEAD
m_pTbxAdjust->CheckItem(nAdjustMirrorId, pItem->GetValue());
+=======
+ aTbxAdjust->CheckItem(TBI_ADJUST_MIRROR, pItem->GetValue());
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
// Set button for contour display
@@ -444,7 +569,11 @@ void SvxFontWorkDialog::SetMirror_Impl(const XFormTextMirrorItem* pItem)
void SvxFontWorkDialog::SetShowForm_Impl(const XFormTextHideFormItem* pItem)
{
if ( pItem )
+<<<<<<< HEAD
m_pTbxShadow->CheckItem(nShowFormId, !pItem->GetValue());
+=======
+ aTbxShadow->CheckItem(TBI_SHOWFORM, !pItem->GetValue());
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
// Set button for text border
@@ -452,7 +581,11 @@ void SvxFontWorkDialog::SetShowForm_Impl(const XFormTextHideFormItem* pItem)
void SvxFontWorkDialog::SetOutline_Impl(const XFormTextOutlineItem* pItem)
{
if ( pItem )
+<<<<<<< HEAD
m_pTbxShadow->CheckItem(nOutlineId, pItem->GetValue());
+=======
+ aTbxShadow->CheckItem(TBI_OUTLINE, pItem->GetValue());
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
// Set shadow buttons
@@ -464,6 +597,7 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
{
sal_uInt16 nId;
+<<<<<<< HEAD
m_pTbxShadow->Enable();
if ( pItem->GetValue() == XFTSHADOW_NONE )
@@ -482,12 +616,33 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
m_pMtrFldShadowX->Enable();
m_pMtrFldShadowY->Enable();
m_pShadowColorLB->Enable();
+=======
+ aTbxShadow->Enable();
+
+ if ( pItem->GetValue() == XFTSHADOW_NONE )
+ {
+ nId = TBI_SHADOW_OFF;
+ aFbShadowX->Hide();
+ aFbShadowY->Hide();
+ aMtrFldShadowX->Disable();
+ aMtrFldShadowY->Disable();
+ aShadowColorLB->Disable();
+ }
+ else
+ {
+ aFbShadowX->Show();
+ aFbShadowY->Show();
+ aMtrFldShadowX->Enable();
+ aMtrFldShadowY->Enable();
+ aShadowColorLB->Enable();
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
if ( pItem->GetValue() == XFTSHADOW_NORMAL )
{
nId = nShadowNormalId;
const FieldUnit eDlgUnit = rBindings.GetDispatcher()->GetModule()->GetFieldUnit();
+<<<<<<< HEAD
m_pMtrFldShadowX->SetUnit( eDlgUnit );
m_pMtrFldShadowX->SetDecimalDigits(2);
m_pMtrFldShadowX->SetMin(LONG_MIN);
@@ -510,6 +665,30 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
{
SetMetricValue(*m_pMtrFldShadowX, nSaveShadowX, SFX_MAPUNIT_100TH_MM);
SetMetricValue(*m_pMtrFldShadowY, nSaveShadowY, SFX_MAPUNIT_100TH_MM);
+=======
+ aMtrFldShadowX->SetUnit( eDlgUnit );
+ aMtrFldShadowX->SetDecimalDigits(2);
+ aMtrFldShadowX->SetMin(LONG_MIN);
+ aMtrFldShadowX->SetMax(LONG_MAX);
+ if( eDlgUnit == FUNIT_MM )
+ aMtrFldShadowX->SetSpinSize( 50 );
+ else
+ aMtrFldShadowX->SetSpinSize( 10 );
+
+ aMtrFldShadowY->SetUnit( eDlgUnit );
+ aMtrFldShadowY->SetDecimalDigits(2);
+ aMtrFldShadowY->SetMin(LONG_MIN);
+ aMtrFldShadowY->SetMax(LONG_MAX);
+ if( eDlgUnit == FUNIT_MM )
+ aMtrFldShadowY->SetSpinSize( 50 );
+ else
+ aMtrFldShadowY->SetSpinSize( 10 );
+
+ if ( bRestoreValues )
+ {
+ SetMetricValue( *aMtrFldShadowX.get(), nSaveShadowX, SFX_MAPUNIT_100TH_MM );
+ SetMetricValue( *aMtrFldShadowY.get(), nSaveShadowY, SFX_MAPUNIT_100TH_MM );
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
XFormTextShadowXValItem aXItem( nSaveShadowX );
XFormTextShadowYValItem aYItem( nSaveShadowY );
@@ -522,6 +701,7 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
{
nId = nShadowSlantId;
+<<<<<<< HEAD
m_pMtrFldShadowX->SetUnit(FUNIT_DEGREE);
m_pMtrFldShadowX->SetDecimalDigits(1);
m_pMtrFldShadowX->SetMin(-1800);
@@ -538,6 +718,24 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
{
m_pMtrFldShadowX->SetValue(nSaveShadowAngle);
m_pMtrFldShadowY->SetValue(nSaveShadowSize);
+=======
+ aMtrFldShadowX->SetUnit(FUNIT_CUSTOM);
+ aMtrFldShadowX->SetDecimalDigits(1);
+ aMtrFldShadowX->SetMin(-1800);
+ aMtrFldShadowX->SetMax( 1800);
+ aMtrFldShadowX->SetSpinSize(10);
+
+ aMtrFldShadowY->SetUnit(FUNIT_PERCENT);
+ aMtrFldShadowY->SetDecimalDigits(0);
+ aMtrFldShadowY->SetMin(-999);
+ aMtrFldShadowY->SetMax( 999);
+ aMtrFldShadowY->SetSpinSize(10);
+
+ if ( bRestoreValues )
+ {
+ aMtrFldShadowX->SetValue(nSaveShadowAngle);
+ aMtrFldShadowY->SetValue(nSaveShadowSize);
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
XFormTextShadowXValItem aXItem(nSaveShadowAngle);
XFormTextShadowYValItem aYItem(nSaveShadowSize);
GetBindings().GetDispatcher()->Execute(
@@ -546,9 +744,15 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
}
}
+<<<<<<< HEAD
if ( !m_pTbxShadow->IsItemChecked(nId) )
{
m_pTbxShadow->CheckItem(nId);
+=======
+ if ( !aTbxShadow->IsItemChecked(nId) )
+ {
+ aTbxShadow->CheckItem(nId);
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
nLastShadowTbxId = nId;
@@ -556,10 +760,17 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
}
else
{
+<<<<<<< HEAD
m_pTbxShadow->Disable();
m_pMtrFldShadowX->Disable();
m_pMtrFldShadowY->Disable();
m_pShadowColorLB->Disable();
+=======
+ aTbxShadow->Disable();
+ aMtrFldShadowX->Disable();
+ aMtrFldShadowY->Disable();
+ aShadowColorLB->Disable();
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
@@ -568,7 +779,11 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
void SvxFontWorkDialog::SetShadowColor_Impl(const XFormTextShadowColorItem* pItem)
{
if ( pItem )
+<<<<<<< HEAD
m_pShadowColorLB->SelectEntry(pItem->GetColorValue());
+=======
+ aShadowColorLB->SelectEntry(pItem->GetColorValue());
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
// Enter X-value for shadow in edit field
@@ -576,7 +791,11 @@ void SvxFontWorkDialog::SetShadowColor_Impl(const XFormTextShadowColorItem* pIte
void SvxFontWorkDialog::SetShadowXVal_Impl(const XFormTextShadowXValItem* pItem)
{
// Use HasChildPathFocus() instead of HasFocus() at SpinFields
+<<<<<<< HEAD
if ( pItem && !m_pMtrFldShadowX->HasChildPathFocus() )
+=======
+ if ( pItem && !aMtrFldShadowX->HasChildPathFocus() )
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
{
// #i19251#
// sal_Int32 nValue = pItem->GetValue();
@@ -585,7 +804,11 @@ void SvxFontWorkDialog::SetShadowXVal_Impl(const XFormTextShadowXValItem* pItem)
// The two involved fields/items are used double and contain/give different
// values regarding to the access method. Thus, here we need to separate the access
// methos regarding to the kind of value accessed.
+<<<<<<< HEAD
if (m_pTbxShadow->IsItemChecked(nShadowSlantId))
+=======
+ if(aTbxShadow->IsItemChecked(TBI_SHADOW_SLANT))
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
{
// #i19251#
// There is no value correction necessary at all, i think this
@@ -593,11 +816,19 @@ void SvxFontWorkDialog::SetShadowXVal_Impl(const XFormTextShadowXValItem* pItem)
// involved fields/items are used double and contain/give different
// values regarding to the access method.
// nValue = nValue - ( int( float( nValue ) / 360.0 ) * 360 );
+<<<<<<< HEAD
m_pMtrFldShadowX->SetValue(pItem->GetValue());
}
else
{
SetMetricValue(*m_pMtrFldShadowX, pItem->GetValue(), SFX_MAPUNIT_100TH_MM);
+=======
+ aMtrFldShadowX->SetValue(pItem->GetValue());
+ }
+ else
+ {
+ SetMetricValue( *aMtrFldShadowX.get(), pItem->GetValue(), SFX_MAPUNIT_100TH_MM );
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
}
@@ -607,12 +838,17 @@ void SvxFontWorkDialog::SetShadowXVal_Impl(const XFormTextShadowXValItem* pItem)
void SvxFontWorkDialog::SetShadowYVal_Impl(const XFormTextShadowYValItem* pItem)
{
// Use HasChildPathFocus() instead of HasFocus() at SpinFields
+<<<<<<< HEAD
if ( pItem && !m_pMtrFldShadowY->HasChildPathFocus() )
+=======
+ if ( pItem && !aMtrFldShadowY->HasChildPathFocus() )
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
{
// #i19251#
// The two involved fields/items are used double and contain/give different
// values regarding to the access method. Thus, here we need to separate the access
// methos regarding to the kind of value accessed.
+<<<<<<< HEAD
if (m_pTbxShadow->IsItemChecked(nShadowSlantId))
{
m_pMtrFldShadowY->SetValue(pItem->GetValue());
@@ -620,13 +856,26 @@ void SvxFontWorkDialog::SetShadowYVal_Impl(const XFormTextShadowYValItem* pItem)
else
{
SetMetricValue(*m_pMtrFldShadowY, pItem->GetValue(), SFX_MAPUNIT_100TH_MM);
+=======
+ if(aTbxShadow->IsItemChecked(TBI_SHADOW_SLANT))
+ {
+ aMtrFldShadowY->SetValue(pItem->GetValue());
+ }
+ else
+ {
+ SetMetricValue( *aMtrFldShadowY.get(), pItem->GetValue(), SFX_MAPUNIT_100TH_MM );
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
}
IMPL_LINK_NOARG(SvxFontWorkDialog, SelectStyleHdl_Impl)
{
+<<<<<<< HEAD
sal_uInt16 nId = m_pTbxStyle->GetCurItemId();
+=======
+ sal_uInt16 nId = aTbxStyle->GetCurItemId();
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
// Execute this block when a different toolbox item has been clicked or
// when the off item has been clicked. The later is necessary to
@@ -656,11 +905,19 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, SelectStyleHdl_Impl)
IMPL_LINK_NOARG(SvxFontWorkDialog, SelectAdjustHdl_Impl)
{
+<<<<<<< HEAD
sal_uInt16 nId = m_pTbxAdjust->GetCurItemId();
+=======
+ sal_uInt16 nId = aTbxAdjust->GetCurItemId();
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
if (nId == nAdjustMirrorId)
{
+<<<<<<< HEAD
XFormTextMirrorItem aItem(m_pTbxAdjust->IsItemChecked(nId));
+=======
+ XFormTextMirrorItem aItem(aTbxAdjust->IsItemChecked(nId));
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_MIRROR, SfxCallMode::SLOT, &aItem, 0L );
}
else if ( nId != nLastAdjustTbxId )
@@ -684,16 +941,28 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, SelectAdjustHdl_Impl)
IMPL_LINK_NOARG(SvxFontWorkDialog, SelectShadowHdl_Impl)
{
+<<<<<<< HEAD
sal_uInt16 nId = m_pTbxShadow->GetCurItemId();
+=======
+ sal_uInt16 nId = aTbxShadow->GetCurItemId();
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
if (nId == nShowFormId)
{
+<<<<<<< HEAD
XFormTextHideFormItem aItem(!m_pTbxShadow->IsItemChecked(nId));
+=======
+ XFormTextHideFormItem aItem(!aTbxShadow->IsItemChecked(nId));
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_HIDEFORM, SfxCallMode::RECORD, &aItem, 0L );
}
else if (nId == nOutlineId)
{
+<<<<<<< HEAD
XFormTextOutlineItem aItem(m_pTbxShadow->IsItemChecked(nId));
+=======
+ XFormTextOutlineItem aItem(aTbxShadow->IsItemChecked(nId));
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_OUTLINE, SfxCallMode::RECORD, &aItem, 0L );
}
else if (nId != nLastShadowTbxId)
@@ -702,13 +971,23 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, SelectShadowHdl_Impl)
if (nLastShadowTbxId == nShadowNormalId)
{
+<<<<<<< HEAD
nSaveShadowX = GetCoreValue(*m_pMtrFldShadowX, SFX_MAPUNIT_100TH_MM);
nSaveShadowY = GetCoreValue(*m_pMtrFldShadowY, SFX_MAPUNIT_100TH_MM);
+=======
+ nSaveShadowX = GetCoreValue( *aMtrFldShadowX.get(), SFX_MAPUNIT_100TH_MM );
+ nSaveShadowY = GetCoreValue( *aMtrFldShadowY.get(), SFX_MAPUNIT_100TH_MM );
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
else if (nLastShadowTbxId == nShadowSlantId)
{
+<<<<<<< HEAD
nSaveShadowAngle = static_cast<long>(m_pMtrFldShadowX->GetValue());
nSaveShadowSize = static_cast<long>(m_pMtrFldShadowY->GetValue());
+=======
+ nSaveShadowAngle = static_cast<long>(aMtrFldShadowX->GetValue());
+ nSaveShadowSize = static_cast<long>(aMtrFldShadowY->GetValue());
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
nLastShadowTbxId = nId;
@@ -735,6 +1014,7 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimoutHdl_Impl)
// listen, this is however not possible at the moment due to compabillity
// issues.
const FieldUnit eDlgUnit = rBindings.GetDispatcher()->GetModule()->GetFieldUnit();
+<<<<<<< HEAD
if( eDlgUnit != m_pMtrFldDistance->GetUnit() )
{
SetFieldUnit(*m_pMtrFldDistance, eDlgUnit, true);
@@ -754,6 +1034,27 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimoutHdl_Impl)
long nValue = GetCoreValue(*m_pMtrFldDistance, SFX_MAPUNIT_100TH_MM);
XFormTextDistanceItem aDistItem( nValue );
nValue = GetCoreValue(*m_pMtrFldTextStart, SFX_MAPUNIT_100TH_MM);
+=======
+ if( eDlgUnit != aMtrFldDistance->GetUnit() )
+ {
+ SetFieldUnit( *aMtrFldDistance.get(), eDlgUnit, true );
+ SetFieldUnit( *aMtrFldTextStart.get(), eDlgUnit, true );
+ aMtrFldDistance->SetSpinSize( eDlgUnit == FUNIT_MM ? 50 : 10 );
+ aMtrFldTextStart->SetSpinSize( eDlgUnit == FUNIT_MM ? 50 : 10 );
+ }
+ if( eDlgUnit != aMtrFldShadowX->GetUnit() &&
+ aTbxShadow->IsItemChecked( TBI_SHADOW_NORMAL ) )
+ {
+ SetFieldUnit( *aMtrFldShadowX.get(), eDlgUnit, true );
+ SetFieldUnit( *aMtrFldShadowY.get(), eDlgUnit, true );
+ aMtrFldShadowX->SetSpinSize( eDlgUnit == FUNIT_MM ? 50 : 10 );
+ aMtrFldShadowY->SetSpinSize( eDlgUnit == FUNIT_MM ? 50 : 10 );
+ }
+
+ long nValue = GetCoreValue( *aMtrFldDistance.get(), SFX_MAPUNIT_100TH_MM );
+ XFormTextDistanceItem aDistItem( nValue );
+ nValue = GetCoreValue( *aMtrFldTextStart.get(), SFX_MAPUNIT_100TH_MM );
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
XFormTextStartItem aStartItem( nValue );
sal_Int32 nValueX(0L);
@@ -765,13 +1066,23 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimoutHdl_Impl)
// methos regarding to the kind of value accessed.
if (nLastShadowTbxId == nShadowNormalId)
{
+<<<<<<< HEAD
nValueX = GetCoreValue(*m_pMtrFldShadowX, SFX_MAPUNIT_100TH_MM);
nValueY = GetCoreValue(*m_pMtrFldShadowY, SFX_MAPUNIT_100TH_MM);
+=======
+ nValueX = GetCoreValue( *aMtrFldShadowX.get(), SFX_MAPUNIT_100TH_MM );
+ nValueY = GetCoreValue( *aMtrFldShadowY.get(), SFX_MAPUNIT_100TH_MM );
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
else if (nLastShadowTbxId == nShadowSlantId)
{
+<<<<<<< HEAD
nValueX = static_cast<long>(m_pMtrFldShadowX->GetValue());
nValueY = static_cast<long>(m_pMtrFldShadowY->GetValue());
+=======
+ nValueX = static_cast<long>(aMtrFldShadowX->GetValue());
+ nValueY = static_cast<long>(aMtrFldShadowY->GetValue());
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
XFormTextShadowXValItem aShadowXItem( nValueX );
@@ -785,7 +1096,11 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimoutHdl_Impl)
IMPL_LINK_NOARG(SvxFontWorkDialog, ColorSelectHdl_Impl)
{
+<<<<<<< HEAD
XFormTextShadowColorItem aItem( "", m_pShadowColorLB->GetSelectEntryColor() );
+=======
+ XFormTextShadowColorItem aItem( "", aShadowColorLB->GetSelectEntryColor() );
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_SHDWCOLOR, SfxCallMode::RECORD, &aItem, 0L );
return 0;
}
@@ -795,13 +1110,19 @@ void SvxFontWorkDialog::SetColorList(const XColorListRef &pList)
if ( pList.is() && pList != pColorList )
{
pColorList = pList;
+<<<<<<< HEAD
m_pShadowColorLB->Clear();
m_pShadowColorLB->Fill(pColorList);
+=======
+ aShadowColorLB->Clear();
+ aShadowColorLB->Fill(pColorList);
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
void SvxFontWorkDialog::ApplyImageList()
{
+<<<<<<< HEAD
if (nLastShadowTbxId == nShadowSlantId)
{
m_pFbShadowX->SetImage(Image(SVX_RES(RID_SVXIMG_SHADOW_ANGLE)));
@@ -812,6 +1133,29 @@ void SvxFontWorkDialog::ApplyImageList()
m_pFbShadowX->SetImage(Image(SVX_RES(RID_SVXIMG_SHADOW_XDIST)));
m_pFbShadowY->SetImage(Image(SVX_RES(RID_SVXIMG_SHADOW_YDIST)));
}
+=======
+ ImageList& rImgLst = maImageList;
+
+ aTbxStyle->SetImageList( rImgLst );
+ aTbxAdjust->SetImageList( rImgLst );
+ aTbxShadow->SetImageList( rImgLst );
+
+ switch( nLastShadowTbxId )
+ {
+ case TBI_SHADOW_SLANT:
+ aFbShadowX->SetImage( rImgLst.GetImage( TBI_SHADOW_ANGLE ) );
+ aFbShadowY->SetImage( rImgLst.GetImage( TBI_SHADOW_SIZE ) );
+ break;
+ default:
+ aFbShadowX->SetImage( rImgLst.GetImage( TBI_SHADOW_XDIST ) );
+ aFbShadowY->SetImage( rImgLst.GetImage( TBI_SHADOW_YDIST ) );
+ break;
+ }
+
+ aFbDistance->SetImage( rImgLst.GetImage( TBI_DISTANCE ) );
+ aFbTextStart->SetImage( rImgLst.GetImage( TBI_TEXTSTART ) );
+
+>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/frmdirlbox.cxx b/svx/source/dialog/frmdirlbox.cxx
index de7ff69ddd1f..5c2465df0811 100644
--- a/svx/source/dialog/frmdirlbox.cxx
+++ b/svx/source/dialog/frmdirlbox.cxx
@@ -44,10 +44,6 @@ FrameDirectionListBox::FrameDirectionListBox( vcl::Window* pParent, WinBits nBit
{
}
-FrameDirectionListBox::~FrameDirectionListBox()
-{
-}
-
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeFrameDirectionListBox(vcl::Window *pParent, VclBuilder::stringmap &)
{
FrameDirectionListBox* pListBox = new FrameDirectionListBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK|WB_TABSTOP);
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index 911a09a1919a..305b226a4ade 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -269,6 +269,7 @@ FrameSelectorImpl::FrameSelectorImpl( FrameSelector& rFrameSel ) :
}
FrameSelectorImpl::~FrameSelectorImpl()
+
{
if( mpAccess )
mpAccess->Invalidate();
@@ -794,10 +795,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxFrameSelector(vcl::
return new FrameSelector(pParent);
}
-FrameSelector::~FrameSelector()
-{
-}
-
void FrameSelector::Initialize( FrameSelFlags nFlags )
{
mxImpl->Initialize( nFlags );
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index 2cbee8804493..d2d6d8ac57d4 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -84,6 +84,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeGraphCtrl(vcl::Window
GraphCtrl::~GraphCtrl()
{
+ dispose();
+}
+
+void GraphCtrl::dispose()
+{
if( mpAccContext )
{
mpAccContext->disposing();
@@ -92,6 +97,7 @@ GraphCtrl::~GraphCtrl()
delete pView;
delete pModel;
delete pUserCall;
+ Control::dispose();
}
void GraphCtrl::SetWinStyle( WinBits nWinBits )
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index c62b4b13c96f..dd463c0460fc 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -203,7 +203,13 @@ SvxHFPage::SvxHFPage( vcl::Window* pParent, const SfxItemSet& rSet, sal_uInt16 n
SvxHFPage::~SvxHFPage()
{
+ dispose();
+}
+
+void SvxHFPage::dispose()
+{
delete pBBSet;
+ SfxTabPage::dispose();
}
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 741379b07669..d6c3e7e84b54 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -217,9 +217,15 @@ SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, vcl::Window
SvxIMapDlg::~SvxIMapDlg()
{
+ dispose();
+}
+
+void SvxIMapDlg::dispose()
+{
// Delete URL-List
delete pIMapWnd;
delete pOwnData;
+ SfxModelessDialog::dispose();
}
bool SvxIMapDlg::Close()
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index 536750d1b763..17e6017e9823 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -72,8 +72,14 @@ IMapWindow::IMapWindow( vcl::Window* pParent, WinBits nBits, const Reference< XF
IMapWindow::~IMapWindow()
{
+ dispose();
+}
+
+void IMapWindow::dispose()
+{
SfxItemPool::Free(pIMapPool);
delete[] pItemInfo;
+ GraphCtrl::dispose();
}
Size IMapWindow::GetOptimalSize() const
diff --git a/svx/source/dialog/imapwnd.hxx b/svx/source/dialog/imapwnd.hxx
index 3d889247857e..9969c564dda2 100644
--- a/svx/source/dialog/imapwnd.hxx
+++ b/svx/source/dialog/imapwnd.hxx
@@ -134,6 +134,7 @@ public:
IMapWindow( vcl::Window* pParent, WinBits nBits, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame );
virtual ~IMapWindow();
+ virtual void dispose() SAL_OVERRIDE;
bool ReplaceActualIMapInfo( const NotifyInfo& rNewInfo );
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 7606ee3a6dd8..403f03eaabd4 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -499,11 +499,6 @@ SvxLanguageBox::SvxLanguageBox( vcl::Window* pParent, WinBits nBits, bool bCheck
ImplLanguageBoxBaseInit();
}
-SvxLanguageBox::~SvxLanguageBox()
-{
-}
-
-
SvxLanguageComboBox::SvxLanguageComboBox( vcl::Window* pParent, WinBits nBits, bool bCheck )
: ComboBox( pParent, nBits )
, SvxLanguageBoxBase( bCheck )
@@ -520,11 +515,6 @@ SvxLanguageComboBox::SvxLanguageComboBox( vcl::Window* pParent, WinBits nBits, b
SetModifyHdl( LINK( this, SvxLanguageComboBox, EditModifyHdl ) );
}
-SvxLanguageComboBox::~SvxLanguageComboBox()
-{
-}
-
-
sal_Int32 SvxLanguageBox::ImplInsertImgEntry( const OUString& rEntry, sal_Int32 nPos, bool bChecked )
{
return InsertEntry( rEntry, (bChecked ? m_aCheckedImage : m_aNotCheckedImage), nPos );
diff --git a/svx/source/dialog/linkwarn.cxx b/svx/source/dialog/linkwarn.cxx
index 9015d1ae119c..a256374ae7cd 100644
--- a/svx/source/dialog/linkwarn.cxx
+++ b/svx/source/dialog/linkwarn.cxx
@@ -43,11 +43,17 @@ SvxLinkWarningDialog::SvxLinkWarningDialog( vcl::Window* pParent, const OUString
SvxLinkWarningDialog::~SvxLinkWarningDialog()
{
+ dispose();
+}
+
+void SvxLinkWarningDialog::dispose()
+{
// save value of "warning off" checkbox, if necessary
SvtMiscOptions aMiscOpt;
bool bChecked = m_pWarningOnBox->IsChecked();
if ( aMiscOpt.ShowLinkWarningDialog() != bChecked )
aMiscOpt.SetShowLinkWarningDialog( bChecked );
+ MessageDialog::dispose();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx
index 109955906a00..3ba702b06e05 100644
--- a/svx/source/dialog/measctrl.cxx
+++ b/svx/source/dialog/measctrl.cxx
@@ -78,6 +78,11 @@ Size SvxXMeasurePreview::GetOptimalSize() const
SvxXMeasurePreview::~SvxXMeasurePreview()
{
+ dispose();
+}
+
+void SvxXMeasurePreview::dispose()
+{
// No one is deleting the MeasureObj? This is not only an error but also
// a memory leak (!). Main problem is that this object is still listening to
// a StyleSheet of the model which was set. Thus, if You want to keep the obnject,
@@ -86,6 +91,7 @@ SvxXMeasurePreview::~SvxXMeasurePreview()
delete pMeasureObj;
delete pModel;
+ Control::dispose();
}
void SvxXMeasurePreview::Paint( const Rectangle& )
diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx
index 08a7e9cbf740..6b6c245a335f 100644
--- a/svx/source/dialog/pagectrl.cxx
+++ b/svx/source/dialog/pagectrl.cxx
@@ -90,8 +90,14 @@ SvxPageWindow::SvxPageWindow(vcl::Window* pParent)
SvxPageWindow::~SvxPageWindow()
{
+ dispose();
+}
+
+void SvxPageWindow::dispose()
+{
delete pHdBorder;
delete pFtBorder;
+ vcl::Window::dispose();
}
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxPageWindow(vcl::Window *pParent, VclBuilder::stringmap &)
diff --git a/svx/source/dialog/passwd.cxx b/svx/source/dialog/passwd.cxx
index c794ebb309b5..8f80ab8119c7 100644
--- a/svx/source/dialog/passwd.cxx
+++ b/svx/source/dialog/passwd.cxx
@@ -99,11 +99,4 @@ SvxPasswordDialog::SvxPasswordDialog(vcl::Window* pParent, bool bAllowEmptyPassw
-SvxPasswordDialog::~SvxPasswordDialog()
-{
-}
-
-
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/prtqry.cxx b/svx/source/dialog/prtqry.cxx
index d14872f65be4..9a6d750f9774 100644
--- a/svx/source/dialog/prtqry.cxx
+++ b/svx/source/dialog/prtqry.cxx
@@ -37,9 +37,4 @@ SvxPrtQryBox::SvxPrtQryBox(vcl::Window* pParent) :
SetButtonHelpText( RET_OK, OUString() );
}
-SvxPrtQryBox::~SvxPrtQryBox()
-{
-}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index 7c05cd5cfa58..2400f2db2a84 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -263,9 +263,15 @@ SvxRubyDialog::SvxRubyDialog(SfxBindings *pBind, SfxChildWindow *pCW,
SvxRubyDialog::~SvxRubyDialog()
{
+ dispose();
+}
+
+void SvxRubyDialog::dispose()
+{
ClearCharStyleList();
EventObject aEvent;
xImpl->disposing(aEvent);
+ SfxModelessDialog::dispose();
}
void SvxRubyDialog::ClearCharStyleList()
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index a8b7267d0771..5820f2847cc5 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -345,6 +345,11 @@ SvxSearchDialog::SvxSearchDialog( vcl::Window* pParent, SfxChildWindow* pChildWi
SvxSearchDialog::~SvxSearchDialog()
{
+ dispose();
+}
+
+void SvxSearchDialog::dispose()
+{
Hide();
rBindings.EnterRegistrations();
@@ -359,6 +364,7 @@ SvxSearchDialog::~SvxSearchDialog()
delete pImpl;
delete pSearchList;
delete pReplaceList;
+ SfxModelessDialog::dispose();
}
void SvxSearchDialog::Construct_Impl()
diff --git a/svx/source/dialog/stddlg.cxx b/svx/source/dialog/stddlg.cxx
index d06e5245f306..9ae4ca27098f 100644
--- a/svx/source/dialog/stddlg.cxx
+++ b/svx/source/dialog/stddlg.cxx
@@ -35,8 +35,4 @@ SvxStandardDialog::SvxStandardDialog(vcl::Window *pParent, const OUString& rID,
{
}
-SvxStandardDialog::~SvxStandardDialog()
-{
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx
index 3b6ad3f66f21..32f306540137 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -423,7 +423,13 @@ void SvxNumValueSet::init(sal_uInt16 nType)
SvxNumValueSet::~SvxNumValueSet()
{
+ dispose();
+}
+
+void SvxNumValueSet::dispose()
+{
delete pVDev;
+ ValueSet::dispose();
}
void SvxNumValueSet::SetNumberingSettings(
@@ -487,8 +493,14 @@ void SvxBmpNumValueSet::init()
SvxBmpNumValueSet::~SvxBmpNumValueSet()
{
+ dispose();
+}
+
+void SvxBmpNumValueSet::dispose()
+{
GalleryExplorer::EndLocking(GALLERY_THEME_BULLETS);
aFormatIdle.Stop();
+ SvxNumValueSet::dispose();
}
void SvxBmpNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 2ac5aaeb7234..b02eb034f510 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -341,6 +341,11 @@ SvxRuler::SvxRuler(
SvxRuler::~SvxRuler()
{
+ dispose();
+}
+
+void SvxRuler::dispose()
+{
/* Destructor ruler; release internal buffer */
REMOVE_DEBUG_WINDOW
if(bListening)
@@ -353,6 +358,7 @@ SvxRuler::~SvxRuler()
delete[] pCtrlItem;
pBindings->LeaveRegistrations();
+ Ruler::dispose();
}
long SvxRuler::MakePositionSticky(long aPosition, long aPointOfReference, bool aSnapToFrameMargin) const
diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx
index 236e5d6cd766..4cc31515198a 100644
--- a/svx/source/dialog/swframeexample.cxx
+++ b/svx/source/dialog/swframeexample.cxx
@@ -62,10 +62,6 @@ Size SvxSwFrameExample::GetOptimalSize() const
return LogicToPixel(Size(52, 86), MapMode(MAP_APPFONT));
}
-SvxSwFrameExample::~SvxSwFrameExample()
-{
-}
-
void SvxSwFrameExample::InitColors_Impl( void )
{
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx
index 1f453d57f5d2..2eb940b2036e 100644
--- a/svx/source/dialog/txencbox.cxx
+++ b/svx/source/dialog/txencbox.cxx
@@ -59,7 +59,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxTextEncodingBox(vcl
SvxTextEncodingBox::~SvxTextEncodingBox()
{
+ dispose();
+}
+
+void SvxTextEncodingBox::dispose()
+{
delete m_pEncTable;
+ ListBox::dispose();
}
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
index 6a9bd08ab0d8..cf1237616383 100644
--- a/svx/source/engine3d/float3d.cxx
+++ b/svx/source/engine3d/float3d.cxx
@@ -325,6 +325,11 @@ Svx3DWin::Svx3DWin(SfxBindings* pInBindings, SfxChildWindow *pCW, vcl::Window* p
Svx3DWin::~Svx3DWin()
{
+ dispose();
+}
+
+void Svx3DWin::dispose()
+{
delete p3DView;
delete pVDev;
delete pModel;
@@ -336,6 +341,16 @@ Svx3DWin::~Svx3DWin()
delete mpRemember2DAttributes;
delete mpImpl;
+
+ aBtnGeo.disposeAndClear();
+ aBtnRepresentation.disposeAndClear();
+ aBtnLight.disposeAndClear();
+ aBtnTexture.disposeAndClear();
+ aBtnMaterial.disposeAndClear();
+ aBtnUpdate.disposeAndClear();
+ aBtnAssign.disposeAndClear();
+
+ SfxDockingWindow::dispose();
}
@@ -2270,7 +2285,7 @@ IMPL_LINK( Svx3DWin, ClickViewTypeHdl, void *, pBtn )
m_pBtnLight->Check( eViewType == VIEWTYPE_LIGHT );
m_pBtnTexture->Check( eViewType == VIEWTYPE_TEXTURE );
m_pBtnMaterial->Check( eViewType == VIEWTYPE_MATERIAL );
- }
+ }
return 0L;
}
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index f905336585ac..0ad429b2bcee 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -134,7 +134,13 @@ FmGridHeader::FmGridHeader( BrowseBox* pParent, WinBits nWinBits)
FmGridHeader::~FmGridHeader()
{
+ dispose();
+}
+
+void FmGridHeader::dispose()
+{
delete m_pImpl;
+ FmGridHeader::dispose();
}
sal_uInt16 FmGridHeader::GetModelColumnPos(sal_uInt16 nId) const
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 84a3bde94af9..a60522a62698 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -333,72 +333,92 @@ void DbGridControl::NavigationBar::PositionDataSource(sal_Int32 nRecord)
DbGridControl::NavigationBar::NavigationBar(vcl::Window* pParent, WinBits nStyle)
:Control(pParent, nStyle)
- ,m_aRecordText(this, WB_VCENTER)
- ,m_aAbsolute(this, WB_CENTER | WB_VCENTER)
- ,m_aRecordOf(this, WB_VCENTER)
- ,m_aRecordCount(this, WB_VCENTER)
- ,m_aFirstBtn(this, WB_RECTSTYLE|WB_NOPOINTERFOCUS)
- ,m_aPrevBtn(this, WB_REPEAT|WB_RECTSTYLE|WB_NOPOINTERFOCUS)
- ,m_aNextBtn(this, WB_REPEAT|WB_RECTSTYLE|WB_NOPOINTERFOCUS)
- ,m_aLastBtn(this, WB_RECTSTYLE|WB_NOPOINTERFOCUS)
- ,m_aNewBtn(this, WB_RECTSTYLE|WB_NOPOINTERFOCUS)
+ ,m_aRecordText(new FixedText(this, WB_VCENTER))
+ ,m_aAbsolute(new DbGridControl::NavigationBar::AbsolutePos(this, WB_CENTER | WB_VCENTER))
+ ,m_aRecordOf(new FixedText(this, WB_VCENTER))
+ ,m_aRecordCount(new FixedText(this, WB_VCENTER))
+ ,m_aFirstBtn(new ImageButton(this, WB_RECTSTYLE|WB_NOPOINTERFOCUS))
+ ,m_aPrevBtn(new ImageButton(this, WB_REPEAT|WB_RECTSTYLE|WB_NOPOINTERFOCUS))
+ ,m_aNextBtn(new ImageButton(this, WB_REPEAT|WB_RECTSTYLE|WB_NOPOINTERFOCUS))
+ ,m_aLastBtn(new ImageButton(this, WB_RECTSTYLE|WB_NOPOINTERFOCUS))
+ ,m_aNewBtn(new ImageButton(this, WB_RECTSTYLE|WB_NOPOINTERFOCUS))
,m_nDefaultWidth(0)
,m_nCurrentPos(-1)
,m_bPositioning(false)
{
- m_aFirstBtn.SetSymbol(SymbolType::FIRST);
- m_aPrevBtn.SetSymbol(SymbolType::PREV);
- m_aNextBtn.SetSymbol(SymbolType::NEXT);
- m_aLastBtn.SetSymbol(SymbolType::LAST);
- m_aNewBtn.SetModeImage(static_cast<DbGridControl*>(pParent)->GetImage(DbGridControl_Base::NEW));
+ m_aFirstBtn->SetSymbol(SymbolType::FIRST);
+ m_aPrevBtn->SetSymbol(SymbolType::PREV);
+ m_aNextBtn->SetSymbol(SymbolType::NEXT);
+ m_aLastBtn->SetSymbol(SymbolType::LAST);
+ m_aNewBtn->SetModeImage(static_cast<DbGridControl*>(pParent)->GetImage(DbGridControl_Base::NEW));
- m_aFirstBtn.SetHelpId(HID_GRID_TRAVEL_FIRST);
- m_aPrevBtn.SetHelpId(HID_GRID_TRAVEL_PREV);
- m_aNextBtn.SetHelpId(HID_GRID_TRAVEL_NEXT);
- m_aLastBtn.SetHelpId(HID_GRID_TRAVEL_LAST);
- m_aNewBtn.SetHelpId(HID_GRID_TRAVEL_NEW);
- m_aAbsolute.SetHelpId(HID_GRID_TRAVEL_ABSOLUTE);
- m_aRecordCount.SetHelpId(HID_GRID_NUMBEROFRECORDS);
+ m_aFirstBtn->SetHelpId(HID_GRID_TRAVEL_FIRST);
+ m_aPrevBtn->SetHelpId(HID_GRID_TRAVEL_PREV);
+ m_aNextBtn->SetHelpId(HID_GRID_TRAVEL_NEXT);
+ m_aLastBtn->SetHelpId(HID_GRID_TRAVEL_LAST);
+ m_aNewBtn->SetHelpId(HID_GRID_TRAVEL_NEW);
+ m_aAbsolute->SetHelpId(HID_GRID_TRAVEL_ABSOLUTE);
+ m_aRecordCount->SetHelpId(HID_GRID_NUMBEROFRECORDS);
// Handler fuer Buttons einrichten
- m_aFirstBtn.SetClickHdl(LINK(this,NavigationBar,OnClick));
- m_aPrevBtn.SetClickHdl(LINK(this,NavigationBar,OnClick));
- m_aNextBtn.SetClickHdl(LINK(this,NavigationBar,OnClick));
- m_aLastBtn.SetClickHdl(LINK(this,NavigationBar,OnClick));
- m_aNewBtn.SetClickHdl(LINK(this,NavigationBar,OnClick));
+ m_aFirstBtn->SetClickHdl(LINK(this,NavigationBar,OnClick));
+ m_aPrevBtn->SetClickHdl(LINK(this,NavigationBar,OnClick));
+ m_aNextBtn->SetClickHdl(LINK(this,NavigationBar,OnClick));
+ m_aLastBtn->SetClickHdl(LINK(this,NavigationBar,OnClick));
+ m_aNewBtn->SetClickHdl(LINK(this,NavigationBar,OnClick));
- m_aRecordText.SetText(SVX_RESSTR(RID_STR_REC_TEXT));
- m_aRecordOf.SetText(SVX_RESSTR(RID_STR_REC_FROM_TEXT));
- m_aRecordCount.SetText(OUString('?'));
+ m_aRecordText->SetText(SVX_RESSTR(RID_STR_REC_TEXT));
+ m_aRecordOf->SetText(SVX_RESSTR(RID_STR_REC_FROM_TEXT));
+ m_aRecordCount->SetText(OUString('?'));
m_nDefaultWidth = ArrangeControls();
- m_aFirstBtn.Disable();
- m_aPrevBtn.Disable();
- m_aNextBtn.Disable();
- m_aLastBtn.Disable();
- m_aNewBtn.Disable();
- m_aRecordText.Disable();
- m_aRecordOf.Disable();
- m_aRecordCount.Disable();
- m_aAbsolute.Disable();
-
- AllSettings aSettings = m_aNextBtn.GetSettings();
+ m_aFirstBtn->Disable();
+ m_aPrevBtn->Disable();
+ m_aNextBtn->Disable();
+ m_aLastBtn->Disable();
+ m_aNewBtn->Disable();
+ m_aRecordText->Disable();
+ m_aRecordOf->Disable();
+ m_aRecordCount->Disable();
+ m_aAbsolute->Disable();
+
+ AllSettings aSettings = m_aNextBtn->GetSettings();
MouseSettings aMouseSettings = aSettings.GetMouseSettings();
aMouseSettings.SetButtonRepeat(aMouseSettings.GetButtonRepeat() / 4);
aSettings.SetMouseSettings(aMouseSettings);
- m_aNextBtn.SetSettings(aSettings, true);
- m_aPrevBtn.SetSettings(aSettings, true);
+ m_aNextBtn->SetSettings(aSettings, true);
+ m_aPrevBtn->SetSettings(aSettings, true);
- m_aFirstBtn.Show();
- m_aPrevBtn.Show();
- m_aNextBtn.Show();
- m_aLastBtn.Show();
- m_aNewBtn.Show();
- m_aRecordText.Show();
- m_aRecordOf.Show();
- m_aRecordCount.Show();
- m_aAbsolute.Show();
+ m_aFirstBtn->Show();
+ m_aPrevBtn->Show();
+ m_aNextBtn->Show();
+ m_aLastBtn->Show();
+ m_aNewBtn->Show();
+ m_aRecordText->Show();
+ m_aRecordOf->Show();
+ m_aRecordCount->Show();
+ m_aAbsolute->Show();
+}
+
+
+DbGridControl::NavigationBar::~NavigationBar()
+{
+ dispose();
+}
+
+void DbGridControl::NavigationBar::dispose()
+{
+ m_aRecordText.disposeAndClear();
+ m_aAbsolute.disposeAndClear();
+ m_aRecordOf.disposeAndClear();
+ m_aRecordCount.disposeAndClear();
+ m_aFirstBtn.disposeAndClear();
+ m_aPrevBtn.disposeAndClear();
+ m_aNextBtn.disposeAndClear();
+ m_aLastBtn.disposeAndClear();
+ m_aNewBtn.disposeAndClear();
+ Control::dispose();
}
namespace
@@ -423,56 +443,56 @@ sal_uInt16 DbGridControl::NavigationBar::ArrangeControls()
sal_uInt16 nY = 0;
// Is the font of this edit larger than the field?
- if (m_aAbsolute.GetTextHeight() > nH)
+ if (m_aAbsolute->GetTextHeight() > nH)
{
- vcl::Font aApplFont (m_aAbsolute.GetFont());
- const Size pointAbsoluteSize(m_aAbsolute.PixelToLogic( Size( 0, nH - 2 ), MapMode(MAP_POINT) ));
+ vcl::Font aApplFont (m_aAbsolute->GetFont());
+ const Size pointAbsoluteSize(m_aAbsolute->PixelToLogic( Size( 0, nH - 2 ), MapMode(MAP_POINT) ));
aApplFont.SetSize( pointAbsoluteSize );
- m_aAbsolute.SetControlFont( aApplFont );
+ m_aAbsolute->SetControlFont( aApplFont );
aApplFont.SetTransparent( true );
- m_aRecordText.SetControlFont( aApplFont );
- m_aRecordOf.SetControlFont( aApplFont );
- m_aRecordCount.SetControlFont( aApplFont );
+ m_aRecordText->SetControlFont( aApplFont );
+ m_aRecordOf->SetControlFont( aApplFont );
+ m_aRecordCount->SetControlFont( aApplFont );
}
// set size and position of the control
- OUString aText = m_aRecordText.GetText();
- long nTextWidth = m_aRecordText.GetTextWidth(aText);
- m_aRecordText.SetPosPixel(Point(nX,nY));
- m_aRecordText.SetSizePixel(Size(nTextWidth,nH));
+ OUString aText = m_aRecordText->GetText();
+ long nTextWidth = m_aRecordText->GetTextWidth(aText);
+ m_aRecordText->SetPosPixel(Point(nX,nY));
+ m_aRecordText->SetSizePixel(Size(nTextWidth,nH));
nX = sal::static_int_cast< sal_uInt16 >(nX + nTextWidth + aBorder.Width());
// count an extra hairspace (U+200A) left and right
- const OUString sevenDigits(m_aAbsolute.CreateFieldText(6000000));
+ const OUString sevenDigits(m_aAbsolute->CreateFieldText(6000000));
const OUString hairSpace(static_cast<sal_Unicode>(0x200A));
OUString textPattern(hairSpace);
textPattern += sevenDigits;
textPattern += hairSpace;
- nTextWidth = m_aAbsolute.GetTextWidth( textPattern );
- m_aAbsolute.SetPosPixel(Point(nX,nY));
- m_aAbsolute.SetSizePixel(Size(nTextWidth, nH));
+ nTextWidth = m_aAbsolute->GetTextWidth( textPattern );
+ m_aAbsolute->SetPosPixel(Point(nX,nY));
+ m_aAbsolute->SetSizePixel(Size(nTextWidth, nH));
nX = sal::static_int_cast< sal_uInt16 >(nX + nTextWidth + aBorder.Width());
- aText = m_aRecordOf.GetText();
- nTextWidth = m_aRecordOf.GetTextWidth(aText);
- m_aRecordOf.SetPosPixel(Point(nX,nY));
- m_aRecordOf.SetSizePixel(Size(nTextWidth,nH));
+ aText = m_aRecordOf->GetText();
+ nTextWidth = m_aRecordOf->GetTextWidth(aText);
+ m_aRecordOf->SetPosPixel(Point(nX,nY));
+ m_aRecordOf->SetSizePixel(Size(nTextWidth,nH));
nX = sal::static_int_cast< sal_uInt16 >(nX + nTextWidth + aBorder.Width());
textPattern = sevenDigits + " * (" + sevenDigits + ")";
- nTextWidth = m_aRecordCount.GetTextWidth( textPattern );
- m_aRecordCount.SetPosPixel(Point(nX,nY));
- m_aRecordCount.SetSizePixel(Size(nTextWidth,nH));
+ nTextWidth = m_aRecordCount->GetTextWidth( textPattern );
+ m_aRecordCount->SetPosPixel(Point(nX,nY));
+ m_aRecordCount->SetSizePixel(Size(nTextWidth,nH));
nX = sal::static_int_cast< sal_uInt16 >(nX + nTextWidth + aBorder.Width());
Point aButtonPos(nX,nY);
const Size aButtonSize(nH,nH);
- SetPosAndSize(m_aFirstBtn, aButtonPos, aButtonSize);
- SetPosAndSize(m_aPrevBtn, aButtonPos, aButtonSize);
- SetPosAndSize(m_aNextBtn, aButtonPos, aButtonSize);
- SetPosAndSize(m_aLastBtn, aButtonPos, aButtonSize);
- SetPosAndSize(m_aNewBtn, aButtonPos, aButtonSize);
+ SetPosAndSize(*m_aFirstBtn.get(), aButtonPos, aButtonSize);
+ SetPosAndSize(*m_aPrevBtn.get(), aButtonPos, aButtonSize);
+ SetPosAndSize(*m_aNextBtn.get(), aButtonPos, aButtonSize);
+ SetPosAndSize(*m_aLastBtn.get(), aButtonPos, aButtonSize);
+ SetPosAndSize(*m_aNewBtn.get(), aButtonPos, aButtonSize);
nX = sal::static_int_cast< sal_uInt16 >(aButtonPos.X() + 1);
@@ -486,15 +506,15 @@ IMPL_LINK(DbGridControl::NavigationBar, OnClick, Button *, pButton )
if (pParent->m_aMasterSlotExecutor.IsSet())
{
long lResult = 0;
- if (pButton == &m_aFirstBtn)
+ if (pButton == m_aFirstBtn.get())
lResult = pParent->m_aMasterSlotExecutor.Call(reinterpret_cast<void*>(RECORD_FIRST));
- else if( pButton == &m_aPrevBtn )
+ else if( pButton == m_aPrevBtn.get() )
lResult = pParent->m_aMasterSlotExecutor.Call(reinterpret_cast<void*>(RECORD_PREV));
- else if( pButton == &m_aNextBtn )
+ else if( pButton == m_aNextBtn.get() )
lResult = pParent->m_aMasterSlotExecutor.Call(reinterpret_cast<void*>(RECORD_NEXT));
- else if( pButton == &m_aLastBtn )
+ else if( pButton == m_aLastBtn.get() )
lResult = pParent->m_aMasterSlotExecutor.Call(reinterpret_cast<void*>(RECORD_LAST));
- else if( pButton == &m_aNewBtn )
+ else if( pButton == m_aNewBtn.get() )
lResult = pParent->m_aMasterSlotExecutor.Call(reinterpret_cast<void*>(RECORD_NEW));
if (lResult)
@@ -502,15 +522,15 @@ IMPL_LINK(DbGridControl::NavigationBar, OnClick, Button *, pButton )
return 0;
}
- if (pButton == &m_aFirstBtn)
+ if (pButton == m_aFirstBtn.get())
pParent->MoveToFirst();
- else if( pButton == &m_aPrevBtn )
+ else if( pButton == m_aPrevBtn.get() )
pParent->MoveToPrev();
- else if( pButton == &m_aNextBtn )
+ else if( pButton == m_aNextBtn.get() )
pParent->MoveToNext();
- else if( pButton == &m_aLastBtn )
+ else if( pButton == m_aLastBtn.get() )
pParent->MoveToLast();
- else if( pButton == &m_aNewBtn )
+ else if( pButton == m_aNewBtn.get() )
pParent->AppendNew();
return 0;
}
@@ -607,60 +627,60 @@ void DbGridControl::NavigationBar::SetState(sal_uInt16 nWhich)
switch (nWhich)
{
case NavigationBar::RECORD_FIRST:
- pWnd = &m_aFirstBtn;
+ pWnd = m_aFirstBtn.get();
break;
case NavigationBar::RECORD_PREV:
- pWnd = &m_aPrevBtn;
+ pWnd = m_aPrevBtn.get();
break;
case NavigationBar::RECORD_NEXT:
- pWnd = &m_aNextBtn;
+ pWnd = m_aNextBtn.get();
break;
case NavigationBar::RECORD_LAST:
- pWnd = &m_aLastBtn;
+ pWnd = m_aLastBtn.get();
break;
case NavigationBar::RECORD_NEW:
- pWnd = &m_aNewBtn;
+ pWnd = m_aNewBtn.get();
break;
case NavigationBar::RECORD_ABSOLUTE:
- pWnd = &m_aAbsolute;
+ pWnd = m_aAbsolute.get();
if (bAvailable)
{
if (pParent->m_nTotalCount >= 0)
{
if (pParent->IsCurrentAppending())
- m_aAbsolute.SetMax(pParent->m_nTotalCount + 1);
+ m_aAbsolute->SetMax(pParent->m_nTotalCount + 1);
else
- m_aAbsolute.SetMax(pParent->m_nTotalCount);
+ m_aAbsolute->SetMax(pParent->m_nTotalCount);
}
else
- m_aAbsolute.SetMax(LONG_MAX);
+ m_aAbsolute->SetMax(LONG_MAX);
- m_aAbsolute.SetValue(m_nCurrentPos + 1);
+ m_aAbsolute->SetValue(m_nCurrentPos + 1);
}
else
- m_aAbsolute.SetText(OUString());
+ m_aAbsolute->SetText(OUString());
break;
case NavigationBar::RECORD_TEXT:
- pWnd = &m_aRecordText;
+ pWnd = m_aRecordText.get();
break;
case NavigationBar::RECORD_OF:
- pWnd = &m_aRecordOf;
+ pWnd = m_aRecordOf.get();
break;
case NavigationBar::RECORD_COUNT:
{
- pWnd = &m_aRecordCount;
+ pWnd = m_aRecordCount.get();
OUString aText;
if (bAvailable)
{
if (pParent->GetOptions() & DbGridControl::OPT_INSERT)
{
if (pParent->IsCurrentAppending() && !pParent->IsModified())
- aText = m_aAbsolute.CreateFieldText(pParent->GetRowCount());
+ aText = m_aAbsolute->CreateFieldText(pParent->GetRowCount());
else
- aText = m_aAbsolute.CreateFieldText(pParent->GetRowCount() - 1);
+ aText = m_aAbsolute->CreateFieldText(pParent->GetRowCount() - 1);
}
else
- aText = m_aAbsolute.CreateFieldText(pParent->GetRowCount());
+ aText = m_aAbsolute->CreateFieldText(pParent->GetRowCount());
if(!pParent->m_bRecordCountFinal)
aText += " *";
}
@@ -672,7 +692,7 @@ void DbGridControl::NavigationBar::SetState(sal_uInt16 nWhich)
{
OUString aExtendedInfo(aText);
aExtendedInfo += " (";
- aExtendedInfo += m_aAbsolute.CreateFieldText(pParent->GetSelectRowCount());
+ aExtendedInfo += m_aAbsolute->CreateFieldText(pParent->GetSelectRowCount());
aExtendedInfo += ")";
pWnd->SetText(aExtendedInfo);
}
@@ -700,8 +720,8 @@ void DbGridControl::NavigationBar::Resize()
void DbGridControl::NavigationBar::Paint(const Rectangle& rRect)
{
Control::Paint(rRect);
- Point aAbsolutePos = m_aAbsolute.GetPosPixel();
- Size aAbsoluteSize = m_aAbsolute.GetSizePixel();
+ Point aAbsolutePos = m_aAbsolute->GetPosPixel();
+ Size aAbsoluteSize = m_aAbsolute->GetSizePixel();
DrawLine(Point(aAbsolutePos.X() - 1, 0 ),
Point(aAbsolutePos.X() - 1, aAbsolutePos.Y() + aAbsoluteSize.Height()));
@@ -714,15 +734,15 @@ void DbGridControl::NavigationBar::StateChanged( StateChangedType nType )
{
Control::StateChanged( nType );
- vcl::Window* pWindows[] = { &m_aRecordText,
- &m_aAbsolute,
- &m_aRecordOf,
- &m_aRecordCount,
- &m_aFirstBtn,
- &m_aPrevBtn,
- &m_aNextBtn,
- &m_aLastBtn,
- &m_aNewBtn
+ vcl::Window* pWindows[] = { m_aRecordText.get(),
+ m_aAbsolute.get(),
+ m_aRecordOf.get(),
+ m_aRecordCount.get(),
+ m_aFirstBtn.get(),
+ m_aPrevBtn.get(),
+ m_aNextBtn.get(),
+ m_aLastBtn.get(),
+ m_aNewBtn.get()
};
switch ( nType )
@@ -868,7 +888,7 @@ DbGridControl::DbGridControl(
WinBits nBits)
:DbGridControl_Base(pParent, EBBF_NONE, nBits, DEFAULT_BROWSE_MODE )
,m_xContext(_rxContext)
- ,m_aBar(this)
+ ,m_aBar(new DbGridControl::NavigationBar(this))
,m_nAsynAdjustEvent(0)
,m_pDataSourcePropMultiplexer(NULL)
,m_pDataSourcePropListener(NULL)
@@ -903,8 +923,8 @@ DbGridControl::DbGridControl(
{
OUString sName(SVX_RESSTR(RID_STR_NAVIGATIONBAR));
- m_aBar.SetAccessibleName(sName);
- m_aBar.Show();
+ m_aBar->SetAccessibleName(sName);
+ m_aBar->Show();
ImplInitWindow( InitAll );
}
@@ -931,6 +951,11 @@ void DbGridControl::Init()
DbGridControl::~DbGridControl()
{
+ dispose();
+}
+
+void DbGridControl::dispose()
+{
RemoveColumns();
{
@@ -961,6 +986,9 @@ DbGridControl::~DbGridControl()
delete m_pDataCursor;
delete m_pSeekCursor;
+ m_aBar.disposeAndClear();
+
+ DbGridControl_Base::dispose();
}
void DbGridControl::StateChanged( StateChangedType nType )
@@ -1017,7 +1045,7 @@ void DbGridControl::Select()
DbGridControl_Base::Select();
// as the selected rows may have changed, update the according display in our navigation bar
- m_aBar.InvalidateState(NavigationBar::RECORD_COUNT);
+ m_aBar->InvalidateState(NavigationBar::RECORD_COUNT);
if (m_pGridListener)
m_pGridListener->selectionChanged();
@@ -1036,7 +1064,7 @@ void DbGridControl::ImplInitWindow( const InitWindowFacet _eInitWhat )
{
if ( m_bNavigationBar )
{
- m_aBar.EnableRTL( IsRTLEnabled() );
+ m_aBar->EnableRTL( IsRTLEnabled() );
}
}
@@ -1044,13 +1072,13 @@ void DbGridControl::ImplInitWindow( const InitWindowFacet _eInitWhat )
{
if ( m_bNavigationBar )
{
- vcl::Font aFont = m_aBar.GetSettings().GetStyleSettings().GetFieldFont();
+ vcl::Font aFont = m_aBar->GetSettings().GetStyleSettings().GetFieldFont();
if ( IsControlFont() )
- m_aBar.SetControlFont( GetControlFont() );
+ m_aBar->SetControlFont( GetControlFont() );
else
- m_aBar.SetControlFont();
+ m_aBar->SetControlFont();
- m_aBar.SetZoom( GetZoom() );
+ m_aBar->SetZoom( GetZoom() );
}
}
@@ -1109,7 +1137,7 @@ void DbGridControl::RemoveRows()
// reset number of sentences to zero in the browser
DbGridControl_Base::RemoveRows();
- m_aBar.InvalidateAll(m_nCurrentPos, true);
+ m_aBar->InvalidateAll(m_nCurrentPos, true);
}
void DbGridControl::ArrangeControls(sal_uInt16& nX, sal_uInt16 nY)
@@ -1117,9 +1145,9 @@ void DbGridControl::ArrangeControls(sal_uInt16& nX, sal_uInt16 nY)
// positioning of the controls
if (m_bNavigationBar)
{
- nX = m_aBar.GetDefaultWidth();
+ nX = m_aBar->GetDefaultWidth();
Rectangle aRect(GetControlArea());
- m_aBar.SetPosSizePixel(Point(0,nY + 1), Size(nX, aRect.GetSize().Height() - 1));
+ m_aBar->SetPosSizePixel(Point(0,nY + 1), Size(nX, aRect.GetSize().Height() - 1));
}
}
@@ -1177,9 +1205,9 @@ void DbGridControl::EnableNavigationBar(bool bEnable)
if (bEnable)
{
- m_aBar.Show();
- m_aBar.Enable();
- m_aBar.InvalidateAll(m_nCurrentPos, true);
+ m_aBar->Show();
+ m_aBar->Enable();
+ m_aBar->InvalidateAll(m_nCurrentPos, true);
if ( adjustModeForScrollbars( m_nMode, m_bNavigationBar, m_bHideScrollbars ) )
SetMode( m_nMode );
@@ -1193,8 +1221,8 @@ void DbGridControl::EnableNavigationBar(bool bEnable)
}
else
{
- m_aBar.Hide();
- m_aBar.Disable();
+ m_aBar->Hide();
+ m_aBar->Disable();
if ( adjustModeForScrollbars( m_nMode, m_bNavigationBar, m_bHideScrollbars ) )
SetMode( m_nMode );
@@ -1560,7 +1588,7 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, sal_uInt
if (!IsResizing() && GetRowCount())
RecalcRows(GetTopRow(), GetVisibleRows(), true);
- m_aBar.InvalidateAll(m_nCurrentPos, true);
+ m_aBar->InvalidateAll(m_nCurrentPos, true);
SetUpdateMode(true);
// start listening on the seek cursor
@@ -1846,7 +1874,7 @@ void DbGridControl::RowInserted(long nRow, long nNumRows, bool bDoPaint, bool bK
m_nTotalCount += nNumRows;
DbGridControl_Base::RowInserted(nRow, nNumRows, bDoPaint, bKeepSelection);
- m_aBar.InvalidateState(NavigationBar::RECORD_COUNT);
+ m_aBar->InvalidateState(NavigationBar::RECORD_COUNT);
}
}
@@ -1865,7 +1893,7 @@ void DbGridControl::RowRemoved(long nRow, long nNumRows, bool bDoPaint)
m_nTotalCount -= nNumRows;
DbGridControl_Base::RowRemoved(nRow, nNumRows, bDoPaint);
- m_aBar.InvalidateState(NavigationBar::RECORD_COUNT);
+ m_aBar->InvalidateState(NavigationBar::RECORD_COUNT);
}
}
@@ -1916,7 +1944,7 @@ void DbGridControl::AdjustRows()
GoToRowColumnId(nNewPos, GetColumnId(GetCurColumnId()));
if (!IsResizing() && GetRowCount())
RecalcRows(GetTopRow(), GetVisibleRows(), true);
- m_aBar.InvalidateAll(m_nCurrentPos, true);
+ m_aBar->InvalidateAll(m_nCurrentPos, true);
}
else // too few
RowInserted(GetRowCount(), -nDelta, true);
@@ -1929,7 +1957,7 @@ void DbGridControl::AdjustRows()
else
m_nTotalCount = GetRowCount();
}
- m_aBar.InvalidateState(NavigationBar::RECORD_COUNT);
+ m_aBar->InvalidateState(NavigationBar::RECORD_COUNT);
}
DbGridControl_Base::RowStatus DbGridControl::GetRowStatus(long nRow) const
@@ -2096,7 +2124,7 @@ void DbGridControl::CursorMoved()
}
DbGridControl_Base::CursorMoved();
- m_aBar.InvalidateAll(m_nCurrentPos);
+ m_aBar->InvalidateAll(m_nCurrentPos);
// select the new column when they moved
if ( IsDesignMode() && GetSelectedColumnCount() > 0 && GetCurColumnId() )
@@ -2203,7 +2231,7 @@ void DbGridControl::AdjustDataSource(bool bFull)
// if the data cursor was moved from outside, this section is voided
SetNoSelection();
- m_aBar.InvalidateAll(m_nCurrentPos, m_xCurrentRow.Is());
+ m_aBar->InvalidateAll(m_nCurrentPos, m_xCurrentRow.Is());
}
sal_Int32 DbGridControl::AlignSeekCursor()
@@ -2496,7 +2524,7 @@ void DbGridControl::MoveToPosition(sal_uInt32 nPos)
}
}
DbGridControl_Base::GoToRow(nPos);
- m_aBar.InvalidateAll(m_nCurrentPos);
+ m_aBar->InvalidateAll(m_nCurrentPos);
}
void DbGridControl::AppendNew()
@@ -2551,7 +2579,7 @@ void DbGridControl::SetDesignMode(bool bMode)
GetDataWindow().SetMouseTransparent(bMode);
SetMouseTransparent(bMode);
- m_aBar.InvalidateAll(m_nCurrentPos, true);
+ m_aBar->InvalidateAll(m_nCurrentPos, true);
}
}
@@ -2686,7 +2714,7 @@ void DbGridControl::DataSourcePropertyChanged(const PropertyChangeEvent& evt) th
{
RowInserted(GetRowCount(), 1, true);
InvalidateStatusCell(m_nCurrentPos);
- m_aBar.InvalidateAll(m_nCurrentPos);
+ m_aBar->InvalidateAll(m_nCurrentPos);
}
}
else
@@ -2698,7 +2726,7 @@ void DbGridControl::DataSourcePropertyChanged(const PropertyChangeEvent& evt) th
{
RowRemoved(GetRowCount() - 1, 1, true);
InvalidateStatusCell(m_nCurrentPos);
- m_aBar.InvalidateAll(m_nCurrentPos);
+ m_aBar->InvalidateAll(m_nCurrentPos);
}
}
}
@@ -2907,7 +2935,7 @@ void DbGridControl::CellModified()
// increment RowCount
RowInserted(GetRowCount(), 1, true);
InvalidateStatusCell(m_nCurrentPos);
- m_aBar.InvalidateAll(m_nCurrentPos);
+ m_aBar->InvalidateAll(m_nCurrentPos);
}
}
else if (m_xCurrentRow->GetStatus() != GRS_MODIFIED)
@@ -2990,7 +3018,7 @@ void DbGridControl::Undo()
{ // maybe we already removed it (in resetCurrentRow, called if the above moveToInsertRow
// caused our data source form to be reset - which should be the usual case ....)
RowRemoved(GetRowCount() - 1, 1, true);
- m_aBar.InvalidateAll(m_nCurrentPos);
+ m_aBar->InvalidateAll(m_nCurrentPos);
}
RowModified(m_nCurrentPos);
@@ -3017,7 +3045,7 @@ void DbGridControl::resetCurrentRow()
if (m_nCurrentPos == GetRowCount() - 2)
{
RowRemoved(GetRowCount() - 1, 1, true);
- m_aBar.InvalidateAll(m_nCurrentPos);
+ m_aBar->InvalidateAll(m_nCurrentPos);
}
}
}
@@ -3184,7 +3212,7 @@ bool DbGridControl::SaveRow()
bool DbGridControl::PreNotify(NotifyEvent& rEvt)
{
// do not handle events of the Navbar
- if (m_aBar.IsWindowOrChild(rEvt.GetWindow()))
+ if (m_aBar->IsWindowOrChild(rEvt.GetWindow()))
return BrowseBox::PreNotify(rEvt);
switch (rEvt.GetType())
@@ -3601,7 +3629,7 @@ Reference<XAccessible > DbGridControl::CreateAccessibleControl( sal_Int32 _nInde
Reference<XAccessible > xRet;
if ( _nIndex == DbGridControl_Base::GetAccessibleControlCount() )
{
- xRet = m_aBar.GetAccessible();
+ xRet = m_aBar->GetAccessible();
}
else
xRet = DbGridControl_Base::CreateAccessibleControl( _nIndex );
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 8ecf292a752d..25545780fc62 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -142,7 +142,13 @@ namespace svxform
DataTreeListBox::~DataTreeListBox()
{
+ dispose();
+ }
+
+ void DataTreeListBox::dispose()
+ {
DeleteAndClear();
+ SvTreeListBox::dispose();
}
sal_Int8 DataTreeListBox::AcceptDrop( const AcceptDropEvent& /*rEvt*/ )
@@ -368,10 +374,6 @@ namespace svxform
ItemSelectHdl( m_pItemList );
}
- XFormsPage::~XFormsPage()
- {
- }
-
IMPL_LINK_NOARG(XFormsPage, TbxSelectHdl)
{
DoToolBoxAction( m_pToolBox->GetCurItemId() );
@@ -1405,6 +1407,11 @@ namespace svxform
DataNavigatorWindow::~DataNavigatorWindow()
{
+ dispose();
+ }
+
+ void DataNavigatorWindow::dispose()
+ {
SvtViewOptions aViewOpt( E_TABDIALOG, CFGNAME_DATANAVIGATOR );
aViewOpt.SetPageID( static_cast< sal_Int32 >( m_pTabCtrl->GetCurPageId() ) );
Any aAny;
@@ -1423,6 +1430,7 @@ namespace svxform
m_xFrame->removeFrameActionListener( xListener );
RemoveBroadcaster();
m_xDataListener.clear();
+ vcl::Window::dispose();
}
@@ -2131,24 +2139,30 @@ namespace svxform
WinBits(WB_STDMODELESS|WB_SIZEABLE|WB_ROLLABLE|WB_3DLOOK|WB_DOCKABLE) ),
SfxControllerItem( SID_FM_DATANAVIGATOR_CONTROL, *_pBindings ),
- m_aDataWin( this, _pBindings )
+ m_aDataWin( new DataNavigatorWindow(this, _pBindings) )
{
SetText( SVX_RES( RID_STR_DATANAVIGATOR ) );
- Size aSize = m_aDataWin.GetOutputSizePixel();
+ Size aSize = m_aDataWin->GetOutputSizePixel();
Size aLogSize = PixelToLogic( aSize, MAP_APPFONT );
SfxDockingWindow::SetFloatingSize( aLogSize );
- m_aDataWin.Show();
+ m_aDataWin->Show();
}
DataNavigator::~DataNavigator()
{
+ dispose();
}
+ void DataNavigator::dispose()
+ {
+ m_aDataWin.disposeAndClear();
+ SfxDockingWindow::dispose();
+ }
void DataNavigator::StateChanged( sal_uInt16 , SfxItemState , const SfxPoolItem* )
{
@@ -2203,7 +2217,7 @@ namespace svxform
Point aExplPos = LogicToPixel( Point(1,1), MAP_APPFONT );
Size aExplSize = LogicToPixel( aLogExplSize, MAP_APPFONT );
- m_aDataWin.SetPosSizePixel( aExplPos, aExplSize );
+ m_aDataWin->SetPosSizePixel( aExplPos, aExplSize );
}
@@ -2269,6 +2283,11 @@ namespace svxform
AddDataItemDialog::~AddDataItemDialog()
{
+ dispose();
+ }
+
+ void AddDataItemDialog::dispose()
+ {
if ( m_xTempBinding.is() )
{
Reference< css::xforms::XModel > xModel( m_xUIHelper, UNO_QUERY );
@@ -2291,6 +2310,7 @@ namespace svxform
// remove binding, if it does not convey 'useful' information
m_xUIHelper->removeBindingIfUseless( m_xBinding );
}
+ ModalDialog::dispose();
}
@@ -2872,7 +2892,13 @@ namespace svxform
NamespaceItemDialog::~NamespaceItemDialog()
{
+ dispose();
+ }
+
+ void NamespaceItemDialog::dispose()
+ {
delete m_pNamespacesList;
+ ModalDialog::dispose();
}
@@ -3063,9 +3089,15 @@ namespace svxform
AddSubmissionDialog::~AddSubmissionDialog()
{
+ dispose();
+ }
+
+ void AddSubmissionDialog::dispose()
+ {
// #i38991# if we have added a binding, we need to remove it as well.
if( m_xCreatedBinding.is() && m_xUIHelper.is() )
m_xUIHelper->removeBindingIfUseless( m_xCreatedBinding );
+ ModalDialog::dispose();
}
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 03132a72c56b..d5a48f67b5ef 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -1150,8 +1150,14 @@ FmFilterNavigator::FmFilterNavigator( vcl::Window* pParent )
FmFilterNavigator::~FmFilterNavigator()
{
+ dispose();
+}
+
+void FmFilterNavigator::dispose()
+{
EndListening( *m_pModel );
delete m_pModel;
+ SvTreeListBox::dispose();
}
@@ -1861,7 +1867,13 @@ FmFilterNavigatorWin::FmFilterNavigatorWin( SfxBindings* _pBindings, SfxChildWin
FmFilterNavigatorWin::~FmFilterNavigatorWin()
{
+ dispose();
+}
+
+void FmFilterNavigatorWin::dispose()
+{
delete m_pNavigator;
+ SfxDockingWindow::dispose();
}
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index 57def61a0037..f3a43260a1cc 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -253,6 +253,11 @@ void FmPropBrw::Resize()
FmPropBrw::~FmPropBrw()
{
+ dispose();
+}
+
+void FmPropBrw::dispose()
+{
if (m_xBrowserController.is())
implDetachController();
try
@@ -275,6 +280,7 @@ FmPropBrw::~FmPropBrw()
{
DBG_UNHANDLED_EXCEPTION();
}
+ SfxFloatingWindow::dispose();
}
diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx
index 4a7a53bd89a9..49caf56b6154 100644
--- a/svx/source/form/fmexpl.cxx
+++ b/svx/source/form/fmexpl.cxx
@@ -514,7 +514,13 @@ namespace svxform
NavigatorFrame::~NavigatorFrame()
{
+ dispose();
+ }
+
+ void NavigatorFrame::dispose()
+ {
delete m_pNavigatorTree;
+ SfxDockingWindow::dispose();
}
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index 46a444d35bff..7fd263069ede 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -162,6 +162,11 @@ namespace svxform
NavigatorTree::~NavigatorTree()
{
+ dispose();
+ }
+
+ void NavigatorTree::dispose()
+ {
if( nEditEvent )
Application::RemoveUserEvent( nEditEvent );
@@ -172,6 +177,7 @@ namespace svxform
EndListening( *m_pNavModel );
Clear();
delete m_pNavModel;
+ SvTreeListBox::dispose();
}
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index 6328a455c68c..19a306d8e43c 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -114,11 +114,6 @@ FmFieldWinListBox::FmFieldWinListBox( FmFieldWin* pParent )
}
-FmFieldWinListBox::~FmFieldWinListBox()
-{
-}
-
-
sal_Int8 FmFieldWinListBox::AcceptDrop( const AcceptDropEvent& /*rEvt*/ )
{
return DND_ACTION_NONE;
@@ -192,6 +187,11 @@ FmFieldWin::FmFieldWin(SfxBindings* _pBindings, SfxChildWindow* _pMgr, vcl::Wind
FmFieldWin::~FmFieldWin()
{
+ dispose();
+}
+
+void FmFieldWin::dispose()
+{
if (m_pChangeListener)
{
m_pChangeListener->dispose();
@@ -200,6 +200,7 @@ FmFieldWin::~FmFieldWin()
}
delete pListBox;
delete pData;
+ SfxFloatingWindow::dispose();
}
diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx
index 3c3e8f72eabb..6cd514a4aab4 100644
--- a/svx/source/form/tbxform.cxx
+++ b/svx/source/form/tbxform.cxx
@@ -59,11 +59,6 @@ SvxFmAbsRecWin::SvxFmAbsRecWin( vcl::Window* _pParent, SfxToolBoxControl* _pCont
}
-SvxFmAbsRecWin::~SvxFmAbsRecWin()
-{
-}
-
-
void SvxFmAbsRecWin::FirePosition( bool _bForce )
{
if ( _bForce || IsValueChangedFromSaved() )
diff --git a/svx/source/gallery2/GalleryControl.cxx b/svx/source/gallery2/GalleryControl.cxx
index 5c3679ecfc01..02a508952e15 100644
--- a/svx/source/gallery2/GalleryControl.cxx
+++ b/svx/source/gallery2/GalleryControl.cxx
@@ -65,10 +65,6 @@ GalleryControl::GalleryControl (
InitSettings();
}
-GalleryControl::~GalleryControl (void)
-{
-}
-
void GalleryControl::InitSettings (void)
{
SetBackground( Wallpaper( GALLERY_DLG_COLOR ) );
@@ -181,19 +177,19 @@ bool GalleryControl::GalleryKeyInput( const KeyEvent& rKEvt, vcl::Window* )
if( mpBrowser1->mpThemes->HasChildPathFocus( true ) )
mpBrowser2->GetViewWindow()->GrabFocus();
else if( mpBrowser2->GetViewWindow()->HasFocus() )
- mpBrowser2->maViewBox.GrabFocus();
- else if( mpBrowser2->maViewBox.HasFocus() )
- mpBrowser1->maNewTheme.GrabFocus();
+ mpBrowser2->maViewBox->GrabFocus();
+ else if( mpBrowser2->maViewBox->HasFocus() )
+ mpBrowser1->maNewTheme->GrabFocus();
else
mpBrowser1->mpThemes->GrabFocus();
}
else
{
if( mpBrowser1->mpThemes->HasChildPathFocus( true ) )
- mpBrowser1->maNewTheme.GrabFocus();
- else if( mpBrowser1->maNewTheme.HasFocus() )
- mpBrowser2->maViewBox.GrabFocus();
- else if( mpBrowser2->maViewBox.HasFocus() )
+ mpBrowser1->maNewTheme->GrabFocus();
+ else if( mpBrowser1->maNewTheme->HasFocus() )
+ mpBrowser2->maViewBox->GrabFocus();
+ else if( mpBrowser2->maViewBox->HasFocus() )
mpBrowser2->GetViewWindow()->GrabFocus();
else
mpBrowser1->mpThemes->GrabFocus();
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index f6af4e4fb090..e245dee4480e 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -51,10 +51,6 @@ GalleryButton::GalleryButton( GalleryBrowser1* pParent, WinBits nWinBits ) :
{
}
-GalleryButton::~GalleryButton()
-{
-}
-
void GalleryButton::KeyInput( const KeyEvent& rKEvt )
{
if( !static_cast< GalleryBrowser1* >( GetParent() )->KeyInput( rKEvt, this ) )
@@ -69,10 +65,6 @@ GalleryThemeListBox::GalleryThemeListBox( GalleryBrowser1* pParent, WinBits nWin
InitSettings();
}
-GalleryThemeListBox::~GalleryThemeListBox()
-{
-}
-
void GalleryThemeListBox::InitSettings()
{
SetBackground( Wallpaper( GALLERY_BG_COLOR ) );
@@ -119,7 +111,7 @@ GalleryBrowser1::GalleryBrowser1(
const ::boost::function<void(void)>& rThemeSlectionHandler)
:
Control ( pParent, WB_TABSTOP ),
- maNewTheme ( this, WB_3DLOOK ),
+ maNewTheme ( new GalleryButton(this, WB_3DLOOK) ),
mpThemes ( new GalleryThemeListBox( this, WB_TABSTOP | WB_3DLOOK | WB_BORDER | WB_HSCROLL | WB_VSCROLL | WB_AUTOHSCROLL | WB_SORT ) ),
mpGallery ( pGallery ),
mpExchangeData ( new ExchangeData ),
@@ -132,13 +124,13 @@ GalleryBrowser1::GalleryBrowser1(
{
StartListening( *mpGallery );
- maNewTheme.SetHelpId( HID_GALLERY_NEWTHEME );
- maNewTheme.SetText( GAL_RESSTR(RID_SVXSTR_GALLERY_CREATETHEME));
- maNewTheme.SetClickHdl( LINK( this, GalleryBrowser1, ClickNewThemeHdl ) );
+ maNewTheme->SetHelpId( HID_GALLERY_NEWTHEME );
+ maNewTheme->SetText( GAL_RESSTR(RID_SVXSTR_GALLERY_CREATETHEME));
+ maNewTheme->SetClickHdl( LINK( this, GalleryBrowser1, ClickNewThemeHdl ) );
// disable creation of new themes if a writable directory is not available
if( mpGallery->GetUserURL().GetProtocol() == INetProtocol::NotValid )
- maNewTheme.Disable();
+ maNewTheme->Disable();
mpThemes->SetHelpId( HID_GALLERY_THEMELIST );
mpThemes->SetSelectHdl( LINK( this, GalleryBrowser1, SelectThemeHdl ) );
@@ -148,17 +140,24 @@ GalleryBrowser1::GalleryBrowser1(
ImplInsertThemeEntry( mpGallery->GetThemeInfo( i ) );
ImplAdjustControls();
- maNewTheme.Show( true );
+ maNewTheme->Show( true );
mpThemes->Show( true );
}
GalleryBrowser1::~GalleryBrowser1()
{
+ dispose();
+}
+
+void GalleryBrowser1::dispose()
+{
EndListening( *mpGallery );
delete mpThemes;
mpThemes = NULL;
delete mpExchangeData;
mpExchangeData = NULL;
+ maNewTheme.disposeAndClear();
+ Control::dispose();
}
sal_uIntPtr GalleryBrowser1::ImplInsertThemeEntry( const GalleryThemeEntry* pEntry )
@@ -190,7 +189,7 @@ void GalleryBrowser1::ImplAdjustControls()
const long nNewThemeHeight = LogicToPixel( Size( 0, 14 ), MAP_APPFONT ).Height();
const long nStartY = nNewThemeHeight + 4;
- maNewTheme.SetPosSizePixel( Point(),
+ maNewTheme->SetPosSizePixel( Point(),
Size( aOutSize.Width(), nNewThemeHeight ) );
mpThemes->SetPosSizePixel( Point( 0, nStartY ),
diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx
index ce391f0d170a..1b24dd9c63a4 100644
--- a/svx/source/gallery2/galbrws1.hxx
+++ b/svx/source/gallery2/galbrws1.hxx
@@ -41,7 +41,6 @@ private:
public:
GalleryButton( GalleryBrowser1* pParent, WinBits nWinBits );
- virtual ~GalleryButton();
};
// - GalleryThemeListBox -
@@ -58,7 +57,6 @@ protected:
public:
GalleryThemeListBox( GalleryBrowser1* pParent, WinBits nWinBits );
- virtual ~GalleryThemeListBox();
};
// - GalleryBrowser1 -
@@ -82,7 +80,7 @@ class GalleryBrowser1 : public Control, SfxListener
private:
- GalleryButton maNewTheme;
+ VclPtr<GalleryButton> maNewTheme;
GalleryThemeListBox* mpThemes;
Gallery* mpGallery;
ExchangeData* mpExchangeData;
@@ -127,6 +125,7 @@ public:
const ::boost::function<sal_Bool(const KeyEvent&,Window*)>& rKeyInputHandler,
const ::boost::function<void(void)>& rThemeSlectionHandler);
virtual ~GalleryBrowser1();
+ virtual void dispose() SAL_OVERRIDE;
void SelectTheme( const OUString& rThemeName ) { mpThemes->SelectEntry( rThemeName ); SelectThemeHdl( NULL ); }
void SelectTheme( sal_uIntPtr nThemePos ) { mpThemes->SelectEntryPos( (sal_uInt16) nThemePos ); SelectThemeHdl( NULL ); }
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index e23ab737acf3..83849bf2b161 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -403,10 +403,6 @@ GalleryToolBox::GalleryToolBox( GalleryBrowser2* pParent ) :
{
}
-GalleryToolBox::~GalleryToolBox()
-{
-}
-
void GalleryToolBox::KeyInput( const KeyEvent& rKEvt )
{
if( !static_cast< GalleryBrowser2* >( GetParent() )->KeyInput( rKEvt, this ) )
@@ -421,9 +417,9 @@ GalleryBrowser2::GalleryBrowser2( vcl::Window* pParent, Gallery* pGallery ) :
mpIconView ( new GalleryIconView( this, NULL ) ),
mpListView ( new GalleryListView( this, NULL ) ),
mpPreview ( new GalleryPreview(this) ),
- maViewBox ( this ),
- maSeparator ( this, WB_VERT ),
- maInfoBar ( this, WB_LEFT | WB_VCENTER ),
+ maViewBox ( new GalleryToolBox(this) ),
+ maSeparator ( new FixedLine(this, WB_VERT) ),
+ maInfoBar ( new FixedText(this, WB_LEFT | WB_VCENTER) ),
mnCurActionPos ( 0xffffffff ),
meMode ( GALLERYBROWSERMODE_NONE ),
meLastMode ( GALLERYBROWSERMODE_NONE )
@@ -438,29 +434,29 @@ GalleryBrowser2::GalleryBrowser2( vcl::Window* pParent, Gallery* pGallery ) :
Image aDummyImage;
const Link aSelectHdl( LINK( this, GalleryBrowser2, SelectObjectHdl ) );
- vcl::Font aInfoFont( maInfoBar.GetControlFont() );
+ vcl::Font aInfoFont( maInfoBar->GetControlFont() );
maMiscOptions.AddListenerLink( LINK( this, GalleryBrowser2, MiscHdl ) );
- maViewBox.InsertItem( TBX_ID_ICON, aDummyImage );
- maViewBox.SetItemBits( TBX_ID_ICON, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK );
- maViewBox.SetHelpId( TBX_ID_ICON, HID_GALLERY_ICONVIEW );
- maViewBox.SetQuickHelpText( TBX_ID_ICON, GAL_RESSTR(RID_SVXSTR_GALLERY_ICONVIEW) );
+ maViewBox->InsertItem( TBX_ID_ICON, aDummyImage );
+ maViewBox->SetItemBits( TBX_ID_ICON, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK );
+ maViewBox->SetHelpId( TBX_ID_ICON, HID_GALLERY_ICONVIEW );
+ maViewBox->SetQuickHelpText( TBX_ID_ICON, GAL_RESSTR(RID_SVXSTR_GALLERY_ICONVIEW) );
- maViewBox.InsertItem( TBX_ID_LIST, aDummyImage );
- maViewBox.SetItemBits( TBX_ID_LIST, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK );
- maViewBox.SetHelpId( TBX_ID_LIST, HID_GALLERY_LISTVIEW );
- maViewBox.SetQuickHelpText( TBX_ID_LIST, GAL_RESSTR(RID_SVXSTR_GALLERY_LISTVIEW) );
+ maViewBox->InsertItem( TBX_ID_LIST, aDummyImage );
+ maViewBox->SetItemBits( TBX_ID_LIST, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK );
+ maViewBox->SetHelpId( TBX_ID_LIST, HID_GALLERY_LISTVIEW );
+ maViewBox->SetQuickHelpText( TBX_ID_LIST, GAL_RESSTR(RID_SVXSTR_GALLERY_LISTVIEW) );
MiscHdl( NULL );
- maViewBox.SetSelectHdl( LINK( this, GalleryBrowser2, SelectTbxHdl ) );
- maViewBox.Show();
+ maViewBox->SetSelectHdl( LINK( this, GalleryBrowser2, SelectTbxHdl ) );
+ maViewBox->Show();
mpIconView->SetAccessibleName(SVX_RESSTR(RID_SVXSTR_GALLERY_THEMEITEMS));
mpListView->SetAccessibleName(SVX_RESSTR(RID_SVXSTR_GALLERY_THEMEITEMS));
- maInfoBar.Show();
- maSeparator.Show();
+ maInfoBar->Show();
+ maSeparator->Show();
mpIconView->SetSelectHdl( aSelectHdl );
mpListView->SetSelectHdl( aSelectHdl );
@@ -469,15 +465,20 @@ GalleryBrowser2::GalleryBrowser2( vcl::Window* pParent, Gallery* pGallery ) :
SetMode( ( GALLERYBROWSERMODE_PREVIEW != GalleryBrowser2::meInitMode ) ? GalleryBrowser2::meInitMode : GALLERYBROWSERMODE_ICON );
- if(maInfoBar.GetText().isEmpty())
+ if(maInfoBar->GetText().isEmpty())
mpIconView->SetAccessibleRelationLabeledBy(mpIconView);
else
- mpIconView->SetAccessibleRelationLabeledBy(&maInfoBar);
+ mpIconView->SetAccessibleRelationLabeledBy(maInfoBar.get());
mpIconView->SetAccessibleRelationMemberOf(mpIconView);
}
GalleryBrowser2::~GalleryBrowser2()
{
+ dispose();
+}
+
+void GalleryBrowser2::dispose()
+{
maMiscOptions.RemoveListenerLink( LINK( this, GalleryBrowser2, MiscHdl ) );
delete mpPreview;
@@ -486,23 +487,26 @@ GalleryBrowser2::~GalleryBrowser2()
if( mpCurTheme )
mpGallery->ReleaseTheme( mpCurTheme, *this );
-
+ maSeparator.disposeAndClear();
+ maInfoBar.disposeAndClear();
+ maViewBox.disposeAndClear();
+ Control::dispose();
}
void GalleryBrowser2::InitSettings()
{
- vcl::Font aInfoFont( maInfoBar.GetControlFont() );
+ vcl::Font aInfoFont( maInfoBar->GetControlFont() );
aInfoFont.SetWeight( WEIGHT_BOLD );
aInfoFont.SetColor( GALLERY_FG_COLOR );
- maInfoBar.SetControlFont( aInfoFont );
+ maInfoBar->SetControlFont( aInfoFont );
- maInfoBar.SetBackground( Wallpaper( GALLERY_DLG_COLOR ) );
- maInfoBar.SetControlBackground( GALLERY_DLG_COLOR );
+ maInfoBar->SetBackground( Wallpaper( GALLERY_DLG_COLOR ) );
+ maInfoBar->SetControlBackground( GALLERY_DLG_COLOR );
- maSeparator.SetBackground( Wallpaper( GALLERY_BG_COLOR ) );
- maSeparator.SetControlBackground( GALLERY_BG_COLOR );
- maSeparator.SetControlForeground( GALLERY_FG_COLOR );
+ maSeparator->SetBackground( Wallpaper( GALLERY_BG_COLOR ) );
+ maSeparator->SetControlBackground( GALLERY_BG_COLOR );
+ maSeparator->SetControlForeground( GALLERY_FG_COLOR );
}
void GalleryBrowser2::DataChanged( const DataChangedEvent& rDCEvt )
@@ -522,14 +526,14 @@ void GalleryBrowser2::Resize()
mpPreview->Hide();
const Size aOutSize( GetOutputSizePixel() );
- const Size aBoxSize( maViewBox.GetOutputSizePixel() );
+ const Size aBoxSize( maViewBox->GetOutputSizePixel() );
const long nOffset = 2, nSepWidth = 2;
const long nInfoBarX = aBoxSize.Width() + ( nOffset * 3 ) + nSepWidth;
const Point aPt( 0, aBoxSize.Height() + 3 );
const Size aSz( aOutSize.Width(), aOutSize.Height() - aPt.Y() );
- maSeparator.SetPosSizePixel( Point( aBoxSize.Width() + nOffset, 0 ), Size( nSepWidth, aBoxSize.Height() ) );
- maInfoBar.SetPosSizePixel( Point( nInfoBarX, 0 ), Size( aOutSize.Width() - nInfoBarX, aBoxSize.Height() ) );
+ maSeparator->SetPosSizePixel( Point( aBoxSize.Width() + nOffset, 0 ), Size( nSepWidth, aBoxSize.Height() ) );
+ maInfoBar->SetPosSizePixel( Point( nInfoBarX, 0 ), Size( aOutSize.Width() - nInfoBarX, aBoxSize.Height() ) );
mpIconView->SetPosSizePixel( aPt, aSz );
mpListView->SetPosSizePixel( aPt, aSz );
@@ -661,7 +665,7 @@ bool GalleryBrowser2::KeyInput( const KeyEvent& rKEvt, vcl::Window* pWindow )
if (pParentControl != NULL)
bRet = pParentControl->GalleryKeyInput(rKEvt, pWindow);
- if( !bRet && !maViewBox.HasFocus() && nItemId && mpCurTheme )
+ if( !bRet && !maViewBox->HasFocus() && nItemId && mpCurTheme )
{
sal_uInt16 nExecuteId = 0;
INetURLObject aURL;
@@ -764,14 +768,14 @@ void GalleryBrowser2::SelectTheme( const OUString& rThemeName )
Resize();
ImplUpdateViews( 1 );
- maViewBox.EnableItem( TBX_ID_ICON, true );
- maViewBox.EnableItem( TBX_ID_LIST, true );
- maViewBox.CheckItem( ( GALLERYBROWSERMODE_ICON == GetMode() ) ? TBX_ID_ICON : TBX_ID_LIST, true );
+ maViewBox->EnableItem( TBX_ID_ICON, true );
+ maViewBox->EnableItem( TBX_ID_LIST, true );
+ maViewBox->CheckItem( ( GALLERYBROWSERMODE_ICON == GetMode() ) ? TBX_ID_ICON : TBX_ID_LIST, true );
- if(maInfoBar.GetText().isEmpty())
+ if(maInfoBar->GetText().isEmpty())
mpIconView->SetAccessibleRelationLabeledBy(mpIconView);
else
- mpIconView->SetAccessibleRelationLabeledBy(&maInfoBar);
+ mpIconView->SetAccessibleRelationLabeledBy(maInfoBar.get());
mpIconView->SetAccessibleRelationMemberOf(mpIconView);
}
@@ -793,11 +797,11 @@ void GalleryBrowser2::SetMode( GalleryBrowserMode eMode )
mpIconView->Show();
- maViewBox.EnableItem( TBX_ID_ICON, true );
- maViewBox.EnableItem( TBX_ID_LIST, true );
+ maViewBox->EnableItem( TBX_ID_ICON, true );
+ maViewBox->EnableItem( TBX_ID_LIST, true );
- maViewBox.CheckItem( TBX_ID_ICON, true );
- maViewBox.CheckItem( TBX_ID_LIST, false );
+ maViewBox->CheckItem( TBX_ID_ICON, true );
+ maViewBox->CheckItem( TBX_ID_LIST, false );
}
break;
@@ -811,11 +815,11 @@ void GalleryBrowser2::SetMode( GalleryBrowserMode eMode )
mpListView->Show();
- maViewBox.EnableItem( TBX_ID_ICON, true );
- maViewBox.EnableItem( TBX_ID_LIST, true );
+ maViewBox->EnableItem( TBX_ID_ICON, true );
+ maViewBox->EnableItem( TBX_ID_LIST, true );
- maViewBox.CheckItem( TBX_ID_ICON, false );
- maViewBox.CheckItem( TBX_ID_LIST, true );
+ maViewBox->CheckItem( TBX_ID_ICON, false );
+ maViewBox->CheckItem( TBX_ID_LIST, true );
}
break;
@@ -841,8 +845,8 @@ void GalleryBrowser2::SetMode( GalleryBrowserMode eMode )
if( mpCurTheme && mpCurTheme->GetObjectKind( nPos ) == SGA_OBJ_SOUND )
mpPreview->PreviewMedia( mpCurTheme->GetObjectURL( nPos ) );
- maViewBox.EnableItem( TBX_ID_ICON, false );
- maViewBox.EnableItem( TBX_ID_LIST, false );
+ maViewBox->EnableItem( TBX_ID_ICON, false );
+ maViewBox->EnableItem( TBX_ID_LIST, false );
}
}
break;
@@ -957,7 +961,7 @@ void GalleryBrowser2::ImplUpdateViews( sal_uInt16 nSelectionId )
void GalleryBrowser2::ImplUpdateInfoBar()
{
if( mpCurTheme )
- maInfoBar.SetText( mpCurTheme->GetName() );
+ maInfoBar->SetText( mpCurTheme->GetName() );
}
sal_uIntPtr GalleryBrowser2::ImplGetSelectedItemId( const Point* pSelPos, Point& rSelPos )
@@ -1337,7 +1341,7 @@ IMPL_LINK( GalleryBrowser2, SelectTbxHdl, ToolBox*, pBox )
IMPL_LINK_NOARG(GalleryBrowser2, MiscHdl)
{
- maViewBox.SetOutStyle( maMiscOptions.GetToolboxStyle() );
+ maViewBox->SetOutStyle( maMiscOptions.GetToolboxStyle() );
BitmapEx aIconBmpEx = BitmapEx( Image( GAL_RES( RID_SVXIMG_GALLERY_VIEW_ICON ) ).GetBitmapEx() );
BitmapEx aListBmpEx = BitmapEx( Image( GAL_RES( RID_SVXIMG_GALLERY_VIEW_LIST ) ).GetBitmapEx() );
@@ -1350,9 +1354,9 @@ IMPL_LINK_NOARG(GalleryBrowser2, MiscHdl)
aListBmpEx.Scale( aLargeSize );
}
- maViewBox.SetItemImage(TBX_ID_ICON, Image(aIconBmpEx));
- maViewBox.SetItemImage(TBX_ID_LIST, Image(aListBmpEx));
- maViewBox.SetSizePixel( maViewBox.CalcWindowSizePixel() );
+ maViewBox->SetItemImage(TBX_ID_ICON, Image(aIconBmpEx));
+ maViewBox->SetItemImage(TBX_ID_LIST, Image(aListBmpEx));
+ maViewBox->SetSizePixel( maViewBox->CalcWindowSizePixel() );
Resize();
diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx
index 605f933fc50a..9b643a70bbe2 100644
--- a/svx/source/gallery2/galctrl.cxx
+++ b/svx/source/gallery2/galctrl.cxx
@@ -288,10 +288,6 @@ GalleryIconView::GalleryIconView( GalleryBrowser2* pParent, GalleryTheme* pTheme
SetItemHeight( S_THUMB + 6 );
}
-GalleryIconView::~GalleryIconView()
-{
-}
-
void GalleryIconView::InitSettings()
{
SetBackground( Wallpaper( GALLERY_BG_COLOR ) );
@@ -431,10 +427,6 @@ GalleryListView::GalleryListView( GalleryBrowser2* pParent, GalleryTheme* pTheme
InsertDataColumn( GALLERY_BRWBOX_TITLE, GAL_RESSTR(RID_SVXSTR_GALLERY_TITLE), 256 );
}
-GalleryListView::~GalleryListView()
-{
-}
-
void GalleryListView::InitSettings()
{
SetBackground( Wallpaper( GALLERY_BG_COLOR ) );
diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx
index 49bb1e3b2510..9c54186727b5 100644
--- a/svx/source/inc/datanavi.hxx
+++ b/svx/source/inc/datanavi.hxx
@@ -129,6 +129,7 @@ namespace svxform
public:
DataTreeListBox( vcl::Window* pParent, WinBits nBits );
virtual ~DataTreeListBox();
+ virtual void dispose() SAL_OVERRIDE;
virtual PopupMenu* CreateContextMenu( void ) SAL_OVERRIDE;
virtual void ExcecuteContextMenuAction( sal_uInt16 _nSelectedPopupEntry ) SAL_OVERRIDE;
@@ -288,7 +289,6 @@ namespace svxform
public:
XFormsPage( vcl::Window* pParent, DataNavigatorWindow* _pNaviWin, DataGroupType _eGroup );
- virtual ~XFormsPage();
virtual void Resize() SAL_OVERRIDE;
@@ -372,6 +372,7 @@ namespace svxform
public:
DataNavigatorWindow( vcl::Window* pParent, SfxBindings* pBindings );
virtual ~DataNavigatorWindow();
+ virtual void dispose() SAL_OVERRIDE;
void SetDocModified();
void NotifyChanges( bool _bLoadAll = false );
@@ -388,11 +389,11 @@ namespace svxform
class DataNavigator : public SfxDockingWindow, public SfxControllerItem
{
private:
- DataNavigatorWindow m_aDataWin;
+ VclPtr<DataNavigatorWindow> m_aDataWin;
protected:
virtual void Resize() SAL_OVERRIDE;
- virtual bool Close() SAL_OVERRIDE;
+ virtual bool Close() SAL_OVERRIDE;
virtual void GetFocus() SAL_OVERRIDE;
virtual Size CalcDockingSize( SfxChildAlignment ) SAL_OVERRIDE;
virtual SfxChildAlignment CheckAlignment( SfxChildAlignment, SfxChildAlignment ) SAL_OVERRIDE;
@@ -400,6 +401,7 @@ namespace svxform
public:
DataNavigator( SfxBindings* pBindings, SfxChildWindow* pMgr, vcl::Window* pParent );
virtual ~DataNavigator();
+ virtual void dispose() SAL_OVERRIDE;
using Window::Update;
using SfxDockingWindow::StateChanged;
@@ -470,6 +472,7 @@ namespace svxform
AddDataItemDialog(
vcl::Window* pParent, ItemNode* _pNode, const XFormsUIHelper1_ref& _rUIHelper );
virtual ~AddDataItemDialog();
+ virtual void dispose() SAL_OVERRIDE;
void InitText( DataItemType _eType );
};
@@ -533,6 +536,7 @@ namespace svxform
public:
NamespaceItemDialog( AddConditionDialog* pParent, XNameContainer_ref& _rContainer );
virtual ~NamespaceItemDialog();
+ virtual void dispose() SAL_OVERRIDE;
};
@@ -593,6 +597,7 @@ namespace svxform
AddSubmissionDialog( vcl::Window* pParent, ItemNode* _pNode,
const XFormsUIHelper1_ref& _rUIHelper );
virtual ~AddSubmissionDialog();
+ virtual void dispose() SAL_OVERRIDE;
inline const XSubmission_ref& GetNewSubmission() const { return m_xNewSubmission; }
};
diff --git a/svx/source/inc/docrecovery.hxx b/svx/source/inc/docrecovery.hxx
index 4241576df3ad..216ca9ec0a9c 100644
--- a/svx/source/inc/docrecovery.hxx
+++ b/svx/source/inc/docrecovery.hxx
@@ -306,6 +306,7 @@ class PluginProgressWindow : public vcl::Window
PluginProgressWindow( vcl::Window* pParent ,
const css::uno::Reference< css::lang::XComponent >& xProgress);
virtual ~PluginProgressWindow();
+ virtual void dispose() SAL_OVERRIDE;
};
class PluginProgress : public ::cppu::WeakImplHelper2< css::task::XStatusIndicator ,
@@ -479,10 +480,6 @@ class RecovDocList : public SvSimpleTable
RecovDocList(SvSimpleTableContainer& rParent, ResMgr& rResMgr);
/** @short TODO */
- virtual ~RecovDocList();
-
-
- /** @short TODO */
virtual void InitEntry(SvTreeListEntry* pEntry,
const OUString& rText,
const Image& rImage1,
@@ -530,6 +527,7 @@ class RecoveryDialog : public Dialog
RecoveryCore* pCore );
virtual ~RecoveryDialog();
+ virtual void dispose() SAL_OVERRIDE;
// IRecoveryUpdateListener
virtual void updateItems() SAL_OVERRIDE;
@@ -579,10 +577,6 @@ class BrokenRecoveryDialog : public ModalDialog
/** @short TODO */
- virtual ~BrokenRecoveryDialog();
-
-
- /** @short TODO */
bool isExecutionNeeded();
diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx
index 2ae3ff311f68..0fbd75111899 100644
--- a/svx/source/inc/filtnav.hxx
+++ b/svx/source/inc/filtnav.hxx
@@ -254,6 +254,7 @@ class FmFilterNavigator : public SvTreeListBox, public SfxListener
public:
FmFilterNavigator( vcl::Window* pParent );
virtual ~FmFilterNavigator();
+ virtual void dispose() SAL_OVERRIDE;
void UpdateContent(
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & xControllers,
@@ -327,6 +328,7 @@ public:
FmFilterNavigatorWin( SfxBindings *pBindings, SfxChildWindow *pMgr,
vcl::Window* pParent );
virtual ~FmFilterNavigatorWin();
+ virtual void dispose() SAL_OVERRIDE;
void UpdateContent( FmFormShell* pFormShell );
void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE;
diff --git a/svx/source/inc/fmPropBrw.hxx b/svx/source/inc/fmPropBrw.hxx
index a092468415e0..fdd9d6726fd8 100644
--- a/svx/source/inc/fmPropBrw.hxx
+++ b/svx/source/inc/fmPropBrw.hxx
@@ -83,6 +83,7 @@ public:
const SfxChildWinInfo* _pInfo
);
virtual ~FmPropBrw();
+ virtual void dispose() SAL_OVERRIDE;
using SfxFloatingWindow::StateChanged;
diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx
index 4c527052d62c..e5baf40a8fce 100644
--- a/svx/source/inc/fmexpl.hxx
+++ b/svx/source/inc/fmexpl.hxx
@@ -501,6 +501,7 @@ namespace svxform
public:
NavigatorTree(vcl::Window* pParent );
virtual ~NavigatorTree();
+ virtual void dispose() SAL_OVERRIDE;
void Clear();
void UpdateContent( FmFormShell* pFormShell );
@@ -570,6 +571,7 @@ namespace svxform
NavigatorFrame( SfxBindings *pBindings, SfxChildWindow *pMgr,
vcl::Window* pParent );
virtual ~NavigatorFrame();
+ virtual void dispose() SAL_OVERRIDE;
void UpdateContent( FmFormShell* pFormShell );
void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE;
diff --git a/svx/source/inc/tabwin.hxx b/svx/source/inc/tabwin.hxx
index 368da9823251..67230a998865 100644
--- a/svx/source/inc/tabwin.hxx
+++ b/svx/source/inc/tabwin.hxx
@@ -42,7 +42,6 @@ protected:
public:
FmFieldWinListBox( FmFieldWin* pParent );
- virtual ~FmFieldWinListBox();
sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) SAL_OVERRIDE;
sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) SAL_OVERRIDE;
@@ -88,6 +87,7 @@ public:
SfxChildWindow *pMgr, vcl::Window* pParent);
virtual ~FmFieldWin();
+ virtual void dispose() SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
virtual bool Close() SAL_OVERRIDE;
virtual void GetFocus() SAL_OVERRIDE;
diff --git a/svx/source/inc/tbxform.hxx b/svx/source/inc/tbxform.hxx
index e9290a08ac49..12bccf10ab13 100644
--- a/svx/source/inc/tbxform.hxx
+++ b/svx/source/inc/tbxform.hxx
@@ -32,7 +32,6 @@ class SvxFmAbsRecWin : public NumericField
// for invalidating our content whe losing the focus
public:
SvxFmAbsRecWin( vcl::Window* _pParent, SfxToolBoxControl* _pController );
- virtual ~SvxFmAbsRecWin();
virtual void KeyInput( const KeyEvent& rKeyEvt ) SAL_OVERRIDE;
virtual void LoseFocus() SAL_OVERRIDE;
diff --git a/svx/source/sidebar/EmptyPanel.cxx b/svx/source/sidebar/EmptyPanel.cxx
index 2d28f8a99ba2..3a25381a1937 100644
--- a/svx/source/sidebar/EmptyPanel.cxx
+++ b/svx/source/sidebar/EmptyPanel.cxx
@@ -28,10 +28,10 @@ namespace svx { namespace sidebar {
EmptyPanel::EmptyPanel (vcl::Window* pParent)
: Control(pParent, SVX_RES(RID_SIDEBAR_EMPTY_PANEL)),
- maMessageControl(this, SVX_RES(FT_MESSAGE))
+ maMessageControl(new FixedText(this, SVX_RES(FT_MESSAGE)))
{
- maMessageControl.setPosSizePixel(5,5, 250,15);
- maMessageControl.SetStyle(WB_WORDBREAK);// | WB_NOMNEMONICS);
+ maMessageControl->setPosSizePixel(5,5, 250,15);
+ maMessageControl->SetStyle(WB_WORDBREAK);// | WB_NOMNEMONICS);
//maMessageControl.GetStyle()
// & ~(WB_NOMULTILINE | WB_PATHELLIPSIS)
// | WB_WORDBREAK | WB_NOMNEMONICS);
@@ -39,24 +39,28 @@ EmptyPanel::EmptyPanel (vcl::Window* pParent)
SetBackground(Wallpaper());
- maMessageControl.Show();
+ maMessageControl->Show();
Show();
}
-EmptyPanel::~EmptyPanel (void)
+EmptyPanel::~EmptyPanel()
{
+ dispose();
}
-
+void EmptyPanel::dispose()
+{
+ Control::dispose();
+}
void EmptyPanel::Resize (void)
{
const Size aSize (GetSizePixel());
- maMessageControl.SetSizePixel(aSize);
+ maMessageControl->SetSizePixel(aSize);
}
diff --git a/svx/source/sidebar/EmptyPanel.hxx b/svx/source/sidebar/EmptyPanel.hxx
index de166cf80953..36e0c7b1d9e9 100644
--- a/svx/source/sidebar/EmptyPanel.hxx
+++ b/svx/source/sidebar/EmptyPanel.hxx
@@ -35,12 +35,13 @@ class EmptyPanel
{
public:
EmptyPanel (vcl::Window* pParent);
- virtual ~EmptyPanel (void);
+ virtual ~EmptyPanel();
+ virtual void dispose() SAL_OVERRIDE;
- virtual void Resize (void) SAL_OVERRIDE;
+ virtual void Resize() SAL_OVERRIDE;
private:
- FixedText maMessageControl;
+ VclPtr<FixedText> maMessageControl;
};
} } // end of namespace ::svx::sidebar
diff --git a/svx/source/sidebar/PanelLayout.cxx b/svx/source/sidebar/PanelLayout.cxx
index 829fd3b8afad..23934f6228f2 100644
--- a/svx/source/sidebar/PanelLayout.cxx
+++ b/svx/source/sidebar/PanelLayout.cxx
@@ -26,8 +26,14 @@ PanelLayout::PanelLayout(vcl::Window* pParent, const OString& rID, const OUStrin
PanelLayout::~PanelLayout()
{
+ dispose();
+}
+
+void PanelLayout::dispose()
+{
m_bInClose = true;
m_aPanelLayoutIdle.Stop();
+ Control::dispose();
}
Size PanelLayout::GetOptimalSize() const
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx
index 024ed48b2e33..43cf9d5246c4 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx
@@ -114,12 +114,6 @@ AreaPropertyPanel::AreaPropertyPanel(
-AreaPropertyPanel::~AreaPropertyPanel()
-{
-}
-
-
-
void AreaPropertyPanel::Initialize()
{
maGradientLinear.SetXOffset(DEFAULT_CENTERX);
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.hxx b/svx/source/sidebar/area/AreaPropertyPanel.hxx
index a2a9f42ffca0..aec98db7790d 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.hxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.hxx
@@ -151,7 +151,6 @@ private:
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings);
- virtual ~AreaPropertyPanel(void);
void SetupIcons(void);
void Initialize();
diff --git a/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx b/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx
index ebe4210ce688..2ba22301f9bb 100644
--- a/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx
+++ b/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx
@@ -56,50 +56,50 @@ AreaTransparencyGradientControl::AreaTransparencyGradientControl (
vcl::Window* pParent,
AreaPropertyPanel& rPanel)
: PopupControl( pParent,SVX_RES(RID_POPUPPANEL_AREAPAGE_TRGR)),
- maFtTrgrCenterX(this, SVX_RES(FT_TRGR_CENTER_X)),
- maMtrTrgrCenterX(this, SVX_RES(MTR_TRGR_CENTER_X)),
- maFtTrgrCenterY(this, SVX_RES(FT_TRGR_CENTER_Y)),
- maMtrTrgrCenterY(this, SVX_RES(MTR_TRGR_CENTER_Y)),
- maFtTrgrAngle(this, SVX_RES(FT_TRGR_ANGLE)),
- maMtrTrgrAngle(this, SVX_RES(MTR_TRGR_ANGLE)),
- maBtnLeft45(this, SVX_RES(BTN_LEFT_SECOND)),
- maBtnRight45(this, SVX_RES(BTN_RIGHT_FIRST)),
- maFtTrgrStartValue(this, SVX_RES(FT_TRGR_START_VALUE)),
- maMtrTrgrStartValue(this, SVX_RES(MTR_TRGR_START_VALUE)),
- maFtTrgrEndValue(this, SVX_RES(FT_TRGR_END_VALUE)),
- maMtrTrgrEndValue(this, SVX_RES(MTR_TRGR_END_VALUE)),
- maFtTrgrBorder(this, SVX_RES(FT_TRGR_BORDER)),
- maMtrTrgrBorder(this, SVX_RES(MTR_TRGR_BORDER)),
+ maFtTrgrCenterX(new FixedText(this, SVX_RES(FT_TRGR_CENTER_X))),
+ maMtrTrgrCenterX(new MetricField(this, SVX_RES(MTR_TRGR_CENTER_X))),
+ maFtTrgrCenterY(new FixedText(this, SVX_RES(FT_TRGR_CENTER_Y))),
+ maMtrTrgrCenterY(new MetricField(this, SVX_RES(MTR_TRGR_CENTER_Y))),
+ maFtTrgrAngle(new FixedText(this, SVX_RES(FT_TRGR_ANGLE))),
+ maMtrTrgrAngle(new MetricField(this, SVX_RES(MTR_TRGR_ANGLE))),
+ maBtnLeft45(new ToolBox(this, SVX_RES(BTN_LEFT_SECOND))),
+ maBtnRight45(new ToolBox(this, SVX_RES(BTN_RIGHT_FIRST))),
+ maFtTrgrStartValue(new FixedText(this, SVX_RES(FT_TRGR_START_VALUE))),
+ maMtrTrgrStartValue(new MetricField(this, SVX_RES(MTR_TRGR_START_VALUE))),
+ maFtTrgrEndValue(new FixedText(this, SVX_RES(FT_TRGR_END_VALUE))),
+ maMtrTrgrEndValue(new MetricField(this, SVX_RES(MTR_TRGR_END_VALUE))),
+ maFtTrgrBorder(new FixedText(this, SVX_RES(FT_TRGR_BORDER))),
+ maMtrTrgrBorder(new MetricField(this, SVX_RES(MTR_TRGR_BORDER))),
maRotLeft( SVX_RES(IMG_ROT_LEFT)),
maRotRight( SVX_RES(IMG_ROT_RIGHT)),
mrAreaPropertyPanel(rPanel),
mpBindings(NULL)
{
Link aLink = LINK( this, AreaTransparencyGradientControl, ModifiedTrgrHdl_Impl);
- maMtrTrgrCenterX.SetModifyHdl( aLink );
- maMtrTrgrCenterY.SetModifyHdl( aLink );
- maMtrTrgrAngle.SetModifyHdl( aLink );
- maMtrTrgrBorder.SetModifyHdl( aLink );
- maMtrTrgrStartValue.SetModifyHdl( aLink );
- maMtrTrgrEndValue.SetModifyHdl( aLink );
+ maMtrTrgrCenterX->SetModifyHdl( aLink );
+ maMtrTrgrCenterY->SetModifyHdl( aLink );
+ maMtrTrgrAngle->SetModifyHdl( aLink );
+ maMtrTrgrBorder->SetModifyHdl( aLink );
+ maMtrTrgrStartValue->SetModifyHdl( aLink );
+ maMtrTrgrEndValue->SetModifyHdl( aLink );
aLink = LINK( this, AreaTransparencyGradientControl, Left_Click45_Impl);
- maBtnLeft45.SetSelectHdl( aLink );
+ maBtnLeft45->SetSelectHdl( aLink );
aLink = LINK( this, AreaTransparencyGradientControl, Right_Click45_Impl);
- maBtnRight45.SetSelectHdl( aLink );
- maBtnLeft45.SetItemImage(1,maRotLeft);
- Size aTbxSize = maBtnLeft45.CalcWindowSizePixel();
- maBtnLeft45.SetOutputSizePixel( aTbxSize );
- maBtnLeft45.SetQuickHelpText(1, SVX_RESSTR(STR_HELP_LEFT)); //acc wj
-
- maBtnRight45.SetItemImage(1,maRotRight);
- aTbxSize = maBtnRight45.CalcWindowSizePixel();
- maBtnRight45.SetOutputSizePixel( aTbxSize );
- maBtnRight45.SetQuickHelpText(1, SVX_RESSTR(STR_HELP_RIGHT)); //acc wj
-
- maBtnLeft45.SetBackground(Wallpaper());
- maBtnLeft45.SetPaintTransparent(true);
- maBtnRight45.SetBackground(Wallpaper());
- maBtnRight45.SetPaintTransparent(true);
+ maBtnRight45->SetSelectHdl( aLink );
+ maBtnLeft45->SetItemImage(1,maRotLeft);
+ Size aTbxSize = maBtnLeft45->CalcWindowSizePixel();
+ maBtnLeft45->SetOutputSizePixel( aTbxSize );
+ maBtnLeft45->SetQuickHelpText(1, SVX_RESSTR(STR_HELP_LEFT)); //acc wj
+
+ maBtnRight45->SetItemImage(1,maRotRight);
+ aTbxSize = maBtnRight45->CalcWindowSizePixel();
+ maBtnRight45->SetOutputSizePixel( aTbxSize );
+ maBtnRight45->SetQuickHelpText(1, SVX_RESSTR(STR_HELP_RIGHT)); //acc wj
+
+ maBtnLeft45->SetBackground(Wallpaper());
+ maBtnLeft45->SetPaintTransparent(true);
+ maBtnRight45->SetBackground(Wallpaper());
+ maBtnRight45->SetPaintTransparent(true);
FreeResource();
mpBindings = mrAreaPropertyPanel.GetBindings();
@@ -108,8 +108,28 @@ AreaTransparencyGradientControl::AreaTransparencyGradientControl (
-AreaTransparencyGradientControl::~AreaTransparencyGradientControl (void)
+AreaTransparencyGradientControl::~AreaTransparencyGradientControl()
{
+ dispose();
+}
+
+void AreaTransparencyGradientControl::dispose()
+{
+ maFtTrgrCenterX.disposeAndClear();
+ maMtrTrgrCenterX.disposeAndClear();
+ maFtTrgrCenterY.disposeAndClear();
+ maMtrTrgrCenterY.disposeAndClear();
+ maFtTrgrAngle.disposeAndClear();
+ maMtrTrgrAngle.disposeAndClear();
+ maBtnLeft45.disposeAndClear();
+ maBtnRight45.disposeAndClear();
+ maFtTrgrStartValue.disposeAndClear();
+ maMtrTrgrStartValue.disposeAndClear();
+ maFtTrgrEndValue.disposeAndClear();
+ maMtrTrgrEndValue.disposeAndClear();
+ maFtTrgrBorder.disposeAndClear();
+ maMtrTrgrBorder.disposeAndClear();
+ PopupControl::dispose();
}
void AreaTransparencyGradientControl::Rearrange(XFillFloatTransparenceItem* pGradientItem)
@@ -123,60 +143,60 @@ void AreaTransparencyGradientControl::Rearrange(XFillFloatTransparenceItem* pGra
aSize2 = LogicToPixel( aSize2, MapMode(MAP_APPFONT) );
long aPosY = 0;
Point aPointAngle;
- Size aSizeAngle = maMtrTrgrAngle.GetSizePixel();
- Size aTbxSize = maBtnLeft45.CalcWindowSizePixel();
+ Size aSizeAngle = maMtrTrgrAngle->GetSizePixel();
+ Size aTbxSize = maBtnLeft45->CalcWindowSizePixel();
switch(eXGS)
{
case css::awt::GradientStyle_LINEAR:
case css::awt::GradientStyle_AXIAL:
- maFtTrgrCenterX.Hide();
- maMtrTrgrCenterX.Hide();
- maFtTrgrCenterY.Hide();
- maMtrTrgrCenterY.Hide();
- maFtTrgrAngle.Show();
- maFtTrgrAngle.SetPosPixel(APOS1_1);
- maMtrTrgrAngle.Show();
- maMtrTrgrAngle.SetPosPixel(APOS2_1);
- maFtTrgrStartValue.SetPosPixel(APOS1_3);
- maMtrTrgrStartValue.SetPosPixel(APOS1_4);
- maFtTrgrEndValue.SetPosPixel(APOS2_3);
- maMtrTrgrEndValue.SetPosPixel(APOS2_4);
- maFtTrgrBorder.SetPosPixel(APOS1_5);
- maMtrTrgrBorder.SetPosPixel(APOS1_6);
-
- maBtnLeft45.Show();
- maBtnRight45.Show();
-
- aPointAngle = maMtrTrgrAngle.GetPosPixel();
+ maFtTrgrCenterX->Hide();
+ maMtrTrgrCenterX->Hide();
+ maFtTrgrCenterY->Hide();
+ maMtrTrgrCenterY->Hide();
+ maFtTrgrAngle->Show();
+ maFtTrgrAngle->SetPosPixel(APOS1_1);
+ maMtrTrgrAngle->Show();
+ maMtrTrgrAngle->SetPosPixel(APOS2_1);
+ maFtTrgrStartValue->SetPosPixel(APOS1_3);
+ maMtrTrgrStartValue->SetPosPixel(APOS1_4);
+ maFtTrgrEndValue->SetPosPixel(APOS2_3);
+ maMtrTrgrEndValue->SetPosPixel(APOS2_4);
+ maFtTrgrBorder->SetPosPixel(APOS1_5);
+ maMtrTrgrBorder->SetPosPixel(APOS1_6);
+
+ maBtnLeft45->Show();
+ maBtnRight45->Show();
+
+ aPointAngle = maMtrTrgrAngle->GetPosPixel();
aPosY = aPointAngle.getY() + aSizeAngle.getHeight() - aTbxSize.getHeight();
- maBtnLeft45.SetPosPixel(Point(APOS_Left_Right_1.getX(), aPosY));
- maBtnRight45.SetPosPixel(Point(APOS_Left_Right_2.getX(), aPosY));
+ maBtnLeft45->SetPosPixel(Point(APOS_Left_Right_1.getX(), aPosY));
+ maBtnRight45->SetPosPixel(Point(APOS_Left_Right_2.getX(), aPosY));
SetSizePixel(aSize2);
break;
case css::awt::GradientStyle_RADIAL:
- maFtTrgrCenterX.Show();
- maFtTrgrCenterX.SetPosPixel(APOS1_1);
- maMtrTrgrCenterX.Show();
- maMtrTrgrCenterX.SetPosPixel(APOS2_1);
- maFtTrgrCenterY.Show();
- maFtTrgrCenterY.SetPosPixel(APOS1_2);
- maMtrTrgrCenterY.Show();
- maMtrTrgrCenterY.SetPosPixel(APOS2_2);
- maFtTrgrAngle.Hide();
- maMtrTrgrAngle.Hide();
- maFtTrgrStartValue.SetPosPixel(APOS1_3);
- maMtrTrgrStartValue.SetPosPixel(APOS1_4);
- maFtTrgrEndValue.SetPosPixel(APOS2_3);
- maMtrTrgrEndValue.SetPosPixel(APOS2_4);
- maFtTrgrBorder.SetPosPixel(APOS1_5);
- maMtrTrgrBorder.SetPosPixel(APOS1_6);
-
- maBtnLeft45.Hide();
- maBtnRight45.Hide();
+ maFtTrgrCenterX->Show();
+ maFtTrgrCenterX->SetPosPixel(APOS1_1);
+ maMtrTrgrCenterX->Show();
+ maMtrTrgrCenterX->SetPosPixel(APOS2_1);
+ maFtTrgrCenterY->Show();
+ maFtTrgrCenterY->SetPosPixel(APOS1_2);
+ maMtrTrgrCenterY->Show();
+ maMtrTrgrCenterY->SetPosPixel(APOS2_2);
+ maFtTrgrAngle->Hide();
+ maMtrTrgrAngle->Hide();
+ maFtTrgrStartValue->SetPosPixel(APOS1_3);
+ maMtrTrgrStartValue->SetPosPixel(APOS1_4);
+ maFtTrgrEndValue->SetPosPixel(APOS2_3);
+ maMtrTrgrEndValue->SetPosPixel(APOS2_4);
+ maFtTrgrBorder->SetPosPixel(APOS1_5);
+ maMtrTrgrBorder->SetPosPixel(APOS1_6);
+
+ maBtnLeft45->Hide();
+ maBtnRight45->Hide();
SetSizePixel(aSize2);
@@ -185,34 +205,34 @@ void AreaTransparencyGradientControl::Rearrange(XFillFloatTransparenceItem* pGra
case css::awt::GradientStyle_ELLIPTICAL:
case css::awt::GradientStyle_SQUARE:
case css::awt::GradientStyle_RECT:
- maFtTrgrCenterX.Show();
- maFtTrgrCenterX.SetPosPixel(APOS1_1);
- maMtrTrgrCenterX.Show();
- maMtrTrgrCenterX.SetPosPixel(APOS2_1);
- maFtTrgrCenterY.Show();
- maFtTrgrCenterY.SetPosPixel(APOS1_2);
- maMtrTrgrCenterY.Show();
- maMtrTrgrCenterY.SetPosPixel(APOS2_2);
- maFtTrgrAngle.Show();
- maFtTrgrAngle.SetPosPixel(APOS1_3);
- maMtrTrgrAngle.Show();
- maMtrTrgrAngle.SetPosPixel(APOS1_4);
-
- maFtTrgrStartValue.SetPosPixel(APOS1_5);
- maMtrTrgrStartValue.SetPosPixel(APOS1_6);
- maFtTrgrEndValue.SetPosPixel(APOS2_5);
- maMtrTrgrEndValue.SetPosPixel(APOS2_6);
- maFtTrgrBorder.SetPosPixel(APOS1_7);
- maMtrTrgrBorder.SetPosPixel(APOS1_8);
-
- maBtnLeft45.Show();
- maBtnRight45.Show();
-
- aPointAngle = maMtrTrgrAngle.GetPosPixel();
+ maFtTrgrCenterX->Show();
+ maFtTrgrCenterX->SetPosPixel(APOS1_1);
+ maMtrTrgrCenterX->Show();
+ maMtrTrgrCenterX->SetPosPixel(APOS2_1);
+ maFtTrgrCenterY->Show();
+ maFtTrgrCenterY->SetPosPixel(APOS1_2);
+ maMtrTrgrCenterY->Show();
+ maMtrTrgrCenterY->SetPosPixel(APOS2_2);
+ maFtTrgrAngle->Show();
+ maFtTrgrAngle->SetPosPixel(APOS1_3);
+ maMtrTrgrAngle->Show();
+ maMtrTrgrAngle->SetPosPixel(APOS1_4);
+
+ maFtTrgrStartValue->SetPosPixel(APOS1_5);
+ maMtrTrgrStartValue->SetPosPixel(APOS1_6);
+ maFtTrgrEndValue->SetPosPixel(APOS2_5);
+ maMtrTrgrEndValue->SetPosPixel(APOS2_6);
+ maFtTrgrBorder->SetPosPixel(APOS1_7);
+ maMtrTrgrBorder->SetPosPixel(APOS1_8);
+
+ maBtnLeft45->Show();
+ maBtnRight45->Show();
+
+ aPointAngle = maMtrTrgrAngle->GetPosPixel();
aPosY = aPointAngle.getY() + aSizeAngle.getHeight() - aTbxSize.getHeight();
- maBtnLeft45.SetPosPixel(Point(APOS_Left_Right_3.getX(), aPosY));
- maBtnRight45.SetPosPixel(Point(APOS_Left_Right_4.getX(), aPosY));
+ maBtnLeft45->SetPosPixel(Point(APOS_Left_Right_3.getX(), aPosY));
+ maBtnRight45->SetPosPixel(Point(APOS_Left_Right_4.getX(), aPosY));
SetSizePixel(aSize);
@@ -247,12 +267,12 @@ void AreaTransparencyGradientControl::InitStatus(XFillFloatTransparenceItem* pGr
{
aGradient = rGradient;
}
- maMtrTrgrCenterX.SetValue(aGradient.GetXOffset());
- maMtrTrgrCenterY.SetValue(aGradient.GetYOffset());
- maMtrTrgrAngle.SetValue(aGradient.GetAngle() / 10);
- maMtrTrgrStartValue.SetValue((sal_uInt16)((((sal_uInt16)aGradient.GetStartColor().GetRed() + 1) * 100) / 255));
- maMtrTrgrEndValue.SetValue((sal_uInt16)((((sal_uInt16)aGradient.GetEndColor().GetRed() + 1) * 100) / 255));
- maMtrTrgrBorder.SetValue(aGradient.GetBorder());
+ maMtrTrgrCenterX->SetValue(aGradient.GetXOffset());
+ maMtrTrgrCenterY->SetValue(aGradient.GetYOffset());
+ maMtrTrgrAngle->SetValue(aGradient.GetAngle() / 10);
+ maMtrTrgrStartValue->SetValue((sal_uInt16)((((sal_uInt16)aGradient.GetStartColor().GetRed() + 1) * 100) / 255));
+ maMtrTrgrEndValue->SetValue((sal_uInt16)((((sal_uInt16)aGradient.GetEndColor().GetRed() + 1) * 100) / 255));
+ maMtrTrgrBorder->SetValue(aGradient.GetBorder());
}
@@ -261,21 +281,21 @@ void AreaTransparencyGradientControl::InitStatus(XFillFloatTransparenceItem* pGr
void AreaTransparencyGradientControl::ExecuteValueModify( sal_uInt8 nStartCol, sal_uInt8 nEndCol )
{
//Added
- sal_Int16 aMtrValue = (sal_Int16)maMtrTrgrAngle.GetValue();
+ sal_Int16 aMtrValue = (sal_Int16)maMtrTrgrAngle->GetValue();
while(aMtrValue<0)
aMtrValue += 360;
sal_uInt16 nVal = aMtrValue/360;
nVal = aMtrValue - nVal*360;
- maMtrTrgrAngle.SetValue(nVal);
+ maMtrTrgrAngle->SetValue(nVal);
//End of new code
XGradient aTmpGradient(
Color(nStartCol, nStartCol, nStartCol),
Color(nEndCol, nEndCol, nEndCol),
(css::awt::GradientStyle)(mrAreaPropertyPanel.GetSelectedTransparencyTypeIndex()-2),
- (sal_uInt16)maMtrTrgrAngle.GetValue() * 10,
- (sal_uInt16)maMtrTrgrCenterX.GetValue(),
- (sal_uInt16)maMtrTrgrCenterY.GetValue(),
- (sal_uInt16)maMtrTrgrBorder.GetValue(),
+ (sal_uInt16)maMtrTrgrAngle->GetValue() * 10,
+ (sal_uInt16)maMtrTrgrCenterX->GetValue(),
+ (sal_uInt16)maMtrTrgrCenterY->GetValue(),
+ (sal_uInt16)maMtrTrgrBorder->GetValue(),
100, 100);
mrAreaPropertyPanel.SetGradient(aTmpGradient);
@@ -292,8 +312,8 @@ void AreaTransparencyGradientControl::ExecuteValueModify( sal_uInt8 nStartCol, s
IMPL_LINK_NOARG(AreaTransparencyGradientControl, ModifiedTrgrHdl_Impl)
{
- sal_uInt8 nStartCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrStartValue.GetValue() * 255) / 100);
- sal_uInt8 nEndCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrEndValue.GetValue() * 255) / 100);
+ sal_uInt8 nStartCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrStartValue->GetValue() * 255) / 100);
+ sal_uInt8 nEndCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrEndValue->GetValue() * 255) / 100);
ExecuteValueModify( nStartCol, nEndCol );
return 0L;
}
@@ -303,13 +323,13 @@ IMPL_LINK_NOARG(AreaTransparencyGradientControl, ModifiedTrgrHdl_Impl)
IMPL_LINK_NOARG(AreaTransparencyGradientControl, Left_Click45_Impl)
{
- sal_uInt8 nStartCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrStartValue.GetValue() * 255) / 100);
- sal_uInt8 nEndCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrEndValue.GetValue() * 255) / 100);
- sal_uInt16 aTemp = (sal_uInt16)maMtrTrgrAngle.GetValue();
+ sal_uInt8 nStartCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrStartValue->GetValue() * 255) / 100);
+ sal_uInt8 nEndCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrEndValue->GetValue() * 255) / 100);
+ sal_uInt16 aTemp = (sal_uInt16)maMtrTrgrAngle->GetValue();
if(aTemp>=315)
aTemp -= 360;
aTemp += 45;
- maMtrTrgrAngle.SetValue(aTemp);
+ maMtrTrgrAngle->SetValue(aTemp);
ExecuteValueModify( nStartCol, nEndCol );
return 0L;
}
@@ -319,13 +339,13 @@ IMPL_LINK_NOARG(AreaTransparencyGradientControl, Left_Click45_Impl)
IMPL_LINK_NOARG(AreaTransparencyGradientControl, Right_Click45_Impl)
{
- sal_uInt8 nStartCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrStartValue.GetValue() * 255) / 100);
- sal_uInt8 nEndCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrEndValue.GetValue() * 255) / 100);
- sal_uInt16 aTemp = (sal_uInt16)maMtrTrgrAngle.GetValue();
+ sal_uInt8 nStartCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrStartValue->GetValue() * 255) / 100);
+ sal_uInt8 nEndCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrEndValue->GetValue() * 255) / 100);
+ sal_uInt16 aTemp = (sal_uInt16)maMtrTrgrAngle->GetValue();
if(aTemp<45)
aTemp += 360;
aTemp -= 45;
- maMtrTrgrAngle.SetValue(aTemp);
+ maMtrTrgrAngle->SetValue(aTemp);
ExecuteValueModify( nStartCol, nEndCol );
return 0L;
}
diff --git a/svx/source/sidebar/area/AreaTransparencyGradientControl.hxx b/svx/source/sidebar/area/AreaTransparencyGradientControl.hxx
index 8a526175b999..eb8cfc37285d 100644
--- a/svx/source/sidebar/area/AreaTransparencyGradientControl.hxx
+++ b/svx/source/sidebar/area/AreaTransparencyGradientControl.hxx
@@ -41,7 +41,8 @@ public:
AreaTransparencyGradientControl (
vcl::Window* pParent,
AreaPropertyPanel& rPanel);
- virtual ~AreaTransparencyGradientControl (void);
+ virtual ~AreaTransparencyGradientControl();
+ virtual void dispose() SAL_OVERRIDE;
void Rearrange(XFillFloatTransparenceItem* pGradientItem);
void InitStatus(XFillFloatTransparenceItem* pGradientItem);
@@ -49,20 +50,20 @@ public:
void SetControlState_Impl(css::awt::GradientStyle eXGS);
private:
- FixedText maFtTrgrCenterX;
- MetricField maMtrTrgrCenterX;
- FixedText maFtTrgrCenterY;
- MetricField maMtrTrgrCenterY;
- FixedText maFtTrgrAngle;
- MetricField maMtrTrgrAngle;
- ToolBox maBtnLeft45;
- ToolBox maBtnRight45;
- FixedText maFtTrgrStartValue;
- MetricField maMtrTrgrStartValue;
- FixedText maFtTrgrEndValue;
- MetricField maMtrTrgrEndValue;
- FixedText maFtTrgrBorder;
- MetricField maMtrTrgrBorder;
+ VclPtr<FixedText> maFtTrgrCenterX;
+ VclPtr<MetricField> maMtrTrgrCenterX;
+ VclPtr<FixedText> maFtTrgrCenterY;
+ VclPtr<MetricField> maMtrTrgrCenterY;
+ VclPtr<FixedText> maFtTrgrAngle;
+ VclPtr<MetricField> maMtrTrgrAngle;
+ VclPtr<ToolBox> maBtnLeft45;
+ VclPtr<ToolBox> maBtnRight45;
+ VclPtr<FixedText> maFtTrgrStartValue;
+ VclPtr<MetricField> maMtrTrgrStartValue;
+ VclPtr<FixedText> maFtTrgrEndValue;
+ VclPtr<MetricField> maMtrTrgrEndValue;
+ VclPtr<FixedText> maFtTrgrBorder;
+ VclPtr<MetricField> maMtrTrgrBorder;
Image maRotLeft;
Image maRotRight;
diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
index dd371dfa0861..b1e6075860fa 100644
--- a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
+++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
@@ -68,12 +68,6 @@ GraphicPropertyPanel::GraphicPropertyPanel(
-GraphicPropertyPanel::~GraphicPropertyPanel()
-{
-}
-
-
-
void GraphicPropertyPanel::Initialize()
{
mpMtrBrightness->SetModifyHdl( LINK( this, GraphicPropertyPanel, ModifyBrightnessHdl ) );
diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
index 8f3babcd40e8..11cb2282a9b7 100644
--- a/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
+++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
@@ -98,7 +98,6 @@ private:
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings);
- virtual ~GraphicPropertyPanel();
void SetupIcons(void);
void Initialize();
diff --git a/svx/source/sidebar/insert/InsertPropertyPanel.cxx b/svx/source/sidebar/insert/InsertPropertyPanel.cxx
index 7f4925b22e51..70fae60f543e 100644
--- a/svx/source/sidebar/insert/InsertPropertyPanel.cxx
+++ b/svx/source/sidebar/insert/InsertPropertyPanel.cxx
@@ -75,13 +75,19 @@ InsertPropertyPanel::InsertPropertyPanel (
-InsertPropertyPanel::~InsertPropertyPanel (void)
+InsertPropertyPanel::~InsertPropertyPanel()
+{
+ dispose();
+}
+
+void InsertPropertyPanel::dispose()
{
// Remove window child listener.
vcl::Window* pTopWindow = this;
while (pTopWindow->GetParent() != NULL)
pTopWindow = pTopWindow->GetParent();
pTopWindow->RemoveChildEventListener(LINK(this, InsertPropertyPanel, WindowEventListener));
+ PanelLayout::dispose();
}
diff --git a/svx/source/sidebar/insert/InsertPropertyPanel.hxx b/svx/source/sidebar/insert/InsertPropertyPanel.hxx
index b0a5426b84d5..391b69f7e8be 100644
--- a/svx/source/sidebar/insert/InsertPropertyPanel.hxx
+++ b/svx/source/sidebar/insert/InsertPropertyPanel.hxx
@@ -41,7 +41,8 @@ public:
InsertPropertyPanel (
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame);
- virtual ~InsertPropertyPanel (void);
+ virtual ~InsertPropertyPanel();
+ virtual void dispose() SAL_OVERRIDE;
private:
ToolBox* mpStandardShapesToolBox;
diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx
index 052e16e7f47b..d830f337ebd8 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.cxx
@@ -192,10 +192,6 @@ LinePropertyPanel::LinePropertyPanel(
Initialize();
}
-LinePropertyPanel::~LinePropertyPanel()
-{
-}
-
void LinePropertyPanel::Initialize()
{
mpIMGWidthIcon.reset(new Image[8]);
diff --git a/svx/source/sidebar/line/LinePropertyPanel.hxx b/svx/source/sidebar/line/LinePropertyPanel.hxx
index 586573f506ed..84354e44ecd5 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.hxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.hxx
@@ -157,7 +157,6 @@ private:
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings);
- virtual ~LinePropertyPanel(void);
PopupControl* CreateLineWidthPopupControl (PopupContainer* pParent);
};
diff --git a/svx/source/sidebar/line/LineWidthControl.cxx b/svx/source/sidebar/line/LineWidthControl.cxx
index bf87a3d9b193..4e394f8d8709 100644
--- a/svx/source/sidebar/line/LineWidthControl.cxx
+++ b/svx/source/sidebar/line/LineWidthControl.cxx
@@ -41,10 +41,10 @@ LineWidthControl::LineWidthControl (
: svx::sidebar::PopupControl(pParent,SVX_RES(RID_POPUPPANEL_LINEPAGE_WIDTH)),
mrLinePropertyPanel(rPanel),
mpBindings(NULL),
- maVSWidth( this, SVX_RES(VS_WIDTH)),
- maFTCus( this, SVX_RES(FT_CUSTOME)),
- maFTWidth( this, SVX_RES(FT_LINE_WIDTH)),
- maMFWidth( this, SVX_RES(MF_WIDTH)),
+ maVSWidth(new LineWidthValueSet(this, SVX_RES(VS_WIDTH))),
+ maFTCus( new FixedText(this, SVX_RES(FT_CUSTOME))),
+ maFTWidth( new FixedText(this, SVX_RES(FT_LINE_WIDTH))),
+ maMFWidth( new MetricField(this, SVX_RES(MF_WIDTH))),
meMapUnit(SFX_MAPUNIT_TWIP),
rStr(NULL),
mstrPT(SVX_RESSTR(STR_PT)),
@@ -64,9 +64,19 @@ LineWidthControl::LineWidthControl (
-LineWidthControl::~LineWidthControl (void)
+LineWidthControl::~LineWidthControl()
+{
+ dispose();
+}
+
+void LineWidthControl::dispose()
{
delete[] rStr;
+ maVSWidth.disposeAndClear();
+ maFTCus.disposeAndClear();
+ maFTWidth.disposeAndClear();
+ maMFWidth.disposeAndClear();
+ svx::sidebar::PopupControl::dispose();
}
@@ -104,33 +114,33 @@ void LineWidthControl::Paint(const Rectangle& rect)
void LineWidthControl::Initialize()
{
- maVSWidth.SetStyle( maVSWidth.GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT );// WB_NAMEFIELD | WB_ITEMBORDER |WB_DOUBLEBORDER | WB_NONEFIELD |
+ maVSWidth->SetStyle( maVSWidth->GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT );// WB_NAMEFIELD | WB_ITEMBORDER |WB_DOUBLEBORDER | WB_NONEFIELD |
//for high contrast wj
if(GetSettings().GetStyleSettings().GetHighContrastMode())
{
- maVSWidth.SetColor(GetSettings().GetStyleSettings().GetMenuColor());
+ maVSWidth->SetColor(GetSettings().GetStyleSettings().GetMenuColor());
// maBorder.SetBackground(GetSettings().GetStyleSettings().GetMenuColor());
- maFTWidth.SetBackground(GetSettings().GetStyleSettings().GetMenuColor());
+ maFTWidth->SetBackground(GetSettings().GetStyleSettings().GetMenuColor());
}
else
{
- maVSWidth.SetColor(COL_WHITE);
+ maVSWidth->SetColor(COL_WHITE);
// maBorder.SetBackground(Wallpaper(COL_WHITE));
- maFTWidth.SetBackground(Wallpaper(COL_WHITE));
+ maFTWidth->SetBackground(Wallpaper(COL_WHITE));
}
- sal_Int64 nFirst= maMFWidth.Denormalize( maMFWidth.GetFirst( FUNIT_TWIP ) );
- sal_Int64 nLast = maMFWidth.Denormalize( maMFWidth.GetLast( FUNIT_TWIP ) );
- sal_Int64 nMin = maMFWidth.Denormalize( maMFWidth.GetMin( FUNIT_TWIP ) );
- sal_Int64 nMax = maMFWidth.Denormalize( maMFWidth.GetMax( FUNIT_TWIP ) );
- maMFWidth.SetSpinSize( 10 );
- maMFWidth.SetUnit( FUNIT_POINT );
- if( maMFWidth.GetDecimalDigits() > 1 )
- maMFWidth.SetDecimalDigits( 1 );
- maMFWidth.SetFirst( maMFWidth.Normalize( nFirst ), FUNIT_TWIP );
- maMFWidth.SetLast( maMFWidth.Normalize( nLast ), FUNIT_TWIP );
- maMFWidth.SetMin( maMFWidth.Normalize( nMin ), FUNIT_TWIP );
- maMFWidth.SetMax( maMFWidth.Normalize( nMax ), FUNIT_TWIP );
+ sal_Int64 nFirst= maMFWidth->Denormalize( maMFWidth->GetFirst( FUNIT_TWIP ) );
+ sal_Int64 nLast = maMFWidth->Denormalize( maMFWidth->GetLast( FUNIT_TWIP ) );
+ sal_Int64 nMin = maMFWidth->Denormalize( maMFWidth->GetMin( FUNIT_TWIP ) );
+ sal_Int64 nMax = maMFWidth->Denormalize( maMFWidth->GetMax( FUNIT_TWIP ) );
+ maMFWidth->SetSpinSize( 10 );
+ maMFWidth->SetUnit( FUNIT_POINT );
+ if( maMFWidth->GetDecimalDigits() > 1 )
+ maMFWidth->SetDecimalDigits( 1 );
+ maMFWidth->SetFirst( maMFWidth->Normalize( nFirst ), FUNIT_TWIP );
+ maMFWidth->SetLast( maMFWidth->Normalize( nLast ), FUNIT_TWIP );
+ maMFWidth->SetMin( maMFWidth->Normalize( nMin ), FUNIT_TWIP );
+ maMFWidth->SetMax( maMFWidth->Normalize( nMax ), FUNIT_TWIP );
rStr = new OUString[9];
//modify,
@@ -157,28 +167,28 @@ void LineWidthControl::Initialize()
for(sal_uInt16 i = 1 ; i <= 9 ; i++)
{
- maVSWidth.InsertItem(i);
- maVSWidth.SetItemText(i, rStr[i-1]);
+ maVSWidth->InsertItem(i);
+ maVSWidth->SetItemText(i, rStr[i-1]);
}
- maVSWidth.SetUnit(rStr);
- maVSWidth.SetItemData(1, reinterpret_cast<void*>(5));
- maVSWidth.SetItemData(2, reinterpret_cast<void*>(8));
- maVSWidth.SetItemData(3, reinterpret_cast<void*>(10));
- maVSWidth.SetItemData(4, reinterpret_cast<void*>(15));
- maVSWidth.SetItemData(5, reinterpret_cast<void*>(23));
- maVSWidth.SetItemData(6, reinterpret_cast<void*>(30));
- maVSWidth.SetItemData(7, reinterpret_cast<void*>(45));
- maVSWidth.SetItemData(8, reinterpret_cast<void*>(60));
- maVSWidth.SetImage(maIMGCusGray);
-
- maVSWidth.SetSelItem(0);
+ maVSWidth->SetUnit(rStr);
+ maVSWidth->SetItemData(1, reinterpret_cast<void*>(5));
+ maVSWidth->SetItemData(2, reinterpret_cast<void*>(8));
+ maVSWidth->SetItemData(3, reinterpret_cast<void*>(10));
+ maVSWidth->SetItemData(4, reinterpret_cast<void*>(15));
+ maVSWidth->SetItemData(5, reinterpret_cast<void*>(23));
+ maVSWidth->SetItemData(6, reinterpret_cast<void*>(30));
+ maVSWidth->SetItemData(7, reinterpret_cast<void*>(45));
+ maVSWidth->SetItemData(8, reinterpret_cast<void*>(60));
+ maVSWidth->SetImage(maIMGCusGray);
+
+ maVSWidth->SetSelItem(0);
Link aLink = LINK( this, LineWidthControl, VSSelectHdl ) ;
- maVSWidth.SetSelectHdl(aLink);
+ maVSWidth->SetSelectHdl(aLink);
aLink = LINK(this, LineWidthControl, MFModifyHdl);
- maMFWidth.SetModifyHdl(aLink);
+ maMFWidth->SetModifyHdl(aLink);
- maVSWidth.StartSelection();
- maVSWidth.Show();
+ maVSWidth->StartSelection();
+ maVSWidth->Show();
}
@@ -187,9 +197,9 @@ void LineWidthControl::Initialize()
void LineWidthControl::GetFocus()
{
if(!mbVSFocus)
- maMFWidth.GrabFocus();
+ maMFWidth->GrabFocus();
else
- maVSWidth.GrabFocus();
+ maVSWidth->GrabFocus();
}
@@ -198,7 +208,7 @@ void LineWidthControl::GetFocus()
void LineWidthControl::SetWidthSelect( long lValue, bool bValuable, SfxMapUnit eMapUnit)
{
mbVSFocus = true;
- maVSWidth.SetSelItem(0);
+ maVSWidth->SetSelItem(0);
mbCloseByEdit = false;
meMapUnit = eMapUnit;
SvtViewOptions aWinOpt( E_WINDOW, SIDEBAR_LINE_WIDTH_GLOBAL_VALUE );
@@ -212,54 +222,54 @@ void LineWidthControl::SetWidthSelect( long lValue, bool bValuable, SfxMapUnit e
OUString aWinData( aTmp );
mnCustomWidth = aWinData.toInt32();
mbCustom = true;
- maVSWidth.SetImage(maIMGCus);
- maVSWidth.SetCusEnable(true);
+ maVSWidth->SetImage(maIMGCus);
+ maVSWidth->SetCusEnable(true);
OUString aStrTip( OUString::number( (double)mnCustomWidth / 10));
aStrTip += mstrPT;
- maVSWidth.SetItemText(9, aStrTip);
+ maVSWidth->SetItemText(9, aStrTip);
}
else
{
mbCustom = false;
- maVSWidth.SetImage(maIMGCusGray);
- maVSWidth.SetCusEnable(false);
+ maVSWidth->SetImage(maIMGCusGray);
+ maVSWidth->SetCusEnable(false);
//modify
//String aStrTip(String(SVX_RES(STR_WIDTH_LAST_CUSTOM)));
- //maVSWidth.SetItemText(9, aStrTip);
- maVSWidth.SetItemText(9, rStr[8]);
+ //maVSWidth->SetItemText(9, aStrTip);
+ maVSWidth->SetItemText(9, rStr[8]);
}
if(bValuable)
{
sal_Int64 nVal = OutputDevice::LogicToLogic( lValue, (MapUnit)eMapUnit, MAP_100TH_MM );
- nVal = maMFWidth.Normalize( nVal );
- maMFWidth.SetValue( nVal, FUNIT_100TH_MM );
+ nVal = maMFWidth->Normalize( nVal );
+ maMFWidth->SetValue( nVal, FUNIT_100TH_MM );
}
else
{
- maMFWidth.SetText( "" );
+ maMFWidth->SetText( "" );
}
MapUnit eOrgUnit = (MapUnit)eMapUnit;
MapUnit ePntUnit( MAP_TWIP );
lValue = LogicToLogic( lValue , eOrgUnit, ePntUnit );
- OUString strCurrValue = maMFWidth.GetText();
+ OUString strCurrValue = maMFWidth->GetText();
sal_uInt16 i = 0;
for(; i < 8; i++)
if(strCurrValue == rStr[i])
{
- maVSWidth.SetSelItem(i+1);
+ maVSWidth->SetSelItem(i+1);
break;
}
if (i>=8)
{
mbVSFocus = false;
- maVSWidth.SetSelItem(0);
+ maVSWidth->SetSelItem(0);
}
- maVSWidth.Format();
- maVSWidth.StartSelection();
+ maVSWidth->Format();
+ maVSWidth->StartSelection();
}
@@ -269,11 +279,11 @@ IMPL_LINK(LineWidthControl, VSSelectHdl, void *, pControl)
{
if(pControl == &maVSWidth)
{
- sal_uInt16 iPos = maVSWidth.GetSelectItemId();
+ sal_uInt16 iPos = maVSWidth->GetSelectItemId();
if(iPos >= 1 && iPos <= 8)
{
- sal_IntPtr nVal = LogicToLogic(reinterpret_cast<sal_IntPtr>(maVSWidth.GetItemData( iPos )), MAP_POINT, (MapUnit)meMapUnit);
- nVal = maMFWidth.Denormalize(nVal);
+ sal_IntPtr nVal = LogicToLogic(reinterpret_cast<sal_IntPtr>(maVSWidth->GetItemData( iPos )), MAP_POINT, (MapUnit)meMapUnit);
+ nVal = maMFWidth->Denormalize(nVal);
XLineWidthItem aWidthItem( nVal );
mpBindings->GetDispatcher()->Execute(SID_ATTR_LINE_WIDTH, SfxCallMode::RECORD, &aWidthItem, 0L);
mrLinePropertyPanel.SetWidthIcon(iPos);
@@ -287,7 +297,7 @@ IMPL_LINK(LineWidthControl, VSSelectHdl, void *, pControl)
if(mbCustom)
{
long nVal = LogicToLogic(mnCustomWidth , MAP_POINT, (MapUnit)meMapUnit);
- nVal = maMFWidth.Denormalize(nVal);
+ nVal = maMFWidth->Denormalize(nVal);
XLineWidthItem aWidthItem( nVal );
mpBindings->GetDispatcher()->Execute(SID_ATTR_LINE_WIDTH, SfxCallMode::RECORD, &aWidthItem, 0L);
mrLinePropertyPanel.SetWidth(nVal);
@@ -296,10 +306,10 @@ IMPL_LINK(LineWidthControl, VSSelectHdl, void *, pControl)
}
else
{
- maVSWidth.SetNoSelection(); //add , set no selection and keep the last select item
- maVSWidth.Format();
+ maVSWidth->SetNoSelection(); //add , set no selection and keep the last select item
+ maVSWidth->Format();
Invalidate();
- maVSWidth.StartSelection();
+ maVSWidth->StartSelection();
}
//modify end
}
@@ -316,16 +326,16 @@ IMPL_LINK(LineWidthControl, MFModifyHdl, void *, pControl)
{
if(pControl == &maMFWidth)
{
- if(maVSWidth.GetSelItem())
+ if(maVSWidth->GetSelItem())
{
- maVSWidth.SetSelItem(0);
- maVSWidth.Format();
+ maVSWidth->SetSelItem(0);
+ maVSWidth->Format();
Invalidate();
- maVSWidth.StartSelection();
+ maVSWidth->StartSelection();
}
- long nTmp = static_cast<long>(maMFWidth.GetValue());
+ long nTmp = static_cast<long>(maMFWidth->GetValue());
long nVal = LogicToLogic( nTmp, MAP_POINT, (MapUnit)meMapUnit );
- sal_Int32 nNewWidth = (short)maMFWidth.Denormalize( nVal );
+ sal_Int32 nNewWidth = (short)maMFWidth->Denormalize( nVal );
XLineWidthItem aWidthItem(nNewWidth);
mpBindings->GetDispatcher()->Execute(SID_ATTR_LINE_WIDTH, SfxCallMode::RECORD, &aWidthItem, 0L);
diff --git a/svx/source/sidebar/line/LineWidthControl.hxx b/svx/source/sidebar/line/LineWidthControl.hxx
index c2904381647a..5af26026e92a 100644
--- a/svx/source/sidebar/line/LineWidthControl.hxx
+++ b/svx/source/sidebar/line/LineWidthControl.hxx
@@ -37,7 +37,8 @@ class LineWidthControl
{
public:
LineWidthControl (vcl::Window* pParent, LinePropertyPanel& rPanel);
- virtual ~LineWidthControl (void);
+ virtual ~LineWidthControl();
+ virtual void dispose() SAL_OVERRIDE;
virtual void GetFocus() SAL_OVERRIDE;
virtual void Paint(const Rectangle& rect) SAL_OVERRIDE;
@@ -47,12 +48,12 @@ public:
long GetTmpCustomWidth() { return mnTmpCustomWidth;}
private:
- LinePropertyPanel& mrLinePropertyPanel;
+ LinePropertyPanel& mrLinePropertyPanel;
SfxBindings* mpBindings;
- LineWidthValueSet maVSWidth;
- FixedText maFTCus;
- FixedText maFTWidth;
- MetricField maMFWidth;
+ VclPtr<LineWidthValueSet> maVSWidth;
+ VclPtr<FixedText> maFTCus;
+ VclPtr<FixedText> maFTWidth;
+ VclPtr<MetricField> maMFWidth;
SfxMapUnit meMapUnit;
OUString* rStr;
OUString mstrPT;
diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx
index d9af174bc253..c9e7ecd2b627 100644
--- a/svx/source/sidebar/line/LineWidthValueSet.cxx
+++ b/svx/source/sidebar/line/LineWidthValueSet.cxx
@@ -39,10 +39,16 @@ LineWidthValueSet::LineWidthValueSet (
-LineWidthValueSet::~LineWidthValueSet (void)
+LineWidthValueSet::~LineWidthValueSet()
+{
+ dispose();
+}
+
+void LineWidthValueSet::dispose()
{
delete pVDev;
delete[] strUnit;
+ ValueSet::dispose();
}
diff --git a/svx/source/sidebar/line/LineWidthValueSet.hxx b/svx/source/sidebar/line/LineWidthValueSet.hxx
index 75c2b69286a1..55901d24ebdf 100644
--- a/svx/source/sidebar/line/LineWidthValueSet.hxx
+++ b/svx/source/sidebar/line/LineWidthValueSet.hxx
@@ -29,7 +29,8 @@ class LineWidthValueSet
{
public:
LineWidthValueSet (vcl::Window* pParent, const ResId& rResId);
- virtual ~LineWidthValueSet (void);
+ virtual ~LineWidthValueSet();
+ virtual void dispose() SAL_OVERRIDE;
void SetUnit(OUString* str);
void SetSelItem(sal_uInt16 nSel);
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
index 136e2c349964..9f3fe4ab74ab 100644
--- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
@@ -92,10 +92,6 @@ ParaLineSpacingControl::ParaLineSpacingControl(sal_uInt16 nId)
Initialize();
}
-ParaLineSpacingControl::~ParaLineSpacingControl()
-{
-}
-
void ParaLineSpacingControl::Initialize()
{
const SfxPoolItem* pItem;
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx
index 07fb087a1d94..cabcba511f4d 100644
--- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx
@@ -30,7 +30,6 @@ class ParaLineSpacingControl : public SfxPopupWindow
{
public:
ParaLineSpacingControl(sal_uInt16 nId);
- virtual ~ParaLineSpacingControl();
private:
SfxMapUnit meLNSpaceUnit;
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
index 632ef57ed3f4..93a789693d22 100644
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
@@ -191,10 +191,6 @@ void ParaPropertyPanel::DataChanged (const DataChangedEvent& rEvent)
(void)rEvent;
}
-ParaPropertyPanel::~ParaPropertyPanel()
-{
-}
-
void ParaPropertyPanel::ReSize(bool /* bSize */)
{
if (mxSidebar.is())
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
index a6b3f74cf6d5..f49ce15fb3e3 100644
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
@@ -113,7 +113,6 @@ private:
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings,
const css::uno::Reference<css::ui::XSidebar>& rxSidebar);
- virtual ~ParaPropertyPanel (void);
DECL_LINK(ModifyIndentHdl_Impl, void*);
DECL_LINK(ClickIndent_IncDec_Hdl_Impl, ToolBox*);
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index d4011d67c0dc..6d4d5ea6bb59 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -117,10 +117,6 @@ PosSizePropertyPanel::PosSizePropertyPanel(
-PosSizePropertyPanel::~PosSizePropertyPanel()
-{
-}
-
namespace
{
bool hasText(const SdrView& rSdrView)
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
index e9d665673773..2eb297d32582 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
@@ -160,7 +160,6 @@ private:
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings,
const css::uno::Reference<css::ui::XSidebar>& rxSidebar);
- virtual ~PosSizePropertyPanel();
void MetricState( SfxItemState eState, const SfxPoolItem* pState );
FieldUnit GetCurrentUnit( SfxItemState eState, const SfxPoolItem* pState );
diff --git a/svx/source/sidebar/possize/SidebarDialControl.cxx b/svx/source/sidebar/possize/SidebarDialControl.cxx
index 2f422a9b5166..df10da6ed4ec 100644
--- a/svx/source/sidebar/possize/SidebarDialControl.cxx
+++ b/svx/source/sidebar/possize/SidebarDialControl.cxx
@@ -35,10 +35,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSidebarDialControl(vcl
return new SidebarDialControl(pParent, WB_TABSTOP);
}
-SidebarDialControl::~SidebarDialControl (void)
-{
-}
-
Size SidebarDialControl::GetOptimalSize() const
{
return LogicToPixel(Size(10, 10), MAP_APPFONT);
diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
index 3a798f22fece..c029a8faa8bc 100644
--- a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
+++ b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
@@ -36,13 +36,13 @@ TextCharacterSpacingControl::TextCharacterSpacingControl (
: PopupControl( pParent,SVX_RES(RID_POPUPPANEL_TEXTPAGE_SPACING))
, mrTextPropertyPanel(rPanel)
, mpBindings(pBindings)
-, maVSSpacing (ValueSetWithTextControl::IMAGE_TEXT,this, SVX_RES(VS_SPACING))
-, maLastCus (this, SVX_RES(FT_LASTCUSTOM))
+, maVSSpacing (new ValueSetWithTextControl(ValueSetWithTextControl::IMAGE_TEXT,this, SVX_RES(VS_SPACING)))
+, maLastCus (new FixedText(this, SVX_RES(FT_LASTCUSTOM)))
//, maBorder (this, SVX_RES(CT_BORDER))
-, maFTSpacing (this, SVX_RES(FT_SPACING))
-, maLBKerning (this, SVX_RES(LB_KERNING))
-, maFTBy (this, SVX_RES(FT_BY))
-, maEditKerning (this, SVX_RES(ED_KERNING))
+, maFTSpacing (new FixedText(this, SVX_RES(FT_SPACING)))
+, maLBKerning (new ListBox(this, SVX_RES(LB_KERNING)))
+, maFTBy (new FixedText(this, SVX_RES(FT_BY)))
+, maEditKerning (new MetricField(this, SVX_RES(ED_KERNING)))
, mpImg (NULL)
, mpImgSel (NULL)
@@ -65,36 +65,49 @@ TextCharacterSpacingControl::TextCharacterSpacingControl (
initial();
FreeResource();
Link aLink = LINK(this, TextCharacterSpacingControl, KerningSelectHdl);
- maLBKerning.SetSelectHdl(aLink);
+ maLBKerning->SetSelectHdl(aLink);
aLink =LINK(this, TextCharacterSpacingControl, KerningModifyHdl);
- maEditKerning.SetModifyHdl(aLink);
+ maEditKerning->SetModifyHdl(aLink);
}
+
TextCharacterSpacingControl::~TextCharacterSpacingControl()
{
+ dispose();
+}
+
+void TextCharacterSpacingControl::dispose()
+{
delete[] mpImg;
delete[] mpImgSel;
delete[] mpStr;
delete[] mpStrTip;
+ maVSSpacing.disposeAndClear();
+ maLastCus.disposeAndClear();
+ maFTSpacing.disposeAndClear();
+ maLBKerning.disposeAndClear();
+ maFTBy.disposeAndClear();
+ maEditKerning.disposeAndClear();
+ svx::sidebar::PopupControl::dispose();
}
void TextCharacterSpacingControl::initial()
{
- maVSSpacing.SetStyle( maVSSpacing.GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT );
+ maVSSpacing->SetStyle( maVSSpacing->GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT );
{
- maVSSpacing.SetControlBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
+ maVSSpacing->SetControlBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
GetSettings().GetStyleSettings().GetMenuColor():
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
- maVSSpacing.SetColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
+ maVSSpacing->SetColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
GetSettings().GetStyleSettings().GetMenuColor():
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
- maVSSpacing.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
+ maVSSpacing->SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
GetSettings().GetStyleSettings().GetMenuColor():
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
- maFTSpacing.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
+ maFTSpacing->SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
GetSettings().GetStyleSettings().GetMenuColor():
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
- maFTBy.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
+ maFTBy->SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
GetSettings().GetStyleSettings().GetMenuColor():
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
}
@@ -128,21 +141,21 @@ void TextCharacterSpacingControl::initial()
mpStrTip[4] = SVX_RESSTR(STR_VERY_LOOSE_TIP);
for (int i=0;i<5;i++)
- maVSSpacing.AddItem(mpImg[i], &mpImgSel[i],mpStr[i],&mpStrTip[i]);
+ maVSSpacing->AddItem(mpImg[i], &mpImgSel[i],mpStr[i],&mpStrTip[i]);
- maVSSpacing.AddItem( maImgCus, 0, maStrCus, 0 );
+ maVSSpacing->AddItem( maImgCus, 0, maStrCus, 0 );
- maVSSpacing.SetNoSelection();
+ maVSSpacing->SetNoSelection();
Link aLink = LINK(this, TextCharacterSpacingControl,VSSelHdl );
- maVSSpacing.SetSelectHdl(aLink);
- maVSSpacing.StartSelection();
- maVSSpacing.Show();
+ maVSSpacing->SetSelectHdl(aLink);
+ maVSSpacing->StartSelection();
+ maVSSpacing->Show();
}
void TextCharacterSpacingControl::Rearrange(bool bLBAvailable,bool bAvailable, long nKerning)
{
mbVS = true;
- maVSSpacing.SetNoSelection();
+ maVSSpacing->SetNoSelection();
SvtViewOptions aWinOpt( E_WINDOW, SIDEBAR_SPACING_GLOBAL_VALUE );
if ( aWinOpt.Exists() )
{
@@ -164,131 +177,131 @@ void TextCharacterSpacingControl::Rearrange(bool bLBAvailable,bool bAvailable, l
if( !mnLastCus )
{
- maVSSpacing.ReplaceItemImages(6, maImgCusGrey,0);
+ maVSSpacing->ReplaceItemImages(6, maImgCusGrey,0);
}
else
{
//set custom tips
- maVSSpacing.ReplaceItemImages(6, maImgCus,0);
+ maVSSpacing->ReplaceItemImages(6, maImgCus,0);
if(mnCustomKern > 0)
{
OUString aStrTip( maStrCusE); //LAST CUSTOM no tip defect //add
aStrTip += OUString::number( (double)mnCustomKern / 10);
aStrTip += " " + maStrUnit; // modify
- maVSSpacing.SetItemText(6,aStrTip);
+ maVSSpacing->SetItemText(6,aStrTip);
}
else if(mnCustomKern < 0)
{
OUString aStrTip(maStrCusC) ; //LAST CUSTOM no tip defect //add
aStrTip += OUString::number( (double)-mnCustomKern / 10);
aStrTip += " " + maStrUnit; // modify
- maVSSpacing.SetItemText( 6, aStrTip );
+ maVSSpacing->SetItemText( 6, aStrTip );
}
else
{
OUString aStrTip(maStrCusN) ; //LAST CUSTOM no tip defect //add
- maVSSpacing.SetItemText( 6, aStrTip );
+ maVSSpacing->SetItemText( 6, aStrTip );
}
}
if(bLBAvailable && bAvailable)
{
- maLBKerning.Enable();
- maFTSpacing.Enable();
+ maLBKerning->Enable();
+ maFTSpacing->Enable();
SfxMapUnit eUnit = mrTextPropertyPanel.GetSpaceController().GetCoreMetric();
MapUnit eOrgUnit = (MapUnit)eUnit;
MapUnit ePntUnit( MAP_POINT );
- long nBig = maEditKerning.Normalize(nKerning);
+ long nBig = maEditKerning->Normalize(nKerning);
nKerning = LogicToLogic( nBig, eOrgUnit, ePntUnit );
if ( nKerning > 0 )
{
- maFTBy.Enable();
- maEditKerning.Enable();
- maEditKerning.SetMax( 9999 );
- maEditKerning.SetLast( 9999 );
- maEditKerning.SetValue( nKerning );
- maLBKerning.SelectEntryPos( SIDEBAR_SPACE_EXPAND );
+ maFTBy->Enable();
+ maEditKerning->Enable();
+ maEditKerning->SetMax( 9999 );
+ maEditKerning->SetLast( 9999 );
+ maEditKerning->SetValue( nKerning );
+ maLBKerning->SelectEntryPos( SIDEBAR_SPACE_EXPAND );
if(nKerning == 30)
{
- maVSSpacing.SelectItem(4);
+ maVSSpacing->SelectItem(4);
}
else if(nKerning == 60)
{
- maVSSpacing.SelectItem(5);
+ maVSSpacing->SelectItem(5);
}
else
{
- maVSSpacing.SetNoSelection();
- maVSSpacing.SelectItem(0);
+ maVSSpacing->SetNoSelection();
+ maVSSpacing->SelectItem(0);
mbVS = false;
}
}
else if ( nKerning < 0 )
{
- maFTBy.Enable();
- maEditKerning.Enable();
- maEditKerning.SetValue( -nKerning );
- maLBKerning.SelectEntryPos( SIDEBAR_SPACE_CONDENSED );
+ maFTBy->Enable();
+ maEditKerning->Enable();
+ maEditKerning->SetValue( -nKerning );
+ maLBKerning->SelectEntryPos( SIDEBAR_SPACE_CONDENSED );
long nMax = mrTextPropertyPanel.GetSelFontSize()/6;
- maEditKerning.SetMax( maEditKerning.Normalize( nMax ), FUNIT_POINT );
- maEditKerning.SetLast( maEditKerning.GetMax( maEditKerning.GetUnit() ) );
+ maEditKerning->SetMax( maEditKerning->Normalize( nMax ), FUNIT_POINT );
+ maEditKerning->SetLast( maEditKerning->GetMax( maEditKerning->GetUnit() ) );
if( nKerning == -30 )
{
- maVSSpacing.SelectItem(1);
+ maVSSpacing->SelectItem(1);
}
else if( nKerning == -15 )
{
- maVSSpacing.SelectItem(2);
+ maVSSpacing->SelectItem(2);
}
else
{
- maVSSpacing.SetNoSelection();
- maVSSpacing.SelectItem(0);
+ maVSSpacing->SetNoSelection();
+ maVSSpacing->SelectItem(0);
mbVS = false;
}
}
else
{
- maVSSpacing.SelectItem(3);
- maLBKerning.SelectEntryPos( SIDEBAR_SPACE_NORMAL );
- maFTBy.Disable();
- maEditKerning.Disable();
- maEditKerning.SetValue( 0 );
- maEditKerning.SetMax( 9999 );
- maEditKerning.SetLast( 9999 );
+ maVSSpacing->SelectItem(3);
+ maLBKerning->SelectEntryPos( SIDEBAR_SPACE_NORMAL );
+ maFTBy->Disable();
+ maEditKerning->Disable();
+ maEditKerning->SetValue( 0 );
+ maEditKerning->SetMax( 9999 );
+ maEditKerning->SetLast( 9999 );
}
}
else if(bLBAvailable && !bAvailable)
{
//modified
- maVSSpacing.SetNoSelection();
- maVSSpacing.SelectItem(0);
+ maVSSpacing->SetNoSelection();
+ maVSSpacing->SelectItem(0);
mbVS = false;
- maLBKerning.Enable();
- maFTSpacing.Enable();
- maLBKerning.SetNoSelection();
- maEditKerning.SetText(OUString());
- maEditKerning.Disable();
- maFTBy.Disable();
+ maLBKerning->Enable();
+ maFTSpacing->Enable();
+ maLBKerning->SetNoSelection();
+ maEditKerning->SetText(OUString());
+ maEditKerning->Disable();
+ maFTBy->Disable();
}
else
{
- maVSSpacing.SetNoSelection();
- maVSSpacing.SelectItem(0);
+ maVSSpacing->SetNoSelection();
+ maVSSpacing->SelectItem(0);
mbVS = false;
- maEditKerning.SetText(OUString());
- maLBKerning.SetNoSelection();
- maLBKerning.Disable();
- maFTSpacing.Disable();
- maEditKerning.Disable();
- maFTBy.Disable();
+ maEditKerning->SetText(OUString());
+ maLBKerning->SetNoSelection();
+ maLBKerning->Disable();
+ maFTSpacing->Disable();
+ maEditKerning->Disable();
+ maFTBy->Disable();
}
GetFocus();
- maVSSpacing.Format();
- maVSSpacing.StartSelection();
+ maVSSpacing->Format();
+ maVSSpacing->StartSelection();
}
IMPL_LINK(TextCharacterSpacingControl, VSSelHdl, void *, pControl)
{
@@ -296,14 +309,14 @@ IMPL_LINK(TextCharacterSpacingControl, VSSelHdl, void *, pControl)
if(pControl == &maVSSpacing)
{
- sal_uInt16 iPos = maVSSpacing.GetSelectItemId();
+ sal_uInt16 iPos = maVSSpacing->GetSelectItemId();
short nKern = 0;
SfxMapUnit eUnit = mrTextPropertyPanel.GetSpaceController().GetCoreMetric();
long nVal = 0;
if(iPos == 1)
{
nVal = LogicToLogic(30, MAP_POINT, (MapUnit)eUnit);
- nKern = (short)maEditKerning.Denormalize(nVal);
+ nKern = (short)maEditKerning->Denormalize(nVal);
SvxKerningItem aKernItem(-nKern, SID_ATTR_CHAR_KERNING);
mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_KERNING, SfxCallMode::RECORD, &aKernItem, 0L);
mnLastCus = SPACING_CLOSE_BY_CLICK_ICON;
@@ -311,7 +324,7 @@ IMPL_LINK(TextCharacterSpacingControl, VSSelHdl, void *, pControl)
else if(iPos == 2)
{
nVal = LogicToLogic(15, MAP_POINT, (MapUnit)eUnit);
- nKern = (short)maEditKerning.Denormalize(nVal);
+ nKern = (short)maEditKerning->Denormalize(nVal);
SvxKerningItem aKernItem(-nKern, SID_ATTR_CHAR_KERNING);
mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_KERNING, SfxCallMode::RECORD, &aKernItem, 0L);
mnLastCus = SPACING_CLOSE_BY_CLICK_ICON;
@@ -325,7 +338,7 @@ IMPL_LINK(TextCharacterSpacingControl, VSSelHdl, void *, pControl)
else if(iPos == 4)
{
nVal = LogicToLogic(30, MAP_POINT, (MapUnit)eUnit);
- nKern = (short)maEditKerning.Denormalize(nVal);
+ nKern = (short)maEditKerning->Denormalize(nVal);
SvxKerningItem aKernItem(nKern, SID_ATTR_CHAR_KERNING);
mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_KERNING, SfxCallMode::RECORD, &aKernItem, 0L);
mnLastCus = SPACING_CLOSE_BY_CLICK_ICON;
@@ -333,7 +346,7 @@ IMPL_LINK(TextCharacterSpacingControl, VSSelHdl, void *, pControl)
else if(iPos == 5)
{
nVal = LogicToLogic(60, MAP_POINT, (MapUnit)eUnit);
- nKern = (short)maEditKerning.Denormalize(nVal);
+ nKern = (short)maEditKerning->Denormalize(nVal);
SvxKerningItem aKernItem(nKern, SID_ATTR_CHAR_KERNING);
mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_KERNING, SfxCallMode::RECORD, &aKernItem, 0L);
mnLastCus = SPACING_CLOSE_BY_CLICK_ICON;
@@ -344,17 +357,17 @@ IMPL_LINK(TextCharacterSpacingControl, VSSelHdl, void *, pControl)
if(mbCusEnable)
{
nVal = LogicToLogic(mnCustomKern, MAP_POINT, (MapUnit)eUnit);
- nKern = (short)maEditKerning.Denormalize(nVal);
+ nKern = (short)maEditKerning->Denormalize(nVal);
SvxKerningItem aKernItem(nKern , SID_ATTR_CHAR_KERNING);
mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_KERNING, SfxCallMode::RECORD, &aKernItem, 0L);
mnLastCus = SPACING_CLOSE_BY_CLICK_ICON;
}
else
{
- maVSSpacing.SetNoSelection(); //add , set no selection and keep the last select item
- maVSSpacing.Format();
+ maVSSpacing->SetNoSelection(); //add , set no selection and keep the last select item
+ maVSSpacing->Format();
Invalidate();
- maVSSpacing.StartSelection();
+ maVSSpacing->StartSelection();
}
//modify end
}
@@ -370,67 +383,67 @@ IMPL_LINK(TextCharacterSpacingControl, VSSelHdl, void *, pControl)
IMPL_LINK(TextCharacterSpacingControl, KerningSelectHdl, ListBox*, EMPTYARG)
{
- if ( maLBKerning.GetSelectEntryPos() > 0 )
+ if ( maLBKerning->GetSelectEntryPos() > 0 )
{
- maFTBy.Enable();
- maEditKerning.Enable();
+ maFTBy->Enable();
+ maEditKerning->Enable();
}
else
{
- maEditKerning.SetValue( 0 );
- maFTBy.Disable();
- maEditKerning.Disable();
+ maEditKerning->SetValue( 0 );
+ maFTBy->Disable();
+ maEditKerning->Disable();
}
- if ( maVSSpacing.GetSelectItemId() > 0 )
+ if ( maVSSpacing->GetSelectItemId() > 0 )
{
- maVSSpacing.SetNoSelection();
- maVSSpacing.SelectItem(0);
- maVSSpacing.Format();
+ maVSSpacing->SetNoSelection();
+ maVSSpacing->SelectItem(0);
+ maVSSpacing->Format();
Invalidate();
- maVSSpacing.StartSelection();
+ maVSSpacing->StartSelection();
}
KerningModifyHdl( NULL );
return 0;
}
IMPL_LINK(TextCharacterSpacingControl, KerningModifyHdl, MetricField*, EMPTYARG)
{
- if ( maVSSpacing.GetSelectItemId() > 0 )
+ if ( maVSSpacing->GetSelectItemId() > 0 )
{
- maVSSpacing.SetNoSelection();
- maVSSpacing.SelectItem(0);
- maVSSpacing.Format();
+ maVSSpacing->SetNoSelection();
+ maVSSpacing->SelectItem(0);
+ maVSSpacing->Format();
Invalidate();
- maVSSpacing.StartSelection();
+ maVSSpacing->StartSelection();
}
- sal_uInt16 nPos = maLBKerning.GetSelectEntryPos();
+ sal_uInt16 nPos = maLBKerning->GetSelectEntryPos();
short nKern = 0;
SfxMapUnit eUnit = mrTextPropertyPanel.GetSpaceController().GetCoreMetric();
mnLastCus = SPACING_CLOSE_BY_CUS_EDIT;
if ( nPos == SIDEBAR_SPACE_EXPAND || nPos == SIDEBAR_SPACE_CONDENSED )
{
- long nTmp = static_cast<long>(maEditKerning.GetValue());
+ long nTmp = static_cast<long>(maEditKerning->GetValue());
if ( nPos == SIDEBAR_SPACE_CONDENSED )
{
long nMax = mrTextPropertyPanel.GetSelFontSize()/6;
- maEditKerning.SetMax( maEditKerning.Normalize( nMax ), FUNIT_TWIP );
- maEditKerning.SetLast( maEditKerning.GetMax( maEditKerning.GetUnit() ) );
- if(nTmp > maEditKerning.GetMax())
- nTmp = maEditKerning.GetMax();
+ maEditKerning->SetMax( maEditKerning->Normalize( nMax ), FUNIT_TWIP );
+ maEditKerning->SetLast( maEditKerning->GetMax( maEditKerning->GetUnit() ) );
+ if(nTmp > maEditKerning->GetMax())
+ nTmp = maEditKerning->GetMax();
mnCustomKern = -nTmp;
long nVal = LogicToLogic( nTmp, MAP_POINT, (MapUnit)eUnit );
- nKern = (short)maEditKerning.Denormalize( nVal );
+ nKern = (short)maEditKerning->Denormalize( nVal );
nKern *= - 1;
}
else
{
- maEditKerning.SetMax( 9999 );
- maEditKerning.SetLast( 9999 );
- if(nTmp > maEditKerning.GetMax(FUNIT_TWIP))
- nTmp = maEditKerning.GetMax(FUNIT_TWIP);
+ maEditKerning->SetMax( 9999 );
+ maEditKerning->SetLast( 9999 );
+ if(nTmp > maEditKerning->GetMax(FUNIT_TWIP))
+ nTmp = maEditKerning->GetMax(FUNIT_TWIP);
mnCustomKern = nTmp;
long nVal = LogicToLogic( nTmp, MAP_POINT, (MapUnit)eUnit );
- nKern = (short)maEditKerning.Denormalize( nVal );
+ nKern = (short)maEditKerning->Denormalize( nVal );
}
}
else
diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.hxx b/svx/source/sidebar/text/TextCharacterSpacingControl.hxx
index b96dd8945d1a..7d5289f8d52f 100644
--- a/svx/source/sidebar/text/TextCharacterSpacingControl.hxx
+++ b/svx/source/sidebar/text/TextCharacterSpacingControl.hxx
@@ -45,6 +45,7 @@ public:
svx::sidebar::TextPropertyPanel& rPanel,
SfxBindings* pBindings);
virtual ~TextCharacterSpacingControl();
+ virtual void dispose() SAL_OVERRIDE;
void Rearrange(bool bLBAvailable,bool bAvailable, long nKerning);
//virtual void Paint(const Rectangle& rect);
@@ -57,14 +58,14 @@ private:
svx::sidebar::TextPropertyPanel& mrTextPropertyPanel;
SfxBindings* mpBindings;
- ValueSetWithTextControl maVSSpacing;
+ VclPtr<ValueSetWithTextControl> maVSSpacing;
- FixedText maLastCus;
+ VclPtr<FixedText> maLastCus;
- FixedText maFTSpacing;
- ListBox maLBKerning;
- FixedText maFTBy;
- MetricField maEditKerning;
+ VclPtr<FixedText> maFTSpacing;
+ VclPtr<ListBox> maLBKerning;
+ VclPtr<FixedText> maFTBy;
+ VclPtr<MetricField> maEditKerning;
Image* mpImg;
Image* mpImgSel;
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx
index 5744f0a1449c..ee3048354b93 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -114,10 +114,6 @@ TextPropertyPanel::TextPropertyPanel ( vcl::Window* pParent, const css::uno::Ref
mlKerning = 0;
}
-TextPropertyPanel::~TextPropertyPanel (void)
-{
-}
-
void TextPropertyPanel::HandleContextChange (
const ::sfx2::sidebar::EnumContext& rContext)
{
diff --git a/svx/source/sidebar/text/TextPropertyPanel.hxx b/svx/source/sidebar/text/TextPropertyPanel.hxx
index f0734dab09a7..87b12dc63be8 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.hxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.hxx
@@ -102,7 +102,6 @@ private:
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings,
const ::sfx2::sidebar::EnumContext& rContext);
- virtual ~TextPropertyPanel (void);
PopupControl* CreateCharacterSpacingControl (PopupContainer* pParent);
diff --git a/svx/source/sidebar/text/TextUnderlineControl.cxx b/svx/source/sidebar/text/TextUnderlineControl.cxx
index 61f94f8b48a0..054fac065e5f 100644
--- a/svx/source/sidebar/text/TextUnderlineControl.cxx
+++ b/svx/source/sidebar/text/TextUnderlineControl.cxx
@@ -35,8 +35,8 @@ TextUnderlineControl::TextUnderlineControl (
: svx::sidebar::PopupControl( pParent,SVX_RES(RID_POPUPPANEL_TEXTPAGE_UNDERLINE))
, mrTextPropertyPanel(rPanel)
, mpBindings(pBindings)
-, maVSUnderline( this, SVX_RES(VS_UNDERLINE))
-, maPBOptions (this, SVX_RES(PB_OPTIONS) )
+, maVSUnderline(new ValueSet(this, SVX_RES(VS_UNDERLINE)))
+, maPBOptions (new PushButton(this, SVX_RES(PB_OPTIONS)))
, maIMGSingle (SVX_RES(IMG_SINGLE))
, maIMGDouble (SVX_RES(IMG_DOUBLE))
@@ -67,136 +67,136 @@ TextUnderlineControl::TextUnderlineControl (
void TextUnderlineControl::initial()
{
- maVSUnderline.SetColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
- GetSettings().GetStyleSettings().GetMenuColor():
+ maVSUnderline->SetColor(GetSettings().GetStyleSettings().GetHighContrastMode() ?
+ GetSettings().GetStyleSettings().GetMenuColor() :
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
- maVSUnderline.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
- GetSettings().GetStyleSettings().GetMenuColor():
+ maVSUnderline->SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode() ?
+ GetSettings().GetStyleSettings().GetMenuColor() :
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
Link aLink = LINK( this, TextUnderlineControl, PBClickHdl ) ;
- maPBOptions.SetClickHdl(aLink);
+ maPBOptions->SetClickHdl(aLink);
- maVSUnderline.SetStyle( maVSUnderline.GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT );
+ maVSUnderline->SetStyle( maVSUnderline->GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT );
// 'none' item
- maVSUnderline.SetStyle( maVSUnderline.GetStyle()| WB_NONEFIELD | WB_MENUSTYLEVALUESET );
- maVSUnderline.SetText( SVX_RESSTR(STR_WITHOUT) );
+ maVSUnderline->SetStyle( maVSUnderline->GetStyle()| WB_NONEFIELD | WB_MENUSTYLEVALUESET );
+ maVSUnderline->SetText( SVX_RESSTR(STR_WITHOUT) );
- maVSUnderline.InsertItem(1, maIMGSingle, SVX_RESSTR(STR_SINGLE));
- maVSUnderline.SetItemData(1, reinterpret_cast<void*>(UNDERLINE_SINGLE));
+ maVSUnderline->InsertItem(1, maIMGSingle, SVX_RESSTR(STR_SINGLE));
+ maVSUnderline->SetItemData(1, reinterpret_cast<void*>(UNDERLINE_SINGLE));
- maVSUnderline.InsertItem(2, maIMGDouble, SVX_RESSTR(STR_DOUBLE));
- maVSUnderline.SetItemData(2, reinterpret_cast<void*>(UNDERLINE_DOUBLE));
+ maVSUnderline->InsertItem(2, maIMGDouble, SVX_RESSTR(STR_DOUBLE));
+ maVSUnderline->SetItemData(2, reinterpret_cast<void*>(UNDERLINE_DOUBLE));
- maVSUnderline.InsertItem(3, maIMGBold, SVX_RESSTR(STR_BOLD));
- maVSUnderline.SetItemData(3, reinterpret_cast<void*>(UNDERLINE_BOLD));
+ maVSUnderline->InsertItem(3, maIMGBold, SVX_RESSTR(STR_BOLD));
+ maVSUnderline->SetItemData(3, reinterpret_cast<void*>(UNDERLINE_BOLD));
- maVSUnderline.InsertItem(4, maIMGDot, SVX_RESSTR(STR_DOT));
- maVSUnderline.SetItemData(4, reinterpret_cast<void*>(UNDERLINE_DOTTED));
+ maVSUnderline->InsertItem(4, maIMGDot, SVX_RESSTR(STR_DOT));
+ maVSUnderline->SetItemData(4, reinterpret_cast<void*>(UNDERLINE_DOTTED));
- maVSUnderline.InsertItem(5, maIMGDotBold, SVX_RESSTR(STR_DOT_BOLD));
- maVSUnderline.SetItemData(5, reinterpret_cast<void*>(UNDERLINE_BOLDDOTTED));
+ maVSUnderline->InsertItem(5, maIMGDotBold, SVX_RESSTR(STR_DOT_BOLD));
+ maVSUnderline->SetItemData(5, reinterpret_cast<void*>(UNDERLINE_BOLDDOTTED));
- maVSUnderline.InsertItem(6, maIMGDash, SVX_RESSTR(STR_DASH));
- maVSUnderline.SetItemData(6, reinterpret_cast<void*>(UNDERLINE_DASH));
+ maVSUnderline->InsertItem(6, maIMGDash, SVX_RESSTR(STR_DASH));
+ maVSUnderline->SetItemData(6, reinterpret_cast<void*>(UNDERLINE_DASH));
- maVSUnderline.InsertItem(7, maIMGDashLong, SVX_RESSTR(STR_DASH_LONG));
- maVSUnderline.SetItemData(7, reinterpret_cast<void*>(UNDERLINE_LONGDASH));
+ maVSUnderline->InsertItem(7, maIMGDashLong, SVX_RESSTR(STR_DASH_LONG));
+ maVSUnderline->SetItemData(7, reinterpret_cast<void*>(UNDERLINE_LONGDASH));
- maVSUnderline.InsertItem(8, maIMGDashDot, SVX_RESSTR(STR_DASH_DOT));
- maVSUnderline.SetItemData(8, reinterpret_cast<void*>(UNDERLINE_DASHDOT));
+ maVSUnderline->InsertItem(8, maIMGDashDot, SVX_RESSTR(STR_DASH_DOT));
+ maVSUnderline->SetItemData(8, reinterpret_cast<void*>(UNDERLINE_DASHDOT));
- maVSUnderline.InsertItem(9, maIMGDashDotDot, SVX_RESSTR(STR_DASH_DOT_DOT));
- maVSUnderline.SetItemData(9, reinterpret_cast<void*>(UNDERLINE_DASHDOTDOT));
+ maVSUnderline->InsertItem(9, maIMGDashDotDot, SVX_RESSTR(STR_DASH_DOT_DOT));
+ maVSUnderline->SetItemData(9, reinterpret_cast<void*>(UNDERLINE_DASHDOTDOT));
- maVSUnderline.InsertItem(10, maIMGWave, SVX_RESSTR(STR_WAVE));
- maVSUnderline.SetItemData(10, reinterpret_cast<void*>(UNDERLINE_WAVE));
+ maVSUnderline->InsertItem(10, maIMGWave, SVX_RESSTR(STR_WAVE));
+ maVSUnderline->SetItemData(10, reinterpret_cast<void*>(UNDERLINE_WAVE));
- maVSUnderline.SetColCount( 1 );
+ maVSUnderline->SetColCount( 1 );
aLink = LINK( this, TextUnderlineControl, VSSelectHdl ) ;
- maVSUnderline.SetSelectHdl(aLink);
+ maVSUnderline->SetSelectHdl(aLink);
- maVSUnderline.StartSelection();
- maVSUnderline.Show();
+ maVSUnderline->StartSelection();
+ maVSUnderline->Show();
}
void TextUnderlineControl::Rearrange(FontUnderline eLine)
{
- maVSUnderline.SetItemImage(1, maIMGSingle);
- maVSUnderline.SetItemImage(2, maIMGDouble );
- maVSUnderline.SetItemImage(3, maIMGBold);
- maVSUnderline.SetItemImage(4, maIMGDot);
- maVSUnderline.SetItemImage(5, maIMGDotBold);
- maVSUnderline.SetItemImage(6, maIMGDash);
- maVSUnderline.SetItemImage(7, maIMGDashLong);
- maVSUnderline.SetItemImage(8, maIMGDashDot);
- maVSUnderline.SetItemImage(9, maIMGDashDotDot);
- maVSUnderline.SetItemImage(10, maIMGWave);
+ maVSUnderline->SetItemImage(1, maIMGSingle);
+ maVSUnderline->SetItemImage(2, maIMGDouble );
+ maVSUnderline->SetItemImage(3, maIMGBold);
+ maVSUnderline->SetItemImage(4, maIMGDot);
+ maVSUnderline->SetItemImage(5, maIMGDotBold);
+ maVSUnderline->SetItemImage(6, maIMGDash);
+ maVSUnderline->SetItemImage(7, maIMGDashLong);
+ maVSUnderline->SetItemImage(8, maIMGDashDot);
+ maVSUnderline->SetItemImage(9, maIMGDashDotDot);
+ maVSUnderline->SetItemImage(10, maIMGWave);
switch(eLine)
{
case UNDERLINE_SINGLE:
- maVSUnderline.SetItemImage(1, maIMGSingleSel);
- maVSUnderline.SelectItem(1);
- maVSUnderline.GrabFocus();
+ maVSUnderline->SetItemImage(1, maIMGSingleSel);
+ maVSUnderline->SelectItem(1);
+ maVSUnderline->GrabFocus();
break;
case UNDERLINE_DOUBLE:
- maVSUnderline.SetItemImage(2, maIMGDoubleSel);
- maVSUnderline.SelectItem(2);
- maVSUnderline.GrabFocus();
+ maVSUnderline->SetItemImage(2, maIMGDoubleSel);
+ maVSUnderline->SelectItem(2);
+ maVSUnderline->GrabFocus();
break;
case UNDERLINE_BOLD:
- maVSUnderline.SetItemImage(3, maIMGBoldSel);
- maVSUnderline.SelectItem(3);
- maVSUnderline.GrabFocus();
+ maVSUnderline->SetItemImage(3, maIMGBoldSel);
+ maVSUnderline->SelectItem(3);
+ maVSUnderline->GrabFocus();
break;
case UNDERLINE_DOTTED:
- maVSUnderline.SetItemImage(4, maIMGDotSel);
- maVSUnderline.SelectItem(4);
- maVSUnderline.GrabFocus();
+ maVSUnderline->SetItemImage(4, maIMGDotSel);
+ maVSUnderline->SelectItem(4);
+ maVSUnderline->GrabFocus();
break;
case UNDERLINE_BOLDDOTTED:
- maVSUnderline.SetItemImage(5, maIMGDotBoldSel);
- maVSUnderline.SelectItem(5);
- maVSUnderline.GrabFocus();
+ maVSUnderline->SetItemImage(5, maIMGDotBoldSel);
+ maVSUnderline->SelectItem(5);
+ maVSUnderline->GrabFocus();
break;
case UNDERLINE_DASH:
- maVSUnderline.SetItemImage(6, maIMGDashSel);
- maVSUnderline.SelectItem(6);
- maVSUnderline.GrabFocus();
+ maVSUnderline->SetItemImage(6, maIMGDashSel);
+ maVSUnderline->SelectItem(6);
+ maVSUnderline->GrabFocus();
break;
case UNDERLINE_LONGDASH:
- maVSUnderline.SetItemImage(7, maIMGDashLongSel);
- maVSUnderline.SelectItem(7);
- maVSUnderline.GrabFocus();
+ maVSUnderline->SetItemImage(7, maIMGDashLongSel);
+ maVSUnderline->SelectItem(7);
+ maVSUnderline->GrabFocus();
break;
case UNDERLINE_DASHDOT:
- maVSUnderline.SetItemImage(8, maIMGDashDotSel);
- maVSUnderline.SelectItem(8);
- maVSUnderline.GrabFocus();
+ maVSUnderline->SetItemImage(8, maIMGDashDotSel);
+ maVSUnderline->SelectItem(8);
+ maVSUnderline->GrabFocus();
break;
case UNDERLINE_DASHDOTDOT:
- maVSUnderline.SetItemImage(9, maIMGDashDotDotSel);
- maVSUnderline.SelectItem(9);
- maVSUnderline.GrabFocus();
+ maVSUnderline->SetItemImage(9, maIMGDashDotDotSel);
+ maVSUnderline->SelectItem(9);
+ maVSUnderline->GrabFocus();
break;
case UNDERLINE_WAVE:
- maVSUnderline.SetItemImage(10, maIMGWaveSel);
- maVSUnderline.SelectItem(10);
- maVSUnderline.GrabFocus();
+ maVSUnderline->SetItemImage(10, maIMGWaveSel);
+ maVSUnderline->SelectItem(10);
+ maVSUnderline->GrabFocus();
break;
case UNDERLINE_NONE:
- maVSUnderline.SelectItem(0);
- maVSUnderline.GrabFocus();
+ maVSUnderline->SelectItem(0);
+ maVSUnderline->GrabFocus();
break;
default:
- maVSUnderline.SelectItem(1);
- maVSUnderline.SetNoSelection();
- maPBOptions.GrabFocus();
+ maVSUnderline->SelectItem(1);
+ maVSUnderline->SetNoSelection();
+ maPBOptions->GrabFocus();
}
- maVSUnderline.StartSelection();
+ maVSUnderline->StartSelection();
}
@@ -204,10 +204,10 @@ IMPL_LINK(TextUnderlineControl, VSSelectHdl, void *, pControl)
{
if ( pControl == &maVSUnderline )
{
- const sal_uInt16 iPos = maVSUnderline.GetSelectItemId();
+ const sal_uInt16 iPos = maVSUnderline->GetSelectItemId();
const FontUnderline eUnderline = ( iPos == 0 )
? UNDERLINE_NONE
- : static_cast<FontUnderline>(reinterpret_cast<sal_uInt64>(maVSUnderline.GetItemData( iPos )));
+ : static_cast<FontUnderline>(reinterpret_cast<sal_uInt64>(maVSUnderline->GetItemData( iPos )));
SvxUnderlineItem aLineItem(eUnderline, SID_ATTR_CHAR_UNDERLINE);
@@ -220,7 +220,7 @@ IMPL_LINK(TextUnderlineControl, VSSelectHdl, void *, pControl)
IMPL_LINK(TextUnderlineControl, PBClickHdl, PushButton *, pPBtn)
{
- if(pPBtn == &maPBOptions)
+ if(pPBtn == maPBOptions.get())
{
if (mpBindings)
{
diff --git a/svx/source/sidebar/text/TextUnderlineControl.hxx b/svx/source/sidebar/text/TextUnderlineControl.hxx
index 5e32256c3364..8f4192e46f20 100644
--- a/svx/source/sidebar/text/TextUnderlineControl.hxx
+++ b/svx/source/sidebar/text/TextUnderlineControl.hxx
@@ -41,8 +41,8 @@ public:
private:
svx::sidebar::TextPropertyPanel& mrTextPropertyPanel;
SfxBindings* mpBindings;
- ValueSet maVSUnderline;
- PushButton maPBOptions;
+ VclPtr<ValueSet> maVSUnderline;
+ VclPtr<PushButton> maPBOptions;
Image maIMGSingle;
Image maIMGDouble;
diff --git a/svx/source/sidebar/tools/PopupContainer.cxx b/svx/source/sidebar/tools/PopupContainer.cxx
index 1c37b6c6bbf0..f869c160af75 100644
--- a/svx/source/sidebar/tools/PopupContainer.cxx
+++ b/svx/source/sidebar/tools/PopupContainer.cxx
@@ -30,13 +30,6 @@ PopupContainer::PopupContainer (vcl::Window* pParent)
-PopupContainer::~PopupContainer (void)
-{
-}
-
-
-
-
bool PopupContainer::Notify (NotifyEvent& rEvent)
{
if (rEvent.GetType() == MouseNotifyEvent::LOSEFOCUS)
diff --git a/svx/source/sidebar/tools/PopupControl.cxx b/svx/source/sidebar/tools/PopupControl.cxx
index d8c686546e29..f4ed82042d1b 100644
--- a/svx/source/sidebar/tools/PopupControl.cxx
+++ b/svx/source/sidebar/tools/PopupControl.cxx
@@ -38,13 +38,6 @@ PopupControl::PopupControl (
-PopupControl::~PopupControl (void)
-{
-}
-
-
-
-
void PopupControl::Paint (const Rectangle& rBox)
{
Control::Paint(rBox);
diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
index 5ef7f36ca384..85fb3242ebf0 100644
--- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
+++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
@@ -42,11 +42,6 @@ ValueSetWithTextControl::ValueSetWithTextControl(
}
-ValueSetWithTextControl::~ValueSetWithTextControl(void)
-{
-}
-
-
void ValueSetWithTextControl::AddItem(
const Image& rItemImage,
const Image* pSelectedItemImage,
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index 581fc860206a..eb1fcfbce81f 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -170,14 +170,9 @@ public:
pBrowse(pBrowse_)
{}
- virtual ~ImpItemEdit();
virtual void KeyInput(const KeyEvent& rEvt) SAL_OVERRIDE;
};
-ImpItemEdit::~ImpItemEdit()
-{
-}
-
void ImpItemEdit::KeyInput(const KeyEvent& rKEvt)
{
_SdrItemBrowserControl* pBrowseMerk = pBrowse;
@@ -217,11 +212,17 @@ _SdrItemBrowserControl::_SdrItemBrowserControl(vcl::Window* pParent, WinBits nBi
_SdrItemBrowserControl::~_SdrItemBrowserControl()
{
+ dispose();
+}
+
+void _SdrItemBrowserControl::dispose()
+{
delete pEditControl;
delete pAktChangeEntry;
Clear();
+ BrowseBox::dispose();
}
void _SdrItemBrowserControl::ImpCtor()
@@ -1046,25 +1047,32 @@ void _SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItem
_SdrItemBrowserWindow::_SdrItemBrowserWindow(vcl::Window* pParent, WinBits nBits):
FloatingWindow(pParent,nBits),
- aBrowse(this)
+ aBrowse(new _SdrItemBrowserControl(this))
{
- SetOutputSizePixel(aBrowse.GetSizePixel());
+ SetOutputSizePixel(aBrowse->GetSizePixel());
SetText(OUString("Joe's ItemBrowser"));
- aBrowse.Show();
+ aBrowse->Show();
}
_SdrItemBrowserWindow::~_SdrItemBrowserWindow()
{
+ dispose();
+}
+
+void _SdrItemBrowserWindow::dispose()
+{
+ aBrowse.disposeAndClear();
+ FloatingWindow::dispose();
}
void _SdrItemBrowserWindow::Resize()
{
- aBrowse.SetSizePixel(GetOutputSizePixel());
+ aBrowse->SetSizePixel(GetOutputSizePixel());
}
void _SdrItemBrowserWindow::GetFocus()
{
- aBrowse.GrabFocus();
+ aBrowse->GrabFocus();
}
// - SdrItemBrowser -
diff --git a/svx/source/tbxctrls/colorwindow.hxx b/svx/source/tbxctrls/colorwindow.hxx
index 6cfecdfc246f..a05ec801717e 100644
--- a/svx/source/tbxctrls/colorwindow.hxx
+++ b/svx/source/tbxctrls/colorwindow.hxx
@@ -67,7 +67,6 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
const OUString& rWndTitle,
vcl::Window* pParentWindow);
- virtual ~SvxColorWindow_Impl();
void StartSelection();
virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index f78e8276db9e..a5e87774e807 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -186,7 +186,7 @@ SvxColorDockingWindow::SvxColorDockingWindow
SfxDockingWindow( _pBindings, pCW, _pParent, WB_MOVEABLE|WB_CLOSEABLE|WB_SIZEABLE|WB_DOCKABLE ),
pColorList (),
- aColorSet ( this ),
+ aColorSet ( new SvxColorValueSet_docking(this) ),
nLeftSlot ( SID_ATTR_FILL_COLOR ),
nRightSlot ( SID_ATTR_LINE_COLOR ),
nCols ( 20 ),
@@ -197,9 +197,9 @@ SvxColorDockingWindow::SvxColorDockingWindow
SetSizePixel(LogicToPixel(Size(150, 22), MapMode(MAP_APPFONT)));
SetHelpId(HID_CTRL_COLOR);
- aColorSet.SetSelectHdl( LINK( this, SvxColorDockingWindow, SelectHdl ) );
- aColorSet.SetHelpId(HID_COLOR_CTL_COLORS);
- aColorSet.SetPosSizePixel(LogicToPixel(Point(2, 2), MapMode(MAP_APPFONT)),
+ aColorSet->SetSelectHdl( LINK( this, SvxColorDockingWindow, SelectHdl ) );
+ aColorSet->SetHelpId(HID_COLOR_CTL_COLORS);
+ aColorSet->SetPosSizePixel(LogicToPixel(Point(2, 2), MapMode(MAP_APPFONT)),
LogicToPixel(Size(146, 18), MapMode(MAP_APPFONT)));
// Get the model from the view shell. Using SfxObjectShell::Current()
@@ -230,21 +230,28 @@ SvxColorDockingWindow::SvxColorDockingWindow
}
}
- aItemSize = aColorSet.CalcItemSizePixel(Size(aColorSet.getEntryEdgeLength(), aColorSet.getEntryEdgeLength()));
- aItemSize.Width() = aItemSize.Width() + aColorSet.getEntryEdgeLength();
+ aItemSize = aColorSet->CalcItemSizePixel(Size(aColorSet->getEntryEdgeLength(), aColorSet->getEntryEdgeLength()));
+ aItemSize.Width() = aItemSize.Width() + aColorSet->getEntryEdgeLength();
aItemSize.Width() /= 2;
- aItemSize.Height() = aItemSize.Height() + aColorSet.getEntryEdgeLength();
+ aItemSize.Height() = aItemSize.Height() + aColorSet->getEntryEdgeLength();
aItemSize.Height() /= 2;
SetSize();
- aColorSet.Show();
+ aColorSet->Show();
if (_pBindings != NULL)
StartListening( *_pBindings, true );
}
SvxColorDockingWindow::~SvxColorDockingWindow()
{
+ dispose();
+}
+
+void SvxColorDockingWindow::dispose()
+{
EndListening( GetBindings() );
+ aColorSet.disposeAndClear();
+ SfxDockingWindow::dispose();
}
void SvxColorDockingWindow::Notify( SfxBroadcaster& , const SfxHint& rHint )
@@ -264,10 +271,10 @@ void SvxColorDockingWindow::FillValueSet()
if( pColorList.is() )
{
nCount = pColorList->Count();
- aColorSet.Clear();
+ aColorSet->Clear();
// create the first entry for 'invisible/none'
- const Size aColorSize(aColorSet.getEntryEdgeLength(), aColorSet.getEntryEdgeLength());
+ const Size aColorSize(aColorSet->getEntryEdgeLength(), aColorSet->getEntryEdgeLength());
long nPtX = aColorSize.Width() - 1;
long nPtY = aColorSize.Height() - 1;
VirtualDevice aVD;
@@ -280,9 +287,9 @@ void SvxColorDockingWindow::FillValueSet()
Bitmap aBmp( aVD.GetBitmap( Point(), aColorSize ) );
- aColorSet.InsertItem( (sal_uInt16)1, Image(aBmp), SVX_RESSTR( RID_SVXSTR_INVISIBLE ) );
+ aColorSet->InsertItem( (sal_uInt16)1, Image(aBmp), SVX_RESSTR( RID_SVXSTR_INVISIBLE ) );
- aColorSet.addEntriesForXColorList(*pColorList, 2);
+ aColorSet->addEntriesForXColorList(*pColorList, 2);
}
}
@@ -300,31 +307,31 @@ void SvxColorDockingWindow::SetSize()
nLines++;
// Scrollbar setzen/entfernen
- WinBits nBits = aColorSet.GetStyle();
+ WinBits nBits = aColorSet->GetStyle();
if ( static_cast<long>(nLines) * nCols >= nCount )
nBits &= ~WB_VSCROLL;
else
nBits |= WB_VSCROLL;
- aColorSet.SetStyle( nBits );
+ aColorSet->SetStyle( nBits );
// ScrollBar ?
- long nScrollWidth = aColorSet.GetScrollWidth();
+ long nScrollWidth = aColorSet->GetScrollWidth();
if( nScrollWidth > 0 )
{
// Spalten mit ScrollBar berechnen
nCols = (sal_uInt16) ( ( aSize.Width() - nScrollWidth ) / aItemSize.Width() );
}
- aColorSet.SetColCount( nCols );
+ aColorSet->SetColCount( nCols );
if( IsFloatingMode() )
- aColorSet.SetLineCount( nLines );
+ aColorSet->SetLineCount( nLines );
else
{
- aColorSet.SetLineCount( 0 ); // sonst wird LineHeight ignoriert
- aColorSet.SetItemHeight( aItemSize.Height() );
+ aColorSet->SetLineCount( 0 ); // sonst wird LineHeight ignoriert
+ aColorSet->SetItemHeight( aItemSize.Height() );
}
- aColorSet.SetPosSizePixel( Point( 2, 2 ), aSize );
+ aColorSet->SetPosSizePixel( Point( 2, 2 ), aSize );
}
bool SvxColorDockingWindow::Close()
@@ -339,11 +346,11 @@ bool SvxColorDockingWindow::Close()
IMPL_LINK_NOARG(SvxColorDockingWindow, SelectHdl)
{
SfxDispatcher* pDispatcher = GetBindings().GetDispatcher();
- sal_uInt16 nPos = aColorSet.GetSelectItemId();
- Color aColor( aColorSet.GetItemColor( nPos ) );
- OUString aStr( aColorSet.GetItemText( nPos ) );
+ sal_uInt16 nPos = aColorSet->GetSelectItemId();
+ Color aColor( aColorSet->GetItemColor( nPos ) );
+ OUString aStr( aColorSet->GetItemText( nPos ) );
- if (aColorSet.IsLeftButton())
+ if (aColorSet->IsLeftButton())
{
if ( nLeftSlot == SID_ATTR_FILL_COLOR )
{
@@ -444,15 +451,15 @@ void SvxColorDockingWindow::Resizing( Size& rNewSize )
nLines = 1;
// Scrollbar setzen/entfernen
- WinBits nBits = aColorSet.GetStyle();
+ WinBits nBits = aColorSet->GetStyle();
if ( static_cast<long>(nLines) * nCols >= nCount )
nBits &= ~WB_VSCROLL;
else
nBits |= WB_VSCROLL;
- aColorSet.SetStyle( nBits );
+ aColorSet->SetStyle( nBits );
// ScrollBar ?
- long nScrollWidth = aColorSet.GetScrollWidth();
+ long nScrollWidth = aColorSet->GetScrollWidth();
if( nScrollWidth > 0 )
{
// Spalten mit ScrollBar berechnen
@@ -489,7 +496,7 @@ void SvxColorDockingWindow::GetFocus (void)
SfxDockingWindow::GetFocus();
// Grab the focus to the color value set so that it can be controlled
// with the keyboard.
- aColorSet.GrabFocus();
+ aColorSet->GrabFocus();
}
bool SvxColorDockingWindow::Notify( NotifyEvent& rNEvt )
diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx
index c889e98f6fbf..0ce6f92d7bce 100644
--- a/svx/source/tbxctrls/fillctrl.cxx
+++ b/svx/source/tbxctrls/fillctrl.cxx
@@ -562,8 +562,14 @@ FillControl::FillControl(vcl::Window* pParent,WinBits nStyle)
FillControl::~FillControl()
{
+ dispose();
+}
+
+void FillControl::dispose()
+{
delete mpLbFillType;
delete mpLbFillAttr;
+ vcl::Window::dispose();
}
void FillControl::InitializeFillStyleAccordingToGivenFillType(drawing::FillStyle aFillStyle)
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index c4df8a50e66a..a0ec59088431 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -95,12 +95,6 @@ FontWorkGalleryDialog::FontWorkGalleryDialog( SdrView* pSdrView, vcl::Window* pP
}
-FontWorkGalleryDialog::~FontWorkGalleryDialog()
-{
-}
-
-
-
void FontWorkGalleryDialog::initFavorites(sal_uInt16 nThemeId)
{
// Ueber die Gallery werden die Favoriten eingelesen
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index e42c3ce13f79..99093aac9443 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -98,9 +98,7 @@ protected:
virtual void Modify() SAL_OVERRIDE;
public:
-
ImplGrafMetricField( vcl::Window* pParent, const OUString& aCmd, const Reference< XFrame >& rFrame );
- virtual ~ImplGrafMetricField();
void Update( const SfxPoolItem* pItem );
};
@@ -143,10 +141,6 @@ ImplGrafMetricField::ImplGrafMetricField( vcl::Window* pParent, const OUString&
maIdle.SetIdleHdl( LINK( this, ImplGrafMetricField, ImplModifyHdl ) );
}
-ImplGrafMetricField::~ImplGrafMetricField()
-{
-}
-
void ImplGrafMetricField::Modify()
{
maIdle.Start();
@@ -243,8 +237,8 @@ class ImplGrafControl : public Control
{
using Window::Update;
private:
- FixedImage maImage;
- ImplGrafMetricField maField;
+ VclPtr<FixedImage> maImage;
+ VclPtr<ImplGrafMetricField> maField;
protected:
@@ -254,9 +248,10 @@ public:
ImplGrafControl( vcl::Window* pParent, const OUString& rCmd, const Reference< XFrame >& rFrame );
virtual ~ImplGrafControl();
+ virtual void dispose() SAL_OVERRIDE;
- void Update( const SfxPoolItem* pItem ) { maField.Update( pItem ); }
- void SetText( const OUString& rStr ) SAL_OVERRIDE { maField.SetText( rStr ); }
+ void Update( const SfxPoolItem* pItem ) { maField->Update( pItem ); }
+ void SetText( const OUString& rStr ) SAL_OVERRIDE { maField->SetText( rStr ); }
};
ImplGrafControl::ImplGrafControl(
@@ -264,20 +259,20 @@ ImplGrafControl::ImplGrafControl(
const OUString& rCmd,
const Reference< XFrame >& rFrame
) : Control( pParent, WB_TABSTOP )
- , maImage( this )
- , maField( this, rCmd, rFrame )
+ , maImage( new FixedImage(this) )
+ , maField( new ImplGrafMetricField(this, rCmd, rFrame) )
{
ResId aResId( ImplGetRID( rCmd ), DIALOG_MGR() ) ;
Image aImage( aResId );
Size aImgSize( aImage.GetSizePixel() );
- Size aFldSize( maField.GetSizePixel() );
+ Size aFldSize( maField->GetSizePixel() );
long nFldY, nImgY;
- maImage.SetImage( aImage );
- maImage.SetSizePixel( aImgSize );
+ maImage->SetImage( aImage );
+ maImage->SetSizePixel( aImgSize );
// we want to see the backbround of the toolbox, not of the FixedImage or Control
- maImage.SetBackground( Wallpaper( COL_TRANSPARENT ) );
+ maImage->SetBackground( Wallpaper( COL_TRANSPARENT ) );
SetBackground( Wallpaper( COL_TRANSPARENT ) );
if( aImgSize.Height() > aFldSize.Height() )
@@ -286,26 +281,32 @@ ImplGrafControl::ImplGrafControl(
nFldY = 0, nImgY = ( aFldSize.Height() - aImgSize.Height() ) >> 1;
long nOffset = SYMBOL_TO_FIELD_OFFSET / 2;
- maImage.SetPosPixel( Point( nOffset, nImgY ) );
- maField.SetPosPixel( Point( aImgSize.Width() + SYMBOL_TO_FIELD_OFFSET, nFldY ) );
+ maImage->SetPosPixel( Point( nOffset, nImgY ) );
+ maField->SetPosPixel( Point( aImgSize.Width() + SYMBOL_TO_FIELD_OFFSET, nFldY ) );
SetSizePixel( Size( aImgSize.Width() + aFldSize.Width() + SYMBOL_TO_FIELD_OFFSET + nOffset,
std::max( aImgSize.Height(), aFldSize.Height() ) ) );
SetBackground( Wallpaper() ); // transparent background
- maImage.Show();
+ maImage->Show();
- maField.SetHelpId( OUStringToOString( rCmd, RTL_TEXTENCODING_UTF8 ) );
- maField.Show();
+ maField->SetHelpId( OUStringToOString( rCmd, RTL_TEXTENCODING_UTF8 ) );
+ maField->Show();
}
ImplGrafControl::~ImplGrafControl()
{
+ dispose();
+}
+
+void ImplGrafControl::dispose()
+{
+ Control::dispose();
}
void ImplGrafControl::GetFocus()
{
- maField.GrabFocus();
+ maField->GrabFocus();
}
class ImplGrafModeControl : public ListBox
@@ -321,9 +322,7 @@ private:
void ImplReleaseFocus();
public:
-
ImplGrafModeControl( vcl::Window* pParent, const Reference< XFrame >& rFrame );
- virtual ~ImplGrafModeControl();
void Update( const SfxPoolItem* pItem );
};
@@ -343,10 +342,6 @@ ImplGrafModeControl::ImplGrafModeControl( vcl::Window* pParent, const Reference<
Show();
}
-ImplGrafModeControl::~ImplGrafModeControl()
-{
-}
-
void ImplGrafModeControl::Select()
{
if ( !IsTravelSelect() )
diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx
index 92a017f4c25f..3b15a2a2877e 100644
--- a/svx/source/tbxctrls/itemwin.cxx
+++ b/svx/source/tbxctrls/itemwin.cxx
@@ -71,12 +71,6 @@ SvxLineBox::SvxLineBox( vcl::Window* pParent, const Reference< XFrame >& rFrame,
-SvxLineBox::~SvxLineBox()
-{
-}
-
-
-
IMPL_LINK_NOARG(SvxLineBox, DelayHdl_Impl)
{
if ( GetEntryCount() == 0 )
@@ -282,12 +276,6 @@ SvxMetricField::SvxMetricField(
-SvxMetricField::~SvxMetricField()
-{
-}
-
-
-
void SvxMetricField::Update( const XLineWidthItem* pItem )
{
if ( pItem )
@@ -436,12 +424,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxFillTypeBox(vcl::Wi
-SvxFillTypeBox::~SvxFillTypeBox()
-{
-}
-
-
-
bool SvxFillTypeBox::PreNotify( NotifyEvent& rNEvt )
{
MouseNotifyEvent nType = rNEvt.GetType();
@@ -523,12 +505,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxFillAttrBox(vcl::Wi
-SvxFillAttrBox::~SvxFillAttrBox()
-{
-}
-
-
-
bool SvxFillAttrBox::PreNotify( NotifyEvent& rNEvt )
{
MouseNotifyEvent nType = rNEvt.GetType();
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index c9c98d285986..49a8337875ed 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -45,7 +45,7 @@ SFX_IMPL_TOOLBOX_CONTROL(SvxColumnsToolBoxControl,SfxUInt16Item);
class TableWindow : public SfxPopupWindow
{
private:
- PushButton aTableButton;
+ VclPtr<PushButton> aTableButton;
::Color aLineColor;
::Color aFillColor;
::Color aHighlightFillColor;
@@ -79,6 +79,7 @@ public:
ToolBox& rParentTbx,
const Reference< XFrame >& rFrame );
virtual ~TableWindow();
+ virtual void dispose() SAL_OVERRIDE;
void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
@@ -109,7 +110,7 @@ IMPL_LINK_NOARG(TableWindow, SelectHdl)
TableWindow::TableWindow( sal_uInt16 nSlotId, const OUString& rCmd, const OUString& rText,
ToolBox& rParentTbx, const Reference< XFrame >& rFrame )
: SfxPopupWindow( nSlotId, rFrame, WinBits( WB_STDPOPUP ) )
- , aTableButton( this )
+ , aTableButton( new PushButton(this) )
, nCol( 0 )
, nLine( 0 )
, bInitialKeyInput(false)
@@ -143,11 +144,11 @@ TableWindow::TableWindow( sal_uInt16 nSlotId, const OUString& rCmd, const OUStri
SetText( rText );
- aTableButton.SetPosSizePixel( Point( mnTablePosX, mnTableHeight + 5 ),
+ aTableButton->SetPosSizePixel( Point( mnTablePosX, mnTableHeight + 5 ),
Size( mnTableWidth - mnTablePosX, 24 ) );
- aTableButton.SetText( SVX_RESSTR( RID_SVXSTR_MORE ) );
- aTableButton.SetClickHdl( LINK( this, TableWindow, SelectHdl ) );
- aTableButton.Show();
+ aTableButton->SetText( SVX_RESSTR( RID_SVXSTR_MORE ) );
+ aTableButton->SetClickHdl( LINK( this, TableWindow, SelectHdl ) );
+ aTableButton->Show();
SetOutputSizePixel( Size( mnTableWidth + 3, mnTableHeight + 33 ) );
}
@@ -156,9 +157,14 @@ TableWindow::TableWindow( sal_uInt16 nSlotId, const OUString& rCmd, const OUStri
TableWindow::~TableWindow()
{
+ dispose();
}
-
+void TableWindow::dispose()
+{
+ aTableButton.disposeAndClear();
+ SfxPopupWindow::dispose();
+}
SfxPopupWindow* TableWindow::Clone() const
{
diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index bee2f93e3def..8128f3ec05bb 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -256,7 +256,7 @@ SvxLineEndWindow::SvxLineEndWindow(
SfxPopupWindow( nSlotId,
rFrame,
WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION ) ),
- aLineEndSet ( this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ),
+ aLineEndSet ( new ValueSet(this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT )) ),
nCols ( 2 ),
nLines ( 12 ),
nLineEndWidth ( 400 ),
@@ -277,7 +277,7 @@ SvxLineEndWindow::SvxLineEndWindow(
rFrame,
pParentWindow,
WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION ) ),
- aLineEndSet ( this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ),
+ aLineEndSet ( new ValueSet(this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) )),
nCols ( 2 ),
nLines ( 12 ),
nLineEndWidth ( 400 ),
@@ -294,7 +294,7 @@ void SvxLineEndWindow::implInit()
SfxObjectShell* pDocSh = SfxObjectShell::Current();
SetHelpId( HID_POPUP_LINEEND );
- aLineEndSet.SetHelpId( HID_POPUP_LINEEND_CTRL );
+ aLineEndSet->SetHelpId( HID_POPUP_LINEEND_CTRL );
if ( pDocSh )
{
@@ -308,8 +308,8 @@ void SvxLineEndWindow::implInit()
}
DBG_ASSERT( pLineEndList.is(), "LineEndList not found" );
- aLineEndSet.SetSelectHdl( LINK( this, SvxLineEndWindow, SelectHdl ) );
- aLineEndSet.SetColCount( nCols );
+ aLineEndSet->SetSelectHdl( LINK( this, SvxLineEndWindow, SelectHdl ) );
+ aLineEndSet->SetColCount( nCols );
// ValueSet fill with entries of LineEndList
FillValueSet();
@@ -317,7 +317,7 @@ void SvxLineEndWindow::implInit()
AddStatusListener( OUString( ".uno:LineEndListState" ));
//ChangeHelpId( HID_POPUP_LINEENDSTYLE );
- aLineEndSet.Show();
+ aLineEndSet->Show();
}
SfxPopupWindow* SvxLineEndWindow::Clone() const
@@ -329,15 +329,20 @@ SfxPopupWindow* SvxLineEndWindow::Clone() const
SvxLineEndWindow::~SvxLineEndWindow()
{
+ dispose();
}
-
+void SvxLineEndWindow::dispose()
+{
+ aLineEndSet.disposeAndClear();
+ SfxPopupWindow::dispose();
+}
IMPL_LINK_NOARG(SvxLineEndWindow, SelectHdl)
{
boost::scoped_ptr<XLineEndItem> pLineEndItem;
boost::scoped_ptr<XLineStartItem> pLineStartItem;
- sal_uInt16 nId = aLineEndSet.GetSelectItemId();
+ sal_uInt16 nId = aLineEndSet->GetSelectItemId();
if( nId == 1 )
{
@@ -380,7 +385,7 @@ IMPL_LINK_NOARG(SvxLineEndWindow, SelectHdl)
/* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() call.
This instance may be deleted in the meantime (i.e. when a dialog is opened
while in Dispatch()), accessing members will crash in this case. */
- aLineEndSet.SetNoSelection();
+ aLineEndSet->SetNoSelection();
SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ),
OUString( ".uno:LineEndStyle" ),
@@ -415,8 +420,8 @@ void SvxLineEndWindow::FillValueSet()
Point aPt1( aBmpSize.Width(), 0 );
aVD.DrawBitmap( Point(), aBmp );
- aLineEndSet.InsertItem(1, Image(aVD.GetBitmap(aPt0, aBmpSize)), pEntry->GetName());
- aLineEndSet.InsertItem(2, Image(aVD.GetBitmap(aPt1, aBmpSize)), pEntry->GetName());
+ aLineEndSet->InsertItem(1, Image(aVD.GetBitmap(aPt0, aBmpSize)), pEntry->GetName());
+ aLineEndSet->InsertItem(2, Image(aVD.GetBitmap(aPt1, aBmpSize)), pEntry->GetName());
delete pLineEndList->Remove( nCount );
@@ -428,13 +433,13 @@ void SvxLineEndWindow::FillValueSet()
OSL_ENSURE( !aBmp.IsEmpty(), "UI bitmap was not created" );
aVD.DrawBitmap( aPt0, aBmp );
- aLineEndSet.InsertItem((sal_uInt16)((i+1L)*2L+1L),
+ aLineEndSet->InsertItem((sal_uInt16)((i+1L)*2L+1L),
Image(aVD.GetBitmap(aPt0, aBmpSize)), pEntry->GetName());
- aLineEndSet.InsertItem((sal_uInt16)((i+2L)*2L),
+ aLineEndSet->InsertItem((sal_uInt16)((i+2L)*2L),
Image(aVD.GetBitmap(aPt1, aBmpSize)), pEntry->GetName());
}
nLines = std::min( (sal_uInt16)(nCount + 1), (sal_uInt16) MAX_LINES );
- aLineEndSet.SetLineCount( nLines );
+ aLineEndSet->SetLineCount( nLines );
SetSize();
}
@@ -451,15 +456,15 @@ void SvxLineEndWindow::Resize()
mbInResize = true;
if ( !IsRollUp() )
{
- aLineEndSet.SetColCount( nCols );
- aLineEndSet.SetLineCount( nLines );
+ aLineEndSet->SetColCount( nCols );
+ aLineEndSet->SetLineCount( nLines );
SetSize();
Size aSize = GetOutputSizePixel();
aSize.Width() -= 4;
aSize.Height() -= 4;
- aLineEndSet.SetPosSizePixel( Point( 2, 2 ), aSize );
+ aLineEndSet->SetPosSizePixel( Point( 2, 2 ), aSize );
}
//SfxPopupWindow::Resize();
mbInResize = false;
@@ -474,10 +479,10 @@ void SvxLineEndWindow::Resizing( Size& rNewSize )
aBitmapSize.Width() += 6;
aBitmapSize.Height() += 6;
- Size aItemSize = aLineEndSet.CalcItemSizePixel( aBitmapSize ); // -> Member
+ Size aItemSize = aLineEndSet->CalcItemSizePixel( aBitmapSize ); // -> Member
//Size aOldSize = GetOutputSizePixel(); // for width
- sal_uInt16 nItemCount = aLineEndSet.GetItemCount(); // -> Member
+ sal_uInt16 nItemCount = aLineEndSet->GetItemCount(); // -> Member
// identify columns
long nItemW = aItemSize.Width();
@@ -517,7 +522,7 @@ void SvxLineEndWindow::Resizing( Size& rNewSize )
void SvxLineEndWindow::StartSelection()
{
- aLineEndSet.StartSelection();
+ aLineEndSet->StartSelection();
}
@@ -540,7 +545,7 @@ void SvxLineEndWindow::StateChanged(
pLineEndList = static_cast<const SvxLineEndListItem*>(pState)->GetLineEndList();
DBG_ASSERT( pLineEndList.is(), "LineEndList not found" );
- aLineEndSet.Clear();
+ aLineEndSet->Clear();
FillValueSet();
Size aSize = GetOutputSizePixel();
@@ -569,23 +574,23 @@ void SvxLineEndWindow::SetSize()
//if( !bPopupMode )
if( !IsInPopupMode() )
{
- sal_uInt16 nItemCount = aLineEndSet.GetItemCount(); // -> Member
+ sal_uInt16 nItemCount = aLineEndSet->GetItemCount(); // -> Member
sal_uInt16 nMaxLines = nItemCount / nCols; // -> Member ?
if( nItemCount % nCols )
nMaxLines++;
- WinBits nBits = aLineEndSet.GetStyle();
+ WinBits nBits = aLineEndSet->GetStyle();
if ( nLines == nMaxLines )
nBits &= ~WB_VSCROLL;
else
nBits |= WB_VSCROLL;
- aLineEndSet.SetStyle( nBits );
+ aLineEndSet->SetStyle( nBits );
}
Size aSize( aBmpSize );
aSize.Width() += 6;
aSize.Height() += 6;
- aSize = aLineEndSet.CalcWindowSizePixel( aSize );
+ aSize = aLineEndSet->CalcWindowSizePixel( aSize );
aSize.Width() += 4;
aSize.Height() += 4;
SetOutputSizePixel( aSize );
@@ -599,7 +604,7 @@ void SvxLineEndWindow::GetFocus (void)
SfxPopupWindow::GetFocus();
// Grab the focus to the line ends value set so that it can be controlled
// with the keyboard.
- aLineEndSet.GrabFocus();
+ aLineEndSet->GrabFocus();
}
SvxLineEndToolBoxControl::SvxLineEndToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx ) :
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 8782e769deef..51cb5e191f49 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -121,6 +121,7 @@ public:
SvxStyleBox_Impl( vcl::Window* pParent, const OUString& rCommand, SfxStyleFamily eFamily, const Reference< XDispatchProvider >& rDispatchProvider,
const Reference< XFrame >& _xFrame,const OUString& rClearFormatKey, const OUString& rMoreKey, bool bInSpecialMode );
virtual ~SvxStyleBox_Impl();
+ virtual void dispose() SAL_OVERRIDE;
void SetFamily( SfxStyleFamily eNewFamily );
inline bool IsVisible() { return bVisible; }
@@ -197,6 +198,7 @@ public:
, WinBits nStyle = WB_SORT
);
virtual ~SvxFontNameBox_Impl();
+ virtual void dispose() SAL_OVERRIDE;
void FillList();
void Update( const SvxFontItem* pFontItem );
@@ -235,9 +237,9 @@ class SvxFrameWindow_Impl : public SfxPopupWindow
using FloatingWindow::StateChanged;
private:
- SvxFrmValueSet_Impl aFrameSet;
- ImageList aImgList;
- bool bParagraphMode;
+ VclPtr<SvxFrmValueSet_Impl> aFrameSet;
+ ImageList aImgList;
+ bool bParagraphMode;
DECL_LINK( SelectHdl, void * );
@@ -250,6 +252,8 @@ protected:
public:
SvxFrameWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, vcl::Window* pParentWindow );
virtual ~SvxFrameWindow_Impl();
+ virtual void dispose() SAL_OVERRIDE;
+
void StartSelection();
virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
@@ -261,7 +265,7 @@ public:
class SvxLineWindow_Impl : public SfxPopupWindow
{
private:
- LineListBox m_aLineStyleLb;
+ VclPtr<LineListBox> m_aLineStyleLb;
bool m_bIsWriter;
DECL_LINK( SelectHdl, void * );
@@ -274,7 +278,8 @@ protected:
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
public:
SvxLineWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, vcl::Window* pParentWindow );
-
+ virtual ~SvxLineWindow_Impl() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE { m_aLineStyleLb.disposeAndClear(); }
virtual SfxPopupWindow* Clone() const SAL_OVERRIDE;
};
@@ -327,8 +332,14 @@ SvxStyleBox_Impl::SvxStyleBox_Impl(vcl::Window* pParent,
SvxStyleBox_Impl::~SvxStyleBox_Impl()
{
+ dispose();
+}
+
+void SvxStyleBox_Impl::dispose()
+{
for(int i = 0; i < MAX_STYLES_ENTRIES; i++)
delete m_pButtons[i];
+ ComboBox::dispose();
}
void SvxStyleBox_Impl::ReleaseFocus()
@@ -870,7 +881,13 @@ SvxFontNameBox_Impl::SvxFontNameBox_Impl( vcl::Window* pParent, const Reference<
SvxFontNameBox_Impl::~SvxFontNameBox_Impl()
{
+ dispose();
+}
+
+void SvxFontNameBox_Impl::dispose()
+{
GetSubEdit()->RemoveEventListener( LINK( this, SvxFontNameBox_Impl, CheckAndMarkUnknownFont ));
+ FontNameBox::dispose();
}
void SvxFontNameBox_Impl::FillList()
@@ -1222,10 +1239,6 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand,
}
}
-SvxColorWindow_Impl::~SvxColorWindow_Impl()
-{
-}
-
void SvxColorWindow_Impl::KeyInput( const KeyEvent& rKEvt )
{
mpColorSet->KeyInput(rKEvt);
@@ -1443,7 +1456,7 @@ Color BorderColorStatus::GetColor()
SvxFrameWindow_Impl::SvxFrameWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, vcl::Window* pParentWindow ) :
SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION ) ),
- aFrameSet ( this, WinBits( WB_ITEMBORDER | WB_DOUBLEBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ),
+ aFrameSet ( new SvxFrmValueSet_Impl(this, WinBits( WB_ITEMBORDER | WB_DOUBLEBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT )) ),
bParagraphMode(false)
{
BindListener();
@@ -1473,27 +1486,34 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl( sal_uInt16 nId, const Reference< XFram
sal_uInt16 i = 0;
for ( i=1; i<9; i++ )
- aFrameSet.InsertItem( i, aImgList.GetImage(i) );
+ aFrameSet->InsertItem( i, aImgList.GetImage(i) );
//bParagraphMode should have been set in StateChanged
if ( !bParagraphMode )
for ( i = 9; i < 13; i++ )
- aFrameSet.InsertItem( i, aImgList.GetImage(i) );
+ aFrameSet->InsertItem( i, aImgList.GetImage(i) );
- aFrameSet.SetColCount( 4 );
- aFrameSet.SetSelectHdl( LINK( this, SvxFrameWindow_Impl, SelectHdl ) );
+ aFrameSet->SetColCount( 4 );
+ aFrameSet->SetSelectHdl( LINK( this, SvxFrameWindow_Impl, SelectHdl ) );
- lcl_CalcSizeValueSet( *this, aFrameSet, Size( 20 * pParentWindow->GetDPIScaleFactor(), 20 * pParentWindow->GetDPIScaleFactor() ));
+ lcl_CalcSizeValueSet( *this, *aFrameSet.get(), Size( 20 * pParentWindow->GetDPIScaleFactor(), 20 * pParentWindow->GetDPIScaleFactor() ));
SetHelpId( HID_POPUP_FRAME );
SetText( SVX_RESSTR(RID_SVXSTR_FRAME) );
- aFrameSet.SetAccessibleName( SVX_RESSTR(RID_SVXSTR_FRAME) );
- aFrameSet.Show();
+ aFrameSet->SetAccessibleName( SVX_RESSTR(RID_SVXSTR_FRAME) );
+ aFrameSet->Show();
}
SvxFrameWindow_Impl::~SvxFrameWindow_Impl()
{
+ dispose();
+}
+
+void SvxFrameWindow_Impl::dispose()
+{
UnbindListener();
+ aFrameSet.disposeAndClear();
+ SfxPopupWindow::dispose();
}
SfxPopupWindow* SvxFrameWindow_Impl::Clone() const
@@ -1504,12 +1524,12 @@ SfxPopupWindow* SvxFrameWindow_Impl::Clone() const
vcl::Window* SvxFrameWindow_Impl::GetPreferredKeyInputWindow()
{
- return &aFrameSet;
+ return aFrameSet.get();
}
void SvxFrameWindow_Impl::GetFocus()
{
- aFrameSet.GrabFocus();
+ aFrameSet->GrabFocus();
}
void SvxFrameWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt )
@@ -1520,10 +1540,10 @@ void SvxFrameWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt )
{
aImgList = ImageList( SVX_RES( RID_SVXIL_FRAME ) );
- sal_uInt16 nNumOfItems = aFrameSet.GetItemCount();
+ sal_uInt16 nNumOfItems = aFrameSet->GetItemCount();
for( sal_uInt16 i = 1 ; i <= nNumOfItems ; ++i )
- aFrameSet.SetItemImage( i, aImgList.GetImage( i ) );
+ aFrameSet->SetItemImage( i, aImgList.GetImage( i ) );
}
}
@@ -1548,8 +1568,8 @@ IMPL_LINK_NOARG(SvxFrameWindow_Impl, SelectHdl)
*pRight = 0,
*pTop = 0,
*pBottom = 0;
- sal_uInt16 nSel = aFrameSet.GetSelectItemId();
- sal_uInt16 nModifier = aFrameSet.GetModifier();
+ sal_uInt16 nSel = aFrameSet->GetSelectItemId();
+ sal_uInt16 nModifier = aFrameSet->GetModifier();
sal_uInt8 nValidFlags = 0;
theDefLine.GuessLinesWidths(theDefLine.GetBorderLineStyle(),
@@ -1643,7 +1663,7 @@ IMPL_LINK_NOARG(SvxFrameWindow_Impl, SelectHdl)
/* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() call.
This instance may be deleted in the meantime (i.e. when a dialog is opened
while in Dispatch()), accessing members will crash in this case. */
- aFrameSet.SetNoSelection();
+ aFrameSet->SetNoSelection();
SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( GetFrame()->getController(), UNO_QUERY ),
OUString( ".uno:SetBorderStyle" ),
@@ -1654,7 +1674,7 @@ IMPL_LINK_NOARG(SvxFrameWindow_Impl, SelectHdl)
void SvxFrameWindow_Impl::Resize()
{
const Size aSize(this->GetOutputSizePixel());
- aFrameSet.SetPosSizePixel(Point(2,2), Size(aSize.Width() - 4, aSize.Height() - 4));
+ aFrameSet->SetPosSizePixel(Point(2,2), Size(aSize.Width() - 4, aSize.Height() - 4));
}
void SvxFrameWindow_Impl::StateChanged(
@@ -1668,27 +1688,27 @@ void SvxFrameWindow_Impl::StateChanged(
{
bParagraphMode = pItem->GetValue();
//initial calls mustn't insert or remove elements
- if(aFrameSet.GetItemCount())
+ if(aFrameSet->GetItemCount())
{
- bool bTableMode = ( aFrameSet.GetItemCount() == 12 );
+ bool bTableMode = ( aFrameSet->GetItemCount() == 12 );
bool bResize = false;
if ( bTableMode && bParagraphMode )
{
for ( sal_uInt16 i = 9; i < 13; i++ )
- aFrameSet.RemoveItem(i);
+ aFrameSet->RemoveItem(i);
bResize = true;
}
else if ( !bTableMode && !bParagraphMode )
{
for ( sal_uInt16 i = 9; i < 13; i++ )
- aFrameSet.InsertItem( i, aImgList.GetImage(i) );
+ aFrameSet->InsertItem( i, aImgList.GetImage(i) );
bResize = true;
}
if ( bResize )
{
- lcl_CalcSizeValueSet( *this, aFrameSet,Size( 20, 20 ));
+ lcl_CalcSizeValueSet( *this, *aFrameSet.get(), Size( 20, 20 ));
}
}
}
@@ -1698,7 +1718,7 @@ void SvxFrameWindow_Impl::StateChanged(
void SvxFrameWindow_Impl::StartSelection()
{
- aFrameSet.StartSelection();
+ aFrameSet->StartSelection();
}
bool SvxFrameWindow_Impl::Close()
@@ -1714,7 +1734,7 @@ static Color lcl_mediumColor( Color aMain, Color /*aDefault*/ )
SvxLineWindow_Impl::SvxLineWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, vcl::Window* pParentWindow ) :
SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION | WB_AUTOSIZE ) ),
- m_aLineStyleLb( this )
+ m_aLineStyleLb( new LineListBox(this) )
{
try
{
@@ -1725,46 +1745,46 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( sal_uInt16 nId, const Reference< XFrame
{
}
- m_aLineStyleLb.setPosSizePixel( 2, 2, 110, 140 );
+ m_aLineStyleLb->setPosSizePixel( 2, 2, 110, 140 );
SetOutputSizePixel( Size( 114, 144 ) );
- m_aLineStyleLb.SetSourceUnit( FUNIT_TWIP );
- m_aLineStyleLb.SetNone( SVX_RESSTR(RID_SVXSTR_NONE) );
+ m_aLineStyleLb->SetSourceUnit( FUNIT_TWIP );
+ m_aLineStyleLb->SetNone( SVX_RESSTR(RID_SVXSTR_NONE) );
using namespace table::BorderLineStyle;
- m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( SOLID ), SOLID );
- m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( DOTTED ), DOTTED );
- m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( DASHED ), DASHED );
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SOLID ), SOLID );
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( DOTTED ), DOTTED );
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( DASHED ), DASHED );
// Double lines
- m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( DOUBLE ), DOUBLE );
- m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_SMALLGAP ), THINTHICK_SMALLGAP, 20 );
- m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_MEDIUMGAP ), THINTHICK_MEDIUMGAP );
- m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_LARGEGAP ), THINTHICK_LARGEGAP );
- m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_SMALLGAP ), THICKTHIN_SMALLGAP, 20 );
- m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_MEDIUMGAP ), THICKTHIN_MEDIUMGAP );
- m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_LARGEGAP ), THICKTHIN_LARGEGAP );
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( DOUBLE ), DOUBLE );
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_SMALLGAP ), THINTHICK_SMALLGAP, 20 );
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_MEDIUMGAP ), THINTHICK_MEDIUMGAP );
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_LARGEGAP ), THINTHICK_LARGEGAP );
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_SMALLGAP ), THICKTHIN_SMALLGAP, 20 );
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_MEDIUMGAP ), THICKTHIN_MEDIUMGAP );
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_LARGEGAP ), THICKTHIN_LARGEGAP );
// Engraved / Embossed
- m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( EMBOSSED ), EMBOSSED, 15,
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( EMBOSSED ), EMBOSSED, 15,
&SvxBorderLine::threeDLightColor, &SvxBorderLine::threeDDarkColor,
&lcl_mediumColor );
- m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( ENGRAVED ), ENGRAVED, 15,
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( ENGRAVED ), ENGRAVED, 15,
&SvxBorderLine::threeDDarkColor, &SvxBorderLine::threeDLightColor,
&lcl_mediumColor );
// Inset / Outset
- m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( OUTSET ), OUTSET, 10,
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( OUTSET ), OUTSET, 10,
&SvxBorderLine::lightColor, &SvxBorderLine::darkColor );
- m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( INSET ), INSET, 10,
+ m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( INSET ), INSET, 10,
&SvxBorderLine::darkColor, &SvxBorderLine::lightColor );
- m_aLineStyleLb.SetWidth( 20 ); // 1pt by default
+ m_aLineStyleLb->SetWidth( 20 ); // 1pt by default
- m_aLineStyleLb.SetSelectHdl( LINK( this, SvxLineWindow_Impl, SelectHdl ) );
+ m_aLineStyleLb->SetSelectHdl( LINK( this, SvxLineWindow_Impl, SelectHdl ) );
SetHelpId( HID_POPUP_LINE );
SetText( SVX_RESSTR(RID_SVXSTR_FRAME_STYLE) );
- m_aLineStyleLb.Show();
+ m_aLineStyleLb->Show();
}
SfxPopupWindow* SvxLineWindow_Impl::Clone() const
@@ -1775,9 +1795,9 @@ SfxPopupWindow* SvxLineWindow_Impl::Clone() const
IMPL_LINK_NOARG(SvxLineWindow_Impl, SelectHdl)
{
SvxLineItem aLineItem( SID_FRAME_LINESTYLE );
- SvxBorderStyle nStyle = SvxBorderStyle( m_aLineStyleLb.GetSelectEntryStyle() );
+ SvxBorderStyle nStyle = SvxBorderStyle( m_aLineStyleLb->GetSelectEntryStyle() );
- if ( m_aLineStyleLb.GetSelectEntryPos( ) > 0 )
+ if ( m_aLineStyleLb->GetSelectEntryPos( ) > 0 )
{
SvxBorderLine aTmp;
aTmp.SetBorderLineStyle( nStyle );
@@ -1804,7 +1824,7 @@ IMPL_LINK_NOARG(SvxLineWindow_Impl, SelectHdl)
void SvxLineWindow_Impl::Resize()
{
- m_aLineStyleLb.Resize();
+ m_aLineStyleLb->Resize();
}
bool SvxLineWindow_Impl::Close()
@@ -1814,12 +1834,12 @@ bool SvxLineWindow_Impl::Close()
vcl::Window* SvxLineWindow_Impl::GetPreferredKeyInputWindow()
{
- return &m_aLineStyleLb;
+ return m_aLineStyleLb.get();
}
void SvxLineWindow_Impl::GetFocus()
{
- m_aLineStyleLb.GrabFocus();
+ m_aLineStyleLb->GrabFocus();
}
void SvxLineWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt )
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 618469133efc..4931df050026 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -139,10 +139,6 @@ FindTextFieldControl::FindTextFieldControl( vcl::Window* pParent, WinBits nStyle
EnableAutocomplete(true, true);
}
-FindTextFieldControl::~FindTextFieldControl()
-{
-}
-
void FindTextFieldControl::Remember_Impl(const OUString& rStr)
{
sal_uInt16 nCount = GetEntryCount();
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
index da04cd6628dc..3cae7ead6f03 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
@@ -542,9 +542,15 @@ ChineseDictionaryDialog::ChineseDictionaryDialog( vcl::Window* pParent )
ChineseDictionaryDialog::~ChineseDictionaryDialog()
{
+ dispose();
+}
+
+void ChineseDictionaryDialog::dispose()
+{
m_xContext=0;
delete m_pCT_DictionaryToSimplified;
delete m_pCT_DictionaryToTraditional;
+ ModalDialog::dispose();
}
void ChineseDictionaryDialog::setDirectionAndTextConversionOptions( bool bDirectionToSimplified, sal_Int32 nTextConversionOptions /*i18n::TextConversionOption*/ )
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
index 97cef0a2ff33..6b50ef7b0397 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
@@ -113,6 +113,7 @@ class ChineseDictionaryDialog : public ModalDialog
public:
ChineseDictionaryDialog( vcl::Window* pParent );
virtual ~ChineseDictionaryDialog();
+ virtual void dispose() SAL_OVERRIDE;
//this method should be called once before calling execute
void setDirectionAndTextConversionOptions( bool bDirectionToSimplified, sal_Int32 nTextConversionOptions /*i18n::TextConversionOption*/ );
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx
index 8dec51d66809..2253d3419749 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx
@@ -63,12 +63,18 @@ ChineseTranslationDialog::ChineseTranslationDialog( vcl::Window* pParent )
ChineseTranslationDialog::~ChineseTranslationDialog()
{
+ dispose();
+}
+
+void ChineseTranslationDialog::dispose()
+{
if(m_pDictionaryDialog)
{
if(m_pDictionaryDialog->IsInExecute())
m_pDictionaryDialog->EndDialog();
delete m_pDictionaryDialog;
}
+ ModalDialog::dispose();
}
void ChineseTranslationDialog::getSettings( bool& rbDirectionToSimplified
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx
index 5e1f0909d9f2..6afeadf965c2 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx
@@ -39,6 +39,7 @@ class ChineseTranslationDialog : public ModalDialog
public:
ChineseTranslationDialog( vcl::Window* pParent );
virtual ~ChineseTranslationDialog();
+ virtual void dispose() SAL_OVERRIDE;
void getSettings( bool& rbDirectionToSimplified
, bool& rbTranslateCommonTerms ) const;
diff --git a/svx/workben/pixelctl.cxx b/svx/workben/pixelctl.cxx
index 09cb0201c6b1..414448819e8b 100644
--- a/svx/workben/pixelctl.cxx
+++ b/svx/workben/pixelctl.cxx
@@ -79,11 +79,12 @@ SAL_IMPLEMENT_MAIN()
class MyWin : public WorkWindow
{
- SvxPixelCtl maPixelCtl;
+ VclPtr<SvxPixelCtl> maPixelCtl;
public:
MyWin( vcl::Window* pParent, WinBits nWinStyle );
-
+ virtual ~MyWin() { dispose(); }
+ virtual void dispose() SAL_OVERRIDE;
void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE;
@@ -106,11 +107,17 @@ void Main()
MyWin::MyWin( vcl::Window* pParent, WinBits nWinStyle ) :
WorkWindow( pParent, nWinStyle ),
- maPixelCtl( this )
+ maPixelCtl( new SvxPixelCtl(this) )
{
- maPixelCtl.SetPosSizePixel( Point( 10, 10 ), Size( 200, 200 ) );
- maPixelCtl.Show();
+ maPixelCtl->SetPosSizePixel( Point( 10, 10 ), Size( 200, 200 ) );
+ maPixelCtl->Show();
+
+}
+void MyWin::dispose()
+{
+ maPixelCtl.disposeAndClear();
+ WorkWindow::dispose();
}
bool MyWin::Close()