By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 782
Collapse All | Expand All

(-)koffice/chalk/colorspaces/wetsticky/kis_wet_sticky_colorspace.cc (-3 / +3 lines)
Lines 48-54 Link Here
48
    HUE_CHANNEL_INDEX,
48
    HUE_CHANNEL_INDEX,
49
    SATURATION_CHANNEL_INDEX,
49
    SATURATION_CHANNEL_INDEX,
50
    LIGHTNESS_CHANNEL_INDEX,
50
    LIGHTNESS_CHANNEL_INDEX,
51
    LITQUID_CONTENT_CHANNEL_INDEX,
51
    LIQUID_CONTENT_CHANNEL_INDEX,
52
    DRYING_RATE_CHANNEL_INDEX,
52
    DRYING_RATE_CHANNEL_INDEX,
53
    MISCIBILITY_CHANNEL_INDEX,
53
    MISCIBILITY_CHANNEL_INDEX,
54
    GRAVITATIONAL_DIRECTION_INDEX,
54
    GRAVITATIONAL_DIRECTION_INDEX,
Lines 513-519 Link Here
513
        return TQString().setNum(pixel -> saturation);
513
        return TQString().setNum(pixel -> saturation);
514
    case LIGHTNESS_CHANNEL_INDEX:
514
    case LIGHTNESS_CHANNEL_INDEX:
515
        return TQString().setNum(pixel -> lightness);
515
        return TQString().setNum(pixel -> lightness);
516
    case LITQUID_CONTENT_CHANNEL_INDEX:
516
    case LIQUID_CONTENT_CHANNEL_INDEX:
517
        return TQString().setNum(pixel -> liquid_content);
517
        return TQString().setNum(pixel -> liquid_content);
518
    case DRYING_RATE_CHANNEL_INDEX:
518
    case DRYING_RATE_CHANNEL_INDEX:
519
        return TQString().setNum(pixel -> drying_rate);
519
        return TQString().setNum(pixel -> drying_rate);
Lines 569-575 Link Here
569
        return TQString().setNum(pixel -> saturation);
569
        return TQString().setNum(pixel -> saturation);
570
    case LIGHTNESS_CHANNEL_INDEX:
570
    case LIGHTNESS_CHANNEL_INDEX:
571
        return TQString().setNum(pixel -> lightness);
571
        return TQString().setNum(pixel -> lightness);
572
    case LITQUID_CONTENT_CHANNEL_INDEX:
572
    case LIQUID_CONTENT_CHANNEL_INDEX:
573
        return TQString().setNum(static_cast<float>(pixel -> liquid_content) / UINT8_MAX);
573
        return TQString().setNum(static_cast<float>(pixel -> liquid_content) / UINT8_MAX);
574
    case DRYING_RATE_CHANNEL_INDEX:
574
    case DRYING_RATE_CHANNEL_INDEX:
575
        return TQString().setNum(static_cast<float>(pixel -> drying_rate) / UINT8_MAX);
575
        return TQString().setNum(static_cast<float>(pixel -> drying_rate) / UINT8_MAX);
(-)koffice/chalk/core/tiles/kis_tileddatamanager.cc (-1 / +1 lines)
Lines 837-843 Link Here
837
{
837
{
838
    // Ahem, this is a bit not as good. The point is, this function needs the tile data,
838
    // Ahem, this is a bit not as good. The point is, this function needs the tile data,
839
    // but it might be swapped out. This code swaps it in, but at function exit it might
839
    // but it might be swapped out. This code swaps it in, but at function exit it might
840
    // be swapped out again! THIS MAKES THE RETURNED POINTER TQUITE VOLATILE
840
    // be swapped out again! THIS MAKES THE RETURNED POINTER QUITE VOLATILE
841
    return pixelPtrSafe(x, y, writable) -> data();
841
    return pixelPtrSafe(x, y, writable) -> data();
842
}
842
}
843
843
(-)koffice/chalk/ui/squeezedcombobox.h (-3 / +3 lines)
Lines 20-27 Link Here
20
20
21
/** @file squeezedcombobox.h */
21
/** @file squeezedcombobox.h */
22
22
23
#ifndef STQUEEZEDCOMBOBOX_H
23
#ifndef SQUEEZEDCOMBOBOX_H
24
#define STQUEEZEDCOMBOBOX_H
24
#define SQUEEZEDCOMBOBOX_H
25
25
26
class TQTimer;
26
class TQTimer;
27
27
Lines 134-137 Link Here
134
    SqueezedComboBoxTip*      m_tooltip;
134
    SqueezedComboBoxTip*      m_tooltip;
135
};
135
};
136
136
137
#endif // STQUEEZEDCOMBOBOX_H
137
#endif // SQUEEZEDCOMBOBOX_H
(-)koffice/filters/karbon/msod/msod.cc (-1 / +1 lines)
Lines 77-83 Link Here
77
        "SEAL",                     // Seal
77
        "SEAL",                     // Seal
78
        "ARC",                      // Arc
78
        "ARC",                      // Arc
79
        "LINE",                     // Line
79
        "LINE",                     // Line
80
        "PLATQUE",                   // Plaque
80
        "PLAQUE",                   // Plaque
81
        "CAN",                      // Can
81
        "CAN",                      // Can
82
        "DONUT",                    // Donut
82
        "DONUT",                    // Donut
83
        "TEXTSIMPLE",               // Textsimple
83
        "TEXTSIMPLE",               // Textsimple
(-)koffice/filters/kpresenter/ooimpress/ooimpressexport.cc (-1 / +1 lines)
Lines 725-731 Link Here
725
        case 12: // polyline
725
        case 12: // polyline
726
            appendPolyline( doccontent, o, drawPage );
726
            appendPolyline( doccontent, o, drawPage );
727
            break;
727
            break;
728
        case 13: //OT_TQUADRICBEZIERCURVE = 13
728
        case 13: //OT_QUADRICBEZIERCURVE = 13
729
        case 14: //OT_CUBICBEZIERCURVE = 14
729
        case 14: //OT_CUBICBEZIERCURVE = 14
730
            //todo
730
            //todo
731
            // "draw:path"
731
            // "draw:path"
