summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/dbggui.cxx14
-rw-r--r--vcl/source/app/stdtext.cxx4
-rw-r--r--vcl/source/app/svdata.cxx4
-rw-r--r--vcl/source/control/edit.cxx8
-rw-r--r--vcl/source/gdi/print3.cxx20
-rw-r--r--vcl/source/window/dialog.cxx16
-rw-r--r--vcl/source/window/menubarwindow.cxx10
7 files changed, 38 insertions, 38 deletions
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index 6dfe9b063af2..65e2d1351c82 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -352,10 +352,10 @@ IMPL_LINK( DbgDialog, ClickHdl, Button*, pButton )
}
if( (aData.nTestFlags & ~IMMEDIATE_FLAGS) != (pData->nTestFlags & ~IMMEDIATE_FLAGS) )
{
- MessageDialog aBox(this, OUString(
+ VclPtr<MessageDialog> aBox(new MessageDialog(this, OUString(
"Some of the changed settings will only be active after "
- "restarting the process"), VCL_MESSAGE_INFO);
- aBox.Execute();
+ "restarting the process"), VCL_MESSAGE_INFO));
+ aBox->Execute();
}
EndDialog( RET_OK );
}
@@ -367,7 +367,7 @@ void DbgDialog::RequestHelp( const HelpEvent& rHEvt )
{
if ( rHEvt.GetMode() & HelpEventMode::CONTEXT )
{
- DbgInfoDialog aInfoDialog( this, true );
+ VclPtr<DbgInfoDialog> aInfoDialog(new DbgInfoDialog( this, true ) );
OUString aHelpText;
const sal_Char** pHelpStrs = pDbgHelpText;
while ( *pHelpStrs )
@@ -375,9 +375,9 @@ void DbgDialog::RequestHelp( const HelpEvent& rHEvt )
aHelpText += OUString::createFromAscii(*pHelpStrs);
pHelpStrs++;
}
- aInfoDialog.SetText( "Debug Hilfe" );
- aInfoDialog.SetInfoText( aHelpText );
- aInfoDialog.Execute();
+ aInfoDialog->SetText( "Debug Hilfe" );
+ aInfoDialog->SetInfoText( aHelpText );
+ aInfoDialog->Execute();
}
}
diff --git a/vcl/source/app/stdtext.cxx b/vcl/source/app/stdtext.cxx
index 8093a6fe6900..ca3ee6bbc566 100644
--- a/vcl/source/app/stdtext.cxx
+++ b/vcl/source/app/stdtext.cxx
@@ -39,8 +39,8 @@ void ShowServiceNotAvailableError(vcl::Window* pParent,
{
OUString aText = GetStandardText(STANDARD_TEXT_SERVICE_NOT_AVAILABLE).
replaceAll("%s", rServiceName);
- MessageDialog aBox(pParent, aText, bError ? VCL_MESSAGE_ERROR : VCL_MESSAGE_WARNING);
- aBox.Execute();
+ VclPtr<MessageDialog> aBox(new MessageDialog(pParent, aText, bError ? VCL_MESSAGE_ERROR : VCL_MESSAGE_WARNING));
+ aBox->Execute();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index 155b5cc0ba3c..b30848cc20a8 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -160,8 +160,8 @@ ResMgr* ImplGetResMgr()
"Missing vcl resource. This indicates that files vital to localization are missing. "
"You might have a corrupt installation.";
fprintf( stderr, "%s\n", pMsg );
- MessageDialog aBox(NULL, OUString(pMsg, strlen(pMsg), RTL_TEXTENCODING_ASCII_US));
- aBox.Execute();
+ VclPtr<MessageDialog> aBox(new MessageDialog(NULL, OUString(pMsg, strlen(pMsg), RTL_TEXTENCODING_ASCII_US)));
+ aBox->Execute();
}
}
return pSVData->mpResMgr;
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index f041d80bae5a..8fe828e415cd 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -805,8 +805,8 @@ void Edit::ShowTruncationWarning( vcl::Window* pParent )
ResMgr* pResMgr = ImplGetResMgr();
if( pResMgr )
{
- MessageDialog aBox(pParent, ResId(SV_EDIT_WARNING_STR, *pResMgr), VCL_MESSAGE_WARNING);
- aBox.Execute();
+ VclPtr<MessageDialog> aBox(new MessageDialog(pParent, ResId(SV_EDIT_WARNING_STR, *pResMgr), VCL_MESSAGE_WARNING));
+ aBox->Execute();
}
}
@@ -2784,8 +2784,8 @@ Size Edit::CalcMinimumSize() const
Size Edit::GetMinimumEditSize()
{
vcl::Window* pDefWin = ImplGetDefaultWindow();
- Edit aEdit( pDefWin, WB_BORDER );
- Size aSize( aEdit.CalcMinimumSize() );
+ VclPtr<Edit> aEdit(new Edit( pDefWin, WB_BORDER ) );
+ Size aSize( aEdit->CalcMinimumSize() );
return aSize;
}
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 543ab88ad245..52c097c293d0 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -305,9 +305,9 @@ void Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
{
if (xController->isShowDialogs())
{
- MessageDialog aBox(NULL, "ErrorNoPrinterDialog",
- "vcl/ui/errornoprinterdialog.ui");
- aBox.Execute();
+ VclPtr<MessageDialog> aBox(new MessageDialog(NULL, "ErrorNoPrinterDialog",
+ "vcl/ui/errornoprinterdialog.ui"));
+ aBox->Execute();
}
xController->setValue( OUString( "IsDirect" ),
makeAny( false ) );
@@ -454,9 +454,9 @@ void Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
{
if( xController->getFilteredPageCount() == 0 )
{
- MessageDialog aBox(NULL, "ErrorNoContentDialog",
- "vcl/ui/errornocontentdialog.ui");
- aBox.Execute();
+ VclPtr<MessageDialog> aBox(new MessageDialog(NULL, "ErrorNoContentDialog",
+ "vcl/ui/errornocontentdialog.ui"));
+ aBox->Execute();
return;
}
}
@@ -470,13 +470,13 @@ void Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
{
try
{
- PrintDialog aDlg( NULL, xController );
- if( ! aDlg.Execute() )
+ VclPtr<PrintDialog> aDlg(new PrintDialog( NULL, xController ));
+ if( ! aDlg->Execute() )
{
xController->abortJob();
return;
}
- if( aDlg.isPrintToFile() )
+ if( aDlg->isPrintToFile() )
{
OUString aFile = queryFile( xController->getPrinter().get() );
if( aFile.isEmpty() )
@@ -487,7 +487,7 @@ void Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
xController->setValue( OUString( "LocalFileName" ),
makeAny( aFile ) );
}
- else if( aDlg.isSingleJobs() )
+ else if( aDlg->isSingleJobs() )
{
xController->setValue( OUString( "PrintCollateAsSingleJobs" ),
makeAny( true ) );
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index d79b5391a28e..8178788edc2e 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1058,8 +1058,8 @@ void Dialog::GrabFocusToFirstControl()
void Dialog::GetDrawWindowBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const
{
- ImplBorderWindow aImplWin( (vcl::Window*)this, WB_BORDER|WB_STDWORK, BORDERWINDOW_STYLE_OVERLAP );
- aImplWin.GetBorder( rLeftBorder, rTopBorder, rRightBorder, rBottomBorder );
+ VclPtr<ImplBorderWindow> aImplWin( new ImplBorderWindow( (vcl::Window*)this, WB_BORDER|WB_STDWORK, BORDERWINDOW_STYLE_OVERLAP ) );
+ aImplWin->GetBorder( rLeftBorder, rTopBorder, rRightBorder, rBottomBorder );
}
void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong )
@@ -1085,13 +1085,13 @@ void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal
if (!( GetStyle() & WB_NOBORDER ))
{
- ImplBorderWindow aImplWin( this, WB_BORDER|WB_STDWORK, BORDERWINDOW_STYLE_OVERLAP );
- aImplWin.SetText( GetText() );
- aImplWin.setPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height() );
- aImplWin.SetDisplayActive( true );
- aImplWin.InitView();
+ VclPtr<ImplBorderWindow> aImplWin( new ImplBorderWindow(this, WB_BORDER|WB_STDWORK, BORDERWINDOW_STYLE_OVERLAP) );
+ aImplWin->SetText( GetText() );
+ aImplWin->setPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height() );
+ aImplWin->SetDisplayActive( true );
+ aImplWin->InitView();
- aImplWin.Draw( Rectangle( aPos, aSize ), pDev, aPos );
+ aImplWin->Draw( Rectangle( aPos, aSize ), pDev, aPos );
}
pDev->Pop();
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 9e45c5d4cfb3..9ea6a12e764e 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -60,7 +60,7 @@ void DecoToolBox::DataChanged( const DataChangedEvent& rDCEvt )
void DecoToolBox::calcMinSize()
{
- ToolBox aTbx( GetParent() );
+ VclPtr<ToolBox> aTbx( new ToolBox(GetParent()) );
if( GetItemCount() == 0 )
{
ResMgr* pResMgr = ImplGetResMgr();
@@ -68,7 +68,7 @@ void DecoToolBox::calcMinSize()
Bitmap aBitmap;
if( pResMgr )
aBitmap = Bitmap( ResId( SV_RESID_BITMAP_CLOSEDOC, *pResMgr ) );
- aTbx.InsertItem( IID_DOCUMENTCLOSE, Image( aBitmap ) );
+ aTbx->InsertItem( IID_DOCUMENTCLOSE, Image( aBitmap ) );
}
else
{
@@ -76,11 +76,11 @@ void DecoToolBox::calcMinSize()
for( sal_uInt16 i = 0; i < nItems; i++ )
{
sal_uInt16 nId = GetItemId( i );
- aTbx.InsertItem( nId, GetItemImage( nId ) );
+ aTbx->InsertItem( nId, GetItemImage( nId ) );
}
}
- aTbx.SetOutStyle( TOOLBOX_STYLE_FLAT );
- maMinSize = aTbx.CalcWindowSizePixel();
+ aTbx->SetOutStyle( TOOLBOX_STYLE_FLAT );
+ maMinSize = aTbx->CalcWindowSizePixel();
}
void DecoToolBox::SetImages( long nMaxHeight, bool bForce )