summaryrefslogtreecommitdiff
path: root/sd/source/ui/func/fuprlout.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-04-02 08:47:35 +0000
committerKurt Zenker <kz@openoffice.org>2008-04-02 08:47:35 +0000
commitd395b1eec34432595bcfb5ac099eb1ecb67ccb3a (patch)
treef49f85ca4e987ae61e8ea3c1f4e14addb0507761 /sd/source/ui/func/fuprlout.cxx
parent0a5f5e5a1c9bb66adc392907e9309ec9f6665518 (diff)
INTEGRATION: CWS impress139 (1.14.282); FILE MERGED
2008/03/17 12:48:14 cl 1.14.282.2: RESYNC: (1.14-1.15); FILE MERGED 2008/03/11 16:11:39 cl 1.14.282.1: #i75690# added status bar control for styles
Diffstat (limited to 'sd/source/ui/func/fuprlout.cxx')
-rw-r--r--sd/source/ui/func/fuprlout.cxx64
1 files changed, 42 insertions, 22 deletions
diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx
index 1c7190494591..904a0c71bdf5 100644
--- a/sd/source/ui/func/fuprlout.cxx
+++ b/sd/source/ui/func/fuprlout.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: fuprlout.cxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: rt $ $Date: 2008-03-12 11:39:43 $
+ * last change: $Author: kz $ $Date: 2008-04-02 09:47:35 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -60,6 +60,7 @@
#endif
#include <sfx2/viewfrm.hxx>
+#include <sfx2/request.hxx>
#include "drawdoc.hxx"
#include "sdpage.hxx"
@@ -129,7 +130,7 @@ FunctionReference FuPresentationLayout::Create( ViewShell* pViewSh, ::sd::Window
return xFunc;
}
-void FuPresentationLayout::DoExecute( SfxRequest& )
+void FuPresentationLayout::DoExecute( SfxRequest& rReq )
{
// damit nicht Objekte, die gerade editiert werden oder selektiert
// sind , verschwinden
@@ -175,6 +176,7 @@ void FuPresentationLayout::DoExecute( SfxRequest& )
// Dialog aufrufen
BOOL bLoad = FALSE; // tauchen neue Masterpages auf?
String aFile;
+
SfxItemSet aSet(mpDoc->GetPool(), ATTR_PRESLAYOUT_START, ATTR_PRESLAYOUT_END);
aSet.Put( SfxBoolItem( ATTR_PRESLAYOUT_LOAD, bLoad));
@@ -182,31 +184,49 @@ void FuPresentationLayout::DoExecute( SfxRequest& )
aSet.Put( SfxBoolItem( ATTR_PRESLAYOUT_CHECK_MASTERS, bCheckMasters ) );
aSet.Put( SfxStringItem( ATTR_PRESLAYOUT_NAME, aOldLayoutName));
- SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- AbstractSdPresLayoutDlg* pDlg = pFact ? pFact->CreateSdPresLayoutDlg(mpDocSh, mpViewShell, NULL, aSet ) : 0;
- USHORT nResult = pDlg ? pDlg->Execute() : RET_CANCEL;
- switch (nResult)
+ const SfxItemSet *pArgs = rReq.GetArgs ();
+
+ if (pArgs)
+ {
+ if (pArgs->GetItemState(ATTR_PRESLAYOUT_LOAD) == SFX_ITEM_SET)
+ bLoad = ((SfxBoolItem&)pArgs->Get(ATTR_PRESLAYOUT_LOAD)).GetValue();
+ if( pArgs->GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE ) == SFX_ITEM_SET )
+ bMasterPage = ( (SfxBoolItem&) pArgs->Get( ATTR_PRESLAYOUT_MASTER_PAGE ) ).GetValue();
+ if( pArgs->GetItemState( ATTR_PRESLAYOUT_CHECK_MASTERS ) == SFX_ITEM_SET )
+ bCheckMasters = ( (SfxBoolItem&) pArgs->Get( ATTR_PRESLAYOUT_CHECK_MASTERS ) ).GetValue();
+ if (pArgs->GetItemState(ATTR_PRESLAYOUT_NAME) == SFX_ITEM_SET)
+ aFile = ((SfxStringItem&)pArgs->Get(ATTR_PRESLAYOUT_NAME)).GetValue();
+ }
+ else
{
- case RET_OK:
+ SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
+ AbstractSdPresLayoutDlg* pDlg = pFact ? pFact->CreateSdPresLayoutDlg(mpDocSh, mpViewShell, NULL, aSet ) : 0;
+
+ USHORT nResult = pDlg ? pDlg->Execute() : RET_CANCEL;
+
+ switch (nResult)
{
- pDlg->GetAttr(aSet);
- if (aSet.GetItemState(ATTR_PRESLAYOUT_LOAD) == SFX_ITEM_SET)
- bLoad = ((SfxBoolItem&)aSet.Get(ATTR_PRESLAYOUT_LOAD)).GetValue();
- if( aSet.GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE ) == SFX_ITEM_SET )
- bMasterPage = ( (SfxBoolItem&) aSet.Get( ATTR_PRESLAYOUT_MASTER_PAGE ) ).GetValue();
- if( aSet.GetItemState( ATTR_PRESLAYOUT_CHECK_MASTERS ) == SFX_ITEM_SET )
- bCheckMasters = ( (SfxBoolItem&) aSet.Get( ATTR_PRESLAYOUT_CHECK_MASTERS ) ).GetValue();
- if (aSet.GetItemState(ATTR_PRESLAYOUT_NAME) == SFX_ITEM_SET)
- aFile = ((SfxStringItem&)aSet.Get(ATTR_PRESLAYOUT_NAME)).GetValue();
- }
- break;
+ case RET_OK:
+ {
+ pDlg->GetAttr(aSet);
+ if (aSet.GetItemState(ATTR_PRESLAYOUT_LOAD) == SFX_ITEM_SET)
+ bLoad = ((SfxBoolItem&)aSet.Get(ATTR_PRESLAYOUT_LOAD)).GetValue();
+ if( aSet.GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE ) == SFX_ITEM_SET )
+ bMasterPage = ( (SfxBoolItem&) aSet.Get( ATTR_PRESLAYOUT_MASTER_PAGE ) ).GetValue();
+ if( aSet.GetItemState( ATTR_PRESLAYOUT_CHECK_MASTERS ) == SFX_ITEM_SET )
+ bCheckMasters = ( (SfxBoolItem&) aSet.Get( ATTR_PRESLAYOUT_CHECK_MASTERS ) ).GetValue();
+ if (aSet.GetItemState(ATTR_PRESLAYOUT_NAME) == SFX_ITEM_SET)
+ aFile = ((SfxStringItem&)aSet.Get(ATTR_PRESLAYOUT_NAME)).GetValue();
+ }
+ break;
- default:
- bError = TRUE;
+ default:
+ bError = TRUE;
+ }
+ delete pDlg;
}
- delete pDlg;
if (!bError)
{