Commits

Anonymous committed 07971d0

fix some errors

  • Participants
  • Parent commits 23d1ade

Comments (0)

Files changed (1)

automation/source/server/statemnt.cxx

                                                          ValueOK( aUId, MethodString( nMethodId ), nNr2, pTC->GetRowCount() ))
                                                     {
                                                         ::svt::table::PTableModel pModel = pTC->GetModel();
-                                                        Any aCell = pModel->getCellContent()[nNr1-1][nNr2-1];
+                                                        Any aCell = pModel->getCellContent()[nNr2-1][nNr1-1];
                                                         pRet->GenReturn ( RET_Value, aUId, String( aCell.getValueTypeName() ));
                                                     }
 											    }
                                                          ValueOK( aUId, MethodString( nMethodId ), nNr2, pTC->GetRowCount() ))
                                                     {
                                                         ::svt::table::PTableModel pModel = pTC->GetModel();
-                                                        Any aCell = pModel->getCellContent()[nNr1-1][nNr2-1];
+                                                        Any aCell = pModel->getCellContent()[nNr2-1][nNr1-1];
                                                         ::rtl::OUString aContent;
                                                         aCell >>= aContent;
                                                         pRet->GenReturn ( RET_Value, aUId, aContent );
                                                     aControler = pEBBox->Controller();
     											    pRet->GenReturn ( RET_Value, aUId, (comm_BOOL)aControler.Is() );
 											    }
-											    break;
+											    break;*/
 										    case M_Select :
 											    {
-                                                    if ( ValueOK(aUId, MethodString( nMethodId ),nNr1,pEBBox->GetRowCount() ) )
+    										        if ( ValueOK( aUId, MethodString( nMethodId ), nNr1, pTC->GetColumnCount() ) &&
+                                                         ValueOK( aUId, MethodString( nMethodId ), nNr2, pTC->GetRowCount() ))
                                                     {
-                                                        USHORT nColCount = pEBBox->GetColumnCount();
-                                                        comm_USHORT nUnfrozenColCount = 0;
-                                                        USHORT i;
-                                                        for ( i=0 ; i < nColCount ; i++ )
-                                                        {
-                                                            if ( !pEBBox->IsFrozen( pEBBox->GetColumnId( i ) ) )
-                                                                nUnfrozenColCount++;
-                                                        }
-                                                        if ( ValueOK(aUId, MethodString( nMethodId ),nNr2,nUnfrozenColCount ) )
-                                                            pEBBox->GoToRowColumnId( nNr1-1, pEBBox->GetColumnId( nNr2 ) );
+                                                        if ( pTC->GoTo( ::svt::table::ColPos( nNr1 ), ::svt::table::RowPos( nNr2 ) ) )
+                                                            pTC->Select();
+                                                        else
+                                                            ReportError( aUId, GEN_RES_STR2c2( S_METHOD_FAILED, MethodString( nMethodId ), "GoTo" ) );
                                                     }
 											    }
 											    break;
                                                 
                                                 
                                                 
-										    case M_GetSelCount :
+/*										    case M_GetSelCount :
 											    pRet->GenReturn ( RET_Value, aUId, comm_ULONG(((SvLBox*)pControl)->GetSelectionCount()));
 											    break;
 										    case M_GetSelIndex :
 											    }
 											    break;*/
                                         default:
-                                            ReportError( aUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "RoadMap" ) );
+                                            ReportError( aUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "TableControl" ) );
 											break;
 									    }
                                     }