Commit Graph

911 Commits

Author SHA1 Message Date
Peter Kümmel
ace2418598 trivial changes for all-in-one compilation
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17494 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-20 21:53:01 +00:00
Enrico Forestieri
faa47db187 Don't hide the library directory when it appears alone
src/support/filetools.C
	(makeDisplayPath): do not shorten path when it is the libdir one.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17442 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-14 00:36:25 +00:00
Georg Baum
ac7ee5b85e Don't use the char version of uppercase
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17430 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-13 10:22:10 +00:00
Georg Baum
4f4c5d4954 * src/support/lstrings.C
(lowercase): assert that input is pure ASCII
	(uppercase): ditto

	* src/support/lstrings.h
	(lowercase): document that only ASCII input is allowed
	(uppercase): ditto

	* src/lyxfind.C
	(stringSelected): Use compare_no_case (more efficient)

	* src/MenuBackend.C: remove unused using directive


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17393 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-02 16:52:49 +00:00
Jean-Marc Lasgouttes
a7c2c8e3d5 * support/filetools.C (makeDisplayPath): if the file is in the lyx
support directory, return as a relative path (enclosed in brackets)

	* frontends/qt4/GuiView.C (updateTabs): use makeDisplayPath instead
	of onlyFileName. 


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17384 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-28 21:48:04 +00:00
Georg Baum
471b4ea315 Fix bug 2937 (from Jean-Baptiste LAMY)
* src/support/filename.C
	(DocFileName::mangledFilenam): Use a whitelist of allowed characters
	instead of an incomplete blacklist of disallowed ones


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17378 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-27 19:01:10 +00:00
Georg Baum
d1f8c007f0 Get rid of some locale dependant functions
* src/output_plaintext.C
	(writePlaintextParagraph): Use compare_ascii_no_case instead of
	compare_no_case, since the strings to compare are pure ASCII anyway.

	* src/frontends/qt4/QPrefsDialog.C
	(setComboxFont): ditto

	* src/MenuBackend.C
	(Menu::checkShortcuts): ditto

	* src/frontends/qt4/QLImage.C
	(QLImage::loadableFormats): Use ascii_lowercase instead of lowercase
	since the input is pure ASCII anyway.

	* src/tex2lyx/text.C
	(splitLatexLength): ditto

	* src/support/lstrings.[Ch]
	(compare_no_case): Get rid of both std::string variants
	(lowercase): Get rid of std::string variant
	(uppercase): Change std::string variant to docstring

	* src/support/tests/regfiles/lstrings: Add new expected output

	* src/support/tests/lstrings.C: Add tests for docstring functions


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17371 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 18:54:03 +00:00
Georg Baum
dca251a0ef remove stray dollar sign
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17365 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 15:37:48 +00:00
Abdelrazak Younes
ba62665f96 * support/qstring_helpers.h: erase ucs4_to_qstring() method.
* FontMetrics.h: only one string width() method.

* Painter.h: only one text() method.

* all other files: adapt to above API change.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17362 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 15:13:08 +00:00
Abdelrazak Younes
85f66bcd90 Fix support lib dependency problem.
* docstring.C: Implement utf8ToUcs4() locally.

* all other files: remove utf8ToUcs4().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17361 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 12:46:44 +00:00
Abdelrazak Younes
52eb91c94f add config.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17360 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 11:18:37 +00:00
Georg Baum
8765ab59cd Almost fix 'make check'. The only remaining problem is an undefined
reference to lyx::utf8ToUcs4.
I did not fix this since it is an interface violation that should be fixed
otherwise.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17358 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 09:31:01 +00:00
Georg Baum
56eea075fd forgot this
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17355 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 09:03:58 +00:00
Georg Baum
0418d14704 Fix character classification functions by using qt (bugs like 3270 and 1247)
* src/support/lstrings.C
	(uppercase): Use qt instead of non working libc/home grown solution
	(lowercase): ditto
	(local_lowercase): Use qt instead of libc tolower for ucs4 chars

	* src/support/qstring_helpers.C
	(qstring_to_ucs4): Use qchar_to_ucs4 because of the assertion

	* src/support/lstrings.h: Add some documentation

	* src/support/qstring_helpers.h
	(is_utf16): New function: Tests whether an ucs4 character is also a
	valid utf16 character
	(qchar_to_ucs4): Assert on is_utf16()
	(ucs4_to_qchar): Replace old assertion with better is_utf16()

	* src/support/textutils.h
	(isLetterChar): Delete non-working implementation
	(isPrintable): Ditto
	(isPrintableNonspace): Ditto
	(isDigit):

	* src/support/textutils.C: New file, contains new implementations
	using qt of the functions in textutils.h

	* src/support/Makefile.am: Add textutils.C

	* development/scons/scons_manifest.py: ditto


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17354 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-26 09:03:21 +00:00
Lars Gullik Bjønnes
144e61bc10 Fix-up damage done by overeager script in r15422
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17348 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-25 21:17:24 +00:00
Jean-Marc Lasgouttes
7dd29bb818 Move translated files to their own directory
What I did:

* move xx_foo.ext to xx/foo.ext

* update Makefile.am to make install work

* minimally update scons_manifest.py (I'd be surprised to see it
  work).

