34#include <com/sun/star/awt/XControlContainer.hpp>
35#include <com/sun/star/awt/XTextComponent.hpp>
36#include <com/sun/star/beans/PropertyAttribute.hpp>
37#include <com/sun/star/form/DataSelectionType.hpp>
38#include <com/sun/star/form/FormComponentType.hpp>
39#include <com/sun/star/form/TabulatorCycle.hpp>
40#include <com/sun/star/frame/FrameSearchFlag.hpp>
41#include <com/sun/star/frame/XDispatch.hpp>
42#include <com/sun/star/frame/XDispatchProvider.hpp>
43#include <com/sun/star/frame/XModel.hpp>
44#include <com/sun/star/io/XObjectInputStream.hpp>
45#include <com/sun/star/io/XObjectOutputStream.hpp>
46#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
47#include <com/sun/star/sdb/CommandType.hpp>
48#include <com/sun/star/sdb/RowSetVetoException.hpp>
49#include <com/sun/star/sdb/XColumnUpdate.hpp>
50#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
51#include <com/sun/star/sdbc/ResultSetType.hpp>
52#include <com/sun/star/sdbc/XRowSet.hpp>
53#include <com/sun/star/sdbcx/Privilege.hpp>
54#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
55#include <com/sun/star/util/URLTransformer.hpp>
56#include <com/sun/star/util/XURLTransformer.hpp>
57#include <com/sun/star/util/XModifiable2.hpp>
67#include <rtl/math.hxx>
68#include <rtl/tencinfo.h>
70#include <tools/datetime.hxx>
79#include <osl/mutex.hxx>
103class DocumentModifyGuard
106 explicit DocumentModifyGuard(
const Reference< XInterface >& _rxFormComponent )
109 impl_changeModifiableFlag_nothrow(
false );
111 ~DocumentModifyGuard()
113 impl_changeModifiableFlag_nothrow(
true );
117 void impl_changeModifiableFlag_nothrow(
const bool _enable )
124 catch(
const Exception&)
144 const EventObject* _pEvt,
145 const Reference<XControl>& _rControl,
146 bool _bSubmit)
override;
156 const EventObject *_pEvt,
157 const Reference<XControl>& _rControl,
161 static_cast<ODatabaseForm *
>(pCompImpl)->submit_impl(_rControl, *
static_cast<const css::awt::MouseEvent*
>(_pEvt));
171 return css::uno::Sequence<sal_Int8>();
178 Sequence<Type> aAggregateTypes;
179 Reference<XTypeProvider> xAggregateTypes;
181 aAggregateTypes = xAggregateTypes->getTypes();
187 return concatSequences( aRet, OPropertySetAggregationHelper::getTypes() );
195 if (!aReturn.hasValue())
199 if (!aReturn.hasValue())
201 aReturn = OPropertySetAggregationHelper::queryInterface(_rType);
204 if (!aReturn.hasValue())
228 ,OPropertySetAggregationHelper(OComponentHelper::rBHelper)
231 ,m_aRowSetApproveListeners(
m_aMutex)
235 ,m_aPropertyBagHelper( *this )
236 ,m_aParameterManager(
m_aMutex, _rxContext )
240 ,m_bInsertOnly( false )
241 ,m_eSubmitMethod(FormSubmitMethod_GET)
242 ,m_eSubmitEncoding(FormSubmitEncoding_URL)
243 ,m_eNavigation(NavigationBarMode_CURRENT)
244 ,m_bAllowInsert(true)
245 ,m_bAllowUpdate(true)
246 ,m_bAllowDelete(true)
249 ,m_bForwardingConnection(false)
250 ,m_bSharingConnection( false )
258 ,OPropertySetAggregationHelper( OComponentHelper::rBHelper )
265 ,m_aRowSetApproveListeners(
m_aMutex )
269 ,m_aPropertyBagHelper( *this )
272 ,m_nResetsPending( 0 )
274 ,m_bInsertOnly( _cloneSource.m_bInsertOnly )
275 ,m_aControlBorderColorFocus( _cloneSource.m_aControlBorderColorFocus )
276 ,m_aControlBorderColorMouse( _cloneSource.m_aControlBorderColorMouse )
277 ,m_aControlBorderColorInvalid( _cloneSource.m_aControlBorderColorInvalid )
278 ,m_aDynamicControlBorder( _cloneSource.m_aDynamicControlBorder )
280 ,m_aTargetURL( _cloneSource.m_aTargetURL )
281 ,m_aTargetFrame( _cloneSource.m_aTargetFrame )
282 ,m_eSubmitMethod( _cloneSource.m_eSubmitMethod )
283 ,m_eSubmitEncoding( _cloneSource.m_eSubmitEncoding )
284 ,m_eNavigation( _cloneSource.m_eNavigation )
285 ,m_bAllowInsert( _cloneSource.m_bAllowInsert )
286 ,m_bAllowUpdate( _cloneSource.m_bAllowUpdate )
287 ,m_bAllowDelete( _cloneSource.m_bAllowDelete )
290 ,m_bForwardingConnection( false )
291 ,m_bSharingConnection( false )
299 ::comphelper::copyProperties( _cloneSource.m_xAggregateSet, m_xAggregateSet );
307 Reference< XPropertySetInfo > xSourcePSI( xSourceProps->getPropertySetInfo(), UNO_SET_THROW );
308 Reference< XPropertyState > xSourcePropState( xSourceProps, UNO_QUERY );
312 const Sequence< Property > aSourceProperties( xSourcePSI->getProperties() );
313 for (
auto const & sourceProperty : aSourceProperties )
315 if ( xDestPSI->hasPropertyByName( sourceProperty.Name ) )
321 if ( xSourcePropState.is() )
323 aInitialValue = xSourcePropState->getPropertyDefault( sourceProperty.Name );
327 aInitialValue = xSourceProps->getPropertyValue( sourceProperty.Name );
329 addProperty( sourceProperty.Name, sourceProperty.Attributes, aInitialValue );
330 setPropertyValue( sourceProperty.Name, xSourceProps->getPropertyValue( sourceProperty.Name ) );
333 catch(
const RuntimeException&)
340 throw WrappedTargetRuntimeException(
341 "Could not clone the given database form.",
361 if ( m_xAggregateSet.is() )
369 Reference< XWarningsSupplier > xRowSetWarnings(
m_xAggregate, UNO_QUERY );
375 m_xAggregate->setDelegator(
static_cast< XWeak*
>(
this ) );
417 OUStringBuffer aResult;
421 for ( HtmlSuccessfulObjList::iterator pSuccObj = aSuccObjList.begin();
422 pSuccObj < aSuccObjList.end();
426 aName = pSuccObj->aName;
427 aValue = pSuccObj->aValue;
432 aURL.SetSmartProtocol(INetProtocol::File);
433 aURL.SetSmartURL(aValue);
434 if( INetProtocol::File ==
aURL.GetProtocol() )
440 aResult.append(
aName +
"=" + aValue);
442 if (pSuccObj < aSuccObjList.end() - 1)
447 aResult.append(
"\r\n");
452 aSuccObjList.clear();
454 return aResult.makeStringAndClear();
464 INetMIMEMessage aParent;
465 aParent.EnableAttachMultipartFormDataChild();
474 for (
auto const& succObj : aSuccObjList)
484 aSuccObjList.clear();
487 INetMIMEMessageStream aMessStream(&aParent,
true);
491 std::unique_ptr<char[]> pBuf(
new char[1025]);
493 while( (nRead = aMessStream.Read(pBuf.get(), 1024)) > 0 )
500 aMemStream.
Seek( 0 );
502 sal_Int32 nLen = aMemStream.
TellEnd();
504 rContentType = aParent.GetContentType();
505 return Sequence<sal_Int8>(
static_cast<sal_Int8 const *
>(
pData), nLen);
511 void appendDigits( sal_Int32 _nNumber,
sal_Int8 nDigits, OUStringBuffer& _rOut )
513 sal_Int32 nCurLen = _rOut.getLength();
514 _rOut.append( _nNumber );
515 while ( _rOut.getLength() - nCurLen < nDigits )
516 _rOut.insert( nCurLen,
'0' );
522 const Reference<XControl>& rxSubmitButton,
const css::awt::MouseEvent& MouseEvt)
524 if (!xComponentSet.is())
535 sal_Int16 nClassId = 0;
539 if(
aName.isEmpty() && nClassId != FormComponentType::IMAGEBUTTON)
547 case FormComponentType::COMMANDBUTTON:
551 if( rxSubmitButton.is() )
553 Reference<XPropertySet> xSubmitButtonComponent(rxSubmitButton->getModel(), UNO_QUERY);
565 case FormComponentType::IMAGEBUTTON:
569 if( rxSubmitButton.is() )
571 Reference<XPropertySet> xSubmitButtonComponent(rxSubmitButton->getModel(), UNO_QUERY);
572 if (xSubmitButtonComponent == xComponentSet)
575 OUString aRhs = OUString::number( MouseEvt.X );
578 OUStringBuffer aLhs(
aName);
579 if (!
aName.isEmpty())
583 rList.emplace_back(aLhs.makeStringAndClear(), aRhs );
586 aRhs = OUString::number( MouseEvt.Y );
587 if (!
aName.isEmpty())
591 rList.emplace_back(aLhs.makeStringAndClear(), aRhs );
597 case FormComponentType::CHECKBOX:
598 case FormComponentType::RADIOBUTTON:
603 sal_Int16 nChecked = 0;
612 rList.emplace_back(
aName, aStrValue );
616 case FormComponentType::TEXTFIELD:
624 bool bMulti = rxSubmitButton.is()
625 && (aTmp.getValueType().getTypeClass() == TypeClass_BOOLEAN)
631 Reference<XControlContainer> xControlContainer(rxSubmitButton->getContext(), UNO_QUERY);
632 if( !xControlContainer.is() )
break;
636 const Sequence<Reference<XControl>> aControls = xControlContainer->getControls();
637 for(
auto const& xControl : aControls )
639 Reference<XPropertySet>
xModel(xControl->getModel(), UNO_QUERY);
640 if ((bFound =
xModel == xComponentSet))
642 Reference<XTextComponent> xTextComponent(xControl, UNO_QUERY);
643 if( xTextComponent.is() )
644 sText = xTextComponent->getText();
655 rList.emplace_back(
aName, sText );
659 case FormComponentType::COMBOBOX:
660 case FormComponentType::PATTERNFIELD:
667 rList.emplace_back(
aName, aText );
670 case FormComponentType::CURRENCYFIELD:
671 case FormComponentType::NUMERICFIELD:
680 double aDoubleVal = 0;
681 if (aVal >>= aDoubleVal)
683 sal_Int16 nScale = 0;
685 aText = ::rtl::math::doubleToUString(aDoubleVal, rtl_math_StringFormat_F, nScale,
'.',
true);
687 rList.emplace_back(
aName, aText );
690 case FormComponentType::DATEFIELD:
698 sal_Int32 nInt32Val = 0;
699 if (aVal >>= nInt32Val)
701 ::Date aDate( nInt32Val );
708 aText =
aBuffer.makeStringAndClear();
710 rList.emplace_back(
aName, aText );
713 case FormComponentType::TIMEFIELD:
721 sal_Int32 nInt32Val = 0;
722 if (aVal >>= nInt32Val)
731 aText =
aBuffer.makeStringAndClear();
733 rList.emplace_back(
aName, aText );
738 case FormComponentType::HIDDENCONTROL:
746 rList.emplace_back(
aName, aText );
751 case FormComponentType::FILECONTROL:
764 case FormComponentType::LISTBOX:
773 Sequence< OUString > aVisibleList;
775 sal_Int32 nStringCnt = aVisibleList.getLength();
776 const OUString* pStrings = aVisibleList.getConstArray();
779 Sequence< OUString > aValueList;
781 sal_Int32 nValCnt = aValueList.getLength();
782 const OUString* pVals = aValueList.getConstArray();
785 Sequence<sal_Int16> aSelectList;
787 sal_Int32 nSelCount = aSelectList.getLength();
788 const sal_Int16* pSels = aSelectList.getConstArray();
797 sal_Int32 nCurCnt = 0;
799 for(
i=0;
i<nSelCount; ++
i )
801 if( pSels[
i] < nStringCnt )
806 for(
i=0;
i<nCurCnt; ++
i )
808 sal_Int16 nSelPos = pSels[
i];
809 if (nSelPos < nValCnt && !pVals[nSelPos].isEmpty())
811 aSubValue = pVals[nSelPos];
815 aSubValue = pStrings[nSelPos];
817 rList.emplace_back(
aName, aSubValue );
820 case FormComponentType::GRIDCONTROL:
824 Reference<XIndexAccess> xContainer(xComponentSet, UNO_QUERY);
825 if (!xContainer.is())
830 Reference<XPropertySet> xSet;
831 sal_Int32
nCount = xContainer->getCount();
834 rList.reserve(
nCount + rList.capacity() );
837 xContainer->getByIndex(
i) >>= xSet;
847 const Reference<XControl>& rxSubmitButton,
const css::awt::MouseEvent& MouseEvt )
852 Reference<XPropertySet> xComponentSet;
860 AppendComponent(rList, xComponentSet, std::u16string_view(), rxSubmitButton, MouseEvt);
867 OUStringBuffer aResult;
873 sal_Int32 nStrLen = rString.getLength();
875 for( sal_Int32 nCurPos=0; nCurPos < nStrLen; ++nCurPos )
877 nCharCode = rString[nCurPos];
880 if( (!rtl::isAsciiAlphanumeric(nCharCode) && nCharCode !=
' ')
886 aResult.append(
"%0D%0A");
896 aResult.append(nCharCode);
902 short nHi =
static_cast<sal_Int16
>(nCharCode) / 16;
903 short nLo =
static_cast<sal_Int16
>(nCharCode) - (nHi*16);
904 if( nHi > 9 ) nHi +=
int(
'A')-10;
else nHi +=
int(
'0');
905 if( nLo > 9 ) nLo +=
int(
'A')-10;
else nLo +=
int(
'0');
913 aResult.append(nCharCode);
917 rString = aResult.makeStringAndClear().replace(
' ',
'+');
922 std::u16string_view rData )
925 std::unique_ptr<INetMIMEMessage> pChild(
new INetMIMEMessage);
930 OUString aContentDisp = OUString::Concat(
"form-data; name=\"") + rName +
"\"";
931 pChild->SetContentDisposition(aContentDisp);
933 rtl_TextEncoding eSystemEncoding = osl_getThreadTextEncoding();
934 const char* pBestMatchingEncoding = rtl_getBestMimeCharsetFromTextEncoding( eSystemEncoding );
935 OUString aBestMatchingEncoding = OUString::createFromAscii(pBestMatchingEncoding);
936 pChild->SetContentType(
937 "text/plain; charset=\"" + aBestMatchingEncoding +
"\"");
938 pChild->SetContentTransferEncoding(
"8bit");
945 pChild->SetDocumentLB(
new SvLockBytes(pStream,
true) );
946 rParent.AttachChild( std::move(pChild) );
951 const OUString& rFileName )
953 OUString aFileName(rFileName);
955 std::unique_ptr<SvStream> pStream;
957 if (!aFileName.isEmpty())
961 aURL.SetSmartProtocol(INetProtocol::File);
962 aURL.SetSmartURL(rFileName);
963 if( INetProtocol::File ==
aURL.GetProtocol() )
971 sal_Int32 nSepInd = aFileName.lastIndexOf(
'.');
972 OUString aExtension = aFileName.copy( nSepInd + 1 );
985 std::unique_ptr<INetMIMEMessage> pChild(
new INetMIMEMessage);
991 OUString aContentDisp =
992 OUString::Concat(
"form-data; name=\"") +
998 pChild->SetContentDisposition(aContentDisp);
999 pChild->SetContentType( aContentType );
1000 pChild->SetContentTransferEncoding(
"8bit");
1004 pChild->SetDocumentLB(
new SvLockBytes(pStream.release(),
true) );
1005 rParent.AttachChild( std::move(pChild) );
1038 Reference<XResultSet> xResultSet(
m_xParent, UNO_QUERY);
1039 if (!xResultSet.is())
1041 OSL_FAIL(
"ODatabaseForm::hasValidParent() : no parent resultset !");
1046 Reference< XPropertySet > xSet(
m_xParent, UNO_QUERY );
1047 Reference< XLoadable > xLoad(
m_xParent, UNO_QUERY );
1048 if ( xLoad->isLoaded()
1049 && ( xResultSet->isBeforeFirst()
1050 || xResultSet->isAfterLast()
1089 OSL_ENSURE( !
m_aIgnoreResult.hasValue(),
"ODatabaseForm::saveInsertOnlyState: overriding old value!" );
1104bool ODatabaseForm::executeRowSet(::osl::ResettableMutexGuard& _rClearForNotifies,
bool bMoveToFirst,
const Reference< XInteractionHandler >& _rxCompletionHandler)
1115 sal_Int32 nConcurrency = ResultSetConcurrency::READ_ONLY;
1121 nConcurrency = ResultSetConcurrency::READ_ONLY;
1131 nConcurrency = ResultSetConcurrency::UPDATABLE;
1133 nConcurrency = ResultSetConcurrency::READ_ONLY;
1138 bool bSuccess =
false;
1144 catch(
const RowSetVetoException&)
1147 catch(
const SQLException& eDb)
1149 _rClearForNotifies.clear();
1154 _rClearForNotifies.reset();
1178 if (((
m_nPrivileges & Privilege::INSERT) == Privilege::INSERT)
1184 Reference<XResultSetUpdate> xUpdate;
1186 xUpdate->moveToInsertRow();
1189 catch(
const SQLException& eDB)
1191 _rClearForNotifies.clear();
1196 _rClearForNotifies.reset();
1215 ::osl::MutexGuard aGuard(
m_aMutex );
1219 EventObject aEvt(
static_cast<XWeak*
>(
this));
1230 OPropertySetAggregationHelper::disposing();
1237 Reference<XComponent> xAggregationComponent;
1239 xAggregationComponent->dispose();
1247 Reference< XConnection > xConn;
1262 Sequence< Property >& _rProps,
1263 Sequence< Property >& _rAggregateProps )
const
1265 _rProps.realloc( 23 );
1266 css::beans::Property* pProperties = _rProps.getArray();
1268 if (m_xAggregateSet.is())
1269 _rAggregateProps = m_xAggregateSet->getPropertySetInfo()->getProperties();
1293 css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::TRANSIENT |
1294 css::beans::PropertyAttribute::MAYBEVOID | PropertyAttribute::CONSTRAINED);
1296 css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT);
1305 css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT);
1308 css::beans::PropertyAttribute::BOUND);
1310 css::beans::PropertyAttribute::BOUND);
1312 css::beans::PropertyAttribute::BOUND);
1319 css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEVOID | css::beans::PropertyAttribute::MAYBEDEFAULT );
1323 DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(),
"<...>::describeFixedProperties/getInfoHelper: forgot to adjust the count ?");
1384 pClone->clonedFrom( *
this );
1389void ODatabaseForm::fire( sal_Int32* pnHandles,
const Any* pNewValues,
const Any* pOldValues, sal_Int32 nCount )
1415 OPropertySetAggregationHelper::fire(pnHandles, pNewValues, pOldValues,
nPos,
false);
1417 OPropertySetAggregationHelper::fire(pnHandles +
nPos, pNewValues +
nPos, pOldValues +
nPos,
nCount -
nPos,
false);
1423 OPropertySetAggregationHelper::fire(pnHandles, pNewValues, pOldValues,
nCount,
false);
1430 return css::uno::Any(
false);
1433 return OPropertySetAggregationHelper::getFastPropertyValue(
nHandle);
1516 OPropertySetAggregationHelper::getFastPropertyValue( rValue, nHandle );
1522 sal_Int32 nHandle,
const Any& rValue )
1524 bool bModified(
false);
1545 Any aAggregateProperty;
1602 bModified = OPropertySetAggregationHelper::convertFastPropertyValue( rConvertedValue, rOldValue,
nHandle, rValue );
1622 OUString sNewFilter;
1623 rValue >>= sNewFilter;
1630 OUString sNewFilter;
1631 rValue >>= sNewFilter;
1646 Reference< XConnection > xSomeConnection;
1647 if ( ::dbtools::isEmbeddedInDatabase(
getParent(), xSomeConnection ) )
1648 throw PropertyVetoException();
1712 Reference< XConnection > xOuterConnection;
1713 if ( ::dbtools::isEmbeddedInDatabase(
getParent(), xOuterConnection ) )
1715 if ( xOuterConnection != Reference< XConnection >( rValue, UNO_QUERY ) )
1718 throw PropertyVetoException();
1720 OPropertySetAggregationHelper::setFastPropertyValue_NoBroadcast(
nHandle, rValue );
1728 OPropertySetAggregationHelper::setFastPropertyValue_NoBroadcast(
nHandle, rValue );
1760 PropertyState eState;
1764 return (NavigationBarMode_CURRENT ==
m_eNavigation) ? PropertyState_DEFAULT_VALUE : PropertyState_DIRECT_VALUE;
1767 eState =
m_aCycle.hasValue() ? PropertyState_DIRECT_VALUE : PropertyState_DEFAULT_VALUE;
1771 eState =
m_bInsertOnly ? PropertyState_DIRECT_VALUE : PropertyState_DEFAULT_VALUE;
1776 eState = PropertyState_DEFAULT_VALUE;
1778 eState = PropertyState_DIRECT_VALUE;
1783 eState = PropertyState_DEFAULT_VALUE;
1785 eState = PropertyState_DIRECT_VALUE;
1809 eState = OPropertySetAggregationHelper::getPropertyStateByHandle(
nHandle);
1833 OPropertySetAggregationHelper::setPropertyToDefaultByHandle(
nHandle);
1849 aReturn <<= OUString();
1853 aReturn <<= OUString();
1861 aReturn <<= NavigationBarMode_CURRENT;
1874 aReturn = OPropertySetAggregationHelper::getPropertyDefaultByHandle(
nHandle );
1885 osl::ClearableMutexGuard aGuard(
m_aMutex);
1906 m_pThread->addEvent(std::make_unique<EventObject>());
1922 if ( _bApproveByListeners )
1925 EventObject
aEvent(*
this);
1933 bool bInsertRow =
false;
1934 if (m_xAggregateSet.is())
1941 Reference< XColumnsSupplier > xColsSuppl( m_xAggregateSet, UNO_QUERY );
1942 Reference< XIndexAccess > xIndexCols( xColsSuppl->getColumns(), UNO_QUERY );
1943 for (sal_Int32
i = 0;
i < xIndexCols->getCount(); ++
i)
1945 Reference< XPropertySet > xColProps;
1946 xIndexCols->getByIndex(
i) >>= xColProps;
1948 Reference< XColumnUpdate > xColUpdate( xColProps, UNO_QUERY );
1949 if ( !xColUpdate.is() )
1952 Reference< XPropertySetInfo > xPSI;
1953 if ( xColProps.is() )
1954 xPSI = xColProps->getPropertySetInfo( );
1969 if ( aDefault.hasValue() )
1970 xColUpdate->updateObject( aDefault );
1986 Reference< XColumnsSupplier > xParentColSupp(
m_xParent, UNO_QUERY );
1987 Reference< XNameAccess > xParentCols;
1988 if ( xParentColSupp.is() )
1989 xParentCols = xParentColSupp->getColumns();
1991 if ( xParentCols.is() && xParentCols->hasElements() &&
m_aMasterFields.hasElements() )
2003 OSL_FAIL(
"ODatabaseForm::reset_impl: could not initialize the master-detail-driven parameters!");
2009 aResetGuard.clear();
2013 while (xIter->hasMoreElements())
2015 Reference<XReset> xReset;
2016 xIter->nextElement() >>= xReset;
2024 aResetGuard.reset();
2031 aResetGuard.clear();
2033 css::lang::EventObject
aEvent( *
this );
2037 aResetGuard.reset();
2062 const css::awt::MouseEvent& MouseEvt )
2065 ::osl::MutexGuard aGuard(
m_aMutex);
2071 ::osl::ClearableMutexGuard aGuard(
m_aMutex);
2081 m_pThread->addEvent(std::make_unique<css::awt::MouseEvent>(MouseEvt),
Control,
true);
2091static void lcl_dispatch(
const Reference< XFrame >& xFrame,
const Reference<XURLTransformer>& xTransformer,
const OUString& aURLStr,
const OUString& aReferer,
const OUString& aTargetName
2092 ,std::u16string_view aData,rtl_TextEncoding _eEncoding)
2095 aURL.Complete = aURLStr;
2096 xTransformer->parseStrict(
aURL);
2098 Reference< XDispatch > xDisp = Reference< XDispatchProvider > (
xFrame,UNO_QUERY_THROW)->queryDispatch(
aURL, aTargetName,
2099 FrameSearchFlag::SELF | FrameSearchFlag::PARENT | FrameSearchFlag::CHILDREN |
2100 FrameSearchFlag::SIBLINGS | FrameSearchFlag::CREATE | FrameSearchFlag::TASKS);
2112 Sequence<PropertyValue> aArgs
2118 xDisp->dispatch(
aURL, aArgs);
2125 EventObject aEvt(
static_cast<XWeak*
>(
this));
2126 bool bCanceled =
false;
2129 if (!aIter.
next()->approveSubmit(aEvt))
2136 FormSubmitEncoding eSubmitEncoding;
2137 FormSubmitMethod eSubmitMethod;
2140 OUString aTargetName;
2141 Reference< XModel >
xModel;
2146 Reference<XChild> xParent(
m_xParent, UNO_QUERY);
2152 aReferer =
xModel->getURL();
2164 Reference< XFrame >
xFrame =
xModel->getCurrentController()->getFrame();
2168 Reference<XURLTransformer> xTransformer(URLTransformer::create(
m_xContext));
2171 if( eSubmitEncoding == FormSubmitEncoding_URL )
2181 if( eSubmitMethod == FormSubmitMethod_GET )
2186 if (xTransformer.is())
2187 xTransformer->parseStrict(
aURL);
2189 Reference< XDispatch > xDisp = Reference< XDispatchProvider > (
xFrame,UNO_QUERY_THROW)->queryDispatch(
aURL, aTargetName,
2190 FrameSearchFlag::SELF | FrameSearchFlag::PARENT | FrameSearchFlag::CHILDREN |
2191 FrameSearchFlag::SIBLINGS | FrameSearchFlag::CREATE | FrameSearchFlag::TASKS);
2196 xDisp->dispatch(
aURL, aArgs);
2200 else if( eSubmitMethod == FormSubmitMethod_POST )
2205 else if( eSubmitEncoding == FormSubmitEncoding_MULTIPART )
2208 aURL.Complete = aURLStr;
2209 xTransformer->parseStrict(
aURL);
2211 Reference< XDispatch > xDisp = Reference< XDispatchProvider > (
xFrame,UNO_QUERY_THROW)->queryDispatch(
aURL, aTargetName,
2212 FrameSearchFlag::SELF | FrameSearchFlag::PARENT | FrameSearchFlag::CHILDREN |
2213 FrameSearchFlag::SIBLINGS | FrameSearchFlag::CREATE | FrameSearchFlag::TASKS);
2217 OUString aContentType;
2218 Sequence<sal_Int8>
aData;
2223 if (!
aData.hasElements())
2229 Sequence<PropertyValue> aArgs
2236 xDisp->dispatch(
aURL, aArgs);
2239 else if( eSubmitEncoding == FormSubmitEncoding_TEXT )
2250 OSL_FAIL(
"ODatabaseForm::submit_Impl : wrong encoding !");
2285 ::osl::MutexGuard aGuard(
m_aMutex);
2314 osl::ClearableMutexGuard aGuard(
m_aMutex);
2316 Reference<XForm> xParentForm(
getParent(), UNO_QUERY);
2317 if (xParentForm.is())
2321 Reference< XRowSetApproveBroadcaster > xParentApprBroadcast( xParentForm, UNO_QUERY_THROW );
2322 xParentApprBroadcast->removeRowSetApproveListener(
this );
2324 Reference< XLoadable > xParentLoadable( xParentForm, UNO_QUERY_THROW );
2325 xParentLoadable->removeLoadListener(
this );
2327 Reference< XPropertySet > xParentProperties( xParentForm, UNO_QUERY_THROW );
2328 xParentProperties->removePropertyChangeListener(
PROPERTY_ISNEW,
this );
2338 xParentForm.set(
getParent(), UNO_QUERY);
2339 if ( xParentForm.is() )
2343 Reference< XRowSetApproveBroadcaster > xParentApprBroadcast( xParentForm, UNO_QUERY_THROW );
2344 xParentApprBroadcast->addRowSetApproveListener(
this );
2346 Reference< XLoadable > xParentLoadable( xParentForm, UNO_QUERY_THROW );
2347 xParentLoadable->addLoadListener(
this );
2349 Reference< XPropertySet > xParentProperties( xParentForm, UNO_QUERY_THROW );
2350 xParentProperties->addPropertyChangeListener(
PROPERTY_ISNEW,
this );
2358 Reference< XPropertySet > xAggregateProperties( m_xAggregateSet );
2362 Reference< XConnection > xOuterConnection;
2363 bool bIsEmbedded = ::dbtools::isEmbeddedInDatabase(
Parent, xOuterConnection );
2379 sal_Int32 nCycle = 0;
2380 ::cppu::enum2int(nCycle,
m_aCycle);
2381 return static_cast<TabulatorCycle
>(nCycle) != TabulatorCycle_PAGE;
2399 if (rControls.getLength() >
nCount)
2402 sal_Int16 nTabIndex = 1;
2403 for (
auto const& rControl : rControls)
2405 Reference<XFormComponent> xComp(rControl, UNO_QUERY);
2409 for (sal_Int32 j = 0; j <
nCount; ++j)
2411 Reference<XFormComponent> xElement(
2413 if (xComp == xElement)
2415 Reference<XPropertySet> xSet(xComp, UNO_QUERY);
2428 ::osl::MutexGuard aGuard(
m_aMutex);
2435 ::osl::MutexGuard aGuard(
m_aMutex);
2439 Reference< XPropertySet > xSet;
2440 OUString sGroupName(
Name );
2442 for(
auto const& rControl : _rGroup )
2444 xSet.set(rControl, css::uno::UNO_QUERY);
2449 OSL_FAIL(
"ODatabaseForm::setGroup: invalid arguments!" );
2453 if (sGroupName.isEmpty())
2463 ::osl::MutexGuard aGuard(
m_aMutex);
2470 ::osl::MutexGuard aGuard(
m_aMutex);
2482 ::osl::MutexGuard aGuard(
m_aMutex);
2495 Reference< XConnection > xConnSource(
Source.Source, UNO_QUERY );
2496 if ( xConnSource.is() )
2498#if OSL_DEBUG_LEVEL > 0
2499 Reference< XConnection > xActiveConn;
2501 OSL_ENSURE( xActiveConn.get() == xConnSource.get(),
"ODatabaseForm::disposing: where did this come from?" );
2513 css::uno::Reference<css::lang::XEventListener> xListener;
2515 xListener->disposing(Source);
2522 OSL_PRECOND(
m_pLoadTimer ==
nullptr,
"ODatabaseForm::impl_createLoadTimer: timer already exists!" );
2534 ::osl::MutexGuard aGuard(
m_aMutex );
2535 Reference< XRowSet > xParentRowSet(
m_xParent, UNO_QUERY_THROW );
2536 xParentRowSet->addRowSetListener(
this );
2549 ::osl::MutexGuard aGuard(
m_aMutex );
2555 Reference< XRowSet > xParentRowSet(
m_xParent, UNO_QUERY_THROW );
2556 xParentRowSet->removeRowSetListener(
this );
2572 ::osl::MutexGuard aGuard(
m_aMutex);
2573 Reference<XRowSet> xParentRowSet(
m_xParent, UNO_QUERY);
2574 if (xParentRowSet.is())
2575 xParentRowSet->removeRowSetListener(
this);
2586 ::osl::MutexGuard aGuard(
m_aMutex);
2587 Reference<XRowSet> xParentRowSet(
m_xParent, UNO_QUERY);
2588 if (xParentRowSet.is())
2589 xParentRowSet->addRowSetListener(
this);
2611 OUString sOwnDatasource;
2615 OUString sParentDataSource;
2616 OSL_ENSURE( _rxParentProps.is() && _rxParentProps->getPropertySetInfo().is() && _rxParentProps->getPropertySetInfo()->hasPropertyByName(
PROPERTY_DATASOURCE ),
2617 "ODatabaseForm::doShareConnection: invalid parent form!" );
2618 if ( _rxParentProps.is() )
2621 bool bCanShareConnection =
false;
2624 if ( sParentDataSource == sOwnDatasource )
2626 if ( !sParentDataSource.isEmpty() )
2628 bCanShareConnection =
true;
2632 OUString sParentURL;
2634 _rxParentProps->getPropertyValue(
PROPERTY_URL ) >>= sParentURL;
2635 m_xAggregateSet->getPropertyValue(
PROPERTY_URL ) >>= sMyURL;
2637 bCanShareConnection = (sParentURL == sMyURL);
2641 if ( bCanShareConnection )
2646 OUString sParentUser, sParentPwd;
2647 _rxParentProps->getPropertyValue(
PROPERTY_USER ) >>= sParentUser;
2650 OUString sMyUser, sMyPwd;
2651 m_xAggregateSet->getPropertyValue(
PROPERTY_USER ) >>= sMyUser;
2654 bCanShareConnection =
2655 ( sParentUser == sMyUser )
2656 && ( sParentPwd == sMyPwd );
2659 return bCanShareConnection;
2666 Reference< XConnection > xParentConn;
2668 OSL_ENSURE( xParentConn.is(),
"ODatabaseForm::doShareConnection: we're a valid sub-form, but the parent has no connection?!" );
2670 if ( xParentConn.is() )
2673 Reference< XComponent > xParentConnComp( xParentConn, UNO_QUERY );
2674 OSL_ENSURE( xParentConnComp.is(),
"ODatabaseForm::doShareConnection: invalid connection!" );
2675 xParentConnComp->addEventListener(
static_cast< XLoadListener*
>(
this ) );
2706 Reference< XConnection > xSharedConn;
2708 OSL_ENSURE( xSharedConn.is(),
"ODatabaseForm::stopSharingConnection: there's no conn!" );
2711 Reference< XComponent > xSharedConnComp( xSharedConn, UNO_QUERY );
2712 if ( xSharedConnComp.is() )
2713 xSharedConnComp->removeEventListener(
static_cast< XLoadListener*
>(
this ) );
2719 xSharedConn.clear();
2730 Reference<css::awt::XWindow> GetDialogParentWindow(
const Reference<XModel>& rModel)
2734 Reference<XController>
xController(rModel->getCurrentController());
2740 return xFrame->getContainerWindow();
2753 Reference< XConnection > xOuterConnection;
2754 if ( ::dbtools::isEmbeddedInDatabase(
getParent(), xOuterConnection ) )
2757 return xOuterConnection.is();
2765 OSL_ENSURE( Reference< XForm >(
getParent(), UNO_QUERY ).is(),
2766 "ODatabaseForm::implEnsureConnection: m_bSubForm is TRUE, but the parent is no form?" );
2768 Reference< XPropertySet > xParentProps(
getParent(), UNO_QUERY );
2782 if (m_xAggregateSet.is())
2785 Reference<css::awt::XWindow> m_xDialogParent;
2786 Reference<XChild> xParent(
m_xParent, UNO_QUERY);
2788 m_xDialogParent = GetDialogParentWindow(
getXModel(xParent->getParent()));
2794 return xConnection.is();
2797 catch(
const SQLException& eDB)
2810void ODatabaseForm::load_impl(
bool bCausedByParentForm,
bool bMoveToFirst,
const Reference< XInteractionHandler >& _rxCompletionHandler )
2812 ::osl::ResettableMutexGuard aGuard(
m_aMutex);
2825 bool bExecute = bConnected && m_xAggregateSet.is() && !
getString(m_xAggregateSet->getPropertyValue(
PROPERTY_COMMAND)).isEmpty();
2837 bool bSuccess =
false;
2841 bSuccess =
executeRowSet(aGuard, bMoveToFirst, _rxCompletionHandler);
2848 EventObject aEvt(
static_cast<XWeak*
>(
this));
2861 ::osl::ResettableMutexGuard aGuard(
m_aMutex);
2868 EventObject aEvt(
static_cast<XWeak*
>(
this));
2882 Reference<XCloseable> xCloseable;
2884 if (xCloseable.is())
2885 xCloseable->close();
2887 catch(
const SQLException&)
2913 ::osl::ResettableMutexGuard aGuard(
m_aMutex);
2917 DocumentModifyGuard aModifyGuard( *
this );
2921 EventObject
aEvent(
static_cast<XWeak*
>(
this));
2934 bool bSuccess =
true;
2938 bSuccess =
executeRowSet(aGuard, bMoveToFirst, _rxCompletionHandler);
2940 catch(
const SQLException&)
2942 TOOLS_WARN_EXCEPTION(
"forms.component",
"ODatabaseForm::reload_impl : shouldn't executeRowSet catch this exception?");
3023 ::osl::ClearableMutexGuard& _rGuard )
3029 Reference< XRowSetApproveListener > xListener( aIter.
next() );
3032 if ( !xListener->approveRowSetChange( _rEvent ) )
3035 catch (
const DisposedException& e)
3037 if ( e.Context == xListener )
3040 catch (
const RuntimeException&)
3044 catch (
const SQLException&)
3047 if ( _bAllowSQLException )
3062 if (event.Source == css::uno::Reference<css::uno::XInterface>(
static_cast<XWeak*
>(
this)))
3070 Reference< XRowSetApproveListener > xListener( aIter.
next() );
3073 if ( !xListener->approveCursorMove( event ) )
3076 catch (
const DisposedException& e)
3078 if ( e.Context == xListener )
3081 catch (
const RuntimeException&)
3097 ::osl::ClearableMutexGuard aGuard(
m_aMutex );
3108 if (event.Source != css::uno::Reference<css::uno::XInterface>(
static_cast<XWeak*
>(
this)))
3117 Reference< XRowSetApproveListener > xListener( aIter.
next() );
3120 if ( !xListener->approveRowChange( event ) )
3123 catch (
const DisposedException& e)
3125 if ( e.Context == xListener )
3128 catch (
const RuntimeException&)
3143 if (event.Source == css::uno::Reference<css::uno::XInterface>(
static_cast<XWeak*
>(
this)))
3145 ::osl::ClearableMutexGuard aGuard(
m_aMutex );
3160 ::osl::ClearableMutexGuard aGuard(
m_aMutex );
3178 Reference<XRowSetApproveBroadcaster> xBroadcaster;
3181 Reference<XRowSetApproveListener> xListener(
static_cast<XRowSetApproveListener*
>(
this));
3182 xBroadcaster->addRowSetApproveListener(xListener);
3195 Reference<XRowSetApproveBroadcaster> xBroadcaster;
3198 Reference<XRowSetApproveListener> xListener(
static_cast<XRowSetApproveListener*
>(
this));
3199 xBroadcaster->removeRowSetApproveListener(xListener);
3234 ::osl::ClearableMutexGuard aGuard(
m_aMutex);
3244 EventObject event(
static_cast< XWeak*
>(
this));
3258 osl::ClearableMutexGuard aGuard(
m_aMutex);
3270 EventObject event(
static_cast< XWeak*
>(
this));
3410 Reference<XResultSetUpdate> xUpdate;
3412 xUpdate->insertRow();
3414 catch(
const RowSetVetoException&)
3418 catch(
const SQLException& eDb)
3430 Reference<XResultSetUpdate> xUpdate;
3432 xUpdate->updateRow();
3434 catch(
const RowSetVetoException&)
3438 catch(
const SQLException& eDb)
3450 Reference<XResultSetUpdate> xUpdate;
3452 xUpdate->deleteRow();
3454 catch(
const RowSetVetoException&)
3458 catch(
const SQLException& eDb)
3470 Reference<XResultSetUpdate> xUpdate;
3472 xUpdate->cancelRowUpdates();
3474 catch(
const RowSetVetoException&)
3478 catch(
const SQLException& eDb)
3488 Reference<XResultSetUpdate> xUpdate;
3514 xUpdate->moveToInsertRow();
3523 Reference<XResultSetUpdate> xUpdate;
3525 xUpdate->moveToCurrentRow();
3534 Reference<XDeleteRows> xDelete;
3536 return xDelete->deleteRows(rows);
3538 catch(
const RowSetVetoException&)
3542 catch(
const SQLException& eDb)
3548 return Sequence< sal_Int32 >();
3697 bool bCurrentIsNew(
false );
3698 OSL_VERIFY( evt.NewValue >>= bCurrentIsNew );
3699 if ( !bCurrentIsNew )
3711 return "com.sun.star.comp.forms.ODatabaseForm";
3718 Sequence< OUString > aServices;
3719 Reference< XServiceInfo > xInfo;
3721 aServices = xInfo->getSupportedServiceNames();
3724 return ::comphelper::concatSequences(
3725 css::uno::Sequence<OUString> {
3749 DBG_ASSERT(m_xAggregateSet.is(),
"ODatabaseForm::write : only to be called if the aggregate exists !");
3755 _rxOutStream->writeShort(0x0005);
3760 OUString sDataSource;
3761 if (m_xAggregateSet.is())
3763 _rxOutStream << sDataSource;
3767 if (m_xAggregateSet.is())
3769 _rxOutStream << sCommand;
3777 DataSelectionType eTranslated = DataSelectionType_TABLE;
3778 if (m_xAggregateSet.is())
3780 sal_Int32 nCommandType = 0;
3782 switch (nCommandType)
3784 case CommandType::TABLE : eTranslated = DataSelectionType_TABLE;
break;
3785 case CommandType::QUERY : eTranslated = DataSelectionType_QUERY;
break;
3786 case CommandType::COMMAND:
3789 eTranslated = bEscapeProcessing ? DataSelectionType_SQL : DataSelectionType_SQLPASSTHROUGH;
3792 default : OSL_FAIL(
"ODatabaseForm::write : wrong CommandType !");
3795 _rxOutStream->writeShort(
static_cast<sal_Int16
>(eTranslated));
3798 _rxOutStream->writeShort(2);
3800 _rxOutStream->writeBoolean(
m_eNavigation != NavigationBarMode_NONE);
3803 if (m_xAggregateSet.is())
3806 _rxOutStream->writeBoolean(
false);
3814 _rxOutStream << sTmp;
3820 sal_Int32 nCycle = sal_Int32(TabulatorCycle_RECORDS);
3823 ::cppu::enum2int(nCycle,
m_aCycle);
3824 if (
m_aCycle == TabulatorCycle_PAGE)
3826 nCycle = sal_Int32(TabulatorCycle_RECORDS);
3828 _rxOutStream->writeShort(
static_cast<sal_Int16
>(nCycle));
3830 _rxOutStream->writeShort(
static_cast<sal_Int16
>(
m_eNavigation));
3834 if (m_xAggregateSet.is())
3840 _rxOutStream << sFilter;
3841 _rxOutStream << sSort;
3844 sal_uInt16 nAnyMask = 0;
3851 _rxOutStream->writeShort(nAnyMask);
3853 if (nAnyMask &
CYCLE)
3855 sal_Int32 nRealCycle = 0;
3856 ::cppu::enum2int(nRealCycle,
m_aCycle);
3857 _rxOutStream->writeShort(
static_cast<sal_Int16
>(nRealCycle));
3862 if (m_xAggregateSet.is())
3864 _rxOutStream << sHaving;
3870 DBG_ASSERT(m_xAggregateSet.is(),
"ODatabaseForm::read : only to be called if the aggregate exists !");
3875 sal_uInt16
nVersion = _rxInStream->readShort();
3879 OUString sAggregateProp;
3880 _rxInStream >> sAggregateProp;
3881 if (m_xAggregateSet.is())
3883 _rxInStream >> sAggregateProp;
3884 if (m_xAggregateSet.is())
3890 sal_Int16 nCursorSourceType = _rxInStream->readShort();
3891 sal_Int32 nCommandType = 0;
3892 switch (
static_cast<DataSelectionType
>(nCursorSourceType))
3894 case DataSelectionType_TABLE : nCommandType = CommandType::TABLE;
break;
3895 case DataSelectionType_QUERY : nCommandType = CommandType::QUERY;
break;
3896 case DataSelectionType_SQL:
3897 case DataSelectionType_SQLPASSTHROUGH:
3899 nCommandType = CommandType::COMMAND;
3900 bool bEscapeProcessing =
static_cast<DataSelectionType
>(nCursorSourceType) != DataSelectionType_SQLPASSTHROUGH;
3904 default : OSL_FAIL(
"ODatabaseForm::read : wrong CommandType !");
3906 if (m_xAggregateSet.is())
3910 _rxInStream->readShort();
3914 bool bNavigation = _rxInStream->readBoolean();
3916 m_eNavigation = bNavigation ? NavigationBarMode_CURRENT : NavigationBarMode_NONE;
3918 bool bInsertOnly = _rxInStream->readBoolean();
3919 if (m_xAggregateSet.is())
3928 _rxInStream >> sTmp;
3930 m_eSubmitMethod =
static_cast<FormSubmitMethod
>(_rxInStream->readShort());
3936 sal_Int32 nCycle = _rxInStream->readShort();
3937 m_aCycle <<= TabulatorCycle(nCycle);
3938 m_eNavigation =
static_cast<NavigationBarMode
>(_rxInStream->readShort());
3940 _rxInStream >> sAggregateProp;
3941 if (m_xAggregateSet.is())
3945 _rxInStream >> sAggregateProp;
3946 if (m_xAggregateSet.is())
3951 sal_uInt16 nAnyMask = 0;
3954 nAnyMask = _rxInStream->readShort();
3955 if (nAnyMask &
CYCLE)
3957 sal_Int32 nCycle = _rxInStream->readShort();
3958 m_aCycle <<= TabulatorCycle(nCycle);
3963 if (m_xAggregateSet.is())
3968 _rxInStream >> sAggregateProp;
3969 if (m_xAggregateSet.is())
3979 Reference< XSQLErrorBroadcaster > xBroadcaster( _pElement->
xInterface, UNO_QUERY );
3980 Reference< XForm > xForm ( _pElement->
xInterface, UNO_QUERY );
3982 if ( xBroadcaster.is() && !xForm.is() )
3984 xBroadcaster->addSQLErrorListener(
this );
3993 Reference<XSQLErrorBroadcaster> xBroadcaster(_rxObject, UNO_QUERY);
3994 Reference<XForm> xForm(_rxObject, UNO_QUERY);
3995 if (xBroadcaster.is() && !xForm.is())
3997 xBroadcaster->removeSQLErrorListener(
this);
4017 catch (
const css::beans::UnknownPropertyException&)
4019 throw WrappedTargetRuntimeException(
4020 "ODatabaseForm::getName",
4022 ::cppu::getCaughtException()
4035extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
4037 css::uno::Sequence<css::uno::Any>
const &)
Reference< XComponentContext > m_xContext
sal_Int16 GetYear() const
sal_uInt16 GetDay() const
sal_uInt16 GetMonth() const
static INetContentType GetContentType4Extension(OUString const &rExtension)
static INetContentType GetContentType(OUString const &rTypeName)
static OUString decode(std::u16string_view rText, DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
bool SetParam(std::u16string_view rTheQuery, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
virtual sal_uInt64 TellEnd() override
std::size_t WriteBytes(const void *pData, std::size_t nSize)
bool WriteLine(std::string_view rStr)
sal_uInt64 Seek(sal_uInt64 nPos)
sal_Int32 addInterface(const css::uno::Reference< ListenerT > &rxIFace)
void disposeAndClear(const css::lang::EventObject &rEvt)
sal_Int32 getLength() const
sal_Int32 removeInterface(const css::uno::Reference< ListenerT > &rxIFace)
void notifyEach(void(SAL_CALL ListenerT::*NotificationMethod)(const EventT &), const EventT &Event)
bool hasMoreElements() const
css::uno::Reference< ListenerT > const & next()
friend friend class OPropertyChangeMultiplexer
virtual css::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) override final
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
oslInterlockedCount m_refCount
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 _nIndex) override
virtual void SAL_CALL disposing()
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent &evt) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual void SAL_CALL write(const css::uno::Reference< css::io::XObjectOutputStream > &OutStream) override
virtual void implRemoved(const css::uno::Reference< css::uno::XInterface > &_rxObject)
virtual void implInserted(const ElementDescription *_pElement)
virtual void SAL_CALL read(const css::uno::Reference< css::io::XObjectInputStream > &InStream) override
virtual sal_Int32 SAL_CALL getCount() override
css::uno::Sequence< css::beans::PropertyValue > getPropertyValues()
bool convertDynamicFastPropertyValue(sal_Int32 _nHandle, const css::uno::Any &_rNewValue, css::uno::Any &_out_rConvertedValue, css::uno::Any &_out_rCurrentValue) const
void getDynamicPropertyDefaultByHandle(sal_Int32 _nHandle, css::uno::Any &_out_rValue) const
void getDynamicFastPropertyValue(sal_Int32 _nHandle, css::uno::Any &_out_rValue) const
void removeProperty(const OUString &_rName)
void addProperty(const OUString &_rName, ::sal_Int16 _nAttributes, const css::uno::Any &_rInitialValue)
void setPropertyValues(const css::uno::Sequence< css::beans::PropertyValue > &_rProps)
bool hasDynamicPropertyByHandle(sal_Int32 _nHandle) const
inline ::comphelper::OPropertyArrayAggregationHelper & getInfoHelper() const
void setDynamicFastPropertyValue(sal_Int32 _nHandle, const css::uno::Any &_rValue)
static std::unique_ptr< SvStream > CreateStream(const OUString &rFileName, StreamMode eOpenMode, css::uno::Reference< css::awt::XWindow > xParentWin=nullptr)
#define DBG_ASSERT(sCon, aError)
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
constexpr OUStringLiteral PROPERTY_TABINDEX
constexpr OUStringLiteral PROPERTY_LABEL
constexpr OUStringLiteral PROPERTY_NAME
constexpr OUStringLiteral PROPERTY_NAVIGATION
constexpr OUStringLiteral PROPERTY_CONTROL_BORDER_COLOR_MOUSE
constexpr OUStringLiteral PROPERTY_SELECT_SEQ
constexpr OUStringLiteral PROPERTY_TARGET_URL
constexpr OUStringLiteral PROPERTY_DYNAMIC_CONTROL_BORDER
constexpr OUStringLiteral PROPERTY_TEXT
constexpr OUStringLiteral PROPERTY_PASSWORD
constexpr OUStringLiteral PROPERTY_DATE
constexpr OUStringLiteral PROPERTY_ISMODIFIED
constexpr OUStringLiteral PROPERTY_REFVALUE
constexpr OUStringLiteral PROPERTY_RESULTSET_CONCURRENCY
constexpr OUStringLiteral PROPERTY_SUBMIT_METHOD
constexpr OUStringLiteral PROPERTY_CONTROL_BORDER_COLOR_INVALID
constexpr OUStringLiteral PROPERTY_COMMAND
constexpr OUStringLiteral PROPERTY_STATE
constexpr OUStringLiteral PROPERTY_TARGET_FRAME
constexpr OUStringLiteral PROPERTY_APPLYFILTER
constexpr OUStringLiteral PROPERTY_HIDDEN_VALUE
constexpr OUStringLiteral PROPERTY_PRIVILEGES
constexpr OUStringLiteral PROPERTY_CLASSID
constexpr OUStringLiteral PROPERTY_ALLOWEDITS
constexpr OUStringLiteral PROPERTY_DETAILFIELDS
constexpr OUStringLiteral PROPERTY_DECIMAL_ACCURACY
constexpr OUStringLiteral PROPERTY_TIME
constexpr OUStringLiteral PROPERTY_VALUE_SEQ
constexpr OUStringLiteral PROPERTY_MASTERFIELDS
constexpr OUStringLiteral PROPERTY_ISNEW
constexpr OUStringLiteral PROPERTY_ISREADONLY
constexpr OUStringLiteral PROPERTY_RESULTSET_TYPE
constexpr OUStringLiteral PROPERTY_COMMANDTYPE
constexpr OUStringLiteral PROPERTY_FILTER
constexpr OUStringLiteral PROPERTY_SUBMIT_ENCODING
constexpr OUStringLiteral PROPERTY_FETCHSIZE
constexpr OUStringLiteral PROPERTY_SORT
constexpr OUStringLiteral PROPERTY_CONTROL_BORDER_COLOR_FOCUS
constexpr OUStringLiteral PROPERTY_ESCAPE_PROCESSING
constexpr OUStringLiteral PROPERTY_HAVINGCLAUSE
constexpr OUStringLiteral PROPERTY_DATASOURCE
constexpr OUStringLiteral PROPERTY_ALLOWADDITIONS
constexpr OUStringLiteral PROPERTY_STRINGITEMLIST
constexpr OUStringLiteral PROPERTY_MULTISELECTION
constexpr OUStringLiteral PROPERTY_URL
constexpr OUStringLiteral PROPERTY_ACTIVE_CONNECTION
constexpr OUStringLiteral PROPERTY_INSERTONLY
constexpr OUStringLiteral PROPERTY_USER
constexpr OUStringLiteral PROPERTY_MULTILINE
constexpr OUStringLiteral PROPERTY_ALLOWDELETIONS
constexpr OUStringLiteral PROPERTY_VALUE
constexpr OUStringLiteral PROPERTY_CYCLE
constexpr OUStringLiteral CONTENT_TYPE_STR_TEXT_PLAIN
TOOLS_DLLPUBLIC OString convertLineEnd(const OString &rIn, LineEnd eLineEnd)
#define LINK(Instance, Class, Member)
std::unique_ptr< sal_Int32[]> pData
constexpr OUStringLiteral aData
bool hasProperty(const OUString &_rName, const Reference< XPropertySet > &_rxSet)
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
bool getBOOL(const Any &_rAny)
bool query_aggregation(const css::uno::Reference< css::uno::XAggregation > &_rxAggregate, css::uno::Reference< iface > &_rxOut)
bool tryPropertyValue(Any &_rConvertedValue, Any &_rOldValue, const Any &_rValueToSet, const Any &_rCurrentValue, const Type &_rExpectedType)
OUString getString(const Any &_rAny)
void RemoveProperty(Sequence< Property > &_rProps, const OUString &_rPropName)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
Any SAL_CALL getCaughtException()
OUString loadString(TranslateId aResId)
loads the string with the specified resource id from the FormLayer mo file
ListBox is a bit confusing / different from other form components, so here are a few notes:
static void lcl_dispatch(const Reference< XFrame > &xFrame, const Reference< XURLTransformer > &xTransformer, const OUString &aURLStr, const OUString &aReferer, const OUString &aTargetName, std::u16string_view aData, rtl_TextEncoding _eEncoding)
const sal_uInt16 DONTAPPLYFILTER
const sal_uInt16 SUCCESSFUL_REPRESENT_FILE
IMPL_LINK_NOARG(OButtonControl, OnClick, void *, void)
std::vector< HtmlSuccessfulObj > HtmlSuccessfulObjList
css::uno::Reference< css::frame::XModel > getXModel(const css::uno::Reference< css::uno::XInterface > &_rxComponent)
const sal_uInt16 SUCCESSFUL_REPRESENT_TEXT
VBAHELPER_DLLPUBLIC bool setPropertyValue(css::uno::Sequence< css::beans::PropertyValue > &aProp, const OUString &aName, const css::uno::Any &aValue)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
PyRef getTypeClass(const Runtime &)
#define PROPERTY_ID_ISMODIFIED
#define PROPERTY_ID_HAVINGCLAUSE
#define PROPERTY_ID_CONTROL_BORDER_COLOR_MOUSE
#define PROPERTY_ID_ACTIVE_CONNECTION
#define PROPERTY_ID_ALLOWEDITS
#define PROPERTY_ID_PRIVILEGES
#define PROPERTY_ID_MASTERFIELDS
#define PROPERTY_ID_DETAILFIELDS
#define PROPERTY_ID_FILTER
#define PROPERTY_ID_CONTROL_BORDER_COLOR_FOCUS
#define PROPERTY_ID_SUBMIT_METHOD
#define PROPERTY_ID_INSERTONLY
#define PROPERTY_ID_ALLOWADDITIONS
#define PROPERTY_ID_CONTROL_BORDER_COLOR_INVALID
#define PROPERTY_ID_NAVIGATION
#define PROPERTY_ID_CYCLE
#define PROPERTY_ID_TARGET_FRAME
#define PROPERTY_ID_TARGET_URL
#define PROPERTY_ID_SUBMIT_ENCODING
#define PROPERTY_ID_DATASOURCE
#define PROPERTY_ID_ALLOWDELETIONS
#define PROPERTY_ID_DYNAMIC_CONTROL_BORDER
#define PROPERTY_ID_APPLYFILTER
const wchar_t *typedef int(__stdcall *DllNativeUnregProc)(int
constexpr OUStringLiteral FRM_SUN_FORMCOMPONENT
constexpr OUStringLiteral FRM_SUN_COMPONENT_DATAFORM
constexpr OUStringLiteral FRM_COMPONENT_FORM
constexpr OUStringLiteral FRM_SUN_COMPONENT_FORM
constexpr OUStringLiteral FRM_SUN_COMPONENT_HTMLFORM
constexpr OUStringLiteral SRV_SDB_ROWSET
constexpr OUStringLiteral PROPERTY_CONTROLDEFAULT(u"ControlDefault")
css::uno::Reference< css::uno::XInterface > xInterface
Reference< XController > xController
Reference< XFrame > xFrame
Reference< XModel > xModel
std::unique_ptr< char[]> aBuffer