Commit Graph

88 Commits

Author SHA1 Message Date
Georg Baum
4f1d5e72ef Fix bug 3235
* src/insets/insetcaption.C
	(InsetCaption::latex): Copy back encoding to runparams_in

	* src/insets/insetfoot.C
	(InsetFoot::latex): ditto

	* src/insets/insetnote.C
	(InsetNote::latex): ditto

	* src/exporter.C
	(Exporter::Export): Create runparams with document encoding

	* src/converter.C
	(bool Converters::convert): ditto

	* src/buffer.C
	(Buffer::writeLaTeXSource): Copy back encoding to runparams_in
	(Buffer::runChktex): Create runparams with document encoding
	(Buffer::changeRefsIfUnique): ditto

	* src/outputparams.[Ch]
	(encoding): New member

	* src/lyxfont.C
	(LyXFont::latexWriteStartChanges): Don't switch the encoding anymore.
	This is now done in Paragraph::simpleTeXOnePar.
	(LyXFont::latexWriteEndChanges): Ditto

	* src/output_latex.C
	(TeXOnePar): Ditto

	* src/paragraph.C
	(Paragraph::simpleTeXOnePar): Switch the encoding between font
	changes if needed.

	* All other files: Adjust to the changes above


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17470 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-18 10:59:16 +00:00
Georg Baum
3ccb9d8af9 * src/exporter.C
(Exporter::Export): Remove hardcoded check for lyx backend.
	Use the shortest converter path instead, that is more flexible and
	always correct.

	* lib/configure.py: Add new formats and converters for importing and
	exporting files from CJK LyX.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17202 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-15 20:14:12 +00:00
Abdelrazak Younes
d682f36a67 Fix this bug:
1) View->Postscript
2) Export->LaTeX (plain)
 
1) will generate an error. 2) succeeeds (as it should), but the old error list is displayed again.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16850 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-25 13:10:27 +00:00
Michael Schmitt
c5df681fe8 * insets/insetfloatlist.C:
* insets/insettoc.C:
	* TocBackend.C:
	* TocBackend.h: rename 'asciiTocList()' to '.writePlaintextTocList'

	* insets/insettext.C:
	* output_plaintext.C:
	* output_plaintext.h: rename 'asciiParagraph' to 'writePlaintextParagraph'

	* output_plaintext.C:
	* exporter.C:
	* output_plaintext.h: rename 'writeFileAscii' to 'writePlaintextFile'

	* lyxrc.C: change lyxrc section title (ASCII => PLAIN TEXT)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16756 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-18 22:29:50 +00:00
Abdelrazak Younes
3d2184730a * mover.h
- SpecialisedMover(): add virtual destructor (fix bug 2916)
  - Movers: rename iterator to const_iterator.
  - theMovers(), theSystemMovers(), getMover(), setMover(): new extern definitions.

* mover.C: 
  - SpecialisedMover::operator(): get rid of bogus MSVC warning.
  - delete global variable movers and system_movers.

* lyx_main.C:
  - LyX::Singletons: new movers_ ans system_movers members.
  - implement Movers access functions.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16743 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-18 08:42:53 +00:00
Abdelrazak Younes
74f3ca3246 Transfer the global converters and system_converters variables to LyX::Singletons class.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16725 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-17 13:18:16 +00:00
Michael Schmitt
1f7a1257f1 * change LFUN file-insert-ascii to file-insert-plaintext
* change LFUN file-insert-ascii-para to file-insert-plaintext-para
* change LyXRC::RC_ASCIIROFF_COMMAND to LyXRC::RC_PLAINTEXT_ROFF_COMMAND
* change LyXRC::RC_ASCII_LINELEN to LyXRC::RC_PLAINTEXT_LINELEN
* replace "ascii" by "plaintext" in method names


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16697 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-15 22:49:14 +00:00
Georg Baum
c7490b191e Add LyX 1.4.x format for export
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16417 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-28 16:23:12 +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
9eab5fa88a more unicode filenames
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16173 a592a061-630c-0410-9148-cb99ea01b6c8
2006-12-04 15:46:57 +00:00
Georg Baum
875a88023b more unicode filenames
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16122 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-30 16:59:50 +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
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
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
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
Georg Baum
6ada61e182 Rename namespace Alert to lyx::frontend::Alert.
This prevents a name clash with Qt 4.2.0 on OS X.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15267 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-07 16:47:54 +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
Michael Schmitt
b124158c34 drop linuxdoc support (part 3)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14818 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-23 10:57:45 +00:00
Abdelrazak Younes
c5a4f61f33 This commit creates a error_lists map member inside the Buffer class.
I had no choice but to use string for the map key. This is
because the only information that could be passed to the controller is a
string.

With this new architecture, persistent error lists are now possible.

* Buffer
  - errorList_, addError(),  : deleted
  - std::map<std::string, ErrorList> errorLists_ : new member
  - errorList(std::string const & type): associated accessors

* buffer_funcs.C
  - bufferErrors(Buffer const & buf, TeXErrors const & terr): now needs a third errorList argument
  - bufferErrors(Buffer const & buf, ErrorList const & el): deleted.

* Converter
  - convert(): now needs an ErrorList argument instead of filling the Buffer errorList member directly.
  - runLaTeX(): ditto
  - scanLog(): ditto

* CutAndPaste.C
  - pasteParagraphList(): ditto
  - pasteSelection(): ditto

* lyxtext.h/text.C
  - readParagraph(): ditto
  - LyXText::read(): ditto

* importer:
  - Importer::Import(): ditto

* BufferView_pimpl.C
  - loadLyXFile(): send the Buffer::errors() signal instead of calling LyXView::showErrorList() directly.

* exporter.C
  - Export(): send the Buffer::errors() signal instead of calling LyXView::showErrorList() directly in lyxfunc.C

* ControlErrorList.C
  - initialiseParams(): translation operation transfered here from LyXView::showErrorList().

* LyXView.C
  - LoadLyXFile(): add a showErrorList("Parse") call.
  - showErrorList(): simplified due to code transferred to the ControlErrorList.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14652 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-13 16:16:43 +00:00
Lars Gullik Bjønnes
cf4293824f * Change several freestanding and class methods with first letter
capitalized to have first letter lowercased.
* Adjust all affected files.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13605 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-09 00:26:19 +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
Lars Gullik Bjønnes
3b9338a3a8 Whitespace cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13565 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-05 23:56:29 +00:00
Georg Baum
fc7f2d9805 Fix bug 2107:
* src/LaTeXFeatures.[Ch]: replace nice_ by runparams_

        * src/insets/insetexternal.C
        (InsetExternal::validate): Use the correct template for the desired
        output format

        * src/insets/insetgraphics.C
        (InsetGraphics::prepareFile): Record the needed files for "latex"
        or "pdflatex" format, dependant on the desired output format

        * src/insets/insetinclude.C
        (InsetInclude::latex): ditto

        * src/BufferView_pimpl.C
        (BufferView::Pimpl::getStatus): adapt to LaTeXFeatures changes

        * src/paragraph_pimpl.C
        (Paragraph::Pimpl::simpleTeXSpecialC): ditto

        * src/buffer.C
        (Buffer::makeLaTeXFile): ditto
        (Buffer::makeLinuxDocFile): ditto
        (Buffer::makeDocBookFile): ditto

        * src/paragraph.C
        (Paragraph::simpleTeXOnePar): ditto

        * src/exporter.C
        (Backends): Add "pdflatex" backend format
        (Exporter::Export): set runparams.flavor correctly for "pdflatex" format

        * lib/external_templates
        (RasterImage): Use "pdflatex" format in PDFLaTeX template
        (XFig): ditto
        (ChessDiagram): Add PDFLaTeX template
        (Date): ditto

        * lib/configure.py: Add "pdflatex" format


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13520 a592a061-630c-0410-9148-cb99ea01b6c8
2006-03-28 18:49:46 +00:00
Georg Baum
e4ddd93da4 fix bug 2174
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10807 a592a061-630c-0410-9148-cb99ea01b6c8
2006-02-03 21:47:25 +00:00
Georg Baum
a29f509e1b fix typo from last patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10648 a592a061-630c-0410-9148-cb99ea01b6c8
2005-12-07 15:21:10 +00:00
Georg Baum
7deb554511 fix bug 1888
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10647 a592a061-630c-0410-9148-cb99ea01b6c8
2005-12-07 14:09:31 +00:00
Michael Schmitt
08985cf16f remove dummy captions; fix text message
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10629 a592a061-630c-0410-9148-cb99ea01b6c8
2005-11-28 18:58:16 +00:00
Angus Leeming
fb70c52b05 Whitespace, only whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9877 a592a061-630c-0410-9148-cb99ea01b6c8
2005-04-26 11:12:20 +00:00
Jean-Marc Lasgouttes
2e7621d77b enable running latex on files which path contains spaces
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9745 a592a061-630c-0410-9148-cb99ea01b6c8
2005-03-25 15:27:30 +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
Angus Leeming
b5589bf6cf The package reworking.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9463 a592a061-630c-0410-9148-cb99ea01b6c8
2005-01-10 19:17:43 +00:00
Georg Baum
dacd4cea26 make gettting the file format from file contents work in the correct way ;-)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9218 a592a061-630c-0410-9148-cb99ea01b6c8
2004-11-09 19:08:34 +00:00
Georg Baum
e367172256 use the movers also for copying from temp dir -> export dir
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9153 a592a061-630c-0410-9148-cb99ea01b6c8
2004-11-01 08:50:42 +00:00
Angus Leeming
e978fa42e3 Whitespace, only whitespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9044 a592a061-630c-0410-9148-cb99ea01b6c8
2004-10-05 10:11:42 +00:00
Angus Leeming
2ca14c025a Fix crash when generating instant preview of external inset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8803 a592a061-630c-0410-9148-cb99ea01b6c8
2004-06-03 13:08:50 +00:00
Georg Baum
fa29d7ee98 last chunk of the fix for bug 1244 + overwrite checking
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8791 a592a061-630c-0410-9148-cb99ea01b6c8
2004-06-01 13:39:33 +00:00
Jean-Marc Lasgouttes
d891a896f4 Georg Baum\'s no-tempdir patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8458 a592a061-630c-0410-9148-cb99ea01b6c8
2004-02-25 12:00:53 +00:00
Martin Vermeer
3dfe7a4734 replace bool-valued Pdflatex() by FLAVOR-valued getFlavor().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8141 a592a061-630c-0410-9148-cb99ea01b6c8
2003-11-27 16:38:47 +00:00
José Matox
cd424d7853 Rename ascii to plaintext and LatexRunParams to OutputParams.
Create new files for each output format.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8046 a592a061-630c-0410-9148-cb99ea01b6c8
2003-11-05 12:06:20 +00:00
José Matox
15c913fe5a unify API for insets export
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8008 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-31 18:45:43 +00:00
Lars Gullik Bjønnes
44cd0fc9a1 The std::string mammoth path.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7862 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-06 15:43:21 +00:00
Angus Leeming
57a24ea912 Replace 'using namespace abc;' with 'using abc::xyz;'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7725 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-09 22:13:45 +00:00
Angus Leeming
e835c9477b Pimpl Buffer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7719 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-09 11:24:33 +00:00
Angus Leeming
fd36f5ad76 Make buffer's member variables private; use accessor functions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7717 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-09 09:47:59 +00:00
Angus Leeming
4c6e0fe422 Removed all redundant using directives from the source.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7704 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-08 00:33:41 +00:00
Angus Leeming
ecaf48dc26 Forward declare LatexRunParams in converter.h.
Remove #include "lyxrc.h" from encoding.h.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7700 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-06 23:36:02 +00:00
Angus Leeming
91de22ef34 Strip 320 #includes from the files in src.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7684 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-05 16:31:30 +00:00
Lars Gullik Bjønnes
b881ed2d5a Use Buffer const reference in most placees possible.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7623 a592a061-630c-0410-9148-cb99ea01b6c8
2003-08-28 07:41:31 +00:00
Angus Leeming
0be0fcfd59 If I ever see another licence blurb again, it'll be too soon...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7598 a592a061-630c-0410-9148-cb99ea01b6c8
2003-08-23 00:17:00 +00:00