Commit Graph

2274 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
a9a3b79528 revert r17737; it was designed to fix bug 2993, but it created bug 3503. Consequently I will mark bug 2993 as wontfix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18454 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-22 14:06:40 +00:00
Jürgen Spitzmüller
cddcdd08ea make InsetListings ready for dialects, part 1 (joint work with Bo Peng):
* src/insets/InsetListingsParams.cpp:
	- complete list of languages/dialects
	- fix some typos
	- (validate): check for braces

* src/frontends/qt4/QListings.cpp:
	- fix list of languages (not yet complete)
	- make it possible to enter [dialect]language in the advanced widget

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18451 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-22 04:43:30 +00:00
Richard Heck
4318b4def2 Partial fix for bug 1474 (crashes on recursive includes) and complete fix for
bug 3659 (crash when file contains only an InsetInclude). 

Added checks for self-inclusion. The reason this is not a complete fix is that
recursive input could arise from something other than self-inclusion. Checking
for that will be much more complicated, however.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18445 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-21 15:34:29 +00:00
Jürgen Spitzmüller
5cb3e19200 * src/insets/InsetListings.{cpp,h}:
- implement metrics and draw, fix font initialization
	(fix bug 3653)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18429 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-20 05:53:49 +00:00
Bo Peng
e658f71f07 Remove color dependency of framed note, fix bug 3598
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18428 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-20 02:53:19 +00:00
Stefan Schimanski
a1802a2a96 * markers2 are drawn below the inset, hence increase the descent instead of ascent by the frame size.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18426 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-19 19:45:55 +00:00
Bo Peng
f672df5dc2 BUG 3649: display float listings inline, like other float insets
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18413 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-18 20:01:56 +00:00
Bo Peng
d848a5e393 BUG 3598: display framed and shaded notes in a separate paragraph, require package color also for framed note
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18412 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-18 20:00:19 +00:00
Jürgen Spitzmüller
a42d3e670b Fix for bug 3637, joint work of Bo Peng and myself:
* src/insets/InsetListingsParams.{cpp,h}
	- implement getParamValue that returns the value of a listings param

* src/insets/InsetInclude.cpp:
	- (getLabelList): pass listings label to the list, if available
	- doDispatch: implement changeRefsIfUnique for listing labels

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18405 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-18 14:40:39 +00:00
Bo Peng
73849af5df InsetListings: change the interface of diaplay function and allow AlignLeft. Applied to InsetListings. Fixes bug 3617, 3618
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18404 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-18 14:32:29 +00:00
Bo Peng
a90f967d6f InsetListings: fix bug 3626
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18373 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-16 20:34:57 +00:00
Bo Peng
7ea0cd1dd9 InsetListingsParams.h/cpp: fix compiler warning about initialization order
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18344 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-15 14:56:55 +00:00
Bo Peng
72e0b87a90 Separate caption and label from InsetListingsParams and handle them separately in listings and Include dialog, from Jurgen
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18324 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-14 20:42:14 +00:00
Michael Schmitt
8684c07664 output changes by means of xcolor and soul
- when exporting with pdflatex 
  - when exporting with latex and dvipost is not available
rename two colors (strikeout => deletedtext, newtext => addedtext)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18284 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-13 15:17:57 +00:00
Bernhard Roider
6de5d0ad58 fix bug 2453
change of behavior of rotate-tabular and rotate-cell toolbar buttons such that they toggle the rotation. Therefore a toggle feature is added to the tabular features. Moreover after the patch the state of the set-rotate-cell and toggle-rotate-cell buttons is on only if all selected cells in the table are rotated. If not all selected cells are rotated then the toggle button rotates all selected cells.