* update i18nLibFileSearch to use the new naming scheme, and keep
  temporarily some code that checks the old method.

* update image paths in .lyx files

* update name of files (examples in tutorial, for ex.) in lyx files

What is definitely broken:

* cmake (did not touch it)

* TOC files (I am not sure how the code works)

I would be surprised if nothing else was wrong. 



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17343 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-25 18:12:03 +00:00
Georg Baum
914e698b8d * src/support/filetools.C
(makeLatexName): Exclude ", otherwise we would trigger the same
	problem of unbalanced quotes as in bug 3266


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17336 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-25 09:00:28 +00:00
Georg Baum
b555834103 Fix bug 3266
* src/support/filetools.C
	(makeLatexName): Don't set the 8th bit of characters to 0.
	This is not needed anymore, since we don't use isalpha() anymore,
	but a whitelist of allowed characters.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17331 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-24 20:51:05 +00:00
Georg Baum
13fa26d4f7 Don't include files inside the lyx namespace (compile fix for gcc 3.2)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17254 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-19 12:21:56 +00:00
Jürgen Spitzmüller
65b1b08a5c * src/LaTeX.C (deplog): fix the regex to parse filenames in the log file
(fixes bug 3224)
*src/support/filename.C: limit asserts to windows platform
	(fixes bug 3132)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17163 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-13 17:31:43 +00:00
Georg Baum
04debb8056 Revert unwanted stuff from last commit
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16932 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-29 18:37:13 +00:00
Georg Baum
a76050219a Fix LyX paste from system clipboard when the file format does not match
* src/buffer.C
	(Buffer::readString): Tell readFile that we do not have a file
	(Buffer::readString): readFile(name) returns a bool, not an enum


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16931 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-29 18:35:56 +00:00
Georg Baum
feb7895965 Add machinery to output arbitrary unicode characters with LaTeX commands
read from a text file.

	* src/encoding.[Ch]

	(Encoding::latexChar): New, output a character to LaTeX
	(Encoding::validate): New, add needed preamble stuff for a character
	(Encodings::read): Read new unicodesymbols file
	(Encodings::isCombiningChar): New, is a character a combining char?

	* src/paragraph_pimpl.C
	(isEncoding): Delete, no longer needed
	(getEncoding): New, get the real encoding of a font
	(Paragraph::Pimpl::latexSurrogatePair): New, output a surrogate pair
	to LaTeX
	(Paragraph::Pimpl::simpleTeXBlanks): Use latexSurrogatePair if needed
	(Paragraph::Pimpl::simpleTeXSpecialChars): Ditto, and replace several
	hardcoded characters with a call of encoding.latexChar()
	(Paragraph::Pimpl::validate): replace several hardcoded characters
	with a call of encoding.validate()

	* src/support/debugstream.h
	(basic_debugstream::disable): New, disable the stream completely
	(basic_debugstream::enable): New, reenable the stream

	* src/lyx_main.[Ch]: Adjust to changes above

	* src/paragraph.C: Ditto

	* lib/unicodesymbols: New file with UCS4 -> LaTeX command mapping.
	It is far from complete yet, but contains most accents on latin
	characters.

	* lib/Makefile.am: add lib/unicodesymbols

	* development/scons/scons_manifest.py: ditto

	* development/tools/unicodesymbols.py: Helper script to update
	lib/unicodesymbols with new symbols


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16920 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-28 21:27:45 +00:00
Georg Baum
753d2cafa5 compile fix: std::exception does only have a default constructor, the other
constrcutor is non-standard.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16835 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-24 16:24:47 +00:00
Abdelrazak Younes
801f807063 Display error/warning dialogs if possible.
* ExceptionMessage: new exception based message for errors and warnings.

* package.C.in:
  - replace lyxerr based errors and warning with ExceptionMessage throwing.
  - bail_out(): erased!

* os_win32.C:
  - replace lyxerr based errors and warning with ExceptionMessage throwing.
  - bail_out(): erased!

* tex2lyx.C: catch any exception from Package class.

* lyx_main.C:  catch any exception from Package class and act accordingly.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16834 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-24 15:49:20 +00:00
Abdelrazak Younes
0e85d5b1c0 revert last change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16829 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-23 15:23:59 +00:00
Abdelrazak Younes
2b1740d92d revert last change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16828 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-23 15:09:00 +00:00
Abdelrazak Younes
6823d09f6b Replace lyxerr based warnings and errors with Alert::error() and Alert::warning().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16826 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-23 13:30:30 +00:00
Abdelrazak Younes
a8c862dfe9 Replace lyxerr based warnings and errors with Alert::error() and Alert::warning().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16824 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-23 13:09:28 +00:00
Enrico Forestieri
b9aa557b35 Fix encoding of converters path and arguments
* src/converter.C
	(Converters::convert): Convert command to be executed to the proper
	encoding. Use from_utf8 instead of from_ascii in order to avoid
	assertions when displaying an alert.

	* src/support/docstring.[Ch]
	(to_filesystem8bit): new conversion function.

	* lib/scripts/fig2pstex.py
	* lib/scripts/fig2pdftex.py:
	Modified to reflect the changes above.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16803 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-22 02:58:47 +00:00
