summaryrefslogtreecommitdiff
path: root/sd/source/filter
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/filter')
-rw-r--r--sd/source/filter/eppt/epptbase.hxx5
-rw-r--r--sd/source/filter/eppt/pptx-text.cxx2
-rw-r--r--sd/source/filter/grf/sdgrffilter.cxx4
-rw-r--r--sd/source/filter/html/buttonset.cxx12
-rw-r--r--sd/source/filter/html/htmlex.cxx6
-rw-r--r--sd/source/filter/html/pubdlg.cxx118
6 files changed, 125 insertions, 22 deletions
diff --git a/sd/source/filter/eppt/epptbase.hxx b/sd/source/filter/eppt/epptbase.hxx
index b012245b4132..e616a0524d38 100644
--- a/sd/source/filter/eppt/epptbase.hxx
+++ b/sd/source/filter/eppt/epptbase.hxx
@@ -35,6 +35,8 @@
#include <com/sun/star/presentation/XPresentationSupplier.hpp>
#include <com/sun/star/presentation/FadeEffect.hpp>
#include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
+#include <vcl/vclptr.hxx>
+#include <vcl/outdev.hxx>
#include "grouptable.hxx"
@@ -176,7 +178,6 @@ struct FontCollectionEntry
void ImplInit( const OUString& rName );
};
-class VirtualDevice;
class FontCollection
{
public :
@@ -197,7 +198,7 @@ public :
private:
- VirtualDevice* pVDev;
+ VclPtr<VirtualDevice> pVDev;
boost::ptr_vector<FontCollectionEntry> maFonts;
};
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index 192d4eb31384..a8c3e90ef9a9 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -1396,7 +1396,7 @@ void FontCollectionEntry::ImplInit( const OUString& rName )
FontCollection::~FontCollection()
{
- delete pVDev;
+ pVDev.disposeAndClear();
xPPTBreakIter = NULL;
}
diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index 727fba485427..c8ec3ee85e24 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -169,8 +169,8 @@ void SdGRFFilter::HandleGraphicFilterError( sal_uInt16 nFilterError, sal_uLong n
ErrorHandler::HandleError( ERRCODE_IO_GENERAL );
else
{
- MessageDialog aErrorBox(NULL, SD_RESSTR(nId));
- aErrorBox.Execute();
+ ScopedVclPtrInstance< MessageDialog > aErrorBox(nullptr, SD_RESSTR(nId));
+ aErrorBox->Execute();
}
}
diff --git a/sd/source/filter/html/buttonset.cxx b/sd/source/filter/html/buttonset.cxx
index fbc76de77900..ab7590f09bee 100644
--- a/sd/source/filter/html/buttonset.cxx
+++ b/sd/source/filter/html/buttonset.cxx
@@ -197,8 +197,8 @@ bool ButtonSetImpl::getPreview( int nSet, const std::vector< OUString >& rButton
std::vector< Graphic > aGraphics;
- VirtualDevice aDev;
- aDev.SetMapMode(MapMode(MAP_PIXEL));
+ ScopedVclPtrInstance< VirtualDevice > pDev;
+ pDev->SetMapMode(MapMode(MAP_PIXEL));
Size aSize;
std::vector< OUString >::const_iterator aIter( rButtons.begin() );
@@ -210,7 +210,7 @@ bool ButtonSetImpl::getPreview( int nSet, const std::vector< OUString >& rButton
aGraphics.push_back(aGraphic);
- Size aGraphicSize( aGraphic.GetSizePixel( &aDev ) );
+ Size aGraphicSize( aGraphic.GetSizePixel( pDev ) );
aSize.Width() += aGraphicSize.Width();
if( aSize.Height() < aGraphicSize.Height() )
@@ -220,7 +220,7 @@ bool ButtonSetImpl::getPreview( int nSet, const std::vector< OUString >& rButton
aSize.Width() += 3;
}
- aDev.SetOutputSizePixel( aSize );
+ pDev->SetOutputSizePixel( aSize );
Point aPos;
@@ -229,12 +229,12 @@ bool ButtonSetImpl::getPreview( int nSet, const std::vector< OUString >& rButton
{
Graphic aGraphic( (*aGraphIter++) );
- aGraphic.Draw( &aDev, aPos );
+ aGraphic.Draw( pDev, aPos );
aPos.X() += aGraphic.GetSizePixel().Width() + 3;
}
- rImage = Image( aDev.GetBitmapEx( Point(), aSize ) );
+ rImage = Image( pDev->GetBitmapEx( Point(), aSize ) );
return true;
}
return false;
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index d743aeb854f2..d761c2367f1d 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -3113,9 +3113,9 @@ bool HtmlExport::checkForExistingFiles()
OUString aSystemPath;
osl::FileBase::getSystemPathFromFileURL( maExportPath, aSystemPath );
aMsg = aMsg.replaceFirst( "%FILENAME", aSystemPath );
- WarningBox aWarning( 0, WB_YES_NO | WB_DEF_YES, aMsg );
- aWarning.SetImage( WarningBox::GetStandardImage() );
- bFound = ( RET_NO == aWarning.Execute() );
+ ScopedVclPtrInstance< WarningBox > aWarning( nullptr, WB_YES_NO | WB_DEF_YES, aMsg );
+ aWarning->SetImage( WarningBox::GetStandardImage() );
+ bFound = ( RET_NO == aWarning->Execute() );
delete pResMgr;
}
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index a581a66d82b6..033eeb0fe52b 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -347,12 +347,13 @@ SvStream& WriteSdPublishingDesign(SvStream& rOut, const SdPublishingDesign& rDes
class SdDesignNameDlg : public ModalDialog
{
private:
- Edit* m_pEdit;
- OKButton* m_pBtnOK;
+ VclPtr<Edit> m_pEdit;
+ VclPtr<OKButton> m_pBtnOK;
public:
SdDesignNameDlg(vcl::Window* pWindow, const OUString& aName );
-
+ virtual ~SdDesignNameDlg();
+ virtual void dispose() SAL_OVERRIDE;
OUString GetDesignName();
DECL_LINK(ModifyHdl, void *);
};
@@ -483,8 +484,97 @@ SdPublishingDlg::SdPublishingDlg(vcl::Window* pWindow, DocumentType eDocType)
SdPublishingDlg::~SdPublishingDlg()
{
+ disposeOnce();
+}
+
+void SdPublishingDlg::dispose()
+{
+ pPage1.clear();
+ pPage1_Titel.clear();
+ pPage1_NewDesign.clear();
+ pPage1_OldDesign.clear();
+ pPage1_Designs.clear();
+ pPage1_DelDesign.clear();
+ pPage1_Desc.clear();
+ pPage2.clear();
+ pPage2Frame2.clear();
+ pPage2Frame3.clear();
+ pPage2Frame4.clear();
+ pPage2_Titel.clear();
+ pPage2_Standard.clear();
+ pPage2_Frames.clear();
+ pPage2_SingleDocument.clear();
+ pPage2_Kiosk.clear();
+ pPage2_WebCast.clear();
+ pPage2_Standard_FB.clear();
+ pPage2_Frames_FB.clear();
+ pPage2_Kiosk_FB.clear();
+ pPage2_WebCast_FB.clear();
+ pPage2_Titel_Html.clear();
+ pPage2_Content.clear();
+ pPage2_Notes.clear();
+ pPage2_Titel_WebCast.clear();
+ pPage2_ASP.clear();
+ pPage2_PERL.clear();
+ pPage2_URL_txt.clear();
+ pPage2_URL.clear();
+ pPage2_CGI_txt.clear();
+ pPage2_CGI.clear();
+ pPage2_Index_txt.clear();
+ pPage2_Index.clear();
+ pPage2_Titel_Kiosk.clear();
+ pPage2_ChgDefault.clear();
+ pPage2_ChgAuto.clear();
+ pPage2_Duration_txt.clear();
+ pPage2_Duration.clear();
+ pPage2_Endless.clear();
+ pPage3.clear();
+ pPage3_Titel1.clear();
+ pPage3_Png.clear();
+ pPage3_Gif.clear();
+ pPage3_Jpg.clear();
+ pPage3_Quality_txt.clear();
+ pPage3_Quality.clear();
+ pPage3_Titel2.clear();
+ pPage3_Resolution_1.clear();
+ pPage3_Resolution_2.clear();
+ pPage3_Resolution_3.clear();
+ pPage3_Titel3.clear();
+ pPage3_SldSound.clear();
+ pPage3_HiddenSlides.clear();
+ pPage4.clear();
+ pPage4_Titel1.clear();
+ pPage4_Author_txt.clear();
+ pPage4_Author.clear();
+ pPage4_Email_txt.clear();
+ pPage4_Email.clear();
+ pPage4_WWW_txt.clear();
+ pPage4_WWW.clear();
+ pPage4_Titel2.clear();
+ pPage4_Misc.clear();
+ pPage4_Download.clear();
+ pPage5.clear();
+ pPage5_Titel.clear();
+ pPage5_TextOnly.clear();
+ pPage5_Buttons.clear();
+ pPage6.clear();
+ pPage6_Titel.clear();
+ pPage6_Default.clear();
+ pPage6_User.clear();
+ pPage6_Back.clear();
+ pPage6_Text.clear();
+ pPage6_Link.clear();
+ pPage6_VLink.clear();
+ pPage6_ALink.clear();
+ pPage6_DocColors.clear();
+ pPage6_Preview.clear();
+ pLastPageButton.clear();
+ pNextPageButton.clear();
+ pFinishButton.clear();
+ ModalDialog::dispose();
}
+
// Generate dialog controls and embed them in the pages
void SdPublishingDlg::CreatePages()
{
@@ -1072,11 +1162,11 @@ IMPL_LINK_NOARG(SdPublishingDlg, FinishHdl)
{
bRetry = false;
- SdDesignNameDlg aDlg(this, aName );
+ ScopedVclPtrInstance< SdDesignNameDlg > aDlg(this, aName );
- if ( aDlg.Execute() == RET_OK )
+ if ( aDlg->Execute() == RET_OK )
{
- pDesign->m_aDesignName = aDlg.GetDesignName();
+ pDesign->m_aDesignName = aDlg->GetDesignName();
boost::ptr_vector<SdPublishingDesign>::iterator iter;
for (iter = m_aDesignList.begin(); iter != m_aDesignList.end(); ++iter)
@@ -1087,9 +1177,9 @@ IMPL_LINK_NOARG(SdPublishingDlg, FinishHdl)
if (iter != m_aDesignList.end())
{
- MessageDialog aErrorBox(this, SD_RESSTR(STR_PUBDLG_SAMENAME),
+ ScopedVclPtrInstance<MessageDialog> aErrorBox(this, SD_RESSTR(STR_PUBDLG_SAMENAME),
VCL_MESSAGE_ERROR, VCL_BUTTONS_YES_NO);
- bRetry = aErrorBox.Execute() == RET_NO;
+ bRetry = aErrorBox->Execute() == RET_NO;
if(!bRetry)
m_aDesignList.erase(iter);
@@ -1542,6 +1632,18 @@ SdDesignNameDlg::SdDesignNameDlg(vcl::Window* pWindow, const OUString& aName)
m_pBtnOK->Enable(!aName.isEmpty());
}
+SdDesignNameDlg::~SdDesignNameDlg()
+{
+ disposeOnce();
+}
+
+void SdDesignNameDlg::dispose()
+{
+ m_pEdit.clear();
+ m_pBtnOK.clear();
+ ModalDialog::dispose();
+}
+
OUString SdDesignNameDlg::GetDesignName()
{
return m_pEdit->GetText();