(-)koffice/filters/kspread/csv/csvdialog.cpp (-9 / +9 lines)
Lines 159-165 Link Here
159
{
159
{
160
    int row, column;
160
    int row, column;
161
    bool lastCharDelimiter = false;
161
    bool lastCharDelimiter = false;
162
    enum { S_START, S_TQUOTED_FIELD, S_MAYBE_END_OF_TQUOTED_FIELD, S_END_OF_TQUOTED_FIELD,
162
    enum { S_START, S_QUOTED_FIELD, S_MAYBE_END_OF_QUOTED_FIELD, S_END_OF_QUOTED_FIELD,
163
           S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START;
163
           S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START;
164
164
165
    TQChar x;
165
    TQChar x;
Lines 214-220 Link Here
214
         case S_START :
214
         case S_START :
215
            if (x == m_textquote)
215
            if (x == m_textquote)
216
            {
216
            {
217
                state = S_TQUOTED_FIELD;
217
                state = S_QUOTED_FIELD;
218
            }
218
            }
219
            else if (x == m_delimiter)
219
            else if (x == m_delimiter)
220
            {
220
            {
Lines 235-255 Link Here
235
                state = S_MAYBE_NORMAL_FIELD;
235
                state = S_MAYBE_NORMAL_FIELD;
236
            }
236
            }
237
            break;
237
            break;
238
         case S_TQUOTED_FIELD :
238
         case S_QUOTED_FIELD :
239
            if (x == m_textquote)
239
            if (x == m_textquote)
240
            {
240
            {
241
                state = S_MAYBE_END_OF_TQUOTED_FIELD;
241
                state = S_MAYBE_END_OF_QUOTED_FIELD;
242
            }
242
            }
243
            else
243
            else
244
            {
244
            {
245
                field += x;
245
                field += x;
246
            }
246
            }
247
            break;
247
            break;
248
         case S_MAYBE_END_OF_TQUOTED_FIELD :
248
         case S_MAYBE_END_OF_QUOTED_FIELD :
249
            if (x == m_textquote)
249
            if (x == m_textquote)
250
            {
250
            {
251
                field += x;
251
                field += x;
252
                state = S_TQUOTED_FIELD;
252
                state = S_QUOTED_FIELD;
253
            }
253
            }
254
            else if (x == m_delimiter || x == '\n')
254
            else if (x == m_delimiter || x == '\n')
255
            {
255
            {
Lines 272-281 Link Here
272
            }
272
            }
273
            else
273
            else
274
            {
274
            {
275
                state = S_END_OF_TQUOTED_FIELD;
275
                state = S_END_OF_QUOTED_FIELD;
276
            }
276
            }
277
            break;
277
            break;
278
         case S_END_OF_TQUOTED_FIELD :
278
         case S_END_OF_QUOTED_FIELD :
279
            if (x == m_delimiter || x == '\n')
279
            if (x == m_delimiter || x == '\n')
280
            {
280
            {
281
                setText(row - m_startRow, column - m_startCol, field);
281
                setText(row - m_startRow, column - m_startCol, field);
Lines 300-306 Link Here
300
            if (x == m_textquote)
300
            if (x == m_textquote)
301
            {
301
            {
302
                field = TQString();
302
                field = TQString();
303
                state = S_TQUOTED_FIELD;
303
                state = S_QUOTED_FIELD;
304
                break;
304
                break;
305
            }
305
            }
306
         case S_NORMAL_FIELD :
306
         case S_NORMAL_FIELD :
(-)koffice/filters/kspread/csv/status.html (-2 / +2 lines)
Lines 98-108 Link Here
98
            /--\            
98
            /--\            
99
            |  |           
99
            |  |           
100
            |  v    &quot;     
100
            |  v    &quot;     
101
       /--[START]-------->[TQUOTED_FIELD] (**) 
101
       /--[START]-------->[QUOTED_FIELD] (**) 
102
  other|   ^   ^            |        ^ 
102
  other|   ^   ^            |        ^ 
103
   (*) |   |   | DEL or     | &quot;      | &quot; (*) 
103
   (*) |   |   | DEL or     | &quot;      | &quot; (*) 
104
       |   |   | EOL        v        |           other 
104
       |   |   | EOL        v        |           other 
105
       |   |   \----[MAYBE_END_OF_TQUOTED_FIELD]--------> Error 
105
       |   |   \----[MAYBE_END_OF_QUOTED_FIELD]--------> Error 
106
       |   |
106
       |   |
107
       |   | DEL or
107
       |   | DEL or
108
       |   | EOL
108
       |   | EOL
(-)koffice/filters/kword/mswrite/structures_generated.h (-1 / +1 lines)
Lines 70-76 Link Here
70
	// 
70
	// 
71
	// 	Structure Fields:
71
	// 	Structure Fields:
72
	// 
72
	// 
73
	// 		name #RETQUIRED
73
	// 		name #REQUIRED
74
	// 		type #IMPLIED "Word"
74
	// 		type #IMPLIED "Word"
75
	// 		default #IMPLIED ""
75
	// 		default #IMPLIED ""
76
	// 		description #IMPLIED ""	(also valid for Structures)
76
	// 		description #IMPLIED ""	(also valid for Structures)
(-)koffice/filters/kword/pdf/xpdf/xpdf/XPDFTree.cc (-1 / +1 lines)
Lines 142-148 Link Here
142
    XtNumber(actions),				// num_actions
142
    XtNumber(actions),				// num_actions
143
    resources,					// resources
143
    resources,					// resources
144
    XtNumber(resources),			// num_resources
144
    XtNumber(resources),			// num_resources
145
    NULLTQUARK,					// xrm_class
145
    NULLQUARK,					// xrm_class
146
    TRUE,					// compress_motion
146
    TRUE,					// compress_motion
147
    XtExposeCompressMaximal,			// compress_exposure
147
    XtExposeCompressMaximal,			// compress_exposure
148
    TRUE,					// compress_enterleave
148
    TRUE,					// compress_enterleave
(-)koffice/filters/kword/starwriter/status.html (-1 / +1 lines)
Lines 3-9 Link Here
3
<HTML>
3
<HTML>
4
<HEAD>
4
<HEAD>
5
  <TITLE>StarWriter 5.x filter for KWord</TITLE>
5
  <TITLE>StarWriter 5.x filter for KWord</TITLE>
6
  <META HTTP-ETQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
6
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
7
  <META NAME="GENERATOR" CONTENT="Quanta Plus">
7
  <META NAME="GENERATOR" CONTENT="Quanta Plus">
8
</HEAD>
8
</HEAD>
9
<BODY>
9
<BODY>
(-)koffice/filters/olefilters/powerpoint97/powerpoint.cc (-3 / +3 lines)
Lines 104-112 Link Here
104
        { "EXPLAINATOM",                4039,   0 /* &Powerpoint::opExPlainAtom */ },
104
        { "EXPLAINATOM",                4039,   0 /* &Powerpoint::opExPlainAtom */ },
105
        { "EXPLAINLINK",                4054,   0 /* &Powerpoint::opExPlainLink */ },
105
        { "EXPLAINLINK",                4054,   0 /* &Powerpoint::opExPlainLink */ },
106
        { "EXPLAINLINKATOM",            4036,   0 /* &Powerpoint::opExPlainLinkAtom */ },
106
        { "EXPLAINLINKATOM",            4036,   0 /* &Powerpoint::opExPlainLinkAtom */ },
107
        { "EXTQUICKTIME",                4073,   0 /* &Powerpoint::opExQuickTime */ },
107
        { "EXQUICKTIME",                4073,   0 /* &Powerpoint::opExQuickTime */ },
108
        { "EXTQUICKTIMEMOVIE",           4074,   0 /* &Powerpoint::opExQuickTimeMovie */ },
108
        { "EXQUICKTIMEMOVIE",           4074,   0 /* &Powerpoint::opExQuickTimeMovie */ },
109
        { "EXTQUICKTIMEMOVIEDATA",       4075,   0 /* &Powerpoint::opExQuickTimeMovieData */ },
109
        { "EXQUICKTIMEMOVIEDATA",       4075,   0 /* &Powerpoint::opExQuickTimeMovieData */ },
110
        { "EXSUBSCRIPTION",             4076,   0 /* &Powerpoint::opExSubscription */ },
110
        { "EXSUBSCRIPTION",             4076,   0 /* &Powerpoint::opExSubscription */ },
111
        { "EXSUBSCRIPTIONSECTION",      4077,   0 /* &Powerpoint::opExSubscriptionSection */ },
111
        { "EXSUBSCRIPTIONSECTION",      4077,   0 /* &Powerpoint::opExSubscriptionSection */ },
112
        { "EXTERNALOBJECT",             4027,   0 /* &Powerpoint::opExternalObject */ },
112
        { "EXTERNALOBJECT",             4027,   0 /* &Powerpoint::opExternalObject */ },
(-)koffice/filters/olefilters/powerpoint97/pptSlide.cpp (-1 / +1 lines)
Lines 97-103 Link Here
97
	case OTHER_TEXT:
97
	case OTHER_TEXT:
98
	case CENTER_BODY_TEXT:
98
	case CENTER_BODY_TEXT:
99
	case HALF_BODY_TEXT:
99
	case HALF_BODY_TEXT:
100
	case TQUARTER_BODY_TEXT:
100
	case QUARTER_BODY_TEXT:
101
	        TQStringList data(TQStringList::split(TQChar('\r'), text, true));
101
	        TQStringList data(TQStringList::split(TQChar('\r'), text, true));
102
		for (j = 0; j < data.count(); j++)
102
		for (j = 0; j < data.count(); j++)
103
		{
103
		{
(-)koffice/filters/olefilters/powerpoint97/pptSlide.h (-1 / +1 lines)
Lines 38-44 Link Here
38
#define CENTER_BODY_TEXT 	5	//center body(subtitle in title slide)
38
#define CENTER_BODY_TEXT 	5	//center body(subtitle in title slide)
39
#define CENTER_TITLE_TEXT 	6	//center title(title in title slide)
39
#define CENTER_TITLE_TEXT 	6	//center title(title in title slide)
40
#define HALF_BODY_TEXT 	7	//half body(body in two-column slide)
40
#define HALF_BODY_TEXT 	7	//half body(body in two-column slide)
41
#define TQUARTER_BODY_TEXT 	8	//quarter body(body in four-body slide)
41
#define QUARTER_BODY_TEXT 	8	//quarter body(body in four-body slide)
42
//--
42
//--
43
43
44
//--char style types
44
//--char style types
(-)koffice/filters/olefilters/powerpoint97/pptdoc.cc (-1 / +1 lines)
Lines 68-74 Link Here
68
	case OTHER_TEXT:
68
	case OTHER_TEXT:
69
	case CENTER_BODY_TEXT:
69
	case CENTER_BODY_TEXT:
70
	case HALF_BODY_TEXT:
70
	case HALF_BODY_TEXT:
71
	case TQUARTER_BODY_TEXT:
71
	case QUARTER_BODY_TEXT:
72
		for (j = 0; j < data.count(); j++)
72
		for (j = 0; j < data.count(); j++)
73
		{
73
		{
74
			ourSlide.body.append(data[j]);
74
			ourSlide.body.append(data[j]);
(-)koffice/filters/olefilters/powerpoint97/pptxml.cc (-1 / +1 lines)
Lines 258-264 Link Here
258
		break;
258
		break;
259
	case OTHER_TEXT:
259
	case OTHER_TEXT:
260
	case HALF_BODY_TEXT:
260
	case HALF_BODY_TEXT:
261
	case TQUARTER_BODY_TEXT:
261
	case QUARTER_BODY_TEXT:
262
		y = 130;
262
		y = 130;
263
		if(m_half)
263
		if(m_half)
264
		{
264
		{
(-)koffice/kchart/csvimportdialog.cc (-10 / +10 lines)
Lines 170-176 Link Here
170
{
170
{
171
    int row, column;
171
    int row, column;
172
    bool lastCharDelimiter = false;
172
    bool lastCharDelimiter = false;
173
    enum { S_START, S_TQUOTED_FIELD, S_MAYBE_END_OF_TQUOTED_FIELD, S_END_OF_TQUOTED_FIELD,
173
    enum { S_START, S_QUOTED_FIELD, S_MAYBE_END_OF_QUOTED_FIELD, S_END_OF_QUOTED_FIELD,
174
           S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START;
174
           S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START;
175
175
176
    TQChar x;
176
    TQChar x;
Lines 225-231 Link Here
225
         case S_START :
225
         case S_START :
226
            if (x == m_textquote)
226
            if (x == m_textquote)
227
            {
227
            {
228
                state = S_TQUOTED_FIELD;
228
                state = S_QUOTED_FIELD;
229
            }
229
            }
230
            else if (x == m_delimiter)
230
            else if (x == m_delimiter)
231
            {
231
            {
Lines 246-255 Link Here
246
                state = S_MAYBE_NORMAL_FIELD;
246
                state = S_MAYBE_NORMAL_FIELD;
247
            }
247
            }
248
            break;
248
            break;
249
         case S_TQUOTED_FIELD :
249
         case S_QUOTED_FIELD :
250
            if (x == m_textquote)
250
            if (x == m_textquote)
251
            {
251
            {
252
                state = S_MAYBE_END_OF_TQUOTED_FIELD;
252
                state = S_MAYBE_END_OF_QUOTED_FIELD;
253
            }
253
            }
254
            else if (x == '\n')
254
            else if (x == '\n')
255
            {
255
            {
Lines 268-278 Link Here
268
                field += x;
268
                field += x;
269
            }
269
            }
270
            break;
270
            break;
271
         case S_MAYBE_END_OF_TQUOTED_FIELD :
271
         case S_MAYBE_END_OF_QUOTED_FIELD :
272
            if (x == m_textquote)
272
            if (x == m_textquote)
273
            {
273
            {
274
                field += x;
274
                field += x;
275
                state = S_TQUOTED_FIELD;
275
                state = S_QUOTED_FIELD;
276
            }
276
            }
277
            else if (x == m_delimiter || x == '\n')
277
            else if (x == m_delimiter || x == '\n')
278
            {
278
            {
Lines 295-304 Link Here
295
            }
295
            }
296
            else
296
            else
297
            {
297
            {
298
                state = S_END_OF_TQUOTED_FIELD;
298
                state = S_END_OF_QUOTED_FIELD;
299
            }
299
            }
300
            break;
300
            break;
301
         case S_END_OF_TQUOTED_FIELD :
301
         case S_END_OF_QUOTED_FIELD :
302
            if (x == m_delimiter || x == '\n')
302
            if (x == m_delimiter || x == '\n')
303
            {
303
            {
304
                setText(row - m_startRow, column - m_startCol, field);
304
                setText(row - m_startRow, column - m_startCol, field);
Lines 320-333 Link Here
320
            }
320
            }
321
            else
321
            else
322
            {
322
            {
323
                state = S_END_OF_TQUOTED_FIELD;
323
                state = S_END_OF_QUOTED_FIELD;
324
            }
324
            }
325
            break;
325
            break;
326
         case S_MAYBE_NORMAL_FIELD :
326
         case S_MAYBE_NORMAL_FIELD :
327
            if (x == m_textquote)
327
            if (x == m_textquote)
328
            {
328
            {
329
                field = TQString();
329
                field = TQString();
330
                state = S_TQUOTED_FIELD;
330
                state = S_QUOTED_FIELD;
331
                break;
331
                break;
332
            }
332
            }
333
         case S_NORMAL_FIELD :
333
         case S_NORMAL_FIELD :
(-)koffice/kexi/3rdparty/kexisql/src/build.c (-5 / +5 lines)
Lines 526-532 Link Here
526
  /* Begin generating the code that will insert the table record into
526
  /* Begin generating the code that will insert the table record into
527
  ** the SQLITE_MASTER table.  Note in particular that we must go ahead
527
  ** the SQLITE_MASTER table.  Note in particular that we must go ahead
528
  ** and allocate the record number for the table entry now.  Before any
528
  ** and allocate the record number for the table entry now.  Before any
529
  ** PRIMARY KEY or UNITQUE keywords are parsed.  Those keywords will cause
529
  ** PRIMARY KEY or UNIQUE keywords are parsed.  Those keywords will cause
530
  ** indices to be created and the table record must come before the 
530
  ** indices to be created and the table record must come before the 
531
  ** indices.  Hence, the record number for the table must be allocated
531
  ** indices.  Hence, the record number for the table must be allocated
532
  ** now.
532
  ** now.
Lines 1461-1467 Link Here
1461
** Create a new index for an SQL table.  pIndex is the name of the index 
1461
** Create a new index for an SQL table.  pIndex is the name of the index 
1462
** and pTable is the name of the table that is to be indexed.  Both will 
1462
** and pTable is the name of the table that is to be indexed.  Both will 
1463
** be NULL for a primary key or an index that is created to satisfy a
1463
** be NULL for a primary key or an index that is created to satisfy a
1464
** UNITQUE constraint.  If pTable and pIndex are NULL, use pParse->pNewTable
1464
** UNIQUE constraint.  If pTable and pIndex are NULL, use pParse->pNewTable
1465
** as the table to be indexed.  pParse->pNewTable is a table that is
1465
** as the table to be indexed.  pParse->pNewTable is a table that is
1466
** currently being constructed by a CREATE TABLE statement.
1466
** currently being constructed by a CREATE TABLE statement.
1467
**
1467
**
Lines 1531-1537 Link Here
1531
  ** index, then we will continue to process this index.
1531
  ** index, then we will continue to process this index.
1532
  **
1532
  **
1533
  ** If pName==0 it means that we are
1533
  ** If pName==0 it means that we are
1534
  ** dealing with a primary key or UNITQUE constraint.  We have to invent our
1534
  ** dealing with a primary key or UNIQUE constraint.  We have to invent our
1535
  ** own name.
1535
  ** own name.
1536
  */
1536
  */
1537
  if( pName && !db->init.busy ){
1537
  if( pName && !db->init.busy ){
Lines 1673-1679 Link Here
1673
  ** we don't want to recreate it.
1673
  ** we don't want to recreate it.
1674
  **
1674
  **
1675
  ** If pTable==0 it means this index is generated as a primary key
1675
  ** If pTable==0 it means this index is generated as a primary key
1676
  ** or UNITQUE constraint of a CREATE TABLE statement.  Since the table
1676
  ** or UNIQUE constraint of a CREATE TABLE statement.  Since the table
1677
  ** has just been created, it contains no data and the index initialization
1677
  ** has just been created, it contains no data and the index initialization
1678
  ** step can be skipped.
1678
  ** step can be skipped.
1679
  */
1679
  */
Lines 1767-1773 Link Here
1767
    goto exit_drop_index;
1767
    goto exit_drop_index;
1768
  }
1768
  }
1769
  if( pIndex->autoIndex ){
1769
  if( pIndex->autoIndex ){
1770
    sqliteErrorMsg(pParse, "index associated with UNITQUE "
1770
    sqliteErrorMsg(pParse, "index associated with UNIQUE "
1771
      "or PRIMARY KEY constraint cannot be dropped", 0);
1771
      "or PRIMARY KEY constraint cannot be dropped", 0);
1772
    goto exit_drop_index;
1772
    goto exit_drop_index;
1773
  }
1773
  }
(-)koffice/kexi/3rdparty/kexisql/src/func.c (-1 / +1 lines)
Lines 285-291 Link Here
285
** change.  This function may disappear.  Do not write code that depends
285
** change.  This function may disappear.  Do not write code that depends
286
** on this function.
286
** on this function.
287
**
287
**
288
** Implementation of the TQUOTE() function.  This function takes a single
288
** Implementation of the QUOTE() function.  This function takes a single
289
** argument.  If the argument is numeric, the return value is the same as
289
** argument.  If the argument is numeric, the return value is the same as
290
** the argument.  If the argument is NULL, the return value is the string
290
** the argument.  If the argument is NULL, the return value is the string
291
** "NULL".  Otherwise, the argument is enclosed in single quotes with
291
** "NULL".  Otherwise, the argument is enclosed in single quotes with
(-)koffice/kexi/3rdparty/kexisql/src/insert.c (-5 / +5 lines)
Lines 567-573 Link Here
567
** aIdxUsed!=0 and aIdxUsed[i]!=0.
567
** aIdxUsed!=0 and aIdxUsed[i]!=0.
568
**
568
**
569
** This routine also generates code to check constraints.  NOT NULL,
569
** This routine also generates code to check constraints.  NOT NULL,
570
** CHECK, and UNITQUE constraints are all checked.  If a constraint fails,
570
** CHECK, and UNIQUE constraints are all checked.  If a constraint fails,
571
** then the appropriate action is performed.  There are five possible
571
** then the appropriate action is performed.  There are five possible
572
** actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE.
572
** actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE.
573
**
573
**
Lines 595-601 Link Here
595
**                                value for that column.  If the default value
595
**                                value for that column.  If the default value
596
**                                is NULL, the action is the same as ABORT.
596
**                                is NULL, the action is the same as ABORT.
597
**
597
**
598
**  UNITQUE           REPLACE      The other row that conflicts with the row
598
**  UNIQUE           REPLACE      The other row that conflicts with the row
599
**                                being inserted is removed.
599
**                                being inserted is removed.
600
**
600
**
601
**  CHECK            REPLACE      Illegal.  The results in an exception.
601
**  CHECK            REPLACE      Illegal.  The results in an exception.
Lines 753-759 Link Here
753
    }
753
    }
754
  }
754
  }
755
755
756
  /* Test all UNITQUE constraints by creating entries for each UNITQUE
756
  /* Test all UNIQUE constraints by creating entries for each UNIQUE
757
  ** index and making sure that duplicate entries do not already exist.
757
  ** index and making sure that duplicate entries do not already exist.
758
  ** Add the new records to the indices as we go.
758
  ** Add the new records to the indices as we go.
759
  */
759
  */
Lines 777-783 Link Here
777
777
778
    /* Find out what action to take in case there is an indexing conflict */
778
    /* Find out what action to take in case there is an indexing conflict */
779
    onError = pIdx->onError;
779
    onError = pIdx->onError;
780
    if( onError==OE_None ) continue;  /* pIdx is not a UNITQUE index */
780
    if( onError==OE_None ) continue;  /* pIdx is not a UNIQUE index */
781
    if( overrideError!=OE_Default ){
781
    if( overrideError!=OE_Default ){
782
      onError = overrideError;
782
      onError = overrideError;
783
    }else if( pParse->db->onError!=OE_Default ){
783
    }else if( pParse->db->onError!=OE_Default ){
Lines 843-849 Link Here
843
      default: assert(0);
843
      default: assert(0);
844
    }
844
    }
845
    contAddr = sqliteVdbeCurrentAddr(v);
845
    contAddr = sqliteVdbeCurrentAddr(v);
846
#if NULL_DISTINCT_FOR_UNITQUE
846
#if NULL_DISTINCT_FOR_UNIQUE
847
    sqliteVdbeChangeP2(v, jumpInst1, contAddr);
847
    sqliteVdbeChangeP2(v, jumpInst1, contAddr);
848
#endif
848
#endif
849
    sqliteVdbeChangeP2(v, jumpInst2, contAddr);
849
    sqliteVdbeChangeP2(v, jumpInst2, contAddr);
(-)koffice/kexi/3rdparty/kexisql/src/main.c (-1 / +1 lines)
Lines 90-96 Link Here
90
        db->init.iDb = 0;
90
        db->init.iDb = 0;
91
      }else{
91
      }else{
92
        /* If the SQL column is blank it means this is an index that
92
        /* If the SQL column is blank it means this is an index that
93
        ** was created to be the PRIMARY KEY or to fulfill a UNITQUE
93
        ** was created to be the PRIMARY KEY or to fulfill a UNIQUE
94
        ** constraint for a CREATE TABLE.  The index should have already
94
        ** constraint for a CREATE TABLE.  The index should have already
95
        ** been created when we processed the CREATE TABLE.  All we have
95
        ** been created when we processed the CREATE TABLE.  All we have
96
        ** to do here is record the root page number for that index.
96
        ** to do here is record the root page number for that index.
(-)koffice/kexi/3rdparty/kexisql/src/parse.c (-8 / +8 lines)
Lines 711-717 Link Here
711
    0,  /*      FLOAT => nothing */
711
    0,  /*      FLOAT => nothing */
712
    0,  /*       NULL => nothing */
712
    0,  /*       NULL => nothing */
713
    0,  /*    PRIMARY => nothing */
713
    0,  /*    PRIMARY => nothing */
714
    0,  /*     UNITQUE => nothing */
714
    0,  /*     UNIQUE => nothing */
715
    0,  /*      CHECK => nothing */
715
    0,  /*      CHECK => nothing */
716
    0,  /* REFERENCES => nothing */
716
    0,  /* REFERENCES => nothing */
717
    0,  /*    COLLATE => nothing */
717
    0,  /*    COLLATE => nothing */
Lines 840-846 Link Here
840
  "STAR",          "SLASH",         "REM",           "CONCAT",      
840
  "STAR",          "SLASH",         "REM",           "CONCAT",      
841
  "UMINUS",        "UPLUS",         "BITNOT",        "STRING",      
841
  "UMINUS",        "UPLUS",         "BITNOT",        "STRING",      
842
  "JOIN_KW",       "INTEGER",       "CONSTRAINT",    "DEFAULT",     
842
  "JOIN_KW",       "INTEGER",       "CONSTRAINT",    "DEFAULT",     
843
  "FLOAT",         "NULL",          "PRIMARY",       "UNITQUE",      
843
  "FLOAT",         "NULL",          "PRIMARY",       "UNIQUE",      
844
  "CHECK",         "REFERENCES",    "COLLATE",       "ON",          
844
  "CHECK",         "REFERENCES",    "COLLATE",       "ON",          
845
  "DELETE",        "UPDATE",        "INSERT",        "SET",         
845
  "DELETE",        "UPDATE",        "INSERT",        "SET",         
846
  "DEFERRABLE",    "FOREIGN",       "DROP",          "UNION",       
846
  "DEFERRABLE",    "FOREIGN",       "DROP",          "UNION",       
Lines 935-941 Link Here
935
 /*  53 */ "ccons ::= NULL onconf",
935
 /*  53 */ "ccons ::= NULL onconf",
936
 /*  54 */ "ccons ::= NOT NULL onconf",
936
 /*  54 */ "ccons ::= NOT NULL onconf",
937
 /*  55 */ "ccons ::= PRIMARY KEY sortorder onconf",
937
 /*  55 */ "ccons ::= PRIMARY KEY sortorder onconf",
938
 /*  56 */ "ccons ::= UNITQUE onconf",
938
 /*  56 */ "ccons ::= UNIQUE onconf",
939
 /*  57 */ "ccons ::= CHECK LP expr RP onconf",
939
 /*  57 */ "ccons ::= CHECK LP expr RP onconf",
940
 /*  58 */ "ccons ::= REFERENCES nm idxlist_opt refargs",
940
 /*  58 */ "ccons ::= REFERENCES nm idxlist_opt refargs",
941
 /*  59 */ "ccons ::= defer_subclause",
941
 /*  59 */ "ccons ::= defer_subclause",
Lines 962-968 Link Here
962
 /*  80 */ "conslist ::= tcons",
962
 /*  80 */ "conslist ::= tcons",
963
 /*  81 */ "tcons ::= CONSTRAINT nm",
963
 /*  81 */ "tcons ::= CONSTRAINT nm",
964
 /*  82 */ "tcons ::= PRIMARY KEY LP idxlist RP onconf",
964
 /*  82 */ "tcons ::= PRIMARY KEY LP idxlist RP onconf",
965
 /*  83 */ "tcons ::= UNITQUE LP idxlist RP onconf",
965
 /*  83 */ "tcons ::= UNIQUE LP idxlist RP onconf",
966
 /*  84 */ "tcons ::= CHECK expr onconf",
966
 /*  84 */ "tcons ::= CHECK expr onconf",
967
 /*  85 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt",
967
 /*  85 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt",
968
 /*  86 */ "defer_subclause_opt ::=",
968
 /*  86 */ "defer_subclause_opt ::=",
Lines 1115-1121 Link Here
1115
 /* 233 */ "expritem ::= expr",
1115
 /* 233 */ "expritem ::= expr",
1116
 /* 234 */ "expritem ::=",
1116
 /* 234 */ "expritem ::=",
1117
 /* 235 */ "cmd ::= CREATE uniqueflag INDEX nm ON nm dbnm LP idxlist RP onconf",
1117
 /* 235 */ "cmd ::= CREATE uniqueflag INDEX nm ON nm dbnm LP idxlist RP onconf",
1118
 /* 236 */ "uniqueflag ::= UNITQUE",
1118
 /* 236 */ "uniqueflag ::= UNIQUE",
1119
 /* 237 */ "uniqueflag ::=",
1119
 /* 237 */ "uniqueflag ::=",
1120
 /* 238 */ "idxlist_opt ::=",
1120
 /* 238 */ "idxlist_opt ::=",
1121
 /* 239 */ "idxlist_opt ::= LP idxlist RP",
1121
 /* 239 */ "idxlist_opt ::= LP idxlist RP",
Lines 2183-2189 Link Here
2183
#line 191 "parse.y"
2183
#line 191 "parse.y"
2184
{sqliteCreateIndex(pParse,0,0,0,yymsp[0].minor.yy372,0,0);}
2184
{sqliteCreateIndex(pParse,0,0,0,yymsp[0].minor.yy372,0,0);}
2185
#line 2185 "parse.c"
2185
#line 2185 "parse.c"
2186
        /* No destructor defined for UNITQUE */
2186
        /* No destructor defined for UNIQUE */
2187
        break;
2187
        break;
2188
      case 57:
2188
      case 57:
2189
        /* No destructor defined for CHECK */
2189
        /* No destructor defined for CHECK */
Lines 2342-2348 Link Here
2342
#line 238 "parse.y"
2342
#line 238 "parse.y"
2343
{sqliteCreateIndex(pParse,0,0,yymsp[-2].minor.yy320,yymsp[0].minor.yy372,0,0);}
2343
{sqliteCreateIndex(pParse,0,0,yymsp[-2].minor.yy320,yymsp[0].minor.yy372,0,0);}
2344
#line 2344 "parse.c"
2344
#line 2344 "parse.c"
2345
        /* No destructor defined for UNITQUE */
2345
        /* No destructor defined for UNIQUE */
2346
        /* No destructor defined for LP */
2346
        /* No destructor defined for LP */
2347
        /* No destructor defined for RP */
2347
        /* No destructor defined for RP */
2348
        break;
2348
        break;
Lines 3428-3434 Link Here
3428
#line 740 "parse.y"
3428
#line 740 "parse.y"
3429
{ yygotominor.yy372 = OE_Abort; }
3429
{ yygotominor.yy372 = OE_Abort; }
3430
#line 3430 "parse.c"
3430
#line 3430 "parse.c"
3431
        /* No destructor defined for UNITQUE */
3431
        /* No destructor defined for UNIQUE */
3432
        break;
3432
        break;
3433
      case 237:
3433
      case 237:
3434
#line 741 "parse.y"
3434
#line 741 "parse.y"
(-)koffice/kexi/3rdparty/kexisql/src/parse.h (-1 / +1 lines)
Lines 92-98 Link Here
92
#define TK_FLOAT                          92
92
#define TK_FLOAT                          92
93
#define TK_NULL                           93
93
#define TK_NULL                           93
94
#define TK_PRIMARY                        94
94
#define TK_PRIMARY                        94
95
#define TK_UNITQUE                         95
95
#define TK_UNIQUE                         95
96
#define TK_CHECK                          96
96
#define TK_CHECK                          96
97
#define TK_REFERENCES                     97
97
#define TK_REFERENCES                     97
98
#define TK_COLLATE                        98
98
#define TK_COLLATE                        98
(-)koffice/kexi/3rdparty/kexisql/src/sqliteInt.h (-6 / +6 lines)
Lines 45-60 Link Here
45
/*
45
/*
46
** If the following macro is set to 1, then NULL values are considered
46
** If the following macro is set to 1, then NULL values are considered
47
** distinct when determining whether or not two entries are the same
47
** distinct when determining whether or not two entries are the same
48
** in a UNITQUE index.  This is the way PostgreSQL, Oracle, DB2, MySQL,
48
** in a UNIQUE index.  This is the way PostgreSQL, Oracle, DB2, MySQL,
49
** OCELOT, and Firebird all work.  The SQL92 spec explicitly says this
49
** OCELOT, and Firebird all work.  The SQL92 spec explicitly says this
50
** is the way things are suppose to work.
50
** is the way things are suppose to work.
51
**
51
**
52
** If the following macro is set to 0, the NULLs are indistinct for
52
** If the following macro is set to 0, the NULLs are indistinct for
53
** a UNITQUE index.  In this mode, you can only have a single NULL entry
53
** a UNIQUE index.  In this mode, you can only have a single NULL entry
54
** for a column declared UNITQUE.  This is the way Informix and SQL Server
54
** for a column declared UNIQUE.  This is the way Informix and SQL Server
55
** work.
55
** work.
56
*/
56
*/
57
#define NULL_DISTINCT_FOR_UNITQUE 1
57
#define NULL_DISTINCT_FOR_UNIQUE 1
58
58
59
/*
59
/*
60
** The maximum number of attached databases.  This must be at least 2
60
** The maximum number of attached databases.  This must be at least 2
Lines 563-569 Link Here
563
** occurs.  IGNORE means that the particular row that caused the constraint
563
** occurs.  IGNORE means that the particular row that caused the constraint
564
** error is not inserted or updated.  Processing continues and no error
564
** error is not inserted or updated.  Processing continues and no error
565
** is returned.  REPLACE means that preexisting database rows that caused
565
** is returned.  REPLACE means that preexisting database rows that caused
566
** a UNITQUE constraint violation are removed so that the new insert or
566
** a UNIQUE constraint violation are removed so that the new insert or
567
** update can proceed.  Processing continues and no error is reported.
567
** update can proceed.  Processing continues and no error is reported.
568
**
568
**
569
** RESTRICT, SETNULL, and CASCADE actions apply only to foreign keys.
569
** RESTRICT, SETNULL, and CASCADE actions apply only to foreign keys.
Lines 623-629 Link Here
623
  Table *pTable;   /* The SQL table being indexed */
623
  Table *pTable;   /* The SQL table being indexed */
624
  int tnum;        /* Page containing root of this index in database file */
624
  int tnum;        /* Page containing root of this index in database file */
625
  u8 onError;      /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
625
  u8 onError;      /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
626
  u8 autoIndex;    /* True if is automatically created (ex: by UNITQUE) */
626
  u8 autoIndex;    /* True if is automatically created (ex: by UNIQUE) */
627
  u8 iDb;          /* Index in sqlite.aDb[] of where this index is stored */
627
  u8 iDb;          /* Index in sqlite.aDb[] of where this index is stored */
628
  Index *pNext;    /* The next index associated with the same table */
628
  Index *pNext;    /* The next index associated with the same table */
629
};
629
};
(-)koffice/kexi/3rdparty/kexisql/src/tokenize.c (-1 / +1 lines)
Lines 130-136 Link Here
130
  { "TRANSACTION",       TK_TRANSACTION,  },
130
  { "TRANSACTION",       TK_TRANSACTION,  },
131
  { "TRIGGER",           TK_TRIGGER,      },
131
  { "TRIGGER",           TK_TRIGGER,      },
132
  { "UNION",             TK_UNION,        },
132
  { "UNION",             TK_UNION,        },
133
  { "UNITQUE",            TK_UNITQUE,       },
133
  { "UNIQUE",            TK_UNIQUE,       },
134
  { "UPDATE",            TK_UPDATE,       },
134
  { "UPDATE",            TK_UPDATE,       },
135
  { "USING",             TK_USING,        },
135
  { "USING",             TK_USING,        },
136
  { "VACUUM",            TK_VACUUM,       },
136
  { "VACUUM",            TK_VACUUM,       },
(-)koffice/kexi/3rdparty/kexisql/src/vdbe.c (-1 / +1 lines)
Lines 2741-2747 Link Here
2741
    /* The last four bytes of the key are different from R.  Convert the
2741
    /* The last four bytes of the key are different from R.  Convert the
2742
    ** last four bytes of the key into an integer and push it onto the
2742
    ** last four bytes of the key into an integer and push it onto the
2743
    ** stack.  (These bytes are the record number of an entry that
2743
    ** stack.  (These bytes are the record number of an entry that
2744
    ** violates a UNITQUE constraint.)
2744
    ** violates a UNIQUE constraint.)
2745
    */
2745
    */
2746
    pTos++;
2746
    pTos++;
2747
    pTos->i = v;
2747
    pTos->i = v;
(-)koffice/kexi/3rdparty/kexisql3/src/alter.c (-3 / +3 lines)
Lines 231-237 Link Here
231
231
232
#ifndef SQLITE_OMIT_TRIGGER
232
#ifndef SQLITE_OMIT_TRIGGER
233
  /* Now, if the table is not stored in the temp database, reload any temp 
233
  /* Now, if the table is not stored in the temp database, reload any temp 
234
  ** triggers. Don't use IN(...) in case SQLITE_OMIT_SUBTQUERY is defined. 
234
  ** triggers. Don't use IN(...) in case SQLITE_OMIT_SUBQUERY is defined. 
235
  */
235
  */
236
  if( (zWhere=whereTempTriggers(pParse, pTab)) ){
236
  if( (zWhere=whereTempTriggers(pParse, pTab)) ){
237
    sqlite3VdbeOp3(v, OP_ParseSchema, 1, 0, zWhere, P3_DYNAMIC);
237
    sqlite3VdbeOp3(v, OP_ParseSchema, 1, 0, zWhere, P3_DYNAMIC);
Lines 407-413 Link Here
407
    pDflt = 0;
407
    pDflt = 0;
408
  }
408
  }
409
409
410
  /* Check that the new column is not specified as PRIMARY KEY or UNITQUE.
410
  /* Check that the new column is not specified as PRIMARY KEY or UNIQUE.
411
  ** If there is a NOT NULL constraint, then the default value for the
411
  ** If there is a NOT NULL constraint, then the default value for the
412
  ** column must not be NULL.
412
  ** column must not be NULL.
413
  */
413
  */
Lines 416-422 Link Here
416
    return;
416
    return;
417
  }
417
  }
418
  if( pNew->pIndex ){
418
  if( pNew->pIndex ){
419
    sqlite3ErrorMsg(pParse, "Cannot add a UNITQUE column");
419
    sqlite3ErrorMsg(pParse, "Cannot add a UNIQUE column");
420
    return;
420
    return;
421
  }
421
  }
422
  if( pCol->notNull && !pDflt ){
422
  if( pCol->notNull && !pDflt ){
(-)koffice/kexi/3rdparty/kexisql3/src/btree.c (-3 / +3 lines)
Lines 3644-3650 Link Here
3644
/* Forward reference */
3644
/* Forward reference */
3645
static int balance(MemPage*, int);
3645
static int balance(MemPage*, int);
3646
3646
3647
#ifndef SQLITE_OMIT_TQUICKBALANCE
3647
#ifndef SQLITE_OMIT_QUICKBALANCE
3648
/*
3648
/*
3649
** This version of balance() handles the common special case where
3649
** This version of balance() handles the common special case where
3650
** a new entry is being inserted on the extreme right-end of the
3650
** a new entry is being inserted on the extreme right-end of the
Lines 3732-3738 Link Here
3732
  releasePage(pNew);
3732
  releasePage(pNew);
3733
  return balance(pParent, 0);
3733
  return balance(pParent, 0);
3734
}
3734
}
3735
#endif /* SQLITE_OMIT_TQUICKBALANCE */
3735
#endif /* SQLITE_OMIT_QUICKBALANCE */
3736
3736
3737
/*
3737
/*
3738
** The ISAUTOVACUUM macro is used within balance_nonroot() to determine
3738
** The ISAUTOVACUUM macro is used within balance_nonroot() to determine
Lines 3822-3828 Link Here
3822
  assert( pParent );
3822
  assert( pParent );
3823
  TRACE(("BALANCE: begin page %d child of %d\n", pPage->pgno, pParent->pgno));
3823
  TRACE(("BALANCE: begin page %d child of %d\n", pPage->pgno, pParent->pgno));
3824
3824
3825
#ifndef SQLITE_OMIT_TQUICKBALANCE
3825
#ifndef SQLITE_OMIT_QUICKBALANCE
3826
  /*
3826
  /*
3827
  ** A special case:  If a new entry has just been inserted into a
3827
  ** A special case:  If a new entry has just been inserted into a
3828
  ** table (that is, a btree with integer keys and all data at the leaves)
3828
  ** table (that is, a btree with integer keys and all data at the leaves)
(-)koffice/kexi/3rdparty/kexisql3/src/build.c (-10 / +10 lines)
Lines 746-752 Link Here
746
  /* Begin generating the code that will insert the table record into
746
  /* Begin generating the code that will insert the table record into
747
  ** the SQLITE_MASTER table.  Note in particular that we must go ahead
747
  ** the SQLITE_MASTER table.  Note in particular that we must go ahead
748
  ** and allocate the record number for the table entry now.  Before any
748
  ** and allocate the record number for the table entry now.  Before any
749
  ** PRIMARY KEY or UNITQUE keywords are parsed.  Those keywords will cause
749
  ** PRIMARY KEY or UNIQUE keywords are parsed.  Those keywords will cause
750
  ** indices to be created and the table record must come before the 
750
  ** indices to be created and the table record must come before the 
751
  ** indices.  Hence, the record number for the table must be allocated
751
  ** indices.  Hence, the record number for the table must be allocated
752
  ** now.
752
  ** now.
Lines 2011-2017 Link Here
2011
** Create a new index for an SQL table.  pName1.pName2 is the name of the index 
2011
** Create a new index for an SQL table.  pName1.pName2 is the name of the index 
2012
** and pTblList is the name of the table that is to be indexed.  Both will 
2012
** and pTblList is the name of the table that is to be indexed.  Both will 
2013
** be NULL for a primary key or an index that is created to satisfy a
2013
** be NULL for a primary key or an index that is created to satisfy a
2014
** UNITQUE constraint.  If pTable and pIndex are NULL, use pParse->pNewTable
2014
** UNIQUE constraint.  If pTable and pIndex are NULL, use pParse->pNewTable
2015
** as the table to be indexed.  pParse->pNewTable is a table that is
2015
** as the table to be indexed.  pParse->pNewTable is a table that is
2016
** currently being constructed by a CREATE TABLE statement.
2016
** currently being constructed by a CREATE TABLE statement.
2017
**
2017
**
Lines 2104-2110 Link Here
2104
  ** index, then we will continue to process this index.
2104
  ** index, then we will continue to process this index.
2105
  **
2105
  **
2106
  ** If pName==0 it means that we are
2106
  ** If pName==0 it means that we are
2107
  ** dealing with a primary key or UNITQUE constraint.  We have to invent our
2107
  ** dealing with a primary key or UNIQUE constraint.  We have to invent our
2108
  ** own name.
2108
  ** own name.
2109
  */
2109
  */
2110
  if( pName ){
2110
  if( pName ){
Lines 2211-2222 Link Here
2211
2211
2212
  if( pTab==pParse->pNewTable ){
2212
  if( pTab==pParse->pNewTable ){
2213
    /* This routine has been called to create an automatic index as a
2213
    /* This routine has been called to create an automatic index as a
2214
    ** result of a PRIMARY KEY or UNITQUE clause on a column definition, or
2214
    ** result of a PRIMARY KEY or UNIQUE clause on a column definition, or
2215
    ** a PRIMARY KEY or UNITQUE clause following the column definitions.
2215
    ** a PRIMARY KEY or UNIQUE clause following the column definitions.
2216
    ** i.e. one of:
2216
    ** i.e. one of:
2217
    **
2217
    **
2218
    ** CREATE TABLE t(x PRIMARY KEY, y);
2218
    ** CREATE TABLE t(x PRIMARY KEY, y);
2219
    ** CREATE TABLE t(x, y, UNITQUE(x, y));
2219
    ** CREATE TABLE t(x, y, UNIQUE(x, y));
2220
    **
2220
    **
2221
    ** Either way, check to see if the table already has such an index. If
2221
    ** Either way, check to see if the table already has such an index. If
2222
    ** so, don't bother creating this one. This only applies to
2222
    ** so, don't bother creating this one. This only applies to
Lines 2285-2291 Link Here
2285
  ** we don't want to recreate it.
2285
  ** we don't want to recreate it.
2286
  **
2286
  **
2287
  ** If pTblName==0 it means this index is generated as a primary key
2287
  ** If pTblName==0 it means this index is generated as a primary key
2288
  ** or UNITQUE constraint of a CREATE TABLE statement.  Since the table
2288
  ** or UNIQUE constraint of a CREATE TABLE statement.  Since the table
2289
  ** has just been created, it contains no data and the index initialization
2289
  ** has just been created, it contains no data and the index initialization
2290
  ** step can be skipped.
2290
  ** step can be skipped.
2291
  */
2291
  */
Lines 2309-2319 Link Here
2309
    if( pStart && pEnd ){
2309
    if( pStart && pEnd ){
2310
      /* A named index with an explicit CREATE INDEX statement */
2310
      /* A named index with an explicit CREATE INDEX statement */
2311
      zStmt = sqlite3MPrintf("CREATE%s INDEX %.*s",
2311
      zStmt = sqlite3MPrintf("CREATE%s INDEX %.*s",
2312
        onError==OE_None ? "" : " UNITQUE",
2312
        onError==OE_None ? "" : " UNIQUE",
2313
        pEnd->z - pName->z + 1,
2313
        pEnd->z - pName->z + 1,
2314
        pName->z);
2314
        pName->z);
2315
    }else{
2315
    }else{
2316
      /* An automatic index created by a PRIMARY KEY or UNITQUE constraint */
2316
      /* An automatic index created by a PRIMARY KEY or UNIQUE constraint */
2317
      /* zStmt = sqlite3MPrintf(""); */
2317
      /* zStmt = sqlite3MPrintf(""); */
2318
      zStmt = 0;
2318
      zStmt = 0;
2319
    }
2319
    }
Lines 2428-2434 Link Here
2428
    goto exit_drop_index;
2428
    goto exit_drop_index;
2429
  }
2429
  }
2430
  if( pIndex->autoIndex ){
2430
  if( pIndex->autoIndex ){
2431
    sqlite3ErrorMsg(pParse, "index associated with UNITQUE "
2431
    sqlite3ErrorMsg(pParse, "index associated with UNIQUE "
2432
      "or PRIMARY KEY constraint cannot be dropped", 0);
2432
      "or PRIMARY KEY constraint cannot be dropped", 0);
2433
    goto exit_drop_index;
2433
    goto exit_drop_index;
2434
  }
2434
  }
(-)koffice/kexi/3rdparty/kexisql3/src/expr.c (-6 / +6 lines)
Lines 478-484 Link Here
478
** called with a NULL argument.
478
** called with a NULL argument.
479
*/
479
*/
480
#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER) \
480
#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER) \
481
 || !defined(SQLITE_OMIT_SUBTQUERY)
481
 || !defined(SQLITE_OMIT_SUBQUERY)
482
SrcList *sqlite3SrcListDup(SrcList *p){
482
SrcList *sqlite3SrcListDup(SrcList *p){
483
  SrcList *pNew;
483
  SrcList *pNew;
484
  int i;
484
  int i;
Lines 698-704 Link Here
698
    case TK_DOT:
698
    case TK_DOT:
699
    case TK_AGG_FUNCTION:
699
    case TK_AGG_FUNCTION:
700
    case TK_AGG_COLUMN:
700
    case TK_AGG_COLUMN:
701
#ifndef SQLITE_OMIT_SUBTQUERY
701
#ifndef SQLITE_OMIT_SUBQUERY
702
    case TK_SELECT:
702
    case TK_SELECT:
703
    case TK_EXISTS:
703
    case TK_EXISTS:
704
#endif
704
#endif
Lines 1190-1196 Link Here
1190
      */
1190
      */
1191
      return is_agg;
1191
      return is_agg;
1192
    }
1192
    }
1193
#ifndef SQLITE_OMIT_SUBTQUERY
1193
#ifndef SQLITE_OMIT_SUBQUERY
1194
    case TK_SELECT:
1194
    case TK_SELECT:
1195
    case TK_EXISTS:
1195
    case TK_EXISTS:
1196
#endif
1196
#endif
Lines 1273-1279 Link Here
1273
** of allowed values.  The second form causes the SELECT to generate 
1273
** of allowed values.  The second form causes the SELECT to generate 
1274
** a temporary table.
1274
** a temporary table.
1275
*/
1275
*/
1276
#ifndef SQLITE_OMIT_SUBTQUERY
1276
#ifndef SQLITE_OMIT_SUBQUERY
1277
void sqlite3CodeSubselect(Parse *pParse, Expr *pExpr){
1277
void sqlite3CodeSubselect(Parse *pParse, Expr *pExpr){
1278
  int testAddr = 0;                       /* One-time test address */
1278
  int testAddr = 0;                       /* One-time test address */
1279
  Vdbe *v = sqlite3GetVdbe(pParse);
1279
  Vdbe *v = sqlite3GetVdbe(pParse);
Lines 1414-1420 Link Here
1414
  }
1414
  }
1415
  return;
1415
  return;
1416
}
1416
}
1417
#endif /* SQLITE_OMIT_SUBTQUERY */
1417
#endif /* SQLITE_OMIT_SUBQUERY */
1418
1418
1419
/*
1419
/*
1420
** Generate an instruction that will put the integer describe by
1420
** Generate an instruction that will put the integer describe by
Lines 1649-1655 Link Here
1649
      sqlite3VdbeOp3(v, OP_Function, constMask, nExpr, (char*)pDef, P3_FUNCDEF);
1649
      sqlite3VdbeOp3(v, OP_Function, constMask, nExpr, (char*)pDef, P3_FUNCDEF);
1650
      break;
1650
      break;
1651
    }
1651
    }
1652
#ifndef SQLITE_OMIT_SUBTQUERY
1652
#ifndef SQLITE_OMIT_SUBQUERY
1653
    case TK_EXISTS:
1653
    case TK_EXISTS:
1654
    case TK_SELECT: {
1654
    case TK_SELECT: {
1655
      sqlite3CodeSubselect(pParse, pExpr);
1655
      sqlite3CodeSubselect(pParse, pExpr);
(-)koffice/kexi/3rdparty/kexisql3/src/func.c (-1 / +1 lines)
Lines 545-551 Link Here
545
** change.  This function may disappear.  Do not write code that depends
545
** change.  This function may disappear.  Do not write code that depends
546
** on this function.
546
** on this function.
547
**
547
**
548
** Implementation of the TQUOTE() function.  This function takes a single
548
** Implementation of the QUOTE() function.  This function takes a single
549
** argument.  If the argument is numeric, the return value is the same as
549
** argument.  If the argument is numeric, the return value is the same as
550
** the argument.  If the argument is NULL, the return value is the string
550
** the argument.  If the argument is NULL, the return value is the string
551
** "NULL".  Otherwise, the argument is enclosed in single quotes with
551
** "NULL".  Otherwise, the argument is enclosed in single quotes with
(-)koffice/kexi/3rdparty/kexisql3/src/insert.c (-5 / +5 lines)
Lines 746-752 Link Here
746
** aIdxUsed!=0 and aIdxUsed[i]!=0.
746
** aIdxUsed!=0 and aIdxUsed[i]!=0.
747
**
747
**
748
** This routine also generates code to check constraints.  NOT NULL,
748
** This routine also generates code to check constraints.  NOT NULL,
749
** CHECK, and UNITQUE constraints are all checked.  If a constraint fails,
749
** CHECK, and UNIQUE constraints are all checked.  If a constraint fails,
750
** then the appropriate action is performed.  There are five possible
750
** then the appropriate action is performed.  There are five possible
751
** actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE.
751
** actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE.
752
**
752
**
Lines 774-780 Link Here
774
**                                value for that column.  If the default value
774
**                                value for that column.  If the default value
775
**                                is NULL, the action is the same as ABORT.
775
**                                is NULL, the action is the same as ABORT.
776
**
776
**
777
**  UNITQUE           REPLACE      The other row that conflicts with the row
777
**  UNIQUE           REPLACE      The other row that conflicts with the row
778
**                                being inserted is removed.
778
**                                being inserted is removed.
779
**
779
**
780
**  CHECK            REPLACE      Illegal.  The results in an exception.
780
**  CHECK            REPLACE      Illegal.  The results in an exception.
Lines 927-933 Link Here
927
    }
927
    }
928
  }
928
  }
929
929
930
  /* Test all UNITQUE constraints by creating entries for each UNITQUE
930
  /* Test all UNIQUE constraints by creating entries for each UNIQUE
931
  ** index and making sure that duplicate entries do not already exist.
931
  ** index and making sure that duplicate entries do not already exist.
932
  ** Add the new records to the indices as we go.
932
  ** Add the new records to the indices as we go.
933
  */
933
  */
Lines 951-957 Link Here
951
951
952
    /* Find out what action to take in case there is an indexing conflict */
952
    /* Find out what action to take in case there is an indexing conflict */
953
    onError = pIdx->onError;
953
    onError = pIdx->onError;
954
    if( onError==OE_None ) continue;  /* pIdx is not a UNITQUE index */
954
    if( onError==OE_None ) continue;  /* pIdx is not a UNIQUE index */
955
    if( overrideError!=OE_Default ){
955
    if( overrideError!=OE_Default ){
956
      onError = overrideError;
956
      onError = overrideError;
957
    }else if( onError==OE_Default ){
957
    }else if( onError==OE_Default ){
Lines 1015-1021 Link Here
1015
        break;
1015
        break;
1016
      }
1016
      }
1017
    }
1017
    }
1018
#if NULL_DISTINCT_FOR_UNITQUE
1018
#if NULL_DISTINCT_FOR_UNIQUE
1019
    sqlite3VdbeJumpHere(v, jumpInst1);
1019
    sqlite3VdbeJumpHere(v, jumpInst1);
1020
#endif
1020
#endif
1021
    sqlite3VdbeJumpHere(v, jumpInst2);
1021
    sqlite3VdbeJumpHere(v, jumpInst2);
(-)koffice/kexi/3rdparty/kexisql3/src/keywordhash.h (-4 / +4 lines)
Lines 8-15 Link Here
8
    "CASECASTCOLLATECOLUMNCOMMITCONFLICTCONSTRAINTERSECTCREATECROSS"
8
    "CASECASTCOLLATECOLUMNCOMMITCONFLICTCONSTRAINTERSECTCREATECROSS"
9
    "CURRENT_DATECURRENT_TIMESTAMPLANDESCDETACHDISTINCTDROPRAGMATCH"
9
    "CURRENT_DATECURRENT_TIMESTAMPLANDESCDETACHDISTINCTDROPRAGMATCH"
10
    "FAILIMITFROMFULLGROUPDATEIMMEDIATEINSERTINSTEADINTOFFSETISNULL"
10
    "FAILIMITFROMFULLGROUPDATEIMMEDIATEINSERTINSTEADINTOFFSETISNULL"
11
    "JOINORDEREPLACEOUTERESTRICTPRIMARYTQUERYRIGHTROLLBACKROWHENUNION"
11
    "JOINORDEREPLACEOUTERESTRICTPRIMARYQUERYRIGHTROLLBACKROWHENUNION"
12
    "UNITQUEUSINGVACUUMVALUESVIEWHERE";
12
    "UNIQUEUSINGVACUUMVALUESVIEWHERE";
13
  static const unsigned char aHash[127] = {
13
  static const unsigned char aHash[127] = {
14
      91,  80, 106,  90,   0,   4,   0,   0, 113,   0,  83,   0,   0,
14
      91,  80, 106,  90,   0,   4,   0,   0, 113,   0,  83,   0,   0,
15
      94,  44,  76,  92,   0, 105, 108,  96,   0,   0,  10,   0,   0,
15
      94,  44,  76,  92,   0, 105, 108,  96,   0,   0,  10,   0,   0,
Lines 76-83 Link Here
76
    TK_FROM,       TK_JOIN_KW,    TK_GROUP,      TK_UPDATE,     TK_IMMEDIATE,  
76
    TK_FROM,       TK_JOIN_KW,    TK_GROUP,      TK_UPDATE,     TK_IMMEDIATE,  
77
    TK_INSERT,     TK_INSTEAD,    TK_INTO,       TK_OF,         TK_OFFSET,     
77
    TK_INSERT,     TK_INSTEAD,    TK_INTO,       TK_OF,         TK_OFFSET,     
78
    TK_SET,        TK_ISNULL,     TK_JOIN,       TK_ORDER,      TK_REPLACE,    
78
    TK_SET,        TK_ISNULL,     TK_JOIN,       TK_ORDER,      TK_REPLACE,    
79
    TK_JOIN_KW,    TK_RESTRICT,   TK_PRIMARY,    TK_TQUERY,      TK_JOIN_KW,    
79
    TK_JOIN_KW,    TK_RESTRICT,   TK_PRIMARY,    TK_QUERY,      TK_JOIN_KW,    
80
    TK_ROLLBACK,   TK_ROW,        TK_WHEN,       TK_UNION,      TK_UNITQUE,     
80
    TK_ROLLBACK,   TK_ROW,        TK_WHEN,       TK_UNION,      TK_UNIQUE,     
81
    TK_USING,      TK_VACUUM,     TK_VALUES,     TK_VIEW,       TK_WHERE,      
81
    TK_USING,      TK_VACUUM,     TK_VALUES,     TK_VIEW,       TK_WHERE,      
82
  };
82
  };
83
  int h, i;
83
  int h, i;
(-)koffice/kexi/3rdparty/kexisql3/src/parse.c (-7 / +7 lines)
Lines 682-688 Link Here
682
    0,  /* CONST_FUNC => nothing */
682
    0,  /* CONST_FUNC => nothing */
683
    0,  /*       SEMI => nothing */
683
    0,  /*       SEMI => nothing */
684
   30,  /*    EXPLAIN => ID */
684
   30,  /*    EXPLAIN => ID */
685
   30,  /*      TQUERY => ID */
685
   30,  /*      QUERY => ID */
686
   30,  /*       PLAN => ID */
686
   30,  /*       PLAN => ID */
687
   30,  /*      BEGIN => ID */
687
   30,  /*      BEGIN => ID */
688
    0,  /* TRANSACTION => nothing */
688
    0,  /* TRANSACTION => nothing */
Lines 770-776 Link Here
770
    0,  /*    DEFAULT => nothing */
770
    0,  /*    DEFAULT => nothing */
771
    0,  /*       NULL => nothing */
771
    0,  /*       NULL => nothing */
772
    0,  /*    PRIMARY => nothing */
772
    0,  /*    PRIMARY => nothing */
773
    0,  /*     UNITQUE => nothing */
773
    0,  /*     UNIQUE => nothing */
774
    0,  /*      CHECK => nothing */
774
    0,  /*      CHECK => nothing */
775
    0,  /* REFERENCES => nothing */
775
    0,  /* REFERENCES => nothing */
776
    0,  /*    COLLATE => nothing */
776
    0,  /*    COLLATE => nothing */
Lines 910-916 Link Here
910
  "STAR",          "SLASH",         "REM",           "CONCAT",      
910
  "STAR",          "SLASH",         "REM",           "CONCAT",      
911
  "UMINUS",        "UPLUS",         "BITNOT",        "STRING",      
911
  "UMINUS",        "UPLUS",         "BITNOT",        "STRING",      
912
  "JOIN_KW",       "CONSTRAINT",    "DEFAULT",       "NULL",        
912
  "JOIN_KW",       "CONSTRAINT",    "DEFAULT",       "NULL",        
913
  "PRIMARY",       "UNITQUE",        "CHECK",         "REFERENCES",  
913
  "PRIMARY",       "UNIQUE",        "CHECK",         "REFERENCES",  
914
  "COLLATE",       "AUTOINCR",      "ON",            "DELETE",      
914
  "COLLATE",       "AUTOINCR",      "ON",            "DELETE",      
915
  "UPDATE",        "INSERT",        "SET",           "DEFERRABLE",  
915
  "UPDATE",        "INSERT",        "SET",           "DEFERRABLE",  
916
  "FOREIGN",       "DROP",          "UNION",         "ALL",         
916
  "FOREIGN",       "DROP",          "UNION",         "ALL",         
Lines 962-968 Link Here
962
 /*   5 */ "ecmd ::= explain cmdx SEMI",
962
 /*   5 */ "ecmd ::= explain cmdx SEMI",
963
 /*   6 */ "explain ::=",
963
 /*   6 */ "explain ::=",
964
 /*   7 */ "explain ::= EXPLAIN",
964
 /*   7 */ "explain ::= EXPLAIN",
965
 /*   8 */ "explain ::= EXPLAIN TQUERY PLAN",
965
 /*   8 */ "explain ::= EXPLAIN QUERY PLAN",
966
 /*   9 */ "cmd ::= BEGIN transtype trans_opt",
966
 /*   9 */ "cmd ::= BEGIN transtype trans_opt",
967
 /*  10 */ "trans_opt ::=",
967
 /*  10 */ "trans_opt ::=",
968
 /*  11 */ "trans_opt ::= TRANSACTION",
968
 /*  11 */ "trans_opt ::= TRANSACTION",
Lines 1011-1017 Link Here
1011
 /*  54 */ "ccons ::= NULL onconf",
1011
 /*  54 */ "ccons ::= NULL onconf",
1012
 /*  55 */ "ccons ::= NOT NULL onconf",
1012
 /*  55 */ "ccons ::= NOT NULL onconf",
1013
 /*  56 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
1013
 /*  56 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
1014
 /*  57 */ "ccons ::= UNITQUE onconf",
1014
 /*  57 */ "ccons ::= UNIQUE onconf",
1015
 /*  58 */ "ccons ::= CHECK LP expr RP onconf",
1015
 /*  58 */ "ccons ::= CHECK LP expr RP onconf",
1016
 /*  59 */ "ccons ::= REFERENCES nm idxlist_opt refargs",
1016
 /*  59 */ "ccons ::= REFERENCES nm idxlist_opt refargs",
1017
 /*  60 */ "ccons ::= defer_subclause",
1017
 /*  60 */ "ccons ::= defer_subclause",
Lines 1040-1046 Link Here
1040
 /*  83 */ "conslist ::= tcons",
1040
 /*  83 */ "conslist ::= tcons",
1041
 /*  84 */ "tcons ::= CONSTRAINT nm",
1041
 /*  84 */ "tcons ::= CONSTRAINT nm",
1042
 /*  85 */ "tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf",
1042
 /*  85 */ "tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf",
1043
 /*  86 */ "tcons ::= UNITQUE LP idxlist RP onconf",
1043
 /*  86 */ "tcons ::= UNIQUE LP idxlist RP onconf",
1044
 /*  87 */ "tcons ::= CHECK expr onconf",
1044
 /*  87 */ "tcons ::= CHECK expr onconf",
1045
 /*  88 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt",
1045
 /*  88 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt",
1046
 /*  89 */ "defer_subclause_opt ::=",
1046
 /*  89 */ "defer_subclause_opt ::=",
Lines 1199-1205 Link Here
1199
 /* 242 */ "expritem ::= expr",
1199
 /* 242 */ "expritem ::= expr",
1200
 /* 243 */ "expritem ::=",
1200
 /* 243 */ "expritem ::=",
1201
 /* 244 */ "cmd ::= CREATE uniqueflag INDEX nm dbnm ON nm LP idxlist RP onconf",
1201
 /* 244 */ "cmd ::= CREATE uniqueflag INDEX nm dbnm ON nm LP idxlist RP onconf",
1202
 /* 245 */ "uniqueflag ::= UNITQUE",
1202
 /* 245 */ "uniqueflag ::= UNIQUE",
1203
 /* 246 */ "uniqueflag ::=",
1203
 /* 246 */ "uniqueflag ::=",
1204
 /* 247 */ "idxlist_opt ::=",
1204
 /* 247 */ "idxlist_opt ::=",
1205
 /* 248 */ "idxlist_opt ::= LP idxlist RP",
1205
 /* 248 */ "idxlist_opt ::= LP idxlist RP",
(-)koffice/kexi/3rdparty/kexisql3/src/parse.h (-2 / +2 lines)
Lines 10-16 Link Here
10
#define TK_CONST_FUNC                     10
10
#define TK_CONST_FUNC                     10
11
#define TK_SEMI                           11
11
#define TK_SEMI                           11
12
#define TK_EXPLAIN                        12
12
#define TK_EXPLAIN                        12
13
#define TK_TQUERY                          13
13
#define TK_QUERY                          13
14
#define TK_PLAN                           14
14
#define TK_PLAN                           14
15
#define TK_BEGIN                          15
15
#define TK_BEGIN                          15
16
#define TK_TRANSACTION                    16
16
#define TK_TRANSACTION                    16
Lines 98-104 Link Here
98
#define TK_DEFAULT                        98
98
#define TK_DEFAULT                        98
99
#define TK_NULL                           99
99
#define TK_NULL                           99
100
#define TK_PRIMARY                        100
100
#define TK_PRIMARY                        100
101
#define TK_UNITQUE                         101
101
#define TK_UNIQUE                         101
102
#define TK_CHECK                          102
102
#define TK_CHECK                          102
103
#define TK_REFERENCES                     103
103
#define TK_REFERENCES                     103
104
#define TK_COLLATE                        104
104
#define TK_COLLATE                        104
(-)koffice/kexi/3rdparty/kexisql3/src/prepare.c (-1 / +1 lines)
Lines 77-83 Link Here
77
    }
77
    }
78
  }else{
78
  }else{
79
    /* If the SQL column is blank it means this is an index that
79
    /* If the SQL column is blank it means this is an index that
80
    ** was created to be the PRIMARY KEY or to fulfill a UNITQUE
80
    ** was created to be the PRIMARY KEY or to fulfill a UNIQUE
81
    ** constraint for a CREATE TABLE.  The index should have already
81
    ** constraint for a CREATE TABLE.  The index should have already
82
    ** been created when we processed the CREATE TABLE.  All we have
82
    ** been created when we processed the CREATE TABLE.  All we have
83
    ** to do here is record the root page number for that index.
83
    ** to do here is record the root page number for that index.
(-)koffice/kexi/3rdparty/kexisql3/src/select.c (-8 / +8 lines)
Lines 518-524 Link Here
518
      break;
518
      break;
519
    }
519
    }
520
520
521
#ifndef SQLITE_OMIT_SUBTQUERY
521
#ifndef SQLITE_OMIT_SUBQUERY
522
    /* If we are creating a set for an "expr IN (SELECT ...)" construct,
522
    /* If we are creating a set for an "expr IN (SELECT ...)" construct,
523
    ** then there should be a single item on the stack.  Write this
523
    ** then there should be a single item on the stack.  Write this
524
    ** item into the set table with bogus data.
524
    ** item into the set table with bogus data.
Lines 562-568 Link Here
562
      }
562
      }
563
      break;
563
      break;
564
    }
564
    }
565
#endif /* #ifndef SQLITE_OMIT_SUBTQUERY */
565
#endif /* #ifndef SQLITE_OMIT_SUBQUERY */
566
566
567
    /* Send the data to the callback function or to a subroutine.  In the
567
    /* Send the data to the callback function or to a subroutine.  In the
568
    ** case of a subroutine, the subroutine itself is responsible for
568
    ** case of a subroutine, the subroutine itself is responsible for
Lines 671-677 Link Here
671
      sqlite3VdbeAddOp(v, OP_Insert, iParm, 0);
671
      sqlite3VdbeAddOp(v, OP_Insert, iParm, 0);
672
      break;
672
      break;
673
    }
673
    }
674
#ifndef SQLITE_OMIT_SUBTQUERY
674
#ifndef SQLITE_OMIT_SUBQUERY
675
    case SRT_Set: {
675
    case SRT_Set: {
676
      assert( nColumn==1 );
676
      assert( nColumn==1 );
677
      sqlite3VdbeAddOp(v, OP_NotNull, -1, sqlite3VdbeCurrentAddr(v)+3);
677
      sqlite3VdbeAddOp(v, OP_NotNull, -1, sqlite3VdbeCurrentAddr(v)+3);
Lines 773-779 Link Here
773
      }
773
      }
774
      break;
774
      break;
775
    }
775
    }
776
#ifndef SQLITE_OMIT_SUBTQUERY
776
#ifndef SQLITE_OMIT_SUBQUERY
777
    case TK_SELECT: {
777
    case TK_SELECT: {
778
      NameContext sNC;
778
      NameContext sNC;
779
      Select *pS = pExpr->pSelect;
779
      Select *pS = pExpr->pSelect;
Lines 1058-1064 Link Here
1058
      return 0;
1058
      return 0;
1059
    }
1059
    }
1060
    if( pFrom->zName==0 ){
1060
    if( pFrom->zName==0 ){
1061
#ifndef SQLITE_OMIT_SUBTQUERY
1061
#ifndef SQLITE_OMIT_SUBQUERY
1062
      /* A sub-query in the FROM clause of a SELECT */
1062
      /* A sub-query in the FROM clause of a SELECT */
1063
      assert( pFrom->pSelect!=0 );
1063
      assert( pFrom->pSelect!=0 );
1064
      if( pFrom->zAlias==0 ){
1064
      if( pFrom->zAlias==0 ){
Lines 2664-2670 Link Here
2664
  ** only a single column may be output.
2664
  ** only a single column may be output.
2665
  */
2665
  */
2666
  assert( eDest!=SRT_Exists || pEList->nExpr==1 );
2666
  assert( eDest!=SRT_Exists || pEList->nExpr==1 );
2667
#ifndef SQLITE_OMIT_SUBTQUERY
2667
#ifndef SQLITE_OMIT_SUBQUERY
2668
  if( (eDest==SRT_Mem || eDest==SRT_Set) && pEList->nExpr>1 ){
2668
  if( (eDest==SRT_Mem || eDest==SRT_Set) && pEList->nExpr>1 ){
2669
    sqlite3ErrorMsg(pParse, "only a single result allowed for "
2669
    sqlite3ErrorMsg(pParse, "only a single result allowed for "
2670
       "a SELECT that is part of an expression");
2670
       "a SELECT that is part of an expression");
Lines 2692-2698 Link Here
2692
2692
2693
  /* Generate code for all sub-queries in the FROM clause
2693
  /* Generate code for all sub-queries in the FROM clause
2694
  */
2694
  */
2695
#if !defined(SQLITE_OMIT_SUBTQUERY) || !defined(SQLITE_OMIT_VIEW)
2695
#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)
2696
  for(i=0; i<pTabList->nSrc; i++){
2696
  for(i=0; i<pTabList->nSrc; i++){
2697
    const char *zSavedAuthContext = 0;
2697
    const char *zSavedAuthContext = 0;
2698
    int needRestoreContext;
2698
    int needRestoreContext;
Lines 3098-3104 Link Here
3098
    generateSortTail(pParse, p, v, pEList->nExpr, eDest, iParm);
3098
    generateSortTail(pParse, p, v, pEList->nExpr, eDest, iParm);
3099
  }
3099
  }
3100
3100
3101
#ifndef SQLITE_OMIT_SUBTQUERY
3101
#ifndef SQLITE_OMIT_SUBQUERY
3102
  /* If this was a subquery, we have now converted the subquery into a
3102
  /* If this was a subquery, we have now converted the subquery into a
3103
  ** temporary table.  So delete the subquery structure from the parent
3103
  ** temporary table.  So delete the subquery structure from the parent
3104
  ** to prevent this subquery from being evaluated again and to force the
3104
  ** to prevent this subquery from being evaluated again and to force the
(-)koffice/kexi/3rdparty/kexisql3/src/sqliteInt.h (-6 / +6 lines)
Lines 104-119 Link Here
104
/*
104
/*
105
** If the following macro is set to 1, then NULL values are considered
105
** If the following macro is set to 1, then NULL values are considered
106
** distinct when determining whether or not two entries are the same
106
** distinct when determining whether or not two entries are the same
107
** in a UNITQUE index.  This is the way PostgreSQL, Oracle, DB2, MySQL,
107
** in a UNIQUE index.  This is the way PostgreSQL, Oracle, DB2, MySQL,
108
** OCELOT, and Firebird all work.  The SQL92 spec explicitly says this
108
** OCELOT, and Firebird all work.  The SQL92 spec explicitly says this
109
** is the way things are suppose to work.
109
** is the way things are suppose to work.
110
**
110
**
111
** If the following macro is set to 0, the NULLs are indistinct for
111
** If the following macro is set to 0, the NULLs are indistinct for
112
** a UNITQUE index.  In this mode, you can only have a single NULL entry
112
** a UNIQUE index.  In this mode, you can only have a single NULL entry
113
** for a column declared UNITQUE.  This is the way Informix and SQL Server
113
** for a column declared UNIQUE.  This is the way Informix and SQL Server
114
** work.
114
** work.
115
*/
115
*/
116
#define NULL_DISTINCT_FOR_UNITQUE 1
116
#define NULL_DISTINCT_FOR_UNIQUE 1
117
117
118
/*
118
/*
119
** The maximum number of attached databases.  This must be at least 2
119
** The maximum number of attached databases.  This must be at least 2
Lines 700-706 Link Here
700
** occurs.  IGNORE means that the particular row that caused the constraint
700
** occurs.  IGNORE means that the particular row that caused the constraint
701
** error is not inserted or updated.  Processing continues and no error
701
** error is not inserted or updated.  Processing continues and no error
702
** is returned.  REPLACE means that preexisting database rows that caused
702
** is returned.  REPLACE means that preexisting database rows that caused
703
** a UNITQUE constraint violation are removed so that the new insert or
703
** a UNIQUE constraint violation are removed so that the new insert or
704
** update can proceed.  Processing continues and no error is reported.
704
** update can proceed.  Processing continues and no error is reported.
705
**
705
**
706
** RESTRICT, SETNULL, and CASCADE actions apply only to foreign keys.
706
** RESTRICT, SETNULL, and CASCADE actions apply only to foreign keys.
Lines 779-785 Link Here
779
  Table *pTable;   /* The SQL table being indexed */
779
  Table *pTable;   /* The SQL table being indexed */
780
  int tnum;        /* Page containing root of this index in database file */
780
  int tnum;        /* Page containing root of this index in database file */
781
  u8 onError;      /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
781
  u8 onError;      /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
782
  u8 autoIndex;    /* True if is automatically created (ex: by UNITQUE) */
782
  u8 autoIndex;    /* True if is automatically created (ex: by UNIQUE) */
783
  u8 iDb;          /* Index in sqlite.aDb[] of where this index is stored */
783
  u8 iDb;          /* Index in sqlite.aDb[] of where this index is stored */
784
  char *zColAff;   /* String defining the affinity of each column */
784
  char *zColAff;   /* String defining the affinity of each column */
785
  Index *pNext;    /* The next index associated with the same table */
785
  Index *pNext;    /* The next index associated with the same table */
(-)koffice/kexi/3rdparty/kexisql3/src/vacuum.c (-2 / +2 lines)
Lines 212-219 Link Here
212
      "  FROM sqlite_master WHERE sql LIKE 'CREATE INDEX %' ", 0);
212
      "  FROM sqlite_master WHERE sql LIKE 'CREATE INDEX %' ", 0);
213
  if( rc!=SQLITE_OK ) goto end_of_vacuum;
213
  if( rc!=SQLITE_OK ) goto end_of_vacuum;
214
  rc = execExecSql(db, 
214
  rc = execExecSql(db, 
215
      "SELECT 'CREATE UNITQUE INDEX vacuum_db.' || substr(sql,21,100000000) "
215
      "SELECT 'CREATE UNIQUE INDEX vacuum_db.' || substr(sql,21,100000000) "
216
      "  FROM sqlite_master WHERE sql LIKE 'CREATE UNITQUE INDEX %'", 0);
216
      "  FROM sqlite_master WHERE sql LIKE 'CREATE UNIQUE INDEX %'", 0);
217
  if( rc!=SQLITE_OK ) goto end_of_vacuum;
217
  if( rc!=SQLITE_OK ) goto end_of_vacuum;
218
  rc = execExecSql(db, 
218
  rc = execExecSql(db, 
219
      "SELECT 'CREATE VIEW vacuum_db.' || substr(sql,13,100000000) "
219
      "SELECT 'CREATE VIEW vacuum_db.' || substr(sql,13,100000000) "
(-)koffice/kexi/3rdparty/kexisql3/src/vdbe.c (-2 / +2 lines)
Lines 1676-1682 Link Here
1676
*/
1676
*/
1677
/*
1677
/*
1678
** The magic Explain opcode are only inserted when explain==2 (which
1678
** The magic Explain opcode are only inserted when explain==2 (which
1679
** is to say when the EXPLAIN TQUERY PLAN syntax is used.)
1679
** is to say when the EXPLAIN QUERY PLAN syntax is used.)
1680
** This opcode records information from the optimizer.  It is the
1680
** This opcode records information from the optimizer.  It is the
1681
** the same as a no-op.  This opcodesnever appears in a real VM program.
1681
** the same as a no-op.  This opcodesnever appears in a real VM program.
1682
*/
1682
*/
Lines 2956-2962 Link Here
2956
    }
2956
    }
2957
2957
2958
    /* The final varint of the key is different from R.  Push it onto
2958
    /* The final varint of the key is different from R.  Push it onto
2959
    ** the stack.  (The record number of an entry that violates a UNITQUE
2959
    ** the stack.  (The record number of an entry that violates a UNIQUE
2960
    ** constraint.)
2960
    ** constraint.)
2961
    */
2961
    */
2962
    pTos++;
2962
    pTos++;
(-)koffice/kexi/3rdparty/kexisql3/src/where.c (-6 / +6 lines)
Lines 170-176 Link Here
170
#define WHERE_IDX_ONLY       0x0800   /* Use index only - omit table */
170
#define WHERE_IDX_ONLY       0x0800   /* Use index only - omit table */
171
#define WHERE_ORDERBY        0x1000   /* Output will appear in correct order */
171
#define WHERE_ORDERBY        0x1000   /* Output will appear in correct order */
172
#define WHERE_REVERSE        0x2000   /* Scan in reverse order */
172
#define WHERE_REVERSE        0x2000   /* Scan in reverse order */
173
#define WHERE_UNITQUE         0x4000   /* Selects no more than one row */
173
#define WHERE_UNIQUE         0x4000   /* Selects no more than one row */
174
174
175
/*
175
/*
176
** Initialize a preallocated WhereClause structure.
176
** Initialize a preallocated WhereClause structure.
Lines 747-753 Link Here
747
** clause and the match can still be a success.
747
** clause and the match can still be a success.
748
**
748
**
749
** All terms of the ORDER BY that match against the index must be either
749
** All terms of the ORDER BY that match against the index must be either
750
** ASC or DESC.  (Terms of the ORDER BY clause past the end of a UNITQUE
750
** ASC or DESC.  (Terms of the ORDER BY clause past the end of a UNIQUE
751
** index do not need to satisfy this constraint.)  The *pbRev value is
751
** index do not need to satisfy this constraint.)  The *pbRev value is
752
** set to 1 if the ORDER BY clause is all DESC and it is set to 0 if
752
** set to 1 if the ORDER BY clause is all DESC and it is set to 0 if
753
** the ORDER BY clause is all ASC.
753
** the ORDER BY clause is all ASC.
Lines 915-921 Link Here
915
    if( pTerm->operator & WO_EQ ){
915
    if( pTerm->operator & WO_EQ ){
916
      /* Rowid== is always the best pick.  Look no further.  Because only
916
      /* Rowid== is always the best pick.  Look no further.  Because only
917
      ** a single row is generated, output is always in sorted order */
917
      ** a single row is generated, output is always in sorted order */
918
      *pFlags = WHERE_ROWID_EQ | WHERE_UNITQUE;
918
      *pFlags = WHERE_ROWID_EQ | WHERE_UNIQUE;
919
      *pnEq = 1;
919
      *pnEq = 1;
920
      TRACE(("... best is rowid\n"));
920
      TRACE(("... best is rowid\n"));
921
      return 0.0;
921
      return 0.0;
Lines 1007-1013 Link Here
1007
    nEq = i;
1007
    nEq = i;
1008
    if( pProbe->onError!=OE_None && (flags & WHERE_COLUMN_IN)==0
1008
    if( pProbe->onError!=OE_None && (flags & WHERE_COLUMN_IN)==0
1009
         && nEq==pProbe->nColumn ){
1009
         && nEq==pProbe->nColumn ){
1010
      flags |= WHERE_UNITQUE;
1010
      flags |= WHERE_UNIQUE;
1011
    }
1011
    }
1012
    TRACE(("...... nEq=%d inMult=%.9g cost=%.9g\n", nEq, inMultiplier, cost));
1012
    TRACE(("...... nEq=%d inMult=%.9g cost=%.9g\n", nEq, inMultiplier, cost));
1013
1013
Lines 1169-1175 Link Here
1169
  if( pX->op!=TK_IN ){
1169
  if( pX->op!=TK_IN ){
1170
    assert( pX->op==TK_EQ );
1170
    assert( pX->op==TK_EQ );
1171
    sqlite3ExprCode(pParse, pX->pRight);
1171
    sqlite3ExprCode(pParse, pX->pRight);
1172
#ifndef SQLITE_OMIT_SUBTQUERY
1172
#ifndef SQLITE_OMIT_SUBQUERY
1173
  }else{
1173
  }else{
1174
    int iTab;
1174
    int iTab;
1175
    int *aIn;
1175
    int *aIn;
Lines 1514-1520 Link Here
1514
  /* If the total query only selects a single row, then the ORDER BY
1514
  /* If the total query only selects a single row, then the ORDER BY
1515
  ** clause is irrelevant.
1515
  ** clause is irrelevant.
1516
  */
1516
  */
1517
  if( (andFlags & WHERE_UNITQUE)!=0 && ppOrderBy ){
1517
  if( (andFlags & WHERE_UNIQUE)!=0 && ppOrderBy ){
1518
    *ppOrderBy = 0;
1518
    *ppOrderBy = 0;
1519
  }
1519
  }
1520
1520
(-)koffice/kexi/kexidb/connection.cpp (-6 / +6 lines)
Lines 671-677 Link Here
671
671
672
bool Connection::useTemporaryDatabaseIfNeeded(TQString &tmpdbName)
672
bool Connection::useTemporaryDatabaseIfNeeded(TQString &tmpdbName)
673
{
673
{
674
	if (!m_driver->isFileDriver() && m_driver->beh->USING_DATABASE_RETQUIRED_TO_CONNECT
674
	if (!m_driver->isFileDriver() && m_driver->beh->USING_DATABASE_REQUIRED_TO_CONNECT
675
	 && !isDatabaseUsed()) {
675
	 && !isDatabaseUsed()) {
676
		//we have no db used, but it is required by engine to have used any!
676
		//we have no db used, but it is required by engine to have used any!
677
		tmpdbName = anyAvailableDatabaseName();
677
		tmpdbName = anyAvailableDatabaseName();
Lines 884-891 Link Here
884
			sql += ", ";
884
			sql += ", ";
885
		TQString v = escapeIdentifier(field->name()) + " ";
885
		TQString v = escapeIdentifier(field->name()) + " ";
886
		const bool autoinc = field->isAutoIncrement();
886
		const bool autoinc = field->isAutoIncrement();
887
		const bool pk = field->isPrimaryKey() || (autoinc && m_driver->beh->AUTO_INCREMENT_RETQUIRES_PK);
887
		const bool pk = field->isPrimaryKey() || (autoinc && m_driver->beh->AUTO_INCREMENT_REQUIRES_PK);
888
//TODO: warning: ^^^^^ this allows only one autonumber per table when AUTO_INCREMENT_RETQUIRES_PK==true!
888
//TODO: warning: ^^^^^ this allows only one autonumber per table when AUTO_INCREMENT_REQUIRES_PK==true!
889
		if (autoinc && m_driver->beh->SPECIAL_AUTO_INCREMENT_DEF) {
889
		if (autoinc && m_driver->beh->SPECIAL_AUTO_INCREMENT_DEF) {
890
			if (pk)
890
			if (pk)
891
				v += m_driver->beh->AUTO_INCREMENT_TYPE + " " + m_driver->beh->AUTO_INCREMENT_PK_FIELD_OPTION;
891
				v += m_driver->beh->AUTO_INCREMENT_TYPE + " " + m_driver->beh->AUTO_INCREMENT_PK_FIELD_OPTION;
Lines 918-924 Link Here
918
				if (pk)
918
				if (pk)
919
					v += " PRIMARY KEY";
919
					v += " PRIMARY KEY";
920
			if (!pk && field->isUniqueKey())
920
			if (!pk && field->isUniqueKey())
921
				v += " UNITQUE";
921
				v += " UNIQUE";
922
///@todo IS this ok for all engines?: if (!autoinc && !field->isPrimaryKey() && field->isNotNull())
922
///@todo IS this ok for all engines?: if (!autoinc && !field->isPrimaryKey() && field->isNotNull())
923
			if (!autoinc && !pk && field->isNotNull())
923
			if (!autoinc && !pk && field->isNotNull())
924
				v += " NOT NULL"; //only add not null option if no autocommit is set
924
				v += " NOT NULL"; //only add not null option if no autocommit is set
Lines 2481-2487 Link Here
2481
{
2481
{
2482
	KexiDB::Cursor *cursor;
2482
	KexiDB::Cursor *cursor;
2483
	//optimization
2483
	//optimization
2484
	if (m_driver->beh->SELECT_1_SUBTQUERY_SUPPORTED) {
2484
	if (m_driver->beh->SELECT_1_SUBQUERY_SUPPORTED) {
2485
		//this is at least for sqlite
2485
		//this is at least for sqlite
2486
		if (addLimitTo1 && sql.left(6).upper() == "SELECT")
2486
		if (addLimitTo1 && sql.left(6).upper() == "SELECT")
2487
			m_sql = TQString("SELECT 1 FROM (") + sql + ") LIMIT 1"; // is this safe?;
2487
			m_sql = TQString("SELECT 1 FROM (") + sql + ") LIMIT 1"; // is this safe?;
Lines 3279-3285 Link Here
3279
	if (b.isEmpty()) {
3279
	if (b.isEmpty()) {
3280
		// empty row inserting requested:
3280
		// empty row inserting requested:
3281
		if (!getROWID && !pkey) {
3281
		if (!getROWID && !pkey) {
3282
			KexiDBWarn << "MASTER TABLE's PKEY RETQUIRED FOR INSERTING EMPTY ROWS: INSERT CANCELLED" << endl;
3282
			KexiDBWarn << "MASTER TABLE's PKEY REQUIRED FOR INSERTING EMPTY ROWS: INSERT CANCELLED" << endl;
3283
			setError(ERR_INSERT_NO_MASTER_TABLES_PKEY,
3283
			setError(ERR_INSERT_NO_MASTER_TABLES_PKEY,
3284
				i18n("Could not insert row because master table has no primary key defined."));
3284
				i18n("Could not insert row because master table has no primary key defined."));
3285
			return false;
3285
			return false;
(-)koffice/kexi/kexidb/cursor.cpp (-1 / +1 lines)
Lines 166-172 Link Here
166
166
167
//luci:	WHAT_EXACTLY_SHOULD_THAT_BE?
167
//luci:	WHAT_EXACTLY_SHOULD_THAT_BE?
168
//	if (!m_readAhead) // jowenn: to ensure before first state, without cluttering implementation code
168
//	if (!m_readAhead) // jowenn: to ensure before first state, without cluttering implementation code
169
	if (m_conn->driver()->beh->_1ST_ROW_READ_AHEAD_RETQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY) {
169
	if (m_conn->driver()->beh->_1ST_ROW_READ_AHEAD_REQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY) {
170
//		KexiDBDbg << "READ AHEAD:" << endl;
170
//		KexiDBDbg << "READ AHEAD:" << endl;
171
		m_readAhead = getNextRecord(); //true if any record in this query
171
		m_readAhead = getNextRecord(); //true if any record in this query
172
//		KexiDBDbg << "READ AHEAD = " << m_readAhead << endl;
172
//		KexiDBDbg << "READ AHEAD = " << m_readAhead << endl;
(-)koffice/kexi/kexidb/driver.cpp (-6 / +6 lines)
Lines 49-60 Link Here
49
	, AUTO_INCREMENT_FIELD_OPTION("AUTO_INCREMENT")
49
	, AUTO_INCREMENT_FIELD_OPTION("AUTO_INCREMENT")
50
	, AUTO_INCREMENT_PK_FIELD_OPTION("AUTO_INCREMENT PRIMARY KEY")
50
	, AUTO_INCREMENT_PK_FIELD_OPTION("AUTO_INCREMENT PRIMARY KEY")
51
	, SPECIAL_AUTO_INCREMENT_DEF(false)
51
	, SPECIAL_AUTO_INCREMENT_DEF(false)
52
	, AUTO_INCREMENT_RETQUIRES_PK(false)
52
	, AUTO_INCREMENT_REQUIRES_PK(false)
53
	, ROW_ID_FIELD_RETURNS_LAST_AUTOINCREMENTED_VALUE(false)
53
	, ROW_ID_FIELD_RETURNS_LAST_AUTOINCREMENTED_VALUE(false)
54
	, TQUOTATION_MARKS_FOR_IDENTIFIER('"')
54
	, QUOTATION_MARKS_FOR_IDENTIFIER('"')
55
	, USING_DATABASE_RETQUIRED_TO_CONNECT(true)
55
	, USING_DATABASE_REQUIRED_TO_CONNECT(true)
56
	, _1ST_ROW_READ_AHEAD_RETQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY(false)
56
	, _1ST_ROW_READ_AHEAD_REQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY(false)
57
	, SELECT_1_SUBTQUERY_SUPPORTED(false)
57
	, SELECT_1_SUBQUERY_SUPPORTED(false)
58
	, SQL_KEYWORDS(0)
58
	, SQL_KEYWORDS(0)
59
{
59
{
60
}
60
}
Lines 350-356 Link Here
350
		return quote + TQCString(str).replace( quote, "\"\"" ) + quote;
350
		return quote + TQCString(str).replace( quote, "\"\"" ) + quote;
351
	}
351
	}
352
	else if (needOuterQuotes) {
352
	else if (needOuterQuotes) {
353
		const char quote = beh->TQUOTATION_MARKS_FOR_IDENTIFIER.latin1();
353
		const char quote = beh->QUOTATION_MARKS_FOR_IDENTIFIER.latin1();
354
		return quote + drv_escapeIdentifier(str) + quote;
354
		return quote + drv_escapeIdentifier(str) + quote;
355
	} else {
355
	} else {
356
		return drv_escapeIdentifier(str);
356
		return drv_escapeIdentifier(str);
(-)koffice/kexi/kexidb/driver.h (-1 / +1 lines)
Lines 319-325 Link Here
319
		 Implement escaping for any character like " or ' as your 
319
		 Implement escaping for any character like " or ' as your 
320
		 database engine requires. Do not append or prepend any quotation 
320
		 database engine requires. Do not append or prepend any quotation 
321
		 marks characters - it is automatically done by escapeIdentifier() using
321
		 marks characters - it is automatically done by escapeIdentifier() using
322
		 DriverBehaviour::TQUOTATION_MARKS_FOR_IDENTIFIER.
322
		 DriverBehaviour::QUOTATION_MARKS_FOR_IDENTIFIER.
323
		*/
323
		*/
324
		virtual TQString drv_escapeIdentifier( const TQString& str ) const = 0;
324
		virtual TQString drv_escapeIdentifier( const TQString& str ) const = 0;
325
		
325
		
(-)koffice/kexi/kexidb/driver_p.h (-5 / +5 lines)
Lines 72-78 Link Here
72
72
73
	/*! True if autoincrement requires field to be declared as primary key.
73
	/*! True if autoincrement requires field to be declared as primary key.
74
	 This is true for SQLite. False by default. */
74
	 This is true for SQLite. False by default. */
75
	bool AUTO_INCREMENT_RETQUIRES_PK : 1;
75
	bool AUTO_INCREMENT_REQUIRES_PK : 1;
76
76
77
	/*! Name of a field (or built-in function) with autoincremented unique value,
77
	/*! Name of a field (or built-in function) with autoincremented unique value,
78
	 typically returned by Connection::drv_lastInsertRowID().
78
	 typically returned by Connection::drv_lastInsertRowID().
Lines 114-120 Link Here
114
	/*! Quotation marks used for escaping identifier (see Driver::escapeIdentifier()).
114
	/*! Quotation marks used for escaping identifier (see Driver::escapeIdentifier()).
115
	 Default value is '"'. Change it for your driver.
115
	 Default value is '"'. Change it for your driver.
116
	*/
116
	*/
117
	TQChar TQUOTATION_MARKS_FOR_IDENTIFIER;
117
	TQChar QUOTATION_MARKS_FOR_IDENTIFIER;
118
	
118
	
119
	/*! True if using database is requied to perform real connection.
119
	/*! True if using database is requied to perform real connection.
120
	 This is true for may engines, e.g. for PostgreSQL, where connections 
120
	 This is true for may engines, e.g. for PostgreSQL, where connections 
Lines 122-137 Link Here
122
	 This flag is unused for file-based db drivers,
122
	 This flag is unused for file-based db drivers,
123
	 by default set to true and used for all other db drivers.
123
	 by default set to true and used for all other db drivers.
124
	*/
124
	*/
125
	bool USING_DATABASE_RETQUIRED_TO_CONNECT : 1;
125
	bool USING_DATABASE_REQUIRED_TO_CONNECT : 1;
126
126
127
	/*! True if before we know whether the fetched result of executed query
127
	/*! True if before we know whether the fetched result of executed query
128
	 is empty or not, we need to fetch first record. Particularly, it's true for SQLite.
128
	 is empty or not, we need to fetch first record. Particularly, it's true for SQLite.
129
	 The flag is used in Cursor::open(). By default this flag is false. */
129
	 The flag is used in Cursor::open(). By default this flag is false. */
130
	bool _1ST_ROW_READ_AHEAD_RETQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY : 1;
130
	bool _1ST_ROW_READ_AHEAD_REQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY : 1;
131
131
132
	/*! True if "SELECT 1 from (subquery)" is supported. False by default.
132
	/*! True if "SELECT 1 from (subquery)" is supported. False by default.
133
	 Used in Connection::resultExists() for optimization. It's set to true for SQLite driver. */
133
	 Used in Connection::resultExists() for optimization. It's set to true for SQLite driver. */
134
	bool SELECT_1_SUBTQUERY_SUPPORTED : 1;
134
	bool SELECT_1_SUBQUERY_SUPPORTED : 1;
135
135
136
	/*! Keywords that need to be escaped for the driver.  Set this before calling
136
	/*! Keywords that need to be escaped for the driver.  Set this before calling
137
	    Driver::initSQLKeywords. */
137
	    Driver::initSQLKeywords. */
(-)koffice/kexi/kexidb/drivers/mySQL/mysqldriver.cpp (-3 / +3 lines)
Lines 63-71 Link Here
63
63
64
	beh->ROW_ID_FIELD_NAME="LAST_INSERT_ID()";
64
	beh->ROW_ID_FIELD_NAME="LAST_INSERT_ID()";
65
	beh->ROW_ID_FIELD_RETURNS_LAST_AUTOINCREMENTED_VALUE=true;
65
	beh->ROW_ID_FIELD_RETURNS_LAST_AUTOINCREMENTED_VALUE=true;
66
	beh->_1ST_ROW_READ_AHEAD_RETQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY=false;
66
	beh->_1ST_ROW_READ_AHEAD_REQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY=false;
67
	beh->USING_DATABASE_RETQUIRED_TO_CONNECT=false;
67
	beh->USING_DATABASE_REQUIRED_TO_CONNECT=false;
68
	beh->TQUOTATION_MARKS_FOR_IDENTIFIER='`';
68
	beh->QUOTATION_MARKS_FOR_IDENTIFIER='`';
69
	beh->SQL_KEYWORDS = keywords;
69
	beh->SQL_KEYWORDS = keywords;
70
	initSQLKeywords(331);
70
	initSQLKeywords(331);
71
	
71
	
(-)koffice/kexi/kexidb/drivers/mySQL/mysqlkeywords.cpp (-2 / +2 lines)
Lines 177-183 Link Here
177
		"MASTER_SSL_KEY",
177
		"MASTER_SSL_KEY",
178
		"MASTER_USER",
178
		"MASTER_USER",
179
		"MAX_CONNECTIONS_PER_HOUR",
179
		"MAX_CONNECTIONS_PER_HOUR",
180
		"MAX_TQUERIES_PER_HOUR",
180
		"MAX_QUERIES_PER_HOUR",
181
		"MAX_ROWS",
181
		"MAX_ROWS",
182
		"MAX_UPDATES_PER_HOUR",
182
		"MAX_UPDATES_PER_HOUR",
183
		"MEDIUM",
183
		"MEDIUM",
Lines 246-252 Link Here
246
		"REPAIR",
246
		"REPAIR",
247
		"REPEATABLE",
247
		"REPEATABLE",
248
		"REPLICATION",
248
		"REPLICATION",
249
		"RETQUIRE",
249
		"REQUIRE",
250
		"RESET",
250
		"RESET",
251
		"RESTORE",
251
		"RESTORE",
252
		"RETURNS",
252
		"RETURNS",
(-)koffice/kexi/kexidb/drivers/pqxx/pqxxconnection.h (-2 / +2 lines)
Lines 17-24 Link Here
17
 * Boston, MA 02110-1301, USA.
17
 * Boston, MA 02110-1301, USA.
18
*/
18
*/
19
19
20
#ifndef PTQXXCONNECTION_H
20
#ifndef PQXXCONNECTION_H
21
#define PTQXXCONNECTION_H
21
#define PQXXCONNECTION_H
22
22
23
#include <tqstringlist.h>
23
#include <tqstringlist.h>
24
24
(-)koffice/kexi/kexidb/drivers/pqxx/pqxxconnection_p.h (-2 / +2 lines)
Lines 27-34 Link Here
27
// Copyright: See COPYING file that comes with this distribution
27
// Copyright: See COPYING file that comes with this distribution
28
//
28
//
29
//
29
//
30
#ifndef PTQXXSQLCONNECTIONINTERNAL_H
30
#ifndef PQXXSQLCONNECTIONINTERNAL_H
31
#define PTQXXSQLCONNECTIONINTERNAL_H
31
#define PQXXSQLCONNECTIONINTERNAL_H
32
32
33
#include <kexidb/connection_p.h>
33
#include <kexidb/connection_p.h>
34
#include <pqxx/pqxx>
34
#include <pqxx/pqxx>
(-)koffice/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp (-2 / +2 lines)
Lines 44-50 Link Here
44
pqxxSqlCursor::pqxxSqlCursor(KexiDB::Connection* conn, const TQString& statement, uint options):
44
pqxxSqlCursor::pqxxSqlCursor(KexiDB::Connection* conn, const TQString& statement, uint options):
45
	Cursor(conn,statement, options)
45
	Cursor(conn,statement, options)
46
{
46
{
47
//	KexiDBDrvDbg << "PTQXXSQLCURSOR: constructor for query statement" << endl;
47
//	KexiDBDrvDbg << "PQXXSQLCURSOR: constructor for query statement" << endl;
48
	my_conn = static_cast<pqxxSqlConnection*>(conn)->d->pqxxsql;
48
	my_conn = static_cast<pqxxSqlConnection*>(conn)->d->pqxxsql;
49
	m_options = Buffered;
49
	m_options = Buffered;
50
	m_res = 0;
50
	m_res = 0;
Lines 57-63 Link Here
57
pqxxSqlCursor::pqxxSqlCursor(Connection* conn, QuerySchema& query, uint options )
57
pqxxSqlCursor::pqxxSqlCursor(Connection* conn, QuerySchema& query, uint options )
58
	: Cursor( conn, query, options )
58
	: Cursor( conn, query, options )
59
{
59
{
60
//	KexiDBDrvDbg << "PTQXXSQLCURSOR: constructor for query schema" << endl;
60
//	KexiDBDrvDbg << "PQXXSQLCURSOR: constructor for query schema" << endl;
61
	my_conn = static_cast<pqxxSqlConnection*>(conn)->d->pqxxsql;
61
	my_conn = static_cast<pqxxSqlConnection*>(conn)->d->pqxxsql;
62
	m_options = Buffered;
62
	m_options = Buffered;
63
	m_res = 0;
63
	m_res = 0;
(-)koffice/kexi/kexidb/drivers/pqxx/pqxxcursor.h (-2 / +2 lines)
Lines 17-24 Link Here
17
 * Boston, MA 02110-1301, USA.
17
 * Boston, MA 02110-1301, USA.
18
*/
18
*/
19
19
20
#ifndef KEXIDB_CURSOR_PTQXX_H
20
#ifndef KEXIDB_CURSOR_PQXX_H
21
#define KEXIDB_CURSOR_PTQXX_H
21
#define KEXIDB_CURSOR_PQXX_H
22
22
23
#include <kexidb/cursor.h>
23
#include <kexidb/cursor.h>
24
#include <kexidb/connection.h>
24
#include <kexidb/connection.h>
(-)koffice/kexi/kexidb/drivers/pqxx/pqxxdriver.cpp (-1 / +1 lines)
Lines 47-53 Link Here
47
	beh->AUTO_INCREMENT_FIELD_OPTION = "";
47
	beh->AUTO_INCREMENT_FIELD_OPTION = "";
48
	beh->AUTO_INCREMENT_PK_FIELD_OPTION = "PRIMARY KEY";
48
	beh->AUTO_INCREMENT_PK_FIELD_OPTION = "PRIMARY KEY";
49
	beh->ALWAYS_AVAILABLE_DATABASE_NAME = "template1";
49
	beh->ALWAYS_AVAILABLE_DATABASE_NAME = "template1";
50
	beh->TQUOTATION_MARKS_FOR_IDENTIFIER = '"';
50
	beh->QUOTATION_MARKS_FOR_IDENTIFIER = '"';
51
	beh->SQL_KEYWORDS = keywords;
51
	beh->SQL_KEYWORDS = keywords;
52
	initSQLKeywords(233);
52
	initSQLKeywords(233);
53
53
(-)koffice/kexi/kexidb/drivers/pqxx/pqxxdriver.h (-2 / +2 lines)
Lines 17-24 Link Here
17
 * Boston, MA 02110-1301, USA.
17
 * Boston, MA 02110-1301, USA.
18
*/
18
*/
19
19
20
#ifndef KEXIDB_DRIVER_PTQXX_H
20
#ifndef KEXIDB_DRIVER_PQXX_H
21
#define KEXIDB_DRIVER_PTQXX_H
21
#define KEXIDB_DRIVER_PQXX_H
22
22
23
#include <tqstringlist.h>
23
#include <tqstringlist.h>
24
24
(-)koffice/kexi/kexidb/drivers/pqxx/pqxxpreparedstatement.h (-2 / +2 lines)
Lines 22-29 Link Here
22
// Description: 
22
// Description: 
23
//
23
//
24
//
24
//
25
#ifndef PTQXXPREPAREDSTATEMENT_H
25
#ifndef PQXXPREPAREDSTATEMENT_H
26
#define PTQXXPREPAREDSTATEMENT_H
26
#define PQXXPREPAREDSTATEMENT_H
27
#include <kexidb/preparedstatement.h>
27
#include <kexidb/preparedstatement.h>
28
#include <kexidb/connection_p.h>
28
#include <kexidb/connection_p.h>
29
29
(-)koffice/kexi/kexidb/drivers/sqlite/sqlitedriver.cpp (-4 / +4 lines)
Lines 66-76 Link Here
66
	beh->AUTO_INCREMENT_FIELD_OPTION = ""; //not available
66
	beh->AUTO_INCREMENT_FIELD_OPTION = ""; //not available
67
	beh->AUTO_INCREMENT_TYPE = "INTEGER";
67
	beh->AUTO_INCREMENT_TYPE = "INTEGER";
68
	beh->AUTO_INCREMENT_PK_FIELD_OPTION = "PRIMARY KEY";
68
	beh->AUTO_INCREMENT_PK_FIELD_OPTION = "PRIMARY KEY";
69
	beh->AUTO_INCREMENT_RETQUIRES_PK = true;
69
	beh->AUTO_INCREMENT_REQUIRES_PK = true;
70
	beh->ROW_ID_FIELD_NAME = "OID";
70
	beh->ROW_ID_FIELD_NAME = "OID";
71
	beh->_1ST_ROW_READ_AHEAD_RETQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY=true;
71
	beh->_1ST_ROW_READ_AHEAD_REQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY=true;
72
	beh->TQUOTATION_MARKS_FOR_IDENTIFIER='"';
72
	beh->QUOTATION_MARKS_FOR_IDENTIFIER='"';
73
	beh->SELECT_1_SUBTQUERY_SUPPORTED = true;
73
	beh->SELECT_1_SUBQUERY_SUPPORTED = true;
74
	beh->SQL_KEYWORDS = keywords;
74
	beh->SQL_KEYWORDS = keywords;
75
	initSQLKeywords(29);
75
	initSQLKeywords(29);
76
76
(-)koffice/kexi/kexidb/expression.cpp (-1 / +1 lines)
Lines 564-570 Link Here
564
564
565
//=========================================
565
//=========================================
566
QueryParameterExpr::QueryParameterExpr(const TQString& message)
566
QueryParameterExpr::QueryParameterExpr(const TQString& message)
567
: ConstExpr( TQUERY_PARAMETER, message )
567
: ConstExpr( QUERY_PARAMETER, message )
568
, m_type(Field::Text)
568
, m_type(Field::Text)
569
{
569
{
570
	m_cl = KexiDBExpr_QueryParameter;
570
	m_cl = KexiDBExpr_QueryParameter;
(-)koffice/kexi/kexidb/field.cpp (-1 / +1 lines)
Lines 598-604 Link Here
598
	if (m_constraints & Field::AutoInc)
598
	if (m_constraints & Field::AutoInc)
599
		dbg += " AUTOINC";
599
		dbg += " AUTOINC";
600
	if (m_constraints & Field::Unique)
600
	if (m_constraints & Field::Unique)
601
		dbg += " UNITQUE";
601
		dbg += " UNIQUE";
602
	if (m_constraints & Field::PrimaryKey)
602
	if (m_constraints & Field::PrimaryKey)
603
		dbg += " PKEY";
603
		dbg += " PKEY";
604
	if (m_constraints & Field::ForeignKey)
604
	if (m_constraints & Field::ForeignKey)
(-)koffice/kexi/kexidb/indexschema.cpp (-1 / +1 lines)
Lines 157-163 Link Here
157
		+ (m_isForeignKey ? "FOREIGN KEY " : "")
157
		+ (m_isForeignKey ? "FOREIGN KEY " : "")
158
		+ (m_isAutoGenerated ? "AUTOGENERATED " : "")
158
		+ (m_isAutoGenerated ? "AUTOGENERATED " : "")
159
		+ (m_primary ? "PRIMARY " : "")
159
		+ (m_primary ? "PRIMARY " : "")
160
		+ ((!m_primary) && m_unique ? "UNITQUE " : "")
160
		+ ((!m_primary) && m_unique ? "UNIQUE " : "")
161
		+ FieldList::debugString();
161
		+ FieldList::debugString();
162
}
162
}
163
163
(-)koffice/kexi/kexidb/indexschema.h (-5 / +5 lines)
Lines 118-124 Link Here
118
			Auto-generated index is one-field index
118
			Auto-generated index is one-field index
119
			that was automatically generated 
119
			that was automatically generated 
120
			for CREATE TABLE statement when the field has 
120
			for CREATE TABLE statement when the field has 
121
			UNITQUE or PRIMARY KEY constraint enabled.
121
			UNIQUE or PRIMARY KEY constraint enabled.
122
			
122
			
123
			Any newly created IndexSchema object 
123
			Any newly created IndexSchema object 
124
			has this flag set to false.
124
			has this flag set to false.
Lines 137-152 Link Here
137
		
137
		
138
		/*! Sets PRIMARY KEY flag. \sa isPrimary().
138
		/*! Sets PRIMARY KEY flag. \sa isPrimary().
139
		 Note: Setting PRIMARY KEY on (true), 
139
		 Note: Setting PRIMARY KEY on (true), 
140
		 UNITQUE flag will be also implicity set. */
140
		 UNIQUE flag will be also implicity set. */
141
		void setPrimaryKey(bool set);
141
		void setPrimaryKey(bool set);
142
142
143
		/*! \return true if this is unique index. 
143
		/*! \return true if this is unique index. 
144
		 This can be one or multifield. */
144
		 This can be one or multifield. */
145
		bool isUnique() const;
145
		bool isUnique() const;
146
		
146
		
147
		/*! Sets UNITQUE flag. \sa isUnique(). 
147
		/*! Sets UNIQUE flag. \sa isUnique(). 
148
		 Note: Setting UNITQUE off (false), PRIMARY KEY flag will 
148
		 Note: Setting UNIQUE off (false), PRIMARY KEY flag will 
149
		 be also implicity set off, because this UNITQUE 
149
		 be also implicity set off, because this UNIQUE 
150
		 is the requirement for PRIMARY KEYS. */
150
		 is the requirement for PRIMARY KEYS. */
151
		void setUnique(bool set);
151
		void setUnique(bool set);
152
152
(-)koffice/kexi/kexidb/keywords.cpp (-1 / +1 lines)
Lines 82-88 Link Here
82
		"THEN",
82
		"THEN",
83
		"TRANSACTION",
83
		"TRANSACTION",
84
		"UNION",
84
		"UNION",
85
		"UNITQUE",
85
		"UNIQUE",
86
		"UPDATE",
86
		"UPDATE",
87
		"USING",
87
		"USING",
88
		"VALUES",
88
		"VALUES",
(-)koffice/kexi/kexidb/lookupfieldschema.cpp (-1 / +1 lines)
Lines 169-175 Link Here
169
				| <type>table|query|sql|valuelist|fieldlist</type>  #required because there can be table and query with the same name
169
				| <type>table|query|sql|valuelist|fieldlist</type>  #required because there can be table and query with the same name
170
									"fieldlist" (basically a list of column names of a table/query,
170
									"fieldlist" (basically a list of column names of a table/query,
171
											  "Field List" as in MSA)
171
											  "Field List" as in MSA)
172
				<name>string</name> #table/query name, etc. or KEXISQL SELECT TQUERY
172
				<name>string</name> #table/query name, etc. or KEXISQL SELECT QUERY
173
				<values><value>...</value> #for "valuelist" type
173
				<values><value>...</value> #for "valuelist" type
174
					<value>...</value>
174
					<value>...</value>
175
				</values>
175
				</values>
(-)koffice/kexi/kexidb/parser/sqlparser.cpp (-18 / +18 lines)
Lines 174-185 Link Here
174
     DISTINCT = 363,
174
     DISTINCT = 363,
175
     DOMAIN_TOKEN = 364,
175
     DOMAIN_TOKEN = 364,
176
     SQL_DOUBLE = 365,
176
     SQL_DOUBLE = 365,
177
     DOUBLE_TQUOTED_STRING = 366,
177
     DOUBLE_QUOTED_STRING = 366,
178
     DROP = 367,
178
     DROP = 367,
179
     ELSE = 368,
179
     ELSE = 368,
180
     END = 369,
180
     END = 369,
181
     END_EXEC = 370,
181
     END_EXEC = 370,
182
     ETQUAL = 371,
182
     EQUAL = 371,
183
     ESCAPE = 372,
183
     ESCAPE = 372,
184
     EXCEPT = 373,
184
     EXCEPT = 373,
185
     SQL_EXCEPTION = 374,
185
     SQL_EXCEPTION = 374,
Lines 296-302 Link Here
296
     PARTIAL = 485,
296
     PARTIAL = 485,
297
     SQL_PASCAL = 486,
297
     SQL_PASCAL = 486,
298
     PERSISTENT = 487,
298
     PERSISTENT = 487,
299
     CTQL_PI = 488,
299
     CQL_PI = 488,
300
     PLI = 489,
300
     PLI = 489,
301
     POSITION = 490,
301
     POSITION = 490,
302
     PRECISION = 491,
302
     PRECISION = 491,
Lines 308-315 Link Here
308
     PROCEDURE = 497,
308
     PROCEDURE = 497,
309
     PRODUCT = 498,
309
     PRODUCT = 498,
310
     PUBLIC = 499,
310
     PUBLIC = 499,
311
     TQUARTER = 500,
311
     QUARTER = 500,
312
     TQUIT = 501,
312
     QUIT = 501,
313
     RAND = 502,
313
     RAND = 502,
314
     READ_ONLY = 503,
314
     READ_ONLY = 503,
315
     REAL = 504,
315
     REAL = 504,
Lines 381-387 Link Here
381
     TWO_DIGITS = 570,
381
     TWO_DIGITS = 570,
382
     UCASE = 571,
382
     UCASE = 571,
383
     UNION = 572,
383
     UNION = 572,
384
     UNITQUE = 573,
384
     UNIQUE = 573,
385
     SQL_UNKNOWN = 574,
385
     SQL_UNKNOWN = 574,
386
     UPDATE = 575,
386
     UPDATE = 575,
387
     UPPER = 576,
387
     UPPER = 576,
Lines 389-395 Link Here
389
     USER = 578,
389
     USER = 578,
390
     IDENTIFIER = 579,
390
     IDENTIFIER = 579,
391
     IDENTIFIER_DOT_ASTERISK = 580,
391
     IDENTIFIER_DOT_ASTERISK = 580,
392
     TQUERY_PARAMETER = 581,
392
     QUERY_PARAMETER = 581,
393
     USING = 582,
393
     USING = 582,
394
     VALUE = 583,
394
     VALUE = 583,
395
     VALUES = 584,
395
     VALUES = 584,
Lines 524-535 Link Here
524
#define DISTINCT 363
524
#define DISTINCT 363
525
#define DOMAIN_TOKEN 364
525
#define DOMAIN_TOKEN 364
526
#define SQL_DOUBLE 365
526
#define SQL_DOUBLE 365
527
#define DOUBLE_TQUOTED_STRING 366
527
#define DOUBLE_QUOTED_STRING 366
528
#define DROP 367
528
#define DROP 367
529
#define ELSE 368
529
#define ELSE 368
530
#define END 369
530
#define END 369
531
#define END_EXEC 370
531
#define END_EXEC 370
532
#define ETQUAL 371
532
#define EQUAL 371
533
#define ESCAPE 372
533
#define ESCAPE 372
534
#define EXCEPT 373
534
#define EXCEPT 373
535
#define SQL_EXCEPTION 374
535
#define SQL_EXCEPTION 374
Lines 646-652 Link Here
646
#define PARTIAL 485
646
#define PARTIAL 485
647
#define SQL_PASCAL 486
647
#define SQL_PASCAL 486
648
#define PERSISTENT 487
648
#define PERSISTENT 487
649
#define CTQL_PI 488
649
#define CQL_PI 488
650
#define PLI 489
650
#define PLI 489
651
#define POSITION 490
651
#define POSITION 490
652
#define PRECISION 491
652
#define PRECISION 491
Lines 658-665 Link Here
658
#define PROCEDURE 497
658
#define PROCEDURE 497
659
#define PRODUCT 498
659
#define PRODUCT 498
660
#define PUBLIC 499
660
#define PUBLIC 499
661
#define TQUARTER 500
661
#define QUARTER 500
662
#define TQUIT 501
662
#define QUIT 501
663
#define RAND 502
663
#define RAND 502
664
#define READ_ONLY 503
664
#define READ_ONLY 503
665
#define REAL 504
665
#define REAL 504
Lines 731-737 Link Here
731
#define TWO_DIGITS 570
731
#define TWO_DIGITS 570
732
#define UCASE 571
732
#define UCASE 571
733
#define UNION 572
733
#define UNION 572
734
#define UNITQUE 573
734
#define UNIQUE 573
735
#define SQL_UNKNOWN 574
735
#define SQL_UNKNOWN 574
736
#define UPDATE 575
736
#define UPDATE 575
737
#define UPPER 576
737
#define UPPER 576
Lines 739-745 Link Here
739
#define USER 578
739
#define USER 578
740
#define IDENTIFIER 579
740
#define IDENTIFIER 579
741
#define IDENTIFIER_DOT_ASTERISK 580
741
#define IDENTIFIER_DOT_ASTERISK 580
742
#define TQUERY_PARAMETER 581
742
#define QUERY_PARAMETER 581
743
#define USING 582
743
#define USING 582
744
#define VALUE 583
744
#define VALUE 583
745
#define VALUES 584
745
#define VALUES 584
Lines 1290-1297 Link Here
1290
  "DEC", "DECLARE", "DEFAULT", "DEFERRABLE", "DEFERRED", "SQL_DELETE",
1290
  "DEC", "DECLARE", "DEFAULT", "DEFERRABLE", "DEFERRED", "SQL_DELETE",
1291
  "DESC", "DESCRIBE", "DESCRIPTOR", "DIAGNOSTICS", "DICTIONARY",
1291
  "DESC", "DESCRIBE", "DESCRIPTOR", "DIAGNOSTICS", "DICTIONARY",
1292
  "DIRECTORY", "DISCONNECT", "DISPLACEMENT", "DISTINCT", "DOMAIN_TOKEN",
1292
  "DIRECTORY", "DISCONNECT", "DISPLACEMENT", "DISTINCT", "DOMAIN_TOKEN",
1293
  "SQL_DOUBLE", "DOUBLE_TQUOTED_STRING", "DROP", "ELSE", "END", "END_EXEC",
1293
  "SQL_DOUBLE", "DOUBLE_QUOTED_STRING", "DROP", "ELSE", "END", "END_EXEC",
1294
  "ETQUAL", "ESCAPE", "EXCEPT", "SQL_EXCEPTION", "EXEC", "EXECUTE",
1294
  "EQUAL", "ESCAPE", "EXCEPT", "SQL_EXCEPTION", "EXEC", "EXECUTE",
1295
  "EXISTS", "EXP", "EXPONENT", "EXTERNAL", "EXTRACT", "SQL_FALSE", "FETCH",
1295
  "EXISTS", "EXP", "EXPONENT", "EXTERNAL", "EXTRACT", "SQL_FALSE", "FETCH",
1296
  "FIRST", "SQL_FLOAT", "FLOOR", "FN", "FOR", "FOREIGN", "FORTRAN",
1296
  "FIRST", "SQL_FLOAT", "FLOOR", "FN", "FOR", "FOREIGN", "FORTRAN",
1297
  "FOUND", "FOUR_DIGITS", "FROM", "FULL", "GET", "GLOBAL", "GO", "GOTO",
1297
  "FOUND", "FOUR_DIGITS", "FROM", "FULL", "GET", "GLOBAL", "GO", "GOTO",
Lines 1308-1314 Link Here
1308
  "NOW", "SQL_NULL", "SQL_IS", "SQL_IS_NULL", "SQL_IS_NOT_NULL", "NULLIF",
1308
  "NOW", "SQL_NULL", "SQL_IS", "SQL_IS_NULL", "SQL_IS_NOT_NULL", "NULLIF",
1309
  "NUMERIC", "OCTET_LENGTH", "ODBC", "OF", "SQL_OFF", "SQL_ON", "ONLY",
1309
  "NUMERIC", "OCTET_LENGTH", "ODBC", "OF", "SQL_OFF", "SQL_ON", "ONLY",
1310
  "OPEN", "OPTION", "OR", "ORDER", "OUTER", "OUTPUT", "OVERLAPS", "PAGE",
1310
  "OPEN", "OPTION", "OR", "ORDER", "OUTER", "OUTPUT", "OVERLAPS", "PAGE",
1311
  "PARTIAL", "SQL_PASCAL", "PERSISTENT", "CTQL_PI", "PLI", "POSITION",
1311
  "PARTIAL", "SQL_PASCAL", "PERSISTENT", "CQL_PI", "PLI", "POSITION",
1312
  "PRECISION", "PREPARE", "PRESERVE", "PRIMARY", "PRIOR", "PRIVILEGES",
1312
  "PRECISION", "PREPARE", "PRESERVE", "PRIMARY", "PRIOR", "PRIVILEGES",
1313
  "PROCEDURE", "PRODUCT", "PUBLIC", "QUARTER", "QUIT", "RAND", "READ_ONLY",
1313
  "PROCEDURE", "PRODUCT", "PUBLIC", "QUARTER", "QUIT", "RAND", "READ_ONLY",
1314
  "REAL", "REFERENCES", "REPEAT", "REPLACE", "RESTRICT", "REVOKE", "RIGHT",
1314
  "REAL", "REFERENCES", "REPEAT", "REPLACE", "RESTRICT", "REVOKE", "RIGHT",
Lines 1322-1328 Link Here
1322
  "TAN", "TEMPORARY", "THEN", "THREE_DIGITS", "TIME", "TIMESTAMP",
1322
  "TAN", "TEMPORARY", "THEN", "THREE_DIGITS", "TIME", "TIMESTAMP",
1323
  "TIMEZONE_HOUR", "TIMEZONE_MINUTE", "TINYINT", "TO", "TO_CHAR",
1323
  "TIMEZONE_HOUR", "TIMEZONE_MINUTE", "TINYINT", "TO", "TO_CHAR",
1324
  "TO_DATE", "TRANSACTION", "TRANSLATE", "TRANSLATION", "TRUNCATE",
1324
  "TO_DATE", "TRANSACTION", "TRANSLATE", "TRANSLATION", "TRUNCATE",
1325
  "GENERAL_TITLE", "TWO_DIGITS", "UCASE", "UNION", "UNITQUE", "SQL_UNKNOWN",
1325
  "GENERAL_TITLE", "TWO_DIGITS", "UCASE", "UNION", "UNIQUE", "SQL_UNKNOWN",
1326
  "UPDATE", "UPPER", "USAGE", "USER", "IDENTIFIER",
1326
  "UPDATE", "UPPER", "USAGE", "USER", "IDENTIFIER",
1327
  "IDENTIFIER_DOT_ASTERISK", "QUERY_PARAMETER", "USING", "VALUE", "VALUES",
1327
  "IDENTIFIER_DOT_ASTERISK", "QUERY_PARAMETER", "USING", "VALUE", "VALUES",
1328
  "VARBINARY", "VARCHAR", "VARYING", "VENDOR", "VIEW", "WEEK", "WHEN",
1328
  "VARBINARY", "VARCHAR", "VARYING", "VENDOR", "VIEW", "WEEK", "WHEN",
(-)koffice/kexi/kexidb/parser/sqlparser.h (-14 / +14 lines)
Lines 154-165 Link Here
154
     DISTINCT = 363,
154
     DISTINCT = 363,
155
     DOMAIN_TOKEN = 364,
155
     DOMAIN_TOKEN = 364,
156
     SQL_DOUBLE = 365,
156
     SQL_DOUBLE = 365,
157
     DOUBLE_TQUOTED_STRING = 366,
157
     DOUBLE_QUOTED_STRING = 366,
158
     DROP = 367,
158
     DROP = 367,
159
     ELSE = 368,
159
     ELSE = 368,
160
     END = 369,
160
     END = 369,
161
     END_EXEC = 370,
161
     END_EXEC = 370,
162
     ETQUAL = 371,
162
     EQUAL = 371,
163
     ESCAPE = 372,
163
     ESCAPE = 372,
164
     EXCEPT = 373,
164
     EXCEPT = 373,
165
     SQL_EXCEPTION = 374,
165
     SQL_EXCEPTION = 374,
Lines 276-282 Link Here
276
     PARTIAL = 485,
276
     PARTIAL = 485,
277
     SQL_PASCAL = 486,
277
     SQL_PASCAL = 486,
278
     PERSISTENT = 487,
278
     PERSISTENT = 487,
279
     CTQL_PI = 488,
279
     CQL_PI = 488,
280
     PLI = 489,
280
     PLI = 489,
281
     POSITION = 490,
281
     POSITION = 490,
282
     PRECISION = 491,
282
     PRECISION = 491,
Lines 288-295 Link Here
288
     PROCEDURE = 497,
288
     PROCEDURE = 497,
289
     PRODUCT = 498,
289
     PRODUCT = 498,
290
     PUBLIC = 499,
290
     PUBLIC = 499,
291
     TQUARTER = 500,
291
     QUARTER = 500,
292
     TQUIT = 501,
292
     QUIT = 501,
293
     RAND = 502,
293
     RAND = 502,
294
     READ_ONLY = 503,
294
     READ_ONLY = 503,
295
     REAL = 504,
295
     REAL = 504,
Lines 361-367 Link Here
361
     TWO_DIGITS = 570,
361
     TWO_DIGITS = 570,
362
     UCASE = 571,
362
     UCASE = 571,
363
     UNION = 572,
363
     UNION = 572,
364
     UNITQUE = 573,
364
     UNIQUE = 573,
365
     SQL_UNKNOWN = 574,
365
     SQL_UNKNOWN = 574,
366
     UPDATE = 575,
366
     UPDATE = 575,
367
     UPPER = 576,
367
     UPPER = 576,
Lines 369-375 Link Here
369
     USER = 578,
369
     USER = 578,
370
     IDENTIFIER = 579,
370
     IDENTIFIER = 579,
371
     IDENTIFIER_DOT_ASTERISK = 580,
371
     IDENTIFIER_DOT_ASTERISK = 580,
372
     TQUERY_PARAMETER = 581,
372
     QUERY_PARAMETER = 581,
373
     USING = 582,
373
     USING = 582,
374
     VALUE = 583,
374
     VALUE = 583,
375
     VALUES = 584,
375
     VALUES = 584,
Lines 504-515 Link Here
504
#define DISTINCT 363
504
#define DISTINCT 363
505
#define DOMAIN_TOKEN 364
505
#define DOMAIN_TOKEN 364
506
#define SQL_DOUBLE 365
506
#define SQL_DOUBLE 365
507
#define DOUBLE_TQUOTED_STRING 366
507
#define DOUBLE_QUOTED_STRING 366
508
#define DROP 367
508
#define DROP 367
509
#define ELSE 368
509
#define ELSE 368
510
#define END 369
510
#define END 369
511
#define END_EXEC 370
511
#define END_EXEC 370
512
#define ETQUAL 371
512
#define EQUAL 371
513
#define ESCAPE 372
513
#define ESCAPE 372
514
#define EXCEPT 373
514
#define EXCEPT 373
515
#define SQL_EXCEPTION 374
515
#define SQL_EXCEPTION 374
Lines 626-632 Link Here
626
#define PARTIAL 485
626
#define PARTIAL 485
627
#define SQL_PASCAL 486
627
#define SQL_PASCAL 486
628
#define PERSISTENT 487
628
#define PERSISTENT 487
629
#define CTQL_PI 488
629
#define CQL_PI 488
630
#define PLI 489
630
#define PLI 489
631
#define POSITION 490
631
#define POSITION 490
632
#define PRECISION 491
632
#define PRECISION 491
Lines 638-645 Link Here
638
#define PROCEDURE 497
638
#define PROCEDURE 497
639
#define PRODUCT 498
639
#define PRODUCT 498
640
#define PUBLIC 499
640
#define PUBLIC 499
641
#define TQUARTER 500
641
#define QUARTER 500
642
#define TQUIT 501
642
#define QUIT 501
643
#define RAND 502
643
#define RAND 502
644
#define READ_ONLY 503
644
#define READ_ONLY 503
645
#define REAL 504
645
#define REAL 504
Lines 711-717 Link Here
711
#define TWO_DIGITS 570
711
#define TWO_DIGITS 570
712
#define UCASE 571
712
#define UCASE 571
713
#define UNION 572
713
#define UNION 572
714
#define UNITQUE 573
714
#define UNIQUE 573
715
#define SQL_UNKNOWN 574
715
#define SQL_UNKNOWN 574
716
#define UPDATE 575
716
#define UPDATE 575
717
#define UPPER 576
717
#define UPPER 576
Lines 719-725 Link Here
719
#define USER 578
719
#define USER 578
720
#define IDENTIFIER 579
720
#define IDENTIFIER 579
721
#define IDENTIFIER_DOT_ASTERISK 580
721
#define IDENTIFIER_DOT_ASTERISK 580
722
#define TQUERY_PARAMETER 581
722
#define QUERY_PARAMETER 581
723
#define USING 582
723
#define USING 582
724
#define VALUE 583
724
#define VALUE 583
725
#define VALUES 584
725
#define VALUES 584
(-)koffice/kexi/kexidb/parser/sqlscanner.cpp (-1 / +1 lines)
Lines 1125-1131 Link Here
1125
	KexiDBDbg << "yytext: '" << yytext << "' (" << yyleng << ")" << endl;
1125
	KexiDBDbg << "yytext: '" << yytext << "' (" << yyleng << ")" << endl;
1126
	ECOUNT;
1126
	ECOUNT;
1127
	yylval.stringValue = new TQString(TQString::fromUtf8(yytext+1, yyleng-2));
1127
	yylval.stringValue = new TQString(TQString::fromUtf8(yytext+1, yyleng-2));
1128
	return TQUERY_PARAMETER;
1128
	return QUERY_PARAMETER;
1129
}
1129
}
1130
	YY_BREAK
1130
	YY_BREAK
1131
case 41:
1131
case 41:
(-)koffice/kexi/kexidb/queryschema.cpp (-1 / +1 lines)
Lines 1600-1606 Link Here
1600
		}
1600
		}
1601
	}
1601
	}
1602
	KexiDBDbg << "QuerySchema::pkeyFieldsOrder(): " << d->pkeyFieldsCount
1602
	KexiDBDbg << "QuerySchema::pkeyFieldsOrder(): " << d->pkeyFieldsCount
1603
		<< " OUT OF " << pkey->fieldCount() << " PKEY'S FIELDS FOUND IN TQUERY " << name() << endl;
1603
		<< " OUT OF " << pkey->fieldCount() << " PKEY'S FIELDS FOUND IN QUERY " << name() << endl;
1604
	return *d->pkeyFieldsOrder;
1604
	return *d->pkeyFieldsOrder;
1605
}
1605
}
1606
1606
(-)koffice/kexi/kexidb/queryschema.h (-2 / +2 lines)
Lines 17-24 Link Here
17
 * Boston, MA 02110-1301, USA.
17
 * Boston, MA 02110-1301, USA.
18
*/
18
*/
19
19
20
#ifndef KEXIDB_TQUERY_H
20
#ifndef KEXIDB_QUERY_H
21
#define KEXIDB_TQUERY_H
21
#define KEXIDB_QUERY_H
22
22
23
#include <tqvaluevector.h>
23
#include <tqvaluevector.h>
24
#include <tqstring.h>
24
#include <tqstring.h>
(-)koffice/kexi/kexidb/queryschemaparameter.h (-2 / +2 lines)
Lines 17-24 Link Here
17
 * Boston, MA 02110-1301, USA.
17
 * Boston, MA 02110-1301, USA.
18
*/
18
*/
19
19
20
#ifndef KEXIDB_TQUERYSCHEMAPARAMETER_H
20
#ifndef KEXIDB_QUERYSCHEMAPARAMETER_H
21
#define KEXIDB_TQUERYSCHEMAPARAMETER_H
21
#define KEXIDB_QUERYSCHEMAPARAMETER_H
22
22
23
#include "queryschema.h"
23
#include "queryschema.h"
24
24
(-)koffice/kexi/migration/pqxx/pqxxmigrate.h (-2 / +2 lines)
Lines 18-25 Link Here
18
 * Boston, MA 02110-1301, USA.
18
 * Boston, MA 02110-1301, USA.
19
*/
19
*/
20
20
21
#ifndef PTQXXIMPORT_H
21
#ifndef PQXXIMPORT_H
22
#define PTQXXIMPORT_H
22
#define PQXXIMPORT_H
23
23
24
#include <migration/keximigrate.h>
24
#include <migration/keximigrate.h>
25
25
(-)koffice/kexi/plugins/importexport/csv/kexicsvexport.cpp (-2 / +2 lines)
Lines 63-69 Link Here
63
	if (args.contains("textQuote"))
63
	if (args.contains("textQuote"))
64
		textQuote = args["textQuote"];
64
		textQuote = args["textQuote"];
65
	else
65
	else
66
		textQuote = (mode==File) ? KEXICSV_DEFAULT_FILE_TEXT_TQUOTE : KEXICSV_DEFAULT_CLIPBOARD_TEXT_TQUOTE;
66
		textQuote = (mode==File) ? KEXICSV_DEFAULT_FILE_TEXT_QUOTE : KEXICSV_DEFAULT_CLIPBOARD_TEXT_QUOTE;
67
67
68
	bool ok;
68
	bool ok;
69
	itemId = args["itemId"].toInt(&ok);
69
	itemId = args["itemId"].toInt(&ok);
Lines 95-101 Link Here
95
//! @todo look at rowCount whether the data is really large; 
95
//! @todo look at rowCount whether the data is really large; 
96
//!       if so: avoid copying to clipboard (or ask user) because of system memory
96
//!       if so: avoid copying to clipboard (or ask user) because of system memory
97
97
98
//! @todo OPTIMIZATION: use fieldsExpanded(true /*UNITQUE*/)
98
//! @todo OPTIMIZATION: use fieldsExpanded(true /*UNIQUE*/)
99
//! @todo OPTIMIZATION? (avoid multiple data retrieving) look for already fetched data within KexiProject..
99
//! @todo OPTIMIZATION? (avoid multiple data retrieving) look for already fetched data within KexiProject..
100
100
101
	KexiDB::QuerySchema* query = tableOrQuery.query();
101
	KexiDB::QuerySchema* query = tableOrQuery.query();
(-)koffice/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp (-2 / +2 lines)
Lines 424-431 Link Here
424
TQString KexiCSVExportWizard::defaultTextQuote() const
424
TQString KexiCSVExportWizard::defaultTextQuote() const
425
{
425
{
426
	if (m_options.mode==KexiCSVExport::Clipboard)
426
	if (m_options.mode==KexiCSVExport::Clipboard)
427
		return KEXICSV_DEFAULT_CLIPBOARD_TEXT_TQUOTE;
427
		return KEXICSV_DEFAULT_CLIPBOARD_TEXT_QUOTE;
428
	return KEXICSV_DEFAULT_FILE_TEXT_TQUOTE;
428
	return KEXICSV_DEFAULT_FILE_TEXT_QUOTE;
429
}
429
}
430
430
431
#include "kexicsvexportwizard.moc"
431
#include "kexicsvexportwizard.moc"
(-)koffice/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp (-20 / +20 lines)
Lines 156-162 Link Here
156
	m_cancelled( false ),
156
	m_cancelled( false ),
157
	m_adjustRows( true ),
157
	m_adjustRows( true ),
158
	m_startline( 0 ),
158
	m_startline( 0 ),
159
	m_textquote( TQString(KEXICSV_DEFAULT_FILE_TEXT_TQUOTE)[0] ),
159
	m_textquote( TQString(KEXICSV_DEFAULT_FILE_TEXT_QUOTE)[0] ),
160
	m_mode(mode),
160
	m_mode(mode),
161
	m_prevSelectedCol(-1),
161
	m_prevSelectedCol(-1),
162
	m_columnsAdjusted(false),
162
	m_columnsAdjusted(false),
Lines 554-562 Link Here
554
	bool insideQuote = false;
554
	bool insideQuote = false;
555
555
556
	//characters by priority
556
	//characters by priority
557
	const int CH_TAB_AFTER_TQUOTE = 500;
557
	const int CH_TAB_AFTER_QUOTE = 500;
558
	const int CH_SEMICOLON_AFTER_TQUOTE = 499;
558
	const int CH_SEMICOLON_AFTER_QUOTE = 499;
559
	const int CH_COMMA_AFTER_TQUOTE = 498;
559
	const int CH_COMMA_AFTER_QUOTE = 498;
560
	const int CH_TAB = 200; // \t
560
	const int CH_TAB = 200; // \t
561
	const int CH_SEMICOLON = 199; // ;
561
	const int CH_SEMICOLON = 199; // ;
562
	const int CH_COMMA = 198; // ,
562
	const int CH_COMMA = 198; // ,
Lines 588-602 Link Here
588
		}
588
		}
589
		else if (c=='\t') {
589
		else if (c=='\t') {
590
			tabs++;
590
			tabs++;
591
			detectedDelimiter = TQMAX( prevChar=='"' ? CH_TAB_AFTER_TQUOTE : CH_TAB, detectedDelimiter );
591
			detectedDelimiter = TQMAX( prevChar=='"' ? CH_TAB_AFTER_QUOTE : CH_TAB, detectedDelimiter );
592
		}
592
		}
593
		else if (c==';') {
593
		else if (c==';') {
594
			semicolons++;
594
			semicolons++;
595
			detectedDelimiter = TQMAX( prevChar=='"' ? CH_SEMICOLON_AFTER_TQUOTE : CH_SEMICOLON, detectedDelimiter );
595
			detectedDelimiter = TQMAX( prevChar=='"' ? CH_SEMICOLON_AFTER_QUOTE : CH_SEMICOLON, detectedDelimiter );
596
		}
596
		}
597
		else if (c==',') {
597
		else if (c==',') {
598
			commas++;
598
			commas++;
599
			detectedDelimiter = TQMAX( prevChar=='"' ? CH_COMMA_AFTER_TQUOTE : CH_COMMA, detectedDelimiter );
599
			detectedDelimiter = TQMAX( prevChar=='"' ? CH_COMMA_AFTER_QUOTE : CH_COMMA, detectedDelimiter );
600
		}
600
		}
601
		prevChar = c;
601
		prevChar = c;
602
	}
602
	}
Lines 634-644 Link Here
634
			return ",";
634
			return ",";
635
	}
635
	}
636
	//now return the winning character by looking at CH_* symbol
636
	//now return the winning character by looking at CH_* symbol
637
	if (detectedDelimiter == CH_TAB_AFTER_TQUOTE || detectedDelimiter == CH_TAB)
637
	if (detectedDelimiter == CH_TAB_AFTER_QUOTE || detectedDelimiter == CH_TAB)
638
		return "\t";
638
		return "\t";
639
	if (detectedDelimiter == CH_SEMICOLON_AFTER_TQUOTE || detectedDelimiter == CH_SEMICOLON)
639
	if (detectedDelimiter == CH_SEMICOLON_AFTER_QUOTE || detectedDelimiter == CH_SEMICOLON)
640
		return ";";
640
		return ";";
641
	if (detectedDelimiter == CH_COMMA_AFTER_TQUOTE || detectedDelimiter == CH_COMMA)
641
	if (detectedDelimiter == CH_COMMA_AFTER_QUOTE || detectedDelimiter == CH_COMMA)
642
		return ",";
642
		return ",";
643
643
644
	return KEXICSV_DEFAULT_FILE_DELIMITER; //<-- default
644
	return KEXICSV_DEFAULT_FILE_DELIMITER; //<-- default
Lines 647-653 Link Here
647
tristate KexiCSVImportDialog::loadRows(TQString &field, int &row, int &column, int &maxColumn, 
647
tristate KexiCSVImportDialog::loadRows(TQString &field, int &row, int &column, int &maxColumn, 
648
	bool inGUI)
648
	bool inGUI)
649
{
649
{
650
	enum { S_START, S_TQUOTED_FIELD, S_MAYBE_END_OF_TQUOTED_FIELD, S_END_OF_TQUOTED_FIELD,
650
	enum { S_START, S_QUOTED_FIELD, S_MAYBE_END_OF_QUOTED_FIELD, S_END_OF_QUOTED_FIELD,
651
		 S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START;
651
		 S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START;
652
	field = TQString();
652
	field = TQString();
653
	const bool ignoreDups = m_ignoreDuplicates->isChecked();
653
	const bool ignoreDups = m_ignoreDuplicates->isChecked();
Lines 717-723 Link Here
717
		case S_START :
717
		case S_START :
718
			if (x == m_textquote)
718
			if (x == m_textquote)
719
			{
719
			{
720
				state = S_TQUOTED_FIELD;
720
				state = S_QUOTED_FIELD;
721
			}
721
			}
722
			else if (x == delimiter)
722
			else if (x == delimiter)
723
			{
723
			{
Lines 745-754 Link Here
745
				state = S_MAYBE_NORMAL_FIELD;
745
				state = S_MAYBE_NORMAL_FIELD;
746
			}
746
			}
747
			break;
747
			break;
748
		case S_TQUOTED_FIELD :
748
		case S_QUOTED_FIELD :
749
			if (x == m_textquote)
749
			if (x == m_textquote)
750
			{
750
			{
751
				state = S_MAYBE_END_OF_TQUOTED_FIELD;
751
				state = S_MAYBE_END_OF_QUOTED_FIELD;
752
			}
752
			}
753
/*allow \n inside quoted fields
753
/*allow \n inside quoted fields
754
			else if (x == '\n')
754
			else if (x == '\n')
Lines 774-784 Link Here
774
				field += x;
774
				field += x;
775
			}
775
			}
776
			break;
776
			break;
777
		case S_MAYBE_END_OF_TQUOTED_FIELD :
777
		case S_MAYBE_END_OF_QUOTED_FIELD :
778
			if (x == m_textquote)
778
			if (x == m_textquote)
779
			{
779
			{
780
				field += x; //no, this was just escaped quote character
780
				field += x; //no, this was just escaped quote character
781
				state = S_TQUOTED_FIELD;
781
				state = S_QUOTED_FIELD;
782
			}
782
			}
783
			else if (x == delimiter || x == '\n')
783
			else if (x == delimiter || x == '\n')
784
			{
784
			{
Lines 800-809 Link Here
800
			}
800
			}
801
			else
801
			else
802
			{
802
			{
803
				state = S_END_OF_TQUOTED_FIELD;
803
				state = S_END_OF_QUOTED_FIELD;
804
			}
804
			}
805
			break;
805
			break;
806
		case S_END_OF_TQUOTED_FIELD :
806
		case S_END_OF_QUOTED_FIELD :
807
			if (x == delimiter || x == '\n')
807
			if (x == delimiter || x == '\n')
808
			{
808
			{
809
				setText(row - m_startline, column, field, inGUI);
809
				setText(row - m_startline, column, field, inGUI);
Lines 824-837 Link Here
824
			}
824
			}
825
			else
825
			else
826
			{
826
			{
827
				state = S_END_OF_TQUOTED_FIELD;
827
				state = S_END_OF_QUOTED_FIELD;
828
			}
828
			}
829
			break;
829
			break;
830
		case S_MAYBE_NORMAL_FIELD :
830
		case S_MAYBE_NORMAL_FIELD :
831
			if (x == m_textquote)
831
			if (x == m_textquote)
832
			{
832
			{
833
				field = TQString();
833
				field = TQString();
834
				state = S_TQUOTED_FIELD;
834
				state = S_QUOTED_FIELD;
835
				break;
835
				break;
836
			}
836
			}
837
		case S_NORMAL_FIELD :
837
		case S_NORMAL_FIELD :
(-)koffice/kexi/plugins/importexport/csv/kexicsvwidgets.h (-2 / +2 lines)
Lines 27-34 Link Here
27
class KActiveLabel;
27
class KActiveLabel;
28
class TQLabel;
28
class TQLabel;
29
29
30
#define KEXICSV_DEFAULT_FILE_TEXT_TQUOTE "\""
30
#define KEXICSV_DEFAULT_FILE_TEXT_QUOTE "\""
31
#define KEXICSV_DEFAULT_CLIPBOARD_TEXT_TQUOTE ""
31
#define KEXICSV_DEFAULT_CLIPBOARD_TEXT_QUOTE ""
32
#define KEXICSV_DEFAULT_FILE_DELIMITER ","
32
#define KEXICSV_DEFAULT_FILE_DELIMITER ","
33
#define KEXICSV_DEFAULT_CLIPBOARD_DELIMITER "\t"
33
#define KEXICSV_DEFAULT_CLIPBOARD_DELIMITER "\t"
34
#define KEXICSV_DEFAULT_FILE_DELIMITER_INDEX 0
34
#define KEXICSV_DEFAULT_FILE_DELIMITER_INDEX 0
(-)koffice/kexi/plugins/queries/kexidynamicqueryparameterdialog.h (-2 / +2 lines)
Lines 17-24 Link Here
17
 * Boston, MA 02110-1301, USA.
17
 * Boston, MA 02110-1301, USA.
18
 */
18
 */
19
19
20
#ifndef _KEXI_DYNAMIC_TQUERY_PARAMETER_DIALOG_H_
20
#ifndef _KEXI_DYNAMIC_QUERY_PARAMETER_DIALOG_H_
21
#define _KEXI_DYNAMIC_TQUERY_PARAMETER_DIALOG_H_
21
#define _KEXI_DYNAMIC_QUERY_PARAMETER_DIALOG_H_
22
22
23
23
24
#include <kdialogbase.h>
24
#include <kdialogbase.h>
(-)koffice/kexi/plugins/queries/kexiquerydesignerguieditor.cpp (-10 / +10 lines)
Lines 56-69 Link Here
56
56
57
#include "kexiquerypart.h"
57
#include "kexiquerypart.h"
58
58
59
//! @todo remove KEXI_NO_TQUERY_TOTALS later
59
//! @todo remove KEXI_NO_QUERY_TOTALS later
60
#define KEXI_NO_TQUERY_TOTALS
60
#define KEXI_NO_QUERY_TOTALS
61
61
62
//! indices for table columns
62
//! indices for table columns
63
#define COLUMN_ID_COLUMN 0
63
#define COLUMN_ID_COLUMN 0
64
#define COLUMN_ID_TABLE 1
64
#define COLUMN_ID_TABLE 1
65
#define COLUMN_ID_VISIBLE 2
65
#define COLUMN_ID_VISIBLE 2
66
#ifdef KEXI_NO_TQUERY_TOTALS
66
#ifdef KEXI_NO_QUERY_TOTALS
67
# define COLUMN_ID_SORTING 3
67
# define COLUMN_ID_SORTING 3
68
# define COLUMN_ID_CRITERIA 4
68
# define COLUMN_ID_CRITERIA 4
69
#else
69
#else
Lines 226-232 Link Here
226
	col3->field()->setNotNull( true );
226
	col3->field()->setNotNull( true );
227
	d->data->addColumn(col3);
227
	d->data->addColumn(col3);
228
228
229
#ifndef KEXI_NO_TQUERY_TOTALS
229
#ifndef KEXI_NO_QUERY_TOTALS
230
	KexiTableViewColumn *col4 = new KexiTableViewColumn("totals", KexiDB::Field::Enum, i18n("Totals"),
230
	KexiTableViewColumn *col4 = new KexiTableViewColumn("totals", KexiDB::Field::Enum, i18n("Totals"),
231
		i18n("Describes a way of computing totals for a given field or expression."));
231
		i18n("Describes a way of computing totals for a given field or expression."));
232
	TQValueVector<TQString> totalsTypes;
232
	TQValueVector<TQString> totalsTypes;
Lines 1200-1206 Link Here
1200
	(*newItem)[COLUMN_ID_COLUMN]=key;
1200
	(*newItem)[COLUMN_ID_COLUMN]=key;
1201
	(*newItem)[COLUMN_ID_TABLE]=tableName;
1201
	(*newItem)[COLUMN_ID_TABLE]=tableName;
1202
	(*newItem)[COLUMN_ID_VISIBLE]=TQVariant(visible, 1);
1202
	(*newItem)[COLUMN_ID_VISIBLE]=TQVariant(visible, 1);
1203
#ifndef KEXI_NO_TQUERY_TOTALS
1203
#ifndef KEXI_NO_QUERY_TOTALS
1204
	(*newItem)[COLUMN_ID_TOTALS]=TQVariant(0);
1204
	(*newItem)[COLUMN_ID_TOTALS]=TQVariant(0);
1205
#endif
1205
#endif
1206
	return newItem;
1206
	return newItem;
Lines 1422-1428 Link Here
1422
			d->data->updateRowEditBuffer(item, COLUMN_ID_TABLE, TQVariant(), false/*!allowSignals*/);
1422
			d->data->updateRowEditBuffer(item, COLUMN_ID_TABLE, TQVariant(), false/*!allowSignals*/);
1423
			d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, TQVariant(false,1));//invisible
1423
			d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, TQVariant(false,1));//invisible
1424
			d->data->updateRowEditBuffer(item, COLUMN_ID_SORTING, TQVariant());
1424
			d->data->updateRowEditBuffer(item, COLUMN_ID_SORTING, TQVariant());
1425
#ifndef KEXI_NO_TQUERY_TOTALS
1425
#ifndef KEXI_NO_QUERY_TOTALS
1426
			d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, TQVariant());//remove totals
1426
			d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, TQVariant());//remove totals
1427
#endif
1427
#endif
1428
			d->data->updateRowEditBuffer(item, COLUMN_ID_CRITERIA, TQVariant());//remove crit.
1428
			d->data->updateRowEditBuffer(item, COLUMN_ID_CRITERIA, TQVariant());//remove crit.
Lines 1500-1506 Link Here
1500
			}
1500
			}
1501
			d->data->updateRowEditBuffer(item, COLUMN_ID_TABLE, TQVariant(tableName), false/*!allowSignals*/);
1501
			d->data->updateRowEditBuffer(item, COLUMN_ID_TABLE, TQVariant(tableName), false/*!allowSignals*/);
1502
			d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, TQVariant(true,1));
1502
			d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, TQVariant(true,1));
1503
#ifndef KEXI_NO_TQUERY_TOTALS
1503
#ifndef KEXI_NO_QUERY_TOTALS
1504
			d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, TQVariant(0));
1504
			d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, TQVariant(0));
1505
#endif
1505
#endif
1506
			if (!sortingAllowed(fieldName, tableName)) {
1506
			if (!sortingAllowed(fieldName, tableName)) {
Lines 1533-1539 Link Here
1533
			if (!item->at(COLUMN_ID_COLUMN).toString().isEmpty())
1533
			if (!item->at(COLUMN_ID_COLUMN).toString().isEmpty())
1534
				d->data->updateRowEditBuffer(item, COLUMN_ID_COLUMN, TQVariant(), false/*!allowSignals*/);
1534
				d->data->updateRowEditBuffer(item, COLUMN_ID_COLUMN, TQVariant(), false/*!allowSignals*/);
1535
			d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, TQVariant(false,1));//invisible
1535
			d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, TQVariant(false,1));//invisible
1536
#ifndef KEXI_NO_TQUERY_TOTALS
1536
#ifndef KEXI_NO_QUERY_TOTALS
1537
			d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, TQVariant());//remove totals
1537
			d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, TQVariant());//remove totals
1538
#endif
1538
#endif
1539
			d->data->updateRowEditBuffer(item, COLUMN_ID_CRITERIA, TQVariant());//remove crit.
1539
			d->data->updateRowEditBuffer(item, COLUMN_ID_CRITERIA, TQVariant());//remove crit.
Lines 1560-1566 Link Here
1560
			saveOldValue = false;
1560
			saveOldValue = false;
1561
			createPropertySet( d->dataTable->dataAwareObject()->currentRow(),
1561
			createPropertySet( d->dataTable->dataAwareObject()->currentRow(),
1562
				item->at(COLUMN_ID_TABLE).toString(), item->at(COLUMN_ID_COLUMN).toString(), true );
1562
				item->at(COLUMN_ID_TABLE).toString(), item->at(COLUMN_ID_COLUMN).toString(), true );
1563
#ifndef KEXI_NO_TQUERY_TOTALS
1563
#ifndef KEXI_NO_QUERY_TOTALS
1564
			d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, TQVariant(0));//totals
1564
			d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, TQVariant(0));//totals
1565
#endif
1565
#endif
1566
			propertySetSwitched();
1566
			propertySetSwitched();
Lines 1568-1574 Link Here
1568
		KoProperty::Set &set = *propertySet();
1568
		KoProperty::Set &set = *propertySet();
1569
		set["visible"].setValue(newValue, saveOldValue);
1569
		set["visible"].setValue(newValue, saveOldValue);
1570
	}
1570
	}
1571
#ifndef KEXI_NO_TQUERY_TOTALS
1571
#ifndef KEXI_NO_QUERY_TOTALS
1572
	else if (colnum==COLUMN_ID_TOTALS) {
1572
	else if (colnum==COLUMN_ID_TOTALS) {
1573
		//TODO:
1573
		//TODO:
1574
		//unused yet
1574
		//unused yet
(-)koffice/kexi/plugins/queries/kexiquerydesignerguieditor.h (-2 / +2 lines)
Lines 18-25 Link Here
18
 * Boston, MA 02110-1301, USA.
18
 * Boston, MA 02110-1301, USA.
19
*/
19
*/
20
20
21
#ifndef KEXITQUERYDESIGNERGUIEDITOR_H
21
#ifndef KEXIQUERYDESIGNERGUIEDITOR_H
22
#define KEXITQUERYDESIGNERGUIEDITOR_H
22
#define KEXIQUERYDESIGNERGUIEDITOR_H
23
23
24
#include <tqguardedptr.h>
24
#include <tqguardedptr.h>
25
#include <tqsplitter.h>
25
#include <tqsplitter.h>
(-)koffice/kexi/plugins/queries/kexiquerydesignersql.h (-2 / +2 lines)
Lines 18-25 Link Here
18
 * Boston, MA 02110-1301, USA.
18
 * Boston, MA 02110-1301, USA.
19
*/
19
*/
20
20
21
#ifndef KEXITQUERYDESIGNERSQL_H
21
#ifndef KEXIQUERYDESIGNERSQL_H
22
#define KEXITQUERYDESIGNERSQL_H
22
#define KEXIQUERYDESIGNERSQL_H
23
23
24
#include <kexiviewbase.h>
24
#include <kexiviewbase.h>
25
#include "kexiquerypart.h"
25
#include "kexiquerypart.h"
(-)koffice/kexi/plugins/queries/kexiquerydesignersqlhistory.h (-2 / +2 lines)
Lines 18-25 Link Here
18
 * Boston, MA 02110-1301, USA.
18
 * Boston, MA 02110-1301, USA.
19
*/
19
*/
20
20
21
#ifndef KEXITQUERYDESIGNERSQLHISTORY_H
21
#ifndef KEXIQUERYDESIGNERSQLHISTORY_H
22
#define KEXITQUERYDESIGNERSQLHISTORY_H
22
#define KEXIQUERYDESIGNERSQLHISTORY_H
23
23
24
#include <tqscrollview.h>
24
#include <tqscrollview.h>
25
#include <tqdatetime.h>
25
#include <tqdatetime.h>
(-)koffice/kexi/plugins/queries/kexiquerypart.h (-2 / +2 lines)
Lines 18-25 Link Here
18
 * Boston, MA 02110-1301, USA.
18
 * Boston, MA 02110-1301, USA.
19
*/
19
*/
20
20
21
#ifndef KEXITQUERYPART_H
21
#ifndef KEXIQUERYPART_H
22
#define KEXITQUERYPART_H
22
#define KEXIQUERYPART_H
23
23
24
#include <tqmap.h>
24
#include <tqmap.h>
25
25
(-)koffice/kexi/plugins/queries/kexiqueryview.h (-2 / +2 lines)
Lines 18-25 Link Here
18
 * Boston, MA 02110-1301, USA.
18
 * Boston, MA 02110-1301, USA.
19
*/
19
*/
20
20
21
#ifndef KEXITQUERYVIEW_H
21
#ifndef KEXIQUERYVIEW_H
22
#define KEXITQUERYVIEW_H
22
#define KEXIQUERYVIEW_H
23
23
24
#include <kexidatatable.h>
24
#include <kexidatatable.h>
25
25
(-)koffice/kexi/widget/kexidatasourcecombobox.cpp (-5 / +5 lines)
Lines 34-40 Link Here
34
#include <kexidb/connection.h>
34
#include <kexidb/connection.h>
35
35
36
#ifdef KEXI_SHOW_UNIMPLEMENTED
36
#ifdef KEXI_SHOW_UNIMPLEMENTED
37
#define ADD_DEFINETQUERY_ROW
37
#define ADD_DEFINEQUERY_ROW
38
#endif
38
#endif
39
39
40
//! @internal
40
//! @internal
Lines 50-56 Link Here
50
		}
50
		}
51
		int firstTableIndex() const {
51
		int firstTableIndex() const {
52
			int index = 1; //skip empty row
52
			int index = 1; //skip empty row
53
#ifdef ADD_DEFINETQUERY_ROW
53
#ifdef ADD_DEFINEQUERY_ROW
54
			index++; /*skip 'define query' row*/
54
			index++; /*skip 'define query' row*/
55
#endif
55
#endif
56
			return index;
56
			return index;
Lines 123-129 Link Here
123
123
124
	//special item: empty
124
	//special item: empty
125
	insertItem("");
125
	insertItem("");
126
#ifdef ADD_DEFINETQUERY_ROW
126
#ifdef ADD_DEFINEQUERY_ROW
127
	//special item: define query
127
	//special item: define query
128
	insertItem(i18n("Define Query..."));
128
	insertItem(i18n("Define Query..."));
129
#endif
129
#endif
Lines 194-200 Link Here
194
	//insert a new item, maintaining sort order and splitting to tables and queries
194
	//insert a new item, maintaining sort order and splitting to tables and queries
195
	if (item.mimeType()=="kexi/table") {
195
	if (item.mimeType()=="kexi/table") {
196
		int i = 1; /*skip empty row*/
196
		int i = 1; /*skip empty row*/
197
#ifdef ADD_DEFINETQUERY_ROW
197
#ifdef ADD_DEFINEQUERY_ROW
198
		i++; /*skip 'define query' row*/
198
		i++; /*skip 'define query' row*/
199
#endif
199
#endif
200
		for (; i < d->firstQueryIndex() && name>=text(i); i++)
200
		for (; i < d->firstQueryIndex() && name>=text(i); i++)
Lines 217-223 Link Here
217
	int i, end;
217
	int i, end;
218
	if (mimeType=="kexi/table") {
218
	if (mimeType=="kexi/table") {
219
		i = 0;
219
		i = 0;
220
#ifdef ADD_DEFINETQUERY_ROW
220
#ifdef ADD_DEFINEQUERY_ROW
221
		i++; //skip 'define query'
221
		i++; //skip 'define query'
222
#endif
222
#endif
223
		end = d->firstQueryIndex();
223
		end = d->firstQueryIndex();
(-)koffice/kexi/widget/kexiquerydesignersqleditor.h (-2 / +2 lines)
Lines 19-26 Link Here
19
 * Boston, MA 02110-1301, USA.
19
 * Boston, MA 02110-1301, USA.
20
*/
20
*/
21
21
22
#ifndef KEXITQUERYDESIGNERSQLEDITOR_H
22
#ifndef KEXIQUERYDESIGNERSQLEDITOR_H
23
#define KEXITQUERYDESIGNERSQLEDITOR_H
23
#define KEXIQUERYDESIGNERSQLEDITOR_H
24
24
25
#include "kexieditor.h"
25
#include "kexieditor.h"
26
26
(-)koffice/kexi/widget/kexiqueryparameters.h (-2 / +2 lines)
Lines 17-24 Link Here
17
 * Boston, MA 02110-1301, USA.
17
 * Boston, MA 02110-1301, USA.
18
*/
18
*/
19
19
20
#ifndef KEXITQUERYPARAMETERS_H
20
#ifndef KEXIQUERYPARAMETERS_H
21
#define KEXITQUERYPARAMETERS_H
21
#define KEXIQUERYPARAMETERS_H
22
22
23
#include <kexidb/queryschema.h>
23
#include <kexidb/queryschema.h>
24
24
(-)koffice/kivio/kiviopart/kiviosdk/kivio_common.cpp (-3 / +3 lines)
Lines 308-314 Link Here
308
}
308
}
309
309
310
310
311
#define WHICH_TQUAD( vertex, hitPos ) \
311
#define WHICH_QUAD( vertex, hitPos ) \
312
	( (vertex.x() > hitPos->x()) ? ((vertex.y() > hitPos->y()) ? 1 : 4 ) : ((vertex.y() > hitPos->y())?2:3))
312
	( (vertex.x() > hitPos->x()) ? ((vertex.y() > hitPos->y()) ? 1 : 4 ) : ((vertex.y() > hitPos->y())?2:3))
313
313
314
#define X_INTERCEPT( point1, point2, hitY ) \
314
#define X_INTERCEPT( point1, point2, hitY ) \
Lines 341-353 Link Here
341
341
342
	edge = 0;
342
	edge = 0;
343
343
344
	quad = WHICH_TQUAD( points[ edge ], hitPos );
344
	quad = WHICH_QUAD( points[ edge ], hitPos );
345
	total = 0; // count of absolute sectors crossed
345
	total = 0; // count of absolute sectors crossed
346
346
347
	// Loop through all the vertices
347
	// Loop through all the vertices
348
	do {
348
	do {
349
		next = (edge + 1) % numPoints;
349
		next = (edge + 1) % numPoints;
350
		next_quad = WHICH_TQUAD( points[ next ], hitPos );
350
		next_quad = WHICH_QUAD( points[ next ], hitPos );
351
351
352
		// Calculate how many quads have been crossed
352
		// Calculate how many quads have been crossed
353
		delta = next_quad - quad;
353
		delta = next_quad - quad;
(-)koffice/kpresenter/KPrCanvas.cpp (-19 / +19 lines)
Lines 428-436 Link Here
428
                    topPainter.drawLine( m_view->zoomHandler()->zoomPoint( m_startPoint ),
428
                    topPainter.drawLine( m_view->zoomHandler()->zoomPoint( m_startPoint ),
429
                            m_view->zoomHandler()->zoomPoint( m_endPoint ) );
429
                            m_view->zoomHandler()->zoomPoint( m_endPoint ) );
430
                } break;
430
                } break;
431
            case INS_TQUADRICBEZIERCURVE:
431
            case INS_QUADRICBEZIERCURVE:
432
            case INS_CUBICBEZIERCURVE:
432
            case INS_CUBICBEZIERCURVE:
433
            case INS_CLOSED_TQUADRICBEZIERCURVE:
433
            case INS_CLOSED_QUADRICBEZIERCURVE:
434
            case INS_CLOSED_CUBICBEZIERCURVE:
434
            case INS_CLOSED_CUBICBEZIERCURVE:
435
                if ( m_drawCubicBezierCurve )
435
                if ( m_drawCubicBezierCurve )
436
                {
436
                {
Lines 736-744 Link Here
736
            }
736
            }
737
737
738
            if ( m_drawCubicBezierCurve && ( toolEditMode == INS_CUBICBEZIERCURVE
738
            if ( m_drawCubicBezierCurve && ( toolEditMode == INS_CUBICBEZIERCURVE
739
                                             || toolEditMode == INS_TQUADRICBEZIERCURVE
739
                                             || toolEditMode == INS_QUADRICBEZIERCURVE
740
                                             || toolEditMode == INS_CLOSED_CUBICBEZIERCURVE
740
                                             || toolEditMode == INS_CLOSED_CUBICBEZIERCURVE
741
                                             || toolEditMode == INS_CLOSED_TQUADRICBEZIERCURVE ) ) {
741
                                             || toolEditMode == INS_CLOSED_QUADRICBEZIERCURVE ) ) {
742
                if ( m_drawLineWithCubicBezierCurve ) {
742
                if ( m_drawLineWithCubicBezierCurve ) {
743
                    TQPainter p( this );
743
                    TQPainter p( this );
744
                    p.setPen( TQPen( TQt::black, 1, TQt::SolidLine ) );
744
                    p.setPen( TQPen( TQt::black, 1, TQt::SolidLine ) );
Lines 950-957 Link Here
950
                m_pointArray.putPoints( m_indexPointArray, 1, m_startPoint.x(), m_startPoint.y() );
950
                m_pointArray.putPoints( m_indexPointArray, 1, m_startPoint.x(), m_startPoint.y() );
951
                ++m_indexPointArray;
951
                ++m_indexPointArray;
952
            } break;
952
            } break;
953
            case INS_CUBICBEZIERCURVE: case INS_TQUADRICBEZIERCURVE:
953
            case INS_CUBICBEZIERCURVE: case INS_QUADRICBEZIERCURVE:
954
            case INS_CLOSED_CUBICBEZIERCURVE: case INS_CLOSED_TQUADRICBEZIERCURVE: {
954
            case INS_CLOSED_CUBICBEZIERCURVE: case INS_CLOSED_QUADRICBEZIERCURVE: {
955
                deSelectAllObj();
955
                deSelectAllObj();
956
                recalcAutoGuides();
956
                recalcAutoGuides();
957
                mousePressed = true;
957
                mousePressed = true;
Lines 1026-1033 Link Here
1026
            return;
1026
            return;
1027
        }
1027
        }
1028
1028
1029
        if ( e->button() == Qt::RightButton && ( toolEditMode == INS_CUBICBEZIERCURVE || toolEditMode == INS_TQUADRICBEZIERCURVE
1029
        if ( e->button() == Qt::RightButton && ( toolEditMode == INS_CUBICBEZIERCURVE || toolEditMode == INS_QUADRICBEZIERCURVE
1030
                                             || toolEditMode == INS_CLOSED_CUBICBEZIERCURVE || toolEditMode == INS_CLOSED_TQUADRICBEZIERCURVE )
1030
                                             || toolEditMode == INS_CLOSED_CUBICBEZIERCURVE || toolEditMode == INS_CLOSED_QUADRICBEZIERCURVE )
1031
             && !m_pointArray.isNull() && m_drawCubicBezierCurve ) {
1031
             && !m_pointArray.isNull() && m_drawCubicBezierCurve ) {
1032
            if ( m_drawLineWithCubicBezierCurve ) {
1032
            if ( m_drawLineWithCubicBezierCurve ) {
1033
                KoPoint point = snapPoint( docPoint );
1033
                KoPoint point = snapPoint( docPoint );
Lines 1164-1171 Link Here
1164
    _objects.setAutoDelete( false );
1164
    _objects.setAutoDelete( false );
1165
1165
1166
    if ( ( m_drawPolyline && ( toolEditMode == INS_POLYLINE || toolEditMode == INS_CLOSED_POLYLINE ) )
1166
    if ( ( m_drawPolyline && ( toolEditMode == INS_POLYLINE || toolEditMode == INS_CLOSED_POLYLINE ) )
1167
         || ( m_drawCubicBezierCurve && ( toolEditMode == INS_CUBICBEZIERCURVE || toolEditMode == INS_TQUADRICBEZIERCURVE
1167
         || ( m_drawCubicBezierCurve && ( toolEditMode == INS_CUBICBEZIERCURVE || toolEditMode == INS_QUADRICBEZIERCURVE
1168
                                          || toolEditMode == INS_CLOSED_CUBICBEZIERCURVE || toolEditMode == INS_CLOSED_TQUADRICBEZIERCURVE ) ) ) {
1168
                                          || toolEditMode == INS_CLOSED_CUBICBEZIERCURVE || toolEditMode == INS_CLOSED_QUADRICBEZIERCURVE ) ) ) {
1169
        return;
1169
        return;
1170
    }
1170
    }
1171
1171
Lines 1712-1719 Link Here
1712
1712
1713
                mouseSelectedObject = true;
1713
                mouseSelectedObject = true;
1714
            } break;
1714
            } break;
1715
            case INS_CUBICBEZIERCURVE: case INS_TQUADRICBEZIERCURVE:
1715
            case INS_CUBICBEZIERCURVE: case INS_QUADRICBEZIERCURVE:
1716
            case INS_CLOSED_CUBICBEZIERCURVE: case INS_CLOSED_TQUADRICBEZIERCURVE:{
1716
            case INS_CLOSED_CUBICBEZIERCURVE: case INS_CLOSED_QUADRICBEZIERCURVE:{
1717
                TQPainter p( this );
1717
                TQPainter p( this );
1718
                p.setPen( TQPen( black, 1, SolidLine ) );
1718
                p.setPen( TQPen( black, 1, SolidLine ) );
1719
                p.setBrush( NoBrush );
1719
                p.setBrush( NoBrush );
Lines 1766-1772 Link Here
1766
                    double _thirdY = m_symmetricEndPoint.y() - _diffY;
1766
                    double _thirdY = m_symmetricEndPoint.y() - _diffY;
1767
                    m_CubicBezierThirdPoint = KoPoint( _thirdX, _thirdY );
1767
                    m_CubicBezierThirdPoint = KoPoint( _thirdX, _thirdY );
1768
1768
1769
                    if ( toolEditMode == INS_TQUADRICBEZIERCURVE || toolEditMode == INS_CLOSED_TQUADRICBEZIERCURVE ) {
1769
                    if ( toolEditMode == INS_QUADRICBEZIERCURVE || toolEditMode == INS_CLOSED_QUADRICBEZIERCURVE ) {
1770
                        _secondX = _thirdX;
1770
                        _secondX = _thirdX;
1771
                        _secondY = _thirdY;
1771
                        _secondY = _thirdY;
1772
                        m_CubicBezierSecondPoint = KoPoint( _secondX, _secondY );
1772
                        m_CubicBezierSecondPoint = KoPoint( _secondX, _secondY );
Lines 3762-3774 Link Here
3762
            m_activePage->insertCubicBezierCurve( points, bezierPoints, rect, m_view->getPen(),
3762
            m_activePage->insertCubicBezierCurve( points, bezierPoints, rect, m_view->getPen(),
3763
                                                  m_view->getLineBegin(), m_view->getLineEnd() );
3763
                                                  m_view->getLineBegin(), m_view->getLineEnd() );
3764
        }
3764
        }
3765
        else if ( toolEditMode == INS_TQUADRICBEZIERCURVE )
3765
        else if ( toolEditMode == INS_QUADRICBEZIERCURVE )
3766
        {
3766
        {
3767
            m_activePage->insertQuadricBezierCurve( points, bezierPoints, rect, m_view->getPen(),
3767
            m_activePage->insertQuadricBezierCurve( points, bezierPoints, rect, m_view->getPen(),
3768
                                                    m_view->getLineBegin(), m_view->getLineEnd() );
3768
                                                    m_view->getLineBegin(), m_view->getLineEnd() );
3769
        }
3769
        }
3770
        else if ( toolEditMode == INS_CLOSED_CUBICBEZIERCURVE || 
3770
        else if ( toolEditMode == INS_CLOSED_CUBICBEZIERCURVE || 
3771
                  toolEditMode == INS_CLOSED_TQUADRICBEZIERCURVE )
3771
                  toolEditMode == INS_CLOSED_QUADRICBEZIERCURVE )
3772
        {
3772
        {
3773
            m_activePage->insertClosedLine( bezierPoints, rect, m_view->getPen(), m_view->getBrush(), 
3773
            m_activePage->insertClosedLine( bezierPoints, rect, m_view->getPen(), m_view->getBrush(), 
3774
                                            m_view->getFillType(), m_view->getGColor1(), m_view->getGColor2(), 
3774
                                            m_view->getFillType(), m_view->getGColor1(), m_view->getGColor2(), 
Lines 3832-3839 Link Here
3832
    if ( ( toolEditMode == INS_POLYLINE || toolEditMode == INS_CLOSED_POLYLINE ) && !m_pointArray.isNull())
3832
    if ( ( toolEditMode == INS_POLYLINE || toolEditMode == INS_CLOSED_POLYLINE ) && !m_pointArray.isNull())
3833
        endDrawPolyline();
3833
        endDrawPolyline();
3834
3834
3835
    if ( ( toolEditMode == INS_CUBICBEZIERCURVE || toolEditMode == INS_TQUADRICBEZIERCURVE
3835
    if ( ( toolEditMode == INS_CUBICBEZIERCURVE || toolEditMode == INS_QUADRICBEZIERCURVE
3836
           || toolEditMode == INS_CLOSED_CUBICBEZIERCURVE || toolEditMode == INS_CLOSED_TQUADRICBEZIERCURVE ) && !m_pointArray.isNull() )
3836
           || toolEditMode == INS_CLOSED_CUBICBEZIERCURVE || toolEditMode == INS_CLOSED_QUADRICBEZIERCURVE ) && !m_pointArray.isNull() )
3837
        endDrawCubicBezierCurve();
3837
        endDrawCubicBezierCurve();
3838
3838
3839
    exitEditMode();
3839
    exitEditMode();
Lines 5523-5529 Link Here
5523
    for ( ; it.current(); ++it ) {
5523
    for ( ; it.current(); ++it ) {
5524
        if ( it.current()->isSelected()
5524
        if ( it.current()->isSelected()
5525
             && (it.current()->getType() == OT_POLYLINE || it.current()->getType() == OT_FREEHAND
5525
             && (it.current()->getType() == OT_POLYLINE || it.current()->getType() == OT_FREEHAND
5526
                 || it.current()->getType() == OT_TQUADRICBEZIERCURVE
5526
                 || it.current()->getType() == OT_QUADRICBEZIERCURVE
5527
                 || it.current()->getType() == OT_CUBICBEZIERCURVE ))
5527
                 || it.current()->getType() == OT_CUBICBEZIERCURVE ))
5528
            lst.append( it.current()  );
5528
            lst.append( it.current()  );
5529
    }
5529
    }
Lines 5644-5650 Link Here
5644
            break;
5644
            break;
5645
        case OT_POLYLINE:
5645
        case OT_POLYLINE:
5646
        case OT_CUBICBEZIERCURVE:
5646
        case OT_CUBICBEZIERCURVE:
5647
        case OT_TQUADRICBEZIERCURVE:
5647
        case OT_QUADRICBEZIERCURVE:
5648
        case OT_FREEHAND:
5648
        case OT_FREEHAND:
5649
            m_view->openPopupMenuObject( "closed_popup", point );
5649
            m_view->openPopupMenuObject( "closed_popup", point );
5650
            break;
5650
            break;
(-)koffice/kpresenter/KPrClosedLineObject.cpp (-1 / +1 lines)
Lines 73-79 Link Here
73
        case OT_CUBICBEZIERCURVE:
73
        case OT_CUBICBEZIERCURVE:
74
            typeString = i18n( "Closed Cubic Bezier Curve" );
74
            typeString = i18n( "Closed Cubic Bezier Curve" );
75
            break;
75
            break;
76
        case OT_TQUADRICBEZIERCURVE:
76
        case OT_QUADRICBEZIERCURVE:
77
            typeString = i18n( "Closed Quadric Bezier Curve" );
77
            typeString = i18n( "Closed Quadric Bezier Curve" );
78
            break;
78
            break;
79
        default:    
79
        default:    
(-)koffice/kpresenter/KPrCommand.cpp (-2 / +2 lines)
Lines 981-987 Link Here
981
        } break;
981
        } break;
982
        case OT_FREEHAND:
982
        case OT_FREEHAND:
983
        case OT_POLYLINE:
983
        case OT_POLYLINE:
984
        case OT_TQUADRICBEZIERCURVE:
984
        case OT_QUADRICBEZIERCURVE:
985
        case OT_CUBICBEZIERCURVE:
985
        case OT_CUBICBEZIERCURVE:
986
        {
986
        {
987
            KPrPointObject *obj = dynamic_cast<KPrPointObject*>( object );
987
            KPrPointObject *obj = dynamic_cast<KPrPointObject*>( object );
Lines 1067-1073 Link Here
1067
                } break;
1067
                } break;
1068
                case OT_FREEHAND:
1068
                case OT_FREEHAND:
1069
                case OT_POLYLINE:
1069
                case OT_POLYLINE:
1070
                case OT_TQUADRICBEZIERCURVE:
1070
                case OT_QUADRICBEZIERCURVE:
1071
                case OT_CUBICBEZIERCURVE:
1071
                case OT_CUBICBEZIERCURVE:
1072
                {
1072
                {
1073
                    KPrPointObject *obj = dynamic_cast<KPrPointObject*>( object );
1073
                    KPrPointObject *obj = dynamic_cast<KPrPointObject*>( object );
(-)koffice/kpresenter/KPrDocument.cpp (-3 / +3 lines)
Lines 1958-1964 Link Here
1958
                            else
1958
                            else
1959
                                newpage->appendObject( kpCurveObject );
1959
                                newpage->appendObject( kpCurveObject );
1960
                        } break;
1960
                        } break;
1961
                    case OT_TQUADRICBEZIERCURVE:
1961
                    case OT_QUADRICBEZIERCURVE:
1962
                        {
1962
                        {
1963
                            kdDebug(33001) << "Quadricbeziercurve" << endl;
1963
                            kdDebug(33001) << "Quadricbeziercurve" << endl;
1964
                            KPrQuadricBezierCurveObject *kpQuadricObject = new KPrQuadricBezierCurveObject();
1964
                            KPrQuadricBezierCurveObject *kpQuadricObject = new KPrQuadricBezierCurveObject();
Lines 2022-2028 Link Here
2022
                                    else
2022
                                    else
2023
                                        newpage->appendObject( kpCurveObject );
2023
                                        newpage->appendObject( kpCurveObject );
2024
                                } break;
2024
                                } break;
2025
                            case OT_TQUADRICBEZIERCURVE:
2025
                            case OT_QUADRICBEZIERCURVE:
2026
                                {
2026
                                {
2027
                                    kdDebug(33001) << "Quadricbeziercurve" << endl;
2027
                                    kdDebug(33001) << "Quadricbeziercurve" << endl;
2028
                                    KPrQuadricBezierCurveObject *kpQuadricObject = new KPrQuadricBezierCurveObject();
2028
                                    KPrQuadricBezierCurveObject *kpQuadricObject = new KPrQuadricBezierCurveObject();
Lines 2963-2969 Link Here
2963
                else
2963
                else
2964
                    insertObjectInPage(offset, kppolylineobject);
2964
                    insertObjectInPage(offset, kppolylineobject);
2965
            } break;
2965
            } break;
2966
            case OT_TQUADRICBEZIERCURVE: {
2966
            case OT_QUADRICBEZIERCURVE: {
2967
                KPrQuadricBezierCurveObject *kpQuadricBezierCurveObject = new KPrQuadricBezierCurveObject();
2967
                KPrQuadricBezierCurveObject *kpQuadricBezierCurveObject = new KPrQuadricBezierCurveObject();
2968
                offset=kpQuadricBezierCurveObject->load(obj);
2968
                offset=kpQuadricBezierCurveObject->load(obj);
2969
                if ( sticky && !ignoreSticky)
2969
                if ( sticky && !ignoreSticky)
(-)koffice/kpresenter/KPrGroupObject.cpp (-1 / +1 lines)
Lines 248-254 Link Here
248
                    kppolylineobject->setOrig(kppolylineobject->getOrig().x(),objOffset - offset);
248
                    kppolylineobject->setOrig(kppolylineobject->getOrig().x(),objOffset - offset);
249
                    objects.append( kppolylineobject );
249
                    objects.append( kppolylineobject );
250
                } break;
250
                } break;
251
                case OT_TQUADRICBEZIERCURVE: {
251
                case OT_QUADRICBEZIERCURVE: {
252
                    KPrQuadricBezierCurveObject *kpQuadricBezierCurveObject = new KPrQuadricBezierCurveObject();
252
                    KPrQuadricBezierCurveObject *kpQuadricBezierCurveObject = new KPrQuadricBezierCurveObject();
253
                    objOffset = kpQuadricBezierCurveObject->load( current );
253
                    objOffset = kpQuadricBezierCurveObject->load( current );
254
                    kpQuadricBezierCurveObject->setOrig(kpQuadricBezierCurveObject->getOrig().x(),objOffset - offset);
254
                    kpQuadricBezierCurveObject->setOrig(kpQuadricBezierCurveObject->getOrig().x(),objOffset - offset);
(-)koffice/kpresenter/KPrObjectProperties.cpp (-2 / +2 lines)
Lines 56-62 Link Here
56
            case OT_LINE:
56
            case OT_LINE:
57
            case OT_FREEHAND:
57
            case OT_FREEHAND:
58
            case OT_POLYLINE:
58
            case OT_POLYLINE:
59
            case OT_TQUADRICBEZIERCURVE:
59
            case OT_QUADRICBEZIERCURVE:
60
            case OT_CUBICBEZIERCURVE:
60
            case OT_CUBICBEZIERCURVE:
61
                getPenProperties( it.current() );
61
                getPenProperties( it.current() );
62
                getLineEndsProperties( it.current() );
62
                getLineEndsProperties( it.current() );
Lines 145-151 Link Here
145
                }
145
                }
146
            case OT_FREEHAND:
146
            case OT_FREEHAND:
147
            case OT_POLYLINE:
147
            case OT_POLYLINE:
148
            case OT_TQUADRICBEZIERCURVE:
148
            case OT_QUADRICBEZIERCURVE:
149
            case OT_CUBICBEZIERCURVE:
149
            case OT_CUBICBEZIERCURVE:
150
                {
150
                {
151
                    KPrPointObject *obj = dynamic_cast<KPrPointObject*>( object );
151
                    KPrPointObject *obj = dynamic_cast<KPrPointObject*>( object );
(-)koffice/kpresenter/KPrPage.cpp (-1 / +1 lines)
Lines 1427-1433 Link Here
1427
        _type = i18n( "Closed Polyline" );
1427
        _type = i18n( "Closed Polyline" );
1428
        _name = i18n( "Insert Closed Polyline" );
1428
        _name = i18n( "Insert Closed Polyline" );
1429
    }
1429
    }
1430
    else if ( _mode == INS_CLOSED_TQUADRICBEZIERCURVE ) {
1430
    else if ( _mode == INS_CLOSED_QUADRICBEZIERCURVE ) {
1431
        _type = i18n( "Closed Quadric Bezier Curve" );
1431
        _type = i18n( "Closed Quadric Bezier Curve" );
1432
        _name = i18n( "Insert Closed Quadric Bezier Curve" );
1432
        _name = i18n( "Insert Closed Quadric Bezier Curve" );
1433
    }
1433
    }
(-)koffice/kpresenter/KPrQuadricBezierCurveObjectIface.h (-2 / +2 lines)
Lines 18-25 Link Here
18
 * Boston, MA 02110-1301, USA.
18
 * Boston, MA 02110-1301, USA.
19
*/
19
*/
20
20
21
#ifndef KPTQUADRI_OBJECT_IFACE_H
21
#ifndef KPQUADRI_OBJECT_IFACE_H
22
#define KPTQUADRI_OBJECT_IFACE_H
22
#define KPQUADRI_OBJECT_IFACE_H
23
23
24
#include <dcopobject.h>
24
#include <dcopobject.h>
25
#include <dcopref.h>
25
#include <dcopref.h>
(-)koffice/kpresenter/KPrSVGPathParser.cpp (-3 / +3 lines)
Lines 38-46 Link Here
38
    {
38
    {
39
        objType = OT_FREEHAND;
39
        objType = OT_FREEHAND;
40
    }
40
    }
41
    else if ( ( m_pathType & SEEN_TQUADRIC ) && ! ( m_pathType & SEEN_CUBIC ) )
41
    else if ( ( m_pathType & SEEN_QUADRIC ) && ! ( m_pathType & SEEN_CUBIC ) )
42
    {
42
    {
43
        objType = OT_TQUADRICBEZIERCURVE;
43
        objType = OT_QUADRICBEZIERCURVE;
44
    }
44
    }
45
    else if ( m_pathType & SEEN_CUBIC )
45
    else if ( m_pathType & SEEN_CUBIC )
46
    {
46
    {
Lines 119-125 Link Here
119
119
120
            if ( x1 == x2 && y1 == y2 )
120
            if ( x1 == x2 && y1 == y2 )
121
            {
121
            {
122
                m_pathType |= SEEN_TQUADRIC;
122
                m_pathType |= SEEN_QUADRIC;
123
            }
123
            }
124
            else
124
            else
125
            {
125
            {
(-)koffice/kpresenter/KPrSVGPathParser.h (-2 / +2 lines)
Lines 40-46 Link Here
40
     * @return The object type. This can be:
40
     * @return The object type. This can be:
41
     *             OT_FREEHAND
41
     *             OT_FREEHAND
42
     *             OT_CLOSED_LINE
42
     *             OT_CLOSED_LINE
43
     *             OT_TQUADRICBEZIERCURVE
43
     *             OT_QUADRICBEZIERCURVE
44
     *             OT_CUBICBEZIERCURVE
44
     *             OT_CUBICBEZIERCURVE
45
     *             or
45
     *             or
46
     *             OT_UNDEFINED if path is not supported
46
     *             OT_UNDEFINED if path is not supported
Lines 71-77 Link Here
71
        SEEN_MOVE = 1,
71
        SEEN_MOVE = 1,
72
        SEEN_LINE = 2,
72
        SEEN_LINE = 2,
73
        SEEN_CUBIC = 4,
73
        SEEN_CUBIC = 4,
74
        SEEN_TQUADRIC = 8,
74
        SEEN_QUADRIC = 8,
75
        SEEN_CLOSE = 16,
75
        SEEN_CLOSE = 16,
76
        NO_BEZIER = 32,
76
        NO_BEZIER = 32,
77
        UNSUPPORTED = 64
77
        UNSUPPORTED = 64
(-)koffice/kpresenter/KPrSideBar.cpp (-1 / +1 lines)
Lines 727-733 Link Here
727
    case OT_POLYLINE:
727
    case OT_POLYLINE:
728
        setPixmap( 0, KPBarIcon( "polyline" ) );
728
        setPixmap( 0, KPBarIcon( "polyline" ) );
729
        break;
729
        break;
730
    case OT_TQUADRICBEZIERCURVE:
730
    case OT_QUADRICBEZIERCURVE:
731
        setPixmap( 0, KPBarIcon( "quadricbeziercurve" ) );
731
        setPixmap( 0, KPBarIcon( "quadricbeziercurve" ) );
732
        break;
732
        break;
733
    case OT_CUBICBEZIERCURVE:
733
    case OT_CUBICBEZIERCURVE:
(-)koffice/kpresenter/KPrView.cpp (-2 / +2 lines)
Lines 1128-1134 Link Here
1128
void KPrView::toolsQuadricBezierCurve()
1128
void KPrView::toolsQuadricBezierCurve()
1129
{
1129
{
1130
    if ( actionToolsQuadricBezierCurve->isChecked() ) {
1130
    if ( actionToolsQuadricBezierCurve->isChecked() ) {
1131
        m_canvas->setToolEditMode( INS_TQUADRICBEZIERCURVE, false );
1131
        m_canvas->setToolEditMode( INS_QUADRICBEZIERCURVE, false );
1132
        deSelectAllObjects();
1132
        deSelectAllObjects();
1133
        m_currentLineTool = LtQuadricBezier;
1133
        m_currentLineTool = LtQuadricBezier;
1134
        actionToolsLinePopup->setIcon("quadricbeziercurve");
1134
        actionToolsLinePopup->setIcon("quadricbeziercurve");
Lines 1207-1213 Link Here
1207
void KPrView::toolsClosedQuadricBezierCurve()
1207
void KPrView::toolsClosedQuadricBezierCurve()
1208
{
1208
{
1209
    if ( actionToolsClosedQuadricBezierCurve->isChecked() ) {
1209
    if ( actionToolsClosedQuadricBezierCurve->isChecked() ) {
1210
        m_canvas->setToolEditMode( INS_CLOSED_TQUADRICBEZIERCURVE, false );
1210
        m_canvas->setToolEditMode( INS_CLOSED_QUADRICBEZIERCURVE, false );
1211
        deSelectAllObjects();
1211
        deSelectAllObjects();
1212
        m_currentClosedLineTool = CltQuadricBezier;
1212
        m_currentClosedLineTool = CltQuadricBezier;
1213
        actionToolsClosedLinePopup->setIcon("closed_quadricbeziercurve");
1213
        actionToolsClosedLinePopup->setIcon("closed_quadricbeziercurve");
(-)koffice/kpresenter/global.h (-3 / +3 lines)
Lines 66-72 Link Here
66
    OT_GROUP = 10,
66
    OT_GROUP = 10,
67
    OT_FREEHAND = 11,
67
    OT_FREEHAND = 11,
68
    OT_POLYLINE = 12,
68
    OT_POLYLINE = 12,
69
    OT_TQUADRICBEZIERCURVE = 13,
69
    OT_QUADRICBEZIERCURVE = 13,
70
    OT_CUBICBEZIERCURVE = 14,
70
    OT_CUBICBEZIERCURVE = 14,
71
    OT_POLYGON = 15,
71
    OT_POLYGON = 15,
72
    OT_CLOSED_LINE = 16
72
    OT_CLOSED_LINE = 16
Lines 258-264 Link Here
258
    INS_AUTOFORM = 10,
258
    INS_AUTOFORM = 10,
259
    INS_FREEHAND = 11,
259
    INS_FREEHAND = 11,
260
    INS_POLYLINE = 12,
260
    INS_POLYLINE = 12,
261
    INS_TQUADRICBEZIERCURVE = 13,
261
    INS_QUADRICBEZIERCURVE = 13,
262
    INS_CUBICBEZIERCURVE = 14,
262
    INS_CUBICBEZIERCURVE = 14,
263
    INS_POLYGON = 15,
263
    INS_POLYGON = 15,
264
    INS_PICTURE = 16,
264
    INS_PICTURE = 16,
Lines 267-273 Link Here
267
    TEM_ZOOM = 19,
267
    TEM_ZOOM = 19,
268
    INS_CLOSED_FREEHAND = 20,
268
    INS_CLOSED_FREEHAND = 20,
269
    INS_CLOSED_POLYLINE = 21,
269
    INS_CLOSED_POLYLINE = 21,
270
    INS_CLOSED_TQUADRICBEZIERCURVE = 22,
270
    INS_CLOSED_QUADRICBEZIERCURVE = 22,
271
    INS_CLOSED_CUBICBEZIERCURVE = 23
271
    INS_CLOSED_CUBICBEZIERCURVE = 23
272
};
272
};
273
273
(-)koffice/kspread/dialogs/kspread_dlg_csv.cc (-10 / +10 lines)
Lines 286-292 Link Here
286
  int row, column;
286
  int row, column;
287
  bool lastCharDelimiter = false;
287
  bool lastCharDelimiter = false;
288
  bool ignoreDups = m_ignoreDuplicates->isChecked();
288
  bool ignoreDups = m_ignoreDuplicates->isChecked();
289
  enum { S_START, S_TQUOTED_FIELD, S_MAYBE_END_OF_TQUOTED_FIELD, S_END_OF_TQUOTED_FIELD,
289
  enum { S_START, S_QUOTED_FIELD, S_MAYBE_END_OF_QUOTED_FIELD, S_END_OF_QUOTED_FIELD,
290
         S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START;
290
         S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START;
291
291
292
  TQChar x;
292
  TQChar x;
Lines 318-324 Link Here
318
     case S_START :
318
     case S_START :
319
      if (x == m_textquote)
319
      if (x == m_textquote)
320
      {
320
      {
321
        state = S_TQUOTED_FIELD;
321
        state = S_QUOTED_FIELD;
322
      }
322
      }
323
      else if (x == m_delimiter)
323
      else if (x == m_delimiter)
324
      {
324
      {
Lines 337-346 Link Here
337
        state = S_MAYBE_NORMAL_FIELD;
337
        state = S_MAYBE_NORMAL_FIELD;
338
      }
338
      }
339
      break;
339
      break;
340
     case S_TQUOTED_FIELD :
340
     case S_QUOTED_FIELD :
341
      if (x == m_textquote)
341
      if (x == m_textquote)
342
      {
342
      {
343
        state = S_MAYBE_END_OF_TQUOTED_FIELD;
343
        state = S_MAYBE_END_OF_QUOTED_FIELD;
344
      }
344
      }
345
      else if (x == '\n')
345
      else if (x == '\n')
346
      {
346
      {
Lines 364-374 Link Here
364
        field += x;
364
        field += x;
365
      }
365
      }
366
      break;
366
      break;
367
     case S_MAYBE_END_OF_TQUOTED_FIELD :
367
     case S_MAYBE_END_OF_QUOTED_FIELD :
368
      if (x == m_textquote)
368
      if (x == m_textquote)
369
      {
369
      {
370
        field += x;
370
        field += x;
371
        state = S_TQUOTED_FIELD;
371
        state = S_QUOTED_FIELD;
372
      }
372
      }
373
      else if (x == m_delimiter || x == '\n')
373
      else if (x == m_delimiter || x == '\n')
374
      {
374
      {
Lines 389-398 Link Here
389
      }
389
      }
390
      else
390
      else
391
      {
391
      {
392
        state = S_END_OF_TQUOTED_FIELD;
392
        state = S_END_OF_QUOTED_FIELD;
393
      }
393
      }
394
      break;
394
      break;
395
     case S_END_OF_TQUOTED_FIELD :
395
     case S_END_OF_QUOTED_FIELD :
396
      if (x == m_delimiter || x == '\n')
396
      if (x == m_delimiter || x == '\n')
397
      {
397
      {
398
        setText(row - m_startline, column, field);
398
        setText(row - m_startline, column, field);
Lines 412-425 Link Here
412
      }
412
      }
413
      else
413
      else
414
      {
414
      {
415
        state = S_END_OF_TQUOTED_FIELD;
415
        state = S_END_OF_QUOTED_FIELD;
416
      }
416
      }
417
      break;
417
      break;
418
     case S_MAYBE_NORMAL_FIELD :
418
     case S_MAYBE_NORMAL_FIELD :
419
      if (x == m_textquote)
419
      if (x == m_textquote)
420
      {
420
      {
421
        field = "";
421
        field = "";
422
        state = S_TQUOTED_FIELD;
422
        state = S_QUOTED_FIELD;
423
        break;
423
        break;
424
      }
424
      }
425
     case S_NORMAL_FIELD :
425
     case S_NORMAL_FIELD :
(-)koffice/kspread/kspread_functions_math.cc (-1 / +1 lines)
Lines 502-508 Link Here
502
  return calc->conv()->asInteger (args[0]);
502
  return calc->conv()->asInteger (args[0]);
503
}
503
}
504
504
505
// Function: TQUOTIENT
505
// Function: QUOTIENT
506
Value func_quotient (valVector args, ValueCalc *calc, FuncExtra *)
506
Value func_quotient (valVector args, ValueCalc *calc, FuncExtra *)
507
{
507
{
508
  if (calc->isZero (args[1]))
508
  if (calc->isZero (args[1]))
(-)koffice/kspread/kspread_global.h (-2 / +2 lines)
Lines 183-189 Link Here
183
    //INS_AUTOFORM = 10,
183
    //INS_AUTOFORM = 10,
184
    //INS_FREEHAND = 11,
184
    //INS_FREEHAND = 11,
185
    //INS_POLYLINE = 12,
185
    //INS_POLYLINE = 12,
186
    //INS_TQUADRICBEZIERCURVE = 13,
186
    //INS_QUADRICBEZIERCURVE = 13,
187
    //INS_CUBICBEZIERCURVE = 14,
187
    //INS_CUBICBEZIERCURVE = 14,
188
    //INS_POLYGON = 15,
188
    //INS_POLYGON = 15,
189
    INS_PICTURE = 16
189
    INS_PICTURE = 16
Lines 192-198 Link Here
192
    //TEM_ZOOM = 19,
192
    //TEM_ZOOM = 19,
193
    //INS_CLOSED_FREEHAND = 20,
193
    //INS_CLOSED_FREEHAND = 20,
194
    //INS_CLOSED_POLYLINE = 21,
194
    //INS_CLOSED_POLYLINE = 21,
195
    //INS_CLOSED_TQUADRICBEZIERCURVE = 22,
195
    //INS_CLOSED_QUADRICBEZIERCURVE = 22,
196
    //INS_CLOSED_CUBICBEZIERCURVE = 23
196
    //INS_CLOSED_CUBICBEZIERCURVE = 23
197
};
197
};
198
198
(-)koffice/lib/kformula/contextstyle.cc (-1 / +1 lines)
Lines 235-241 Link Here
235
    case THIN:    return getThinSpace( tstyle, factor );
235
    case THIN:    return getThinSpace( tstyle, factor );
236
    case MEDIUM:  return getMediumSpace( tstyle, factor );
236
    case MEDIUM:  return getMediumSpace( tstyle, factor );
237
    case THICK:   return getThickSpace( tstyle, factor );
237
    case THICK:   return getThickSpace( tstyle, factor );
238
    case TQUAD:    return getQuadSpace( tstyle, factor );
238
    case QUAD:    return getQuadSpace( tstyle, factor );
239
    }
239
    }
240
    return 0;
240
    return 0;
241
}
241
}
(-)koffice/lib/kformula/kformulacompatibility.cc (-1 / +1 lines)
Lines 45-51 Link Here
45
const BoxType OF_LSUP = '6' + UNUSED_OFFSET;
45
const BoxType OF_LSUP = '6' + UNUSED_OFFSET;
46
const BoxType OF_LSUB = '%' + UNUSED_OFFSET;
46
const BoxType OF_LSUB = '%' + UNUSED_OFFSET;
47
//const BoxType PAREN = '(';
47
//const BoxType PAREN = '(';
48
//const BoxType ETQUAL = '=';
48
//const BoxType EQUAL = '=';
49
//const BoxType MORE = '>';
49
//const BoxType MORE = '>';
50
//const BoxType LESS = '<';
50
//const BoxType LESS = '<';
51
//const BoxType ABS = '|';
51
//const BoxType ABS = '|';
(-)koffice/lib/kformula/kformuladefs.h (-1 / +1 lines)
Lines 180-186 Link Here
180
/**
180
/**
181
 * The types of space we know.
181
 * The types of space we know.
182
 */
182
 */
183
enum SpaceWidth { THIN, MEDIUM, THICK, TQUAD, NEGTHIN };
183
enum SpaceWidth { THIN, MEDIUM, THICK, QUAD, NEGTHIN };
184
184
185
/**
185
/**
186
 * The types of MathML horizontal or vertical sizes we know
186
 * The types of MathML horizontal or vertical sizes we know
(-)koffice/lib/kformula/kformuladocument.cc (-1 / +1 lines)
Lines 760-766 Link Here
760
void DocumentWrapper::addQuadSpace()
760
void DocumentWrapper::addQuadSpace()
761
{
761
{
762
    if (hasFormula()) {
762
    if (hasFormula()) {
763
        SpaceRequest r( TQUAD );
763
        SpaceRequest r( QUAD );
764
        formula()->performRequest( &r );
764
        formula()->performRequest( &r );
765
    }
765
    }
766
}
766
}
(-)koffice/lib/kformula/sequenceelement.cc (-1 / +1 lines)
Lines 1761-1767 Link Here
1761
    if ( name == "," )    return new SpaceElement( THIN );
1761
    if ( name == "," )    return new SpaceElement( THIN );
1762
    if ( name == ">" )    return new SpaceElement( MEDIUM );
1762
    if ( name == ">" )    return new SpaceElement( MEDIUM );
1763
    if ( name == ";" )    return new SpaceElement( THICK );
1763
    if ( name == ";" )    return new SpaceElement( THICK );
1764
    if ( name == "quad" ) return new SpaceElement( TQUAD );
1764
    if ( name == "quad" ) return new SpaceElement( QUAD );
1765
1765
1766
    if ( name == "frac" ) return new FractionElement();
1766
    if ( name == "frac" ) return new FractionElement();
1767
    if ( name == "atop" ) {
1767
    if ( name == "atop" ) {
(-)koffice/lib/kformula/spaceelement.cc (-1 / +1 lines)
Lines 55-61 Link Here
55
    case THICK:
55
    case THICK:
56
        m_widthType = ThickMathSpace;
56
        m_widthType = ThickMathSpace;
57
        break;
57
        break;
58
    case TQUAD:
58
    case QUAD:
59
        m_widthType = VeryVeryThickMathSpace;
59
        m_widthType = VeryVeryThickMathSpace;
60
        break;
60
        break;
61
    }
61
    }
(-)koffice/lib/kross/python/cxx/PyCXX.html (-1 / +1 lines)
Lines 1-7 Link Here
1
<html>
1
<html>
2
2
3
<head>
3
<head>
4
<meta HTTP-ETQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
4
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
5
<title>Writing Python Extensions in C++</title>
5
<title>Writing Python Extensions in C++</title>
6
<style>
6
<style>
7
H1, H2, H3, H4 {color: #000099;
7
H1, H2, H3, H4 {color: #000099;

Return to bug 782