Georg Baum
77b9dbd557 Fix several filename and environment variable encoding problems
* src/LaTeX.C
	(LaTeX::deplog): Assume that filenames in log files are stored in
	the file system encoding

	* src/frontends/qt4/qt_helpers.[Ch]
	(internal_path): delete

	* src/frontends/qt4/QGraphics.C: Adjust to change above

	* src/frontends/qt4/QPrefsDialog.C: ditto

	* src/frontends/qt4/QExternal.C: ditto

	* src/frontends/qt4/QInclude.C: ditto

	* src/support/os.h: Document the encoding of filename arguments

	* src/support/os_win32.h: ditto

	* src/support/filetools.C
	(findtexfile): Convert filename from file system encoding

	* src/support/os_win32.C: Convert filenames from utf8 to file system
	encoding and vice versa where needed

	* src/support/os_cygwin.C: ditto

	* src/support/getcwd.C
	(getcwd): Use internal_path() with correct encoding

	* src/support/docstring.[Ch]
	(from_filesystem8bit): new conversion function

	* src/support/environment.C
	(getEnv): convert environment variable from local 8bit encoding to utf8
	(setEnv): convert environment variable from utf8 to local 8bit encoding

	* src/support/environment.h: document encoding of function arguments


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16753 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-18 20:47:27 +00:00
Abdelrazak Younes
200db1541a Partly revert revision 16744. Georg doesn't want to mix string/docstring in there.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16745 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-18 13:35:01 +00:00
Abdelrazak Younes
0c496dc535 Convert internal_path() to unicode (partially). Fix bug 3114:
http://bugzilla.lyx.org/show_bug.cgi?id=3114

* os.h
  - new docstring adapted internal_path()

* qt_helpers.[Ch]:
  - new QString adapted internal_path()

All other files: use that.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16744 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-18 12:30:07 +00:00
Enrico Forestieri
fc3a2761de Log:
Move OS dependent code where it belongs.

	* src/lyx_cb.C:
	Remove unused include

	* src/support/os.h
	* src/support/os_unix.C
	* src/support/os_win32.C
	* src/support/os_cygwin.C:
	Move here the code from fontutils.[Ch]

	* src/support/os_cygwin.C
	(external_path, external_path_list): don't differentiate anymore
	on Qt/X11 or Qt/Win builds.

	* src/support/environment.C
	(setEnvPath): get rid of the #ifdef for cygwin.

	* src/lyx_main.C
	(LyX::exec): addFontResources and restoreFontResources are now
	in the os namespace.

	* src/support/Makefile.am
	* src/client/Makefile.am
	* src/tex2lyx/Makefile.am
	* development/scons/scons_manifest.py:
	Updated

	* src/support/fontutils.[Ch]:
	Removed



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16655 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-11 21:22:18 +00:00
Georg Baum
bcb1654b15 Make the output of \inputencoding commands (and the change of output
encodings) more fine grained: From paragraph level to individual character
level. The inputenc package supports that since at least 2000.

	* src/insets/insetbase.h
	(latex): Document the differences between output to a string stream
	and a file stream

	* src/buffer.h
	(writeLaTeXSource): ditto

	* src/output_latex.h
	(latexParagraphs): ditto
	(switchEncoding): new function to change the encoding of a stream
	(and output \inputencoding commands)

	* src/paragraph_pimpl.C
	(Paragraph::Pimpl::simpleTeXSpecialC): Adjust to latexWriteEndChanges
	changes

	* src/support/docstream.[Ch]
	(setEncoding, operator<<): New stream modifier that changes the
	encoding of file streams

	* src/lyxfont.[Ch]
	(LyXFont::latexWriteStartChanges): Change stream encoding if needed
	(LyXFont::latexWriteEndChanges): Change stream encoding if needed

	* src/lyxfont.h
	(public:):

	* src/paragraph.C
	(Paragraph::simpleTeXOnePar): Adjust to latexWriteStartChanges and latexWriteEndChanges changes
	(bool Paragraph::simpleTeXOnePar):
	(bool Paragraph::simpleTeXOnePar):
	(bool Paragraph::simpleTeXOnePar):
	(bool Paragraph::simpleTeXOnePar):
	(bool Paragraph::simpleTeXOnePar):

	* src/output_latex.C
	(TeXOnePar): Remove the ugly hack to for wencoding changes and use
	switchEncoding instead. A nice side effect is that the old hack would
	not work if the main language encoding is latin1 and a character
	would be mapped to a cedilla in the "fake ucs4" encoding, because
	iconv refuses to convert such a character to latin1, although it
	exists in latin1 (it wants to attach it to a base character).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16633 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-09 19:25:40 +00:00
Georg Baum
6ca4bd03e0 Add some documentation for findtexfile
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16632 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-09 19:10:29 +00:00
Jean-Marc Lasgouttes
f8f59e97fb * support/os_unix.C (canAutoOpen, autoOpenFile): on Mac OS X, use
the role kLSRolesAll for both edito and viewer, since it is what 
	the finder does.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16602 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-08 13:20:19 +00:00
Bo Peng
f5114ba80d src/support/unlink.C: Fix an #include error
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16541 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-05 22:16:04 +00:00
Georg Baum
31bc611f34 Fix bug 3067: Special column attributes can contain non-ascii characters,
so store them in a docstring.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16537 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-05 17:11:32 +00:00
Michael Schmitt
79957d0f70 change LYX_USER_DIR_1[234]x to LYX_USER_DIR_15x
change LYX_DIR_1[234]x to LYX_DIR_15x

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16481 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-03 18:02:26 +00:00
Georg Baum
9c162a9bc6 Implement more detailed iconv error messages for better tracking of bugs
like 3043
	* src/support/docstream.C
	(iconv_codecvt_facet::do_out): Output the to be converted string and
	the partially converted result in hex notation if an error occurs
	(iconv_codecvt_facet::do_in): ditto
	(iconv_codecvt_facet::do_iconv): remove now obsolete error message


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16469 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-02 20:57:34 +00:00
Georg Baum
bcbd895143 * src/support/unicode.C
(IconvProcessor::convert): Fix hex output of bytes on systems where
	char is signed


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16468 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-02 20:44:06 +00:00
Georg Baum
63524a4184 * src/support/unicode.C
(iconv_convert): Fix a crash: Don't try to create a vector from two
	pointers where end is before begin.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16408 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-28 07:35:57 +00:00
Georg Baum
979fdf7456 Fix strange bibtex problem by converting some more functions to use FileName
instead of std::string

	* src/support/lyxlib.h
	* src/support/getcwd.C
	(getcwd): return a FileName, not a std::string in filesystem encoding

	* src/support/filetools.[Ch]
	(makeAbsPath): return a FileName, not a std::string in undefined encoding

	* src/support/lyxlib.h
	* src/support/tempName.C
	(makeAbsPath): return a FileName, not a std::string in undefined encoding

	* many other files: Adjust to the changes above


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16399 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-27 10:56:11 +00:00
Georg Baum
5843e6bd7f fix encoding of user name and email address
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16379 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-22 10:26:52 +00:00
Georg Baum
49b753f603 Fix another instance of filename encoding problems
* src/support/filetools.h
	(fileSearch): change return value type to vector<FileName>

	* src/support/filetools.C
	(dirList): Convert filenames from the file system encoding

	* src/converter.C
	(Converters::move): Adjust to dirList interface change

	* src/support/filename.[Ch]
	(FileName::fromFilesystemEncoding): New static method

	* src/client/client.C: Add comments about filename encoding


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16362 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-21 13:01:47 +00:00
Georg Baum
a1389d411c Fix two filename bugs (from Enrico and me)
* src/support/filetools.[Ch]
	(fileOpenSearch): comment out since it is unused
	(fileSearch): Use addExtension instead of changeExtension, since we
	are always called without extesnion, or with the correct one.
	(addExtension): new function

	* src/lyx_main.C
	(LyX::init): tell fileSearch that we are also interested in the name
	if the file does not exist


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16361 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-21 12:04:01 +00:00
Abdelrazak Younes
d3cad65fe2 Change the rule to generate package.C from %VAR% to @VAR@
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16355 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-21 09:48:26 +00:00
Enrico Forestieri
6b5289825e Don't use a global variable for avoiding removal of the system temp dir
* src/support/package.h
	(Package::system_temp_dir): new, return the system temp dir.

	* src/support/package.C.in
	(Package::Package): record the system temp dir.

	* src/lyx_main.C
	(LyX::prepareExit): don't remove the temporary directory if it
	is the same as the system temp dir, meaning that the lyx_tmpdir
	has not yet been created.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16318 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-17 21:52:40 +00:00