The toggle-icons are copied from the set-icons.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18280 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-12 20:59:21 +00:00
Bo Peng
59252c1f8f InsetListingsParams.h/cpp: Allow , in parameter string which is common in caption
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18279 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-12 15:07:18 +00:00
Bo Peng
4d0552dd80 add color mathcorners and implement mathbg (partially)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18277 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-12 06:24:46 +00:00
Bo Peng
e44fc571cc revert wrongly committed patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18263 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-11 02:34:56 +00:00
Bo Peng
a8e9fe82d0 lib/lyx2lyx/lyx_1_5.py: fix revert of listings insets
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18262 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-11 02:28:14 +00:00
Bo Peng
ae9afa946a fix a listings param name
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18253 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-09 21:28:43 +00:00
Bo Peng
1038ed69e6 Fix InsetListings::init, call setButtonLabel explicitly because that function is not virtual
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18246 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-09 20:00:06 +00:00
Bo Peng
4ce743a0a7 Add support for listings package. Two listings command \lstinline, \lstinputlisting and an environment \lstlisting are supported, along with preamble \lstset. \lstinputlisting is implemented through Include dialog, and the other two are implemented with a new inset listings, along with its dialog.
* src/LyXAction.cpp: listing-insert action
	* src/insets/Inset.h,cpp: LISTINGS_CODE
	* src/insets/InsetInclude.cpp: handle \lstinputlisting
	* src/insets/InsetListings.h,cpp: new listings inset
	* src/insets/InsetListingsParams.h,cpp: parameters from listings package
	* src/insets/InsetCommandParams.h,cpp: handle lstinputlisting option
	* src/Bidi.cpp: handle LISTINGS_CODE
	* src/frontends/qt4/ui/TextLayoutUi.ui: update UI
	* src/frontends/qt4/ui/ListingsUi.ui: new dialog
	* src/frontends/qt4/ui/IncludeUi.ui: update UI
	* src/frontends/qt4/QInclude.h,cpp: add lstinputlisting
	* src/frontends/qt4/QDocument.h,cpp: add textedit for preamble listings_params
	* src/frontends/qt4/QListings.h,cpp: new listings inset
	* src/frontends/qt4/Dialogs.cpp: new listings dialog
	* src/frontends/controllers/ControlInclude.h,cpp: add lstinputlisting
	* src/frontends/controllers/ControlListings.h,cpp: new listings inset
	* src/LyXFunc.cpp: handle LISTING_CODE
	* src/Paragraph.cpp: handle LISTING_CODE
	* src/factory.cpp: new listings inset
	* src/CutAndPaste.cpp: handle LISTINGS_CODE
	* src/LaTeXFeatures.cpp: require listings
	* src/Text3.cpp: Handle LISTINGS_CODE
	* src/lfuns.h: add LFUN_LISTING_INSERT
	* src/Buffer.cpp: change lyx file format to 269
	* src/BufferParams.h,cpp: add listings_params to preamble
	* lib/lyx2lyx/LyX.py: lyx2lyx 
	* lib/lyx2lyx/lyx_1_5.py: lyx2lyx
	* lib/ui/stdmenus.inc: new menu item (no shortcut!)
	* src/insets/Makefile.am: update autotools
	* src/frontends/controllers/Makefile.am
	* src/frontends/qt4/Makefile.dialogs
	* src/frontends/qt4/Makefile.am
	* po/POTFILES.in: a few more translatable files.
	* development/scons/scons_manifest.py: scons build system
	* development/FORMAT: document format changes


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18243 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-09 19:11:42 +00:00
Jürgen Spitzmüller
410a946f1f * src/insets/InsetMarginal.h:
- revert accidental encoding change

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18189 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-03 15:54:56 +00:00
Jürgen Spitzmüller
6896eafabd * src/insets/InsetMarginal.h:
- add missing name() (fix bug 3540)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18188 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-03 15:53:14 +00:00
Michael Schmitt
a746aa5214 "fix" bug #3332 (plain text export depends on the menu language)
Please note that method B_ (translate text to buffer language) is presently broken (at least on Windows)!


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18143 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-01 08:26:40 +00:00
André Pönitz
75637c0dd8 remove RowList_fwd.h. Not really needed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18135 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-30 22:02:15 +00:00
Abdelrazak Younes
845feeabfc Fix bug 3186?
http://bugzilla.lyx.org/show_bug.cgi?id=3186

