1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _SD_TABLEDESIGNPANE_HXX
21 #define _SD_TABLEDESIGNPANE_HXX
23 #include <com/sun/star/beans/XPropertySet.hpp>
24 #include <com/sun/star/ui/XUIElement.hpp>
25 #include <com/sun/star/ui/LayoutSize.hpp>
26 #include <com/sun/star/drawing/XDrawView.hpp>
27 #include <com/sun/star/container/XIndexAccess.hpp>
29 #include <vcl/dialog.hxx>
30 #include <vcl/fixed.hxx>
31 #include <vcl/button.hxx>
32 #include <sfx2/sidebar/ILayoutableWindow.hxx>
34 #include <boost/scoped_ptr.hpp>
36 #include "TableDesignPane.hrc"
42 class EventMultiplexerEvent
;
47 // --------------------------------------------------------------------
49 class TableDesignPane
: public Control
, public sfx2::sidebar::ILayoutableWindow
52 TableDesignPane( ::Window
* pParent
, ViewShellBase
& rBase
, bool bModal
);
53 virtual ~TableDesignPane();
56 void onSelectionChanged();
59 virtual void Resize();
62 virtual ::com::sun::star::ui::LayoutSize
GetHeightForWidth (const sal_Int32 nWidth
);
64 virtual void DataChanged( const DataChangedEvent
& rDCEvt
);
69 bool isStyleChanged() const { return mbStyleSelected
; }
70 bool isOptionsChanged() const { return mbOptionsChanged
; }
74 void removeListener();
76 void updateControls();
78 void FillDesignPreviewControl();
80 DECL_LINK(EventMultiplexerListener
, tools::EventMultiplexerEvent
*);
81 DECL_LINK(implValueSetHdl
, void *);
82 DECL_LINK(implCheckBoxHdl
, void *);
85 ViewShellBase
& mrBase
;
86 const OUString msTableTemplate
;
88 boost::scoped_ptr
< Control
> mxControls
[DESIGNPANE_CONTROL_COUNT
];
89 int mnOrgOffsetY
[DESIGNPANE_CONTROL_COUNT
];
91 ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> mxSelectedTable
;
92 ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XDrawView
> mxView
;
93 ::com::sun::star::uno::Reference
< ::com::sun::star::container::XIndexAccess
> mxTableFamily
;
94 ::com::sun::star::uno::Reference
< ::com::sun::star::ui::XUIElement
> mxToolbar
;
98 bool mbOptionsChanged
;
101 // --------------------------------------------------------------------
103 class TableDesignDialog
: public ModalDialog
106 TableDesignDialog( ::Window
* pParent
, ViewShellBase
& rBase
);
108 virtual short Execute();
110 boost::scoped_ptr
< TableDesignPane
> mpDesignPane
;
112 boost::scoped_ptr
< FixedLine
> mxFlSep1
;
113 boost::scoped_ptr
< FixedLine
> mxFlSep2
;
114 boost::scoped_ptr
< HelpButton
> mxHelpButton
;
115 boost::scoped_ptr
< OKButton
> mxOkButton
;
116 boost::scoped_ptr
< CancelButton
> mxCancelButton
;
121 #endif // _SD_TABLEFORMATPANE_HXX
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */