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: TableDesignPane.hxx,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 #ifndef _SD_TABLEDESIGNPANE_HXX
32 #define _SD_TABLEDESIGNPANE_HXX
34 #include <com/sun/star/beans/XPropertySet.hpp>
35 #include <com/sun/star/ui/XUIElement.hpp>
36 #include <com/sun/star/drawing/XDrawView.hpp>
37 #include <com/sun/star/container/XIndexAccess.hpp>
39 #include <vcl/dialog.hxx>
40 #include <vcl/fixed.hxx>
41 #include <vcl/button.hxx>
42 #include <svtools/valueset.hxx>
44 #include <boost/scoped_ptr.hpp>
46 #include "TableDesignPane.hrc"
52 class EventMultiplexerEvent
;
57 // --------------------------------------------------------------------
59 class TableDesignPane
: public Control
62 TableDesignPane( ::Window
* pParent
, ViewShellBase
& rBase
, bool bModal
);
63 virtual ~TableDesignPane();
66 void onSelectionChanged();
69 virtual void Resize();
71 virtual void DataChanged( const DataChangedEvent
& rDCEvt
);
76 bool isStyleChanged() const { return mbStyleSelected
; }
77 bool isOptionsChanged() const { return mbOptionsChanged
; }
81 void removeListener();
83 void updateControls();
85 void FillDesignPreviewControl();
87 DECL_LINK(EventMultiplexerListener
, tools::EventMultiplexerEvent
*);
88 DECL_LINK(implValueSetHdl
, Control
* );
89 DECL_LINK(implCheckBoxHdl
, Control
* );
92 ViewShellBase
& mrBase
;
93 const rtl::OUString msTableTemplate
;
95 boost::scoped_ptr
< Control
> mxControls
[DESIGNPANE_CONTROL_COUNT
];
96 int mnOrgOffsetY
[DESIGNPANE_CONTROL_COUNT
];
98 ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> mxSelectedTable
;
99 ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XDrawView
> mxView
;
100 ::com::sun::star::uno::Reference
< ::com::sun::star::container::XIndexAccess
> mxTableFamily
;
101 ::com::sun::star::uno::Reference
< ::com::sun::star::ui::XUIElement
> mxToolbar
;
104 bool mbStyleSelected
;
105 bool mbOptionsChanged
;
108 // --------------------------------------------------------------------
110 class TableDesignDialog
: public ModalDialog
113 TableDesignDialog( ::Window
* pParent
, ViewShellBase
& rBase
);
115 virtual short Execute();
117 ViewShellBase
& mrBase
;
118 boost::scoped_ptr
< TableDesignPane
> mpDesignPane
;
120 boost::scoped_ptr
< FixedLine
> mxFlSep1
;
121 boost::scoped_ptr
< FixedLine
> mxFlSep2
;
122 boost::scoped_ptr
< HelpButton
> mxHelpButton
;
123 boost::scoped_ptr
< OKButton
> mxOkButton
;
124 boost::scoped_ptr
< CancelButton
> mxCancelButton
;
129 #endif // _SD_TABLEFORMATPANE_HXX