LibreOffice Module reportdesign (master) 1
DesignView.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#include <DesignView.hxx>
21#include <ReportController.hxx>
24#include <RptDef.hxx>
25#include <UITools.hxx>
26#include <RptObject.hxx>
27#include <propbrw.hxx>
28#include <helpids.h>
29#include <SectionView.hxx>
30#include <ReportSection.hxx>
31#include <rptui_slotid.hrc>
32#include <AddField.hxx>
33#include <ScrollHelper.hxx>
34#include <Navigator.hxx>
35#include <SectionWindow.hxx>
36
37#include <vcl/settings.hxx>
38#include <vcl/svapp.hxx>
39
40#include <algorithm>
41
42namespace rptui
43{
44using namespace ::dbaui;
45using namespace ::utl;
46using namespace ::com::sun::star;
47using namespace uno;
48using namespace lang;
49using namespace beans;
50using namespace container;
51
52#define START_SIZE_TASKPANE 30
53#define COLSET_ID 1
54#define REPORT_ID 2
55#define TASKPANE_ID 3
56
57namespace {
58
59class OTaskWindow : public vcl::Window
60{
62public:
63 explicit OTaskWindow(vcl::Window* _pParent) : Window(_pParent),m_pPropWin(nullptr){}
64 virtual ~OTaskWindow() override { disposeOnce(); }
65 virtual void dispose() override { m_pPropWin.clear(); vcl::Window::dispose(); }
66
67 void setPropertyBrowser(PropBrw* _pPropWin)
68 {
69 m_pPropWin = _pPropWin;
70 }
71
72 virtual void Resize() override
73 {
74 const Size aSize = GetOutputSizePixel();
75 if ( m_pPropWin && aSize.Height() && aSize.Width() )
76 m_pPropWin->SetSizePixel(aSize);
77 }
78};
79
80}
81
82
83
85 const Reference< XComponentContext >& _rxOrb,
86 OReportController& _rController) :
87 ODataView( pParent, _rController, _rxOrb, WB_DIALOGCONTROL )
88 ,m_aSplitWin(VclPtr<SplitWindow>::Create(this))
89 ,m_rReportController( _rController )
90 ,m_aScrollWindow(VclPtr<rptui::OScrollWindowHelper>::Create(this))
91 ,m_pPropWin(nullptr)
92 ,m_pCurrentView(nullptr)
93 ,m_aMarkIdle("reportdesign ODesignView Mark Idle")
94 ,m_eMode( DlgEdMode::Select )
95 ,m_eActObj( SdrObjKind::NONE )
96 ,m_aGridSizeCoarse( 1000, 1000 ) // #i93595# 100TH_MM changed to grid using coarse 1 cm grid
97 ,m_aGridSizeFine( 250, 250 ) // and a 0,25 cm subdivision for better visualisation
98 ,m_bDeleted( false )
99{
101 ImplInitSettings();
102
103 SetMapMode( MapMode( MapUnit::Map100thMM ) );
104
105 // now create the task pane on the right side :-)
106 m_pTaskPane = VclPtr<OTaskWindow>::Create(this);
107
108 m_aSplitWin->InsertItem( COLSET_ID,100,SPLITWINDOW_APPEND, 0, SplitWindowItemFlags::PercentSize | SplitWindowItemFlags::ColSet );
109 m_aSplitWin->InsertItem( REPORT_ID, m_aScrollWindow.get(), 100, SPLITWINDOW_APPEND, COLSET_ID, SplitWindowItemFlags::PercentSize);
110
111 // set up splitter
112 m_aSplitWin->SetSplitHdl(LINK(this, ODesignView,SplitHdl));
113 m_aSplitWin->SetAlign(WindowAlign::Left);
114 m_aSplitWin->Show();
115
116 m_aMarkIdle.SetInvokeHandler( LINK( this, ODesignView, MarkTimeout ) );
117}
118
119
120ODesignView::~ODesignView()
121{
122 disposeOnce();
123}
124
125void ODesignView::dispose()
126{
127 m_bDeleted = true;
128 Hide();
129 m_aScrollWindow->Hide();
130 m_aMarkIdle.Stop();
131 if ( m_pPropWin )
132 {
133 notifySystemWindow(this,m_pPropWin,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
134 m_pPropWin.disposeAndClear();
135 }
136 if ( m_xAddField )
137 {
138 SvtViewOptions aDlgOpt( EViewType::Window, UID_RPT_RPT_APP_VIEW );
139 aDlgOpt.SetWindowState(m_xAddField->getDialog()->get_window_state(vcl::WindowDataMask::All));
140
141 if (m_xAddField->getDialog()->get_visible())
142 m_xAddField->response(RET_CANCEL);
143
144 m_xAddField.reset();
145 }
146 if ( m_xReportExplorer )
147 {
148 SvtViewOptions aDlgOpt(EViewType::Window, m_xReportExplorer->get_help_id());
149 aDlgOpt.SetWindowState(m_xReportExplorer->getDialog()->get_window_state(vcl::WindowDataMask::All));
150
151 if (m_xReportExplorer->getDialog()->get_visible())
152 m_xReportExplorer->response(RET_CANCEL);
153
154 m_xReportExplorer.reset();
155 }
156
157 m_pTaskPane.disposeAndClear();
158 m_aScrollWindow.disposeAndClear();
159 m_aSplitWin.disposeAndClear();
161}
162
163void ODesignView::initialize()
164{
165 SetMapMode( MapMode( MapUnit::Map100thMM ) );
166 m_aScrollWindow->initialize();
167 m_aScrollWindow->Show();
168}
169
170void ODesignView::DataChanged( const DataChangedEvent& rDCEvt )
171{
172 ODataView::DataChanged( rDCEvt );
173
174 if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
175 (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
176 {
177 ImplInitSettings();
178 Invalidate();
179 }
180}
181
182bool ODesignView::PreNotify( NotifyEvent& rNEvt )
183{
184 bool bRet = ODataView::PreNotify(rNEvt); // 1 := has to be handled here
185 switch(rNEvt.GetType())
186 {
187 case NotifyEventType::KEYINPUT:
188 {
189 if ( m_pPropWin && m_pPropWin->HasChildPathFocus() )
190 return false;
191 if (m_xAddField && m_xAddField->getDialog()->has_toplevel_focus())
192 return false;
193 if ( m_xReportExplorer && m_xReportExplorer->getDialog()->has_toplevel_focus())
194 return false;
195 const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
196 if ( handleKeyEvent(*pKeyEvent) )
197 bRet = true;
198 else if ( bRet && m_pAccel )
199 {
200 const vcl::KeyCode& rCode = pKeyEvent->GetKeyCode();
201 util::URL aUrl;
202 aUrl.Complete = m_pAccel->findCommand(svt::AcceleratorExecute::st_VCLKey2AWTKey(rCode));
203 if ( aUrl.Complete.isEmpty() || !m_xController->isCommandEnabled( aUrl.Complete ) )
204 bRet = false;
205 }
206 break;
207 }
208 default:
209 break;
210 }
211
212 return bRet;
213}
214
215void ODesignView::resizeDocumentView(tools::Rectangle& _rPlayground)
216{
217 if ( !_rPlayground.IsEmpty() )
218 {
219 const Size aPlaygroundSize( _rPlayground.GetSize() );
220
221 // calc the split pos, and forward it to the controller
222 sal_Int32 nSplitPos = getController().getSplitPos();
223 if ( 0 != aPlaygroundSize.Width() )
224 {
225 if ( ( -1 == nSplitPos )
226 || ( nSplitPos >= aPlaygroundSize.Width() )
227 )
228 {
229 tools::Long nMinWidth = static_cast<tools::Long>(0.1*aPlaygroundSize.Width());
230 if ( m_pPropWin && m_pPropWin->IsVisible() )
231 nMinWidth = m_pPropWin->GetMinOutputSizePixel().Width();
232 nSplitPos = static_cast<sal_Int32>(_rPlayground.Right() - nMinWidth);
233 getController().setSplitPos(nSplitPos);
234 }
235 }
236
237 if ( m_aSplitWin->IsItemValid(TASKPANE_ID) )
238 {
239 // normalize the split pos
240 const tools::Long nSplitterWidth = StyleSettings::GetSplitSize();
241 Point aTaskPanePos(nSplitPos + nSplitterWidth, _rPlayground.Top());
242 if (m_pTaskPane && m_pTaskPane->IsVisible() && m_pPropWin)
243 {
244 aTaskPanePos.setX( aPlaygroundSize.Width() - m_pTaskPane->GetSizePixel().Width() );
245 sal_Int32 nMinWidth = m_pPropWin->getMinimumSize().Width();
246 if ( nMinWidth > (aPlaygroundSize.Width() - aTaskPanePos.X()) )
247 {
248 aTaskPanePos.setX( aPlaygroundSize.Width() - nMinWidth );
249 }
250 nSplitPos = aTaskPanePos.X() - nSplitterWidth;
251 getController().setSplitPos(nSplitPos);
252
253 const tools::Long nTaskPaneSize = static_cast<tools::Long>((aPlaygroundSize.Width() - aTaskPanePos.X())*100/aPlaygroundSize.Width());
254 if ( m_aSplitWin->GetItemSize( TASKPANE_ID ) != nTaskPaneSize )
255 {
256 m_aSplitWin->SetItemSize( REPORT_ID, 99 - nTaskPaneSize );
257 m_aSplitWin->SetItemSize( TASKPANE_ID, nTaskPaneSize );
258 }
259 }
260 }
261 // set the size of the report window
262 m_aSplitWin->SetPosSizePixel( _rPlayground.TopLeft(),aPlaygroundSize );
263 }
264 // just for completeness: there is no space left, we occupied it all ...
265 _rPlayground.SetPos( _rPlayground.BottomRight() );
266 _rPlayground.SetSize( Size( 0, 0 ) );
267
268}
269
270IMPL_LINK_NOARG(ODesignView, MarkTimeout, Timer *, void)
271{
272 if ( m_pPropWin && m_pPropWin->IsVisible() )
273 {
274 m_pPropWin->Update(m_pCurrentView);
275 uno::Reference<beans::XPropertySet> xProp(m_xReportComponent,uno::UNO_QUERY);
276 if ( xProp.is() )
277 {
278 m_pPropWin->Update(xProp);
279 static_cast<OTaskWindow*>(m_pTaskPane.get())->Resize();
280 }
281 Resize();
282 }
283}
284
285
286void ODesignView::SetMode( DlgEdMode _eNewMode )
287{
288 m_eMode = _eNewMode;
289 if ( m_eMode == DlgEdMode::Select )
290 m_eActObj = SdrObjKind::NONE;
291
292 m_aScrollWindow->SetMode(_eNewMode);
293}
294
295void ODesignView::SetInsertObj( SdrObjKind eObj,const OUString& _sShapeType )
296{
297 m_eActObj = eObj;
298 m_aScrollWindow->SetInsertObj( eObj,_sShapeType );
299}
300
301OUString const & ODesignView::GetInsertObjString() const
302{
303 return m_aScrollWindow->GetInsertObjString();
304}
305
306
307void ODesignView::Cut()
308{
309 Copy();
310 Delete();
311}
312
313
314void ODesignView::Copy()
315{
316 m_aScrollWindow->Copy();
317}
318
319
320void ODesignView::Paste()
321{
322 m_aScrollWindow->Paste();
323}
324
325void ODesignView::Delete()
326{
327 m_aScrollWindow->Delete();
328}
329
330bool ODesignView::HasSelection() const
331{
332 return m_aScrollWindow->HasSelection();
333}
334
335
336bool ODesignView::IsPasteAllowed() const
337{
338 return m_aScrollWindow->IsPasteAllowed();
339}
340
341
342void ODesignView::UpdatePropertyBrowserDelayed(OSectionView& _rView)
343{
344 if ( m_pCurrentView != &_rView )
345 {
346 if ( m_pCurrentView )
347 m_aScrollWindow->setMarked(m_pCurrentView,false);
348 m_pCurrentView = &_rView;
349 m_aScrollWindow->setMarked(m_pCurrentView, true);
350 m_xReportComponent.clear();
352 Broadcast( aHint );
353 }
354 m_aMarkIdle.Start();
355}
356
357
358void ODesignView::toggleGrid(bool _bGridVisible)
359{
360 m_aScrollWindow->toggleGrid(_bGridVisible);
361}
362
363sal_uInt16 ODesignView::getSectionCount() const
364{
365 return m_aScrollWindow->getSectionCount();
366}
367
368void ODesignView::showRuler(bool _bShow)
369{
370 m_aScrollWindow->showRuler(_bShow);
371}
372
373void ODesignView::removeSection(sal_uInt16 _nPosition)
374{
375 m_aScrollWindow->removeSection(_nPosition);
376}
377
378void ODesignView::addSection(const uno::Reference< report::XSection >& _xSection,const OUString& _sColorEntry,sal_uInt16 _nPosition)
379{
380 m_aScrollWindow->addSection(_xSection,_sColorEntry,_nPosition);
381}
382
383void ODesignView::GetFocus()
384{
385 Window::GetFocus();
386
387 if ( !m_bDeleted )
388 {
389 OSectionWindow* pSectionWindow = m_aScrollWindow->getMarkedSection();
390 if ( pSectionWindow )
391 pSectionWindow->GrabFocus();
392 }
393}
394
395void ODesignView::ImplInitSettings()
396{
397 SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetFaceColor() ));
398 GetOutDev()->SetFillColor( Application::GetSettings().GetStyleSettings().GetFaceColor() );
399 SetTextFillColor( Application::GetSettings().GetStyleSettings().GetFaceColor() );
400}
401
403{
404 const Size aOutputSize = GetOutputSizePixel();
405 const tools::Long nTest = aOutputSize.Width() * m_aSplitWin->GetItemSize(TASKPANE_ID) / 100;
406 tools::Long nMinWidth = static_cast<tools::Long>(0.1*aOutputSize.Width());
407 if ( m_pPropWin && m_pPropWin->IsVisible() )
408 nMinWidth = m_pPropWin->GetMinOutputSizePixel().Width();
409
410 if ( (aOutputSize.Width() - nTest) >= nMinWidth && nTest > m_aScrollWindow->getMaxMarkerWidth() )
411 {
412 getController().setSplitPos(nTest);
413 }
414}
415
416void ODesignView::SelectAll(const SdrObjKind _nObjectType)
417{
418 m_aScrollWindow->SelectAll(_nObjectType);
419}
420
421void ODesignView::unmarkAllObjects()
422{
423 m_aScrollWindow->unmarkAllObjects();
424}
425
426void ODesignView::togglePropertyBrowser(bool _bToggleOn)
427{
428 if ( !m_pPropWin && _bToggleOn )
429 {
430 m_pPropWin = VclPtr<PropBrw>::Create(getController().getORB(), m_pTaskPane,this);
431 m_pPropWin->Invalidate();
432 static_cast<OTaskWindow*>(m_pTaskPane.get())->setPropertyBrowser(m_pPropWin);
433 notifySystemWindow(this,m_pPropWin,::comphelper::mem_fun(&TaskPaneList::AddWindow));
434 }
435 if ( !(m_pPropWin && _bToggleOn != m_pPropWin->IsVisible()) )
436 return;
437
438 if ( !m_pCurrentView && !m_xReportComponent.is() )
439 m_xReportComponent = getController().getReportDefinition();
440
441 const bool bWillBeVisible = _bToggleOn;
442 m_pPropWin->Show(bWillBeVisible);
443 m_pTaskPane->Show(bWillBeVisible);
444 m_pTaskPane->Invalidate();
445
446 if ( bWillBeVisible )
447 m_aSplitWin->InsertItem( TASKPANE_ID, m_pTaskPane,START_SIZE_TASKPANE, SPLITWINDOW_APPEND, COLSET_ID, SplitWindowItemFlags::PercentSize);
448 else
449 m_aSplitWin->RemoveItem(TASKPANE_ID);
450
451 if ( bWillBeVisible )
452 m_aMarkIdle.Start();
453}
454
455void ODesignView::showProperties(const uno::Reference< uno::XInterface>& _xReportComponent)
456{
457 if ( m_xReportComponent != _xReportComponent )
458 {
459 m_xReportComponent = _xReportComponent;
460 if ( m_pCurrentView )
461 m_aScrollWindow->setMarked(m_pCurrentView,false);
462 m_pCurrentView = nullptr;
463 m_aMarkIdle.Start();
464 }
465}
466
467bool ODesignView::isReportExplorerVisible() const
468{
469 return m_xReportExplorer && m_xReportExplorer->getDialog()->get_visible();
470}
471
472void ODesignView::toggleReportExplorer()
473{
474 if ( !m_xReportExplorer )
475 {
476 OReportController& rReportController = getController();
477 m_xReportExplorer = std::make_shared<ONavigator>(GetFrameWeld(), rReportController);
478 SvtViewOptions aDlgOpt(EViewType::Window, m_xReportExplorer->get_help_id());
479 if ( aDlgOpt.Exists() )
480 m_xReportExplorer->getDialog()->set_window_state(aDlgOpt.GetWindowState());
481 }
482
483 if (!m_xReportExplorer->getDialog()->get_visible())
484 weld::DialogController::runAsync(m_xReportExplorer, [this](sal_Int32 /*nResult*/) { m_xReportExplorer.reset(); });
485 else
486 m_xReportExplorer->response(RET_CANCEL);
487}
488
489bool ODesignView::isAddFieldVisible() const
490{
491 return m_xAddField && m_xAddField->getDialog()->get_visible();
492}
493
494void ODesignView::toggleAddField()
495{
496 if (!m_xAddField)
497 {
498 uno::Reference< report::XReportDefinition > xReport(m_xReportComponent,uno::UNO_QUERY);
499 uno::Reference< report::XReportComponent > xReportComponent(m_xReportComponent,uno::UNO_QUERY);
500 OReportController& rReportController = getController();
501 if ( !m_pCurrentView && !xReport.is() )
502 {
503 if ( xReportComponent.is() )
504 xReport = xReportComponent->getSection()->getReportDefinition();
505 else
506 xReport = rReportController.getReportDefinition().get();
507 }
508 else if ( m_pCurrentView )
509 {
510 uno::Reference< report::XSection > xSection = m_pCurrentView->getReportSection()->getSection();
511 xReport = xSection->getReportDefinition();
512 }
513 uno::Reference < beans::XPropertySet > xSet(rReportController.getRowSet(),uno::UNO_QUERY);
514 m_xAddField = std::make_shared<OAddFieldWindow>(GetFrameWeld(), xSet);
515 m_xAddField->SetCreateHdl(LINK( &rReportController, OReportController, OnCreateHdl ) );
516 SvtViewOptions aDlgOpt( EViewType::Window, UID_RPT_RPT_APP_VIEW );
517 if ( aDlgOpt.Exists() )
518 m_xAddField->getDialog()->set_window_state(aDlgOpt.GetWindowState());
519 m_xAddField->Update();
520 }
521 if (!m_xAddField->getDialog()->get_visible())
522 weld::DialogController::runAsync(m_xAddField, [this](sal_Int32 /*nResult*/) { m_xAddField.reset(); });
523 else
524 m_xAddField->response(RET_CANCEL);
525}
526
527uno::Reference< report::XSection > ODesignView::getCurrentSection() const
528{
529 uno::Reference< report::XSection > xSection;
530 if ( m_pCurrentView )
531 xSection = m_pCurrentView->getReportSection()->getSection();
532
533 return xSection;
534}
535
536uno::Reference< report::XReportComponent > ODesignView::getCurrentControlModel() const
537{
538 uno::Reference< report::XReportComponent > xModel;
539 if ( m_pCurrentView )
540 {
541 xModel = m_pCurrentView->getReportSection()->getCurrentControlModel();
542 }
543 return xModel;
544}
545
546OSectionWindow* ODesignView::getMarkedSection(NearSectionAccess nsa) const
547{
548 return m_aScrollWindow->getMarkedSection(nsa);
549}
550
551OSectionWindow* ODesignView::getSectionWindow(const css::uno::Reference< css::report::XSection>& _xSection) const
552{
553 return m_aScrollWindow->getSectionWindow(_xSection);
554}
555
556void ODesignView::markSection(const sal_uInt16 _nPos)
557{
558 m_aScrollWindow->markSection(_nPos);
559}
560
561void ODesignView::fillCollapsedSections(::std::vector<sal_uInt16>& _rCollapsedPositions) const
562{
563 m_aScrollWindow->fillCollapsedSections(_rCollapsedPositions);
564}
565
566void ODesignView::collapseSections(const uno::Sequence< beans::PropertyValue>& _aCollapsedSections)
567{
568 m_aScrollWindow->collapseSections(_aCollapsedSections);
569}
570
571OUString ODesignView::getCurrentPage() const
572{
573 return m_pPropWin ? m_pPropWin->getCurrentPage() : OUString();
574}
575
576void ODesignView::setCurrentPage(const OUString& _sLastActivePage)
577{
578 if ( m_pPropWin )
579 m_pPropWin->setCurrentPage(_sLastActivePage);
580}
581
582void ODesignView::alignMarkedObjects(ControlModification _nControlModification,bool _bAlignAtSection)
583{
584 m_aScrollWindow->alignMarkedObjects(_nControlModification, _bAlignAtSection);
585}
586
587bool ODesignView::handleKeyEvent(const KeyEvent& _rEvent)
588{
589 if ( m_pPropWin && m_pPropWin->HasChildPathFocus() )
590 return false;
591 if (m_xAddField && m_xAddField->getDialog()->has_toplevel_focus())
592 return false;
593 if (m_xReportExplorer && m_xReportExplorer->getDialog()->has_toplevel_focus())
594 return false;
595 return m_aScrollWindow->handleKeyEvent(_rEvent);
596}
597
598void ODesignView::setMarked(const uno::Reference< report::XSection>& _xSection,bool _bMark)
599{
600 m_aScrollWindow->setMarked(_xSection,_bMark);
601 if ( _bMark )
602 UpdatePropertyBrowserDelayed(getMarkedSection()->getReportSection().getSectionView());
603 else
604 m_pCurrentView = nullptr;
605}
606
607void ODesignView::setMarked(const uno::Sequence< uno::Reference< report::XReportComponent> >& _aShapes,bool _bMark)
608{
609 m_aScrollWindow->setMarked(_aShapes,_bMark);
610 if ( _aShapes.hasElements() && _bMark )
611 showProperties(_aShapes[0]);
612 else
613 m_xReportComponent.clear();
614}
615
616void ODesignView::MouseButtonDown( const MouseEvent& rMEvt )
617{
618 if ( rMEvt.IsLeft() )
619 {
620 const uno::Sequence< beans::PropertyValue> aArgs;
621 getController().executeChecked(SID_SELECT_REPORT,aArgs);
622 }
623 ODataView::MouseButtonDown(rMEvt);
624}
625
626uno::Any ODesignView::getCurrentlyShownProperty() const
627{
628 uno::Any aRet;
629 OSectionWindow* pSectionWindow = getMarkedSection();
630 if ( pSectionWindow )
631 {
632 ::std::vector< uno::Reference< uno::XInterface > > aSelection;
633 pSectionWindow->getReportSection().fillControlModelSelection(aSelection);
634 if ( !aSelection.empty() )
635 {
636 uno::Sequence< uno::Reference< report::XReportComponent > > aSeq(aSelection.size());
637 std::transform(
638 aSelection.begin(), aSelection.end(), aSeq.getArray(),
639 [](const auto& rxInterface)
640 { return uno::Reference<report::XReportComponent>(rxInterface, uno::UNO_QUERY); });
641 aRet <<= aSeq;
642 }
643 }
644 return aRet;
645}
646
647void ODesignView::fillControlModelSelection(::std::vector< uno::Reference< uno::XInterface > >& _rSelection) const
648{
649 m_aScrollWindow->fillControlModelSelection(_rSelection);
650}
651
652void ODesignView::setGridSnap(bool bOn)
653{
654 m_aScrollWindow->setGridSnap(bOn);
655
656}
657
658void ODesignView::setDragStripes(bool bOn)
659{
660 m_aScrollWindow->setDragStripes(bOn);
661}
662
663bool ODesignView::isHandleEvent() const
664{
665 return m_pPropWin && m_pPropWin->HasChildPathFocus();
666}
667
668sal_uInt32 ODesignView::getMarkedObjectCount() const
669{
670 return m_aScrollWindow->getMarkedObjectCount();
671}
672
673void ODesignView::zoom(const Fraction& _aZoom)
674{
675 m_aScrollWindow->zoom(_aZoom);
676}
677
678sal_uInt16 ODesignView::getZoomFactor(SvxZoomType _eType) const
679{
680 return m_aScrollWindow->getZoomFactor(_eType);
681}
682
683} // rptui
684
685
686/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
VclPtr< PropBrw > m_pPropWin
Definition: DesignView.cxx:61
#define COLSET_ID
Definition: DesignView.cxx:53
#define START_SIZE_TASKPANE
Definition: DesignView.cxx:52
#define REPORT_ID
Definition: DesignView.cxx:54
#define TASKPANE_ID
Definition: DesignView.cxx:55
static const AllSettings & GetSettings()
DataChangedEventType GetType() const
AllSettingsFlags GetFlags() const
const vcl::KeyCode & GetKeyCode() const
bool IsLeft() const
const KeyEvent * GetKeyEvent() const
NotifyEventType GetType() const
void setX(tools::Long nX)
constexpr tools::Long X() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
static sal_Int32 GetSplitSize()
void SetWindowState(const OUString &sState)
OUString GetWindowState() const
bool Exists() const
void AddWindow(vcl::Window *pWindow)
void RemoveWindow(vcl::Window *pWindow)
static VclPtr< reference_type > Create(Arg &&... arg)
virtual void dispose() override
ODesignView(ODesignView const &)=delete
const css::uno::Reference< css::report::XReportDefinition > & getReportDefinition() const
gives access to the report definition
css::uno::Reference< css::sdbc::XRowSet > const & getRowSet()
returns the RowSet which reflects the current settings of the report definition
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...
OReportSection & getReportSection()
static css::awt::KeyEvent st_VCLKey2AWTKey(const vcl::KeyCode &aKey)
constexpr tools::Long Top() const
void SetSize(const Size &)
constexpr Point TopLeft() const
void SetPos(const Point &rPoint)
constexpr Size GetSize() const
constexpr tools::Long Right() const
constexpr Point BottomRight() const
constexpr bool IsEmpty() const
virtual void dispose() override
void GrabFocus()
static bool runAsync(const std::shared_ptr< DialogController > &rController, const std::function< void(sal_Int32)> &)
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
virtual void SetHelpId(const OUString &) override
#define UID_RPT_RPT_APP_VIEW
Definition: helpids.h:29
Sequence< sal_Int8 > aSeq
NONE
void Create(SwFormatVertOrient &rItem, SvStream &rStrm, sal_uInt16 nVersionAbusedAsSize)
@ RPTUI_HINT_SELECTIONCHANGED
Definition: RptObject.hxx:41
ControlModification
Definition: RptDef.hxx:49
void notifySystemWindow(vcl::Window const *pWindow, vcl::Window *pToRegister, const ::comphelper::mem_fun1_t< TaskPaneList, vcl::Window * > &rMemFunc)
notifySystemWindow adds or remove the given window _pToRegister at the Systemwindow found when search...
Definition: UITools.cxx:836
IMPL_LINK_NOARG(ODesignView, SplitHdl, SplitWindow *, void)
Definition: DesignView.cxx:402
void dispose()
long Long
#define SPLITWINDOW_APPEND
Reference< XModel > xModel
SdrObjKind
RET_CANCEL
WinBits const WB_DIALOGCONTROL
sal_Int32 _nPos
SvxZoomType