Commit Graph

695 Commits

Author SHA1 Message Date
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
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
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
f6730f66b0 Unicode: remove more utf8 roundtrips and faulty conversions to docstring
without from_utf8


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15864 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-11 20:55:40 +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
Abdelrazak Younes
479e9054db * Buffer
- new pimpled TocBackend member and associated accessors.

* toc.[Ch]: delete all toc related methods except outline.

* TocBackend:
  - goTo(): deleted, this gets rid of the LyXView dependency
  - made all accessors const.

* ControlToc: 
  - rework the controller to work exclusively with TocBackend.
  - goTo(): now call LyXView::dispatch() directly

all other files: update with the TocBackend or ControlToc API changes.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15852 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-11 00:35:14 +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
Georg Baum
b67e933869 Fix thinko in Buffer::makeLaTeXFile
* src/encoding.[Ch]
	(getEncoding): rename to getFromLyXName
	(getFromLaTeXName): new, it does what the name says

	* src/buffer.C
	(Buffer::makeLaTeXFile): Fix crash by using getFromLaTeXName instead
	of getFromLyXName.
	Avoid crash for unknown encodings.

	* src/language.C
	(Languages::read): Adjust to name change above


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15703 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-03 10:35:41 +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
eaa81aa13e some compile fixes, more to be expected
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15465 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 11:00:04 +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
José Matox
354fb450c2 More unicode fixes for docbook.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15459 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-21 19:40:29 +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
Michael Schmitt
b08f5ad69e change tracking:
* src/paragraph.h: insertXXX(...) requires either
        boolean parameter 'trackChanges' or a Change
        * src/insets/insettext.h: add trackChanges parameter
        to setText(...)
        * src/insets/*.C:
        * src/*.C: adjust properly & remove a couple of FIXMEs


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15399 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-20 11:44:58 +00:00
Lars Gullik Bjønnes
0d449056ef Output docbook as utf8. Probably quite a bit more work needed, but then help form a docbook person is needed.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15387 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-19 21:00:33 +00:00
Georg Baum
8b67659646 Use UTF8 for LaTeX export.
Known problems:
- No space is output after a \hfill. I probably broke this with the
  InsetCommand patch. I'll have a look later.
- Although the encoding is now UTF8 the arguments of the inputenc package
  are still the old ones, so LaTeX will not run.
- Labels and references with non-ASCII characters are broken. This needs to
  be fixed in lyx::support::escape(), but this is a file format change.
- Something seems to be wrong with index entries, but this is probably also
  due to the InsetCommand changes.

Have fun!


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15378 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-19 16:51:30 +00:00
Georg Baum
b02242bfaf Rework InsetCommandParams interface and file storage
* src/insets/insetcommandparams.[Ch]:
	(operator[]): New, access a parameter
	(clear): New, clear all parameters
	(info_): New, stire info about this command
	(cmdname): Rename to name_
	(contents, options, sec_options): Replace with params_. Parameters
	are now stored as docstring.
	(findInfo): New factor for command info for all commands
	(read, write): Use new syntax
	(parameter set and get methods): reimplemenmt for new parameter storage

	* src/insets/insetcommand.h
	(getParam): New, get a parameter
	(setParam): New, set a parameter
	(parameter set and get methods): Adjust to InsetCommandParams changes

	* src/insets/insetbibitem.[Ch]
	(write): Remove, not needed anymore
	(directWrite): ditto

	* src/insets/insetbibitem.C
	(InsetBibitem::read): Use InsetCommand::read

	* src/insets/insetref.C
	(InsetRef::latex): Use new InsetCommandParams interface

	* src/mathed/InsetMathHull.C
	(InsetMathHull::doDispatch): ditto

	* src/text3.C
	(LyXText::dispatch): ditto

	* src/factory.C
	(createInset): Create InsetCommandParams with command name
	(readInset): ditto
	(readInset): Remove error message for bibitem, since bibitem is
	now a normal command inset

	* src/buffer.C: Bump file format number

	* src/frontends/controllers/ControlCommand.[Ch]
	(ControlCommand): take an additional command name parameter

	* src/text.C
	(readParToken): Remove code for \bibitem

	* lib/lyx2lyx/LyX.py: Bump latest file format number

	* lib/lyx2lyx/lyx_1_5.py
	(convert_bibitem, convert_commandparams): new, convert to new format
	(revert_commandparams): new, convert to old format

	* development/FORMAT: document new format

	* many other files: Adjust to the changes above


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15357 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-17 21:07:16 +00:00
Jürgen Spitzmüller
77e145a406 Remember the char style label state and make it globally switchable.
* src/buffer: 
	file format incrementation to 251
* src/insets/insetcharstyle.[Ch]:
	- make show_label a param and save its state
	- let all-insets-toggle togle the label in charstyles
* development/FORMAT: 
	document file format change
* lib/lyx2lyx/LyX.py:
	add new file format
* lib/lyx2lyx/lyx_1_5.py:
	remove char style label param on reversion to 250.
	

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15345 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-16 07:06:41 +00:00
Martin Vermeer
21316375fe Support for optional arguments for environments. No material format change.
* src/buffer.C
	(BufferList bufferlist;): bump version

	* src/output_latex.C
	TexEnvironment: add optarg for environments

	* lib/lyx2lyx/lyx_1_5.py: add converters

	* development/FORMAT: document



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15315 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-12 20:21:14 +00:00
Georg Baum
79c876d4c3 Convert labels to unicode
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15305 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-12 10:50:45 +00:00
Michael Schmitt
1b5f5e58ed Change tracking:
* src/paragraph.h: remove enum ChangeTracking;
	remove default parameters for insertChar and insertInset
	* src/BufferView.h: constify getCurrentChange()
	* src/changes.h: make Change constructor explicit
	* src/insets/*.C: 
	* src/*.C: adjust accordingly; add FIXMEs


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15302 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-11 20:01:32 +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
Jürgen Spitzmüller
05be07de9e Fix bug 2744:
* buffer.[Ch] (changeRefsIfUnique): extend to handle bibitems 
        as well (the function takes a InsetCode argument now);
        clean up by using InsetIterator.

* InsetMathHull.C (doDispatch): changeRefsIfUnique needs a
        InsetCode argument now (bug 2744).

* insetlabel (doDispatch): changeRefsIfUnique needs a
        InsetCode argument now.

* insetbibitem (doDispatch): use changeRefsIfUnique
        (actual fix for bug 2744).

* insetcommand.[Ch]:
* insetcite.[Ch]: implement replaceContents, which is
        used by changeRefsIfUnique.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15289 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-09 14:21:11 +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
Michael Schmitt
eb11f2c542 Change tracking:
* rename output_changes to outputChanges
 * rename tracking_changes to trackChanges
 * add FIXMEs for later revision
 * remove trackChanges(); the CT data structure will always be set up
 * decouple LFUNs changes-output/change-accept/change-reject/
   all-changes-accept/all-changes-reject from LFUN changes-track



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15261 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-06 18:53:35 +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
André Pönitz
3537aa7448 cleanup after svn hang-up, #undef CursorShape. Should be compilable ganin now.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15029 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-17 10:00:15 +00:00
André Pönitz
e89625ef28 rename mathed/math_xinset into mathed/InsetMathX
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15026 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-17 09:14:18 +00:00
Enrico Forestieri
179ff08011 Avoid a name clash with boost 1.34
* src/lyx_cb.C (reconfigure):
	* src/buffer.C (runChktex):
	* src/lyxfunc.C (dispatch):
	* src/vc-backend.C (doVCCommand):
	* src/lyx_main.C (reconfigureUserLyXDir):
	Explicitly specify lyx::support::Path.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14982 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-12 17:41:50 +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
Lars Gullik Bjønnes
5aa348d969 Make the l10n machinery work with ucs4. Update (as wip) callers to do manual conversion and a FIXME comment. Lots of work to do.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14951 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-09 11:16:28 +00:00
Georg Baum
e33bac93cd Fix clipboard/selection encoding
* src/frontends/qt[34]/qt_helpers.[Ch]
	(toqstr): add variant for docstring
	(qstring_to_ucs4): Use docstring and port from qt4 to qt3

	* Many other files: Many std::string -> lyx::docstring conversions

	* src/support/lstrings.[Ch]
	(subst): Add variant for docstring and char_type
	(externalLineEnding): std::string -> lyx::docstring
	(internalLineEnding): std::string -> lyx::docstring


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14871 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-03 07:02:38 +00:00
Georg Baum
1fc0c01877 convert lfun arguments to docstring
* src/support/docstring.[Ch]
	(from_ascii): new conversion function
	(from_utf8): new conversion function
	(to_utf8): new conversion function
	(operator==) new, compare docstring and ASCII C string
	(operator!=) new, compare docstring and ASCII C string

	* src/support/Makefile.am: add new file docstring.C

	* development/scons/scons_manifest.py: ditto

	* src/funcrequest.[Ch]
	(argument): change name to argument_ and type to docstring,
	add an accessor
	(FuncRequest): Add two new constructors taking a docstring argument

	* all other files: adjust to the FuncRequest changes above


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14861 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-01 15:41:38 +00:00
Jürgen Spitzmüller
16b150e6bf * src/buffer.C (save):
catch exception thrown by boost::filesystem if copying to the 
	backup directory fails (fixes bug 2740: crash and dataloss if
	the backup dir was invalid or not writeable).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14849 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-29 08:38:00 +00:00
Abdelrazak Younes
cd8b0e563c This commit fixes the crash caused by loading an empty corrupted document.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14828 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-24 08:17:47 +00:00
Michael Schmitt
5a0176a6eb drop linuxdoc support (part 5)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14822 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-23 12:43:46 +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
Georg Baum
9245b426b3 Update file format for unicode
* src/buffer.C
	(LYX_FORMAT): update

	* src/bufferparams.h
	(inputenc): document

	* lib/lyx2lyx/LyX.py
	(format_relation): last format is now 249
	(get_encoding): return utf8 for formats > 248

	* lib/lyx2lyx/lyx_1_5.py
	(convert_utf8): don't change \inputencoding anymore
	(revert_utf8): new, revert encoding if possible

	* development/FORMAT: describe format 249


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14684 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-15 07:08:58 +00:00
Georg Baum
28ef49f2d9 * src/buffer.C
(Buffer::errorList): simplify

	* src/buffer.h
	emptyErrorList_ move to buffer.C and make it static const

	* src/lyx_main.C
	(LyX::exec2): Use for_each instead of for loop


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14667 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-14 09:33:49 +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
Jean-Marc Lasgouttes
ed6fcf9529 * buffer.C (updateDocLang): update labels when changing language.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14625 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-12 16:38:51 +00:00
Bo Peng
3002118616 Add more controls to the view-source dialog.
* src/buffer.[nC]: can write full source, separaet/rename makeXXXFile.
	* src/graphics/PreviewLoader.C: rename maleLaTeXFile to writeLaTeXSource
	* src/frontends/qt3/QViewSourceDialog.h, ui/QViewSourceDialogBase.ui,
		QViewSource.[hC], QViewSourceDialog.[hC]: qt3 frontend
	* src/frontends/qt4/QViewSource.[hC], ui/QViewSourceUi.ui,
		QViewSourceDialog.[hC]: qt4 frontend
	* src/frontends/controllers/ControlViewSource.[hC]: controller


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14539 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-04 13:59:12 +00:00
Abdelrazak Younes
00c37e4781 This commit transfer the ErrorList handling from LyXView to Buffer. It also removes the need for the error signal and simplify the kerbel <-> frontend communication. I think it should speed-up _significantly_ the latex compilation for example in case of problematic files.
TODO 1: All occurrences of "LyXView::showErrorList()" in the "kernel" should be replaced by a boost signal emission (Buffer::errors()). This signal is already connected to this showErrorList() slot.

TODO 2: The ErrorList mechanism is used wrongly in a number of place, most notably in "Converter.C". Instead of replacing the ErrorList in the "Buffer" class, the "Converter" class should maintain its own list instead and connect directly to the LyXView::showErrorList() slot.

Buffer:
* errorList_: new private member and associated access methods.
* setErrorList(): new accessor method.
* addError(): apend an error to the errorList_.
* error(): deleted.
* errors(): new boost signal, unused for now. Shall be used instead of LyXView::showErrorList().

LyXView:
* getErrorList(), addError(), errorlist_, errorConnection_: deleted.
* errorsConnection_: new boost connection for the Buffer::errors() signal.

lyx_main.C:
* LyX::exec2(): manually print all errors.

BufferView.h: remove unneeded ErrorList forward declaration.

BufferView::pimpl::menuInsertLyXFile(): delete Buffer::error() connection and add a FIXME comment

text.C: Use Buffer::addError() instead of Buffer::error() signal emission.

ControlErrorList.C: get the ErrorList from the Buffer instead of LyXView


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14467 a592a061-630c-0410-9148-cb99ea01b6c8
2006-07-15 22:43:37 +00:00
Georg Baum
0c0c43b8eb merge booktabs branch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14319 a592a061-630c-0410-9148-cb99ea01b6c8
2006-07-03 19:13:56 +00:00
Georg Baum
4ae87a3bb8 Call python with the -tt switch to make mixed tab/space indentation an error
* src/support/os.[Ch]
	(python): new function, return the python command

	* lib/lyx2lyx/lyx_1_5.py
	(revert_font_settings): replace tabs with spaces

The rest is simply s/python/python -tt/ and
s/"python"/lyx::support::os::python()/ where appropriate.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14270 a592a061-630c-0410-9148-cb99ea01b6c8
2006-06-30 13:54:01 +00:00
Jean-Marc Lasgouttes
a185f95d32 remove annoying debug messages
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14260 a592a061-630c-0410-9148-cb99ea01b6c8
2006-06-28 14:22:31 +00:00
Jürgen Spitzmüller
54acb900ad The Grand Font Selection Redesign:
* lib/lyx2lyx/LyX.py (format_relation): add file format 247 (from Georg BAUM).

        * lib/lyx2lyx/lyx_1_5.py: add convert_font_settings, revert_font_settings (from Georg BAUM).

        * lib/chkconfig.ltx: Test for newly supported font packages

        * lib/doc/LaTeXConfig.lyx.in: document newly supported font packages

        * lib/doc/UserGuide.lyx: document new UI.

        * lib/doc/Extended.lyx: update PostScript font documentation

        * development/FORMAT: document file format change 246->247.

        * src/tex-strings.[Ch]: new strings tex_fonts_roman, tex_fonts_sans, 
           tex_fonts_monospaced (with GUI equivalents).

        * src/buffer.C: Format up to 247.

        * src/bufferparams.C:
        new params fontsRoman, fontsSans, fontsTypewriter, fontsDefaultFamily,    
        fontsSC, fontsOSF, fontsSansScale and fontsTypewriterScale
        (LyXFont const BufferParams::getFont): consider switch of default family.
        (string const BufferParams::loadFonts): new method to get all the LaTeX 
        font stuff done.

        * src/paragraph.C
        (LyXFont const Paragraph::getFont):
        (LyXFont const Paragraph::getLabelFont):
        (LyXFont const Paragraph::getLayoutFont): user buffer's not textclass's 
        default font

        * src/text.C
        (int LyXText::leftMargin):
        (int LyXText::rightMargin): user buffer's not textclass's default font

        * src/text2.C
        (LyXFont LyXText::getFont):
        (LyXFont LyXText::getLayoutFont):
        (LyXFont LyXText::getLabelFont): check if the family of the default document 
        font has been customized.

        * src/frontends/gtk/GDocument.[Ch]: implement new font ui (from Georg BAUM).

        * src/frontends/gtk/glade/document.glade: implement new font ui (from Georg BAUM). 

        * src/frontends/qt3/Makefile.dialogs: add new FontModuleBase

        * src/frontends/qt3/ui/FontModuleBase.ui: new File

        * src/frontends/qt3/ui/TextLayoutModuleBase.ui: remove font widgets

        * src/frontends/qt3/QDocument.C
        * src/frontends/qt3/QDocumentDialog.[Ch]: implement new font ui

        * src/frontends/qt4/Makefile.dialogs: add new FontUi

        * src/frontends/qt4/QDocumentDialog.[Ch]: implement new font ui

        * src/frontends/qt4/ui/FontUi.ui: new File

        * src/frontends/qt4/ui/TextLayoutUi.ui: remove font widgets

        * src/frontends/qt4/ui/compile_uic.sh: add new FontUi

        * src/frontends/xforms/FormDocument.[Ch]: implement new font ui

        * src/frontends/xforms/forms/form_document.fd: add new font tab.

        * src/frontends/controllers/ControlDocument.[Ch]
        (char ControlDocument::fontfamilies):
        (char ControlDocument::fontfamilies_gui):
        (bool ControlDocument::isFontAvailable):
        (bool ControlDocument::providesSC):
        (bool ControlDocument::providesOSF):
        (bool ControlDocument::providesScale): new methods, providing font info.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14143 a592a061-630c-0410-9148-cb99ea01b6c8
2006-06-19 08:10:17 +00:00
Martin Vermeer
1a77233c5f Add support for framed.sty
* src/LaTeXFeatures.C: add framed.sty

	(const * simplefeatures[]: add framed.sty
	(const LaTeXFeatures::getPackages): define shadecolor

	* src/insets/insetnote.h

	* src/insets/insetnote.C
	(const init_notetranslator):
	(InsetNote::setButtonLabel): add Framed and Shaded
	(InsetNote::latex): add output
	(InsetNote::validate): require framed.sty

	* src/buffer.C
	(BufferList bufferlist): new LyX version 246

	* src/frontends/qt3/ui/QNoteDialogBase.ui: add

	* src/frontends/qt3/QNoteDialog.C: add

	* src/frontends/qt3/QNote.C
	(QNote::update_contents): add framed, shaded
	(QNote::apply): add framed, shaded

	* src/LColor.[Ch]: add background colour for shaded

	* lib/lyx2lyx/LyX.py: New version support

	* lib/lyx2lyx/lyx_1_5.py: convert/revert

	* lib/chkconfig.ltx: add framed.sty

	* src/frontends/xforms/FormNote.C
	(FormNote::build):
	(FormNote::update): add FIXME

	* src/frontends/gtk/GNote.C
	(GNote::doBuild):
	(GNote::update):
	(GNote::apply): add FIXME

	* development/FORMAT: document format increase



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13993 a592a061-630c-0410-9148-cb99ea01b6c8
2006-06-03 16:46:27 +00:00