24 #include <UITools.hxx>
32 #include <strings.hxx>
37 #include <dlgedfac.hxx>
40 #define SECTION_OFFSET 3
70 m_aHRuler->
SetUnit(MeasurementSystem::Metric == eSystem ? FieldUnit::CM : FieldUnit::INCH);
116 if ( !_xSection.is() )
140 return sal_Int32(static_cast<tools::Long>(aStartWidth));
145 sal_Int32 nWidth = 0;
150 aStartWidth *= aZoom;
169 Point aStartPoint(static_cast<tools::Long>(aStartWidth) + aOffset.X(),0);
178 aPageSize.setHeight(
m_aHRuler->GetSizePixel().Height() );
181 tools::Long nSectionsHeight = ::std::max<tools::Long>(nTermp,aTotalOutputSize.
Height());
183 m_aHRuler->SetPosSizePixel(aStartPoint,aPageSize);
188 aStartPoint.AdjustY(aPageSize.Height() );
189 nSectionsHeight -= aStartPoint.Y();
191 aStartPoint.setX( aOffset.X() );
208 Window::DataChanged( rDCEvt );
210 if ( (rDCEvt.
GetType() == DataChangedEventType::SETTINGS) &&
211 (rDCEvt.
GetFlags() & AllSettingsFlags::STYLE) )
227 if ( aOrg.X() != (-_aThumbPos.X()) )
231 m_aHRuler->Scroll(-(aOrg.X() + _aThumbPos.X()),0);
310 void OReportWindow::setMarked(
const uno::Sequence< uno::Reference< report::XReportComponent> >& _xShape,
bool _bMark)
346 m_aViewsWindow->alignMarkedObjects(_nControlModification, _bAlignAtSection);
378 Invalidate(InvalidateFlags::NoErase | InvalidateFlags::NoChildren | InvalidateFlags::Transparent);
396 sal_uInt16 nZoom(100);
400 case SvxZoomType::PERCENT:
401 nZoom =
m_pView->getController().getZoomValue();
403 case SvxZoomType::OPTIMAL:
405 case SvxZoomType::WHOLEPAGE:
410 nZoom = ::std::min(nZoom,static_cast<sal_uInt16>(static_cast<tools::Long>(
Fraction(aSize.
Height()*100,aHeight.
Height()))));
413 case SvxZoomType::PAGEWIDTH:
OUString const & GetInsertObjString() const
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 wi...
bool IsPasteAllowed() const
returns if paste is allowed
virtual ~OReportWindow() override
void fillCollapsedSections(::std::vector< sal_uInt16 > &_rCollapsedPositions) const
fills the positions of all collapsed sections.
void collapseSections(const css::uno::Sequence< css::beans::PropertyValue > &_aCollapsedSections)
collapse all sections given by their position
#define PROPERTY_RIGHTMARGIN
void SetUnit(FieldUnit eNewUnit)
sal_Int32 GetTotalWidth() const
returns the total width of the first section
tools::Long const nLeftMargin
void zoom(const Fraction &_aZoom)
zoom the ruler and view windows
virtual Size GetSizePixel() const
void Delete()
Deletes the current selection in this section.
DataChangedEventType GetType() const
void SetHelpId(const OString &)
virtual void dispose() override
void setGridSnap(bool bOn)
constexpr tools::Long Width() const
HashMap_OWString_Interface aMap
sal_Int32 getMaxMarkerWidth() const
calculate the max width of the markers The end marker will not be used for calculation.
const LocaleDataWrapper & GetLocaleData() const
#define PROPERTY_LEFTMARGIN
OSectionWindow * getSectionWindow(const css::uno::Reference< css::report::XSection > &_xSection) const
VclPtr< OScrollWindowHelper > m_pParent
AllSettingsFlags GetFlags() const
constexpr OStringLiteral UID_RPT_REPORTWINDOW
#define REPORT_STARTMARKER_WIDTH
rtl::Reference< comphelper::OPropertyChangeMultiplexer > m_pReportListener
void SetIndents(sal_uInt32 n=0, const RulerIndent *pIndentAry=nullptr)
sal_uInt16 getSectionCount() const
VclPtr< Ruler > m_aHRuler
OReportSection & getReportSection()
#define REPORT_ENDMARKER_WIDTH
WinBits const WB_DIALOGCONTROL
Point LogicToPixel(const Point &rLogicPt) const
void showRuler(bool _bShow)
shows the ruler
#define PROPERTY_PAPERSIZE
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
void SetOrigin(const Point &rOrigin)
void SetZoom(const Fraction &rNewZoom)
void setMarked(OSectionView const *_pSectionView, bool _bMark)
the section as marked or not marked
void ScrollChildren(const Point &_aThumbPos)
bool HasSelection() const
returns when an object is marked
void toggleGrid(bool _bVisible)
turns the grid on or off
virtual void _propertyChanged(const css::beans::PropertyChangeEvent &_rEvent) override
OReportWindow(OReportWindow const &)=delete
VclPtr< OViewsWindow > m_aViewsWindow
VclPtr< ODesignView > m_pView
sal_uInt16 getZoomFactor(SvxZoomType _eType) const
calculates the zoom factor.
void alignMarkedObjects(ControlModification _nControlModification, bool _bAlignAtSection)
align all marked objects in all sections
sal_Int32 GetTotalHeight() const
void Paste()
paste a new control in this section
void setDragStripes(bool bOn)
void Copy()
copies the current selection in this section
sal_Int32 impl_getRealPixelWidth() const
void unmarkAllObjects()
unmark all objects on the views without the given one.
ODesignView * getReportView() const
void SetInsertObj(SdrObjKind eObj, const OUString &_sShapeType)
Point getThumbPos() const
::rtl::Reference< comphelper::OPropertyChangeMultiplexer > addStyleListener(const css::uno::Reference< css::report::XReportDefinition > &_xReportDefinition,::comphelper::OPropertyChangeListener *_pListener)
add a listener for the properties size, left margin, right margin to the page style ...
constexpr tools::Long Height() const
bool handleKeyEvent(const KeyEvent &_rEvent)
checks if the keycode is known by the child windows
void showProperties(const css::uno::Reference< css::report::XSection > &_xReportComponent)
triggers the property browser with the report component or section
void SetNullOffset(tools::Long nPos)
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
sal_uInt32 getMarkedObjectCount() const
tools::Long const nRightMargin
void addSection(const css::uno::Reference< css::report::XSection > &_xSection, const OUString &_sColorEntry, sal_uInt16 _nPosition)
adds a new section at position _nPosition.
OSectionWindow * getMarkedSection(NearSectionAccess nsa=CURRENT) const override
returns the section which is currently marked.
const Point & GetOrigin() const
virtual void Resize() override
Size GetOutputSizePixel() const
void SelectAll(const SdrObjKind _nObjectType)
All objects will be marked.
void SetBorders(sal_uInt32 n=0, const RulerBorder *pBrdAry=nullptr)
virtual void dispose() override
virtual void markSection(const sal_uInt16 _nPos) override
mark the section on the given position .
OReportController & getController() const
void SetMode(DlgEdMode m_eMode)
const css::uno::Reference< css::report::XReportDefinition > & getReportDefinition() const
gives access to the report definition
void SetPagePos(tools::Long nOff=0, tools::Long nWidth=0)
MeasurementSystem getMeasurementSystemEnum() const
OSectionView & getSectionView() const
void removeSection(sal_uInt16 _nPosition)
removes the section at the given position.