LibreOffice Module reportdesign (master)  1
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
rptui::OReportController Class Reference

#include <ReportController.hxx>

Inheritance diagram for rptui::OReportController:
[legend]
Collaboration diagram for rptui::OReportController:
[legend]

Public Member Functions

void shrinkSection (const char *pUndoStrId, const css::uno::Reference< css::report::XSection > &_xSection, sal_Int32 _nShrinkId)
 
void insertGraphic ()
 opens the file open dialog to allow the user to select an image which will be bound to a newly created image button. More...
 
void createNewFunction (const css::uno::Any &_aValue)
 creates a new function in the given value context More...
 
void addPairControls (const css::uno::Sequence< css::beans::PropertyValue > &aArgs)
 inserts a label - field pair into the current selected section More...
 
void createPageNumber (const css::uno::Sequence< css::beans::PropertyValue > &_aArgs)
 inserts a label - field combination to show the page number and/or page count More...
 
void createDateTime (const css::uno::Sequence< css::beans::PropertyValue > &_aArgs)
 creates a formatted field with TODAY() function and if set also a NOW() function More...
 
OSectionViewgetCurrentSectionView () const
 gets the current section (SdrView) More...
 
void changeZOrder (sal_Int32 _nId)
 change the ZOrder of a current select object. More...
 
void markSection (const bool _bNext)
 marks the next or previous section, when the first/last section was already selected then the report will be selected. More...
 
void collapseSection (const bool _bCollapse)
 collapse or expand the currently selected section. More...
 
void checkChartEnabled ()
 fills the member that chart is enabled or not More...
 
void impl_zoom_nothrow ()
 set the zoom factor at the design view More...
 
virtual void impl_onModifyChanged () override
 
virtual void onLoadedMenu (const css::uno::Reference< css::frame::XLayoutManager > &_xLayoutManager) override
 
virtual void impl_initialize () override
 
bool isUiVisible () const
 
void createDefaultControl (const css::uno::Sequence< css::beans::PropertyValue > &_aArgs)
 creates a new default control for the currently set type when the modifier KEY_MOD1 was pressed More...
 
void impl_fillState_nothrow (const OUString &_sProperty, dbaui::FeatureState &_rState) const
 fills the state for the feature request. More...
 
void impl_fillCustomShapeState_nothrow (const char *_pCustomShapeType, dbaui::FeatureState &_rState) const
 
bool impl_setPropertyAtControls_throw (const char *pUndoResId, const OUString &_sProperty, const css::uno::Any &_aValue, const css::uno::Sequence< css::beans::PropertyValue > &_aArgs)
 set the property at all selected controls. More...
 
void OnInvalidateClipboard ()
 
 DECL_LINK (OnClipboardChanged, TransferableDataHelper *, void)
 
 DECL_LINK (OnExecuteReport, void *, void)
 
virtual void describeSupportedFeatures () override
 
virtual dbaui::FeatureState GetState (sal_uInt16 nId) const override
 
virtual void Execute (sal_uInt16 nId, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
 
virtual void getPropertyDefaultByHandle (sal_Int32 _nHandle, css::uno::Any &_rDefault) const override
 
virtual void SAL_CALL setFastPropertyValue_NoBroadcast (sal_Int32 nHandle, const css::uno::Any &rValue) override
 
 OReportController (css::uno::Reference< css::uno::XComponentContext > const &the_context)
 
 OReportController (const OReportController &)=delete
 
OReportControlleroperator= (const OReportController &)=delete
 
 DECL_LINK (OnCreateHdl, OAddFieldWindow &, void)
 
virtual void Notify (SfxBroadcaster &rBc, SfxHint const &rHint) override
 
virtual bool Construct (vcl::Window *pParent) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
virtual sal_Bool SAL_CALL suspend (sal_Bool bSuspend) override
 
virtual void SAL_CALL disposing () override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual void SAL_CALL elementInserted (const css::container::ContainerEvent &Event) override
 
virtual void SAL_CALL elementRemoved (const css::container::ContainerEvent &Event) override
 
virtual void SAL_CALL elementReplaced (const css::container::ContainerEvent &Event) override
 
virtual void SAL_CALL propertyChange (const css::beans::PropertyChangeEvent &evt) override
 
virtual sal_Bool SAL_CALL select (const css::uno::Any &xSelection) override
 
virtual css::uno::Any SAL_CALL getSelection () override
 
virtual void SAL_CALL addSelectionChangeListener (const css::uno::Reference< css::view::XSelectionChangeListener > &xListener) override
 
virtual void SAL_CALL removeSelectionChangeListener (const css::uno::Reference< css::view::XSelectionChangeListener > &xListener) override
 
virtual sal_Bool SAL_CALL attachModel (const css::uno::Reference< css::frame::XModel > &xModel) override
 
virtual css::uno::Any SAL_CALL getViewData () override
 
virtual void SAL_CALL restoreViewData (const css::uno::Any &Data) override
 
const css::uno::Reference< css::report::XReportDefinition > & getReportDefinition () const
 gives access to the report definition More...
 
virtual css::uno::Reference< css::frame::XModel > SAL_CALL getModel () override
 
virtual OUString SAL_CALL getTitle () override
 
virtual void SAL_CALL setMode (const OUString &aMode) override
 
virtual OUString SAL_CALL getMode () override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedModes () override
 
virtual sal_Bool SAL_CALL supportsMode (const OUString &aMode) override
 
virtual void SAL_CALL setVisualAreaSize (::sal_Int64 nAspect, const css::awt::Size &aSize) override
 
virtual css::awt::Size SAL_CALL getVisualAreaSize (::sal_Int64 nAspect) override
 
virtual css::embed::VisualRepresentation SAL_CALL getPreferredVisualRepresentation (::sal_Int64 nAspect) override
 
virtual ::sal_Int32 SAL_CALL getMapUnit (::sal_Int64 nAspect) override
 
sal_Int32 getSplitPos () const
 returns the current position of the splitter More...
 
void setSplitPos (sal_Int32 _nSplitPos)
 
css::uno::Reference< css::frame::XModel > executeReport ()
 creates a new report from the report definition. More...
 
css::uno::Reference< css::sdbc::XRowSet > const & getRowSet ()
 returns the RowSet which reflects the current settings of the report definition More...
 
const css::uno::Reference< css::util::XNumberFormatter > & getReportNumberFormatter () const
 returns the number formatter More...
 
const std::shared_ptr< rptui::OReportModel > & getSdrModel () const
 return the SdrModel of the real model More...
 
const css::uno::Reference< css::uno::XComponentContext > & getContext () const
 
sal_Int16 getZoomValue () const
 
void resetZoomType ()
 
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo () override
 
virtual ::cppu::IPropertyArrayHelpercreateArrayHelper () const override
 
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper () override
 
OSectionWindowgetSectionWindow (const css::uno::Reference< css::report::XSection > &_xSection) const
 
css::uno::Reference< css::container::XNameAccess > const & getColumns () const
 
OUString getColumnLabel_throw (const OUString &i_sColumnName) const
 
SfxUndoManagergetUndoManager () const
 
void clearUndoManager () const
 
void addUndoAction (std::unique_ptr< SfxUndoAction > i_pAction)
 
- Public Member Functions inherited from dbaui::DBSubComponentController
bool isReadOnly () const
 
bool isEditable () const
 
void setEditable (bool _bEditable)
 
bool isConnected () const
 
css::uno::Reference< css::sdbc::XDatabaseMetaData > getMetaData () const
 
OUString getDataSourceName () const
 
const css::uno::Reference< css::beans::XPropertySet > & getDataSource () const
 
bool haveDataSource () const
 
css::uno::Reference< css::frame::XModel > getDatabaseDocument () const
 
const ::dbtools::DatabaseMetaDatagetSdbMetaData () const
 
void appendError (const OUString &_rErrorMessage)
 
void clearError ()
 
bool hasError () const
 
const ::dbtools::SQLExceptionInfogetError () const
 
void displayError ()
 
void connectionLostMessage () const
 
const css::uno::Reference< css::sdbc::XConnection > & getConnection () const
 
css::uno::Reference< css::util::XNumberFormatter > const & getNumberFormatter () const
 
virtual css::uno::Reference< css::document::XEmbeddedScripts > SAL_CALL getScriptContainer () override
 
virtual sal_Bool SAL_CALL isModified () override
 
virtual void SAL_CALL setModified (sal_Bool bModified) override
 
virtual void SAL_CALL addModifyListener (const css::uno::Reference< css::util::XModifyListener > &aListener) override
 
virtual void SAL_CALL removeModifyListener (const css::uno::Reference< css::util::XModifyListener > &aListener) override
 
- Public Member Functions inherited from cppu::ImplHelper5< class, class, class, class, class >
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () SAL_OVERRIDE
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () SAL_OVERRIDE
 
- Public Member Functions inherited from SfxListener
 SfxListener ()
 
 SfxListener (const SfxListener &rCopy)
 
virtual ~SfxListener () COVERITY_NOEXCEPT_FALSE
 
void StartListening (SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
 
void EndListening (SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
 
void EndListeningAll ()
 
bool IsListening (SfxBroadcaster &rBroadcaster) const
 
sal_uInt16 GetBroadcasterCount () const
 
SfxBroadcasterGetBroadcasterJOE (sal_uInt16 nNo) const
 
virtual void Notify (SfxBroadcaster &rBC, const SfxHint &rHint)
 
void RemoveBroadcaster_Impl (SfxBroadcaster &rBC)
 
- Public Member Functions inherited from comphelper::OPropertyContainer
virtual ~OPropertyContainer ()
 
- Public Member Functions inherited from comphelper::OPropertyArrayUsageHelper< OReportController_BASE >
 OPropertyArrayUsageHelper ()
 
virtual ~OPropertyArrayUsageHelper ()
 
::cppu::IPropertyArrayHelpergetArrayHelper ()
 

Static Public Member Functions

static bool isFormatCommandEnabled (sal_uInt16 _nCommand, const css::uno::Reference< css::report::XReportControlFormat > &_xControlFormat)
 returns <TRUE> when the command is enabled More...
 

Private Member Functions

ODesignViewgetDesignView () const
 
void createControl (const css::uno::Sequence< css::beans::PropertyValue > &_aArgs, const css::uno::Reference< css::report::XSection > &_xSection, const OUString &_sFunction, sal_uInt16 _nObjectId=OBJ_DLG_FORMATTEDFIELD)
 creates a formatted field in the given section with the given formula as data field More...
 
void switchReportSection (const sal_Int16 _nId)
 switch the report header/footer sectionon off with undo or without depending on the given id. More...
 
void switchPageSection (const sal_Int16 _nId)
 switch the report header/footer sectionon off with undo or without depending on the given id. More...
 
void modifyGroup (const bool _bAppend, const css::uno::Sequence< css::beans::PropertyValue > &_aArgs)
 append a new group or remove it with undo. More...
 
void createGroupSection (const bool _bUndo, const bool _bHeader, const css::uno::Sequence< css::beans::PropertyValue > &_aArgs)
 creates a group section. More...
 
void listen (const bool _bAdd)
 add or remove me as listener at the report definition More...
 
void openPageDialog (const css::uno::Reference< css::report::XSection > &_xSection)
 opens the common page dialog More...
 
void openSortingAndGroupingDialog ()
 opens or hides the sorting and grouping dialog More...
 
void openZoomDialog ()
 opens the zoom dialog More...
 
sal_Int32 getGroupPosition (const css::uno::Reference< css::report::XGroup > &_xGroup)
 returns the position of the group inside the groups collection More...
 
void notifyGroupSections (const css::container::ContainerEvent &_rEvent, bool _bShow)
 calls propertyChanged when the header or footer is really turned on. More...
 
void groupChange (const css::uno::Reference< css::report::XGroup > &_xGroup, const OUString &_sPropName, sal_Int32 _nGroupPos, bool _bShow)
 change the sections for a group More...
 
void executeMethodWithUndo (const char *pUndoStrId, const ::std::function< void(ODesignView *)> &_pMemfun)
 
void alignControlsWithUndo (const char *pUndoStrId, ControlModification _nControlModification, bool _bAlignAtSection=false)
 
css::uno::Reference< css::frame::XFrame > getXFrame ()
 
virtual ~OReportController () override
 

Static Private Member Functions

static void shrinkSectionBottom (const css::uno::Reference< css::report::XSection > &_xSection)
 shrink a section More...
 
static void shrinkSectionTop (const css::uno::Reference< css::report::XSection > &_xSection)
 

Private Attributes

::comphelper::OInterfaceContainerHelper2 m_aSelectionListeners
 
css::uno::Sequence< css::beans::PropertyValue > m_aCollapsedSections
 
TransferableDataHelper m_aSystemClipboard
 
rtl::Reference< TransferableClipboardListenerm_pClipboardNotifier
 
std::shared_ptr< OGroupsSortingDialogm_xGroupsFloater
 notifier for changes in the clipboard More...
 
rtl::Reference< OXReportControllerObserverm_pReportControllerObserver
 
css::uno::Reference< css::report::XReportDefinition > m_xReportDefinition
 
css::uno::Reference< css::report::XReportEngine > m_xReportEngine
 
css::uno::Reference< css::frame::XDesktop2 > m_xFrameLoader
 
css::uno::Reference< css::sdbc::XRowSet > m_xRowSet
 
css::uno::Reference< css::beans::XPropertyChangeListener > m_xRowSetMediator
 
css::uno::Reference< css::util::XNumberFormatter > m_xFormatter
 
css::uno::Reference< css::lang::XComponent > m_xHoldAlive
 
css::uno::Reference< css::container::XNameAccess > m_xColumns
 
css::awt::Size m_aVisualAreaSize
 
std::shared_ptr< rptui::OReportModelm_aReportModel
 
OUString m_sName
 
OUString m_sLastActivePage
 name for the report definition More...
 
OUString m_sMode
 last active property browser page More...
 
sal_Int32 m_nSplitPos
 the current mode of the controller More...
 
sal_Int32 m_nPageNum
 the position of the splitter More...
 
sal_Int32 m_nSelectionCount
 the page number from the restoreView call More...
 
::sal_Int64 m_nAspect
 
sal_Int16 m_nZoomValue
 
SvxZoomType m_eZoomType
 
bool m_bShowRuler
 
bool m_bGridVisible
 
bool m_bGridUse
 
bool m_bShowProperties
 
bool m_bHelplinesMove
 
bool m_bChartEnabled
 
bool m_bChartEnabledAsked
 
bool m_bInGeneratePreview
 

Additional Inherited Members

- Protected Member Functions inherited from dbaui::DBSubComponentController
virtual css::uno::Reference< css::frame::XModel > getPrivateModel () const override
 
bool impl_isModified () const
 
 DBSubComponentController (const css::uno::Reference< css::uno::XComponentContext > &_rxORB)
 
virtual ~DBSubComponentController () override
 
void disconnect ()
 
virtual void reconnect (bool _bUI)
 
bool ensureConnected ()
 
virtual void losingConnection ()
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &_rType) override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 
sal_Int32 getCurrentStartNumber () const
 
- Protected Member Functions inherited from cppu::ImplHelper5< class, class, class, class, class >
 ~ImplHelper5 ()
 
- Protected Member Functions inherited from comphelper::OPropertyStateContainer
 OPropertyStateContainer (::cppu::OBroadcastHelper &_rBHelper)
 
virtual css::beans::PropertyState SAL_CALL getPropertyState (const OUString &PropertyName) override
 
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates (const css::uno::Sequence< OUString > &aPropertyName) override
 
virtual void SAL_CALL setPropertyToDefault (const OUString &PropertyName) override
 
virtual css::uno::Any SAL_CALL getPropertyDefault (const OUString &aPropertyName) override
 
css::beans::PropertyState getPropertyStateByHandle (sal_Int32 _nHandle) const
 
void setPropertyToDefaultByHandle (sal_Int32 _nHandle)
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &_rType) override
 
sal_Int32 getHandleForName (const OUString &_rPropertyName)
 
- Protected Member Functions inherited from comphelper::OPropertyContainer
 OPropertyContainer (::cppu::OBroadcastHelper &_rBHelper)
 
virtual sal_Bool SAL_CALL convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
 
virtual void SAL_CALL getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const override
 
- Protected Member Functions inherited from comphelper::OPropertyContainerHelper
 OPropertyContainerHelper ()
 
 ~OPropertyContainerHelper ()
 
void registerProperty (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void *_pPointerToMember, const css::uno::Type &_rMemberType)
 
void registerMayBeVoidProperty (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, css::uno::Any *_pPointerToMember, const css::uno::Type &_rExpectedType)
 
void registerPropertyNoMember (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const css::uno::Type &_rType, css::uno::Any const &_pInitialValue)
 
void revokeProperty (sal_Int32 _nHandle)
 
bool isRegisteredProperty (sal_Int32 _nHandle) const
 
bool isRegisteredProperty (const OUString &_rName) const
 
bool convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue)
 
void setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue)
 
void getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const
 
void describeProperties (css::uno::Sequence< css::beans::Property > &_rProps) const
 
const css::beans::Property & getProperty (const OUString &_rName) const
 
- Static Protected Member Functions inherited from comphelper::OPropertyContainer
static css::uno::Sequence< css::uno::Type > getBaseTypes ()
 
- Static Protected Attributes inherited from comphelper::OPropertyArrayUsageHelper< OReportController_BASE >
static sal_Int32 s_nRefCount
 
::cppu::IPropertyArrayHelpers_pProps
 

Detailed Description

Definition at line 73 of file ReportController.hxx.

Constructor & Destructor Documentation

OReportController::~OReportController ( )
overrideprivatevirtual

Definition at line 277 of file ReportController.cxx.

rptui::OReportController::OReportController ( css::uno::Reference< css::uno::XComponentContext > const &  the_context)
explicit
rptui::OReportController::OReportController ( const OReportController )
delete

Member Function Documentation

void OReportController::addPairControls ( const css::uno::Sequence< css::beans::PropertyValue > &  aArgs)
void SAL_CALL OReportController::addSelectionChangeListener ( const css::uno::Reference< css::view::XSelectionChangeListener > &  xListener)
overridevirtual

Definition at line 3077 of file ReportController.cxx.

void OReportController::addUndoAction ( std::unique_ptr< SfxUndoAction i_pAction)

Definition at line 4365 of file ReportController.cxx.

void OReportController::alignControlsWithUndo ( const char *  pUndoStrId,
ControlModification  _nControlModification,
bool  _bAlignAtSection = false 
)
private

Definition at line 2594 of file ReportController.cxx.

References RptResId().

sal_Bool SAL_CALL OReportController::attachModel ( const css::uno::Reference< css::frame::XModel > &  xModel)
overridevirtual

Reimplemented from dbaui::DBSubComponentController.

Definition at line 2524 of file ReportController.cxx.

References getMutex().

void OReportController::changeZOrder ( sal_Int32  _nId)

change the ZOrder of a current select object.

Parameters
_nIdThe command ID about what to do.

Definition at line 3636 of file ReportController.cxx.

References SdrEditView::MovMarkedToBtm(), SdrEditView::MovMarkedToTop(), SdrEditView::PutMarkedToBtm(), SdrEditView::PutMarkedToTop(), rptui::RPT_LAYER_BACK(), rptui::RPT_LAYER_FRONT(), and rptui::OSectionView::SetMarkedToLayer().

void OReportController::checkChartEnabled ( )
void OReportController::clearUndoManager ( ) const

Definition at line 4359 of file ReportController.cxx.

void OReportController::collapseSection ( const bool  _bCollapse)

collapse or expand the currently selected section.

Parameters
_bCollapsecollapse if sal_True otherwise expand

Definition at line 3937 of file ReportController.cxx.

References rptui::OSectionWindow::setCollapsed().

bool OReportController::Construct ( vcl::Window pParent)
overridevirtual
cppu::IPropertyArrayHelper * OReportController::createArrayHelper ( ) const
overridevirtual
void OReportController::createControl ( const css::uno::Sequence< css::beans::PropertyValue > &  _aArgs,
const css::uno::Reference< css::report::XSection > &  _xSection,
const OUString &  _sFunction,
sal_uInt16  _nObjectId = OBJ_DLG_FORMATTEDFIELD 
)
private
void OReportController::createDateTime ( const css::uno::Sequence< css::beans::PropertyValue > &  _aArgs)
void OReportController::createDefaultControl ( const css::uno::Sequence< css::beans::PropertyValue > &  _aArgs)

creates a new default control for the currently set type when the modifier KEY_MOD1 was pressed

Parameters
_aArgsmust contain a propertyvalue with name "KeyModifier" and value KEY_MOD1 when control should be created.

Definition at line 3966 of file ReportController.cxx.

References KEY_MOD1, and x.

void OReportController::createGroupSection ( const bool  _bUndo,
const bool  _bHeader,
const css::uno::Sequence< css::beans::PropertyValue > &  _aArgs 
)
private

creates a group section.

Parameters
_bUndotrue when undo action should be created
_bHeadertrue when it is a header otherwise it is a footer
_aArgsThe args which contains an element named PROPERTY_GROUP of type report::XGroup.

Definition at line 3907 of file ReportController.cxx.

References aLock, aMap, comphelper::SequenceAsHashMap::getUnpackedValueOrDefault(), rptui::Inserted, PROPERTY_FOOTERON, PROPERTY_GROUP, PROPERTY_HEADERON, and rptui::Removed.

void OReportController::createNewFunction ( const css::uno::Any &  _aValue)

creates a new function in the given value context

Parameters
_aValuecontains a XNameContainer

Definition at line 3087 of file ReportController.cxx.

References m_xContext, and RptResId().

void OReportController::createPageNumber ( const css::uno::Sequence< css::beans::PropertyValue > &  _aArgs)

inserts a label - field combination to show the page number and/or page count

Parameters
_aArgs

Definition at line 3269 of file ReportController.cxx.

References aMap, comphelper::SequenceAsHashMap::getUnpackedValueOrDefault(), PROPERTY_PAGEHEADERON, PROPERTY_STATE, and RptResId().

rptui::OReportController::DECL_LINK ( OnClipboardChanged  ,
TransferableDataHelper ,
void   
)
rptui::OReportController::DECL_LINK ( OnExecuteReport  ,
void ,
void   
)
rptui::OReportController::DECL_LINK ( OnCreateHdl  ,
OAddFieldWindow ,
void   
)
void OReportController::describeSupportedFeatures ( )
overridevirtual

Definition at line 1774 of file ReportController.cxx.

virtual void SAL_CALL rptui::OReportController::disposing ( const css::lang::EventObject &  Source)
overridevirtual

Reimplemented from dbaui::DBSubComponentController.

virtual void SAL_CALL rptui::OReportController::disposing ( )
overridevirtual

Reimplemented from dbaui::DBSubComponentController.

void SAL_CALL OReportController::elementInserted ( const css::container::ContainerEvent &  Event)
overridevirtual

Definition at line 2132 of file ReportController.cxx.

void SAL_CALL OReportController::elementRemoved ( const css::container::ContainerEvent &  Event)
overridevirtual

Definition at line 2137 of file ReportController.cxx.

void SAL_CALL OReportController::elementReplaced ( const css::container::ContainerEvent &  Event)
overridevirtual

Definition at line 2142 of file ReportController.cxx.

References getMutex().

void OReportController::Execute ( sal_uInt16  nId,
const css::uno::Sequence< css::beans::PropertyValue > &  aArgs 
)
overridevirtual
void OReportController::executeMethodWithUndo ( const char *  pUndoStrId,
const ::std::function< void(ODesignView *)> &  _pMemfun 
)
private

Definition at line 2586 of file ReportController.cxx.

References RptResId().

uno::Reference< frame::XModel > OReportController::executeReport ( )

creates a new report from the report definition.

Returns
The model or <NULL> if the model could not be created.

Definition at line 2836 of file ReportController.cxx.

References cppu::getCaughtException(), getConnection(), SdrObjList::GetObjCount(), i, dbtools::SQLExceptionInfo::isValid(), m_xContext, nCount, dbtools::SQLExceptionInfo::prepend(), RptResId(), showError(), xFrame, and xModel.

OUString OReportController::getColumnLabel_throw ( const OUString &  i_sColumnName) const

Definition at line 4330 of file ReportController.cxx.

References PROPERTY_LABEL, and xColumn.

Referenced by rptui::OSectionWindow::setGroupSectionTitle().

uno::Reference< container::XNameAccess > const & OReportController::getColumns ( ) const
const css::uno::Reference< css::uno::XComponentContext >& rptui::OReportController::getContext ( ) const
inline

Definition at line 423 of file ReportController.hxx.

References m_xContext.

OSectionView * OReportController::getCurrentSectionView ( ) const

gets the current section (SdrView)

Returns
the currently selected section or <NULL> if no one is selected

Definition at line 3627 of file ReportController.cxx.

References rptui::OSectionWindow::getReportSection(), and rptui::OReportSection::getSectionView().

ODesignView* rptui::OReportController::getDesignView ( ) const
inlineprivate

Definition at line 91 of file ReportController.hxx.

References getView().

sal_Int32 OReportController::getGroupPosition ( const css::uno::Reference< css::report::XGroup > &  _xGroup)
private

returns the position of the group inside the groups collection

Definition at line 2561 of file ReportController.cxx.

References rptui::getPositionInIndexAccess().

OUString SAL_CALL OReportController::getImplementationName ( )
overridevirtual

Definition at line 236 of file ReportController.cxx.

cppu::IPropertyArrayHelper &SAL_CALL OReportController::getInfoHelper ( )
override
sal_Int32 SAL_CALL OReportController::getMapUnit ( ::sal_Int64  nAspect)
override

Definition at line 4316 of file ReportController.cxx.

OUString SAL_CALL OReportController::getMode ( )
overridevirtual

Definition at line 4060 of file ReportController.cxx.

References getMutex().

uno::Reference< frame::XModel > SAL_CALL OReportController::getModel ( )
overridevirtual

Definition at line 2952 of file ReportController.cxx.

Referenced by rptui::DlgEdFuncInsert::MouseButtonUp().

embed::VisualRepresentation SAL_CALL OReportController::getPreferredVisualRepresentation ( ::sal_Int64  nAspect)
overridevirtual

Definition at line 4278 of file ReportController.cxx.

References getConnection(), getMutex(), m_xContext, and MAX_ROWS_FOR_PREVIEW.

void OReportController::getPropertyDefaultByHandle ( sal_Int32  _nHandle,
css::uno::Any &  _rDefault 
) const
overridevirtual

Implements comphelper::OPropertyStateContainer.

Definition at line 4027 of file ReportController.cxx.

virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL rptui::OReportController::getPropertySetInfo ( )
inlineoverridevirtual

Definition at line 428 of file ReportController.hxx.

References getInfoHelper().

const css::uno::Reference< css::report::XReportDefinition>& rptui::OReportController::getReportDefinition ( ) const
inline

gives access to the report definition

Returns
the report definition object, may be <NULL>

Definition at line 372 of file ReportController.hxx.

References m_xReportDefinition.

Referenced by rptui::OViewsWindow::EndDragObj(), rptui::OReportWindow::OReportWindow(), rptui::OReportWindow::Resize(), and rptui::ODesignView::toggleAddField().

const css::uno::Reference< css::util::XNumberFormatter >& rptui::OReportController::getReportNumberFormatter ( ) const
inline

returns the number formatter

Definition at line 415 of file ReportController.hxx.

References m_xFormatter.

Referenced by rptui::ODateTimeDialog::getFormatStringByKey(), and rptui::ODateTimeDialog::InsertEntry().

uno::Reference< sdbc::XRowSet > const & OReportController::getRowSet ( )

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.

Definition at line 2957 of file ReportController.cxx.

References DBG_UNHANDLED_EXCEPTION, getConnection(), PROPERTY_ACTIVECONNECTION, PROPERTY_APPLYFILTER, PROPERTY_COMMAND, PROPERTY_COMMANDTYPE, PROPERTY_ESCAPEPROCESSING, and PROPERTY_FILTER.

Referenced by rptui::ODesignView::toggleAddField().

const std::shared_ptr<rptui::OReportModel>& rptui::OReportController::getSdrModel ( ) const
inline

return the SdrModel of the real model

Returns

Definition at line 421 of file ReportController.hxx.

References m_aReportModel.

Referenced by rptui::FormattedFieldBeautifier::getVclWindowPeer(), and rptui::FixedTextColor::getXControl().

OSectionWindow * OReportController::getSectionWindow ( const css::uno::Reference< css::report::XSection > &  _xSection) const
Any SAL_CALL OReportController::getSelection ( )
overridevirtual

Definition at line 3064 of file ReportController.cxx.

References getMutex(), and uno::Any::hasValue().

sal_Int32 rptui::OReportController::getSplitPos ( ) const
inline

returns the current position of the splitter

Returns

Definition at line 397 of file ReportController.hxx.

References m_nSplitPos.

FeatureState OReportController::GetState ( sal_uInt16  nId) const
overridevirtual
css::uno::Sequence< OUString > SAL_CALL OReportController::getSupportedModes ( )
overridevirtual

Definition at line 4065 of file ReportController.cxx.

Sequence< OUString > SAL_CALL OReportController::getSupportedServiceNames ( )
overridevirtual

Definition at line 241 of file ReportController.cxx.

OUString SAL_CALL OReportController::getTitle ( )
overridevirtual

Reimplemented from dbaui::DBSubComponentController.

Definition at line 4017 of file ReportController.cxx.

References getMutex().

SfxUndoManager & OReportController::getUndoManager ( ) const
uno::Any SAL_CALL OReportController::getViewData ( )
overridevirtual
awt::Size SAL_CALL OReportController::getVisualAreaSize ( ::sal_Int64  nAspect)
overridevirtual

Definition at line 4272 of file ReportController.cxx.

References getMutex().

Reference< XFrame > OReportController::getXFrame ( )
private

Definition at line 2824 of file ReportController.cxx.

References m_xContext, m_xFrameLoader, and xFrame.

sal_Int16 rptui::OReportController::getZoomValue ( ) const
inline

Definition at line 424 of file ReportController.hxx.

References m_nZoomValue.

void OReportController::groupChange ( const css::uno::Reference< css::report::XGroup > &  _xGroup,
const OUString &  _sPropName,
sal_Int32  _nGroupPos,
bool  _bShow 
)
private

change the sections for a group

Parameters
_sPropNamethe header or footer
_xGroupthe group
_nGroupPosthe position of the group inside the groups collection or the previous index when it was removed
_bShowwhen <TRUE> the header and footer will be shown otherwise not

Definition at line 2270 of file ReportController.cxx.

References DBGROUPFOOTER, DBGROUPHEADER, lcl_getNonVisibleGroupsBefore(), PROPERTY_FOOTERON, and PROPERTY_HEADERON.

void OReportController::impl_fillCustomShapeState_nothrow ( const char *  _pCustomShapeType,
dbaui::FeatureState _rState 
) const
void OReportController::impl_fillState_nothrow ( const OUString &  _sProperty,
dbaui::FeatureState _rState 
) const

fills the state for the feature request.

Parameters
_sPropertythe property which should be filled in the value
_rStatethe state to fill

Definition at line 4080 of file ReportController.cxx.

References dbaui::FeatureState::aValue, and dbaui::FeatureState::bEnabled.

void OReportController::impl_initialize ( )
overridevirtual
void OReportController::impl_onModifyChanged ( )
overridevirtual

Reimplemented from dbaui::DBSubComponentController.

Definition at line 2047 of file ReportController.cxx.

References DBG_UNHANDLED_EXCEPTION.

bool OReportController::impl_setPropertyAtControls_throw ( const char *  pUndoResId,
const OUString &  _sProperty,
const css::uno::Any &  _aValue,
const css::uno::Sequence< css::beans::PropertyValue > &  _aArgs 
)

set the property at all selected controls.

Returns
<TRUE> when the selection is not empty

Definition at line 4156 of file ReportController.cxx.

References lcl_getReportControlFormat(), RptResId(), and TOOLS_WARN_EXCEPTION.

void OReportController::impl_zoom_nothrow ( )

set the zoom factor at the design view

Definition at line 4116 of file ReportController.cxx.

References rptui::setZoomFactor().

void OReportController::insertGraphic ( )
bool OReportController::isFormatCommandEnabled ( sal_uInt16  _nCommand,
const css::uno::Reference< css::report::XReportControlFormat > &  _xControlFormat 
)
static

returns <TRUE> when the command is enabled

Parameters
_nCommandthe command id
_xControlFormatthe report control format

Definition at line 4125 of file ReportController.cxx.

Referenced by rptui::Condition::updateToolbar().

bool OReportController::isUiVisible ( ) const

Definition at line 4075 of file ReportController.cxx.

void OReportController::listen ( const bool  _bAdd)
private
void OReportController::markSection ( const bool  _bNext)

marks the next or previous section, when the first/last section was already selected then the report will be selected.

Parameters
_bNext

Definition at line 3946 of file ReportController.cxx.

References rptui::OSectionWindow::getReportSection(), rptui::OReportSection::getSection(), rptui::POST, and rptui::PREVIOUS.

void OReportController::modifyGroup ( const bool  _bAppend,
const css::uno::Sequence< css::beans::PropertyValue > &  _aArgs 
)
private

append a new group or remove it with undo.

Parameters
_bAppend
_aArgsThe args which contains an element named PROPERTY_GROUP of type report::XGroup.

Definition at line 3863 of file ReportController.cxx.

References rptui::OXUndoEnvironment::AddElement(), aLock, aMap, DBG_UNHANDLED_EXCEPTION, Exception, comphelper::SequenceAsHashMap::getUnpackedValueOrDefault(), rptui::Inserted, nPos, PROPERTY_GROUP, PROPERTY_POSITIONY, rptui::Removed, and rptui::OXUndoEnvironment::RemoveElement().

void OReportController::Notify ( SfxBroadcaster rBc,
SfxHint const &  rHint 
)
overridevirtual
void OReportController::notifyGroupSections ( const css::container::ContainerEvent &  _rEvent,
bool  _bShow 
)
private

calls propertyChanged when the header or footer is really turned on.

Parameters
_rEventthe group
_bShowwhen <TRUE> the header and footer will be shown otherwise not

Definition at line 2083 of file ReportController.cxx.

References getMutex(), PROPERTY_FOOTERON, and PROPERTY_HEADERON.

void OReportController::OnInvalidateClipboard ( )

Definition at line 2318 of file ReportController.cxx.

void OReportController::onLoadedMenu ( const css::uno::Reference< css::frame::XLayoutManager > &  _xLayoutManager)
overridevirtual

Definition at line 2061 of file ReportController.cxx.

References i, and u.

void OReportController::openPageDialog ( const css::uno::Reference< css::report::XSection > &  _xSection)
private

opens the common page dialog

Definition at line 2325 of file ReportController.cxx.

References aItemInfos, COL_BLACK, COL_DEFAULT_SHAPE_FILLING, COL_DEFAULT_SHAPE_STROKE, COL_TRANSPARENT(), COL_WHITE, DBG_UNHANDLED_EXCEPTION, Exception, SfxItemPool::Free(), SfxItemPool::FreezeIdRanges(), SfxItemSet::GetItemState(), SvtSysLocale::GetLocaleData(), LocaleDataWrapper::getMeasurementSystemEnum(), SvxPageItem::GetNumType(), rptui::getUsedStyle(), SvxPageItem::IsLandscape(), MID_L_MARGIN, MID_PAGE_LAYOUT, MID_R_MARGIN, PAPER_A4, PAPER_E, PROPERTY_BACKCOLOR, PROPERTY_BACKTRANSPARENT, PROPERTY_BOTTOMMARGIN, PROPERTY_ISLANDSCAPE, PROPERTY_LEFTMARGIN, PROPERTY_NUMBERINGTYPE, PROPERTY_PAGESTYLELAYOUT, PROPERTY_PAPERSIZE, PROPERTY_RIGHTMARGIN, PROPERTY_TOPMARGIN, SvxPageItem::PutValue(), SvxPageItem::QueryValue(), RET_OK, RptResId(), RPTUI_ID_BRUSH, RPTUI_ID_END, RPTUI_ID_LRSPACE, RPTUI_ID_METRIC, RPTUI_ID_PAGE, RPTUI_ID_PAGE_MODE, RPTUI_ID_SIZE, RPTUI_ID_START, RPTUI_ID_ULSPACE, SfxItemPool::SetDefaultMetric(), SfxItemPool::SetDefaults(), SvxPageItem::SetDescName(), SvxPageItem::SetLandscape(), SvxPageItem::SetNumType(), SVX_PAGE_MODE_STANDARD, VCLSize(), XATTR_FILL_LAST(), XATTR_FILLBACKGROUND(), XATTR_FILLBITMAP(), XATTR_FILLBMP_POS(), XATTR_FILLBMP_POSOFFSETX(), XATTR_FILLBMP_POSOFFSETY(), XATTR_FILLBMP_SIZELOG(), XATTR_FILLBMP_SIZEX(), XATTR_FILLBMP_SIZEY(), XATTR_FILLBMP_STRETCH(), XATTR_FILLBMP_TILE(), XATTR_FILLBMP_TILEOFFSETX(), XATTR_FILLBMP_TILEOFFSETY(), XATTR_FILLCOLOR(), XATTR_FILLFLOATTRANSPARENCE(), XATTR_FILLGRADIENT(), XATTR_FILLHATCH(), XATTR_FILLSTYLE(), XATTR_FILLTRANSPARENCE(), XATTR_GRADIENTSTEPCOUNT(), and XATTR_SECONDARYFILLCOLOR().

void OReportController::openSortingAndGroupingDialog ( )
private

opens or hides the sorting and grouping dialog

Definition at line 2541 of file ReportController.cxx.

References OUStringToOString(), RET_CANCEL, and weld::DialogController::runAsync().

void OReportController::openZoomDialog ( )
private
OReportController& rptui::OReportController::operator= ( const OReportController )
delete
void SAL_CALL OReportController::propertyChange ( const css::beans::PropertyChangeEvent &  evt)
overridevirtual
void SAL_CALL OReportController::removeSelectionChangeListener ( const css::uno::Reference< css::view::XSelectionChangeListener > &  xListener)
overridevirtual

Definition at line 3082 of file ReportController.cxx.

void rptui::OReportController::resetZoomType ( )
inline

Definition at line 425 of file ReportController.hxx.

void SAL_CALL OReportController::restoreViewData ( const css::uno::Any &  Data)
overridevirtual
sal_Bool SAL_CALL OReportController::select ( const css::uno::Any &  xSelection)
overridevirtual

Definition at line 3025 of file ReportController.cxx.

References getMutex().

void SAL_CALL OReportController::setFastPropertyValue_NoBroadcast ( sal_Int32  nHandle,
const css::uno::Any &  rValue 
)
overridevirtual

Reimplemented from comphelper::OPropertyContainer.

Definition at line 4047 of file ReportController.cxx.

References PROPERTY_ID_ZOOMVALUE.

void SAL_CALL OReportController::setMode ( const OUString &  aMode)
overridevirtual

Definition at line 4055 of file ReportController.cxx.

References getMutex().

void rptui::OReportController::setSplitPos ( sal_Int32  _nSplitPos)
inline

Definition at line 398 of file ReportController.hxx.

void SAL_CALL OReportController::setVisualAreaSize ( ::sal_Int64  nAspect,
const css::awt::Size &  aSize 
)
overridevirtual

Definition at line 4260 of file ReportController.cxx.

References getMutex().

void OReportController::shrinkSection ( const char *  pUndoStrId,
const css::uno::Reference< css::report::XSection > &  _xSection,
sal_Int32  _nShrinkId 
)

Definition at line 2670 of file ReportController.cxx.

References RptResId().

void OReportController::shrinkSectionBottom ( const css::uno::Reference< css::report::XSection > &  _xSection)
staticprivate

shrink a section

Parameters
pUndoStrIdthe string id of the string which is shown in undo menu
_nShrinkIdID of what you would like to shrink.

Definition at line 2602 of file ReportController.cxx.

References i, and nElements.

void OReportController::shrinkSectionTop ( const css::uno::Reference< css::report::XSection > &  _xSection)
staticprivate

Definition at line 2633 of file ReportController.cxx.

References i, and nElements.

sal_Bool SAL_CALL OReportController::supportsMode ( const OUString &  aMode)
overridevirtual

Definition at line 4069 of file ReportController.cxx.

References comphelper::findValue().

sal_Bool SAL_CALL OReportController::suspend ( sal_Bool  bSuspend)
overridevirtual

Reimplemented from dbaui::DBSubComponentController.

Definition at line 1759 of file ReportController.cxx.

References getMutex(), and getView().

void OReportController::switchPageSection ( const sal_Int16  _nId)
private

switch the report header/footer sectionon off with undo or without depending on the given id.

Parameters
_nIdCan either be SID_PAGEHEADER_WITHOUT_UNDO or SID_PAGEFOOTER_WITHOUT_UNDO or SID_PAGEHEADERFOOTER.

Definition at line 3816 of file ReportController.cxx.

References aLock, getView(), rptui::Inserted, rptui::Removed, and RptResId().

void OReportController::switchReportSection ( const sal_Int16  _nId)
private

switch the report header/footer sectionon off with undo or without depending on the given id.

Parameters
_nIdCan either be SID_REPORTHEADER_WITHOUT_UNDO or SID_REPORTFOOTER_WITHOUT_UNDO or SID_REPORTHEADERFOOTER.

Definition at line 3768 of file ReportController.cxx.

References aLock, getView(), rptui::Inserted, rptui::Removed, and RptResId().

Member Data Documentation

css::uno::Sequence< css::beans::PropertyValue> rptui::OReportController::m_aCollapsedSections
private

Definition at line 83 of file ReportController.hxx.

std::shared_ptr<rptui::OReportModel> rptui::OReportController::m_aReportModel
private

Definition at line 104 of file ReportController.hxx.

Referenced by getSdrModel().

::comphelper::OInterfaceContainerHelper2 rptui::OReportController::m_aSelectionListeners
private

Definition at line 81 of file ReportController.hxx.

TransferableDataHelper rptui::OReportController::m_aSystemClipboard
private

Definition at line 84 of file ReportController.hxx.

css::awt::Size rptui::OReportController::m_aVisualAreaSize
private

Definition at line 101 of file ReportController.hxx.

bool rptui::OReportController::m_bChartEnabled
private

Definition at line 119 of file ReportController.hxx.

bool rptui::OReportController::m_bChartEnabledAsked
private

Definition at line 120 of file ReportController.hxx.

bool rptui::OReportController::m_bGridUse
private

Definition at line 116 of file ReportController.hxx.

bool rptui::OReportController::m_bGridVisible
private

Definition at line 115 of file ReportController.hxx.

bool rptui::OReportController::m_bHelplinesMove
private

Definition at line 118 of file ReportController.hxx.

bool rptui::OReportController::m_bInGeneratePreview
private

Definition at line 121 of file ReportController.hxx.

bool rptui::OReportController::m_bShowProperties
private

Definition at line 117 of file ReportController.hxx.

bool rptui::OReportController::m_bShowRuler
private

Definition at line 114 of file ReportController.hxx.

SvxZoomType rptui::OReportController::m_eZoomType
private

Definition at line 113 of file ReportController.hxx.

::sal_Int64 rptui::OReportController::m_nAspect
private

Definition at line 111 of file ReportController.hxx.

sal_Int32 rptui::OReportController::m_nPageNum
private

the position of the splitter

Definition at line 109 of file ReportController.hxx.

sal_Int32 rptui::OReportController::m_nSelectionCount
private

the page number from the restoreView call

Definition at line 110 of file ReportController.hxx.

sal_Int32 rptui::OReportController::m_nSplitPos
private

the current mode of the controller

Definition at line 108 of file ReportController.hxx.

Referenced by getSplitPos().

sal_Int16 rptui::OReportController::m_nZoomValue
private

Definition at line 112 of file ReportController.hxx.

Referenced by getZoomValue().

rtl::Reference<TransferableClipboardListener> rptui::OReportController::m_pClipboardNotifier
private

Definition at line 86 of file ReportController.hxx.

rtl::Reference<OXReportControllerObserver> rptui::OReportController::m_pReportControllerObserver
private

Definition at line 89 of file ReportController.hxx.

OUString rptui::OReportController::m_sLastActivePage
private

name for the report definition

Definition at line 106 of file ReportController.hxx.

OUString rptui::OReportController::m_sMode
private

last active property browser page

Definition at line 107 of file ReportController.hxx.

OUString rptui::OReportController::m_sName
private

Definition at line 105 of file ReportController.hxx.

css::uno::Reference< css::container::XNameAccess > rptui::OReportController::m_xColumns
mutableprivate

Definition at line 100 of file ReportController.hxx.

css::uno::Reference< css::util::XNumberFormatter > rptui::OReportController::m_xFormatter
private

Definition at line 98 of file ReportController.hxx.

Referenced by getReportNumberFormatter().

css::uno::Reference< css::frame::XDesktop2 > rptui::OReportController::m_xFrameLoader
private

Definition at line 95 of file ReportController.hxx.

std::shared_ptr<OGroupsSortingDialog> rptui::OReportController::m_xGroupsFloater
private

notifier for changes in the clipboard

Definition at line 87 of file ReportController.hxx.

css::uno::Reference< css::lang::XComponent > rptui::OReportController::m_xHoldAlive
mutableprivate

Definition at line 99 of file ReportController.hxx.

css::uno::Reference< css::report::XReportDefinition > rptui::OReportController::m_xReportDefinition
private

Definition at line 93 of file ReportController.hxx.

Referenced by getReportDefinition().

css::uno::Reference< css::report::XReportEngine > rptui::OReportController::m_xReportEngine
private

Definition at line 94 of file ReportController.hxx.

css::uno::Reference< css::sdbc::XRowSet > rptui::OReportController::m_xRowSet
private

Definition at line 96 of file ReportController.hxx.

css::uno::Reference< css::beans::XPropertyChangeListener > rptui::OReportController::m_xRowSetMediator
private

Definition at line 97 of file ReportController.hxx.


The documentation for this class was generated from the following files: