Commit Graph

155 Commits

Author SHA1 Message Date
Georg Baum
477a4da1a2 make the nomencl inset work with older versions of nomencl.sty
* src/LaTeXFeatures.C
	(LaTeXFeatures::getPackages): Do not require newest nomencl.sty,
	output compatibility code instead

	* src/LaTeX.C
	(LaTeX::deleteFilesOnError): delete .gls file
	(LaTeX::run): Check .glo and .gls files, too
	(handleFoundFile): do not ignore .glo files
	(LaTeX::deplog): add regex for old nomencl version

	* src/LaTeX.[Ch]
	(LaTeX::runMakeIndexNomencl) new method, factored out to avoid
	code duplication


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17923 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-23 18:33:36 +00:00
André Pönitz
83b326d204 avoid evalutation of lyxerr arguments unless really needed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17675 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-01 10:09:49 +00:00
Georg Baum
7a1dd08d1d Fix bug 3348
* src/LaTeX.C
	(exists): New helper: test for existance of file with possibly
	invalid filename
	(insertIfExists): Use exists() instead of fs::native and fs::exists()
	(handleFoundFile): Ditto


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17485 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-19 16:15:34 +00:00
Abdelrazak Younes
5bfc89706f fix MSVC linking error
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17456 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-16 15:24:36 +00:00
Georg Baum
8a856a2379 * src/LaTeX.C
(handleFoundFile): Don't strip off " permanently
	(handleFoundFile): Fix another case of embedded 0
	(LaTeX::deplog): Small simplification


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17454 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-16 12:14:06 +00:00
Georg Baum
9b6d8ebc05 * src/LaTeX.C
(handleFoundFile): Don't embed a 0 character in a string
	(handleFoundFile): Don't call fs::exists without an fs::native check


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17452 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-16 10:21:15 +00:00
Jürgen Spitzmüller
fc26b56b4f * src/LaTeX.C (handleFoundFile):
- consider that paths with spaces might be enclosed in quotation marks 
	  (partial fix for bug 3172).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17451 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-16 09:13:42 +00:00
Georg Baum
52727f6f96 Improve fix for bug 3305
* src/LaTeX.C
	(insertIfExists): Instead of catching all fs exceptions, test for a
	valid filename before constructing a fs::path. This gets rid of the
	exceptions because of invalid names, but does still allow other
	expcetions to be thrown (e.g. because of file system problems).
	(handleFoundFile): ditto


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17424 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-12 19:38:20 +00:00
Georg Baum
62bb6150ee Fix bug 3305
* src/LaTeX.C
	(insertIfExists): Catch boost::filesystem exceptions, since they
	are not errors in this context
	(handleFoundFile): ditto


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17405 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-04 13:22:38 +00:00
Jürgen Spitzmüller
6965a879b5 * src/LaTeX.C: whitespace & add author
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17292 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-21 16:25:37 +00:00
Jürgen Spitzmüller
a6a4029f0d * src/LaTeX.C
-  (insertIfExists): new helper function.
	- (handleFoundFile): minor refactoring.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17289 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-21 09:53:50 +00:00
Jürgen Spitzmüller
6c5db3bdb8 * src/LaTeX.C: whitespace
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17270 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-20 08:49:01 +00:00
Jürgen Spitzmüller
cd4033aef3 * src/LaTeX.C
-  (deplog): don't check strings longer than MAX_PATH, 
	    preventing boost exception.
	- (handleFoundFile): don't insert directories in DepTable


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17267 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-20 06:55:25 +00:00
Jürgen Spitzmüller
ba9462c492 * src/LaTeX.C (deplog):
- refine linebreak check further.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17252 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-19 09:02:44 +00:00
Jürgen Spitzmüller
c251034241 * src/LaTeX.C (deplog):
- refine linebreak check.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17251 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-19 06:51:45 +00:00
Jürgen Spitzmüller
bfee5a107c Fix dependency checking, This fixes bug 1027 and probably others.
* src/LaTeX.C: 
	- (deplog): fix and refine parsing of file names.
	- (handleFoundFile): handle files with spaces in their
	   name/path correctly
	- (checkLinebreak): new helper function for deplog. 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17240 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-18 16:06:12 +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
Enrico Forestieri
d4041ea53b Fix encoding of bibtex keys and files read from the latex aux file
* src/LaTeX.C
	(LaTeX::scanAuxFile): Convert to utf8 citation keys and filenames.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16758 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-19 00:55:17 +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
Georg Baum
1f3a70835d Add more precise comment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16642 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-10 21:06:09 +00:00
Enrico Forestieri
804360cbd9 Fix encoding problem when reading the latex log file
* src/LaTeX.C
	(LaTeX::scanLogFile): use from_local8bit instead of from_utf8.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16640 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-10 18:12:52 +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
35914695d1 Make Enrico happy
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16232 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-10 16:37:26 +00:00
Georg Baum
50380866f6 more unicode filenames
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16177 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-04 17:43:49 +00:00
Georg Baum
3c0b752f1c remove unused member
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16175 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-04 17:05:50 +00:00
Michael Schmitt
2e4e48a402 * src/LaTeX.C: fix compilation with gcc 3.3.5pre (SuSE Linux 9.3)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16139 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-02 21:23:46 +00:00
Georg Baum
ed99f752f9 more unicode filenames
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16133 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-02 16:07:15 +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
Georg Baum
bb2dc9c83f convert some more filenames for unicode
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16112 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-29 21:47:37 +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
Michael Schmitt
653c52e2d2 * insets/insetbase.h:
* buffer.C:
	* LaTeX.C:
	* frontends/qt4/ui/QPrefFileformatsUi.ui:
	* MenuBackend.C: fix typo: "can not" => "cannot"


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15981 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-19 12:43:22 +00:00
Georg Baum
ef91176cbf Unicode: Do the conversion of error messages to docstring where they are read
in, because we don't know the encoding of external files.

	* src/LaTeX.C
	(LaTeX::scanLogFile): Convert error strings to docstring and add
	a comment that this could be wrong

	* src/Chktex.C
	(Chktex::scanLogFile): Ditto

	* src/LaTeX.h
	(TeXErrors::error_desc): Convert to docstring
	(TeXErrors::error_text): Convert to docstring

	* src/buffer_funcs.C
	(bufferErrors): no from_utf8 needed anymore


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15875 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-12 10:58:00 +00:00
Michael Schmitt
46bd598fc5 * src/LaTeX.C: beautification: use identical user messages
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15851 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-11 00:33:53 +00:00
Georg Baum
e35725d5c0 New nomenclature inset from Ugras
* src/LyXAction.C
	(LyXAction::init): Add LFUN_NOMENCL_INSERT and LFUN_NOMENCL_PRINT

	* src/insets/insetbase.C
	(build_translator): ditto

	* src/LaTeXFeatures.C
	(LaTeXFeatures::getPackages): Add nomencl

	* src/insets/insetnomencl.[Ch]: new insets InsetNomencl and
	InsetPrintNomencl

	* src/insets/insetbase.h: Add NOMENCL_CODE and NOMENCL_PRINT_CODE

	* src/insets/insetcommandparams.C
	(InsetCommandParams::findInfo): Add nomenclature and printnomenclature
	(InsetCommandParams::getCommand): Extend end of command protection to
	cover commands with only optional arguments like printnomenclature

	* src/insets/insetert.C
	(InsetERT::getStatus): disable LFUN_NOMENCL_INSERT and
	LFUN_NOMENCL_PRINT

	* src/insets/Makefile.am: Add new files
	* src/frontends/qt4/Makefile.dialogs: ditto
	* src/frontends/qt4/Makefile.am: ditto

	* src/factory.C
	(createInset): Handle InsetNomencl and InsetPrintNomencl
	(readInset): ditto

	* src/buffer.C
	(LYX_FORMAT): increase

	* src/lyxfunc.C
	(LyXFunc::dispatch): Handle nomenclature

	* src/LaTeX.C
	(LaTeX::deleteFilesOnError): Delete .nls file
	(LaTeX::run): Run makeindex for nomenclature
	(LaTeX::runMakeIndex): handle nomenclature options
	(LaTeX::deplog): Recognize nomenclature file

	* src/frontends/qt4/QNomenclDialog.[Ch]: new
	* src/frontends/qt4/QNomencl.[Ch]: ditto
	* src/frontends/qt4/ui/QNomenclUi.ui: ditto

	* src/frontends/qt4/Dialogs.C
	(Dialogs::build): handle nomenclature dialog

	* src/text3.C
	(LyXText::dispatch): Handle LFUN_NOMENCL_INSERT and
	LFUN_NOMENCL_PRINT
	(LyXText::getStatus): Ditto

	* src/lfuns.h
	(kb_action): Add LFUN_NOMENCL_INSERT and LFUN_NOMENCL_PRINT

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

	* lib/lyx2lyx/lyx_1_5.py
	(revert_nomenclature): New
	(revert_printnomenclature): ditto

	* lib/chkconfig.ltx: Test for nomencl package

	* lib/doc/LaTeXConfig.lyx.in: Add nomencl package

	* lib/doc/Extended.lyx: Add documentation for nomencl

	* lib/ui/stdtoolbars.ui
	(Toolbar "extra" "Extra"): Add nomencl-insert

	* lib/ui/classic.ui: Add nomencl-insert and nomencl-print
	* lib/ui/stdmenus.ui: ditto

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

	* development/FORMAT: Describe new format


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15739 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-04 17:55:36 +00:00
André Pönitz
6c300f72a2 move everything into namespace lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15422 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-21 00:16:43 +00:00
Abdelrazak Younes
28ad960255 This commit cleans up everything related to singleton. The other important change is that lyx::dispatch() and lyx::getStatus become _the_ official way to use LyXFunc equivalent methods.
* lyxfunc.h:
  - theLyXFunc(): new function in the global namespace.
  - lyx::dispatch():  new function in the lyx namespace.
  - lyx::getStatus():  new function in the lyx namespace.

* bufferlist.h:
  - theBufferList(): new function in the global namespace.

* Clipboard.h:
  - theClipboard(): new function in the global namespace.

* Selection.h:
  - theSelection(): new function in the global namespace.

* FontLoader.h:
  - theFontLoader(): new function in the global namespace.

* FontMetrics.h:
  - theFontMetrics(LyXFont const &): new function in the global namespace.

* Application.C: implements the functions defined above.

* LyXView.h:
  - getLyXFunc(): deleted.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15298 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-11 17:24:46 +00:00
Abdelrazak Younes
ca5411f913 This commit introduces Application_pimpl and cleanup the header includes of the affected .C files.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15182 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-29 22:06:28 +00:00
Abdelrazak Younes
1396c73262 replace global variable bufferlist with Application class member access.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15161 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-27 10:24:13 +00:00
Abdelrazak Younes
a6444784dc A bunch of conversion to docstring.
- bformat(): contributed by Georg Beaum
- Alert::XXX
- error(): in SpellBase, ispell, psell, aspell, buffer, etc.
- message(), message signal
- displayMessage(), setMessage,
- ErrorItems
- prettyName()
- makeDisplayPath()

and maybe some more...


- etc... 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14970 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-11 08:54:10 +00:00
Lars Gullik Bjønnes
43b77ba2d7 Change _() to return a docstring. Fixup callers with the help of lyx::to_utf8.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14952 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-09 15:27:44 +00:00
Georg Baum
a9983dfac2 Fix bug 2616
* src/LaTeX.C
        (LaTeX::deplog): Add the toc file to the dependencies if a line
        \tf@toc=\write#
        is present in the log file, since miktex does not write the line
        \openout# = `sample.toc'.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14496 a592a061-630c-0410-9148-cb99ea01b6c8
2006-07-24 11:08:44 +00:00
Jürgen Spitzmüller
6fd2366d9c * src/LaTeX.C (run):
fix typo from r13950

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13954 a592a061-630c-0410-9148-cb99ea01b6c8
2006-05-29 15:51:12 +00:00
Jürgen Spitzmüller
28fa2c0efa fix bug 2623:
* lib/layouts/memoir.layout:
	add ProvidesMakeindex

* src/LaTeX.C (run):
	rerun latex im idx file is empty (needed by memoir)
	fix typo in comment
* src/LaTeXFeatures.C (getPackages):
	whitespace

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13950 a592a061-630c-0410-9148-cb99ea01b6c8
2006-05-29 14:49:08 +00:00
Georg Baum
13cd255a30 * src/LaTeX.C
(LaTeX::scanLogFile): remove \0 characters inserted by MikTeX before
	further processing
	(LaTeX::deplog): likewise


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13737 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-25 08:22:58 +00:00
Lars Gullik Bjønnes
8c93f63b48 * filetools.[Ch]: Make functions that start with a capital
letter start with a lower letter.
	* All other .C and .h in the cs: adjust for above change


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13603 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-08 22:31:11 +00:00
Jean-Marc Lasgouttes
9063a63083 * src/LaTeX.C
(handleFoundFile): do not add directories to dep table (crashes cygwin)



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13529 a592a061-630c-0410-9148-cb99ea01b6c8
2006-03-29 14:45:37 +00:00
Georg Baum
23948c1537 fix bug 1824
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9673 a592a061-630c-0410-9148-cb99ea01b6c8
2005-02-23 16:56:40 +00:00
Lars Gullik Bjønnes
b6e6f87f71 ditch FileInfo -> use boost.filesystem
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9547 a592a061-630c-0410-9148-cb99ea01b6c8
2005-01-31 10:42:26 +00:00
Lars Gullik Bjønnes
9c2ba3c4ff rename tostr.[Ch] to convert.[Ch]
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9448 a592a061-630c-0410-9148-cb99ea01b6c8
2005-01-06 16:39:35 +00:00
Lars Gullik Bjønnes
6a55be9506 tostr -> convert and some bformat work
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9446 a592a061-630c-0410-9148-cb99ea01b6c8
2005-01-06 15:40:49 +00:00