Caption outside float or long table will get the "Senseless!!" label.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18120 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-30 15:17:16 +00:00
Abdelrazak Younes
2640b21228 * Inset and derivatives: insetName() -> name()
* InsetMath::name(): deleted.

* buffer_funcs.cpp:setCaptions() fix potential bug by using docstring copy instead of reference while using Inset::name.





git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18119 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-30 14:39:09 +00:00
André Pönitz
e0d54dd3b4 LyXText -> Text
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18103 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 23:33:02 +00:00
Michael Schmitt
295eea310e replace term "Glossary" by "Nomenclature"
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18102 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 22:21:00 +00:00
André Pönitz
6add1994c7 rename LyXTextClass* into TextClass*
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18097 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 19:53:54 +00:00
André Pönitz
0bf9ac02a8 rename LyXLayout into Layout
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18096 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 18:58:28 +00:00
André Pönitz
fc6ce7cd08 rename LyXFont to Font except in tex2lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18095 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 18:17:15 +00:00
André Pönitz
32871c1284 rename InsetBase to Inset
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18089 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 13:39:47 +00:00
André Pönitz
51fbea02a8 Remove InsetOld
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18087 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 12:32:14 +00:00
Bo Peng
e36fba33ab Last (?) batch of renames:
src/frontends/Alert.h src/frontends/alert.h
src/frontends/Alert.cpp src/frontends/alert.cpp
src/frontends/Alert_pimpl.cpp src/frontends/alert_pimpl.cpp
src/frontends/qt4/Alert_pimpl.cpp src/frontends/qt4/alert_pimpl.cpp
src/frontends/controllers/ButtonPolicies.cpp src/frontends/controllers/ButtonPolicy.cpp
src/frontends/controllers/ButtonPolicies.h src/frontends/controllers/ButtonPolicy.h
src/insets/InsetEnv.cpp src/insets/InsetEnvironment.cpp
src/insets/InsetEnv.h src/insets/InsetEnvironment.h
src/mathed/MathMacroTable.h src/mathed/MacroTable.h
src/mathed/MathMacroTable.cpp src/mathed/MacroTable.cpp
src/lyx_cb.h src/callback.h
src/lyx_cb.cpp src/callback.cpp
src/UpdateFlags.h src/update_flags.h


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18076 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-28 20:44:46 +00:00
André Pönitz
8c622e4ff0 rename/merge LyXLength related stuff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18067 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-28 12:58:49 +00:00
Uwe Stöhr
82b70e9c64 File format change: Fix bug 1746 partly
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18052 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 21:40:51 +00:00
André Pönitz
5008ee540f rename LColor into Color
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18046 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 17:34:20 +00:00
André Pönitz
42123ab8a7 rename LCursor->Cursor
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18040 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 14:56:30 +00:00
André Pönitz
ef1a53c492 merge LyXTabular.{cpp,h} and insets/InsetTabular.{cpp,h}. More reorganization necessary. Not now...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18036 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 12:54:21 +00:00
André Pönitz
39e79d8602 rename LyXLex into Lexer
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18033 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 11:30:54 +00:00
André Pönitz
345d7c00cd remove ParagraphList_fwd.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18030 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 08:30:11 +00:00
Bo Peng
bcc90ce1c9 Rename three remaining .C files
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18026 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 05:18:04 +00:00
Bo Peng
138b23fac8 Rename files in src/support, step one.
src/support/package.h                              src/support/Package.h    Package
src/support/package.C.in                           src/support/Package.C.in  Package
src/support/path.h                                 src/support/Path.h    Path
src/support/fs_extras.h                            src/support/fs_extras.h NOCLASSES
src/support/RandomAccessList.h                     src/support/RandomAccessList.h    RandomAccessList
src/support/lyxmanip.h                             src/support/lyxmanip.h NOCLASSES
src/support/rename.C                               src/support/rename.cpp  NOCLASSES
src/support/abort.C                                src/support/abort.cpp  NOCLASSES
src/support/lyxlib.h                               src/support/lyxlib.h NOCLASSES
src/support/ExceptionMessage.h                     src/support/ExceptionMessage.h    ExceptionMessage
src/support/copy.C                                 src/support/copy.cpp  NOCLASSES
src/support/limited_stack.h                        src/support/limited_stack.h    limited_stack
src/support/filefilterlist.C                       src/support/FileFilterList.cpp    ['FileFilterList', 'Filter']
src/support/cow_ptr.h                              src/support/cow_ptr.h    cow_ptr
src/support/os_unix.C                              src/support/os_unix.cpp  NOCLASSES
src/support/socktools.h                            src/support/socktools.h NOCLASSES
src/support/forkedcontr.h                          src/support/ForkedcallsController.h    ForkedcallsController
src/support/os.h                                   src/support/os.h NOCLASSES
src/support/FileMonitor.h                          src/support/FileMonitor.h    FileMonitor
src/support/copied_ptr.h                           src/support/copied_ptr.h    copied_ptr
src/support/translator.h                           src/support/Translator.h    Translator
src/support/filetools.C                            src/support/filetools.cpp  NOCLASSES
src/support/unlink.C                               src/support/unlink.cpp  NOCLASSES
src/support/os_win32.C                             src/support/os_win32.cpp    GetFolderPath
src/support/lstrings.C                             src/support/lstrings.cpp  NOCLASSES
src/support/qstring_helpers.C                      src/support/qstring_helpers.cpp  NOCLASSES
src/support/getcwd.C                               src/support/getcwd.cpp  NOCLASSES
src/support/systemcall.C                           src/support/Systemcall.cpp    Systemcall
src/support/lyxalgo.h                              src/support/lyxalgo.h NOCLASSES
src/support/filefilterlist.h                       src/support/FileFilterList.h    ['FileFilterList', 'Filter']
src/support/unicode.C                              src/support/unicode.cpp    IconvProcessor
src/support/userinfo.C                             src/support/userinfo.cpp  NOCLASSES
src/support/lyxtime.C                              src/support/lyxtime.cpp  NOCLASSES
src/support/kill.C                                 src/support/kill.cpp  NOCLASSES
src/support/docstring.C                            src/support/docstring.cpp    to_local8bit_failure
src/support/os_cygwin.C                            src/support/os_cygwin.cpp  NOCLASSES
src/support/lyxsum.C                               src/support/lyxsum.cpp  NOCLASSES
src/support/environment.C                          src/support/environment.cpp  NOCLASSES
src/support/filetools.h                            src/support/filetools.h NOCLASSES
src/support/textutils.C                            src/support/textutils.cpp  NOCLASSES
src/support/mkdir.C                                src/support/mkdir.cpp  NOCLASSES
src/support/forkedcall.C                           src/support/Forkedcall.cpp    ['ForkedProcess', 'Forkedcall']
src/support/tempname.C                             src/support/tempname.cpp  NOCLASSES
src/support/os_win32.h                             src/support/os_win32.h    GetFolderPath
src/support/types.h                                src/support/types.h NOCLASSES
src/support/lstrings.h                             src/support/lstrings.h NOCLASSES
src/support/forkedcallqueue.C                      src/support/ForkedCallQueue.cpp    ForkedCallQueue
src/support/qstring_helpers.h                      src/support/qstring_helpers.h NOCLASSES
src/support/convert.C                              src/support/convert.cpp  NOCLASSES
src/support/filename.C                             src/support/FileName.cpp    ['FileName', 'DocFileName']
src/support/tests/convert.C                        src/support/tests/convert.cpp  NOCLASSES
src/support/tests/filetools.C                      src/support/tests/filetools.cpp  NOCLASSES
src/support/tests/lstrings.C                       src/support/tests/lstrings.cpp  NOCLASSES
src/support/tests/boost.C                          src/support/tests/boost.cpp  NOCLASSES
src/support/docstream.C                            src/support/docstream.cpp    ['iconv_codecvt_facet_exception', 'idocfstream', 'odocfstream']
src/support/std_istream.h                          src/support/std_istream.h NOCLASSES
src/support/systemcall.h                           src/support/Systemcall.h    Systemcall
src/support/chdir.C                                src/support/chdir.cpp  NOCLASSES
src/support/std_ostream.h                          src/support/std_ostream.h NOCLASSES
src/support/unicode.h                              src/support/unicode.h    IconvProcessor
src/support/path.C                                 src/support/Path.cpp    Path
src/support/fs_extras.C                            src/support/fs_extras.cpp  NOCLASSES
src/support/userinfo.h                             src/support/userinfo.h NOCLASSES
src/support/lyxtime.h                              src/support/lyxtime.h NOCLASSES
src/support/docstring.h                            src/support/docstring.h    to_local8bit_failure
src/support/debugstream.h                          src/support/debugstream.h    basic_debugstream
src/support/environment.h                          src/support/environment.h NOCLASSES
src/support/textutils.h                            src/support/textutils.h NOCLASSES
src/support/forkedcall.h                           src/support/Forkedcall.h    ['ForkedProcess', 'Forkedcall']
src/support/socktools.C                            src/support/socktools.cpp  NOCLASSES
src/support/forkedcallqueue.h                      src/support/ForkedCallQueue.h    ForkedCallQueue
src/support/forkedcontr.C                          src/support/ForkedcallsController.cpp    ForkedcallsController
src/support/os.C                                   src/support/os.cpp  NOCLASSES
src/support/convert.h                              src/support/convert.h NOCLASSES
src/support/filename.h                             src/support/FileName.h    ['FileName', 'DocFileName']
src/support/docstream.h                            src/support/docstream.h    ['iconv_codecvt_facet_exception', 'idocfstream', 'odocfstream']
src/support/FileMonitor.C                          src/support/FileMonitor.cpp    FileMonitor



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18024 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 05:12:52 +00:00
Bo Peng
00e305c9d9 Rename .C ==> .cpp for files in src, part one
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18018 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 04:41:58 +00:00
Bo Peng
f6ab280632 merge src/frontends/controllers/biblio, character, frnt_lang, helper_funcs and tex_helpers to frontend_helpers, step 3
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17998 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-25 17:53:54 +00:00
Bo Peng
65d89a8af3 merge src/frontends/controllers/biblio, character, frnt_lang, helper_funcs and tex_helpers to frontend_helpers, step 1
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17996 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-25 17:15:56 +00:00
Bo Peng
176715bd56 Fix a few rename inconsistencies discovered by JMarc in insets and mathed, step 2
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17992 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-25 16:12:54 +00:00
Bo Peng
6e3a75969b Fix a few rename inconsistencies discovered by JMarc in insets and mathed, step 1
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17991 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-25 16:11:45 +00:00
Bo Peng
c8d00ed127 Rename insets/insetxxx to insets/InsetXxx, part 2
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17965 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-25 01:25:51 +00:00
Bo Peng
b6a2a76700 Rename insets/insetxxx to insets/InsetXxx, part 1
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17964 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-25 01:24:38 +00:00
Michael Schmitt
bb98a39589 * src/insets/insetcommandparams.C: fix WS
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17928 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-23 19:34:09 +00:00
Richard Heck
05ba87fe7a Fix case of BibTeX keys and remove unused variable. By myself and Bernhard.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17919 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-23 15:18:01 +00:00
Abdelrazak Younes
bc92746781 * In the process of fixing the math background color bug, this commit transfer backgroundColor() management from InsetOld to InsetBase; because this will be needed for InsetMath based insets.
* Also transfer InsetBase ctors from .h to .C


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17913 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-22 21:40:10 +00:00
Abdelrazak Younes
24c8ca10d2 Trying to solve bug-2452, I optimized some of the most significant problems outlined in the profile report attached in there.
This commit avoids unnecessary metrics recalculations by caching the last LyXFont used. I had to cleanup the width(), ascent() and descend() redundancies by transferring that to InsetBase.

InsetMathDim should go now as it is not really needed.

* InsetBase: properly handle inset Dimension.

* InsetOld: get rid of redundant width(), ascent() and descent()

* InsetMathDim: ditto

* InsetMathChar::metrics(): avoid metrics recalculation if font is unchanged.

* InsetMathSymbol::metrics(): ditto

* InsetMathKern: use InsetBase::dim_ instead of local ones.

* InsetMathSpace:
  - use InsetBase::dim_ instead of local ones.
  - space to width transformation transferred to anonymous namespace.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17899 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-22 08:26:06 +00:00
Jürgen Spitzmüller
bba7ac2a66 Fix bug 2884 and 3437:
* src/insets/insetbase.h:
* src/insets/insetcollapsable.h:
	- make isFixedWidth (former insetcollapsable member) a member of insetbase.
src/insets/insettext.h:
	- make border_ public (needed by insetcollapsable).
src/insets/insettext.C (draw, drawSelection):
	- adjust drawing for fixed width insets
* src/insets/insetcollapsable.C (metrics):
	- adjust dimension for fixed width insets
src/insets/insetbox.C (metrics):
	- properly calculate metrics for fixed width insets.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17879 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-21 08:43:46 +00:00
Abdelrazak Younes
08380ca491 Fix bug 3454 and 3463: Don't allow ill-formed commands. With this commit an error dialog will be shown to the user if the inset parameters were wrong upon creation. This patch uses exceptions.
* factory.C::createInset(): catch eventual exception.
* InsetCommandParams::read(): throw warning exception in case of errors.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17850 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-18 12:59:07 +00:00
Bo Peng
7a854d3a91 Fix bug 2993: mark buffer dirty when the status of a collapsable inset is changed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17837 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-17 14:35:27 +00:00
Richard Heck
840ee198e2 Captions do not accept alignment, spacing, etc.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17834 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-17 03:46:55 +00:00
Georg Baum
ed781c2afe prevent the compiler from optimiying away support::Path variables
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17751 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-06 18:03:29 +00:00
Georg Baum
d4e8fdd703 Use FileName instead of strings in support::Package.
This fixes some encoding problems, and hopefully also bug 3410.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17746 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-06 13:09:54 +00:00
Georg Baum
10271ff520 remove methods that are no longer needed since we have the new bibtex parser
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17739 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-06 08:48:34 +00:00
Bernhard Roider
4c9121df3b Fix bug 1826 + A more precise parser for bibtex files based on the description found on this web page: http://artis.imag.fr/~Xavier.Decoret/resources/xdkbibtex/bibtex_summary.html
Most important improvements:
- read file character by character and treat newline like space characters.
  Thus the @ does not need to be at the beginning of a line.
- it reads @string entries and replaces the strings in the field values
- it also handles @comment entries
- it recovers from syntax errors at the next entry starting with @
- it ignores everything between entries


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17723 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-04 20:06:34 +00:00
Georg Baum
0159c9d6c7 Normalize everything that comes from 'outside' (plain text import,
keyboard input via kmap, clipboard and selection) to normalized form KC
(precomposed characters) since we don't support the decomposed form very
well.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17702 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-03 08:15:39 +00:00
Michael Schmitt
ee47f918c2 remove redundant lyxerr.debugging checks; macro LYXERR already checks whether the output is actually needed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17681 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-01 14:51:13 +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
0f83c2563b Convert makeRelPath to docstring (from Michael Gerz)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17586 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-27 07:24:16 +00:00
Michael Schmitt
e667f92c11 * src/insets/insetcharstyle.C: fix bug #3252 (by M. Vermeer):
Cursor is not placed correctly in char style inset


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17578 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-26 19:16:49 +00:00
Abdelrazak Younes
4d5ae916ad Fix bug 3293 by Bernhard Roider:
This changes the semantics of isOK() and operator(), comments from Bernhard below:

With the old version of lyxlex it was _impossible_ to check whether reading an integer, float, ... succeeded or not. The current solution to check for is.bad() in some cases and in other cases use is.good() does not give the desired information. Moreover the result of is.bad() depends on the stl implementation and behaves different for linux and windows.

