date.cpp Corretta add_month per mesi maggiori di 12
mask.cpp Corretto ritorno da Winhelp mov.h Aggiunto #ifdef iniziale msksheet.cpp Corretta colorazione righe rmov.h Aggiunto #ifdef iniziale rmoviva.h Aggiunto #ifdef iniziale relapp.cpp Aggiunto messaggio di avvertimento in cancellazione rapida git-svn-id: svn://10.65.10.50/trunk@4753 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
105546cebf
commit
a2439c25b1
@ -372,24 +372,22 @@ long TDate::julian2date(long julian) const
|
|||||||
|
|
||||||
int TDate::day() const
|
int TDate::day() const
|
||||||
{
|
{
|
||||||
return (int) (_val % 100L);
|
return int(_val % 100L);
|
||||||
}
|
}
|
||||||
|
|
||||||
int TDate::month() const
|
int TDate::month() const
|
||||||
{
|
{
|
||||||
return (int) ((_val % 10000L) / 100L);
|
return int((_val % 10000L) / 100L);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int TDate::year() const
|
int TDate::year() const
|
||||||
|
|
||||||
{
|
{
|
||||||
return (int) (_val / 10000L);
|
return int(_val / 10000L);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int TDate::week() const
|
int TDate::week() const
|
||||||
|
|
||||||
{
|
{
|
||||||
TDate y(*this);
|
TDate y(*this);
|
||||||
y.set_day(1);
|
y.set_day(1);
|
||||||
@ -399,12 +397,11 @@ int TDate::week() const
|
|||||||
|
|
||||||
|
|
||||||
void TDate::addmonth(int nmonth)
|
void TDate::addmonth(int nmonth)
|
||||||
|
|
||||||
{
|
{
|
||||||
const int wday = day();
|
const int wday = day();
|
||||||
int wmonth = month() + nmonth, wyear = year();
|
int wyear = year();
|
||||||
|
int wmonth = month() + nmonth;
|
||||||
if (wmonth > 12)
|
while (wmonth > 12)
|
||||||
{
|
{
|
||||||
wmonth -= 12;
|
wmonth -= 12;
|
||||||
wyear++;
|
wyear++;
|
||||||
@ -412,13 +409,11 @@ void TDate::addmonth(int nmonth)
|
|||||||
_val = makedata(wday, wmonth, wyear);
|
_val = makedata(wday, wmonth, wyear);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TDate::addyear(int nyear)
|
void TDate::addyear(int nyear)
|
||||||
|
|
||||||
{
|
{
|
||||||
const int wday = day(), wmonth = month();
|
const int wday = day();
|
||||||
int wyear = year() + nyear;
|
const int wmonth = month();
|
||||||
|
const int wyear = year() + nyear;
|
||||||
_val = makedata(wday, wmonth, wyear);
|
_val = makedata(wday, wmonth, wyear);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -747,7 +747,6 @@ bool TMask::on_key(
|
|||||||
|
|
||||||
HWND hwnd = (HWND)xvt_vobj_get_attr(TASK_WIN, ATTR_NATIVE_WINDOW);
|
HWND hwnd = (HWND)xvt_vobj_get_attr(TASK_WIN, ATTR_NATIVE_WINDOW);
|
||||||
WinHelp(hwnd, hlp, HELP_MULTIKEY, (DWORD)&mk);
|
WinHelp(hwnd, hlp, HELP_MULTIKEY, (DWORD)&mk);
|
||||||
next_page(0);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _FLD_MOV_H
|
#ifndef __MOV_H
|
||||||
#define _FLD_MOV_H
|
#define __MOV_H
|
||||||
|
|
||||||
#define MOV_ANNOES "ANNOES"
|
#define MOV_ANNOES "ANNOES"
|
||||||
#define MOV_ANNOIVA "ANNOIVA"
|
#define MOV_ANNOIVA "ANNOIVA"
|
||||||
|
@ -10,8 +10,11 @@ extern "C"
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <controls.h>
|
#include <controls.h>
|
||||||
#include <msksheet.h>
|
#include <msksheet.h>
|
||||||
|
#include <recarray.h>
|
||||||
|
#include <relation.h>
|
||||||
#include <urldefid.h>
|
#include <urldefid.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TSpreadsheet
|
// TSpreadsheet
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -1700,9 +1703,13 @@ void TSpreadsheet::set_back_and_fore_color(COLOR back, COLOR fore, int row)
|
|||||||
{
|
{
|
||||||
if (back != COLOR_INVALID || fore != COLOR_INVALID)
|
if (back != COLOR_INVALID || fore != COLOR_INVALID)
|
||||||
{
|
{
|
||||||
int first = 0;
|
int first, last;
|
||||||
int last = items()-1;
|
if (row < 0)
|
||||||
if (row > 0)
|
{
|
||||||
|
first = 0;
|
||||||
|
last = items()-1;
|
||||||
|
}
|
||||||
|
else
|
||||||
first = last = row;
|
first = last = row;
|
||||||
|
|
||||||
const bool crea = back != NORMAL_BACK_COLOR || fore != NORMAL_COLOR;
|
const bool crea = back != NORMAL_BACK_COLOR || fore != NORMAL_COLOR;
|
||||||
@ -1730,13 +1737,13 @@ void TSpreadsheet::get_back_and_fore_color(COLOR& back, COLOR& fore, int row)
|
|||||||
if (prop->_fore != NORMAL_COLOR)
|
if (prop->_fore != NORMAL_COLOR)
|
||||||
fore = prop->_fore;
|
fore = prop->_fore;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
back = NORMAL_BACK_COLOR;
|
back = NORMAL_BACK_COLOR;
|
||||||
fore = NORMAL_COLOR;
|
fore = NORMAL_COLOR;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
// @doc INTERNAL
|
// @doc INTERNAL
|
||||||
|
@ -1,20 +1,21 @@
|
|||||||
#ifndef __MSKSHEET_H
|
#ifndef __MSKSHEET_H
|
||||||
#define __MSKSHEET_H
|
#define __MSKSHEET_H
|
||||||
|
|
||||||
|
#ifndef __ISAM_H
|
||||||
|
class TLocalisamfile;
|
||||||
|
class TRectype;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __MASK_H
|
#ifndef __MASK_H
|
||||||
#include <mask.h>
|
#include <mask.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __ISAM_H
|
|
||||||
#include <isam.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __RECARRAY_H
|
#ifndef __RECARRAY_H
|
||||||
#include <recarray.h>
|
class TRecord_array;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __RELATION_H
|
#ifndef __RELATION_H
|
||||||
#include <relation.h>
|
class TRelation;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define FIRST_FIELD 101
|
#define FIRST_FIELD 101
|
||||||
@ -57,7 +58,7 @@ class TSheet_field : public TLoadable_field
|
|||||||
// @cmember:(INTERNAL) file delle righe
|
// @cmember:(INTERNAL) file delle righe
|
||||||
TLocalisamfile * _sheetfile;
|
TLocalisamfile * _sheetfile;
|
||||||
// @cmember:(INTERNAL) record array delle righe
|
// @cmember:(INTERNAL) record array delle righe
|
||||||
TRecord_array *_linee_rec;
|
TRecord_array* _linee_rec;
|
||||||
// @cmember:(INTERNAL) indicatore di record array gestito esternamente
|
// @cmember:(INTERNAL) indicatore di record array gestito esternamente
|
||||||
bool _external_record;
|
bool _external_record;
|
||||||
// @cmember:(INTERNAL) funzioni utente per get tra record (array) e array righe
|
// @cmember:(INTERNAL) funzioni utente per get tra record (array) e array righe
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
#ifndef __PAGSCA_H
|
||||||
|
#define __PAGSCA_H
|
||||||
|
|
||||||
#define PAGSCA_ANNO "ANNO"
|
#define PAGSCA_ANNO "ANNO"
|
||||||
#define PAGSCA_NRIGA "NRIGA"
|
#define PAGSCA_NRIGA "NRIGA"
|
||||||
#define PAGSCA_NRATA "NRATA"
|
#define PAGSCA_NRATA "NRATA"
|
||||||
@ -28,3 +31,4 @@
|
|||||||
#define PAGSCA_CONTOC "CONTOC"
|
#define PAGSCA_CONTOC "CONTOC"
|
||||||
#define PAGSCA_SOTTOCONTC "SOTTOCONTC"
|
#define PAGSCA_SOTTOCONTC "SOTTOCONTC"
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include <sheet.h>
|
#include <sheet.h>
|
||||||
#include <msksheet.h>
|
#include <msksheet.h>
|
||||||
#include <urldefid.h>
|
#include <urldefid.h>
|
||||||
|
#include <recarray.h>
|
||||||
#include <relapp.h>
|
#include <relapp.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
|
|
||||||
@ -465,6 +466,7 @@ int TRelation_application::delete_mode()
|
|||||||
if (yesno_box(msg))
|
if (yesno_box(msg))
|
||||||
{
|
{
|
||||||
TWait_cursor hourglass;
|
TWait_cursor hourglass;
|
||||||
|
long skipped = 0; // Record non cancellati perche' protetti
|
||||||
cur->freeze(TRUE); // Congelo il cursore altrimenti si riaggiorna troppo
|
cur->freeze(TRUE); // Congelo il cursore altrimenti si riaggiorna troppo
|
||||||
for (long pos = 0; deleting > 0; pos++)
|
for (long pos = 0; deleting > 0; pos++)
|
||||||
{
|
{
|
||||||
@ -475,17 +477,20 @@ int TRelation_application::delete_mode()
|
|||||||
if (find(1) && modify_mode())
|
if (find(1) && modify_mode())
|
||||||
{
|
{
|
||||||
_autodelete = 0x3;
|
_autodelete = 0x3;
|
||||||
if (protected_record(get_relation()->curr()))
|
bool can_delete = !protected_record(get_relation()->curr());
|
||||||
warning_box("Documento non eliminabile");
|
|
||||||
else
|
|
||||||
remove();
|
|
||||||
_autodelete = FALSE;
|
_autodelete = FALSE;
|
||||||
|
if (can_delete)
|
||||||
|
remove();
|
||||||
|
else
|
||||||
|
skipped++;
|
||||||
query_mode();
|
query_mode();
|
||||||
}
|
}
|
||||||
deleting--;
|
deleting--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cur->freeze(FALSE);
|
cur->freeze(FALSE);
|
||||||
|
if (skipped > 0)
|
||||||
|
warning_box("%ld documenti non sono stati cancellati in quanto protetti.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _FLD_RMOV_H
|
#ifndef __RMOV_H
|
||||||
#define _FLD_RMOV_H
|
#define __RMOV_H
|
||||||
|
|
||||||
#define RMV_ANNOES "ANNOES"
|
#define RMV_ANNOES "ANNOES"
|
||||||
#define RMV_NUMREG "NUMREG"
|
#define RMV_NUMREG "NUMREG"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _FLD_RMOVIVA_H
|
#ifndef __RMOVIVA_H
|
||||||
#define _FLD_RMOVIVA_H
|
#define __RMOVIVA_H
|
||||||
|
|
||||||
#define RMI_ANNOES "ANNOES"
|
#define RMI_ANNOES "ANNOES"
|
||||||
#define RMI_NUMREG "NUMREG"
|
#define RMI_NUMREG "NUMREG"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user