45#include <com/sun/star/lang/NullPointerException.hpp>
46#include <com/sun/star/form/inspection/FormComponentPropertyHandler.hpp>
47#include <com/sun/star/inspection/StringRepresentation.hpp>
48#include <com/sun/star/inspection/PropertyControlType.hpp>
49#include <com/sun/star/inspection/XStringListControl.hpp>
50#include <com/sun/star/report/Function.hpp>
51#include <com/sun/star/report/XReportDefinition.hpp>
52#include <com/sun/star/report/XShape.hpp>
53#include <com/sun/star/report/XSection.hpp>
54#include <com/sun/star/report/XFixedLine.hpp>
55#include <com/sun/star/script/Converter.hpp>
56#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
57#include <com/sun/star/sdb/CommandType.hpp>
58#include <com/sun/star/sdb/FilterDialog.hpp>
59#include <com/sun/star/sdb/SQLContext.hpp>
60#include <com/sun/star/sdbc/XConnection.hpp>
61#include <com/sun/star/util/SearchAlgorithms2.hpp>
62#include <com/sun/star/util/MeasureUnit.hpp>
63#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
64#include <com/sun/star/container/XNameContainer.hpp>
65#include <com/sun/star/inspection/XNumericControl.hpp>
66#include <com/sun/star/style/ParagraphAdjust.hpp>
72#include <core_resource.hxx>
73#include <stringarray.hrc>
89#define DATA_OR_FORMULA 0
92#define USER_DEF_FUNCTION 3
103OUString lcl_getQuotedFunctionName(std::u16string_view _sFunction)
105 return OUString::Concat(
"[") + _sFunction +
"]";
108OUString lcl_getQuotedFunctionName(
const uno::Reference< report::XFunction>& _xFunction)
110 return lcl_getQuotedFunctionName(_xFunction->getName());
113void lcl_collectFunctionNames(
const uno::Reference< report::XFunctions>& _xFunctions,
TFunctions& _rFunctionNames)
115 uno::Reference< report::XFunctionsSupplier> xParent(_xFunctions->getParent(),uno::UNO_QUERY_THROW);
116 const sal_Int32
nCount = _xFunctions->getCount();
119 uno::Reference< report::XFunction > xFunction(_xFunctions->getByIndex(
i),uno::UNO_QUERY_THROW);
120 _rFunctionNames.emplace( lcl_getQuotedFunctionName(xFunction),
TFunctionPair(xFunction,xParent) );
124void lcl_collectFunctionNames(
const uno::Reference< report::XSection>& _xSection,
TFunctions& _rFunctionNames)
126 const uno::Reference< report::XReportDefinition> xReportDefinition = _xSection->getReportDefinition();
127 const uno::Reference< report::XGroups> xGroups = xReportDefinition->getGroups();
129 uno::Reference< report::XGroup> xGroup = _xSection->getGroup();
132 else if ( _xSection == xReportDefinition->getDetail() )
133 nPos = xGroups->getCount()-1;
135 for (sal_Int32
i = 0 ;
i <=
nPos ; ++
i)
137 xGroup.set(xGroups->getByIndex(
i),uno::UNO_QUERY_THROW);
138 lcl_collectFunctionNames(xGroup->getFunctions(),_rFunctionNames);
140 lcl_collectFunctionNames(xReportDefinition->getFunctions(),_rFunctionNames);
143void lcl_convertFormulaTo(
const uno::Any& _aPropertyValue,
uno::Any& _rControlValue)
146 _aPropertyValue >>=
sName;
147 const sal_Int32 nLen =
sName.getLength();
150 ReportFormula aFormula(
sName );
151 _rControlValue <<= aFormula.getUndecoratedContent();
158template <
typename T, T base> T lcl_round(T
value)
160 OSL_ENSURE(
value >= 0,
"lcl_round: positive numbers only please");
161 const T threshold = (
base % 2 == 0) ? (
base/2) : (
base/2 + 1);
163 if ( rest >= threshold )
185 _rControlValue >>=
sName;
187 if (
sName.isEmpty() )
201 , m_nDataFieldType(0)
202 , m_bNewFunction(false)
211 catch(
const uno::Exception&)
222 return "com.sun.star.comp.report.GeometryHandler";
232 return {
"com.sun.star.report.inspection.GeometryHandler" };
252 catch(uno::Exception&)
270 ::osl::MutexGuard aGuard(
m_aMutex );
282 const uno::Reference< container::XNameContainer > xObjectAsContainer( _rxInspectee, uno::UNO_QUERY );
283 m_xReportComponent.set( xObjectAsContainer->getByName(
"ReportComponent"), uno::UNO_QUERY );
285 static constexpr OUStringLiteral sRowSet(
u"RowSet");
286 if ( xObjectAsContainer->hasByName( sRowSet ) )
288 const uno::Any aRowSet( xObjectAsContainer->getByName(sRowSet) );
292 xProp->setPropertyValue( sRowSet, aRowSet );
300 const uno::Reference< report::XReportComponent> xReportComponent(
m_xReportComponent, uno::UNO_QUERY);
302 if ( !xSection.is() && xReportComponent.is() )
303 xSection = xReportComponent->getSection();
307 catch(
const uno::Exception &)
309 throw lang::NullPointerException();
316 ::osl::MutexGuard aGuard(
m_aMutex );
326 lcl_convertFormulaTo(aPropertyValue,aPropertyValue);
330 aPropertyValue >>= sDataField;
337 aPropertyValue <<= sDataField;
338 else if ( sDataField.isEmpty() )
362 lcl_convertFormulaTo(aDataField,aDataField);
364 aDataField >>= sDataField;
370 if (
isDefaultFunction(sDataField,sDataField,uno::Reference< report::XFunctionsSupplier>(),
true) )
375 aPropertyValue = aDataField;
391 aPropertyValue.clear();
405 return aPropertyValue;
410 ::osl::ResettableMutexGuard aGuard(
m_aMutex );
413 bool bHandled =
false;
425 const OUString sOldScope =
m_sScope;
428 lcl_convertFormulaTo(
Value,aPropertyValue);
430 aPropertyValue >>= sDataField;
436 if ( !sDataField.isEmpty() )
438 if (
isDefaultFunction(sDataField,sDataField,uno::Reference< report::XFunctionsSupplier>(),
true) )
453 const OUString sOldScope =
m_sScope;
476 if ( !(
Value >>= sFunction) || sFunction.isEmpty() )
485 beans::PropertyChangeEvent
aEvent;
506 const OUString sOldScope =
m_sScope;
514 OUString sNamePostfix;
516 const uno::Reference< report::XFunctionsSupplier> xFunctionsSupplier =
fillScope_throw(sNamePostfix);
530 lcl_convertFormulaTo(aPropertyValue,aPropertyValue);
532 aPropertyValue >>= sDataField;
556 OSL_ENSURE(
m_xFunction.is(),
"Where is my function gone!");
558 OUString sNamePostfix;
559 const uno::Reference< report::XFunctionsSupplier> xFunctionsSupplier =
fillScope_throw(sNamePostfix);
561 OUString sQuotedFunctionName(lcl_getQuotedFunctionName(
m_xFunction));
562 if (
isDefaultFunction(sQuotedFunctionName,sQuotedFunctionName,xFunctionsSupplier,
true) )
566 OUString sDefaultFunctionName;
581 const uno::Reference< report::XReportComponent> xSourceReportComponent(
m_xReportComponent,uno::UNO_QUERY);
582 if ( xSourceReportComponent.is() )
584 sal_Int32 nNewValue = 0;
586 OSL_ENSURE(nNewValue >= 0,
"A position/dimension should not be negative!");
587 nNewValue = lcl_round<sal_Int32, 10>(nNewValue);
588 awt::Point aAwtPoint = xSourceReportComponent->getPosition();
589 awt::Size aAwtSize = xSourceReportComponent->getSize();
591 aAwtPoint.X = nNewValue;
593 aAwtPoint.Y = nNewValue;
595 aAwtSize.Height = nNewValue;
597 aAwtSize.Width = nNewValue;
605 const uno::Reference< report::XReportControlFormat > xReportControlFormat(
m_xReportComponent,uno::UNO_QUERY_THROW );
606 uno::Sequence< beans::NamedValue > aFontSettings;
607 OSL_VERIFY(
Value >>= aFontSettings );
630 ::osl::MutexGuard aGuard(
m_aMutex );
635 const uno::Reference< inspection::XPropertyControlFactory >& _rxControlFactory
636 ,inspection::LineDescriptor & out_Descriptor
638 ,
bool _bReadOnlyControl
639 ,
bool _bTrueIfListBoxFalseIfComboBox
642 std::vector<OUString> aList;
643 for (
const TranslateId* pItem = pResId; *pItem; ++pItem)
649 const uno::Reference< inspection::XPropertyControlFactory >& _rxControlFactory
650 ,inspection::LineDescriptor & out_Descriptor
651 ,const ::std::vector< OUString>& _aEntries
652 ,
bool _bReadOnlyControl
653 ,
bool _bTrueIfListBoxFalseIfComboBox
656 const uno::Reference< inspection::XStringListControl > xListControl(
657 _rxControlFactory->createPropertyControl(
658 _bTrueIfListBoxFalseIfComboBox ? inspection::PropertyControlType::ListBox : inspection::PropertyControlType::ComboBox, _bReadOnlyControl
663 out_Descriptor.Control = xListControl.get();
664 for (
auto const& it : _aEntries)
666 xListControl->appendListEntry(it);
673 inspection::LineDescriptor aOut;
690 ::std::vector< OUString > aList;
697 ::std::vector< OUString > aList;
704 ::std::vector< OUString > aList;
729 pResId = RID_STR_KEEPTOGETHER_CONST;
736 aOut.HasPrimaryButton =
true;
737 aOut.Control = _xControlFactory->createPropertyControl(inspection::PropertyControlType::MultiLineTextField ,
false);
741 aOut.HasPrimaryButton =
true;
742 aOut.Control = _xControlFactory->createPropertyControl(inspection::PropertyControlType::MultiLineTextField ,
false);
746 uno::Reference< inspection::XStringListControl > xListControl(
747 _xControlFactory->createPropertyControl(
756 aOut.HasPrimaryButton =
true;
759 aOut.Control = xListControl.get();
764 [&xListControl] (
const TFunctions::value_type& func) {
765 xListControl->appendListEntry(func.first);
772 xListControl->appendListEntry(it);
776 xListControl->appendListEntry(it);
783 aOut.Control = _xControlFactory->createPropertyControl( inspection::PropertyControlType::ColorListBox,
false );
787 aOut.Control = _xControlFactory->createPropertyControl( inspection::PropertyControlType::TextField,
true );
788 aOut.HasPrimaryButton =
true;
792 aOut.Control = _xControlFactory->createPropertyControl( inspection::PropertyControlType::TextField,
true );
793 aOut.HasPrimaryButton =
true;
810 std::u16string_view(
u"Data")
812 std::u16string_view(
u"General");
825 uno::Reference< inspection::XNumericControl > xNumericControl(aOut.Control,uno::UNO_QUERY);
826 xNumericControl->setDecimalDigits( 2 );
827 xNumericControl->setValueUnit( util::MeasureUnit::MM_100TH );
828 uno::Reference< drawing::XShapeDescriptor> xShapeDesc(
m_xReportComponent,uno::UNO_QUERY);
829 bool bSetMin = !xShapeDesc.is() || xShapeDesc->getShapeType() !=
"com.sun.star.drawing.CustomShape";
831 xNumericControl->setMinValue(beans::Optional<double>(
true,0.0));
832 if ( nDisplayUnit != -1 )
833 xNumericControl->setDisplayUnit( nDisplayUnit );
835 if ( xComp.is() && xComp->getSection().is() )
837 uno::Reference< report::XReportDefinition > xReport = xComp->getSection()->getReportDefinition();
838 OSL_ENSURE(xReport.is(),
"Why is the report definition NULL!");
849 xNumericControl->setMinValue(beans::Optional<double>(
true,0.0));
854 if ( xFixedLine.is() && xFixedLine->getOrientation() == 1 )
855 xNumericControl->setMinValue(beans::Optional<double>(
true,0.08 ));
868 sal_Int32 nHeight = 0;
869 const sal_Int32
nCount = xSection->getCount();
872 uno::Reference<drawing::XShape> xShape(xSection->getByIndex(
i),uno::UNO_QUERY);
873 nHeight = ::std::max<sal_Int32>(nHeight,xShape->getPosition().Y + xShape->getSize().Height);
875 xNumericControl->setMinValue(beans::Optional<double>(
true,nHeight ));
885 const beans::Property* pIter = aProps.getConstArray();
886 const beans::Property* pEnd = pIter + aProps.getLength();
887 const beans::Property* pFind = ::std::find_if(pIter, pEnd,
888 [&PropertyName] (
const beans::Property&
x) ->
bool {
889 return x.Name == PropertyName;
892 return beans::Property();
897 std::vector<OUString> aList;
898 for (
const TranslateId* pItem = pResId; *pItem; ++pItem)
900 uno::Sequence< OUString >
aSeq(aList.size());
901 auto aSeqRange = asNonConstRange(
aSeq);
902 for (
size_t i = 0;
i < aList.size(); ++
i)
903 aSeqRange[
i] = aList[
i];
905 uno::Reference< inspection::XStringRepresentation > xConversionHelper = inspection::StringRepresentation::createConstant(
m_xContext,
m_xTypeConverter,_sConstantName,
aSeq);
906 if ( _bToControlValue )
908 return uno::Any( xConversionHelper->convertToControlValue( _aValue ) );
912 OUString sControlValue;
913 _aValue >>= sControlValue;
914 const beans::Property aProp =
getProperty(PropertyName);
915 return xConversionHelper->convertToPropertyValue( sControlValue, aProp.Type );
921 ::osl::MutexGuard aGuard(
m_aMutex );
922 uno::Any aPropertyValue( _rControlValue );
928 aPropertyValue =
getConstantValue(
false,RID_STR_FORCENEWPAGE_CONST,_rControlValue,
"com.sun.star.report.ForceNewPage",PropertyName);
931 aPropertyValue =
getConstantValue(
false,RID_STR_GROUPKEEPTOGETHER_CONST,_rControlValue,
"com.sun.star.report.GroupKeepTogether",PropertyName);
935 aPropertyValue =
getConstantValue(
false,RID_STR_REPORTPRINTOPTION_CONST,_rControlValue,
"com.sun.star.report.ReportPrintOption",PropertyName);
949 aPropertyValue =
getConstantValue(
false,RID_STR_KEEPTOGETHER_CONST,_rControlValue,
"com.sun.star.report.KeepTogether",PropertyName);
970 const beans::Property aProp =
getProperty(PropertyName);
971 if ( aPropertyValue.getValueType().equals( aProp.Type ) )
973 return aPropertyValue;
975 if ( _rControlValue.getValueType().getTypeClass() == uno::TypeClass_STRING )
977 OUString sControlValue;
978 _rControlValue >>= sControlValue;
980 const uno::Reference< inspection::XStringRepresentation > xConversionHelper = inspection::StringRepresentation::create(
m_xContext,
m_xTypeConverter );
981 aPropertyValue = xConversionHelper->convertToPropertyValue( sControlValue, aProp.Type );
989 catch(
const uno::Exception& )
991 TOOLS_WARN_EXCEPTION(
"reportdesign",
"GeometryHandler::convertToPropertyValue: caught an exception while converting via TypeConverter!" );
1004 OUString sDataField;
1005 _rControlValue >>= sDataField;
1018 sal_Int32 nPosX = 0;
1019 aPropertyValue >>= nPosX;
1020 const uno::Reference< report::XReportComponent> xSourceReportComponent(
m_xReportComponent,uno::UNO_QUERY);
1021 if ( xSourceReportComponent->getSection().is() )
1022 nPosX += getStyleProperty<sal_Int32>(xSourceReportComponent->getSection()->getReportDefinition(),
PROPERTY_LEFTMARGIN);
1023 aPropertyValue <<= nPosX;
1032 aPropertyValue = _rControlValue;
1037 _rControlValue >>= sValue;
1041 for (
const TranslateId* pItem = RID_STR_TYPE_CONST; *pItem; ++pItem)
1051 aPropertyValue <<= nFound;
1055 aPropertyValue = _rControlValue;
1060 _rControlValue >>= sValue;
1064 for (
const TranslateId* pItem = RID_STR_VERTICAL_ALIGN_CONST; *pItem; ++pItem)
1074 aPropertyValue <<= static_cast<style::VerticalAlignment>(nFound);
1080 _rControlValue >>= sValue;
1084 for (
const TranslateId* pItem = RID_STR_PARAADJUST_CONST; *pItem; ++pItem)
1095 aPropertyValue <<= static_cast<sal_Int16>(nFound);
1101 return aPropertyValue;
1106 uno::Any aControlValue( _rPropertyValue );
1109 return aControlValue;
1111 uno::Any aPropertyValue(_rPropertyValue);
1113 ::osl::MutexGuard aGuard(
m_aMutex );
1121 aControlValue =
getConstantValue(
true,RID_STR_FORCENEWPAGE_CONST,aPropertyValue,
"com.sun.star.report.ForceNewPage",PropertyName);
1124 aControlValue =
getConstantValue(
true,RID_STR_GROUPKEEPTOGETHER_CONST,aPropertyValue,
"com.sun.star.report.GroupKeepTogether",PropertyName);
1128 aControlValue =
getConstantValue(
true,RID_STR_REPORTPRINTOPTION_CONST,aPropertyValue,
"com.sun.star.report.ReportPrintOption",PropertyName);
1133 aControlValue =
getConstantValue(
true,RID_STR_KEEPTOGETHER_CONST,aPropertyValue,
"com.sun.star.report.KeepTogether",PropertyName);
1151 if ( _rControlValueType.getTypeClass() == uno::TypeClass_STRING )
1153 const uno::Reference< inspection::XStringRepresentation > xConversionHelper = inspection::StringRepresentation::create(
m_xContext,
m_xTypeConverter );
1154 aControlValue <<= xConversionHelper->convertToControlValue( aPropertyValue );
1160 aControlValue =
m_xTypeConverter->convertTo( aPropertyValue, _rControlValueType );
1162 catch(
const uno::Exception& )
1164 TOOLS_WARN_EXCEPTION(
"reportdesign",
"GeometryHandler::convertToControlValue: caught an exception while converting via TypeConverter!" );
1172 lcl_convertFormulaTo(aPropertyValue,aControlValue);
1177 aControlValue >>= sValue;
1179 aControlValue <<= sValue;
1181 lcl_convertFormulaTo(aPropertyValue,aControlValue);
1189 sal_Int32 nPosX = 0;
1190 aPropertyValue >>= nPosX;
1191 const uno::Reference< report::XReportComponent> xSourceReportComponent(
m_xReportComponent,uno::UNO_QUERY);
1192 if ( xSourceReportComponent->getSection().is() )
1193 nPosX -= getStyleProperty<sal_Int32>(xSourceReportComponent->getSection()->getReportDefinition(),
PROPERTY_LEFTMARGIN);
1194 aPropertyValue <<= nPosX;
1195 aControlValue =
m_xFormComponentHandler->convertToControlValue(PropertyName, aPropertyValue, _rControlValueType);
1205 aControlValue = aPropertyValue;
1215 style::VerticalAlignment nParagraphVertAlign = style::VerticalAlignment_TOP;
1216 aPropertyValue >>= nParagraphVertAlign;
1217 if (sal_uInt32(nParagraphVertAlign) <
SAL_N_ELEMENTS(RID_STR_VERTICAL_ALIGN_CONST) - 1)
1218 aControlValue <<= RptResId(RID_STR_VERTICAL_ALIGN_CONST[static_cast<sal_uInt32>(nParagraphVertAlign)]);
1223 sal_Int16 nParagraphAdjust = sal_Int16(style::ParagraphAdjust_LEFT);
1224 aPropertyValue >>= nParagraphAdjust;
1226 aControlValue <<=
RptResId(RID_STR_PARAADJUST_CONST[nParagraphAdjust]);
1234 aPropertyValue.clear();
1238 aControlValue =
m_xFormComponentHandler->convertToControlValue(PropertyName, aPropertyValue, _rControlValueType);
1240 return aControlValue;
1244 ::osl::MutexGuard aGuard(
m_aMutex );
1251 ::osl::MutexGuard aGuard(
m_aMutex );
1259 ::std::vector< beans::Property > aNewProps;
1260 aNewProps.reserve(20);
1263 const OUString pIncludeProperties[] =
1278 ,OUString(
"ControlLabel")
1300 const uno::Reference < beans::XPropertySetInfo > xInfo =
m_xReportComponent->getPropertySetInfo();
1301 const uno::Sequence< beans::Property>
aSeq = xInfo->getProperties();
1302 for (
const auto & rIncludeProp : pIncludeProperties)
1304 const beans::Property* pFind = ::std::find_if(
aSeq.begin(),
aSeq.end(),
1305 [&rIncludeProp] (
const beans::Property&
x) ->
bool {
1306 return x.Name == rIncludeProp;
1308 if ( pFind !=
aSeq.end() )
1313 beans::Property aValue;
1315 aNewProps.push_back(aValue);
1317 aNewProps.push_back(aValue);
1319 aNewProps.push_back(aValue);
1321 aNewProps.push_back(*pFind);
1334 return uno::Sequence< beans::Property > (&(*aNewProps.begin()),aNewProps.size());
1339 uno::Sequence< OUString > aRet;
1340 const uno::Reference<report::XReportDefinition> xReport(
m_xReportComponent,uno::UNO_QUERY);
1341 if ( xReport.is() && !uno::Reference< report::XSection>(xReport->getParent(),uno::UNO_QUERY).is() )
1344 OUString* pIter = aRet.getArray();
1356 ::osl::MutexGuard aGuard(
m_aMutex );
1358 uno::Sequence< OUString >
aSeq
1377 if ( !_rxInspectorUI.is() )
1378 throw lang::NullPointerException();
1381 ::osl::ClearableMutexGuard aGuard(
m_aMutex );
1383 inspection::InteractiveSelectionResult eResult = inspection::InteractiveSelectionResult_Cancelled;
1388 eResult = inspection::InteractiveSelectionResult_ObtainedValue;
1394 ::osl::ClearableMutexGuard aGuard(
m_aMutex );
1396 inspection::InteractiveSelectionResult eResult = inspection::InteractiveSelectionResult_Cancelled;
1397 const uno::Reference< awt::XWindow> xInspectorWindow(
m_xContext->getValueByName(
"DialogParentWindow") ,uno::UNO_QUERY);
1398 const uno::Reference< report::XReportControlFormat> xReportControlFormat(
m_xReportComponent,uno::UNO_QUERY);
1401 uno::Sequence< beans::NamedValue > aFontSettings;
1404 _rData <<= aFontSettings;
1405 eResult = inspection::InteractiveSelectionResult_ObtainedValue;
1414 ::osl::ClearableMutexGuard aGuard(
m_aMutex );
1419 const uno::Reference< awt::XWindow> xInspectorWindow(
m_xContext->getValueByName(
"DialogParentWindow") ,uno::UNO_QUERY);
1420 uno::Reference< uno::XComponentContext > xContext =
m_xContext;
1421 uno::Reference< beans::XPropertySet > xRowSet(
m_xRowSet,uno::UNO_QUERY);
1424 inspection::InteractiveSelectionResult eResult = inspection::InteractiveSelectionResult_Cancelled;
1428 eResult = inspection::InteractiveSelectionResult_ObtainedValue;
1434 ::osl::ClearableMutexGuard aGuard(
m_aMutex );
1436 inspection::InteractiveSelectionResult eResult = inspection::InteractiveSelectionResult_Cancelled;
1437 const uno::Reference< awt::XWindow> xInspectorWindow(
m_xContext->getValueByName(
"DialogParentWindow") ,uno::UNO_QUERY);
1443 eResult = inspection::InteractiveSelectionResult_ObtainedValue;
1444 beans::PropertyChangeEvent aScopeEvent;
1453 return m_xFormComponentHandler->onInteractivePropertySelection(PropertyName, Primary, _rData, _rxInspectorUI);
1458 if ( !_rxInspectorUI.is() )
1459 throw lang::NullPointerException();
1461 ::osl::MutexGuard aGuard(
m_aMutex );
1467 sal_uInt32 nNewVal = 0;
1468 NewValue >>= nNewVal;
1477 OSL_ENSURE(
m_sScope.isEmpty(),
"Why is the m_sScope set?");
1507 bEnable = !sValue.isEmpty();
1515 m_xFormComponentHandler->actuatingPropertyChanged(ActuatingPropertyName, NewValue, OldValue, _rxInspectorUI, _bFirstTimeInit);
1526 bool bValue =
false;
1527 NewValue >>= bValue;
1534 m_xFormComponentHandler->actuatingPropertyChanged(ActuatingPropertyName, NewValue, OldValue, _rxInspectorUI, _bFirstTimeInit);
1546 _out_rSelectedClause.clear();
1547 bool bSuccess =
false;
1549 uno::Reference< awt::XWindow > xInspectorWindow;
1550 uno::Reference< lang::XMultiComponentFactory >
xFactory;
1554 xInspectorWindow.set(
m_xContext->getValueByName(
"DialogParentWindow") ,uno::UNO_QUERY);
1555 uno::Reference<sdbc::XConnection> xCon(
m_xContext->getValueByName(
"ActiveConnection") ,uno::UNO_QUERY);
1559 uno::Reference< beans::XPropertySet> xRowSetProp(
m_xRowSet,uno::UNO_QUERY);
1563 xRowSetProp.set(
m_xRowSet,uno::UNO_QUERY);
1569 uno::Reference< sdb::XSingleSelectQueryComposer > xComposer( ::dbtools::getCurrentSettingsComposer( xRowSetProp,
m_xContext,
nullptr ) );
1570 OSL_ENSURE( xComposer.is(),
"GeometryHandler::impl_dialogFilter_nothrow: could not obtain a composer!" );
1571 if ( !xComposer.is() )
1575 uno::Reference< ui::dialogs::XExecutableDialog > xDialog = sdb::FilterDialog::createWithQuery(
m_xContext, xComposer,
m_xRowSet, xInspectorWindow);
1577 const OUString sPropertyUIName(
RptResId(RID_STR_FILTER));
1579 xDialog->setTitle( sPropertyUIName );
1581 _rClearBeforeDialog.clear();
1582 bSuccess = ( xDialog->execute() != 0 );
1584 _out_rSelectedClause = xComposer->getFilter();
1586 catch (
const sdb::SQLContext& e) { aErrorInfo = e; }
1587 catch (
const sdbc::SQLWarning& e) { aErrorInfo = e; }
1588 catch (
const sdbc::SQLException& e) { aErrorInfo = e; }
1589 catch(
const uno::Exception& )
1595 ::dbtools::showError( aErrorInfo, xInspectorWindow,
m_xContext );
1601 const awt::Size& _aSize)
1603 const uno::Reference< report::XReportComponent> xSourceReportComponent(
m_xReportComponent,uno::UNO_QUERY);
1604 const uno::Reference< report::XSection> xSection(xSourceReportComponent->getParent(),uno::UNO_QUERY);
1605 if ( !xSection.is() || uno::Reference< report::XShape>(xSourceReportComponent,uno::UNO_QUERY).is() )
1609 if ( aPos.
X() < 0 || aPos.
Y() < 0 )
1610 throw beans::PropertyVetoException(
RptResId(RID_STR_ILLEGAL_POSITION),xSourceReportComponent);
1614 const sal_Int32
nCount = xSection->getCount();
1617 const uno::Reference< report::XReportComponent> xReportComponent(xSection->getByIndex(
i),uno::UNO_QUERY);
1618 if ( xReportComponent.is() && xReportComponent != xSourceReportComponent )
1620 const ::tools::Rectangle aBoundRect(
VCLPoint(xReportComponent->getPosition()),
VCLSize(xReportComponent->getSize()));
1621 const ::tools::Rectangle aRect = aSourceRect.
GetIntersection(aBoundRect);
1622 if ( !aRect.IsEmpty() && (aRect.Left() != aRect.Right() && aRect.Top() != aRect.Bottom() ) )
1623 throw beans::PropertyVetoException(
RptResId( RID_STR_OVERLAP_OTHER_CONTROL),xSourceReportComponent);
1634 out_rList.push_back(it.getName());
1640 ::std::back_inserter(out_rList),
1646 ::std::vector< OUString > aList;
1649 ::std::vector< OUString >::const_iterator aFind = ::std::find(aList.begin(),aList.end(),_sUIName);
1650 if ( aFind != aList.end() )
1652 const std::size_t
nPos = aFind - aList.begin();
1653 const uno::Reference< report::XReportDefinition> xReportDefinition(
m_xReportComponent,uno::UNO_QUERY);
1654 if ( xReportDefinition.is() )
1656 const uno::Sequence< OUString > aMimeTypes( xReportDefinition->getAvailableMimeTypes() );
1657 sRet = aMimeTypes[
nPos];
1669 sRet = pFilter->GetUIName();
1670 if ( sRet.isEmpty() )
1679 const uno::Reference< report::XReportDefinition> xReportDefinition(
m_xReportComponent,uno::UNO_QUERY);
1680 if ( xReportDefinition.is() )
1682 const uno::Sequence< OUString > aMimeTypes( xReportDefinition->getAvailableMimeTypes() );
1683 for(
const OUString& rMimeType : aMimeTypes)
1686 if ( !sDocName.isEmpty() )
1687 _out_rList.push_back(sDocName);
1691 catch(uno::Exception&)
1701 const uno::Reference< report::XReportComponent> xSourceReportComponent(
m_xReportComponent,uno::UNO_QUERY_THROW);
1702 const uno::Reference< report::XSection> xSection(xSourceReportComponent->getParent(),uno::UNO_QUERY_THROW);
1704 const uno::Reference< report::XReportDefinition> xReportDefinition = xSection->getReportDefinition();
1705 const uno::Reference< report::XGroups> xGroups = xReportDefinition->getGroups();
1706 sal_Int32
nPos = -1;
1707 uno::Reference< report::XGroup> xGroup = xSection->getGroup();
1710 else if ( xSection == xReportDefinition->getDetail() )
1711 nPos = xGroups->getCount()-1;
1713 const OUString sGroup =
RptResId(RID_STR_SCOPE_GROUP);
1714 for (sal_Int32
i = 0 ;
i <=
nPos ; ++
i)
1716 xGroup.set(xGroups->getByIndex(
i),uno::UNO_QUERY_THROW);
1717 OUString sGroupName = sGroup.replaceFirst(
"%1",xGroup->getExpression());
1718 _out_rList.push_back(sGroupName);
1720 _out_rList.push_back(xReportDefinition->getName());
1722 catch(uno::Exception&)
1730 uno::Reference< report::XFunctionsSupplier> xReturn;
1732 const uno::Reference< report::XReportComponent> xSourceReportComponent(
m_xReportComponent,uno::UNO_QUERY_THROW);
1733 const uno::Reference< report::XSection> xSection(xSourceReportComponent->getParent(),uno::UNO_QUERY_THROW);
1734 const uno::Reference< report::XReportDefinition> xReportDefinition = xSection->getReportDefinition();
1737 const uno::Reference< report::XGroup> xGroup = xSection->getGroup();
1740 OUString sGroupName =
RptResId(RID_STR_SCOPE_GROUP);
1741 _rsNamePostfix = xGroup->getExpression();
1742 m_sScope = sGroupName.replaceFirst(
"%1",_rsNamePostfix);
1743 xReturn = xGroup.get();
1745 else if ( xSection == xReportDefinition->getDetail() )
1747 const uno::Reference< report::XGroups> xGroups = xReportDefinition->getGroups();
1748 const sal_Int32
nCount = xGroups->getCount();
1751 const uno::Reference< report::XGroup> xGroup2(xGroups->getByIndex(
nCount - 1),uno::UNO_QUERY_THROW);
1752 OUString sGroupName =
RptResId(RID_STR_SCOPE_GROUP);
1753 _rsNamePostfix = xGroup2->getExpression();
1754 m_sScope = sGroupName.replaceFirst(
"%1",_rsNamePostfix);
1755 xReturn = xGroup2.get();
1760 xReturn = xReportDefinition.get();
1761 _rsNamePostfix =
m_sScope = xReportDefinition->getName();
1764 else if (
m_sScope == xReportDefinition->getName() )
1766 xReturn = xReportDefinition.get();
1771 uno::Reference< report::XGroups> xGroups = xReportDefinition->getGroups();
1772 const sal_Int32
nCount = xGroups->getCount();
1776 const uno::Reference< report::XGroup> xGroup(xGroups->getByIndex(
i),uno::UNO_QUERY_THROW);
1777 OUString sGroupName =
RptResId(RID_STR_SCOPE_GROUP);
1778 if (
m_sScope == sGroupName.replaceFirst(
"%1",xGroup->getExpression()) )
1780 _rsNamePostfix = xGroup->getExpression();
1781 xReturn = xGroup.get();
1787 OSL_ENSURE(xReturn.is(),
"Why don't we have a functionssupplier here!");
1793 ,OUString& _rDataField
1794 ,
const uno::Reference< report::XFunctionsSupplier>& _xFunctionsSupplier
1797 bool bDefaultFunction =
false;
1800 const uno::Reference< report::XReportComponent> xSourceReportComponent(
m_xReportComponent,uno::UNO_QUERY_THROW);
1801 const uno::Reference< report::XSection> xSection(xSourceReportComponent->getParent(),uno::UNO_QUERY_THROW);
1802 const uno::Reference< report::XReportDefinition> xReportDefinition = xSection->getReportDefinition();
1804 ::std::pair<TFunctions::const_iterator,TFunctions::const_iterator> aFind =
m_aFunctionNames.equal_range(_sQuotedFunction);
1805 while ( aFind.first != aFind.second )
1807 if ( !_xFunctionsSupplier.is() || _xFunctionsSupplier == aFind.first->second.second )
1809 const beans::Optional< OUString> aInitialFormula = aFind.first->second.first->getInitialFormula();
1810 if ( aInitialFormula.IsPresent )
1812 OUString sDefaultFunctionName;
1814 if ( bDefaultFunction )
1820 uno::Reference< report::XGroup> xGroup(aFind.first->second.second,uno::UNO_QUERY);
1823 OUString sGroupName =
RptResId(RID_STR_SCOPE_GROUP);
1824 m_sScope = sGroupName.replaceFirst(
"%1",xGroup->getExpression());
1827 m_sScope = xReportDefinition->getName();
1836 catch(uno::Exception&)
1840 return bDefaultFunction;
1844 ,OUString& _rDataField
1845 ,OUString& _rsDefaultFunctionName)
const
1847 bool bDefaultFunction =
false;
1850 const OUString
sFormula( _xFunction->getFormula() );
1856 aSearchOptions.searchString = rDefaultFunction.m_sSearchString;
1857 utl::TextSearch aTextSearch( aSearchOptions);
1858 sal_Int32 start = 0;
1859 sal_Int32 end = sFormula.getLength();
1860 return aTextSearch.SearchForward(sFormula, &start, &end) && start == 0 && end == sFormula.getLength();
1864 sal_Int32
start = 0;
1866 aSearchOptions.
searchString =
"\\[[:alpha:]+([:space:]*[:alnum:]*)*\\]";
1871 _rsDefaultFunctionName = aIter->m_sName;
1872 bDefaultFunction =
true;
1875 catch(uno::Exception&)
1879 return bDefaultFunction;
1899 aDefault.
m_sFormula =
"rpt:[%Column] + [%FunctionName]";
1900 aDefault.
m_sSearchString =
"rpt:\\[[:alpha:]+([:space:]*[:alnum:]*)*\\][:space:]*\\+[:space:]*\\[[:alpha:]+([:space:]*[:alnum:]*)*\\]";
1906 aDefault.
m_sFormula =
"rpt:IF([%Column] < [%FunctionName];[%Column];[%FunctionName])";
1907 aDefault.
m_sSearchString =
"rpt:IF\\((\\[[:alpha:]+([:space:]*[:alnum:]*)*\\])[:space:]*<[:space:]*(\\[[:alpha:]+([:space:]*[:alnum:]*)*\\]);[:space:]*\\1[:space:]*;[:space:]*\\3[:space:]*\\)";
1913 aDefault.
m_sFormula =
"rpt:IF([%Column] > [%FunctionName];[%Column];[%FunctionName])";
1914 aDefault.
m_sSearchString =
"rpt:IF\\((\\[[:alpha:]+([:space:]*[:alnum:]*)*\\])[:space:]*>[:space:]*(\\[[:alpha:]+([:space:]*[:alnum:]*)*\\]);[:space:]*\\1[:space:]*;[:space:]*\\3[:space:]*\\)";
1924 OUString sNamePostfix;
1925 const uno::Reference< report::XFunctionsSupplier> xFunctionsSupplier =
fillScope_throw(sNamePostfix);
1928 [&_sFunction](
const DefaultFunction& rDefaultFunction) { return rDefaultFunction.m_sName == _sFunction; });
1931 const OUString sFunctionName( _sFunction + _sDataField + sNamePostfix);
1932 const OUString sQuotedFunctionName(lcl_getQuotedFunctionName(sFunctionName));
1934 beans::PropertyChangeEvent
aEvent;
1938 ::std::pair<TFunctions::const_iterator,TFunctions::const_iterator> aFind =
m_aFunctionNames.equal_range(sQuotedFunctionName);
1939 while ( aFind.first != aFind.second )
1941 if ( xFunctionsSupplier == aFind.first->second.second )
1945 isDefaultFunction(sQuotedFunctionName,sTemp,uno::Reference< report::XFunctionsSupplier>(),
true);
1950 if ( aFind.first == aFind.second )
1960 catch(uno::Exception&)
1971 const OUString sQuotedFunctionName(lcl_getQuotedFunctionName(
m_xFunction));
1972 ::std::pair<TFunctions::iterator,TFunctions::iterator> aFind =
m_aFunctionNames.equal_range(sQuotedFunctionName);
1973 while ( aFind.first != aFind.second )
1977 uno::Reference< report::XFunctions> xFunctions = aFind.first->second.second->getFunctions();
1978 xFunctions->removeByIndex(xFunctions->getCount() - 1 );
1990 const OUString sNewScope =
m_sScope;
1993 if ( _nOldDataFieldType != nNewDataFieldType )
1995 beans::PropertyChangeEvent aScopeEvent;
1997 aScopeEvent.OldValue <<= _nOldDataFieldType;
1998 aScopeEvent.NewValue <<= nNewDataFieldType;
2001 if ( _sOldFunctionName != sNewFunction )
2003 beans::PropertyChangeEvent aFormulaEvent;
2005 aFormulaEvent.OldValue <<= _sOldFunctionName;
2006 aFormulaEvent.NewValue <<= sNewFunction;
2010 if ( _sOldScope != sNewScope )
2012 beans::PropertyChangeEvent aScopeEvent;
2014 aScopeEvent.OldValue <<= _sOldScope;
2015 aScopeEvent.NewValue <<= sNewScope;
2024 _rFieldNames.realloc(0);
2027 uno::Reference< awt::XWindow> xInspectorWindow(
m_xContext->getValueByName(
"DialogParentWindow") ,uno::UNO_QUERY);
2031 uno::Reference< beans::XPropertySet > xFormSet(
m_xRowSet, uno::UNO_QUERY );
2032 if ( !xFormSet.is() )
2035 OUString sObjectName;
2036 OSL_VERIFY( xFormSet->getPropertyValue(
PROPERTY_COMMAND ) >>= sObjectName );
2038 uno::Reference<sdbc::XConnection> xCon(
m_xContext->getValueByName(
"ActiveConnection") ,uno::UNO_QUERY);
2039 if ( !sObjectName.isEmpty() && xCon.is() )
2041 sal_Int32 nObjectType = sdb::CommandType::COMMAND;
2044 _rFieldNames = ::dbtools::getFieldNamesByCommandDescriptor( xCon, nObjectType, sObjectName );
2047 catch (uno::Exception&)
2055 ::std::pair<TFunctions::const_iterator,TFunctions::const_iterator> aFind =
m_aFunctionNames.equal_range(_sQuotedFunctionName);
2056 while ( aFind.first != aFind.second )
2058 const beans::Optional< OUString> aInitialFormula = aFind.first->second.first->getInitialFormula();
2059 if ( aInitialFormula.IsPresent )
2061 const OUString
sFormula( aFind.first->second.first->getFormula() );
2067 sal_Int32
start = 0;
2071 const uno::Reference< report::XGroup > xGroup(aFind.first->second.second,uno::UNO_QUERY);
2074 OUString sGroupName =
RptResId(RID_STR_SCOPE_GROUP);
2075 Out_sScope = sGroupName.replaceFirst(
"%1",xGroup->getExpression());
2078 Out_sScope = uno::Reference< report::XReportDefinition >(aFind.first->second.second,uno::UNO_QUERY_THROW)->getName();
2084 return aFind.first != aFind.second;
2092 const OUString sQuotedFunctionName(lcl_getQuotedFunctionName(_sFunctionName));
2096 static constexpr OUStringLiteral sPlaceHolder1(
u"%Column");
2097 static constexpr OUStringLiteral sPlaceHolder2(
u"%FunctionName");
2108 OUString sInitialFormula = aInitialFormula.Value;
2109 sInitialFormula = sInitialFormula.replaceAll(sPlaceHolder1,_sDataField);
2110 sInitialFormula = sInitialFormula.replaceAll(sPlaceHolder2,_sFunctionName);
2111 aInitialFormula.Value = sInitialFormula;
2112 m_xFunction->setInitialFormula( aInitialFormula );
2114 OUString sNamePostfix;
2115 const uno::Reference< report::XFunctionsSupplier> xFunctionsSupplier =
fillScope_throw(sNamePostfix);
2116 const uno::Reference< container::XIndexContainer> xFunctions(xFunctionsSupplier->getFunctions(),uno::UNO_QUERY_THROW);
2124 OUString sNamePostfix;
2127 const OUString sQuotedFunctionName = lcl_getQuotedFunctionName(sFunctionName);
2139 OUString sDataField;
2140 if ( !_sDataField.isEmpty() )
2141 sDataField = _sDataField;
2145 lcl_convertFormulaTo(aDataField,aDataField);
2146 aDataField >>= sDataField;
2149 if ( !sDataField.isEmpty() )
2165 return nDataFieldType;
2175 ::osl::ResettableMutexGuard aGuard(
m_aMutex );
2181 const OUString sOldScope =
m_sScope;
2188 lcl_convertFormulaTo(aDataField,aDataField);
2189 OUString sDataField;
2190 aDataField >>= sDataField;
2194 isDefaultFunction(sDataField,sDataField,uno::Reference< report::XFunctionsSupplier>(),
true);
2208extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
2210 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any>
const&)
#define USER_DEF_FUNCTION
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * reportdesign_GeometryHandler_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
Reference< XComponentContext > m_xContext
static weld::Window * GetFrameWeld(const css::uno::Reference< css::awt::XWindow > &rWindow)
MeasurementSystem getMeasurementSystemEnum() const
constexpr tools::Long Y() const
constexpr tools::Long X() const
static std::shared_ptr< const SfxFilter > GetDefaultFilter(std::u16string_view rName)
const LocaleDataWrapper & GetLocaleData() const
static sal_Int16 ConvertToMeasurementUnit(FieldUnit _nFieldUnit, sal_Int16 _rFieldToUNOValueFactor)
OUString GetDocServiceNameFromMediaType(const OUString &aMediaType)
sal_Int32 addInterface(const css::uno::Reference< ListenerT > &rxIFace)
sal_Int32 removeInterface(const css::uno::Reference< ListenerT > &rxIFace)
void notifyEach(void(SAL_CALL ListenerT::*NotificationMethod)(const EventT &), const EventT &Event)
mutable::osl::Mutex m_aMutex
void impl_initFieldList_nothrow(css::uno::Sequence< OUString > &_rFieldNames) const
void createDefaultFunction(::osl::ResettableMutexGuard &_aGuard, const OUString &_sFunction, std::u16string_view _sDataField)
creates a default function of the _sFunction for the data field _sDataField The new function will onl...
bool impl_isDataField(const OUString &_sName) const
checks whether the name is a field or a parameter
void impl_fillFormulaList_nothrow(::std::vector< OUString > &_out_rList) const
return all formula in a semicolon separated list
virtual void SAL_CALL disposing() override
bool isDefaultFunction(const OUString &_sQuotedFunction, OUString &Out_rDataField, const css::uno::Reference< css::report::XFunctionsSupplier > &_xFunctionsSupplier=css::uno::Reference< css::report::XFunctionsSupplier >(), bool _bSet=false) const
checks if the given function is a default function we know.
css::uno::Sequence< OUString > m_aParamNames
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
void loadDefaultFunctions()
fills the member m_aDefaultFunctions
virtual css::uno::Sequence< OUString > SAL_CALL getSupersededProperties() override
css::uno::Reference< css::report::XFunctionsSupplier > fillScope_throw(OUString &_rsNamePostfix)
get the functions supplier for the set scope, default is the surrounding group.
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
bool impl_isCounterFunction_throw(const OUString &_sQuotedFunctionName, OUString &Out_sScope) const
check whether the given function name is a counter function.
sal_uInt32 m_nDataFieldType
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
bool impl_dialogFilter_nothrow(OUString &_out_rSelectedClause, ::osl::ClearableMutexGuard &_rClearBeforeDialog) const
executes a dialog for choosing a filter criterion for a database report
virtual OUString SAL_CALL getImplementationName() override
virtual sal_Bool SAL_CALL suspend(sal_Bool Suspend) override
TFunctions m_aFunctionNames
virtual void SAL_CALL setPropertyValue(const OUString &PropertyName, const css::uno::Any &Value) override
virtual ~GeometryHandler() override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual css::inspection::InteractiveSelectionResult SAL_CALL onInteractivePropertySelection(const OUString &PropertyName, sal_Bool Primary, css::uno::Any &out_Data, const css::uno::Reference< css::inspection::XObjectInspectorUI > &InspectorUI) override
virtual css::inspection::LineDescriptor SAL_CALL describePropertyLine(const OUString &PropertyName, const css::uno::Reference< css::inspection::XPropertyControlFactory > &ControlFactory) override
bool impl_isDefaultFunction_nothrow(const css::uno::Reference< css::report::XFunction > &_xFunction, OUString &_rDataField, OUString &_rsDefaultFunctionName) const
checks if the given function is a default function we know.
css::uno::Reference< css::sdbc::XRowSet > m_xRowSet
inspectee
void impl_createFunction(const OUString &_sFunctionName, std::u16string_view _sDataField, const DefaultFunction &_aFunction)
Creates the function defined by the function template.
PropertyChangeListeners m_aPropertyListeners
void resetOwnProperties(::osl::ResettableMutexGuard &_aGuard, const OUString &_sOldFunctionName, const OUString &_sOldScope, const sal_uInt32 _nOldDataFieldType)
clear the own properties like function and scope and send a notification
::std::vector< DefaultFunction > m_aDefaultFunctions
css::beans::Property getProperty(const OUString &PropertyName)
css::uno::Reference< css::inspection::XPropertyHandler > m_xFormComponentHandler
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
OUString m_sDefaultFunction
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent &evt) override
OUString impl_ConvertUIToMimeType_nothrow(const OUString &_sUIName) const
return the MimeType for the given UI Name
virtual sal_Bool SAL_CALL isComposable(const OUString &PropertyName) override
void impl_fillMimeTypes_nothrow(::std::vector< OUString > &_out_rList) const
return all supported output formats of the report definition
GeometryHandler(css::uno::Reference< css::uno::XComponentContext > const &context)
void impl_fillScopeList_nothrow(::std::vector< OUString > &_out_rList) const
return all group names in a semicolon separated list starting with the group where this control is co...
virtual void SAL_CALL inspect(const css::uno::Reference< css::uno::XInterface > &Component) override
virtual css::uno::Sequence< css::beans::Property > SAL_CALL getSupportedProperties() override
virtual css::uno::Sequence< OUString > SAL_CALL getActuatingProperties() override
static void implCreateListLikeControl(const css::uno::Reference< css::inspection::XPropertyControlFactory > &_rxControlFactory, css::inspection::LineDescriptor &out_Descriptor, const TranslateId *pResId, bool _bReadOnlyControl, bool _bTrueIfListBoxFalseIfComboBox)
css::uno::Reference< css::beans::XPropertySet > m_xReportComponent
delegatee
virtual void SAL_CALL actuatingPropertyChanged(const OUString &ActuatingPropertyName, const css::uno::Any &NewValue, const css::uno::Any &OldValue, const css::uno::Reference< css::inspection::XObjectInspectorUI > &InspectorUI, sal_Bool FirstTimeInit) override
OUString impl_convertToFormula(const css::uno::Any &_rControlValue)
css::uno::Sequence< OUString > m_aFieldNames
DefaultFunction m_aCounterFunction
OUString impl_ConvertMimeTypeToUI_nothrow(const OUString &_sMimetype) const
return the one supported output formats of the report definition
css::uno::Reference< css::report::XFunction > m_xFunction
css::uno::Reference< css::script::XTypeConverter > m_xTypeConverter
type converter, needed on various occasions
virtual css::uno::Any SAL_CALL convertToControlValue(const OUString &PropertyName, const css::uno::Any &PropertyValue, const css::uno::Type &ControlValueType) override
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &PropertyName) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual void SAL_CALL addPropertyChangeListener(const css::uno::Reference< css::beans::XPropertyChangeListener > &Listener) override
virtual void SAL_CALL removePropertyChangeListener(const css::uno::Reference< css::beans::XPropertyChangeListener > &_rxListener) override
sal_uInt32 impl_getDataFieldType_throw(const OUString &_sDataField=OUString()) const
returns the data field type depending on the data field of the report control
void impl_setCounterFunction_throw()
sets the counter function at the data field.
void checkPosAndSize(const css::awt::Point &_aNewPos, const css::awt::Size &_aSize)
virtual css::uno::Any SAL_CALL convertToPropertyValue(const OUString &PropertyName, const css::uno::Any &ControlValue) override
css::uno::Any getConstantValue(bool bToControlValue, const TranslateId *pResId, const css::uno::Any &_aValue, const OUString &_sConstantName, const OUString &PropertyName)
static OUString getHelpURL(std::u16string_view _sHelpId)
static sal_Int32 getPropertyId(const OUString &_rName)
static OUString getPropertyTranslation(sal_Int32 _nId)
static void getExcludeProperties(::std::vector< css::beans::Property > &_rExcludeProperties, const css::uno::Reference< css::inspection::XPropertyHandler > &_xFormComponentHandler)
static OUString getPropertyHelpId(sal_Int32 _nId)
static bool isComposable(const OUString &_rPropertyName, const css::uno::Reference< css::inspection::XPropertyHandler > &_xFormComponentHandler)
static PropUIFlags getPropertyUIFlags(sal_Int32 _nId)
bool SearchForward(const OUString &rStr, sal_Int32 *pStart, sal_Int32 *pEnd, css::util::SearchResult *pRes=nullptr)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
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)
Reference< XSingleServiceFactory > xFactory
constexpr OUStringLiteral UID_RPT_PROP_FORMULA
constexpr OUStringLiteral UID_RPT_RPT_PROP_DLG_AREA
constexpr OUStringLiteral UID_RPT_RPT_PROP_DLG_FONT_TYPE
Sequence< sal_Int8 > aSeq
#define SAL_N_ELEMENTS(arr)
tools::Long const nRightMargin
tools::Long const nLeftMargin
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
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
::std::multimap< OUString, TFunctionPair, ::comphelper::UStringMixLess > TFunctions
::cppu::WeakComponentImplHelper< css::inspection::XPropertyHandler, css::beans::XPropertyChangeListener, css::lang::XServiceInfo > GeometryHandler_Base
::std::pair< css::uno::Reference< css::report::XFunction >, css::uno::Reference< css::report::XFunctionsSupplier > > TFunctionPair
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
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
sal_Int32 getPositionInIndexAccess(const css::uno::Reference< css::container::XIndexAccess > &_xCollection, const css::uno::Reference< T > &_xSearch)
returns the position of the object inside the index container
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
#define RESARRAY_INDEX_NOTFOUND
constexpr OUStringLiteral PROPERTY_PAGEFOOTEROPTION
constexpr OUStringLiteral PROPERTY_CONTROLBACKGROUNDTRANSPARENT
constexpr OUStringLiteral PROPERTY_FILLCOLOR
constexpr OUStringLiteral PROPERTY_LABEL
constexpr OUStringLiteral PROPERTY_STARTNEWCOLUMN
constexpr OUStringLiteral PROPERTY_VERTICALALIGN
constexpr OUStringLiteral PROPERTY_TYPE
constexpr OUStringLiteral PROPERTY_RIGHTMARGIN
constexpr OUStringLiteral PROPERTY_DATAFIELD
constexpr OUStringLiteral PROPERTY_VISIBLE
constexpr OUStringLiteral PROPERTY_RESETPAGENUMBER
constexpr OUStringLiteral PROPERTY_FORCENEWPAGE
constexpr OUStringLiteral PROPERTY_PRINTREPEATEDVALUES
constexpr OUStringLiteral PROPERTY_SCOPE
constexpr OUStringLiteral PROPERTY_CANGROW
constexpr OUStringLiteral PROPERTY_HEIGHT
constexpr OUStringLiteral PROPERTY_REPEATSECTION
constexpr OUStringLiteral PROPERTY_COMMAND
constexpr OUStringLiteral PROPERTY_PAGEHEADEROPTION
constexpr OUStringLiteral PROPERTY_MIMETYPE
constexpr OUStringLiteral PROPERTY_POSITIONX
constexpr OUStringLiteral PROPERTY_ACTIVECONNECTION
constexpr OUStringLiteral PROPERTY_CANSHRINK
constexpr OUStringLiteral PROPERTY_BACKTRANSPARENT
constexpr OUStringLiteral PROPERTY_POSITIONY
constexpr OUStringLiteral PROPERTY_KEEPTOGETHER
constexpr OUStringLiteral PROPERTY_AREA
constexpr OUStringLiteral PROPERTY_FORMULALIST
constexpr OUStringLiteral PROPERTY_WIDTH
constexpr OUStringLiteral PROPERTY_DEEPTRAVERSING
constexpr OUStringLiteral PROPERTY_LEFTMARGIN
constexpr OUStringLiteral PROPERTY_INITIALFORMULA
constexpr OUStringLiteral PROPERTY_COMMANDTYPE
constexpr OUStringLiteral PROPERTY_FONT
constexpr OUStringLiteral PROPERTY_AUTOGROW
constexpr OUStringLiteral PROPERTY_FILTER
constexpr OUStringLiteral PROPERTY_PARAADJUST
constexpr OUStringLiteral PROPERTY_PREEVALUATED
constexpr OUStringLiteral PROPERTY_FORMULA
constexpr OUStringLiteral PROPERTY_BACKCOLOR
constexpr OUStringLiteral PROPERTY_PRINTWHENGROUPCHANGE
constexpr OUStringLiteral PROPERTY_CONDITIONALPRINTEXPRESSION
constexpr OUStringLiteral PROPERTY_PAPERSIZE
constexpr OUStringLiteral PROPERTY_PRESERVEIRI
constexpr OUStringLiteral PROPERTY_CONTROLBACKGROUND
css::beans::Optional< OUString > m_sInitialFormula
#define PROPERTY_ID_WIDTH
#define PROPERTY_ID_HEIGHT