Avoid possible memory leaks in case of exceptions
Change-Id: I986805143615f053b918fb1e64b0b24d6f76f2de
This commit is contained in:
@@ -67,6 +67,7 @@
|
|||||||
#include <sfx2/msg.hxx>
|
#include <sfx2/msg.hxx>
|
||||||
#include "swslots.hxx"
|
#include "swslots.hxx"
|
||||||
#include "swabstdlg.hxx"
|
#include "swabstdlg.hxx"
|
||||||
|
#include <boost/scoped_ptr.hpp>
|
||||||
|
|
||||||
SFX_IMPL_INTERFACE(SwMediaShell, SwBaseShell, SW_RES(STR_SHELLNAME_MEDIA))
|
SFX_IMPL_INTERFACE(SwMediaShell, SwBaseShell, SW_RES(STR_SHELLNAME_MEDIA))
|
||||||
|
|
||||||
@@ -118,7 +119,7 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq)
|
|||||||
|
|
||||||
if( pItem )
|
if( pItem )
|
||||||
{
|
{
|
||||||
SdrMarkList* pMarkList = new SdrMarkList( pSdrView->GetMarkedObjectList() );
|
boost::scoped_ptr<SdrMarkList> pMarkList(new SdrMarkList( pSdrView->GetMarkedObjectList() ));
|
||||||
|
|
||||||
if( 1 == pMarkList->GetMarkCount() )
|
if( 1 == pMarkList->GetMarkCount() )
|
||||||
{
|
{
|
||||||
@@ -130,8 +131,6 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq)
|
|||||||
static_cast< const ::avmedia::MediaItem& >( *pItem ) );
|
static_cast< const ::avmedia::MediaItem& >( *pItem ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delete pMarkList;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -163,7 +162,7 @@ void SwMediaShell::GetMediaState(SfxItemSet &rSet)
|
|||||||
if( pView )
|
if( pView )
|
||||||
{
|
{
|
||||||
bool bDisable = true;
|
bool bDisable = true;
|
||||||
SdrMarkList* pMarkList = new SdrMarkList( pView->GetMarkedObjectList() );
|
boost::scoped_ptr<SdrMarkList> pMarkList(new SdrMarkList( pView->GetMarkedObjectList() ));
|
||||||
|
|
||||||
if( 1 == pMarkList->GetMarkCount() )
|
if( 1 == pMarkList->GetMarkCount() )
|
||||||
{
|
{
|
||||||
@@ -181,8 +180,6 @@ void SwMediaShell::GetMediaState(SfxItemSet &rSet)
|
|||||||
|
|
||||||
if( bDisable )
|
if( bDisable )
|
||||||
rSet.DisableItem( SID_AVMEDIA_TOOLBOX );
|
rSet.DisableItem( SID_AVMEDIA_TOOLBOX );
|
||||||
|
|
||||||
delete pMarkList;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -560,13 +560,13 @@ void SwTableShell::Execute(SfxRequest &rReq)
|
|||||||
|
|
||||||
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rSh.GetView()));
|
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rSh.GetView()));
|
||||||
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
|
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
|
||||||
SwTableRep* pTblRep = ::lcl_TableParamToItemSet( aCoreSet, rSh );
|
boost::scoped_ptr<SwTableRep> pTblRep(::lcl_TableParamToItemSet( aCoreSet, rSh ));
|
||||||
SfxAbstractTabDialog * pDlg = NULL;
|
boost::scoped_ptr<SfxAbstractTabDialog> pDlg;
|
||||||
{
|
{
|
||||||
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
||||||
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
||||||
|
|
||||||
pDlg = pFact->CreateSwTableTabDlg(GetView().GetWindow(), GetPool(), &aCoreSet, &rSh);
|
pDlg.reset(pFact->CreateSwTableTabDlg(GetView().GetWindow(), GetPool(), &aCoreSet, &rSh));
|
||||||
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
||||||
|
|
||||||
if (pItem)
|
if (pItem)
|
||||||
@@ -593,8 +593,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
|
|||||||
ItemSetToTableParam( *pOutSet, rSh );
|
ItemSetToTableParam( *pOutSet, rSh );
|
||||||
}
|
}
|
||||||
|
|
||||||
delete pDlg;
|
pDlg.reset();
|
||||||
delete pTblRep;
|
pTblRep.reset();
|
||||||
rBindings.Update(SID_RULER_BORDERS);
|
rBindings.Update(SID_RULER_BORDERS);
|
||||||
rBindings.Update(SID_ATTR_TABSTOP);
|
rBindings.Update(SID_ATTR_TABSTOP);
|
||||||
rBindings.Update(SID_RULER_BORDERS_VERTICAL);
|
rBindings.Update(SID_RULER_BORDERS_VERTICAL);
|
||||||
@@ -646,9 +646,9 @@ void SwTableShell::Execute(SfxRequest &rReq)
|
|||||||
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
||||||
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
||||||
|
|
||||||
SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( GetView().GetWindow(),aCoreSet,
|
boost::scoped_ptr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( GetView().GetWindow(),aCoreSet,
|
||||||
pView->GetViewFrame()->GetFrame().GetFrameInterface(),
|
pView->GetViewFrame()->GetFrame().GetFrameInterface(),
|
||||||
RC_DLG_SWNUMFMTDLG );
|
RC_DLG_SWNUMFMTDLG ));
|
||||||
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
||||||
|
|
||||||
if (RET_OK == pDlg->Execute())
|
if (RET_OK == pDlg->Execute())
|
||||||
@@ -677,7 +677,6 @@ void SwTableShell::Execute(SfxRequest &rReq)
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delete pDlg;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -794,10 +793,9 @@ void SwTableShell::Execute(SfxRequest &rReq)
|
|||||||
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
||||||
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
||||||
|
|
||||||
AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(&GetView().GetViewFrame()->GetWindow(), &rSh);
|
boost::scoped_ptr<AbstractSwAutoFormatDlg> pDlg(pFact->CreateSwAutoFormatDlg(&GetView().GetViewFrame()->GetWindow(), &rSh));
|
||||||
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
||||||
pDlg->Execute();
|
pDlg->Execute();
|
||||||
delete pDlg;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FN_TABLE_SET_ROW_HEIGHT:
|
case FN_TABLE_SET_ROW_HEIGHT:
|
||||||
@@ -805,10 +803,9 @@ void SwTableShell::Execute(SfxRequest &rReq)
|
|||||||
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
||||||
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
||||||
|
|
||||||
VclAbstractDialog* pDlg = pFact->CreateVclAbstractDialog( GetView().GetWindow(), rSh, DLG_ROW_HEIGHT );
|
boost::scoped_ptr<VclAbstractDialog> pDlg(pFact->CreateVclAbstractDialog( GetView().GetWindow(), rSh, DLG_ROW_HEIGHT ));
|
||||||
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
||||||
pDlg->Execute();
|
pDlg->Execute();
|
||||||
delete pDlg;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FN_NUMBER_BULLETS:
|
case FN_NUMBER_BULLETS:
|
||||||
@@ -918,7 +915,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
|
|||||||
if( pFact )
|
if( pFact )
|
||||||
{
|
{
|
||||||
const long nMaxVert = rSh.GetAnyCurRect( RECT_FRM ).Width() / MINLAY;
|
const long nMaxVert = rSh.GetAnyCurRect( RECT_FRM ).Width() / MINLAY;
|
||||||
SvxAbstractSplittTableDialog* pDlg = pFact->CreateSvxSplittTableDialog( GetView().GetWindow(), rSh.IsTableVertical(), nMaxVert, 99 );
|
boost::scoped_ptr<SvxAbstractSplittTableDialog> pDlg(pFact->CreateSvxSplittTableDialog( GetView().GetWindow(), rSh.IsTableVertical(), nMaxVert, 99 ));
|
||||||
if( pDlg && (pDlg->Execute() == RET_OK) )
|
if( pDlg && (pDlg->Execute() == RET_OK) )
|
||||||
{
|
{
|
||||||
nCount = pDlg->GetCount();
|
nCount = pDlg->GetCount();
|
||||||
@@ -928,7 +925,6 @@ void SwTableShell::Execute(SfxRequest &rReq)
|
|||||||
rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bHorizontal ) );
|
rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bHorizontal ) );
|
||||||
rReq.AppendItem( SfxBoolItem( FN_PARAM_2, bProportional ) );
|
rReq.AppendItem( SfxBoolItem( FN_PARAM_2, bProportional ) );
|
||||||
}
|
}
|
||||||
delete pDlg;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -963,11 +959,10 @@ void SwTableShell::Execute(SfxRequest &rReq)
|
|||||||
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
||||||
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
||||||
|
|
||||||
AbstractSplitTableDialog* pDlg = pFact->CreateSplitTblDialog( GetView().GetWindow(), rSh );
|
boost::scoped_ptr<AbstractSplitTableDialog> pDlg(pFact->CreateSplitTblDialog( GetView().GetWindow(), rSh ));
|
||||||
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
||||||
pDlg->Execute();
|
pDlg->Execute();
|
||||||
rReq.AppendItem( SfxUInt16Item( FN_PARAM_1, pDlg->GetSplitMode() ) );
|
rReq.AppendItem( SfxUInt16Item( FN_PARAM_1, pDlg->GetSplitMode() ) );
|
||||||
delete pDlg;
|
|
||||||
bCallDone = true;
|
bCallDone = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -982,11 +977,10 @@ void SwTableShell::Execute(SfxRequest &rReq)
|
|||||||
{
|
{
|
||||||
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
||||||
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
||||||
VclAbstractDialog* pDlg = pFact->CreateTblMergeDialog(GetView().GetWindow(), bPrev);
|
boost::scoped_ptr<VclAbstractDialog> pDlg(pFact->CreateTblMergeDialog(GetView().GetWindow(), bPrev));
|
||||||
OSL_ENSURE(pDlg, "dialogdiet pDlg fail!");
|
OSL_ENSURE(pDlg, "dialogdiet pDlg fail!");
|
||||||
if( RET_OK != pDlg->Execute())
|
if( RET_OK != pDlg->Execute())
|
||||||
bPrev = bNext = false;
|
bPrev = bNext = false;
|
||||||
delete pDlg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( bPrev || bNext )
|
if( bPrev || bNext )
|
||||||
|
@@ -69,6 +69,7 @@
|
|||||||
#include <edtwin.hxx>
|
#include <edtwin.hxx>
|
||||||
#include <PostItMgr.hxx>
|
#include <PostItMgr.hxx>
|
||||||
#include <switerator.hxx>
|
#include <switerator.hxx>
|
||||||
|
#include <boost/scoped_ptr.hpp>
|
||||||
|
|
||||||
using namespace nsSwDocInfoSubType;
|
using namespace nsSwDocInfoSubType;
|
||||||
|
|
||||||
@@ -123,11 +124,10 @@ void SwTextShell::ExecField(SfxRequest &rReq)
|
|||||||
if(rLink.IsVisible())
|
if(rLink.IsVisible())
|
||||||
{
|
{
|
||||||
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
||||||
SfxAbstractLinksDialog* pDlg = pFact->CreateLinksDialog( pMDI, &rSh.GetLinkManager(), false, &rLink );
|
boost::scoped_ptr<SfxAbstractLinksDialog> pDlg(pFact->CreateLinksDialog( pMDI, &rSh.GetLinkManager(), false, &rLink ));
|
||||||
if ( pDlg )
|
if ( pDlg )
|
||||||
{
|
{
|
||||||
pDlg->Execute();
|
pDlg->Execute();
|
||||||
delete pDlg;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -137,10 +137,9 @@ void SwTextShell::ExecField(SfxRequest &rReq)
|
|||||||
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
||||||
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
|
||||||
|
|
||||||
SfxAbstractDialog* pDlg = pFact->CreateSwFldEditDlg( GetView(),RC_DLG_SWFLDEDITDLG );
|
boost::scoped_ptr<SfxAbstractDialog> pDlg(pFact->CreateSwFldEditDlg( GetView(),RC_DLG_SWFLDEDITDLG ));
|
||||||
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
||||||
pDlg->Execute();
|
pDlg->Execute();
|
||||||
delete pDlg;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -474,7 +473,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
|
|||||||
|
|
||||||
SvxAbstractDialogFactory* pFact2 = SvxAbstractDialogFactory::Create();
|
SvxAbstractDialogFactory* pFact2 = SvxAbstractDialogFactory::Create();
|
||||||
OSL_ENSURE(pFact2, "Dialogdiet fail!");
|
OSL_ENSURE(pFact2, "Dialogdiet fail!");
|
||||||
AbstractSvxPostItDialog* pDlg = pFact2->CreateSvxPostItDialog( pMDI, aSet, bTravel );
|
boost::scoped_ptr<AbstractSvxPostItDialog> pDlg(pFact2->CreateSvxPostItDialog( pMDI, aSet, bTravel ));
|
||||||
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
||||||
pDlg->HideAuthor();
|
pDlg->HideAuthor();
|
||||||
|
|
||||||
@@ -502,7 +501,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
|
|||||||
rSh.SetRedlineComment(sMsg);
|
rSh.SetRedlineComment(sMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
delete pDlg;
|
pDlg.reset();
|
||||||
rSh.SetCareWin(NULL);
|
rSh.SetCareWin(NULL);
|
||||||
bNoInterrupt = false;
|
bNoInterrupt = false;
|
||||||
rSh.ClearMark();
|
rSh.ClearMark();
|
||||||
@@ -536,7 +535,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
|
|||||||
{
|
{
|
||||||
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
||||||
OSL_ENSURE(pFact, "Dialogdiet fail!");
|
OSL_ENSURE(pFact, "Dialogdiet fail!");
|
||||||
AbstractJavaEditDialog* pDlg = pFact->CreateJavaEditDialog(pMDI, &rSh);
|
boost::scoped_ptr<AbstractJavaEditDialog> pDlg(pFact->CreateJavaEditDialog(pMDI, &rSh));
|
||||||
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
||||||
if ( pDlg->Execute() )
|
if ( pDlg->Execute() )
|
||||||
{
|
{
|
||||||
@@ -549,8 +548,6 @@ void SwTextShell::ExecField(SfxRequest &rReq)
|
|||||||
rReq.AppendItem( SfxStringItem( FN_PARAM_2, aType ) );
|
rReq.AppendItem( SfxStringItem( FN_PARAM_2, aType ) );
|
||||||
rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bIsUrl ) );
|
rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bIsUrl ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
delete pDlg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( bNew )
|
if( bNew )
|
||||||
|
@@ -39,6 +39,7 @@
|
|||||||
#include "swabstdlg.hxx"
|
#include "swabstdlg.hxx"
|
||||||
#include <index.hrc>
|
#include <index.hrc>
|
||||||
#include <globals.hrc>
|
#include <globals.hrc>
|
||||||
|
#include <boost/scoped_ptr.hpp>
|
||||||
|
|
||||||
void SwTextShell::ExecIdx(SfxRequest &rReq)
|
void SwTextShell::ExecIdx(SfxRequest &rReq)
|
||||||
{
|
{
|
||||||
@@ -57,10 +58,9 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
|
|||||||
{
|
{
|
||||||
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
||||||
OSL_ENSURE(pFact, "Dialogdiet fail!");
|
OSL_ENSURE(pFact, "Dialogdiet fail!");
|
||||||
VclAbstractDialog* pDlg = pFact->CreateVclAbstractDialog( pMDI, GetShell(), DLG_EDIT_AUTHMARK);
|
boost::scoped_ptr<VclAbstractDialog> pDlg(pFact->CreateVclAbstractDialog( pMDI, GetShell(), DLG_EDIT_AUTHMARK));
|
||||||
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
||||||
pDlg->Execute();
|
pDlg->Execute();
|
||||||
delete pDlg;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FN_INSERT_AUTH_ENTRY_DLG:
|
case FN_INSERT_AUTH_ENTRY_DLG:
|
||||||
@@ -93,10 +93,9 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
|
|||||||
{
|
{
|
||||||
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
||||||
OSL_ENSURE(pFact, "Dialogdiet fail!");
|
OSL_ENSURE(pFact, "Dialogdiet fail!");
|
||||||
VclAbstractDialog* pDlg = pFact->CreateIndexMarkModalDlg(pMDI, GetShell(), aMgr.GetCurTOXMark());
|
boost::scoped_ptr<VclAbstractDialog> pDlg(pFact->CreateIndexMarkModalDlg(pMDI, GetShell(), aMgr.GetCurTOXMark()));
|
||||||
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
||||||
pDlg->Execute();
|
pDlg->Execute();
|
||||||
delete pDlg;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -140,12 +139,11 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
|
|||||||
}
|
}
|
||||||
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
||||||
OSL_ENSURE(pFact, "Dialogdiet fail!");
|
OSL_ENSURE(pFact, "Dialogdiet fail!");
|
||||||
AbstractMultiTOXTabDialog* pDlg = pFact->CreateMultiTOXTabDialog(
|
boost::scoped_ptr<AbstractMultiTOXTabDialog> pDlg(pFact->CreateMultiTOXTabDialog(
|
||||||
pMDI, aSet, rSh, (SwTOXBase* )pCurTOX,
|
pMDI, aSet, rSh, (SwTOXBase* )pCurTOX,
|
||||||
USHRT_MAX, bGlobal);
|
USHRT_MAX, bGlobal));
|
||||||
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
||||||
pDlg->Execute();
|
pDlg->Execute();
|
||||||
delete pDlg;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FN_REMOVE_CUR_TOX:
|
case FN_REMOVE_CUR_TOX:
|
||||||
|
@@ -113,6 +113,7 @@ using namespace ::com::sun::star;
|
|||||||
#include <table.hrc>
|
#include <table.hrc>
|
||||||
#include <frmui.hrc>
|
#include <frmui.hrc>
|
||||||
#include <unomid.h>
|
#include <unomid.h>
|
||||||
|
#include <boost/scoped_ptr.hpp>
|
||||||
|
|
||||||
SFX_IMPL_INTERFACE(SwTextShell, SwBaseShell, SW_RES(STR_SHELLNAME_TEXT))
|
SFX_IMPL_INTERFACE(SwTextShell, SwBaseShell, SW_RES(STR_SHELLNAME_TEXT))
|
||||||
|
|
||||||
@@ -607,10 +608,10 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
|
|||||||
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
|
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
|
||||||
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
||||||
OSL_ENSURE(pFact, "Dialogdiet fail!");
|
OSL_ENSURE(pFact, "Dialogdiet fail!");
|
||||||
SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog("FrameDialog",
|
boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateFrmTabDialog("FrameDialog",
|
||||||
GetView().GetViewFrame(),
|
GetView().GetViewFrame(),
|
||||||
&GetView().GetViewFrame()->GetWindow(),
|
&GetView().GetViewFrame()->GetWindow(),
|
||||||
aSet, true);
|
aSet, true));
|
||||||
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
OSL_ENSURE(pDlg, "Dialogdiet fail!");
|
||||||
if(pDlg->Execute() == RET_OK && pDlg->GetOutputItemSet())
|
if(pDlg->Execute() == RET_OK && pDlg->GetOutputItemSet())
|
||||||
{
|
{
|
||||||
@@ -653,8 +654,6 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
|
|||||||
rShell.EndAllAction();
|
rShell.EndAllAction();
|
||||||
rShell.UnlockPaint();
|
rShell.UnlockPaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
DELETEZ(pDlg);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -662,10 +661,9 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
|
|||||||
{
|
{
|
||||||
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
|
||||||
OSL_ENSURE(pFact, "Dialogdiet fail!");
|
OSL_ENSURE(pFact, "Dialogdiet fail!");
|
||||||
VclAbstractDialog* pColDlg = pFact->CreateVclAbstractDialog( GetView().GetWindow(), rSh, DLG_COLUMN);
|
boost::scoped_ptr<VclAbstractDialog> pColDlg(pFact->CreateVclAbstractDialog( GetView().GetWindow(), rSh, DLG_COLUMN));
|
||||||
OSL_ENSURE(pColDlg, "Dialogdiet fail!");
|
OSL_ENSURE(pColDlg, "Dialogdiet fail!");
|
||||||
pColDlg->Execute();
|
pColDlg->Execute();
|
||||||
delete pColDlg;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1021,8 +1019,8 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
|
|||||||
aAllSet.Put( SfxStringItem( SID_FONT_NAME, aFont.GetFamilyName() ) );
|
aAllSet.Put( SfxStringItem( SID_FONT_NAME, aFont.GetFamilyName() ) );
|
||||||
|
|
||||||
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
||||||
SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( GetView().GetWindow(), aAllSet,
|
boost::scoped_ptr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( GetView().GetWindow(), aAllSet,
|
||||||
GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
|
GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ));
|
||||||
if( RET_OK == pDlg->Execute() )
|
if( RET_OK == pDlg->Execute() )
|
||||||
{
|
{
|
||||||
SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, false );
|
SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, false );
|
||||||
@@ -1042,8 +1040,6 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
|
|||||||
SW_MOD()->ApplyUsrPref(aOpt, &GetView());
|
SW_MOD()->ApplyUsrPref(aOpt, &GetView());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delete pDlg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !aChars.isEmpty() )
|
if( !aChars.isEmpty() )
|
||||||
|
Reference in New Issue
Block a user