Commit Graph

23 Commits

Author SHA1 Message Date
Abdelrazak Younes
f7b1c86393 Move Inset::Code to InsetCode.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20936 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 09:04:52 +00:00
Abdelrazak Younes
237c132c1e * Inset:
- get rid of the cached Dimension. Text inset dimensions are saved in ParagraphMetrics and mathed maintain their own dimension where needed.
- width(), ascent(), descent(): deleted.
- dimension(): now needs a valid BufferView.
- metrics(): now void.

* BufferView::getCoveringInset(): simplify.

* ParagraphMetrics(): now cache inset dimensions.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20420 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-21 20:39:47 +00:00
Bo Peng
2a1a156f47 Embedding: store inset pointer instead of ParConstIterator to enable more accurate navigation in the Embedding dialog
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20164 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-09 07:07:13 +00:00
Bo Peng
692363bbca Embedding patch two: read/write embedded files'
*  src/insets/InsetGraphics.h
	*  src/insets/InsetExternal.cpp
	*  src/insets/InsetGraphics.cpp
	*  src/insets/InsetInclude.cpp
	*  src/insets/Inset.h
	*  src/insets/InsetInclude.h
	*  src/insets/InsetExternal.h: register embedded files
	*  src/EmbeddedFiles.h|cpp: core of embedded files
	*  src/Buffer.h|cpp: read/write embed file
	*  src/BufferParams.h|cpp: embedded flag
	*  src/Makefile.am
	*  po/POTFILES.in
	*  development/scons/scons_manifest.py: build system updates


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19924 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-30 20:46:42 +00:00
André Pönitz
ed858d73e5 use bald pointers in clone()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19920 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-30 18:03:17 +00:00
Richard Heck
cd772c60a5 Biblio.{h,cpp} --> BiblioInfo.{h,cpp}
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19660 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-20 17:04:36 +00:00
Richard Heck
b3bff4232a Improvements to the citation dialog UI. It is now possible to search particular fields (author, title, etc) and to filter keys by entry types (article, book, etc).
The changes are essentially of three types. 

First, the std::maps previously used here for storing BibTeX data have become full-fledged classes and so what were previously just a bunch of functions have now become methods of these new  classes. This leads to a lot of minor changes in other files, to adapt to the  new signature. The changes in insets/ are mostly of this kind.

Second, there are some slightly more substantial changes in src/insets/InsetBibtex.cpp. We now store lists of the field names and entry types that have been used.

Finally, there are the changes to the citation UI. These are mostly straightforward, though adding the new functionality exposed some inadequacies in the previous code that also had to be fixed.

One other change: BibTeX keys are now docstring. This solves some Unicode issues.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19657 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-20 16:30:02 +00:00
Richard Heck
5bb22d9498 Re-write of the BibTeX representation. The main change is that we now have
a structure representing field->value instead of just a single string with
all the data. The data structures are defined in src/Biblio_typedefs.h, and
the main changes are to the parser code in src/insets/InsetBibtex.cpp.

-src/Biblio_typedefs.h
 Contains typedefs for new representation. Separating them out limits how much 
 gets #include'd by other files, and also resolves a circularity problem with
 Buffer.h.

-src/Biblio.{h,cpp}
 Signature changes and massive simplifications to routines that report
 BibTeX data, since we now have an articulate representation.

-src/insets/InsetBibtex.{h,cpp}
 Re-write the parser code so we store a key->value map of the BibTeX data
 rather than just one long string. This is the main work.

-src/frontends/controllers/ControlCitation.{h,cpp}
-src/insets/InsetBibitem.{h,cpp}
-src/insets/InsetCitation.cpp
 Adaptations and simplifications.

-src/insets/Inset.h
-src/Buffer.{h,cpp}
-src/insets/InsetInclude.{h,cpp}
 Signature changes.

-src/Makefile.am
-development/scons/scons_manifest.py
 Add src/Biblio_typedefs.h


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19598 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-16 01:59:20 +00:00
Abdelrazak Younes
5958daf51b Fix child document labeling (const missing from overloaded updateLabels()).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19589 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-15 12:15:16 +00:00
Richard Heck
8a221dc70c Move the lyx::biblio namespace into src/. Also make changes to how the BibTeX
information is acquired. This involves (i) moving the bulk of fillWithBibKeys() 
into Biblio.cpp, (ii) introducing a virtual method Inset::fillWithBibKeys() that,
by default, does nothing, and (iii) over-riding this method in the insets that do
need to do something.

This is all preparatory for a more substantial re-working of the BibTex code,
which should follow shortly.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19565 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-14 16:50:51 +00:00
Abdelrazak Younes
4e7e580f54 I forget this in rev 19515.
* InsetInclude: loadIfNeeded()
- make it non anonymous (used in loadChildDocuments()).
- now return the loaded buffer.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19520 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-13 19:40:54 +00:00
Jean-Marc Lasgouttes
601a8e0192 Rewrite the label numbering code.
* buffer_funcs.cpp (updateLabels): new function taking a buffer and
	a ParIterator as arguments. This one is used to update labels
	into an InsetText. Cleanup the code to reset depth. Call setLabel
	for each paragraph, and then updateLabel on each inset it contains.
	(setCaptionLabels, setCaptions): removed.
	(setLabel): use Counters::current_float to make caption paragraphs
	labels.

	* insets/Inset.h (updateLabels): new virtual method, empty by
	default; this numbers the inset itself (if relevant) and then all
	the paragraphs it may contain.

	* insets/InsetText.cpp (updateLabels): basically calls
	lyx::updateLabels from buffer_func.cpp.

	* insets/InsetCaption.cpp (addToToc): use the label constructed by
	updateLabels.
	(computeFullLabel): removed.
	(metrics, plaintext): don't use computeFullLabel.
	(updateLabels): new method; set the label from
	Counters::current_float.

	* insets/InsetWrap.cpp (updateLabels):
	* insets/InsetFloat.cpp (updateLabel): new method; sets
	Counters::current_float to the float type.

	* insets/InsetBranch.cpp (updateLabels): new method; the numbering
	is reset afterwards if the branch is inactive. (bug 2671)

	* insets/InsetNote.cpp (updateLabels): new method; the numbering
	is reset after the underlying InsetText has been numbered.
	(bug 2671)

	* insets/InsetTabular.cpp (updateLabels): new method (also handles
	longtable)

	* insets/InsetListings.cpp (updateLabels): new method; mimics what
	is done for Floats (although Listings are not floats technically)

	* insets/InsetInclude.cpp (getScreenLabel): in the listings case,
	use the computed label.
	(updateLabels): new method; that either renumbers the child
	document or number the current listing.

	* LyXFunc.cpp (menuNew): do not updateLabels on empty documents
	(why do we do that at all?)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19482 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-12 21:43:58 +00:00
Alfredo Braunstein
0ebfa36965 const correctness (missed this)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18853 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-22 13:38:07 +00:00
Bo Peng
d3e30f8d9b addToToc, pass parent ParConstIterator, fix bug 3711
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18680 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-05 17:24:11 +00:00
Lars Gullik Bjønnes
897436efbb Whitespace cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18550 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-28 22:27:45 +00:00
Bo Peng
1561aef0b5 Increase listings counter for InsetInclude with lstinputlisting and a caption, fix bug 3708
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18486 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-24 14:10:35 +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
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
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
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
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
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