Patch level : 2.2 102

Files correlati     : tutti tranne uno
Ricompilazione Demo : [ ]
Commento            :


git-svn-id: svn://10.65.10.50/trunk@13107 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2005-05-17 15:37:43 +00:00
parent 067a06ac9f
commit 06255d7594
8 changed files with 38 additions and 28 deletions

View File

@ -54,7 +54,10 @@ public:
// @cmember Ritorna un puntatore all'oggetto che precede l'oggetto corrente
virtual TObject* pred_item( ) pure;
// @cmember Ritorna il numero di oggetti nel contenitore
virtual long objects( ) pure;
virtual long objects( ) const pure;
// @cmember Ritorna true se il contenitore e' vuoto
virtual bool empty() const
{ return objects( ) == 0; }
// @cmember Cerca il successivo elemento che soddisfa la <t OPERATION_FUNCTION>
virtual void for_each( OPERATION_FUNCTION );
@ -139,11 +142,11 @@ public:
int size() const
{ return _size; }
// @cmember Ritorna numero di oggetti nell'array
virtual long objects( )
virtual long objects( ) const
{ return _items; }
// @cmember Ritorna numero di oggetti nell'array
virtual int items( ) const
virtual int items() const
{ return _items; }
// @cmember Ritorna il primo elemento dell'array

View File

@ -92,7 +92,7 @@ public:
THash_object* random_hash_object();
// @cmember Ritorna il numero di elementi presenti come long
virtual long objects() { return _cnt; }
virtual long objects() const { return _cnt; }
// @cmember Ritorna il numero di elementi presenti
int items() const { return _cnt; }

View File

@ -822,9 +822,9 @@ bool TMAPI_session::load_mapi()
if(!MAPI_installed)
return error_box("MAPI non attivato nel file win.ini");
UINT fuError = SetErrorMode(SEM_NOOPENFILEERRORBOX);
_hlibMAPI = LoadLibrary(szMAPIDLL);
SetErrorMode(fuError);
UINT fuError = ::SetErrorMode(SEM_NOOPENFILEERRORBOX);
_hlibMAPI = ::LoadLibrary(szMAPIDLL);
::SetErrorMode(fuError);
if (_hlibMAPI < (HINSTANCE)HINSTANCE_ERROR)
{
@ -853,7 +853,7 @@ void TMAPI_session::unload_mapi()
{
if (_hlibMAPI)
{
FreeLibrary(_hlibMAPI);
::FreeLibrary(_hlibMAPI);
_hlibMAPI = NULL;
}
}
@ -863,6 +863,9 @@ bool TMAPI_session::open()
if (_hSession == NULL)
{
TWait_cursor hourglass;
DIRECTORY dir; xvt_fsys_get_dir(&dir); // Salva dir corrente che verra' cambiata da Outlook
if (!load_mapi())
return error_box("Impossibile inizializzare MAPI");
@ -873,6 +876,8 @@ bool TMAPI_session::open()
return error_box("Impossibile collegarsi a MAPI: %lu", err);
_hWnd = xvt_vobj_get_attr(cur_win(), ATTR_NATIVE_WINDOW);
xvt_fsys_set_dir(&dir); // Ripristina dir corrente
}
return TRUE;
}
@ -892,14 +897,14 @@ void TMAPI_session::close()
bool TMAPI_session::send(MapiMessage& msg, FLAGS flags)
{
bool ok = FALSE;
bool ok = false;
if (open())
{
LONG err = lpfnMAPISendMail(_hSession, _hWnd, &msg, flags, 0L);
if (err == SUCCESS_SUCCESS)
ok = TRUE;
ok = true;
else
error_box("Can't send mail message: %ld", err);
ok = error_box("Can't send mail message: %ld", err);
}
return ok;
}

View File

@ -84,7 +84,7 @@ void TMultiple_rectype::load_rows_file(int logicnum)
if (r == NULL)
{
// crea
r = new TRecord_array(logicnum, (TString &) _numfields[index]);
r = new TRecord_array(logicnum, _numfields.row(index));
_files.add(r, index);
}
TRectype* rec = new_body_record(logicnum);

View File

@ -1,11 +1,7 @@
#include <config.h>
#include <expr.h>
#include <golem.h>
#include <postman.h>
#include <prefix.h>
#include <recarray.h>
#include <relapp.h>
#include <scanner.h>
///////////////////////////////////////////////////////////
// TRecipient

View File

@ -331,8 +331,8 @@ public:
TObject* last_item( )
{ operator =( items( ) -1 ); return &curr( ); }
// @cmember Ritorna il numero di oggetti del cursor
long objects( )
{ return items( ); }
long objects( ) const
{ return ((TCursor*)this)->items( ); }
// @cmember Ritorna la posizione corrente
TRecnotype& pos()

View File

@ -1,5 +1,4 @@
#include <ctype.h>
#include <stdlib.h>
#include <xvt.h>
#include <scanner.h>
@ -19,7 +18,19 @@ TScanner::TScanner(const char* filename)
open(filename, ios::in);
#endif
if (fail())
fatal_box("Impossibile leggere il file '%s'", filename);
{
DIRECTORY dir; xvt_fsys_get_dir(&dir);
TFilename curdir; xvt_fsys_convert_dir_to_str(&dir, curdir.get_buffer(), curdir.size());
TString msg;
msg << "Impossibile leggere il file '" << filename << "'\n"
<< "Directory corrente '" << curdir << "'\n";
if (xvt_fsys_file_exists(filename))
msg << "Il file esite ma NON e' leggibile!";
else
msg << "Il file NON esite!";
fatal_box(msg);
}
}
TScanner::~TScanner()

View File

@ -236,8 +236,7 @@ bool TTree::has_son() const
bool TTree::expanded() const
{
TString str;
curr_id(str);
TString str; curr_id(str);
bool yes = _expanded.is_key(str);
return yes;
}
@ -257,8 +256,7 @@ bool TTree::expand()
bool TTree::shrink()
{
TString str;
curr_id(str);
TString str; curr_id(str);
bool ok = _expanded.is_key(str);
if (ok)
_expanded.remove(str);
@ -279,7 +277,6 @@ bool TTree::shrink_all()
return goto_root();
}
TImage* TTree::get_res_image(short bmp_id) const
{
TImage* bmp = (TImage*)_image.objptr(bmp_id);
@ -860,8 +857,6 @@ public:
void set_header(const char* head);
void set_row_height(int rh);
TTree_window(int x, int y, int dx, int dy,
WINDOW parent, TTree_field* owner);
virtual ~TTree_window() { }