diff options
author | Kurt Zenker <kz@openoffice.org> | 2006-12-12 16:19:46 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2006-12-12 16:19:46 +0000 |
commit | e2ae1a69ef13cd795e12e539bf21de93ce5064fe (patch) | |
tree | dd55f99a4fc69f96e0f9e69845cbd279ac77137c /sd/source/ui/func | |
parent | 46627fa1401a9c521cf525602f3e539278d1475a (diff) |
INTEGRATION: CWS sdwarningsbegone (1.7.38); FILE MERGED
2006/12/05 12:47:34 cl 1.7.38.2: #i72280# fixed crash because of using deleted itemset
2006/11/22 12:41:54 cl 1.7.38.1: #i69285# warning free code changes for unxlngi6.pro
Diffstat (limited to 'sd/source/ui/func')
-rw-r--r-- | sd/source/ui/func/fumeasur.cxx | 41 |
1 files changed, 13 insertions, 28 deletions
diff --git a/sd/source/ui/func/fumeasur.cxx b/sd/source/ui/func/fumeasur.cxx index b0e1b22da637..b91e86397f6f 100644 --- a/sd/source/ui/func/fumeasur.cxx +++ b/sd/source/ui/func/fumeasur.cxx @@ -4,9 +4,9 @@ * * $RCSfile: fumeasur.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: obo $ $Date: 2006-09-16 18:51:55 $ + * last change: $Author: kz $ $Date: 2006-12-12 17:19:46 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -39,7 +39,6 @@ #include "fumeasur.hxx" -//CHINA001 #include <svx/measure.hxx> #ifndef _SV_MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> #endif @@ -54,8 +53,8 @@ #include "ViewShell.hxx" #endif #include "drawdoc.hxx" -#include <svx/svxdlg.hxx> //CHINA001 -#include <svx/dialogs.hrc> //CHINA001 +#include <svx/svxdlg.hxx> +#include <svx/dialogs.hrc> namespace sd { @@ -86,39 +85,25 @@ FunctionReference FuMeasureDlg::Create( ViewShell* pViewSh, ::sd::Window* pWin, void FuMeasureDlg::DoExecute( SfxRequest& rReq ) { - SfxItemSet aNewAttr( pDoc->GetPool() ); - pView->GetAttributes( aNewAttr ); + SfxItemSet aNewAttr( mpDoc->GetPool() ); + mpView->GetAttributes( aNewAttr ); const SfxItemSet* pArgs = rReq.GetArgs(); - ::std::auto_ptr<AbstractSfxSingleTabDialog> pDlg (NULL); if( !pArgs ) { - //CHINA001 SvxMeasureDialog* pDlg = new SvxMeasureDialog( NULL, aNewAttr, pView ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - DBG_ASSERT(pFact, "Dialogdiet Factory fail!");//CHINA001 - pDlg.reset (pFact->CreateSfxSingleTabDialog( NULL, - aNewAttr, - pView, - ResId(RID_SVXPAGE_MEASURE))); - DBG_ASSERT(pDlg.get()!=NULL, "Dialogdiet fail!");//CHINA001 + ::std::auto_ptr<AbstractSfxSingleTabDialog> pDlg( pFact ? pFact->CreateSfxSingleTabDialog( NULL, aNewAttr, mpView, ResId(RID_SVXPAGE_MEASURE)) : 0 ); - USHORT nResult = pDlg->Execute(); - - switch( nResult ) + if( pDlg.get() && (pDlg->Execute() == RET_OK) ) { - case RET_OK: - { - pArgs = pDlg->GetOutputItemSet(); - rReq.Done( *pArgs ); - } - break; - - default: - return; // Abbruch + rReq.Done( *pDlg->GetOutputItemSet() ); + pArgs = rReq.GetArgs(); } } - pView->SetAttributes( *pArgs ); + + if( pArgs ) + mpView->SetAttributes( *pArgs ); } |