1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: fuarea.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sd.hxx"
37 #include <svx/svxids.hrc>
38 #include <svx/tabarea.hxx>
39 #include <vcl/msgbox.hxx>
40 #include <svtools/intitem.hxx>
41 #include <svtools/stritem.hxx>
42 #include <sfx2/request.hxx>
43 #include <sfx2/viewfrm.hxx>
44 #include <sfx2/bindings.hxx>
45 #include "ViewShell.hxx"
47 #include "drawdoc.hxx"
51 #include <svx/svxdlg.hxx>
52 #include <svx/dialogs.hrc>
55 TYPEINIT1( FuArea
, FuPoor
);
57 /*************************************************************************
61 \************************************************************************/
63 FuArea::FuArea( ViewShell
* pViewSh
, ::sd::Window
* pWin
, ::sd::View
* _pView
, SdDrawDocument
* pDoc
, SfxRequest
& rReq
)
64 : FuPoor(pViewSh
, pWin
, _pView
, pDoc
, rReq
)
68 FunctionReference
FuArea::Create( ViewShell
* pViewSh
, ::sd::Window
* pWin
, ::sd::View
* _pView
, SdDrawDocument
* pDoc
, SfxRequest
& rReq
)
70 FunctionReference
xFunc( new FuArea( pViewSh
, pWin
, _pView
, pDoc
, rReq
) );
71 xFunc
->DoExecute(rReq
);
75 void FuArea::DoExecute( SfxRequest
& rReq
)
77 const SfxItemSet
* pArgs
= rReq
.GetArgs();
81 SfxItemSet
aNewAttr( mpDoc
->GetPool() );
82 mpView
->GetAttributes( aNewAttr
);
84 SvxAbstractDialogFactory
* pFact
= SvxAbstractDialogFactory::Create();
85 AbstractSvxAreaTabDialog
* pDlg
= pFact
? pFact
->CreateSvxAreaTabDialog( NULL
,
90 if( pDlg
&& (pDlg
->Execute() == RET_OK
) )
92 mpView
->SetAttributes (*(pDlg
->GetOutputItemSet ()));
95 // Attribute wurden geaendert, Listboxes in Objectbars muessen aktualisiert werden
96 static USHORT SidArray
[] = {
99 SID_ATTR_FILL_GRADIENT
,
101 SID_ATTR_FILL_BITMAP
,
104 mpViewShell
->GetViewFrame()->GetBindings().Invalidate( SidArray
);
113 void FuArea::Activate()
117 void FuArea::Deactivate()
121 } // end of namespace sd