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

#include <DesignView.hxx>

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

Public Member Functions

 ODesignView (vcl::Window *pParent, const css::uno::Reference< css::uno::XComponentContext > &, OReportController &_rController)
 
virtual ~ODesignView () override
 
virtual void dispose () override
 
virtual void MouseButtonDown (const MouseEvent &rMEvt) override
 
virtual bool PreNotify (NotifyEvent &rNEvt) override
 
virtual void GetFocus () override
 
virtual void initialize () override
 
OReportControllergetController () const
 
void SetMode (DlgEdMode m_eMode)
 
void SetInsertObj (SdrObjKind eObj, const OUString &_sShapeType=OUString())
 
SdrObjKind GetInsertObj () const
 
OUString const & GetInsertObjString () const
 
DlgEdMode GetMode () const
 
void Cut ()
 cuts the current selection in this section More...
 
void Copy ()
 copies the current selection in this section More...
 
bool IsPasteAllowed () const
 returns if paste is allowed More...
 
void Paste ()
 paste a new control in this section More...
 
void Delete ()
 Deletes the current selection in this section. More...
 
void alignMarkedObjects (ControlModification _nControlModification, bool _bAlignAtSection)
 align all marked objects in all sections More...
 
void SelectAll (const SdrObjKind _nObjectType)
 All objects will be marked. More...
 
bool HasSelection () const
 checks if a selection exists More...
 
void UpdatePropertyBrowserDelayed (OSectionView &_rView)
 
sal_uInt16 getSectionCount () const
 
void removeSection (sal_uInt16 _nPosition)
 removes the section at the given position. More...
 
void addSection (const css::uno::Reference< css::report::XSection > &_xSection, const OUString &_sColorEntry, sal_uInt16 _nPosition=USHRT_MAX)
 adds a new section at position _nPosition. More...
 
const SizegetGridSizeCoarse () const
 
const SizegetGridSizeFine () const
 
void setGridSnap (bool bOn)
 
void setDragStripes (bool bOn)
 
void toggleGrid (bool _bGridVisible)
 turns the grid on or off More...
 
void togglePropertyBrowser (bool _bToggleOn)
 
bool isAddFieldVisible () const
 
void toggleAddField ()
 
bool isReportExplorerVisible () const
 
void toggleReportExplorer ()
 
void showRuler (bool _bShow)
 shows or hides the ruler. More...
 
void unmarkAllObjects ()
 unmark all objects on the views. More...
 
void showProperties (const css::uno::Reference< css::uno::XInterface > &_xReportComponent)
 triggers the property browser with the section More...
 
css::uno::Any getCurrentlyShownProperty () const
 
css::uno::Reference< css::report::XSection > getCurrentSection () const
 returns the current section or the detail section if no section was selected previously More...
 
css::uno::Reference< css::report::XReportComponent > getCurrentControlModel () const
 returns the current control report model or <NULL> More...
 
OSectionWindowgetMarkedSection (NearSectionAccess nsa=CURRENT) const override
 returns the section which is currently marked. More...
 
OSectionWindowgetSectionWindow (const css::uno::Reference< css::report::XSection > &_xSection) const
 
virtual void markSection (const sal_uInt16 _nPos) override
 mark the section on the given position . More...
 
void fillCollapsedSections (::std::vector< sal_uInt16 > &_rCollapsedPositions) const
 fills the positions of all collapsed sections. More...
 
void collapseSections (const css::uno::Sequence< css::beans::PropertyValue > &_aCollapsedSections)
 collapse all sections given by their position More...
 
OUString getCurrentPage () const
 
void setCurrentPage (const OUString &_sLastActivePage)
 
bool handleKeyEvent (const KeyEvent &_rEvent)
 checks if the keycode is known by the child windows More...
 
void setMarked (const css::uno::Reference< css::report::XSection > &_xSection, bool _bMark)
 set the section as marked or not marked More...
 
void setMarked (const css::uno::Sequence< css::uno::Reference< css::report::XReportComponent > > &_xShape, bool _bMark)
 
bool isHandleEvent () const
 returns if the view handles the event by itself More...
 
sal_uInt32 getMarkedObjectCount () const
 
void zoom (const Fraction &_aZoom)
 zoom the ruler and view windows More...
 
void fillControlModelSelection (::std::vector< css::uno::Reference< css::uno::XInterface > > &_rSelection) const
 fills the vector with all selected control models /param _rSelection The vector will be filled and will not be cleared before. More...
 
sal_uInt16 getZoomFactor (SvxZoomType _eType) const
 calculates the zoom factor. More...
 