Georg Baum
e4c3ce4627 Convert most of the bibtex machinery to docstring.
Don't limit citation keys to ASCII anymore, since InsetBibitem can generate
non-ASCII keys.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16310 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-17 10:52:04 +00:00
Georg Baum
01c3046d5a Add some forgotten FileName conversions to enable installation in non-ascii
paths


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16308 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-17 09:46:04 +00:00
Enrico Forestieri
5b5585e723 Account for a bigger width or precision when inserting a number into
a wide stream on systems where sizeof(wchar_t) == 2.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16294 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-15 22:53:06 +00:00
Edwin Leuven
6bfb3e6dc4 georg baum:
- add encoding arg to idocfstream
- open .bib files with idocfstream
- add ascii_lowercase that takes docstring

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16281 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-15 16:09:05 +00:00
Enrico Forestieri
e7a9321e43 Provide do_put methods for inserting all remaining basic type values
into wide streams on systems where sizeof(wchar_t) == 2.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16275 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-15 00:30:46 +00:00
Enrico Forestieri
fb5b1bc6c8 Provide do_put methods for inserting "unsigned long" and "double" values
into wide streams on systems where sizeof(wchar_t) == 2.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16272 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-14 00:31:18 +00:00
Bo Peng
6d0f02557d revert r16260
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16266 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-13 16:23:29 +00:00
Bo Peng
525e28f520 Be consistent in how qt headers are included (QtCore/Q...), because QtXml etc may be used later.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16260 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-13 04:43:50 +00:00
Georg Baum
fe5c73915e Make libQtCore a support library like boost and implement encoding conversion
from/to the local 8bit encoding with it.
Only the autotools build system is updated, scons and cmake users need to
add qt4 cpp flags when compiling libsupport, and link libsupport against
libQtCore.

	* src/frontends/qt4/qt_helpers.[Ch]
	(toqstr, qchar_to_ucs4, ucs4_to_qchar, ucs4_to_qstring,
	 qstring_to_ucs4, fromqstr): Move these qstring conversion functions
	from here ...

	* src/support/qstring_helpers.[Ch] ... to these new files

	* src/support/docstring.[Ch]
	(from_local8bit): new conversion function from local 8bit encoding
	to ucs4
	(to_local8bit): new conversion function from ucs4 to local 8bit
	encoding to ucs4
	(to_local8bit_failure): exception that is thrown by to_local8bit if
	the argument cannot be converted to the local encoding

	* src/support/filename.C
	(FileName::toFilesystemEncoding): implement with the help of QFile

	* src/support/Makefile.am: Add new files, qt4 cpp flags and link
	against libQtCore

	* src/client/client.C: Convert commandline input from local encoding
	to ucs4. Convert stuff that is sent to to the server to utf8,
	because LyX interprets it as utf8 on the other end of the pipe.

	* src/lyx_main.C
	(LyX::exec): convert commandline input from local encoding to utf8
	(LyX::init): ditto
	(LyX::easyParse): ditto

	* development/scons/scons_manifest.py: Add new files

	* config/qt4.m4: Define new variables QT4_CORE_INCLUDES,
	QT4_CORE_LDFLAGS and QT4_CORE_LIB


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16257 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-12 20:19:46 +00:00
Georg Baum
55f575c4dd convert thesaurus and spellchecker to docstring
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16229 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-10 11:52:46 +00:00
Edwin Leuven
fd44f28cae * convert dir to internal path
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16187 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-05 22:36:31 +00:00
Georg Baum
95579c2a71 more unicode filenames (+ fix one possible initialization order bug in
needsUpdate() in src/lyx_main.C).
toFilesystemEncoding() is now used in all places where it is needed if I did
not forget anything.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16184 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-05 12:57:01 +00:00
Georg Baum
c4320d24cd Make string conversion work with non-ucs2-characters if using qt 4.2
* src/frontends/qt4/qt_helpers.[Ch]
	(toqstr): Use QString::fromUcs4 if the qt version is at
	least 4.2.
	(qstring_to_ucs4): Use QString::toUcs4 if the qt version is at
	least 4.2
	(ucs4_to_qstring): Delete to avoid confusion, since it was only
	used in one place

	* src/frontends/qt4/panelstack.C
	(PanelStack::addCategory): Use toqstr instead of ucs4_to_qstring

	* src/support/unicode.[Ch]
	(ucs2_to_ucs4): Replace with utf16_to_ucs4
	(ucs4_to_ucs2): Replace with ucs4_to_utf16


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16169 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-04 13:50:46 +00:00
Georg Baum
015abe1a5a Allow empty file names in constructor, since empty filenames can now be
created by the default constrcutor anyway.
This prevents an assert in findtexfiles.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16168 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-04 13:45:08 +00:00
Michael Schmitt
2c5a5bf52f src/support/filename.C: add assertion to ensure that no Windows-style
file name is used internally (as suggested by Georg)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16159 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-03 14:48:00 +00:00
Georg Baum
095625dc3c remove unused stuff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16136 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-02 18:19:56 +00:00
Georg Baum
5afcd541fd more unicode filenames
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16127 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-01 20:09:08 +00:00
Enrico Forestieri
517778ab09 Better using a space instead of '\0' in the num_get facet.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16103 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-29 13:39:49 +00:00
Enrico Forestieri
f17d9a7b86 Document the terminating '\0' in the num_get facet.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16093 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-28 19:15:05 +00:00
Enrico Forestieri
04f2c93ca5 Was forgetting this
* src/support/docstring.C
	(do_get): terminate the string before using it.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16086 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-28 00:24:18 +00:00
Enrico Forestieri
1a7aec0731 Improve the num_get locale facet
* src/support/docstring.C
	(do_get): use reserve() and the += operator in order to
	avoid a possible buffer overrun.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16070 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-27 01:52:26 +00:00
Georg Baum
8e6e970d7b Next step of true unicode filenames: Use support::FileName instead of
std::string at many places (not all yet).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16069 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-26 21:30:39 +00:00
Bo Peng
c8429d4bbc Detect mode_t for safe use of chmod, and for scons/msvc
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15985 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-19 13:58:39 +00:00
Abdelrazak Younes
8346fb6a47 add comment about location of the implementation.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15969 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-18 20:28:18 +00:00
Abdelrazak Younes
7aa50e8f2b * lyx_main.[Ch]
- merge exec() and priv_exec()
  - LyX constructor is now public.
  - there is no global singleton_ object anymore, only a pointer.
  - IconvProcessor(): new utf8 to ucs4 convertor.

* main.C: instantiate a LyX object and exec() it. No more use of static methods.

* docstring.C: use utf8ToUcs4() instead of a static variable.

