[Libreoffice-commits] .: Branch 'libreoffice-3-4' - automation/source

Caolán McNamara caolan at kemper.freedesktop.org
Wed Sep 21 06:42:54 PDT 2011


 automation/source/server/cmdbasestream.cxx |   20 ---
 automation/source/server/statemnt.cxx      |    6 
 automation/source/testtool/cmdstrm.cxx     |    3 
 automation/source/testtool/objtest.cxx     |  183 +++++++----------------------
 4 files changed, 58 insertions(+), 154 deletions(-)

New commits:
commit 0b3a80adb4df072be76445aff3d065d489f11db9
Author: Noel Power <nopower at suse.com>
Date:   Wed Sep 21 14:40:55 2011 +0100

    fdo#37164 get testtool working

diff --git a/automation/source/server/cmdbasestream.cxx b/automation/source/server/cmdbasestream.cxx
index d86e662..b236700 100644
--- a/automation/source/server/cmdbasestream.cxx
+++ b/automation/source/server/cmdbasestream.cxx
@@ -70,10 +70,7 @@ void CmdBaseStream::GenReturn (comm_USHORT nRet, rtl::OString *pUId, comm_ULONG
 {
     Write(comm_USHORT(SIReturn));
     Write(nRet);
-    if ( pUId->equals( rtl::OString( "UID_ACTIVE" ) ) )
-        Write(comm_ULONG(0));
-    else
-        Write(pUId);
+    Write(pUId);
     Write(comm_USHORT(PARAM_ULONG_1));			// Typ der folgenden Parameter
     Write(nNr);
 }
@@ -82,10 +79,7 @@ void CmdBaseStream::GenReturn (comm_USHORT nRet, rtl::OString *pUId, comm_String
 {
     Write(comm_USHORT(SIReturn));
     Write(nRet);
-    if ( pUId->equals( rtl::OString( "UID_ACTIVE" ) ) )
-        Write(comm_ULONG(0));
-    else
-        Write(pUId);
+    Write(pUId);
     Write(comm_USHORT(PARAM_STR_1));				// Typ der folgenden Parameter
     Write(pString);
 }
@@ -94,10 +88,7 @@ void CmdBaseStream::GenReturn (comm_USHORT nRet, rtl::OString *pUId, comm_BOOL b
 {
     Write(comm_USHORT(SIReturn));
     Write(nRet);
-    if ( pUId->equals( rtl::OString( "UID_ACTIVE" ) ) )
-        Write(comm_ULONG(0));
-    else
-        Write(pUId);
+    Write(pUId);
     Write(comm_USHORT(PARAM_BOOL_1));			// Typ der folgenden Parameter
     Write(bBool);
 }
@@ -106,10 +97,7 @@ void CmdBaseStream::GenReturn (comm_USHORT nRet, rtl::OString *pUId, comm_ULONG
 {
     Write(comm_USHORT(SIReturn));
     Write(nRet);
-    if ( pUId->equals( rtl::OString( "UID_ACTIVE" ) ) )
-        Write(comm_ULONG(0));
-    else
-        Write(pUId);
+    Write(pUId);
     Write(comm_USHORT(PARAM_ULONG_1|PARAM_STR_1|PARAM_BOOL_1));		// Typ der folgenden Parameter
     Write(nNr);
     Write(pString);
diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx
index 738e4a2..e805076 100644
--- a/automation/source/server/statemnt.cxx
+++ b/automation/source/server/statemnt.cxx
@@ -3373,7 +3373,7 @@ StatementControl::StatementControl( SCmdStream *pCmdIn, sal_uInt16 nControlIdTyp
     {
         comm_ULONG nId;
         pCmdIn->Read( nId );
-        aUId = rtl::OString( nId );
+        aUId = rtl::OString::valueOf( static_cast< sal_Int32 >( nId  ) );
         if ( nId == 0 )
             aUId = UID_ACTIVE;
         else
@@ -3490,7 +3490,7 @@ sal_Bool StatementControl::ControlOK( Window *pControl, const sal_Char* cBezeich
 {
     if ( pControl && ( ( ( IsAccessable(pControl) || (nMethodId & M_WITH_RETURN) ) &&
                          pControl->IsVisible() ) ||
-                         aUId.equals( UID_ACTIVE ) ) )
+                         aUId.equals( rtl::OString( UID_ACTIVE ) ) ) )
         return sal_True;
     else
     {
@@ -4356,7 +4356,7 @@ sal_Bool StatementControl::Execute()
 #endif
 
 
-    if ( aUId.equals( UID_ACTIVE ) )
+    if ( aUId.equals( rtl::OString( UID_ACTIVE ) ) )
         pControl = GetAnyActive();
     else
     {
diff --git a/automation/source/testtool/cmdstrm.cxx b/automation/source/testtool/cmdstrm.cxx
index efb8c3e..a268a88 100644
--- a/automation/source/testtool/cmdstrm.cxx
+++ b/automation/source/testtool/cmdstrm.cxx
@@ -101,8 +101,7 @@ String CmdStream::WandleKeyEventString( String aKeys )
                 sal_uInt16 nElement;
                 if (pKeyCodes->Seek_Entry(&WhatName,&nElement))
                 {
-                    // FIXME: HELPID
-                    sal_uInt16 nCode = 0;//(sal_uInt16) pKeyCodes->GetObject(nElement)->pData->aUId.GetNum();
+                    sal_uInt16 nCode = (sal_uInt16) pKeyCodes->GetObject(nElement)->pData->aUId.toInt64();
                     if ( nCode >= KEY_SHIFT )
                         nModify ^= nCode;
                     else
diff --git a/automation/source/testtool/objtest.cxx b/automation/source/testtool/objtest.cxx
index 8b41527..492ee57 100644
--- a/automation/source/testtool/objtest.cxx
+++ b/automation/source/testtool/objtest.cxx
@@ -255,15 +255,11 @@ String CRevNames::GetName( rtl::OString aUId )
         return GetObject(nPos)->pData->Kurzname;
     else
     {
-        // FIXME: HELPID
-        #if 0
-        if ( aUId.Matches( UID_ACTIVE ) )
+        if ( aUId.match( UID_ACTIVE ) )
             return CUniString("Active");
         else
-            return GEN_RES_STR1( S_NAME_NOT_THERE, aUId.GetText() );
-        #else
+            return GEN_RES_STR1( S_NAME_NOT_THERE, String::CreateFromAscii( aUId.getStr() ) );
         return String();
-        #endif
     }
 }
 
@@ -693,12 +689,7 @@ void TestToolObj::InitTestToolObj()
         SbxTransportMethod *pMeth = new SbxTransportMethod( SbxVARIANT );
         pMeth->SetName( pRCommands->GetObject( i )->pData->Kurzname );
         pMeth->SetUserData( ID_RemoteCommand );
-        // FIXME: HELPID
-        #if 0
-        pMeth->nValue = pRCommands->GetObject( i )->pData->aUId.GetNum();
-        #else
-        pMeth->nValue = 0;
-        #endif
+        pMeth->nValue = static_cast< sal_uLong >( pRCommands->GetObject( i )->pData->aUId.toInt64() );
         Insert( pMeth );
         StartListening( pMeth->GetBroadcaster(), sal_True );
     }
@@ -852,7 +843,7 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, s
         ReadFlat( aFileName ,pUIds, sal_True );
         if ( !pUIds )
             return;
-        pNewDef = new ControlDef("Active",rtl::OString());
+        pNewDef = new ControlDef("Active",rtl::OString( UID_ACTIVE ));
         const ControlItem *pItem = pNewDef;
         if (! pUIds->Insert(pItem))
         {
@@ -983,12 +974,9 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, s
         else
         {
 
-            // FIXME: HELPID
-            #if 0
             if (aShortname.CompareIgnoreCaseToAscii("*Active") == COMPARE_EQUAL)
-                aUId = rtl::OString( UID_ACTIVE );
+                aUId = UID_ACTIVE;
             else
-            #endif
                 if ( !bUnoName && !bMozillaName )
             {	// Bestimmen der ID aus der Hid.Lst
                 ControlDef WhatName(aLongname,rtl::OString());
@@ -1002,17 +990,14 @@ void TestToolObj::ReadNames( String Filename, CNames *&pNames, CNames *&pUIds, s
             }
             else
             {
-                // FIXME: HELPID
-                #if 0
                 if ( bUnoName )
-                    aUId = rtl::OString( aLongname );
+                    aUId = rtl::OUStringToOString( aLongname, RTL_TEXTENCODING_UTF8 );
                 else if ( bMozillaName )
-                    aUId = rtl::OString( aLongname );
+                    aUId = rtl::OUStringToOString( aLongname , RTL_TEXTENCODING_UTF8);
                 else
                 {
                     OSL_FAIL("Unknown URL schema");
                 }
-                #endif
             }
 
 
@@ -1137,7 +1122,6 @@ void TestToolObj::ReadFlat( String Filename, CNames *&pNames, sal_Bool bSortByNa
         }
 
         aLongname = aLine.GetToken(0,cMyDelim);
-        // FIXME: HELPID
         aUId = rtl::OUStringToOString( aLine.GetToken(1,cMyDelim), RTL_TEXTENCODING_UTF8 );
 
         if ( bSortByName )
@@ -1180,8 +1164,7 @@ void ReadFlatArray( const ControlDefLoad arWas [], CNames *&pNames )
 
     while ( String::CreateFromAscii(arWas[nIndex].Kurzname).Len() > 0 )
     {
-        // FIXME: HELPID
-        rtl::OString aUId;// (arWas[nIndex].nUId);
+        rtl::OString aUId ( rtl::OString::valueOf( static_cast< sal_Int64  >( arWas[nIndex].nUId ) ) );
         const ControlItem *pX = new ControlDef( arWas[nIndex].Kurzname, aUId);
         pNames->C40_PTR_INSERT(ControlItem, pX);
         nIndex++;
@@ -1469,16 +1452,13 @@ sal_Bool TestToolObj::ReadNamesBin( String Filename, CNames *&pSIds, CNames *&pC
         {
             String aStrId;
             aStream.ReadByteString( aStrId, RTL_TEXTENCODING_UTF8 );
-            // FIXME: HELPID
-            #if 0
-            aUId = rtl::OString( aStrId );
-            #endif
+            aUId = rtl::OUStringToOString( aStrId, RTL_TEXTENCODING_UTF8 );
         }
         else
         {
             comm_ULONG nUId;
             aStream >> nUId;
-            aUId = rtl::OString();// nUId;
+            aUId = rtl::OString::valueOf( static_cast< sal_Int64 >( nUId ) );
         }
 
         if (aName.GetChar(0) == '*' || bIsFlat )     // Globaler Kurzname (Dialogname oder SId)
@@ -2095,8 +2075,7 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
                         if ( !IsError() && ((SbxTransportMethod*)pVar)->nValue & M_WITH_RETURN )
                         {
                             pImpl->pNextReturn = ((SbxTransportMethod*)pVar);
-                                                        // FIXME: HELPID
-                            aNextReturnId = rtl::OString();// ((SbxTransportMethod*)pVar)->nValue );
+                            aNextReturnId = rtl::OString::valueOf( static_cast< sal_Int64 >( ((SbxTransportMethod*)pVar)->nValue )  );
                         }
                         if ( SingleCommandBlock )
                             EndBlock();
@@ -2168,17 +2147,13 @@ void TestToolObj::SFX_NOTIFY( SfxBroadcaster&, const TypeId&,
                                 {
                                     In->GenCmdControl (pMember->GetULong(),
                                         (sal_uInt16)((SbxTransportMethod*)pVar)->nValue, rPar);
-                                                                // FIXME: HELPID
-                                    aNextReturnId = rtl::OString();// pMember->GetULong() );
+                                    aNextReturnId = rtl::OUStringToOString( pMember->GetString(), RTL_TEXTENCODING_UTF8 );
                                 }
                                 else
                                 {
                                     In->GenCmdControl (pMember->GetString(),
                                         (sal_uInt16)((SbxTransportMethod*)pVar)->nValue, rPar);
-                                    // FIXME: HELPID
-                                    #if 0
-                                    aNextReturnId = rtl::OString( pMember->GetString() );
-                                    #endif
+                                    aNextReturnId = rtl::OUStringToOString( pMember->GetString(), RTL_TEXTENCODING_UTF8 );
                                 }
                             }
 
@@ -2728,12 +2703,9 @@ SbxVariable* TestToolObj::Find( const String& aStr, SbxClassType aType)
 
 
             // Will be set on method-child further down
-            // FIXME: HELPID
-            #if 0
-            if ( pWhatName->pData->aUId.HasNumeric() )
+            if ( pWhatName->pData->aUId.equals( UID_ACTIVE ) )
                 pImpl->pControlsObj->SetUserData( ID_Control );
             else
-            #endif
                 pImpl->pControlsObj->SetUserData( ID_StringControl );
 
             pShortNames->Insert(pWhatName->pData->Kurzname,pWhatName->pData->aUId,nSequence);
@@ -2746,13 +2718,13 @@ SbxVariable* TestToolObj::Find( const String& aStr, SbxClassType aType)
                 pImpl->pControlsObj->SetDfltProperty(pID);
                 pMember = pID;
             }
-            // FIXME: HELPID
-            #if 0
-            if ( pWhatName->pData->aUId.HasNumeric() )
-                pMember->PutULong(pWhatName->pData->aUId.GetNum());
+            sal_uLong nId = static_cast< sal_uLong >( pWhatName->pData->aUId.toInt64() );
+            if ( nId )
+                pMember->PutULong(nId);
             else
-                pMember->PutString(pWhatName->pData->aUId.GetStr());
-            #endif
+            {
+                pMember->PutString( String::CreateFromAscii( pWhatName->pData->aUId.getStr() ) );
+            }
 
             pMember = pImpl->pControlsObj->Find(CUniString("name"),SbxCLASS_DONTCARE);
             if ( pMember != NULL )
@@ -2772,20 +2744,18 @@ SbxVariable* TestToolObj::Find( const String& aStr, SbxClassType aType)
             pWhatName = ( (ControlDef*)m_pSIds->GetObject( nElement ) );
             pMyVar->SetName( pWhatName->pData->Kurzname );
 
-            // FIXME: HELPID
-            #if 0
-            if ( pWhatName->pData->aUId.HasNumeric() )
+            sal_uLong nId = static_cast< sal_uLong >( pWhatName->pData->aUId.toInt64() );
+            if ( nId )
             {
                 pMyVar->SetUserData( ID_Dispatch );
-                pMyVar->nValue = pWhatName->pData->aUId.GetNum();
+                pMyVar->nValue = nId;
                 pShortNames->Insert( aStr, pWhatName->pData->aUId, nSequence );
             }
             else
             {
                 pMyVar->SetUserData( ID_UNODispatch );
-                pMyVar->aUnoSlot = pWhatName->pData->aUId.GetStr();
+                pMyVar->aUnoSlot = String::CreateFromAscii( pWhatName->pData->aUId.getStr() );
             }
-            #endif
             return pMyVar;
         }
 
@@ -2801,13 +2771,11 @@ SbxVariable* TestToolObj::Find( const String& aStr, SbxClassType aType)
                 pWhatName = ( (ControlDef*)m_pSIds->GetObject( nElement ) );
                 pReturn->SetName( pWhatName->pData->Kurzname );
 
-                // FIXME: HELPID
-                #if 0
-                if ( pWhatName->pData->aUId.HasNumeric() )
-                    pReturn->PutULong(pWhatName->pData->aUId.GetNum());
+                sal_uLong nId = static_cast< sal_uLong >( pWhatName->pData->aUId.toInt64() );
+                if ( nId )
+                    pReturn->PutULong( nId);
                 else
-                    pReturn->PutString(pWhatName->pData->aUId.GetStr());
-                #endif
+                    pReturn->PutString( String::CreateFromAscii( pWhatName->pData->aUId ) );
                 return pReturn;
             }
         }
@@ -3197,8 +3165,7 @@ void TestToolObj::SortControlsByNumber( sal_Bool bIncludeActive )
         }
         if ( !bIncludeActive )
         {
-            // FIXME: HELPID
-            ControlItem *pZeroItem = new ControlItemUId( UniString(), rtl::OString() );
+            ControlItem *pZeroItem = new ControlItemUId( UniString(), rtl::OString(UID_ACTIVE) );
             sal_uInt16 nNr;
             if ( m_pReverseControls->Seek_Entry( pZeroItem, &nNr ) )
             {
@@ -3235,19 +3202,13 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
             {
                 String aUStrId;     // UniqueStringID Used for Mozilla Integration
                 pRetStream->Read( aUStrId );
-                // FIXME: HELPID
-                #if 0
-                aUId = rtl::OString( aUStrId );
-                #endif
+                aUId = rtl::OUStringToOString( aUStrId, RTL_TEXTENCODING_UTF8 );
             }
             else
             {
                 comm_ULONG nUId;
                 pRetStream->Read( nUId );         // bei Sequence einfach die Sequence
-                // FIXME: HELPID
-                #if 0
-                aUId = rtl::OString( nUId );
-                #endif
+                aUId = rtl::OString::valueOf( static_cast< sal_Int64 >( nUId ) );
             }
             pRetStream->Read(nParams);
 
@@ -3276,9 +3237,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
             {
                 case RET_Sequence:
                     {
-                        // FIXME: HELPID
-                        #if 0
-                        sal_uLong nUId = aUId.GetNum();
+                        sal_uLong nUId = static_cast< sal_uLong >( aUId.toInt64() );
                         if ( nSequence != nUId )
                         {
                             bSequenceOK = sal_False;
@@ -3288,7 +3247,6 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
                         {
                             nClearSequence = nUId;
                         }
-                        #endif
                     }
                     break;
                 case RET_Value:
@@ -3346,10 +3304,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
                         }
 
                         WinInfoRec *pWinInfo = new WinInfoRec;
-                        // FIXME: HELPID
-                        #if 0
-                        pWinInfo->aUId = aUId.GetText();
-                        #endif
+                        pWinInfo->aUId = String::CreateFromAscii( aUId.getStr() );
                         pWinInfo->nRType = (sal_uInt16)nLNr1;   // just sal_uLong for Transport, data is always USHORT
                         pWinInfo->aRName = aString1;
                         pWinInfo->bIsReset = bBool1;
@@ -3401,11 +3356,10 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
                         }
 
                         // Langname feststellen
-                        // FIXME: HELPID
-                        #if 0
-                        if ( aUId.HasString() )
+                        sal_uLong nTmpId = aUId.toInt64();
+                        if ( !nTmpId )
                         {   // use the String ID since there is no LongName in hid.lst
-                            pWinInfo->aLangname = aUId.GetStr();
+                            pWinInfo->aLangname = String::CreateFromAscii( aUId.getStr() );
                         }
                         else
                         {
@@ -3418,7 +3372,6 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
                                 delete pNewItem;
                             }
                         }
-                        #endif
 
                         aWinInfoHdl.Call( pWinInfo );
 
@@ -3427,9 +3380,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
                     break;
                 case RET_ProfileInfo:
                     {
-                        // FIXME: HELPID
-                        #if 0
-                        sal_uLong nUId = aUId.GetNum();
+                        sal_uLong nUId = static_cast< sal_uLong >(aUId.toInt64());
                         if ( nParams & PARAM_STR_1 )
                         {
                             DirEntry FilePath = pImpl->aLogFileBase + DirEntry(DirEntry(aLogFileName).GetBase().AppendAscii(".prf"));
@@ -3557,14 +3508,11 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
                                     break;
                             }
                         }
-                        #endif
                     }
                     break;
                 case RET_DirectLoging:
                     {
-                        // FIXME: HELPID
-                        #if 0
-                        sal_uLong nUId = aUId.GetNum();
+                        sal_uLong nUId = static_cast< sal_uLong>( aUId.toInt64() );
                         switch ( nUId )
                         {
                         case S_AssertError:
@@ -3580,7 +3528,6 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
                         default:
                             ;
                         }
-                        #endif
                     }
                     break;
                 case RET_MacroRecorder:
@@ -3611,8 +3558,7 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
                             if ( m_pReverseControls )
                             {
                                 sal_uInt16 nNr;
-                                                    // FIXME: HELPID
-                                ControlItem *pNewItem = new ControlItemUId( String(), rtl::OString( /*nLNr1*/ ) );
+                                ControlItem *pNewItem = new ControlItemUId( String(), rtl::OString::valueOf( static_cast< sal_Int64 >( nLNr1 ) ));
                                 if ( m_pReverseControls->Seek_Entry(pNewItem,&nNr) )
                                     aULongNames = m_pReverseControls->GetObject(nNr)->pData->Kurzname;
                                 delete pNewItem;
@@ -3852,19 +3798,13 @@ sal_Bool TestToolObj::ReturnResults( SvStream *pIn )
             {
                 String aUStrId;     // UniqueStringID Used for Mozilla Integration
                 pRetStream->Read( aUStrId );
-                // FIXME: HELPID
-                #if 0
-                aUId = rtl::OString( aUStrId );
-                #endif
+                aUId = rtl::OUStringToOString( aUStrId, RTL_TEXTENCODING_UTF8 );
             }
             else
             {
                 comm_ULONG nUId;
                 pRetStream->Read( nUId );         // bei Sequence einfach die Sequence
-                // FIXME: HELPID
-                #if 0
-                aUId = rtl::OString( nUId );
-                #endif
+                aUId = rtl::OString::valueOf( static_cast< sal_Int64 >( nUId ) );
             }
             pRetStream->Read( aString );
             ReplaceNumbers (aString);
@@ -3910,15 +3850,11 @@ String TestToolObj::GetMethodName( sal_uLong nMethodId )
         ReadFlatArray( Controls::arClasses, Controls::pClasses );
     if ( Controls::pClasses )
     {
-        // FIXME: HELPID
-        #if 0
         for ( nElement = 0 ; nElement < Controls::pClasses->Count() ; nElement++ )
-            if ( Controls::pClasses->GetObject(nElement)->pData->aUId.Matches( nMethodId ) )
+        {
+            if ( Controls::pClasses->GetObject(nElement)->pData->aUId.match( rtl::OString::valueOf( static_cast< sal_Int64 >( nMethodId ) ) ) )
                 return Controls::pClasses->GetObject(nElement)->pData->Kurzname;
-        #else
-        (void)nElement;
-        (void)nMethodId;
-        #endif
+        }
     }
     return String();
 }
@@ -3930,15 +3866,9 @@ String TestToolObj::GetKeyName( sal_uInt16 nKeyCode )
         ReadFlatArray( CmdStream::arKeyCodes, CmdStream::pKeyCodes );
     if ( CmdStream::pKeyCodes )
     {
-        // FIXME: HELPID
-        #if 0
         for ( nElement = 0 ; nElement < CmdStream::pKeyCodes->Count() ; nElement++ )
-            if ( CmdStream::pKeyCodes->GetObject(nElement)->pData->aUId.Matches( nKeyCode ) )
+            if ( CmdStream::pKeyCodes->GetObject(nElement)->pData->aUId.match( rtl::OString::valueOf( static_cast< sal_Int64 >( nKeyCode  ) ) ) )
                 return CmdStream::pKeyCodes->GetObject(nElement)->pData->Kurzname;
-        #else
-        (void)nElement;
-        (void)nKeyCode;
-        #endif
     }
     return CUniString( "UnknownKeyCode" );
 }
@@ -3967,8 +3897,7 @@ static ControlDefLoad const arRes_Type [] =
         bFound = sal_False;
         if ( aType.CompareTo(UIdKenn) == COMPARE_EQUAL )
         {
-                // FIXME: HELPID
-            aResult = pShortNames->GetName(rtl::OString(/*nNumber*/));
+            aResult = pShortNames->GetName( rtl::OString::valueOf( static_cast< sal_Int64 >( nNumber )) );
             bFound = sal_True;
         }
         if ( aType.CompareTo(MethodKenn ) == COMPARE_EQUAL )
@@ -3985,17 +3914,12 @@ static ControlDefLoad const arRes_Type [] =
             sal_uInt16 nElement;
             if ( pRCommands )
             {
-                // FIXME: HELPID
-                #if 0
                 for ( nElement = 0 ; nElement < pRCommands->Count() ; nElement++ )
-                    if ( pRCommands->GetObject(nElement)->pData->aUId.Matches( nNumber ) )
+                    if ( pRCommands->GetObject(nElement)->pData->aUId.match( rtl::OString::valueOf( static_cast< sal_Int64 >( nNumber ) ) ) )
                     {
                         aResult = pRCommands->GetObject(nElement)->pData->Kurzname;
                         nElement = pRCommands->Count();
                     }
-                #else
-                (void)nElement;
-                #endif
             }
         }
         if ( aType.CompareTo(TypeKenn ) == COMPARE_EQUAL )
@@ -4007,23 +3931,17 @@ static ControlDefLoad const arRes_Type [] =
             sal_uInt16 nElement;
             if ( pRTypes )
             {
-                // FIXME: HELPID
-                #if 0
                 for ( nElement = 0 ; nElement < pRTypes->Count() ; nElement++ )
-                    if ( pRTypes->GetObject(nElement)->pData->aUId.Matches( nNumber ) )
+                    if ( pRTypes->GetObject(nElement)->pData->aUId.match( rtl::OString::valueOf( static_cast< sal_Int64 >( nNumber ) ) ) )
                     {
                         aResult = pRTypes->GetObject(nElement)->pData->Kurzname;
                         nElement = pRTypes->Count();
                     }
-                #else
-                (void)nElement;
-                #endif
             }
         }
         if ( aType.CompareTo(SlotKenn ) == COMPARE_EQUAL )
         {
-                // FIXME: HELPID
-            aResult = pShortNames->GetName(rtl::OString(/*nNumber*/));
+            aResult = pShortNames->GetName(rtl::OString::valueOf( static_cast< sal_Int64>( nNumber ) ));
             bFound = sal_True;
         }
         if ( aType.CompareTo(TabKenn ) == COMPARE_EQUAL )
@@ -4154,8 +4072,7 @@ SbxVariable* Controls::Find( const String& aStr, SbxClassType aType)
     if (pClasses && pClasses->Seek_Entry(&WhatName,&nElement))
     {
         pMethodVar->SetName(aStr);
-        // FIXME: HELPID
-        sal_uLong nUId = 0;//pClasses->GetObject(nElement)->pData->aUId.GetNum();
+        sal_uLong nUId =  static_cast< sal_uLong >( pClasses->GetObject(nElement)->pData->aUId.toInt64() );
         pMethodVar->nValue = nUId;
 
          pMethodVar->SetUserData( GetUserData() );


More information about the Libreoffice-commits mailing list