- Public Member Functions inherited from dbaui::ODataView
 ODataView (vcl::Window *pParent, IController &_rController, const css::uno::Reference< css::uno::XComponentContext > &, WinBits nStyle=0)
 
virtual ~ODataView () override
 
virtual void dispose () override
 
virtual void Construct ()
 
virtual void initialize ()
 
virtual bool PreNotify (NotifyEvent &rNEvt) override
 
virtual void StateChanged (StateChangedType nStateChange) override
 
IControllergetCommandController () const
 
const css::uno::Reference< css::uno::XComponentContext > & getORB () const
 
virtual void Resize () override
 
void attachFrame (const css::uno::Reference< css::frame::XFrame > &_xFrame)
 
- Public Member Functions inherited from SfxBroadcaster
 SfxBroadcaster ()
 
 SfxBroadcaster (const SfxBroadcaster &rBC)
 
virtual ~SfxBroadcaster () COVERITY_NOEXCEPT_FALSE
 
void Broadcast (const SfxHint &rHint)
 
bool HasListeners () const
 
size_t GetListenerCount () const
 
void ForAllListeners (std::function< bool(SfxListener *)> f) const
 
virtual OSectionWindowgetMarkedSection (NearSectionAccess nsa=CURRENT) const =0
 returns the section which is currently marked. More...
 
virtual void markSection (const sal_uInt16 _nPos)=0
 mark the section on the given position . More...
 

Protected Member Functions

virtual void resizeDocumentView (tools::Rectangle &rRect) override
 
virtual void DataChanged (const DataChangedEvent &rDCEvt) override
 
- Protected Member Functions inherited from dbaui::ODataView
virtual void Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &_rRect) override
 
virtual void resizeAll (const tools::Rectangle &_rPlayground)
 
virtual void resizeDocumentView (tools::Rectangle &_rPlayground)
 
- Protected Member Functions inherited from SfxBroadcaster
void Forward (SfxBroadcaster &rBC, const SfxHint &rHint)
 
- Protected Member Functions inherited from rptui::IMarkedSection
 ~IMarkedSection ()
 

Private Member Functions

 DECL_LINK (MarkTimeout, Timer *, void)
 
 DECL_LINK (SplitHdl, SplitWindow *, void)
 
void ImplInitSettings ()
 
 ODesignView (ODesignView const &)=delete
 
void operator= (ODesignView const &)=delete
 

Private Attributes

VclPtr< SplitWindowm_aSplitWin
 
css::uno::Reference< css::uno::XInterface > m_xReportComponent
 
OReportControllerm_rReportController
 
VclPtr< OScrollWindowHelperm_aScrollWindow
 
VclPtr< vcl::Windowm_pTaskPane
 
VclPtr< PropBrwm_pPropWin
 
std::shared_ptr< OAddFieldWindowm_xAddField
 
OSectionViewm_pCurrentView
 
std::shared_ptr< ONavigatorm_xReportExplorer
 
Idle m_aMarkIdle
 
DlgEdMode m_eMode
 
SdrObjKind m_eActObj
 
Size m_aGridSizeCoarse
 
Size m_aGridSizeFine
 
bool m_bDeleted
 

Additional Inherited Members

- Protected Attributes inherited from dbaui::ODataView
rtl::Reference< IControllerm_xController
 
::std::unique_ptr< ::svt::AcceleratorExecutem_pAccel
 

Detailed Description

Definition at line 49 of file DesignView.hxx.

Constructor & Destructor Documentation

◆ ODesignView() [1/2]

rptui::ODesignView::ODesignView ( ODesignView const &  )
privatedelete

◆ ODesignView() [2/2]

rptui::ODesignView::ODesignView ( vcl::Window pParent,
const css::uno::Reference< css::uno::XComponentContext > &  ,
OReportController _rController 
)

◆ ~ODesignView()

rptui::ODesignView::~ODesignView ( )
overridevirtual

Definition at line 120 of file DesignView.cxx.

Member Function Documentation

◆ addSection()

void rptui::ODesignView::addSection ( const css::uno::Reference< css::report::XSection > &  _xSection,
const OUString &  _sColorEntry,
sal_uInt16  _nPosition = USHRT_MAX 
)

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.

Definition at line 378 of file DesignView.cxx.

◆ alignMarkedObjects()

void rptui::ODesignView::alignMarkedObjects ( ControlModification  _nControlModification,
bool  _bAlignAtSection 
)

align all marked objects in all sections

Definition at line 582 of file DesignView.cxx.

◆ collapseSections()

void rptui::ODesignView::collapseSections ( const css::uno::Sequence< css::beans::PropertyValue > &  _aCollapsedSections)

collapse all sections given by their position

Parameters
_aCollapsedSectionsThe position of the sections which should be collapsed.

Definition at line 566 of file DesignView.cxx.

◆ Copy()

void rptui::ODesignView::Copy ( )

copies the current selection in this section

Definition at line 314 of file DesignView.cxx.

◆ Cut()

void rptui::ODesignView::Cut ( )

cuts the current selection in this section

Definition at line 307 of file DesignView.cxx.

References Copy, and Delete.

◆ DataChanged()

void rptui::ODesignView::DataChanged ( const DataChangedEvent rDCEvt)
overrideprotectedvirtual

Definition at line 170 of file DesignView.cxx.

References DataChangedEvent::GetFlags(), and DataChangedEvent::GetType().

◆ DECL_LINK() [1/2]

rptui::ODesignView::DECL_LINK ( MarkTimeout  ,
Timer ,
void   
)
private

◆ DECL_LINK() [2/2]

rptui::ODesignView::DECL_LINK ( SplitHdl  ,
SplitWindow ,
void   
)
private

◆ Delete()

void rptui::ODesignView::Delete ( )

Deletes the current selection in this section.

Definition at line 325 of file DesignView.cxx.

◆ dispose()

void rptui::ODesignView::dispose ( void  )
overridevirtual

◆ fillCollapsedSections()

void rptui::ODesignView::fillCollapsedSections ( ::std::vector< sal_uInt16 > &  _rCollapsedPositions) const

fills the positions of all collapsed sections.

Parameters
_rCollapsedPositionsOut parameter which holds afterwards all positions of the collapsed sections.

Definition at line 561 of file DesignView.cxx.

◆ fillControlModelSelection()

void rptui::ODesignView::fillControlModelSelection ( ::std::vector< css::uno::Reference< css::uno::XInterface > > &  _rSelection) const

fills the vector with all selected control models /param _rSelection The vector will be filled and will not be cleared before.

Definition at line 647 of file DesignView.cxx.

◆ getController()

OReportController & rptui::ODesignView::getController ( ) const
inline

◆ getCurrentControlModel()

uno::Reference< report::XReportComponent > rptui::ODesignView::getCurrentControlModel ( ) const

returns the current control report model or <NULL>

Definition at line 536 of file DesignView.cxx.

References xModel.

◆ getCurrentlyShownProperty()

uno::Any rptui::ODesignView::getCurrentlyShownProperty ( ) const

◆ getCurrentPage()

OUString rptui::ODesignView::getCurrentPage ( ) const

Definition at line 571 of file DesignView.cxx.

References m_pPropWin.

◆ getCurrentSection()

uno::Reference< report::XSection > rptui::ODesignView::getCurrentSection ( ) const

returns the current section or the detail section if no section was selected previously

Definition at line 527 of file DesignView.cxx.

◆ GetFocus()

void rptui::ODesignView::GetFocus ( )
overridevirtual

Definition at line 383 of file DesignView.cxx.

References vcl::Window::GrabFocus().

◆ getGridSizeCoarse()

const Size & rptui::ODesignView::getGridSizeCoarse ( ) const
inline

Definition at line 157 of file DesignView.hxx.

References m_aGridSizeCoarse.

Referenced by rptui::OReportSection::fill().

◆ getGridSizeFine()

const Size & rptui::ODesignView::getGridSizeFine ( ) const
inline

Definition at line 158 of file DesignView.hxx.

References m_aGridSizeFine.

Referenced by rptui::OReportSection::fill().

◆ GetInsertObj()

SdrObjKind rptui::ODesignView::GetInsertObj ( ) const
inline

Definition at line 101 of file DesignView.hxx.

References m_eActObj.

◆ GetInsertObjString()

OUString const & rptui::ODesignView::GetInsertObjString ( ) const

Definition at line 301 of file DesignView.cxx.

◆ getMarkedObjectCount()

sal_uInt32 rptui::ODesignView::getMarkedObjectCount ( ) const

Definition at line 668 of file DesignView.cxx.

◆ getMarkedSection()

OSectionWindow * rptui::ODesignView::getMarkedSection ( NearSectionAccess  nsa = CURRENT) const
overridevirtual

returns the section which is currently marked.

Implements rptui::IMarkedSection.

Definition at line 546 of file DesignView.cxx.

◆ GetMode()

DlgEdMode rptui::ODesignView::GetMode ( ) const
inline

Definition at line 103 of file DesignView.hxx.

References m_eMode.

◆ getSectionCount()

sal_uInt16 rptui::ODesignView::getSectionCount ( ) const

Definition at line 363 of file DesignView.cxx.

◆ getSectionWindow()

OSectionWindow * rptui::ODesignView::getSectionWindow ( const css::uno::Reference< css::report::XSection > &  _xSection) const

Definition at line 551 of file DesignView.cxx.

◆ getZoomFactor()

sal_uInt16 rptui::ODesignView::getZoomFactor ( SvxZoomType  _eType) const

calculates the zoom factor.

Parameters
_eTypewhich kind of zoom is needed

Definition at line 678 of file DesignView.cxx.

◆ handleKeyEvent()

bool rptui::ODesignView::handleKeyEvent ( const KeyEvent _rEvent)

checks if the keycode is known by the child windows

Parameters
_rCodethe keycode
Returns
<TRUE> if the keycode is handled otherwise <FALSE>

Definition at line 587 of file DesignView.cxx.

References m_pPropWin.

◆ HasSelection()

bool rptui::ODesignView::HasSelection ( ) const

checks if a selection exists

Definition at line 330 of file DesignView.cxx.

◆ ImplInitSettings()

void rptui::ODesignView::ImplInitSettings ( )
private

Definition at line 395 of file DesignView.cxx.

References Application::GetSettings().

◆ initialize()

void rptui::ODesignView::initialize ( )
overridevirtual

Reimplemented from dbaui::ODataView.

Definition at line 163 of file DesignView.cxx.

◆ isAddFieldVisible()

bool rptui::ODesignView::isAddFieldVisible ( ) const

Definition at line 489 of file DesignView.cxx.

◆ isHandleEvent()

bool rptui::ODesignView::isHandleEvent ( ) const

returns if the view handles the event by itself

Returns
<FALSE> is the event is not handled by the view otherwise <TRUE>

Definition at line 663 of file DesignView.cxx.

References m_pPropWin.

◆ IsPasteAllowed()

bool rptui::ODesignView::IsPasteAllowed ( ) const

returns if paste is allowed

Returns
<TRUE> if paste is allowed

Definition at line 336 of file DesignView.cxx.

◆ isReportExplorerVisible()

bool rptui::ODesignView::isReportExplorerVisible ( ) const

Definition at line 467 of file DesignView.cxx.

◆ markSection()

void rptui::ODesignView::markSection ( const sal_uInt16  _nPos)
overridevirtual

mark the section on the given position .

Parameters
_nPosthe position is zero based.

Implements rptui::IMarkedSection.

Definition at line 556 of file DesignView.cxx.

References _nPos.

◆ MouseButtonDown()

void rptui::ODesignView::MouseButtonDown ( const MouseEvent rMEvt)
overridevirtual

Definition at line 616 of file DesignView.cxx.

References MouseEvent::IsLeft().

◆ operator=()

void rptui::ODesignView::operator= ( ODesignView const &  )
privatedelete

◆ Paste()

void rptui::ODesignView::Paste ( )

paste a new control in this section

Definition at line 320 of file DesignView.cxx.

◆ PreNotify()

bool rptui::ODesignView::PreNotify ( NotifyEvent rNEvt)
overridevirtual

◆ removeSection()

void rptui::ODesignView::removeSection ( sal_uInt16  _nPosition)

removes the section at the given position.

Parameters
_nPositionZero based.

Definition at line 373 of file DesignView.cxx.

◆ resizeDocumentView()

void rptui::ODesignView::resizeDocumentView ( tools::Rectangle rRect)
overrideprotectedvirtual

◆ SelectAll()

void rptui::ODesignView::SelectAll ( const SdrObjKind  _nObjectType)

All objects will be marked.

Definition at line 416 of file DesignView.cxx.

◆ setCurrentPage()

void rptui::ODesignView::setCurrentPage ( const OUString &  _sLastActivePage)

Definition at line 576 of file DesignView.cxx.

References m_pPropWin.

◆ setDragStripes()

void rptui::ODesignView::setDragStripes ( bool  bOn)

Definition at line 658 of file DesignView.cxx.

◆ setGridSnap()

void rptui::ODesignView::setGridSnap ( bool  bOn)

Definition at line 652 of file DesignView.cxx.

◆ SetInsertObj()

void rptui::ODesignView::SetInsertObj ( SdrObjKind  eObj,
const OUString &  _sShapeType = OUString() 
)

Definition at line 295 of file DesignView.cxx.

◆ setMarked() [1/2]

void rptui::ODesignView::setMarked ( const css::uno::Reference< css::report::XSection > &  _xSection,
bool  _bMark 
)

set the section as marked or not marked

Parameters
_pSectionViewthe section where to set the marked flag
_bMarkthe marked flag

◆ setMarked() [2/2]

void rptui::ODesignView::setMarked ( const css::uno::Sequence< css::uno::Reference< css::report::XReportComponent > > &  _xShape,
bool  _bMark 
)

◆ SetMode()

void rptui::ODesignView::SetMode ( DlgEdMode  m_eMode)

Definition at line 286 of file DesignView.cxx.

◆ showProperties()

void rptui::ODesignView::showProperties ( const css::uno::Reference< css::uno::XInterface > &  _xReportComponent)

triggers the property browser with the section

Parameters
_xReportComponentthe report component

Definition at line 455 of file DesignView.cxx.

◆ showRuler()

void rptui::ODesignView::showRuler ( bool  _bShow)

shows or hides the ruler.

Definition at line 368 of file DesignView.cxx.

◆ toggleAddField()

void rptui::ODesignView::toggleAddField ( )

◆ toggleGrid()

void rptui::ODesignView::toggleGrid ( bool  _bGridVisible)

turns the grid on or off

Parameters
_bGridVisible

Definition at line 358 of file DesignView.cxx.

◆ togglePropertyBrowser()

void rptui::ODesignView::togglePropertyBrowser ( bool  _bToggleOn)

◆ toggleReportExplorer()

void rptui::ODesignView::toggleReportExplorer ( )

◆ unmarkAllObjects()

void rptui::ODesignView::unmarkAllObjects ( )

unmark all objects on the views.

Definition at line 421 of file DesignView.cxx.

◆ UpdatePropertyBrowserDelayed()

void rptui::ODesignView::UpdatePropertyBrowserDelayed ( OSectionView _rView)

Definition at line 342 of file DesignView.cxx.

References rptui::RPTUI_HINT_SELECTIONCHANGED.

◆ zoom()

void rptui::ODesignView::zoom ( const Fraction _aZoom)

zoom the ruler and view windows

Definition at line 673 of file DesignView.cxx.

Member Data Documentation

◆ m_aGridSizeCoarse

Size rptui::ODesignView::m_aGridSizeCoarse
private

Definition at line 65 of file DesignView.hxx.

Referenced by getGridSizeCoarse().

◆ m_aGridSizeFine

Size rptui::ODesignView::m_aGridSizeFine
private

Definition at line 66 of file DesignView.hxx.

Referenced by getGridSizeFine().

◆ m_aMarkIdle

Idle rptui::ODesignView::m_aMarkIdle
private

Definition at line 62 of file DesignView.hxx.

◆ m_aScrollWindow

VclPtr<OScrollWindowHelper> rptui::ODesignView::m_aScrollWindow
private

Definition at line 56 of file DesignView.hxx.

◆ m_aSplitWin

VclPtr<SplitWindow> rptui::ODesignView::m_aSplitWin
private

Definition at line 52 of file DesignView.hxx.

◆ m_bDeleted

bool rptui::ODesignView::m_bDeleted
private

Definition at line 67 of file DesignView.hxx.

◆ m_eActObj

SdrObjKind rptui::ODesignView::m_eActObj
private

Definition at line 64 of file DesignView.hxx.

Referenced by GetInsertObj().

◆ m_eMode

DlgEdMode rptui::ODesignView::m_eMode
private

Definition at line 63 of file DesignView.hxx.

Referenced by GetMode().

◆ m_pCurrentView

OSectionView* rptui::ODesignView::m_pCurrentView
private

Definition at line 60 of file DesignView.hxx.

◆ m_pPropWin

VclPtr<PropBrw> rptui::ODesignView::m_pPropWin
private

Definition at line 58 of file DesignView.hxx.

◆ m_pTaskPane

VclPtr<vcl::Window> rptui::ODesignView::m_pTaskPane
private

Definition at line 57 of file DesignView.hxx.

◆ m_rReportController

OReportController& rptui::ODesignView::m_rReportController
private

Definition at line 55 of file DesignView.hxx.

Referenced by getController().

◆ m_xAddField

std::shared_ptr<OAddFieldWindow> rptui::ODesignView::m_xAddField
private

Definition at line 59 of file DesignView.hxx.

◆ m_xReportComponent

css::uno::Reference< css::uno::XInterface> rptui::ODesignView::m_xReportComponent
private

Definition at line 54 of file DesignView.hxx.

◆ m_xReportExplorer

std::shared_ptr<ONavigator> rptui::ODesignView::m_xReportExplorer
private

Definition at line 61 of file DesignView.hxx.


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