model_server/gala/src/SpreadSheet.cxx
//Restore the row contents from clipboard
Restore the row contents from clipboard
Restore the row contents from clipboard
void  SetFromClipBoard(gdSpreadSheet *gdlist, int row)
{
     int i, j;
     vstr  *str;
	 int col =gdlist->GetList()->GetColumnCount();
     if (col == 6) {
	if (PatternClipBoard_num == 0)  return;
        gdlist->GetList()->InsertRange(row, PatternClipBoard_num, vlistROW);
        for(i = 0; i < PatternClipBoard_num; i++) {
           j = 1;
           char ss[100];
           if (p_clipboard[i].criteria == -1)
              strcpy(ss, "");
           else
              strcpy(ss, (p_clipboard[i].criteria == 1? "Include":"Exclude"));
           str = vstrCloneScribed (vcharScribeLiteral(ss));
           gdlist->GetList()->SetCellValue(row, j++, str);
           strcpy(ss, p_clipboard[i].basestring);
           str = vstrCloneScribed (vcharScribeLiteral(ss));
           gdlist->GetList()->SetCellValue(row, j++, str);
           if (p_clipboard[i].sensitive == -1)
              strcpy(ss, "");
           else
              strcpy(ss, (p_clipboard[i].sensitive == 1? "Yes":"No"));
           str = vstrCloneScribed (vcharScribeLiteral(ss));
           gdlist->GetList()->SetCellValue(row, j++, str);
           if (p_clipboard[i].entities == -1)
              strcpy(ss, "");
           else
              strcpy(ss, (p_clipboard[i].entities == 1? "Yes":"No"));
           str = vstrCloneScribed (vcharScribeLiteral(ss));
           gdlist->GetList()->SetCellValue(row, j++, str);
           if (p_clipboard[i].strings == -1)
              strcpy(ss, "");
           else
              strcpy(ss, (p_clipboard[i].strings == 1? "Yes":"No"));
           str = vstrCloneScribed (vcharScribeLiteral(ss));
           gdlist->GetList()->SetCellValue(row, j++, str);
           gdlist->SetRowHeight(row, 20);
           row++;
        }
     } else if (col == 4) {
	if (TypeClipBoard_num == 0)  return;
        gdlist->GetList()->InsertRange(row, TypeClipBoard_num, vlistROW);
        for(i = 0; i < TypeClipBoard_num; i++) {
           j = 1;
           char ss[100];
           if (t_clipboard[i].criteria == -1)
              strcpy(ss, "");
           else
              strcpy(ss, (t_clipboard[i].criteria == 1? "Include":"Exclude"));
           str = vstrCloneScribed (vcharScribeLiteral(ss));
           gdlist->GetList()->SetCellValue(row, j++, str);
           strcpy(ss, t_clipboard[i].type);
           str = vstrCloneScribed (vcharScribeLiteral(ss));
           gdlist->GetList()->SetCellValue(row, j++, str);
           strcpy(ss, t_clipboard[i].size);
           str = vstrCloneScribed (vcharScribeLiteral(ss));
           gdlist->GetList()->SetCellValue(row, j++, str);
           gdlist->SetRowHeight(row, 20);
           row++;
        }
     }
}
void SetFromClipBoard ( gdSpreadSheet * gdlist , int row ) { int i , j ; vstr * str ; int col = gdlist -> GetList ( ) -> GetColumnCount ( ) ; if ( col == 6 ) { if ( PatternClipBoard_num == 0 ) return ; gdlist -> GetList ( ) -> InsertRange ( row , PatternClipBoard_num , vlistROW ) ; for ( i = 0 ; i < PatternClipBoard_num ; i ++ ) { j = 1 ; char ss [ 100 ] ; if ( p_clipboard [ i ] . criteria == -1 ) strcpy ( ss , " " ) ; else strcpy ( ss , ( p_clipboard [ i ] . criteria == 1 ? " " : " " ) ) ; str = vstrCloneScribed ( vcharScribeLiteral ( ss ) ) ; gdlist -> GetList ( ) -> SetCellValue ( row , j ++ , str ) ; strcpy ( ss , p_clipboard [ i ] . basestring ) ; str = vstrCloneScribed ( vcharScribeLiteral ( ss ) ) ; gdlist -> GetList ( ) -> SetCellValue ( row , j ++ , str ) ; if ( p_clipboard [ i ] . sensitive == -1 ) strcpy ( ss , " " ) ; else strcpy ( ss , ( p_clipboard [ i ] . sensitive == 1 ? " " : " " ) ) ; str = vstrCloneScribed ( vcharScribeLiteral ( ss ) ) ; gdlist -> GetList ( ) -> SetCellValue ( row , j ++ , str ) ; if ( p_clipboard [ i ] . entities == -1 ) strcpy ( ss , " " ) ; else strcpy ( ss , ( p_clipboard [ i ] . entities == 1 ? " " : " " ) ) ; str = vstrCloneScribed ( vcharScribeLiteral ( ss ) ) ; gdlist -> GetList ( ) -> SetCellValue ( row , j ++ , str ) ; if ( p_clipboard [ i ] . strings == -1 ) strcpy ( ss , " " ) ; else strcpy ( ss , ( p_clipboard [ i ] . strings == 1 ? " " : " " ) ) ; str = vstrCloneScribed ( vcharScribeLiteral ( ss ) ) ; gdlist -> GetList ( ) -> SetCellValue ( row , j ++ , str ) ; gdlist -> SetRowHeight ( row , 20 ) ; row ++ ; } } else if ( col == 4 ) { if ( TypeClipBoard_num == 0 ) return ; gdlist -> GetList ( ) -> InsertRange ( row , TypeClipBoard_num , vlistROW ) ; for ( i = 0 ; i < TypeClipBoard_num ; i ++ ) { j = 1 ; char ss [ 100 ] ; if ( t_clipboard [ i ] . criteria == -1 ) strcpy ( ss , " " ) ; else strcpy ( ss , ( t_clipboard [ i ] . criteria == 1 ? " " : " " ) ) ; str = vstrCloneScribed ( vcharScribeLiteral ( ss ) ) ; gdlist -> GetList ( ) -> SetCellValue ( row , j ++ , str ) ; strcpy ( ss , t_clipboard [ i ] . type ) ; str = vstrCloneScribed ( vcharScribeLiteral ( ss ) ) ; gdlist -> GetList ( ) -> SetCellValue ( row , j ++ , str ) ; strcpy ( ss , t_clipboard [ i ] . size ) ; str = vstrCloneScribed ( vcharScribeLiteral ( ss ) ) ; gdlist -> GetList ( ) -> SetCellValue ( row , j ++ , str ) ; gdlist -> SetRowHeight ( row , 20 ) ; row ++ ; } } }
Restore the row contents from clipboard
Restore the row contents from clipboard