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
|
||||
{
|
||||
return (int) (_val % 100L);
|
||||
return int(_val % 100L);
|
||||
}
|
||||
|
||||
int TDate::month() const
|
||||
{
|
||||
return (int) ((_val % 10000L) / 100L);
|
||||
return int((_val % 10000L) / 100L);
|
||||
}
|
||||
|
||||
|
||||
int TDate::year() const
|
||||
|
||||
{
|
||||
return (int) (_val / 10000L);
|
||||
return int(_val / 10000L);
|
||||
}
|
||||
|
||||
|
||||
int TDate::week() const
|
||||
|
||||
{
|
||||
TDate y(*this);
|
||||
y.set_day(1);
|
||||
@ -399,12 +397,11 @@ int TDate::week() const
|
||||
|
||||
|
||||
void TDate::addmonth(int nmonth)
|
||||
|
||||
{
|
||||
const int wday = day();
|
||||
int wmonth = month() + nmonth, wyear = year();
|
||||
|
||||
if (wmonth > 12)
|
||||
int wyear = year();
|
||||
int wmonth = month() + nmonth;
|
||||
while (wmonth > 12)
|
||||
{
|
||||
wmonth -= 12;
|
||||
wyear++;
|
||||
@ -412,13 +409,11 @@ void TDate::addmonth(int nmonth)
|
||||
_val = makedata(wday, wmonth, wyear);
|
||||
}
|
||||
|
||||
|
||||
void TDate::addyear(int nyear)
|
||||
|
||||
{
|
||||
const int wday = day(), wmonth = month();
|
||||
int wyear = year() + nyear;
|
||||
|
||||
const int wday = day();
|
||||
const int wmonth = month();
|
||||
const int wyear = year() + nyear;
|
||||
_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);
|
||||
WinHelp(hwnd, hlp, HELP_MULTIKEY, (DWORD)&mk);
|
||||
next_page(0);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _FLD_MOV_H
|
||||
#define _FLD_MOV_H
|
||||
#ifndef __MOV_H
|
||||
#define __MOV_H
|
||||
|
||||
#define MOV_ANNOES "ANNOES"
|
||||
#define MOV_ANNOIVA "ANNOIVA"
|
||||
|
@ -10,8 +10,11 @@ extern "C"
|
||||
#include <config.h>
|
||||
#include <controls.h>
|
||||
#include <msksheet.h>
|
||||
#include <recarray.h>
|
||||
#include <relation.h>
|
||||
#include <urldefid.h>
|
||||
#include <utility.h>
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// 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)
|
||||
{
|
||||
int first = 0;
|
||||
int last = items()-1;
|
||||
if (row > 0)
|
||||
int first, last;
|
||||
if (row < 0)
|
||||
{
|
||||
first = 0;
|
||||
last = items()-1;
|
||||
}
|
||||
else
|
||||
first = last = row;
|
||||
|
||||
const bool crea = back != NORMAL_BACK_COLOR || fore != NORMAL_COLOR;
|
||||
|
@ -1,20 +1,21 @@
|
||||
#ifndef __MSKSHEET_H
|
||||
#define __MSKSHEET_H
|
||||
|
||||
#ifndef __ISAM_H
|
||||
class TLocalisamfile;
|
||||
class TRectype;
|
||||
#endif
|
||||
|
||||
#ifndef __MASK_H
|
||||
#include <mask.h>
|
||||
#endif
|
||||
|
||||
#ifndef __ISAM_H
|
||||
#include <isam.h>
|
||||
#endif
|
||||
|
||||
#ifndef __RECARRAY_H
|
||||
#include <recarray.h>
|
||||
class TRecord_array;
|
||||
#endif
|
||||
|
||||
#ifndef __RELATION_H
|
||||
#include <relation.h>
|
||||
class TRelation;
|
||||
#endif
|
||||
|
||||
#define FIRST_FIELD 101
|
||||
|
@ -1,3 +1,6 @@
|
||||
#ifndef __PAGSCA_H
|
||||
#define __PAGSCA_H
|
||||
|
||||
#define PAGSCA_ANNO "ANNO"
|
||||
#define PAGSCA_NRIGA "NRIGA"
|
||||
#define PAGSCA_NRATA "NRATA"
|
||||
@ -28,3 +31,4 @@
|
||||
#define PAGSCA_CONTOC "CONTOC"
|
||||
#define PAGSCA_SOTTOCONTC "SOTTOCONTC"
|
||||
|
||||
#endif
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <sheet.h>
|
||||
#include <msksheet.h>
|
||||
#include <urldefid.h>
|
||||
#include <recarray.h>
|
||||
#include <relapp.h>
|
||||
#include <utility.h>
|
||||
|
||||
@ -465,6 +466,7 @@ int TRelation_application::delete_mode()
|
||||
if (yesno_box(msg))
|
||||
{
|
||||
TWait_cursor hourglass;
|
||||
long skipped = 0; // Record non cancellati perche' protetti
|
||||
cur->freeze(TRUE); // Congelo il cursore altrimenti si riaggiorna troppo
|
||||
for (long pos = 0; deleting > 0; pos++)
|
||||
{
|
||||
@ -475,17 +477,20 @@ int TRelation_application::delete_mode()
|
||||
if (find(1) && modify_mode())
|
||||
{
|
||||
_autodelete = 0x3;
|
||||
if (protected_record(get_relation()->curr()))
|
||||
warning_box("Documento non eliminabile");
|
||||
else
|
||||
remove();
|
||||
bool can_delete = !protected_record(get_relation()->curr());
|
||||
_autodelete = FALSE;
|
||||
if (can_delete)
|
||||
remove();
|
||||
else
|
||||
skipped++;
|
||||
query_mode();
|
||||
}
|
||||
deleting--;
|
||||
}
|
||||
}
|
||||
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
|
||||
#define _FLD_RMOV_H
|
||||
#ifndef __RMOV_H
|
||||
#define __RMOV_H
|
||||
|
||||
#define RMV_ANNOES "ANNOES"
|
||||
#define RMV_NUMREG "NUMREG"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _FLD_RMOVIVA_H
|
||||
#define _FLD_RMOVIVA_H
|
||||
#ifndef __RMOVIVA_H
|
||||
#define __RMOVIVA_H
|
||||
|
||||
#define RMI_ANNOES "ANNOES"
|
||||
#define RMI_NUMREG "NUMREG"
|
||||
|
Loading…
x
Reference in New Issue
Block a user