the bug was introduced by the patch that fixed the bug that crashed lyx when "inset-insert ert" was executed from the command buffer.
The lexer has the method isOK() which reflects the status of the stream is.
The operators void* and ! are not really well defined (they depend on the value of is.bad()). What is missing is a test if the last reading operation was successful and thus the returned value is valid.
That's what i implemented in this patch.

The new rule for using the lexer:

if you want to know if the lexer still has data to read (either from the stream or from the pushed token) then use "lex.isOK()".
If you want to test if the last reading operation was successful then use eg. "if (lex) {...}" or unsuccessful then use eg. "if (!lex) {...}"

an example:

int readParam(LyxLex &lex) {

    int param = 1; // default value
    if (lex.isOK()) { // the lexer has data to read
        int p;    // temporary variable
        lex >> p;
        if (lex) param = p; // only use the input if the reading operation was successful
    }
    return param;
}




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17569 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-26 13:43:49 +00:00
Abdelrazak Younes
4d2732b1e7 Fix bug 3258:
http://bugzilla.lyx.org/show_bug.cgi?id=3258

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17568 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-26 13:36:27 +00:00
Georg Baum
e6eb429915 add some comments
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17556 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-25 16:45:51 +00:00
Georg Baum
e4fd77faf7 Fix crash with included files
* src/buffer.C
	(Buffer::makeLaTeXFile): Use runparams.encoding to be consistent

	* src/insets/insetinclude.C
	(InsetInclude::latex): Change runparams.encoding to the encoding of
	the child document for makeLateXFile


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17555 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-25 16:31:16 +00:00
Abdelrazak Younes
dfbc9cfccc * BufferParams:
* transfer CiteEngine enum declaration to biblio.h
  * delete unneeded CiteEngine_enum
  * cite_engine is now cite_engine_ and is private.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17537 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-25 01:12:38 +00:00
