38#include <com/sun/star/lang/NullPointerException.hpp>
39#include <com/sun/star/beans/NamedValue.hpp>
40#include <com/sun/star/beans/PropertyAttribute.hpp>
77#include <svx/svxids.hrc>
91#include <com/sun/star/style/VerticalAlignment.hpp>
92#include <com/sun/star/report/XShape.hpp>
93#include <com/sun/star/sdb/XParametersSupplier.hpp>
94#include <com/sun/star/sdb/SQLContext.hpp>
98#include <core_resource.hxx>
101#include <strings.hrc>
125#define ITEMID_FIRST XATTR_FILL_LAST
127#define ITEMID_FONT TypedWhichId<SvxFontItem>(ITEMID_FIRST)
128#define ITEMID_FONTHEIGHT TypedWhichId<SvxFontHeightItem>(ITEMID_FIRST + 1)
129#define ITEMID_LANGUAGE TypedWhichId<SvxLanguageItem>(ITEMID_FIRST + 2)
131#define ITEMID_POSTURE TypedWhichId<SvxPostureItem>(ITEMID_FIRST + 3)
132#define ITEMID_WEIGHT TypedWhichId<SvxWeightItem>(ITEMID_FIRST + 4)
133#define ITEMID_SHADOWED TypedWhichId<SvxShadowedItem>(ITEMID_FIRST + 5)
134#define ITEMID_WORDLINEMODE TypedWhichId<SvxWordLineModeItem>(ITEMID_FIRST + 6)
135#define ITEMID_CONTOUR TypedWhichId<SvxContourItem>(ITEMID_FIRST + 7)
136#define ITEMID_CROSSEDOUT TypedWhichId<SvxCrossedOutItem>(ITEMID_FIRST + 8)
137#define ITEMID_UNDERLINE TypedWhichId<SvxUnderlineItem>(ITEMID_FIRST + 9)
139#define ITEMID_COLOR TypedWhichId<SvxColorItem>(ITEMID_FIRST + 10)
140#define ITEMID_KERNING TypedWhichId<SvxKerningItem>(ITEMID_FIRST + 11)
141#define ITEMID_CASEMAP TypedWhichId<SvxCaseMapItem>(ITEMID_FIRST + 12)
143#define ITEMID_ESCAPEMENT TypedWhichId<SvxEscapementItem>(ITEMID_FIRST + 13)
144#define ITEMID_FONTLIST ITEMID_FIRST + 14
145#define ITEMID_AUTOKERN TypedWhichId<SvxAutoKernItem>(ITEMID_FIRST + 15)
146#define ITEMID_COLOR_TABLE TypedWhichId<SvxColorListItem>(ITEMID_FIRST + 16)
147#define ITEMID_BLINK TypedWhichId<SvxBlinkItem>(ITEMID_FIRST + 17)
148#define ITEMID_EMPHASISMARK TypedWhichId<SvxEmphasisMarkItem>(ITEMID_FIRST + 18)
149#define ITEMID_TWOLINES TypedWhichId<SvxTwoLinesItem>(ITEMID_FIRST + 19)
150#define ITEMID_CHARROTATE TypedWhichId<SvxCharRotateItem>(ITEMID_FIRST + 20)
151#define ITEMID_CHARSCALE_W TypedWhichId<SvxCharScaleWidthItem>(ITEMID_FIRST + 21)
152#define ITEMID_CHARRELIEF TypedWhichId<SvxCharReliefItem>(ITEMID_FIRST + 22)
153#define ITEMID_CHARHIDDEN TypedWhichId<SvxCharHiddenItem>(ITEMID_FIRST + 23)
154#define ITEMID_BRUSH TypedWhichId<SvxBrushItem>(ITEMID_FIRST + 24)
155#define ITEMID_HORJUSTIFY TypedWhichId<SvxHorJustifyItem>(ITEMID_FIRST + 25)
156#define ITEMID_VERJUSTIFY TypedWhichId<SvxVerJustifyItem>(ITEMID_FIRST + 26)
157#define ITEMID_FONT_ASIAN TypedWhichId<SvxFontItem>(ITEMID_FIRST + 27)
158#define ITEMID_FONTHEIGHT_ASIAN TypedWhichId<SvxFontHeightItem>(ITEMID_FIRST + 28)
159#define ITEMID_LANGUAGE_ASIAN TypedWhichId<SvxLanguageItem>(ITEMID_FIRST + 29)
160#define ITEMID_POSTURE_ASIAN TypedWhichId<SvxPostureItem>(ITEMID_FIRST + 30)
161#define ITEMID_WEIGHT_ASIAN TypedWhichId<SvxWeightItem>(ITEMID_FIRST + 31)
162#define ITEMID_FONT_COMPLEX TypedWhichId<SvxFontItem>(ITEMID_FIRST + 32)
163#define ITEMID_FONTHEIGHT_COMPLEX TypedWhichId<SvxFontHeightItem>(ITEMID_FIRST + 33)
164#define ITEMID_LANGUAGE_COMPLEX TypedWhichId<SvxLanguageItem>(ITEMID_FIRST + 34)
165#define ITEMID_POSTURE_COMPLEX TypedWhichId<SvxPostureItem>(ITEMID_FIRST + 35)
166#define ITEMID_WEIGHT_COMPLEX TypedWhichId<SvxWeightItem>(ITEMID_FIRST + 36)
181 OSL_ENSURE(_xGroup.is(),
"Group is NULL -> GPF");
182 if ( _xGroup->getHeaderOn() && _xGroup->getHeader()->getName().isEmpty() )
185 _xGroup->getHeader()->setName(
sName);
188 if ( _xGroup->getFooterOn() && _xGroup->getFooter()->getName().isEmpty() )
191 _xGroup->getFooter()->setName(
sName);
198 if ( _xReportDefinition.is() )
200 uno::Reference<beans::XPropertySet> xPageStyle(
getUsedStyle(_xReportDefinition),uno::UNO_QUERY);
201 if ( xPageStyle.is() )
217 vcl::Font lcl_getReportControlFont(
const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat, awt::FontDescriptor& _out_rControlFont ,sal_uInt16 _nWichFont)
219 if ( !_rxReportControlFormat.is() )
220 throw uno::RuntimeException();
225 _out_rControlFont = _rxReportControlFormat->getFontDescriptor();
228 _out_rControlFont = _rxReportControlFormat->getFontDescriptorAsian();
231 _out_rControlFont = _rxReportControlFormat->getFontDescriptorComplex();
241 vcl::Font lcl_getReportControlFont(
const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,sal_uInt16 _nWhich )
243 awt::FontDescriptor aAwtFont;
244 return lcl_getReportControlFont( _rxReportControlFormat, aAwtFont, _nWhich );
247 vcl::Font lcl_setFont(
const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,
248 SfxItemSet& _rItemSet,sal_uInt16 _nWhich,sal_uInt16 _nFont, sal_uInt16 _nFontHeight,sal_uInt16 _nLanguage,sal_uInt16 _nPosture, sal_uInt16 _nWeight)
251 awt::FontDescriptor aControlFont;
252 const vcl::Font aFont( lcl_getReportControlFont( _rxReportControlFormat, aControlFont,_nWhich ) );
255 aFontItem.PutValue(
uno::Any( aControlFont ), 0 );
256 _rItemSet.
Put(aFontItem);
259 lang::Locale aLocale;
263 aLocale = _rxReportControlFormat->getCharLocale();
266 aLocale = _rxReportControlFormat->getCharLocaleAsian();
269 aLocale = _rxReportControlFormat->getCharLocaleComplex();
280 void lcl_fillShapeToItems(
const uno::Reference<report::XShape >& _xShape,
SfxItemSet& _rItemSet )
282 uno::Reference< beans::XPropertySetInfo> xInfo = _xShape->getPropertySetInfo();
287 if ( xInfo->hasPropertyByName(pProp->aName) )
292 ::std::unique_ptr<SfxPoolItem> pClone(pItem->
CloneSetWhich(pProp->nWID));
293 pClone->PutValue(_xShape->getPropertyValue(pProp->aName), pProp->nMemberId);
294 _rItemSet.
Put(std::move(pClone));
300 void lcl_fillItemsToShape(
const uno::Reference<report::XShape >& _xShape,
const SfxItemSet& _rItemSet )
302 const uno::Reference< beans::XPropertySetInfo> xInfo = _xShape->getPropertySetInfo();
307 if ( SfxItemState::SET == _rItemSet.
GetItemState(pProp->nWID) && xInfo->hasPropertyByName(pProp->aName) )
309 if ( ( pProp->nFlags & beans::PropertyAttribute::READONLY ) != beans::PropertyAttribute::READONLY )
318 _xShape->setPropertyValue(pProp->aName, aValue);
320 catch(uno::Exception&)
329 void lcl_CharPropertiesToItems(
const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,
332 if ( !_rxReportControlFormat.is() )
333 throw lang::NullPointerException();
335 uno::Reference< beans::XPropertySet > xSet(_rxReportControlFormat,uno::UNO_QUERY_THROW);
350 _rItemSet.
Put(
SvxTwoLinesItem(_rxReportControlFormat->getCharCombineIsOn(),_rxReportControlFormat->getCharCombinePrefix().toChar(),_rxReportControlFormat->getCharCombineSuffix().toChar(),
ITEMID_TWOLINES));
352 aUnderLineItem.SetColor(
Color(ColorTransparency, _rxReportControlFormat->getCharUnderlineColor()));
353 _rItemSet.
Put(aUnderLineItem);
363 _rItemSet.
Put(aHorJustifyItem);
366 _rItemSet.
Put(aVerJustifyItem);
368 uno::Reference< report::XShape> xShape(_rxReportControlFormat,uno::UNO_QUERY);
377 void lcl_pushBack( uno::Sequence< beans::NamedValue >& _out_rProperties,
const OUString& _sName,
const uno::Any& _rValue )
379 sal_Int32 nLen( _out_rProperties.getLength() );
380 _out_rProperties.realloc( nLen + 1 );
381 _out_rProperties.getArray()[ nLen ] = beans::NamedValue( _sName, _rValue );
385 void lcl_initAwtFont(
const vcl::Font& _rOriginalFont,
const SfxItemSet& _rItemSet, awt::FontDescriptor& _out_rAwtFont,
392 aNewFont.SetFamilyName(pFontItem->GetFamilyName());
393 aNewFont.SetStyleName(pFontItem->GetStyleName());
394 aNewFont.SetFamily(pFontItem->GetFamily());
395 aNewFont.SetPitch(pFontItem->GetPitch());
396 aNewFont.SetCharSet(pFontItem->GetCharSet());
404 aNewFont.SetItalic(pPostureItem->GetPosture());
408 aNewFont.SetWeight(pWeightItem->GetWeight());
412 aNewFont.SetWordLineMode(pWordLineItem->GetValue());
416 aNewFont.SetStrikeout(pCrossedOutItem->GetStrikeout());
420 aNewFont.SetOrientation(pRotateItem->GetValue());
428 aNewFont.SetUnderline(pUnderlineItem->GetLineStyle());
432 aNewFont.SetColor(pColorItem->GetValue());
439 void lcl_itemsToCharProperties(
const vcl::Font& _rOriginalControlFont,
const vcl::Font& _rOriginalControlFontAsian,
const vcl::Font& _rOriginalControlFontComplex,
const SfxItemSet& _rItemSet, uno::Sequence< beans::NamedValue >& _out_rProperties )
442 awt::FontDescriptor aAwtFont;
444 lcl_pushBack( _out_rProperties,
"Font",
uno::Any( aAwtFont ) );
446 lcl_pushBack( _out_rProperties,
"FontAsian",
uno::Any( aAwtFont ) );
448 lcl_pushBack( _out_rProperties,
"FontComplex",
uno::Any( aAwtFont ) );
460 pJustifyItem->QueryValue(aValue,MID_HORJUST_ADJUST);
466 pJustifyItem->QueryValue(aValue,MID_HORJUST_ADJUST);
495 OUString sPropertyName;
501 for(
const auto & k : pItems)
506 lcl_pushBack( _out_rProperties, k.sPropertyName,
uno::Any( aCharLocale ) );
517 template<
class ATTRIBUTE_TYPE >
518 void lcl_applyFontAttribute( const ::comphelper::NamedValueCollection& _rAttrValues,
const OUString& _pAttributeName,
519 const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,
520 void (SAL_CALL report::XReportControlFormat::*pSetter)( ATTRIBUTE_TYPE ) )
522 ATTRIBUTE_TYPE aAttributeValue = ATTRIBUTE_TYPE();
523 if ( _rAttrValues.get_ensureType( _pAttributeName, aAttributeValue ) )
524 (_rxReportControlFormat.get()->*pSetter)( aAttributeValue );
528 void lcl_applyFontAttribute( const ::comphelper::NamedValueCollection& _rAttrValues,
const OUString& _pAttributeName,
529 const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,
530 void (SAL_CALL report::XReportControlFormat::*pSetter)(
const OUString& ) )
532 OUString aAttributeValue;
533 if ( _rAttrValues.get_ensureType( _pAttributeName, aAttributeValue ) )
534 (_rxReportControlFormat.get()->*pSetter)( aAttributeValue );
538 void lcl_applyFontAttribute( const ::comphelper::NamedValueCollection& _rAttrValues,
const OUString& _pAttributeName,
539 const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,
540 void (SAL_CALL report::XReportControlFormat::*pSetter)(
const lang::Locale& ) )
542 lang::Locale aAttributeValue;
543 if ( _rAttrValues.get_ensureType( _pAttributeName, aAttributeValue ) )
544 (_rxReportControlFormat.get()->*pSetter)( aAttributeValue );
549bool openCharDialog(
const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,
550 const uno::Reference< awt::XWindow>& _rxParentWindow, uno::Sequence< beans::NamedValue >& _out_rNewValues )
552 OSL_PRECOND( _rxReportControlFormat.is() && _rxParentWindow.is(),
"openCharDialog: invalid parameters!" );
553 if ( !_rxReportControlFormat.is() || !_rxParentWindow.is() )
556 _out_rNewValues = uno::Sequence< beans::NamedValue >();
583 { SID_ATTR_CHAR_FONT,
true },
584 { SID_ATTR_CHAR_FONTHEIGHT,
true },
585 { SID_ATTR_CHAR_LANGUAGE,
true },
586 { SID_ATTR_CHAR_POSTURE,
true },
587 { SID_ATTR_CHAR_WEIGHT,
true },
588 { SID_ATTR_CHAR_SHADOWED,
true },
589 { SID_ATTR_CHAR_WORDLINEMODE,
true },
590 { SID_ATTR_CHAR_CONTOUR,
true },
591 { SID_ATTR_CHAR_STRIKEOUT,
true },
592 { SID_ATTR_CHAR_UNDERLINE,
true },
593 { SID_ATTR_CHAR_COLOR,
true },
594 { SID_ATTR_CHAR_KERNING,
true },
595 { SID_ATTR_CHAR_CASEMAP,
true },
596 { SID_ATTR_CHAR_ESCAPEMENT,
true },
597 { SID_ATTR_CHAR_FONTLIST,
true },
598 { SID_ATTR_CHAR_AUTOKERN,
true },
599 { SID_COLOR_TABLE,
true },
600 { SID_ATTR_FLASH,
true },
601 { SID_ATTR_CHAR_EMPHASISMARK,
true },
602 { SID_ATTR_CHAR_TWO_LINES,
true },
603 { SID_ATTR_CHAR_ROTATED,
true },
604 { SID_ATTR_CHAR_SCALEWIDTH,
true },
605 { SID_ATTR_CHAR_RELIEF,
true },
606 { SID_ATTR_CHAR_HIDDEN,
true },
607 { SID_ATTR_BRUSH,
true },
608 { SID_ATTR_ALIGN_HOR_JUSTIFY,
true },
609 { SID_ATTR_ALIGN_VER_JUSTIFY,
true },
612 { SID_ATTR_CHAR_CJK_FONT,
true },
613 { SID_ATTR_CHAR_CJK_FONTHEIGHT,
true },
614 { SID_ATTR_CHAR_CJK_LANGUAGE,
true },
615 { SID_ATTR_CHAR_CJK_POSTURE,
true },
616 { SID_ATTR_CHAR_CJK_WEIGHT,
true },
618 { SID_ATTR_CHAR_CTL_FONT,
true },
619 { SID_ATTR_CHAR_CTL_FONTHEIGHT,
true },
620 { SID_ATTR_CHAR_CTL_LANGUAGE,
true },
621 { SID_ATTR_CHAR_CTL_POSTURE,
true },
622 { SID_ATTR_CHAR_CTL_WEIGHT,
true }
631 const XHatch aNullHatch(aNullLineCol);
632 std::vector<SfxPoolItem*> pDefaults
708 pPool->FreezeIdRanges();
709 bool bSuccess =
false;
713 lcl_CharPropertiesToItems( _rxReportControlFormat, aDescriptor );
717 uno::Reference< report::XShape > xShape( _rxReportControlFormat, uno::UNO_QUERY );
723 lcl_itemsToCharProperties( lcl_getReportControlFont( _rxReportControlFormat,
WESTERN ),
724 lcl_getReportControlFont( _rxReportControlFormat,
ASIAN ),
729 catch(uno::Exception&)
741bool openAreaDialog(
const uno::Reference<report::XShape >& _xShape,
const uno::Reference< awt::XWindow>& _rxParentWindow )
743 OSL_PRECOND( _xShape.is() && _rxParentWindow.is(),
"openAreaDialog: invalid parameters!" );
744 if ( !_xShape.is() || !_rxParentWindow.is() )
751 bool bSuccess =
false;
756 lcl_fillShapeToItems(_xShape, aDescriptor);
762 if (
RET_OK == pDialog->Execute() )
765 lcl_fillItemsToShape(_xShape,*pDialog->GetOutputItemSet());
769 catch(uno::Exception&)
778void applyCharacterSettings(
const uno::Reference< report::XReportControlFormat >& _rxReportControlFormat,
const uno::Sequence< beans::NamedValue >& _rSettings )
784 awt::FontDescriptor aAwtFont;
785 if ( aSettings.
get(
"Font" ) >>= aAwtFont )
787 OUString sTemp = aAwtFont.Name;
788 aAwtFont.Name.clear();
789 _rxReportControlFormat->setFontDescriptor( aAwtFont );
790 _rxReportControlFormat->setCharFontName( sTemp );
792 if ( aSettings.
get(
"FontAsian" ) >>= aAwtFont )
794 OUString sTemp = aAwtFont.Name;
795 aAwtFont.Name.clear();
796 _rxReportControlFormat->setFontDescriptorAsian( aAwtFont );
797 _rxReportControlFormat->setCharFontNameAsian( sTemp );
799 if ( aSettings.
get(
"FontComplex" ) >>= aAwtFont )
801 OUString sTemp = aAwtFont.Name;
802 aAwtFont.Name.clear();
803 _rxReportControlFormat->setFontDescriptorComplex( aAwtFont );
804 _rxReportControlFormat->setCharFontNameComplex( sTemp );
807 lcl_applyFontAttribute( aSettings,
PROPERTY_CHARSHADOWED, _rxReportControlFormat, &report::XReportControlFormat::setCharShadowed );
808 lcl_applyFontAttribute( aSettings,
PROPERTY_CHARCONTOURED, _rxReportControlFormat, &report::XReportControlFormat::setCharContoured );
809 lcl_applyFontAttribute( aSettings,
PROPERTY_CHARUNDERLINECOLOR, _rxReportControlFormat, &report::XReportControlFormat::setCharUnderlineColor );
810 lcl_applyFontAttribute( aSettings,
PROPERTY_PARAADJUST, _rxReportControlFormat, &report::XReportControlFormat::setParaAdjust );
811 lcl_applyFontAttribute( aSettings,
PROPERTY_VERTICALALIGN, _rxReportControlFormat, &report::XReportControlFormat::setVerticalAlign );
812 lcl_applyFontAttribute( aSettings,
PROPERTY_CHARRELIEF, _rxReportControlFormat, &report::XReportControlFormat::setCharRelief );
813 lcl_applyFontAttribute( aSettings,
PROPERTY_CHARHIDDEN, _rxReportControlFormat, &report::XReportControlFormat::setCharHidden );
814 lcl_applyFontAttribute( aSettings,
PROPERTY_CHARAUTOKERNING, _rxReportControlFormat, &report::XReportControlFormat::setCharAutoKerning );
815 lcl_applyFontAttribute( aSettings,
PROPERTY_CONTROLBACKGROUND, _rxReportControlFormat, &report::XReportControlFormat::setControlBackground );
816 lcl_applyFontAttribute( aSettings,
PROPERTY_CHARFLASH, _rxReportControlFormat, &report::XReportControlFormat::setCharFlash );
817 lcl_applyFontAttribute( aSettings,
PROPERTY_CHAREMPHASIS, _rxReportControlFormat, &report::XReportControlFormat::setCharEmphasis );
818 lcl_applyFontAttribute( aSettings,
PROPERTY_CHARCOMBINEISON, _rxReportControlFormat, &report::XReportControlFormat::setCharCombineIsOn );
819 lcl_applyFontAttribute( aSettings,
PROPERTY_CHARCOMBINEPREFIX, _rxReportControlFormat, &report::XReportControlFormat::setCharCombinePrefix );
820 lcl_applyFontAttribute( aSettings,
PROPERTY_CHARCOMBINESUFFIX, _rxReportControlFormat, &report::XReportControlFormat::setCharCombineSuffix );
821 lcl_applyFontAttribute( aSettings,
PROPERTY_CHARCOLOR, _rxReportControlFormat, &report::XReportControlFormat::setCharColor );
822 lcl_applyFontAttribute( aSettings,
PROPERTY_CHARKERNING, _rxReportControlFormat, &report::XReportControlFormat::setCharKerning );
823 lcl_applyFontAttribute( aSettings,
PROPERTY_CHARCASEMAP, _rxReportControlFormat, &report::XReportControlFormat::setCharCaseMap );
824 lcl_applyFontAttribute( aSettings,
PROPERTY_CHARLOCALE, _rxReportControlFormat, &report::XReportControlFormat::setCharLocale );
825 lcl_applyFontAttribute( aSettings,
PROPERTY_CHARESCAPEMENT, _rxReportControlFormat, &report::XReportControlFormat::setCharEscapement );
826 lcl_applyFontAttribute( aSettings,
PROPERTY_CHARESCAPEMENTHEIGHT, _rxReportControlFormat, &report::XReportControlFormat::setCharEscapementHeight );
827 lcl_applyFontAttribute( aSettings,
PROPERTY_CHARLOCALEASIAN, _rxReportControlFormat, &report::XReportControlFormat::setCharLocaleAsian );
828 lcl_applyFontAttribute( aSettings,
PROPERTY_CHARLOCALECOMPLEX, _rxReportControlFormat, &report::XReportControlFormat::setCharLocaleComplex );
830 catch(
const uno::Exception& )
838 OSL_ENSURE(_pWindow,
"Window can not be null!");
851 while( !pOverlappedObj )
856 if ( _pIgnore != pObjIter
858 && (
dynamic_cast<OUnoObject*
>(pObjIter) !=
nullptr ||
dynamic_cast<OOle2Obj*
>(pObjIter) !=
nullptr))
865 if (
dynamic_cast<OUnoObject*
>(pObjIter) !=
nullptr ||
dynamic_cast<OOle2Obj*
>(pObjIter) !=
nullptr)
869 pOverlappedObj = pObjIter;
873 return pOverlappedObj;
878 for(
int i=0;
i<_nListLength;
i++)
881 if (pIgnore == _pObjToCheck)
894 while( !pOverlappedObj )
904 if ( (_bAllObjects || !_rView.
IsObjMarked(pObjIter))
905 && (
dynamic_cast<OUnoObject*
>(pObjIter) !=
nullptr ||
dynamic_cast<OOle2Obj*
>(pObjIter) !=
nullptr) )
909 pOverlappedObj = pObjIter;
912 return pOverlappedObj;
919 if (
dynamic_cast<OUnoObject const *
>(_pObj) !=
nullptr ||
dynamic_cast<OOle2Obj const *
>(_pObj) !=
nullptr)
922 pOverlappedObj =
isOver(aRect,_rPage,_rView,
false,_pObj);
924 return pOverlappedObj;
930 uno::Sequence< OUString > aNames;
934 uno::Reference< sdb::XParametersSupplier > xSuppParams( _rxRowSet, uno::UNO_QUERY_THROW );
935 uno::Reference< container::XIndexAccess > xParams( xSuppParams->getParameters() );
938 sal_Int32
count( xParams->getCount() );
939 aNames.realloc(
count );
940 auto pNames = aNames.getArray();
942 uno::Reference< beans::XPropertySet > xParam;
946 xParam.set( xParams->getByIndex(
i), uno::UNO_QUERY_THROW );
947 OSL_VERIFY( xParam->getPropertyValue(
PROPERTY_NAME ) >>= sParamName );
948 pNames[
i] = sParamName;
952 catch(
const uno::Exception& )
964 uno::Reference< report::XReportComponent > xComponent( _pControl->
getUnoShape(), uno::UNO_QUERY);
980 uno::Reference< report::XReportComponent> xComponent(_pControl->
getUnoShape(),uno::UNO_QUERY);
983 bool bOverlapping =
true;
984 while ( bOverlapping )
987 bOverlapping = pOverlappedObj !=
nullptr;
992 xComponent->setPositionY(aRect.
Top());
1008 ,
const css::uno::Reference< css::uno::XComponentContext >& _xContext
1009 ,
const uno::Reference< awt::XWindow>& _xInspectorWindow
1010 ,
const css::uno::Reference < css::beans::XPropertySet >& _xRowSet
1013 OSL_PRECOND( _xInspectorWindow.is(),
"openDialogFormula_nothrow: invalid parameters!" );
1014 if ( !_xInspectorWindow.is() )
1016 bool bSuccess =
false;
1018 uno::Reference< awt::XWindow > xInspectorWindow;
1019 uno::Reference< lang::XMultiComponentFactory >
xFactory;
1020 uno::Reference<lang::XMultiServiceFactory> xServiceFactory;
1024 xServiceFactory.set(
xFactory,uno::UNO_QUERY);
1026 uno::Reference< report::meta::XFunctionManager> xMgr(
xFactory->createInstanceWithContext(
"org.libreoffice.report.pentaho.SOFunctionManager",
_xContext),uno::UNO_QUERY);
1029 auto pFormulaManager = std::make_shared<FunctionManager>(xMgr);
1039 bSuccess = aDlg.run() ==
RET_OK;
1044 _in_out_rFormula = OUString::Concat(
"rpt:") +
sFormula.subView(1);
1046 _in_out_rFormula =
"rpt:" +
sFormula;
1050 catch (
const sdb::SQLContext& e) { aErrorInfo = e; }
1051 catch (
const sdbc::SQLWarning& e) { aErrorInfo = e; }
1052 catch (
const sdbc::SQLException& e) { aErrorInfo = e; }
1053 catch(
const uno::Exception& )
1059 ::dbtools::showError( aErrorInfo, xInspectorWindow,
_xContext );
const StyleSettings & GetStyleSettings() const
static weld::Window * GetFrameWeld(const css::uno::Reference< css::awt::XWindow > &rWindow)
static OutputDevice * GetDefaultDevice()
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
void SetScaleY(const Fraction &rScaleY)
void SetScaleX(const Fraction &rScaleX)
const AllSettings & GetSettings() const
bool InsertObjectAtView(SdrObject *pObj, SdrPageView &rPV, SdrInsertFlags nOptions=SdrInsertFlags::NONE)
bool IsObjMarked(SdrObject const *pObj) const
static SdrItemPool & GetGlobalDrawObjectItemPool()
virtual css::uno::Reference< css::drawing::XShape > getUnoShape()
virtual const tools::Rectangle & GetCurrentBoundRect() const
virtual SdrObjKind GetObjIdentifier() const
virtual const tools::Rectangle & GetLastBoundRect() const
virtual const tools::Rectangle & GetLogicRect() const
SdrPageView * GetSdrPageView() const
sal_uInt16 GetLastWhich() const
sal_uInt16 GetFirstWhich() const
const o3tl::sorted_vector< const SfxItemPropertyMapEntry *, SfxItemPropertyMapCompare > & getPropertyEntries() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const
std::unique_ptr< SfxPoolItem > CloneSetWhich(sal_uInt16 nNewWhich) const
void RemoveTabPage(const OUString &rName)
virtual short run() override
const SfxItemSet * GetOutputItemSet() const
const vcl::Font & GetAppFont() const
virtual VclPtr< AbstractSvxAreaTabDialog > CreateSvxAreaTabDialog(weld::Window *pParent, const SfxItemSet *pAttr, SdrModel *pModel, bool bShadow, bool bSlideBackground)=0
static SvxAbstractDialogFactory * Create()
TaskPaneList * GetTaskPaneList()
static css::awt::FontDescriptor CreateFontDescriptor(const vcl::Font &rFont)
static vcl::Font CreateFont(const css::awt::FontDescriptor &rDescr, const vcl::Font &rInitFont)
static XColorListRef CreateStdColorList()
const css::uno::Any & get(const OUString &_rValueName) const
static std::shared_ptr< rptui::OReportModel > getSdrModel(const css::uno::Reference< css::report::XReportDefinition > &_xReportDefinition)
OReportPage * getPage() const
OSectionView & getSectionView() const
const MapMode & GetMapMode() const
SystemWindow * GetSystemWindow() const
inline ::Size VCLSize(const css::awt::Size &rAWTSize)
inline ::Point VCLPoint(const css::awt::Point &rAWTPoint)
OUString RptResId(TranslateId aId)
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
SfxItemInfo const aItemInfos[]
Reference< XSingleServiceFactory > xFactory
#define SAL_N_ELEMENTS(arr)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
tools::Rectangle getRectangleFromControl(SdrObject *pControl)
returns a Rectangle of a given SdrObject
css::uno::Sequence< OUString > getParameterNames(const css::uno::Reference< css::sdbc::XRowSet > &_rxRowSet)
retrieves the names of the parameters of the command which the given RowSet is bound to
uno::Reference< style::XStyle > getUsedStyle(const uno::Reference< report::XReportDefinition > &_xReport)
::rtl::Reference< comphelper::OPropertyChangeMultiplexer > addStyleListener(const css::uno::Reference< css::report::XReportDefinition > &_xReportDefinition,::comphelper::OPropertyChangeListener *_pListener)
add a listener for the properties size, left margin, right margin to the page style
void correctOverlapping(SdrObject *pControl, OReportSection const &_aReportSection, bool _bInsert=true)
ensures that no control overlaps the given one.
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...
bool openDialogFormula_nothrow(OUString &_in_out_rFormula, const css::uno::Reference< css::uno::XComponentContext > &_xContext, const css::uno::Reference< css::awt::XWindow > &_xWindow, const css::uno::Reference< css::beans::XPropertySet > &_xRowSet)
opens the formula dialog
bool openAreaDialog(const css::uno::Reference< css::report::XShape > &_xShape, const css::uno::Reference< css::awt::XWindow > &_xWindow)
opens the area dialog for shapes
const sal_Int16 ISOVER_IGNORE_CUSTOMSHAPES
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.
void adjustSectionName(const css::uno::Reference< css::report::XGroup > &_xGroup, sal_Int32 _nPos)
set the name of the header and footer of the group by the expression appended by the localized name o...
void setZoomFactor(const Fraction &_aZoom, vcl::Window &_rWindow)
sets the map mode at the window
void applyCharacterSettings(const css::uno::Reference< css::report::XReportControlFormat > &_rxReportControlFormat, const css::uno::Sequence< css::beans::NamedValue > &_rSettings)
applies the character settings previously obtained via openCharDialog
static bool checkArrayForOccurrence(SdrObject const *_pObjToCheck, rtl::Reference< SdrUnoObj > _pIgnore[], int _nListLength)
bool openCharDialog(const css::uno::Reference< css::report::XReportControlFormat > &_xReportControlFormat, const css::uno::Reference< css::awt::XWindow > &_xWindow, css::uno::Sequence< css::beans::NamedValue > &_out_rNewValues)
opens the common character font dialog
static constexpr auto Items
VCL_DLLPUBLIC float ConvertFontWidth(FontWidth eWidth)
HashMap_OWString_Interface aMap
constexpr OUStringLiteral PROPERTY_CHARCOMBINEISON
constexpr OUStringLiteral PROPERTY_CHARCOMBINESUFFIX
constexpr OUStringLiteral PROPERTY_CHARESCAPEMENT
constexpr OUStringLiteral PROPERTY_CHARCONTOURED
constexpr OUStringLiteral PROPERTY_NAME
constexpr OUStringLiteral PROPERTY_VERTICALALIGN
constexpr OUStringLiteral PROPERTY_RIGHTMARGIN
constexpr OUStringLiteral PROPERTY_CHARCOLOR
constexpr OUStringLiteral PROPERTY_CHARSHADOWED
constexpr OUStringLiteral PROPERTY_CHARFLASH
constexpr OUStringLiteral PROPERTY_CHARAUTOKERNING
constexpr OUStringLiteral PROPERTY_CHAREMPHASIS
constexpr OUStringLiteral PROPERTY_CHARUNDERLINECOLOR
constexpr OUStringLiteral PROPERTY_CHARLOCALECOMPLEX
constexpr OUStringLiteral PROPERTY_CHARHIDDEN
constexpr OUStringLiteral PROPERTY_LEFTMARGIN
constexpr OUStringLiteral PROPERTY_PARAADJUST
constexpr OUStringLiteral PROPERTY_CHARCASEMAP
constexpr OUStringLiteral PROPERTY_BACKCOLOR
constexpr OUStringLiteral PROPERTY_CHARCOMBINEPREFIX
constexpr OUStringLiteral PROPERTY_CHARRELIEF
constexpr OUStringLiteral PROPERTY_CHARESCAPEMENTHEIGHT
constexpr OUStringLiteral PROPERTY_CHARKERNING
constexpr OUStringLiteral PROPERTY_CHARLOCALE
constexpr OUStringLiteral PROPERTY_PAPERSIZE
constexpr OUStringLiteral PROPERTY_CONTROLBACKGROUND
constexpr OUStringLiteral PROPERTY_CHARLOCALEASIAN
Reference< XComponentContext > _xContext
#define COL_DEFAULT_SHAPE_FILLING
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
#define COL_DEFAULT_SHAPE_STROKE
constexpr TypedWhichId< XFillBackgroundItem > XATTR_FILLBACKGROUND(XATTR_FILL_FIRST+19)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)