bump product version to 5.0.4.1
[LibreOffice.git] / reportdesign / source / ui / report / DesignView.cxx
blob0a6f56714c05a5c0c2c2a23d3cf990de87b6ba42
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "DesignView.hxx"
21 #include <tools/debug.hxx>
22 #include "ReportController.hxx"
23 #include <comphelper/types.hxx>
24 #include <unotools/syslocale.hxx>
25 #include <unotools/viewoptions.hxx>
26 #include "RptDef.hxx"
27 #include "UITools.hxx"
28 #include "RptObject.hxx"
29 #include "propbrw.hxx"
30 #include <toolkit/helper/convert.hxx>
31 #include "helpids.hrc"
32 #include "SectionView.hxx"
33 #include "ReportSection.hxx"
34 #include "rptui_slotid.hrc"
35 #include <svx/svxids.hrc>
36 #include "AddField.hxx"
37 #include "ScrollHelper.hxx"
38 #include "Navigator.hxx"
39 #include "SectionWindow.hxx"
40 #include "RptResId.hrc"
42 #include <vcl/settings.hxx>
43 #include <vcl/svapp.hxx>
45 namespace rptui
47 using namespace ::dbaui;
48 using namespace ::utl;
49 using namespace ::com::sun::star;
50 using namespace uno;
51 using namespace lang;
52 using namespace beans;
53 using namespace container;
55 #define START_SIZE_TASKPANE 30
56 #define COLSET_ID 1
57 #define REPORT_ID 2
58 #define TASKPANE_ID 3
60 class OTaskWindow : public vcl::Window
62 VclPtr<PropBrw> m_pPropWin;
63 public:
64 OTaskWindow(vcl::Window* _pParent) : Window(_pParent),m_pPropWin(NULL){}
65 virtual ~OTaskWindow() { disposeOnce(); }
66 virtual void dispose() SAL_OVERRIDE { m_pPropWin.clear(); vcl::Window::dispose(); }
68 inline void setPropertyBrowser(PropBrw* _pPropWin)
70 m_pPropWin = _pPropWin;
73 virtual void Resize() SAL_OVERRIDE
75 const Size aSize = GetOutputSizePixel();
76 if ( m_pPropWin && aSize.Height() && aSize.Width() )
77 m_pPropWin->SetSizePixel(aSize);
82 // class ODesignView
85 ODesignView::ODesignView( vcl::Window* pParent,
86 const Reference< XComponentContext >& _rxOrb,
87 OReportController& _rController) :
88 ODataView( pParent, _rController, _rxOrb, WB_DIALOGCONTROL )
89 ,m_aSplitWin(VclPtr<SplitWindow>::Create(this))
90 ,m_rReportController( _rController )
91 ,m_aScrollWindow(VclPtr<rptui::OScrollWindowHelper>::Create(this))
92 ,m_pPropWin(NULL)
93 ,m_pAddField(NULL)
94 ,m_pCurrentView(NULL)
95 ,m_pReportExplorer(NULL)
96 ,m_eMode( RPTUI_SELECT )
97 ,m_nCurrentPosition(USHRT_MAX)
98 ,m_eActObj( OBJ_NONE )
99 ,m_bFirstDraw(false)
100 ,m_aGridSizeCoarse( 1000, 1000 ) // #i93595# 100TH_MM changed to grid using coarse 1 cm grid
101 ,m_aGridSizeFine( 250, 250 ) // and a 0,25 cm subdivision for better visualisation
102 ,m_bGridVisible(true)
103 ,m_bGridSnap(true)
104 ,m_bDeleted( false )
106 SetHelpId(UID_RPT_RPT_APP_VIEW);
107 ImplInitSettings();
109 SetMapMode( MapMode( MAP_100TH_MM ) );
111 // now create the task pane on the right side :-)
112 m_pTaskPane = VclPtr<OTaskWindow>::Create(this);
114 m_aSplitWin->InsertItem( COLSET_ID,100,SPLITWINDOW_APPEND, 0, SWIB_PERCENTSIZE | SWIB_COLSET );
115 m_aSplitWin->InsertItem( REPORT_ID, m_aScrollWindow.get(), 100, SPLITWINDOW_APPEND, COLSET_ID, SWIB_PERCENTSIZE);
117 // Splitter einrichten
118 m_aSplitWin->SetSplitHdl(LINK(this, ODesignView,SplitHdl));
119 m_aSplitWin->ShowAutoHideButton();
120 m_aSplitWin->SetAlign(WINDOWALIGN_LEFT);
121 m_aSplitWin->Show();
123 m_aMarkIdle.SetPriority( SchedulerPriority::LOW );
124 m_aMarkIdle.SetIdleHdl( LINK( this, ODesignView, MarkTimeout ) );
128 ODesignView::~ODesignView()
130 disposeOnce();
133 void ODesignView::dispose()
135 m_bDeleted = true;
136 Hide();
137 m_aScrollWindow->Hide();
138 m_aMarkIdle.Stop();
139 if ( m_pPropWin )
141 notifySystemWindow(this,m_pPropWin,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
142 m_pPropWin.disposeAndClear();
144 if ( m_pAddField )
146 SvtViewOptions aDlgOpt( E_WINDOW, OUString( UID_RPT_RPT_APP_VIEW ) );
147 aDlgOpt.SetWindowState(OStringToOUString(m_pAddField->GetWindowState(WINDOWSTATE_MASK_ALL), RTL_TEXTENCODING_ASCII_US));
148 notifySystemWindow(this,m_pAddField,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
149 m_pAddField.disposeAndClear();
151 if ( m_pReportExplorer )
153 SvtViewOptions aDlgOpt(E_WINDOW, OStringToOUString(m_pReportExplorer->GetHelpId(), RTL_TEXTENCODING_UTF8));
154 aDlgOpt.SetWindowState(OStringToOUString(m_pReportExplorer->GetWindowState(WINDOWSTATE_MASK_ALL), RTL_TEXTENCODING_ASCII_US));
155 notifySystemWindow(this,m_pReportExplorer,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
156 m_pReportExplorer.disposeAndClear();
159 m_pTaskPane.disposeAndClear();
160 m_aScrollWindow.disposeAndClear();
161 m_aSplitWin.disposeAndClear();
162 dbaui::ODataView::dispose();
165 void ODesignView::initialize()
167 SetMapMode( MapMode( MAP_100TH_MM ) );
168 m_aScrollWindow->initialize();
169 m_aScrollWindow->Show();
172 void ODesignView::DataChanged( const DataChangedEvent& rDCEvt )
174 ODataView::DataChanged( rDCEvt );
176 if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
177 (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
179 ImplInitSettings();
180 Invalidate();
184 bool ODesignView::PreNotify( NotifyEvent& rNEvt )
186 bool nRet = ODataView::PreNotify(rNEvt); // 1 := has to be handled here
187 switch(rNEvt.GetType())
189 case MouseNotifyEvent::KEYINPUT:
190 if ( (m_pPropWin && m_pPropWin->HasChildPathFocus()) )
191 return false;
192 if ( (m_pAddField && m_pAddField->HasChildPathFocus()) )
193 return false;
194 if ( (m_pReportExplorer && m_pReportExplorer->HasChildPathFocus()) )
195 return false;
197 const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
198 if ( handleKeyEvent(*pKeyEvent) )
199 nRet = true;
200 else if ( nRet && m_pAccel.get() )
202 const vcl::KeyCode& rCode = pKeyEvent->GetKeyCode();
203 util::URL aUrl;
204 aUrl.Complete = m_pAccel->findCommand(svt::AcceleratorExecute::st_VCLKey2AWTKey(rCode));
205 if ( aUrl.Complete.isEmpty() || !m_xController->isCommandEnabled( aUrl.Complete ) )
206 nRet = false;
209 break;
210 default:
211 break;
214 return nRet;
217 void ODesignView::resizeDocumentView(Rectangle& _rPlayground)
219 if ( !_rPlayground.IsEmpty() )
221 const Size aPlaygroundSize( _rPlayground.GetSize() );
223 // calc the split pos, and forward it to the controller
224 sal_Int32 nSplitPos = getController().getSplitPos();
225 if ( 0 != aPlaygroundSize.Width() )
227 if ( ( -1 == nSplitPos )
228 || ( nSplitPos >= aPlaygroundSize.Width() )
231 long nMinWidth = static_cast<long>(0.1*aPlaygroundSize.Width());
232 if ( m_pPropWin && m_pPropWin->IsVisible() )
233 nMinWidth = m_pPropWin->GetMinOutputSizePixel().Width();
234 nSplitPos = static_cast<sal_Int32>(_rPlayground.Right() - nMinWidth);
235 getController().setSplitPos(nSplitPos);
239 if ( m_aSplitWin->IsItemValid(TASKPANE_ID) )
241 // normalize the split pos
242 const long nSplitterWidth = GetSettings().GetStyleSettings().GetSplitSize();
243 Point aTaskPanePos(nSplitPos + nSplitterWidth, _rPlayground.Top());
244 if (m_pTaskPane && m_pTaskPane->IsVisible() && m_pPropWin)
246 aTaskPanePos.X() = aPlaygroundSize.Width() - m_pTaskPane->GetSizePixel().Width();
247 sal_Int32 nMinWidth = m_pPropWin->getMinimumSize().Width();
248 if ( nMinWidth > (aPlaygroundSize.Width() - aTaskPanePos.X()) )
250 aTaskPanePos.X() = aPlaygroundSize.Width() - nMinWidth;
252 nSplitPos = aTaskPanePos.X() - nSplitterWidth;
253 getController().setSplitPos(nSplitPos);
255 const long nTaskPaneSize = static_cast<long>((aPlaygroundSize.Width() - aTaskPanePos.X())*100/aPlaygroundSize.Width());
256 if ( m_aSplitWin->GetItemSize( TASKPANE_ID ) != nTaskPaneSize )
258 m_aSplitWin->SetItemSize( REPORT_ID, 99 - nTaskPaneSize );
259 m_aSplitWin->SetItemSize( TASKPANE_ID, nTaskPaneSize );
263 // set the size of the report window
264 m_aSplitWin->SetPosSizePixel( _rPlayground.TopLeft(),aPlaygroundSize );
266 // just for completeness: there is no space left, we occupied it all ...
267 _rPlayground.SetPos( _rPlayground.BottomRight() );
268 _rPlayground.SetSize( Size( 0, 0 ) );
272 IMPL_LINK_NOARG_TYPED(ODesignView, MarkTimeout, Idle *, void)
274 if ( m_pPropWin && m_pPropWin->IsVisible() )
276 m_pPropWin->Update(m_pCurrentView);
277 uno::Reference<beans::XPropertySet> xProp(m_xReportComponent,uno::UNO_QUERY);
278 if ( xProp.is() )
280 m_pPropWin->Update(xProp);
281 static_cast<OTaskWindow*>(m_pTaskPane.get())->Resize();
283 Resize();
288 void ODesignView::SetMode( DlgEdMode _eNewMode )
290 m_eMode = _eNewMode;
291 if ( m_eMode == RPTUI_SELECT )
292 m_eActObj = OBJ_NONE;
294 m_aScrollWindow->SetMode(_eNewMode);
297 void ODesignView::SetInsertObj( sal_uInt16 eObj,const OUString& _sShapeType )
299 m_eActObj = eObj;
300 m_aScrollWindow->SetInsertObj( eObj,_sShapeType );
303 OUString ODesignView::GetInsertObjString() const
305 return m_aScrollWindow->GetInsertObjString();
311 void ODesignView::Cut()
313 Copy();
314 Delete();
319 void ODesignView::Copy()
321 m_aScrollWindow->Copy();
326 void ODesignView::Paste()
328 m_aScrollWindow->Paste();
331 void ODesignView::Delete()
333 m_aScrollWindow->Delete();
336 bool ODesignView::HasSelection() const
338 return m_aScrollWindow->HasSelection();
342 bool ODesignView::IsPasteAllowed() const
344 return m_aScrollWindow->IsPasteAllowed();
348 void ODesignView::UpdatePropertyBrowserDelayed(OSectionView& _rView)
350 if ( m_pCurrentView != &_rView )
352 if ( m_pCurrentView )
353 m_aScrollWindow->setMarked(m_pCurrentView,false);
354 m_pCurrentView = &_rView;
355 if ( m_pCurrentView )
356 m_aScrollWindow->setMarked(m_pCurrentView,true);
357 m_xReportComponent.clear();
358 DlgEdHint aHint( RPTUI_HINT_SELECTIONCHANGED );
359 Broadcast( aHint );
361 m_aMarkIdle.Start();
365 void ODesignView::toggleGrid(bool _bGridVisible)
367 m_aScrollWindow->toggleGrid(_bGridVisible);
370 sal_uInt16 ODesignView::getSectionCount() const
372 return m_aScrollWindow->getSectionCount();
375 void ODesignView::showRuler(bool _bShow)
377 m_aScrollWindow->showRuler(_bShow);
380 void ODesignView::removeSection(sal_uInt16 _nPosition)
382 m_aScrollWindow->removeSection(_nPosition);
385 void ODesignView::addSection(const uno::Reference< report::XSection >& _xSection,const OUString& _sColorEntry,sal_uInt16 _nPosition)
387 m_aScrollWindow->addSection(_xSection,_sColorEntry,_nPosition);
390 void ODesignView::GetFocus()
392 Window::GetFocus();
394 if ( !m_bDeleted )
396 OSectionWindow* pSectionWindow = m_aScrollWindow->getMarkedSection();
397 if ( pSectionWindow )
398 pSectionWindow->GrabFocus();
402 void ODesignView::ImplInitSettings()
404 SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetFaceColor() ));
405 SetFillColor( Application::GetSettings().GetStyleSettings().GetFaceColor() );
406 SetTextFillColor( Application::GetSettings().GetStyleSettings().GetFaceColor() );
409 IMPL_LINK_NOARG( ODesignView, SplitHdl )
411 const Size aOutputSize = GetOutputSizePixel();
412 const long nTest = aOutputSize.Width() * m_aSplitWin->GetItemSize(TASKPANE_ID) / 100;
413 long nMinWidth = static_cast<long>(0.1*aOutputSize.Width());
414 if ( m_pPropWin && m_pPropWin->IsVisible() )
415 nMinWidth = m_pPropWin->GetMinOutputSizePixel().Width();
417 if ( (aOutputSize.Width() - nTest) >= nMinWidth && nTest > m_aScrollWindow->getMaxMarkerWidth(false) )
419 long nOldSplitPos = getController().getSplitPos();
420 (void)nOldSplitPos;
421 getController().setSplitPos(nTest);
424 return 0L;
427 void ODesignView::SelectAll(const sal_uInt16 _nObjectType)
429 m_aScrollWindow->SelectAll(_nObjectType);
432 void ODesignView::unmarkAllObjects(OSectionView* _pSectionView)
434 m_aScrollWindow->unmarkAllObjects(_pSectionView);
437 void ODesignView::togglePropertyBrowser(bool _bToogleOn)
439 if ( !m_pPropWin && _bToogleOn )
441 m_pPropWin = VclPtr<PropBrw>::Create(getController().getORB(), m_pTaskPane,this);
442 m_pPropWin->Invalidate();
443 static_cast<OTaskWindow*>(m_pTaskPane.get())->setPropertyBrowser(m_pPropWin);
444 notifySystemWindow(this,m_pPropWin,::comphelper::mem_fun(&TaskPaneList::AddWindow));
446 if ( m_pPropWin && _bToogleOn != m_pPropWin->IsVisible() )
448 if ( !m_pCurrentView && !m_xReportComponent.is() )
449 m_xReportComponent = getController().getReportDefinition();
451 const bool bWillBeVisible = _bToogleOn;
452 m_pPropWin->Show(bWillBeVisible);
453 m_pTaskPane->Show(bWillBeVisible);
454 m_pTaskPane->Invalidate();
456 if ( bWillBeVisible )
457 m_aSplitWin->InsertItem( TASKPANE_ID, m_pTaskPane,START_SIZE_TASKPANE, SPLITWINDOW_APPEND, COLSET_ID, SWIB_PERCENTSIZE);
458 else
459 m_aSplitWin->RemoveItem(TASKPANE_ID);
461 if ( bWillBeVisible )
462 m_aMarkIdle.Start();
466 void ODesignView::showProperties(const uno::Reference< uno::XInterface>& _xReportComponent)
468 if ( m_xReportComponent != _xReportComponent )
470 m_xReportComponent = _xReportComponent;
471 if ( m_pCurrentView )
472 m_aScrollWindow->setMarked(m_pCurrentView,false);
473 m_pCurrentView = NULL;
474 m_aMarkIdle.Start();
478 bool ODesignView::isReportExplorerVisible() const
480 return m_pReportExplorer && m_pReportExplorer->IsVisible();
483 void ODesignView::toggleReportExplorer()
485 if ( !m_pReportExplorer )
487 OReportController& rReportController = getController();
488 m_pReportExplorer = VclPtr<ONavigator>::Create(this,rReportController);
489 SvtViewOptions aDlgOpt(E_WINDOW, OStringToOUString(m_pReportExplorer->GetHelpId(), RTL_TEXTENCODING_UTF8));
490 if ( aDlgOpt.Exists() )
491 m_pReportExplorer->SetWindowState(OUStringToOString(aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US));
492 m_pReportExplorer->AddEventListener(LINK(&rReportController,OReportController,EventLstHdl));
493 notifySystemWindow(this,m_pReportExplorer,::comphelper::mem_fun(&TaskPaneList::AddWindow));
495 else
496 m_pReportExplorer->Show(!m_pReportExplorer->IsVisible());
499 bool ODesignView::isAddFieldVisible() const
501 return m_pAddField && m_pAddField->IsVisible();
504 void ODesignView::toggleAddField()
506 if ( !m_pAddField )
508 uno::Reference< report::XReportDefinition > xReport(m_xReportComponent,uno::UNO_QUERY);
509 uno::Reference< report::XReportComponent > xReportComponent(m_xReportComponent,uno::UNO_QUERY);
510 OReportController& rReportController = getController();
511 if ( !m_pCurrentView && !xReport.is() )
513 if ( xReportComponent.is() )
514 xReport = xReportComponent->getSection()->getReportDefinition();
515 else
516 xReport = rReportController.getReportDefinition().get();
518 else if ( m_pCurrentView )
520 uno::Reference< report::XSection > xSection = m_pCurrentView->getReportSection()->getSection();
521 xReport = xSection->getReportDefinition();
523 uno::Reference < beans::XPropertySet > xSet(rReportController.getRowSet(),uno::UNO_QUERY);
524 m_pAddField = VclPtr<OAddFieldWindow>::Create(this,xSet);
525 m_pAddField->SetCreateHdl(LINK( &rReportController, OReportController, OnCreateHdl ) );
526 SvtViewOptions aDlgOpt( E_WINDOW, OUString( UID_RPT_RPT_APP_VIEW ) );
527 if ( aDlgOpt.Exists() )
528 m_pAddField->SetWindowState(OUStringToOString(aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US));
529 m_pAddField->Update();
530 m_pAddField->AddEventListener(LINK(&rReportController,OReportController,EventLstHdl));
531 notifySystemWindow(this,m_pAddField,::comphelper::mem_fun(&TaskPaneList::AddWindow));
532 m_pAddField->Show();
534 else
535 m_pAddField->Show(!m_pAddField->IsVisible());
538 uno::Reference< report::XSection > ODesignView::getCurrentSection() const
540 uno::Reference< report::XSection > xSection;
541 if ( m_pCurrentView )
542 xSection = m_pCurrentView->getReportSection()->getSection();
544 return xSection;
547 uno::Reference< report::XReportComponent > ODesignView::getCurrentControlModel() const
549 uno::Reference< report::XReportComponent > xModel;
550 if ( m_pCurrentView )
552 xModel = m_pCurrentView->getReportSection()->getCurrentControlModel();
554 return xModel;
557 OSectionWindow* ODesignView::getMarkedSection(NearSectionAccess nsa) const
559 return m_aScrollWindow->getMarkedSection(nsa);
562 OSectionWindow* ODesignView::getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const
564 return m_aScrollWindow->getSectionWindow(_xSection);
567 void ODesignView::markSection(const sal_uInt16 _nPos)
569 m_aScrollWindow->markSection(_nPos);
572 void ODesignView::fillCollapsedSections(::std::vector<sal_uInt16>& _rCollapsedPositions) const
574 m_aScrollWindow->fillCollapsedSections(_rCollapsedPositions);
577 void ODesignView::collapseSections(const uno::Sequence< beans::PropertyValue>& _aCollpasedSections)
579 m_aScrollWindow->collapseSections(_aCollpasedSections);
582 OUString ODesignView::getCurrentPage() const
584 return m_pPropWin ? m_pPropWin->getCurrentPage() : OUString();
587 void ODesignView::setCurrentPage(const OUString& _sLastActivePage)
589 if ( m_pPropWin )
590 m_pPropWin->setCurrentPage(_sLastActivePage);
593 void ODesignView::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAlignAtSection, bool bBoundRects)
595 m_aScrollWindow->alignMarkedObjects(_nControlModification, _bAlignAtSection,bBoundRects);
598 bool ODesignView::handleKeyEvent(const KeyEvent& _rEvent)
600 if ( (m_pPropWin && m_pPropWin->HasChildPathFocus()) )
601 return false;
602 if ( (m_pAddField && m_pAddField->HasChildPathFocus()) )
603 return false;
604 if ( (m_pReportExplorer && m_pReportExplorer->HasChildPathFocus()) )
605 return false;
606 return m_aScrollWindow->handleKeyEvent(_rEvent);
609 void ODesignView::setMarked(const uno::Reference< report::XSection>& _xSection,bool _bMark)
611 m_aScrollWindow->setMarked(_xSection,_bMark);
612 if ( _bMark )
613 UpdatePropertyBrowserDelayed(getMarkedSection()->getReportSection().getSectionView());
614 else
615 m_pCurrentView = NULL;
618 void ODesignView::setMarked(const uno::Sequence< uno::Reference< report::XReportComponent> >& _aShapes,bool _bMark)
620 m_aScrollWindow->setMarked(_aShapes,_bMark);
621 if ( _aShapes.hasElements() && _bMark )
622 showProperties(_aShapes[0]);
623 else
624 m_xReportComponent.clear();
627 void ODesignView::MouseButtonDown( const MouseEvent& rMEvt )
629 if ( rMEvt.IsLeft() )
631 const uno::Sequence< beans::PropertyValue> aArgs;
632 getController().executeChecked(SID_SELECT_REPORT,aArgs);
634 ODataView::MouseButtonDown(rMEvt);
637 uno::Any ODesignView::getCurrentlyShownProperty() const
639 uno::Any aRet;
640 OSectionWindow* pSectionWindow = getMarkedSection();
641 if ( pSectionWindow )
643 ::std::vector< uno::Reference< uno::XInterface > > aSelection;
644 pSectionWindow->getReportSection().fillControlModelSelection(aSelection);
645 if ( !aSelection.empty() )
647 ::std::vector< uno::Reference< uno::XInterface > >::iterator aIter = aSelection.begin();
648 uno::Sequence< uno::Reference< report::XReportComponent > > aSeq(aSelection.size());
649 for(sal_Int32 i = 0; i < aSeq.getLength(); ++i,++aIter)
651 aSeq[i].set(*aIter,uno::UNO_QUERY);
653 aRet <<= aSeq;
656 return aRet;
659 void ODesignView::fillControlModelSelection(::std::vector< uno::Reference< uno::XInterface > >& _rSelection) const
661 m_aScrollWindow->fillControlModelSelection(_rSelection);
664 void ODesignView::setGridSnap(bool bOn)
666 m_aScrollWindow->setGridSnap(bOn);
670 void ODesignView::setDragStripes(bool bOn)
672 m_aScrollWindow->setDragStripes(bOn);
675 bool ODesignView::isHandleEvent(sal_uInt16 /*_nId*/) const
677 return m_pPropWin && m_pPropWin->HasChildPathFocus();
680 sal_uInt32 ODesignView::getMarkedObjectCount() const
682 return m_aScrollWindow->getMarkedObjectCount();
685 void ODesignView::zoom(const Fraction& _aZoom)
687 m_aScrollWindow->zoom(_aZoom);
690 sal_uInt16 ODesignView::getZoomFactor(SvxZoomType _eType) const
692 return m_aScrollWindow->getZoomFactor(_eType);
695 } // rptui
698 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */