summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/optcolor.hrc28
-rw-r--r--svx/source/dialog/fontsubs.src2
-rw-r--r--svx/source/dialog/optcolor.cxx122
-rw-r--r--svx/source/options/optcolor.src57
4 files changed, 191 insertions, 18 deletions
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";