Martin Vermeer
88542bc2ee Get ProvidesNatbib working correctly, esp. for egs.layout.
* insetcite: call getEngine()
* bufferparams: move getEngine() here, and let it sense the 
provides(natbib)
flag
* ControlBibtex, ControlCitation: correct getEngine() call
* biblio: remove old getEngine()



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17505 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-22 07:22:16 +00:00
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
Abdelrazak Younes
8186a02d61 Add const access to caption type.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17445 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-15 11:47:02 +00:00
Georg Baum
c6caf4199b fix typo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17444 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-14 20:23:54 +00:00
Uwe Stöhr
f84d08a078 - fix bug 2458
http://bugzilla.lyx.org/show_bug.cgi?id=2458
- whitespace

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17395 a592a061-630c-0410-9148-cb99ea01b6c8
2007-03-02 22:20:32 +00:00
Georg Baum
13f08c6215 Fix bug 3232
* src/insets/ExternalSupport.C
	(updateExternal): Don't forbid conversions using the default converter


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17380 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-28 09:12:32 +00:00
Georg Baum
0419779ef9 fix compiler warnings about unused parameters
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17325 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-24 17:18:13 +00:00
Michael Schmitt
8b177d7446 * src/insets/insetbox.C: plaintext(): add missing \n
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17323 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-24 15:54:11 +00:00
Michael Schmitt
6ab7047f3a * insets/*.C: constify docstring in plaintext()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17317 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-24 14:35:38 +00:00
Georg Baum
3a64f157b7 * src/insets/insetbox.C
(InsetBox::validate): Don't require the calc package anymore for
	pure minipages (as it was done in 1.3.x)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17312 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-23 18:39:54 +00:00
Georg Baum
4bbddb06e6 fix compiler warning
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17294 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-21 21:09:43 +00:00
Georg Baum
56ce8aa9e0 fix compiler warning
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17285 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-20 20:53:37 +00:00
Georg Baum
2d85046fd7 Fix crash after inset-insert ert, from Bernhard Roider
Extend this to some other cases by me.

	* src/insets/insetert.C
	(void InsetERTMailer::string2params): Test for lex.isOK rather than
	lex, since the latter is also true if there was nothing to read.

	* src/insets/insetvspace.C
	(InsetVSpace::read): ditto
	(InsetVSpaceMailer::string2params): ditto

	* src/insets/insetnote.C
	(InsetNoteParams::read): ditto


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17284 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-20 20:48:23 +00:00
Michael Schmitt
d8fd1b7a24 * src/insets/insetinclude.[Ch]: fix plaintext(); code formatting
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17281 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-20 19:14:55 +00:00
Michael Schmitt
80328d2053 * src/insets/insetcommand.C: fix plaintext() output
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17277 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-20 18:02:46 +00:00
Michael Schmitt
3157f17825 * inset*.C:
* insetbase.h: introduce new enum PLAINTEXT_NEWLINE and use
	it instead of runparams.linelen for plaintex() return values


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17275 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-20 17:52:41 +00:00
Michael Schmitt
2148e75116 * src/insets/insetert.C:
* src/insets/insetoptarg.C: add comment that we do not output anything
	for plaintext output INTENTIONALLY


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17244 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-18 18:55:11 +00:00
Georg Baum
af239344a7 Fix bugs 3240 and 3241
* src/insets/ExternalSupport.C
	(doSubstitution): redo the substitution with use_latex_path == false
	for the filename argument of $$Contents, since the original
	substitution might have been done with use_latex_path == true, and
	that can lead to escaped filenames that are only valid for TeX.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17242 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-18 18:29:25 +00:00
Michael Schmitt
2d550da85b * src/insets/insetexternal.[Ch]: fix plaintext(); code formatting; header alignment
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17237 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-18 10:57:23 +00:00
Michael Schmitt
f7d54f2afc * src/insets/insettabular.[Ch]: fix plaintext(); code formatting
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17236 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-18 10:47:08 +00:00
Michael Schmitt
16b2e76d1a * src/insets/insetbititem.C:
* src/insets/insetcite.C:
	* src/insets/insetcite.h: fix plaintext(); code formatting


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17234 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-17 16:36:45 +00:00
Michael Schmitt
1afeb2e34f * src/insets/insetfloatlist.C: fix plaintex()
* src/insets/insetfloatlist.h:
	* src/insets/insetcharstyle.[Ch]: code formatting


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17232 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-17 15:28:50 +00:00
Michael Schmitt
757d2bc963 * src/insets/insettoc.[Ch]:
* src/insets/insetspecialchar.[Ch]: fix plaintext(); WS changes


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17231 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-17 11:59:42 +00:00
Michael Schmitt
6d2a778724 * insetgraphics.[Ch]:
* insetquotes.C: fix plaintext(); WS changes


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17230 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-17 11:30:58 +00:00
Michael Schmitt
ac5f26744c * src/insets/insetnewline.C:
* src/insets/insetpagebreak.C:
	* src/insets/insetvspace.C: fix/comment on plaintext() return value
	* src/insets/insetvspace.h: WS changes


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17229 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-17 11:18:15 +00:00
Bo Peng
204f783bb1 Forget to set selection in r17213
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17222 a592a061-630c-0410-9148-cb99ea01b6c8
2007-02-16 15:38:34 +00:00