diff options
author | Release Engineers <releng@openoffice.org> | 2008-11-28 11:39:37 +0000 |
---|---|---|
committer | Release Engineers <releng@openoffice.org> | 2008-11-28 11:39:37 +0000 |
commit | 4bd944387888c0d6c0bde3de260546951c9a4031 (patch) | |
tree | 8952b1cec8eb02792a39a07a97b13a59637be27b | |
parent | 8e4829da0488ddfa68ee5e9f97682f4df44ce42c (diff) |
CWS-TOOLING: integrate CWS sqlsyntaxhighlighting
2008-11-20 17:23:29 +0100 mod r264074 : new colors by UX
2008-11-17 17:37:19 +0100 mod r263732 : revert manual fix for icu
2008-11-17 15:03:39 +0100 mod r263725 : manual fix for icu
2008-11-17 11:26:39 +0100 mod r263709 : manual fix for icu
2008-11-16 18:19:16 +0100 mod r263702 : `fix
2008-11-12 22:11:50 +0100 mod r263619 : CWS-TOOLING: rebase CWS sqlsyntaxhighlighting to trunk@263288 (milestone: DEV300:m35)
2008-11-12 11:04:33 +0100 mod r263578 : minor cleanup
2008-11-12 11:03:02 +0100 mod r263577 : seperate MulitLineEditSyntaxHighlighter into new file
2008-11-06 15:13:27 +0100 fs r263391 : merged from trunk
2008-11-06 15:09:20 +0100 fs r263390 : merged from trunk
2008-11-06 15:07:06 +0100 fs r263388 : reverted the change c262599. This seems to be a merge from trunk, but without properly setting svn:mergeinfo, thus it results in conflicts when doing a real 'svn merge'.
2008-11-06 15:03:19 +0100 fs r263387 : merged rev. 262769
2008-11-03 17:58:19 +0100 mod r263297 : little fixes
2008-11-03 17:56:49 +0100 mod r263296 : little fixes
2008-11-03 17:12:41 +0100 mod r263295 : new entry SQL comment for Tools-Appearance
2008-11-03 17:12:13 +0100 mod r263294 : different tokenizer based on language
2008-11-03 17:11:40 +0100 mod r263293 : new entry for Tools-Appearance: SQL Comment
2008-11-03 17:11:14 +0100 mod r263292 : get notification about color changes for sql view
2008-10-29 00:01:40 +0100 mod r262768 : string listbox
2008-10-28 23:57:45 +0100 mod r262767 : string listbox
2008-10-22 18:38:07 +0200 mod r262614 : source alignment fix
2008-10-22 18:37:23 +0200 mod r262613 : '' as string as well
2008-10-22 18:36:45 +0200 mod r262612 : get syntax highlighting in tools-sql...
2008-10-22 14:11:12 +0200 mod r262605 : formatting fix
2008-10-22 13:30:42 +0200 mod r262599 : additional entries for Tools-Options-Appearance
2008-10-19 22:53:50 +0200 mod r262302 : migration from cvs to svn
2008-10-19 22:37:45 +0200 mod r262301 : migration from cvs to svn
2008-10-19 22:36:04 +0200 mod r262300 : migration from cvs to svn
-rw-r--r-- | basic/inc/basic/hilight.hxx | 126 | ||||
-rw-r--r-- | basic/prj/d.lst | 1 | ||||
-rw-r--r-- | basic/source/app/msgedit.hxx | 6 | ||||
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 701 | ||||
-rw-r--r-- | officecfg/registry/data/org/openoffice/Office/UI.xcu | 54 | ||||
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/UI.xcs | 72 | ||||
-rw-r--r-- | svx/inc/optcolor.hrc | 28 | ||||
-rw-r--r-- | svx/source/dialog/fontsubs.src | 2 | ||||
-rw-r--r-- | svx/source/dialog/optcolor.cxx | 122 | ||||
-rw-r--r-- | svx/source/options/optcolor.src | 57 |
10 files changed, 308 insertions, 861 deletions
diff --git a/basic/inc/basic/hilight.hxx b/basic/inc/basic/hilight.hxx deleted file mode 100644 index b29d2135d069..000000000000 --- a/basic/inc/basic/hilight.hxx +++ /dev/null @@ -1,126 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: hilight.hxx,v $ - * $Revision: 1.3 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SB_HILIGHT_HXX -#define _SB_HILIGHT_HXX - -#include <tools/string.hxx> -#include <tools/gen.hxx> - -#include <svtools/svarray.hxx> - -//#include <sbxmod.cxx> -class SimpleTokenizer_Impl; - -// Token-Typen TT_... -enum TokenTypes -{ - TT_UNKNOWN, - TT_IDENTIFIER, - TT_WHITESPACE, - TT_NUMBER, - TT_STRING, - TT_EOL, - TT_COMMENT, - TT_ERROR, - TT_OPERATOR, - TT_KEYWORD -}; - -struct HighlightPortion { UINT16 nBegin; UINT16 nEnd; TokenTypes tokenType; }; - -SV_DECL_VARARR(HighlightPortions, HighlightPortion, 0, 16) - -// Sprachmodus des HighLighters (spaeter eventuell feiner -// differenzieren mit Keyword-Liste, C-Kommentar-Flag) -enum HighlighterLanguage -{ - HIGHLIGHT_BASIC -}; - -//*** SyntaxHighlighter-Klasse *** -// Konzept: Der Highlighter wird ueber alle Aenderungen im Source -// informiert (notifyChange) und liefert dem Aufrufer jeweils die -// Information zurueck, welcher Zeilen-Bereich des Source-Codes -// aufgrund dieser Aenderung neu gehighlighted werden muss. -// Dazu merkt sich Highlighter intern fuer jede Zeile, ob dort -// C-Kommentare beginnen oder enden. -class SyntaxHighlighter -{ - HighlighterLanguage eLanguage; - SimpleTokenizer_Impl* m_pSimpleTokenizer; - char* m_pKeyWords; - UINT16 m_nKeyWordCount; - -// void initializeKeyWords( HighlighterLanguage eLanguage ); - -public: - SyntaxHighlighter( void ); - ~SyntaxHighlighter( void ); - - // HighLighter (neu) initialisieren, die Zeilen-Tabelle wird - // dabei komplett geloescht, d.h. im Abschluss wird von einem - // leeren Source ausgegangen. In notifyChange() kann dann - // nur Zeile 0 angegeben werden. - void initialize( HighlighterLanguage eLanguage_ ); - - /** - * Aenderung im Source anzeigen - * @param nLine = Zeile, in der die Aenderung erfolgt, dies entspricht - * der Zeile, in der im Editor der Cursor steht. Index der 1. Zeile ist 0. - * @param nLineCountDifference = Anzahl der Zeilen, die im Rahmen der - * Aenderung nach nLine eingefuegt (positiver Wert) oder entfernt - * (negativer Wert) werden. 0, wenn von der Aenderung nur nLine - * betroffen ist. - * @param pChangedLines = Array der Zeilen, die von der Aenderung - * betroffen sind (das Array enthaelt die geaenderten Zeilen) - * - * @return Zeilen-Bereich des SourceCodes, dessen Syntax-Higlighting - * erneuert werden muss, z.B. weil ein C-Kommentar geoeffnet wurde. - */ - const Range notifyChange( UINT32 nLine, INT32 nLineCountDifference, - const String* pChangedLines, UINT32 nArrayLength); - - /** - * Higlighting durchfuehren - * @param nLine = Zeile, fuer die die Highlight-Tokens geliefert - * werden sollen. Index der 1. Zeile ist 0. - * @param rLine = Zeile, fuer die die Highlight-Tokens geliefert - * werden sollen. als String - * @param Ein VarArray von HighlightPortion, in das die Start- und - * die End-Indizes und die Typen der Token der Zeile eingetragen werden. - */ - void getHighlightPortions( UINT32 nLine, const String& rLine, - /*out*/HighlightPortions& pPortions ); - -}; - -#endif - diff --git a/basic/prj/d.lst b/basic/prj/d.lst index d920102c9ee4..d2a083ebcb1e 100644 --- a/basic/prj/d.lst +++ b/basic/prj/d.lst @@ -36,7 +36,6 @@ mkdir: %_DEST%\inc%_EXT%\basic ..\inc\basic\sberrors.hxx %_DEST%\inc%_EXT%\basic\sberrors.hxx ..\inc\basic\basrdll.hxx %_DEST%\inc%_EXT%\basic\basrdll.hxx ..\inc\basic\sbstdobj.hxx %_DEST%\inc%_EXT%\basic\sbstdobj.hxx -..\inc\basic\hilight.hxx %_DEST%\inc%_EXT%\basic\hilight.hxx ..\inc\basic\process.hxx %_DEST%\inc%_EXT%\basic\process.hxx ..\inc\basic\mybasic.hxx %_DEST%\inc%_EXT%\basic\mybasic.hxx ..\inc\basic\testtool.hxx %_DEST%\inc%_EXT%\basic\testtool.hxx diff --git a/basic/source/app/msgedit.hxx b/basic/source/app/msgedit.hxx index 5f0e03149859..0bc86e9d3b9e 100644 --- a/basic/source/app/msgedit.hxx +++ b/basic/source/app/msgedit.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: msgedit.hxx,v $ - * $Revision: 1.11 $ + * $Revision: 1.11.40.1 $ * * This file is part of OpenOffice.org. * @@ -32,9 +32,9 @@ #define _MSGEDIT_HXX #include <svtools/svtreebx.hxx> - -#include "dataedit.hxx" #include <basic/testtool.hxx> +#include "dataedit.hxx" + class BasicFrame; class AppError; diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 9dc0b2efe4dc..a534209b0cfa 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: sbxmod.cxx,v $ - * $Revision: 1.44 $ + * $Revision: 1.44.10.1 $ * * This file is part of OpenOffice.org. * @@ -48,10 +48,15 @@ #include "runtime.hxx" #include "token.hxx" #include "sbunoobj.hxx" -#include <basic/hilight.hxx> + + +//#include <basic/hilight.hxx> +#include <svtools/syntaxhighlight.hxx> + #include <basic/basrdll.hxx> #include <vos/mutex.hxx> + // for the bsearch #ifdef WNT #define CDECL _cdecl @@ -79,142 +84,6 @@ SV_IMPL_VARARR(SbiBreakpoints,USHORT) SV_IMPL_VARARR(HighlightPortions, HighlightPortion) -// ########################################################################## -// ACHTUNG!!! Alle Woerter dieser Tabelle mssen KLEIN geschrieben werden!!! -// ########################################################################## -static const char* strListBasicKeyWords[] = { - "access", - "alias", - "and", - "any", - "append", - "as", - "base", - "binary", - "boolean", - "byref", - "byte", - "byval", - "call", - "case", - "cdecl", - "classmodule", - "close", - "compare", - "compatible", - "const", - "currency", - "date", - "declare", - "defbool", - "defcur", - "defdate", - "defdbl", - "deferr", - "defint", - "deflng", - "defobj", - "defsng", - "defstr", - "defvar", - "dim", - "do", - "double", - "each", - "else", - "elseif", - "end", - "end enum", - "end function", - "end if", - "end select", - "end sub", - "end type", - "endif", - "enum", - "eqv", - "erase", - "error", - "exit", - "explicit", - "for", - "function", - "get", - "global", - "gosub", - "goto", - "if", - "imp", - "implements", - "in", - "input", - "integer", - "is", - "let", - "lib", - "like", - "line", - "line input", - "local", - "lock", - "long", - "loop", - "lprint", - "lset", - "mod", - "name", - "new", - "next", - "not", - "object", - "on", - "open", - "option", - "optional", - "or", - "output", - "preserve", - "print", - "private", - "property", - "public", - "random", - "read", - "redim", - "rem", - "resume", - "return", - "rset", - "select", - "set", - "shared", - "single", - "static", - "step", - "stop", - "string", - "sub", - "system", - "text", - "then", - "to", - "type", - "typeof", - "until", - "variant", - "wend", - "while", - "with", - "write", - "xor" -}; - -extern "C" int CDECL compare_strings( const void *arg1, const void *arg2 ) -{ - return strcmp( (char *)arg1, *(char **)arg2 ); -} - - ///////////////////////////////////////////////////////////////////////////// @@ -1324,562 +1193,6 @@ BOOL SbModule::LoadCompleted() return TRUE; } - -///////////////////////////////////////////////////////////////////////// -// Hilfsklasse zur Untersuchung von JavaScript-Modulen, zunaechst zum -// Heraussuchen der Funktionen, spaeter auch zum Syntax-Highlighting verwenden - -// Flags fuer Zeichen-Eigenschaften -#define CHAR_START_IDENTIFIER 0x0001 -#define CHAR_IN_IDENTIFIER 0x0002 -#define CHAR_START_NUMBER 0x0004 -#define CHAR_IN_NUMBER 0x0008 -#define CHAR_IN_HEX_NUMBER 0x0010 -#define CHAR_IN_OCT_NUMBER 0x0020 -#define CHAR_START_STRING 0x0040 -#define CHAR_OPERATOR 0x0080 -#define CHAR_SPACE 0x0100 -#define CHAR_EOL 0x0200 - -#define CHAR_EOF 0x00 - - -class SimpleTokenizer_Impl -{ - // Zeichen-Info-Tabelle - USHORT aCharTypeTab[256]; - - const sal_Unicode* mpStringBegin; - const sal_Unicode* mpActualPos; - - // Zeile und Spalte - UINT32 nLine; - UINT32 nCol; - - sal_Unicode peekChar( void ) { return *mpActualPos; } - sal_Unicode getChar( void ) { nCol++; return *mpActualPos++; } - - // Hilfsfunktion: Zeichen-Flag Testen - BOOL testCharFlags( sal_Unicode c, USHORT nTestFlags ); - - // Neues Token holen, Leerstring == nix mehr da - BOOL getNextToken( /*out*/TokenTypes& reType, - /*out*/const sal_Unicode*& rpStartPos, /*out*/const sal_Unicode*& rpEndPos ); - - String getTokStr( /*out*/const sal_Unicode* pStartPos, /*out*/const sal_Unicode* pEndPos ); - -#ifndef PRODUCT - // TEST: Token ausgeben - String getFullTokenStr( /*out*/TokenTypes eType, - /*out*/const sal_Unicode* pStartPos, /*out*/const sal_Unicode* pEndPos ); -#endif - - const char** ppListKeyWords; - UINT16 nKeyWordCount; - -public: - SimpleTokenizer_Impl( void ); - ~SimpleTokenizer_Impl( void ); - - UINT16 parseLine( UINT32 nLine, const String* aSource ); - void getHighlightPortions( UINT32 nParseLine, const String& rLine, - /*out*/HighlightPortions& portions ); - void setKeyWords( const char** ppKeyWords, UINT16 nCount ); -}; - -// Hilfsfunktion: Zeichen-Flag Testen -BOOL SimpleTokenizer_Impl::testCharFlags( sal_Unicode c, USHORT nTestFlags ) -{ - bool bRet = false; - if( c != 0 && c <= 255 ) - { - bRet = ( (aCharTypeTab[c] & nTestFlags) != 0 ); - } - else if( c > 255 ) - { - bRet = (( CHAR_START_IDENTIFIER | CHAR_IN_IDENTIFIER ) & nTestFlags) != 0 - ? BasicSimpleCharClass::isAlpha( c, true ) : false; - } - return bRet; -} - -void SimpleTokenizer_Impl::setKeyWords( const char** ppKeyWords, UINT16 nCount ) -{ - ppListKeyWords = ppKeyWords; - nKeyWordCount = nCount; -} - -// Neues Token holen -BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType, - /*out*/const sal_Unicode*& rpStartPos, /*out*/const sal_Unicode*& rpEndPos ) -{ - reType = TT_UNKNOWN; - - // Position merken - rpStartPos = mpActualPos; - - // Zeichen untersuchen - sal_Unicode c = peekChar(); - if( c == CHAR_EOF ) - return FALSE; - - // Zeichen lesen - getChar(); - - //*** Alle Moeglichkeiten durchgehen *** - // Space? - if ( (testCharFlags( c, CHAR_SPACE ) == TRUE) ) - { - while( testCharFlags( peekChar(), CHAR_SPACE ) == TRUE ) - getChar(); - - reType = TT_WHITESPACE; - } - - // Identifier? - else if ( (testCharFlags( c, CHAR_START_IDENTIFIER ) == TRUE) ) - { - BOOL bIdentifierChar; - do - { - // Naechstes Zeichen holen - c = peekChar(); - bIdentifierChar = testCharFlags( c, CHAR_IN_IDENTIFIER ); - if( bIdentifierChar ) - getChar(); - } - while( bIdentifierChar ); - - reType = TT_IDENTIFIER; - - // Schluesselwort-Tabelle - if (ppListKeyWords != NULL) - { - int nCount = mpActualPos - rpStartPos; - - // No keyword if string contains char > 255 - bool bCanBeKeyword = true; - for( int i = 0 ; i < nCount ; i++ ) - { - if( rpStartPos[i] > 255 ) - { - bCanBeKeyword = false; - break; - } - } - - if( bCanBeKeyword ) - { - String aKWString( - rpStartPos, sal::static_int_cast< xub_StrLen >(nCount) ); - ByteString aByteStr( aKWString, RTL_TEXTENCODING_ASCII_US ); - aByteStr.ToLowerAscii(); - if ( bsearch( aByteStr.GetBuffer(), ppListKeyWords, nKeyWordCount, sizeof( char* ), - compare_strings ) ) - { - reType = TT_KEYWORD; - - if ( aByteStr.Equals( "rem" ) ) - { - // Alle Zeichen bis Zeilen-Ende oder EOF entfernen - sal_Unicode cPeek = peekChar(); - while( cPeek != CHAR_EOF && testCharFlags( cPeek, CHAR_EOL ) == FALSE ) - { - c = getChar(); - cPeek = peekChar(); - } - - reType = TT_COMMENT; - } - } - } - } - } - - // Operator? - else if ( testCharFlags( c, CHAR_OPERATOR ) == TRUE || c == '\'' ) - { - // Kommentar ? - if ( c == '\'' ) - { - c = getChar(); // '/' entfernen - - // Alle Zeichen bis Zeilen-Ende oder EOF entfernen - sal_Unicode cPeek = peekChar(); - while( cPeek != CHAR_EOF && testCharFlags( cPeek, CHAR_EOL ) == FALSE ) - { - getChar(); - cPeek = peekChar(); - } - - reType = TT_COMMENT; - } - - // Echter Operator, kann hier einfach behandelt werden, - // da nicht der wirkliche Operator, wie z.B. += interessiert, - // sondern nur die Tatsache, dass es sich um einen handelt. - if( reType != TT_COMMENT ) - { - reType = TT_OPERATOR; - } - } - - // Objekt-Trenner? Muss vor Number abgehandelt werden - else if( c == '.' && ( peekChar() < '0' || peekChar() > '9' ) ) - { - reType = TT_OPERATOR; - } - - // Zahl? - else if( testCharFlags( c, CHAR_START_NUMBER ) == TRUE ) - { - reType = TT_NUMBER; - - // Zahlensystem, 10 = normal, wird bei Oct/Hex geaendert - int nRadix = 10; - - // Ist es eine Hex- oder Oct-Zahl? - if( c == '&' ) - { - // Octal? - if( peekChar() == 'o' || peekChar() == 'O' ) - { - // o entfernen - getChar(); - nRadix = 8; // Octal-Basis - - // Alle Ziffern einlesen - while( testCharFlags( peekChar(), CHAR_IN_OCT_NUMBER ) ) - c = getChar(); - } - // Hex? - else if( peekChar() == 'h' || peekChar() == 'H' ) - { - // x entfernen - getChar(); - nRadix = 16; // Hex-Basis - - // Alle Ziffern einlesen und puffern - while( testCharFlags( peekChar(), CHAR_IN_HEX_NUMBER ) ) - c = getChar(); - } - else - { - reType = TT_OPERATOR; - } - } - - // Wenn nicht Oct oder Hex als double ansehen - if( reType == TT_NUMBER && nRadix == 10 ) - { - // Flag, ob das letzte Zeichen ein Exponent war - BOOL bAfterExpChar = FALSE; - - // Alle Ziffern einlesen - while( testCharFlags( peekChar(), CHAR_IN_NUMBER ) || - (bAfterExpChar && peekChar() == '+' ) || - (bAfterExpChar && peekChar() == '-' ) ) - // Nach Exponent auch +/- OK - { - c = getChar(); // Zeichen lesen - bAfterExpChar = ( c == 'e' || c == 'E' ); - } - } - - // reType = TT_NUMBER; - } - - // String? - else if( testCharFlags( c, CHAR_START_STRING ) == TRUE ) - { - // Merken, welches Zeichen den String eroeffnet hat - sal_Unicode cEndString = c; - if( c == '[' ) - cEndString = ']'; - - // Alle Ziffern einlesen und puffern - while( peekChar() != cEndString ) - { - // #58846 EOF vor getChar() abfangen, damit EOF micht verloren geht - if( peekChar() == CHAR_EOF ) - { - // ERROR: unterminated string literal - reType = TT_ERROR; - break; - } - c = getChar(); - if( testCharFlags( c, CHAR_EOL ) == TRUE ) - { - // ERROR: unterminated string literal - reType = TT_ERROR; - break; - } - } - - // Zeichen lesen - if( reType != TT_ERROR ) - { - getChar(); - if( cEndString == ']' ) - reType = TT_IDENTIFIER; - else - reType = TT_STRING; - } - } - - // Zeilenende? - else if( testCharFlags( c, CHAR_EOL ) == TRUE ) - { - // Falls ein weiteres anderes EOL-Char folgt, weg damit - sal_Unicode cNext = peekChar(); - if( cNext != c && testCharFlags( cNext, CHAR_EOL ) == TRUE ) - getChar(); - - // Positions-Daten auf Zeilen-Beginn setzen - nCol = 0; - nLine++; - - reType = TT_EOL; - } - - // Alles andere bleibt TT_UNKNOWN - - - // End-Position eintragen - rpEndPos = mpActualPos; - return TRUE; -} - -String SimpleTokenizer_Impl::getTokStr - ( /*out*/const sal_Unicode* pStartPos, /*out*/const sal_Unicode* pEndPos ) -{ - return String( pStartPos, (USHORT)( pEndPos - pStartPos ) ); -} - -#ifndef PRODUCT -// TEST: Token ausgeben -String SimpleTokenizer_Impl::getFullTokenStr( /*out*/TokenTypes eType, - /*out*/const sal_Unicode* pStartPos, /*out*/const sal_Unicode* pEndPos ) -{ - String aOut; - switch( eType ) - { - case TT_UNKNOWN: aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_UNKNOWN:") ); break; - case TT_IDENTIFIER: aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_IDENTIFIER:") ); break; - case TT_WHITESPACE: aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_WHITESPACE:") ); break; - case TT_NUMBER: aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_NUMBER:") ); break; - case TT_STRING: aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_STRING:") ); break; - case TT_EOL: aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_EOL:") ); break; - case TT_COMMENT: aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_COMMENT:") ); break; - case TT_ERROR: aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_ERROR:") ); break; - case TT_OPERATOR: aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_OPERATOR:") ); break; - case TT_KEYWORD: aOut = String( RTL_CONSTASCII_USTRINGPARAM("TT_KEYWORD:") ); break; - } - if( eType != TT_EOL ) - { - aOut += String( pStartPos, (USHORT)( pEndPos - pStartPos ) ); - } - aOut += String( RTL_CONSTASCII_USTRINGPARAM("\n") ); - return aOut; -} -#endif - -SimpleTokenizer_Impl::SimpleTokenizer_Impl( void ) -{ - memset( aCharTypeTab, 0, sizeof( aCharTypeTab ) ); - - // Zeichen-Tabelle fuellen - USHORT i; - - // Zulaessige Zeichen fuer Identifier - USHORT nHelpMask = (USHORT)( CHAR_START_IDENTIFIER | CHAR_IN_IDENTIFIER ); - for( i = 'a' ; i <= 'z' ; i++ ) - aCharTypeTab[i] |= nHelpMask; - for( i = 'A' ; i <= 'Z' ; i++ ) - aCharTypeTab[i] |= nHelpMask; - // '_' extra eintragen - aCharTypeTab[(int)'_'] |= nHelpMask; - // AB 23.6.97: '$' ist auch erlaubt - aCharTypeTab[(int)'$'] |= nHelpMask; - - // Ziffern (Identifier und Number ist moeglich) - nHelpMask = (USHORT)( CHAR_IN_IDENTIFIER | CHAR_START_NUMBER | - CHAR_IN_NUMBER | CHAR_IN_HEX_NUMBER ); - for( i = '0' ; i <= '9' ; i++ ) - aCharTypeTab[i] |= nHelpMask; - - // e und E sowie . von Hand ergaenzen - aCharTypeTab[(int)'e'] |= CHAR_IN_NUMBER; - aCharTypeTab[(int)'E'] |= CHAR_IN_NUMBER; - aCharTypeTab[(int)'.'] |= (USHORT)( CHAR_IN_NUMBER | CHAR_START_NUMBER ); - aCharTypeTab[(int)'&'] |= CHAR_START_NUMBER; - - // Hex-Ziffern - for( i = 'a' ; i <= 'f' ; i++ ) - aCharTypeTab[i] |= CHAR_IN_HEX_NUMBER; - for( i = 'A' ; i <= 'F' ; i++ ) - aCharTypeTab[i] |= CHAR_IN_HEX_NUMBER; - - // Oct-Ziffern - for( i = '0' ; i <= '7' ; i++ ) - aCharTypeTab[i] |= CHAR_IN_OCT_NUMBER; - - // String-Beginn/End-Zeichen - aCharTypeTab[(int)'\''] |= CHAR_START_STRING; - aCharTypeTab[(int)'\"'] |= CHAR_START_STRING; - aCharTypeTab[(int)'['] |= CHAR_START_STRING; - - // Operator-Zeichen - aCharTypeTab[(int)'!'] |= CHAR_OPERATOR; - aCharTypeTab[(int)'%'] |= CHAR_OPERATOR; - // aCharTypeTab[(int)'&'] |= CHAR_OPERATOR; Removed because of #i14140 - aCharTypeTab[(int)'('] |= CHAR_OPERATOR; - aCharTypeTab[(int)')'] |= CHAR_OPERATOR; - aCharTypeTab[(int)'*'] |= CHAR_OPERATOR; - aCharTypeTab[(int)'+'] |= CHAR_OPERATOR; - aCharTypeTab[(int)','] |= CHAR_OPERATOR; - aCharTypeTab[(int)'-'] |= CHAR_OPERATOR; - aCharTypeTab[(int)'/'] |= CHAR_OPERATOR; - aCharTypeTab[(int)':'] |= CHAR_OPERATOR; - aCharTypeTab[(int)'<'] |= CHAR_OPERATOR; - aCharTypeTab[(int)'='] |= CHAR_OPERATOR; - aCharTypeTab[(int)'>'] |= CHAR_OPERATOR; - aCharTypeTab[(int)'?'] |= CHAR_OPERATOR; - aCharTypeTab[(int)'^'] |= CHAR_OPERATOR; - aCharTypeTab[(int)'|'] |= CHAR_OPERATOR; - aCharTypeTab[(int)'~'] |= CHAR_OPERATOR; - aCharTypeTab[(int)'{'] |= CHAR_OPERATOR; - aCharTypeTab[(int)'}'] |= CHAR_OPERATOR; - // aCharTypeTab[(int)'['] |= CHAR_OPERATOR; Removed because of #i17826 - aCharTypeTab[(int)']'] |= CHAR_OPERATOR; - aCharTypeTab[(int)';'] |= CHAR_OPERATOR; - - // Space - aCharTypeTab[(int)' ' ] |= CHAR_SPACE; - aCharTypeTab[(int)'\t'] |= CHAR_SPACE; - - // Zeilen-Ende-Zeichen - aCharTypeTab[(int)'\r'] |= CHAR_EOL; - aCharTypeTab[(int)'\n'] |= CHAR_EOL; - - ppListKeyWords = NULL; -} - -SimpleTokenizer_Impl::~SimpleTokenizer_Impl( void ) -{ -} - -SimpleTokenizer_Impl* getSimpleTokenizer( void ) -{ - static SimpleTokenizer_Impl* pSimpleTokenizer = NULL; - if( !pSimpleTokenizer ) - pSimpleTokenizer = new SimpleTokenizer_Impl(); - return pSimpleTokenizer; -} - -// Heraussuchen der jeweils naechsten Funktion aus einem JavaScript-Modul -UINT16 SimpleTokenizer_Impl::parseLine( UINT32 nParseLine, const String* aSource ) -{ - // Position auf den Anfang des Source-Strings setzen - mpStringBegin = mpActualPos = aSource->GetBuffer(); - - // Zeile und Spalte initialisieren - nLine = nParseLine; - nCol = 0L; - - // Variablen fuer die Out-Parameter - TokenTypes eType; - const sal_Unicode* pStartPos; - const sal_Unicode* pEndPos; - - // Schleife ueber alle Tokens - UINT16 nTokenCount = 0; - while( getNextToken( eType, pStartPos, pEndPos ) ) - nTokenCount++; - - return nTokenCount; -} - -void SimpleTokenizer_Impl::getHighlightPortions( UINT32 nParseLine, const String& rLine, - /*out*/HighlightPortions& portions ) -{ - // Position auf den Anfang des Source-Strings setzen - mpStringBegin = mpActualPos = rLine.GetBuffer(); - - // Zeile und Spalte initialisieren - nLine = nParseLine; - nCol = 0L; - - // Variablen fuer die Out-Parameter - TokenTypes eType; - const sal_Unicode* pStartPos; - const sal_Unicode* pEndPos; - - // Schleife ueber alle Tokens - while( getNextToken( eType, pStartPos, pEndPos ) ) - { - HighlightPortion portion; - - portion.nBegin = (UINT16)(pStartPos - mpStringBegin); - portion.nEnd = (UINT16)(pEndPos - mpStringBegin); - portion.tokenType = eType; - - portions.Insert(portion, portions.Count()); - } -} - - -////////////////////////////////////////////////////////////////////////// -// Implementierung des SyntaxHighlighter - -SyntaxHighlighter::SyntaxHighlighter() -{ - m_pSimpleTokenizer = new SimpleTokenizer_Impl(); - m_pKeyWords = NULL; - m_nKeyWordCount = 0; -} - -SyntaxHighlighter::~SyntaxHighlighter() -{ - delete(m_pSimpleTokenizer); - delete(m_pKeyWords); -} - -void SyntaxHighlighter::initialize( HighlighterLanguage eLanguage_ ) -{ - eLanguage = eLanguage_; - delete(m_pSimpleTokenizer); - m_pSimpleTokenizer = new SimpleTokenizer_Impl(); - - if (eLanguage == HIGHLIGHT_BASIC) - { - m_pSimpleTokenizer->setKeyWords( strListBasicKeyWords, - sizeof( strListBasicKeyWords ) / sizeof( char* )); - } - else - { - m_pSimpleTokenizer->setKeyWords( NULL, 0 ); - } -} - -const Range SyntaxHighlighter::notifyChange( UINT32 nLine, INT32 nLineCountDifference, - const String* pChangedLines, UINT32 nArrayLength) -{ - (void)nLineCountDifference; - - for( UINT32 i=0 ; i < nArrayLength ; i++ ) - m_pSimpleTokenizer->parseLine(nLine+i, &pChangedLines[i]); - - return Range( nLine, nLine + nArrayLength-1 ); -} - -void SyntaxHighlighter::getHighlightPortions( UINT32 nLine, const String& rLine, - /*out*/HighlightPortions& portions ) -{ - m_pSimpleTokenizer->getHighlightPortions( nLine, rLine, portions ); -} - - ///////////////////////////////////////////////////////////////////////// // Implementation SbJScriptModule (Basic-Modul fuer JavaScript-Sourcen) SbJScriptModule::SbJScriptModule( const String& rName ) diff --git a/officecfg/registry/data/org/openoffice/Office/UI.xcu b/officecfg/registry/data/org/openoffice/Office/UI.xcu index 5d49a81c7880..6eac4bc4d595 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI.xcu @@ -8,7 +8,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: UI.xcu,v $ - * $Revision: 1.38 $ + * $Revision: 1.38.90.1 $ * * This file is part of OpenOffice.org. * @@ -529,24 +529,42 @@ <value xsi:nil="true"/> </prop> </node> + <node oor:name="SQLIdentifier"> + <prop oor:name="Color" oor:type="xs:int"> + <value xsi:nil="true"/> + </prop> + </node> + <node oor:name="SQLNumber"> + <prop oor:name="Color" oor:type="xs:int"> + <value xsi:nil="true"/> + </prop> + </node> + <node oor:name="SQLString"> + <prop oor:name="Color" oor:type="xs:int"> + <value xsi:nil="true"/> + </prop> + </node> + <node oor:name="SQLOperator"> + <prop oor:name="Color" oor:type="xs:int"> + <value xsi:nil="true"/> + </prop> + </node> + <node oor:name="SQLKeyword"> + <prop oor:name="Color" oor:type="xs:int"> + <value xsi:nil="true"/> + </prop> + </node> + <node oor:name="SQLParameter"> + <prop oor:name="Color" oor:type="xs:int"> + <value xsi:nil="true"/> + </prop> + </node> + <node oor:name="SQLComment"> + <prop oor:name="Color" oor:type="xs:int"> + <value xsi:nil="true"/> + </prop> + </node> </node> </node> </node> </oor:component-data> - - - - - - - - - - - - - - - - - diff --git a/officecfg/registry/schema/org/openoffice/Office/UI.xcs b/officecfg/registry/schema/org/openoffice/Office/UI.xcs index f4cff4578dcb..02e90d75daef 100644 --- a/officecfg/registry/schema/org/openoffice/Office/UI.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/UI.xcs @@ -8,7 +8,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: UI.xcs,v $ - * $Revision: 1.30 $ + * $Revision: 1.30.126.1 $ * * This file is part of OpenOffice.org. * @@ -532,6 +532,76 @@ </info> </prop> </group> + <group oor:name="SQLIdentifier"> + <info> + <desc>Specifies the settings for SQL identifiers, as used the Query Designer.</desc> + </info> + <prop oor:name="Color" oor:type="xs:int"> + <info> + <desc>Specifies the color used for SQL identifiers.</desc> + </info> + </prop> + </group> + <group oor:name="SQLNumber"> + <info> + <desc>Specifies the settings for SQL numbers, as used the Query Designer.</desc> + </info> + <prop oor:name="Color" oor:type="xs:int"> + <info> + <desc>Specifies the color used for SQL numbers.</desc> + </info> + </prop> + </group> + <group oor:name="SQLString"> + <info> + <desc>Specifies the settings for SQL strings, as used the Query Designer.</desc> + </info> + <prop oor:name="Color" oor:type="xs:int"> + <info> + <desc>Specifies the color used for SQL strings.</desc> + </info> + </prop> + </group> + <group oor:name="SQLOperator"> + <info> + <desc>Specifies the settings for SQL operators, as used the Query Designer.</desc> + </info> + <prop oor:name="Color" oor:type="xs:int"> + <info> + <desc>Specifies the color used for SQL operators.</desc> + </info> + </prop> + </group> + <group oor:name="SQLKeyword"> + <info> + <desc>Specifies the settings for SQL keywords, as used the Query Designer.</desc> + </info> + <prop oor:name="Color" oor:type="xs:int"> + <info> + <desc>Specifies the color used for SQL keywords.</desc> + </info> + </prop> + </group> + <group oor:name="SQLParameter"> + <info> + <desc>Specifies the settings for SQL parameters, as used the Query Designer.</desc> + </info> + <prop oor:name="Color" oor:type="xs:int"> + <info> + <desc>Specifies the color used for SQL parameters.</desc> + </info> + </prop> + </group> + <group oor:name="SQLComment"> + <info> + <desc>Specifies the settings for SQL comments, as used the Query Designer.</desc> + </info> + <prop oor:name="Color" oor:type="xs:int"> + <info> + <desc>Specifies the color used for SQL parameters.</desc> + </info> + </prop> + </group> </group> </templates> <component> diff --git a/svx/inc/optcolor.hrc b/svx/inc/optcolor.hrc index 9fb1ac9320c0..06730cf196c0 100644 --- a/svx/inc/optcolor.hrc +++ b/svx/inc/optcolor.hrc @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: optcolor.hrc,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.196.1 $ * * This file is part of OpenOffice.org. * @@ -165,8 +165,34 @@ #define FT_BASICERROR 163 #define LB_BASICERROR 164 #define WN_BASICERROR 165 + +#define FT_SQL_COMMAND 173 +#define FT_SQLIDENTIFIER 174 +#define LB_SQLIDENTIFIER 175 +#define WN_SQLIDENTIFIER 176 +#define FT_SQLNUMBER 177 +#define LB_SQLNUMBER 178 +#define WN_SQLNUMBER 179 +#define FT_SQLSTRING 180 +#define LB_SQLSTRING 181 +#define WN_SQLSTRING 182 +#define FT_SQLOPERATOR 183 +#define LB_SQLOPERATOR 184 +#define WN_SQLOPERATOR 185 +#define FT_SQLKEYWORD 186 +#define LB_SQLKEYWORD 187 +#define WN_SQLKEYWORD 188 +#define FT_SQLPARAMETER 189 +#define LB_SQLPARAMETER 190 +#define WN_SQLPARAMETER 191 +#define FT_SQLCOMMENT 192 +#define LB_SQLCOMMENT 193 +#define WN_SQLCOMMENT 194 + #define ST_EXTENSION 166 + + #define _FT_WIDTH 120 #define _LINE_HEIGHT 15 #define _FT_HEIGHT 10 diff --git a/svx/source/dialog/fontsubs.src b/svx/source/dialog/fontsubs.src index ef1c011a6a0d..f3160d2f4808 100644 --- a/svx/source/dialog/fontsubs.src +++ b/svx/source/dialog/fontsubs.src @@ -139,7 +139,7 @@ TabPage RID_SVX_FONT_SUBSTITUTION { Pos = MAP_APPFONT ( 6 , 129 ) ; Size = MAP_APPFONT ( 248 , 8 ) ; - Text [ en-US ] = "Font settings for HTML and Basic sources" ; + Text [ en-US ] = "Font settings for HTML, Basic and SQL sources" ; }; FixedText FT_FONTNAME { diff --git a/svx/source/dialog/optcolor.cxx b/svx/source/dialog/optcolor.cxx index 284294f91fc8..11112dd936cd 100644 --- a/svx/source/dialog/optcolor.cxx +++ b/svx/source/dialog/optcolor.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: optcolor.cxx,v $ - * $Revision: 1.18 $ + * $Revision: 1.18.256.2 $ * * This file is part of OpenOffice.org. * @@ -62,7 +62,7 @@ using namespace ::com::sun::star; using namespace ::svtools; -#define GROUP_COUNT 6 +#define GROUP_COUNT 7 #define GROUP_UNKNOWN -1 #define GROUP_GENERAL 0 #define GROUP_WRITER 1 @@ -70,6 +70,7 @@ using namespace ::svtools; #define GROUP_CALC 3 #define GROUP_DRAW 4 #define GROUP_BASIC 5 +#define GROUP_SQL 6 /* -----------------------------2002/06/26 10:48------------------------------ @@ -221,6 +222,29 @@ class ColorConfigWindow_Impl : public Window FixedText aBasicErrorFT; ColorListBox aBasicErrorLB; Window aBasicErrorWN; + Window aSQLBackWN; + SvxExtFixedText_Impl aSQLFT; + FixedText aSQLIdentifierFT; + ColorListBox aSQLIdentifierLB; + Window aSQLIdentifierWN; + FixedText aSQLNumberFT; + ColorListBox aSQLNumberLB; + Window aSQLNumberWN; + FixedText aSQLStringFT; + ColorListBox aSQLStringLB; + Window aSQLStringWN; + FixedText aSQLOperatorFT; + ColorListBox aSQLOperatorLB; + Window aSQLOperatorWN; + FixedText aSQLKeywordFT; + ColorListBox aSQLKeywordLB; + Window aSQLKeywordWN; + FixedText aSQLParameterFT; + ColorListBox aSQLParameterLB; + Window aSQLParameterWN; + FixedText aSQLCommentFT; + ColorListBox aSQLCommentLB; + Window aSQLCommentWN; ::std::vector< SvxExtFixedText_Impl*> aChapters; ::std::vector< Window* > aChapterWins; @@ -269,6 +293,11 @@ sal_Bool lcl_isGroupVisible( sal_Int32 _nGroup, const SvtModuleOptions& _rModOpt _rModOptions.IsModuleInstalled( SvtModuleOptions::E_SIMPRESS ) ); break; } + case GROUP_SQL : + { + bRet = _rModOptions.IsModuleInstalled( SvtModuleOptions::E_SDATABASE ); + break; + } } return bRet; @@ -352,8 +381,18 @@ sal_Int16 lcl_getGroup( sal_Int32 _nFeature ) nRet = GROUP_BASIC; break; } + case SQLIDENTIFIER : + case SQLNUMBER: + case SQLSTRING: + case SQLOPERATOR: + case SQLKEYWORD: + case SQLPARAMETER: + case SQLCOMMENT: + { + nRet = GROUP_SQL; + break; + } } - return nRet; } @@ -484,7 +523,37 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe aBasicKeywordWN(this, ResId( WN_BASICKEYWORD, *rResId.GetResMgr())), aBasicErrorFT(this, ResId( FT_BASICERROR, *rResId.GetResMgr())), aBasicErrorLB(this, ResId( LB_BASICERROR, *rResId.GetResMgr())), - aBasicErrorWN(this, ResId( WN_BASICERROR, *rResId.GetResMgr())) + aBasicErrorWN(this, ResId( WN_BASICERROR, *rResId.GetResMgr())), + + aSQLBackWN(this), + aSQLFT(this, ResId( FT_SQL_COMMAND, *rResId.GetResMgr())), + aSQLIdentifierFT(this, ResId( FT_SQLIDENTIFIER, *rResId.GetResMgr())), + aSQLIdentifierLB(this, ResId( LB_SQLIDENTIFIER, *rResId.GetResMgr())), + aSQLIdentifierWN(this, ResId( WN_SQLIDENTIFIER, *rResId.GetResMgr())), + + aSQLNumberFT(this, ResId( FT_SQLNUMBER, *rResId.GetResMgr())), + aSQLNumberLB(this, ResId( LB_SQLNUMBER, *rResId.GetResMgr())), + aSQLNumberWN(this, ResId( WN_SQLNUMBER, *rResId.GetResMgr())), + + aSQLStringFT(this, ResId( FT_SQLSTRING, *rResId.GetResMgr())), + aSQLStringLB(this, ResId( LB_SQLSTRING, *rResId.GetResMgr())), + aSQLStringWN(this, ResId( WN_SQLSTRING, *rResId.GetResMgr())), + + aSQLOperatorFT(this, ResId( FT_SQLOPERATOR, *rResId.GetResMgr())), + aSQLOperatorLB(this, ResId( LB_SQLOPERATOR, *rResId.GetResMgr())), + aSQLOperatorWN(this, ResId( WN_SQLOPERATOR, *rResId.GetResMgr())), + + aSQLKeywordFT(this, ResId( FT_SQLKEYWORD, *rResId.GetResMgr())), + aSQLKeywordLB(this, ResId( LB_SQLKEYWORD, *rResId.GetResMgr())), + aSQLKeywordWN(this, ResId( WN_SQLKEYWORD, *rResId.GetResMgr())), + + aSQLParameterFT(this, ResId( FT_SQLPARAMETER, *rResId.GetResMgr())), + aSQLParameterLB(this, ResId( LB_SQLPARAMETER, *rResId.GetResMgr())), + aSQLParameterWN(this, ResId( WN_SQLPARAMETER, *rResId.GetResMgr())), + + aSQLCommentFT(this, ResId( FT_SQLCOMMENT, *rResId.GetResMgr())), + aSQLCommentLB(this, ResId( LB_SQLCOMMENT, *rResId.GetResMgr())), + aSQLCommentWN(this, ResId( WN_SQLCOMMENT, *rResId.GetResMgr())) { aFixedTexts.resize(ColorConfigEntryCount); aCheckBoxes.resize(ColorConfigEntryCount); @@ -505,7 +574,7 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe aCheckBoxes[WRITERFIELDSHADINGS ] = &aWrtFieldCB ; aCheckBoxes[WRITERIDXSHADINGS ] = &aWrtIdxShadingBackCB ; aFixedTexts[WRITERDIRECTCURSOR ]=& aWrtDirectCrsrFT; - aFixedTexts[WRITERSCRIPTINDICATOR ]=& aWrtScriptIndicatorFT; + aFixedTexts[WRITERSCRIPTINDICATOR ]=& aWrtScriptIndicatorFT; aCheckBoxes[WRITERSECTIONBOUNDARIES ]=& aWrtSectionBoundCB; aFixedTexts[HTMLSGML ]=& aHTMLSGMLFT; aFixedTexts[HTMLCOMMENT ]=& aHTMLCommentFT; @@ -527,7 +596,14 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe aFixedTexts[BASICSTRING ] = &aBasicStringFT; aFixedTexts[BASICOPERATOR ] = &aBasicOperatorFT; aFixedTexts[BASICKEYWORD ] = &aBasicKeywordFT; - aFixedTexts[BASICERROR ] = &aBasicErrorFT; + aFixedTexts[BASICERROR ] = &aBasicErrorFT; + aFixedTexts[SQLIDENTIFIER ] = &aSQLIdentifierFT; + aFixedTexts[SQLNUMBER ] = &aSQLNumberFT; + aFixedTexts[SQLSTRING ] = &aSQLStringFT; + aFixedTexts[SQLOPERATOR ] = &aSQLOperatorFT; + aFixedTexts[SQLKEYWORD ] = &aSQLKeywordFT; + aFixedTexts[SQLPARAMETER ] = &aSQLParameterFT; + aFixedTexts[SQLCOMMENT ] = &aSQLCommentFT; aColorBoxes[DOCCOLOR ] = &aDocColorLB ; aColorBoxes[DOCBOUNDARIES ] = &aDocBoundLB ; @@ -559,13 +635,20 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe aColorBoxes[CALCREFERENCE ] = &aCalcReferenceLB ; aColorBoxes[CALCNOTESBACKGROUND ] = &aCalcNotesBackLB ; aColorBoxes[DRAWGRID ] = &aDrawGridLB ; - aColorBoxes[BASICIDENTIFIER ] = &aBasicIdentifierLB; - aColorBoxes[BASICCOMMENT ] = &aBasicCommentLB; - aColorBoxes[BASICNUMBER ] = &aBasicNumberLB; - aColorBoxes[BASICSTRING ] = &aBasicStringLB; - aColorBoxes[BASICOPERATOR ] = &aBasicOperatorLB; - aColorBoxes[BASICKEYWORD ] = &aBasicKeywordLB; - aColorBoxes[BASICERROR ] = &aBasicErrorLB; + aColorBoxes[BASICIDENTIFIER ] = &aBasicIdentifierLB; + aColorBoxes[BASICCOMMENT ] = &aBasicCommentLB; + aColorBoxes[BASICNUMBER ] = &aBasicNumberLB; + aColorBoxes[BASICSTRING ] = &aBasicStringLB; + aColorBoxes[BASICOPERATOR ] = &aBasicOperatorLB; + aColorBoxes[BASICKEYWORD ] = &aBasicKeywordLB; + aColorBoxes[BASICERROR ] = &aBasicErrorLB; + aColorBoxes[SQLIDENTIFIER ] = &aSQLIdentifierLB; + aColorBoxes[SQLNUMBER ] = &aSQLNumberLB; + aColorBoxes[SQLSTRING ] = &aSQLStringLB; + aColorBoxes[SQLOPERATOR ] = &aSQLOperatorLB; + aColorBoxes[SQLKEYWORD ] = &aSQLKeywordLB; + aColorBoxes[SQLPARAMETER ] = &aSQLParameterLB; + aColorBoxes[SQLCOMMENT ] = &aSQLCommentLB; aWindows[DOCCOLOR ] = &aDocColorWN ; aWindows[DOCBOUNDARIES ] = &aDocBoundWN ; @@ -604,6 +687,13 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe aWindows[BASICOPERATOR ] = &aBasicOperatorWN; aWindows[BASICKEYWORD ] = &aBasicKeywordWN; aWindows[BASICERROR ] = &aBasicErrorWN; + aWindows[SQLIDENTIFIER ] = &aSQLIdentifierWN; + aWindows[SQLNUMBER ] = &aSQLNumberWN; + aWindows[SQLSTRING ] = &aSQLStringWN; + aWindows[SQLOPERATOR ] = &aSQLOperatorWN; + aWindows[SQLKEYWORD ] = &aSQLKeywordWN; + aWindows[SQLPARAMETER ] = &aSQLParameterWN; + aWindows[SQLCOMMENT ] = &aSQLCommentWN; aChapters.push_back(&aGeneralFT); aChapterWins.push_back(&aGeneralBackWN); aChapters.push_back(&aWriterFT); aChapterWins.push_back(&aWriterBackWN); @@ -611,19 +701,21 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe aChapters.push_back(&aCalcFT); aChapterWins.push_back(&aCalcBackWN); aChapters.push_back(&aDrawFT); aChapterWins.push_back(&aDrawBackWN); aChapters.push_back(&aBasicFT); aChapterWins.push_back(&aBasicBackWN); + aChapters.push_back(&aSQLFT); aChapterWins.push_back(&aSQLBackWN); // calculate heights of groups which can be hidden aChapters[GROUP_WRITER ]->SetGroupHeight( aChapters[GROUP_HTML]->GetPosPixel().Y() - aChapters[GROUP_WRITER]->GetPosPixel().Y() ); aChapters[GROUP_HTML ]->SetGroupHeight( aChapters[GROUP_CALC]->GetPosPixel().Y() - aChapters[GROUP_HTML]->GetPosPixel().Y() ); aChapters[GROUP_CALC ]->SetGroupHeight( aChapters[GROUP_DRAW]->GetPosPixel().Y() - aChapters[GROUP_CALC]->GetPosPixel().Y() ); aChapters[GROUP_DRAW ]->SetGroupHeight( aChapters[GROUP_BASIC]->GetPosPixel().Y() - aChapters[GROUP_DRAW]->GetPosPixel().Y() ); + aChapters[GROUP_BASIC ]->SetGroupHeight( aChapters[GROUP_SQL]->GetPosPixel().Y() - aChapters[GROUP_BASIC]->GetPosPixel().Y() ); ExtendedColorConfig aExtConfig; sal_Int32 nExtCount = aExtConfig.GetComponentCount(); if ( nExtCount ) { // calculate position behind last chapter - sal_Int32 nLastY = aBasicErrorWN.GetPosPixel().Y() + aBasicErrorWN.GetSizePixel().Height(); + sal_Int32 nLastY = aSQLCommentWN.GetPosPixel().Y() + aSQLCommentWN.GetSizePixel().Height(); nLastY = nLastY + LogicToPixel( Size( 0, 3 ), MAP_APPFONT ).Height(); // to calculate the number of lines sal_Int32 nHeight = LogicToPixel( Size( 0, _LINE_HEIGHT ), MAP_APPFONT ).Height(); @@ -639,7 +731,7 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe { ::rtl::OUString sComponentName = aExtConfig.GetComponentName(j); aChapterWins.push_back(new Window(this)); - ::boost::shared_ptr<SvxExtFixedText_Impl> pTitle(new SvxExtFixedText_Impl(this,ResId(FT_BASIC, *rResId.GetResMgr()))); + ::boost::shared_ptr<SvxExtFixedText_Impl> pTitle(new SvxExtFixedText_Impl(this,ResId(FT_SQL_COMMAND, *rResId.GetResMgr()))); m_aExtensionTitles.push_back(pTitle); pTitle->SetPosSizePixel(LogicToPixel( Point( _FT_XPOS, nLineNum * _LINE_HEIGHT ), MAP_APPFONT ),aFixedSize); pTitle->SetText(aExtConfig.GetComponentDisplayName(sComponentName)); diff --git a/svx/source/options/optcolor.src b/svx/source/options/optcolor.src index d1b34b6115ea..593439807c14 100644 --- a/svx/source/options/optcolor.src +++ b/svx/source/options/optcolor.src @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: optcolor.src,v $ - * $Revision: 1.47 $ + * $Revision: 1.47.196.1 $ * * This file is part of OpenOffice.org. * @@ -434,6 +434,61 @@ TabPage RID_SVXPAGE_COLORCONFIG }; LB_WN( BASICERROR, 42 ) + FixedText FT_SQL_COMMAND + { + FT_SEP_POS_SIZE( 43 ); + Text [ en-US ] = "SQL Syntax Highlighting"; + }; + + FixedText FT_SQLIDENTIFIER + { + FT_POS_SIZE( 44 ); + Text [ en-US ] = "Identifier"; + }; + LB_WN( SQLIDENTIFIER, 44 ) + + FixedText FT_SQLNUMBER + { + FT_POS_SIZE( 45 ); + Text [ en-US ] = "Number"; + }; + LB_WN( SQLNUMBER, 45 ) + + FixedText FT_SQLSTRING + { + FT_POS_SIZE( 46 ); + Text [ en-US ] = "String"; + }; + LB_WN( SQLSTRING, 46 ) + + FixedText FT_SQLOPERATOR + { + FT_POS_SIZE( 47 ); + Text [ en-US ] = "Operator"; + }; + LB_WN( SQLOPERATOR, 47 ) + + FixedText FT_SQLKEYWORD + { + FT_POS_SIZE( 48 ); + Text [ en-US ] = "Keyword"; + }; + LB_WN( SQLKEYWORD, 48 ) + + FixedText FT_SQLPARAMETER + { + FT_POS_SIZE( 49 ); + Text [ en-US ] = "Parameter"; + }; + LB_WN( SQLPARAMETER, 49 ) + + FixedText FT_SQLCOMMENT + { + FT_POS_SIZE( 50 ); + Text [ en-US ] = "Comment"; + }; + LB_WN( SQLCOMMENT, 50 ) + String ST_EXTENSION { Text [ en-US ] = "Colorsettings of the Extensions"; |