summaryrefslogtreecommitdiff
path: root/reportdesign/source/ui/inc
diff options
context:
space:
mode:
Diffstat (limited to 'reportdesign/source/ui/inc')
-rw-r--r--reportdesign/source/ui/inc/AddField.hxx120
-rw-r--r--reportdesign/source/ui/inc/ColorChanger.hxx78
-rw-r--r--reportdesign/source/ui/inc/ColorListener.hxx102
-rw-r--r--reportdesign/source/ui/inc/CondFormat.hxx194
-rw-r--r--reportdesign/source/ui/inc/DateTime.hxx118
-rw-r--r--reportdesign/source/ui/inc/DefaultInspection.hxx130
-rw-r--r--reportdesign/source/ui/inc/DesignView.hxx327
-rw-r--r--reportdesign/source/ui/inc/EndMarker.hxx63
-rw-r--r--reportdesign/source/ui/inc/GeometryHandler.hxx184
-rw-r--r--reportdesign/source/ui/inc/GroupsSorting.hxx209
-rw-r--r--reportdesign/source/ui/inc/MarkedSection.hxx68
-rw-r--r--reportdesign/source/ui/inc/Navigator.hxx66
-rw-r--r--reportdesign/source/ui/inc/PageNumber.hxx102
-rw-r--r--reportdesign/source/ui/inc/ReportComponentHandler.hxx135
-rw-r--r--reportdesign/source/ui/inc/ReportController.hxx423
-rw-r--r--reportdesign/source/ui/inc/ReportDefines.hxx47
-rw-r--r--reportdesign/source/ui/inc/ReportRuler.hxx75
-rw-r--r--reportdesign/source/ui/inc/ReportSection.hxx205
-rw-r--r--reportdesign/source/ui/inc/ReportWindow.hxx258
-rw-r--r--reportdesign/source/ui/inc/ScrollHelper.hxx245
-rw-r--r--reportdesign/source/ui/inc/SectionView.hxx74
-rw-r--r--reportdesign/source/ui/inc/StartMarker.hxx105
-rw-r--r--reportdesign/source/ui/inc/UITools.hxx157
-rw-r--r--reportdesign/source/ui/inc/Undo.hxx176
-rw-r--r--reportdesign/source/ui/inc/ViewsWindow.hxx333
-rw-r--r--reportdesign/source/ui/inc/dlgedclip.hxx98
-rw-r--r--reportdesign/source/ui/inc/dlgedfac.hxx60
-rw-r--r--reportdesign/source/ui/inc/dlgedfunc.hxx139
-rw-r--r--reportdesign/source/ui/inc/dlgpage.hxx64
-rw-r--r--reportdesign/source/ui/inc/metadata.hxx163
-rw-r--r--reportdesign/source/ui/inc/propbrw.hxx147
-rw-r--r--reportdesign/source/ui/inc/toolboxcontroller.hxx113
32 files changed, 4778 insertions, 0 deletions
diff --git a/reportdesign/source/ui/inc/AddField.hxx b/reportdesign/source/ui/inc/AddField.hxx
new file mode 100644
index 000000000000..892277d43251
--- /dev/null
+++ b/reportdesign/source/ui/inc/AddField.hxx
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: AddField.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef RPTUI_ADDFIELDWINDOW_HXX
+#define RPTUI_ADDFIELDWINDOW_HXX
+
+#ifndef _SVTREEBOX_HXX //autogen
+#include <svtools/svtreebx.hxx>
+#endif
+#ifndef _SV_FLOATWIN_HXX //autogen
+#include <vcl/floatwin.hxx>
+#endif
+#ifndef _COMPHELPER_PROPERTY_MULTIPLEX_HXX_
+#include <comphelper/propmultiplex.hxx>
+#endif
+#ifndef _TRANSFER_HXX
+#include <svtools/transfer.hxx>
+#endif
+#ifndef RPTUI_REPORTCONTROLLER_HXX
+#include "ReportController.hxx"
+#endif
+#ifndef _SVX_DATACCESSDESCRIPTOR_HXX_
+#include <svx/dataaccessdescriptor.hxx>
+#endif
+#ifndef _CPPUHELPER_BASEMUTEX_HXX_
+#include "cppuhelper/basemutex.hxx"
+#endif
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
+#endif
+
+namespace rptui
+{
+//==================================================================
+class OAddFieldWindow;
+class OAddFieldWindowListBox;
+//========================================================================
+class OAddFieldWindow :public FloatingWindow
+ , public ::cppu::BaseMutex
+ , public ::comphelper::OPropertyChangeListener
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> m_xHoldAlive;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> m_xColumns;
+ ::std::auto_ptr<OAddFieldWindowListBox> m_pListBox;
+ ::rptui::OReportController& m_rController;
+ ::rtl::OUString m_aCommandName;
+ ::rtl::OUString m_sFilter;
+ sal_Int32 m_nCommandType;
+ sal_Bool m_bEscapeProcessing;
+ ::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pChangeListener;
+
+ OAddFieldWindow(const OAddFieldWindow&);
+ void operator =(const OAddFieldWindow&);
+public:
+ OAddFieldWindow(::rptui::OReportController& _rController,Window* pParent);
+
+ virtual ~OAddFieldWindow();
+ virtual void Resize();
+ virtual void GetFocus();
+ virtual long PreNotify( NotifyEvent& _rNEvt );
+
+ inline const ::rtl::OUString& GetCommand() const { return m_aCommandName; }
+ inline sal_Int32 GetCommandType() const { return m_nCommandType; }
+ inline sal_Bool GetEscapeProcessing() const { return m_bEscapeProcessing; }
+ inline ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> getColumns() const { return m_xColumns; }
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> getConnection() const;
+
+ sal_Bool createSelectionControls( );
+
+ /// Updates the current field list
+ void Update();
+
+ /** fills the descriptor with the column name, column object, command and command type
+ *
+ * \param _pSelected the currently selected
+ * \param _rDescriptor the descriptor will be filled
+ */
+ void fillDescriptor(SvLBoxEntry* _pSelected,::svx::ODataAccessDescriptor& _rDescriptor);
+
+protected:
+ // FmXChangeListener
+ virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw( ::com::sun::star::uno::RuntimeException );
+};
+//==============================================================================
+} // rptui
+//==============================================================================
+#endif // RPTUI_ADDFIELDWINDOW_HXX
+
diff --git a/reportdesign/source/ui/inc/ColorChanger.hxx b/reportdesign/source/ui/inc/ColorChanger.hxx
new file mode 100644
index 000000000000..7fcfc1fb29da
--- /dev/null
+++ b/reportdesign/source/ui/inc/ColorChanger.hxx
@@ -0,0 +1,78 @@
+#ifndef RPTUI_COLORCHANGER_HXX
+#define RPTUI_COLORCHANGER_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ColorChanger.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+namespace rptui
+{
+ //=====================================================================
+ //= ColorChanger
+ //=====================================================================
+ class ColorChanger
+ {
+ protected:
+ OutputDevice* m_pDev;
+
+ public:
+ ColorChanger( OutputDevice* _pDev, const Color& _rNewLineColor)
+ :m_pDev( _pDev )
+ {
+ m_pDev->Push( PUSH_LINECOLOR );
+ m_pDev->SetLineColor( _rNewLineColor );
+ }
+ ColorChanger( OutputDevice* _pDev, const Color& _rNewLineColor, const Color& _rNewFillColor )
+ :m_pDev( _pDev )
+ {
+ m_pDev->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ m_pDev->SetLineColor( _rNewLineColor );
+ m_pDev->SetFillColor( _rNewFillColor );
+ }
+ ColorChanger( OutputDevice* _pDev, const Color& _rNewLineColor, const Color& _rNewFillColor, const Color& _rNewTextColor )
+ :m_pDev( _pDev )
+ {
+ m_pDev->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_TEXTCOLOR);
+ m_pDev->SetLineColor( _rNewLineColor );
+ m_pDev->SetFillColor( _rNewFillColor );
+ m_pDev->SetTextColor( _rNewTextColor );
+ }
+
+ ~ColorChanger()
+ {
+ m_pDev->Pop();
+ }
+ };
+}
+#endif //RPTUI_COLORCHANGER_HXX
+
diff --git a/reportdesign/source/ui/inc/ColorListener.hxx b/reportdesign/source/ui/inc/ColorListener.hxx
new file mode 100644
index 000000000000..9963e1ff996f
--- /dev/null
+++ b/reportdesign/source/ui/inc/ColorListener.hxx
@@ -0,0 +1,102 @@
+#ifndef RPTUI_COLORLISTENER_HXX
+#define RPTUI_COLORLISTENER_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ColorListener.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef _SV_WINDOW_HXX
+#include <vcl/window.hxx>
+#endif
+#ifndef INCLUDED_SVTOOLS_COLORCFG_HXX
+#include <svtools/colorcfg.hxx>
+#endif
+#ifndef INCLUDED_SVTOOLS_EXTCOLORCFG_HXX
+#include <svtools/extcolorcfg.hxx>
+#endif
+#ifndef _RPTUI_MODULE_HELPER_RPT_HXX_
+#include "ModuleHelper.hxx"
+#endif
+#ifndef _LINK_HXX
+#include <tools/link.hxx>
+#endif
+
+namespace rptui
+{
+ class OColorListener : public Window, public SfxListener
+ {
+ OColorListener(const OColorListener&);
+ void operator =(const OColorListener&);
+ protected:
+ OModuleClient m_aModuleClient;
+ Link m_aCollapsedLink;
+ svtools::ColorConfig m_aColorConfig;
+ svtools::ExtendedColorConfig m_aExtendedColorConfig;
+ ::rtl::OUString m_sColorEntry;
+ sal_Int32 m_nColor;
+ sal_Int32 m_nTextBoundaries;
+ sal_Bool m_bCollapsed;
+ sal_Bool m_bMarked;
+
+ virtual void ImplInitSettings() = 0;
+ protected:
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ public:
+ OColorListener(Window* _pParent,const ::rtl::OUString& _sColorEntry);
+ virtual ~OColorListener();
+
+ using Window::Notify;
+ // SfxListener
+ virtual void Notify(SfxBroadcaster & rBc, SfxHint const & rHint);
+
+ /** set the marker as marked or not marked
+ @param _bMark set the new state of the marker
+ */
+ void setMarked(sal_Bool _bMark);
+
+ /** returns if the section is marked
+ */
+ inline sal_Bool isMarked() const { return m_bMarked; }
+
+ inline void setCollapsedHdl(const Link& _aLink ){ m_aCollapsedLink = _aLink; }
+ inline sal_Bool isCollapsed() const { return m_bCollapsed; }
+
+ /** collapse or expand
+ *
+ * \param _bCollapsed
+ */
+ virtual void setCollapsed(sal_Bool _bCollapsed);
+ };
+}
+#endif // RPTUI_COLORLISTENER_HXX
+
diff --git a/reportdesign/source/ui/inc/CondFormat.hxx b/reportdesign/source/ui/inc/CondFormat.hxx
new file mode 100644
index 000000000000..b9f87de5868b
--- /dev/null
+++ b/reportdesign/source/ui/inc/CondFormat.hxx
@@ -0,0 +1,194 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: CondFormat.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef RPTUI_CONDFORMAT_HXX
+#define RPTUI_CONDFORMAT_HXX
+
+#include "ModuleHelper.hxx"
+
+#include <com/sun/star/report/XReportControlModel.hpp>
+
+#include <vcl/dialog.hxx>
+#include <vcl/button.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/scrbar.hxx>
+
+#include <boost/shared_ptr.hpp>
+#include <boost/noncopyable.hpp>
+
+#include <vector>
+
+// .............................................................................
+namespace rptui
+{
+// .............................................................................
+
+ #define MAX_CONDITIONS (size_t)3
+
+ class OReportController;
+ class Condition;
+
+ //=========================================================================
+ //= IConditionalFormatAction
+ //=========================================================================
+ class SAL_NO_VTABLE IConditionalFormatAction
+ {
+ public:
+ virtual void addCondition( size_t _nAddAfterIndex ) = 0;
+ virtual void deleteCondition( size_t _nCondIndex ) = 0;
+ virtual void applyCommand( size_t _nCondIndex, USHORT _nCommandId, const ::Color _aColor ) = 0;
+ virtual void moveConditionUp( size_t _nCondIndex ) = 0;
+ virtual void moveConditionDown( size_t _nCondIndex ) = 0;
+ virtual ::rtl::OUString getDataField() const = 0;
+ };
+
+ /*************************************************************************
+ |*
+ |* Conditional formatting dialog
+ |*
+ \************************************************************************/
+ class ConditionalFormattingDialog :public ModalDialog
+ ,public IConditionalFormatAction
+ ,private ::boost::noncopyable
+ {
+ typedef ::boost::shared_ptr< Condition > ConditionPtr;
+ typedef ::std::vector< ConditionPtr > Conditions;
+
+ OModuleClient m_aModuleClient;
+ Window m_aConditionPlayground;
+ Conditions m_aConditions;
+ FixedLine m_aSeparator;
+ OKButton m_aPB_OK;
+ CancelButton m_aPB_CANCEL;
+ HelpButton m_aPB_Help;
+ ScrollBar m_aCondScroll;
+
+ ::rptui::OReportController& m_rController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportControlModel >
+ m_xFormatConditions;
+ ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportControlModel >
+ m_xCopy;
+
+ bool m_bDeletingCondition;
+
+ public:
+ ConditionalFormattingDialog(
+ Window* pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportControlModel>& _xHoldAlive,
+ ::rptui::OReportController& _rController
+ );
+ virtual ~ConditionalFormattingDialog();
+
+ // Dialog overridables
+ virtual short Execute();
+
+ // IConditionalFormatAction overridables
+ virtual void addCondition( size_t _nAddAfterIndex );
+ virtual void deleteCondition( size_t _nCondIndex );
+ virtual void applyCommand( size_t _nCondIndex, USHORT _nCommandId, const ::Color _aColor );
+ virtual void moveConditionUp( size_t _nCondIndex );
+ virtual void moveConditionDown( size_t _nCondIndex );
+ virtual ::rtl::OUString getDataField() const;
+
+ protected:
+ virtual long PreNotify( NotifyEvent& rNEvt );
+
+ private:
+ DECL_LINK( OnScroll, ScrollBar* );
+
+ private:
+ /// returns the current number of conditions
+ size_t impl_getConditionCount() const { return m_aConditions.size(); }
+
+ /** adds a condition
+ @param _nNewCondIndex
+ the index of the to-be-inserted condition
+ */
+ void impl_addCondition_nothrow( size_t _nNewCondIndex );
+
+ /// deletes the condition with the given index
+ void impl_deleteCondition_nothrow( size_t _nCondIndex );
+
+ /// moves the condition with the given index one position
+ void impl_moveCondition_nothrow( size_t _nCondIndex, bool _bMoveUp );
+
+ /// does the dialog layouting
+ void impl_layoutAll();
+
+ /// does the layout for the condition windows
+ void impl_layoutConditions( Point& _out_rBelowLastVisible );
+
+ /// called when the number of conditions has changed in any way
+ void impl_conditionCountChanged();
+
+ /// initializes the conditions from m_xCopy
+ void impl_initializeConditions();
+
+ /// tells all our Condition instances their new index
+ void impl_updateConditionIndicies();
+
+ /// returns the number of the condition which has the (child path) focus
+ size_t impl_getFocusedConditionIndex( sal_Int32 _nFallBackIfNone ) const;
+
+ /// returns the index of the first visible condition
+ size_t impl_getFirstVisibleConditionIndex() const;
+
+ /// returns the index of the last visible condition
+ size_t impl_getLastVisibleConditionIndex() const;
+
+ /// determines the width of a Condition
+ long impl_getConditionWidth() const;
+
+ /// focuses the condition with the given index, making it visible if necessary
+ void impl_focusCondition( size_t _nCondIndex );
+
+ /// updates the scrollbar range. (does not update the scrollbar visibility)
+ void impl_updateScrollBarRange();
+
+ /// determines whether we need a scrollbar for the conditions
+ bool impl_needScrollBar() const { return m_aConditions.size() > MAX_CONDITIONS; }
+
+ /// scrolls the condition with the given index to the top position
+ void impl_scrollTo( size_t _nTopCondIndex );
+
+ /// ensures the condition with the given index is visible
+ void impl_ensureConditionVisible( size_t _nCondIndex );
+ };
+
+// .............................................................................
+} // namespace rptui
+// .............................................................................
+
+#endif // RPTUI_CONDFORMAT_HXX
diff --git a/reportdesign/source/ui/inc/DateTime.hxx b/reportdesign/source/ui/inc/DateTime.hxx
new file mode 100644
index 000000000000..0781840d0275
--- /dev/null
+++ b/reportdesign/source/ui/inc/DateTime.hxx
@@ -0,0 +1,118 @@
+#ifndef RPTUI_DATETIME_HXX
+#define RPTUI_DATETIME_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: DateTime.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef _DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _SV_LSTBOX_HXX
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _SV_FIELD_HXX
+#include <vcl/field.hxx>
+#endif
+#ifndef _SV_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#ifndef _COM_SUN_STAR_REPORT_XREPORTDEFINITION_HPP_
+#include <com/sun/star/report/XReportDefinition.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
+#include <com/sun/star/lang/Locale.hpp>
+#endif
+
+namespace rptui
+{
+class OReportController;
+/*************************************************************************
+|*
+|* Groups and Sorting dialog
+|*
+\************************************************************************/
+class ODateTimeDialog : public ModalDialog
+{
+ FixedLine m_aFLDate;
+ CheckBox m_aDate;
+ RadioButton m_aDateF1;
+ RadioButton m_aDateF2;
+ RadioButton m_aDateF3;
+ FixedLine m_aFLTime;
+ CheckBox m_aTime;
+ RadioButton m_aTimeF1;
+ RadioButton m_aTimeF2;
+ RadioButton m_aTimeF3;
+ FixedLine m_aFL1;
+ OKButton m_aPB_OK;
+ CancelButton m_aPB_CANCEL;
+ HelpButton m_aPB_Help;
+
+
+ ::rptui::OReportController* m_pController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>
+ m_xHoldAlive;
+ ::com::sun::star::lang::Locale m_nLocale;
+
+ /** returns the format string.
+ */
+ ::rtl::OUString getFormatString(::sal_Int16 _nNumberFormatIndex);
+
+ /** returns the format
+ @param _bDate <TRUE/> when the date format should be returned otherwise the time format will be returned.
+ */
+ sal_Int16 getFormatIndex(sal_Bool _bDate);
+
+ /** returns the number format key
+ @param _nNumberFormatIndex the number format index @see com::sun::star::i18n::NumberFormatIndex
+ */
+ sal_Int32 getFormatKey(::sal_Int16 _nNumberFormatIndex);
+
+ DECL_LINK( CBClickHdl, CheckBox* );
+ ODateTimeDialog(const ODateTimeDialog&);
+ void operator =(const ODateTimeDialog&);
+public:
+ ODateTimeDialog( Window* pParent
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xHoldAlive
+ ,::rptui::OReportController* _pController);
+ virtual ~ODateTimeDialog();
+ virtual short Execute();
+};
+// =============================================================================
+} // namespace rptui
+// =============================================================================
+#endif // RPTUI_DATETIME_HXX
diff --git a/reportdesign/source/ui/inc/DefaultInspection.hxx b/reportdesign/source/ui/inc/DefaultInspection.hxx
new file mode 100644
index 000000000000..ee258878e7b9
--- /dev/null
+++ b/reportdesign/source/ui/inc/DefaultInspection.hxx
@@ -0,0 +1,130 @@
+#ifndef RPT_DEFAULTINSPECTION_HXX
+#define RPT_DEFAULTINSPECTION_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: DefaultInspection.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+/** === begin UNO includes === **/
+#ifndef _COM_SUN_STAR_INSPECTION_XOBJECTINSPECTORMODEL_HPP_
+#include <com/sun/star/inspection/XObjectInspectorModel.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_
+#include <com/sun/star/uno/XComponentContext.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_
+#include <com/sun/star/lang/XInitialization.hpp>
+#endif
+/** === end UNO includes === **/
+
+#ifndef _CPPUHELPER_IMPLBASE3_HXX_
+#include <cppuhelper/implbase3.hxx>
+#endif
+
+#include <memory>
+
+//........................................................................
+namespace rptui
+{
+//........................................................................
+ class OPropertyInfoService;
+ //====================================================================
+ //= DefaultComponentInspectorModel
+ //====================================================================
+ typedef ::cppu::WeakAggImplHelper3 < ::com::sun::star::inspection::XObjectInspectorModel
+ , ::com::sun::star::lang::XServiceInfo
+ , ::com::sun::star::lang::XInitialization
+ > DefaultComponentInspectorModel_Base;
+ class DefaultComponentInspectorModel : public DefaultComponentInspectorModel_Base
+ {
+ private:
+ ::osl::Mutex m_aMutex;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
+ ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorModel > m_xComponent; /// delegatee
+ bool m_bConstructed;
+ bool m_bHasHelpSection;
+ sal_Bool m_bIsReadOnly;
+ sal_Int32 m_nMinHelpTextLines;
+ sal_Int32 m_nMaxHelpTextLines;
+ /// access to property meta data
+ ::std::auto_ptr< OPropertyInfoService > m_pInfoService;
+
+ DefaultComponentInspectorModel(const DefaultComponentInspectorModel&);
+ DefaultComponentInspectorModel& operator=(const DefaultComponentInspectorModel&);
+ protected:
+ virtual ~DefaultComponentInspectorModel();
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XObjectInspectorModel
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getHandlerFactories() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getHasHelpSection() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getMinHelpTextLines() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getMaxHelpTextLines() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getIsReadOnly() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setIsReadOnly( ::sal_Bool _isreadonly ) throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::inspection::PropertyCategoryDescriptor > SAL_CALL describeCategories( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getPropertyOrderIndex( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+
+ public:
+ // XServiceInfo - static versions
+ static ::rtl::OUString getImplementationName_Static( ) throw(::com::sun::star::uno::RuntimeException);
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_static( ) throw(::com::sun::star::uno::RuntimeException);
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
+ create(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&);
+
+ public:
+ DefaultComponentInspectorModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext);
+
+ protected:
+ // Service constructors
+ void createDefault();
+ void createWithHelpSection( sal_Int32 _nMinHelpTextLines, sal_Int32 _nMaxHelpTextLines );
+ };
+
+//........................................................................
+} // namespace rptui
+//........................................................................
+
+#endif // RPT_DEFAULTINSPECTION_HXX
+
diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx
new file mode 100644
index 000000000000..8626b106ef68
--- /dev/null
+++ b/reportdesign/source/ui/inc/DesignView.hxx
@@ -0,0 +1,327 @@
+#ifndef RPTUI_DESIGNVIEW_HXX
+#define RPTUI_DESIGNVIEW_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: DesignView.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef DBAUI_DATAVIEW_HXX
+#include <dbaccess/dataview.hxx>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_
+#include <com/sun/star/frame/XController.hpp>
+#endif
+#ifndef _COM_SUN_STAR_REPORT_XSECTION_HPP_
+#include <com/sun/star/report/XSection.hpp>
+#endif
+#ifndef _COM_SUN_STAR_REPORT_XREPORTCOMPONENT_HPP_
+#include <com/sun/star/report/XReportComponent.hpp>
+#endif
+#ifndef _SV_SPLIT_HXX
+#include <vcl/split.hxx>
+#endif
+#ifndef _SV_SCRBAR_HXX
+#include <vcl/scrbar.hxx>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DATATRANSFER_DATAFLAVOR_HPP_
+#include <com/sun/star/datatransfer/DataFlavor.hpp>
+#endif
+#ifndef _LINK_HXX
+#include <tools/link.hxx>
+#endif
+#ifndef _SV_GEN_HXX
+#include <tools/gen.hxx>
+#endif
+#ifndef _SV_TIMER_HXX
+#include <vcl/timer.hxx>
+#endif
+#ifndef _SFXHINT_HXX
+#include <svtools/hint.hxx>
+#endif
+#ifndef _SFXBRDCST_HXX
+#include <svtools/brdcst.hxx>
+#endif
+#ifndef _COMPHELPER_STLTYPES_HXX_
+#include <comphelper/stl_types.hxx>
+#endif
+#ifndef RPTUI_REPORT_DEFINES_HXX
+#include "ReportDefines.hxx"
+#endif
+#ifndef INCLUDED_SVTOOLS_COLORCFG_HXX
+#include <svtools/colorcfg.hxx>
+#endif
+#include <boost/shared_ptr.hpp>
+#ifndef _SVDEDTV_HXX
+#include <svx/svdedtv.hxx>
+#endif
+#ifndef _SV_TABPAGE_HXX //autogen
+#include <vcl/tabpage.hxx>
+#endif
+#include <MarkedSection.hxx>
+
+class KeyEvent;
+class MouseEvent;
+class Timer;
+class Window;
+
+namespace rptui
+{
+ class OScrollWindowHelper;
+ class OReportSection;
+ class OUnoObject;
+ class OSectionView;
+ class OReportController;
+ class PropBrw;
+ class OAddFieldWindow;
+ class OReportModel;
+ class ONavigator;
+ //==================================================================
+ //==================================================================
+ class ODesignView : public dbaui::ODataView, public SfxBroadcaster, public IMarkedSection
+ {
+ private:
+ Splitter m_aSplitter;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> m_xReportComponent;
+ OReportController* m_pReportController;
+ OScrollWindowHelper* m_pScrollWindow;
+ Window* m_pTaskPane;
+ PropBrw* m_pPropWin;
+ OAddFieldWindow* m_pAddField;
+ OSectionView* m_pCurrentView;
+ ONavigator* m_pReportExplorer;
+ Timer m_aMarkTimer;
+ Point m_aScrollOffset;
+ DlgEdMode m_eMode;
+ USHORT m_nCurrentPosition;
+ USHORT m_eActObj;
+ BOOL m_bFirstDraw;
+ Size m_aGridSize;
+ BOOL m_bGridVisible;
+ BOOL m_bGridSnap;
+ BOOL m_bInSplitHandler;
+
+
+ DECL_LINK( MarkTimeout, Timer * );
+ DECL_LINK( SplitHdl, void* );
+
+ void ImplInitSettings();
+
+ ODesignView(ODesignView&);
+ void operator =(ODesignView&);
+ protected:
+ // return the Rectangle where I can paint myself
+ virtual void resizeDocumentView(Rectangle& rRect);
+ // return the Rectangle where I can paint myself
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ public:
+ ODesignView(Window* pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&,
+ OReportController* _pController);
+ virtual ~ODesignView();
+
+ // window overloads
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual void GetFocus();
+
+ // set the view readonly or not
+ virtual void setReadOnly(sal_Bool _bReadOnly);
+
+ virtual void initialize();
+
+ inline OReportController* getController() const { return m_pReportController; }
+
+ void SetMode( DlgEdMode m_eMode );
+ void SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString());
+ USHORT GetInsertObj() const;
+ DlgEdMode GetMode() const { return m_eMode; }
+
+ /** cuts the current selection in this section
+ */
+ void Cut();
+
+ /** copies the current selection in this section
+ */
+ void Copy();
+
+ /** returns if paste is allowed
+ *
+ * \return <TRUE/> if paste is allowed
+ */
+ BOOL IsPasteAllowed();
+
+ /** paste a new control in this section
+ */
+ void Paste();
+
+ /** Deletes the current selection in this section
+ *
+ */
+ void Delete();
+
+ /** align all marked objects in all sections
+ */
+ void alignMarkedObjects(sal_Int32 _nControlModification, bool _bAlignAtSection, bool bBoundRects = false);
+
+ /** checks if alignment is possible in the current section
+ */
+ sal_Bool isAlignPossible() const;
+
+ /** All objects will be marked.
+ */
+ void SelectAll();
+
+ /// checks if a selection exists
+ BOOL HasSelection();
+
+ void UpdatePropertyBrowserDelayed(OSectionView* _pView);
+
+ USHORT getSectionCount() const;
+
+ /** removes the section at the given position.
+ *
+ * \param _nPosition Zero based.
+ */
+ void removeSection(USHORT _nPosition);
+
+ /** adds a new section at position _nPosition.
+ If the section is <NULL/> nothing happens.
+ If the position is grater than the current elements, the section will be appended.
+ */
+ void addSection(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection
+ ,const ::rtl::OUString& _sColorEntry
+ ,USHORT _nPosition = USHRT_MAX);
+
+ inline Size getGridSize() const { return m_aGridSize; }
+ inline BOOL isGridSnap() const { return m_bGridSnap; }
+ void setGridSnap(BOOL bOn);
+ void setDragStripes(BOOL bOn);
+ BOOL isDragStripes() const;
+ /** turns the grid on or off
+ *
+ * \param _bGridVisible
+ */
+ void toggleGrid(sal_Bool _bGridVisible);
+
+ void togglePropertyBrowser(sal_Bool _bToogleOn);
+
+ BOOL isAddFieldVisible() const;
+ void toggleAddField();
+
+ BOOL isReportExplorerVisible() const;
+ void toggleReportExplorer();
+
+ /** shows or hides the ruler.
+ */
+ void showRuler(sal_Bool _bShow);
+
+ /** unmark all objects on the views without the given one.
+ *
+ * @param _pSectionView The view where the objects should not be unmarked.
+ */
+ void unmarkAllObjects(OSectionView* _pSectionView);
+
+ /** triggers the property browser with the section
+ @param _xReportComponent the report component
+ */
+ void showProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xReportComponent);
+ ::com::sun::star::uno::Any getCurrentlyShownProperty() const;
+
+ /** returns the current section or the detail section if no section was selected previously
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > getCurrentSection() const;
+
+ /** returns the current control report model or <NULL/>
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent > getCurrentControlModel() const;
+
+ // IMarkedSection
+ ::boost::shared_ptr<OReportSection> getMarkedSection(NearSectionAccess nsa = CURRENT) const;
+ virtual void markSection(const sal_uInt16 _nPos);
+
+ /** fills the positions of all collapsed sections.
+ *
+ * \param _rCollapsedPositions Out parameter which holds afterwards all positions of the collapsed sections.
+ */
+ void fillCollapsedSections(::std::vector<sal_uInt16>& _rCollapsedPositions) const;
+
+ /** collpase all sections given by their position
+ *
+ * \param _aCollpasedSections The position of the sections which should be collapsed.
+ */
+ void collapseSections(const com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& _aCollpasedSections);
+
+ ::rtl::OUString getCurrentPage() const;
+ void setCurrentPage(const ::rtl::OUString& _sLastActivePage);
+
+ /** calculate the max width of the markers
+ *
+ * @param _bWithEnd if <TRUE/> the end marker will be used for calculation as well otherwise not.
+ * \return the max width
+ */
+ sal_Int32 getMaxMarkerWidth(sal_Bool _bWithEnd) const;
+
+ /** checks if the keycode is known by the child windows
+ @param _rCode the keycode
+ @return <TRUE/> if the keycode is handled otherwise <FALSE/>
+ */
+ sal_Bool handleKeyEvent(const KeyEvent& _rEvent);
+
+ /** set the section as marked or not marked
+ @param _pSectionView the section where to set the marked flag
+ @param _bMark the marked flag
+ */
+ void setMarked(OSectionView* _pSectionView,sal_Bool _bMark);
+
+ void setMarked(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection,sal_Bool _bMark);
+ void setMarked(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent> >& _xShape,sal_Bool _bMark);
+
+ /** returns if the view handles the event by itself
+ *
+ * \param _nId the command id
+ * \return <FALSE/> is the event is not handled by the view otherwise <TRUE/>
+ */
+ sal_Bool isHandleEvent(sal_uInt16 _nId) const;
+
+ sal_uInt32 getMarkedObjectCount() const;
+ };
+//==================================================================
+} //rptui
+//==================================================================
+#endif // RPTUI_DESIGNVIEW_HXX
+
diff --git a/reportdesign/source/ui/inc/EndMarker.hxx b/reportdesign/source/ui/inc/EndMarker.hxx
new file mode 100644
index 000000000000..58e27dc66e78
--- /dev/null
+++ b/reportdesign/source/ui/inc/EndMarker.hxx
@@ -0,0 +1,63 @@
+#ifndef RPTUI_ENDMARKER_HXX
+#define RPTUI_ENDMARKER_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: EndMarker.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef RPTUI_COLORLISTENER_HXX
+#include "ColorListener.hxx"
+#endif
+
+namespace rptui
+{
+ /** \class OEndMarker
+ * \brief Defines the right side of a graphical section.
+ */
+ class OEndMarker : public OColorListener
+ {
+ OEndMarker(OEndMarker&);
+ void operator =(OEndMarker&);
+ protected:
+ virtual void ImplInitSettings();
+ public:
+ OEndMarker(Window* _pParent,const ::rtl::OUString& _sColorEntry);
+ virtual ~OEndMarker();
+
+ // windows
+ virtual void Paint( const Rectangle& rRect );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ };
+}
+#endif // RPTUI_ENDMARKER_HXX
+
diff --git a/reportdesign/source/ui/inc/GeometryHandler.hxx b/reportdesign/source/ui/inc/GeometryHandler.hxx
new file mode 100644
index 000000000000..0d67487d9c6c
--- /dev/null
+++ b/reportdesign/source/ui/inc/GeometryHandler.hxx
@@ -0,0 +1,184 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: GeometryHandler.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef RPT_GEOMETRYHANDLER_HXX
+#define RPT_GEOMETRYHANDLER_HXX
+
+#ifndef _SAL_CONFIG_H_
+#include "sal/config.h"
+#endif
+#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_
+#include "com/sun/star/uno/XComponentContext.hpp"
+#endif
+#ifndef _CPPUHELPER_COMPBASE2_HXX_
+#include "cppuhelper/compbase2.hxx"
+#endif
+#ifndef _CPPUHELPER_BASEMUTEX_HXX_
+#include "cppuhelper/basemutex.hxx"
+#endif
+#ifndef _COM_SUN_STAR_INSPECTION_XPROPERTYHANDLER_HPP_
+#include "com/sun/star/inspection/XPropertyHandler.hpp"
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XTYPECONVERTER_HPP_
+#include "com/sun/star/script/XTypeConverter.hpp"
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include "com/sun/star/beans/XPropertySet.hpp"
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include "com/sun/star/lang/XServiceInfo.hpp"
+#endif
+#include "com/sun/star/report/XReportComponent.hpp"
+#ifndef _COM_SUN_STAR_SDBC_XROWSET_HPP_
+#include <com/sun/star/sdbc/XRowSet.hpp>
+#endif
+#include <memory>
+#ifndef RPTUI_METADATA_HXX_
+#include "metadata.hxx"
+#endif
+
+//........................................................................
+namespace rptui
+{
+//........................................................................
+
+ class OPropertyInfoService;
+ typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::inspection::XPropertyHandler
+ , ::com::sun::star::lang::XServiceInfo> GeometryHandler_Base;
+
+ class GeometryHandler:
+ private ::cppu::BaseMutex,
+ public GeometryHandler_Base
+ {
+ /** executes a dialog for chosing a filter criterion for a database report
+ @param _out_rSelectedClause
+ the filter or order clause as chosen by the user
+ @precond
+ we're really inspecting a database form (well, a RowSet at least)
+ @return
+ <TRUE/> if and only if the user successfully chose a clause
+ */
+ bool impl_dialogFilter_nothrow( ::rtl::OUString& _out_rSelectedClause, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const;
+
+ ::com::sun::star::uno::Any getConstantValue(sal_Bool bToControlValue,sal_uInt16 nResId,const ::com::sun::star::uno::Any& _aValue,const ::rtl::OUString& _sConstantName,const ::rtl::OUString & PropertyName );
+ ::com::sun::star::beans::Property getProperty(const ::rtl::OUString & PropertyName);
+ void implCreateListLikeControl(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlFactory >& _rxControlFactory
+ ,::com::sun::star::inspection::LineDescriptor & out_Descriptor
+ ,sal_uInt16 _nResId
+ ,sal_Bool _bReadOnlyControl
+ ,sal_Bool _bTrueIfListBoxFalseIfComboBox
+ );
+ void implCreateListLikeControl(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlFactory >& _rxControlFactory
+ ,::com::sun::star::inspection::LineDescriptor & out_Descriptor
+ ,const ::rtl::OUString& _sEntries
+ ,sal_Bool _bReadOnlyControl
+ ,sal_Bool _bTrueIfListBoxFalseIfComboBox
+ );
+ void checkPosAndSize( const ::com::sun::star::awt::Point& _aNewPos,
+ const ::com::sun::star::awt::Size& _aSize);
+
+ ::rtl::OUString
+ impl_convertToFormula( const ::com::sun::star::uno::Any& _rControlValue );
+
+ public:
+ // XServiceInfo - static versions
+ static ::rtl::OUString getImplementationName_Static( ) throw(::com::sun::star::uno::RuntimeException);
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_static( ) throw(::com::sun::star::uno::RuntimeException);
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
+ create(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&);
+
+ public:
+ explicit GeometryHandler(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & context);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XComponent:
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::inspection::XPropertyHandler:
+ virtual void SAL_CALL inspect(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & Component) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::NullPointerException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(const ::rtl::OUString & PropertyName) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException);
+ virtual void SAL_CALL setPropertyValue(const ::rtl::OUString & PropertyName, const ::com::sun::star::uno::Any & Value) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException);
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState(const ::rtl::OUString & PropertyName) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException);
+ virtual ::com::sun::star::inspection::LineDescriptor SAL_CALL describePropertyLine(const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlFactory >& ControlFactory ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::NullPointerException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL convertToPropertyValue(const ::rtl::OUString & PropertyName, const ::com::sun::star::uno::Any & ControlValue) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException);
+ virtual ::com::sun::star::uno::Any SAL_CALL convertToControlValue(const ::rtl::OUString & PropertyName, const ::com::sun::star::uno::Any & PropertyValue, const ::com::sun::star::uno::Type & ControlValueType) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException);
+ virtual void SAL_CALL addPropertyChangeListener(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & Listener) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::NullPointerException);
+ virtual void SAL_CALL removePropertyChangeListener(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & _rxListener) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > SAL_CALL getSupportedProperties() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupersededProperties() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getActuatingProperties() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isComposable(const ::rtl::OUString & PropertyName) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException);
+ virtual ::com::sun::star::inspection::InteractiveSelectionResult SAL_CALL onInteractivePropertySelection(const ::rtl::OUString & PropertyName, ::sal_Bool Primary, ::com::sun::star::uno::Any & out_Data, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorUI > & InspectorUI) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::NullPointerException);
+ virtual void SAL_CALL actuatingPropertyChanged(const ::rtl::OUString & ActuatingPropertyName, const ::com::sun::star::uno::Any & NewValue, const ::com::sun::star::uno::Any & OldValue, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorUI > & InspectorUI, ::sal_Bool FirstTimeInit) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::NullPointerException);
+ virtual ::sal_Bool SAL_CALL suspend(::sal_Bool Suspend) throw (::com::sun::star::uno::RuntimeException);
+
+ protected:
+ virtual ~GeometryHandler() {}
+ private:
+ GeometryHandler(GeometryHandler &); // not defined
+ void operator =(GeometryHandler &); // not defined
+
+
+
+ // overload WeakComponentImplHelperBase::disposing()
+ // This function is called upon disposing the component,
+ // if your component needs special work when it becomes
+ // disposed, do it here.
+ virtual void SAL_CALL disposing();
+
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aFieldNames;
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aParamNames;
+ ::std::vector< ::rtl::OUString > m_aFunctionNames;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
+ ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler > m_xFormComponentHandler; /// delegatee
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xReportComponent; /// inspectee
+ mutable ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > m_xRowSet;
+ /// type converter, needed on various occasions
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XTypeConverter > m_xTypeConverter;
+ /// access to property meta data
+ ::std::auto_ptr< OPropertyInfoService > m_pInfoService;
+ };
+//........................................................................
+} // namespace rptui
+//........................................................................
+
+#endif // RPT_GeometryHandler_HXX
diff --git a/reportdesign/source/ui/inc/GroupsSorting.hxx b/reportdesign/source/ui/inc/GroupsSorting.hxx
new file mode 100644
index 000000000000..9601c17265e3
--- /dev/null
+++ b/reportdesign/source/ui/inc/GroupsSorting.hxx
@@ -0,0 +1,209 @@
+#ifndef RPTUI_GROUPS_SORTING_HXX
+#define RPTUI_GROUPS_SORTING_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: GroupsSorting.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef _SV_FLOATWIN_HXX
+#include <vcl/floatwin.hxx>
+#endif
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _SV_LSTBOX_HXX
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _SV_EDIT_HXX
+#include <vcl/edit.hxx>
+#endif
+#ifndef _SV_FIELD_HXX
+#include <vcl/field.hxx>
+#endif
+#ifndef _SV_BUTTON_HXX
+#include <vcl/imagebtn.hxx>
+#endif
+#ifndef _COM_SUN_STAR_REPORT_XGROUPS_HPP_
+#include <com/sun/star/report/XGroups.hpp>
+#endif
+#ifndef _COM_SUN_STAR_REPORT_XGROUP_HPP_
+#include <com/sun/star/report/XGroup.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
+#include <com/sun/star/container/XNameAccess.hpp>
+#endif
+#ifndef RPT_SHARED_GROUPS_PROPERTIES_HXX
+#include "GroupProperties.hxx"
+#endif
+#ifndef _COMPHELPER_PROPERTY_MULTIPLEX_HXX_
+#include <comphelper/propmultiplex.hxx>
+#endif
+#ifndef _CPPUHELPER_BASEMUTEX_HXX_
+#include "cppuhelper/basemutex.hxx"
+#endif
+#ifndef _SVEDIT_HXX
+#include <svtools/svmedit.hxx>
+#endif
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
+#endif
+
+#include <vector>
+
+namespace comphelper
+{
+ class OPropertyChangeMultiplexer;
+}
+namespace rptui
+{
+class OFieldExpressionControl;
+class OReportController;
+/*************************************************************************
+|*
+|* Groups and Sorting dialog
+|*
+\************************************************************************/
+class OGroupsSortingDialog : public FloatingWindow
+ , public ::cppu::BaseMutex
+ , public ::comphelper::OPropertyChangeListener
+{
+ friend class OFieldExpressionControl;
+
+ FixedLine m_aFL2;
+ FixedText m_aMove;
+ ImageButton m_aUp;
+ ImageButton m_aDown;
+ FixedLine m_aFL3;
+ FixedText m_aOrder;
+ ListBox m_aOrderLst;
+ FixedText m_aHeader;
+ ListBox m_aHeaderLst;
+ FixedText m_aFooter;
+ ListBox m_aFooterLst;
+ FixedText m_aGroupOn;
+ ListBox m_aGroupOnLst;
+ FixedText m_aGroupInterval;
+ NumericField m_aGroupIntervalEd;
+ FixedText m_aKeepTogether;
+ ListBox m_aKeepTogetherLst;
+ FixedLine m_aFL;
+ FixedText m_aHelpWindow;
+
+ OFieldExpressionControl* m_pFieldExpression;
+ ::rptui::OReportController* m_pController;
+ ::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pCurrentGroupListener;
+ ::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pReportListener;
+ ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroups> m_xGroups;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xColumns;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xHoldAlive;
+ sal_Bool m_bReadOnly;
+private:
+ DECL_LINK( OnControlFocusLost, Control* );
+ DECL_LINK( OnControlFocusGot, Control* );
+ DECL_LINK( LBChangeHdl, ListBox* );
+ DECL_LINK( ClickHdl, ImageButton* );
+
+ /** returns the groups
+ @return the groups which now have to check which one changes
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroups>& getGroups() { return m_xGroups; }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup> getGroup(sal_Int32 _nPos)
+ {
+ OSL_ENSURE(_nPos >= 0 && _nPos < m_xGroups->getCount(),"Invalid count!");
+ return ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup>(m_xGroups->getByIndex(_nPos),::com::sun::star::uno::UNO_QUERY);
+ }
+
+ /** updates the listboxes with the new group properties
+ @param _nRow the new group pos
+ */
+ void DisplayData( sal_Int32 _nRow );
+
+ /** saves the values from the listboxes into the group at position _nRow
+ @param _nRow the group pos to store in
+ */
+ void SaveData( sal_Int32 _nRow );
+
+ /** returns <TRUE/> when the dialog should be read only
+ */
+ sal_Bool isReadOnly( ) const;
+
+ /** returns the data type for the given column name
+ @param _sColumnName
+ */
+ sal_Int32 getColumnDataType(const ::rtl::OUString& _sColumnName);
+
+ /** shows the text given by the id in the multiline edit
+ @param _nResId the string id
+ */
+ void showHelpText(USHORT _nResId);
+ /** display the group props
+ @param _xGroup the group to display
+ */
+ void displayGroup(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup>& _xGroup);
+
+ /** enables or diables the up and down button
+ @param _nRow the row which will be active
+ */
+ void checkButtons(sal_Int32 _nRow);
+
+ /** clears the m_xColumns member and reset the fields
+ *
+ */
+ void fillColumns();
+ OGroupsSortingDialog(OGroupsSortingDialog&);
+ void operator =(OGroupsSortingDialog&);
+protected:
+ // window
+ virtual void Resize();
+ // OPropertyChangeListener
+ virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& _rEvent) throw( ::com::sun::star::uno::RuntimeException);
+public:
+ OGroupsSortingDialog( Window* pParent
+ ,sal_Bool _bReadOnly
+ ,::rptui::OReportController* _pController);
+ virtual ~OGroupsSortingDialog();
+
+ /** sets the newe columns at the groups dialog.
+ @param _xColumns the new columns
+ */
+ void setColumns(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xColumns);
+
+ /* updates the current view
+ */
+ void UpdateData( );
+};
+// =============================================================================
+} // namespace rptui
+// =============================================================================
+#endif // RPTUI_GROUPS_SORTING_HXX
diff --git a/reportdesign/source/ui/inc/MarkedSection.hxx b/reportdesign/source/ui/inc/MarkedSection.hxx
new file mode 100644
index 000000000000..c55ea46353be
--- /dev/null
+++ b/reportdesign/source/ui/inc/MarkedSection.hxx
@@ -0,0 +1,68 @@
+#ifndef RPTUI_MARKEDSECTION_HXX
+#define RPTUI_MARKEDSECTION_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: MarkedSection.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+
+#include <boost/shared_ptr.hpp>
+
+namespace rptui
+{
+ class OReportSection; // forward declaration
+
+ enum NearSectionAccess
+ {
+ CURRENT = 0,
+ PREVIOUS = -1,
+ POST = 1
+ };
+
+ class IMarkedSection
+ {
+ public:
+ /** returns the section which is currently marked.
+ */
+ virtual ::boost::shared_ptr<OReportSection> getMarkedSection(NearSectionAccess nsa) const =0;
+
+ /** mark the section on the given position .
+ *
+ * \param _nPos the position is zero based.
+ */
+ virtual void markSection(const sal_uInt16 _nPos) = 0;
+ };
+
+} // rptui
+
+#endif /* RPTUI_MARKEDSECTION_HXX */
diff --git a/reportdesign/source/ui/inc/Navigator.hxx b/reportdesign/source/ui/inc/Navigator.hxx
new file mode 100644
index 000000000000..345dc108108c
--- /dev/null
+++ b/reportdesign/source/ui/inc/Navigator.hxx
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: Navigator.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+#ifndef INCLUDED_RPTUI_NAVIGATOR_HXX
+#define INCLUDED_RPTUI_NAVIGATOR_HXX
+
+#ifndef _SV_FLOATWIN_HXX
+#include <vcl/floatwin.hxx>
+#endif
+#ifndef _RPTUI_MODULE_HELPER_RPT_HXX_
+#include "ModuleHelper.hxx"
+#endif
+#include <memory>
+namespace rptui
+{
+ class OReportController;
+ class ONavigatorImpl;
+ class ONavigator : public FloatingWindow
+ {
+ OModuleClient m_aModuleClient;
+ ::std::auto_ptr<ONavigatorImpl> m_pImpl;
+ ONavigator(const ONavigator&);
+ void operator =(const ONavigator&);
+ public:
+ ONavigator( Window* pParent
+ ,::rptui::OReportController* _pController);
+ virtual ~ONavigator();
+
+ // window
+ virtual void Resize();
+ };
+// =============================================================================
+} // namespace rptui
+// =============================================================================
+#endif // INCLUDED_RPTUI_NAVIGATOR_HXX
diff --git a/reportdesign/source/ui/inc/PageNumber.hxx b/reportdesign/source/ui/inc/PageNumber.hxx
new file mode 100644
index 000000000000..7f79ec0e879c
--- /dev/null
+++ b/reportdesign/source/ui/inc/PageNumber.hxx
@@ -0,0 +1,102 @@
+#ifndef RPTUI_PAGENUMBER_HXX
+#define RPTUI_PAGENUMBER_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: PageNumber.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef _DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _SV_LSTBOX_HXX
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _SV_FIELD_HXX
+#include <vcl/field.hxx>
+#endif
+#ifndef _SV_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#ifndef _COM_SUN_STAR_REPORT_XREPORTDEFINITION_HPP_
+#include <com/sun/star/report/XReportDefinition.hpp>
+#endif
+
+
+namespace rptui
+{
+class OReportController;
+/*************************************************************************
+|*
+|* Groups and Sorting dialog
+|*
+\************************************************************************/
+class OPageNumberDialog : public ModalDialog
+{
+ FixedLine m_aFormat;
+ RadioButton m_aPageN;
+ RadioButton m_aPageNofM;
+
+ FixedLine m_aPosition;
+ RadioButton m_aTopPage;
+ RadioButton m_aBottomPage;
+ FixedLine m_aMisc;
+ FixedText m_aAlignment;
+ ListBox m_aAlignmentLst;
+
+ CheckBox m_aShowNumberOnFirstPage;
+ FixedLine m_aFl1;
+ OKButton m_aPB_OK;
+ CancelButton m_aPB_CANCEL;
+ HelpButton m_aPB_Help;
+
+
+ ::rptui::OReportController* m_pController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition>
+ m_xHoldAlive;
+
+ OPageNumberDialog(const OPageNumberDialog&);
+ void operator =(const OPageNumberDialog&);
+public:
+ OPageNumberDialog( Window* pParent
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition>& _xHoldAlive
+ ,::rptui::OReportController* _pController);
+ virtual ~OPageNumberDialog();
+ virtual short Execute();
+};
+// =============================================================================
+} // namespace rptui
+// =============================================================================
+#endif // RPTUI_PAGENUMBER_HXX
diff --git a/reportdesign/source/ui/inc/ReportComponentHandler.hxx b/reportdesign/source/ui/inc/ReportComponentHandler.hxx
new file mode 100644
index 000000000000..11bf34fbfefd
--- /dev/null
+++ b/reportdesign/source/ui/inc/ReportComponentHandler.hxx
@@ -0,0 +1,135 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ReportComponentHandler.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef RPT_REPORTCOMPONENTHANDLER_HXX
+#define RPT_REPORTCOMPONENTHANDLER_HXX
+
+#ifndef _SAL_CONFIG_H_
+#include "sal/config.h"
+#endif
+#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_
+#include "com/sun/star/uno/XComponentContext.hpp"
+#endif
+#ifndef _CPPUHELPER_COMPBASE2_HXX_
+#include "cppuhelper/compbase2.hxx"
+#endif
+#ifndef _CPPUHELPER_BASEMUTEX_HXX_
+#include "cppuhelper/basemutex.hxx"
+#endif
+#ifndef _COM_SUN_STAR_INSPECTION_XPROPERTYHANDLER_HPP_
+#include "com/sun/star/inspection/XPropertyHandler.hpp"
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include "com/sun/star/lang/XServiceInfo.hpp"
+#endif
+
+#include <memory>
+
+//........................................................................
+namespace rptui
+{
+//........................................................................
+
+ class OPropertyInfoService;
+
+ typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::inspection::XPropertyHandler
+ , ::com::sun::star::lang::XServiceInfo> ReportComponentHandler_Base;
+
+ class ReportComponentHandler:
+ private ::cppu::BaseMutex,
+ public ReportComponentHandler_Base
+ {
+ public:
+ // XServiceInfo - static versions
+ static ::rtl::OUString getImplementationName_Static( ) throw(::com::sun::star::uno::RuntimeException);
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_static( ) throw(::com::sun::star::uno::RuntimeException);
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
+ create(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&);
+
+ public:
+ explicit ReportComponentHandler(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & context);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XComponent:
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::inspection::XPropertyHandler:
+ virtual void SAL_CALL inspect(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & Component) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::NullPointerException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(const ::rtl::OUString & PropertyName) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException);
+ virtual void SAL_CALL setPropertyValue(const ::rtl::OUString & PropertyName, const ::com::sun::star::uno::Any & Value) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException);
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState(const ::rtl::OUString & PropertyName) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException);
+ virtual ::com::sun::star::inspection::LineDescriptor SAL_CALL describePropertyLine(const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlFactory >& ControlFactory ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::NullPointerException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL convertToPropertyValue(const ::rtl::OUString & PropertyName, const ::com::sun::star::uno::Any & ControlValue) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException);
+ virtual ::com::sun::star::uno::Any SAL_CALL convertToControlValue(const ::rtl::OUString & PropertyName, const ::com::sun::star::uno::Any & PropertyValue, const ::com::sun::star::uno::Type & ControlValueType) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException);
+ virtual void SAL_CALL addPropertyChangeListener(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & Listener) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::NullPointerException);
+ virtual void SAL_CALL removePropertyChangeListener(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & _rxListener) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > SAL_CALL getSupportedProperties() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupersededProperties() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getActuatingProperties() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isComposable(const ::rtl::OUString & PropertyName) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException);
+ virtual ::com::sun::star::inspection::InteractiveSelectionResult SAL_CALL onInteractivePropertySelection(const ::rtl::OUString & PropertyName, ::sal_Bool Primary, ::com::sun::star::uno::Any & out_Data, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorUI > & InspectorUI) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::NullPointerException);
+ virtual void SAL_CALL actuatingPropertyChanged(const ::rtl::OUString & ActuatingPropertyName, const ::com::sun::star::uno::Any & NewValue, const ::com::sun::star::uno::Any & OldValue, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorUI > & InspectorUI, ::sal_Bool FirstTimeInit) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::NullPointerException);
+ virtual ::sal_Bool SAL_CALL suspend(::sal_Bool Suspend) throw (::com::sun::star::uno::RuntimeException);
+
+ protected:
+ virtual ~ReportComponentHandler() {}
+ private:
+ ReportComponentHandler(ReportComponentHandler &); // not defined
+ void operator =(ReportComponentHandler &); // not defined
+
+
+
+ // overload WeakComponentImplHelperBase::disposing()
+ // This function is called upon disposing the component,
+ // if your component needs special work when it becomes
+ // disposed, do it here.
+ virtual void SAL_CALL disposing();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
+ ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler > m_xFormComponentHandler; /// delegatee
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xReportComponent; /// inspectee
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xFormComponent; /// inspectee
+ ::std::auto_ptr< OPropertyInfoService > m_pInfoService;
+ };
+//........................................................................
+} // namespace rptui
+//........................................................................
+
+#endif // RPT_REPORTCOMPONENTHANDLER_HXX
diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx
new file mode 100644
index 000000000000..cc3dfe26c054
--- /dev/null
+++ b/reportdesign/source/ui/inc/ReportController.hxx
@@ -0,0 +1,423 @@
+#ifndef RPTUI_REPORTCONTROLLER_HXX
+#define RPTUI_REPORTCONTROLLER_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ReportController.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef rptui_SINGLEDOCCONTROLLER_HXX
+#include <dbaccess/singledoccontroller.hxx>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE2_HXX_
+#include <cppuhelper/implbase2.hxx>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
+#include <com/sun/star/beans/PropertyValue.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
+#include <com/sun/star/uno/Sequence.hxx>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
+#include <com/sun/star/sdbc/XConnection.hpp>
+#endif
+#ifndef _COM_SUN_STAR_REPORT_XSECTION_HPP_
+#include <com/sun/star/report/XSection.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTER_HPP_
+#include <com/sun/star/util/XNumberFormatter.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_
+#include <com/sun/star/uno/XComponentContext.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XOBJECTOUTPUTSTREAM_HPP_
+#include <com/sun/star/io/XObjectOutputStream.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XOBJECTINPUTSTREAM_HPP_
+#include <com/sun/star/io/XObjectInputStream.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
+#include <com/sun/star/frame/XComponentLoader.hpp>
+#endif
+#ifndef _COM_SUN_STAR_REPORT_XREPORTDEFINITION_HPP_
+#include <com/sun/star/report/XReportDefinition.hpp>
+#endif
+#ifndef _COM_SUN_STAR_REPORT_XREPORTCONTROLMODEL_HPP_
+#include <com/sun/star/report/XReportControlModel.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_REPORT_XREPORTENGINE_HPP_
+#include <com/sun/star/report/XReportEngine.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XROWSET_HPP_
+#include <com/sun/star/sdbc/XRowSet.hpp>
+#endif
+#ifndef _COMPHELPER_UNO3_HXX_
+#include <comphelper/uno3.hxx>
+#endif
+#ifndef _TRANSFER_HXX
+#include <svtools/transfer.hxx>
+#endif
+#ifndef _SFXLSTNER_HXX
+#include <svtools/lstner.hxx>
+#endif
+#ifndef _SVDEDTV_HXX
+#include <svx/svdedtv.hxx>
+#endif
+#ifndef _RPTUI_MODULE_HELPER_RPT_HXX_
+#include "ModuleHelper.hxx"
+#endif
+#ifndef _COMPHELPER_IMPLEMENTATIONREFERENCE_HXX
+#include <comphelper/implementationreference.hxx>
+#endif
+#include "RptDef.hxx"
+#include <functional>
+#include <boost/shared_ptr.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+
+
+class TransferableHelper;
+class TransferableClipboardListener;
+class VclWindowEvent;
+namespace rptui
+{
+ class ODesignView;
+ class OGroupsSortingDialog;
+ class OPropertyMediator;
+ class OReportModel;
+ class OSectionView;
+
+ typedef ::dbaui::OSingleDocumentController OReportController_BASE;
+ typedef ::cppu::ImplHelper2 < ::com::sun::star::container::XContainerListener,
+ ::com::sun::star::beans::XPropertyChangeListener
+ > OReportController_Listener;
+
+ class OReportController : public OReportController_BASE
+ ,public OReportController_Listener
+ ,public SfxListener
+ {
+ private:
+ OModuleClient m_aModuleClient;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>
+ m_aCollapsedSections;
+ ODesignView* m_pMyOwnView; // we want to avoid casts
+ TransferableDataHelper m_aSystemClipboard; // content of the clipboard
+ TransferableClipboardListener*
+ m_pClipbordNotifier; /// notifier for changes in the clipboard
+ OGroupsSortingDialog* m_pGroupsFloater;
+ ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition> m_xReportDefinition;
+ ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportEngine> m_xReportEngine;
+ ::com::sun::star::uno::Reference < ::com::sun::star::frame::XComponentLoader> m_xFrameLoader;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > m_xRowSet;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > m_xRowSetMediator;
+
+ ::boost::shared_ptr<rptui::OReportModel>
+ m_aReportModel;
+ ::rtl::OUString m_sName; /// name for the report definition
+ ::rtl::OUString m_sLastActivePage; /// last active property browser page
+ sal_Int32 m_nSplitPos; /// the position of the splitter
+ sal_Int32 m_nPageNum; /// the page number from the restoreView call
+ //sal_Int32 m_nExecuteReportEvent;
+ sal_Bool m_bShowRuler;
+ sal_Bool m_bGridVisible;
+ sal_Bool m_bGridUse;
+ sal_Bool m_bShowProperties;
+ sal_Bool m_bGroupFloaterWasVisible;
+ sal_Bool m_bHelplinesMove;
+
+
+ /** creates a formatted field in the given section with the given formula as data field
+ *
+ * \param _aArgs
+ * \param _xSection the section where to create the formatted field
+ * \param _sFunction the function which will be set at the data field.
+ */
+ void createControl(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _aArgs,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection,const ::rtl::OUString& _sFunction ,sal_uInt16 _nObjectId = OBJ_DLG_FORMATTEDFIELD);
+ /** switch the report header/footer sectionon off with undo or without depending on the given id.
+ *
+ * \param _nId Can either be SID_REPORTHEADER_WITHOUT_UNDO or SID_REPORTFOOTER_WITHOUT_UNDO or SID_REPORTHEADERFOOTER.
+ */
+ void switchReportSection(const sal_Int16 _nId);
+
+ /** switch the report header/footer sectionon off with undo or without depending on the given id.
+ *
+ * \param _nId Can either be SID_PAGEHEADER_WITHOUT_UNDO or SID_PAGEFOOTER_WITHOUT_UNDO or SID_PAGEHEADERFOOTER.
+ */
+ void switchPageSection(const sal_Int16 _nId);
+
+ /** append a new group or remove it with undo.
+ *
+ * \param _bAppend
+ * \param _aArgs The args which contains a element named PROPERTY_GROUP of type report::XGroup.
+ */
+ void modifyGroup(const bool _bAppend, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _aArgs);
+
+ /** creates a group section.
+ *
+ * \param _bUndo true when undo action should be created
+ * \param _bHeader true when it is a header otherwise it is a footer
+ * \param _aArgs The args which contains a element named PROPERTY_GROUP of type report::XGroup.
+ */
+ void createGroupSection(const bool _bUndo,const bool _bHeader,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >&_aArgs);
+
+ /** add or remove me as listener at the report definition
+ *
+ * \param _bAdd
+ */
+ void listen(const bool _bAdd);
+
+ /** saves the report definition
+ @param _bSaveAs if <TRUE/> then the report will be saved as a new one.
+ */
+ sal_Bool doSaveDoc(sal_Bool _bSaveAs);
+
+ /** opens the common page dialog
+ */
+ void openPageDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection);
+
+ /** opens or hides the sorting and grouping dialog
+ */
+ void openSortingAndGroupingDialog();
+
+ /** returns the position of the group inside the groups collection
+ */
+ sal_Int32 getGroupPosition(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup >& _xGroup);
+
+ /** calls propertyChanged when the header or footer is really turned on.
+ @param _rEvent the group
+ @param _bShow when <TRUE/> the header and footer will be shown otherwise not
+ */
+ void notifyGroupSections(const ::com::sun::star::container::ContainerEvent& _rEvent
+ ,bool _bShow);
+
+ /** change the sections for a group
+ @param _sPropName the header or footer
+ @param _xGroup the group
+ @param _nGroupPos the position of the group inside the groups collection or the previous index when it was removed
+ @param _bShow when <TRUE/> the header and footer will be shown otherwise not
+ */
+ void groupChange( const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup>& _xGroup
+ ,const ::rtl::OUString& _sPropName
+ ,sal_Int32 _nGroupPos
+ ,bool _bShow);
+
+ void executeMethodWithUndo(USHORT _nUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun);
+ void alignControlsWithUndo(USHORT _nUndoStrId,sal_Int32 _nControlModification,bool _bAlignAtSection = false);
+
+ /** opens the file open dialog to allow the user to select a image which will be
+ * bound to a newly created image button.
+ */
+ void insertGraphic();
+
+ /** resets the floater
+ */
+ void updateFloater();
+
+ /** creates a new function in the given value context
+ *
+ * \param _aValue contains a XNameContainer
+ */
+ void createNewFunction(const ::com::sun::star::uno::Any& _aValue);
+
+ /** inserts a label - field pair into the current selected section
+ *
+ * \param aArgs
+ */
+ void addPairControls(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs);
+
+ /** inserts a label - field combination to show the page number and/or page count
+ *
+ * \param _aArgs
+ */
+ void createPageNumber(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _aArgs);
+
+ /** creates a formatted filed with TODAY() function and if set also an NOW() function
+ *
+ * \param _aArgs
+ */
+ void createDateTime(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _aArgs);
+
+ /** gets the current section (SdrView)
+ *
+ * \return the currently selected section or <NULL/> if noone is selected
+ */
+ OSectionView* getCurrentSectionView() const;
+
+ /**change the ZOrder of a current select object.
+ *
+ * \param _nId The command ID about what to do.
+ */
+ void changeZOrder(sal_Int32 _nId);
+
+ /** marks the next or previous section, when the first/last section was already selected then the report will be selected.
+ *
+ * \param _bNext
+ */
+ void markSection(const bool _bNext);
+
+ OReportController(OReportController&);
+ void operator =(OReportController&);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > getXFrame();
+
+ protected:
+ DECL_LINK( OnInvalidateClipboard, void* );
+ DECL_LINK( OnClipboardChanged, void* );
+ DECL_LINK( OnExecuteReport, void* );
+ DECL_LINK( OnSave, void* );
+ DECL_LINK( OnSaveAs, void* );
+ short saveModified();
+ // all the features which should be handled by this class
+ virtual void describeSupportedFeatures();
+ // state of a feature. 'feature' may be the handle of a ::com::sun::star::util::URL somebody requested a dispatch interface for OR a toolbar slot.
+ virtual dbaui::FeatureState GetState(sal_uInt16 nId) const;
+ // execute a feature
+ virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
+
+ virtual void losingConnection( );
+
+ virtual void updateTitle();
+
+ virtual ~OReportController();
+ public:
+ OReportController(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & the_context);
+
+ DECL_LINK( NotifyUndoActionHdl, SfxUndoAction* );
+ DECL_LINK( EventLstHdl, VclWindowEvent* );
+
+ DECLARE_XINTERFACE( )
+ DECLARE_XTYPEPROVIDER( )
+
+ // SfxListener
+ virtual void Notify(SfxBroadcaster & rBc, SfxHint const & rHint);
+
+ virtual void setModified(sal_Bool _bModified=sal_True);
+
+ // const ::connectivity::OSQLParseNode* getParseTree() const { return m_aSqlIterator.getParseTree();}
+ // need for undo's and redo's
+ SfxUndoManager* getUndoMgr();
+
+ /** returns <TRUE/> when the command is enbaled
+ @param _nCommand the command id
+ @param _xControlFormat the report control format
+ */
+ sal_Bool isFormatCommandEnabled(sal_uInt16 _nCommand
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportControlFormat>& _xControlFormat) const;
+
+ virtual sal_Bool Construct(Window* pParent);
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::frame::XController
+ virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::lang::XComponent
+ virtual void SAL_CALL disposing();
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+ // need by registration
+ static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
+ create(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext);
+
+ // ::com::sun::star::container::XContainerListener
+ virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& Event) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& Event) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& Event) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XPropertyChangeListener
+ virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::frame::XController
+ virtual sal_Bool SAL_CALL attachModel(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getViewData(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL restoreViewData(const ::com::sun::star::uno::Any& Data) throw( ::com::sun::star::uno::RuntimeException );
+
+ /** gives access to the report definition
+ * \return the report definition object, may be <NULL/>
+ */
+ inline ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition> getReportDefinition() const { return m_xReportDefinition; }
+
+ // ::com::sun::star::frame::XController
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SAL_CALL getModel(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XSelectionSupplier
+ virtual ::sal_Bool SAL_CALL select( const ::com::sun::star::uno::Any& xSelection ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getSelection( ) throw (::com::sun::star::uno::RuntimeException);
+
+ /** returns the current position of the splitter
+ *
+ * \return
+ */
+ inline sal_Int32 getSplitPos() const { return m_nSplitPos;}
+ inline void setSplitPos(sal_Int32 _nSplitPos) { m_nSplitPos = _nSplitPos;}
+
+ /** creates a new report from the report definition.
+ *
+ * \return The model or <NULL/> if the model could not be created.
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel> executeReport();
+
+ /** returns the RowSet which reflects the current settings of the report definition
+
+ The caller is allowed to hold a reference to the RowSet - it is kept alive as long
+ as the controller lives, and it's settings will follow the report definition's settings.
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > getRowSet();
+
+ /** hides or display all design floaters
+ *
+ * \param _bShow If <TRUE/> show floaters otherwise hide them.
+ */
+ void displayDesignFloater(sal_Bool _bShow);
+
+ /** return the SdrModel of the real model
+ *
+ * \return
+ */
+ ::boost::shared_ptr<rptui::OReportModel> getSdrModel();
+
+ protected:
+ virtual void onLoadedMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager >& _xLayoutManager );
+ virtual void impl_initialize( );
+ };
+}
+#endif // RPTUI_REPORTCONTROLLER_HXX
diff --git a/reportdesign/source/ui/inc/ReportDefines.hxx b/reportdesign/source/ui/inc/ReportDefines.hxx
new file mode 100644
index 000000000000..b464fb389eb6
--- /dev/null
+++ b/reportdesign/source/ui/inc/ReportDefines.hxx
@@ -0,0 +1,47 @@
+#ifndef RPTUI_REPORT_DEFINES_HXX
+#define RPTUI_REPORT_DEFINES_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ReportDefines.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+namespace rptui
+{
+ enum DlgEdMode { RPTUI_INSERT, RPTUI_SELECT, RPTUI_TEST, RPTUI_READONLY };
+
+#define REPORT_STARTMARKER_WIDTH 120
+#define REPORT_ENDMARKER_WIDTH 10
+#define REPORT_EXTRA_SPACE 10
+
+}
+#endif //RPTUI_REPORT_DEFINES_HXX
diff --git a/reportdesign/source/ui/inc/ReportRuler.hxx b/reportdesign/source/ui/inc/ReportRuler.hxx
new file mode 100644
index 000000000000..ef0289054003
--- /dev/null
+++ b/reportdesign/source/ui/inc/ReportRuler.hxx
@@ -0,0 +1,75 @@
+#ifndef RPTUI_RULER_HXX
+#define RPTUI_RULER_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ReportRuler.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef _SV_WINDOW_HXX
+#include <vcl/window.hxx>
+#endif
+#ifndef _COM_SUN_STAR_REPORT_XSECTION_HPP_
+#include <com/sun/star/report/XSection.hpp>
+#endif
+
+namespace rptui
+{
+ class OReportSection;
+ class OReportWindow;
+ class OReportRuler : public Window
+ {
+ OReportSection* m_pSection;
+ OReportWindow* m_pParent;
+ sal_Bool m_bShow;
+ OReportRuler(OReportRuler&);
+ void operator =(OReportRuler&);
+ public:
+ OReportRuler(Window* _pParent,OReportWindow* _pReportWindowt,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection);
+ virtual ~OReportRuler();
+
+ // windows overloads
+ virtual void Resize();
+
+ inline OReportSection* getSection() const { return m_pSection; }
+ inline OReportWindow* getView() const { return m_pParent; }
+
+ /** makes the grid visible
+ *
+ * \param _bVisible when <TRUE/> the grid is made visible
+ */
+ void SetGridVisible(BOOL _bVisible);
+ };
+//==============================================================================
+} // rptui
+//==============================================================================
+#endif // RPTUI_RULER_HXX
diff --git a/reportdesign/source/ui/inc/ReportSection.hxx b/reportdesign/source/ui/inc/ReportSection.hxx
new file mode 100644
index 000000000000..b623a8d1a54a
--- /dev/null
+++ b/reportdesign/source/ui/inc/ReportSection.hxx
@@ -0,0 +1,205 @@
+#ifndef REPORT_REPORTSECTION_HXX
+#define REPORT_REPORTSECTION_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ReportSection.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef _SV_WINDOW_HXX
+#include <vcl/window.hxx>
+#endif
+#ifndef _REPORT_RPTUIPAGE_HXX
+#include "RptPage.hxx"
+#endif
+#ifndef _COM_SUN_STAR_BEANS_NAMEDVALUE_HPP_
+#include <com/sun/star/beans/NamedValue.hpp>
+#endif
+#ifndef _COMPHELPER_PROPERTY_MULTIPLEX_HXX_
+#include <comphelper/propmultiplex.hxx>
+#endif
+#ifndef _CPPUHELPER_BASEMUTEX_HXX_
+#include "cppuhelper/basemutex.hxx"
+#endif
+#include "ReportDefines.hxx"
+#ifndef _REPORT_RPTUIFUNC_HXX
+#include "dlgedfunc.hxx"
+#endif
+#ifndef _TRANSFER_HXX
+#include <svtools/transfer.hxx>
+#endif
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
+#endif
+#include <boost/shared_ptr.hpp>
+#include <memory>
+
+namespace rptui
+{
+ class OReportModel;
+ class OReportPage;
+ class OSectionView;
+ class OViewsWindow;
+
+ class OReportSection : public Window
+ , public ::cppu::BaseMutex
+ , public ::comphelper::OPropertyChangeListener
+ , public DropTargetHelper
+ {
+ OReportPage* m_pPage;
+ OSectionView* m_pView;
+ OViewsWindow* m_pParent;
+ ::std::auto_ptr<DlgEdFunc> m_pFunc;
+ ::boost::shared_ptr<OReportModel> m_pModel;
+ ::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pMulti;
+ ::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pReportListener;
+ ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > m_xSection;
+
+ DlgEdMode m_eMode;
+ BOOL m_bDialogModelChanged;
+ sal_Bool m_bInDrag;
+
+ /** fills the section with all control from the report section
+ */
+ void fill();
+
+ OReportSection(OReportSection&);
+ void operator =(OReportSection&);
+ protected:
+ // DropTargetHelper overridables
+ virtual sal_Int8 AcceptDrop( const AcceptDropEvent& _rEvt );
+ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& _rEvt );
+
+ // window overrides
+ virtual void Paint( const Rectangle& rRect );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void Command( const CommandEvent& rCEvt );
+ virtual void LoseFocus();
+ virtual void GetFocus();
+ virtual void Resize();
+
+ // OPropertyChangeListener
+ virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& _rEvent) throw( ::com::sun::star::uno::RuntimeException);
+ public:
+ OReportSection(OViewsWindow* _pParent,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection);
+ virtual ~OReportSection();
+
+ // window overrides
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+
+ /** copies the current selection in this section
+ @param _rAllreadyCopiedObjects This is an out/in put param which contains all already copied objects.
+ */
+ void Copy(::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& _rAllreadyCopiedObjects);
+
+ /** paste a new control in this section
+ @param _aAllreadyCopiedObjects objects to paste into the section. Only objects are pasted where the name is equal to the section name.
+ @param _bForce If set to <TRUE/> than the objects will be copied into this section. The name is not compared in this case.
+ */
+ void Paste(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& _aAllreadyCopiedObjects,bool _bForce = false);
+
+ /** Deletes the current selection in this section
+ *
+ */
+ void Delete();
+
+ /** All objects will be marked.
+ */
+ void SelectAll();
+
+ /** makes the grid visible
+ *
+ * \param _bVisible when <TRUE/> the grid is made visible
+ */
+ void SetGridVisible(BOOL _bVisible);
+
+ /** adjusat the size of the current page
+ *
+ * \return <TRUE/> when the page was adjusted
+ */
+ bool adjustPageSize();
+
+ inline OViewsWindow* getViewsWindow() const { return m_pParent; }
+ inline OSectionView* getView() const { return m_pView; }
+ inline OReportPage* getPage() const { return m_pPage; }
+ inline ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > getSection() const { return m_xSection; }
+
+ BOOL UnmarkDialog();
+ BOOL RemarkDialog();
+
+ void SetDialogModelChanged( BOOL bChanged = TRUE ) { m_bDialogModelChanged = bChanged; }
+ BOOL IsDialogModelChanged() const { return m_bDialogModelChanged; }
+ DlgEdMode GetMode() const { return m_eMode; }
+ void SetMode( DlgEdMode m_eMode );
+
+ /** sets the height of the section
+ @param _nHeight Height is in pixel
+ */
+ void setSectionHeightPixel(sal_uInt32 _nHeight);
+
+ /** insert a new SdrObject which belongs to the report component.
+ @param _xObject the report component
+ */
+ void insertObject(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent >& _xObject);
+
+ /** checks if the keycode is known by the child windows
+ @param _rCode the keycode
+ @return <TRUE/> if the keycode is handled otherwise <FALSE/>
+ */
+ sal_Bool handleKeyEvent(const KeyEvent& _rEvent);
+
+ /** returns the current control report model or <NULL/>
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent > getCurrentControlModel() const;
+
+ /** fills the vector with all selected control models
+ /param _rSelection The vector will be filled and will not be cleared before.
+ */
+ void fillControlModelSelection(::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent > >& _rSelection) const;
+
+ /** creates a default object
+ *
+ * @param _sType
+ */
+ void createDefault(const ::rtl::OUString& _sType);
+
+ /** calls on the section BrkAction
+ *
+ */
+ void breakAction();
+ };
+//==================================================================
+} //rptui
+//==================================================================
+#endif // REPORT_REPORTSECTION_HXX
+
diff --git a/reportdesign/source/ui/inc/ReportWindow.hxx b/reportdesign/source/ui/inc/ReportWindow.hxx
new file mode 100644
index 000000000000..799dba9add28
--- /dev/null
+++ b/reportdesign/source/ui/inc/ReportWindow.hxx
@@ -0,0 +1,258 @@
+#ifndef RPTUI_REPORT_WINDOW_HXX
+#define RPTUI_REPORT_WINDOW_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ReportWindow.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef _COM_SUN_STAR_REPORT_XSECTION_HPP_
+#include <com/sun/star/report/XSection.hpp>
+#endif
+#ifndef RPTUI_REPORT_DEFINES_HXX
+#include "ReportDefines.hxx"
+#endif
+#ifndef RPTUI_STARTMARKER_HXX
+#include "StartMarker.hxx"
+#endif
+#ifndef _RULER_HXX //autogen
+#include <svtools/ruler.hxx>
+#endif
+#ifndef _SVDEDTV_HXX
+#include <svx/svdedtv.hxx>
+#endif
+
+#include <vector>
+#include <boost/shared_ptr.hpp>
+
+#include <MarkedSection.hxx>
+
+class Splitter;
+
+namespace rptui
+{
+ class ODesignView;
+ class OReportSection;
+ class OScrollWindowHelper;
+ class OSectionView;
+ class OReportModel;
+ class OEndMarker;
+ class OReportPage;
+ class DlgEdFunc;
+ class OSectionsWindow;
+ class OViewsWindow;
+ class DlgEdFactory;
+
+ class OReportWindow : public Window, public IMarkedSection
+ {
+ Ruler m_aHRuler;
+
+ ODesignView* m_pView;
+ OScrollWindowHelper* m_pParent;
+ OSectionsWindow* m_pSections;
+ OViewsWindow* m_pViews;
+ DlgEdFactory* m_pObjFac;
+
+ void ImplInitSettings();
+
+ sal_Int32 GetTotalHeight() const;
+
+ OReportWindow(OReportWindow&);
+ void operator =(OReportWindow&);
+ protected:
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ public:
+ OReportWindow(OScrollWindowHelper* _pParent,ODesignView* _pView);
+ virtual ~OReportWindow();
+
+ /** late ctor
+ */
+ void initialize();
+
+ DECL_LINK(Collapsed,OStartMarker*);
+ // WINDOW overloads
+ virtual void Resize();
+
+ inline ODesignView* getReportView() const { return m_pView; }
+ inline OScrollWindowHelper* getScrollWindow() const { return m_pParent; }
+
+ void SetMode( DlgEdMode m_eMode );
+ void SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString());
+ void setGridSnap(BOOL bOn);
+ void setDragStripes(BOOL bOn);
+ BOOL isDragStripes() const;
+
+ /** copies the current selection in this section
+ */
+ void Copy();
+
+ /** returns if paste is allowed
+ *
+ * \return <TRUE/> if paste is allowed
+ */
+ BOOL IsPasteAllowed();
+
+ /** paste a new control in this section
+ */
+ void Paste();
+
+ /** Deletes the current selection in this section
+ *
+ */
+ void Delete();
+
+ /** All objects will be marked.
+ */
+ void SelectAll();
+
+ /** returns <TRUE/> when a object is marked
+ */
+ BOOL HasSelection();
+
+ Point getScrollOffset() const;
+
+ /** removes the section at the given position.
+ *
+ * \param _nPosition Zero based.
+ */
+ void removeSection(USHORT _nPosition);
+
+ /** adds a new section at position _nPosition.
+ If the section is <NULL/> nothing happens.
+ If the position is grater than the current elements, the section will be appended.
+ */
+ void addSection(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection
+ ,const ::rtl::OUString& _sColorEntry
+ ,USHORT _nPosition = USHRT_MAX);
+
+ USHORT getSectionCount() const;
+
+ /** turns the grid on or off
+ *
+ * \param _bVisible
+ */
+ void toggleGrid(sal_Bool _bVisible);
+
+
+ /** shows the ruler
+ */
+ void showRuler(sal_Bool _bShow);
+
+ inline sal_Int32 getRulerHeight() const { return m_aHRuler.GetSizePixel().Height(); }
+
+ /** returns the total width of the first section
+ */
+ sal_Int32 GetTotalWidth() const;
+
+ /** calculate the max width of the markers
+ *
+ * @param _bWithEnd if <TRUE/> the end marker will be used for calculation as well otherwise not.
+ * \return the max width
+ */
+ sal_Int32 getMaxMarkerWidth(sal_Bool _bWithEnd) const;
+
+ /** returns the height of the first spliiter.
+ */
+ sal_Int32 getSplitterHeight() const;
+
+ /** sets the total size of the scroll window
+ */
+ void setTotalSize();
+
+ /** returns the minimum height of the section
+ *
+ * \param _nPos
+ * \return the height in pixel
+ */
+ sal_Int32 getMinHeight(USHORT _nPos) const;
+
+ void ScrollChildren(long nDeltaX, long nDeltaY);
+
+ void notifyHeightChanged();
+
+ /** unmark all objects on the views without the given one.
+ *
+ * @param _pSectionView The view where the objects should not be unmarked.
+ */
+ void unmarkAllObjects(OSectionView* _pSectionView);
+
+ /** triggers the property browser with the report component or section
+ @param _xReportComponent
+ */
+ void showProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xReportComponent);
+
+ /** checks if the keycode is known by the child windows
+ @param _rCode the keycode
+ @return <TRUE/> if the keycode is handled otherwise <FALSE/>
+ */
+ sal_Bool handleKeyEvent(const KeyEvent& _rEvent);
+
+ /** the the section as marked or not marked
+ @param _pSectionView the section where to set the marked flag
+ @param _bMark the marked flag
+ */
+ void setMarked(OSectionView* _pSectionView,sal_Bool _bMark);
+ void setMarked(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection,sal_Bool _bMark);
+ void setMarked(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent> >& _xShape,sal_Bool _bMark);
+
+ // IMarkedSection
+ ::boost::shared_ptr<OReportSection> getMarkedSection(NearSectionAccess nsa = CURRENT) const;
+ virtual void markSection(const sal_uInt16 _nPos);
+
+
+ /** fills the positions of all collapsed sections.
+ *
+ * \param _rCollapsedPositions Out parameter which holds afterwards all positions of the collapsed sections.
+ */
+ void fillCollapsedSections(::std::vector<sal_uInt16>& _rCollapsedPositions) const;
+
+ /** collpase all sections given by their position
+ *
+ * \param _aCollpasedSections The position of the sections which should be collapsed.
+ */
+ void collapseSections(const com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& _aCollpasedSections);
+
+ /** align all marked objects in all sections
+ *
+ * \param eHor
+ * \param eVert
+ * \param bBoundRects
+ */
+ void alignMarkedObjects(sal_Int32 _nControlModification, bool _bAlignAtSection, bool bBoundRects = false);
+
+ sal_uInt32 getMarkedObjectCount() const;
+ };
+//==================================================================
+} //rptui
+//==================================================================
+#endif // RPTUI_REPORT_WINDOW_HXX
+
diff --git a/reportdesign/source/ui/inc/ScrollHelper.hxx b/reportdesign/source/ui/inc/ScrollHelper.hxx
new file mode 100644
index 000000000000..0c242aae503f
--- /dev/null
+++ b/reportdesign/source/ui/inc/ScrollHelper.hxx
@@ -0,0 +1,245 @@
+#ifndef RPTUI_SCROLLHELPER_HXX
+#define RPTUI_SCROLLHELPER_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ScrollHelper.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef _SV_SCRBAR_HXX
+#include <vcl/scrbar.hxx>
+#endif
+#ifndef _COM_SUN_STAR_REPORT_XSECTION_HPP_
+#include <com/sun/star/report/XSection.hpp>
+#endif
+#ifndef _COMPHELPER_PROPERTY_MULTIPLEX_HXX_
+#include <comphelper/propmultiplex.hxx>
+#endif
+#ifndef RPTUI_REPORT_DEFINES_HXX
+#include "ReportDefines.hxx"
+#endif
+#ifndef INCLUDED_SVTOOLS_COLORCFG_HXX
+#include <svtools/colorcfg.hxx>
+#endif
+#ifndef _SVDEDTV_HXX
+#include <svx/svdedtv.hxx>
+#endif
+#ifndef _CPPUHELPER_BASEMUTEX_HXX_
+#include "cppuhelper/basemutex.hxx"
+#endif
+#ifndef _RTL_REF_HXX_
+#include <rtl/ref.hxx>
+#endif
+#include <boost/shared_ptr.hpp>
+
+#include <MarkedSection.hxx>
+
+class SdrView;
+namespace rptui
+{
+ class OSectionsWindow;
+ class ODesignView;
+ class OReportWindow;
+ class OSectionView;
+ class OReportSection;
+ class OReportModel;
+
+ /** This class defines the scrollable area of the report design. It includes
+ the h-ruler and the sections, and end marker. Not the start marker.
+ */
+ typedef Window OScrollWindowHelper_BASE;
+ class OScrollWindowHelper : public ::cppu::BaseMutex
+ , public OScrollWindowHelper_BASE/*TabPage*/
+ , public ::comphelper::OPropertyChangeListener
+ , public IMarkedSection
+ {
+ private:
+ ScrollBar m_aHScroll;
+ ScrollBar m_aVScroll;
+ ScrollBarBox m_aCornerWin; // window in the bottom right corner
+ Point m_aScrollOffset;
+ Size m_aTotalPixelSize;
+ Point m_aPixOffset; // offset to virtual window (pixel)
+ ODesignView* m_pParent;
+ OReportWindow* m_pChild;
+ ::rtl::Reference<comphelper::OPropertyChangeMultiplexer >
+ m_pReportDefintionMultiPlexer; // listener for property changes
+
+ DECL_LINK( ScrollHdl, ScrollBar*);
+ DECL_LINK( EndScrollHdl, ScrollBar*);
+ Size ResizeScrollBars();
+ void ScrollPane( long nDeltaX, long nDeltaY );
+ void ImplInitSettings();
+ void impl_initScrollBar( ScrollBar& _rScrollBar ) const;
+ void impl_scrollContent( long nDeltaX, long nDeltaY );
+
+ OScrollWindowHelper(OScrollWindowHelper&);
+ void operator =(OScrollWindowHelper&);
+ protected:
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ // window
+ virtual void Resize();
+ virtual long Notify( NotifyEvent& rNEvt );
+ // OPropertyChangeListener
+ virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& _rEvent) throw( ::com::sun::star::uno::RuntimeException);
+ public:
+ OScrollWindowHelper( ODesignView* _pReportDesignView);
+ virtual ~OScrollWindowHelper();
+
+ /** late ctor
+ */
+ void initialize();
+
+ void EndScroll( long nDeltaX, long nDeltaY );
+
+ inline Point getScrollOffset() const { return m_aScrollOffset; }
+ inline OReportWindow* getReportWindow() const { return m_pChild; }
+ void setTotalSize(sal_Int32 _nWidth ,sal_Int32 _nHeight);
+ inline Size getTotalSize() const { return m_aTotalPixelSize; }
+ inline ScrollBar* GetHScroll() { return &m_aHScroll; }
+ inline ScrollBar* GetVScroll() { return &m_aVScroll; }
+
+ // forwards
+ void SetMode( DlgEdMode _eMode );
+ void SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString());
+ void setGridSnap(BOOL bOn);
+ void setDragStripes(BOOL bOn);
+ BOOL isDragStripes() const;
+ /** copies the current selection in this section
+ */
+ void Copy();
+
+ /** returns if paste is allowed
+ *
+ * \return <TRUE/> if paste is allowed
+ */
+ BOOL IsPasteAllowed();
+
+ /** paste a new control in this section
+ */
+ void Paste();
+
+ /** Deletes the current selection in this section
+ *
+ */
+ void Delete();
+
+ /** All objects will be marked.
+ */
+ void SelectAll();
+
+ /** returns <TRUE/> when a object is marked
+ */
+ BOOL HasSelection();
+
+ /** removes the section at the given position.
+ *
+ * \param _nPosition Zero based.
+ */
+ void removeSection(USHORT _nPosition);
+
+ /** adds a new section at position _nPosition.
+ If the section is <NULL/> nothing happens.
+ If the position is grater than the current elements, the section will be appended.
+ */
+ void addSection(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection
+ ,const ::rtl::OUString& _sColorEntry
+ ,USHORT _nPosition = USHRT_MAX);
+
+ USHORT getSectionCount() const;
+
+ /** turns the grid on or off
+ *
+ * \param _bVisible
+ */
+ void toggleGrid(sal_Bool _bVisible);
+
+ /** unmark all objects on the views without the given one.
+ *
+ * @param _pSectionView The view where the objects should not be unmarked.
+ */
+ void unmarkAllObjects(OSectionView* _pSectionView);
+
+ /** shows or hides the ruler.
+ */
+ void showRuler(sal_Bool _bShow);
+
+ /** calculate the max width of the markers
+ *
+ * @param _bWithEnd if <TRUE/> the end marker will be used for calculation as well otherwise not.
+ * \return the max width
+ */
+ sal_Int32 getMaxMarkerWidth(sal_Bool _bWithEnd) const;
+
+ /** checks if the keycode is known by the child windows
+ @param _rCode the keycode
+ @return <TRUE/> if the keycode is handled otherwise <FALSE/>
+ */
+ sal_Bool handleKeyEvent(const KeyEvent& _rEvent);
+
+ /** the the section as marked or not marked
+ @param _pSectionView the section where to set the marked flag
+ @param _bMark the marked flag
+ */
+ void setMarked(OSectionView* _pSectionView,sal_Bool _bMark);
+ void setMarked(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection,sal_Bool _bMark);
+ void setMarked(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent> >& _xShape,sal_Bool _bMark);
+
+ // IMarkedSection
+ ::boost::shared_ptr<OReportSection> getMarkedSection(NearSectionAccess nsa = CURRENT) const;
+ virtual void markSection(const sal_uInt16 _nPos);
+
+
+ /** fills the positions of all collapsed sections.
+ *
+ * \param _rCollapsedPositions Out parameter which holds afterwards all positions of the collapsed sections.
+ */
+ void fillCollapsedSections(::std::vector<sal_uInt16>& _rCollapsedPositions) const;
+
+ /** collpase all sections given by their position
+ *
+ * \param _aCollpasedSections The position of the sections which should be collapsed.
+ */
+ void collapseSections(const com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& _aCollpasedSections);
+
+ /** align all marked objects in all sections
+ *
+ * \param eHor
+ * \param eVert
+ * \param bBoundRects
+ */
+ void alignMarkedObjects(sal_Int32 _nControlModification, bool _bAlignAtSection, bool bBoundRects = false);
+
+ sal_uInt32 getMarkedObjectCount() const;
+ };
+}
+#endif // RPTUI_SCROLLHELPER_HXX
diff --git a/reportdesign/source/ui/inc/SectionView.hxx b/reportdesign/source/ui/inc/SectionView.hxx
new file mode 100644
index 000000000000..746e08bca501
--- /dev/null
+++ b/reportdesign/source/ui/inc/SectionView.hxx
@@ -0,0 +1,74 @@
+#ifndef _REPORT_SECTIONVIEW_HXX
+#define _REPORT_SECTIONVIEW_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: SectionView.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+
+
+#ifndef _SVDVIEW_HXX
+#include <svx/svdview.hxx>
+#endif
+namespace rptui
+{
+class OReportWindow;
+class OReportSection;
+
+//============================================================================
+// OSectionView
+//============================================================================
+
+class OSectionView : public SdrView
+{
+private:
+ OReportWindow* m_pReportWindow;
+ OReportSection* m_pSectionWindow;
+
+ void ObjectRemovedInAliveMode( const SdrObject* pObject );
+ OSectionView(const OSectionView&);
+ void operator =(const OSectionView&);
+public:
+ TYPEINFO();
+
+ OSectionView( SdrModel* pModel, OReportSection* _pSectionWindow, OReportWindow* pEditor );
+ virtual ~OSectionView();
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+ virtual void MarkListHasChanged();
+ virtual void MakeVisible( const Rectangle& rRect, Window& rWin );
+
+ inline OReportSection* getSectionWindow() const { return m_pSectionWindow; }
+};
+}
+#endif //_REPORT_SECTIONVIEW_HXX
diff --git a/reportdesign/source/ui/inc/StartMarker.hxx b/reportdesign/source/ui/inc/StartMarker.hxx
new file mode 100644
index 000000000000..946adf813462
--- /dev/null
+++ b/reportdesign/source/ui/inc/StartMarker.hxx
@@ -0,0 +1,105 @@
+#ifndef RPTUI_STARTMARKER_HXX
+#define RPTUI_STARTMARKER_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: StartMarker.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef _OSL_INTERLOCK_H_
+#include <osl/interlck.h>
+#endif
+#ifndef _RULER_HXX //autogen
+#include <svtools/ruler.hxx>
+#endif
+#ifndef RPTUI_COLORLISTENER_HXX
+#include "ColorListener.hxx"
+#endif
+#ifndef _SV_FIXED_HXX
+#include <vcl/fixed.hxx>
+#endif
+
+
+namespace rptui
+{
+ class OSectionsWindow;
+ class OStartMarker : public OColorListener
+ {
+
+ Ruler m_aVRuler;
+ FixedText m_aText;
+ FixedImage m_aImage;
+ OSectionsWindow* m_pParent;
+ static Image* s_pDefCollapsed;
+ static Image* s_pDefExpanded;
+ static Image* s_pDefCollapsedHC;
+ static Image* s_pDefExpandedHC;
+ static oslInterlockedCount s_nImageRefCount; /// When 0 all static images will be destroyed
+ sal_Int32 m_nCornerSize;
+
+ sal_Bool m_bShowRuler;
+
+ void initDefaultNodeImages();
+ void setColor();
+ virtual void ImplInitSettings();
+ OStartMarker(OStartMarker&);
+ void operator =(OStartMarker&);
+ public:
+ OStartMarker(OSectionsWindow* _pParent,const ::rtl::OUString& _sColorEntry);
+ virtual ~OStartMarker();
+
+ // SfxListener
+ virtual void Notify(SfxBroadcaster & rBc, SfxHint const & rHint);
+ // window overloads
+ virtual void Paint( const Rectangle& rRect );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ virtual void Resize();
+ virtual void RequestHelp( const HelpEvent& rHEvt );
+ using Window::Notify;
+
+ void setTitle(const String& _sTitle);
+ sal_Int32 getWidth() const;
+ sal_Int32 getMinHeight() const;
+
+ /** returns the offset where the horizontal ruler must start
+ */
+ sal_Int32 getRulerOffset() const;
+
+ /** shows or hides the ruler.
+ */
+ void showRuler(sal_Bool _bShow);
+
+ virtual void setCollapsed(sal_Bool _bCollapsed);
+ };
+}
+#endif // RPTUI_STARTMARKER_HXX
+
diff --git a/reportdesign/source/ui/inc/UITools.hxx b/reportdesign/source/ui/inc/UITools.hxx
new file mode 100644
index 000000000000..0ea4d14e39cc
--- /dev/null
+++ b/reportdesign/source/ui/inc/UITools.hxx
@@ -0,0 +1,157 @@
+#ifndef RPTUI_UITOOLS_HXX
+#define RPTUI_UITOOLS_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: UITools.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef _COM_SUN_STAR_REPORT_XGROUP_HPP_
+#include <com/sun/star/report/XGroup.hpp>
+#endif
+#include <com/sun/star/report/XReportControlFormat.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/sdbc/XRowSet.hpp>
+
+#include <rtl/ref.hxx>
+#include <vcl/taskpanelist.hxx>
+#include <comphelper/stl_types.hxx>
+#include <functional>
+
+class SdrPage;
+class SdrObject;
+class SdrView;
+class Rectangle;
+namespace comphelper
+{
+ class OPropertyChangeMultiplexer;
+ class OPropertyChangeListener;
+}
+namespace rptui
+{
+ /** returns the position of the object inside the index container
+ @param _xReportDefinition the report definition to get the groups
+ @param _xGroup the group to search
+ @return returns the position of the group in the list, otherwise -1
+ */
+ template<typename T> sal_Int32 getPositionInIndexAccess(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& _xCollection
+ ,const ::com::sun::star::uno::Reference< T >& _xSearch)
+ {
+ sal_Int32 nCount = _xCollection->getCount();
+ sal_Int32 i = (nCount == 0) ? -1 : 0;
+ for (;i<nCount ; ++i)
+ {
+ ::com::sun::star::uno::Reference< T > xObject(_xCollection->getByIndex(i),::com::sun::star::uno::UNO_QUERY);
+ if ( xObject == _xSearch )
+ break;
+ } // for (;i<nCount ; ++i)
+ return i;
+ }
+
+ /** set the name of the header and footer of the group by the expression appended by the localized name of the section
+ @param _xGroup the group where the header/footer name is set by the expression of the group
+ */
+ void adjustSectionName(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup >& _xGroup,sal_Int32 _nPos);
+
+ /** add a listener for the properties size, left margin, right margin to the page style
+ *
+ * \param _xReportDefinition
+ * \param _pListener
+ * \return
+ */
+ ::rtl::Reference< comphelper::OPropertyChangeMultiplexer> addStyleListener( const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition >& _xReportDefinition
+ ,::comphelper::OPropertyChangeListener* _pListener);
+
+ /** opens the common character font dialog
+ */
+ bool openCharDialog(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportControlFormat>& _xReportControlFormat,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow>& _xWindow
+ );
+
+ /** opens the common character font dialog
+ */
+ bool openCharDialog(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportControlFormat>& _xReportControlFormat,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow>& _xWindow,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& _out_rNewValues
+ );
+
+ /** applies the character settings previously obtained via openCharDialog
+ */
+ void applyCharacterSettings(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportControlFormat >& _rxReportControlFormat,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& _rSettings
+ );
+
+ /** notifySystemWindow adds or remove the given window _pToRegister at the Systemwindow found when search _pWindow.
+ @param _pWindow
+ The window which is used to search for the SystemWindow.
+ @param _pToRegister
+ The window which should be added or removed on the TaskPaneList.
+ @param _rMemFunc
+ The member function which should be called at the SystemWindow when found.
+ Possible values are:
+ ::comphelper::mem_fun(&TaskPaneList::AddWindow)
+ ::comphelper::mem_fun(&TaskPaneList::RemoveWindow)
+ */
+ void notifySystemWindow(Window* _pWindow,Window* _pToRegister, ::comphelper::mem_fun1_t<TaskPaneList,Window*> _rMemFunc);
+
+ /** checks whether the given rectangle overlapps another OUnoObject object in that view.
+ *
+ * \param _rRect
+ * \param _rPage
+ * \param _bAllObjects if <TRUE/> all objects are taken into account, otherwise only not marked ones
+ * \return the object which is overlapped, otherwise <NULL/>
+ */
+ SdrObject* isOver(const Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _bAllObjects = false,SdrObject* _pIgnore = NULL);
+
+ /** checks whether the given OUnoObject object rectangle overlapps another object in that view.
+ *
+ * \param _pObj
+ * \param _rPage
+ * \param _rView
+ * \param _bAllObjects if <TRUE/> all objects are taken into account, otherwise only not marked ones
+ * \return the object which is overlapped, otherwise <NULL/>. If the given object is not of type OUnoObject <NULL/> will be returned.
+ */
+ SdrObject* isOver(SdrObject* _pObj,SdrPage& _rPage,SdrView& _rView,bool _bAllObjects = false);
+
+ /** retrieves the names of the parameters of the command which the given RowSet is bound to
+ */
+ ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ getParameterNames( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& _rxRowSet );
+}
+#endif //RPTUI_UITOOLS_HXX
+
diff --git a/reportdesign/source/ui/inc/Undo.hxx b/reportdesign/source/ui/inc/Undo.hxx
new file mode 100644
index 000000000000..06ce55f72b7a
--- /dev/null
+++ b/reportdesign/source/ui/inc/Undo.hxx
@@ -0,0 +1,176 @@
+#ifndef RPTUI_UNDO_HXX
+#define RPTUI_UNDO_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: Undo.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef RPTUI_UNDOACTIONS_HXX
+#include "UndoActions.hxx"
+#endif
+#include <functional>
+
+FORWARD_DECLARE_INTERFACE(awt,XControl)
+FORWARD_DECLARE_INTERFACE(awt,XControlContainer)
+FORWARD_DECLARE_INTERFACE(drawing,XShape)
+namespace dbaui
+{
+ class IController;
+}
+namespace rptui
+{
+ class OObjectBase;
+
+
+ /** \class OSectionUndo
+ * Undo class for section add and remove.
+ */
+ class OSectionUndo : public OCommentUndoAction
+ {
+ OSectionUndo(const OSectionUndo&);
+ void operator =(const OSectionUndo&);
+ protected:
+ ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape> >
+ m_aControls;
+ ::std::vector< ::std::pair< ::rtl::OUString ,::com::sun::star::uno::Any> >
+ m_aValues;
+ Action m_eAction;
+ sal_uInt16 m_nSlot;
+ bool m_bInserted;
+
+ virtual void implReInsert( ) = 0;
+ virtual void implReRemove( ) = 0;
+
+ void collectControls(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection);
+ public:
+ TYPEINFO();
+ OSectionUndo( OReportModel& rMod
+ ,sal_uInt16 _nSlot
+ ,Action _eAction
+ ,USHORT nCommentID);
+ virtual ~OSectionUndo();
+
+ virtual void Undo();
+ virtual void Redo();
+ };
+
+ /** Undo action for the group header, footer, page header, footer
+ */
+ class OReportSectionUndo : public OSectionUndo
+ {
+ OReportHelper m_aReportHelper;
+ ::std::mem_fun_t< ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >
+ ,OReportHelper> m_pMemberFunction;
+
+ void implReInsert( );
+ void implReRemove( );
+ OReportSectionUndo(const OReportSectionUndo&);
+ void operator =(const OReportSectionUndo&);
+ public:
+ TYPEINFO();
+ //OReportSectionUndo( const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection
+ OReportSectionUndo( OReportModel& rMod
+ ,sal_uInt16 _nSlot
+ ,::std::mem_fun_t< ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >
+ ,OReportHelper> _pMemberFunction
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition >& _xReport
+ ,Action _eAction
+ ,USHORT nCommentID);
+ virtual ~OReportSectionUndo();
+ };
+
+ /** Undo action for the group header, footer
+ */
+ class OGroupSectionUndo : public OSectionUndo
+ {
+ OGroupHelper m_aGroupHelper;
+ ::std::mem_fun_t< ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >
+ ,OGroupHelper> m_pMemberFunction;
+
+ mutable ::rtl::OUString m_sName;
+
+ void implReInsert( );
+ void implReRemove( );
+ OGroupSectionUndo(const OGroupSectionUndo&);
+ void operator =(const OGroupSectionUndo&);
+ public:
+ TYPEINFO();
+ //OGroupSectionUndo( const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection
+ OGroupSectionUndo( OReportModel& rMod
+ ,sal_uInt16 _nSlot
+ ,::std::mem_fun_t< ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >
+ ,OGroupHelper> _pMemberFunction
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup >& _xGroup
+ ,Action _eAction
+ ,USHORT nCommentID);
+
+ virtual String GetComment() const;
+ };
+
+ /** \class OToggleSlotUndo
+ * \brief calls the slot every time an undo or redo action is performed.
+ */
+ class OToggleSlotUndo : public OCommentUndoAction
+ {
+ sal_uInt16 m_nSlot;
+ public:
+ TYPEINFO();
+ OToggleSlotUndo(OReportModel& rMod,sal_uInt16 _nSlot,USHORT nCommentID);
+ virtual void Undo();
+ virtual void Redo();
+ };
+
+ /** /class OGroupUndo
+ * \brief Undo action for removing a group object.
+ */
+ class OGroupUndo : public OCommentUndoAction
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup> m_xGroup; ///<! the group for the undo redo action
+ ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition > m_xReportDefinition; ///<! the parent report definition
+ Action m_eAction; ///<! the current action
+ sal_Int32 m_nLastPosition; ///<! the last position of the group
+
+ void implReInsert( );
+ void implReRemove( );
+ public:
+ TYPEINFO();
+ OGroupUndo(OReportModel& rMod
+ ,USHORT nCommentID
+ ,Action _eAction
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup>& _xGroup
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition >& _xReportDefinition);
+ virtual void Undo();
+ virtual void Redo();
+ };
+}
+#endif // RPTUI_UNDO_HXX
diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx
new file mode 100644
index 000000000000..c411c4724ca4
--- /dev/null
+++ b/reportdesign/source/ui/inc/ViewsWindow.hxx
@@ -0,0 +1,333 @@
+#ifndef RPTUI_VIEWSWINDOW_HXX
+#define RPTUI_VIEWSWINDOW_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ViewsWindow.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef _COM_SUN_STAR_REPORT_XSECTION_HPP_
+#include <com/sun/star/report/XSection.hpp>
+#endif
+#ifndef _SV_WINDOW_HXX
+#include <vcl/window.hxx>
+#endif
+#ifndef INCLUDED_SVTOOLS_COLORCFG_HXX
+#include <svtools/colorcfg.hxx>
+#endif
+#ifndef RPTUI_REPORT_DEFINES_HXX
+#include "ReportDefines.hxx"
+#endif
+#ifndef REPORT_REPORTSECTION_HXX
+#include "ReportSection.hxx"
+#endif
+#ifndef _COMPHELPER_PROPERTY_MULTIPLEX_HXX_
+#include <comphelper/propmultiplex.hxx>
+#endif
+#ifndef _CPPUHELPER_BASEMUTEX_HXX_
+#include "cppuhelper/basemutex.hxx"
+#endif
+#ifndef INCLUDED_SVTOOLS_COLORCFG_HXX
+#include <svtools/colorcfg.hxx>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_NAMEDVALUE_HPP_
+#include <com/sun/star/beans/NamedValue.hpp>
+#endif
+#ifndef _SVDEDTV_HXX
+#include <svx/svdedtv.hxx>
+#endif
+#include <SectionView.hxx>
+
+#include <list>
+#include <vector>
+#include <boost/shared_ptr.hpp>
+
+#include <MarkedSection.hxx>
+
+class Splitter;
+class SdrHdl;
+namespace comphelper
+{
+ class OPropertyChangeMultiplexer;
+}
+namespace rptui
+{
+ class OReportWindow;
+ class ODesignView;
+ class OEndMarker;
+ class OReportSection;
+ class OSectionView;
+
+ // -----------------------------------------------------------------------------
+ struct RectangleLess : public ::std::binary_function< Rectangle, Rectangle, bool>
+ {
+ enum CompareMode { POS_LEFT,POS_RIGHT,POS_UPPER,POS_DOWN,POS_CENTER_HORIZONTAL,POS_CENTER_VERTICAL };
+ CompareMode m_eCompareMode;
+ Point m_aRefPoint;
+ RectangleLess(CompareMode _eCompareMode,const Point& _rRefPoint ) : m_eCompareMode(_eCompareMode),m_aRefPoint(_rRefPoint){}
+ bool operator() (const Rectangle& lhs, const Rectangle& rhs) const
+ {
+ switch(m_eCompareMode)
+ {
+ case POS_LEFT:
+ return lhs.Left() < rhs.Left();
+ case POS_RIGHT:
+ return lhs.Right() >= rhs.Right();
+ case POS_UPPER:
+ return lhs.Top() < rhs.Top();
+ case POS_DOWN:
+ return lhs.Bottom() >= rhs.Bottom();
+ case POS_CENTER_HORIZONTAL:
+ return abs(m_aRefPoint.X() - lhs.Center().X()) < abs(m_aRefPoint.X() - rhs.Center().X());
+ case POS_CENTER_VERTICAL:
+ return abs(lhs.Center().Y() - m_aRefPoint.Y()) < abs(rhs.Center().Y() - m_aRefPoint.Y());
+ }
+ return false;
+ }
+ };
+
+ class OViewsWindow : public Window
+ , public ::cppu::BaseMutex
+ , public ::comphelper::OPropertyChangeListener
+ , public SfxListener
+ , public IMarkedSection
+ {
+ typedef ::std::multimap<Rectangle,::std::pair<SdrObject*,OSectionView*>,RectangleLess> TRectangleMap;
+ public:
+ typedef ::std::pair< ::boost::shared_ptr<OEndMarker>,::boost::shared_ptr<Splitter> > TSplitterPair;
+ typedef ::std::pair< ::boost::shared_ptr<OReportSection> , ::rtl::Reference< comphelper::OPropertyChangeMultiplexer> >
+ TReportPair;
+ typedef ::std::pair< TReportPair, TSplitterPair > TSectionPair;
+ typedef ::std::vector< TSectionPair > TSectionsMap;
+
+ struct TReportPairHelper : public ::std::unary_function< TSectionsMap::value_type, ::boost::shared_ptr<OReportSection> >
+ {
+ const ::boost::shared_ptr<OReportSection>& operator() (const TSectionsMap::value_type& lhs) const
+ {
+ return lhs.first.first;
+ }
+ };
+ private:
+ TSectionsMap m_aSections;
+ svtools::ColorConfig m_aColorConfig;
+ OReportWindow* m_pParent;
+ ::rtl::OUString m_sShapeType;
+ sal_Bool m_bInSplitHandler;
+ sal_Bool m_bInUnmark;
+
+ void ImplInitSettings();
+ /** returns the iterator at pos _nPos or the end()
+ */
+ TSectionsMap::iterator getIteratorAtPos(USHORT _nPos);
+ void collectRectangles(TRectangleMap& _rMap,bool _bBoundRects);
+ void collectBoundResizeRect(const TRectangleMap& _rSortRectangles,sal_Int32 _nControlModification,bool _bAlignAtSection,bool _bBoundRects,Rectangle& _rBound,Rectangle& _rResize);
+
+ DECL_LINK(StartSplitHdl, Splitter*);
+ DECL_LINK(SplitHdl, Splitter*);
+ DECL_LINK(EndSplitHdl, Splitter*);
+
+ OViewsWindow(OViewsWindow&);
+ void operator =(OViewsWindow&);
+ protected:
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ // windows overload
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ using Window::Notify;
+ // SfxListener
+ virtual void Notify(SfxBroadcaster & rBc, SfxHint const & rHint);
+ // OPropertyChangeListener
+ virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& _rEvent) throw( ::com::sun::star::uno::RuntimeException);
+ public:
+ OViewsWindow( Window* _pParent,OReportWindow* _pReportWindow);
+ virtual ~OViewsWindow();
+
+ // windows overload
+ virtual void Resize();
+
+ /** late ctor
+ */
+ void initialize();
+
+ inline OReportWindow* getView() const { return m_pParent; }
+
+ /** removes the section at the given position.
+ *
+ * \param _nPosition Zero based.
+ */
+ void removeSection(USHORT _nPosition);
+
+ /** adds a new section at position _nPosition.
+ If the section is <NULL/> nothing happens.
+ If the position is grater than the current elements, the section will be appended.
+ */
+ void addSection(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection
+ ,const ::rtl::OUString& _sColorEntry
+ ,USHORT _nPosition = USHRT_MAX);
+
+ USHORT getSectionCount() const;
+ /** return the section at the given position
+ *
+ * \param _nPos
+ * \return the section at this pos or an empty section
+ */
+ ::boost::shared_ptr<OReportSection> getSection(const USHORT _nPos) const;
+
+ void showView(USHORT _nPos,BOOL _bShow);
+
+ /** turns the grid on or off
+ *
+ * \param _bVisible
+ */
+ void toggleGrid(sal_Bool _bVisible);
+ void setGridSnap(BOOL bOn);
+ void setDragStripes(BOOL bOn);
+ BOOL isDragStripes() const;
+
+ /** returns the total accumulated height of all sections until _pSection is reached
+ @param _pSection Defines the end of accumulation, can be <NULL/>
+ */
+ sal_Int32 getTotalHeight(const OReportSection* _pSection = NULL) const;
+
+ /** returns the height of the first spliiter.
+ */
+ sal_Int32 getSplitterHeight() const;
+
+ inline bool empty() const { return m_aSections.empty(); }
+ void SetMode( DlgEdMode m_eMode );
+ void SetInsertObj( USHORT eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString());
+ /** copies the current selection in this section
+ */
+ void Copy();
+
+ /** returns if paste is allowed
+ *
+ * \return <TRUE/> if paste is allowed
+ */
+ BOOL IsPasteAllowed();
+
+ /** paste a new control in this section
+ */
+ void Paste();
+
+ /** Deletes the current selection in this section
+ *
+ */
+ void Delete();
+
+ /** All objects will be marked.
+ */
+ void SelectAll();
+
+ /** returns <TRUE/> when a object is marked
+ */
+ BOOL HasSelection();
+
+ void SectionHasFocus(OReportSection* _pSection,BOOL _bHasFocus);
+
+ /** unmark all objects on the views without the given one.
+ *
+ * @param _pSectionView The view where the objects should not be unmarked.
+ */
+ void unmarkAllObjects(OSectionView* _pSectionView);
+
+ /** returns the report section window for the given xsection
+ @param _xSection the section
+ */
+ ::boost::shared_ptr<OReportSection> getReportSection(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection);
+
+ /** checks if the keycode is known by the child windows
+ @param _rCode the keycode
+ @return <TRUE/> if the keycode is handled otherwise <FALSE/>
+ */
+ sal_Bool handleKeyEvent(const KeyEvent& _rEvent);
+
+ /** the the section as marked or not marked
+ @param _pSectionView the section where to set the marked flag
+ @param _bMark the marked flag
+ */
+ void setMarked(OSectionView* _pSectionView,sal_Bool _bMark);
+ void setMarked(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection,sal_Bool _bMark);
+ void setMarked(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent> >& _xShape,sal_Bool _bMark);
+
+ /** get section from point inside.
+ @param _aPosition
+ */
+ ::boost::shared_ptr<OReportSection> getSection(const Point& _aPosition);
+
+ // IMarkedSection
+ ::boost::shared_ptr<OReportSection> getMarkedSection(NearSectionAccess nsa = CURRENT) const;
+ virtual void markSection(const sal_uInt16 _nPos);
+
+ /** align all marked objects in all sections
+ */
+ void alignMarkedObjects(sal_Int32 _nControlModification,bool _bAlignAtSection, bool bBoundRects = false);
+
+ /** shows the properties of the section corresponding to the end marker
+ *
+ * \param _pEndMarker must be not <NULL/>
+ */
+ void showProperties(const OEndMarker* _pEndMarker);
+
+ /** creates a default object
+ *
+ */
+ void createDefault();
+
+ /** returns the currently set shape type.
+ *
+ * \return \member m_sShapeType
+ */
+ inline ::rtl::OUString getShapeType() const { return m_sShapeType; }
+
+ /** returns the current position in the list
+ */
+ USHORT getPosition(const OReportSection* _pSection = NULL) const;
+
+ /** calls on every section BrkAction
+ *
+ */
+ void breakAction();
+
+ void BegDragObj(const Point& _aPnt, SdrHdl* _pHdl);
+ void EndDragObj(BOOL _bCopy = FALSE);
+ void EndAction();
+
+ void MovAction(const Point& rPnt);
+
+ sal_uInt32 getMarkedObjectCount() const;
+ };
+//==============================================================================
+} // rptui
+//==============================================================================
+#endif // RPTUI_VIEWSWINDOW_HXX
+
diff --git a/reportdesign/source/ui/inc/dlgedclip.hxx b/reportdesign/source/ui/inc/dlgedclip.hxx
new file mode 100644
index 000000000000..403bebd4782a
--- /dev/null
+++ b/reportdesign/source/ui/inc/dlgedclip.hxx
@@ -0,0 +1,98 @@
+#ifndef _REPORT_RPTUICLIP_HXX
+#define _REPORT_RPTUICLIP_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dlgedclip.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+
+#ifndef _TRANSFER_HXX
+#include <svtools/transfer.hxx>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_NAMEDVALUE_HPP_
+#include <com/sun/star/beans/NamedValue.hpp>
+#endif
+
+namespace rptui
+{
+//============================================================================
+// OReportExchange
+//============================================================================
+/** \class OReportExchange
+ * \brief defines a clipboard fromat for copying selection elements.
+ * \ingroup reportdesign_source_ui_report
+ *
+ *
+ */
+class OReportExchange : public TransferableHelper
+{
+public:
+ typedef ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > TSectionElements;
+
+ /** Constructs a new exchange object with section elements
+ *
+ * \param _rCopyElements the elements to copy. Each section is one entry. The value must be a sequence of elements.
+ * \return
+ */
+ OReportExchange( const TSectionElements& _rCopyElements);
+
+ /** checks whether or not a descriptor can be extracted from the data flavor vector given
+ *
+ * \param _rFlavors
+ available flavors
+ * \return
+ */
+ static sal_Bool canExtract(const DataFlavorExVector& _rFlavors);
+
+ /** extract the section elements
+ *
+ * \param _rData the clipboard data
+ * \return the copied elements
+ */
+ static TSectionElements extractCopies(const TransferableDataHelper& _rData);
+
+ /** returns the format id.
+ *
+ * \return the registered format id
+ */
+ static sal_uInt32 getDescriptorFormatId();
+
+protected:
+ // TransferableHelper overridables
+ virtual void AddSupportedFormats();
+ virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+private:
+ TSectionElements m_aCopyElements;
+};
+}
+#endif // _REPORT_RPTUICLIP_HXX
diff --git a/reportdesign/source/ui/inc/dlgedfac.hxx b/reportdesign/source/ui/inc/dlgedfac.hxx
new file mode 100644
index 000000000000..c8186e27e809
--- /dev/null
+++ b/reportdesign/source/ui/inc/dlgedfac.hxx
@@ -0,0 +1,60 @@
+#ifndef _REPORT_RPTUIFAC_HXX
+#define _REPORT_RPTUIFAC_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dlgedfac.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+
+
+#ifndef _SVDOBJ_HXX
+#include <svx/svdobj.hxx>
+#endif
+
+namespace rptui
+{
+ class OReportSection;
+//============================================================================
+// DlgEdFactory
+//============================================================================
+class DlgEdFactory
+{
+public:
+ DlgEdFactory();
+ ~DlgEdFactory();
+
+ DECL_LINK( MakeObject, SdrObjFactory * );
+};
+}
+#endif // _REPORT_RPTUIFAC_HXX
+
diff --git a/reportdesign/source/ui/inc/dlgedfunc.hxx b/reportdesign/source/ui/inc/dlgedfunc.hxx
new file mode 100644
index 000000000000..05ba9eeff8f2
--- /dev/null
+++ b/reportdesign/source/ui/inc/dlgedfunc.hxx
@@ -0,0 +1,139 @@
+#ifndef _REPORT_RPTUIFUNC_HXX
+#define _REPORT_RPTUIFUNC_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dlgedfunc.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef _SV_TIMER_HXX
+#include <vcl/timer.hxx>
+#endif
+
+class Timer;
+class MouseEvent;
+class Point;
+class SdrTextObj;
+namespace rptui
+{
+
+class OReportSection;
+
+//============================================================================
+// DlgEdFunc
+//============================================================================
+
+class DlgEdFunc /* : public LinkHdl */
+{
+ DlgEdFunc(const DlgEdFunc&);
+ void operator =(const DlgEdFunc&);
+protected:
+ OReportSection* pParent;
+ Timer aScrollTimer;
+ Point m_aMDPos;
+
+ DECL_LINK( ScrollTimeout, Timer * );
+ void ForceScroll( const Point& rPos );
+ /** checks that no other object is overlapped.
+ *
+ * \param rMEvt
+ */
+ void checkMovementAllowed(const MouseEvent& rMEvt);
+
+ /** sets the correct mouse pointer when moving a object
+ *
+ * \param rMEvt
+ * \return <TRUE/> when the pointer was already set.
+ */
+ bool setMovementPointer(const MouseEvent& rMEvt);
+
+ bool isRectangleHit(const MouseEvent& rMEvt);
+
+public:
+ DlgEdFunc( OReportSection* pParent );
+ virtual ~DlgEdFunc();
+
+ virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
+ virtual BOOL MouseButtonUp( const MouseEvent& rMEvt );
+ virtual BOOL MouseMove( const MouseEvent& rMEvt );
+
+ /** checks if the keycode is known by the child windows
+ @param _rCode the keycode
+ @return <TRUE/> if the keycode is handled otherwise <FALSE/>
+ */
+ virtual sal_Bool handleKeyEvent(const KeyEvent& _rEvent);
+
+ /** returns <TRUE/> if the mouse event is over an existing object
+ *
+ * \param rMEvt
+ * \return <TRUE/> if overlapping, otherwise <FALSE/>
+ */
+ bool isOverlapping(const MouseEvent& rMEvt);
+};
+
+//============================================================================
+// DlgEdFuncInsert
+//============================================================================
+
+class DlgEdFuncInsert : public DlgEdFunc
+{
+public:
+ DlgEdFuncInsert( OReportSection* pParent );
+ ~DlgEdFuncInsert();
+
+ virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
+ virtual BOOL MouseButtonUp( const MouseEvent& rMEvt );
+ virtual BOOL MouseMove( const MouseEvent& rMEvt );
+};
+
+//============================================================================
+// DlgEdFuncSelect
+//============================================================================
+
+class DlgEdFuncSelect : public DlgEdFunc
+{
+protected:
+ BOOL bMarkAction;
+
+public:
+ DlgEdFuncSelect( OReportSection* pParent );
+ ~DlgEdFuncSelect();
+
+ virtual BOOL MouseButtonDown( const MouseEvent& rMEvt );
+ virtual BOOL MouseButtonUp( const MouseEvent& rMEvt );
+ virtual BOOL MouseMove( const MouseEvent& rMEvt );
+
+ void SetInEditMode(SdrTextObj* _pTextObj,const MouseEvent& rMEvt, BOOL bQuickDrag);
+};
+
+}
+#endif //_REPORT_RPTUIFUNC_HXX
diff --git a/reportdesign/source/ui/inc/dlgpage.hxx b/reportdesign/source/ui/inc/dlgpage.hxx
new file mode 100644
index 000000000000..063cf7f0124b
--- /dev/null
+++ b/reportdesign/source/ui/inc/dlgpage.hxx
@@ -0,0 +1,64 @@
+#ifndef RPTUI_DLGPAGE_HXX
+#define RPTUI_DLGPAGE_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: dlgpage.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:30 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef _SFXTABDLG_HXX //autogen
+#include <sfx2/tabdlg.hxx>
+#endif
+
+namespace rptui
+{
+/*************************************************************************
+|*
+|* Seite einrichten-Tab-Dialog
+|*
+\************************************************************************/
+class ORptPageDialog : public SfxTabDialog
+{
+private:
+ const SfxItemSet& rOutAttrs;
+
+ ORptPageDialog(const ORptPageDialog&);
+ void operator =(const ORptPageDialog&);
+public:
+
+ ORptPageDialog( Window* pParent, const SfxItemSet* pAttr,USHORT _nPageId);
+ virtual ~ORptPageDialog() {}
+};
+// =============================================================================
+} // namespace rptui
+// =============================================================================
+#endif // RPTUI_DLGPAGE_HXX
diff --git a/reportdesign/source/ui/inc/metadata.hxx b/reportdesign/source/ui/inc/metadata.hxx
new file mode 100644
index 000000000000..ad6b3c65c560
--- /dev/null
+++ b/reportdesign/source/ui/inc/metadata.hxx
@@ -0,0 +1,163 @@
+#ifndef RPTUI_METADATA_HXX_
+#define RPTUI_METADATA_HXX_
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: metadata.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:31 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef _RPTUI_MODULE_HELPER_RPT_HXX_
+#include "ModuleHelper.hxx"
+#endif
+
+/** === begin UNO includes === **/
+#ifndef _COM_SUN_STAR_BEANS_PROPERTY_HPP_
+#include <com/sun/star/beans/Property.hpp>
+#endif
+#ifndef _COM_SUN_STAR_INSPECTION_XPROPERTYHANDLER_HPP_
+#include <com/sun/star/inspection/XPropertyHandler.hpp>
+#endif
+/** === end UNO includes === **/
+
+//............................................................................
+namespace rptui
+{
+//............................................................................
+
+ struct OPropertyInfoImpl;
+
+ //========================================================================
+ //= OPropertyInfoService
+ //========================================================================
+ class OPropertyInfoService
+ :public OModuleClient
+ {
+ OPropertyInfoService(const OPropertyInfoService&);
+ void operator =(const OPropertyInfoService&);
+ protected:
+ static sal_uInt16 s_nCount;
+ static OPropertyInfoImpl* s_pPropertyInfos;
+ // TODO: a real structure which allows quick access by name as well as by id
+
+ public:
+ OPropertyInfoService(){}
+ virtual ~OPropertyInfoService(){}
+ // IPropertyInfoService
+ sal_Int32 getPropertyId(const String& _rName) const;
+ String getPropertyTranslation(sal_Int32 _nId) const;
+ sal_Int32 getPropertyHelpId(sal_Int32 _nId) const;
+ sal_Int16 getPropertyPos(sal_Int32 _nId) const;
+ sal_uInt32 getPropertyUIFlags(sal_Int32 _nId) const;
+ void getPropertyEnumRepresentations(sal_Int32 _nId,::std::vector< ::rtl::OUString >& _rOut) const;
+ String getPropertyName( sal_Int32 _nPropId );
+ static void getExcludeProperties(::std::vector< com::sun::star::beans::Property >& _rExcludeProperties,const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler >& _xFormComponentHandler);
+
+ bool isComposable(
+ const ::rtl::OUString& _rPropertyName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler >& _xFormComponentHandler
+ );
+
+ protected:
+ static const OPropertyInfoImpl* getPropertyInfo();
+
+ static const OPropertyInfoImpl* getPropertyInfo(const String& _rName);
+ static const OPropertyInfoImpl* getPropertyInfo(sal_Int32 _nId);
+ };
+
+ //========================================================================
+ //= HelpIdUrl
+ //========================================================================
+ /// small helper to translate help ids into help urls
+ class HelpIdUrl
+ {
+ public:
+ static sal_uInt32 getHelpId( const ::rtl::OUString& _rHelpURL );
+ static ::rtl::OUString getHelpURL( sal_uInt32 _nHelpId );
+ };
+
+ //========================================================================
+ //= UI flags (for all browseable properties)
+ //========================================================================
+
+#define PROP_FLAG_NONE 0x00000001 // no special flag
+#define PROP_FLAG_ENUM 0x00000002 // the property is some kind of enum property, i.e. its
+ // value is chosen from a fixed list of possible values
+#define PROP_FLAG_ENUM_ONE 0x00000004 // the property is an enum property starting with 1
+ // (note that this includes PROP_FLAG_ENUM)
+#define PROP_FLAG_COMPOSEABLE 0x00000008 // the property is "composeable", i.e. an intersection of property
+ // sets should expose it, if all elements do
+#define PROP_FLAG_EXPERIMENTAL 0x00000010 // the property is experimental, i.e. should not appear in the
+ // UI, unless experimental properties are enabled by a configuraiton
+ // option
+#define PROP_FLAG_DATA_PROPERTY 0x00000020 // the property is to appear on the "Data" page
+
+ //========================================================================
+ //= property ids (for all browseable properties)
+ //========================================================================
+
+ #define PROPERTY_ID_FORCENEWPAGE 1
+ #define PROPERTY_ID_NEWROWORCOL 2
+ #define PROPERTY_ID_KEEPTOGETHER 3
+ #define PROPERTY_ID_CANGROW 4
+ #define PROPERTY_ID_CANSHRINK 5
+ #define PROPERTY_ID_REPEATSECTION 6
+ #define PROPERTY_ID_BACKCOLOR 7
+ #define PROPERTY_ID_VISIBLE 8
+ #define PROPERTY_ID_GROUPKEEPTOGETHER 9
+ #define PROPERTY_ID_PAGEHEADEROPTION 10
+ #define PROPERTY_ID_PAGEFOOTEROPTION 11
+ #define PROPERTY_ID_POSITIONX 12
+ #define PROPERTY_ID_POSITIONY 13
+ #define PROPERTY_ID_WIDTH 14
+ #define PROPERTY_ID_HEIGHT 15
+ #define PROPERTY_ID_FORMULA 16
+ #define PROPERTY_ID_PRINTREPEATEDVALUES 17
+ #define PROPERTY_ID_CONDITIONALPRINTEXPRESSION 18
+ #define PROPERTY_ID_INITIALFORMULA 19
+ #define PROPERTY_ID_STARTNEWCOLUMN 20
+ #define PROPERTY_ID_DATAFIELD 21
+ #define PROPERTY_ID_RESETPAGENUMBER 22
+ #define PROPERTY_ID_CONTROLBACKGROUND 23
+ #define PROPERTY_ID_CHARFONTNAME 25
+ #define PROPERTY_ID_PRINTWHENGROUPCHANGE 26
+ #define PROPERTY_ID_DEEPTRAVERSING 27
+ #define PROPERTY_ID_PREEVALUATED 28
+ #define PROPERTY_ID_PRESERVEIRI 29
+ #define PROPERTY_ID_BACKTRANSPARENT 30
+ #define PROPERTY_ID_CONTROLBACKGROUNDTRANSPARENT 31
+
+//............................................................................
+} // namespace rptui
+//............................................................................
+
+#endif // RPTUI_METADATA_HXX_
+
diff --git a/reportdesign/source/ui/inc/propbrw.hxx b/reportdesign/source/ui/inc/propbrw.hxx
new file mode 100644
index 000000000000..67d4af41b0d9
--- /dev/null
+++ b/reportdesign/source/ui/inc/propbrw.hxx
@@ -0,0 +1,147 @@
+#ifndef _REPORT_PROPBRW_HXX
+#define _REPORT_PROPBRW_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: propbrw.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:31 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+
+#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_AWT_XCONTROLCONTAINER_HPP_
+#include <com/sun/star/awt/XControlContainer.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+#include <com/sun/star/frame/XFrame.hpp>
+#endif
+#ifndef _COM_SUN_STAR_INSPECTION_XOBJECTINSPECTOR_HPP_
+#include <com/sun/star/inspection/XObjectInspector.hpp>
+#endif
+
+#ifndef _SFXBRDCST_HXX //autogen
+#include <svtools/brdcst.hxx>
+#endif
+
+#ifndef _SFXLSTNER_HXX //autogen
+#include <svtools/lstner.hxx>
+#endif
+
+#ifndef _SV_DOCKWIN_HXX
+#include <vcl/dockwin.hxx>
+#endif
+#ifndef _SVDMARK_HXX //autogen
+#include <svx/svdmark.hxx>
+#endif
+#ifndef _RPTUI_MODULE_HELPER_RPT_HXX_
+#include "ModuleHelper.hxx"
+#endif
+
+namespace rptui
+{
+
+class OSectionView;
+class ODesignView;
+class OObjectBase;
+//============================================================================
+// PropBrw
+//============================================================================
+
+class PropBrw : public DockingWindow , public SfxListener, public SfxBroadcaster
+{
+private:
+ OModuleClient m_aModuleClient;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
+ m_xORB;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
+ m_xMeAsFrame;
+ ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspector >
+ m_xBrowserController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >
+ m_xBrowserComponentWindow;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>
+ m_xLastSection; /// is the previously displayed section
+ ::rtl::OUString m_sLastActivePage;
+ ODesignView* m_pDesignView;
+ OSectionView* m_pView;
+ sal_Bool m_bInitialStateChange;
+
+ PropBrw(PropBrw&);
+ void operator =(PropBrw&);
+protected:
+
+ virtual void Resize();
+ virtual sal_Bool Close();
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> >
+ CreateCompPropSet(const SdrMarkList& rMarkList);
+
+ void implSetNewObject(
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> >& _aObjects = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> >());
+
+ ::rtl::OUString GetHeadlineName(
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> >& _aObjects);
+
+ void implDetachController();
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> CreateComponentPair(OObjectBase* _pObj);
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> CreateComponentPair(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xFormComponent
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xReportComponent);
+ DECL_LINK( OnAsyncGetFocus, void* );
+
+public:
+ PropBrw(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB
+ ,Window* pParent
+ ,ODesignView* _pDesignView);
+ virtual ~PropBrw();
+
+ virtual void LoseFocus();
+
+ void Update( OSectionView* m_pView );
+ void Update( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xReportComponent);
+ inline OSectionView* GetCurView() const { return m_pView; }
+ ::rtl::OUString getCurrentPage() const;
+ inline void setCurrentPage(const ::rtl::OUString& _sLastActivePage) { m_sLastActivePage = _sLastActivePage; }
+private:
+ using Window::Update;
+};
+//==============================================================================
+} // rptui
+//==============================================================================
+#endif // _REPORT_PROPBRW_HXX
diff --git a/reportdesign/source/ui/inc/toolboxcontroller.hxx b/reportdesign/source/ui/inc/toolboxcontroller.hxx
new file mode 100644
index 000000000000..94235cd009b8
--- /dev/null
+++ b/reportdesign/source/ui/inc/toolboxcontroller.hxx
@@ -0,0 +1,113 @@
+#ifndef RPTUI_TOOLBOXCONTROLLER_HXX
+#define RPTUI_TOOLBOXCONTROLLER_HXX
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: toolboxcontroller.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-09 11:56:31 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef _SVTOOLS_TOOLBOXCONTROLLER_HXX
+#include <svtools/toolboxcontroller.hxx>
+#endif
+#ifndef _COMPHELPER_STLTYPES_HXX_
+#include <comphelper/stl_types.hxx>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_
+#include <com/sun/star/uno/XComponentContext.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XSUBTOOLBARCONTROLLER_HPP_
+#include <com/sun/star/frame/XSubToolbarController.hpp>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE2_HXX_
+#include <cppuhelper/implbase2.hxx>
+#endif
+#ifndef _COMPHELPER_IMPLEMENTATIONREFERENCE_HXX
+#include <comphelper/implementationreference.hxx>
+#endif
+
+class SfxToolBoxControl;
+namespace rptui
+{
+ typedef ::cppu::ImplHelper2 < ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::frame::XSubToolbarController> TToolboxController_BASE;
+ typedef ::comphelper::ImplementationReference<SfxToolBoxControl,::com::sun::star::frame::XToolbarController> TToolbarHelper;
+
+ class OToolboxController : public ::svt::ToolboxController
+ ,public TToolboxController_BASE
+ {
+ DECLARE_STL_USTRINGACCESS_MAP(sal_Bool,TCommandState);
+ TCommandState m_aStates;
+ TToolbarHelper m_pToolbarController;
+ sal_uInt16 m_nToolBoxId;
+ sal_uInt16 m_nSlotId;
+ OToolboxController(const OToolboxController&);
+ void operator =(const OToolboxController&);
+ public:
+ OToolboxController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
+ virtual ~OToolboxController();
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() throw ();
+ virtual void SAL_CALL release() throw ();
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+ // need by registration
+ static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
+ create(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext);
+ virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+ // XStatusListener
+ virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
+ // XToolbarController
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException);
+
+ // XSubToolbarController
+ virtual ::sal_Bool SAL_CALL opensSubToolbar( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSubToolbarName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL functionSelected( const ::rtl::OUString& aCommand ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateImage( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createItemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& Parent ) throw (::com::sun::star::uno::RuntimeException);
+ };
+//..........................................................................
+} // rptui
+//..........................................................................
+#endif //RPTUI_TOOLBOXCONTROLLER_HXX
+