summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/baside2.hxx2
-rw-r--r--basctl/source/basicide/baside2b.cxx11
-rw-r--r--basctl/source/basicide/bastypes.cxx1
-rw-r--r--basic/source/classes/sbxmod.cxx1
-rw-r--r--comphelper/Library_comphelper.mk7
-rw-r--r--comphelper/Package_inc.mk1
-rw-r--r--comphelper/inc/comphelper/syntaxhighlight.hxx (renamed from svtools/inc/svtools/syntaxhighlight.hxx)26
-rw-r--r--comphelper/source/misc/syntaxhighlight.cxx (renamed from svtools/source/edit/syntaxhighlight.cxx)6
-rw-r--r--helpcompiler/Library_helplinker.mk3
-rw-r--r--helpcompiler/inc/BasCodeTagger.hxx2
-rw-r--r--helpcompiler/prj/build.lst2
-rw-r--r--svtools/Library_svt.mk1
-rw-r--r--svtools/Package_inc.mk1
-rw-r--r--svtools/inc/svtools/editsyntaxhighlighter.hxx2
-rw-r--r--svtools/inc/svtools/svmedit.hxx3
15 files changed, 27 insertions, 42 deletions
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 1619261e7d78..3d1b4a2b8a19 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -453,7 +453,7 @@ private:
void NewConfig (bool bFirst);
private:
- // the color values (the indexes are TokenTypes, see svtools/syntaxhighlight.hxx)
+ // the color values (the indexes are TokenTypes, see comphelper/syntaxhighlight.hxx)
Color aColors[TT_KEYWORDS + 1];
// the configuration
svtools::ColorConfig aConfig;
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index b2a01828fa06..b812527e7801 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -41,7 +41,8 @@
#include <vcl/xtextedt.hxx>
#include <vcl/txtattr.hxx>
#include <svtools/textwindowpeer.hxx>
-#include <svtools/syntaxhighlight.hxx>
+#include <tools/stream.hxx>
+#include <comphelper/syntaxhighlight.hxx>
#include "svtools/treelistentry.hxx"
#include <vcl/taskpanelist.hxx>
#include <vcl/help.hxx>
@@ -788,13 +789,7 @@ void EditorWindow::ImpDoHighlight( sal_uLong nLine )
if ( bDoSyntaxHighlight )
{
OUString aLine( pEditEngine->GetText( nLine ) );
- Range aChanges = aHighlighter.notifyChange( nLine, 0, &aLine, 1 );
- if ( aChanges.Len() )
- {
- for ( long n = aChanges.Min() + 1; n <= aChanges.Max(); n++ )
- aSyntaxLineTable.insert( n );
- aSyntaxIdleTimer.Start();
- }
+ aHighlighter.notifyChange( nLine, 0, &aLine, 1 );
bool const bWasModified = pEditEngine->IsModified();
pEditEngine->RemoveAttribs( nLine, true );
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 340ea4052372..83cf3ba98c2c 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -36,6 +36,7 @@
#include <svl/intitem.hxx>
#include <svl/stritem.hxx>
#include <vcl/msgbox.hxx>
+#include <tools/stream.hxx>
namespace basctl
{
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 3c3ded97bc65..820885d2498f 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -36,7 +36,6 @@
#include "token.hxx"
#include "sbunoobj.hxx"
-#include <svtools/syntaxhighlight.hxx>
#include "sal/log.hxx"
#include <basic/basrdll.hxx>
diff --git a/comphelper/Library_comphelper.mk b/comphelper/Library_comphelper.mk
index 5c7fcd5a8c9a..93b0f3b48499 100644
--- a/comphelper/Library_comphelper.mk
+++ b/comphelper/Library_comphelper.mk
@@ -35,7 +35,11 @@ $(eval $(call gb_Library_add_defs,comphelper,\
-DCOMPHELPER_DLLIMPLEMENTATION \
))
-$(eval $(call gb_Library_use_external,comphelper,boost_headers))
+$(eval $(call gb_Library_use_externals,comphelper,\
+ boost_headers \
+ icuuc \
+ icu_headers \
+))
$(eval $(call gb_Library_use_libraries,comphelper,\
cppu \
@@ -108,6 +112,7 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\
comphelper/source/misc/storagehelper \
comphelper/source/misc/string \
comphelper/source/misc/synchronousdispatch \
+ comphelper/source/misc/syntaxhighlight \
comphelper/source/misc/types \
comphelper/source/misc/weak \
comphelper/source/misc/weakeventlistener \
diff --git a/comphelper/Package_inc.mk b/comphelper/Package_inc.mk
index 195a5c97c4a7..35552f6d58fc 100644
--- a/comphelper/Package_inc.mk
+++ b/comphelper/Package_inc.mk
@@ -124,5 +124,6 @@ $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/sequenceashashma
$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/configuration.hxx,comphelper/configuration.hxx))
$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/configurationhelper.hxx,comphelper/configurationhelper.hxx))
$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/newarray.hxx,comphelper/newarray.hxx))
+$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/syntaxhighlight.hxx,comphelper/syntaxhighlight.hxx))
# vim: set noet sw=4 ts=4:
diff --git a/svtools/inc/svtools/syntaxhighlight.hxx b/comphelper/inc/comphelper/syntaxhighlight.hxx
index 60e917dd967a..11a57db6ff05 100644
--- a/svtools/inc/svtools/syntaxhighlight.hxx
+++ b/comphelper/inc/comphelper/syntaxhighlight.hxx
@@ -16,20 +16,13 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef _SVTOOLS_SYNTAXHIGHLIGHT_HXX
-#define _SVTOOLS_SYNTAXHIGHLIGHT_HXX
+#ifndef _COMPHELPER_SYNTAXHIGHLIGHT_HXX
+#define _COMPHELPER_SYNTAXHIGHLIGHT_HXX
-#include <list>
+#include <vector>
+#include <rtl/ustring.hxx>
-#include <osl/mutex.hxx>
-
-#include <vcl/svapp.hxx>
-
-#include <tools/stream.hxx>
-#include <tools/shl.hxx>
-
-#include <svl/brdcst.hxx>
-#include <svtools/svtdllapi.h>
+#include <comphelper/comphelperdllapi.h>
#if defined CDECL
@@ -47,11 +40,6 @@
#include <sys/resource.h>
#endif
-#include <stdio.h>
-
-#include <tools/string.hxx>
-#include <tools/gen.hxx>
-
// Token-Typen TT_...
enum TokenTypes
@@ -145,7 +133,7 @@ public:
// aufgrund dieser Aenderung neu gehighlighted werden muss.
// Dazu merkt sich Highlighter intern fuer jede Zeile, ob dort
// C-Kommentare beginnen oder enden.
-class SVT_DLLPUBLIC SyntaxHighlighter
+class COMPHELPER_DLLPUBLIC SyntaxHighlighter
{
HighlighterLanguage eLanguage;
SimpleTokenizer_Impl* m_pSimpleTokenizer;
@@ -164,7 +152,7 @@ public:
// nur Zeile 0 angegeben werden.
void initialize( HighlighterLanguage eLanguage_ );
- const Range notifyChange( sal_uInt32 nLine, sal_Int32 nLineCountDifference,
+ void notifyChange( sal_uInt32 nLine, sal_Int32 nLineCountDifference,
const OUString* pChangedLines, sal_uInt32 nArrayLength);
void getHighlightPortions( sal_uInt32 nLine, const OUString& rLine,
diff --git a/svtools/source/edit/syntaxhighlight.cxx b/comphelper/source/misc/syntaxhighlight.cxx
index 920bac56892c..2064c0c76a11 100644
--- a/svtools/source/edit/syntaxhighlight.cxx
+++ b/comphelper/source/misc/syntaxhighlight.cxx
@@ -19,7 +19,7 @@
#include <unicode/uchar.h>
-#include <svtools/syntaxhighlight.hxx>
+#include <comphelper/syntaxhighlight.hxx>
#include <comphelper/string.hxx>
// ##########################################################################
@@ -721,15 +721,13 @@ void SyntaxHighlighter::initialize( HighlighterLanguage eLanguage_ )
}
}
-const Range SyntaxHighlighter::notifyChange( sal_uInt32 nLine, sal_Int32 nLineCountDifference,
+void SyntaxHighlighter::notifyChange( sal_uInt32 nLine, sal_Int32 nLineCountDifference,
const OUString* pChangedLines, sal_uInt32 nArrayLength)
{
(void)nLineCountDifference;
for( sal_uInt32 i=0 ; i < nArrayLength ; i++ )
m_pSimpleTokenizer->parseLine(nLine+i, &pChangedLines[i]);
-
- return Range( nLine, nLine + nArrayLength-1 );
}
void SyntaxHighlighter::getHighlightPortions( sal_uInt32 nLine, const OUString& rLine,
diff --git a/helpcompiler/Library_helplinker.mk b/helpcompiler/Library_helplinker.mk
index 0d9be0b3e43e..26a5dbac4aab 100644
--- a/helpcompiler/Library_helplinker.mk
+++ b/helpcompiler/Library_helplinker.mk
@@ -43,8 +43,7 @@ endif
$(eval $(call gb_Library_use_libraries,helplinker,\
sal \
- svt \
- tl \
+ comphelper \
))
$(eval $(call gb_Library_use_internal_api,helplinker,\
diff --git a/helpcompiler/inc/BasCodeTagger.hxx b/helpcompiler/inc/BasCodeTagger.hxx
index 3f67b4956db7..4b3834ad5b17 100644
--- a/helpcompiler/inc/BasCodeTagger.hxx
+++ b/helpcompiler/inc/BasCodeTagger.hxx
@@ -17,7 +17,7 @@
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
#include <rtl/ustring.hxx>
-#include <svtools/syntaxhighlight.hxx>
+#include <comphelper/syntaxhighlight.hxx>
#include <helpcompiler/dllapi.h>
class BasicCodeTagger;
diff --git a/helpcompiler/prj/build.lst b/helpcompiler/prj/build.lst
index 2e10667b606f..df9a71a5ac3a 100644
--- a/helpcompiler/prj/build.lst
+++ b/helpcompiler/prj/build.lst
@@ -1,3 +1,3 @@
-tr helpcompiler : EXPAT:expat LIBXSLT:libxslt CLUCENE:clucene sal NULL
+tr helpcompiler : EXPAT:expat LIBXSLT:libxslt CLUCENE:clucene sal comphelper NULL
tr helpcompiler usr1 - all tr_mkout NULL
tr helpcompiler\prj nmake - all tr_prj NULL
diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk
index 3331de6e55bf..dcabca004984 100644
--- a/svtools/Library_svt.mk
+++ b/svtools/Library_svt.mk
@@ -142,7 +142,6 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
svtools/source/edit/editsyntaxhighlighter \
svtools/source/edit/svmedit \
svtools/source/edit/svmedit2 \
- svtools/source/edit/syntaxhighlight \
svtools/source/edit/textwindowpeer \
svtools/source/filter/SvFilterOptionsDialog \
svtools/source/filter/exportdialog \
diff --git a/svtools/Package_inc.mk b/svtools/Package_inc.mk
index 9be94a3f844b..47fdf39b5214 100644
--- a/svtools/Package_inc.mk
+++ b/svtools/Package_inc.mk
@@ -135,7 +135,6 @@ $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svtabbx.hxx,svtools/sv
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svtresid.hxx,svtools/svtresid.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svtdllapi.h,svtools/svtdllapi.h))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svtools.hrc,svtools/svtools.hrc))
-$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/syntaxhighlight.hxx,svtools/syntaxhighlight.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/tabbar.hxx,svtools/tabbar.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tablecontrolinterface.hxx,svtools/table/tablecontrolinterface.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/defaultinputhandler.hxx,svtools/table/defaultinputhandler.hxx))
diff --git a/svtools/inc/svtools/editsyntaxhighlighter.hxx b/svtools/inc/svtools/editsyntaxhighlighter.hxx
index 7f81ae6327ca..747d0567c213 100644
--- a/svtools/inc/svtools/editsyntaxhighlighter.hxx
+++ b/svtools/inc/svtools/editsyntaxhighlighter.hxx
@@ -20,8 +20,8 @@
#ifndef _EDITSYNTAXHIGHLIGHTER_HXX
#define _EDITSYNTAXHIGHLIGHTER_HXX
+#include <comphelper/syntaxhighlight.hxx>
#include <svtools/svmedit.hxx>
-#include <svtools/syntaxhighlight.hxx>
#include <svtools/svtdllapi.h>
#include <svtools/colorcfg.hxx>
diff --git a/svtools/inc/svtools/svmedit.hxx b/svtools/inc/svtools/svmedit.hxx
index e6e4f0bbd8cb..c0672a520824 100644
--- a/svtools/inc/svtools/svmedit.hxx
+++ b/svtools/inc/svtools/svmedit.hxx
@@ -20,9 +20,10 @@
#ifndef _SVEDIT_HXX
#define _SVEDIT_HXX
+#include <vcl/svapp.hxx>
#include <vcl/vclmedit.hxx>
-#include <svtools/syntaxhighlight.hxx>
+#include <comphelper/syntaxhighlight.hxx>
#include <svtools/svtdllapi.h>
#include <svtools/colorcfg.hxx>