* unicode.h: declare extern utf8ToUcs4().



  

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15967 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-18 17:47:12 +00:00
Georg Baum
34a773b8cf Split FileName into FileName and DocFileName. FileName will be used for all
file names, and DocFileName contains the special extensions for documents,
included figures etc.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15965 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-18 12:49:47 +00:00
Enrico Forestieri
fa2840e72b Add locale facet in order to input numbers from wide streams on systems
where sizeof(wchar_t) == 2

	* src/support/docstring.C:
	- New class ascii_num_get_facet for inputting numbers from idocstreams.
	- Add the ascii_num_get_facet facet to the locale initializer.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15959 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-17 19:27:42 +00:00
Abdelrazak Younes
4f5432f427 * docstring.C: add a FIXME in utf8_to_ucs4() WRT static IconvProcessor and Mac
* lyx_main.C:
  - LyX::prepareExit(): avoid utf8_to_ucs4() conversion at this late stage because this can cause problem on Mac.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15955 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-17 16:58:32 +00:00
Georg Baum
2981181ec3 Fix crashes reported by Bennet Helm and Kornel Benko
* src/support/unicode.[Ch]
	(IconvProcessor): Rework the implementation to fix two bugs:
	- iconv_close was called even if the conversion descriptor was
	  invalid
	- The compiler generated copy constructor did simply copy the pimpl_
	  pointer. Therefore pimpl_ was deleted twice for all IconvProcessor
	  instances created by eightbit_to_ucs4() and ucs4_to_eightbit().
	  This is solved by using a scoped_ptr for pimpl_.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15937 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-15 21:40:46 +00:00
