summaryrefslogtreecommitdiff
path: root/ucb/source/sorter/sortresult.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'ucb/source/sorter/sortresult.cxx')
-rwxr-xr-x[-rw-r--r--]ucb/source/sorter/sortresult.cxx38
1 files changed, 20 insertions, 18 deletions
diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx
index 94af36513670..f0a6bb3fb516 100644..100755
--- a/ucb/source/sorter/sortresult.cxx
+++ b/ucb/source/sorter/sortresult.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,7 +50,8 @@ using namespace com::sun::star::ucb;
using namespace com::sun::star::uno;
using namespace com::sun::star::util;
using namespace cppu;
-using namespace rtl;
+
+using ::rtl::OUString;
//=========================================================================
@@ -247,10 +249,10 @@ XTYPEPROVIDER_IMPL_9( SortedResultSet,
//--------------------------------------------------------------------------
XSERVICEINFO_NOFACTORY_IMPL_1( SortedResultSet,
- OUString::createFromAscii(
- "com.sun.star.comp.ucb.SortedResultSet" ),
- OUString::createFromAscii(
- RESULTSET_SERVICE_NAME ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.comp.ucb.SortedResultSet" )),
+ OUString(RTL_CONSTASCII_USTRINGPARAM(
+ RESULTSET_SERVICE_NAME )) );
//--------------------------------------------------------------------------
// XComponent methods.
@@ -937,7 +939,6 @@ Any SAL_CALL SortedResultSet::getPropertyValue( const OUString& PropertyName )
}
else if ( PropertyName.compareToAscii( "IsRowCountFinal" ) == 0 )
{
- sal_uInt32 nOrgCount = 0;
sal_Bool bOrgFinal = false;
Any aOrgRet;
@@ -950,7 +951,8 @@ Any SAL_CALL SortedResultSet::getPropertyValue( const OUString& PropertyName )
if ( bOrgFinal )
{
aOrgRet = Reference< XPropertySet >::query(mxOriginal)->
- getPropertyValue( OUString::createFromAscii( "RowCount" ) );
+ getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount")) );
+ sal_uInt32 nOrgCount = 0;
aOrgRet >>= nOrgCount;
if ( nOrgCount == maS2O.Count() )
aRet <<= (sal_Bool) sal_True;
@@ -1468,7 +1470,7 @@ void SortedResultSet::Initialize(
// insert some dummy entries first and replace then
// the entries with the right ones
- sal_uInt32 i;
+ size_t i;
for ( i=1; i<maS2O.Count(); i++ )
maO2S.Insert( (void*) 0, i ); // Insert( data, pos )
@@ -1493,7 +1495,7 @@ void SortedResultSet::CheckProperties( long nOldCount, sal_Bool bWasFinal )
sal_Bool bIsFinal = sal_False;
PropertyChangeEvent aEvt;
- aEvt.PropertyName = OUString::createFromAscii( "RowCount" );
+ aEvt.PropertyName = OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount"));
aEvt.Further = sal_False;
aEvt.PropertyHandle = -1;
aEvt.OldValue <<= nOldCount;
@@ -1501,7 +1503,7 @@ void SortedResultSet::CheckProperties( long nOldCount, sal_Bool bWasFinal )
PropertyChanged( aEvt );
- OUString aName = OUString::createFromAscii( "IsRowCountFinal" );
+ OUString aName = OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal"));
Any aRet = getPropertyValue( aName );
if ( (aRet >>= bIsFinal) && bIsFinal != bWasFinal )
{
@@ -1521,8 +1523,7 @@ void SortedResultSet::CheckProperties( long nOldCount, sal_Bool bWasFinal )
//-------------------------------------------------------------------------
void SortedResultSet::InsertNew( long nPos, long nCount )
{
- // in der maS2O Liste alle Eintrge, die >= nPos sind, um nCount
- // erhhen
+ // for all entries in the msS20-list, which are >= nPos, increase by nCount
SortListData *pData;
long i, nEnd;
@@ -1536,15 +1537,15 @@ void SortedResultSet::InsertNew( long nPos, long nCount )
}
}
- // und die neuen eintrge hinten an die maS2O Liste anhngen bzw
- // an der Position nPos in der maO2S Liste einfgen
+ // and append the new entries at the end of the maS20-list or insert at the
+ // position nPos in the maS2O-list
for ( i=0; i<nCount; i++ )
{
nEnd += 1;
pData = new SortListData( nEnd );
- maS2O.Insert( pData, nEnd ); // Insert( Wert, Position )
- maO2S.Insert( (void*)nEnd, (sal_uInt32)(nPos+i) ); // Insert( Wert, Position )
+ maS2O.Insert( pData, nEnd ); // Insert( Value, Position )
+ maO2S.Insert( (void*)nEnd, (sal_uInt32)(nPos+i) ); // Insert( Value, Position )
}
mnCount += nCount;
@@ -2002,12 +2003,12 @@ void SimpleList::Replace( void* pData, sal_uInt32 nPos )
SRSPropertySetInfo::SRSPropertySetInfo()
{
- maProps[0].Name = OUString::createFromAscii( "RowCount" );
+ maProps[0].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("RowCount"));
maProps[0].Handle = -1;
maProps[0].Type = ::getCppuType( (const OUString*) NULL );
maProps[0].Attributes = -1;
- maProps[1].Name = OUString::createFromAscii( "IsRowCountFinal" );
+ maProps[1].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("IsRowCountFinal"));
maProps[1].Handle = -1;
maProps[1].Type = ::getBooleanCppuType();
maProps[1].Attributes = -1;
@@ -2068,3 +2069,4 @@ SRSPropertySetInfo::hasPropertyByName( const OUString& Name )
return sal_False;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */