2010-10-27 12:33:13 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2014-04-18 18:54:04 +02:00
|
|
|
#ifndef INCLUDED_REPORTDESIGN_SOURCE_UI_INC_SECTIONWINDOW_HXX
|
|
|
|
#define INCLUDED_REPORTDESIGN_SOURCE_UI_INC_SECTIONWINDOW_HXX
|
2008-08-19 09:11:59 +00:00
|
|
|
|
|
|
|
#include <com/sun/star/report/XSection.hpp>
|
|
|
|
#include <vcl/window.hxx>
|
|
|
|
#include <vcl/split.hxx>
|
|
|
|
#include <svtools/colorcfg.hxx>
|
|
|
|
#include <comphelper/propmultiplex.hxx>
|
|
|
|
#include <cppuhelper/basemutex.hxx>
|
|
|
|
|
|
|
|
#include "UITools.hxx"
|
2017-10-23 22:34:20 +02:00
|
|
|
#include <UndoActions.hxx>
|
2008-08-19 09:11:59 +00:00
|
|
|
#include "StartMarker.hxx"
|
|
|
|
#include "EndMarker.hxx"
|
|
|
|
#include "ReportSection.hxx"
|
|
|
|
|
|
|
|
#include <list>
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
namespace comphelper
|
|
|
|
{
|
|
|
|
class OPropertyChangeMultiplexer;
|
|
|
|
}
|
|
|
|
namespace rptui
|
|
|
|
{
|
|
|
|
class OViewsWindow;
|
2014-09-23 11:20:40 +02:00
|
|
|
class OSectionWindow : public vcl::Window
|
2008-08-19 09:11:59 +00:00
|
|
|
, public ::cppu::BaseMutex
|
|
|
|
, public ::comphelper::OPropertyChangeListener
|
|
|
|
{
|
2015-03-09 14:29:30 +02:00
|
|
|
VclPtr<OViewsWindow> m_pParent;
|
2015-01-26 13:14:14 +02:00
|
|
|
VclPtr<OStartMarker> m_aStartMarker;
|
|
|
|
VclPtr<OReportSection> m_aReportSection;
|
|
|
|
VclPtr<Splitter> m_aSplitter;
|
|
|
|
VclPtr<OEndMarker> m_aEndMarker;
|
2008-08-19 09:11:59 +00:00
|
|
|
|
|
|
|
::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pSectionMulti;
|
|
|
|
::rtl::Reference< comphelper::OPropertyChangeMultiplexer> m_pGroupMulti;
|
|
|
|
|
2015-10-12 15:25:41 +02:00
|
|
|
OSectionWindow(OSectionWindow&) = delete;
|
|
|
|
void operator =(OSectionWindow&) = delete;
|
2008-08-19 09:11:59 +00:00
|
|
|
|
|
|
|
/** set the title of the group header or footer
|
|
|
|
*
|
|
|
|
* \param _xGroup
|
|
|
|
* \param _nResId
|
|
|
|
* \param _pGetSection
|
|
|
|
* \param _pIsSectionOn
|
2011-01-14 17:40:56 +01:00
|
|
|
* @return sal_True when title was set otherwise FALSE
|
2008-08-19 09:11:59 +00:00
|
|
|
*/
|
2017-06-11 20:56:30 +01:00
|
|
|
bool setGroupSectionTitle(const css::uno::Reference< css::report::XGroup>& _xGroup,const char* pResId,::std::mem_fun_t< css::uno::Reference< css::report::XSection> , OGroupHelper> _pGetSection, const ::std::mem_fun_t<bool, OGroupHelper>& _pIsSectionOn);
|
2008-12-10 13:41:25 +00:00
|
|
|
|
|
|
|
/** set the title of the (report/page) header or footer
|
|
|
|
*
|
|
|
|
* \param _xGroup
|
|
|
|
* \param _nResId
|
|
|
|
* \param _pGetSection
|
|
|
|
* \param _pIsSectionOn
|
2011-01-14 17:40:56 +01:00
|
|
|
* @return sal_True when title was set otherwise FALSE
|
2008-12-10 13:41:25 +00:00
|
|
|
*/
|
2017-06-11 20:56:30 +01:00
|
|
|
bool setReportSectionTitle(const css::uno::Reference< css::report::XReportDefinition>& _xReport,const char* pResId,::std::mem_fun_t< css::uno::Reference< css::report::XSection> , OReportHelper> _pGetSection, const ::std::mem_fun_t<bool, OReportHelper>& _pIsSectionOn);
|
2008-08-19 09:11:59 +00:00
|
|
|
void ImplInitSettings();
|
|
|
|
|
2016-10-05 07:56:12 +02:00
|
|
|
DECL_LINK(Collapsed, OColorListener&, void);
|
|
|
|
DECL_LINK(StartSplitHdl, Splitter*, void);
|
|
|
|
DECL_LINK(SplitHdl, Splitter*, void);
|
|
|
|
DECL_LINK(EndSplitHdl, Splitter*, void);
|
2008-08-19 09:11:59 +00:00
|
|
|
|
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
|
2015-01-08 23:08:34 +01:00
|
|
|
// Window overrides
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void Resize() override;
|
2008-08-19 09:11:59 +00:00
|
|
|
|
|
|
|
protected:
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual void _propertyChanged(const css::beans::PropertyChangeEvent& _rEvent) override;
|
2008-08-19 09:11:59 +00:00
|
|
|
public:
|
|
|
|
OSectionWindow( OViewsWindow* _pParent
|
2015-10-23 15:43:36 +02:00
|
|
|
,const css::uno::Reference< css::report::XSection >& _xSection
|
2013-04-07 12:06:47 +02:00
|
|
|
,const OUString& _sColorEntry);
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~OSectionWindow() override;
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void dispose() override;
|
2008-08-19 09:11:59 +00:00
|
|
|
|
2017-03-03 20:57:02 +01:00
|
|
|
OStartMarker& getStartMarker() { return *m_aStartMarker.get(); }
|
|
|
|
OReportSection& getReportSection() { return *m_aReportSection.get(); }
|
|
|
|
OEndMarker& getEndMarker() { return *m_aEndMarker.get(); }
|
|
|
|
OViewsWindow* getViewsWindow() { return m_pParent; }
|
2008-08-19 09:11:59 +00:00
|
|
|
|
2014-05-02 08:38:50 +02:00
|
|
|
void setCollapsed(bool _bCollapsed);
|
2008-08-19 09:11:59 +00:00
|
|
|
|
|
|
|
/** triggers the property browser with the section
|
|
|
|
@param _pStartMarker
|
|
|
|
*/
|
2014-05-02 08:38:50 +02:00
|
|
|
void showProperties();
|
2008-08-19 09:11:59 +00:00
|
|
|
|
|
|
|
/** set the marker as marked or not marked
|
|
|
|
@param _bMark set the new state of the marker
|
|
|
|
*/
|
2014-05-02 08:38:50 +02:00
|
|
|
void setMarked(bool _bMark);
|
2008-08-19 09:11:59 +00:00
|
|
|
|
|
|
|
/** zoom the ruler and view windows
|
|
|
|
*/
|
2014-10-23 17:41:47 +02:00
|
|
|
void zoom(const Fraction& _aZoom);
|
2008-08-19 09:11:59 +00:00
|
|
|
|
2008-12-01 12:31:27 +00:00
|
|
|
void scrollChildren(long _nThumbPosX);
|
2008-08-19 09:11:59 +00:00
|
|
|
};
|
2014-02-25 19:49:46 +01:00
|
|
|
|
2008-08-19 09:11:59 +00:00
|
|
|
} // rptui
|
2014-02-25 19:49:46 +01:00
|
|
|
|
2014-04-18 18:54:04 +02:00
|
|
|
#endif // INCLUDED_REPORTDESIGN_SOURCE_UI_INC_SECTIONWINDOW_HXX
|
2008-08-19 09:11:59 +00:00
|
|
|
|
2010-10-27 12:33:13 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|