Peter Kümmel
7860112e71 disable chmod usage with msvc
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15917 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-14 16:11:59 +00:00
Peter Kümmel
b912982bdc chmod fixes for msvc
* development/cmake/config.h.cmake:
      there is no mode_t 
  * src/support/copy.C
      chmod is declared in io.h
      


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15913 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-13 23:22:31 +00:00
Georg Baum
2db7521b70 Add support for the esint package
* src/LaTeXFeatures.C
	(LaTeXFeatures::getPackages): handle esint and wasysym

	* src/mathed/MathMacroTable.[Ch]
	(requires_): New member: tell the feature this macro requires
	(MacroTable::insert): take new requires arg

	* src/mathed/MathMacroTemplate.C
	(MathMacroTemplate::asMacroData): adjust to change above

	* src/mathed/MathSupport.C
	(fontinfos): add esint10 font

	* src/mathed/InsetMathHull.C
	(InsetMathHull::doDispatch): AMS_ON -> package_on

	* src/mathed/MathMacroTable.h

	* src/mathed/MathFactory.C
	(initSymbols): read and store requires field for symbols

	* src/mathed/InsetMathSymbol.C
	(InsetMathSymbol::metrics): handle esint
	(InsetMathSymbol::takesLimits): ditto

	* src/buffer.C
	(LYX_FORMAT): update format
	(Buffer::validate): handle esint, AMS_ON -> package_on

	* src/bufferparams.C:
	(AMSTranslator): Rename to PackageTranslator
	(BufferParams::readToken): Read \use_esint
	(BufferParams::writeFile): Write \use_esint

	* src/frontends/qt4/QDocumentDialog.C: handle esint

	* src/frontends/qt4/ui/MathsUi.ui : add esint checkboxes

	* src/frontends/qt4/GuiFontLoader.C
	(symbol_fonts: Add esint10 font
	(symbolFamily): handle esint10 font
	(isChosenFont): Add comment

	* src/frontends/controllers/ControlMath.C
	(latex_varsz): Add new integral symbols

	* src/support/fontutils.C
	(win_fonts_truetype): Add esint10 font

	* src/bufferparams.h
	(enum AMS): rename to enum Package
	(use_esint): new parameter

	* src/lyxfont.[Ch]: Add esint font

	* lib/symbols: Add new integral symbols

	* lib/lyx2lyx/LyX.py
	(format_relation): Update format

	* lib/lyx2lyx/lyx_1_5.py: handle new format

	* lib/chkconfig.ltx: Test esint package

	* lib/images/math/oiintop.xpm
	* lib/images/math/sqintop.xpm
	* lib/images/math/sqint.xpm
	* lib/images/math/ointctrclockwiseop.xpm
	* lib/images/math/ointctrclockwise.xpm
	* lib/images/math/iiintop.xpm
	* lib/images/math/iintop.xpm
	* lib/images/math/sqiint.xpm
	* lib/images/math/iiint.xpm
	* lib/images/math/ointclockwiseop.xpm
	* lib/images/math/oiint.xpm
	* lib/images/math/dotsintop.xpm
	* lib/images/math/sqiintop.xpm
	* lib/images/math/ointclockwise.xpm
	* lib/images/math/iiiintop.xpm
	* lib/images/math/dotsint.xpm
	* lib/images/math/iiiint.xpm
	* lib/images/math/iint.xpm: new icons

	* lib/doc/LaTeXConfig.lyx.in: Add docs for esint package

	* lib/doc/UserGuide.lyx: Add short documentation of integral symbols

	* lib/Makefile.am: Add new files

	* development/scons/scons_manifest.py: ditto


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15907 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-13 17:35:18 +00:00
Georg Baum
5ed606f9c5 Add a cache for converted image files. This needs to be enabled in the
preferences file with \use_converter_cache true. It is disabled by default,
and no GUI support for changing the preferences is yet implemented.

	* src/insets/insetgraphics.C
	(InsetGraphics::prepareFile): Use image file cache

	* src/insets/ExternalSupport.C
	(updateExternal): Use image file cache

	* src/exporter.C
	(Exporter::Export): Do not use image file cache

	* src/graphics/GraphicsCacheItem.C

	(CacheItem::Impl::imageConverted): Add the converted file to the
	image file cache
	(CacheItem::Impl::convertToDisplayFo): Use image file cache

	* src/converter.C
	(Converters::convert): Use image file cache if the caller allowed that

	* src/converter.h
	(Converters::convert): Adjust arguments

	* src/Makefile.am: Add new files

	* src/support/lyxlib.h
	(chmod): new function
	(copy): add mode argument

	* src/support/copy.C
	(chmod): new function
	(copy): implement mode argument

	* src/support/mkdir.C
	(lyx::support::mkdir): Add warning if permissions are ignored

	* src/lyxrc.[Ch]: Add new settings \converter_cache_maxage and
	\use_converter_cache

	* src/ConverterCache.[Ch]: New image file cache

	* src/importer.C
	(Importer::Import): Do nut use the image file cache

	* src/lyx_main.C
	(LyX::init): Initialize the image file cache

	* src/mover.[Ch]
	(Mover::do_copy): Add mode argument
	(SpecialisedMover::do_copy): ditto

	* configure.ac: Check for chmod

	* development/cmake/ConfigureChecks.cmake: ditto

	* development/cmake/config.h.cmake: ditto

	* development/scons/SConstruct: ditto

	* development/scons/scons_manifest.py: Add new files


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15897 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-13 10:27:57 +00:00
Georg Baum
a116e04b8b Use wctype character classification functions if possible
* src/buffer.C
	(Buffer::insertStringAsLines): Uncomment isPrintable test

	* src/support/lstrings.C
	(compare_no_case): Use char_type and not int for the docstring version
	(ascii_tolower): Convert to a template
	(compare_ascii_no_case): Do not use a template anymore, because we
	need int for the string version and char_type for the docstring
	version as intermediate type
	(lowercase): Use towlower if possible
	(uppercase): Use towupper if possible

	* src/support/textutils.h
	(isLetterChar): Use iswalpha if possible
	(isPrintable): Use iswprint if possible
	(isPrintableNonspace): Use iswprint and iswspace if possible
	(isDigit): Use iswdigit if possible

	* src/paragraph.C
	(Paragraph::asString): remove obsolete FIXME
	(Paragraph::transformChar): add FIXME

	* configure.ac: Add definition of LIBC_WCTYPE_USES_UCS4 to config.h

	* development/cmake/config.h.cmake: ditto

	* development/scons/SConstruct: ditto


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15893 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-13 09:53:25 +00:00
Georg Baum
29012f2596 Fix output of labels and references that contain characters with an UCS4
codepoint > 255.
I decided that this is no file format change: We already had the change to
format 249 that allowed unicode in .lyx files. The output to .tex of
non-ascii characters is now different than before (even for those that were
supported previously, e.g. german umlauts in latin1), but this is only
relevant if people referenced a label in ERT. Since we cannot detect this
anyway we don't need a file format change.

	* src/support/lstrings.C
	(escape): Extend the escaping algorithm from 8 bit to 24 bit.

	* src/support/lstrings.h
	(escape): Update comment

	* lib/lyx2lyx/lyx_1_4.py
	(lyx_support_escape): Update comment


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15883 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-12 13:42:20 +00:00
Georg Baum
7e7d28a0ca Make it possible to uses non-ascii labelstring, endlabelstring and
labelstring_appendix in layout files

	* src/text2.C
	(LyXText::setLayout): Translate labelwidthstring for paragraph
	(LyXText::getStringToIndex): labelwidthstring is now a docstring

	* src/buffer.[Ch]
	(Buffer::translateLabel): New method for translating a label if it
	is not already translated by the user in the layout file

	* src/lyxtext.h
	(setParagraph): labelwidthstring is now a docstring

	* src/support/lstrings.[Ch]
	(bool isAscii): New utility function: Determine whether a docstring
	contains only pure ascii

	* src/text3.C
	(LyXText::dispatch): setParagraph() now takes a docstring

	* src/lyxlayout.C
	(LyXLayout::read): Don't use from_ascii when reading labelstring_,
	endlabelstring_ and labelstring_appendix_

	* src/buffer_funcs.C
	(setLabel): labelwidthstring is now a docstring
	(setLabel): Use Buffer::translateLabel instead of Buffer::B_ to
	translate labels
	(expandLabel): ditto


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15855 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-11 12:00:34 +00:00
Enrico Forestieri
1c5ef229e2 Add locale facet in order to output numbers to wide streams on systems
where sizeof(wchar_t) == 2

	* src/support/docstring.C:
	- New class num_put_failure for warning about non-ascii characters.
	- New class ascii_num_put_facet for outputting numbers to odocstreams.
	- Add the ascii_num_put_facet facet to the locale initializer.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15849 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-11 00:04:28 +00:00
Joost Verburg
b398d3b02b start lyx namespace after header files
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15709 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-03 12:36:51 +00:00
Georg Baum
864ed2c8f9 * src/support/docstream.C
(iconv_codecvt_facet::do_max_length): Update to current UTF8
	specification and return 4 for UTF8.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15642 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-31 18:54:30 +00:00
Georg Baum
4d814f3e73 Remove unused variable
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15624 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-30 18:32:55 +00:00
Abdelrazak Younes
2d5ecd2bb8 remove the constness of the two code strings because this does not pass boost_concept_check with gcc-3.3.4-11:
g++ -/usr/include/g++/bits/boost_concept_check.h: In member function `
   lyx::IconvProcessor& lyx::IconvProcessor::operator=(const
   lyx::IconvProcessor&)':
/usr/include/g++/bits/boost_concept_check.h:203:   instantiated from `void __gnu_cxx::_SGIAssignableConcept<_Tp>::__constraints() [with _Tp = lyx::IconvProcessor]'
/usr/include/g++/bits/stl_map.h:94:   instantiated from `std::map<std::string, lyx::IconvProcessor, std::less<std::string>, std::allocator<std::pair<const std::string, lyx::IconvProcessor> > >'
unicode.C:281:   instantiated from here
/usr/include/g++/bits/boost_concept_check.h:203: error: non-static const member
   `const std::string lyx::IconvProcessor::tocode_', can't use default
   assignment operator
/usr/include/g++/bits/boost_concept_check.h:203: error: non-static const member
   `const std::string lyx::IconvProcessor::fromcode_', can't use default
   assignment operator


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15612 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-30 09:36:33 +00:00
Abdelrazak Younes
826c31a80d * unicode.[Ch]: new IconvProcessor class that enable to split iconv_convert() initialization and conversion parts.
* docstring.C: utf8_to_ucs4() makes use of IconvProcessor instead of iconv_convert.

The IconvProcessor interface will permit to switch to another processor than iconv.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15609 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-29 21:59:59 +00:00
Abdelrazak Younes
451b12d00d * LyXLex::Pimpl::buff is now a string.
* unicode.[Ch]:
 - new non template iconv_convert()
 - iconv_convert() template use above function.

* docstring.C:
 - utf8_to_ucs4(): new function, use the new iconv_convert() function above.
 - from_utf8(): use utf8_to_ucs4() function above.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15592 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-28 15:16:30 +00:00
Georg Baum
fa1856440c Restore inputenc support
* src/encoding.h
	(encoding_table): remove, this is no longer needed with unicode
	(iconvName_): new member: name of the encoding in iconv syntax

	* src/exporter.C
	(Exporter::Export): Use return value of Buffer::makeLaTeXFile

	* src/buffer.[Ch]
	(Buffer::makeLaTeXFile): return whether the file has been created
	successfully

	* src/buffer.C
	(Buffer::makeLaTeXFile): Use a docstream that converts to the correct
	encoding
	Display an error dialog is something went wrong

	* src/bufferparams.C
	(BufferParams::writeLaTeX): Undo the utf8 inputenc hack

	* src/frontends/qt4/QDocumentDialog.C: Add some FIXMEs

	* src/support/unicode.[Ch]
	(eightbit_to_ucs4): New conversion function
	(ucs4_to_eightbit): New conversion function

	* src/support/docstream.[Ch]
	(utf8_codecvt_facet_exception): Move to header and rename to
	iconv_codecvt_facet_exception
	(odocfstream): Take the encoding as argument

	* src/support/docstream.C
	(utf8_codecvt_facet): Generalize to other encodings than utf8 and
	rename to iconv_codecvt_facet

	* src/encoding.C: Remove obsolete tables

	* src/output_latex.C
	(TeXOnePar): Convert the paragraph to different encoding if needed

	* lib/encodings: Remove obsolete tables


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15564 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-26 15:01:45 +00:00
Asger Ottar Alstrup
7c595cb763 - We guess Lars smoked something (we didn't see him, but
that's the only explanation)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15492 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 19:09:09 +00:00
Lars Gullik Bjønnes
3674a8c003 LFUN_UNICODE_INSERT - unicode-insert
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15490 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 18:47:19 +00:00
Lars Gullik Bjønnes
8f261b1529 The Gtk removal from trunk.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15488 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 18:05:16 +00:00
Asger Ottar Alstrup
5c85bf0c64 - 5% speed-up by reserving space in the vector we build for drawing
- Simplify isPrintableNonspace


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15475 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 13:51:37 +00:00
André Pönitz
de6418f377 use more unicode in math
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15462 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 10:15:23 +00:00
Abdelrazak Younes
3a0cbc2be7 put back the :: global namespace identifiers.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15431 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-21 08:30:58 +00:00
Abdelrazak Younes
87e34d9784 MSVC linking error fix:
support.lib(tempname.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl lyx::_open(char const *,int,int)" (__imp_?_open@lyx@@YAHPBDHH@Z) referenced in function "int __cdecl lyx::`anonymous namespace'::make_tempfile(char *)" (?make_tempfile@?A0xcf85a5f4@lyx@@YAHPAD@Z)



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15427 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-21 07:55:42 +00:00