22 #include <com/sun/star/sdbc/DataType.hpp>
23 #include <com/sun/star/sdbc/SQLException.hpp>
24 #include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
25 #include <com/sun/star/ucb/ListActionType.hpp>
26 #include <com/sun/star/ucb/XAnyCompare.hpp>
47 static osl::Mutex ourMutex;
89 virtual Property SAL_CALL getPropertyByName(
const OUString& aName )
override;
90 virtual sal_Bool SAL_CALL hasPropertyByName(
const OUString& Name )
override;
96 mpDisposeEventListeners =
nullptr;
97 mpPropChangeListeners =
nullptr;
98 mpVetoChangeListeners =
nullptr;
100 mxOriginal = aResult;
101 mpSortInfo =
nullptr;
119 mpSortInfo = pInfo->
mpNext;
125 mpSortInfo =
nullptr;
127 mpPropSetInfo.clear();
135 return "com.sun.star.comp.ucb.SortedResultSet";
153 osl::Guard< osl::Mutex > aGuard(
maMutex );
155 if ( mpDisposeEventListeners && mpDisposeEventListeners->getLength() )
158 aEvt.Source =
static_cast< XComponent *
>( this );
159 mpDisposeEventListeners->disposeAndClear( aEvt );
162 if ( mpPropChangeListeners )
166 mpPropChangeListeners->disposeAndClear( aEvt );
169 if ( mpVetoChangeListeners )
173 mpVetoChangeListeners->disposeAndClear( aEvt );
184 osl::Guard< osl::Mutex > aGuard(
maMutex );
186 if ( !mpDisposeEventListeners )
187 mpDisposeEventListeners =
197 osl::Guard< osl::Mutex > aGuard(
maMutex );
199 if ( mpDisposeEventListeners )
200 mpDisposeEventListeners->removeInterface( Listener );
210 osl::Guard< osl::Mutex > aGuard(
maMutex );
218 osl::Guard< osl::Mutex > aGuard(
maMutex );
226 osl::Guard< osl::Mutex > aGuard(
maMutex );
235 osl::Guard< osl::Mutex > aGuard(
maMutex );
239 if ( mnCurEntry > 0 )
243 sal_Int32
nIndex = maS2O[ mnCurEntry ];
244 return mxOriginal->absolute( nIndex );
275 if ( mnCurEntry == 1 )
293 osl::Guard< osl::Mutex > aGuard(
maMutex );
295 mxOriginal->beforeFirst();
301 osl::Guard< osl::Mutex > aGuard(
maMutex );
303 mxOriginal->afterLast();
309 osl::Guard< osl::Mutex > aGuard(
maMutex );
314 sal_Int32
nIndex = maS2O[ mnCurEntry ];
315 return mxOriginal->absolute( nIndex );
327 osl::Guard< osl::Mutex > aGuard(
maMutex );
332 sal_Int32
nIndex = maS2O[ mnCurEntry ];
333 return mxOriginal->absolute( nIndex );
376 osl::Guard< osl::Mutex > aGuard(
maMutex );
385 nIndex = maS2O[ mnCurEntry ];
386 return mxOriginal->absolute( nIndex );
396 throw SQLException();
402 mnCurEntry =
mnCount + row + 1;
403 nIndex = maS2O[ mnCurEntry ];
404 return mxOriginal->absolute( nIndex );
438 osl::Guard< osl::Mutex > aGuard(
maMutex );
440 if ( ( mnCurEntry <= 0 ) || ( mnCurEntry >
mnCount ) )
442 throw SQLException();
448 sal_Int32 nTmp = mnCurEntry + rows;
463 nTmp = maS2O[ mnCurEntry ];
464 return mxOriginal->absolute( nTmp );
482 osl::Guard< osl::Mutex > aGuard(
maMutex );
486 if ( mnCurEntry > 0 )
490 sal_Int32
nIndex = maS2O[ mnCurEntry ];
491 return mxOriginal->absolute( nIndex );
503 osl::Guard< osl::Mutex > aGuard(
maMutex );
505 if ( ( mnCurEntry <= 0 ) || ( mnCurEntry >
mnCount ) )
507 throw SQLException();
510 mxOriginal->refreshRow();
516 osl::Guard< osl::Mutex > aGuard(
maMutex );
518 if ( ( mnCurEntry <= 0 ) || ( mnCurEntry >
mnCount ) )
520 throw SQLException();
523 return mxOriginal->rowUpdated();
529 osl::Guard< osl::Mutex > aGuard(
maMutex );
531 if ( ( mnCurEntry <= 0 ) || ( mnCurEntry >
mnCount ) )
533 throw SQLException();
536 return mxOriginal->rowInserted();
542 osl::Guard< osl::Mutex > aGuard(
maMutex );
544 if ( ( mnCurEntry <= 0 ) || ( mnCurEntry >
mnCount ) )
546 throw SQLException();
549 return mxOriginal->rowDeleted();
555 osl::Guard< osl::Mutex > aGuard(
maMutex );
557 if ( ( mnCurEntry <= 0 ) || ( mnCurEntry >
mnCount ) )
559 throw SQLException();
562 return mxOriginal->getStatement();
571 osl::Guard< osl::Mutex > aGuard(
maMutex );
578 osl::Guard< osl::Mutex > aGuard(
maMutex );
585 osl::Guard< osl::Mutex > aGuard(
maMutex );
592 osl::Guard< osl::Mutex > aGuard(
maMutex );
599 osl::Guard< osl::Mutex > aGuard(
maMutex );
606 osl::Guard< osl::Mutex > aGuard(
maMutex );
612 osl::Guard< osl::Mutex > aGuard(
maMutex );
619 osl::Guard< osl::Mutex > aGuard(
maMutex );
626 osl::Guard< osl::Mutex > aGuard(
maMutex );
633 osl::Guard< osl::Mutex > aGuard(
maMutex );
640 osl::Guard< osl::Mutex > aGuard(
maMutex );
647 osl::Guard< osl::Mutex > aGuard(
maMutex );
654 osl::Guard< osl::Mutex > aGuard(
maMutex );
662 osl::Guard< osl::Mutex > aGuard(
maMutex );
670 osl::Guard< osl::Mutex > aGuard(
maMutex );
678 osl::Guard< osl::Mutex > aGuard(
maMutex );
686 osl::Guard< osl::Mutex > aGuard(
maMutex );
693 osl::Guard< osl::Mutex > aGuard(
maMutex );
700 osl::Guard< osl::Mutex > aGuard(
maMutex );
707 osl::Guard< osl::Mutex > aGuard(
maMutex );
717 osl::Guard< osl::Mutex > aGuard(
maMutex );
727 osl::Guard< osl::Mutex > aGuard(
maMutex );
738 osl::Guard< osl::Mutex > aGuard(
maMutex );
740 if ( !mpPropSetInfo.is() )
745 return mpPropSetInfo;
750 const OUString& PropertyName,
753 osl::Guard< osl::Mutex > aGuard(
maMutex );
755 if ( PropertyName ==
"RowCount" || PropertyName ==
"IsRowCountFinal" )
756 throw IllegalArgumentException();
758 throw UnknownPropertyException(PropertyName);
764 osl::Guard< osl::Mutex > aGuard(
maMutex );
768 if ( PropertyName ==
"RowCount" )
770 aRet <<= maS2O.Count();
772 else if ( PropertyName ==
"IsRowCountFinal" )
774 bool bOrgFinal =
false;
781 aOrgRet >>= bOrgFinal;
787 sal_uInt32 nOrgCount = 0;
788 aOrgRet >>= nOrgCount;
789 if ( nOrgCount == maS2O.Count() )
794 throw UnknownPropertyException(PropertyName);
801 const OUString& PropertyName,
804 osl::Guard< osl::Mutex > aGuard(
maMutex );
806 if ( !mpPropChangeListeners )
807 mpPropChangeListeners.reset(
810 mpPropChangeListeners->addInterface( PropertyName, Listener );
815 const OUString& PropertyName,
818 osl::Guard< osl::Mutex > aGuard(
maMutex );
820 if ( mpPropChangeListeners )
821 mpPropChangeListeners->removeInterface( PropertyName, Listener );
826 const OUString& PropertyName,
829 osl::Guard< osl::Mutex > aGuard(
maMutex );
831 if ( !mpVetoChangeListeners )
832 mpVetoChangeListeners.reset(
835 mpVetoChangeListeners->addInterface( PropertyName, Listener );
840 const OUString& PropertyName,
843 osl::Guard< osl::Mutex > aGuard(
maMutex );
845 if ( mpVetoChangeListeners )
846 mpVetoChangeListeners->removeInterface( PropertyName, Listener );
854 sal_Int32 nIndexOne, sal_Int32 nIndexTwo,
860 sal_IntPtr nCompare = 0;
861 sal_Int32 nColumn = pSortInfo->
mnColumn;
863 switch ( pSortInfo->
mnType )
866 case DataType::TINYINT :
867 case DataType::SMALLINT :
868 case DataType::INTEGER :
873 if ( xResultOne->absolute( nIndexOne ) )
874 aOne = xRowOne->getInt( nColumn );
875 if ( xResultTwo->absolute( nIndexTwo ) )
876 aTwo = xRowTwo->getInt( nColumn );
880 else if ( aOne == aTwo )
887 case DataType::BIGINT :
892 if ( xResultOne->absolute( nIndexOne ) )
893 aOne = xRowOne->getLong( nColumn );
894 if ( xResultTwo->absolute( nIndexTwo ) )
895 aTwo = xRowTwo->getLong( nColumn );
899 else if ( aOne == aTwo )
906 case DataType::CHAR :
907 case DataType::VARCHAR :
908 case DataType::LONGVARCHAR :
912 if ( xResultOne->absolute( nIndexOne ) )
913 aOne = xRowOne->getString( nColumn );
914 if ( xResultTwo->absolute( nIndexTwo ) )
915 aTwo = xRowTwo->getString( nColumn );
919 aOne = aOne.toAsciiLowerCase();
920 aTwo = aTwo.toAsciiLowerCase();
923 nCompare = aOne.compareTo( aTwo );
926 case DataType::DATE :
931 if ( xResultOne->absolute( nIndexOne ) )
932 aOne = xRowOne->getDate( nColumn );
933 if ( xResultTwo->absolute( nIndexTwo ) )
934 aTwo = xRowTwo->getDate( nColumn );
936 nTmp =
static_cast<sal_Int32
>(aTwo.Year) - static_cast<sal_Int32>(aOne.Year);
938 nTmp =
static_cast<sal_Int32
>(aTwo.Month) - static_cast<sal_Int32>(aOne.Month);
940 nTmp =
static_cast<sal_Int32
>(aTwo.Day) - static_cast<sal_Int32>(aOne.Day);
945 else if ( nTmp == 0 )
952 case DataType::TIME :
957 if ( xResultOne->absolute( nIndexOne ) )
958 aOne = xRowOne->getTime( nColumn );
959 if ( xResultTwo->absolute( nIndexTwo ) )
960 aTwo = xRowTwo->getTime( nColumn );
962 nTmp =
static_cast<sal_Int32
>(aTwo.Hours) - static_cast<sal_Int32>(aOne.Hours);
964 nTmp =
static_cast<sal_Int32
>(aTwo.Minutes) - static_cast<sal_Int32>(aOne.Minutes);
966 nTmp =
static_cast<sal_Int32
>(aTwo.Seconds) - static_cast<sal_Int32>(aOne.Seconds);
968 nTmp =
static_cast<sal_Int32
>(aTwo.NanoSeconds)
969 - static_cast<sal_Int32>(aOne.NanoSeconds);
973 else if ( nTmp == 0 )
980 case DataType::TIMESTAMP :
985 if ( xResultOne->absolute( nIndexOne ) )
986 aOne = xRowOne->getTimestamp( nColumn );
987 if ( xResultTwo->absolute( nIndexTwo ) )
988 aTwo = xRowTwo->getTimestamp( nColumn );
990 nTmp =
static_cast<sal_Int32
>(aTwo.Year) - static_cast<sal_Int32>(aOne.Year);
992 nTmp =
static_cast<sal_Int32
>(aTwo.Month) - static_cast<sal_Int32>(aOne.Month);
994 nTmp =
static_cast<sal_Int32
>(aTwo.Day) - static_cast<sal_Int32>(aOne.Day);
996 nTmp =
static_cast<sal_Int32
>(aTwo.Hours) - static_cast<sal_Int32>(aOne.Hours);
998 nTmp =
static_cast<sal_Int32
>(aTwo.Minutes) - static_cast<sal_Int32>(aOne.Minutes);
1000 nTmp =
static_cast<sal_Int32
>(aTwo.Seconds) - static_cast<sal_Int32>(aOne.Seconds);
1002 nTmp =
static_cast<sal_Int32
>(aTwo.NanoSeconds)
1003 - static_cast<sal_Int32>(aOne.NanoSeconds);
1007 else if ( nTmp == 0 )
1014 case DataType::REAL :
1019 if ( xResultOne->absolute( nIndexOne ) )
1020 aOne = xRowOne->getFloat( nColumn );
1021 if ( xResultTwo->absolute( nIndexTwo ) )
1022 aTwo = xRowTwo->getFloat( nColumn );
1026 else if ( aOne == aTwo )
1033 case DataType::FLOAT :
1034 case DataType::DOUBLE :
1039 if ( xResultOne->absolute( nIndexOne ) )
1040 aOne = xRowOne->getDouble( nColumn );
1041 if ( xResultTwo->absolute( nIndexTwo ) )
1042 aTwo = xRowTwo->getDouble( nColumn );
1046 else if ( aOne == aTwo )
1055 OSL_FAIL(
"DataType not supported for compare!" );
1065 sal_Int32 nIndexOne, sal_Int32 nIndexTwo )
1067 sal_IntPtr nCompare = 0;
1070 while ( !nCompare && pInfo )
1074 nCompare = CompareImpl( xResultOne, xResultTwo,
1075 nIndexOne, nIndexTwo, pInfo );
1086 if ( xResultOne->absolute( nIndexOne ) )
1087 aOne = xRowOne->getObject( pInfo->
mnColumn,
nullptr );
1088 if ( xResultTwo->absolute( nIndexTwo ) )
1089 aTwo = xRowTwo->getObject( pInfo->
mnColumn,
nullptr );
1095 nCompare = - nCompare;
1107 sal_IntPtr nIndexOne;
1108 sal_IntPtr nIndexTwo;
1115 xResultOne = mxOther;
1120 xResultOne = mxOriginal;
1126 xResultTwo = mxOther;
1131 xResultTwo = mxOriginal;
1135 sal_IntPtr nCompare;
1136 nCompare = CompareImpl( xResultOne, xResultTwo,
1137 nIndexOne, nIndexTwo );
1143 sal_IntPtr _nStart, sal_IntPtr _nEnd )
1145 if ( _nStart > _nEnd )
1148 sal_IntPtr nStart = _nStart;
1149 sal_IntPtr nEnd = _nEnd;
1150 sal_IntPtr nMid = 0, nCompare = 0;
1153 while ( nStart <= nEnd )
1155 nMid = ( nEnd - nStart ) / 2 + nStart;
1157 nCompare = Compare( pEntry, pMid );
1160 nCompare = (pEntry != pMid) ? ((pEntry < pMid) ? -1 : 1) : 0;
1177 osl::Guard< osl::Mutex > aGuard(
maMutex );
1179 if ( !mpPropChangeListeners )
1184 mpPropChangeListeners->getContainer( rEvt.PropertyName );
1185 if ( pPropsContainer )
1186 pPropsContainer->
notifyEach( &XPropertyChangeListener::propertyChange, rEvt );
1189 pPropsContainer = mpPropChangeListeners->getContainer( OUString() );
1190 if ( pPropsContainer )
1191 pPropsContainer->
notifyEach( &XPropertyChangeListener::propertyChange, rEvt );
1208 maS2O.Insert(
nullptr, 0 );
1211 nCount = rSrcS2O.
Count();
1213 for ( i=1; i<nCount; i++ )
1215 maS2O.Insert( std::unique_ptr<SortListData>(
new SortListData( rSrcS2O[ i ] )), i );
1216 m_O2S.push_back(pSource->
m_O2S[i]);
1219 mnLastSort = maS2O.Count();
1234 BuildSortInfo( mxOriginal, xSortInfo, xCompFactory );
1236 maS2O.Insert( std::unique_ptr<SortListData>(
new SortListData( 0 )), 0 );
1244 while ( mxOriginal->absolute( nIndex ) )
1247 sal_IntPtr
nPos = FindPos( pData.get(), 1, nIndex-1 );
1249 maS2O.Insert( std::move(pData), nPos );
1254 catch (
const SQLException&)
1268 for ( i=1; i<maS2O.Count(); i++ )
1270 for ( i=1; i<maS2O.Count(); i++ )
1271 m_O2S[maS2O[i]] = i;
1279 osl::Guard< osl::Mutex > aGuard(
maMutex );
1281 if ( !mpPropChangeListeners )
1286 if ( nOldCount != GetCount() )
1288 bool bIsFinal =
false;
1289 PropertyChangeEvent aEvt;
1291 aEvt.PropertyName =
"RowCount";
1292 aEvt.Further =
false;
1293 aEvt.PropertyHandle = -1;
1294 aEvt.OldValue <<= nOldCount;
1295 aEvt.NewValue <<= GetCount();
1297 PropertyChanged( aEvt );
1299 OUString
aName =
"IsRowCountFinal";
1301 if ( (aRet >>= bIsFinal) && bIsFinal != bWasFinal )
1303 aEvt.PropertyName = aName;
1304 aEvt.Further =
false;
1305 aEvt.PropertyHandle = -1;
1306 aEvt.OldValue <<= bWasFinal;
1307 aEvt.NewValue <<= bIsFinal;
1308 PropertyChanged( aEvt );
1312 catch (
const UnknownPropertyException&) {}
1313 catch (
const WrappedTargetException&) {}
1322 nEnd = maS2O.Count();
1323 for ( i=1; i<=nEnd; i++ )
1334 for ( i=0; i<nCount; i++ )
1339 maS2O.Insert( std::move(pData), nEnd );
1340 m_O2S.insert(m_O2S.begin() + nPos + i, nEnd);
1349 sal_IntPtr nOldLastSort;
1352 nOldLastSort = mnLastSort;
1353 if ( nPos <= mnLastSort )
1355 if ( nPos + nCount - 1 <= mnLastSort )
1356 mnLastSort -= nCount;
1358 mnLastSort = nPos - 1;
1363 for ( sal_IntPtr
i=0;
i < nCount;
i++ )
1365 sal_IntPtr nSortPos = m_O2S[nPos];
1366 m_O2S.erase(m_O2S.begin() + nPos);
1368 for (
size_t j=1; j < m_O2S.size(); ++j)
1370 sal_IntPtr nVal = m_O2S[j];
1371 if ( nVal > nSortPos )
1378 std::unique_ptr<SortListData>
pData = maS2O.Remove( nSortPos );
1379 if ( pData->mbModified )
1380 m_ModList.erase(std::find(m_ModList.begin(), m_ModList.end(), pData.get()));
1383 if ( nSortPos <= nOldLastSort )
1384 pEvents->
AddEvent( ListActionType::REMOVED, nSortPos );
1388 for ( sal_uInt32
i=1;
i<= maS2O.Count();
i++ )
1404 sal_IntPtr
i, nSortPos, nTo;
1407 for ( i=0; i<nCount; i++ )
1409 nSortPos = m_O2S[nPos + i];
1410 pData = maS2O.GetData( nSortPos );
1416 for ( i=nPos+nOffset; i<nPos; i++ )
1418 nSortPos = m_O2S[i];
1419 pData = maS2O.GetData( nSortPos );
1425 sal_IntPtr nStart = nPos + nCount;
1426 sal_IntPtr nEnd = nStart + nOffset;
1427 for ( i=nStart; i<nEnd; i++ )
1429 nSortPos = m_O2S[i];
1430 pData = maS2O.GetData( nSortPos );
1436 std::unique_ptr<sal_IntPtr[]> pTmpArr(
new sal_IntPtr[ nCount ]);
1437 for ( i=0; i<nCount; i++ )
1438 pTmpArr[i] = m_O2S[nPos + i];
1445 sal_IntPtr nFrom = nPos - 1;
1446 nTo = nPos + nCount - 1;
1449 for ( i=0; i>nOffset; i-- )
1451 sal_IntPtr
const nVal = m_O2S[nFrom + i];
1452 m_O2S[nTo + i] = nVal;
1458 sal_IntPtr nStart = nPos + nCount;
1459 for ( i=0; i<nOffset; i++ )
1461 sal_IntPtr
const nVal = m_O2S[nStart + i];
1462 m_O2S[nPos + i] = nVal;
1467 nTo = nPos + nOffset;
1468 for ( i=0; i<nCount; i++ )
1470 m_O2S[nTo + i] = pTmpArr[i];
1484 OSL_FAIL(
"No MetaData, No Sorting!" );
1489 const NumberedSortingInfo *pSortInfo = xSortInfo.getConstArray();
1495 for ( sal_Int32
i=xSortInfo.getLength();
i > 0; )
1498 nColumn = pSortInfo[
i ].ColumnIndex;
1499 aPropName = xData->getColumnName( nColumn );
1502 if ( xCompFactory.is() )
1514 pInfo->
mnType = xData->getColumnType( nColumn );
1520 pInfo->
mpNext = mpSortInfo;
1528 for ( sal_IntPtr
i=0;
i<nCount;
i++ )
1530 sal_IntPtr
const nSortPos = m_O2S[nPos];
1531 if ( nSortPos < mnLastSort )
1537 m_ModList.push_back(pData);
1547 sal_IntPtr nCompare, nCurPos, nNewPos;
1548 sal_IntPtr nStart, nEnd, nOffset, nVal;
1551 for (
size_t i = 0;
i < m_ModList.size(); ++
i)
1554 nCompare = CompareImpl( mxOther, mxOriginal,
1557 if ( nCompare != 0 )
1562 nNewPos = FindPos( pData, 1, nCurPos-1 );
1569 nNewPos = FindPos( pData, nCurPos+1, mnLastSort );
1575 if ( nNewPos != nCurPos )
1578 maS2O.Move( static_cast<sal_uInt32>(nCurPos), nNewPos );
1579 for (
size_t j = 1; j < m_O2S.size(); ++j)
1582 if ( ( nStart <= nVal ) && ( nVal <= nEnd ) )
1592 aAction.Position = nCurPos;
1594 aAction.ListActionType = ListActionType::MOVED;
1595 aAction.ActionInfo <<= nNewPos-nCurPos;
1596 pList->
Insert( aAction );
1598 pList->
AddEvent( ListActionType::PROPERTIES_CHANGED, nNewPos );
1602 catch (
const SQLException&)
1613 sal_IntPtr
i, nNewPos, nVal;
1616 for ( i = mnLastSort; i<static_cast<sal_IntPtr>(maS2O.Count()); i++ )
1619 nNewPos = FindPos( pData, 1, mnLastSort );
1622 maS2O.Move( static_cast<sal_uInt32>(i), nNewPos );
1623 for (
size_t j=1; j< m_O2S.size(); ++j)
1626 if ( nVal >= nNewPos )
1627 m_O2S[j] = nVal + 1;
1632 pList->
AddEvent( ListActionType::INSERTED, nNewPos );
1635 catch (
const SQLException&)
1668 if ( nPos < static_cast<sal_IntPtr>(
maData.size()) )
1669 maData.insert(
maData.begin() + nPos, std::move(pEntry) );
1671 maData.push_back( std::move(pEntry) );
1676 auto p = std::move(
maData[nOldPos]);
1683 std::unique_ptr<SortListData>
pData;
1685 if ( nPos < static_cast<sal_IntPtr>(
maData.size()) )
1687 pData = std::move(
maData[ nPos ]);
1699 if ( nPos < static_cast<sal_IntPtr>(
maData.size()) )
1700 pData =
maData[ nPos ].get();
1712 if ( nPos < static_cast<sal_IntPtr>(
maData.size()) )
1713 pData =
maData[ nPos ].get();
1722 OSL_FAIL(
"SortedEntryList: Can't get value for modified entry!");
1727 OSL_FAIL(
"SortedEntryList: invalid pos!");
1740 maProps[1].Name =
"IsRowCountFinal";
1758 if ( Name ==
"RowCount" )
1760 else if ( Name ==
"IsRowCountFinal" )
1763 throw UnknownPropertyException(Name);
1770 if ( Name ==
"RowCount" )
1772 else if ( Name ==
"IsRowCountFinal" )
virtual sal_Bool SAL_CALL rowDeleted() override
virtual sal_Int64 SAL_CALL getLong(sal_Int32 columnIndex) override
void ResortModified(EventList *pList)
virtual sal_Bool SAL_CALL previous() override
moves the cursor to the previous row in the result set.
virtual Sequence< Property > SAL_CALL getProperties() override
virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray(sal_Int32 columnIndex) override
constexpr OUStringLiteral RESULTSET_SERVICE_NAME
virtual void SAL_CALL dispose() override
std::unique_ptr< sal_Int32[]> pData
sal_Int32 addInterface(const css::uno::Reference< ListenerT > &rxIFace)
virtual css::uno::Any SAL_CALL getObject(sal_Int32 columnIndex, const css::uno::Reference< css::container::XNameAccess > &typeMap) override
virtual sal_Bool SAL_CALL hasPropertyByName(const OUString &Name) override
void Insert(const css::ucb::ListAction &rAction)
virtual sal_Int8 SAL_CALL getByte(sal_Int32 columnIndex) override
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &Listener) override
sal_Int32 Compare(SortListData const *pOne, SortListData const *pTwo)
virtual void SAL_CALL afterLast() override
void Insert(std::unique_ptr< SortListData > pEntry, sal_Int32 nPos)
virtual sal_Bool SAL_CALL isAfterLast() override
virtual OUString SAL_CALL getString(sal_Int32 columnIndex) override
virtual void SAL_CALL beforeFirst() override
virtual sal_Int32 SAL_CALL getRow() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::util::DateTime SAL_CALL getTimestamp(sal_Int32 columnIndex) override
virtual float SAL_CALL getFloat(sal_Int32 columnIndex) override
virtual void SAL_CALL refreshRow() override
virtual void SAL_CALL addPropertyChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &Listener) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual Property SAL_CALL getPropertyByName(const OUString &aName) override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getStatement() override
virtual sal_Bool SAL_CALL next() override
std::deque< std::unique_ptr< SortListData > > maData
void AddEvent(sal_IntPtr nType, sal_Int32 nPos)
virtual OUString SAL_CALL queryContentIdentifierString() override
bool getPropertyValue(ValueType &rValue, css::uno::Reference< css::beans::XPropertySet > const &xPropSet, OUString const &propName)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
void CopyData(SortedResultSet *pSource)
virtual css::uno::Reference< css::ucb::XContentIdentifier > SAL_CALL queryContentIdentifier() override
virtual sal_Bool SAL_CALL isBeforeFirst() override
SortListData(sal_IntPtr nPos)
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes(sal_Int32 columnIndex) override
Reference< XAnyCompare > mxCompareFunction
virtual css::util::Time SAL_CALL getTime(sal_Int32 columnIndex) override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
void PropertyChanged(const css::beans::PropertyChangeEvent &rEvt)
virtual sal_Bool SAL_CALL wasNull() override
#define TOOLS_WARN_EXCEPTION(area, stream)
static osl::Mutex & getContainerMutex()
virtual sal_Int16 SAL_CALL getShort(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL relative(sal_Int32 rows) override
moves the cursor a relative number of rows, either positive or negative.
virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef(sal_Int32 columnIndex) override
class SAL_NO_VTABLE XPropertySet
virtual sal_Bool SAL_CALL rowUpdated() override
virtual sal_Bool SAL_CALL isLast() override
virtual sal_Bool SAL_CALL getBoolean(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL isFirst() override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &Listener) override
virtual sal_Bool SAL_CALL first() override
void Move(sal_Int32 nPos, sal_Int32 nCount, sal_Int32 nOffset)
css::uno::Type const & get()
SortListData * GetData(sal_Int32 nPos)
std::deque< sal_IntPtr > m_O2S
SortedResultSet(css::uno::Reference< css::sdbc::XResultSet > const &aResult)
static sal_Int32 CompareImpl(const css::uno::Reference< css::sdbc::XResultSet > &xResultOne, const css::uno::Reference< css::sdbc::XResultSet > &xResultTwo, sal_Int32 nIndexOne, sal_Int32 nIndexTwo, SortInfo const *pSortInfo)
void notifyEach(void(SAL_CALL ListenerT::*NotificationMethod)(const EventT &), const EventT &Event)
virtual css::uno::Reference< css::sdbc::XResultSetMetaData > SAL_CALL getMetaData() override
void ResortNew(EventList *pList)
void Remove(sal_Int32 nPos, sal_Int32 nCount, EventList *pList)
void Initialize(const css::uno::Sequence< css::ucb::NumberedSortingInfo > &xSortInfo, const css::uno::Reference< css::ucb::XAnyCompareFactory > &xCompFac)
virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
std::unique_ptr< SortListData > Remove(sal_Int32 nPos)
void Move(sal_Int32 nOldPos, sal_Int32 nNewPos)
virtual sal_Bool SAL_CALL absolute(sal_Int32 row) override
moves the cursor to the given row number in the result set.
virtual ~SortedResultSet() override
void SetChanged(sal_Int32 nPos, sal_Int32 nCount)
virtual void SAL_CALL removePropertyChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &Listener) override
sal_Int32 FindPos(SortListData const *pEntry, sal_IntPtr nStart, sal_IntPtr nEnd)
sal_Int32 operator[](sal_Int32 nPos) const
virtual double SAL_CALL getDouble(sal_Int32 columnIndex) override
void CheckProperties(sal_Int32 nOldCount, bool bWasFinal)
virtual sal_Int32 SAL_CALL getInt(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL last() override
virtual sal_Bool SAL_CALL rowInserted() override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
void BuildSortInfo(const css::uno::Reference< css::sdbc::XResultSet > &aResult, const css::uno::Sequence< css::ucb::NumberedSortingInfo > &xSortInfo, const css::uno::Reference< css::ucb::XAnyCompareFactory > &xCompFac)
virtual css::uno::Reference< css::ucb::XContent > SAL_CALL queryContent() override
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream(sal_Int32 columnIndex) override
virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob(sal_Int32 columnIndex) override
virtual void SAL_CALL close() override
virtual void SAL_CALL setPropertyValue(const OUString &PropertyName, const css::uno::Any &Value) override
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &Listener) override
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream(sal_Int32 columnIndex) override
void InsertNew(sal_Int32 nPos, sal_Int32 nCount)
virtual css::util::Date SAL_CALL getDate(sal_Int32 columnIndex) override
bool m_bDetectedRangeSegmentation false
css::uno::Reference< css::sdbc::XResultSet > mxOriginal