22#include <UndoActions.hxx>
33#include <rptui_slotid.hrc>
34#include <dlgedclip.hxx>
40#include <core_resource.hxx>
49#define DEFAUL_MOVE_SIZE 100
56 bool bMoveAllowed = _nXMov != 0 || _nYMov != 0;
64 switch(_nControlModification)
72 aNewRect.
Move(_nXMov,_nYMov);
75 if (
dynamic_cast<OUnoObject const *
>(_pObj) !=
nullptr ||
dynamic_cast<OOle2Obj const *
>(_pObj) !=
nullptr)
78 if ( pOverlappedObj && _pObj != pOverlappedObj )
81 sal_Int32 nXTemp = _nXMov;
82 sal_Int32 nYTemp = _nYMov;
83 switch(_nControlModification)
86 nXTemp += aOverlappingRect.
Right() - aNewRect.
Left();
87 bMoveAllowed = _nXMov != nXTemp;
90 nXTemp += aOverlappingRect.
Left() - aNewRect.
Right();
91 bMoveAllowed = _nXMov != nXTemp;
94 nYTemp += aOverlappingRect.
Bottom() - aNewRect.
Top();
95 bMoveAllowed = _nYMov != nYTemp;
98 nYTemp += aOverlappingRect.
Top() - aNewRect.
Bottom();
99 bMoveAllowed = _nYMov != nYTemp;
102 if ( _aObjRect.
Left() < aOverlappingRect.
Left() )
105 nXTemp += aOverlappingRect.
Right() - aNewRect.
Left();
106 bMoveAllowed = _nXMov != nXTemp;
109 if ( _aObjRect.
Top() < aOverlappingRect.
Top() )
112 nYTemp += aOverlappingRect.
Bottom() - aNewRect.
Top();
113 bMoveAllowed = _nYMov != nYTemp;
119 if ( !aIntersectionRect.
IsEmpty() )
123 if ( aNewRect.
Left() < aIntersectionRect.
Left() )
127 else if ( aNewRect.
Left() < aIntersectionRect.
Right() )
134 if ( aNewRect.
Top() < aIntersectionRect.
Top() )
138 else if ( aNewRect.
Top() < aIntersectionRect.
Bottom() )
144 bMoveAllowed = _nYMov != nYTemp;
146 bMoveAllowed = bMoveAllowed && _nXMov != nXTemp;
158 pOverlappedObj =
nullptr;
161 while ( pOverlappedObj && bMoveAllowed );
168 , m_pParent(_pReportWindow)
186 rxSection.disposeAndClear();
219 if ( pSectionWindow == &_rSectionWindow )
221 aStartPoint = pSectionWindow->GetPosPixel();
228 static const InvalidateFlags nIn = InvalidateFlags::Update | InvalidateFlags::Transparent;
229 pSectionWindow->getStartMarker().Invalidate( nIn );
230 pSectionWindow->getEndMarker().Invalidate( nIn );
242 Point aStartPoint(0,-aOffset.
Y());
252 Window::Paint(rRenderContext, rRect);
276 Window::DataChanged( rDCEvt );
278 if ( (rDCEvt.
GetType() == DataChangedEventType::SETTINGS) &&
279 (rDCEvt.
GetFlags() & AllSettingsFlags::STYLE) )
286void OViewsWindow::addSection(
const uno::Reference< report::XSection >& _xSection,
const OUString& _sColorEntry,sal_uInt16 _nPosition)
290 m_pParent->setMarked(&pSectionWindow->getReportSection().getSectionView(),
m_aSections.size() == 1);
299 TSectionsMap::const_iterator aNew =
getIteratorAtPos(_nPosition == 0 ? _nPosition+1: _nPosition - 1);
301 m_pParent->getReportView()->UpdatePropertyBrowserDelayed((*aNew)->getReportSection().getSectionView());
303 aPos->disposeAndClear();
312 [_bVisible] (
const TSectionsMap::value_type& sectionPtr) {
313 sectionPtr->getReportSection().SetGridVisible(_bVisible);
316 [] (
const TSectionsMap::value_type& sectionPtr) {
317 sectionPtr->getReportSection().Window::Invalidate(InvalidateFlags::NoErase);
329 return static_cast<sal_uInt16
>(
m_aSections.size());
335 rxSection->getReportSection().getSectionView().SetCurrentObj( eObj, SdrInventor::ReportDesign );
344 [&eNewMode] (
const TSectionsMap::value_type& sectionPtr) {
345 sectionPtr->getReportSection().SetMode(eNewMode);
352 [](
const VclPtr<OSectionWindow>& rxSection) { return rxSection->getReportSection().getSectionView().AreObjectsMarked(); });
359 [] (
const TSectionsMap::value_type& sectionPtr) {
360 sectionPtr->getReportSection().Delete();
367 uno::Sequence< beans::NamedValue > aAllreadyCopiedObjects;
369 [&aAllreadyCopiedObjects] (
const TSectionsMap::value_type& sectionPtr) {
370 sectionPtr->getReportSection().Copy(aAllreadyCopiedObjects);
374 pCopy->CopyToClipboard(
this);
381 if ( aCopies.getLength() > 1 )
383 [&aCopies] (
const TSectionsMap::value_type& sectionPtr) {
384 sectionPtr->getReportSection().Paste(aCopies);
389 if ( pMarkedSection )
396 OSL_ENSURE(_xSection.is(),
"Section is NULL!");
401 if (
p->getReportSection().getSection() == _xSection)
403 pSectionWindow =
p.get();
408 return pSectionWindow;
415 TSectionsMap::const_iterator aIter =
m_aSections.begin();
416 TSectionsMap::const_iterator aEnd =
m_aSections.end();
417 sal_uInt32 nCurrentPosition = 0;
418 for (; aIter != aEnd ; ++aIter)
420 if ( (*aIter)->getStartMarker().isMarked() )
429 if (nCurrentPosition > 0)
431 pRet = (--aIter)->
get();
444 else if ( nsa ==
POST )
447 if ((nCurrentPosition + 1) < nSize)
449 pRet = (++aIter)->
get();
452 pRet = (--aEnd)->
get();
458 pRet = (--aEnd)->
get();
485 [&_nObjectType] (
const TSectionsMap::value_type& sectionPtr) {
486 sectionPtr->getReportSection().SelectAll(_nObjectType);
499 if ( &rxSection->getReportSection().getSectionView() != _pSectionView )
501 rxSection->getReportSection().deactivateOle();
502 rxSection->getReportSection().getSectionView().UnmarkAllObj();
519 const uno::Sequence< beans::PropertyValue> aArgs;
522 Window::MouseButtonDown(rMEvt);
528 [_bShow] (
const TSectionsMap::value_type& sectionPtr) {
529 sectionPtr->getStartMarker().showRuler(_bShow);
532 [] (
const TSectionsMap::value_type& sectionPtr) {
533 sectionPtr->getStartMarker().Window::Invalidate(InvalidateFlags::NoErase);
543 [](
const VclPtr<OSectionWindow>& rxSection) { return rxSection->getReportSection().getSectionView().AreObjectsMarked(); });
546 (*aIter)->getReportSection().MouseButtonUp(rMEvt);
552 rxSection->getReportSection().getPage()->resetSpecialMode();
561 if ( rxSection->getStartMarker().isMarked() )
563 bRet = rxSection->getReportSection().handleKeyEvent(_rEvent);
579 OSL_ENSURE(_pSectionView !=
nullptr,
"SectionView is NULL!");
588 if ( rxSection->getReportSection().getSection() != _xSection )
590 rxSection->setMarked(
false);
592 else if ( rxSection->getStartMarker().isMarked() != _bMark )
594 rxSection->setMarked(_bMark);
599void OViewsWindow::setMarked(
const uno::Sequence< uno::Reference< report::XReportComponent> >& _aShapes,
bool _bMark)
602 for(
const uno::Reference< report::XReportComponent>& rShape : _aShapes)
604 const uno::Reference< report::XSection> xSection = rShape->getSection();
613 if ( pSectionWindow )
616 OSL_ENSURE( pObject,
"OViewsWindow::setMarked: no SdrObject for the shape!" );
618 pSectionWindow->getReportSection().getSectionView().MarkObj( pObject, pSectionWindow->getReportSection().getSectionView().GetSdrPageView(), !_bMark );
638 _rSortRectangles.emplace(aObjRect,TRectangleMap::mapped_type(pObj,&rView));
646 bool bOnlyOnce =
false;
647 for (
const auto& [aObjRect, rObjViewPair] : _rSortRectangles)
651 switch(_nControlModification)
654 if ( _rResize.
getOpenWidth() > aObjRect.getOpenWidth() )
662 if ( _rResize.
getOpenWidth() < aObjRect.getOpenWidth() )
673 const SdrObject* pObj = rObjViewPair.first;
677 _rBound.
Union(aObjRect);
680 if ( _bAlignAtSection || _rSortRectangles.size() == 1 )
685 OReportSection* pReportSection = rObjViewPair.second->getReportSection();
686 const uno::Reference< report::XSection>& xSection = pReportSection->
getSection();
689 uno::Reference<report::XReportDefinition> xReportDefinition = xSection->getReportDefinition();
692 xSection->getHeight()));
694 catch(
const uno::Exception &){}
699 _rBound.
Union(rObjViewPair.second->GetMarkedObjRect());
712 switch (_nControlModification)
722 uno::Reference<report::XSection> xSection = (*
m_aSections.begin())->getReportSection().getSection();
723 uno::Reference<report::XReportDefinition> xReportDefinition = xSection->getReportDefinition();
726 xSection->getHeight()).
Center();
744 TRectangleMap::const_iterator aRectIter = aSortRectangles.begin();
745 TRectangleMap::const_iterator aRectEnd = aSortRectangles.end();
746 for (;aRectIter != aRectEnd ; ++aRectIter)
749 SdrObject* pObj = aRectIter->second.first;
750 SdrView* pView = aRectIter->second.second;
759 switch(_nControlModification)
772 nYMov = aCenter.
Y() - aObjRect.
Center().
Y();
782 nXMov = aCenter.
X() - aObjRect.
Center().
X();
797 aSetFun(&aTest, aGetFun(&aBound));
798 TRectangleMap::const_iterator aInterSectRectIter = aSortRectangles.begin();
799 for (; aInterSectRectIter != aRectIter; ++aInterSectRectIter)
801 if ( pView == aInterSectRectIter->second.second && (
dynamic_cast<OUnoObject*
>(aInterSectRectIter->second.first) ||
dynamic_cast<OOle2Obj*
>(aInterSectRectIter->second.first)))
803 SdrObject* pPreviousObj = aInterSectRectIter->second.first;
805 if ( !aIntersectRect.
IsEmpty() && (aIntersectRect.
Left() != aIntersectRect.
Right() && aIntersectRect.
Top() != aIntersectRect.
Bottom() ) )
807 *pValue = aRefFun(&aIntersectRect) - aGetFun(&aObjRect);
812 if ( aInterSectRectIter == aRectIter )
813 *pValue = aGetFun(&aBound) - aGetFun(&aObjRect);
818 const Size aSize(nXMov,nYMov);
825 if ( !aResize.
IsEmpty() && aObjRect != aResize )
829 switch(_nControlModification)
843 OObjectBase* pObjBase =
dynamic_cast<OObjectBase*
>(pObj);
844 OSL_ENSURE(pObjBase,
"Where comes this object from?");
848 pObjBase->getReportComponent()->setSize(awt::Size(nXMov,aObjRect.
getOpenHeight()));
850 pObjBase->getReportComponent()->setSize(awt::Size(aObjRect.
getOpenWidth(),nYMov));
866 if ( pMarkedSection )
874 rxSection->getReportSection().getSectionView().SetGridSnap(bOn);
875 rxSection->getReportSection().Invalidate();
882 rxSection->getReportSection().getSectionView().SetDragStripes(bOn);
888 [&_pSectionWindow](
const VclPtr<OSectionWindow>& rxSection) { return _pSectionWindow == rxSection.get(); });
889 return static_cast<sal_uInt16
>(std::distance(
m_aSections.begin(), aIter));
904 enum SectionViewAction
911 class ApplySectionViewAction
917 explicit ApplySectionViewAction()
922 explicit ApplySectionViewAction(SectionViewAction _eAction)
927 void operator() (
const OViewsWindow::TSectionsMap::value_type& _rhs )
929 OSectionView& rView( _rhs->getReportSection().getSectionView() );
936 if ( rView.IsAction() )
939 case eForceToAnotherPage:
940 rView.ForceMarkedToAnotherPage();
943 if ( rView.IsAction() )
969 if ( &rView != &_rSection )
973 "com.sun.star.form.component.FixedText");
975 pNewObj->SetLogicRect(_aRect);
976 pNewObj->Move(
Size(0, aNewPos.
Y()));
985 aNewPos.
AdjustY( -nSectionHeight );
992 "reportdesign",
"Clickpoint X:" << _aPnt.
X() <<
" Y:" << _aPnt.
Y());
997 Point aAbsolutePnt = _aPnt;
1002 if (pView == _pSection)
1005 aAbsolutePnt.
AdjustY(nSectionHeight );
1010 "Absolute X:" << aAbsolutePnt.
X() <<
" Y:" << aAbsolutePnt.
Y());
1018 Point aNewObjPos(0,0);
1036 aRect.
Move(0, aNewObjPos.
Y());
1038 aLeftTop.
setX( ::std::min( aRect.
Left(), aLeftTop.
X() ) );
1039 aLeftTop.
setY( ::std::min( aRect.
Top(), aLeftTop.
Y() ) );
1043 "createInvisible X:" << aRect.
Left() <<
" Y:"
1044 << aRect.
Top() <<
" on View #" << nViewCount);
1052 aClipRect.
SetTop( -aNewObjPos.
Y() );
1056 aNewObjPos.
AdjustY(nSectionHeight );
1059 const sal_Int32 nDeltaX = std::abs(aLeftTop.
X() - aAbsolutePnt.
X());
1060 const sal_Int32 nDeltaY = std::abs(aLeftTop.
Y() - aAbsolutePnt.
Y());
1064 Point aNewPos = aAbsolutePnt;
1083 "X:" << aNewPos.
X() <<
" Y:" << aNewPos.
Y() <<
" on View#"
1088 aNewPos.
AdjustY( -nSectionHeight );
1101 Point aNewPos = _aPnt;
1115 aNewPos.
AdjustY(nSectionHeight );
1119 aNewPos.
AdjustY( -nLastSectionHeight );
1129 TSectionsMap::const_iterator aIter =
m_aSections.begin();
1130 const TSectionsMap::const_iterator aEnd =
m_aSections.end();
1132 return &rxSection->getReportSection().getSectionView() == _pSection; });
1133 sal_Int32
nCount =
static_cast<sal_Int32
>(std::distance(
m_aSections.cbegin(), aIter));
1134 OSL_ENSURE(aIter != aEnd,
"This can never happen!");
1135 if ( _rPnt.
Y() < 0 )
1144 if ( (
nCount -1) > 0 && (_rPnt.
Y() < 0) )
1148 pSection = &(*
m_aSections.begin())->getReportSection().getSectionView();
1154 for (; aIter != aEnd; ++aIter)
1158 if ( (_rPnt.
Y() - nHeight) < 0 )
1162 if ( aIter != aEnd )
1182 const OUString sUndoAction =
RptResId(RID_STR_UNDO_CHANGEPOSITION);
1183 const UndoContext aUndoContext(
getView()->getReportView()->getController().getUndoManager(), sUndoAction );
1185 Point aNewPos = _aPnt;
1187 if (!_bControlKeyPressed &&
1189 _pSection != pInSection)
1196 uno::Sequence< beans::NamedValue > aAllreadyCopiedObjects;
1203 rReportSection.
Copy(aAllreadyCopiedObjects,
true);
1209 if ( aAllreadyCopiedObjects.hasElements() )
1216 const sal_Int32 nPaperWidth = getStyleProperty<awt::Size>(xReportDefinition,
PROPERTY_PAPERSIZE).Width;
1220 if ( aNewPos.
Y() < 0 )
1224 for (beans::NamedValue
const & namedVal : std::as_const(aAllreadyCopiedObjects))
1226 uno::Sequence< uno::Reference<report::XReportComponent> > aClones;
1227 namedVal.Value >>= aClones;
1228 uno::Reference<report::XReportComponent>* pColIter = aClones.getArray();
1229 const uno::Reference<report::XReportComponent>* pColEnd = pColIter + aClones.getLength();
1232 for (; pColIter != pColEnd; ++pColIter)
1234 uno::Reference< report::XReportComponent> xRC(*pColIter);
1235 aPrevious =
VCLPoint(xRC->getPosition());
1236 awt::Size aSize = xRC->getSize();
1242 else if ( (aNewPos.
X() + aSize.Width) > (nPaperWidth -
nRightMargin) )
1246 if ( aNewPos.
Y() < 0 )
1250 if ( aNewPos.
X() < 0 )
1252 aSize.Width += aNewPos.
X();
1254 xRC->setSize(aSize);
1256 xRC->setPosition(
AWTPoint(aNewPos));
1257 if ( (pColIter+1) != pColEnd )
1260 uno::Reference< report::XReportComponent> xRCNext = *(pColIter + 1);
1262 aNewPos += aNextPosition - aPrevious;
1267 catch(uno::Exception&)
1288 Point aRealMousePos = _aPnt;
1289 Point aCurrentSectionPos;
1292 "X:" << aRealMousePos.
X() <<
" Y:" << aRealMousePos.
Y());
1298 aHdlPos = pHdl->
GetPos();
1307 aCurrentSectionPos.
AdjustY(nSectionHeight );
1309 aRealMousePos += aCurrentSectionPos;
1312 Point aPosForWorkArea(0,0);
1317 const tools::Long nSectionHeight = rxSection->PixelToLogic(rxSection->GetOutputSizePixel()).Height();
1319 if (_bControlKeySet)
1322 aClipRect.
SetTop( aCurrentSectionPos.
Y() - aPosForWorkArea.
Y() );
1323 aClipRect.
SetBottom( aClipRect.
Top() + nSectionHeight );
1329 aClipRect.
SetTop( -aPosForWorkArea.
Y() );
1332 aPosForWorkArea.
AdjustY(nSectionHeight );
1340 if ( pCurrentHdl && aRealMousePos.
Y() > 0 )
1341 aRealMousePos = _aPnt + pCurrentHdl->
GetPos() - aHdlPos;
1343 const tools::Long nSectionHeight = rxSection->PixelToLogic(rxSection->GetOutputSizePixel()).Height();
1344 aRealMousePos.
AdjustY( -nSectionHeight );
1351 [](
const VclPtr<OSectionWindow>& rxSection) { return rxSection->getReportSection().getSectionView().IsAction(); });
1357 [](
const VclPtr<OSectionWindow>& rxSection) { return rxSection->getReportSection().getSectionView().IsAction(); });
1364 return nCount +
static_cast<sal_uInt32
>(rxSection->getReportSection().getSectionView().GetMarkedObjectCount()); });
1369 const sal_uInt16 nCode = _rCode.
GetCode();
1375 if ( rScrollBar.IsVisible() )
1379 rScrollBar.
DoScroll(( nCode ==
KEY_RIGHT || nCode ==
KEY_UP ) ? (nCurrentPos - nLineSize) : (nCurrentPos + nLineSize));
1405 nX *= aPixelSize.
Width();
1406 nY *= aPixelSize.
Height();
1419 if ( pHdl ==
nullptr )
1430 if ( rWorkArea.
Top() < 0 )
1433 aMarkRect.
Move( nX, nY );
1435 if ( !rWorkArea.
Contains( aMarkRect ) )
1437 if ( aMarkRect.
Left() < rWorkArea.
Left() )
1438 nX += rWorkArea.
Left() - aMarkRect.
Left();
1443 if ( aMarkRect.
Top() < rWorkArea.
Top() )
1444 nY += rWorkArea.
Top() - aMarkRect.
Top();
1449 bool bCheck =
false;
1471 nY += (aPos.
Y() - aMarkRect.
Top());
1477 nY += (aPos.
Y() - aMarkRect.
Top());
1483 nX += (aPos.
X() - aMarkRect.
Left());
1489 nX += (aPos.
X() - aMarkRect.
Left());
1493 if ( !rWorkArea.
Contains( aMarkRect ) )
1497 pOverlapped =
isOver(aMarkRect,*rReportSection.
getPage(),rView);
1499 while(pOverlapped !=
nullptr);
1500 if (pOverlapped !=
nullptr)
1506 if ( nX != 0 || nY != 0 )
1523 rView.
BegDragObj( aStartPoint,
nullptr, pHdl, 0 );
1527 const bool bWasNoSnap = rDragStat.
IsNoSnap();
1533 if ( bWasSnapEnabled )
1537 bool bCheck =
false;
1549 case SdrHdlKind::Left:
1550 case SdrHdlKind::UpperLeft:
1551 case SdrHdlKind::LowerLeft:
1552 case SdrHdlKind::Upper:
1556 case SdrHdlKind::UpperRight:
1557 case SdrHdlKind::Right:
1558 case SdrHdlKind::LowerRight:
1559 case SdrHdlKind::Lower:
1566 if ( !(bCheck &&
isOver(aNewRect,*rReportSection.
getPage(),rView)) )
1572 const_cast<SdrDragStat&
>(rDragStat).SetNoSnap( bWasNoSnap );
1573 if ( bWasSnapEnabled )
1590 [] (
const TSectionsMap::value_type& sectionPtr) {
1591 sectionPtr->getReportSection().stopScrollTimer();
1600 if ( rxSection->getStartMarker().isCollapsed() )
1601 _rCollapsedPositions.push_back(
i);
1608 for (
const beans::PropertyValue& rSection : _aCollapsedSections)
1610 sal_uInt16
nPos = sal_uInt16(-1);
1626 aStartWidth *= _aZoom;
1632 rxSection->zoom(_aZoom);
1642 Invalidate(aRect, InvalidateFlags::NoChildren);
1657 Scroll(0, -( aOld.
Y() + aPosY.
Y()),ScrollFlags::Children);
1662 rxSection->scrollChildren(aPos.
X());
1670 rxSection->getReportSection().fillControlModelSelection(_rSelection);
#define REPORT_STARTMARKER_WIDTH
SectionViewAction m_eAction
static const AllSettings & GetSettings()
DataChangedEventType GetType() const
AllSettingsFlags GetFlags() const
void SetOrigin(const Point &rOrigin)
const Fraction & GetScaleX() const
const Point & GetOrigin() const
const Fraction & GetScaleY() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
const MapMode & GetMapMode() const
SAL_DLLPRIVATE void DrawWallpaper(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const Wallpaper &rWallpaper)
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
constexpr tools::Long X() const
virtual void MovAction(const Point &rPnt) override
virtual void BrkAction() override
bool EndDragObj(bool bCopy=false)
const tools::Rectangle & GetWorkArea() const
void SetWorkArea(const tools::Rectangle &rRect)
virtual bool BegDragObj(const Point &rPnt, OutputDevice *pOut, SdrHdl *pHdl, short nMinMov=-3, SdrDragMethod *pForcedMeth=nullptr)
SdrHdl * GetDragHdl() const
bool IsMoveAllowed() const
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
void MoveAllMarked(const Size &rSiz, bool bCopy=false)
SdrHdl * GetFocusHdl() const
SdrHdl * GetHdl(size_t nNum) const
SdrHdlKind GetKind() const
const Point & GetPos() const
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
const SdrMarkList & GetMarkedObjectList() const
bool AreObjectsMarked() const
void SortMarkedObjects() const
void BegMarkObj(const Point &rPnt, bool bUnmark=false)
const SdrHdlList & GetHdlList() const
size_t GetMarkedObjectCount() const
SdrMark * GetSdrMarkByIndex(size_t nNum) const
const tools::Rectangle & GetMarkedObjRect() const
void AdjustMarkHdl(SfxViewShell *pOtherShell=nullptr)
const tools::Rectangle & GetAllMarkedRect() const
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
SdrObject * GetMarkedSdrObj() const
virtual void SetChanged(bool bFlg=true)
SdrUndoFactory & GetSdrUndoFactory() const
virtual void InsertObject(SdrObject *pObj, size_t nPos=SAL_MAX_SIZE)
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
bool IsMoveProtect() const
virtual void Move(const Size &rSiz)
virtual const tools::Rectangle & GetCurrentBoundRect() const
virtual const tools::Rectangle & GetSnapRect() const
virtual const tools::Rectangle & GetLastBoundRect() const
SdrPage * getSdrPageFromSdrObject() const
virtual void TakeObjInfo(SdrObjTransformInfoRec &rInfo) const
SdrModel & getSdrModelFromSdrView() const
const SdrDragStat & GetDragStat() const
SdrPageView * GetSdrPageView() const
SdrModel & GetModel() const
void SetSnapEnabled(bool bOn)
bool IsSnapEnabled() const
virtual std::unique_ptr< SdrUndoAction > CreateUndoMoveObject(SdrObject &rObject, const Size &rDist)
virtual std::unique_ptr< SdrUndoAction > CreateUndoGeoObject(SdrObject &rObject)
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
void setWidth(tools::Long nWidth)
tools::Long AdjustWidth(tools::Long n)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
static sal_Int32 GetSplitSize()
static TransferableDataHelper CreateFromSystemClipboard(vcl::Window *pWindow)
bool HasFormat(SotClipboardFormatId nFormat) const
OReportController & getController() const
const css::uno::Reference< css::report::XReportDefinition > & getReportDefinition() const
gives access to the report definition
defines a clipboard format for copying selection elements.
css::uno::Sequence< css::beans::NamedValue > TSectionElements
static SotClipboardFormatId getDescriptorFormatId()
returns the format id.
static TSectionElements extractCopies(const TransferableDataHelper &_rData)
extract the section elements
void Paste(const css::uno::Sequence< css::beans::NamedValue > &_aAllreadyCopiedObjects, bool _bForce=false)
paste a new control in this section
OReportPage * getPage() const
const css::uno::Reference< css::report::XSection > & getSection() const
OSectionView & getSectionView() const
void createDefault(const OUString &_sType)
creates a default object (custom shape)
void Copy(css::uno::Sequence< css::beans::NamedValue > &_rAllreadyCopiedObjects)
copies the current selection in this section
OScrollWindowHelper * getScrollWindow() const
ODesignView * getReportView() const
OReportSection * getReportSection() const
bool IsDragResize() const
virtual void MakeVisible(const tools::Rectangle &rRect, vcl::Window &rWin) override
OReportSection & getReportSection()
OStartMarker & getStartMarker()
sal_Int32 getMinHeight() const
void Delete()
Deletes the current selection in this section.
bool HasSelection() const
returns <TRUE> when an object is marked
void createDefault()
creates a default object
void showRuler(bool _bShow)
shows or hides the ruler.
void BegDragObj(const Point &_aPnt, SdrHdl *_pHdl, const OSectionView *_pSection)
void resize(const OSectionWindow &_rSectionWindow)
void collectRectangles(TRectangleMap &_rMap)
void setMarked(OSectionView const *_pSectionView, bool _bMark)
the section as marked or not marked
void SetMode(DlgEdMode m_eMode)
void toggleGrid(bool _bVisible)
turns the grid on or off
svtools::ColorConfig m_aColorConfig
void fillCollapsedSections(::std::vector< sal_uInt16 > &_rCollapsedPositions) const
fills the positions of all collapsed sections.
void addSection(const css::uno::Reference< css::report::XSection > &_xSection, const OUString &_sColorEntry, sal_uInt16 _nPosition)
adds a new section at position _nPosition.
void Paste()
paste a new control in this section
void zoom(const Fraction &_aZoom)
zoom the ruler and view windows
void setDragStripes(bool bOn)
sal_uInt32 getMarkedObjectCount() const
TSectionsMap::iterator getIteratorAtPos(sal_uInt16 _nPos)
returns the iterator at pos _nPos or the end()
OSectionWindow * getSectionWindow(const sal_uInt16 _nPos) const
return the section at the given position
OViewsWindow(OViewsWindow const &)=delete
sal_Int32 getTotalHeight() const
returns the total accumulated height of all sections until _pSection is reached
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
void BegDragObj_createInvisibleObjectAtPosition(const tools::Rectangle &_aRect, const OSectionView &_rSection)
bool IsPasteAllowed() const
returns if paste is allowed
void impl_resizeSectionWindow(OSectionWindow &_rSectionWindow, Point &_rStartPoint, bool _bSet)
virtual ~OViewsWindow() override
void removeSection(sal_uInt16 _nPosition)
removes the section at the given position.
virtual void Paint(vcl::RenderContext &, const tools::Rectangle &rRect) override
OSectionWindow * getMarkedSection(NearSectionAccess nsa=CURRENT) const override
returns the section which is currently marked.
virtual void ConfigurationChanged(utl::ConfigurationBroadcaster *, ConfigurationHints) override
void ForceMarkedToAnotherPage()
virtual void markSection(const sal_uInt16 _nPos) override
mark the section on the given position .
void scrollChildren(const Point &_aThumbPos)
VclPtr< OReportWindow > m_pParent
OReportWindow * getView() const
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
sal_uInt16 getSectionCount() const
void EndDragObj_removeInvisibleObjects()
void BegMarkObj(const Point &_aPnt, const OSectionView *_pSection)
sal_uInt16 getPosition(const OSectionWindow *_pSectionWindow) const
returns the current position in the list
void SetInsertObj(SdrObjKind eObj, const OUString &_sShapeType)
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
void setGridSnap(bool bOn)
void MovAction(const Point &rPnt, const OSectionView *_pSection, bool _bControlKeySet)
void alignMarkedObjects(ControlModification _nControlModification, bool _bAlignAtSection)
align all marked objects in all sections
void collapseSections(const css::uno::Sequence< css::beans::PropertyValue > &_aCollapsedSections)
collapse all sections given by their position
void Copy()
copies the current selection in this section
void handleKey(const vcl::KeyCode &_rCode)
static void collectBoundResizeRect(const TRectangleMap &_rSortRectangles, ControlModification _nControlModification, bool _bAlignAtSection, tools::Rectangle &_rBound, tools::Rectangle &_rResize)
::std::multimap< tools::Rectangle,::std::pair< SdrObject *, OSectionView * >, RectangleLess > TRectangleMap
bool handleKeyEvent(const KeyEvent &_rEvent)
checks if the keycode is known by the child windows
OSectionView * getSectionRelativeToPosition(const OSectionView *_pSection, Point &_rPnt)
return the section at the given point which is relative to the given section
virtual void Resize() override
void EndDragObj(bool _bDragIntoNewSection, const OSectionView *_pSection, const Point &_aPnt)
void BrkAction()
calls on every section BrkAction
void unmarkAllObjects(OSectionView const *_pSectionView)
unmark all objects on the views without the given one.
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...
::std::vector< SdrObject * > m_aBegDragTempList
void SelectAll(const SdrObjKind _nObjectType)
All objects will be marked.
virtual void dispose() override
sal_uInt16 GetCode() const
virtual void dispose() override
Point LogicToPixel(const Point &rLogicPt) const
const MapMode & GetMapMode() const
virtual void Scroll(tools::Long nHorzScroll, tools::Long nVertScroll, ScrollFlags nFlags=ScrollFlags::NONE)
Point PixelToLogic(const Point &rDevicePt) const
Size GetOutputSizePixel() const
void SetPaintTransparent(bool bTransparent)
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
void EnableChildTransparentMode(bool bEnable=true)
css::awt::Point AWTPoint(const ::Point &rVCLPoint)
inline ::Point VCLPoint(const css::awt::Point &rAWTPoint)
OUString RptResId(TranslateId aId)
EmbeddedObjectRef * pObject
constexpr sal_uInt16 KEY_LEFT
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_RIGHT
constexpr sal_uInt16 KEY_DOWN
#define SAL_INFO(area, stream)
tools::Long const nRightMargin
tools::Long const nLeftMargin
SdrObject * isOver(const tools::Rectangle &_rRect, SdrPage const &_rPage, SdrView const &_rView, bool _bAllObjects=false, SdrObject const *_pIgnore=nullptr, sal_Int16 _nIgnoreType=0)
checks whether the given rectangle overlapps another OUnoObject object in that view.
static bool lcl_getNewRectSize(const tools::Rectangle &_aObjRect, tools::Long &_nXMov, tools::Long &_nYMov, SdrObject const *_pObj, SdrView const *_pView, ControlModification _nControlModification)
void setZoomFactor(const Fraction &_aZoom, vcl::Window &_rWindow)
sets the map mode at the window
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
constexpr OUStringLiteral PROPERTY_RIGHTMARGIN
constexpr OUStringLiteral PROPERTY_LEFTMARGIN
constexpr OUStringLiteral PROPERTY_PAPERSIZE
WinBits const WB_DIALOGCONTROL