LibreOffice Module reportdesign (master) 1
RptObject.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#include <RptObject.hxx>
20#include <algorithm>
21
22#include <RptDef.hxx>
23#include <svx/unoshape.hxx>
24#include <RptModel.hxx>
25#include <RptObjectListener.hxx>
26#include <RptPage.hxx>
27
28#include <strings.hxx>
29#include <svtools/embedhlp.hxx>
30#include <com/sun/star/style/XStyle.hpp>
31#include <com/sun/star/awt/TextAlign.hpp>
32#include <com/sun/star/beans/XPropertySet.hpp>
33#include <com/sun/star/embed/XComponentSupplier.hpp>
34#include <com/sun/star/embed/XEmbeddedObject.hpp>
35#include <com/sun/star/lang/XServiceInfo.hpp>
36#include <com/sun/star/report/XFixedLine.hpp>
37#include <com/sun/star/chart/ChartDataRowSource.hpp>
38#include <com/sun/star/chart2/data/XDataReceiver.hpp>
39#include <com/sun/star/chart2/data/XDatabaseDataProvider.hpp>
40#include <com/sun/star/chart2/XChartDocument.hpp>
41#include <com/sun/star/style/ParagraphAdjust.hpp>
42#include <com/sun/star/report/XFormattedField.hpp>
46#include <svx/svdundo.hxx>
48#include <PropertyForward.hxx>
49#include <UndoEnv.hxx>
50#include <utility>
51
52namespace rptui
53{
54
55using namespace ::com::sun::star;
56using namespace uno;
57using namespace beans;
58using namespace reportdesign;
59using namespace container;
60using namespace report;
61
62SdrObjKind OObjectBase::getObjectType(const uno::Reference< report::XReportComponent>& _xComponent)
63{
64 uno::Reference< lang::XServiceInfo > xServiceInfo( _xComponent , uno::UNO_QUERY );
65 OSL_ENSURE(xServiceInfo.is(),"Who deletes the XServiceInfo interface!");
66 if ( !xServiceInfo )
67 return SdrObjKind::NONE;
68
69 if ( xServiceInfo->supportsService( SERVICE_FIXEDTEXT ))
70 return SdrObjKind::ReportDesignFixedText;
71 if ( xServiceInfo->supportsService( SERVICE_FIXEDLINE ))
72 {
73 uno::Reference< report::XFixedLine> xFixedLine(_xComponent,uno::UNO_QUERY);
74 return xFixedLine->getOrientation() ? SdrObjKind::ReportDesignHorizontalFixedLine : SdrObjKind::ReportDesignVerticalFixedLine;
75 }
76 if ( xServiceInfo->supportsService( SERVICE_IMAGECONTROL))
77 return SdrObjKind::ReportDesignImageControl;
78 if ( xServiceInfo->supportsService( SERVICE_FORMATTEDFIELD ))
79 return SdrObjKind::ReportDesignFormattedField;
80 if ( xServiceInfo->supportsService("com.sun.star.drawing.OLE2Shape") )
81 return SdrObjKind::OLE2;
82 if ( xServiceInfo->supportsService( SERVICE_SHAPE ))
83 return SdrObjKind::CustomShape;
84 if ( xServiceInfo->supportsService( SERVICE_REPORTDEFINITION ) )
85 return SdrObjKind::ReportDesignSubReport;
86 return SdrObjKind::OLE2;
87}
88
89rtl::Reference<SdrObject> OObjectBase::createObject(
90 SdrModel& rTargetModel,
91 const uno::Reference< report::XReportComponent>& _xComponent)
92{
94 SdrObjKind nType = OObjectBase::getObjectType(_xComponent);
95 switch( nType )
96 {
97 case SdrObjKind::ReportDesignFixedText:
98 {
100 rTargetModel,
101 _xComponent,
102 "com.sun.star.form.component.FixedText",
103 SdrObjKind::ReportDesignFixedText);
104 pNewObj = pUnoObj;
105
106 uno::Reference<beans::XPropertySet> xControlModel(pUnoObj->GetUnoControlModel(),uno::UNO_QUERY);
107 if ( xControlModel.is() )
108 xControlModel->setPropertyValue( PROPERTY_MULTILINE,uno::Any(true));
109 }
110 break;
111 case SdrObjKind::ReportDesignImageControl:
112 pNewObj = new OUnoObject(
113 rTargetModel,
114 _xComponent,
115 "com.sun.star.form.component.DatabaseImageControl",
116 SdrObjKind::ReportDesignImageControl);
117 break;
118 case SdrObjKind::ReportDesignFormattedField:
119 pNewObj = new OUnoObject(
120 rTargetModel,
121 _xComponent,
122 "com.sun.star.form.component.FormattedField",
123 SdrObjKind::ReportDesignFormattedField);
124 break;
125 case SdrObjKind::ReportDesignHorizontalFixedLine:
126 case SdrObjKind::ReportDesignVerticalFixedLine:
127 pNewObj = new OUnoObject(
128 rTargetModel,
129 _xComponent,
130 "com.sun.star.awt.UnoControlFixedLineModel",
131 nType);
132 break;
133 case SdrObjKind::CustomShape:
134 pNewObj = OCustomShape::Create(
135 rTargetModel,
136 _xComponent);
137 try
138 {
139 bool bOpaque = false;
140 _xComponent->getPropertyValue(PROPERTY_OPAQUE) >>= bOpaque;
141 pNewObj->NbcSetLayer(bOpaque ? RPT_LAYER_FRONT : RPT_LAYER_BACK);
142 }
143 catch(const uno::Exception&)
144 {
145 DBG_UNHANDLED_EXCEPTION("reportdesign");
146 }
147 break;
148 case SdrObjKind::ReportDesignSubReport:
149 case SdrObjKind::OLE2:
150 pNewObj = OOle2Obj::Create(
151 rTargetModel,
152 _xComponent,
153 nType);
154 break;
155 default:
156 OSL_FAIL("Unknown object id");
157 break;
158 }
159
160 if ( pNewObj )
161 pNewObj->SetDoNotInsertIntoPageAutomatically( true );
162
163 return pNewObj;
164}
165
166namespace
167{
168 class ParaAdjust : public AnyConverter
169 {
170 public:
171 virtual css::uno::Any operator() (const OUString& _sPropertyName,const css::uno::Any& lhs) const override
172 {
173 uno::Any aRet;
174 if (_sPropertyName == PROPERTY_PARAADJUST)
175 {
176 sal_Int16 nTextAlign = 0;
177 lhs >>= nTextAlign;
178 style::ParagraphAdjust eAdjust;
179 switch(nTextAlign)
180 {
181 case awt::TextAlign::LEFT:
182 eAdjust = style::ParagraphAdjust_LEFT;
183 break;
184 case awt::TextAlign::CENTER:
185 eAdjust = style::ParagraphAdjust_CENTER;
186 break;
187 case awt::TextAlign::RIGHT:
188 eAdjust = style::ParagraphAdjust_RIGHT;
189 break;
190 default:
191 OSL_FAIL("Illegal text alignment value!");
192 break;
193 }
194 aRet <<= eAdjust;
195 }
196 else
197 {
198 sal_Int16 nTextAlign = 0;
199 sal_Int16 eParagraphAdjust = 0;
200 lhs >>= eParagraphAdjust;
201 switch(static_cast<style::ParagraphAdjust>(eParagraphAdjust))
202 {
203 case style::ParagraphAdjust_LEFT:
204 case style::ParagraphAdjust_BLOCK:
205 nTextAlign = awt::TextAlign::LEFT;
206 break;
207 case style::ParagraphAdjust_CENTER:
208 nTextAlign = awt::TextAlign::CENTER;
209 break;
210 case style::ParagraphAdjust_RIGHT:
211 nTextAlign = awt::TextAlign::RIGHT;
212 break;
213 default:
214 OSL_FAIL("Illegal text alignment value!");
215 break;
216 }
217 aRet <<= nTextAlign;
218 }
219 return aRet;
220 }
221 };
222}
223
225{
226 switch(_nObjectId)
227 {
228 case SdrObjKind::ReportDesignImageControl:
229 {
230 static TPropertyNamePair s_aNameMap = []()
231 {
232 auto aNoConverter = std::make_shared<AnyConverter>();
237 return tmp;
238 }();
239 return s_aNameMap;
240 }
241
242 case SdrObjKind::ReportDesignFixedText:
243 {
244 static TPropertyNamePair s_aNameMap = []()
245 {
246 auto aNoConverter = std::make_shared<AnyConverter>();
257
258 auto aParaAdjust = std::make_shared<ParaAdjust>();
259 tmp.emplace(PROPERTY_PARAADJUST,TPropertyConverter(PROPERTY_ALIGN,aParaAdjust));
260 return tmp;
261 }();
262 return s_aNameMap;
263 }
264 case SdrObjKind::ReportDesignFormattedField:
265 {
266 static TPropertyNamePair s_aNameMap = []()
267 {
268 auto aNoConverter = std::make_shared<AnyConverter>();
279 auto aParaAdjust = std::make_shared<ParaAdjust>();
280 tmp.emplace(PROPERTY_PARAADJUST,TPropertyConverter(PROPERTY_ALIGN,aParaAdjust));
281 return tmp;
282 }();
283 return s_aNameMap;
284 }
285
286 case SdrObjKind::CustomShape:
287 {
288 static TPropertyNamePair s_aNameMap = []()
289 {
290 auto aNoConverter = std::make_shared<AnyConverter>();
292 tmp.emplace(OUString("FillColor"),TPropertyConverter(PROPERTY_CONTROLBACKGROUND,aNoConverter));
293 tmp.emplace(PROPERTY_PARAADJUST,TPropertyConverter(PROPERTY_ALIGN,aNoConverter));
294 return tmp;
295 }();
296 return s_aNameMap;
297 }
298
299 default:
300 break;
301 }
302 static TPropertyNamePair s_aEmptyNameMap;
303 return s_aEmptyNameMap;
304}
305
306
307OObjectBase::OObjectBase(const uno::Reference< report::XReportComponent>& _xComponent)
308:m_bIsListening(false)
309{
310 m_xReportComponent = _xComponent;
311}
312
313OObjectBase::OObjectBase(OUString _sComponentName)
314:m_sComponentName(std::move(_sComponentName))
315,m_bIsListening(false)
316{
317 assert(!m_sComponentName.isEmpty());
318}
319
320OObjectBase::~OObjectBase()
321{
322 m_xMediator.clear();
323 if ( isListening() )
324 EndListening();
325 m_xReportComponent.clear();
326}
327
328uno::Reference< report::XSection> OObjectBase::getSection() const
329{
330 uno::Reference< report::XSection> xSection;
331 OReportPage* pPage = dynamic_cast<OReportPage*>(GetImplPage());
332 if ( pPage )
333 xSection = pPage->getSection();
334 return xSection;
335}
336
337
338uno::Reference< beans::XPropertySet> OObjectBase::getAwtComponent()
339{
340 return uno::Reference< beans::XPropertySet>();
341}
342
343void OObjectBase::StartListening()
344{
345 OSL_ENSURE(!isListening(), "OUnoObject::StartListening: already listening!");
346
347 if ( !isListening() && m_xReportComponent.is() )
348 {
349 m_bIsListening = true;
350
351 if ( !m_xPropertyChangeListener.is() )
352 {
353 m_xPropertyChangeListener = new OObjectListener( this );
354 // register listener to all properties
355 m_xReportComponent->addPropertyChangeListener( OUString() , m_xPropertyChangeListener );
356 }
357 }
358}
359
360void OObjectBase::EndListening()
361{
362 OSL_ENSURE(!m_xReportComponent.is() || isListening(), "OUnoObject::EndListening: not listening currently!");
363
364 if ( isListening() && m_xReportComponent.is() )
365 {
366 // XPropertyChangeListener
367 if ( m_xPropertyChangeListener.is() )
368 {
369 // remove listener
370 try
371 {
372 m_xReportComponent->removePropertyChangeListener( OUString() , m_xPropertyChangeListener );
373 }
374 catch(const uno::Exception &)
375 {
376 TOOLS_WARN_EXCEPTION( "package", "OObjectBase::EndListening");
377 }
378 }
379 m_xPropertyChangeListener.clear();
380 }
381 m_bIsListening = false;
382}
383
384void OObjectBase::SetPropsFromRect(const tools::Rectangle& _rRect)
385{
386 // set properties
387 OReportPage* pPage = dynamic_cast<OReportPage*>(GetImplPage());
388 if ( pPage && !_rRect.IsEmpty() )
389 {
390 const uno::Reference<report::XSection>& xSection = pPage->getSection();
391 assert(_rRect.getOpenHeight() >= 0);
392 const sal_uInt32 newHeight( ::std::max(tools::Long(0), _rRect.getOpenHeight()+_rRect.Top()) );
393 if ( xSection.is() && ( newHeight > xSection->getHeight() ) )
394 xSection->setHeight( newHeight );
395
396 // TODO
397 //pModel->GetRefDevice()->Invalidate(InvalidateFlags::Children);
398 }
399}
400
401void OObjectBase::_propertyChange( const beans::PropertyChangeEvent& /*evt*/ )
402{
403}
404
405bool OObjectBase::supportsService( const OUString& _sServiceName ) const
406{
407 // TODO: cache xServiceInfo as member?
408 Reference< lang::XServiceInfo > xServiceInfo( m_xReportComponent , UNO_QUERY );
409
410 if ( xServiceInfo.is() )
411 return cppu::supportsService(xServiceInfo.get(), _sServiceName);
412 else
413 return false;
414}
415
416
417uno::Reference< drawing::XShape > OObjectBase::getUnoShapeOf( SdrObject& _rSdrObject )
418{
419 uno::Reference< drawing::XShape > xShape( _rSdrObject.getWeakUnoShape() );
420 if ( xShape.is() )
421 return xShape;
422
423 xShape = _rSdrObject.SdrObject::getUnoShape();
424 if ( !xShape.is() )
425 return xShape;
426
427 m_xKeepShapeAlive = xShape;
428 return xShape;
429}
430
431OCustomShape::OCustomShape(
432 SdrModel& rSdrModel,
433 const uno::Reference< report::XReportComponent>& _xComponent)
434: SdrObjCustomShape(rSdrModel)
435 ,OObjectBase(_xComponent)
436{
437 setUnoShape( uno::Reference< drawing::XShape >(_xComponent,uno::UNO_QUERY_THROW) );
438 m_bIsListening = true;
439}
440
441OCustomShape::OCustomShape(
442 SdrModel& rSdrModel)
443: SdrObjCustomShape(rSdrModel)
444 ,OObjectBase(SERVICE_SHAPE)
445{
446 m_bIsListening = true;
447}
448
449
451{
452}
453
455{
456 return SdrObjKind::CustomShape;
457}
458
460{
461 return SdrInventor::ReportDesign;
462}
463
465{
467}
468
469void OCustomShape::NbcMove( const Size& rSize )
470{
471 if ( m_bIsListening )
472 {
473 m_bIsListening = false;
474
475 if ( m_xReportComponent.is() )
476 {
477 OReportModel& rRptModel(static_cast< OReportModel& >(getSdrModelFromSdrObject()));
479 m_xReportComponent->setPositionX(m_xReportComponent->getPositionX() + rSize.Width());
480 m_xReportComponent->setPositionY(m_xReportComponent->getPositionY() + rSize.Height());
481 }
482
483 // set geometry properties
484 SetPropsFromRect(GetSnapRect());
485
486 m_bIsListening = true;
487 }
488 else
490}
491
492void OCustomShape::NbcResize(const Point& rRef, const Fraction& xFract, const Fraction& yFract)
493{
494 SdrObjCustomShape::NbcResize( rRef, xFract, yFract );
495
496 SetPropsFromRect(GetSnapRect());
497}
498
500{
502 SetPropsFromRect(rRect);
503}
504
506{
507 bool bResult = SdrObjCustomShape::EndCreate(rStat, eCmd);
508 if ( bResult )
509 {
510 OReportModel& rRptModel(static_cast< OReportModel& >(getSdrModelFromSdrObject()));
512
513 if ( !m_xReportComponent.is() )
514 m_xReportComponent.set(getUnoShape(),uno::UNO_QUERY);
515
516 SetPropsFromRect(GetSnapRect());
517 }
518
519 return bResult;
520}
521
522
523uno::Reference< beans::XPropertySet> OCustomShape::getAwtComponent()
524{
525 return m_xReportComponent;
526}
527
528
529uno::Reference< drawing::XShape > OCustomShape::getUnoShape()
530{
531 uno::Reference<drawing::XShape> xShape = OObjectBase::getUnoShapeOf( *this );
532 if ( !m_xReportComponent.is() )
533 {
534 OReportModel& rRptModel(static_cast< OReportModel& >(getSdrModelFromSdrObject()));
536 m_xReportComponent.set(xShape,uno::UNO_QUERY);
537 }
538 return xShape;
539}
540
541void OCustomShape::setUnoShape( const uno::Reference< drawing::XShape >& rxUnoShape )
542{
543 SdrObjCustomShape::setUnoShape( rxUnoShape );
544 releaseUnoShape();
545 m_xReportComponent.clear();
546}
547
548static OUString ObjectTypeToServiceName(SdrObjKind _nObjectType)
549{
550 switch (_nObjectType)
551 {
552 case SdrObjKind::ReportDesignFixedText:
553 return SERVICE_FIXEDTEXT;
554 case SdrObjKind::ReportDesignImageControl:
556 case SdrObjKind::ReportDesignFormattedField:
558 case SdrObjKind::ReportDesignVerticalFixedLine:
559 case SdrObjKind::ReportDesignHorizontalFixedLine:
560 return SERVICE_FIXEDLINE;
561 case SdrObjKind::CustomShape:
562 return SERVICE_SHAPE;
563 case SdrObjKind::ReportDesignSubReport:
565 case SdrObjKind::OLE2:
566 return "com.sun.star.chart2.ChartDocument";
567 default:
568 break;
569 }
570 assert(false && "Unknown object id");
571 return "";
572}
574 SdrModel& rSdrModel,
575 const OUString& rModelName,
576 SdrObjKind _nObjectType)
577: SdrUnoObj(rSdrModel, rModelName)
578 ,OObjectBase(ObjectTypeToServiceName(_nObjectType))
579 ,m_nObjectType(_nObjectType)
580 // tdf#119067
581 ,m_bSetDefaultLabel(false)
582{
583 if ( !rModelName.isEmpty() )
585}
586
588 SdrModel& rSdrModel, OUnoObject const & rSource)
589: SdrUnoObj(rSdrModel, rSource)
590 ,OObjectBase(ObjectTypeToServiceName(rSource.m_nObjectType)) // source may not have a service name
591 ,m_nObjectType(rSource.m_nObjectType)
592 // tdf#119067
593 ,m_bSetDefaultLabel(rSource.m_bSetDefaultLabel)
594{
595 osl_atomic_increment(&m_refCount); // getUnoShape will ref-count this
596 {
597 if ( !rSource.getUnoControlModelTypeName().isEmpty() )
599 Reference<XPropertySet> xSource(const_cast<OUnoObject&>(rSource).getUnoShape(), uno::UNO_QUERY);
600 Reference<XPropertySet> xDest(getUnoShape(), uno::UNO_QUERY);
601 if ( xSource.is() && xDest.is() )
602 comphelper::copyProperties(xSource, xDest);
603 }
604 osl_atomic_decrement(&m_refCount);
605}
606
608 SdrModel& rSdrModel,
609 const uno::Reference< report::XReportComponent>& _xComponent,
610 const OUString& rModelName,
611 SdrObjKind _nObjectType)
612: SdrUnoObj(rSdrModel, rModelName)
613 ,OObjectBase(_xComponent)
614 ,m_nObjectType(_nObjectType)
615 // tdf#119067
616 ,m_bSetDefaultLabel(false)
617{
618 setUnoShape( uno::Reference< drawing::XShape >( _xComponent, uno::UNO_QUERY_THROW ) );
619
620 if ( !rModelName.isEmpty() )
622
623}
624
626{
627}
628
630{
631 try
632 {
633 Reference< XFormattedField > xFormatted( m_xReportComponent, UNO_QUERY );
634 if ( xFormatted.is() )
635 {
636 const Reference< XPropertySet > xModelProps( GetUnoControlModel(), UNO_QUERY_THROW );
637 xModelProps->setPropertyValue( "TreatAsNumber", Any( false ) );
638 xModelProps->setPropertyValue( PROPERTY_VERTICALALIGN,m_xReportComponent->getPropertyValue(PROPERTY_VERTICALALIGN));
639 }
640 }
641 catch( const Exception& )
642 {
643 DBG_UNHANDLED_EXCEPTION("reportdesign");
644 }
645}
646
648{
649 return m_nObjectType;
650}
651
653{
654 return SdrInventor::ReportDesign;
655}
656
658{
660}
661
662void OUnoObject::NbcMove( const Size& rSize )
663{
664
665 if ( m_bIsListening )
666 {
667 // stop listening
668 OObjectBase::EndListening();
669
670 bool bPositionFixed = false;
671 Size aUndoSize(0,0);
672 if ( m_xReportComponent.is() )
673 {
674 bool bUndoMode = false;
675 OReportModel& rRptModel(static_cast< OReportModel& >(getSdrModelFromSdrObject()));
676
677 if (rRptModel.GetUndoEnv().IsUndoMode())
678 {
679 // if we are locked from outside, then we must not handle wrong moves, we are in UNDO mode
680 bUndoMode = true;
681 }
683
684 // LLA: why there exists getPositionX and getPositionY and NOT getPosition() which return a Point?
685 int nNewX = m_xReportComponent->getPositionX() + rSize.Width();
686 m_xReportComponent->setPositionX(nNewX);
687 int nNewY = m_xReportComponent->getPositionY() + rSize.Height();
688 if (nNewY < 0 && !bUndoMode)
689 {
690 aUndoSize.setHeight( abs(nNewY) );
691 bPositionFixed = true;
692 nNewY = 0;
693 }
694 m_xReportComponent->setPositionY(nNewY);
695 }
696 if (bPositionFixed)
697 {
698 getSdrModelFromSdrObject().AddUndo(getSdrModelFromSdrObject().GetSdrUndoFactory().CreateUndoMoveObject(*this, aUndoSize));
699 }
700 // set geometry properties
701 SetPropsFromRect(GetLogicRect());
702
703 // start listening
704 OObjectBase::StartListening();
705 }
706 else
707 SdrUnoObj::NbcMove( rSize );
708}
709
710
711void OUnoObject::NbcResize(const Point& rRef, const Fraction& xFract, const Fraction& yFract)
712{
713 SdrUnoObj::NbcResize( rRef, xFract, yFract );
714
715 // stop listening
716 OObjectBase::EndListening();
717
718 // set geometry properties
719 SetPropsFromRect(GetLogicRect());
720
721 // start listening
722 OObjectBase::StartListening();
723}
724
726{
728 // stop listening
729 OObjectBase::EndListening();
730
731 // set geometry properties
732 SetPropsFromRect(rRect);
733
734 // start listening
735 OObjectBase::StartListening();
736}
737
739{
740 const bool bResult(SdrUnoObj::EndCreate(rStat, eCmd));
741
742 if(bResult)
743 {
744 // tdf#118730 remember if this object was created interactively (due to ::EndCreate being called)
745 m_bSetDefaultLabel = true;
746
747 // set geometry properties
748 SetPropsFromRect(GetLogicRect());
749 }
750
751 return bResult;
752}
753
755{
756 OUString aDefaultName = "HERE WE HAVE TO INSERT OUR NAME!";
757 if ( _pObj->supportsService( SERVICE_FIXEDTEXT ) )
758 {
759 aDefaultName = RID_STR_CLASS_FIXEDTEXT;
760 }
761 else if ( _pObj->supportsService( SERVICE_FIXEDLINE ) )
762 {
763 aDefaultName = RID_STR_CLASS_FIXEDLINE;
764 }
765 else if ( _pObj->supportsService( SERVICE_IMAGECONTROL ) )
766 {
767 aDefaultName = RID_STR_CLASS_IMAGECONTROL;
768 }
769 else if ( _pObj->supportsService( SERVICE_FORMATTEDFIELD ) )
770 {
771 aDefaultName = RID_STR_CLASS_FORMATTEDFIELD;
772 }
773
774 return aDefaultName;
775}
776
777void OUnoObject::_propertyChange( const beans::PropertyChangeEvent& evt )
778{
779 OObjectBase::_propertyChange(evt);
780 if (!isListening())
781 return;
782
783 if ( evt.PropertyName == PROPERTY_CHARCOLOR )
784 {
785 Reference<XPropertySet> xControlModel(GetUnoControlModel(),uno::UNO_QUERY);
786 if ( xControlModel.is() )
787 {
788 OObjectBase::EndListening();
789 try
790 {
791 xControlModel->setPropertyValue(PROPERTY_TEXTCOLOR,evt.NewValue);
792 }
793 catch(uno::Exception&)
794 {
795 }
796 OObjectBase::StartListening();
797 }
798 }
799 else if ( evt.PropertyName == PROPERTY_NAME )
800 {
801 Reference<XPropertySet> xControlModel(GetUnoControlModel(),uno::UNO_QUERY);
802 if ( xControlModel.is() && xControlModel->getPropertySetInfo()->hasPropertyByName(PROPERTY_NAME) )
803 {
804 // get old name
805 OUString aOldName;
806 evt.OldValue >>= aOldName;
807
808 // get new name
809 OUString aNewName;
810 evt.NewValue >>= aNewName;
811
812 if ( aNewName != aOldName )
813 {
814 // set old name property
815 OObjectBase::EndListening();
816 if ( m_xMediator.is() )
817 m_xMediator->stopListening();
818 try
819 {
820 xControlModel->setPropertyValue( PROPERTY_NAME, evt.NewValue );
821 }
822 catch(uno::Exception&)
823 {
824 }
825 if ( m_xMediator.is() )
826 m_xMediator->startListening();
827 OObjectBase::StartListening();
828 }
829 }
830 }
831}
832
833void OUnoObject::CreateMediator(bool _bReverse)
834{
835 if ( m_xMediator.is() )
836 return;
837
838 // tdf#118730 Directly do things formerly done in
839 // OUnoObject::impl_setReportComponent_nothrow here
840 if(!m_xReportComponent.is())
841 {
842 OReportModel& rRptModel(static_cast< OReportModel& >(getSdrModelFromSdrObject()));
843 OXUndoEnvironment::OUndoEnvLock aLock( rRptModel.GetUndoEnv() );
844 m_xReportComponent.set(getUnoShape(),uno::UNO_QUERY);
845
847 }
848
849 if(m_xReportComponent.is() && m_bSetDefaultLabel)
850 {
851 // tdf#118730 Directly do things formerly done in
852 // OUnoObject::EndCreate here
853 // tdf#119067 ...but *only* if result of interactive
854 // creation in Report DesignView
855 m_bSetDefaultLabel = false;
856
857 try
858 {
860 {
861 m_xReportComponent->setPropertyValue(
863 uno::Any(GetDefaultName(this)));
864 }
865 }
866 catch(const uno::Exception&)
867 {
868 DBG_UNHANDLED_EXCEPTION("reportdesign");
869 }
870 }
871
872 if(!m_xMediator.is() && m_xReportComponent.is())
873 {
874 Reference<XPropertySet> xControlModel(GetUnoControlModel(),uno::UNO_QUERY);
875
876 if(xControlModel.is())
877 {
878 m_xMediator = new OPropertyMediator(
879 m_xReportComponent,
880 xControlModel,
882 _bReverse);
883 }
884 }
885
886 OObjectBase::StartListening();
887}
888
889uno::Reference< beans::XPropertySet> OUnoObject::getAwtComponent()
890{
891 return Reference<XPropertySet>(GetUnoControlModel(),uno::UNO_QUERY);
892}
893
894
895uno::Reference< drawing::XShape > OUnoObject::getUnoShape()
896{
897 return OObjectBase::getUnoShapeOf( *this );
898}
899
900void OUnoObject::setUnoShape( const uno::Reference< drawing::XShape >& rxUnoShape )
901{
902 SdrUnoObj::setUnoShape( rxUnoShape );
903 releaseUnoShape();
904}
905
907{
908 return new OUnoObject(rTargetModel, *this);
909}
910
911// OOle2Obj
913 SdrModel& rSdrModel,
914 const uno::Reference< report::XReportComponent>& _xComponent,
915 SdrObjKind _nType)
916: SdrOle2Obj(rSdrModel)
917 ,OObjectBase(_xComponent)
918 ,m_nType(_nType)
919 ,m_bOnlyOnce(true)
920{
921 setUnoShape( uno::Reference< drawing::XShape >( _xComponent, uno::UNO_QUERY_THROW ) );
922 m_bIsListening = true;
923}
924
926 SdrModel& rSdrModel,
927 SdrObjKind _nType)
928: SdrOle2Obj(rSdrModel)
929 ,OObjectBase(ObjectTypeToServiceName(_nType))
930 ,m_nType(_nType)
931 ,m_bOnlyOnce(true)
932{
933 m_bIsListening = true;
934}
935
936static uno::Reference< chart2::data::XDatabaseDataProvider > lcl_getDataProvider(const uno::Reference < embed::XEmbeddedObject >& _xObj);
937
938OOle2Obj::OOle2Obj(SdrModel& rSdrModel, OOle2Obj const & rSource)
939: SdrOle2Obj(rSdrModel, rSource)
940 ,OObjectBase(rSource.getServiceName())
941 ,m_nType(rSource.m_nType)
942 ,m_bOnlyOnce(rSource.m_bOnlyOnce)
943{
944 m_bIsListening = true;
945
946 OReportModel& rRptModel(static_cast< OReportModel& >(getSdrModelFromSdrObject()));
949
950 uno::Reference< chart2::data::XDatabaseDataProvider > xSource( lcl_getDataProvider(rSource.GetObjRef()) );
951 uno::Reference< chart2::data::XDatabaseDataProvider > xDest( lcl_getDataProvider(GetObjRef()) );
952 if ( xSource.is() && xDest.is() )
953 comphelper::copyProperties(xSource, xDest);
954
956}
957
959{
960}
961
963{
964 return m_nType;
965}
966
968{
969 return SdrInventor::ReportDesign;
970}
971
973{
975}
976
977void OOle2Obj::NbcMove( const Size& rSize )
978{
979
980 if ( m_bIsListening )
981 {
982 // stop listening
983 OObjectBase::EndListening();
984
985 bool bPositionFixed = false;
986 Size aUndoSize(0,0);
987 if ( m_xReportComponent.is() )
988 {
989 bool bUndoMode = false;
990 OReportModel& rRptModel(static_cast< OReportModel& >(getSdrModelFromSdrObject()));
991
992 if (rRptModel.GetUndoEnv().IsUndoMode())
993 {
994 // if we are locked from outside, then we must not handle wrong moves, we are in UNDO mode
995 bUndoMode = true;
996 }
998
999 // LLA: why there exists getPositionX and getPositionY and NOT getPosition() which return a Point?
1000 int nNewX = m_xReportComponent->getPositionX() + rSize.Width();
1001 // can this hinder us to set components outside the area?
1002 // if (nNewX < 0)
1003 // {
1004 // nNewX = 0;
1005 // }
1006 m_xReportComponent->setPositionX(nNewX);
1007 int nNewY = m_xReportComponent->getPositionY() + rSize.Height();
1008 if (nNewY < 0 && !bUndoMode)
1009 {
1010 aUndoSize.setHeight( abs(nNewY) );
1011 bPositionFixed = true;
1012 nNewY = 0;
1013 }
1014 m_xReportComponent->setPositionY(nNewY);
1015 }
1016 if (bPositionFixed)
1017 {
1018 getSdrModelFromSdrObject().AddUndo(getSdrModelFromSdrObject().GetSdrUndoFactory().CreateUndoMoveObject(*this, aUndoSize));
1019 }
1020 // set geometry properties
1021 SetPropsFromRect(GetLogicRect());
1022
1023 // start listening
1024 OObjectBase::StartListening();
1025 }
1026 else
1027 SdrOle2Obj::NbcMove( rSize );
1028}
1029
1030
1031void OOle2Obj::NbcResize(const Point& rRef, const Fraction& xFract, const Fraction& yFract)
1032{
1033 SdrOle2Obj::NbcResize( rRef, xFract, yFract );
1034
1035 // stop listening
1036 OObjectBase::EndListening();
1037
1038 // set geometry properties
1039 SetPropsFromRect(GetLogicRect());
1040
1041 // start listening
1042 OObjectBase::StartListening();
1043}
1044
1046{
1048 // stop listening
1049 OObjectBase::EndListening();
1050
1051 // set geometry properties
1052 SetPropsFromRect(rRect);
1053
1054 // start listening
1055 OObjectBase::StartListening();
1056}
1057
1058
1060{
1061 bool bResult = SdrOle2Obj::EndCreate(rStat, eCmd);
1062 if ( bResult )
1063 {
1064 OReportModel& rRptModel(static_cast< OReportModel& >(getSdrModelFromSdrObject()));
1066
1067 if ( !m_xReportComponent.is() )
1068 m_xReportComponent.set(getUnoShape(),uno::UNO_QUERY);
1069
1070 // set geometry properties
1071 SetPropsFromRect(GetLogicRect());
1072 }
1073
1074 return bResult;
1075}
1076
1077uno::Reference< beans::XPropertySet> OOle2Obj::getAwtComponent()
1078{
1079 return m_xReportComponent;
1080}
1081
1082
1083uno::Reference< drawing::XShape > OOle2Obj::getUnoShape()
1084{
1085 uno::Reference< drawing::XShape> xShape = OObjectBase::getUnoShapeOf( *this );
1086 if ( !m_xReportComponent.is() )
1087 {
1088 OReportModel& rRptModel(static_cast< OReportModel& >(getSdrModelFromSdrObject()));
1090 m_xReportComponent.set(xShape,uno::UNO_QUERY);
1091 }
1092 return xShape;
1093}
1094
1095void OOle2Obj::setUnoShape( const uno::Reference< drawing::XShape >& rxUnoShape )
1096{
1097 SdrOle2Obj::setUnoShape( rxUnoShape );
1098 releaseUnoShape();
1099 m_xReportComponent.clear();
1100}
1101
1102
1103static uno::Reference< chart2::data::XDatabaseDataProvider > lcl_getDataProvider(const uno::Reference < embed::XEmbeddedObject >& _xObj)
1104{
1105 uno::Reference< chart2::data::XDatabaseDataProvider > xSource;
1106 uno::Reference< embed::XComponentSupplier > xCompSupp(_xObj);
1107 if( xCompSupp.is())
1108 {
1109 uno::Reference< chart2::XChartDocument> xChartDoc( xCompSupp->getComponent(), uno::UNO_QUERY );
1110 if ( xChartDoc.is() )
1111 {
1112 xSource.set(xChartDoc->getDataProvider(),uno::UNO_QUERY);
1113 }
1114 }
1115 return xSource;
1116}
1117
1118// Clone() should make a complete copy of the object.
1120{
1121 return new OOle2Obj(rTargetModel, *this);
1122}
1123
1124void OOle2Obj::impl_createDataProvider_nothrow(const uno::Reference< frame::XModel>& _xModel)
1125{
1126 try
1127 {
1128 uno::Reference < embed::XEmbeddedObject > xObj = GetObjRef();
1129 uno::Reference< chart2::data::XDataReceiver > xReceiver;
1130 uno::Reference< embed::XComponentSupplier > xCompSupp( xObj );
1131 if( xCompSupp.is())
1132 xReceiver.set( xCompSupp->getComponent(), uno::UNO_QUERY );
1133 OSL_ASSERT( xReceiver.is());
1134 if( xReceiver.is() )
1135 {
1136 uno::Reference< lang::XMultiServiceFactory> xFac(_xModel,uno::UNO_QUERY);
1137 uno::Reference< chart2::data::XDatabaseDataProvider > xDataProvider( xFac->createInstance("com.sun.star.chart2.data.DataProvider"),uno::UNO_QUERY);
1138 xReceiver->attachDataProvider( xDataProvider );
1139 }
1140 }
1141 catch(const uno::Exception &)
1142 {
1143 }
1144}
1145
1147{
1148 if ( !m_bOnlyOnce )
1149 return;
1150
1151 m_bOnlyOnce = false;
1152 uno::Reference < embed::XEmbeddedObject > xObj = GetObjRef();
1153 OReportModel& rRptModel(static_cast< OReportModel& >(getSdrModelFromSdrObject()));
1154 rRptModel.GetUndoEnv().AddElement(lcl_getDataProvider(xObj));
1155
1156 uno::Reference< embed::XComponentSupplier > xCompSupp( xObj );
1157 if( xCompSupp.is() )
1158 {
1159 uno::Reference< beans::XPropertySet > xChartProps( xCompSupp->getComponent(), uno::UNO_QUERY );
1160 if ( xChartProps.is() )
1161 xChartProps->setPropertyValue("NullDate",
1162 uno::Any(util::DateTime(0,0,0,0,30,12,1899,false)));
1163 }
1164}
1165
1166void OOle2Obj::initializeChart( const uno::Reference< frame::XModel>& _xModel)
1167{
1168 uno::Reference < embed::XEmbeddedObject > xObj = GetObjRef();
1169 uno::Reference< chart2::data::XDataReceiver > xReceiver;
1170 uno::Reference< embed::XComponentSupplier > xCompSupp( xObj );
1171 if( xCompSupp.is())
1172 xReceiver.set( xCompSupp->getComponent(), uno::UNO_QUERY );
1173 OSL_ASSERT( xReceiver.is());
1174 if( !xReceiver.is() )
1175 return;
1176
1177 // lock the model to suppress any internal updates
1178 uno::Reference< frame::XModel > xChartModel( xReceiver, uno::UNO_QUERY );
1179 if( xChartModel.is() )
1180 xChartModel->lockControllers();
1181
1182 if ( !lcl_getDataProvider(xObj).is() )
1184
1185 OReportModel& rRptModel(static_cast< OReportModel& >(getSdrModelFromSdrObject()));
1186 rRptModel.GetUndoEnv().AddElement(lcl_getDataProvider(xObj));
1187
1189 aArgs.put( "CellRangeRepresentation", uno::Any( OUString( "all" ) ) );
1190 aArgs.put( "HasCategories", uno::Any( true ) );
1191 aArgs.put( "FirstCellAsLabel", uno::Any( true ) );
1192 aArgs.put( "DataRowSource", uno::Any( chart::ChartDataRowSource_COLUMNS ) );
1193 xReceiver->setArguments( aArgs.getPropertyValues() );
1194
1195 if( xChartModel.is() )
1196 xChartModel->unlockControllers();
1197}
1198
1199uno::Reference< style::XStyle> getUsedStyle(const uno::Reference< report::XReportDefinition>& _xReport)
1200{
1201 uno::Reference<container::XNameAccess> xStyles = _xReport->getStyleFamilies();
1202 uno::Reference<container::XNameAccess> xPageStyles(xStyles->getByName("PageStyles"),uno::UNO_QUERY);
1203
1204 uno::Reference< style::XStyle> xReturn;
1205 const uno::Sequence< OUString> aSeq = xPageStyles->getElementNames();
1206 for(const OUString& rName : aSeq)
1207 {
1208 uno::Reference< style::XStyle> xStyle(xPageStyles->getByName(rName),uno::UNO_QUERY);
1209 if ( xStyle->isInUse() )
1210 {
1211 xReturn = xStyle;
1212 break;
1213 }
1214 }
1215 return xReturn;
1216}
1217
1218
1219} // rptui
1220
1221
1222/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual const tools::Rectangle & GetSnapRect() const override
void AddUndo(std::unique_ptr< SdrUndoAction > pUndo)
virtual void NbcMove(const Size &rSiz) override
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact) override
virtual bool EndCreate(SdrDragStat &rStat, SdrCreateCmd eCmd) override
virtual void NbcSetLogicRect(const tools::Rectangle &rRect) override
virtual void setUnoShape(const css::uno::Reference< css::drawing::XShape > &rxUnoShape) override
const css::uno::WeakReference< css::drawing::XShape > & getWeakUnoShape() const
virtual void setUnoShape(const css::uno::Reference< css::drawing::XShape > &_rxUnoShape)
SdrModel & getSdrModelFromSdrObject() const
SdrPage * getSdrPageFromSdrObject() const
css::uno::Reference< css::embed::XEmbeddedObject > const & GetObjRef() const
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact) override
virtual void NbcMove(const Size &rSize) override
virtual void NbcSetLogicRect(const tools::Rectangle &rRect) override
virtual void NbcSetLogicRect(const tools::Rectangle &rRect) override
virtual void NbcMove(const Size &rSiz) override
virtual const tools::Rectangle & GetLogicRect() const override
virtual bool EndCreate(SdrDragStat &rStat, SdrCreateCmd eCmd) override
const css::uno::Reference< css::awt::XControlModel > & GetUnoControlModel() const
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact) override
const OUString & getUnoControlModelTypeName() const
constexpr tools::Long Height() const
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
bool put(const OUString &_rValueName, const VALUE_TYPE &_rValue)
css::uno::Sequence< css::beans::PropertyValue > getPropertyValues() const
static rtl::Reference< OCustomShape > Create(SdrModel &rSdrModel, const css::uno::Reference< css::report::XReportComponent > &_xComponent)
Definition: RptObject.hxx:128
virtual bool EndCreate(SdrDragStat &rStat, SdrCreateCmd eCmd) override
Definition: RptObject.cxx:505
virtual css::uno::Reference< css::beans::XPropertySet > getAwtComponent() override
Definition: RptObject.cxx:523
virtual ~OCustomShape() override
Definition: RptObject.cxx:450
virtual SdrInventor GetObjInventor() const override
Definition: RptObject.cxx:459
virtual void NbcSetLogicRect(const tools::Rectangle &rRect) override
Definition: RptObject.cxx:499
virtual SdrObjKind GetObjIdentifier() const override
Definition: RptObject.cxx:454
virtual void NbcMove(const Size &rSize) override
Definition: RptObject.cxx:469
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact) override
Definition: RptObject.cxx:492
virtual SdrPage * GetImplPage() const override
Definition: RptObject.cxx:464
virtual css::uno::Reference< css::drawing::XShape > getUnoShape() override
Definition: RptObject.cxx:529
virtual void setUnoShape(const css::uno::Reference< css::drawing::XShape > &rxUnoShape) override
Definition: RptObject.cxx:541
OOle2Obj(SdrModel &rSdrModel, const css::uno::Reference< css::report::XReportComponent > &_xComponent, SdrObjKind _nType)
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact) override
Definition: RptObject.cxx:1031
virtual css::uno::Reference< css::drawing::XShape > getUnoShape() override
Definition: RptObject.cxx:1083
SdrObjKind m_nType
Definition: RptObject.hxx:211
virtual void NbcSetLogicRect(const tools::Rectangle &rRect) override
Definition: RptObject.cxx:1045
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const override
Definition: RptObject.cxx:1119
virtual SdrObjKind GetObjIdentifier() const override
Definition: RptObject.cxx:962
virtual ~OOle2Obj() override
Definition: RptObject.cxx:958
virtual void initializeOle() override
Definition: RptObject.cxx:1146
virtual bool EndCreate(SdrDragStat &rStat, SdrCreateCmd eCmd) override
Definition: RptObject.cxx:1059
virtual css::uno::Reference< css::beans::XPropertySet > getAwtComponent() override
Definition: RptObject.cxx:1077
virtual void NbcMove(const Size &rSize) override
Definition: RptObject.cxx:977
virtual void setUnoShape(const css::uno::Reference< css::drawing::XShape > &rxUnoShape) override
Definition: RptObject.cxx:1095
void initializeChart(const css::uno::Reference< css::frame::XModel > &_xModel)
Definition: RptObject.cxx:1166
virtual SdrPage * GetImplPage() const override
Definition: RptObject.cxx:972
void impl_createDataProvider_nothrow(const css::uno::Reference< css::frame::XModel > &_xModel)
Definition: RptObject.cxx:1124
virtual SdrInventor GetObjInventor() const override
Definition: RptObject.cxx:967
static rtl::Reference< OOle2Obj > Create(SdrModel &rSdrModel, const css::uno::Reference< css::report::XReportComponent > &_xComponent, SdrObjKind _nType)
Definition: RptObject.hxx:171
This class ensures the communication between two XPropertySet instances.
OXUndoEnvironment & GetUndoEnv()
Definition: RptModel.hxx:65
css::uno::Reference< css::report::XReportDefinition > getReportDefinition() const
returns the XReportDefinition which the OReportModel belongs to
Definition: RptModel.cxx:135
const css::uno::Reference< css::report::XSection > & getSection() const
Definition: RptPage.hxx:82
virtual void setUnoShape(const css::uno::Reference< css::drawing::XShape > &rxUnoShape) override
Definition: RptObject.cxx:900
virtual ~OUnoObject() override
Definition: RptObject.cxx:625
virtual bool EndCreate(SdrDragStat &rStat, SdrCreateCmd eCmd) override
Definition: RptObject.cxx:738
virtual css::uno::Reference< css::drawing::XShape > getUnoShape() override
Definition: RptObject.cxx:895
void impl_initializeModel_nothrow()
Definition: RptObject.cxx:629
OUnoObject(SdrModel &rSdrModel, const OUString &rModelName, SdrObjKind _nObjectType)
Definition: RptObject.cxx:573
virtual SdrInventor GetObjInventor() const override
Definition: RptObject.cxx:652
virtual void NbcMove(const Size &rSize) override
Definition: RptObject.cxx:662
virtual css::uno::Reference< css::beans::XPropertySet > getAwtComponent() override
Definition: RptObject.cxx:889
virtual SdrObjKind GetObjIdentifier() const override
Definition: RptObject.cxx:647
static OUString GetDefaultName(const OUnoObject *_pObj)
Definition: RptObject.cxx:754
virtual void _propertyChange(const css::beans::PropertyChangeEvent &evt) override
Definition: RptObject.cxx:777
virtual void NbcResize(const Point &rRef, const Fraction &xFact, const Fraction &yFact) override
Definition: RptObject.cxx:711
void CreateMediator(bool _bReverse=false)
creates the m_xMediator when it doesn't already exist.
Definition: RptObject.cxx:833
SdrObjKind m_nObjectType
Definition: RptObject.hxx:224
virtual SdrPage * GetImplPage() const override
Definition: RptObject.cxx:657
virtual void NbcSetLogicRect(const tools::Rectangle &rRect) override
Definition: RptObject.cxx:725
virtual rtl::Reference< SdrObject > CloneSdrObject(SdrModel &rTargetModel) const override
Definition: RptObject.cxx:906
Create an object ob OUndoEnvLock locks the undo possibility As long as in the OUndoEnvLock scope,...
Definition: UndoEnv.hxx:64
bool IsUndoMode() const
Definition: UndoEnv.cxx:611
void AddElement(const css::uno::Reference< css::uno::XInterface > &Element)
Definition: UndoEnv.cxx:580
static bool TryRunningState(const css::uno::Reference< css::embed::XEmbeddedObject > &)
constexpr tools::Long Top() const
tools::Long getOpenHeight() const
constexpr bool IsEmpty() const
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
ULONG m_refCount
Sequence< sal_Int8 > aSeq
@ Exception
void copyProperties(const Reference< XPropertySet > &_rxSource, const Reference< XPropertySet > &_rxDest)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
static OUString ObjectTypeToServiceName(SdrObjKind _nObjectType)
Definition: RptObject.cxx:548
uno::Reference< style::XStyle > getUsedStyle(const uno::Reference< report::XReportDefinition > &_xReport)
Definition: RptObject.cxx:1199
std::map< OUString, TPropertyConverter > TPropertyNamePair
Definition: RptDef.hxx:73
constexpr SdrLayerID RPT_LAYER_FRONT(0)
const TPropertyNamePair & getPropertyNameMap(SdrObjKind _nObjectId)
returns the property name map for the given property id
Definition: RptObject.cxx:224
static uno::Reference< chart2::data::XDatabaseDataProvider > lcl_getDataProvider(const uno::Reference< embed::XEmbeddedObject > &_xObj)
Definition: RptObject.cxx:1103
constexpr SdrLayerID RPT_LAYER_BACK(1)
::std::pair< OUString, std::shared_ptr< AnyConverter > > TPropertyConverter
Definition: RptDef.hxx:72
long Long
SwNodeOffset abs(const SwNodeOffset &a)
QPRO_FUNC_TYPE nType
constexpr OUStringLiteral PROPERTY_CHARFONTHEIGHT
Definition: strings.hxx:118
constexpr OUStringLiteral PROPERTY_LABEL
Definition: strings.hxx:89
constexpr OUStringLiteral PROPERTY_NAME
Definition: strings.hxx:36
constexpr OUStringLiteral PROPERTY_FONTHEIGHT
Definition: strings.hxx:119
constexpr OUStringLiteral PROPERTY_VERTICALALIGN
Definition: strings.hxx:86
constexpr OUStringLiteral RID_STR_CLASS_FIXEDTEXT
Definition: strings.hxx:15
constexpr OUStringLiteral PROPERTY_CHARCOLOR
Definition: strings.hxx:85
constexpr OUStringLiteral RID_STR_CLASS_FORMATTEDFIELD
Definition: strings.hxx:18
constexpr OUStringLiteral PROPERTY_BACKGROUNDCOLOR
Definition: strings.hxx:194
constexpr OUStringLiteral SERVICE_FIXEDLINE
Definition: strings.hxx:29
constexpr OUStringLiteral PROPERTY_CONTROLBORDERCOLOR
Definition: strings.hxx:97
constexpr OUStringLiteral PROPERTY_CONTROLBORDER
Definition: strings.hxx:96
constexpr OUStringLiteral PROPERTY_ALIGN
Definition: strings.hxx:210
constexpr OUStringLiteral SERVICE_IMAGECONTROL
Definition: strings.hxx:24
constexpr OUStringLiteral PROPERTY_FONTRELIEF
Definition: strings.hxx:198
constexpr OUStringLiteral PROPERTY_CHARUNDERLINECOLOR
Definition: strings.hxx:88
constexpr OUStringLiteral SERVICE_FIXEDTEXT
Definition: strings.hxx:22
constexpr OUStringLiteral PROPERTY_FONTEMPHASISMARK
Definition: strings.hxx:199
constexpr OUStringLiteral SERVICE_FORMATTEDFIELD
Definition: strings.hxx:23
constexpr OUStringLiteral PROPERTY_TEXTCOLOR
Definition: strings.hxx:196
constexpr OUStringLiteral SERVICE_SHAPE
Definition: strings.hxx:28
constexpr OUStringLiteral PROPERTY_PARAADJUST
Definition: strings.hxx:79
constexpr OUStringLiteral SERVICE_REPORTDEFINITION
Definition: strings.hxx:27
constexpr OUStringLiteral PROPERTY_CHARSTRIKEOUT
Definition: strings.hxx:125
constexpr OUStringLiteral PROPERTY_CHARRELIEF
Definition: strings.hxx:84
constexpr OUStringLiteral PROPERTY_TEXTLINECOLOR
Definition: strings.hxx:197
constexpr OUStringLiteral PROPERTY_FONTSTRIKEOUT
Definition: strings.hxx:126
constexpr OUStringLiteral PROPERTY_OPAQUE
Definition: strings.hxx:201
constexpr OUStringLiteral PROPERTY_BORDERCOLOR
Definition: strings.hxx:99
constexpr OUStringLiteral RID_STR_CLASS_IMAGECONTROL
Definition: strings.hxx:17
constexpr OUStringLiteral PROPERTY_BORDER
Definition: strings.hxx:98
constexpr OUStringLiteral PROPERTY_MULTILINE
Definition: strings.hxx:186
constexpr OUStringLiteral PROPERTY_CONTROLBACKGROUND
Definition: strings.hxx:40
constexpr OUStringLiteral PROPERTY_CONTROLTEXTEMPHASISMARK
Definition: strings.hxx:83
constexpr OUStringLiteral RID_STR_CLASS_FIXEDLINE
Definition: strings.hxx:16
SdrInventor
SdrObjKind
SdrCreateCmd